2009-04-21 Chris Fleizach Reviewed by Alexey Proskuryakov. aria-liveregion-notifications.html fails on leopard release bot https://bugs.webkit.org/show_bug.cgi?id=37112 Change the method that DRT uses to monitor AX notifications so that its robust by just sending out NSNotification that can be listened to by anyone, instead of keeping a static function pointer around. This change is aimed to avoid flakiness seen in DRT when the notification handlers are not being called at the appropriate time. Tests: platform/mac/accessibility/aria-liveregions-addedelement.html platform/mac/accessibility/aria-liveregions-changedalt.html platform/mac/accessibility/aria-liveregions-changedtext.html platform/mac/accessibility/aria-liveregions-removedelement.html * accessibility/mac/AccessibilityObjectWrapper.h: * accessibility/mac/AccessibilityObjectWrapper.mm: (-[AccessibilityObjectWrapper accessibilitySetShouldRepostNotifications:]): (-[AccessibilityObjectWrapper accessibilityPostedNotification:]): 2010-04-21 Gavin Barraclough Reviewed by NOBODY (Leopard build fix). Remove old exports. * WebCore.base.exp: 2010-04-21 Gavin Barraclough Reviewed by Darin Adler. Bug 37949 - Do no copy strings into a shared buffer when converting UStrings to Strings UString and String now have the same internal representation; Just re-wrap the internal impl. * bindings/js/JSDOMBinding.cpp: (WebCore::jsStringSlowCase): * bindings/js/JSDOMBinding.h: (WebCore::ustringToString): (WebCore::stringToUString): (WebCore::identifierToString): (WebCore::ustringToAtomicString): (WebCore::identifierToAtomicString): 2010-04-21 Mark Rowe Reviewed by Eric Carlson. Many crashes in Safari inside Flip4Mac below -[NSAlert didEndAlert:returnCode:contextInfo:] A manual test case is required here as the Flip4Mac plug-in displays an alert, and some manual tweaking of the plug-in's preference file on disk is often required to reproduce the bug. * manual-tests/plugins/flip4mac-update-alert-over-navigation.html: Added. 2010-04-21 Mark Rowe Reviewed by Maciej Stachowiak. REGRESSION: NPP_Destroy is not called when page navigates when plug-in is displaying modal dialog This is a manual test case as I was not able to construct an automated test that reproduced the same issue without displaying a modal dialog on-screen. * manual-tests/plugins/timeout-dialog-displayed-over-navigation.html: Added. * manual-tests/plugins/timeout-dialog-displayed-over-navigation.swf: Added. 2010-04-21 Sam Weinig Reviewed by Geoffrey Garen. Fix for https://bugs.webkit.org/show_bug.cgi?id=37937 Wean JavaScriptCore off calls to isMainThread() No change in behavior. * bindings/js/JSDOMWindowBase.cpp: (WebCore::JSDOMWindowBase::commonJSGlobalData): Explicitly set a large stack type for the common JSGlobalData and set the currently running thread as the exclusive thread for its execution. * bindings/js/WorkerScriptController.cpp: (WebCore::WorkerScriptController::WorkerScriptController): Explicitly set a small stack type for the workers JSGlobalData. 2010-04-21 Gavin Barraclough Reviewed by NOBODY (Qt build fix). * WebCore.gypi: * WebCore.pro: * platform/text/qt/StringQt.cpp: Removed. 2010-04-20 Gavin Barraclough Reviewed by Oliver Hunt, Darin Adler. Bug 37906 - Remove JSC::UStringImpl; unify with StringImpl. Add include for StringHash.h. * WebCore.xcodeproj/project.pbxproj: * bridge/c/c_class.cpp: 2010-04-21 Alexey Proskuryakov Tiger build fix. * platform/network/mac/ResourceHandleMac.mm: (WebCore::createNSURLConnection): Fixed a typo, named an argument. (WebCore::ResourceHandle::start): Moved shouldUseCredentialStorage out of #if, since it's now passed to createNSURLConneciton() on all platforms (and then ignored on Tiger). 2010-04-21 Alexey Proskuryakov Reviewed by Adam Roben. Windows build fix. * platform/network/cf/ResourceHandleCFNet.cpp: Declare CFURLConnectionCreateWithProperties for now, as it's mistakenly missing from WebKitSupportLibrary headers. 2010-04-21 Dimitri Glazkov Reviewed by Darin Adler. REGRESSION(r57292): Safari/Win and Chromium/Win no longer pass the acid3 test. https://bugs.webkit.org/show_bug.cgi?id=37902 The issue is due to MSVC creating enums as signed. The fix is to store the value as unsigned. Test: http://acid3.acidtests.org/ * rendering/style/RenderStyle.h: (WebCore::InheritedFlags): Changed type of _insideLink to unsigned. 2010-04-21 Alexey Proskuryakov Reviewed by Brady Eidson. https://bugs.webkit.org/show_bug.cgi?id=37933 XMLHttpRequest.withCredentials should be better enforced. Test: http/tests/xmlhttprequest/cross-origin-authorization-with-embedder.html This improves integration between ResourceHandle and Apple networking libraries. * platform/network/cf/ResourceHandleCFNet.cpp: (WebCore::createConnectionProperties): A new helper for creating connection properties dictionary. (WebCore::ResourceHandle::start): Pass connection properties. (WebCore::WebCoreSynchronousLoader::load): Ditto. * platform/network/mac/ResourceHandleMac.mm: (WebCore::createNSURLConnection): Factor out OS version dependent code for creating NSURLConnection. Tell NSURLConnection about credential policy upfront. (WebCore::ResourceHandle::start): Use the new function. (+[WebCoreSynchronousLoader loadRequest:allowStoredCredentials:returningResponse:error:]): Ditto. 2010-04-21 Xiaomei Ji Reviewed by Dimitri Glazkov This patch fixes [chromium] RTL elements with WebKit2. * rendering/RenderThemeMac.mm: (WebCore::RenderThemeMac::paintMenuList): Set the current NSGraphicsContext before calling out to AppKit, otherwise the current graphics context could point to a CGContext whose memory has been freed. 2010-04-08 Dimitri Glazkov Reviewed by Darin Adler. Manipulating document fragment members while adding it to tree may result in loss of tree integrity. https://bugs.webkit.org/show_bug.cgi?id=36031 Changes the logic of appending/inserting document fragment to first stashing all of its children to a vector, then processing the vector. This avoids ghastliness that would be caused by mutation events mucking with the document fragment while it's being appended/inserted. Test: fast/dom/Node/fragment-mutation.html * dom/ContainerNode.cpp: (WebCore::targetNodes): Added method to populate a vector of nodes (targets) to be used in inserting/appending operation. (WebCore::ContainerNode::insertBefore): Changed to use vector-based iteration. (WebCore::ContainerNode::appendChild): Ditto. * dom/Node.cpp: (WebCore::Node::checkReplaceChild): Cleaned up comments. (WebCore::Node::checkAddChild): Ditto. 2010-04-19 Eric Carlson Reviewed by Simon Fraser. Fix regression introduced in r57820. * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::loadNextSourceChild): Create a new MediaPlayer instead of just setting a URL on the one used for the previous element. This restores the behavior prior to the changes for https://bugs.webkit.org/show_bug.cgi?id=37728. 2010-04-19 Gavin Barraclough Reviewed by Sam Weinig. https://bugs.webkit.org/show_bug.cgi?id=37745 Move string uniquing tables to (new) WTFThreadData class. Remove AtomicString's dependency on ThreadGlobalData so that we can move WebCore's string classes up to WTF. * ForwardingHeaders/wtf/WTFThreadData.h: Added. * platform/ThreadGlobalData.cpp: Remove m_atomicStringTable, all wtfThreadData() to ensure threadsafely initialized. (WebCore::ThreadGlobalData::ThreadGlobalData): (WebCore::ThreadGlobalData::~ThreadGlobalData): * platform/ThreadGlobalData.h: Remove m_atomicStringTable. (WebCore::ThreadGlobalData::eventNames): * platform/text/AtomicString.cpp: (WebCore::AtomicStringTable::create): (WebCore::AtomicStringTable::table): (WebCore::AtomicStringTable::destroy): (WebCore::stringTable): Access the AtomicStringTable on wtfThreadData() rather then threadGlobalData(). 2010-04-19 Ada Chan Build fix: wrap Settings::setLocalStorageQuota() and Settings::setSessionStorageQuota() in #if ENABLE(DOM_STORAGE). * page/Settings.cpp: (WebCore::Settings::Settings): * page/Settings.h: 2010-04-19 Dave Moore Reviewed by Dimitri Glazkov. Added notification when the favicons for a page are changed from a script. The Document object will notify the frame loader, which will notify the client. Implementations of FrameLoaderClient will have to add one method; dispatchDidChangeIcons(). https://bugs.webkit.org/show_bug.cgi?id=33812 Test: fast/dom/icon-url-property.html * dom/Document.cpp: (WebCore::Document::setIconURL): * loader/DocumentLoader.cpp: (WebCore::DocumentLoader::setIconURL): * loader/DocumentLoader.h: (WebCore::DocumentLoader::iconURL): * loader/EmptyClients.h: (WebCore::EmptyFrameLoaderClient::dispatchDidChangeIcons): * loader/FrameLoader.cpp: (WebCore::FrameLoader::setIconURL): (WebCore::FrameLoader::didChangeIcons): * loader/FrameLoader.h: * loader/FrameLoaderClient.h: 2010-04-19 Ada Chan Reviewed by Jeremy Orlow. https://bugs.webkit.org/show_bug.cgi?id=37717 Allow clients concerned with memory consumption to set a quota on session storage since the memory used won't be released until the Page is destroyed. The default is noQuota, which matches the current behavior. * WebCore.base.exp: Export Settings::setSessionStorageQuota(). * page/Page.cpp: (WebCore::Page::sessionStorage): * page/Settings.cpp: (WebCore::Settings::Settings): (WebCore::Settings::setSessionStorageQuota): * page/Settings.h: (WebCore::Settings::sessionStorageQuota): * storage/StorageNamespace.cpp: (WebCore::StorageNamespace::sessionStorageNamespace): * storage/StorageNamespace.h: * storage/StorageNamespaceImpl.cpp: (WebCore::StorageNamespaceImpl::sessionStorageNamespace): * storage/StorageNamespaceImpl.h: 2010-04-19 Eric Carlson Reviewed by Simon Fraser. Setting media element 'src' attribute should trigger immediate load https://bugs.webkit.org/show_bug.cgi?id=37728 * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::attributeChanged): Schedule load every time 'src' attribute changes unless it is missing. (WebCore::HTMLMediaElement::prepareForLoad): Include steps 3 to 6 from loadInternal. (WebCore::HTMLMediaElement::loadInternal): Steps 3 to 6 are now in prepareForLoad. (WebCore::HTMLMediaElement::loadResource): MediaPlayer is now allocated in prepareForLoad so the previously loading file, if any, is cancelled there. 2010-04-19 Jocelyn Turcotte Reviewed by Simon Hausmann. [Qt] Fix compilation against namespaced Qt. * platform/graphics/GraphicsLayer.h: * platform/graphics/Tile.h: * platform/graphics/qt/MediaPlayerPrivateQt.h: * platform/network/qt/NetworkStateNotifierPrivate.h: 2010-04-19 Balazs Kelemen Reviewed by Kenneth Rohde Christiansen. [Qt] Destroy SharedTimerQt before destruction of QCoreApplication. To avoid unsafe situations caused by running WebCore code (through firing timers) when destruction of QCoreApplication has been started, we should explicitly destroy the SharedTimerQt instance on application exit. We can achieve that through installing a self-destroying slot for the QCoreApplication::aboutToQuit() signal into the SharedTimerQt instance. https://bugs.webkit.org/show_bug.cgi?id=36832 No functional change so no new tests. * platform/qt/SharedTimerQt.cpp: (WebCore::SharedTimerQt::SharedTimerQt): (WebCore::SharedTimerQt::destroy): (WebCore::SharedTimerQt::inst): 2010-04-19 Dan Bernstein Reviewed by Darin Adler. Make the fix for from r57759 more robust. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::updateHoverActiveState): Use RefPtrs for the Nodes. 2010-04-19 Yury Semikhatsky Unreviewed. Chromium build fix. * bindings/v8/JavaScriptCallFrame.h: 2010-04-19 Yury Semikhatsky Reviewed by Pavel Feldman. Web Inspector: implement JavaScriptCallFrame that works for v8. Implementing this binding for v8 allows to make evaluations on call frames and protects access to the debugger context from inspected context. https://bugs.webkit.org/show_bug.cgi?id=37755 * WebCore.gyp/WebCore.gyp: * WebCore.gypi: * bindings/js/JSJavaScriptCallFrameCustom.cpp: (WebCore::JSJavaScriptCallFrame::scopeType): * bindings/v8/JavaScriptCallFrame.cpp: Added. (WebCore::JavaScriptCallFrame::JavaScriptCallFrame): (WebCore::JavaScriptCallFrame::~JavaScriptCallFrame): (WebCore::JavaScriptCallFrame::caller): (WebCore::JavaScriptCallFrame::sourceID): (WebCore::JavaScriptCallFrame::line): (WebCore::JavaScriptCallFrame::functionName): (WebCore::JavaScriptCallFrame::scopeChain): (WebCore::JavaScriptCallFrame::scopeType): (WebCore::JavaScriptCallFrame::thisObject): (WebCore::JavaScriptCallFrame::evaluate): * bindings/v8/JavaScriptCallFrame.h: Added. (WebCore::JavaScriptCallFrame::create): * bindings/v8/ScriptDebugServer.cpp: (WebCore::ScriptDebugServer::currentCallFrame): * bindings/v8/ScriptDebugServer.h: * bindings/v8/custom/V8InjectedScriptHostCustom.cpp: (WebCore::V8InjectedScriptHost::currentCallFrameCallback): * bindings/v8/custom/V8JavaScriptCallFrameCustom.cpp: Added. (WebCore::V8JavaScriptCallFrame::evaluateCallback): (WebCore::V8JavaScriptCallFrame::scopeChainAccessorGetter): (WebCore::V8JavaScriptCallFrame::scopeTypeCallback): (WebCore::V8JavaScriptCallFrame::thisObjectAccessorGetter): (WebCore::V8JavaScriptCallFrame::typeAccessorGetter): * inspector/JavaScriptCallFrame.idl: * inspector/front-end/InjectedScript.js: (injectedScriptConstructor.): 2010-04-19 Jessie Berlin Rubber Stamped by Adam Roben Chromium Release Build Fix. * css/CSSSelector.cpp: (WebCore::CSSSelector::pseudoId): In the case where the DATALIST is not enabled, fall through to NOPSEUDO instead of omitting PseudoInputListButton entirely from the switch. 2010-04-19 Jessie Berlin Reviewed by Dave Hyatt. First steps towards fixing bug 24021 - pseudo-element styles not accessible / retrievable via DOM methods. https://bugs.webkit.org/show_bug.cgi?id=24021 Allows access to the computed styles for the pseudo-elements through the second argument to getComputedStyle. This approach does not provide the correct values for 'length' properties and does not work for the ':selection' pseudo-element and will instead return results similiar to those returned by Firefox. This approach also requires waiting until at least one iteration of a hardware accelerated composited animation to return the correct values for the "opacity" and "transform" properties of a pseudo-element associated with the element being animated. Those values need to be retrieved from the renderer for the pseudo-element as opposed to the cached RenderStyle for the element on which the pseudo-element is defined, which is further complicated by the fact that not all elements have renderers. Test: fast/css/getComputedStyle/getComputedStyle-with-pseudo-element.html * WebCore.base.exp: * css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::CSSComputedStyleDeclaration): Parse the and store the pseudo-element specifier from the string provided by the user. (WebCore::CSSComputedStyleDeclaration::getFontSizeCSSValuePreferringKeyword): Get the computed style for the pseudo-element if it has been specified. (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Get the computed style for the pseudo-element if it has been specified, with a FIXME noting that the values returned for the "opacity" and "transform" properties of a pseudo-element associated with an element being animated and using hardware accelerated compositing will not be correct until after the first iteration of the animation. (WebCore::CSSComputedStyleDeclaration::length): Get the computed style for the pseudo-element if it has been specified. (WebCore::CSSComputedStyleDeclaration::cssPropertyMatches): Ditto. * css/CSSComputedStyleDeclaration.h: (WebCore::computedStyle): Take into consideration the pseudo-element. * css/CSSSelector.cpp: (WebCore::CSSSelector::pseudoId): Return the PseudoId that corresponds to the given PseudoType. If there is no corresponding PseudoId, returns NOPSEUDO. (WebCore::nameToPseudoTypeMap): Create and return the mapping between string names and PseudoTypes. (WebCore::CSSSelector::parsePseudoType): Parse and the given string into a PseudoType. (WebCore::CSSSelector::extractPseudoType): Refactored to use parsePseudoType. * css/CSSSelector.h: * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector): Refactored to use pseudoId. * dom/Element.cpp: (WebCore::Element::computedStyle): If the pseudo-element is specified, then return the cached RenderStyle for that PseudoId. Added a FIXME to find the actual renders of the pseudo-elements instead of just the cached RenderStyle of the RenderStyle for the associated element. * dom/Element.h: (WebCore::Element::virtualComputedStyle): Because Element::computedStyle is used so often, don't make it virtual. Instead, provide a virtualComputedStyle method in the Node.h class andmake computedStyle non-virtual. That way the Element version and the Node version of computedStyle will have the same name and look the same at the call site, but the Element version will be more efficient. * dom/Node.h: (WebCore::Node::computedStyle): Ditto. * dom/Node.cpp: (WebCore::Node::virtualComputedStyle): Get the computed style for the pseudo-element if it has been specified. * page/DOMWindow.cpp: (WebCore::DOMWindow::getComputedStyle): Ditto. 2010-04-18 Simon Hausmann Reviewed by Laszlo Gombos. [Qt] Fix JavaScriptCore's include path for WinCE builds https://bugs.webkit.org/show_bug.cgi?id=36751 * WebCore.pro: 2010-04-17 Alexey Proskuryakov Reviewed by Adam Barth. https://bugs.webkit.org/show_bug.cgi?id=37720 HTMLFrameSetElement-window-eventListener-attributes.html sometimes crashes on SnowLeopard Release Tests: * fast/dom/Window/HTMLBodyElement-window-eventListener-attributes.html: * fast/dom/Window/HTMLFrameSetElement-window-eventListener-attributes.html: * bindings/scripts/CodeGeneratorJS.pm: Use global object as a wrapper for window event listeners set via document.body. The body wrapper can go away if nothing else references it. * html/HTMLBodyElement.idl: Override listeners that exist on Element with custom implementations, because we need to use window object as a wrapper, not the element. Marked all window event listeners as such for code generator. * html/HTMLFrameSetElement.idl: Ditto. 2010-04-17 Juan C. Montemayor Reviewed by Joseph Pecoraro. Databases pane doesn't recognize table creation/deletion https://bugs.webkit.org/show_bug.cgi?id=20219 * inspector/front-end/DatabaseQueryView.js: (WebInspector.DatabaseQueryView.prototype._queryFinished): 2010-04-17 Yaar Schnitman Reviewed by Adam Barth. Auto-generate V8 bindings for canvas.* overloads https://bugs.webkit.org/show_bug.cgi?id=37453 * bindings/v8/custom/V8CanvasRenderingContext2DCustom.cpp: Deleted custom code that is now auto-generated. * bindings/scripts/CodeGeneratorV8.pm: Not generating custom signatures for overloaded methods and accepting Object as a string input. * html/canvas/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::drawImage): Added missing 9-arguments overloads for drawImage. * html/canvas/CanvasRenderingContext2D.h: * html/canvas/CanvasRenderingContext2D.idl: Overloaded methods defined (V8 only). 2010-04-17 Yury Semikhatsky Reviewed by Pavel Feldman. Web Inspector: move JavaScriptCallFrame.{h,cpp} to WebCore/bindings/js https://bugs.webkit.org/show_bug.cgi?id=37740 * GNUmakefile.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSBindingsAllInOne.cpp: * bindings/js/JavaScriptCallFrame.cpp: Renamed from WebCore/inspector/JavaScriptCallFrame.cpp. (WebCore::JavaScriptCallFrame::JavaScriptCallFrame): (WebCore::JavaScriptCallFrame::caller): (WebCore::JavaScriptCallFrame::scopeChain): (WebCore::JavaScriptCallFrame::dynamicGlobalObject): (WebCore::JavaScriptCallFrame::functionName): (WebCore::JavaScriptCallFrame::type): (WebCore::JavaScriptCallFrame::thisObject): (WebCore::JavaScriptCallFrame::evaluate): * bindings/js/JavaScriptCallFrame.h: Renamed from WebCore/inspector/JavaScriptCallFrame.h. (WebCore::JavaScriptCallFrame::create): (WebCore::JavaScriptCallFrame::invalidate): (WebCore::JavaScriptCallFrame::isValid): (WebCore::JavaScriptCallFrame::sourceID): (WebCore::JavaScriptCallFrame::line): (WebCore::JavaScriptCallFrame::update): * inspector/InjectedScriptHost.h: * inspector/InspectorController.h: 2010-04-17 Vangelis Kokkevis Reviewed by Dimitri Glazkov. Adding definition of GLES2Context class. https://bugs.webkit.org/show_bug.cgi?id=37541 No new functionality implemented yet, no tests. * WebCore.gypi: Added GLES2Context.h * platform/chromium/GLES2Context.h: Added. 2010-04-17 Julien Chaffraix Reviewed by Darin Adler. Crash while handling SVG font in the wrong namespace imported with @font-face https://bugs.webkit.org/show_bug.cgi?id=18862 Test: fast/invalid/invalidSVGFont.html * loader/CachedFont.cpp: (WebCore::CachedFont::getSVGFontById): Make sure we really get an SVGFontElement by using getElementsByNameNS: the element factory chooses which element to create based on both localName and namespace. 2010-04-16 Sheriff Bot Unreviewed, rolling out r57770. http://trac.webkit.org/changeset/57770 https://bugs.webkit.org/show_bug.cgi?id=37746 8 test cases crashed (Requested by Ossy on #webkit). * platform/graphics/qt/GraphicsLayerQt.cpp: (WebCore::AnimationQtBase::AnimationQtBase): (WebCore::TransformAnimationQt::~TransformAnimationQt): (WebCore::TransformAnimationQt::applyFrame): (WebCore::OpacityAnimationQt::applyFrame): (WebCore::GraphicsLayerQt::addAnimation): 2010-04-16 Daniel Bates Reviewed by Adam Treat. https://bugs.webkit.org/show_bug.cgi?id=36312 Adds support for the viewport meta tag. The code is largely derived in whole or in part from the WebCore-528.15 source published as part of the iPhone 3.1.3 source code . * Android.mk: Added file ViewportArguments.cpp. * GNUmakefile.am: Added files ViewportArguments.cpp and ViewportArguments.h. * WebCore.gypi: Ditto. * WebCore.pro: Ditto. * WebCore.vcproj/WebCore.vcproj: Ditto. * WebCore.xcodeproj/project.pbxproj: Ditto. * dom/Document.cpp: (WebCore::isSeparator): Added. (WebCore::Document::processArguments): Added. (WebCore::Document::processViewport): Added. * dom/Document.h: * dom/ViewportArguments.cpp: Added. (WebCore::setViewportFeature): (WebCore::viewportErrorMessageTemplate): (WebCore::viewportErrorMessageLevel): (WebCore::reportViewportWarning): * dom/ViewportArguments.h: Added. (WebCore::): (WebCore::ViewportArguments::): (WebCore::ViewportArguments::ViewportArguments): (WebCore::ViewportArguments::hasCustomArgument): * html/HTMLMetaElement.cpp: (WebCore::HTMLMetaElement::process): Modified to call Document::processViewport. * page/ChromeClient.h: (WebCore::ChromeClient::didReceiveViewportArguments): Added. 2010-04-16 No'am Rosenthal Reviewed by Antti Koivisto. [Qt] GraphicsLayer: support fill-modes https://bugs.webkit.org/show_bug.cgi?id=36216 Implement the CSS-animation "fill mode" concept in GraphicsLayerQt. The concept enables a key-frame animation to go to the animation's starting point before the delay, and/or to stay at the animation's ending point after its ended, without reverting to the default value. We do that by manually setting the value to keyframe-0 before the delay if fill-mode is backwards/both, and manually modifying the default value to the animated value as we animate, with fill-mode forwards/both. * platform/graphics/qt/GraphicsLayerQt.cpp: (WebCore::AnimationQtBase::AnimationQtBase): (WebCore::TransformAnimationQt::~TransformAnimationQt): (WebCore::TransformAnimationQt::applyFrame): (WebCore::GraphicsLayerQt::addAnimation): 2010-04-16 Gavin Barraclough Reviewed by NOBODY (arm build fix). * bindings/js/JSDesktopNotificationsCustom.cpp: (WebCore::JSNotification::addEventListener): (WebCore::JSNotification::removeEventListener): 2010-04-16 Dmitry Titov Reviewed by Yury Semikhatsky. [v8] In Workers, script errors right after close() are not delivered to the Worker.onerror. https://bugs.webkit.org/show_bug.cgi?id=37691 Existing worker-close.html will now work in Chromium. * bindings/v8/V8Utilities.cpp: (WebCore::getScriptExecutionContext): Stop using proxy() to just retrieve WorkerContext which should be always available. * bindings/v8/WorkerContextExecutionProxy.h: removed workerContext() accessor which moved to WorkerScriptController. * bindings/v8/WorkerScriptController.h: (WebCore::WorkerScriptController::workerContext): Added, to be able to pull WorkerContext out from the controller. 2010-04-16 Gavin Barraclough Reviewed by Sam Weinig. https://bugs.webkit.org/show_bug.cgi?id=37735 Remove JSC specific code from WebCore::AtomicString Add generic constructor/add/find methods that take a UChar* & length, along with a known existing hash for the string. This removes the remaining JSC specific code from platform/text. * bindings/js/JSAbstractWorkerCustom.cpp: (WebCore::JSAbstractWorker::addEventListener): (WebCore::JSAbstractWorker::removeEventListener): * bindings/js/JSDOMApplicationCacheCustom.cpp: (WebCore::JSDOMApplicationCache::addEventListener): (WebCore::JSDOMApplicationCache::removeEventListener): * bindings/js/JSDOMBinding.cpp: (WebCore::ustringToAtomicString): (WebCore::identifierToAtomicString): (WebCore::findAtomicString): * bindings/js/JSDOMBinding.h: * bindings/js/JSDOMWindowCustom.cpp: (WebCore::childFrameGetter): (WebCore::JSDOMWindow::getOwnPropertySlot): (WebCore::JSDOMWindow::getOwnPropertyDescriptor): (WebCore::JSDOMWindow::open): (WebCore::JSDOMWindow::addEventListener): (WebCore::JSDOMWindow::removeEventListener): * bindings/js/JSElementCustom.cpp: (WebCore::JSElement::setAttribute): (WebCore::JSElement::setAttributeNS): * bindings/js/JSEventSourceCustom.cpp: (WebCore::JSEventSource::addEventListener): (WebCore::JSEventSource::removeEventListener): * bindings/js/JSHTMLAllCollectionCustom.cpp: (WebCore::getNamedItems): (WebCore::JSHTMLAllCollection::canGetItemsForName): * bindings/js/JSHTMLCollectionCustom.cpp: (WebCore::getNamedItems): (WebCore::JSHTMLCollection::canGetItemsForName): * bindings/js/JSHTMLDocumentCustom.cpp: (WebCore::JSHTMLDocument::canGetItemsForName): * bindings/js/JSHTMLFormElementCustom.cpp: (WebCore::JSHTMLFormElement::canGetItemsForName): (WebCore::JSHTMLFormElement::nameGetter): * bindings/js/JSHTMLFrameSetElementCustom.cpp: (WebCore::JSHTMLFrameSetElement::canGetItemsForName): (WebCore::JSHTMLFrameSetElement::nameGetter): * bindings/js/JSMessageEventCustom.cpp: (WebCore::JSMessageEvent::initMessageEvent): * bindings/js/JSMessagePortCustom.cpp: (WebCore::JSMessagePort::addEventListener): (WebCore::JSMessagePort::removeEventListener): * bindings/js/JSMimeTypeArrayCustom.cpp: (WebCore::JSMimeTypeArray::canGetItemsForName): (WebCore::JSMimeTypeArray::nameGetter): * bindings/js/JSNodeCustom.cpp: (WebCore::JSNode::addEventListener): (WebCore::JSNode::removeEventListener): * bindings/js/JSNodeListCustom.cpp: (WebCore::JSNodeList::canGetItemsForName): (WebCore::JSNodeList::nameGetter): * bindings/js/JSPluginArrayCustom.cpp: (WebCore::JSPluginArray::canGetItemsForName): (WebCore::JSPluginArray::nameGetter): * bindings/js/JSPluginCustom.cpp: (WebCore::JSPlugin::canGetItemsForName): (WebCore::JSPlugin::nameGetter): * bindings/js/JSPopStateEventCustom.cpp: (WebCore::JSPopStateEvent::initPopStateEvent): * bindings/js/JSSVGElementInstanceCustom.cpp: (WebCore::JSSVGElementInstance::addEventListener): (WebCore::JSSVGElementInstance::removeEventListener): * bindings/js/JSWebSocketCustom.cpp: (WebCore::JSWebSocket::addEventListener): (WebCore::JSWebSocket::removeEventListener): * bindings/js/JSWorkerContextCustom.cpp: (WebCore::JSWorkerContext::addEventListener): (WebCore::JSWorkerContext::removeEventListener): * bindings/js/JSXMLHttpRequestCustom.cpp: (WebCore::JSXMLHttpRequest::setRequestHeader): (WebCore::JSXMLHttpRequest::getResponseHeader): (WebCore::JSXMLHttpRequest::addEventListener): (WebCore::JSXMLHttpRequest::removeEventListener): * bindings/js/JSXMLHttpRequestUploadCustom.cpp: (WebCore::JSXMLHttpRequestUpload::addEventListener): (WebCore::JSXMLHttpRequestUpload::removeEventListener): * platform/text/AtomicString.cpp: (WebCore::AtomicString::add): (WebCore::AtomicString::find): * platform/text/AtomicString.h: (WebCore::AtomicString::AtomicString): 2010-04-16 Fumitoshi Ukai Reviewed by Alexey Proskuryakov. WebSocket crash when it receives bad header. https://bugs.webkit.org/show_bug.cgi?id=37682 If name or value is not valid UTF-8, nameStr or valueStr would be null string, so crashed in headers->add(nameStr, valueStr). Check both nameStr and valueStr are not null string. Otherwise handshake will fail. Test: websocket/tests/bad-handshake-crash.html * websockets/WebSocketHandshake.cpp: (WebCore::WebSocketHandshake::readHTTPHeaders): check nameStr and valueStr are not null string. 2010-04-16 Dan Bernstein Reviewed by Simon Fraser. Crash when updating hover state Test: fast/dynamic/hover-style-recalc-crash.html Updating the hover state of an element caused the document to need style recalc, and then updating the hover state of a link caused style recalc, which changed the render tree while updateHoverActiveState() was iterating over it, leading to a crash. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::updateHoverActiveState): Collect the nodes to be updated into vectors, then update their active and hover states. 2010-04-16 Dumitru Daniliuc Reviewed by Alexey Proskuryakov. Make Safari correctly allocate 5MB of DB storage to all new origins. https://bugs.webkit.org/show_bug.cgi?id=36671 Eric fixed the same problem in DatabaseTracker::fullPathForDatabaseNoLock() in r57128, but forgot to fix it in DatabaseTracker::detailsForNameAndOrigin() too. * storage/DatabaseTracker.cpp: (WebCore::DatabaseTracker::detailsForNameAndOrigin): 2010-04-16 Kinuko Yasuda Reviewed by Jian Li. Implement FileStreamProxy that calls FileStream methods on FileThread for FileAPI https://bugs.webkit.org/show_bug.cgi?id=37218 No new tests; tests will be added when we add upper layer implementations. * GNUmakefile.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * html/FileStream.cpp: (WebCore::FileStream::stop): * html/FileStream.h: * html/FileStreamClient.h: (WebCore::FileStreamClient::didStop): * html/FileStreamProxy.cpp: Added * html/FileStreamProxy.h: Added * html/FileThreadTask.h: Added 2010-04-16 Gavin Barraclough Reviewed by Oliver Hunt. Bug 37730 - Remove JSC::UString dependencies from WebCore::StringImpl (Following on from bug #37675). Remove ustring() method, and constructor passed a UString. * WebCore.base.exp: * bindings/js/JSDOMBinding.cpp: (WebCore::stringimplToUString): (WebCore::jsStringSlowCase): (WebCore::ustringToString): (WebCore::stringToUString): (WebCore::identifierToString): * bindings/js/JSDOMBinding.h: (WebCore::jsString): * platform/text/AtomicString.cpp: (WebCore::AtomicString::operator UString): * platform/text/StringImpl.cpp: (WebCore::StringImpl::create): * platform/text/StringImpl.h: 2010-04-16 Jarkko Sakkinen Reviewed by Simon Hausmann. [Qt] WebGL is not visible when QGLWidget viewport is used https://bugs.webkit.org/show_bug.cgi?id=37070 Added HostWindow parameter to the constructor of GraphicsContext3D. Shared OpenGL context is initialized with parent QGLWidget. * html/canvas/WebGLRenderingContext.cpp: (WebCore::WebGLRenderingContext::create): * platform/graphics/GraphicsContext3D.h: * platform/graphics/mac/GraphicsContext3DMac.cpp: (WebCore::GraphicsContext3D::create): (WebCore::GraphicsContext3D::GraphicsContext3D): * platform/graphics/qt/GraphicsContext3DQt.cpp: (WebCore::GraphicsContext3DInternal::GraphicsContext3DInternal): (WebCore::GraphicsContext3DInternal::~GraphicsContext3DInternal): (WebCore::GraphicsContext3DInternal::getOwnerGLWidget): (WebCore::GraphicsContext3D::create): (WebCore::GraphicsContext3D::GraphicsContext3D): 2010-04-16 Jarkko Sakkinen Reviewed by Simon Hausmann. [Qt] WebKit compilation fails with --3d-canvas https://bugs.webkit.org/show_bug.cgi?id=37699 API for readPixels() has been changed. * platform/graphics/qt/GraphicsContext3DQt.cpp: (WebCore::GraphicsContext3D::readPixels): 2010-04-16 No'am Rosenthal Reviewed by Antti Koivisto. [Qt]QtLauncher crash on page with CSS 3D transform https://bugs.webkit.org/show_bug.cgi?id=36859 Added a neccessary null-pointer check, lack of which created the crash circumstances. Tested by http://css-vfx.googlecode.com/svn/trunk/snowstack/snowstack.html * platform/graphics/qt/GraphicsLayerQt.cpp: (WebCore::GraphicsLayerQtImpl::flushChanges): 2010-04-16 Anders Carlsson Reviewed by Sam Weinig. Make sure to update the current graphics context when calling out to AppKit. * platform/mac/ThemeMac.mm: (WebCore::paintCheckbox): (WebCore::paintRadio): 2010-04-15 Gavin Barraclough Reviewed by Sam Weinig & Oliver Hunt. https://bugs.webkit.org/show_bug.cgi?id=37675 Remove casts/constructors to/from JSC::UString type from WebCore::String WebCore's strings should not know about JSC::UString, this should be abstracted away in the bindings. Add explicit conversion methods rather than relying on overloaded cast operators / constructors being implicitly called. This patch only changes the class String, once this has landed StringImpl, and hopefully AtomicString too, should follow suit. This patch adds: WebCore::identifierToString WebCore::ustringToString WebCore::stringToUString - to JSDOMBindings.h, and updates code to call these methods. * WebCore.base.exp: * WebCore.order: * bindings/js/CachedScriptSourceProvider.h: (WebCore::CachedScriptSourceProvider::CachedScriptSourceProvider): * bindings/js/JSAudioConstructor.cpp: (WebCore::constructAudio): * bindings/js/JSCSSStyleDeclarationCustom.cpp: (WebCore::JSCSSStyleDeclaration::nameGetter): * bindings/js/JSCanvasRenderingContext2DCustom.cpp: (WebCore::toHTMLCanvasStyle): (WebCore::JSCanvasRenderingContext2D::setFillColor): (WebCore::JSCanvasRenderingContext2D::setStrokeColor): (WebCore::JSCanvasRenderingContext2D::drawImageFromRect): (WebCore::JSCanvasRenderingContext2D::setShadow): (WebCore::JSCanvasRenderingContext2D::fillText): (WebCore::JSCanvasRenderingContext2D::strokeText): * bindings/js/JSClipboardCustom.cpp: (WebCore::JSClipboard::types): (WebCore::JSClipboard::clearData): (WebCore::JSClipboard::getData): (WebCore::JSClipboard::setData): * bindings/js/JSCustomXPathNSResolver.cpp: (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI): * bindings/js/JSDOMBinding.cpp: (WebCore::identifierToString): (WebCore::ustringToString): (WebCore::stringToUString): (WebCore::valueToStringWithNullCheck): (WebCore::valueToStringWithUndefinedOrNullCheck): (WebCore::reportException): * bindings/js/JSDOMBinding.h: * bindings/js/JSDOMFormDataCustom.cpp: (WebCore::JSDOMFormData::append): * bindings/js/JSDOMWindowCustom.cpp: (WebCore::namedItemGetter): (WebCore::JSDOMWindow::setLocation): (WebCore::JSDOMWindow::openDatabase): * bindings/js/JSDatabaseCustom.cpp: (WebCore::JSDatabase::changeVersion): * bindings/js/JSDocumentCustom.cpp: (WebCore::JSDocument::setLocation): * bindings/js/JSEventListener.cpp: (WebCore::JSEventListener::handleEvent): * bindings/js/JSEventSourceConstructor.cpp: (WebCore::constructEventSource): * bindings/js/JSHTMLAllCollectionCustom.cpp: (WebCore::callHTMLAllCollection): * bindings/js/JSHTMLCanvasElementCustom.cpp: (WebCore::JSHTMLCanvasElement::getContext): * bindings/js/JSHTMLCollectionCustom.cpp: (WebCore::callHTMLCollection): * bindings/js/JSHTMLDocumentCustom.cpp: (WebCore::JSHTMLDocument::nameGetter): (WebCore::documentWrite): * bindings/js/JSInjectedScriptHostCustom.cpp: (WebCore::InjectedScriptHost::createInjectedScript): * bindings/js/JSInspectorFrontendHostCustom.cpp: (WebCore::JSInspectorFrontendHost::showContextMenu): * bindings/js/JSLazyEventListener.cpp: (WebCore::JSLazyEventListener::initializeJSFunction): * bindings/js/JSLocationCustom.cpp: (WebCore::JSLocation::setHref): (WebCore::JSLocation::setProtocol): (WebCore::JSLocation::setHost): (WebCore::JSLocation::setHostname): (WebCore::JSLocation::setPathname): (WebCore::JSLocation::setSearch): (WebCore::JSLocation::setHash): (WebCore::JSLocation::replace): (WebCore::JSLocation::assign): * bindings/js/JSMessageEventCustom.cpp: (WebCore::JSMessageEvent::initMessageEvent): * bindings/js/JSNamedNodeMapCustom.cpp: (WebCore::JSNamedNodeMap::canGetItemsForName): (WebCore::JSNamedNodeMap::nameGetter): * bindings/js/JSOptionConstructor.cpp: (WebCore::constructHTMLOptionElement): * bindings/js/JSSQLResultSetRowListCustom.cpp: (WebCore::JSSQLResultSetRowList::item): * bindings/js/JSSQLTransactionCustom.cpp: (WebCore::JSSQLTransaction::executeSql): * bindings/js/JSSharedWorkerConstructor.cpp: (WebCore::constructSharedWorker): * bindings/js/JSStorageCustom.cpp: (WebCore::JSStorage::canGetItemsForName): (WebCore::JSStorage::nameGetter): (WebCore::JSStorage::deleteProperty): (WebCore::JSStorage::getOwnPropertyNames): (WebCore::JSStorage::putDelegate): * bindings/js/JSStyleSheetListCustom.cpp: (WebCore::JSStyleSheetList::canGetItemsForName): (WebCore::JSStyleSheetList::nameGetter): * bindings/js/JSWebKitCSSMatrixConstructor.cpp: (WebCore::constructWebKitCSSMatrix): * bindings/js/JSWebSocketConstructor.cpp: (WebCore::constructWebSocket): * bindings/js/JSWebSocketCustom.cpp: (WebCore::JSWebSocket::send): * bindings/js/JSWorkerConstructor.cpp: (WebCore::constructWorker): * bindings/js/JSWorkerContextCustom.cpp: (WebCore::JSWorkerContext::importScripts): * bindings/js/JSXMLHttpRequestCustom.cpp: (WebCore::JSXMLHttpRequest::open): (WebCore::JSXMLHttpRequest::setRequestHeader): (WebCore::JSXMLHttpRequest::send): (WebCore::JSXMLHttpRequest::overrideMimeType): * bindings/js/JSXSLTProcessorCustom.cpp: (WebCore::JSXSLTProcessor::setParameter): (WebCore::JSXSLTProcessor::getParameter): (WebCore::JSXSLTProcessor::removeParameter): * bindings/js/ScheduledAction.cpp: (WebCore::ScheduledAction::create): * bindings/js/ScriptCallFrame.cpp: (WebCore::ScriptCallFrame::ScriptCallFrame): * bindings/js/ScriptController.cpp: (WebCore::ScriptController::evaluateInWorld): * bindings/js/ScriptDebugServer.cpp: (WebCore::ScriptDebugServer::hasBreakpoint): (WebCore::ScriptDebugServer::dispatchDidParseSource): (WebCore::ScriptDebugServer::dispatchFailedToParseSource): (WebCore::ScriptDebugServer::sourceParsed): * bindings/js/ScriptEventListener.cpp: (WebCore::getEventListenerHandlerBody): * bindings/js/ScriptFunctionCall.cpp: (WebCore::ScriptFunctionCall::appendArgument): (WebCore::ScriptFunctionCall::call): (WebCore::ScriptFunctionCall::construct): * bindings/js/ScriptObject.cpp: (WebCore::ScriptObject::set): * bindings/js/ScriptProfiler.cpp: (WebCore::ScriptProfiler::start): (WebCore::ScriptProfiler::stop): * bindings/js/ScriptString.h: (WebCore::ScriptString::operator String): (WebCore::ScriptString::ustring): (WebCore::ScriptString::operator+=): * bindings/js/ScriptValue.cpp: (WebCore::ScriptValue::getString): * bindings/js/ScriptValue.h: (WebCore::ScriptValue::toString): * bindings/js/SerializedScriptValue.cpp: (WebCore::SerializedObject::set): (WebCore::SerializingTreeWalker::convertIfTerminal): (WebCore::DeserializingTreeWalker::putProperty): * bindings/js/StringSourceProvider.h: (WebCore::StringSourceProvider::StringSourceProvider): * bindings/objc/WebScriptObject.mm: (-[WebScriptObject callWebScriptMethod:withArguments:]): (-[WebScriptObject setValue:forKey:]): (-[WebScriptObject valueForKey:]): (-[WebScriptObject removeWebScriptKey:]): * bindings/scripts/CodeGeneratorJS.pm: * bridge/IdentifierRep.cpp: (WebCore::IdentifierRep::get): * bridge/c/c_utility.cpp: (JSC::Bindings::identifierFromNPIdentifier): * inspector/InspectorController.cpp: (WebCore::InspectorController::scriptImported): (WebCore::InspectorController::addProfileFinishedMessageToConsole): (WebCore::InspectorController::createProfileHeader): * inspector/InspectorResource.cpp: (WebCore::InspectorResource::sourceString): * inspector/JavaScriptCallFrame.cpp: (WebCore::JavaScriptCallFrame::functionName): * platform/KURL.h: (WebCore::KURL::operator const String&): * platform/text/AtomicString.cpp: (WebCore::AtomicString::operator UString): * platform/text/AtomicString.h: * platform/text/PlatformString.h: * platform/text/String.cpp: 2010-04-16 Anders Carlsson Reviewed by David Hyatt. Always pass a view to the AppKit drawing functions. https://bugs.webkit.org/show_bug.cgi?id=37724 * platform/mac/ThemeMac.mm: (WebCore::paintCheckbox): (WebCore::paintRadio): * rendering/RenderThemeMac.mm: (WebCore::RenderThemeMac::paintMenuList): (WebCore::RenderThemeMac::paintSliderThumb): (WebCore::RenderThemeMac::paintSearchField): (WebCore::RenderThemeMac::paintSearchFieldCancelButton): (WebCore::RenderThemeMac::paintSearchFieldResultsDecoration): (WebCore::RenderThemeMac::paintSearchFieldResultsButton): 2010-04-16 Alexey Proskuryakov Reviewed by Dan Bernstein. https://bugs.webkit.org/show_bug.cgi?id=37718 Safari crashes with certain JavaScript charCode events in EventHandler::needsKeyboardEventDisambiguationQuirks Test: fast/events/recorded-keydown-event.html * dom/KeyboardEvent.cpp: (WebCore::KeyboardEvent::charCode): Check if the view (window) is frameless. 2010-04-16 Jian Li Reviewed by Dmitry Titov. Update FormDataList to fix style violations in old code. https://bugs.webkit.org/show_bug.cgi?id=37689 * html/FormDataList.h: (WebCore::FormDataList::appendData): (WebCore::FormDataList::appendBlob): 2010-04-16 Anders Carlsson Fix WebKit2 build. * WebCore.base.exp: 2010-04-16 Jay Civelli Reviewed by Dimitri Glazkov. [chromium] Fix Mac build. https://bugs.webkit.org/show_bug.cgi?id=37436 * platform/chromium/PopupMenuChromium.h: 2010-04-16 Jay Civelli Reviewed by Dimitri Glazkov. [chromium] Select popups would assert when destroyed. https://bugs.webkit.org/show_bug.cgi?id=37436 * platform/chromium/PopupMenuChromium.cpp: (WebCore::PopupContainer::PopupContainer): (WebCore::PopupContainer::showPopup): (WebCore::PopupContainer::notifyPopupHidden): * platform/chromium/PopupMenuChromium.h: 2010-04-16 Antonio Gomes Unreviewed QtWebKit (with Qt 4.7) build fix. Bug 37683 moved code from FontQt.cpp to FontPlatformDataQt.cpp but did not renamed the variable used. * platform/graphics/qt/FontPlatformDataQt.cpp: (WebCore::FontPlatformData::FontPlatformData): 2010-04-16 Noam Rosenthal Reviewed by Kenneth Rohde Christiansen. Make GraphicsLayerQt always use ItemCoordinateCache, and remove ItemUsesExtendedStyleOption. This aligns our implementation with the Safari implementation - layers are always uploaded to textures in item units, and WebCore is responsible for the heuristics. [Qt] GraphicsLayer: performance optimizations https://bugs.webkit.org/show_bug.cgi?id=35393 No new tests. Still no FPS benchmarks available (on any platform) but animations are noticably better. * platform/graphics/qt/GraphicsLayerQt.cpp: (WebCore::GraphicsLayerQtImpl::GraphicsLayerQtImpl): (WebCore::GraphicsLayerQtImpl::paint): (WebCore::GraphicsLayerQtImpl::flushChanges): (WebCore::TransformAnimationQt::updateState): 2010-04-16 Simon Hausmann Reviewed by Kenneth Rohde Christiansen. [Qt] WebCore::Font::font() causes a QFont detach https://bugs.webkit.org/show_bug.cgi?id=37683 Moved the setStyleStrategy call to FontPlatformData to avoid the detach. Thanks to Holger for spotting this. * platform/graphics/qt/FontPlatformDataQt.cpp: (WebCore::FontPlatformData::FontPlatformData): * platform/graphics/qt/FontQt.cpp: (WebCore::Font::font): 2010-04-15 Matt Perry Reviewed by Adam Barth. Remove the check for the main frame's scheme when deciding which v8 extensions to add to a script context. Instead, Chromium will handle that check elsewhere to allow finer-grained control over what APIs we expose to web pages. https://bugs.webkit.org/show_bug.cgi?id=37681 * bindings/v8/V8DOMWindowShell.cpp: (WebCore::V8DOMWindowShell::createNewContext): 2010-04-15 Luiz Agostini Reviewed by Antti Koivisto. No default selection for that did not have selected elements, now being menu lists, will have the first