1. 16 Dec, 2011 40 commits
    • mhahnenberg@apple.com's avatar
      De-virtualize destructors · c58d54d7
      mhahnenberg@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=74331
      
      Reviewed by Geoffrey Garen.
      
      .: 
      
      * Source/autotools/symbols.filter: Removed symbol no longer present.
      
      Source/JavaScriptCore: 
      
      This is a megapatch which frees us from the chains of virtual destructors.
      
      In order to remove the virtual destructors, which are the last of the virtual 
      functions, from the JSCell hierarchy, we need to add the ClassInfo pointer to 
      the cell rather than to the structure because in order to be able to lazily call 
      the static destroy() functions that will replace the virtual destructors, we 
      need to be able to access the ClassInfo without the danger of the object's 
      Structure being collected before the object itself.
      
      After adding the ClassInfo to the cell, we can then begin to remove our use 
      of vptrs for optimizations within the JIT and the GC.  When we have removed 
      all of the stored vptrs from JSGlobalData, we can then also remove all of 
      the related VPtrStealingHack code.
      
      The replacement for virtual destructors will be to add a static destroy function 
      pointer to the MethodTable stored in ClassInfo.  Any subclass of JSCell that has 
      a non-trivial destructor will require its own static destroy function to static 
      call its corresponding destructor, which will now be non-virtual.  In future 
      patches we will slowly move away from destructors altogether as we make more and 
      more objects backed by GC memory rather than malloc-ed memory.  The GC will now 
      call the static destroy method rather than the virtual destructor.
      
      As we go through the hierarchy and add static destroy functions to classes, 
      we will also add a new assert, ASSERT_HAS_TRIVIAL_DESTRUCTOR, to those classes 
      to which it applies.  The future goal is to eventually have every class have that assert.
      
      * API/JSCallbackConstructor.cpp:
      (JSC::JSCallbackConstructor::destroy): Add a destroy function to statically call 
      ~JSCallbackConstructor because it has some extra destruction logic.
      * API/JSCallbackConstructor.h:
      * API/JSCallbackFunction.cpp: Add trivial destructor assert for JSCallbackFunction.
      * API/JSCallbackObject.cpp: Add a destroy function to statically call ~JSCallbackObject 
      because it has a member OwnPtr that needs destruction.
      (JSC::::destroy):
      * API/JSCallbackObject.h:
      * JavaScriptCore.exp: Add/remove necessary symbols for JSC.
      * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Same for Windows symbols.
      * debugger/DebuggerActivation.cpp: DebuggerActivation, for some strange reason, didn't 
      have its own ClassInfo despite the fact that it overrides a number of MethodTable 
      methods.  Added the ClassInfo, along with an assertion that its destructor is trivial.
      * debugger/DebuggerActivation.h:
      * dfg/DFGOperations.cpp: Remove global data first argument to isJSArray, isJSByteArray, 
      isJSString, as it is no longer necessary.
      (JSC::DFG::putByVal):
      * dfg/DFGRepatch.cpp:  Ditto.  Also remove uses of jsArrayVPtr in favor of using the 
      JSArray ClassInfo pointer.
      (JSC::DFG::tryCacheGetByID):
      * dfg/DFGSpeculativeJIT.cpp:  Replace uses of the old vptrs with new ClassInfo 
      comparisons since we don't have vptrs anymore.
      (JSC::DFG::SpeculativeJIT::compilePeepHoleObjectEquality):
      (JSC::DFG::SpeculativeJIT::compilePeepHoleBranch):
      (JSC::DFG::SpeculativeJIT::checkArgumentTypes):
      (JSC::DFG::SpeculativeJIT::compilePutByValForByteArray):
      (JSC::DFG::SpeculativeJIT::compileGetTypedArrayLength):
      (JSC::DFG::SpeculativeJIT::compilePutByValForIntTypedArray):
      (JSC::DFG::SpeculativeJIT::compilePutByValForFloatTypedArray):
      (JSC::DFG::SpeculativeJIT::compare):
      (JSC::DFG::SpeculativeJIT::compileStrictEq):
      (JSC::DFG::SpeculativeJIT::compileGetIndexedPropertyStorage):
      * dfg/DFGSpeculativeJIT.h: Ditto.
      (JSC::DFG::SpeculativeJIT::emitAllocateJSFinalObject):
      * dfg/DFGSpeculativeJIT32_64.cpp: Ditto.
      (JSC::DFG::SpeculativeJIT::compileObjectEquality):
      (JSC::DFG::SpeculativeJIT::compileObjectOrOtherLogicalNot):
      (JSC::DFG::SpeculativeJIT::compileLogicalNot):
      (JSC::DFG::SpeculativeJIT::emitObjectOrOtherBranch):
      (JSC::DFG::SpeculativeJIT::emitBranch):
      (JSC::DFG::SpeculativeJIT::compile):
      * dfg/DFGSpeculativeJIT64.cpp: Ditto.
      (JSC::DFG::SpeculativeJIT::compileObjectEquality):
      (JSC::DFG::SpeculativeJIT::compileObjectOrOtherLogicalNot):
      (JSC::DFG::SpeculativeJIT::compileLogicalNot):
      (JSC::DFG::SpeculativeJIT::emitObjectOrOtherBranch):
      (JSC::DFG::SpeculativeJIT::emitBranch):
      (JSC::DFG::SpeculativeJIT::compile):
      * heap/Heap.cpp: Remove all uses of vptrs in GC optimizations and replace them with 
      ClassInfo comparisons.
      (JSC::Heap::Heap):
      * heap/MarkStack.cpp: Ditto.
      (JSC::MarkStackThreadSharedData::markingThreadMain):
      (JSC::visitChildren):
      (JSC::SlotVisitor::drain):
      * heap/MarkStack.h: Ditto.
      (JSC::MarkStack::MarkStack):
      * heap/MarkedBlock.cpp: Ditto.
      (JSC::MarkedBlock::callDestructor):
      (JSC::MarkedBlock::specializedSweep):
      * heap/MarkedBlock.h: Ditto.
      * heap/SlotVisitor.h: Ditto.
      (JSC::SlotVisitor::SlotVisitor):
      * heap/VTableSpectrum.cpp: Now that we don't have vptrs, we can't count them.  
      We'll have to rename this class and make it use ClassInfo ptrs in a future patch.
      (JSC::VTableSpectrum::count):
      * interpreter/Interpreter.cpp: Remove all global data arguments from isJSArray, 
      etc. functions.
      (JSC::loadVarargs):
      (JSC::Interpreter::tryCacheGetByID):
      (JSC::Interpreter::privateExecute):
      * jit/JIT.h: Remove vptr argument from emitAllocateBasicJSObject 
      * jit/JITInlineMethods.h: Remove vptr planting, and add ClassInfo planting, 
      remove all vtable related code.
      (JSC::JIT::emitLoadCharacterString):
      (JSC::JIT::emitAllocateBasicJSObject):
      (JSC::JIT::emitAllocateJSFinalObject):
      (JSC::JIT::emitAllocateJSFunction):
      * jit/JITOpcodes.cpp: Replace vptr related branch code with corresponding ClassInfo.
      (JSC::JIT::privateCompileCTIMachineTrampolines):
      (JSC::JIT::emit_op_to_primitive):
      (JSC::JIT::emit_op_convert_this):
      * jit/JITOpcodes32_64.cpp: Ditto.
      (JSC::JIT::privateCompileCTIMachineTrampolines):
      (JSC::JIT::emit_op_to_primitive):
      (JSC::JIT::emitSlow_op_eq):
      (JSC::JIT::emitSlow_op_neq):
      (JSC::JIT::compileOpStrictEq):
      (JSC::JIT::emit_op_convert_this):
      * jit/JITPropertyAccess.cpp: Ditto.
      (JSC::JIT::stringGetByValStubGenerator):
      (JSC::JIT::emit_op_get_by_val):
      (JSC::JIT::emitSlow_op_get_by_val):
      (JSC::JIT::emit_op_put_by_val):
      (JSC::JIT::privateCompilePutByIdTransition):
      (JSC::JIT::privateCompilePatchGetArrayLength):
      * jit/JITPropertyAccess32_64.cpp: Ditto.
      (JSC::JIT::stringGetByValStubGenerator):
      (JSC::JIT::emit_op_get_by_val):
      (JSC::JIT::emitSlow_op_get_by_val):
      (JSC::JIT::emit_op_put_by_val):
      (JSC::JIT::privateCompilePatchGetArrayLength):
      * jit/JITStubs.cpp: Remove global data argument from isJSString, etc.
      (JSC::JITThunks::tryCacheGetByID):
      (JSC::DEFINE_STUB_FUNCTION):
      * jit/SpecializedThunkJIT.h: Replace vptr related stuff with ClassInfo stuff.
      (JSC::SpecializedThunkJIT::loadJSStringArgument):
      * runtime/ArrayConstructor.cpp: Add trivial destructor assert.
      * runtime/ArrayPrototype.cpp: Remove global data argument from isJSArray.
      (JSC::arrayProtoFuncToString):
      (JSC::arrayProtoFuncJoin):
      (JSC::arrayProtoFuncPop):
      (JSC::arrayProtoFuncPush):
      (JSC::arrayProtoFuncShift):
      (JSC::arrayProtoFuncSplice):
      (JSC::arrayProtoFuncUnShift):
      (JSC::arrayProtoFuncFilter):
      (JSC::arrayProtoFuncMap):
      (JSC::arrayProtoFuncEvery):
      (JSC::arrayProtoFuncForEach):
      (JSC::arrayProtoFuncSome):
      (JSC::arrayProtoFuncReduce):
      (JSC::arrayProtoFuncReduceRight):
      * runtime/BooleanConstructor.cpp: Add trivial destructor assert.
      * runtime/BooleanObject.cpp: Ditto.
      * runtime/BooleanPrototype.cpp: Ditto.
      * runtime/ClassInfo.h: Add destroy function pointer to MethodTable.
      * runtime/DateConstructor.cpp: Add trivial destructor assert.
      * runtime/DateInstance.cpp: Add destroy function for DateInstance because it has a RefPtr 
      that needs destruction.
      (JSC::DateInstance::destroy):
      * runtime/DateInstance.h:
      * runtime/Error.cpp: Ditto (because of UString member).
      (JSC::StrictModeTypeErrorFunction::destroy):
      * runtime/Error.h:
      * runtime/ErrorConstructor.cpp: Add trivial destructor assert.
      * runtime/ErrorInstance.cpp: Ditto.
      * runtime/ExceptionHelpers.cpp: Ditto.
      * runtime/Executable.cpp: Add destroy functions for ExecutableBase and subclasses.
      (JSC::ExecutableBase::destroy):
      (JSC::NativeExecutable::destroy):
      (JSC::ScriptExecutable::destroy):
      (JSC::EvalExecutable::destroy):
      (JSC::ProgramExecutable::destroy):
      (JSC::FunctionExecutable::destroy):
      * runtime/Executable.h:
      * runtime/FunctionConstructor.cpp: Add trivial destructor assert.
      * runtime/FunctionPrototype.cpp: Ditto. Also remove global data first arg from isJSArray.
      (JSC::functionProtoFuncApply):
      * runtime/GetterSetter.cpp: Ditto.
      * runtime/InitializeThreading.cpp: Remove call to JSGlobalData::storeVPtrs since it no 
      longer exists.
      (JSC::initializeThreadingOnce):
      * runtime/InternalFunction.cpp: Remove vtableAnchor function, add trivial destructor assert, 
      remove first arg from isJSString.
      (JSC::InternalFunction::displayName):
      * runtime/InternalFunction.h: Remove VPtrStealingHack.
      * runtime/JSAPIValueWrapper.cpp: Add trivial destructor assert.
      * runtime/JSArray.cpp: Add static destroy to call ~JSArray.  Replace vptr checks in 
      destructor with ClassInfo checks.
      (JSC::JSArray::~JSArray):
      (JSC::JSArray::destroy):
      * runtime/JSArray.h: Remove VPtrStealingHack.  Remove globalData argument from isJSArray 
      and change them to check the ClassInfo rather than the vptrs.
      (JSC::isJSArray):
      * runtime/JSBoundFunction.cpp: Add trival destructor assert. Remove first arg from isJSArray.
      (JSC::boundFunctionCall):
      (JSC::boundFunctionConstruct):
      * runtime/JSByteArray.cpp: Add static destroy function, replace vptr checks with ClassInfo checks.
      (JSC::JSByteArray::~JSByteArray):
      (JSC::JSByteArray::destroy):
      * runtime/JSByteArray.h: Remove VPtrStealingHack code.
      (JSC::isJSByteArray):
      * runtime/JSCell.cpp: Add trivial destructor assert.  Add static destroy function.
      (JSC::JSCell::destroy):
      * runtime/JSCell.h: Remove VPtrStealingHack code.  Add function for returning the offset 
      of the ClassInfo pointer in the object for use by the JIT.  Add the ClassInfo pointer to 
      the JSCell itself, and grab it from the Structure.  Remove the vptr and setVPtr functions, 
      as they are no longer used.  Add a validatedClassInfo function to JSCell for any clients 
      that want to verify, while in Debug mode, that the ClassInfo contained in the cell is the 
      same one as that contained in the Structure.  This isn't used too often, because most of 
      the places where we compare the ClassInfo to things can be called during destruction.  
      Since the Structure is unreliable during the phase when destructors are being called, 
      we can't call validatedClassInfo.
      (JSC::JSCell::classInfoOffset):
      (JSC::JSCell::structure):
      (JSC::JSCell::classInfo):
      * runtime/JSFunction.cpp: Remove VPtrStealingHack code.  Add static destroy, remove vtableAnchor, 
      remove first arg from call to isJSString.
      (JSC::JSFunction::destroy):
      (JSC::JSFunction::displayName):
      * runtime/JSFunction.h: 
      * runtime/JSGlobalData.cpp: Remove all VPtr stealing code and storage, including storeVPtrs, 
      as these vptrs are no longer needed in the codebase.
      * runtime/JSGlobalData.h:
      (JSC::TypedArrayDescriptor::TypedArrayDescriptor): Changed the TypedArrayDescriptor to use 
      ClassInfo rather than the vptr.
      * runtime/JSGlobalObject.cpp: Add static destroy function.
      (JSC::JSGlobalObject::destroy):
      * runtime/JSGlobalObject.h:
      * runtime/JSGlobalThis.cpp: Add trivial destructor assert.
      * runtime/JSNotAnObject.cpp: Ditto.
      * runtime/JSONObject.cpp: Ditto. Remove first arg from isJSArray calls.
      (JSC::Stringifier::Holder::appendNextProperty):
      (JSC::Walker::walk):
      * runtime/JSObject.cpp: 
      (JSC::JSFinalObject::destroy):
      (JSC::JSNonFinalObject::destroy):
      (JSC::JSObject::destroy):
      * runtime/JSObject.h: Add trivial destructor assert for JSObject, remove vtableAnchor 
      from JSNonFinalObject and JSFinalObject, add static destroy for JSFinalObject and 
      JSNonFinalObject, add isJSFinalObject utility function similar to isJSArray, remove all VPtrStealingHack code.
      (JSC::JSObject::finishCreation):
      (JSC::JSNonFinalObject::finishCreation):
      (JSC::JSFinalObject::finishCreation):
      (JSC::isJSFinalObject):
      * runtime/JSPropertyNameIterator.cpp: Add static destroy.
      (JSC::JSPropertyNameIterator::destroy):
      * runtime/JSPropertyNameIterator.h:
      * runtime/JSStaticScopeObject.cpp: Ditto.
      (JSC::JSStaticScopeObject::destroy):
      * runtime/JSStaticScopeObject.h: Ditto. 
      * runtime/JSString.cpp:
      (JSC::JSString::destroy):
      * runtime/JSString.h: Ditto. Remove VPtrStealingHack code. Also remove fixupVPtr code, 
      since we no longer need to fixup vptrs.
      (JSC::jsSingleCharacterString):
      (JSC::jsSingleCharacterSubstring):
      (JSC::jsNontrivialString):
      (JSC::jsString):
      (JSC::jsSubstring8):
      (JSC::jsSubstring):
      (JSC::jsOwnedString):
      (JSC::jsStringBuilder):
      (JSC::isJSString):
      * runtime/JSVariableObject.cpp: 
      (JSC::JSVariableObject::destroy):
      * runtime/JSVariableObject.h: Ditto.
      * runtime/JSWrapperObject.cpp:
      * runtime/JSWrapperObject.h: Add trivial destructor assert.
      * runtime/MathObject.cpp: Ditto.
      * runtime/NativeErrorConstructor.cpp: Ditto.
      * runtime/NumberConstructor.cpp: Ditto.
      * runtime/NumberObject.cpp: Ditto.
      * runtime/NumberPrototype.cpp: Ditto.
      * runtime/ObjectConstructor.cpp: Ditto.
      * runtime/ObjectPrototype.cpp: Ditto.
      * runtime/Operations.h: Remove calls to fixupVPtr, remove first arg to isJSString.
      (JSC::jsString):
      (JSC::jsLess):
      (JSC::jsLessEq):
      * runtime/RegExp.cpp: Add static destroy.
      (JSC::RegExp::destroy):
      * runtime/RegExp.h:
      * runtime/RegExpConstructor.cpp: Add static destroy for RegExpConstructor and RegExpMatchesArray.
      (JSC::RegExpConstructor::destroy):
      (JSC::RegExpMatchesArray::destroy):
      * runtime/RegExpConstructor.h:
      * runtime/RegExpMatchesArray.h:
      * runtime/RegExpObject.cpp: Add static destroy.
      (JSC::RegExpObject::destroy):
      * runtime/RegExpObject.h:
      * runtime/ScopeChain.cpp: Add trivial destructor assert.
      * runtime/ScopeChain.h:
      * runtime/StrictEvalActivation.cpp: Ditto.
      * runtime/StringConstructor.cpp:
      * runtime/StringObject.cpp: Ditto. Remove vtableAnchor.
      * runtime/StringObject.h:
      * runtime/StringPrototype.cpp: Ditto.
      * runtime/Structure.cpp: Add static destroy.
      (JSC::Structure::destroy):
      * runtime/Structure.h: Move JSCell::finishCreation and JSCell constructor into Structure.h 
      because they need to have the full Structure type to access the ClassInfo to store in the JSCell.
      (JSC::JSCell::setStructure):
      (JSC::JSCell::validatedClassInfo):
      (JSC::JSCell::JSCell):
      (JSC::JSCell::finishCreation):
      * runtime/StructureChain.cpp: Add static destroy.
      (JSC::StructureChain::destroy):
      * runtime/StructureChain.h:
      * wtf/Assertions.h: Add new assertion ASSERT_HAS_TRIVIAL_DESTRUCTOR, which uses clangs 
      ability to tell us when a class has a trivial destructor. We will use this assert 
      more in future patches as we move toward having all JSC objects backed by GC memory, 
      which means moving away from using destructors/finalizers.
      
      Source/JavaScriptGlue: 
      
      * UserObjectImp.cpp: Add static destroy function.
      (UserObjectImp::destroy):
      * UserObjectImp.h:
      
      Source/WebCore: 
      
      No new tests.
      
      Doing everything here that was done to the JSCell hierarchy in JavaScriptCore. 
      See the ChangeLog for this commit for a more in-depth description.
      
      * WebCore.exp.in: Add/remove symbols.
      * bindings/js/JSCanvasRenderingContext2DCustom.cpp: Remove first arg from isJSArray call.
      (WebCore::JSCanvasRenderingContext2D::setWebkitLineDash):
      * bindings/js/JSDOMBinding.cpp: Add trival destructor assert for DOMConstructorObject 
      and DOMConstructorWithDocument.
      * bindings/js/JSDOMGlobalObject.cpp: Add static destroy.  Add implementation for 
      scriptExecutionContext that dispatches to different functions in subclasses 
      depending on our current ClassInfo.  We do this so that we can get rid of the 
      virtual-ness of scriptExecutionContext, because any virtual functions will throw 
      off the layout of the object and we'll crash at runtime.
      (WebCore::JSDOMGlobalObject::destroy):
      (WebCore::JSDOMGlobalObject::scriptExecutionContext):
      * bindings/js/JSDOMGlobalObject.h:
      * bindings/js/JSDOMWindowBase.cpp: Add static destroy.
      (WebCore::JSDOMWindowBase::destroy):
      * bindings/js/JSDOMWindowBase.h: De-virtualize scriptExecutionContext.
      * bindings/js/JSDOMWindowShell.cpp: Add static destroy.
      (WebCore::JSDOMWindowShell::destroy):
      * bindings/js/JSDOMWindowShell.h:
      * bindings/js/JSDOMWrapper.cpp: Add trivial destructor assert.
      * bindings/js/JSDOMWrapper.h: Add a ClassInfo to JSDOMWrapper since it now overrides 
      a MethodTable function. Remove vtableAnchor virtual function.
      * bindings/js/JSImageConstructor.cpp: Add trivial destructor assert.
      * bindings/js/JSNodeCustom.cpp: Change implementation of pushEventHandlerScope so that 
      it dispatches to the correct function depending on the 
      identity of the class as specified by the ClassInfo.  
      See JSDOMGlobalObject::scriptExecutionContext for explanation.
      (WebCore::JSNode::pushEventHandlerScope):
      * bindings/js/JSWebSocketCustom.cpp: Remove first arg to isJSArray call.
      (WebCore::JSWebSocketConstructor::constructJSWebSocket):
      * bindings/js/JSWorkerContextBase.cpp: Add static destroy.
      (WebCore::JSWorkerContextBase::destroy):
      * bindings/js/JSWorkerContextBase.h: 
      * bindings/js/ScriptValue.cpp: Remove first arg to isJSArray call.
      (WebCore::jsToInspectorValue): 
      * bindings/js/SerializedScriptValue.cpp: Ditto.
      (WebCore::CloneSerializer::isArray):
      (WebCore::CloneSerializer::getSparseIndex):
      * bindings/scripts/CodeGeneratorJS.pm:
      (GenerateHeader): Remove virtual-ness of any custom pushEventHandlerScope (see 
      JSNodeCustom::pushEventHandlerScope for explanation).  Remove virtual toBoolean 
      for anybody who masquerades as undefined, since our JSObject implementation handles 
      this based on the TypeInfo in the Structure. Add trivial destructor assert for any 
      class other than DOMWindow or WorkerContexts.
      (GenerateImplementation): Change ClassInfo definitions to use Base::s_info, since 
      typing the parent class more than once is duplication of information and increases 
      the likelihood of mistakes.  Pass ClassInfo to TypeArrayDescriptors instead of vptr. 
      (GenerateConstructorDefinition): Add trivial destructor assert for all generated constructors.
      * bridge/c/CRuntimeObject.cpp: Remove empty virtual destructor.
      * bridge/c/CRuntimeObject.h: 
      * bridge/jni/jsc/JavaRuntimeObject.cpp: Ditto.
      * bridge/jni/jsc/JavaRuntimeObject.h: 
      * bridge/objc/ObjCRuntimeObject.h: Ditto.
      * bridge/objc/ObjCRuntimeObject.mm:
      * bridge/objc/objc_runtime.h: Add static destroy for ObjcFallbackObjectImp. De-virtualize 
      toBoolean in the short term.  Need longer term fix.
      * bridge/objc/objc_runtime.mm:
      (JSC::Bindings::ObjcFallbackObjectImp::destroy):
      * bridge/qt/qt_runtime.cpp: Add static destroy to QtRuntimeMethod.
      (JSC::Bindings::QtRuntimeMethod::destroy):
      * bridge/qt/qt_runtime.h: De-virtualize ~QtRuntimeMethod.
      * bridge/runtime_array.cpp: De-virtualize destructor. Add static destroy.
      (JSC::RuntimeArray::destroy):
      * bridge/runtime_array.h:
      * bridge/runtime_method.cpp: Remove vtableAnchor. Add static destroy.
      (JSC::RuntimeMethod::destroy):
      * bridge/runtime_method.h:
      * bridge/runtime_object.cpp: Add static destroy.
      (JSC::Bindings::RuntimeObject::destroy):
      * bridge/runtime_object.h:
      
      Source/WebKit/mac: 
      
      * Plugins/Hosted/ProxyRuntimeObject.h: Remove empty virtual destructor.
      * Plugins/Hosted/ProxyRuntimeObject.mm:
      
      Source/WebKit2: 
      
      * WebProcess/Plugins/Netscape/JSNPMethod.cpp: Add trivial destructor assert.
      * WebProcess/Plugins/Netscape/JSNPObject.cpp: Add static destroy.
      (WebKit::JSNPObject::destroy):
      * WebProcess/Plugins/Netscape/JSNPObject.h:
      * win/WebKit2.def: Add/remove necessary symbols.
      * win/WebKit2CFLite.def: Ditto.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@103083 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c58d54d7
    • ap@apple.com's avatar
      Poor XPath performance when evaluating an expression that returns a lot of nodes · 308a791f
      ap@apple.com authored
              https://bugs.webkit.org/show_bug.cgi?id=74665
              <rdar://problem/10517146>
      
              Reviewed by Darin Adler.
      
              No change in funcitonality. Well covered by existing tests (ran them with zero cutoff to
              execute the new code path).
      
              Our sorting function is optimized for small node sets in large documents, and this is the
              opposite of it. Added another one that traverses the whole document, adding nodes from the
              node set to sorted list. That doesn't grow with the number of nodes nearly as fast.
      
              Cutoff amount chosen for the document referenced in bug - this is roughly where the algorithms
              have the same performance on it.
      
              * xml/XPathNodeSet.cpp:
              (WebCore::XPath::NodeSet::sort):
              (WebCore::XPath::findRootNode):
              (WebCore::XPath::NodeSet::traversalSort):
              * xml/XPathNodeSet.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@103082 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      308a791f
    • mnaganov@chromium.org's avatar
      Rebaseline and add expectations after r103073 · 681a0607
      mnaganov@chromium.org authored
      [chromium] https://bugs.webkit.org/show_bug.cgi?id=74726
      
      * platform/chromium-linux/editing/input/caret-at-the-edge-of-contenteditable-expected.png: Added.
      * platform/chromium-linux/editing/input/caret-at-the-edge-of-input-expected.png: Added.
      * platform/chromium-linux/editing/input/reveal-caret-of-multiline-contenteditable-expected.png: Added.
      * platform/chromium-linux/editing/input/reveal-caret-of-multiline-input-expected.png: Added.
      * platform/chromium-mac-leopard/editing/input/caret-at-the-edge-of-contenteditable-expected.png: Added.
      * platform/chromium-mac-leopard/editing/input/caret-at-the-edge-of-input-expected.png: Added.
      * platform/chromium-mac-leopard/editing/input/reveal-caret-of-multiline-contenteditable-expected.png: Added.
      * platform/chromium-mac-leopard/editing/input/reveal-caret-of-multiline-input-expected.png: Added.
      * platform/chromium-mac-leopard/fast/forms/input-text-scroll-left-on-blur-expected.png:
      * platform/chromium-mac-snowleopard/editing/input/caret-at-the-edge-of-contenteditable-expected.png: Added.
      * platform/chromium-mac-snowleopard/editing/input/caret-at-the-edge-of-input-expected.png: Added.
      * platform/chromium-mac-snowleopard/editing/input/reveal-caret-of-multiline-contenteditable-expected.png: Added.
      * platform/chromium-mac-snowleopard/editing/input/reveal-caret-of-multiline-input-expected.png: Added.
      * platform/chromium-mac-snowleopard/fast/forms/input-text-scroll-left-on-blur-expected.png: Added.
      * platform/chromium-mac/fast/forms/input-text-scroll-left-on-blur-expected.png: Removed.
      * platform/chromium-win/editing/input/caret-at-the-edge-of-contenteditable-expected.png: Added.
      * platform/chromium-win/editing/input/caret-at-the-edge-of-contenteditable-expected.txt: Added.
      * platform/chromium-win/editing/input/caret-at-the-edge-of-input-expected.png: Added.
      * platform/chromium-win/editing/input/caret-at-the-edge-of-input-expected.txt: Added.
      * platform/chromium-win/editing/input/reveal-caret-of-multiline-contenteditable-expected.png: Added.
      * platform/chromium-win/editing/input/reveal-caret-of-multiline-contenteditable-expected.txt: Added.
      * platform/chromium-win/editing/input/reveal-caret-of-multiline-input-expected.png: Added.
      * platform/chromium-win/editing/input/reveal-caret-of-multiline-input-expected.txt: Added.
      * platform/chromium-win/fast/forms/input-text-scroll-left-on-blur-expected.png:
      * platform/chromium-win/fast/forms/input-text-scroll-left-on-blur-expected.txt:
      * platform/chromium/test_expectations.txt:
      * platform/gtk/test_expectations.txt:
      * platform/mac/fast/forms/input-text-scroll-left-on-blur-expected.txt:
      * platform/qt/test_expectations.txt:
      * platform/win/test_expectations.txt:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@103081 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      681a0607
    • antti@apple.com's avatar
      https://bugs.webkit.org/show_bug.cgi?id=74677 · 3e14426b
      antti@apple.com authored
      Count ResourceLoadScheduler suspends/resumes
      
      Reviewed by Andreas Kling.
      
      Using boolean is not robust when there are multiple clients calling suspendPendingRequests/resumePendingRequests.
              
      Increment and decrement suspend count instead of just setting/unsetting a boolean.
      
      * loader/ResourceLoadScheduler.cpp:
      (WebCore::ResourceLoadScheduler::ResourceLoadScheduler):
      (WebCore::ResourceLoadScheduler::servePendingRequests):
      (WebCore::ResourceLoadScheduler::suspendPendingRequests):
      (WebCore::ResourceLoadScheduler::resumePendingRequests):
      * loader/ResourceLoadScheduler.h:
      (WebCore::ResourceLoadScheduler::isSuspendingPendingRequests):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@103080 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3e14426b
    • adamk@chromium.org's avatar
      Improve performance of ChildListMutationScope when no MutationObservers are present · d4bf4895
      adamk@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=74671
      
      Reviewed by Ojan Vafai.
      
      Inline ChildListMutationScope's methods (including constructor and
      destructor), and provide a fast-fail case when no mutation observers
      are present.
      
      The code reorganization necessary for the above also removed the
      anonymous namespace in ChildListMutationScope.cpp, making both helper
      classes private inner classes of ChildListMutationScope.
      
      No new tests, refactoring only.
      
      * dom/ChildListMutationScope.cpp:
      (WebCore::ChildListMutationScope::MutationAccumulator::MutationAccumulator):
      (WebCore::ChildListMutationScope::MutationAccumulator::~MutationAccumulator):
      (WebCore::ChildListMutationScope::MutationAccumulator::isAddedNodeInOrder):
      (WebCore::ChildListMutationScope::MutationAccumulator::childAdded):
      (WebCore::ChildListMutationScope::MutationAccumulator::isRemovedNodeInOrder):
      (WebCore::ChildListMutationScope::MutationAccumulator::willRemoveChild):
      (WebCore::ChildListMutationScope::MutationAccumulator::enqueueMutationRecord):
      (WebCore::ChildListMutationScope::MutationAccumulator::clear):
      (WebCore::ChildListMutationScope::MutationAccumulator::isEmpty):
      (WebCore::ChildListMutationScope::MutationAccumulationRouter::MutationAccumulationRouter):
      (WebCore::ChildListMutationScope::MutationAccumulationRouter::~MutationAccumulationRouter):
      (WebCore::ChildListMutationScope::MutationAccumulationRouter::initialize):
      (WebCore::ChildListMutationScope::MutationAccumulationRouter::instance):
      (WebCore::ChildListMutationScope::MutationAccumulationRouter::childAdded):
      (WebCore::ChildListMutationScope::MutationAccumulationRouter::willRemoveChild):
      (WebCore::ChildListMutationScope::MutationAccumulationRouter::incrementScopingLevel):
      (WebCore::ChildListMutationScope::MutationAccumulationRouter::decrementScopingLevel):
      * dom/ChildListMutationScope.h:
      (WebCore::ChildListMutationScope::ChildListMutationScope):
      (WebCore::ChildListMutationScope::~ChildListMutationScope):
      (WebCore::ChildListMutationScope::childAdded):
      (WebCore::ChildListMutationScope::willRemoveChild):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@103079 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d4bf4895
    • enne@google.com's avatar
      [chromium] Mark fast/forms/input-text-scroll-left-on-blur.html as failing · a15b41e4
      enne@google.com authored
      https://bugs.webkit.org/show_bug.cgi?id=74726
      
      Unreviewed gardening.
      
      * platform/chromium/test_expectations.txt:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@103078 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a15b41e4
    • philn@webkit.org's avatar
      Unreviewed, GTK rebaseline of 2 fat/forms tests. · 73d932a3
      philn@webkit.org authored
      * platform/gtk/fast/forms/input-text-scroll-left-on-blur-expected.txt:
      * platform/gtk/fast/forms/plaintext-mode-2-expected.txt:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@103077 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      73d932a3
    • dino@apple.com's avatar
      Filters need to affect visual overflow · 6cb5ec7d
      dino@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=71930
      
      Source/WebCore:
      
      Reviewed by Simon Fraser.
      
      Make sure filters are included in visual overflow.
      Add a new method to calculate the expansion of overflow
      region given a list of FilterOperations. This is a slight
      duplication of code from the rendering path, but is needed
      because overflow is calculated before the FilterEffect
      chain is built.
      
      Also, filters were always rendered into their
      input rectangle which was wrong for any effect
      that produced a different sized result - drop-shadow
      and blur. This required two changes. First, FilterEffect
      needed a flag to decide whether or not to clip
      output to primitive regions (as required by SVG but not
      what we want here). Second, the rendering operation
      draws into the rectangle the filter claims is its painting
      rectangle.
      
      Test: css3/filters/regions-expanding.html
      
      * platform/graphics/filters/FEDropShadow.cpp:
      (WebCore::FEDropShadow::determineAbsolutePaintRect): Only
      clipToBounds if necessary.
      * platform/graphics/filters/FEGaussianBlur.cpp:
      (WebCore::FEGaussianBlur::calculateUnscaledKernelSize): CSS filters
      ask for the kernel size before the Filter object is created, so
      add a new method to return an unscaled kernel.
      (WebCore::FEGaussianBlur::calculateKernelSize):
      (WebCore::FEGaussianBlur::determineAbsolutePaintRect): Only
      clipToBounds if necessary.
      * platform/graphics/filters/FEGaussianBlur.h:
      * platform/graphics/filters/FEMorphology.cpp:
      (WebCore::FEMorphology::determineAbsolutePaintRect): Only
      clipToBounds if necessary.
      * platform/graphics/filters/FEOffset.cpp:
      (WebCore::FEOffset::determineAbsolutePaintRect): Only
      clipToBounds if necessary.
      * platform/graphics/filters/FilterEffect.cpp:
      (WebCore::FilterEffect::FilterEffect): Initialize clipToBounds
      as false so SVG remains unchanged.
      (WebCore::FilterEffect::determineAbsolutePaintRect): Only
      clipToBounds if necessary.
      * platform/graphics/filters/FilterEffect.h:
      (WebCore::FilterEffect::clipsToBounds):
      (WebCore::FilterEffect::setClipsToBounds):
      * rendering/FilterEffectRenderer.cpp:
      (WebCore::FilterEffectRenderer::build): Make sure we set our
      filters here to NOT clip to bounds.
      * rendering/FilterEffectRenderer.h:
      (WebCore::FilterEffectRenderer::outputRect): Asks the filter
      operation for the size of the result image.
      * rendering/RenderBlock.cpp:
      (WebCore::RenderBlock::computeOverflow):
      * rendering/RenderBox.cpp:
      (WebCore::RenderBox::addVisualEffectOverflow): Change the name
      from addBoxShadowAndBorderOverflow().
      * rendering/RenderBox.h:
      * rendering/RenderEmbeddedObject.cpp:
      (WebCore::RenderEmbeddedObject::layout):
      * rendering/RenderIFrame.cpp:
      (WebCore::RenderIFrame::layout):
      * rendering/RenderLayer.cpp:
      (WebCore::RenderLayer::paintLayer):
      * rendering/RenderLayerBacking.cpp:
      (WebCore::hasBoxDecorations): Change name from
      hasBorderOutlineOrShadow().
      (WebCore::hasBoxDecorationsOrBackground):
      (WebCore::hasBoxDecorationsOrBackgroundImage):
      * rendering/RenderReplaced.cpp:
      (WebCore::RenderReplaced::layout):
      * rendering/style/FilterOperations.cpp:
      (WebCore::outsetSizeForBlur): Return an IntSize that is the amount
      of offset.
      (WebCore::FilterOperations::hasOutsets):
      (WebCore::FilterOperations::getOutsets):
      * rendering/style/FilterOperations.h:
      * rendering/style/RenderStyle.h:
      (WebCore::InheritedFlags::getFilterOutsets):
      (WebCore::InheritedFlags::hasFilterOutsets):
      * svg/graphics/filters/SVGFEImage.cpp:
      (WebCore::FEImage::determineAbsolutePaintRect): Only
      clipToBounds if necessary.
      
      LayoutTests:
      
      Previously, filters that expanded their input
      region (drop-shadow and blur) were being squished
      when rendered back into the document. This is now
      fixed, so the expected.png images from tests including
      such filters needed updating. I also turned off
      dumpAsText() in order to enable pixel tests, and added
      some margin between the elements in effects which have
      overflow (so that blurs don't overlap, for example).
      
      There is one new test which exercises the case
      of expanding filters at various stages in a list
      of operations.
      
      Reviewed by Simon Fraser.
      
      * css3/filters/crash-filter-change-expected.png:
      * css3/filters/effect-blur-expected.png:
      * css3/filters/effect-blur-expected.txt:
      * css3/filters/effect-blur.html:
      * css3/filters/effect-combined-expected.png:
      * css3/filters/effect-combined-expected.txt:
      * css3/filters/effect-combined.html:
      * css3/filters/effect-drop-shadow-expected.png:
      * css3/filters/effect-drop-shadow-expected.txt:
      * css3/filters/effect-drop-shadow.html:
      * css3/filters/effect-gamma-expected.txt:
      * css3/filters/effect-gamma.html:
      * css3/filters/effect-grayscale-expected.txt:
      * css3/filters/effect-grayscale.html:
      * css3/filters/effect-hue-rotate-expected.txt:
      * css3/filters/effect-hue-rotate.html:
      * css3/filters/effect-invert-expected.png:
      * css3/filters/effect-invert-expected.txt:
      * css3/filters/effect-invert.html:
      * css3/filters/effect-opacity-expected.txt:
      * css3/filters/effect-opacity.html:
      * css3/filters/effect-saturate-expected.txt:
      * css3/filters/effect-saturate.html:
      * css3/filters/effect-sepia-expected.txt:
      * css3/filters/effect-sepia.html:
      * css3/filters/regions-expanding-expected.png: Added.
      * css3/filters/regions-expanding-expected.txt: Added.
      * css3/filters/regions-expanding.html: Added.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@103076 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6cb5ec7d
    • philn@webkit.org's avatar
      Unreviewed, skipping some svg tests still failing on GTK 64-bit after r103071. · 7832e744
      philn@webkit.org authored
      * platform/gtk/Skipped:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@103075 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7832e744
    • jwieczorek@webkit.org's avatar
      Add support for <ol reversed>. · c82ae1ee
      jwieczorek@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=36724
      
      The reversed attribute makes an ordered list appear with marker values
      decreasing from n, where n is the number of items.
      See: http://www.whatwg.org/specs/web-apps/current-work/#attr-ol-reversed
      
      Reviewed by Darin Adler.
      
      Source/WebCore:
      
      Tests: fast/lists/ol-reversed-dynamic-simple.html
             fast/lists/ol-reversed-dynamic.html
             fast/lists/ol-reversed-nested-items.html
             fast/lists/ol-reversed-nested-list.html
             fast/lists/ol-reversed-simple.html
      
      * html/HTMLAttributeNames.in:
      * html/HTMLOListElement.cpp:
      (WebCore::HTMLOListElement::HTMLOListElement):
      (WebCore::HTMLOListElement::parseMappedAttribute):
      (WebCore::HTMLOListElement::updateItemValues):
      (WebCore::HTMLOListElement::recalculateItemCount):
      * html/HTMLOListElement.h:
      (WebCore::HTMLOListElement::start):
      (WebCore::HTMLOListElement::isReversed):
      (WebCore::HTMLOListElement::itemCountChanged):
      (WebCore::HTMLOListElement::itemCount):
      * html/HTMLOListElement.idl:
      * rendering/RenderListItem.cpp:
      (WebCore::RenderListItem::nextListItem):
      (WebCore::previousListItem):
      (WebCore::RenderListItem::calcValue):
      (WebCore::RenderListItem::explicitValueChanged):
      (WebCore::previousOrNextItem):
      (WebCore::RenderListItem::updateListMarkerNumbers):
      * rendering/RenderListItem.h:
      
      LayoutTests:
      
      * fast/lists/ol-reversed-dynamic-expected.txt: Added.
      * fast/lists/ol-reversed-dynamic-simple-expected.txt: Added.
      * fast/lists/ol-reversed-dynamic-simple.html: Added.
      * fast/lists/ol-reversed-dynamic.html: Added.
      * fast/lists/ol-reversed-nested-items-expected.txt: Added.
      * fast/lists/ol-reversed-nested-items.html: Added.
      * fast/lists/ol-reversed-nested-list-expected.txt: Added.
      * fast/lists/ol-reversed-nested-list.html: Added.
      * fast/lists/ol-reversed-simple-expected.txt: Added.
      * fast/lists/ol-reversed-simple.html: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@103074 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c82ae1ee
    • mnaganov@chromium.org's avatar
      Scroll non-visible edit controls and caret into the center of the view when starting typing. · 83eaf39c
      mnaganov@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=65027
      
      Reviewed by Ryosuke Niwa.
      
      Tests: editing/input/caret-at-the-edge-of-contenteditable.html
             editing/input/caret-at-the-edge-of-input.html
             editing/input/reveal-caret-of-multiline-contenteditable.html
             editing/input/reveal-caret-of-multiline-input.html
             editing/input/reveal-contenteditable-on-input-vertically.html
             editing/input/reveal-contenteditable-on-paste-vertically.html
             editing/input/reveal-edit-on-input-vertically.html
             editing/input/reveal-edit-on-paste-vertically.html
      
      * editing/Editor.cpp:
      (WebCore::Editor::insertTextWithoutSendingTextEvent):
      (WebCore::Editor::revealSelectionAfterEditingOperation):
      
      * editing/input/caret-at-the-edge-of-contenteditable-expected.png: Added.
      * editing/input/caret-at-the-edge-of-contenteditable-expected.txt: Added.
      * editing/input/caret-at-the-edge-of-contenteditable.html: Added.
      * editing/input/caret-at-the-edge-of-input-expected.png: Added.
      * editing/input/caret-at-the-edge-of-input-expected.txt: Added.
      * editing/input/caret-at-the-edge-of-input.html: Added.
      * editing/input/resources/reveal-utilities.js: Added.
      * editing/input/reveal-caret-of-multiline-contenteditable-expected.png: Added.
      * editing/input/reveal-caret-of-multiline-contenteditable-expected.txt: Added.
      * editing/input/reveal-caret-of-multiline-contenteditable.html: Added.
      * editing/input/reveal-caret-of-multiline-input-expected.png: Added.
      * editing/input/reveal-caret-of-multiline-input-expected.txt: Added.
      * editing/input/reveal-caret-of-multiline-input.html: Added.
      * editing/input/reveal-contenteditable-on-input-vertically-expected.txt: Added.
      * editing/input/reveal-contenteditable-on-input-vertically.html: Added.
      * editing/input/reveal-contenteditable-on-paste-vertically-expected.txt: Added.
      * editing/input/reveal-contenteditable-on-paste-vertically.html: Added.
      * editing/input/reveal-edit-on-input-vertically-expected.txt: Added.
      * editing/input/reveal-edit-on-input-vertically.html: Added.
      * editing/input/reveal-edit-on-paste-vertically-expected.txt: Added.
      * editing/input/reveal-edit-on-paste-vertically.html: Added.
      * platform/chromium/test_expectations.txt: Mark new tests as FAIL to grab results from bots.
      * platform/gtk/test_expectations.txt: Mark new tests as FAIL to grab results from bots.
      * platform/qt/test_expectations.txt: Mark new tests as FAIL to grab results from bots.
      * platform/win/test_expectations.txt: Mark new tests as FAIL to grab results from bots.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@103073 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      83eaf39c
    • rniwa@webkit.org's avatar
      Touch RenderStyle in an attempt to fix linking errors on Chromium Windows bots. · 393ba27f
      rniwa@webkit.org authored
      * rendering/style/RenderStyle.h:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@103072 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      393ba27f
    • philn@webkit.org's avatar
      Unreviewed, GTK rebaseline of some svg tests. Also unskipping the · eb6b33ba
      philn@webkit.org authored
      ones I got passing on my 32-bit Release build. Let's see how the
      bots cope with those.
      
      * platform/gtk/Skipped:
      * platform/gtk/svg/W3C-SVG-1.1/animate-elem-80-t-expected.txt:
      * platform/gtk/svg/batik/masking/maskRegions-expected.txt:
      * platform/gtk/svg/custom/embedding-external-svgs-expected.txt:
      * platform/gtk/svg/custom/image-with-transform-clip-filter-expected.txt:
      * platform/gtk/svg/custom/marker-strokeWidth-changes-expected.txt: Added.
      * platform/gtk/svg/dom/css-transforms-expected.txt:
      * platform/gtk/svg/filters/feColorMatrix-values-expected.txt:
      * platform/gtk/svg/overflow/overflow-on-inner-svg-element-expected.txt:
      * platform/gtk/svg/wicd/test-scalable-background-image1-expected.txt: Added.
      * platform/gtk/svg/zoom/page/zoom-mask-with-percentages-expected.txt:
      * platform/gtk/svg/zoom/text/zoom-hixie-mixed-009-expected.txt: Added.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@103071 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      eb6b33ba
    • nduca@chromium.org's avatar
      [chromium] DelayBasedTimeSource should not change its timebase on late ticks · c9041367
      nduca@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=74573
      
      The original DelayBasedTimeSource was designed to shift its timebase
      to the tick time when a tick came back "late." The rationale was that it is
      better to just "start fresh" after a stutter. After profiling this,
      this time-rebasing just destabilizes frame rate anytime the thread gets
      loaded.  This patch keeps the timebase stationary, leading to vastly
      smoother framerates when the message loop is under load.
      
      Reviewed by James Robinson.
      
      * platform/graphics/chromium/cc/CCDelayBasedTimeSource.cpp:
      (WebCore::CCDelayBasedTimeSource::updateState):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@103070 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c9041367
    • philn@webkit.org's avatar
      Unreviewed, skipping 3 failing GTK API tests. · 4225fa45
      philn@webkit.org authored
      * Scripts/run-gtk-tests:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@103069 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4225fa45
    • carlosgc@webkit.org's avatar
      [GTK] Use bit field for bool members of WebKitWindowPropertiesPrivate · 06be16bd
      carlosgc@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=74713
      
      Reviewed by Gustavo Noronha Silva.
      
      Most of the members are bools, so it reduces the memory footprint.
      
      * UIProcess/API/gtk/WebKitWindowProperties.cpp:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@103068 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      06be16bd
    • carlosgc@webkit.org's avatar
      [GTK] Window frame should be 0x0 when the toplevel window is not visible · 01e5c7df
      carlosgc@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=74709
      
      Reviewed by Gustavo Noronha Silva.
      
      * UIProcess/API/gtk/WebKitUIClient.cpp:
      (getWindowFrame): Check also whether the toplevel is visible
      before getting its size and position.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@103067 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      01e5c7df
    • philn@webkit.org's avatar
      Unreviewed, GTK API tests build fix attempt. · 0579073f
      philn@webkit.org authored
      * Scripts/run-gtk-tests: Run xvfb on a display not used by NRWT.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@103066 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0579073f
    • commit-queue@webkit.org's avatar
      Unreviewed, rolling out r103062. · 28ae5cb6
      commit-queue@webkit.org authored
      http://trac.webkit.org/changeset/103062
      https://bugs.webkit.org/show_bug.cgi?id=74715
      
      It broke many tests (Requested by Ossy on #webkit).
      
      Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2011-12-16
      
      Source/WebCore:
      
      * html/HTMLAttributeNames.in:
      * html/HTMLOListElement.cpp:
      (WebCore::HTMLOListElement::HTMLOListElement):
      (WebCore::HTMLOListElement::parseMappedAttribute):
      * html/HTMLOListElement.h:
      (WebCore::HTMLOListElement::start):
      * html/HTMLOListElement.idl:
      * rendering/RenderListItem.cpp:
      (WebCore::previousListItem):
      (WebCore::RenderListItem::calcValue):
      (WebCore::RenderListItem::explicitValueChanged):
      (WebCore::RenderListItem::updateListMarkerNumbers):
      * rendering/RenderListItem.h:
      
      LayoutTests:
      
      * fast/lists/ol-reversed-dynamic-expected.txt: Removed.
      * fast/lists/ol-reversed-dynamic-simple-expected.txt: Removed.
      * fast/lists/ol-reversed-dynamic-simple.html: Removed.
      * fast/lists/ol-reversed-dynamic.html: Removed.
      * fast/lists/ol-reversed-nested-items-expected.txt: Removed.
      * fast/lists/ol-reversed-nested-items.html: Removed.
      * fast/lists/ol-reversed-nested-list-expected.txt: Removed.
      * fast/lists/ol-reversed-nested-list.html: Removed.
      * fast/lists/ol-reversed-simple-expected.txt: Removed.
      * fast/lists/ol-reversed-simple.html: Removed.
      * fast/lists/ol-reversed-simple.xhtml: Removed.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@103065 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      28ae5cb6
    • philn@webkit.org's avatar
      Unreviewed, GTK test_expectations update. · ccb35e6b
      philn@webkit.org authored
      * platform/gtk/test_expectations.txt:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@103064 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ccb35e6b
    • philn@webkit.org's avatar
      Unreviewed, GTK test_expectations update. · b2d1a8fe
      philn@webkit.org authored
      * platform/gtk/test_expectations.txt:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@103063 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b2d1a8fe
    • alexis.menard@openbossa.org's avatar
      Add support for <ol reversed>. · fb91cfdd
      alexis.menard@openbossa.org authored
      https://bugs.webkit.org/show_bug.cgi?id=36724
      
      The reversed attribute makes an ordered list appear with marker values
      decreasing from n, where n is the number of items.
      See: http://www.whatwg.org/specs/web-apps/current-work/#attr-ol-reversed
      
      Patch by Alexis Menard  <alexis.menard@openbossa.org>, Jakub Wieczorek <jwieczorek@webkit.org> on 2011-12-16
      Reviewed by Darin Adler.
      
      Source/WebCore: 
      
      Tests: fast/lists/ol-reversed-dynamic-simple.html
             fast/lists/ol-reversed-dynamic.html
             fast/lists/ol-reversed-nested-items.html
             fast/lists/ol-reversed-nested-list.html
             fast/lists/ol-reversed-simple.html
      
      * html/HTMLAttributeNames.in:
      * html/HTMLOListElement.cpp:
      (WebCore::HTMLOListElement::HTMLOListElement):
      (WebCore::HTMLOListElement::parseMappedAttribute):
      (WebCore::HTMLOListElement::updateItemValues):
      (WebCore::HTMLOListElement::recalculateItemCount):
      * html/HTMLOListElement.h:
      (WebCore::HTMLOListElement::start):
      (WebCore::HTMLOListElement::isReversed):
      (WebCore::HTMLOListElement::itemCountChanged):
      (WebCore::HTMLOListElement::itemCount):
      * html/HTMLOListElement.idl:
      * rendering/RenderListItem.cpp:
      (WebCore::RenderListItem::nextListItem):
      (WebCore::previousListItem):
      (WebCore::RenderListItem::calcValue):
      (WebCore::RenderListItem::explicitValueChanged):
      (WebCore::previousOrNextItem):
      (WebCore::RenderListItem::updateListMarkerNumbers):
      * rendering/RenderListItem.h:
      
      LayoutTests: 
      
      * fast/lists/ol-reversed-dynamic-expected.txt: Added.
      * fast/lists/ol-reversed-dynamic-simple-expected.txt: Added.
      * fast/lists/ol-reversed-dynamic-simple.html: Added.
      * fast/lists/ol-reversed-dynamic.html: Added.
      * fast/lists/ol-reversed-nested-items-expected.txt: Added.
      * fast/lists/ol-reversed-nested-items.html: Added.
      * fast/lists/ol-reversed-nested-list-expected.txt: Added.
      * fast/lists/ol-reversed-nested-list.html: Added.
      * fast/lists/ol-reversed-simple-expected.txt: Added.
      * fast/lists/ol-reversed-simple.html: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@103062 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      fb91cfdd
    • philn@webkit.org's avatar
      Unreviewed, unskipping GTK testdownload. Should pass on the bot now. · 47030898
      philn@webkit.org authored
      * Scripts/run-gtk-tests:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@103061 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      47030898
    • ossy@webkit.org's avatar
      [Qt] Fix the build for newer Qt5 · 054abbd1
      ossy@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=74703
      
      Patch by Simon Hausmann <simon.hausmann@nokia.com> on 2011-12-16
      Reviewed by Csaba Osztrogonác.
      
      * QtTestBrowser/launcherwindow.h: Add missing forward declaration.
      * DumpRenderTree/qt/EventSenderQt.cpp:
      (EventSender::sendTouchEvent): Allocate QTouchDevice and use with QTouchEvent constructor.
      * WebKitTestRunner/qt/EventSenderProxyQt.cpp: Ditto.
      (WTR::EventSenderProxy::sendTouchEvent):
      * MiniBrowser/qt/MiniBrowserApplication.cpp:
      (MiniBrowserApplication::sendTouchEvent): Ditto.
      (MiniBrowserApplication::notify): Adapt to changed API for marking primary touch point.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@103060 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      054abbd1
    • senorblanco@chromium.org's avatar
      Enable CSS_FILTERS in Chromium. · ec68e3a3
      senorblanco@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=74334
      
      Reviewed by Chris Marrin.
      
      Source/WebCore: 
      
      Covered by css3/filters (when enabled).
      
      * platform/graphics/filters/FilterOperation.h:
      (WebCore::PassthroughFilterOperation::PassthroughFilterOperation):
      Since wingdi.h #define's PASSTHROUGH, #undef it after the includes.
      
      Source/WebKit/chromium: 
      
      * features.gypi:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@103059 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ec68e3a3
    • vestbo@webkit.org's avatar
    • morrita@google.com's avatar
      Unreviewed, test_expectations.txt update. · 21a9b428
      morrita@google.com authored
      * platform/chromium/test_expectations.txt:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@103057 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      21a9b428
    • paroga@webkit.org's avatar
      Unreviewed WinCE build fix after r102979. · a79151c6
      paroga@webkit.org authored
      Make everHadLayout() public accessible as it was before the change.
      
      * rendering/RenderObject.h:
      (WebCore::RenderObject::everHadLayout):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@103056 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a79151c6
    • morrita@google.com's avatar
      Unreviewed, test_expectations.txt update. · 4ffc5bd2
      morrita@google.com authored
      * platform/chromium/test_expectations.txt:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@103055 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4ffc5bd2
    • commit-queue@webkit.org's avatar
      [qt][wk2] Viewport info panel shows wrong current scale · 4c45afdb
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=74613
      
      Patch by Michael Bruning <michael.bruning@nokia.com> on 2011-12-16
      Reviewed by Kenneth Rohde Christiansen.
      
      * UIProcess/API/qt/qwebviewportinfo.cpp:
      (QWebViewportInfo::currentScale): Added division by devicePixelRatio. Also
      added emission of currenScaleUpdated signal when the viewport constraints
      have been updated.
      (QWebViewportInfo::didUpdateViewportConstraints):
      * UIProcess/API/qt/qwebviewportinfo_p.h: Changed return type of
      currentScale to QVariant as it depends on the viewport interaction engine
      now.
      * UIProcess/qt/QtViewportInteractionEngine.cpp:
      (WebKit::QtViewportInteractionEngine::ensureContentWithinViewportBoundary): Changed
      to use currentCSSScale for getting the current css scale.
      (WebKit::QtViewportInteractionEngine::currentCSSScale): Added.
      * UIProcess/qt/QtViewportInteractionEngine.h: Added method currentCSSScale.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@103054 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4c45afdb
    • morrita@google.com's avatar
      Unreviewed, rolling out r103044. · e3530ca7
      morrita@google.com authored
      http://trac.webkit.org/changeset/103044
      https://bugs.webkit.org/show_bug.cgi?id=72940
      
      Added test doesn't pass on Mac SL and Mac Chromium
      
      * editing/spelling/spellcheck-async-mutation-expected.txt: Removed.
      * editing/spelling/spellcheck-async-mutation.html: Removed.
      * platform/gtk/Skipped:
      * platform/mac-leopard/Skipped:
      * platform/qt/Skipped:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@103053 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e3530ca7
    • hans@chromium.org's avatar
      IndexedDB: Don't prefetch values from key cursors · 7529fb4f
      hans@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=74604
      
      Reviewed by Tony Chang.
      
      Since index key cursors don't have values, prefetching should not try
      to retrieve them. Doing so trips an ASSERT in debug builds.
      
      This will be tested Chromium-side.
      
      * storage/IDBCursorBackendImpl.cpp:
      (WebCore::IDBCursorBackendImpl::prefetchContinueInternal):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@103052 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7529fb4f
    • commit-queue@webkit.org's avatar
      [Forms] The "maxlength" attribute on "textarea" tag miscounts hard newlines · f9c6c849
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=74686
      
      Patch by Yosifumi Inoue <yosin@chromium.org> on 2011-12-16
      Reviewed by Kent Tamura.
      
      Source/WebCore:
      
      This patch counts LF in textarea value as two for LF to CRLF conversion on submission.
      
      No new tests. Existing tests cover all changes.
      
      * html/HTMLTextAreaElement.cpp:
      (WebCore::computeLengthForSubmission): Count LF as 2 for CR LF conversion on submission.
      (WebCore::HTMLTextAreaElement::handleBeforeTextInsertedEvent): Use computeLengthForSubmission instead of numGraphemeClusters.
      (WebCore::HTMLTextAreaElement::tooLong): Use computeLengthForSubmission instead of numGraphemeClusters.
      
      LayoutTests:
      
      * fast/forms/script-tests/textarea-maxlength.js: Doubles maxlength for counting LF as two chars.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@103051 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f9c6c849
    • morrita@google.com's avatar
      Unreviewed, rolling out r103045. · 271a765e
      morrita@google.com authored
      http://trac.webkit.org/changeset/103045
      https://bugs.webkit.org/show_bug.cgi?id=74590
      
      Breaks select-script-onchange.html on Chromium Windows
      
      Source/WebCore:
      
      * html/HTMLSelectElement.cpp:
      (WebCore::HTMLSelectElement::typeAheadFind):
      
      LayoutTests:
      
      * fast/events/onchange-select-popup-expected.txt:
      * fast/forms/select/menulist-type-ahead-find-expected.txt: Removed.
      * fast/forms/select/menulist-type-ahead-find.html: Removed.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@103050 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      271a765e
    • ossy@webkit.org's avatar
      [Qt] Unreviewed gardening. · 73d3eb5c
      ossy@webkit.org authored
      * platform/qt/Skipped: Skip a failing test (regression) to paint the bot green.
      * platform/qt/fast/css/bidi-override-in-anonymous-block-expected.png: Added.
      * platform/qt/fast/css/bidi-override-in-anonymous-block-expected.txt:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@103049 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      73d3eb5c
    • carlosgc@webkit.org's avatar
      [GTK] Update NEWS and configure.ac for 1.7.3 release · 86f76fc2
      carlosgc@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=74699
      
      Reviewed by Philippe Normand.
      
      .:
      
      * configure.ac: Bumped version number.
      
      Source/WebKit/gtk:
      
      * NEWS: Added release notes for 1.7.3.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@103048 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      86f76fc2
    • carlosgc@webkit.org's avatar
      Unreviewed. Fix make distcheck. · 6a428adf
      carlosgc@webkit.org authored
      * GNUmakefile.list.am: Add missing header file.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@103047 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6a428adf
    • haraken@chromium.org's avatar
      [Refactoring] Remove all global variables from prepare-ChangeLog · 5711f06c
      haraken@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=74681
      
      Reviewed by Ryosuke Niwa.
      
      We are planning to write unit-tests for prepare-ChangeLog in a run-leaks_unittest
      manner. This bug is one of the incremental refactorings to remove all top-level
      code and global variables from prepare-ChangeLog. In this patch,
      we make the following global variables be used only through parameter passing.
      This patch removes all global variables from prepare-ChangeLog.
          - $mergeBase
          - $gitCommit
          - $gitIndex
      
      * Scripts/prepare-ChangeLog:
      (generateFunctionLists):
      (changeLogNameFromArgs):
      (changeLogEmailAddressFromArgs):
      (generateNewChangeLogs):
      (printDiff):
      (diffFromToString):
      (diffCommand):
      (statusCommand):
      (createPatchCommand):
      (generateFileList):
      (isConflictStatus):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@103046 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5711f06c
    • commit-queue@webkit.org's avatar
      [Forms] Selection change by type-ahead doesn't fire 'change' event · 7c23bdcf
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=74590
      
      Patch by Yosifumi Inoue <yosin@chromium.org> on 2011-12-16
      Reviewed by Kent Tamura.
      
      Source/WebCore:
      
      Fire onchange even for type ahead selection.
      
      Test: fast/forms/select/menulist-type-ahead-find.html
      
      * html/HTMLSelectElement.cpp:
      (WebCore::HTMLSelectElement::typeAheadFind): Add DispatchChangeEvent when
      calling selectOption method.
      
      LayoutTests:
      
      * fast/events/onchange-select-popup.html: Add "PASS: change event fired." for type ahread test.
      * fast/forms/select/menulist-type-ahead-find-expected.txt: Added.
      * fast/forms/select/menulist-type-ahead-find.html: Added.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@103045 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7c23bdcf
    • commit-queue@webkit.org's avatar
      A test that mutation happens when asynchronous spell checking is in process. · b856576e
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=72940
      
      Patch by Shinya Kawanaka <shinyak@google.com> on 2011-12-16
      Reviewed by Hajime Morita.
      
      Added a test that mutation happens when spellchecking.
      This test confirms crash won't happen, and how markers are used.
      
      * editing/spelling/spellcheck-async-mutation-expected.txt: Added.
      * editing/spelling/spellcheck-async-mutation.html: Added.
      * platform/gtk/Skipped:
      * platform/mac-leopard/Skipped:
      * platform/qt/Skipped:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@103044 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b856576e