1. 28 Jan, 2011 40 commits
    • oliver@apple.com's avatar
      2011-01-27 Oliver Hunt <oliver@apple.com> · c975423a
      oliver@apple.com authored
              Reviewed by Geoffrey Garen.
      
              Convert markstack to a slot visitor API
              https://bugs.webkit.org/show_bug.cgi?id=53219
      
              Move the MarkStack over to a slot based marking API.
      
              In order to avoiding aliasing concerns there are two new types
              that need to be used when holding on to JSValues and JSCell that
              need to be marked: WriteBarrier and DeprecatedPtr.  WriteBarrier
              is expected to be used for any JSValue or Cell that's lifetime and
              marking is controlled by another GC object.  DeprecatedPtr is used
              for any value that we need to rework ownership for.
      
              The change over to this model has produced a large amount of
              code changes, but they are mostly mechanical (forwarding JSGlobalData,
              etc).
      
              * API/JSCallbackObject.h:
              (JSC::JSCallbackObjectData::setPrivateProperty):
              (JSC::JSCallbackObjectData::JSPrivatePropertyMap::getPrivateProperty):
              (JSC::JSCallbackObjectData::JSPrivatePropertyMap::setPrivateProperty):
              (JSC::JSCallbackObjectData::JSPrivatePropertyMap::markChildren):
              (JSC::JSCallbackObject::setPrivateProperty):
              * API/JSCallbackObjectFunctions.h:
              (JSC::::put):
              (JSC::::staticFunctionGetter):
              * API/JSObjectRef.cpp:
              (JSObjectMakeConstructor):
              (JSObjectSetPrivateProperty):
              * API/JSWeakObjectMapRefInternal.h:
              * JavaScriptCore.exp:
              * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
              * JavaScriptCore.xcodeproj/project.pbxproj:
              * bytecode/CodeBlock.cpp:
              (JSC::CodeBlock::markAggregate):
              * bytecode/CodeBlock.h:
              (JSC::CodeBlock::globalObject):
              * bytecompiler/BytecodeGenerator.cpp:
              (JSC::BytecodeGenerator::BytecodeGenerator):
              (JSC::BytecodeGenerator::emitJumpIfNotFunctionCall):
              (JSC::BytecodeGenerator::emitJumpIfNotFunctionApply):
              (JSC::BytecodeGenerator::findScopedProperty):
              * debugger/DebuggerActivation.cpp:
              (JSC::DebuggerActivation::DebuggerActivation):
              (JSC::DebuggerActivation::markChildren):
              * debugger/DebuggerActivation.h:
              * interpreter/Interpreter.cpp:
              (JSC::Interpreter::resolve):
              (JSC::Interpreter::resolveSkip):
              (JSC::Interpreter::resolveGlobalDynamic):
              (JSC::Interpreter::resolveBaseAndProperty):
              (JSC::Interpreter::unwindCallFrame):
              (JSC::appendSourceToError):
              (JSC::Interpreter::execute):
              (JSC::Interpreter::privateExecute):
              * interpreter/Register.h:
              (JSC::Register::jsValueSlot):
              * jit/JITStubs.cpp:
              (JSC::JITThunks::tryCacheGetByID):
              (JSC::DEFINE_STUB_FUNCTION):
              * jsc.cpp:
              (GlobalObject::GlobalObject):
              * runtime/Arguments.cpp:
              (JSC::Arguments::markChildren):
              (JSC::Arguments::getOwnPropertySlot):
              (JSC::Arguments::getOwnPropertyDescriptor):
              (JSC::Arguments::put):
              * runtime/Arguments.h:
              (JSC::Arguments::setActivation):
              (JSC::Arguments::Arguments):
              * runtime/ArrayConstructor.cpp:
              (JSC::ArrayConstructor::ArrayConstructor):
              (JSC::constructArrayWithSizeQuirk):
              * runtime/ArrayPrototype.cpp:
              (JSC::arrayProtoFuncSplice):
              * runtime/BatchedTransitionOptimizer.h:
              (JSC::BatchedTransitionOptimizer::BatchedTransitionOptimizer):
              (JSC::BatchedTransitionOptimizer::~BatchedTransitionOptimizer):
              * runtime/BooleanConstructor.cpp:
              (JSC::BooleanConstructor::BooleanConstructor):
              (JSC::constructBoolean):
              (JSC::constructBooleanFromImmediateBoolean):
              * runtime/BooleanPrototype.cpp:
              (JSC::BooleanPrototype::BooleanPrototype):
              * runtime/ConservativeSet.h:
              (JSC::ConservativeSet::mark):
              * runtime/DateConstructor.cpp:
              (JSC::DateConstructor::DateConstructor):
              * runtime/DateInstance.cpp:
              (JSC::DateInstance::DateInstance):
              * runtime/DatePrototype.cpp:
              (JSC::dateProtoFuncSetTime):
              (JSC::setNewValueFromTimeArgs):
              (JSC::setNewValueFromDateArgs):
              (JSC::dateProtoFuncSetYear):
              * runtime/ErrorConstructor.cpp:
              (JSC::ErrorConstructor::ErrorConstructor):
              * runtime/ErrorInstance.cpp:
              (JSC::ErrorInstance::ErrorInstance):
              * runtime/ErrorPrototype.cpp:
              (JSC::ErrorPrototype::ErrorPrototype):
              * runtime/FunctionConstructor.cpp:
              (JSC::FunctionConstructor::FunctionConstructor):
              * runtime/FunctionPrototype.cpp:
              (JSC::FunctionPrototype::FunctionPrototype):
              * runtime/GetterSetter.cpp:
              (JSC::GetterSetter::markChildren):
              * runtime/GetterSetter.h:
              (JSC::GetterSetter::GetterSetter):
              (JSC::GetterSetter::getter):
              (JSC::GetterSetter::setGetter):
              (JSC::GetterSetter::setter):
              (JSC::GetterSetter::setSetter):
              * runtime/GlobalEvalFunction.cpp:
              (JSC::GlobalEvalFunction::GlobalEvalFunction):
              (JSC::GlobalEvalFunction::markChildren):
              * runtime/GlobalEvalFunction.h:
              (JSC::GlobalEvalFunction::cachedGlobalObject):
              * runtime/Heap.cpp:
              (JSC::Heap::markProtectedObjects):
              (JSC::Heap::markTempSortVectors):
              (JSC::Heap::markRoots):
              * runtime/InternalFunction.cpp:
              (JSC::InternalFunction::InternalFunction):
              * runtime/JSAPIValueWrapper.h:
              (JSC::JSAPIValueWrapper::value):
              (JSC::JSAPIValueWrapper::JSAPIValueWrapper):
              * runtime/JSActivation.cpp:
              (JSC::JSActivation::put):
              * runtime/JSArray.cpp:
              (JSC::JSArray::JSArray):
              (JSC::JSArray::getOwnPropertySlot):
              (JSC::JSArray::getOwnPropertyDescriptor):
              (JSC::JSArray::put):
              (JSC::JSArray::putSlowCase):
              (JSC::JSArray::deleteProperty):
              (JSC::JSArray::increaseVectorLength):
              (JSC::JSArray::setLength):
              (JSC::JSArray::pop):
              (JSC::JSArray::push):
              (JSC::JSArray::unshiftCount):
              (JSC::JSArray::sort):
              (JSC::JSArray::fillArgList):
              (JSC::JSArray::copyToRegisters):
              (JSC::JSArray::compactForSorting):
              * runtime/JSArray.h:
              (JSC::JSArray::getIndex):
              (JSC::JSArray::setIndex):
              (JSC::JSArray::uncheckedSetIndex):
              (JSC::JSArray::markChildrenDirect):
              * runtime/JSByteArray.cpp:
              (JSC::JSByteArray::JSByteArray):
              * runtime/JSCell.h:
              (JSC::JSCell::MarkStack::append):
              (JSC::JSCell::MarkStack::appendCell):
              * runtime/JSFunction.cpp:
              (JSC::JSFunction::JSFunction):
              (JSC::JSFunction::getOwnPropertySlot):
              * runtime/JSGlobalObject.cpp:
              (JSC::markIfNeeded):
              (JSC::JSGlobalObject::reset):
              (JSC::JSGlobalObject::resetPrototype):
              (JSC::JSGlobalObject::markChildren):
              * runtime/JSGlobalObject.h:
              (JSC::JSGlobalObject::JSGlobalObjectData::JSGlobalObjectData):
              (JSC::JSGlobalObject::regExpConstructor):
              (JSC::JSGlobalObject::errorConstructor):
              (JSC::JSGlobalObject::evalErrorConstructor):
              (JSC::JSGlobalObject::rangeErrorConstructor):
              (JSC::JSGlobalObject::referenceErrorConstructor):
              (JSC::JSGlobalObject::syntaxErrorConstructor):
              (JSC::JSGlobalObject::typeErrorConstructor):
              (JSC::JSGlobalObject::URIErrorConstructor):
              (JSC::JSGlobalObject::evalFunction):
              (JSC::JSGlobalObject::objectPrototype):
              (JSC::JSGlobalObject::functionPrototype):
              (JSC::JSGlobalObject::arrayPrototype):
              (JSC::JSGlobalObject::booleanPrototype):
              (JSC::JSGlobalObject::stringPrototype):
              (JSC::JSGlobalObject::numberPrototype):
              (JSC::JSGlobalObject::datePrototype):
              (JSC::JSGlobalObject::regExpPrototype):
              (JSC::JSGlobalObject::methodCallDummy):
              (JSC::constructArray):
              * runtime/JSONObject.cpp:
              (JSC::Stringifier::Holder::object):
              (JSC::Stringifier::Holder::objectSlot):
              (JSC::Stringifier::markAggregate):
              (JSC::Stringifier::stringify):
              (JSC::Stringifier::Holder::appendNextProperty):
              (JSC::Walker::callReviver):
              (JSC::Walker::walk):
              * runtime/JSObject.cpp:
              (JSC::JSObject::defineGetter):
              (JSC::JSObject::defineSetter):
              (JSC::JSObject::removeDirect):
              (JSC::JSObject::putDirectFunction):
              (JSC::JSObject::putDirectFunctionWithoutTransition):
              (JSC::putDescriptor):
              (JSC::JSObject::defineOwnProperty):
              * runtime/JSObject.h:
              (JSC::JSObject::putDirectOffset):
              (JSC::JSObject::putUndefinedAtDirectOffset):
              (JSC::JSObject::flattenDictionaryObject):
              (JSC::JSObject::putDirectInternal):
              (JSC::JSObject::putDirect):
              (JSC::JSObject::putDirectFunction):
              (JSC::JSObject::putDirectWithoutTransition):
              (JSC::JSObject::putDirectFunctionWithoutTransition):
              (JSC::JSValue::putDirect):
              (JSC::JSObject::allocatePropertyStorageInline):
              (JSC::JSObject::markChildrenDirect):
              * runtime/JSStaticScopeObject.cpp:
              (JSC::JSStaticScopeObject::markChildren):
              * runtime/JSString.cpp:
              (JSC::StringObject::create):
              * runtime/JSValue.h:
              * runtime/JSWrapperObject.cpp:
              (JSC::JSWrapperObject::markChildren):
              * runtime/JSWrapperObject.h:
              (JSC::JSWrapperObject::internalValue):
              (JSC::JSWrapperObject::setInternalValue):
              * runtime/LiteralParser.cpp:
              (JSC::LiteralParser::parse):
              * runtime/Lookup.cpp:
              (JSC::setUpStaticFunctionSlot):
              * runtime/Lookup.h:
              (JSC::lookupPut):
              * runtime/MarkStack.h:
              * runtime/MathObject.cpp:
              (JSC::MathObject::MathObject):
              * runtime/NativeErrorConstructor.cpp:
              (JSC::NativeErrorConstructor::NativeErrorConstructor):
              * runtime/NativeErrorPrototype.cpp:
              (JSC::NativeErrorPrototype::NativeErrorPrototype):
              * runtime/NumberConstructor.cpp:
              (JSC::NumberConstructor::NumberConstructor):
              (JSC::constructWithNumberConstructor):
              * runtime/NumberObject.cpp:
              (JSC::constructNumber):
              * runtime/NumberPrototype.cpp:
              (JSC::NumberPrototype::NumberPrototype):
              * runtime/ObjectConstructor.cpp:
              (JSC::ObjectConstructor::ObjectConstructor):
              (JSC::objectConstructorGetOwnPropertyDescriptor):
              * runtime/Operations.h:
              (JSC::normalizePrototypeChain):
              (JSC::resolveBase):
              * runtime/PrototypeFunction.cpp:
              (JSC::PrototypeFunction::PrototypeFunction):
              * runtime/PutPropertySlot.h:
              (JSC::PutPropertySlot::setExistingProperty):
              (JSC::PutPropertySlot::setNewProperty):
              (JSC::PutPropertySlot::base):
              * runtime/RegExpConstructor.cpp:
              (JSC::RegExpConstructor::RegExpConstructor):
              * runtime/ScopeChain.cpp:
              (JSC::ScopeChainNode::print):
              * runtime/ScopeChain.h:
              (JSC::ScopeChainNode::~ScopeChainNode):
              (JSC::ScopeChainIterator::operator*):
              (JSC::ScopeChainIterator::operator->):
              (JSC::ScopeChain::top):
              * runtime/ScopeChainMark.h:
              (JSC::ScopeChain::markAggregate):
              * runtime/SmallStrings.cpp:
              (JSC::isMarked):
              (JSC::SmallStrings::markChildren):
              * runtime/SmallStrings.h:
              (JSC::SmallStrings::emptyString):
              (JSC::SmallStrings::singleCharacterString):
              (JSC::SmallStrings::singleCharacterStrings):
              * runtime/StringConstructor.cpp:
              (JSC::StringConstructor::StringConstructor):
              * runtime/StringObject.cpp:
              (JSC::StringObject::StringObject):
              * runtime/StringObject.h:
              * runtime/StringPrototype.cpp:
              (JSC::StringPrototype::StringPrototype):
              * runtime/Structure.cpp:
              (JSC::Structure::flattenDictionaryStructure):
              * runtime/Structure.h:
              (JSC::Structure::storedPrototypeSlot):
              * runtime/WeakGCMap.h:
              (JSC::WeakGCMap::uncheckedGet):
              (JSC::WeakGCMap::uncheckedGetSlot):
              (JSC::::get):
              (JSC::::take):
              (JSC::::set):
              (JSC::::uncheckedRemove):
              * runtime/WriteBarrier.h: Added.
              (JSC::DeprecatedPtr::DeprecatedPtr):
              (JSC::DeprecatedPtr::get):
              (JSC::DeprecatedPtr::operator*):
              (JSC::DeprecatedPtr::operator->):
              (JSC::DeprecatedPtr::slot):
              (JSC::DeprecatedPtr::operator UnspecifiedBoolType*):
              (JSC::DeprecatedPtr::operator!):
              (JSC::WriteBarrierBase::set):
              (JSC::WriteBarrierBase::get):
              (JSC::WriteBarrierBase::operator*):
              (JSC::WriteBarrierBase::operator->):
              (JSC::WriteBarrierBase::slot):
              (JSC::WriteBarrierBase::operator UnspecifiedBoolType*):
              (JSC::WriteBarrierBase::operator!):
              (JSC::WriteBarrier::WriteBarrier):
              (JSC::operator==):
      2011-01-27  Oliver Hunt  <oliver@apple.com>
      
              Reviewed by Geoffrey Garen.
      
              Convert markstack to a slot visitor API
              https://bugs.webkit.org/show_bug.cgi?id=53219
      
              There's no reason to recurse here, the value we
              were marking was protected.
      
              * JSValueWrapper.cpp:
              (JSValueWrapper::JSObjectMark):
      2011-01-27  Oliver Hunt  <oliver@apple.com>
      
              Reviewed by Geoffrey Garen.
      
              Convert markstack to a slot visitor API
              https://bugs.webkit.org/show_bug.cgi?id=53219
      
              Update WebCore to the new marking apis, correct bindings
              codegen.
      
              * ForwardingHeaders/runtime/WriteBarrier.h: Added.
              * WebCore.exp.in:
              * bindings/js/DOMWrapperWorld.h:
              (WebCore::DOMWrapperWorld::globalData):
              * bindings/js/JSAudioConstructor.cpp:
              (WebCore::JSAudioConstructor::JSAudioConstructor):
              * bindings/js/JSDOMBinding.cpp:
              (WebCore::markDOMNodesForDocument):
              (WebCore::markDOMObjectWrapper):
              (WebCore::markDOMNodeWrapper):
              * bindings/js/JSDOMGlobalObject.cpp:
              (WebCore::JSDOMGlobalObject::markChildren):
              (WebCore::JSDOMGlobalObject::setInjectedScript):
              (WebCore::JSDOMGlobalObject::injectedScript):
              * bindings/js/JSDOMGlobalObject.h:
              (WebCore::JSDOMGlobalObject::JSDOMGlobalObjectData::JSDOMGlobalObjectData):
              (WebCore::getDOMConstructor):
              * bindings/js/JSDOMWindowCustom.cpp:
              (WebCore::JSDOMWindow::setLocation):
              (WebCore::DialogHandler::dialogCreated):
              * bindings/js/JSDOMWindowShell.cpp:
              (WebCore::JSDOMWindowShell::JSDOMWindowShell):
              (WebCore::JSDOMWindowShell::setWindow):
              (WebCore::JSDOMWindowShell::markChildren):
              (WebCore::JSDOMWindowShell::unwrappedObject):
              * bindings/js/JSDOMWindowShell.h:
              (WebCore::JSDOMWindowShell::window):
              (WebCore::JSDOMWindowShell::setWindow):
              * bindings/js/JSEventListener.cpp:
              (WebCore::JSEventListener::JSEventListener):
              (WebCore::JSEventListener::markJSFunction):
              * bindings/js/JSEventListener.h:
              (WebCore::JSEventListener::jsFunction):
              * bindings/js/JSHTMLDocumentCustom.cpp:
              (WebCore::JSHTMLDocument::setAll):
              * bindings/js/JSImageConstructor.cpp:
              (WebCore::JSImageConstructor::JSImageConstructor):
              * bindings/js/JSImageDataCustom.cpp:
              (WebCore::toJS):
              * bindings/js/JSJavaScriptCallFrameCustom.cpp:
              (WebCore::JSJavaScriptCallFrame::scopeChain):
              (WebCore::JSJavaScriptCallFrame::scopeType):
              * bindings/js/JSNodeFilterCondition.cpp:
              (WebCore::JSNodeFilterCondition::markAggregate):
              (WebCore::JSNodeFilterCondition::acceptNode):
              * bindings/js/JSNodeFilterCondition.h:
              * bindings/js/JSNodeFilterCustom.cpp:
              * bindings/js/JSOptionConstructor.cpp:
              (WebCore::JSOptionConstructor::JSOptionConstructor):
              * bindings/js/JSSQLResultSetRowListCustom.cpp:
              (WebCore::JSSQLResultSetRowList::item):
              * bindings/js/ScriptCachedFrameData.cpp:
              (WebCore::ScriptCachedFrameData::restore):
              * bindings/js/ScriptObject.cpp:
              (WebCore::ScriptGlobalObject::set):
              * bindings/js/SerializedScriptValue.cpp:
              (WebCore::CloneDeserializer::putProperty):
              * bindings/scripts/CodeGeneratorJS.pm:
              * dom/Document.h:
      2011-01-27  Oliver Hunt  <oliver@apple.com>
      
              Reviewed by Geoffrey Garen.
      
              Convert markstack to a slot visitor API
              https://bugs.webkit.org/show_bug.cgi?id=53219
      
              Update to new marking api
      
              * WebView/WebScriptDebugDelegate.mm:
              (-[WebScriptCallFrame scopeChain]):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@77006 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c975423a
    • weinig@apple.com's avatar
      Keyboard scrolling doesn’t work in WebKit2 · 685ed248
      weinig@apple.com authored
      <rdar://problem/8909672>
      
      Reviewed by Anders Carlsson.
      
      * platform/mac/ScrollAnimatorMac.mm:
      (-[ScrollAnimationHelperDelegate convertSizeToBacking:]):
      (-[ScrollAnimationHelperDelegate convertSizeFromBacking:]):
      Add additional necessary delegate methods.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@77003 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      685ed248
    • andersca@apple.com's avatar
      Don't put config.h in the message headers. · ec5b4394
      andersca@apple.com authored
      Reviewed by Sam Weinig.
      
      * Scripts/webkit2/messages.py:
      * Scripts/webkit2/messages_unittest.py:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@77000 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ec5b4394
    • darin@apple.com's avatar
      Re-land this patch with the missing null check that caused crashes in layout tests. · e3229301
      darin@apple.com authored
      Reviewed by Dan Bernstein.
      
      Changing cursor style has no effect until the mouse moves
      https://bugs.webkit.org/show_bug.cgi?id=14344
      rdar://problem/7563712
      
      No tests added because we don't have infrastructure for testing actual cursor
      changes (as opposed to cursor style computation) at this time. We might add it later.
      
      * page/EventHandler.cpp:
      (WebCore::EventHandler::dispatchFakeMouseMoveEventSoon): Added.
      * page/EventHandler.h: Ditto.
      
      * rendering/RenderObject.cpp:
      (WebCore::areNonIdenticalCursorListsEqual): Added.
      (WebCore::areCursorsEqual): Added.
      (WebCore::RenderObject::styleDidChange): Call dispatchFakeMouseMoveEventSoon if
      cursor styles changed.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76999 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e3229301
    • andersca@apple.com's avatar
      Fix build. · 8c819ded
      andersca@apple.com authored
      * Shared/mac/ShareableSurface.cpp:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76996 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8c819ded
    • andersca@apple.com's avatar
      Try to unbreak the Windows build. · ee401897
      andersca@apple.com authored
      * UIProcess/cf/WebPageProxyCF.cpp:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76995 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ee401897
    • beidson@apple.com's avatar
      https://bugs.webkit.org/show_bug.cgi?id=53330 · 89873df1
      beidson@apple.com authored
      Need InjectedBundle API to get the response MIMEType for a URL
      
      Reviewed by John Sullivan.
      
      * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
      (WKBundleFrameCopyMIMETypeForResourceWithURL):
      * WebProcess/InjectedBundle/API/c/WKBundleFrame.h:
      
      Get the MIMEType from the in-memory cache, or cachedResponseMIMETypeForURL() if not available:
      * WebProcess/WebPage/WebFrame.cpp:
      (WebKit::WebFrame::mimeTypeForResourceWithURL):
      * WebProcess/WebPage/WebFrame.h:
      
      Get the MIMEType from the platform's disk cache if available:
      * WebProcess/WebPage/WebPage.h:
      * WebProcess/WebPage/mac/WebPageMac.mm:
      (WebKit::WebPage::cachedResponseMIMETypeForURL):
      * WebProcess/WebPage/qt/WebPageQt.cpp:
      (WebKit::WebPage::cachedResponseMIMETypeForURL):
      * WebProcess/WebPage/win/WebPageWin.cpp:
      (WebKit::WebPage::cachedResponseMIMETypeForURL):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76993 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      89873df1
    • andersca@apple.com's avatar
      Clean up the mess introduced when config.h was added to the project: · 9a31c4bb
      andersca@apple.com authored
      Reviewed by Sam Weinig.
      
      - Remove the contents of WebKit2Prefix.h that is now in config.h, to avoid including everything
        twice in each file, probably slowing down compile time.
      
      - Add config.h to all the files that were forgotten in order to keep the build from breaking.
      
      - Added trap to ensure that config.h is included at the top of every implementation file. If this
        had been added it would have caught the previous issue.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76991 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9a31c4bb
    • jschuh@chromium.org's avatar
      2011-01-28 Justin Schuh <jschuh@chromium.org> · 79d31dbb
      jschuh@chromium.org authored
              Reviewed by Eric Seidel.
      
              We should hold RefPtrs to SVG font faces
              https://bugs.webkit.org/show_bug.cgi?id=53270
      
              * svg/custom/use-multiple-on-nested-disallowed-font-expected.txt: Added.
              * svg/custom/use-multiple-on-nested-disallowed-font.html: Added.
      2011-01-28  Justin Schuh  <jschuh@chromium.org>
      
              Reviewed by Eric Seidel.
      
              We should hold RefPtrs to SVG font faces
              https://bugs.webkit.org/show_bug.cgi?id=53270
      
              Test: svg/custom/use-multiple-on-nested-disallowed-font.html
      
              * css/CSSFontFaceSource.cpp:
              (WebCore::CSSFontFaceSource::getFontData):
              * css/CSSFontFaceSource.h:
              * svg/SVGFontFaceElement.cpp:
              (WebCore::SVGFontFaceElement::associatedFontElement):
              * svg/SVGFontFaceElement.h:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76990 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      79d31dbb
    • slewis@apple.com's avatar
      <rdar://problem/8857651> Implement unregisterWorld for WebKit2 · 157f0282
      slewis@apple.com authored
      Rename unregisterWorld to clearWrappers.  Clearing the wrappers reduces the 
      memory use of isolated worlds.
      
      Reviewed by Geoff Garen.
      
      * WebProcess/InjectedBundle/API/c/WKBundleScriptWorld.cpp:
      (WKBundleScriptWorldClearWrappers):
      * WebProcess/InjectedBundle/API/c/WKBundleScriptWorld.h:
      * WebProcess/InjectedBundle/InjectedBundleScriptWorld.cpp:
      (WebKit::InjectedBundleScriptWorld::clearWrappers):
      * WebProcess/InjectedBundle/InjectedBundleScriptWorld.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76989 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      157f0282
    • zmo@google.com's avatar
      2011-01-28 Zhenyao Mo <zmo@google.com> · a7059008
      zmo@google.com authored
              Reviewed by Kenneth Russell.
      
              uniformN*v should generate INVALID_VALUE of the array size is not a multiple of N
              https://bugs.webkit.org/show_bug.cgi?id=53306
      
              * html/canvas/WebGLRenderingContext.cpp:
              (WebCore::WebGLRenderingContext::validateUniformMatrixParameters):
      2011-01-28  Zhenyao Mo  <zmo@google.com>
      
              Reviewed by Kenneth Russell.
      
              uniformN*v should generate INVALID_VALUE of the array size is not a multiple of N
              https://bugs.webkit.org/show_bug.cgi?id=53306
      
              * fast/canvas/webgl/gl-uniform-arrays-expected.txt:
              * fast/canvas/webgl/gl-uniform-arrays.html:
              * fast/canvas/webgl/gl-uniformmatrix4fv-expected.txt:
              * fast/canvas/webgl/gl-uniformmatrix4fv.html:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76988 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a7059008
    • commit-queue@webkit.org's avatar
      2011-01-28 Tom Sepez <tsepez@chromium.org> · 21a74964
      commit-queue@webkit.org authored
              Reviewed by Eric Seidel.
      
              NULL pointer crash in TextIterator::handleTextBox()
              https://bugs.webkit.org/show_bug.cgi?id=53267
      
              * fast/css/rtl-nth-child-first-letter-crash-expected.txt: Added.
              * fast/css/rtl-nth-child-first-letter-crash.html: Added.
      2011-01-28  Tom Sepez  <tsepez@chromium.org>
      
              Reviewed by Eric Seidel.
      
              NULL pointer crash in TextIterator::handleTextBox()
              https://bugs.webkit.org/show_bug.cgi?id=53267
      
              Test: fast/css/rtl-nth-child-first-letter-crash.html
      
              * editing/TextIterator.cpp:
              (WebCore::TextIterator::handleTextBox):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76987 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      21a74964
    • enne@google.com's avatar
      2011-01-28 Adrienne Walker <enne@google.com> · 141c0807
      enne@google.com authored
              Reviewed by Kenneth Russell.
      
              [chromium] Remove a spurious diagnostic CRASH check.
              https://bugs.webkit.org/show_bug.cgi?id=52379
      
              * platform/graphics/chromium/LayerTilerChromium.cpp:
              (WebCore::LayerTilerChromium::invalidateRect):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76984 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      141c0807
    • mitz@apple.com's avatar
      Source/WebCore: <rdar://problem/4761512> <select> can't display right-to-left (rtl) languages · 07c9c84c
      mitz@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=19785
      
      Reviewed by Sam Weinig.
      
      Changed <select> pop-up menus on Mac OS X Snow Leopard and later to have their items aligned in the
      direction corresponding to the writing direction of the <select> element, with the checkmarks
      on the "start" side, and use the <option>'s writing direction rather than "natural". Made the
      pop-up button match the menu by adding a Chrome boolean function, selectItemAlignmentFollowsMenuWritingDirection(),
      which returns true for this pop-up behavior.
      
      * loader/EmptyClients.h:
      (WebCore::EmptyChromeClient::selectItemAlignmentFollowsMenuWritingDirection): Added.
      * manual-tests/pop-up-alignment-and-direction.html: Added.
      * page/Chrome.cpp:
      (WebCore::Chrome::selectItemAlignmentFollowsMenuWritingDirection): Added. Calls through to the
      client.
      * page/Chrome.h:
      * page/ChromeClient.h:
      * platform/PopupMenuStyle.h:
      (WebCore::PopupMenuStyle::PopupMenuStyle): Added hasTextDirectionOverride parameter and member
      variable initialization.
      (WebCore::PopupMenuStyle::hasTextDirectionOverride): Added this accessor.
      * platform/mac/PopupMenuMac.mm:
      (WebCore::PopupMenuMac::populate): Set the pop-up's layout direction and items' text alignment
      to match the menu's writing direction. Set items' writing direction and direction override
      according to their styles.
      * rendering/RenderMenuList.cpp:
      (WebCore::RenderMenuList::RenderMenuList): Removed unncesaary initialization of a smart pointer.
      (WebCore::RenderMenuList::adjustInnerStyle): If the alignment of items in the menu follows the
      menu's writing direction, use that alignment for the button as well. Also in this mode, use the
      item's writing direction and override setting.
      (WebCore::RenderMenuList::setTextFromOption): Store the option element's style.
      (WebCore::RenderMenuList::itemStyle): Pass the text direction override value.
      (WebCore::RenderMenuList::menuStyle): Ditto. Also use the button's direction, not the inner text's.
      * rendering/RenderMenuList.h:
      * rendering/RenderTextControlSingleLine.cpp:
      (WebCore::RenderTextControlSingleLine::menuStyle): Pass the text direction override value.
      
      Source/WebKit/chromium: <select> can't display right-to-left (rtl) languages
      https://bugs.webkit.org/show_bug.cgi?id=19785
      
      Reviewed by Sam Weinig.
      
      * src/AutoFillPopupMenuClient.cpp:
      (WebKit::AutoFillPopupMenuClient::initialize): Pass hasTextDirectionOverride to the PopupMenuStyle
      constructor.
      * src/ChromeClientImpl.cpp:
      (WebKit::ChromeClientImpl::selectItemAlignmentFollowsMenuWritingDirection): Added.
      * src/ChromeClientImpl.h:
      * tests/PopupMenuTest.cpp:
      (WebKit::TestPopupMenuClient::itemStyle): Pass hasTextDirectionOverride to the PopupMenuStyle
      constructor.
      
      Source/WebKit/efl: <select> can't display right-to-left (rtl) languages
      https://bugs.webkit.org/show_bug.cgi?id=19785
      
      Reviewed by Sam Weinig.
      
      * WebCoreSupport/ChromeClientEfl.cpp:
      (WebCore::ChromeClientEfl::selectItemAlignmentFollowsMenuWritingDirection): Added.
      * WebCoreSupport/ChromeClientEfl.h:
      
      Source/WebKit/gtk: <select> can't display right-to-left (rtl) languages
      https://bugs.webkit.org/show_bug.cgi?id=19785
      
      Reviewed by Sam Weinig.
      
      * WebCoreSupport/ChromeClientGtk.cpp:
      (WebKit::ChromeClient::selectItemAlignmentFollowsMenuWritingDirection): Added.
      * WebCoreSupport/ChromeClientGtk.h:
      
      Source/WebKit/haiku: <select> can't display right-to-left (rtl) languages
      https://bugs.webkit.org/show_bug.cgi?id=19785
      
      Reviewed by Sam Weinig.
      
      * WebCoreSupport/ChromeClientHaiku.cpp:
      (WebCore::ChromeClientHaiku::selectItemAlignmentFollowsMenuWritingDirection): Added.
      * WebCoreSupport/ChromeClientHaiku.h:
      
      Source/WebKit/mac: <select> can't display right-to-left (rtl) languages
      https://bugs.webkit.org/show_bug.cgi?id=19785
      
      Reviewed by Sam Weinig.
      
      * WebCoreSupport/WebChromeClient.h:
      * WebCoreSupport/WebChromeClient.mm:
      (WebChromeClient::selectItemWritingDirectionIsNatural): Changed to return false.
      (WebChromeClient::selectItemAlignmentFollowsMenuWritingDirection): Added. Returns true.
      
      Source/WebKit/qt: <select> can't display right-to-left (rtl) languages
      https://bugs.webkit.org/show_bug.cgi?id=19785
      
      Reviewed by Sam Weinig.
      
      * WebCoreSupport/ChromeClientQt.cpp:
      (WebCore::ChromeClientQt::selectItemAlignmentFollowsMenuWritingDirection): Added.
      * WebCoreSupport/ChromeClientQt.h:
      
      Source/WebKit/win: <select> can't display right-to-left (rtl) languages
      https://bugs.webkit.org/show_bug.cgi?id=19785
      
      Reviewed by Sam Weinig.
      
      * WebCoreSupport/WebChromeClient.cpp:
      (WebChromeClient::selectItemAlignmentFollowsMenuWritingDirection): Added.
      * WebCoreSupport/WebChromeClient.h:
      
      Source/WebKit/wince: <select> can't display right-to-left (rtl) languages
      https://bugs.webkit.org/show_bug.cgi?id=19785
      
      Reviewed by Sam Weinig.
      
      * WebCoreSupport/ChromeClientWinCE.cpp:
      (WebKit::ChromeClientWinCE::selectItemAlignmentFollowsMenuWritingDirection): Added.
      * WebCoreSupport/ChromeClientWinCE.h:
      
      Source/WebKit/wx: <select> can't display right-to-left (rtl) languages
      https://bugs.webkit.org/show_bug.cgi?id=19785
      
      Reviewed by Sam Weinig.
      
      * WebKitSupport/ChromeClientWx.cpp:
      (WebCore::ChromeClientWx::selectItemAlignmentFollowsMenuWritingDirection): Added.
      * WebKitSupport/ChromeClientWx.h:
      
      Source/WebKit2: <select> can't display right-to-left (rtl) languages
      https://bugs.webkit.org/show_bug.cgi?id=19785
      
      Reviewed by Sam Weinig.
      
      * Shared/WebPopupItem.cpp:
      (WebKit::WebPopupItem::WebPopupItem): Added initializers for m_textDirection and m_hasTextDirectionOverride.
      (WebKit::WebPopupItem::encode): Encode the item's writing direction and direction override values.
      (WebKit::WebPopupItem::decode): Decode the item's writing direction and direction override values.
      * Shared/WebPopupItem.h:
      * UIProcess/WebPageProxy.cpp:
      (WebKit::WebPageProxy::showPopupMenu): Added a parameter for the menu's text direction.
      * UIProcess/WebPageProxy.h:
      * UIProcess/WebPageProxy.messages.in: Ditto.
      * UIProcess/WebPopupMenuProxy.h:
      * UIProcess/mac/WebPopupMenuProxyMac.h:
      * UIProcess/mac/WebPopupMenuProxyMac.mm:
      (WebKit::WebPopupMenuProxyMac::populate): Added a parameter for the menu's text direction.
      Set items' text alignment to match the menu's writing direction. Set items' writing direction
      and direction override according to their styles.
      (WebKit::WebPopupMenuProxyMac::showPopupMenu): Set the pop-up's layout direction.
      * WebProcess/WebCoreSupport/WebChromeClient.cpp:
      (WebKit::WebChromeClient::selectItemWritingDirectionIsNatural): Changed to return false.
      (WebKit::WebChromeClient::selectItemAlignmentFollowsMenuWritingDirection): Added.
      * WebProcess/WebCoreSupport/WebChromeClient.h:
      * WebProcess/WebCoreSupport/WebPopupMenu.cpp:
      (WebKit::WebPopupMenu::populateItems): Initialize items' writing direction and direction override
      values.
      (WebKit::WebPopupMenu::show): Pass the menu's writing direction.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76983 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      07c9c84c
    • abarth@webkit.org's avatar
      2011-01-28 Adam Barth <abarth@webkit.org> · a622eb58
      abarth@webkit.org authored
              Reviewed by Daniel Bates.
      
              Teach XSSFilter how to filter <script> elements
              https://bugs.webkit.org/show_bug.cgi?id=53279
      
              This patch adds the ability for the XSSFilter to block injected
              <script> elements.  Handling script elements is slightly subtle because
              these elements act very differently depending on whether they have a
              src attribute.
              
              In the "src case", which check whether the src attribute was present in
              the request.  In the "non-src case", we check whether the start tag and
              the body of the script element was included in the request.  Checking
              for the whole start tag means we miss out on some attribute splitting
              attacks inside of script tags, but that doesn't seem like that big a
              deal.
      
              This patch also introduces some amount of state into the XSSFilter
              because inline script elements span multiple tokens.  There's a lot of
              tuning and optimization left in these cases, some of which I've noted
              with FIXMEs.
      
              To test this patch, I played around with some of the existing
              XSSAuditor tests.  Hopefully I'll be able to run the test suite more
              systematically in the future.
      
              * html/parser/HTMLToken.h:
              (WebCore::HTMLToken::eraseCharacters):
              (WebCore::HTMLToken::eraseValueOfAttribute):
              * html/parser/XSSFilter.cpp:
              (WebCore::HTMLNames::hasName):
              (WebCore::HTMLNames::findAttributeWithName):
              (WebCore::HTMLNames::isNameOfScriptCarryingAttribute):
              (WebCore::XSSFilter::XSSFilter):
              (WebCore::XSSFilter::filterToken):
              (WebCore::XSSFilter::filterTokenAfterScriptStartTag):
              (WebCore::XSSFilter::filterScriptToken):
              (WebCore::XSSFilter::snippetForRange):
              (WebCore::XSSFilter::snippetForAttribute):
              * html/parser/XSSFilter.h:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76981 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a622eb58
    • abarth@webkit.org's avatar
      2011-01-28 Adam Barth <abarth@webkit.org> · 0771b8de
      abarth@webkit.org authored
              Reviewed by Daniel Bates.
      
              Sketch out new XSS filter design (disabled by default)
              https://bugs.webkit.org/show_bug.cgi?id=53205
      
              This patch adds a basic sketch of the new XSS filter design.  Rather
              than watching scripts as they execute, in this design, we watch tokens
              emitted by the tokenizer.  We then map the tokens directly back into
              input characters, which lets us skip all the complicated logic related
              to HTML entities and double-decoding of JavaScript URLs.
      
              This patch contains only the bare essentially machinery.  I'll add more
              in future patches and eventually remove the previous code once this
              code is up and running correctly.
      
              * Android.mk:
              * CMakeLists.txt:
              * GNUmakefile.am:
              * WebCore.gypi:
              * WebCore.pro:
              * WebCore.vcproj/WebCore.vcproj:
              * WebCore.xcodeproj/project.pbxproj:
              * html/parser/HTMLDocumentParser.cpp:
              (WebCore::HTMLDocumentParser::HTMLDocumentParser):
              (WebCore::HTMLDocumentParser::pumpTokenizer):
              (WebCore::HTMLDocumentParser::sourceForToken):
              * html/parser/HTMLDocumentParser.h:
              * html/parser/XSSFilter.cpp: Added.
              * html/parser/XSSFilter.h: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76980 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0771b8de
    • aroben@apple.com's avatar
      Chromium build fix after r76967 · ea607193
      aroben@apple.com authored
      * wtf/ThreadingPrimitives.h: Use OS(WINDOWS) instead of PLATFORM(WIN), to match other
      similar macros in this file.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76975 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ea607193
    • andersca@apple.com's avatar
      2011-01-28 Anders Carlsson <andersca@apple.com> · 74d1dfc3
      andersca@apple.com authored
              Reviewed by Adam Roben.
      
              Add ShareableSurface class
              https://bugs.webkit.org/show_bug.cgi?id=53313
      
              * Shared/mac/ShareableSurface.cpp: Added.
              (WebKit::ShareableSurface::Handle::Handle):
              Initialize the mach port.
      
              (WebKit::ShareableSurface::Handle::~Handle):
              Deallocate our send right if needed.
      
              (WebKit::ShareableSurface::Handle::encode):
              Encode the send right, and then null it out.
      
              (WebKit::ShareableSurface::Handle::decode):
              Decode the send right.
              
              (WebKit::createIOSurface):
              Create an IOSurface with the given size.
      
              (WebKit::ShareableSurface::create):
              Create an IOSurface, either from a size or from a handle.
      
              (WebKit::ShareableSurface::~ShareableSurface):
              Delete the texture and framebuffer.
      
              (WebKit::ShareableSurface::createHandle):
              Create a mach port from the surface.
      
              (WebKit::ShareableSurface::attach):
              Create an FBO if needed and bind it.
      
              (WebKit::ShareableSurface::detach):
              Unbind the FBO.
      
              (WebKit::ShareableSurface::textureID):
              Generate a new texture and bind it to the IOSurface.
      
              * Shared/mac/ShareableSurface.h: Added.
      
              * WebKit2.xcodeproj/project.pbxproj:
              Add new files.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76974 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      74d1dfc3
    • commit-queue@webkit.org's avatar
      2011-01-28 Adam Klein <adamk@chromium.org> · 45e32365
      commit-queue@webkit.org authored
              Reviewed by Kent Tamura.
      
              [Chromium] Remove deprecated openFileSystem method signature
              https://bugs.webkit.org/show_bug.cgi?id=53262
      
              Chromium still builds after this patch.
      
              * public/WebFrameClient.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76972 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      45e32365
    • msaboff@apple.com's avatar
      2011-01-28 Michael Saboff <msaboff@apple.com> · 53783a0b
      msaboff@apple.com authored
              Potentially Unsafe HashSet of RuntimeObject* in RootObject definition
              https://bugs.webkit.org/show_bug.cgi?id=53271
      
              Reapplying this this change.  No change from prior patch in
              JavaScriptCore.
      
              Added new isValid() methods to check if a contained object in
              a WeakGCMap is valid when using an unchecked iterator.
      
              * runtime/WeakGCMap.h:
              (JSC::WeakGCMap::isValid):
      2011-01-28  Michael Saboff  <msaboff@apple.com>
      
              Reviewed by Geoffrey Garen.
      
              Potentially Unsafe HashSet of RuntimeObject* in RootObject definition
              https://bugs.webkit.org/show_bug.cgi?id=53271
      
              Reapplying this patch with the change that the second ASSERT in 
              RootObject::removeRuntimeObject was changed to use
              .uncheckedGet() instead of the failing .get().  The object in question
              could be in the process of being GC'ed.  The get() call will not return
              such an object while the uncheckedGet() call will return the (unsafe) 
              object.  This is the behavior we want.
      
              Precautionary change.
              Changed RootObject to use WeakGCMap instead of HashSet.
              Found will looking for another issue, but can't produce a test case
              that is problematic.  THerefore there aren't any new tests.
      
              * bridge/runtime_root.cpp:
              (JSC::Bindings::RootObject::invalidate):
              (JSC::Bindings::RootObject::addRuntimeObject):
              (JSC::Bindings::RootObject::removeRuntimeObject):
              * bridge/runtime_root.h:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76969 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      53783a0b
    • aroben@apple.com's avatar
      Notify CACFLayerTreeHost when the context is flushed · 2565512f
      aroben@apple.com authored
      LegacyCACFLayerTreeHost was keeping this a secret, which meant that WebCore's animation
      timers were never starting.
      
      Fixes <http://webkit.org/b/53302> [Windows 7 Release Tests] changesets 76853, 76856, and
      76858 broke ~36 animations, compositing, and transitions tests
      
      Reviewed by Sam Weinig.
      
      Source/WebCore:
      
      * platform/graphics/ca/win/LegacyCACFLayerTreeHost.cpp:
      (WebCore::LegacyCACFLayerTreeHost::contextDidChange): Call up to the base class after we
      start our render timer.
      
      LayoutTests:
      
      Unskip compositing-related tests that are now fixed
      
      * platform/win/Skipped:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76968 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2565512f
    • aroben@apple.com's avatar
      Change BinarySemaphore to wrap an auto-reset Win32 event on Windows · 34cd1e02
      aroben@apple.com authored
      Fixes <http://webkit.org/b/53208> <rdar://problem/8922490>.
      
      Reviewed by Dave Hyatt.
      
      Source/WebKit2:
      
      * Platform/CoreIPC/BinarySemaphore.cpp: Wrap this implementation in #if !PLATFORM(WIN).
      
      * Platform/CoreIPC/BinarySemaphore.h: Make the Windows implementation have a single HANDLE
      member that holds the event.
      
      * Platform/CoreIPC/win/BinarySemaphoreWin.cpp: Copied from Source/WebKit2/Platform/CoreIPC/BinarySemaphore.cpp.
      (CoreIPC::BinarySemaphore::BinarySemaphore): Create our event.
      (CoreIPC::BinarySemaphore::~BinarySemaphore): Destory our event.
      (CoreIPC::BinarySemaphore::signal): Signal the event.
      (CoreIPC::BinarySemaphore::wait): Convert the absolute time to a wait interval, then wait
      for the event to be signaled or for the interval to elapse.
      
      * win/WebKit2.vcproj: Added BinarySemaphoreWin.cpp. Also let VS have its way with the file.
      
      Source/JavaScriptCore:
      
      Extract code to convert a WTF absolute time to a Win32 wait interval into a separate
      function
      
      * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Export the new function.
      
      * wtf/ThreadingPrimitives.h: Declare the new function.
      
      * wtf/ThreadingWin.cpp:
      (WTF::ThreadCondition::timedWait): Moved code to convert the absolute time to a wait
      interval from here...
      (WTF::absoluteTimeToWaitTimeoutInterval): ...to here.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76967 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      34cd1e02
    • antti@apple.com's avatar
      Remove dead code that tried to map from CSS values to parser values · 2df53333
      antti@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=53318
      
      Reviewed by Dan Bernstein.
      
      * css/CSSFunctionValue.cpp:
      * css/CSSFunctionValue.h:
      * css/CSSPrimitiveValue.cpp:
      * css/CSSPrimitiveValue.h:
      * css/CSSValue.h:
      * css/CSSValueList.cpp:
      * css/CSSValueList.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76966 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2df53333
    • cmarrin@apple.com's avatar
      2011-01-27 Chris Marrin <cmarrin@apple.com> · 335ef8b7
      cmarrin@apple.com authored
              Reviewed by Anders Carlsson.
      
              WebKit2: Page flashes just before accelerated compositing animation
              https://bugs.webkit.org/show_bug.cgi?id=53274
      
              When switching out of compositing mode, the new ChunkedUpdateDrawingAreaProxy
              is getting created with the current page size. When the setSize() call is
              subsequently made, the sizeDidChange() call is not made (which does the initial
              render of the page) because the old size and new size are the same. The solution
              is to skip the setting of the size in the ctor and let it go through a size
              change sequence.
      
              * UIProcess/DrawingAreaProxy.cpp:
              (WebKit::DrawingAreaProxy::DrawingAreaProxy):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76962 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      335ef8b7
    • enrica@apple.com's avatar
      Some drag and drop tests fail since r76824 · 022d3254
      enrica@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=53304
      
      Reviewed by Adam Roben.
      
      Source/WebCore: 
      
      There were '||' instead of '&&' in the checks for valid
      clipboard content.
              
      * platform/win/ClipboardWin.cpp:
      (WebCore::ClipboardWin::getData):
      (WebCore::ClipboardWin::types):
      (WebCore::ClipboardWin::files):
      
      LayoutTests: 
      
      Removing platform-specific tests after fixing the cause of the failure.
              
      * platform/win/editing/pasteboard/get-data-text-plain-paste-expected.txt: Removed.
      * platform/win/editing/pasteboard/onpaste-text-html-expected.txt: Removed.
      * platform/win/fast/events/drag-and-drop-dataTransfer-types-nocrash-expected.txt: Removed.
      * platform/win/fast/events/ondrop-text-html-expected.txt: Removed.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76961 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      022d3254
    • mrobinson@webkit.org's avatar
      2011-01-28 Martin Robinson <mrobinson@igalia.com> · e294cede
      mrobinson@webkit.org authored
              [GTK] AudioProcessingEvent.h and JSJavaScriptAudioNode.h: No such file or directory
              https://bugs.webkit.org/show_bug.cgi?id=52889
      
              Build fix for WebAudio. Include WebAudio source files on the source
              list when WebAudio is enabled.
      
              * GNUmakefile.am: Include missing source files.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76960 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e294cede
    • weinig@apple.com's avatar
      Add basic rubber banding support · cc0f1406
      weinig@apple.com authored
      <rdar://problem/8219429>
      https://bugs.webkit.org/show_bug.cgi?id=53277
      
      Reviewed by Maciej Stachowiak.
      
      Source/JavaScriptCore: 
      
      * wtf/Platform.h: Add ENABLE for rubber banding.
      
      Source/WebCore: 
      
      * page/EventHandler.cpp:
      (WebCore::EventHandler::handleGestureEvent):
      Pass gesture events to the FrameView.
      
      * platform/ScrollAnimator.cpp:
      (WebCore::ScrollAnimator::handleGestureEvent):
      * platform/ScrollAnimator.h:
      Add stubbed out implementation.
      
      * platform/ScrollView.cpp:
      (WebCore::ScrollView::ScrollView):
      (WebCore::ScrollView::overhangAmount):
      (WebCore::ScrollView::wheelEvent):
      * platform/ScrollView.h:
      * platform/ScrollableArea.cpp:
      (WebCore::ScrollableArea::ScrollableArea):
      (WebCore::ScrollableArea::handleGestureEvent):
      * platform/ScrollableArea.h:
      (WebCore::ScrollableArea::constrainsScrollingToContentEdge):
      (WebCore::ScrollableArea::setConstrainsScrollingToContentEdge):
      Move constrains scrolling bit to ScrollableArea from ScrollView.
      
      (WebCore::ScrollableArea::contentsSize):
      (WebCore::ScrollableArea::overhangAmount):
      Add additional virtual functions for information needed by the animator.
      
      * platform/mac/ScrollAnimatorMac.h:
      * platform/mac/ScrollAnimatorMac.mm:
      (WebCore::ScrollAnimatorMac::ScrollAnimatorMac):
      (WebCore::ScrollAnimatorMac::immediateScrollByDeltaX):
      (WebCore::ScrollAnimatorMac::immediateScrollByDeltaY):
      (WebCore::elasticDeltaForTimeDelta):
      (WebCore::elasticDeltaForReboundDelta):
      (WebCore::reboundDeltaForElasticDelta):
      (WebCore::scrollWheelMultiplier):
      (WebCore::ScrollAnimatorMac::handleWheelEvent):
      (WebCore::ScrollAnimatorMac::handleGestureEvent):
      (WebCore::ScrollAnimatorMac::pinnedInDirection):
      (WebCore::ScrollAnimatorMac::allowsVerticalStretching):
      (WebCore::ScrollAnimatorMac::allowsHorizontalStretching):
      (WebCore::ScrollAnimatorMac::smoothScrollWithEvent):
      (WebCore::ScrollAnimatorMac::beginScrollGesture):
      (WebCore::ScrollAnimatorMac::endScrollGesture):
      (WebCore::ScrollAnimatorMac::snapRubberBand):
      (WebCore::roundTowardZero):
      (WebCore::roundToDevicePixelTowardZero):
      (WebCore::ScrollAnimatorMac::snapRubberBandTimerFired):
      Implement basic rubber banding.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76956 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      cc0f1406
    • mitz@apple.com's avatar
      Changing unicode-bidi doesn’t force layout · 37773add
      mitz@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=53311
      
      Reviewed by Anders Carlsson.
      
      Source/WebCore: 
      
      Test: fast/dynamic/unicode-bidi.html
      
      * rendering/style/RenderStyle.cpp:
      (WebCore::RenderStyle::diff): Return a layout difference if unicode-bidi values differ.
      
      LayoutTests: 
      
      * fast/dynamic/unicode-bidi-expected.checksum: Added.
      * fast/dynamic/unicode-bidi-expected.png: Added.
      * fast/dynamic/unicode-bidi-expected.txt: Added.
      * fast/dynamic/unicode-bidi.html: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76954 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      37773add
    • dglazkov@chromium.org's avatar
      2011-01-27 Dimitri Glazkov <dglazkov@chromium.org> · 497e78d2
      dglazkov@chromium.org authored
              Reviewed by Kent Tamura.
      
              Change HTMLInputElement-derived parts of media element shadow DOM to use shadowPseudoId.
              https://bugs.webkit.org/show_bug.cgi?id=53122
      
              This is the first step in converting HTMLMediaElement to the new shadow DOM.
      
              Should not regress any existing tests. No observable change in behavior.
      
              * css/CSSSelector.cpp:
              (WebCore::CSSSelector::pseudoId): Removed now-unnecessary hard-coded pseudo-element selectors.
              (WebCore::nameToPseudoTypeMap): Ditto.
              (WebCore::CSSSelector::extractPseudoType): Ditto.
              * css/CSSSelector.h: Ditto.
              * css/mediaControls.css: Added proper initial values, now that elements use the proper selector pipeline.
              * rendering/MediaControlElements.cpp:
              (WebCore::MediaControlInputElement::MediaControlInputElement): Removed the switch statement,
                  which is now replaced with virtual shadowPseudoId on each corresponding class.
              (WebCore::MediaControlInputElement::styleForElement): Changed to use element pipeline.
              (WebCore::MediaControlMuteButtonElement::MediaControlMuteButtonElement): Changed to set
                  display type in constructor.
              (WebCore::MediaControlMuteButtonElement::create): Changed to not take PseudoId as
                  constructor argument.
              (WebCore::MediaControlMuteButtonElement::shadowPseudoId): Added.
              (WebCore::MediaControlVolumeSliderMuteButtonElement::MediaControlVolumeSliderMuteButtonElement): Added
                  to disambiguate from the MediaControlMuteButtonElement.
              (WebCore::MediaControlVolumeSliderMuteButtonElement::create): Added.
              (WebCore::MediaControlVolumeSliderMuteButtonElement::shadowPseudoId): Added.
              (WebCore::MediaControlPlayButtonElement::MediaControlPlayButtonElement): Changed to not take PseudoId as
                  constructor argument.
              (WebCore::MediaControlPlayButtonElement::shadowPseudoId): Added.
              (WebCore::MediaControlSeekButtonElement::MediaControlSeekButtonElement): Changed to not take PseudoId as
                  constructor argument.
              (WebCore::MediaControlSeekForwardButtonElement::MediaControlSeekForwardButtonElement): Added.
              (WebCore::MediaControlSeekForwardButtonElement::create): Added.
              (WebCore::MediaControlSeekForwardButtonElement::shadowPseudoId): Added.
              (WebCore::MediaControlSeekBackButtonElement::MediaControlSeekBackButtonElement): Added.
              (WebCore::MediaControlSeekBackButtonElement::create): Added.
              (WebCore::MediaControlSeekBackButtonElement::shadowPseudoId): Added.
              (WebCore::MediaControlRewindButtonElement::MediaControlRewindButtonElement): Added.
              (WebCore::MediaControlRewindButtonElement::shadowPseudoId): Added.
              (WebCore::MediaControlReturnToRealtimeButtonElement::MediaControlReturnToRealtimeButtonElement): Changed to not take PseudoId as
                  constructor argument.
              (WebCore::MediaControlReturnToRealtimeButtonElement::shadowPseudoId): Added.
              (WebCore::MediaControlToggleClosedCaptionsButtonElement::MediaControlToggleClosedCaptionsButtonElement): Changed to not take PseudoId as
                  constructor argument.
              (WebCore::MediaControlToggleClosedCaptionsButtonElement::shadowPseudoId): Added.
              (WebCore::MediaControlTimelineElement::MediaControlTimelineElement): Changed to not take PseudoId as
                  constructor argument.
              (WebCore::MediaControlTimelineElement::shadowPseudoId): Added.
              (WebCore::MediaControlVolumeSliderElement::MediaControlVolumeSliderElement): Changed to not take PseudoId as
                  constructor argument.
              (WebCore::MediaControlVolumeSliderElement::shadowPseudoId): Added.
              (WebCore::MediaControlFullscreenButtonElement::MediaControlFullscreenButtonElement): Changed to not take PseudoId as
                  constructor argument.
              (WebCore::MediaControlFullscreenButtonElement::shadowPseudoId): Added.
              * rendering/MediaControlElements.h:
              (WebCore::MediaControlSeekForwardButtonElement::isForwardButton): Added.
              (WebCore::MediaControlSeekBackButtonElement::isForwardButton): Added.
              * rendering/RenderMedia.cpp:
              (WebCore::RenderMedia::createMuteButton): Changed to use new constructor.
              (WebCore::RenderMedia::createSeekBackButton): Ditto.
              (WebCore::RenderMedia::createSeekForwardButton): Ditto.
              (WebCore::RenderMedia::createVolumeSliderMuteButton): Ditto.
              * rendering/style/RenderStyleConstants.h: Removed constants that are no longer used.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76951 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      497e78d2
    • dglazkov@chromium.org's avatar
      2011-01-27 Dimitri Glazkov <dglazkov@chromium.org> · 580afb43
      dglazkov@chromium.org authored
              Reviewed by Eric Carlson.
      
              Split MediaControls out of RenderMedia.
              https://bugs.webkit.org/show_bug.cgi?id=53252
      
              Near-mechanical moving of stuff, no change in behavior, thus no new tests.
      
              * Android.mk: Added MediaControls to build system.
              * CMakeLists.txt: Ditto.
              * GNUmakefile.am: Ditto.
              * WebCore.gypi: Ditto.
              * WebCore.pro: Ditto.
              * WebCore.vcproj/WebCore.vcproj: Ditto.
              * WebCore.xcodeproj/project.pbxproj: Ditto.
              * html/HTMLMediaElement.cpp:
              (WebCore::HTMLMediaElement::defaultEventHandler): Changed to forward events to MediaControls.
              * html/shadow/MediaControls.cpp: Copied all controls-related methods from
                  Source/WebCore/rendering/RenderMedia.cpp, pulled them into their own class called MediaControls.
              * html/shadow/MediaControls.h: Ditto from Source/WebCore/rendering/RenderMedia.h.
              * rendering/MediaControlElements.cpp:
              (WebCore::MediaControlTimelineElement::defaultEventHandler): Changed to use MediaControls.
              * rendering/RenderMedia.cpp:
              (WebCore::RenderMedia::RenderMedia): Moved relevant constructor initializers out to MediaControls.
              (WebCore::RenderMedia::destroy): Changed to use MediaControls.
              (WebCore::RenderMedia::styleDidChange): Ditto.
              (WebCore::RenderMedia::layout): Ditto.
              (WebCore::RenderMedia::updateFromElement): Ditto.
              * rendering/RenderMedia.h: Updated defs accordingly and removed player() accessor, which
                  is only used by sub-class RenderVideo.
              (WebCore::RenderMedia::controls): Added.
              * rendering/RenderVideo.cpp:
              (WebCore::RenderVideo::~RenderVideo): Changed to access MediaPlayer* directly from mediaElement().
              (WebCore::RenderVideo::calculateIntrinsicSize): Ditto.
              (WebCore::RenderVideo::paintReplaced): Ditto.
              (WebCore::RenderVideo::updatePlayer): Ditto.
              (WebCore::RenderVideo::supportsAcceleratedRendering): Ditto.
              (WebCore::RenderVideo::acceleratedRenderingStateChanged): Ditto.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76950 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      580afb43
    • pfeldman@chromium.org's avatar
      2011-01-28 Pavel Feldman <pfeldman@chromium.org> · e6609c31
      pfeldman@chromium.org authored
              Reviewed by Yury Semikhatsky.
      
              Web Inspector: allow remote debugging with front-end
              served from the cloud.
              https://bugs.webkit.org/show_bug.cgi?id=53303
      
              * inspector/front-end/inspector.js:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76947 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e6609c31
    • commit-queue@webkit.org's avatar
      2011-01-28 Aparna Nandyal <aparna.nand@wipro.com> · 3138aa97
      commit-queue@webkit.org authored
              Reviewed by Andreas Kling.
      
              Setting value of m_PressedPos to make scrolling smooth
      
              Page scroll popup menu "Scroll here" option not working when cliking above scroll slider/handler.
              https://bugs.webkit.org/show_bug.cgi?id=51349
      
              The value of m_PressedPos was getting set before moveThumb() call
              in all other scenarios except when "Scroll Here" option is used.
              Hence scrolling with this option was not as expected even in cases
              where scrolling was happening. The thumb would move in unexpected
              direction. m_PressedPos is now set to pressed position so delta is
              calculated.
              Unable to write a test case as the test needs to click on "Scroll
              Here" option of context sensitive menu and QTest is unable to do it.
              Besides no new functionality introduced.
      
              * platform/qt/ScrollbarQt.cpp:
              (WebCore::Scrollbar::contextMenu):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76946 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3138aa97
    • caseq@chromium.org's avatar
      2011-01-28 Andrey Kosyakov <caseq@chromium.org> · eb1566ee
      caseq@chromium.org authored
              Reviewed by Pavel Feldman.
      
              Web Inspector: [Extensions API] add JSON schema for extensions API
              https://bugs.webkit.org/show_bug.cgi?id=53236
      
              * inspector/front-end/ExtensionAPISchema.json: Added.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76945 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      eb1566ee
    • zmo@google.com's avatar
      2011-01-27 Zhenyao Mo <zmo@google.com> · 10b88eff
      zmo@google.com authored
              Reviewed by Kenneth Russell.
      
              Remove _LENGTH enumerants
              https://bugs.webkit.org/show_bug.cgi?id=53259
      
              * html/canvas/WebGLRenderingContext.cpp: Remove queries for *LENGTH.
              (WebCore::WebGLRenderingContext::getProgramParameter):
              (WebCore::WebGLRenderingContext::getShaderParameter):
              * html/canvas/WebGLRenderingContext.idl: Remove *LENGTH.
      2011-01-27  Zhenyao Mo  <zmo@google.com>
      
              Reviewed by Kenneth Russell.
      
              Remove _LENGTH enumerants
              https://bugs.webkit.org/show_bug.cgi?id=53259
      
              * fast/canvas/webgl/constants.html:
              * fast/canvas/webgl/gl-getshadersource-expected.txt:
              * fast/canvas/webgl/gl-getshadersource.html:
              * fast/canvas/webgl/gl-object-get-calls-expected.txt:
              * fast/canvas/webgl/gl-object-get-calls.html:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76944 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      10b88eff
    • apavlov@chromium.org's avatar
      2011-01-28 Alexander Pavlov <apavlov@chromium.org> · c79f6517
      apavlov@chromium.org authored
              Reviewed by Yury Semikhatsky.
      
              Web Inspector: syntax highlight inline JS and CSS in HTML resources
              https://bugs.webkit.org/show_bug.cgi?id=30831
      
              * inspector/front-end/SourceHTMLTokenizer.js:
              (WebInspector.SourceHTMLTokenizer):
              (WebInspector.SourceHTMLTokenizer.prototype.set line):
              (WebInspector.SourceHTMLTokenizer.prototype.nextToken):
              * inspector/front-end/SourceHTMLTokenizer.re2js:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76943 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c79f6517
    • apavlov@chromium.org's avatar
      2011-01-28 Alexander Pavlov <apavlov@chromium.org> · 92aa07dd
      apavlov@chromium.org authored
              Reviewed by Yury Semikhatsky.
      
              Web Inspector: [STYLES] Up/Down-suggestion breaks an existing keyword
              https://bugs.webkit.org/show_bug.cgi?id=53295
      
              Select the current word suffix before switching to the next suggestion.
      
              * inspector/front-end/StylesSidebarPane.js:
              ():
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76941 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      92aa07dd
    • alex@webkit.org's avatar
      2011-01-28 Alejandro G. Castro <alex@igalia.com> · 5b48ab52
      alex@webkit.org authored
              Reviewed by Xan Lopez.
      
              [GTK] Fix compilation warning
              https://bugs.webkit.org/show_bug.cgi?id=53292
      
              * webkit/webkitwebframe.cpp:
              (draw_page_callback): Cast the pageCount from size_t to int, it
              should be safe considering page_nr is the number of pages,
              0-based.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76940 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5b48ab52
    • alex@webkit.org's avatar
      2011-01-28 Alejandro G. Castro <alex@igalia.com> · db8d12e3
      alex@webkit.org authored
              Reviewed by Xan Lopez.
      
              [GTK] Fix dist compilation for the release
              https://bugs.webkit.org/show_bug.cgi?id=53290
      
              * GNUmakefile.am: Added inspector files to the extra dist.
      
      2011-01-28  Alejandro G. Castro  <alex@igalia.com>
      
              Reviewed by Xan Lopez.
      
              [GTK] Fix dist compilation for the release
              https://bugs.webkit.org/show_bug.cgi?id=53290
      
              * GNUmakefile.am: Remove a file that is not in the repository
              anymore.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76936 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      db8d12e3
    • andreas.kling@nokia.com's avatar
      2011-01-28 Andreas Kling <kling@webkit.org> · 392be730
      andreas.kling@nokia.com authored
              Rubber-stamped by Simon Hausmann.
      
              [Qt][WK2] Combine QWKPage::engine{Connected,Disconnected} into one signal.
      
              Having two signals for this is redundant, combine them into
              QWKPage::engineConnectionChanged(bool connected).
      
              * UIProcess/API/qt/qwkpage.cpp:
              (QWKPagePrivate::didRelaunchProcess):
              (QWKPagePrivate::processDidCrash):
              * UIProcess/API/qt/qwkpage.h:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76931 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      392be730
    • commit-queue@webkit.org's avatar
      2011-01-28 Ilya Sherman <isherman@chromium.org> · 28926bc1
      commit-queue@webkit.org authored
              Reviewed by Andreas Kling.
      
              Const-correct HTMLSelectElement and WebSelectElement
              https://bugs.webkit.org/show_bug.cgi?id=53293
      
              * html/HTMLSelectElement.cpp:
              (WebCore::HTMLSelectElement::value): const.
              * html/HTMLSelectElement.h:
      2011-01-28  Ilya Sherman  <isherman@chromium.org>
      
              Reviewed by Andreas Kling.
      
              Const-correct HTMLSelectElement and WebSelectElement
              https://bugs.webkit.org/show_bug.cgi?id=53293
      
              * public/WebSelectElement.h:
              * src/WebSelectElement.cpp:
              (WebKit::WebSelectElement::value): const.
              (WebKit::WebSelectElement::listItems): const.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76929 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      28926bc1