2009-07-15 Adam Langley No review: reverting previous change. Revert r45959: 2009-07-15 Dumitru Daniliuc Reviewed by Dimitri Glazkov. Adding the Win SQLite VFS implementation for Chromium. https://bugs.webkit.org/show_bug.cgi?id=26940 The Chromium side of this patch was landed in 20839, but broke the build. It was reverted in r20840. Thus, I'm reverting this side of the patch too. * WebCore.gypi: * platform/chromium/ChromiumBridge.h: * platform/sql/chromium/SQLiteFileSystemChromium.cpp: Removed. * platform/sql/chromium/SQLiteFileSystemChromiumWin.cpp: Removed. 2009-07-15 David Levin Layout test fix, reverting previous change. Reverting r45962 as it caused several layout test failures. * html/HTMLTextAreaElement.cpp: (WebCore::HTMLTextAreaElement::parseMappedAttribute): * rendering/RenderTextControlMultiLine.cpp: (WebCore::RenderTextControlMultiLine::createInnerTextStyle): 2009-06-08 Shinichiro Hamaji Reviewed by Eric Seidel. Setting white-space and word-wrap via CSS in textarea doesn't override the wrap attribute https://bugs.webkit.org/show_bug.cgi?id=26254 Make it so that setting white-space and word-wrap via CSS overrides the wrap attribute. This involves having the shadow div in the textarea inherit the CSS from its parent instead of hard-coding it in RenderTextControlMultiline. * css/html4.css: * html/HTMLTextAreaElement.cpp: (WebCore::HTMLTextAreaElement::parseMappedAttribute): * rendering/RenderTextControlMultiLine.cpp: (WebCore::RenderTextControlMultiLine::createInnerTextStyle): 2009-07-15 Dumitru Daniliuc Reviewed by Dimitri Glazkov. Adding the Win SQLite VFS implementation for Chromium. https://bugs.webkit.org/show_bug.cgi?id=26940 * platform/chromium/ChromiumBridge.h: * platform/sql/chromium: Added. * platform/sql/chromium/SQLiteFileSystemChromium.cpp: Added. * platform/sql/chromium/SQLiteFileSystemChromiumWin.cpp: Added. 2009-07-15 Jian Li Reviewed by David Levin. Bug 25151 - workers that fail to load scripts not firing error event. https://bugs.webkit.org/show_bug.cgi?id=25151 This fixes the problem that an error event is not fired when the worker script fails to load. Some reasons this may occur are an invalid URL for the worker script or a cross-origin redirect. We also moves the code to complete the URL and check its origin from Worker constructor to WorkerScriptLoader loading functions in order to move the exception throwing logic out of the scope of Worker constructor. Due to this change, we also remove the output ExceptionCode parameter in the worker constructor. Corresponding JS/V8 binding codes have been updated to reflect this change. * bindings/js/JSWorkerConstructor.cpp: (WebCore::constructWorker): * bindings/v8/custom/V8WorkerCustom.cpp: (WebCore::CALLBACK_FUNC_DECL): * workers/Worker.cpp: (WebCore::Worker::Worker): (WebCore::Worker::notifyFinished): * workers/Worker.h: (WebCore::Worker::create): * workers/WorkerContext.cpp: (WebCore::WorkerContext::importScripts): * workers/WorkerScriptLoader.cpp: (WebCore::toCrossOriginRedirectPolicy): (WebCore::WorkerScriptLoader::loadSynchronously): (WebCore::WorkerScriptLoader::loadAsynchronously): (WebCore::notifyLoadErrorTask): (WebCore::WorkerScriptLoader::createResourceRequest): (WebCore::WorkerScriptLoader::didFail): (WebCore::WorkerScriptLoader::didFailRedirectCheck): (WebCore::WorkerScriptLoader::didReceiveAuthenticationCancellation): (WebCore::WorkerScriptLoader::notifyError): * workers/WorkerScriptLoader.h: (WebCore::): (WebCore::WorkerScriptLoader::url): 2009-07-15 Dan Bernstein Reviewed by Dave Hyatt. text-shadow is not drawn for text with transparent colour https://bugs.webkit.org/show_bug.cgi?id=21374 Test: fast/text/shadow-translucent-fill.html * rendering/InlineTextBox.cpp: (WebCore::paintTextWithShadows): If the text fill color is not opaque, paint all shadows separately from the text, by casting them from clipped-out opaque text. 2009-07-15 Adam Treat Fix the Qt build. * html/HTMLAreaElement.cpp: 2009-07-15 Jeremy Orlow Reviewed by Darin Fisher. Cleanup DOM Storage dependencies. https://bugs.webkit.org/show_bug.cgi?id=27180 DOM Storage had several unnecessary (and probably unintended) dependencies. This patch replaces many includes of header files with forward declaration of classes, making some destructors explicit, and taking some factories out of the header files. This will allow things like StorageAreaSync to take a StorageAreaImpl* (as it should) rather than a StorageArea* which previously weren't possible because the dependencies were such a tangled mess. * storage/LocalStorageTask.cpp: (WebCore::LocalStorageTask::~LocalStorageTask): * storage/LocalStorageTask.h: * storage/Storage.cpp: (WebCore::Storage::~Storage): * storage/Storage.h: * storage/StorageArea.cpp: * storage/StorageArea.h: * storage/StorageAreaImpl.cpp: * storage/StorageAreaImpl.h: * storage/StorageAreaSync.cpp: (WebCore::StorageAreaSync::~StorageAreaSync): * storage/StorageAreaSync.h: * storage/StorageEvent.cpp: (WebCore::StorageEvent::create): (WebCore::StorageEvent::StorageEvent): * storage/StorageEvent.h: * storage/StorageNamespace.h: * storage/StorageNamespaceImpl.cpp: * storage/StorageNamespaceImpl.h: * storage/StorageSyncManager.cpp: (WebCore::StorageSyncManager::~StorageSyncManager): * storage/StorageSyncManager.h: 2009-07-15 Chris Marrin Reviewed by Simon Fraser. Incorrect animation when trying to duplicate effect of transform-origin https://bugs.webkit.org/show_bug.cgi?id=27310 The bug is that matrix animation is being used when animating a list of transform functions that match in the from and to states. This sometimes works. But because of the way CA does matrix animation function lists like the one shown in the testcase animate incorrectly. This fixes the bug by always doing component animation as long as the function lists match. This allows CA to animate the components and then recompose the result into the correct matrix. Test: animations/transform-origin-vs-functions.html * platform/graphics/mac/GraphicsLayerCA.mm: (WebCore::GraphicsLayerCA::animateTransform): 2009-07-15 Albert J. Wong Reviewed by David Levin. Upstream the V8NPObject and NPV8Object build changes for WebCore.gypi. Add upstreamed V8 bindings files into WebCore.gypi so they can be seen downstream https://bugs.webkit.org/show_bug.cgi?id=27274 Changes the build file for chromium. Test built the chromium tree to verify. * WebCore.gypi: 2009-07-15 Mark Rowe I like it when the code compiles. * WebCore.base.exp: 2009-07-15 Darin Adler Reviewed by Sam Weinig. Renamed parseURL to deprecatedParseURL. * bindings/js/JSAttrCustom.cpp: (WebCore::JSAttr::setValue): Renamed. * bindings/js/JSElementCustom.cpp: (WebCore::allowSettingSrcToJavascriptURL): Renamed. * bindings/js/JSHTMLFrameElementCustom.cpp: (WebCore::allowSettingJavascriptURL): Renamed. * bindings/js/JSHTMLIFrameElementCustom.cpp: (WebCore::JSHTMLIFrameElement::setSrc): Renamed. * bindings/objc/DOM.mm: (-[DOMElement _getURLAttribute:]): Renamed. * bindings/objc/DOMHTML.mm: (-[DOMHTMLDocument _createDocumentFragmentWithMarkupString:baseURLString:]): Renamed. * bindings/v8/custom/V8CustomBinding.cpp: (WebCore::allowSettingFrameSrcToJavascriptUrl): Renamed. * css/CSSHelper.cpp: (WebCore::deprecatedParseURL): Renamed. * css/CSSHelper.h: Renamed and updated comment. * html/HTMLAnchorElement.cpp: (WebCore::HTMLAnchorElement::defaultEventHandler): Renamed. (WebCore::HTMLAnchorElement::parseMappedAttribute): Renamed. * html/HTMLBaseElement.cpp: (WebCore::HTMLBaseElement::parseMappedAttribute): Renamed. * html/HTMLBodyElement.cpp: (WebCore::HTMLBodyElement::parseMappedAttribute): Renamed. * html/HTMLEmbedElement.cpp: (WebCore::HTMLEmbedElement::parseMappedAttribute): Renamed. * html/HTMLFormElement.cpp: (WebCore::HTMLFormElement::parseMappedAttribute): Renamed. * html/HTMLFrameElementBase.cpp: (WebCore::HTMLFrameElementBase::parseMappedAttribute): Renamed. * html/HTMLImageElement.cpp: (WebCore::HTMLImageElement::parseMappedAttribute): Renamed. * html/HTMLImageLoader.cpp: (WebCore::HTMLImageLoader::sourceURI): Renamed. * html/HTMLLinkElement.cpp: (WebCore::HTMLLinkElement::parseMappedAttribute): Renamed. * html/HTMLObjectElement.cpp: (WebCore::HTMLObjectElement::parseMappedAttribute): Renamed. * html/HTMLTableElement.cpp: (WebCore::HTMLTableElement::parseMappedAttribute): Renamed. * html/HTMLTablePartElement.cpp: (WebCore::HTMLTablePartElement::parseMappedAttribute): Renamed. * html/HTMLTokenizer.cpp: (WebCore::HTMLTokenizer::parseTag): Renamed. * html/PreloadScanner.cpp: (WebCore::PreloadScanner::processAttribute): Renamed. (WebCore::PreloadScanner::emitCSSRule): Renamed. * platform/chromium/ClipboardChromium.cpp: (WebCore::ClipboardChromium::declareAndWriteDragImage): Renamed. * platform/chromium/PasteboardChromium.cpp: (WebCore::Pasteboard::writeImage): Renamed. * platform/qt/ClipboardQt.cpp: (WebCore::ClipboardQt::declareAndWriteDragImage): Renamed. * platform/win/ClipboardWin.cpp: (WebCore::ClipboardWin::declareAndWriteDragImage): Renamed. * rendering/HitTestResult.cpp: (WebCore::HitTestResult::absoluteImageURL): Renamed. (WebCore::HitTestResult::absoluteMediaURL): Renamed. (WebCore::HitTestResult::absoluteLinkURL): Renamed. * svg/SVGAElement.cpp: (WebCore::SVGAElement::defaultEventHandler): Renamed. * svg/SVGImageLoader.cpp: (WebCore::SVGImageLoader::sourceURI): Renamed. * wml/WMLAElement.cpp: (WebCore::WMLAElement::defaultEventHandler): Renamed. * wml/WMLImageLoader.cpp: (WebCore::WMLImageLoader::sourceURI): Renamed. 2009-07-15 Darin Adler Reviewed by Dan Bernstein. CSSHelper.h's parseURL is a function that no one should ever call Part 1: Eliminate callers in the CSS parser. https://bugs.webkit.org/show_bug.cgi?id=26599 Test: fast/css/uri-token-parsing.html * css/CSSHelper.h: Added a comment explaining why nobody should ever call this function. A FIXME suggests a next step, which would be to rename it deprecatedParseURL. * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): Removed unneeded call to parseURL; CSSParser::text already takes care of parsing the URI token syntax, and the parseURL function does no good. (WebCore::CSSParser::parseContent): Ditto. (WebCore::CSSParser::parseFillImage): Ditto. (WebCore::CSSParser::parseFontFaceSrc): Ditto. (WebCore::CSSParser::parseBorderImage): Ditto. (WebCore::isCSSWhitespace): Added. Helper function that makes the text function easier to read. (WebCore::CSSParser::text): Tweak logic so that leading and trailing whitespace are both trimmed before removing the quote marks. Changed to use the isCSSWhitespace, isASCIIHexDigit, and toASCIIHexValue functions for clarity. * css/CSSParser.h: Removed stray "public:" in this header. * platform/text/StringImpl.cpp: (WebCore::StringImpl::substring): Optimized the case where the substring covers the entire string, so we just share the StringImpl instead of making a new one. This case came up in earlier versions of the CSS parser changes above. (WebCore::StringImpl::substringCopy): Streamlined the logic here and made it not call substring any more. Before, this was relying on the substring function always making a copy of any non-empty substring. 2009-07-15 Darin Adler Reviewed by John Sullivan. After double-clicking a word, using Shift-arrow to select behaves unpredictably https://bugs.webkit.org/show_bug.cgi?id=27177 rdar://problem/7034324 Test: editing/selection/extend-selection-after-double-click.html The bug was due to the m_lastChangeWasHorizontalExtension flag, which was not being cleared in many cases where it should have been. * editing/SelectionController.cpp: (WebCore::SelectionController::setSelection): Set m_lastChangeWasHorizontalExtension to false. This catches all sorts of cases that don't flow through the modify function. Before, the flag would reflect the last call to the modify function, which was not necessarily the last selection change. (WebCore::SelectionController::willBeModified): Rearrange function for clarity. Remove code that sets m_lastChangeWasHorizontalExtension; that is now handled elsewhere. (WebCore::SelectionController::modify): Call setLastChangeWasHorizontalExtension after setSelection when setting up a trial selection controller, since setSelection now clears that flag. Also changed both trial selection controller cases to set the flag, although it's not strictly necessary in both cases. Added code to set m_lastChangeWasHorizontalExtension when extending the selection, which used to be handled in willBeModified. Now we need to do it after the selection change. 2009-07-15 Jeremy Orlow Reviewed by Dimitri Glazkov. Need to update DOM Storage files in GYPI file. https://bugs.webkit.org/show_bug.cgi?id=27317 Need to update DOM Storage files in the GYPI file. They're pretty out of date and we're on the path towards enabling them for everyone! * WebCore.gypi: 2009-07-15 Kwang Yul Seo Reviewed by Eric Seidel. https://bugs.webkit.org/show_bug.cgi?id=26794 Make Yacc-generated parsers to use fastMalloc/fastFree. Define YYMALLOC and YYFREE to fastMalloc and fastFree respectively. * css/CSSGrammar.y: * xml/XPathGrammar.y: 2009-07-15 David Hyatt Reviewed by Adam Roben. https://bugs.webkit.org/show_bug.cgi?id=27193 Don't run in to anonymous blocks. No other browsers do this, and our implementation of run-in is effectively broken as a result. No new tests. Changed fast/runin/001.html and fast/runin/generated.html to match new behavior. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::handleRunInChild): 2009-07-15 Yuzo Fujishima Reviewed by Darin Adler. Test: fast/js/instanceof-operator.html Fix for: Bug 25205 - XMLHttpRequest instance is not an instanceof XMLHttpRequest https://bugs.webkit.org/show_bug.cgi?id=25205 In addition to for XMLHttpRequest, this also fixes for: - Audio - Image - MessageChannel - Option - WebKitCSSMatrix - WebKitPoint - Worker - XSLTProcessor * bindings/js/JSAudioConstructor.cpp: (WebCore::JSAudioConstructor::JSAudioConstructor): * bindings/js/JSAudioConstructor.h: * bindings/js/JSDOMBinding.h: (WebCore::DOMConstructorObject::createStructure): (WebCore::DOMConstructorObject::DOMConstructorObject): * bindings/js/JSImageConstructor.cpp: (WebCore::JSImageConstructor::JSImageConstructor): * bindings/js/JSImageConstructor.h: * bindings/js/JSMessageChannelConstructor.cpp: (WebCore::JSMessageChannelConstructor::JSMessageChannelConstructor): * bindings/js/JSMessageChannelConstructor.h: * bindings/js/JSOptionConstructor.cpp: (WebCore::JSOptionConstructor::JSOptionConstructor): * bindings/js/JSOptionConstructor.h: * bindings/js/JSWebKitCSSMatrixConstructor.cpp: (WebCore::JSWebKitCSSMatrixConstructor::JSWebKitCSSMatrixConstructor): * bindings/js/JSWebKitCSSMatrixConstructor.h: * bindings/js/JSWebKitPointConstructor.cpp: (WebCore::JSWebKitPointConstructor::JSWebKitPointConstructor): * bindings/js/JSWebKitPointConstructor.h: * bindings/js/JSWorkerConstructor.cpp: (WebCore::JSWorkerConstructor::JSWorkerConstructor): * bindings/js/JSWorkerConstructor.h: * bindings/js/JSXMLHttpRequestConstructor.cpp: (WebCore::JSXMLHttpRequestConstructor::JSXMLHttpRequestConstructor): * bindings/js/JSXMLHttpRequestConstructor.h: * bindings/js/JSXSLTProcessorConstructor.cpp: (WebCore::JSXSLTProcessorConstructor::JSXSLTProcessorConstructor): * bindings/js/JSXSLTProcessorConstructor.h: 2009-07-15 Kai Br�ning Reviewed by Dave Hyatt. CSS21 attribute selectors not dynamic for xml. https://bugs.webkit.org/show_bug.cgi?id=25072 Moved the relevant test in StyledElement::attributeChanged() to a new function Element::recalcStyleIfNeededAfterAttributeChanged() so it can be called from both StyledElement::attributeChanged() and Element::attributeChanged(). Refactored Element::attributeChanged() into Element::updateAfterAttributeChanged() and Element::recalcStyleIfNeededAfterAttributeChanged(), which are called separately from StyledElement::attributeChanged(). Test: fast/css/attribute-selector-dynamic.xml * dom/Element.cpp: (WebCore::Element::attributeChanged): (WebCore::Element::updateAfterAttributeChanged): (WebCore::Element::recalcStyleIfNeededAfterAttributeChanged): * dom/Element.h: * dom/StyledElement.cpp: (WebCore::StyledElement::attributeChanged): 2009-07-15 Alpha Lam Reviewed by David Levin. [V8] Layout test failures for drawImage in Canvas https://bugs.webkit.org/show_bug.cgi?id=27311 Fixing several canvas layout tests failures due to a missing return statement in CanvasRenderingContext2DDrawImage() which was accidentally removed in r45929. * bindings/v8/custom/V8CanvasRenderingContext2DCustom.cpp: 2009-07-15 Robert Hogan Reviewed by Eric Seidel. https://bugs.webkit.org/show_bug.cgi?id=26969 If the httpMethod() of the request passed to SubresourceLoader::create is not supported by the client we must expect to call didFail() while m_loader is still null. * loader/DocumentThreadableLoader.cpp: (DocumentThreadableLoader::didFail):Changed. 2009-07-15 Mark Rowe Fix the Mac build. * WebCore.base.exp: * css/MediaQueryEvaluator.cpp: * rendering/SVGRenderTreeAsText.cpp: * rendering/style/SVGRenderStyle.cpp: * svg/graphics/SVGPaintServer.cpp: 2009-07-07 Alpha Lam Reviewed by Dimitri Glazkov. [V8] drawImage method of HTMLCanvasElement to accept HTMLVideoElement as argument https://bugs.webkit.org/show_bug.cgi?id=27170 Changed CanvasRenderingContext2DDrawImage() to accept HTMLVideoElement as a parameter of drawImage() for HTMLCanvasElement. * bindings/v8/custom/V8CanvasRenderingContext2DCustom.cpp: 2009-07-15 Adam Barth Reviewed by Dimitri Glazkov. [V8] Fix isolated world constructors https://bugs.webkit.org/show_bug.cgi?id=27287 Don't enter V8Proxy::m_context before creating DOM constructors. Instead, use getWrapperContext to get the right context. After this patch, all my tests pass. I'll enable the feature downstream and land the tests. * bindings/scripts/CodeGeneratorV8.pm: * bindings/v8/V8DOMWrapper.cpp: (WebCore::V8DOMWrapper::getConstructor): (WebCore::V8DOMWrapper::lookupDOMWrapper): * bindings/v8/V8DOMWrapper.h: * bindings/v8/V8IsolatedWorld.cpp: (WebCore::V8IsolatedWorld::evaluate): * bindings/v8/V8Proxy.cpp: (WebCore::V8Proxy::createWrapperFromCache): (WebCore::V8Proxy::isContextInitialized): (WebCore::V8Proxy::disposeContextHandles): (WebCore::V8Proxy::installDOMWindow): (WebCore::V8Proxy::initContextIfNeeded): (WebCore::V8Proxy::getHiddenObjectPrototype): (WebCore::V8Proxy::installHiddenObjectPrototype): * bindings/v8/V8Proxy.h: 2009-07-15 Antonio Gomes Reviewed by Darin Adler. useless null-check statement in visible_units.cpp@logicalStartOfLine https://bugs.webkit.org/show_bug.cgi?id=27154 Simple fix. * editing/visible_units.cpp: (WebCore::logicalStartOfLine): Doubled honorEditableBoundaryAtOrAfter() call removed. 2009-07-15 Brady Eidson Reviewed by Dan Bernstein. https://bugs.webkit.org/show_bug.cgi?id=27304 WebKit should provide usage and eligibility information about the page cache. * WebCore.base.exp: * history/CachedFrame.cpp: (WebCore::CachedFrame::childFrameCount): * history/CachedFrame.h: * history/PageCache.cpp: (WebCore::PageCache::frameCount): (WebCore::PageCache::autoreleasedPageCount): * history/PageCache.h: (WebCore::PageCache::pageCount): 2009-07-15 Shinichiro Hamaji Reviewed by David Levin. Chromium's canvas forgets its context after fillText again https://bugs.webkit.org/show_bug.cgi?id=27293 No new tests because the test for this was already added in https://bugs.webkit.org/show_bug.cgi?id=26436 * platform/graphics/chromium/TransparencyWin.cpp: (WebCore::TransparencyWin::compositeTextComposite): 2009-07-14 David Hyatt Reviewed by Simon Fraser. https://bugs.webkit.org/show_bug.cgi?id=27283 Implement the new 'rem' unit from CSS3. Added some rem-* tests in fast/css. * css/CSSGrammar.y: * css/CSSParser.cpp: (WebCore::CSSParser::validUnit): (WebCore::unitFromString): (WebCore::CSSParser::parseValue): (WebCore::CSSParser::lex): * css/CSSParserValues.cpp: (WebCore::CSSParserValue::createCSSValue): * css/CSSPrimitiveValue.cpp: (WebCore::CSSPrimitiveValue::computeLengthInt): (WebCore::CSSPrimitiveValue::computeLengthIntForLength): (WebCore::CSSPrimitiveValue::computeLengthShort): (WebCore::CSSPrimitiveValue::computeLengthFloat): (WebCore::CSSPrimitiveValue::computeLengthDouble): (WebCore::CSSPrimitiveValue::cssText): (WebCore::CSSPrimitiveValue::parserValue): * css/CSSPrimitiveValue.h: (WebCore::CSSPrimitiveValue::): (WebCore::CSSPrimitiveValue::isUnitTypeLength): * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::initForStyleResolve): (WebCore::convertToLength): (WebCore::CSSStyleSelector::applyProperty): (WebCore::CSSStyleSelector::mapFillSize): (WebCore::CSSStyleSelector::mapFillXPosition): (WebCore::CSSStyleSelector::mapFillYPosition): (WebCore::CSSStyleSelector::createTransformOperations): * css/CSSStyleSelector.h: * css/MediaQueryEvaluator.cpp: (WebCore::device_heightMediaFeatureEval): (WebCore::device_widthMediaFeatureEval): (WebCore::heightMediaFeatureEval): (WebCore::widthMediaFeatureEval): * css/WebKitCSSMatrix.cpp: (WebCore::WebKitCSSMatrix::setMatrixValue): * css/tokenizer.flex: * dom/Document.cpp: (WebCore::Document::Document): * dom/Document.h: (WebCore::Document::usesRemUnits): (WebCore::Document::setUsesRemUnits): * dom/Element.cpp: (WebCore::Element::recalcStyle): * rendering/SVGRenderTreeAsText.cpp: (WebCore::writeStyle): * rendering/style/SVGRenderStyle.cpp: (WebCore::SVGRenderStyle::cssPrimitiveToLength): * svg/graphics/SVGPaintServer.cpp: (WebCore::applyStrokeStyleToContext): (WebCore::dashArrayFromRenderingStyle): * svg/graphics/SVGPaintServer.h: 2009-07-15 Dimitri Glazkov Unreviewed, build fix. Remove extraneous qualifier, accidentally added in http://trac.webkit.org/changeset/45884. * bindings/v8/V8DOMWrapper.h: Removed extraneous qualifier. 2009-07-15 Dimitri Glazkov Reviewed by Darin Fisher. [V8] Update bindings for ValiditeState patch. https://bugs.webkit.org/show_bug.cgi?id=19562 * bindings/v8/DOMObjectsInclude.h: * bindings/v8/DerivedSourcesAllInOne.cpp: * bindings/v8/V8Index.cpp: * bindings/v8/V8Index.h: 2009-07-15 Laszlo Gombos Reviewed by Simon Hausmann. [Qt] Cleanup - Remove obsolete code from the make system https://bugs.webkit.org/show_bug.cgi?id=27299 * WebCore.pro: 2009-07-15 Simon Hausmann Reviewed by Ariya Hidayat. Fix the build without media elements. * rendering/HitTestResult.cpp: (WebCore::HitTestResult::absoluteMediaURL): Add #if ENABLE(VIDEO) markers around the body of the method. 2009-07-14 Pavel Feldman Reviewed by Timothy Hatcher. WebInspector: Move storeLastActivePanel out of the ifdef ENABLE_JAVASCRIPT_DEBUGGER section in IDL; Add default panel for the first opening of the WebInspector. https://bugs.webkit.org/show_bug.cgi?id=27263 * inspector/InspectorController.cpp: (InspectorController::setWindowVisible): * inspector/InspectorController.idl: 2009-07-14 Darin Adler Try to fix Windows build. * bindings/scripts/CodeGeneratorCOM.pm: Add Reflect and ReflectURL support. 2009-07-14 Pierre d'Herbemont Reviewed by Oliver Hunt. HTMLMediaElement::supportsFullscreen() should return false https://bugs.webkit.org/show_bug.cgi?id=27284 (Reverting a part of 45875) HTMLVideoElement::supportsFullscreen() will properly do the job, and check if the backend supports fullscreen. HTMLVideoElement is the only subclass to support fullscreen (conditionnaly). HTMLAudioElement fullscreen is not supported and is a different kind of fullscreen, if it comes to be wanted. No test can be done currently given that none of the media backends support fullscreen. * html/HTMLMediaElement.cpp: * html/HTMLMediaElement.h: (WebCore::HTMLMediaElement::supportsFullscreen): 2009-07-14 Darin Adler Reviewed by Dimitri Glazkov. Next step in making DOM attribute getter/setters consistently use AtomicString https://bugs.webkit.org/show_bug.cgi?id=25425 This covers eight DOM classes, and for each one of the classes: - Changes the IDL to use the Reflect syntax for all simple cases. - Removes unused functions in the classes, mainly newly unused ones that were used for reflection before. - Removes unneeded explicitly defined destructors. - Explicitly declares destructors as virtual. - Removes unneeded includes. - Makes members protected or private rather than public where possible. - Renames "doc" to "document". - Tweaks formatting to match our latest style in a few places. - Improves some FIXME comments. Over time we'll want to do this for all HTML DOM classes. * html/HTMLAnchorElement.cpp: (WebCore::HTMLAnchorElement::HTMLAnchorElement): * html/HTMLAnchorElement.h: (WebCore::HTMLAnchorElement::endTagRequirement): (WebCore::HTMLAnchorElement::tagPriority): * html/HTMLAnchorElement.idl: * html/HTMLAppletElement.cpp: * html/HTMLAppletElement.h: * html/HTMLAppletElement.idl: * html/HTMLAreaElement.cpp: (WebCore::HTMLAreaElement::parseMappedAttribute): * html/HTMLAreaElement.h: (WebCore::HTMLAreaElement::endTagRequirement): (WebCore::HTMLAreaElement::tagPriority): * html/HTMLAreaElement.idl: * html/HTMLBRElement.cpp: (WebCore::HTMLBRElement::parseMappedAttribute): * html/HTMLBRElement.h: * html/HTMLBRElement.idl: * html/HTMLBaseElement.cpp: (WebCore::HTMLBaseElement::HTMLBaseElement): (WebCore::HTMLBaseElement::removedFromDocument): (WebCore::HTMLBaseElement::process): * html/HTMLBaseElement.h: * html/HTMLBaseElement.idl: * html/HTMLBaseFontElement.cpp: (WebCore::HTMLBaseFontElement::HTMLBaseFontElement): * html/HTMLBaseFontElement.h: (WebCore::HTMLBaseFontElement::endTagRequirement): (WebCore::HTMLBaseFontElement::tagPriority): * html/HTMLBaseFontElement.idl: * html/HTMLBlockquoteElement.cpp: (WebCore::HTMLBlockquoteElement::HTMLBlockquoteElement): * html/HTMLBlockquoteElement.h: (WebCore::HTMLBlockquoteElement::tagPriority): * html/HTMLBlockquoteElement.idl: * html/HTMLBodyElement.cpp: (WebCore::HTMLBodyElement::HTMLBodyElement): (WebCore::HTMLBodyElement::addSubresourceAttributeURLs): * html/HTMLBodyElement.h: (WebCore::HTMLBodyElement::endTagRequirement): (WebCore::HTMLBodyElement::tagPriority): * html/HTMLBodyElement.idl: Made changes as described above. * loader/FrameLoader.cpp: Removed unneeded include of HTMLAnchorElement.h. 2009-07-14 Steve Falkenburg Reorganize JavaScriptCore headers into: API: include/JavaScriptCore/ Private: include/private/JavaScriptCore/ Reviewed by Darin Adler. * WebCore.vcproj/QTMovieWin.vcproj: * WebCore.vcproj/WebCoreCommon.vsprops: * WebCore.vcproj/build-generated-files.sh: 2009-07-14 Zoltan Horvath Reviewed by Darin Adler. Change all Noncopyable inheriting visibility to public. https://bugs.webkit.org/show_bug.cgi?id=27225 Change all Noncopyable inheriting visibility to public because it is needed to the custom allocation framework (bug #20422). * bindings/js/GCController.h: * bindings/js/WorkerScriptController.h: * bindings/v8/V8DOMMap.cpp: (WebCore::): * bridge/runtime.h: * css/CSSSelector.h: * css/CSSSelectorList.h: * css/CSSStyleSelector.h: * dom/ClassNames.h: * dom/MessagePortChannel.h: * dom/XMLTokenizerLibxml2.cpp: * dom/XMLTokenizerScope.h: * editing/ReplaceSelectionCommand.cpp: * editing/SelectionController.h: * editing/TextIterator.cpp: * history/PageCache.h: * html/CanvasRenderingContext2D.h: * html/HTMLParser.h: * html/HTMLParserQuirks.h: * html/PreloadScanner.h: * loader/Cache.h: * loader/CrossOriginPreflightResultCache.h: * loader/FrameLoader.h: * loader/ProgressTracker.h: * loader/ThreadableLoader.h: * loader/appcache/ApplicationCacheGroup.h: * loader/archive/ArchiveResourceCollection.h: * loader/icon/IconDatabase.h: * loader/icon/IconLoader.h: * loader/icon/PageURLRecord.h: * loader/loader.h: * page/ContextMenuController.h: * page/EventHandler.h: * page/FrameTree.h: * page/Page.h: * page/PageGroup.h: * page/PageGroupLoadDeferrer.h: * page/mac/EventHandlerMac.mm: * platform/AutodrainedPool.h: * platform/ContextMenu.h: * platform/EventLoop.h: * platform/HostWindow.h: * platform/Pasteboard.h: * platform/PurgeableBuffer.h: * platform/RunLoopTimer.h: * platform/ThreadGlobalData.h: * platform/ThreadTimers.h: * platform/Timer.h: * platform/TreeShared.h: * platform/graphics/FontData.h: * platform/graphics/GlyphWidthMap.h: * platform/graphics/GraphicsContext.h: * platform/graphics/ImageBuffer.h: * platform/graphics/ImageSource.h: * platform/graphics/MediaPlayer.h: * platform/graphics/skia/GraphicsContextPlatformPrivate.h: * platform/graphics/skia/PlatformContextSkia.h: * platform/graphics/win/QTMovieWin.cpp: * platform/mac/LocalCurrentGraphicsContext.h: * platform/network/FormDataBuilder.h: * platform/network/ResourceHandleInternal.h: * platform/network/soup/ResourceHandleSoup.cpp: * platform/text/StringBuffer.h: * platform/text/TextCodec.h: * platform/win/WindowMessageBroadcaster.h: * rendering/CounterNode.h: * rendering/LayoutState.h: * rendering/RenderFrameSet.h: * rendering/RenderView.h: * rendering/TransformState.h: * svg/SVGAnimatedProperty.h: * svg/SynchronizableTypeWrapper.h: * workers/WorkerMessagingProxy.h: * workers/WorkerRunLoop.cpp: * xml/XPathExpressionNode.h: * xml/XPathParser.h: * xml/XPathPredicate.h: * xml/XPathStep.h: 2009-07-14 Darin Fisher Reviewed by Darin Adler. Fails to save document state when navigating away from a page with a reference fragment. https://bugs.webkit.org/show_bug.cgi?id=27281 Test: fast/history/saves-state-after-fragment-nav.html * history/HistoryItem.cpp: (WebCore::HistoryItem::isCurrentDocument): Use equalIgnoringRef to compare URLs. 2009-07-14 Joseph Pecoraro Reviewed by Sam Weinig. Inspector: Remove Unintended Global Variables https://bugs.webkit.org/show_bug.cgi?id=27203 * inspector/front-end/Console.js: (WebInspector.Console.prototype._ensureCommandLineAPIInstalled): * inspector/front-end/DatabasesPanel.js: (WebInspector.DatabasesPanel.prototype.dataGridForDOMStorage): * inspector/front-end/ObjectPropertiesSection.js: (WebInspector.ObjectPropertyTreeElement.prototype.update): * inspector/front-end/inspector.js: (WebInspector.animateStyle): 2009-07-14 Michelangelo De Simone Reviewed by Adele Peterson. https://bugs.webkit.org/show_bug.cgi?id=19562 Added build stuff and stub for the ValidityState class, part of HTML5 section Forms: http://www.whatwg.org/specs/web-apps/current-work/multipage/forms.html#validitystate Test: fast/forms/ValidityState-001.html * DerivedSources.cpp: Inclusion of ValidityState files * DerivedSources.make: ditto * GNUmakefile.am: ditto * WebCore.gypi: ditto * WebCore.pro: ditto * WebCore.vcproj/WebCore.vcproj: ditto * WebCore.xcodeproj/project.pbxproj: ditto * WebCoreSources.bkl: ditto * html/HTMLButtonElement.idl: validity attribute * html/HTMLFieldSetElement.idl: ditto * html/HTMLFormControlElement.cpp: (WebCore::HTMLFormControlElement::validity): ValidityState getter * html/HTMLFormControlElement.h: ditto * html/HTMLInputElement.idl: validity attribute * html/HTMLSelectElement.idl: ditto * html/HTMLTextAreaElement.idl: ditto * html/ValidityState.cpp: Added. (WebCore::ValidityState::ValidityState): (WebCore::ValidityState::valid): validation flag * html/ValidityState.h: Added. (WebCore::ValidityState::create): validation flag (WebCore::ValidityState::control): ditto (WebCore::ValidityState::valueMissing): ditto (WebCore::ValidityState::typeMismatch): ditto (WebCore::ValidityState::patternMismatch): ditto (WebCore::ValidityState::tooLong): ditto (WebCore::ValidityState::rangeUnderflow): ditto (WebCore::ValidityState::rangeOverflow): ditto (WebCore::ValidityState::stepMismatch): ditto (WebCore::ValidityState::customError): ditto * html/ValidityState.idl: Added. 2009-07-14 Ryosuke Niwa Reviewed by Eric Seidel. Outdenting a line inside a blockquote tag does nothing https://bugs.webkit.org/show_bug.cgi?id=25316 The bug was caused by the code checking whether the blockquote is created by WebKit or not. We simply remove this code to be consistent with Firefox and Internet Explorer. Also, enclosingBlockFlow == enclosingNode in outdentParagraph isn't a sufficient condition to insert the placeholder before the enclosingNode because there could be contents before the current paragraph. Instead, we should split the enclosingNode (which is a blockquote) at the starting position of outdentation. It turned out that this solves the bug 25315 also: https://bugs.webkit.org/show_bug.cgi?id=25315 Test: editing/execCommand/outdent-regular-blockquote.html * editing/IndentOutdentCommand.cpp: (WebCore::isIndentBlockquote): no longer checks whether a blockquote is created by WebKit or not. (WebCore::IndentOutdentCommand::outdentParagraph): takes care of the case enclosingBlockFlow == enclosingNode 2009-07-14 Adam Barth Reviewed by Dimitri Glazkov. [V8] Fix isolated world wrappers for Node prototypes https://bugs.webkit.org/show_bug.cgi?id=27277 This change does two things: 1) We bypass the wrapper cache in the isolated world. This is because the wrapper template cache has prototypes that lead to the main world. We can add a template cache for the isolated world if performance warrants. 2) We introduce a smarter way to grab the wrapper context for a frame that is aware that proxy <-> context do not stand in one-to-one correspondence. This generalizes our solution for the node wrapper case to prototypes. The net result is that Node wrappers get the right prototypes. As before, tests to follow. * bindings/v8/V8DOMWrapper.cpp: (WebCore::V8DOMWrapper::setHiddenWindowReference): (WebCore::V8DOMWrapper::instantiateV8Object): (WebCore::V8DOMWrapper::convertNodeToV8Object): (WebCore::V8DOMWrapper::convertWindowToV8Object): (WebCore::V8DOMWrapper::getWrapperContext): * bindings/v8/V8DOMWrapper.h: 2009-07-14 Adam Barth Reviewed by Dimitri Glazkov. [V8] Fix isolated world wrappers for Nodes https://bugs.webkit.org/show_bug.cgi?id=27271 Previously, we keepy a pointer to the DOMMap on V8Proxy, but this caused us to miss the branch in V8DOMMap.cpp for isolated worlds. I have tests, but I can't land them until I get this feature under control. * bindings/v8/V8DOMWrapper.cpp: (WebCore::V8DOMWrapper::convertNodeToV8Object): * bindings/v8/V8Proxy.h: (WebCore::V8Proxy::V8Proxy): 2009-07-14 Adam Barth Reviewed by Dimitri Glazkov. [V8] Fix isolated world crash on getting window.location https://bugs.webkit.org/show_bug.cgi?id=27268 I have a test for this locally, but it requires a compile-time hack to run. Once I get the feature's stability under control, we can turn the feature on and add the tests. * bindings/v8/V8DOMWrapper.cpp: (WebCore::V8DOMWrapper::setHiddenWindowReference): * bindings/v8/V8IsolatedWorld.h: (WebCore::V8IsolatedWorld::context): 2009-07-14 Brent Fulgham Correct failing tests after r45875. The original patch did not test the m_player member for null, causing crashes. This will happen fairly frequently in real use. Was this original patch ever tested? https://bugs.webkit.org/show_bug.cgi?id=27246 Test via existing media tests. * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::supportsFullscreen): Check for null pointer. (WebCore::HTMLMediaElement::supportsSave): Check for null pointer. 2009-07-14 Avi Drissman Reviewed by Darin Fisher. Explicitly mark the HTML generated for the Mac as being UTF-8 encoded. The Windows clipboard format is explicitly documented as being UTF-8, and all Linux apps assume UTF-8. On the Mac, though, unless otherwise indicated, Windows-1252 is assumed, which is wrong. Bug: https://bugs.webkit.org/show_bug.cgi?id=27262 No new tests. * platform/chromium/ClipboardChromium.cpp: (WebCore::ClipboardChromium::writeRange): * platform/chromium/PasteboardChromium.cpp: (WebCore::Pasteboard::writeSelection): 2009-07-14 Albert J. Wong Reviewed by Dimitri Glazkov. Upstream V8NPObject.h and V8NPObject.cpp. https://bugs.webkit.org/show_bug.cgi?id=27103 This just upstreams the files from the chromium code base. Only minor changes to formatting and similar were done, so no testing is required because nothing really changed. Code verified to compile. * bindings/v8/ScriptController.cpp: (WebCore::ScriptController::bindToWindowObject): (WebCore::ScriptController::createScriptInstanceForWidget): * bindings/v8/V8NPObject.cpp: Added. (npObjectInvokeImpl): (npObjectMethodHandler): (npObjectInvokeDefaultHandler): (weakTemplateCallback): (npObjectGetProperty): (npObjectNamedPropertyGetter): (npObjectIndexedPropertyGetter): (npObjectGetNamedProperty): (npObjectGetIndexedProperty): (npObjectSetProperty): (npObjectNamedPropertySetter): (npObjectIndexedPropertySetter): (npObjectSetNamedProperty): (npObjectSetIndexedProperty): (weakNPObjectCallback): (createV8ObjectForNPObject): (forgetV8ObjectForNPObject): * bindings/v8/V8NPObject.h: Added. * bindings/v8/custom/V8HTMLPlugInElementCustom.cpp: (WebCore::NAMED_PROPERTY_GETTER): (WebCore::NAMED_PROPERTY_SETTER): (WebCore::CALLBACK_FUNC_DECL): (WebCore::INDEXED_PROPERTY_GETTER): (WebCore::INDEXED_PROPERTY_SETTER): 2009-07-14 Albert J. Wong Reviewed by Darin Adler. Add HTMLMediaElement::supportSave() and a HitTestResult::absoluteMediaURL() functions https://bugs.webkit.org/show_bug.cgi?id=27246 Added an implementation of supportsSave() into HTMLMediaElement that delegates to MediaPlayerPrivateImpl so that the media engine is able to signal whether or not a media source supports saving. Also added a function to HitTestResult that allows for retrieval of the currentSrc associated with the "hit" media element. These functions are just pipeing with no visible UI change so there are no related layout test changes. * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::supportsFullscreen): (WebCore::HTMLMediaElement::supportsSave): * html/HTMLMediaElement.h: * platform/graphics/MediaPlayer.cpp: (WebCore::MediaPlayer::supportsSave): * platform/graphics/MediaPlayer.h: * platform/graphics/MediaPlayerPrivate.h: (WebCore::MediaPlayerPrivateInterface::supportsFullscreen): (WebCore::MediaPlayerPrivateInterface::supportsSave): * rendering/HitTestResult.cpp: (WebCore::HitTestResult::altDisplayString): (WebCore::HitTestResult::absoluteMediaURL): * rendering/HitTestResult.h: 2009-07-14 Dimitri Glazkov Reviewed by Adam Barth. [V8] Implement Reflect and ReflectURL attribute support. https://bugs.webkit.org/show_bug.cgi?id=27273 * bindings/scripts/CodeGeneratorV8.pm: Added support for Reflect and ReflectURL attributes. 2009-07-14 Dmitry Titov Reviewed by Darin Adler. https://bugs.webkit.org/show_bug.cgi?id=27266 Add hasCurrentPoint() to WebCore::Path. This fixes Skia-based Chromium regression caused by the fix for https://bugs.webkit.org/show_bug.cgi?id=27187. For Skia, the new method always returns 'true', pending actual implementation. This means Chromium still will differ from Gecko behavior, but at least its Canvas will not be completely broken. Existing Canvas Layout Tests should pass in Chromium after this change. * html/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::lineTo): insteand of Path::isEmpty() test for hasCurrentPoint(). (WebCore::CanvasRenderingContext2D::quadraticCurveTo): ditto. (WebCore::CanvasRenderingContext2D::bezierCurveTo): ditto. * platform/graphics/Path.h: * platform/graphics/cairo/PathCairo.cpp: (WebCore::Path::hasCurrentPoint): * platform/graphics/cg/PathCG.cpp: (WebCore::Path::isEmpty): (WebCore::Path::hasCurrentPoint): * platform/graphics/qt/PathQt.cpp: (WebCore::Path::hasCurrentPoint): * platform/graphics/skia/PathSkia.cpp: (WebCore::Path::hasCurrentPoint): * platform/graphics/wx/PathWx.cpp: (WebCore::Path::hasCurrentPoint): All these files add a Path::hasCurrentPoint() for various platforms. 2009-07-14 Nate Chapin Reviewed by Sam Weinig. Upstream RGBColor from src.chromium.org. https://bugs.webkit.org/show_bug.cgi?id=27133 * WebCore.gypi: Add RGBColor * css/RGBColor.cpp: Added. (WebCore::RGBColor::create): (WebCore::RGBColor::red): (WebCore::RGBColor::green): (WebCore::RGBColor::blue): * css/RGBColor.h: Added. (WebCore::RGBColor::RGBColor): 2009-07-10 Matt Perry Reviewed by Darin Fisher. [V8] Rename the didCreate/DestroyScriptContext calls to make it clear that that those refer to the frame's contxt. Add another similar call for when creating contexts via evaluateInNewContext. https://bugs.webkit.org/show_bug.cgi?id=27104 * bindings/v8/V8Proxy.cpp: (WebCore::V8Proxy::evaluateInNewContext): (WebCore::V8Proxy::disposeContextHandles): (WebCore::V8Proxy::initContextIfNeeded): * loader/EmptyClients.h: (WebCore::EmptyFrameLoaderClient::didCreateScriptContextForFrame): (WebCore::EmptyFrameLoaderClient::didDestroyScriptContextForFrame): (WebCore::EmptyFrameLoaderClient::didCreateIsolatedScriptContext): * loader/FrameLoaderClient.h: 2009-07-14 Brent Fulgham Revert http://trac.webkit.org/changeset/45864 after breaking of Windows build. * storage/LocalStorageTask.cpp: * storage/LocalStorageTask.h: * storage/Storage.cpp: * storage/Storage.h: * storage/StorageArea.cpp: * storage/StorageArea.h: * storage/StorageAreaImpl.cpp: * storage/StorageAreaImpl.h: * storage/StorageAreaSync.cpp: * storage/StorageAreaSync.h: * storage/StorageEvent.cpp: * storage/StorageEvent.h: (WebCore::StorageEvent::create): (WebCore::StorageEvent::StorageEvent): * storage/StorageNamespace.h: * storage/StorageNamespaceImpl.cpp: * storage/StorageNamespaceImpl.h: * storage/StorageSyncManager.cpp: * storage/StorageSyncManager.h: 2009-07-11 Jeremy Orlow Reviewed by Darin Adler. Cleanup DOM Storage dependencies. https://bugs.webkit.org/show_bug.cgi?id=27180 DOM Storage had several unnecessary (and probably unintended) dependencies. This patch replaces many includes of header files with forward declaration of classes, making some destructors explicit, and taking some factories out of the header files. This will allow things like StorageAreaSync to take a StorageAreaImpl* (as it should) rather than a StorageArea* which previously weren't possible because the dependencies were such a tangled mess. * storage/LocalStorageTask.cpp: (WebCore::LocalStorageTask::~LocalStorageTask): * storage/LocalStorageTask.h: * storage/Storage.cpp: (WebCore::Storage::~Storage): * storage/Storage.h: * storage/StorageArea.cpp: * storage/StorageArea.h: * storage/StorageAreaImpl.cpp: * storage/StorageAreaImpl.h: * storage/StorageAreaSync.cpp: (WebCore::StorageAreaSync::~StorageAreaSync): * storage/StorageAreaSync.h: * storage/StorageEvent.cpp: (WebCore::StorageEvent::create): (WebCore::StorageEvent::StorageEvent): * storage/StorageEvent.h: * storage/StorageNamespace.h: * storage/StorageNamespaceImpl.cpp: * storage/StorageNamespaceImpl.h: * storage/StorageSyncManager.cpp: (WebCore::StorageSyncManager::~StorageSyncManager): * storage/StorageSyncManager.h: 2009-07-14 Adam Treat Reviewed by David Hyatt. https://bugs.webkit.org/show_bug.cgi?id=26983 Check to make sure the view is attached to a frame() in the visibleContentsResized() method as it can be triggered before the view is attached by Frame::createView(...) setting various values such as setScrollBarModes(...) for example. An ASSERT is triggered when a view is layout before being attached to a frame(). * page/FrameView.cpp: (WebCore::FrameView::visibleContentsResized): * page/FrameView.h: 2009-07-14 Pavel Feldman Reviewed by Timothy Hatcher. WebInspector: show last opened panel when invoking inspector. https://bugs.webkit.org/show_bug.cgi?id=27263 * inspector/InspectorController.cpp: (WebCore::InspectorController::InspectorController): (WebCore::InspectorController::setWindowVisible): (WebCore::InspectorController::storeLastActivePanel): (WebCore::InspectorController::specialPanelForJSName): * inspector/InspectorController.h: (WebCore::InspectorController::Setting::Setting): * inspector/InspectorController.idl: * inspector/front-end/inspector.js: (WebInspector.set currentPanel): (WebInspector.loaded): 2009-07-14 Anton Muhin Reviewed by Dimitri Glazkov. Speed up access to NodeList length. https://bugs.webkit.org/show_bug.cgi?id=27264 That's a minimal alternation of the code. * bindings/v8/custom/V8NodeListCustom.cpp: (WebCore::NAMED_PROPERTY_GETTER): 1) use AtomicString for comparison, 2) use v8::Integer::New instead of v8::Number::New. 2009-07-14 Anton Muhin Reviewed by Dimitri Glazkov. Do not do unnecessary conversions from v8::Handle to v8::Handle and accompanying changes. https://bugs.webkit.org/show_bug.cgi?id=26953 Three things: 1) do not cast from v8::Value to v8::Object if unnecessary---casts are cheap, but are not free (they check for emptiness of handle); 2) inline conversion from wrapper to node; 3) simplify case to an ASSERT. This is just a refactoring, so no new tests are needed. * bindings/scripts/CodeGeneratorV8.pm: * bindings/v8/V8Proxy.cpp: (WebCore::V8Proxy::evaluateInNewContext): (WebCore::V8Proxy::convertToSVGPODTypeImpl): * bindings/v8/V8Proxy.h: (WebCore::V8Proxy::convertDOMWrapperToNative): (WebCore::V8Proxy::convertToNativeObject): (WebCore::V8Proxy::convertToNativeEvent): * bindings/v8/custom/V8CanvasRenderingContext2DCustom.cpp: (WebCore::toCanvasStyle): (WebCore::CALLBACK_FUNC_DECL): * bindings/v8/custom/V8CustomBinding.cpp: (WebCore::V8Custom::GetTargetFrame): * bindings/v8/custom/V8DOMWindowCustom.cpp: (WebCore::CALLBACK_FUNC_DECL): (WebCore::V8Custom::ClearTimeoutImpl): (WebCore::NAMED_ACCESS_CHECK): (WebCore::INDEXED_ACCESS_CHECK): * bindings/v8/custom/V8DocumentCustom.cpp: (WebCore::CALLBACK_FUNC_DECL): * bindings/v8/custom/V8LocationCustom.cpp: (WebCore::CALLBACK_FUNC_DECL): 2009-07-14 Darin Adler Reviewed by Dan Bernstein. Straight quotes should match fancy quotes in in-page search https://bugs.webkit.org/show_bug.cgi?id=27217 Tests: fast/text/find-quotes.html * editing/TextIterator.cpp: (WebCore::foldQuoteMark): Added. (WebCore::foldQuoteMarks): Added. (WebCore::SearchBuffer::SearchBuffer): Call foldQuoteMarks on the target string. (WebCore::SearchBuffer::append): Call foldQuoteMarks on characters as they are added to the search buffer. * platform/text/CharacterNames.h: Added more quotation mark character names. Sorted character names with the sort tool. 2009-07-13 Pavel Feldman Reviewed by Timothy Hatcher. WebInspector: handle debugger shortcuts while on source frame or on script file selector. https://bugs.webkit.org/show_bug.cgi?id=27224 * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel): * inspector/front-end/SourceFrame.js: (WebInspector.SourceFrame.prototype._loaded): 2009-07-13 Sam Weinig Reviewed by Darin Adler. Use standard HashCountedSet instead of a hand rolled one in HTMLDocument. * html/HTMLDocument.cpp: (WebCore::addItemToMap): (WebCore::removeItemFromMap): * html/HTMLDocument.h: 2009-07-13 Erik Arvidsson Reviewed by Darin Adler and Maciej Stachowiak. Implement HTML5 draggable https://bugs.webkit.org/show_bug.cgi?id=26262 This adds support for the HTML5 draggable attribute and its DOM binding. It maps the draggable property to the CSS properties -webkit-user-drag and -webkit-user-select respectively. Spec: http://www.whatwg.org/specs/web-apps/current-work/multipage/editing.html#the-draggable-attribute Test: fast/html/draggable.html * css/html.css: * html/HTMLAnchorElement.cpp: (WebCore::HTMLAnchorElement::draggable): * html/HTMLAnchorElement.h: * html/HTMLAttributeNames.in: * html/HTMLElement.cpp: (WebCore::HTMLElement::draggable): (WebCore::HTMLElement::setDraggable): * html/HTMLElement.h: * html/HTMLElement.idl: * html/HTMLImageElement.cpp: (WebCore::HTMLImageElement::draggable): * html/HTMLImageElement.h: 2009-07-13 Simon Fraser Reviewed by Dan Bernstein. Image rendered as layer contents looks different from image rendered via CG. Fix a visible color profile difference between between images rendered via Core Graphics and those rendered via a compositing layer, by assigning the GenericRGB profile to untagged images (which come through as having the DeviceRGB profile) when they are set as layer contents. Test: compositing/color-matching/image-color-matching.html * platform/graphics/mac/GraphicsLayerCA.mm: (WebCore::GraphicsLayerCA::setContentsToImage): 2009-07-13 Darin Adler Reviewed by Oliver Hunt. https://bugs.webkit.org/show_bug.cgi?id=27220 Assertion failure in createSearcher() (usearch_open() status is U_USING_DEFAULT_WARNING) * editing/TextIterator.cpp: (WebCore::createSearcher): Add U_USING_DEFAULT_WARNING as a possible status code in the assertion. Affects only the assertion. 2009-07-13 Alexey Proskuryakov Reviewed by Darin Adler. https://bugs.webkit.org/show_bug.cgi?id=26925 URL Fragment Breaks Application Cache Loads Test: http/tests/appcache/main-resource-hash.html * loader/appcache/ApplicationCache.cpp: (WebCore::ApplicationCache::resourceForURL): (WebCore::ApplicationCache::resourceForRequest): * loader/appcache/ApplicationCacheGroup.cpp: (WebCore::ApplicationCacheGroup::cacheForMainRequest): (WebCore::ApplicationCacheGroup::fallbackCacheForMainRequest): (WebCore::ApplicationCacheGroup::selectCache): (WebCore::ApplicationCacheGroup::finishedLoadingMainResource): (WebCore::ApplicationCacheGroup::didReceiveResponse): (WebCore::ApplicationCacheGroup::didFail): (WebCore::ApplicationCacheGroup::addEntry): Remove URL fragment at appcache code borders. * loader/appcache/ApplicationCacheResource.h: (WebCore::ApplicationCacheResource::create): * loader/appcache/ApplicationCacheStorage.cpp: (WebCore::ApplicationCacheStorage::findOrCreateCacheGroup): (WebCore::ApplicationCacheStorage::cacheGroupForURL): (WebCore::ApplicationCacheStorage::fallbackCacheGroupForURL): Assert that there is no URL fragment in URL at key points in appcache code. 2009-07-13 Darin Adler Reviewed by Dan Bernstein. https://bugs.webkit.org/show_bug.cgi?id=27166 rdar://problem/7015857 Find for strings composed entirely of spaces doesn't work Test: fast/text/find-spaces.html * editing/TextIterator.cpp: (WebCore::findPlainText): Removed unneeded special case. The empty string case already works correctly. 2009-07-13 Anders Carlsson Reviewed by Kevin Decker. Remove NPPVpluginPrivateModeBool, it was removed from the spec. * bridge/npapi.h: 2009-07-13 Feng Qian Reviewed by Dimitri Glazkov. Fix for https://bugs.webkit.org/show_bug.cgi?id=27237 Make V8DOMMap.h compiling with gcc option -Werror=non=virtual-dtor. * bindings/v8/V8DOMMap.h: (WebCore::WeakReferenceMap::WeakReferenceMap): (WebCore::WeakReferenceMap::~WeakReferenceMap): 2009-07-13 Dimitri Glazkov Reviewed by Darin Fisher. Remove an accidental add of bidi.(cpp|h) to WebCore.gypi. * WebCore.gypi: Removed bidi.cpp and bidi.h 2009-07-13 Dimitri Glazkov Reviewed by Darin Fisher. Update WebCore.gyp in preparation to hooking it up. * WebCore.gypi: Added files that were mid-stream while switching over. 2009-07-13 Dmitry Titov Not reviewed, another small fix for Chromium build. * bindings/v8/ScriptController.cpp: (WebCore::ScriptController::evaluate): 2009-07-13 Dmitry Titov Not reviewed, fix Chromium build bustage. * bindings/v8/ScriptController.cpp: (WebCore::ScriptController::evaluate): * bindings/v8/V8Proxy.cpp: (WebCore::JavaScriptConsoleMessage::addToPage): * bindings/v8/WorkerContextExecutionProxy.cpp: (WebCore::handleConsoleMessage): 2009-07-13 Sam Weinig Reviewed by Darin Adler. Fix for https://bugs.webkit.org/show_bug.cgi?id=27234 Add null page check in HTMLDocument::hasFocus. Test: fast/dom/HTMLDocument/hasFocus-frameless-crash.html * html/HTMLDocument.cpp: (WebCore::HTMLDocument::hasFocus): Add page null check. (WebCore::HTMLDocument::createTokenizer): Cleanup page null check. 2009-07-13 Dan Bernstein Reviewed by Darin Adler. Disable continuous spell checking in the inspector https://bugs.webkit.org/show_bug.cgi?id=27131 * inspector/front-end/inspector.html: Added spellcheck="false" to the main-panels and console-prompt containers. 2009-07-13 Adam Langley Reviewed by Eric Seidel. Chromium Linux: fix assertion when rendering google.com.kh https://bugs.webkit.org/show_bug.cgi?id=26924 Some shapers (i.e. Khmer) will produce cluster logs which report that /no/ code points contributed to certain glyphs. Because of this, we take any code point which contributed to the glyph in question, or any subsequent glyph. If we run off the end, then we take the last code point. Added LayoutTests/fast/text/international/khmar-selection.html * platform/graphics/chromium/FontLinux.cpp: (WebCore::Font::offsetForPositionForComplexText): 2009-07-13 Dan Bernstein Reviewed by Darin Adler. spellcheck="false" is ignored * editing/Editor.cpp: (WebCore::markMisspellingsOrBadGrammar): Moved code to check the spellcheck attribute from here... (WebCore::Editor::spellCheckingEnabledInFocusedNode): ...to here. (WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges): Bail out if spell chcking is disabled by the spellcheck attribute. * editing/Editor.h: 2009-07-13 Brent Fulgham Reviewed by Adam Roben. Add new configuration flag for redistributable Windows build. https://bugs.webkit.org/show_bug.cgi=27087 * WebCore.vcproj/WebCore.vcproj: Add new WinCairo.vsprops to Debug_Cairo and Release_Cairo builds. * config.h: Check for presence of WIN_CAIRO and select appropriate configuration. Defaults to standard Apple build. 2009-07-13 Peter Kasting https://bugs.webkit.org/show_bug.cgi?id=19562 Back out previous patch for this bug (too many problems). * DerivedSources.cpp: * DerivedSources.make: * GNUmakefile.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * WebCoreSources.bkl: * html/HTMLButtonElement.idl: * html/HTMLFieldSetElement.idl: * html/HTMLFormControlElement.cpp: * html/HTMLFormControlElement.h: (WebCore::HTMLFormControlElement::form): * html/HTMLInputElement.idl: * html/HTMLSelectElement.idl: * html/HTMLTextAreaElement.idl: * html/ValidityState.cpp: Removed. * html/ValidityState.h: Removed. * html/ValidityState.idl: Removed. 2009-07-13 Nate Chapin Reviewed by Dimitri Glazkov. Add HTMLAllCollection to WebCore.gypi. https://bugs.webkit.org/show_bug.cgi?id=27223 * WebCore.gypi: Add HTMLAllCollection. 2009-07-13 Dimitri Glazkov Reviewed by Darin Fisher. [V8] Add a missing check for constructor call in WebKitCSSMatrixConstructor. https://bugs.webkit.org/show_bug.cgi?id=27218 Test: fast/css/matrix-as-function-crash.html * bindings/v8/custom/V8WebKitCSSMatrixConstructor.cpp: (WebCore::CALLBACK_FUNC_DECL): Added a check for constructor call. 2009-07-13 Gustavo Noronha Silva Unreviewed make dist build fix. * GNUmakefile.am: 2009-07-13 Cédric Luthi Reviewed by Tor Arne Vestbø. Fix NPWindow clip rect in PluginViewMac The rect should be in window-coordinates. This bug can be observed with Flash 10 here: http://www.permadi.com/tutorial/cursorTracker/ * plugins/mac/PluginViewMac.cpp: 2009-07-13 Simon Hausmann Reviewed by Ariya Hidayat. Fix Qt implementation of WebCore::directoryName to return the absolute directory name instead of the base file name. * platform/qt/FileSystemQt.cpp: (WebCore::directoryName): 2009-07-13 Simon Hausmann Reviewed by Ariya Hidayat. Fix WebCore::Path::isEmpty() for the Qt port to return true if there is no element in the path. QPainterPath::isEmpty() returns also true if there is one single MoveTo element inside, which makes sense but doesn't patch Webcore's is-empty definition. * platform/graphics/qt/PathQt.cpp: (WebCore::Path::isEmpty): Use elementCount() == 0. 2009-07-13 Albert J. Wong Reviewed by Dimitri Glazkov. Upstream fixes to NPV8Object.cpp that make ~30 layout tests pass. https://bugs.webkit.org/show_bug.cgi?id=27127 There were a number of bugs introduced during the last upstreaming effort that broke around 30 layout tests. This fixes those bugs. It also has compile fixes to match the recent cutting apart of V8Proxy. * bindings/v8/NPV8Object.cpp: (freeV8NPObject): (npCreateV8ScriptObject): (NPN_Invoke): (NPN_InvokeDefault): (NPN_EvaluateHelper): (NPN_SetException): (NPN_Construct): 2009-07-13 Mads Ager Reviewed by Adam Barth. Fix memory leak in the V8 binding layer. https://bugs.webkit.org/show_bug.cgi?id=27163 Reinitializing the context is not necessary when clearing the proxy for navigation and it will lead us to hold on to an empty context for each frame. Test for empty context instead of empty global object handle when updating the document for a context. * bindings/v8/V8Proxy.cpp: (WebCore::V8Proxy::clearForNavigation): (WebCore::V8Proxy::updateDocument): 2009-07-13 John Gregg Reviewed by David Levin. Correct the logic to determine if a V8 callback returns a value. https://bugs.webkit.org/show_bug.cgi?id=27155 * bindings/v8/custom/V8CustomVoidCallback.cpp: (WebCore::invokeCallback): - Don't crash if result.IsEmpty(). 2009-07-13 Drew Wilson Reviewed by David Levin. Add ENABLE(SHARED_WORKERS) flag and define SharedWorker APIs https://bugs.webkit.org/show_bug.cgi?id=26932 Initial IDL definition and bindings for SharedWorkers. * Configurations/FeatureDefines.xcconfig: Added new files for SharedWorker support. * DerivedSources.make: Added new files for SharedWorker support. * GNUmakefile.am: Added new files for SharedWorker support. * WebCore.gypi: Added new files for SharedWorker support. * WebCore.pro: Added new files for SharedWorker support. * WebCore.xcodeproj/project.pbxproj: Added new files for SharedWorker support. * bindings/js/JSAbstractWorkerCustom.cpp: Added. (WebCore::JSAbstractWorker::mark): Custom mark handler that marks the event listeners. (WebCore::JSAbstractWorker::addEventListener): (WebCore::JSAbstractWorker::removeEventListener): (WebCore::JSAbstractWorker::toJS): Custom toJS handler which differentiates between various subclasses. * bindings/js/JSDOMWindowCustom.cpp: (WebCore::JSDOMWindow::sharedWorker): SharedWorker constructor (only enabled when SHARED_WORKERS is enabled). * bindings/js/JSEventTarget.cpp: (WebCore::toJS): (WebCore::toEventTarget): Added support for converting to/from SharedWorkers. * bindings/js/JSSharedWorkerConstructor.cpp: Added. (WebCore::JSSharedWorkerConstructor::JSSharedWorkerConstructor): (WebCore::constructSharedWorker): (WebCore::JSSharedWorkerConstructor::getConstructData): * bindings/js/JSSharedWorkerConstructor.h: Added. (WebCore::JSSharedWorkerConstructor::classInfo): * bindings/js/JSSharedWorkerCustom.cpp: Added. (WebCore::JSSharedWorker::mark): Custom mark function that marks the internal MessagePort. * bindings/v8/DOMObjectsInclude.h: Updated to include new header files. * bindings/v8/V8Index.cpp: * bindings/v8/V8Index.h: * bindings/v8/custom/V8AbstractWorkerCustom.cpp: Added. (WebCore::getEventListener): (WebCore::ACCESSOR_GETTER): (WebCore::ACCESSOR_SETTER): (WebCore::CALLBACK_FUNC_DECL): V8 handlers for add/removeEventListener(). * bindings/v8/custom/V8CustomBinding.h: * bindings/v8/custom/V8SharedWorkerCustom.cpp: Added. (WebCore::CALLBACK_FUNC_DECL): Custom constructor for SharedWorker. * dom/EventTarget.cpp: (WebCore::EventTarget::toSharedWorker): * dom/EventTarget.h: * page/DOMWindow.idl: * workers/AbstractWorker.cpp: Added. (WebCore::AbstractWorker::AbstractWorker): Common base class for SharedWorker and (soon) Worker. The functions below were copied from Worker.cpp. This is the first step in refactoring Worker to derive from AbstractWorker to enable code sharing. (WebCore::AbstractWorker::~AbstractWorker): (WebCore::AbstractWorker::addEventListener): (WebCore::AbstractWorker::removeEventListener): (WebCore::AbstractWorker::dispatchEvent): (WebCore::AbstractWorker::dispatchLoadErrorEvent): (WebCore::AbstractWorker::dispatchScriptErrorEvent): * workers/AbstractWorker.h: Added. Definitions of functionality shared by Worker.h and SharedWorker.h. In a future patch, Worker will derive from AbstractWorker. (WebCore::AbstractWorker::scriptExecutionContext): (WebCore::AbstractWorker::setOnerror): (WebCore::AbstractWorker::onerror): (WebCore::AbstractWorker::eventListeners): (WebCore::AbstractWorker::refEventTarget): (WebCore::AbstractWorker::derefEventTarget): * workers/AbstractWorker.idl: Added. * workers/SharedWorker.cpp: Added. (WebCore::SharedWorker::SharedWorker): (WebCore::SharedWorker::~SharedWorker): * workers/SharedWorker.h: Added. (WebCore::SharedWorker::create): (WebCore::SharedWorker::port): (WebCore::SharedWorker::toSharedWorker): * workers/SharedWorker.idl: Added. 2009-07-13 Laszlo Gombos Reviewed by Simon Hausmann. [Qt] Cleanup - Remove prf install target https://bugs.webkit.org/show_bug.cgi?id=27191 qtwebkit.prf has been removed; this cleans up the related install target as well. * WebCore.pro: Remove prf install target 2009-07-12 Adam Barth Reviewed by Oliver Hunt. Facebook Chat is broken due to XSS auditor https://bugs.webkit.org/show_bug.cgi?id=27179 Instead of just using the script's URL as to detect an XSS attack, we now use a bit of context before the URL. In particular, we use the bytes from the beginning of the attribute name to the end of the attribute value. In virtually all injection attacks, the attacker would need to supply the attribute name as well as the attribute value. However, in the Facebook false positive, the attribute name is not present in the URL. Tests: http/tests/security/xssAuditor/script-tag-src-redirect-safe.html http/tests/security/xssAuditor/script-tag-with-source-double-quote.html http/tests/security/xssAuditor/script-tag-with-source-no-quote.html * html/HTMLTokenizer.cpp: (WebCore::HTMLTokenizer::parseTag): * html/HTMLTokenizer.h: * page/XSSAuditor.cpp: (WebCore::XSSAuditor::canLoadExternalScriptFromSrc): * page/XSSAuditor.h: 2009-07-12 Keishi Hattori Reviewed by Timothy Hatcher. Refactor ConsoleMessage to add MessageType attribute. https://bugs.webkit.org/show_bug.cgi?id=20625 * bindings/js/JSCustomXPathNSResolver.cpp: (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI): * bindings/js/JSDOMWindowBase.cpp: (WebCore::JSDOMWindowBase::printErrorMessage): * dom/Document.cpp: (WebCore::Document::reportException): (WebCore::Document::addMessage): * dom/Document.h: * dom/ScriptExecutionContext.h: * html/HTMLParser.cpp: (WebCore::HTMLParser::reportErrorToConsole): * inspector/ConsoleMessage.cpp: (WebCore::ConsoleMessage::ConsoleMessage): (WebCore::ConsoleMessage::addToConsole): (WebCore::ConsoleMessage::isEqual): * inspector/ConsoleMessage.h: * inspector/InspectorController.cpp: (WebCore::InspectorController::addMessageToConsole): (WebCore::InspectorController::startGroup): (WebCore::InspectorController::endGroup): (WebCore::InspectorController::addProfileFinishedMessageToConsole): (WebCore::InspectorController::addStartProfilingMessageToConsole): (WebCore::InspectorController::count): * inspector/InspectorController.h: * inspector/front-end/Console.js: (WebInspector.Console.prototype.addMessage): (WebInspector.ConsoleMessage): Added type property. (WebInspector.ConsoleMessage.prototype.toMessageElement): (WebInspector.ConsoleMessage.prototype.toString): (WebInspector.ConsoleMessage.prototype.isEqual): (WebInspector.ConsoleCommandResult): (WebInspector.ConsoleGroup.prototype.addMessage): (WebInspector.ConsoleGroup.prototype._titleClicked): * inspector/front-end/Resource.js: (WebInspector.Resource.prototype._addTip): (WebInspector.Resource.prototype._checkWarning): * inspector/front-end/inspector.css: Changed ".console-group-title-level" to ".console-group-title" * inspector/front-end/inspector.js: (WebInspector.addMessageToConsole): * loader/DocLoader.cpp: (WebCore::DocLoader::printAccessDeniedMessage): * loader/EmptyClients.h: (WebCore::EmptyChromeClient::addMessageToConsole): * loader/FrameLoader.cpp: (WebCore::FrameLoader::reportLocalLoadFailed): (WebCore::FrameLoader::shouldAllowNavigation): * page/ChromeClient.h: * page/Console.cpp: (WebCore::printMessageSourceAndLevelPrefix): (WebCore::Console::addMessage): (WebCore::Console::error): (WebCore::Console::log): (WebCore::Console::dir): (WebCore::Console::trace): (WebCore::Console::assertCondition): (WebCore::Console::timeEnd): (WebCore::Console::warn): * page/Console.h: Added MessageType enum. (WebCore::): * page/DOMWindow.cpp: (WebCore::DOMWindow::postMessageTimerFired): * page/XSSAuditor.cpp: (WebCore::XSSAuditor::canEvaluate): (WebCore::XSSAuditor::canLoadExternalScriptFromSrc): (WebCore::XSSAuditor::canLoadObject): * svg/SVGDocumentExtensions.cpp: (WebCore::SVGDocumentExtensions::reportWarning): (WebCore::SVGDocumentExtensions::reportError): * wml/WMLErrorHandling.cpp: (WebCore::reportWMLError): * workers/GenericWorkerTask.h: Added GenericWorkerTask8 for the extra argument. (WebCore::GenericWorkerTask8::create): (WebCore::GenericWorkerTask8::GenericWorkerTask8): (WebCore::GenericWorkerTask8::performTask): (WebCore::createCallbackTask): * workers/WorkerContext.cpp: (WebCore::WorkerContext::addMessage): (WebCore::WorkerContext::importScripts): * workers/WorkerContext.h: * workers/WorkerMessagingProxy.cpp: (WebCore::postConsoleMessageTask): (WebCore::WorkerMessagingProxy::postConsoleMessageToWorkerObject): * workers/WorkerMessagingProxy.h: * workers/WorkerObjectProxy.h: * xml/XMLHttpRequest.cpp: (WebCore::reportUnsafeUsage): (WebCore::XMLHttpRequest::didFinishLoading): * xml/XSLTProcessor.cpp: (WebCore::XSLTProcessor::parseErrorFunc): 2009-07-12 Nate Chapin Reviewed by Dimitri Glazkov. Upstream UndetectableHTMLCollection.idl as HTMLAllCollection.idl. https://bugs.webkit.org/show_bug.cgi?id=27132 * bindings/scripts/CodeGeneratorV8.pm: * bindings/v8/DOMObjectsInclude.h: * bindings/v8/DerivedSourcesAllInOne.cpp: * bindings/v8/V8DOMWrapper.cpp: (WebCore::V8DOMWrapper::getTemplate): (WebCore::V8DOMWrapper::instantiateV8Object): * bindings/v8/V8Index.cpp: * bindings/v8/V8Index.h: * dom/HTMLAllCollection.idl: Added. 2009-07-12 Joseph Pecoraro Reviewed by Maciej Stachowiak. Inspector: Duplicate Computation in Autocompletion https://bugs.webkit.org/show_bug.cgi?id=26778 * inspector/front-end/TextPrompt.js: (WebInspector.TextPrompt.prototype._completionsReady): 2009-07-12 Dan Bernstein Reviewed by Maciej Stachowiak. https://bugs.webkit.org/show_bug.cgi?id=27196 Rename bidi.cpp to RenderBlockLineLayout.cpp and remove bidi.h * GNUmakefile.am: Updated. * WebCore.gypi: Updated. * WebCore.pro: Updated. * WebCore.vcproj/WebCore.vcproj: Updated. * WebCore.xcodeproj/project.pbxproj: Updated. * WebCoreSources.bkl: Updated. * rendering/RenderBlock.h: Removed unnecessary forward declaration and updated comments. * rendering/RenderBlockLineLayout.cpp: Copied from WebCore/rendering/bidi.cpp. Removed unnecessary #include statements. (WebCore::BidiRun::BidiRun): Moved here from bidi.h. (WebCore::RenderBlock::layoutInlineChildren): Removed outdated comment. * rendering/bidi.cpp: Removed. * rendering/bidi.h: Removed. 2009-07-12 Dan Bernstein - Windows build fix * platform/graphics/cg/PDFDocumentImage.cpp: (WebCore::PDFDocumentImage::dataChanged): 2009-07-12 Dan Bernstein Reviewed by Sam Weinig. - Image cleanup * platform/graphics/BitmapImage.cpp: (WebCore::BitmapImage::destroyDecodedData): Use the data() accessor instead of the m_data member. (WebCore::BitmapImage::dataChanged): Ditto. * platform/graphics/Image.h: Re-ordered #includes and class declarations. Removed the drawPatternCallback() declaration. Made member variables private. * platform/graphics/cg/ImageCG.cpp: (WebCore::drawPatternCallback): Changed this from a member function to a static function. * platform/graphics/cg/PDFDocumentImage.cpp: (WebCore::PDFDocumentImage::dataChanged): Use the data() accessor instead of the m_data member. * svg/graphics/SVGImage.cpp: (WebCore::SVGImage::dataChanged): Ditto. 2009-07-12 Daniel Bates Reviewed by Darin Adler. https://bugs.webkit.org/show_bug.cgi?id=27189 Fixes insufficient check in XSSAuditor::canSetBaseElementURL that caused XSSAuditor to incorrectly block HTML Base elements whose base path coincided with the URL of the page. Test: http/tests/security/xssAuditor/base-href-safe3.html * page/XSSAuditor.cpp: (WebCore::XSSAuditor::canSetBaseElementURL): Changed conditional to only call XSSAuditor::findInRequest() if the host in the page URL disagrees with the host in the base element URL. 2009-07-12 Darin Adler Reviewed by Dan Bernstein. Text searching with ICU should take the user's default locale into account https://bugs.webkit.org/show_bug.cgi?id=27184 rdar://problem/6812121 No simple way to test this since it's dependent on user locale. After this, the user's default locale is used only on Mac. * editing/TextIterator.cpp: (WebCore::createSearcher): Pass result of the currentSearchLocaleID function as the locale. * platform/text/TextBreakIteratorInternalICU.h: Added declaration of currentSearchLocaleID function. * platform/text/android/TextBreakIteratorInternalICU.cpp: (WebCore::currentSearchLocaleID): Added. Returns the empty string. * platform/text/chromium/TextBreakIteratorInternalICUChromium.cpp: (WebCore::currentSearchLocaleID): Ditto. * platform/text/gtk/TextBreakIteratorInternalICUGtk.cpp: (WebCore::currentSearchLocaleID): Ditto. * platform/text/mac/TextBreakIteratorInternalICUMac.mm: (WebCore::textBreakLocalePreference): Added. Returns the value of the AppleTextBreakLocale preference. (WebCore::topLanguagePreference): Added. Returns the value of the first item in the AppleLanguages preference. (WebCore::canonicalLanguageIdentifier): Added. Cover for the CFLocaleCreateCanonicalLanguageIdentifierFromString function. (WebCore::getLocale): Added. Transfers the locale from a CFStringRef into a buffer. (WebCore::getSearchLocale): Added. Calls topLanguagePreference, canonicalLanguageIdentifier, and getLocale. (WebCore::currentSearchLocaleID): Added. Calls getSearchLocale once. (WebCore::getTextBreakLocale): Changed to call textBreakLocalePreference, topLanguagePreference, canonicalLanguageIdentifier, and getLocale. * platform/text/win/TextBreakIteratorInternalICUWin.cpp: (WebCore::currentSearchLocaleID): Added. Returns the empty string. * platform/wx/TemporaryLinkStubs.cpp: (WebCore::currentSearchLocaleID): Ditto. 2009-07-12 Xan Lopez Reviewed by Gustavo Noronha. https://bugs.webkit.org/show_bug.cgi?id=25415 [GTK][ATK] Please implement support for get_text_at_offset Create a PangoLayout that properly represents the visual appearance of the text in the web page so that the line boundary modes of getText{At,Before,After}Offset work correctly. * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp: (UTF16ToUTF8): (g_substr): (convertUniCharToUTF8): (getPangoLayoutForAtk): 2009-07-11 Oliver Hunt Reviewed by Simon Fraser. Bug 27187 - Match Gecko behaviour for canvas path mutation APIs on an empty path Simple API change, check for the empty path and add appropriate point if necessary. Test: fast/canvas/canvas-modify-emptyPath.html * Info.plist: * WebCore.xcodeproj/project.pbxproj: * html/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::lineTo): (WebCore::CanvasRenderingContext2D::quadraticCurveTo): (WebCore::CanvasRenderingContext2D::bezierCurveTo): 2009-07-11 Eric Carlson Reviewed by Antti Koivisto. HTMLMediaElement.canPlayType "maybe" and "probably" reversed https://bugs.webkit.org/show_bug.cgi?id=27186 * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp: (WebCore::MediaPlayerPrivate::supportsType): Return "probably" if type has codecs parameter. * platform/graphics/mac/MediaPlayerPrivateQTKit.mm: (WebCore::MediaPlayerPrivate::supportsType): Ditto. * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp: (WebCore::MediaPlayerPrivate::supportsType): Ditto. 2009-07-11 Brady Eidson Reviewed by Mark Rowe. A worker-thread inspired follow-up for: https://bugs.webkit.org/show_bug.cgi?id=26496 and REGRESSION: XHR stream connection blocks iFrame loading and resource downloading * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::loadRequestAsynchronously): Don't perform the XHR compensation when the XHR is running on a worker thread. Accessing the global Cache data structures from a non-main thread is not currently supported. 2009-07-11 Simon Fraser Enable support for accelerated compositing and 3d transforms on Leopard. Reviewed by Oliver Hunt. * Configurations/FeatureDefines.xcconfig: 2009-07-11 Simon Hausmann Fix the Qt build after r45724. * bridge/qt/qt_instance.cpp: (JSC::Bindings::QtRuntimeObjectImp::QtRuntimeObjectImp): * bridge/qt/qt_runtime.cpp: (JSC::Bindings::QtRuntimeMethod::QtRuntimeMethod): 2009-07-10 Daniel Bates Reviewed by Adam Barth. https://bugs.webkit.org/show_bug.cgi?id=26921 Implements support for HTML entities, so XSSAuditor can protect against attacks encoded with HTML entities. Tests: http/tests/security/xssAuditor/inline-event-HTML-entities.html http/tests/security/xssAuditor/javascript-link-HTML-entities-control-char.html http/tests/security/xssAuditor/javascript-link-HTML-entities-named.html http/tests/security/xssAuditor/javascript-link-HTML-entities-null-char.html http/tests/security/xssAuditor/javascript-link-HTML-entities.html http/tests/security/xssAuditor/link-onclick-entities.html http/tests/security/xssAuditor/script-tag-entities.html http/tests/security/xssAuditor/script-tag-with-source-entities.html * page/XSSAuditor.cpp: (WebCore::XSSAuditor::canEvaluate): (WebCore::XSSAuditor::canEvaluateJavaScriptURL): (WebCore::XSSAuditor::decodeURL): Modified to call WebCore::XSSAuditor::decodeHTMLEntities to decode HTML entities. (WebCore::XSSAuditor::decodeHTMLEntities): Added method to decode HTML entities. (WebCore::XSSAuditor::findInRequest): * page/XSSAuditor.h: 2009-07-10 David Kilzer Bug 27007: Build fixes when ICONDATABASE is disabled Reviewed by Sam Weinig. * WebCore.xcodeproj/project.pbxproj: Added IconDatabaseNone.cpp to the project. * loader/icon/IconDatabase.cpp: Added #if ENABLE(ICONDATABASE)/#endif macro guard. * loader/icon/IconDatabase.h: Removed three public methods from #if ENABLE(ICONDATABASE)/#endif macro so that they may be stubbed out in IconDatabaseNone.cpp. * loader/icon/IconDatabaseNone.cpp: Added #if !ENABLE(ICONDATABASE)/#endif macro guard. (WebCore::IconDatabase::importIconURLForPageURL): Added. (WebCore::IconDatabase::importIconDataForIconURL): Added. (WebCore::IconDatabase::shouldStopThreadActivity): Added. 2009-07-10 Daniel Bates Reviewed by Adam Barth. https://bugs.webkit.org/show_bug.cgi?id=27151 Fixes issue where JavaScript URLs that contain null- and non-null control characters can bypass XSSAuditor. Tests: http/tests/security/xssAuditor/javascript-link-control-char.html http/tests/security/xssAuditor/javascript-link-null-char.html http/tests/security/xssAuditor/javascript-link.html * bindings/js/ScriptController.cpp: (WebCore::ScriptController::evaluate): Separated out logic for JavaScript URLs from inline scripts. For JavaScript URLs, calls XSSAuditor::canEvaluateJavaScriptURL. * bindings/v8/ScriptController.cpp: (WebCore::ScriptController::evaluate): Made similar changes to evaluate() as in bindings/js/ScriptController.cpp. * page/XSSAuditor.cpp: (WebCore::XSSAuditor::canEvaluateJavaScriptURL): Separated out logic for JavaScript URLs into its own method. * page/XSSAuditor.h: 2009-07-10 Shinichiro Hamaji Reviewed by David Kilzer. WebKit needs a style linting tool https://bugs.webkit.org/show_bug.cgi?id=25884 Fix bunch of style issues by autofix of cpplint. This patch is created to demonstrate the autofix of cpplint.py. No new testcases because it's a style fix * css/CSSParser.cpp: (WebCore::CSSParser::parseMediaQuery): (WebCore::CSSParser::validUnit): (WebCore::CSSParser::parseValue): (WebCore::skipCommaInDashboardRegion): (WebCore::CSSParser::parseDashboardRegions): (WebCore::ShadowParseContext::commitValue): (WebCore::ShadowParseContext::commitLength): (WebCore::ShadowParseContext::commitColor): (WebCore::BorderImageParseContext::commitNumber): (WebCore::BorderImageParseContext::commitWidth): (WebCore::BorderImageParseContext::commitRule): (WebCore::BorderImageParseContext::commitBorderImage): (WebCore::CSSParser::lex): (WebCore::CSSParser::text): * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): * css/MediaList.cpp: (WebCore::MediaList::deleteMedium): * css/MediaQuery.h: * css/MediaQueryEvaluator.cpp: (WebCore::parseAspectRatio): * css/MediaQueryEvaluator.h: * css/MediaQueryExp.h: (WebCore::MediaQueryExp::operator==): * css/WebKitCSSMatrix.h: * dom/Comment.h: * dom/Document.cpp: (WebCore::Document::setFocusedNode): * dom/Document.h: (WebCore::Document::setHasDashboardRegions): * dom/DocumentFragment.cpp: (WebCore::DocumentFragment::nodeName): * dom/DocumentFragment.h: * dom/DynamicNodeList.h: * dom/EditingText.h: * dom/Element.cpp: (WebCore::Element::dispatchAttrAdditionEvent): * dom/NamedAttrMap.cpp: (WebCore::NamedNodeMap::item): * dom/Node.cpp: (WebCore::Node::nodeValue): (WebCore::Node::nodeIndex): * dom/NodeRareData.h: (WebCore::NodeListsNodeData::create): * dom/Notation.h: * dom/ProcessingInstruction.h: * dom/Range.cpp: (WebCore::Range::processContents): * dom/StyledElement.cpp: (WebCore::toHex): * dom/XMLTokenizerLibxml2.cpp: (WebCore::PendingCallbacks::PendingStartElementNSCallback::~PendingStartElementNSCallback): (WebCore::PendingCallbacks::PendingStartElementNSCallback::call): (WebCore::PendingCallbacks::): (WebCore::OffsetBuffer::readOutBytes): (WebCore::handleElementNamespaces): (WebCore::handleElementAttributes): (WebCore::attributesStartElementNsHandler): * dom/XMLTokenizerQt.cpp: (WebCore::attributesStartElementNsHandler): (WebCore::XMLTokenizer::parseStartElement): * editing/ApplyStyleCommand.cpp: (WebCore::ApplyStyleCommand::applyInlineStyle): * editing/DeleteSelectionCommand.cpp: (WebCore::DeleteSelectionCommand::removeNode): * editing/Editor.cpp: (WebCore::Editor::pasteAsPlainText): * editing/SelectionController.cpp: (WebCore::SelectionController::directionOfEnclosingBlock): * editing/SmartReplaceICU.cpp: (WebCore::addAllCodePoints): * history/HistoryItem.cpp: (WebCore::HistoryItem::icon): (WebCore::HistoryItem::adoptVisitCounts): * html/CanvasStyle.cpp: (WebCore::CanvasStyle::applyFillColor): * html/HTMLAnchorElement.cpp: (WebCore::HTMLAnchorElement::setActive): (WebCore::HTMLAnchorElement::isLiveLink): * html/HTMLAppletElement.h: * html/HTMLAudioElement.h: * html/HTMLBRElement.h: * html/HTMLBaseElement.h: * html/HTMLBaseFontElement.h: * html/HTMLDListElement.h: * html/HTMLDirectoryElement.h: * html/HTMLFieldSetElement.cpp: (WebCore::HTMLFieldSetElement::HTMLFieldSetElement): * html/HTMLFormElement.cpp: (WebCore::HTMLFormElement::reset): * html/HTMLHRElement.cpp: (WebCore::HTMLHRElement::parseMappedAttribute): * html/HTMLHeadElement.h: * html/HTMLHtmlElement.h: * html/HTMLImageElement.h: (WebCore::HTMLImageElement::setLoadManually): * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::selection): * html/HTMLIsIndexElement.h: * html/HTMLMarqueeElement.cpp: * html/HTMLMediaElement.h: (WebCore::HTMLMediaElement::): * html/HTMLMenuElement.h: * html/HTMLMetaElement.h: * html/HTMLModElement.h: * html/HTMLOListElement.h: * html/HTMLOptionElement.cpp: (WebCore::HTMLOptionElement::childrenChanged): * html/HTMLParamElement.h: * html/HTMLQuoteElement.h: * html/HTMLStyleElement.h: * html/HTMLTableCaptionElement.h: * html/HTMLTableCellElement.h: * html/HTMLTableColElement.h: * html/HTMLTableSectionElement.cpp: (WebCore::HTMLTableSectionElement::deleteRow): * html/HTMLTitleElement.h: * html/HTMLTokenizer.cpp: (WebCore::HTMLTokenizer::parseNonHTMLText): (WebCore::HTMLTokenizer::parseEntity): (WebCore::HTMLTokenizer::parseTag): (WebCore::HTMLTokenizer::write): * html/HTMLUListElement.h: * html/HTMLVideoElement.h: * html/TimeRanges.h: (WebCore::TimeRanges::Range::Range): * inspector/InspectorController.cpp: (WebCore::InspectorController::enableResourceTracking): (WebCore::InspectorController::disableResourceTracking): * inspector/InspectorFrontend.cpp: (WebCore::InspectorFrontend::newInspectorJSONObject): * page/Console.cpp: (WebCore::Console::addMessage): * page/EventHandler.cpp: (WebCore::EventHandler::handleMousePressEvent): (WebCore::EventHandler::selectCursor): (WebCore::EventHandler::defaultKeyboardEventHandler): * page/Frame.cpp: (WebCore::Frame::jsDefaultStatusBarText): * page/android/DragControllerAndroid.cpp: (WebCore::DragController::dragOperation): * page/android/EventHandlerAndroid.cpp: (WebCore::EventHandler::tabsToAllControls): (WebCore::EventHandler::eventActivatedView): * page/animation/AnimationController.cpp: (WebCore::AnimationControllerPrivate::updateStyleIfNeededDispatcherFired): * page/gtk/DragControllerGtk.cpp: (WebCore::DragController::dragOperation): * page/qt/DragControllerQt.cpp: * page/win/DragControllerWin.cpp: (WebCore::DragController::isCopyKeyDown): * page/win/FrameWin.h: * rendering/RenderSlider.cpp: (WebCore::RenderSlider::mouseEventOffsetToThumb): * rendering/style/RenderStyle.h: (WebCore::InheritedFlags::setVerticalAlignLength): (WebCore::InheritedFlags::setUnicodeBidi): (WebCore::InheritedFlags::setCursor): * rendering/style/RenderStyleConstants.h: (WebCore::): * rendering/style/SVGRenderStyleDefs.h: * rendering/style/StyleInheritedData.h: (WebCore::StyleInheritedData::operator!=): * storage/DatabaseTask.h: * svg/GradientAttributes.h: * svg/LinearGradientAttributes.h: * svg/PatternAttributes.h: * svg/RadialGradientAttributes.h: * svg/SVGAnimatedPathData.h: * svg/SVGAnimatedPoints.h: * svg/SVGAnimationElement.h: * svg/SVGClipPathElement.h: * svg/SVGElementInstance.h: * svg/SVGFEBlendElement.cpp: (WebCore::SVGFEBlendElement::build): * svg/SVGFEBlendElement.h: * svg/SVGFEColorMatrixElement.cpp: (WebCore::SVGFEColorMatrixElement::build): * svg/SVGFEComponentTransferElement.cpp: (WebCore::SVGFEComponentTransferElement::build): * svg/SVGFECompositeElement.cpp: (WebCore::SVGFECompositeElement::build): * svg/SVGFEDiffuseLightingElement.cpp: (WebCore::SVGFEDiffuseLightingElement::build): * svg/SVGFEDisplacementMapElement.cpp: (WebCore::SVGFEDisplacementMapElement::build): * svg/SVGFEDistantLightElement.h: * svg/SVGFEFloodElement.cpp: (WebCore::SVGFEFloodElement::build): * svg/SVGFEFloodElement.h: * svg/SVGFEFuncAElement.h: * svg/SVGFEFuncBElement.h: * svg/SVGFEFuncGElement.h: * svg/SVGFEFuncRElement.h: * svg/SVGFEGaussianBlurElement.cpp: (WebCore::SVGFEGaussianBlurElement::build): * svg/SVGFEImageElement.cpp: (WebCore::SVGFEImageElement::build): * svg/SVGFEMergeElement.cpp: (WebCore::SVGFEMergeElement::build): * svg/SVGFEOffsetElement.cpp: (WebCore::SVGFEOffsetElement::build): * svg/SVGFEPointLightElement.h: * svg/SVGFESpecularLightingElement.cpp: (WebCore::SVGFESpecularLightingElement::build): * svg/SVGFESpotLightElement.h: * svg/SVGFETileElement.cpp: (WebCore::SVGFETileElement::build): * svg/SVGLineElement.cpp: (WebCore::SVGLineElement::parseMappedAttribute): * svg/SVGList.h: * svg/SVGListTraits.h: (WebCore::): * svg/SVGMPathElement.h: * svg/SVGMetadataElement.h: * svg/SVGParserUtilities.cpp: (WebCore::SVGPathParser::parseSVG): (WebCore::SVGPathParser::calculateArc): * svg/SVGPathElement.h: * svg/SVGPathSegClosePath.h: * svg/SVGSVGElement.h: * svg/SVGSetElement.h: * svg/SVGSwitchElement.h: * svg/SVGTextPathElement.cpp: (WebCore::SVGTextPathElement::parseMappedAttribute): * svg/SVGTextPathElement.h: * svg/SVGTitleElement.h: * svg/SVGTransformable.cpp: (WebCore::): * svg/SVGViewSpec.cpp: (WebCore::): * svg/animation/SMILTime.cpp: (WebCore::operator+): (WebCore::operator-): (WebCore::operator*): * svg/animation/SVGSMILElement.h: * svg/graphics/SVGResource.cpp: (WebCore::clientMap): * wml/WMLPostfieldElement.cpp: (WebCore::WMLPostfieldElement::value): * wml/WMLSetvarElement.cpp: (WebCore::WMLSetvarElement::value): * workers/WorkerRunLoop.cpp: * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::dropProtection): * xml/XPathPath.h: 2009-07-10 Eric Carlson Reviewed by Simon Fraser. . Update SnowLeopard media controller layout. * css/mediaControlsQT.css: Update for new layout. * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::movieLoadType): Added to replace isStreaming. * html/HTMLMediaElement.h: Declare movieLoadType, remove isStreaming. * rendering/MediaControlElements.cpp: (WebCore::MediaControlStatusDisplayElement::update): Use movieLoadType instead of isStreaming. (WebCore::MediaControlTimelineContainerElement::rendererIsNeeded): MediaControlElement is the base class, not HTMLInputElement. (WebCore::MediaControlStatusDisplayElement::rendererIsNeeded): Ditto. (WebCore::MediaControlRewindButtonElement::rendererIsNeeded): Don't display rewind button for live streams. (WebCore::MediaControlReturnToRealtimeButtonElement::rendererIsNeeded): MediaControlInputElement is the base class, not HTMLInputElement. * rendering/MediaControlElements.h: * rendering/RenderThemeMac.h: * rendering/RenderThemeMac.mm: (WebCore::getMediaUIPartStateFlags): New, return wkDrawMediaUIPart flags. (WebCore::RenderThemeMac::paintMediaFullscreenButton): (WebCore::RenderThemeMac::paintMediaMuteButton): (WebCore::RenderThemeMac::paintMediaPlayButton): (WebCore::RenderThemeMac::paintMediaSeekBackButton): (WebCore::RenderThemeMac::paintMediaSeekForwardButton): (WebCore::RenderThemeMac::paintMediaSliderTrack): (WebCore::RenderThemeMac::paintMediaSliderThumb): (WebCore::RenderThemeMac::paintMediaRewindButton): (WebCore::RenderThemeMac::paintMediaReturnToRealtimeButton): (WebCore::RenderThemeMac::paintMediaControlsBackground): (WebCore::RenderThemeMac::paintMediaCurrentTime): (WebCore::RenderThemeMac::paintMediaTimeRemaining): Use getMediaUIPartStateFlags. 2009-07-10 Michelangelo De Simone Reviewed by Adele Peterson. https://bugs.webkit.org/show_bug.cgi?id=19562 Added build stuff and stub for the ValidityState class, part of HTML5 section Forms: http://www.whatwg.org/specs/web-apps/current-work/multipage/forms.html#validitystate Test: fast/forms/ValidityState-001.html * DerivedSources.cpp: Fix aimed to include ValidityState files * DerivedSources.make: ditto * GNUmakefile.am: ditto * WebCore.gypi: ditto * WebCore.pro: ditto * WebCore.vcproj/WebCore.vcproj: ditto * WebCore.xcodeproj/project.pbxproj: ditto * WebCoreSources.bkl: ditto * html/HTMLButtonElement.idl: "validity" attribute * html/HTMLFieldSetElement.idl: ditto * html/HTMLFormControlElement.cpp: object getter (WebCore::HTMLFormControlElement::validity): * html/HTMLFormControlElement.h: ditto * html/HTMLInputElement.idl: "validity" attribute * html/HTMLSelectElement.idl: ditto * html/HTMLTextAreaElement.idl: ditto * html/ValidityState.cpp: Added. (WebCore::ValidityState::ValidityState): (WebCore::ValidityState::valid): validation flag * html/ValidityState.h: Added. (WebCore::ValidityState::create): creation routine (WebCore::ValidityState::control): ValidityState's parent getter (WebCore::ValidityState::valueMissing): validation flag (WebCore::ValidityState::typeMismatch): ditto (WebCore::ValidityState::patternMismatch): ditto (WebCore::ValidityState::tooLong): ditto (WebCore::ValidityState::rangeUnderflow): ditto (WebCore::ValidityState::rangeOverflow): ditto (WebCore::ValidityState::stepMismatch): ditto (WebCore::ValidityState::customError): ditto * html/ValidityState.idl: Added. 2009-07-10 Brady Eidson Style cleanup over my last patch. * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::~XMLHttpRequest): 2009-07-10 Kevin McCullough Reviewed by Geoffrey Garen. * inspector/JavaScriptCallFrame.cpp: (WebCore::JavaScriptCallFrame::dynamicGlobalObject): * inspector/JavaScriptCallFrame.h: New helper method, used below. * inspector/JavaScriptDebugServer.cpp: (WebCore::JavaScriptDebugServer::detach): In the special case where we detach from a window currently executing JavaScript, manually tear down our representation of the JavaScript call stack, since we won't get any more callbacks from JavaScriptCore to automatically tear it down. It's too bad that WebCore is responsible for this kind of tracking -- in the future, it would be nice if more of the breakpoint handling was inside of JavaScriptCore. 2009-07-10 Brady Eidson Reviewed by Antti Koivisto. https://bugs.webkit.org/show_bug.cgi?id=26496 and REGRESSION: XHR stream connection blocks iFrame loading and resource downloading With this test we ended up going over the maximum-connections-per-host limit that CFNetwork expected. When that happened, the first request that was over the limit ended up in a bizarre state where it wasn't fully serviced until after the long running XHR was complete. Loader and Loader::Host work together to try to not exceed the max-connection limit but non-cache resources - such as XHR - could still end up causing this limit to be exceeded. This fix adds a workaround specifically for XHR while we hash out a more thorough solution that will handle this at the resource handle level. * loader/loader.cpp: (WebCore::Loader::nonCacheRequestInFlight): (WebCore::Loader::nonCacheRequestComplete): (WebCore::Loader::Host::Host): (WebCore::Loader::Host::nonCacheRequestInFlight): (WebCore::Loader::Host::nonCacheRequestComplete): (WebCore::Loader::Host::servePendingRequests): Take nonCacheRequestsInFlight into account. * loader/loader.h: (WebCore::Loader::Host::processingResource): Take nonCacheRequestsInFlight into account. * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::XMLHttpRequest): (WebCore::XMLHttpRequest::~XMLHttpRequest): (WebCore::XMLHttpRequest::loadRequestAsynchronously): Bump the nonCacheRequestInFlight count. (WebCore::XMLHttpRequest::didFail): Decrement that count if the Loader was notified. (WebCore::XMLHttpRequest::didFinishLoading): Ditto. 2009-07-10 Antti Koivisto Try to unbreak non-Mac build. * page/ChromeClient.h: (WebCore::ChromeClient::formDidFocus): (WebCore::ChromeClient::formDidBlur): 2009-07-10 Beth Dakin Reviewed by Anders Carlsson. The rest of the fix for REGRESSION (TOT): In Mail, a crash occurs at WebCore::Widget::afterMouseDown() after clicking To Do's close box Make the Widget* in passMouseDownEventToWidget() a RefPtr. * page/mac/EventHandlerMac.mm: (WebCore::EventHandler::passMouseDownEventToWidget): 2009-07-10 Eric Seidel Reviewed by Adam Barth. rename getDOMStructure calls w/o JSGlobalObject* to deprecatedGetDOMStructure https://bugs.webkit.org/show_bug.cgi?id=27157 This is the first step to fixing https://bugs.webkit.org/show_bug.cgi?id=27088 * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSDOMBinding.h: (WebCore::deprecatedGetDOMStructure): (WebCore::createDOMObjectWrapper): (WebCore::createDOMNodeWrapper): * bindings/js/JSNamedNodesCollection.cpp: (WebCore::JSNamedNodesCollection::JSNamedNodesCollection): * bindings/js/JSRGBColor.cpp: (WebCore::JSRGBColor::JSRGBColor): * bridge/objc/objc_runtime.mm: (JSC::Bindings::ObjcFallbackObjectImp::ObjcFallbackObjectImp): * bridge/runtime_array.cpp: (JSC::RuntimeArray::RuntimeArray): * bridge/runtime_method.cpp: (JSC::RuntimeMethod::RuntimeMethod): * bridge/runtime_object.cpp: (JSC::RuntimeObjectImp::RuntimeObjectImp): 2009-07-10 Greg Bolsinga Reviewed by Antti Koivisto. Add delegate methods about focus and blur and state change https://bugs.webkit.org/show_bug.cgi?id=27153 Call the appropriate new ChromeClient methods for focus and blur. * html/HTMLFormControlElement.cpp: (WebCore::HTMLFormControlElement::dispatchFocusEvent): (WebCore::HTMLFormControlElement::dispatchBlurEvent): * html/HTMLFormControlElement.h: * loader/EmptyClients.h: (WebCore::EmptyChromeClient::formDidFocus): (WebCore::EmptyChromeClient::formDidBlur): * page/ChromeClient.h: 2009-07-10 Steve Falkenburg REGRESSION: Error about missing SwMenuX.dll opening pages with Shockwave Use altered search path while loading plug-ins. This modifies the DLL search order to look in the directory containing the plug-in even if a call to SetDllDirectory was previously made. Use of SetDllDirectory removes the current directory from the search path, breaking the previous strategy for locating any dependent DLLs of the plug-in. Reviewed by Jon Honeycutt. * plugins/win/PluginPackageWin.cpp: (WebCore::PluginPackage::load): Use LoadLibraryEx with LOAD_WITH_ALTERED_SEARCH_PATH 2009-07-10 Adam Roben Sort all our Xcode projects Accomplished using sort-Xcode-project-file. Requested by Dave Kilzer. * WebCore.xcodeproj/project.pbxproj: 2009-07-10 Adam Langley Reviewed by Darin Fisher. Chromium Linux: use disabled images for disabled widgets. https://bugs.webkit.org/show_bug.cgi?id=27106 Previously, checkboxes and radio controls rendered the same even if disabled. The Chromium side of this change is r20224. * rendering/RenderThemeChromiumSkia.cpp: (WebCore::RenderThemeChromiumSkia::paintCheckbox): (WebCore::RenderThemeChromiumSkia::paintRadio): 2009-07-10 Simon Fraser Reviewed by John Sullivan. Fix crash when changing the zoom level in http://iphone.akamai.com/ RenderLayerBacking's paintIntoLayer() method called updateLayerListsIfNeeded(), which could potentially destroy that compositing layer, causing a crash. Prevent this from happening by not doing a compositing update from paintIntoLayer(). The existing updateLayerListsIfNeeded() was renamed to updateCompositingAndLayerListsIfNeeded(), and still does the compositing update. The new updateLayerListsIfNeeded() does not touch compositing layers, and is still called from paintIntoLayer(). * rendering/RenderLayer.cpp: (WebCore::RenderLayer::paintLayer): (WebCore::RenderLayer::hitTestLayer): (WebCore::RenderLayer::updateLayerListsIfNeeded): (WebCore::RenderLayer::updateCompositingAndLayerListsIfNeeded): * rendering/RenderLayer.h: 2009-07-10 Drew Wilson Reviewed by Darin Adler. Need to remove UsesManualToJSImplementation() in favor of CustomToJS. https://bugs.webkit.org/show_bug.cgi?id=27010 Added support for CustomToJS IDL attribute to replace the hard-coded class list in UsesManualToJSImplementation(). This is just a cleanup of existing functionality, so existing LayoutTests adequately cover this patch. * bindings/scripts/CodeGeneratorJS.pm: Removed UsesManualToJSImplementation(), added support for CustomToJS attribute. * css/CSSRule.idl: * css/CSSValue.idl: * css/StyleSheet.idl: * dom/Document.idl: * dom/Event.idl: * dom/Node.idl: * html/ImageData.idl: * svg/SVGElementInstance.idl: * svg/SVGPathSeg.idl: Added CustomToJS attribute to all the above IDL files. 2009-07-10 Dan Bernstein - fix the build by reverting the ill-advised r45711 * page/FrameView.cpp: (WebCore::FrameView::scrollToAnchor): 2009-07-09 Brian Weinstein Reviewed by Tim Hatcher. Updated WebCore.base.exp to add some needed functions. * WebCore.base.exp: 2009-07-10 Dan Bernstein - address a review comment from Simon Fraser which I forgot to include in the last check-in * page/FrameView.cpp: (WebCore::FrameView::scrollToAnchor): Pass true to getRect() for maximum transform friendliness! 2009-07-10 Dan Bernstein Reviewed by Simon Fraser. - fix https://bugs.webkit.org/show_bug.cgi?id=27137 REGRESSION (r44311): Reproducible crash due to infinite recursion into FrameLoader::gotoAnchor() -> FrameView::layout() Test: fast/loader/goto-anchor-infinite-layout.html * loader/FrameLoader.cpp: (WebCore::FrameLoader::gotoAnchor): Moved the code to update layout, find the renderer to scroll to, and scroll from here to methods on FrameView, and replaced it with a call to FrameView::maintainScrollPositionAtAnchor(). (WebCore::FrameLoader::completed): Call maintainScrollPositionAtAnchor() instead of setLockedToAnchor(). * page/FrameView.cpp: (WebCore::FrameView::FrameView): Removed initialization of m_lockedToAnchor. (WebCore::FrameView::reset): Reset m_maintainScrollPositionAnchor instead of m_lockedToAnchor. (WebCore::FrameView::layout): Removed the code related to scrolling to the anchor from here, because scrolling can trigger events which invalidate the layout, and as such, belongs with the post-layout tasks. (WebCore::FrameView::maintainScrollPositionAtAnchor): Added. When called with a node scrolls the view to the top of that node and maintains it scrolled to the top of the node during subsequent layouts, until this function is called with 0 or other things trigger scrolling. (WebCore::FrameView::scrollRectIntoViewRecursively): Reset m_maintainScrollPositionAnchor. (WebCore::FrameView::setScrollPosition): Ditto. (WebCore::FrameView::scrollToAnchor): Added. Scrolls to the top of m_maintainScrollPositionAnchor, if it is set. (WebCore::FrameView::performPostLayoutTasks): Call scrollToAnchor(). (WebCore::FrameView::setWasScrolledByUser): Reset m_maintainScrollPositionAnchor. * page/FrameView.h: Removed lockedToAnchor(), setLockedToAnchor(), and m_lockedToAnchor. Added maintainScrollPositionAtAnchor() and m_maintainScrollPositionAnchor. 2009-07-04 Sriram Yadavalli Reviewed by Simon Hausmann. https://bugs.webkit.org/show_bug.cgi?id=26439 QtWebKit fails in loading www.nytimes.com in Windows/Linux QNetworkReplyHandler is ignoring content associated with 401 error. This causes the XHR response handling to fail. Simon: Added also ProxyAuthenticationRequiredError, to handle the same case when going through proxies, as suggested by Prasanth. * platform/network/qt/QNetworkReplyHandler.cpp: (WebCore::QNetworkReplyHandler::finish): 2009-07-10 Simon Hausmann Reviewed by Holger Freyther. Enable HTML 5 Messaging to fix message channel Qt DRT failures in fast/events. * WebCore.pro: 2009-07-09 Roland Steiner Reviewed by Maciej Stachowiak. added InlineBox::isLeaf() firstLeafChild()/lastLeafChild() not virtual and not callable on InlineBox anymore. firstLeafChild()/lastLeafChild() will no longer return a node outside of the given subtree. Removed firstLeafChildAfterBox()/lastLeafChildBeforeBox() Removed potentially quadratic behavior if all nodes before/after a given box are empty InlineFlowBoxes Currently, these methods are called on RootInlineBox objects only, so above changes should not have any observable effect (only the removal of the square performance behavior could apply, but the conditions for that are probably of a rather theoretical nature). * rendering/InlineBox.cpp: (WebCore::InlineBox::nextLeafChild): (WebCore::InlineBox::prevLeafChild): * rendering/InlineBox.h: (WebCore::InlineBox::isLeaf): * rendering/InlineFlowBox.cpp: (WebCore::InlineFlowBox::firstLeafChild): (WebCore::InlineFlowBox::lastLeafChild): * rendering/InlineFlowBox.h: (WebCore::InlineFlowBox::firstChild): (WebCore::InlineFlowBox::lastChild): (WebCore::InlineFlowBox::isLeaf): * rendering/RootInlineBox.cpp: (WebCore::RootInlineBox::closestLeafChildForXPos): 2009-07-09 Roland Steiner Reviewed by Maciej Stachowiak. Added InlineBox::baselinePosition() and lineHeight() methods (adapted remaining code accordingly to use those methods) No change in functionality. * rendering/InlineBox.h: (WebCore::InlineBox::baselinePosition): (WebCore::InlineBox::lineHeight): * rendering/InlineFlowBox.cpp: (WebCore::InlineFlowBox::adjustMaxAscentAndDescent): (WebCore::InlineFlowBox::computeLogicalBoxHeights): (WebCore::InlineFlowBox::placeBoxesVertically): 2009-07-09 Oliver Hunt Reviewed by Maciej Stachowiak. Bug 27142 - canPlayType() should return empty string for unsupported content Return "" instead of "no" for unsupport media types. * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::canPlayType): 2009-07-09 Roland Steiner Reviewed by Maciej Stachowiak. Implement the part of HTML5 spec that deals with parsing of and tags in that their end tags are optional if followed by /. Also specify a new accessibility role "annotation" for and . Affected code parts are not enclosed in #IF ENABLE(RUBY), since the parsing is not affected by whether ruby is rendered properly or not (in fact, it may be more profound without ruby layouting, since the contents of are not hidden). Test: fast/ruby/parse-rp.html * accessibility/AccessibilityObject.h: (WebCore::): * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::roleValue): * html/HTMLElement.cpp: (WebCore::HTMLElement::endTagRequirement): (WebCore::HTMLElement::tagPriority): (WebCore::inlineTagList): * html/HTMLParser.cpp: (WebCore::HTMLParser::rpCreateErrorCheck): (WebCore::HTMLParser::rtCreateErrorCheck): (WebCore::HTMLParser::getNode): * html/HTMLParser.h: * html/HTMLTagNames.in: 2009-07-09 Dmitry Titov Not reviewed, fix for previous commit. The change http://trac.webkit.org/changeset/45695 did not correctly enabled GTL and QT build flags. This caused layout tests failure. This is speculative fix for those failures. * GNUmakefile.am: added ENABLE_CHANNEL_MESSAGING flag. * WebCore.pro: ditto. * page/DOMWindow.idl: touched to cause recompile. * workers/WorkerContext.idl: ditto. 2009-07-09 Drew Wilson Reviewed by Alexey Proskuryakov. https://bugs.webkit.org/show_bug.cgi?id=26903 Turned on CHANNEL_MESSAGING by default because the MessageChannel API is now implemented for Web Workers and is reasonably stable. Tests: fast/events/message-channel-gc-2.html fast/events/message-channel-gc-3.html fast/events/message-channel-gc-4.html fast/events/message-channel-gc.html fast/events/message-channel-listener-circular-ownership.html fast/events/message-port-clone.html fast/events/message-port-constructor-for-deleted-document.html fast/events/message-port-deleted-document.html fast/events/message-port-deleted-frame.html fast/events/message-port-inactive-document.html fast/events/message-port-no-wrapper.html fast/events/message-port.html fast/workers/worker-cloneport.html fast/workers/worker-messageport-gc.html fast/workers/worker-messageport.html * Configurations/FeatureDefines.xcconfig: Turned on ENABLE_CHANNEL_MESSAGING. * WebCore/WebCore.vcproj/WebCoreCommon.vsprops: ditto. * WebCore/WebCore.vcproj/build-generated-files.sh: ditto. * WebCore/page/DOMWindow.idl: touch the file to cause re-generation of headers. * WebCore/workers/WorkerContext.idl: ditto. 2009-07-09 Pierre d'Herbemont Reviewed by Simon Fraser. Full page zoom breaks remaining and elapsed time display in the