2010-06-13 Yael Aharon Reviewed by Kenneth Rohde Christiansen. [Qt] Platform plugin support for Notifications UI https://bugs.webkit.org/show_bug.cgi?id=40005 To avoid race condition when GC is run during shutdown, disconnect the Notification from the NotificationPresenter when the presenter deletes itself. This cannot be tested by a layout test, the race condition happens only when GC is run during shutdown. It can be tested manually by loading manually any notification test and closing the browser. * notifications/Notification.cpp: (WebCore::Notification::~Notification): * notifications/Notification.h: (WebCore::Notification::detachPresenter): 2010-06-08 Marcus Bulach Reviewed by Jeremy Orlow. Adds IndexedDB's KeyRange. https://bugs.webkit.org/show_bug.cgi?id=40250 Test: storage/indexeddb/idb-keyrange.html * Android.derived.jscbindings.mk: * Android.derived.v8bindings.mk: * Android.mk: * CMakeLists.txt: * DerivedSources.cpp: * DerivedSources.make: * GNUmakefile.am: * WebCore.gypi: * WebCore.pri: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * storage/IDBKeyRange.cpp: Added. (WebCore::IDBKeyRange::IDBKeyRange): * storage/IDBKeyRange.h: Added. (WebCore::IDBKeyRange::): (WebCore::IDBKeyRange::create): (WebCore::IDBKeyRange::~IDBKeyRange): (WebCore::IDBKeyRange::left): (WebCore::IDBKeyRange::right): (WebCore::IDBKeyRange::flags): * storage/IDBKeyRange.idl: Added. * storage/IndexedDatabaseRequest.cpp: (WebCore::IndexedDatabaseRequest::makeSingleKeyRange): (WebCore::IndexedDatabaseRequest::makeLeftBoundKeyRange): (WebCore::IndexedDatabaseRequest::makeRightBoundKeyRange): (WebCore::IndexedDatabaseRequest::makeBoundKeyRange): * storage/IndexedDatabaseRequest.h: * storage/IndexedDatabaseRequest.idl: 2010-06-14 Jeremy Orlow And another. * storage/IndexedDatabaseRequest.h: 2010-06-14 Jeremy Orlow More build fixes. * storage/IndexedDatabaseRequest.h: 2010-06-14 Mahesh Kulkarni Reviewed by Laszlo Gombos. [Qt] navigator.geolocation support for Qt port https://bugs.webkit.org/show_bug.cgi?id=39724 Implemetion for Qt port of navigator.gelocation. Using qtmobility location service. * WebCore.pri: * WebCore.pro: * platform/qt/GeolocationServiceQt.cpp: Added. (WebCore::GeolocationServiceQt::create): (WebCore::GeolocationServiceQt::GeolocationServiceQt): (WebCore::GeolocationServiceQt::~GeolocationServiceQt): (WebCore::GeolocationServiceQt::positionUpdated): (WebCore::GeolocationServiceQt::startUpdating): (WebCore::GeolocationServiceQt::stopUpdating): * platform/qt/GeolocationServiceQt.h: Added. (WebCore::GeolocationServiceQt::lastPosition): (WebCore::GeolocationServiceQt::lastError): 2010-06-14 Jeremy Orlow 2 more build fixes. * storage/IDBDatabaseImpl.h: * storage/IndexedDatabaseRequest.h: 2010-06-14 Jeremy Orlow Unreviewed build fix for my last. * workers/WorkerScriptLoaderClient.h: 2010-06-14 Jeremy Orlow Reviewed by Darin Fisher. [V8] Clean up SerializedScriptValue https://bugs.webkit.org/show_bug.cgi?id=40482 SerializedScriptValue doesn't follow WebKit's style guidelines very well and needlessly inlines quite a bit within the .h file. This change cleans things up. No funcitonal changes. No change in behavior. * bindings/v8/SerializedScriptValue.cpp: (WebCore::SerializedScriptValue::deserializeAndSetProperty): (WebCore::SerializedScriptValue::create): (WebCore::SerializedScriptValue::createFromWire): (WebCore::SerializedScriptValue::release): (WebCore::SerializedScriptValue::SerializedScriptValue): * bindings/v8/SerializedScriptValue.h: 2010-06-14 Ilya Tikhonovsky Reviewed by Pavel Feldman. WebInspector: On the way to Remote Debugging we want to transfer dom/timeline/etc data from inspected page to WebInspector as JSON string via http. The native serialization to JSON string is supported by InspectorValue's classes. This patch has the implementation of sendMessageToFrontend function. WebKit version of it still uses ScriptFunctionCall and will be switched to another transport a little bit later. https://bugs.webkit.org/show_bug.cgi?id=40134 * inspector/InspectorClient.h: * inspector/InspectorController.cpp: (WebCore::InspectorController::connectFrontend): (WebCore::InspectorController::disconnectFrontend): * inspector/InspectorController.h: * inspector/InspectorFrontend.cpp: (WebCore::InspectorFrontend::InspectorFrontend): * inspector/InspectorFrontend.h: * inspector/InspectorFrontendClientLocal.cpp: (WebCore::InspectorFrontendClientLocal::frontendLoaded): * inspector/InspectorValues.cpp: (WebCore::InspectorObject::writeJSON): * inspector/front-end/inspector.js: (WebInspector.dispatchMessageToFrontend): * loader/EmptyClients.h: (WebCore::EmptyInspectorClient::sendMessageToFrontend): 2010-06-14 Jeremy Orlow Reviewed by Darin Adler. Reenable IDBDatabaseRequest's description attribute https://bugs.webkit.org/show_bug.cgi?id=39826 On the 26th, Beth commented out the description attribute in IDBDatabaseRequest because it was causing problems with the objective c bindings. Turns out that this is the same bug as in http://trac.webkit.org/changeset/19486. (Thanks for the pointer, Mark!) The solution is to change the objective C bindings generator to change the name in the generated code. id and hash both just appended "Name" to them in the past. I couldn't think of anything else particularly better to append, so I just went with name as well. Test: building the world works on the first try. Layout test verifies description works again. * bindings/scripts/CodeGeneratorObjC.pm: * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp: (webkit_dom_test_obj_get_description): (webkit_dom_test_obj_get_id): (webkit_dom_test_obj_set_id): (webkit_dom_test_obj_get_hash): (webkit_dom_test_obj_set_property): (webkit_dom_test_obj_get_property): (webkit_dom_test_obj_class_init): * bindings/scripts/test/GObject/WebKitDOMTestObj.h: * bindings/scripts/test/JS/JSTestObj.cpp: (WebCore::): (WebCore::jsTestObjDescription): (WebCore::jsTestObjId): (WebCore::jsTestObjHash): (WebCore::setJSTestObjId): * bindings/scripts/test/JS/JSTestObj.h: * bindings/scripts/test/ObjC/DOMTestObj.h: * bindings/scripts/test/ObjC/DOMTestObj.mm: (-[DOMTestObj descriptionName]): (-[DOMTestObj idName]): (-[DOMTestObj setIdName:]): (-[DOMTestObj hashName]): * bindings/scripts/test/TestObj.idl: * bindings/scripts/test/V8/V8TestObj.cpp: (WebCore::TestObjInternal::descriptionAttrGetter): (WebCore::TestObjInternal::idAttrGetter): (WebCore::TestObjInternal::idAttrSetter): (WebCore::TestObjInternal::hashAttrGetter): (WebCore::): * storage/IDBDatabaseRequest.idl: 2010-06-13 Anders Bakken Reviewed by Eric Seidel. [Qt] ScreenQt.cpp has coding-style errors https://bugs.webkit.org/show_bug.cgi?id=39766 * platform/qt/ScreenQt.cpp: 2010-06-13 Eric Seidel Reviewed by Adam Barth. Rename HTMLParser to LegacyHTMLTreeConstructor https://bugs.webkit.org/show_bug.cgi?id=40554 This makes our old HTML parsing system closer match the HTML5 spec, and thus easier to compare to the new HTML5 parsing system. This rename was entirely automatic. Done by do-webcore-rename. * Android.mk: * CMakeLists.txt: * GNUmakefile.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * dom/Document.cpp: * dom/DocumentParser.h: (WebCore::DocumentParser::htmlTreeConstructor): * html/HTML5DocumentParser.cpp: (WebCore::HTML5DocumentParser::htmlTreeConstructor): * html/HTML5DocumentParser.h: * html/HTML5TreeBuilder.cpp: (WebCore::HTML5TreeBuilder::HTML5TreeBuilder): * html/HTML5TreeBuilder.h: (WebCore::HTML5TreeBuilder::legacyTreeConstructor): * html/HTMLDocumentParser.cpp: (WebCore::HTMLDocumentParser::HTMLDocumentParser): * html/HTMLDocumentParser.h: (WebCore::HTMLDocumentParser::htmlTreeConstructor): * html/HTMLFormControlElement.cpp: (WebCore::HTMLFormControlElement::removedFromTree): * html/HTMLInputElement.cpp: * html/HTMLMeterElement.cpp: * html/HTMLProgressElement.cpp: * html/LegacyHTMLTreeConstructor.cpp: Renamed from WebCore/html/HTMLParser.cpp. (WebCore::addTags): (WebCore::HTMLStackElem::HTMLStackElem): (WebCore::HTMLStackElem::derefNode): (WebCore::LegacyHTMLTreeConstructor::LegacyHTMLTreeConstructor): (WebCore::LegacyHTMLTreeConstructor::~LegacyHTMLTreeConstructor): (WebCore::LegacyHTMLTreeConstructor::reset): (WebCore::LegacyHTMLTreeConstructor::setCurrent): (WebCore::tagPriorityOfNode): (WebCore::LegacyHTMLTreeConstructor::limitDepth): (WebCore::LegacyHTMLTreeConstructor::insertNodeAfterLimitDepth): (WebCore::LegacyHTMLTreeConstructor::parseToken): (WebCore::LegacyHTMLTreeConstructor::parseDoctypeToken): (WebCore::isTableSection): (WebCore::isTablePart): (WebCore::isTableRelated): (WebCore::isScopingTag): (WebCore::LegacyHTMLTreeConstructor::insertNode): (WebCore::LegacyHTMLTreeConstructor::handleError): (WebCore::LegacyHTMLTreeConstructor::textCreateErrorCheck): (WebCore::LegacyHTMLTreeConstructor::commentCreateErrorCheck): (WebCore::LegacyHTMLTreeConstructor::headCreateErrorCheck): (WebCore::LegacyHTMLTreeConstructor::bodyCreateErrorCheck): (WebCore::LegacyHTMLTreeConstructor::framesetCreateErrorCheck): (WebCore::LegacyHTMLTreeConstructor::formCreateErrorCheck): (WebCore::LegacyHTMLTreeConstructor::isindexCreateErrorCheck): (WebCore::LegacyHTMLTreeConstructor::selectCreateErrorCheck): (WebCore::LegacyHTMLTreeConstructor::ddCreateErrorCheck): (WebCore::LegacyHTMLTreeConstructor::dtCreateErrorCheck): (WebCore::LegacyHTMLTreeConstructor::rpCreateErrorCheck): (WebCore::LegacyHTMLTreeConstructor::rtCreateErrorCheck): (WebCore::LegacyHTMLTreeConstructor::nestedCreateErrorCheck): (WebCore::LegacyHTMLTreeConstructor::nestedPCloserCreateErrorCheck): (WebCore::LegacyHTMLTreeConstructor::nestedStyleCreateErrorCheck): (WebCore::LegacyHTMLTreeConstructor::tableCellCreateErrorCheck): (WebCore::LegacyHTMLTreeConstructor::tableSectionCreateErrorCheck): (WebCore::LegacyHTMLTreeConstructor::noembedCreateErrorCheck): (WebCore::LegacyHTMLTreeConstructor::noframesCreateErrorCheck): (WebCore::LegacyHTMLTreeConstructor::noscriptCreateErrorCheck): (WebCore::LegacyHTMLTreeConstructor::pCloserCreateErrorCheck): (WebCore::LegacyHTMLTreeConstructor::pCloserStrictCreateErrorCheck): (WebCore::LegacyHTMLTreeConstructor::mapCreateErrorCheck): (WebCore::mapTagToFunc): (WebCore::mapTagsToFunc): (WebCore::LegacyHTMLTreeConstructor::getNode): (WebCore::LegacyHTMLTreeConstructor::allowNestedRedundantTag): (WebCore::LegacyHTMLTreeConstructor::processCloseTag): (WebCore::LegacyHTMLTreeConstructor::isHeadingTag): (WebCore::LegacyHTMLTreeConstructor::isInline): (WebCore::LegacyHTMLTreeConstructor::isResidualStyleTag): (WebCore::LegacyHTMLTreeConstructor::isAffectedByResidualStyle): (WebCore::LegacyHTMLTreeConstructor::handleResidualStyleCloseTagAcrossBlocks): (WebCore::LegacyHTMLTreeConstructor::reopenResidualStyleTags): (WebCore::LegacyHTMLTreeConstructor::pushBlock): (WebCore::LegacyHTMLTreeConstructor::popBlock): (WebCore::LegacyHTMLTreeConstructor::popOneBlockCommon): (WebCore::LegacyHTMLTreeConstructor::popOneBlock): (WebCore::LegacyHTMLTreeConstructor::moveOneBlockToStack): (WebCore::LegacyHTMLTreeConstructor::checkIfHasPElementInScope): (WebCore::LegacyHTMLTreeConstructor::popInlineBlocks): (WebCore::LegacyHTMLTreeConstructor::freeBlock): (WebCore::LegacyHTMLTreeConstructor::createHead): (WebCore::LegacyHTMLTreeConstructor::handleIsindex): (WebCore::LegacyHTMLTreeConstructor::startBody): (WebCore::LegacyHTMLTreeConstructor::finished): (WebCore::LegacyHTMLTreeConstructor::reportErrorToConsole): (WebCore::shouldCreateImplicitHead): (WebCore::serializeForNumberType): (WebCore::parseToDoubleForNumberType): * html/LegacyHTMLTreeConstructor.h: Renamed from WebCore/html/HTMLParser.h. (WebCore::LegacyHTMLTreeConstructor::skipMode): (WebCore::LegacyHTMLTreeConstructor::isHandlingResidualStyleAcrossBlocks): (WebCore::LegacyHTMLTreeConstructor::setSkipMode): (WebCore::LegacyHTMLTreeConstructor::popBlock): (WebCore::LegacyHTMLTreeConstructor::hasPElementInScope): (WebCore::LegacyHTMLTreeConstructor::reportError): (WebCore::LegacyHTMLTreeConstructor::): (WebCore::shouldCreateImplicitHead): * html/StepRange.cpp: * html/ValidityState.cpp: * rendering/RenderSlider.cpp: 2010-06-13 Eric Seidel Reviewed by Darin Adler. Rename m_parser, htmlParser() to m_treeConstructor, htmlTreeConstructor() in preparation for renaming HTMLParser https://bugs.webkit.org/show_bug.cgi?id=40514 This rename was done by hand. I realize now I should have renamed HTMLParser to HTMLTreeConstructor before renaming HTMLTokenizer. No functional changes, thus no tests. * dom/DocumentParser.h: (WebCore::DocumentParser::htmlTreeConstructor): * html/HTML5DocumentParser.cpp: (WebCore::HTML5DocumentParser::HTML5DocumentParser): (WebCore::HTML5DocumentParser::pumpLexerIfPossible): (WebCore::HTML5DocumentParser::pumpLexer): (WebCore::HTML5DocumentParser::end): (WebCore::HTML5DocumentParser::htmlTreeConstructor): (WebCore::HTML5DocumentParser::isWaitingForScripts): (WebCore::HTML5DocumentParser::resumeParsingAfterScriptExecution): (WebCore::HTML5DocumentParser::notifyFinished): (WebCore::HTML5DocumentParser::executeScriptsWaitingForStylesheets): * html/HTML5DocumentParser.h: * html/HTML5TreeBuilder.cpp: (WebCore::HTML5TreeBuilder::HTML5TreeBuilder): (WebCore::HTML5TreeBuilder::passTokenToLegacyParser): (WebCore::HTML5TreeBuilder::finished): * html/HTML5TreeBuilder.h: (WebCore::HTML5TreeBuilder::legacyTreeConstructor): * html/HTMLDocumentParser.cpp: (WebCore::HTMLDocumentParser::HTMLDocumentParser): (WebCore::HTMLDocumentParser::scriptHandler): (WebCore::HTMLDocumentParser::parseTag): (WebCore::HTMLDocumentParser::end): (WebCore::HTMLDocumentParser::processToken): (WebCore::HTMLDocumentParser::processDoctypeToken): * html/HTMLDocumentParser.h: (WebCore::HTMLDocumentParser::htmlTreeConstructor): * html/HTMLFormControlElement.cpp: (WebCore::HTMLFormControlElement::removedFromTree): 2010-06-13 Eric Seidel Reviewed by Darin Adler. Rename tok, asHTMLTokenizer to parser, asHTMLDocumentParser https://bugs.webkit.org/show_bug.cgi?id=40513 Last set of Tokenizer related renames, also done via do-webcore-rename: asHTMLTokenizer => asHTMLDocumentParser tok => parser No functional changes, thus no tests. * dom/Document.cpp: (WebCore::Document::write): * dom/DocumentParser.h: (WebCore::DocumentParser::asHTMLDocumentParser): * html/HTMLDocumentParser.cpp: (WebCore::parseHTMLDocumentFragment): * html/HTMLDocumentParser.h: (WebCore::HTMLDocumentParser::asHTMLDocumentParser): * loader/DocumentLoader.cpp: (WebCore::DocumentLoader::isLoadingInAPISense): 2010-06-13 Eric Seidel Reviewed by Darin Adler. Fix the rest of the references to the old Tokenizer class (now DocumentParser) https://bugs.webkit.org/show_bug.cgi?id=40512 No functional changes, thus no new tests. This was mostly done by do-webcore-rename: tokenizer => parser m_tokenizer => m_parser createTextTokenizer => createTextDocumentParser createTokenizer => createParser getTokenizer => getParser However had to be careful to avoid renaming things related to css/tokenizer.flex (which we should later rename to CSSTokenizer.flex) Still a couple references with "tok" and "asHTMLTokenizer" which I'll get in the next patch. * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::isLoaded): * bindings/v8/ScriptEventListener.cpp: (WebCore::createAttributeEventListener): * dom/Document.cpp: (WebCore::Document::removedLastRef): (WebCore::Document::~Document): (WebCore::Document::createParser): (WebCore::Document::open): (WebCore::Document::cancelParsing): (WebCore::Document::implicitOpen): (WebCore::Document::implicitClose): (WebCore::Document::write): (WebCore::Document::finishParsing): (WebCore::Document::removePendingSheet): * dom/Document.h: (WebCore::Document::parser): * dom/DocumentParser.h: * dom/ViewportArguments.cpp: (WebCore::reportViewportWarning): * dom/XMLDocumentParserLibxml2.cpp: (WebCore::PendingCallbacks::callAndRemoveFirstCallback): (WebCore::PendingCallbacks::PendingStartElementNSCallback::call): (WebCore::PendingCallbacks::PendingEndElementNSCallback::call): (WebCore::PendingCallbacks::PendingCharactersCallback::call): (WebCore::PendingCallbacks::PendingProcessingInstructionCallback::call): (WebCore::PendingCallbacks::PendingCDATABlockCallback::call): (WebCore::PendingCallbacks::PendingCommentCallback::call): (WebCore::PendingCallbacks::PendingInternalSubsetCallback::call): (WebCore::PendingCallbacks::): (WebCore::getParser): (WebCore::startElementNsHandler): (WebCore::endElementNsHandler): (WebCore::charactersHandler): (WebCore::processingInstructionHandler): (WebCore::cdataBlockHandler): (WebCore::commentHandler): (WebCore::warningHandler): (WebCore::fatalErrorHandler): (WebCore::normalErrorHandler): (WebCore::getEntityHandler): (WebCore::startDocumentHandler): (WebCore::endDocumentHandler): (WebCore::internalSubsetHandler): (WebCore::externalSubsetHandler): (WebCore::parseXMLDocumentFragment): * dom/XMLDocumentParserQt.cpp: (WebCore::parseXMLDocumentFragment): * html/HTML5EntityParser.cpp: * html/HTMLDocument.cpp: (WebCore::HTMLDocument::createParser): * html/HTMLDocument.h: * html/HTMLDocumentParser.cpp: (WebCore::HTMLDocumentParser::write): (WebCore::HTMLDocumentParser::stopParsing): * html/HTMLFormControlElement.cpp: (WebCore::HTMLFormControlElement::removedFromTree): * html/HTMLParser.cpp: (WebCore::HTMLParser::finished): (WebCore::HTMLParser::reportErrorToConsole): * html/HTMLViewSourceDocument.cpp: (WebCore::HTMLViewSourceDocument::createParser): (WebCore::HTMLViewSourceDocument::addLine): * html/HTMLViewSourceDocument.h: * loader/DocumentLoader.cpp: (WebCore::DocumentLoader::isLoadingInAPISense): * loader/DocumentWriter.cpp: (WebCore::DocumentWriter::begin): (WebCore::DocumentWriter::addData): * loader/FTPDirectoryDocument.cpp: (WebCore::FTPDirectoryDocument::createParser): * loader/FTPDirectoryDocument.h: * loader/FrameLoader.cpp: (WebCore::FrameLoader::stopLoading): (WebCore::FrameLoader::stop): * loader/ImageDocument.cpp: (WebCore::ImageDocument::createParser): * loader/ImageDocument.h: * loader/MediaDocument.cpp: (WebCore::MediaDocument::createParser): * loader/MediaDocument.h: * loader/PluginDocument.cpp: (WebCore::PluginDocument::createParser): * loader/PluginDocument.h: * loader/SinkDocument.cpp: (WebCore::SinkDocument::createParser): * loader/SinkDocument.h: * loader/TextDocument.cpp: (WebCore::TextDocument::createParser): (WebCore::createTextDocumentParser): * loader/TextDocument.h: * svg/SVGDocumentExtensions.cpp: (WebCore::SVGDocumentExtensions::reportWarning): (WebCore::SVGDocumentExtensions::reportError): * wml/WMLDocument.cpp: (WebCore::WMLDocument::finishedParsing): * wml/WMLErrorHandling.cpp: (WebCore::reportWMLError): * wml/WMLTemplateElement.cpp: (WebCore::WMLTemplateElement::registerTemplatesInDocument): 2010-06-13 Chris Fleizach Reviewed by Darin Adler. AX: link won't return linked element if URL contains # https://bugs.webkit.org/show_bug.cgi?id=40192 Test: platform/mac/accessibility/internal-link-when-document-has-fragment.html * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::internalLinkElement): 2010-06-13 Sam Weinig Try and fix the chrome build. * bindings/scripts/CodeGeneratorV8.pm: * xml/XMLHttpRequest.idl: 2010-06-13 Sam Weinig Reviewed by Anders Carlsson. Fix for https://bugs.webkit.org/show_bug.cgi?id=40550 XMLHttpRequest constructor object should expose the constants from the IDL. Test: fast/dom/XMLHttpRequest-constants.html * Android.jscbindings.mk: * CMakeLists.txt: * GNUmakefile.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSBindingsAllInOne.cpp: * bindings/js/JSDOMWindowCustom.cpp: * bindings/js/JSWorkerContextCustom.cpp: * bindings/js/JSXMLHttpRequestConstructor.cpp: Removed. * bindings/js/JSXMLHttpRequestConstructor.h: Removed. * bindings/js/JSXMLHttpRequestCustom.cpp: (WebCore::JSXMLHttpRequestConstructor::constructJSXMLHttpRequest): * bindings/scripts/CodeGeneratorJS.pm: * xml/XMLHttpRequest.idl: 2010-06-13 Simon Fraser Reviewed by Dan Bernstein. -webkit-transition font-size and font-family https://bugs.webkit.org/show_bug.cgi?id=33429 When animating font-size, update the font with a saved version of the font selector to ensure that we don't clobber the font family. Test: transitions/font-family-during-transition.html * rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::setBlendedFontSize): 2010-06-13 Tony Chang Build fix, not reviewed. fix chromium compile after r61094 (id attribute refactor) https://bugs.webkit.org/show_bug.cgi?id=40553 * bindings/v8/custom/V8NamedNodesCollection.cpp: (WebCore::V8NamedNodesCollection::itemWithName): 2010-06-13 Darin Adler Reviewed by Alexey Proskuryakov. Partly done support for alternate ID attributes should be removed https://bugs.webkit.org/show_bug.cgi?id=39692 Removed the include of "HTMLNames.h" from "Element.h". This prevents near-world-rebuilds every time you change HTMLTagNames.in. Renamed the getIDAttribute function in the Element class to idForStyleResolution, since it returns a value of the id attribute that has been lowercased as appropriate for style matching, not the actual value of the attribute. With the old name it was easy to misuse it in non-style contexts. Got rid of the idAttributeName function on Element, since it is easy to use it wrong. Replace it with isIdAttributeName, getIdAttribute, and setIdAttribute functions, which are a good fit for the needs of most call sites that were dealing with the id attribute. Added an idAttributeName function to Document. This is for a future where a document can have a custom id attribute name specified in its doctype. It's possible this will be insufficient because the same document might have XHTML or SVG elements in it, and it's possible that on those elements we will want the attribute named "id" with no namespace to still work. We can deal with that when we implement the actual feature, though. For now, it seems OK to fetch the name of the id attribute from the document. * dom/DynamicNodeList.cpp: (WebCore::DynamicNodeList::itemWithName): * dom/StaticNodeList.cpp: (WebCore::StaticNodeList::itemWithName): * rendering/RenderSVGResourceContainer.h: (WebCore::RenderSVGResourceContainer::RenderSVGResourceContainer): (WebCore::RenderSVGResourceContainer::idChanged): * svg/SVGUseElement.cpp: (WebCore::SVGUseElement::handleDeepUseReferencing): * svg/animation/SMILTimeContainer.cpp: (WebCore::SMILTimeContainer::updateAnimations): Use the new idForStyleResolution function, which is the new name of the getIDAttribute function. There's a good chance these call sites are incorrect, which is something we should investigate later, so there's a FIXME at each call site. * dom/Document.cpp: (WebCore::Document::Document): Initialize m_idAttributeName to the standard id attribute from HTML. (WebCore::Document::getElementById): Use Element::getIdAttribute. * dom/Document.h: Added Document::idAttributeName. * dom/Element.cpp: (WebCore::Element::setAttribute): Use Document::idAttributeName. (WebCore::Element::setAttributeMap): Use Element::isIdAttributeName. (WebCore::Element::insertedIntoDocument): Use Document::idAttributeName. (WebCore::Element::removedFromDocument): Ditto. (WebCore::Element::formatForDebugger): Use Element::getIdAttribute. * dom/Element.h: Added isIdAttributeName, getIdAttribute, setIdAttribute, idForStyleResolution. Removed rareIDAttributeName. * dom/ElementRareData.h: Removed m_idAttributeName. * dom/NamedNodeMap.cpp: (WebCore::NamedNodeMap::setAttributes): Use Document::idAttributeName. * dom/NamedNodeMap.h: Renamed id, setID, and m_id to idForStyleResolution, setIdForStyleResolution, and m_idForStyleResolution since this is not the value of the id attribute because it gets lowercased for compatibility-mode documents. * rendering/RenderIFrame.cpp: * rendering/RenderLayerCompositor.cpp: * rendering/RenderProgress.cpp: Added include of HTMLNames.h now that Element.h no longer includes it. * editing/SetNodeAttributeCommand.h: * editing/markup.cpp: * html/HTMLParser.cpp: Removed unneeded includes. * html/HTMLParser.h: Sorted includes. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::matchRules): Use idForStyleResolution. (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector): Use idForStyleResolution. * dom/Attr.cpp: (WebCore::Attr::isId): Use Document::idAttributeName. * dom/StyledElement.cpp: (WebCore::StyledElement::parseMappedAttribute): Use isIdAttributeName, and setIdForStyleResolution. * editing/DeleteButtonController.cpp: (WebCore::DeleteButtonController::createDeletionUI): Use setIdAttribute. * editing/EditorCommand.cpp: (WebCore::executeInsertHorizontalRule): Ditto. * html/HTMLAppletElement.cpp: (WebCore::HTMLAppletElement::parseMappedAttribute): Use isIdAttributeName. (WebCore::HTMLAppletElement::createRenderer): Use getIdAttribute. * html/HTMLCollection.cpp: (WebCore::HTMLCollection::checkForNameMatch): Use getIdAttribute. (WebCore::HTMLCollection::updateNameCache): Use getIdAttribute. * html/HTMLDataGridColElement.cpp: (WebCore::HTMLDataGridColElement::ensureColumn): Use getIdAttribute. (WebCore::HTMLDataGridColElement::parseMappedAttribute): Use isIdAttributeName. * html/HTMLElement.cpp: (WebCore::HTMLElement::parseMappedAttribute): Use isIdAttributeName. * html/HTMLFormCollection.cpp: (WebCore::HTMLFormCollection::nextNamedItem): Added missing braces. (WebCore::HTMLFormCollection::updateNameCache): Use getIdAttribute. * html/HTMLFrameElementBase.cpp: (WebCore::HTMLFrameElementBase::parseMappedAttribute): Use isIdAttributeName. (WebCore::HTMLFrameElementBase::setName): Use getIdAttribute. * html/HTMLImageElement.cpp: (WebCore::HTMLImageElement::parseMappedAttribute): Use isIdAttributeName. * html/HTMLMapElement.cpp: (WebCore::HTMLMapElement::parseMappedAttribute): Use isIdAttributeName. Also restructured the function a bit to make its structure clearer and added a comment pointing out that it can't be quite right. * html/HTMLNameCollection.cpp: (WebCore::HTMLNameCollection::itemAfter): Use getIdAttribute. * html/HTMLObjectElement.cpp: (WebCore::HTMLObjectElement::parseMappedAttribute): Use isIdAttributeName. * html/HTMLParamElement.cpp: (WebCore::HTMLParamElement::parseMappedAttribute): Use isIdAttributeName. * loader/CachedFont.cpp: (WebCore::CachedFont::getSVGFontById): Use getIdAttribute. * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::nameForLayer): Use getIdAttribute. * rendering/SVGRenderTreeAsText.cpp: (WebCore::writeSVGPaintingResource): Use getIdAttribute. (WebCore::writeSVGResourceContainer): Ditto. * svg/SVGElement.cpp: (WebCore::SVGElement::insertedIntoDocument): Use getIdAttribute. * svg/SVGStyledElement.cpp: (WebCore::SVGStyledElement::isKnownAttribute): Use isIdAttributeName. (WebCore::SVGStyledElement::svgAttributeChanged): Use isIdAttributeName. * wml/WMLElement.cpp: (WebCore::WMLElement::parseMappedAttribute): Use isIdAttributeName. 2010-06-13 Dan Bernstein Reviewed by Darin Adler. REGRESSION (r60974): Continuous wheel scrolling is too fast in list boxes and in Safari Reader https://bugs.webkit.org/show_bug.cgi?id=40537 * platform/mac/WheelEventMac.mm: (WebCore::PlatformWheelEvent::PlatformWheelEvent): Only multiply by pixelsPerLineStep() if the event is not continuous, as was before r56012. 2010-06-13 Andras Becsi Reviewed by Darin Adler. Centralize the gperf code generation commands into make-hash-tools.pl to avoid redundancy across multiple build systems. Do this in preparation of refactoring the usage of these generated sources to fix the debug linking error on Linux with gcc >= 4.4.0. webkit.org/b/29244 No functionality change, so no new tests needed. * DerivedSources.make: * GNUmakefile.am: * WebCore.gyp/WebCore.gyp: * WebCore.gyp/scripts/rule_gperf.py: Removed. * WebCore.pri: * WebCore.xcodeproj/project.pbxproj: * css/CSSParser.cpp: (WebCore::cssPropertyID): (WebCore::cssValueKeywordID): * css/makeprop.pl: * css/makevalues.pl: * html/DocTypeStrings.gperf: * html/HTML5EntityParser.cpp: * html/HTMLDocumentParser.cpp: * html/HTMLEntityNames.gperf: * html/PreloadScanner.cpp: * make-hash-tools.pl: Added. * platform/ColorData.gperf: * platform/graphics/Color.cpp: 2010-06-13 Noam Rosenthal Reviewed by Kenneth Rohde Christiansen. [Qt] tests/hybridPixmap fails https://bugs.webkit.org/show_bug.cgi?id=37316 The problem was that JSC::Instance::createRuntimeObject was never called. This is fixed by overloading newRuntimeObject and calling Instance::createRuntimeObject in between, instead of creating the runtime object directly inside the static function QtPixmapInstance::createRuntimeObject, which had to be renamed as to not overshadow the virtual function. This fixes an existing test, tests/hybridPixmap * bridge/qt/qt_pixmapruntime.cpp: (JSC::Bindings::QtPixmapInstance::newRuntimeObject): (JSC::Bindings::QtPixmapInstance::createPixmapRuntimeObject): * bridge/qt/qt_pixmapruntime.h: * bridge/qt/qt_runtime.cpp: (JSC::Bindings::convertQVariantToValue): 2010-06-13 Noam Rosenthal Reviewed by Darin Adler. GraphicsContext3D.h in the Qt port includes too many unnecessary files https://bugs.webkit.org/show_bug.cgi?id=40536 Removed unncessary includes. No new tests; Compilation improvement. * platform/graphics/GraphicsContext3D.h: * platform/graphics/qt/GraphicsContext3DQt.cpp: 2010-06-13 Noam Rosenthal Reviewed by Eric Seidel. [Qt] GraphicsLayer: recaching images creates an unnecessary deep copy https://bugs.webkit.org/show_bug.cgi?id=40535 Made sure the painter ends its operation before copying the pixmap. No new tests: this is an optimization. * platform/graphics/qt/GraphicsLayerQt.cpp: (WebCore::GraphicsLayerQtImpl::recache): 2010-06-13 Clemmitt Sigler Reviewed by Eric Seidel. Patch to fix missing references to RenderMathMLRoot, RenderMathMLSquareRoot when building GtkLauncher. https://bugs.webkit.org/show_bug.cgi?id=40326 No change in functionality so no new tests. * GNUmakefile.am: 2010-06-12 Brian Weinstein Reviewed by Dan Bernstein. https://bugs.webkit.org/show_bug.cgi?id=40538 Some machines have started to see the return of the dreaded: WebCore.lib : fatal error LNK1106: invalid file or disk full. Since we don't have the hotfix for VS2005, work around this in the meantime by creating an EditingAllInOne file, that includes all of the cpp files in the editing subdirectory. * WebCore.vcproj/WebCore.vcproj: Prevnt the editing cpp from building, so we only compile EditingAllInOne. * editing/EditingAllInOne.cpp: Added. Includes all of the editing cpp files. 2010-06-12 Sheriff Bot Unreviewed, rolling out r61031. http://trac.webkit.org/changeset/61031 https://bugs.webkit.org/show_bug.cgi?id=40539 Crashes Dromaeo jslib test in Release Chromium (Requested by dimich_ on #webkit). * bindings/v8/V8Binding.cpp: (WebCore::v8ExternalString): * bindings/v8/V8Binding.h: 2010-06-12 Eric Seidel Reviewed by Adam Barth. Rename the last few *Tokenizer classes (which don't have their own files) to *DocumentParser https://bugs.webkit.org/show_bug.cgi?id=40508 This was a very simple do-webcore-rename-generated patch. PluginTokenizer => PluginDocumentParser TextTokenizer => TextDocumentParser SinkTokenizer => SinkDocumentParser MediaTokenizer => MediaDocumentParser FTPDirectoryTokenizer => FTPDirectoryDocumentParser No functional changes, thus no tests. * html/HTMLViewSourceDocument.cpp: (WebCore::HTMLViewSourceDocument::createTokenizer): * html/HTMLViewSourceDocument.h: * loader/FTPDirectoryDocument.cpp: (WebCore::FTPDirectoryDocumentParser::FTPDirectoryDocumentParser): (WebCore::FTPDirectoryDocumentParser::appendEntry): (WebCore::FTPDirectoryDocumentParser::createTDForFilename): (WebCore::FTPDirectoryDocumentParser::parseAndAppendOneLine): (WebCore::FTPDirectoryDocumentParser::loadDocumentTemplate): (WebCore::FTPDirectoryDocumentParser::createBasicDocument): (WebCore::FTPDirectoryDocumentParser::write): (WebCore::FTPDirectoryDocumentParser::finish): (WebCore::FTPDirectoryDocument::createTokenizer): * loader/MediaDocument.cpp: (WebCore::MediaDocumentParser::MediaDocumentParser): (WebCore::MediaDocumentParser::write): (WebCore::MediaDocumentParser::createDocumentStructure): (WebCore::MediaDocumentParser::writeRawData): (WebCore::MediaDocumentParser::finish): (WebCore::MediaDocumentParser::isWaitingForScripts): (WebCore::MediaDocument::createTokenizer): * loader/PluginDocument.cpp: (WebCore::PluginDocumentParser::PluginDocumentParser): (WebCore::PluginDocumentParser::pluginWidgetFromDocument): (WebCore::PluginDocumentParser::write): (WebCore::PluginDocumentParser::createDocumentStructure): (WebCore::PluginDocumentParser::writeRawData): (WebCore::PluginDocumentParser::finish): (WebCore::PluginDocumentParser::isWaitingForScripts): (WebCore::PluginDocument::createTokenizer): (WebCore::PluginDocument::pluginWidget): * loader/SinkDocument.cpp: (WebCore::SinkDocumentParser::SinkDocumentParser): (WebCore::SinkDocumentParser::finish): (WebCore::SinkDocument::createTokenizer): * loader/TextDocument.cpp: (WebCore::TextDocumentParser::TextDocumentParser): (WebCore::TextDocumentParser::~TextDocumentParser): (WebCore::TextDocumentParser::write): (WebCore::TextDocumentParser::finish): (WebCore::TextDocumentParser::isWaitingForScripts): (WebCore::TextDocument::createTokenizer): (WebCore::createTextTokenizer): 2010-06-12 Anders Bakken Reviewed by Eric Seidel. [Qt] EventHandlerQt.cpp has coding-style errors https://bugs.webkit.org/show_bug.cgi?id=40259 Coding style change only. * page/qt/EventHandlerQt.cpp: (WebCore::EventHandler::eventActivatedView): 2010-06-12 Kwang Yul Seo Reviewed by Darin Adler. Unify fileSystemRepresentation and filenameFromString https://bugs.webkit.org/show_bug.cgi?id=40201 Remove filenameFromString and use fileSystemRepresentation instead as they do the same job. * platform/FileSystem.cpp: Removed. * platform/FileSystem.h: * platform/efl/FileSystemEfl.cpp: (WebCore::fileSystemRepresentation): * platform/gtk/FileChooserGtk.cpp: (WebCore::FileChooser::basenameForWidth): * platform/gtk/FileSystemGtk.cpp: (WebCore::fileSystemRepresentation): (WebCore::filenameForDisplay): (WebCore::fileExists): (WebCore::deleteFile): (WebCore::deleteEmptyDirectory): (WebCore::getFileSize): (WebCore::getFileModificationTime): (WebCore::makeAllDirectories): (WebCore::pathGetFileName): (WebCore::directoryName): (WebCore::listDirectory): * platform/gtk/SharedBufferGtk.cpp: (WebCore::SharedBuffer::createWithContentsOfFile): * platform/network/soup/ResourceHandleSoup.cpp: (WebCore::startHttp): * platform/posix/SharedBufferPOSIX.cpp: (WebCore::SharedBuffer::createWithContentsOfFile): 2010-06-12 Patrick Gansterer Reviewed by Eric Seidel. [Haiku] Cleanup SharedBuffer::createWithContentsOfFile https://bugs.webkit.org/show_bug.cgi?id=39003 * platform/haiku/SharedBufferHaiku.cpp: (WebCore::SharedBuffer::createWithContentsOfFile): 2010-06-12 Anders Bakken Reviewed by Eric Seidel. [Qt] WheelEventQt.cpp has coding-style errors https://bugs.webkit.org/show_bug.cgi?id=39760 * platform/qt/WheelEventQt.cpp: (WebCore::PlatformWheelEvent::PlatformWheelEvent): 2010-06-12 Kwang Yul Seo Reviewed by Kent Tamura. [BREWMP] Don't include POSIX headers in WebCorePrefix.h https://bugs.webkit.org/show_bug.cgi?id=39411 When building for BREW MP, don't include POSIX headers: , and . * WebCorePrefix.h: 2010-06-11 Eric Seidel Reviewed by Adam Barth. Rename the rest of the *Tokenizer classes to *DocumentParser https://bugs.webkit.org/show_bug.cgi?id=40507 This search/replace was done by do-webcore-rename. Just looking for a rubber stamp. XMLTokenizer => XMLDocumentParser XMLTokenizerLibxml2 => XMLDocumentParserLibxml2 XMLTokenizerQt => XMLDocumentParserQt XMLTokenizerScope => XMLDocumentParserScope HTML5Tokenizer => HTML5DocumentParser HTMLTokenizer => HTMLDocumentParser No functional change, thus no tests. * Android.mk: * CMakeLists.txt: * GNUmakefile.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * css/CSSStyleSheet.cpp: (WebCore::CSSStyleSheet::checkLoaded): * dom/Document.cpp: (WebCore::Document::createTokenizer): (WebCore::Document::write): * dom/Document.h: (WebCore::Document::setXMLEncoding): * dom/DocumentParser.h: (WebCore::DocumentParser::asHTMLTokenizer): * dom/Element.cpp: * dom/ProcessingInstruction.cpp: * dom/XMLDocumentParser.cpp: Added. (WebCore::XMLDocumentParser::isWMLDocument): (WebCore::XMLDocumentParser::pushCurrentNode): (WebCore::XMLDocumentParser::popCurrentNode): (WebCore::XMLDocumentParser::clearCurrentNodeStack): (WebCore::XMLDocumentParser::write): (WebCore::XMLDocumentParser::handleError): (WebCore::XMLDocumentParser::enterText): (WebCore::toString): (WebCore::XMLDocumentParser::exitText): (WebCore::XMLDocumentParser::end): (WebCore::XMLDocumentParser::finish): (WebCore::createXHTMLParserErrorHeader): (WebCore::XMLDocumentParser::insertErrorMessageBlock): (WebCore::XMLDocumentParser::notifyFinished): (WebCore::XMLDocumentParser::isWaitingForScripts): (WebCore::XMLDocumentParser::pauseParsing): * dom/XMLDocumentParser.h: Added. (WebCore::XMLParserContext::context): (WebCore::XMLParserContext::XMLParserContext): (WebCore::XMLDocumentParser::): (WebCore::XMLDocumentParser::setIsXHTMLDocument): (WebCore::XMLDocumentParser::isXHTMLDocument): (WebCore::XMLDocumentParser::setIsXHTMLMPDocument): (WebCore::XMLDocumentParser::isXHTMLMPDocument): (WebCore::XMLDocumentParser::wellFormed): (WebCore::XMLDocumentParser::context): * dom/XMLDocumentParserLibxml2.cpp: Added. (WebCore::PendingCallbacks::~PendingCallbacks): (WebCore::PendingCallbacks::appendStartElementNSCallback): (WebCore::PendingCallbacks::appendEndElementNSCallback): (WebCore::PendingCallbacks::appendCharactersCallback): (WebCore::PendingCallbacks::appendProcessingInstructionCallback): (WebCore::PendingCallbacks::appendCDATABlockCallback): (WebCore::PendingCallbacks::appendCommentCallback): (WebCore::PendingCallbacks::appendInternalSubsetCallback): (WebCore::PendingCallbacks::appendErrorCallback): (WebCore::PendingCallbacks::callAndRemoveFirstCallback): (WebCore::PendingCallbacks::isEmpty): (WebCore::PendingCallbacks::PendingCallback::~PendingCallback): (WebCore::PendingCallbacks::PendingStartElementNSCallback::~PendingStartElementNSCallback): (WebCore::PendingCallbacks::PendingStartElementNSCallback::call): (WebCore::PendingCallbacks::PendingEndElementNSCallback::call): (WebCore::PendingCallbacks::PendingCharactersCallback::~PendingCharactersCallback): (WebCore::PendingCallbacks::PendingCharactersCallback::call): (WebCore::PendingCallbacks::PendingProcessingInstructionCallback::~PendingProcessingInstructionCallback): (WebCore::PendingCallbacks::PendingProcessingInstructionCallback::call): (WebCore::PendingCallbacks::PendingCDATABlockCallback::~PendingCDATABlockCallback): (WebCore::PendingCallbacks::PendingCDATABlockCallback::call): (WebCore::PendingCallbacks::PendingCommentCallback::~PendingCommentCallback): (WebCore::PendingCallbacks::PendingCommentCallback::call): (WebCore::PendingCallbacks::PendingInternalSubsetCallback::~PendingInternalSubsetCallback): (WebCore::PendingCallbacks::PendingInternalSubsetCallback::call): (WebCore::PendingCallbacks::): (WebCore::matchFunc): (WebCore::OffsetBuffer::OffsetBuffer): (WebCore::OffsetBuffer::readOutBytes): (WebCore::shouldAllowExternalLoad): (WebCore::openFunc): (WebCore::readFunc): (WebCore::writeFunc): (WebCore::closeFunc): (WebCore::errorFunc): (WebCore::XMLParserContext::createStringParser): (WebCore::XMLParserContext::createMemoryParser): (WebCore::XMLDocumentParser::XMLDocumentParser): (WebCore::XMLParserContext::~XMLParserContext): (WebCore::XMLDocumentParser::~XMLDocumentParser): (WebCore::XMLDocumentParser::doWrite): (WebCore::toString): (WebCore::handleElementNamespaces): (WebCore::handleElementAttributes): (WebCore::XMLDocumentParser::startElementNs): (WebCore::XMLDocumentParser::endElementNs): (WebCore::XMLDocumentParser::characters): (WebCore::XMLDocumentParser::error): (WebCore::XMLDocumentParser::processingInstruction): (WebCore::XMLDocumentParser::cdataBlock): (WebCore::XMLDocumentParser::comment): (WebCore::XMLDocumentParser::startDocument): (WebCore::XMLDocumentParser::endDocument): (WebCore::XMLDocumentParser::internalSubset): (WebCore::getTokenizer): (WebCore::hackAroundLibXMLEntityBug): (WebCore::startElementNsHandler): (WebCore::endElementNsHandler): (WebCore::charactersHandler): (WebCore::processingInstructionHandler): (WebCore::cdataBlockHandler): (WebCore::commentHandler): (WebCore::warningHandler): (WebCore::fatalErrorHandler): (WebCore::normalErrorHandler): (WebCore::): (WebCore::sharedXHTMLEntity): (WebCore::getXHTMLEntity): (WebCore::getEntityHandler): (WebCore::startDocumentHandler): (WebCore::endDocumentHandler): (WebCore::internalSubsetHandler): (WebCore::externalSubsetHandler): (WebCore::ignorableWhitespaceHandler): (WebCore::XMLDocumentParser::initializeParserContext): (WebCore::XMLDocumentParser::doEnd): (WebCore::xmlDocPtrForString): (WebCore::XMLDocumentParser::lineNumber): (WebCore::XMLDocumentParser::columnNumber): (WebCore::XMLDocumentParser::stopParsing): (WebCore::XMLDocumentParser::resumeParsing): (WebCore::parseXMLDocumentFragment): (WebCore::attributesStartElementNsHandler): (WebCore::parseAttributes): * dom/XMLDocumentParserQt.cpp: Added. (WebCore::EntityResolver::resolveUndeclaredEntity): (WebCore::XMLDocumentParser::XMLDocumentParser): (WebCore::XMLDocumentParser::~XMLDocumentParser): (WebCore::XMLDocumentParser::doWrite): (WebCore::XMLDocumentParser::initializeParserContext): (WebCore::XMLDocumentParser::doEnd): (WebCore::XMLDocumentParser::lineNumber): (WebCore::XMLDocumentParser::columnNumber): (WebCore::XMLDocumentParser::stopParsing): (WebCore::XMLDocumentParser::resumeParsing): (WebCore::parseXMLDocumentFragment): (WebCore::attributesStartElementNsHandler): (WebCore::parseAttributes): (WebCore::prefixFromQName): (WebCore::handleElementNamespaces): (WebCore::handleElementAttributes): (WebCore::XMLDocumentParser::parse): (WebCore::XMLDocumentParser::startDocument): (WebCore::XMLDocumentParser::parseStartElement): (WebCore::XMLDocumentParser::parseEndElement): (WebCore::XMLDocumentParser::parseCharacters): (WebCore::XMLDocumentParser::parseProcessingInstruction): (WebCore::XMLDocumentParser::parseCdata): (WebCore::XMLDocumentParser::parseComment): (WebCore::XMLDocumentParser::endDocument): (WebCore::XMLDocumentParser::hasError): (WebCore::XMLDocumentParser::parseDtd): * dom/XMLDocumentParserScope.cpp: Added. (WebCore::XMLDocumentParserScope::XMLDocumentParserScope): (WebCore::XMLDocumentParserScope::~XMLDocumentParserScope): * dom/XMLDocumentParserScope.h: Added. * dom/XMLTokenizer.cpp: Removed. * dom/XMLTokenizer.h: Removed. * dom/XMLTokenizerLibxml2.cpp: Removed. * dom/XMLTokenizerQt.cpp: Removed. * dom/XMLTokenizerScope.cpp: Removed. * dom/XMLTokenizerScope.h: Removed. * html/HTML5DocumentParser.cpp: Added. (WebCore::): (WebCore::HTML5DocumentParser::HTML5DocumentParser): (WebCore::HTML5DocumentParser::~HTML5DocumentParser): (WebCore::HTML5DocumentParser::begin): (WebCore::HTML5DocumentParser::pumpLexerIfPossible): (WebCore::HTML5DocumentParser::pumpLexer): (WebCore::HTML5DocumentParser::write): (WebCore::HTML5DocumentParser::end): (WebCore::HTML5DocumentParser::attemptToEnd): (WebCore::HTML5DocumentParser::endIfDelayed): (WebCore::HTML5DocumentParser::finish): (WebCore::HTML5DocumentParser::executingScript): (WebCore::HTML5DocumentParser::lineNumber): (WebCore::HTML5DocumentParser::columnNumber): (WebCore::HTML5DocumentParser::htmlParser): (WebCore::HTML5DocumentParser::isWaitingForScripts): (WebCore::HTML5DocumentParser::resumeParsingAfterScriptExecution): (WebCore::HTML5DocumentParser::watchForLoad): (WebCore::HTML5DocumentParser::stopWatchingForLoad): (WebCore::HTML5DocumentParser::shouldLoadExternalScriptFromSrc): (WebCore::HTML5DocumentParser::executeScript): (WebCore::HTML5DocumentParser::notifyFinished): (WebCore::HTML5DocumentParser::executeScriptsWaitingForStylesheets): (WebCore::HTML5DocumentParser::script): * html/HTML5DocumentParser.h: Added. (WebCore::HTML5DocumentParser::InputStream::InputStream): (WebCore::HTML5DocumentParser::InputStream::appendToEnd): (WebCore::HTML5DocumentParser::InputStream::insertAtCurrentInsertionPoint): (WebCore::HTML5DocumentParser::InputStream::close): (WebCore::HTML5DocumentParser::InputStream::current): (WebCore::HTML5DocumentParser::InputStream::splitInto): (WebCore::HTML5DocumentParser::InputStream::mergeFrom): (WebCore::HTML5DocumentParser::InsertionPointRecord::InsertionPointRecord): (WebCore::HTML5DocumentParser::InsertionPointRecord::~InsertionPointRecord): (WebCore::HTML5DocumentParser::inWrite): * html/HTML5Lexer.h: (WebCore::HTML5Lexer::columnNumber): * html/HTML5Tokenizer.cpp: Removed. * html/HTML5Tokenizer.h: Removed. * html/HTML5TreeBuilder.cpp: * html/HTMLDocument.cpp: (WebCore::HTMLDocument::createTokenizer): * html/HTMLDocumentParser.cpp: Added. (WebCore::): (WebCore::fixUpChar): (WebCore::tagMatch): (WebCore::Token::addAttribute): (WebCore::HTMLDocumentParser::HTMLDocumentParser): (WebCore::HTMLDocumentParser::reset): (WebCore::HTMLDocumentParser::begin): (WebCore::HTMLDocumentParser::setForceSynchronous): (WebCore::HTMLDocumentParser::processListing): (WebCore::HTMLDocumentParser::parseNonHTMLText): (WebCore::HTMLDocumentParser::scriptHandler): (WebCore::HTMLDocumentParser::scriptExecution): (WebCore::HTMLDocumentParser::parseComment): (WebCore::HTMLDocumentParser::parseServer): (WebCore::HTMLDocumentParser::parseProcessingInstruction): (WebCore::HTMLDocumentParser::parseText): (WebCore::HTMLDocumentParser::parseEntity): (WebCore::HTMLDocumentParser::parseDoctype): (WebCore::HTMLDocumentParser::parseTag): (WebCore::HTMLDocumentParser::continueProcessing): (WebCore::HTMLDocumentParser::advance): (WebCore::HTMLDocumentParser::willWriteHTML): (WebCore::HTMLDocumentParser::didWriteHTML): (WebCore::HTMLDocumentParser::write): (WebCore::HTMLDocumentParser::stopParsing): (WebCore::HTMLDocumentParser::processingData): (WebCore::HTMLDocumentParser::timerFired): (WebCore::HTMLDocumentParser::end): (WebCore::HTMLDocumentParser::finish): (WebCore::HTMLDocumentParser::processToken): (WebCore::HTMLDocumentParser::processDoctypeToken): (WebCore::HTMLDocumentParser::~HTMLDocumentParser): (WebCore::HTMLDocumentParser::enlargeBuffer): (WebCore::HTMLDocumentParser::enlargeScriptBuffer): (WebCore::HTMLDocumentParser::executeScriptsWaitingForStylesheets): (WebCore::HTMLDocumentParser::notifyFinished): (WebCore::HTMLDocumentParser::executeExternalScriptsIfReady): (WebCore::HTMLDocumentParser::executeExternalScriptsTimerFired): (WebCore::HTMLDocumentParser::continueExecutingExternalScripts): (WebCore::HTMLDocumentParser::isWaitingForScripts): (WebCore::HTMLDocumentParser::setSrc): (WebCore::parseHTMLDocumentFragment): (WebCore::decodeNamedEntity): * html/HTMLDocumentParser.h: Added. (WebCore::Token::Token): (WebCore::Token::~Token): (WebCore::Token::isOpenTag): (WebCore::Token::isCloseTag): (WebCore::Token::reset): (WebCore::Token::addViewSourceChar): (WebCore::): (WebCore::DoctypeToken::DoctypeToken): (WebCore::DoctypeToken::reset): (WebCore::DoctypeToken::state): (WebCore::DoctypeToken::setState): (WebCore::HTMLDocumentParser::forceSynchronous): (WebCore::HTMLDocumentParser::executingScript): (WebCore::HTMLDocumentParser::lineNumber): (WebCore::HTMLDocumentParser::columnNumber): (WebCore::HTMLDocumentParser::processingContentWrittenByScript): (WebCore::HTMLDocumentParser::htmlParser): (WebCore::HTMLDocumentParser::asHTMLTokenizer): (WebCore::HTMLDocumentParser::checkBuffer): (WebCore::HTMLDocumentParser::checkScriptBuffer): (WebCore::HTMLDocumentParser::): (WebCore::HTMLDocumentParser::State::State): (WebCore::HTMLDocumentParser::State::tagState): (WebCore::HTMLDocumentParser::State::setTagState): (WebCore::HTMLDocumentParser::State::entityState): (WebCore::HTMLDocumentParser::State::setEntityState): (WebCore::HTMLDocumentParser::State::inScript): (WebCore::HTMLDocumentParser::State::setInScript): (WebCore::HTMLDocumentParser::State::inStyle): (WebCore::HTMLDocumentParser::State::setInStyle): (WebCore::HTMLDocumentParser::State::inXmp): (WebCore::HTMLDocumentParser::State::setInXmp): (WebCore::HTMLDocumentParser::State::inTitle): (WebCore::HTMLDocumentParser::State::setInTitle): (WebCore::HTMLDocumentParser::State::inIFrame): (WebCore::HTMLDocumentParser::State::setInIFrame): (WebCore::HTMLDocumentParser::State::inPlainText): (WebCore::HTMLDocumentParser::State::setInPlainText): (WebCore::HTMLDocumentParser::State::inProcessingInstruction): (WebCore::HTMLDocumentParser::State::setInProcessingInstruction): (WebCore::HTMLDocumentParser::State::inComment): (WebCore::HTMLDocumentParser::State::setInComment): (WebCore::HTMLDocumentParser::State::inDoctype): (WebCore::HTMLDocumentParser::State::setInDoctype): (WebCore::HTMLDocumentParser::State::inTextArea): (WebCore::HTMLDocumentParser::State::setInTextArea): (WebCore::HTMLDocumentParser::State::escaped): (WebCore::HTMLDocumentParser::State::setEscaped): (WebCore::HTMLDocumentParser::State::inServer): (WebCore::HTMLDocumentParser::State::setInServer): (WebCore::HTMLDocumentParser::State::skipLF): (WebCore::HTMLDocumentParser::State::setSkipLF): (WebCore::HTMLDocumentParser::State::startTag): (WebCore::HTMLDocumentParser::State::setStartTag): (WebCore::HTMLDocumentParser::State::discardLF): (WebCore::HTMLDocumentParser::State::setDiscardLF): (WebCore::HTMLDocumentParser::State::allowYield): (WebCore::HTMLDocumentParser::State::setAllowYield): (WebCore::HTMLDocumentParser::State::loadingExtScript): (WebCore::HTMLDocumentParser::State::setLoadingExtScript): (WebCore::HTMLDocumentParser::State::forceSynchronous): (WebCore::HTMLDocumentParser::State::setForceSynchronous): (WebCore::HTMLDocumentParser::State::inAnyNonHTMLText): (WebCore::HTMLDocumentParser::State::hasTagState): (WebCore::HTMLDocumentParser::State::hasEntityState): (WebCore::HTMLDocumentParser::State::needsSpecialWriteHandling): (WebCore::HTMLDocumentParser::State::): (WebCore::HTMLDocumentParser::State::setBit): (WebCore::HTMLDocumentParser::State::testBit): * html/HTMLElement.cpp: * html/HTMLFormControlElement.cpp: * html/HTMLParser.cpp: (WebCore::HTMLParser::reportErrorToConsole): * html/HTMLParser.h: * html/HTMLTokenizer.cpp: Removed. * html/HTMLTokenizer.h: Removed. * html/HTMLViewSourceDocument.cpp: (WebCore::HTMLViewSourceDocument::createTokenizer): (WebCore::HTMLViewSourceDocument::addViewSourceToken): * html/HTMLViewSourceDocument.h: * loader/DocumentLoader.cpp: * loader/FTPDirectoryDocument.cpp: (WebCore::FTPDirectoryTokenizer::FTPDirectoryTokenizer): (WebCore::FTPDirectoryTokenizer::loadDocumentTemplate): (WebCore::FTPDirectoryTokenizer::finish): * loader/FrameLoader.cpp: * loader/ImageDocument.cpp: * loader/MediaDocument.cpp: * loader/PluginDocument.cpp: * loader/TextDocument.cpp: * page/XSSAuditor.h: * svg/SVGDocumentExtensions.cpp: * wml/WMLErrorHandling.cpp: (WebCore::reportWMLError): * xml/XSLStyleSheetLibxslt.cpp: (WebCore::XSLStyleSheet::parseString): * xml/XSLTProcessor.cpp: * xml/XSLTProcessorLibxslt.cpp: 2010-06-12 Andreas Kling Reviewed by Darin Adler. Window object should have CanvasGradient and CanvasPattern https://bugs.webkit.org/show_bug.cgi?id=40394 This fixes the following tests: - canvas/philip/tests/2d.gradient.object.return.html - canvas/philip/tests/2d.pattern.basic.type.html * html/canvas/CanvasGradient.idl: * html/canvas/CanvasPattern.idl: * page/DOMWindow.idl: 2010-06-12 Dan Bernstein Reviewed by Oliver Hunt. REGRESSION (Safari 4-TOT): Crash when a frame’s resize handler removes the frame https://bugs.webkit.org/show_bug.cgi?id=40534 Test: fast/replaced/frame-removed-during-resize.html * rendering/RenderWidget.cpp: (WebCore::RenderWidget::updateWidgetPosition): Null-check m_widget, since resizing the widget may trigger an iframe’s resize handler, which may destroy the widget. 2010-06-12 Dean Jackson Reviewed by Darin Adler. Animation keyframe timing functions are applying incorrectly https://bugs.webkit.org/show_bug.cgi?id=38963 When copying RenderStyles, we have to clone the AnimationList so that each keyframe can have its own timing function. Tests: animations/keyframe-timing-functions-transform.html animations/keyframe-timing-functions2.html * platform/animation/Animation.h: (WebCore::Animation::create): * platform/animation/AnimationList.cpp: (WebCore::AnimationList::AnimationList): * platform/animation/AnimationList.h: (WebCore::AnimationList::AnimationList): 2010-06-12 Dan Bernstein Reviewed by Dave Hyatt. -webkit-column-break-* properties don’t do anything https://bugs.webkit.org/show_bug.cgi?id=40531 Test: fast/multicol/break-properties.html * rendering/RenderBlock.cpp: (WebCore::RenderBlock::paintChildren): Check for -webkit-column-break-{before,after}: always and -webkit-column-break-inside: avoid when doing column layout. 2010-06-13 Robert Hogan Reviewed by Alexey Proskuryakov. FrameLoader::clear() clears JS objects that cached pages later rely on https://bugs.webkit.org/show_bug.cgi?id=37725 https://bugs.webkit.org/show_bug.cgi?id=31626 Fix the following tests for Qt: fast/events/pageshow-pagehide-on-back-cached.html fast/events/pageshow-pagehide-on-back-cached-with-frames.html fast/loader/input-element-page-cache-crash.html fast/dom/Window/timer-resume-on-navigation-back.html loader/go-back-to-different-window-size.html fast/dom/javascript-url-crash-function.html fast/dom/location-new-window-no-crash.html http/tests/security/javascriptURL/xss-ALLOWED-from-javascript-url-window-open.html which currently fail because the page's Qt-bindings runtime objects are cleared when navigating away from the page containing them. Track Qt-bindings objects in a separate ScriptController::cacheableRootBindingObject(). RuntimeObjects tracked by this root object will not get invalidated on page navigations, so they will still be available when the pages containing them are retrieved from the b/f cache. This means the Qt bindings objects will only get cleared on Frame::pageDestroyed(). * bindings/js/ScriptController.cpp: (WebCore::ScriptController::~ScriptController): (WebCore::ScriptController::cacheableBindingRootObject): * bindings/js/ScriptController.h: 2010-06-12 Kent Tamura Reviewed by Darin Adler. REGRESSION: Can't submit a form with https://bugs.webkit.org/show_bug.cgi?id=40429 Validity state was not updated correctly for radio buttons, and it prevents form submission even if a radio button group has a checked radio button. Test: fast/forms/interactive-validation-required-radio.html * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::updateCheckedRadioButtons): Call setNeedsValidityCheck() for all of radio buttons in the same group to update validity state. (WebCore::HTMLInputElement::setChecked): Remove setNeedsValidityCheck() call because it is called in updateCheckedRadioButtons(). 2010-06-12 Kent Tamura Reviewed by Dimitri Glazkov. Disable interactive form validation in non-strict modes https://bugs.webkit.org/show_bug.cgi?id=40218 The interactive validation feature of HTML5 is not compatible with HTML4, and users and page authors don't expect existing sites work differently in WebKit. For example, maxlength and required attributes in existing sites unexpectedly prevented form submission. So, we disable the interactive validation feature in non-strict modes to improve compatibility. Test: fast/forms/interactive-validation-compat-mode.html fast/forms/interactive-validation-html4.html * html/HTMLFormElement.cpp: (WebCore::HTMLFormElement::validateInteractively): Process interactive validation only in the strict mode. 2010-06-12 Eric Seidel Reviewed by David Levin. Rename Tokenizer to DocumentParser to match what it actually does https://bugs.webkit.org/show_bug.cgi?id=40504 The rename was entirely done by do-webcore-rename. The only manual changes were removing out-dated comments and fixing Tokenizer_h to DocumentParser_h in the header guards. I'll do all the rest of the renames (like the tokenizer subclasses and the tokenizer() createTokenizer() methods) in separate changes. No functional change, thus no tests. * GNUmakefile.am: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSHTMLDocumentCustom.cpp: * bindings/v8/ScriptEventListener.cpp: * dom/Document.cpp: (WebCore::Document::createTokenizer): * dom/Document.h: (WebCore::Document::tokenizer): * dom/DocumentParser.h: Added. (WebCore::DocumentParser::~DocumentParser): (WebCore::DocumentParser::stopParsing): (WebCore::DocumentParser::processingData): (WebCore::DocumentParser::executingScript): (WebCore::DocumentParser::wantsRawData): (WebCore::DocumentParser::writeRawData): (WebCore::DocumentParser::inViewSourceMode): (WebCore::DocumentParser::setInViewSourceMode): (WebCore::DocumentParser::wellFormed): (WebCore::DocumentParser::lineNumber): (WebCore::DocumentParser::columnNumber): (WebCore::DocumentParser::executeScriptsWaitingForStylesheets): (WebCore::DocumentParser::htmlParser): (WebCore::DocumentParser::asHTMLTokenizer): (WebCore::DocumentParser::xssAuditor): (WebCore::DocumentParser::setXSSAuditor): (WebCore::DocumentParser::DocumentParser): * dom/Tokenizer.h: Removed. * dom/ViewportArguments.cpp: (WebCore::reportViewportWarning): * dom/XMLTokenizer.h: * dom/XMLTokenizerLibxml2.cpp: (WebCore::XMLTokenizer::stopParsing): * dom/XMLTokenizerQt.cpp: (WebCore::XMLTokenizer::stopParsing): * html/HTML5Tokenizer.cpp: (WebCore::HTML5Tokenizer::HTML5Tokenizer): * html/HTML5Tokenizer.h: * html/HTMLDocument.cpp: (WebCore::HTMLDocument::createTokenizer): * html/HTMLDocument.h: * html/HTMLFormControlElement.cpp: (WebCore::HTMLFormControlElement::removedFromTree): * html/HTMLTokenizer.cpp: (WebCore::HTMLTokenizer::HTMLTokenizer): (WebCore::HTMLTokenizer::stopParsing): * html/HTMLTokenizer.h: * html/HTMLViewSourceDocument.cpp: (WebCore::HTMLViewSourceDocument::createTokenizer): * html/HTMLViewSourceDocument.h: * loader/DocumentLoader.cpp: (WebCore::DocumentLoader::isLoadingInAPISense): * loader/DocumentWriter.cpp: (WebCore::DocumentWriter::addData): * loader/FTPDirectoryDocument.cpp: (WebCore::FTPDirectoryDocument::createTokenizer): * loader/FTPDirectoryDocument.h: * loader/ImageDocument.cpp: (WebCore::ImageDocument::createTokenizer): * loader/ImageDocument.h: * loader/MediaDocument.cpp: (WebCore::MediaDocument::createTokenizer): * loader/MediaDocument.h: * loader/PluginDocument.cpp: (WebCore::PluginDocument::createTokenizer): * loader/PluginDocument.h: * loader/SinkDocument.cpp: (WebCore::SinkDocument::createTokenizer): * loader/SinkDocument.h: * loader/TextDocument.cpp: (WebCore::TextTokenizer::TextTokenizer): (WebCore::TextDocument::createTokenizer): (WebCore::createTextTokenizer): * loader/TextDocument.h: * wml/WMLDocument.cpp: (WebCore::WMLDocument::finishedParsing): 2010-06-12 Eric Seidel Reviewed by Adam Barth. HTML5Tokenizer needs to tell the InspectorTimelineAgent before and after it writes https://bugs.webkit.org/show_bug.cgi?id=40417 This "fixes" inspector/timeline-script-tag-1.html. HTML5 results differ from the old parser for expected reasons. HTML5Tokenizer calls InspectorTimelineAgent::will/didWriteHTML every time we pump the lexer instead of every write() call. We end up pumping the lexer slightly more often than the old code called write() in order to cleanly handle unclosed-entities, unclosed tags, buffered characters, etc. at the end of a document. I discussed this extensively with James Robinson in #webkit and we decided that it was better for the HTML5Tokenizer to call for every pump and that the Inspector should later filter out empty pumps. We can't filter out empty pumps yet, because the number of parsed characters is passed in willWrite instead of didWrite and thus is speculative (and wrong). This is a problem independent of this change as willWrite's "length" argument is wrong in different ways for the old parser, including always being 0 when the old parser resumes. Tested by inspector/timeline-script-tag-1.html * html/HTML5Tokenizer.cpp: (WebCore::HTML5Tokenizer::willPumpLexer): - Notify the InspectorTimelineAgent we're about to process input. (WebCore::HTML5Tokenizer::didPumpLexer): - Notify the InspectorTimelineAgent we did process tokens. (WebCore::HTML5Tokenizer::pumpLexer): - Call willPump and didPump * html/HTML5Tokenizer.h: * inspector/InspectorTimelineAgent.h: - Add a FIXME about passing length to didWrite instead of willWrite. 2010-06-11 Sheriff Bot Unreviewed, rolling out r61052. http://trac.webkit.org/changeset/61052 https://bugs.webkit.org/show_bug.cgi?id=40517 "Broke fast/forms/caret-rtl.html on Mac bots" (Requested by eseidel on #webkit). * html/HTMLElement.cpp: (WebCore::HTMLElement::mapToEntry): (WebCore::HTMLElement::parseMappedAttribute): 2010-06-11 Maciej Stachowiak Reviewed by Ojan Vafai. Implement HTML5 hidden attribute https://bugs.webkit.org/show_bug.cgi?id=40511 Test: fast/html/hidden-attr.html Note: I used the mapped attribute mechanism for this instead of a rule in the UA stylesheet to avoid a performance hit from adding a global attribute rule to the UA stylesheet. * html/HTMLElement.cpp: (WebCore::HTMLElement::mapToEntry): Pick up hidden as a global mapped attribute. (WebCore::HTMLElement::parseMappedAttribute): Map hidden attribute to display: none. 2010-06-10 Abhishek Arya Reviewed by Dave Hyatt. Do not render CSS Styles :first-letter and :first-line in a SVG text element context. https://bugs.webkit.org/show_bug.cgi?id=40031 Test: svg/text/text-style-invalid.svg * rendering/RenderSVGText.cpp: (WebCore::RenderSVGText::firstLineBlock): (WebCore::RenderSVGText::updateFirstLetter): * rendering/RenderSVGText.h: 2010-06-11 Kenneth Russell Reviewed by Dimitri Glazkov. getParameter with UNPACK_FLIP_Y_WEBGL and UNPACK_PREMULTIPLY_ALPHA_WEBGL is buggy https://bugs.webkit.org/show_bug.cgi?id=40506 Return the data members of WebGLRenderingContext for these parameter queries rather than asking OpenGL, which knows nothing about them. * html/canvas/WebGLRenderingContext.cpp: (WebCore::WebGLRenderingContext::getParameter): 2010-06-11 Simon Fraser Reviewed by Dr Dan Bernstein. REGRESSION: crash when unloading an iFrame with Flash from the DOM https://bugs.webkit.org/show_bug.cgi?id=40161 Null-check the ownerElement of the RenderView's document when unhooking the compositing root of an iframe whose layers are parented via the enclosing document. Fixes a crash when dynamically removing such an iframe. Test: compositing/iframes/remove-iframe-crash.html * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::detachRootPlatformLayer): 2010-06-11 Abhishek Arya Reviewed by David Hyatt. Don't process floats if parent node is not a RenderBlock. https://bugs.webkit.org/show_bug.cgi?id=40033 Test: svg/text/clear-floats-crash.svg * rendering/RenderBlock.cpp: (WebCore::RenderBlock::clearFloats): 2010-06-11 Sheriff Bot Unreviewed, rolling out r61036. http://trac.webkit.org/changeset/61036 https://bugs.webkit.org/show_bug.cgi?id=40499 broke chromium compile (Requested by jamesr on #webkit). * bindings/v8/SerializedScriptValue.cpp: * bindings/v8/SerializedScriptValue.h: (WebCore::SerializedScriptValue::deserializeAndSetProperty): (WebCore::SerializedScriptValue::create): (WebCore::SerializedScriptValue::createFromWire): (WebCore::SerializedScriptValue::release): (WebCore::SerializedScriptValue::SerializedScriptValue): 2010-06-11 Kenneth Russell Reviewed by Dimitri Glazkov. Add texImage2D and texSubImage2D signatures with internal format, etc. https://bugs.webkit.org/show_bug.cgi?id=40318 Added new texImage2D and texSubImage2D entry points following WebGL specification changes. Added UNPACK_FLIP_Y_WEBGL and UNPACK_PREMULTIPLY_ALPHA_WEBGL pixelStorei parameters, honored them for the new entry points taking HTML elements, and added support to getParameter. Added warnings to the console for calls to the obsolete entry points, which will be removed in a few weeks. Updated all layout tests to use the new entry points and pixelStorei parameters, and associated expectations. No other new tests. * html/canvas/WebGLRenderingContext.cpp: (WebCore::WebGLRenderingContext::WebGLRenderingContext): (WebCore::WebGLRenderingContext::getParameter): (WebCore::WebGLRenderingContext::pixelStorei): (WebCore::WebGLRenderingContext::texImage2DImpl): (WebCore::WebGLRenderingContext::texImage2D): (WebCore::WebGLRenderingContext::texSubImage2DImpl): (WebCore::WebGLRenderingContext::texSubImage2D): (WebCore::WebGLRenderingContext::printWarningToConsole): * html/canvas/WebGLRenderingContext.h: * html/canvas/WebGLRenderingContext.idl: * platform/graphics/GraphicsContext3D.h: (WebCore::GraphicsContext3D::): 2010-06-11 James Robinson Reviewed by Dimitri Glazkov. [chromium] Skia mispaints pages with border-radius https://bugs.webkit.org/show_bug.cgi?id=40456 Skia mispaints pages that have border radius set in some cases. The bug is in the anti aliased clip path logic used to implement anti aliased curves in Skia. Since Skia internally only supports 1-bit clips, anti aliased clipping is emulated by creating a new alpha layer, storing a set of clip paths on the side, and then 'erasing' the regions outside the clip. See r49641. PlatformContextSkia maintains a stack of PlatformContextSkia::State objects that preserve information like fill color, drawing mode, etc that is manipulated by GraphicsContext::save() / GraphicsContext::restore() calls as well some internal functions. Whenever a new State object is pushed a new copy of the current State object is pushed onto the top of this stack using the copy c'tor. The set of anti alias clip paths is also stored on the State object, but not copied when new entries are added as the paths only apply to that entry on the stack. The bug is that the state stack is stored in a WTF::Vector. When this vector exceeds its capacity (by default at 16 elements) all of the existing State entries are copied into the new buffer using State's copy constructor. This does not preserve the anti alias clip paths, so when the State entries are popped the anti aliasing info is lost. This corrupts all further paint operations since it results in inbalanced save/restore calls to the underlying SkCanvas. The fix is to make the PlatformContextSkia::State copy constructor copy all fields and to add a new function PlatformContextSkia::State::cloneInheritedProperties to use when pushing new State entries that copies everything except for the anti aliased clip paths. Test: fast/css/nested-rounded-corners.html * platform/graphics/skia/PlatformContextSkia.cpp: (PlatformContextSkia::State::State): (PlatformContextSkia::State::cloneInheritedProperties): (PlatformContextSkia::save): 2010-06-11 Jeremy Orlow Reviewed by Darin Fisher. [V8] Clean up SerializedScriptValue https://bugs.webkit.org/show_bug.cgi?id=40482 SerializedScriptValue doesn't follow WebKit's style guidelines very well and needlessly inlines quite a bit within the .h file. This change cleans things up. No funcitonal changes. No change in behavior. * bindings/v8/SerializedScriptValue.cpp: (WebCore::SerializedScriptValue::deserializeAndSetProperty): (WebCore::SerializedScriptValue::create): (WebCore::SerializedScriptValue::createFromWire): (WebCore::SerializedScriptValue::release): (WebCore::SerializedScriptValue::SerializedScriptValue): * bindings/v8/SerializedScriptValue.h: 2010-06-11 Anton Muhin Reviewed by Adam Barth. [v8] Introduce single element caches for WebCore::String to v8::String conversions https://bugs.webkit.org/show_bug.cgi?id=40435 Measurements show that for some web apps (GMail, Wave) and some scenarios (intensive reading and/or keeping a tab open for a long time), hit rate lies in 30--50% interval. Inlining fast case gives another minor performance win. * bindings/v8/V8Binding.cpp: (WebCore::getStringCache): (WebCore::v8ExternalStringSlow): * bindings/v8/V8Binding.h: (WebCore::v8ExternalString): 2010-06-11 Leandro Pereira Reviewed by Gustavo Noronha Silva. [EFL] Build fix: remove unneeded file (npapi.cpp) and add other files that got added to the tree. http://webkit.org/b/40331 * CMakeLists.txt: * CMakeListsEfl.txt: 2010-06-11 Tony Gentilcore Reviewed by Eric Seidel. Fix fast/forms/preserveFormDuringResidualStyle.html for HTML5 Parser. https://bugs.webkit.org/show_bug.cgi?id=40454 This required exposing the HTMLParser which we definitely don't want to do, but the good news is that it can go away when the HTMLParser goes away. No new tests because covered by fast/forms/preserve/FormDuringResidualStyle.html. * dom/Tokenizer.h: (WebCore::Tokenizer::htmlParser): * html/HTML5Tokenizer.cpp: (WebCore::HTML5Tokenizer::htmlParser): * html/HTML5Tokenizer.h: * html/HTML5TreeBuilder.h: (WebCore::HTML5TreeBuilder::htmlParser): * html/HTMLFormControlElement.cpp: (WebCore::HTMLFormControlElement::removedFromTree): * html/HTMLTokenizer.h: (WebCore::HTMLTokenizer::htmlParser): 2010-06-11 Kenneth Russell Reviewed by Dimitri Glazkov. Delete custom JSC bindings for bufferData, texImage2D and texSubImage2D https://bugs.webkit.org/show_bug.cgi?id=40443 Deleted custom JSC bindings for bufferData, texImage2D and texSubImage2D and fixed minor associated issues in code generator and IDL. Updated fast/canvas/webgl/texImageTest-expected.txt, which now runs as intended. Ran all layout tests, including WebGL tests, in Safari. * bindings/js/JSWebGLRenderingContextCustom.cpp: - Deleted custom bindings. * bindings/scripts/CodeGeneratorJS.pm: - Made overload helper functions static to fix compiler warnings. - Added needed isObject check for overloads between object and non-object arguments. - Added JSValue::encode to exception return path, needed on Leopard in particular. * html/HTMLCanvasElement.idl: * html/HTMLImageElement.idl: * html/HTMLVideoElement.idl: - Added GenerateNativeConverter extended attribute. * html/canvas/WebGLRenderingContext.idl: - Deleted #ifdefs for custom JSC bindings. 2010-06-11 Kevin Ollivier [wx] Build fix, add KillRingNone.cpp until we can implement it. * wscript: 2010-06-11 Hans Wennborg Reviewed by Jeremy Orlow. DOM storage should only create databases when needed https://bugs.webkit.org/show_bug.cgi?id=40301 As soon as a page attempts to use localstorage, StorageAreaSync will create an empty database if one doesn't already exist. This can lead to lots of unnecessary database files. In particular, they are created even when the privacy settings or private browsing mode disallow localstorage data, which may seem odd to the user. Database creation should be put off in StorageAreaSync until it is time to actually write something to the database. Tests: manual-tests/localstorage-empty-database.html * manual-tests/localstorage-empty-database.html: Added. * storage/StorageAreaSync.cpp: (WebCore::StorageAreaSync::StorageAreaSync): (WebCore::StorageAreaSync::openDatabase): (WebCore::StorageAreaSync::performImport): (WebCore::StorageAreaSync::sync): * storage/StorageAreaSync.h: (WebCore::StorageAreaSync::): 2010-06-11 Ilya Tikhonovsky Reviewed by Eric Seidel. Perl scripts for bindings don't use strict keyword. As result some problems in the script code were not detected at compile stage. https://bugs.webkit.org/show_bug.cgi?id=40468 * bindings/scripts/CodeGenerator.pm: * bindings/scripts/IDLParser.pm: * bindings/scripts/IDLStructure.pm: 2010-06-11 Eric Seidel Reviewed by Adam Barth. HTML5Tokenizer should not delete itself while running scripts https://bugs.webkit.org/show_bug.cgi?id=40458 Tested by fast/dom/document-clear.html * html/HTML5Tokenizer.cpp: (WebCore::HTML5Tokenizer::attemptToEnd): - Don't ever end() while running scripts. This matches the old HTMLTokenizer.cpp 2010-06-11 Zhenyao Mo Reviewed by Dimitri Glazkov. getActiveUniform must ensure names of arrays end in "[0]" https://bugs.webkit.org/show_bug.cgi?id=38709 Test: fast/canvas/webgl/get-active-test.html * html/canvas/WebGLRenderingContext.cpp: (WebCore::WebGLRenderingContext::getActiveAttrib): Append "[0]" to the name if needed. 2010-06-11 Zhenyao Mo Reviewed by Dimitri Glazkov. readPixels with negative width/height should generate INVALID_VALUE and return https://bugs.webkit.org/show_bug.cgi?id=39704 * html/canvas/WebGLRenderingContext.cpp: Deal with negative width/height. (WebCore::WebGLRenderingContext::readPixels): * html/canvas/WebGLRenderingContext.h: Change width/height type from unsigned long to long. * html/canvas/WebGLRenderingContext.idl: Ditto. 2010-06-11 Zhenyao Mo Reviewed by Dimitri Glazkov. uniform* entry points must ignore the call if a null WebGLUniformLocation is passed https://bugs.webkit.org/show_bug.cgi?id=38707 * html/canvas/WebGLRenderingContext.cpp: uniform* entry points ignore the call if a null WebGLUniformLocation is passed. (WebCore::WebGLRenderingContext::uniform1f): (WebCore::WebGLRenderingContext::uniform1fv): (WebCore::WebGLRenderingContext::uniform1i): (WebCore::WebGLRenderingContext::uniform1iv): (WebCore::WebGLRenderingContext::uniform2f): (WebCore::WebGLRenderingContext::uniform2fv): (WebCore::WebGLRenderingContext::uniform2i): (WebCore::WebGLRenderingContext::uniform2iv): (WebCore::WebGLRenderingContext::uniform3f): (WebCore::WebGLRenderingContext::uniform3fv): (WebCore::WebGLRenderingContext::uniform3i): (WebCore::WebGLRenderingContext::uniform3iv): (WebCore::WebGLRenderingContext::uniform4f): (WebCore::WebGLRenderingContext::uniform4fv): (WebCore::WebGLRenderingContext::uniform4i): (WebCore::WebGLRenderingContext::uniform4iv): (WebCore::WebGLRenderingContext::uniformMatrix2fv): (WebCore::WebGLRenderingContext::uniformMatrix3fv): (WebCore::WebGLRenderingContext::uniformMatrix4fv): 2010-06-11 Zhenyao Mo Reviewed by Dimitri Glazkov. drawElements/drawArrays should validate input parameters according to GLES2 spec https://bugs.webkit.org/show_bug.cgi?id=38700 Tests: fast/canvas/webgl/draw-arrays-out-of-bounds.html fast/canvas/webgl/draw-elements-out-of-bounds.html * html/canvas/WebGLRenderingContext.cpp: (WebCore::WebGLRenderingContext::drawArrays): Validate input parameters. (WebCore::WebGLRenderingContext::drawElements): Ditto. (WebCore::WebGLRenderingContext::validateDrawMode): Validate mode for draw{Arrays/Elements}. * html/canvas/WebGLRenderingContext.h: Add validateDrawMode, fix incorrect parameter types. * html/canvas/WebGLRenderingContext.idl: Fix incorrect parameter types. 2010-06-11 Luiz Agostini Reviewed by Antti Koivisto. CSS3 Media Queries are not serialized according to CSSOM https://bugs.webkit.org/show_bug.cgi?id=39220 MediaQuery serialization according to specification http://dev.w3.org/csswg/cssom/#serializing-media-queries. MediaQuery objects now ignore duplicated expressions. MediaQueryEvaluator::eval() now does not proccess MediaQuery objects that are known to be invalid. Test: fast/media/media-query-serialization.html * css/MediaQuery.cpp: (WebCore::stringCompare): (WebCore::MediaQuery::serialize): (WebCore::MediaQuery::MediaQuery): (WebCore::MediaQuery::~MediaQuery): (WebCore::MediaQuery::operator==): (WebCore::MediaQuery::cssText): (WebCore::MediaQuery::append): * css/MediaQuery.h: (WebCore::MediaQuery::ignored): (WebCore::MediaQuery::begin): (WebCore::MediaQuery::end): * css/MediaQueryExp.cpp: (WebCore::MediaQueryExp::serialize): * css/MediaQueryExp.h: * css/MediaQueryEvaluator.cpp: (WebCore::MediaQueryEvaluator::eval): 2010-06-10 Jeremy Orlow Reviewed by Steve Block. Implement more of IndexedDB's Indexes and ObjectStores https://bugs.webkit.org/show_bug.cgi?id=40424 Clean up both of these classes a bit and add create/open/remove methods as needed. Tests in a future patch (promise). * storage/IDBDatabase.h: * storage/IDBDatabaseImpl.cpp: (WebCore::IDBDatabaseImpl::objectStores): (WebCore::IDBDatabaseImpl::createObjectStore): (WebCore::IDBDatabaseImpl::objectStore): (WebCore::IDBDatabaseImpl::removeObjectStore): * storage/IDBDatabaseImpl.h: (WebCore::IDBDatabaseImpl::name): (WebCore::IDBDatabaseImpl::description): (WebCore::IDBDatabaseImpl::version): * storage/IDBDatabaseRequest.cpp: (WebCore::IDBDatabaseRequest::IDBDatabaseRequest): (WebCore::IDBDatabaseRequest::createObjectStore): (WebCore::IDBDatabaseRequest::objectStore): (WebCore::IDBDatabaseRequest::removeObjectStore): * storage/IDBDatabaseRequest.h: (WebCore::IDBDatabaseRequest::create): (WebCore::IDBDatabaseRequest::name): (WebCore::IDBDatabaseRequest::description): (WebCore::IDBDatabaseRequest::version): (WebCore::IDBDatabaseRequest::objectStores): * storage/IDBDatabaseRequest.idl: * storage/IDBObjectStore.h: * storage/IDBObjectStoreImpl.h: * storage/IDBObjectStoreRequest.cpp: (WebCore::IDBObjectStoreRequest::get): (WebCore::IDBObjectStoreRequest::add): (WebCore::IDBObjectStoreRequest::modify): (WebCore::IDBObjectStoreRequest::addOrModify): (WebCore::IDBObjectStoreRequest::remove): (WebCore::IDBObjectStoreRequest::createIndex): (WebCore::IDBObjectStoreRequest::index): (WebCore::IDBObjectStoreRequest::removeIndex): * storage/IDBObjectStoreRequest.h: * storage/IDBObjectStoreRequest.idl: 2010-06-11 Alexander Pavlov Reviewed by Pavel Feldman. Web Inspector: Enable serialization/deserialization of the frontend state https://bugs.webkit.org/show_bug.cgi?id=40228 * inspector/InspectorBackend.cpp: (WebCore::InspectorBackend::saveApplicationSettings): (WebCore::InspectorBackend::saveSessionSettings): * inspector/InspectorBackend.h: * inspector/InspectorBackend.idl: * inspector/InspectorController.cpp: (WebCore::InspectorController::InspectorController): (WebCore::InspectorController::setSessionSettings): (WebCore::InspectorController::populateScriptObjects): (WebCore::InspectorController::didCommitLoad): * inspector/InspectorController.h: * inspector/InspectorFrontend.cpp: (WebCore::InspectorFrontend::populateApplicationSettings): (WebCore::InspectorFrontend::populateSessionSettings): * inspector/InspectorFrontend.h: * inspector/front-end/ConsoleView.js: (WebInspector.ConsoleView.prototype._settingsLoaded): (WebInspector.ConsoleView.prototype._enterKeyPressed.printResult): (WebInspector.ConsoleView.prototype._enterKeyPressed): * inspector/front-end/EventListenersSidebarPane.js: (WebInspector.EventListenersSidebarPane.prototype._settingsLoaded): (WebInspector.EventListenersSidebarPane.prototype): (): * inspector/front-end/InspectorBackendStub.js: (.WebInspector.InspectorBackendStub.prototype.saveApplicationSettings): (.WebInspector.InspectorBackendStub.prototype.saveSessionSettings): * inspector/front-end/ResourceView.js: (WebInspector.ResourceView.prototype._selectTab): (WebInspector.ResourceView.prototype._selectHeadersTab): (WebInspector.ResourceView.prototype.selectContentTab): * inspector/front-end/ResourcesPanel.js: (WebInspector.ResourcesPanel.prototype._createStatusbarButtons): (WebInspector.ResourcesPanel.prototype._settingsLoaded): (WebInspector.ResourcesPanel.prototype._toggleLargerResources): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype._showScriptOrResource): (WebInspector.ScriptsPanel.prototype._addScriptToFilesMenu): * inspector/front-end/Settings.js: (WebInspector.populateApplicationSettings): (WebInspector.populateSessionSettings): (WebInspector.Settings): (WebInspector.Settings.prototype.reset): (WebInspector.Settings.prototype._load): (WebInspector.Settings.prototype._set): * inspector/front-end/StylesSidebarPane.js: (WebInspector.StylesSidebarPane.prototype._settingsLoaded): (WebInspector.StylesSidebarPane.prototype.update): (WebInspector.StylesSidebarPane.prototype._changeSetting): (WebInspector.StylesSidebarPane.prototype._changeColorFormat): (WebInspector.ComputedStyleSidebarPane.settingsLoaded): (WebInspector.ComputedStyleSidebarPane.showInheritedToggleFunction): (WebInspector.ComputedStyleSidebarPane): * inspector/front-end/WatchExpressionsSidebarPane.js: (WebInspector.WatchExpressionsSidebarPane): (WebInspector.WatchExpressionsSidebarPane.prototype._settingsLoaded): (WebInspector.WatchExpressionsSection): (WebInspector.WatchExpressionsSection.prototype.saveExpressions): * inspector/front-end/inspector.js: (WebInspector.loaded): (WebInspector.reset): 2010-06-10 Pavel Feldman Reviewed by Yury Semikhatsky. Web Inspector: Port performSearch from InjectedScript to InspectorDOMAgent. https://bugs.webkit.org/show_bug.cgi?id=40422 * inspector/InjectedScriptHost.cpp: (WebCore::InjectedScriptHost::addNodesToSearchResult): * inspector/InspectorBackend.cpp: (WebCore::InspectorBackend::performSearch): (WebCore::InspectorBackend::searchCanceled): * inspector/InspectorBackend.h: * inspector/InspectorBackend.idl: * inspector/InspectorDOMAgent.cpp: (WebCore::): (WebCore::InspectorDOMAgent::InspectorDOMAgent): (WebCore::InspectorDOMAgent::~InspectorDOMAgent): (WebCore::InspectorDOMAgent::performSearch): (WebCore::InspectorDOMAgent::searchCanceled): (WebCore::InspectorDOMAgent::onMatchJobsTimer): (WebCore::InspectorDOMAgent::reportNodesAsSearchResults): * inspector/InspectorDOMAgent.h: (WebCore::MatchJob::~MatchJob): (WebCore::MatchJob::MatchJob): (WebCore::MatchJob::addNodesToResults): * inspector/InspectorFrontend.cpp: (WebCore::InspectorFrontend::addNodesToSearchResult): * inspector/InspectorFrontend.h: * inspector/InspectorResource.cpp: (WebCore::InspectorResource::updateScriptObject): * inspector/front-end/ElementsPanel.js: (WebInspector.ElementsPanel.prototype.searchCanceled): (WebInspector.ElementsPanel.prototype.performSearch): (WebInspector.ElementsPanel.prototype.addNodesToSearchResult): * inspector/front-end/InjectedScript.js: (injectedScriptConstructor): * inspector/front-end/InjectedScriptAccess.js: 2010-06-11 Mikhail Naganov Reviewed by Pavel Feldman. [Chromium] Restore 'console.profiles' access. https://bugs.webkit.org/show_bug.cgi?id=39840 * bindings/v8/ScriptProfiler.cpp: (WebCore::ScriptProfiler::stop): * bindings/v8/custom/V8ConsoleCustom.cpp: (WebCore::V8Console::profilesAccessorGetter): * inspector/InspectorController.cpp: (WebCore::InspectorController::stopUserInitiatedProfiling): 2010-06-10 Nikita Vasilyev Reviewed by Pavel Feldman. Web Inspector: Make a close brace in Styles pane selectable. https://bugs.webkit.org/show_bug.cgi?id=40157 * inspector/front-end/inspector.css: (.styles-selector): (.styles-section .properties li): (.styles-section): 2010-06-11 Yury Semikhatsky Reviewed by Pavel Feldman. Web Inspector: localize missing script source message https://bugs.webkit.org/show_bug.cgi?id=40467 * English.lproj/localizedStrings.js: * inspector/InspectorController.cpp: (WebCore::InspectorController::didParseSource): fixed typo in comment. 2010-06-11 Zhenyao Mo Reviewed by Dimitri Glazkov. Vertex attributes enabled as arrays but not bound to buffers must generate INVALID_OPERATION https://bugs.webkit.org/show_bug.cgi?id=40315 * html/canvas/WebGLRenderingContext.cpp: (WebCore::WebGLRenderingContext::validateRenderingState): Check if an enabled vertext attribs is bound to a buffer. (WebCore::WebGLRenderingContext::vertexAttribPointer): Set bound buffer in vertex attrib state. * html/canvas/WebGLRenderingContext.h: Add a member in vertex attrib state to track bound buffer. 2010-05-31 Jocelyn Turcotte Reviewed by Simon Hausmann. [Qt] Implement the simple text code path. https://bugs.webkit.org/show_bug.cgi?id=40077 Remove the FONT_FAST_PATH macro and use the Qt's fast text implementation instead of the one of WebKit. The Qt::TextBypassShaping flag is used to tell Qt to only use the glyph advances. Qt 4.7 is needed to get this flag thus the complex path is always used if QtWebKit is compiled against an earlier version. Contrary to the WebKit's implementation, the complex code path is taken if the text is RightToLeft, justified or is formatted with non-zero letter or word spacing. * platform/graphics/Font.cpp: (WebCore::Font::drawText): (WebCore::Font::floatWidth): (WebCore::Font::selectionRectForText): (WebCore::Font::offsetForPosition): * platform/graphics/Font.h: (WebCore::Font::isRoundingHackCharacter): * platform/graphics/qt/FontQt.cpp: (WebCore::fromRawDataWithoutRef): (WebCore::needComplexCodePath): (WebCore::setupPlatformContext): (WebCore::Font::canReturnFallbackFontsForComplexText): (WebCore::Font::drawSimpleText): (WebCore::Font::drawComplexText): (WebCore::Font::floatWidthForSimpleText): (WebCore::Font::offsetForPositionForSimpleText): (WebCore::Font::selectionRectForSimpleText): 2010-06-03 Jocelyn Turcotte Reviewed by Simon Hausmann. Move the text code path detection code from FontFastPath.cpp to Font.cpp. https://bugs.webkit.org/show_bug.cgi?id=40077 This is a patch preliminary to the implementation of the simple font code path for the Qt port. * platform/graphics/Font.cpp: (WebCore::Font::setCodePath): (WebCore::Font::codePath): * platform/graphics/Font.h: * platform/graphics/FontFastPath.cpp: 2010-06-11 Sterling Swigart Reviewed by Dmitry Titov. Added AsyncImageResizer and ImageResizerThread classes, which after further patches will be capable of resizing images. https://bugs.webkit.org/show_bug.cgi?id=40018 * Android.mk: * CMakeLists.txt: * GNUmakefile.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * html/AsyncImageResizer.cpp: Added. (WebCore::AsyncImageResizer::create): (WebCore::AsyncImageResizer::AsyncImageResizer): (WebCore::AsyncImageResizer::~AsyncImageResizer): (WebCore::AsyncImageResizer::notifyFinished): * html/AsyncImageResizer.h: Added. (WebCore::AsyncImageResizer::CallbackInfo::CallbackInfo): (WebCore::AsyncImageResizer::): (WebCore::AsyncImageResizer::resizeComplete): (WebCore::AsyncImageResizer::resizeError): * html/ImageResizerThread.cpp: Added. (WebCore::returnBlobOrError): (WebCore::ImageResizerThread::start): (WebCore::ImageResizerThread::ImageResizerThread): (WebCore::ImageResizerThread::~ImageResizerThread): (WebCore::ImageResizerThread::imageResizerThreadStart): (WebCore::ImageResizerThread::imageResizerThread): * html/ImageResizerThread.h: Added. 2010-06-11 Steve Block Reviewed by Alexey Proskuryakov. Client-based Geolocation does not handle multiple simultaneous requests https://bugs.webkit.org/show_bug.cgi?id=40148 Test: fast/dom/Geolocation/multiple-requests.html The Geolocation must handle multiple calls to addObserver() from the same Geolocation object. * page/GeolocationController.cpp: (WebCore::GeolocationController::addObserver): 2010-06-11 Nikita Vasilyev Reviewed by Pavel Feldman. Web Inspector: When completing using a tab key, select very first value, not a second. https://bugs.webkit.org/show_bug.cgi?id=40409 * inspector/front-end/TextPrompt.js: (WebInspector.TextPrompt.prototype._completionsReady): 2010-06-10 Yuzo Fujishima Reviewed by Shinichiro Hamaji. Fix Bug 40452: REGRESSION: printing is broken if stylesheet has @page https://bugs.webkit.org/show_bug.cgi?id=40452 Test: printing/page-rule-in-media-query.html * css/CSSStyleSelector.cpp: (WebCore::CSSRuleSet::addRulesFromSheet): (WebCore::CSSRuleSet::addStyleRule): 2010-06-10 Sheriff Bot Unreviewed, rolling out r60989. http://trac.webkit.org/changeset/60989 https://bugs.webkit.org/show_bug.cgi?id=40462 It makes things crash (Requested by abarth on #webkit). * dom/Tokenizer.h: (WebCore::Tokenizer::isHTMLTokenizer): * html/HTML5Tokenizer.cpp: * html/HTML5Tokenizer.h: * html/HTML5TreeBuilder.h: * html/HTMLFormControlElement.cpp: (WebCore::HTMLFormControlElement::removedFromTree): * html/HTMLTokenizer.h: (WebCore::HTMLTokenizer::isHTMLTokenizer): (WebCore::HTMLTokenizer::htmlParser): 2010-06-10 Tony Gentilcore Reviewed by Eric Seidel. Fix fast/forms/preserveFormDuringResidualStyle.html for HTML5 Parser. https://bugs.webkit.org/show_bug.cgi?id=40454 This required exposing the HTMLParser which we definitely don't want to do, but the good news is that it can go away when the HTMLParser goes away. No new tests because covered by fast/forms/preserve/FormDuringResidualStyle.html. * dom/Tokenizer.h: (WebCore::Tokenizer::htmlParser): * html/HTML5Tokenizer.cpp: (WebCore::HTML5Tokenizer::htmlParser): * html/HTML5Tokenizer.h: * html/HTML5TreeBuilder.h: (WebCore::HTML5TreeBuilder::htmlParser): * html/HTMLFormControlElement.cpp: (WebCore::HTMLFormControlElement::removedFromTree): * html/HTMLTokenizer.h: (WebCore::HTMLTokenizer::htmlParser): 2010-06-10 Tony Chang Reviewed by Kent Tamura. crash when focus is changed while trying to focus next element https://bugs.webkit.org/show_bug.cgi?id=40407 Test: fast/events/focus-change-crash.html * dom/Element.cpp: (WebCore::Element::focus): 2010-06-10 Sheriff Bot Unreviewed, rolling out r60979. http://trac.webkit.org/changeset/60979 https://bugs.webkit.org/show_bug.cgi?id=40450 Broke build on Leopard (Requested by kbr_google on #webkit). * bindings/js/JSWebGLRenderingContextCustom.cpp: (WebCore::JSWebGLRenderingContext::bufferData): (WebCore::JSWebGLRenderingContext::bufferSubData): (WebCore::JSWebGLRenderingContext::texImage2D): (WebCore::JSWebGLRenderingContext::texSubImage2D): * bindings/scripts/CodeGeneratorJS.pm: * html/HTMLCanvasElement.idl: * html/HTMLImageElement.idl: * html/HTMLVideoElement.idl: * html/canvas/WebGLRenderingContext.idl: 2010-06-10 Kenneth Russell Reviewed by Dimitri Glazkov. Delete custom JSC bindings for bufferData, texImage2D and texSubImage2D https://bugs.webkit.org/show_bug.cgi?id=40443 Deleted custom JSC bindings for bufferData, texImage2D and texSubImage2D and fixed minor associated issues in code generator and IDL. Updated fast/canvas/webgl/texImageTest-expected.txt, which now runs as intended. Ran all layout tests, including WebGL tests, in Safari. * bindings/js/JSWebGLRenderingContextCustom.cpp: - Deleted custom bindings. * bindings/scripts/CodeGeneratorJS.pm: - Made overload helper functions static to fix compiler warnings. - Added needed isObject check for overloads between object and non-object arguments. * html/HTMLCanvasElement.idl: * html/HTMLImageElement.idl: * html/HTMLVideoElement.idl: - Added GenerateNativeConverter extended attribute. * html/canvas/WebGLRenderingContext.idl: - Deleted #ifdefs for custom JSC bindings. 2010-06-10 David Hyatt Reviewed by John Sullivan. https://bugs.webkit.org/show_bug.cgi?id=40441, back out the original fix for 29601, since it has broken continuous wheel delta values. * platform/mac/WebCoreSystemInterface.h: * platform/mac/WebCoreSystemInterface.mm: * platform/mac/WheelEventMac.mm: (WebCore::PlatformWheelEvent::PlatformWheelEvent): 2010-06-10 Abhishek Arya Reviewed by Dimitri Glazkov. Add null pointer checks for nativeImageForCurrentFrame function calls. https://bugs.webkit.org/show_bug.cgi?id=39797 * platform/chromium/PasteboardChromium.cpp: (WebCore::Pasteboard::writeImage): * platform/graphics/qt/GraphicsContext3DQt.cpp: (WebCore::GraphicsContext3D::getImageData): * platform/qt/PasteboardQt.cpp: (WebCore::Pasteboard::writeImage): 2010-06-09 Kenneth Russell Reviewed by Dimitri Glazkov. Implement TypedArray BYTES_PER_ELEMENT https://bugs.webkit.org/show_bug.cgi?id=39100 Implemented BYTES_PER_ELEMENT on all ArrayBufferView subclasses. Required bug fixes to JSC bindings' custom constructors. Updated fast/canvas/webgl/array-unit-tests.html to verify. Ran all WebGL layout tests in Safari and Chromium. * bindings/js/JSFloat32ArrayConstructor.cpp: (WebCore::JSFloat32ArrayConstructor::JSFloat32ArrayConstructor): (WebCore::JSFloat32ArrayConstructor::getOwnPropertySlot): (WebCore::JSFloat32ArrayConstructor::getOwnPropertyDescriptor): * bindings/js/JSFloat32ArrayConstructor.h: (WebCore::JSFloat32ArrayConstructor::createStructure): * bindings/js/JSInt16ArrayConstructor.cpp: (WebCore::JSInt16ArrayConstructor::JSInt16ArrayConstructor): (WebCore::JSInt16ArrayConstructor::getOwnPropertySlot): (WebCore::JSInt16ArrayConstructor::getOwnPropertyDescriptor): * bindings/js/JSInt16ArrayConstructor.h: (WebCore::JSInt16ArrayConstructor::createStructure): * bindings/js/JSInt32ArrayConstructor.cpp: (WebCore::JSInt32ArrayConstructor::JSInt32ArrayConstructor): (WebCore::JSInt32ArrayConstructor::getOwnPropertySlot): (WebCore::JSInt32ArrayConstructor::getOwnPropertyDescriptor): * bindings/js/JSInt32ArrayConstructor.h: (WebCore::JSInt32ArrayConstructor::createStructure): * bindings/js/JSInt8ArrayConstructor.cpp: (WebCore::JSInt8ArrayConstructor::JSInt8ArrayConstructor): (WebCore::JSInt8ArrayConstructor::getOwnPropertySlot): (WebCore::JSInt8ArrayConstructor::getOwnPropertyDescriptor): * bindings/js/JSInt8ArrayConstructor.h: (WebCore::JSInt8ArrayConstructor::createStructure): * bindings/js/JSUint16ArrayConstructor.cpp: (WebCore::JSUint16ArrayConstructor::JSUint16ArrayConstructor): (WebCore::JSUint16ArrayConstructor::getOwnPropertySlot): (WebCore::JSUint16ArrayConstructor::getOwnPropertyDescriptor): * bindings/js/JSUint16ArrayConstructor.h: (WebCore::JSUint16ArrayConstructor::createStructure): * bindings/js/JSUint32ArrayConstructor.cpp: (WebCore::JSUint32ArrayConstructor::JSUint32ArrayConstructor): (WebCore::JSUint32ArrayConstructor::getOwnPropertySlot): (WebCore::JSUint32ArrayConstructor::getOwnPropertyDescriptor): * bindings/js/JSUint32ArrayConstructor.h: (WebCore::JSUint32ArrayConstructor::createStructure): * bindings/js/JSUint8ArrayConstructor.cpp: (WebCore::JSUint8ArrayConstructor::JSUint8ArrayConstructor): (WebCore::JSUint8ArrayConstructor::getOwnPropertySlot): (WebCore::JSUint8ArrayConstructor::getOwnPropertyDescriptor): * bindings/js/JSUint8ArrayConstructor.h: (WebCore::JSUint8ArrayConstructor::createStructure): * html/canvas/Float32Array.idl: * html/canvas/Int16Array.idl: * html/canvas/Int32Array.idl: * html/canvas/Int8Array.idl: * html/canvas/Uint16Array.idl: * html/canvas/Uint32Array.idl: * html/canvas/Uint8Array.idl: 2010-06-10 Eric Seidel Reviewed by Adam Barth. HTML5 Parser should continue parsing after script execution https://bugs.webkit.org/show_bug.cgi?id=40416 The previous code was just wrong. We were always blocking the parser after any script execution. Now we correctly continue parsing after a successful script execution and only block the parser when we weren't able to execute the script immediately. Added a new haveParsingBlockingScript() function to HTML5ScriptRunner to make some of the code more self-documenting. Test: fast/tokenizer/write-multiple-scripts.html fast/js/implicit-call-with-global-reentry.html * html/HTML5ScriptRunner.cpp: (WebCore::HTML5ScriptRunner::execute): - Remove some old (now bogus) FIXMEs and notImplemented() calls. - Fix the logic to match the HTML5 spec by continuing parsing after script execution and only blocking the parser when the script wasn't able to immediately run. (WebCore::HTML5ScriptRunner::haveParsingBlockingScript): - New function to make some of the code read better. (WebCore::HTML5ScriptRunner::executeParsingBlockingScripts): - Use haveParsingBlockingScript(). (WebCore::HTML5ScriptRunner::executeScriptsWaitingForLoad): - Use haveParsingBlockingScript(). (WebCore::HTML5ScriptRunner::runScript): - Use haveParsingBlockingScript(). * html/HTML5ScriptRunner.h: 2010-06-10 Yury Semikhatsky Reviewed by Pavel Feldman. Web Inspector: to reduce the front end start up time don't push script sources to frontend if debugger is always enabled, instead request script content lazily at the moment it should be displyed. It is critical for always enabled debugger because in that case lots of script may have already been parsed when the front end is opening and pushing all of them at once may slow things down(even though the script sources will never be used if scripts panel isn't open). https://bugs.webkit.org/show_bug.cgi?id=40364 * inspector/InspectorBackend.cpp: (WebCore::InspectorBackend::getScriptSource): * inspector/InspectorBackend.h: * inspector/InspectorBackend.idl: * inspector/InspectorController.cpp: (WebCore::InspectorController::didCommitLoad): (WebCore::InspectorController::getScriptSource): (WebCore::InspectorController::didParseSource): * inspector/InspectorController.h: * inspector/InspectorFrontend.cpp: (WebCore::InspectorFrontend::didGetScriptSource): * inspector/InspectorFrontend.h: * inspector/front-end/InspectorBackendStub.js: (.WebInspector.InspectorBackendStub.prototype.editScriptSource): (.WebInspector.InspectorBackendStub.prototype.getScriptSource): * inspector/front-end/ScriptView.js: (WebInspector.ScriptView.prototype.setupSourceFrameIfNeeded): (WebInspector.ScriptView.prototype._didGetScriptSource): (WebInspector.ScriptView.prototype._sourceFrameSetupFinished): 2010-06-10 Adam Barth Reviewed by Eric Seidel. Use allowRequestIfNoIllegalURICharacters instead of context for XSSAuditor::canLoadExternalScriptFromSrc https://bugs.webkit.org/show_bug.cgi?id=40404 We originally added the context parameter to canLoadExternalScriptFromSrc to work around some false positives caused by folks checking external script URLs on the server. Our thought was that we could tell these were not real XSS attacks because the surrounding context wouldn't match in the URL and the document. Implementing this feature in the HTML5 parser is hard because it pierces a layer of abstraction (the token abstraction of the input stream). We could hack this into the new parser, but instead I think it's better to switch to using the allowRequestIfNoIllegalURICharacters heuristic. We designed the allowRequestIfNoIllegalURICharacters after the context heuristic to deal with other cases where the server was validating input before echoing it. However, we never tried applying it to canLoadExternalScriptFromSrc. It's possible that this will cause false positives and will need to be reverted, which is why I've left in some of the infrustructure for computing context. We don't have a good way to know if that will happen except to try. We do know, however, that this heuristic will work for the original false positives we saw. * html/HTML5Tokenizer.cpp: (WebCore::HTML5Tokenizer::shouldLoadExternalScriptFromSrc): * html/HTMLTokenizer.cpp: (WebCore::HTMLTokenizer::parseTag): * page/XSSAuditor.cpp: (WebCore::XSSAuditor::canLoadExternalScriptFromSrc): * page/XSSAuditor.h: 2010-06-10 Kwang Yul Seo Reviewed by Kent Tamura. Add ENABLE(DATABASE) guard for DatabaseAuthorizer.cpp https://bugs.webkit.org/show_bug.cgi?id=40399 Build fix for ENABLE(DATABASE)=0. * storage/DatabaseAuthorizer.cpp: 2010-06-10 Shu Chang Reviewed by Kenneth Rohde Christiansen. Change the type of ShadowBlur from int to float in GraphicsContext. Using int for ShadowBlur loses precision and fails the test. Note: This code change fixes Qt port but Mac is still failing due to platform issue. Function CGContextSetShadowWithColor() does not take a blur value less than 0.5. https://bugs.webkit.org/show_bug.cgi?id=40370 * platform/graphics/GraphicsContext.cpp: (WebCore::GraphicsContext::setShadow): (WebCore::GraphicsContext::getShadow): * platform/graphics/GraphicsContext.h: * platform/graphics/GraphicsContextPrivate.h: * platform/graphics/cairo/FontCairo.cpp: (WebCore::Font::drawGlyphs): * platform/graphics/cairo/GraphicsContextCairo.cpp: (WebCore::GraphicsContext::calculateShadowBufferDimensions): (WebCore::drawPathShadow): (WebCore::drawBorderlessRectShadow): (WebCore::GraphicsContext::setPlatformShadow): * platform/graphics/cairo/ImageCairo.cpp: (WebCore::BitmapImage::draw): * platform/graphics/cg/GraphicsContextCG.cpp: (WebCore::GraphicsContext::setPlatformShadow): * platform/graphics/chromium/FontChromiumWin.cpp: (WebCore::TransparencyAwareFontPainter::TransparencyAwareGlyphPainter::drawGlyphs): (WebCore::Font::drawComplexText): * platform/graphics/gtk/FontGtk.cpp: (WebCore::Font::drawComplexText): * platform/graphics/haiku/GraphicsContextHaiku.cpp: (WebCore::GraphicsContext::setPlatformShadow): * platform/graphics/mac/FontMac.mm: (WebCore::Font::drawGlyphs): * platform/graphics/openvg/GraphicsContextOpenVG.cpp: (WebCore::GraphicsContext::setPlatformShadow): * platform/graphics/qt/FontQt.cpp: (WebCore::Font::drawComplexText): * platform/graphics/qt/GraphicsContextQt.cpp: (WebCore::GraphicsContext::drawRect): (WebCore::GraphicsContext::drawLine): (WebCore::GraphicsContext::strokeArc): (WebCore::GraphicsContext::drawConvexPolygon): (WebCore::drawFilledShadowPath): (WebCore::GraphicsContext::strokePath): (WebCore::drawBorderlessRectShadow): (WebCore::GraphicsContext::setPlatformShadow): * platform/graphics/qt/ImageQt.cpp: (WebCore::BitmapImage::draw): * platform/graphics/skia/GraphicsContextSkia.cpp: (WebCore::GraphicsContext::setPlatformShadow): * platform/graphics/skia/SkiaFontWin.cpp: (WebCore::windowsCanHandleDrawTextShadow): * platform/graphics/win/FontCGWin.cpp: (WebCore::drawGDIGlyphs): (WebCore::Font::drawGlyphs): * platform/graphics/wince/GraphicsContextWince.cpp: (WebCore::GraphicsContext::fillRoundedRect): (WebCore::GraphicsContext::setPlatformShadow): (WebCore::GraphicsContext::drawText): * platform/graphics/wx/GraphicsContextWx.cpp: (WebCore::GraphicsContext::setPlatformShadow): 2010-06-10 Yael Aharon Reviewed by Kenneth Rohde Christiansen. Support for loading notification icons https://bugs.webkit.org/show_bug.cgi?id=40396 Make notification objects download the icon needed for displaying the notification before calling the NotificationPresenter to display the notification. An error during the download would cause the notification to be displayed without an icon. If a notification is in the process of download, and a new notification is created with the same ReplaceId, the download is not cancelled immediately and the notification is removed only after the download is complete. Tests: http/tests/notifications/icon-does-not-exist.html http/tests/notifications/icon-exists-cancel.html http/tests/notifications/icon-exists-show-alert-during-load.html http/tests/notifications/icon-exists.html http/tests/notifications/icon-requires-auth.html * notifications/Notification.cpp: (WebCore::Notification::Notification): (WebCore::Notification::~Notification): (WebCore::Notification::show): (WebCore::Notification::cancel): (WebCore::Notification::startLoading): (WebCore::Notification::stopLoading): (WebCore::Notification::didReceiveResponse): (WebCore::Notification::didReceiveData): (WebCore::Notification::didFinishLoading): (WebCore::Notification::didFail): (WebCore::Notification::didFailRedirectCheck): (WebCore::Notification::didReceiveAuthenticationCancellation): (WebCore::Notification::finishLoading): * notifications/Notification.h: (WebCore::Notification::iconData): (WebCore::Notification::releaseIconData): (WebCore::Notification::): 2010-06-10 Raine Makelainen Reviewed by Kenneth Rohde Christiansen. Impossible to set input method hints based HTML5 input types https://bugs.webkit.org/show_bug.cgi?id=40107 Helper methods for checking "tel", "number", "email", and "url" input element types. * html/HTMLInputElement.h: (WebCore::HTMLInputElement::isTelephoneField): (WebCore::HTMLInputElement::isNumberField): (WebCore::HTMLInputElement::isEmailField): (WebCore::HTMLInputElement::isUrlField): 2010-06-10 Daniel Cheng Reviewed by Jian Li. Don't convert filenames to URLs in edit drags. https://bugs.webkit.org/show_bug.cgi?id=38826 For security reasons, we don't want to expose file system paths to web content, so we filter them out of edit drags. Test: editing/pasteboard/file-drag-to-editable.html * page/DragController.cpp: (WebCore::documentFragmentFromDragData): * platform/DragData.h: (WebCore::DragData::): * platform/android/DragDataAndroid.cpp: (WebCore::DragData::containsURL): (WebCore::DragData::asURL): * platform/chromium/DragDataChromium.cpp: (WebCore::DragData::containsURL): (WebCore::DragData::asURL): * platform/efl/DragDataEfl.cpp: (WebCore::DragData::containsURL): (WebCore::DragData::asURL): * platform/gtk/DragDataGtk.cpp: (WebCore::DragData::containsURL): (WebCore::DragData::asURL): * platform/haiku/DragDataHaiku.cpp: (WebCore::DragData::containsURL): (WebCore::DragData::asURL): * platform/mac/DragDataMac.mm: (WebCore::DragData::containsURL): (WebCore::DragData::asURL): * platform/qt/DragDataQt.cpp: (WebCore::DragData::asPlainText): (WebCore::DragData::containsURL): (WebCore::DragData::asURL): * platform/win/ClipboardUtilitiesWin.cpp: (WebCore::getURL): (WebCore::getPlainText): * platform/win/ClipboardUtilitiesWin.h: * platform/win/ClipboardWin.cpp: (WebCore::ClipboardWin::getData): * platform/win/DragDataWin.cpp: (WebCore::DragData::containsURL): (WebCore::DragData::asURL): * platform/wince/DragDataWince.cpp: (WebCore::DragData::containsURL): (WebCore::DragData::asURL): * platform/wx/DragDataWx.cpp: (WebCore::DragData::containsURL): (WebCore::DragData::asURL): 2010-06-10 Mike Belshe Reviewed by David Levin Track whether a resource is loaded via a proxy. https://bugs.webkit.org/show_bug.cgi?id=40312 * platform/network/chromium/ResourceResponse.h: (WebCore::ResourceResponse::wasFetchedViaProxy): (WebCore::ResourceResponse::setWasFetchedViaProxy): 2010-06-10 Jungshik Shin Reviewed by Kent Tamura Bug 38224 - [chromium] Enable rendering of Ethiopic, Lao, Tibetan and a few other scripts on Win XP https://bugs.webkit.org/show_bug.cgi?id=38224 Make it possible to specify a list of fonts for per-script fallback instead of a single font per script. This is necessary for Malayalam (for which Windows font doesn't support Unicode 5.x fully on Vista or earlier), Ethiopic (we want to support on XP with a 3rd party font because XP doesn't have any Ethiopic font out of the box) and some other scripts. This is a short-term 'fix' until we have per-script font preferences. No layout test is added because the test results would be dependent on which fonts are present. * platform/graphics/chromium/FontUtilsChromiumWin.cpp: (WebCore::): (WebCore::FontMap::ScriptToFontFamilies::): 2010-06-09 Andrei Popescu Reviewed by Adam Barth. CodeGeneratorJS.pm incorrectly increments $paramIndex when a method is declared with [CallWith] https://bugs.webkit.org/show_bug.cgi?id=40372 Use two variables to keep track of the number of arguments passed from JavaScript vs the number of arguments passed to the corresponding C++ method. These numbers can be different since the parameter declared via [CallWith] is generated in the bindings instead of being passed from JavaScript. Test: storage/indexeddb/idb-objectstore-request.html * bindings/scripts/CodeGeneratorJS.pm: * bindings/scripts/test/CPP/WebDOMTestObj.cpp: (WebDOMTestObj::withScriptExecutionContext): * bindings/scripts/test/CPP/WebDOMTestObj.h: * bindings/scripts/test/JS/JSTestObj.cpp: (WebCore::jsTestObjPrototypeFunctionWithDynamicFrameAndArg): (WebCore::jsTestObjPrototypeFunctionWithDynamicFrameAndOptionalArg): (WebCore::jsTestObjPrototypeFunctionWithDynamicFrameAndUserGesture): (WebCore::jsTestObjPrototypeFunctionWithDynamicFrameAndUserGestureASAD): 2010-06-09 MORITA Hajime Reviewed by Kent Tamura. Refactoring: Simple shadow elements should be factored out . https://bugs.webkit.org/show_bug.cgi?id=40400 Pulled ShadowElement class up from SliderThumbElement, ProgressValueElement, ShadowInputElement. And renamed ProgressValueElement to ShadowBlockElement. No new tests. Because there is no functional change. * CMakeLists.txt: * GNUmakefile.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * rendering/RenderFileUploadControl.cpp: * rendering/RenderProgress.cpp: (WebCore::RenderProgress::updateValuePartState): * rendering/RenderProgress.h: * rendering/RenderSlider.cpp: (WebCore::SliderThumbElement::SliderThumbElement): (WebCore::SliderThumbElement::defaultEventHandler): (WebCore::SliderThumbElement::detach): * rendering/ShadowElement.cpp: Added. (WebCore::ShadowBlockElement::create): (WebCore::ShadowBlockElement::ShadowBlockElement): (WebCore::ShadowInputElement::create): (WebCore::ShadowInputElement::ShadowInputElement): * rendering/ShadowElement.h: Added. (WebCore::ShadowElement::ShadowElement): (WebCore::ShadowElement::isShadowNode): (WebCore::ShadowElement::shadowParentNode): 2010-06-10 Eric Seidel Reviewed by Adam Barth. Reduce FrameView.h includes to speed up build times https://bugs.webkit.org/show_bug.cgi?id=40408 Another fix for Qt. * page/Frame.h: - Include CSSMutableStyleDeclaration.h since it's used by m_typingStyle = 0; 2010-06-10 Eric Seidel Reviewed by Adam Barth. Reduce FrameView.h includes to speed up build times https://bugs.webkit.org/show_bug.cgi?id=40408 More attempted build fixes for Tiger and Qt. * page/Frame.cpp: * page/Frame.h: 2010-06-10 Eric Seidel Reviewed by Adam Barth. Reduce FrameView.h includes to speed up build times https://bugs.webkit.org/show_bug.cgi?id=40408 Add a few more RenderLayer.h includes to fix non-mac builds. * page/FrameView.cpp: * rendering/RenderObject.cpp: * rendering/RenderTreeAsText.cpp: 2010-06-10 Eric Seidel Reviewed by Adam Barth. Reduce FrameView.h includes to speed up build times https://bugs.webkit.org/show_bug.cgi?id=40408 Cleaned up FrameView.h includes and then propagated the cascade of includes to the necessary .cpp files. This should reduce the set of files rebuilt every time FrameView.h changes, and should also reduce the size of some .o files. No functional changes, thus no tests. * accessibility/AccessibilityRenderObject.cpp: * dom/ContainerNode.cpp: * dom/Document.cpp: * dom/Element.cpp: * dom/EventTarget.h: * dom/Node.cpp: * editing/EditorCommand.cpp: * editing/SelectionController.cpp: * html/HTML5Tokenizer.cpp: (WebCore::HTML5Tokenizer::script): - No need for this to be inline. Being inline required Frame.h in the header, which causes huge include cascade. * html/HTML5Tokenizer.h: * page/DragController.cpp: * page/EventHandler.cpp: * page/Frame.h: * page/FrameView.h: * page/PrintContext.cpp: * page/SpatialNavigation.cpp: * rendering/RenderBlock.cpp: * rendering/RenderBlockLineLayout.cpp: * rendering/RenderImage.cpp: * rendering/RenderInline.cpp: * rendering/RenderObject.h: * rendering/RenderTextControlSingleLine.cpp: * rendering/RenderWidget.cpp: * rendering/SVGRenderSupport.cpp: 2010-06-10 Adam Barth Reviewed by Eric Seidel. Move HTML5 entity parser to its own file https://bugs.webkit.org/show_bug.cgi?id=40406 Moving this algorithm to its own file better encapsulates its dependencies and makes it callable from other parts of WebCore. * Android.mk: * CMakeLists.txt: * GNUmakefile.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * html/HTML5EntityParser.cpp: Copied from WebCore/html/HTML5Lexer.cpp. (WebCore::): (WebCore::consumeHTML5Entity): * html/HTML5EntityParser.h: Copied from WebCore/html/HTML5Lexer.h. * html/HTML5Lexer.cpp: (WebCore::HTML5Lexer::processEntity): (WebCore::HTML5Lexer::nextToken): * html/HTML5Lexer.h: 2010-06-09 Tony Gentilcore Reviewed by Adam Barth. HTML5 Parser: Fix fast/profiler tests that depend on event handler line numbers https://bugs.webkit.org/show_bug.cgi?id=40393 This emulated the old behavior in HTMLTokenizer:processToken() No new tests because covered by: - fast/profiler/dead-time.html - fast/profiler/inline-event-handler.html - fast/profiler/stop-profiling-after-setTimeout.html - fast/profiler/throw-exception-from-eval.html * html/HTML5Tokenizer.cpp: (WebCore::HTML5Tokenizer::pumpLexer): 2010-06-09 Alexey Proskuryakov Reviewed by Dan Bernstein. https://bugs.webkit.org/show_bug.cgi?id=9504 img tag rewritten by innerHTML doesn't use image map Test: fast/dom/replaced-image-map.html * html/HTMLMapElement.cpp: (WebCore::HTMLMapElement::~HTMLMapElement): Destructor is not a good place to make changes that affect page behavior, because destructors are called by garbage collector. Don't undregister the image map from here. (WebCore::HTMLMapElement::parseMappedAttribute): Only tell document about the map if it's actually in document. A map in a detached subtree isn't used by Firefox at least. (WebCore::HTMLMapElement::insertedIntoDocument): Register the map. (WebCore::HTMLMapElement::removedFromDocument): Unregister the map. * html/HTMLMapElement.h: Added insertedIntoDocument/removedFromDocument overrides. 2010-06-09 Roland Steiner Reviewed by Ojan Vafai. Bug 35632 - htmlediting.cpp : isEmptyTableCell() is incomplete https://bugs.webkit.org/show_bug.cgi?id=35632 Correct isEmptyTableCell to check for the presence of other renderer children. Test: editing/deleting/delete-br-in-last-table-cell.html * editing/htmlediting.cpp: (WebCore::isEmptyTableCell): 2010-06-09 Qi Zhang Reviewed by Laszlo Gombos. [Qt] Failed at http://philip.html5.org/tests/canvas/suite/tests/2d.path.arcTo.transformation.html https://bugs.webkit.org/show_bug.cgi?id=38598 In path transform function handle path only have moveElement case. * platform/graphics/qt/PathQt.cpp: (WebCore::Path::transform): 2010-06-09 Anton Muhin Reviewed by Nate Chapin. [v8] First phase of switching to new named property query API https://bugs.webkit.org/show_bug.cgi?id=40303 To allow better management of attributes of intercepted properties, we're starting to switch to new named property query API which now could return attributes instead of simple property present/absent flag. The next step would remove USE_NEW_QUERY_CALLBACK, then v8 would have them enabled by default. * bindings/scripts/CodeGeneratorV8.pm: * bindings/v8/NPV8Object.cpp: * bindings/v8/ScriptArray.cpp: * bindings/v8/ScriptCallStack.cpp: * bindings/v8/SerializedScriptValue.cpp: * bindings/v8/V8Binding.cpp: * bindings/v8/V8DOMWrapper.cpp: * bindings/v8/V8GCController.cpp: * bindings/v8/V8IsolatedContext.cpp: * bindings/v8/V8NPObject.cpp: (WebCore::npObjectQueryProperty): * bindings/v8/V8Proxy.cpp: * bindings/v8/custom/V8PopStateEventCustom.cpp: * bindings/v8/custom/V8StorageCustom.cpp: (WebCore::V8Storage::namedPropertyQuery): * config.h: 2010-06-09 Steve Block Reviewed by Jeremy Orlow. Need to include V8Proxy.h in V8 generated bindings for toV8Context() https://bugs.webkit.org/show_bug.cgi?id=40290 No new tests, build fix only. * bindings/scripts/CodeGeneratorV8.pm: 2010-06-09 Jarkko Sakkinen Reviewed by Kenneth Rohde Christiansen. WebGL rendering context does not activate unless accelerated compositing is enabled from settings. https://bugs.webkit.org/show_bug.cgi?id=37772 * html/HTMLCanvasElement.cpp: (WebCore::HTMLCanvasElement::getContext): 2010-06-09 Yong Li Reviewed by George Staikos. https://bugs.webkit.org/show_bug.cgi?id=40252 Make image down-sampling threshold runtime adjustable. No new test needed. * platform/graphics/ImageSource.cpp: (WebCore::ImageSource::setData): * platform/graphics/ImageSource.h: (WebCore::ImageSource::maxPixelsPerDecodedImage): (WebCore::ImageSource::setMaxPixelsPerDecodedImage): 2010-06-09 Adam Barth Reviewed by Eric Seidel. Fix handling of bytes received from the network while in document.write https://bugs.webkit.org/show_bug.cgi?id=40356 The old tokenizer has specially logic for handling the case of receiving bytes from the network while in a nested call to document.write. This patch implements similar logic for the HTML5 tokenizer. Also, this patch abstracts the tricky shuffling of SegmentedStrings behind a simple API. I'm not sure how to trigger this case. My guess is we can trigger it using a nested event loop, e.g., via alert(), but I'm not sure how to test that in a LayoutTest. There don't appear to be any LayoutTests that currently test this behavior despite it being present in the old tokenizer. * html/HTML5Tokenizer.cpp: (WebCore::HTML5Tokenizer::pumpLexer): (WebCore::HTML5Tokenizer::write): - Added a branch for the |append| argument. (WebCore::HTML5Tokenizer::end): (WebCore::HTML5Tokenizer::finish): (WebCore::HTML5Tokenizer::executeScript): - Switch over to using a RAII pattern for recording and restoring insertion points. * html/HTML5Tokenizer.h: (WebCore::HTML5Tokenizer::InputStream::InputStream): (WebCore::HTML5Tokenizer::InputStream::appendToEnd): (WebCore::HTML5Tokenizer::InputStream::insertAtCurrentInsertionPoint): (WebCore::HTML5Tokenizer::InputStream::close): - Putting the close() method on InputStream makes it much easier to handle EOF. We now just close the last buffer in the stream when the network says it's done. (WebCore::HTML5Tokenizer::InputStream::current): - This class could be moved to its own file, but it shouldn't be used outside of the tokenizer. (WebCore::HTML5Tokenizer::InsertionPointRecord::InsertionPointRecord): (WebCore::HTML5Tokenizer::InsertionPointRecord::~InsertionPointRecord): - A simple RAII class for managing saved insertion points. * platform/text/SegmentedString.cpp: (WebCore::SegmentedString::operator=): - Fix a related bug where m_closed was not being copied properly in the assignment operator. 2010-06-09 Tony Gentilcore Reviewed by Adam Barth. Fix fast/parser/hex-entities-length.html for HTML5 parser https://bugs.webkit.org/show_bug.cgi?id=40385 Stripping surrogate pair values appears to be a problem with the spec in "Preprocessing the input stream." Minefield doesn't appear to implement the part in question. So this patch removes that guard and adds a FIXME to track the issue. No new tests because covered by fast/parser/hex-entities-length.html * html/HTML5Lexer.h: (WebCore::HTML5Lexer::InputStreamPreprocessor::peek): 2010-06-09 Kenneth Russell Reviewed by Dimitri Glazkov. Update readPixels to take ArrayBufferView rather than returning it https://bugs.webkit.org/show_bug.cgi?id=40322 No new tests; covered by existing tests, which have been modified. * html/canvas/WebGLRenderingContext.cpp: (WebCore::WebGLRenderingContext::readPixels): * html/canvas/WebGLRenderingContext.h: * html/canvas/WebGLRenderingContext.idl: 2010-06-09 Enrico Ros Reviewed by Ariya Hidayat. Fix drawing zero-sized gradients on Canvas. https://bugs.webkit.org/show_bug.cgi?id=40340 HTML5 draft says that nothing must be painted if the gradient start point equals the stop point. This commit fixes the following canvas test: http://philip.html5.org/tests/canvas/suite/tests/2d.gradient.interpolate.zerosize.html * html/canvas/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::fillRect): skip zero-sized linear gradients * platform/graphics/Gradient.h: (WebCore::Gradient::isRadial): made public (WebCore::Gradient::isZeroSize): true if start == stop 2010-06-09 Leandro Pereira Reviewed by Adam Treat. [EFL] Allow building core libraries as shared objects to speed up linking time on machines with small amounts of memory. http://webkit.org/b/39899 * CMakeLists.txt: If building with shared core, install the lib. Remove npapi.cpp (causes conflicts when linking dynamically). * CMakeListsEfl.txt: EFL libraries are needed to link dynamically. 2010-06-09 Mark Rowe Reviewed by Adele Peterson. REGRESSION (r51629): WebBackForwardList created via -init crashes when -addItem: is called. A WebBackForwardList created via -init results in a BackForwardList being created with a null m_page. BackForwardList needs to be careful not to dereference m_page without first ensuring it's not null. * history/BackForwardList.cpp: (WebCore::BackForwardList::addItem): Null-check m_page. (WebCore::BackForwardList::goBack): Ditto. (WebCore::BackForwardList::goForward): Ditto. (WebCore::BackForwardList::goToItem): Ditto. (WebCore::BackForwardList::setCapacity): Ditto. 2010-06-09 Kwang Yul Seo Reviewed by Kent Tamura. [BREWMP] Add dummy Context Menu implementation https://bugs.webkit.org/show_bug.cgi?id=40223 Brew MP does not use Context Menu. Add dummy implementation. * platform/brew/ContextMenuBrew.cpp: Added. (WebCore::ContextMenu::ContextMenu): (WebCore::ContextMenu::~ContextMenu): (WebCore::ContextMenu::itemCount): (WebCore::ContextMenu::insertItem): (WebCore::ContextMenu::appendItem): (WebCore::ContextMenu::itemWithAction): (WebCore::ContextMenu::itemAtIndex): (WebCore::ContextMenu::setPlatformDescription): (WebCore::ContextMenu::platformDescription): (WebCore::ContextMenu::releasePlatformDescription): * platform/brew/ContextMenuItemBrew.cpp: Added. (WebCore::ContextMenuItem::ContextMenuItem): (WebCore::ContextMenuItem::~ContextMenuItem): (WebCore::ContextMenuItem::releasePlatformDescription): (WebCore::ContextMenuItem::type): (WebCore::ContextMenuItem::action): (WebCore::ContextMenuItem::title): (WebCore::ContextMenuItem::platformSubMenu): (WebCore::ContextMenuItem::setType): (WebCore::ContextMenuItem::setAction): (WebCore::ContextMenuItem::setTitle): (WebCore::ContextMenuItem::setSubMenu): (WebCore::ContextMenuItem::setChecked): (WebCore::ContextMenuItem::setEnabled): (WebCore::ContextMenuItem::enabled): 2010-06-09 Kwang Yul Seo Reviewed by Kent Tamura. [BREWMP] Port Clipboard https://bugs.webkit.org/show_bug.cgi?id=35734 Add dummy Clipboard. * platform/brew/ClipboardBrew.cpp: Added. (WebCore::ClipboardBrew::ClipboardBrew): (WebCore::ClipboardBrew::~ClipboardBrew): (WebCore::ClipboardBrew::clearData): (WebCore::ClipboardBrew::clearAllData): (WebCore::ClipboardBrew::getData): (WebCore::ClipboardBrew::setData): (WebCore::ClipboardBrew::types): (WebCore::ClipboardBrew::files): (WebCore::ClipboardBrew::setDragImage): (WebCore::ClipboardBrew::setDragImageElement): (WebCore::ClipboardBrew::createDragImage): (WebCore::ClipboardBrew::declareAndWriteDragImage): (WebCore::ClipboardBrew::writeURL): (WebCore::ClipboardBrew::writeRange): (WebCore::ClipboardBrew::writePlainText): (WebCore::ClipboardBrew::hasData): * platform/brew/ClipboardBrew.h: Added. 2010-06-09 Anders Bakken Reviewed by David Levin. [Qt] ClipboardQt.cpp has coding-style errors https://bugs.webkit.org/show_bug.cgi?id=39781 * platform/qt/ClipboardQt.cpp: (WebCore::ClipboardQt::declareAndWriteDragImage): 2010-06-09 Kenneth Russell Reviewed by Dimitri Glazkov. Rename FloatArray to Float32Array https://bugs.webkit.org/show_bug.cgi?id=40323 Used do-webcore-rename to perform renaming. Manually undid incorrect changes to WebCore/bridge/jni/jsc/JNIBridgeJSC.cpp, WebCore/manual-tests/resources/ArrayParameterTestApplet.java and ArrayParameterTestApplet.class. Updated LayoutTests. Built and ran all layout tests on Safari; built Chromium and ran selected WebGL tests. * CMakeLists.txt: * DerivedSources.make: * GNUmakefile.am: * WebCore.gypi: * WebCore.pri: * WebCore.pro: * WebCore.xcodeproj/project.pbxproj: * bindings/generic/RuntimeEnabledFeatures.h: (WebCore::RuntimeEnabledFeatures::float32ArrayEnabled): * bindings/js/JSArrayBufferViewCustom.cpp: (WebCore::toJS): * bindings/js/JSDOMWindowCustom.cpp: (WebCore::JSDOMWindow::float32Array): (WebCore::JSDOMWindow::webGLFloatArray): * bindings/js/JSFloat32ArrayConstructor.cpp: Copied from WebCore/bindings/js/JSFloatArrayConstructor.cpp. (WebCore::): (WebCore::JSFloat32ArrayConstructor::JSFloat32ArrayConstructor): (WebCore::constructCanvasFloatArray): (WebCore::JSFloat32ArrayConstructor::getConstructData): * bindings/js/JSFloat32ArrayConstructor.h: Copied from WebCore/bindings/js/JSFloatArrayConstructor.h. * bindings/js/JSFloat32ArrayCustom.cpp: Copied from WebCore/bindings/js/JSFloatArrayCustom.cpp. (WebCore::JSFloat32Array::indexSetter): (WebCore::toJS): (WebCore::JSFloat32Array::set): * bindings/js/JSFloatArrayConstructor.cpp: Removed. * bindings/js/JSFloatArrayConstructor.h: Removed. * bindings/js/JSFloatArrayCustom.cpp: Removed. * bindings/js/JSWebGLRenderingContextCustom.cpp: (WebCore::dataFunctionf): (WebCore::dataFunctionMatrix): * bindings/v8/custom/V8ArrayBufferViewCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8DOMWindowCustom.cpp: (WebCore::V8DOMWindow::WebGLFloatArrayAccessorGetter): * bindings/v8/custom/V8Float32ArrayCustom.cpp: Copied from WebCore/bindings/v8/custom/V8FloatArrayCustom.cpp. (WebCore::V8Float32Array::constructorCallback): (WebCore::V8Float32Array::setCallback): (WebCore::toV8): * bindings/v8/custom/V8FloatArrayCustom.cpp: Removed. * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp: (WebCore::vertexAttribAndUniformHelperf): (WebCore::uniformMatrixHelper): * html/canvas/Float32Array.cpp: Copied from WebCore/html/canvas/FloatArray.cpp. (WebCore::Float32Array::create): (WebCore::Float32Array::Float32Array): (WebCore::Float32Array::slice): * html/canvas/Float32Array.h: Copied from WebCore/html/canvas/FloatArray.h. * html/canvas/Float32Array.idl: Copied from WebCore/html/canvas/FloatArray.idl. * html/canvas/FloatArray.cpp: Removed. * html/canvas/FloatArray.h: Removed. * html/canvas/FloatArray.idl: Removed. * html/canvas/WebGLGetInfo.cpp: (WebCore::WebGLGetInfo::WebGLGetInfo): (WebCore::WebGLGetInfo::getWebGLFloatArray): * html/canvas/WebGLGetInfo.h: * html/canvas/WebGLRenderingContext.cpp: (WebCore::WebGLRenderingContext::getUniform): (WebCore::WebGLRenderingContext::getVertexAttrib): (WebCore::WebGLRenderingContext::uniform1fv): (WebCore::WebGLRenderingContext::uniform2fv): (WebCore::WebGLRenderingContext::uniform3fv): (WebCore::WebGLRenderingContext::uniform4fv): (WebCore::WebGLRenderingContext::uniformMatrix2fv): (WebCore::WebGLRenderingContext::uniformMatrix3fv): (WebCore::WebGLRenderingContext::uniformMatrix4fv): (WebCore::WebGLRenderingContext::vertexAttrib1fv): (WebCore::WebGLRenderingContext::vertexAttrib2fv): (WebCore::WebGLRenderingContext::vertexAttrib3fv): (WebCore::WebGLRenderingContext::vertexAttrib4fv): (WebCore::WebGLRenderingContext::getWebGLFloatArrayParameter): * html/canvas/WebGLRenderingContext.h: * html/canvas/WebGLRenderingContext.idl: * page/DOMWindow.idl: * platform/graphics/GraphicsContext3D.h: * platform/graphics/mac/GraphicsContext3DMac.cpp: * platform/graphics/qt/GraphicsContext3DQt.cpp: 2010-06-09 Eric Seidel Reviewed by Adam Barth. HTML5 Parser needs to integrate with the XSSAuditor https://bugs.webkit.org/show_bug.cgi?id=40287 This fixes most of the XSSAuditor tests, except for the ones which rely on the srcValue "context". The previous HTMLTokenizer implementation was both Lexer and ScriptRunner and thus could provide the XSSAuditor with the un-modified attribute source. This naive implementation will fail the context-sensitive tests but Adam Barth says he'll just have to find a new way to provide the required information to the XSSAuditor in a later patch. Covered by numerous http/tests/security/xssAuditor tests. * html/HTML5ScriptRunner.cpp: (WebCore::HTML5ScriptRunner::requestScript): - Ask the HTML5ScriptRunner host before running any scripts. * html/HTML5ScriptRunnerHost.h: - Add a shouldLoadExternalScriptFromSrc declaration. * html/HTML5Tokenizer.cpp: (WebCore::HTML5Tokenizer::shouldLoadExternalScriptFromSrc): - Ask the XSSAuditor if we're allowed to run the passed script. * html/HTML5Tokenizer.h: 2010-06-09 Tony Gentilcore Reviewed by Adam Barth. Fix script-after-frameset test in HTML5 parser https://bugs.webkit.org/show_bug.cgi?id=40274 The old HTMLTokenizer enforced this in scriptHandler(). We don't use that code anymore, so it needs to be implemented. The spec does this as a part of "insertion mode"->"after frameset", so this adds an InsertionMode enum instead of a one-off boolean. No new tests because covered by fast/tokenizer/script-after-frameset.html * html/HTML5TreeBuilder.cpp: (WebCore::HTML5TreeBuilder::HTML5TreeBuilder): (WebCore::HTML5TreeBuilder::passTokenToLegacyParser): * html/HTML5TreeBuilder.h: (WebCore::HTML5TreeBuilder::): (WebCore::HTML5TreeBuilder::setInsertionMode): (WebCore::HTML5TreeBuilder::insertionMode): 2010-06-09 Kwang Yul Seo Reviewed by Kent Tamura. [BREWMP] Add EventLoop https://bugs.webkit.org/show_bug.cgi?id=39401 BREW MP does not have an explicit event loop. Add dummy EventLoop::cycle. * platform/brew/EventLoopBrew.cpp: Added. (WebCore::EventLoop::cycle): 2010-06-09 Sheriff Bot Unreviewed, rolling out r60889. http://trac.webkit.org/changeset/60889 https://bugs.webkit.org/show_bug.cgi?id=40365 gtk bot has some kind of memory corruption (Requested by loislo on #webkit). * inspector/InspectorClient.h: * inspector/InspectorController.cpp: (WebCore::InspectorController::setFrontend): * inspector/InspectorController.h: * inspector/InspectorFrontend.cpp: (WebCore::InspectorFrontend::InspectorFrontend): * inspector/InspectorFrontend.h: * inspector/InspectorFrontendClientLocal.cpp: (WebCore::InspectorFrontendClientLocal::frontendLoaded): * inspector/InspectorValues.cpp: (WebCore::InspectorObject::writeJSON): * inspector/front-end/inspector.js: * loader/EmptyClients.h: 2010-06-09 Kent Tamura Reviewed by Eric Carlson. [Windows] Build fix on Japanese Windows https://bugs.webkit.org/show_bug.cgi?id=40358 cl.exe on Japanese Windows assumes files with invalid CP932 sequences broken and doesn't build them at all. * platform/graphics/win/MediaPlayerPrivateFullscreenWindow.cpp: Remove non-ASCII characters * platform/graphics/win/MediaPlayerPrivateFullscreenWindow.h: ditto. * platform/graphics/win/WKCAImageQueue.cpp: ditto. * platform/graphics/win/WKCAImageQueue.h: ditto. 2010-06-09 Pavel Podivilov Reviewed by Yury Semikhatsky. Web Inspector: Add isDebuggerAlwaysEnabled method to ScriptDebugServer. This method returns true if debugger should always be enabled when frontend is attached. https://bugs.webkit.org/show_bug.cgi?id=40289 * bindings/js/ScriptDebugServer.cpp: (WebCore::ScriptDebugServer::isDebuggerAlwaysEnabled): * bindings/js/ScriptDebugServer.h: * bindings/v8/ScriptDebugServer.cpp: (WebCore::ScriptDebugServer::isDebuggerAlwaysEnabled): * bindings/v8/ScriptDebugServer.h: * inspector/InspectorController.cpp: (WebCore::InspectorController::setFrontend): 2010-06-07 Ilya Tikhonovsky Reviewed by Pavel Feldman. WebInspector: On the way to Remote Debugging we want to transfer dom/timeline/etc data from inspected page to WebInspector as JSON string via http. The native serialization to JSON string is supported by InspectorValue's classes. This patch has the implementation of sendMessageToFrontend function. WebKit version of it still uses ScriptFunctionCall and will be switched to another transport a little bit later. https://bugs.webkit.org/show_bug.cgi?id=40134 * inspector/InspectorClient.h: * inspector/InspectorController.cpp: (WebCore::InspectorController::connectFrontend): (WebCore::InspectorController::disconnectFrontend): * inspector/InspectorController.h: * inspector/InspectorFrontend.cpp: (WebCore::InspectorFrontend::InspectorFrontend): * inspector/InspectorFrontend.h: * inspector/InspectorFrontendClientLocal.cpp: (WebCore::InspectorFrontendClientLocal::frontendLoaded): * inspector/InspectorValues.cpp: (WebCore::InspectorObject::writeJSON): * inspector/front-end/inspector.js: (WebInspector.dispatchMessageToFrontend): * loader/EmptyClients.h: (WebCore::EmptyInspectorClient::sendMessageToFrontend): 2010-06-09 Csaba Osztrogonác Reviewed by Dirk Schulze. [Qt] Imperfect dependency for generated SVGNames.cpp https://bugs.webkit.org/show_bug.cgi?id=40359 * WebCore.pri: Missing dependency added. 2010-06-08 Dirk Schulze Reviewed by Nikolas Zimmermann. Implement non-scaling-stroke (from SVG Tiny 1.2, also in Opera) https://bugs.webkit.org/show_bug.cgi?id=31438 This is the implementation of the SVG property vector-effect according to the specification of SVG Tiny 1.2. getScreenCTM() was not able to calculate the transformation matrix in comparison to the host coordinate system for objects, that get refereced by a use element. This is fixed and covered by the the new test as well. This patch is based upon a patch of Jeff Schiller. Test: svg/custom/non-scaling-stroke.svg * css/CSSComputedStyleDeclaration.cpp: Added CSSPropertyVectorEffect. (WebCore::): * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): (WebCore::CSSPrimitiveValue::operator EVectorEffect): * css/SVGCSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::getSVGPropertyCSSValue): * css/SVGCSSParser.cpp: (WebCore::CSSParser::parseSVGValue): * css/SVGCSSPropertyNames.in: * css/SVGCSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applySVGProperty): * css/SVGCSSValueKeywords.in: Add vector-effect value non-scaling-stroke. * rendering/RenderPath.cpp: Revert transformations to ctm and transform path instead. (WebCore::fillAndStrokePath): * rendering/RenderSVGResourceContainer.h: (WebCore::RenderSVGResourceContainer::transformOnNonScalingStroke): * rendering/RenderSVGResourceGradient.cpp: Transform the gradient with the screenCTM. (WebCore::RenderSVGResourceGradient::applyResource): * rendering/RenderSVGResourcePattern.cpp: Transform the pattern with the screenCTM. (WebCore::RenderSVGResourcePattern::applyResource): * rendering/style/SVGRenderStyle.h: Added vector-effect property, not interited. (WebCore::SVGRenderStyle::NonInheritedFlags::): (WebCore::SVGRenderStyle::setBitDefaults): * rendering/style/SVGRenderStyleDefs.h: Added enums for vector-effect. (WebCore::): * svg/SVGLocatable.cpp: Calculate screenCTM for referenced objects. (WebCore::SVGLocatable::computeCTM): * svg/SVGStyledElement.cpp: (WebCore::SVGStyledElement::cssPropertyIdForSVGAttributeName): * svg/svgattrs.in: 2010-06-08 Mark Rowe Reviewed by Adele Peterson. REGRESSION (r56051): Inspect Element context menu does nothing in applications linked against 10.4 SDK Revert the change to ContextMenu::addInspectElementItem from r56051. It was made without explanation and broke a reliance that WebKit has on the presence of a separator before the Inspect Element menu item. This also restores the context menu item to the correct location at the bottom of the context menu in applications built against the Mac OS X 10.4 SDK. * platform/ContextMenu.cpp: (WebCore::ContextMenu::addInspectElementItem): 2010-06-08 Roland Steiner Unreviewed build fix Bug 38145 - Validate *tex* functions input parameters according to ES2 conformance https://bugs.webkit.org/show_bug.cgi?id=38145 https://bugs.webkit.org/show_bug.cgi?id=40346 Fix for 38145 broke the build ('log2 not found' on Windows), the fix from 40346 also didn't catch ('log ambiguous'). 2nd quick fix: add explicit casts to double and use double constants. No new tests. * html/canvas/WebGLRenderingContext.cpp: (WebCore::WebGLRenderingContext::validateTexFuncParameters): 2010-05-18 Yuzo Fujishima Reviewed by Shinichiro Hamaji. Fix for Bug 34529 - [CSSOM] issues with cssText and selectorText Serialize selector as per http://dev.w3.org/csswg/cssom/#serializing-selectors Without this patch, for example, selectors containing ':' or '.' are not properly serialized. https://bugs.webkit.org/show_bug.cgi?id=34529 Test: fast/css/selector-text-escape.html * Android.mk: * CMakeLists.txt: * GNUmakefile.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * css/CSSOMUtils.cpp: Added. (WebCore::appendCharacter): (WebCore::serializeCharacter): (WebCore::serializeCharacterAsCodePoint): (WebCore::serializeIdentifier): (WebCore::serializeString): * css/CSSOMUtils.h: Added. * css/CSSSelector.cpp: (WebCore::CSSSelector::selectorText): 2010-06-08 Ryosuke Niwa Reviewed by Justin Garcia InsertListCommand needs cleanup https://bugs.webkit.org/show_bug.cgi?id=36430 Separated code for listifying and unlistifying paragraphs. Also isolated the dependency on the selection in doApply. No test is added since this is a cleanup. * editing/InsertListCommand.cpp: (WebCore::InsertListCommand::doApply): isolated code to listify / unlistify paragraphs (WebCore::InsertListCommand::unlistifyParagraph): ditto (WebCore::InsertListCommand::listifyParagraph): ditto * editing/InsertListCommand.h: 2010-06-08 Kenneth Russell Unreviewed, build fix. Fix build breakage from 38145 https://bugs.webkit.org/show_bug.cgi?id=40346 The fix for bug 38145 broke the Chromium Win build because Microsoft's cmath doesn't define log2. Suggested fix by zmo is to change log2(x) to log(x) / log(2). Built and ran WebGL layout tests in Safari on Mac OS X. Changed download mirrors for python-irclib to working ones. * html/canvas/WebGLRenderingContext.cpp: (WebCore::WebGLRenderingContext::validateTexFuncParameters): 2010-06-08 Zhenyao Mo Reviewed by Dimitri Glazkov. Validate *tex* functions input parameters according to ES2 conformance https://bugs.webkit.org/show_bug.cgi?id=38145 Test: fast/canvas/webgl/tex-input-validation.html * html/canvas/WebGLFramebuffer.cpp: (WebCore::WebGLFramebuffer::getColorBufferFormat): Get color buffer internalformat. * html/canvas/WebGLFramebuffer.h: Ditto. * html/canvas/WebGLRenderingContext.cpp: (WebCore::WebGLRenderingContext::WebGLRenderingContext): Deal with max tex units and max texture size. (WebCore::WebGLRenderingContext::copyTexImage2D): Validate input parameters. (WebCore::WebGLRenderingContext::copyTexSubImage2D): Ditto. (WebCore::WebGLRenderingContext::texImage2DBase): Ditto. (WebCore::WebGLRenderingContext::texParameterf): Ditto. (WebCore::WebGLRenderingContext::texParameteri): Ditto. (WebCore::WebGLRenderingContext::texSubImage2DBase): Ditto. (WebCore::WebGLRenderingContext::handleNPOTTextures): Deal with max tex units. (WebCore::WebGLRenderingContext::isTexInternalformatColorBufferCombinationValid): Check whether the texture format and framebuffer color buffer internalformat combination is valid. (WebCore::WebGLRenderingContext::getTextureBinding): get the current bound texture for given target. (WebCore::WebGLRenderingContext::validateTexFuncFormatAndType): Validate input format/type for *tex* functions. (WebCore::WebGLRenderingContext::validateTexFuncParameters): Validate input parameters for *tex* functions. (WebCore::WebGLRenderingContext::texParameter): Base function for texParameteri and texParameterf. * html/canvas/WebGLRenderingContext.h: Deal with max tex units. * html/canvas/WebGLTexture.cpp: (WebCore::WebGLTexture::WebGLTexture): Cache internalformat. * html/canvas/WebGLTexture.h: Ditto. (WebCore::WebGLTexture::setInternalformat): (WebCore::WebGLTexture::getInternalformat): * platform/graphics/GraphicsContext3D.cpp: internalformat and format need to be the same. (WebCore::GraphicsContext3D::extractImageData): 2010-06-08 Erik Arvidsson Reviewed by Ojan Vafai. REGRESSION: Weird focus behavior affects quoting on University of Washington message board system https://bugs.webkit.org/show_bug.cgi?id=38548 Test: editing/selection/click-in-focusable-link-should-not-clear-selection.html * page/FocusController.cpp: (WebCore::clearSelectionIfNeeded): Make sure we do not clear selection when canStartSelection returns false. 2010-06-08 Enrico Ros Reviewed by Ariya Hidayat. [Qt] Crashfix on Path::contains https://bugs.webkit.org/show_bug.cgi?id=40253 Fix accessing the first item of an empty vector, that happens when CanvasRenderingContext2D::isPointInPath is invoked over a borderless path (e.g. a path made of just a MoveTo operation). * platform/graphics/qt/PathQt.cpp: (WebCore::isPointOnPathBorder): 2010-06-08 Sheriff Bot Unreviewed, rolling out r60859. http://trac.webkit.org/changeset/60859 https://bugs.webkit.org/show_bug.cgi?id=40334 Included debugging statements. Caused a test to fail. (Requested by ojan on #webkit). * page/FocusController.cpp: (WebCore::clearSelectionIfNeeded): 2010-06-08 Sheriff Bot Unreviewed, rolling out r60858. http://trac.webkit.org/changeset/60858 https://bugs.webkit.org/show_bug.cgi?id=40325 Qt needs a clean build. Rolling out the patch for now and fix it tomorrow (Requested by krit on #webkit). * css/CSSComputedStyleDeclaration.cpp: (WebCore::): * css/CSSPrimitiveValueMappings.h: * css/SVGCSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::getSVGPropertyCSSValue): * css/SVGCSSParser.cpp: (WebCore::CSSParser::parseSVGValue): * css/SVGCSSPropertyNames.in: * css/SVGCSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applySVGProperty): * css/SVGCSSValueKeywords.in: * rendering/RenderPath.cpp: (WebCore::fillAndStrokePath): * rendering/RenderSVGResourceContainer.h: * rendering/RenderSVGResourceGradient.cpp: (WebCore::RenderSVGResourceGradient::applyResource): * rendering/RenderSVGResourcePattern.cpp: (WebCore::RenderSVGResourcePattern::applyResource): * rendering/style/SVGRenderStyle.h: (WebCore::SVGRenderStyle::NonInheritedFlags::): (WebCore::SVGRenderStyle::setBitDefaults): * rendering/style/SVGRenderStyleDefs.h: (WebCore::): * svg/SVGLocatable.cpp: (WebCore::SVGLocatable::computeCTM): * svg/SVGStyledElement.cpp: (WebCore::SVGStyledElement::cssPropertyIdForSVGAttributeName): * svg/svgattrs.in: 2010-06-08 Daniel Bates Unreviewed, fix Xcode project file after change-set 60841. Xcode is not happy about the entries for files EditingBehavior.h and EditingBehaviorTypes.h that were added in change-set 60841 (Bug # 39854). Lets make Xcode happy. Also, lets place these entries in alphabetic order. * WebCore.xcodeproj/project.pbxproj: 2010-06-08 Erik Arvidsson Reviewed by ojan@chromium.org. REGRESSION: Weird focus behavior affects quoting on University of Washington message board system https://bugs.webkit.org/show_bug.cgi?id=38548 We should not clear the selection when canStartSelection returns false. Test: editing/selection/click-in-focusable-link-should-not-clear-selection.html * page/FocusController.cpp: (WebCore::clearSelectionIfNeeded): Make sure we do not clear selection when canStartSelection returns false. 2010-06-08 Dirk Schulze Reviewed by Nikolas Zimmermann. Implement non-scaling-stroke (from SVG Tiny 1.2, also in Opera) https://bugs.webkit.org/show_bug.cgi?id=31438 This is the implementation of the SVG property vector-effect according to the specification of SVG Tiny 1.2. getScreenCTM() was not able to calculate the transformation matrix in comparison to the host coordinate system for objects, that get refereced by a use element. This is fixed and covered by the the new test as well. This patch is based upon a patch of Jeff Schiller. Test: svg/custom/non-scaling-stroke.svg * css/CSSComputedStyleDeclaration.cpp: Added CSSPropertyVectorEffect. (WebCore::): * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): (WebCore::CSSPrimitiveValue::operator EVectorEffect): * css/SVGCSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::getSVGPropertyCSSValue): * css/SVGCSSParser.cpp: (WebCore::CSSParser::parseSVGValue): * css/SVGCSSPropertyNames.in: * css/SVGCSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applySVGProperty): * css/SVGCSSValueKeywords.in: Add vector-effect value non-scaling-stroke. * rendering/RenderPath.cpp: Revert transformations to ctm and transform path instead. (WebCore::fillAndStrokePath): * rendering/RenderSVGResourceContainer.h: (WebCore::RenderSVGResourceContainer::transformOnNonScalingStroke): * rendering/RenderSVGResourceGradient.cpp: Transform the gradient with the screenCTM. (WebCore::RenderSVGResourceGradient::applyResource): * rendering/RenderSVGResourcePattern.cpp: Transform the pattern with the screenCTM. (WebCore::RenderSVGResourcePattern::applyResource): * rendering/style/SVGRenderStyle.h: Added vector-effect property, not interited. (WebCore::SVGRenderStyle::NonInheritedFlags::): (WebCore::SVGRenderStyle::setBitDefaults): * rendering/style/SVGRenderStyleDefs.h: Added enums for vector-effect. (WebCore::): * svg/SVGLocatable.cpp: Calculate screenCTM for referenced objects. (WebCore::SVGLocatable::computeCTM): * svg/SVGStyledElement.cpp: (WebCore::SVGStyledElement::cssPropertyIdForSVGAttributeName): * svg/svgattrs.in: 2010-06-08 Alexey Proskuryakov * GNUmakefile.am: Also adding platform/Cursor.cpp to Gtk build. 2010-06-08 Csaba Osztrogonác [Qt] Unreviewed buildfix after r60849. * WebCore.pro: platform/Cursor.cpp is added to Qt build system. 2010-06-08 Kenneth Rohde Christiansen Unreviewed Buildbot fix. Reset the Qt TextBreakIterator when reusing it. * platform/text/qt/TextBreakIteratorQt.cpp: (WebCore::setUpIterator): 2010-06-04 Alexey Proskuryakov Reviewed by John Sullivan. https://bugs.webkit.org/show_bug.cgi?id=15779 Custom CSS .cur cursor anchor point is ignored Test: manual-tests/cur-hotspot.html Currently, this patch only has effect in Safari 5 on Windows. Other platforms will need to implement getting hot spot information from .cur files. * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: Added Cursor.cpp. Looks like TextWrangler fixed line endings in vcproj file. * css/CSSCursorImageValue.cpp: (WebCore::CSSCursorImageValue::CSSCursorImageValue): Renamed "hotspot" to "hotSpot" to match other code. (WebCore::CSSCursorImageValue::updateIfSVGCursorIsUsed): Ditto. Added a FIXME about possibly incorrect code for resolving differences with CSS specified hotspot. * css/CSSCursorImageValue.h: (WebCore::CSSCursorImageValue::create): (WebCore::CSSCursorImageValue::hotSpot): Renamed "hotspot" to "hotSpot" to match other code. * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): Start with an invalid value for hot spot, so that we can differentiate between missing and (0, 0) CSS hot spots. Missing and invalid (-1, -1) are treated identically by Firefox, so we don't need to differentiate these. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): Renamed "hotspot" to "hotSpot" to match other code. * page/EventHandler.cpp: (WebCore::EventHandler::selectCursor): Don't ignore cursors with invalid CSS hot spots. Firefox ignores only the hot spot, not the whole cursor in this case (and IE doesn't support CSS3 cursor declarations). * platform/Cursor.cpp: Added. (WebCore::determineHotSpot): Added a function that decides where hot spot is, provided an image and a possible out of band coordinate specification. * platform/Cursor.h: Added determineHotSpot(). * platform/graphics/BitmapImage.cpp: (WebCore::BitmapImage::getHotSpot): * platform/graphics/BitmapImage.h: * platform/graphics/Image.h: (WebCore::Image::getHotSpot): * platform/graphics/ImageSource.cpp: (WebCore::ImageSource::getHotSpot): * platform/graphics/ImageSource.h: Added plumbing to get hot spot data from an image provider. * platform/graphics/cg/ImageSourceCG.cpp: (WebCore::ImageSource::getHotSpot): CG implemantation. * platform/mac/CursorMac.mm: (WebCore::createCustomCursor): Call determineHotSpot() to determine where hot spot should be. (WebCore::Cursor::Cursor): Renamed "hotspot" to "hotSpot" to match other code. * platform/win/CursorWin.cpp: (WebCore::Cursor::Cursor): Call determineHotSpot() to determine where hot spot should be. * platform/gtk/CursorGtk.cpp: (WebCore::Cursor::Cursor): Ditto. This must be done despite this platform not having an implementation for ImageSource::getHotSpot(), because we no longer check for out of bounds hot spots in EventHandler::selectCursor(). * platform/qt/CursorQt.cpp: (WebCore::Cursor::Cursor): Ditto. 2010-06-08 Kenneth Rohde Christiansen Reviewed by Antti Koivisto. [Qt] TextBreakIterator Qt performance https://bugs.webkit.org/show_bug.cgi?id=39958 Rework TextBreakIteratorQt to be more in line with the ICU version. We now reuse iterators where ever possible. The string data is compared with memcmp, which should be faster than using a hash, as you need to traverse the full buffer in the case the strings don't match, where as the compare would fail quickly. * platform/text/qt/TextBreakIteratorQt.cpp: (WebCore::TextBreakIterator::TextBreakIterator): (WebCore::setUpIterator): (WebCore::wordBreakIterator): (WebCore::characterBreakIterator): (WebCore::lineBreakIterator): (WebCore::sentenceBreakIterator): 2010-06-08 Andras Becsi Unreviewed build fix after r60785. [GTK] Add missing GtkVersioning.h include to fix the build on older GTK+ versions. No new tests needed. * platform/gtk/WidgetGtk.cpp: 2010-06-08 Yury Semikhatsky Reviewed by Pavel Feldman. Web Inspector: extend ScriptDebugServer to support script source editing https://bugs.webkit.org/show_bug.cgi?id=40297 * bindings/js/ScriptDebugServer.cpp: (WebCore::ScriptDebugServer::editScriptSource): * bindings/js/ScriptDebugServer.h: * bindings/v8/ScriptDebugServer.cpp: (WebCore::ScriptDebugServer::editScriptSource): * bindings/v8/ScriptDebugServer.h: * inspector/InspectorBackend.cpp: (WebCore::InspectorBackend::editScriptSource): * inspector/InspectorBackend.h: * inspector/InspectorBackend.idl: * inspector/InspectorController.cpp: (WebCore::InspectorController::InspectorController): (WebCore::InspectorController::disableDebugger): (WebCore::InspectorController::editScriptSource): (WebCore::InspectorController::currentCallFrames): (WebCore::InspectorController::didPause): (WebCore::InspectorController::didContinue): * inspector/InspectorController.h: * inspector/InspectorFrontend.cpp: (WebCore::InspectorFrontend::didEditScriptSource): * inspector/InspectorFrontend.h: * inspector/front-end/Script.js: * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype.canEditScripts): (WebInspector.ScriptsPanel.prototype.editScriptSource.mycallback): (WebInspector.ScriptsPanel.prototype.editScriptSource): * inspector/front-end/Settings.js: * inspector/front-end/SourceView.js: (WebInspector.SourceView.prototype._editLine): * inspector/front-end/TextViewer.js: (WebInspector.TextViewer.prototype._handleDoubleClick): (WebInspector.TextViewer.prototype._commitEditingLine): * inspector/front-end/inspector.css: (#scripts-files option.extension-script): 2010-06-08 Antonio Gomes Reviewed by Ojan Vafai and Darin Adler. Refactor platform dependent editing behavior code out of Settings https://bugs.webkit.org/show_bug.cgi?id=39854 As per discussion in bug 36627, Darin Adler suggested: "before the addition of any new EditingBehavior, I think we to add functions to translate the overall behavior policy into specific behaviors rather than directly saying 'behavior == Mac' or 'behavior == Windows'. Helper functions that expression the different rules in plain language.". Patch addresses this request. No behavior change, so no new tests. * GNUmakefile.am: * WebCore.pro: * WebCore/WebCore.vcproj/WebCore.vcproj * WebCore/WebCore.xcodeproj/project.pbxproj * page/Settings.cpp: (WebCore::Settings::Settings): * page/Settings.h: Moved out EditingBehavior enum to WebCore/editing/EditingBehaviorTypes.h, and renamed to EditingBehaviorTypes. (WebCore::Settings::setEditingBehaviorType): Renamed from setEditingBehavior. (WebCore::Settings::editingBehaviorType): Renamed from editingBehavior. * editing/EditingBehavior.h: Added. (WebCore::EditingBehavior::EditingBehavior): Class to work as a central point for editing behavior that might have to be handled differently in the different platforms/ports. Class should be not used or instantiated directly, but rather implicitly constructed through the Editor class. (WebCore::EditingBehavior::shouldMoveCaretToHorizontalBoundaryWhenPastTopOrBottom): (WebCore::EditingBehavior::shouldConsiderSelectionAsDirectional): (WebCore::EditingBehavior::shouldCenterAlignWhenSelectionIsRevealed): * editing/EditingBehaviorTypes.h: Added. (WebCore::): * editing/Editor.cpp: (WebCore::Editor::behavior): Getter for EditingBehavior class. * editing/Editor.h: * editing/EditorCommand.cpp: (WebCore::executeToggleStyle): * editing/SelectionController.cpp: (WebCore::SelectionController::setSelection): (WebCore::SelectionController::setIsDirectional): (WebCore::SelectionController::positionForPlatform): (WebCore::SelectionController::modify): * page/EventHandler.cpp: (WebCore::EventHandler::handleMousePressEventSingleClick): * rendering/RenderBlock.cpp: (WebCore::RenderBlock::positionForPointWithInlineChildren): - Call sites will look like: if (frame->editor()->behavior().shouldThisIfThat())) // do something 2010-06-08 Steve Block Reviewed by Jeremy Orlow. Prevent Geolocation making callbacks to a ScriptExecutionContext that no longer exists https://bugs.webkit.org/show_bug.cgi?id=40162 Before making callbacks, we check that the relevant ScriptExecutionContext still exists. To achieve this, the callbacks inherit from ActiveDOMObject. The ScriptExecutionContext is ref'ed from script, so may not be GC'ed for some time after it is disconnected from its frame. Making the callback currently involves accessing the Frame, so an additional check for the Frame is required. This change also prevents the V8 bindings from incorrectly holding a reference to the Frame. Test: fast/dom/Geolocation/callback-to-deleted-context.html * bindings/js/JSCallbackData.cpp: (WebCore::JSCallbackData::invokeCallback): * bindings/js/JSCustomPositionCallback.cpp: (WebCore::JSCustomPositionCallback::JSCustomPositionCallback): (WebCore::JSCustomPositionCallback::handleEvent): * bindings/js/JSCustomPositionErrorCallback.cpp: (WebCore::JSCustomPositionErrorCallback::JSCustomPositionErrorCallback): (WebCore::JSCustomPositionErrorCallback::handleEvent): * bindings/v8/custom/V8CustomPositionCallback.cpp: (WebCore::V8CustomPositionCallback::V8CustomPositionCallback): (WebCore::V8CustomPositionCallback::handleEvent): * bindings/v8/custom/V8CustomPositionCallback.h: (WebCore::V8CustomPositionCallback::create): * bindings/v8/custom/V8CustomPositionErrorCallback.cpp: (WebCore::V8CustomPositionErrorCallback::V8CustomPositionErrorCallback): (WebCore::V8CustomPositionErrorCallback::handleEvent): * bindings/v8/custom/V8CustomPositionErrorCallback.h: (WebCore::V8CustomPositionErrorCallback::create): * bindings/v8/custom/V8GeolocationCustom.cpp: (WebCore::createPositionCallback): (WebCore::createPositionErrorCallback): * page/PositionCallback.h: (WebCore::PositionCallback::PositionCallback): * page/PositionErrorCallback.h: (WebCore::PositionErrorCallback::PositionErrorCallback): 2010-06-08 Xan Lopez Reviewed by Gustavo Noronha. [GTK] Avoid duplicated signals in DOM bindings https://bugs.webkit.org/show_bug.cgi?id=40170 Do not create duplicated event signals between a class and its ancestor. * bindings/scripts/CodeGeneratorGObject.pm: 2010-06-08 MORITA Hajime Unreviewd. Touched the file to force rebuild. * html/HTMLMeterElement.idl: 2010-06-08 Vangelis Kokkevis Reviewed by Dimitri Glazkov. [Chromium] Fix the math for transform matrices of composited layers. There were problems both with how content layers were setting their position and how the overal matrix stack was computed when the layer anchor isn't at the center of the layer. https://bugs.webkit.org/post_bug.cgi * platform/graphics/chromium/GraphicsLayerChromium.cpp: (WebCore::GraphicsLayerChromium::updateContentsRect): * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::updateLayersRecursive): (WebCore::LayerRendererChromium::drawLayer): 2010-06-07 Eric Seidel Reviewed by Adam Barth. HTML5Lexer does not handle
correctly https://bugs.webkit.org/show_bug.cgi?id=40283 Fix a typo in the AfterAttributeNameState. The compiler really should have caught this since the typo resulted in unreachable code. Tests: 10 tables/mozilla/marvin/colgroup* tests. Also added a new sub-test in html5lib/resources/webkit01.dat * html/HTML5Lexer.cpp: (WebCore::HTML5Lexer::nextToken): - Fix typo of = instead of > 2010-06-08 Adam Barth Reviewed by Eric Seidel. Implement HTML5's forceQuirks flag https://bugs.webkit.org/show_bug.cgi?id=40284 I didn't implement this before because I didn't know how to test it, but now I do. Tests: * fast/doctypes/doctype-parsing.html. When we actually implement the quirks mode handling in the tree builder, we'll probably want to add to this test. * html/HTML5Lexer.cpp: (WebCore::HTML5Lexer::nextToken): * html/HTML5Token.h: (WebCore::HTML5Token::forceQuirks): (WebCore::HTML5Token::setForceQuirks): * html/HTML5TreeBuilder.cpp: (WebCore::HTML5TreeBuilder::passTokenToLegacyParser): * html/HTMLParser.cpp: (WebCore::HTMLParser::parseDoctypeToken): * html/HTMLTokenizer.h: (WebCore::DoctypeToken::reset): 2010-06-08 Adam Barth Reviewed by Eric Seidel. Remove ASSERT in ~HTML5Tokenizer https://bugs.webkit.org/show_bug.cgi?id=40282 We thought this ASSERT would be a good idea, but the problem is that this object is deleted without warning in some circumstances, so there's no way to know whether it has reached the end of its state machine. * html/HTML5Tokenizer.cpp: (WebCore::HTML5Tokenizer::~HTML5Tokenizer): 2010-06-07 MORITA Hajime Reviewed by Kent Tamura. [Mac] elements should be rendered as level indicators. https://bugs.webkit.org/show_bug.cgi?id=40217 Implemented RenderThemeMac::paintMeter() using NSLevelIndicatorCell. This change also added new -webkit-appearance values to select the style of level indicators: - relevancy-level-indicator, - continuous-capacity-level-indicator, - discrete-capacity-level-indicator, and - rating-level-indicator. The size of elements are adjusted based on the bounds of the indicator to make room for painting whole indicator cells. Tests: fast/dom/HTMLMeterElement/meter-appearances-capacity.html fast/dom/HTMLMeterElement/meter-appearances-rating-relevancy.html fast/dom/HTMLMeterElement/meter-optimums.html * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): * css/CSSValueKeywords.in: * html/HTMLMeterElement.cpp: (WebCore::HTMLMeterElement::gaugeRegion): * html/HTMLMeterElement.h: (WebCore::HTMLMeterElement::): * platform/ThemeTypes.h: (WebCore::): * rendering/RenderMeter.cpp: (WebCore::RenderMeter::calcWidth): (WebCore::RenderMeter::calcHeight): * rendering/RenderMeter.h: * rendering/RenderTheme.cpp: (WebCore::RenderTheme::adjustStyle): (WebCore::RenderTheme::paint): (WebCore::RenderTheme::paintBorderOnly): (WebCore::RenderTheme::paintDecorations): (WebCore::RenderTheme::meterSizeForBounds): * rendering/RenderTheme.h: * rendering/RenderThemeMac.h: * rendering/RenderThemeMac.mm: (WebCore::RenderThemeMac::meterSizeForBounds): (WebCore::RenderThemeMac::paintMeter): (WebCore::RenderThemeMac::levelIndicatorStyleFor): (WebCore::RenderThemeMac::levelIndicatorFor): 2010-06-07 MORITA Hajime Reviewed by Kent Tamura. [Mac] ENABLE_METER_TAG should be enabled. https://bugs.webkit.org/show_bug.cgi?id=40219 * Configurations/FeatureDefines.xcconfig: * WebCore.xcodeproj/project.pbxproj: 2010-06-07 Eric Seidel Unreviewed. Just commit an edit XCode keeps making automatically. It appears someone hand-edited the file, XCode no-like. * WebCore.xcodeproj/project.pbxproj: 2010-06-07 Eric Seidel Reviewed by Adam Barth. HTML5 Parser fails script-tests which use document.write https://bugs.webkit.org/show_bug.cgi?id=40276 We were leaving the TreeBuilder paused when executing the scripts resulting in document.write() calls being ignored. I don't see a good way to ASSERT this correct behavior, since the HTML5ScriptRunner and the HTML5TreeBuilder do not know about each other. We should never have document.write() called while the HTML5TreeBuilder is paused, however both document.write and the network call the same HTML5Tokenizer::write method. It's OK to be paused when the network writes, but during document.write (or any other script execution). Tested by all of fast/url and numerous other tests. * html/HTML5Tokenizer.cpp: (WebCore::HTML5Tokenizer::notifyFinished): - Unpause the treebuilder before executing scripts. (WebCore::HTML5Tokenizer::executeScriptsWaitingForStylesheets): - Unpause the treebuilder before executing scripts. 2010-06-07 Eric Seidel Reviewed by Adam Barth. HTML5 Parser hits ASSERT in fast/events/stop-load-in-unload-handler-using-document-write.html https://bugs.webkit.org/show_bug.cgi?id=40268 Teach HTML5Tokenizer about m_parserStopped. While tracking down how m_parserStopped was used, I found several useless implementations of stopParsing() which I removed. I also found a comment in HTMLTokenizer which still talks about the "part" (an old class now split into Frame, Page, FrameLoader, etc.) and an nearly empty FrameLoader::tokenizerProcessedData which I just inlined into its one caller. Tests: fast/events/stop-load-in-unload-handler-using-document-write.html http/tests/security/xssAuditor/full-block-base-href.html * html/HTML5Tokenizer.cpp: (WebCore::HTML5Tokenizer::pumpLexerIfPossible): - New method used instead of direct calls to pumpLexer for when callers would like to pump the lexer if possible, but don't want to check if the parser is stopped, etc. (WebCore::HTML5Tokenizer::pumpLexer): - Added an ASSERT that the parser is not stopped. - Stop pumping if the parser is stopped. (WebCore::HTML5Tokenizer::write): - Ignore the write if the parser is already stopped. (WebCore::HTML5Tokenizer::end): (WebCore::HTML5Tokenizer::attemptToEnd): - Move comment back to finish() which was incorrectly moved here. (WebCore::HTML5Tokenizer::endIfDelayed): (WebCore::HTML5Tokenizer::finish): - Move comment back here from attemptToEnd() (WebCore::HTML5Tokenizer::resumeParsingAfterScriptExecution): - Remove a bogus ASSERT. The lexer will stop when it needs more data, which may not necessarily mean m_source.isEmpty(). * html/HTML5Tokenizer.h: - Add pumpLexerIfPossible(). * html/HTMLTokenizer.cpp: (WebCore::HTMLTokenizer::stopParsing): - Add a FIXME about if we really should call checkCompleted() here. - Inline FrameLoader::tokenizerProcessedData() since this was the only caller. * loader/FrameLoader.cpp: - Remove tokenizerProcessedData() * loader/FrameLoader.h: - Remove tokenizerProcessedData() * loader/MediaDocument.cpp: - Remove unneeded Tokenizer::stopParsing() override. * loader/PluginDocument.cpp: - Remove unneeded Tokenizer::stopParsing() override. * loader/SinkDocument.cpp: - Remove unneeded Tokenizer::stopParsing() override. 2010-06-07 Adam Barth Reviewed by Eric Seidel. Fix XFrameOptions and xssAuditor crashes in HTML5 parser https://bugs.webkit.org/show_bug.cgi?id=40265 We're not supposed to call end() while the tokenizer's write() method. This causes a bunch of LayoutTests to crash. In particular, this patch fixes crashes in the following tests: Tests: * http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag-in-body.html * http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag-parent-same-origin-deny.html * http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag.html * http/tests/security/xssAuditor/full-block-base-href.html * http/tests/security/xssAuditor/full-block-get-from-iframe.html * http/tests/security/xssAuditor/full-block-iframe-javascript-url.html * http/tests/security/xssAuditor/full-block-link-onclick.html * http/tests/security/xssAuditor/full-block-post-from-iframe.html * http/tests/security/xssAuditor/full-block-script-tag.html * http/tests/security/xssAuditor/xss-protection-parsing-01.html * html/HTML5Tokenizer.cpp: (WebCore::): (WebCore::HTML5Tokenizer::HTML5Tokenizer): (WebCore::HTML5Tokenizer::write): (WebCore::HTML5Tokenizer::attemptToEnd): (WebCore::HTML5Tokenizer::endIfDelayed): (WebCore::HTML5Tokenizer::finish): (WebCore::HTML5Tokenizer::resumeParsingAfterScriptExecution): * html/HTML5Tokenizer.h: (WebCore::HTML5Tokenizer::inWrite): 2010-06-07 Eric Seidel Reviewed by Adam Barth. HTML5 parser hits ASSERT in http/tests/misc/window-dot-stop.html https://bugs.webkit.org/show_bug.cgi?id=40264 * html/HTML5Tokenizer.cpp: (WebCore::HTML5Tokenizer::executeScript): 2010-06-07 Kinuko Yasuda Unreviewed. Avoid "warning: no previous prototype for" in Snow Leopard compilation. * platform/BlobItem.cpp: Added static to getFileSnapshotModificationTime(). 2010-06-07 Kinuko Yasuda Reviewed by Jian Li. Refactor FormData and Blob for better support of Blobs synthesized by BlobBuilder. https://bugs.webkit.org/show_bug.cgi?id=39083 - Introduces a new class BlobItem as a basic component of Blob and FormDataList. - File would become a special type of Blob that contains only one FileBlobItem. - Fix the dependency violation in FormData so that the files under platform/ do not include any html/ files. The patch doesn't support the latest File API changes (e.g. type, url and slice's type parameters) and should not change any of its existing behaviors. The existing tests should be able to be used for regression. * CMakeLists.txt: * GNUmakefile.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * html/Blob.cpp: (WebCore::Blob::Blob): (WebCore::Blob::size): (WebCore::Blob::path): (WebCore::Blob::append): (WebCore::Blob::slice): * html/Blob.h: (WebCore::Blob::create): (WebCore::Blob::type): (WebCore::Blob::items): (WebCore::Blob::Blob): * html/File.cpp: (WebCore::File::File): (WebCore::File::name): * html/File.h: (WebCore::File::fileName): * html/FileReader.cpp: (WebCore::FileReader::readAsBinaryString): (WebCore::FileReader::readAsText): * html/FileStream.cpp: (WebCore::FileStream::openForRead): * html/FormDataList.cpp: (WebCore::FormDataList::appendString): Moved the line ending fix logic to StringBlobItem::convertToCString. (WebCore::FormDataList::appendBlob): * html/FormDataList.h: (WebCore::FormDataList::items): * html/HTMLFormElement.cpp: (WebCore::HTMLFormElement::createFormData): * html/HTMLProgressElement.cpp: * platform/BlobItem.cpp: Added. * platform/BlobItem.h: Added. * platform/network/FormData.cpp: (WebCore::FormDataElement::FormDataElement): (WebCore::FormData::create): (WebCore::FormData::createMultiPart): (WebCore::FormData::deepCopy): (WebCore::FormData::appendData): (WebCore::FormData::appendString): (WebCore::FormData::appendFile): (WebCore::FormData::appendFileRange): (WebCore::FormData::appendItems): (WebCore::FormData::appendItem): (WebCore::FormData::appendKeyValuePairItems): * platform/network/FormData.h: (WebCore::operator!=): * platform/network/mac/FormDataStreamMac.mm: (WebCore::closeCurrentStream): (WebCore::advanceCurrentStream): (WebCore::formCreate): (WebCore::formRead): (WebCore::setHTTPBody): * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::send): 2010-06-07 Vangelis Kokkevis Reviewed by Dimitri Glazkov. [chromium] Decoupled transform matrix update of composited layers from drawing and interposed a sorting step so that the layers are now composited back to front to get transparency working correctly. Also added missing code for the preserves3D CSS property. * platform/graphics/chromium/GraphicsLayerChromium.cpp: (WebCore::GraphicsLayerChromium::updateLayerPreserves3D): * platform/graphics/chromium/LayerChromium.h: (WebCore::LayerChromium::setDrawTransform): (WebCore::LayerChromium::drawTransform): (WebCore::LayerChromium::setDrawOpacity): (WebCore::LayerChromium::drawOpacity): (WebCore::LayerChromium::preserves3D): * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::compareLayerZ): (WebCore::LayerRendererChromium::drawLayers): (WebCore::LayerRendererChromium::updateLayersRecursive): (WebCore::LayerRendererChromium::drawLayer): * platform/graphics/chromium/LayerRendererChromium.h: 2010-06-07 Anton Muhin Reviewed by Nate Chapin. [Chromium] convert a key to AtomicString in V8NodeList::namedPropertyGetter https://bugs.webkit.org/show_bug.cgi?id=40238 Comparison to "length" below could be performed faster in this (major) case as it would only require direct pointer comparison (cf. to full text comparison if key is converted to WebCore::String.) * bindings/v8/custom/V8NodeListCustom.cpp: (WebCore::V8NodeList::namedPropertyGetter): 2010-06-07 Ariya Hidayat Reviewed by Kenneth Rohde Christiansen. [Qt] Fix GraphicsContext::clipOut to take the transformation matrix into account. * platform/graphics/qt/GraphicsContextQt.cpp: (WebCore::GraphicsContext::clipOut): 2010-06-07 Gustavo Noronha Silva Reviewed by Xan Lopez. [gtk] web fonts not loaded properly in scribd html5 reader https://bugs.webkit.org/show_bug.cgi?id=38758 Avoid always giving a positive reply in createFontPlatformData. We do not want every non-existing family name to be considered a hit, or weird usage of local sources in @font-face rules will make WebKitGTK+ never consider the online fonts. * GNUmakefile.am: * platform/graphics/cairo/FontCacheCairo.cpp: (WebCore::isWellKnownFontName): (WebCore::FontCache::createFontPlatformData): * platform/graphics/cairo/GOwnPtrCairo.cpp: Added. (WTF::FcPattern): (WTF::FcObjectSet): (WTF::FcFontSet): * platform/graphics/cairo/GOwnPtrCairo.h: Added. 2010-06-07 Adam Barth Reviewed by Eric Seidel. "Fix" fast/dom/stripNullFromTextNodes.html in HTML5 parser https://bugs.webkit.org/show_bug.cgi?id=40200 The proper handling of null characters is to replace them with U+FFFD. This patch "fixes" fast/dom/stripNullFromTextNodes.html in the sense that it makes it give the proper output w.r.t. HTML5. However, that doesn't match the behavior of the old parser, which just stripped the nulls. * html/HTML5Lexer.h: (WebCore::HTML5Lexer::InputStreamPreprocessor::peek): 2010-06-07 Adam Barth Reviewed by Eric Seidel. HTML5 parser should normalize line endings https://bugs.webkit.org/show_bug.cgi?id=40199 When reading characters from the source, we need to normalize line endings, which means treating \r as \n and folding \r\n sequences into a single \n. Doing this requires a slightly tighter pattern for advancing the source (to make sure we update our state machine correctly). Fixes fast/css/first-child-pseudo-class.html and hundreds of other LayoutTests in the HTML5 parser. * html/HTML5Lexer.cpp: (WebCore::HTML5Lexer::nextToken): * html/HTML5Lexer.h: (WebCore::HTML5Lexer::InputStreamPreprocessor::LineEndingNormalizer): - Introduced InputStreamPreprocessor to keep track of our line endings state machine. This class will grow to eventually do all the input stream preprocessing required by the HTML5 spec. (WebCore::HTML5Lexer::InputStreamPreprocessor::nextInputCharacter): - We need to be careful not to read *source more than once because we need to know whether we've transformed the character. Keeping the next input character in this state machine requires some careful coding, but seems advantageous. (WebCore::HTML5Lexer::InputStreamPreprocessor::peek): (WebCore::HTML5Lexer::InputStreamPreprocessor::advance): 2010-06-07 Andrei Popescu Reviewed by Jeremy Orlow. run-bindings-tests results broken by Changeset 60776 https://bugs.webkit.org/show_bug.cgi?id=40230 The change to CodeGeneratorJS.pm in http://trac.webkit.org/changeset/60776/trunk/WebCore/bindings/scripts/CodeGeneratorJS.pm added the possibility to use [CallWith=ScriptExecutionContext] in idl files. Before the above change was submitted, CodeGeneratorJS.pm was modified so that native functions return EncodedJSValue instead of JSValues. This was done in http://trac.webkit.org/changeset/60631/trunk/WebCore/bindings/scripts/CodeGeneratorJS.pm This CL updates the CodeGeneratorJS.pm to correctly return an EncodedJSValue in the case where the ScriptExecutionContext pointer is 0 at the time when the native function is invoked. No new tests, just fixing run-bindings-tests. * bindings/scripts/CodeGeneratorJS.pm: * bindings/scripts/test/JS/JSTestObj.cpp: (WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContext): * bindings/scripts/test/JS/JSTestObj.h: 2010-06-07 Kwang Yul Seo Reviewed by Eric Seidel. [BREWMP] Add dummy SearchPopupMenu implementation https://bugs.webkit.org/show_bug.cgi?id=40224 Add dummy implementation of SearchPopupMenu. * platform/brew/SearchPopupMenuBrew.cpp: Added. (WebCore::SearchPopupMenu::saveRecentSearches): (WebCore::SearchPopupMenu::loadRecentSearches): (WebCore::SearchPopupMenu::SearchPopupMenu): (WebCore::SearchPopupMenu::enabled): 2010-06-07 Julien Chaffraix Unreviewed, reverting my HTML comment parsing change as it breaks Gtk and Qt. * html/HTMLTokenizer.cpp: (WebCore::HTMLTokenizer::parseComment): (WebCore::HTMLTokenizer::parseTag): * html/HTMLTokenizer.h: 2010-06-07 Martin Robinson Reviewed by Oliver Hunt. [GTK] HTML5 input type=range is not drawn https://bugs.webkit.org/show_bug.cgi?id=39561 Support HTML5 range widgets. They are now drawn using the standard GTK+ theme drawing mechanism. * platform/gtk/RenderThemeGtk.cpp: (WebCore::supportsFocus): Add focus support for parts of sliders. (WebCore::setMozillaState): Add the GtkThemeWidgetType argument and honor depressed states for slider thumbs. (WebCore::paintMozillaGtkWidget): Pass in the widget type to setMozillaState. (WebCore::RenderThemeGtk::paintSliderTrack): Added. (WebCore::RenderThemeGtk::adjustSliderTrackStyle): Added. (WebCore::RenderThemeGtk::paintSliderThumb): Added. (WebCore::RenderThemeGtk::adjustSliderThumbStyle): Added. (WebCore::RenderThemeGtk::adjustSliderThumbSize): Added support for non-media sliders. * platform/gtk/RenderThemeGtk.h: Added new method declarations. 2010-06-07 Martin Robinson Reviewed by Xan Lopez. [GTK] gtk_widget_get_window should replace widget->window https://bugs.webkit.org/show_bug.cgi?id=40180 Replace all uses of widget->window with gtk_widget_get_window. For older GTK+ versions, #define gtk_widget_get_window in GtkVersioning.h. No tests necessary as functionality has not changed. * platform/gtk/GtkPluginWidget.cpp: (WebCore::GtkPluginWidget::invalidateRect): Replace widget->window use. * platform/gtk/GtkVersioning.h: Add gtk_widget_get_window for old GTK+ versions. * platform/gtk/PlatformScreenGtk.cpp: (WebCore::getVisual): Replace widget->window use. (WebCore::screenRect): Ditto. * platform/gtk/PopupMenuGtk.cpp: (WebCore::PopupMenu::show): Ditto. * platform/gtk/WidgetGtk.cpp: (WebCore::gdkDrawable): Ditto. (WebCore::Widget::setCursor): Ditto. 2010-06-07 Nikolas Zimmermann Reviewed by Sam Weinig. Add CPP bindings generator https://bugs.webkit.org/show_bug.cgi?id=38279 Add CPP bindings generator used in Olympia platform. We can succesfully generate cpp bindings for all IDLs except: - DOMWindow.idl / EventTarget.idl (filtered out in the IDL list in DerivedSources.make for non-jsc/v8 generators anyways, so no problem at all) - inspector/ (not needed for us at all) - svg/ (needs custom handling, related to animated attributes) All generated files are free of style issues: "Total errors found: 0 in 510 files" Not integrated in any build system so far, though I've successfully tested on Mac and inside Olympia, of course. * bindings/cpp: Added. * bindings/cpp/WebDOMCString.cpp: Added. (WebDOMCString::reset): (WebDOMCString::assign): (WebDOMCString::length): (WebDOMCString::data): (WebDOMCString::utf16): (WebDOMCString::fromUTF16): (WebDOMCString::WebDOMCString): (WebDOMCString::operator=): (WebDOMCString::operator WTF::CString): * bindings/cpp/WebDOMCString.h: Added. (WebDOMCString::~WebDOMCString): (WebDOMCString::WebDOMCString): (WebDOMCString::operator=): (WebDOMCString::isEmpty): (WebDOMCString::isNull): * bindings/cpp/WebDOMEventListenerCustom.cpp: Added. (WebDOMEventListener::handleEvent): (toWebKit): * bindings/cpp/WebDOMEventTarget.cpp: Added. (WebDOMEventTarget::WebDOMEventTargetPrivate::WebDOMEventTargetPrivate): (WebDOMEventTarget::WebDOMEventTarget): (WebDOMEventTarget::~WebDOMEventTarget): (WebDOMEventTarget::impl): (toWebCore): (toWebKit): * bindings/cpp/WebDOMEventTarget.h: Added. * bindings/cpp/WebDOMHTMLDocumentCustom.cpp: Added. (documentWrite): (WebDOMHTMLDocument::write): (WebDOMHTMLDocument::writeln): * bindings/cpp/WebDOMNodeCustom.cpp: Added. (WebDOMNode::insertBefore): (WebDOMNode::replaceChild): (WebDOMNode::removeChild): (WebDOMNode::appendChild): (WebDOMNode::addEventListener): (WebDOMNode::removeEventListener): * bindings/cpp/WebDOMObject.h: Added. (WebDOMObject::WebDOMObject): (WebDOMObject::~WebDOMObject): * bindings/cpp/WebDOMString.cpp: Added. (WebDOMString::reset): (WebDOMString::assign): (WebDOMString::length): (WebDOMString::data): (WebDOMString::utf8): (WebDOMString::fromUTF8): (WebDOMString::WebDOMString): (WebDOMString::operator=): (WebDOMString::operator WebCore::String): (WebDOMString::operator WebCore::AtomicString): (WebDOMString::equals): * bindings/cpp/WebDOMString.h: Added. (WebDOMString::~WebDOMString): (WebDOMString::WebDOMString): (WebDOMString::operator=): (WebDOMString::isEmpty): (WebDOMString::isNull): * bindings/cpp/WebExceptionHandler.cpp: Added. (globalExceptionHandler): (webInstallExceptionHandler): (webRaiseDOMException): * bindings/cpp/WebExceptionHandler.h: Added. (webDOMRaiseError): * bindings/cpp/WebNativeEventListener.cpp: Added. (WebNativeEventListener::WebNativeEventListener): (WebNativeEventListener::~WebNativeEventListener): (WebNativeEventListener::handleEvent): (WebNativeEventListener::reportError): (WebNativeEventListener::operator==): * bindings/cpp/WebNativeEventListener.h: Added. (WebNativeEventListener::create): (WebNativeEventListener::cast): * bindings/scripts/CodeGeneratorCPP.pm: Added. * bindings/scripts/test/CPP: Added. * bindings/scripts/test/CPP/WebDOMTestCallback.cpp: Added. (WebDOMTestCallback::WebDOMTestCallbackPrivate::WebDOMTestCallbackPrivate): (WebDOMTestCallback::WebDOMTestCallback): (WebDOMTestCallback::impl): (WebDOMTestCallback::~WebDOMTestCallback): (WebDOMTestCallback::callbackWithClass1Param): (WebDOMTestCallback::callbackWithClass2Param): (WebDOMTestCallback::callbackWithNonBoolReturnType): (toWebCore): (toWebKit): * bindings/scripts/test/CPP/WebDOMTestCallback.h: Added. * bindings/scripts/test/CPP/WebDOMTestInterface.cpp: Added. (WebDOMTestInterface::WebDOMTestInterfacePrivate::WebDOMTestInterfacePrivate): (WebDOMTestInterface::WebDOMTestInterface): (WebDOMTestInterface::impl): (WebDOMTestInterface::~WebDOMTestInterface): (toWebCore): (toWebKit): * bindings/scripts/test/CPP/WebDOMTestInterface.h: Added. * bindings/scripts/test/CPP/WebDOMTestObj.cpp: Added. (WebDOMTestObj::WebDOMTestObjPrivate::WebDOMTestObjPrivate): (WebDOMTestObj::WebDOMTestObj): (WebDOMTestObj::impl): (WebDOMTestObj::~WebDOMTestObj): (WebDOMTestObj::readOnlyIntAttr): (WebDOMTestObj::readOnlyStringAttr): (WebDOMTestObj::readOnlyTestObjAttr): (WebDOMTestObj::intAttr): (WebDOMTestObj::setIntAttr): (WebDOMTestObj::longLongAttr): (WebDOMTestObj::setLongLongAttr): (WebDOMTestObj::unsignedLongLongAttr): (WebDOMTestObj::setUnsignedLongLongAttr): (WebDOMTestObj::stringAttr): (WebDOMTestObj::setStringAttr): (WebDOMTestObj::testObjAttr): (WebDOMTestObj::setTestObjAttr): (WebDOMTestObj::attrWithException): (WebDOMTestObj::setAttrWithException): (WebDOMTestObj::attrWithSetterException): (WebDOMTestObj::setAttrWithSetterException): (WebDOMTestObj::attrWithGetterException): (WebDOMTestObj::setAttrWithGetterException): (WebDOMTestObj::scriptStringAttr): (WebDOMTestObj::voidMethod): (WebDOMTestObj::voidMethodWithArgs): (WebDOMTestObj::intMethod): (WebDOMTestObj::intMethodWithArgs): (WebDOMTestObj::objMethod): (WebDOMTestObj::objMethodWithArgs): (WebDOMTestObj::methodThatRequiresAllArgs): (WebDOMTestObj::methodThatRequiresAllArgsAndThrows): (WebDOMTestObj::serializedValue): (WebDOMTestObj::methodWithException): (WebDOMTestObj::addEventListener): (WebDOMTestObj::removeEventListener): (WebDOMTestObj::withDynamicFrame): (WebDOMTestObj::withDynamicFrameAndArg): (WebDOMTestObj::withDynamicFrameAndOptionalArg): (WebDOMTestObj::withScriptStateVoid): (WebDOMTestObj::withScriptStateObj): (WebDOMTestObj::withScriptStateVoidException): (WebDOMTestObj::withScriptStateObjException): (WebDOMTestObj::methodWithOptionalArg): (WebDOMTestObj::methodWithNonOptionalArgAndOptionalArg): (WebDOMTestObj::methodWithNonOptionalArgAndTwoOptionalArgs): (toWebCore): (toWebKit): * bindings/scripts/test/CPP/WebDOMTestObj.h: Added. * css/StyleSheet.idl: Export helper method isCSSStyleSheet() for cpp bindings only. * dom/CustomEvent.idl: Disabled for cpp bindings, needs arbitary input parameter handling support ('DOMObject' type). * dom/Document.idl: Ignore getCSSCanvasContext() for cpp bindings and export helper method isHTMLDocument() (cpp bindings only). * dom/Event.idl: Export isMutationEvent()/isMouseEvent()/isUIEvent() helpers for cpp bindings only. * dom/EventListener.h: Add CPPEventListenerType. * dom/Node.idl: addEventListener/removeEventListener need [Custom] flag for cpp bindings. * dom/PopStateEvent.idl: Disabled just like CustomEvent, for the same reason ("any" argument type handling). * html/HTMLCanvasElement.idl: Disable getContext() method for cpp bindings, as it's done for objc bindings. * html/HTMLDocument.idl: Add [NoCPPCustom] marker for open(), as we're just autogenerating it. * html/HTMLInputElement.idl: Disable valueAsDate() method for cpp bindings, as we're missing native 'Date' type support. * html/TextMetrics.h: Add missing PassRefPtr.h include. * html/canvas/CanvasRenderingContext2D.idl: Disable methods (setLineCap, etc..) for cpp bindings whose names clash with property setters. * page/AbstractView.idl: Rename 'Media' type to 'StyleMedia' - this should have been done before. * page/Location.idl: Disable several methods which would need a custom implementation for the cpp bindings. * page/WebKitPoint.h: Add missing PassRefPtr.h include. * storage/SQLResultSet.idl: Correct type from 'long' to 'long long', for cpp bindings only though as it wouldn't build on Chromium/V8. * workers/DedicatedWorkerContext.idl: Disable postMessage() for now when using cpp bindings, would need custom code for us. * workers/WorkerContext.idl: Hide constructors from cpp bindings. 2010-06-07 Julien Chaffraix Reviewed by Alexey Proskuryakov. Space should be allowed between -- and > in comment end https://bugs.webkit.org/show_bug.cgi?id=21945 Implemented the HTML comment parsing algorithm so that we match HTML5 and FF when parsing comments. Missing from this patch is the parser errors, which will be added in a follow up patch. Added tests cases for broken comments. Tests: fast/parser/broken-comment-1.html fast/parser/broken-comment-2.html fast/parser/broken-comment-3.html fast/parser/broken-comment-4.html fast/parser/broken-comment-5.html fast/parser/broken-comment-6.html fast/parser/broken-comment-in-head-1.html fast/parser/broken-comment-in-head-2.html fast/parser/broken-comment-in-head-3.html fast/parser/broken-comment-in-head-4.html fast/parser/broken-comment-in-head-5.html * html/HTMLTokenizer.cpp: (WebCore::HTMLTokenizer::parseComment): Now we use a state machine that matches the HTML5 specification. (WebCore::HTMLTokenizer::emitCommentToken): This emits the comment token and keep some of the original behavior as parseComment is called in wrong context (inside a for example). Added a more explicit comment about this. (WebCore::HTMLTokenizer::parseTag): Remove the handling of <!--> in quirks mode. HTML5 specifies that we should accept this in strict mode too. * html/HTMLTokenizer.h: (WebCore::HTMLTokenizer::): Added a new enum for the comment parsing state. 2010-06-07 Mahesh Kulakrni <mahesh.kulkarni@nokia.com> Reviewed by Simon Hausmann. [QT] QT_BEARER flag is not enabled on S60 properly https://bugs.webkit.org/show_bug.cgi?id=39357 enable QT_BEARER for all platform based on qtmobility + bearer module availability or for qt 4.7+ * WebCore.pri: 2010-06-07 Leon Clarke <leonclarke@google.com> Reviewed by Jeremy Orlow. Fix indexeddb idls in android makefile https://bugs.webkit.org/show_bug.cgi?id=40169 No new tests. Android-specific build fix. * Android.derived.v8bindings.mk: 2010-06-07 Andrei Popescu <andreip@google.com> Reviewed by Jeremy Orlow. [indexedDB] It is impossible to create object stores https://bugs.webkit.org/show_bug.cgi?id=40054 No new tests. Layout tests will be added separately. * Android.mk: * CMakeLists.txt: * GNUmakefile.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * bindings/scripts/CodeGeneratorJS.pm: * bindings/scripts/CodeGeneratorV8.pm: * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp: (webkit_dom_test_obj_with_script_execution_context): * bindings/scripts/test/GObject/WebKitDOMTestObj.h: * bindings/scripts/test/JS/JSTestObj.cpp: (WebCore::): (WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContext): * bindings/scripts/test/JS/JSTestObj.h: * bindings/scripts/test/ObjC/DOMTestObj.h: * bindings/scripts/test/ObjC/DOMTestObj.mm: (-[DOMTestObj withScriptExecutionContext]): * bindings/scripts/test/TestObj.idl: * bindings/scripts/test/V8/V8TestObj.cpp: (WebCore::TestObjInternal::withScriptExecutionContextCallback): (WebCore::): * page/DOMWindow.cpp: (WebCore::DOMWindow::clear): (WebCore::DOMWindow::indexedDB): * storage/IDBCallbacks.h: * storage/IDBDatabase.h: * storage/IDBDatabaseImpl.cpp: (WebCore::IDBDatabaseImpl::createObjectStore): * storage/IDBDatabaseImpl.h: * storage/IDBDatabaseRequest.cpp: (WebCore::IDBDatabaseRequest::IDBDatabaseRequest): (WebCore::IDBDatabaseRequest::createObjectStore): * storage/IDBDatabaseRequest.h: * storage/IDBDatabaseRequest.idl: * storage/IDBObjectStore.cpp: Removed. * storage/IDBObjectStore.h: (WebCore::IDBObjectStore::~IDBObjectStore): * storage/IDBObjectStoreImpl.cpp: Added. (WebCore::IDBObjectStoreImpl::~IDBObjectStoreImpl): (WebCore::IDBObjectStoreImpl::IDBObjectStoreImpl): (WebCore::IDBObjectStoreImpl::indexNames): (WebCore::IDBObjectStoreImpl::createIndex): (WebCore::IDBObjectStoreImpl::index): (WebCore::IDBObjectStoreImpl::removeIndex): * storage/IDBObjectStoreImpl.h: Added. (WebCore::IDBObjectStoreImpl::create): (WebCore::IDBObjectStoreImpl::name): (WebCore::IDBObjectStoreImpl::keyPath): * storage/IDBObjectStoreRequest.cpp: (WebCore::IDBObjectStoreRequest::IDBObjectStoreRequest): * storage/IDBObjectStoreRequest.h: (WebCore::IDBObjectStoreRequest::create): * storage/IDBRequest.cpp: (WebCore::IDBRequest::onSuccess): * storage/IDBRequest.h: * storage/IndexedDatabaseRequest.cpp: (WebCore::IndexedDatabaseRequest::IndexedDatabaseRequest): (WebCore::IndexedDatabaseRequest::open): * storage/IndexedDatabaseRequest.h: (WebCore::IndexedDatabaseRequest::create): * storage/IndexedDatabaseRequest.idl: 2010-06-07 Nikolas Zimmermann <nzimmermann@rim.com> Not reviewed. Updated run-bindings-tests results. * bindings/scripts/test/JS/JSTestInterface.cpp: (WebCore::JSTestInterfaceConstructor::constructTestInterface): * bindings/scripts/test/JS/JSTestObj.cpp: (WebCore::jsTestObjPrototypeFunctionVoidMethod): (WebCore::jsTestObjPrototypeFunctionVoidMethodWithArgs): (WebCore::jsTestObjPrototypeFunctionIntMethod): (WebCore::jsTestObjPrototypeFunctionIntMethodWithArgs): (WebCore::jsTestObjPrototypeFunctionObjMethod): (WebCore::jsTestObjPrototypeFunctionObjMethodWithArgs): (WebCore::jsTestObjPrototypeFunctionMethodThatRequiresAllArgs): (WebCore::jsTestObjPrototypeFunctionMethodThatRequiresAllArgsAndThrows): (WebCore::jsTestObjPrototypeFunctionSerializedValue): (WebCore::jsTestObjPrototypeFunctionMethodWithException): (WebCore::jsTestObjPrototypeFunctionCustomMethod): (WebCore::jsTestObjPrototypeFunctionCustomMethodWithArgs): (WebCore::jsTestObjPrototypeFunctionCustomArgsAndException): (WebCore::jsTestObjPrototypeFunctionAddEventListener): (WebCore::jsTestObjPrototypeFunctionRemoveEventListener): (WebCore::jsTestObjPrototypeFunctionWithDynamicFrame): (WebCore::jsTestObjPrototypeFunctionWithDynamicFrameAndArg): (WebCore::jsTestObjPrototypeFunctionWithDynamicFrameAndOptionalArg): (WebCore::jsTestObjPrototypeFunctionWithDynamicFrameAndUserGesture): (WebCore::jsTestObjPrototypeFunctionWithDynamicFrameAndUserGestureASAD): (WebCore::jsTestObjPrototypeFunctionWithScriptStateVoid): (WebCore::jsTestObjPrototypeFunctionWithScriptStateObj): (WebCore::jsTestObjPrototypeFunctionWithScriptStateVoidException): (WebCore::jsTestObjPrototypeFunctionWithScriptStateObjException): (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalArg): (WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndOptionalArg): (WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndTwoOptionalArgs): (WebCore::jsTestObjPrototypeFunctionOverloadedMethod1): (WebCore::jsTestObjPrototypeFunctionOverloadedMethod2): (WebCore::jsTestObjPrototypeFunctionOverloadedMethod3): (WebCore::jsTestObjPrototypeFunctionOverloadedMethod4): (WebCore::jsTestObjPrototypeFunctionOverloadedMethod): * bindings/scripts/test/JS/JSTestObj.h: 2010-06-07 Pavel Podivilov <podivilov@chromium.org> Reviewed by Pavel Feldman. Web Inspector: Implement JSON parsing for InspectorValue. https://bugs.webkit.org/show_bug.cgi?id=40064 * inspector/InspectorValues.cpp: (WebCore::): (WebCore::InspectorValue::asBool): (WebCore::InspectorValue::asNumber): (WebCore::InspectorValue::asString): (WebCore::InspectorValue::asObject): (WebCore::InspectorValue::asArray): (WebCore::InspectorValue::readJSON): (WebCore::InspectorValue::writeJSON): (WebCore::InspectorBasicValue::asBool): (WebCore::InspectorBasicValue::asNumber): (WebCore::InspectorBasicValue::writeJSON): (WebCore::InspectorString::asString): (WebCore::InspectorObject::asObject): (WebCore::InspectorObject::getBool): (WebCore::InspectorObject::getNumber): (WebCore::InspectorObject::getString): (WebCore::InspectorObject::getObject): (WebCore::InspectorObject::getArray): (WebCore::InspectorObject::get): (WebCore::InspectorArray::asArray): * inspector/InspectorValues.h: (WebCore::InspectorObject::begin): (WebCore::InspectorObject::end): 2010-06-07 Jocelyn Turcotte <jocelyn.turcotte@nokia.com> Reviewed by Simon Hausmann. [Qt] Fix text selection drawing. https://bugs.webkit.org/show_bug.cgi?id=40221 The regression was introduced in r60169. * platform/graphics/qt/FontQt.cpp: (WebCore::drawTextCommon): 2010-06-07 Yury Semikhatsky <yurys@chromium.org> Reviewed by Pavel Feldman. Web Inspector: should be possible to distinguish extension scripts from main world scripts https://bugs.webkit.org/show_bug.cgi?id=40220 * bindings/js/ScriptDebugServer.cpp: remove global listeners set which is not used anymore. (WebCore::ScriptDebugServer::dispatchDidParseSource): pass script wrold type to the listeners. (WebCore::currentWorldType): (WebCore::ScriptDebugServer::sourceParsed): * bindings/js/ScriptDebugServer.h: * bindings/v8/ScriptDebugServer.cpp: (WebCore::ScriptDebugServer::dispatchDidParseSource): * inspector/InspectorController.cpp: (WebCore::InspectorController::didParseSource): * inspector/InspectorController.h: * inspector/InspectorFrontend.cpp: (WebCore::InspectorFrontend::parsedScriptSource): * inspector/InspectorFrontend.h: * inspector/ScriptDebugListener.h: pass type of the isolated world where the script was compiled to didParseSource. (WebCore::): * inspector/front-end/InjectedScript.js: (injectedScriptConstructor): * inspector/front-end/Script.js: (WebInspector.Script): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype.addScript): (WebInspector.ScriptsPanel.prototype._addScriptToFilesMenu): use different style to highlight content scripts. * inspector/front-end/inspector.css: (#scripts-files option.extension-script): * inspector/front-end/inspector.js: (WebInspector.parsedScriptSource): 2010-06-06 MORITA Hajime <morrita@google.com> Unreviewd, Chromium windows build fix. * rendering/RenderThemeChromiumWin.cpp: (WebCore::RenderThemeChromiumWin::paintProgressBar): 2010-06-06 MORITA Hajime <morrita@google.com> Reviewed by Kent Tamura. ASSERTION FAILED with -webkit-appearance:progress-bar for non <progress> elements https://bugs.webkit.org/show_bug.cgi?id=40158 paintProgressBar() and paintMeter() assumed given RenderObject is RenderProgress or RenderMeter respectively, but arbitrary elements can have -webkit-appearance: progress-bar and such elements violates that assumption. So this change added type check before downcasting the RenderObject. * platform/qt/RenderThemeQt.cpp: (WebCore::RenderThemeQt::paintProgressBar): * rendering/RenderTheme.cpp: (WebCore::RenderTheme::paintMeter): * rendering/RenderThemeChromiumSkia.cpp: (WebCore::RenderThemeChromiumSkia::paintProgressBar): * rendering/RenderThemeChromiumWin.cpp: (WebCore::RenderThemeChromiumWin::paintProgressBar): * rendering/RenderThemeMac.mm: (WebCore::RenderThemeMac::paintProgressBar): 2010-06-06 Gavin Barraclough <barraclough@apple.com> Reviewed by NOBODY (Qt build fix pt 2). * bridge/qt/qt_runtime.cpp: (JSC::Bindings::findMethodIndex): (JSC::Bindings::QtRuntimeMetaMethod::call): (JSC::Bindings::QtRuntimeConnectionMethod::call): 2010-06-06 Gavin Barraclough <barraclough@apple.com> Reviewed by NOBODY (Qt build fix). * bridge/qt/qt_runtime.cpp: (JSC::Bindings::findMethodIndex): (JSC::Bindings::QtRuntimeMetaMethod::call): (JSC::Bindings::QtRuntimeConnectionMethod::call): 2010-06-06 Gavin Barraclough <barraclough@apple.com> Reviewed by Sam Weinig. Bug 40214 - Clean up error construction / throwing in JSC. The one egregious insanity here is that creating an error requires a VM-entry-esqe-host call (the string argument is wrapped as a JS object & pushed on the RegisterFile, then unwrapped back to a UString). Changing this also means you only require a global object, not an ExecState, to create an error. The methods to create error objects are also parameterized requiring a switch on the type, which can be made cleaner and faster by moving to a separate method per error type. Code to add divot information to error had been duplicated, and is coalesced back into a single function. Convenience methods added to create & throw type & syntax error with a default error message, since this is a common case. Also, errors are currently thrown either using "throwError(exec, error)" or "exec->setException(error)" - unify on the former, since this is more commonly used. Add "throwVMError(exec, error)" equivalents, as a convenience for cases where the result was being wrapped in "JSValue::encode(...)". * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSArrayBufferConstructor.h: (WebCore::construct): * bindings/js/JSArrayBufferViewHelper.h: (WebCore::setWebGLArrayHelper): * bindings/js/JSAudioConstructor.cpp: (WebCore::constructAudio): * bindings/js/JSCanvasRenderingContext2DCustom.cpp: (WebCore::JSCanvasRenderingContext2D::setFillColor): (WebCore::JSCanvasRenderingContext2D::setStrokeColor): (WebCore::JSCanvasRenderingContext2D::drawImage): (WebCore::JSCanvasRenderingContext2D::drawImageFromRect): (WebCore::JSCanvasRenderingContext2D::setShadow): (WebCore::JSCanvasRenderingContext2D::createPattern): (WebCore::JSCanvasRenderingContext2D::fillText): (WebCore::JSCanvasRenderingContext2D::strokeText): * bindings/js/JSClipboardCustom.cpp: (WebCore::JSClipboard::clearData): (WebCore::JSClipboard::getData): (WebCore::JSClipboard::setDragImage): * bindings/js/JSDOMBinding.cpp: (WebCore::setDOMException): (WebCore::toJSSequence): * bindings/js/JSDOMWrapper.cpp: (WebCore::DOMObject::defineOwnProperty): * bindings/js/JSDesktopNotificationsCustom.cpp: (WebCore::JSNotificationCenter::requestPermission): * bindings/js/JSEventSourceConstructor.cpp: (WebCore::constructEventSource): * bindings/js/JSHTMLDocumentCustom.cpp: (WebCore::JSHTMLDocument::open): * bindings/js/JSHTMLInputElementCustom.cpp: (WebCore::JSHTMLInputElement::selectionStart): (WebCore::JSHTMLInputElement::setSelectionStart): (WebCore::JSHTMLInputElement::selectionEnd): (WebCore::JSHTMLInputElement::setSelectionEnd): (WebCore::JSHTMLInputElement::setSelectionRange): * bindings/js/JSImageConstructor.cpp: (WebCore::constructImage): * bindings/js/JSJavaScriptCallFrameCustom.cpp: (WebCore::JSJavaScriptCallFrame::evaluate): * bindings/js/JSMessageChannelConstructor.cpp: (WebCore::JSMessageChannelConstructor::construct): * bindings/js/JSMessagePortCustom.cpp: (WebCore::fillMessagePortArray): * bindings/js/JSOptionConstructor.cpp: (WebCore::constructHTMLOptionElement): * bindings/js/JSSVGMatrixCustom.cpp: (WebCore::JSSVGMatrix::multiply): * bindings/js/JSSharedWorkerConstructor.cpp: (WebCore::constructSharedWorker): * bindings/js/JSWebGLRenderingContextCustom.cpp: (WebCore::JSWebGLRenderingContext::bufferData): (WebCore::JSWebGLRenderingContext::bufferSubData): (WebCore::getObjectParameter): (WebCore::JSWebGLRenderingContext::getFramebufferAttachmentParameter): (WebCore::JSWebGLRenderingContext::getParameter): (WebCore::JSWebGLRenderingContext::getProgramParameter): (WebCore::JSWebGLRenderingContext::getShaderParameter): (WebCore::JSWebGLRenderingContext::getUniform): (WebCore::JSWebGLRenderingContext::texImage2D): (WebCore::JSWebGLRenderingContext::texSubImage2D): (WebCore::dataFunctionf): (WebCore::dataFunctioni): (WebCore::dataFunctionMatrix): * bindings/js/JSWebSocketConstructor.cpp: (WebCore::constructWebSocket): * bindings/js/JSWebSocketCustom.cpp: (WebCore::JSWebSocket::send): * bindings/js/JSWorkerConstructor.cpp: (WebCore::constructWorker): * bindings/js/JSXMLHttpRequestConstructor.cpp: (WebCore::constructXMLHttpRequest): * bindings/js/JSXMLHttpRequestCustom.cpp: (WebCore::JSXMLHttpRequest::open): * bindings/js/SerializedScriptValue.cpp: (WebCore::BaseWalker::throwStackOverflow): (WebCore::BaseWalker::throwInterruptedException): (WebCore::SerializingTreeWalker::startArray): (WebCore::SerializingTreeWalker::startObject): * bindings/js/WorkerScriptController.cpp: (WebCore::WorkerScriptController::setException): * bindings/scripts/CodeGeneratorJS.pm: * bridge/c/c_instance.cpp: (JSC::Bindings::CInstance::moveGlobalExceptionToExecState): (JSC::Bindings::CInstance::invokeMethod): (JSC::Bindings::CInstance::invokeDefaultMethod): (JSC::Bindings::CInstance::invokeConstruct): * bridge/jni/jsc/JNIBridgeJSC.cpp: (JavaField::dispatchValueFromInstance): (JavaField::dispatchSetValueToInstance): * bridge/jni/jsc/JavaInstanceJSC.cpp: (JavaInstance::invokeMethod): * bridge/objc/objc_instance.mm: (ObjcInstance::moveGlobalExceptionToExecState): (ObjcInstance::invokeMethod): * bridge/objc/objc_runtime.mm: (JSC::Bindings::ObjcField::valueFromInstance): (JSC::Bindings::ObjcField::setValueToInstance): (JSC::Bindings::ObjcArray::setValueAt): (JSC::Bindings::ObjcArray::valueAt): (JSC::Bindings::callObjCFallbackObject): * bridge/objc/objc_utility.h: * bridge/objc/objc_utility.mm: (JSC::Bindings::throwError): * bridge/runtime_array.cpp: (JSC::RuntimeArray::put): * bridge/runtime_method.cpp: (JSC::callRuntimeMethod): * bridge/runtime_object.cpp: (JSC::Bindings::RuntimeObject::throwInvalidAccessError): 2010-06-06 Dirk Schulze <krit@webkit.org> Reviewed by Nikolas Zimmermann. hit testing does not respect clip paths https://bugs.webkit.org/show_bug.cgi?id=15162 Test: svg/dynamic-updates/SVGClipPath-influences-hitTesting.html Added a check, if a float point is not only in the shape/object boundaries but also is not in the clipped away area of a clipPath. * rendering/HitTestRequest.h: (WebCore::HitTestRequest::): (WebCore::HitTestRequest::svgClipContent): * rendering/RenderPath.cpp: (WebCore::RenderPath::fillContains): (WebCore::RenderPath::nodeAtFloatPoint): * rendering/RenderPath.h: * rendering/RenderSVGContainer.cpp: (WebCore::RenderSVGContainer::nodeAtFloatPoint): * rendering/RenderSVGImage.cpp: (WebCore::RenderSVGImage::nodeAtFloatPoint): * rendering/RenderSVGResourceClipper.cpp: (WebCore::RenderSVGResourceClipper::hitTestClipContent): * rendering/RenderSVGResourceClipper.h: * rendering/RenderSVGText.cpp: (WebCore::RenderSVGText::nodeAtFloatPoint): * rendering/SVGRenderSupport.cpp: (WebCore::pointInClippingArea): * rendering/SVGRenderSupport.h: 2010-06-06 Dirk Schulze <krit@webkit.org> Reviewed by Nikolas Zimmermann. SVG Pattern/Gradient clean-up https://bugs.webkit.org/show_bug.cgi?id=40205 Transformations of SVG Patterns and Gradients can be bundeled. This calculation also needs just to be calculated once. It's not a great speed-up for most platforms, but a clean-up and preparation for new features like vectorEffects and others. Now, that we don't recalucluate the gradient and its transformations, it was necessary to add a way to transform alreday existing gradients on Cairo. This is done in the same way like Skia transforms gradients after they were created. This patch doesn't change functionality, so no new tests added. * platform/graphics/Gradient.cpp: * platform/graphics/cairo/GradientCairo.cpp: (WebCore::Gradient::setPlatformGradientSpaceTransform): * rendering/RenderSVGResourceGradient.cpp: (WebCore::RenderSVGResourceGradient::applyResource): * rendering/RenderSVGResourceGradient.h: * rendering/RenderSVGResourcePattern.cpp: (WebCore::RenderSVGResourcePattern::applyResource): (WebCore::RenderSVGResourcePattern::createTileImage): (WebCore::RenderSVGResourcePattern::buildPattern): * rendering/RenderSVGResourcePattern.h: 2010-06-05 Dumitru Daniliuc <dumi@chromium.org> Unreviewed, typo/build fix. * bindings/v8/custom/V8CustomSQLStatementErrorCallback.cpp: (WebCore::V8SQLStatementErrorCallback::handleEvent): 2010-05-28 Dumitru Daniliuc <dumi@chromium.org> Reviewed by Adam Barth. Do not pass empty handles to v8. https://bugs.webkit.org/show_bug.cgi?id=39896 Passing an empty handle to v8 results in a crash with a stack trace that doesn't give us much information about the cause of the crash. Instead, if we check the handles we pass to v8 and crash when they are empty, we do not make things worse, and should get a more informative stack trace. * bindings/scripts/CodeGeneratorV8.pm: * bindings/scripts/test/V8/V8TestCallback.cpp: (WebCore::V8TestCallback::callbackWithClass1Param): (WebCore::V8TestCallback::callbackWithClass2Param): * bindings/v8/custom/V8CustomSQLStatementErrorCallback.cpp: (WebCore::V8SQLStatementErrorCallback::handleEvent): 2010-05-30 Antonio Gomes <tonikitoo@webkit.org> Reviewed by Darin Adler. Add a convenient helper getter for Frame* to RenderObject https://bugs.webkit.org/show_bug.cgi?id=39928 document()->frame() is being called enough from RenderObject derivated classes that it worth adding a helper Frame getter as a shortcut. No behavior change, so no new tests. * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::isOffScreen): (WebCore::AccessibilityRenderObject::stringValue): (WebCore::AccessibilityRenderObject::selection): (WebCore::AccessibilityRenderObject::setSelectedVisiblePositionRange): * page/EventHandler.cpp: (WebCore::canAutoscroll): * rendering/InlineTextBox.cpp: (WebCore::InlineTextBox::paint): (WebCore::InlineTextBox::paintCustomHighlight): (WebCore::InlineTextBox::paintTextMatchMarker): * rendering/RenderBlock.cpp: (WebCore::RenderBlock::paintCaret): * rendering/RenderBox.cpp: (WebCore::RenderBox::paintCustomHighlight): * rendering/RenderDataGrid.cpp: (WebCore::RenderDataGrid::isActive): * rendering/RenderFrameSet.cpp: (WebCore::RenderFrameSet::flattenFrameSet): * rendering/RenderImage.cpp: (WebCore::RenderImage::paintFocusRings): * rendering/RenderInline.cpp: (WebCore::RenderInline::addDashboardRegions): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::~RenderLayer): (WebCore::RenderLayer::panScrollFromPoint): (WebCore::RenderLayer::scrollByRecursively): (WebCore::RenderLayer::scrollToOffset): (WebCore::RenderLayer::autoscroll): (WebCore::RenderLayer::isActive): (showLayerTree): * rendering/RenderLayerBacking.cpp: (WebCore::inspectorTimelineAgent): * rendering/RenderListBox.cpp: (WebCore::RenderListBox::paintItemForeground): (WebCore::RenderListBox::paintItemBackground): (WebCore::RenderListBox::panScroll): (WebCore::RenderListBox::autoscroll): (WebCore::RenderListBox::isActive): * rendering/RenderObject.cpp: (WebCore::RenderObject::~RenderObject): (WebCore::RenderObject::selectionBackgroundColor): (WebCore::RenderObject::selectionForegroundColor): (WebCore::RenderObject::destroy): (WebCore::RenderObject::addDashboardRegions): (WebCore::RenderObject::animation): * rendering/RenderObject.h: (WebCore::RenderObject::document): (WebCore::RenderObject::frame): 2010-06-05 Jonathan Kliegman <kliegs@chromium.org> Reviewed by Dirk Schulze. SVG doesn't support rgba colors https://bugs.webkit.org/show_bug.cgi?id=16183 Enabled processing of rgba, hsl and hsla color specifications for SVG files. SVG spec calls for CSS2 but common usage and other browsers suppor CSS3 colors being used in SVG files Removed unused svg paramater from CSSParser::parseColorFromValue Tests: svg/custom/fill-opacity-hsl.svg svg/custom/fill-opacity-rgba.svg * css/CSSParser.cpp: (WebCore::CSSParser::parseColorFromValue): * css/CSSParser.h: * css/SVGCSSParser.cpp: (WebCore::CSSParser::parseSVGValue): (WebCore::CSSParser::parseSVGPaint): (WebCore::CSSParser::parseSVGColor): * svg/SVGColor.cpp: (WebCore::SVGColor::colorFromRGBColorString): 2010-06-05 Anders Bakken <agbakken@gmail.com> Reviewed by Eric Seidel. [Qt] ContextMenuItemQt.cpp has coding-style errors https://bugs.webkit.org/show_bug.cgi?id=39780 * platform/qt/ContextMenuItemQt.cpp: 2010-06-05 Anders Bakken <agbakken@gmail.com> Reviewed by Eric Seidel. [Qt] ContextMenuQt.cpp has coding-style errors https://bugs.webkit.org/show_bug.cgi?id=39779 * platform/qt/ContextMenuQt.cpp: 2010-06-05 Anders Bakken <agbakken@gmail.com> Reviewed by Eric Seidel. [Qt] DragDataQt.cpp has coding-style errors https://bugs.webkit.org/show_bug.cgi?id=39777 * platform/qt/DragDataQt.cpp: 2010-06-05 Anders Bakken <agbakken@gmail.com> Reviewed by Eric Seidel. [Qt] FileChooserQt.cpp has coding-style errors https://bugs.webkit.org/show_bug.cgi?id=39776 * platform/qt/FileChooserQt.cpp: 2010-06-05 Anders Bakken <agbakken@gmail.com> Reviewed by Eric Seidel. [Qt] FileSystemQt.cpp has coding-style errors https://bugs.webkit.org/show_bug.cgi?id=39775 * platform/qt/FileSystemQt.cpp: 2010-06-05 Anders Bakken <agbakken@gmail.com> Reviewed by Eric Seidel. [Qt] KURLQt.cpp has coding-style errors https://bugs.webkit.org/show_bug.cgi?id=39774 * platform/qt/KURLQt.cpp: 2010-06-05 Anders Bakken <agbakken@gmail.com> Reviewed by Eric Seidel. [Qt] LoggingQt.cpp has coding-style errors https://bugs.webkit.org/show_bug.cgi?id=39772 * platform/qt/LoggingQt.cpp: 2010-06-05 Anders Bakken <agbakken@gmail.com> Reviewed by Eric Seidel. [Qt] PlatformKeyboardEventQt.cpp has coding-style errors https://bugs.webkit.org/show_bug.cgi?id=39770 * platform/qt/PlatformKeyboardEventQt.cpp: (WebCore::keyIdentifierForQtKeyCode): (WebCore::windowsKeyCodeForKeyEvent): (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent): 2010-06-05 Anders Bakken <agbakken@gmail.com> Reviewed by Eric Seidel. [Qt] PlatformScreenQt.cpp has coding-style errors https://bugs.webkit.org/show_bug.cgi?id=39768 * platform/qt/PlatformMouseEventQt.cpp: (WebCore::PlatformMouseEvent::PlatformMouseEvent): 2010-06-05 Anders Bakken <agbakken@gmail.com> Reviewed by Eric Seidel. [Qt] RenderThemeQt.cpp has coding-style errors https://bugs.webkit.org/show_bug.cgi?id=39767 * platform/qt/RenderThemeQt.cpp: 2010-06-05 Anders Bakken <agbakken@gmail.com> Reviewed by Eric Seidel. [Qt] ScrollbarQt.cpp has coding-style errors https://bugs.webkit.org/show_bug.cgi?id=39765 * platform/qt/ScrollbarQt.cpp: 2010-06-04 Adam Barth <abarth@webkit.org> Reviewed by Eric Seidel. Make HTML5Lexer go fast https://bugs.webkit.org/show_bug.cgi?id=40048 This patch changes us from using a jump table for each character to using absolute jumps between parser states. This appears to be about a 1% improvement on the parser bench mark (which is 1/10th of what we need to catch the old parser). I've kept the underlying logic as close to the old logic as possible. This new form will make it easier to handle the input stream part of the spec and to make further performance improvements. * html/HTML5Lexer.cpp: (WebCore::HTML5Lexer::reset): (WebCore::HTML5Lexer::nextToken): (WebCore::HTML5Lexer::emitCurrentToken): * html/HTML5Lexer.h: 2010-06-04 Adam Barth <abarth@webkit.org> Reviewed by Darin Adler. HTML5 parser should be within 1% of old parser performance https://bugs.webkit.org/show_bug.cgi?id=40172 Stop using adopt(). I think this function is cause us to do extra mallocs that are hurting performance. Instead of caching AtomicString on HTML5Token, just use the AtomicString on the old token. Also, reserve inline capacity for 10 attributes. * html/HTML5Lexer.cpp: (WebCore::HTML5Lexer::isAppropriateEndTag): * html/HTML5Lexer.h: * html/HTML5Token.h: (WebCore::HTML5Token::beginStartTag): (WebCore::HTML5Token::beginEndTag): (WebCore::HTML5Token::beginCharacter): (WebCore::HTML5Token::beginComment): (WebCore::HTML5Token::beginDOCTYPE): (WebCore::HTML5Token::name): (WebCore::HTML5Token::characters): (WebCore::HTML5Token::comment): * html/HTML5TreeBuilder.cpp: (WebCore::convertToOldStyle): (WebCore::HTML5TreeBuilder::passTokenToLegacyParser): 2010-06-04 Anders Bakken <agbakken@gmail.com> Reviewed by Eric Seidel. [Qt] ScrollbarThemeQt.cpp has coding-style errors https://bugs.webkit.org/show_bug.cgi?id=39764 * platform/qt/ScrollbarThemeQt.cpp: (WebCore::scPart): (WebCore::scrollbarPart): (WebCore::styleOptionSlider): 2010-06-04 Anders Bakken <agbakken@gmail.com> Reviewed by Eric Seidel. [Qt] SharedTimerQt.cpp has coding-style errors https://bugs.webkit.org/show_bug.cgi?id=39763 * platform/qt/SharedTimerQt.cpp: 2010-06-04 Anders Bakken <agbakken@gmail.com> Reviewed by Eric Seidel. WidgetQt.cpp has coding-style errors https://bugs.webkit.org/show_bug.cgi?id=39759 * platform/qt/WidgetQt.cpp: 2010-06-04 Anders Bakken <agbakken@gmail.com> Reviewed by Eric Seidel. TemporaryLinkStubsQt.cpp has coding-style errors https://bugs.webkit.org/show_bug.cgi?id=39761 * platform/qt/TemporaryLinkStubsQt.cpp: 2010-06-04 Anders Bakken <agbakken@gmail.com> Reviewed by Eric Seidel. [Qt] SoundQt.cpp has coding-style errors https://bugs.webkit.org/show_bug.cgi?id=39762 * platform/qt/SoundQt.cpp: 2010-06-04 Andreas Kling <andreas.kling@nokia.com> Reviewed by Dirk Schulze. Canvas createPattern(img, repetition) shouldn't throw INVALID_STATE_ERR when !img.complete https://bugs.webkit.org/show_bug.cgi?id=40166 Spec link: http://www.whatwg.org/specs/web-apps/current-work/#dom-context-2d-createpattern Test: http/tests/misc/canvas-pattern-from-incremental-image.html (updated) * html/canvas/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::createPattern): 2010-06-04 Anders Bakken <agbakken@gmail.com> Reviewed by David Levin. [Qt] Localizations.cpp has coding-style errors https://bugs.webkit.org/show_bug.cgi?id=39773 * platform/qt/Localizations.cpp: (WebCore::localizedMediaTimeDescription): 2010-06-04 Lyon Chen <liachen@rim.com> Reviewed by Darin Adler. ApplicationCacheStorage::storeNewestCache() Crash WebKit when openDatabase(true) failed https://bugs.webkit.org/show_bug.cgi?id=40074 Adding m_database.isOpen() check for every openDatabase(true) call, this is needed because openDatabase(true) could still fail, for example when cacheStorage is full or no longer available. * loader/appcache/ApplicationCacheStorage.cpp: (WebCore::ApplicationCacheStorage::store): (WebCore::ApplicationCacheStorage::storeNewestCache): 2010-06-04 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r60684. http://trac.webkit.org/changeset/60684 https://bugs.webkit.org/show_bug.cgi?id=40196 This patch broke chromium reliability tests (Requested by tonyg-cr on #webkit). * bindings/v8/ScriptSourceCode.h: (WebCore::ScriptSourceCode::ScriptSourceCode): * bindings/v8/V8Proxy.cpp: (WebCore::V8Proxy::compileScript): (WebCore::V8Proxy::evaluate): * bindings/v8/V8Proxy.h: 2010-06-04 Chris Fleizach <cfleizach@apple.com> Reviewed by David Kilzer. AX: need an aria-help https://bugs.webkit.org/show_bug.cgi?id=40010 Test: accessibility/aria-help.html * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::helpText): * html/HTMLAttributeNames.in: 2010-06-04 Andreas Kling <andreas.kling@nokia.com> Reviewed by Tor Arne Vestbø. [Qt] Canvas arc() with zero radius should draw a line to the start point https://bugs.webkit.org/show_bug.cgi?id=40164 Spec link: http://www.whatwg.org/specs/web-apps/current-work/#dom-context-2d-arc * platform/graphics/qt/PathQt.cpp: (WebCore::Path::addArc): 2010-06-04 Martin Robinson <mrobinson@igalia.com> Reviewed by Xan Lopez. [GTK] RenderThemeGtk leaks memory https://bugs.webkit.org/show_bug.cgi?id=40168 Call gtk_widget_destroy in the RenderThemeGtk destructor. This cleans up all widget resources when a theme is destroyed. No new tests, because functionality has not changed. * platform/gtk/RenderThemeGtk.cpp: (WebCore::RenderThemeGtk::~RenderThemeGtk): Call gtk_widget_destroy on m_gtkWindow. 2010-06-04 Martin Robinson <mrobinson@igalia.com> Reviewed by Xan Lopez. [GTK] RenderThemeGtk leaks memory https://bugs.webkit.org/show_bug.cgi?id=40168 Remove the use of releaseRef to assign a value to a RefPtr. This results in the original pointer taking an extra reference. * platform/gtk/RenderThemeGtk.cpp: (WebCore::RenderThemeGtk::initMediaStyling): Remove the use of releaseRef here. 2010-06-04 Adam Barth <abarth@webkit.org> Reviewed by Gavin Barraclough. Try to fix the windows build https://bugs.webkit.org/show_bug.cgi?id=40189 Suppress the "unreachable code" warning because we want to assert that we don't reach certain code points. * html/HTML5Lexer.cpp: 2010-06-04 Adam Barth <abarth@webkit.org> Reviewed by Eric Seidel. Make HTML5Lexer go fast https://bugs.webkit.org/show_bug.cgi?id=40048 A couple more cases like the previous patch that I missed. * html/HTML5Lexer.cpp: (WebCore::HTML5Lexer::nextToken): 2010-06-04 Adam Barth <abarth@webkit.org> Reviewed by Eric Seidel. Make HTML5Lexer go fast https://bugs.webkit.org/show_bug.cgi?id=40048 Make all the state transitions in the machine explicit. This allows us to remove all the break statements, which won't work correctly after we change the macro definitions. Also, while I was looking at every line of code, I fixed a bunch of the one-line-if style errors introduces in my previous patches. * html/HTML5Lexer.cpp: (WebCore::HTML5Lexer::nextToken): 2010-06-04 Gavin Barraclough <barraclough@apple.com> Reviewed by Oliver Hunt. Bug 40187 - Change function signature of NativeConstructor to match NativeFunction Mostly for consistency, but constructor & args arguments are redundant, and this will help if we wish to be able to JIT calls to more constructors. * bindings/js/JSArrayBufferConstructor.cpp: (WebCore::constructCanvasArrayBuffer): * bindings/js/JSAudioConstructor.cpp: (WebCore::constructAudio): * bindings/js/JSEventSourceConstructor.cpp: (WebCore::constructEventSource): * bindings/js/JSFloatArrayConstructor.cpp: (WebCore::constructCanvasFloatArray): * bindings/js/JSImageConstructor.cpp: (WebCore::constructImage): * bindings/js/JSInt16ArrayConstructor.cpp: (WebCore::constructCanvasShortArray): * bindings/js/JSInt32ArrayConstructor.cpp: (WebCore::constructCanvasIntArray): * bindings/js/JSInt8ArrayConstructor.cpp: (WebCore::constructCanvasByteArray): * bindings/js/JSMessageChannelConstructor.cpp: (WebCore::JSMessageChannelConstructor::construct): * bindings/js/JSMessageChannelConstructor.h: * bindings/js/JSOptionConstructor.cpp: (WebCore::constructHTMLOptionElement): * bindings/js/JSSharedWorkerConstructor.cpp: (WebCore::constructSharedWorker): * bindings/js/JSUint16ArrayConstructor.cpp: (WebCore::constructCanvasUnsignedShortArray): * bindings/js/JSUint32ArrayConstructor.cpp: (WebCore::constructCanvasUnsignedIntArray): * bindings/js/JSUint8ArrayConstructor.cpp: (WebCore::constructCanvasUnsignedByteArray): * bindings/js/JSWebKitCSSMatrixConstructor.cpp: (WebCore::constructWebKitCSSMatrix): * bindings/js/JSWebKitPointConstructor.cpp: (WebCore::constructWebKitPoint): * bindings/js/JSWebSocketConstructor.cpp: (WebCore::constructWebSocket): * bindings/js/JSWorkerConstructor.cpp: (WebCore::constructWorker): * bindings/js/JSXMLHttpRequestConstructor.cpp: (WebCore::constructXMLHttpRequest): * bindings/js/JSXSLTProcessorConstructor.cpp: (WebCore::constructXSLTProcessor): * bindings/scripts/CodeGeneratorJS.pm: * bridge/runtime_object.cpp: (JSC::Bindings::callRuntimeConstructor): 2010-06-04 Adam Barth <abarth@webkit.org> Reviewed by Eric Seidel. Make HTML5Lexer go fast https://bugs.webkit.org/show_bug.cgi?id=40048 Change the intent of the loop to match what it's going to be once we remove the loop. This is a whitespace only change that will make the final diff much, much smaller. Sorry for the transient ugly style. * html/HTML5Lexer.cpp: (WebCore::HTML5Lexer::nextToken): 2010-06-04 Adam Barth <abarth@webkit.org> Reviewed by Eric Seidel. Make HTML5Lexer go fast https://bugs.webkit.org/show_bug.cgi?id=40048 Introduce ADVANCE_TO macro. This is the last macro we need to introduce. * html/HTML5Lexer.cpp: (WebCore::HTML5Lexer::nextToken): 2010-06-04 Adam Barth <abarth@webkit.org> Reviewed by Eric Seidel. Make HTML5Lexer go fast https://bugs.webkit.org/show_bug.cgi?id=40048 Fix the rest of the RECONSUME_IN cases that were missed by our script. Also, reorder some assigment to prepare for the ADVANCE_TO patch. * html/HTML5Lexer.cpp: (WebCore::HTML5Lexer::nextToken): 2010-06-04 Adam Barth <abarth@webkit.org> Reviewed by Eric Seidel. Make HTML5Lexer go fast https://bugs.webkit.org/show_bug.cgi?id=40048 This patch handles the FLUSH_AND_ADVANCE_TO case. Again, this patch introduces style errors that will be fixed shortly. * html/HTML5Lexer.cpp: (WebCore::HTML5Lexer::nextToken): 2010-06-04 Adam Barth <abarth@webkit.org> Reviewed by Eric Seidel. Make HTML5Lexer go fast https://bugs.webkit.org/show_bug.cgi?id=40048 This patch handles the FLUSH_EMIT_AND_RESUME_IN case. This patch introduces some bad style w.r.t. one-line if statements, but we'll fix them all automatically in cleanup patch when we're done. * html/HTML5Lexer.cpp: (WebCore::HTML5Lexer::nextToken): 2010-06-04 Adam Barth <abarth@webkit.org> Reviewed by Eric Seidel. Make HTML5Lexer go fast https://bugs.webkit.org/show_bug.cgi?id=40048 More small steps. This patch deals with emitting tokens. * html/HTML5Lexer.cpp: (WebCore::HTML5Lexer::nextToken): 2010-06-04 Adam Barth <abarth@webkit.org> Reviewed by Eric Seidel. Make HTML5Lexer go fast https://bugs.webkit.org/show_bug.cgi?id=40048 The next step: using macros to delimit each state. Evetually, we're going to change what these macros expand to. * html/HTML5Lexer.cpp: (WebCore::HTML5Lexer::nextToken): 2010-06-04 Adam Barth <abarth@webkit.org> Reviewed by Eric Seidel. Make HTML5Lexer go fast https://bugs.webkit.org/show_bug.cgi?id=40048 We're going to do this patch in small steps to make it easier to verify correctness. * html/HTML5Lexer.cpp: (WebCore::HTML5Lexer::nextToken): 2010-06-04 Jay Civelli <jcivelli@chromium.org> Reviewed by David Levin. [chromium] Adding support for the left and right Windows keys to the NativeWebKeyboardEvent. https://bugs.webkit.org/show_bug.cgi?id=39752 * platform/chromium/KeyCodeConversionGtk.cpp: (WebCore::windowsKeyCodeForKeyEvent): 2010-06-04 Dirk Schulze <krit@webkit.org> Reviewed by Nikolas Zimmermann. SVG filter on filter don't work https://bugs.webkit.org/show_bug.cgi?id=32708 Any child of <text> was not allowed to use the same filter as the text root. I couldn't found any reason in the SVG specification that legimitate this. Only batik also doesn't allow the same filter on the text root as on it's childs, while any other effect is still allowed. I removed this limitation so that the result looks like the result on Firefox. Test: svg/filters/filter-on-filter-for-text.svg * rendering/SVGRenderSupport.cpp: (WebCore::SVGRenderBase::prepareToRenderSVGContent): * rendering/SVGRenderSupport.h: * rendering/SVGRootInlineBox.cpp: (WebCore::SVGRootInlineBoxPaintWalker::SVGRootInlineBoxPaintWalker): (WebCore::SVGRootInlineBoxPaintWalker::chunkStartCallback): (WebCore::SVGRootInlineBox::paint): 2010-06-04 Nate Chapin <japhet@chromium.org> Reviewed by Adam Barth. Factor PageCache functionality out of FrameLoader and into PageCache itself. https://bugs.webkit.org/show_bug.cgi?id=39382 Refactor only, so no new tests. * history/PageCache.cpp: (WebCore::pageCacheLogPrefix): (WebCore::pageCacheLog): (WebCore::logCanCacheFrameDecision): (WebCore::logCanCachePageDecision): (WebCore::PageCache::canCachePageContainingThisFrame): (WebCore::PageCache::canCache): (WebCore::PageCache::add): (WebCore::PageCache::get): * history/PageCache.h: * loader/DocumentLoader.cpp: (WebCore::DocumentLoader::commitIfReady): * loader/FrameLoader.cpp: (WebCore::FrameLoader::commitProvisionalLoad): (WebCore::FrameLoader::prepareForCachedPageRestore): (WebCore::FrameLoader::continueLoadAfterNavigationPolicy): (WebCore::FrameLoader::loadProvisionalItemFromCachedPage): (WebCore::FrameLoader::navigateToDifferentDocument): * loader/FrameLoader.h: (WebCore::FrameLoader::quickRedirectComing): * svg/graphics/SVGImage.cpp: (WebCore::SVGImage::dataChanged): 2010-06-04 Ilya Tikhonovsky <loislo@chromium.org> Reviewed by Pavel Feldman. WebInspector: Web Inspector: it would be better to push object properties to JSON string in order of insertion. https://bugs.webkit.org/show_bug.cgi?id=40140 * inspector/InspectorValues.cpp: (WebCore::InspectorObject::writeJSON): * inspector/InspectorValues.h: (WebCore::InspectorObject::setBool): (WebCore::InspectorObject::setNumber): (WebCore::InspectorObject::setString): (WebCore::InspectorObject::set): 2010-06-04 Tony Gentilcore <tonyg@chromium.org> Reviewed by Adam Barth. Persist V8's ScriptData to the memory cache. https://bugs.webkit.org/show_bug.cgi?id=38661 This stores V8's ScriptData in the memory cache and also causes the network platform layer to be notified of the available cacheable metadata. Chromium's morejs benchmark shows a 3-4% improvement on fast hardware. No new tests because no new functionality. * bindings/v8/ScriptSourceCode.h: (WebCore::ScriptSourceCode::ScriptSourceCode): (WebCore::ScriptSourceCode::cachedScript): * bindings/v8/V8Proxy.cpp: (WebCore::V8Proxy::compileScript): (WebCore::V8Proxy::precompileScript): (WebCore::V8Proxy::evaluate): * bindings/v8/V8Proxy.h: 2010-06-04 Tony Gentilcore <tonyg@chromium.org> Reviewed by Adam Barth. Utilize new takeFirst() method where appropriate. https://bugs.webkit.org/show_bug.cgi?id=40089 No new tests because no new functionality. * css/CSSStyleSheet.cpp: (WebCore::CSSStyleSheet::addSubresourceStyleURLs): * dom/XMLTokenizerLibxml2.cpp: (WebCore::PendingCallbacks::callAndRemoveFirstCallback): * html/HTMLTokenizer.cpp: (WebCore::HTMLTokenizer::reset): (WebCore::HTMLTokenizer::executeExternalScriptsIfReady): * platform/text/SegmentedString.cpp: (WebCore::SegmentedString::advanceSubstring): * storage/Database.cpp: (WebCore::Database::scheduleTransaction): * storage/SQLTransaction.cpp: (WebCore::SQLTransaction::getNextStatement): * storage/SQLTransactionCoordinator.cpp: (WebCore::SQLTransactionCoordinator::processPendingTransactions): 2010-06-04 Nikita Vasilyev <me@elv1s.ru> Reviewed by Pavel Feldman. Web Inspector: better Function.prototype.bind for the internal code. In the "Event Listeners" pane show handler function instead of Function.prototype.bind. https://bugs.webkit.org/show_bug.cgi?id=40080 * inspector/front-end/utilities.js: (Function.prototype.bind.bound): (Function.prototype.bind.bound.toString): (Function.prototype.bind): 2010-06-04 Alexander Pavlov <apavlov@chromium.org> Unreviewed, fix Qt build. Add references to a new file. * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * inspector/front-end/WebKit.qrc: 2010-06-04 Alexander Pavlov <apavlov@chromium.org> Reviewed by Pavel Feldman. Web Inspector: Eliminate direct dependency of StylesSidebarPane on InspectorBackend https://bugs.webkit.org/show_bug.cgi?id=40069 No new tests are needed, as this is a refactoring. * inspector/front-end/CSSStyleModel.js: Added. (WebInspector.CSSStyleModel): (WebInspector.CSSStyleModel.prototype.getStylesAsync): (WebInspector.CSSStyleModel.prototype.getComputedStyleAsync): (WebInspector.CSSStyleModel.prototype.setRuleSelector): (WebInspector.CSSStyleModel.prototype.addRule): (WebInspector.CSSStyleModel.prototype.toggleStyleEnabled): (WebInspector.CSSStyleModel.prototype.setCSSText): (WebInspector.CSSStyleModel.prototype.applyStyleText): * inspector/front-end/StylesSidebarPane.js: (WebInspector.StylesSidebarPane.prototype.update.stylesCallback): (WebInspector.StylesSidebarPane.prototype.update.computedStyleCallback): (WebInspector.StylesSidebarPane.prototype.update): (WebInspector.StylesSidebarPane.prototype._arrayContainsInheritedProperty): (WebInspector.StylePropertiesSection.prototype.editingSelectorCommitted.successCallback): (WebInspector.StylePropertiesSection.prototype.editingSelectorCommitted): (WebInspector.BlankStylePropertiesSection.prototype.editingSelectorCommitted.successCallback): (WebInspector.BlankStylePropertiesSection.prototype.editingSelectorCommitted): (WebInspector.StylePropertyTreeElement.prototype.): (WebInspector.StylePropertyTreeElement.prototype): * inspector/front-end/inspector.html: * inspector/front-end/inspector.js: (WebInspector.loaded): 2010-06-04 Simon Hausmann <simon.hausmann@nokia.com> Reviewed by Tor Arne Vestbø. [Qt] Compilation fails when compiling against Qt 4.7 and Qt Mobility is installed https://bugs.webkit.org/show_bug.cgi?id=40116 CONFIG += mobility has the side-effect of pulling in mobility includes, which conflict with Qt 4.7's bearer managenent includes and break the build. * WebCore.pro: 2010-06-04 Vangelis Kokkevis <vangelis@chromium.org> Reviewed by Dimitri Glazkov. [chromium] Fix scrolling bug with pages using accelerated compositing. https://bugs.webkit.org/show_bug.cgi?id=40037 * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::LayerRendererChromium): (WebCore::LayerRendererChromium::drawLayers): 2010-06-04 Matthew Delaney <mdelaney@apple.com> Reviewed by Darin Adler. CG implementation needed for compression quality in canvas.toDataURL https://bugs.webkit.org/show_bug.cgi?id=38492 Took toDataURL.jpeg.quality.basic.html test off of Skipped list. Passes. Went the route of avoiding in-band signaling to flag the use of a quality parameter or not. So, instead of simply passing the quality down as a double, instead I pass a reference to the quality parameter from where it comes in just after the JS bindings. Thus, no need for any global constants to signify when the quality is not specified. Updated the other platforms to support this (qt was on the only one currently with any implementation). * bindings/js/JSHTMLCanvasElementCustom.cpp: Moved range check logic for quality parameter down lower. Updated call to toDataURL to use double* instead of just passing the quality directly. (WebCore::JSHTMLCanvasElement::toDataURL): * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp: Updated toDataURL call to pass double* (WebCore::V8HTMLCanvasElement::toDataURLCallback): * dom/CanvasSurface.cpp: Updated method prototype. (WebCore::CanvasSurface::toDataURL): * dom/CanvasSurface.h: Updated method prototype. (WebCore::CanvasSurface::toDataURL): * platform/graphics/ImageBuffer.h: Updated method signature to use double* for quality param. * platform/graphics/cairo/ImageBufferCairo.cpp: Updated prototype for consistency. (WebCore::ImageBuffer::toDataURL): * platform/graphics/cg/ImageBufferCG.cpp: Implemented support for quality parametejr when jpeg MIME type used. (WebCore::jpegUTI): (WebCore::utiFromMIMEType): (WebCore::ImageBuffer::toDataURL): * platform/graphics/haiku/ImageBufferHaiku.cpp: Updated prototype for consistency. (WebCore::ImageBuffer::toDataURL): * platform/graphics/qt/ImageBufferQt.cpp: Updated prototype for consistency. (WebCore::ImageBuffer::toDataURL): * platform/graphics/skia/ImageBufferSkia.cpp: Updated prototype for consistency. (WebCore::ImageBuffer::toDataURL): * platform/graphics/wince/ImageBufferWince.cpp: Updated prototype for consistency. (WebCore::ImageBuffer::toDataURL): * platform/graphics/wx/ImageBufferWx.cpp: Updated prototype for consistency. (WebCore::ImageBuffer::toDataURL): 2010-06-04 Alejandro G. Castro <alex@igalia.com> Reviewed by Xan Lopez. Leaks in listDirectory https://bugs.webkit.org/show_bug.cgi?id=40008 Fixed both leaks. * platform/gtk/FileSystemGtk.cpp: (WebCore::listDirectory): 2010-06-04 Anton Muhin <antonm@chromium.org> Reviewed by Nate Chapin. [Chromium] get rid of named interceptor on HTMLDocument and introduce/remove accessors when named items get deleted/removed https://bugs.webkit.org/show_bug.cgi?id=39877 This patch makes callbacks invoked on named items addition/removal install API accessors and thus there is no more need in named and indexed interceptors on HTMLDocument which speeds up invocation of methods on document. * bindings/scripts/CodeGeneratorV8.pm: * bindings/v8/ScriptController.cpp: (WebCore::ScriptController::namedItemAdded): (WebCore::ScriptController::namedItemRemoved): * bindings/v8/V8DOMWindowShell.cpp: (WebCore::checkDocumentWrapper): (WebCore::V8DOMWindowShell::updateDocumentWrapperCache): (WebCore::getter): (WebCore::V8DOMWindowShell::namedItemAdded): (WebCore::V8DOMWindowShell::namedItemRemoved): * bindings/v8/V8DOMWindowShell.h: * bindings/v8/V8DOMWrapper.cpp: (WebCore::V8DOMWrapper::instantiateV8Object): * bindings/v8/custom/V8HTMLDocumentCustom.cpp: (WebCore::V8HTMLDocument::WrapInShadowObject): (WebCore::V8HTMLDocument::GetNamedProperty): (WebCore::V8HTMLDocument::allAccessorSetter): (WebCore::toV8): 2010-06-04 Kwang Yul Seo <skyul@company100.net> Reviewed by Kent Tamura. Change filenameFromString to return CString https://bugs.webkit.org/show_bug.cgi?id=39494 filenameFromString returns a newly allocated string and the caller must free the string. GTK and EFL ports use g_free while all others ports use fastFree. This is confusing because the same function behaves differently with respect to ports. Change filenameFromString to return CString. * platform/FileSystem.cpp: (WebCore::filenameFromString): * platform/FileSystem.h: * platform/efl/FileSystemEfl.cpp: (WebCore::filenameFromString): * platform/gtk/FileChooserGtk.cpp: (WebCore::FileChooser::basenameForWidth): * platform/gtk/FileSystemGtk.cpp: (WebCore::filenameFromString): (WebCore::filenameForDisplay): (WebCore::fileExists): (WebCore::deleteFile): (WebCore::deleteEmptyDirectory): (WebCore::getFileSize): (WebCore::getFileModificationTime): (WebCore::makeAllDirectories): (WebCore::pathGetFileName): (WebCore::directoryName): (WebCore::listDirectory): * platform/gtk/SharedBufferGtk.cpp: (WebCore::SharedBuffer::createWithContentsOfFile): * platform/network/soup/ResourceHandleSoup.cpp: (WebCore::startHttp): * platform/posix/SharedBufferPOSIX.cpp: (WebCore::SharedBuffer::createWithContentsOfFile): 2010-06-04 No'am Rosenthal <noam.rosenthal@nokia.com> Reviewed by Kenneth Rohde Christiansen. [Qt] Fix compilation with QT_NO_FEATURE https://bugs.webkit.org/show_bug.cgi?id=38324 The #ifdef QT_NO_GRAPHICSEFFECT was in the wrong place, would have made AC not work at all. No new tests. * platform/graphics/qt/GraphicsLayerQt.cpp: (WebCore::GraphicsLayerQtImpl::flushChanges): 2010-06-04 Qi Zhang <qi.2.zhang@nokia.com> Reviewed by Laszlo Gombos. [Qt] Failed at http://philip.html5.org/tests/canvas/suite/tests/2d.path.arcTo.ensuresubpath.1.html https://bugs.webkit.org/show_bug.cgi?id=38645 Path arcto function need to ensure there is subpath before it. * platform/graphics/qt/PathQt.cpp: (WebCore::Path::addArcTo): 2010-06-04 Qi Zhang <qi.2.zhang@nokia.com> Reviewed by Laszlo Gombos. [Qt] failed at http://philip.html5.org/tests/canvas/suite/tests/2d.path.arc.angle.3.html https://bugs.webkit.org/show_bug.cgi?id=38537 For path.arc function handle span > 2PI * platform/graphics/qt/PathQt.cpp: (WebCore::Path::addArc): 2010-06-04 Zhenyao Mo <zmo@google.com> Reviewed by Dimitri Glazkov. Set attributes.stencil to false by default at context creation https://bugs.webkit.org/show_bug.cgi?id=40090 * platform/graphics/GraphicsContext3D.h: Set default attributes.stencil to false. (WebCore::GraphicsContext3D::Attributes::Attributes): 2010-06-03 Abhishek Arya <inferno@chromium.org> Reviewed by Eric Carlson. Fix a crash when trying to use an invalid media src url by moving the isValid url checks to a central location in isSafeToLoadURL function. Also added an empty string check in DocumentLoader::didTellClientAboutLoad. Test: media/invalid-media-url-crash.html * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::isSafeToLoadURL): (WebCore::HTMLMediaElement::selectNextSourceChild): (WebCore::HTMLMediaElement::getPluginProxyParams): * loader/DocumentLoader.h: (WebCore::DocumentLoader::didTellClientAboutLoad): 2010-06-03 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r60642. http://trac.webkit.org/changeset/60642 https://bugs.webkit.org/show_bug.cgi?id=40151 Broke rendering of border images on rotated elements (Requested by jamesr on #webkit). * platform/graphics/GraphicsContext.cpp: (WebCore::GraphicsContext::drawImage): (WebCore::GraphicsContext::drawTiledImage): * platform/graphics/GraphicsContext.h: * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::paintNinePieceImage): 2010-06-03 Damian Kaleta <dkaleta@apple.com> Reviewed by Beth Dakin. Pixel cracks in border images when drawing with a scale factor > 1 <rdar://problem/7994266>pixel cracks in border images https://bugs.webkit.org/show_bug.cgi?id=15720 * platform/graphics/GraphicsContext.cpp: (WebCore::GraphicsContext::drawImage): (WebCore::GraphicsContext::drawTiledImage): * platform/graphics/GraphicsContext.h: Added two new methods to support drawing using FloatRect. If the boolean flag roundToPixels is true, the pixels are adjusted with the pixel boundaries. * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::paintNinePieceImage): 2010-06-03 James Robinson <jamesr@chromium.org> Reviewed by Dan Bernstein. Take container's scroll offset and clip into account when initializing LayoutState https://bugs.webkit.org/show_bug.cgi?id=38506 When doing a subtree layout, the initial LayoutState creation needs to take the layout root container's offset and its scroll offset into account to create the initial offset. Otherwise if a subtree layout occurs for a layout root whose container has a non-zero scroll offset the LayoutState's offset and clip are wrong, resulting in a mispaint. See the test cases for examples. Tests: fast/repaint/layout-state-scrolloffset.html fast/repaint/layout-state-scrolloffset2.html fast/repaint/layout-state-scrolloffset3.html * rendering/LayoutState.cpp: (WebCore::LayoutState::LayoutState): 2010-06-03 Gavin Barraclough <barraclough@apple.com> Reviewed by NOBODY (speculative Qt build fix II). * bridge/qt/qt_runtime.cpp: (JSC::Bindings::QtRuntimeMetaMethod::call): (JSC::Bindings::QtRuntimeConnectionMethod::call): 2010-06-03 Gavin Barraclough <barraclough@apple.com> Reviewed by NOBODY (speculative Qt build fix). * bridge/qt/qt_runtime.cpp: (JSC::Bindings::QtRuntimeMetaMethod::call): (JSC::Bindings::QtRuntimeConnectionMethod::call): 2010-06-02 Gavin Barraclough <barraclough@apple.com> Reviewed by Oliver Hunt. Bug 40094 - The return type of NativeFunction should be EncodedJSValue On Windows & Linux, using JSVALUE32_64, EncodedJSValue is returned in registers, but JSValue is not. * bindings/js/JSCallbackData.cpp: (WebCore::JSCallbackData::invokeCallback): * bindings/js/JSCustomXPathNSResolver.cpp: (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI): * bindings/js/JSEventListener.cpp: (WebCore::JSEventListener::handleEvent): * bindings/js/JSHTMLAllCollectionCustom.cpp: (WebCore::callHTMLAllCollection): * bindings/js/JSHTMLCollectionCustom.cpp: (WebCore::callHTMLCollection): * bindings/js/JSHTMLDocumentCustom.cpp: (WebCore::JSHTMLDocument::open): * bindings/js/JSInjectedScriptHostCustom.cpp: (WebCore::InjectedScriptHost::createInjectedScript): * bindings/js/JSNodeFilterCondition.cpp: (WebCore::JSNodeFilterCondition::acceptNode): * bindings/js/JSNodeListCustom.cpp: (WebCore::callNodeList): * bindings/js/JSPluginElementFunctions.cpp: (WebCore::callPlugin): * bindings/js/ScheduledAction.cpp: (WebCore::ScheduledAction::create): (WebCore::ScheduledAction::executeFunctionInContext): * bindings/js/ScriptFunctionCall.cpp: (WebCore::ScriptFunctionCall::call): * bindings/js/SerializedScriptValue.cpp: (WebCore::SerializingTreeWalker::convertIfTerminal): * bindings/objc/WebScriptObject.mm: (-[WebScriptObject callWebScriptMethod:withArguments:]): * bindings/scripts/CodeGeneratorJS.pm: * bridge/NP_jsobject.cpp: (_NPN_InvokeDefault): (_NPN_Invoke): (_NPN_Construct): * bridge/jni/jni_jsobject.mm: (JavaJSObject::call): * bridge/objc/objc_runtime.mm: (JSC::Bindings::callObjCFallbackObject): * bridge/runtime_method.cpp: (JSC::callRuntimeMethod): * bridge/runtime_object.cpp: (JSC::Bindings::callRuntimeObject): 2010-06-03 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r60614. http://trac.webkit.org/changeset/60614 https://bugs.webkit.org/show_bug.cgi?id=40123 It made fast/dom/Window/window-postmessage-clone.html fail on Mac bots (Requested by Ossy on #webkit). * Android.derived.jscbindings.mk: * Android.derived.v8bindings.mk: * Android.mk: * CMakeLists.txt: * DerivedSources.cpp: * DerivedSources.make: * GNUmakefile.am: * WebCore.gypi: * WebCore.pri: * WebCore.pro: * bindings/generic/RuntimeEnabledFeatures.cpp: * bindings/generic/RuntimeEnabledFeatures.h: * bindings/js/JSEventCustom.cpp: (WebCore::toJS): * bindings/v8/custom/V8EventCustom.cpp: (WebCore::toV8): * dom/Document.cpp: (WebCore::Document::createEvent): (WebCore::Document::addListenerTypeIfNeeded): * dom/Document.h: (WebCore::Document::): * dom/Document.idl: * dom/Element.h: * dom/Element.idl: * dom/Event.cpp: (WebCore::Event::fromUserGesture): * dom/Event.h: * dom/EventNames.h: * dom/TransformActionEvent.cpp: Removed. * dom/TransformActionEvent.h: Removed. * dom/TransformActionEvent.idl: Removed. * html/HTMLAttributeNames.in: * html/HTMLElement.cpp: (WebCore::HTMLElement::parseMappedAttribute): * page/DOMWindow.h: * page/DOMWindow.idl: 2010-06-03 Yury Semikhatsky <yurys@chromium.org> Reviewed by Pavel Feldman. [v8] Web Inspector: show "Object" as description for values with anonymous constructor https://bugs.webkit.org/show_bug.cgi?id=40121 * inspector/front-end/InjectedScript.js: (injectedScriptConstructor): 2010-06-03 Tor Arne Vestbø <tor.arne.vestbo@nokia.com> Reviewed by Simon Hausmann. [Qt] Fix NPAPI support on Mac OS X/Cocoa-32 qt_mac_window_for() returns a NSWindow on Cocoa, so we were passing in a NSWindow instead of a WindowRef as part of the NP_CGContext. https://bugs.webkit.org/show_bug.cgi?id=38762 * WebCore.gypi: Reflect rename * WebCore.pro: Reflect rename * plugins/mac/PluginViewMac.cpp: Renamed to PluginViewMac.mm and fix bug by getting the Carbon windowRef from the NSWindow. * wscript: Reflect rename 2010-06-03 Kim Grönholm <kim.1.gronholm@nokia.com> Reviewed by Simon Hausmann. Add TransformActionEvent support https://bugs.webkit.org/show_bug.cgi?id=39757 Added only the necessary TransformAction event interfaces and not e.g. any eventhandler hooks that generate and dispatch them. Test: fast/events/transformaction/create-transformaction-event.html More tests will be added with the machinery that generates and dispatches these events. * Android.derived.jscbindings.mk: * Android.derived.v8bindings.mk: * Android.mk: * CMakeLists.txt: * DerivedSources.cpp: * DerivedSources.make: * GNUmakefile.am: * WebCore.gypi: * WebCore.pri: * WebCore.pro: * bindings/generic/RuntimeEnabledFeatures.cpp: * bindings/generic/RuntimeEnabledFeatures.h: (WebCore::RuntimeEnabledFeatures::transformactionEnabled): (WebCore::RuntimeEnabledFeatures::setTransformActionEnabled): (WebCore::RuntimeEnabledFeatures::ontransformactionstartEnabled): (WebCore::RuntimeEnabledFeatures::ontransformactionupdateEnabled): (WebCore::RuntimeEnabledFeatures::ontransformactionendEnabled): * bindings/js/JSEventCustom.cpp: (WebCore::toJS): * bindings/v8/custom/V8EventCustom.cpp: (WebCore::toV8): * dom/Document.cpp: (WebCore::Document::createEvent): (WebCore::Document::addListenerTypeIfNeeded): * dom/Document.h: (WebCore::Document::): * dom/Document.idl: * dom/Element.h: * dom/Element.idl: * dom/Event.cpp: (WebCore::Event::isTransformActionEvent): (WebCore::Event::fromUserGesture): * dom/Event.h: * dom/EventNames.h: * dom/TransformActionEvent.cpp: Added. (WebCore::TransformActionEvent::TransformActionEvent): (WebCore::TransformActionEvent::initTransformActionEvent): * dom/TransformActionEvent.h: Added. (WebCore::TransformActionEvent::create): (WebCore::TransformActionEvent::translateX): (WebCore::TransformActionEvent::translateY): (WebCore::TransformActionEvent::translateSpeedX): (WebCore::TransformActionEvent::translateSpeedY): (WebCore::TransformActionEvent::scale): (WebCore::TransformActionEvent::scaleSpeed): (WebCore::TransformActionEvent::rotate): (WebCore::TransformActionEvent::rotateSpeed): (WebCore::TransformActionEvent::TransformActionEvent): (WebCore::TransformActionEvent::isTransformActionEvent): * dom/TransformActionEvent.idl: Added. * html/HTMLAttributeNames.in: * html/HTMLElement.cpp: (WebCore::HTMLElement::parseMappedAttribute): * page/DOMWindow.h: * page/DOMWindow.idl: 2010-06-03 Pavel Feldman <pfeldman@chromium.org> Reviewed by Yury Semikhatsky. Web Inspector: a number of fixes that make InspectorController happy with null redirects. https://bugs.webkit.org/show_bug.cgi?id=40109 * inspector/InspectorController.cpp: (WebCore::InspectorController::willSendRequest): (WebCore::InspectorController::didReceiveResponse): (WebCore::InspectorController::didReceiveContentLength): (WebCore::InspectorController::didFinishLoading): (WebCore::InspectorController::didFailLoading): 2010-06-03 Pavel Feldman <pfeldman@chromium.org> Not reviewed. Rolling out aggressive cache part of the r60391 described in the bug below. It was orthogonal to the rest of the patch and caused regression. https://bugs.webkit.org/show_bug.cgi?id=37364 * platform/graphics/skia/ImageSkia.cpp: (WebCore::drawResampledBitmap): 2010-06-02 Darin Fisher <darin@chromium.org> Reviewed by Brady Eidson. location.href and outgoing referrer not updated properly by pushState/replaceState https://bugs.webkit.org/show_bug.cgi?id=40027 Tests: fast/loader/stateobjects/pushstate-updates-location.html fast/loader/stateobjects/replacestate-updates-location.html http/tests/navigation/pushstate-updates-referrer.html http/tests/navigation/replacestate-updates-referrer.html * dom/Document.cpp: (WebCore::Document::updateURLForPushOrReplaceState): Update the FrameLoader's notion of the current URL as well! * loader/FrameLoader.cpp: (WebCore::FrameLoader::loadInSameDocument): Use the 'url' parameter instead of m_URL since m_URL might have changed during the handling of the PopState event. Eventually, this will become irrelevant since the PopState event should be dispatched asynchronously, but just in case we patch HashChange to be asynchronous before PopState, this change would be needed. 2010-06-02 Eric Seidel <eric@webkit.org> Reviewed by Adam Barth. REGRESSION(60409): document.write is not synchronous when using the HTML5 parser https://bugs.webkit.org/show_bug.cgi?id=40047 The HTML5 spec states that we should "spin the event loop" while waiting for stylesheets to load. Currently we do that by yielding out of the parser when stylesheets are loading. Because it was easy we made inline <scripts> yield for stylesheet loads as well. However, this caused document.write() to return after encountering the first inline <script> tag in many cases which is incorrect. document.write is supposed to block until the entire document is parsed (including) executing inline script tags. To match the exiting parser, we'll just make inline <script> tags not block on stylesheets for now. This is tested by WebCore/benchmarks/html-parser.html as well as likely several other tests in LayoutTests which we haven't triaged yet. * html/HTML5ScriptRunner.cpp: (WebCore::HTML5ScriptRunner::executeScript): - ASSERT that either stylesheets have loaded or we're executing an inline <script> tag. (WebCore::HTML5ScriptRunner::runScript): - Remove the code to block inline <script> tags on stylesheet loads. 2010-06-02 MORITA Hajime <morrita@google.com> Unreviewd, Chromium windows build fix. * rendering/RenderThemeChromiumWin.cpp: (WebCore::RenderThemeChromiumWin::paintProgressBar): 2010-06-02 MORITA Hajime <morrita@google.com> Reviewed by Kent Tamura. [Chromium] Linux: progress bar image pieces should be painted with same resampling mode https://bugs.webkit.org/show_bug.cgi?id=40045 computeResamplingMode(), used by Image::drawPattern() and BitmapImage::draw(), chooses an image resampling mode based on the size of given image and the destination rectangle. But when painting single component (i.e. a progress bar) from multiple images, it can choose different resampling modes for images of same component. That difference creates unexpected visual artifacts like seams between images of single component. This change introduced "image resampling hint" to allow callers to control the resampling mode. Using the hint, RenderThemeChromiumSkia now able to hold same resampling mode during draw a progress bar. No new tests. Expectations will come after ENABLE_PROGRESS_BAR get enabled on chromium. * platform/graphics/skia/ImageSkia.cpp: (WebCore::computeResamplingMode): * platform/graphics/skia/PlatformContextSkia.cpp: (PlatformContextSkia::save): (PlatformContextSkia::setImageResamplingHint): Added (PlatformContextSkia::clearImageResamplingHint): Added (PlatformContextSkia::hasImageResamplingHint): Added (PlatformContextSkia::imageResamplingHint): Added * platform/graphics/skia/PlatformContextSkia.h: * rendering/RenderThemeChromiumSkia.cpp: (WebCore::RenderThemeChromiumSkia::paintProgressBar): 2010-06-03 MORITA Hajime <morrita@google.com> Reviewed by Kent Tamura. [Chromium] Support HTML5 <progress> element on Linux. https://bugs.webkit.org/show_bug.cgi?id=37310 Implemented RenderThemeChromiumSkia::paintProgressBar(), extracing determinateProgressValueRectFor() from RenderThemeChromiumWin to RenderThemeChromiumSkia No new tests. Expectations will come after ENABLE_PROGRESS_BAR get enabled on chromium. * rendering/RenderThemeChromiumSkia.cpp: (WebCore::RenderThemeChromiumSkia::determinateProgressValueRectFor): (WebCore::RenderThemeChromiumSkia::indeterminateProgressValueRectFor): (WebCore::RenderThemeChromiumSkia::animationRepeatIntervalForProgressBar): (WebCore::RenderThemeChromiumSkia::animationDurationForProgressBar): (WebCore::RenderThemeChromiumSkia::paintProgressBar): (WebCore::RenderThemeChromiumSkia::progressValueRectFor): * rendering/RenderThemeChromiumSkia.h: * rendering/RenderThemeChromiumWin.cpp: (WebCore::RenderThemeChromiumWin::paintProgressBar): 2010-06-02 Nico Weber <thakis@chromium.org> Reviewed by Simon Fraser. Scroll events are sent twice per keypress for ports that don't have a platformWidget scrollbar https://bugs.webkit.org/show_bug.cgi?id=39918 This was regressed by http://trac.webkit.org/changeset/58615 . Fix this by slightly tweaking that patch. Test: editing/input/page-up-down-scrolls.html * page/FrameView.cpp: (WebCore::FrameView::scrollPositionChanged): * page/FrameView.h: * platform/ScrollView.cpp: (WebCore::ScrollView::valueChanged): * platform/ScrollView.h: (WebCore::ScrollView::repaintFixedElementsAfterScrolling): 2010-06-02 Andrey Kosyakov <caseq@chromium.org> Reviewed by Pavel Feldman. Web Inspector: use platform-specific key designations in shortcuts help for mac https://bugs.webkit.org/show_bug.cgi?id=39158 * inspector/front-end/KeyboardShortcut.js: (WebInspector.KeyboardShortcut.shortcutToString): (WebInspector.KeyboardShortcut._keyName): (WebInspector.KeyboardShortcut._modifiersToString): * inspector/front-end/inspector.js: (WebInspector._registerShortcuts): 2010-06-02 Kenneth Russell <kbr@google.com> Reviewed by Darin Fisher. Enable WebGL on more platforms even if accelerated compositing is disabled https://bugs.webkit.org/show_bug.cgi?id=40085 Conditionalize the code which prevents a WebGL rendering context from being created if accelerated compositing is disabled. Currently Chromium is the only port which will create a context if accelerated compositing is disabled; other ports may opt in to this code path if desired. Tested with existing WebGL layout tests in Safari and Chromium on Mac OS X. * html/HTMLCanvasElement.cpp: (WebCore::HTMLCanvasElement::getContext): 2010-06-02 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r60580. http://trac.webkit.org/changeset/60580 https://bugs.webkit.org/show_bug.cgi?id=40087 This broke dragging links if the selection was in a contentEditable element. (Requested by arv on #webkit). * page/FocusController.cpp: (WebCore::clearSelectionIfNeeded): 2010-06-02 Erik Arvidsson <arv@chromium.org> Reviewed by ojan@chromium.org. REGRESSION: Weird focus behavior affects quoting on University of Washington message board system https://bugs.webkit.org/show_bug.cgi?id=38548 Test: editing/selection/click-in-focusable-link-should-not-clear-selection.html * page/FocusController.cpp: (WebCore::clearSelectionIfNeeded): 2010-06-02 David Hyatt <hyatt@apple.com> Reviewed by Anders Carlsson. Just disable the current version of multi-column layout completely when the new pagination model is in effect. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::setDesiredColumnCountAndWidth): 2010-06-02 David Hyatt <hyatt@apple.com> Reviewed by Anders Carlsson. Turn off unforced page breaking at paint time when the new page breaking model is being used. * rendering/RenderLineBoxList.cpp: (WebCore::RenderLineBoxList::paint): 2010-06-02 David Hyatt <hyatt@apple.com> Reviewed by Anders Carlsson. Don't check page break properties at paint time if we're using the new page breaking model. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::paintChildren): 2010-06-02 Nate Chapin <japhet@chromium.org> Reviewed by Dimitri Glazkov. [V8] Fix an infinite recursion crash when trying to wrap media elements without a media player. No test because there isn't a good way to ensure the media player is off. * dom/make_names.pl: Call, e.g., V8HTMLElement::wrap(HTMLElement*) instead of toV8(HTMLElement*). 2010-06-02 Yael Aharon <yael.aharon@nokia.com> Reviewed by Darin Adler. Notification object ref counting is not correct. https://bugs.webkit.org/show_bug.cgi?id=39998 Return PassRefPtr<Notification> instead of a raw pointer from the create methods for Web Notifications. No new tests are needed, as existing tests show the problem when sending the "display" event asynchronously. * notifications/Notification.h: (WebCore::Notification::create): * notifications/NotificationCenter.h: (WebCore::NotificationCenter::createHTMLNotification): (WebCore::NotificationCenter::createNotification): 2010-06-02 Mikhail Naganov <mnaganov@chromium.org> Reviewed by Yury Semikhatsky. Web Inspector: add Console API for retrieving memory stats Add 'console.memory' property which returns an object. Currently it has two fields: totalJSHeapSize and usedJSHeapSize. Later, it can be extended for reporting total browser's memory consumption. https://bugs.webkit.org/show_bug.cgi?id=39646 * CMakeLists.txt: * DerivedSources.cpp: * DerivedSources.make: * GNUmakefile.am: * WebCore.gypi: * WebCore.pri: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSBindingsAllInOne.cpp: * bindings/js/JSConsoleCustom.cpp: (WebCore::JSConsole::memory): * bindings/v8/custom/V8ConsoleCustom.cpp: (WebCore::V8Console::memoryAccessorGetter): * page/Console.h: * page/Console.idl: * page/MemoryInfo.cpp: Added. (WebCore::MemoryInfo::MemoryInfo): * page/MemoryInfo.h: Added. (WebCore::MemoryInfo::create): (WebCore::MemoryInfo::totalJSHeapSize): (WebCore::MemoryInfo::usedJSHeapSize): * page/MemoryInfo.idl: Added. 2010-06-02 Yury Semikhatsky <yurys@chromium.org> Reviewed by Pavel Feldman. Web Inspector: support "Continue to Here" in debugger https://bugs.webkit.org/show_bug.cgi?id=39953 * English.lproj/localizedStrings.js: * inspector/front-end/BreakpointManager.js: (WebInspector.BreakpointManager.prototype.setOneTimeBreakpoint): (WebInspector.BreakpointManager.prototype.removeOneTimeBreakpoint): (WebInspector.BreakpointManager.prototype.addBreakpoint): * inspector/front-end/ScriptView.js: (WebInspector.ScriptView): (WebInspector.ScriptView.prototype._continueToLine): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype.continueToLine): (WebInspector.ScriptsPanel.prototype.debuggerPaused): * inspector/front-end/SourceFrame.js: (WebInspector.SourceFrame): * inspector/front-end/SourceView.js: (WebInspector.SourceView): (WebInspector.SourceView.prototype._continueToLine): (WebInspector.SourceView.prototype.updateLocalContent): 2010-06-02 Mikhail Naganov <mnaganov@chromium.org> Unreviewed, rolling out r60563. http://trac.webkit.org/changeset/60563 https://bugs.webkit.org/show_bug.cgi?id=39646 windows build failed * CMakeLists.txt: * DerivedSources.cpp: * DerivedSources.make: * GNUmakefile.am: * WebCore.gypi: * WebCore.pri: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSConsoleCustom.cpp: * bindings/v8/custom/V8ConsoleCustom.cpp: * page/Console.h: * page/Console.idl: * page/MemoryInfo.cpp: Removed. * page/MemoryInfo.h: Removed. * page/MemoryInfo.idl: Removed. 2010-06-02 Mikhail Naganov <mnaganov@chromium.org> Reviewed by Yury Semikhatsky. Web Inspector: add Console API for retrieving memory stats Add 'console.memory' property which returns an object. Currently it has two fields: totalJSHeapSize and usedJSHeapSize. Later, it can be extended for reporting total browser's memory consumption. https://bugs.webkit.org/show_bug.cgi?id=39646 * CMakeLists.txt: * DerivedSources.cpp: * DerivedSources.make: * GNUmakefile.am: * WebCore.gypi: * WebCore.pri: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSConsoleCustom.cpp: (WebCore::JSConsole::memory): * bindings/v8/custom/V8ConsoleCustom.cpp: (WebCore::V8Console::memoryAccessorGetter): * page/Console.h: * page/Console.idl: * page/MemoryInfo.cpp: Added. (WebCore::MemoryInfo::MemoryInfo): * page/MemoryInfo.h: Added. (WebCore::MemoryInfo::create): (WebCore::MemoryInfo::totalJSHeapSize): (WebCore::MemoryInfo::usedJSHeapSize): * page/MemoryInfo.idl: Added. 2010-06-02 Pavel Feldman <pfeldman@chromium.org> Reviewed by Yury Semikhatsky. Web Inspector: add test for resource parameters. https://bugs.webkit.org/show_bug.cgi?id=40026 Test: http/tests/inspector/resource-parameters.html * inspector/front-end/HAREntry.js: (WebInspector.HAREntry.prototype._buildParameters): * inspector/front-end/Resource.js: (WebInspector.Resource.prototype._parseParameters): * inspector/front-end/ResourceView.js: (WebInspector.ResourceView.prototype._refreshParms): 2010-06-02 Jocelyn Turcotte <jocelyn.turcotte@nokia.com> Reviewed by Simon Hausmann. [Qt] Fix make install on Symbian for headers in package builds when INSTALL_HEADERS is not defined First we wrote inst_headers.output with $$[QT_INSTALL_HEADERS] and then overwrote it with the $$INSTALL_HEADERS variant without checking if the variable was set. Fixed and cleaned up the logic of falling back to $$[QT_INSTALL_HEADERS]. * WebCore.pro: 2010-06-02 Xan Lopez <xlopez@igalia.com> Reviewed by Gustavo Noronha. [GTK] Style fixes for the generated code in DOM bindings https://bugs.webkit.org/show_bug.cgi?id=39949 Get rid of extra spaces and wrong indentation in the generated code. * bindings/scripts/CodeGeneratorGObject.pm: * bindings/scripts/test/GObject/WebKitDOMTestCallback.cpp: (webkit_dom_test_callback_callback_with_class1param): (webkit_dom_test_callback_callback_with_class2param): (webkit_dom_test_callback_callback_with_non_bool_return_type): (webkit_dom_test_callback_set_property): (webkit_dom_test_callback_get_property): * bindings/scripts/test/GObject/WebKitDOMTestCallback.h: * bindings/scripts/test/GObject/WebKitDOMTestInterface.cpp: (webkit_dom_test_interface_set_property): (webkit_dom_test_interface_get_property): * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp: (webkit_dom_test_obj_void_method): (webkit_dom_test_obj_void_method_with_args): (webkit_dom_test_obj_int_method): (webkit_dom_test_obj_int_method_with_args): (webkit_dom_test_obj_obj_method): (webkit_dom_test_obj_obj_method_with_args): (webkit_dom_test_obj_method_that_requires_all_args): (webkit_dom_test_obj_method_that_requires_all_args_and_throws): (webkit_dom_test_obj_serialized_value): (webkit_dom_test_obj_method_with_exception): (webkit_dom_test_obj_with_dynamic_frame): (webkit_dom_test_obj_with_dynamic_frame_and_arg): (webkit_dom_test_obj_with_dynamic_frame_and_optional_arg): (webkit_dom_test_obj_with_dynamic_frame_and_user_gesture): (webkit_dom_test_obj_with_dynamic_frame_and_user_gesture_asad): (webkit_dom_test_obj_with_script_state_void): (webkit_dom_test_obj_with_script_state_obj): (webkit_dom_test_obj_with_script_state_void_exception): (webkit_dom_test_obj_with_script_state_obj_exception): (webkit_dom_test_obj_method_with_optional_arg): (webkit_dom_test_obj_method_with_non_optional_arg_and_optional_arg): (webkit_dom_test_obj_method_with_non_optional_arg_and_two_optional_args): (webkit_dom_test_obj_get_read_only_int_attr): (webkit_dom_test_obj_get_read_only_string_attr): (webkit_dom_test_obj_get_read_only_test_obj_attr): (webkit_dom_test_obj_get_int_attr): (webkit_dom_test_obj_set_int_attr): (webkit_dom_test_obj_get_long_long_attr): (webkit_dom_test_obj_set_long_long_attr): (webkit_dom_test_obj_get_unsigned_long_long_attr): (webkit_dom_test_obj_set_unsigned_long_long_attr): (webkit_dom_test_obj_get_string_attr): (webkit_dom_test_obj_set_string_attr): (webkit_dom_test_obj_get_test_obj_attr): (webkit_dom_test_obj_set_test_obj_attr): (webkit_dom_test_obj_get_attr_with_exception): (webkit_dom_test_obj_set_attr_with_exception): (webkit_dom_test_obj_get_attr_with_setter_exception): (webkit_dom_test_obj_set_attr_with_setter_exception): (webkit_dom_test_obj_get_attr_with_getter_exception): (webkit_dom_test_obj_set_attr_with_getter_exception): (webkit_dom_test_obj_get_script_string_attr): (webkit_dom_test_obj_set_property): (webkit_dom_test_obj_get_property): (webkit_dom_test_obj_class_init): * bindings/scripts/test/GObject/WebKitDOMTestObj.h: 2010-06-02 Andrey Kosyakov <caseq@chromium.org> Reviewed by Pavel Feldman. WebInspector: Added conversion of inspector's resource representation into HAR. Moved common resource accessors from ResourceView to Resource. https://bugs.webkit.org/show_bug.cgi?id=30567 Test: http/tests/inspector/resource-har-conversion.html * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * inspector/front-end/HAREntry.js: Added. (WebInspector.HAREntry): (WebInspector.HAREntry.prototype.build): (WebInspector.HAREntry.prototype._buildRequest): (WebInspector.HAREntry.prototype._buildResponse): (WebInspector.HAREntry.prototype._buildContent): (WebInspector.HAREntry.prototype._buildTimings): (WebInspector.HAREntry.prototype._buildHeaders): (WebInspector.HAREntry.prototype._buildPostData): (WebInspector.HAREntry.prototype._buildParameters): (WebInspector.HAREntry.prototype._buildParameter): (WebInspector.HAREntry.prototype._toMilliseconds): * inspector/front-end/Resource.js: (WebInspector.Resource): (WebInspector.Resource.prototype.set url): (WebInspector.Resource.prototype.get receiveDuration): (WebInspector.Resource.prototype.requestHeaderValue): (WebInspector.Resource.prototype.get requestFormData): (WebInspector.Resource.prototype.set requestFormData): (WebInspector.Resource.prototype.responseHeaderValue): (WebInspector.Resource.prototype.get queryParameters): (WebInspector.Resource.prototype.get formParameters): (WebInspector.Resource.prototype._parseParameters): (WebInspector.Resource.prototype._headerValue): * inspector/front-end/ResourceView.js: (WebInspector.ResourceView.prototype._refreshQueryString): (WebInspector.ResourceView.prototype._refreshFormData): (WebInspector.ResourceView.prototype._refreshParms): * inspector/front-end/WebKit.qrc: * inspector/front-end/inspector.html: 2010-06-02 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r60547. http://trac.webkit.org/changeset/60547 https://bugs.webkit.org/show_bug.cgi?id=40051 It made fast/overflow/overflow-with-local-background- attachment.html crash (Requested by Ossy on #webkit). * notifications/Notification.h: (WebCore::Notification::create): * notifications/NotificationCenter.h: (WebCore::NotificationCenter::createHTMLNotification): (WebCore::NotificationCenter::createNotification): 2010-06-02 Eric Seidel <eric@webkit.org> Reviewed by Adam Barth. HTML5 parser does not track line numbers https://bugs.webkit.org/show_bug.cgi?id=39984 This adds rudimentary line-number tracking to the HTML5Lexer. We'll still need to handle \r\n cases eventually, but this fixes the vast majority of our line-number related failures. Fixes 268 layout tests. :) * html/HTML5Lexer.cpp: (WebCore::HTML5Lexer::reset): - Reset m_lineNumber to 0. (WebCore::HTML5Lexer::consumeEntity): - Pass m_lineNumber to advance(). (WebCore::HTML5Lexer::nextToken): - Pass m_lineNumber to advance(). * html/HTML5Lexer.h: (WebCore::HTML5Lexer::lineNumber): - Expose m_lineNumber for HTML5Tokenizer. (WebCore::HTML5Lexer::columnNumber): - Mirrors the implementation in the old HTMLTokenizer. we might some day support column number tracking in the Lexer. It certainly would be possible. * html/HTML5ScriptRunner.cpp: (WebCore::HTML5ScriptRunner::HTML5ScriptRunner): - ASSERT we're passed a host. (WebCore::HTML5ScriptRunner::sourceFromPendingScript): - Use PendingScript.startingLineNumber when PendingScript is an inline script. (WebCore::HTML5ScriptRunner::execute): - Now expects a start line number passed from the TreeBuilder. (WebCore::HTML5ScriptRunner::runScript): - Now expects a start line number. * html/HTML5ScriptRunner.h: (WebCore::HTML5ScriptRunner::PendingScript::PendingScript): - Track startingLineNumber for any inline script. * html/HTML5Tokenizer.cpp: (WebCore::HTML5Tokenizer::begin): - Add a FIXME. The old HTMLTokenizer resets its "lexer" state here. (WebCore::HTML5Tokenizer::pumpLexer): - Pass scriptStartLine to the HTML5ScriptRunner (WebCore::HTML5Tokenizer::lineNumber): - Implementation for Tokenizer.h (WebCore::HTML5Tokenizer::columnNumber): - Implementation for Tokenizer.h * html/HTML5Tokenizer.h: * html/HTML5TreeBuilder.cpp: (WebCore::HTML5TreeBuilder::HTML5TreeBuilder): - Initialize the new line number tracking variables. (WebCore::HTML5TreeBuilder::handleScriptEndTag): - Save off the line number from the start tag to pass to the ScriptRunner. (WebCore::HTML5TreeBuilder::takeScriptToProcess): - Return the line number from the start tag. (WebCore::HTML5TreeBuilder::passTokenToLegacyParser): - Save off the line number of ever script start tag we see. * html/HTML5TreeBuilder.h: - Keep both the line number of the last start tag, and the line number of the script we know we're expecting our caller to run before resuming parsing. These are separate to keep the code clean, especially since the last script start tag line number is a hack specific to using the old HTMLParser. 2010-06-02 Joseph Pecoraro <joepeck@webkit.org> Reviewed by Pavel Feldman. Web Inspector: Timeline should nicely format the Timer timeout https://bugs.webkit.org/show_bug.cgi?id=40040 * inspector/front-end/TimelinePanel.js: (WebInspector.TimelinePanel.FormattedRecord.prototype._generatePopupContent): Format the Timer's timeout time. 2010-06-02 Vangelis Kokkevis <vangelis@chromium.org> Reviewed by Dimitri Glazkov. [Chromium] Clamp dirtyRect updates of composited layer contents to the size of the layer to avoid writing outside texture bounds. https://bugs.webkit.org/show_bug.cgi?id=40030 * platform/graphics/chromium/LayerChromium.cpp: (WebCore::LayerChromium::updateTextureContents): 2010-06-02 Yael Aharon <yael.aharon@nokia.com> Reviewed by Darin Adler. Notification object ref counting is not correct. https://bugs.webkit.org/show_bug.cgi?id=39998 Return PassRefPtr<Notification> instead of a raw pointer from the create methods for Web Notifications. No new tests are needed, as existing tests show the problem when sending the "display" event asynchronously. * notifications/Notification.h: (WebCore::Notification::create): * notifications/NotificationCenter.h: (WebCore::NotificationCenter::createHTMLNotification): (WebCore::NotificationCenter::createNotification): 2010-06-02 Qi Zhang <qi.2.zhang@nokia.com> Reviewed by Dirk Schulze. [Qt] Image shadow doesn't work https://bugs.webkit.org/show_bug.cgi?id=37804 Implement the code for image shadow * platform/graphics/qt/ImageQt.cpp: (WebCore::BitmapImage::draw): 2010-06-02 Vangelis Kokkevis <vangelis@chromium.org> Reviewed by Darin Fisher. Adding the precision qualifier to fragment shaders used by the GL compositor in chromium to turn them into valid GLSL ES. https://bugs.webkit.org/show_bug.cgi?id=40022 * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::initializeSharedGLObjects): 2010-06-02 Laszlo Gombos <laszlo.1.gombos@nokia.com> Reviewed by David Levin. Fix type qualifier is meaningless on cast type in SVGFEColorMatrixElement::build https://bugs.webkit.org/show_bug.cgi?id=40015 No new tests as there is no new functionality. Remove const from the cast type. * svg/SVGFEColorMatrixElement.cpp: (WebCore::SVGFEColorMatrixElement::build): 2010-06-02 Sterling Swigart <sswigart@google.com> Reviewed by David Levin. Image Resizer Patch 0: Added compilation argument to conditionally compile pending patches. https://bugs.webkit.org/show_bug.cgi?id=39906 * Configurations/FeatureDefines.xcconfig: * GNUmakefile.am: * WebCore.pri: 2010-06-01 Dirk Schulze <krit@webkit.org> Reviewed by Nikolas Zimmermann. SVG repaintRect should be empty if content got clipped away https://bugs.webkit.org/show_bug.cgi?id=39965 The SVG repaintRect of the renderer was not empty, if the content got clipped away. The MaskerData/ClipperData <-> RenderObject mapping is set up during the layout phase now, to be able to relayout a RenderObject, if it's repaintRect is empty. This has the following reason: We apply the object to the resource on painting at the moment. With an empty repaintRect, paint() quits earlier and therefore the object doesn't get applied to the resource. This can cause problems, if the resource get changed by animations or scripts. On a change, the resource tells all it's callers to relayout. If the reference to the caller (our RenderObject) is missing, the object won't ever update and therefore won't get drawn. We already have LayoutTests that cover this problem. The complete repaintRect calculation (including the smallest clipping area and shadow size calculation) moved from the renderers to SVGRenderSupport. This eliminates redundant code. * rendering/RenderPath.cpp: (WebCore::RenderPath::updateCachedBoundaries): * rendering/RenderSVGContainer.cpp: (WebCore::RenderSVGContainer::repaintRectInLocalCoordinates): * rendering/RenderSVGImage.cpp: (WebCore::RenderSVGImage::repaintRectInLocalCoordinates): * rendering/RenderSVGResource.h: * rendering/RenderSVGResourceClipper.cpp: (WebCore::RenderSVGResourceClipper::resourceBoundingBox): * rendering/RenderSVGResourceClipper.h: * rendering/RenderSVGResourceFilter.cpp: (WebCore::RenderSVGResourceFilter::resourceBoundingBox): * rendering/RenderSVGResourceFilter.h: * rendering/RenderSVGResourceGradient.h: (WebCore::RenderSVGResourceGradient::resourceBoundingBox): * rendering/RenderSVGResourceMarker.h: (WebCore::RenderSVGResourceMarker::resourceBoundingBox): * rendering/RenderSVGResourceMasker.cpp: (WebCore::RenderSVGResourceMasker::resourceBoundingBox): * rendering/RenderSVGResourceMasker.h: * rendering/RenderSVGResourcePattern.h: (WebCore::RenderSVGResourcePattern::resourceBoundingBox): * rendering/RenderSVGResourceSolidColor.h: (WebCore::RenderSVGResourceSolidColor::resourceBoundingBox): * rendering/RenderSVGText.cpp: (WebCore::RenderSVGText::strokeBoundingBox): (WebCore::RenderSVGText::repaintRectInLocalCoordinates): * rendering/SVGRenderSupport.cpp: (WebCore::SVGRenderBase::intersectRepaintRectWithResources): * rendering/SVGRenderSupport.h: * rendering/SVGRenderTreeAsText.cpp: (WebCore::writeResources): * rendering/style/SVGRenderStyle.h: (WebCore::SVGRenderStyle::hasClipper): (WebCore::SVGRenderStyle::hasMasker): (WebCore::SVGRenderStyle::hasFilter): 2010-06-01 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r60539. http://trac.webkit.org/changeset/60539 https://bugs.webkit.org/show_bug.cgi?id=40043 Accidentally added an unreviewed and invalid change to the patch. (Requested by krit on #webkit). * rendering/RenderPath.cpp: (WebCore::RenderPath::updateCachedBoundaries): * rendering/RenderSVGContainer.cpp: (WebCore::RenderSVGContainer::repaintRectInLocalCoordinates): * rendering/RenderSVGImage.cpp: (WebCore::RenderSVGImage::repaintRectInLocalCoordinates): * rendering/RenderSVGResource.h: * rendering/RenderSVGResourceClipper.cpp: (WebCore::RenderSVGResourceClipper::resourceBoundingBox): * rendering/RenderSVGResourceClipper.h: * rendering/RenderSVGResourceFilter.cpp: (WebCore::RenderSVGResourceFilter::resourceBoundingBox): * rendering/RenderSVGResourceFilter.h: * rendering/RenderSVGResourceGradient.h: (WebCore::RenderSVGResourceGradient::resourceBoundingBox): * rendering/RenderSVGResourceMarker.h: (WebCore::RenderSVGResourceMarker::resourceBoundingBox): * rendering/RenderSVGResourceMasker.cpp: (WebCore::RenderSVGResourceMasker::resourceBoundingBox): * rendering/RenderSVGResourceMasker.h: * rendering/RenderSVGResourcePattern.h: (WebCore::RenderSVGResourcePattern::resourceBoundingBox): * rendering/RenderSVGResourceSolidColor.h: (WebCore::RenderSVGResourceSolidColor::resourceBoundingBox): * rendering/RenderSVGText.cpp: (WebCore::RenderSVGText::strokeBoundingBox): (WebCore::RenderSVGText::repaintRectInLocalCoordinates): * rendering/SVGRenderSupport.cpp: (WebCore::SVGRenderBase::filterBoundingBoxForRenderer): (WebCore::SVGRenderBase::clipperBoundingBoxForRenderer): (WebCore::SVGRenderBase::maskerBoundingBoxForRenderer): * rendering/SVGRenderSupport.h: * rendering/SVGRenderTreeAsText.cpp: (WebCore::writeResources): * rendering/style/SVGRenderStyle.h: * svg/SVGColor.cpp: (WebCore::SVGColor::colorFromRGBColorString): 2010-06-01 Dirk Schulze <krit@webkit.org> Reviewed by Nikolas Zimmermann. SVG repaintRect should be empty if content got clipped away https://bugs.webkit.org/show_bug.cgi?id=39965 The SVG repaintRect of the renderer was not empty, if the content got clipped away. The MaskerData/ClipperData <-> RenderObject mapping is set up during the layout phase now, to be able to relayout a RenderObject, if it's repaintRect is empty. This has the following reason: We apply the object to the resource on painting at the moment. With an empty repaintRect, paint() quits earlier and therefore the object doesn't get applied to the resource. This can cause problems, if the resource get changed by animations or scripts. On a change, the resource tells all it's callers to relayout. If the reference to the caller (our RenderObject) is missing, the object won't ever update and therefore won't get drawn. We already have LayoutTests that cover this problem. The complete repaintRect calculation (including the smallest clipping area and shadow size calculation) moved from the renderers to SVGRenderSupport. This eliminates redundant code. * rendering/RenderPath.cpp: (WebCore::RenderPath::updateCachedBoundaries): * rendering/RenderSVGContainer.cpp: (WebCore::RenderSVGContainer::repaintRectInLocalCoordinates): * rendering/RenderSVGImage.cpp: (WebCore::RenderSVGImage::repaintRectInLocalCoordinates): * rendering/RenderSVGResource.h: * rendering/RenderSVGResourceClipper.cpp: (WebCore::RenderSVGResourceClipper::resourceBoundingBox): * rendering/RenderSVGResourceClipper.h: * rendering/RenderSVGResourceFilter.cpp: (WebCore::RenderSVGResourceFilter::resourceBoundingBox): * rendering/RenderSVGResourceFilter.h: * rendering/RenderSVGResourceGradient.h: (WebCore::RenderSVGResourceGradient::resourceBoundingBox): * rendering/RenderSVGResourceMarker.h: (WebCore::RenderSVGResourceMarker::resourceBoundingBox): * rendering/RenderSVGResourceMasker.cpp: (WebCore::RenderSVGResourceMasker::resourceBoundingBox): * rendering/RenderSVGResourceMasker.h: * rendering/RenderSVGResourcePattern.h: (WebCore::RenderSVGResourcePattern::resourceBoundingBox): * rendering/RenderSVGResourceSolidColor.h: (WebCore::RenderSVGResourceSolidColor::resourceBoundingBox): * rendering/RenderSVGText.cpp: (WebCore::RenderSVGText::strokeBoundingBox): (WebCore::RenderSVGText::repaintRectInLocalCoordinates): * rendering/SVGRenderSupport.cpp: (WebCore::SVGRenderBase::intersectRepaintRectWithResources): * rendering/SVGRenderSupport.h: * rendering/SVGRenderTreeAsText.cpp: (WebCore::writeResources): * rendering/style/SVGRenderStyle.h: (WebCore::SVGRenderStyle::hasClipper): (WebCore::SVGRenderStyle::hasMasker): (WebCore::SVGRenderStyle::hasFilter): 2010-06-01 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r60530. http://trac.webkit.org/changeset/60530 https://bugs.webkit.org/show_bug.cgi?id=40041 resource-har-conversion failed on GTK (Requested by abarth on #webkit). * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * inspector/front-end/HAREntry.js: Removed. * inspector/front-end/Resource.js: (WebInspector.Resource): (WebInspector.Resource.prototype.set url): * inspector/front-end/ResourceView.js: (WebInspector.ResourceView.prototype._refreshQueryString): (WebInspector.ResourceView.prototype._refreshFormData): (WebInspector.ResourceView.prototype._refreshParms): * inspector/front-end/WebKit.qrc: * inspector/front-end/inspector.html: 2010-06-01 No'am Rosenthal <noam.rosenthal@nokia.com> Reviewed by Kenneth Rohde Christiansen. [Qt] GraphicsLayer: warnings when reloading page https://bugs.webkit.org/show_bug.cgi?id=39694 Made sure recaching and masks aren't attempted on zero-size layers. No new tests. Old tests (e.g. LayoutTests/compositing/masks) show the problem. * platform/graphics/qt/GraphicsLayerQt.cpp: (WebCore::MaskEffectQt::draw): (WebCore::GraphicsLayerQtImpl::recache): 2010-06-01 anton muhin <antonm@google.com> Reviewed by Nate Chapin. [Chromium] enforce presence of named property query callback if named property enumerator is present https://bugs.webkit.org/show_bug.cgi?id=40006 We need to be able to distinguish between enumerable and not enumerable properties in the presence of named interceptor. V8 is migrating to use query callback to report enumerable properties and fallback check--- using getter callback---would report properties as not enumerable. Thus if there is an enumerator callback, there should be query callback as well. (see V8's r4751). * bindings/scripts/CodeGeneratorV8.pm: * bindings/v8/V8NPObject.cpp: (WebCore::npObjectQueryProperty): (WebCore::createV8ObjectForNPObject): * bindings/v8/custom/V8StorageCustom.cpp: (WebCore::V8Storage::namedPropertyQuery): 2010-06-01 Andrey Kosyakov <caseq@chromium.org> Reviewed by Pavel Feldman. WebInspector: Added conversion of inspector's resource representation into HAR. Moved common resource accessors from ResourceView to Resource. https://bugs.webkit.org/show_bug.cgi?id=30567 Test: http/tests/inspector/resource-har-conversion.html * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * inspector/front-end/HAREntry.js: Added. (WebInspector.HAREntry): (WebInspector.HAREntry.prototype.build): (WebInspector.HAREntry.prototype._buildRequest): (WebInspector.HAREntry.prototype._buildResponse): (WebInspector.HAREntry.prototype._buildContent): (WebInspector.HAREntry.prototype._buildTimings): (WebInspector.HAREntry.prototype._buildHeaders): (WebInspector.HAREntry.prototype._buildPostData): (WebInspector.HAREntry.prototype._buildParameters): (WebInspector.HAREntry.prototype._buildParameter): (WebInspector.HAREntry.prototype._toMilliseconds): * inspector/front-end/Resource.js: (WebInspector.Resource): (WebInspector.Resource.prototype.set url): (WebInspector.Resource.prototype.get receiveDuration): (WebInspector.Resource.prototype.requestHeaderValue): (WebInspector.Resource.prototype.get requestFormData): (WebInspector.Resource.prototype.set requestFormData): (WebInspector.Resource.prototype.responseHeaderValue): (WebInspector.Resource.prototype.get queryParameters): (WebInspector.Resource.prototype.get formParameters): (WebInspector.Resource.prototype._parseParameters): (WebInspector.Resource.prototype._headerValue): * inspector/front-end/ResourceView.js: (WebInspector.ResourceView.prototype._refreshQueryString): (WebInspector.ResourceView.prototype._refreshFormData): (WebInspector.ResourceView.prototype._refreshParms): * inspector/front-end/WebKit.qrc: * inspector/front-end/inspector.html: 2010-06-01 Laszlo Gombos <laszlo.1.gombos@nokia.com> Reviewed by Kenneth Rohde Christiansen. Fix "variable may be used before being set" warning in TextResourceDecoder::checkForHeadCharset https://bugs.webkit.org/show_bug.cgi?id=40001 No new tests as there is no new functionality. Initialize len to 0 just to eliminate the compiler warning. * loader/TextResourceDecoder.cpp: (WebCore::TextResourceDecoder::checkForHeadCharset): 2010-06-01 Ilya Tikhonovsky <loislo@chromium.org> Reviewed by Pavel Feldman. WebInspector: Safari specific files InspectorFrontendClientLocal were removed from chromium project. https://bugs.webkit.org/show_bug.cgi?id=39993 * WebCore.gypi: 2010-06-01 Andreas Kling <andreas.kling@nokia.com> Reviewed by Darin Adler. Fix broken code generation in GenerateParametersCheckExpression. https://bugs.webkit.org/show_bug.cgi?id=39960 * bindings/scripts/CodeGeneratorJS.pm: * bindings/scripts/test/JS/JSTestObj.cpp: Updated baseline. 2010-06-01 Mark Rowe <mrowe@apple.com> Rubber-stamped by Adam Roben. Remove Breakpoint.js. It was emptied in r60450 but for some reason it was not deleted at that time. The presence of empty files within the inspector's resource folder causes Mac OS X production builds to fail. * inspector/front-end/Breakpoint.js: Removed. 2010-05-24 James Hawkins <jhawkins@chromium.org> Reviewed by Darin Fisher. Added ability for PopupMenuClient to signal when * selection changed, and * selection cleared. https://bugs.webkit.org/show_bug.cgi?id=39639 No new tests because this functionality is intentionally hidden from everything other than renderer. * platform/PopupMenuClient.h: * platform/chromium/PopupMenuChromium.cpp: (WebCore::PopupListBox::selectIndex): (WebCore::PopupListBox::clearSelection): * rendering/RenderMenuList.h: (WebCore::RenderMenuList::RenderMenuList::selectionChanged): (WebCore::RenderMenuList::RenderMenuList::selectionCleared): * rendering/RenderTextControlSingleLine.h: (WebCore::RenderTextControlSingleLine::selectionChanged): (WebCore::RenderTextControlSingleLine::selectionCleared): 2010-06-01 Dumitru Daniliuc <dumi@chromium.org> Reviewed by Dimitri Glazkov. Check if a database needs to be auto-vacuumed only after transactions that have deleted something. https://bugs.webkit.org/show_bug.cgi?id=39688 * storage/Database.cpp: (WebCore::Database::resetDeletes): (WebCore::Database::hadDeletes): * storage/Database.h: * storage/DatabaseAuthorizer.cpp: (WebCore::DatabaseAuthorizer::resetDeletes): (WebCore::DatabaseAuthorizer::dropTable): (WebCore::DatabaseAuthorizer::dropTempTable): (WebCore::DatabaseAuthorizer::dropIndex): (WebCore::DatabaseAuthorizer::dropTempIndex): (WebCore::DatabaseAuthorizer::dropTrigger): (WebCore::DatabaseAuthorizer::dropTempTrigger): (WebCore::DatabaseAuthorizer::dropView): (WebCore::DatabaseAuthorizer::dropTempView): (WebCore::DatabaseAuthorizer::dropVTable): (WebCore::DatabaseAuthorizer::allowDelete): (WebCore::DatabaseAuthorizer::updateDeletesBasedOnTableName): Added. * storage/DatabaseAuthorizer.h: (WebCore::DatabaseAuthorizer::hadDeletes): * storage/SQLTransaction.cpp: (WebCore::SQLTransaction::openTransactionAndPreflight): (WebCore::SQLTransaction::postflightAndCommit): 2010-06-01 David Hyatt <hyatt@apple.com> Reviewed by Anders Carlsson. Add a preference for paginating during layout (the new model for computing page breaks). * page/Settings.cpp: (WebCore::Settings::Settings): * page/Settings.h: (WebCore::Settings::setPaginateDuringLayoutEnabled): (WebCore::Settings::paginateDuringLayoutEnabled): 2010-06-01 Dumitru Daniliuc <dumi@chromium.org> Reviewed by Adam Barth. Clean up the DB classes in preparation for a bigger refactoring. https://bugs.webkit.org/show_bug.cgi?id=39041 * storage/ChangeVersionWrapper.cpp: * storage/ChangeVersionWrapper.h: * storage/Database.cpp: (WebCore::Database::Database): (WebCore::Database::lastActionChangedDatabase): (WebCore::Database::lastActionWasInsert): (WebCore::Database::inProgressTransactionCompleted): (WebCore::Database::securityOrigin): * storage/Database.h: (WebCore::Database::sqliteDatabase): (WebCore::Database::databaseDebugName): * storage/DatabaseTask.cpp: (WebCore::DatabaseTransactionTask::doPerformTask): * storage/DatabaseTask.h: * storage/SQLStatement.cpp: (WebCore::SQLStatement::execute): * storage/SQLStatement.h: * storage/SQLTransaction.cpp: (WebCore::SQLTransaction::SQLTransaction): (WebCore::SQLTransaction::openTransactionAndPreflight): (WebCore::SQLTransaction::runStatements): (WebCore::SQLTransaction::runCurrentStatement): (WebCore::SQLTransaction::postflightAndCommit): (WebCore::SQLTransaction::cleanupAfterSuccessCallback): (WebCore::SQLTransaction::cleanupAfterTransactionErrorCallback): * storage/SQLTransaction.h: 2010-06-01 Rob Buis <rwlbuis@gmail.com> Reviewed by Nikolas Zimmermann. Large SVG rect with shadow fails to render https://bugs.webkit.org/show_bug.cgi?id=38851 Store intermediate shadow calculation in floats to prevent integer overflow. Test: svg/filters/shadow-on-rect-large.svg * rendering/style/SVGRenderStyle.cpp: (WebCore::getSVGShadowExtent): (WebCore::SVGRenderStyle::inflateForShadow): 2010-06-01 Jer Noble <jer.noble@apple.com> Reviewed by Sam Weinig. QuickTime 7.6.4 + Safari Nightly = Crash https://bugs.webkit.org/show_bug.cgi?id=40019 rdar://problem/8035443 Check the return value of QTCFPropertyListCreateXMLData before calling CFDataGetLength(). * platform/graphics/win/QTCFDictionary.cpp: (QTCFDictionaryCreateCopyWithDataCallback): 2010-06-01 Rob Buis <rwlbuis@gmail.com> Reviewed by Dirk Schulze. Manipulating SVG element attributes in Javascript does not work as expected https://bugs.webkit.org/show_bug.cgi?id=34328 Reset the viewBox to be empty when removing the viewBox attribute. Test: svg/custom/svg-viewBox-dynamic.html * svg/SVGFitToViewBox.cpp: (WebCore::SVGFitToViewBox::parseViewBox): (WebCore::SVGFitToViewBox::parseMappedAttribute): * svg/SVGFitToViewBox.h: * svg/SVGViewSpec.cpp: (WebCore::SVGViewSpec::setViewBoxString): (WebCore::SVGViewSpec::parseViewSpec): 2010-06-01 Chris Fleizach <cfleizach@apple.com> Reviewed by Beth Dakin. AX: WebKit doesn't call [super -accessibilityAttributeValue:attribute forParameter:] when it encounters a parameterized attribute that it doesn't handle. https://bugs.webkit.org/show_bug.cgi?id=39324 There are some parameters that super handles that are not explicitly returned by the list of the element's attributes. In those cases, super should handle. * accessibility/mac/AccessibilityObjectWrapper.mm: (-[AccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]): 2010-05-28 David Hyatt <hyatt@apple.com> Reviewed by Beth Dakin. https://bugs.webkit.org/show_bug.cgi?id=15550, complete implementation of column-span. Add support for nested column spans. When a column span is nested inside multiple enclosing blocks, the blocks have to be split around the column-span. We do this using block element continuations, the same kind of solution we employed for blocks inside inlines. The code for block continuations is very similar to the code for inline continuations. It may be possible to refactor the code into RenderBoxModelObject so that more of it can be shared, but this first pass avoids that so as not to risk causing any regressions in core rendering. Note also that - just as with inline continuations - you can't unsplit block continuations yet. There is no technical limitation here... the functions just need to be written to handle it. Added new tests in fast/multicol/span. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::styleDidChange): (WebCore::RenderBlock::continuationBefore): (WebCore::RenderBlock::addChildToContinuation): (WebCore::RenderBlock::containingColumnsBlock): (WebCore::RenderBlock::clone): (WebCore::RenderBlock::splitBlocks): (WebCore::RenderBlock::splitFlow): (WebCore::RenderBlock::splitAnonymousBlocksAroundChild): (WebCore::RenderBlock::makeChildrenAnonymousColumnBlocks): (WebCore::RenderBlock::columnsBlockForSpanningElement): (WebCore::RenderBlock::addChildIgnoringAnonymousColumnBlocks): (WebCore::RenderBlock::addChild): (WebCore::RenderBlock::addChildIgnoringContinuation): (WebCore::RenderBlock::blockElementContinuation): (WebCore::RenderBlock::layoutColumns): * rendering/RenderBlock.h: 2010-06-01 Alexey Proskuryakov <ap@apple.com> Build fix. Hopefully, touching WebCore.base.exp will actually rebuild the export file. * WebCore.Geolocation.exp: * WebCore.base.exp: 2010-06-01 Dumitru Daniliuc <dumi@chromium.org> Reviewed by Adam Barth. Execute void callbacks in the context they were created in. https://bugs.webkit.org/show_bug.cgi?id=39145 * bindings/v8/custom/V8CustomVoidCallback.cpp: (WebCore::V8CustomVoidCallback::V8CustomVoidCallback): (WebCore::V8CustomVoidCallback::handleEvent): * bindings/v8/custom/V8CustomVoidCallback.h: 2010-06-01 Alexey Proskuryakov <ap@apple.com> Reviewed by Sam Weinig. https://bugs.webkit.org/show_bug.cgi?id=39434 REGRESSION (r59811): Geolocation callbacks cannot be created * DerivedSources.make: Don't append both WebCore.Geolocation.exp and WebCore.ClientBasedGeolocation.exp, they are mutually exclusive. * WebCore.Geolocation.exp: Touched to force .exp file rebuild. * WebCore.xcodeproj/project.pbxproj: Removed GeolocationService related files. * bindings/js/JSGeolocationCustom.cpp: (WebCore::createPositionCallback): Functions defined in JavaScript code no longer inherit from InternalFunction, they inherit from JSFunction. This check is still imperfect, because it's not clear what definition of "function" should really be used, if any - other bindings code never checks callback type. (WebCore::createPositionErrorCallback): Ditto. * page/Geolocation.h: Don't include GeolocationService.h unless it's going to be used. 2010-06-01 Jeremy Orlow <jorlow@chromium.org> Reviewed by Darin Fisher. IndexedDB cleanup https://bugs.webkit.org/show_bug.cgi?id=40007 Remove the exception code parameter since this function can no longer cause an exception. * storage/IDBObjectStoreRequest.idl: * storage/IndexedDatabase.h: * storage/IndexedDatabaseImpl.cpp: (WebCore::IndexedDatabaseImpl::open): * storage/IndexedDatabaseImpl.h: * storage/IndexedDatabaseRequest.cpp: (WebCore::IndexedDatabaseRequest::open): * storage/IndexedDatabaseRequest.h: * storage/IndexedDatabaseRequest.idl: 2010-06-01 Martin Robinson <mrobinson@igalia.com> Reviewed by Xan Lopez. [GTK] Double clicks cause three button press events https://bugs.webkit.org/show_bug.cgi?id=38853 Add GOwnPtr wrapper for GdkEvent and expose a setter for PlatformMouseEvent::m_clickCount. * GNUmakefile.am: Add GOwnPtrGtk.{cpp,h} to the sources list. * platform/PlatformMouseEvent.h: (WebCore::PlatformMouseEvent::setClickCount): Added. * platform/gtk/GOwnPtrGtk.cpp: Added. (WTF::GdkEvent): * platform/gtk/GOwnPtrGtk.h: Added. 2010-06-01 Adam Langley <agl@chromium.org> Reviewed by Eric Seidel. [chromium] respect the user's embedded bitmap settings on Linux. We plumbed everything through Skia and Chrome, but forgot to connect the two wires inside WebCore. (Note: no layout test because test_shell forces this option off. Also, the test font which triggers this behaviour is 32MB.) https://bugs.webkit.org/show_bug.cgi?id=39894 http://code.google.com/p/chromium/issues/detail?id=21149 * platform/graphics/chromium/FontPlatformDataLinux.cpp: (WebCore::FontPlatformData::setupPaint): 2010-06-01 Simon Hausmann <simon.hausmann@nokia.com> Reviewed by Laszlo Gombos. [Qt] Fix installation of the QtWebKit module .pri file when building inside of Qt * WebCore.pro: 2010-06-01 Jocelyn Turcotte <jocelyn.turcotte@nokia.com> Reviewed by Simon Hausmann. [Qt] Fix a QtWebKit.pc corruption problem. https://bugs.webkit.org/show_bug.cgi?id=36826 The problem occurs while installing QtWebKit from trunk or a source package. * WebCore.pro: 2010-06-01 Simon Hausmann <simon.hausmann@nokia.com> Reviewed by Laszlo Gombos. [Qt] Fix Symbian package dependencies of apps against QtWebKit when installing into Qt Install the versioning qt_webkit_version.pri into $$[QMAKE_MKSPECS]/modules, which is where mkspecs/features/qt.prf expects it. * WebCore.pro: 2010-06-01 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r60470. http://trac.webkit.org/changeset/60470 https://bugs.webkit.org/show_bug.cgi?id=39990 Need to rollout until bot can be updated (Requested by jorlow on #webkit). * bindings/scripts/CodeGeneratorV8.pm: * bindings/v8/ScriptController.cpp: (WebCore::ScriptController::namedItemAdded): (WebCore::ScriptController::namedItemRemoved): * bindings/v8/V8DOMWindowShell.cpp: (WebCore::V8DOMWindowShell::updateDocumentWrapperCache): * bindings/v8/V8DOMWindowShell.h: * bindings/v8/V8DOMWrapper.cpp: (WebCore::V8DOMWrapper::instantiateV8Object): * bindings/v8/custom/V8HTMLDocumentCustom.cpp: (WebCore::V8HTMLDocument::namedPropertyDeleter): (WebCore::V8HTMLDocument::namedPropertyGetter): (WebCore::V8HTMLDocument::indexedPropertyGetter): (WebCore::V8HTMLDocument::allAccessorSetter): (WebCore::toV8): 2010-06-01 Anton Muhin <antonm@chromium.org> Reviewed by Nate Chapin. [Chromium] get rid of named interceptor on HTMLDocument and introduce/remove accessors when named items get deleted/removed https://bugs.webkit.org/show_bug.cgi?id=39877 This patch makes callbacks invoked on named items addition/removal install API accessors and thus there is no more need in named and indexed interceptors on HTMLDocument which speeds up invocation of methods on document. * bindings/scripts/CodeGeneratorV8.pm: * bindings/v8/ScriptController.cpp: (WebCore::ScriptController::namedItemAdded): (WebCore::ScriptController::namedItemRemoved): * bindings/v8/V8DOMWindowShell.cpp: (WebCore::checkDocumentWrapper): (WebCore::V8DOMWindowShell::updateDocumentWrapperCache): (WebCore::getter): (WebCore::V8DOMWindowShell::namedItemAdded): (WebCore::V8DOMWindowShell::namedItemRemoved): * bindings/v8/V8DOMWindowShell.h: * bindings/v8/V8DOMWrapper.cpp: (WebCore::V8DOMWrapper::instantiateV8Object): * bindings/v8/custom/V8HTMLDocumentCustom.cpp: (WebCore::V8HTMLDocument::WrapInShadowObject): (WebCore::V8HTMLDocument::GetNamedProperty): (WebCore::V8HTMLDocument::allAccessorSetter): (WebCore::toV8): 2010-06-01 Zoltan Herczeg <zherczeg@webkit.org> Reviewed by Dirk Schulze. Make the spot light anti-alias effect look similar to SVG expected values. https://bugs.webkit.org/show_bug.cgi?id=39477 The W3 standard only mention, that the edge of the spotlight should be anti-aliased but it does not specify how. The provided expected values gives some hint about their intentions. The algorithm uses a fixed range, which computed as follows: let a = cos(spot light cutoff range) the light fades off in the [a-0.016, a] range. Test: svg/W3C-SVG-1.1/filters-light-04-f.svg Updated pixel test: svg/W3C-SVG-1.1/filters-light-01-f.svg * svg/graphics/filters/SVGLightSource.cpp: (WebCore::SpotLightSource::initPaintingData): 2010-05-31 Adam Barth <abarth@webkit.org> Reviewed by Eric Seidel. Fix default action for EndTagOpenState https://bugs.webkit.org/show_bug.cgi?id=39982 Add a test for a bogus end tag to webkit01.dat and update expected results now that we pass some more tests. Adding this test revealed a bug in resuming the bogus comment state. I've left these broken expectations, but I'll fix the bug in a future patch. (The bug existed prior to this patch, just not the test.) * html5lib/resources/webkit01.dat: * html5lib/runner-expected-html5.txt: * html5lib/webkit-resumer-expected-html5.txt: 2010-05-31 Lyon Chen <liachen@rim.com> Reviewed by Kent Tamura. Enum value FORWARD, BACKWARD, RIGHT, LEFT are causing macro conflicts. https://bugs.webkit.org/show_bug.cgi?id=35530 Change enum EAlteration from { MOVE, EXTEND } to { AlterationMove, AlterationExtend } and enum EDirection { FORWARD, BACKWARD, RIGHT, LEFT} to { DirectionForward, DirectionBackward, DirectionRight, DirectionLeft } to avoid macro conflict, and also better coding style conformance. * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::visiblePositionRangeForLine): (WebCore::AccessibilityRenderObject::doAXRangeForLine): * editing/Editor.cpp: (WebCore::Editor::deleteWithDirection): (WebCore::Editor::markMisspellingsAfterTypingToPosition): (WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges): * editing/EditorCommand.cpp: (WebCore::executeDeleteBackward): (WebCore::executeDeleteBackwardByDecomposingPreviousCharacter): (WebCore::executeDeleteForward): (WebCore::executeDeleteToBeginningOfLine): (WebCore::executeDeleteToBeginningOfParagraph): (WebCore::executeDeleteToEndOfLine): (WebCore::executeDeleteToEndOfParagraph): (WebCore::executeDeleteWordBackward): (WebCore::executeDeleteWordForward): (WebCore::executeForwardDelete): (WebCore::executeMoveBackward): (WebCore::executeMoveBackwardAndModifySelection): (WebCore::executeMoveDown): (WebCore::executeMoveDownAndModifySelection): (WebCore::executeMoveForward): (WebCore::executeMoveForwardAndModifySelection): (WebCore::executeMoveLeft): (WebCore::executeMoveLeftAndModifySelection): (WebCore::executeMovePageDown): (WebCore::executeMovePageDownAndModifySelection): (WebCore::executeMovePageUp): (WebCore::executeMovePageUpAndModifySelection): (WebCore::executeMoveRight): (WebCore::executeMoveRightAndModifySelection): (WebCore::executeMoveToBeginningOfDocument): (WebCore::executeMoveToBeginningOfDocumentAndModifySelection): (WebCore::executeMoveToBeginningOfLine): (WebCore::executeMoveToBeginningOfLineAndModifySelection): (WebCore::executeMoveToBeginningOfParagraph): (WebCore::executeMoveToBeginningOfParagraphAndModifySelection): (WebCore::executeMoveToBeginningOfSentence): (WebCore::executeMoveToBeginningOfSentenceAndModifySelection): (WebCore::executeMoveToEndOfDocument): (WebCore::executeMoveToEndOfDocumentAndModifySelection): (WebCore::executeMoveToEndOfSentence): (WebCore::executeMoveToEndOfSentenceAndModifySelection): (WebCore::executeMoveToEndOfLine): (WebCore::executeMoveToEndOfLineAndModifySelection): (WebCore::executeMoveToEndOfParagraph): (WebCore::executeMoveToEndOfParagraphAndModifySelection): (WebCore::executeMoveParagraphBackwardAndModifySelection): (WebCore::executeMoveParagraphForwardAndModifySelection): (WebCore::executeMoveUp): (WebCore::executeMoveUpAndModifySelection): (WebCore::executeMoveWordBackward): (WebCore::executeMoveWordBackwardAndModifySelection): (WebCore::executeMoveWordForward): (WebCore::executeMoveWordForwardAndModifySelection): (WebCore::executeMoveWordLeft): (WebCore::executeMoveWordLeftAndModifySelection): (WebCore::executeMoveWordRight): (WebCore::executeMoveWordRightAndModifySelection): (WebCore::executeMoveToLeftEndOfLine): (WebCore::executeMoveToLeftEndOfLineAndModifySelection): (WebCore::executeMoveToRightEndOfLine): (WebCore::executeMoveToRightEndOfLineAndModifySelection): * editing/SelectionController.cpp: (WebCore::SelectionController::willBeModified): (WebCore::SelectionController::modify): * editing/SelectionController.h: (WebCore::SelectionController::): * editing/TypingCommand.cpp: (WebCore::TypingCommand::deleteKeyPressed): (WebCore::TypingCommand::forwardDeleteKeyPressed): * page/DOMSelection.cpp: (WebCore::DOMSelection::modify): (WebCore::DOMSelection::deleteFromDocument): * page/EventHandler.cpp: (WebCore::EventHandler::handleKeyboardSelectionMovement): 2010-05-31 Eric Seidel <eric@webkit.org> Reviewed by Adam Barth. REGRESSION(60409): window.onload never fires when using HTML5 parser https://bugs.webkit.org/show_bug.cgi?id=39981 * html/HTML5Tokenizer.cpp: (WebCore::HTML5Tokenizer::finish): - The logic was just wrong here. We should only be setting m_wasWaitingOnScriptsDuringFinish if isWaitingForScripts() is true, and we should be calling end() when it is not. (WebCore::HTML5Tokenizer::resumeParsingAfterScriptExecution): - Add another ASSERT to catch cases like this. * html/HTML5TreeBuilder.cpp: (WebCore::HTML5TreeBuilder::finished): - Add a comment about why we don't need to call m_document->finishedParsing() 2010-05-31 Tony Chang <tony@chromium.org> Reviewed by Dan Bernstein. REGRESSION (r58665): Infinite recursion in Position::getInlineBoxAndOffset() https://bugs.webkit.org/show_bug.cgi?id=39946 r58665 added an infinite recursion check, but didn't take into consideration recursion between two Positions. This adds a check for when downstreamIgnoringEditingBoundaries(p1) == p2 and upstreamIgnoringEditingBoundaries(p2) == p1 Test: editing/selection/mixed-editability-12.html * dom/Position.cpp: (WebCore::Position::getInlineBoxAndOffset): 2010-05-31 Leo Yang <leo.yang@torchmobile.com.cn> Reviewed by George Staikos. Fix canvas.toDataURL(type, quality, ...) to let it support quality parameter. And implement it in Qt port. https://bugs.webkit.org/show_bug.cgi?id=37304 Tests: platform/qt/fast/canvas/toDataURL-jpeg-alpha.html platform/qt/fast/canvas/toDataURL-jpeg-primarycolors.html platform/qt/fast/canvas/toDataURL-jpeg-quality-basic.html platform/qt/fast/canvas/toDataURL-jpeg-quality-notnumber.html platform/qt/fast/canvas/toDataURL-jpeg-quality-outsiderange.html * bindings/js/JSHTMLCanvasElementCustom.cpp: (WebCore::JSHTMLCanvasElement::toDataURL): * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp: (WebCore::V8HTMLCanvasElement::toDataURLCallback): * dom/CanvasSurface.cpp: (WebCore::CanvasSurface::toDataURL): * dom/CanvasSurface.h: (WebCore::CanvasSurface::toDataURL): * html/HTMLCanvasElement.idl: * platform/graphics/ImageBuffer.h: * platform/graphics/cairo/ImageBufferCairo.cpp: (WebCore::ImageBuffer::toDataURL): * platform/graphics/cg/ImageBufferCG.cpp: (WebCore::ImageBuffer::toDataURL): * platform/graphics/haiku/ImageBufferHaiku.cpp: (WebCore::ImageBuffer::toDataURL): * platform/graphics/qt/ImageBufferQt.cpp: (WebCore::ImageBuffer::toDataURL): * platform/graphics/skia/ImageBufferSkia.cpp: (WebCore::ImageBuffer::toDataURL): * platform/graphics/wince/ImageBufferWince.cpp: (WebCore::ImageBuffer::toDataURL): * platform/graphics/wx/ImageBufferWx.cpp: (WebCore::ImageBuffer::toDataURL): 2010-05-31 Lucas De Marchi <lucas.demarchi@profusion.mobi> Reviewed by Kenneth Rohde Christiansen. [EFL] Add Context Menu implementation https://bugs.webkit.org/show_bug.cgi?id=39821 * platform/ContextMenu.h: add port-specific attributes. * platform/ContextMenuItem.h: create PlatformMenuItemDescription as in other ports (WebCore::PlatformMenuItemDescription::PlatformMenuItemDescription): * platform/efl/ContextMenuEfl.cpp:implement needed methods for this port. (WebCore::ContextMenu::ContextMenu): (WebCore::ContextMenu::~ContextMenu): (WebCore::ContextMenu::appendItem): (WebCore::ContextMenu::setPlatformDescription): (WebCore::ContextMenu::releasePlatformDescription): * platform/efl/ContextMenuItemEfl.cpp: implement needed methods for this port. (WebCore::ContextMenuItem::ContextMenuItem): (WebCore::ContextMenuItem::~ContextMenuItem): (WebCore::ContextMenuItem::releasePlatformDescription): (WebCore::ContextMenuItem::type): (WebCore::ContextMenuItem::setType): (WebCore::ContextMenuItem::action): (WebCore::ContextMenuItem::setAction): (WebCore::ContextMenuItem::title): (WebCore::ContextMenuItem::setTitle): (WebCore::ContextMenuItem::platformSubMenu): (WebCore::ContextMenuItem::setSubMenu): (WebCore::ContextMenuItem::checked): (WebCore::ContextMenuItem::setChecked): (WebCore::ContextMenuItem::enabled): (WebCore::ContextMenuItem::setEnabled): 2010-05-31 Ilya Tikhonovsky <loislo@chromium.org> Reviewed by Pavel Feldman. WebInspector: Classes for native serialization to JSON were implemented. https://bugs.webkit.org/show_bug.cgi?id=34204 * GNUmakefile.am: * WebCore.Inspector.exp: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * inspector/InspectorValues.cpp: Added. (WebCore::escapeChar): (WebCore::doubleQuoteString): (WebCore::InspectorBaseValue::toJSONString): (WebCore::InspectorBaseValue::writeJSON): (WebCore::InspectorValue::writeJSON): (WebCore::InspectorString::writeJSON): (WebCore::InspectorObject::writeJSON): (WebCore::InspectorArray::writeJSON): * inspector/InspectorValues.h: Added. (WebCore::InspectorBaseValue::InspectorBaseValue): (WebCore::InspectorBaseValue::~InspectorBaseValue): (WebCore::InspectorBaseValue::null): (WebCore::InspectorBaseValue::): (WebCore::InspectorBaseValue::type): (WebCore::InspectorValue::create): (WebCore::InspectorValue::InspectorValue): (WebCore::InspectorValue::): (WebCore::InspectorString::create): (WebCore::InspectorString::InspectorString): (WebCore::InspectorObject::create): (WebCore::InspectorObject::~InspectorObject): (WebCore::InspectorObject::InspectorObject): (WebCore::InspectorArray::create): (WebCore::InspectorArray::~InspectorArray): (WebCore::InspectorArray::length): (WebCore::InspectorArray::InspectorArray): (WebCore::InspectorObject::setBool): (WebCore::InspectorObject::setNumber): (WebCore::InspectorObject::setString): (WebCore::InspectorObject::set): (WebCore::InspectorArray::pushBool): (WebCore::InspectorArray::pushNumber): (WebCore::InspectorArray::pushString): (WebCore::InspectorArray::push): 2010-05-31 Olivier Goffart <olivier.goffart@nokia.com> Reviewed by Oliver Hunt. [PATCH] compilation error with clang in JSDOMBinding.h https://bugs.webkit.org/show_bug.cgi?id=39945 JSNode is only forward declared at this point. And since neither "wrapper" nor JSValue are type-dependent. Compilers should report errors at the first compilation pass. The fix is to move the conversion the line above, as the call to the function getCachedDOMNodeWrapper is type-dependent, the conversion will happen at template-instantiation time. See also http://llvm.org/bugs/show_bug.cgi?id=7244 * bindings/js/JSDOMBinding.h: (WebCore::getDOMNodeWrapper): 2010-05-31 Pavel Podivilov <podivilov@chromium.org> Reviewed by Pavel Feldman. Web Inspector: Moved breakpoints add/remove logic to the BreakpointManager. https://bugs.webkit.org/show_bug.cgi?id=14190 * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * inspector/front-end/Breakpoint.js: * inspector/front-end/BreakpointManager.js: Added. (WebInspector.BreakpointManager): (WebInspector.BreakpointManager.prototype.addBreakpoint): (WebInspector.BreakpointManager.prototype.removeBreakpoint): (WebInspector.BreakpointManager.prototype.breakpointsForSourceID): (WebInspector.BreakpointManager.prototype.breakpointsForURL): (WebInspector.BreakpointManager.prototype.reset): (WebInspector.BreakpointManager.prototype._saveBreakpointOnBackend): (WebInspector.BreakpointManager.prototype._removeBreakpointFromBackend): (WebInspector.Breakpoint): (WebInspector.Breakpoint.prototype.get enabled): (WebInspector.Breakpoint.prototype.set enabled): (WebInspector.Breakpoint.prototype.get sourceText): (WebInspector.Breakpoint.prototype.set sourceText): (WebInspector.Breakpoint.prototype.get label): (WebInspector.Breakpoint.prototype.get id): (WebInspector.Breakpoint.prototype.get condition): (WebInspector.Breakpoint.prototype.set condition): * inspector/front-end/BreakpointsSidebarPane.js: (WebInspector.BreakpointsSidebarPane): (WebInspector.BreakpointsSidebarPane.prototype.reset): (WebInspector.BreakpointsSidebarPane.prototype._breakpointAdded): (WebInspector.BreakpointsSidebarPane.prototype._breakpointRemoved): (WebInspector.BreakpointsSidebarPane.prototype._breakpointEnableChanged): * inspector/front-end/Object.js: (WebInspector.Object.prototype.dispatchEventToListeners): * inspector/front-end/ScriptView.js: (WebInspector.ScriptView.prototype._addBreakpoint): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel): (WebInspector.ScriptsPanel.prototype._breakpointAdded): (WebInspector.ScriptsPanel.prototype._breakpointRemoved): (WebInspector.ScriptsPanel.prototype.editScriptSource.mycallback): (WebInspector.ScriptsPanel.prototype.editScriptSource): (WebInspector.ScriptsPanel.prototype._showScriptOrResource): * inspector/front-end/SourceFrame.js: (WebInspector.SourceFrame.prototype._contextMenu): * inspector/front-end/SourceView.js: (WebInspector.SourceView.prototype._addBreakpoint): (WebInspector.SourceView.prototype._removeBreakpoint): * inspector/front-end/WebKit.qrc: * inspector/front-end/inspector.html: * inspector/front-end/inspector.js: (WebInspector.loaded): (WebInspector.restoredBreakpoint): (WebInspector.reset): 2010-05-31 Alexander Pavlov <apavlov@chromium.org> Unreviewed, build fix. Add references to inspector/front-end/TabbedPane.js wherever applicable. * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * inspector/front-end/WebKit.qrc: 2010-05-31 Alexander Pavlov <apavlov@chromium.org> Unreviewed, add a file not added in r60445. * inspector/front-end/TabbedPane.js: Added 2010-05-31 Martin Robinson <mrobinson@igalia.com> Reviewed by Gustavo Noronha Silva. [GTK] Text copied from a WebView cannot be pasted into gnome-terminal https://bugs.webkit.org/show_bug.cgi?id=39827 Switch all methods in Pasteboard to use the PasteboardHelper + DataObjectGtk approach used in other parts of WebKit GTK+. * platform/gtk/PasteboardGtk.cpp: (WebCore::Pasteboard::writeSelection): Switch to using PasteboardHelper. (WebCore::Pasteboard::writePlainText): Ditto. (WebCore::Pasteboard::writeURL): Ditto. (WebCore::Pasteboard::writeImage): Ditto. (WebCore::Pasteboard::clear): Small cleanup. (WebCore::Pasteboard::documentFragment): Switch to using PasteboardHelper. (WebCore::Pasteboard::plainText): Ditto. 2010-05-31 Darin Adler <darin@apple.com> Updated bindings test results for change in JavaScript host calling convention change from 2 days ago. * bindings/scripts/test/JS/JSTestObj.cpp: Regenerated and inspected to see that the new result is correct. * bindings/scripts/test/JS/JSTestObj.h: Ditto. 2010-05-31 Alexander Pavlov <apavlov@chromium.org> Reviewed by Pavel Feldman. Web Inspector: Implement additional tabs support in ResourceView https://bugs.webkit.org/show_bug.cgi?id=39822 * inspector/front-end/ResourceView.js: (WebInspector.ResourceView): (WebInspector.ResourceView.prototype._selectHeadersTab): (WebInspector.ResourceView.prototype._innerSelectContentTab): * inspector/front-end/SourceView.js: (WebInspector.SourceView.prototype.show): (WebInspector.SourceView.prototype.hide): (WebInspector.SourceView.prototype.resize): (WebInspector.SourceView.prototype.updateLocalContent): (WebInspector.SourceView.prototype.selectLocalContentTab): * inspector/front-end/TabbedPane.js: Added. (WebInspector.TabbedPane): (WebInspector.TabbedPane.prototype.appendTab): (WebInspector.TabbedPane.prototype.tabObjectForId): (WebInspector.TabbedPane.prototype.hideTab): (WebInspector.TabbedPane.prototype.selectTabById): * inspector/front-end/TextViewer.js: (WebInspector.TextViewer.prototype._getSelection): * inspector/front-end/inspector.html: 2010-05-31 Alexander Pavlov <apavlov@chromium.org> Reviewed by Pavel Feldman. Web Inspector: Implement retrieval of CSS stylesheets for source editing https://bugs.webkit.org/show_bug.cgi?id=39833 Test: inspector/styles-source-offsets.html * css/CSSParser.cpp: (WebCore::CSSParser::CSSParser): (WebCore::CSSParser::parseSheet): (WebCore::CSSParser::createStyleRule): * css/CSSParser.h: * inspector/InspectorBackend.cpp: (WebCore::InspectorBackend::getStyleSheet): (WebCore::InspectorBackend::getRuleRangesForStyleSheetId): * inspector/InspectorBackend.h: * inspector/InspectorBackend.idl: * inspector/InspectorCSSStore.cpp: (WebCore::InspectorCSSStore::getRuleRangesForStyleSheet): (WebCore::InspectorCSSStore::asCSSStyleRule): (WebCore::InspectorCSSStore::styleSheetForId): * inspector/InspectorCSSStore.h: * inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::getStyleSheet): (WebCore::InspectorDOMAgent::getRuleRangesForStyleSheetId): (WebCore::InspectorDOMAgent::buildObjectForStyle): (WebCore::InspectorDOMAgent::populateObjectWithStyleProperties): (WebCore::InspectorDOMAgent::buildObjectForStyleSheet): (WebCore::InspectorDOMAgent::buildObjectForRule): (WebCore::InspectorDOMAgent::getParentStyleSheet): * inspector/InspectorDOMAgent.h: * inspector/InspectorFrontend.cpp: (WebCore::InspectorFrontend::didGetStyleSheet): * inspector/InspectorFrontend.h: * inspector/front-end/DOMAgent.js: (WebInspector.CSSStyleDeclaration): 2010-05-31 Philippe Normand <pnormand@igalia.com> Reviewed by Xan Lopez. [GStreamer] float variables misused https://bugs.webkit.org/show_bug.cgi?id=38842 Use 0.0f for float variables instead of 0.0. Also added some missing casts around GST_SECOND. * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: (WebCore::playbackPosition): (WebCore::MediaPlayerPrivateGStreamer::duration): (WebCore::MediaPlayerPrivateGStreamer::currentTime): (WebCore::MediaPlayerPrivateGStreamer::seek): (WebCore::MediaPlayerPrivateGStreamer::naturalSize): (WebCore::MediaPlayerPrivateGStreamer::setRate): (WebCore::MediaPlayerPrivateGStreamer::maxTimeSeekable): (WebCore::MediaPlayerPrivateGStreamer::maxTimeLoaded): (WebCore::MediaPlayerPrivateGStreamer::totalBytes): 2010-05-31 Steve Block <steveblock@google.com> Unreviewed, rolling out r60069. http://trac.webkit.org/changeset/60069 https://bugs.webkit.org/show_bug.cgi?id=39288 Roll out r60069 while the need for Geolocation::stop() is investigated. * loader/FrameLoader.cpp: (WebCore::FrameLoader::stopLoading): * page/Geolocation.cpp: (WebCore::Geolocation::disconnectFrame): * page/Geolocation.h: 2010-05-31 Olivier Tilloy <olivier@tilloy.net> Reviewed by Gustavo Noronha Silva. [Gtk] Implement RenderThemeGtk::systemColor to apply the correct colors from the current GTK theme. https://bugs.webkit.org/show_bug.cgi?id=37779 * platform/gtk/RenderThemeGtk.cpp: (WebCore::RenderThemeGtk::RenderThemeGtk): (WebCore::RenderThemeGtk::systemColor): (WebCore::RenderThemeGtk::gtkButton): * platform/gtk/RenderThemeGtk.h: 2010-05-31 Dirk Schulze <krit@webkit.org> Reviewed by Nikolas Zimmermann. SVG Filter: Crash if parent and child elements use the same filter https://bugs.webkit.org/show_bug.cgi?id=39536 If a parent and a child used the same filter, the temporary saved context reference got overwritten by the child. The reference is stored in FilterData now. FilterData depends to the target object and avoids overwriting any reference. Test: svg/filters/parent-children-with-same-filter.svg * rendering/RenderSVGResourceFilter.cpp: (WebCore::RenderSVGResourceFilter::RenderSVGResourceFilter): (WebCore::RenderSVGResourceFilter::applyResource): (WebCore::RenderSVGResourceFilter::postApplyResource): * rendering/RenderSVGResourceFilter.h: 2010-05-31 Xan Lopez <xlopez@igalia.com> Reviewed by Gustavo Noronha. Fix all compiler warnings. * plugins/gtk/gtk2xtbin.c: (xt_event_dispatch): (gtk_xtbin_get_type): (gtk_xtbin_set_position): (xt_add_focus_listener): (xt_remove_focus_listener): 2010-05-31 Oswald Buddenhagen <oswald.buddenhagen@nokia.com> Reviewed by Simon Hausmann. [Qt] Escape backslashes in the .pro files qmake in Qt 4.7 warns about unescaped backspaces and deprecates them. * WebCore.pro: 2010-05-31 Anton Muhin <antonm@chromium.org> Reviewed by Darin Adler. Make NodeList getters take AtomicString instead of plain String https://bugs.webkit.org/show_bug.cgi?id=39892 Those methods turn String into AtomicString later. And this conversion is faster if underlying string is already atomic. That buys small (~2-3%) speed up for Chromium on Dromaeo DOM Core. I don't know if Safari benefits from it. * dom/Node.cpp: (WebCore::Node::getElementsByTagName): (WebCore::Node::getElementsByTagNameNS): * dom/Node.h: 2010-05-30 Adam Barth <abarth@webkit.org> Reviewed by Darin Adler. Fix LayoutTests/fast/parser/xml-declaration-missing-ending-mark.html in HTML5 parser https://bugs.webkit.org/show_bug.cgi?id=39939 Turns out we need to implement the bogus comment state. :) * html/HTML5Lexer.cpp: (WebCore::HTML5Lexer::nextToken): 2010-05-30 Eric Seidel <eric@webkit.org> Reviewed by Adam Barth. fast/tokenizer/write-partial-entity.html hits ASSERT SegmentedString in the HTML5 Parser https://bugs.webkit.org/show_bug.cgi?id=39935 Test: fast/tokenizer/write-partial-entity.html * html/HTML5Tokenizer.cpp: (WebCore::HTML5Tokenizer::executeScript): - Use m_source.append(oldInsertionPoint) instead of oldInsertionPoint.prepend(m_source) because m_source may have had characters pushed onto it and prepend() does not handle that case. 2010-05-30 Lyon Chen <liachen@rim.com> Reviewed by Kent Tamura. This is a coding style cleanup before fixing to bug 35530. Enum value FORWARD, BACKWARD, RIGHT, LEFT are causing macro conflicts. https://bugs.webkit.org/show_bug.cgi?id=35530 * editing/Editor.cpp: (WebCore::Editor::deleteWithDirection): (WebCore::Editor::fontForSelection): (WebCore::Editor::applyStyle): (WebCore::Editor::applyParagraphStyle): (WebCore::Editor::applyStyleToSelection): (WebCore::Editor::applyParagraphStyleToSelection): (WebCore::triStateOfStyleInComputedStyle): (WebCore::Editor::selectionStartHasStyle): (WebCore::Editor::selectionHasStyle): (WebCore::Editor::paste): (WebCore::Editor::ignoreSpelling): (WebCore::Editor::learnSpelling): (WebCore::findFirstMisspellingInRange): (WebCore::findFirstGrammarDetailInRange): (WebCore::findFirstBadGrammarInRange): (WebCore::findFirstMisspellingOrBadGrammarInRange): (WebCore::Editor::advanceToNextMisspelling): (WebCore::Editor::isSelectionMisspelled): (WebCore::isRangeUngrammatical): (WebCore::Editor::guessesForMisspelledSelection): (WebCore::guessesForMisspelledOrUngrammaticalRange): (WebCore::Editor::markMisspellingsAfterTypingToPosition): (WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges): * editing/EditorCommand.cpp: (WebCore::applyCommandToFrame): (WebCore::executeToggleStyleInList): (WebCore::executeApplyParagraphStyle): (WebCore::executeDelete): (WebCore::executeForwardDelete): (WebCore::executeInsertLineBreak): (WebCore::supportedCopyCut): (WebCore::supportedPaste): (WebCore::enabledDelete): * editing/SelectionController.cpp: (WebCore::SelectionController::modifyExtendingRight): (WebCore::SelectionController::modifyExtendingForward): (WebCore::SelectionController::modifyMovingRight): (WebCore::SelectionController::modifyMovingForward): (WebCore::SelectionController::modifyExtendingLeft): (WebCore::SelectionController::modifyExtendingBackward): (WebCore::SelectionController::modifyMovingLeft): (WebCore::SelectionController::modifyMovingBackward): (WebCore::SelectionController::modify): (WebCore::SelectionController::xPosForVerticalArrowNavigation): (WebCore::SelectionController::debugRenderer): * editing/TypingCommand.cpp: (WebCore::TypingCommand::deleteKeyPressed): (WebCore::TypingCommand::forwardDeleteKeyPressed): (WebCore::TypingCommand::insertLineBreak): (WebCore::TypingCommand::insertParagraphSeparatorInQuotedContent): (WebCore::TypingCommand::insertParagraphSeparator): (WebCore::TypingCommand::doApply): (WebCore::TypingCommand::insertText): (WebCore::TypingCommand::updatePreservesTypingStyle): * page/EventHandler.cpp: (WebCore::EventHandler::handleMousePressEvent): (WebCore::EventHandler::handleMouseReleaseEvent): (WebCore::EventHandler::selectCursor): (WebCore::EventHandler::canHandleDragAndDropForTarget): (WebCore::EventHandler::dispatchMouseEvent): (WebCore::EventHandler::sendContextMenuEvent): (WebCore::EventHandler::handleKeyboardSelectionMovement): (WebCore::EventHandler::handleDrag): 2010-05-30 Daniel Bates <dbates@rim.com> Unreviewed, attempt to fix the build after http://trac.webkit.org/changeset/60418. * html/HTMLFormControlElement.h: (WebCore::HTMLFormControlElement::isEnabledFormControl): (WebCore::HTMLFormControlElement::isReadOnlyFormControl): (WebCore::HTMLFormControlElement::isFormControlElement): * html/HTMLInputElement.h: (WebCore::HTMLInputElement::isPasswordField): 2010-05-30 Darin Adler <darin@apple.com> Reviewed by Sam Weinig. Make more HTML DOM members private, especially constructors, third and final batch https://bugs.webkit.org/show_bug.cgi?id=39916 * dom/Document.cpp: (WebCore::Document::implicitClose): * editing/DeleteButtonController.cpp: (WebCore::DeleteButtonController::createDeletionUI): * editing/EditorCommand.cpp: (WebCore::executeInsertHorizontalRule): (WebCore::executeInsertImage): * editing/htmlediting.cpp: (WebCore::createDefaultParagraphElement): (WebCore::createListItemElement): * html/HTMLParser.cpp: (WebCore::HTMLParser::handleError): (WebCore::HTMLParser::headCreateErrorCheck): (WebCore::HTMLParser::formCreateErrorCheck): (WebCore::HTMLParser::createHead): (WebCore::HTMLParser::handleIsindex): (WebCore::HTMLParser::finished): * html/HTMLViewSourceDocument.cpp: (WebCore::HTMLViewSourceDocument::createContainingTable): * rendering/RenderTextControl.cpp: (WebCore::RenderTextControl::createSubtreeIfNeeded): * rendering/RenderTextControlSingleLine.cpp: (WebCore::RenderTextControlSingleLine::createSubtreeIfNeeded): Use create instead of new to create HTML elements. * html/HTMLFormCollection.cpp: (WebCore::HTMLFormCollection::formCollectionInfo): (WebCore::HTMLFormCollection::item): (WebCore::HTMLFormCollection::getNamedFormItem): (WebCore::HTMLFormCollection::updateNameCache): * html/HTMLFormControlElement.h: Updated for name and privacy changes in HTMLFormElement. * html/HTMLFormElement.cpp: (WebCore::HTMLFormElement::HTMLFormElement): (WebCore::HTMLFormElement::create): (WebCore::HTMLFormElement::~HTMLFormElement): (WebCore::HTMLFormElement::length): (WebCore::HTMLFormElement::submitImplicitly): (WebCore::HTMLFormElement::createFormData): (WebCore::HTMLFormElement::submit): (WebCore::HTMLFormElement::reset): (WebCore::HTMLFormElement::formElementIndex): (WebCore::HTMLFormElement::registerFormElement): (WebCore::HTMLFormElement::removeFormElement): (WebCore::HTMLFormElement::registerImgElement): (WebCore::HTMLFormElement::removeImgElement): (WebCore::HTMLFormElement::defaultButton): (WebCore::HTMLFormElement::collectUnhandledInvalidControls): (WebCore::HTMLFormElement::addElementAlias): (WebCore::HTMLFormElement::documentDidBecomeActive): * html/HTMLFormElement.h: Added create functions. Made constructors and other members private. Used an OwnPtr for m_elementAliases. Renamed collectionInfo to m_collectionCache and used an OwnPtr for it. Renamed formElements to m_associatedElements (since its contents are what HTML5 calls "form-associated element", not form elements). Renamed imgElements to m_imageElements. * html/HTMLFrameSetElement.cpp: (WebCore::HTMLFrameSetElement::HTMLFrameSetElement): (WebCore::HTMLFrameSetElement::create): (WebCore::HTMLFrameSetElement::parseMappedAttribute): * html/HTMLFrameSetElement.h: Added create functions. Made constructors and other members private. Renamed m_rows and m_cols to m_rowLengths and m_colLengths and used OwnArrayPtr for both. * html/HTMLLabelElement.cpp: (WebCore::nodeAsLabelableFormControl): Made this cast to Element instead of HTMLElement, since isFormControlElement is available on Element. (WebCore::HTMLLabelElement::HTMLLabelElement): (WebCore::HTMLLabelElement::create): * html/HTMLLabelElement.h: Added create functions. Made constructors and other members private. * html/HTMLLegendElement.cpp: (WebCore::HTMLLegendElement::HTMLLegendElement): (WebCore::HTMLLegendElement::create): (WebCore::HTMLLegendElement::associatedControl): (WebCore::HTMLLegendElement::focus): (WebCore::HTMLLegendElement::accessKeyAction): * html/HTMLLegendElement.h: Added create functions. Made constructors and other members private. Renamed formElement to associatedControl since hte control associated with this legend is not a "form element". * editing/DeleteButton.cpp: (WebCore::DeleteButton::DeleteButton): (WebCore::DeleteButton::create): * editing/DeleteButton.h: * html/HTMLDivElement.cpp: (WebCore::HTMLDivElement::HTMLDivElement): (WebCore::HTMLDivElement::create): * html/HTMLDivElement.h: * html/HTMLFontElement.cpp: (WebCore::HTMLFontElement::create): * html/HTMLFontElement.h: * html/HTMLHRElement.cpp: (WebCore::HTMLHRElement::HTMLHRElement): (WebCore::HTMLHRElement::create): * html/HTMLHRElement.h: * html/HTMLHeadElement.cpp: (WebCore::HTMLHeadElement::HTMLHeadElement): (WebCore::HTMLHeadElement::create): * html/HTMLHeadElement.h: * html/HTMLHeadingElement.cpp: (WebCore::HTMLHeadingElement::HTMLHeadingElement): (WebCore::HTMLHeadingElement::create): * html/HTMLHeadingElement.h: * html/HTMLHtmlElement.cpp: (WebCore::HTMLHtmlElement::HTMLHtmlElement): (WebCore::HTMLHtmlElement::create): * html/HTMLHtmlElement.h: * html/HTMLImageElement.cpp: (WebCore::HTMLImageElement::HTMLImageElement): (WebCore::HTMLImageElement::create): * html/HTMLImageElement.h: * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::HTMLInputElement): (WebCore::HTMLInputElement::create): (WebCore::HTMLInputElement::createTemporaryFormForIsIndex): * html/HTMLInputElement.h: * html/HTMLIsIndexElement.cpp: (WebCore::HTMLIsIndexElement::HTMLIsIndexElement): (WebCore::HTMLIsIndexElement::create): * html/HTMLIsIndexElement.h: * html/HTMLLIElement.cpp: (WebCore::HTMLLIElement::HTMLLIElement): (WebCore::HTMLLIElement::create): * html/HTMLLIElement.h: * html/HTMLLinkElement.cpp: (WebCore::HTMLLinkElement::HTMLLinkElement): (WebCore::HTMLLinkElement::create): * html/HTMLLinkElement.h: Added create functions. Made constructors and other members private. * html/HTMLTagNames.in: Removed the createWithNew flag from all the tags that were still using it: div, font, form, frameset, h1, h2, h3, h4, h5, h6, head, hr, html, image, img, input, ins, isindex, label, legend, li, and link. * html/HTMLTextAreaElement.h: Removed unneeded definition of the readOnly function, since the one in HTMLFormElement does the same thing. * loader/ImageDocument.cpp: (WebCore::ImageDocumentElement::ImageDocumentElement): (WebCore::ImageDocumentElement::create): (WebCore::ImageDocument::createDocumentStructure): Added create functions. Made constructors and other members private. * page/DragController.cpp: (WebCore::DragController::concludeEditDrag): Use the non-virtual disabled function instead of the virtual isEnabledFormControl function, which just turns around and calls the disabled function. * rendering/MediaControlElements.cpp: (WebCore::MediaControlShadowRootElement::MediaControlShadowRootElement): (WebCore::MediaControlShadowRootElement::create): (WebCore::MediaControlElement::MediaControlElement): (WebCore::MediaControlElement::create): (WebCore::MediaControlTimelineContainerElement::MediaControlTimelineContainerElement): (WebCore::MediaControlTimelineContainerElement::create): (WebCore::MediaControlTimelineContainerElement::rendererIsNeeded): (WebCore::MediaControlVolumeSliderContainerElement::MediaControlVolumeSliderContainerElement): (WebCore::MediaControlVolumeSliderContainerElement::create): (WebCore::MediaControlStatusDisplayElement::MediaControlStatusDisplayElement): (WebCore::MediaControlStatusDisplayElement::create): (WebCore::MediaControlStatusDisplayElement::update): (WebCore::MediaControlStatusDisplayElement::rendererIsNeeded): (WebCore::MediaControlInputElement::MediaControlInputElement): (WebCore::MediaControlInputElement::styleForElement): (WebCore::MediaControlInputElement::rendererIsNeeded): (WebCore::MediaControlInputElement::attach): (WebCore::MediaControlInputElement::updateStyle): (WebCore::MediaControlMuteButtonElement::MediaControlMuteButtonElement): (WebCore::MediaControlMuteButtonElement::create): (WebCore::MediaControlMuteButtonElement::defaultEventHandler): (WebCore::MediaControlMuteButtonElement::updateDisplayType): (WebCore::MediaControlPlayButtonElement::MediaControlPlayButtonElement): (WebCore::MediaControlPlayButtonElement::create): (WebCore::MediaControlPlayButtonElement::defaultEventHandler): (WebCore::MediaControlPlayButtonElement::updateDisplayType): (WebCore::MediaControlSeekButtonElement::MediaControlSeekButtonElement): (WebCore::MediaControlSeekButtonElement::create): (WebCore::MediaControlSeekButtonElement::isForwardButton): (WebCore::MediaControlSeekButtonElement::defaultEventHandler): (WebCore::MediaControlSeekButtonElement::seekTimerFired): (WebCore::MediaControlRewindButtonElement::MediaControlRewindButtonElement): (WebCore::MediaControlRewindButtonElement::create): (WebCore::MediaControlRewindButtonElement::defaultEventHandler): (WebCore::MediaControlReturnToRealtimeButtonElement::MediaControlReturnToRealtimeButtonElement): (WebCore::MediaControlReturnToRealtimeButtonElement::create): (WebCore::MediaControlReturnToRealtimeButtonElement::defaultEventHandler): (WebCore::MediaControlToggleClosedCaptionsButtonElement::MediaControlToggleClosedCaptionsButtonElement): (WebCore::MediaControlToggleClosedCaptionsButtonElement::create): (WebCore::MediaControlToggleClosedCaptionsButtonElement::defaultEventHandler): (WebCore::MediaControlToggleClosedCaptionsButtonElement::updateDisplayType): (WebCore::MediaControlTimelineElement::MediaControlTimelineElement): (WebCore::MediaControlTimelineElement::create): (WebCore::MediaControlTimelineElement::defaultEventHandler): (WebCore::MediaControlTimelineElement::update): (WebCore::MediaControlVolumeSliderElement::MediaControlVolumeSliderElement): (WebCore::MediaControlVolumeSliderElement::create): (WebCore::MediaControlVolumeSliderElement::defaultEventHandler): (WebCore::MediaControlVolumeSliderElement::update): (WebCore::MediaControlFullscreenButtonElement::MediaControlFullscreenButtonElement): (WebCore::MediaControlFullscreenButtonElement::create): (WebCore::MediaControlFullscreenButtonElement::defaultEventHandler): (WebCore::MediaControlTimeDisplayElement::MediaControlTimeDisplayElement): (WebCore::MediaControlTimeDisplayElement::create): * rendering/MediaControlElements.h: Added create functions. Made constructors and other members private. * rendering/RenderFileUploadControl.cpp: (WebCore::ShadowInputElement::ShadowInputElement): (WebCore::ShadowInputElement::create): (WebCore::RenderFileUploadControl::updateFromElement): Added create functions. Made constructors and other members private. * rendering/RenderMedia.cpp: (WebCore::RenderMedia::createControlsShadowRoot): (WebCore::RenderMedia::createPanel): (WebCore::RenderMedia::createMuteButton): (WebCore::RenderMedia::createPlayButton): (WebCore::RenderMedia::createSeekBackButton): (WebCore::RenderMedia::createSeekForwardButton): (WebCore::RenderMedia::createRewindButton): (WebCore::RenderMedia::createReturnToRealtimeButton): (WebCore::RenderMedia::createToggleClosedCaptionsButton): (WebCore::RenderMedia::createStatusDisplay): (WebCore::RenderMedia::createTimelineContainer): (WebCore::RenderMedia::createTimeline): (WebCore::RenderMedia::createVolumeSliderContainer): (WebCore::RenderMedia::createVolumeSlider): (WebCore::RenderMedia::createCurrentTimeDisplay): (WebCore::RenderMedia::createTimeRemainingDisplay): (WebCore::RenderMedia::createFullscreenButton): Use create instead of new. * rendering/RenderProgress.cpp: (WebCore::ProgressValueElement::ProgressValueElement): (WebCore::ProgressValueElement::create): (WebCore::RenderProgress::updateValuePartState): * rendering/RenderSlider.cpp: (WebCore::SliderThumbElement::SliderThumbElement): (WebCore::SliderThumbElement::create): (WebCore::RenderSlider::updateFromElement): Added create functions. Made constructors and other members private. * rendering/TextControlInnerElements.cpp: (WebCore::TextControlInnerElement::TextControlInnerElement): (WebCore::TextControlInnerElement::create): (WebCore::TextControlInnerTextElement::TextControlInnerTextElement): (WebCore::TextControlInnerTextElement::create): (WebCore::TextControlInnerTextElement::defaultEventHandler): (WebCore::SearchFieldResultsButtonElement::SearchFieldResultsButtonElement): (WebCore::SearchFieldResultsButtonElement::create): (WebCore::SearchFieldResultsButtonElement::defaultEventHandler): (WebCore::SearchFieldCancelButtonElement::SearchFieldCancelButtonElement): (WebCore::SearchFieldCancelButtonElement::create): (WebCore::SearchFieldCancelButtonElement::defaultEventHandler): (WebCore::SpinButtonElement::SpinButtonElement): (WebCore::SpinButtonElement::create): (WebCore::SpinButtonElement::defaultEventHandler): * rendering/TextControlInnerElements.h: Added create functions. Made constructors and other members private. 2010-05-30 Xan Lopez <xlopez@igalia.com> Reviewed by Darin Adler. Incorrect build dependencies for GObject DOM Bindings https://bugs.webkit.org/show_bug.cgi?id=39932 -include does not execute the implicit % expansion, we have to do it manually. * GNUmakefile.am: 2010-05-30 Robert Hogan <robert@webkit.org> Reviewed by Kenneth Rohde Christiansen. [Qt] Enhance Qt DRT implementation to support platform scroll wheel events. https://bugs.webkit.org/show_bug.cgi?id=36004 Fix the bug in webkit.org/b/29601 for Qt. A delta not divisible by 120 indicates a device that is sending fine-resolution scroll events, so use the delta as the number of pixels to scroll. * platform/qt/WheelEventQt.cpp: (WebCore::PlatformWheelEvent::applyDelta): 2010-05-30 Jessie Berlin <jberlin@webkit.org> Reviewed by Pavel Feldman. https://bugs.webkit.org/show_bug.cgi?id=39224 Bug 39224 - Web Inspector: There should be a way to clean up profiles Adds a button to clear the profiles from the profiles panel like that used for the console, the audits panel, and the timeline panel. Consolidates the css rules, since they all use the same image. Also allows for individual profiles to be deleted via the keyboard (U+0008 or U+007F) and uses this new schema for the Elements Tree. * English.lproj/localizedStrings.js: Add tooltip text for the button to clear the profiles pane. * inspector/InspectorBackend.idl: Add ability to remove the profiles from the backend when they are deleted or cleared in the frontend. * inspector/InspectorBackend.cpp: (WebCore::InspectorBackend::removeProfile): (WebCore::InspectorBackend::clearProfiles): * inspector/InspectorBackend.h: * inspector/InspectorController.cpp: (WebCore::InspectorController::removeProfile): (WebCore::InspectorController::clearProfiles): * inspector/InspectorController.h: * inspector/front-end/AuditsPanel.js: (WebInspector.AuditsPanel): Use the 'clear-status-bar-item' class. * inspector/front-end/ChangesView.js: (WebInspector.ChangesView): * inspector/front-end/TimelinePanel.js: (WebInspector.TimelinePanel.prototype._createStatusbarButtons): * inspector/front-end/audits.css: * inspector/front-end/inspector.css: (.clear-status-bar-item .glyph): * inspector/front-end/inspector.html: * inspector/front-end/ElementsTreeOutline.js: Replace the keyDown handler on the Outline with specific methods to handle delete and enter on the TreeElements. (WebInspector.ElementsTreeOutline): (WebInspector.ElementsTreeOutline.prototype.get editing): Return whether or not an element in the tree is currently being edited. (WebInspector.ElementsTreeElement.prototype.ondelete): (WebInspector.ElementsTreeElement.prototype.onenter): * inspector/front-end/Panel.js: (WebInspector.Panel.prototype.createSidebar): Make the TreeOutline for a Panel's sidebar aware of its enclosing Panel. * inspector/front-end/ProfilesPanel.js: (WebInspector.ProfilesPanel): Add the clear button. (WebInspector.ProfilesPanel.prototype.get statusBarItems): (WebInspector.ProfilesPanel.prototype._clearProfiles): Remove the profiles from the backend, the reset the frontend interface. (WebInspector.ProfilesPanel.prototype.removeProfileHeader): Remove the profile from both the frontend and the backend, and clear the view when the last profile is removed. (WebInspector.ProfilesPanel.prototype._updateInterface): Hide the clear button when profiling is disabled. (WebInspector.ProfileSidebarTreeElement.prototype.onselect): Replace access to global variable with reference to the Panel held by the TreeOutline. (WebInspector.ProfileSidebarTreeElement.prototype.ondelete): Remove the profile corresponding the tree element when the user deletes that tree element. * inspector/front-end/treeoutline.js: (TreeOutline.prototype._treeKeyDown): Allow the selected tree element to handle the user pressing a delete key or enter key. 2010-05-29 Lucas De Marchi <lucas.demarchi@profusion.mobi> Reviewed by Darin Adler. Check if a CC environment variable is defined before hard-coding gcc's path. Simply hard-coding it breaks cross-compilation and Linux distributions with more than one gcc installed (or not in the default path). https://bugs.webkit.org/show_bug.cgi?id=35551 No new functionality, so no new tests. * bindings/scripts/CodeGeneratorObjC.pm: * bindings/scripts/IDLParser.pm: * dom/make_names.pl: 2010-05-29 Pavel Feldman <pfeldman@chromium.org> Reviewed by Timothy Hatcher. Web Inspector: [REGRESSION] caller locations are not shown on Timeline Panel. https://bugs.webkit.org/show_bug.cgi?id=39923 * inspector/front-end/TimelinePanel.js: (WebInspector.TimelinePanel.FormattedRecord): (WebInspector.TimelinePanel.FormattedRecord.prototype._generatePopupContent): (WebInspector.TimelinePanel.FormattedRecord.prototype._getRecordDetails): 2010-05-29 Eric Seidel <eric@webkit.org> Reviewed by Adam Barth. HTML5 parser should block script execution until stylesheets load https://bugs.webkit.org/show_bug.cgi?id=39903 All <script> tag execution now blocks on stylesheet load, including inline <script> content which the old parser doesn't support blocking. Hyatt says we could now get rid of updateLayoutIgnorePendingStylesheets once our primary parser knows how to wait for stylesheets before executing inline <script> content. All of http/tests/local passes in --html5-parser mode now. Also fixed fast/parser/tokenizer-close-during-document-write.html. * html/HTML5ScriptRunner.cpp: (WebCore::HTML5ScriptRunner::HTML5ScriptRunner): - Added a m_hasScriptsWaitingForStylesheets bool so that we can detect when we're actually waiting on stylesheets or not. If we're not waiting on stylesheets then we're still parsing and executing scripts would cause parser/script reentrancy and bad news bears. (WebCore::HTML5ScriptRunner::isPendingScriptReady): - Re-enable the check that the stylesheets have loaded. (WebCore::HTML5ScriptRunner::executePendingScript): - ASSERT that stylesheets have loaded. (WebCore::HTML5ScriptRunner::executeScriptsWaitingForLoad): - ASSERT that this is never called reentrantly. (WebCore::HTML5ScriptRunner::executeScriptsWaitingForStylesheets): - Execute any scripts which were blocked on stylesheet loads. - ASSERT (in two ways) that this is never called reentrantly. * html/HTML5ScriptRunner.h: (WebCore::HTML5ScriptRunner::hasScriptsWaitingForStylesheets): - Callers need to check this before calling executeScriptsWaitingForLoad. (WebCore::HTML5ScriptRunner::inScriptExecution): - Used by callers to ASSERT that we're not called re-entrantly. * html/HTML5Tokenizer.cpp: (WebCore::HTML5Tokenizer::HTML5Tokenizer): - Add m_hasScriptsWaitingForStylesheets for tracking if we've paused due to stylesheets or not. Callers need to know this to know if they should ignore executeScriptsWaitingForStylesheets calls from Document (which may be generated when parsing </script> tags). We only care about executeScriptsWaitingForStylesheets calls when we've actually blocked the parser due to waiting on a stylesheet load. (WebCore::HTML5Tokenizer::end): - Move m_source.close() back to this method now that I understand more about when finish() is called. This should fix several layout test ASSERTS. (WebCore::HTML5Tokenizer::finish): - This should not close m_source since scripts may still write to the document. Set m_wasWaitingOnScriptsDuringFinish to indicate that we were not able to end parsing during finish. (WebCore::HTML5Tokenizer::resumeParsingAfterScriptExecution): - ASSERT that this is never caller re-entrantly. (WebCore::HTML5Tokenizer::executeScript): - ASSERT that the ScriptRunner always thinks we're running scripts when this is called. (WebCore::HTML5Tokenizer::executingScript): - Added implementation to fix fast/parser/tokenizer-close-during-document-write.html (WebCore::HTML5Tokenizer::notifyFinished): - ASSERT that this is never called re-entrantly. (WebCore::HTML5Tokenizer::executeScriptsWaitingForStylesheets): - Call the ScriptRunner to tell it that stylesheets have loaded if it is blocked on stylesheet loads. - ASSERT(m_hasScriptsWaitingForStylesheets). We can't just assert isPaused() since we may be paused for script loads. * html/HTML5Tokenizer.h: 2010-05-29 Laszlo Gombos <laszlo.1.gombos@nokia.com> Reviewed by Darin Adler. Remove set but never used variables https://bugs.webkit.org/show_bug.cgi?id=35252 No new tests as there is no new functionality. * accessibility/AccessibilityRenderObject.cpp: (WebCore::lastChildConsideringContinuation): * css/CSSFontSelector.cpp: (WebCore::CSSFontSelector::addFontFaceRule): * css/CSSParser.cpp: (WebCore::CSSParser::parseFontFaceUnicodeRange): * editing/InsertParagraphSeparatorCommand.cpp: (WebCore::InsertParagraphSeparatorCommand::doApply): * loader/appcache/ApplicationCacheStorage.cpp: (WebCore::ApplicationCacheStorage::loadManifestHostHashes): * page/EventHandler.cpp: (WebCore::EventHandler::handleWheelEvent): * page/animation/AnimationBase.cpp: (WebCore::AnimationBase::getTimeToNextEvent): * rendering/AutoTableLayout.cpp: (WebCore::AutoTableLayout::recalcColumn): (WebCore::AutoTableLayout::layout): * rendering/RenderBlock.cpp: (WebCore::RenderBlock::calcInlinePrefWidths): * rendering/RenderSVGResourceClipper.cpp: (WebCore::RenderSVGResourceClipper::createClipData): * storage/DatabaseTracker.cpp: (WebCore::DatabaseTracker::canEstablishDatabase): 2010-05-29 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r60405. http://trac.webkit.org/changeset/60405 https://bugs.webkit.org/show_bug.cgi?id=39921 It broke GTK build. (Requested by Ossy on #webkit). * dom/Node.cpp: (WebCore::Node::getElementsByTagName): (WebCore::Node::getElementsByTagNameNS): * dom/Node.h: 2010-05-29 Anton Muhin <antonm@chromium.org> Reviewed by Darin Adler. Make NodeList getters take AtomicString instead of plain String https://bugs.webkit.org/show_bug.cgi?id=39892 Those methods turn String into AtomicString later. And this conversion is faster if underlying string is already atomic. That buys small (~2-3%) speed up for Chromium on Dromaeo DOM Core. I don't know if Safari benefits from it. * dom/Node.cpp: (WebCore::Node::getElementsByTagName): (WebCore::Node::getElementsByTagNameNS): * dom/Node.h: 2010-05-29 Justin Schuh <jschuh@chromium.org> Reviewed by Adam Barth. Allow descendant frame navigation for file URLs when allowFileAccessFromFileURLs is false https://bugs.webkit.org/show_bug.cgi?id=39750 Fix for local HTML package breakage when each file is its own origin. In this case we should allow descendant file: frames to navigate each other when they share the same top frame. Test: fast/frames/location-change-no-file-access.html * loader/FrameLoader.cpp: (WebCore::FrameLoader::shouldAllowNavigation): 2010-05-29 Geoffrey Garen <ggaren@apple.com> Qt build fix: Updated for ArgList changes. * bridge/qt/qt_runtime.cpp: (JSC::Bindings::QtRuntimeConnectionMethod::call): 2010-05-29 Geoffrey Garen <ggaren@apple.com> Qt build fix: Updated for ArgList changes. * bridge/qt/qt_runtime.cpp: (JSC::Bindings::QtRuntimeMetaMethod::call): (JSC::Bindings::QtRuntimeConnectionMethod::call): 2010-05-29 Geoffrey Garen <ggaren@apple.com> Qt build fix: Updated for ArgList changes. * bridge/qt/qt_pixmapruntime.cpp: (JSC::Bindings::QtPixmapInstance::invokeMethod): * bridge/qt/qt_runtime.cpp: (JSC::Bindings::findMethodIndex): (JSC::Bindings::QtRuntimeMetaMethod::call): (JSC::Bindings::QtRuntimeConnectionMethod::call): * bridge/qt/qt_runtime.h: 2010-05-29 Geoffrey Garen <ggaren@apple.com> Qt build fix: Updated for ArgList changes. * bridge/qt/qt_pixmapruntime.cpp: (JSC::Bindings::QtPixmapAssignToElementMethod::invoke): (JSC::Bindings::QtPixmapToDataUrlMethod::invoke): (JSC::Bindings::QtPixmapToStringMethod::invoke): (JSC::Bindings::QtPixmapInstance::invokeMethod): * bridge/qt/qt_pixmapruntime.h: 2010-05-29 Geoffrey Garen <ggaren@apple.com> Qt build fix: Keep this borken class limping along. * bridge/qt/qt_instance.cpp: (JSC::Bindings::QtInstance::invokeMethod): * bridge/qt/qt_instance.h: 2010-05-28 Geoffrey Garen <ggaren@apple.com> Reviewed by Sam Weinig, Gavin Barraclough, Oliver Hunt. Simplified the host calling convention. PART ONE: Functional code changes. [ None in WebCore ] PART TWO: Global search and replace. In the areas below, I used global search-and-replace to change (ExecState*, JSObject*, JSValue, const ArgList&) => (ExecState*) args.size() => exec->argumentCount() args.at(i) => exec->argument(i) * bindings/js/JSArrayBufferViewCustom.cpp: (WebCore::JSArrayBufferView::slice): * bindings/js/JSArrayBufferViewHelper.h: (WebCore::setWebGLArrayHelper): * bindings/js/JSCanvasRenderingContext2DCustom.cpp: (WebCore::JSCanvasRenderingContext2D::setFillColor): (WebCore::JSCanvasRenderingContext2D::setStrokeColor): (WebCore::JSCanvasRenderingContext2D::strokeRect): (WebCore::JSCanvasRenderingContext2D::drawImage): (WebCore::JSCanvasRenderingContext2D::drawImageFromRect): (WebCore::JSCanvasRenderingContext2D::setShadow): (WebCore::JSCanvasRenderingContext2D::createPattern): (WebCore::JSCanvasRenderingContext2D::createImageData): (WebCore::JSCanvasRenderingContext2D::putImageData): (WebCore::JSCanvasRenderingContext2D::fillText): (WebCore::JSCanvasRenderingContext2D::strokeText): * bindings/js/JSClipboardCustom.cpp: (WebCore::JSClipboard::clearData): (WebCore::JSClipboard::getData): (WebCore::JSClipboard::setDragImage): * bindings/js/JSDOMApplicationCacheCustom.cpp: (WebCore::JSDOMApplicationCache::hasItem): (WebCore::JSDOMApplicationCache::add): (WebCore::JSDOMApplicationCache::remove): * bindings/js/JSDOMFormDataCustom.cpp: (WebCore::JSDOMFormData::append): * bindings/js/JSDOMWindowCustom.cpp: (WebCore::JSDOMWindow::open): (WebCore::JSDOMWindow::showModalDialog): (WebCore::JSDOMWindow::postMessage): (WebCore::JSDOMWindow::setTimeout): (WebCore::JSDOMWindow::setInterval): (WebCore::JSDOMWindow::addEventListener): (WebCore::JSDOMWindow::removeEventListener): (WebCore::JSDOMWindow::openDatabase): * bindings/js/JSDatabaseCustom.cpp: (WebCore::JSDatabase::changeVersion): (WebCore::createTransaction): (WebCore::JSDatabase::transaction): (WebCore::JSDatabase::readTransaction): * bindings/js/JSDatabaseSyncCustom.cpp: (WebCore::JSDatabaseSync::changeVersion): (WebCore::createTransaction): (WebCore::JSDatabaseSync::transaction): (WebCore::JSDatabaseSync::readTransaction): * bindings/js/JSDedicatedWorkerContextCustom.cpp: (WebCore::JSDedicatedWorkerContext::postMessage): * bindings/js/JSDesktopNotificationsCustom.cpp: (WebCore::JSNotificationCenter::requestPermission): * bindings/js/JSFloatArrayCustom.cpp: (WebCore::JSFloatArray::set): * bindings/js/JSGeolocationCustom.cpp: (WebCore::JSGeolocation::getCurrentPosition): (WebCore::JSGeolocation::watchPosition): * bindings/js/JSHTMLAllCollectionCustom.cpp: (WebCore::callHTMLAllCollection): (WebCore::JSHTMLAllCollection::item): (WebCore::JSHTMLAllCollection::namedItem): * bindings/js/JSHTMLCanvasElementCustom.cpp: (WebCore::JSHTMLCanvasElement::getContext): * bindings/js/JSHTMLCollectionCustom.cpp: (WebCore::callHTMLCollection): (WebCore::JSHTMLCollection::item): (WebCore::JSHTMLCollection::namedItem): * bindings/js/JSHTMLDocumentCustom.cpp: (WebCore::JSHTMLDocument::open): (WebCore::documentWrite): (WebCore::JSHTMLDocument::write): (WebCore::JSHTMLDocument::writeln): * bindings/js/JSHTMLInputElementCustom.cpp: (WebCore::JSHTMLInputElement::setSelectionRange): * bindings/js/JSHTMLOptionsCollectionCustom.cpp: (WebCore::JSHTMLOptionsCollection::add): (WebCore::JSHTMLOptionsCollection::remove): * bindings/js/JSHTMLSelectElementCustom.cpp: (WebCore::JSHTMLSelectElement::remove): * bindings/js/JSHistoryCustom.cpp: (WebCore::JSHistory::pushState): (WebCore::JSHistory::replaceState): * bindings/js/JSInjectedScriptHostCustom.cpp: (WebCore::JSInjectedScriptHost::databaseForId): (WebCore::JSInjectedScriptHost::currentCallFrame): (WebCore::JSInjectedScriptHost::nodeForId): (WebCore::JSInjectedScriptHost::pushNodePathToFrontend): (WebCore::JSInjectedScriptHost::selectDatabase): (WebCore::JSInjectedScriptHost::selectDOMStorage): (WebCore::JSInjectedScriptHost::reportDidDispatchOnInjectedScript): * bindings/js/JSInspectorFrontendHostCustom.cpp: (WebCore::JSInspectorFrontendHost::platform): (WebCore::JSInspectorFrontendHost::port): (WebCore::JSInspectorFrontendHost::showContextMenu): * bindings/js/JSInt16ArrayCustom.cpp: (WebCore::JSInt16Array::set): * bindings/js/JSInt32ArrayCustom.cpp: (WebCore::JSInt32Array::set): * bindings/js/JSInt8ArrayCustom.cpp: (WebCore::JSInt8Array::set): * bindings/js/JSJavaScriptCallFrameCustom.cpp: (WebCore::JSJavaScriptCallFrame::evaluate): (WebCore::JSJavaScriptCallFrame::scopeType): * bindings/js/JSLocationCustom.cpp: (WebCore::JSLocation::replace): (WebCore::JSLocation::reload): (WebCore::JSLocation::assign): (WebCore::JSLocation::toString): * bindings/js/JSMessageEventCustom.cpp: (WebCore::JSMessageEvent::initMessageEvent): * bindings/js/JSMessagePortCustom.cpp: (WebCore::JSMessagePort::postMessage): * bindings/js/JSMessagePortCustom.h: (WebCore::handlePostMessage): * bindings/js/JSNodeCustom.cpp: (WebCore::JSNode::insertBefore): (WebCore::JSNode::replaceChild): (WebCore::JSNode::removeChild): (WebCore::JSNode::appendChild): * bindings/js/JSNodeListCustom.cpp: (WebCore::callNodeList): * bindings/js/JSPluginElementFunctions.cpp: (WebCore::callPlugin): * bindings/js/JSSQLResultSetRowListCustom.cpp: (WebCore::JSSQLResultSetRowList::item): * bindings/js/JSSQLTransactionCustom.cpp: (WebCore::JSSQLTransaction::executeSql): * bindings/js/JSSQLTransactionSyncCustom.cpp: (WebCore::JSSQLTransactionSync::executeSql): * bindings/js/JSSVGLengthCustom.cpp: (WebCore::JSSVGLength::convertToSpecifiedUnits): * bindings/js/JSSVGMatrixCustom.cpp: (WebCore::JSSVGMatrix::multiply): (WebCore::JSSVGMatrix::inverse): (WebCore::JSSVGMatrix::rotateFromVector): * bindings/js/JSSVGPODListCustom.h: (WebCore::JSSVGPODListCustom::clear): (WebCore::JSSVGPODListCustom::initialize): (WebCore::JSSVGPODListCustom::getItem): (WebCore::JSSVGPODListCustom::insertItemBefore): (WebCore::JSSVGPODListCustom::replaceItem): (WebCore::JSSVGPODListCustom::removeItem): (WebCore::JSSVGPODListCustom::appendItem): * bindings/js/JSSVGPathSegListCustom.cpp: (WebCore::JSSVGPathSegList::clear): (WebCore::JSSVGPathSegList::initialize): (WebCore::JSSVGPathSegList::getItem): (WebCore::JSSVGPathSegList::insertItemBefore): (WebCore::JSSVGPathSegList::replaceItem): (WebCore::JSSVGPathSegList::removeItem): (WebCore::JSSVGPathSegList::appendItem): * bindings/js/JSUint16ArrayCustom.cpp: (WebCore::JSUint16Array::set): * bindings/js/JSUint32ArrayCustom.cpp: (WebCore::JSUint32Array::set): * bindings/js/JSUint8ArrayCustom.cpp: (WebCore::JSUint8Array::set): * bindings/js/JSWebGLRenderingContextCustom.cpp: (WebCore::JSWebGLRenderingContext::bufferData): (WebCore::JSWebGLRenderingContext::bufferSubData): (WebCore::getObjectParameter): (WebCore::JSWebGLRenderingContext::getBufferParameter): (WebCore::JSWebGLRenderingContext::getFramebufferAttachmentParameter): (WebCore::JSWebGLRenderingContext::getParameter): (WebCore::JSWebGLRenderingContext::getProgramParameter): (WebCore::JSWebGLRenderingContext::getRenderbufferParameter): (WebCore::JSWebGLRenderingContext::getShaderParameter): (WebCore::JSWebGLRenderingContext::getTexParameter): (WebCore::JSWebGLRenderingContext::getUniform): (WebCore::JSWebGLRenderingContext::getVertexAttrib): (WebCore::JSWebGLRenderingContext::texImage2D): (WebCore::JSWebGLRenderingContext::texSubImage2D): (WebCore::dataFunctionf): (WebCore::dataFunctioni): (WebCore::dataFunctionMatrix): (WebCore::JSWebGLRenderingContext::uniform1fv): (WebCore::JSWebGLRenderingContext::uniform1iv): (WebCore::JSWebGLRenderingContext::uniform2fv): (WebCore::JSWebGLRenderingContext::uniform2iv): (WebCore::JSWebGLRenderingContext::uniform3fv): (WebCore::JSWebGLRenderingContext::uniform3iv): (WebCore::JSWebGLRenderingContext::uniform4fv): (WebCore::JSWebGLRenderingContext::uniform4iv): (WebCore::JSWebGLRenderingContext::uniformMatrix2fv): (WebCore::JSWebGLRenderingContext::uniformMatrix3fv): (WebCore::JSWebGLRenderingContext::uniformMatrix4fv): (WebCore::JSWebGLRenderingContext::vertexAttrib1fv): (WebCore::JSWebGLRenderingContext::vertexAttrib2fv): (WebCore::JSWebGLRenderingContext::vertexAttrib3fv): (WebCore::JSWebGLRenderingContext::vertexAttrib4fv): * bindings/js/JSWebSocketCustom.cpp: (WebCore::JSWebSocket::send): * bindings/js/JSWorkerContextCustom.cpp: (WebCore::JSWorkerContext::importScripts): (WebCore::JSWorkerContext::setTimeout): (WebCore::JSWorkerContext::setInterval): (WebCore::JSWorkerContext::openDatabase): (WebCore::JSWorkerContext::openDatabaseSync): * bindings/js/JSWorkerCustom.cpp: (WebCore::JSWorker::postMessage): * bindings/js/JSXMLHttpRequestCustom.cpp: (WebCore::JSXMLHttpRequest::open): (WebCore::JSXMLHttpRequest::send): * bindings/js/JSXSLTProcessorCustom.cpp: (WebCore::JSXSLTProcessor::importStylesheet): (WebCore::JSXSLTProcessor::transformToFragment): (WebCore::JSXSLTProcessor::transformToDocument): (WebCore::JSXSLTProcessor::setParameter): (WebCore::JSXSLTProcessor::getParameter): (WebCore::JSXSLTProcessor::removeParameter): * bindings/js/ScheduledAction.cpp: (WebCore::ScheduledAction::create): (WebCore::ScheduledAction::ScheduledAction): * bindings/js/ScheduledAction.h: * bindings/js/ScriptCallFrame.cpp: (WebCore::ScriptCallFrame::ScriptCallFrame): * bindings/js/ScriptCallFrame.h: * bindings/js/ScriptCallStack.cpp: (WebCore::ScriptCallStack::ScriptCallStack): (WebCore::ScriptCallStack::initialize): * bindings/js/ScriptCallStack.h: * bindings/scripts/CodeGeneratorJS.pm: * bridge/c/c_instance.cpp: (JSC::Bindings::CInstance::invokeMethod): (JSC::Bindings::CInstance::invokeDefaultMethod): * bridge/c/c_instance.h: * bridge/jni/jsc/JavaInstanceJSC.cpp: (JavaInstance::invokeMethod): * bridge/jni/jsc/JavaInstanceJSC.h: * bridge/jsc/BridgeJSC.h: (JSC::Bindings::Instance::invokeDefaultMethod): * bridge/objc/objc_instance.h: * bridge/objc/objc_instance.mm: (ObjcInstance::invokeMethod): (ObjcInstance::invokeObjcMethod): (ObjcInstance::invokeDefaultMethod): * bridge/objc/objc_runtime.mm: (JSC::Bindings::callObjCFallbackObject): * bridge/runtime_method.cpp: (JSC::callRuntimeMethod): * bridge/runtime_object.cpp: (JSC::Bindings::callRuntimeObject): 2010-05-28 Stephen White <senorblanco@chromium.org> Reviewed by Darin Fisher. Implement GraphicsContext::setImageInterpolation() for the Chromium port. This is preparatory work for bug 38233. A number of background-resize tests will need a rebaseline, since the images are taken during the initial "low quality" phase (<800ms). [CHROMIUM] Chromium port should support image interpolation quality https://bugs.webkit.org/show_bug.cgi?id=38686 Covered by fast/backgrounds/size/backgroundSize15.html, and others. * platform/graphics/skia/GraphicsContextSkia.cpp: Implement WebCore::GraphicsContext::setImageInterpolationQuality. * platform/graphics/skia/ImageSkia.cpp: (WebCore::computeResamplingMode): Only enable high quality interpolation if it has been requested in the GraphicsContext. (WebCore::drawResampledBitmap): Enable cacheing of resampled images even if the size is not full (fix from Brett Wilson). (WebCore::paintSkBitmap): Pass in the PlatformContextSkia to computeResamplingMode, so it can query it for interpolation quality. (WebCore::Image::drawPattern): Ibid. * platform/graphics/skia/PlatformContextSkia.cpp: (PlatformContextSkia::State::State): (PlatformContextSkia::interpolationQuality): (PlatformContextSkia::setInterpolationQuality): * platform/graphics/skia/PlatformContextSkia.h: Add a member fn and accessors to retain the image interpolation quality in the platform context, and to save/restore it with the state. 2010-05-28 Lucas De Marchi <lucas.demarchi@profusion.mobi> Reviewed by Kenneth Rohde Christiansen. [EFL] Remove compiler warnings about uninitialized variable. https://bugs.webkit.org/show_bug.cgi?id=39871 No new tests, just cosmetic changes. * platform/efl/WidgetEfl.cpp: (WebCore::Widget::applyCursor): 2010-05-28 Vangelis Kokkevis <vangelis@chromium.org> Reviewed by Dimitri Glazkov. Prevent chromium composited layers from rendering on top of the scrollbars. https://bugs.webkit.org/show_bug.cgi?id=39851 * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::drawLayers): 2010-05-28 Aaron Boodman <aa@chromium.org> Reviewed by Darin Fisher. Added isXHTMLDocument() to WebCore::Document. https://bugs.webkit.org/show_bug.cgi?id=39887 * dom/Document.h: Add isXHTMLDocument(). (WebCore::Document::isXHTMLDocument): Ditto. 2010-05-28 Peter Kasting <pkasting@google.com> Reviewed by Darin Adler. https://bugs.webkit.org/show_bug.cgi?id=39857 Make GIFs loop the correct number of times. Previously, everyone looped one time too few for non-infinitely-looping GIFs. Modified a Qt manual test to be correct and moved it to the general manual test directory. * manual-tests/animated-gif-looping.html: Copied from WebCore/manual-tests/qt/qt-gif-test.html. * manual-tests/qt/qt-10loop-anim.gif: Removed. * manual-tests/qt/qt-anim.gif: Removed. * manual-tests/qt/qt-gif-test.html: Removed. * manual-tests/qt/qt-noanim.gif: Removed. * manual-tests/resources/animated-10x.gif: Copied from WebCore/manual-tests/qt/qt-10loop-anim.gif and modified. * manual-tests/resources/animated-infinite.gif: Copied from WebCore/manual-tests/qt/qt-anim.gif. * manual-tests/resources/non-animated.gif: Copied from WebCore/manual-tests/qt/qt-noanim.gif. * platform/graphics/BitmapImage.cpp: (WebCore::BitmapImage::internalAdvanceAnimation): For a loop count of n, show a total of n + 1 animation cycles. * platform/graphics/ImageSource.h: * platform/graphics/cg/ImageSourceCG.cpp: (WebCore::ImageSource::repetitionCount): * platform/graphics/qt/ImageDecoderQt.cpp: (WebCore::ImageDecoderQt::repetitionCount): Remove translation code now that WebCore matches Qt's internal handling of the loop count. Qt itself may still have a bug here. * platform/image-decoders/gif/GIFImageDecoder.cpp: (WebCore::GIFImageDecoder::repetitionCount): * platform/image-decoders/gif/GIFImageReader.cpp: (GIFImageReader::read): Translate loop count 0 to "loop infinitely" (by restoring one piece of the Mozilla code we'd removed). 2010-05-28 Ben Murdoch <benm@google.com> Reviewed by Darin Adler. openFile(...) in FIleSystemPOSIX does not call fileSystemRepresentation https://bugs.webkit.org/show_bug.cgi?id=39882 No new tests. Existing tests in fast/files should suffice. * platform/posix/FileSystemPOSIX.cpp: (WebCore::openFile): pass the path parameter through fileSystemRepresentation before using it. 2010-05-28 Adam Barth <abarth@webkit.org> Reviewed by Eric Seidel. Named entities in attributes aren't parsed correctly by HTML5 parser https://bugs.webkit.org/show_bug.cgi?id=39873 I misplaced this if statement when writing this code originally. Now that we have test coverage for this paragraph in the spec, we can see and fix the bug. * html/HTML5Lexer.cpp: (WebCore::HTML5Lexer::consumeEntity): 2010-05-28 Adam Barth <abarth@webkit.org> Reviewed by Eric Seidel. Handle edge cases in HTML5 entity parsing https://bugs.webkit.org/show_bug.cgi?id=39823 The HTML5 specification tells us to handle HTML entities in a somewhat complicated way. This patch attempts to correctly handle numeric entities. Some of this code is duplicated from HTMLTokenizer. * html/HTML5Lexer.cpp: (WebCore::HTMLNames::): (WebCore::HTMLNames::adjustEntity): (WebCore::HTMLNames::legalEntityFor): (WebCore::HTML5Lexer::consumeEntity): (WebCore::HTML5Lexer::processEntity): (WebCore::HTML5Lexer::nextToken): (WebCore::HTML5Lexer::emitCodePoint): * html/HTML5Lexer.h: 2010-05-28 Chris Fleizach <cfleizach@apple.com> Reviewed by Beth Dakin. AX: stop prepping value conversion in accessibilityAttributeValueForParameter https://bugs.webkit.org/show_bug.cgi?id=39880 Cleaning up a FIXME so that all values are not converted before they're needed in accessibilityAttributeValue:forParameter: * accessibility/mac/AccessibilityObjectWrapper.mm: (visiblePositionForTextMarker): (-[AccessibilityObjectWrapper visiblePositionRangeForTextMarkerRange:]): (-[AccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]): 2010-05-28 Adam Treat <atreat@rim.com> Reviewed by Daniel Bates. RIM Bug #293 and https://bugs.webkit.org/show_bug.cgi?id=39859 Layout is not dependent upon ScrollView::frameRect when useFixedLayout is true. No reason to set the needs layout flag in this case. * platform/ScrollView.cpp: (WebCore::ScrollView::setFrameRect): 2010-05-28 Mikhail Naganov <mnaganov@chromium.org> Unreviewed. Revert 60353 -- immature. https://bugs.webkit.org/show_bug.cgi?id=39646 * bindings/js/JSConsoleCustom.cpp: * bindings/v8/custom/V8ConsoleCustom.cpp: * page/Console.cpp: * page/Console.h: * page/Console.idl: 2010-05-27 Darin Adler <darin@apple.com> Reviewed by David Levin. Make more HTML DOM members private, especially constructors, batch 2 https://bugs.webkit.org/show_bug.cgi?id=39706 Refactoring so no new tests. Worked my way up from the bottom of HTMLTagNames.in. * html/HTMLTagNames.in: Removed createWithNew from keygen, listing, map, marquee, menu, meta, ol, optgroup, option, p, param, pre, script, select, source, style, table, tbody, td, textarea, tfoot, th, thead, title, tr, ul, video, xmp, and noscript. * editing/htmlediting.cpp: (WebCore::createOrderedListElement): Use create function instead of new. (WebCore::createUnorderedListElement): Ditto. * html/HTMLParser.cpp: (WebCore::HTMLParser::handleError): Ditto. (WebCore::HTMLParser::mapCreateErrorCheck): Ditto. * html/HTMLViewSourceDocument.cpp: (WebCore::HTMLViewSourceDocument::createContainingTable): Ditto. (WebCore::HTMLViewSourceDocument::addLine): Ditto. * html/HTMLKeygenElement.cpp: (WebCore::HTMLKeygenElement::HTMLKeygenElement): Use create function instead of new. (WebCore::HTMLKeygenElement::create): Added. * html/HTMLKeygenElement.h: Made constructor and virtual function overrides private, added create function. * html/HTMLMapElement.cpp: (WebCore::HTMLMapElement::HTMLMapElement): (WebCore::HTMLMapElement::create): * html/HTMLMapElement.h: * html/HTMLMarqueeElement.cpp: (WebCore::HTMLMarqueeElement::HTMLMarqueeElement): (WebCore::HTMLMarqueeElement::create): * html/HTMLMarqueeElement.h: * html/HTMLMenuElement.cpp: (WebCore::HTMLMenuElement::HTMLMenuElement): (WebCore::HTMLMenuElement::create): * html/HTMLMenuElement.h: * html/HTMLMetaElement.cpp: (WebCore::HTMLMetaElement::HTMLMetaElement): (WebCore::HTMLMetaElement::create): * html/HTMLMetaElement.h: * html/HTMLNoScriptElement.cpp: (WebCore::HTMLNoScriptElement::HTMLNoScriptElement): (WebCore::HTMLNoScriptElement::create): (WebCore::HTMLNoScriptElement::childShouldCreateRenderer): * html/HTMLNoScriptElement.h: * html/HTMLOListElement.cpp: (WebCore::HTMLOListElement::HTMLOListElement): (WebCore::HTMLOListElement::create): * html/HTMLOListElement.h: * html/HTMLOptGroupElement.cpp: (WebCore::HTMLOptGroupElement::HTMLOptGroupElement): (WebCore::HTMLOptGroupElement::create): * html/HTMLOptGroupElement.h: * html/HTMLOptionElement.cpp: (WebCore::HTMLOptionElement::HTMLOptionElement): (WebCore::HTMLOptionElement::create): * html/HTMLOptionElement.h: * html/HTMLParagraphElement.cpp: (WebCore::HTMLParagraphElement::HTMLParagraphElement): (WebCore::HTMLParagraphElement::create): * html/HTMLParagraphElement.h: * html/HTMLParamElement.cpp: (WebCore::HTMLParamElement::HTMLParamElement): (WebCore::HTMLParamElement::create): * html/HTMLParamElement.h: * html/HTMLPreElement.cpp: (WebCore::HTMLPreElement::HTMLPreElement): (WebCore::HTMLPreElement::create): * html/HTMLPreElement.h: * html/HTMLQuoteElement.cpp: (WebCore::HTMLQuoteElement::HTMLQuoteElement): (WebCore::HTMLQuoteElement::create): * html/HTMLQuoteElement.h: * html/HTMLScriptElement.cpp: (WebCore::HTMLScriptElement::HTMLScriptElement): (WebCore::HTMLScriptElement::create): * html/HTMLScriptElement.h: * html/HTMLSelectElement.cpp: (WebCore::HTMLSelectElement::create): * html/HTMLSelectElement.h: * html/HTMLSourceElement.cpp: (WebCore::HTMLSourceElement::HTMLSourceElement): (WebCore::HTMLSourceElement::create): * html/HTMLSourceElement.h: * html/HTMLStyleElement.cpp: (WebCore::HTMLStyleElement::HTMLStyleElement): (WebCore::HTMLStyleElement::create): * html/HTMLStyleElement.h: * html/HTMLTableRowElement.cpp: (WebCore::HTMLTableRowElement::HTMLTableRowElement): (WebCore::HTMLTableRowElement::create): (WebCore::HTMLTableRowElement::insertCell): * html/HTMLTableRowElement.h: * html/HTMLTableSectionElement.cpp: (WebCore::HTMLTableSectionElement::HTMLTableSectionElement): (WebCore::HTMLTableSectionElement::create): (WebCore::HTMLTableSectionElement::insertRow): * html/HTMLTableSectionElement.h: * html/HTMLTextAreaElement.cpp: (WebCore::HTMLTextAreaElement::create): * html/HTMLTextAreaElement.h: * html/HTMLTitleElement.cpp: (WebCore::HTMLTitleElement::HTMLTitleElement): (WebCore::HTMLTitleElement::create): * html/HTMLTitleElement.h: * html/HTMLUListElement.cpp: (WebCore::HTMLUListElement::HTMLUListElement): (WebCore::HTMLUListElement::create): * html/HTMLUListElement.h: * html/HTMLVideoElement.cpp: (WebCore::HTMLVideoElement::HTMLVideoElement): (WebCore::HTMLVideoElement::create): * html/HTMLVideoElement.h: Made constructors and virtual function overrides private, added create function. * html/HTMLTableCellElement.cpp: (WebCore::HTMLTableCellElement::HTMLTableCellElement): Updated names of data members. Renamed _row to m_row, _col to m_col, rSpan to m_rowSpan, cSpan to m_colSpan, and removed unused rowHeight and m_solid. (WebCore::HTMLTableCellElement::create): Added. (WebCore::HTMLTableCellElement::parseMappedAttribute): Updated names. * html/HTMLTableCellElement.h: Ditto. * html/HTMLTableElement.cpp: (WebCore::HTMLTableElement::create): Added. (WebCore::HTMLTableElement::createTHead): Used create instead of new. (WebCore::HTMLTableElement::createTFoot): Ditto. (WebCore::HTMLTableElement::insertRow): Ditto. * html/HTMLTableElement.h: * html/HTMLTablePartElement.h: Made members protected instead of public. 2010-05-28 Andreas Kling <andreas.kling@nokia.com> Reviewed by Kenneth Rohde Christiansen. [Qt] REGRESSION(r59837): Incorrect clipping of TransparencyLayers https://bugs.webkit.org/show_bug.cgi?id=39784 Move coordinate transformation from TransparencyLayer to clipToImageBuffer() * platform/graphics/qt/GraphicsContextQt.cpp: (WebCore::TransparencyLayer::TransparencyLayer): (WebCore::GraphicsContext::clipToImageBuffer): 2010-05-28 Lucas De Marchi <lucas.demarchi@profusion.mobi> Reviewed by Kenneth Rohde Christiansen. [EF] Implement methods for supporting PopupMenu https://bugs.webkit.org/show_bug.cgi?id=39629 * platform/PopupMenu.h: add needed attribute * platform/efl/PopupMenuEfl.cpp: implement methods to show/hide popup menu (WebCore::PopupMenu::PopupMenu): initialize new attribute (WebCore::PopupMenu::show): ditto. (WebCore::PopupMenu::hide): ditto. 2010-05-28 Lucas De Marchi <lucas.demarchi@profusion.mobi> Reviewed by Kenneth Rohde Christiansen. Reorder class initializers to remove compiler warnings. https://bugs.webkit.org/show_bug.cgi?id=39596 * platform/efl/PlatformKeyboardEventEfl.cpp: ditto. (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent): ditto. * platform/efl/PlatformMouseEventEfl.cpp: ditto. (WebCore::PlatformMouseEvent::PlatformMouseEvent): ditto. * platform/efl/PlatformWheelEventEfl.cpp: ditto (WebCore::PlatformWheelEvent::PlatformWheelEvent): ditto. 2010-05-27 Jeremy Orlow <jorlow@chromium.org> Reviewed by Steve Block. Add IndexedDB's IDBIndex https://bugs.webkit.org/show_bug.cgi?id=39850 Flesh out IDBIndex as much as possible until Andrei finishes his patch to get around passing Frame*'s all around. I also cleaned up a bunch of existing files as I noticed style violations (while basing my new files off of the old). Not hooked up enough to test. Will add tests soon. * Android.derived.jscbindings.mk * Android.derived.v8bindings.mk * Android.mk * CMakeLists.txt * DerivedSources.cpp * DerivedSources.make * GNUmakefile.am * WebCore.pri * WebCore.pro * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj * WebCore.xcodeproj/project.pbxproj * bindings/js/JSIDBAnyCustom.cpp: (WebCore::toJS): * bindings/v8/custom/V8IDBAnyCustom.cpp: (WebCore::toV8): * storage/IDBAny.cpp: (WebCore::IDBAny::idbIndexRequest): (WebCore::IDBAny::set): * storage/IDBAny.h: (WebCore::IDBAny::): * storage/IDBCallbacks.h: * storage/IDBDatabase.h: * storage/IDBDatabaseError.h: (WebCore::IDBDatabaseError::): * storage/IDBDatabaseError.idl: * storage/IDBDatabaseException.h: * storage/IDBDatabaseException.idl: * storage/IDBDatabaseImpl.cpp: * storage/IDBDatabaseImpl.h: * storage/IDBDatabaseRequest.cpp: * storage/IDBDatabaseRequest.h: * storage/IDBDatabaseRequest.idl: * storage/IDBIndex.h: Added. (WebCore::IDBIndex::~IDBIndex): * storage/IDBIndexImpl.cpp: Added. (WebCore::IDBIndexImpl::IDBIndexImpl): (WebCore::IDBIndexImpl::~IDBIndexImpl): * storage/IDBIndexImpl.h: Added. (WebCore::IDBIndexImpl::create): (WebCore::IDBIndexImpl::name): (WebCore::IDBIndexImpl::keyPath): (WebCore::IDBIndexImpl::unique): * storage/IDBIndexRequest.cpp: Added. (WebCore::IDBIndexRequest::IDBIndexRequest): (WebCore::IDBIndexRequest::~IDBIndexRequest): * storage/IDBIndexRequest.h: Added. (WebCore::IDBIndexRequest::create): (WebCore::IDBIndexRequest::name): (WebCore::IDBIndexRequest::keyPath): (WebCore::IDBIndexRequest::unique): * storage/IDBIndexRequest.idl: Added. * storage/IDBObjectStore.cpp: (WebCore::IDBObjectStore::IDBObjectStore): (WebCore::IDBObjectStore::~IDBObjectStore): (WebCore::IDBObjectStore::indexNames): (WebCore::IDBObjectStore::createIndex): (WebCore::IDBObjectStore::index): (WebCore::IDBObjectStore::removeIndex): * storage/IDBObjectStore.h: * storage/IDBObjectStoreRequest.cpp: (WebCore::IDBObjectStoreRequest::IDBObjectStoreRequest): (WebCore::IDBObjectStoreRequest::name): (WebCore::IDBObjectStoreRequest::keyPath): (WebCore::IDBObjectStoreRequest::indexNames): (WebCore::IDBObjectStoreRequest::createIndex): (WebCore::IDBObjectStoreRequest::index): (WebCore::IDBObjectStoreRequest::removeIndex): * storage/IDBObjectStoreRequest.h: * storage/IDBObjectStoreRequest.idl: * storage/IDBRequest.cpp: (WebCore::IDBRequest::onSuccess): * storage/IDBRequest.h: * storage/IndexedDatabaseRequest.idl: 2010-05-28 Yury Semikhatsky <yurys@chromium.org> Reviewed by Pavel Feldman. Web Inspector: hide node highlight when inspected page closes. https://bugs.webkit.org/show_bug.cgi?id=39872 * inspector/InspectorController.cpp: (WebCore::InspectorController::~InspectorController): (WebCore::InspectorController::inspectedPageDestroyed): 2010-05-28 Mikhail Naganov <mnaganov@chromium.org> Reviewed by Yury Semikhatsky. Web Inspector: add Console API for retrieving memory stats Add 'console.memory' property which returns an object. Currently it has two fields: totalHeapSize and usedHeapSize. Later, it can be extended for reporting total browser's memory consumption. https://bugs.webkit.org/show_bug.cgi?id=39840 * bindings/js/JSConsoleCustom.cpp: (WebCore::JSConsole::memory): * bindings/v8/custom/V8ConsoleCustom.cpp: (WebCore::V8Console::memoryAccessorGetter): * page/Console.cpp: (WebCore::Console::memory): * page/Console.h: * page/Console.idl: 2010-05-28 Xan Lopez <xlopez@igalia.com> Add new file to the build system. * GNUmakefile.am: 2010-05-28 Antti Koivisto <koivisto@iki.fi> Reviewed by Kenneth Rohde Christiansen. https://bugs.webkit.org/show_bug.cgi?id=39874 [Qt] Make tiled backing store more configurable Make tile size, tile creation delay and tiling area dynamically configurable. * platform/graphics/TiledBackingStore.cpp: (WebCore::TiledBackingStore::TiledBackingStore): (WebCore::TiledBackingStore::setTileSize): (WebCore::TiledBackingStore::setTileCreationDelay): (WebCore::TiledBackingStore::setKeepAndCoverAreaMultipliers): (WebCore::TiledBackingStore::createTiles): * platform/graphics/TiledBackingStore.h: (WebCore::TiledBackingStore::tileSize): (WebCore::TiledBackingStore::tileCreationDelay): (WebCore::TiledBackingStore::getKeepAndCoverAreaMultipliers): 2010-05-28 Eric Seidel <eric@webkit.org> Reviewed by Adam Barth. document.write does not work correctly in the HTML5 parser https://bugs.webkit.org/show_bug.cgi?id=39828 Added a new HTML5ScriptRunnerHost interface which HTML5Tokenizer implements. This allows HTML5ScriptController to delegate the actual ScriptController::executeScript back to HTML5Tokenizer. HTML5Tokenizer saves off the current m_source before calling ScriptController::executeScript to allow safe reentrancy through document.write(). * WebCore.xcodeproj/project.pbxproj: - Added HTML5ScriptRunnerHost.h * html/HTML5ScriptRunner.cpp: (WebCore::HTML5ScriptRunner::HTML5ScriptRunner): (WebCore::HTML5ScriptRunner::~HTML5ScriptRunner): - Unregister m_parsingBlockingScript if stopped before load completion. This was probably causing some of the crashes on page navigation we saw during LayoutTest runs. (WebCore::documentURLForScriptExecution): - Unify our documentURL handling so all callsites get it right. (WebCore::HTML5ScriptRunner::sourceFromPendingScript): - Use documentURLForScriptExecution (WebCore::HTML5ScriptRunner::executePendingScript): - Call stopWatchingForLoad instead of removeClient() - Call executeScript instead of ScriptController directly. (WebCore::HTML5ScriptRunner::executeScript): - Wraps calls to HTML5ScriptRunnerHost::executeScript (WebCore::HTML5ScriptRunner::watchForLoad): - Wraps calls to HTML5ScriptRunnerHost::watchForLoad (WebCore::HTML5ScriptRunner::stopWatchingForLoad): - Wraps calls to HTML5ScriptRunnerHost::stopWatchingForLoad (WebCore::HTML5ScriptRunner::requestScript): - Only watch for load if the CachedScript isn't already loaded. This gets rid of rentrancy due to addClient calls, and as a result also stops us from hitting ASSERT(m_scriptNestingLevel) in executePendingScript. (WebCore::HTML5ScriptRunner::runScript): - Use the new fancy documentURLForScriptExecution and executeScript. * html/HTML5ScriptRunner.h: (WebCore::HTML5ScriptRunner::PendingScript::PendingScript): - Add a watchingForLoad bool so we know if we ever called watchForLoad with this CachedScript*. * html/HTML5ScriptRunnerHost.h: Added. (WebCore::HTML5ScriptRunnerHost::~HTML5ScriptRunnerHost): * html/HTML5Tokenizer.cpp: (WebCore::HTML5Tokenizer::HTML5Tokenizer): - Store an m_document pointer since we need to access m_document->frame()->script() for script execution. (WebCore::HTML5Tokenizer::pumpLexer): - Always pause or unpause the TreeBuilder after script execution. Previously nested script execution would leave the TreeBuilder paused even though the top-level loop wanted to resume parsing. Now whenever m_scriptRunner->execute returns "continue parsing" parsing will actually continue. This fixed cases where we would ignore the rest of the document after document.write() of a script tag. (WebCore::HTML5Tokenizer::write): - Explain how document.write() reentrancy is safe in the new world. (WebCore::HTML5Tokenizer::watchForLoad): - HTML5ScriptRunnerHost implementation. We assert that this call will never cause script execution since that's our current design. (WebCore::HTML5Tokenizer::stopWatchingForLoad): - HTML5ScriptRunnerHost implementation. (WebCore::HTML5Tokenizer::executeScript): - HTML5ScriptRunnerHost implementation. Save off the current source before executing scripts in case document.write is called during script execution. * html/HTML5Tokenizer.h: - Implement HTML5ScriptRunnerHost. 2010-05-28 Nathan Lawrence <nlawrence@apple.com> Reviewed by Geoffrey Garen. https://bugs.webkit.org/show_bug.cgi?id=39460 Because not just <img> and <image> elements can preload images, we dont want to restrict the element associated with the loader. No new tests. Should share the same tests as the last patch. * html/HTMLImageLoader.cpp: (WebCore::HTMLImageLoader::notifyFinished): 2010-05-27 MORITA Hajime <morrita@google.com> Reviewed by Ojan Vafai. Cursor movement and text selection does not work well if a block is followed by an inline. https://bugs.webkit.org/show_bug.cgi?id=32123 RenderInline::setSelectionState() missed selection state propagation for ancestors. This fix pulled RenderBlock::setSelectionState() up to RenderBoxModelObject, to share it with RenderInline. Test: editing/selection/range-between-block-and-inline.html: Added. * rendering/RenderBlock.cpp: * rendering/RenderBlock.h: * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::setSelectionState): * rendering/RenderBoxModelObject.h: Moved setSelectionState() from RenderBlock to RenderBoxModelObject. 2010-05-27 MORITA Hajime <morrita@google.com> Not reviewed. Fixed typo * rendering/RenderTheme.cpp: (WebCore::RenderTheme::adjustStyle): 2010-05-27 Darin Adler <darin@apple.com> Reviewed by David Levin. Make more HTML DOM members private, especially constructors https://bugs.webkit.org/show_bug.cgi?id=39697 Refactoring, so no new tests needed. Working my way through HTMLTagNames.in from top to bottom, skipping any that are non-trivial for some reason. * html/HTMLTagNames.in: Removed createWithNew from audio, base, basefont, blockquote, body, br, button, canvas, caption, col, colgroup, datagrid, datalist, dcell, dcol, drow, del, dir, dl, and fieldset. * mathml/mathtags.in: Removed createWithNew from msub, and msup. * dom/Document.cpp: (WebCore::Document::implicitClose): Use create function instead of new. (WebCore::Document::getCSSCanvasElement): Ditto. * editing/IndentOutdentCommand.cpp: (WebCore::createIndentBlockquoteElement): Ditto. * editing/htmlediting.cpp: (WebCore::createBreakElement): Ditto. * html/HTMLTableElement.cpp: (WebCore::HTMLTableElement::createCaption): Ditto. * html/HTMLViewSourceDocument.cpp: (WebCore::HTMLViewSourceDocument::createContainingTable): Ditto. * rendering/RenderTextControl.cpp: (WebCore::RenderTextControl::setInnerTextValue): Ditto. * html/HTMLParser.cpp: (WebCore::HTMLParser::handleError): Use create function instead of new. Required reordering the code slightly, but the new order works fine. * html/HTMLAudioElement.cpp: (WebCore::HTMLAudioElement::create): * html/HTMLAudioElement.h: * html/HTMLBRElement.cpp: (WebCore::HTMLBRElement::create): * html/HTMLBRElement.h: * html/HTMLBaseElement.cpp: (WebCore::HTMLBaseElement::create): * html/HTMLBaseElement.h: * html/HTMLBaseFontElement.cpp: (WebCore::HTMLBaseFontElement::create): * html/HTMLBaseFontElement.h: * html/HTMLBlockquoteElement.cpp: (WebCore::HTMLBlockquoteElement::create): * html/HTMLBlockquoteElement.h: * html/HTMLBodyElement.cpp: (WebCore::HTMLBodyElement::create): * html/HTMLBodyElement.h: * html/HTMLButtonElement.cpp: (WebCore::HTMLButtonElement::create): * html/HTMLButtonElement.h: * html/HTMLCanvasElement.cpp: (WebCore::HTMLCanvasElement::create): * html/HTMLCanvasElement.h: * html/HTMLDListElement.cpp: (WebCore::HTMLDListElement::create): * html/HTMLDListElement.h: * html/HTMLDataGridCellElement.cpp: (WebCore::HTMLDataGridCellElement::create): * html/HTMLDataGridCellElement.h: * html/HTMLDataGridColElement.cpp: (WebCore::HTMLDataGridColElement::create): * html/HTMLDataGridColElement.h: * html/HTMLDataGridElement.cpp: (WebCore::HTMLDataGridElement::create): * html/HTMLDataGridElement.h: * html/HTMLDataGridRowElement.cpp: (WebCore::HTMLDataGridRowElement::create): * html/HTMLDataGridRowElement.h: * html/HTMLDataListElement.cpp: (WebCore::HTMLDataListElement::create): * html/HTMLDataListElement.h: * html/HTMLElement.cpp: (WebCore::HTMLElement::setInnerText): * html/HTMLFieldSetElement.cpp: (WebCore::HTMLFieldSetElement::create): * html/HTMLFieldSetElement.h: * html/HTMLModElement.cpp: (WebCore::HTMLModElement::HTMLModElement): (WebCore::HTMLModElement::create): * html/HTMLModElement.h: * html/HTMLTableCaptionElement.cpp: (WebCore::HTMLTableCaptionElement::create): * html/HTMLTableCaptionElement.h: Made constructors and virtual function overrides private, added create functions. Made constructors inline in cases where they were called in only one place. * html/HTMLTableColElement.cpp: (WebCore::HTMLTableColElement::HTMLTableColElement): Changed data member name from _span to m_span. (WebCore::HTMLTableColElement::create): Added. (WebCore::HTMLTableColElement::parseMappedAttribute): Updated to use m_span. * html/HTMLTableColElement.h: Made constructor and virtual function overrides private, added create function. Renamed _span to m_span. 2010-05-27 Kwang Yul Seo <skyul@company100.net> Reviewed by Darin Adler. wx port: build fix for Linux https://bugs.webkit.org/show_bug.cgi?id=39860 Use uint16_t instead of uint16. * plugins/PluginPackageNone.cpp: (WebCore::PluginPackage::NPVersion): 2010-05-27 Nathan Lawrence <nlawrence@apple.com> Reviewed by Geoffrey Garen. https://bugs.webkit.org/show_bug.cgi?id=39460 Fixes the issue where images prefetched by JavaScript do not report their memory usage to the GC. There is a new test manual-tests/image-prefetch-stress.html that loads a new 4MB image every half a second. * html/HTMLImageLoader.cpp: (WebCore::HTMLImageLoader::notifyFinished): * manual-tests/image-prefetch-stress.html: Added. 2010-05-27 Eric Uhrhane <ericu@chromium.org> Reviewed by Adam Barth. Add v8 bindings for async DB API in workers https://bugs.webkit.org/show_bug.cgi?id=39145 No new tests. This should share layout tests with JSC. Tweak the callback generation to switch lots of Frame* to ScriptExecutionContext*, and use the context passed in to handleEvent where possible. * bindings/scripts/CodeGeneratorV8.pm: As with CodeGeneratorV8; these are pretty much all tiny tweaks. We do have to use a slightly different patch for callback invocation in invokeCallback, as V8Proxy::retrieve() doesn't work in the worker context. * bindings/v8/custom/V8CustomPositionCallback.cpp: (WebCore::V8CustomPositionCallback::handleEvent): * bindings/v8/custom/V8CustomPositionErrorCallback.cpp: (WebCore::V8CustomPositionErrorCallback::handleEvent): * bindings/v8/custom/V8CustomSQLStatementErrorCallback.cpp: (WebCore::V8SQLStatementErrorCallback::handleEvent): * bindings/v8/custom/V8CustomVoidCallback.cpp: (WebCore::V8CustomVoidCallback::V8CustomVoidCallback): (WebCore::V8CustomVoidCallback::handleEvent): (WebCore::invokeCallback): * bindings/v8/custom/V8CustomVoidCallback.h: (WebCore::V8CustomVoidCallback::create): * bindings/v8/custom/V8DOMWindowCustom.cpp: (WebCore::V8DOMWindow::openDatabaseCallback): * bindings/v8/custom/V8DatabaseCustom.cpp: (WebCore::V8Database::changeVersionCallback): (WebCore::createTransaction): * bindings/v8/custom/V8DatabaseSyncCustom.cpp: (WebCore::V8DatabaseSync::changeVersionCallback): (WebCore::createTransaction): * bindings/v8/custom/V8NotificationCenterCustom.cpp: (WebCore::V8NotificationCenter::requestPermissionCallback): * bindings/v8/custom/V8SQLTransactionCustom.cpp: (WebCore::V8SQLTransaction::executeSqlCallback): Add openDatabaseCallback. * bindings/v8/custom/V8WorkerContextCustom.cpp: (WebCore::V8WorkerContext::openDatabaseCallback): Remove an obsolete parameter. (WebCore::V8WorkerContext::openDatabaseSyncCallback): 2010-05-27 Pavel Feldman <pfeldman@chromium.org> Reviewed by Yury Semikhatsky. Web Inspector: [REGRESSION] Query parameters are not displayed in the resources headers section. https://bugs.webkit.org/show_bug.cgi?id=39848 * inspector/front-end/ResourceView.js: (WebInspector.ResourceView): (WebInspector.ResourceView.prototype._refreshRequestPayload): 2010-05-27 Nico Weber <thakis@chromium.org> Reviewed by Eric Seidel https://bugs.webkit.org/show_bug.cgi?id=39092 Add Yank support to chromium mac. Do this by moving WebKit Mac's implementation of Editor::yankFromKillRing() into its own class and then using that. * editing/Editor.cpp: Use new KillRing class. * editing/Editor.h: (WebCore::Editor::killRing): Use new KillRing class. * editing/EditorCommand.cpp: (WebCore::executeYankAndSelect): Use new KillRing class. * platform/KillRing.h: Add new KillRing class, which acts as null object. (WebCore::KillRing::~KillRing): * platform/mac/KillRingMac.h: Add new KillRingMac class, which writes to the mac's kill ring. * platform/mac/KillRingMac.mm: Add new KillRingMac class, which writes to the mac's kill ring. 2010-05-27 Ben Murdoch <benm@google.com> Reviewed by Jian Li. Build break in FileStream.cpp https://bugs.webkit.org/show_bug.cgi?id=39841 When ENABLE_BLOB_SLICE is not defined, an undefined variable is used in FileStream.cpp:114. Fix by using the correct variable. Build fix so no new tests. * html/FileStream.cpp: (WebCore::FileStream::openForRead): Replace undefined variable with a defined one. 2010-05-27 Hans Wennborg <hans@chromium.org> Reviewed by Jeremy Orlow. [Chromium] Default popup window size should not depend on zoom level https://bugs.webkit.org/show_bug.cgi?id=39835 V8DOMWindow::openCallback should not set width and height of new window unless specified in the function's arguments. There is already code to reset the new window's origin coordinates, but the same thing should be done to its dimensions as well. Otherwise, a new popup with unspecified size will have its size depending on the parent's zoom level, which is not desirable. This is the same as what is done in bindings/js/JSDOMWindowCustom.cpp:826. * bindings/v8/custom/V8DOMWindowCustom.cpp: (WebCore::V8DOMWindow::openCallback): 2010-05-27 Anders Bakken <agbakken@gmail.com> Reviewed by David Levin. qt_instance.cpp has coding-style errors https://bugs.webkit.org/show_bug.cgi?id=39744 Fix webkit coding style issues in qt_instance.cpp * bridge/qt/qt_instance.cpp: (JSC::Bindings::QtInstance::getQtInstance): (JSC::Bindings::QtInstance::removeCachedMethod): (JSC::Bindings::QtInstance::markAggregate): (JSC::Bindings::QtInstance::getPropertyNames): (JSC::Bindings::QtInstance::stringValue): (JSC::Bindings::QtField::name): (JSC::Bindings::QtField::valueFromInstance): 2010-05-27 Anders Bakken <agbakken@gmail.com> Reviewed by David Levin. qt_instance.h has coding-style errors https://bugs.webkit.org/show_bug.cgi?id=39743 Fix webkit coding style issues in qt_instance.h * bridge/qt/qt_instance.h: 2010-05-27 Anders Bakken <agbakken@gmail.com> Reviewed by David Levin. qt_class.h has coding-style errors https://bugs.webkit.org/show_bug.cgi?id=39742 Fix webkit coding style issues in qt_class.h * bridge/qt/qt_class.h: 2010-05-27 Eric Carlson <eric.carlson@apple.com> Reviewed by Darin Adler. <rdar://problem/8016158> Crash in CVPixelBufferCreateResolvedAttributesDictionary with RLE compressed movie. Configure the visual context to generate Direct3D compatible pixel buffers when we are able to use a CAImageQueue so there will be less conversion required before display. This change also works around the issue that causes the RLE compressed movie to crash. * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp: (WebCore::MediaPlayerPrivateQuickTimeVisualContext::load): Pass enum to QTMovieVisualContext constructor instead of CFDictionary. * platform/graphics/win/QTMovieVisualContext.cpp: (SetNumberValue): (getPixelBufferCreationOptions): New, create options dictionary appropriate for the visual context type. (pixelBufferCreationOptions): New, return options dictionary appropriate for the visual context type. (QTMovieVisualContextPriv::QTMovieVisualContextPriv): Get the options dictionary from getPixelBufferCreationOptions insteaad of taking it as a parameter. (QTMovieVisualContext::QTMovieVisualContext): Take enum instead of CFDictionary for visual context configuration type. * platform/graphics/win/QTMovieVisualContext.h: 2010-05-27 Anders Carlsson <andersca@apple.com> Reviewed by Adam Roben. [Qt] REGRESSION(r60258): It broke 10 tests. https://bugs.webkit.org/show_bug.cgi?id=39819 * plugins/qt/PluginDataQt.cpp: (WebCore::PluginData::initPlugins): Append the MimeClassInfo object after it's been initialized. 2010-05-27 Kevin Ollivier <kevino@theolliviers.com> [wx] Build fixes for Windows after recent changes. * platform/graphics/wx/FontWx.cpp: * wscript: 2010-05-27 Chris Fleizach <cfleizach@apple.com> No review, build fixage. Bug 39324 - AX: WebKit doesn't call [super -accessibilityAttributeValue:attribute forParameter:] when it encounters a parameterized attribute that it doesn't handle. https://bugs.webkit.org/show_bug.cgi?id=39324 Rolling out change from r60307 until a better fix is ready. * accessibility/mac/AccessibilityObjectWrapper.mm: (-[AccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]): 2010-05-27 Yury Semikhatsky <yurys@chromium.org> Reviewed by Pavel Feldman. [v8] Web Inspector: check that ScriptDebugListener was not removed while messages were dispatched in the nested loop. https://bugs.webkit.org/show_bug.cgi?id=39838 * bindings/v8/ScriptDebugServer.cpp: (WebCore::ScriptDebugServer::handleV8DebugEvent): 2010-05-27 Yury Semikhatsky <yurys@chromium.org> Reviewed by Pavel Feldman. [v8] Web Inspector: undefined script URL value should be converted to an emtpy WebCore::String instead of "undefined" string. Otherwise it's shown in the Scripts panel with "undefined:<line no>" URL. https://bugs.webkit.org/show_bug.cgi?id=39845 * bindings/v8/ScriptDebugServer.cpp: (WebCore::ScriptDebugServer::dispatchDidParseSource): 2010-05-27 Chris Fleizach <cfleizach@apple.com> Reviewed by Darin Adler. AX: WebKit doesn't call [super -accessibilityAttributeValue:attribute forParameter:] when it encounters a parameterized attribute that it doesn't handle. https://bugs.webkit.org/show_bug.cgi?id=39324 Make sure that accessibilityAttributeValue:forParameter: will default to its super's implementation. This is how AppKit expects objects to behave. * accessibility/mac/AccessibilityObjectWrapper.mm: (-[AccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]): 2010-05-27 Xan Lopez <xlopez@igalia.com> More GTK+ distcheck fixes. * GNUmakefile.am: 2010-05-27 Yury Semikhatsky <yurys@chromium.org> Reviewed by Pavel Feldman. [v8] Web Inspector: notify ScriptDebugListener when execution is resumed https://bugs.webkit.org/show_bug.cgi?id=39838 * bindings/v8/ScriptDebugServer.cpp: (WebCore::ScriptDebugServer::handleV8DebugEvent): 2010-05-27 Anders Bakken <agbakken@gmail.com> Reviewed by David Levin. qt_pixmapruntime.cpp has coding-style errors https://bugs.webkit.org/show_bug.cgi?id=39745 Fix webkit coding style issues in qt_pixmapruntime.cpp * bridge/qt/qt_pixmapruntime.cpp: 2010-05-26 Jeremy Orlow <jorlow@chromium.org> Reviewed by Steve Block. Clean up IndexedDB layout tests https://bugs.webkit.org/show_bug.cgi?id=39748 Remove an assert that always fires. Tests: storage/indexeddb/idb-database-request.html storage/indexeddb/indexed-database-request.html * storage/IDBDatabaseImpl.cpp: (WebCore::IDBDatabaseImpl::objectStores): 2010-05-27 Pavel Feldman <pfeldman@chromium.org> Reviewed by Yury Semikhatsky. Web Inspector: Get CSS rule offsets lazily. https://bugs.webkit.org/show_bug.cgi?id=39832 * inspector/InspectorCSSStore.cpp: (WebCore::InspectorCSSStore::getStartEndOffsets): * inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::buildObjectForRule): 2010-05-27 Anders Bakken <agbakken@gmail.com> Reviewed by David Levin. qt_class.cpp has coding-style errors https://bugs.webkit.org/show_bug.cgi?id=39741 Fix webkit coding style issues in qt_class.cpp * bridge/qt/qt_class.cpp: (JSC::Bindings::QtClass::fieldNamed): 2010-05-27 Eric Seidel <eric@webkit.org> Reviewed by Darin Adler. Remove bit-rotten INSTRUMENT_LAYOUT_SCHEDULING code from HTMLTokenizer https://bugs.webkit.org/show_bug.cgi?id=39714 This came from a discussion on #webkit with Hyatt about this code being old and no longer used to either of our knowledge. No functional changes, thus no tests. I also removed a bogus FIXME I had added in an earlier patch before I understood what the HTMLTokenizer was trying to do. * html/HTMLTokenizer.cpp: (WebCore::HTMLTokenizer::scriptHandler): (WebCore::HTMLTokenizer::scriptExecution): (WebCore::HTMLTokenizer::continueProcessing): (WebCore::HTMLTokenizer::willWriteHTML): (WebCore::HTMLTokenizer::didWriteHTML): (WebCore::HTMLTokenizer::timerFired): (WebCore::HTMLTokenizer::executeExternalScriptsIfReady): 2010-05-27 Anton Muhin <antonm@chromium.org> Reviewed by Adam Barth. Add callbacks to ScriptController to allow notifications on named items additions and removals https://bugs.webkit.org/show_bug.cgi?id=39679 * bindings/js/ScriptController.h: Callbacks with empty implementation added. (WebCore::ScriptController::namedItemAdded): (WebCore::ScriptController::namedItemRemoved): * bindings/v8/ScriptController.cpp: Empty implementation of callbacks. (WebCore::ScriptController::namedItemAdded): (WebCore::ScriptController::namedItemRemoved): * bindings/v8/ScriptController.h: Callbacks added. * html/HTMLDocument.cpp: Hooking in callbacks. (WebCore::HTMLDocument::addItemToMap): (WebCore::HTMLDocument::removeItemFromMap): * html/HTMLDocument.h: 2010-05-27 Zhenyao Mo <zmo@google.com> Reviewed by Dimitri Glazkov. Implement lazy clearing of renderbuffers https://bugs.webkit.org/show_bug.cgi?id=36248 Test: fast/canvas/webgl/renderbuffer-initialization.html * html/canvas/WebGLFramebuffer.cpp: (WebCore::WebGLFramebuffer::WebGLFramebuffer): Init added members. (WebCore::WebGLFramebuffer::setAttachment): Set attachment object. (WebCore::WebGLFramebuffer::onBind): Perform buffer clearing if needed. (WebCore::WebGLFramebuffer::onAttachedObjectChange): Ditto. (WebCore::WebGLFramebuffer::isUninitialized): Check whether an attached object is uninitialized renderbuffer. (WebCore::WebGLFramebuffer::setInitialized): After initialize a renderbuffer, set the flag. (WebCore::WebGLFramebuffer::initializeRenderbuffers): Clear un-initialized renderbuffers if framebuffer is complete. * html/canvas/WebGLFramebuffer.h: (WebCore::WebGLFramebuffer::isDepthAttached): Changed to check object. (WebCore::WebGLFramebuffer::isStencilAttached): Ditto. (WebCore::WebGLFramebuffer::isDepthStencilAttached): Ditto. * html/canvas/WebGLRenderbuffer.cpp: (WebCore::WebGLRenderbuffer::WebGLRenderbuffer): Init added members. * html/canvas/WebGLRenderbuffer.h: (WebCore::WebGLRenderbuffer::isInitialized): As the function name. (WebCore::WebGLRenderbuffer::setInitialized): Ditto. * html/canvas/WebGLRenderingContext.cpp: (WebCore::WebGLRenderingContext::bindFramebuffer): Call onBind(). (WebCore::WebGLRenderingContext::copyTexImage2D): Call onAttachedObjectChange(). (WebCore::WebGLRenderingContext::deleteRenderbuffer): Ditto. (WebCore::WebGLRenderingContext::deleteTexture): Ditto. (WebCore::WebGLRenderingContext::framebufferRenderbuffer): Call setAttachment. (WebCore::WebGLRenderingContext::framebufferTexture2D): Call onAttachedObjectChange(). (WebCore::WebGLRenderingContext::renderbufferStorage): Ditto. (WebCore::WebGLRenderingContext::texImage2DBase): Ditto. * platform/graphics/mac/GraphicsContext3DMac.cpp: (WebCore::GraphicsContext3D::reshape): Initialize internal buffers. 2010-05-27 Kristian Monsen <kristianm@google.com> Reviewed by Darin Adler. Compile fix for Android, added include for Refcounted.h, this did not get included through Threading.h in Android. https://bugs.webkit.org/show_bug.cgi?id=39678 Build fix only, no new tests. * storage/SQLTransactionSyncCallback.h: 2010-05-27 Joone Hur <joone@kldp.org> Reviewed by Xan Lopez. Add GtkVersioning.h in ScrollbackGtk.cpp for maintaining compatibility with the previous GTK+ https://bugs.webkit.org/show_bug.cgi?id=39567 * platform/gtk/ScrollbarGtk.cpp: 2010-05-27 Hans Wennborg <hans@chromium.org> Reviewed by Alexey Proskuryakov. Increase limit on number of (i)frames from 200 to 1000. https://bugs.webkit.org/show_bug.cgi?id=39427 The limit on number of iframes was introduced in r3707 back in 2003. An example of a page that is broken because of this is: http://vimcolorschemetest.googlecode.com/svn/html/index-c.html Neither Firefox nor IE has such a limit. It seems that WebKit can handle a significantly higher number of frames, and the original reasons for imposing the limit are believed to be gone. Tests: compositing/iframes/lots-of-iframes.html compositing/iframes/lots-of-objects.html * html/HTMLFrameElementBase.cpp: (WebCore::HTMLFrameElementBase::isURLAllowed): * page/FrameTree.cpp: (WebCore::FrameTree::uniqueChildName): * page/Page.h: * rendering/RenderEmbeddedObject.cpp: (WebCore::isURLAllowed): 2010-05-27 Kwang Yul Seo <skyul@company100.net> Reviewed by Xan Lopez. [GTK] writeToFile fails when length is large https://bugs.webkit.org/show_bug.cgi?id=39666 writeToFile forgot to increment data pointer. * platform/gtk/FileSystemGtk.cpp: (WebCore::writeToFile): 2010-05-26 David Hyatt <hyatt@apple.com> Reviewed by Sam Weinig. https://bugs.webkit.org/show_bug.cgi?id=39783, clean up the moveChild functions on RenderBlock. Eliminate the need to pass the toChildrenList to the moveChild functions by tightening up the type of the |to| argument to be a RenderBlock. Add a moveChildrenTo function that can move a range of children, and patch places that were doing this by hand. Make the append forms of the functions just use the insert forms with a beforeChild of 0. Patch insertChildNode in RenderObjectChildList so that it passes the fullInsert parameter through in the case where it does an append. Add an assert to RenderLayer that catches bad structure built when the fullInsert/Remove parameters are messed up when using append/insertChildNode. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::splitAnonymousBlocksAroundChild): (WebCore::RenderBlock::makeChildrenAnonymousColumnBlocks): (WebCore::RenderBlock::createAndAppendRootInlineBox): (WebCore::RenderBlock::moveChildTo): (WebCore::RenderBlock::moveChildrenTo): (WebCore::RenderBlock::makeChildrenNonInline): (WebCore::RenderBlock::removeChild): * rendering/RenderBlock.h: (WebCore::RenderBlock::moveChildTo): (WebCore::RenderBlock::moveAllChildrenTo): (WebCore::RenderBlock::moveChildrenTo): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::addChild): * rendering/RenderObjectChildList.cpp: (WebCore::RenderObjectChildList::insertChildNode): * rendering/RenderRubyBase.cpp: (WebCore::RenderRubyBase::moveInlineChildren): 2010-05-27 Eric Seidel <eric@webkit.org> Reviewed by Adam Barth. Add <pre>/<listing> hack to HTML5Lexer to fix the last remaining HTML5 test suite regressions https://bugs.webkit.org/show_bug.cgi?id=39818 HTML parsers are supposed to ignore the first \n after a <pre> or <listing> tag for authoring convenience. Our new HTML5Lexer didn't have this hack yet so there were 4 HTML5 tests failing. Fixing this fixed the last of the HTML5 test suite regressions using the HTML5Lexer vs the old lexer. * html/HTML5Lexer.cpp: (WebCore::HTML5Lexer::reset): (WebCore::HTML5Lexer::nextToken): * html/HTML5Lexer.h: (WebCore::HTML5Lexer::skipLeadingNewLineForListing): * html/HTML5TreeBuilder.cpp: (WebCore::HTML5TreeBuilder::passTokenToLegacyParser): 2010-05-26 Eric Seidel <eric@webkit.org> Reviewed by Adam Barth. Teach the HTML5 parser how to handle external scripts https://bugs.webkit.org/show_bug.cgi?id=39716 Make it possible for the HTML5Tokenizer to run external scripts. I created a new class HTML5ScriptRunner to hold all of the script-logic which is scattered throughout the old HTMLTokenizer. The design is for the HTML5Tokenizer (the "controller") to hold the Lexer, TreeBuilder and ScriptRunner. The Lexer returns back to the controller, which passes tokens to the TreeBuilder. When the treebuilder encounters a </script> tag it pauses itself and returns back to the controller which calls the ScriptRunner. The TreeBuilder is un-paused when the HTML5Tokenizer calls takeScriptToProcess(). The ScriptRunner attempts to process the passed script, and additionally any blocked scripts it can. It returns to the controller indicating if parsing should continue. If not, callbacks when external scripts load or when stylesheets are finished parsing will cause the controller to kick off script execution and parsing again at a later point. * WebCore.xcodeproj/project.pbxproj: - Add HTML5ScriptRunner.* * bindings/js/CachedScriptSourceProvider.h: - Add missing include discovered while building. * dom/ScriptElement.cpp: (WebCore::ScriptElement::finishParsingChildren): - Remove previous hack for inline <script> execution. * dom/ScriptElement.h: - Explain the HTML5 spec names for m_evaluated and m_createdByParser. * html/HTML5ScriptRunner.cpp: Added. (WebCore::HTML5ScriptRunner::HTML5ScriptRunner): - The HTML5Tokenizer is passed to the HTML5ScriptRunner as a CachedResourceClient. The HTML5ScriptRunner will register the HTML5Tokenizer for notifyFinished callbacks when the scripts load. The HTML5Tokenizer is expected to call the HTML5ScriptRunner to execute any loaded scripts at that point. (WebCore::HTML5ScriptRunner::~HTML5ScriptRunner): (WebCore::HTML5ScriptRunner::frame): Helper method. (WebCore::createScriptLoadEvent): Helper method. (WebCore::createScriptErrorEvent): Helper method. (WebCore::HTML5ScriptRunner::sourceFromPendingScript): - Helper method for dealing with both inline and external script types. (WebCore::HTML5ScriptRunner::isPendingScriptReady): - Helper for dealing with both inline and external scripts. (WebCore::HTML5ScriptRunner::executePendingScript): - Execute one script. Both external and inline scripts can become m_parsingBlockingScript if they can't be executed immediately after parsing. (WebCore::HTML5ScriptRunner::execute): - Takes a script element from the tree builder and tries to process it. (WebCore::HTML5ScriptRunner::executeParsingBlockingScripts): - Runs the current parsing blocking script if ready. - Running a script could add another parsing blocking script so we loop until there is no ready-to-run parsing blocking script. (WebCore::HTML5ScriptRunner::executeScriptsWaitingForLoad): - Called by HTML5Tokenizer when a script loads. (WebCore::HTML5ScriptRunner::executeScriptsWaitingForStylesheets): - Called by HTML5Tokenizer when stylesheets complete. (WebCore::HTML5ScriptRunner::requestScript): - Transcription of the HTML5 spec. (WebCore::HTML5ScriptRunner::runScript): - Transcription of the HTML5 spec. * html/HTML5ScriptRunner.h: Added. - New class to handle script loading and execution for the HTML5 parser. * html/HTML5Tokenizer.cpp: (WebCore::HTML5Tokenizer::HTML5Tokenizer): - Create a HTML5ScriptRunner and pass it "this" as the CachedResourceClient. (WebCore::HTML5Tokenizer::pumpLexer): - When the parser is paused, try to run scripts. (WebCore::HTML5Tokenizer::write): - Only pump the lexer when the parser is not paused. (WebCore::HTML5Tokenizer::end): - finish() tells us that we've reached EOF, not end() - Only pump the lexer when the parser is not paused. (WebCore::HTML5Tokenizer::finish): - Mark EOF, and end() if we're not waiting on scripts. (WebCore::HTML5Tokenizer::isWaitingForScripts): - isPaused() seems to mean isPausedForExternalScripts(). (WebCore::HTML5Tokenizer::resumeParsingAfterScriptExecution): (WebCore::HTML5Tokenizer::notifyFinished): (WebCore::HTML5Tokenizer::executeScriptsWaitingForStylesheets): * html/HTML5Tokenizer.h: * html/HTML5TreeBuilder.cpp: (WebCore::HTML5TreeBuilder::HTML5TreeBuilder): - Add an m_isPaused flag. (WebCore::HTML5TreeBuilder::handleScriptStartTag): (WebCore::HTML5TreeBuilder::handleScriptEndTag): (WebCore::HTML5TreeBuilder::takeScriptToProcess): - Acknowledge that the caller has received the script element. It is the caller's responsibility to execute the script if necessary and re-pause the tree builder if necessary. (WebCore::HTML5TreeBuilder::passTokenToLegacyParser): - Save off the current script tag so that it can be passed to the HTML5ScriptRunner when we're paused. * html/HTML5TreeBuilder.h: (WebCore::HTML5TreeBuilder::setPaused): (WebCore::HTML5TreeBuilder::isPaused): 2010-05-26 Adam Barth <abarth@webkit.org> Reviewed by Darin Adler. Implement SegmentedString::lookAheadSlowCase https://bugs.webkit.org/show_bug.cgi?id=39802 The slow case is need by the resumer test suite. Sadly, the resumer test suite is really slow and produces infinite errors (many of which are false positives). I'll land more of the resumer test suite in a future patch. * platform/text/SegmentedString.cpp: (WebCore::SegmentedString::advance): * platform/text/SegmentedString.h: (WebCore::SegmentedString::lookAhead): (WebCore::SegmentedString::lookAheadIgnoringCase): (WebCore::SegmentedString::equalsLiterally): (WebCore::SegmentedString::equalsIgnoringCase): (WebCore::SegmentedString::lookAheadInline): (WebCore::SegmentedString::lookAheadSlowCase): 2010-05-26 Jer Noble <jer.noble@apple.com> Patch edited by Adele Peterson and Mark Rowe. Reviewed by Eric Carlson Video elements show no video on Windows machines that do not support accelerated compositing https://bugs.webkit.org/show_bug.cgi?id=39446 rdar://problem/7999794 Create the visual context in setUpVideoRendering (as opposed to in load), and destroy it in tearDownVideoRendering (as opposed to in the destructor.) * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp: (WebCore::MediaPlayerPrivateQuickTimeVisualContext::~MediaPlayerPrivateQuickTimeVisualContext): (WebCore::MediaPlayerPrivateQuickTimeVisualContext::load): Moved creation of the visual context to setUpVideoRendering. (WebCore::MediaPlayerPrivateQuickTimeVisualContext::paint): Return early if the visual context isn't set up. (WebCore::MediaPlayerPrivateQuickTimeVisualContext::currentRenderingMode): If the visual context isn't set up, return MediaRenderingNone. (WebCore::MediaPlayerPrivateQuickTimeVisualContext::setUpVideoRendering): Create the visual context. (WebCore::MediaPlayerPrivateQuickTimeVisualContext::tearDownVideoRendering): Destroy the visual context. (WebCore::MediaPlayerPrivateQuickTimeVisualContext::hasSetUpVideoRendering): For software rendering mode, make sure the visual context has been set up when saying the setup has been done. * platform/graphics/win/QTMovieVisualContext.cpp: (QTMovieVisualContextPriv::~QTMovieVisualContextPriv): Destruction moved to tearDownVideoRendering. Also, make sure to cancel the visual context's newImageAvailable callback in the visual context's destructor. (QTMovieVisualContext::create): Added. * platform/graphics/win/QTMovieVisualContext.h: 2010-05-26 Gustavo Noronha Silva <gns@gnome.org> Build fixes for make distcheck. * GNUmakefile.am: 2010-05-26 Zelidrag Hornung <zelidrag@chromium.org> Reviewed by Ojan Vafai. Fixed frame page up/down scrolling calculation. Made sure that the cursor moves with page up/down event. Please note that now for mac editing behavior we will scroll the content to center the cursor on page up/down while other platforms will align the cursor with the top of displayed frame. https://bugs.webkit.org/show_bug.cgi?id=38213 Tests: editing/input/option-page-up-down.html (fixed) editing/input/scroll-viewport-page-up-down.html * WebCore.base.exp: * editing/EditorCommand.cpp: (WebCore::verticalScrollDistance): Fixed page scroll calculation. Now scroll height is calculated only from the visible portion not the entire frame height. (WebCore::executeMovePageDown): Now it can tell SelectionController to move the cursor with the page scroll up/down events. (WebCore::executeMovePageDownAndModifySelection): Ditto. (WebCore::executeMovePageUp): Ditto. (WebCore::executeMovePageUpAndModifySelection): Ditto. * editing/SelectionController.cpp: * editing/SelectionController.cpp: Exposed an enum param that lets EditorCommand.cpp control how cursor position will be aligned when page moves. (WebCore::SelectionController::setSelection): Ditto. (WebCore::SelectionController::modify): Ditto. * editing/SelectionController.h: Ditto. (WebCore::SelectionController::): Ditto. (WebCore::SelectionController::setSelection): Ditto. 2010-05-26 Jaime Yap <jaimeyap@google.com> Reviewed by Pavel Feldman. ScriptCallStack::callLocation() sometimes passed an empty handle to toWebCoreString() causing a null pointer deref. https://bugs.webkit.org/show_bug.cgi?id=39681 * bindings/v8/ScriptCallStack.cpp: (WebCore::ScriptCallStack::callLocation): 2010-05-26 Brian Weinstein <bweinstein@apple.com> Reviewed by Mark Rowe. Web Inspector: Tooltip on Pause on Exceptions doesn't show up until it is clicked. https://bugs.webkit.org/show_bug.cgi?id=39804 Initialize the title attribute of the Pause on Exceptions button when we initialize other information about it. * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel): 2010-05-26 Adam Barth <abarth@webkit.org> Unreviewed, rolling out r60262. http://trac.webkit.org/changeset/60262 https://bugs.webkit.org/show_bug.cgi?id=39783 Broke every build and is blocking me from working. :( * rendering/RenderBlock.cpp: (WebCore::RenderBlock::splitAnonymousBlocksAroundChild): (WebCore::RenderBlock::makeChildrenAnonymousColumnBlocks): (WebCore::RenderBlock::moveChildTo): (WebCore::RenderBlock::moveAllChildrenTo): (WebCore::RenderBlock::makeChildrenNonInline): (WebCore::RenderBlock::removeChild): * rendering/RenderBlock.h: * rendering/RenderLayer.cpp: (WebCore::RenderLayer::addChild): * rendering/RenderObjectChildList.cpp: (WebCore::RenderObjectChildList::insertChildNode): * rendering/RenderRubyBase.cpp: (WebCore::RenderRubyBase::moveInlineChildren): (WebCore::RenderRubyBase::moveBlockChildren): (WebCore::RenderRubyBase::mergeBlockChildren): 2010-05-26 Anders Carlsson <andersca@apple.com> Unreviewed, rolling out r60256. http://trac.webkit.org/changeset/60256 https://bugs.webkit.org/show_bug.cgi?id=39382 Causes fast/dom/prototype-inheritance-2.html to start crashing. * history/PageCache.cpp: (WebCore::PageCache::PageCache): (WebCore::PageCache::add): * history/PageCache.h: (WebCore::PageCache::get): * loader/DocumentLoader.cpp: (WebCore::DocumentLoader::commitIfReady): * loader/FrameLoader.cpp: (WebCore::FrameLoader::canCachePageContainingThisFrame): (WebCore::FrameLoader::canCachePage): (WebCore::pageCacheLogPrefix): (WebCore::pageCacheLog): (WebCore::FrameLoader::logCanCachePageDecision): (WebCore::FrameLoader::logCanCacheFrameDecision): (WebCore::FrameLoader::commitProvisionalLoad): (WebCore::FrameLoader::open): (WebCore::FrameLoader::continueLoadAfterNavigationPolicy): (WebCore::FrameLoader::loadProvisionalItemFromCachedPage): (WebCore::FrameLoader::cachePageForHistoryItem): (WebCore::FrameLoader::navigateToDifferentDocument): * loader/FrameLoader.h: * svg/graphics/SVGImage.cpp: (WebCore::SVGImage::dataChanged): 2010-05-26 David Hyatt <hyatt@apple.com> Reviewed by Sam Weinig. https://bugs.webkit.org/show_bug.cgi?id=39783, clean up the moveChild functions on RenderBlock. Eliminate the need to pass the toChildrenList to the moveChild functions by tightening up the type of the |to| argument to be a RenderBlock. Add a moveChildrenTo function that can move a range of children, and patch places that were doing this by hand. Make the append forms of the functions just use the insert forms with a beforeChild of 0. Patch insertChildNode in RenderObjectChildList so that it passes the fullInsert parameter through in the case where it does an append. Add an assert to RenderLayer that catches bad structure built when the fullInsert/Remove parameters are messed up when using append/insertChildNode. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::splitAnonymousBlocksAroundChild): (WebCore::RenderBlock::makeChildrenAnonymousColumnBlocks): (WebCore::RenderBlock::createAndAppendRootInlineBox): (WebCore::RenderBlock::moveChildTo): (WebCore::RenderBlock::moveChildrenTo): (WebCore::RenderBlock::makeChildrenNonInline): (WebCore::RenderBlock::removeChild): * rendering/RenderBlock.h: (WebCore::RenderBlock::moveChildTo): (WebCore::RenderBlock::moveAllChildrenTo): (WebCore::RenderBlock::moveChildrenTo): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::addChild): * rendering/RenderObjectChildList.cpp: (WebCore::RenderObjectChildList::insertChildNode): * rendering/RenderRubyBase.cpp: (WebCore::RenderRubyBase::moveInlineChildren): 2010-05-26 Anders Carlsson <andersca@apple.com> Fix GTK+ test failures. * plugins/gtk/PluginDataGtk.cpp: (WebCore::PluginData::initPlugins): * plugins/win/PluginDataWin.cpp: (WebCore::PluginData::initPlugins): 2010-05-25 Anders Carlsson <andersca@apple.com> Reviewed by Darin Adler. Clean up MimeClassInfo and PluginInfo https://bugs.webkit.org/show_bug.cgi?id=39700 This gets rid of all the heap allocation from MimeClassInfo and PluginInfo. It also changes the m_plugins and m_mimes vectors in PluginData to not hold heap allocated MimeClassInfo and PluginClassInfo objects. * page/Page.cpp: (WebCore::Page::refreshPlugins): * plugins/MimeType.cpp: (WebCore::MimeType::type): (WebCore::MimeType::suffixes): (WebCore::MimeType::description): (WebCore::MimeType::enabledPlugin): * plugins/MimeType.h: (WebCore::MimeType::mimeClassInfo): * plugins/MimeTypeArray.cpp: (WebCore::MimeTypeArray::item): (WebCore::MimeTypeArray::canGetItemsForName): (WebCore::MimeTypeArray::namedItem): * plugins/Plugin.cpp: (WebCore::Plugin::name): (WebCore::Plugin::filename): (WebCore::Plugin::description): (WebCore::Plugin::length): (WebCore::Plugin::item): (WebCore::Plugin::canGetItemsForName): (WebCore::Plugin::namedItem): * plugins/Plugin.h: (WebCore::Plugin::pluginInfo): * plugins/PluginArray.cpp: (WebCore::PluginArray::length): (WebCore::PluginArray::item): (WebCore::PluginArray::canGetItemsForName): (WebCore::PluginArray::namedItem): (WebCore::PluginArray::pluginData): * plugins/PluginArray.h: * plugins/PluginData.cpp: (WebCore::PluginData::PluginData): (WebCore::PluginData::~PluginData): (WebCore::PluginData::supportsMimeType): (WebCore::PluginData::pluginNameForMimeType): * plugins/PluginData.h: (WebCore::operator==): (WebCore::PluginData::create): (WebCore::PluginData::disconnectPage): (WebCore::PluginData::page): (WebCore::PluginData::plugins): (WebCore::PluginData::mimes): * plugins/chromium/PluginDataChromium.cpp: (WebCore::PluginCache::reset): (WebCore::PluginCache::plugins): (WebCore::PluginData::initPlugins): (WebCore::getPluginMimeTypeFromExtension): * plugins/gtk/PluginDataGtk.cpp: (WebCore::PluginData::initPlugins): * plugins/mac/PluginDataMac.mm: (WebCore::PluginData::initPlugins): * plugins/qt/PluginDataQt.cpp: (WebCore::PluginData::initPlugins): * plugins/win/PluginDataWin.cpp: (WebCore::PluginData::initPlugins): * plugins/wx/PluginDataWx.cpp: (WebCore::PluginData::initPlugins): 2010-05-26 Nate Chapin <japhet@chromium.org> Reviewed by Adam Barth. Factor PageCache functionality out of FrameLoader and into PageCache. https://bugs.webkit.org/show_bug.cgi?id=39382 Refactor only, so no new tests. * history/PageCache.cpp: (WebCore::pageCacheLogPrefix): (WebCore::pageCacheLog): (WebCore::logCanCacheFrameDecision): (WebCore::logCanCachePageDecision): (WebCore::PageCache::canCachePageContainingThisFrame): (WebCore::PageCache::canCache): (WebCore::PageCache::add): (WebCore::PageCache::get): * history/PageCache.h: * loader/DocumentLoader.cpp: * loader/FrameLoader.cpp: (WebCore::FrameLoader::commitProvisionalLoad): (WebCore::FrameLoader::prepareForCachedPageRestore): (WebCore::FrameLoader::continueLoadAfterNavigationPolicy): (WebCore::FrameLoader::loadProvisionalItemFromCachedPage): (WebCore::FrameLoader::navigateToDifferentDocument): * loader/FrameLoader.h: (WebCore::FrameLoader::quickRedirectComing): * svg/graphics/SVGImage.cpp: 2010-05-26 Peter Kasting <pkasting@google.com> Reviewed by Adam Barth. https://bugs.webkit.org/show_bug.cgi?id=39786 Properly reset |bytes_to_consume| when reaching the "gif_done" state in the open-source GIF decoder. No tests, since there's no test harness support for checking the internal ImageDecoder state values. * platform/image-decoders/gif/GIFImageReader.cpp: (GIFImageReader::read): Use a macro to perform the state change, like we do everywhere else in the file. Also correctly return "failure" for certain corrupt GIFs, since that doesn't prevent their display (due to WebKit's different use of this code compared to Mozilla). 2010-05-26 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r60251. http://trac.webkit.org/changeset/60251 https://bugs.webkit.org/show_bug.cgi?id=39788 broke tests (Requested by dhyatt on #webkit). * rendering/RenderBlock.cpp: (WebCore::RenderBlock::moveChildTo): (WebCore::RenderBlock::moveAllChildrenTo): (WebCore::RenderBlock::makeChildrenNonInline): (WebCore::RenderBlock::removeChild): * rendering/RenderBlock.h: * rendering/RenderRubyBase.cpp: (WebCore::RenderRubyBase::moveInlineChildren): (WebCore::RenderRubyBase::moveBlockChildren): (WebCore::RenderRubyBase::mergeBlockChildren): * rendering/RenderRubyRun.cpp: (WebCore::RenderRubyRun::removeChild): 2010-05-26 Adam Barth <abarth@webkit.org> Reviewed by Eric Seidel. Fix webkit01.dat resumer tests in HTML5 parser https://bugs.webkit.org/show_bug.cgi?id=39796 To match the old tokenizer, we should only flush character tokens when we reach EOF. Added a notion of a "closed" segmented string that cannot be appended to, which models EOF. * html/HTML5Lexer.cpp: (WebCore::HTML5Lexer::nextToken): (WebCore::HTML5Lexer::shouldEmitBufferedCharacterToken): * html/HTML5Lexer.h: * html/HTML5Tokenizer.cpp: (WebCore::HTML5Tokenizer::pumpLexer): (WebCore::HTML5Tokenizer::write): (WebCore::HTML5Tokenizer::end): * html/HTML5Tokenizer.h: * platform/text/SegmentedString.cpp: (WebCore::SegmentedString::SegmentedString): (WebCore::SegmentedString::clear): (WebCore::SegmentedString::append): * platform/text/SegmentedString.h: (WebCore::SegmentedString::SegmentedString): (WebCore::SegmentedString::close): (WebCore::SegmentedString::isClosed): 2010-05-26 Adam Barth <abarth@webkit.org> Reviewed by Eric Seidel. Make HTML5 lexer not ASSERT when resuming partial parses https://bugs.webkit.org/show_bug.cgi?id=39755 I'm working through a variation of the webkit-runner.html test suite that stops the parser at every character to make sure we can resume parsing correctly. This patch fixes some errors caught by ASSERTs, which prevent the basic tests from running to completion. There's a bunch more work to do, however. Test: html5lib/webkit-resumer.html * html/HTML5Lexer.cpp: (WebCore::HTMLNames::isEndTagBufferingState): (WebCore::HTML5Lexer::nextToken): (WebCore::HTML5Lexer::addToPossibleEndTag): * html/HTML5Lexer.h: * html/HTML5Tokenizer.cpp: (WebCore::HTML5Tokenizer::write): * html/HTML5Tokenizer.h: 2010-05-26 Alexey Proskuryakov <ap@apple.com> Mac 32 bit build fix. * platform/graphics/mac/SimpleFontDataMac.mm: (WebCore::SimpleFontData::platformInit): Use static_cast instead of narrowPrecisionToFloat - the latter can't convert from float to float. 2010-05-26 David Hyatt <hyatt@apple.com> Reviewed by Ojan. https://bugs.webkit.org/show_bug.cgi?id=39783, clean up moveChild functions in RenderBlock. Cut out the need to pass the to block's child list by tightening up the type of the to object from RenderObject to RenderBlock. Implement the "append" versions of the move functions using their "insert" counterparts, since insertChildNode just calls appendChildNode when beforeChild is 0 anyway. Add comments explaining why the default for fullRemoveInsert is false, and make sure all forms of the move functions have the optional parameter for consistency. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::createAndAppendRootInlineBox): (WebCore::RenderBlock::moveChildTo): (WebCore::RenderBlock::moveAllChildrenTo): (WebCore::RenderBlock::makeChildrenNonInline): (WebCore::RenderBlock::removeChild): * rendering/RenderBlock.h: (WebCore::RenderBlock::moveChildTo): (WebCore::RenderBlock::moveAllChildrenTo): * rendering/RenderRubyBase.cpp: (WebCore::RenderRubyBase::moveInlineChildren): (WebCore::RenderRubyBase::moveBlockChildren): (WebCore::RenderRubyBase::mergeBlockChildren): * rendering/RenderRubyRun.cpp: (WebCore::RenderRubyRun::removeChild): 2010-05-26 Dan Bernstein <mitz@apple.com> Typed and reviewed by Alexey Proskuryakov. https://bugs.webkit.org/show_bug.cgi?id=39682 <rdar://problem/8026774> REGRESSION: WebKit nightly adding insane height to div at random Test: fast/css/custom-font-xheight.html * platform/graphics/mac/SimpleFontDataMac.mm: (WebCore::SimpleFontData::platformInit): Calling an Objective C method that returns a structure with a null object can leave garbage in returned value. Custom fonts don't have an NSFont, they only have a CGFont. Call platformBoundsForGlyph() function instead, which works with CGFont. (WebCore::SimpleFontData::platformBoundsForGlyph): Fixed to work on Tiger (for fonts that have an NSFont), since this is now used in more cases. 2010-05-26 Beth Dakin <bdakin@apple.com> Build fix for Mac clean builds. * storage/IDBDatabaseRequest.idl: 2010-05-26 Eric Carlson <eric.carlson@apple.com> Reviewed by Dan Bernstein. Must not cast between CFNumberRef and CFBooleanRef. <rdar://problem/8030739> https://bugs.webkit.org/show_bug.cgi?id=39756 * platform/graphics/win/QTMovieVisualContext.cpp: (QTMovieVisualContext::getCGImageOptions): QuickTime assumes the value associated with kCVPixelBufferCGImageCompatibilityKey is a CFBoolean, so add one. 2010-05-26 Xan Lopez <xlopez@igalia.com> GTK+ build fix, strike two. * bindings/gobject/WebKitDOMEventTarget.cpp: (webkit_dom_event_target_get_type): (webkit_dom_event_target_default_init): 2010-05-26 Jeremy Orlow <jorlow@chromium.org> Unreviewed build fix for Windows + clean up the Visual Studio project. * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: 2010-05-26 Andrei Popescu <andreip@google.com> Reviewed by Jeremy Orlow. Indexed Database component is missing IDBObjectStoreRequest interface https://bugs.webkit.org/show_bug.cgi?id=39490 Adding IDL and stub implementation for IDBObjectStoreRequest. No new tests, indexed database isn't yet testable. * DerivedSources.cpp: * DerivedSources.make: * GNUmakefile.am: * WebCore.gypi: * WebCore.pri: * WebCore.pro: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSIDBObjectStoreRequestCustom.cpp: Added. (WebCore::JSIDBObjectStoreRequest::remove): (WebCore::JSIDBObjectStoreRequest::addOrModify): (WebCore::JSIDBObjectStoreRequest::modify): (WebCore::JSIDBObjectStoreRequest::add): (WebCore::JSIDBObjectStoreRequest::get): * bindings/v8/custom/V8IDBObjectStoreRequestCustom.cpp: Added. (WebCore::V8IDBObjectStoreRequest::removeCallback): (WebCore::V8IDBObjectStoreRequest::addOrModifyCallback): (WebCore::V8IDBObjectStoreRequest::modifyCallback): (WebCore::V8IDBObjectStoreRequest::addCallback): (WebCore::V8IDBObjectStoreRequest::getCallback): * storage/IDBObjectStore.cpp: Added. * storage/IDBObjectStore.h: Added. (WebCore::IDBObjectStore::~IDBObjectStore): * storage/IDBObjectStoreRequest.cpp: Added. (WebCore::IDBObjectStoreRequest::name): (WebCore::IDBObjectStoreRequest::keyPath): (WebCore::IDBObjectStoreRequest::IDBObjectStoreRequest): * storage/IDBObjectStoreRequest.h: Added. (WebCore::IDBObjectStoreRequest::create): (WebCore::IDBObjectStoreRequest::~IDBObjectStoreRequest): * storage/IDBObjectStoreRequest.idl: Added. 2010-05-26 Xan Lopez <xlopez@igalia.com> Unreviewed GTK+ build fix. Use G_DEFINE_INTERFACE only if it's available. * bindings/gobject/WebKitDOMEventTarget.cpp: (webkit_dom_event_target_get_type): (webkit_dom_event_target_default_init): 2010-05-26 Jeremy Orlow <jorlow@chromium.org> Reviewed by Darin Fisher. Implement WebDOMStorageList and make WebIDBDatabase use it https://bugs.webkit.org/show_bug.cgi?id=39731 Remove unused function. * dom/DOMStringList.h: 2010-05-26 Jessie Berlin <jberlin@webkit.org> Reviewed by Pavel Feldman Bug 31296 - Web Inspector: Should support console.groupCollapsed https://bugs.webkit.org/show_bug.cgi?id=31296 * inspector/InspectorController.cpp: (WebCore::InspectorController::startGroup): Set the message type based on whether or not it should be initially collapsed. * inspector/InspectorController.h: * inspector/front-end/ConsoleView.js: Treat a StartGroupCollapsed message the same way as a StartGroup message, but display the tree for the group as collapsed. (WebInspector.ConsoleView.prototype.addMessage): (WebInspector.ConsoleMessage.prototype.toMessageElement): (WebInspector.ConsoleMessage.prototype.toString): (WebInspector.ConsoleGroup.prototype.addMessage): * page/Console.cpp: (WebCore::Console::groupCollapsed): Create a group and indicate that it should be collapsed. * page/Console.h: Add the StartGroupCollapsed message type. (WebCore::): * page/Console.idl: Create the JS bindings for groupCollapsed. 2010-05-26 yael aharon <yael.aharon@nokia.com> Reviewed by Kent Tamura. Support the labels attribute in labelable form controls https://bugs.webkit.org/show_bug.cgi?id=38713 Added a new cache type in NodeRareData to store the new cache type. This cache is created on demand. Added the "labels" attribute to all form controls that support this attribute. Tests: fast/forms/labels-add-htmlFor-label.html fast/forms/labels-add-parent-label.html fast/forms/labels-change-htmlFor-attribute.html fast/forms/labels-item-index.html fast/forms/labels-remove-htmlFor-attribute.html fast/forms/labels-remove-htmlFor-label.html fast/forms/labels-remove-parent-label.html fast/forms/labels-set-htmlFor-attribute.html * CMakeLists.txt: * GNUmakefile.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * dom/Node.cpp: (WebCore::Node::notifyLocalNodeListsLabelChanged): (WebCore::Node::removeCachedLabelsNodeList): (WebCore::NodeListsNodeData::invalidateCaches): (WebCore::NodeListsNodeData::invalidateCachesThatDependOnAttributes): (WebCore::NodeListsNodeData::isEmpty): * dom/Node.h: * dom/NodeRareData.h: (WebCore::NodeListsNodeData::NodeListsNodeData): * html/HTMLButtonElement.idl: * html/HTMLFormControlElement.cpp: (WebCore::HTMLFormControlElement::isLabelable): (WebCore::HTMLFormControlElement::labels): * html/HTMLFormControlElement.h: * html/HTMLInputElement.idl: * html/HTMLLabelElement.cpp: (WebCore::HTMLLabelElement::parseMappedAttribute): * html/HTMLLabelElement.h: * html/HTMLMeterElement.idl: * html/HTMLProgressElement.idl: * html/HTMLSelectElement.idl: * html/HTMLTextAreaElement.idl: * html/LabelsNodeList.cpp: Added. (WebCore::LabelsNodeList::LabelsNodeList): (WebCore::LabelsNodeList::~LabelsNodeList): (WebCore::LabelsNodeList::nodeMatches): * html/LabelsNodeList.h: Added. (WebCore::LabelsNodeList::create): 2010-05-26 Xan Lopez <xlopez@igalia.com> Reviewed by Jeremy Orlow. Style fix in JSEventCustom.cpp https://bugs.webkit.org/show_bug.cgi?id=39727 Conditional includes should be all together after the unconditional includes. * bindings/js/JSEventCustom.cpp: 2010-05-24 Jeremy Orlow <jorlow@chromium.org> Reviewed by Steve Block. Add IDBDatabase's attributes https://bugs.webkit.org/show_bug.cgi?id=39602 Add the attributes (like name, description, etc) for IDBDatabaseRequest. Plumb that back to the IDBDatabase object which stores the data. CMake and Android build changes in another CL (that fixes other stuff too). Updated the layout test, but there's some further testing that needs to be added once the Chromium side of this lands. * GNUmakefile.am * WebCore.gypi: * WebCore.pro * WebCore.vcproj/WebCore.vcproj * WebCore.xcodeproj/project.pbxproj * dom/DOMStringList.h: (WebCore::DOMStringList::strings): * storage/IDBDatabase.cpp: Removed. * storage/IDBDatabase.h: * storage/IDBDatabaseImpl.cpp: Added. (WebCore::IDBDatabaseImpl::IDBDatabaseImpl): (WebCore::IDBDatabaseImpl::~IDBDatabaseImpl): (WebCore::IDBDatabaseImpl::objectStores): * storage/IDBDatabaseImpl.h: Added. (WebCore::IDBDatabaseImpl::create): (WebCore::IDBDatabaseImpl::name): (WebCore::IDBDatabaseImpl::description): (WebCore::IDBDatabaseImpl::version): * storage/IDBDatabaseRequest.h: (WebCore::IDBDatabaseRequest::name): (WebCore::IDBDatabaseRequest::description): (WebCore::IDBDatabaseRequest::version): (WebCore::IDBDatabaseRequest::objectStores): * storage/IDBDatabaseRequest.idl: * storage/IDBSuccessEvent.cpp: (WebCore::IDBSuccessEvent::IDBSuccessEvent): * storage/IndexedDatabaseImpl.cpp: (WebCore::IndexedDatabaseImpl::open): * storage/IndexedDatabaseImpl.h: 2010-05-26 Xan Lopez <xlopez@igalia.com> Reviewed by NOBODY Gustavo Noronha. [GTK] Add support for DOM events in the GObject DOM bindings https://bugs.webkit.org/show_bug.cgi?id=38844 Add actual GObject event objects to the DOM event signals. * GNUmakefile.am: * bindings/gobject/GObjectEventListener.cpp: (WebCore::GObjectEventListener::handleEvent): * bindings/gobject/WebKitDOMBinding.cpp: (WebKit::wrapEventTarget): (WebKit::kit): * bindings/gobject/WebKitDOMBinding.h: * bindings/gobject/WebKitDOMEventTarget.cpp: Added. (webkit_dom_event_target_default_init): (webkit_dom_event_target_dispatch_event): * bindings/gobject/WebKitDOMEventTarget.h: Added. * bindings/scripts/CodeGeneratorGObject.pm: 2010-05-24 Jeremy Orlow <jorlow@chromium.org> Reviewed by Steve Block. [Android] Add IndexedDB to the build https://bugs.webkit.org/show_bug.cgi?id=39593 Add the current list of build files to Android's make files. From now on, I'll try to be sure to update these along with the rest. Also, fix a nit in the gypi file. No tests..just changing build files. * Android.derived.jscbindings.mk: * Android.derived.v8bindings.mk: * Android.mk: * WebCore.gypi: 2010-05-26 Alexander Pavlov <apavlov@chromium.org> Reviewed by Pavel Feldman. Expose CSS rule body start/end offsets in the parent stylesheet https://bugs.webkit.org/show_bug.cgi?id=38906 CSSParser::parseSheet() accepts an optional external Vector where the start/end offsets of the CSSStyleRule bodies, relative to the beginning of the stylesheet, will be stored. This Vector is only used when the Web Inspector needs the body ranges, thus there is no memory overhead until the user starts editing styles via the Web Inspector. Additionally, fixed an issue with a single inspectorStyleSheet for all frames in the page. Test: inspector/styles-source-offsets.html * css/CSSGrammar.y: * css/CSSParser.cpp: (WebCore::CSSParser::CSSParser): (WebCore::CSSParser::setupParser): (WebCore::CSSParser::parseSheet): (WebCore::CSSParser::createStyleRule): (WebCore::CSSParser::updateLastSelectorLineAndPosition): (WebCore::CSSParser::markRuleBodyStart): (WebCore::CSSParser::markRuleBodyEnd): * css/CSSParser.h: (WebCore::CSSParser::resetRuleBodyMarks): * inspector/InspectorCSSStore.cpp: (WebCore::InspectorCSSStore::InspectorCSSStore): (WebCore::InspectorCSSStore::reset): (WebCore::InspectorCSSStore::removeDocument): (WebCore::InspectorCSSStore::inspectorStyleSheet): (WebCore::InspectorCSSStore::getStartEndOffsets): (WebCore::InspectorCSSStore::getIndexInStyleRules): (WebCore::InspectorCSSStore::disabledStyleForId): (WebCore::InspectorCSSStore::styleForId): (WebCore::InspectorCSSStore::ruleForId): (WebCore::InspectorCSSStore::bindStyle): (WebCore::InspectorCSSStore::bindStyleSheet): (WebCore::InspectorCSSStore::bindRule): * inspector/InspectorCSSStore.h: * inspector/InspectorController.cpp: (WebCore::InspectorController::InspectorController): (WebCore::InspectorController::resourceForURL): * inspector/InspectorController.h: (WebCore::InspectorController::inspectorFrontend): * inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::InspectorDOMAgent): (WebCore::InspectorDOMAgent::unbind): (WebCore::InspectorDOMAgent::getStyles): (WebCore::InspectorDOMAgent::getAllStyles): (WebCore::InspectorDOMAgent::buildArrayForCSSRules): (WebCore::InspectorDOMAgent::buildArrayForPseudoElements): (WebCore::InspectorDOMAgent::applyStyleText): (WebCore::InspectorDOMAgent::setStyleText): (WebCore::InspectorDOMAgent::setStyleProperty): (WebCore::InspectorDOMAgent::toggleStyleEnabled): (WebCore::InspectorDOMAgent::setRuleSelector): (WebCore::InspectorDOMAgent::addRule): (WebCore::InspectorDOMAgent::buildObjectForStyle): (WebCore::InspectorDOMAgent::buildArrayForDisabledStyleProperties): (WebCore::InspectorDOMAgent::buildObjectForStyleSheet): (WebCore::InspectorDOMAgent::buildObjectForRule): * inspector/InspectorDOMAgent.h: * inspector/front-end/DOMAgent.js: (WebInspector.CSSStyleDeclaration): 2010-05-26 Xan Lopez <xlopez@igalia.com> Reviewed by Gustavo Noronha. [GTK] Add support for DOM events in the GObject DOM bindings https://bugs.webkit.org/show_bug.cgi?id=38844 Use GObject-like names for the DOM event signals. Basically go from 'mousewheel' to 'mouse-wheel-event'. * bindings/scripts/CodeGeneratorGObject.pm: 2010-05-26 Nikolas Zimmermann <nzimmermann@rim.com> Not reviewed. Sort Xcode project file. * WebCore.xcodeproj/project.pbxproj: 2010-05-26 Xan Lopez <xlopez@igalia.com> Reviewed by Gustavo Noronha. [GTK] Add support for DOM events in the GObject DOM bindings https://bugs.webkit.org/show_bug.cgi?id=38844 First step towards DOM events support. We create one signal per event supported in the DOM classes, and create a custom GObjectEventListener that will emit a GObject signal when an event is dispatched to the object. There is no event object at the moment (we just pass NULL), and no support for hooking into the capture phase. * GNUmakefile.am: * bindings/gobject/GObjectEventListener.cpp: Added. (WebCore::GObjectEventListener::handleEvent): (WebCore::GObjectEventListener::operator==): * bindings/gobject/GObjectEventListener.h: Added. (WebCore::GObjectEventListener::create): (WebCore::GObjectEventListener::cast): (WebCore::GObjectEventListener::GObjectEventListener): * bindings/scripts/CodeGeneratorGObject.pm: * bindings/scripts/test/GObject/WebKitDOMTestCallback.cpp: (WebKit::core): (webkit_dom_test_callback_finalize): (webkit_dom_test_callback_class_init): (WebKit::wrapTestCallback): * bindings/scripts/test/GObject/WebKitDOMTestInterface.cpp: (WebKit::core): (webkit_dom_test_interface_finalize): (webkit_dom_test_interface_class_init): (WebKit::wrapTestInterface): * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp: (WebKit::core): (webkit_dom_test_obj_finalize): (webkit_dom_test_obj_class_init): (WebKit::wrapTestObj): * dom/EventListener.h: (WebCore::EventListener::): 2010-05-26 Xan Lopez <xlopez@igalia.com> Reviewed by Gustavo Noronha. [GTK] GObject DOM bindings https://bugs.webkit.org/show_bug.cgi?id=33590 We need to protect the body of some methods with #ifdefs, since the availability of the code they call into is decided at compile time. * bindings/scripts/CodeGeneratorGObject.pm: 2010-05-26 Kent Tamura <tkent@chromium.org> Reviewed by Shinichiro Hamaji. Move date/time limit values to DateComponents.h from HTMLInputElement.cpp https://bugs.webkit.org/show_bug.cgi?id=39423 The minimum and maximum values for date, datetime, datetime-local, month, time, and week types depend on the implementation of DateComponents. So move them to DateComponents. * html/DateComponents.h: * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::minimum): (WebCore::HTMLInputElement::maximum): 2010-05-26 Csaba Osztrogonác <ossy@webkit.org> Reviewed by Simon Hausmann. Buildfix for build without ENABLE(RUBY) after r60201. * rendering/RenderBlock.cpp: (WebCore::canMergeContiguousAnonymousBlocks): Missing #if ENABLE(RUBY) guard added. 2010-05-26 Nikolas Zimmermann <nzimmermann@rim.com> Not reviewed. Update test expectations for JS generator, when using run-webkit-tests. This has been forgotten. * bindings/scripts/test/JS/JSTestInterface.cpp: (WebCore::JSTestInterfaceConstructor::JSTestInterfaceConstructor): (WebCore::JSTestInterface::createPrototype): * bindings/scripts/test/JS/JSTestInterface.h: (WebCore::JSTestInterfacePrototype::JSTestInterfacePrototype): * bindings/scripts/test/JS/JSTestObj.cpp: (WebCore::JSTestObjConstructor::JSTestObjConstructor): (WebCore::JSTestObj::createPrototype): * bindings/scripts/test/JS/JSTestObj.h: (WebCore::JSTestObjPrototype::JSTestObjPrototype): 2010-05-25 Philippe Normand <pnormand@igalia.com> Reviewed by Gustavo Noronha Silva. [GStreamer] Apple trailers not playing https://bugs.webkit.org/show_bug.cgi?id=37390 Set the AppleTrailer User-Agent workaround after FrameLoader::addExtraFieldsToSubresourceRequest has been called because that method sets the global User-Agent. * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp: (webKitWebSrcStart): 2010-05-25 Dumitru Daniliuc <dumi@chromium.org> Unreviewed, changing "fts2" to "fts3" in one location I missed in r60188. * storage/DatabaseAuthorizer.cpp: (WebCore::DatabaseAuthorizer::dropVTable): 2010-05-25 Mark Rowe <mrowe@apple.com> Build fix. * platform/graphics/win/MediaPlayerPrivateFullscreenWindow.cpp: 2010-05-25 Yuta Kitamura <yutak@chromium.org> Reviewed by Pavel Feldman. Web Inspector: Show HTTP status message sent from server in Resources tab. This patch obtains an HTTP status message of each resource and pass it to the front end of Web Inspector. The status message is shown in "Headers" tab in the detail view of that resource, along with the HTTP status code. Web Inspector does not respect HTTP status message https://bugs.webkit.org/show_bug.cgi?id=39595 * inspector/InspectorResource.cpp: (WebCore::InspectorResource::updateResponse): (WebCore::InspectorResource::updateScriptObject): * inspector/InspectorResource.h: * inspector/front-end/Resource.js: (WebInspector.Resource.CompareByTransferSize): * inspector/front-end/ResourceView.js: (WebInspector.ResourceView.prototype._refreshHTTPInformation): * inspector/front-end/inspector.js: (WebInspector.updateResource): * inspector/front-end/utilities.js: (String.prototype.escapeHTML): Escape '"' so that we can escape messages that may occur inside HTML attributes. 2010-05-24 David Hyatt <hyatt@apple.com> Reviewed by Dan Bernstein. https://bugs.webkit.org/show_bug.cgi?id=39615, implement basic support for -webkit-column-span. This patch adds support for -webkit-column-span elements that can span across all of the columns in a multi-column block. In this first stage, column span support is limited to only immediate children of the multi-column block, so no elements actually have to split across a span yet. Two new kinds of anonymous blocks have been added: anonymous columns blocks and anonymous column span blocks. When a span gets inserted into a multicol block, the block is split, with the column portions of the multicol getting wrapped in anonymous columns blocks and the spans getting wrapped in anonymous column span blocks. The multicol block then stops being multicol and lets the anonymous multicol blocks take over column layout. Many new tests added in fast/multicol/span. * dom/Node.cpp: (WebCore::Node::diff): Changes to column span result in a detach/attach, since spanning elements don't typically have much content. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::styleDidChange): Make sure to inherit the appropriate new styles into the anonymous column and column span blocks. (WebCore::RenderBlock::addChildToAnonymousColumnBlocks): This method handles the insertion of new children into the block after it has had to wrap its children in anonymous column/column-span blocks. (WebCore::RenderBlock::splitAnonymousBlocksAroundChild): A helper method for splitting all anonymous blocks between beforeChild and this block so that a new element with an incompatible type can be inserted between them. (WebCore::RenderBlock::makeChildrenAnonymousColumnBlocks): This method does the initial split of a block into anonymous components. This happens the first time a column-span element gets inserted into the block. (WebCore::columnsBlockForSpanningElement): This function checks whether or not the column-span element is actually being inserted into a viable columns block. (WebCore::RenderBlock::addChildIgnoringAnonymousColumnBlocks): This is the original RenderBlock::addChild. It handles everything else just like it used to. (WebCore::RenderBlock::addChild): Patched to now call addChildToAnonymousColumnBlocks if the block has wrapped its current children in anonymous column/column-span blocks already. (WebCore::RenderBlock::moveAllChildrenTo): moveAllChildrenTo has been enhanced to support doing a full remove/append in the case where elements are shifting across layers. (This should arguably be the default behavior, but that can happen in a future patch.) (WebCore::RenderBlock::removeLeftoverAnonymousBlock): Patched to fix a bug when the leftover block is empty and to prevent anonymous column/column-span block from being coalesced with a parent if they are non-empty. (WebCore::canMergeContiguousAnonymousBlocks): Whether or not two contiguous anonymous blocks can merge after the removal of a child. (WebCore::RenderBlock::removeChild): removeChild has been patched to handle more cases of merging/deletion than it did before. It can now destroy empty anonymous block chains and can now merge two contiguous anonymous blocks that don't share the same childrenInline() setting (by putting one inside the other). It also makes sure to do full appends/moves/inserts in the cases where the affected blocks have layers. (WebCore::RenderBlock::fillSelectionGaps): Don't let the selection extend outside of a column-span. (WebCore::RenderBlock::setDesiredColumnCountAndWidth): Turn off multi-column layout on the outermost block if it has wrapped its children in anonymous column/column-span blocks. (WebCore::RenderBlock::createAnonymousBlockWithSameTypeAs): (WebCore::RenderBlock::createAnonymousColumnsBlock): (WebCore::RenderBlock::createAnonymousColumnSpanBlock): New helper functions for anonymous block creation. (WebCore::RenderBlock::renderName): Patched to dump anonymous column and column-span blocks so that they can be distinguished from regular anonymous blocks. * rendering/RenderBlock.h: * rendering/RenderObject.h: (WebCore::RenderObject::isAnonymousColumnsBlock): (WebCore::RenderObject::isAnonymousColumnSpanBlock): New helper functions for asking the type of an anonymous block. * rendering/style/RenderStyle.h: (WebCore::InheritedFlags::inheritColumnPropertiesFrom): A helper function to allow anonymous column blocks to easily inherit all column properties for rendering. 2010-05-25 Dirk Pranke <dpranke@chromium.org> Reviewed by Dimitri Glazkov. Re-commit r58765 - it had been rolled out to see if it was causing a perf regression (in r59787), but that does not seem to have been the case. Tests: fast/notifications/notifications-replace.html fast/notifications/notifications-rtl.html https://bugs.webkit.org/show_bug.cgi?id=39605 * notifications/Notification.h: (WebCore::Notification::dir): (WebCore::Notification::setDir): (WebCore::Notification::replaceId): (WebCore::Notification::setReplaceId): * notifications/Notification.idl: 2010-05-22 Jer Noble <jer.noble@apple.com> Reviewed by Adam Roben. Full screen doesn't work for video elements https://bugs.webkit.org/show_bug.cgi?id=39557 rdar://problem/8011813 Add fullscreen support for MediaPlayerPrivateVisualContext. A new class, MediaPlayerPrivateFullscreenWindow, provides the fullscreen hwnd and layer renderer. Any WKCACFLayer can be provided to MediaPlayerPrivateFullscreenWindow so future additional MediaPlayerPrivate implementations can use the fullscreen window. Minor additions have been made to the FloatSize and IntSize classes. MediaPlayerPrivateQuickTimeVisualContext now calls retrieveCurrentImage after creating a new videoLayer; this is an existing bug that was never really exposed before now. * WebCore.vcproj/WebCore.vcproj: * platform/graphics/FloatSize.h: Added aspectRatio() and scale(float). (WebCore::FloatSize::aspectRatio): (WebCore::FloatSize::scale): * platform/graphics/IntSize.h: Added aspectRatio(). (WebCore::IntSize::aspectRatio): * platform/graphics/win/MediaPlayerPrivateFullscreenWindow.cpp: Added. * platform/graphics/win/MediaPlayerPrivateFullscreenWindow.h: Added. * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp: Call retrieveCurrentImage() after creating the videoLayer. (WebCore::MediaPlayerPrivateQuickTimeVisualContext::supportsFullscreen): (WebCore::MediaPlayerPrivateQuickTimeVisualContext::retrieveCurrentImage): (WebCore::MediaPlayerPrivateQuickTimeVisualContext::createLayerForMovie): * platform/graphics/win/WKCACFLayer.cpp: (WebCore::WKCACFLayer::WKCACFLayer): (WebCore::WKCACFLayer::removeFromSuperlayer): (WebCore::WKCACFLayer::setFrame): (WebCore::WKCACFLayer::internalSetNeedsDisplay): (WebCore::WKCACFLayer::setLayoutClient): (WebCore::WKCACFLayer::layoutSublayersProc): (WebCore::WKCACFLayer::layoutClient): (WebCore::WKCACFLayer::setNeedsLayout): * platform/graphics/win/WKCACFLayer.h: Add layout client class. (WebCore::WKCACFLayerLayoutClient::~WKCACFLayerLayoutClient): (WebCore::WKCACFLayer::frame): Added back frame()/setFrame(). * platform/graphics/win/WebTiledLayer.cpp: (WebCore::WebTiledLayer::setFrame): Implamented setFrame() in subclass of WKCACFLayer * platform/graphics/win/WebTiledLayer.h: * platform/graphics/win/WebTiledLayer.cpp: Added setFrame() overriding WKCACFLayer's implementation (WebCore::WebTiledLayer::setFrame): * platform/graphics/win/WebTiledLayer.h: 2010-05-25 Dumitru Daniliuc <dumi@chromium.org> Reviewed by Brady Eidson. Allow FTS3 functions. https://bugs.webkit.org/show_bug.cgi?id=38003 * storage/DatabaseAuthorizer.cpp: (WebCore::DatabaseAuthorizer::addWhitelistedFunctions): (WebCore::DatabaseAuthorizer::createVTable): 2010-05-25 Anders Carlsson <andersca@apple.com> Reviewed by Sam Weinig. Get rid of PluginDatabaseClient https://bugs.webkit.org/show_bug.cgi?id=39685 PluginDatabaseClient isn't used anywhere so just remove it. * GNUmakefile.am: * plugins/PluginDatabase.cpp: (WebCore::PluginDatabase::PluginDatabase): (WebCore::PluginDatabase::refresh): * plugins/PluginDatabase.h: * plugins/PluginDatabaseClient.h: Removed. 2010-05-25 Alexey Proskuryakov <ap@apple.com> Reviewed by Darin Adler. https://bugs.webkit.org/show_bug.cgi?id=18595 REGRESSION (r20766): Setting display:none on an iframe causes the ownerDocument to freeze Test: fast/events/frame-detached-in-mousedown.html * page/EventHandler.h: Added a boolean tracking whether EventHandler needs to reset capturing node on mouse up. It's only done for nodes that hold subframes - elements that capture events are responsible for resetting the state. * page/EventHandler.cpp: (WebCore::EventHandler::EventHandler): Don't initialize m_capturingMouseEventsNode, it's a RefPtr and is initialized automatically. (WebCore::EventHandler::handleMousePressEvent): Remember that EventHandler should reset capturing node on its own. (WebCore::EventHandler::handleMouseDoubleClickEvent): The code here looked like it was copied from the below in r21156. Copied correct code instead. (WebCore::EventHandler::handleMouseReleaseEvent): We only clear the capturing node when it holds a subframe, but the frame may be already detached by the time mouse up is handled, so the check was wrong - and return code of passMouseReleaseEventToSubframe() is obviously irrelevant. (WebCore::EventHandler::setCapturingMouseEventsNode): Remember that EventHandler should not reset capturing node on its own. 2010-05-25 Kevin Ollivier <kevino@theolliviers.com> [wx] Build fix for missing symbol. * wscript: 2010-05-25 Darin Adler <darin@apple.com> * dom/Element.cpp: (WebCore::Element::getIDAttribute): Added comments about problems with this function. 2010-05-25 Leandro Pereira <leandro@profusion.mobi> Reviewed by Gustavo Noronha Silva. [EFL] Build fix. http://webkit.org/b/39598 * CMakeLists.txt: 2010-05-25 Enrica Casucci <enrica@apple.com> Reviewed by Darin Adler. REGRESSION(51522): typing at the end of a line in designMode documents is *very* slow. https://bugs.webkit.org/show_bug.cgi?id=36037 <rdar://problem/8022887> The performance regression was traced to r51522 but this is not entirely true. That revision introduced, among other things, additional checks in the method isCandidate of both Position and PositionIterator classes to support scenarios of mixed editability that were not allowed before. This change uncovered an underlying issue with the decrement method of PositionIterator, that in some cases would iterate through every position as offset in a block before moving to the last child in the block. This was exactly the case of the attached test case, where, trying to check if the caret was placed at the end of a block, we were examining every position in the block before considering the last true position in the block. The performance was linear with the number of child nodes in the block, instead of constant. * dom/PositionIterator.cpp: (WebCore::PositionIterator::decrement): 2010-05-25 Alexey Proskuryakov <ap@apple.com> Reviewed by Darin Adler. https://bugs.webkit.org/show_bug.cgi?id=39621 <rdar://problem/8009738> Extreme memory growth on DOM Hanoi test The largest cause of memory growth on this test were autoreleased DOMNode objects created to make webView:formStateDidChangeForNode: delegate calls. * html/HTMLTextAreaElement.cpp: (WebCore::HTMLTextAreaElement::HTMLTextAreaElement): Don't call notifyFormStateChanged() - since the element starts with refcount 0, it's not safe to call functions that are likely to create temporary wrappers (wrapper destructor would bring refcount back to 0, and destroy HTMLTextAreaElement from within its constructor). 2010-05-25 Kent Tamura <tkent@chromium.org> Reviewed by Dimitri Glazkov. [DRT/Chromium] Enable 3D_CANVAS, FILTERS, METER_TAG and PROGRESS_TAG https://bugs.webkit.org/show_bug.cgi?id=39652 * rendering/RenderTheme.cpp: (WebCore::RenderTheme::paintMeter): Fix narrowPrecisionToFloat() usage. 2010-05-25 Darin Adler <darin@apple.com> Sort ".exp" files with the sort tool. This makes later merging easier. These Mac-specific files should probably move into a subdirectory at some point. * WebCore.Inspector.exp: Sorted. * WebCore.PluginHostProcess.exp: Removed blank line. * WebCore.VideoProxy.exp: Sorted. * WebCore.base.exp: Ditto. 2010-05-25 Vangelis Kokkevis <vangelis@chromium.org> Reviewed by Darin Fisher. Removing the persistent GraphicsContext from LayerChromium to save on memory and simplify code. Layers now create a temporary context, draw into it, update the GL texture and discard the context. https://bugs.webkit.org/show_bug.cgi?id=39640 * platform/graphics/chromium/GraphicsLayerChromium.cpp: (WebCore::GraphicsLayerChromium::updateLayerDrawsContent): * platform/graphics/chromium/LayerChromium.cpp: (WebCore::LayerChromium::LayerChromium): (WebCore::LayerChromium::~LayerChromium): (WebCore::LayerChromium::setLayerRenderer): (WebCore::LayerChromium::updateTextureContents): (WebCore::LayerChromium::setContents): (WebCore::LayerChromium::setBounds): (WebCore::LayerChromium::setNeedsDisplay): * platform/graphics/chromium/LayerChromium.h: * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::~LayerRendererChromium): (WebCore::LayerRendererChromium::setRootLayerCanvasSize): (WebCore::LayerRendererChromium::drawLayers): (WebCore::LayerRendererChromium::assignTextureForLayer): (WebCore::LayerRendererChromium::compositeLayersRecursive): * platform/graphics/chromium/LayerRendererChromium.h: (WebCore::LayerRendererChromium::rootLayerGraphicsContext): 2010-05-24 Kenneth Rohde Christiansen <kenneth@webkit.org> Reviewed by Simon Hausmann. [Qt] Make text filling work together with text stroke. When the text has stroke a new QPen was set, overriding the pen set for text filling. This patch fixes that by storing the two pens and using where appropriate. * platform/graphics/qt/FontQt.cpp: (WebCore::Font::drawComplexText): 2010-05-17 Antonio Gomes <tonikitoo@webkit.org> Reviewed by Darin Adler. Add an optional "starting node' parameter to scrollRecursively and scrollOverflow of EventHandler https://bugs.webkit.org/show_bug.cgi?id=39217 It would be usefull if scrollOverflow and scrollRecursively methods of EventHandler could receive a parameter to specify where to start scrolling from. Currently they start scrolling from either the current focused node or the node where mouse last pressed on. Patch proposes an aditional starting point as an optional parameter. Since it is optional, all call sites can remain as are, and if a Null node is passed in, both methods work as previously. * page/EventHandler.cpp: (WebCore::EventHandler::scrollOverflow): (WebCore::EventHandler::scrollRecursively): * page/EventHandler.h: 2010-05-25 Yury Semikhatsky <yurys@chromium.org> Reviewed by Timothy Hatcher. Web Inspector: localize heap graph strings. https://bugs.webkit.org/show_bug.cgi?id=39674 * English.lproj/localizedStrings.js: 2010-05-25 Adam Barth <abarth@webkit.org> Reviewed by Eric Seidel. Switch HTML parsing benchmark to use document.write instead of innerHTML https://bugs.webkit.org/show_bug.cgi?id=39661 We'd like to exercise the main parsing pipeline instead of the fragment parsing pipeline. * benchmarks/parser/html-parser.html: 2010-05-25 Kenneth Rohde Christiansen <kenneth.christiansen@openbossa.org> Reviewed by Laszlo Gombos. [Qt] Running with accelerated compositing enabled sometimes result in a crash https://bugs.webkit.org/show_bug.cgi?id=39609 Check if we have a scene before applying the workaround for the QGraphicsScene bug where opacity change doesn't always have immediate effect. * platform/graphics/qt/GraphicsLayerQt.cpp: (WebCore::OpacityAnimationQt::applyFrame): 2010-05-25 Yury Semikhatsky <yurys@chromium.org> Unreviewed. Fix Chromium Mac Release build. * bindings/v8/ScriptDebugServer.cpp: 2010-05-24 Yury Semikhatsky <yurys@chromium.org> Reviewed by Pavel Feldman. ScriptDebugServer is now implemented as DebugEventListener which means it doesn't depend on v8 debugging protocol, instead it uses ExecState to collect debugging info and pass it to the listeners. New implementation of ScriptDebugServer uses methods provided by client to dispatch its messages while JS is paused(previously the messages was dispatched in a callback passed to v8 along with DebugEventHandler). https://bugs.webkit.org/show_bug.cgi?id=39594 * bindings/js/ScriptDebugServer.cpp: (WebCore::ScriptDebugServer::dispatchDidPause): (WebCore::ScriptDebugServer::dispatchDidContinue): (WebCore::ScriptDebugServer::dispatchFunctionToListeners): Changed method signature to allow invocation of ScriptDebugListener methods that have non-empty argument list. (WebCore::ScriptDebugServer::pauseIfNeeded): * bindings/js/ScriptDebugServer.h: * bindings/v8/ScriptDebugServer.cpp: (WebCore::retrieveFrame): (WebCore::ScriptDebugServer::ScriptDebugServer): (WebCore::ScriptDebugServer::addListener): (WebCore::ScriptDebugServer::removeListener): Execution is resumed(nested message loop is terminated) when corresponding debugger window closes. (WebCore::ScriptDebugServer::clearBreakpoints): (WebCore::ScriptDebugServer::pauseOnExceptionsState): (WebCore::ScriptDebugServer::setPauseOnExceptionsState): (WebCore::ScriptDebugServer::continueProgram): (WebCore::ScriptDebugServer::stepIntoStatement): (WebCore::ScriptDebugServer::stepOverStatement): (WebCore::ScriptDebugServer::stepOutOfFunction): (WebCore::ScriptDebugServer::v8DebugEventCallback): (WebCore::ScriptDebugServer::handleV8DebugEvent): (WebCore::ScriptDebugServer::didResume): * bindings/v8/ScriptDebugServer.h: (WebCore::ScriptDebugServer::ClientMessageLoop::~ClientMessageLoop): (WebCore::ScriptDebugServer::setClientMessageLoop): * inspector/InspectorController.cpp: (WebCore::InspectorController::didPause): * inspector/InspectorController.h: * inspector/ScriptDebugListener.h: Changed didPause signature to explicitly pass ScriptState where execution is paused. 2010-05-25 Adam Barth <abarth@webkit.org> Reviewed by Eric Seidel. Clear attributes for each tag in the HTML5 parser https://bugs.webkit.org/show_bug.cgi?id=39660 Yes, I did screw this up. * html/HTML5Token.h: (WebCore::HTML5Token::beginStartTag): (WebCore::HTML5Token::beginEndTag): 2010-05-25 Anders Bakken <agbakken@gmail.com> Reviewed by Darin Adler. Remove warning for GCC 4.4.3 GCC suggest parentheses around && within || * dom/Element.cpp: (WebCore::Element::recalcStyle): 2010-05-25 Xan Lopez <xlopez@igalia.com> Fix the GTK+ build, PluginInfoStore was removed. * GNUmakefile.am: 2010-05-25 Ada Chan <adachan@apple.com> Reviewed by Steve Falkenburg. Add a base class for DOMTimer called SuspendableTimer which captures just the basic functionality of TimerBase and ActiveDOMObject combined. It does not contain functionality specific to scripting timers. SuspendableTimer is used in fixing https://bugs.webkit.org/show_bug.cgi?id=39651 * Android.mk: * CMakeLists.txt: * GNUmakefile.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * page/DOMTimer.cpp: (WebCore::DOMTimer::DOMTimer): (WebCore::DOMTimer::contextDestroyed): (WebCore::DOMTimer::stop): * page/DOMTimer.h: * page/SuspendableTimer.cpp: Added. (WebCore::SuspendableTimer::SuspendableTimer): (WebCore::SuspendableTimer::~SuspendableTimer): (WebCore::SuspendableTimer::hasPendingActivity): (WebCore::SuspendableTimer::stop): (WebCore::SuspendableTimer::suspend): (WebCore::SuspendableTimer::resume): (WebCore::SuspendableTimer::canSuspend): * page/SuspendableTimer.h: Added. 2010-05-25 Justin Schuh <jschuh@chromium.org> Reviewed by Nate Chapin. Remove custom bindings for Element.SetAttribute* https://bugs.webkit.org/show_bug.cgi?id=39604 Custom bindings are no longer needed because origin checks were moved out of the bindings by: http://trac.webkit.org/changeset/59866 Behavior isn't changed and is covered by existing tests. * bindings/js/JSElementCustom.cpp: * bindings/v8/custom/V8ElementCustom.cpp: * dom/Element.idl: 2010-05-25 Yury Semikhatsky <yurys@chromium.org> Reviewed by Pavel Feldman. Add memory graph to Timeline overview pane. https://bugs.webkit.org/show_bug.cgi?id=37879 * inspector/front-end/Drawer.js: (WebInspector.Drawer): (WebInspector.Drawer.prototype.show.animationFinished): (WebInspector.Drawer.prototype.show): (WebInspector.Drawer.prototype.hide): (WebInspector.Drawer.prototype.set currentPanelCounters): * inspector/front-end/Panel.js: * inspector/front-end/TimelineOverviewPane.js: (WebInspector.TimelineOverviewPane): (WebInspector.TimelineOverviewPane.prototype.showTimelines): (WebInspector.TimelineOverviewPane.prototype.showMemoryGraph): (WebInspector.TimelineOverviewPane.prototype._forAllRecords): (WebInspector.TimelineOverviewPane.prototype.update): (WebInspector.TimelineOverviewPane.prototype.updateMainViewWidth): (WebInspector.TimelineOverviewPane.prototype._endWindowDragging): (WebInspector.TimelineOverviewPane.prototype._createTimelineCategoryStatusBarCheckbox): (WebInspector.HeapGraph): (WebInspector.HeapGraph.prototype.get element): (WebInspector.HeapGraph.prototype.get visible): (WebInspector.HeapGraph.prototype.show): (WebInspector.HeapGraph.prototype.hide): (WebInspector.HeapGraph.prototype.setSize): (WebInspector.HeapGraph.prototype.update): (WebInspector.HeapGraph.prototype._clear): (WebInspector.HeapGraph.prototype._drawScale): * inspector/front-end/TimelinePanel.js: (WebInspector.TimelinePanel): (WebInspector.TimelinePanel.prototype.toolbarItemClass._createTopPane): (WebInspector.TimelinePanel.prototype.get statusBarItems): (WebInspector.TimelinePanel.prototype._timelinesOverviewItemSelected): (WebInspector.TimelinePanel.prototype._memoryOverviewItemSelected): (WebInspector.TimelinePanel.prototype.setSidebarWidth): (WebInspector.TimelinePanel.prototype.show): (WebInspector.TimelinePanel.prototype.hide): * inspector/front-end/inspector.css: (#counters): (#timeline-overview-sidebar): (.timeline-category-statusbar-item): (.timeline-category-statusbar-item .timeline-category-checkbox): (.timeline-category-statusbar-item .timeline-category-checkbox:checked): (.timeline-category-statusbar-item.timeline-category-loading .timeline-category-checkbox): (.timeline-category-statusbar-item.timeline-category-scripting .timeline-category-checkbox): (.timeline-category-statusbar-item.timeline-category-rendering .timeline-category-checkbox): (#timeline-overview-memory): (.timeline-records-counter): (#main-status-bar > .timeline-records-counter): (#counters > .timeline-records-counter): * inspector/front-end/inspector.html: * inspector/front-end/utilities.js: (): 2010-05-25 Adam Barth <abarth@webkit.org> Unreviewed. Fix typo pointed out by Maciej. * html/HTML5Lexer.cpp: (WebCore::HTMLNames::unconsumeCharacters): (WebCore::HTML5Lexer::consumeEntity): 2010-05-25 Adam Barth <abarth@webkit.org> Reviewed by Eric Seidel. Fix <noembed> and <plaintext> content models https://bugs.webkit.org/show_bug.cgi?id=39653 PLAINTEXTState is my favorite lexer state. :) * html/HTML5TreeBuilder.cpp: (WebCore::HTML5TreeBuilder::passTokenToLegacyParser): 2010-05-24 Adam Barth <abarth@webkit.org> Reviewed by Eric Seidel. First cut at HTML5 entities https://bugs.webkit.org/show_bug.cgi?id=39649 There's still a bunch more work to do to get our entity parsing fully up to spec. This patch contains the bulk of the implementation however. The basics are covered by the existing html5lib tests. I'll add more detailed tests in a followup patch. * html/HTML5Lexer.cpp: (WebCore::HTMLNames::legalEntityFor): (WebCore::HTMLNames::isHexDigit): (WebCore::HTMLNames::isAlphaNumeric): (WebCore::HTMLNames::uncomsumeCharacters): (WebCore::HTML5Lexer::consumeEntity): (WebCore::HTML5Lexer::nextToken): (WebCore::HTML5Lexer::haveBufferedCharacterToken): * html/HTML5Lexer.h: (WebCore::HTML5Lexer::): * html/HTML5Tokenizer.cpp: (WebCore::HTML5Tokenizer::write): 2010-05-24 Tasuku Suzuki <tasuku.suzuki@nokia.com> Reviewed by Kenneth Rohde Christiansen. [Qt] Fix compilation with QT_NO_TEMPORARYFILE https://bugs.webkit.org/show_bug.cgi?id=38324 * platform/qt/FileSystemQt.cpp: (WebCore::openTemporaryFile): 2010-05-24 Andrey Kosyakov <caseq@chromium.org> Reviewed by Yury Semikhatsky. Fixed handling of bare '/' and '?' at console prompt. https://bugs.webkit.org/show_bug.cgi?id=39585 * inspector/front-end/inspector.js: (WebInspector.documentKeyDown): 2010-05-24 Andreas Kling <andreas.kling@nokia.com> Reviewed by Sam Weinig. The 'prototype' property on generated Web IDL interfaces should be { DontDelete | ReadOnly }. Spec link: http://www.w3.org/TR/WebIDL/#interface-object https://bugs.webkit.org/show_bug.cgi?id=39436 Test: fast/dom/prototype-property.html * bindings/scripts/CodeGeneratorJS.pm: 2010-05-24 Eric Seidel <eric@webkit.org> Reviewed by Adam Barth. Add RCDATA and RAWTEXT suport to the HTML5 parser https://bugs.webkit.org/show_bug.cgi?id=39642 Adam Barth wrote half of this patch. * html/HTML5TreeBuilder.cpp: (WebCore::HTML5TreeBuilder::passTokenToLegacyParser): 2010-05-24 Tony Chang <tony@chromium.org> Not reviewed, build fix. Fix the chromium compile due to pageZoomFactor refactoring. * page/EventHandler.cpp: (WebCore::pageZoomFactor): 2010-05-24 Jer Noble <jer.noble@apple.com> Reviewed by Eric Carlson. HTML5 <video> tag performance worse than Flash https://bugs.webkit.org/show_bug.cgi?id=39577 rdar://problem/7982458 Added attachments() back to QTPixelBuffer, as they are necessary for CAImageQueue. WKCACFLayer contents()/setContents() now return/take a CFTypeRef instead of a CGImageRef, which allows a CAImageQueueRef to be set as a layer's contents. WKCAImageQueue is a simple C++ wrapper around the WebKitSystemInterface CAImageQueue functions. MediaPlayerPrivateQuickTimeVisualContext will now use a CAImageQueue to display movie frames if certain prerequisites are met (QuartzCore.dll and CoreVideo.dll version numbers must meet a certain threshold defined in MediaPlayerPrivateQuickTimeVisualContext.cpp). * WebCore.vcproj/WebCore.vcproj: * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp: * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.h: * platform/graphics/win/QTPixelBuffer.cpp: * platform/graphics/win/QTPixelBuffer.h: * platform/graphics/win/WKCACFLayer.cpp: * platform/graphics/win/WKCACFLayer.h: * platform/graphics/win/WKCAImageQueue.cpp: Added. * platform/graphics/win/WKCAImageQueue.h: Added. 2010-05-24 Adam Barth <abarth@webkit.org> Reviewed by Eric Seidel. Teach the HTML5 parser how to lex escaped script data https://bugs.webkit.org/show_bug.cgi?id=39630 * html/HTML5Lexer.cpp: (WebCore::HTMLNames::vectorEqualsString): (WebCore::HTML5Lexer::nextToken): (WebCore::HTML5Lexer::temporaryBufferIs): (WebCore::HTML5Lexer::isAppropriateEndTag): (WebCore::HTML5Lexer::maybeFlushBufferedEndTag): (WebCore::HTML5Lexer::flushBufferedEndTag): * html/HTML5Lexer.h: 2010-05-24 Eric Seidel <eric@webkit.org> Unreviewed. Trick MSVC into ignoring our unused code for the moment. Prepare HTML5TreeBuilder for addition of new HTML5 parser code https://bugs.webkit.org/show_bug.cgi?id=39623 * html/HTML5TreeBuilder.cpp: (WebCore::HTML5TreeBuilder::constructTreeFromToken): 2010-05-24 Darin Adler <darin@apple.com> Fix build on platforms with touch code enabled. * page/EventHandler.cpp: (WebCore::pageZoomFactor): Added. (WebCore::EventHandler::handleTouchEvent): Use pageZoomFactor. 2010-05-24 Darin Adler <darin@apple.com> Reviewed by Eric Seidel. Move view-related functions from Frame to FrameView https://bugs.webkit.org/show_bug.cgi?id=39366 Refactoring only so adds no new tests. * WebCore.base.exp: Updated. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::styleForDocument): Call zoom factor function on FrameView. (WebCore::CSSStyleSelector::applyProperty): Ditto. (WebCore::CSSStyleSelector::getComputedSizeFromSpecifiedSize): Ditto. * dom/Document.cpp: (WebCore::Document::elementFromPoint): Ditto. (WebCore::Document::caretRangeFromPoint): Ditto. * dom/MouseRelatedEvent.cpp: (WebCore::contentsX): Ditto. (WebCore::contentsY): Ditto. (WebCore::pageZoomFactor): Added helper function. (WebCore::MouseRelatedEvent::computePageLocation): Use helper. (WebCore::MouseRelatedEvent::receivedTarget): Ditto. * dom/Node.cpp: (WebCore::Node::dispatchMouseEvent): Call zoom factor function on FrameView. (WebCore::Node::dispatchWheelEvent): Ditto. * dom/Touch.cpp: (WebCore::contentsX): Call zoom factor function on FrameView. (WebCore::contentsY): Ditto. * html/HTMLBodyElement.cpp: (WebCore::adjustForZoom): Ditto. (WebCore::HTMLBodyElement::setScrollLeft): Ditto. (WebCore::HTMLBodyElement::setScrollTop): Ditto. * html/HTMLImageElement.cpp: (WebCore::HTMLImageElement::width): Ditto. (WebCore::HTMLImageElement::height): Ditto. * loader/ImageDocument.cpp: (WebCore::pageZoomFactor): Added helper function. (WebCore::ImageTokenizer::finish): Use helper function (WebCore::ImageDocument::scale): Ditto. (WebCore::ImageDocument::resizeImageToFit): Ditto. (WebCore::ImageDocument::imageChanged): Ditto. (WebCore::ImageDocument::restoreImageSize): Ditto. (WebCore::ImageDocument::imageFitsInWindow): Ditto. * page/DOMWindow.cpp: (WebCore::DOMWindow::innerHeight): Ditto. (WebCore::DOMWindow::innerWidth): Ditto. (WebCore::DOMWindow::scrollX): Ditto. (WebCore::DOMWindow::scrollY): Ditto. (WebCore::DOMWindow::scrollTo): Ditto. * page/DragController.cpp: (WebCore::elementUnderMouse): Ditto. * page/Frame.cpp: (WebCore::Frame::Frame): Removed code to initialize m_zoomFactor. * page/Frame.h: Moved functions to FrameView. Moved all #if to the left margin to make the style consistent. Removed empty function removeEditingStyleFromBodyElement. * page/FrameView.cpp: (WebCore::parentZoomFactor): Added helper function for constructor. (WebCore::FrameView::FrameView): Added initialization of m_zoomFactor. (WebCore::FrameView::shouldApplyTextZoom): Moved this here from Frame. (WebCore::FrameView::shouldApplyPageZoom): Ditto. (WebCore::FrameView::setZoomFactor): Ditto. * page/FrameView.h: Added members moved here from Frame. * rendering/RenderView.cpp: (WebCore::RenderView::zoomFactor): Call FrameView instead of Frame. * svg/SVGSVGElement.cpp: (WebCore::SVGSVGElement::currentScale): Ditto. (WebCore::SVGSVGElement::setCurrentScale): Ditto. 2010-05-24 Jer Noble <jer.noble@apple.com> No review; build fix only. Roll-out changes r60094, 60096-60097. * WebCore.vcproj/WebCore.vcproj: * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp: (WebCore::MediaPlayerPrivateQuickTimeVisualContext::load): (WebCore::MediaPlayerPrivateQuickTimeVisualContext::retrieveCurrentImage): (WebCore::MediaPlayerPrivateQuickTimeVisualContext::destroyLayerForMovie): * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.h: * platform/graphics/win/QTPixelBuffer.cpp: * platform/graphics/win/QTPixelBuffer.h: * platform/graphics/win/WKCACFLayer.cpp: (WebCore::WKCACFLayer::printLayer): * platform/graphics/win/WKCACFLayer.h: (WebCore::WKCACFLayer::setContents): (WebCore::WKCACFLayer::contents): (WebCore::WKCACFLayer::speed): (WebCore::WKCACFLayer::timeOffset): * platform/graphics/win/WKCAImageQueue.cpp: Removed. * platform/graphics/win/WKCAImageQueue.h: Removed. 2010-05-24 Eric Seidel <eric@webkit.org> Unreviewed. Add wtf/UnusedParam.h include to make Chromium happy. Chromium does not use a prefix header in order to support distcc3. Other ports all do. The real fix is to remove wtf/UnusedParam.h from the prefix header. * html/HTML5TreeBuilder.cpp: 2010-05-24 Jer Noble <jer.noble@apple.com> No review; build fix only. Second half of previous build fix, in which I add the include in the correct place. * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp: 2010-05-24 Jer Noble <jer.noble@apple.com> No review; build fix only. Include WKCAImageQueue.h outside the ACCELERATED_COMPOSITING check. * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp: 2010-05-24 Eric Seidel <eric@webkit.org> Reviewed by Adam Barth. Prepare HTML5TreeBuilder for addition of new HTML5 parser code https://bugs.webkit.org/show_bug.cgi?id=39623 Before we start transcribing the parser, we need a place to put it. This also cleans up HTML5 token to not convert comment and character data into AtomicStrings (which makes no sense). No functionality change, so no new tests. * html/HTML5Token.h: (WebCore::HTML5Token::beginStartTag): (WebCore::HTML5Token::beginEndTag): (WebCore::HTML5Token::beginCharacter): (WebCore::HTML5Token::beginComment): (WebCore::HTML5Token::name): (WebCore::HTML5Token::adoptDataAsStringImpl): (WebCore::HTML5Token::characters): (WebCore::HTML5Token::commentData): (WebCore::HTML5Token::clearData): * html/HTML5TreeBuilder.cpp: (WebCore::convertToOldStyle): (WebCore::HTML5TreeBuilder::constructTreeFromToken): (WebCore::HTML5TreeBuilder::processToken): * html/HTML5TreeBuilder.h: 2010-05-23 Jer Noble <jer.noble@apple.com> Reviewed by Eric Carlson. HTML5 <video> tag performance worse than Flash https://bugs.webkit.org/show_bug.cgi?id=39577 rdar://problem/7982458 Added attachments() back to QTPixelBuffer, as they are necessary for CAImageQueue. WKCACFLayer contents()/setContents() now return/take a CFTypeRef instead of a CGImageRef, which allows a CAImageQueueRef to be set as a layer's contents. WKCAImageQueue is a simple C++ wrapper around the WebKitSystemInterface CAImageQueue functions. MediaPlayerPrivateQuickTimeVisualContext will now use a CAImageQueue to display movie frames if certain prerequisites are met (QuartzCore.dll and CoreVideo.dll version numbers must meet a certain threshold defined in MediaPlayerPrivateQuickTimeVisualContext.cpp). * WebCore.vcproj/WebCore.vcproj: * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp: * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.h: * platform/graphics/win/QTPixelBuffer.cpp: * platform/graphics/win/QTPixelBuffer.h: * platform/graphics/win/WKCACFLayer.cpp: * platform/graphics/win/WKCACFLayer.h: * platform/graphics/win/WKCAImageQueue.cpp: Added. * platform/graphics/win/WKCAImageQueue.h: Added. 2010-05-24 Brady Eidson <beidson@apple.com> Reviewed by Darin Adler. Database origins aren't populated at launch (missing db in prefs sheet, possible other symptoms) <rdar://problem/8013233> and https://bugs.webkit.org/show_bug.cgi?id=39486 Currently, a Tracker needs to know it's path before origins are populated. Testing databases and related features is made very difficult with this regression, so instead of changing things in a complicated way to make this not the case, I've added an "initialize Tracker with this path" function that calls the DatabaseTracker constructor with the initial path. I checked the other platforms besides Mac and Win, and none of them seem to perform the "initialize databases if necessary" step in their init routines, so this change shouldn't effect them. No new tests. (API specific layout test in DRT is forthcoming) * WebCore.base.exp: * storage/DatabaseTracker.cpp: (WebCore::DatabaseTracker::initializeTracker): Added to create the tracker with its initial path. (WebCore::DatabaseTracker::tracker): Move the static tracker out so tracker() and initializeTracker() can share it. Add a fallback to not change behavior of platforms that don't call the new "initializeTracker()" method. (WebCore::DatabaseTracker::DatabaseTracker): Changed to take the initial path as an argument. * storage/DatabaseTracker.h: * storage/chromium/DatabaseTrackerChromium.cpp: (WebCore::DatabaseTracker::tracker): Adapt to new c'tor. (WebCore::DatabaseTracker::DatabaseTracker): Ditto. 2010-05-24 Adam Barth <abarth@webkit.org> Reviewed by Eric Seidel. Teach the HTML5 parser to lex DOCTYPEs https://bugs.webkit.org/show_bug.cgi?id=39571 * html/HTML5Lexer.cpp: (WebCore::HTML5Lexer::nextToken): * html/HTML5Lexer.h: * html/HTML5Token.h: (WebCore::HTML5Token::beginDOCTYPE): (WebCore::HTML5Token::publicIdentifier): (WebCore::HTML5Token::systemIdentifier): (WebCore::HTML5Token::setPublicIdentifierToEmptyString): (WebCore::HTML5Token::setSystemIdentifierToEmptyString): (WebCore::HTML5Token::appendToPublicIdentifier): (WebCore::HTML5Token::appendToSystemIdentifier): (WebCore::HTML5Token::DoctypeData::DoctypeData): * html/HTML5TreeBuilder.cpp: (WebCore::convertToOldStyle): (WebCore::HTML5TreeBuilder::passTokenToLegacyParser): * platform/text/SegmentedString.h: (WebCore::SegmentedString::lookAheadIgnoringCase): (WebCore::SegmentedString::advanceAndASSERTIgnoringCase): == Rolled over to ChangeLog-2010-05-24 ==