2008-11-03 Yael Aharon Reviewed by Simon Hausmann. Add methods for getting and setting user data on History Item. This change is limited to QT port only. Tests were added in the patch for https://bugs.webkit.org/show_bug.cgi?id=21864. Minor change by Simon: made the functions inline and added a missing const. * history/HistoryItem.h: 2008-11-01 Alexey Proskuryakov Reviewed by Darin Adler. https://bugs.webkit.org/show_bug.cgi?id=22030 Make EventNames usable from multiple threads * platform/text/AtomicString.cpp: (WebCore::stringTable): (WebCore::AtomicString::add): (WebCore::AtomicString::remove): (WebCore::AtomicString::find): (WebCore::AtomicString::init): * platform/text/AtomicString.h: Atomic string table is now per-thread. Individual strings cannot be shared between threads, so global AtomicString constants cannot be used from threads other than the main one. * dom/EventNames.cpp: (WebCore::EventNames::EventNames): (WebCore::eventNames): (WebCore::EventNames::init): * dom/EventNames.h: Made EventNames a ThreadSpecific struct. Individual event names are now accessed as eventNames().fooEvent, not EventNames::fooEvent. This makes EventNames usable from all threads. * WebCore.base.exp: * bindings/js/JSDOMWindowBase.cpp: * bindings/js/JSEventListener.cpp: * bindings/js/ScriptController.cpp: (WebCore::ScriptController::processingUserGesture): * dom/BeforeTextInsertedEvent.cpp: (WebCore::BeforeTextInsertedEvent::BeforeTextInsertedEvent): * dom/BeforeUnloadEvent.cpp: (WebCore::BeforeUnloadEvent::BeforeUnloadEvent): * dom/CharacterData.cpp: (WebCore::CharacterData::dispatchModifiedEvent): * dom/ContainerNode.cpp: (WebCore::dispatchChildInsertionEvents): (WebCore::dispatchChildRemovalEvents): * dom/DedicatedWorker.cpp: (WebCore::DedicatedWorker::dispatchErrorEvent): * dom/Document.cpp: (WebCore::Document::implicitClose): (WebCore::Document::setFocusedNode): (WebCore::Document::addListenerTypeIfNeeded): (WebCore::Document::removeWindowInlineEventListenerForType): (WebCore::Document::addWindowEventListener): (WebCore::Document::removeWindowEventListener): (WebCore::Document::finishedParsing): * dom/EventTargetNode.cpp: (WebCore::EventTargetNode::dispatchGenericEvent): (WebCore::EventTargetNode::dispatchSubtreeModifiedEvent): (WebCore::EventTargetNode::dispatchWindowEvent): (WebCore::EventTargetNode::dispatchUIEvent): (WebCore::EventTargetNode::dispatchSimulatedClick): (WebCore::EventTargetNode::dispatchMouseEvent): (WebCore::EventTargetNode::dispatchFocusEvent): (WebCore::EventTargetNode::dispatchBlurEvent): (WebCore::EventTargetNode::defaultEventHandler): (WebCore::EventTargetNode::on*): (multiple methods) (WebCore::EventTargetNode::setOn*): (multiple methods) * dom/KeyboardEvent.cpp: (WebCore::eventTypeForKeyboardEventType): (WebCore::KeyboardEvent::keyCode): (WebCore::KeyboardEvent::charCode): * dom/MessageEvent.cpp: (WebCore::MessageEvent::MessageEvent): * dom/MessagePort.cpp: (WebCore::MessagePort::dispatchMessages): (WebCore::MessagePort::dispatchCloseEvent): * dom/MouseEvent.cpp: (WebCore::MouseEvent::isDragEvent): (WebCore::MouseEvent::toElement): (WebCore::MouseEvent::fromElement): * dom/OverflowEvent.cpp: (WebCore::OverflowEvent::OverflowEvent): * dom/TextEvent.cpp: (WebCore::TextEvent::TextEvent): * dom/WebKitAnimationEvent.cpp: (WebCore::WebKitAnimationEvent::WebKitAnimationEvent): (WebCore::WebKitAnimationEvent::~WebKitAnimationEvent): (WebCore::WebKitAnimationEvent::initWebKitAnimationEvent): (WebCore::WebKitAnimationEvent::animationName): (WebCore::WebKitAnimationEvent::elapsedTime): * dom/WebKitTransitionEvent.cpp: (WebCore::WebKitTransitionEvent::WebKitTransitionEvent): (WebCore::WebKitTransitionEvent::~WebKitTransitionEvent): (WebCore::WebKitTransitionEvent::initWebKitTransitionEvent): (WebCore::WebKitTransitionEvent::propertyName): (WebCore::WebKitTransitionEvent::elapsedTime): * dom/WheelEvent.cpp: (WebCore::WheelEvent::WheelEvent): (WebCore::WheelEvent::initWheelEvent): * dom/XMLTokenizerLibxml2.cpp: * dom/XMLTokenizerQt.cpp: * editing/DeleteButton.cpp: (WebCore::DeleteButton::defaultEventHandler): * editing/EditCommand.cpp: * editing/Editor.cpp: (WebCore::Editor::canDHTMLCut): (WebCore::Editor::canDHTMLCopy): (WebCore::Editor::canDHTMLPaste): (WebCore::Editor::tryDHTMLCopy): (WebCore::Editor::tryDHTMLCut): (WebCore::Editor::tryDHTMLPaste): (WebCore::dispatchEditableContentChangedEvents): * editing/ReplaceSelectionCommand.cpp: (WebCore::ReplacementFragment::ReplacementFragment): * editing/SelectionController.cpp: (WebCore::SelectionController::setFocused): * html/HTMLAnchorElement.cpp: (WebCore::HTMLAnchorElement::defaultEventHandler): * html/HTMLBodyElement.cpp: (WebCore::HTMLBodyElement::parseMappedAttribute): * html/HTMLButtonElement.cpp: (WebCore::HTMLButtonElement::parseMappedAttribute): (WebCore::HTMLButtonElement::defaultEventHandler): * html/HTMLElement.cpp: (WebCore::HTMLElement::parseMappedAttribute): * html/HTMLFormControlElement.cpp: (WebCore::HTMLFormControlElement::onChange): * html/HTMLFormElement.cpp: (WebCore::HTMLFormElement::handleLocalEvents): (WebCore::HTMLFormElement::prepareSubmit): (WebCore::HTMLFormElement::reset): (WebCore::HTMLFormElement::parseMappedAttribute): * html/HTMLFrameElementBase.cpp: (WebCore::HTMLFrameElementBase::parseMappedAttribute): * html/HTMLFrameSetElement.cpp: (WebCore::HTMLFrameSetElement::parseMappedAttribute): * html/HTMLImageElement.cpp: (WebCore::HTMLImageElement::parseMappedAttribute): * html/HTMLImageLoader.cpp: (WebCore::HTMLImageLoader::dispatchLoadEvent): * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::parseMappedAttribute): (WebCore::HTMLInputElement::setValueFromRenderer): (WebCore::HTMLInputElement::preDispatchEventHandler): (WebCore::HTMLInputElement::postDispatchEventHandler): (WebCore::HTMLInputElement::defaultEventHandler): (WebCore::HTMLInputElement::onSearch): * html/HTMLLabelElement.cpp: (WebCore::HTMLLabelElement::defaultEventHandler): * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::load): (WebCore::HTMLMediaElement::mediaPlayerNetworkStateChanged): (WebCore::HTMLMediaElement::setReadyState): (WebCore::HTMLMediaElement::progressEventTimerFired): (WebCore::HTMLMediaElement::seek): (WebCore::HTMLMediaElement::setDefaultPlaybackRate): (WebCore::HTMLMediaElement::setPlaybackRate): (WebCore::HTMLMediaElement::play): (WebCore::HTMLMediaElement::pause): (WebCore::HTMLMediaElement::setVolume): (WebCore::HTMLMediaElement::setMuted): (WebCore::HTMLMediaElement::mediaPlayerTimeChanged): (WebCore::HTMLMediaElement::documentWillBecomeInactive): * html/HTMLObjectElement.cpp: (WebCore::HTMLObjectElement::parseMappedAttribute): * html/HTMLOptionElement.cpp: * html/HTMLScriptElement.cpp: (WebCore::HTMLScriptElement::parseMappedAttribute): (WebCore::HTMLScriptElement::dispatchLoadEvent): (WebCore::HTMLScriptElement::dispatchErrorEvent): * html/HTMLSelectElement.cpp: (WebCore::HTMLSelectElement::parseMappedAttribute): (WebCore::HTMLSelectElement::defaultEventHandler): (WebCore::HTMLSelectElement::menuListDefaultEventHandler): (WebCore::HTMLSelectElement::listBoxDefaultEventHandler): * html/HTMLTextAreaElement.cpp: (WebCore::HTMLTextAreaElement::parseMappedAttribute): (WebCore::HTMLTextAreaElement::defaultEventHandler): * html/HTMLTokenizer.cpp: (WebCore::HTMLTokenizer::notifyFinished): * loader/FrameLoader.cpp: (WebCore::FrameLoader::stopLoading): (WebCore::FrameLoader::canCachePage): * loader/ImageDocument.cpp: (WebCore::ImageEventListener::handleEvent): * loader/ImageLoader.cpp: * loader/MediaDocument.cpp: (WebCore::MediaDocument::defaultEventHandler): * loader/appcache/DOMApplicationCache.cpp: (WebCore::DOMApplicationCache::callCheckingListener): (WebCore::DOMApplicationCache::callErrorListener): (WebCore::DOMApplicationCache::callNoUpdateListener): (WebCore::DOMApplicationCache::callDownloadingListener): (WebCore::DOMApplicationCache::callProgressListener): (WebCore::DOMApplicationCache::callUpdateReadyListener): (WebCore::DOMApplicationCache::callCachedListener): * page/AccessibilityObject.cpp: * page/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::mouseButtonListener): * page/ContextMenuController.cpp: (WebCore::ContextMenuController::handleContextMenuEvent): * page/DOMWindow.cpp: (WebCore::DOMWindow::on*): (multiple methods) (WebCore::DOMWindow::setOn*): (multiple methods) * page/EventHandler.cpp: (WebCore::EventHandler::handleMousePressEvent): (WebCore::EventHandler::handleMouseDoubleClickEvent): (WebCore::EventHandler::handleMouseMoveEvent): (WebCore::EventHandler::handleMouseReleaseEvent): (WebCore::EventHandler::updateDragAndDrop): (WebCore::EventHandler::cancelDragAndDrop): (WebCore::EventHandler::performDragAndDrop): (WebCore::EventHandler::updateMouseEventTargetNode): (WebCore::EventHandler::dispatchMouseEvent): (WebCore::EventHandler::sendContextMenuEvent): (WebCore::EventHandler::canMouseDownStartSelect): (WebCore::EventHandler::canMouseDragExtendSelect): (WebCore::EventHandler::defaultKeyboardEventHandler): (WebCore::EventHandler::dragSourceMovedTo): (WebCore::EventHandler::dragSourceEndedAt): (WebCore::EventHandler::handleDrag): (WebCore::EventHandler::handleTextInputEvent): * page/FocusController.cpp: * page/Frame.cpp: (WebCore::Frame::sendResizeEvent): (WebCore::Frame::sendScrollEvent): * page/Page.cpp: (WebCore::networkStateChanged): * page/animation/AnimationBase.cpp: (WebCore::AnimationBase::updateStateMachine): (WebCore::AnimationBase::animationTimerCallbackFired): (WebCore::AnimationBase::primeEventTimers): * page/animation/ImplicitAnimation.cpp: (WebCore::ImplicitAnimation::onAnimationEnd): (WebCore::ImplicitAnimation::sendTransitionEvent): * page/animation/KeyframeAnimation.cpp: (WebCore::KeyframeAnimation::onAnimationStart): (WebCore::KeyframeAnimation::onAnimationIteration): (WebCore::KeyframeAnimation::onAnimationEnd): (WebCore::KeyframeAnimation::sendAnimationEvent): * page/gtk/EventHandlerGtk.cpp: * page/mac/EventHandlerMac.mm: (WebCore::isKeyboardOptionTab): * page/mac/FrameMac.mm: * page/qt/EventHandlerQt.cpp: (WebCore::isKeyboardOptionTab): * plugins/PluginView.cpp: * plugins/gtk/PluginViewGtk.cpp: * plugins/qt/PluginViewQt.cpp: * plugins/win/PluginViewWin.cpp: (WebCore::PluginView::handleKeyboardEvent): (WebCore::PluginView::handleMouseEvent): * rendering/MediaControlElements.cpp: (WebCore::MediaControlMuteButtonElement::defaultEventHandler): (WebCore::MediaControlPlayButtonElement::defaultEventHandler): (WebCore::MediaControlSeekButtonElement::defaultEventHandler): (WebCore::MediaControlTimelineElement::defaultEventHandler): (WebCore::MediaControlFullscreenButtonElement::defaultEventHandler): * rendering/RenderFrameSet.cpp: (WebCore::RenderFrameSet::userResize): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::scrollToOffset): * rendering/RenderListBox.cpp: (WebCore::RenderListBox::valueChanged): * rendering/RenderMedia.cpp: (WebCore::RenderMedia::forwardEvent): * rendering/RenderObject.cpp: * rendering/RenderSlider.cpp: (WebCore::HTMLSliderThumbElement::defaultEventHandler): * rendering/RenderTextControl.cpp: (WebCore::RenderTextControl::forwardEvent): (WebCore::RenderTextControl::selectionChanged): * rendering/RenderWidget.cpp: * rendering/TextControlInnerElements.cpp: (WebCore::TextControlInnerTextElement::defaultEventHandler): (WebCore::SearchFieldResultsButtonElement::defaultEventHandler): (WebCore::SearchFieldCancelButtonElement::defaultEventHandler): * storage/LocalStorageArea.cpp: (WebCore::LocalStorageArea::dispatchStorageEvent): * storage/SessionStorageArea.cpp: (WebCore::SessionStorageArea::dispatchStorageEvent): * svg/SVGAElement.cpp: (WebCore::SVGAElement::defaultEventHandler): * svg/SVGDocument.cpp: (WebCore::SVGDocument::dispatchZoomEvent): (WebCore::SVGDocument::dispatchScrollEvent): * svg/SVGElement.cpp: (WebCore::SVGElement::parseMappedAttribute): (WebCore::hasLoadListener): (WebCore::SVGElement::sendSVGLoadEventIfPossible): * svg/SVGElementInstance.cpp: (WebCore::SVGElementInstance::on*): (multiple methods) (WebCore::SVGElementInstance::setOn*): (multiple methods) * svg/SVGImageLoader.cpp: (WebCore::SVGImageLoader::dispatchLoadEvent): * svg/SVGSVGElement.cpp: (WebCore::SVGSVGElement::parseMappedAttribute): * svg/SVGScriptElement.cpp: (WebCore::SVGScriptElement::dispatchErrorEvent): * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::dispatchReadyStateChangeEvent): (WebCore::XMLHttpRequest::dispatchAbortEvent): (WebCore::XMLHttpRequest::dispatchErrorEvent): (WebCore::XMLHttpRequest::dispatchLoadEvent): (WebCore::XMLHttpRequest::dispatchLoadStartEvent): (WebCore::XMLHttpRequest::dispatchProgressEvent): * xml/XMLHttpRequestUpload.cpp: (WebCore::XMLHttpRequestUpload::dispatchAbortEvent): (WebCore::XMLHttpRequestUpload::dispatchErrorEvent): (WebCore::XMLHttpRequestUpload::dispatchLoadEvent): (WebCore::XMLHttpRequestUpload::dispatchLoadStartEvent): (WebCore::XMLHttpRequestUpload::dispatchProgressEvent): * xml/XPathResult.cpp: (WebCore::XPathResult::XPathResult): (WebCore::XPathResult::~XPathResult): (WebCore::XPathResult::invalidateIteratorState): Access event names via eventNames() function. 2008-11-04 Cameron Zwarich Reviewed by Mark Rowe. Delete unused forwarding headers. * ForwardingHeaders/kjs/Activation.h: Removed. * ForwardingHeaders/kjs/Register.h: Removed. * ForwardingHeaders/kjs/RegisterID.h: Removed. 2008-11-04 Cameron Zwarich Not reviewed. Fix stupid typo in previous build fix. * bindings/js/JSStorageCustom.cpp: * bindings/scripts/CodeGeneratorJS.pm: * bridge/NP_jsobject.cpp: 2008-11-03 Cameron Zwarich Not reviewed. Fix the build for all non-Mac platforms. * ForwardingHeaders/kjs/PropertyNameArray.h: Removed. * ForwardingHeaders/runtime/PropertyNameArray.h: Copied from ForwardingHeaders/kjs/PropertyNameArray.h. * bindings/js/JSStorageCustom.cpp: * bindings/scripts/CodeGeneratorJS.pm: * bridge/NP_jsobject.cpp: 2008-11-03 Cameron Zwarich Not reviewed. Fix the wxWindows build. * bridge/c/c_instance.cpp: 2008-11-03 Cameron Zwarich Rubber-stamped by Maciej Stachowiak. Move more files into the runtime subdirectory of JavaScriptCore. * ForwardingHeaders/kjs/ArgList.h: Removed. * ForwardingHeaders/kjs/CollectorHeapIterator.h: Removed. * ForwardingHeaders/kjs/ExecState.h: Removed. * ForwardingHeaders/kjs/InitializeThreading.h: Removed. * ForwardingHeaders/kjs/JSGlobalData.h: Removed. * ForwardingHeaders/kjs/JSLock.h: Removed. * ForwardingHeaders/kjs/SymbolTable.h: Removed. * ForwardingHeaders/runtime/ArgList.h: Copied from ForwardingHeaders/kjs/ArgList.h. * ForwardingHeaders/runtime/CollectorHeapIterator.h: Copied from ForwardingHeaders/kjs/CollectorHeapIterator.h. * ForwardingHeaders/runtime/ExecState.h: Copied from ForwardingHeaders/kjs/ExecState.h. * ForwardingHeaders/runtime/InitializeThreading.h: Copied from ForwardingHeaders/kjs/InitializeThreading.h. * ForwardingHeaders/runtime/JSGlobalData.h: Copied from ForwardingHeaders/kjs/JSGlobalData.h. * ForwardingHeaders/runtime/JSLock.h: Copied from ForwardingHeaders/kjs/JSLock.h. * ForwardingHeaders/runtime/SymbolTable.h: Copied from ForwardingHeaders/kjs/SymbolTable.h. * bindings/js/GCController.cpp: * bindings/js/JSCustomPositionCallback.cpp: * bindings/js/JSCustomPositionErrorCallback.cpp: * bindings/js/JSCustomSQLStatementCallback.cpp: * bindings/js/JSCustomSQLStatementErrorCallback.cpp: * bindings/js/JSCustomSQLTransactionCallback.cpp: * bindings/js/JSCustomSQLTransactionErrorCallback.cpp: * bindings/js/JSCustomVoidCallback.cpp: * bindings/js/JSCustomXPathNSResolver.cpp: * bindings/js/JSDOMWindowBase.cpp: * bindings/js/JSEventCustom.cpp: * bindings/js/JSEventListener.cpp: * bindings/js/JSNodeFilterCondition.cpp: * bindings/js/ScheduledAction.cpp: * bindings/js/ScriptController.cpp: * bindings/js/ScriptControllerMac.mm: * bindings/objc/WebScriptObject.mm: * bridge/NP_jsobject.cpp: * bridge/c/c_class.cpp: * bridge/c/c_instance.cpp: * bridge/c/c_runtime.cpp: * bridge/c/c_utility.cpp: * bridge/jni/jni_class.cpp: * bridge/jni/jni_instance.cpp: * bridge/jni/jni_jsobject.mm: * bridge/jni/jni_objc.mm: * bridge/jni/jni_runtime.cpp: * bridge/jni/jni_runtime.h: * bridge/jni/jni_utility.cpp: * bridge/npruntime.cpp: * bridge/objc/objc_instance.mm: * bridge/objc/objc_runtime.mm: * bridge/objc/objc_utility.mm: * bridge/runtime.cpp: * dom/Document.cpp: * dom/Node.cpp: * dom/NodeFilter.cpp: * dom/NodeIterator.cpp: * dom/TreeWalker.cpp: * history/CachedPage.cpp: * inspector/InspectorController.cpp: * inspector/JavaScriptCallFrame.cpp: * inspector/JavaScriptCallFrame.h: * inspector/JavaScriptDebugServer.cpp: * inspector/JavaScriptProfileNode.cpp: * loader/FrameLoader.cpp: * loader/icon/IconDatabase.cpp: * page/Console.cpp: * page/Page.cpp: * page/mac/FrameMac.mm: * plugins/PluginView.cpp: * plugins/gtk/PluginViewGtk.cpp: * plugins/qt/PluginViewQt.cpp: * plugins/win/PluginViewWin.cpp: * storage/Database.cpp: * xml/XMLHttpRequest.cpp: 2008-11-03 Cameron Zwarich Reviewed by Sam Weinig. Remove the forwarding header for FunctionCallProfile, because it was renamed to ProfileNode in r33466. * ForwardingHeaders/kjs/FunctionCallProfile.h: Removed. 2008-11-03 Simon Fraser Reviewed by Dave Hyatt https://bugs.webkit.org/show_bug.cgi?id=22026 When computing the bounds of the transparency layer, we need to map the clipRect through the enclosing transform. Test: fast/layers/opacity-transforms.html * rendering/RenderLayer.cpp: (WebCore::transparencyClipBox): 2008-11-03 Kevin Decker Reviewed by Anders Carlsson. https://bugs.webkit.org/show_bug.cgi?id=22053 Added additional support needed for the NPDrawingModelCoreAnimation drawing model. * bridge/npapi.h: 2008-11-03 Xan Lopez Reviewed by Alp Toker. Update parseDataUrl() function in the libsoup http backend with the one from the curl backend which has recent correctness and crash fixes. * platform/network/soup/ResourceHandleSoup.cpp: (WebCore::parseDataUrl): 2008-11-03 Holger Hans Peter Freyther Reviewed by Alp Toker. https://bugs.webkit.org/show_bug.cgi?id=22041 Fix CURL crashes on the test suite Fix segfault with setDefersLoading(). Do not call into curl when we don't have a CURL handle. It is attempted to defer the loading before the load has been started (no curl handle was allocated yet). If that happens then just remember that. ResourceHandleManager::startJob is already taking care of this and in initResourceHandle the the downloading will be paused if needed. Fixes fast/loader/simultaneous-reloads-assert.html * platform/network/curl/ResourceHandleCurl.cpp: (WebCore::ResourceHandle::setDefersLoading): 2008-11-03 Holger Hans Peter Freyther Reviewed by Alp Toker. https://bugs.webkit.org/show_bug.cgi?id=22041 Fix CURL crashes on the test suite Do not send "no data" to WebCore in parseDataUrl(). Fixes assert on fast/tokenizer/image-empty-crash.html * platform/network/curl/ResourceHandleManager.cpp: (WebCore::parseDataUrl): 2008-11-02 Xan Lopez Reviewed by Holger Freyther. https://bugs.webkit.org/show_bug.cgi?id=22009 HTML5 Video with GStreamer pulls gnome-vfs without using it * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp: Remove gnome-vfs include. 2008-11-01 Adam Barth Reviewed by Sam Weinig. Be sure to check the final URLs of requested resources to make sure we don't get fooled by HTTP redirects. https://bugs.webkit.org/show_bug.cgi?id=21963 Tests: http/tests/security/xss-DENIED-xsl-document-redirect.xml http/tests/security/xss-DENIED-xsl-external-entity-redirect.xml * dom/XMLTokenizerLibxml2.cpp: (WebCore::openFunc): * loader/DocLoader.cpp: (WebCore::DocLoader::canRequest): (WebCore::DocLoader::requestResource): * loader/DocLoader.h: * xml/XSLTProcessor.cpp: (WebCore::docLoaderFunc): 2008-11-01 Alexey Proskuryakov Reviewed by Darin Adler. https://bugs.webkit.org/show_bug.cgi?id=22001 AtomicStringImpl* keys of event listener maps can outlive their strings Test: fast/events/destroyed-atomic-string.html * dom/MessagePort.cpp: (WebCore::MessagePort::addEventListener): (WebCore::MessagePort::removeEventListener): (WebCore::MessagePort::dispatchEvent): * dom/MessagePort.h: * loader/appcache/DOMApplicationCache.cpp: (WebCore::DOMApplicationCache::addEventListener): (WebCore::DOMApplicationCache::removeEventListener): (WebCore::DOMApplicationCache::dispatchEvent): * loader/appcache/DOMApplicationCache.h: * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::addEventListener): (WebCore::XMLHttpRequest::removeEventListener): (WebCore::XMLHttpRequest::dispatchEvent): * xml/XMLHttpRequest.h: * xml/XMLHttpRequestUpload.cpp: (WebCore::XMLHttpRequestUpload::addEventListener): (WebCore::XMLHttpRequestUpload::removeEventListener): (WebCore::XMLHttpRequestUpload::dispatchEvent): * xml/XMLHttpRequestUpload.h: Changed EventListenersMap to use AtomicString as key (instead of AtomicStringImpl*). 2008-10-31 Alexey Proskuryakov Reviewed by Darin Adler. https://bugs.webkit.org/show_bug.cgi?id=21998 Use JSDOMGlobalObject in EventListener-related bindings * dom/MessagePort.idl: Auto-generate bindings for onclose and onmessage. * bindings/scripts/CodeGeneratorJS.pm: Use JSDOMGlobalObject instead of JSDOMWindow in JS bindings for inline event handlers. * bindings/js/JSDOMApplicationCacheCustom.cpp: (WebCore::JSDOMApplicationCache::addEventListener): (WebCore::JSDOMApplicationCache::removeEventListener): * bindings/js/JSEventTargetNodeCustom.cpp: (WebCore::JSEventTargetNode::addEventListener): (WebCore::JSEventTargetNode::removeEventListener): * bindings/js/JSMessagePortCustom.cpp: (WebCore::JSMessagePort::removeEventListener): * bindings/js/JSSVGElementInstanceCustom.cpp: (WebCore::JSSVGElementInstance::addEventListener): (WebCore::JSSVGElementInstance::removeEventListener): * bindings/js/JSXMLHttpRequestCustom.cpp: (WebCore::JSXMLHttpRequest::addEventListener): (WebCore::JSXMLHttpRequest::removeEventListener): * bindings/js/JSXMLHttpRequestUploadCustom.cpp: (WebCore::JSXMLHttpRequestUpload::addEventListener): (WebCore::JSXMLHttpRequestUpload::removeEventListener): Use ScriptExecutionContext and JSDOMGlobalObject in bindings. * dom/EventTarget.h: * dom/EventTargetNode.cpp: (WebCore::EventTargetNode::scriptExecutionContext): * dom/EventTargetNode.h: * dom/MessagePort.cpp: * dom/MessagePort.h: (WebCore::MessagePort::scriptExecutionContext): * loader/appcache/DOMApplicationCache.cpp: (WebCore::DOMApplicationCache::scriptExecutionContext): * loader/appcache/DOMApplicationCache.h: * svg/SVGElementInstance.cpp: (WebCore::SVGElementInstance::scriptExecutionContext): * svg/SVGElementInstance.h: * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::scriptExecutionContext): * xml/XMLHttpRequest.h: * xml/XMLHttpRequestUpload.cpp: (WebCore::XMLHttpRequestUpload::scriptExecutionContext): * xml/XMLHttpRequestUpload.h: Remove associatedFrame() method, and provide scriptExecutionContext() where it wasn't available yet. 2008-10-31 Cameron Zwarich Rubber-stamped by Geoff Garen. Rename SourceRange.h to SourceCode.h. * ForwardingHeaders/kjs/SourceCode.h: Copied from ForwardingHeaders/kjs/SourceRange.h. * ForwardingHeaders/kjs/SourceRange.h: Removed. * bindings/js/StringSourceProvider.h: * bridge/NP_jsobject.cpp: 2008-10-31 Cameron Zwarich Reviewed by Darin Adler. Bug 22019: Move JSC::Interpreter::shouldPrintExceptions() to WebCore::Console * WebCore.base.exp: * page/Console.cpp: (WebCore::printToStandardOut): (WebCore::Console::shouldPrintExceptions): (WebCore::Console::setShouldPrintExceptions): * page/Console.h: 2008-10-31 Dan Bernstein Reviewed by John Sullivan. - WebCore part of Add WebView SPI for disabling document.cookie * dom/Document.cpp: (WebCore::Document::cookie): Added checking if cookies are disabled. (WebCore::Document::setCookie): Ditto. * page/Navigator.cpp: (WebCore::Navigator::cookieEnabled): Ditto. * page/Page.cpp: (WebCore::Page::Page): Initialize m_cookieEnabled to true. * page/Page.h: (WebCore::Page::cookieEnabled): Added. (WebCore::Page::setCookieEnabled): Added. 2008-10-31 Adele Peterson Reviewed by Darin Adler. WebCore Windows part of fix for FILE CONTROL: multi-file upload. https://bugs.webkit.org/show_bug.cgi?id=22008 * platform/FileChooser.cpp: (WebCore::FileChooser::chooseIcon): Rename newIconForFile and newIconForFiles to createIconForFile and createIconForFiles. * platform/graphics/Icon.h: ditto. * platform/graphics/gtk/IconGtk.cpp: (WebCore::Icon::createIconForFile): ditto. (WebCore::Icon::createIconForFiles): ditto. * platform/graphics/mac/IconMac.mm: (WebCore::Icon::createIconForFile): ditto. (WebCore::Icon::createIconForFiles): ditto. * platform/graphics/qt/IconQt.cpp: (WebCore::Icon::createIconForFile): ditto. (WebCore::Icon::createIconForFiles): ditto. * platform/wx/TemporaryLinkStubs.cpp: (Icon::createIconForFile): ditto. (Icon::createIconForFiles): ditto. * platform/graphics/win/IconWin.cpp: (WebCore::Icon::createIconForFile): ditto. (WebCore::Icon::createIconForFiles): Add creation of an icon for multiple files. * rendering/RenderThemeWin.cpp: (WebCore::RenderThemeWin::paintSearchFieldResultsDecoration): Improve icon creation code to match new code in Icon::createIconForFiles 2008-10-31 Timothy Hatcher Add manual tests that check breakpoints on a blockless body of "for" loops. https://bugs.webkit.org/show_bug.cgi?id=22004 Reviewed by Darin Adler. * manual-tests/inspector/debugger-pause-on-for-in-statements.html: Added. * manual-tests/inspector/debugger-pause-on-for-statements.html: Added. 2008-10-31 Darin Adler - fix build * platform/win/WCDataObject.cpp: Added missing include of "config.h". 2008-10-30 Alexey Proskuryakov Reviewed by Darin Adler. https://bugs.webkit.org/show_bug.cgi?id=21970 Make MessagePort event dispatch work in workers * bindings/js/JSDOMGlobalObject.cpp: (WebCore::JSDOMGlobalObject::JSDOMGlobalObjectData::JSDOMGlobalObjectData): (WebCore::JSDOMGlobalObject::~JSDOMGlobalObject): (WebCore::JSDOMGlobalObject::findJSEventListener): (WebCore::JSDOMGlobalObject::findOrCreateJSEventListener): (WebCore::JSDOMGlobalObject::findJSUnprotectedEventListener): (WebCore::JSDOMGlobalObject::findOrCreateJSUnprotectedEventListener): (WebCore::JSDOMGlobalObject::jsEventListeners): (WebCore::JSDOMGlobalObject::jsInlineEventListeners): (WebCore::JSDOMGlobalObject::jsUnprotectedEventListeners): (WebCore::JSDOMGlobalObject::jsUnprotectedInlineEventListeners): (WebCore::JSDOMGlobalObject::setCurrentEvent): (WebCore::JSDOMGlobalObject::currentEvent): (WebCore::toJSDOMGlobalObject): * bindings/js/JSDOMGlobalObject.h: * bindings/js/JSDOMWindowBase.cpp: (WebCore::JSDOMWindowBase::JSDOMWindowBaseData::JSDOMWindowBaseData): (WebCore::JSDOMWindowBase::~JSDOMWindowBase): (WebCore::JSDOMWindowBase::clearHelperObjectProperties): * bindings/js/JSDOMWindowBase.h: Moved event listener tracking from JSDOMWindow to JSDOMGlobalObject. * bindings/js/JSEventListener.cpp: (WebCore::JSAbstractEventListener::handleEvent): (WebCore::JSUnprotectedEventListener::JSUnprotectedEventListener): (WebCore::JSUnprotectedEventListener::~JSUnprotectedEventListener): (WebCore::JSUnprotectedEventListener::globalObject): (WebCore::JSUnprotectedEventListener::clearGlobalObject): (WebCore::JSEventListener::JSEventListener): (WebCore::JSEventListener::~JSEventListener): (WebCore::JSEventListener::globalObject): (WebCore::JSEventListener::clearGlobalObject): (WebCore::JSLazyEventListener::JSLazyEventListener): (WebCore::JSLazyEventListener::parseCode): * bindings/js/JSEventListener.h: (WebCore::JSUnprotectedEventListener::create): (WebCore::JSEventListener::create): (WebCore::JSLazyEventListener::create): Changed to use JSDOMGlobalObject and ScriptExecutionContext. * bindings/js/JSMessagePortCustom.cpp: (WebCore::JSMessagePort::startConversation): (WebCore::JSMessagePort::addEventListener): (WebCore::JSMessagePort::removeEventListener): (WebCore::JSMessagePort::setOnmessage): (WebCore::JSMessagePort::setOnclose): Updated bindings to work with JSDOMGlobalObject. Next step is to make code generator emit such code, and stop using a custom implementation for JSMessagePort inline event handler getters and setters. * dom/Document.cpp: (WebCore::Document::virtualURL): * dom/Document.h: * dom/ScriptExecutionContext.h: Expose url() method on ScriptExecutionContext (necessary for compiling scripts in JSLazyEventListener). 2008-10-31 Cameron Zwarich Not reviewed. Speculative wxWindows build fix. * webcore-base.bkl: 2008-10-30 Mark Rowe Reviewed by Jon Homeycutt. Explicitly default to building for only the native architecture in debug and release builds. * Configurations/DebugRelease.xcconfig: 2008-10-30 Cameron Zwarich Rubber-stamped by Sam Weinig. Create a debugger directory in JavaScriptCore and move the relevant files to it. * ForwardingHeaders/debugger: Added. * ForwardingHeaders/debugger/Debugger.h: Copied from ForwardingHeaders/kjs/debugger.h. * ForwardingHeaders/debugger/DebuggerCallFrame.h: Copied from ForwardingHeaders/kjs/DebuggerCallFrame.h. * ForwardingHeaders/kjs/DebuggerCallFrame.h: Removed. * ForwardingHeaders/kjs/debugger.h: Removed. * WebCore.pro: * bindings/js/ScriptController.cpp: * inspector/JavaScriptCallFrame.cpp: * inspector/JavaScriptCallFrame.h: * inspector/JavaScriptDebugServer.cpp: * inspector/JavaScriptDebugServer.h: 2008-10-30 Tony Chang Fix 2 Windows theme bugs: 1) Checkboxes marked readonly were rendered incorrectly 2) If a button has focus and is pressed, it was rendered as focused rather than pressed. https://bugs.webkit.org/show_bug.cgi?id=21859 Reviewed by Dave Hyatt. * rendering/RenderThemeWin.cpp: (WebCore::RenderThemeWin::determineState): (WebCore::RenderThemeWin::determineButtonState): 2008-10-30 Benjamin K. Stuhl gcc 4.3.3/linux-x86 generates "suggest parentheses around && within ||" warnings; add some parentheses to disambiguate things. No functional changes, so no tests. https://bugs.webkit.org/show_bug.cgi?id=21973 Add parentheses to clean up some gcc warnings Reviewed by Dan Bernstein. * platform/graphics/Font.h: (WebCore::Font::treatAsZeroWidthSpace): 2008-10-30 Aaron Boodman Added an explicit dependency on HashMap.h. It was getting pulled in via in the case of JSC, causing errors for the Chromium port. Reviewed by Darin Adler. * platform/text/PlatformString.h: 2008-10-30 Greg Bolsinga Reviewed by Sam Weinig https://bugs.webkit.org/show_bug.cgi?id=21967 For some platforms the GeolocationService must be suspended and resumed. * page/Geolocation.cpp: (WebCore::Geolocation::clearWatch): now uses Geolocation::hasListeners() (WebCore::Geolocation::suspend): calls GeolocationService::suspend() if there are listeners (WebCore::Geolocation::resume): calls GeolocationService::resume() if there are listeners (WebCore::Geolocation::geolocationServicePositionChanged): now uses Geolocation::hasListeners() * page/Geolocation.h: (WebCore::Geolocation::hasListeners): Indicates of the Geolocation has interested GeolocationService listeners * platform/GeolocationService.h: (WebCore::GeolocationService::suspend): empty implementation (WebCore::GeolocationService::resume): empty implementation 2008-10-30 Greg Bolsinga Reviewed by Sam Weinig https://bugs.webkit.org/show_bug.cgi?id=21966 The Geolocation spec was updated on 10/27/2008. This brings WebCore up to date. http://dev.w3.org/geo/api/spec-source.html * page/Geolocation.cpp: (WebCore::Geolocation::GeoNotifier::GeoNotifier): PositionOptions' timeout now unsigned * page/Geoposition.cpp: velocity is now called speed (WebCore::Geoposition::toString): * page/Geoposition.h: velocity is now called speed (WebCore::Geoposition::create): (WebCore::Geoposition::speed): (WebCore::Geoposition::Geoposition): * page/Geoposition.idl: velocity is now called speed * page/PositionOptions.h: timeout is now unsigned (WebCore::PositionOptions::create): (WebCore::PositionOptions::timeout): (WebCore::PositionOptions::setTimeout): (WebCore::PositionOptions::PositionOptions): * page/PositionOptions.idl: timeout is now unsigned long 2008-10-30 Justin Garcia Also handle preserved newlines. * editing/BreakBlockquoteCommand.cpp: (WebCore::BreakBlockquoteCommand::doApply): 2008-10-30 Justin Garcia Reviewed by Beth Dakin. Hitting return at the end of a quoted line creates an extraneous quoted line * editing/BreakBlockquoteCommand.cpp: (WebCore::BreakBlockquoteCommand::doApply): Don't store the endingSelection() in selection, just call endingSelection() in the few places it's needed. This function is cheap since it just returns a reference to a Selection instead of creating one. Don't store an affinity. In the one place that it was used, isLastVisiblePositionInNode(VisiblePosition(pos, affinity), topBlockquote), we now use visiblePos (in order to avoid VisiblePosition creation). Set pos after we delete the current selection (if there is one), and be consistent about what we set pos to. Before, we upstream()ed it if there was a selection to delete and left it alone otherwise. In fact... ...we need to use downstream() for pos so that when a caret is at the boundary between two nodes, pos is in the first node that we want to move. This fixes the bug, since it lets code that checks for the case where the caret is between text and a br work correctly. 2008-10-30 Yael Aharon Reviewed by Darin Adler. Fix the Qt build. https://bugs.webkit.org/show_bug.cgi?id=21969 * inspector/front-end/WebKit.qrc: * platform/graphics/qt/ImageBufferQt.cpp: (WebCore::ImageBufferData::ImageBufferData): (WebCore::ImageBuffer::ImageBuffer): (WebCore::ImageBuffer::context): (WebCore::ImageBuffer::image): (WebCore::ImageBuffer::toDataURL): 2008-10-30 Justin Garcia Reviewed by Darin Adler. More preparation for: Hitting return at the end of a quoted line creates an extraneous quoted line * editing/BreakBlockquoteCommand.cpp: (WebCore::BreakBlockquoteCommand::doApply): Added comments. Don't need to use newStartNode. If the startNode needs to change, change it. Afterwords, check to make sure that it hasn't left topBlockquote. This is slightly stricter than before, where we just made sure that it still had a topBlockquote. This doesn't really fix a bug, since we can't really get into a situation where we move to a different topBlockquote, but it simplifies the code. 2008-10-30 Dirk Schulze Reviewed by Alp Toker. https://bugs.webkit.org/show_bug.cgi?id=21883 [CAIRO] globalAlpha has to be stored and restored Cairo's globalAlpha has to be stored and reloaded on calling save() and restore(). We use the power of GraphicsContextState for this. * platform/graphics/GraphicsContextPrivate.h: (WebCore::GraphicsContextState::GraphicsContextState): * platform/graphics/cairo/GraphicsContextCairo.cpp: (WebCore::GraphicsContext::fillPath): (WebCore::GraphicsContext::strokePath): (WebCore::GraphicsContext::setAlpha): (WebCore::GraphicsContext::getAlpha): * platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h: (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate): 2008-10-29 Alexey Proskuryakov Reviewed by Maciej Stachowiak. Rename "attachedToEventTargetNode" to "isInline". Inline (onXXX) attributes are used not just with event target nodes, but also with Window, XMLHttpRequest, MessagePort et al. Also renamed createHTMLEventHandler() (which was a leftover from earlier isHTMLEvent -> attachedToEventTargetNode rename made for SVG) to createInlineEventListener(). And also renamed EventTargetNode, Document and Window "eventListenerForType" methods to "inlineEventListenerForType", as they work with inline listeners. * bindings/js/JSDOMApplicationCacheCustom.cpp: (WebCore::JSDOMApplicationCache::addEventListener): (WebCore::JSDOMApplicationCache::removeEventListener): * bindings/js/JSMessagePortCustom.cpp: (WebCore::JSMessagePort::setOnmessage): (WebCore::JSMessagePort::setOnclose): * bindings/js/JSXMLHttpRequestCustom.cpp: (WebCore::JSXMLHttpRequest::addEventListener): (WebCore::JSXMLHttpRequest::removeEventListener): * bindings/js/JSXMLHttpRequestUploadCustom.cpp: (WebCore::JSXMLHttpRequestUpload::addEventListener): (WebCore::JSXMLHttpRequestUpload::removeEventListener): Pass a correct value for this argument - callers used to be confused, because they didn't consider themselves event target nodes. This doesn't affect behavior however, as the only difference between inline and non-inline event handlers is that the former treat "return false" as "event.preventDefault()", which is not important to any of these objects. * bindings/js/JSEventListener.cpp: (WebCore::JSLazyEventListener::parseCode): Assert that isInline is true instead of checking its value, as the constructor of this class always sets it to true. * bindings/js/JSDOMWindowBase.cpp: (WebCore::JSDOMWindowBase::~JSDOMWindowBase): (WebCore::JSDOMWindowBase::findJSEventListener): (WebCore::JSDOMWindowBase::findOrCreateJSEventListener): (WebCore::JSDOMWindowBase::findJSUnprotectedEventListener): (WebCore::JSDOMWindowBase::findOrCreateJSUnprotectedEventListener): (WebCore::JSDOMWindowBase::jsInlineEventListeners): (WebCore::JSDOMWindowBase::jsUnprotectedInlineEventListeners): * bindings/js/JSDOMWindowBase.h: * bindings/js/JSEventListener.cpp: (WebCore::JSAbstractEventListener::handleEvent): (WebCore::JSAbstractEventListener::isInline): (WebCore::JSUnprotectedEventListener::JSUnprotectedEventListener): (WebCore::JSUnprotectedEventListener::~JSUnprotectedEventListener): (WebCore::JSEventListener::JSEventListener): (WebCore::JSEventListener::~JSEventListener): (WebCore::JSLazyEventListener::parseCode): * bindings/js/JSEventListener.h: (WebCore::JSAbstractEventListener::JSAbstractEventListener): (WebCore::JSUnprotectedEventListener::create): (WebCore::JSEventListener::create): * bindings/js/ScriptController.cpp: (WebCore::ScriptController::createInlineEventHandler): * bindings/js/ScriptController.h: * dom/Document.cpp: (WebCore::Document::setWindowInlineEventListenerForType): (WebCore::Document::windowInlineEventListenerForType): (WebCore::Document::removeWindowInlineEventListenerForType): (WebCore::Document::createEventListener): (WebCore::Document::setWindowInlineEventListenerForTypeAndAttribute): * dom/Document.h: * dom/EventListener.h: (WebCore::EventListener::isInline): * dom/EventTargetNode.cpp: (WebCore::EventTargetNode::removeInlineEventListenerForType): (WebCore::EventTargetNode::setInlineEventListenerForType): (WebCore::EventTargetNode::setInlineEventListenerForTypeAndAttribute): (WebCore::EventTargetNode::inlineEventListenerForType): (WebCore::EventTargetNode::on*): (many methods) (WebCore::EventTargetNode::setOn*): (many methods) * dom/EventTargetNode.h: * editing/ReplaceSelectionCommand.cpp: (WebCore::ReplacementFragment::ReplacementFragment): * html/HTMLBodyElement.cpp: (WebCore::HTMLBodyElement::parseMappedAttribute): * html/HTMLButtonElement.cpp: (WebCore::HTMLButtonElement::parseMappedAttribute): * html/HTMLElement.cpp: (WebCore::HTMLElement::parseMappedAttribute): * html/HTMLFormElement.cpp: (WebCore::HTMLFormElement::parseMappedAttribute): * html/HTMLFrameElementBase.cpp: (WebCore::HTMLFrameElementBase::parseMappedAttribute): * html/HTMLFrameSetElement.cpp: (WebCore::HTMLFrameSetElement::parseMappedAttribute): * html/HTMLImageElement.cpp: (WebCore::HTMLImageElement::parseMappedAttribute): * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::parseMappedAttribute): * html/HTMLObjectElement.cpp: (WebCore::HTMLObjectElement::parseMappedAttribute): * html/HTMLScriptElement.cpp: (WebCore::HTMLScriptElement::parseMappedAttribute): * html/HTMLSelectElement.cpp: (WebCore::HTMLSelectElement::parseMappedAttribute): * html/HTMLTextAreaElement.cpp: (WebCore::HTMLTextAreaElement::parseMappedAttribute): * page/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::mouseButtonListener): * page/DOMWindow.cpp: (WebCore::DOMWindow::setInlineEventListenerForType): (WebCore::DOMWindow::inlineEventListenerForType): (WebCore::DOMWindow::on*): (many methods) (WebCore::DOMWindow::setOn*): (many methods) * page/DOMWindow.h: * svg/SVGElement.cpp: (WebCore::SVGElement::parseMappedAttribute): * svg/SVGElementInstance.cpp: (WebCore::SVGElementInstance::on*): (many methods) (WebCore::SVGElementInstance::setOn*): (many methods) * svg/SVGSVGElement.cpp: (WebCore::SVGSVGElement::parseMappedAttribute): Rename things, as described above. 2008-10-29 Gustavo Noronha Silva Reviewed and slightly changed by Holger Freyther. Added all the files that need to be installed for the Inspector to work. * GNUmakefile.am: Invoke the shell to get the files. 2008-10-29 Andrew Scherkus Reviewed by Darin Adler Add MediaPlayerPrivateChromium to MediaPlayer https://bugs.webkit.org/show_bug.cgi?id=21930 * platform/graphics/MediaPlayer.cpp: 2008-10-29 Justin Garcia Reviewed by Darin Adler. Some preparation for: Hitting return at the end of a quoted line creates an extraneous quoted line Added an early return to avoid a level of if-nesting. No other changes. We probably don't need to rebalance whitespace before the early return but for now don't risk any change in behavior I'll revisit that later. * editing/BreakBlockquoteCommand.cpp: (WebCore::BreakBlockquoteCommand::doApply): 2008-10-29 Kevin Ollivier wx build fixes after addition of runtime and ImageBuffer changes. * platform/graphics/wx/ImageBufferData.h: Added. * platform/graphics/wx/ImageBufferWx.cpp: (WebCore::ImageBufferData::ImageBufferData): (WebCore::ImageBuffer::ImageBuffer): (WebCore::ImageBuffer::context): * webcore-base.bkl: 2008-10-29 Brett Wilson Reviewed by Darin Adler https://bugs.webkit.org/attachment.cgi?id=24745 Allow Skia implementations to get text style changed notifications. * platform/graphics/GraphicsContext.cpp: 2008-10-29 Timothy Hatcher Add a manual test that checks breakpoints on a blockless body of an "else" statement. https://bugs.webkit.org/show_bug.cgi?id=21944 Reviewed by Maciej Stachowiak. * manual-tests/inspector/debugger-pause-on-else-statements.html: Added. 2008-10-29 Alexey Proskuryakov Reviewed by Darin Adler. https://bugs.webkit.org/show_bug.cgi?id=21921 MessagePort messages are dispatched to documents that are not fully active Covered by corrected fast/events/message-port-inactive-document.html * bindings/js/JSEventListener.cpp: (WebCore::JSAbstractEventListener::handleEvent): Don't dispatch messages to contexts that are not fully active. 2008-10-29 Alexey Proskuryakov Reviewed by Sam Weinig. https://bugs.webkit.org/show_bug.cgi?id=21922 Expose MessagePort global constructor Covered by existing dumper tests. * dom/MessagePort.idl: * page/DOMWindow.idl: 2008-10-29 Alexey Proskuryakov Reviewed by Darin Adler. https://bugs.webkit.org/show_bug.cgi?id=21924 HashTable internal index is not always deleted * bindings/js/JSDOMBinding.cpp: (WebCore::DOMObjectHashTableMap::~DOMObjectHashTableMap): Call deleteTable for HashTables that are being deleted. 2008-10-28 Alexey Proskuryakov Reviewed by Darin Adler. https://bugs.webkit.org/show_bug.cgi?id=21923 Create an abstraction for script execution context * GNUmakefile.am: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * WebCoreSources.bkl: Added ScriptExecutionContext.{h,cpp}. * bindings/js/JSAudioConstructor.cpp: (WebCore::JSAudioConstructor::JSAudioConstructor): * bindings/js/JSAudioConstructor.h: * bindings/js/JSImageConstructor.cpp: (WebCore::JSImageConstructor::JSImageConstructor): * bindings/js/JSImageConstructor.h: * bindings/js/JSOptionConstructor.cpp: (WebCore::JSOptionConstructor::JSOptionConstructor): * bindings/js/JSOptionConstructor.h: * bindings/js/JSXMLHttpRequestConstructor.cpp: (WebCore::JSXMLHttpRequestConstructor::JSXMLHttpRequestConstructor): * bindings/js/JSXMLHttpRequestConstructor.h: Pass ScriptExecutionContext instead of Document to make getDOMConstructor() happy. Since these objects can only work within documents now, it is immediately converted back to Document. * bindings/js/JSMessageChannelConstructor.cpp: (WebCore::JSMessageChannelConstructor::JSMessageChannelConstructor): (WebCore::JSMessageChannelConstructor::construct): * bindings/js/JSMessageChannelConstructor.h: (WebCore::JSMessageChannelConstructor::scriptExecutionContext): MessageChannel needs to be supported in workers right away, so the constructor operates with it directly. * dom/ActiveDOMObject.cpp: (WebCore::ActiveDOMObject::ActiveDOMObject): (WebCore::ActiveDOMObject::~ActiveDOMObject): (WebCore::ActiveDOMObject::contextDestroyed): * dom/ActiveDOMObject.h: (WebCore::ActiveDOMObject::scriptExecutionContext): * bindings/js/JSDOMBinding.cpp: (WebCore::markActiveObjectsForContext): (WebCore::markCrossHeapDependentObjectsForContext): Use ScriptExecutionContext instead of Document, now that ActiveDOMObject and MessagePort tracking is handled by ScriptExecutionContext. * bindings/js/JSDOMBinding.h: (WebCore::getDOMPrototype): Moved to JSDOMGlobalObject. * bindings/js/JSDOMGlobalObject.h: (WebCore::getDOMConstructor): Moved to this file, as constructors live in JSDOMGlobalObject. Also, the two-argument version that used to be in JSDOMWindowBase.cpp need to be accessible to worker context implementation. (WebCore::scriptExecutionContext): Added a pure virtual method to access ScriptExecutionContext, implemented by subclasses. * bindings/js/JSDOMWindowBase.h: * bindings/js/JSDOMWindowBase.cpp: (WebCore::JSDOMWindowBase::scriptExecutionContext): Implement by returning the associated document. Note that this method currently gives bogus results after navigation - DOMWindow Frame reference is not zeroed out, so we get a document that is currently in the frame, not the one associated with this window. * bindings/js/JSDedicatedWorkerConstructor.cpp: Removed unnecessary include of DOMWindow.h. * bindings/js/JSDocumentCustom.cpp: (WebCore::JSDocument::mark): Call markActiveObjectsForContext() by its new name. * dom/DedicatedWorker.cpp: (WebCore::DedicatedWorker::DedicatedWorker): (WebCore::DedicatedWorker::document): * dom/DedicatedWorker.h: * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::document): * xml/XMLHttpRequest.h: Added a document() function that upcasts ScriptExecutionContext, as these objects only work within documents currently (at least for XMLHttpRequest, this will change soon though). * dom/Document.cpp: (WebCore::Document::Document): (WebCore::Document::~Document): Moved active object and MessagePort tracking up to ScriptExecutionContext, to share code with workers. * dom/Document.h: (WebCore::Document::isDocument): (WebCore::Document::refScriptExecutionContext): (WebCore::Document::derefScriptExecutionContext): Inherit from ScriptExecutionContext. * dom/MessageChannel.cpp: (WebCore::MessageChannel::MessageChannel): * dom/MessageChannel.h: (WebCore::MessageChannel::create): Use ScriptExecutionContext instead of Document. * dom/MessagePort.cpp: (WebCore::CloseMessagePortTimer::CloseMessagePortTimer): Make m_port a RefPtr, because MessagePort doesn't ref() itself when posting this event any more (this is a fix for an unrelated issue that was causing random crashes in layout tests). (WebCore::MessagePort::MessagePort): (WebCore::MessagePort::~MessagePort): (WebCore::MessagePort::associatedFrame): (WebCore::MessagePort::clone): (WebCore::MessagePort::postMessage): (WebCore::MessagePort::startConversation): (WebCore::MessagePort::start): (WebCore::MessagePort::contextDestroyed): (WebCore::MessagePort::dispatchMessages): * dom/MessagePort.h: (WebCore::MessagePort::create): (WebCore::MessagePort::scriptExecutionContext): Use ScriptExecutionContext instead of Document. This is a step toward making MessagePort work in worker contexts - we need to also make some its method thread safe for cross-thread messaging, and make event dispatching thread safe. * dom/ScriptExecutionContext.cpp: Added. * dom/ScriptExecutionContext.h: Added. ActiveDOMObject and MessagePort tracking is moved from Document. It is debatable whether ScriptExecutionContext should be a parent of Document or DOMWindow, but as I'm just moving Document code, and it is Document that is the main context object in our implementation currently. Changing ScriptExecutionContext to be a parent of DOMWindow causes a number of bugs that seem non-trivial to fix, and isn't really a part of this task. 2008-10-28 Alp Toker List newly-added ImageBufferData.h in build system. * GNUmakefile.am: 2008-10-28 Alp Toker Reviewed by Cameron Zwarich. De-list unused WebCore ForwardingHeaders to fix the dist target. * GNUmakefile.am: 2008-10-28 Cameron Zwarich Not reviewed. Attempt to fix the Windows build by generating Forwardingheaders for the runtime directory in JavaScriptCore. * WebCore.vcproj/WebCore.vcproj: 2008-10-28 Justin Garcia Reviewed by Darin Adler. REGRESSION: Spell checker doesn't clear spelling/grammar marker after error is marked as Ignored * editing/Editor.cpp: (WebCore::Editor::ignoreSpelling): Remove misspelling markers from the word. (WebCore::Editor::learnSpelling): Added a FIXME about , which will probably require a change more complicated than just marking the learned word as misspelled. I'll address it with a separate patch. * editing/EditorCommand.cpp: (WebCore::executeIgnoreSpelling): Added. (WebCore::CommandEntry::): Added an entry for IgnoreSpelling. 2008-10-28 Cameron Zwarich Reviewed by Mark Rowe. Move ForwardingHeaders to their correct location after the creation of the runtime directory in JavaScriptCore. * ForwardingHeaders/kjs/ArrayPrototype.h: Removed. * ForwardingHeaders/kjs/BooleanObject.h: Removed. * ForwardingHeaders/kjs/CallData.h: Removed. * ForwardingHeaders/kjs/ConstructData.h: Removed. * ForwardingHeaders/kjs/DateInstance.h: Removed. * ForwardingHeaders/kjs/Error.h: Removed. * ForwardingHeaders/kjs/FunctionConstructor.h: Removed. * ForwardingHeaders/kjs/FunctionPrototype.h: Removed. * ForwardingHeaders/kjs/InternalFunction.h: Removed. * ForwardingHeaders/kjs/JSArray.h: Removed. * ForwardingHeaders/kjs/JSFunction.h: Removed. * ForwardingHeaders/kjs/JSGlobalObject.h: Removed. * ForwardingHeaders/kjs/JSNumberCell.h: Removed. * ForwardingHeaders/kjs/JSObject.h: Removed. * ForwardingHeaders/kjs/JSString.h: Removed. * ForwardingHeaders/kjs/JSValue.h: Removed. * ForwardingHeaders/kjs/ObjectPrototype.h: Removed. * ForwardingHeaders/kjs/PropertyMap.h: Removed. * ForwardingHeaders/kjs/PrototypeFunction.h: Removed. * ForwardingHeaders/kjs/StringObject.h: Removed. * ForwardingHeaders/kjs/StringObjectThatMasqueradesAsUndefined.h: Removed. * ForwardingHeaders/kjs/StringPrototype.h: Removed. * ForwardingHeaders/kjs/StructureID.h: Removed. * ForwardingHeaders/runtime: Added. * ForwardingHeaders/runtime/ArrayPrototype.h: Copied from ForwardingHeaders/kjs/ArrayPrototype.h. * ForwardingHeaders/runtime/BooleanObject.h: Copied from ForwardingHeaders/kjs/BooleanObject.h. * ForwardingHeaders/runtime/CallData.h: Copied from ForwardingHeaders/kjs/CallData.h. * ForwardingHeaders/runtime/ConstructData.h: Copied from ForwardingHeaders/kjs/ConstructData.h. * ForwardingHeaders/runtime/DateInstance.h: Copied from ForwardingHeaders/kjs/DateInstance.h. * ForwardingHeaders/runtime/Error.h: Copied from ForwardingHeaders/kjs/Error.h. * ForwardingHeaders/runtime/FunctionConstructor.h: Copied from ForwardingHeaders/kjs/FunctionConstructor.h. * ForwardingHeaders/runtime/FunctionPrototype.h: Copied from ForwardingHeaders/kjs/FunctionPrototype.h. * ForwardingHeaders/runtime/InternalFunction.h: Copied from ForwardingHeaders/kjs/InternalFunction.h. * ForwardingHeaders/runtime/JSArray.h: Copied from ForwardingHeaders/kjs/JSArray.h. * ForwardingHeaders/runtime/JSFunction.h: Copied from ForwardingHeaders/kjs/JSFunction.h. * ForwardingHeaders/runtime/JSGlobalObject.h: Copied from ForwardingHeaders/kjs/JSGlobalObject.h. * ForwardingHeaders/runtime/JSNumberCell.h: Copied from ForwardingHeaders/kjs/JSNumberCell.h. * ForwardingHeaders/runtime/JSObject.h: Copied from ForwardingHeaders/kjs/JSObject.h. * ForwardingHeaders/runtime/JSString.h: Copied from ForwardingHeaders/kjs/JSString.h. * ForwardingHeaders/runtime/JSValue.h: Copied from ForwardingHeaders/kjs/JSValue.h. * ForwardingHeaders/runtime/ObjectPrototype.h: Copied from ForwardingHeaders/kjs/ObjectPrototype.h. * ForwardingHeaders/runtime/PropertyMap.h: Copied from ForwardingHeaders/kjs/PropertyMap.h. * ForwardingHeaders/runtime/PrototypeFunction.h: Copied from ForwardingHeaders/kjs/PrototypeFunction.h. * ForwardingHeaders/runtime/StringObject.h: Copied from ForwardingHeaders/kjs/StringObject.h. * ForwardingHeaders/runtime/StringObjectThatMasqueradesAsUndefined.h: Copied from ForwardingHeaders/kjs/StringObjectThatMasqueradesAsUndefined.h. * ForwardingHeaders/runtime/StringPrototype.h: Copied from ForwardingHeaders/kjs/StringPrototype.h. * ForwardingHeaders/runtime/StructureID.h: Copied from ForwardingHeaders/kjs/StructureID.h. * bindings/js/JSCSSStyleDeclarationCustom.cpp: * bindings/js/JSCanvasRenderingContext2DCustom.cpp: * bindings/js/JSClipboardCustom.cpp: * bindings/js/JSConsoleCustom.cpp: * bindings/js/JSCustomPositionCallback.h: * bindings/js/JSCustomPositionErrorCallback.h: * bindings/js/JSCustomSQLStatementCallback.h: * bindings/js/JSCustomSQLStatementErrorCallback.h: * bindings/js/JSCustomSQLTransactionErrorCallback.h: * bindings/js/JSCustomVoidCallback.h: * bindings/js/JSCustomXPathNSResolver.h: * bindings/js/JSDOMBinding.cpp: * bindings/js/JSDOMBinding.h: * bindings/js/JSDOMGlobalObject.h: * bindings/js/JSDOMWindowBase.cpp: * bindings/js/JSDOMWindowCustom.cpp: * bindings/js/JSDOMWindowShell.cpp: * bindings/js/JSDatabaseCustom.cpp: * bindings/js/JSEventListener.cpp: * bindings/js/JSEventTarget.h: * bindings/js/JSHTMLDocumentCustom.cpp: * bindings/js/JSHistoryCustom.cpp: * bindings/js/JSInspectedObjectWrapper.cpp: * bindings/js/JSJavaScriptCallFrameCustom.cpp: * bindings/js/JSLocationCustom.cpp: * bindings/js/JSNodeFilterCondition.h: * bindings/js/JSQuarantinedObjectWrapper.cpp: * bindings/js/JSQuarantinedObjectWrapper.h: * bindings/js/JSXMLHttpRequestCustom.cpp: * bindings/js/JSXMLHttpRequestUploadCustom.cpp: * bindings/objc/WebScriptObject.mm: * bindings/objc/WebScriptObjectPrivate.h: * bindings/scripts/CodeGeneratorJS.pm: * bridge/NP_jsobject.cpp: * bridge/c/c_instance.cpp: * bridge/c/c_utility.cpp: * bridge/c/c_utility.h: * bridge/jni/jni_instance.cpp: * bridge/jni/jni_jsobject.h: * bridge/jni/jni_jsobject.mm: * bridge/jni/jni_runtime.cpp: * bridge/jni/jni_utility.cpp: * bridge/jni/jni_utility.h: * bridge/objc/objc_instance.mm: * bridge/objc/objc_runtime.h: * bridge/objc/objc_runtime.mm: * bridge/objc/objc_utility.h: * bridge/objc/objc_utility.mm: * bridge/runtime.h: * bridge/runtime_array.cpp: * bridge/runtime_array.h: * bridge/runtime_method.cpp: * bridge/runtime_method.h: * bridge/runtime_object.cpp: * bridge/runtime_object.h: * bridge/runtime_root.cpp: * inspector/JavaScriptCallFrame.cpp: * inspector/JavaScriptProfile.cpp: * inspector/JavaScriptProfile.h: * inspector/JavaScriptProfileNode.cpp: * inspector/JavaScriptProfileNode.h: * loader/FrameLoader.cpp: * page/Console.cpp: * plugins/PluginView.cpp: * plugins/gtk/PluginViewGtk.cpp: * plugins/qt/PluginViewQt.cpp: * plugins/win/PluginViewWin.cpp: 2008-10-28 Adele Peterson Windows build fix. This removes Cairo include directories from non-Cairbo build configurations. * WebCore.vcproj/WebCore.vcproj: 2008-10-28 Adele Peterson Windows build fix. * platform/graphics/ImageBuffer.h: (WebCore::ImageBuffer::create): 2008-10-28 Cameron Zwarich Not reviewed. Roll out a mistaken attempt at fixing the GTK build in r37947. * GNUmakefile.am: 2008-10-28 Adele Peterson Reviewed by John Sullivan. Fix for https://bugs.webkit.org/show_bug.cgi?id=21880 "files" string for multifile uploads needs to be localized * page/mac/WebCoreViewFactory.h: * platform/LocalizedStrings.h: * platform/gtk/FileChooserGtk.cpp: (WebCore::FileChooser::basenameForWidth): * platform/gtk/LocalizedStringsGtk.cpp: (WebCore::multipleFileUploadText): * platform/mac/FileChooserMac.mm: (WebCore::FileChooser::basenameForWidth): * platform/mac/LocalizedStringsMac.mm: (WebCore::multipleFileUploadText): * platform/qt/Localizations.cpp: (WebCore::multipleFileUploadText): * platform/wx/LocalizedStringsWx.cpp: (WebCore::multipleFileUploadText): 2008-10-28 Brett Wilson Reviewed by Darin Adler. https://bugs.webkit.org/show_bug.cgi?id=21816 Remove platform ifdefs in ImageBuffer.h by moving platform specific code into a new PlatformImageBuffer class. Move the static create function into the header because it can be cross-platform. Initialization now happens in the cunstructor which sets a flag that create uses to know whether it should return null or not. I also made passing of IntSize more consistent (always by reference). This change also changes the ifdefs in GraphicsContext to allow Skia ports to implement text drawing modes. * platform/graphics/ImageBuffer.h: (WebCore::ImageBuffer::create): (WebCore::ImageBuffer::size): * platform/graphics/cairo/ImageBufferCairo.cpp: (WebCore::ImageBufferData::ImageBufferData): (WebCore::ImageBuffer::ImageBuffer): (WebCore::ImageBuffer::~ImageBuffer): (WebCore::ImageBuffer::image): (WebCore::ImageBuffer::getImageData): (WebCore::ImageBuffer::putImageData): * platform/graphics/cairo/ImageBufferData.h: * platform/graphics/cg/ImageBufferCG.cpp: (WebCore::ImageBufferData::ImageBufferData): (WebCore::ImageBuffer::ImageBuffer): (WebCore::ImageBuffer::~ImageBuffer): (WebCore::ImageBuffer::getImageData): (WebCore::ImageBuffer::putImageData): * platform/graphics/cg/ImageBufferData.h: * platform/graphics/qt/ImageBufferData.h: * platform/graphics/qt/ImageBufferQt.cpp: (WebCore::ImageBufferData::ImageBufferData): (WebCore::ImageBuffer::ImageBuffer): (WebCore::ImageBuffer::~ImageBuffer): 2008-10-28 Cameron Zwarich Not reviewed. Fix the GTK build. * GNUmakefile.am: 2008-10-28 Cameron Zwarich Not reviewed. Another Qt build fix. * WebCore.pro: 2008-10-28 Greg Bolsinga Reviewed by David Kilzer. https://bugs.webkit.org/show_bug.cgi?id=21932 Add non-pointer constant lookups to SoftLinking.h * platform/mac/SoftLinking.h: 2008-10-28 Greg Bolsinga Reviewed by David Kilzer. https://bugs.webkit.org/show_bug.cgi?id=2192 Missing semi-colons in Geoposition.idl * page/Geoposition.idl: Add missing semi-colons 2008-10-28 Timothy Hatcher Make the Profiles panel in the Web Inspector have an enable screen. Profiling now needs to be enabled before console.profile() works. Make the JavaScript profiler opt-in, so it does not slow down JavaScript all the time Reviewed by Darin Adler and Kevin McCullough. * English.lproj/localizedStrings.js: New strings. * WebCore.base.exp: New and changed exports. * WebCore.vcproj/WebCore.vcproj: Add the PanelEnablerView.js file. * bindings/js/JSDOMWindowBase.cpp: (WebCore::JSDOMWindowBase::supportsProfiling): Call InspectorController:profilerEnabled. * inspector/InspectorController.cpp: (WebCore::InspectorController::InspectorController): Initialize the m_startProfiling Timer to call InspectorController::startUserInitiatedProfiling. (WebCore::InspectorController::startUserInitiatedProfilingSoon): Start a one-shot timer that calls InspectorController::startUserInitiatedProfiling. (WebCore::InspectorController::startUserInitiatedProfiling): Recompile all JavaScript and enable the profiler if the profiler was not enabled. (WebCore::InspectorController::stopUserInitiatedProfiling): Rearrange code for readability. (WebCore::InspectorController::enableProfiler): Recompile all the JavaScript functions if the skipRecompile argument is false. Call the profilerWasEnabled script function. (WebCore::InspectorController::disableProfiler): Recompile all the JavaScript functions. Call the profilerWasEnabled script function. (WebCore::InspectorController::disableDebugger): Set m_attachDebuggerWhenShown to false, so it won't be started later. * inspector/InspectorController.h: (WebCore::InspectorController::profilerEnabled): Return enabled() && m_profilerEnabled. * inspector/front-end/Images/debuggingButtons.png: Remove. * inspector/front-end/Images/enableButtons.png: Added. * inspector/front-end/Images/profilesSilhouette.png: Added. * inspector/front-end/Images/scriptsSilhouette.png: Added. * inspector/front-end/PanelEnablerView.js: Added. (WebInspector.PanelEnablerView): (WebInspector.PanelEnablerView.prototype._enableButtonCicked): Fire the "enable clicked" event so listeners can do their thing. (WebInspector.PanelEnablerView.prototype._windowResized): Test if the icon should be hidden. * inspector/front-end/ProfilesPanel.js: (WebInspector.ProfilesPanel): Create the PanelEnablerView and the strings needed for it. (WebInspector.ProfilesPanel.prototype.get statusBarItems): Include the enableToggleButton. (WebInspector.ProfilesPanel.prototype.profilerWasEnabled): Call reset and populateInterface. (WebInspector.ProfilesPanel.prototype.profilerWasDisabled): Call reset. (WebInspector.ProfilesPanel.prototype.reset): Call _updateInterface. (WebInspector.ProfilesPanel.prototype.setRecordingProfile): Moved in the code, no changes. (WebInspector.ProfilesPanel.prototype._updateInterface): Update the toggle button and show/hide other buttons. Also show/hide the PanelEnablerView. (WebInspector.ProfilesPanel.prototype._enableProfiling): Call _toggleProfiling if not enabled. (WebInspector.ProfilesPanel.prototype._toggleProfiling): Call InspectorController's disableProfiler or enableProfiler. * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel): Replace the overlay element with a PanelEnablerView. Replace the debuggingButton with the enableToggleButton. (WebInspector.ScriptsPanel.prototype.get statusBarItems): Replace the debuggingButton with the enableToggleButton. (WebInspector.ScriptsPanel.prototype._updateDebuggerButtons): Hide/show the pauseOnExceptionButton when needed. Replace the overlay element with a PanelEnablerView. Replace the debuggingButton with the enableToggleButton. (WebInspector.ScriptsPanel.prototype._enableDebugging): Call _toggleDebugging when not enabled. (WebInspector.ScriptsPanel.prototype._toggleDebugging): Remove the call to _clearInterface, since reset is called from debuggerWasEnabled and debuggerWasDisabled. * inspector/front-end/View.js: Inherit from WebInspector.Object. * inspector/front-end/WebKit.qrc: Add the PanelEnablerView.js file. * inspector/front-end/inspector.css: New styles for the PanelEnablerView. * inspector/front-end/inspector.html: Add the PanelEnablerView.js file. * inspector/front-end/inspector.js: (WebInspector.profilerWasEnabled): Added. Calls the ProfilesPanel. (WebInspector.profilerWasDisabled): Ditto. * page/Console.cpp: (WebCore::Console::error): Remove null check for m_frame, since m_frame isn't used. (WebCore::Console::info): Ditto. (WebCore::Console::log): Ditto. (WebCore::Console::assertCondition): Ditto. (WebCore::Console::dirxml): Remove null check for m_frame and use this->page(). (WebCore::Console::count): Ditto. (WebCore::Console::profile): Return early if InspectorController::profilerEnabled is false. (WebCore::Console::profileEnd): Ditto. (WebCore::Console::warn): Remove null check for m_frame, since m_frame isn't used. * page/Settings.cpp: (WebCore::Settings::Settings): Remove initialization of m_didInitializeDeveloperExtrasEnabled. (WebCore::Settings::setDeveloperExtrasEnabled): Remove code that recompiled functions. Now just sets the member boolean. * page/Settings.h: Remove m_didInitializeDeveloperExtrasEnabled. 2008-10-28 Timothy Hatcher Rename a few methods related to attaching and detaching the debugger. Also adds stub methods for enabling and disabling the profiler. * Rename attachDebugger to enableDebugger. * Rename detachDebugger to disableDebugger. * Rename the debuggerAttached getter to debuggerEnabled. * Rename the debuggerAttached callback to debuggerWasEnabled. * Rename the debuggerDetached callback to debuggerWasDisabled. Reviewed by Darin Adler. * WebCore.base.exp: * inspector/InspectorController.cpp: (WebCore::InspectorController::InspectorController): (WebCore::InspectorController::setWindowVisible): (WebCore::InspectorController::windowScriptObjectAvailable): (WebCore::InspectorController::close): (WebCore::InspectorController::enableProfiler): (WebCore::InspectorController::disableProfiler): (WebCore::InspectorController::enableDebugger): (WebCore::InspectorController::disableDebugger): (WebCore::InspectorController::pauseInDebugger): (WebCore::InspectorController::resumeDebugger): (WebCore::InspectorController::stepOverStatementInDebugger): (WebCore::InspectorController::stepIntoStatementInDebugger): (WebCore::InspectorController::stepOutOfFunctionInDebugger): * inspector/InspectorController.h: (WebCore::InspectorController::profilerEnabled): (WebCore::InspectorController::debuggerEnabled): * inspector/front-end/BreakpointsSidebarPane.js: (WebInspector.BreakpointsSidebarPane.prototype.addBreakpoint): (WebInspector.BreakpointsSidebarPane.prototype.removeBreakpoint): (WebInspector.BreakpointsSidebarPane.prototype._breakpointEnableChanged): * inspector/front-end/Object.js: * inspector/front-end/ProfilesPanel.js: (WebInspector.ProfilesPanel): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel): (WebInspector.ScriptsPanel.prototype.get statusBarItems): (WebInspector.ScriptsPanel.prototype.debuggerWasEnabled): (WebInspector.ScriptsPanel.prototype.debuggerWasDetached): (WebInspector.ScriptsPanel.prototype.reset): (WebInspector.ScriptsPanel.prototype.canShowResource): (WebInspector.ScriptsPanel.prototype._updatePauseOnExceptionsButton): (WebInspector.ScriptsPanel.prototype._updateDebuggerButtons): (WebInspector.ScriptsPanel.prototype._toggleDebugging): * inspector/front-end/View.js: * inspector/front-end/inspector.css: * inspector/front-end/inspector.html: * inspector/front-end/inspector.js: (WebInspector.addResource): (WebInspector.debuggerWasEnabled): (WebInspector.debuggerWasDisabled): 2008-10-28 Timothy Hatcher Fix an exception when searching the Resources panel while there and resources queued to be added to the list. Reviewed by Kevin McCullough. * inspector/front-end/ResourcesPanel.js: (WebInspector.ResourcesPanel.prototype.searchCanceled): Null check the _resourcesTreeElement property. (WebInspector.ResourcesPanel.prototype.performSearch): Ditto. 2008-10-28 Alp Toker GTK+ build fix for older versions of Pango where PANGO_VERSION_CHECK isn't defined. * platform/graphics/gtk/FontGtk.cpp: (WebCore::getDefaultPangoLayout): * platform/graphics/gtk/FontPlatformDataPango.cpp: 2008-10-28 Alexey Proskuryakov Reviewed by Darin Adler. https://bugs.webkit.org/show_bug.cgi?id=21893 Character set is incorrect for external scripts in XHTML pages Incorrect encoding for text in a popup at http://xpoint.ru/ Test: fast/encoding/external-script-charset.xhtml Expose scriptCharset() function on all ScriptElements, and call it from XML tokenizer. * dom/ScriptElement.h: * dom/XMLTokenizerLibxml2.cpp: (WebCore::XMLTokenizer::endElementNs): * dom/XMLTokenizerQt.cpp: (WebCore::XMLTokenizer::parseEndElement): * html/HTMLScriptElement.h: * svg/SVGScriptElement.cpp: (WebCore::SVGScriptElement::scriptCharset): * svg/SVGScriptElement.h: 2008-10-28 Alp Toker Include copyright license files in the autotools dist target and exclude unused zlib headers. Change suggested by Mike Hommey. * GNUmakefile.am: 2008-10-27 Sam Weinig Reviewed by Maciej Stachowiak. Clear the window shell when destroying a page to allow documents which have no way of being reached anymore, to be torn down. * page/Frame.cpp: (WebCore::Frame::pageDestroyed): 2008-10-27 Kevin Watters Reviewed by Kevin Ollivier. Update the active state as well as the focused state as both need to be true for the caret to be drawn. https://bugs.webkit.org/show_bug.cgi?id=21900 * WebView.cpp: (wxWebView::OnSetFocus): (wxWebView::OnKillFocus): 2008-10-27 Kevin Ollivier wx build fix on Linux/GTK. Enable support for #include style includes. * webcore-wx.bkl: 2008-10-27 Michael Knaup Reviewed and tweaked by Darin Adler. - https://bugs.webkit.org/show_bug.cgi?id=8988 Bug 8988: Add support for Mozilla CSS custom cursors. Added -webkit-grab and -webkit-grabbing cursor suppport for the Mac, dummy implementations for other platforms. * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): Updated since the -webkit-grabbing cursor is now the last one. * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Added CURSOR_WEBKIT_GRAB and CURSOR_WEBKIT_GRABBING. * css/CSSValueKeywords.in: Added -webkit-grab and -webkit-grabbing. * manual-tests/cursor.html: Added -webkit-zoom-in, webkit-zoom-out, -webkit-grab, and -webkit-grabbing. * page/EventHandler.cpp: (WebCore::EventHandler::selectCursor): Added CURSOR_WEBKIT_GRAB and CURSOR_WEBKIT_GRABBING. * platform/Cursor.h: Added grabCursor and grabbingCursor. * platform/gtk/CursorGtk.cpp: (WebCore::grabCursor): Added. (WebCore::grabbingCursor): Added. * platform/mac/CursorMac.mm: (WebCore::grabCursor): Added. (WebCore::grabbingCursor): Added. * platform/qt/CursorQt.cpp: (WebCore::grabCursor): Added. (WebCore::grabbingCursor): Added. * platform/win/CursorWin.cpp: (WebCore::grabCursor): Added. (WebCore::grabbingCursor): Added. * platform/wx/CursorWx.cpp: (WebCore::grabCursor): Added. (WebCore::grabbingCursor): Added. * rendering/style/RenderStyleConstants.h: Added CURSOR_WEBKIT_GRAB and CURSOR_WEBKIT_GRABBING. Also broke ECursor out into a single constant per line. Also added a couple of comments. 2008-10-27 Dimitri Glazkov Reviewed by Darin Adler. * svg/SVGAnimatedTemplate.h: needed a HashMap define 2008-10-21 Eric Seidel Reviewed by Dave Hyatt. Infinite recursion crash in WebCore::RenderSVGRoot::absoluteClippedOverflowRect on a element outside of a gradient block https://bugs.webkit.org/show_bug.cgi?id=20400 Test: svg/custom/stop-crash.svg * WebCore.xcodeproj/project.pbxproj: * rendering/RenderSVGGradientStop.h: (WebCore::RenderSVGGradientStop::absoluteClippedOverflowRect): 2008-10-27 Anders Carlsson Reviewed by Sam Weinig. No need to call release if the connection is null. * platform/network/mac/ResourceHandleMac.mm: (WebCore::ResourceHandle::start): 2008-10-27 Anders Carlsson Reviewed by Kevin Decker. Crash in fast/loader/simultaneous-reloads-assert.html Make sure to null check the NSURLConnection object. * platform/network/mac/ResourceHandleMac.mm: (WebCore::ResourceHandle::start): (WebCore::ResourceHandle::setDefersLoading): 2008-10-27 Alexey Proskuryakov Fix non-Mac builds. * GNUmakefile.am: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCoreSources.bkl: Renamed JSHTMLOptionElementConstructor to JSOptionConstructor. 2008-10-26 Alexey Proskuryakov Reviewed by Sam Weinig. https://bugs.webkit.org/show_bug.cgi?id=21886 window.HTMLOptionElement == "[object HTMLElementConstructor]" instead of HTMLOptionElementConstructor Test: fast/dom/HTMLOptionElement/option-prototype.html We now have separate objects for window.Option and window.HTMLOptionElement - the latter "constructor" cannot be used to construct anything. This matches Firefox behavior. * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSDOMWindowBase.cpp: (jsDOMWindowBaseOption): * bindings/js/JSHTMLOptionElementConstructor.cpp: Removed. * bindings/js/JSHTMLOptionElementConstructor.h: Removed. * bindings/js/JSOptionConstructor.cpp: Copied from WebCore/bindings/js/JSHTMLOptionElementConstructor.cpp. * bindings/js/JSOptionConstructor.h: Copied from WebCore/bindings/js/JSHTMLOptionElementConstructor.h. * html/HTMLOptionElement.idl: Renamed JSHTMLOptionElementConstructor to JSOptionConstructor. * html/HTMLOptionElement.idl: Generate a constructor. 2008-10-25 Geoffrey Garen Not reviewed. Try to fix Mac debug build on the buildbot. * platform/FileChooser.cpp: (WebCore::FileChooserClient::~FileChooserClient): * platform/FileChooser.h: Moved destructor to .cpp file, to avoid a weak exported symbol. 2008-10-25 Jade Han Reviewed by Anders. Enable custom properties for Qt runtime objects in QtWebKit https://bugs.webkit.org/show_bug.cgi?id=21813 * bridge/runtime_object.cpp: (JSC::RuntimeObjectImp::getOwnPropertySlot): (JSC::RuntimeObjectImp::put): 2008-10-24 Sam Weinig Fix windows build. * page/Chrome.cpp: * page/Chrome.h: 2008-10-24 Sam Weinig Fix Qt build. * platform/qt/FileChooserQt.cpp: 2008-10-24 Sam Weinig Reviewed by Dan Bernstein. Fix https://bugs.webkit.org/show_bug.cgi?id=21759 Layering violation: FileChooser should not depend on Document/Frame/Page Move file choosing into WebKit ChromeClient. * loader/EmptyClients.h: (WebCore::EmptyChromeClient::runOpenPanel): * page/Chrome.cpp: (WebCore::Chrome::runOpenPanel): * page/Chrome.h: * page/ChromeClient.h: * page/mac/ChromeMac.mm: * platform/FileChooser.h: * platform/mac/FileChooserMac.mm: * platform/qt/FileChooserQt.cpp: * platform/win/FileChooserWin.cpp: * platform/wx/TemporaryLinkStubs.cpp: * rendering/RenderFileUploadControl.cpp: (WebCore::RenderFileUploadControl::click): 2008-10-24 Kevin Ollivier wx build fix - add newIconForFiles stub. * platform/wx/TemporaryLinkStubs.cpp: (Icon::newIconForFiles): 2008-10-24 Kevin Watters Reviewed by Kevin Ollivier. Use the CGFont metrics APIs for more accurate measurements, and tweak the y value the text is drawn at (it was a couple pixels off before because wx internally adds to the y value. https://bugs.webkit.org/show_bug.cgi?id=21853 * platform/wx/wxcode/mac/carbon/fontprops.cpp: (wxFontProperties::wxFontProperties): * platform/wx/wxcode/mac/carbon/non-kerned-drawing.cpp: (WebCore::drawTextWithSpacing): 2008-10-24 Eric Seidel Reviewed by Sam Weinig. Generate missing constructors and add test to prevent missing ones in the future https://bugs.webkit.org/show_bug.cgi?id=21846 Test: fast/js/global-constructors.html * css/CSSStyleSheet.idl: * css/RGBColor.idl: * dom/NodeIterator.idl: * dom/TreeWalker.idl: * xml/XPathExpression.idl: 2008-10-24 Alexey Proskuryakov Reviewed by Darin Adler. https://bugs.webkit.org/show_bug.cgi?id=21836 REGRESSION: Sign-in on Fancast.com causes crash in Webkit nightly Test: http/tests/xmlhttprequest/detaching-frame.html * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::dropProtection): Null check the window - even though XHR needs a context (AKA frame) to be serviced, the frame may be disconnected when dispatching the same callback that results in this function being called. 2008-10-24 David Kilzer Gtk build fix. * platform/gtk/TemporaryLinkStubs.cpp: (WebCore::setFocusRingColorChangeFunction): Removed in r37858. 2008-10-24 Mark Rowe Reviewed by Sam Weinig. Use constant kCGInterpolationMedium in GraphicsContextCG.cpp rather than hard-coded values. * platform/graphics/cg/GraphicsContextCG.cpp: (WebCore::GraphicsContext::setImageInterpolationQuality): (WebCore::GraphicsContext::imageInterpolationQuality): 2008-10-24 Anders Carlsson Reviewed by Sam Weinig. Support NPN_Construct * WebCore.NPAPI.exp: Export _NPN_Construct. * bridge/NP_jsobject.cpp: (_NPN_Construct): Implement this. * bridge/c/c_instance.cpp: (JSC::Bindings::CInstance::supportsConstruct): (JSC::Bindings::CInstance::invokeConstruct): Have this call the appropriate NPClass method. * bridge/npruntime.h: Add NPN_Construct. * bridge/npruntime_impl.h: Add _NPN_Construct. * bridge/runtime.h: (JSC::Bindings::Instance::supportsConstruct): (JSC::Bindings::Instance::invokeConstruct): New methods. * bridge/runtime_object.cpp: (JSC::callRuntimeConstructor): Call the native instance. (JSC::RuntimeObjectImp::getConstructData): Implement this. * bridge/runtime_object.h: Add new method declarations. * plugins/gtk/PluginPackageGtk.cpp: (WebCore::PluginPackage::load): * plugins/qt/PluginPackageQt.cpp: (WebCore::PluginPackage::load): * plugins/win/PluginPackageWin.cpp: (WebCore::PluginPackage::load): Initialize m_pluginFuncs.construct. 2008-10-24 Adele Peterson Build fix. * platform/FileChooser.h: (WebCore::FileChooserClient::~FileChooserClient): * platform/graphics/mac/IconMac.mm: (WebCore::Icon::newIconForFiles): 2008-10-24 Greg Bolsinga Fix GTK build break. Reviewed by David Kilzer. * GNUmakefile.am: Do not include .idl files whose generated files should not be compiled. 2008-10-24 David Kilzer Wx build fix. * platform/wx/TemporaryLinkStubs.cpp: (WebCore::setFocusRingColorChangeFunction): Removed in r37858. 2008-10-24 Adele Peterson Reviewed by Sam Weinig. WebCore part of fix for FILE CONTROL: multi-file upload. This change adds support for multiple file selection in an control when the "multiple" attribute is used. This is consistent with the direction HTML5 will be going in the future. The initial implementation here will show "n files" as the text next to the control when multiple files are selected. You can view the individual files in a tooltip for now. Improvements to this control will come later. Web developers will be able to access the FileList from the HTMLInputElement element, where they can get a base name and a size for each file. These FileList Files can also be sent in an XMLHTTPRequest. * manual-tests/post-multi-file-upload.html: Added. * manual-tests/resources/multiFileResources: Added. * manual-tests/resources/multiFileResources/post-echo-and-notify-done.cgi: Added. * manual-tests/resources/multiFileResources/testFile1.html: Added. * manual-tests/resources/multiFileResources/testFile2.html: Added. * manual-tests/resources/multiFileResources/testFile3.html: Added. * WebCore.base.exp: Added support to export the new "chooseFilenames" method to be used in WebKit. * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::parseMappedAttribute): Add support for the multiple attribute. (WebCore::HTMLInputElement::value): Added comments. The HTML5 spec says that value shouldn't apply for the file upload control, but we don't want to break the behavior for existing websites that may rely on this. (WebCore::HTMLInputElement::setValue): ditto. (WebCore::HTMLInputElement::setValueFromRenderer): This is no longer used for file upload controls. setFileListFromRenderer is used instead. (WebCore::HTMLInputElement::setFileListFromRenderer): Added. * html/HTMLInputElement.h: * page/Chrome.cpp: (WebCore::Chrome::setToolTip): Show a tooltip with the file name list for the multi-file upload control. * page/DragController.cpp: (WebCore::DragController::concludeDrag): Updated to support multiple files. * platform/FileChooser.cpp: Add support for maintaining a list of file paths that can be retrieved by the renderer. (WebCore::FileChooser::FileChooser): (WebCore::FileChooser::create): (WebCore::FileChooser::clear): (WebCore::FileChooser::chooseFile): (WebCore::FileChooser::chooseFiles): (WebCore::FileChooser::chooseIcon): * platform/FileChooser.h: (WebCore::FileChooser::filePaths): (WebCore::FileChooser::allowsMultipleFiles): * platform/graphics/Icon.h: * platform/graphics/mac/IconMac.mm: (WebCore::Icon::newIconForFiles): Returns a generic icon for multiple files. * platform/graphics/gtk/IconGtk.cpp: (WebCore::Icon::newIconForFiles): stubbed out. * platform/graphics/qt/IconQt.cpp: (WebCore::Icon::newIconForFiles): ditto. * platform/graphics/win/IconWin.cpp: (WebCore::Icon::newIconForFiles): ditto. * platform/gtk/FileChooserGtk.cpp: (WebCore::FileChooser::basenameForWidth): Updated to deal with new filenames vector. * platform/mac/FileChooserMac.mm: (WebCore::FileChooser::basenameForWidth): ditto. * platform/qt/FileChooserQt.cpp: (WebCore::FileChooser::openFileChooser): (WebCore::FileChooser::basenameForWidth): * platform/win/FileChooserWin.cpp: (WebCore::FileChooser::basenameForWidth): * platform/network/mac/FormDataStreamMac.mm: (WebCore::disassociateStreamWithResourceHandle): Removed unnecessary assertion. This can get hit when connectionDidFinishLoading and cancel both get called for the same ResourceHandle. This getting called twice has no negative effect. * rendering/RenderFileUploadControl.cpp: (WebCore::RenderFileUploadControl::valueChanged): Calls setFileListFromRenderer. (WebCore::RenderFileUploadControl::allowsMultipleFiles): Added. (WebCore::RenderFileUploadControl::updateFromElement): Uses the new filenames call from FileChooser. (WebCore::RenderFileUploadControl::receiveDroppedFiles): Updated to support multiple files. * rendering/RenderFileUploadControl.h: 2008-10-23 Peter Kasting Reviewed by David Hyatt. https://bugs.webkit.org/show_bug.cgi?id=21844 Remove setFocusRingColorChangeFunction. * page/Page.cpp: (WebCore::Page::Page): * platform/graphics/Color.h: * platform/graphics/mac/ColorMac.mm: (WebCore::focusRingColor): * platform/graphics/qt/GraphicsContextQt.cpp: * platform/graphics/win/ColorSafari.cpp: 2008-10-24 David Kilzer Build fix for Qt. Reviewed by Greg. * WebCore.pro: Added missing *.idl files. 2008-10-24 Greg Bolsinga Reviewed by Sam Weinig. https://bugs.webkit.org/show_bug.cgi?id=21475 Provide support for the Geolocation API http://dev.w3.org/geo/api/spec-source.html Test: geolocation/geolocation-not-implemented.html * DerivedSources.make: * GNUmakefile.am: Added Geolocation support * WebCore.pro: Added Geolocation support * WebCore.vcproj/WebCore.vcproj: Added Geolocation support * WebCore.xcodeproj/project.pbxproj: Added Geolocation support * WebCoreSources.bkl: Added Geolocation support * bindings/js/JSCustomPositionCallback.cpp: Added. (WebCore::JSCustomPositionCallback::JSCustomPositionCallback): (WebCore::JSCustomPositionCallback::handleEvent): * bindings/js/JSCustomPositionCallback.h: Added. (WebCore::JSCustomPositionCallback::create): * bindings/js/JSCustomPositionErrorCallback.cpp: Added. (WebCore::JSCustomPositionErrorCallback::JSCustomPositionErrorCallback): (WebCore::JSCustomPositionErrorCallback::handleEvent): * bindings/js/JSCustomPositionErrorCallback.h: Added. (WebCore::JSCustomPositionErrorCallback::create): * bindings/js/JSDOMBinding.cpp: move markDOMObjectWrapper here from JSDOMWindowCustom (WebCore::markDOMObjectWrapper): * bindings/js/JSDOMBinding.h: move markDOMObjectWrapper here from JSDOMWindowCustom * bindings/js/JSDOMWindowCustom.cpp: move markDOMObjectWrapper to JSDOMBinding * bindings/js/JSGeolocationCustom.cpp: Added. (WebCore::JSGeolocation::getCurrentPosition): (WebCore::JSGeolocation::watchPosition): * bindings/js/JSNavigatorCustom.cpp: handle marking Geolocation (WebCore::JSNavigator::mark): * dom/Document.cpp: (WebCore::Document::Document): * dom/Document.h: (WebCore::Document::setUsingGeolocation): (WebCore::Document::usingGeolocation): * loader/FrameLoader.cpp: don't add to back forward cache if using Geolocation (WebCore::FrameLoader::canCachePage): * page/Geolocation.cpp: Added. (WebCore::Geolocation::GeoNotifier::GeoNotifier): (WebCore::Geolocation::GeoNotifier::timerFired): (WebCore::Geolocation::Geolocation): (WebCore::Geolocation::disconnectFrame): (WebCore::Geolocation::getCurrentPosition): (WebCore::Geolocation::watchPosition): (WebCore::Geolocation::clearWatch): (WebCore::Geolocation::stopUpdatingIfEmpty): (WebCore::Geolocation::sendErrorToOneShots): (WebCore::Geolocation::sendErrorToWatchers): (WebCore::Geolocation::sendPositionToOneShots): (WebCore::Geolocation::sendPositionToWatchers): (WebCore::Geolocation::handleError): (WebCore::Geolocation::geolocationServicePositionChanged): (WebCore::Geolocation::geolocationServiceErrorOccurred): * page/Geolocation.h: Added. (WebCore::Geolocation::create): (WebCore::Geolocation::~Geolocation): (WebCore::Geolocation::lastPosition): (WebCore::Geolocation::GeoNotifier::create): * page/Geolocation.idl: Added. * page/Geoposition.cpp: Added. (WebCore::Geoposition::toString): * page/Geoposition.h: Added. (WebCore::Geoposition::create): (WebCore::Geoposition::latitude): (WebCore::Geoposition::longitude): (WebCore::Geoposition::altitude): (WebCore::Geoposition::accuracy): (WebCore::Geoposition::altitudeAccuracy): (WebCore::Geoposition::heading): (WebCore::Geoposition::velocity): (WebCore::Geoposition::timestamp): (WebCore::Geoposition::Geoposition): * page/Geoposition.idl: Added. * page/Navigator.cpp: (WebCore::Navigator::disconnectFrame): disconnect Geolocation (WebCore::Navigator::geolocation): accessor for Geolocation * page/Navigator.h: (WebCore::Navigator::optionalGeolocation): accessor for Geolocation * page/Navigator.idl: accessor for Geolocation * page/PositionCallback.h: Added. (WebCore::PositionCallback::~PositionCallback): * page/PositionCallback.idl: Added. * page/PositionError.h: Added. (WebCore::PositionError::): (WebCore::PositionError::create): (WebCore::PositionError::code): (WebCore::PositionError::message): (WebCore::PositionError::PositionError): * page/PositionError.idl: Added. * page/PositionErrorCallback.h: Added. (WebCore::PositionErrorCallback::~PositionErrorCallback): * page/PositionErrorCallback.idl: Added. * page/PositionOptions.h: Added. (WebCore::PositionOptions::create): (WebCore::PositionOptions::enableHighAccuracy): (WebCore::PositionOptions::setEnableHighAccuracy): (WebCore::PositionOptions::timeout): (WebCore::PositionOptions::setTimeout): (WebCore::PositionOptions::PositionOptions): * page/PositionOptions.idl: Added. * platform/GeolocationService.cpp: Added. (WebCore::GeolocationService::GeolocationService): (WebCore::GeolocationService::positionChanged): (WebCore::GeolocationService::errorOccurred): * platform/GeolocationService.h: Added. (WebCore::GeolocationServiceClient::~GeolocationServiceClient): (WebCore::GeolocationServiceClient::geolocationServicePositionChanged): (WebCore::GeolocationServiceClient::geolocationServiceErrorOccurred): (WebCore::GeolocationService::~GeolocationService): 2008-10-24 Simon Fraser Reviewed by Darin Adler https://bugs.webkit.org/show_bug.cgi?id=21818 Add HashTraits for AtomicString so that AtomicString can be used as the key for a HashMap or HashSet. * GNUmakefile.am: add AtomicStringHash.h * WebCore.vcproj/WebCore.vcproj: add AtomicStringHash.h * WebCore.xcodeproj/project.pbxproj: add AtomicStringHash.h * platform/text/AtomicString.h: (WebCore::AtomicString::AtomicString): (WebCore::AtomicString::isHashTableDeletedValue): specialize DefaultHash for AtomicString to use AtomicStringHash * platform/text/AtomicStringHash.h: Added. * platform/text/StringImpl.cpp: (WebCore::StringImpl::StringImpl): compute the hash up-front for the empty string * platform/text/StringImpl.h: (WebCore::StringImpl::existingHash): method to get the hash without a test and branch, for callers like AtomicStringHash who can guarantee that the hash has already been computed. 2008-10-24 Simon Fraser Reviewed by Sam Weinig https://bugs.webkit.org/show_bug.cgi?id=21857 Add WebKitCSSKeyframeRule and WebKitCSSKeyframesRule to the switch in _wrapCSSRule. * bindings/objc/DOMCSS.mm: (+[DOMCSSRule _wrapCSSRule:WebCore::]): 2008-10-24 Adam Roben Windows build fix * plugins/PluginView.cpp: 2008-10-24 Dan Bernstein Reviewed by Sam Weinig. - fix https://bugs.webkit.org/show_bug.cgi?id=21851 REGRESSION (r36513): Crash when removing a widget with percent height Test: fast/replaced/percent-height-in-anonymous-block-widget.html * rendering/RenderWidget.cpp: (WebCore::RenderWidget::destroy): Copied code added to RenderBox::destroy() in r36513 into this function. 2008-10-24 Timothy Hatcher Add a mechanism to ask the InspectorClient for key/value setting pairs. These settings can be strings, numbers, booleans or string vectors. The settings are also bridged to and from JavaScript. https://bugs.webkit.org/show_bug.cgi?id=21856 Reviewed by Darin Adler. * WebCore.base.exp: Expose the String CFStringRef constructor. * inspector/InspectorClient.h: (WebCore::InspectorClient::populateSetting): Added, pure virtual. (WebCore::InspectorClient::storeSetting): Ditto. (WebCore::InspectorClient::removeSetting): Ditto. * inspector/InspectorController.cpp: (WebCore::setting): Calls InspectorController::setting and wraps the result in script types. (WebCore::setSetting): Calls InspectorController::setSetting after converting from script types. (WebCore::InspectorController::InspectorController): Increment a global static to track the number of live InspectorControllers. (WebCore::InspectorController::~InspectorController): Decrement the global static that tracks the number of live InspectorControllers. Delete the setting cache if there are no more live controllers. (WebCore::InspectorController::setting): Check the cache and return the setting from there, otherwise make a new Setting and ask the client to populate it. (WebCore::InspectorController::setSetting): Change the cache and ask the client to store it. (WebCore::InspectorController::windowScriptObjectAvailable): Add setting and setSetting to the InspectorController script class. * inspector/InspectorController.h: (WebCore::InspectorController::Setting::Setting): (WebCore::InspectorController::Setting::operator=): (WebCore::InspectorController::Setting::type): Return m_type. (WebCore::InspectorController::Setting::string): Return m_string. Assert the type is correct. (WebCore::InspectorController::Setting::stringVector): Return m_stringVector. Assert the type is correct. (WebCore::InspectorController::Setting::doubleValue): Return m_simpleContent.m_double. Assert the type is correct. (WebCore::InspectorController::Setting::integerValue): Return m_simpleContent.m_integer. Assert the type is correct. (WebCore::InspectorController::Setting::booleanValue): Return m_simpleContent.m_boolean. Assert the type is correct. (WebCore::InspectorController::Setting::set): Overloaded for each data type, sets the right field and the type. * loader/EmptyClients.h: (WebCore::EmptyInspectorClient::populateSetting): Added, empty method. (WebCore::EmptyInspectorClient::storeSetting): Ditto. (WebCore::EmptyInspectorClient::removeSetting): Ditto. 2008-10-24 Cameron Zwarich Reviewed by Sam Weinig. Remove some C-style casts. * html/HTMLViewSourceDocument.cpp: (WebCore::HTMLViewSourceDocument::addViewSourceToken): 2008-10-24 Darin Adler - finish rolling out https://bugs.webkit.org/show_bug.cgi?id=21732 * bindings/js/JSAttrCustom.cpp: * bindings/js/JSCSSRuleCustom.cpp: * bindings/js/JSCSSStyleDeclarationCustom.cpp: * bindings/js/JSCSSValueCustom.cpp: * bindings/js/JSCanvasPixelArrayCustom.h: * bindings/js/JSCanvasRenderingContext2DCustom.cpp: * bindings/js/JSClipboardCustom.cpp: * bindings/js/JSConsoleCustom.cpp: * bindings/js/JSCustomSQLStatementCallback.cpp: * bindings/js/JSCustomSQLStatementErrorCallback.cpp: * bindings/js/JSCustomSQLTransactionCallback.cpp: * bindings/js/JSCustomSQLTransactionErrorCallback.cpp: * bindings/js/JSCustomVoidCallback.cpp: * bindings/js/JSCustomVoidCallback.h: * bindings/js/JSCustomXPathNSResolver.cpp: * bindings/js/JSCustomXPathNSResolver.h: * bindings/js/JSDOMApplicationCacheCustom.cpp: * bindings/js/JSDOMBinding.cpp: * bindings/js/JSDOMBinding.h: * bindings/js/JSDOMWindowBase.cpp: * bindings/js/JSDOMWindowBase.h: * bindings/js/JSDOMWindowCustom.cpp: * bindings/js/JSDOMWindowCustom.h: * bindings/js/JSDOMWindowShell.cpp: * bindings/js/JSDOMWindowShell.h: * bindings/js/JSDatabaseCustom.cpp: * bindings/js/JSDedicatedWorkerCustom.cpp: * bindings/js/JSDocumentCustom.cpp: * bindings/js/JSElementCustom.cpp: * bindings/js/JSEventCustom.cpp: * bindings/js/JSEventListener.cpp: * bindings/js/JSEventTarget.cpp: * bindings/js/JSEventTarget.h: * bindings/js/JSEventTargetBase.h: * bindings/js/JSEventTargetNodeCustom.cpp: * bindings/js/JSHTMLAllCollection.h: * bindings/js/JSHTMLAppletElementCustom.cpp: * bindings/js/JSHTMLCollectionCustom.cpp: * bindings/js/JSHTMLDocumentCustom.cpp: * bindings/js/JSHTMLEmbedElementCustom.cpp: * bindings/js/JSHTMLFormElementCustom.cpp: * bindings/js/JSHTMLFrameElementCustom.cpp: * bindings/js/JSHTMLFrameSetElementCustom.cpp: * bindings/js/JSHTMLIFrameElementCustom.cpp: * bindings/js/JSHTMLInputElementCustom.cpp: * bindings/js/JSHTMLObjectElementCustom.cpp: * bindings/js/JSHTMLOptionsCollectionCustom.cpp: * bindings/js/JSHTMLSelectElementCustom.cpp: * bindings/js/JSHTMLSelectElementCustom.h: * bindings/js/JSHistoryCustom.cpp: * bindings/js/JSImageDataCustom.cpp: * bindings/js/JSInspectedObjectWrapper.cpp: * bindings/js/JSInspectedObjectWrapper.h: * bindings/js/JSInspectorCallbackWrapper.cpp: * bindings/js/JSInspectorCallbackWrapper.h: * bindings/js/JSJavaScriptCallFrameCustom.cpp: * bindings/js/JSLocationCustom.cpp: * bindings/js/JSMessagePortCustom.cpp: * bindings/js/JSMimeTypeArrayCustom.cpp: * bindings/js/JSNamedNodeMapCustom.cpp: * bindings/js/JSNamedNodesCollection.cpp: * bindings/js/JSNamedNodesCollection.h: * bindings/js/JSNavigatorCustom.cpp: * bindings/js/JSNodeCustom.cpp: * bindings/js/JSNodeFilterCondition.cpp: * bindings/js/JSNodeFilterCondition.h: * bindings/js/JSNodeFilterCustom.cpp: * bindings/js/JSNodeIteratorCustom.cpp: * bindings/js/JSNodeListCustom.cpp: * bindings/js/JSPluginArrayCustom.cpp: * bindings/js/JSPluginCustom.cpp: * bindings/js/JSPluginElementFunctions.cpp: * bindings/js/JSPluginElementFunctions.h: * bindings/js/JSQuarantinedObjectWrapper.cpp: * bindings/js/JSQuarantinedObjectWrapper.h: * bindings/js/JSRGBColor.cpp: * bindings/js/JSRGBColor.h: * bindings/js/JSSQLResultSetRowListCustom.cpp: * bindings/js/JSSQLTransactionCustom.cpp: * bindings/js/JSSVGElementInstanceCustom.cpp: * bindings/js/JSSVGLengthCustom.cpp: * bindings/js/JSSVGMatrixCustom.cpp: * bindings/js/JSSVGPathSegCustom.cpp: * bindings/js/JSSVGPathSegListCustom.cpp: * bindings/js/JSSVGPointListCustom.cpp: * bindings/js/JSSVGTransformListCustom.cpp: * bindings/js/JSStorageCustom.cpp: * bindings/js/JSStyleSheetCustom.cpp: * bindings/js/JSStyleSheetListCustom.cpp: * bindings/js/JSTextCustom.cpp: * bindings/js/JSTreeWalkerCustom.cpp: * bindings/js/JSXMLHttpRequestCustom.cpp: * bindings/js/JSXMLHttpRequestUploadCustom.cpp: * bindings/js/JSXSLTProcessorCustom.cpp: * bindings/js/ScheduledAction.cpp: * bindings/js/ScheduledAction.h: * bindings/js/ScriptController.cpp: * bindings/js/ScriptController.h: * bindings/objc/WebScriptObject.mm: * bindings/objc/WebScriptObjectPrivate.h: * bindings/scripts/CodeGeneratorJS.pm: * bridge/NP_jsobject.cpp: * bridge/c/c_instance.cpp: * bridge/c/c_instance.h: * bridge/c/c_runtime.cpp: * bridge/c/c_runtime.h: * bridge/c/c_utility.cpp: * bridge/c/c_utility.h: * bridge/jni/jni_instance.cpp: * bridge/jni/jni_instance.h: * bridge/jni/jni_jsobject.h: * bridge/jni/jni_jsobject.mm: * bridge/jni/jni_objc.mm: * bridge/jni/jni_runtime.cpp: * bridge/jni/jni_runtime.h: * bridge/jni/jni_utility.cpp: * bridge/jni/jni_utility.h: * bridge/objc/WebScriptObject.h: * bridge/objc/objc_class.h: * bridge/objc/objc_class.mm: * bridge/objc/objc_instance.h: * bridge/objc/objc_instance.mm: * bridge/objc/objc_runtime.h: * bridge/objc/objc_runtime.mm: * bridge/objc/objc_utility.h: * bridge/objc/objc_utility.mm: * bridge/qt/qt_class.cpp: * bridge/qt/qt_class.h: * bridge/qt/qt_instance.cpp: * bridge/qt/qt_instance.h: * bridge/qt/qt_runtime.cpp: * bridge/qt/qt_runtime.h: * bridge/runtime.cpp: * bridge/runtime.h: * bridge/runtime_array.cpp: * bridge/runtime_array.h: * bridge/runtime_method.cpp: * bridge/runtime_method.h: * bridge/runtime_object.cpp: * bridge/runtime_object.h: * bridge/testqtbindings.cpp: * inspector/JavaScriptCallFrame.cpp: * inspector/JavaScriptCallFrame.h: * inspector/JavaScriptProfile.cpp: * inspector/JavaScriptProfile.h: * inspector/JavaScriptProfileNode.cpp: * inspector/JavaScriptProfileNode.h: * loader/FrameLoader.cpp: * loader/FrameLoader.h: * page/Console.cpp: * page/Console.h: * plugins/MimeTypeArray.h: * plugins/Plugin.h: * plugins/PluginArray.h: * plugins/PluginView.cpp: * xml/XMLHttpRequest.cpp: Use JSValue* instead of JSValuePtr. 2008-10-24 Simon Hausmann Fix the Qt build. * bridge/qt/qt_instance.cpp: (JSC::Bindings::QtField::valueFromInstance): 2008-10-24 David Kilzer Rolled out r37840 and r37841. * DerivedSources.make: * GNUmakefile.am: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * WebCoreSources.bkl: * bindings/js/JSCustomPositionCallback.cpp: Removed. * bindings/js/JSCustomPositionCallback.h: Removed. * bindings/js/JSCustomPositionErrorCallback.cpp: Removed. * bindings/js/JSCustomPositionErrorCallback.h: Removed. * bindings/js/JSDOMBinding.cpp: * bindings/js/JSDOMBinding.h: * bindings/js/JSDOMWindowCustom.cpp: (WebCore::markDOMObjectWrapper): * bindings/js/JSGeolocationCustom.cpp: Removed. * bindings/js/JSNavigatorCustom.cpp: * dom/Document.cpp: (WebCore::Document::Document): * dom/Document.h: * loader/FrameLoader.cpp: (WebCore::FrameLoader::canCachePage): * page/Geolocation.cpp: Removed. * page/Geolocation.h: Removed. * page/Geolocation.idl: Removed. * page/Geoposition.cpp: Removed. * page/Geoposition.h: Removed. * page/Geoposition.idl: Removed. * page/Navigator.cpp: (WebCore::Navigator::disconnectFrame): * page/Navigator.h: * page/Navigator.idl: * page/PositionCallback.h: Removed. * page/PositionCallback.idl: Removed. * page/PositionError.h: Removed. * page/PositionError.idl: Removed. * page/PositionErrorCallback.h: Removed. * page/PositionErrorCallback.idl: Removed. * page/PositionOptions.h: Removed. * page/PositionOptions.idl: Removed. * platform/GeolocationService.cpp: Removed. * platform/GeolocationService.h: Removed. 2008-10-23 David Kilzer Attempt to fix GTK build. * GNUmakefile.am: Added new *.idl files that were missing. 2008-10-23 Greg Bolsinga Reviewed by Sam Weinig. https://bugs.webkit.org/show_bug.cgi?id=21475 Provide support for the Geolocation API http://dev.w3.org/geo/api/spec-source.html Test: geolocation/geolocation-not-implemented.html * DerivedSources.make: * GNUmakefile.am: Added Geolocation support * WebCore.pro: Added Geolocation support * WebCore.vcproj/WebCore.vcproj: Added Geolocation support * WebCore.xcodeproj/project.pbxproj: Added Geolocation support * WebCoreSources.bkl: Added Geolocation support * bindings/js/JSCustomPositionCallback.cpp: Added. (WebCore::JSCustomPositionCallback::JSCustomPositionCallback): (WebCore::JSCustomPositionCallback::handleEvent): * bindings/js/JSCustomPositionCallback.h: Added. (WebCore::JSCustomPositionCallback::create): * bindings/js/JSCustomPositionErrorCallback.cpp: Added. (WebCore::JSCustomPositionErrorCallback::JSCustomPositionErrorCallback): (WebCore::JSCustomPositionErrorCallback::handleEvent): * bindings/js/JSCustomPositionErrorCallback.h: Added. (WebCore::JSCustomPositionErrorCallback::create): * bindings/js/JSDOMBinding.cpp: move markDOMObjectWrapper here from JSDOMWindowCustom (WebCore::markDOMObjectWrapper): * bindings/js/JSDOMBinding.h: move markDOMObjectWrapper here from JSDOMWindowCustom * bindings/js/JSDOMWindowCustom.cpp: move markDOMObjectWrapper to JSDOMBinding * bindings/js/JSGeolocationCustom.cpp: Added. (WebCore::JSGeolocation::getCurrentPosition): (WebCore::JSGeolocation::watchPosition): * bindings/js/JSNavigatorCustom.cpp: handle marking Geolocation (WebCore::JSNavigator::mark): * dom/Document.cpp: (WebCore::Document::Document): * dom/Document.h: (WebCore::Document::setUsingGeolocation): (WebCore::Document::usingGeolocation): * loader/FrameLoader.cpp: don't add to back forward cache if using Geolocation (WebCore::FrameLoader::canCachePage): * page/Geolocation.cpp: Added. (WebCore::Geolocation::GeoNotifier::GeoNotifier): (WebCore::Geolocation::GeoNotifier::timerFired): (WebCore::Geolocation::Geolocation): (WebCore::Geolocation::disconnectFrame): (WebCore::Geolocation::getCurrentPosition): (WebCore::Geolocation::watchPosition): (WebCore::Geolocation::clearWatch): (WebCore::Geolocation::stopUpdatingIfEmpty): (WebCore::Geolocation::sendErrorToOneShots): (WebCore::Geolocation::sendErrorToWatchers): (WebCore::Geolocation::sendPositionToOneShots): (WebCore::Geolocation::sendPositionToWatchers): (WebCore::Geolocation::handleError): (WebCore::Geolocation::geolocationServicePositionChanged): (WebCore::Geolocation::geolocationServiceErrorOccurred): * page/Geolocation.h: Added. (WebCore::Geolocation::create): (WebCore::Geolocation::~Geolocation): (WebCore::Geolocation::lastPosition): (WebCore::Geolocation::GeoNotifier::create): * page/Geolocation.idl: Added. * page/Geoposition.cpp: Added. (WebCore::Geoposition::toString): * page/Geoposition.h: Added. (WebCore::Geoposition::create): (WebCore::Geoposition::latitude): (WebCore::Geoposition::longitude): (WebCore::Geoposition::altitude): (WebCore::Geoposition::accuracy): (WebCore::Geoposition::altitudeAccuracy): (WebCore::Geoposition::heading): (WebCore::Geoposition::velocity): (WebCore::Geoposition::timestamp): (WebCore::Geoposition::Geoposition): * page/Geoposition.idl: Added. * page/Navigator.cpp: (WebCore::Navigator::disconnectFrame): disconnect Geolocation (WebCore::Navigator::geolocation): accessor for Geolocation * page/Navigator.h: (WebCore::Navigator::optionalGeolocation): accessor for Geolocation * page/Navigator.idl: accessor for Geolocation * page/PositionCallback.h: Added. (WebCore::PositionCallback::~PositionCallback): * page/PositionCallback.idl: Added. * page/PositionError.h: Added. (WebCore::PositionError::): (WebCore::PositionError::create): (WebCore::PositionError::code): (WebCore::PositionError::message): (WebCore::PositionError::PositionError): * page/PositionError.idl: Added. * page/PositionErrorCallback.h: Added. (WebCore::PositionErrorCallback::~PositionErrorCallback): * page/PositionErrorCallback.idl: Added. * page/PositionOptions.h: Added. (WebCore::PositionOptions::create): (WebCore::PositionOptions::enableHighAccuracy): (WebCore::PositionOptions::setEnableHighAccuracy): (WebCore::PositionOptions::timeout): (WebCore::PositionOptions::setTimeout): (WebCore::PositionOptions::PositionOptions): * page/PositionOptions.idl: Added. * platform/GeolocationService.cpp: Added. (WebCore::GeolocationService::GeolocationService): (WebCore::GeolocationService::positionChanged): (WebCore::GeolocationService::errorOccurred): * platform/GeolocationService.h: Added. (WebCore::GeolocationServiceClient::~GeolocationServiceClient): (WebCore::GeolocationServiceClient::geolocationServicePositionChanged): (WebCore::GeolocationServiceClient::geolocationServiceErrorOccurred): (WebCore::GeolocationService::~GeolocationService): 2008-10-23 Alp Toker Fix typo in comment in previous commit. GTK -> GLIB * platform/gtk/guriescape.c: 2008-10-23 Kalle Vahlman Reviewed by Alp Toker. https://bugs.webkit.org/show_bug.cgi?id=21824 [GTK] FileSystem abstraction uses features from Glib 2.16 Wrap g_uri_unescape_string() to fix building with pre-2.16 Glib * platform/gtk/guriescape.c: (unescape_character): (_webcore_g_uri_unescape_segment): (_webcore_g_uri_unescape_string): * platform/gtk/guriescape.h: 2008-10-23 Jan Michael Alonzo Fix Gtk build typo introduced in http://trac.webkit.org/changeset/37826. * GNUmakefile.am: 2008-10-23 Darin Fisher Reviewed by Eric Seidel. m_frame null checked but then dereferenced https://bugs.webkit.org/show_bug.cgi?id=21845 This error was found using a static analysis tool, and so I do not know how to produce a null m_frame on entry to this method. Hence, I have not included a regression test. * page/EventHandler.cpp: (WebCore::EventHandler::allowDHTMLDrag): Add an early return. 2008-10-23 Dan Bernstein Reviewed by Sam Weinig with no hesitation. - fix the HTML/CSS case of https://bugs.webkit.org/show_bug.cgi?id=19839 A PDF,RLE sequence that should be a no-op affects bidi reordering Test: fast/text/bidi-embedding-pop-and-push-same.html * platform/text/BidiResolver.h: (WebCore::BidiResolver::embed): Changed to only add the embedding operation to a vector of pending operations. (WebCore::BidiResolver::lowerExplicitEmbeddingLevel): Added. Moved the code that used to be in the PDF case of embed() here, except the part that sets the context. (WebCore::BidiResolver::raiseExplicitEmbeddingLevel): Added. Moved the code that used to be in the non-PDF case of embed() here, except the part the sets the context. (WebCore::BidiResolver::commitExplicitEmbedding): Added. Processes the explicit embedding operations in the vector by creating an updated context and determining the old and new embedding levels. If the levels are not the same, calls {lower,raise}ExplicitEmbeddingLevel(). Always sets the context to the new one. (WebCore::BidiResolver::createBidiRunsForLine): Added calls to commitExplicitEmbedding() after calling embed() and after calling increment(). * rendering/bidi.cpp: (WebCore::bidiFirst): Added calls to commitExplicitEmbedding() because this function increments the resolver. (WebCore::RenderBlock::skipLeadingWhitespace): Ditto. 2008-10-23 Jan Michael Alonzo Gtk build fix. Not reviewed. Add DNSCurl and DNSSoup to the Gtk build * GNUmakefile.am: * platform/gtk/TemporaryLinkStubs.cpp: * platform/network/soup/DNSSoup.cpp: Copied from WebCore/platform/network/curl/DNSCurl.cpp. (WebCore::prefetchDNS): 2008-10-23 Eric Seidel Reviewed by Sam Weinig. Un-break the Darwin build. * platform/graphics/cg/GraphicsContextPlatformPrivateCG.h: * platform/graphics/cg/ImageCG.cpp: 2008-10-23 Darin Fisher Reviewed by Eric Seidel. Fix forward decls to be struct instead of class. https://bugs.webkit.org/show_bug.cgi?id=21838 * rendering/style/StyleRareInheritedData.h: * rendering/style/StyleRareNonInheritedData.h: 2008-10-23 Brent Fulgham Reviewed by Oliver Hunt. * platform/network/curl/ResourceRequest.h: A better implementation of CFURLRequest, rather than void*. This gives better compatibility with the WebKit.idl interface. (WebCore::ResourceRequest::cfURLRequest): 2008-10-23 Mike Pinkerton Reviewed by Eric Seidel. PLATFORM(CHROMIUM) uses CG the same way PLATFORM(MAC) does so fix ifdefs to reflect that. * platform/graphics/cg/GraphicsContextPlatformPrivateCG.h: * platform/graphics/cg/ImageCG.cpp: 2008-10-23 Peter Kasting Reviewed by Adam Roben. https://bugs.webkit.org/show_bug.cgi?id=21833 Place JavaScript Debugger hooks under #if ENABLE(JAVASCRIPT_DEBUGGER). * inspector/InspectorController.cpp: (WebCore::InspectorController::InspectorController): (WebCore::InspectorController::setWindowVisible): (WebCore::InspectorController::windowScriptObjectAvailable): (WebCore::InspectorController::close): * inspector/InspectorController.h: * page/Page.cpp: (WebCore::Page::Page): 2008-10-23 Kevin McCullough Reviewed by Tim Hatcher. https://bugs.webkit.org/show_bug.cgi?id=21817 Bug 21817: Manual profiler tests should be made into layout tests -Moving the tests before diffing so that it's clear what changed. * manual-tests/inspector/profiler-test-anonymous-event-handler.html: Removed. * manual-tests/inspector/profiler-test-anonymous-function-called-from-different-contexts.html: Removed. * manual-tests/inspector/profiler-test-anonymous-function-calls-built-in-functions.html: Removed. * manual-tests/inspector/profiler-test-anonymous-function-calls-eval.html: Removed. * manual-tests/inspector/profiler-test-apply.html: Removed. * manual-tests/inspector/profiler-test-built-in-function-calls-anonymous.html: Removed. * manual-tests/inspector/profiler-test-built-in-function-calls-user-defined-function.html: Removed. * manual-tests/inspector/profiler-test-call-nodelist-as-function.html: Removed. * manual-tests/inspector/profiler-test-calling-the-function-that-started-the-profiler-from-another-scope.html: Removed. * manual-tests/inspector/profiler-test-compare-multiple-profiles.html: Removed. * manual-tests/inspector/profiler-test-constructor.html: Removed. * manual-tests/inspector/profiler-test-dead-time.html: Removed. * manual-tests/inspector/profiler-test-deep-recursion.html: Removed. * manual-tests/inspector/profiler-test-document-dot-write.html: Removed. * manual-tests/inspector/profiler-test-event-handler.html: Removed. * manual-tests/inspector/profiler-test-execution-context-and-eval-on-same-line.html: Removed. * manual-tests/inspector/profiler-test-heavy-view.html: Removed. * manual-tests/inspector/profiler-test-inline-event-handler.html: Removed. * manual-tests/inspector/profiler-test-multiple-and-different-scoped-anonymous-function-calls.html: Removed. * manual-tests/inspector/profiler-test-multiple-and-different-scoped-function-calls.html: Removed. * manual-tests/inspector/profiler-test-multiple-frames.html: Removed. * manual-tests/inspector/profiler-test-multiple-windows.html: Removed. * manual-tests/inspector/profiler-test-nested-anonymous-functon.html: Removed. * manual-tests/inspector/profiler-test-nested-start-and-stop-profiler.html: Removed. * manual-tests/inspector/profiler-test-no-execution-context.html: Removed. * manual-tests/inspector/profiler-test-one-execution-context.html: Removed. * manual-tests/inspector/profiler-test-profile-calls-in-included-file.html: Removed. * manual-tests/inspector/profiler-test-profiling-from-a-nested-location-but-stop-profiling-outside-the-nesting.html: Removed. * manual-tests/inspector/profiler-test-profiling-from-a-nested-location.html: Removed. * manual-tests/inspector/profiler-test-simple-event-call.html: Removed. * manual-tests/inspector/profiler-test-simple-no-level-change.html: Removed. * manual-tests/inspector/profiler-test-start-and-stop-profiler-multiple-times.html: Removed. * manual-tests/inspector/profiler-test-start-and-stop-profiling-in-the-same-function.html: Removed. * manual-tests/inspector/profiler-test-start-but-dont-stop-profiling.html: Removed. * manual-tests/inspector/profiler-test-stop-profiling-after-setTimeout.html: Removed. * manual-tests/inspector/profiler-test-stop-then-function-call.html: Removed. * manual-tests/inspector/profiler-test-throw-exception-from-eval.html: Removed. * manual-tests/inspector/profiler-test-two-execution-contexts.html: Removed. * manual-tests/inspector/profiler-test-user-defined-function-calls-built-in-functions.html: Removed. * manual-tests/inspector/profiler-test-window-dot-eval.html: Removed. * manual-tests/inspector/resources/other-frame.html: Removed. * manual-tests/inspector/resources/other-window.html: Removed. * manual-tests/inspector/resources/profiler-test-JS-resources.js: Removed. 2008-10-23 Adam Barth Reviewed by Sam Weinig. https://bugs.webkit.org/show_bug.cgi?id=21826 Add accessor for SecurityOrigin::m_domainWasSetInDOM. * page/SecurityOrigin.h: (WebCore::SecurityOrigin::domainWasSetInDOM): 2008-10-23 Darin Adler - roll out https://bugs.webkit.org/show_bug.cgi?id=21732 * bindings/js/ScheduledAction.h: * inspector/InspectorController.cpp: ProtectedPtr instead of ProtectedPtr. 2008-10-23 Simon Hausmann Fix the Qt build. * bridge/qt/qt_runtime.cpp: (JSC::Bindings::QtConnectionObject::execute): * bridge/qt/qt_runtime.h: (JSC::Bindings::QtRuntimeMethod::createStructureID): 2008-10-23 Alexey Proskuryakov Reviewed by Maciej Stachowiak. https://bugs.webkit.org/show_bug.cgi?id=21825 JSDOMBinding should not blindly cast the global object to JSDOMWindow * bindings/js/JSDOMGlobalObject.cpp: * bindings/js/JSDOMGlobalObject.h: * GNUmakefile.am: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * WebCoreSources.bkl: Added JSDOMGlobalObject, a base class to be used by both Window and worker contexts. * bindings/js/JSDOMBinding.cpp: (WebCore::getCachedDOMStructure): (WebCore::cacheDOMStructure): (WebCore::getCachedDOMConstructor): (WebCore::cacheDOMConstructor): Cast to JSDOMGlobalObject, as DOM objects live in DOM global objects. * bindings/js/JSDOMWindowBase.cpp: (WebCore::JSDOMWindowBase::JSDOMWindowBase): * bindings/js/JSDOMWindowBase.h: * bindings/js/JSDOMWindowCustom.cpp: (WebCore::JSDOMWindow::mark): Moved constructor and structure tracking to JSDOMGlobalObject. 2008-10-23 Adam Barth Reviewed by Sam Weinig. https://bugs.webkit.org/show_bug.cgi?id=21787 Update postMessage to send origin = "null" for non-serializable origins to match latest spec. Merge SecurityOrigin::toString and SecurityOrigin::toHTTPOrigin because they are now the same. Test: http/tests/security/postMessage/data-url-sends-null-origin.html * loader/FrameLoader.cpp: (WebCore::FrameLoader::outgoingOrigin): (WebCore::FrameLoader::loadURL): (WebCore::FrameLoader::addHTTPOriginIfNeeded): (WebCore::FrameLoader::loadItem): * loader/loader.cpp: (WebCore::Loader::Host::servePendingRequests): * page/SecurityOrigin.cpp: (WebCore::SecurityOrigin::toString): * page/SecurityOrigin.h: * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::makeSimpleCrossSiteAccessRequest): (WebCore::XMLHttpRequest::makeCrossSiteAccessRequestWithPreflight): (WebCore::XMLHttpRequest::handleAsynchronousPreflightResult): (WebCore::XMLHttpRequest::didReceiveResponsePreflight): 2008-10-22 David Kilzer Bug 21781: WebCore::Settings should have a maximum decoded image size setting Reviewed by Antti. No tests since there is no change in behavior. * loader/CachedImage.cpp: (WebCore::CachedImage::maximumDecodedImageSize): Added. Returns WebCore::Settings::maximumDecodedImageSize() or 0 on error. (WebCore::CachedImage::data): Flag an error if the image being loaded is too big. * loader/CachedImage.h: (WebCore::CachedImage::maximumDecodedImageSize): Added declaration. * page/Settings.cpp: (WebCore::Settings::Settings): Initialize m_maximumDecodedImageSize to the maximum value of size_t. * page/Settings.h: (WebCore::Settings::setMaximumDecodedImageSize): Added method. (WebCore::Settings::maximumDecodedImageSize): Ditto. 2008-10-22 Mike Pinkerton Reviewed by Dan Bernstein. Landed and tweaked a bit by Darin Adler. - fix https://bugs.webkit.org/show_bug.cgi?id=21809 Remove PLATFORM(MAC) wrapping USE(ATSUI). It's redundant and inhibits its use for PLATFORM(CHROMIUM) in the future. * platform/graphics/SimpleFontData.h: 2008-10-22 David Smith Reviewed by Anders Carlsson. https://bugs.webkit.org/show_bug.cgi?id=19974 getElementsByClassName not live enough Test: fast/dom/getElementsByClassName/015.html * dom/StyledElement.cpp: (WebCore::StyledElement::classAttributeChanged): call dispatchSubtreeModifiedEvent() 2008-10-22 Darin Adler Reviewed by Sam Weinig. - fix https://bugs.webkit.org/show_bug.cgi?id=21294 Bug 21294: Devirtualize getOwnPropertySlot() * bindings/js/JSDOMWindowShell.h: (WebCore::JSDOMWindowShell::createStructureID): Added. Returns a structure without HasStandardGetOwnPropertySlot since this class overrides getOwnPropertySlot. * bindings/js/JSInspectorCallbackWrapper.cpp: (WebCore::JSInspectorCallbackWrapper::wrap): Change to use a unique structure for this class rather than sharing nullProtoStructureID, which no longer exists. * bindings/js/JSNamedNodesCollection.h: (WebCore::JSNamedNodesCollection::createStructureID): Added. Returns a structure without HasStandardGetOwnPropertySlot since this class overrides getOwnPropertySlot. * bindings/js/JSRGBColor.h: (WebCore::JSRGBColor::createStructureID): Ditto. * bindings/scripts/CodeGeneratorJS.pm: Added createStructureID functions for the wrappers, constructors, and prototypes in any case where they override getOwnPropertySlot, without HasStandardGetOwnPropertySlot. * bridge/objc/objc_runtime.h: (JSC::Bindings::ObjcFallbackObjectImp::createStructureID): Added. Returns a structure without HasStandardGetOwnPropertySlot since this class overrides getOwnPropertySlot. * bridge/qt/qt_runtime.h: (JSC::Bindings::QtRuntimeMethod::createStructureID): Ditto. * bridge/runtime_array.h: (JSC::RuntimeArray::createStructureID): Ditto. * bridge/runtime_method.h: (JSC::RuntimeMethod::createStructureID): Ditto. * bridge/runtime_object.h: (JSC::RuntimeObjectImp::createStructureID): Ditto. 2008-10-22 Brent Fulgham Bring Windows Cairo Port's font handling in line with CG. http://bugs.webkit.org/show_bug.cgi?id=21812. Reviewed by Adam Roben. * platform/graphics/win/FontCacheWin.cpp: (WebCore::createGDIFont): Remove unnecessary special-case for Cairo TrueType font search. It should match CG in all font selections. 2008-10-22 Brent Fulgham http://bugs.webkit.org/show_bug.cgi?id=21812. Bring Windows Cairo Port's font handling in line with CG. Reviewed by David Hyatt. * platform/graphics/win/FontCacheWin.cpp: (WebCore::createGDIFont): Remove unnecessary special-case for Cairo TrueType font search. It should match CG in all font selections. 2008-10-22 Brady Eidson Reviewed by Adam Roben - autocomplete="off" doesn't work on Windows Visual Studio makes a poor decision regarding the combination of enums and bitfields, such that a statement like "m_autocomplete = Off" followed by "return m_autocomplete == Off" would return "false" instead of the much more correct "true." In the past we have worked around this by declaring the bitfield member as an unsigned instead of the enum type. For more discussion, see http://trac.webkit.org/changeset/25329 * html/HTMLInputElement.h: Work around insane Visual Studio enum issue *sigh* 2008-10-22 Kevin McCullough Reviewed by Oliver Hunt and Tim Hatcher. https://bugs.webkit.org/show_bug.cgi?id=19225 Bug 19225: JSProfiler: Create automated profiler tests - This change exports profiles on the console object so that they can be iterated over via JavaScript, and thus can be used in automated tests. * bindings/js/JSConsoleCustom.cpp: Get the profiles and return an array that JS can use. (WebCore::JSConsole::profiles): * inspector/InspectorController.h: Use the new typedef. (WebCore::InspectorController::profiles): * page/Console.cpp: Keep our own array of profile objects. (WebCore::Console::profileEnd): * page/Console.h: Ditto. (WebCore::Console::profiles): * page/Console.idl: Expose the profiles to JS. 2008-10-22 David Hyatt https://bugs.webkit.org/show_bug.cgi?id=21775 Convert buttons over to use the new Theme API on OS X. Reviewed by Adam Roben * platform/LengthBox.h: (WebCore::LengthBox::LengthBox): * platform/Theme.cpp: (WebCore::Theme::controlBorder): (WebCore::Theme::controlPadding): * platform/Theme.h: (WebCore::Theme::controlFont): (WebCore::Theme::controlSize): (WebCore::Theme::minControlSize): (WebCore::Theme::controlRequiresPreWhiteSpace): * platform/mac/ThemeMac.h: (WebCore::ThemeMac::controlRequiresPreWhiteSpace): * platform/mac/ThemeMac.mm: (WebCore::checkboxSize): (WebCore::radioSize): (WebCore::buttonSizes): (WebCore::buttonMargins): (WebCore::button): (WebCore::paintButton): (WebCore::ThemeMac::controlFont): (WebCore::ThemeMac::controlSize): (WebCore::ThemeMac::minControlSize): (WebCore::ThemeMac::controlBorder): (WebCore::ThemeMac::controlPadding): (WebCore::ThemeMac::inflateControlPaintRect): (WebCore::ThemeMac::paint): * rendering/RenderTheme.cpp: (WebCore::RenderTheme::adjustStyle): (WebCore::RenderTheme::paint): (WebCore::RenderTheme::controlStatesForRenderer): (WebCore::RenderTheme::isDefault): (WebCore::RenderTheme::adjustRadioStyle): * rendering/RenderTheme.h: (WebCore::RenderTheme::setRadioSize): * rendering/RenderThemeMac.h: * rendering/RenderThemeMac.mm: (WebCore::RenderThemeMac::adjustRepaintRect): (WebCore::menuListButtonSizes): (WebCore::RenderThemeMac::adjustMenuListStyle): * rendering/style/RenderStyle.h: (WebCore::InheritedFlags::paddingBox): (WebCore::InheritedFlags::setPaddingBox): 2008-10-22 Chris Marrin Reviewed by Dave Hyatt Make sure that the AtomicString that identifies a set of animation keyframes stays live by keeping a copy in the WebKitCSSKeyframesRule. Also call styleSheetChanged() when the keyframes name changes, but add an internal method that doesn't call styleSheetChanged() for use during normal stylesheet parsing. Test: animations/change-keyframes-name.html * css/CSSGrammar.y: * css/WebKitCSSKeyframesRule.cpp: (WebCore::WebKitCSSKeyframesRule::setName): * css/WebKitCSSKeyframesRule.h: (WebCore::WebKitCSSKeyframesRule::setNameInternal): 2008-10-22 Alexey Proskuryakov Reviewed by Sam Weinig. https://bugs.webkit.org/show_bug.cgi?id=21791 WebCore JS bindings should be able to use non-static hash tables for properties Add a map for HashTables to WebCore JS client data. This makes property access noticeably slower, so it is an opt-in. For classes that need to be supported in workers in forseeable future this is not critical. * bindings/js/JSDOMBinding.cpp: (WebCore::DOMObjectHashTableMap::get): (WebCore::DOMObjectHashTableMap::mapFor): (WebCore::getHashTableForGlobalData): (WebCore::DOMObjectWrapperMap::mapFor): WebCore client data is now a class that contains both a DOM wrapper map and a property hash table one. * bindings/js/JSDOMBinding.h: Added getHashTableForGlobalData() to query the hash table map. * bindings/scripts/CodeGeneratorJS.pm: If the class has a NoStaticTables attribute, use JSDOMBinding map to access its property hash tables. * dom/MessageChannel.idl: * dom/MessagePort.idl: Added NoStaticTables attribute. 2008-10-22 Gustavo Noronha Silva Reviewed by Timothy Hatcher. Build failure because of missing include https://bugs.webkit.org/show_bug.cgi?id=21765 Build failure fix for WebKit/GTK+; added missing include (GOwnPtr.h) * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp: 2008-10-22 Alp Toker Reviewed by Adam Roben. Fix crashes on older GTK+ versions (2.8). gtk_widget_style_get() doesn't initialize values if the requested property doesn't exist, so initialize the values to the documented defaults before calling it where necessary. Additionally, avoid critical warnings by not calling gtk_widget_style_get() when we know the property isn't available. Note that this is an imported source file which doesn't follow the WebKit coding style. * platform/gtk/gtk2drawing.c: (moz_gtk_init): (moz_gtk_button_get_inner_border): (moz_gtk_combo_box_paint): (moz_gtk_toolbar_separator_paint): (moz_gtk_menu_separator_paint): (moz_gtk_get_widget_border): (moz_gtk_get_tab_scroll_arrow_size): (moz_gtk_get_toolbar_separator_width): (moz_gtk_get_menu_separator_height): 2008-10-22 Alp Toker Fix build for Cairo 1.2. * platform/graphics/cairo/GraphicsContextCairo.cpp: (WebCore::GraphicsContext::clipOut): * platform/gtk/RenderThemeGtk.cpp: (WebCore::paintMozWidget): 2008-10-22 Darin Fisher Reviewed by Eric Seidel. A little more PLATFORM(CHROMIUM) in WebCore https://bugs.webkit.org/show_bug.cgi?id=21758 * page/AccessibilityObject.h: * platform/graphics/Icon.h: 2008-10-21 Alexey Proskuryakov Reviewed by Darin Adler. Test: fast/events/message-channel-gc-3.html https://bugs.webkit.org/show_bug.cgi?id=21769 MessagePort should be GC protected if there are messages to be delivered * dom/MessagePort.h: Removed pending activity count. Now we track if a close event is pending, and check if the queue is non-empty. (WebCore::MessagePort::workerContext): Added a stub implementation for a cross-heap GC bug fix (below). * dom/MessagePort.cpp: (WebCore::CloseMessagePortTimer::fired): (WebCore::MessagePort::MessagePort): (WebCore::MessagePort::queueCloseEvent): (WebCore::MessagePort::dispatchCloseEvent): (WebCore::MessagePort::hasPendingActivity): Track message and close event activity separately. * bindings/js/JSDOMBinding.cpp: (WebCore::markCrossHeapDependentObjectsForDocument): Fixed a bug in cross-heap GC that was causing same-heap ports to never be deleted. 2008-10-21 Dan Bernstein Reviewed by Sam Weinig. - remove unreachable code * platform/text/BidiResolver.h: (WebCore::::embed): 2008-10-21 Beth Dakin Reviewed by Darin Adler. Fix for https://bugs.webkit.org/show_bug.cgi?id=20352 REGRESSION(r31030-31055): Choosing "Print window" from frame set prints blank page and corresponding: viewHeight() and viewWidth() only return valuable information if we are not printing. Everywhere else in the code, we make sure we are not printing before we call these functions. Adding a check for printing here fixes this bug, and framesets print again. * rendering/RenderFrameSet.cpp: (WebCore::RenderFrameSet::layout): 2008-10-21 Yael Aharon Reviewed by Simon. Pixmap in canvas tag was not getting initialized. See https://bugs.webkit.org/show_bug.cgi?id=21771 * platform/graphics/qt/ImageBufferQt.cpp: (WebCore::ImageBuffer::create): 2008-10-20 Simon Fraser Reviewed by Dan Bernstein Add a comment explaining layoutDelta(), and an assertion that checks that delta changes were correctly paired during layout. * rendering/RenderView.cpp: (WebCore::RenderView::layout): * rendering/RenderView.h: 2008-10-20 Timothy Hatcher Make auto-complete only suggest properties that are valid syntax when using dot-notation. Also when completing numeric properties, the quotes are omitted inside the brackets. https://bugs.webkit.org/show_bug.cgi?id=21760 https://bugs.webkit.org/show_bug.cgi?id=21761 Reviewed by Oliver Hunt. * inspector/front-end/Console.js: (WebInspector.Console.prototype.completions): Skip properties that are not valid identifies when using dot-notation. And omit the quotes when completing numbers in bracket-notation. 2008-10-20 Timothy Hatcher Fixes the Profiles panel in the Web Inspector, which was broken by the JSValue base-class changes. Also renames some functions and variables in JavaScriptProfileNode.cpp that where title case. https://bugs.webkit.org/show_bug.cgi?id=21764 Reviewed by Oliver Hunt. * inspector/JavaScriptProfile.cpp: (WebCore::toJS): Use a JSObject pointer instead of JSValuePtr so the returned JSValuePtr will be treated as an object and not a value. * inspector/JavaScriptProfileNode.cpp: (WebCore::toJS): Ditto. 2008-10-20 Sam Weinig Reviewed by Anders Carlsson. Remove FrameLoaderClient::detachedFromParent4. It is no longer used by any port. * loader/EmptyClients.h: (WebCore::EmptyFrameLoaderClient::detachedFromParent4):. * loader/FrameLoader.cpp: (WebCore::FrameLoader::detachFromParent): * loader/FrameLoaderClient.h: 2008-10-20 Antti Koivisto Reviewed by Adele Peterson. Fix https://bugs.webkit.org/show_bug.cgi?id=21763 REGRESSION (r36108-r36113): Can't load picture content on wired.com galleries Reviewed by Mark Rowe. Work around . Don't assert that loads are deferred when we're using CFNetwork on Mac or Windows. * loader/MainResourceLoader.cpp: (WebCore::MainResourceLoader::didReceiveResponse): (WebCore::MainResourceLoader::didReceiveData): (WebCore::MainResourceLoader::didFinishLoading): (WebCore::MainResourceLoader::didFail): 2008-10-20 Beth Dakin Reviewed by Adele Peterson. Speculative fix for CrashTracer: [USER] 19 crashes in Safari at com.apple.WebCore WebCore::ScrollView::visibleContentRect const + 153 d->m_view can be null and is null-checked at other points in the code. The logs indicate that this crash occurs when closing a window containing a PDF, so in case where we crash, the PDF's view is probably already null. So the fix is to simply add a null-check. * page/Frame.cpp: (WebCore::Frame::selectionRect): 2008-10-20 Adele Peterson Reviewed by Darin Adler. * html/HTMLFormElement.cpp: (WebCore::HTMLFormElement::formData): Removed stray increment that would screw up any form with multiple files in it. 2008-10-20 Sam Weinig Rubber-stamped by David Hyatt. Split LengthBox and LengthSize into their own files. * GNUmakefile.am: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * platform/Length.h: (WebCore::Length::blend): * platform/LengthBox.h: Copied from platform/Length.h. (WebCore::LengthBox::LengthBox): (WebCore::LengthBox::nonZero): * platform/LengthSize.h: Copied from platform/Length.h. (WebCore::LengthSize::LengthSize): (WebCore::LengthSize::setWidth): (WebCore::LengthSize::setHeight): (WebCore::LengthSize::height): * platform/Theme.h: * rendering/style/FillLayer.h: * rendering/style/NinePieceImage.h: (WebCore::NinePieceImage::NinePieceImage): * rendering/style/RenderStyle.h: * rendering/style/StyleDashboardRegion.h: * rendering/style/StyleSurroundData.h: * rendering/style/StyleVisualData.h: 2008-10-20 Dan Bernstein - Mac build fix * WebCore.xcodeproj/project.pbxproj: 2008-10-20 Alp Toker Fix autotools dist build target by listing recently added header files only. Not reviewed. * GNUmakefile.am: 2008-10-20 David Hyatt Clean up some USE(NEW_THEME) ifdefs (I botched one of them and have broken non-Mac platforms). Also refactor some of the code that I put in ThemeMac to be cross-platform, since it was in RenderTheme.cpp originally. ifdef some methods in RenderTheme.cpp also that are no longer needed with the new Theme. Reviewed by Adam Roben * WebCore.xcodeproj/project.pbxproj: * platform/Theme.cpp: Added. (WebCore::Theme::controlSupportsBorder): (WebCore::Theme::controlSupportsPadding): * platform/Theme.h: * platform/mac/ThemeMac.h: * platform/mac/ThemeMac.mm: * rendering/RenderTheme.cpp: (WebCore::RenderTheme::adjustStyle): * rendering/RenderTheme.h: 2008-10-20 David Hyatt Rename LengthBox's members to have m_ in front of them. Reviewed by Sam Weinig * css/CSSComputedStyleDeclaration.cpp: (WebCore::valueForNinePieceImage): (WebCore::getPositionOffsetValue): (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::mapNinePieceImage): * platform/Length.h: (WebCore::LengthBox::LengthBox): (WebCore::LengthBox::left): (WebCore::LengthBox::right): (WebCore::LengthBox::top): (WebCore::LengthBox::bottom): (WebCore::LengthBox::operator==): (WebCore::LengthBox::nonZero): * rendering/RenderObject.cpp: (WebCore::RenderObject::paintNinePieceImage): (WebCore::RenderObject::addDashboardRegions): * rendering/style/RenderStyle.cpp: (WebCore::positionedObjectMoved): (WebCore::RenderStyle::setClip): (WebCore::RenderStyle::noneDashboardRegions): * rendering/style/RenderStyle.h: (WebCore::InheritedFlags::left): (WebCore::InheritedFlags::right): (WebCore::InheritedFlags::top): (WebCore::InheritedFlags::bottom): (WebCore::InheritedFlags::clipLeft): (WebCore::InheritedFlags::clipRight): (WebCore::InheritedFlags::clipTop): (WebCore::InheritedFlags::clipBottom): (WebCore::InheritedFlags::marginTop): (WebCore::InheritedFlags::marginBottom): (WebCore::InheritedFlags::marginLeft): (WebCore::InheritedFlags::marginRight): (WebCore::InheritedFlags::paddingTop): (WebCore::InheritedFlags::paddingBottom): (WebCore::InheritedFlags::paddingLeft): (WebCore::InheritedFlags::paddingRight): (WebCore::InheritedFlags::setLeft): (WebCore::InheritedFlags::setRight): (WebCore::InheritedFlags::setTop): (WebCore::InheritedFlags::setBottom): (WebCore::InheritedFlags::setDashboardRegion): (WebCore::InheritedFlags::setClipLeft): (WebCore::InheritedFlags::setClipRight): (WebCore::InheritedFlags::setClipTop): (WebCore::InheritedFlags::setClipBottom): (WebCore::InheritedFlags::setMarginTop): (WebCore::InheritedFlags::setMarginBottom): (WebCore::InheritedFlags::setMarginLeft): (WebCore::InheritedFlags::setMarginRight): (WebCore::InheritedFlags::setPaddingTop): (WebCore::InheritedFlags::setPaddingBottom): (WebCore::InheritedFlags::setPaddingLeft): (WebCore::InheritedFlags::setPaddingRight): 2008-10-20 Timothy Hatcher Make the Resource panel perform graph updates atomically, so when resources are added the graph and summary graph update at the same time. https://bugs.webkit.org/show_bug.cgi?id=21755 Reviewed by Kevin McCullough. * inspector/front-end/Resource.js: (WebInspector.Resource.prototype.get startTime): Return -1 if the _startTime property is undefined, null or 0. This allows callers to check for -1 and not the other values when there is no startTime yet. (WebInspector.Resource.prototype.get responseReceivedTime): Ditto. (WebInspector.Resource.prototype.get endTime): Ditto. (WebInspector.Resource.prototype.get duration): Remove an extra empty line. (WebInspector.Resource.prototype.get latency): Ditto. (WebInspector.Resource.prototype.get contentLength): Return 0 if the _duration property is undefined or null. This allows callers to always assume a number. (WebInspector.Resource.prototype.get expectedContentLength): Ditto. (WebInspector.Resource.prototype.get errors): Simplify the case where there is no _errors property yet. (WebInspector.Resource.prototype.set errors): Remove the check if the new value if the same as the previous value, since there is no work to guard. (WebInspector.Resource.prototype.get warnings): Simplify the case where there is no _warnings property yet. (WebInspector.Resource.prototype.set warnings): Remove the check if the new value if the same as the previous value, since there is no work to guard. (WebInspector.Resource.CompareByResponseReceivedTime): Add cases for when the responseReceivedTime is -1. (WebInspector.Resource.CompareByEndTime): Add cases for when the endTime is -1. * inspector/front-end/ResourcesPanel.js: (WebInspector.ResourcesPanel.prototype.get searchableViews): If a resource does not have a _resourcesTreeElement yet, exclude it from the searchable views. (WebInspector.ResourcesPanel.prototype.set calculator): Set _staleResource to _resources and call refresh to refresh the entire graph. (WebInspector.ResourcesPanel.prototype.set needsRefresh): Set a timeout if the panel is visible that calls refresh. (WebInspector.ResourcesPanel.prototype.refresh): Create the resource tree element and graph for a resource if it hasn't been created yet. If the boundaries changed during the first stale resource pass, do a full pass of all resources when updating the graphs. (WebInspector.ResourcesPanel.prototype.reset): Remove the legend items. (WebInspector.ResourcesPanel.prototype.addResource): Don't create the tree element and graph, these are now created during the first refresh. (WebInspector.ResourcesPanel.prototype.removeResource): Null check _resourcesTreeElement. (WebInspector.ResourcesPanel.prototype.addMessageToResource): Ditto. (WebInspector.ResourcesPanel.prototype.clearMessages): Ditto. (WebInspector.ResourcesPanel.prototype.refreshResource): Remove most of the work, just add the resource to the _staleResources and set needsRefresh. (WebInspector.ResourcesPanel.prototype.recreateViewForResourceIfNeeded): Null check _resourcesTreeElement. (WebInspector.ResourcesPanel.prototype._sortResourcesIfNeeded): Remove code to clear the timeout used by the deleted _sortResourcesSoonIfNeeded. Remove call to removeChild since the insertBefore call will do it if needed. (WebInspector.ResourcesPanel.prototype._updateGraphDividersIfNeeded): Remove code to clear the timeout used by the deleted _updateGraphDividersSoonIfNeeded. (WebInspector.ResourcesPanel.prototype._updateSummaryGraph): Remove code to clear the timeout used by the deleted _updateSummaryGraphSoon. No need to remove the totalLegendLabel, since all the legend items are removed in one pass right before. (WebInspector.ResourcesPanel.prototype._changeSortingFunction): Set the sortingFunction before the calculator so the correct sortingFunction is there when a refresh happens. (WebInspector.ResourceTimeCalculator.prototype.computeBarGraphPercentages): Set start to 0 when the startTime is -1, since that looks best visually. Also set middle and end to the start and middle (respectfully) when startAtZero. This looks best visually. (WebInspector.ResourceGraph): Start the graph as hidden until the first refresh. (WebInspector.ResourceGraph.prototype.refresh): Remove the hidden class. 2008-10-20 David Hyatt https://bugs.webkit.org/show_bug.cgi?id=21733 Make sure that the haveMetadata flag is set to true for generated images from image buffers, so that no attempt is made to re-cache the frame from a non-existent image source. Reviewed by Sam Weinig * platform/graphics/cairo/ImageCairo.cpp: (WebCore::BitmapImage::BitmapImage): * platform/graphics/cg/ImageCG.cpp: (WebCore::BitmapImage::BitmapImage): 2008-10-20 Dan Bernstein Reviewed by John Sullivan. - make hasARenderedDescendant() have internal linkage * editing/CompositeEditCommand.cpp: (WebCore::hasARenderedDescendant): 2008-10-20 Chris Fleizach Reviewed by Jon Honeycutt Fix a crash in Accessibility where a table section was being referenced without first checking if it was null https://bugs.webkit.org/show_bug.cgi?id=21721 Test: accessibility/table-nofirstbody.html * page/AccessibilityTable.cpp: (WebCore::AccessibilityTable::addChildren): 2008-10-20 David Hyatt Avoid some stderr spew from CG by checking if we have a decoder yet in ImageSourceCG. Reviewed by Darin Adler * platform/graphics/cg/ImageSourceCG.cpp: (WebCore::ImageSource::repetitionCount): (WebCore::ImageSource::frameDurationAtIndex): 2008-10-20 Alp Toker Reviewed by Mark Rowe. Fix the pthread conditionals in the FTP code to correctly define threadsafe *_r functions on Windows. Partly fixes the GTK+/Win32 build. * loader/FTPDirectoryDocument.cpp: * loader/FTPDirectoryParser.cpp: 2008-10-20 David Hyatt https://bugs.webkit.org/show_bug.cgi?id=21751 Convert checkboxes and radio buttons on OS X over to the new Theme API. Reviewed by Adam Roben * css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::mapFillSize): * platform/Length.h: (WebCore::LengthSize::LengthSize): (WebCore::LengthSize::operator==): (WebCore::LengthSize::width): (WebCore::LengthSize::height): (WebCore::LengthSize::setWidth): (WebCore::LengthSize::setHeight): * platform/Theme.h: (WebCore::Theme::controlSize): (WebCore::Theme::controlSupportsBorder): (WebCore::Theme::controlSupportsPadding): (WebCore::Theme::paint): (WebCore::Theme::inflateControlPaintRect): * platform/ThemeTypes.h: (WebCore::): * platform/mac/ThemeMac.h: * platform/mac/ThemeMac.mm: (WebCore::): (WebCore::controlSizeForFont): (WebCore::sizeFromFont): (WebCore::setControlSize): (WebCore::updateStates): (WebCore::inflateRect): (WebCore::checkboxSizes): (WebCore::checkboxMargins): (WebCore::checkboxSize): (WebCore::checkbox): (WebCore::paintCheckbox): (WebCore::radioSizes): (WebCore::radioMargins): (WebCore::radioSize): (WebCore::radio): (WebCore::paintRadio): (WebCore::ThemeMac::baselinePositionAdjustment): (WebCore::ThemeMac::controlSize): (WebCore::ThemeMac::controlSupportsBorder): (WebCore::ThemeMac::controlSupportsPadding): (WebCore::ThemeMac::inflateControlPaintRect): (WebCore::ThemeMac::paint): * rendering/RenderBox.cpp: (WebCore::RenderBox::calculateBackgroundSize): * rendering/RenderObject.cpp: (WebCore::mustRepaintFillLayers): * rendering/RenderTheme.cpp: (WebCore::RenderTheme::adjustStyle): (WebCore::RenderTheme::paint): (WebCore::RenderTheme::baselinePosition): (WebCore::RenderTheme::adjustRepaintRect): (WebCore::RenderTheme::controlStatesForRenderer): (WebCore::RenderTheme::isFocused): * rendering/RenderTheme.h: * rendering/RenderThemeMac.h: * rendering/RenderThemeMac.mm: (WebCore::RenderThemeMac::adjustRepaintRect): * rendering/style/FillLayer.cpp: (WebCore::FillLayer::operator==): 2008-10-18 Geoffrey Garen Reviewed by Darin Adler. Fixed https://bugs.webkit.org/show_bug.cgi?id=21735 Emit profiling instrumentation only if the Web Inspector's profiling feature is enabled * bindings/js/JSDOMWindowBase.cpp: (WebCore::JSDOMWindowBase::supportsProfiling): * bindings/js/JSDOMWindowBase.h: Implemented the interface for specifying whether a target global object has the Web Inspector's profiling feature enabled. * inspector/JavaScriptDebugServer.cpp: (WebCore::JavaScriptDebugServer::recompileAllJSFunctionsSoon): (WebCore::JavaScriptDebugServer::didAddListener): (WebCore::JavaScriptDebugServer::didRemoveListener): * inspector/JavaScriptDebugServer.h: Exported an API for recompiling, used by the Settings object. * page/Settings.cpp: (WebCore::Settings::Settings): (WebCore::Settings::setDeveloperExtrasEnabled): * page/Settings.h: Recompile when the developer menu is enabled/disabled for the first time, to add/remove profiling hooks. In the future, with better Web Inspector UI, we can do this on a page-by-page basis, instead of a global basis. 2008-10-20 David Hyatt Move Length to platform/. Reviewed by Adam Roben * GNUmakefile.am: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * WebCoreSources.bkl: * platform/Length.cpp: Copied from rendering/Length.cpp. * platform/Length.h: Copied from rendering/Length.h. 2008-10-20 Darin Adler - try to fix Qt build * bridge/qt/qt_runtime.cpp: (JSC::Bindings::QtRuntimeMetaMethod::connectGetter): Add asObject calls. (JSC::Bindings::QtRuntimeMetaMethod::disconnectGetter): Ditto. 2008-10-20 Darin Adler - try to fix Qt build * bridge/qt/qt_instance.cpp: (JSC::Bindings::QtInstance::mark): Use JSValue* instead of JSValuePtr. (JSC::Bindings::QtField::valueFromInstance): Ditto. * bridge/qt/qt_instance.h: Ditto. 2008-10-20 Darin Adler - try to fix Tiger build * bridge/objc/objc_instance.mm: (ObjcInstance::invokeMethod): Add a const_cast to remove the unwanted volatile qualifier. (ObjcInstance::invokeDefaultMethod): Ditto. (ObjcInstance::getValueOfUndefinedField): Ditto. * bridge/objc/objc_runtime.mm: (JSC::Bindings::ObjcField::valueFromInstance): Ditto. 2008-10-20 Alexey Proskuryakov Reviewed by Darin Adler. https://bugs.webkit.org/show_bug.cgi?id=21750 Eliminate the notion of "temporary events" We mark some events as temporary when dispatching, for the sole reason of manually calling forgetDOMObject when done dispatching. There doesn't seem to be any reason to call it manually, as JSEvent destructor will do this automatically right away. * bindings/js/ScriptController.cpp: * bindings/js/ScriptController.h: Removed ScriptController::finishedWithEvent(), which was called after dispatching a temporary event. * dom/ContainerNode.cpp: (WebCore::dispatchChildInsertionEvents): (WebCore::dispatchChildRemovalEvents): * dom/EventTarget.h: * dom/EventTargetNode.cpp: (WebCore::EventTargetNode::dispatchEvent): (WebCore::EventTargetNode::dispatchGenericEvent): (WebCore::EventTargetNode::dispatchSubtreeModifiedEvent): (WebCore::EventTargetNode::dispatchWindowEvent): (WebCore::EventTargetNode::dispatchUIEvent): (WebCore::EventTargetNode::dispatchKeyEvent): (WebCore::EventTargetNode::dispatchMouseEvent): (WebCore::EventTargetNode::dispatchWheelEvent): (WebCore::EventTargetNode::dispatchWebKitAnimationEvent): (WebCore::EventTargetNode::dispatchWebKitTransitionEvent): (WebCore::EventTargetNode::dispatchEventForType): (WebCore::EventTargetNode::dispatchProgressEvent): (WebCore::EventTargetNode::dispatchStorageEvent): * dom/EventTargetNode.h: * dom/MessagePort.cpp: (WebCore::MessagePort::dispatchMessages): (WebCore::MessagePort::dispatchCloseEvent): (WebCore::MessagePort::dispatchEvent): * dom/MessagePort.h: * editing/Editor.cpp: (WebCore::Editor::dispatchCPPEvent): (WebCore::dispatchEditableContentChangedEvents): * editing/ReplaceSelectionCommand.cpp: (WebCore::ReplacementFragment::ReplacementFragment): * editing/TypingCommand.cpp: (WebCore::TypingCommand::insertText): * loader/appcache/DOMApplicationCache.cpp: (WebCore::DOMApplicationCache::dispatchEvent): (WebCore::DOMApplicationCache::callListener): * loader/appcache/DOMApplicationCache.h: * page/EventHandler.cpp: (WebCore::EventHandler::dispatchDragEvent): (WebCore::EventHandler::keyEvent): (WebCore::EventHandler::handleTextInputEvent): * page/FrameView.cpp: (WebCore::FrameView::scheduleEvent): (WebCore::FrameView::updateOverflowStatus): (WebCore::FrameView::dispatchScheduledEvents): * page/FrameView.h: * rendering/RenderLayer.cpp: (WebCore::RenderLayer::scrollToOffset): (WebCore::RenderLayer::updateOverflowStatus): * svg/SVGElement.cpp: (WebCore::SVGElement::sendSVGLoadEventIfPossible): * svg/SVGElementInstance.cpp: (WebCore::SVGElementInstance::dispatchEvent): * svg/SVGElementInstance.h: * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::dispatchEvent): (WebCore::XMLHttpRequest::dispatchReadyStateChangeEvent): (WebCore::XMLHttpRequest::dispatchXMLHttpRequestProgressEvent): * xml/XMLHttpRequest.h: * xml/XMLHttpRequestUpload.cpp: (WebCore::XMLHttpRequestUpload::dispatchEvent): (WebCore::XMLHttpRequestUpload::dispatchXMLHttpRequestProgressEvent): * xml/XMLHttpRequestUpload.h: Don't pass the tempEvent boolean around. 2008-10-20 Alp Toker Remove unused includes only. Partial GTK+/Win build fix. * platform/graphics/gtk/SimpleFontDataPango.cpp: 2008-10-20 Alexey Proskuryakov Reviewed by Oliver Hunt. https://bugs.webkit.org/show_bug.cgi?id=21705 Implement Web Workers client-side API The implementation is experimental, and disabled by default. It doesn't quite match the published draft, being influenced by further WHATWG discussions. This only implements the client-side API, and does not actually create any threads or global contexts yet. * DerivedSources.make: Added DedicatedWorker. SharedWorker is not implemented yet, as I'm still not sure if having separate classes for these helps at all. * WebCore.xcodeproj/project.pbxproj: Added new files. * bindings/js/JSDOMWindowBase.cpp: (jsDOMWindowBaseWorker): (WebCore::JSDOMWindowBase::put): (setJSDOMWindowBaseWorker): Added window.Worker constructor. Moved JSXSLTProcessorConstructor.h include out of ifdef to match prevailing style. * bindings/js/JSDedicatedWorkerConstructor.cpp: Added. * bindings/js/JSDedicatedWorkerConstructor.h: Added. * bindings/js/JSDedicatedWorkerCustom.cpp: Added. The implementation of event listeners are left custom intentionally, for easier implementation of listeners that are not tied to any Document in the future. * dom/DedicatedWorker.cpp: Added. * dom/DedicatedWorker.h: Added. * dom/DedicatedWorker.idl: Added. Added an implementation that can only load requested scripts for now. 2008-10-19 Darin Adler Reviewed by Dan Bernstein. - fix assertion seen when opening inspector * bindings/js/JSQuarantinedObjectWrapper.cpp: (WebCore::JSQuarantinedObjectWrapper::getOwnPropertySlot): Removed unneeded asObject cast. 2008-10-19 Dan Bernstein Rubber-stamped by Timothy Hatcher. - remove empty directories and correct the MIME type of inspector images * page/inspector: Removed. * page/inspector/Images: Removed. 2008-10-19 Timothy Hatcher Make the Web Inspector Resources panel open quicker and change graphs faster. There was some accidental n^2 logic at fault when updating the graph boundaries. https://bugs.webkit.org/show_bug.cgi?id=21742 Reviewed by Darin Adler. * inspector/front-end/ResourcesPanel.js: (WebInspector.ResourcesPanel.prototype.set calculator): Return early for a null calculator. Remove the second argument passed to _refreshAllResources. (WebInspector.ResourcesPanel.prototype.refresh): Call updateBoundaries on the calculator for all the stale resources before calling refreshResource. Pass true for the first argument of refreshResource to skip the boundary update. (WebInspector.ResourcesPanel.prototype._updateGraphBoundariesIfNeeded): Remove the second argument passed to _refreshAllResources. (WebInspector.ResourcesPanel.prototype._refreshAllResourcesSoon): Remove the skipSort argument since every passed true, and it would be bad to pass false. (WebInspector.ResourcesPanel.prototype._refreshAllResources): Ditto. And if skipBoundaryUpdate is false, call updateBoundaries on the calculator for all the resources before calling refreshResource. Pass true for the first argument of refreshResource to skip the boundary update. 2008-10-19 Timothy Hatcher Visually distinguish resources that loaded from the memory cache. https://bugs.webkit.org/show_bug.cgi?id=14279 Reviewed by Dan Bernstein. * English.lproj/localizedStrings.js: New string. * inspector/front-end/Images/timelineHollowPillBlue.png: Added. * inspector/front-end/Images/timelineHollowPillGray.png: Added. * inspector/front-end/Images/timelineHollowPillGreen.png: Added. * inspector/front-end/Images/timelineHollowPillOrange.png: Added. * inspector/front-end/Images/timelineHollowPillPurple.png: Added. * inspector/front-end/Images/timelineHollowPillRed.png: Added. * inspector/front-end/Images/timelineHollowPillYellow.png: Added. * inspector/front-end/ResourcesPanel.js: (WebInspector.ResourceCalculator.prototype.computeBarGraphLabels): Add the "(from cache)" suffix to the tooltip. (WebInspector.ResourceTimeCalculator.prototype.computeBarGraphLabels): Add the "(from cache)" suffix to the tooltip. (WebInspector.ResourceGraph): Add the "resource-cached" class. * inspector/front-end/inspector.css: New styles to make the timeline bars use the hollow pill images. 2008-10-19 Timothy Hatcher Update the scroll position in the Resources panel when loading a new page or toggling on small resource rows. https://bugs.webkit.org/show_bug.cgi?id=20114 Reviewed by Darin Adler. * inspector/front-end/ResourcesPanel.js: (WebInspector.ResourcesPanel.prototype.reset): Scroll to the top, since all the resource are being removed. (WebInspector.ResourcesPanel.prototype.removeResource): Call _adjustScrollPosition in case the view is shorter and needs scrolled. (WebInspector.ResourcesPanel.prototype._toggleLargerResources): Ditto. (WebInspector.ResourcesPanel.prototype._adjustScrollPosition): Check the height of the sidebar against the scrollTop and height of the resourcesContainerElement. If the sidebar is shorter, scroll up so the last resource is at the bottom again. 2008-10-19 Timothy Hatcher Show per resource times and sizes when hovering over the bar graph for a resource. https://bugs.webkit.org/show_bug.cgi?id=14300 rdar://problem/5712802 Reviewed by Cameron Zwarich. * English.lproj/localizedStrings.js: Add new strings. * inspector/front-end/Images/graphLabelCalloutLeft.png: Added. * inspector/front-end/Images/graphLabelCalloutRight.png: Added. * inspector/front-end/ResourcesPanel.js: (WebInspector.ResourcesPanel.prototype.refreshResource): Pass the calculator to the ResourceGraph.refresh function. (WebInspector.ResourceCalculator.prototype.computeBarGraphLabels): Default implementation returns the formatted value. (WebInspector.ResourceTimeCalculator.prototype.computeBarGraphLabels): Return discrete values for the latency and download times. Also generate a custom tooltip. (WebInspector.ResourceGraph): Add a mouseover event listener that calls refreshLabelPositions. (WebInspector.ResourceGraph.prototype.refreshLabelPositions): Added. Updates the label positions in case the bar has changed size. (WebInspector.ResourceGraph.prototype.refresh): Set the label text and tooltips. * inspector/front-end/inspector.css: New styles for the labels. 2008-10-19 Darin Adler Reviewed by Oliver Hunt. - next step of https://bugs.webkit.org/show_bug.cgi?id=21732 improve performance by eliminating JSValue as a base class for JSCell Remove most uses of JSValue, which will be removed in a future patch. * bindings/js/JSCustomXPathNSResolver.h: Removed declaration of JSValue and used JSValuePtr instead. * bindings/js/JSEventTarget.h: Ditto. * bindings/js/JSNodeFilterCondition.h: Ditto. * bindings/js/ScheduledAction.h: Ditto. * bindings/js/ScriptController.h: Ditto. * bindings/objc/WebScriptObjectPrivate.h: Ditto. * bridge/c/c_utility.h: Ditto. * bridge/jni/jni_jsobject.h: Ditto. * bridge/jni/jni_utility.h: Ditto. * bridge/objc/WebScriptObject.h: Ditto. * dom/Traversal.h: Ditto. * inspector/InspectorController.cpp: Ditto. * inspector/JavaScriptProfile.h: Ditto. * inspector/JavaScriptProfileNode.h: Ditto. * loader/FrameLoader.h: Ditto. * page/Console.h: Ditto. * plugins/MimeTypeArray.h: Ditto. * plugins/Plugin.h: Ditto. * plugins/PluginArray.h: Ditto. * plugins/PluginView.cpp: (WebCore::getString): Ditto. (WebCore::PluginView::performRequest): Ditto. * plugins/gtk/PluginViewGtk.cpp: Ditto. * plugins/qt/PluginViewQt.cpp: Ditto. * plugins/win/PluginViewWin.cpp: Ditto. * bridge/qt/qt_class.cpp: (JSC::Bindings::QtClass::fallbackObject): Use JSValuePtr and JSObject* instead of JSValue*. * bridge/qt/qt_class.h: Ditto. * bridge/qt/qt_instance.cpp: (JSC::Bindings::QtInstance::mark): Ditto. (JSC::Bindings::QtInstance::invokeMethod): Ditto. (JSC::Bindings::QtInstance::defaultValue): Ditto. (JSC::Bindings::QtInstance::stringValue): Ditto. (JSC::Bindings::QtInstance::numberValue): Ditto. (JSC::Bindings::QtInstance::booleanValue): Ditto. (JSC::Bindings::QtInstance::valueOf): Ditto. (JSC::Bindings::QtField::valueFromInstance): Ditto. (JSC::Bindings::QtField::setValueToInstance): Ditto. * bridge/qt/qt_instance.h: Ditto. * bridge/qt/qt_runtime.cpp: Ditto. (JSC::Bindings::valueRealType): Ditto. (JSC::Bindings::convertValueToQVariant): Ditto. (JSC::Bindings::convertQVariantToValue): Ditto. (JSC::Bindings::findMethodIndex): Ditto. (JSC::Bindings::QtRuntimeMetaMethod::call): Ditto. (JSC::Bindings::QtRuntimeMetaMethod::lengthGetter): Ditto. (JSC::Bindings::QtRuntimeMetaMethod::connectGetter): Ditto. (JSC::Bindings::QtRuntimeMetaMethod::disconnectGetter): Ditto. (JSC::Bindings::QtRuntimeConnectionMethod::call): Ditto. (JSC::Bindings::QtRuntimeConnectionMethod::lengthGetter): Ditto. (JSC::Bindings::QtArray::setValueAt): Ditto. (JSC::Bindings::QtArray::valueAt): Ditto. * bridge/qt/qt_runtime.h: Ditto. * bridge/testqtbindings.cpp: (main): Use JSValuePtr. 2008-10-18 Darin Adler Reviewed by Oliver Hunt. - next step of https://bugs.webkit.org/show_bug.cgi?id=21732 improve performance by eliminating JSValue as a base class for JSCell Tweak a little more to get closer to where we can make JSValuePtr a class. * bindings/js/JSAudioConstructor.cpp: (WebCore::JSAudioConstructor::JSAudioConstructor): Use asObject. (WebCore::constructAudio): Ditto. * bindings/js/JSCSSStyleDeclarationCustom.cpp: (WebCore::JSCSSStyleDeclaration::nameGetter): Ditto. * bindings/js/JSCanvasRenderingContext2DCustom.cpp: (WebCore::toHTMLCanvasStyle): Use asString and asObject. (WebCore::JSCanvasRenderingContext2D::setFillColor): Ditto. (WebCore::JSCanvasRenderingContext2D::setStrokeColor): Ditto. (WebCore::JSCanvasRenderingContext2D::drawImage): Ditto. (WebCore::JSCanvasRenderingContext2D::drawImageFromRect): Ditto. (WebCore::JSCanvasRenderingContext2D::setShadow): Ditto. (WebCore::JSCanvasRenderingContext2D::createPattern): Ditto. * bindings/js/JSCustomSQLTransactionErrorCallback.cpp: (WebCore::JSCustomSQLTransactionErrorCallback::handleEvent): Use JSValuePtr. * bindings/js/JSDOMBinding.cpp: (WebCore::setDOMException): Use noValue. * bindings/js/JSDOMBinding.h: (WebCore::getDOMPrototype): Use asObject. * bindings/js/JSDOMWindowBase.cpp: (WebCore::showModalDialog): Use noValue. (jsDOMWindowBaseEvent): Use asObject. (jsDOMWindowBaseImage): Ditto. (jsDOMWindowBaseMessageChannel): Ditto. (jsDOMWindowBaseOption): Ditto. (jsDOMWindowBaseXMLHttpRequest): Ditto. (jsDOMWindowBaseAudio): Ditto. (jsDOMWindowBaseXSLTProcessor): Ditto. (WebCore::JSDOMWindowBase::childFrameGetter): Ditto. (WebCore::JSDOMWindowBase::indexGetter): Ditto. (WebCore::JSDOMWindowBase::namedItemGetter): Ditto. (WebCore::JSDOMWindowBase::getOwnPropertySlot): Ditto. (WebCore::JSDOMWindowBase::findJSEventListener): Ditto. (WebCore::JSDOMWindowBase::findOrCreateJSEventListener): Ditto. (WebCore::JSDOMWindowBase::findJSUnprotectedEventListener): Ditto. (WebCore::JSDOMWindowBase::findOrCreateJSUnprotectedEventListener): Ditto. (windowProtoFuncOpen): Use noValue. (WebCore::toJSDOMWindow): Use asObject. * bindings/js/JSDOMWindowCustom.cpp: (WebCore::setTimeoutOrInterval): Use asString. (WebCore::toDOMWindow): Use asObject. * bindings/js/JSEventListener.cpp: (WebCore::JSAbstractEventListener::handleEvent): Use noValue. (WebCore::JSLazyEventListener::parseCode): Use asObject. * bindings/js/JSHTMLCollectionCustom.cpp: (WebCore::JSHTMLCollection::nameGetter): Use asObject. * bindings/js/JSHTMLDocumentCustom.cpp: (WebCore::JSHTMLDocument::nameGetter): Ditto. * bindings/js/JSHTMLElementCustom.cpp: (WebCore::JSHTMLElement::pushEventHandlerScope): Ditto. * bindings/js/JSHTMLFormElementCustom.cpp: (WebCore::JSHTMLFormElement::nameGetter): Ditto. * bindings/js/JSHTMLFrameSetElementCustom.cpp: (WebCore::JSHTMLFrameSetElement::nameGetter): Ditto. * bindings/js/JSHTMLOptionElementConstructor.cpp: (WebCore::JSHTMLOptionElementConstructor::JSHTMLOptionElementConstructor): Ditto. (WebCore::constructHTMLOptionElement): Ditto. * bindings/js/JSHTMLOptionsCollectionCustom.cpp: (WebCore::JSHTMLOptionsCollection::remove): Ditto. * bindings/js/JSImageConstructor.cpp: (WebCore::JSImageConstructor::JSImageConstructor): Ditto. (WebCore::constructImage): Ditto. * bindings/js/JSInspectedObjectWrapper.cpp: (WebCore::JSInspectedObjectWrapper::wrap): Ditto. * bindings/js/JSInspectorCallbackWrapper.cpp: (WebCore::JSInspectorCallbackWrapper::wrap): Ditto. * bindings/js/JSJavaScriptCallFrameCustom.cpp: (WebCore::JSJavaScriptCallFrame::evaluate): Use noValue. * bindings/js/JSMessageChannelConstructor.cpp: (WebCore::JSMessageChannelConstructor::JSMessageChannelConstructor): Use asObject. (WebCore::JSMessageChannelConstructor::construct): Ditto. * bindings/js/JSMimeTypeArrayCustom.cpp: (WebCore::JSMimeTypeArray::nameGetter): Ditto. * bindings/js/JSNamedNodeMapCustom.cpp: (WebCore::JSNamedNodeMap::nameGetter): Ditto. * bindings/js/JSNamedNodesCollection.cpp: (WebCore::JSNamedNodesCollection::lengthGetter): Ditto. (WebCore::JSNamedNodesCollection::indexGetter): Ditto. * bindings/js/JSNodeFilterCustom.cpp: (WebCore::toNodeFilter): Ditto. * bindings/js/JSNodeListCustom.cpp: (WebCore::JSNodeList::nameGetter): Ditto. * bindings/js/JSPluginArrayCustom.cpp: (WebCore::JSPluginArray::nameGetter): Ditto. * bindings/js/JSPluginCustom.cpp: (WebCore::JSPlugin::nameGetter): Ditto. * bindings/js/JSPluginElementFunctions.cpp: (WebCore::runtimeObjectGetter): Ditto. (WebCore::runtimeObjectPropertyGetter): Ditto. * bindings/js/JSQuarantinedObjectWrapper.cpp: (WebCore::JSQuarantinedObjectWrapper::asWrapper): Ditto. (WebCore::JSQuarantinedObjectWrapper::getOwnPropertySlot): Ditto. (WebCore::JSQuarantinedObjectWrapper::construct): Ditto. * bindings/js/JSRGBColor.cpp: (jsRGBColorRed): Ditto. (jsRGBColorGreen): Ditto. (jsRGBColorBlue): Ditto. * bindings/js/JSSQLResultSetRowListCustom.cpp: (WebCore::JSSQLResultSetRowList::item): Use noValue. * bindings/js/JSStorageCustom.cpp: (WebCore::JSStorage::nameGetter): Use asObject. (WebCore::JSStorage::deleteProperty): Ditto. (WebCore::JSStorage::customPut): Ditto. * bindings/js/JSStyleSheetListCustom.cpp: (WebCore::JSStyleSheetList::nameGetter): Ditto. * bindings/js/JSXMLHttpRequestConstructor.cpp: (WebCore::JSXMLHttpRequestConstructor::JSXMLHttpRequestConstructor): Ditto. * bindings/js/JSXSLTProcessorCustom.cpp: (WebCore::JSXSLTProcessor::importStylesheet): Ditto. (WebCore::JSXSLTProcessor::transformToFragment): Ditto. (WebCore::JSXSLTProcessor::transformToDocument): Ditto. * bindings/js/ScriptController.cpp: (WebCore::ScriptController::evaluate): Use noValue. * bindings/objc/DOMInternal.mm: (-[WebScriptObject _initializeScriptDOMNodeImp]): Ditto. * bindings/objc/WebScriptObject.mm: (-[WebScriptObject evaluateWebScript:]): Use JSValuePtr. (-[WebScriptObject valueForKey:]): Ditto. (-[WebScriptObject webScriptValueAtIndex:]): Ditto. (+[WebScriptObject _convertValueToObjcValue:originRootObject:rootObject:]): Use asObject and asString. * bindings/scripts/CodeGeneratorJS.pm: Use asObject. * bridge/c/c_instance.h: Use JSValuePtr. * bridge/c/c_runtime.cpp: (JSC::Bindings::CField::setValueToInstance): Ditto. * bridge/c/c_utility.cpp: (JSC::Bindings::convertValueToNPVariant): Use asObject. * bridge/jni/jni_instance.cpp: (JavaInstance::booleanValue): Use JSValuePtr. (JavaInstance::invokeMethod): Ditto. And noValue. * bridge/jni/jni_jsobject.mm: (JavaJSObject::getSlot): Ditto. (JavaJSObject::convertValueToJObject): Ditto. * bridge/jni/jni_runtime.cpp: (JavaField::dispatchValueFromInstance): Ditto. (JavaField::valueFromInstance): Ditto. (JavaField::dispatchSetValueToInstance): Ditto. (JavaField::setValueToInstance): Ditto. (JavaArray::setValueAt): Ditto. (JavaArray::valueAt): Ditto. * bridge/jni/jni_runtime.h: Ditto. * bridge/jni/jni_utility.cpp: (JSC::Bindings::convertArrayInstanceToJavaArray): Take a JSArray* instead of a JSValue*. (JSC::Bindings::convertValueToJValue): Use asObject and asArray. * bridge/objc/objc_class.h: Use JSValuePtr. * bridge/objc/objc_instance.h: Ditto. * bridge/objc/objc_runtime.h: Ditto. * bridge/objc/objc_runtime.mm: (JSC::Bindings::callObjCFallbackObject): Use asObject. * bridge/objc/objc_utility.h: Use JSValuePtr. * bridge/objc/objc_utility.mm: (JSC::Bindings::convertValueToObjcValue): Use JSValuePtr and asObject. (JSC::Bindings::convertObjcValueToValue): Use jsUndefined() instead of 0. * bridge/runtime.cpp: (JSC::Bindings::Instance::getValueOfField): Use JSValuePtr. (JSC::Bindings::Instance::setValueOfField): Ditto. * bridge/runtime_array.cpp: (JSC::RuntimeArray::lengthGetter): Use JSValuePtr and asObject. (JSC::RuntimeArray::indexGetter): Ditto. * bridge/runtime_array.h: Ditto. * bridge/runtime_method.cpp: (JSC::RuntimeMethod::lengthGetter): Ditto. (JSC::callRuntimeMethod): Ditto. * bridge/runtime_object.cpp: (JSC::RuntimeObjectImp::fallbackObjectGetter): Ditto. (JSC::RuntimeObjectImp::fieldGetter): Ditto. (JSC::RuntimeObjectImp::methodGetter): Ditto. * loader/FrameLoader.cpp: (WebCore::FrameLoader::executeScript): Use noValue. * page/Console.cpp: (WebCore::Console::trace): Use asInternalFunction. 2008-10-19 Dan Bernstein Reviewed by Timothy Hatcher. - lower the default button repaint frequency * rendering/RenderButton.cpp: (WebCore::RenderButton::styleDidChange): Changed the timer interval from 0.01 to 0.03. 2008-10-18 Dan Bernstein Reviewed by Mark Rowe. - Windows build fix * rendering/RenderThemeSafari.cpp: (WebCore::RenderThemeSafari::paintMediaFullscreenButton): (WebCore::RenderThemeSafari::paintMediaMuteButton): (WebCore::RenderThemeSafari::paintMediaPlayButton): (WebCore::RenderThemeSafari::paintMediaSeekBackButton): (WebCore::RenderThemeSafari::paintMediaSeekForwardButton): (WebCore::RenderThemeSafari::paintMediaSliderThumb): 2008-10-18 Dan Bernstein Reviewed by Sam Weinig. - WebCore part of https://bugs.webkit.org/show_bug.cgi?id=21736 Long-dead decoded image data make up for most of the object cache's memory use over time Add a cache setting for how long decoded image data should be allowed to persist in memory after the image has died. By default, this is set to 0, which means "forever". * loader/Cache.cpp: (WebCore::Cache::Cache): Initialize m_deadDecodedDataDeletionInterval. * loader/Cache.h: (WebCore::Cache::setDeadDecodedDataDeletionInterval): Added a setter. (WebCore::Cache::deadDecodedDataDeletionInterval): Added a getter. * loader/CachedImage.cpp: (WebCore::CachedImage::CachedImage): Initialize the decoded data deletion timer. (WebCore::CachedImage::decodedDataDeletionTimerFired): Added. Destroys the decoded image data. (WebCore::CachedImage::addClient): Stop the timer if it is active. (WebCore::CachedImage::allClientsRemoved): Start the decoded data deletion timer. * loader/CachedImage.h: 2008-10-18 Darin Adler Reviewed by Dan Bernstein. - fix https://bugs.webkit.org/show_bug.cgi?id=21645 REGRESSION (r37469-r37605): File Input not Uploaded in Multipart/Form-data Form * html/HTMLFormElement.cpp: (WebCore::HTMLFormElement::formData): Fix loop that goes through the FormDataList to go two at a time in a clearer way. My last patch screwed up the way it got form content from the items. This "two at a time" approach is a confusing way to do things, which explains why I got it wrong last time through, but I decided to just fix it locally for now rather than changing the design of FormDataList. 2008-10-18 Darin Adler Reviewed by Cameron Zwarich. - next step on https://bugs.webkit.org/show_bug.cgi?id=21732 improve performance by eliminating JSValue as a base class for JSCell Use JSValuePtr everywhere instead of JSValue*. In the future, we'll be changing JSValuePtr to be a class, and then eventually renaming it to JSValue once that's done. * bindings/js/JSAttrCustom.cpp: * bindings/js/JSCSSRuleCustom.cpp: * bindings/js/JSCSSStyleDeclarationCustom.cpp: * bindings/js/JSCSSValueCustom.cpp: * bindings/js/JSCanvasPixelArrayCustom.h: * bindings/js/JSCanvasRenderingContext2DCustom.cpp: * bindings/js/JSClipboardCustom.cpp: * bindings/js/JSConsoleCustom.cpp: * bindings/js/JSCustomSQLStatementCallback.cpp: * bindings/js/JSCustomSQLStatementErrorCallback.cpp: * bindings/js/JSCustomSQLTransactionCallback.cpp: * bindings/js/JSCustomSQLTransactionErrorCallback.cpp: * bindings/js/JSCustomVoidCallback.cpp: * bindings/js/JSCustomVoidCallback.h: * bindings/js/JSCustomXPathNSResolver.cpp: * bindings/js/JSDOMApplicationCacheCustom.cpp: * bindings/js/JSDOMBinding.cpp: * bindings/js/JSDOMBinding.h: * bindings/js/JSDOMWindowBase.cpp: * bindings/js/JSDOMWindowBase.h: * bindings/js/JSDOMWindowCustom.cpp: * bindings/js/JSDOMWindowCustom.h: * bindings/js/JSDOMWindowShell.cpp: * bindings/js/JSDOMWindowShell.h: * bindings/js/JSDatabaseCustom.cpp: * bindings/js/JSDocumentCustom.cpp: * bindings/js/JSElementCustom.cpp: * bindings/js/JSEventCustom.cpp: * bindings/js/JSEventListener.cpp: * bindings/js/JSEventTarget.cpp: * bindings/js/JSEventTargetBase.h: * bindings/js/JSEventTargetNodeCustom.cpp: * bindings/js/JSHTMLAllCollection.h: * bindings/js/JSHTMLAppletElementCustom.cpp: * bindings/js/JSHTMLCollectionCustom.cpp: * bindings/js/JSHTMLDocumentCustom.cpp: * bindings/js/JSHTMLEmbedElementCustom.cpp: * bindings/js/JSHTMLFormElementCustom.cpp: * bindings/js/JSHTMLFrameElementCustom.cpp: * bindings/js/JSHTMLFrameSetElementCustom.cpp: * bindings/js/JSHTMLIFrameElementCustom.cpp: * bindings/js/JSHTMLInputElementCustom.cpp: * bindings/js/JSHTMLObjectElementCustom.cpp: * bindings/js/JSHTMLOptionsCollectionCustom.cpp: * bindings/js/JSHTMLSelectElementCustom.cpp: * bindings/js/JSHTMLSelectElementCustom.h: * bindings/js/JSHistoryCustom.cpp: * bindings/js/JSImageDataCustom.cpp: * bindings/js/JSInspectedObjectWrapper.cpp: * bindings/js/JSInspectedObjectWrapper.h: * bindings/js/JSInspectorCallbackWrapper.cpp: * bindings/js/JSInspectorCallbackWrapper.h: * bindings/js/JSJavaScriptCallFrameCustom.cpp: * bindings/js/JSLocationCustom.cpp: * bindings/js/JSMessagePortCustom.cpp: * bindings/js/JSMimeTypeArrayCustom.cpp: * bindings/js/JSNamedNodeMapCustom.cpp: * bindings/js/JSNamedNodesCollection.cpp: * bindings/js/JSNamedNodesCollection.h: * bindings/js/JSNavigatorCustom.cpp: * bindings/js/JSNodeCustom.cpp: * bindings/js/JSNodeFilterCondition.cpp: * bindings/js/JSNodeFilterCustom.cpp: * bindings/js/JSNodeIteratorCustom.cpp: * bindings/js/JSNodeListCustom.cpp: * bindings/js/JSPluginArrayCustom.cpp: * bindings/js/JSPluginCustom.cpp: * bindings/js/JSPluginElementFunctions.cpp: * bindings/js/JSPluginElementFunctions.h: * bindings/js/JSQuarantinedObjectWrapper.cpp: * bindings/js/JSQuarantinedObjectWrapper.h: * bindings/js/JSRGBColor.cpp: * bindings/js/JSRGBColor.h: * bindings/js/JSSQLResultSetRowListCustom.cpp: * bindings/js/JSSQLTransactionCustom.cpp: * bindings/js/JSSVGElementInstanceCustom.cpp: * bindings/js/JSSVGLengthCustom.cpp: * bindings/js/JSSVGMatrixCustom.cpp: * bindings/js/JSSVGPathSegCustom.cpp: * bindings/js/JSSVGPathSegListCustom.cpp: * bindings/js/JSSVGPointListCustom.cpp: * bindings/js/JSSVGTransformListCustom.cpp: * bindings/js/JSStorageCustom.cpp: * bindings/js/JSStyleSheetCustom.cpp: * bindings/js/JSStyleSheetListCustom.cpp: * bindings/js/JSTextCustom.cpp: * bindings/js/JSTreeWalkerCustom.cpp: * bindings/js/JSXMLHttpRequestCustom.cpp: * bindings/js/JSXMLHttpRequestUploadCustom.cpp: * bindings/js/JSXSLTProcessorCustom.cpp: * bindings/js/ScheduledAction.cpp: * bindings/js/ScheduledAction.h: * bindings/js/ScriptController.cpp: * bindings/js/ScriptController.h: * bindings/objc/WebScriptObject.mm: * bindings/scripts/CodeGeneratorJS.pm: * bridge/NP_jsobject.cpp: * bridge/c/c_instance.cpp: * bridge/c/c_instance.h: * bridge/c/c_runtime.cpp: * bridge/c/c_runtime.h: * bridge/c/c_utility.cpp: * bridge/jni/jni_instance.cpp: * bridge/jni/jni_instance.h: * bridge/jni/jni_jsobject.mm: * bridge/jni/jni_objc.mm: * bridge/jni/jni_runtime.cpp: * bridge/jni/jni_runtime.h: * bridge/jni/jni_utility.cpp: * bridge/objc/objc_class.mm: * bridge/objc/objc_instance.h: * bridge/objc/objc_instance.mm: * bridge/objc/objc_runtime.h: * bridge/objc/objc_runtime.mm: * bridge/objc/objc_utility.h: * bridge/objc/objc_utility.mm: * bridge/runtime.h: * bridge/runtime_array.cpp: * bridge/runtime_array.h: * bridge/runtime_method.cpp: * bridge/runtime_method.h: * bridge/runtime_object.cpp: * bridge/runtime_object.h: * inspector/JavaScriptCallFrame.cpp: * inspector/JavaScriptCallFrame.h: * inspector/JavaScriptProfile.cpp: * inspector/JavaScriptProfileNode.cpp: * loader/FrameLoader.cpp: * loader/FrameLoader.h: * page/Console.cpp: * page/Console.h: * plugins/MimeTypeArray.h: * plugins/Plugin.h: * plugins/PluginArray.h: * xml/XMLHttpRequest.cpp: Replace JSValue* with JSValuePtr. 2008-10-18 Darin Adler Reviewed by Oliver Hunt. - first step of https://bugs.webkit.org/show_bug.cgi?id=21732 improve performance by eliminating JSValue as a base class for JSCell Update for change to make PreferredPrimitiveType no longer a member of JSValue. * bridge/c/c_instance.cpp: (JSC::Bindings::CInstance::defaultValue): Removed JSValue:: prefix. * bridge/jni/jni_instance.cpp: (JavaInstance::defaultValue): Ditto. * bridge/objc/objc_instance.mm: (ObjcInstance::defaultValue): Ditto. * bridge/qt/qt_instance.cpp: (JSC::Bindings::QtInstance::defaultValue): Ditto. * bridge/runtime.h: Ditto. Also removed typedef. 2008-10-18 Darin Adler - try to fix Windows build * rendering/RenderThemeSafari.cpp: (WebCore::RenderThemeSafari::paintCheckbox): Explicitly qualify part name with SafariTheme namespace, since there is now an identically named constant in the ControlPart enum. (WebCore::RenderThemeSafari::paintButton): Ditto. (WebCore::RenderThemeSafari::paintTextField): Ditto. (WebCore::RenderThemeSafari::paintTextArea): Ditto. (WebCore::RenderThemeSafari::paintSearchField): Ditto. (WebCore::RenderThemeSafari::paintSearchFieldCancelButton): Ditto. (WebCore::RenderThemeSafari::paintSearchFieldResultsDecoration): Ditto. (WebCore::RenderThemeSafari::paintSearchFieldResultsButton): Ditto. 2008-10-18 Jan Michael Alonzo Reviewed by Alp Toker. [GTK] crash after selecting a file on an https://bugs.webkit.org/show_bug.cgi?id=21385 Follow Mac and Win's behaviors for Icon::paint * platform/graphics/gtk/IconGtk.cpp: (WebCore::Icon::paint): check if painting is enabled before painting the icon 2008-10-18 Zan Dobersek Reviewed by Oliver Hunt. Qt port build fix. * platform/qt/RenderThemeQt.h: 2008-10-17 Kevin Watters Reviewed by Kevin Ollivier Fix wx port's scrollbar and drawing handling after recent changes. https://bugs.webkit.org/show_bug.cgi?id=21720 * platform/ScrollView.h: * platform/wx/ScrollViewWx.cpp: (WebCore::ScrollView::platformVisibleContentRect): (WebCore::ScrollView::platformContentsSize): (WebCore::ScrollView::platformSetContentsSize): * platform/wx/WidgetWx.cpp: (WebCore::Widget::paint): 2008-10-17 Kevin Ollivier wx build fix. EAppearance -> ControlPart. * platform/wx/RenderThemeWx.cpp: (WebCore::RenderThemeWx::isControlStyled): (WebCore::RenderThemeWx::adjustRepaintRect): (WebCore::RenderThemeWx::controlSupportsTints): (WebCore::RenderThemeWx::supportsFocus): (WebCore::RenderThemeWx::paintButton): 2008-10-17 David Hyatt Eliminate the EAppearance enum in favor of the new ControlPart enum. Cut out the scrollbar values from the enum since they are handled by ScrollbarTheme instead. Reviewed by Tim Hatcher * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): (WebCore::CSSPrimitiveValue::operator ControlPart): * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::adjustRenderStyle): * css/CSSValueKeywords.in: * platform/gtk/RenderThemeGtk.cpp: (WebCore::supportsFocus): (WebCore::RenderThemeGtk::baselinePosition): (WebCore::setToggleSize): (WebCore::RenderThemeGtk::setCheckboxSize): (WebCore::RenderThemeGtk::setRadioSize): (WebCore::RenderThemeGtk::adjustButtonStyle): * platform/qt/RenderThemeQt.cpp: (WebCore::RenderThemeQt::baselinePosition): (WebCore::RenderThemeQt::controlSupportsTints): (WebCore::RenderThemeQt::adjustRepaintRect): (WebCore::RenderThemeQt::isControlStyled): (WebCore::computeSizeBasedOnStyle): (WebCore::RenderThemeQt::paintButton): (WebCore::RenderThemeQt::paintTextField): (WebCore::RenderThemeQt::paintMenuList): (WebCore::RenderThemeQt::supportsFocus): (WebCore::RenderThemeQt::applyTheme): (WebCore::RenderThemeQt::adjustSliderThumbSize): * platform/qt/RenderThemeQt.h: * rendering/RenderSlider.cpp: (WebCore::RenderSlider::createThumbStyle): (WebCore::RenderSlider::layout): (WebCore::RenderSlider::setValueForPosition): (WebCore::RenderSlider::setPositionFromValue): (WebCore::RenderSlider::positionForOffset): (WebCore::RenderSlider::currentPosition): (WebCore::RenderSlider::setCurrentPosition): (WebCore::RenderSlider::trackSize): * rendering/RenderTheme.cpp: (WebCore::RenderTheme::adjustStyle): (WebCore::RenderTheme::paint): (WebCore::RenderTheme::paintBorderOnly): (WebCore::RenderTheme::paintDecorations): (WebCore::RenderTheme::isControlContainer): (WebCore::RenderTheme::isControlStyled): (WebCore::RenderTheme::supportsFocusRing): (WebCore::RenderTheme::isDefault): * rendering/RenderTheme.h: * rendering/RenderThemeMac.mm: (WebCore::RenderThemeMac::isControlStyled): (WebCore::RenderThemeMac::adjustRepaintRect): (WebCore::RenderThemeMac::baselinePosition): (WebCore::RenderThemeMac::controlSupportsTints): (WebCore::RenderThemeMac::adjustButtonStyle): (WebCore::RenderThemeMac::setButtonCellState): (WebCore::RenderThemeMac::popupInternalPaddingLeft): (WebCore::RenderThemeMac::popupInternalPaddingRight): (WebCore::RenderThemeMac::popupInternalPaddingTop): (WebCore::RenderThemeMac::popupInternalPaddingBottom): (WebCore::RenderThemeMac::paintSliderTrack): (WebCore::RenderThemeMac::paintSliderThumb): (WebCore::RenderThemeMac::adjustSliderThumbSize): * rendering/RenderThemeSafari.cpp: (WebCore::RenderThemeSafari::isControlStyled): (WebCore::RenderThemeSafari::adjustRepaintRect): (WebCore::RenderThemeSafari::baselinePosition): (WebCore::RenderThemeSafari::controlSupportsTints): (WebCore::RenderThemeSafari::adjustButtonStyle): (WebCore::RenderThemeSafari::popupInternalPaddingLeft): (WebCore::RenderThemeSafari::popupInternalPaddingRight): (WebCore::RenderThemeSafari::popupInternalPaddingTop): (WebCore::RenderThemeSafari::popupInternalPaddingBottom): (WebCore::RenderThemeSafari::paintSliderTrack): (WebCore::RenderThemeSafari::adjustSliderThumbSize): * rendering/RenderThemeWin.cpp: (WebCore::RenderThemeWin::supportsFocus): (WebCore::RenderThemeWin::determineClassicState): (WebCore::RenderThemeWin::getClassicThemeData): (WebCore::RenderThemeWin::getThemeData): (WebCore::drawControl): (WebCore::RenderThemeWin::paintSliderTrack): (WebCore::RenderThemeWin::adjustSliderThumbSize): * rendering/RenderThemeWin.h: * rendering/style/RenderStyle.h: (WebCore::InheritedFlags::hasAppearance): (WebCore::InheritedFlags::appearance): (WebCore::InheritedFlags::setAppearance): (WebCore::InheritedFlags::initialAppearance): * rendering/style/RenderStyleConstants.h: 2008-10-17 David Hyatt Beginning of the RenderTheme re-architecture (to share more code). Add the new Theme API header file. Add new USE(NEW_THEME) switch that is enabled on Mac. The Mac theme will be converted first. Reviewed by Tim Hatcher * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * config.h: * platform/Theme.h: Added. (WebCore::Theme::Theme): (WebCore::Theme::~Theme): (WebCore::Theme::baselinePositionAdjustment): (WebCore::Theme::controlHasInactiveAppearance): (WebCore::Theme::controlsCanHaveInactiveAppearance): (WebCore::Theme::controlsCanHaveHoveredAppearance): (WebCore::Theme::controlDrawsBorder): (WebCore::Theme::controlDrawsBackground): (WebCore::Theme::controlDrawsFocusOutline): (WebCore::Theme::selectionColor): (WebCore::Theme::textSearchHighlightColor): (WebCore::Theme::systemColor): (WebCore::Theme::systemFont): (WebCore::Theme::caretBlinkFrequency): (WebCore::Theme::themeChanged): (WebCore::Theme::controlSize): (WebCore::Theme::controlFont): (WebCore::Theme::controlPadding): (WebCore::Theme::controlInternalPadding): (WebCore::Theme::controlBorder): (WebCore::Theme::controlBorderRadius): (WebCore::Theme::paint): (WebCore::Theme::inflateControlPaintRect): * platform/ThemeTypes.h: Added. (WebCore::): (WebCore::ControlBox::ControlBox): (WebCore::ControlBox::top): (WebCore::ControlBox::right): (WebCore::ControlBox::bottom): (WebCore::ControlBox::left): * platform/mac/ThemeMac.h: Added. (WebCore::ThemeMac::ThemeMac): (WebCore::ThemeMac::~ThemeMac): * platform/mac/ThemeMac.mm: Added. (WebCore::platformTheme): * rendering/RenderTheme.cpp: (WebCore::RenderTheme::RenderTheme): * rendering/RenderTheme.h: 2008-10-17 Marco Barisione Reviewed by Sam Weinig. Landed by Jan Alonzo. https://bugs.webkit.org/show_bug.cgi?id=21603 [GTK] Minor fixes to GOwnPtr * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp: (WebCore::mediaPlayerPrivateErrorCallback): 2008-10-17 Timothy Hatcher Recompile the JavaScript functions when removing any listener, so functions that are not being debugged can resume normal speed again. https://bugs.webkit.org/show_bug.cgi?id=21715 Reviewed by Geoffrey Garen. * bindings/js/JSDOMWindowBase.cpp: (WebCore::JSDOMWindowBase::globalExec): Changed an assert into an if check. This assert was firing when closing the window and having the recompile fire after. This was an overzelious assert now. * inspector/JavaScriptDebugServer.cpp: (WebCore::JavaScriptDebugServer::didRemoveListener): Start the recompile timer. (WebCore::JavaScriptDebugServer::didRemoveLastListener): Removed the recompile timer start. 2008-10-17 Timothy Hatcher Fixes a regression where starting a debugging session in another Web Inspector window would not show any scripts. Also only attach the debugger to only the required Pages. https://bugs.webkit.org/show_bug.cgi?id=21708 Reviewed by Darin Adler. * inspector/JavaScriptDebugServer.cpp: (WebCore::JavaScriptDebugServer::addListener): Add an assert and remove the call to willAddFirstListener(). Add a call to didAddListener(). (WebCore::JavaScriptDebugServer::removeListener): Add an assert and call to didRemoveListener(). (WebCore::JavaScriptDebugServer::pageCreated): Attach the debugger if there is a listener interested in the new Page. (WebCore::JavaScriptDebugServer::hasListenersInterestedInPage): Use hasGlobalListeners() instead of isEmpty(). (WebCore::JavaScriptDebugServer::sourceParsed): Ditto. (WebCore::JavaScriptDebugServer::didAddListener): Added. Attach the debugger to the page if non-null, or all pages if page is null. (WebCore::JavaScriptDebugServer::didRemoveListener): Added. Detach the debugger only if there are no interested listeners. (WebCore::JavaScriptDebugServer::didRemoveLastListener): Remove the call to Page::setDebuggerForAllPages(). * inspector/JavaScriptDebugServer.h: (WebCore::JavaScriptDebugServer::hasGlobalListeners): Added. 2008-10-15 Brett Wilson Reviewed by Timothy Hatcher. Have ImageDocument generate its own filename for the title of images without relying on the suggested filename from the network layer, which may be nonexistant or not relevant. https://bugs.webkit.org/show_bug.cgi?id=21565 * loader/ImageDocument.cpp: (WebCore::ImageTokenizer::finish): 2008-10-17 Alexey Proskuryakov Non-Mac build fix. * GNUmakefile.am: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCoreSources.bkl: Added ActiveDOMObject to the build. 2008-10-17 Alexey Proskuryakov Reviewed by Sam Weinig. https://bugs.webkit.org/show_bug.cgi?id=21642 Abstract out active object tracking * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSDOMBinding.cpp: (WebCore::markActiveObjectsForDocument): * dom/ActiveDOMObject.cpp: Added. (WebCore::ActiveDOMObject::ActiveDOMObject): (WebCore::ActiveDOMObject::~ActiveDOMObject): (WebCore::ActiveDOMObject::contextDestroyed): (WebCore::ActiveDOMObject::stop): * dom/ActiveDOMObject.h: Added. (WebCore::ActiveDOMObject::document): (WebCore::ActiveDOMObject::hasPendingActivity): (WebCore::ActiveDOMObject::setPendingActivity): (WebCore::ActiveDOMObject::unsetPendingActivity): * dom/Document.cpp: (WebCore::Document::~Document): (WebCore::Document::stopActiveDOMObjects): (WebCore::Document::createdActiveDOMObject): (WebCore::Document::destroyedActiveDOMObject): * dom/Document.h: (WebCore::Document::activeDOMObjects): * dom/MessagePort.cpp: (WebCore::MessagePort::contextDestroyed): * dom/MessagePort.h: * loader/FrameLoader.cpp: (WebCore::FrameLoader::stopLoading): * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::XMLHttpRequest): (WebCore::XMLHttpRequest::~XMLHttpRequest): (WebCore::XMLHttpRequest::associatedFrame): (WebCore::XMLHttpRequest::responseXML): (WebCore::XMLHttpRequest::callReadyStateChangeListener): (WebCore::XMLHttpRequest::initSend): (WebCore::XMLHttpRequest::send): (WebCore::XMLHttpRequest::createRequest): (WebCore::XMLHttpRequest::makeSimpleCrossSiteAccessRequest): (WebCore::XMLHttpRequest::makeCrossSiteAccessRequestWithPreflight): (WebCore::XMLHttpRequest::handleAsynchronousPreflightResult): (WebCore::XMLHttpRequest::loadRequestSynchronously): (WebCore::XMLHttpRequest::loadRequestAsynchronously): (WebCore::XMLHttpRequest::dropProtection): (WebCore::XMLHttpRequest::setRequestHeader): (WebCore::XMLHttpRequest::processSyncLoadResults): (WebCore::XMLHttpRequest::didFinishLoading): (WebCore::XMLHttpRequest::didFinishLoadingPreflight): (WebCore::XMLHttpRequest::willSendRequest): (WebCore::XMLHttpRequest::accessControlCheck): (WebCore::XMLHttpRequest::didReceiveResponsePreflight): (WebCore::XMLHttpRequest::stop): (WebCore::XMLHttpRequest::contextDestroyed): * xml/XMLHttpRequest.h: Move activity tracking to a new ActiveDOMObject class. 2008-10-16 David Hyatt Simplify styleForRenderer to avoid confusion. Callers in the SVG filter code thought "forRenderer" meant they would be given a style that corresponded to the RenderObject* passed in. This is not what the code did though. This patch removes the renderer argument and the Element subclass shadow implementation so that confusion like this can't occur again. Reviewed by Oliver Hunt * dom/Element.cpp: * dom/Element.h: * dom/Node.cpp: (WebCore::Node::createRendererIfNeeded): (WebCore::Node::styleForRenderer): * dom/Node.h: * html/HTMLOptGroupElement.cpp: (WebCore::HTMLOptGroupElement::attach): * html/HTMLOptionElement.cpp: (WebCore::HTMLOptionElement::attach): * svg/SVGClipPathElement.cpp: (WebCore::SVGClipPathElement::canvasResource): * svg/SVGFEDiffuseLightingElement.cpp: (WebCore::SVGFEDiffuseLightingElement::build): * svg/SVGFEFloodElement.cpp: (WebCore::SVGFEFloodElement::build): * svg/SVGFESpecularLightingElement.cpp: (WebCore::SVGFESpecularLightingElement::build): * svg/SVGGradientElement.cpp: (WebCore::SVGGradientElement::buildStops): * svg/SVGUseElement.cpp: (WebCore::SVGUseElement::attachShadowTree): 2008-10-16 David Hyatt https://bugs.webkit.org/attachment.cgi?bugid=21647 Make RenderStyle inherit from RefCounted so that it works with RefPtr. RenderStyle was being malloced out of the RenderArena. Years and years ago (before TCMalloc), the plan was to make RenderStyles and all their associated sub-structs use the arena. However only the RenderStyle itself was ever changed to use the arena. At a later point style sharing was implemented, which made using the arena for styles pretty pointless, as the bulk of the styles on a given page are actually shared. Not ever making the sub-structs use the arena also limited the usefulness. Now that we have RefPtr/PassRefPtr to eliminate manual ref/deref and now that we use TCMalloc for fast mallocs, there is no reason to keep RenderStyles in the arena. The benefits of being able to eliminate manual ref/deref far outweigh keeping them in the arena. Reviewed by Adam Roben * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::CSSStyleSelector): (WebCore::CSSStyleSelector::~CSSStyleSelector): (WebCore::CSSStyleSelector::styleForElement): (WebCore::CSSStyleSelector::keyframeStylesForAnimation): (WebCore::CSSStyleSelector::pseudoStyleForElement): These methods now return a PassRefPtr. They will null out the m_style variable as they hand it back so that it isn't left pointing to the previous style resolve RenderStyle (which is what the old code did). (WebCore::CSSStyleSelector::updateFont): (WebCore::CSSStyleSelector::checkSelector): (WebCore::CSSStyleSelector::applyProperty): (WebCore::CSSStyleSelector::mapFillSize): (WebCore::CSSStyleSelector::mapFillXPosition): (WebCore::CSSStyleSelector::mapFillYPosition): * css/CSSStyleSelector.h: (WebCore::CSSStyleSelector::style): * dom/Document.cpp: (WebCore::Document::recalcStyle): * dom/Element.cpp: (WebCore::Element::styleForRenderer): (WebCore::Element::recalcStyle): (WebCore::Element::computedStyle): * dom/Element.h: * dom/ElementRareData.h: (WebCore::ElementRareData::ElementRareData): (WebCore::ElementRareData::resetComputedStyle): * dom/Node.cpp: (WebCore::Node::diff): (WebCore::Node::createRendererIfNeeded): (WebCore::Node::styleForRenderer): (WebCore::Node::setRenderStyle): * dom/Node.h: * html/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::setFont): * html/HTMLOptGroupElement.cpp: (WebCore::HTMLOptGroupElement::attach): (WebCore::HTMLOptGroupElement::detach): (WebCore::HTMLOptGroupElement::setRenderStyle): (WebCore::HTMLOptGroupElement::nonRendererRenderStyle): * html/HTMLOptGroupElement.h: * html/HTMLOptionElement.cpp: (WebCore::HTMLOptionElement::attach): (WebCore::HTMLOptionElement::detach): (WebCore::HTMLOptionElement::setRenderStyle): (WebCore::HTMLOptionElement::nonRendererRenderStyle): * html/HTMLOptionElement.h: * page/animation/AnimationBase.h: (WebCore::AnimationBase::animate): * page/animation/AnimationController.cpp: (WebCore::AnimationController::updateAnimations): * page/animation/AnimationController.h: * page/animation/CompositeAnimation.cpp: (WebCore::CompositeAnimationPrivate::updateTransitions): (WebCore::CompositeAnimationPrivate::updateKeyframeAnimations): (WebCore::CompositeAnimationPrivate::animate): (WebCore::CompositeAnimation::animate): * page/animation/CompositeAnimation.h: * page/animation/ImplicitAnimation.cpp: (WebCore::ImplicitAnimation::ImplicitAnimation): (WebCore::ImplicitAnimation::~ImplicitAnimation): (WebCore::ImplicitAnimation::animate): (WebCore::ImplicitAnimation::reset): (WebCore::ImplicitAnimation::isTargetPropertyEqual): (WebCore::ImplicitAnimation::blendPropertyValueInStyle): * page/animation/ImplicitAnimation.h: (WebCore::ImplicitAnimation::create): * page/animation/KeyframeAnimation.cpp: (WebCore::KeyframeAnimation::KeyframeAnimation): (WebCore::KeyframeAnimation::~KeyframeAnimation): (WebCore::KeyframeAnimation::animate): (WebCore::KeyframeAnimation::validateTransformFunctionList): * page/animation/KeyframeAnimation.h: (WebCore::KeyframeAnimation::create): (WebCore::KeyframeAnimation::unanimatedStyle): * rendering/InlineTextBox.cpp: (WebCore::InlineTextBox::paint): * rendering/MediaControlElements.cpp: (WebCore::MediaControlShadowRootElement::MediaControlShadowRootElement): (WebCore::MediaControlInputElement::MediaControlInputElement): * rendering/RenderBlock.cpp: (WebCore::RenderBlock::styleDidChange): (WebCore::RenderBlock::updateFirstLetter): * rendering/RenderContainer.cpp: (WebCore::RenderContainer::addChild): (WebCore::RenderContainer::updateBeforeAfterContentForContainer): * rendering/RenderFileUploadControl.cpp: (WebCore::RenderFileUploadControl::updateFromElement): (WebCore::RenderFileUploadControl::createButtonStyle): * rendering/RenderFileUploadControl.h: * rendering/RenderFlow.cpp: (WebCore::RenderFlow::createAnonymousFlow): * rendering/RenderFlow.h: * rendering/RenderInline.cpp: (WebCore::RenderInline::addChildToFlow): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::updateScrollCornerStyle): (WebCore::RenderLayer::updateResizerStyle): (WebCore::RenderLayer::updateReflectionStyle): * rendering/RenderListItem.cpp: (WebCore::RenderListItem::styleDidChange): * rendering/RenderMedia.cpp: (WebCore::RenderMedia::createPanel): (WebCore::RenderMedia::createTimeDisplay): (WebCore::RenderMedia::changeOpacity): * rendering/RenderObject.cpp: (WebCore::RenderObject::selectionBackgroundColor): (WebCore::RenderObject::selectionForegroundColor): (WebCore::RenderObject::createAnonymousBlock): (WebCore::RenderObject::setAnimatableStyle): (WebCore::RenderObject::setStyle): (WebCore::RenderObject::setStyleInternal): (WebCore::RenderObject::arenaDelete): (WebCore::RenderObject::firstLineStyle): (WebCore::RenderObject::getPseudoStyle): * rendering/RenderObject.h: (WebCore::RenderObject::style): * rendering/RenderSVGBlock.cpp: (WebCore::RenderSVGBlock::setStyle): * rendering/RenderSVGBlock.h: * rendering/RenderScrollbar.cpp: (WebCore::RenderScrollbar::getScrollbarPseudoStyle): (WebCore::RenderScrollbar::updateScrollbarPart): * rendering/RenderScrollbar.h: * rendering/RenderSlider.cpp: (WebCore::RenderSlider::styleDidChange): (WebCore::RenderSlider::createThumbStyle): (WebCore::RenderSlider::updateFromElement): * rendering/RenderSlider.h: * rendering/RenderTable.cpp: (WebCore::RenderTable::addChild): * rendering/RenderTableRow.cpp: (WebCore::RenderTableRow::addChild): * rendering/RenderTableSection.cpp: (WebCore::RenderTableSection::addChild): * rendering/RenderTextControl.cpp: (WebCore::RenderTextControl::styleDidChange): (WebCore::RenderTextControl::createInnerBlockStyle): (WebCore::RenderTextControl::createInnerTextStyle): (WebCore::RenderTextControl::createResultsButtonStyle): (WebCore::RenderTextControl::createCancelButtonStyle): (WebCore::RenderTextControl::createSubtreeIfNeeded): (WebCore::RenderTextControl::updatePlaceholderVisibility): * rendering/RenderTextControl.h: * rendering/TextControlInnerElements.cpp: (WebCore::TextControlInnerElement::attachInnerElement): * rendering/TextControlInnerElements.h: * rendering/style/KeyframeList.cpp: (WebCore::KeyframeList::clear): (WebCore::KeyframeList::operator==): (WebCore::KeyframeList::insert): * rendering/style/KeyframeList.h: (WebCore::KeyframeValue::KeyframeValue): (WebCore::KeyframeValue::~KeyframeValue): (WebCore::KeyframeValue::key): (WebCore::KeyframeValue::style): * rendering/style/RenderStyle.cpp: (WebCore::defaultStyle): (WebCore::RenderStyle::create): (WebCore::RenderStyle::createDefaultStyle): (WebCore::RenderStyle::clone): (WebCore::RenderStyle::RenderStyle): (WebCore::RenderStyle::getCachedPseudoStyle): (WebCore::RenderStyle::addCachedPseudoStyle): * rendering/style/RenderStyle.h: (WebCore::): (WebCore::InheritedFlags::operator!=): * svg/SVGClipPathElement.cpp: (WebCore::SVGClipPathElement::canvasResource): * svg/SVGGradientElement.cpp: (WebCore::SVGGradientElement::buildStops): * svg/SVGStyledElement.cpp: (WebCore::SVGStyledElement::resolveStyle): * svg/SVGStyledElement.h: * svg/SVGUseElement.cpp: (WebCore::SVGUseElement::recalcStyle): (WebCore::SVGUseElement::attachShadowTree): 2008-10-16 Kenneth Russell Reviewed and landed by Anders Carlsson. https://bugs.webkit.org/show_bug.cgi?id=21587 NPN_PluginThreadAsyncCall does not work properly * plugins/PluginMainThreadScheduler.cpp: (WebCore::PluginMainThreadScheduler::dispatchCalls): Make sure to set m_callPending to false once the queue has been cleared. 2008-10-15 Alexey Proskuryakov Reviewed by Darin Adler. https://bugs.webkit.org/show_bug.cgi?id=21609 Make MessagePorts protect their peers across heaps * dom/MessagePort.cpp: (WebCore::MessagePort::MessagePort): * dom/MessagePort.h: (WebCore::MessagePort::setJSWrapperIsKnownToBeInaccessible): (WebCore::MessagePort::jsWrapperIsKnownToBeInaccessible): Track objects whose JS wrappers are no longer reachable in MessagePort. Unfortunately, this means that the implementation object knows about JS bindings - but it is not possible to access JS wrappers from another heap/thread. * bindings/js/JSDOMBinding.cpp: (WebCore::markCrossHeapDependentObjectsForDocument): * bindings/js/JSDOMBinding.h: * bindings/js/JSDOMWindowBase.cpp: (WebCore::JSDOMWindowBase::markCrossHeapDependentObjects): * bindings/js/JSDOMWindowBase.h: Implement cross-heap dependency tracking for entangled MessagePorts. If a wrapper object hasn't been marked normally, it is marked as inaccessible. It is then marked manually, as long as its entangled port is accessible itself. 2008-10-15 Jon Honeycutt Remove unneeded check of whether a Page defers loading before running it in a modal dialog. No test possible. Reviewed by Tim Hatcher. * page/Chrome.cpp: 2008-10-15 Geoffrey Garen Reviewed by Cameron Zwarich. Fixed https://bugs.webkit.org/show_bug.cgi?id=21345 Start the debugger without reloading the inspected page * WebCore.base.exp: New symbols. * ForwardingHeaders/kjs/CollectorHeapIterator.h: Copied from ForwardingHeaders/kjs/ustring.h. * ForwardingHeaders/kjs/Parser.h: Copied from ForwardingHeaders/kjs/ustring.h. * WebCore.xcodeproj/project.pbxproj: New forwarding headers. * inspector/InspectorController.cpp: (WebCore::InspectorController::setWindowVisible): (WebCore::InspectorController::windowScriptObjectAvailable): (WebCore::InspectorController::startDebugging): * inspector/InspectorController.h: Renamed startDebuggingAndReloadInspectedPage to startDebugging, and changed its behavior to match. * inspector/JavaScriptDebugListener.h: * inspector/JavaScriptDebugServer.cpp: (WebCore::JavaScriptDebugServer::JavaScriptDebugServer): (WebCore::JavaScriptDebugServer::addListener): (WebCore::JavaScriptDebugServer::removeListener): (WebCore::JavaScriptDebugServer::recompileAllJSFunctions): (WebCore::JavaScriptDebugServer::willAddFirstListener): (WebCore::JavaScriptDebugServer::didRemoveLastListener): * inspector/JavaScriptDebugServer.h: Refactored the JavaScriptDebugServer to centralize handling of adding the first listener and removing the last. Then, added a feature to recompile all JS functions in these cases. This allows us to dynamically add and remove hooks like the debugger hooks without reloading the page. * inspector/front-end/ScriptsPanel.js: * English.lproj/localizedStrings.js: Updated for startDebuggingAndReloadInspectedPage => startDebugging rename. Removed all UI that claimed that starting the debugger would reload the page. 2008-10-15 Adele Peterson Attempt to fix the Tiger build. * platform/network/mac/ResourceHandleMac.mm: 2008-10-15 Holger Hans Peter Freyther Build fix attempt. Try to fix static/non-static declaration of g_string_append_uri_escape by renaming that string. Another look needs to be taken. * platform/gtk/guriescape.c: (_webcore_g_string_append_uri_escaped): (_webcore_g_uri_escape_string): 2008-10-15 Holger Hans Peter Freyther Build fix. m_animatingImageType is gone. * platform/graphics/cairo/ImageCairo.cpp: (WebCore::BitmapImage::BitmapImage): 2008-10-15 Jeff Cook Reviewed by Holger Freyther. Stop SIGSEGV when leaving a page with a Flash object by reordering window destruction and plugin stop. See https://bugs.webkit.org/show_bug.cgi?id=20779 * plugins/gtk/PluginViewGtk.cpp: (WebCore::PluginView::stop): 2008-10-15 Adele Peterson Reviewed by Sam Weinig. Implement didSendBodyData delegate method, and use older code path when that delegate doesn't exist. * platform/network/ResourceHandle.h: * platform/network/mac/FormDataStreamMac.mm: (WebCore::formRead): * platform/network/mac/ResourceHandleMac.mm: (WebCore::ResourceHandle::didSendBodyDataDelegateExists): (WebCore::ResourceHandle::start): (WebCore::ResourceHandle::cancel): (-[WebCoreResourceHandleAsDelegate connection:willSendRequest:redirectResponse:]): (-[WebCoreResourceHandleAsDelegate connection:didSendBodyData:totalBytesWritten:totalBytesExpectedToWrite:]): (-[WebCoreResourceHandleAsDelegate connectionDidFinishLoading:]): (-[WebCoreResourceHandleAsDelegate connection:didFailWithError:]): 2008-10-15 Peter Kasting Reviewed by David Hyatt. Qt build bustage fix. * platform/graphics/qt/StillImageQt.h: (WebCore::StillImage::destroyDecodedData): 2008-10-15 David Hyatt Make sure scrollbar styles get deleted if they aren't assigned to a renderer. Reviewed by Mark Rowe * rendering/RenderScrollbar.cpp: (WebCore::RenderScrollbar::getScrollbarPseudoStyle): (WebCore::RenderScrollbar::updateScrollbarPart): 2008-10-15 Peter Kasting Reviewed by David Hyatt. https://bugs.webkit.org/show_bug.cgi?id=19663 (Second attempt) Account for paint and timer lag when animating images. Also pretend that images whose animations were paused (by becoming invisible) continued to animate, by "catching up" to the correct frame when they're shown again. * platform/graphics/BitmapImage.cpp: (WebCore::BitmapImage::BitmapImage): (WebCore::BitmapImage::destroyDecodedData): (WebCore::BitmapImage::cacheFrame): (WebCore::BitmapImage::frameIsCompleteAtIndex): (WebCore::BitmapImage::frameDurationAtIndex): (WebCore::BitmapImage::frameHasAlphaAtIndex): (WebCore::BitmapImage::repetitionCount): (WebCore::BitmapImage::shouldAnimate): (WebCore::BitmapImage::startAnimation): (WebCore::BitmapImage::resetAnimation): (WebCore::BitmapImage::advanceAnimation): (WebCore::BitmapImage::internalAdvanceAnimation): (WebCore::BitmapImage::notifyObserverAndTrimDecodedData): * platform/graphics/BitmapImage.h: (WebCore::FrameData::FrameData): (WebCore::BitmapImage::): * platform/graphics/GeneratedImage.h: (WebCore::GeneratedImage::destroyDecodedData): * platform/graphics/Image.h: * platform/graphics/cairo/ImageCairo.cpp: (WebCore::FrameData::clear): (WebCore::BitmapImage::BitmapImage): (WebCore::BitmapImage::draw): * platform/graphics/cg/ImageCG.cpp: (WebCore::FrameData::clear): (WebCore::BitmapImage::BitmapImage): (WebCore::BitmapImage::draw): * platform/graphics/cg/PDFDocumentImage.h: (WebCore::PDFDocumentImage::destroyDecodedData): * platform/graphics/qt/ImageQt.cpp: (WebCore::FrameData::clear): (WebCore::BitmapImage::draw): * platform/graphics/wx/ImageWx.cpp: (WebCore::FrameData::clear): (WebCore::BitmapImage::draw): * svg/graphics/SVGImage.h: (WebCore::SVGImage::destroyDecodedData): 2008-10-14 Maxime Britto Reviewed by Darin Adler, tweaked and landed by Beth. * WebCore.base.exp: Exposes two functions to be able to create a selection from a point on the screen. Also exposes the new TextIterator::currentNode function. * WebCore/editing/TextIterator.cpp: (TextIterator::currentNode) : New function that returns the current text node or NULL if there is no text node. 2008-10-15 Marco Barisione Reviewed by Holger Freyther. http://bugs.webkit.org/show_bug.cgi?id=21211 [CURL] Upload doesn't work because cancel is called FormDataStream::read returns 0 when retrieving data from the form fails, but also when there is no more data to send. This means that ResourceHandleManager::cancel is always called even when the data was successfully sent. Check if there are more elements in the form before calling FormDataStream::read. * platform/network/curl/FormDataStreamCurl.cpp: (WebCore::FormDataStream::hasMoreElements): * platform/network/curl/FormDataStreamCurl.h: * platform/network/curl/ResourceHandleManager.cpp: (WebCore::readCallback): 2008-10-15 Marco Barisione Reviewed by Holger Freyther. http://bugs.webkit.org/show_bug.cgi?id=20664 [GTK] File names are not always encodable in UTF-8 On Linux file names are just raw data and cannot always be directly encoded in UTF-8 or in any other encodings, so we escape them before storing the file name in a String and unescape them before passing them to native functions handling files. * GNUmakefile.am: * platform/FileSystem.h: * platform/gtk/FileChooserGtk.cpp: (WebCore::stringByAdoptingFileSystemRepresentation): (WebCore::FileChooser::basenameForWidth): * platform/gtk/FileSystemGtk.cpp: (WebCore::filenameToString): (WebCore::filenameFromString): (WebCore::filenameForDisplay): (WebCore::fileExists): (WebCore::deleteFile): (WebCore::deleteEmptyDirectory): (WebCore::getFileSize): (WebCore::getFileModificationTime): (WebCore::makeAllDirectories): (WebCore::homeDirectoryPath): (WebCore::pathGetFileName): (WebCore::listDirectory): * platform/gtk/KURLGtk.cpp: (WebCore::KURL::fileSystemPath): * platform/gtk/SharedBufferGtk.cpp: (WebCore::SharedBuffer::createWithContentsOfFile): * platform/gtk/guriescape.c: Added. (is_valid): (gunichar_ok): (g_string_append_uri_escaped): (_webcore_g_uri_escape_string): * platform/gtk/guriescape.h: Added. 2008-10-15 Dirk Schulze Reviewed by Eric Seidel. - part of https://bugs.webkit.org/show_bug.cgi?id=20543 Moved gradient spread method out of SVG into the GraphicsContext. * platform/graphics/GraphicsContext.cpp: (WebCore::GraphicsContext::spreadMethod): (WebCore::GraphicsContext::setSpreadMethod): * platform/graphics/GraphicsContext.h: (WebCore::): * platform/graphics/GraphicsContextPrivate.h: * platform/graphics/cairo/GraphicsContextCairo.cpp: (WebCore::applySpreadMethod): (WebCore::GraphicsContext::fillPath): (WebCore::GraphicsContext::strokePath): * platform/graphics/qt/GraphicsContextQt.cpp: (WebCore::applySpreadMethod): (WebCore::GraphicsContext::fillPath): (WebCore::GraphicsContext::strokePath): * svg/GradientAttributes.h: (WebCore::GradientAttributes::GradientAttributes): (WebCore::GradientAttributes::spreadMethod): (WebCore::GradientAttributes::setSpreadMethod): * svg/SVGGradientElement.cpp: (WebCore::SVGGradientElement::parseMappedAttribute): * svg/SVGGradientElement.h: * svg/SVGLinearGradientElement.cpp: (WebCore::SVGLinearGradientElement::collectGradientProperties): * svg/SVGRadialGradientElement.cpp: (WebCore::SVGRadialGradientElement::collectGradientProperties): * svg/graphics/SVGPaintServerGradient.cpp: (WebCore::operator<<): (WebCore::SVGPaintServerGradient::SVGPaintServerGradient): (WebCore::SVGPaintServerGradient::spreadMethod): (WebCore::SVGPaintServerGradient::setGradientSpreadMethod): (WebCore::SVGPaintServerGradient::externalRepresentation): * svg/graphics/SVGPaintServerGradient.h: * svg/graphics/cairo/SVGPaintServerGradientCairo.cpp: (WebCore::SVGPaintServerGradient::setup): * svg/graphics/qt/SVGPaintServerGradientQt.cpp: (WebCore::SVGPaintServerGradient::setup): 2008-10-09 Darin Fisher Reviewed by Sam Weinig. Make pan scrolling a platform configurable option https://bugs.webkit.org/show_bug.cgi?id=21515 * page/EventHandler.cpp: (WebCore::EventHandler::handleAutoscroll): (WebCore::EventHandler::autoscrollTimerFired): (WebCore::EventHandler::stopAutoscrollTimer): (WebCore::EventHandler::handleMousePressEvent): (WebCore::EventHandler::keyEvent): 2008-10-10 Darin Fisher Reviewed by Darin Adler. Add some PLATFORM(CHROMIUM) ifdefs to WebCore https://bugs.webkit.org/show_bug.cgi?id=21511 * loader/FTPDirectoryDocument.cpp: * loader/FTPDirectoryParser.cpp: * loader/FrameLoader.cpp: (WebCore::FrameLoader::finishedLoadingDocument): * platform/ContextMenuItem.h: * platform/Cursor.h: * platform/DragData.h: * platform/DragImage.h: * platform/Pasteboard.h: * platform/PlatformKeyboardEvent.h: (WebCore::PlatformKeyboardEvent::isSystemKey): * platform/PlatformMenuDescription.h: * platform/PlatformMouseEvent.h: * platform/PlatformWheelEvent.h: * platform/PopupMenu.h: * platform/ScrollView.h: * platform/Widget.h: * platform/network/NetworkStateNotifier.h: 2008-10-14 Chris Marrin Reviewed by Darin Adler. Fixed https://bugs.webkit.org/show_bug.cgi?id=21490 Optimize keyframe style sheet changes by avoiding styleSheetChanged() Test: css3/change-keyframes.html * css/WebKitCSSKeyframesRule.cpp: (WebCore::WebKitCSSKeyframesRule::append): (WebCore::WebKitCSSKeyframesRule::deleteRule): 2008-10-14 David Hyatt https://bugs.webkit.org/show_bug.cgi?id=21595 Clean up background and overflow propagation from the body to the viewport. Make it match the latest CSS2.1 spec thinking. Reviewed by Adam Roben Added many tests at fast/body-propagation/. These are Simon Pieters' tests of propagation handling (available at http://simon.html5.org/test/css/magic-body/). * dom/Document.cpp: (WebCore::Document::body): * page/FrameView.cpp: (WebCore::FrameView::layout): * rendering/RenderBox.cpp: (WebCore::RenderBox::styleDidChange): (WebCore::RenderBox::paintRootBoxDecorations): (WebCore::RenderBox::paintBoxDecorations): (WebCore::RenderBox::repaintLayerRectsForImage): 2008-10-14 Dimitri Glazkov Reviewed and landed by Sam Weinig. Due to change in spec (http://dev.w3.org/2006/webapi/selectors-api/#namespace), remove NSResolver code, leaving only checking for selectors that need NS resolution and throwing a coresponding error. * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * WebCoreSources.bkl: * bindings/js/JSDocumentCustom.cpp: * bindings/js/JSDocumentFragmentCustom.cpp: * bindings/js/JSElementCustom.cpp: * bindings/js/JSNSResolver.cpp: Removed. * bindings/js/JSNSResolver.h: Removed. * dom/Document.idl: * dom/DocumentFragment.idl: * dom/Element.idl: * dom/NSResolver.h: Removed. * dom/NSResolver.idl: Removed. * dom/Node.h: * dom/Node.cpp: (WebCore::forEachTagSelector): (WebCore::SelectorNeedsNamespaceResolutionFunctor::operator()): (WebCore::selectorNeedsNamespaceResolution): (WebCore::Node::querySelector): (WebCore::Node::querySelectorAll): 2008-10-14 Darin Adler Reviewed by Sam Weinig (all but the FormDataListItem rename). - https://bugs.webkit.org/show_bug.cgi?id=21593 Bug 21593: add multiple-file support to HTMLFormElement * html/FormDataList.cpp: Removed appendFile since it's now inline. Also took incorrect old copyrights off of this file that are left over from when it was split. * html/FormDataList.h: Ditto. Renamed FormDataListItem to Item and made it a member of FormDataList. Changed it to hold a File object instead of a path. And made its data members private. Changed FormDataList::appendFile accordingly. * html/HTMLFormElement.cpp: (WebCore::HTMLFormElement::formData): Updated for above changes. Removed the code that special-cases HTMLInputElement, because now the FormDataListItem has everything we need. And if there are multiple files, we'll get multiple list items for them. * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::appendFormData): Changed the code for to use File objects instead of path strings and also to append multiple files if the file list has them. 2008-10-14 Tor Arne Vestbø Reviewed by Simon. Fix QtWebKit scrollbar painting errors * platform/qt/ScrollbarThemeQt.cpp: (WebCore::ScrollbarThemeQt::paint): (WebCore::ScrollbarThemeQt::paintScrollCorner): 2008-10-14 Tor Arne Vestbø Reviewed by Simon. Fix scrollbar arrows for horizontal scrollbars * platform/qt/ScrollbarThemeQt.cpp: (WebCore::styleOptionSlider): 2008-10-14 Tor Arne Vestbø Reviewed by Simon. Use style-painter to draw scrollbars in ScrollbarThemeQt This has the benefit of setting up the painter properly without antialiasing and saving and restoring the brush. It also ensures that we use the style of the QWebView over the QApplication style if possible. * platform/qt/RenderThemeQt.cpp: (WebCore::StylePainter::StylePainter): (WebCore::StylePainter::init): * platform/qt/RenderThemeQt.h: * platform/qt/ScrollbarThemeQt.cpp: (WebCore::ScrollbarThemeQt::paint): 2008-10-13 David Hyatt Add support for CSS transitions on some SVG properties. This patch is intended to be a guideline for how to add support for the rest. Reviewed by Oliver Hunt * page/animation/AnimationBase.cpp: (WebCore::ensurePropertyMap): * rendering/style/RenderStyle.h: (WebCore::RenderStyle::fillOpacity): (WebCore::RenderStyle::setFillOpacity): (WebCore::RenderStyle::strokeOpacity): (WebCore::RenderStyle::setStrokeOpacity): (WebCore::RenderStyle::floodOpacity): (WebCore::RenderStyle::setFloodOpacity): 2008-10-13 David Hyatt REGRESSION(r37432-37490): Scroll bar is not drawn in Bookmark View, Preferences sheets. Fix for disabled scrollbars not painting in Windows Safari. Make sure that the Windows theme implements paintTrackBackground so that when the thumb is not present the track still paints. Reviewed by Oliver Hunt * platform/ScrollbarThemeComposite.cpp: (WebCore::ScrollbarThemeComposite::paint): * platform/win/ScrollbarThemeWin.cpp: (WebCore::ScrollbarThemeWin::paintTrackBackground): * platform/win/ScrollbarThemeWin.h: 2008-10-13 David Hyatt Fix over-invalidation of native scrollbars. Reviewed by Oliver Hunt * platform/Scrollbar.h: (WebCore::Scrollbar::styleChanged): * platform/mac/ScrollbarThemeMac.mm: (+[ScrollbarPrefsObserver appearancePrefsChanged:]): * rendering/RenderScrollbar.cpp: (WebCore::RenderScrollbar::styleChanged): 2008-10-13 Alp Toker Fix autotools dist build target by listing recently added header files only. Not reviewed. * GNUmakefile.am: 2008-10-13 Mark Rowe Reviewed by Brady Eidson. Don't run a SQLite query on every iteration of the sync thread when the query will touch a large portion of the icon database while performing no useful work. * loader/icon/IconDatabase.cpp: (WebCore::IconDatabase::writeToDatabase): Don't call checkForDanglingPageURLs unless we modified the database. (WebCore::IconDatabase::checkForDanglingPageURLs): Don't do any work in a release build unless we've been asked to prune any dangling pageURLs that we find. 2008-10-13 Maciej Stachowiak Rubber stamped by Mark Rowe. - use gcc 4.2 when building with Xcode 3.1 or newer on Leopard, even though this is not the default * Configurations/DebugRelease.xcconfig: 2008-10-13 David Hyatt Make dropdown lists on Windows work with CSS custom scrollbars. Reviewed by Adele * platform/PopupMenu.h: (WebCore::PopupMenu::scrollbarCornerPresent): * platform/PopupMenuClient.h: * platform/win/PopupMenuWin.cpp: (WebCore::PopupMenu::show): * rendering/RenderMenuList.cpp: (WebCore::RenderMenuList::createScrollbar): * rendering/RenderMenuList.h: * rendering/RenderTextControl.cpp: (WebCore::RenderTextControl::createScrollbar): * rendering/RenderTextControl.h: 2008-10-13 Chris Fleizach Reviewed by Beth Dakin. Links from image maps not being included in AXLinkUIElements Links from image maps were not being included in the web area's AXLinkUIElements attribute. The position of image map links was being reported incorrectly and the parent-chain hierarchy for image map links was incorrect because image map links did not have a reference to their parent image. Test: accessibility/document-links.html * page/AccessibilityImageMapLink.cpp: (WebCore::AccessibilityImageMapLink::parentObject): (WebCore::AccessibilityImageMapLink::actionElement): (WebCore::AccessibilityImageMapLink::elementRect): * page/AccessibilityImageMapLink.h: (WebCore::AccessibilityImageMapLink::setHTMLMapElement): (WebCore::AccessibilityImageMapLink::setParent): * page/AccessibilityObject.cpp: * page/AccessibilityObject.h: * page/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::accessibilityParentForImageMap): (WebCore::AccessibilityRenderObject::getDocumentLinks): (WebCore::AccessibilityRenderObject::addChildren): * page/AccessibilityRenderObject.h: * page/mac/AccessibilityObjectWrapper.mm: (-[AccessibilityObjectWrapper accessibilityAttributeValue:]): 2008-10-13 David Hyatt Make RenderListBox work with CSS scrollbars. Refactoring this code to support creation/destruction in the same way RenderLayer does also fixes a bug where the PLT would assert on the next-to-last page (no idea how to make a test case for that, though, since I couldn't repro without running the whole PLT). Reviewed by Tim Hatcher Added scrollbars/listbox-scrollbar-combinations.html * rendering/RenderListBox.cpp: (WebCore::RenderListBox::~RenderListBox): (WebCore::RenderListBox::updateFromElement): (WebCore::RenderListBox::createScrollbar): (WebCore::RenderListBox::destroyScrollbar): (WebCore::RenderListBox::setHasVerticalScrollbar): * rendering/RenderListBox.h: 2008-10-13 David Hyatt In order to always match the :corner-present pseudo-class properly, delay initial updating of scrollbar styles until the layer has the scrollbars in its member variables. Reviewed by Tim Hatcher * rendering/RenderLayer.cpp: (WebCore::RenderLayer::setHasHorizontalScrollbar): (WebCore::RenderLayer::setHasVerticalScrollbar): * rendering/RenderScrollbar.cpp: (WebCore::RenderScrollbar::RenderScrollbar): 2008-10-13 Sam Weinig Reviewed by Dan Bernstein. Fix for https://bugs.webkit.org/show_bug.cgi?id=21577 5 false positive StructureID leaks In WebCore, we intentionally leak the common JSGlobalData which in turn leaks 5 StructureIDs. Use the new JSGlobalData::createLeaked in order to ignore the StructureIDs leaked within. * bindings/js/JSDOMWindowBase.cpp: (WebCore::JSDOMWindowBase::commonJSGlobalData): 2008-10-13 David Hyatt Add support for the :corner-present pseudoclass, which enables scrollbar pieces to change their artwork based on whether there is a scrollbar corner present. Reviewed by Tim Hatcher * css/CSSSelector.cpp: (WebCore::CSSSelector::extractPseudoType): * css/CSSSelector.h: (WebCore::CSSSelector::): * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::SelectorChecker::checkScrollbarPseudoClass): * platform/ScrollView.cpp: (WebCore::ScrollView::scrollbarCornerPresent): * platform/ScrollView.h: * platform/ScrollbarClient.h: * rendering/RenderLayer.cpp: (WebCore::cornerRect): (WebCore::scrollCornerRect): (WebCore::resizerCornerRect): (WebCore::RenderLayer::scrollbarCornerPresent): (WebCore::RenderLayer::setHasHorizontalScrollbar): (WebCore::RenderLayer::setHasVerticalScrollbar): * rendering/RenderLayer.h: (WebCore::RenderLayer::horizontalScrollbar): (WebCore::RenderLayer::verticalScrollbar): * rendering/RenderListBox.h: (WebCore::RenderListBox::scrollbarCornerPresent): 2008-10-13 David Hyatt Make resizers and scrollbar corners respect :window-inactive (one more bug fix and then Tim's master test case for all this can land). Reviewed by Tim Hatcher * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::SelectorChecker::checkSelector): (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector): (WebCore::CSSStyleSelector::SelectorChecker::checkScrollbarPseudoClass): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::paintOverflowControls): (WebCore::RenderLayer::paintScrollCorner): (WebCore::RenderLayer::paintResizer): (WebCore::RenderLayer::styleChanged): (WebCore::RenderLayer::updateScrollCornerStyle): (WebCore::RenderLayer::updateResizerStyle): * rendering/RenderLayer.h: * rendering/RenderScrollbar.cpp: (WebCore::RenderScrollbar::paint): * rendering/RenderScrollbarPart.cpp: (WebCore::RenderScrollbarPart::paintIntoRect): 2008-10-13 David Hyatt Rework resizer and scroll corner painting so that custom resizers and scroll corners will paint and invalidate properly as images load, etc. Reviewed by Tim Hatcher * rendering/RenderLayer.cpp: (WebCore::cornerRect): (WebCore::scrollCornerRect): (WebCore::resizerCornerRect): (WebCore::RenderLayer::positionOverflowControls): (WebCore::RenderLayer::paintOverflowControls): (WebCore::RenderLayer::paintScrollCorner): (WebCore::RenderLayer::paintResizer): (WebCore::RenderLayer::isPointInResizeControl): (WebCore::RenderLayer::hitTestOverflowControls): (WebCore::RenderLayer::styleChanged): * rendering/RenderLayer.h: * rendering/RenderObject.h: (WebCore::RenderObject::setRect): * rendering/RenderScrollbarPart.cpp: (WebCore::RenderScrollbarPart::styleDidChange): (WebCore::RenderScrollbarPart::imageChanged): 2008-10-13 Marco Barisione Reviewed by Darin Adler. Landed by Jan Alonzo. WebKit GTK Port needs a smartpointer to handle g_free (GFreePtr?) http://bugs.webkit.org/show_bug.cgi?id=20483 Start the conversion to use GOwnPtr and fix a memory leak. * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp: (WebCore::mediaPlayerPrivateErrorCallback): 2008-10-12 Jon Honeycutt Windows build fix. * loader/TextResourceDecoder.cpp: 2008-10-12 Darin Fisher Reviewed by Darin Adler. - fix https://bugs.webkit.org/show_bug.cgi?id=21229 Bug 21229: NetworkStateNotifier.h lacks a #include for PLATFORM(WIN) * platform/network/NetworkStateNotifier.h: Add the #include. 2008-10-12 Darin Adler Based on work by Holger Freyther. - part of https://bugs.webkit.org/show_bug.cgi?id=20953 Split WidthIterator into its own source file. * GNUmakefile.am: Added new source files. * WebCore.vcproj/WebCore.vcproj: Ditto. * WebCore.xcodeproj/project.pbxproj: Ditto. * WebCoreSources.bkl: Ditto. * platform/graphics/Font.cpp: Use WidthIterator from its new place. * platform/graphics/WidthIterator.cpp: Added. * platform/graphics/WidthIterator.h: Added. 2008-10-12 Tony Chang Reviewed by Sam Weinig. - https://bugs.webkit.org/show_bug.cgi?id=21480 Remove duplicate definitions of MimeClassInfo and PluginInfo. * plugins/PluginInfoStore.cpp: Added an include. * plugins/PluginInfoStore.h: Removed struct declarations. 2008-10-12 Darin Adler Reviewed by Dan Bernstein. - https://bugs.webkit.org/show_bug.cgi?id=21563 Bug 21563: platform Gradient class should not use the CSS parser * platform/graphics/Gradient.cpp: Removed the overload of addColorStop that accepts a CSS color string. That's handled in the DOM now, not here. (WebCore::Gradient::addColorStop): Use getRGBA instead of having our own copy of it here. * platform/graphics/Gradient.h: More of the same. Tweak formatting a bit. 2008-10-12 Glenn Wilson Reviewed by Darin Adler. - https://bugs.webkit.org/show_bug.cgi?id=20461 Added feature to allow multi-line inputs into text fields. HTMLInputElement would cut the set text at the first 'system' character, so it would truncate at the first carriage return or newline. This fix modifies that behavior to truncate at any non-space system character but changes \r, \n, and \r\n to a single space. Tests: editing/pasteboard/paste-multiline-text-input.html * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::constrainValue): 2008-10-12 Dirk Schulze Reviewed by Eric Seidel. - https://bugs.webkit.org/show_bug.cgi?id=20435 Added exception codes to canvas gradients to match current specification. Tests: fast/canvas/gradient-addColorStop-with-invalid-color.html fast/canvas/linearGradient-infinite-values.html fast/canvas/radialGradient-infinite-values.html * html/CanvasGradient.cpp: (WebCore::CanvasGradient::addColorStop): * html/CanvasGradient.h: * html/CanvasGradient.idl: * html/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::createLinearGradient): (WebCore::CanvasRenderingContext2D::createRadialGradient): * html/CanvasRenderingContext2D.h: * html/CanvasRenderingContext2D.idl: 2008-10-12 Eric Roman - https://bugs.webkit.org/show_bug.cgi?id=20246 Implement RenderThemeWin::systemColor() to match Windows colors. Reviewed by David Hyatt. * rendering/RenderThemeWin.cpp: (WebCore::cssValueIdToSysColorIndex): (WebCore::RenderThemeWin::systemColor): * rendering/RenderThemeWin.h: 2008-10-12 Aaron Bockover Reviewed by Alp Toker. Add version parsing for Flash, and the PluginQuirkDontSetNullWindowHandleOnDestroy plugin quirk if Flash 10 or newer since at least in b218, setting a NULL window handler on destroy crashes WebKit * plugins/gtk/PluginPackageGtk.cpp: 2008-10-12 Jonathon Jongsma Reviewed by Oliver Hunt. - https://bugs.webkit.org/show_bug.cgi?id=19331 : Drag and drop of links in edit mode violates assert in MoveSelectionCommand::doApply() * page/DragController.cpp: (WebCore::DragController::startDrag): When a link is dragged without any text selected (note: for this to work, the EditableLinkBehavior setting must be set to 'live' or 'default') and then dropped into an editable html document it will eventually violate an ASSERT in MoveSelectionCommand that requires that there is a selection. To prevent this, expand the selection to the enclosing anchor tag when the drag begins. 2008-10-12 Darin Adler Reviewed by Mark Rowe. - fix https://bugs.webkit.org/show_bug.cgi?id=21557 Bug 21557: REGRESSION: generated-layer-scrollbar-crash.html is crashing * rendering/RenderObject.cpp: (WebCore::RenderObject::getPseudoStyle): Keep walking up the parent chain until we hit an Element. Nowadays, Node::isElementNode() is just as efficient as RenderObject::isText(), and this guarantees that the node can be cast to Element*, which is done just below. The reason this is hit is that RenderLayer can call getPseudoStyle on a RenderView, which has the document as its element() -- and a document is neither a Text node nor an Element. A loose end is that this seems to mean you can't style the scrollbar corner or the resizer on a RenderView. Hyatt may want to look into that later. 2008-10-12 Darin Adler Reviewed by Sam Weinig. - https://bugs.webkit.org/show_bug.cgi?id=21556 Bug 21556: non-ASCII digits are allowed in places where only ASCII should be Tests: fast/dom/HTMLFontElement/size-attribute.html fast/dom/HTMLInputElement/size-attribute.html fast/dom/HTMLTableElement/cellpadding-attribute.html * html/HTMLFontElement.cpp: (WebCore::parseFontSizeNumber): Use isASCIIDigit instead of Unicode::isDigit, since non-ASCII digits are not valid here. * html/HTMLFontElement.h: Tweaked formatting a bit and removed the unneeded destructor declaration. * platform/text/String.cpp: (WebCore::lengthOfCharactersAsInteger): Use isASCIIDigit instead of Unicode::isDigit, since non-ASCII digits are not valid. 2008-10-12 Jungshik Shin Reviewed by Darin Adler. Treat x-user-defined as windows-1252 for html files with meta charset declaration to be compatible with Indian web sites. ( https://bugs.webkit.org/show_bug.cgi?id=18270 ) Test: fast/encoding/charset-xuser-defined.html * loader/TextResourceDecoder.cpp: (WebCore::TextResourceDecoder::setEncoding): 2008-10-12 Sam Weinig Reviewed by Dan Bernstein. Remove unneeded forward declaration. * platform/graphics/ImageBuffer.h: 2008-10-12 Sam Weinig Reviewed by Darin Adler. Fix for https://bugs.webkit.org/show_bug.cgi?id=21560 Layering violation: String should not be responsible for creating Lengths It was a layering violation for String to know haw to parse into Lengths, LengthArrays, and CoordsArrays. * GNUmakefile.am: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * WebCoreSources.bkl: * html/HTMLAreaElement.cpp: (WebCore::HTMLAreaElement::parseMappedAttribute): * html/HTMLFrameSetElement.cpp: (WebCore::HTMLFrameSetElement::parseMappedAttribute): * platform/text/AtomicString.h: (WebCore::AtomicString::percentage): * platform/text/PlatformString.h: * platform/text/String.cpp: * platform/text/StringImpl.cpp: * platform/text/StringImpl.h: * rendering/Length.cpp: Added. (WebCore::parseLength): (WebCore::countCharacter): (WebCore::newCoordsArray): (WebCore::newLengthArray): * rendering/Length.h: (WebCore::LengthSize::LengthSize): 2008-10-12 Brad Garcia Reviewed by Darin Adler. Interpret fractional percentage values for %MultiLength values. Fix for https://bugs.webkit.org/show_bug.cgi?id=3591 Test: fast/frames/frame-length-fractional-percentage.html * platform/text/StringImpl.cpp: (WebCore::parseLength): 2008-10-12 Timothy Hatcher Remember the expanded state of the rules in the Styles pane. So collapsing a rule will persist across all the elements that have that same rule. The same applies to Computed Style, so the Computed Style rule is now collapsed by default. This should help lessen the confusion on why Computed Style can't be edited (a common confusion.) https://bugs.webkit.org/show_bug.cgi?id=21553 Reviewed by Darin Adler. * inspector/front-end/PropertiesSection.js: (WebInspector.PropertiesSection): Set the _expanded property directly, instead of using the setter. Expanded is the default, so no work is needed. This prevents calling StylesSidebarPane.collapse before object initialization is complete. * inspector/front-end/StylesSidebarPane.js: (WebInspector.StylesSidebarPane.prototype.update): Check the Preferences object for the expanded state of the StylePropertiesSection. Collapse computed style by default and expand everything else. (WebInspector.StylePropertiesSection): Make a semi unique identifier to be used when remembering expanded state. (WebInspector.StylePropertiesSection.prototype.expand): Set the expanded state to true for this identifier in Preferences.styleRulesExpandedState. Don't remember the state if the dontRememberState property is true. (WebInspector.StylePropertiesSection.prototype.collapse): Set the expanded state to false for this identifier in Preferences.styleRulesExpandedState. * inspector/front-end/inspector.js: (Preferences.styleRulesExpandedState): Initialize to an empty object. 2008-10-12 Jan Michael Alonzo Reviewed by Alp Toker. [Gtk] Remove libWebCoreJS.la when doing make clean https://bugs.webkit.org/show_bug.cgi?id=21544 Remove libWebCoreJS.la when doing a clean target * GNUmakefile.am: add libWebCoreJS.la to CLEANFILES 2008-10-11 Alp Toker Reviewed by Darin Adler. https://bugs.webkit.org/show_bug.cgi?id=20592 The focus ring is not shown while navigating on some pages Fix drawFocusRing() so it doesn't depend on the current graphics state, thus matching other platforms which already work this way. This patch provides two code paths: one using straight Cairo and one specialised for the GTK+ port with a more conventional appearance. Also change focusRingColor() to return a null color, allowing the focus ring to pick up the style's current color if it isn't overridden with CSS. * platform/graphics/cairo/GraphicsContextCairo.cpp: (WebCore::GraphicsContext::drawFocusRing): * platform/gtk/TemporaryLinkStubs.cpp: (WebCore::focusRingColor): 2008-10-11 Dan Bernstein Rubber-stamped by Sam Weinig. - change all internal callers to use Cache::evict() instead of remove() * loader/Cache.cpp: (WebCore::Cache::revalidateResource): (WebCore::Cache::revalidationSucceeded): (WebCore::Cache::pruneDeadResources): (WebCore::Cache::setDisabled): 2008-10-11 David Hyatt Make sure invalidatePart knows how to invalidate the track and scrollbar backgrounds. Reviewed by Tim Hatcher * platform/ScrollbarThemeComposite.cpp: (WebCore::ScrollbarThemeComposite::invalidatePart): 2008-10-11 David Hyatt https://bugs.webkit.org/show_bug.cgi?id=21549 (regression in before/after track pieces). Also fixed resizer positioning problems. Reviewed by Tim Hatcher * platform/ScrollbarThemeComposite.cpp: (WebCore::ScrollbarThemeComposite::splitTrack): (WebCore::ScrollbarThemeComposite::trackPosition): (WebCore::ScrollbarThemeComposite::trackLength): * platform/ScrollbarThemeComposite.h: (WebCore::ScrollbarThemeComposite::constrainTrackRectToTrackPieces): * rendering/RenderLayer.cpp: (WebCore::scrollCornerRect): (WebCore::RenderLayer::positionOverflowControls): (WebCore::RenderLayer::paintOverflowControls): (WebCore::RenderLayer::isPointInResizeControl): (WebCore::RenderLayer::hitTestOverflowControls): * rendering/RenderScrollbarTheme.cpp: (WebCore::RenderScrollbarTheme::constrainTrackRectToTrackPieces): * rendering/RenderScrollbarTheme.h: 2008-10-11 Alp Toker Reviewed by David Hyatt. Implement release/retain for Widget GTK+. * platform/Widget.cpp: * platform/gtk/WidgetGtk.cpp: (WebCore::Widget::~Widget): (WebCore::Widget::releasePlatformWidget): (WebCore::Widget::retainPlatformWidget): 2008-10-11 Dan Bernstein Reviewed by Sam Weinig. - rename WebCoreSetAlwaysUseATSU to WebCoreSetAlwaysUsesComplexTextCodePath and add a corresponding getter; add the same functions on Windows * WebCore.base.exp: * platform/graphics/Font.cpp: (WebCore::Font::setCodePath): (WebCore::codePath): (WebCore::Font::canUseGlyphCache): * platform/graphics/Font.h: * platform/mac/WebCoreTextRenderer.h: * platform/mac/WebCoreTextRenderer.mm: (WebCoreSetAlwaysUsesComplexTextCodePath): (WebCoreAlwaysUsesComplexTextCodePath): * platform/win/WebCoreTextRenderer.cpp: (WebCore::WebCoreSetAlwaysUsesComplexTextCodePath): (WebCore::WebCoreAlwaysUsesComplexTextCodePath): * platform/win/WebCoreTextRenderer.h: 2008-10-11 Sam Weinig Reviewed by Cameron Zwarich. Stop leaking the event parameter names. The protected strings were showing up in the caches window after one use. No measurable performance loss. * bindings/js/JSEventListener.cpp: (WebCore::eventParameterName): 2008-10-11 Sam Weinig Reviewed by Cameron Zwarich. Remove unused function getNodeEventListener. * bindings/js/JSEventListener.cpp: * bindings/js/JSEventListener.h: 2008-10-11 David Hyatt Add support for both positive and negative margins to tracks and track pieces. Reviewed by Tim Hatcher * platform/ScrollbarThemeComposite.cpp: (WebCore::ScrollbarThemeComposite::paint): (WebCore::ScrollbarThemeComposite::hitTest): (WebCore::ScrollbarThemeComposite::splitTrack): (WebCore::ScrollbarThemeComposite::trackPieceRects): (WebCore::ScrollbarThemeComposite::trackPosition): (WebCore::ScrollbarThemeComposite::trackLength): * platform/ScrollbarThemeComposite.h: (WebCore::ScrollbarThemeComposite::adjustTrackPieceRect): * rendering/RenderScrollbar.cpp: (WebCore::RenderScrollbar::trackRect): (WebCore::RenderScrollbar::trackPieceRectWithMargins): * rendering/RenderScrollbar.h: * rendering/RenderScrollbarPart.cpp: (WebCore::RenderScrollbarPart::computeScrollbarWidth): (WebCore::RenderScrollbarPart::computeScrollbarHeight): * rendering/RenderScrollbarTheme.cpp: (WebCore::RenderScrollbarTheme::adjustTrackPieceRect): * rendering/RenderScrollbarTheme.h: 2008-10-10 David Hyatt Drop -webkit-scrollbar- from all the scrollbar pseudo-classes, since they are scoped to the scrollbar pseudo-elements anyway. Reviewed by Tim Hatcher * css/CSSSelector.cpp: (WebCore::CSSSelector::extractPseudoType): * css/CSSSelector.h: (WebCore::CSSSelector::): * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::SelectorChecker::checkScrollbarPseudoClass): 2008-10-10 Dan Bernstein Reviewed by Sam Weinig. - separate Cache::remove() into a private method and a public interface, then make Cache::pruneDeadResources() use the private method. * loader/Cache.cpp: (WebCore::Cache::pruneDeadResources): (WebCore::Cache::evict): * loader/Cache.h: (WebCore::Cache::remove): 2008-10-10 David Hyatt Fix a math error when splitting a vertical track. Clean up more of ScrollbarThemeComposite now that the track pieces meet under the thumb. Reviewed by Tim Hatcher * platform/ScrollbarThemeComposite.cpp: (WebCore::ScrollbarThemeComposite::paint): (WebCore::ScrollbarThemeComposite::splitTrack): 2008-10-10 David Hyatt Make the track pieces of a scrollbar extend under the thumb (each gets half the thumb). Reviewed by Tim Hatcher * platform/ScrollbarThemeComposite.cpp: (WebCore::ScrollbarThemeComposite::hitTest): (WebCore::ScrollbarThemeComposite::splitTrack): 2008-10-10 David Hyatt Make sure specialized ::scrollbar rules are still triggering custom scrollbar creation. Reviewed by Tim Hatcher * rendering/RenderLayer.cpp: (WebCore::RenderLayer::createScrollbar): * rendering/RenderScrollbar.cpp: (WebCore::RenderScrollbar::createCustomScrollbar): (WebCore::RenderScrollbar::RenderScrollbar): (WebCore::RenderScrollbar::setParent): (WebCore::RenderScrollbar::updateScrollbarParts): (WebCore::RenderScrollbar::updateScrollbarPart): * rendering/RenderScrollbar.h: * rendering/style/RenderStyle.h: (WebCore::RenderStyle::): 2008-10-10 David Hyatt Make sure scrollbar background images cause proper part invalidation to occur. Reviewed by Tim Hatcher * rendering/RenderScrollbar.cpp: (WebCore::RenderScrollbar::setHoveredPart): (WebCore::RenderScrollbar::setPressedPart): * rendering/RenderScrollbarPart.cpp: (WebCore::RenderScrollbarPart::styleDidChange): (WebCore::RenderScrollbarPart::imageChanged): * rendering/RenderScrollbarPart.h: 2008-10-10 Simon Fraser Reviewed by Darin Adler https://bugs.webkit.org/show_bug.cgi?id=21538 The blendFunc() for TransformOperations should never mess with the operation lists by replacing some ops with identity, otherwise the lists no longer match and transitions break. Test: transitions/matched-transform-functions.html * page/animation/AnimationBase.cpp: (WebCore::blendFunc): 2008-10-10 Simon Fraser Reviewed by Darin Adler https://bugs.webkit.org/show_bug.cgi?id=21537 Fix re-targetting a running transition; if the target property changes, we do need to make a new ImplicitAnimation. Test: transitions/retargetted-transition.html * page/animation/CompositeAnimation.cpp: (WebCore::CompositeAnimationPrivate::updateTransitions): 2008-10-10 Oliver Hunt Reviewed by Cameron Zwarich. Part of Cannot stop a slow script -- Fix assertion. When JS is terminated by the user choosing to stop a slow script the exception toString method throws, yet the console logger does not perform exception checks after logging. This leaves an exception on the Machine, which in turn results in an assertion failure next time we attempt to enter JS. The solution is just to clear the exception state after attempting to record the exception. * page/Console.cpp: (WebCore::Console::reportException): 2008-10-10 David Hyatt Make textareas work with custom CSS scrollbars and resizers. Need to access the correct renderer when looking for pseudo styles. Reviewed by Tim Hatcher * rendering/RenderLayer.cpp: (WebCore::RenderLayer::createScrollbar): (WebCore::RenderLayer::styleChanged): 2008-10-10 David Hyatt Add the ability to style the scroll corner and the resizer from CSS. Reviewed by Tim Hatcher * css/CSSSelector.cpp: (WebCore::CSSSelector::extractPseudoType): * css/CSSSelector.h: (WebCore::CSSSelector::): * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::RenderLayer): (WebCore::RenderLayer::~RenderLayer): (WebCore::RenderLayer::paintOverflowControls): (WebCore::RenderLayer::paintScrollCorner): (WebCore::RenderLayer::paintResizer): (WebCore::RenderLayer::styleChanged): * rendering/RenderLayer.h: * rendering/RenderScrollbar.cpp: (WebCore::RenderScrollbar::updateScrollbarPart): (WebCore::RenderScrollbar::paintPart): * rendering/RenderScrollbarPart.cpp: (WebCore::RenderScrollbarPart::RenderScrollbarPart): (WebCore::RenderScrollbarPart::paintIntoRect): * rendering/RenderScrollbarPart.h: * rendering/style/RenderStyle.h: (WebCore::RenderStyle::): 2008-10-10 David Hyatt Make CSS scrollbars respect the OS setting regarding where buttons should be placed. Reviewed by Sam Weinig No test case possible, since the OS setting can vary. * css/CSSSelector.cpp: (WebCore::CSSSelector::extractPseudoType): * css/CSSSelector.h: (WebCore::CSSSelector::): * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::SelectorChecker::checkScrollbarPseudoClass): * platform/Scrollbar.h: (WebCore::Scrollbar::styleChanged): * platform/mac/ScrollbarThemeMac.mm: (+[ScrollbarPrefsObserver appearancePrefsChanged:]): (WebCore::ScrollbarThemeMac::preferencesChanged): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::invalidateScrollbarRect): * rendering/RenderScrollbar.cpp: (WebCore::RenderScrollbar::styleChanged): (WebCore::RenderScrollbar::updateScrollbarPart): * rendering/RenderScrollbar.h: * rendering/RenderScrollbarTheme.h: (WebCore::RenderScrollbarTheme::buttonsPlacement): 2008-10-10 Timothy Hatcher Fixes a regression with input search fields, where the placeholder text would not be updated when the value of the placeholder attribute changed. https://bugs.webkit.org/show_bug.cgi?id=21521 Reviewed by Adele Peterson. Test: fast/forms/search-placeholder-value-changed.html * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::parseMappedAttribute): Pass true for the placeholderValueChanged parameter of updatePlaceholderVisibility. (WebCore::HTMLInputElement::updatePlaceholderVisibility): Add parameter for placeholderValueChanged that informs the method that the value changed. * html/HTMLInputElement.h: Add the placeholderValueChanged to the updatePlaceholderVisibility method. Made it default to false. 2008-10-10 David Hyatt Allow the track part to have negative margins so that it can slightly overlap buttons. This is necessary to emulate the Aqua look in CSS. Reviewed by Sam Weinig * platform/ScrollbarThemeComposite.cpp: (WebCore::ScrollbarThemeComposite::paint): (WebCore::ScrollbarThemeComposite::hitTest): * rendering/RenderScrollbar.cpp: (WebCore::RenderScrollbar::setHoveredPart): (WebCore::RenderScrollbar::trackRect): * rendering/RenderScrollbar.h: * rendering/RenderScrollbarPart.cpp: (WebCore::RenderScrollbarPart::computeScrollbarWidth): (WebCore::RenderScrollbarPart::computeScrollbarHeight): * rendering/RenderScrollbarTheme.cpp: (WebCore::RenderScrollbarTheme::backButtonRect): (WebCore::RenderScrollbarTheme::forwardButtonRect): (WebCore::RenderScrollbarTheme::trackRect): 2008-10-10 David Hyatt https://bugs.webkit.org/show_bug.cgi?id=21527 Make CSS scrollbars support :not, :hover and :active. Reviewed by Adam Roben Added WebCore/manual-tests/scrollbar-hover-active.html * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector): (WebCore::CSSStyleSelector::SelectorChecker::checkScrollbarPseudoClass): * platform/Scrollbar.cpp: (WebCore::Scrollbar::autoscrollPressedPart): (WebCore::Scrollbar::startTimerIfNeeded): (WebCore::Scrollbar::setHoveredPart): (WebCore::Scrollbar::setPressedPart): (WebCore::Scrollbar::mouseMoved): (WebCore::Scrollbar::mouseExited): (WebCore::Scrollbar::mouseUp): (WebCore::Scrollbar::mouseDown): * platform/Scrollbar.h: * rendering/RenderScrollbar.cpp: (WebCore::RenderScrollbar::setHoveredPart): (WebCore::RenderScrollbar::setPressedPart): (WebCore::RenderScrollbar::updateScrollbarParts): (WebCore::pseudoForScrollbarPart): (WebCore::RenderScrollbar::updateScrollbarPart): * rendering/RenderScrollbar.h: 2008-10-10 Chris Marrin Reviewed by Dan Bernstein. Fix for https://bugs.webkit.org/show_bug.cgi?id=21025 CSS transition with duration=0 and delay=0 doesn't override ongoing transition Test: transitions/interrupt-zero-duration.html * page/animation/CompositeAnimation.cpp: (WebCore::CompositeAnimation::updateTransitions): 2008-10-10 Kevin Ollivier wx build fix. Add new scrollbar-related sources. * WebCoreSources.bkl: 2008-10-10 David Hyatt https://bugs.webkit.org/show_bug.cgi?id=21522 Support increment/decrement/start/end on scrollbars. Allows a fully functional scrollbar to be created. (Just :hover/:active left to finish it up.) Reviewed by Adam Roben Added scrollbars/scrollbar-buttons.html * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::SelectorChecker::checkScrollbarPseudoClass): 2008-10-10 David Hyatt Rename some pseudoclasses. Removing "-scrollbar-" from a bunch of the pseudoclasses. Renaming back/forward to decrement/increment. Adding start/end pseudoclasses. Reviewed by Eric Seidel * css/CSSSelector.cpp: (WebCore::CSSSelector::extractPseudoType): * css/CSSSelector.h: (WebCore::CSSSelector::): * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::SelectorChecker::checkScrollbarPseudoClass): 2008-10-10 David Hyatt Switch window-active to window-inactive, since that will work better as far as degrading in other browsers. Reviewed by Tim Hatcher * css/CSSSelector.cpp: (WebCore::CSSSelector::extractPseudoType): * css/CSSSelector.h: (WebCore::CSSSelector::): * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::SelectorChecker::checkScrollbarPseudoClass): 2008-10-09 Chris Marrin Reviewed by Dan Bernstein. https://bugs.webkit.org/show_bug.cgi?id=21310 Redesigned how animation events are sent in order to get rid of AnimationEventDispatcher. ImplicitAnimation and KeyframeAnimation are now ref counted. While calling the event handler, I keep a reference to this class to avoid it getting destroyed out from under me. I also moved most of the functionality of CompositeAnimation to and internal class (CompositeAnimationPrivate) to reduce the exposure of the internals of the various animation classes. We have several transition and animation LayoutTests which verify that this fix works as expected and continues to avoid crashes. * page/animation/AnimationBase.cpp: (WebCore::AnimationBase::AnimationBase): * page/animation/AnimationBase.h: (WebCore::AnimationBase::cancelTimers): (WebCore::AnimationBase::waitingForStyleAvailable): * page/animation/CompositeAnimation.cpp: (WebCore::CompositeAnimationPrivate::CompositeAnimationPrivate): (WebCore::CompositeAnimationPrivate::suspended): (WebCore::CompositeAnimationPrivate::~CompositeAnimationPrivate): (WebCore::CompositeAnimationPrivate::updateTransitions): (WebCore::CompositeAnimationPrivate::updateKeyframeAnimations): (WebCore::CompositeAnimationPrivate::animate): (WebCore::CompositeAnimationPrivate::setAnimating): (WebCore::CompositeAnimationPrivate::animating): (WebCore::CompositeAnimationPrivate::getAnimationForProperty): (WebCore::CompositeAnimationPrivate::resetTransitions): (WebCore::CompositeAnimationPrivate::resetAnimations): (WebCore::CompositeAnimationPrivate::cleanupFinishedAnimations): (WebCore::CompositeAnimationPrivate::setAnimationStartTime): (WebCore::CompositeAnimationPrivate::setTransitionStartTime): (WebCore::CompositeAnimationPrivate::suspendAnimations): (WebCore::CompositeAnimationPrivate::resumeAnimations): (WebCore::CompositeAnimationPrivate::overrideImplicitAnimations): (WebCore::CompositeAnimationPrivate::resumeOverriddenImplicitAnimations): (WebCore::compareAnimationIndices): (WebCore::CompositeAnimationPrivate::styleAvailable): (WebCore::CompositeAnimationPrivate::isAnimatingProperty): (WebCore::CompositeAnimationPrivate::setWaitingForStyleAvailable): (WebCore::CompositeAnimation::CompositeAnimation): (WebCore::CompositeAnimation::~CompositeAnimation): (WebCore::CompositeAnimation::animate): (WebCore::CompositeAnimation::animating): (WebCore::CompositeAnimation::setWaitingForStyleAvailable): (WebCore::CompositeAnimation::resetTransitions): (WebCore::CompositeAnimation::suspendAnimations): (WebCore::CompositeAnimation::resumeAnimations): (WebCore::CompositeAnimation::suspended): (WebCore::CompositeAnimation::styleAvailable): (WebCore::CompositeAnimation::setAnimating): (WebCore::CompositeAnimation::isAnimatingProperty): (WebCore::CompositeAnimation::setAnimationStartTime): (WebCore::CompositeAnimation::setTransitionStartTime): (WebCore::CompositeAnimation::overrideImplicitAnimations): (WebCore::CompositeAnimation::resumeOverriddenImplicitAnimations): * page/animation/CompositeAnimation.h: * page/animation/ImplicitAnimation.cpp: (WebCore::ImplicitAnimation::sendTransitionEvent): * page/animation/ImplicitAnimation.h: (WebCore::ImplicitAnimation::create): * page/animation/KeyframeAnimation.cpp: (WebCore::KeyframeAnimation::sendAnimationEvent): * page/animation/KeyframeAnimation.h: (WebCore::KeyframeAnimation::create): 2008-10-09 David Hyatt Add support for scrollbar orientation as a pseudoclass. Add support for whether or not the scrollbar is active as well. Reviewed by Tim Hatcher Added scrollbars/scrollbar-orientation.html * css/CSSSelector.cpp: (WebCore::CSSSelector::extractPseudoType): * css/CSSSelector.h: (WebCore::CSSSelector::): * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::SelectorChecker::checkScrollbarPseudoClass): * platform/Scrollbar.cpp: (WebCore::Scrollbar::isWindowActive): * platform/Scrollbar.h: * rendering/RenderScrollbar.cpp: (WebCore::RenderScrollbar::paint): (WebCore::RenderScrollbar::partForStyleResolve): * rendering/RenderScrollbar.h: 2008-10-09 David Hyatt Add support for pseudo classes on scrollbar pseudo elements. As an initial proof of concept only :enabled/:disabled are supported. More pseudo classes will follow quickly now that this works. Reviewed by Tim Hatcher Added scrollbars/disabled-scrollbar.html * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::SelectorChecker::checkSelector): (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector): (WebCore::CSSStyleSelector::SelectorChecker::checkScrollbarPseudoClass): * css/CSSStyleSelector.h: * rendering/RenderObject.cpp: (WebCore::RenderObject::getPseudoStyle): * rendering/RenderObject.h: * rendering/RenderScrollbar.cpp: (WebCore::RenderScrollbar::setEnabled): (WebCore::RenderScrollbar::scrollbarForStyleResolve): (WebCore::RenderScrollbar::getScrollbarPseudoStyle): (WebCore::RenderScrollbar::paintPart): * rendering/RenderScrollbar.h: 2008-10-09 Eric Carlson Media controls should not show when element is not visible https://bugs.webkit.org/show_bug.cgi?id=21155 Reviewed by Adele Peterson. * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::recalcStyle): New, call renderer()->updateFromElement to stay in sync with visibility changes * html/HTMLMediaElement.h: * rendering/RenderMedia.cpp: (WebCore::RenderMedia::RenderMedia): initialize m_previousVisible (WebCore::RenderMedia::updateControlVisibility): consider style()->visibility() when determining if element is visible or not. Don't animate controller visibility when change triggered by showing or hiding media element. * rendering/RenderMedia.h: declare m_previousVisible 2008-10-09 Timothy Hatcher Annotate the Objective-C DOM APIs with the JavaScriptCore/WebKitAvailability.h availability macros and version macros. https://bugs.webkit.org/show_bug.cgi?id=21496 rdar://problem/6259225 Reviewed by Sam Weinig. * bindings/objc/DOMCSS.h: Add a version #if around catgory interface. * bindings/objc/DOMEventException.h: Include JavaScriptCore/WebKitAvailability.h and add an #if around the enum. * bindings/objc/DOMException.h: Ditto. Give the enum a name and remove the comment to match the other headers. * bindings/objc/DOMExtensions.h: Annotate the methods with version 3.0 or later. * bindings/objc/DOMObject.h: Add a version #if around class interface. * bindings/objc/DOMRangeException.h: Include JavaScriptCore/WebKitAvailability.h and add a version #if around the enum. * bindings/objc/DOMSVGException.h: Ditto. Use the latest version since SVG is new. * bindings/objc/DOMXPathException.h: Ditto. Use the 3.0 version. * bindings/objc/PublicDOMInterfaces.h: Annotate classes and protocols for when they where added to WebKit. Also annotate individual methods that are deprecated or where added after the class was added to WebKit. * bindings/objc/WebScriptObject.h: Include JavaScriptCore/WebKitAvailability.h since this header is included by most DOM headers. Annotate the JSObject method. * bindings/scripts/CodeGeneratorObjC.pm: (ReadPublicInterfaces): Parse out the availability macro for each function/property. And parse out the availability version for the class/protocol. Default to WEBKIT_VERSION_LATEST if the class is new. (GenerateHeader): Include JavaScriptCore/WebKitAvailability.h if needed. Add the interface availability version check if the class has a required version. Create a public interface key (used to lookup in $publicInterfaces) and make a declaration suffix that includes the availability macro (if needed). Use the "available in 1.3 and later but deprecated in 3.0" macro instead of "deprecated in 10.5 and later" as the default availability macro for old style methods. Tweak line breaks in the generated headers to look good and not have too many extra lines. 2008-10-09 Simon Fraser Reviewed by Dave Hyatt https://bugs.webkit.org/show_bug.cgi?id=20947 Refactor setStyle() methods into styleWillChange() and styleDidChange(), so most of the setStyle() overrides can be removed. * rendering/RenderBR.cpp: (WebCore::RenderBR::styleDidChange): * rendering/RenderBR.h: * rendering/RenderBlock.cpp: (WebCore::RenderBlock::styleWillChange): (WebCore::RenderBlock::styleDidChange): * rendering/RenderBlock.h: * rendering/RenderBox.cpp: (WebCore::RenderBox::~RenderBox): (WebCore::RenderBox::destroy): (WebCore::RenderBox::styleWillChange): (WebCore::RenderBox::styleDidChange): * rendering/RenderBox.h: * rendering/RenderButton.cpp: (WebCore::RenderButton::styleWillChange): (WebCore::RenderButton::styleDidChange): * rendering/RenderButton.h: * rendering/RenderFieldset.cpp: (WebCore::RenderFieldset::styleDidChange): * rendering/RenderFieldset.h: * rendering/RenderFileUploadControl.cpp: (WebCore::RenderFileUploadControl::styleDidChange): * rendering/RenderFileUploadControl.h: * rendering/RenderInline.cpp: (WebCore::RenderInline::styleDidChange): * rendering/RenderInline.h: * rendering/RenderLayer.cpp: (WebCore::RenderLayer::styleChanged): * rendering/RenderLayer.h: * rendering/RenderListBox.cpp: (WebCore::RenderListBox::styleDidChange): * rendering/RenderListBox.h: * rendering/RenderListItem.cpp: (WebCore::RenderListItem::styleDidChange): * rendering/RenderListItem.h: * rendering/RenderListMarker.cpp: (WebCore::RenderListMarker::styleWillChange): (WebCore::RenderListMarker::styleDidChange): * rendering/RenderListMarker.h: * rendering/RenderMenuList.cpp: (WebCore::RenderMenuList::styleDidChange): * rendering/RenderMenuList.h: * rendering/RenderObject.cpp: (WebCore::RenderObject::setStyle): (WebCore::RenderObject::setStyleInternal): (WebCore::RenderObject::styleWillChange): (WebCore::RenderObject::styleDidChange): * rendering/RenderObject.h: * rendering/RenderReplaced.cpp: (WebCore::RenderReplaced::styleDidChange): * rendering/RenderReplaced.h: * rendering/RenderSVGGradientStop.cpp: (WebCore::RenderSVGGradientStop::styleDidChange): * rendering/RenderSVGGradientStop.h: * rendering/RenderScrollbarPart.cpp: (WebCore::RenderScrollbarPart::styleDidChange): * rendering/RenderScrollbarPart.h: * rendering/RenderSlider.cpp: (WebCore::RenderSlider::styleDidChange): * rendering/RenderSlider.h: * rendering/RenderTable.cpp: (WebCore::RenderTable::styleDidChange): * rendering/RenderTable.h: * rendering/RenderTableCell.cpp: (WebCore::RenderTableCell::styleWillChange): (WebCore::RenderTableCell::styleDidChange): * rendering/RenderTableCell.h: * rendering/RenderTableRow.cpp: (WebCore::RenderTableRow::styleWillChange): * rendering/RenderTableRow.h: * rendering/RenderText.cpp: (WebCore::RenderText::styleDidChange): * rendering/RenderText.h: * rendering/RenderTextControl.cpp: (WebCore::RenderTextControl::styleDidChange): * rendering/RenderTextControl.h: * rendering/RenderWidget.cpp: (WebCore::RenderWidget::styleDidChange): * rendering/RenderWidget.h: 2008-10-09 David Hyatt Make sure to destroy a custom scrollbar's RenderObjects before the arena goes away. When our widget parent is nulled out is a good time. Reviewed by Oliver Hunt * rendering/RenderScrollbar.cpp: (WebCore::RenderScrollbar::~RenderScrollbar): (WebCore::RenderScrollbar::setParent): (WebCore::RenderScrollbar::updateScrollbarPart): * rendering/RenderScrollbar.h: 2008-10-09 David Hyatt https://bugs.webkit.org/show_bug.cgi?id=21446 This patch gets CSS scrollbars up and limping. There's no way to distinguish between states or between orientation and back vs. forward on the buttons, but it's a start. Reviewed by Oliver Hunt Added scrollbars/basic-scrollbar.html * WebCore.xcodeproj/project.pbxproj: * css/CSSSelector.cpp: (WebCore::CSSSelector::extractPseudoType): * css/CSSSelector.h: (WebCore::CSSSelector::): * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector): * platform/ScrollTypes.h: (WebCore::): * platform/Scrollbar.h: (WebCore::Scrollbar::styleChanged): * platform/ScrollbarThemeComposite.cpp: (WebCore::ScrollbarThemeComposite::paint): (WebCore::ScrollbarThemeComposite::splitTrack): * platform/ScrollbarThemeComposite.h: (WebCore::ScrollbarThemeComposite::paintScrollbarBackground): (WebCore::ScrollbarThemeComposite::paintTrackBackground): (WebCore::ScrollbarThemeComposite::paintTrackPiece): * platform/win/ScrollbarThemeSafari.cpp: (WebCore::ScrollbarThemeSafari::paintTrackBackground): * platform/win/ScrollbarThemeSafari.h: * platform/win/ScrollbarThemeWin.cpp: (WebCore::ScrollbarThemeWin::paintTrack): * platform/win/ScrollbarThemeWin.h: * rendering/RenderLayer.cpp: (WebCore::RenderLayer::createScrollbar): (WebCore::RenderLayer::styleChanged): * rendering/RenderScrollbar.cpp: Added. (WebCore::RenderScrollbar::createCustomScrollbar): (WebCore::RenderScrollbar::RenderScrollbar): (WebCore::RenderScrollbar::~RenderScrollbar): (WebCore::RenderScrollbar::getScrollbarPseudoStyle): (WebCore::RenderScrollbar::updateScrollbarParts): (WebCore::RenderScrollbar::updateScrollbarPart): (WebCore::RenderScrollbar::paintPart): (WebCore::RenderScrollbar::buttonRect): (WebCore::RenderScrollbar::minimumThumbLength): * rendering/RenderScrollbar.h: Added. (WebCore::RenderScrollbar::styleChanged): (WebCore::RenderScrollbar::owningRenderer): * rendering/RenderScrollbarPart.cpp: Added. (WebCore::RenderScrollbarPart::RenderScrollbarPart): (WebCore::RenderScrollbarPart::~RenderScrollbarPart): (WebCore::RenderScrollbarPart::layout): (WebCore::RenderScrollbarPart::layoutHorizontalPart): (WebCore::RenderScrollbarPart::layoutVerticalPart): (WebCore::calcScrollbarThicknessUsing): (WebCore::RenderScrollbarPart::computeScrollbarWidth): (WebCore::RenderScrollbarPart::computeScrollbarHeight): (WebCore::RenderScrollbarPart::calcPrefWidths): (WebCore::RenderScrollbarPart::setStyle): * rendering/RenderScrollbarPart.h: Added. (WebCore::RenderScrollbarPart::renderName): (WebCore::RenderScrollbarPart::requiresLayer): * rendering/RenderScrollbarTheme.cpp: Added. (WebCore::RenderScrollbarTheme::renderScrollbarTheme): (WebCore::RenderScrollbarTheme::buttonSizesAlongTrackAxis): (WebCore::RenderScrollbarTheme::hasButtons): (WebCore::RenderScrollbarTheme::hasThumb): (WebCore::RenderScrollbarTheme::minimumThumbLength): (WebCore::RenderScrollbarTheme::backButtonRect): (WebCore::RenderScrollbarTheme::forwardButtonRect): (WebCore::RenderScrollbarTheme::trackRect): (WebCore::RenderScrollbarTheme::paintScrollCorner): (WebCore::RenderScrollbarTheme::paintScrollbarBackground): (WebCore::RenderScrollbarTheme::paintTrackBackground): (WebCore::RenderScrollbarTheme::paintTrackPiece): (WebCore::RenderScrollbarTheme::paintButton): (WebCore::RenderScrollbarTheme::paintThumb): * rendering/RenderScrollbarTheme.h: Added. (WebCore::RenderScrollbarTheme::~RenderScrollbarTheme): (WebCore::RenderScrollbarTheme::scrollbarThickness): (WebCore::RenderScrollbarTheme::buttonsPlacement): (WebCore::RenderScrollbarTheme::supportsControlTints): (WebCore::RenderScrollbarTheme::shouldCenterOnThumb): (WebCore::RenderScrollbarTheme::initialAutoscrollTimerDelay): (WebCore::RenderScrollbarTheme::autoscrollTimerDelay): (WebCore::RenderScrollbarTheme::registerScrollbar): (WebCore::RenderScrollbarTheme::unregisterScrollbar): * rendering/style/RenderStyle.h: (WebCore::RenderStyle::): 2008-10-09 Eric Seidel Reviewed by Oliver Hunt. Fix Canvex DOOM Game Gradient clips were not getting cleared after filling the gradient, this was causing nothing to draw in Canvex https://bugs.webkit.org/show_bug.cgi?id=21498 Tests forthcoming. * WebCore.xcodeproj/project.pbxproj: * platform/graphics/cg/GraphicsContextCG.cpp: (WebCore::GraphicsContext::fillPath): (WebCore::GraphicsContext::strokePath): (WebCore::GraphicsContext::fillRect): 2008-10-09 Eric Seidel Reviewed by Oliver Hunt. Fix transformed patterns https://bugs.webkit.org/show_bug.cgi?id=21498 Test: fast/canvas/patternfill-repeat.html * WebCore.xcodeproj/project.pbxproj: * platform/graphics/GraphicsContext.cpp: (WebCore::GraphicsContext::setStrokePattern): (WebCore::GraphicsContext::setFillPattern): (WebCore::GraphicsContext::setStrokeGradient): (WebCore::GraphicsContext::setFillGradient): * platform/graphics/GraphicsContext.h: * platform/graphics/cairo/GraphicsContextCairo.cpp: * platform/graphics/cg/GraphicsContextCG.cpp: (WebCore::applyStrokePattern): (WebCore::applyFillPattern): (WebCore::GraphicsContext::drawPath): (WebCore::GraphicsContext::fillPath): (WebCore::GraphicsContext::strokePath): (WebCore::GraphicsContext::fillRect): * platform/graphics/qt/GraphicsContextQt.cpp: * platform/graphics/wx/GraphicsContextWx.cpp: 2008-10-09 Kevin Ollivier wx build fixes. * platform/wx/WidgetWx.cpp: * plugins/wx/PluginViewWx.cpp: (WebCore::PluginView::invalidateRect): * webcore-base.bkl: 2008-10-09 Chris Marrin Reviewed by Darin Adler. Fix for https://bugs.webkit.org/show_bug.cgi?id=21217 Animations assert when navigating from page Changed assertions to test the right flag for the paused state * page/animation/AnimationBase.cpp: (WebCore::AnimationBase::updateStateMachine): 2008-10-09 Chris Marrin Reviewed by Dan Bernstein. Fixed > 180 degree rotation bug Ensure that validateTransformFunctionList() is called after updating keyframe styles https://bugs.webkit.org/show_bug.cgi?id=21420 Test: animations/big-rotation.html * page/animation/KeyframeAnimation.cpp: (WebCore::KeyframeAnimation::KeyframeAnimation): 2008-10-09 Brady Eidson Reviewed by Anders - Calling [WebView close] from within a redirection callback can cause bad things The API usage to reveal this crash was so particular that a layout test is not possible with our current infrastructure. * loader/FrameLoader.cpp: (WebCore::FrameLoader::changeLocation): Protect the Frame from deletion (WebCore::FrameLoader::continueLoadAfterNavigationPolicy): stopAllLoaders() might clear the Frame's page, so perform a second null check on the page. Bail if it has been cleared. 2008-10-09 Alp Toker Build fix for recent DOM generation Makefile changes when custom CFLAGS/CXXFLAGS are passed in. * GNUmakefile.am: 2008-10-09 Jan Michael Alonzo Reviewed by Alp Toker. https://bugs.webkit.org/show_bug.cgi?id=21390 [Gtk] Linux/Gtk: GtkLauncher crashes on Acid3 (but after test 80 this time) * platform/gtk/ScrollViewGtk.cpp: (WebCore::ScrollView::platformRemoveChild): 2008-10-09 Darin Adler - try to fix Qt build * bridge/qt/qt_runtime.cpp: (JSC::Bindings::convertQVariantToValue): Pass JSGlobalData instead of ExecState to RegExp constructor. 2008-10-08 Nikolas Zimmermann Reviewed by Oliver Hunt & Sam Weinig. Fixes: https://bugs.webkit.org/show_bug.cgi?id=15413 (SVGElementInstance does not implement EventTarget) Fixes: https://bugs.webkit.org/show_bug.cgi?id=15430 (SVGElementInstances should rebuild themselves lazily) Fixes: https://bugs.webkit.org/show_bug.cgi?id=20550 (SVGUseElement.setAttribute crashes Safari) Rebuild SVG use element shadow tree lazily. Mark SVGElementInstance with the "needsUpdate" flag. Next time SVGUseElement::recalcStyle is invoked (ie. via Document::updateDocumentsRendering()) the use tree is rebuild. Make SVGElementInstance a real EventTarget, as the SVG specification demands. When dispatching events to a shadow tree element of a use element, the associated SVGElementInstance is used as event target. The SVGElementInstance, the shadow tree element and the corresponding element share an event listener list. Every event listener change on the SVGElementInstance object is forwared to the corresponding element. Each change marks the SVGElementInstance tree dirty, and causes a reclone. Each event listener defined via attributes (onclick/onkeydown/...) is copied from the correspondingElement to the shadow tree element - through the cloneNode calls - if the use element's shadow tree gets rebuild. Each listener, dynamically created using addEventListener, gets copied to the corersponding element as well. Now that the target/currentTarget properties of the Events are correct, event bubbling works as expected, see resources/use-instanceRoot-event-bubbling.js for details. Tests: svg/custom/use-elementInstance-event-target.svg (reenabled) svg/custom/use-elementInstance-methods.svg (reenabled) svg/custom/use-setAttribute-crash.svg (covers bug 20550) svg/custom/use-instanceRoot-as-event-target.xhtml (covers bug 15413) svg/custom/use-instanceRoot-event-bubbling.xhtml (covers bug 15413) svg/custom/use-instanceRoot-event-listeners.xhtml (covers bug 15413 & 15430) * DerivedSources.make: * GNUmakefile.am: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSEventListener.h: (WebCore::JSLazyEventListener::wasCreatedFromMarkup): * bindings/js/JSEventTarget.cpp: * bindings/js/JSEventTargetSVGElementInstance.cpp: Removed. * bindings/js/JSEventTargetSVGElementInstance.h: Removed. * bindings/js/JSSVGElementInstanceCustom.cpp: (WebCore::JSSVGElementInstance::addEventListener): (WebCore::JSSVGElementInstance::removeEventListener): (WebCore::JSSVGElementInstance::pushEventHandlerScope): * bindings/scripts/CodeGeneratorJS.pm: * bindings/scripts/CodeGeneratorObjC.pm: * dom/EventListener.h: (WebCore::EventListener::wasCreatedFromMarkup): * dom/EventTargetNode.cpp: (WebCore::updateSVGElementInstancesAfterEventListenerChange): (WebCore::EventTargetNode::addEventListener): (WebCore::EventTargetNode::removeEventListener): (WebCore::eventTargetAsSVGElementInstance): (WebCore::eventTargetRespectingSVGTargetRules): (WebCore::EventTargetNode::dispatchEvent): (WebCore::EventTargetNode::dispatchGenericEvent): (WebCore::EventTargetNode::removeEventListenerForType): * page/EventHandler.cpp: (WebCore::EventHandler::clear): (WebCore::instanceAssociatedWithShadowTreeElement): (WebCore::EventHandler::updateMouseEventTargetNode): * page/EventHandler.h: * svg/EventTargetSVGElementInstance.cpp: Removed. * svg/EventTargetSVGElementInstance.h: Removed. * svg/SVGElementInstance.cpp: (WebCore::SVGElementInstance::SVGElementInstance): (WebCore::SVGElementInstance::~SVGElementInstance): (WebCore::SVGElementInstance::childNodes): (WebCore::SVGElementInstance::setShadowTreeElement): (WebCore::SVGElementInstance::forgetWrapper): (WebCore::SVGElementInstance::appendChild): (WebCore::SVGElementInstance::invalidateAllInstancesOfElement): (WebCore::SVGElementInstance::setNeedsUpdate): (WebCore::SVGElementInstance::associatedFrame): (WebCore::SVGElementInstance::addEventListener): (WebCore::SVGElementInstance::removeEventListener): (WebCore::SVGElementInstance::dispatchEvent): (WebCore::SVGElementInstance::onabort): (WebCore::SVGElementInstance::setOnabort): (WebCore::SVGElementInstance::onblur): (WebCore::SVGElementInstance::setOnblur): (WebCore::SVGElementInstance::onchange): (WebCore::SVGElementInstance::setOnchange): (WebCore::SVGElementInstance::onclick): (WebCore::SVGElementInstance::setOnclick): (WebCore::SVGElementInstance::oncontextmenu): (WebCore::SVGElementInstance::setOncontextmenu): (WebCore::SVGElementInstance::ondblclick): (WebCore::SVGElementInstance::setOndblclick): (WebCore::SVGElementInstance::onerror): (WebCore::SVGElementInstance::setOnerror): (WebCore::SVGElementInstance::onfocus): (WebCore::SVGElementInstance::setOnfocus): (WebCore::SVGElementInstance::oninput): (WebCore::SVGElementInstance::setOninput): (WebCore::SVGElementInstance::onkeydown): (WebCore::SVGElementInstance::setOnkeydown): (WebCore::SVGElementInstance::onkeypress): (WebCore::SVGElementInstance::setOnkeypress): (WebCore::SVGElementInstance::onkeyup): (WebCore::SVGElementInstance::setOnkeyup): (WebCore::SVGElementInstance::onload): (WebCore::SVGElementInstance::setOnload): (WebCore::SVGElementInstance::onmousedown): (WebCore::SVGElementInstance::setOnmousedown): (WebCore::SVGElementInstance::onmousemove): (WebCore::SVGElementInstance::setOnmousemove): (WebCore::SVGElementInstance::onmouseout): (WebCore::SVGElementInstance::setOnmouseout): (WebCore::SVGElementInstance::onmouseover): (WebCore::SVGElementInstance::setOnmouseover): (WebCore::SVGElementInstance::onmouseup): (WebCore::SVGElementInstance::setOnmouseup): (WebCore::SVGElementInstance::onmousewheel): (WebCore::SVGElementInstance::setOnmousewheel): (WebCore::SVGElementInstance::onbeforecut): (WebCore::SVGElementInstance::setOnbeforecut): (WebCore::SVGElementInstance::oncut): (WebCore::SVGElementInstance::setOncut): (WebCore::SVGElementInstance::onbeforecopy): (WebCore::SVGElementInstance::setOnbeforecopy): (WebCore::SVGElementInstance::oncopy): (WebCore::SVGElementInstance::setOncopy): (WebCore::SVGElementInstance::onbeforepaste): (WebCore::SVGElementInstance::setOnbeforepaste): (WebCore::SVGElementInstance::onpaste): (WebCore::SVGElementInstance::setOnpaste): (WebCore::SVGElementInstance::ondragenter): (WebCore::SVGElementInstance::setOndragenter): (WebCore::SVGElementInstance::ondragover): (WebCore::SVGElementInstance::setOndragover): (WebCore::SVGElementInstance::ondragleave): (WebCore::SVGElementInstance::setOndragleave): (WebCore::SVGElementInstance::ondrop): (WebCore::SVGElementInstance::setOndrop): (WebCore::SVGElementInstance::ondragstart): (WebCore::SVGElementInstance::setOndragstart): (WebCore::SVGElementInstance::ondrag): (WebCore::SVGElementInstance::setOndrag): (WebCore::SVGElementInstance::ondragend): (WebCore::SVGElementInstance::setOndragend): (WebCore::SVGElementInstance::onreset): (WebCore::SVGElementInstance::setOnreset): (WebCore::SVGElementInstance::onresize): (WebCore::SVGElementInstance::setOnresize): (WebCore::SVGElementInstance::onscroll): (WebCore::SVGElementInstance::setOnscroll): (WebCore::SVGElementInstance::onsearch): (WebCore::SVGElementInstance::setOnsearch): (WebCore::SVGElementInstance::onselect): (WebCore::SVGElementInstance::setOnselect): (WebCore::SVGElementInstance::onselectstart): (WebCore::SVGElementInstance::setOnselectstart): (WebCore::SVGElementInstance::onsubmit): (WebCore::SVGElementInstance::setOnsubmit): (WebCore::SVGElementInstance::onunload): (WebCore::SVGElementInstance::setOnunload): * svg/SVGElementInstance.h: (WebCore::SVGElementInstance::needsUpdate): (WebCore::SVGElementInstance::toNode): (WebCore::SVGElementInstance::toSVGElementInstance): (WebCore::SVGElementInstance::correspondingElement): (WebCore::SVGElementInstance::correspondingUseElement): (WebCore::SVGElementInstance::shadowTreeElement): (WebCore::SVGElementInstance::parentNode): (WebCore::SVGElementInstance::previousSibling): (WebCore::SVGElementInstance::nextSibling): (WebCore::SVGElementInstance::firstChild): (WebCore::SVGElementInstance::lastChild): (WebCore::SVGElementInstance::ownerDocument): (WebCore::SVGElementInstance::hasChildNodes): (WebCore::SVGElementInstance::setFirstChild): (WebCore::SVGElementInstance::setLastChild): (WebCore::SVGElementInstance::setNextSibling): (WebCore::SVGElementInstance::setPreviousSibling): (WebCore::SVGElementInstance::refEventTarget): (WebCore::SVGElementInstance::derefEventTarget): * svg/SVGElementInstance.idl: * svg/SVGStyledElement.cpp: (WebCore::SVGStyledElement::svgAttributeChanged): (WebCore::SVGStyledElement::childrenChanged): * svg/SVGUseElement.cpp: (WebCore::SVGUseElement::svgAttributeChanged): (WebCore::shadowTreeContainsChangedNodes): (WebCore::SVGUseElement::recalcStyle): (WebCore::dumpInstanceTree): (WebCore::SVGUseElement::buildPendingResource): (WebCore::SVGUseElement::buildInstanceTree): (WebCore::SVGUseElement::transferEventListenersToShadowTree): * svg/SVGUseElement.h: 2008-10-08 Sam Weinig Reviewed by Cameron Zwarich. Fix for https://bugs.webkit.org/show_bug.cgi?id=21241 REGRESSION (r36977): getRGBColorValue().red returning incorrect value Update JSRGBColor to use the new static function per getter approach. Test: fast/dom/css-RGBValue.html * bindings/js/JSRGBColor.cpp: (WebCore::): (jsRGBColorRed): (jsRGBColorGreen): (jsRGBColorBlue): * bindings/js/JSRGBColor.h: 2008-10-08 Eric Seidel Reviewed by Darin Adler, Nikolas Zimmermann and Dave Hyatt. svgElement.className.baseValue = "foo" does not work https://bugs.webkit.org/show_bug.cgi?id=20651 * dom/StyledElement.cpp: (WebCore::StyledElement::classAttributeChanged): (WebCore::StyledElement::parseMappedAttribute): * dom/StyledElement.h: * svg/SVGStyledElement.cpp: (WebCore::SVGStyledElement::svgAttributeChanged): 2008-10-08 Anthony Ricaud Make the toolbar label text-shadow not disappear when clicking on the search result count or around the search field. Reviewed by Timothy Hatcher. * inspector/front-end/inspector.css: (.toolbar-item:active .toolbar-label): Make this rule also require the toggleable class with the toolbar-item class. 2008-10-08 Tor Arne Vestbø Reviewed by Simon. Updated the qrc file for the Web Inspector to contain the current set of images. * inspector/front-end/WebKit.qrc: 2008-10-08 Prasanth Ullattil Reviewed by Simon. Fix the linking of applications against WebKit on Qt/Windows. The prl files that qmake creates are buggy on Unix, but we they're fine on Windows and we have to have them there in order to get the dependencies correct. * WebCore.pro: 2008-10-08 Ariya Hidayat Reviewed by Simon. Speed up rectangle filling by not re-creating a QBrush all the time. This triggers faster path in QPainter where the brush is reused. * platform/graphics/qt/GraphicsContextQt.cpp: (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate): (WebCore::GraphicsContext::fillRect): 2008-10-08 Thiago Macieira Reviewed by Simon. Fixes: Encoding of Qt URLs This encoding was added by Simon and I because QUrl's tolerant parser wasn't tolerant enough. Now it is, so we don't need this anymore. * platform/qt/KURLQt.cpp: (WebCore::KURL::operator QUrl): 2008-10-08 Marius Storm-Olsen Reviewed by Simon. Fixes dependencies in qmake generated visual studio projects. Only add debug lib name if we're in the debug build_pass, else the release version. The MSVC solution generator would pick up the debug javascriptcore lib as a dependency. * WebCore.pro: 2008-10-08 Prasanth Ullattil Reviewed by Simon. Fix compilation errors on VS2008 64Bit * platform/text/TextStream.cpp: (WebCore::TextStream::operator<<): * platform/text/TextStream.h: * plugins/win/PluginViewWin.cpp: (WebCore::PluginView::init): 2008-10-07 Alp Toker GTK+ build fix for older automake versions (1.7). Discussed in bug #21392. * GNUmakefile.am: 2008-10-07 Anders Carlsson Reviewed by Antti Koivisto. Crash in ApplicationCacheGroup Make sure to stop loading even before a cache update is in progress so that the manifest load will be stopped. * loader/appcache/ApplicationCacheGroup.cpp: (WebCore::ApplicationCacheGroup::~ApplicationCacheGroup): (WebCore::ApplicationCacheGroup::stopLoading): (WebCore::ApplicationCacheGroup::cacheUpdateFailed): 2008-10-07 Timothy Hatcher Auto-generate DOMDocument's createNodeIterator: and createTreeWalker: methods. https://bugs.webkit.org/show_bug.cgi?id=21433 Reviewed by Sam Weinig. * WebCore.xcodeproj/project.pbxproj: Add ObjCNodeFilterCondition.{mm,h}. * bindings/objc/DOM.mm: Remove previous category implementations on DOMDocument for createNodeIterator: and createTreeWalker:. Also moves ObjCNodeFilterCondition to its own file. * bindings/objc/DOMTraversal.h: Remove the category methods that added createNodeIterator: and createTreeWalker: to DOMDocument. This is fine to do since DOmDocument.h is included still, and has these methods. * bindings/objc/DOMUtility.mm: (JSC::createDOMWrapper): Remove special case for JSNodeIterator and JSTreeWalker now that the ObjC binding conforms to the standard wrap. * bindings/objc/ObjCNodeFilterCondition.h: Split out from DOM.mm. (WebCore::ObjCNodeFilterCondition::create): Moved from DOM.mm. (WebCore::ObjCNodeFilterCondition::ObjCNodeFilterCondition): Ditto. * bindings/objc/ObjCNodeFilterCondition.mm: Split out from DOM.mm. (WebCore::ObjCNodeFilterCondition::acceptNode): Moved from DOM.mm. * bindings/objc/PublicDOMInterfaces.h: Add the createNodeIterator: and createTreeWalker: methods to DOMDocument. * bindings/scripts/CodeGeneratorObjC.pm: (GetObjCTypeGetter): Add a case for NodeFilter. (AddIncludesForType): Include ObjCNodeFilterCondition.h for NodeFilter. (GenerateImplementation): Remove existing NodeFilter special case that used the m_filter member variable. Add a new special getter for protocol types that aren't EventTarget, so the right class is used for NodeFilter. Add a special case for NodeFilter where it creates an ObjCNodeFilterCondition. * dom/Document.idl: Remove the #ifdef LANGUAGE_OBJECTIVE_C. Add the OldStyleObjC extended attribute to createNodeIterator and createTreeWalker. Rename the entityReferenceExpansion parameter to expandEntityReferences to match the previous ObjC API. * dom/NodeIterator.idl: Remove ObjCIvar from the filter attribute. The m_filter member variable was never used in practice, it was always nil! We can remove it and not pad the object because this can't be subclassed. * dom/TreeWalker.idl: Ditto. 2008-10-07 Timothy Hatcher Auto-generate the DOMEventTarget protocol implementation for DOMNode and DOMSVGElementInstance. https://bugs.webkit.org/show_bug.cgi?id=21432 Reviewed by Darin Adler. * WebCore.xcodeproj/project.pbxproj: Add ObjCEventListener.{mm,h}. * bindings/objc/DOM.mm: Remove many unneeded header includes. Move ObjCEventListener to it's own file. Remove the manual impelmentations of the DOMEventTarget protocol for DOMNode and DOMSVGElementInstance. * bindings/objc/DOMEvents.h: Remove the categories that defined DOMEventTarget for DOMNode and DOMSVGElementInstance. * bindings/objc/ObjCEventListener.h: Split out from DOM.mm. * bindings/objc/ObjCEventListener.mm: Split out from DOM.mm. (WebCore::ObjCEventListener::find): Moved from DOM.mm. (WebCore::ObjCEventListener::wrap): Use PassRefPtr to prevent the callers from doing a manual deref. (WebCore::ObjCEventListener::ObjCEventListener): Moved from DOM.mm. (WebCore::ObjCEventListener::~ObjCEventListener): Ditto. * bindings/scripts/CodeGeneratorObjC.pm: (GetObjCTypeGetter): Add a case for EventListener and use WTF::getPtr. (AddIncludesForType): Include ObjCEventListener.h for EventListener. And include EventTargetSVGElementInstance.h for SVGElementInstance. (GenerateHeader): Remove the check for multiple parents. (GenerateImplementation): Remove the check for multiple parents. Remove the @deprecatedFunctions array since deprecated methods get generated into the main @interface now to work with protocols. Add support for the EventTargetNodeCast extended attribute. Add support for EventListener parameters. * dom/Node.idl: Define superclasses for ObjC so the implementation and interface implement the DOMEventTarget protocol. Explicitly specify Object as a superclass to use DOMEventTarget. Object will turn into DOMObject. This is needed to take the code generator down the right path of multiple super-classes as protocols. It is ObjC only for legacy reasons. The event target methods are normally on NodeEventTarget, a subclass of Node. But the ObjC API has never has this subclass and they are on DOMNode. * svg/SVGElementInstance.idl: Ditto. 2008-10-07 David Hyatt Add new pseudo-elements and pseudo-classes that will enable scrollbars to be styled by CSS. The new pseudo-elements are: scrollbar scrollbar-button scrollbar-corner scrollbar-thumb scrollbar-track These elements will work with all the usual pseudo-classes (:hover, :active, :enabled, :disabled, etc.) and with the following new pseudo-classes: scrollbar-active scrollbar-back scrollbar-forward scrollbar-horizontal scrollbar-vertical Reviewed by Adele * css/CSSSelector.cpp: (WebCore::CSSSelector::extractPseudoType): * css/CSSSelector.h: (WebCore::CSSSelector::): 2008-10-06 Timothy Hatcher Add support to the Resources panel for queries like "#123", "foo #123", "line: 123" and "foo line: 123". These will match the query limiting the search only to the line specified. If only a line is specified, the whole line is matched. https://bugs.webkit.org/show_bug.cgi?id=21422 Reviewed by Darin Adler. * inspector/front-end/SourceFrame.js: (WebInspector.SourceFrame.prototype.sourceRow): Don't return the last row if the index is greater than the rows collection. Let it return undefined by indexing out-of-bounds. * inspector/front-end/SourceView.js: (WebInspector.SourceView.prototype.performSearch): Add support for queries like "#123", "foo #123", "line: 123" and "foo line: 123". Also match the whole query to the whole document in case there are colors like "#333". 2008-10-07 Alp Toker Reviewed by Mark Rowe. https://bugs.webkit.org/show_bug.cgi?id=21392 [GTK] Auto-generate JS DOM binding sources list Remove the huge lists of generated DOM binding sources and headers in the build system. These are difficult to maintain and can be derived automatically. The new strategy is to re-use the existing lists of IDL sources (which are needed for dist support anyway). This will also ease the addition of new language bindings. * GNUmakefile.am: 2008-10-07 Tor Arne Vestbø Reviewed by Simon. Don't attempt to paint when updating control tints We don't have a valid PlatformGraphicsContext so schedule the dirty scrollbar/scrollview area for repaint instead. * platform/qt/ScrollbarThemeQt.cpp: (WebCore::ScrollbarThemeQt::paint): (WebCore::ScrollbarThemeQt::paintScrollCorner): 2008-10-07 Holger Hans Peter Freyther [qt] Build fix after Scrollbar.h and Widget.h changes. * plugins/qt/PluginViewQt.cpp: (WebCore::PluginView::getValue): (WebCore::PluginView::init): 2008-10-06 David Hyatt Enable viewless Mac WebKit to (kinda sorta) paint basic pages (with no frames on them). Reviewed by Sam Weinig * WebCore.base.exp: * WebCore.xcodeproj/project.pbxproj: * loader/EmptyClients.h: (WebCore::EmptyFrameLoaderClient::hasWebView): * loader/FrameLoader.cpp: (WebCore::FrameLoader::loadWithDocumentLoader): (WebCore::FrameLoader::transitionToCommitted): * loader/FrameLoaderClient.h: * page/FocusController.cpp: (WebCore::FocusController::setActive): * page/FrameView.cpp: (WebCore::FrameView::FrameView): (WebCore::FrameView::init): (WebCore::FrameView::layoutIfNeededRecursive): * page/FrameView.h: 2008-10-06 Dan Bernstein - build fix * bindings/objc/DOMEvents.h: 2008-10-06 Mark Mentovai Reviewed by Tim Hatcher. Use #if ENABLE(feature) where possible, and #if ENABLE_feature where Platform.h is not available, in preference to #ifdef ENABLE_feature. #ifdef is wrong now that features are disabled by #defining ENABLE_feature to 0. https://bugs.webkit.org/show_bug.cgi?id=21338 * bindings/objc/DOMEvents.h: * bindings/objc/PublicDOMInterfaces.h: * dom/Document.idl: * page/DOMWindow.idl: * svg/svgtags.in: 2008-10-06 Mark Mentovai Reviewed by Sam Weinig. * platform/network/mac/FormDataStreamMac.mm: #import to get the declaration for isMainThread(). 2008-10-06 Jeremy Moskovich Reviewed by Tim Hatcher. WebCoreObjCExtras.c is actually an obj-c++ file, so change its name to reflect that. * WebCore.xcodeproj/project.pbxproj: * platform/mac/WebCoreObjCExtras.c: Removed. * platform/mac/WebCoreObjCExtras.mm: Copied from WebCore/platform/mac/WebCoreObjCExtras.c. 2008-10-06 Jeremy Moskovich Reviewed by Dan Bernstein. Added C++ forward declaration for the NSURLAuthenticationChallenge class so that the m_currentMacChallenge variable doesn't cause a compilation error when ResourceHandleInternal.h is included from a C++ file. Fixes: https://bugs.webkit.org/show_bug.cgi?id=21411 * platform/network/ResourceHandleInternal.h: 2008-10-06 Steve Falkenburg Windows build fix. * WebCore.vcproj/WebCore.vcproj: 2008-10-06 Steve Falkenburg https://bugs.webkit.org/show_bug.cgi?id=21416 Add missing null checks identified by Application Verifier. Reviewed by Darin Adler. * platform/win/SharedTimerWin.cpp: (WebCore::clearTimer): 2008-10-06 Kevin McCullough Reviewed by Tim Hatcher. Removed accidentally left in debugging statement. * inspector/front-end/inspector.js: 2008-10-06 Kevin McCullough Reviewed by Tim Hatcher and Oliver Hunt. https://bugs.webkit.org/show_bug.cgi?id=21412 Bug 21412: Refactor user initiated profile count to be more stable * inspector/InspectorController.cpp: Keep track of the user-initiated profiles here now. (WebCore::InspectorController::InspectorController): (WebCore::InspectorController::startUserInitiatedProfiling): (WebCore::InspectorController::stopUserInitiatedProfiling): * inspector/InspectorController.h: The front end will now need to check for the existence of the user- initiated profile title and use its count instead of keeping its own. * inspector/front-end/ProfilesPanel.js: 2008-10-06 Dan Bernstein Reviewed by Sam Weinig. - separate GDI text drawing into its own function * platform/graphics/win/FontCGWin.cpp: (WebCore::drawGDIGlyphs): (WebCore::Font::drawGlyphs): 2008-10-03 Steve Falkenburg Fix default button appearance Reviewed by Adele Peterson. * rendering/RenderThemeWin.cpp: (WebCore::RenderThemeWin::supportsFocus): (WebCore::RenderThemeWin::determineClassicState): (WebCore::RenderThemeWin::determineButtonState): (WebCore::RenderThemeWin::getClassicThemeData): (WebCore::RenderThemeWin::getThemeData): (WebCore::drawControl): * rendering/RenderThemeWin.h: 2008-10-06 Tor Arne Vestbø Reviewed by Simon. Add native virtual keycode to PlatformKeyboardEvent * platform/PlatformKeyboardEvent.h: * platform/gtk/KeyEventGtk.cpp: (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent): * platform/mac/KeyEventMac.mm: (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent): * platform/qt/PlatformKeyboardEventQt.cpp: (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent): * platform/win/KeyEventWin.cpp: (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent): * platform/wx/KeyboardEventWx.cpp: (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent): 2008-10-06 Tor Arne Vestbø Reviewed by Simon. Enable WebCore::String <> CFStringRef conversion functions for QtWebKit/Mac * platform/text/PlatformString.h: * platform/text/StringImpl.h: * platform/text/cf/StringCF.cpp: * platform/text/cf/StringImplCF.cpp: 2008-10-06 Tor Arne Vestbø Reviewed by Simon. Use bundles on QtWebKit/Mac for platform modules * platform/FileSystem.h: * platform/qt/FileSystemQt.cpp: (WebCore::unloadModule): 2008-10-06 Ariya Hidayat Reviewed by Simon. Build fix for MinGW. * platform/win/SystemTimeWin.cpp: * plugins/win/PluginViewWin.cpp: (WebCore::PluginView::invalidateRect): 2008-10-06 Adam Roben Mimic the inspector/ directory structure in WebCore.vcproj * WebCore.vcproj/WebCore.vcproj: 2008-10-06 Adam Roben Windows build fix * WebCore.vcproj/WebCore.vcproj: Update the Include path for all configurations to include WebCore/inspector. 2008-10-04 Eric Seidel Reviewed by Darin Adler. SVG should support ascent and descent properties instead of ! https://bugs.webkit.org/show_bug.cgi?id=21365 Tested by many many existing SVG tests. * svg/SVGFontFaceElement.cpp: (WebCore::SVGFontFaceElement::ascent): (WebCore::SVGFontFaceElement::descent): 2008-10-05 Darin Fisher Reviewed by Eric Seidel. REGRESSION: crash in ScriptElement::notifyFinished Fixes https://bugs.webkit.org/show_bug.cgi?id=21329 * dom/ScriptElement.cpp: (WebCore::ScriptElementData::notifyFinished): Revert part of r35744 to ensure that the ScriptElementData object is not destroyed prematurely. 2008-10-05 Chris Lord Reviewed by Alp Toker. Landed by Jan Alonzo. https://bugs.webkit.org/show_bug.cgi?id=20624 WebKit-gtk uses deprecated GtkType/GtkObject * plugins/gtk/gtk2xtbin.c: (gtk_xtbin_get_type): * plugins/gtk/gtk2xtbin.h: 2008-10-05 Luke Kenneth Casson Leighton Reviewed by David Hyatt. GTK_WINDOW_HWND not GTK_WINDOWING_HWND https://bugs.webkit.org/show_bug.cgi?id=20725 Updated to ToT by Jan Alonzo. * plugins/gtk/PluginViewGtk.cpp: (WebCore::PluginView::getValue): 2008-10-05 Jan Michael Alonzo Reviewed by Darin Adler. Invalid cast from GdkWindow to GtkWidget https://bugs.webkit.org/show_bug.cgi?id=21391 Fix a misplaced closing parenthesis to actually cast the widget, not the window * platform/gtk/PlatformScreenGtk.cpp: (WebCore::screenDepth): 2008-10-05 Adam Barth Reviewed by Darin Alder. Attach the Origin header to POST requests to help defend against cross-site request forgery. https://bugs.webkit.org/show_bug.cgi?id=20792 Collin Jackson also contributed to this patch. Tests: http/tests/security/originHeader/origin-header-for-data.html http/tests/security/originHeader/origin-header-for-empty.html http/tests/security/originHeader/origin-header-for-get.html http/tests/security/originHeader/origin-header-for-https.html http/tests/security/originHeader/origin-header-for-post.html * bindings/js/JSDOMWindowBase.cpp: (WebCore::createWindow): * loader/FrameLoader.cpp: (WebCore::FrameLoader::createWindow): (WebCore::FrameLoader::urlSelected): (WebCore::FrameLoader::submitForm): (WebCore::FrameLoader::outgoingOrigin): (WebCore::FrameLoader::loadURL): (WebCore::FrameLoader::addExtraFieldsToRequest): (WebCore::FrameLoader::loadPostRequest): (WebCore::FrameLoader::loadResourceSynchronously): (WebCore::FrameLoader::loadItem): * loader/FrameLoader.h: * loader/SubresourceLoader.cpp: (WebCore::SubresourceLoader::create): * loader/loader.cpp: (WebCore::Loader::Host::servePendingRequests): * platform/SecurityOrigin.cpp: (WebCore::SecurityOrigin::toHTTPOrigin): * platform/SecurityOrigin.h: * platform/network/ResourceRequestBase.h: (WebCore::ResourceRequestBase::httpOrigin): (WebCore::ResourceRequestBase::setHTTPOrigin): (WebCore::ResourceRequestBase::clearHTTPOrigin): * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::makeSimpleCrossSiteAccessRequest): (WebCore::XMLHttpRequest::makeCrossSiteAccessRequestWithPreflight): (WebCore::XMLHttpRequest::handleAsynchronousPreflightResult): (WebCore::XMLHttpRequest::didReceiveResponsePreflight): 2008-10-04 Oliver Hunt Reviewed by Tim Hatcher. Bug 21381: Incremental parsing of html causes bogus line numbers in some cases If we hit a parsing boundary (end of a packet, etc) in the middle of a