2012-04-30 Abhishek Arya Remove positioned float code. https://bugs.webkit.org/show_bug.cgi?id=84795 Reviewed by Dan Bernstein. Backout r92004 and some pieces from r91702. Test: fast/block/float/positioned-float-crash.html * css/CSSParser.cpp: (WebCore::isValidKeywordPropertyAndValue): * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): (WebCore::CSSPrimitiveValue::operator EFloat): * css/CSSValueKeywords.in: * rendering/RenderBlock.cpp: (WebCore::RenderBlock::RenderBlock): (WebCore::RenderBlock::layoutBlock): (WebCore::RenderBlock::addOverflowFromFloats): (WebCore::RenderBlock::layoutBlockChild): (WebCore::RenderBlock::simplifiedLayout): (WebCore::RenderBlock::layoutPositionedObjects): (WebCore::RenderBlock::insertFloatingObject): (WebCore::RenderBlock::positionNewFloats): (WebCore::RenderBlock::clearFloats): (WebCore::RenderBlock::FloatingObjects::clear): (WebCore::RenderBlock::FloatingObjects::increaseObjectsCount): (WebCore::RenderBlock::FloatingObjects::decreaseObjectsCount): * rendering/RenderBlock.h: (RenderBlock): (WebCore::RenderBlock::forceLayoutInlineChildren): (FloatingObject): (WebCore::RenderBlock::FloatingObject::FloatingObject): (WebCore::RenderBlock::hasOverhangingFloats): (WebCore::RenderBlock::FloatingObjects::FloatingObjects): (FloatingObjects): * rendering/RenderBox.cpp: (WebCore::RenderBox::updateBoxModelInfoFromStyle): * rendering/RenderDeprecatedFlexibleBox.cpp: (WebCore::RenderDeprecatedFlexibleBox::layoutBlock): * rendering/RenderDeprecatedFlexibleBox.h: (RenderDeprecatedFlexibleBox): * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::layoutBlock): * rendering/RenderFlexibleBox.h: (RenderFlexibleBox): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::updateScrollbarsAfterLayout): * rendering/style/RenderStyleConstants.h: 2012-04-29 Sam Weinig Remove BlobBuilder https://bugs.webkit.org/show_bug.cgi?id=84036 Reviewed by Anders Carlsson. * GNUmakefile.am: * fileapi/WebKitBlobBuilder.idl: * page/DOMWindow.idl: * workers/WorkerContext.idl: Make exposing the WebKitBlobBuilder JS object conditional on a new ENABLE_LEGACY_WEBKIT_BLOB_BUILDER flag. Don't enable this for the Mac, but do for everyone else. 2012-04-30 Anders Carlsson Add a barrier-style dispatch member function to ScrollingThread https://bugs.webkit.org/show_bug.cgi?id=85228 Reviewed by Sam Weinig. Add a ScrollingThread::dispatchBarrier function which takes a WTF::Function and dispatches it to the main thread once all the currently scheduled scrolling thread functions have run. This is to be used for synchronization between the scrolling thread and the main thread. * page/scrolling/ScrollingThread.cpp: (WebCore::callFunctionOnMainThread): (WebCore): (WebCore::ScrollingThread::dispatchBarrier): * page/scrolling/ScrollingThread.h: (ScrollingThread): 2012-04-30 Min Qin Expose a flag so that fullscreen video on android can work with FULLSCREEN_API https://bugs.webkit.org/show_bug.cgi?id=84414 Reviewed by Darin Fisher. No tests, just exposing the flag, and will be used by android later. Sorry, there is a merge error during the previous commit, resolved now * platform/graphics/MediaPlayer.cpp: (WebCore::MediaPlayer::setControls): (WebCore): (WebCore::MediaPlayer::enterFullscreen): (WebCore::MediaPlayer::exitFullscreen): * platform/graphics/MediaPlayer.h: (MediaPlayer): * platform/graphics/MediaPlayerPrivate.h: (MediaPlayerPrivateInterface): (WebCore::MediaPlayerPrivateInterface::enterFullscreen): 2012-04-30 Nate Chapin Move more of committing and starting to write a Document to DocumentLoader. https://bugs.webkit.org/show_bug.cgi?id=83908 Reviewed by Adam Barth. No new tests, refactor only. * loader/DocumentLoader.cpp: (WebCore::DocumentLoader::commitIfReady): Ignore m_gotFirstByte here, since it was always true here anyway. (WebCore::DocumentLoader::finishedLoading): If we are finishing an empty document, create the document now, so that FrameLoaderClient doesn't have to do it later (FrameLoaderClient code will be removed in a later patch). (WebCore::DocumentLoader::commitData): Call receivedFirstData() directly and do some work receivedFirstData() used to do, setEncoding() only once per load. (WebCore::DocumentLoader::receivedData): (WebCore::DocumentLoader::maybeCreateArchive): * loader/DocumentLoader.h: * loader/DocumentWriter.cpp: (WebCore::DocumentWriter::setEncoding): * loader/FrameLoader.cpp: (WebCore::FrameLoader::receivedFirstData): Move DocumentLoader calls to DocumentLoader. * loader/FrameLoader.h: Remove m_hasReceivedFirstData and willSetEncoding(), allow hasReceivedData() to be called directly. (FrameLoader): 2012-04-30 Kentaro Hara Unreviewed. Fix test crashes in Win/Linux debug builds. * bindings/v8/V8LazyEventListener.cpp: (WebCore::V8LazyEventListener::V8LazyEventListener): (WebCore::V8LazyEventListener::prepareListenerObject): * bindings/v8/V8LazyEventListener.h: (V8LazyEventListener): 2012-04-30 Tommy Widenflycht MediaStream API: Change LocalMediaStream::stop to be synchronous https://bugs.webkit.org/show_bug.cgi?id=84942 Reviewed by Dimitri Glazkov. Since I changed LocalMediaStream to be a ActiveDOMObject recently the stop() behaviour needs to change since it is no longer a good idea to start a timer when called. Not possible to write a test for this. * Modules/mediastream/LocalMediaStream.cpp: (WebCore::LocalMediaStream::LocalMediaStream): (WebCore::LocalMediaStream::stop): * Modules/mediastream/LocalMediaStream.h: (LocalMediaStream): 2012-04-28 Emil A Eklund and Levi Weintraub Add ENABLE_SUBPIXEL_LAYOUT controlling FractionalLayoutUnit denominator https://bugs.webkit.org/show_bug.cgi?id=85146 Reviewed by Eric Seidel. Add a new flag for controlling the fixed point denominator in FractionalLayoutUnit. Controls whether the denominator is set to 60 or 1. Until we change the LayoutUnit typedef this change will have no effect. No new tests, no change in functionality. * platform/FractionalLayoutUnit.h: (WebCore): (WebCore::FractionalLayoutUnit::operator++): (WebCore::operator/): (WebCore::operator+): Add ++, / double and and + double operators. These are needed when ENABLE_SUBPIXEL_LAYOUT is not enabled. * platform/graphics/FractionalLayoutRect.cpp: (WebCore::enclosingFractionalLayoutRect): 2012-04-30 Justin Schuh loadOrRedirectSubframe should return the owner element's frame https://bugs.webkit.org/show_bug.cgi?id=84780 Reviewed by Nate Chapin. Test: fast/loader/javascript-url-iframe-remove-on-navigate.html * loader/SubframeLoader.cpp: (WebCore::SubframeLoader::loadOrRedirectSubframe): 2012-04-30 Caio Marcelo de Oliveira Filho Use Vector directly instead of encapsulating it in AttributeVector https://bugs.webkit.org/show_bug.cgi?id=84413 Reviewed by Andreas Kling. As commented in https://bugs.webkit.org/show_bug.cgi?id=79963#c16 we do not usually subclass basic types like Vector. This patch changes code to use Vector directly and move around the functionality of the former methods to more specific helper functions or inline code at the callers. * dom/Element.cpp: (WebCore::Element::parserSetAttributes): (WebCore::Element::normalizeAttributes): * dom/Element.h: (Element): * dom/ElementAttributeData.cpp: * dom/ElementAttributeData.h: (WebCore::findAttributeInVector): (WebCore::ElementAttributeData::getAttributeItem): (ElementAttributeData): (WebCore::ElementAttributeData::attributeVector): (WebCore::ElementAttributeData::clonedAttributeVector): (WebCore::ElementAttributeData::getAttributeItemIndex): (WebCore): * html/parser/HTMLConstructionSite.cpp: (WebCore::HTMLConstructionSite::createHTMLElementFromSavedElement): * html/parser/HTMLToken.h: (WebCore::AtomicHTMLToken::AtomicHTMLToken): * html/parser/HTMLTreeBuilder.cpp: (WebCore::HTMLTreeBuilder::processFakeStartTag): (WebCore::HTMLTreeBuilder::attributesForIsindexInput): Loop through the attributes backwards so we can remove items without affecting the rest of the loop run. * html/parser/HTMLTreeBuilder.h: * html/parser/TextDocumentParser.cpp: (WebCore::TextDocumentParser::insertFakePreElement): * xml/XMLErrors.cpp: (WebCore::createXHTMLParserErrorHeader): (WebCore::XMLErrors::insertErrorMessageBlock): * xml/parser/MarkupTokenBase.h: (WebCore::AtomicMarkupTokenBase::AtomicMarkupTokenBase): (WebCore::AtomicMarkupTokenBase::getAttributeItem): (WebCore::AtomicMarkupTokenBase::attributes): (AtomicMarkupTokenBase): (WebCore::::initializeAttributes): * xml/parser/XMLToken.h: (WebCore::AtomicXMLToken::AtomicXMLToken): 2012-04-30 Mark Pilgrim [Chromium] Remove PlatformSupport::loadPlatformAudioResource, call loadResource directly https://bugs.webkit.org/show_bug.cgi?id=85193 Reviewed by Kentaro Hara. Part of a refactoring series. See tracking bug 82948. * platform/audio/chromium/AudioBusChromium.cpp: (WebCore::AudioBus::loadPlatformResource): * platform/chromium/PlatformSupport.h: (PlatformSupport): 2012-04-30 Mark Pilgrim [Chromium] Call defaultLocale directly https://bugs.webkit.org/show_bug.cgi?id=85192 Reviewed by Kentaro Hara. Part of a refactoring series. See tracking bug 82948. * platform/chromium/LanguageChromium.cpp: (WebCore::platformLanguage): * platform/chromium/PlatformSupport.h: (PlatformSupport): 2012-04-30 Beth Dakin https://bugs.webkit.org/show_bug.cgi?id=82922 border-image with image-set does not render correctly when viewed at 2x -and corresponding- Reviewed by Dan Bernstein. StyleImage::computeIntrinsicDimensions() is only called from one place: RenderBoxModelObject::calculateIntrinsicDimensions(), and that is only used for background images and border images. In my original image-set work, I decided that StyleCachedImageSet::computeIntrinsicDimensions() would compute "intrinsic" dimensions, meaning that they would compute the dimensions that the image resource was pretending to be rather than the actual dimensions of the resource. I chose to do this because it made background images work great without changing the call-site. But border images need to know the actual intrinsic dimensions, so this design decision (which was admittedly questionable from the start) won't stick. This patch makes StyleImage::computeIntrinsicDimensions() return actual intrinsic dimensions. Then the border-image and background- image code is very lightly patched to account for the image's scale factor. These functions no longer need the scale factor parameter. * loader/cache/CachedImage.cpp: (WebCore::CachedImage::computeIntrinsicDimensions): * loader/cache/CachedImage.h: (CachedImage): * platform/graphics/GeneratedImage.h: (GeneratedImage): * platform/graphics/GeneratorGeneratedImage.cpp: (WebCore::GeneratedImage::computeIntrinsicDimensions): * platform/graphics/Image.cpp: (WebCore::Image::computeIntrinsicDimensions): * platform/graphics/Image.h: (Image): * platform/graphics/cg/PDFDocumentImage.cpp: (WebCore::PDFDocumentImage::computeIntrinsicDimensions): * platform/graphics/cg/PDFDocumentImage.h: (PDFDocumentImage): * svg/graphics/SVGImage.cpp: (WebCore::SVGImage::computeIntrinsicDimensions): * svg/graphics/SVGImage.h: (SVGImage): * rendering/style/StyleCachedImageSet.cpp: (WebCore::StyleCachedImageSet::computeIntrinsicDimensions): New function on StyleImage returns the image's scale factor. * rendering/style/StyleCachedImageSet.h: (WebCore::StyleCachedImageSet::imageScaleFactor): * rendering/style/StyleImage.h: (WebCore::StyleImage::imageScaleFactor): Scale the intrinsic size of the background image down by the scale factor. * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::calculateFillTileSize): Slices should be multiplied by the image's scale factor since they are always expected to the specified in the 1x image's coordinate space. (WebCore::RenderBoxModelObject::paintNinePieceImage): 2012-04-30 Arko Saha Remove custom bindings code in JSHTMLCollectionCustom.cpp for HTMLPropertiesCollection. https://bugs.webkit.org/show_bug.cgi?id=85172 Reviewed by Kentaro Hara. Use [JSGenerateToJSObject] in HTMLPropertiesCollection.idl, so that it can generate toJS() in JSHTMLPropertiesCollection.cpp automatically. * bindings/js/JSHTMLCollectionCustom.cpp: (WebCore::toJS): * html/HTMLPropertiesCollection.idl: 2012-04-30 No'am Rosenthal [Texmap] TextureMapperLayer uses intermediate surfaces too eagerly https://bugs.webkit.org/show_bug.cgi?id=85103 Reviewed by Kenneth Rohde Christiansen. Instead of automatically using an intermediate surface for layers with opacity and children, we limit surface usage for layers with more than one child and for layers with one child and contents of its own. This prevents us from using intermediate surfaces in cases where a single layer with opacity has a single descendant with content, in which case normal blending can be used. Covered by existing compositing layout tests. * platform/graphics/texmap/TextureMapperLayer.cpp: (WebCore): * platform/graphics/texmap/TextureMapperLayer.h: 2012-04-30 Yi Shen Inserting a paragraph between quoted lines in editing/deleting/delete-4038408-fix.html doesn't work https://bugs.webkit.org/show_bug.cgi?id=78193 Reviewed by Ryosuke Niwa. When pasting a copied portion of a blockquote with a newline at the end into an unquoted area, the newline is inserted after the blockquote since we don't want it also to be quoted. However, this behavior has also applied when we insert a paragraph between quoted lines, which is incorrect. To figure out the right place to insert a paragraph, we need providing more information to the InsertParagraphSeparatorCommand by introducing a boolean parameter "pasteBlockqutoeIntoUnquotedArea". Tests: editing/inserting/insert-paragraph-separator-in-blockquote.html editing/pasteboard/paste-wrapped-blockquote-into-nonblockquote.html * editing/CompositeEditCommand.cpp: (WebCore::CompositeEditCommand::insertParagraphSeparator): * editing/CompositeEditCommand.h: (CompositeEditCommand): * editing/InsertParagraphSeparatorCommand.cpp: (WebCore::InsertParagraphSeparatorCommand::InsertParagraphSeparatorCommand): (WebCore::InsertParagraphSeparatorCommand::doApply): * editing/InsertParagraphSeparatorCommand.h: (WebCore::InsertParagraphSeparatorCommand::create): (InsertParagraphSeparatorCommand): * editing/ReplaceSelectionCommand.cpp: (WebCore::ReplaceSelectionCommand::doApply): 2012-04-30 Antti Koivisto Protect current element in HTMLLinkElement::setCSSStyleSheet https://bugs.webkit.org/show_bug.cgi?id=85166 Reviewed by Andreas Kling. Stylesheet loading can trigger script execution. Test: fast/css/cached-sheet-restore-crash.html * html/HTMLLinkElement.cpp: (WebCore::HTMLLinkElement::setCSSStyleSheet): 2012-04-29 Keishi Hattori Build fix for LocalizedDateMac.mm https://bugs.webkit.org/show_bug.cgi?id=85164 Reviewed by Kent Tamura. * platform/text/mac/LocalizedDateMac.mm: (WebCore::monthLabels): 2012-04-29 Luke Macpherson Initialize member variables in CSSParser's constructor. https://bugs.webkit.org/show_bug.cgi?id=84377 Reviewed by Kentaro Hara. It is good practice not to leave member variables uninitialized. They make debugging more difficult by reducing repeatability, and in some cases lead to the possibility of information leakage occuring. This patch simply adds initialization of m_numParsedPropertiesBeforeMarginBox to CSSParser's constructor to INVALID_NUM_PARSED_PROPERTIES so that the initial state is the same as the state after the properties are cleared. No tests added because this is a code style fix, not an actual bug so long as the bison generated code calls startDeclarationsForMarginBox() and endDeclarationsForMarginBox() symmetrically. The lack of initialization was originally detected by coverity. * css/CSSParser.cpp: (WebCore::CSSParser::CSSParser): 2012-04-29 Kent Tamura [Mac] Add LocalizedDateMac https://bugs.webkit.org/show_bug.cgi?id=85039 Reviewed by Kentaro Hara. A date shown should be formatted for user's OS settings. Chromium-Mac used LocalizedDateICU.cpp to format/parse visible date strings and it didn't reflect user-settings. Test: covered by fast/forms/date/date-appearance.html * WebCore.gyp/WebCore.gyp: Use LocalizedDateMac.mm for OS X instead of LocalizedDateICU.cpp. * WebCore.gypi: Add LocalizedDateMac.mm * platform/text/mac/LocalizedDateMac.mm: Added. (WebCore::createShortDateFormatter): Creates a NSDateFormatter with desired settings. (WebCore::parseLocalizedDate): Impelment for tyep=date. (WebCore::formatLocalizedDate): ditto. (WebCore::isYearSymbol): A readability helper for format string parsing. (WebCore::isMonthSymbol): ditto. (WebCore::isDaySymbol): ditto. (WebCore::localizeDateFormat): Parse a format string, and replace symbols with user-friendly labels. (WebCore::localizedDateFormatText): Gets a format string, and apply localizeDateFormat(). (WebCore::monthLabels): Obtain month names from the system. (WebCore::weekDayShortLabels): Obtain week day symbols from the system. (WebCore::firstDayOfWeek): Obtain first day of week from the system. * platform/text/ICULocale.cpp: (WebCore::createFallbackMonthLabels): Uses WTF::monthFullName. 2012-04-29 Sam Weinig Add support for the Blob constructor (Part 2) https://bugs.webkit.org/show_bug.cgi?id=84555 Address additional feedback on Blob construction. - Add exception when the dictionary is not an object. - Ensure the proper ordering of dictionary access. Tested via throwing exceptions in toString, and ensuring correct one is fired first. - Changed type of exception throw for invalid enumeration to a TypeError. Reviewed by Kentaro Hara. Updated fast/files/blob-constructor.html to be more comprehensive. * bindings/js/JSBlobCustom.cpp: (WebCore::JSBlobConstructor::constructJSBlob): * bindings/v8/custom/V8BlobCustom.cpp: (WebCore::V8Blob::constructorCallback): 2012-04-29 No'am Rosenthal [Texmap] Leaves demo: wrong geometry when opacity animation kicks in https://bugs.webkit.org/show_bug.cgi?id=85096 Reviewed by Kenneth Rohde Christiansen. We should use combined() instead of combinedForChildren() since we don't allow intermediate surfaces for preserves-3d. Also, we should apply the offset before multiplying the transforms, otherwise the transform-origin is incorrect. Covered by existing compositing tests. * platform/graphics/texmap/TextureMapperLayer.cpp: (WebCore::TextureMapperLayer::paintSelf): (WebCore::TextureMapperLayer::paintRecursive): 2012-04-29 Mark Pilgrim [Chromium] Call highUsageDeltaMB directly https://bugs.webkit.org/show_bug.cgi?id=84844 Reviewed by Kentaro Hara. Part of a refactoring series. See tracking bug 82948. * bindings/v8/V8GCController.cpp: (WebCore::V8GCController::checkMemoryUsage): * platform/MemoryUsageSupport.cpp: (WebCore): (WebCore::MemoryUsageSupport::highUsageDeltaMB): * platform/MemoryUsageSupport.h: (MemoryUsageSupport): * platform/chromium/MemoryUsageSupportChromium.cpp: (WebCore::MemoryUsageSupport::highUsageDeltaMB): (WebCore): * platform/chromium/PlatformSupport.h: (PlatformSupport): 2012-04-29 Kentaro Hara REGRESSION(r113086): onresize event handler can be deleted in popup window https://bugs.webkit.org/show_bug.cgi?id=84908 Reviewed by Ojan Vafai. In a nutshell, an onresize event handler in the popup window can be non-deterministically deleted. For more details, please look at Chromium issue 123642: http://code.google.com/p/chromium/issues/detail?id=123642 I confirmed that this bug is the regression caused by r113086. r113086 introduced the following code: void V8LazyEventListener::prepareListenerObject(...) { if (hasExistingListenerObject()) return; ...; // Since we only parse once, there's no need to keep data // used for parsing around anymore. m_functionName = String(); m_code = String(); m_eventParameterName = String(); m_sourceURL = String(); setListenerObject(wrappedFunction); } This is not correct. The parsing can be done more than once, and thus we cannot clear data. This patch removes the above code. Consider the following situation: (1) Assume ''. (2) prepareListenerObject() runs. (3) Since this is the first parsing, hasExistingListenerObject() returns false. After the parsing, the listener object is set by setListenerObject(). (4) GC runs. Since there is no strong reference to the listener object, weakEventListenerCallback() is called back, and the listener object is disposed. (5) A resize event is triggered. (6) prepareListenerObject() is called again. Since the listener object is already disposed, hasExistingListenerObject() returns false, and the second parsing starts. In my investigation, the above situation is happening in the reported Chromium bug. Anyway, I am sure that potentially the parsing can be done more than once, and thus we must keep m_xxxx data. However, this is just a temporary fix. We should fix the code so that an alive event listener object is never reclaimed. See https://bugs.webkit.org/show_bug.cgi?id=85152 for more details. No tests: I tried hard to create a DRT test, but could not. The bug depends on the behavior of GC, and thus the reported bug is non-deterministic. For example, (as explained in the Chromium issue,) the bug does not happen if we load an HTML from network because the network latency hides the bug. Also the bug happens in the popup window only. If we open the reported HTML in the main window, we cannot reproduce the bug. * bindings/v8/V8LazyEventListener.cpp: (WebCore::V8LazyEventListener::prepareListenerObject): 2012-04-28 Sam Weinig Smooth scrolling needs a new key Reviewed by Geoffrey Garen. * platform/mac/ScrollAnimatorMac.mm: (WebCore::scrollAnimationEnabledForSystem): (WebCore::ScrollAnimatorMac::scroll): Update for new key. 2012-04-28 Li Yin MessagePort must set m_closed to be true at the end of MessagePort::close function https://bugs.webkit.org/show_bug.cgi?id=85139 In the function MessagePort::close, the "m_closed = true" must be executed at the end, not at the beginning. Or, the m_entangledChannel->close() will not be executed. And it resulted in the failure of MS bench mark messagechannel_close.htm. http://samples.msdn.microsoft.com/ietestcenter/WebWorkers/messagechannel_close.htm Reviewed by Kentaro Hara. Test: fast/events/message-port-close.html * dom/MessagePort.cpp: (WebCore::MessagePort::close): 2012-04-28 Sam Weinig And again. * bindings/v8/custom/V8BlobCustom.cpp: (WebCore::V8Blob::constructorCallback): 2012-04-28 Sam Weinig Once again, try to make these puppies work. * bindings/v8/custom/V8BlobCustom.cpp: 2012-04-28 Sam Weinig Fix the Chromium build. * bindings/v8/custom/V8BlobCustom.cpp: (WebCore::V8Blob::constructorCallback): 2012-04-27 Sam Weinig Add support for the Blob constructor https://bugs.webkit.org/show_bug.cgi?id=84555 Reviewed by Maciej Stachowiak. Test: fast/files/blob-constructor.html This adds an implementation of the Blob constructor that willfully violates the W3C Editor’s Draft 29 February 2012 in the following ways: - Elements in the parts array are coerced to DOMStrings https://www.w3.org/Bugs/Public/show_bug.cgi?id=16721 - Don't throw for invalid key in the dictionary https://www.w3.org/Bugs/Public/show_bug.cgi?id=16727 - Values for the endings property are treated as enums https://www.w3.org/Bugs/Public/show_bug.cgi?id=16729 * bindings/js/JSBlobCustom.cpp: (WebCore::JSBlobConstructor::constructJSBlob): Implement blob constructor. * bindings/v8/custom/V8BlobCustom.cpp: (WebCore::V8Blob::constructorCallback): Implement blob constructor. * fileapi/Blob.idl: Add constructor to IDL. * workers/WorkerContext.idl: Add Blob constructor to the worker global object. 2012-04-28 Igor Oliveira Move PropertyWrapper out of the AnimationBase https://bugs.webkit.org/show_bug.cgi?id=84978 Reviewed by Dean Jackson. AnimationBase is a complex class. It has a state machine and a bunch of property handlers. This patch moves the property handlers to a separate class making AnimationBase simpler. * CMakeLists.txt: * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * page/animation/AnimationBase.cpp: * page/animation/AnimationBase.h: (AnimationBase): * page/animation/AnimationController.cpp: (WebCore::AnimationController::supportsAcceleratedAnimationOfProperty): * page/animation/CSSPropertyAnimation.cpp: Added. (WebCore): (WebCore::blendFunc): (WebCore::crossfadeBlend): (AnimationPropertyWrapperBase): (WebCore::AnimationPropertyWrapperBase::AnimationPropertyWrapperBase): (WebCore::AnimationPropertyWrapperBase::~AnimationPropertyWrapperBase): (WebCore::AnimationPropertyWrapperBase::isShorthandWrapper): (WebCore::AnimationPropertyWrapperBase::property): (WebCore::AnimationPropertyWrapperBase::animationIsAccelerated): (WebCore::addPropertyWrapper): (WebCore::wrapperForProperty): (PropertyWrapperGetter): (WebCore::PropertyWrapperGetter::PropertyWrapperGetter): (WebCore::PropertyWrapperGetter::equals): (PropertyWrapper): (WebCore::PropertyWrapper::PropertyWrapper): (WebCore::PropertyWrapper::blend): (RefCountedPropertyWrapper): (WebCore::RefCountedPropertyWrapper::RefCountedPropertyWrapper): (WebCore::RefCountedPropertyWrapper::blend): (StyleImagePropertyWrapper): (WebCore::StyleImagePropertyWrapper::StyleImagePropertyWrapper): (WebCore::StyleImagePropertyWrapper::equals): (PropertyWrapperColor): (WebCore::PropertyWrapperColor::PropertyWrapperColor): (WebCore::PropertyWrapperColor::blend): (PropertyWrapperAcceleratedOpacity): (WebCore::PropertyWrapperAcceleratedOpacity::PropertyWrapperAcceleratedOpacity): (WebCore::PropertyWrapperAcceleratedOpacity::animationIsAccelerated): (WebCore::PropertyWrapperAcceleratedOpacity::blend): (PropertyWrapperAcceleratedTransform): (WebCore::PropertyWrapperAcceleratedTransform::PropertyWrapperAcceleratedTransform): (WebCore::PropertyWrapperAcceleratedTransform::animationIsAccelerated): (WebCore::PropertyWrapperAcceleratedTransform::blend): (PropertyWrapperAcceleratedFilter): (WebCore::PropertyWrapperAcceleratedFilter::PropertyWrapperAcceleratedFilter): (WebCore::PropertyWrapperAcceleratedFilter::animationIsAccelerated): (WebCore::PropertyWrapperAcceleratedFilter::blend): (WebCore::shadowListLength): (WebCore::shadowForBlending): (PropertyWrapperShadow): (WebCore::PropertyWrapperShadow::PropertyWrapperShadow): (WebCore::PropertyWrapperShadow::equals): (WebCore::PropertyWrapperShadow::blend): (WebCore::PropertyWrapperShadow::blendSimpleOrMatchedShadowLists): (WebCore::PropertyWrapperShadow::blendMismatchedShadowLists): (PropertyWrapperMaybeInvalidColor): (WebCore::PropertyWrapperMaybeInvalidColor::PropertyWrapperMaybeInvalidColor): (WebCore::PropertyWrapperMaybeInvalidColor::equals): (WebCore::PropertyWrapperMaybeInvalidColor::blend): (PropertyWrapperVisitedAffectedColor): (WebCore::PropertyWrapperVisitedAffectedColor::PropertyWrapperVisitedAffectedColor): (WebCore::PropertyWrapperVisitedAffectedColor::equals): (WebCore::PropertyWrapperVisitedAffectedColor::blend): (FillLayerAnimationPropertyWrapperBase): (WebCore::FillLayerAnimationPropertyWrapperBase::FillLayerAnimationPropertyWrapperBase): (WebCore::FillLayerAnimationPropertyWrapperBase::~FillLayerAnimationPropertyWrapperBase): (FillLayerPropertyWrapperGetter): (WebCore::FillLayerPropertyWrapperGetter::FillLayerPropertyWrapperGetter): (WebCore::FillLayerPropertyWrapperGetter::equals): (FillLayerPropertyWrapper): (WebCore::FillLayerPropertyWrapper::FillLayerPropertyWrapper): (WebCore::FillLayerPropertyWrapper::blend): (FillLayerRefCountedPropertyWrapper): (WebCore::FillLayerRefCountedPropertyWrapper::FillLayerRefCountedPropertyWrapper): (WebCore::FillLayerRefCountedPropertyWrapper::blend): (FillLayerStyleImagePropertyWrapper): (WebCore::FillLayerStyleImagePropertyWrapper::FillLayerStyleImagePropertyWrapper): (WebCore::FillLayerStyleImagePropertyWrapper::equals): (FillLayersPropertyWrapper): (WebCore::FillLayersPropertyWrapper::FillLayersPropertyWrapper): (WebCore::FillLayersPropertyWrapper::equals): (WebCore::FillLayersPropertyWrapper::blend): (ShorthandPropertyWrapper): (WebCore::ShorthandPropertyWrapper::ShorthandPropertyWrapper): (WebCore::ShorthandPropertyWrapper::isShorthandWrapper): (WebCore::ShorthandPropertyWrapper::equals): (WebCore::ShorthandPropertyWrapper::blend): (WebCore::ShorthandPropertyWrapper::propertyWrappers): (PropertyWrapperFlex): (WebCore::PropertyWrapperFlex::PropertyWrapperFlex): (WebCore::PropertyWrapperFlex::equals): (WebCore::PropertyWrapperFlex::blend): (PropertyWrapperSVGPaint): (WebCore::PropertyWrapperSVGPaint::PropertyWrapperSVGPaint): (WebCore::PropertyWrapperSVGPaint::equals): (WebCore::PropertyWrapperSVGPaint::blend): (WebCore::addShorthandProperties): (WebCore::CSSPropertyAnimation::ensurePropertyMap): (WebCore::gatherEnclosingShorthandProperties): (WebCore::CSSPropertyAnimation::blendProperties): (WebCore::CSSPropertyAnimation::animationOfPropertyIsAccelerated): (WebCore::CSSPropertyAnimation::animatableShorthandsAffectingProperty): (WebCore::CSSPropertyAnimation::propertiesEqual): (WebCore::CSSPropertyAnimation::getPropertyAtIndex): (WebCore::CSSPropertyAnimation::getNumProperties): * page/animation/CSSPropertyAnimation.h: Added. (WebCore): (CSSPropertyAnimation): * page/animation/CompositeAnimation.cpp: (WebCore::CompositeAnimation::updateTransitions): (WebCore::CompositeAnimation::pauseTransitionAtTime): * page/animation/ImplicitAnimation.cpp: (WebCore::ImplicitAnimation::animate): (WebCore::ImplicitAnimation::getAnimatedStyle): (WebCore::ImplicitAnimation::isTargetPropertyEqual): (WebCore::ImplicitAnimation::blendPropertyValueInStyle): (WebCore::ImplicitAnimation::timeToNextService): * page/animation/KeyframeAnimation.cpp: (WebCore::KeyframeAnimation::animate): (WebCore::KeyframeAnimation::getAnimatedStyle): (WebCore::KeyframeAnimation::timeToNextService): * rendering/style/RenderStyle.h: 2012-04-28 Geoffrey Garen Clarified JSGlobalData (JavaScript VM) lifetime https://bugs.webkit.org/show_bug.cgi?id=85142 Reviewed by Anders Carlsson. * bindings/js/WorkerScriptController.cpp: (WebCore::WorkerScriptController::~WorkerScriptController): Slightly simpler than before. We can't just rely on our default destructor because we need to hold the JSLock when we tear down the VM. * bridge/NP_jsobject.cpp: (_NPN_InvokeDefault): (_NPN_Invoke): (_NPN_Evaluate): (_NPN_Construct): Don't RefPtr<> the JSGlobalData because it makes it seem like you know something the rest of our code doesn't know. The plugin JSGlobalData is immortal, anyway. I also removed some timeout checker related code because that feature doesn't work anymore, so it was effectively dead code. 2012-04-28 Ilya Tikhonovsky Web Inspector: InspectorFrontendHost.append has to be implemented for saving heap snapshots. https://bugs.webkit.org/show_bug.cgi?id=85137 We can save a file with help of InspectorFrontendHost.save method, but it is suitable only for relatively small portions of data and can't process the 6Gb heap snapshot. These methods just pass the url and content into embedder. Reviewed by Yury Semikhatsky. * inspector/InspectorFrontendClient.h: (InspectorFrontendClient): * inspector/InspectorFrontendClientLocal.h: (WebCore::InspectorFrontendClientLocal::append): * inspector/InspectorFrontendHost.cpp: (WebCore::InspectorFrontendHost::append): (WebCore): * inspector/InspectorFrontendHost.h: (InspectorFrontendHost): * inspector/InspectorFrontendHost.idl: 2012-04-28 No'am Rosenthal [Qt][Texmap] Error of cross-compiling webkit with Qt 4.8.1 https://bugs.webkit.org/show_bug.cgi?id=84321 Speculative build-fix for Qt 4.8. Use QGLContext for Qt 4.x instead of the platform-specific context. Reviewed by Simon Hausmann. No new tests, build fix. * platform/graphics/texmap/TextureMapperGL.cpp: (SharedGLData): (WebCore::TextureMapperGLData::SharedGLData::getCurrentGLContext): 2012-04-28 No'am Rosenthal [Texmap] Falling leaves demo missing opacity fade out animation https://bugs.webkit.org/show_bug.cgi?id=83691 Reviewed by Martin Robinson. The bug originated from clearing an intermediate surface with glClear while the scissor state was wrong. When using intermediate surfaces, maintain a clip-stack for each surface, rather than a single clip-stack for the whole scene. When a surface is bound, its clip stack should be applied. Covered by existing compositing tests. * platform/graphics/texmap/TextureMapperGL.cpp: (SharedGLData): (WebCore::TextureMapperGL::ClipStack::push): (WebCore): (WebCore::TextureMapperGL::ClipStack::pop): (WebCore::scissorClip): (WebCore::TextureMapperGL::ClipStack::apply): (WebCore::TextureMapperGL::clipStack): (WebCore::TextureMapperGL::beginPainting): (WebCore::TextureMapperGL::drawTexture): (WebCore::BitmapTextureGL::didReset): (WebCore::BitmapTextureGL::clearIfNeeded): (WebCore::BitmapTextureGL::createFboIfNeeded): (WebCore::BitmapTextureGL::bind): (WebCore::TextureMapperGL::bindDefaultSurface): (WebCore::TextureMapperGL::bindSurface): (WebCore::TextureMapperGL::beginScissorClip): (WebCore::TextureMapperGL::beginClip): (WebCore::TextureMapperGL::endClip): * platform/graphics/texmap/TextureMapperGL.h: (TextureMapperGL): (ClipState): (WebCore::TextureMapperGL::ClipState::ClipState): (ClipStack): (WebCore::TextureMapperGL::ClipStack::current): (WebCore::TextureMapperGL::ClipStack::clear): (BitmapTextureGL): (WebCore::BitmapTextureGL::BitmapTextureGL): 2012-04-26 Emil A Eklund and Levi Weintraub Move Length and CSS length computation to float https://bugs.webkit.org/show_bug.cgi?id=84801 Reviewed by Eric Seidel. Change Length and CSS length computation to floating point. This gets us closer to the goal of supporting subpixel layout and improves precision for SVG which already uses floating point for its layout. This change makes computedStyle return fractional values for pixel values if a fraction is specified. It also changes the result of computations where two or more values with fractional precision. Prior to this change the result of Length(2.9) + Length(2.9) would be 4 as each value would be floored. With this change the result is 5 as the addition is done with floating point precision and then the result will be floored. Once we enable subpixel layout the resulting value in this example would be 5.8. Updated existing layout tests. * css/CSSComputedStyleDeclaration.cpp: (WebCore::zoomAdjustedPixelValue): * css/CSSPrimitiveValue.cpp: (WebCore::CSSPrimitiveValue::computeLength): * css/CSSPrimitiveValue.h: (WebCore): (WebCore::roundForImpreciseConversion): Add specialized float version of roundForImpreciseConversion that matches the int versions rounding logic. If a value is sufficiently close to the next integer round it up to ensure that a style rule such as "width: 4.999px" evaluates to 5px instead of 4px. This is needed as, although Lengths are using floating point, the layout system still uses integer precision and floors the Length values. This will change once we move to FractionalLayoutUnits but for now this is needed to ensure compatibility with the existing system and tests. Without this specialized rounding logic we fail a handful of tests including acid3. * platform/Length.h: (WebCore::Length::value): (Length): (WebCore::Length::intValue): * rendering/RenderTableCell.cpp: (WebCore::RenderTableCell::styleOrColLogicalWidth): 2012-04-28 Alexander Pavlov Web Inspector: Enable touch events feature fails touch feature detection https://bugs.webkit.org/show_bug.cgi?id=84397 Whenever the touch emulation is enabled, Inspector adds a script to evaluate on load, that adds ontouch(start|end|move|cancel) properties to window.__proto__ and document.__proto__. Reviewed by Pavel Feldman. * inspector/front-end/DOMAgent.js: (WebInspector.DOMAgent.prototype._emulateTouchEventsChanged.get if): (WebInspector.DOMAgent.prototype._emulateTouchEventsChanged.scriptAddedCallback): (WebInspector.DOMAgent.prototype._emulateTouchEventsChanged): * inspector/front-end/inspector.js: 2012-04-28 Eugene Klyuchnikov Web Inspector: Shortcuts screen UI polish https://bugs.webkit.org/show_bug.cgi?id=84708 1) remove inconsistent shadow; 2) reduce border radius; 3) vertically center the “X” button; 4) replace unreadable symbolic shortcuts with text; 5) gaps / colors / opacity adjustments; 6) section-to-column distribution algorithm is replaced with a fair one. Reviewed by Pavel Feldman. This is a UI polising patch, so no new tests added. * English.lproj/localizedStrings.js: added keyboars arrow keys items * inspector/front-end/KeyboardShortcut.js: replace unreadable symbolic shortcuts with text * inspector/front-end/ShortcutsScreen.js: (WebInspector.ShortcutsScreen): (WebInspector.ShortcutsScreen.prototype.show): remove redundant parameter (WebInspector.ShortcutsScreen.prototype._buildTable): change section distributing algorithm (WebInspector.ShortcutsSection.prototype.renderSection): render colon with margins (WebInspector.ShortcutsSection.prototype._renderHeader): apply classname to th elements * inspector/front-end/helpScreen.css: (.help-window-main): reduce radius, remove shadow; tune color and opacity (.help-window-caption): fix spacing; add ruler (.help-window-title): fix spacing; remove ruler (.help-content): fix spacing (.help-close-button): fix spacing; adjust background color (.help-column-table): fix spacing (.help-table > tr > th): fix color (.help-key): fix color (.help-combine-keys, .help-key-delimiter): extract common style (.help-combine-keys): remove dupe (.help-section-title): add space between sections 2012-04-28 Noel Gordon Remove PlatformTouchPointQt.cpp PlatformTouchEventQt.cpp from the gyp projects https://bugs.webkit.org/show_bug.cgi?id=85132 Unreviewed VS2010 gyp project generation fix. PlatformTouchPointQt.cpp and PlatformTouchEventQt.cpp were removed in r115312, so remove them from the gyp projects. * WebCore.gypi: 2012-04-28 Nikolas Zimmermann should use '0' as effective from value not '1', if no base value is specified and from is not given https://bugs.webkit.org/show_bug.cgi?id=85133 It should start from scale=0. I had that fixed before, but it got lost during merging. Restore the fix. See bug 85051, for more context why this is correct. Tests: svg/animations/animateTransform-by-scale-1-expected.svg svg/animations/animateTransform-by-scale-1.svg * svg/SVGAnimatedTransformList.cpp: (WebCore::SVGAnimatedTransformListAnimator::calculateAnimatedValue): 2012-04-28 Nikolas Zimmermann SVGAnimateColorElement doesn't support by/to animations properly https://bugs.webkit.org/show_bug.cgi?id=36704 Reviewed by Antti Koivisto. Switch AnimatedColorAnimator to use the standard animateAdditiveNumber() method, taking progress & repeatCount into account. This gives us accumulation/repeatCount support for free. We just animate the four color components on their own now and clamp once at the end after addition/accumulation finished. Import tests from Dr. Olaf Hoffmanns SVG Animation test suite, which all pass now. While I was at it, remove the includeSMILProperties boolean from computeCSSPropertyValue - we always use the computed style without SMIL effects included, whenever we want to retrieve the "base value", or handle "inherit/currentColor". Tests: svg/animations/animateColor-additive-2a-expected.svg svg/animations/animateColor-additive-2a.svg svg/animations/animateColor-additive-2b-expected.svg svg/animations/animateColor-additive-2b.svg svg/animations/animateColor-additive-2c-expected.svg svg/animations/animateColor-additive-2c.svg svg/animations/animateColor-additive-2d-expected.svg svg/animations/animateColor-additive-2d.svg * svg/ColorDistance.cpp: (WebCore::ColorDistance::clampColor): (WebCore::ColorDistance::addColors): (WebCore::ColorDistance::addToColor): * svg/ColorDistance.h: (ColorDistance): * svg/SVGAnimateElement.cpp: (WebCore::SVGAnimateElement::resetToBaseValue): * svg/SVGAnimatedColor.cpp: (WebCore::SVGAnimatedColorAnimator::addAnimatedTypes): (WebCore::SVGAnimatedColorAnimator::calculateAnimatedValue): * svg/SVGAnimationElement.cpp: (WebCore::SVGAnimationElement::computeCSSPropertyValue): (WebCore::SVGAnimationElement::adjustForInheritance): * svg/SVGAnimationElement.h: (SVGAnimationElement): 2012-04-28 Nikolas Zimmermann Not reviewed. Fix Qt build -- I was too quick. * rendering/svg/SVGPathData.cpp: Add back Path.h include. 2012-04-28 Nikolas Zimmermann Rename SVGPathParserFactory to SVGPathUtilities and remove the obsolete singleton https://bugs.webkit.org/show_bug.cgi?id=85129 SVGPathParserFactory implements the singleton pattern, but stores no members. Remove the singleton and move all functions to free-functions into SVGPathUtilities.h. Makes the code easier to read - doesn't affect any tests. * CMakeLists.txt: * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * rendering/svg/SVGPathData.cpp: (WebCore::updatePathFromPathElement): * rendering/svg/SVGRenderTreeAsText.cpp: (WebCore::operator<<): * svg/SVGAllInOne.cpp: * svg/SVGAnimateMotionElement.cpp: (WebCore::SVGAnimateMotionElement::parseAttribute): * svg/SVGAnimatedPath.cpp: (WebCore::SVGAnimatedPathAnimator::constructFromString): (WebCore::SVGAnimatedPathAnimator::startAnimValAnimation): (WebCore::SVGAnimatedPathAnimator::resetAnimValToBaseVal): (WebCore::SVGAnimatedPathAnimator::addAnimatedTypes): (WebCore::SVGAnimatedPathAnimator::calculateAnimatedValue): * svg/SVGAnimatedType.cpp: * svg/SVGGlyphElement.cpp: (WebCore::SVGGlyphElement::buildGenericGlyphIdentifier): * svg/SVGPathBlender.cpp: Fix typo s/;;/;/ * svg/SVGPathElement.cpp: (WebCore::SVGPathElement::getTotalLength): (WebCore::SVGPathElement::getPointAtLength): (WebCore::SVGPathElement::getPathSegAtLength): (WebCore::SVGPathElement::parseAttribute): (WebCore::SVGPathElement::svgAttributeChanged): (WebCore::SVGPathElement::lookupOrCreateDWrapper): (WebCore::SVGPathElement::pathSegListChanged): * svg/SVGPathParserFactory.h: Removed. * svg/SVGPathSegList.cpp: (WebCore::SVGPathSegList::valueAsString): * svg/SVGPathUtilities.cpp: Renamed from Source/WebCore/svg/SVGPathParserFactory.cpp. (WebCore): (WebCore::globalSVGPathBuilder): (WebCore::globalSVGPathSegListBuilder): (WebCore::globalSVGPathByteStreamBuilder): (WebCore::globalSVGPathStringBuilder): (WebCore::globalSVGPathTraversalStateBuilder): (WebCore::globalSVGPathParser): (WebCore::globalSVGPathBlender): (WebCore::buildPathFromString): (WebCore::buildSVGPathByteStreamFromSVGPathSegList): (WebCore::buildPathFromByteStream): (WebCore::buildSVGPathSegListFromByteStream): (WebCore::buildStringFromByteStream): (WebCore::buildStringFromSVGPathSegList): (WebCore::buildSVGPathByteStreamFromString): (WebCore::buildAnimatedSVGPathByteStream): (WebCore::addToSVGPathByteStream): (WebCore::getSVGPathSegAtLengthFromSVGPathByteStream): (WebCore::getTotalLengthOfSVGPathByteStream): (WebCore::getPointAtLengthOfSVGPathByteStream): * svg/SVGPathUtilities.h: Added. (WebCore): * svg/properties/SVGAnimatedPathSegListPropertyTearOff.h: (WebCore::SVGAnimatedPathSegListPropertyTearOff::animValDidChange): 2012-04-28 Nikolas Zimmermann Fix repetitions & by animation support for path animations https://bugs.webkit.org/show_bug.cgi?id=85071 Rubber-stamped by Antti Koivisto. Cleanup SVGPathBlender, to make it more readable. * svg/SVGPathBlender.cpp: (WebCore::SVGPathBlender::blendLineToHorizontalSegment): (WebCore::SVGPathBlender::blendLineToVerticalSegment): (WebCore::SVGPathBlender::blendArcToSegment): (WebCore::SVGPathBlender::blendAnimatedPath): 2012-04-28 Yury Semikhatsky Unreviewed. Qt build fix: added new exported symbols. * WebCore.exp.in: 2012-04-28 Yury Semikhatsky Unreviewed. Fix Qt minimal build after r115553. * inspector/InspectorConsoleAgent.h: 2012-04-27 Nikolas Zimmermann Fix repetitions & by animation support for path animations https://bugs.webkit.org/show_bug.cgi?id=85071 Reviewed by Antti Koivisto. Implement additive="sum" / by-animation support for path animations, eg. animates the d attribute to "M 10 10 L 100 100 0 Z". Now only and are left to be fixed, all other types are working as expected now in all additive/accumulate/from-by/by/from-to animations. Tests: svg/animations/path-animation-expected.svg svg/animations/repeating-path-animation-expected.svg svg/animations/repeating-path-animation.svg * svg/SVGAnimatedPath.cpp: (WebCore::SVGAnimatedPathAnimator::addAnimatedTypes): Implemented, to support by-animations, instead of falling back to to-animations. (WebCore::SVGAnimatedPathAnimator::calculateAnimatedValue): Handle repetitions, accumulation & addition. * svg/SVGPathBlender.cpp: Allow empty from source everywhere, use default values if no from value is specified, needed for by-animations. (WebCore::SVGPathBlender::SVGPathBlender): (WebCore::SVGPathBlender::blendAnimatedDimensonalFloat): (WebCore::SVGPathBlender::blendAnimatedFloatPoint): (WebCore::SVGPathBlender::blendMoveToSegment): (WebCore::SVGPathBlender::blendLineToSegment): (WebCore::SVGPathBlender::blendLineToHorizontalSegment): (WebCore::SVGPathBlender::blendLineToVerticalSegment): (WebCore::SVGPathBlender::blendCurveToCubicSegment): (WebCore::SVGPathBlender::blendCurveToCubicSmoothSegment): (WebCore::SVGPathBlender::blendCurveToQuadraticSegment): (WebCore::SVGPathBlender::blendCurveToQuadraticSmoothSegment): (WebCore::SVGPathBlender::blendArcToSegment): (WebCore::SVGPathBlender::addAnimatedPath): (WebCore::SVGPathBlender::blendAnimatedPath): * svg/SVGPathBlender.h: Add new addAnimatedPath function. (SVGPathBlender): * svg/SVGPathByteStream.h: (SVGPathByteStream): Make SVGPathByteStreams copyable, needed for SVGAnimatedPathAnimator. (WebCore::SVGPathByteStream::size): Returns size of the SVGPathByteStream. * svg/SVGPathParserFactory.cpp: (WebCore::SVGPathParserFactory::buildAnimatedSVGPathByteStream): Allow empty from streams, needed for by animations. (WebCore::SVGPathParserFactory::addToSVGPathByteStream): Add 'byStream' 'repeatCount' times to 'toStream'. Both streams must match in size. * svg/SVGPathParserFactory.h: Add new addToSVGPathByteStream function. * svg/SVGPointList.cpp: Remove dead code. * svg/SVGPointList.h: Ditto. (SVGPointList): 2012-04-28 Nikolas Zimmermann SVGAnimateMotion does not handle accumulation https://bugs.webkit.org/show_bug.cgi?id=18564 Reviewed by Antti Koivisto. Implement accumulation for . Add lots of new reftests, verifying additive/accumulate behavior is correct. Tests: svg/animations/animateMotion-additive-1-expected.svg svg/animations/animateMotion-additive-1.svg svg/animations/animateMotion-additive-2a-expected.svg svg/animations/animateMotion-additive-2a.svg svg/animations/animateMotion-additive-2b-expected.svg svg/animations/animateMotion-additive-2b.svg svg/animations/animateMotion-additive-2c-expected.svg svg/animations/animateMotion-additive-2c.svg svg/animations/animateMotion-additive-2d-expected.svg svg/animations/animateMotion-additive-2d.svg svg/animations/mozilla/animateMotion-by-1-expected.svg svg/animations/mozilla/animateMotion-by-1.svg svg/animations/mozilla/animateMotion-from-to-1-expected.svg svg/animations/mozilla/animateMotion-from-to-1.svg svg/animations/mozilla/animateMotion-indefinite-to-1-expected.svg svg/animations/mozilla/animateMotion-indefinite-to-1.svg svg/animations/mozilla/animateMotion-indefinite-to-2-expected.svg svg/animations/mozilla/animateMotion-indefinite-to-2.svg svg/animations/mozilla/animateMotion-mpath-pathLength-1-expected.svg svg/animations/mozilla/animateMotion-mpath-pathLength-1.svg svg/animations/mozilla/animateMotion-mpath-targetChange-1-expected.svg svg/animations/mozilla/animateMotion-mpath-targetChange-1.svg svg/animations/mozilla/animateMotion-to-overridden-1-expected.svg svg/animations/mozilla/animateMotion-to-overridden-1.svg * svg/SVGAnimateMotionElement.cpp: (WebCore::SVGAnimateMotionElement::SVGAnimateMotionElement): (WebCore::SVGAnimateMotionElement::buildTransformForProgress): (WebCore::SVGAnimateMotionElement::calculateAnimatedValue): * svg/SVGAnimateMotionElement.h: 2012-04-27 Yury Semikhatsky ScriptStateProtectedPtr should not keep a strong reference to the context https://bugs.webkit.org/show_bug.cgi?id=85009 Delete console message arguments when DOMWindow where the messages were created is reset on its frame. Reviewed by Pavel Feldman. Test: http/tests/inspector-enabled/console-clear-arguments-on-frame-navigation.html * inspector/ConsoleMessage.cpp: (WebCore::ConsoleMessage::addToFrontend): (WebCore::ConsoleMessage::windowCleared): (WebCore::ConsoleMessage::argumentCount): (WebCore): * inspector/ConsoleMessage.h: (ConsoleMessage): * inspector/InspectorConsoleAgent.cpp: (WebCore::InspectorConsoleAgent::consoleMessageArgumentCounts): (WebCore): * inspector/InspectorConsoleAgent.h: (InspectorConsoleAgent): * page/Frame.cpp: (WebCore::Frame::clearDOMWindow): (WebCore::Frame::setDOMWindow): * testing/Internals.cpp: (WebCore): (WebCore::Internals::consoleMessageArgumentCounts): * testing/Internals.h: (Internals): * testing/Internals.idl: 2012-04-27 Jochen Eisinger Ensure that there's always a provisional document loader if the frame loader is in provisional state https://bugs.webkit.org/show_bug.cgi?id=83894 Reviewed by Nate Chapin. We're still seeing crashes in the FrameLoader where the FrameLoader's state is "provisional" but there is no provisional document loader. I added code to update the FrameLoader's state everytime the provisional document loader is cleared, and added checks that the FrameLoader's state can't be set to provisional without a provisional loader. If the crashes go away, or the newly added checks reveal the culprit, we should relex the checks to use ASSERT() instead of CRASH(). * loader/FrameLoader.cpp: (WebCore::FrameLoader::init): (WebCore::FrameLoader::setupForReplace): (WebCore::FrameLoader::stopAllLoaders): (WebCore::FrameLoader::clearProvisionalLoad): (WebCore::FrameLoader::continueFragmentScrollAfterNavigationPolicy): (WebCore::FrameLoader::continueLoadAfterNavigationPolicy): 2012-04-27 Geoffrey Garen Try to fix the Qt build. * bridge/qt/qt_runtime.cpp: (JSC::Bindings::QtRuntimeMethod::finishCreation): 2012-04-27 Geoffrey Garen Made WeakSet::allocate() static and removed its JSGlobalData argument https://bugs.webkit.org/show_bug.cgi?id=85128 Reviewed by Anders Carlsson. Mechanically removed JSGlobalData arguments from PassWeak and Weak allocation. * bindings/js/JSDOMBinding.cpp: (WebCore::jsStringSlowCase): * bindings/js/JSEventListener.h: (WebCore::JSEventListener::setWrapper): * bindings/js/JSNodeFilterCondition.cpp: (WebCore::JSNodeFilterCondition::JSNodeFilterCondition): * bindings/js/ScriptWrappable.h: (WebCore::ScriptWrappable::setWrapper): * bridge/jsc/BridgeJSC.cpp: (JSC::Bindings::Instance::createRuntimeObject): * bridge/qt/qt_runtime.cpp: (JSC::Bindings::QtRuntimeMethod::finishCreation): * bridge/runtime_root.cpp: (JSC::Bindings::RootObject::addRuntimeObject): 2012-04-27 Mark Rowe Leaks under WebCore::CSSImageSetValue::cachedImageSet when running tests There was a reference cycle between CSSImageSetValue and StyleCachedImageSet via CSSImageSetValue::m_imageSet / StyleCachedImageSet::m_imageSetValue. Break the cycle by having StyleCachedImageSet hold a weak reference to the CSSImageSetValue rather than a strong reference. Reviewed by Geoff Garen. * rendering/style/StyleCachedImageSet.cpp: (WebCore::StyleCachedImageSet::StyleCachedImageSet): * rendering/style/StyleCachedImageSet.h: (StyleCachedImageSet): 2012-04-27 Mark Rowe REGRESSION: Cannot enter text in Dashboard widget fields that have placeholder attribute Remove a dashboard backwards compatibility quirk that was in place to support an old version of the Stocks widget. It prevented the pointer-events property from being applied in Dashboard widgets, which caused -webkit-input-placeholder elements to eat mouse clicks rather than giving focus to the containing input elements. The offending widget has long since been fixed. Reviewed by Dan Bernstein. * css/StyleResolver.cpp: (WebCore::StyleResolver::collectMatchingRulesForList): 2012-04-27 Dean Jackson Support reverse and alternate-reverse in CA animations https://bugs.webkit.org/show_bug.cgi?id=78041 Reviewed by Beth Dakin. CoreAnimation does not natively support reverse and alternate-reverse animation directions so we need to flip the animation values (keyframe keys and timing functions) that we send to GraphicsLayerCA. Unfortunately this code adds a lot of conditionals because it isn't as simple as reversing the order of keys. You also now have a different alignment of timing functions to the reversed list. New tests to cover the two new directions, making sure the timing functions are correctly inverted, and exercising fill modes. Tests: animations/animation-direction-reverse-fill-mode-hardware.html animations/animation-direction-reverse-fill-mode.html animations/animation-direction-reverse-hardware-opacity.html animations/animation-direction-reverse-hardware.html animations/animation-direction-reverse-non-hardware.html animations/animation-direction-reverse-timing-functions-hardware.html animations/animation-direction-reverse-timing-functions.html * platform/graphics/ca/GraphicsLayerCA.cpp: Handle the previously unsupported animation directions, reversing the list of values and keytimes that would be used to create the CA Animation. (WebCore::GraphicsLayerCA::addAnimation): Do not create an animation if on Windows and using a reverse direction. (WebCore::GraphicsLayerCA::createFilterAnimationsFromKeyframes): (WebCore::GraphicsLayerCA::setupAnimation): (WebCore::GraphicsLayerCA::setAnimationEndpoints): (WebCore::GraphicsLayerCA::setAnimationKeyframes): (WebCore::GraphicsLayerCA::setTransformAnimationEndpoints): (WebCore::GraphicsLayerCA::setTransformAnimationKeyframes): (WebCore::GraphicsLayerCA::setFilterAnimationEndpoints): (WebCore::GraphicsLayerCA::setFilterAnimationKeyframes): * platform/graphics/ca/PlatformCAAnimation.h: (PlatformCAAnimation): Pass through a flag that tells the CA Animation that it should invert the timing functions. * platform/graphics/ca/mac/PlatformCAAnimationMac.mm: (toCAMediaTimingFunction): Add a parameter that will invert the timing function coefficients if necessary. (PlatformCAAnimation::setTimingFunction): (PlatformCAAnimation::setTimingFunctions): * platform/graphics/ca/win/PlatformCAAnimationWin.cpp: (toCACFTimingFunction): New unused parameter. 2012-04-27 Sheriff Bot Unreviewed, rolling out r115407. http://trac.webkit.org/changeset/115407 https://bugs.webkit.org/show_bug.cgi?id=85126 Caused heap use after free (Requested by keishi_ on #webkit). * html/HTMLFormControlElement.cpp: (WebCore::HTMLFormControlElement::HTMLFormControlElement): (WebCore::HTMLFormControlElement::updateFieldSetAndLegendAncestor): (WebCore::HTMLFormControlElement::insertedInto): (WebCore::HTMLFormControlElement::removedFrom): (WebCore::HTMLFormControlElement::disabled): (WebCore::HTMLFormControlElement::recalcWillValidate): (WebCore::HTMLFormControlElement::setNeedsWillValidateCheck): * html/HTMLFormControlElement.h: (HTMLFormControlElement): 2012-04-27 Kentaro Hara [JSC] Implement a helper method createNotEnoughArgumentsError() https://bugs.webkit.org/show_bug.cgi?id=85102 Reviewed by Geoffrey Garen. In bug 84787, kbr@ requested to avoid hard-coding createTypeError(exec, "Not enough arguments") here and there. This patch implements createNotEnoughArgumentsError(exec) and uses it in JSC bindings. c.f. a corresponding bug for V8 bindings is bug 85097. Test: bindings/scripts/test/TestObj.idl * bindings/scripts/CodeGeneratorJS.pm: Modified as described above. (GenerateArgumentsCountCheck): * bindings/js/JSDataViewCustom.cpp: Ditto. (WebCore::getDataViewMember): (WebCore::setDataViewMember): * bindings/js/JSDeprecatedPeerConnectionCustom.cpp: (WebCore::JSDeprecatedPeerConnectionConstructor::constructJSDeprecatedPeerConnection): * bindings/js/JSDirectoryEntryCustom.cpp: (WebCore::JSDirectoryEntry::getFile): (WebCore::JSDirectoryEntry::getDirectory): * bindings/js/JSSharedWorkerCustom.cpp: (WebCore::JSSharedWorkerConstructor::constructJSSharedWorker): * bindings/js/JSWebKitMutationObserverCustom.cpp: (WebCore::JSWebKitMutationObserverConstructor::constructJSWebKitMutationObserver): (WebCore::JSWebKitMutationObserver::observe): * bindings/js/JSWorkerCustom.cpp: (WebCore::JSWorkerConstructor::constructJSWorker): * bindings/scripts/test/JS/JSFloat64Array.cpp: Updated run-bindings-tests. (WebCore::jsFloat64ArrayPrototypeFunctionFoo): * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp: (WebCore::jsTestActiveDOMObjectPrototypeFunctionExcitingFunction): (WebCore::jsTestActiveDOMObjectPrototypeFunctionPostMessage): * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp: (WebCore::jsTestCustomNamedGetterPrototypeFunctionAnotherFunction): * bindings/scripts/test/JS/JSTestEventTarget.cpp: (WebCore::jsTestEventTargetPrototypeFunctionItem): (WebCore::jsTestEventTargetPrototypeFunctionAddEventListener): (WebCore::jsTestEventTargetPrototypeFunctionRemoveEventListener): (WebCore::jsTestEventTargetPrototypeFunctionDispatchEvent): * bindings/scripts/test/JS/JSTestInterface.cpp: (WebCore::JSTestInterfaceConstructor::constructJSTestInterface): (WebCore::jsTestInterfacePrototypeFunctionSupplementalMethod2): * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp: (WebCore::jsTestMediaQueryListListenerPrototypeFunctionMethod): * bindings/scripts/test/JS/JSTestNamedConstructor.cpp: (WebCore::JSTestNamedConstructorNamedConstructor::constructJSTestNamedConstructor): * bindings/scripts/test/JS/JSTestObj.cpp: (WebCore::JSTestObjConstructor::constructJSTestObj): (WebCore::jsTestObjPrototypeFunctionVoidMethodWithArgs): (WebCore::jsTestObjPrototypeFunctionIntMethodWithArgs): (WebCore::jsTestObjPrototypeFunctionObjMethodWithArgs): (WebCore::jsTestObjPrototypeFunctionMethodWithSequenceArg): (WebCore::jsTestObjPrototypeFunctionMethodReturningSequence): (WebCore::jsTestObjPrototypeFunctionMethodThatRequiresAllArgsAndThrows): (WebCore::jsTestObjPrototypeFunctionSerializedValue): (WebCore::jsTestObjPrototypeFunctionIdbKey): (WebCore::jsTestObjPrototypeFunctionOptionsObject): (WebCore::jsTestObjPrototypeFunctionAddEventListener): (WebCore::jsTestObjPrototypeFunctionRemoveEventListener): (WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndOptionalArg): (WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndTwoOptionalArgs): (WebCore::jsTestObjPrototypeFunctionMethodWithCallbackArg): (WebCore::jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackArg): (WebCore::jsTestObjPrototypeFunctionOverloadedMethod1): (WebCore::jsTestObjPrototypeFunctionOverloadedMethod2): (WebCore::jsTestObjPrototypeFunctionOverloadedMethod3): (WebCore::jsTestObjPrototypeFunctionOverloadedMethod4): (WebCore::jsTestObjPrototypeFunctionOverloadedMethod5): (WebCore::jsTestObjPrototypeFunctionOverloadedMethod6): (WebCore::jsTestObjPrototypeFunctionOverloadedMethod7): (WebCore::jsTestObjConstructorFunctionClassMethod2): (WebCore::jsTestObjConstructorFunctionOverloadedMethod11): (WebCore::jsTestObjConstructorFunctionOverloadedMethod12): (WebCore::jsTestObjPrototypeFunctionMethodWithUnsignedLongArray): (WebCore::jsTestObjPrototypeFunctionConvert1): (WebCore::jsTestObjPrototypeFunctionConvert2): (WebCore::jsTestObjPrototypeFunctionConvert3): (WebCore::jsTestObjPrototypeFunctionConvert4): (WebCore::jsTestObjPrototypeFunctionConvert5): (WebCore::jsTestObjPrototypeFunctionStrictFunction): * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp: (WebCore::JSTestSerializedScriptValueInterfaceConstructor::constructJSTestSerializedScriptValueInterface): (WebCore::jsTestSerializedScriptValueInterfacePrototypeFunctionAcceptTransferList): 2012-04-27 Mark Pilgrim [Chromium] Call highMemoryUsageMB directly https://bugs.webkit.org/show_bug.cgi?id=84841 Reviewed by Kentaro Hara. Part of a refactoring series. See tracking bug 82948. * bindings/v8/V8GCController.cpp: (WebCore::V8GCController::checkMemoryUsage): * platform/MemoryUsageSupport.cpp: (WebCore::MemoryUsageSupport::highMemoryUsageMB): (WebCore): * platform/MemoryUsageSupport.h: (MemoryUsageSupport): * platform/chromium/MemoryUsageSupportChromium.cpp: (WebCore::MemoryUsageSupport::highMemoryUsageMB): (WebCore): * platform/chromium/PlatformSupport.h: (PlatformSupport): 2012-04-27 Geoffrey Garen Only allow non-null pointers in the WeakSet https://bugs.webkit.org/show_bug.cgi?id=85119 Reviewed by Darin Adler. * bridge/jsc/BridgeJSC.cpp: (JSC::Bindings::Instance::Instance): Don't allocate a WeakImpl just to store null. This was needless, and is now a compile error. Instead, rely on the default constructor, which will produce a cheap null. 2012-04-27 Kentaro Hara "Not enough arguments" error should be TypeError https://bugs.webkit.org/show_bug.cgi?id=84628 Reviewed by Darin Adler. Currently, some custom bindings implement "Not enough arguments" error as SyntaxError. The Web IDL spec requires that it should be TypeError: http://www.w3.org/TR/WebIDL/#dfn-overload-resolution-algorithm Thus, this patch changes SyntaxError to TypeError. Tests: http/tests/websocket/tests/hixie76/url-parsing.html: http/tests/websocket/tests/hybi/url-parsing.html: http/tests/xmlhttprequest/exceptions.html: svg/dom/SVGLength.html: webaudio/audionode.html: * bindings/js/JSAudioContextCustom.cpp: (WebCore::JSAudioContextConstructor::constructJSAudioContext): * bindings/js/JSSVGLengthCustom.cpp: (WebCore::JSSVGLength::convertToSpecifiedUnits): * bindings/js/JSWebSocketCustom.cpp: (WebCore::JSWebSocketConstructor::constructJSWebSocket): (WebCore::JSWebSocket::send): * bindings/js/JSXMLHttpRequestCustom.cpp: (WebCore::JSXMLHttpRequest::open): * bindings/v8/custom/V8AudioContextCustom.cpp: (WebCore::V8AudioContext::constructorCallback): * bindings/v8/custom/V8SVGLengthCustom.cpp: (WebCore::V8SVGLength::convertToSpecifiedUnitsCallback): * bindings/v8/custom/V8WebSocketCustom.cpp: (WebCore::V8WebSocket::constructorCallback): (WebCore::V8WebSocket::sendCallback): * bindings/v8/custom/V8XMLHttpRequestCustom.cpp: (WebCore::V8XMLHttpRequest::openCallback): 2012-04-27 Kenneth Russell Remove SHADER_COMPILER constant https://bugs.webkit.org/show_bug.cgi?id=85115 Reviewed by Darin Adler. Removed constant which was previously removed from spec. Updated layout test and expected results. * html/canvas/WebGLRenderingContext.idl: 2012-04-27 Arvid Nilsson [BlackBerry] Fixed background is scrolling in http://www.nieuwecode.nl https://bugs.webkit.org/show_bug.cgi?id=85109 Reviewed by Antonio Gomes. Since the BlackBerry port uses very similar fixed position acceleration as the Qt WebKit2 port, the same fix that worked for them in bug 83980 works for us. Fixed by opting in to the FIXED_POSITION_CREATES_STACKING_CONTEXT mechanism. Covered by existing manual test fixed-position-no-z-index.html. * css/StyleResolver.cpp: 2012-04-27 Nat Duca Expose high-resolution on requestAnimationFrame callback https://bugs.webkit.org/show_bug.cgi?id=66683 This changes requestAnimationFrame's animationStartTime argument to be a high resolution DOM timestamp, per disucssion here: http://lists.w3.org/Archives/Public/public-web-perf/2012Apr/0004.html Reviewed by James Robinson. Covered by existing requestAnimationFrame tests. * dom/Document.cpp: (WebCore::Document::serviceScriptedAnimations): * dom/Document.h: (Document): * dom/ScriptedAnimationController.cpp: (WebCore::ScriptedAnimationController::ScriptedAnimationController): (WebCore::ScriptedAnimationController::serviceScriptedAnimations): (WebCore): (WebCore::ScriptedAnimationController::windowScreenDidChange): (WebCore::ScriptedAnimationController::scheduleAnimation): (WebCore::ScriptedAnimationController::animationTimerFired): (WebCore::ScriptedAnimationController::displayRefreshFired): * dom/ScriptedAnimationController.h: (ScriptedAnimationController): * page/FrameView.cpp: (WebCore::FrameView::serviceScriptedAnimations): * page/FrameView.h: (FrameView): * platform/graphics/DisplayRefreshMonitor.cpp: (WebCore::DisplayRefreshMonitor::DisplayRefreshMonitor): (WebCore::DisplayRefreshMonitor::notifyClients): * platform/graphics/DisplayRefreshMonitor.h: (DisplayRefreshMonitor): * platform/graphics/blackberry/DisplayRefreshMonitorBlackBerry.cpp: (WebCore::DisplayRefreshMonitor::displayLinkFired): * platform/graphics/mac/DisplayRefreshMonitorMac.cpp: (WebCore): (WebCore::DisplayRefreshMonitor::requestRefreshCallback): (WebCore::DisplayRefreshMonitor::displayLinkFired): 2012-04-27 Kentaro Hara [V8] Implement a helper method V8Proxy::throwNotEnoughArgumentsError() https://bugs.webkit.org/show_bug.cgi?id=85097 Reviewed by Kenneth Russell. In bug 84787, kbr requested to avoid hard-coding throwError("Not enough arguments", V8Proxy::TypeError) here and there. This patch implements V8Proxy::throwNotEnoughArgumentsError() and uses it in V8 bindings. No tests. No change in behavior. * bindings/scripts/CodeGeneratorV8.pm: (GenerateArgumentsCountCheck): (GenerateEventConstructorCallback): * bindings/v8/V8Proxy.cpp: (WebCore::V8Proxy::throwNotEnoughArgmentsError): (WebCore): * bindings/v8/V8Proxy.h: (V8Proxy): * bindings/v8/custom/V8DataViewCustom.cpp: (WebCore::V8DataView::getInt8Callback): (WebCore::V8DataView::getUint8Callback): (WebCore::V8DataView::setInt8Callback): (WebCore::V8DataView::setUint8Callback): * bindings/v8/custom/V8DirectoryEntryCustom.cpp: (WebCore::V8DirectoryEntry::getDirectoryCallback): (WebCore::V8DirectoryEntry::getFileCallback): * bindings/v8/custom/V8IntentConstructor.cpp: (WebCore::V8Intent::constructorCallback): * bindings/v8/custom/V8WebKitMutationObserverCustom.cpp: (WebCore::V8WebKitMutationObserver::constructorCallback): (WebCore::V8WebKitMutationObserver::observeCallback): Test: bindings/scripts/test/TestObj.idl * bindings/scripts/CodeGeneratorV8.pm: Modified as described above. (GenerateArgumentsCountCheck): (GenerateEventConstructorCallback): * bindings/v8/V8Proxy.cpp: Ditto. (WebCore::V8Proxy::throwNotEnoughArgumentsError): (WebCore): * bindings/v8/V8Proxy.h: (V8Proxy): * bindings/v8/custom/V8DataViewCustom.cpp: (WebCore::V8DataView::getInt8Callback): (WebCore::V8DataView::getUint8Callback): (WebCore::V8DataView::setInt8Callback): (WebCore::V8DataView::setUint8Callback): * bindings/v8/custom/V8DirectoryEntryCustom.cpp: (WebCore::V8DirectoryEntry::getDirectoryCallback): (WebCore::V8DirectoryEntry::getFileCallback): * bindings/v8/custom/V8IntentConstructor.cpp: (WebCore::V8Intent::constructorCallback): * bindings/v8/custom/V8WebKitMutationObserverCustom.cpp: (WebCore::V8WebKitMutationObserver::constructorCallback): (WebCore::V8WebKitMutationObserver::observeCallback): * bindings/scripts/test/V8/V8Float64Array.cpp: Updated run-bindings-tests. (WebCore::Float64ArrayV8Internal::fooCallback): * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp: (WebCore::TestActiveDOMObjectV8Internal::excitingFunctionCallback): (WebCore::TestActiveDOMObjectV8Internal::postMessageCallback): * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp: (WebCore::TestCustomNamedGetterV8Internal::anotherFunctionCallback): * bindings/scripts/test/V8/V8TestEventConstructor.cpp: (WebCore::V8TestEventConstructor::constructorCallback): * bindings/scripts/test/V8/V8TestEventTarget.cpp: (WebCore::TestEventTargetV8Internal::itemCallback): (WebCore::TestEventTargetV8Internal::dispatchEventCallback): * bindings/scripts/test/V8/V8TestInterface.cpp: (WebCore::TestInterfaceV8Internal::supplementalMethod2Callback): (WebCore::V8TestInterface::constructorCallback): * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp: (WebCore::TestMediaQueryListListenerV8Internal::methodCallback): * bindings/scripts/test/V8/V8TestNamedConstructor.cpp: (WebCore::V8TestNamedConstructorConstructorCallback): * bindings/scripts/test/V8/V8TestObj.cpp: (WebCore::TestObjV8Internal::voidMethodWithArgsCallback): (WebCore::TestObjV8Internal::intMethodWithArgsCallback): (WebCore::TestObjV8Internal::objMethodWithArgsCallback): (WebCore::TestObjV8Internal::methodWithSequenceArgCallback): (WebCore::TestObjV8Internal::methodReturningSequenceCallback): (WebCore::TestObjV8Internal::methodThatRequiresAllArgsAndThrowsCallback): (WebCore::TestObjV8Internal::serializedValueCallback): (WebCore::TestObjV8Internal::idbKeyCallback): (WebCore::TestObjV8Internal::optionsObjectCallback): (WebCore::TestObjV8Internal::methodWithNonOptionalArgAndOptionalArgCallback): (WebCore::TestObjV8Internal::methodWithNonOptionalArgAndTwoOptionalArgsCallback): (WebCore::TestObjV8Internal::methodWithCallbackArgCallback): (WebCore::TestObjV8Internal::methodWithNonCallbackArgAndCallbackArgCallback): (WebCore::TestObjV8Internal::overloadedMethod1Callback): (WebCore::TestObjV8Internal::overloadedMethod2Callback): (WebCore::TestObjV8Internal::overloadedMethod3Callback): (WebCore::TestObjV8Internal::overloadedMethod4Callback): (WebCore::TestObjV8Internal::overloadedMethod5Callback): (WebCore::TestObjV8Internal::overloadedMethod6Callback): (WebCore::TestObjV8Internal::overloadedMethod7Callback): (WebCore::TestObjV8Internal::overloadedMethod11Callback): (WebCore::TestObjV8Internal::overloadedMethod12Callback): (WebCore::TestObjV8Internal::enabledAtRuntimeMethod1Callback): (WebCore::TestObjV8Internal::enabledAtRuntimeMethod2Callback): (WebCore::TestObjV8Internal::convert1Callback): (WebCore::TestObjV8Internal::convert2Callback): (WebCore::TestObjV8Internal::convert3Callback): (WebCore::TestObjV8Internal::convert4Callback): (WebCore::TestObjV8Internal::convert5Callback): (WebCore::TestObjV8Internal::strictFunctionCallback): (WebCore::V8TestObj::constructorCallback): * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp: (WebCore::TestSerializedScriptValueInterfaceV8Internal::acceptTransferListCallback): (WebCore::V8TestSerializedScriptValueInterface::constructorCallback): 2012-04-27 Mark Pilgrim [Chromium] Call lowMemoryUsageMB directly https://bugs.webkit.org/show_bug.cgi?id=84840 Reviewed by Kentaro Hara. Part of a refactoring series. See tracking bug 82948. * bindings/v8/V8GCController.cpp: (WebCore::V8GCController::checkMemoryUsage): * platform/MemoryUsageSupport.cpp: (WebCore::MemoryUsageSupport::lowMemoryUsageMB): (WebCore): * platform/MemoryUsageSupport.h: (MemoryUsageSupport): * platform/chromium/MemoryUsageSupportChromium.cpp: (WebCore::MemoryUsageSupport::lowMemoryUsageMB): (WebCore): * platform/chromium/PlatformSupport.h: (PlatformSupport): 2012-04-27 Yi Shen REGRESSION(113723): Pressing enter in this list example deletes the whole list https://bugs.webkit.org/show_bug.cgi?id=85016 Reviewed by Enrica Casucci. The bug was caused by CompositeEditCommand::breakOutOfEmptyListItem, which calls isListItem on the empty list's siblings to decide which part of the list should get removed. However, the check fails when the empty list's sibling is a text node, or a list element (e.g. ul, ol). Fixed it by skipping empty list's non-element sibling and calling isListElement to do further check. Test: added new test cases in the existing test (break-out-of-empty-list-item.html) * editing/CompositeEditCommand.cpp: (WebCore::CompositeEditCommand::breakOutOfEmptyListItem): 2012-04-27 Ian Vollick [chromium] Add pause and resume support for accelerated css animations. https://bugs.webkit.org/show_bug.cgi?id=84601 Reviewed by James Robinson. Tested in: CCLayerAnimationControllerTest.syncPauseResume CCActiveAnimationTest.TrimTimeTimeOffset CCActiveAnimationTest.TrimTimeSuspendResume CCActiveAnimationTest.IsFinishedNeedsSynchronizedStartTime CCActiveAnimationTest.RunStateChangesIgnoredWhileSuspended * platform/graphics/chromium/GraphicsLayerChromium.cpp: (WebCore::GraphicsLayerChromium::suspendAnimations): (WebCore::GraphicsLayerChromium::resumeAnimations): * platform/graphics/chromium/GraphicsLayerChromium.h: (GraphicsLayerChromium): * platform/graphics/chromium/LayerChromium.cpp: (WebCore::LayerChromium::suspendAnimations): (WebCore::LayerChromium::resumeAnimations): * platform/graphics/chromium/LayerChromium.h: (LayerChromium): * platform/graphics/chromium/cc/CCActiveAnimation.cpp: (WebCore::CCActiveAnimation::CCActiveAnimation): (WebCore::CCActiveAnimation::setRunState): (WebCore::CCActiveAnimation::suspend): (WebCore::CCActiveAnimation::resume): (WebCore::CCActiveAnimation::isFinishedAt): (WebCore::CCActiveAnimation::trimTimeToCurrentIteration): (WebCore::CCActiveAnimation::cloneForImplThread): (WebCore::CCActiveAnimation::pushPropertiesTo): * platform/graphics/chromium/cc/CCActiveAnimation.h: (CCActiveAnimation): (WebCore::CCActiveAnimation::setStartTime): (WebCore::CCActiveAnimation::timeOffset): (WebCore::CCActiveAnimation::setTimeOffset): (WebCore::CCActiveAnimation::isFinished): * platform/graphics/chromium/cc/CCLayerAnimationController.cpp: (WebCore::CCLayerAnimationController::addAnimation): (WebCore::CCLayerAnimationController::pauseAnimation): (WebCore::CCLayerAnimationController::suspendAnimations): (WebCore::CCLayerAnimationController::resumeAnimations): (WebCore::CCLayerAnimationController::pushAnimationUpdatesTo): (WebCore::CCLayerAnimationController::getActiveAnimation): (WebCore::CCLayerAnimationController::pushNewAnimationsToImplThread): (WebCore::CCLayerAnimationController::removeAnimationsCompletedOnMainThread): (WebCore::CCLayerAnimationController::pushPropertiesToImplThread): (WebCore): (WebCore::CCLayerAnimationController::tickAnimations): * platform/graphics/chromium/cc/CCLayerAnimationController.h: (CCLayerAnimationController): 2012-04-27 Tim Horton SMIL animation causes leak of the related Document (and many elements) https://bugs.webkit.org/show_bug.cgi?id=83856 Reviewed by Dean Jackson. The SVGAnimatedProperty cache was previously holding a reference to the properties it contained; said references were cleared in the SVGAnimatedProperty destructor (which was never called because there was always one remaining reference from the cache). The SVGAnimatedProperty cache now holds raw pointers instead of RefPtrs; the SVGAnimateElement now owns its own SVGAnimatedProperties, both for itself and for any instances of itself. They're cleared and destroyed within SVGAnimateElement::targetElementWillChange, at which time they're removed from the cache. SVGPropertyTearOffs now keep a reference to their SVGElement (m_contextElement) instead of their SVGAnimatedProperty; this way, there is no reference cycle, but the animated property (owned by the element) and the element itself are kept alive until the TearOff is garbage collected. Tests: svg/animations/smil-leak-dynamically-added-element-instances.svg svg/animations/smil-leak-elements.svg svg/animations/smil-leak-element-instances-noBaseValRef.svg svg/animations/smil-leak-element-instances.svg svg/animations/svglength-element-removed-crash.svg * svg/SVGAnimateElement.cpp: (WebCore::SVGAnimateElement::calculateAnimatedValue): (WebCore::propertyTypesAreConsistent): (WebCore::SVGAnimateElement::resetToBaseValue): (WebCore::SVGAnimateElement::applyResultsToTarget): (WebCore::SVGAnimateElement::targetElementWillChange): * svg/SVGAnimateElement.h: (SVGAnimateElement): * svg/SVGAnimatedAngle.cpp: (WebCore::SVGAnimatedAngleAnimator::startAnimValAnimation): (WebCore::SVGAnimatedAngleAnimator::stopAnimValAnimation): (WebCore::SVGAnimatedAngleAnimator::resetAnimValToBaseVal): (WebCore::SVGAnimatedAngleAnimator::animValWillChange): (WebCore::SVGAnimatedAngleAnimator::animValDidChange): * svg/SVGAnimatedAngle.h: (SVGAnimatedAngleAnimator): * svg/SVGAnimatedBoolean.cpp: (WebCore::SVGAnimatedBooleanAnimator::startAnimValAnimation): (WebCore::SVGAnimatedBooleanAnimator::stopAnimValAnimation): (WebCore::SVGAnimatedBooleanAnimator::resetAnimValToBaseVal): (WebCore::SVGAnimatedBooleanAnimator::animValWillChange): (WebCore::SVGAnimatedBooleanAnimator::animValDidChange): * svg/SVGAnimatedBoolean.h: (SVGAnimatedBooleanAnimator): * svg/SVGAnimatedColor.h: (WebCore::SVGAnimatedColorAnimator::startAnimValAnimation): (WebCore::SVGAnimatedColorAnimator::stopAnimValAnimation): (WebCore::SVGAnimatedColorAnimator::resetAnimValToBaseVal): (WebCore::SVGAnimatedColorAnimator::animValWillChange): (WebCore::SVGAnimatedColorAnimator::animValDidChange): * svg/SVGAnimatedEnumeration.cpp: (WebCore::SVGAnimatedEnumerationAnimator::startAnimValAnimation): (WebCore::SVGAnimatedEnumerationAnimator::stopAnimValAnimation): (WebCore::SVGAnimatedEnumerationAnimator::resetAnimValToBaseVal): (WebCore::SVGAnimatedEnumerationAnimator::animValWillChange): (WebCore::SVGAnimatedEnumerationAnimator::animValDidChange): * svg/SVGAnimatedEnumeration.h: (SVGAnimatedEnumerationAnimator): * svg/SVGAnimatedInteger.cpp: (WebCore::SVGAnimatedIntegerAnimator::startAnimValAnimation): (WebCore::SVGAnimatedIntegerAnimator::stopAnimValAnimation): (WebCore::SVGAnimatedIntegerAnimator::resetAnimValToBaseVal): (WebCore::SVGAnimatedIntegerAnimator::animValWillChange): (WebCore::SVGAnimatedIntegerAnimator::animValDidChange): * svg/SVGAnimatedInteger.h: (SVGAnimatedIntegerAnimator): * svg/SVGAnimatedIntegerOptionalInteger.cpp: (WebCore::SVGAnimatedIntegerOptionalIntegerAnimator::startAnimValAnimation): (WebCore::SVGAnimatedIntegerOptionalIntegerAnimator::stopAnimValAnimation): (WebCore::SVGAnimatedIntegerOptionalIntegerAnimator::resetAnimValToBaseVal): (WebCore::SVGAnimatedIntegerOptionalIntegerAnimator::animValWillChange): (WebCore::SVGAnimatedIntegerOptionalIntegerAnimator::animValDidChange): * svg/SVGAnimatedIntegerOptionalInteger.h: (SVGAnimatedIntegerOptionalIntegerAnimator): * svg/SVGAnimatedLength.cpp: (WebCore::SVGAnimatedLengthAnimator::startAnimValAnimation): (WebCore::SVGAnimatedLengthAnimator::stopAnimValAnimation): (WebCore::SVGAnimatedLengthAnimator::resetAnimValToBaseVal): (WebCore::SVGAnimatedLengthAnimator::animValWillChange): (WebCore::SVGAnimatedLengthAnimator::animValDidChange): * svg/SVGAnimatedLength.h: (SVGAnimatedLengthAnimator): * svg/SVGAnimatedLengthList.cpp: (WebCore::SVGAnimatedLengthListAnimator::startAnimValAnimation): (WebCore::SVGAnimatedLengthListAnimator::stopAnimValAnimation): (WebCore::SVGAnimatedLengthListAnimator::resetAnimValToBaseVal): (WebCore::SVGAnimatedLengthListAnimator::animValWillChange): (WebCore::SVGAnimatedLengthListAnimator::animValDidChange): * svg/SVGAnimatedLengthList.h: (SVGAnimatedLengthListAnimator): * svg/SVGAnimatedNumber.cpp: (WebCore::SVGAnimatedNumberAnimator::startAnimValAnimation): (WebCore::SVGAnimatedNumberAnimator::stopAnimValAnimation): (WebCore::SVGAnimatedNumberAnimator::resetAnimValToBaseVal): (WebCore::SVGAnimatedNumberAnimator::animValWillChange): (WebCore::SVGAnimatedNumberAnimator::animValDidChange): * svg/SVGAnimatedNumber.h: (SVGAnimatedNumberAnimator): * svg/SVGAnimatedNumberList.cpp: (WebCore::SVGAnimatedNumberListAnimator::startAnimValAnimation): (WebCore::SVGAnimatedNumberListAnimator::stopAnimValAnimation): (WebCore::SVGAnimatedNumberListAnimator::resetAnimValToBaseVal): (WebCore::SVGAnimatedNumberListAnimator::animValWillChange): (WebCore::SVGAnimatedNumberListAnimator::animValDidChange): * svg/SVGAnimatedNumberList.h: (SVGAnimatedNumberListAnimator): * svg/SVGAnimatedNumberOptionalNumber.cpp: (WebCore::SVGAnimatedNumberOptionalNumberAnimator::startAnimValAnimation): (WebCore::SVGAnimatedNumberOptionalNumberAnimator::stopAnimValAnimation): (WebCore::SVGAnimatedNumberOptionalNumberAnimator::resetAnimValToBaseVal): (WebCore::SVGAnimatedNumberOptionalNumberAnimator::animValWillChange): (WebCore::SVGAnimatedNumberOptionalNumberAnimator::animValDidChange): * svg/SVGAnimatedNumberOptionalNumber.h: (SVGAnimatedNumberOptionalNumberAnimator): * svg/SVGAnimatedPath.cpp: (WebCore::SVGAnimatedPathAnimator::startAnimValAnimation): (WebCore::SVGAnimatedPathAnimator::stopAnimValAnimation): (WebCore::SVGAnimatedPathAnimator::resetAnimValToBaseVal): (WebCore::SVGAnimatedPathAnimator::animValWillChange): (WebCore::SVGAnimatedPathAnimator::animValDidChange): * svg/SVGAnimatedPath.h: (SVGAnimatedPathAnimator): * svg/SVGAnimatedPointList.cpp: (WebCore::SVGAnimatedPointListAnimator::startAnimValAnimation): (WebCore::SVGAnimatedPointListAnimator::stopAnimValAnimation): (WebCore::SVGAnimatedPointListAnimator::resetAnimValToBaseVal): (WebCore::SVGAnimatedPointListAnimator::animValWillChange): (WebCore::SVGAnimatedPointListAnimator::animValDidChange): * svg/SVGAnimatedPointList.h: (SVGAnimatedPointListAnimator): * svg/SVGAnimatedPreserveAspectRatio.cpp: (WebCore::SVGAnimatedPreserveAspectRatioAnimator::startAnimValAnimation): (WebCore::SVGAnimatedPreserveAspectRatioAnimator::stopAnimValAnimation): (WebCore::SVGAnimatedPreserveAspectRatioAnimator::resetAnimValToBaseVal): (WebCore::SVGAnimatedPreserveAspectRatioAnimator::animValWillChange): (WebCore::SVGAnimatedPreserveAspectRatioAnimator::animValDidChange): * svg/SVGAnimatedPreserveAspectRatio.h: (SVGAnimatedPreserveAspectRatioAnimator): * svg/SVGAnimatedRect.cpp: (WebCore::SVGAnimatedRectAnimator::startAnimValAnimation): (WebCore::SVGAnimatedRectAnimator::stopAnimValAnimation): (WebCore::SVGAnimatedRectAnimator::resetAnimValToBaseVal): (WebCore::SVGAnimatedRectAnimator::animValWillChange): (WebCore::SVGAnimatedRectAnimator::animValDidChange): * svg/SVGAnimatedRect.h: (SVGAnimatedRectAnimator): * svg/SVGAnimatedString.cpp: (WebCore::SVGAnimatedStringAnimator::startAnimValAnimation): (WebCore::SVGAnimatedStringAnimator::stopAnimValAnimation): (WebCore::SVGAnimatedStringAnimator::resetAnimValToBaseVal): (WebCore::SVGAnimatedStringAnimator::animValWillChange): (WebCore::SVGAnimatedStringAnimator::animValDidChange): * svg/SVGAnimatedString.h: (SVGAnimatedStringAnimator): * svg/SVGAnimatedTransformList.cpp: (WebCore::SVGAnimatedTransformListAnimator::startAnimValAnimation): (WebCore::SVGAnimatedTransformListAnimator::stopAnimValAnimation): (WebCore::SVGAnimatedTransformListAnimator::resetAnimValToBaseVal): (WebCore::SVGAnimatedTransformListAnimator::animValWillChange): (WebCore::SVGAnimatedTransformListAnimator::animValDidChange): * svg/SVGAnimatedTransformList.h: (SVGAnimatedTransformListAnimator): * svg/SVGAnimatedTypeAnimator.h: (SVGAnimatedTypeAnimator): (WebCore::SVGAnimatedTypeAnimator::findAnimatedPropertiesForAttributeName): (WebCore::SVGAnimatedTypeAnimator::findAnimatedPropertiesFromInstancesForAttributeName): (WebCore::SVGAnimatedTypeAnimator::constructFromBaseValue): (WebCore::SVGAnimatedTypeAnimator::resetFromBaseValue): (WebCore::SVGAnimatedTypeAnimator::stopAnimValAnimationForType): (WebCore::SVGAnimatedTypeAnimator::animValDidChangeForType): (WebCore::SVGAnimatedTypeAnimator::animValWillChangeForType): (WebCore::SVGAnimatedTypeAnimator::constructFromBaseValues): (WebCore::SVGAnimatedTypeAnimator::resetFromBaseValues): (WebCore::SVGAnimatedTypeAnimator::stopAnimValAnimationForTypes): (WebCore::SVGAnimatedTypeAnimator::animValDidChangeForTypes): (WebCore::SVGAnimatedTypeAnimator::animValWillChangeForTypes): (WebCore::SVGAnimatedTypeAnimator::castAnimatedPropertyToActualType): (WebCore::SVGAnimatedTypeAnimator::executeAction): * svg/properties/SVGAnimatedProperty.h: (SVGAnimatedProperty): * svg/properties/SVGPropertyTearOff.h: (WebCore::SVGPropertyTearOff::animatedProperty): (SVGPropertyTearOff): 2012-04-27 Adam Klein Remove misspelled, unused, unimplemented method from V8Proxy https://bugs.webkit.org/show_bug.cgi?id=85091 Reviewed by Dimitri Glazkov. * bindings/v8/V8Proxy.h: (V8Proxy): 2012-04-24 Jeffrey Pfau Disable RTF in JavaScript drag-and-drop https://bugs.webkit.org/show_bug.cgi?id=76597 Reviewed by Maciej Stachowiak. Test: fast/events/drag-and-drop-subframe-dataTransfer.html * platform/mac/ClipboardMac.mm: (WebCore::cocoaTypeFromHTMLClipboardType): 2012-04-26 James Robinson [chromium] Separate IOSurface layer type from texture layers https://bugs.webkit.org/show_bug.cgi?id=85030 Reviewed by Adrienne Walker. Adds a new layer type for IOSurface layers and pipes through a separate path through to rendering. IOSurface layers are very simple - they have an IOSurface id and size, nothing else. All IOSurface layers are "flipped" in our terminology. * WebCore.gypi: * platform/graphics/chromium/IOSurfaceLayerChromium.cpp: (WebCore): (WebCore::IOSurfaceLayerChromium::create): (WebCore::IOSurfaceLayerChromium::IOSurfaceLayerChromium): (WebCore::IOSurfaceLayerChromium::~IOSurfaceLayerChromium): (WebCore::IOSurfaceLayerChromium::setIOSurfaceProperties): (WebCore::IOSurfaceLayerChromium::createCCLayerImpl): (WebCore::IOSurfaceLayerChromium::drawsContent): (WebCore::IOSurfaceLayerChromium::pushPropertiesTo): * platform/graphics/chromium/IOSurfaceLayerChromium.h: (WebCore): (IOSurfaceLayerChromium): * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::drawIOSurfaceQuad): (WebCore::LayerRendererChromium::cleanupSharedObjects): * platform/graphics/chromium/LayerRendererChromium.h: (LayerRendererChromium): * platform/graphics/chromium/TextureLayerChromium.cpp: (WebCore::TextureLayerChromium::TextureLayerChromium): (WebCore::TextureLayerChromium::drawsContent): (WebCore::TextureLayerChromium::pushPropertiesTo): * platform/graphics/chromium/TextureLayerChromium.h: (TextureLayerChromium): * platform/graphics/chromium/cc/CCIOSurfaceDrawQuad.cpp: (WebCore::CCIOSurfaceDrawQuad::create): (WebCore::CCIOSurfaceDrawQuad::CCIOSurfaceDrawQuad): * platform/graphics/chromium/cc/CCIOSurfaceDrawQuad.h: (CCIOSurfaceDrawQuad): * platform/graphics/chromium/cc/CCIOSurfaceLayerImpl.cpp: (WebCore): (WebCore::CCIOSurfaceLayerImpl::CCIOSurfaceLayerImpl): (WebCore::CCIOSurfaceLayerImpl::~CCIOSurfaceLayerImpl): (WebCore::CCIOSurfaceLayerImpl::willDraw): (WebCore::CCIOSurfaceLayerImpl::appendQuads): (WebCore::CCIOSurfaceLayerImpl::dumpLayerProperties): (WebCore::CCIOSurfaceLayerImpl::didLoseContext): (WebCore::CCIOSurfaceLayerImpl::setIOSurfaceProperties): * platform/graphics/chromium/cc/CCIOSurfaceLayerImpl.h: (WebCore): (CCIOSurfaceLayerImpl): (WebCore::CCIOSurfaceLayerImpl::create): * platform/graphics/chromium/cc/CCTextureLayerImpl.cpp: (WebCore::CCTextureLayerImpl::CCTextureLayerImpl): (WebCore::CCTextureLayerImpl::~CCTextureLayerImpl): (WebCore::CCTextureLayerImpl::appendQuads): (WebCore::CCTextureLayerImpl::didLoseContext): * platform/graphics/chromium/cc/CCTextureLayerImpl.h: (CCTextureLayerImpl): 2012-04-27 Arvid Nilsson [BlackBerry] OpenGL related bug fixes https://bugs.webkit.org/show_bug.cgi?id=84836 Reviewed by Antonio Gomes. PR147254, 148933, 149117, 149721, 150228 No new tests, covered by existing BlackBerry browser stress tests * platform/graphics/blackberry/CanvasLayerWebKitThread.cpp: (WebCore::CanvasLayerWebKitThread::updateTextureContentsIfNeeded): * platform/graphics/blackberry/LayerCompositingThread.cpp: (WebCore::LayerCompositingThread::drawTextures): * platform/graphics/blackberry/LayerRenderer.cpp: (WebCore::LayerRenderer::~LayerRenderer): (WebCore::LayerRenderer::drawLayers): (WebCore::LayerRenderer::initializeSharedGLObjects): 2012-04-27 Nat Duca Implement high-resolution time via window.performance.webkitNow() https://bugs.webkit.org/show_bug.cgi?id=66684 This implements the high resolution time spec from http://www.w3.org/TR/hr-time/, giving javascript access to sub-millisecond timestamps that increase over time instead of being subject to skewing, for example when the host machine's clock changes. Reviewed by Tony Gentilcore. Test: fast/performance/performance-now-timestamps.html * page/Performance.cpp: (WebCore::Performance::now): (WebCore): * page/Performance.h: (Performance): * page/Performance.idl: 2012-04-27 Filip Pizlo If you get a list of DOMWrapperWorld*'s and then plan to allocate in the heap, you should ref the DOMWrapperWorld*'s https://bugs.webkit.org/show_bug.cgi?id=85098 Reviewed by Sam Weinig. No new tests because this addresses hard-to-repro flaky behavior arising from GCs at inconvenient times. * bindings/js/ScriptController.cpp: (WebCore::ScriptController::getAllWorlds): * bindings/js/ScriptController.h: (ScriptController): * bindings/js/WebCoreJSClientData.h: (WebCore::WebCoreJSClientData::getAllWorlds): * bindings/v8/ScriptController.cpp: (WebCore::ScriptController::getAllWorlds): * bindings/v8/ScriptController.h: (ScriptController): * loader/FrameLoader.cpp: (WebCore::FrameLoader::dispatchDidClearWindowObjectsInAllWorlds): (WebCore::FrameLoader::dispatchGlobalObjectAvailableInAllWorlds): 2012-04-27 Geoffrey Garen Removed the sole use of Weak https://bugs.webkit.org/show_bug.cgi?id=85099 Reviewed by Sam Weinig. The semantics and implementation of Weak are unclear because: - Should you call a finalizer for a non-GC thingy? If so, when? * Possible answer: No. - If WeakImpls for GC thingies live with the GC thingies in the heap, where do WeakImpls for non-GC thingies live? * Possible answer: Directly in the Weak. Since no clients actually want these behaviors, it's hard to tell if they're the right behaviors, and it's not worth the implementation complexity. If we come up with a client that wants these behaviors, we can always revisit this. * bindings/js/JSNodeFilterCondition.cpp: (WebCore::JSNodeFilterCondition::JSNodeFilterCondition): Just leave our filter NULL if it's not an object -- that's a better way to indicate "not a valid filter object". (WebCore::JSNodeFilterCondition::acceptNode): Fixed up some naming to clarify that the object we're working with is not necessarily a function. * bindings/js/JSNodeFilterCondition.h: (JSNodeFilterCondition): Use Weak, since that more closely matches what we're trying to do. 2012-04-26 Kentaro Hara [V8] Pass Isolate to getDOMXXXMap() https://bugs.webkit.org/show_bug.cgi?id=85022 Reviewed by Nate Chapin. The objective is to pass Isolate around in V8 bindings. This patch passes Isolate to getDOMXXXMap(). Also this patch removes DOMMap::getDOMDataStore() and DOMData::getDefalutStore(), since the indirection by the methods is redundant. This is not for performance optimization but just for refactoring. No tests. No change in behavior. * bindings/v8/DOMData.cpp: (WebCore::DOMData::getCurrentStore): * bindings/v8/DOMData.h: (DOMData): * bindings/v8/V8DOMMap.cpp: (WebCore::getDOMNodeMap): (WebCore::getActiveDOMNodeMap): (WebCore::getDOMObjectMap): (WebCore::getActiveDOMObjectMap): (WebCore::removeAllDOMObjects): * bindings/v8/V8DOMMap.h: (WebCore): 2012-04-26 Kentaro Hara [V8] Pass Isolate to V8BindingPerIsolateData::current() https://bugs.webkit.org/show_bug.cgi?id=85023 Reviewed by Nate Chapin. The objective is to pass Isolate around in V8 bindings. This patch passes Isolate to V8BindingPerIsolateData::current(). No tests. No change in behavior. * bindings/v8/V8Binding.h: (WebCore::V8BindingPerIsolateData::current): (WebCore::v8ExternalString): 2012-04-27 Dimitri Glazkov Unreviewed, rolling out r115484. http://trac.webkit.org/changeset/115484 https://bugs.webkit.org/show_bug.cgi?id=84555 Broke Chromium compile. * bindings/js/JSBlobCustom.cpp: * bindings/v8/custom/V8BlobCustom.cpp: * fileapi/Blob.cpp: * fileapi/Blob.h: (Blob): * fileapi/Blob.idl: * workers/WorkerContext.idl: 2012-04-27 Alexandru Chiculita [CSS Shaders] Implement CSS Animations and Transitions for CSS Shaders https://bugs.webkit.org/show_bug.cgi?id=71406 Reviewed by Dean Jackson. I've implemented the blend function for the CustomFilterOperation. This should enable animations for CSS Shaders. Currently, just floats are implemented. If any of the filter attributes like shader, mesh size or box mode are different, the fallback is to use the "to" part of the animation instead. If other shader parameters do not match, it will merge the parameter values between the "from" and "to" states. Test: css3/filters/custom/custom-filter-animation.html * platform/graphics/filters/CustomFilterNumberParameter.h: (WebCore::CustomFilterNumberParameter::blend): (CustomFilterNumberParameter): (WebCore::CustomFilterNumberParameter::operator==): * platform/graphics/filters/CustomFilterOperation.cpp: (WebCore::equalCustomFilterParameters): (WebCore): (WebCore::checkCustomFilterParametersOrder): (WebCore::blendCustomFilterParameters): (WebCore::CustomFilterOperation::CustomFilterOperation): (WebCore::CustomFilterOperation::blend): * platform/graphics/filters/CustomFilterOperation.h: (WebCore): (CustomFilterOperation): (WebCore::CustomFilterOperation::operator==): (WebCore::CustomFilterOperation::operator!=): * platform/graphics/filters/CustomFilterParameter.h: (CustomFilterParameter): (WebCore::CustomFilterParameter::isSameType): (WebCore::CustomFilterParameter::operator==): (WebCore::CustomFilterParameter::operator!=): * platform/graphics/filters/CustomFilterProgram.h: * rendering/style/StyleCustomFilterProgram.h: (StyleCustomFilterProgram): (WebCore::StyleCustomFilterProgram::cachedVertexShader): (WebCore::StyleCustomFilterProgram::cachedFragmentShader): (WebCore::StyleCustomFilterProgram::operator==): 2012-04-27 Chris Rogers Re-factor scheduling logic from AudioBufferSourceNode into AudioScheduledSourceNode https://bugs.webkit.org/show_bug.cgi?id=84639 Reviewed by Eric Carlson. Playback logic involving noteOn(), noteOff(), and playbackState were intertwined with the AudioBufferSourceNode's buffer playback code. These are more general concepts and may be implemented separately in another class called AudioScheduledSourceNode. No new tests. Covered by existing layout tests. * GNUmakefile.list.am: Add AudioScheduledSourceNode files to makefile. * Modules/webaudio/AudioBufferSourceNode.cpp: (WebCore): (WebCore::AudioBufferSourceNode::AudioBufferSourceNode): Re-factor some member variables into new base class AudioScheduledSourceNode. (WebCore::AudioBufferSourceNode::process): Re-factor scheduling logic into AudioScheduledSourceNode. * Modules/webaudio/AudioBufferSourceNode.h: (AudioBufferSourceNode): Simplify by re-factoring scheduling logic into AudioScheduledSourceNode. * Modules/webaudio/AudioScheduledSourceNode.cpp: Added. (WebCore): (WebCore::AudioScheduledSourceNode::AudioScheduledSourceNode): (WebCore::AudioScheduledSourceNode::updateSchedulingInfo): Get frame information for the current time quantum. * Modules/webaudio/AudioScheduledSourceNode.h: Added. (WebCore::AudioScheduledSourceNode::noteOn): (WebCore::AudioScheduledSourceNode::noteOff): (WebCore::AudioScheduledSourceNode::finish): (WebCore::AudioScheduledSourceNode::playbackState): (WebCore::AudioScheduledSourceNode::isPlayingOrScheduled): (WebCore::AudioScheduledSourceNode::hasFinished): Re-factored from AudioBufferSourceNode. * WebCore.gypi: * WebCore.xcodeproj/project.pbxproj: Add AudioScheduledSourceNode files to makefiles. 2012-04-26 Sam Weinig Add support for the Blob constructor https://bugs.webkit.org/show_bug.cgi?id=84555 Reviewed by Maciej Stachowiak. Test: fast/files/blob-constructor.html This adds an implementation of the Blob constructor that willfully violates the W3C Editor’s Draft 29 February 2012 in the following ways: - Elements in the parts array are coerced to DOMStrings https://www.w3.org/Bugs/Public/show_bug.cgi?id=16721 - Don't throw for invalid key in the dictionary https://www.w3.org/Bugs/Public/show_bug.cgi?id=16727 - Values for the endings property are treated as enums https://www.w3.org/Bugs/Public/show_bug.cgi?id=16729 * bindings/js/JSBlobCustom.cpp: (WebCore::JSBlobConstructor::constructJSBlob): Implement blob constructor. * bindings/v8/custom/V8BlobCustom.cpp: (WebCore::V8Blob::constructorCallback): Implement blob constructor. * fileapi/Blob.idl: Add constructor to IDL. * workers/WorkerContext.idl: Add Blob constructor to the worker global object. 2012-04-27 Allan Sandfeld Jensen [Qt] Fix minimal build. https://bugs.webkit.org/show_bug.cgi?id=85045 Reviewed by Tor Arne Vestbø. Compile LIBXML XML parser even if ENABLE_XSLT is not set. * Target.pri: 2012-04-27 Shawn Singh Infinite backgroundClipRect should not be scrolled. https://bugs.webkit.org/show_bug.cgi?id=84979 Reviewed by Adrienne Walker. Test: compositing/iframes/scroll-fixed-transformed-element.html By accidentally scrolling clipRects that should be considered "infinite", they were no longer being considered infinite. This caused a chain of un-intended code paths that caused fixed position elements to stutter when scrolling in Chromium. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::backgroundClipRect): 2012-04-27 Ryosuke Niwa FormatBlock crashes when body element is removed prior to the command execution https://bugs.webkit.org/show_bug.cgi?id=84937 Reviewed by Tony Chang. The crash was because because DOM had been modified since the last time selection had been "validated", and therefore frame selection's endpoints are no longer visible when we instantiated visibleStart and visibleEnd from m_endingSelection of the edit command. Fixed the bug by checking the nullity and orphanedness of visible start and visible end directly. I suspect we have similar bugs in other commands. The fundamental problem is that the copy constructor of VisibleSelection never validates so when a VisibleSelection is passed from one class to another (e.g. FrameSelection to EditCommand), we may not adjust end points as needed. Test: editing/execCommand/format-block-without-body-crash.html * editing/ApplyBlockElementCommand.cpp: (WebCore::ApplyBlockElementCommand::doApply): 2012-04-27 Enrica Casucci REGRESSION(r96257): Deleting a large amount of text is very slow. https://bugs.webkit.org/show_bug.cgi?id=83983 Reviewed by Ryosuke Niwa. The change in r96257 did not cause the performance regression per se, but exposed a problem in the way we calculate the offset in container node when the anchorType is PositionIsOffsetInAnchor. The offset was computed as the minimum between the given offset and lastOffsetInNode. If the container has a very large number of children, we walk the entire list of child nodes in the container simply to find out how many they are. Looking through the entire editing code, I found other 2 cases (one is only an ASSERT) where we could do a similar optimization. No new tests. No behavior change, only performance optimization. * dom/Position.cpp: (WebCore::Position::computeOffsetInContainerNode): * dom/Position.h: (WebCore::minOffsetForNode): (WebCore::offsetIsBeforeLastNodeOffset): * editing/ApplyStyleCommand.cpp: (WebCore::ApplyStyleCommand::removeInlineStyle): (WebCore::ApplyStyleCommand::mergeEndWithNextIfIdentical): 2012-04-27 Julien Chaffraix NULL-deref in RenderBox::clippedOverflowRectForRepaint https://bugs.webkit.org/show_bug.cgi?id=84774 Reviewed by Tony Chang. Test: fast/inline/crash-new-continuation-with-outline.html The bug comes from trying to repaint the :after content as part of updateBeforeAfterContent. The repainting logic would query the yet-to-be-inserted continuation(). Then we would crash in RenderBox::clippedOverflowRectForRepaint as we didn't have an enclosingLayer() (which any RenderObject in the tree will have). The fix is to check in RenderInline::clippedOverflowRectForRepaint that our continuation() is properly inserted in the tree. We could check that it isRooted() but it's an overkill here. * rendering/RenderInline.cpp: (WebCore::RenderInline::clippedOverflowRectForRepaint): 2012-04-27 Antti Koivisto Memory cache pruning should be protected against reentering. https://bugs.webkit.org/show_bug.cgi?id=85077 Reviewed by Alexey Proskuryakov. MemoryCache::pruneDeadResourcesToSize() has some ad-hock protection against reentering. This patch adds more complete protection. * loader/cache/MemoryCache.cpp: (WebCore::MemoryCache::MemoryCache): (WebCore::MemoryCache::pruneLiveResourcesToSize): Protect live resource pruning too. (WebCore::MemoryCache::pruneDeadResourcesToSize): Remove the existing weak reentrancy handling in favor of full proctection. * loader/cache/MemoryCache.h: (MemoryCache): 2012-04-27 Alexander Pavlov Web Inspector: Implement the "Disable JavaScript" option in the settings dialog (re-landing r115417 with a test that should work on Windows.) https://bugs.webkit.org/show_bug.cgi?id=84946 Reviewed by Yury Semikhatsky. Test: inspector/debugger/disable-script.html * inspector/Inspector.json: * inspector/InspectorPageAgent.cpp: (PageAgentState): (WebCore::InspectorPageAgent::enable): (WebCore::InspectorPageAgent::disable): (WebCore::InspectorPageAgent::getScriptExecutionStatus): (WebCore): (WebCore::InspectorPageAgent::setScriptExecutionDisabled): * inspector/InspectorPageAgent.h: * inspector/front-end/Settings.js: * inspector/front-end/SettingsScreen.js: (WebInspector.SettingsScreen): (WebInspector.SettingsScreen.prototype.get _updateScriptDisabledCheckbox): (WebInspector.SettingsScreen.prototype._javaScriptDisabledChanged): * inspector/front-end/inspector.js: 2012-04-27 Keishi Hattori IETC HTML5: verify HTMLDataListElement - instanceof HTMLDataListElement fails. https://bugs.webkit.org/show_bug.cgi?id=81196 Reviewed by Kent Tamura. Test: fast/dom/Window/window-properties.html, fast/dom/Window/window-lookup-precedence.html HTMLDataListElement should be available on DOMWindow. * page/DOMWindow.idl: Added HTMLDataListElement. 2012-04-27 Dimitri Glazkov Unreviewed, rolling out r115417. http://trac.webkit.org/changeset/115417 https://bugs.webkit.org/show_bug.cgi?id=84946 Added test is broken on windows. * inspector/Inspector.json: * inspector/InspectorPageAgent.cpp: (WebCore::InspectorPageAgent::enable): (WebCore::InspectorPageAgent::disable): * inspector/InspectorPageAgent.h: * inspector/front-end/Settings.js: * inspector/front-end/SettingsScreen.js: (WebInspector.SettingsScreen): * inspector/front-end/inspector.js: 2012-04-27 Gavin Peters Add new ENABLE_LINK_PRERENDER define to control the Prerendering API https://bugs.webkit.org/show_bug.cgi?id=84871 Reviewed by Adam Barth. Prerendering is currently covered by the ENABLE_LINK_PREFETCH macro, but the new Prerendering API separates it from prefetching. Having separate include guards lets ports enable prefetching, a relatively easy change, without needing to build the infrastructure for prerendering, which is considerably more complicated. * Configurations/FeatureDefines.xcconfig: 2012-04-27 Zan Dobersek [Gtk][DOM Bindings] Feature-protected properties are put under condition guards https://bugs.webkit.org/show_bug.cgi?id=85068 Reviewed by Martin Robinson. Generated feature-dependent properties are now present regardless of that feature being enabled. On getting or setting that property's value a warning is thrown if the feature is not enabled. Additionally, if the generated interface is feature-dependant, when getting or setting any property's value a warning is thrown if the feature is not enabled. No new tests - covered by existing bindings tests. * bindings/scripts/CodeGeneratorGObject.pm: (GenerateProperty): (GenerateProperties): * bindings/scripts/test/GObject/WebKitDOMTestInterface.cpp: Rebaseline. (webkit_dom_test_interface_set_property): (webkit_dom_test_interface_get_property): (webkit_dom_test_interface_class_init): * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp: Ditto. (webkit_dom_test_obj_set_property): (webkit_dom_test_obj_get_property): (webkit_dom_test_obj_class_init): * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.cpp: Ditto. (webkit_dom_test_serialized_script_value_interface_get_property): 2012-04-27 Zan Dobersek [Gtk][DOM Bindings] Conditional string in implementation file generated in wrong place after 113450 https://bugs.webkit.org/show_bug.cgi?id=85065 Reviewed by Martin Robinson. Put the condition string in implementation file after the header inclusions. This ensures that build errors do not occur when disabling the future that applies to the condition string because of WebCore objects and methods that are still in use despite the feature being disabled. No new tests - covered by bindings tests. * bindings/scripts/CodeGeneratorGObject.pm: (WriteData): * bindings/scripts/test/GObject/WebKitDOMTestCallback.cpp: Rebaseline generated results. * bindings/scripts/test/GObject/WebKitDOMTestInterface.cpp: Ditto. * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.cpp: Ditto. 2012-04-27 Andreas Kling Avoid mutating Element attribute storage in StepRange constructor. Reviewed by Antti Koivisto. Test: fast/selectors/querySelector-in-range-crash.html * dom/Attribute.h: Add comment about the volatility of references returned by getters. * html/StepRange.cpp: (WebCore::StepRange::StepRange): Replace hasAttribute/getAttribute pair by a single fastGetAttribute. * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::updateType): (WebCore::HTMLInputElement::value): Store the value attribute in an local variable before passing it to sanitizeValue(). 2012-04-27 Rob Buis SVG inline style of 'marker-*' does not override https://bugs.webkit.org/show_bug.cgi?id=84824 Reviewed by Nikolas Zimmermann. Properly handle CSSValueNone for clip-path, filter, mask and marker-* properties. Instead of bailing out, set the none value explicitly, since an earlier match may have set it to something other than none. Tests: svg/custom/inline-style-overrides-clipPath-expected.svg svg/custom/inline-style-overrides-clipPath.svg svg/custom/inline-style-overrides-filter-expected.svg svg/custom/inline-style-overrides-filter.svg svg/custom/inline-style-overrides-markers-expected.svg svg/custom/inline-style-overrides-markers.svg svg/custom/inline-style-overrides-mask-expected.svg svg/custom/inline-style-overrides-mask.svg * css/SVGCSSStyleSelector.cpp: (WebCore::StyleResolver::applySVGProperty): 2012-04-27 Christophe Dumez [EFL] media/video-controls-rendering-toggle-display-none.html is failing https://bugs.webkit.org/show_bug.cgi?id=84949 Reviewed by Antonio Gomes. Fix volume slider rendering so that the media/video-controls-rendering-toggle-display-none.html passes. * css/mediaControlsEfl.css: (audio::-webkit-media-controls-mute-button, video::-webkit-media-controls-mute-button): (audio::-webkit-media-controls-volume-slider-container, video::-webkit-media-controls-volume-slider-container): (audio::-webkit-media-controls-volume-slider, video::-webkit-media-controls-volume-slider): 2012-04-27 Nikolas Zimmermann Support values animation mode with just a single value https://bugs.webkit.org/show_bug.cgi?id=85064 Reviewed by Antti Koivisto. values="a" is equal to per SMIL specification. We currently only support values animation if at least two values are given, fix that. The reference animations in Dr. Olaf Hoffmanns SVG Animation test suite are mostly using values animations, sometimes with only a single value given. Lots of the reference animations are broken in trunk w/o this patch and now work as expected. See http://hoffmann.bplaced.net/svgtest/index.php?s=en&in=start. Test: svg/animations/single-values-animation.html * svg/SVGAnimationElement.cpp: (WebCore::SVGAnimationElement::calculateKeyTimesForCalcModePaced): (WebCore::SVGAnimationElement::currentValuesForValuesAnimation): (WebCore::SVGAnimationElement::startedActiveInterval): 2012-04-27 Konrad Piascik Web Inspector: Allow inspection of Web Socket Frames https://bugs.webkit.org/show_bug.cgi?id=83282 Reviewed by Pavel Feldman. Tests: http/tests/inspector/web-socket-frame-error.html http/tests/inspector/web-socket-frame.html * English.lproj/localizedStrings.js: Added new Web Inspector front-end UI strings. * Modules/websockets/WebSocketChannel.cpp: Added InspectorInstrumentation calls to the following methods. (WebCore::WebSocketChannel::fail): (WebCore::WebSocketChannel::processFrame): (WebCore::WebSocketChannel::sendFrame): * WebCore.gypi: Added new Web Inspector resource file. * WebCore.vcproj/WebCore.vcproj: Added new Web Inspector resource file. * inspector/Inspector.json: Added new Web Inspector resource file. * inspector/InspectorInstrumentation.cpp: Added new methods for instrumenting a Web Socket frame or error. (WebCore::InspectorInstrumentation::didReceiveWebSocketFrameImpl): (WebCore::InspectorInstrumentation::didReceiveWebSocketFrameErrorImpl): (WebCore::InspectorInstrumentation::didSendWebSocketFrameImpl): * inspector/InspectorInstrumentation.h: (WebCore): (InspectorInstrumentation): (WebCore::InspectorInstrumentation::didReceiveWebSocketFrame): (WebCore::InspectorInstrumentation::didReceiveWebSocketFrameError): (WebCore::InspectorInstrumentation::didSendWebSocketFrame): * inspector/InspectorResourceAgent.cpp: (WebCore::InspectorResourceAgent::didReceiveWebSocketFrame): (WebCore): (WebCore::InspectorResourceAgent::didSendWebSocketFrame): (WebCore::InspectorResourceAgent::didReceiveWebSocketFrameError): * inspector/InspectorResourceAgent.h: (WebCore): (InspectorResourceAgent): * inspector/compile-front-end.py: Added new Web Inspector resource file. * inspector/front-end/NetworkItemView.js: Added a new View for inspecting Web Socket frames and errors. (WebInspector.NetworkItemView): * inspector/front-end/NetworkManager.js: Implemented callback called by InspectorResourceAgent for the new Web Socket frame and error calls. (WebInspector.NetworkDispatcher.prototype.webSocketFrameReceived): (WebInspector.NetworkDispatcher.prototype.webSocketFrameSent): (WebInspector.NetworkDispatcher.prototype.webSocketFrameError): * inspector/front-end/NetworkRequest.js: Added a frames array to a Resource request along with accessor and helper methods (WebInspector.NetworkRequest): (WebInspector.NetworkRequest.prototype.resource): (WebInspector.NetworkRequest.prototype.hasFrames): (WebInspector.NetworkRequest.prototype.frameLength): (WebInspector.NetworkRequest.prototype.getFrame): (WebInspector.NetworkRequest.prototype.addFrameError): (WebInspector.NetworkRequest.prototype.addFrame): (WebInspector.NetworkRequest.prototype._pushFrame): * inspector/front-end/ResourceWebSocketFrameView.js: Added to help display Web Socket frame and error data. (WebInspector.ResourceWebSocketFrameView): * inspector/front-end/WebKit.qrc: Added new Web Inspector resource file. * inspector/front-end/inspector.html: Added new Web Inspector resource file. 2012-04-27 Nikolas Zimmermann Fix repetitions & by animation support for SVGAnimateTransformElement https://bugs.webkit.org/show_bug.cgi?id=85051 Reviewed by Antti Koivisto. Repetitions are currently handled by adjusting percentage (percentage += repeatCount). This doesn't work for as each repetition has to be post-multiplied to the animated transform list. Fix that. By-animations are equal to values="0;by" animations in SMIL. '0' is the neutral element of addition, which is the _zero_ matrix, not the identity matrix for SVGTransform. Add a new construction mode to SVGTransform to be able to construct zero transforms. Tests: svg/animations/animateTransform-accumulation-expected.svg svg/animations/animateTransform-accumulation.svg svg/animations/animateTransform-by-scale-expected.svg svg/animations/animateTransform-by-scale.svg svg/animations/animateTransform-from-by-from-to-comparision-expected.svg svg/animations/animateTransform-from-by-from-to-comparision.svg svg/animations/animateTransform-from-by-scale-additive-sum-expected.svg svg/animations/animateTransform-from-by-scale-additive-sum.svg svg/animations/animateTransform-from-by-scale-expected.svg svg/animations/animateTransform-from-by-scale.svg svg/animations/animateTransform-rotate-around-point-expected.svg svg/animations/animateTransform-rotate-around-point.svg svg/animations/animateTransform-skewX-expected.svg svg/animations/animateTransform-skewX.svg svg/animations/animateTransform-skewY-expected.svg svg/animations/animateTransform-skewY.svg svg/animations/animateTransform-translate-expected.svg svg/animations/animateTransform-translate.svg svg/animations/multiple-animateTransform-additive-sum-expected.svg svg/animations/multiple-animateTransform-additive-sum.svg * svg/SVGAnimateTransformElement.cpp: (WebCore::SVGAnimateTransformElement::parseAttribute): * svg/SVGAnimatedTransformList.cpp: (WebCore::SVGAnimatedTransformListAnimator::addAnimatedTypes): (WebCore::SVGAnimatedTransformListAnimator::calculateAnimatedValue): * svg/SVGAnimationElement.h: (WebCore::SVGAnimationElement::adjustFromToListValues): * svg/SVGTransform.cpp: (WebCore::SVGTransform::SVGTransform): * svg/SVGTransform.h: * svg/SVGTransformDistance.cpp: (WebCore::SVGTransformDistance::SVGTransformDistance): (WebCore::SVGTransformDistance::scaledDistance): (WebCore::SVGTransformDistance::addSVGTransforms): (WebCore::SVGTransformDistance::addToSVGTransform): (WebCore::SVGTransformDistance::distance): * svg/SVGTransformDistance.h: (SVGTransformDistance): 2012-04-27 Nikolas Zimmermann SVG Animations update baseVal instead of animVal https://bugs.webkit.org/show_bug.cgi?id=12437 Reviewed by Dirk Schulze. Cleanup animation code, remove last remaining crufts of the old setAttribute() animation model. Now only two animation modes remain: animate SVG DOM animVal properties or CSS properties. Stop caching base values per string in SMILTimeContainer, as it breaks additive="sum" for CSS properties if the underlying base value is changed from the outside (eg. when calling style.fontSize="20px", if font-size was 10px, and we're running an additive by-animation with 50px). This requires us to cache the computed style of a SVGElement, without SMIL style property changes, in SVGElementRareData, similar to how the computed style itself is cached in ElementRareData. To be able to compute the base value for a CSS property at any time, we have to exclude any previous animation effects residing in the SMIL animated style properties, per SMIL2/3 specs. NOTE: This doesn't change or affect the way CSS Animations/Transitions are applied, we still have some bugs in that area, but this patch doesn't address them. The idea is to only remove the cache, to pave the way for future additive="sum" patches. Tests: svg/animations/change-css-property-while-animating-fill-freeze.html svg/animations/change-css-property-while-animating-fill-remove.html * dom/Element.cpp: (WebCore::Element::recalcStyle): * dom/Node.h: * svg/SVGAnimateElement.cpp: (WebCore::propertyTypesAreConsistent): (WebCore::SVGAnimateElement::resetToBaseValue): (WebCore::SVGAnimateElement::applyResultsToTarget): * svg/SVGAnimateElement.h: (SVGAnimateElement): * svg/SVGAnimateMotionElement.cpp: (WebCore::SVGAnimateMotionElement::resetToBaseValue): * svg/SVGAnimateMotionElement.h: (SVGAnimateMotionElement): * svg/SVGAnimationElement.cpp: (WebCore::applyCSSPropertyToTarget): (WebCore::SVGAnimationElement::setTargetAttributeAnimatedCSSValue): * svg/SVGAnimationElement.h: * svg/SVGElement.cpp: (WebCore::SVGElement::SVGElement): (WebCore::SVGElement::willRecalcStyle): (WebCore): (WebCore::SVGElement::rareSVGData): (WebCore::SVGElement::ensureRareSVGData): (WebCore::SVGElement::computedStyle): (WebCore::SVGElement::isAnimatableAttribute): * svg/SVGElement.h: (SVGElement): * svg/SVGElementRareData.h: (WebCore::SVGElementRareData::SVGElementRareData): (WebCore::SVGElementRareData::ensureAnimatedSMILStyleProperties): (WebCore::SVGElementRareData::destroyAnimatedSMILStyleProperties): (WebCore::SVGElementRareData::overrideComputedStyle): (WebCore::SVGElementRareData::setUseOverrideComputedStyle): * svg/animation/SMILTimeContainer.cpp: (WebCore::SMILTimeContainer::updateAnimations): * svg/animation/SMILTimeContainer.h: (SMILTimeContainer): * svg/animation/SVGSMILElement.h: (SVGSMILElement): 2012-04-26 Alexander Pavlov Web Inspector: Implement the "Disable JavaScript" option in the settings dialog (re-landing r115323 with a fixed test.) https://bugs.webkit.org/show_bug.cgi?id=84946 Based on user actions in the Inspector frontend, InspectorPageAgent invokes Settings::setScriptEnabled() for the associated page to switch the script execution therein. Reviewed by Yury Semikhatsky. Test: inspector/debugger/disable-script.html * inspector/Inspector.json: * inspector/InspectorPageAgent.cpp: (PageAgentState): (WebCore::InspectorPageAgent::enable): (WebCore::InspectorPageAgent::disable): (WebCore::InspectorPageAgent::getScriptExecutionStatus): (WebCore): (WebCore::InspectorPageAgent::setScriptExecutionDisabled): * inspector/InspectorPageAgent.h: * inspector/front-end/Settings.js: * inspector/front-end/SettingsScreen.js: (WebInspector.SettingsScreen): (WebInspector.SettingsScreen.prototype.get _updateScriptDisabledCheckbox): (WebInspector.SettingsScreen.prototype._javaScriptDisabledChanged): * inspector/front-end/inspector.js: 2012-04-26 Ryosuke Niwa REGRESSION (r94497): Pressing Command+A when inline (Marked Text) is not empty will clean whole content https://bugs.webkit.org/show_bug.cgi?id=84501 Reviewed by Alexey Proskuryakov. The bug was caused by setComposition, which is called by cancelComposition, deleting the contents when the passed text is empty. Fixed it by not deleting text when canceling compositions. This is okay because as the comment above the line suggests, this particular call to TypingCommand::deleteSelection is only useful when the confirmed text is empty and the composition text had previously been non-empty. Test: editing/input/select-all-clear-input-method.html * editing/Editor.cpp: (WebCore::Editor::setComposition): 2012-04-26 Keishi Hattori datalist: Form control in a should be barred from constraint validation https://bugs.webkit.org/show_bug.cgi?id=84359 http://www.whatwg.org/specs/web-apps/current-work/multipage/the-button-element.html#the-datalist-element According to this, if an element has a datalist element ancestor, it is barred from constraint validation. Reviewed by Kent Tamura. Test: fast/forms/datalist/datalist-child-validation.html * html/HTMLFormControlElement.cpp: (WebCore::HTMLFormControlElement::HTMLFormControlElement): (WebCore::HTMLFormControlElement::updateAncestors): Updates the ancestor information. (WebCore::HTMLFormControlElement::insertedInto): Invalidates the ancestor information and calls setNeedsWillValidateCheck (WebCore::HTMLFormControlElement::removedFrom): Invalidates the ancestor information and calls setNeedsWillValidateCheck (WebCore::HTMLFormControlElement::disabled): (WebCore::HTMLFormControlElement::recalcWillValidate): Returns false if element has a datalist ancestor. (WebCore::HTMLFormControlElement::setNeedsWillValidateCheck): Check if ancestor information is valid too. * html/HTMLFormControlElement.h: (HTMLFormControlElement): 2012-04-26 Adrienne Walker [chromium] Remove unused CCLayerImpl::debugID() https://bugs.webkit.org/show_bug.cgi?id=85019 Reviewed by James Robinson. CCLayerSorter used debugID() but it was never set anywhere. Change the CCLayerSorter LOG messages to use id(), which does get set. * platform/graphics/chromium/cc/CCLayerImpl.h: (CCLayerImpl): * platform/graphics/chromium/cc/CCLayerSorter.cpp: (WebCore::CCLayerSorter::createGraphNodes): (WebCore::CCLayerSorter::createGraphEdges): (WebCore::CCLayerSorter::sort): 2012-04-26 Nico Weber [chromium] Fix C++ language use. https://bugs.webkit.org/show_bug.cgi?id=85015 Reviewed by James Robinson. Even though MSVC allows it, a sizeof followed by a non-parenthesized typename is not valid C++. No functionality change. * rendering/RenderThemeChromiumWin.cpp: (WebCore): (WebCore::getNonClientMetrics): 2012-04-24 James Robinson [chromium] Move ProgramBinding definitions to LayerRendererChromium and normalize naming https://bugs.webkit.org/show_bug.cgi?id=84808 Reviewed by Adrienne Walker. The GL programs used are logically part of LayerRendererChromium and not something specific to a layer type, since a different renderer would want to use a different thing to render the same layer types. This moves all of the ProgramBinding definitions into LayerRendererChromium and gives them consistent names. With the exception of CCRenderSurface (noted by an inline comment), these programs are private to LRC. This patch also deduplicates programs a bit: 1.) Video's NativeTexture and RGBA programs were the same thing, folded. 2.) The TexStretch and TexTransform shaders are basically the same thing, folded together. * platform/graphics/chromium/LayerChromium.h: (LayerChromium): * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::drawCheckerboardQuad): (WebCore::LayerRendererChromium::drawDebugBorderQuad): (WebCore::LayerRendererChromium::drawSolidColorQuad): (WebCore::LayerRendererChromium::drawTileQuad): (WebCore::LayerRendererChromium::drawYUV): (WebCore::LayerRendererChromium::drawRGBA): (WebCore::LayerRendererChromium::drawNativeTexture2D): (WebCore::LayerRendererChromium::drawStreamTexture): (WebCore::LayerRendererChromium::drawTextureQuad): (WebCore::LayerRendererChromium::drawHeadsUpDisplay): (WebCore::LayerRendererChromium::initializeSharedObjects): (WebCore::LayerRendererChromium::tileCheckerboardProgram): (WebCore::LayerRendererChromium::solidColorProgram): (WebCore::LayerRendererChromium::headsUpDisplayProgram): (WebCore::LayerRendererChromium::renderSurfaceProgram): (WebCore::LayerRendererChromium::renderSurfaceProgramAA): (WebCore::LayerRendererChromium::renderSurfaceMaskProgram): (WebCore::LayerRendererChromium::renderSurfaceMaskProgramAA): (WebCore::LayerRendererChromium::tileProgram): (WebCore::LayerRendererChromium::tileProgramOpaque): (WebCore::LayerRendererChromium::tileProgramAA): (WebCore::LayerRendererChromium::tileProgramSwizzle): (WebCore::LayerRendererChromium::tileProgramSwizzleOpaque): (WebCore::LayerRendererChromium::tileProgramSwizzleAA): (WebCore::LayerRendererChromium::textureProgramFlip): (WebCore::LayerRendererChromium::textureTexRectProgram): (WebCore::LayerRendererChromium::textureTexRectProgramFlip): (WebCore::LayerRendererChromium::videoRGBAProgram): (WebCore::LayerRendererChromium::videoYUVProgram): (WebCore::LayerRendererChromium::videoStreamTextureProgram): (WebCore::LayerRendererChromium::cleanupSharedObjects): * platform/graphics/chromium/LayerRendererChromium.h: (WebCore): (LayerRendererChromium): * platform/graphics/chromium/ShaderChromium.cpp: * platform/graphics/chromium/ShaderChromium.h: * platform/graphics/chromium/cc/CCHeadsUpDisplay.h: (CCHeadsUpDisplay): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: (WebCore): * platform/graphics/chromium/cc/CCRenderSurface.cpp: (WebCore::CCRenderSurface::copyTextureToFramebuffer): (WebCore::CCRenderSurface::drawLayer): * platform/graphics/chromium/cc/CCRenderSurface.h: (CCRenderSurface): * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp: * platform/graphics/chromium/cc/CCTextureLayerImpl.h: (CCTextureLayerImpl): * platform/graphics/chromium/cc/CCThreadProxy.cpp: * platform/graphics/chromium/cc/CCTiledLayerImpl.h: (CCTiledLayerImpl): * platform/graphics/chromium/cc/CCVideoLayerImpl.h: (WebCore): (CCVideoLayerImpl): 2012-04-26 Jeffrey Pfau Invalid cast in WebCore::HTMLCollection::isAcceptableElement https://bugs.webkit.org/show_bug.cgi?id=84626 Reviewed by Darin Adler. Check if the object is an HTMLElement before casting. Test: fast/dom/htmlcollection-non-html.html * html/HTMLCollection.cpp: (WebCore::HTMLCollection::isAcceptableElement): 2012-04-26 Dana Jansens [chromium] Some background filters require inflating damage on the surface behind them https://bugs.webkit.org/show_bug.cgi?id=84479 Reviewed by Adrienne Walker. A layer with a background blur will expand the damage from pixels in the surface below it. We extend the damage tracker to expand damage in a surface below such layers. Unit test: CCDamageTrackerTest.verifyDamageForBackgroundBlurredChild * platform/graphics/chromium/cc/CCDamageTracker.cpp: (WebCore::expandPixelOutsetsWithFilters): (WebCore): (WebCore::expandDamageRectInsideRectWithFilters): (WebCore::expandDamageRectWithFilters): (WebCore::CCDamageTracker::updateDamageTrackingState): (WebCore::CCDamageTracker::trackDamageFromActiveLayers): * platform/graphics/chromium/cc/CCDamageTracker.h: (CCDamageTracker): 2012-04-26 Simon Fraser Improve compositing logging output https://bugs.webkit.org/show_bug.cgi?id=85010 Reviewed by Dean Jackson. In the compositing log channel output, indent the layers based on z-order tree depth. Tabulate the summary, and show obligate and secondary backing store area separately. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::updateClipRects): * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::RenderLayerCompositor): (WebCore::RenderLayerCompositor::updateCompositingLayers): (WebCore::RenderLayerCompositor::logLayerInfo): (WebCore::RenderLayerCompositor::rebuildCompositingLayerTree): (WebCore::RenderLayerCompositor::updateLayerTreeGeometry): (WebCore::RenderLayerCompositor::reasonForCompositing): * rendering/RenderLayerCompositor.h: (RenderLayerCompositor): 2012-04-26 Anders Carlsson REGRESSION (r115163): Unable to scroll article body with trackpad on altdevblogaday.com blog post https://bugs.webkit.org/show_bug.cgi?id=85024 Reviewed by Sam Weinig. Fix broken logic in canHaveScrollbars. * page/scrolling/ScrollingTreeNode.h: (WebCore::ScrollingTreeNode::canHaveScrollbars): 2012-04-24 James Robinson [chromium] Use different CCDrawQuad types for textures vs IOSurfaces https://bugs.webkit.org/show_bug.cgi?id=84811 Reviewed by Adrienne Walker. IOSurface and texture backed layers share few properties (only the flipped bool), so it doesn't make a lot of sense for them to use the same CCDrawQuad type for both. This splits IOSurfaces out to a dedicated quad type to make it easier to understand which bits of state apply to each. The logical next step after this is to split the layer type as well, but that will be awkward until bug 84808 is resolved. * WebCore.gypi: * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::drawQuad): (WebCore::LayerRendererChromium::drawTextureQuad): (WebCore): (WebCore::LayerRendererChromium::drawIOSurfaceQuad): * platform/graphics/chromium/LayerRendererChromium.h: (LayerRendererChromium): * platform/graphics/chromium/cc/CCDrawQuad.cpp: (WebCore::CCDrawQuad::toIOSurfaceDrawQuad): (WebCore): * platform/graphics/chromium/cc/CCDrawQuad.h: (WebCore): (CCDrawQuad): * platform/graphics/chromium/cc/CCIOSurfaceDrawQuad.cpp: Copied from Source/WebCore/platform/graphics/chromium/cc/CCTextureDrawQuad.cpp. (WebCore): (WebCore::CCIOSurfaceDrawQuad::create): (WebCore::CCIOSurfaceDrawQuad::CCIOSurfaceDrawQuad): * platform/graphics/chromium/cc/CCIOSurfaceDrawQuad.h: Copied from Source/WebCore/platform/graphics/chromium/cc/CCTextureDrawQuad.h. (WebCore): (CCIOSurfaceDrawQuad): (WebCore::CCIOSurfaceDrawQuad::flipped): (WebCore::CCIOSurfaceDrawQuad::ioSurfaceSize): (WebCore::CCIOSurfaceDrawQuad::ioSurfaceTextureId): * platform/graphics/chromium/cc/CCTextureDrawQuad.cpp: (WebCore::CCTextureDrawQuad::create): (WebCore::CCTextureDrawQuad::CCTextureDrawQuad): * platform/graphics/chromium/cc/CCTextureDrawQuad.h: (CCTextureDrawQuad): * platform/graphics/chromium/cc/CCTextureLayerImpl.cpp: (WebCore::CCTextureLayerImpl::appendQuads): 2012-04-26 Benjamin Poulain Use WebKit types for the cache of ObjcClass::methodsNamed() https://bugs.webkit.org/show_bug.cgi?id=85012 Reviewed by Geoffrey Garen. This patch redefines the method cache ObjcClass to avoid memory allocations in the case of positive match. Instead of using the converted name as the key, the original identifier string is used. This shortcuts all the other operations when there is a match. A side effect is a method can appear multiple times in the cache if it is invoked with different names using the escape character "$". An attaquer could bloat the cache with a few hundreds strings. In the common case, having each name mapped is an improvment. * bridge/objc/objc_class.h: (ObjcClass): * bridge/objc/objc_class.mm: (JSC::Bindings::ObjcClass::ObjcClass): (JSC::Bindings::ObjcClass::methodsNamed): 2012-04-26 Ojan Vafai Delete dead code in Arena.h/cpp https://bugs.webkit.org/show_bug.cgi?id=84997 Reviewed by Eric Seidel. Also cleaned up some style issues. Renamed some single-letter variable names. Avoided anything other than totally trivial style changes to be 100% sure that there is no change in behavior. No new tests. There's no non-style code changes except inlining CLEAR_UNUSED and CLEAR_ARENA. * platform/Arena.cpp: (WebCore): (WebCore::CeilingLog2): (WebCore::InitArenaPool): (WebCore::ArenaAllocate): (WebCore::FreeArenaList): (WebCore::FinishArenaPool): * platform/Arena.h: (WebCore): 2012-04-26 Shawn Singh Re-implement backFaceVisibility to avoid dealing with perspective w < 0 problem https://bugs.webkit.org/show_bug.cgi?id=84059 Reviewed by Adrienne Walker. Unit tests added to CCMathUtilTest.cpp. This patch changes the implementation of backFaceIsVisible so that it doesn't need to deal with the w < 0 problem from of perspective projections. Instead, it is equally correct to simply use the inverse-transpose of the matrix, and quickly check the third row, third column element. Additionally, it was appropriate to move this function into TransformationMatrix itself. Making this change fixes some issues related to disappearing layers in Chromium (where the compositor incorrectly thought that the back face was visible, and skipped the layer). * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp: (WebCore::calculateVisibleLayerRect): (WebCore::layerShouldBeSkipped): * platform/graphics/transforms/TransformationMatrix.cpp: (WebCore::TransformationMatrix::isBackFaceVisible): (WebCore): * platform/graphics/transforms/TransformationMatrix.h: (TransformationMatrix): 2012-04-26 Martin Robinson [Cairo] Wrap cairo surfaces in a class when storing native images https://bugs.webkit.org/show_bug.cgi?id=83611 Reviewed by Alejandro G. Castro. No new tests. This is just a refactoring. This shouldn't change functionality. Added class that wraps Cairo images surfaces to serve as the "native image" type for the Cairo platform. This will allow the addition of caching resampled images as well as versions of the image for non-image Cairo backends. Also split out BitmapImageCairo.cpp from ImageCairo.cpp since these classes are defined in two headers. * GNUmakefile.list.am: Added new files. * platform/graphics/BitmapImage.h: Added a factory method that takes an image surface to reduce code churn. * platform/graphics/ImageSource.h: NativeImagePtr is now NativeImageCairo*. (WebCore): * platform/graphics/cairo/BitmapImageCairo.cpp: Copied from Source/WebCore/platform/graphics/cairo/ImageCairo.cpp. * platform/graphics/cairo/GraphicsContext3DCairo.cpp: Updated to reflect use of NativeImageCairo. * platform/graphics/cairo/ImageCairo.cpp: Ditto. * platform/graphics/cairo/NativeImageCairo.cpp: Added. * platform/graphics/cairo/NativeImageCairo.h: Added. * platform/graphics/cairo/PatternCairo.cpp: Updated to reflect use of NativeImageCairo. * platform/graphics/gtk/ImageGtk.cpp: Ditto. * platform/image-decoders/cairo/ImageDecoderCairo.cpp: Ditto. 2012-04-26 Mark Hahnenberg [GTK] Massive media tests failures since r115288 https://bugs.webkit.org/show_bug.cgi?id=84950 Reviewed by Filip Pizlo. No new tests. Since the "cross-platform" WebCore timer is at too high of a level in terms of the layers of WebKit for JSC to use, we are not currently able to use it in JSC, thus only those platforms that support CoreFoundation can currently take advantage of the new and improved GC activity timer. We've restored the old code paths for those platforms that don't have CF so that they will at least have the same behavior as before when calling garbageCollectSoon. * bindings/js/GCController.cpp: Added back the old WebCore timer along with some if-defs that do away with the WebCore timer on platforms that support CoreFoundation. (WebCore::GCController::GCController): (WebCore::GCController::garbageCollectSoon): (WebCore): (WebCore::GCController::gcTimerFired): * bindings/js/GCController.h: Ditto. (GCController): 2012-04-26 Adam Klein Don't include V8Proxy.h in ScriptValue.h when V8GCController is all that's required https://bugs.webkit.org/show_bug.cgi?id=84986 Reviewed by Kentaro Hara. This makes it easier to include ScriptValue.h since it greatly reduces that header's dependencies. * bindings/v8/ScriptValue.h: Changed to include just V8GCController.h and removed comment which is redundant with explicit V8GCController references nearby. 2012-04-26 Aaron Colwell Fix missing sourceState change on MEDIA_ERR_SOURCE_NOT_SUPPORTED error. https://bugs.webkit.org/show_bug.cgi?id=84996 Reviewed by Eric Carlson. No new tests. http/tests/media/media-source/webm/video-media-source-errors.html was updated to verify that webkitSourceState is always SOURCE_CLOSED when the onerror event fires. * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::noneSupported): 2012-04-26 Antti Koivisto Cache parsed stylesheets https://bugs.webkit.org/show_bug.cgi?id=85004 Reviewed by Andreas Kling. CSS parsing is 1-2% of WebKit CPU usage on average pages, more on sites with large stylesheets. We currently reparse all stylesheets from source text when they are encountered again. In many browsing scenarios we can eliminate lot of this by caching the parsed stylesheets. For example it is very common for subpages of a site to share the stylesheets. This patch enables memory caching for stylesheet loaded using the element. Only stylesheets that have no import rules are cacheable for now. Cached stylesheets are copied on restore so there is no sharing (and no memory wins) yet. In the future we will also be able to share the actual data structures between pages for significant memory savings. After browsing around for a while <5% of the memory cache data was in parsed stylesheets so this does not bloat the cache significantly. * css/CSSStyleSheet.cpp: (WebCore): (WebCore::StyleSheetInternal::estimatedSizeInBytes): Estimate stylesheet size so we can handle decoded data pruning correctly. * css/CSSStyleSheet.h: (StyleSheetInternal): * css/StylePropertySet.cpp: (WebCore::StylePropertySet::averageSizeInBytes): (WebCore): * css/StylePropertySet.h: (StylePropertySet): * css/StyleRule.cpp: (WebCore::StyleRule::averageSizeInBytes): (WebCore): * css/StyleRule.h: (StyleRule): * html/HTMLLinkElement.cpp: (WebCore::HTMLLinkElement::setCSSStyleSheet): Save and restore parsed stylesheet. The current CSS parse context must be identical to the cached stylesheets. This ensures that the parsing results would be identical. * loader/cache/CachedCSSStyleSheet.cpp: (WebCore): (WebCore::CachedCSSStyleSheet::destroyDecodedData): (WebCore::CachedCSSStyleSheet::restoreParsedStyleSheet): (WebCore::CachedCSSStyleSheet::saveParsedStyleSheet): * loader/cache/CachedCSSStyleSheet.h: The parsed stylesheet cache is considered decoded data, similar to the image bitmaps. It uses the same mechanism for pruning. (WebCore): (CachedCSSStyleSheet): 2012-04-26 Anders Carlsson A TileCache should never outlive its WebTileCacheLayer https://bugs.webkit.org/show_bug.cgi?id=85008 Reviewed by Andreas Kling. Since WebTileCacheLayer objects can be destroyed on the scrolling thread, make sure to delete the TileCache layer when the PlatformCALayer is destroyed. This fixes a crash when the tile revalidation timer fires after the WebTileCacheLayer has been destroyed, but before the TileCache itself has been destroyed. * platform/graphics/ca/mac/PlatformCALayerMac.mm: (PlatformCALayer::~PlatformCALayer): * platform/graphics/ca/mac/WebTileCacheLayer.h: * platform/graphics/ca/mac/WebTileCacheLayer.mm: (-[WebTileCacheLayer dealloc]): (-[WebTileCacheLayer invalidate]): 2012-04-26 Benjamin Poulain Use String instead of RefPtr for the cache of ObjcClass https://bugs.webkit.org/show_bug.cgi?id=84932 Reviewed by Andreas Kling. The cache with RefPtr was added with r115007. This patch aims at making the code a little easier to read. By using String, one would not need to know the Traits for StringImpl. * bridge/objc/objc_class.h: (ObjcClass): 2012-04-26 Kentaro Hara [V8] Pass Isolate to wrap() in SerializedScriptValue.cpp https://bugs.webkit.org/show_bug.cgi?id=84923 Reviewed by Nate Chapin. The objective is to pass Isolate around in V8 bindings. In this bug we pass Isolate to wrap() in SerializedScriptValue.cpp. No tests. No change in behavior. * bindings/v8/SerializedScriptValue.cpp: 2012-04-26 Hao Zheng [chromium] Complex text support for Android. https://bugs.webkit.org/show_bug.cgi?id=84431 Complex text support is different on Android from other platforms. There are 2 kinds of font on Android: system fonts and fallback fonts. System fonts have a name, and are accessible in FontPlatformData. Fallback fonts do not have specific names, so they are not accessible from WebKit directly. There is one font for each script support. To feed Harfbuzz, use a trick to get correct SkTypeface based on script. Reviewed by Tony Chang. No new tests. Current tests are runnable on Android. * platform/graphics/FontCache.h: (FontCache): Make ComplexTextController friend of FontCache on Android. * platform/graphics/chromium/FontCacheAndroid.cpp: (WebCore::FontCache::createFontPlatformData): * platform/graphics/harfbuzz/ComplexTextControllerHarfBuzz.cpp: (WebCore::ComplexTextController::getComplexFontPlatformData): (WebCore): (WebCore::ComplexTextController::setupFontForScriptRun): * platform/graphics/harfbuzz/ComplexTextControllerHarfBuzz.h: (ComplexTextController): 2012-04-26 Kentaro Hara [V8] Pass Isolate to wrap() (Part2) https://bugs.webkit.org/show_bug.cgi?id=84922 Reviewed by Nate Chapin. The objective is to pass Isolate around in V8 bindings. This patch passes Isolate to wrap() in custom bindings. No tests. No change in behavior. * bindings/v8/custom/V8LocationCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8NamedNodeMapCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8SVGPathSegCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8StyleSheetCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8Uint16ArrayCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8Uint32ArrayCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8Uint8ArrayCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8Uint8ClampedArrayCustom.cpp: (WebCore::toV8): 2012-04-26 Jon Lee [WK2] AlternativeTextClient leaks when the page is destroyed https://bugs.webkit.org/show_bug.cgi?id=84307 Reviewed by Enrica Casucci. * page/AlternativeTextClient.h: Add pageDestroyed() call, as in EditorClient. (AlternativeTextClient): * page/Page.cpp: (WebCore::Page::~Page): When the page is destroyed, notify the client if it exists. 2012-04-26 Kentaro Hara [V8] Pass Isolate to wrap() (Part1) https://bugs.webkit.org/show_bug.cgi?id=84921 Reviewed by Nate Chapin. The objective is to pass Isolate around in V8 bindings. This patch passes Isolate to wrap() in custom bindings. No tests. No change in behavior. * bindings/v8/custom/V8BlobCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8CSSRuleCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8CSSStyleSheetCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8CSSValueCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8DOMStringMapCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8DOMTokenListCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8DataViewCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8EventCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8Float32ArrayCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8Float64ArrayCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8HTMLCollectionCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8ImageDataCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8Int16ArrayCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8Int32ArrayCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8Int8ArrayCustom.cpp: (WebCore::toV8): 2012-04-26 Benjamin Poulain ObjcClass::methodsNamed() can leak if buffer is dynamically allocated https://bugs.webkit.org/show_bug.cgi?id=84668 Reviewed by Alexey Proskuryakov. Change ObjcClass::methodsNamed() to be based on a vector instead of managing the memory manually. Tests: platform/mac/plugins/bindings-objc-long-method-name.html platform/mac/plugins/bindings-objc-method-name-conversion.html * bridge/objc/objc_class.mm: (Bindings): (JSC::Bindings::convertJSMethodNameToObjc): (JSC::Bindings::ObjcClass::methodsNamed): 2012-04-26 Justin Novosad [Chromium] Single buffered canvas layers with the threaded compositor https://bugs.webkit.org/show_bug.cgi?id=80540 Reviewed by James Robinson. Tests: CCLayerTreeHostTestWriteLayersRedraw CCLayerTreeHostTestWriteLayersAfterVisible Canvas2DLayerChromiumTest.testFullLifecycleSingleThreadDeferred Canvas2DLayerChromiumTest.testFullLifecycleThreadDeferred CCSchedulerTest.VisibilitySwitchWithTextureAcquisition CCSchedulerTest.TextureAcquisitionCollision Disable double buffering and rate limiting on accelerated canvas when the threaded compositor and deferred canvas are enabled. Concurrent access to the layer texture by the main renderer thread and the compositor thread is avoided by enforcing a lock. The state of the lock is maintained by CCSchedulerStateMachine. Write access by the main thread is acquired through a signal round trip to the compositor thread, which may block the main thread in the event that one or more committed layers need to be protected until the compositor completes the requested draw. Draws on the impl thread are cancelled if the main thread has obtained write access to the texture. The write access is relinquished by the main thread upon commit completion. The scheduler state machine is responsible for preventing the texture lock from causing deadlocks by detecting and resolving problematic states. * platform/graphics/chromium/Canvas2DLayerChromium.cpp: (WebCore::Canvas2DLayerChromium::create): (WebCore::Canvas2DLayerChromium::Canvas2DLayerChromium): (WebCore::Canvas2DLayerChromium::~Canvas2DLayerChromium): (WebCore::Canvas2DLayerChromium::drawingIntoImplThreadTexture): (WebCore): (WebCore::Canvas2DLayerChromium::setTextureId): (WebCore::Canvas2DLayerChromium::setNeedsDisplayRect): (WebCore::Canvas2DLayerChromium::update): (WebCore::Canvas2DLayerChromium::layerWillDraw): (WebCore::Canvas2DLayerChromium::pushPropertiesTo): * platform/graphics/chromium/Canvas2DLayerChromium.h: * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::acquireLayerTextures): (WebCore): * platform/graphics/chromium/cc/CCLayerTreeHost.h: (CCLayerTreeHost): * platform/graphics/chromium/cc/CCProxy.h: (CCProxy): * platform/graphics/chromium/cc/CCScheduler.cpp: (WebCore::CCScheduler::setMainThreadNeedsLayerTextures): (WebCore): (WebCore::CCScheduler::processScheduledActions): * platform/graphics/chromium/cc/CCScheduler.h: (CCSchedulerClient): (CCScheduler): * platform/graphics/chromium/cc/CCSchedulerStateMachine.cpp: (WebCore::CCSchedulerStateMachine::CCSchedulerStateMachine): (WebCore::CCSchedulerStateMachine::drawSuspendedUntilCommit): (WebCore): (WebCore::CCSchedulerStateMachine::scheduledToDraw): (WebCore::CCSchedulerStateMachine::shouldDraw): (WebCore::CCSchedulerStateMachine::shouldAcquireLayerTexturesForMainThread): (WebCore::CCSchedulerStateMachine::nextAction): (WebCore::CCSchedulerStateMachine::updateState): (WebCore::CCSchedulerStateMachine::setMainThreadNeedsLayerTextures): * platform/graphics/chromium/cc/CCSchedulerStateMachine.h: (CCSchedulerStateMachine): * platform/graphics/chromium/cc/CCSingleThreadProxy.h: * platform/graphics/chromium/cc/CCThreadProxy.cpp: (WebCore::CCThreadProxy::CCThreadProxy): (WebCore::CCThreadProxy::beginFrame): (WebCore::CCThreadProxy::scheduledActionDrawAndSwapInternal): (WebCore): (WebCore::CCThreadProxy::acquireLayerTextures): (WebCore::CCThreadProxy::acquireLayerTexturesForMainThreadOnImplThread): (WebCore::CCThreadProxy::scheduledActionAcquireLayerTexturesForMainThread): * platform/graphics/chromium/cc/CCThreadProxy.h: (CCThreadProxy): * platform/graphics/skia/ImageBufferSkia.cpp: (WebCore): (WebCore::AcceleratedDeviceContext::AcceleratedDeviceContext): (WebCore::AcceleratedDeviceContext::prepareForDraw): (AcceleratedDeviceContext): (WebCore::createAcceleratedCanvas): (WebCore::ImageBuffer::context): 2012-04-26 Kentaro Hara [V8] Pass Isolate to toV8() in SerializedScriptValue.cpp https://bugs.webkit.org/show_bug.cgi?id=84918 Reviewed by Nate Chapin. This is the last step to pass Isolate around in SerializedScriptValue.cpp. This patch passes Isolate to toV8(). No tests. No change in behavior. * bindings/v8/SerializedScriptValue.cpp: 2012-04-26 Kentaro Hara [V8] Pass Isolate to wrapSlow() https://bugs.webkit.org/show_bug.cgi?id=84919 Reviewed by Nate Chapin. The objective is to pass Isolate around in V8 bindings. In this bug, we pass Isolate to wrapSlow(). Test: bindings/scripts/test/TestObj.idl etc * bindings/scripts/CodeGeneratorV8.pm: Modified as described above. (GenerateHeader): (GenerateToV8Converters): * bindings/scripts/test/V8/V8Float64Array.cpp: Updated run-bindings-tests. (WebCore::V8Float64Array::wrapSlow): * bindings/scripts/test/V8/V8Float64Array.h: (V8Float64Array): (WebCore::V8Float64Array::wrap): * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp: (WebCore::V8TestActiveDOMObject::wrapSlow): * bindings/scripts/test/V8/V8TestActiveDOMObject.h: (V8TestActiveDOMObject): (WebCore::V8TestActiveDOMObject::wrap): * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp: (WebCore::V8TestCustomNamedGetter::wrapSlow): * bindings/scripts/test/V8/V8TestCustomNamedGetter.h: (V8TestCustomNamedGetter): (WebCore::V8TestCustomNamedGetter::wrap): * bindings/scripts/test/V8/V8TestEventConstructor.cpp: (WebCore::V8TestEventConstructor::wrapSlow): * bindings/scripts/test/V8/V8TestEventConstructor.h: (V8TestEventConstructor): (WebCore::V8TestEventConstructor::wrap): * bindings/scripts/test/V8/V8TestEventTarget.cpp: (WebCore::V8TestEventTarget::wrapSlow): * bindings/scripts/test/V8/V8TestEventTarget.h: (V8TestEventTarget): (WebCore::V8TestEventTarget::wrap): * bindings/scripts/test/V8/V8TestInterface.cpp: (WebCore::V8TestInterface::wrapSlow): * bindings/scripts/test/V8/V8TestInterface.h: (V8TestInterface): (WebCore::V8TestInterface::wrap): * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp: (WebCore::V8TestMediaQueryListListener::wrapSlow): * bindings/scripts/test/V8/V8TestMediaQueryListListener.h: (V8TestMediaQueryListListener): (WebCore::V8TestMediaQueryListListener::wrap): * bindings/scripts/test/V8/V8TestNamedConstructor.cpp: (WebCore::V8TestNamedConstructor::wrapSlow): * bindings/scripts/test/V8/V8TestNamedConstructor.h: (V8TestNamedConstructor): (WebCore::V8TestNamedConstructor::wrap): * bindings/scripts/test/V8/V8TestNode.cpp: (WebCore::V8TestNode::wrapSlow): * bindings/scripts/test/V8/V8TestNode.h: (V8TestNode): (WebCore::V8TestNode::wrap): * bindings/scripts/test/V8/V8TestObj.cpp: (WebCore::V8TestObj::wrapSlow): * bindings/scripts/test/V8/V8TestObj.h: (V8TestObj): (WebCore::V8TestObj::wrap): * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp: (WebCore::V8TestSerializedScriptValueInterface::wrapSlow): * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.h: (V8TestSerializedScriptValueInterface): (WebCore::V8TestSerializedScriptValueInterface::wrap): 2012-04-25 Antonio Gomes Add ScrollAnimatorBlackBerry as an extension to ScrollAnimatorNone https://bugs.webkit.org/show_bug.cgi?id=84625 Reviewed by Anders Carlsson. Patch adds ScrollAnimatorBlackBerry class as an extension to of ScrollAnimatorNone. The main goal here is extending the later to allow overscrolling while the animation runs. Once the animation finishes, the flag gets reseted and ScrollableArea::constrainsScrollingtoContentEdge is set back to the value it had before, so this method has to be explicitly called anytime it is wanted. * CMakeLists.txt: * platform/ScrollAnimator.h: (WebCore::ScrollAnimator::animationWillStart): (WebCore::ScrollAnimator::animationDidFinish): (ScrollAnimator): * platform/ScrollAnimatorNone.cpp: (WebCore): (WebCore::ScrollAnimatorNone::scroll): (WebCore::ScrollAnimatorNone::animationTimerFired): * platform/blackberry/ScrollAnimatorBlackBerry.cpp: Added. (WebCore): (WebCore::ScrollAnimator::create): (WebCore::ScrollAnimatorBlackBerry::ScrollAnimatorBlackBerry): (WebCore::ScrollAnimatorBlackBerry::animationWillStart): (WebCore::ScrollAnimatorBlackBerry::animationDidFinish): (WebCore::ScrollAnimatorBlackBerry::setDisableConstrainsScrollingToContentEdgeWhileAnimating): * platform/blackberry/ScrollAnimatorBlackBerry.h: Added. (WebCore): (ScrollAnimatorBlackBerry): 2012-04-26 Antonio Gomes [BlackBerry] Add smooth_scrolling options to CMAKE and enable it for Blackberry https://bugs.webkit.org/show_bug.cgi?id=84954 Reviewed by Daniel Bates. Add the default scroll animator to the build system (ScrollAnimatorNone.cpp) * CMakeLists.txt: 2012-04-25 Antonio Gomes Make ScrollView::scrollSize scrollbar-independent https://bugs.webkit.org/show_bug.cgi?id=84873 Reviewed by Anders Carlsson. For ports that disable scrollbars creation at FrameView creation time ScrollView::scrollSize should still return the scrollable ammount of content (if any) if scrolling is not prohibted. No new test, but it makes ScrollAnimator work for the BlackBerry port. * platform/ScrollView.cpp: (WebCore::ScrollView::scrollSize): 2012-04-25 Anders Carlsson The tile cache should know if a frame view can ever have scrollbars https://bugs.webkit.org/show_bug.cgi?id=84888 Reviewed by Andreas Kling. If a frame view has overflow: hidden on its body element we know that the document will most likely never be scrolled. The tile cache should know about this so we can optimize. * page/FrameView.cpp: (WebCore::FrameView::performPostLayoutTasks): * platform/graphics/TiledBacking.h: (TiledBacking): * platform/graphics/ca/mac/TileCache.h: (TileCache): * platform/graphics/ca/mac/TileCache.mm: (WebCore::TileCache::TileCache): (WebCore::TileCache::setCanHaveScrollbars): (WebCore): * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::RenderLayerBacking): 2012-04-26 Ken Buchanan Crash from removal of line break object after layout https://bugs.webkit.org/show_bug.cgi?id=75461 Reviewed by David Hyatt. There is a condition where objects can get removed from underneath inlines while they represent a line break object in a RootInlineBox of an ancestor block. If an intermediary inline has already been marked as needing layout, then the line box will not get dirtied because dirtyLineFromChangedChild thinks it already has been. This patch introduces a new set in RenderObject to indicate whether an ancestral line box corresponding to the current line has been marked dirty or not. dirtyLinesFromChangedChild() can use this set rather than m_selfNeedsLayout, so it will not be confused if a container was dirtied for some other reason that did not affect the line box. * rendering/RenderLineBoxList.cpp: (WebCore::RenderLineBoxList::dirtyLinesFromChangedChild): Use the new set rather than m_selfNeedsLayout in the container to determine whether to continue propagating upward. * rendering/RenderObject.cpp: (WebCore::RenderObject::s_ancestorLineboxDirtySet): Instantiate the static member. (WebCore::RenderObject::willBeDestroyed): Clears the object from the linebox set when it is being destroyed. * rendering/RenderObject.h: (WebCore::RenderObject::s_ancestorLineboxDirtySet): Added static member set. (WebCore::RenderObject::setNeedsLayout): Clears the object from the linebox set when layout bits are getting cleared. (WebCore::RenderObject::ancestorLineBoxDirty): Added. (WebCore::RenderObject::setAncestorLineBoxDirty): Added. 2012-04-26 Christophe Dumez [EFL] Enable VIDEO_TRACK feature https://bugs.webkit.org/show_bug.cgi?id=84830 Reviewed by Gustavo Noronha Silva. Enable support for VIDEO_TRACK feature by default for EFL port. * UseJSC.cmake: * bindings/generic/RuntimeEnabledFeatures.cpp: (WebCore): 2012-04-26 Antti Koivisto Implement StyleSheetInternal copying https://bugs.webkit.org/show_bug.cgi?id=84969 Reviewed by Andreas Kling. We need to be able to copy stylesheets to cache them. Copying is already implement for most of the stylesheet data types but StyleSheetInternal::copy() is still missing. Preparation for stylesheet caching. The copying code is not used yet. * css/CSSNamespace.h: Instead of making it copyable, remove CSSNamespace class. * css/CSSParser.cpp: (WebCore::operator==): (WebCore): (WebCore::CSSParser::addNamespace): Avoid ping-ponging to StyleSheetInternal and back to set the default namespace. * css/CSSParserMode.h: (WebCore): (WebCore::operator!=): Add equality comparison operator to CSSParseMode. This will be needed to determine if a cached copy can be used. * css/CSSStyleSheet.cpp: (WebCore::StyleSheetInternal::StyleSheetInternal): (WebCore): (WebCore::StyleSheetInternal::isCacheable): (WebCore::StyleSheetInternal::parserAddNamespace): (WebCore::StyleSheetInternal::determineNamespace): Use HashMap instead of iterating a linked list of CSSNamespaces. (WebCore::StyleSheetInternal::styleSheetChanged): Add mutation bit. * css/CSSStyleSheet.h: (WebCore): (StyleSheetInternal): (WebCore::StyleSheetInternal::copy): Copy constructor. It only usable for cacheable stylesheets. 2012-04-26 Philip Rogers Fix Skia's SkPathContainsPoint to work with sub-pixel accuracy https://bugs.webkit.org/show_bug.cgi?id=84117 Reviewed by Eric Seidel. Because we do hit testing in object-space (i.e., we may see a 0.1px*0.1px path) we need to support sub-pixel hit testing in Skia. Skia does not provide analytical path hit testing, so hit tests are done by rasterizing a path and checking if a specific pixel is drawn. SkPathContainsPoint did not work with sub-pixel values because this rasterization was sometimes very small which did not give enough resolution to check if the hit test pixel was drawn. This patch scales the path to a very large size during hit testing so that Skia's raster-based hit testing will work properly. Because Skia avoids unnecessary path rasterization, this is actually inexpensive. Below is a summary of a performance test on simple and complex paths: (before patch, after patch) Skia/Chrome 10,000 hit tests on a simple path: (229ms, 238ms) Skia/Chrome 10,000 hit tests on a complex path: (701ms, 704ms) For comparison, CG/Safari takes 236ms on the simple path and 466ms on the complex path. Therefore, this patch introduces small but measurable regression in hit testing performance due to scaling the path. Test: svg/hittest/svg-small-path.xhtml * platform/graphics/skia/SkiaUtils.cpp: (WebCore::SkPathContainsPoint): 2012-04-26 Sheriff Bot Unreviewed, rolling out r115323. http://trac.webkit.org/changeset/115323 https://bugs.webkit.org/show_bug.cgi?id=84975 Bad test, breaks all builds (Requested by apavlov1 on #webkit). * inspector/Inspector.json: * inspector/InspectorPageAgent.cpp: (WebCore::InspectorPageAgent::enable): (WebCore::InspectorPageAgent::disable): * inspector/InspectorPageAgent.h: * inspector/front-end/Settings.js: * inspector/front-end/SettingsScreen.js: (WebInspector.SettingsScreen): * inspector/front-end/inspector.js: 2012-04-26 Douglas Stockwell IndexedDB: cursor does not correctly iterate over keys added and removed during iteration https://bugs.webkit.org/show_bug.cgi?id=84467 Reviewed by Ojan Vafai. Ensure that the iterator over the tree of cached adds/removes always points at the current key, or if the db iterator is current, the next key: - When refreshing the tree iterator after a mutation, always seek unless the tree iterator is current. - When handing conflicts and delete markers, only advance the tree iterator as far as the db iterator. Remove the expensive (and now redundant) logic that issued a get() to check whether an item had been deleted. Test: storage/indexeddb/cursor-added-bug.html * Modules/indexeddb/IDBLevelDBBackingStore.cpp: (WebCore): * platform/leveldb/LevelDBTransaction.cpp: (WebCore::LevelDBTransaction::TransactionIterator::refreshTreeIterator): (WebCore::LevelDBTransaction::TransactionIterator::handleConflictsAndDeletes): 2012-04-26 Alexander Pavlov Web Inspector: Implement the "Disable JavaScript" option in the settings dialog https://bugs.webkit.org/show_bug.cgi?id=84946 Based on user actions in the Inspector frontend, InspectorPageAgent invokes Settings::setScriptEnabled() for the associated page to switch the script execution therein. Reviewed by Yury Semikhatsky. Test: inspector/debugger/disable-script.html * inspector/Inspector.json: * inspector/InspectorPageAgent.cpp: (PageAgentState): (WebCore::InspectorPageAgent::enable): (WebCore::InspectorPageAgent::disable): (WebCore::InspectorPageAgent::getScriptExecutionStatus): (WebCore): (WebCore::InspectorPageAgent::setScriptExecutionDisabled): * inspector/InspectorPageAgent.h: * inspector/front-end/Settings.js: * inspector/front-end/SettingsScreen.js: (WebInspector.SettingsScreen): (WebInspector.SettingsScreen.prototype.get _updateScriptDisabledCheckbox): (WebInspector.SettingsScreen.prototype._javaScriptDisabledChanged): * inspector/front-end/inspector.js: 2012-04-26 Dominik Röttsches [cairo] CairoGraphicsContext fillRect (with Color) overrides composite operator https://bugs.webkit.org/show_bug.cgi?id=84848 Reviewed by Martin Robinson. FillRectWithColor used to be called fillRectSourceOver before r89314 where this operator still made sense. The way this function is used these days doesn't expect the composite operator to be overridden anymore. No new tests, covered by existing tests, e.g. svg/filters/feDropShadow.svg * platform/graphics/cairo/GraphicsContextCairo.cpp: (WebCore::fillRectWithColor): 2012-04-26 Nikolas Zimmermann Fix additive by animations for most SMIL list types https://bugs.webkit.org/show_bug.cgi?id=84968 Reviewed by Antti Koivisto. Unify SMIL list animation code, to correctly respect the underlying from value for by-animations. Add lots of new tests covering by-animations for all primitives (except AnimatedPath/TransformList). AnimatedTransformList is not working correctly yet, and will be covered in a follow-up patch. AnimatdPath by-animations are complex, and thus also handled in another follow-up patch. Tests: svg/animations/additive-type-by-animation.html svg/animations/length-list-animation-expected.svg svg/animations/length-list-animation.svg svg/animations/svglength-additive-by-1.html svg/animations/svglength-additive-by-2.html svg/animations/svglength-additive-by-3.html svg/animations/svglength-additive-by-4.html svg/animations/svglength-additive-by-5.html svg/animations/svglength-additive-by-6.html svg/animations/svglength-additive-from-by-1.html svg/animations/svglength-additive-from-by-2.html svg/animations/svglength-additive-from-by-3.html svg/animations/svglength-additive-from-by-4.html * svg/SVGAnimatedLengthList.cpp: (WebCore::SVGAnimatedLengthListAnimator::addAnimatedTypes): (WebCore::SVGAnimatedLengthListAnimator::calculateAnimatedValue): * svg/SVGAnimatedNumberList.cpp: (WebCore::SVGAnimatedNumberListAnimator::addAnimatedTypes): (WebCore::SVGAnimatedNumberListAnimator::calculateAnimatedValue): * svg/SVGAnimatedPointList.cpp: (WebCore::SVGAnimatedPointListAnimator::addAnimatedTypes): (WebCore::SVGAnimatedPointListAnimator::calculateAnimatedValue): * svg/SVGAnimationElement.h: (WebCore::SVGAnimationElement::adjustFromToListValues): 2012-04-26 Antti Koivisto Add copy constructor to CSSSelector https://bugs.webkit.org/show_bug.cgi?id=84956 Reviewed by Anders Carlsson. To copy CSSSelectorLists correctly CSSSelector needs a copy constructor. This will be needed to implement stylesheet caching. The code is not used yet. * css/CSSSelector.cpp: (WebCore::CSSSelector::createRareData): * css/CSSSelector.h: (CSSSelector): (WebCore::CSSSelector::RareData::create): (RareData): Refcount RareData to make copying easier. This has no significant memory impact, rare data is rare. (WebCore::CSSSelector::CSSSelector): (WebCore): (WebCore::CSSSelector::~CSSSelector): * css/CSSSelectorList.cpp: (WebCore::CSSSelectorList::CSSSelectorList): Use copy constructor instead of memcpy (which doesn't work). 2012-04-26 Raphael Kubo da Costa [EFL] Fix the build with DRAG_SUPPORT disabled. https://bugs.webkit.org/show_bug.cgi?id=84963 Reviewed by Antonio Gomes. No new tests, build system-related change. EventHandlerEfl.cpp always assumed DRAG_SUPPORT was enabled and lacked the proper #if ENABLED() checks for some member variables and methods conditionally defined in EventHandler.h. * page/efl/EventHandlerEfl.cpp: (WebCore): 2012-04-26 Pavel Feldman Web Inspector: remove stackTrace property from requestWillBeSent - it is already a part of the initiator. https://bugs.webkit.org/show_bug.cgi?id=84964 Reviewed by Yury Semikhatsky. * inspector/InspectorResourceAgent.cpp: (WebCore::InspectorResourceAgent::willSendRequest): * inspector/front-end/ConsoleMessage.js: (WebInspector.ConsoleMessageImpl.prototype._formatMessage): * inspector/front-end/NetworkManager.js: (WebInspector.NetworkDispatcher.prototype.requestWillBeSent): (WebInspector.NetworkDispatcher.prototype.requestServedFromMemoryCache): (WebInspector.NetworkDispatcher.prototype._appendRedirect): (WebInspector.NetworkDispatcher.prototype._createNetworkRequest): (get WebInspector): 2012-04-26 Stephen Chenney SVG FEConvolveMatrix does not check for invalid property values https://bugs.webkit.org/show_bug.cgi?id=84363 Reviewed by Dirk Schulze. Adding code to check for valid input values on SVG feConvolveMatrix properties. And adding some of the first effective error reporting for SVG elements. Tests: svg/filters/feConvolveMatrix-invalid-targetX-expected.svg svg/filters/feConvolveMatrix-invalid-targetX.svg svg/filters/feConvolveMatrix-invalid-targetY-expected.svg svg/filters/feConvolveMatrix-invalid-targetY.svg svg/filters/feConvolveMatrix-negative-kernelUnitLengthX-expected.svg svg/filters/feConvolveMatrix-negative-kernelUnitLengthX.svg svg/filters/feConvolveMatrix-negative-kernelUnitLengthY-expected.svg svg/filters/feConvolveMatrix-negative-kernelUnitLengthY.svg svg/filters/feConvolveMatrix-negative-orderX-expected.svg svg/filters/feConvolveMatrix-negative-orderX.svg svg/filters/feConvolveMatrix-negative-orderY-expected.svg svg/filters/feConvolveMatrix-negative-orderY.svg svg/filters/feConvolveMatrix-non-integral-order-expected.svg svg/filters/feConvolveMatrix-non-integral-order.svg svg/filters/feConvolveMatrix-zero-divisor-expected.svg svg/filters/feConvolveMatrix-zero-divisor.svg * platform/graphics/filters/FEConvolveMatrix.cpp: (WebCore::FEConvolveMatrix::FEConvolveMatrix): (WebCore::FEConvolveMatrix::setKernelSize): (WebCore::FEConvolveMatrix::setDivisor): (WebCore::FEConvolveMatrix::setKernelUnitLength): * svg/SVGFEConvolveMatrixElement.cpp: (WebCore::SVGFEConvolveMatrixElement::parseAttribute): (WebCore::SVGFEConvolveMatrixElement::build): 2012-04-26 Allan Sandfeld Jensen Move WebKit1 specific conversion of touch-events to WebKit1. https://bugs.webkit.org/show_bug.cgi?id=84951 Reviewed by Kenneth Rohde Christiansen. No change in functionality. No new tests. * Target.pri: * platform/PlatformTouchEvent.h: (PlatformTouchEvent): * platform/PlatformTouchPoint.h: (PlatformTouchPoint): * platform/qt/PlatformTouchEventQt.cpp: Removed. * platform/qt/PlatformTouchPointQt.cpp: Removed. 2012-04-26 Nikolas Zimmermann Share code used to animate numbers types between all animators https://bugs.webkit.org/show_bug.cgi?id=84945 Reviewed by Antti Koivisto. Refactor animateAdditiveNumber() from SVGAnimatedNumberAnimator into SVGAnimationElement, to reuse it for all primitives. Converted most primitives to use the new code. Lists, paths, colors are still todo. Doesn't affect any tests. * svg/SVGAnimatedAngle.cpp: (WebCore::SVGAnimatedAngleAnimator::calculateAnimatedValue): * svg/SVGAnimatedInteger.cpp: (WebCore::SVGAnimatedIntegerAnimator::calculateAnimatedInteger): (WebCore::SVGAnimatedIntegerAnimator::calculateAnimatedValue): * svg/SVGAnimatedInteger.h: (SVGAnimatedIntegerAnimator): * svg/SVGAnimatedIntegerOptionalInteger.cpp: (WebCore::SVGAnimatedIntegerOptionalIntegerAnimator::addAnimatedTypes): (WebCore::SVGAnimatedIntegerOptionalIntegerAnimator::calculateAnimatedValue): * svg/SVGAnimatedLength.cpp: (WebCore::SVGAnimatedLengthAnimator::calculateAnimatedValue): * svg/SVGAnimatedLengthList.cpp: (WebCore::SVGAnimatedLengthListAnimator::calculateAnimatedValue): * svg/SVGAnimatedNumber.cpp: (WebCore::SVGAnimatedNumberAnimator::calculateAnimatedValue): * svg/SVGAnimatedNumber.h: * svg/SVGAnimatedNumberList.cpp: (WebCore::SVGAnimatedNumberListAnimator::calculateAnimatedValue): * svg/SVGAnimatedNumberOptionalNumber.cpp: (WebCore::SVGAnimatedNumberOptionalNumberAnimator::addAnimatedTypes): (WebCore::SVGAnimatedNumberOptionalNumberAnimator::calculateAnimatedValue): * svg/SVGAnimatedNumberOptionalNumber.h: * svg/SVGAnimatedRect.cpp: (WebCore::SVGAnimatedRectAnimator::calculateAnimatedValue): * svg/SVGAnimationElement.h: (WebCore::SVGAnimationElement::animateAdditiveNumber): (SVGAnimationElement): 2012-04-26 Ryosuke Niwa Forgotten build fix after r115227. * css/StylePropertySet.cpp: (WebCore::StylePropertySet::get4Values): 2012-04-26 Mihnea Ovidenie Crash when collecting svg symbol element in named flow. https://bugs.webkit.org/show_bug.cgi?id=84493 Reviewed by David Hyatt. Test: fast/regions/symbol-in-named-flow-crash.svg * dom/Element.cpp: (WebCore::Element::~Element): Add an assert that an element that was collected into a named flow was already removed at this point (when the document is not in the process of destruction) (WebCore::Element::unregisterNamedFlowContentNode): Created a new function for unregistering a content node. In the future, this function may be used for content nodes from shadow dom. (WebCore::Element::detach): * dom/Element.h: (Element): * dom/NodeRenderingContext.cpp: (WebCore::NodeRenderingContext::moveToFlowThreadIfNeeded): Prevent elements that are part of shadow dom to be collected into a named flow. 2012-04-26 Nikolas Zimmermann Share code used to animate discrete types between all animators https://bugs.webkit.org/show_bug.cgi?id=84853 Reviewed by Andreas Kling. Share by-animation handling for non-additive types in a central method in SVGAnimatedTypeAnimator, to be reusable by SVGAnimatedBoolean/Enumeration/PreserveAspectRatio/String. Add a new test covering these animations have no effect. Test: svg/animations/non-additive-type-by-animation.html * svg/SVGAnimateElement.cpp: (WebCore::SVGAnimateElement::calculateFromAndByValues): (WebCore::SVGAnimateElement::isAdditive): * svg/SVGAnimateElement.h: (SVGAnimateElement): * svg/SVGAnimateMotionElement.cpp: (WebCore::SVGAnimateMotionElement::calculateFromAndByValues): * svg/SVGAnimatedBoolean.cpp: (WebCore::isTrueString): (WebCore::SVGAnimatedBooleanAnimator::constructFromString): (WebCore::SVGAnimatedBooleanAnimator::addAnimatedTypes): (WebCore::SVGAnimatedBooleanAnimator::calculateAnimatedValue): * svg/SVGAnimatedEnumeration.cpp: (WebCore::SVGAnimatedEnumerationAnimator::addAnimatedTypes): (WebCore::SVGAnimatedEnumerationAnimator::calculateAnimatedValue): * svg/SVGAnimatedPreserveAspectRatio.cpp: (WebCore::SVGAnimatedPreserveAspectRatioAnimator::addAnimatedTypes): (WebCore::SVGAnimatedPreserveAspectRatioAnimator::calculateAnimatedValue): * svg/SVGAnimatedString.cpp: (WebCore::SVGAnimatedStringAnimator::addAnimatedTypes): (WebCore::SVGAnimatedStringAnimator::calculateAnimatedValue): * svg/SVGAnimationElement.cpp: (WebCore::SVGAnimationElement::startedActiveInterval): * svg/SVGAnimationElement.h: (SVGAnimationElement): (WebCore::SVGAnimationElement::animateDiscreteType): 2012-04-26 Chris Fleizach2 CrashTracer: [USER] 157 crashes in WebProcess at com.apple.WebCore: WebCore::AccessibilityRenderObject::isAttachment const + 29 https://bugs.webkit.org/show_bug.cgi?id=84463 Reviewed by Darin Adler. Accessibility was not being enabled when WK2 was asking only for the focused UI element. No layout test could be written because the WKTestRunner mechanism works differently when asking for this. * accessibility/AXObjectCache.cpp: (WebCore::AXObjectCache::focusedUIElementForPage): (WebCore::AXObjectCache::rootObject): (WebCore::AXObjectCache::rootObjectForFrame): 2012-04-25 Dana Jansens [chromium] Remove guarded virtual methods from WebFilterOperation API https://bugs.webkit.org/show_bug.cgi?id=84926 Reviewed by James Robinson. * WebCore.gypi: * platform/chromium/support/WebFilterOperation.cpp: Removed. * platform/chromium/support/WebFilterOperations.cpp: (WebKit::WebFilterOperations::append): 2012-04-25 Benjamin Poulain Add a version of StringImpl::find() without offset https://bugs.webkit.org/show_bug.cgi?id=83968 Reviewed by Sam Weinig. Remove the zero offset of the find() functions on strings. * html/parser/XSSAuditor.cpp: (WebCore::XSSAuditor::init): * platform/network/ResourceResponseBase.cpp: (WebCore::trimToNextSeparator): (WebCore::parseCacheHeader): 2012-04-25 Mark Hahnenberg WebCore shouldn't call collectAllGarbage directly https://bugs.webkit.org/show_bug.cgi?id=84897 Reviewed by Geoffrey Garen. No new tests. Currently, GCController calls Heap::collectAllGarbage directly, which leads to an overload of collections as the timer in GCController and the timer in GCActivityCallback compete for collection time and fire independently. As a result, we end up doing almost 600 full collections during an in-browser run of SunSpider, or 20 full collections on a single load of TechCrunch. We can do better by preventing WebCore from calling collectAllGarbage directly and instead going through Heap::reportAbandonedObjectGraph, since that is what WebCore is trying to do--notify the Heap that a lot of garbage may have just been generated when we left a page. * WebCore.exp.in: * bindings/js/GCController.cpp: Removed all timer stuff. (WebCore::GCController::GCController): (WebCore::GCController::garbageCollectSoon): Changed to call Heap::reportAbandonedObjectGraph. (WebCore::GCController::garbageCollectNow): Changed to still directly call collectAllGarbage. We will deprecate this function soon hopefully. * bindings/js/GCController.h: Removed timer stuff. (GCController): * bindings/js/ScriptProfiler.cpp: (WebCore::ScriptProfiler::collectGarbage): Changed to call garbageCollectSoon. 2012-04-25 James Robinson [chromium] REGRESSION(112286) Compositor initialization blocks for program compilation / linking https://bugs.webkit.org/show_bug.cgi?id=84822 Reviewed by Adrienne Walker. r112286 introduced a subtle regression in the chromium compositor startup sequence - by querying the texture copy program's uniform location at the end of LayerRendererChromium::initialize(), the compositor's thread was blocked until the service side compiled _all_ eagerly initialized shaders. The intent of the way the compositor programs are created is that a set of commonly-used programs are sent to the service side, but no blocking calls are made until after we go through the first paint (with the hope that the service side will complete the compilation by then). Fixed by moving program initialization (which also grabs uniform locations) until the first actual use of the copier. It may be worth deferring the program initialization completely if it's not used very often. Added unit test in LayerRendererChromiumTests to make sure LRC initialization does not make any synchronous calls (like getUniformLocation()). * platform/graphics/chromium/TextureCopier.cpp: (WebCore::AcceleratedTextureCopier::AcceleratedTextureCopier): (WebCore::AcceleratedTextureCopier::copyTexture): 2012-04-25 Jason Liu [BlackBerry] Authenticated proxy isn't working. https://bugs.webkit.org/show_bug.cgi?id=84579 Reviewed by Antonio Gomes. We should try to get username and password from WiFi advanced configuration first when 407 is received. No new tests. This is covered by existing http tests when proxy's username and password are configured for WiFi. * platform/network/blackberry/NetworkJob.cpp: (WebCore::NetworkJob::sendRequestWithCredentials): 2012-04-25 Alec Flett IndexedDB: implement cursor.advance() https://bugs.webkit.org/show_bug.cgi?id=84174 Reviewed by Ojan Vafai. Implement IDBCursor.advance() to spec. Test: storage/indexeddb/cursor-advance.html * Modules/indexeddb/IDBBackingStore.h: * Modules/indexeddb/IDBCursor.cpp: (WebCore::IDBCursor::advance): (WebCore): * Modules/indexeddb/IDBCursor.h: (IDBCursor): * Modules/indexeddb/IDBCursor.idl: * Modules/indexeddb/IDBCursorBackendImpl.cpp: (WebCore::IDBCursorBackendImpl::advance): (WebCore): (WebCore::IDBCursorBackendImpl::advanceInternal): * Modules/indexeddb/IDBCursorBackendImpl.h: (IDBCursorBackendImpl): * Modules/indexeddb/IDBCursorBackendInterface.h: * Modules/indexeddb/IDBLevelDBBackingStore.cpp: (WebCore): 2012-04-24 Adrienne Walker [chromium] Hold video provider lock from willDraw to didDraw https://bugs.webkit.org/show_bug.cgi?id=84805 Reviewed by James Robinson. * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp: (WebCore::CCVideoLayerImpl::willDraw): (WebCore): (WebCore::CCVideoLayerImpl::willDrawInternal): (WebCore::CCVideoLayerImpl::appendQuads): (WebCore::CCVideoLayerImpl::didDraw): * platform/graphics/chromium/cc/CCVideoLayerImpl.h: 2012-04-25 Adrienne Walker [chromium] Prevent CCLayerImpl::willDraw/didDraw mismatches https://bugs.webkit.org/show_bug.cgi?id=84812 Reviewed by James Robinson. Because some layers lock/unlock resources, it needs to be guaranteed that if willDraw is called on a layer then didDraw will also be called on that layer before another willDraw or before layer destruction. Add asserts to make sure that this is the case. willDraw is called via CCLayerTreeHostImpl::prepareToDraw -> calculateRenderPasses. didDraw was previously called in CCLayerTreeHostImpl::drawLayers. Sometimes drawLayers was being skipped by the caller of these functions based on what prepareToDraw returned (causing didDraw to not be called). Fix this by having an explicit step to call didDraw on all layers. This new didDrawAllLayers function must be called if and only if prepareToDraw is called. Tested by existing tests via new asserts in CCLayerImpl. * platform/graphics/chromium/cc/CCLayerImpl.cpp: (WebCore::CCLayerImpl::CCLayerImpl): (WebCore::CCLayerImpl::~CCLayerImpl): (WebCore::CCLayerImpl::willDraw): (WebCore): (WebCore::CCLayerImpl::didDraw): * platform/graphics/chromium/cc/CCLayerImpl.h: (CCLayerImpl): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::drawLayers): (WebCore::CCLayerTreeHostImpl::didDrawAllLayers): (WebCore): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: (CCLayerTreeHostImpl): * platform/graphics/chromium/cc/CCScrollbarLayerImpl.cpp: (WebCore::CCScrollbarLayerImpl::willDraw): (WebCore::CCScrollbarLayerImpl::didDraw): * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp: (WebCore::CCSingleThreadProxy::doComposite): * platform/graphics/chromium/cc/CCTextureLayerImpl.cpp: (WebCore::CCTextureLayerImpl::willDraw): * platform/graphics/chromium/cc/CCThreadProxy.cpp: (WebCore::CCThreadProxy::scheduledActionDrawAndSwapInternal): * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp: (WebCore::CCVideoLayerImpl::willDraw): (WebCore::CCVideoLayerImpl::didDraw): 2012-04-24 Kent Tamura Calendar Picker: Resize to minimal size to fit the content https://bugs.webkit.org/show_bug.cgi?id=84826 Reviewed by Hajime Morita. Using fixed-size popup isn't nice. The calender picker popup size should be minimal. The minimal size depends on font settings, localized labels, and localized formats. So we put visible objects on a transparent element, calculate minimal size, resize the popup, then show the objects. * Resources/calendarPicker.css: (body): Don't use purple. It was for debugging purpose. The body is visible for a short period becuse we use transparent element. (#main): - Add nowrap to avoid text wrapping. - Add wider width to avoid wrapping. - Add opacity to hide incomplete layout. (.year-month-upper): Don't set flexible box yet. (.month-selector-box): Fix incorrect display value. (.days-area): Don't set table-layout:fixed and width:100% in order that it has the minimal width. * Resources/calendarPicker.js: (initialize): Make a new functio to resize. (fixWindowSize): Compute the required width from the right edge of the next year button, the maximum cell width, and so on. Then, set CSS properties to have correct layout. (YearMonthController.prototype.attachTo): Set min-width property for a long year-month string. (YearMonthController.prototype._showPopup): Center the _monthPopup vertically. * html/shadow/CalendarPickerElement.cpp: (WebCore::CalendarPickerElement::contentSize): Specify small size for the initial size. It's better than showing a large window then shrink the size. * page/PagePopupClient.h: (PagePopupClient): Remove a false comment. We should support resize*(). 2012-04-25 Kent Tamura Unreviewed. Sort Xcode project file. * WebCore.xcodeproj/project.pbxproj: 2012-04-25 Alpha Lam Unreviewed, rolling out r115260. http://trac.webkit.org/changeset/115260 https://bugs.webkit.org/show_bug.cgi?id=84467 r115260 is crashing a list of IndexDB tests, revert. * Modules/indexeddb/IDBLevelDBBackingStore.cpp: (WebCore): * platform/leveldb/LevelDBTransaction.cpp: (WebCore::LevelDBTransaction::TransactionIterator::refreshTreeIterator): (WebCore::LevelDBTransaction::TransactionIterator::handleConflictsAndDeletes): * platform/leveldb/LevelDBTransaction.h: (TransactionIterator): 2012-04-25 James Simonsen [Web Timing] Add a vendor-prefixed Performance Timeline API https://bugs.webkit.org/show_bug.cgi?id=80350 As described here: http://dvcs.w3.org/hg/webperf/raw-file/tip/specs/PerformanceTimeline/Overview.html The API is there and should be correct, but it isn't particularly useful, because nothing is populated. Upcoming changes will add Navigation Timing and Resource Timing. Reviewed by Tony Gentilcore. No new tests. Functionality is disabled on all platforms. * CMakeLists.txt: Added PerformanceEntry* files. * DerivedSources.pri: Ditto. * GNUmakefile.list.am: Ditto. * WebCore.gypi: Ditto. * WebCore.vcproj/WebCore.vcproj: Ditto. * WebCore.xcodeproj/project.pbxproj: Ditto. * page/Performance.cpp: (WebCore::Performance::webkitGetEntries): Added. (WebCore::Performance::webkitGetEntriesByType): Added. (WebCore::Performance::webkitGetEntriesByName): Added. * page/Performance.h: (Performance): * page/Performance.idl: * page/PerformanceEntry.cpp: Added. (WebCore): (WebCore::PerformanceEntry::PerformanceEntry): (WebCore::PerformanceEntry::name): (WebCore::PerformanceEntry::entryType): (WebCore::PerformanceEntry::startTime): (WebCore::PerformanceEntry::duration): * page/PerformanceEntry.h: Added. (WebCore): (PerformanceEntry): * page/PerformanceEntry.idl: Added. * page/PerformanceEntryList.cpp: Added. (WebCore): (WebCore::PerformanceEntryList::PerformanceEntryList): (WebCore::PerformanceEntryList::~PerformanceEntryList): (WebCore::PerformanceEntryList::length): (WebCore::PerformanceEntryList::item): (WebCore::PerformanceEntryList::append): * page/PerformanceEntryList.h: Added. (WebCore): (PerformanceEntryList): (WebCore::PerformanceEntryList::create): * page/PerformanceEntryList.idl: Added. 2012-04-25 Benjamin Poulain Move convertJSMethodNameToObjc() to be a utility function of ObjcClass https://bugs.webkit.org/show_bug.cgi?id=84915 Reviewed by Darin Adler. The function convertJSMethodNameToObjc() is only useful for ObjcClass::methodsNamed(). This patch moves the function from objc_utility.mm to be a static function in objc_class.mm. It aims at simplifying the code for future changes of ObjcClass. * bridge/objc/objc_class.mm: (Bindings): (JSC::Bindings::convertJSMethodNameToObjc): * bridge/objc/objc_utility.h: * bridge/objc/objc_utility.mm: (Bindings): 2012-04-25 Kent Tamura Unreviewed. Sort Xcode project file. * WebCore.xcodeproj/project.pbxproj: 2012-04-25 Greg Billock Implement object-literal constructor for the Intent object. https://bugs.webkit.org/show_bug.cgi?id=84220 Reviewed by Kentaro Hara. The use of the custom constructor will hopefully be temporary, as we plan to convert to just using the object literal constructor, which can then use codegen. See spec: http://dvcs.w3.org/hg/web-intents/raw-file/tip/spec/Overview.html Added support for the service and extras parameters in the Intent object to support the speced members in the object literal constructor. Added supporting accessor to Dictionary to retrieve a sub-Dictionary, and a utility to ScriptValue to serialize with ports. Test: webintents/web-intent-obj-constructor.html (WebCore): * Modules/intents/Intent.cpp: (WebCore::Intent::create): (WebCore::Intent::Intent): (WebCore::Intent::service): (WebCore): (WebCore::Intent::extras): * Modules/intents/Intent.h: (WebCore): (Intent): * Modules/intents/Intent.idl: * WebCore.gypi: * bindings/v8/Dictionary.cpp: (WebCore::Dictionary::get): (WebCore): * bindings/v8/Dictionary.h: (Dictionary): * bindings/v8/ScriptValue.cpp: (WebCore::ScriptValue::serialize): (WebCore): * bindings/v8/ScriptValue.h: (WTF): (WebCore): (ScriptValue): * bindings/v8/custom/V8IntentConstructor.cpp: Added. (WebCore): (WebCore::V8Intent::constructorCallback): 2012-04-25 Alexandru Chiculita CSS Shaders: Use u_texture instead of s_texture. It was updated in the spec https://bugs.webkit.org/show_bug.cgi?id=82618 Reviewed by Dean Jackson. Changed the uniform name passed to the CSS Shaders from s_texture to u_texture. https://dvcs.w3.org/hg/FXTF/raw-file/tip/filters/index.html No new tests, just updating existing ones. * platform/graphics/filters/CustomFilterShader.cpp: (WebCore::CustomFilterShader::defaultFragmentShaderString): (WebCore::CustomFilterShader::initializeParameterLocations): 2012-04-25 Douglas Stockwell IndexedDB: cursor does not correctly iterate over keys added and removed during iteration https://bugs.webkit.org/show_bug.cgi?id=84467 Reviewed by Ojan Vafai. Ensure that the iterator over the tree of cached adds/removes always points at the current key, or if the db iterator is current, the next key: - When refreshing the tree iterator after a mutation, always seek unless the tree iterator is current. - When handing conflicts and delete markers, only advance the tree iterator as far as the db iterator. Remove the expensive (and now redundant) logic that issued a get() to check whether an item had been deleted. Test: storage/indexeddb/cursor-added-bug.html * Modules/indexeddb/IDBLevelDBBackingStore.cpp: (WebCore): * platform/leveldb/LevelDBTransaction.cpp: (WebCore::LevelDBTransaction::TransactionIterator::refreshTreeIterator): (WebCore::LevelDBTransaction::TransactionIterator::handleConflictsAndDeletes): 2012-04-25 Antti Koivisto Try to fix build with STYLE_SCOPED enabled. Not reviewed. * css/StyleResolver.cpp: (WebCore::StyleResolver::determineScope): 2012-04-25 Alec Flett IndexedDB: support openCursor(IDBKey) https://bugs.webkit.org/show_bug.cgi?id=84652 Reviewed by Ojan Vafai. Add signatures for openCursor/openKeyCursor(IDBKey). Test: storage/indexeddb/opencursor-key.html * Modules/indexeddb/IDBIndex.cpp: (WebCore::IDBIndex::openCursor): (WebCore): (WebCore::IDBIndex::openKeyCursor): * Modules/indexeddb/IDBIndex.h: (WebCore::IDBIndex::openCursor): (IDBIndex): (WebCore::IDBIndex::openKeyCursor): * Modules/indexeddb/IDBIndex.idl: * Modules/indexeddb/IDBObjectStore.cpp: (WebCore::IDBObjectStore::openCursor): (WebCore): * Modules/indexeddb/IDBObjectStore.h: (WebCore::IDBObjectStore::openCursor): (IDBObjectStore): * Modules/indexeddb/IDBObjectStore.idl: 2012-04-25 Antti Koivisto Remove owner node pointer from StyleSheetInternal https://bugs.webkit.org/show_bug.cgi?id=84882 Reviewed by Andreas Kling. To make sharing between multiple nodes possible StyleSheetInternal should not have a Node pointer. - Make StyleSheetInternal constructor take CSSParserContext instead of Node* - Move owner node pointer to CSSStyleSheet. CSSStyleSheet now acts as a client for StyleSheetInternal. This gets us closer to being able to cache stylesheet data structures. * css/CSSImportRule.cpp: (WebCore::StyleRuleImport::setCSSStyleSheet): (WebCore::StyleRuleImport::requestStyleSheet): Setup CSSParserContext. Remove FIXME about updateBaseURL(). It is no longer possible to change URL of StyleSheetInternal. * css/CSSPageRule.cpp: (WebCore::CSSPageRule::setSelectorText): * css/CSSParser.cpp: (WebCore::CSSParserContext::CSSParserContext): * css/CSSParserMode.h: (CSSParserContext): Expand CSSParserContext constructors. * css/CSSStyleRule.cpp: (WebCore::CSSStyleRule::setSelectorText): * css/StyleResolver.cpp: (WebCore::StyleResolver::StyleResolver): (WebCore::StyleResolver::addAuthorRulesAndCollectUserRulesFromSheets): (WebCore::StyleResolver::collectMatchingRulesForList): * css/StyleResolver.h: (StyleResolver): * css/CSSStyleSheet.cpp: User stylesheets went back to being CSSStyleSheets. Adapt to that. (WebCore::StyleSheetInternal::StyleSheetInternal): (WebCore): (WebCore::StyleSheetInternal::checkLoaded): (WebCore::StyleSheetInternal::startLoadingDynamicSheet): (WebCore::StyleSheetInternal::rootStyleSheet): (WebCore::StyleSheetInternal::singleOwnerNode): (WebCore::StyleSheetInternal::singleOwnerDocument): (WebCore::StyleSheetInternal::styleSheetChanged): The owner node is now located through CSSStyleSheet. Only one client is supported atm. (WebCore::StyleSheetInternal::registerClient): (WebCore::StyleSheetInternal::unregisterClient): Register CSSStyleSheets. (WebCore::CSSStyleSheet::CSSStyleSheet): (WebCore::CSSStyleSheet::~CSSStyleSheet): (WebCore::CSSStyleSheet::rules): (WebCore::CSSStyleSheet::cssRules): (WebCore::CSSStyleSheet::ownerDocument): * css/CSSStyleSheet.h: (WebCore::StyleSheetInternal::create): (WebCore::StyleSheetInternal::createInline): (StyleSheetInternal): (WebCore::CSSStyleSheet::create): (CSSStyleSheet): Moved m_ownerNode. Changed constructors Removed setFinalURL(). * css/PropertySetCSSStyleDeclaration.cpp: (WebCore::StyleRuleCSSStyleDeclaration::setNeedsStyleRecalc): * dom/Document.cpp: (WebCore::Document::updateBaseURL): Instead of setFinalURL, construct a new StyleSheetInternal if the base url ever changes. (WebCore::Document::pageUserSheet): (WebCore::Document::pageGroupUserSheets): (WebCore::Document::addUserSheet): (WebCore::Document::elementSheet): * dom/Document.h: (Document): (WebCore::Document::documentUserSheets): Adapt to the new interface. Turned user stylesheets CSSStyleSheets so they can find the owner node. * dom/ProcessingInstruction.cpp: (WebCore::ProcessingInstruction::setCSSStyleSheet): * dom/StyleElement.cpp: (WebCore::StyleElement::createSheet): * html/HTMLLinkElement.cpp: (WebCore::HTMLLinkElement::setCSSStyleSheet): * inspector/InspectorCSSAgent.cpp: (WebCore::SelectorProfile::startSelector): (WebCore::InspectorCSSAgent::bindStyleSheet): * inspector/InspectorStyleSheet.cpp: (WebCore::fillMediaListChain): (WebCore::InspectorStyleSheet::ownerDocument): * page/PageSerializer.cpp: (WebCore::PageSerializer::serializeCSSStyleSheet): 2012-04-25 Adam Klein Fix uninitialized variable warnings in PasteboardMac.mm after 115145 https://bugs.webkit.org/show_bug.cgi?id=84879 Reviewed by Enrica Casucci. * platform/mac/PasteboardMac.mm: (WebCore::Pasteboard::getDataSelection): Initialize attributedString to nil. (WebCore::Pasteboard::writeSelectionForTypes): ditto. 2012-04-25 Kenneth Russell Delete CanvasPixelArray, ByteArray, JSByteArray and JSC code once unreferenced https://bugs.webkit.org/show_bug.cgi?id=83655 Reviewed by Oliver Hunt. Removed last few references to ByteArray, replacing with Uint8ClampedArray as necessary, and deleted now-obsolete CanvasPixelArray, ByteArray and JSByteArray. Removed code from JavaScriptCore special-casing ByteArray. No new tests. Did full layout test run on Mac OS; no regressions seen from this change. * CMakeLists.txt: * DerivedSources.pri: * ForwardingHeaders/runtime/JSByteArray.h: Removed. * GNUmakefile.list.am: * PlatformBlackBerry.cmake: * Target.pri: * UseV8.cmake: * WebCore.gypi: * WebCore.order: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * bindings/v8/SerializedScriptValue.cpp: * bindings/v8/V8Binding.h: (WebCore::isHostObject): * bindings/v8/custom/V8CanvasPixelArrayCustom.cpp: Removed. * bindings/v8/custom/V8InjectedScriptHostCustom.cpp: (WebCore::V8InjectedScriptHost::typeCallback): * bridge/qt/qt_runtime.cpp: (JSC::Bindings::isJSUint8ClampedArray): (Bindings): (JSC::Bindings::valueRealType): (JSC::Bindings::convertValueToQVariant): (JSC::Bindings::convertQVariantToValue): * html/canvas/CanvasPixelArray.cpp: Removed. * html/canvas/CanvasPixelArray.h: Removed. * html/canvas/CanvasPixelArray.idl: Removed. * html/canvas/WebGLRenderingContext.cpp: (WebCore): * platform/graphics/filters/FEConvolveMatrix.h: * rendering/svg/RenderSVGResourceMasker.cpp: 2012-04-25 Alpha Lam Unreviewed build fix. Build fix for compilation failure due to r115243. * platform/graphics/chromium/LayerChromium.h: (WebCore): 2012-04-25 Ryosuke Niwa Build fix after r115227. Return null string when the string builder is empty to match the old behavior. * css/StylePropertySet.cpp: (WebCore::StylePropertySet::borderPropertyValue): 2012-04-25 Ian Vollick [chromium] Add support for animation finished events. https://bugs.webkit.org/show_bug.cgi?id=84454 Reviewed by James Robinson. Tested in CCLayerTreeHostTestAnimationFinishedEvents * platform/graphics/chromium/GraphicsLayerChromium.cpp: (WebCore::GraphicsLayerChromium::willBeDestroyed): (WebCore::GraphicsLayerChromium::notifyAnimationFinished): (WebCore): * platform/graphics/chromium/GraphicsLayerChromium.h: * platform/graphics/chromium/LayerChromium.cpp: (WebCore::LayerChromium::notifyAnimationStarted): (WebCore::LayerChromium::notifyAnimationFinished): (WebCore): * platform/graphics/chromium/LayerChromium.h: (WebCore): (LayerChromium): * platform/graphics/chromium/cc/CCAnimationEvents.h: (WebCore::CCAnimationEvent::CCAnimationEvent): (CCAnimationEvent): (WebCore): * platform/graphics/chromium/cc/CCLayerAnimationController.cpp: (WebCore::CCLayerAnimationController::animate): (WebCore::CCLayerAnimationController::notifyAnimationStarted): (WebCore::CCLayerAnimationController::startAnimationsWaitingForNextTick): (WebCore::CCLayerAnimationController::startAnimationsWaitingForStartTime): (WebCore::CCLayerAnimationController::startAnimationsWaitingForTargetAvailability): (WebCore::CCLayerAnimationController::purgeFinishedAnimations): * platform/graphics/chromium/cc/CCLayerAnimationController.h: (CCLayerAnimationController): * platform/graphics/chromium/cc/CCLayerAnimationDelegate.h: (CCLayerAnimationDelegate): * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::setAnimationEventsRecursive): 2012-04-25 Enrica Casucci REGRESSION (r110494): Dragging images from Safari to Finder results in .webloc rather than image file https://bugs.webkit.org/show_bug.cgi?id=84878 In WebKit2, it could happen to try to start the drag twice, given the asynchronous nature of the communication between the UI process and the WebProcess. We need to guarantee that we don't do that, otherwise on OS X the pasteboard ownership gets changed which affects the promised file types. Reviewed by Alexey Proskuryakov. * page/EventHandler.cpp: (WebCore::EventHandler::handleDrag): Reset m_mouseDownMayStartDrag to false to avoid attempting to start another drag. 2012-04-25 Andreas Kling Remove unused Attribute constructor. Semi-knowingly rubber-stamped by Antti Koivisto. * dom/Attribute.h: 2012-04-25 Nate Chapin Crash in CachedRawResource::didAddClient() due to missing protector. https://bugs.webkit.org/show_bug.cgi?id=83632 Reviewed by Eric Seidel. Test: http/tests/xmlhttprequest/access-control-repeated-failed-preflight-crash.html * loader/cache/CachedRawResource.cpp: (WebCore::CachedRawResource::didAddClient): 2012-04-25 Kentaro Hara [V8] Pass Isolate to SerializedScriptValue::deserialize() https://bugs.webkit.org/show_bug.cgi?id=84758 Reviewed by Nate Chapin. The objective is to pass Isolate around. This patch passes Isolate to SerializedScriptValue::deserialize(). No tests. No change in behavior. * bindings/v8/custom/V8HistoryCustom.cpp: (WebCore::V8History::stateAccessorGetter): * bindings/v8/custom/V8IDBAnyCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8MessageEventCustom.cpp: (WebCore::V8MessageEvent::dataAccessorGetter): * bindings/v8/custom/V8PopStateEventCustom.cpp: (WebCore::V8PopStateEvent::stateAccessorGetter): 2012-04-25 Kentaro Hara [V8] Pass Isolate to SerializedScriptValue::create() in custom bindings https://bugs.webkit.org/show_bug.cgi?id=84757 Reviewed by Nate Chapin. The objective is to pass Isolate around in V8 bindings. This patch passes Isolate to SerializedScriptValue::create() in custom bindings. No tests. No change in behavior. * bindings/v8/custom/V8DOMWindowCustom.cpp: (WebCore::handlePostMessageCallback): * bindings/v8/custom/V8DedicatedWorkerContextCustom.cpp: (WebCore::handlePostMessageCallback): * bindings/v8/custom/V8HistoryCustom.cpp: (WebCore::V8History::pushStateCallback): (WebCore::V8History::replaceStateCallback): * bindings/v8/custom/V8MessagePortCustom.cpp: (WebCore::handlePostMessageCallback): * bindings/v8/custom/V8WorkerCustom.cpp: (WebCore::handlePostMessageCallback): 2012-04-25 Kentaro Hara [V8] Pass Isolate to SerializedScriptValue::create() in CodeGeneratorV8.pm https://bugs.webkit.org/show_bug.cgi?id=84753 Reviewed by Nate Chapin. The objective is to pass Isolate around in V8 bindings. This patch passes Isolate to SerializedScriptValue::create() in CodeGeneratorV8.pm. Tests: bindings/scripts/test/TestObj.idl bindings/scripts/test/TestSerializedScriptValueInterface.idl * bindings/scripts/CodeGeneratorV8.pm: (GenerateNormalAttrSetter): (GenerateParametersCheck): (JSValueToNative): * bindings/scripts/test/V8/V8TestObj.cpp: Updated run-bindings-tests results. (WebCore::TestObjV8Internal::intSequenceAttrAttrGetter): (WebCore::TestObjV8Internal::shortSequenceAttrAttrGetter): (WebCore::TestObjV8Internal::longSequenceAttrAttrGetter): (WebCore::TestObjV8Internal::longLongSequenceAttrAttrGetter): (WebCore::TestObjV8Internal::unsignedIntSequenceAttrAttrGetter): (WebCore::TestObjV8Internal::unsignedShortSequenceAttrAttrGetter): (WebCore::TestObjV8Internal::unsignedLongSequenceAttrAttrGetter): (WebCore::TestObjV8Internal::unsignedLongLongSequenceAttrAttrGetter): (WebCore::TestObjV8Internal::floatSequenceAttrAttrGetter): (WebCore::TestObjV8Internal::doubleSequenceAttrAttrGetter): (WebCore::TestObjV8Internal::booleanSequenceAttrAttrGetter): (WebCore::TestObjV8Internal::voidSequenceAttrAttrGetter): (WebCore::TestObjV8Internal::dateSequenceAttrAttrGetter): (WebCore::TestObjV8Internal::serializedValueCallback): * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp: (WebCore::TestSerializedScriptValueInterfaceV8Internal::valueAttrSetter): (WebCore::TestSerializedScriptValueInterfaceV8Internal::cachedValueAttrSetter): (WebCore::TestSerializedScriptValueInterfaceV8Internal::acceptTransferListCallback): (WebCore::TestSerializedScriptValueInterfaceV8Internal::multiTransferListCallback): (WebCore::V8TestSerializedScriptValueInterface::constructorCallback): 2012-04-25 Kentaro Hara [V8] Add m_isolate to SerializedScriptValue::Writer and SerializedScriptValue::Reader https://bugs.webkit.org/show_bug.cgi?id=84739 Reviewed by Nate Chapin. This is the second step to pass Isolate around in SerializedScriptValue. This patch adds m_isolate to SerializedScriptValue::Writer and SerializedScriptValue::Reader, so that they can use the isolate around. The fix is safe since Writer and Reader are guaranteed to be used by one Isolate. No tests. No change in behavior. * bindings/v8/SerializedScriptValue.cpp: (WebCore::SerializedScriptValue::create): (WebCore::SerializedScriptValue::nullValue): (WebCore::SerializedScriptValue::undefinedValue): (WebCore::SerializedScriptValue::booleanValue): (WebCore::SerializedScriptValue::numberValue): (WebCore::SerializedScriptValue::SerializedScriptValue): (WebCore::SerializedScriptValue::deserialize): * bindings/v8/SerializedScriptValue.h: (SerializedScriptValue): 2012-04-25 Kentaro Hara [V8] Make the Isolate* parameter non-optional in setDOMException() https://bugs.webkit.org/show_bug.cgi?id=84736 Reviewed by Nate Chapin. Now all setDOMException() callers pass Isolate* to setDOMException(). This patch makes the Isolate* parameter non-optional. No tests. No change in behavior. * bindings/v8/V8Proxy.h: (V8Proxy): 2012-04-24 Ryosuke Niwa REGRESSION(r112177): listStyleType CSS property gets converted into listStyle https://bugs.webkit.org/show_bug.cgi?id=83026 Reviewed by Darin Adler. Fixed the bug by not using shorthand notations when some values are missing. However, we still want to return a value when shorthand border property is explicitly requested so extract borderPropertyValue with a flag to support both behaviors. * css/StylePropertySet.cpp: (WebCore::borderPropertyValue): Extracted from getPropertyValue. (WebCore::StylePropertySet::getPropertyValue): (WebCore::StylePropertySet::get4Values): Don't return values when priority don't match. (WebCore::StylePropertySet::getShorthandValue): (WebCore::StylePropertySet::getCommonValue): Don't return null string for initial values to disambiguate missing values and "initial" in getPropertyValue. Also check propriety. (WebCore::StylePropertySet::asText): Support emitting border-width, border-style, and border-color when border doesn't work but the former properties do. 2012-04-25 Ian Vollick [chromium] Do not clobber synchronized start times. https://bugs.webkit.org/show_bug.cgi?id=84605 Reviewed by James Robinson. Tested in CCLayerAnimationControllerTest.doNotClobberStartTimes (WebCore): * platform/graphics/chromium/cc/CCActiveAnimation.h: (CCActiveAnimation): (WebCore::CCActiveAnimation::hasSetStartTime): * platform/graphics/chromium/cc/CCLayerAnimationController.cpp: (WebCore::CCLayerAnimationController::startAnimationsWaitingForNextTick): (WebCore::CCLayerAnimationController::startAnimationsWaitingForTargetAvailability): 2012-04-25 Nate Chapin REGRESSION (r100311): YummySoup app crashes when trying to print https://bugs.webkit.org/show_bug.cgi?id=83918 Reviewed by Alexey Proskuryakov. Test: http/tests/xmlhttprequest/cancel-during-failure-crash.html * loader/ResourceLoader.cpp: (WebCore::ResourceLoader::didFail): Set m_calledDidFinishLoad when calling didFailToLoad() to prevent it from getting called twice if we cancel re-entrantly. 2012-04-25 Alexis Menard Not reviewed, fix Windows build after r115215. * css/CSSAllInOne.cpp: 2012-04-25 Eric Carlson Not reviewed, attempt to fix Windows build after r115215. * css/CSSAllInOne.cpp: Don't try to include CSSStyleSelector.cpp. 2012-04-25 Mark Pilgrim [Chromium] Call actualMemoryUsageMB directly https://bugs.webkit.org/show_bug.cgi?id=84837 Reviewed by Kentaro Hara. Part of a refactoring series. See tracking bug 82948. * bindings/v8/V8DOMWindowShell.cpp: (WebCore::reportFatalErrorInV8): * bindings/v8/V8GCController.cpp: (WebCore): * platform/MemoryUsageSupport.cpp: (WebCore::MemoryUsageSupport::actualMemoryUsageMB): (WebCore): * platform/MemoryUsageSupport.h: (MemoryUsageSupport): * platform/chromium/MemoryUsageSupportChromium.cpp: (WebCore::MemoryUsageSupport::actualMemoryUsageMB): (WebCore): * platform/chromium/PlatformSupport.h: (PlatformSupport): 2012-04-25 Alexis Menard Rename CSSStyleSelector files to StyleResolver. https://bugs.webkit.org/show_bug.cgi?id=84814 Reviewed by Antti Koivisto. Rename CSSStyleSelector files to match the new class name StyleResolver. Update the includes all over the code base to the new name. No new tests : renaming files, no behavior changes expected. * CMakeLists.txt: * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * css/CSSAllInOne.cpp: * css/CSSCalculationValue.cpp: * css/CSSFontSelector.cpp: * css/CSSGradientValue.cpp: * css/MediaQueryEvaluator.cpp: * css/MediaQueryMatcher.cpp: * css/SVGCSSStyleSelector.cpp: * css/StyleBuilder.cpp: * css/StyleMedia.cpp: * css/StyleResolver.cpp: Renamed from Source/WebCore/css/CSSStyleSelector.cpp. (WebCore): (RuleData): (WebCore::RuleData::position): (WebCore::RuleData::rule): (WebCore::RuleData::selector): (WebCore::RuleData::hasFastCheckableSelector): (WebCore::RuleData::hasMultipartSelector): (WebCore::RuleData::hasRightmostSelectorMatchingHTMLBasedOnRuleHash): (WebCore::RuleData::containsUncommonAttributeSelector): (WebCore::RuleData::specificity): (WebCore::RuleData::linkMatchType): (WebCore::RuleData::hasDocumentSecurityOrigin): (WebCore::RuleData::isInRegionRule): (WebCore::RuleData::descendantSelectorIdentifierHashes): (SameSizeAsRuleData): (RuleSet): (WebCore::RuleSet::create): (WebCore::RuleSet::disableAutoShrinkToFit): (WebCore::RuleSet::features): (WebCore::RuleSet::idRules): (WebCore::RuleSet::classRules): (WebCore::RuleSet::tagRules): (WebCore::RuleSet::shadowPseudoElementRules): (WebCore::RuleSet::linkPseudoClassRules): (WebCore::RuleSet::focusPseudoClassRules): (WebCore::RuleSet::universalRules): (WebCore::RuleSet::pageRules): (WebCore::RuleSet::RuleSetSelectorPair::RuleSetSelectorPair): (RuleSetSelectorPair): (WebCore::elementCanUseSimpleDefaultStyle): (WebCore::screenEval): (WebCore::printEval): (WebCore::leftToRightDeclaration): (WebCore::rightToLeftDeclaration): (WebCore::StyleResolver::StyleResolver): (WebCore::StyleResolver::addAuthorRulesAndCollectUserRulesFromSheets): (WebCore::makeRuleSet): (WebCore::StyleResolver::collectFeatures): (WebCore::StyleResolver::determineScope): (WebCore::StyleResolver::ruleSetForScope): (WebCore::StyleResolver::appendAuthorStylesheets): (WebCore::StyleResolver::setupScopeStack): (WebCore::StyleResolver::pushScope): (WebCore::StyleResolver::popScope): (WebCore::StyleResolver::pushParentElement): (WebCore::StyleResolver::popParentElement): (WebCore::StyleResolver::pushParentShadowRoot): (WebCore::StyleResolver::popParentShadowRoot): (WebCore::StyleResolver::addKeyframeStyle): (WebCore::StyleResolver::~StyleResolver): (WebCore::StyleResolver::sweepMatchedPropertiesCache): (WebCore::StyleResolver::Features::Features): (WebCore::StyleResolver::Features::~Features): (WebCore::StyleResolver::Features::add): (WebCore::StyleResolver::Features::clear): (WebCore::parseUASheet): (WebCore::loadFullDefaultStyle): (WebCore::loadSimpleDefaultStyle): (WebCore::loadViewSourceStyle): (WebCore::ensureDefaultStyleSheetsForElement): (WebCore::StyleResolver::addMatchedProperties): (WebCore::StyleResolver::addElementStyleProperties): (WebCore::StyleResolver::collectMatchingRules): (WebCore::StyleResolver::collectMatchingRulesForRegion): (WebCore::StyleResolver::sortAndTransferMatchedRules): (WebCore::StyleResolver::matchScopedAuthorRules): (WebCore::StyleResolver::matchAuthorRules): (WebCore::StyleResolver::matchUserRules): (WebCore::StyleResolver::matchUARules): (MatchingUARulesScope): (WebCore::MatchingUARulesScope::MatchingUARulesScope): (WebCore::MatchingUARulesScope::~MatchingUARulesScope): (WebCore::MatchingUARulesScope::isMatchingUARules): (WebCore::StyleResolver::collectMatchingRulesForList): * css/StyleResolver.h: Renamed from Source/WebCore/css/CSSStyleSelector.h. (WebCore): (MediaQueryResult): (WebCore::MediaQueryResult::MediaQueryResult): (StyleResolver): (WebCore::StyleResolver::style): (WebCore::StyleResolver::parentStyle): (WebCore::StyleResolver::rootElementStyle): (WebCore::StyleResolver::element): (WebCore::StyleResolver::document): (WebCore::StyleResolver::fontDescription): (WebCore::StyleResolver::parentFontDescription): (WebCore::StyleResolver::setFontDescription): (WebCore::StyleResolver::setZoom): (WebCore::StyleResolver::setEffectiveZoom): (WebCore::StyleResolver::setTextSizeAdjust): (WebCore::StyleResolver::hasParentNode): (WebCore::StyleResolver::pushScope): (WebCore::StyleResolver::popScope): (WebCore::StyleResolver::setStyle): (WebCore::StyleResolver::fontSelector): (WebCore::StyleResolver::allVisitedStateChanged): (WebCore::StyleResolver::visitedStateChanged): (WebCore::StyleResolver::usesSiblingRules): (WebCore::StyleResolver::usesFirstLineRules): (WebCore::StyleResolver::usesBeforeAfterRules): (WebCore::StyleResolver::usesLinkRules): (WebCore::StyleResolver::RuleFeature::RuleFeature): (RuleFeature): (Features): (WebCore::StyleResolver::addMatchedRule): (WebCore::StyleResolver::MatchRanges::MatchRanges): (MatchRanges): (WebCore::StyleResolver::MatchedProperties::MatchedProperties): (MatchedProperties): (WebCore::StyleResolver::MatchResult::MatchResult): (MatchResult): (WebCore::StyleResolver::MatchOptions::MatchOptions): (MatchOptions): (WebCore::StyleResolver::isRightPage): (WebCore::StyleResolver::styleNotYetAvailable): (WebCore::StyleResolver::applyPropertyToRegularStyle): (WebCore::StyleResolver::applyPropertyToVisitedLinkStyle): (MatchedPropertiesCacheItem): (WebCore::StyleResolver::scopeStackIsConsistent): (WebCore::StyleResolver::ScopeStackFrame::ScopeStackFrame): (ScopeStackFrame): * css/WebKitCSSMatrix.cpp: * dom/Document.cpp: * dom/Element.cpp: * dom/Node.cpp: * dom/ShadowRoot.cpp: * dom/ShadowTree.cpp: * dom/StyledElement.cpp: * editing/ApplyStyleCommand.cpp: * editing/EditingStyle.cpp: * editing/Editor.cpp: * editing/markup.cpp: * history/CachedPage.cpp: * html/HTMLDocument.cpp: * html/HTMLLinkElement.cpp: * html/HTMLOptGroupElement.cpp: * html/HTMLOptionElement.cpp: * html/ValidationMessage.cpp: * html/canvas/CanvasRenderingContext2D.cpp: * html/shadow/MediaControlElements.cpp: * inspector/InspectorCSSAgent.cpp: * inspector/InspectorDOMAgent.cpp: * inspector/InspectorStyleSheet.cpp: * loader/LinkLoader.cpp: * page/DOMWindow.cpp: * page/FrameView.cpp: * page/Page.cpp: * page/animation/KeyframeAnimation.cpp: * platform/qt/RenderThemeQt.cpp: * platform/qt/RenderThemeQtMobile.cpp: * rendering/RenderLayer.cpp: * rendering/RenderLayerBacking.cpp: * rendering/RenderListBox.cpp: * rendering/RenderMenuList.cpp: * rendering/RenderObject.cpp: * rendering/RenderRegion.cpp: * rendering/RenderSlider.cpp: * rendering/RenderTextControlSingleLine.cpp: * rendering/RenderThemeMac.mm: * rendering/RenderThemeSafari.cpp: * rendering/style/RenderStyle.cpp: * rendering/style/StyleGeneratedImage.cpp: * rendering/style/StyleRareNonInheritedData.cpp: * rendering/svg/RenderSVGInlineText.cpp: * svg/SVGClipPathElement.cpp: * svg/SVGElement.cpp: * svg/SVGFontFaceElement.cpp: * svg/SVGGradientElement.cpp: * svg/SVGMaskElement.cpp: * svg/SVGUseElement.cpp: 2012-04-25 Crystal Zhang https://bugs.webkit.org/show_bug.cgi?id=84875 make-css-file-arrays.pl now only take css files, make it also take js files, as for html popups we also need load js files. Reviewed by Antonio Gomes. * css/make-css-file-arrays.pl: 2012-04-25 Li Yin [chromium][workers] setTargetType(ResourceRequest::TargetIsWorker) is repeatedly called in chromium https://bugs.webkit.org/show_bug.cgi?id=84542 Reviewed by David Levin. In chromium platform, the default value of m_targetType is ResourceRequest::TargetIsWorker it isn't necessary to call worker->m_scriptLoader->setTargetType(ResourceRequest::TargetIsWorker) again in Worker.cpp In chromium platform, the m_targettype value determines the priority of resource loaded. No new tests because this patch just deletes a repeated code, it can reduce code workload and can't impact any feature. If the target type isn't set correctly, the following test maybe fail because of timeout in the chromium. fast/workers/storage/multiple-transactions-on-different-handles.html fast/workers/storage/multiple-transactions-on-different-handles-sync.html fast/workers/storage/interrupt-database.html * workers/Worker.cpp: (WebCore::Worker::create): 2012-04-25 Yury Semikhatsky Web Inspector: move HeapSnapshotLoader into a separate file https://bugs.webkit.org/show_bug.cgi?id=84860 Extracted HeapSnapshotLoader into its own file. Reviewed by Pavel Feldman. * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * inspector/compile-front-end.py: * inspector/front-end/HeapSnapshot.js: * inspector/front-end/HeapSnapshotLoader.js: Added. (WebInspector.HeapSnapshotLoader): (WebInspector.HeapSnapshotLoader.prototype._findBalancedCurlyBrackets): (WebInspector.HeapSnapshotLoader.prototype.finishLoading): (WebInspector.HeapSnapshotLoader.prototype._parseUintArray): (WebInspector.HeapSnapshotLoader.prototype._parseStringsArray): (WebInspector.HeapSnapshotLoader.prototype.pushJSONChunk): * inspector/front-end/WebKit.qrc: * inspector/front-end/inspector.html: 2012-04-25 'Pavel Feldman' Not reviewed: inspector frontend tests fix. * inspector/front-end/ScriptsSearchScope.js: 2012-04-25 Ian Vollick [chromium] Animations waiting for a synchronized start time should never be marked finished. https://bugs.webkit.org/show_bug.cgi?id=84519 Reviewed by James Robinson. Tested in CCLayerAnimationControllerTest.AnimationsWaitingForStartTimeDoNotFinishIfTheyWaitLongerToStartThanTheirDuration * platform/graphics/chromium/cc/CCLayerAnimationController.cpp: (WebCore::CCLayerAnimationController::tickAnimations): 2012-04-25 Pierre Rossi [SVG] Nothing should be stroked when the stroke-width is 0 https://bugs.webkit.org/show_bug.cgi?id=83568 Reviewed by Nikolas Zimmermann. The spec states that "A zero value causes no stroke to be painted". We should avoid calling functions that could incorrectly paint something in that case. Test: svg/custom/path-zero-strokewidth.svg * rendering/style/SVGRenderStyle.h: (WebCore::SVGRenderStyle::hasVisibleStroke): * rendering/svg/RenderSVGEllipse.cpp: (WebCore::RenderSVGEllipse::strokeShape): Check if the stroke should be visible before painting. * rendering/svg/RenderSVGRect.cpp: (WebCore::RenderSVGRect::strokeShape): Ditto. * rendering/svg/RenderSVGShape.cpp: (WebCore::RenderSVGShape::strokeShape): Ditto. (WebCore::RenderSVGShape::strokePath): Ditto. * rendering/svg/SVGInlineTextBox.cpp: (WebCore::SVGInlineTextBox::paint): Dont call paintText for zero-width stroke. (WebCore::SVGInlineTextBox::paintDecoration): Ditto. 2012-04-25 Alexis Menard Unfortunately http://trac.webkit.org/changeset/115055 was landed using webkit-patch land-from bug but didn't do the right thing, we lost the history. This commit is merging back CSSStyleApplyProperty.* and their history, rename the files to StyleBuilder and re-apply the two patches on trunk that were apply after the rename. Rename CSSStyleSelector class to StyleResolver. https://bugs.webkit.org/show_bug.cgi?id=84734 The name CSSStyleSelector is confusing as it conflicts a bit with the CSS concept of selectors. One could think it's an encapsulation of the CSS selectors but it's not, in fact this class is responsible of finding the RenderStyle for a given element. This is the first patch as I will later rename the files, and then rename the local variables. Replace occurences of style selector from variables and methods names by style resolver. https://bugs.webkit.org/show_bug.cgi?id=84765 Rename methods and variables to follow the new name StyleResolver. It requires to update the local variables, methods parameters, and function names to match the new name and to remove the concept of "selector" to avoid clashing with the CSS concept. The next and last patch will be to rename CSSStyleSelector file and update the includes. * css/StyleBuilder.cpp: Replaced with Source/WebCore/css/CSSStyleApplyProperty.cpp. (WebCore::ApplyPropertyExpanding::applyInheritValue): (WebCore::ApplyPropertyExpanding::applyInitialValue): (WebCore::ApplyPropertyExpanding::applyValue): (WebCore::ApplyPropertyDefaultBase::applyInheritValue): (WebCore::ApplyPropertyDefaultBase::applyInitialValue): (WebCore::ApplyPropertyDefaultBase::applyValue): (WebCore::ApplyPropertyDefault::applyValue): (WebCore::ApplyPropertyNumber::applyValue): (WebCore::ApplyPropertyStyleImage::applyValue): (WebCore::ApplyPropertyAuto::applyInheritValue): (WebCore::ApplyPropertyAuto::applyInitialValue): (WebCore::ApplyPropertyAuto::applyValue): (WebCore::ApplyPropertyClip::convertToLength): (WebCore::ApplyPropertyClip::applyInheritValue): (WebCore::ApplyPropertyClip::applyInitialValue): (WebCore::ApplyPropertyClip::applyValue): (WebCore::ApplyPropertyColor::applyInheritValue): (WebCore::ApplyPropertyColor::applyInitialValue): (WebCore::ApplyPropertyColor::applyValue): (WebCore::ApplyPropertyColor::applyColorValue): (WebCore::ApplyPropertyDirection::applyValue): (WebCore::ApplyPropertyLength::applyValue): (WebCore::ApplyPropertyString::applyValue): (WebCore::ApplyPropertyBorderRadius::applyValue): (WebCore::ApplyPropertyFillLayer::applyInheritValue): (WebCore::ApplyPropertyFillLayer::applyInitialValue): (WebCore::ApplyPropertyFillLayer::applyValue): (WebCore::ApplyPropertyComputeLength::applyValue): (WebCore::ApplyPropertyFont::applyInheritValue): (WebCore::ApplyPropertyFont::applyInitialValue): (WebCore::ApplyPropertyFont::applyValue): (WebCore::ApplyPropertyFontSize::applyInheritValue): (WebCore::ApplyPropertyFontSize::applyInitialValue): (WebCore::ApplyPropertyFontSize::applyValue): (WebCore::ApplyPropertyFontWeight::applyValue): (WebCore::ApplyPropertyFontVariantLigatures::applyInheritValue): (WebCore::ApplyPropertyFontVariantLigatures::applyInitialValue): (WebCore::ApplyPropertyFontVariantLigatures::applyValue): (WebCore::ApplyPropertyBorderImage::applyValue): (WebCore::ApplyPropertyBorderImageModifier::applyInheritValue): (WebCore::ApplyPropertyBorderImageModifier::applyInitialValue): (WebCore::ApplyPropertyBorderImageModifier::applyValue): (WebCore::ApplyPropertyBorderImageSource::applyValue): (WebCore::ApplyPropertyCounter::emptyFunction): (WebCore::ApplyPropertyCounter::applyInheritValue): (WebCore::ApplyPropertyCounter::applyValue): (WebCore::ApplyPropertyCursor::applyInheritValue): (WebCore::ApplyPropertyCursor::applyInitialValue): (WebCore::ApplyPropertyCursor::applyValue): (WebCore::ApplyPropertyTextAlign::applyValue): (WebCore::ApplyPropertyTextDecoration::applyValue): (WebCore::ApplyPropertyUnicodeBidi::applyValue): (WebCore::ApplyPropertyLineHeight::applyValue): (WebCore::ApplyPropertyPageSize::applyInheritValue): (WebCore::ApplyPropertyPageSize::applyInitialValue): (WebCore::ApplyPropertyPageSize::applyValue): (WebCore::ApplyPropertyTextEmphasisStyle::applyInheritValue): (WebCore::ApplyPropertyTextEmphasisStyle::applyInitialValue): (WebCore::ApplyPropertyTextEmphasisStyle::applyValue): (WebCore): (WebCore::ApplyPropertyAnimation::map): (WebCore::ApplyPropertyAnimation::applyInheritValue): (WebCore::ApplyPropertyAnimation::applyInitialValue): (WebCore::ApplyPropertyAnimation::applyValue): (WebCore::ApplyPropertyOutlineStyle::applyInheritValue): (WebCore::ApplyPropertyOutlineStyle::applyInitialValue): (WebCore::ApplyPropertyOutlineStyle::applyValue): (WebCore::ApplyPropertyResize::applyValue): (WebCore::ApplyPropertyVerticalAlign::applyValue): (WebCore::ApplyPropertyAspectRatio::applyInheritValue): (WebCore::ApplyPropertyAspectRatio::applyInitialValue): (WebCore::ApplyPropertyAspectRatio::applyValue): (WebCore::ApplyPropertyZoom::resetEffectiveZoom): (WebCore::ApplyPropertyZoom::applyInheritValue): (WebCore::ApplyPropertyZoom::applyInitialValue): (WebCore::ApplyPropertyZoom::applyValue): (WebCore::ApplyPropertyDisplay::isValidDisplayValue): (WebCore::ApplyPropertyDisplay::applyInheritValue): (WebCore::ApplyPropertyDisplay::applyInitialValue): (WebCore::ApplyPropertyDisplay::applyValue): (WebCore::ApplyPropertyFlex::applyInheritValue): (WebCore::ApplyPropertyFlex::applyInitialValue): (WebCore::ApplyPropertyFlex::applyValue): (WebCore::StyleBuilder::StyleBuilder): * css/StyleBuilder.h: Replaced with Source/WebCore/css/CSSStyleApplyProperty.h. (WebCore): (PropertyHandler): (WebCore::PropertyHandler::applyInheritValue): (WebCore::PropertyHandler::applyInitialValue): (WebCore::PropertyHandler::applyValue): 2012-04-25 Eric Carlson Not reviewed, fix Windows build after r115165. * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::updateCompositingLayers): Initialize logging variable. 2012-04-25 Florin Malita [Coverity] Uninitialized fields in RenderSVGShape constructors https://bugs.webkit.org/show_bug.cgi?id=84749 Reviewed by Darin Adler. Removing unused RenderSVGShape constructor and field. No new tests - no behavior change. * rendering/svg/RenderSVGShape.cpp: * rendering/svg/RenderSVGShape.h: (RenderSVGShape): 2012-04-25 'Pavel Feldman' Not reviewed: follow up to r115194, removed debug output. * inspector/front-end/DebuggerPresentationModel.js: (WebInspector.DebuggerPresentationModel.prototype._parsedScriptSource): 2012-04-25 Pavel Feldman Web Inspector: extract Linkifier from DebuggerPresentationModel. https://bugs.webkit.org/show_bug.cgi?id=84855 Reviewed by Yury Semikhatsky. There is nothing Linkifier needs from the model, extracting as a top-level class. * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * inspector/compile-front-end.py: * inspector/front-end/ConsoleMessage.js: * inspector/front-end/ConsoleView.js: (WebInspector.ConsoleView): * inspector/front-end/DebuggerPresentationModel.js: * inspector/front-end/EventListenersSidebarPane.js: * inspector/front-end/Linkifier.js: Added. (WebInspector.LinkifierFormatter): (WebInspector.LinkifierFormatter.prototype.formatLiveAnchor): (WebInspector.Linkifier): (WebInspector.Linkifier.prototype.linkifyLocation): (WebInspector.Linkifier.prototype.linkifyRawLocation): (WebInspector.Linkifier.prototype.reset): (WebInspector.Linkifier.prototype._updateAnchor): (WebInspector.Linkifier.DefaultFormatter): (WebInspector.Linkifier.DefaultFormatter.prototype.formatLiveAnchor): * inspector/front-end/NetworkPanel.js: * inspector/front-end/ObjectPopoverHelper.js: (WebInspector.ObjectPopoverHelper.prototype._showObjectPopover.showObjectPopover.): (WebInspector.ObjectPopoverHelper.prototype._showObjectPopover): * inspector/front-end/ProfileView.js: * inspector/front-end/ScriptsSearchScope.js: (WebInspector.ScriptsSearchResultsPane): * inspector/front-end/TimelinePresentationModel.js: (WebInspector.TimelinePresentationModel): * inspector/front-end/WebKit.qrc: * inspector/front-end/inspector.html: 2012-04-25 Pavel Feldman Web Inspector: move sourcemap-agnostic part of the debugger presentation model into the raw debugger. https://bugs.webkit.org/show_bug.cgi?id=84852 Reviewed by Yury Semikhatsky. There is no need to keep that much debugging functionality in the debugger presentation model. It all perfectly applies to the raw script debugger. Methods for selecting call frames, activating breakpoints and paused details were moved to the WebInspector.DebuggerModel. * inspector/front-end/BreakpointManager.js: (WebInspector.BreakpointManager.prototype._removeBreakpointFromUI): * inspector/front-end/CallStackSidebarPane.js: (WebInspector.CallStackSidebarPane): (WebInspector.CallStackSidebarPane.prototype.update): (WebInspector.CallStackSidebarPane.prototype.setSelectedCallFrame): (WebInspector.CallStackSidebarPane.prototype._selectedCallFrameIndex): (WebInspector.CallStackSidebarPane.prototype._placardSelected): (WebInspector.CallStackSidebarPane.Placard): (WebInspector.CallStackSidebarPane.Placard.prototype._update): * inspector/front-end/ConsoleView.js: * inspector/front-end/DebuggerModel.js: (WebInspector.DebuggerModel.prototype._globalObjectCleared): (WebInspector.DebuggerModel.prototype._didEditScriptSource): (WebInspector.DebuggerModel.prototype._setDebuggerPausedDetails): (WebInspector.DebuggerModel.prototype._pausedScript): (WebInspector.DebuggerModel.prototype._resumedScript): (WebInspector.DebuggerModel.prototype.isPaused): (WebInspector.DebuggerModel.prototype.setSelectedCallFrame.updateExecutionLine): (WebInspector.DebuggerModel.prototype.setSelectedCallFrame): (WebInspector.DebuggerModel.prototype.selectedCallFrame): (WebInspector.DebuggerModel.prototype.evaluateOnSelectedCallFrame): (WebInspector.DebuggerModel.prototype.getSelectedCallFrameVariables.propertiesCollected): (WebInspector.DebuggerModel.prototype.getSelectedCallFrameVariables): (WebInspector.DebuggerModel.prototype.setBreakpointsActive): (WebInspector.DebuggerModel.prototype.breakpointsActive): (WebInspector.DebuggerModel.CallFrame): (WebInspector.DebuggerModel.CallFrame.prototype.get script): (WebInspector.DebuggerModel.CallFrame.prototype.get type): (WebInspector.DebuggerModel.CallFrame.prototype.get scopeChain): (WebInspector.DebuggerModel.CallFrame.prototype.get this): (WebInspector.DebuggerModel.CallFrame.prototype.get functionName): (WebInspector.DebuggerModel.CallFrame.prototype.get location): (WebInspector.DebuggerModel.CallFrame.prototype.evaluate): (WebInspector.DebuggerModel.CallFrame.prototype.createLiveLocation): (WebInspector.DebuggerModel.CallFrame.prototype.dispose): (WebInspector.DebuggerPausedDetails): (WebInspector.DebuggerPausedDetails.prototype.dispose): * inspector/front-end/DebuggerPresentationModel.js: (WebInspector.DebuggerPresentationModel): (WebInspector.DebuggerPresentationModel.prototype.createLiveLocation): (WebInspector.DebuggerPresentationModel.prototype._parsedScriptSource): (WebInspector.DebuggerPresentationModel.prototype._callFrameSelected): (WebInspector.DebuggerPresentationModel.prototype.setScriptSource.didEditScriptSource): (WebInspector.DebuggerPresentationModel.prototype.setScriptSource): (WebInspector.DebuggerPresentationModel.prototype._debuggerReset): * inspector/front-end/JavaScriptSource.js: (WebInspector.JavaScriptSource.prototype.setBreakpoint): * inspector/front-end/JavaScriptSourceFrame.js: (WebInspector.JavaScriptSourceFrame.prototype._resolveObjectForPopover): * inspector/front-end/Script.js: (WebInspector.Script.prototype.setSourceMapping): (WebInspector.Script.prototype.createLiveLocation): (WebInspector.Script.Location.prototype.update): * inspector/front-end/ScriptMapping.js: (WebInspector.LiveLocation): (WebInspector.LiveLocation.prototype.update): (WebInspector.LiveLocation.prototype.dispose): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype._consoleCommandEvaluatedInSelectedCallFrame): (WebInspector.ScriptsPanel.prototype._debuggerPaused): (WebInspector.ScriptsPanel.prototype._callFrameSelected): (WebInspector.ScriptsPanel.prototype._toggleBreakpointsClicked): * inspector/front-end/UISourceCode.js: 2012-04-25 Yury Semikhatsky Web Inspector: use composite node provider for diff nodes in heap profiler https://bugs.webkit.org/show_bug.cgi?id=84849 Inroduced HeapSnapshotDiffNodesProvider which is basically a composite provider combining providers for added and deleted nodes. This allowed to remove custom implementation of HeapSnapshotGridNode.prototype.populateChildren. Reviewed by Pavel Feldman. * inspector/front-end/HeapSnapshot.js: (WebInspector.HeapSnapshotNodesProvider.prototype.sort.sortByNodeField): moved index assignment to sortByComparator so that it is done only once. (WebInspector.HeapSnapshotNodesProvider.prototype.sort.sortByComparator): (WebInspector.HeapSnapshotNodesProvider.prototype.sort): * inspector/front-end/HeapSnapshotGridNodes.js: (WebInspector.HeapSnapshotGridNode): (WebInspector.HeapSnapshotGridNode.prototype.populateChildren.callSerialize): (WebInspector.HeapSnapshotGridNode.prototype.populateChildren.childrenRetrieved.notify): (WebInspector.HeapSnapshotGridNode.prototype.populateChildren.childrenRetrieved): (WebInspector.HeapSnapshotGridNode.prototype.populateChildren): (WebInspector.HeapSnapshotGridNode.prototype.sort.afterSort): (WebInspector.HeapSnapshotGridNode.prototype.sort): (WebInspector.HeapSnapshotDiffNodesProvider): (WebInspector.HeapSnapshotDiffNodesProvider.prototype.dispose): (WebInspector.HeapSnapshotDiffNodesProvider.prototype.isEmpty): (WebInspector.HeapSnapshotDiffNodesProvider.prototype.serializeNextItems): (WebInspector.HeapSnapshotDiffNodesProvider.prototype.serializeNextItems.didReceiveDeletedItems): (WebInspector.HeapSnapshotDiffNodesProvider.prototype.serializeNextItems.didReceiveAddedItems): (WebInspector.HeapSnapshotDiffNodesProvider.prototype.sortAndRewind.afterSort): (WebInspector.HeapSnapshotDiffNodesProvider.prototype.sortAndRewind): (WebInspector.HeapSnapshotDiffNode): (WebInspector.HeapSnapshotDiffNode._createProvider): (WebInspector.HeapSnapshotDiffNode.prototype._createChildNode): 2012-04-25 Nikolas Zimmermann Refactor to/from/animatedType creation, to share more code between animators https://bugs.webkit.org/show_bug.cgi?id=84846 Reviewed by Antti Koivisto. Share more code bewteen animators, doesn't change functionality yet, except for one bug in SVGAnimatedString. SVGAnimatedString used to mutate the from/to values during animation, leading to problems in animate-element-31-t.svg. It now needs a rebaseline, now that this bug is fixed as side-effect. * svg/SVGAnimateColorElement.cpp: (WebCore::attributeValueIsCurrentColor): (WebCore::SVGAnimateColorElement::determinePropertyValueTypes): (WebCore): * svg/SVGAnimateColorElement.h: (SVGAnimateColorElement): * svg/SVGAnimateElement.cpp: (WebCore::SVGAnimateElement::SVGAnimateElement): * svg/SVGAnimateElement.h: (SVGAnimateElement): * svg/SVGAnimatedAngle.cpp: (WebCore::SVGAnimatedAngleAnimator::calculateAnimatedValue): * svg/SVGAnimatedBoolean.cpp: (WebCore::SVGAnimatedBooleanAnimator::calculateAnimatedValue): * svg/SVGAnimatedColor.cpp: (WebCore::adjustForCurrentColor): (WebCore): (WebCore::parseColorFromString): (WebCore::SVGAnimatedColorAnimator::calculateAnimatedValue): * svg/SVGAnimatedEnumeration.cpp: (WebCore::SVGAnimatedEnumerationAnimator::calculateAnimatedValue): * svg/SVGAnimatedInteger.cpp: (WebCore::SVGAnimatedIntegerAnimator::calculateAnimatedInteger): (WebCore::SVGAnimatedIntegerAnimator::calculateAnimatedValue): * svg/SVGAnimatedIntegerOptionalInteger.cpp: (WebCore::SVGAnimatedIntegerOptionalIntegerAnimator::calculateAnimatedValue): * svg/SVGAnimatedLength.cpp: (WebCore::parseLengthFromString): (WebCore): (WebCore::SVGAnimatedLengthAnimator::calculateAnimatedValue): * svg/SVGAnimatedLengthList.cpp: (WebCore::parseLengthListFromString): (WebCore): (WebCore::SVGAnimatedLengthListAnimator::calculateAnimatedValue): * svg/SVGAnimatedNumber.cpp: (WebCore::parseNumberFromString): (WebCore): (WebCore::SVGAnimatedNumberAnimator::calculateAnimatedValue): * svg/SVGAnimatedNumberList.cpp: (WebCore::SVGAnimatedNumberListAnimator::calculateAnimatedValue): * svg/SVGAnimatedNumberOptionalNumber.cpp: (WebCore::SVGAnimatedNumberOptionalNumberAnimator::calculateAnimatedValue): * svg/SVGAnimatedPointList.cpp: (WebCore::SVGAnimatedPointListAnimator::calculateAnimatedValue): * svg/SVGAnimatedPreserveAspectRatio.cpp: (WebCore::SVGAnimatedPreserveAspectRatioAnimator::calculateAnimatedValue): * svg/SVGAnimatedRect.cpp: (WebCore::SVGAnimatedRectAnimator::calculateAnimatedValue): * svg/SVGAnimatedString.cpp: (WebCore::parseStringFromString): (WebCore): (WebCore::SVGAnimatedStringAnimator::calculateAnimatedValue): * svg/SVGAnimatedTransformList.cpp: (WebCore::SVGAnimatedTransformListAnimator::calculateAnimatedValue): * svg/SVGAnimationElement.cpp: (WebCore::SVGAnimationElement::SVGAnimationElement): (WebCore::SVGAnimationElement::adjustForInheritance): (WebCore): (WebCore::inheritsFromProperty): (WebCore::SVGAnimationElement::determinePropertyValueTypes): * svg/SVGAnimationElement.h: (WebCore::SVGAnimationElement::fromPropertyValueType): (WebCore::SVGAnimationElement::toPropertyValueType): (SVGAnimationElement): (WebCore::SVGAnimationElement::adjustForInheritance): (WebCore::SVGAnimationElement::adjustFromToValues): (WebCore::SVGAnimationElement::adjustFromToListValues): 2012-04-25 Nikolas Zimmermann Share single calculateFromToValues/calculateFromByValues between all SVGAnimatedTypeAnimators https://bugs.webkit.org/show_bug.cgi?id=84832 Reviewed by Antti Koivisto. calculateFromAndToValues / calculateFromAndByValues don't need to be spread across all SVGAnimatedTypeAnimators. Centralize these new implementations in SVGAnimatedTypeAnimator.h. Refactored addAnimatedTypes() from constructFromAndByValues. calculateFromAndToValues: from = constructFromString(fromString) to = constructFromString(toString) calculateFromAndByValues: from = constructFromString(fromString) to = constructFromString(byString) addAnimatedTypes(from, to) Doesn't affect any tests, just refactors code. * svg/SVGAnimateElement.cpp: (WebCore::SVGAnimateElement::calculateFromAndToValues): (WebCore::SVGAnimateElement::calculateFromAndByValues): * svg/SVGAnimatedAngle.cpp: (WebCore::SVGAnimatedAngleAnimator::addAnimatedTypes): * svg/SVGAnimatedAngle.h: (SVGAnimatedAngleAnimator): * svg/SVGAnimatedBoolean.cpp: (WebCore::SVGAnimatedBooleanAnimator::addAnimatedTypes): * svg/SVGAnimatedBoolean.h: (SVGAnimatedBooleanAnimator): * svg/SVGAnimatedColor.cpp: (WebCore::SVGAnimatedColorAnimator::addAnimatedTypes): * svg/SVGAnimatedColor.h: (SVGAnimatedColorAnimator): * svg/SVGAnimatedEnumeration.cpp: (WebCore::SVGAnimatedEnumerationAnimator::addAnimatedTypes): * svg/SVGAnimatedEnumeration.h: (SVGAnimatedEnumerationAnimator): * svg/SVGAnimatedInteger.cpp: (WebCore::SVGAnimatedIntegerAnimator::addAnimatedTypes): * svg/SVGAnimatedInteger.h: (SVGAnimatedIntegerAnimator): * svg/SVGAnimatedIntegerOptionalInteger.cpp: (WebCore::SVGAnimatedIntegerOptionalIntegerAnimator::addAnimatedTypes): * svg/SVGAnimatedIntegerOptionalInteger.h: (SVGAnimatedIntegerOptionalIntegerAnimator): * svg/SVGAnimatedLength.cpp: (WebCore::SVGAnimatedLengthAnimator::addAnimatedTypes): * svg/SVGAnimatedLength.h: (SVGAnimatedLengthAnimator): * svg/SVGAnimatedLengthList.cpp: (WebCore::SVGAnimatedLengthListAnimator::addAnimatedTypes): * svg/SVGAnimatedLengthList.h: (SVGAnimatedLengthListAnimator): * svg/SVGAnimatedNumber.cpp: (WebCore::SVGAnimatedNumberAnimator::addAnimatedTypes): * svg/SVGAnimatedNumber.h: (SVGAnimatedNumberAnimator): * svg/SVGAnimatedNumberList.cpp: (WebCore::SVGAnimatedNumberListAnimator::addAnimatedTypes): * svg/SVGAnimatedNumberList.h: (SVGAnimatedNumberListAnimator): * svg/SVGAnimatedNumberOptionalNumber.cpp: (WebCore::SVGAnimatedNumberOptionalNumberAnimator::addAnimatedTypes): * svg/SVGAnimatedNumberOptionalNumber.h: (SVGAnimatedNumberOptionalNumberAnimator): * svg/SVGAnimatedPath.cpp: (WebCore::SVGAnimatedPathAnimator::constructFromString): (WebCore::SVGAnimatedPathAnimator::addAnimatedTypes): * svg/SVGAnimatedPath.h: (SVGAnimatedPathAnimator): * svg/SVGAnimatedPointList.cpp: (WebCore::SVGAnimatedPointListAnimator::addAnimatedTypes): * svg/SVGAnimatedPointList.h: (SVGAnimatedPointListAnimator): * svg/SVGAnimatedPreserveAspectRatio.cpp: (WebCore::SVGAnimatedPreserveAspectRatioAnimator::addAnimatedTypes): * svg/SVGAnimatedPreserveAspectRatio.h: (SVGAnimatedPreserveAspectRatioAnimator): * svg/SVGAnimatedRect.cpp: (WebCore::SVGAnimatedRectAnimator::addAnimatedTypes): * svg/SVGAnimatedRect.h: (SVGAnimatedRectAnimator): * svg/SVGAnimatedString.cpp: (WebCore::SVGAnimatedStringAnimator::addAnimatedTypes): * svg/SVGAnimatedString.h: (SVGAnimatedStringAnimator): * svg/SVGAnimatedTransformList.cpp: (WebCore::SVGAnimatedTransformListAnimator::SVGAnimatedTransformListAnimator): (WebCore::SVGAnimatedTransformListAnimator::constructFromString): (WebCore::SVGAnimatedTransformListAnimator::addAnimatedTypes): (WebCore::SVGAnimatedTransformListAnimator::calculateDistance): * svg/SVGAnimatedTransformList.h: (SVGAnimatedTransformListAnimator): * svg/SVGAnimatedTypeAnimator.h: (SVGAnimatedTypeAnimator): (WebCore::SVGAnimatedTypeAnimator::calculateFromAndToValues): (WebCore::SVGAnimatedTypeAnimator::calculateFromAndByValues): (WebCore::SVGAnimatedTypeAnimator::setContextElement): 2012-04-25 Andreas Kling Shrink RenderText by 8 bytes on 64-bit. Reviewed by Maciej Stachowiak. Reorder the members so that the bits in RenderText falls into the padding at the end of RenderObject on 64-bit. Updated the compile-time size assertion to account for the new object structure. This shrinks RenderText from 104 to 96 bytes on 64-bit release builds. * rendering/RenderText.cpp: (SameSizeAsRenderText): (WebCore::RenderText::RenderText): * rendering/RenderText.h: (RenderText): 2012-04-25 Raymond Toy No audio from MediaElementAudioSourceNode https://bugs.webkit.org/show_bug.cgi?id=84669 MediaElementAudioSourceNode needs custom propagatesSilence() to return false to indicate the node never propagates silence. Reviewed by Chris Rogers. * Modules/webaudio/MediaElementAudioSourceNode.h: (MediaElementAudioSourceNode): Add propagatesSilence(). 2012-04-25 Xianzhu Wang Web Inspector: Incorrect highlight position of inspected element in a scrolled page https://bugs.webkit.org/show_bug.cgi?id=84755 Reviewed by Pavel Feldman. Test: inspector/elements/highlight-node-scroll.html * inspector/DOMNodeHighlighter.cpp: Ensures the highlight position is in page coordinates. 2012-04-24 Yury Semikhatsky Unreviewed. Revert part of the change r115063 which commented out real worker creation. It was commited by mistake. * inspector/front-end/HeapSnapshotProxy.js: (WebInspector.HeapSnapshotWorker): 2012-04-24 Jon Lee New Notification constructor do not take into account security origin permissions https://bugs.webkit.org/show_bug.cgi?id=84825 Reviewed by Darin Adler. Tests requires support for notifications on Mac (see 79492). When the task timer fires, we should check to see that the notification has permission to show. If not, we fire the onError event. * notifications/Notification.cpp: (WebCore::Notification::Notification): Since the timer may show, or call the onerror event, we rename it from m_showTaskTimer. to m_taskTimer. (WebCore::Notification::dispatchErrorEvent): The default constructor of ErrorEvent doesn't create the proper event object. Create it using Event::create(). (WebCore::Notification::taskTimerFired): Check to see that we have permission first. * notifications/Notification.h: (Notification): 2012-04-24 Simon Fraser Add a logging channel and some ouput for compositing https://bugs.webkit.org/show_bug.cgi?id=84817 Reviewed by Darin Adler. Add a logging channel called "Compositing". Output useful information to this channel, including a line for each composited layer, its composited bounds, the reason it was composited, the backing store megapixels, and a count of total composited layers and total backing store megapixels. * platform/Logging.cpp: (WebCore): (WebCore::getChannelFromName): * platform/Logging.h: (WebCore): * platform/graphics/GraphicsLayer.cpp: (WebCore::GraphicsLayer::backingStoreArea): * platform/graphics/GraphicsLayer.h: (GraphicsLayer): * platform/graphics/ca/GraphicsLayerCA.cpp: (WebCore::GraphicsLayerCA::backingStoreArea): (WebCore): * platform/graphics/ca/GraphicsLayerCA.h: (GraphicsLayerCA): * platform/mac/LoggingMac.mm: (WebCore::initializeLoggingChannelsIfNecessary): * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::nameForLayer): (WebCore::RenderLayerBacking::backingStoreArea): (WebCore): * rendering/RenderLayerBacking.h: (RenderLayerBacking): * rendering/RenderLayerCompositor.cpp: (WebCore): (WebCore::compositingLogEnabled): (WebCore::RenderLayerCompositor::RenderLayerCompositor): (WebCore::RenderLayerCompositor::updateCompositingLayers): (WebCore::RenderLayerCompositor::logCompositingInfo): (WebCore::RenderLayerCompositor::rebuildCompositingLayerTree): (WebCore::RenderLayerCompositor::updateLayerTreeGeometry): (WebCore::RenderLayerCompositor::reasonForCompositing): * rendering/RenderLayerCompositor.h: (RenderLayerCompositor): 2012-04-24 Kulanthaivel Palanichamy getMatchedCSSRules() should return null when the second argument is an unrecognized pseudo-element name https://bugs.webkit.org/show_bug.cgi?id=83298 Reviewed by Ojan Vafai. I couldn't find any specification or any meaningful discussion on this API, but I assume that it shouldn't be any different from window.getComputedStyle() as far as the parameters are concerned. Test: fast/dom/Window/getMatchedCSSRules-with-invalid-pseudo-elements.html * page/DOMWindow.cpp: (WebCore::DOMWindow::getMatchedCSSRules): * page/DOMWindow.idl: 2012-04-24 Anders Carlsson overflow: hidden on the main frame is broken with threaded scrolling https://bugs.webkit.org/show_bug.cgi?id=84819 Reviewed by Darin Adler. Pass along the horizontal and vertical scrollbar modes to the scrolling tree and use it to determine if wheel events should be handled or not. This matches what we do for non-threaded scrolling. * page/scrolling/ScrollingCoordinator.cpp: (WebCore::ScrollingCoordinator::frameViewLayoutUpdated): (WebCore::ScrollingCoordinator::setScrollParameters): * page/scrolling/ScrollingCoordinator.h: (ScrollParameters): * page/scrolling/ScrollingTreeNode.cpp: (WebCore::ScrollingTreeNode::ScrollingTreeNode): (WebCore::ScrollingTreeNode::update): * page/scrolling/ScrollingTreeNode.h: (WebCore::ScrollingTreeNode::canHaveScrollbars): (ScrollingTreeNode): * page/scrolling/ScrollingTreeState.cpp: (WebCore::ScrollingTreeState::ScrollingTreeState): (WebCore::ScrollingTreeState::setHorizontalScrollbarMode): (WebCore): (WebCore::ScrollingTreeState::setVerticalScrollbarMode): * page/scrolling/ScrollingTreeState.h: (WebCore::ScrollingTreeState::horizontalScrollbarMode): (ScrollingTreeState): (WebCore::ScrollingTreeState::verticalScrollbarMode): * page/scrolling/mac/ScrollingTreeNodeMac.mm: (WebCore::ScrollingTreeNodeMac::handleWheelEvent): 2012-04-24 Adrienne Walker [chromium] Don't call calculateRenderPasses in CCLayerTreeHostImpl::scrollBegin() https://bugs.webkit.org/show_bug.cgi?id=84807 Reviewed by James Robinson. Instead of calculate render passes and quads and tracking damage, simply calculate the updated render layer list, which is what is needed for scrolling. This prevents a willDraw/didDraw mismatch on layers. * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::calculateRenderSurfaceLayerList): (WebCore): (WebCore::CCLayerTreeHostImpl::calculateRenderPasses): (WebCore::CCLayerTreeHostImpl::ensureMostRecentRenderSurfaceLayerList): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: (CCLayerTreeHostImpl): 2012-04-24 Dana Jansens [chromium] Unbounded draws should use clip to limit their damage to opaque tracking https://bugs.webkit.org/show_bug.cgi?id=84494 Reviewed by Adrienne Walker. Unit test: PlatformContextSkiaTest.UnboundedDrawsAreClipped * platform/graphics/skia/OpaqueRegionSkia.cpp: (WebCore::OpaqueRegionSkia::didDrawRect): (WebCore::OpaqueRegionSkia::didDrawPath): (WebCore::OpaqueRegionSkia::didDrawPoints): (WebCore::OpaqueRegionSkia::didDrawBounded): (WebCore::OpaqueRegionSkia::didDrawUnbounded): * platform/graphics/skia/OpaqueRegionSkia.h: (OpaqueRegionSkia): 2012-04-24 Alexis Menard Implement createTBody for table element. https://bugs.webkit.org/show_bug.cgi?id=84465 Reviewed by Ojan Vafai. Implement createTBody of table element to allow creating tbodies from JS. It's following the specification http://dev.w3.org/html5/spec/the-table-element.html#dom-table-createtbody. Tests: fast/table/table-create-tbody-existing-tbody.html fast/table/table-create-tbody-multiple-tbody.html fast/table/table-create-tbody.html * html/HTMLTableElement.cpp: (WebCore::HTMLTableElement::createTBody): (WebCore): * html/HTMLTableElement.h: (HTMLTableElement): * html/HTMLTableElement.idl: 2012-04-24 Anders Carlsson ScrollingCoordinator::setScrollParameters should take a single struct https://bugs.webkit.org/show_bug.cgi?id=84816 Reviewed by Andreas Kling. * page/scrolling/ScrollingCoordinator.cpp: (WebCore::ScrollingCoordinator::frameViewLayoutUpdated): (WebCore::ScrollingCoordinator::setScrollParameters): * page/scrolling/ScrollingCoordinator.h: (ScrollingCoordinator): (ScrollParameters): * page/scrolling/ScrollingCoordinatorNone.cpp: (WebCore::ScrollingCoordinator::setScrollParameters): * page/scrolling/chromium/ScrollingCoordinatorChromium.cpp: (WebCore::ScrollingCoordinator::setScrollParameters): 2012-04-24 Adam Klein Remove unused undefined() method from ScriptValue https://bugs.webkit.org/show_bug.cgi?id=84751 Reviewed by Kentaro Hara. * bindings/js/ScriptValue.h: (ScriptValue): * bindings/v8/ScriptValue.h: (ScriptValue): 2012-04-24 Yong Li ASSERT failure in RenderLayer::computeRepaintRects https://bugs.webkit.org/show_bug.cgi?id=84480 Reviewed by Simon Fraser. Update visibility status if necessary before updating compositing state in RenderLayer::styleChanged(). No new tests because this is obviously right thing to do and creating new test seems too much for this small change. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::styleChanged): 2012-04-24 Kent Tamura Calendar Picker: Open a calendar picker by keyboard operation https://bugs.webkit.org/show_bug.cgi?id=84680 Reviewed by Kentaro Hara. - Open a calendar picker by the down arrow key. - Remove stepping down/up by keyboard and wheel operations. This behavior was for text fields with spin buttons. Because the date type doesn't have spin buttons, we should remove this behavior. No new tests for opening a calendar picker. This behavior is not testable by DRT yet. For removal of stepping up/down, fast/forms/date/date-stepup-stepdown-from-renderer.html is updated. * html/BaseDateAndTimeInputType.cpp: (WebCore::BaseDateAndTimeInputType::handleKeydownEvent): Check shouldHaveSpinButton() before spin button key operations. (WebCore::BaseDateAndTimeInputType::handleWheelEvent): Check shouldHaveSpinButton() before spin button wheel operations. * html/BaseDateAndTimeInputType.h: (BaseDateAndTimeInputType): Make handleKeydownEvent() protected because a subclass overrides it. * html/DateInputType.cpp: (WebCore::DateInputType::handleKeydownEvent): Open a calendar picker by the down arrow key. * html/DateInputType.h: (DateInputType): Add handleKeydownEvent() declaration. * html/shadow/CalendarPickerElement.h: (CalendarPickerElement): Make openPopup() public because DateInputType calls it. 2012-04-24 Sheriff Bot Unreviewed, rolling out r115099, r115102, and r115127. http://trac.webkit.org/changeset/115099 http://trac.webkit.org/changeset/115102 http://trac.webkit.org/changeset/115127 https://bugs.webkit.org/show_bug.cgi?id=84809 Made html5lib/runner.html crash, spot fix didn't help so rolling out so original author can do over. (Requested by kling on #webkit). * dom/Element.cpp: (WebCore::Element::parserSetAttributes): (WebCore::Element::normalizeAttributes): * dom/Element.h: (Element): * dom/ElementAttributeData.cpp: (WebCore::AttributeVector::removeAttribute): (WebCore): * dom/ElementAttributeData.h: (AttributeVector): (WebCore::AttributeVector::AttributeVector): (WebCore): (WebCore::AttributeVector::getAttributeItem): (WebCore::AttributeVector::getAttributeItemIndex): (WebCore::AttributeVector::insertAttribute): (WebCore::ElementAttributeData::getAttributeItem): (WebCore::ElementAttributeData::getAttributeItemIndex): (WebCore::ElementAttributeData::attributeVector): (WebCore::ElementAttributeData::clonedAttributeVector): (ElementAttributeData): * html/parser/HTMLConstructionSite.cpp: (WebCore::HTMLConstructionSite::createHTMLElementFromSavedElement): * html/parser/HTMLToken.h: (WebCore::AtomicHTMLToken::AtomicHTMLToken): * html/parser/HTMLTreeBuilder.cpp: (WebCore::HTMLTreeBuilder::processFakeStartTag): (WebCore::HTMLTreeBuilder::attributesForIsindexInput): * html/parser/HTMLTreeBuilder.h: * html/parser/TextDocumentParser.cpp: (WebCore::TextDocumentParser::insertFakePreElement): * xml/XMLErrors.cpp: (WebCore::createXHTMLParserErrorHeader): (WebCore::XMLErrors::insertErrorMessageBlock): * xml/parser/MarkupTokenBase.h: (WebCore::AtomicMarkupTokenBase::AtomicMarkupTokenBase): (WebCore::AtomicMarkupTokenBase::getAttributeItem): (WebCore::AtomicMarkupTokenBase::attributes): (AtomicMarkupTokenBase): (WebCore::::initializeAttributes): * xml/parser/XMLToken.h: (WebCore::AtomicXMLToken::AtomicXMLToken): 2012-04-24 Jeffrey Pfau Prevent drag and drop from setting file URLs https://bugs.webkit.org/show_bug.cgi?id=76596 Reviewed by Enrica Casucci. Blacklisted file URLs from being set via dataTransfer.setData for specific types. * platform/mac/ClipboardMac.mm: (WebCore::ClipboardMac::setData): 2012-04-24 Enrica Casucci REGRESSION (r109022) Safari not placing service data on pasteboard. https://bugs.webkit.org/show_bug.cgi?id=84766 The support for OS X services requires that the write operations to the pasteboard occur synchronously. This behavior was changed with r109022. This change removes the original synchronous call to the WebProcess to perform the pasteboard write that had become asynchronous after r109022. It implements instead a synchronous call to retrive the content to be placed in the pasteboard. Reviewed by Alexey Proskuryakov. * WebCore.exp.in: * editing/Editor.h: * editing/mac/EditorMac.mm: (WebCore::Editor::writeSelectionToPasteboard): (WebCore::Editor::stringSelectionForPasteboard): Added. (WebCore::Editor::dataSelectionForPasteboard): Added. * platform/Pasteboard.h: * platform/mac/PasteboardMac.mm: (WebCore::Pasteboard::getStringSelection): Added. (WebCore::Pasteboard::getDataSelection): Added. (WebCore::Pasteboard::writeSelectionForTypes): (WebCore::Pasteboard::writeSelection): 2012-04-24 Dana Jansens [chromium] Image masks are considered opaque incorrectly https://bugs.webkit.org/show_bug.cgi?id=84275 Reviewed by Adrienne Walker. Match the behaviour of SkCanvas layers more closely while tracking opaque paints. SkCanvas layers actually act as a separate device (ie. pixels) and when the layer is popped off, the pixels are copied down to the layer below. While we can use the total clip to decide what pixels the the drawing operation will affect in the final device, the blending down through layers needs to consider each layer carefully. In this case the image mask is drawn into a layer which is copied down using the DestinationIn operation. Since the layer contains non-opaque pixels, the DestinationIn copy can destroy opaque areas in the next layer. We add OpaqueRegionSkia::FillByCopy to distinguish the case where we are copying a block of pixels, and the alpha values are essentially unknown. Unit test: PlatformContextSkiaTest.trackImageMask PlatformContextSkiaTest.trackImageMaskWithOpaqueRect * platform/graphics/skia/OpaqueRegionSkia.cpp: (WebCore::paintIsOpaque): (WebCore::OpaqueRegionSkia::applyOpaqueRegionFromLayer): (WebCore::OpaqueRegionSkia::pushCanvasLayer): (WebCore::OpaqueRegionSkia::popCanvasLayer): (WebCore::OpaqueRegionSkia::didDrawRect): (WebCore::OpaqueRegionSkia::didDrawPath): (WebCore::OpaqueRegionSkia::didDrawPoints): (WebCore::OpaqueRegionSkia::didDrawBounded): (WebCore::OpaqueRegionSkia::didDraw): (WebCore::OpaqueRegionSkia::didDrawUnbounded): (WebCore::OpaqueRegionSkia::markRectAsOpaque): (WebCore::OpaqueRegionSkia::markRectAsNonOpaque): (WebCore::OpaqueRegionSkia::markAllAsNonOpaque): * platform/graphics/skia/OpaqueRegionSkia.h: (OpaqueRegionSkia): (CanvasLayerState): * platform/graphics/skia/PlatformContextSkia.cpp: (WebCore::PlatformContextSkia::restoreLayer): 2012-04-24 Alexandru Chiculita CSS Shaders: Repainting the FECustomFilter requires full source image https://bugs.webkit.org/show_bug.cgi?id=76689 Reviewed by Dean Jackson.. When a pixel of a filtered layer changes we need to update the whole bounding box of the layer and not just the dirty rectangle. That's because the shader might change the color of any of the pixels inside the box. Added tests where a shader is moving and rotating the contents and the actual dirty box of the source image is not the same as the output dirty rectangle. Tests: css3/filters/custom/filter-repaint-custom-clipped.html css3/filters/custom/filter-repaint-custom-rotated.html css3/filters/custom/filter-repaint-custom.html * rendering/FilterEffectRenderer.cpp: (WebCore::FilterEffectRenderer::FilterEffectRenderer): (WebCore::FilterEffectRenderer::build): (WebCore::FilterEffectRenderer::computeSourceImageRectForDirtyRect): * rendering/FilterEffectRenderer.h: (FilterEffectRenderer): (WebCore::FilterEffectRenderer::hasCustomShaderFilter): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::setFilterBackendNeedsRepaintingInRect): 2012-04-24 Alexis Menard Replace occurences of style selector from variables and methods names by style resolver. https://bugs.webkit.org/show_bug.cgi?id=84765 Reviewed by Andreas Kling. Rename methods and variables to follow the new name StyleResolver. It requires to update the local variables, methods parameters, and function names to match the new name and to remove the concept of "selector" to avoid clashing with the CSS concept. The next and last patch will be to rename CSSStyleSelector file and update the includes. No new tests : just renaming the variables and method names. No behavior changes expected. * css/CSSFontSelector.cpp: (WebCore::CSSFontSelector::dispatchInvalidationCallbacks): * css/CSSGradientValue.cpp: (WebCore::CSSGradientValue::addStops): * css/CSSPageRule.cpp: (WebCore::CSSPageRule::setSelectorText): * css/CSSStyleRule.cpp: (WebCore::CSSStyleRule::setSelectorText): * css/CSSStyleSheet.cpp: (WebCore::StyleSheetInternal::styleSheetChanged): * css/MediaQueryEvaluator.cpp: (WebCore::MediaQueryEvaluator::eval): * css/MediaQueryMatcher.cpp: (WebCore::MediaQueryMatcher::prepareEvaluator): (WebCore::MediaQueryMatcher::styleResolverChanged): * css/MediaQueryMatcher.h: (MediaQueryMatcher): * css/PropertySetCSSStyleDeclaration.cpp: (WebCore::StyleRuleCSSStyleDeclaration::setNeedsStyleRecalc): * css/StyleBuilder.cpp: (WebCore::ApplyPropertyExpanding::applyInheritValue): (WebCore::ApplyPropertyExpanding::applyInitialValue): (WebCore::ApplyPropertyExpanding::applyValue): (WebCore::ApplyPropertyDefaultBase::applyInheritValue): (WebCore::ApplyPropertyDefaultBase::applyInitialValue): (WebCore::ApplyPropertyDefault::applyValue): (WebCore::ApplyPropertyNumber::applyValue): (WebCore::ApplyPropertyStyleImage::applyValue): (WebCore::ApplyPropertyAuto::applyInheritValue): (WebCore::ApplyPropertyAuto::applyInitialValue): (WebCore::ApplyPropertyAuto::applyValue): (WebCore::ApplyPropertyClip::convertToLength): (WebCore::ApplyPropertyClip::applyInheritValue): (WebCore::ApplyPropertyClip::applyInitialValue): (WebCore::ApplyPropertyClip::applyValue): (WebCore::ApplyPropertyColor::applyInheritValue): (WebCore::ApplyPropertyColor::applyInitialValue): (WebCore::ApplyPropertyColor::applyValue): (WebCore::ApplyPropertyColor::applyColorValue): (WebCore::ApplyPropertyDirection::applyValue): (WebCore::ApplyPropertyLength::applyValue): (WebCore::ApplyPropertyString::applyValue): (WebCore::ApplyPropertyBorderRadius::applyValue): (WebCore::ApplyPropertyFillLayer::applyInheritValue): (WebCore::ApplyPropertyFillLayer::applyInitialValue): (WebCore::ApplyPropertyFillLayer::applyValue): (WebCore::ApplyPropertyComputeLength::applyValue): (WebCore::ApplyPropertyFont::applyInheritValue): (WebCore::ApplyPropertyFont::applyInitialValue): (WebCore::ApplyPropertyFont::applyValue): (WebCore::ApplyPropertyFontSize::applyInheritValue): (WebCore::ApplyPropertyFontSize::applyInitialValue): (WebCore::ApplyPropertyFontSize::applyValue): (WebCore::ApplyPropertyFontWeight::applyValue): (WebCore::ApplyPropertyFontVariantLigatures::applyInheritValue): (WebCore::ApplyPropertyFontVariantLigatures::applyInitialValue): (WebCore::ApplyPropertyFontVariantLigatures::applyValue): (WebCore::ApplyPropertyBorderImage::applyValue): (WebCore::ApplyPropertyBorderImageModifier::applyInheritValue): (WebCore::ApplyPropertyBorderImageModifier::applyInitialValue): (WebCore::ApplyPropertyBorderImageModifier::applyValue): (WebCore::ApplyPropertyBorderImageSource::applyValue): (WebCore::ApplyPropertyCounter::applyInheritValue): (WebCore::ApplyPropertyCounter::applyValue): (WebCore::ApplyPropertyCursor::applyInheritValue): (WebCore::ApplyPropertyCursor::applyInitialValue): (WebCore::ApplyPropertyCursor::applyValue): (WebCore::ApplyPropertyTextAlign::applyValue): (WebCore::ApplyPropertyTextDecoration::applyValue): (WebCore::ApplyPropertyUnicodeBidi::applyValue): (WebCore::ApplyPropertyLineHeight::applyValue): (WebCore::ApplyPropertyPageSize::applyValue): (WebCore::ApplyPropertyTextEmphasisStyle::applyInheritValue): (WebCore::ApplyPropertyTextEmphasisStyle::applyInitialValue): (WebCore::ApplyPropertyTextEmphasisStyle::applyValue): (WebCore::ApplyPropertyAnimation::map): (WebCore::ApplyPropertyAnimation::applyInheritValue): (WebCore::ApplyPropertyAnimation::applyInitialValue): (WebCore::ApplyPropertyAnimation::applyValue): (WebCore::ApplyPropertyOutlineStyle::applyInheritValue): (WebCore::ApplyPropertyOutlineStyle::applyInitialValue): (WebCore::ApplyPropertyOutlineStyle::applyValue): (WebCore::ApplyPropertyResize::applyValue): (WebCore::ApplyPropertyVerticalAlign::applyValue): (WebCore::ApplyPropertyAspectRatio::applyInheritValue): (WebCore::ApplyPropertyAspectRatio::applyInitialValue): (WebCore::ApplyPropertyAspectRatio::applyValue): (WebCore::ApplyPropertyZoom::resetEffectiveZoom): (WebCore::ApplyPropertyZoom::applyInheritValue): (WebCore::ApplyPropertyZoom::applyInitialValue): (WebCore::ApplyPropertyZoom::applyValue): (WebCore::ApplyPropertyDisplay::isValidDisplayValue): (WebCore::ApplyPropertyDisplay::applyInheritValue): (WebCore::ApplyPropertyDisplay::applyInitialValue): (WebCore::ApplyPropertyDisplay::applyValue): (WebCore::ApplyPropertyFlex::applyInheritValue): (WebCore::ApplyPropertyFlex::applyInitialValue): (WebCore::ApplyPropertyFlex::applyValue): * css/StyleBuilder.h: (WebCore::PropertyHandler::applyInheritValue): (WebCore::PropertyHandler::applyInitialValue): (WebCore::PropertyHandler::applyValue): * css/StyleMedia.cpp: (WebCore::StyleMedia::matchMedium): * dom/Document.cpp: (WebCore::Document::Document): (WebCore::Document::~Document): (WebCore::Document::setDocType): (WebCore::Document::childrenChanged): (WebCore::Document::setContentLanguage): (WebCore::Document::recalcStyle): (WebCore::Document::updateLayoutIgnorePendingStylesheets): (WebCore::Document::styleForElementIgnoringPendingStylesheets): (WebCore::Document::styleForPage): (WebCore::Document::combineCSSFeatureFlags): (WebCore::Document::resetCSSFeatureFlags): (WebCore::Document::createStyleResolver): (WebCore::Document::clearStyleResolver): (WebCore::Document::clearPageUserSheet): (WebCore::Document::updatePageUserSheet): (WebCore::Document::clearPageGroupUserSheets): (WebCore::Document::updatePageGroupUserSheets): (WebCore::Document::addUserSheet): (WebCore::Document::processHttpEquiv): (WebCore::Document::setSelectedStylesheetSet): (WebCore::Document::removePendingSheet): (WebCore::Document::evaluateMediaQueryList): (WebCore::Document::styleResolverChanged): (WebCore::Document::analyzeStylesheetChange): (WebCore::Document::updateActiveStylesheets): * dom/Document.h: (WebCore::Document::styleResolverIfExists): (WebCore::Document::styleResolver): (Document): * dom/Element.cpp: (WebCore::StyleResolverParentPusher::StyleResolverParentPusher): (WebCore::StyleResolverParentPusher::push): (WebCore::StyleResolverParentPusher::~StyleResolverParentPusher): (StyleResolverParentPusher): (WebCore::Element::attributeChanged): (WebCore::Element::attach): (WebCore::Element::styleForRenderer): (WebCore::Element::recalcStyle): (WebCore::Element::beginParsingChildren): (WebCore::Element::finishParsingChildren): * dom/ProcessingInstruction.cpp: (WebCore::ProcessingInstruction::removedFrom): * dom/ShadowRoot.cpp: (WebCore::ShadowRoot::attach): * dom/ShadowTree.cpp: (WebCore::ShadowTree::recalcShadowTreeStyle): * dom/StyleElement.cpp: (WebCore::StyleElement::removedFromDocument): * editing/EditingStyle.cpp: (WebCore::styleFromMatchedRulesForElement): * history/CachedPage.cpp: (WebCore::CachedPage::restore): * html/HTMLCanvasElement.cpp: (WebCore::HTMLCanvasElement::styleResolver): * html/HTMLCanvasElement.h: (HTMLCanvasElement): * html/HTMLLinkElement.cpp: (WebCore::HTMLLinkElement::setDisabledState): (WebCore::HTMLLinkElement::process): (WebCore::HTMLLinkElement::removedFrom): (WebCore::HTMLLinkElement::removePendingSheet): * html/HTMLStyleElement.cpp: (WebCore::HTMLStyleElement::registerWithScopingNode): (WebCore::HTMLStyleElement::unregisterWithScopingNode): * html/canvas/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::setFont): * inspector/InspectorCSSAgent.cpp: (WebCore::InspectorCSSAgent::recalcStyleForPseudoStateIfNeeded): (WebCore::InspectorCSSAgent::getMatchedStylesForNode): (WebCore::InspectorCSSAgent::buildArrayForRuleList): (WebCore::InspectorCSSAgent::clearPseudoState): * inspector/InspectorPageAgent.cpp: (WebCore::InspectorPageAgent::updateViewMetrics): * page/DOMWindow.cpp: (WebCore::DOMWindow::getMatchedCSSRules): * page/Frame.cpp: (WebCore::Frame::setPrinting): * page/FrameView.cpp: (WebCore::FrameView::layout): * page/Page.cpp: (WebCore::Page::setViewMode): (WebCore::Page::setNeedsRecalcStyleInAllFrames): (WebCore::Page::allVisitedStateChanged): (WebCore::Page::visitedStateChanged): * page/animation/KeyframeAnimation.cpp: (WebCore::KeyframeAnimation::KeyframeAnimation): * platform/efl/RenderThemeEfl.cpp: (WebCore::RenderThemeEfl::adjustSliderTrackStyle): (WebCore::RenderThemeEfl::adjustSliderThumbStyle): (WebCore::RenderThemeEfl::adjustCheckboxStyle): (WebCore::RenderThemeEfl::adjustRadioStyle): (WebCore::RenderThemeEfl::adjustButtonStyle): (WebCore::RenderThemeEfl::adjustMenuListStyle): (WebCore::RenderThemeEfl::adjustMenuListButtonStyle): (WebCore::RenderThemeEfl::adjustTextFieldStyle): (WebCore::RenderThemeEfl::adjustTextAreaStyle): (WebCore::RenderThemeEfl::adjustSearchFieldDecorationStyle): (WebCore::RenderThemeEfl::adjustSearchFieldResultsButtonStyle): (WebCore::RenderThemeEfl::adjustSearchFieldResultsDecorationStyle): (WebCore::RenderThemeEfl::adjustSearchFieldCancelButtonStyle): (WebCore::RenderThemeEfl::adjustSearchFieldStyle): (WebCore::RenderThemeEfl::adjustProgressBarStyle): * platform/gtk/RenderThemeGtk.cpp: (WebCore::RenderThemeGtk::adjustButtonStyle): (WebCore::RenderThemeGtk::adjustMenuListStyle): (WebCore::RenderThemeGtk::adjustMenuListButtonStyle): (WebCore::RenderThemeGtk::adjustSearchFieldResultsButtonStyle): (WebCore::RenderThemeGtk::adjustSearchFieldResultsDecorationStyle): (WebCore::RenderThemeGtk::adjustSearchFieldCancelButtonStyle): (WebCore::RenderThemeGtk::adjustSearchFieldStyle): (WebCore::RenderThemeGtk::adjustSliderThumbStyle): * platform/qt/RenderThemeQt.cpp: (WebCore::RenderThemeQt::adjustSliderThumbStyle): (WebCore::RenderThemeQt::adjustSearchFieldStyle): (WebCore::RenderThemeQt::adjustSearchFieldCancelButtonStyle): (WebCore::RenderThemeQt::adjustSearchFieldDecorationStyle): (WebCore::RenderThemeQt::adjustSearchFieldResultsDecorationStyle): (WebCore::RenderThemeQt::adjustInnerSpinButtonStyle): * platform/qt/RenderThemeQtMobile.cpp: (WebCore::RenderThemeQtMobile::adjustButtonStyle): (WebCore::RenderThemeQtMobile::adjustMenuListStyle): * platform/wx/RenderThemeWx.cpp: (WebCore::RenderThemeWx::adjustButtonStyle): * rendering/RenderListBox.cpp: (WebCore::RenderListBox::updateFromElement): (WebCore::RenderListBox::paintItemForeground): * rendering/RenderMenuList.cpp: (WebCore::RenderMenuList::fontSelector): * rendering/RenderObject.cpp: (WebCore::RenderObject::getUncachedPseudoStyle): * rendering/RenderRegion.cpp: (WebCore::RenderRegion::styleDidChange): (WebCore::RenderRegion::computeStyleInRegion): * rendering/RenderTextControlSingleLine.cpp: (WebCore::RenderTextControlSingleLine::fontSelector): * rendering/RenderTheme.cpp: (WebCore::RenderTheme::adjustStyle): (WebCore::RenderTheme::adjustInputFieldSpeechButtonStyle): * rendering/RenderThemeChromiumSkia.cpp: (WebCore::RenderThemeChromiumSkia::adjustMenuListStyle): (WebCore::RenderThemeChromiumSkia::adjustMenuListButtonStyle): * rendering/RenderThemeMac.mm: (WebCore::RenderThemeMac::adjustMenuListStyle): (WebCore::RenderThemeMac::adjustSliderThumbStyle): (WebCore::RenderThemeMac::adjustSearchFieldStyle): * rendering/RenderThemeSafari.cpp: (WebCore::RenderThemeSafari::setFontFromControlSize): (WebCore::RenderThemeSafari::adjustButtonStyle): (WebCore::RenderThemeSafari::adjustMenuListStyle): (WebCore::RenderThemeSafari::adjustMenuListButtonStyle): (WebCore::RenderThemeSafari::adjustSliderThumbStyle): (WebCore::RenderThemeSafari::adjustSearchFieldStyle): (WebCore::RenderThemeSafari::adjustSearchFieldCancelButtonStyle): (WebCore::RenderThemeSafari::adjustSearchFieldDecorationStyle): (WebCore::RenderThemeSafari::adjustSearchFieldResultsDecorationStyle): (WebCore::RenderThemeSafari::adjustSearchFieldResultsButtonStyle): * rendering/RenderThemeWin.cpp: (WebCore::RenderThemeWin::adjustInnerSpinButtonStyle): (WebCore::RenderThemeWin::adjustMenuListStyle): (WebCore::RenderThemeWin::adjustMenuListButtonStyle): (WebCore::RenderThemeWin::adjustSearchFieldStyle): (WebCore::RenderThemeWin::adjustSearchFieldCancelButtonStyle): (WebCore::RenderThemeWin::adjustSearchFieldDecorationStyle): (WebCore::RenderThemeWin::adjustSearchFieldResultsDecorationStyle): (WebCore::RenderThemeWin::adjustSearchFieldResultsButtonStyle): * rendering/RenderThemeWinCE.cpp: (WebCore::RenderThemeWinCE::adjustMenuListStyle): (WebCore::RenderThemeWinCE::adjustSearchFieldStyle): (WebCore::RenderThemeWinCE::adjustSearchFieldCancelButtonStyle): (WebCore::RenderThemeWinCE::adjustSearchFieldDecorationStyle): (WebCore::RenderThemeWinCE::adjustSearchFieldResultsDecorationStyle): (WebCore::RenderThemeWinCE::adjustSearchFieldResultsButtonStyle): (WebCore::RenderThemeWinCE::adjustMenuListButtonStyle): * rendering/style/StyleGeneratedImage.cpp: (WebCore::StyleGeneratedImage::image): * rendering/svg/RenderSVGInlineText.cpp: (WebCore::RenderSVGInlineText::computeNewScaledFontForStyle): * svg/SVGElement.cpp: (WebCore::SVGElement::customStyleForRenderer): * svg/SVGFontFaceElement.cpp: (WebCore::SVGFontFaceElement::rebuildFontFace): (WebCore::SVGFontFaceElement::removedFrom): * xml/XMLTreeViewer.cpp: (WebCore::XMLTreeViewer::transformDocumentToTreeView): * xml/parser/XMLDocumentParser.cpp: (WebCore::XMLDocumentParser::end): * xml/parser/XMLDocumentParserLibxml2.cpp: (WebCore::XMLDocumentParser::doEnd): * xml/parser/XMLDocumentParserQt.cpp: (WebCore::XMLDocumentParser::doEnd): * WebCore.exp.in: 2012-04-24 Yael Aharon Fixed background is scrolling in http://www.nieuwecode.nl/ in Qt webkit2 https://bugs.webkit.org/show_bug.cgi?id=83980 Reviewed by Simon Fraser. When a fixed position element does not have z-index explicitly specified, it does not create a stacking context. This results in fixed elements scrolling with the content layer. This patch creates a stacking context for fixed positioned elements for the Qt port, by enabling the flag ENABLE_FIXED_POSITION_CREATES_STACKING_CONTEXT. Added a manual test because this patch takes effect only during scrolling. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::collectMatchingRulesForList): 2012-04-24 Andreas Kling REGRESSION(r115099): html5lib/runner.html crashes. Reviewed by Anders Carlsson. Unbreak and simplify the code that filters attributes on isindex elements. It's perfectly safe to remove elements from a Vector while iterating over it. * html/parser/HTMLTreeBuilder.cpp: (WebCore::HTMLTreeBuilder::attributesForIsindexInput): 2012-04-24 Victor Carbune Extra display logic for the media control panel element https://bugs.webkit.org/show_bug.cgi?id=82476 Reviewed by Eric Carlson. This patch fixes a bug which caused the controls to be displayed when they should remain hidden. Added an extra variable to the panel elements which properly keeps the state of the panel (visible or not). Test: media/video-controls-toggling.html * html/shadow/MediaControlElements.cpp: (WebCore::MediaControlPanelElement::MediaControlPanelElement): Added the variable m_isDisplayed to hold the state whether the panel is visible or not. (WebCore::MediaControlPanelElement::makeOpaque): Showing the panel only if it is visible. (WebCore::MediaControlPanelElement::makeTransparent): Enabled the transition timer which sets the display:none property on the controls. (WebCore::MediaControlPanelElement::setIsDisplayed): Setter for the state variable. (WebCore): * html/shadow/MediaControlElements.h: (MediaControlPanelElement): * html/shadow/MediaControlRootElement.cpp: (WebCore::MediaControlRootElement::show): Updated the panel visibility state. (WebCore::MediaControlRootElement::hide): Updated the panel visibility state. * html/shadow/MediaControlRootElementChromium.cpp: (WebCore::MediaControlRootElementChromium::show): Updated the panel visibility state. (WebCore::MediaControlRootElementChromium::hide): Updated the panel visibility state. 2012-04-24 Alexandru Chiculita CSS Shaders: Custom filters painting is broken https://bugs.webkit.org/show_bug.cgi?id=82803 Reviewed by Kenneth Russell. In this patch I moved CSS Shaders file loading notifications from FilterEffectRenderer to the new RenderLayerFilterInfo. That's because FilterEffectRenderer is only used when running the filters in the software pipeline and has a very short lifetime. Due to a recent change FilterEffectRenderer actually gets deleted if the shader is not loaded, so it doesn't live that much to be notified when the shader was actually loaded. Also removed the FilterEffectObserver, that was only used to notify the RenderLayer about the loaded shader. No new tests. This is making existing CSS Shaders tests pass again. Cannot un-skip on Mac for now because the feature is compile time disabled. * WebCore.xcodeproj/project.pbxproj: * platform/graphics/filters/CustomFilterOperation.h: (WebCore::CustomFilterOperation::affectsOpacity): (WebCore::CustomFilterOperation::movesPixels): * platform/graphics/filters/FilterOperations.cpp: (WebCore): (WebCore::FilterOperations::hasCustomFilter): * platform/graphics/filters/FilterOperations.h: (FilterOperations): * platform/graphics/texmap/TextureMapperImageBuffer.cpp: (WebCore::BitmapTextureImageBuffer::applyFilters): * rendering/FilterEffectObserver.h: Removed. * rendering/FilterEffectRenderer.cpp: (WebCore::FilterEffectRenderer::FilterEffectRenderer): (WebCore::FilterEffectRenderer::~FilterEffectRenderer): (WebCore::FilterEffectRenderer::build): * rendering/FilterEffectRenderer.h: (WebCore): (WebCore::FilterEffectRenderer::create): (FilterEffectRenderer): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::updateOrRemoveFilterEffect): * rendering/RenderLayer.h: * rendering/RenderLayerFilterInfo.cpp: (WebCore::RenderLayerFilterInfo::~RenderLayerFilterInfo): (WebCore::RenderLayerFilterInfo::notifyCustomFilterProgramLoaded): (WebCore): (WebCore::RenderLayerFilterInfo::updateCustomFilterClients): (WebCore::RenderLayerFilterInfo::removeCustomFilterClients): * rendering/RenderLayerFilterInfo.h: (WebCore): (RenderLayerFilterInfo): 2012-04-24 Antti Koivisto Another build fix. Not reviewed. * css/MediaList.cpp: (WebCore::MediaQuerySet::MediaQuerySet): * css/StylePropertySet.cpp: (WebCore::StylePropertySet::StylePropertySet): 2012-04-24 Antti Koivisto Try to fix Qt build. Not reviewed. * css/StyleRule.h: (WebCore::StyleRuleBase::StyleRuleBase): 2012-04-24 Antti Koivisto Implement StyleRule copying https://bugs.webkit.org/show_bug.cgi?id=84752 Reviewed by Andreas Kling. We'll need this for copy-on-write when style sheet data is shared between documents. Implement copy() and copy constructor for style rules their children as needed. The code is not yet used. * css/CSSSelectorList.cpp: (WebCore::CSSSelectorList::CSSSelectorList): (WebCore): * css/CSSSelectorList.h: (CSSSelectorList): * css/MediaList.h: (WebCore::MediaQuerySet::copy): (MediaQuerySet): * css/MediaQuery.cpp: (WebCore::MediaQuery::MediaQuery): (WebCore): * css/MediaQuery.h: (MediaQuery): (WebCore::MediaQuery::copy): * css/MediaQueryExp.h: (WebCore::MediaQueryExp::copy): (MediaQueryExp): * css/StylePropertySet.cpp: (WebCore::StylePropertySet::StylePropertySet): (WebCore): (WebCore::StylePropertySet::copy): * css/StylePropertySet.h: Make this copy parse mode too. As a result ElementAttributeData no longer needs to set it explicitly after copying. (StylePropertySet): * css/StyleRule.cpp: (WebCore::StyleRuleBase::copy): (WebCore): (WebCore::StyleRule::StyleRule): (WebCore::StyleRulePage::StyleRulePage): (WebCore::StyleRuleFontFace::StyleRuleFontFace): (WebCore::StyleRuleBlock::StyleRuleBlock): (WebCore::StyleRuleMedia::StyleRuleMedia): (WebCore::StyleRuleRegion::StyleRuleRegion): * css/StyleRule.h: (StyleRuleBase): (WebCore::StyleRuleBase::StyleRuleBase): (WebCore::StyleRule::copy): (StyleRule): (WebCore::StyleRuleFontFace::copy): (StyleRuleFontFace): (WebCore::StyleRulePage::copy): (StyleRulePage): (StyleRuleBlock): (WebCore::StyleRuleMedia::copy): (StyleRuleMedia): (WebCore::StyleRuleRegion::copy): (StyleRuleRegion): * css/WebKitCSSKeyframesRule.cpp: (WebCore): (WebCore::StyleRuleKeyframes::StyleRuleKeyframes): * css/WebKitCSSKeyframesRule.h: (WebCore): (WebCore::StyleRuleKeyframes::copy): (StyleRuleKeyframes): 2012-04-24 Ryosuke Niwa Revert r115009; It doesn't make necessary changes to NodeRareData and Node. * CMakeLists.txt: * DerivedSources.cpp: * DerivedSources.make: * DerivedSources.pri: * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSHTMLCollectionCustom.cpp: (WebCore::getNamedItems): * bindings/scripts/CodeGeneratorJS.pm: (GenerateImplementation): * bindings/v8/custom/V8HTMLCollectionCustom.cpp: (WebCore::getNamedItems): * html/CollectionType.h: * html/HTMLCollection.cpp: (WebCore::HTMLCollection::shouldIncludeChildren): (WebCore::HTMLCollection::isAcceptableElement): * html/HTMLFormCollection.cpp: (WebCore::HTMLFormCollection::HTMLFormCollection): * html/RadioNodeList.cpp: Removed. * html/RadioNodeList.h: Removed. * html/RadioNodeList.idl: Removed. 2012-04-24 Chris Rogers WaveTable should normalize to 0dbFS instead of -6dbFS https://bugs.webkit.org/show_bug.cgi?id=84644 Reviewed by Kenneth Russell. No new tests. Oscillator tests will be rebaselined after landing, since several platforms are affected. * Modules/webaudio/WaveTable.cpp: (WebCore::WaveTable::createBandLimitedTables): 2012-04-24 Tommy Widenflycht MediaStream API: Create a new flag for PeerConnection https://bugs.webkit.org/show_bug.cgi?id=84723 Reviewed by Dimitri Glazkov. To allow Chrome to make the GetUserMedia functionality available by default we need another flag for the PeerConnection related parts. This new flag is in addition to the general media stream flag, and both need to be enabled for PeerConnection object creation. No code behavior changes. * bindings/generic/RuntimeEnabledFeatures.cpp: (WebCore): * bindings/generic/RuntimeEnabledFeatures.h: (RuntimeEnabledFeatures): (WebCore::RuntimeEnabledFeatures::peerConnectionEnabled): (WebCore::RuntimeEnabledFeatures::setPeerConnectionEnabled): (WebCore::RuntimeEnabledFeatures::webkitDeprecatedPeerConnectionEnabled): (WebCore::RuntimeEnabledFeatures::webkitPeerConnection00Enabled): 2012-04-24 Joe Mason [BlackBerry] Revert broken changes to authentication dialog https://bugs.webkit.org/show_bug.cgi?id=80135 Reviewed by Antonio Gomes. The previous patches from this bug caused an infinite loop when using digest auth; apparently they were only tested with basic. * platform/blackberry/PageClientBlackBerry.h: * platform/network/blackberry/NetworkJob.cpp: (WebCore::NetworkJob::handleAuthHeader): (WebCore::NetworkJob::sendRequestWithCredentials): 2012-04-24 Caio Marcelo de Oliveira Filho Fix wrong ASSERT() in findAttributeInVector() https://bugs.webkit.org/show_bug.cgi?id=84756 Unreviewed build fix. * dom/ElementAttributeData.h: (WebCore::findAttributeInVector): 2012-04-24 Anders Carlsson Update the scroll layer position on the main thread when viewing full-frame images https://bugs.webkit.org/show_bug.cgi?id=84754 Reviewed by Andreas Kling. Showing really big images can be slow sometimes and in that case it's better to update the scroll layer position on the main thread, which will avoid flashing white. * page/scrolling/ScrollingCoordinator.cpp: (WebCore::ScrollingCoordinator::updateShouldUpdateScrollLayerPositionOnMainThread): 2012-04-24 Caio Marcelo de Oliveira Filho Use Vector directly instead of encapsulating it in AttributeVector https://bugs.webkit.org/show_bug.cgi?id=84413 Reviewed by Andreas Kling. As commented in https://bugs.webkit.org/show_bug.cgi?id=79963#c16 we do not usually subclass basic types like Vector. This patch changes code to use Vector directly and move around the functionality of the former methods to more specific helper functions or inline code at the callers. * dom/Element.cpp: (WebCore::Element::parserSetAttributes): (WebCore::Element::normalizeAttributes): * dom/Element.h: (Element): * dom/ElementAttributeData.cpp: * dom/ElementAttributeData.h: (WebCore::getAttributeFromVector): (WebCore::ElementAttributeData::getAttributeItem): (ElementAttributeData): (WebCore::ElementAttributeData::attributeVector): (WebCore::ElementAttributeData::clonedAttributeVector): (WebCore::ElementAttributeData::getAttributeItemIndex): (WebCore): * html/parser/HTMLConstructionSite.cpp: (WebCore::HTMLConstructionSite::createHTMLElementFromSavedElement): * html/parser/HTMLToken.h: (WebCore::AtomicHTMLToken::AtomicHTMLToken): * html/parser/HTMLTreeBuilder.cpp: (WebCore::HTMLTreeBuilder::processFakeStartTag): (WebCore::HTMLTreeBuilder::attributesForIsindexInput): * html/parser/HTMLTreeBuilder.h: * html/parser/TextDocumentParser.cpp: (WebCore::TextDocumentParser::insertFakePreElement): * xml/XMLErrors.cpp: (WebCore::createXHTMLParserErrorHeader): (WebCore::XMLErrors::insertErrorMessageBlock): * xml/parser/MarkupTokenBase.h: (WebCore::AtomicMarkupTokenBase::AtomicMarkupTokenBase): (WebCore::AtomicMarkupTokenBase::getAttributeItem): (WebCore::AtomicMarkupTokenBase::attributes): (AtomicMarkupTokenBase): (WebCore::::initializeAttributes): * xml/parser/XMLToken.h: (WebCore::AtomicXMLToken::AtomicXMLToken): 2012-04-24 Alexis Menard Rename CSSStyleSelector class to StyleResolver. https://bugs.webkit.org/show_bug.cgi?id=84734 Reviewed by Andreas Kling. The name CSSStyleSelector is confusing as it conflicts a bit with the CSS concept of selectors. One could think it's an encapsulation of the CSS selectors but it's not, in fact this class is responsible of finding the RenderStyle for a given element. This is the first patch as I will later rename the files, and then rename the local variables. No new tests : renaming, no behavior changes should appear. * css/CSSCalculationValue.cpp: (WebCore::CSSCalcPrimitiveValue::toCalcValue): * css/CSSFontSelector.cpp: (WebCore::CSSFontSelector::dispatchInvalidationCallbacks): * css/CSSParser.cpp: (WebCore::CSSParser::parseSizeParameter): * css/CSSStyleSelector.cpp: (RuleSet): (WebCore::RuleSet::features): (WebCore): (WebCore::StyleResolver::StyleResolver): (WebCore::StyleResolver::addAuthorRulesAndCollectUserRulesFromSheets): (WebCore::makeRuleSet): (WebCore::StyleResolver::collectFeatures): (WebCore::StyleResolver::determineScope): (WebCore::StyleResolver::ruleSetForScope): (WebCore::StyleResolver::appendAuthorStylesheets): (WebCore::StyleResolver::setupScopeStack): (WebCore::StyleResolver::pushScope): (WebCore::StyleResolver::popScope): (WebCore::StyleResolver::pushParentElement): (WebCore::StyleResolver::popParentElement): (WebCore::StyleResolver::pushParentShadowRoot): (WebCore::StyleResolver::popParentShadowRoot): (WebCore::StyleResolver::addKeyframeStyle): (WebCore::StyleResolver::~StyleResolver): (WebCore::StyleResolver::sweepMatchedPropertiesCache): (WebCore::StyleResolver::Features::Features): (WebCore::StyleResolver::Features::~Features): (WebCore::StyleResolver::Features::add): (WebCore::StyleResolver::Features::clear): (WebCore::StyleResolver::addMatchedProperties): (WebCore::StyleResolver::addElementStyleProperties): (WebCore::StyleResolver::collectMatchingRules): (WebCore::StyleResolver::collectMatchingRulesForRegion): (WebCore::StyleResolver::sortAndTransferMatchedRules): (WebCore::StyleResolver::matchScopedAuthorRules): (WebCore::StyleResolver::matchAuthorRules): (WebCore::StyleResolver::matchUserRules): (WebCore::StyleResolver::matchUARules): (WebCore::StyleResolver::collectMatchingRulesForList): * css/CSSStyleSelector.h: (StyleResolver): (Features): * css/MediaQueryEvaluator.cpp: (WebCore::MediaQueryEvaluator::eval): * css/MediaQueryEvaluator.h: (WebCore): (MediaQueryEvaluator): * css/MediaQueryMatcher.cpp: (WebCore::MediaQueryMatcher::prepareEvaluator): * css/SVGCSSStyleSelector.cpp: (WebCore::StyleResolver::applySVGProperty): * css/StyleBuilder.cpp: (WebCore::ApplyPropertyExpanding::applyInheritValue): (WebCore::ApplyPropertyExpanding::applyInitialValue): (WebCore::ApplyPropertyExpanding::applyValue): (WebCore::ApplyPropertyDefaultBase::applyInheritValue): (WebCore::ApplyPropertyDefaultBase::applyInitialValue): (WebCore::ApplyPropertyDefaultBase::applyValue): (WebCore::ApplyPropertyDefault::applyValue): (WebCore::ApplyPropertyNumber::applyValue): (WebCore::ApplyPropertyStyleImage::applyValue): (WebCore::ApplyPropertyAuto::applyInheritValue): (WebCore::ApplyPropertyAuto::applyInitialValue): (WebCore::ApplyPropertyAuto::applyValue): (WebCore::ApplyPropertyClip::convertToLength): (WebCore::ApplyPropertyClip::applyInheritValue): (WebCore::ApplyPropertyClip::applyInitialValue): (WebCore::ApplyPropertyClip::applyValue): (WebCore::ApplyPropertyColor::applyInheritValue): (WebCore::ApplyPropertyColor::applyInitialValue): (WebCore::ApplyPropertyColor::applyValue): (WebCore::ApplyPropertyColor::applyColorValue): (WebCore::ApplyPropertyDirection::applyValue): (WebCore::ApplyPropertyLength::applyValue): (WebCore::ApplyPropertyString::applyValue): (WebCore::ApplyPropertyBorderRadius::applyValue): (WebCore::ApplyPropertyFillLayer::applyInheritValue): (WebCore::ApplyPropertyFillLayer::applyInitialValue): (WebCore::ApplyPropertyFillLayer::applyValue): (WebCore::ApplyPropertyComputeLength::applyValue): (WebCore::ApplyPropertyFont::applyInheritValue): (WebCore::ApplyPropertyFont::applyInitialValue): (WebCore::ApplyPropertyFont::applyValue): (WebCore::ApplyPropertyFontSize::applyInheritValue): (WebCore::ApplyPropertyFontSize::applyInitialValue): (WebCore::ApplyPropertyFontSize::applyValue): (WebCore::ApplyPropertyFontWeight::applyValue): (WebCore::ApplyPropertyFontVariantLigatures::applyInheritValue): (WebCore::ApplyPropertyFontVariantLigatures::applyInitialValue): (WebCore::ApplyPropertyFontVariantLigatures::applyValue): (WebCore::ApplyPropertyBorderImage::applyValue): (WebCore::ApplyPropertyBorderImageModifier::applyInheritValue): (WebCore::ApplyPropertyBorderImageModifier::applyInitialValue): (WebCore::ApplyPropertyBorderImageModifier::applyValue): (WebCore::ApplyPropertyBorderImageSource::applyValue): (WebCore::ApplyPropertyCounter::emptyFunction): (WebCore::ApplyPropertyCounter::applyInheritValue): (WebCore::ApplyPropertyCounter::applyValue): (WebCore::ApplyPropertyCursor::applyInheritValue): (WebCore::ApplyPropertyCursor::applyInitialValue): (WebCore::ApplyPropertyCursor::applyValue): (WebCore::ApplyPropertyTextAlign::applyValue): (WebCore::ApplyPropertyTextDecoration::applyValue): (WebCore::ApplyPropertyUnicodeBidi::applyValue): (WebCore::ApplyPropertyLineHeight::applyValue): (WebCore::ApplyPropertyPageSize::applyInheritValue): (WebCore::ApplyPropertyPageSize::applyInitialValue): (WebCore::ApplyPropertyPageSize::applyValue): (WebCore::ApplyPropertyTextEmphasisStyle::applyInheritValue): (WebCore::ApplyPropertyTextEmphasisStyle::applyInitialValue): (WebCore::ApplyPropertyTextEmphasisStyle::applyValue): (WebCore): (WebCore::ApplyPropertyAnimation::map): (WebCore::ApplyPropertyAnimation::applyInheritValue): (WebCore::ApplyPropertyAnimation::applyInitialValue): (WebCore::ApplyPropertyAnimation::applyValue): (WebCore::ApplyPropertyOutlineStyle::applyInheritValue): (WebCore::ApplyPropertyOutlineStyle::applyInitialValue): (WebCore::ApplyPropertyOutlineStyle::applyValue): (WebCore::ApplyPropertyResize::applyValue): (WebCore::ApplyPropertyVerticalAlign::applyValue): (WebCore::ApplyPropertyAspectRatio::applyInheritValue): (WebCore::ApplyPropertyAspectRatio::applyInitialValue): (WebCore::ApplyPropertyAspectRatio::applyValue): (WebCore::ApplyPropertyZoom::resetEffectiveZoom): (WebCore::ApplyPropertyZoom::applyInheritValue): (WebCore::ApplyPropertyZoom::applyInitialValue): (WebCore::ApplyPropertyZoom::applyValue): (WebCore::ApplyPropertyDisplay::isValidDisplayValue): (WebCore::ApplyPropertyDisplay::applyInheritValue): (WebCore::ApplyPropertyDisplay::applyInitialValue): (WebCore::ApplyPropertyDisplay::applyValue): (WebCore::ApplyPropertyFlex::applyInheritValue): (WebCore::ApplyPropertyFlex::applyInitialValue): (WebCore::ApplyPropertyFlex::applyValue): (WebCore::StyleBuilder::StyleBuilder): * css/StyleBuilder.h: (WebCore): (PropertyHandler): (WebCore::PropertyHandler::applyInheritValue): (WebCore::PropertyHandler::applyInitialValue): (WebCore::PropertyHandler::applyValue): * css/StyleMedia.cpp: (WebCore::StyleMedia::matchMedium): * css/WebKitCSSKeyframesRule.cpp: (WebCore::WebKitCSSKeyframesRule::setName): * css/WebKitCSSMatrix.cpp: (WebCore::WebKitCSSMatrix::setMatrixValue): * dom/Document.cpp: (WebCore::Document::recalcStyle): (WebCore::Document::createStyleSelector): (WebCore::Document::testAddedStylesheetRequiresStyleRecalc): * dom/Document.h: (WebCore): (WebCore::Document::styleSelectorIfExists): (WebCore::Document::styleSelector): (Document): * dom/Element.cpp: (StyleSelectorParentPusher): (WebCore::Element::attributeChanged): (WebCore::Element::beginParsingChildren): (WebCore::Element::finishParsingChildren): * dom/ShadowRoot.cpp: (WebCore::ShadowRoot::attach): * dom/ShadowTree.cpp: (WebCore::ShadowTree::recalcShadowTreeStyle): * editing/EditingStyle.cpp: (WebCore::EditingStyle::mergeStyleFromRules): (WebCore::EditingStyle::removeStyleFromRulesAndContext): (WebCore::EditingStyle::removePropertiesInElementDefaultStyle): (WebCore::legacyFontSizeFromCSSValue): * editing/FrameSelection.cpp: (WebCore::FrameSelection::focusedOrActiveStateChanged): * history/CachedPage.cpp: (WebCore::CachedPage::restore): * html/HTMLCanvasElement.cpp: (WebCore::HTMLCanvasElement::styleSelector): * html/HTMLCanvasElement.h: (HTMLCanvasElement): * html/HTMLLinkElement.cpp: (WebCore::HTMLLinkElement::process): * html/canvas/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::setFont): * inspector/InspectorCSSAgent.cpp: (WebCore::InspectorCSSAgent::getMatchedStylesForNode): (WebCore::InspectorCSSAgent::buildArrayForRuleList): * inspector/InspectorCSSAgent.h: (InspectorCSSAgent): * page/DOMWindow.cpp: (WebCore::DOMWindow::getMatchedCSSRules): * page/Page.cpp: (WebCore::Page::allVisitedStateChanged): (WebCore::Page::visitedStateChanged): * page/animation/AnimationController.cpp: (WebCore::AnimationController::updateAnimations): * platform/blackberry/RenderThemeBlackBerry.cpp: (WebCore::RenderThemeBlackBerry::adjustButtonStyle): (WebCore::RenderThemeBlackBerry::adjustTextAreaStyle): (WebCore::RenderThemeBlackBerry::adjustTextFieldStyle): (WebCore::RenderThemeBlackBerry::adjustSearchFieldStyle): (WebCore::RenderThemeBlackBerry::adjustSearchFieldCancelButtonStyle): (WebCore::RenderThemeBlackBerry::adjustMenuListButtonStyle): (WebCore::RenderThemeBlackBerry::adjustMenuListStyle): (WebCore::RenderThemeBlackBerry::adjustCheckboxStyle): (WebCore::RenderThemeBlackBerry::adjustRadioStyle): * platform/blackberry/RenderThemeBlackBerry.h: (RenderThemeBlackBerry): * platform/efl/RenderThemeEfl.cpp: (WebCore::RenderThemeEfl::adjustSliderTrackStyle): (WebCore::RenderThemeEfl::adjustSliderThumbStyle): (WebCore::RenderThemeEfl::adjustCheckboxStyle): (WebCore::RenderThemeEfl::adjustRadioStyle): (WebCore::RenderThemeEfl::adjustButtonStyle): (WebCore::RenderThemeEfl::adjustMenuListStyle): (WebCore::RenderThemeEfl::adjustMenuListButtonStyle): (WebCore::RenderThemeEfl::adjustTextFieldStyle): (WebCore::RenderThemeEfl::adjustTextAreaStyle): (WebCore::RenderThemeEfl::adjustSearchFieldDecorationStyle): (WebCore::RenderThemeEfl::adjustSearchFieldResultsButtonStyle): (WebCore::RenderThemeEfl::adjustSearchFieldResultsDecorationStyle): (WebCore::RenderThemeEfl::adjustSearchFieldCancelButtonStyle): (WebCore::RenderThemeEfl::adjustSearchFieldStyle): (WebCore::RenderThemeEfl::adjustProgressBarStyle): * platform/efl/RenderThemeEfl.h: (RenderThemeEfl): * platform/gtk/RenderThemeGtk.cpp: (WebCore::RenderThemeGtk::adjustButtonStyle): (WebCore::RenderThemeGtk::adjustMenuListStyle): (WebCore::RenderThemeGtk::adjustMenuListButtonStyle): (WebCore::RenderThemeGtk::adjustSearchFieldResultsButtonStyle): (WebCore::RenderThemeGtk::adjustSearchFieldResultsDecorationStyle): (WebCore::RenderThemeGtk::adjustSearchFieldCancelButtonStyle): (WebCore::RenderThemeGtk::adjustSearchFieldStyle): (WebCore::RenderThemeGtk::adjustSliderTrackStyle): (WebCore::RenderThemeGtk::adjustSliderThumbStyle): (WebCore::RenderThemeGtk::adjustProgressBarStyle): * platform/gtk/RenderThemeGtk.h: (RenderThemeGtk): * platform/gtk/RenderThemeGtk2.cpp: (WebCore::RenderThemeGtk::adjustInnerSpinButtonStyle): * platform/gtk/RenderThemeGtk3.cpp: (WebCore::RenderThemeGtk::adjustInnerSpinButtonStyle): * platform/qt/RenderThemeQt.cpp: (WebCore::RenderThemeQt::adjustTextFieldStyle): (WebCore::RenderThemeQt::adjustTextAreaStyle): (WebCore::RenderThemeQt::adjustMenuListStyle): (WebCore::RenderThemeQt::adjustMenuListButtonStyle): (WebCore::RenderThemeQt::adjustProgressBarStyle): (WebCore::RenderThemeQt::adjustSliderTrackStyle): (WebCore::RenderThemeQt::adjustSliderThumbStyle): (WebCore::RenderThemeQt::adjustSearchFieldStyle): (WebCore::RenderThemeQt::adjustSearchFieldCancelButtonStyle): (WebCore::RenderThemeQt::adjustSearchFieldDecorationStyle): (WebCore::RenderThemeQt::adjustSearchFieldResultsDecorationStyle): (WebCore::RenderThemeQt::adjustInnerSpinButtonStyle): * platform/qt/RenderThemeQt.h: (RenderThemeQt): * platform/qt/RenderThemeQtMobile.cpp: (WebCore::RenderThemeQtMobile::adjustButtonStyle): (WebCore::RenderThemeQtMobile::adjustTextFieldStyle): (WebCore::RenderThemeQtMobile::adjustMenuListStyle): * platform/qt/RenderThemeQtMobile.h: (RenderThemeQtMobile): * platform/wx/RenderThemeWx.cpp: (RenderThemeWx): (WebCore::RenderThemeWx::adjustButtonStyle): (WebCore::RenderThemeWx::adjustTextFieldStyle): (WebCore::RenderThemeWx::adjustMenuListStyle): (WebCore::RenderThemeWx::adjustMenuListButtonStyle): * rendering/RenderInputSpeech.cpp: (WebCore::RenderInputSpeech::adjustInputFieldSpeechButtonStyle): * rendering/RenderInputSpeech.h: (RenderInputSpeech): * rendering/RenderTheme.cpp: (WebCore::RenderTheme::adjustStyle): (WebCore::RenderTheme::adjustCheckboxStyle): (WebCore::RenderTheme::adjustRadioStyle): (WebCore::RenderTheme::adjustButtonStyle): (WebCore::RenderTheme::adjustInnerSpinButtonStyle): (WebCore::RenderTheme::adjustTextFieldStyle): (WebCore::RenderTheme::adjustTextAreaStyle): (WebCore::RenderTheme::adjustMenuListStyle): (WebCore::RenderTheme::adjustInputFieldSpeechButtonStyle): (WebCore::RenderTheme::adjustMeterStyle): (WebCore::RenderTheme::adjustProgressBarStyle): (WebCore::RenderTheme::adjustMenuListButtonStyle): (WebCore::RenderTheme::adjustSliderTrackStyle): (WebCore::RenderTheme::adjustSliderThumbStyle): (WebCore::RenderTheme::adjustSearchFieldStyle): (WebCore::RenderTheme::adjustSearchFieldCancelButtonStyle): (WebCore::RenderTheme::adjustSearchFieldDecorationStyle): (WebCore::RenderTheme::adjustSearchFieldResultsDecorationStyle): (WebCore::RenderTheme::adjustSearchFieldResultsButtonStyle): * rendering/RenderTheme.h: (RenderTheme): * rendering/RenderThemeChromiumAndroid.cpp: (WebCore::RenderThemeChromiumAndroid::adjustInnerSpinButtonStyle): * rendering/RenderThemeChromiumAndroid.h: (RenderThemeChromiumAndroid): * rendering/RenderThemeChromiumLinux.cpp: (WebCore::RenderThemeChromiumLinux::adjustInnerSpinButtonStyle): * rendering/RenderThemeChromiumLinux.h: (RenderThemeChromiumLinux): * rendering/RenderThemeChromiumSkia.cpp: (WebCore::RenderThemeChromiumSkia::adjustButtonStyle): (WebCore::RenderThemeChromiumSkia::adjustSearchFieldStyle): (WebCore::RenderThemeChromiumSkia::adjustSearchFieldCancelButtonStyle): (WebCore::RenderThemeChromiumSkia::adjustSearchFieldDecorationStyle): (WebCore::RenderThemeChromiumSkia::adjustSearchFieldResultsDecorationStyle): (WebCore::RenderThemeChromiumSkia::adjustSearchFieldResultsButtonStyle): (WebCore::RenderThemeChromiumSkia::adjustMenuListStyle): (WebCore::RenderThemeChromiumSkia::adjustMenuListButtonStyle): * rendering/RenderThemeChromiumSkia.h: (RenderThemeChromiumSkia): * rendering/RenderThemeChromiumWin.cpp: (WebCore): (WebCore::RenderThemeChromiumWin::adjustInnerSpinButtonStyle): (WebCore::RenderThemeChromiumWin::adjustProgressBarStyle): * rendering/RenderThemeChromiumWin.h: (RenderThemeChromiumWin): * rendering/RenderThemeMac.h: (RenderThemeMac): * rendering/RenderThemeMac.mm: (WebCore::RenderThemeMac::setFontFromControlSize): (WebCore::RenderThemeMac::adjustTextFieldStyle): (WebCore::RenderThemeMac::adjustTextAreaStyle): (WebCore::RenderThemeMac::adjustProgressBarStyle): (WebCore::RenderThemeMac::adjustMenuListStyle): (WebCore::RenderThemeMac::adjustMenuListButtonStyle): (WebCore::RenderThemeMac::adjustSliderTrackStyle): (WebCore::RenderThemeMac::adjustSliderThumbStyle): (WebCore::RenderThemeMac::adjustSearchFieldStyle): (WebCore::RenderThemeMac::adjustSearchFieldCancelButtonStyle): (WebCore::RenderThemeMac::adjustSearchFieldDecorationStyle): (WebCore::RenderThemeMac::adjustSearchFieldResultsDecorationStyle): (WebCore::RenderThemeMac::adjustSearchFieldResultsButtonStyle): * rendering/RenderThemeSafari.cpp: (WebCore::RenderThemeSafari::setFontFromControlSize): (WebCore::RenderThemeSafari::adjustButtonStyle): (WebCore::RenderThemeSafari::adjustTextFieldStyle): (WebCore::RenderThemeSafari::adjustTextAreaStyle): (WebCore::RenderThemeSafari::adjustMenuListStyle): (WebCore::RenderThemeSafari::adjustMenuListButtonStyle): (WebCore::RenderThemeSafari::adjustSliderThumbStyle): (WebCore::RenderThemeSafari::adjustSearchFieldStyle): (WebCore::RenderThemeSafari::adjustSearchFieldCancelButtonStyle): (WebCore::RenderThemeSafari::adjustSearchFieldDecorationStyle): (WebCore::RenderThemeSafari::adjustSearchFieldResultsDecorationStyle): (WebCore::RenderThemeSafari::adjustSearchFieldResultsButtonStyle): * rendering/RenderThemeSafari.h: (RenderThemeSafari): * rendering/RenderThemeWin.cpp: (WebCore::RenderThemeWin::adjustInnerSpinButtonStyle): (WebCore::RenderThemeWin::adjustMenuListStyle): (WebCore::RenderThemeWin::adjustMenuListButtonStyle): (WebCore::RenderThemeWin::adjustSearchFieldStyle): (WebCore::RenderThemeWin::adjustSearchFieldCancelButtonStyle): (WebCore::RenderThemeWin::adjustSearchFieldDecorationStyle): (WebCore::RenderThemeWin::adjustSearchFieldResultsDecorationStyle): (WebCore::RenderThemeWin::adjustSearchFieldResultsButtonStyle): * rendering/RenderThemeWin.h: (RenderThemeWin): (WebCore::RenderThemeWin::adjustButtonStyle): (WebCore::RenderThemeWin::adjustTextFieldStyle): (WebCore::RenderThemeWin::adjustTextAreaStyle): * rendering/RenderThemeWinCE.cpp: (WebCore::RenderThemeWinCE::adjustMenuListStyle): (WebCore::RenderThemeWinCE::adjustSearchFieldStyle): (WebCore::RenderThemeWinCE::adjustSearchFieldCancelButtonStyle): (WebCore::RenderThemeWinCE::adjustSearchFieldDecorationStyle): (WebCore::RenderThemeWinCE::adjustSearchFieldResultsDecorationStyle): (WebCore::RenderThemeWinCE::adjustSearchFieldResultsButtonStyle): (WebCore::RenderThemeWinCE::adjustMenuListButtonStyle): * rendering/RenderThemeWinCE.h: (RenderThemeWinCE): (WebCore::RenderThemeWinCE::adjustButtonStyle): (WebCore::RenderThemeWinCE::adjustTextFieldStyle): (WebCore::RenderThemeWinCE::adjustTextAreaStyle): * rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::isStyleAvailable): * rendering/style/RenderStyle.h: (WebCore): * rendering/style/StyleRareNonInheritedData.h: (WebCore): * rendering/svg/RenderSVGInlineText.cpp: (WebCore::RenderSVGInlineText::computeNewScaledFontForStyle): * rendering/svg/SVGRenderSupport.cpp: (WebCore::SVGRenderSupport::isOverflowHidden): 2012-04-15 Robert Hogan CSS 2.1 failure: table-columns-example-001 fails https://bugs.webkit.org/show_bug.cgi?id=83978 Reviewed by David Hyatt. Tests: css2.1/20110323/table-columns-example-001.html fast/css/table-rules-attribute-groups-with-frame.html fast/css/table-rules-attribute-groups.html fast/css/table-rules-attribute-none-with-frame.html fast/css/table-rules-attribute-with-frame1.html fast/css/table-rules-attribute-with-frame2.html fast/css/table-rules-attribute.html WebKit does not implement the 'cols', 'rows', and 'all' rules attributes correctly for cells that are adjacent to the table's edges. The solution is to follow the hint in the spec at http://www.w3.org/TR/CSS21/tables.html#columns and set the table's border to hidden when the rules attribute is set to one of 'cols', 'rows' or 'all', and the table itself has no explicit border. Border collapsing will take care of the rest as 'hidden' always wins in border-conflict resolution. It's not completely clear from the spec that an explicit table border should trump a cols rule but doing so is consistent with FF and Opera at least. A 'rules' attribute is trumped by anything specified for the 'frame' attribute so need to ensure that is respected too. In short, any 'rules' attribute means a hidden table border unless there's a frame or border attribute. * html/HTMLTableElement.cpp: (WebCore::HTMLTableElement::additionalAttributeStyle): 2012-04-22 Timothy Hatcher Stop installing localizedStrings.js in Production builds. Reviewed by Joseph Pecoraro. * Configurations/WebCore.xcconfig: Added EXCLUDED_SOURCE_FILE_NAMES_Production_macosx and modified EXCLUDED_SOURCE_FILE_NAMES to look for CONFIGURATION variant. 2012-04-24 Yuzhu Shen [chromium] Add a description field in WebURLError and show failure description in the inspector network tab. https://bugs.webkit.org/show_bug.cgi?id=84566 Reviewed by Pavel Feldman. * inspector/front-end/NetworkPanel.js: (WebInspector.NetworkDataGridNode.prototype._refreshStatusCell): * platform/chromium/support/WebURLError.cpp: (WebKit::WebURLError::operator=): (WebKit::WebURLError::operator ResourceError): 2012-04-24 Rob Buis [SVG] getBBox on a within symbol returns 0 but with defs it works correctly https://bugs.webkit.org/show_bug.cgi?id=72796 SVG of containing renders black https://bugs.webkit.org/show_bug.cgi?id=82775 Reviewed by Dirk Schulze. Create RenderSVGHiddenContainer for each , which allows creation of child renderers too. This fixes both bugs since the bbox can be calculated at all times now and gradients in are always created. This does allocate more memory but in general is not used a lot and they tend to be small subtrees. Patch by Leo Yang. Tests: svg/custom/bbox-of-g-in-symbol.svg svg/custom/gradient-in-symbol-expected.svg svg/custom/gradient-in-symbol.svg * svg/SVGSymbolElement.cpp: (WebCore::SVGSymbolElement::createRenderer): (WebCore): * svg/SVGSymbolElement.h: (SVGSymbolElement): 2012-04-24 Brady Eidson and https://bugs.webkit.org/show_bug.cgi?id=82664 Need DOMWindow mechanism to supplement UserScripts for page cache notifications This patch creates a new object type "DOMWindowExtension" which extends DOMWindowProperty. A DOMWindowExtension is tied to a particular DOMWindow and represents extensibility in that DOMWindow within a particular DOMWrapperWorld. It is a token object meant designed to notify clients of the various events in the lifetime of a DOMWindow property such as creation, disconnecting for the page cache, reconnecting when restoring from the page cache, and DOMWindow destruction. Reviewed by Sam Weinig. New WebKit API test DOMWindowExtensionBasic added. Add hooks for 4 new client calls regarding DOMWindowExtensions and global object lifetime: * loader/FrameLoaderClient.h: (WebCore::FrameLoaderClient::dispatchCanCreateGlobalObject): (WebCore::FrameLoaderClient::dispatchWillDisconnectDOMWindowExtensionFromGlobalObject): (WebCore::FrameLoaderClient::dispatchDidReconnectDOMWindowExtensionToGlobalObject): (WebCore::FrameLoaderClient::dispatchWillDestroyGlobalObjectForDOMWindowExtension): At the same time "DidClearWindowObject" is called, also notify clients that the global object is available: * loader/FrameLoader.cpp: (WebCore::FrameLoader::receivedFirstData): (WebCore::FrameLoader::dispatchGlobalObjectAvailableInAllWorlds): * loader/FrameLoader.h: DOMWindowProperties might want to unregister themselves during these notifications, so copy the set to a Vector. While this technique is arguably fragile, its certainly less fragile than mutating a set while iterating it: * page/DOMWindow.cpp: (WebCore::DOMWindow::willDetachPage): (WebCore::DOMWindow::disconnectDOMWindowProperties): (WebCore::DOMWindow::reconnectDOMWindowProperties): Implement the DOMWindowExtension object. It acts like a DOMWindowProperty with the added capability of remembering what Frame it used to be connected to so it can *always* notify clients on willDetachPage: * page/DOMWindowExtension.cpp: Added. (WebCore::DOMWindowExtension::DOMWindowExtension): (WebCore::DOMWindowExtension::~DOMWindowExtension): (WebCore::DOMWindowExtension::disconnectFrame): (WebCore::DOMWindowExtension::reconnectFrame): (WebCore::DOMWindowExtension::willDetachPage): * page/DOMWindowExtension.h: Added. (WebCore::DOMWindowExtension::create): (WebCore::DOMWindowExtension::world): Project files: * CMakeLists.txt: * GNUmakefile.list.am: * Target.pri: * WebCore.exp.in: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: 2012-04-24 Sami Kyostila [chromium] Don't keep pointers to released layer tree https://bugs.webkit.org/show_bug.cgi?id=84715 Reviewed by Adrienne Walker. As part of tree synchronization, CCLayerTreeHostImpl loses ownership of the previous tree (as per releaseRootLayer()). After this point we should not retain any pointers to the old tree, because they are effectively invalid as soon as the root layer is released. For processing scroll updates we need to keep track of which layer is being scrolled, and this state needs to survive tree synchronizations. Instead of keeping a direct pointer to the scrolled layer, we now save the id of that layer and use it to look up the same layer from the new tree. Unit test: CCLayerTreeHostImplTest.replaceTreeWhileScrolling * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::CCLayerTreeHostImpl): (WebCore::CCLayerTreeHostImpl::setRootLayer): (WebCore::CCLayerTreeHostImpl::releaseRootLayer): (WebCore::CCLayerTreeHostImpl::scrollBegin): (WebCore::CCLayerTreeHostImpl::scrollEnd): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: (CCLayerTreeHostImpl): 2012-04-24 Alexandru Chiculita [CSS Filters] Move m_filter and related fields from RenderLayer to a different structure and only allocate it when needed https://bugs.webkit.org/show_bug.cgi?id=84460 Reviewed by Dean Jackson. The new RenderLayerFilterInfo is meant to be allocated only when needed by filters. The link to the RenderLayerFilterInfo is maintained using a HashMap and a single boolean in the RenderLayer class. No new tests, just extracted a couple of fields inside the RenderLayer to a separate class. * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * rendering/FilterEffectRenderer.cpp: (WebCore::FilterEffectRendererHelper::prepareFilterEffect): (WebCore::FilterEffectRendererHelper::beginFilterEffect): (WebCore::FilterEffectRendererHelper::applyFilterEffect): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::RenderLayer): (WebCore::RenderLayer::~RenderLayer): (WebCore::RenderLayer::paintsWithFilters): (WebCore::RenderLayer::requiresFullLayerImageForFilters): (WebCore::RenderLayer::setFilterBackendNeedsRepaintingInRect): (WebCore::RenderLayer::paintLayerContents): (WebCore::RenderLayer::updateOrRemoveFilterEffect): * rendering/RenderLayer.h: (WebCore::RenderLayer::filterRenderer): (RenderLayer): (WebCore::RenderLayer::filterInfo): (WebCore::RenderLayer::ensureFilterInfo): (WebCore::RenderLayer::removeFilterInfoIfNeeded): (WebCore::RenderLayer::hasFilterInfo): (WebCore::RenderLayer::setHasFilterInfo): * rendering/RenderLayerFilterInfo.cpp: Added. (WebCore): (WebCore::RenderLayerFilterInfo::filterInfoForRenderLayer): (WebCore::RenderLayerFilterInfo::createFilterInfoForRenderLayerIfNeeded): (WebCore::RenderLayerFilterInfo::removeFilterInfoForRenderLayer): (WebCore::RenderLayerFilterInfo::RenderLayerFilterInfo): (WebCore::RenderLayerFilterInfo::~RenderLayerFilterInfo): (WebCore::RenderLayerFilterInfo::setRenderer): * rendering/RenderLayerFilterInfo.h: Added. (WebCore): (RenderLayerFilterInfo): (WebCore::RenderLayerFilterInfo::dirtySourceRect): (WebCore::RenderLayerFilterInfo::addDirtySourceRect): (WebCore::RenderLayerFilterInfo::resetDirtySourceRect): (WebCore::RenderLayerFilterInfo::renderer): 2012-04-24 Kentaro Hara [V8] Pass Isolate around in SerializedScriptValue.cpp (Part1) https://bugs.webkit.org/show_bug.cgi?id=84663 Reviewed by Nate Chapin. The objective is to pass Isolate to toV8() in SerializedScriptValue.cpp. Part1: Add an Isolate argument to SerializedScriptValue::create(), SerializedScriptValue::deserialize(), etc. Part2: Add an m_isolate member to SerializedScriptValue::Writer() and SerializedScriptValue::Reader(). Part3: Pass Isolate to toV8(). This patch fixes Part1. No tests. No change in behavior. * bindings/v8/SerializedScriptValue.cpp: (WebCore::SerializedScriptValue::create): (WebCore::SerializedScriptValue::undefinedValue): (WebCore::SerializedScriptValue::booleanValue): (WebCore::SerializedScriptValue::numberValue): (WebCore::SerializedScriptValue::SerializedScriptValue): (WebCore::SerializedScriptValue::deserialize): (WebCore::SerializedScriptValue::deserializeForInspector): * bindings/v8/SerializedScriptValue.h: (SerializedScriptValue): 2012-04-24 Kentaro Hara [V8][Refactoring] Remove deserializeAndSetProperty() from SerializedScriptValue.cpp https://bugs.webkit.org/show_bug.cgi?id=84662 Reviewed by Nate Chapin. SerializedScriptValue::deserializeAndSetProperty() is no longer used. This patch removes it. No tests. No change in behavior. * bindings/v8/SerializedScriptValue.cpp: * bindings/v8/SerializedScriptValue.h: 2012-04-24 Kentaro Hara [V8] Pass Isolate to setDOMException() in CodeGeneratorV8.pm https://bugs.webkit.org/show_bug.cgi?id=84660 Reviewed by Nate Chapin. The objective is to pass Isolate around in V8 bindings. This patch passes Isolate to setDOMException() in CodeGeneratorV8.pm. Test: bindings/scripts/test/TestEventTarget.idl bindings/scripts/test/TestObj.idl bindings/scripts/test/TestInterface.idl * bindings/scripts/CodeGeneratorV8.pm: Modified as described above. (GenerateSetDOMException): (GenerateNormalAttrGetter): (GenerateNormalAttrSetter): (GenerateFunctionCallback): (GenerateParametersCheck): (GenerateFunctionCallString): * bindings/scripts/test/V8/V8TestEventTarget.cpp: Updated run-bindings-tests results. (WebCore::TestEventTargetV8Internal::itemCallback): (WebCore::TestEventTargetV8Internal::dispatchEventCallback): * bindings/scripts/test/V8/V8TestInterface.cpp: Ditto. (WebCore::TestInterfaceV8Internal::supplementalMethod2Callback): * bindings/scripts/test/V8/V8TestObj.cpp: Ditto. (WebCore::TestObjV8Internal::attrWithGetterExceptionAttrGetter): (WebCore::TestObjV8Internal::attrWithGetterExceptionAttrSetter): (WebCore::TestObjV8Internal::attrWithSetterExceptionAttrSetter): (WebCore::TestObjV8Internal::stringAttrWithGetterExceptionAttrGetter): (WebCore::TestObjV8Internal::stringAttrWithGetterExceptionAttrSetter): (WebCore::TestObjV8Internal::stringAttrWithSetterExceptionAttrSetter): (WebCore::TestObjV8Internal::withScriptStateAttributeRaisesAttrGetter): (WebCore::TestObjV8Internal::withScriptStateAttributeRaisesAttrSetter): (WebCore::TestObjV8Internal::withScriptExecutionContextAttributeRaisesAttrGetter): (WebCore::TestObjV8Internal::withScriptExecutionContextAttributeRaisesAttrSetter): (WebCore::TestObjV8Internal::withScriptExecutionContextAndScriptStateAttributeRaisesAttrGetter): (WebCore::TestObjV8Internal::withScriptExecutionContextAndScriptStateAttributeRaisesAttrSetter): (WebCore::TestObjV8Internal::methodThatRequiresAllArgsAndThrowsCallback): (WebCore::TestObjV8Internal::methodWithExceptionCallback): (WebCore::TestObjV8Internal::withScriptStateVoidExceptionCallback): (WebCore::TestObjV8Internal::withScriptStateObjExceptionCallback): (WebCore::TestObjV8Internal::withScriptExecutionContextAndScriptStateObjExceptionCallback): (WebCore::TestObjV8Internal::getSVGDocumentCallback): (WebCore::TestObjV8Internal::strictFunctionCallback): 2012-04-24 Kentaro Hara [V8] Pass Isolate to setDOMException() (Part2) https://bugs.webkit.org/show_bug.cgi?id=84658 Reviewed by Nate Chapin. The objective is to pass Isolate around in V8 bindings. This patch passes Isolate to setDOMException() in custom binding code. No tests. No change in behavior. * bindings/v8/V8Collection.cpp: (WebCore::toOptionsCollectionSetter): * bindings/v8/V8Collection.h: (WebCore): * bindings/v8/custom/V8ArrayBufferViewCustom.h: (WebCore::constructWebGLArrayWithArrayBufferArgument): (WebCore::setWebGLArrayHelper): * bindings/v8/custom/V8DOMWindowCustom.cpp: (WebCore::WindowSetTimeoutImpl): * bindings/v8/custom/V8DataViewCustom.cpp: (WebCore::V8DataView::getInt8Callback): (WebCore::V8DataView::getUint8Callback): (WebCore::V8DataView::setInt8Callback): (WebCore::V8DataView::setUint8Callback): * bindings/v8/custom/V8DirectoryEntrySyncCustom.cpp: (WebCore::V8DirectoryEntrySync::getDirectoryCallback): (WebCore::V8DirectoryEntrySync::getFileCallback): * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp: (WebCore::V8HTMLCanvasElement::toDataURLCallback): * bindings/v8/custom/V8HTMLElementCustom.cpp: (WebCore::V8HTMLElement::itemValueAccessorSetter): * bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp: (WebCore::V8HTMLOptionsCollection::addCallback): (WebCore::V8HTMLOptionsCollection::lengthAccessorSetter): (WebCore::V8HTMLOptionsCollection::indexedPropertySetter): * bindings/v8/custom/V8HTMLSelectElementCustom.cpp: (WebCore::V8HTMLSelectElement::indexedPropertySetter): * bindings/v8/custom/V8NodeCustom.cpp: (WebCore::V8Node::insertBeforeCallback): (WebCore::V8Node::replaceChildCallback): (WebCore::V8Node::removeChildCallback): (WebCore::V8Node::appendChildCallback): * bindings/v8/custom/V8SQLTransactionCustom.cpp: (WebCore::V8SQLTransaction::executeSqlCallback): * bindings/v8/custom/V8WebKitMutationObserverCustom.cpp: (WebCore::V8WebKitMutationObserver::observeCallback): * bindings/v8/custom/V8XMLHttpRequestCustom.cpp: (WebCore::V8XMLHttpRequest::responseAccessorGetter): 2012-04-24 Kentaro Hara [V8] Pass Isolate to setDOMException() (Part1) https://bugs.webkit.org/show_bug.cgi?id=84656 Reviewed by Nate Chapin. The objective is to pass Isolate around in V8 bindings. This patch passes Isolate to setDOMException() in custom binding code. No tests. No change in behavior. * bindings/v8/custom/V8LocationCustom.cpp: (WebCore::V8Location::protocolAccessorSetter): * bindings/v8/custom/V8SQLTransactionSyncCustom.cpp: (WebCore::V8SQLTransactionSync::executeSqlCallback): * bindings/v8/custom/V8SVGLengthCustom.cpp: (WebCore::V8SVGLength::valueAccessorGetter): (WebCore::V8SVGLength::valueAccessorSetter): (WebCore::V8SVGLength::convertToSpecifiedUnitsCallback): * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp: (WebCore::getObjectParameter): (WebCore::V8WebGLRenderingContext::getAttachedShadersCallback): (WebCore::V8WebGLRenderingContext::getExtensionCallback): (WebCore::V8WebGLRenderingContext::getFramebufferAttachmentParameterCallback): (WebCore::V8WebGLRenderingContext::getParameterCallback): (WebCore::V8WebGLRenderingContext::getProgramParameterCallback): (WebCore::V8WebGLRenderingContext::getShaderParameterCallback): (WebCore::V8WebGLRenderingContext::getUniformCallback): (WebCore::vertexAttribAndUniformHelperf): (WebCore::uniformHelperi): (WebCore::uniformMatrixHelper): 2012-04-24 Pavel Feldman Web Inspector: encapsulate live location into the Script. https://bugs.webkit.org/show_bug.cgi?id=84722 Reviewed by Yury Semikhatsky. Live location is just a location on the script. The way it is implemented today involves too many indirections. * inspector/front-end/CompilerScriptMapping.js: * inspector/front-end/DebuggerModel.js: (WebInspector.DebuggerModel.prototype.setBreakpointByScriptLocation): (WebInspector.DebuggerModel.prototype.scriptForId): * inspector/front-end/DebuggerPresentationModel.js: (WebInspector.DebuggerPresentationModel.prototype.createLiveLocation): (WebInspector.DebuggerPresentationModel.prototype._addConsoleMessageToScript): (WebInspector.DebuggerPresentationModel.prototype._debuggerPaused): (WebInspector.DebuggerPresentationModel.prototype.set selectedCallFrame): (WebInspector.PresentationCallFrame.prototype.uiLocation): (WebInspector.DebuggerPresentationModel.CallFramePlacard): (WebInspector.DebuggerPresentationModel.Linkifier.prototype.linkifyRawLocation): * inspector/front-end/RawSourceCode.js: * inspector/front-end/ResourceScriptMapping.js: (WebInspector.ResourceScriptMapping.prototype.addScript): (WebInspector.ResourceScriptMapping.prototype._uiSourceCodeChanged): (WebInspector.ResourceScriptMapping.prototype._bindScriptToRawSourceCode): * inspector/front-end/Script.js: (WebInspector.Script): (WebInspector.Script.prototype.isInlineScript): (WebInspector.Script.prototype.setSourceMapping): (WebInspector.Script.prototype.createLocation): (WebInspector.Script.Location): (WebInspector.Script.Location.prototype.dispose): (WebInspector.Script.Location.prototype._update): * inspector/front-end/ScriptMapping.js: (WebInspector.UILocation): (WebInspector.SourceMapping): (WebInspector.SourceMapping.prototype.rawLocationToUILocation): (WebInspector.SourceMapping.prototype.uiLocationToRawLocation): (WebInspector.MainScriptMapping): (WebInspector.MainScriptMapping.prototype.addScript): (WebInspector.MainScriptMapping.prototype.reset): * inspector/front-end/SnippetsModel.js: (WebInspector.SnippetsScriptMapping.prototype._createUISourceCodeForScript): 2012-04-24 Yury Semikhatsky Web Inspector: a bunch of heap profiler cleanups https://bugs.webkit.org/show_bug.cgi?id=84730 - HeapSnapshotProviderProxy passed explicitely as a parameter to HeapSnapshotGridNode constructor - Removed dead code - Removed unused parameters - Added more closure compiler annotations - Extracted code finding cycled among node ancestors into a separate method Reviewed by Pavel Feldman. * inspector/front-end/HeapSnapshot.js: (WebInspector.HeapSnapshot.prototype.createEdgesProvider): (WebInspector.HeapSnapshot.prototype.createRetainingEdgesProvider): (WebInspector.HeapSnapshot.prototype.createNodesProviderForDominator): (WebInspector.HeapSnapshotEdgesProvider): * inspector/front-end/HeapSnapshotDataGrids.js: * inspector/front-end/HeapSnapshotGridNodes.js: (WebInspector.HeapSnapshotGridNode): (WebInspector.HeapSnapshotGenericObjectNode): (WebInspector.HeapSnapshotObjectNode): (WebInspector.HeapSnapshotObjectNode.prototype._findAncestorWithSameSnapshotNodeId): (WebInspector.HeapSnapshotInstanceNode): (WebInspector.HeapSnapshotConstructorNode): (WebInspector.HeapSnapshotDiffNode): (WebInspector.HeapSnapshotDiffNode._createProvider): (WebInspector.HeapSnapshotDominatorObjectNode): * inspector/front-end/HeapSnapshotProxy.js: (WebInspector.HeapSnapshotWorker): (WebInspector.HeapSnapshotProxy.prototype.createNodesProviderForDominator): * inspector/front-end/utilities.js: 2012-04-24 Adam Klein Fix includes in StrongInlines.h and ScriptValue.h https://bugs.webkit.org/show_bug.cgi?id=84659 Reviewed by Geoffrey Garen. This change was prompted by an attempt to use ScriptValue.h from a WebCore header file and running into trouble with the (as it turns out unnecessary) include of JSDOMBinding.h. * bindings/js/ScriptValue.cpp: Add include of JSDOMBinding.h, now that it's not included by the header. * bindings/js/ScriptValue.h: Remove unnecessary include of JSDOMBinding.h. 2012-04-24 Antti Koivisto Move MediaList CSSOM wrapper ownership to parent rule or stylesheet https://bugs.webkit.org/show_bug.cgi?id=84716 Reviewed by Anders Carlsson. MediaList CSSOM wrapper should be owned by a rule or a stylesheet, not by the underlying MediaQuerySet. Remove the ref forwarding from MediaList in favor of regular refcounting. Use the usual pattern where the parent wrapper refs the child wrapper and zeroes the backpointer on destruction. * bindings/js/JSDOMBinding.h: (WebCore::root): * css/CSSImportRule.cpp: (WebCore::CSSImportRule::~CSSImportRule): (WebCore::CSSImportRule::media): * css/CSSImportRule.h: (StyleRuleImport): (CSSImportRule): * css/CSSMediaRule.cpp: (WebCore::CSSMediaRule::~CSSMediaRule): (WebCore::CSSMediaRule::media): * css/CSSMediaRule.h: (CSSMediaRule): * css/CSSStyleSheet.cpp: (WebCore::CSSStyleSheet::~CSSStyleSheet): (WebCore::CSSStyleSheet::media): * css/CSSStyleSheet.h: (CSSStyleSheet): * css/MediaList.cpp: (WebCore::MediaQuerySet::mediaText): (WebCore::MediaList::MediaList): (WebCore): (WebCore::MediaList::notifyChanged): * css/MediaList.h: (MediaQuerySet): (WebCore::MediaList::create): (WebCore::MediaList::parentRule): (WebCore::MediaList::clearParentStyleSheet): (WebCore::MediaList::clearParentRule): (WebCore::MediaList::queries): (MediaList): * css/StyleRule.h: (WebCore::StyleRuleMedia::mediaQueries): 2012-04-24 Carlos Garcia Campos [GTK] Should pass canvas/philip/tests/toDataURL.jpeg.alpha.html https://bugs.webkit.org/show_bug.cgi?id=83973 Reviewed by Philippe Normand. Test: canvas/philip/tests/toDataURL.jpeg.alpha.html * platform/graphics/gtk/ImageBufferGtk.cpp: (WebCore::encodeImage): Convert ARGB32 cairo surface into RGB24 when encoding JPEG images since JPEG encoder doesn't support alpha channel. 2012-04-24 Carlos Garcia Campos [GTK] Add WebKitCookieManager::changed signal to WebKit2 GTK+ API https://bugs.webkit.org/show_bug.cgi?id=82598 Reviewed by Philippe Normand. * GNUmakefile.list.am: Add new files to compilation. * platform/gtk/TemporaryLinkStubs.cpp: Remove stubs for setCookieStoragePrivateBrowsingEnabled, startObservingCookieChanges and stopObservingCookieChanges. * platform/network/soup/CookieStorageSoup.cpp: Added. (WebCore::setCookieStoragePrivateBrowsingEnabled): (WebCore::soupCookiesChanged): Notify cookies changes using platform strategies. (WebCore::startObservingCookieChanges): Connect to changed signal of the soup cookie jar. (WebCore::stopObservingCookieChanges): Disconnect signals handlers for changed signals of the soup cookie jar. 2012-04-24 Alexis Menard Rename CSSStyleApplyProperty files to StyleBuilder. https://bugs.webkit.org/show_bug.cgi?id=84721 Reviewed by Antti Koivisto. r115043 renamed CSSStyleApplyProperty class to StyleBuilder. This patch rename the files to match the new class name. No new tests : renaming of files, no behavior changes expected. * CMakeLists.txt: * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * css/CSSAllInOne.cpp: * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::collectMatchingRulesForList): * css/StyleBuilder.cpp: Renamed from Source/WebCore/css/CSSStyleApplyProperty.cpp. (WebCore): (ApplyPropertyExpanding): (WebCore::ApplyPropertyExpanding::applyInheritValue): (WebCore::ApplyPropertyExpanding::applyInitialValue): (WebCore::ApplyPropertyExpanding::applyValue): (WebCore::ApplyPropertyExpanding::createHandler): (ApplyPropertyDefaultBase): (WebCore::ApplyPropertyDefaultBase::setValue): (WebCore::ApplyPropertyDefaultBase::value): (WebCore::ApplyPropertyDefaultBase::initial): (WebCore::ApplyPropertyDefaultBase::applyInheritValue): (WebCore::ApplyPropertyDefaultBase::applyInitialValue): (WebCore::ApplyPropertyDefaultBase::applyValue): (WebCore::ApplyPropertyDefaultBase::createHandler): (ApplyPropertyDefault): (WebCore::ApplyPropertyDefault::setValue): (WebCore::ApplyPropertyDefault::applyValue): (WebCore::ApplyPropertyDefault::createHandler): (ApplyPropertyNumber): (WebCore::ApplyPropertyNumber::setValue): (WebCore::ApplyPropertyNumber::applyValue): (WebCore::ApplyPropertyNumber::createHandler): (ApplyPropertyStyleImage): (WebCore::ApplyPropertyStyleImage::applyValue): (WebCore::ApplyPropertyStyleImage::createHandler): (ApplyPropertyAuto): (WebCore::ApplyPropertyAuto::setValue): (WebCore::ApplyPropertyAuto::value): (WebCore::ApplyPropertyAuto::hasAuto): (WebCore::ApplyPropertyAuto::setAuto): (WebCore::ApplyPropertyAuto::applyInheritValue): (WebCore::ApplyPropertyAuto::applyInitialValue): (WebCore::ApplyPropertyAuto::applyValue): (WebCore::ApplyPropertyAuto::createHandler): (ApplyPropertyClip): (WebCore::ApplyPropertyClip::convertToLength): (WebCore::ApplyPropertyClip::applyInheritValue): (WebCore::ApplyPropertyClip::applyInitialValue): (WebCore::ApplyPropertyClip::applyValue): (WebCore::ApplyPropertyClip::createHandler): (WebCore::defaultInitialColor): (ApplyPropertyColor): (WebCore::ApplyPropertyColor::applyInheritValue): (WebCore::ApplyPropertyColor::applyInitialValue): (WebCore::ApplyPropertyColor::applyValue): (WebCore::ApplyPropertyColor::applyColorValue): (WebCore::ApplyPropertyColor::createHandler): (ApplyPropertyDirection): (WebCore::ApplyPropertyDirection::applyValue): (WebCore::ApplyPropertyDirection::createHandler): (ApplyPropertyLength): (WebCore::ApplyPropertyLength::setValue): (WebCore::ApplyPropertyLength::applyValue): (WebCore::ApplyPropertyLength::createHandler): (ApplyPropertyString): (WebCore::ApplyPropertyString::setValue): (WebCore::ApplyPropertyString::applyValue): (WebCore::ApplyPropertyString::createHandler): (ApplyPropertyBorderRadius): (WebCore::ApplyPropertyBorderRadius::setValue): (WebCore::ApplyPropertyBorderRadius::applyValue): (WebCore::ApplyPropertyBorderRadius::createHandler): (FillLayerAccessorTypes): (ApplyPropertyFillLayer): (WebCore::ApplyPropertyFillLayer::applyInheritValue): (WebCore::ApplyPropertyFillLayer::applyInitialValue): (WebCore::ApplyPropertyFillLayer::applyValue): (WebCore::ApplyPropertyFillLayer::createHandler): (ApplyPropertyComputeLength): (WebCore::ApplyPropertyComputeLength::setValue): (WebCore::ApplyPropertyComputeLength::applyValue): (WebCore::ApplyPropertyComputeLength::createHandler): (ApplyPropertyFont): (WebCore::ApplyPropertyFont::applyInheritValue): (WebCore::ApplyPropertyFont::applyInitialValue): (WebCore::ApplyPropertyFont::applyValue): (WebCore::ApplyPropertyFont::createHandler): (ApplyPropertyFontSize): (WebCore::ApplyPropertyFontSize::largerFontSize): (WebCore::ApplyPropertyFontSize::smallerFontSize): (WebCore::ApplyPropertyFontSize::applyInheritValue): (WebCore::ApplyPropertyFontSize::applyInitialValue): (WebCore::ApplyPropertyFontSize::applyValue): (WebCore::ApplyPropertyFontSize::createHandler): (ApplyPropertyFontWeight): (WebCore::ApplyPropertyFontWeight::applyValue): (WebCore::ApplyPropertyFontWeight::createHandler): (ApplyPropertyFontVariantLigatures): (WebCore::ApplyPropertyFontVariantLigatures::applyInheritValue): (WebCore::ApplyPropertyFontVariantLigatures::applyInitialValue): (WebCore::ApplyPropertyFontVariantLigatures::applyValue): (WebCore::ApplyPropertyFontVariantLigatures::createHandler): (ApplyPropertyBorderImage): (WebCore::ApplyPropertyBorderImage::applyValue): (WebCore::ApplyPropertyBorderImage::createHandler): (ApplyPropertyBorderImageModifier): (WebCore::ApplyPropertyBorderImageModifier::getValue): (WebCore::ApplyPropertyBorderImageModifier::setValue): (WebCore::ApplyPropertyBorderImageModifier::applyInheritValue): (WebCore::ApplyPropertyBorderImageModifier::applyInitialValue): (WebCore::ApplyPropertyBorderImageModifier::applyValue): (WebCore::ApplyPropertyBorderImageModifier::createHandler): (ApplyPropertyBorderImageSource): (WebCore::ApplyPropertyBorderImageSource::applyValue): (WebCore::ApplyPropertyBorderImageSource::createHandler): (ApplyPropertyCounter): (WebCore::ApplyPropertyCounter::emptyFunction): (WebCore::ApplyPropertyCounter::applyInheritValue): (WebCore::ApplyPropertyCounter::applyValue): (WebCore::ApplyPropertyCounter::createHandler): (ApplyPropertyCursor): (WebCore::ApplyPropertyCursor::applyInheritValue): (WebCore::ApplyPropertyCursor::applyInitialValue): (WebCore::ApplyPropertyCursor::applyValue): (WebCore::ApplyPropertyCursor::createHandler): (ApplyPropertyTextAlign): (WebCore::ApplyPropertyTextAlign::applyValue): (WebCore::ApplyPropertyTextAlign::createHandler): (ApplyPropertyTextDecoration): (WebCore::ApplyPropertyTextDecoration::applyValue): (WebCore::ApplyPropertyTextDecoration::createHandler): (ApplyPropertyUnicodeBidi): (WebCore::ApplyPropertyUnicodeBidi::applyValue): (WebCore::ApplyPropertyUnicodeBidi::createHandler): (ApplyPropertyLineHeight): (WebCore::ApplyPropertyLineHeight::applyValue): (WebCore::ApplyPropertyLineHeight::createHandler): (ApplyPropertyPageSize): (WebCore::ApplyPropertyPageSize::mmLength): (WebCore::ApplyPropertyPageSize::inchLength): (WebCore::ApplyPropertyPageSize::getPageSizeFromName): (WebCore::ApplyPropertyPageSize::applyInheritValue): (WebCore::ApplyPropertyPageSize::applyInitialValue): (WebCore::ApplyPropertyPageSize::applyValue): (WebCore::ApplyPropertyPageSize::createHandler): (ApplyPropertyTextEmphasisStyle): (WebCore::ApplyPropertyTextEmphasisStyle::applyInheritValue): (WebCore::ApplyPropertyTextEmphasisStyle::applyInitialValue): (WebCore::ApplyPropertyTextEmphasisStyle::applyValue): (WebCore::ApplyPropertyTextEmphasisStyle::createHandler): (ApplyPropertyAnimation): (WebCore::ApplyPropertyAnimation::setValue): (WebCore::ApplyPropertyAnimation::value): (WebCore::ApplyPropertyAnimation::test): (WebCore::ApplyPropertyAnimation::clear): (WebCore::ApplyPropertyAnimation::initial): (WebCore::ApplyPropertyAnimation::map): (WebCore::ApplyPropertyAnimation::accessAnimations): (WebCore::ApplyPropertyAnimation::animations): (WebCore::ApplyPropertyAnimation::applyInheritValue): (WebCore::ApplyPropertyAnimation::applyInitialValue): (WebCore::ApplyPropertyAnimation::applyValue): (WebCore::ApplyPropertyAnimation::createHandler): (ApplyPropertyOutlineStyle): (WebCore::ApplyPropertyOutlineStyle::applyInheritValue): (WebCore::ApplyPropertyOutlineStyle::applyInitialValue): (WebCore::ApplyPropertyOutlineStyle::applyValue): (WebCore::ApplyPropertyOutlineStyle::createHandler): (ApplyPropertyResize): (WebCore::ApplyPropertyResize::applyValue): (WebCore::ApplyPropertyResize::createHandler): (ApplyPropertyVerticalAlign): (WebCore::ApplyPropertyVerticalAlign::applyValue): (WebCore::ApplyPropertyVerticalAlign::createHandler): (ApplyPropertyAspectRatio): (WebCore::ApplyPropertyAspectRatio::applyInheritValue): (WebCore::ApplyPropertyAspectRatio::applyInitialValue): (WebCore::ApplyPropertyAspectRatio::applyValue): (WebCore::ApplyPropertyAspectRatio::createHandler): (ApplyPropertyZoom): (WebCore::ApplyPropertyZoom::resetEffectiveZoom): (WebCore::ApplyPropertyZoom::applyInheritValue): (WebCore::ApplyPropertyZoom::applyInitialValue): (WebCore::ApplyPropertyZoom::applyValue): (WebCore::ApplyPropertyZoom::createHandler): (ApplyPropertyDisplay): (WebCore::ApplyPropertyDisplay::isValidDisplayValue): (WebCore::ApplyPropertyDisplay::applyInheritValue): (WebCore::ApplyPropertyDisplay::applyInitialValue): (WebCore::ApplyPropertyDisplay::applyValue): (WebCore::ApplyPropertyDisplay::createHandler): (ApplyPropertyFlex): (WebCore::ApplyPropertyFlex::applyInheritValue): (WebCore::ApplyPropertyFlex::applyInitialValue): (WebCore::ApplyPropertyFlex::applyValue): (WebCore::ApplyPropertyFlex::createHandler): (WebCore::ApplyPropertyFlex::getFlexValue): (WebCore::StyleBuilder::sharedStyleBuilder): (WebCore::StyleBuilder::StyleBuilder): * css/StyleBuilder.h: Renamed from Source/WebCore/css/CSSStyleApplyProperty.h. (WebCore): (PropertyHandler): (WebCore::PropertyHandler::PropertyHandler): (WebCore::PropertyHandler::applyInheritValue): (WebCore::PropertyHandler::applyInitialValue): (WebCore::PropertyHandler::applyValue): (WebCore::PropertyHandler::isValid): (WebCore::PropertyHandler::inheritFunction): (WebCore::PropertyHandler::initialFunction): (WebCore::PropertyHandler::applyFunction): (StyleBuilder): (WebCore::StyleBuilder::propertyHandler): (WebCore::StyleBuilder::index): (WebCore::StyleBuilder::valid): (WebCore::StyleBuilder::setPropertyHandler): 2012-04-24 Florin Malita WebCore::EventTarget::addEventListener crash https://bugs.webkit.org/show_bug.cgi?id=84171 Reviewed by Nikolas Zimmermann. Test: svg/custom/use-tref-crash.svg Adding tref target event listeners while building the shadow tree is problematic, because SVGUseElement::buildShadowAndInstanceTree() only sets the element instance<->shadow element association at a later time. Fortunately, buildShadowAndInstanceTree() also propagates the event handlers (transferEventListenersToShadowTree) - so we can simply skip them in SVGTRefElement::buildPendingResource() for shadow elements. * svg/SVGTRefElement.cpp: (WebCore::SVGTRefElement::buildPendingResource): 2012-04-24 Kent Tamura Clickable area of a calendar picker indicator is too small. https://bugs.webkit.org/show_bug.cgi?id=84677 Reviewed by Kentaro Hara. Test: fast/forms/date/date-appearance.html is affected. * css/html.css: (input::-webkit-calendar-picker-indicator): - Remove unnecessary disaplay:inline-block. - Add paddings instead of the margin. (input::-webkit-calendar-picker-indicator:hover): Add hover style. 2012-04-24 Alexis Menard Another unreviewed build fix for Mac. * css/CSSStyleSelector.h: (CSSStyleSelector): 2012-04-24 Alexis Menard Unreviewed build fix attempt for Mac. * rendering/style/RenderStyle.h: 2012-04-24 Alexis Menard Rename CSSStyleApplyProperty class to StyleBuilder. https://bugs.webkit.org/show_bug.cgi?id=84711 Reviewed by Antti Koivisto. As per discussion on bug https://bugs.webkit.org/show_bug.cgi?id=42764 the name is a bit confusing. This first patch rename the class and a following one will rename the files. We also drop the CSS prefix of the class to keep CSS prefixed classes for CSSOM types. No new tests : renaming, no behavior changes should appear. * css/CSSStyleApplyProperty.cpp: (WebCore::ApplyPropertyExpanding::applyInheritValue): (WebCore::ApplyPropertyExpanding::applyInitialValue): (WebCore::ApplyPropertyExpanding::applyValue): (WebCore::StyleBuilder::sharedStyleBuilder): (WebCore::StyleBuilder::StyleBuilder): * css/CSSStyleApplyProperty.h: (WebCore): (StyleBuilder): * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::CSSStyleSelector): (WebCore::CSSStyleSelector::collectMatchingRulesForList): * css/CSSStyleSelector.h: (CSSStyleSelector): 2012-04-24 Kent Tamura Merge LocalizedCalendar into LocalizedDate https://bugs.webkit.org/show_bug.cgi?id=84685 Reviewed by Kentaro Hara. The functionality of LocalizedCalendar is very related to LocalizedDate. We should merge them. No new tests. Just refactoring. * WebCore.gypi: Remove LocalizedCalendar.h and LocalizedCalenderICU.cpp. * html/shadow/CalendarPickerElement.cpp: Include LocalizedDate.h instead of LocalizedCalendar.h. * platform/text/LocalizedCalendar.h: Removed. Merged into LocalizedDate.h. * platform/text/LocalizedCalendarICU.cpp: Removed. Merged into LocalizedDateICU.h. * platform/text/LocalizedDate.h: (WebCore): Move some functions from LocalizedCalendar.h. * platform/text/LocalizedDateICU.cpp: Move some functions from LocalizedCalendarICU.cpp. 2012-04-24 Pavel Feldman Web Inspector: remove pure delegation code from DebuggerPresentationModel https://bugs.webkit.org/show_bug.cgi?id=84704 Reviewed by Yury Semikhatsky. This change removes the code that delegates calls to breakpoint manager and exposes the breakpoint manager in debugger presentation model itself. It allows narrowing dpm dependencies. * inspector/front-end/BreakpointsSidebarPane.js: (WebInspector.JavaScriptBreakpointsSidebarPane): (WebInspector.JavaScriptBreakpointsSidebarPane.prototype._breakpointCheckboxClicked): (WebInspector.JavaScriptBreakpointsSidebarPane.prototype._breakpointContextMenu): (WebInspector.JavaScriptBreakpointsSidebarPane.prototype._contextMenu): * inspector/front-end/DebuggerModel.js: (WebInspector.DebuggerModel.prototype.debuggerPausedDetails): (WebInspector.DebuggerModel.prototype.createRawLocationByURL): (WebInspector.DebuggerModel.prototype.isPaused): * inspector/front-end/DebuggerPresentationModel.js: (WebInspector.DebuggerPresentationModel.prototype.get breakpointManager): (WebInspector.DebuggerPresentationModel.prototype._debuggerPaused): (WebInspector.DebuggerPresentationModelResourceBinding.prototype._setContentWithInitialContent): * inspector/front-end/JavaScriptSource.js: (WebInspector.JavaScriptSource): (WebInspector.JavaScriptSource.prototype.consoleMessagesCleared): (WebInspector.JavaScriptSource.prototype.findBreakpoint): (WebInspector.JavaScriptSource.prototype.setBreakpoint): (WebInspector.JavaScriptSource.prototype.setBreakpointEnabled): (WebInspector.JavaScriptSource.prototype.removeBreakpoint): (WebInspector.JavaScriptSource.prototype.updateBreakpoint): (WebInspector.JavaScriptSource.prototype.continueToLine): (WebInspector.JavaScriptSource.prototype.canSetContent): (WebInspector.JavaScriptSource.prototype.setContent): (WebInspector.JavaScriptSource.prototype.updateBreakpointsAfterLiveEdit): * inspector/front-end/JavaScriptSourceFrame.js: (WebInspector.JavaScriptSourceFrame.prototype.canEditSource): (WebInspector.JavaScriptSourceFrame.prototype.editContent): (WebInspector.JavaScriptSourceFrame.prototype._onContentChanged): (WebInspector.JavaScriptSourceFrame.prototype.populateLineGutterContextMenu.else.editBreakpointCondition.didEditBreakpointCondition): (WebInspector.JavaScriptSourceFrame.prototype.populateLineGutterContextMenu.else): (WebInspector.JavaScriptSourceFrame.prototype.populateLineGutterContextMenu): (WebInspector.JavaScriptSourceFrame.prototype.beforeTextChanged): (WebInspector.JavaScriptSourceFrame.prototype._getPopoverAnchor): (WebInspector.JavaScriptSourceFrame.prototype._resolveObjectForPopover.showObjectPopover): (WebInspector.JavaScriptSourceFrame.prototype._resolveObjectForPopover): (WebInspector.JavaScriptSourceFrame.prototype._setBreakpoint): (WebInspector.JavaScriptSourceFrame.prototype._onMouseDown): * inspector/front-end/ScopeChainSidebarPane.js: (WebInspector.ScopeChainSidebarPane.prototype.update): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype._debuggerPaused.else.didGetUILocation): (WebInspector.ScriptsPanel.prototype._debuggerPaused): 2012-04-24 Yury Semikhatsky Web Inspector: native nodes may have snapshot id less than base snapshot max JS object id https://bugs.webkit.org/show_bug.cgi?id=84681 Make sure new nodes whose IDs less than base snapshot max JS object id will get into snapshot delta. Reviewed by Pavel Feldman. Test: inspector/profiler/heap-snapshot-comparison-dom-groups-change.html * inspector/front-end/HeapSnapshot.js: (WebInspector.HeapSnapshot.prototype._calculateDiffForClass): * inspector/front-end/HeapSnapshotDataGrids.js: (WebInspector.HeapSnapshotSortableDataGrid): Drive-by fix, made recursion counter a normal field on HeapSnapshotSortableDataGrid. (WebInspector.HeapSnapshotSortableDataGrid.prototype.recursiveSortingEnter): (WebInspector.HeapSnapshotSortableDataGrid.prototype.recursiveSortingLeave): 2012-04-24 Sheriff Bot Unreviewed, rolling out r115000. http://trac.webkit.org/changeset/115000 https://bugs.webkit.org/show_bug.cgi?id=84703 Breaks webkit_unit_tests on Mac in Chromium: http://build.chromium.org/p/chromium.webkit/builders/Webkit%20Mac10.6/builds/15157 (Requested by mnaganov on #webkit). * platform/graphics/skia/OpaqueRegionSkia.cpp: (WebCore::paintIsOpaque): (WebCore::OpaqueRegionSkia::popCanvasLayer): (WebCore::OpaqueRegionSkia::didDraw): (WebCore::OpaqueRegionSkia::didDrawUnbounded): (WebCore::OpaqueRegionSkia::markRectAsOpaque): (WebCore::OpaqueRegionSkia::markRectAsNonOpaque): * platform/graphics/skia/OpaqueRegionSkia.h: (OpaqueRegionSkia): (WebCore::OpaqueRegionSkia::CanvasLayerState::CanvasLayerState): (CanvasLayerState): * platform/graphics/skia/PlatformContextSkia.cpp: (WebCore::PlatformContextSkia::restoreLayer): 2012-04-23 Antti Koivisto Consolidate external stylesheet quirks handling to StyleSheetInternal https://bugs.webkit.org/show_bug.cgi?id=84632 Reviewed by Andreas Kling. Move the repeated code from StyleImportRule and HTMLLinkElement to StyleSheetInternal::parseUserStyleSheet. Remove a BUILDING_ON_LEOPARD-only quirk. * css/CSSImportRule.cpp: (WebCore::StyleRuleImport::setCSSStyleSheet): * css/CSSParser.cpp: (WebCore): (WebCore::CSSParserContext::CSSParserContext): Add new settings bits to the CSSParserContext. These are used for external stylesheet parsing quirks. * css/CSSParserMode.h: (CSSParserContext): * css/CSSStyleSheet.cpp: (WebCore::StyleSheetInternal::parseUserStyleSheet): (WebCore::StyleSheetInternal::parseString): (WebCore): (WebCore::StyleSheetInternal::parseStringAtLine): * css/CSSStyleSheet.h: (WebCore): (StyleSheetInternal): * html/HTMLLinkElement.cpp: (WebCore::HTMLLinkElement::setCSSStyleSheet): 2012-04-24 Yael Aharon [Qt] Move notification icon download out of WebCore https://bugs.webkit.org/show_bug.cgi?id=80700 Reviewed by Simon Hausmann. Remove the code that downloads the notification's icon out of WebCore. Other ports let the client decide if to download the icon or not. No new tests. This patch is only removing code. * notifications/Notification.cpp: (WebCore::Notification::~Notification): (WebCore::Notification::show): (WebCore::Notification::close): (WebCore::Notification::contextDestroyed): * notifications/Notification.h: (Notification): 2012-04-24 Rakesh KN RadioNodeList support in HTMLFormElement::elements https://bugs.webkit.org/show_bug.cgi?id=81854 Implement RadioNodeList support spec'ed at http://www.whatwg.org/specs/web-apps/current-work/multipage/common-dom-interfaces.html#radionodelist Reviewed by Ryosuke Niwa. Test: fast/forms/form-collection-radio-node-list.html * CMakeLists.txt: Added entries for new files. * DerivedSources.cpp: Ditto. * DerivedSources.make: Ditto. * DerivedSources.pri: Ditto. * GNUmakefile.list.am: Ditto. * Target.pri: Ditto. * WebCore.gypi: Ditto. * WebCore.vcproj/WebCore.vcproj: Ditto. * WebCore.xcodeproj/project.pbxproj: Ditto. * bindings/js/JSHTMLCollectionCustom.cpp: (WebCore::getNamedItems): Modified to create RadioNodeList object when FormControlCollection has more than one element of same name/id. * bindings/scripts/CodeGeneratorJS.pm: (GenerateImplementation): Added code to include Node.h and JSNode.h in JSRadioNodeElement.cpp. * bindings/v8/custom/V8HTMLCollectionCustom.cpp: (WebCore::getNamedItems): Modified to create RadioNodeList object when FormControlCollection has more than one element of same name/id. * html/CollectionType.h: Added new FormControls type. * html/HTMLCollection.cpp: (WebCore::HTMLCollection::shouldIncludeChildren): (WebCore::HTMLCollection::isAcceptableElement): Handle FormControls collection type. * html/HTMLFormCollection.cpp: (WebCore::HTMLFormCollection::HTMLFormCollection): Contruct collection of FormControls type. * html/RadioNodeList.cpp: Added. (WebCore): (WebCore::RadioNodeList::RadioNodeList): (WebCore::RadioNodeList::~RadioNodeList): (WebCore::toRadioButtonInputElement): (WebCore::RadioNodeList::value): (WebCore::RadioNodeList::setValue): (WebCore::RadioNodeList::nodeMatches): * html/RadioNodeList.h: Added. (WebCore): (RadioNodeList): (WebCore::RadioNodeList::create): RadioNodeList implementation. * html/RadioNodeList.idl: Added. Idl for generating RadioNodeList JS/V8 bindings. 2012-04-24 Benjamin Poulain Implement the field cache of ObjcClass in WebKit types https://bugs.webkit.org/show_bug.cgi?id=84667 Reviewed by Geoffrey Garen. Every time we get a field through the Objective-C bridge, we waste some time converting the incoming string to an CFString. This patch implement the field cache based on WTF types so that we can return directly in case of a positive match. When we do not have a match on the Identifier, we allocate the memory and find the valid field as before. * bridge/objc/objc_class.h: (ObjcClass): * bridge/objc/objc_class.mm: (JSC::Bindings::deleteMethod): (Bindings): (JSC::Bindings::ObjcClass::ObjcClass): (JSC::Bindings::ObjcClass::fieldNamed): 2012-04-23 Andy Estes Incremental rendering should be unsuppressed after the load event or a configurable timeout, whichever occurs first. https://bugs.webkit.org/show_bug.cgi?id=84583 Reviewed by Anders Carlsson. In high-latency situations, having incremental rendering suppression enabled makes for a worse experience due to the excessively long time it takes for the load event to fire. So that clients that opt in to incremental rendering suppression can mitigate this, add a configurable timeout in which rendering is re-enabled if the load event has yet to fire. * dom/Document.cpp: (WebCore::Document::Document): (WebCore::Document::setReadyState): When the document transitions to the loading state, start a timer; when it transitions to the completed state, allow visual updates. (WebCore::Document::setVisualUpdatesAllowed): If visual updates are allowed, force a repaint. Otherwise, set a flag that suppresses rendering. (WebCore::Document::visualUpdatesSuppressionTimerFired): When the timer fires, allow visual updates. (WebCore::Document::implicitClose): Remove code that is now called in setVisualUpdatesAllowed(). * dom/Document.h: (WebCore::Document::visualUpdatesAllowed): * page/Settings.cpp: (WebCore::Settings::Settings): * page/Settings.h: (WebCore::Settings::setIncrementalRenderingSuppressionTimeoutInSeconds): (WebCore::Settings::incrementalRenderingSuppressionTimeoutInSeconds): 2012-04-23 Dana Jansens [chromium] Image masks are considered opaque incorrectly https://bugs.webkit.org/show_bug.cgi?id=84275 Reviewed by Adrienne Walker. Match the behaviour of SkCanvas layers more closely while tracking opaque paints. SkCanvas layers actually act as a separate device (ie. pixels) and when the layer is popped off, the pixels are copied down to the layer below. While we can use the total clip to decide what pixels the the drawing operation will affect in the final device, the blending down through layers needs to consider each layer carefully. In this case the image mask is drawn into a layer which is copied down using the DestinationIn operation. Since the layer contains non-opaque pixels, the DestinationIn copy can destroy opaque areas in the next layer. We add OpaqueRegionSkia::FillByCopy to distinguish the case where we are copying a block of pixels, and the alpha values are essentially unknown. Unit test: PlatformContextSkiaTest.trackImageMask PlatformContextSkiaTest.trackImageMaskWithOpaqueRect * platform/graphics/skia/OpaqueRegionSkia.cpp: (WebCore::paintIsOpaque): (WebCore::OpaqueRegionSkia::applyOpaqueRegionFromLayer): (WebCore::OpaqueRegionSkia::pushCanvasLayer): (WebCore::OpaqueRegionSkia::popCanvasLayer): (WebCore::OpaqueRegionSkia::didDrawRect): (WebCore::OpaqueRegionSkia::didDrawPath): (WebCore::OpaqueRegionSkia::didDrawPoints): (WebCore::OpaqueRegionSkia::didDrawBounded): (WebCore::OpaqueRegionSkia::didDraw): (WebCore::OpaqueRegionSkia::didDrawUnbounded): (WebCore::OpaqueRegionSkia::markRectAsOpaque): (WebCore::OpaqueRegionSkia::markRectAsNonOpaque): (WebCore::OpaqueRegionSkia::markAllAsNonOpaque): * platform/graphics/skia/OpaqueRegionSkia.h: (OpaqueRegionSkia): (CanvasLayerState): * platform/graphics/skia/PlatformContextSkia.cpp: (WebCore::PlatformContextSkia::restoreLayer): 2012-04-23 Kent Tamura Show the format indicator in a date field https://bugs.webkit.org/show_bug.cgi?id=83872 Reviewed by Hajime Morita. Enable the fixed placeholder feature for the date type, and show the editable date format as the fixed placeholder. The format string is created by the following steps. 1. Obtain a pattern string from ICU http://icu-project.org/apiref/icu4c/classSimpleDateFormat.html#details 2. Replace a sequence of 'y', 'Y', 'M', or 'd' in the pattern with a natural language string such as "year", "month", or "day". Test: fast/forms/date/date-fixed-placeholder.html * html/DateInputType.cpp: (WebCore::DateInputType::supportsPlaceholder): Added. Returns true. (WebCore::DateInputType::usesFixedPlaceholder): Added. Returns true. (WebCore::DateInputType::fixedPlaceholder): Added. Calls localizedDateFormatText() provided by LocalizedDate.h. * html/DateInputType.h: (DateInputType): Add declarations of new override functions. * platform/LocalizedStrings.h: (WebCore): Add dateFormat{Year,Month,DayInMonth}Text() * platform/text/ICULocale.cpp: (WebCore::isICUYearSymbol): A function to improve redability. (WebCore::isICUMonthSymbol): ditto. (WebCore::isICUDayInMonthSymbol): ditto. (WebCore::localizeFormat): Step 2 of the above description. (WebCore::ICULocale::initializeLocalizedDateFormatText): Step 1 of the above description. (WebCore::ICULocale::localizedDateFormatText): * platform/text/ICULocale.h: (ICULocale): Add new functions and a data member. * platform/text/LocalizedDate.h: (WebCore): Add localizedDateFormatText(). * platform/text/LocalizedDateICU.cpp: (WebCore::localizedDateFormatText): Just call ICULocale::localizedDateFormatText(). 2012-04-23 Kentaro Hara [V8] Pass Isolate to v8Array() https://bugs.webkit.org/show_bug.cgi?id=84295 Reviewed by Nate Chapin. The final objective is to pass Isolate around in V8 bindings. This patch passes the Isolate to v8Array(). (GenerateNormalAttrGetter): (NativeToJSValue): * bindings/scripts/test/V8/V8TestObj.cpp: (WebCore::TestObjV8Internal::sequenceAttrAttrGetter): (WebCore::TestObjV8Internal::methodReturningSequenceCallback): * bindings/v8/V8Binding.h: (WebCore::v8Array): 2012-04-23 Kentaro Hara [V8] Pass Isolate to GetNamedProperty() https://bugs.webkit.org/show_bug.cgi?id=84277 Reviewed by Nate Chapin. The objective is to pass Isolate around in V8 bindings. This patch passes Isolate to GetNamedProperty(). (GenerateHeader): * bindings/v8/V8DOMWindowShell.cpp: (WebCore::getter): * bindings/v8/custom/V8HTMLDocumentCustom.cpp: (WebCore::V8HTMLDocument::GetNamedProperty): (WebCore::V8HTMLDocument::allAccessorGetter): 2012-04-23 Michael Nordman [chromium] DomStorage event handling mods. https://bugs.webkit.org/show_bug.cgi?id=84387 Add a few simple inline getters to allow the source Document of a storage event to be identified given a pointer to the source StorageArea so those Documents can be excluded by the event dispatching logic. Reviewed by Dimitri Glazkov. No new tests. No new functionality or change in behavior. * page/DOMWindow.h: (WebCore::DOMWindow::optionalSessionStorage): simple inline getter to avoid construction where possible (WebCore::DOMWindow::optionalLocalStorage): ditto * storage/Storage.h: (WebCore::Storage::area): simple inline getter 2012-04-23 Kenneth Russell Change ImageData to reference Uint8ClampedArray rather than CanvasPixelArray https://bugs.webkit.org/show_bug.cgi?id=73011 Reviewed by Oliver Hunt. Changed ImageData to contain Uint8ClampedArray instead of ByteArray per current HTML5 spec. In order to avoid introducing large data copies, it was necessary to switch a few other places in WebKit to use Uint8ClampedArray at the same time, most notably the FilterEffect implementation, portions of ImageBuffer, and a couple of places in the image encoders. Note that the change in method name from "get" to "item" occurred because JSC's autogenerated indexed getters reference a method called "item". If desired, a convenience method could be introduced to avoid the renamings in the FilterEffect classes. With these changes, ByteArray and some custom code in JavaScriptCore actually become unreferenced, and can be deleted. This deletion will be done separately in Bug 83655, to keep the size of this patch manageable. Test: fast/canvas/imagedata-contains-uint8clampedarray.html * bindings/js/JSImageDataCustom.cpp: (WebCore::toJS): * bindings/js/SerializedScriptValue.cpp: (WebCore::CloneSerializer::dumpIfTerminal): (WebCore::CloneDeserializer::readTerminal): * bindings/v8/SerializedScriptValue.cpp: * bindings/v8/custom/V8ImageDataCustom.cpp: (WebCore::toV8): * bridge/qt/qt_pixmapruntime.cpp: (JSC::Bindings::QtPixmapToImageDataMethod::invoke): * html/ImageData.cpp: (WebCore::ImageData::create): (WebCore::ImageData::ImageData): * html/ImageData.h: (ImageData): (WebCore::ImageData::data): * html/ImageData.idl: * html/canvas/CanvasRenderingContext2D.cpp: (WebCore::createEmptyImageData): (WebCore::CanvasRenderingContext2D::getImageData): (WebCore::CanvasRenderingContext2D::putImageData): * platform/graphics/GraphicsContext3D.cpp: (WebCore::GraphicsContext3D::extractImageData): * platform/graphics/ImageBuffer.cpp: (WebCore::ImageBuffer::genericConvertToLuminanceMask): * platform/graphics/ImageBuffer.h: * platform/graphics/ShadowBlur.cpp: (WebCore::ShadowBlur::blurShadowBuffer): * platform/graphics/cairo/ImageBufferCairo.cpp: (WebCore::getImageData): (WebCore::ImageBuffer::getUnmultipliedImageData): (WebCore::ImageBuffer::getPremultipliedImageData): (WebCore::ImageBuffer::putByteArray): * platform/graphics/cg/ImageBufferCG.cpp: (WebCore::ImageBuffer::getUnmultipliedImageData): (WebCore::ImageBuffer::getPremultipliedImageData): (WebCore::ImageBuffer::putByteArray): (WebCore::ImageBuffer::toDataURL): (WebCore::ImageDataToDataURL): * platform/graphics/cg/ImageBufferDataCG.cpp: (WebCore::ImageBufferData::getData): (WebCore::ImageBufferData::putData): * platform/graphics/cg/ImageBufferDataCG.h: (ImageBufferData): * platform/graphics/filters/FEBlend.cpp: (WebCore::FEBlend::platformApplySoftware): * platform/graphics/filters/FEColorMatrix.cpp: (WebCore::effectType): (WebCore::FEColorMatrix::platformApplySoftware): * platform/graphics/filters/FEComponentTransfer.cpp: (WebCore::FEComponentTransfer::platformApplySoftware): * platform/graphics/filters/FEComposite.cpp: (WebCore::FEComposite::platformArithmeticSoftware): (WebCore::FEComposite::platformApplySoftware): * platform/graphics/filters/FEComposite.h: * platform/graphics/filters/FEConvolveMatrix.cpp: (WebCore::setDestinationPixels): (WebCore::FEConvolveMatrix::fastSetInteriorPixels): (WebCore::FEConvolveMatrix::fastSetOuterPixels): (WebCore::FEConvolveMatrix::platformApplySoftware): * platform/graphics/filters/FEConvolveMatrix.h: (PaintingData): * platform/graphics/filters/FECustomFilter.cpp: (WebCore::FECustomFilter::platformApplySoftware): (WebCore::FECustomFilter::bindProgramAndBuffers): * platform/graphics/filters/FECustomFilter.h: (JSC): (FECustomFilter): * platform/graphics/filters/FEDisplacementMap.cpp: (WebCore::FEDisplacementMap::platformApplySoftware): * platform/graphics/filters/FEDropShadow.cpp: (WebCore::FEDropShadow::platformApplySoftware): * platform/graphics/filters/FEGaussianBlur.cpp: (WebCore::boxBlur): (WebCore::FEGaussianBlur::platformApplyGeneric): (WebCore::FEGaussianBlur::platformApply): (WebCore::FEGaussianBlur::platformApplySoftware): * platform/graphics/filters/FEGaussianBlur.h: (PlatformApplyParameters): (FEGaussianBlur): * platform/graphics/filters/FELighting.cpp: (WebCore::FELighting::LightingData::topLeft): (WebCore::FELighting::LightingData::topRow): (WebCore::FELighting::LightingData::topRight): (WebCore::FELighting::LightingData::leftColumn): (WebCore::FELighting::LightingData::interior): (WebCore::FELighting::LightingData::rightColumn): (WebCore::FELighting::LightingData::bottomLeft): (WebCore::FELighting::LightingData::bottomRow): (WebCore::FELighting::LightingData::bottomRight): (WebCore::FELighting::inlineSetPixel): (WebCore::FELighting::drawLighting): (WebCore::FELighting::platformApplySoftware): * platform/graphics/filters/FELighting.h: (LightingData): (FELighting): * platform/graphics/filters/FEMorphology.cpp: (WebCore::FEMorphology::platformApplyGeneric): (WebCore::FEMorphology::platformApplySoftware): * platform/graphics/filters/FEMorphology.h: (PaintingData): * platform/graphics/filters/FETurbulence.cpp: (WebCore::FETurbulence::fillRegion): (WebCore::FETurbulence::platformApplySoftware): * platform/graphics/filters/FETurbulence.h: (FillRegionParameters): (FETurbulence): * platform/graphics/filters/FilterEffect.cpp: (WebCore::FilterEffect::forceValidPreMultipliedPixels): (WebCore::FilterEffect::asUnmultipliedImage): (WebCore::FilterEffect::asPremultipliedImage): (WebCore::FilterEffect::copyImageBytes): (WebCore::FilterEffect::copyUnmultipliedImage): (WebCore::FilterEffect::copyPremultipliedImage): (WebCore::FilterEffect::createUnmultipliedImageResult): (WebCore::FilterEffect::createPremultipliedImageResult): * platform/graphics/filters/FilterEffect.h: (FilterEffect): * platform/graphics/filters/arm/FEGaussianBlurNEON.h: (WebCore::FEGaussianBlur::platformApplyNeon): * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp: (WebCore::GraphicsContext3D::paintRenderingResultsToImageData): * platform/graphics/qt/ImageBufferQt.cpp: (WebCore::getImageData): (WebCore::ImageBuffer::getUnmultipliedImageData): (WebCore::ImageBuffer::getPremultipliedImageData): (WebCore::ImageBuffer::putByteArray): * platform/graphics/skia/ImageBufferSkia.cpp: (WebCore::getImageData): (WebCore::ImageBuffer::getUnmultipliedImageData): (WebCore::ImageBuffer::getPremultipliedImageData): (WebCore::ImageBuffer::putByteArray): * platform/graphics/texmap/TextureMapperGL.cpp: * platform/graphics/wince/ImageBufferWinCE.cpp: (WebCore::getImageData): (WebCore::ImageBuffer::getUnmultipliedImageData): (WebCore::ImageBuffer::getPremultipliedImageData): (WebCore::ImageBuffer::putByteArray): * platform/graphics/wx/ImageBufferWx.cpp: (WebCore::ImageBuffer::getUnmultipliedImageData): (WebCore::ImageBuffer::getPremultipliedImageData): (WebCore::ImageBuffer::putByteArray): * platform/image-encoders/skia/JPEGImageEncoder.cpp: (WebCore::JPEGImageEncoder::encode): * platform/image-encoders/skia/PNGImageEncoder.cpp: (WebCore::PNGImageEncoder::encode): * platform/image-encoders/skia/WEBPImageEncoder.cpp: (WebCore::WEBPImageEncoder::encode): 2012-04-23 Ryan Sleevi [chromium] Remove deleted files from WebCore.gypi and fix typo https://bugs.webkit.org/show_bug.cgi?id=84651 Reviewed by Ryosuke Niwa. No new tests. No behavior change. * WebCore.gypi: Remove references to PlatformMouseEventQt.cpp and WheelEventQt.cpp. Add a missing comma. 2012-04-23 Erik Arvidsson [V8] Fix issue with trying to access a constructor in a frame that has been removed https://bugs.webkit.org/show_bug.cgi?id=84640 Reviewed by Kentaro Hara. This regressed in r113250. Now we do what we did before and return undefined if the frame does not have a context. Test: fast/dom/constructor-in-removed-frame.html * bindings/v8/V8DOMWrapper.cpp: (WebCore::V8DOMWrapper::constructorForType): 2012-04-23 Chris Rogers Oscillator::setWaveTable() should not reset oscillator phase https://bugs.webkit.org/show_bug.cgi?id=84647 Reviewed by Kenneth Russell. * Modules/webaudio/Oscillator.cpp: (WebCore::Oscillator::setWaveTable): 2012-04-23 Kentaro Hara [V8][Refactoring] Remove V8Proxy::throwSyntaxError() https://bugs.webkit.org/show_bug.cgi?id=84627 Reviewed by Nate Chapin. This patch removes V8Proxy::throwSyntaxError() since it is no longer used. No tests. No change in behavior. * bindings/v8/V8Proxy.cpp: * bindings/v8/V8Proxy.h: (V8Proxy): 2012-04-18 James Robinson [chromium] Use TextureLayerChromium for WebGL content instead of a dedicated layer type https://bugs.webkit.org/show_bug.cgi?id=84311 Reviewed by Adrienne Walker. WebGL content's interface with the compositor can be expressed in terms of two basic operations: 1.) Do some stuff 2.) Provide a texture ID for the compositor to use This implements (1) in DrawingBufferChromium and uses the already-existing TextureLayerChromium to handle (2). This cuts down the compositor interface significantly and allows for more code reuse in exchange for more code in TextureLayerChromium to handle the features WebGL needs. * WebCore.gypi: * platform/graphics/chromium/DrawingBufferChromium.cpp: (WebCore::DrawingBuffer::~DrawingBuffer): (DrawingBufferPrivate): (WebCore::DrawingBufferPrivate::DrawingBufferPrivate): (WebCore::DrawingBufferPrivate::~DrawingBufferPrivate): (WebCore::DrawingBufferPrivate::layer): (WebCore): (WebCore::DrawingBuffer::platformLayer): * platform/graphics/chromium/LayerRendererChromium.cpp: * platform/graphics/chromium/TextureLayerChromium.h: (TextureLayerChromiumClient): (WebCore::TextureLayerChromiumClient::~TextureLayerChromiumClient): (WebCore): (TextureLayerChromium): (WebCore::TextureLayerChromium::clearClient): * platform/graphics/chromium/WebGLLayerChromium.cpp: Removed. * platform/graphics/chromium/WebGLLayerChromium.h: Removed. * platform/graphics/gpu/DrawingBuffer.h: (WebCore): (WebCore::DrawingBuffer::graphicsContext3D): (DrawingBuffer): 2012-04-23 Alec Flett IndexedDB: remove IDB(Index|ObjectStore)BackendImpl::get/getKey for IDBKey https://bugs.webkit.org/show_bug.cgi?id=84285 Reviewed by Dimitri Glazkov. No new tests required, this code is no longer called. This is old code supporting IDBKey-based lookup, supplanted by IDBKeyRange. Now that chromium IPC/proxy code has landed, these functions can be removed. * Modules/indexeddb/IDBIndexBackendInterface.h: (IDBIndexBackendInterface): * Modules/indexeddb/IDBObjectStoreBackendInterface.h: (IDBObjectStoreBackendInterface): 2012-04-22 Martin Robinson REGRESSION(113604): [Soup] Some pages that use synchronous XMLHttpRequests freeze the browser https://bugs.webkit.org/show_bug.cgi?id=84560 Reviewed by Xan Lopez. When kicking off a synchronous XMLHttpRequest, add one to the connection limit. This ensures that when a page starts a synchronous request, while already at the connection limit the request will not deadlock. * platform/network/soup/ResourceHandleSoup.cpp: (WebCore::WebCoreSynchronousLoader::WebCoreSynchronousLoader): Accept a new SoupSession argument so that we can get the correct SoupSession for the networking context. Bump the connection limit. (WebCore::WebCoreSynchronousLoader::~WebCoreSynchronousLoader): Decrement the connection limit. (WebCore::WebCoreSynchronousLoader::adjustMaxConnections): Added this helper. (WebCoreSynchronousLoader): Added a new SoupSession member. (WebCore::sessionFromContext): Added this helper. (WebCore::ResourceHandleInternal::soupSession): Use the new sessionFromContext helper. (WebCore::ResourceHandle::loadResourceSynchronously): Pass the SoupSession from the NetworkingContext to the synchronous loader. 2012-04-23 Sheriff Bot Unreviewed, rolling out r114965. http://trac.webkit.org/changeset/114965 https://bugs.webkit.org/show_bug.cgi?id=84665 Four new resource load delegate test failures (Requested by jernoble on #webkit). * loader/SubresourceLoader.cpp: (WebCore::SubresourceLoader::didFinishLoading): (WebCore::SubresourceLoader::didFail): (WebCore::SubresourceLoader::willCancel): (WebCore::SubresourceLoader::releaseResources): 2012-04-23 Beth Dakin https://bugs.webkit.org/show_bug.cgi?id=84649 RenderMathMLOperator currently ignores font families, fails to use Stix Reviewed by Dan Bernstein. This patch makes RenderMathMLOperator honor the font-family list. This means that by default, Stix glyphs will now be used for operators just like for other MathML content. Unfortunately, just doing that resulted in a bug because of the fragile hardcoded glyph sizes. The Stix vertical bar glyph is much smaller than the code assumed any glyphs would be. That code should be re-written, but in the meantime, I put a fix in place to try to make it work for small glyphs. These new functions should be used instead of accessing gGlyphHeight or gGlyphLineHeight directly. If the glyph is smaller than the expected hardcoded value, then the actual glyph height is used, and a new line height based on the glyph height is used. (WebCore::RenderMathMLOperator::glyphHeightForCharacter): (WebCore::RenderMathMLOperator::lineHeightForCharacter): Use the style's FontDescription to honor the font family list and the style's FontSelector to honor @font-face. Also use glyphHeightForCharacter() instead of gGlyphHeight. And now that createGlyph() takes a lineHeight, use lineHeightForCharacter() to determine the right value. (WebCore::RenderMathMLOperator::updateFromElement): size was an ambiguous variable name, so I renamed it to the more accurate maxHeightForRenderer. This function also now takes a lineHeight instead of using gGlyphLineHeight. And again, use the style's FontDescription and FontSelector. (WebCore::RenderMathMLOperator::createStackableStyle): Re-name size to maxHeightForRenderer, and take lineHeight as a parameter. (WebCore::RenderMathMLOperator::createGlyph): * rendering/mathml/RenderMathMLOperator.h: (RenderMathMLOperator): 2012-04-23 Eriq Augustine Return value from executed script in Chromium. https://bugs.webkit.org/show_bug.cgi?id=79851 Reviewed by Adam Barth. Providing a varaiant of evaluateScriptInIsolatedWorld that returns the value of the evaluated script. Test: platform/chromium/http/tests/misc/execute-and-return-value.html * bindings/v8/ScriptController.cpp: (WebCore::ScriptController::evaluateInIsolatedWorld): * bindings/v8/ScriptController.h: (ScriptController): * bindings/v8/V8Proxy.cpp: (WebCore::V8Proxy::evaluateInIsolatedWorld): * bindings/v8/V8Proxy.h: (V8Proxy): 2012-04-23 Kent Tamura RenderDetailsMarker should draw the triangle inside the content box https://bugs.webkit.org/show_bug.cgi?id=84557 Reviewed by Hajime Morita. RenderDetailsMarker didn't support cases in which a marker has borders and/or padings, or non-square size. Test: fast/html/details-marker-style.html * rendering/RenderDetailsMarker.cpp: (WebCore::RenderDetailsMarker::getPath): Scale by contentWidth() and contentHeight(). (WebCore::RenderDetailsMarker::paint): Move the trianle origin by the ammount of left/top borders and paddings. 2012-04-23 Kentaro Hara [V8] Pass Isolate to toV8() (Part6) https://bugs.webkit.org/show_bug.cgi?id=84273 Reviewed by Nate Chapin. The objective is to pass Isolate to all toV8()s. Since there are a lot of toV8()s, I'll make the change step by step. This patch passes Isolate to toV8() in several custom bindings. No tests. No change in behavior. * bindings/v8/custom/V8HTMLAllCollectionCustom.cpp: (WebCore::getNamedItems): (WebCore::getItem): (WebCore::V8HTMLAllCollection::namedPropertyGetter): (WebCore::V8HTMLAllCollection::itemCallback): (WebCore::V8HTMLAllCollection::namedItemCallback): (WebCore::V8HTMLAllCollection::callAsFunctionCallback): * bindings/v8/custom/V8HTMLCollectionCustom.cpp: (WebCore::getNamedItems): (WebCore::V8HTMLCollection::namedPropertyGetter): (WebCore::V8HTMLCollection::namedItemCallback): (WebCore::toV8): * bindings/v8/custom/V8SVGPathSegCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8StyleSheetCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8StyleSheetListCustom.cpp: (WebCore::V8StyleSheetList::namedPropertyGetter): * bindings/v8/custom/V8TrackEventCustom.cpp: (WebCore::V8TrackEvent::trackAccessorGetter): * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp: (WebCore::toV8Object): (WebCore::getObjectParameter): (WebCore::V8WebGLRenderingContext::getAttachedShadersCallback): (WebCore::V8WebGLRenderingContext::getExtensionCallback): (WebCore::V8WebGLRenderingContext::getFramebufferAttachmentParameterCallback): (WebCore::V8WebGLRenderingContext::getParameterCallback): (WebCore::V8WebGLRenderingContext::getProgramParameterCallback): (WebCore::V8WebGLRenderingContext::getShaderParameterCallback): (WebCore::V8WebGLRenderingContext::getUniformCallback): * bindings/v8/custom/V8XMLHttpRequestCustom.cpp: (WebCore::V8XMLHttpRequest::responseAccessorGetter): * bindings/v8/custom/V8XSLTProcessorCustom.cpp: (WebCore::V8XSLTProcessor::transformToFragmentCallback): (WebCore::V8XSLTProcessor::transformToDocumentCallback): 2012-04-23 Kent Tamura Move the content of LocalizedCalendarICU.cpp and LocalizedDateICU.cpp to ICULocale.cpp. https://bugs.webkit.org/show_bug.cgi?id=84568 Reviewed by Hajime Morita. Move it to ICULocal.cpp because we want to share UDateFormat object in LocalizedDate functions and LocalizedCalendar functions, and it becomes easier to cache the UDateFormat object, and making unit tests for these functions easier. No new tests because of no bahevior changes. * platform/text/ICULocale.cpp: (WebCore::ICULocale::ICULocale): Initialize new members. (WebCore::ICULocale::~ICULocale): Delete m_shortDateFormat. (WebCore::ICULocale::initializeShortDateFormat): Moved from creteShortDateFormatter of LocalizedDateICU.cpp. (WebCore::ICULocale::parseLocalizedDate): Moved from LocalizedDate.cpp, use m_shortDateFormat. (WebCore::ICULocale::formatLocalizedDate): ditto. (WebCore::ICULocale::createLabelVector): Moved from LocalizedCalendarICU.cpp, use m_shortDateFormat. (WebCore::createFallbackMonthLabels): Moved from LocalizedCalendarICU.cpp. (WebCore::createFallbackWeekDayShortLabels): ditto. (WebCore::ICULocale::initializeCalendar): lazy initialization of m_monthLabels, m_weekDayShortLabels, and m_firstDayOfWeek. (WebCore::ICULocale::monthLabels): (WebCore::ICULocale::weekDayShortLabels): (WebCore::ICULocale::firstDayOfWeek): * platform/text/ICULocale.h: (ICULocale): Add declarations. * platform/text/LocalizedCalendarICU.cpp: (WebCore::monthLabels): Use ICULocale::currentLocale(). (WebCore::weekDayShortLabels): ditto. (WebCore::firstDayOfWeek): ditto. * platform/text/LocalizedDateICU.cpp: (WebCore::parseLocalizedDate): ditto. (WebCore::formatLocalizedDate): ditto. 2012-04-23 Raymond Toy Move AudioDestinationChromium FIFO class to its own class. https://bugs.webkit.org/show_bug.cgi?id=84058 Reviewed by Chris Rogers. Current tests cover the changes. * WebCore.gypi: Update with new files. * platform/audio/AudioPullFIFO.cpp: Copied from Source/WebKit/chromium/src/AudioDestinationChromium.cpp. (WebCore): Renamed old class the AudioPullFIFO. (WebCore::AudioPullFIFO::AudioPullFIFO): (WebCore::AudioPullFIFO::consume): (WebCore::AudioPullFIFO::findWrapLengths): (WebCore::AudioPullFIFO::fillBuffer): * platform/audio/AudioPullFIFO.h: Added. (WebCore): (AudioPullFIFO): (WebCore::AudioPullFIFO::updateIndex): 2012-04-23 Nate Chapin REGRESSION (r100311): YummySoup app crashes when trying to print https://bugs.webkit.org/show_bug.cgi?id=83918 Reviewed by Alexey Proskuryakov. Test: http/tests/xmlhttprequest/cancel-during-failure-crash.html * loader/SubresourceLoader.cpp: (WebCore::SubresourceLoader::didFinishLoading): (WebCore::SubresourceLoader::didFail): (WebCore::SubresourceLoader::willCancel): Now that we might enter the function if we're already Finishing, some cleanup needs to be done in the Initialized state only. (WebCore::SubresourceLoader::releaseResources): Move requesting counting decrement and laodDone() to the finishing functions. 2012-04-23 Shawn Singh [chromium] Visualize accelerated compositor rects. https://bugs.webkit.org/show_bug.cgi?id=79400 Reviewed by Adrienne Walker. No tests, all the code added is only debugging code. This patch adds support for visualizing three different types of rects on the chromium heads-up display: 1. updateRects that indicate what was painted/uploaded to a resource 2. propertyChangedRects that indicate layers that has property changes 3. surfaceDamageRects that are the accumulation of updateRects and propertyChangedRects, indicating what pixels on the screen have actually changed. (Surface damage also accounts for newly exposed areas but that is not explicitly visualized.) In addition to adding support for visualizing this, the CCHeadsUpDisplay was significantly refactored, separating the FPS Counter functionality into a different class, so that the heads-up display is all about visualizing annotations, and those annotations (frame rate, debug rects) are logged separately. * WebCore.gypi: * platform/graphics/chromium/cc/CCDebugRectHistory.cpp: Added. (WebCore): (WebCore::CCDebugRectHistory::CCDebugRectHistory): (WebCore::CCDebugRectHistory::enabled): (WebCore::CCDebugRectHistory::saveDebugRectsForCurrentFrame): (WebCore::CCDebugRectHistory::savePaintRects): (WebCore::CCDebugRectHistory::savePropertyChangedRects): (WebCore::CCDebugRectHistory::saveSurfaceDamageRects): * platform/graphics/chromium/cc/CCDebugRectHistory.h: Added. (WebCore): (WebCore::CCDebugRect::CCDebugRect): (CCDebugRect): (CCDebugRectHistory): (WebCore::CCDebugRectHistory::create): (WebCore::CCDebugRectHistory::debugRects): * platform/graphics/chromium/cc/CCFrameRateCounter.cpp: Added. (WebCore): (WebCore::safeMod): (WebCore::CCFrameRateCounter::frameIndex): (WebCore::CCFrameRateCounter::CCFrameRateCounter): (WebCore::CCFrameRateCounter::markBeginningOfFrame): (WebCore::CCFrameRateCounter::markEndOfFrame): (WebCore::CCFrameRateCounter::isBadFrameInterval): (WebCore::CCFrameRateCounter::isBadFrame): (WebCore::CCFrameRateCounter::getAverageFPSAndStandardDeviation): (WebCore::CCFrameRateCounter::timeStampOfRecentFrame): * platform/graphics/chromium/cc/CCFrameRateCounter.h: Added. (WebCore): (CCFrameRateCounter): (WebCore::CCFrameRateCounter::create): (WebCore::CCFrameRateCounter::currentFrameNumber): (WebCore::CCFrameRateCounter::timeStampHistorySize): * platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp: (WebCore): (WebCore::CCHeadsUpDisplay::enabled): (WebCore::CCHeadsUpDisplay::showDebugRects): (WebCore::CCHeadsUpDisplay::draw): (WebCore::CCHeadsUpDisplay::drawHudContents): (WebCore::CCHeadsUpDisplay::drawFPSCounter): (WebCore::CCHeadsUpDisplay::drawFPSCounterText): (WebCore::CCHeadsUpDisplay::drawDebugRects): * platform/graphics/chromium/cc/CCHeadsUpDisplay.h: (WebCore): (CCHeadsUpDisplay): (WebCore::CCHeadsUpDisplay::CCHeadsUpDisplay): * platform/graphics/chromium/cc/CCLayerTreeHost.h: (WebCore::CCSettings::CCSettings): (CCSettings): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::CCLayerTreeHostImpl): (WebCore::CCLayerTreeHostImpl::calculateRenderPasses): (WebCore::CCLayerTreeHostImpl::drawLayers): (WebCore::CCLayerTreeHostImpl::swapBuffers): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: (WebCore): (WebCore::CCLayerTreeHostImpl::fpsCounter): (WebCore::CCLayerTreeHostImpl::debugRectHistory): (CCLayerTreeHostImpl): 2012-04-23 Julien Chaffraix Cut dependency on RenderLayer::scrollRectToVisible outside rendering https://bugs.webkit.org/show_bug.cgi?id=84607 Reviewed by Simon Fraser. Layering fix only, there should be no change behavior. Because we don't have an accessor on RenderObject, a lot of the code needs to know about RenderLayer. This is not necessary and exposes RenderLayer to objects that shouldn't know about it. This patch adds a RenderObject::scrollRectToVisible with the ad-hoc explanation as to why it isn't on RenderBox (scrolling is a RenderBox concept). * WebCore.exp.in: * WebCore.order: Updated to expose the new method. * dom/Element.cpp: (WebCore::Element::scrollIntoView): (WebCore::Element::scrollIntoViewIfNeeded): (WebCore::Element::updateFocusAppearance): * editing/Editor.cpp: (WebCore::Editor::findStringAndScrollToVisible): * editing/FrameSelection.cpp: (WebCore::FrameSelection::revealSelection): * page/FrameView.cpp: (WebCore::FrameView::scrollToAnchor): Updated those call sites to use the new function. * rendering/RenderLayer.h: Removed ScrollBehavior.h #include and default argument values as we are always called through RenderObject now. * rendering/RenderObject.cpp: (WebCore::RenderObject::scrollRectToVisible): * rendering/RenderObject.h: Added a new function that just forwards to the enclosing layer if any. We return whether we actually tried to scroll to match some call sites expectations. 2012-04-23 Zhenyao Mo framebuffer binding should not be changed after canvas resize or compositing https://bugs.webkit.org/show_bug.cgi?id=84609 Reviewed by Kenneth Russell. Test: fast/canvas/webgl/framebuffer-bindings-unaffected-on-resize.html * html/canvas/WebGLRenderingContext.cpp: set framebuffer binding to DrawingBuffer. (WebCore): (WebCore::WebGLRenderingContext::bindFramebuffer): (WebCore::WebGLRenderingContext::deleteFramebuffer): (WebCore::WebGLRenderingContext::loseContextImpl): * platform/graphics/cairo/DrawingBufferCairo.cpp: initialize m_framebufferBinding. (WebCore::DrawingBuffer::DrawingBuffer): * platform/graphics/chromium/DrawingBufferChromium.cpp: Ditto. (WebCore::DrawingBuffer::DrawingBuffer): * platform/graphics/chromium/WebGLLayerChromium.cpp: Recover framebuffer binding after update(). (WebCore::WebGLLayerChromium::update): * platform/graphics/gpu/DrawingBuffer.cpp: Add a function to restore framebuffer binding. (WebCore::DrawingBuffer::restoreFramebufferBinding): (WebCore): * platform/graphics/gpu/DrawingBuffer.h: Ditto. (WebCore::DrawingBuffer::setTexture2DBinding): (DrawingBuffer): (WebCore::DrawingBuffer::setFramebufferBinding): * platform/graphics/gpu/mac/DrawingBufferMac.mm: initialize m_framebufferBinding. (WebCore::DrawingBuffer::DrawingBuffer): * platform/graphics/gpu/qt/DrawingBufferQt.cpp: initialize m_framebufferBinding. (WebCore::DrawingBuffer::DrawingBuffer): 2012-04-23 Victor Carbune Simplify volume slider rendering https://bugs.webkit.org/show_bug.cgi?id=82150 Reviewed by Eric Carlson. Test: media/video-controls-rendering-toggle-display-none.html * css/mediaControlsChromium.css: Update controls css for Chromium. (audio::-webkit-media-controls-panel, video::-webkit-media-controls-panel): (audio::-webkit-media-controls-mute-button, video::-webkit-media-controls-mute-button): (audio::-webkit-media-controls-volume-slider-container, video::-webkit-media-controls-volume-slider-container): * css/mediaControlsGtk.css: Update controls css for GTK. (audio::-webkit-media-controls-mute-button, video::-webkit-media-controls-mute-button): (audio::-webkit-media-controls-volume-slider-container, video::-webkit-media-controls-volume-slider-container): * css/mediaControlsQuickTime.css: Update controls css for Safari. (audio::-webkit-media-controls-mute-button, video::-webkit-media-controls-mute-button): (audio::-webkit-media-controls-volume-slider-container, video::-webkit-media-controls-volume-slider-container): (audio::-webkit-media-controls-volume-slider, video::-webkit-media-controls-volume-slider): * html/shadow/MediaControlElements.cpp: Removed particular renderer. (WebCore): * html/shadow/MediaControlElements.h: (MediaControlVolumeSliderContainerElement): Remoed particular renderer. * html/shadow/MediaControlRootElement.cpp: (WebCore::MediaControlRootElement::create): Added a div element as a container. Removed extra unused mute button. * html/shadow/MediaControlRootElementChromium.cpp: Added an extra div element as a container for the mute button and the volume slider to easily position them relative to each other. (WebCore::MediaControlRootElementChromium::create): 2012-04-23 Sheriff Bot Unreviewed, rolling out r109981. http://trac.webkit.org/changeset/109981 https://bugs.webkit.org/show_bug.cgi?id=84630 Broke Twitter map buddy icon (see https://bugs.webkit.org/show_bug.cgi?id=84558) (Requested by thorton on #webkit). * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::addToOverlapMap): (WebCore::RenderLayerCompositor::computeCompositingRequirements): 2012-04-23 Emil A Eklund Crash in RenderInline::clippedOverflowRectForRepaint for PrintPreview https://bugs.webkit.org/show_bug.cgi?id=84300 Reviewed by Simon Fraser. No new tests, have not been able to come up with a reliable reduction. * rendering/RenderInline.cpp: (WebCore::RenderInline::clippedOverflowRectForRepaint): Add NULL check for containingBlock() as it can return NULL when detached from the tree. 2012-04-23 Sheriff Bot Unreviewed, rolling out r114929. http://trac.webkit.org/changeset/114929 https://bugs.webkit.org/show_bug.cgi?id=84623 Broke 35 canvas/webgl tests (Requested by jernoble on #webkit). * html/canvas/WebGLRenderingContext.cpp: (WebCore): (WebCore::WebGLRenderingContext::bindFramebuffer): (WebCore::WebGLRenderingContext::deleteFramebuffer): (WebCore::WebGLRenderingContext::loseContextImpl): * platform/graphics/cairo/DrawingBufferCairo.cpp: (WebCore::DrawingBuffer::DrawingBuffer): * platform/graphics/chromium/DrawingBufferChromium.cpp: (WebCore::DrawingBuffer::DrawingBuffer): * platform/graphics/chromium/WebGLLayerChromium.cpp: (WebCore::WebGLLayerChromium::update): * platform/graphics/gpu/DrawingBuffer.cpp: * platform/graphics/gpu/DrawingBuffer.h: (WebCore::DrawingBuffer::setTexture2DBinding): (DrawingBuffer): * platform/graphics/gpu/mac/DrawingBufferMac.mm: (WebCore::DrawingBuffer::DrawingBuffer): * platform/graphics/gpu/qt/DrawingBufferQt.cpp: (WebCore::DrawingBuffer::DrawingBuffer): 2012-04-23 Kentaro Hara [V8] Pass Isolate around in V8Collection.h https://bugs.webkit.org/show_bug.cgi?id=84299 Reviewed by Nate Chapin. The objective is to pass Isolate around in V8 bindings. This patch passes Isolate around in V8Collection.h. No tests. No change in behavior. * bindings/v8/V8Collection.h: (WebCore::getV8Object): (WebCore::getNamedPropertyOfCollection): (WebCore::collectionNamedPropertyGetter): (WebCore::getIndexedPropertyOfCollection): (WebCore::collectionIndexedPropertyGetter): 2012-04-23 Kentaro Hara [V8] Pass Isolate to toV8() (Part5) https://bugs.webkit.org/show_bug.cgi?id=84271 Reviewed by Nate Chapin. The objective is to pass Isolate to all toV8()s. Since there are a lot of toV8(), I'll make the change step by step. This patch passes Isolate to toV8() in several custom bindings. No tests. No change in behavior. * bindings/v8/custom/V8MessageChannelConstructor.cpp: (WebCore::V8MessageChannel::constructorCallback): * bindings/v8/custom/V8MessageEventCustom.cpp: (WebCore::V8MessageEvent::dataAccessorGetter): (WebCore::V8MessageEvent::portsAccessorGetter): * bindings/v8/custom/V8MutationCallbackCustom.cpp: (WebCore::V8MutationCallback::handleEvent): * bindings/v8/custom/V8NamedNodeMapCustom.cpp: (WebCore::V8NamedNodeMap::indexedPropertyGetter): (WebCore::V8NamedNodeMap::namedPropertyGetter): (WebCore::toV8): * bindings/v8/custom/V8NodeListCustom.cpp: (WebCore::V8NodeList::namedPropertyGetter): * bindings/v8/custom/V8NotificationCenterCustom.cpp: (WebCore::V8NotificationCenter::createHTMLNotificationCallback): (WebCore::V8NotificationCenter::createNotificationCallback): * bindings/v8/custom/V8PerformanceCustom.cpp: (WebCore::V8Performance::memoryAccessorGetter): * bindings/v8/custom/V8PopStateEventCustom.cpp: (WebCore::V8PopStateEvent::stateAccessorGetter): * bindings/v8/custom/V8SQLTransactionSyncCustom.cpp: (WebCore::V8SQLTransactionSync::executeSqlCallback): * bindings/v8/custom/V8SVGPathSegCustom.cpp: (WebCore::toV8): 2012-04-23 Zhenyao Mo framebuffer binding should not be changed after canvas resize or compositing https://bugs.webkit.org/show_bug.cgi?id=84609 Reviewed by Kenneth Russell. Test: fast/canvas/webgl/framebuffer-bindings-unaffected-on-resize.html * html/canvas/WebGLRenderingContext.cpp: set framebuffer binding to DrawingBuffer. (WebCore): (WebCore::WebGLRenderingContext::bindFramebuffer): (WebCore::WebGLRenderingContext::deleteFramebuffer): (WebCore::WebGLRenderingContext::loseContextImpl): * platform/graphics/cairo/DrawingBufferCairo.cpp: initialize m_framebufferBinding. (WebCore::DrawingBuffer::DrawingBuffer): * platform/graphics/chromium/DrawingBufferChromium.cpp: Ditto. (WebCore::DrawingBuffer::DrawingBuffer): * platform/graphics/chromium/WebGLLayerChromium.cpp: Recover framebuffer binding after update(). (WebCore::WebGLLayerChromium::update): * platform/graphics/gpu/DrawingBuffer.cpp: Add a function to restore framebuffer binding. (WebCore::DrawingBuffer::restoreFramebufferBinding): (WebCore): * platform/graphics/gpu/DrawingBuffer.h: Ditto. (WebCore::DrawingBuffer::setTexture2DBinding): (DrawingBuffer): (WebCore::DrawingBuffer::setFramebufferBinding): * platform/graphics/gpu/mac/DrawingBufferMac.mm: initialize m_framebufferBinding. (WebCore::DrawingBuffer::DrawingBuffer): * platform/graphics/gpu/qt/DrawingBufferQt.cpp: initialize m_framebufferBinding. (WebCore::DrawingBuffer::DrawingBuffer): 2012-04-23 Kentaro Hara [V8] Pass Isolate to toV8() (Part4) https://bugs.webkit.org/show_bug.cgi?id=84269 Reviewed by Nate Chapin. The objective is to pass Isolate to all toV8()s. Since there are a lot of toV8()s, I'll make the change step by step. This patch passes Isolate to toV8() in several custom bindings. No tests. No change in behavior. * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp: (WebCore::V8HTMLCanvasElement::getContextCallback): * bindings/v8/custom/V8HTMLCollectionCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8HTMLDocumentCustom.cpp: (WebCore::V8HTMLDocument::allAccessorGetter): * bindings/v8/custom/V8HTMLElementCustom.cpp: (WebCore::toV8Object): (WebCore::V8HTMLElement::itemValueAccessorGetter): * bindings/v8/custom/V8HTMLFormElementCustom.cpp: (WebCore::V8HTMLFormElement::indexedPropertyGetter): (WebCore::V8HTMLFormElement::namedPropertyGetter): * bindings/v8/custom/V8HTMLFrameSetElementCustom.cpp: (WebCore::V8HTMLFrameSetElement::namedPropertyGetter): * bindings/v8/custom/V8HTMLImageElementConstructor.cpp: (WebCore::v8HTMLImageElementConstructorCallback): * bindings/v8/custom/V8HTMLLinkElementCustom.cpp: (WebCore::V8HTMLLinkElement::sizesAccessorGetter): * bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp: (WebCore::V8HTMLOptionsCollection::indexedPropertyGetter): * bindings/v8/custom/V8HTMLOutputElementCustom.cpp: (WebCore::V8HTMLOutputElement::htmlForAccessorGetter): * bindings/v8/custom/V8HTMLSelectElementCustom.cpp: (WebCore::V8HTMLSelectElement::indexedPropertyGetter): * bindings/v8/custom/V8ImageDataCustom.cpp: (WebCore::toV8): 2012-04-23 Emil A Eklund Clean up subpixel unit handling in hit testing code https://bugs.webkit.org/show_bug.cgi?id=84496 Reviewed by Eric Seidel. Fix use of IntRect and LayoutRect in hit testing code in preparation for subpixel layout. No new tests, no change in functionality. * rendering/HitTestResult.cpp: (WebCore::HitTestResult::rectForPoint): Revert rectForPoint to IntRect as all call sites converted it to an IntRect anyway to compare it with an IntPoint or another IntRect. * rendering/HitTestingTransformState.cpp: (WebCore::HitTestingTransformState::boundsOfMappedQuad): * rendering/HitTestingTransformState.h: Convert boundsOfMappedQuad to LayoutRect as the TransformationMatrix now has subpixel precision. 2012-04-23 Kentaro Hara [V8] Pass Isolate to toV8() (Part3) https://bugs.webkit.org/show_bug.cgi?id=84261 Reviewed by Nate Chapin. The objective is to pass Isolate to all toV8()s. Since there are a lot of toV8(), I'll make the change step by step. This patch passes Isolate to toV8() in several custom bindings. No tests. No change in behavior. * bindings/v8/custom/V8DOMWindowCustom.cpp: (WebCore::V8DOMWindow::openCallback): (WebCore::V8DOMWindow::indexedPropertyGetter): (WebCore::V8DOMWindow::namedPropertyGetter): * bindings/v8/custom/V8DirectoryEntrySyncCustom.cpp: (WebCore::V8DirectoryEntrySync::getDirectoryCallback): (WebCore::V8DirectoryEntrySync::getFileCallback): * bindings/v8/custom/V8DocumentCustom.cpp: (WebCore::V8Document::evaluateCallback): (WebCore::V8Document::getCSSCanvasContextCallback): (WebCore::V8Document::createTouchListCallback): * bindings/v8/custom/V8DocumentLocationCustom.cpp: (WebCore::V8Document::locationAccessorGetter): * bindings/v8/custom/V8EntryCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8EntrySyncCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8EventCustom.cpp: (WebCore::V8Event::dataTransferAccessorGetter): (WebCore::V8Event::clipboardDataAccessorGetter): (WebCore): * bindings/v8/custom/V8FileReaderCustom.cpp: (WebCore::V8FileReader::resultAccessorGetter): * bindings/v8/custom/V8HTMLAllCollectionCustom.cpp: (WebCore::getItem): (WebCore::V8HTMLAllCollection::callAsFunctionCallback): 2012-04-23 Kentaro Hara [V8] Pass Isolate to toV8() (Part2) https://bugs.webkit.org/show_bug.cgi?id=84259 Reviewed by Nate Chapin. The objective is to pass Isolate to all toV8()s. Since there are a lot of toV8(), I'll make the change step by step. This patch passes Isolate to toV8() in several custom bindings. No tests. No change in behavior. * bindings/v8/custom/V8BlobCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8CSSRuleCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8CSSStyleSheetCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8CSSValueCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8CanvasRenderingContext2DCustom.cpp: (WebCore::toV8Object): (WebCore::V8CanvasRenderingContext2D::strokeStyleAccessorGetter): (WebCore::V8CanvasRenderingContext2D::fillStyleAccessorGetter): * bindings/v8/custom/V8ConsoleCustom.cpp: (WebCore::V8Console::memoryAccessorGetter): * bindings/v8/custom/V8CustomSQLStatementErrorCallback.cpp: (WebCore::V8SQLStatementErrorCallback::handleEvent): * bindings/v8/custom/V8DOMStringMapCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8DOMTokenListCustom.cpp: (WebCore::toV8): 2012-04-23 Kentaro Hara [V8][Refactoring] Remove V8Proxy::toV8() https://bugs.webkit.org/show_bug.cgi?id=84257 Reviewed by Nate Chapin. Some constructorCallback()s are using V8Proxy::toV8(), other constructorCallback()s are directly using setJSWrapperForXXX() (XXX can be DOMObject, ActiveDOMObject, Node or ActiveNode). We should unify them. Considering the fact that V8Proxy::toV8() just supports XXX=DOMObject and thus is not flexible, replacing V8Proxy::toV8() with setJSWrapperForDOMObject() would make sense. No tests. No change in behavior. * bindings/v8/V8Proxy.h: Removed toV8(). * bindings/scripts/CodeGeneratorV8.pm: Replaced toV8() with setJSWrapperForDOMObject(). (GenerateEventConstructorCallback): * bindings/v8/custom/V8ArrayBufferCustom.cpp: Ditto. (WebCore::V8ArrayBuffer::constructorCallback): * bindings/v8/custom/V8ArrayBufferViewCustom.h: Ditto. (WebCore::constructWebGLArrayWithArrayBufferArgument): (WebCore::constructWebGLArray): * bindings/v8/custom/V8DOMFormDataCustom.cpp: Ditto. (WebCore::V8DOMFormData::constructorCallback): * bindings/v8/custom/V8DataViewCustom.cpp: Ditto. (WebCore::V8DataView::constructorCallback): * bindings/v8/custom/V8MessageChannelConstructor.cpp: Ditto. (WebCore::V8MessageChannel::constructorCallback): * bindings/v8/custom/V8WebKitPointConstructor.cpp: Ditto. (WebCore::V8WebKitPoint::constructorCallback): * bindings/scripts/test/V8/V8TestEventConstructor.cpp: Updated run-bindings-tests results. (WebCore::V8TestEventConstructor::constructorCallback): 2012-04-23 Kentaro Hara [V8] Pass Isolate to toV8() (Part1) https://bugs.webkit.org/show_bug.cgi?id=84250 Reviewed by Nate Chapin. The final objective is to pass Isolate around in V8 bindings. This patch makes a change in CodeGeneratorV8.pm so that the generated code passes Isolate to toV8(). No tests. No change in behavior. * bindings/scripts/CodeGeneratorV8.pm: Modified as described above. (GenerateNormalAttrGetter): (GenerateNamedConstructorCallback): (GenerateCallbackImplementation): (GenerateFunctionCallString): (NativeToJSValue): * bindings/scripts/test/V8/V8Float64Array.cpp: Updated run-bindings-tests results. (WebCore::Float64ArrayV8Internal::fooCallback): * bindings/scripts/test/V8/V8TestCallback.cpp: (WebCore::V8TestCallback::callbackWithClass1Param): (WebCore::V8TestCallback::callbackWithClass2Param): (WebCore::V8TestCallback::callbackWithStringList): (WebCore::V8TestCallback::callbackRequiresThisToPass): * bindings/scripts/test/V8/V8TestInterface.cpp: (WebCore::TestInterfaceV8Internal::supplementalMethod2Callback): * bindings/scripts/test/V8/V8TestNamedConstructor.cpp: (WebCore::V8TestNamedConstructorConstructorCallback): * bindings/scripts/test/V8/V8TestObj.cpp: (WebCore::TestObjV8Internal::readOnlyTestObjAttrAttrGetter): (WebCore::TestObjV8Internal::testObjAttrAttrGetter): (WebCore::TestObjV8Internal::XMLObjAttrAttrGetter): (WebCore::TestObjV8Internal::withScriptExecutionContextAttributeAttrGetter): (WebCore::TestObjV8Internal::withScriptStateAttributeRaisesAttrGetter): (WebCore::TestObjV8Internal::withScriptExecutionContextAttributeRaisesAttrGetter): (WebCore::TestObjV8Internal::withScriptExecutionContextAndScriptStateAttributeAttrGetter): (WebCore::TestObjV8Internal::withScriptExecutionContextAndScriptStateAttributeRaisesAttrGetter): (WebCore::TestObjV8Internal::withScriptExecutionContextAndScriptStateWithSpacesAttributeAttrGetter): (WebCore::TestObjV8Internal::withScriptArgumentsAndCallStackAttributeAttrGetter): (WebCore::TestObjV8Internal::cachedAttribute1AttrGetter): (WebCore::TestObjV8Internal::cachedAttribute2AttrGetter): (WebCore::TestObjV8Internal::mutablePointAttrGetter): (WebCore::TestObjV8Internal::immutablePointAttrGetter): (WebCore::TestObjV8Internal::objMethodCallback): (WebCore::TestObjV8Internal::objMethodWithArgsCallback): (WebCore::TestObjV8Internal::methodThatRequiresAllArgsAndThrowsCallback): (WebCore::TestObjV8Internal::withScriptStateObjCallback): (WebCore::TestObjV8Internal::withScriptStateObjExceptionCallback): (WebCore::TestObjV8Internal::withScriptExecutionContextAndScriptStateObjExceptionCallback): (WebCore::TestObjV8Internal::withScriptExecutionContextAndScriptStateWithSpacesCallback): (WebCore::TestObjV8Internal::mutablePointFunctionCallback): (WebCore::TestObjV8Internal::immutablePointFunctionCallback): (WebCore::TestObjV8Internal::strictFunctionCallback): * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp: (WebCore::TestSerializedScriptValueInterfaceV8Internal::portsAttrGetter): 2012-04-23 Kentaro Hara [V8] Add an optional Isolate argument to setDOMException() and throwError() https://bugs.webkit.org/show_bug.cgi?id=84310 Reviewed by Nate Chapin. The objective is to pass Isolate to setDOMException() and throwError(). This patch adds an optional Isolate argument to setDOMException() and throwError(). I'll pass the Isolate to these methods in the following patches. No tests. No change in behavior. * bindings/v8/V8Proxy.cpp: (WebCore): (WebCore::V8Proxy::setDOMException): (WebCore::V8Proxy::throwError): * bindings/v8/V8Proxy.h: (V8Proxy): (WebCore): (WebCore::throwError): 2012-04-23 Ian Vollick [chromium] Properly ignore unsupported animation directions. https://bugs.webkit.org/show_bug.cgi?id=84599 Reviewed by Adrienne Walker. Tested in CCLayerAnimationControllerTest.ignoreUnsupportedAnimationDirections. * platform/graphics/chromium/cc/CCLayerAnimationController.cpp: 2012-04-17 Kentaro Hara [Performance][V8] Skip Isolate look-up to find StringCache https://bugs.webkit.org/show_bug.cgi?id=84103 Reviewed by Nate Chapin. This patch improves the performance of a lot of DOM attribute getters that return a string. - Improves the performance of Dromaeo/dom-attr.html(element.property) by 27.7%. - Improves the performance of Dromaeo/dom-attr.html(getAttribute) by 10.6%. - Improves the performance of div.id, div.className, div.nodeName, text.nodeValue, text.textContent by 12% -- 21%. The followings are the test results in my Linux desktop. Performance test: Dromaeo/dom-attr.html Total: 674.64runs/s -> 707.03runs/s (+ 4.8%) getAttribute: 1537.60runs/s -> 1700.20runs/s (+10.6%) element.property: 1389.00runs/s -> 1774.20runs/s (+27.7%) setAttribute: 538.88runs/s -> 548.87runs/s (+ 1.9%) element.property = value: 644.07runs/s -> 656.67runs/s (+ 2.0%) element.expando = value: 219.76runs/s -> 207.14runs/s (- 6.8%) element.expando: 578.77runs/s -> 554.67runs/s (- 4.2%) Performance test: https://bugs.webkit.org/attachment.cgi?id=137440 div.id: 30.70ns -> 26.70ns (+15%) div.className: 31.10ns -> 26.40ns (+18%) div.nodeName: 37.70ns -> 33.00ns (+14%) text.nodeValue: 31.40ns -> 25.90ns (+21%) text.textContent: 51.50ns -> 45.90ns (+12%) Previously V8 bindings need to look up an Isolate to find an Isolate-local StringCache. This patch skips the look-up by getting the Isolate from AccessorInfo.GetIsolate() or Arguments.GetIsolate(). No tests. No change in behavior. * bindings/scripts/CodeGeneratorV8.pm: (GenerateNormalAttrGetter): (GenerateFunctionCallString): (NativeToJSValue): * bindings/v8/V8Binding.cpp: (WebCore::getElementStringAttr): * bindings/v8/V8Binding.h: (WebCore::v8ExternalString): Make 'isolate' an optional argument. Ideally we want to make 'isolate' a non-optional argument, but it is difficult to rewrite all v8ExternalString() callers at a breath. We can rewrite them incrementally. (WebCore::v8String): Ditto. (WebCore::v8StringOrNull): Ditto. (WebCore::v8StringOrUndefined): Ditto. (WebCore::v8StringOrFalse): Ditto. * bindings/scripts/test/V8/V8TestEventConstructor.cpp: Updated run-bindings-tests results. (WebCore::TestEventConstructorV8Internal::attr1AttrGetter): (WebCore::TestEventConstructorV8Internal::attr2AttrGetter): * bindings/scripts/test/V8/V8TestInterface.cpp: (WebCore::TestInterfaceV8Internal::supplementalStr1AttrGetter): (WebCore::TestInterfaceV8Internal::supplementalStr2AttrGetter): * bindings/scripts/test/V8/V8TestObj.cpp: (WebCore::TestObjV8Internal::readOnlyStringAttrAttrGetter): (WebCore::TestObjV8Internal::stringAttrAttrGetter): (WebCore::TestObjV8Internal::reflectedStringAttrAttrGetter): (WebCore::TestObjV8Internal::reflectedURLAttrAttrGetter): (WebCore::TestObjV8Internal::reflectedCustomURLAttrAttrGetter): (WebCore::TestObjV8Internal::stringAttrWithGetterExceptionAttrGetter): (WebCore::TestObjV8Internal::stringAttrWithSetterExceptionAttrGetter): (WebCore::TestObjV8Internal::hashAttrGetter): (WebCore::TestObjV8Internal::conditionalMethod1Callback): 2012-04-17 Kentaro Hara [V8] Add an optional Isolate argument to wrap() https://bugs.webkit.org/show_bug.cgi?id=84202 Reviewed by Nate Chapin. The final objective is to pass Isolate around in V8 bindings. This patch adds an optional Isolate argument to wrap(). After rewriting all wrap() callers so that they pass Isolate to wrap(), I'll make the Isolate argument non-optional. No tests. No change in behavior. * bindings/scripts/CodeGeneratorV8.pm: Modified as described above. (GenerateHeader): * bindings/v8/custom/V8DocumentCustom.cpp: Ditto. (WebCore::toV8): * bindings/v8/custom/V8HTMLDocumentCustom.cpp: Ditto. (WebCore::toV8): * bindings/v8/custom/V8NodeCustom.cpp: Ditto. (WebCore::toV8Slow): * bindings/v8/custom/V8SVGDocumentCustom.cpp: Ditto. (WebCore::toV8): * dom/make_names.pl: Ditto. (printWrapperFactoryCppFile): * bindings/scripts/test/V8/V8Float64Array.h: Updated run-bindings-tests results. (V8Float64Array): (WebCore::V8Float64Array::wrap): * bindings/scripts/test/V8/V8TestActiveDOMObject.h: (V8TestActiveDOMObject): (WebCore::V8TestActiveDOMObject::wrap): (WebCore::toV8): * bindings/scripts/test/V8/V8TestCustomNamedGetter.h: (V8TestCustomNamedGetter): (WebCore::V8TestCustomNamedGetter::wrap): (WebCore::toV8): * bindings/scripts/test/V8/V8TestEventConstructor.h: (V8TestEventConstructor): (WebCore::V8TestEventConstructor::wrap): (WebCore::toV8): * bindings/scripts/test/V8/V8TestEventTarget.h: (V8TestEventTarget): (WebCore::V8TestEventTarget::wrap): (WebCore::toV8): * bindings/scripts/test/V8/V8TestInterface.h: (V8TestInterface): (WebCore::V8TestInterface::wrap): (WebCore::toV8): * bindings/scripts/test/V8/V8TestMediaQueryListListener.h: (V8TestMediaQueryListListener): (WebCore::V8TestMediaQueryListListener::wrap): (WebCore::toV8): * bindings/scripts/test/V8/V8TestNamedConstructor.h: (V8TestNamedConstructor): (WebCore::V8TestNamedConstructor::wrap): (WebCore::toV8): * bindings/scripts/test/V8/V8TestNode.h: (V8TestNode): (WebCore::V8TestNode::wrap): (WebCore::toV8): * bindings/scripts/test/V8/V8TestObj.h: (V8TestObj): (WebCore::V8TestObj::wrap): (WebCore::toV8): * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.h: (V8TestSerializedScriptValueInterface): (WebCore::V8TestSerializedScriptValueInterface::wrap): (WebCore::toV8): 2012-04-17 Kentaro Hara [V8] Pass Isolate to toV8Slow() https://bugs.webkit.org/show_bug.cgi?id=84173 Reviewed by Nate Chapin. The final objective is to pass Isolate around in V8 bindings. This patch passes the Isolate to toV8Slow(). No tests. No change in behavior. * bindings/scripts/CodeGeneratorV8.pm: (GenerateHeader): * bindings/v8/custom/V8NodeCustom.cpp: (WebCore::toV8Slow): 2012-04-17 Kentaro Hara [V8] Add an optional Isolate argument to toV8(). https://bugs.webkit.org/show_bug.cgi?id=84161 Reviewed by Nate Chapin. The final objective is to pass Isolate around in V8 bindings. This patch adds an optional Isolate argument to toV8(). After rewriting all toV8() callers so that they pass Isolate, I will make the Isolate argument non-optional. No tests. No change in behavior. * bindings/scripts/CodeGeneratorV8.pm: Modified as described above. (GenerateHeader): (NativeToJSValue): * bindings/v8/custom/V8BlobCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8CSSRuleCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8CSSStyleSheetCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8CSSValueCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8CanvasPixelArrayCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8DOMStringMapCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8DOMTokenListCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8DOMWindowCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8DataViewCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8DocumentCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8EntryCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8EntrySyncCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8EventCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8Float32ArrayCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8Float64ArrayCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8HTMLCollectionCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8HTMLDocumentCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8HTMLElementCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8IDBAnyCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8IDBKeyCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8ImageDataCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8Int16ArrayCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8Int32ArrayCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8Int8ArrayCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8LocationCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8NamedNodeMapCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8NodeCustom.cpp: (WebCore::toV8Slow): * bindings/v8/custom/V8SVGDocumentCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8SVGElementCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8SVGPathSegCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8ScriptProfileCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8ScriptProfileNodeCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8StyleSheetCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8Uint16ArrayCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8Uint32ArrayCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8Uint8ArrayCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8Uint8ClampedArrayCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8WorkerContextCustom.cpp: (WebCore::toV8): * bindings/scripts/test/V8/V8Float64Array.h: Updated run-bindings-tests results. (WebCore): (WebCore::toV8): * bindings/scripts/test/V8/V8TestActiveDOMObject.h: (WebCore::toV8): * bindings/scripts/test/V8/V8TestCustomNamedGetter.h: (WebCore::toV8): * bindings/scripts/test/V8/V8TestEventConstructor.h: (WebCore::toV8): * bindings/scripts/test/V8/V8TestEventTarget.h: (WebCore::toV8): * bindings/scripts/test/V8/V8TestInterface.h: (WebCore::toV8): * bindings/scripts/test/V8/V8TestMediaQueryListListener.h: (WebCore::toV8): * bindings/scripts/test/V8/V8TestNamedConstructor.h: (WebCore::toV8): * bindings/scripts/test/V8/V8TestNode.h: (WebCore::toV8): * bindings/scripts/test/V8/V8TestObj.h: (WebCore::toV8): * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.h: (WebCore::toV8): 2012-04-23 Michał Pakuła vel Rutka [EFL][WK2] Fix build break when non-cross platform CONTEXT_MENUS are enabled. https://bugs.webkit.org/show_bug.cgi?id=84136 Reviewed by Andreas Kling. There was a mismatch between contextMenuItemVector declaration and definition. Fixed by changing PlatformMenuDescription for EFL port by adding a const modifier. No new tests required. * platform/PlatformMenuDescription.h: (WebCore): Added const modifier to PlatformMenuDescription definition. 2012-04-23 Pierre Rossi [Qt] Ensure zero-width space effectively accounts for a width of zero. https://bugs.webkit.org/show_bug.cgi?id=84595 Reviewed by Simon Hausmann. The logic so far relies on FontCache::getFontDataForCharacters to return a valid fontData in the case where the fonts specified don't have a glyph for the zero-width space character. QTextLayout::glyphRuns simply ignores characters that don't render in the glyph runs it returns, so we need to ensure that the subsequent call to platformWidthForGlyph doesn't lead to a non-zero width. Covered by tests containing control characters such as a soft-hyphen like it's the case in: svg/as-image/img-preserveAspectRatio-support-1.html * platform/graphics/qt/SimpleFontDataQt.cpp: (WebCore::SimpleFontData::platformWidthForGlyph): 2012-04-23 Ian Vollick [chromium] When prepareToDraw fails due to animation checkerboard, we need to call setNeedsCommit https://bugs.webkit.org/show_bug.cgi?id=84520 Reviewed by Adrienne Walker. Tested in CCLayerTreeHostImplTest.prepareToDrawFailsWhenAnimationUsesCheckerboard * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::prepareToDraw): 2012-04-23 Alexis Menard Simplify CSSParser::parseFont. https://bugs.webkit.org/show_bug.cgi?id=78698 Reviewed by Antti Koivisto. Simplify parseFont by sharing the code we have for the longhands of the font property. No new tests : Extend the existing font shorthand test and modify expected files as now the order of the longhands added in the property list of the style has changed. It's very unlikely that some code is relying on this order though. It will also match the way the spec order them http://www.w3.org/TR/css3-fonts/#font-prop even though the order is arbitrary for some values. * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): (WebCore::CSSParser::parseFont): (WebCore::CSSParser::parseLineHeight): (WebCore): (WebCore::CSSParser::parseFontSize): (WebCore::CSSParser::parseFontWeight): Fix a bug discovered while using parseFontWeight from the parseFont (case font: 0/0, Arial, sans-serif; in a layout test), we should return true only when we add something in the property list. * css/CSSParser.h: 2012-04-23 Yury Semikhatsky Web Inspector: improve the way heap snapshot diff is calculated https://bugs.webkit.org/show_bug.cgi?id=84590 Diff calculation now consists of the following steps: 1. Collect data about nodes in the base heap snapshot 2. Pass it to the second snapshot. 3. Calculate delta for each class. Reviewed by Pavel Feldman. * inspector/front-end/HeapSnapshot.js: (WebInspector.HeapSnapshot): (WebInspector.HeapSnapshot.prototype.dispose): (WebInspector.HeapSnapshot.prototype.aggregatesForDiff): (WebInspector.HeapSnapshot.prototype.calculateSnapshotDiff): (WebInspector.HeapSnapshot.prototype._calculateDiffForClass): (WebInspector.HeapSnapshot.prototype.createAddedNodesProvider): (WebInspector.HeapSnapshot.prototype.createDeletedNodesProvider): * inspector/front-end/HeapSnapshotDataGrids.js: (WebInspector.HeapSnapshotDiffDataGrid.prototype._populateChildren.aggregatesForDiffReceived.didCalculateSnapshotDiff): (WebInspector.HeapSnapshotDiffDataGrid.prototype._populateChildren): * inspector/front-end/HeapSnapshotGridNodes.js: (WebInspector.HeapSnapshotIteratorsTuple): (WebInspector.HeapSnapshotDiffNode): (WebInspector.HeapSnapshotDiffNode.prototype._createChildNode): (WebInspector.HeapSnapshotDiffNode.prototype._createNodesProvider): * inspector/front-end/HeapSnapshotProxy.js: (WebInspector.HeapSnapshotProxy.prototype.aggregatesForDiff): (WebInspector.HeapSnapshotProxy.prototype.calculateSnapshotDiff): (WebInspector.HeapSnapshotProxy.prototype.createAddedNodesProvider): (WebInspector.HeapSnapshotProxy.prototype.createDeletedNodesProvider): * inspector/front-end/HeapSnapshotView.js: (WebInspector.HeapSnapshotView.prototype._changeBase): 2012-04-23 Pavel Feldman Web Inspector: Rename and extract UISourceCodeImpl into JavaScriptSource https://bugs.webkit.org/show_bug.cgi?id=84587 Reviewed by Yury Semikhatsky. No changes other than extraction here. This is the first step in the Resource hierarchy refactoring described in bug 84586. * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * inspector/compile-front-end.py: * inspector/front-end/CompilerScriptMapping.js: (WebInspector.CompilerScriptMapping.prototype.addScript): * inspector/front-end/DebuggerPresentationModel.js: * inspector/front-end/JavaScriptSource.js: Added. (WebInspector.JavaScriptSource): (WebInspector.JavaScriptSource.prototype.breakpoints): (WebInspector.JavaScriptSource.prototype.breakpointAdded): (WebInspector.JavaScriptSource.prototype.breakpointRemoved): (WebInspector.JavaScriptSource.prototype.consoleMessages): (WebInspector.JavaScriptSource.prototype.consoleMessageAdded): (WebInspector.JavaScriptSource.prototype.consoleMessagesCleared): * inspector/front-end/RawSourceCode.js: (WebInspector.RawSourceCode.prototype._createUISourceCode): * inspector/front-end/SnippetsModel.js: (WebInspector.SnippetsScriptMapping.prototype._snippetAdded): (WebInspector.SnippetsScriptMapping.prototype._createUISourceCodeForScript): * inspector/front-end/WebKit.qrc: * inspector/front-end/inspector.html: 2012-04-23 Gavin Peters Move ReferrerPolicy out of SecurityPolicy class into its own header in platform. https://bugs.webkit.org/show_bug.cgi?id=84516 Reviewed by Adam Barth. No change in behaviour; same enum, different class. * GNUmakefile.list.am: * Target.pri: * WebCore.exp.in: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * dom/Document.cpp: (WebCore::Document::Document): (WebCore::Document::processReferrerPolicy): * dom/Document.h: (WebCore::Document::referrerPolicy): (Document): * page/SecurityPolicy.h: * platform/ReferrerPolicy.h: Added. (WebCore): 2012-04-23 Vineet Chaudhary JS binding code generator doesn't handle "attribute unsigned long[]" well https://bugs.webkit.org/show_bug.cgi?id=84540 Reviewed by Kentaro Hara. Codegenerator should handle spaces with the sequence<> to support numeric types like "unsigned long", "int" .. etc. and primitive types like "boolean", "Date" etc. Tests: bindings/scripts/test/TestObj.idl * bindings/scripts/CodeGenerator.pm: (SkipIncludeHeader): Rename AvoidInclusionOfType to SkipIncludeHeader. (GetArrayType): * bindings/scripts/CodeGeneratorJS.pm: (AddIncludesForType): (NativeToJSValue): * bindings/scripts/CodeGeneratorObjC.pm: (AddIncludesForType): (GenerateImplementation): * bindings/scripts/CodeGeneratorV8.pm: (AddIncludesForType): (GetHeaderClassInclude): (GenerateNormalAttrGetter): (NativeToJSValue): * bindings/scripts/IDLStructure.pm: * bindings/scripts/test/JS/JSTestObj.cpp: (WebCore): (WebCore::jsTestObjIntSequenceAttr): (WebCore::jsTestObjShortSequenceAttr): (WebCore::jsTestObjLongSequenceAttr): (WebCore::jsTestObjLongLongSequenceAttr): (WebCore::jsTestObjUnsignedIntSequenceAttr): (WebCore::jsTestObjUnsignedShortSequenceAttr): (WebCore::jsTestObjUnsignedLongSequenceAttr): (WebCore::jsTestObjUnsignedLongLongSequenceAttr): (WebCore::jsTestObjFloatSequenceAttr): (WebCore::jsTestObjDoubleSequenceAttr): (WebCore::jsTestObjBooleanSequenceAttr): (WebCore::jsTestObjVoidSequenceAttr): (WebCore::jsTestObjDateSequenceAttr): (WebCore::setJSTestObjSequenceAttr): (WebCore::setJSTestObjIntSequenceAttr): (WebCore::setJSTestObjShortSequenceAttr): (WebCore::setJSTestObjLongSequenceAttr): (WebCore::setJSTestObjLongLongSequenceAttr): (WebCore::setJSTestObjUnsignedIntSequenceAttr): (WebCore::setJSTestObjUnsignedShortSequenceAttr): (WebCore::setJSTestObjUnsignedLongSequenceAttr): (WebCore::setJSTestObjUnsignedLongLongSequenceAttr): (WebCore::setJSTestObjFloatSequenceAttr): (WebCore::setJSTestObjDoubleSequenceAttr): (WebCore::setJSTestObjBooleanSequenceAttr): (WebCore::setJSTestObjVoidSequenceAttr): (WebCore::setJSTestObjDateSequenceAttr): * bindings/scripts/test/JS/JSTestObj.h: (WebCore): * bindings/scripts/test/ObjC/DOMTestObj.h: * bindings/scripts/test/TestObj.idl: * bindings/scripts/test/V8/V8TestObj.cpp: (WebCore::TestObjV8Internal::intSequenceAttrAttrGetter): (TestObjV8Internal): (WebCore::TestObjV8Internal::intSequenceAttrAttrSetter): (WebCore::TestObjV8Internal::shortSequenceAttrAttrGetter): (WebCore::TestObjV8Internal::shortSequenceAttrAttrSetter): (WebCore::TestObjV8Internal::longSequenceAttrAttrGetter): (WebCore::TestObjV8Internal::longSequenceAttrAttrSetter): (WebCore::TestObjV8Internal::longLongSequenceAttrAttrGetter): (WebCore::TestObjV8Internal::longLongSequenceAttrAttrSetter): (WebCore::TestObjV8Internal::unsignedIntSequenceAttrAttrGetter): (WebCore::TestObjV8Internal::unsignedIntSequenceAttrAttrSetter): (WebCore::TestObjV8Internal::unsignedShortSequenceAttrAttrGetter): (WebCore::TestObjV8Internal::unsignedShortSequenceAttrAttrSetter): (WebCore::TestObjV8Internal::unsignedLongSequenceAttrAttrGetter): (WebCore::TestObjV8Internal::unsignedLongSequenceAttrAttrSetter): (WebCore::TestObjV8Internal::unsignedLongLongSequenceAttrAttrGetter): (WebCore::TestObjV8Internal::unsignedLongLongSequenceAttrAttrSetter): (WebCore::TestObjV8Internal::floatSequenceAttrAttrGetter): (WebCore::TestObjV8Internal::floatSequenceAttrAttrSetter): (WebCore::TestObjV8Internal::doubleSequenceAttrAttrGetter): (WebCore::TestObjV8Internal::doubleSequenceAttrAttrSetter): (WebCore::TestObjV8Internal::booleanSequenceAttrAttrGetter): (WebCore::TestObjV8Internal::booleanSequenceAttrAttrSetter): (WebCore::TestObjV8Internal::voidSequenceAttrAttrGetter): (WebCore::TestObjV8Internal::voidSequenceAttrAttrSetter): (WebCore::TestObjV8Internal::dateSequenceAttrAttrGetter): (WebCore::TestObjV8Internal::dateSequenceAttrAttrSetter): (WebCore): 2012-04-23 Andreas Kling Unreviewed assertion fix for Chromium bots. Skip unnecessary Attr::attachToElement() after constructing an Attr using the constructor that attaches to an Element. * dom/ElementAttributeData.cpp: (WebCore::ElementAttributeData::ensureAttr): 2012-04-23 Andreas Kling REGRESSION(r114870): Assertion failure in ElementAttributeData::setAttr(). Reviewed by Antti Koivisto. Attach the Attr and bump m_attrCount manually in ensureAttr() instead of calling setAttr(). The latter asserts that the Attr isn't present in the map, which obviously isn't true after we've just added it. This has the added effect of removing one unnecessary hash lookup. * dom/ElementAttributeData.cpp: (WebCore::ElementAttributeData::ensureAttr): 2012-04-23 Pavel Feldman Web Inspector: make ParsedURL.prototype.displayName data url friendly. https://bugs.webkit.org/show_bug.cgi?id=84578 Reviewed by Yury Semikhatsky. We'd like to define valid URL as the one that has scheme, host and path. We can append to this URL and manipulate its content. We still want possibly invalid specs (such as data or about) to exist and have nice display names. * inspector/front-end/ResourceUtils.js: (WebInspector.ParsedURL): (WebInspector.ParsedURL.prototype.get displayName): 2012-04-23 Pavel Feldman Web Inspector: introduce String.prototype.starts/endsWith and use it all over the place. https://bugs.webkit.org/show_bug.cgi?id=84574 Reviewed by Yury Semikhatsky. * inspector/front-end/AuditRules.js: (WebInspector.AuditRules.VendorPrefixedCSSProperties.prototype.visitProperty): * inspector/front-end/BreakpointsSidebarPane.js: (WebInspector.EventListenerBreakpointsSidebarPane.prototype._setBreakpoint): (WebInspector.EventListenerBreakpointsSidebarPane.prototype._removeBreakpoint): * inspector/front-end/CSSCompletions.js: (WebInspector.CSSCompletions.prototype.startsWith): (WebInspector.CSSCompletions.prototype._firstIndexOfPrefix): * inspector/front-end/ConsoleView.js: (WebInspector.ConsoleView.prototype._reportCompletions): * inspector/front-end/CookieItemsView.js: (WebInspector.Cookies.cookieMatchesResourceURL): * inspector/front-end/DatabaseQueryView.js: (WebInspector.DatabaseQueryView.prototype.completions): * inspector/front-end/ElementsTreeOutline.js: (WebInspector.ElementsTreeElement.prototype._buildAttributeDOM): * inspector/front-end/ProfileView.js: * inspector/front-end/ProfilesPanel.js: (WebInspector.ProfilesPanel.prototype.addProfileHeader): (WebInspector.ProfilesPanel.prototype.displayTitleForProfileLink): (WebInspector.ProfileSidebarTreeElement): (WebInspector.ProfileSidebarTreeElement.prototype.get mainTitle): * inspector/front-end/ResourceUtils.js: (WebInspector.ParsedURL): (WebInspector.displayNameForURL): (WebInspector.linkifyStringAsFragmentWithCustomLinkifier): (WebInspector.completeURL): * inspector/front-end/SnippetsModel.js: (WebInspector.SnippetsModel.prototype.snippetIdForSourceURL): * inspector/front-end/SourceCSSTokenizer.js: (WebInspector.SourceCSSTokenizer.prototype.nextToken): * inspector/front-end/SourceCSSTokenizer.re2js: * inspector/front-end/TextPrompt.js: (WebInspector.TextPrompt.prototype._completeCommonPrefix): * inspector/front-end/UIUtils.js: (WebInspector.startEditing): * inspector/front-end/utilities.js: 2012-04-23 Andreas Kling REGRESSION(r114870): Performance hit on DOM/CloneNodes and DOM/CreateNodes. Reviewed by Antti Koivisto. Simplify the cloning of Attributes from one Element to another by simply assigning to m_attributes. This avoids default-constructing a bunch of Attribute objects that we overwrite immediately anyway (this used to be fine because they were RefPtr but now that a default-constructed Attribute contains a QualifiedName, we were doing a bunch of extra hash lookups, etc.) * dom/ElementAttributeData.cpp: (WebCore::ElementAttributeData::setAttributes): 2012-04-20 Pavel Feldman Web Inspector: implement "open stylesheet" dialog. https://bugs.webkit.org/show_bug.cgi?id=84466 Reviewed by Yury Semikhatsky. This change introduces abstract OpenResourceDialog and re-uses it in OpenScriptDialog and OpenStylesheetDialog. Drive-by fix for data: url representation in the navigator and open resource dialogs. * inspector/front-end/FilteredItemSelectionDialog.js: (WebInspector.FilteredItemSelectionDialog.prototype.position): (WebInspector.OpenResourceDialog.filterOutEmptyURLs): (WebInspector.OpenResourceDialog.compareFunction): (WebInspector.OpenResourceDialog): (WebInspector.OpenResourceDialog.prototype.itemTitleAt): (WebInspector.OpenResourceDialog.prototype.itemKeyAt): (WebInspector.OpenResourceDialog.prototype.itemsCount): (WebInspector.OpenResourceDialog.prototype.requestItems): (WebInspector.OpenResourceDialog.prototype.selectItem): (WebInspector.OpenScriptDialog): (WebInspector.OpenScriptDialog.install): (WebInspector.OpenScriptDialog._show): (WebInspector.OpenScriptDialog.prototype.selectItem): * inspector/front-end/ResourceUtils.js: (WebInspector.ParsedURL): * inspector/front-end/ScriptsPanel.js: * inspector/front-end/StylesPanel.js: (WebInspector.StylesPanel): (WebInspector.StylesPanel.prototype._showOpenStylesheetDialog): (WebInspector.OpenStylesheetDialog): (WebInspector.OpenStylesheetDialog.prototype.selectItem): * inspector/front-end/inspector.html: 2012-04-23 Kent Tamura Add test function to get placeholder string https://bugs.webkit.org/show_bug.cgi?id=84536 Reviewed by Ryosuke Niwa. Add window.internals.visiblePlaceholder(element), which returns a placeholder string only when it's visible. * WebCore.exp.in: Expose HTMLTextFormControlElement::placeholderShouldBeVisible(). * testing/Internals.cpp: (WebCore::Internals::visiblePlaceholder): Added. (WebCore::Internals::selectColorInColorChooser): Omit HTMLNames::. * testing/Internals.h: (Internals): Add visiblePlaceholder(). * testing/Internals.idl: ditto. 2012-04-23 Szilard Ledan Incorrect handling of CSS escape sequences that encode surrogates https://bugs.webkit.org/show_bug.cgi?id=76152 Reviewed by Kent Tamura. Test: fast/css/parsing-css-surrogate-pairs.html * css/CSSParser.cpp: (WebCore::CSSParser::parseEscape): 2012-04-22 Yury Semikhatsky Web Inspector: make populateChildren methods private in heap profiler front-end https://bugs.webkit.org/show_bug.cgi?id=84562 - populateChildren method on HeapSnapshotConstructorsDataGrid and HeapSnapshotDiffDataGrid now is private. - Made _defaultPopulateCount a public method on HeapSnapshotSortableDataGrid which is overriden in some descendants - Removed unused HeapSnapshotPathFinderProxy - added closure compiler annotations Reviewed by Pavel Feldman. * inspector/front-end/HeapSnapshotDataGrids.js: (WebInspector.HeapSnapshotSortableDataGrid.prototype.defaultPopulateCount): (WebInspector.HeapSnapshotConstructorsDataGrid.prototype.setDataSource): (WebInspector.HeapSnapshotConstructorsDataGrid.prototype._filterSelectIndexChanged): (WebInspector.HeapSnapshotDiffDataGrid.prototype.defaultPopulateCount): (WebInspector.HeapSnapshotDiffDataGrid.prototype.setBaseDataSource): (WebInspector.HeapSnapshotDominatorsDataGrid.prototype.defaultPopulateCount): * inspector/front-end/HeapSnapshotGridNodes.js: (WebInspector.HeapSnapshotGridNode): (WebInspector.HeapSnapshotGridNode.prototype.populateChildren.callSerialize): (WebInspector.HeapSnapshotDiffNode): (WebInspector.HeapSnapshotDiffNode.prototype.populateChildren.firstProviderPopulated): * inspector/front-end/HeapSnapshotProxy.js: 2012-04-22 Andreas Kling Unreviewed build fix, remove Attribute.cpp from DOMAllInOne.cpp. * dom/DOMAllInOne.cpp: My nemesis. 2012-04-22 Andreas Kling Optimize Element attribute storage for the common case (no Attr objects.) Reviewed by Antti Koivisto. Reduce Attribute to its smallest possible size; a qname/value pair. They are no-longer ref-counted, which allows us to store them in Vectors. Refactored the DOM Attr object to go with the new Attribute: Attr now wraps either {element, qname} or {qname, value}. The latter is for the case where a standalone Attr object is instantiated via DOM APIs. ElementAttributeData.cpp manages a map of pair => Attr. Each Element (well, ElementAttributeData) keeps track of how many Attr objects are pointing to it. This is so we can avoid hash lookups during common operations in the typical case where you have zero Attrs. Also removed the inline capacity (was 4) from AttributeVector as that would significantly increase bloat now that we store Attribute (2 pointers) rather than RefPtr. We trade this one piece of indirection for the removal of per-Attribute indirection. * CMakeLists.txt: * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * dom/Attr.cpp: (WebCore::Attr::Attr): (WebCore): (WebCore::Attr::create): (WebCore::Attr::~Attr): (WebCore::Attr::createTextChild): (WebCore::Attr::setPrefix): (WebCore::Attr::setValue): (WebCore::Attr::cloneNode): (WebCore::Attr::childrenChanged): (WebCore::Attr::style): (WebCore::Attr::value): (WebCore::Attr::elementAttribute): (WebCore::Attr::detachFromElementWithValue): (WebCore::Attr::attachToElement): * dom/Attr.h: (WebCore): (Attr): (WebCore::Attr::qualifiedName): (WebCore::Attr::localName): (WebCore::Attr::namespaceURI): (WebCore::Attr::prefix): * dom/Attribute.cpp: Removed. * dom/Attribute.h: (WebCore::Attribute::Attribute): (Attribute): * dom/Document.cpp: (WebCore::Document::importNode): (WebCore::Document::createAttributeNS): * dom/Element.cpp: (WebCore::Element::~Element): (WebCore::Element::detachAttribute): (WebCore): (WebCore::Element::removeAttribute): (WebCore::Element::setAttributeInternal): (WebCore::Element::parserSetAttributes): (WebCore::Element::setAttributeNode): (WebCore::Element::removeAttributeNode): (WebCore::Element::normalizeAttributes): (WebCore::Element::didRemoveAttribute): (WebCore::Element::attrIfExists): (WebCore::Element::ensureAttr): * dom/Element.h: (Element): (WebCore::Element::getAttributeItemIndex): * dom/ElementAttributeData.cpp: (WebCore): (WebCore::attrMap): (WebCore::ElementAttributeData::attrIfExists): (WebCore::ElementAttributeData::ensureAttr): (WebCore::ElementAttributeData::setAttr): (WebCore::ElementAttributeData::removeAttr): (WebCore::AttributeVector::removeAttribute): (WebCore::ElementAttributeData::~ElementAttributeData): (WebCore::ElementAttributeData::addAttribute): (WebCore::ElementAttributeData::removeAttribute): (WebCore::ElementAttributeData::isEquivalent): (WebCore::ElementAttributeData::detachAttributesFromElement): (WebCore::ElementAttributeData::getAttributeItemIndexSlowCase): (WebCore::ElementAttributeData::setAttributes): (WebCore::ElementAttributeData::clearAttributes): (WebCore::ElementAttributeData::replaceAttribute): (WebCore::ElementAttributeData::getAttributeNode): * dom/ElementAttributeData.h: (WebCore): (WebCore::AttributeVector::AttributeVector): (AttributeVector): (WebCore::AttributeVector::getAttributeItem): (WebCore::AttributeVector::getAttributeItemIndex): (WebCore::AttributeVector::insertAttribute): (WebCore::ElementAttributeData::attributeItem): (ElementAttributeData): (WebCore::ElementAttributeData::ElementAttributeData): (WebCore::ElementAttributeData::attributeVector): (WebCore::ElementAttributeData::clonedAttributeVector): (WebCore::ElementAttributeData::removeAttribute): (WebCore::ElementAttributeData::getAttributeItem): (WebCore::ElementAttributeData::getAttributeItemIndex): * dom/NamedNodeMap.cpp: (WebCore::NamedNodeMap::getNamedItem): (WebCore::NamedNodeMap::getNamedItemNS): (WebCore::NamedNodeMap::removeNamedItem): (WebCore::NamedNodeMap::removeNamedItemNS): (WebCore::NamedNodeMap::item): * dom/Node.cpp: (WebCore::Node::compareDocumentPosition): * html/HTMLAnchorElement.cpp: (WebCore::HTMLAnchorElement::parseAttribute): * html/HTMLSelectElement.cpp: (WebCore::HTMLSelectElement::parseAttribute): * html/parser/HTMLConstructionSite.cpp: (WebCore::HTMLConstructionSite::insertHTMLHtmlStartTagBeforeHTML): (WebCore::HTMLConstructionSite::mergeAttributesFromTokenIntoElement): (WebCore::HTMLConstructionSite::insertScriptElement): (WebCore::HTMLConstructionSite::createElement): (WebCore::HTMLConstructionSite::createHTMLElement): (WebCore::HTMLConstructionSite::createHTMLElementFromSavedElement): * html/parser/HTMLToken.h: (WebCore::AtomicHTMLToken::AtomicHTMLToken): * html/parser/HTMLTreeBuilder.cpp: (WebCore::HTMLTreeBuilder::processFakeStartTag): (WebCore::HTMLTreeBuilder::attributesForIsindexInput): (WebCore::HTMLTreeBuilder::processIsindexStartTagForInBody): (WebCore): (WebCore::HTMLTreeBuilder::processStartTagForInBody): * html/parser/HTMLTreeBuilder.h: * html/parser/TextDocumentParser.cpp: (WebCore::TextDocumentParser::insertFakePreElement): * page/PageSerializer.cpp: (WebCore::SerializerMarkupAccumulator::appendCustomAttributes): * svg/SVGFitToViewBox.cpp: * svg/properties/SVGAnimatedPropertySynchronizer.h: * xml/XMLErrors.cpp: (WebCore::createXHTMLParserErrorHeader): (WebCore::XMLErrors::insertErrorMessageBlock): * xml/XPathNodeSet.cpp: (WebCore::XPath::NodeSet::traversalSort): * xml/XPathStep.cpp: (WebCore::XPath::Step::nodesInAxis): * xml/parser/MarkupTokenBase.h: (WebCore::AtomicMarkupTokenBase::AtomicMarkupTokenBase): (WebCore::AtomicMarkupTokenBase::getAttributeItem): (WebCore::AtomicMarkupTokenBase::attributes): (AtomicMarkupTokenBase): (WebCore::::initializeAttributes): * xml/parser/XMLToken.h: (WebCore::AtomicXMLToken::AtomicXMLToken): * xml/parser/XMLTreeBuilder.cpp: (WebCore::XMLTreeBuilder::processNamespaces): (WebCore::XMLTreeBuilder::processAttributes): 2012-04-22 Sriram Neelakandan Sync the MOZ_X11 changes from r14 of http://code.google.com/p/npapi-sdk/ also, modified required build flags for Qt,Gtk and CMake [Qt] Added MOZ_X11 build flag for !embedded https://bugs.webkit.org/show_bug.cgi?id=40785 Reviewed by Anders Carlsson. No new tests. This does not change functionality. Affects all X11 Ports. Build should break if MOZ_X11 is not passed where required * WebCore.pri: * plugins/npapi.h: 2012-04-22 Pablo Flouret Reset event propagation and canceled flags in Event.initEvent https://bugs.webkit.org/show_bug.cgi?id=83964 Reviewed by Ryosuke Niwa. Step 3 in http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#dom-event-initevent Useful for re-configuring an event before dispatching. Test: fast/events/flags-unset-on-init-event.html * dom/Event.cpp: (WebCore::Event::initEvent): 2012-04-22 Martin Robinson [Cairo] Implement CompositeDifference https://bugs.webkit.org/show_bug.cgi?id=77354 Reviewed by Alejandro G. Castro. No new tests. The difference compositing operator are not exposed to web content, so this change is simply in preparation for a time in which it is used. Properly map the difference compositing blend modes to a Cairo operator. * platform/graphics/cairo/CairoUtilities.cpp: (WebCore::toCairoOperator): Add a mapping for difference. Remove code supporting versions of Cairo before 1.10, since the Cairo backend requires 1.10 or greater already. 2012-04-22 Jon Lee Remove notifications support on Mac Lion. https://bugs.webkit.org/show_bug.cgi?id=84554 Reviewed by Sam Weinig. * Configurations/FeatureDefines.xcconfig: 2012-04-22 Shawn Singh [chromium] Damage Tracker needs to use CCMathUtil transforms https://bugs.webkit.org/show_bug.cgi?id=84070 Reviewed by Adrienne Walker. Unit test added to CCDamageTracker.cpp. This patch makes CCDamageTracker use CCMathUtil transforms, so that perspective w < 0 problem is correctly handled. * platform/graphics/chromium/cc/CCDamageTracker.cpp: (WebCore::CCDamageTracker::extendDamageForLayer): (WebCore::CCDamageTracker::extendDamageForRenderSurface): 2012-04-20 Jon Lee Add Notification constructor https://bugs.webkit.org/show_bug.cgi?id=80477 Reviewed by Jian Li. Tests will be added once there is support for web notifications on the Mac ports. * WebCore.exp.in: Export finalize() function. Modify Dictionary to support creation of event listeners. * bindings/js/Dictionary.h: (WebCore::Dictionary::isObject): Return true if the JSDictionary is valid. (WebCore::Dictionary::isUndefinedOrNull): Return true if the JSDictionary is not valid. (WebCore::Dictionary::get): Add convenience function to take const char* for property name, to prevent having to do implicit conversion to WTF::String. (WebCore::Dictionary::getEventListener): Add function to create event listener from the dictionary. (WebCore::Dictionary::asJSObject): Helper to convert WebCore objects to JS wrapper. * bindings/js/Dictionary.cpp: (WebCore::Notification): Implement asJSObject() for Notification. * bindings/js/JSDictionary.h: (WebCore::JSDictionary::execState): Expose the exec state so that the Dictionary can obtain its world for creating the event listener. * bindings/v8/Dictionary.h: (WebCore::Dictionary::getEventListener): Stub implementation. Add new constructor to idl definitions. * notifications/DOMWindowNotifications.idl: Add Notification constructor, if ENABLE(NOTIFICATIONS) is on. * notifications/Notification.idl: If ENABLE(NOTIFICATIONS) is turned on, define the constructor. Otherwise, use OmitConstructor. * notifications/NotificationCenter.idl: Wrap creation functions in ENABLE(LEGACY_NOTIFICATIONS). * notifications/NotificationCenter.h: Ditto. (NotificationCenter): * notifications/Notification.h: (Notification): Wrap legacy constructors in ENABLE(LEGACY_NOTIFICATIONS). (WebCore::Notification::create): New creation function based on discussions in WG. * notifications/Notification.cpp: (WebCore::getAndAddEventListener): Helper function to get the listener from the dictionary, and attach to the notification. (WebCore::Notification::create): Create the notification, then apply whatever properties can be found in the dictionary to the notification. In order to attach the event listeners, the notification has to have been created, which is why this all happens in the factory method and not in the constructor. (WebCore::Notification::setBody): Added so that it can be set if we find it in the dictionary. The new constructor queues a task to show when it is created. To support this, we use a one-shot timer that calls show() in the next iteration of the run loop. (WebCore::Notification::Notification): Start the timer. (WebCore::Notification::showTaskTimerFired): Call show(). Notifications, not being attached to the DOM, could be GC'ed by the JS engine before its life cycle has completed. We add calls to setPendingActivity() when the notification has been shown, and when it is closed, we unsetPendingActivity(). To guarantee that we only call this once, we add a new state to the Notification state machine, called NotificationState::Closed. (WebCore::Notification::show): Call setPendingActivity() for all ports. Remove conditional on Mac. (WebCore::Notification::close): Include Closed state to machine; do nothing. (WebCore::Notification::dispatchCloseEvent): Call finalize(). (WebCore::Notification::finalize): If the state is not Closed, we unsetPendingActivity() to make it available for GC. (WebCore::Notification::finishLoading): Remove the unsetPendingActivity(). That call was to balance the setPendingActivity() called for loading the icon. Instead of wrapping around the icon load, we wrap around the show() -> finalize() loop. In Notification, rename some of the stages and functions to more clearly communicate that they mostly deal with the icon of the notification, instead of general loading. (WebCore::Notification::show): Refactored to use LoadingIcon and CancelledIcon. (WebCore::Notification::close): Refactored to use LoadingIcon and CancelledIcon. (WebCore::Notification::~Notification): Refactor to use LoadingIcon. (WebCore::Notification::startLoadingIcon): Renamed from startLoading(). (WebCore::Notification::stopLoadingIcon): Renamed from stopLoading(). (WebCore::Notification::finishLoadingIcon): Renamed from finishLoading(). (WebCore::Notification::didFinishLoading): (WebCore::Notification::didFail): (WebCore::Notification::didFailRedirectCheck): (WebCore::Notification::didReceiveResponse): (WebCore::Notification::finishLoading): Add Dictionary.cpp. * GNUmakefile.list.am: * Target.pri: * UseJSC.cmake: * WebCore.gypi: Fix bug in V8 bindings generation code. If the constructor doesn't raise an exception, don't use an exception code. * bindings/scripts/CodeGeneratorV8.pm: (GenerateParametersCheck): * bindings/scripts/test/V8/V8TestObj.cpp: Reset results. (WebCore::TestObjV8Internal::optionsObjectCallback): 2012-04-21 Benjamin C Meyer Support loading the same plugin in multiple locations in the Blackberry port. https://bugs.webkit.org/show_bug.cgi?id=84537 The hash for the plugin is only based upon the plugin meta information which will be the same for the same plugin in the system and user's plugin folders. It looks like this code was copied/based on the windows port which doesn't allow the same plugin to be loaded more than once. Because we want to support multiple copies of the same plugin in the blackberry port we want to incorperate the path of the plugin into the hash. PR 150404 Reviewed by Adam Treat. * plugins/blackberry/PluginPackageBlackBerry.cpp: (WebCore::PluginPackage::hash): 2012-04-21 Benjamin C Meyer System plugins are preferred over application plugins https://bugs.webkit.org/show_bug.cgi?id=84538 Set the preferred paths for plugins so that plugins that reside inside of the bar will be preferred over plugins that are in the system folder. PR 150404 Reviewed by Adam Treat. * plugins/PluginDatabase.cpp: (WebCore::PluginDatabase::isPreferredPluginDirectory): 2012-04-21 Darin Adler Improve performance of removing user and password from URLs https://bugs.webkit.org/show_bug.cgi?id=84525 Reviewed by Dan Bernstein. Performance improvement only. Correctness covered by existing regression tests. The most common use of KURL::setUser and KURL::setPass, by far, is to remove the user and password from a URL that already has neither. Optimize this by not re-parsing the URL in that case. * platform/KURL.cpp: (WebCore::KURL::setUser): Restructure code so that the code path that removes the user does no work when there is nothing to remove. Otherwise, leave the logic of the function untouched. (WebCore::KURL::setPass): Same thing, only for password rather than user. 2012-04-20 Sheriff Bot Unreviewed, rolling out r114768. http://trac.webkit.org/changeset/114768 https://bugs.webkit.org/show_bug.cgi?id=84521 Original patch was not the problem, re-applying (Requested by pfeldman_ on #webkit). * bindings/v8/V8IsolatedContext.cpp: (WebCore::setInjectedScriptContextDebugId): (WebCore): (WebCore::V8IsolatedContext::V8IsolatedContext): * bindings/v8/V8Proxy.cpp: (WebCore::V8Proxy::evaluateInIsolatedWorld): * bindings/v8/V8Proxy.h: (V8Proxy): 2012-04-20 Adrienne Walker [chromium] Refactor opaque content transform out of Skia context https://bugs.webkit.org/show_bug.cgi?id=83608 Reviewed by James Robinson. Having PlatformContextSkia know about the transform into content space for a layer is a layering violation. This change lets the PlatformContextSkia deal with opaque rects in its own space and lets the caller handle transforming it into its own space. This also prevents a matrix multiply per draw into the Skia canvas and does it just once at the end to transform the final rect. This is an incremental refactoring so that additional tracking for text rects can be added and use the same space as opaque rects. Tests: LayerTextureUpdaterTest.testPartialOpaqueRectNoTransform LayerTextureUpdaterTest.testPartialOpaqueRectTranslation LayerTextureUpdaterTest.testPartialOpaqueRectScale * platform/graphics/chromium/BitmapCanvasLayerTextureUpdater.cpp: (WebCore::BitmapCanvasLayerTextureUpdater::prepareToUpdate): * platform/graphics/chromium/BitmapCanvasLayerTextureUpdater.h: (BitmapCanvasLayerTextureUpdater): * platform/graphics/chromium/BitmapSkPictureCanvasLayerTextureUpdater.cpp: (WebCore::BitmapSkPictureCanvasLayerTextureUpdater::prepareToUpdate): * platform/graphics/chromium/BitmapSkPictureCanvasLayerTextureUpdater.h: (BitmapSkPictureCanvasLayerTextureUpdater): * platform/graphics/chromium/CanvasLayerTextureUpdater.cpp: (WebCore::CanvasLayerTextureUpdater::paintContents): * platform/graphics/chromium/CanvasLayerTextureUpdater.h: (CanvasLayerTextureUpdater): * platform/graphics/chromium/LayerTextureUpdater.h: (WebCore::LayerTextureUpdater::prepareToUpdate): * platform/graphics/chromium/SkPictureCanvasLayerTextureUpdater.cpp: (WebCore::SkPictureCanvasLayerTextureUpdater::prepareToUpdate): * platform/graphics/chromium/SkPictureCanvasLayerTextureUpdater.h: (SkPictureCanvasLayerTextureUpdater): * platform/graphics/chromium/TiledLayerChromium.cpp: (WebCore::TiledLayerChromium::updateTiles): * platform/graphics/skia/OpaqueRegionSkia.cpp: (WebCore::OpaqueRegionSkia::didDrawRect): (WebCore::OpaqueRegionSkia::didDrawPath): (WebCore::OpaqueRegionSkia::didDrawPoints): (WebCore::OpaqueRegionSkia::didDrawBounded): (WebCore::OpaqueRegionSkia::didDraw): * platform/graphics/skia/OpaqueRegionSkia.h: (OpaqueRegionSkia): * platform/graphics/skia/PlatformContextSkia.cpp: (WebCore::PlatformContextSkia::didDrawRect): (WebCore::PlatformContextSkia::didDrawPath): (WebCore::PlatformContextSkia::didDrawPoints): (WebCore::PlatformContextSkia::didDrawBounded): * platform/graphics/skia/PlatformContextSkia.h: (PlatformContextSkia): 2012-04-20 Enrica Casucci CRASH at WebCore::ReplaceSelectionCommand::removeRedundantMarkup https://bugs.webkit.org/show_bug.cgi?id=84518 Reviewed by Simon Fraser. There are cases where the m_lastNodeInserted is NULL to begin with or gets deleted by removeRedundantStylesAndKeepStyleSpanInline. This change handles those cases properly. Tests: editing/pasteboard/paste-sanitize-crash-1.html editing/pasteboard/paste-sanitize-crash-2.html * editing/ReplaceSelectionCommand.h: (WebCore::ReplaceSelectionCommand::InsertedNodes::pastLastLeaf): * editing/SimplifyMarkupCommand.cpp: (WebCore::SimplifyMarkupCommand::doApply): 2012-04-20 Michael Nordman [chromium] Tiny change to DomStorage v8 bindings to avoid a relatively expensive test in a couple of places by reordering the expressions in compound conditions, if (fastTest && moreExpensiveTest) https://bugs.webkit.org/show_bug.cgi?id=84500 Reviewed by Kentaro Hara. No new tests, no new functionality. * bindings/v8/custom/V8StorageCustom.cpp: (WebCore::storageGetter): (WebCore::V8Storage::namedPropertyQuery): 2012-04-20 Dan Bernstein REGRESSION (r114784): svg/text/foreignObject-text-clipping-bug.xml failing on Mountain Lion Debug Tests https://bugs.webkit.org/show_bug.cgi?id=84505 Reviewed by Anders Carlsson. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::blockBeforeWithinSelectionRoot): Changed to not assume that boxes only have boxes as siblings. 2012-04-20 Dana Jansens [chromium] Remove special case for recreating layers during sync https://bugs.webkit.org/show_bug.cgi?id=84458 Reviewed by James Robinson. We no longer delete layers on the impl side, unless it is due to deleting the layer on webkit side. So we will no longer have a situation where we need to push properties from an old LayerChromium to a new CCLayerImpl. * platform/graphics/chromium/TreeSynchronizer.cpp: (WebCore::TreeSynchronizer::reuseOrCreateCCLayerImpl): 2012-04-20 Dana Jansens [chromium] WebFilterOperations API does not compile or dynamically link https://bugs.webkit.org/show_bug.cgi?id=84506 Reviewed by James Robinson. Non-inline functions need WEBKIT_EXPORT in their declarations, and the type used in the WebPrivateOwnPtr needs to be forward- declared even when WEBKIT_IMPLEMENTATION is not defined. * platform/chromium/support/WebFilterOperations.cpp: (WebKit::WebFilterOperations::initialize): 2012-04-20 Sheriff Bot Unreviewed, rolling out r114333. http://trac.webkit.org/changeset/114333 https://bugs.webkit.org/show_bug.cgi?id=84511 perf regression (Requested by morrita on #webkit). * dom/Node.cpp: * dom/Node.h: (WebCore): (Node): (WebCore::Node::isElementNode): (WebCore::Node::isContainerNode): (WebCore::Node::isTextNode): (WebCore::Node::isHTMLElement): (WebCore::Node::isSVGElement): (WebCore::Node::isStyledElement): (WebCore::Node::isShadowRoot): (WebCore::Node::parentNode): (WebCore::Node::parentNodeGuaranteedHostFree): 2012-04-20 Alec Flett IndexedDB: Support get/getKey(keyRange) https://bugs.webkit.org/show_bug.cgi?id=83638 Reviewed by Ojan Vafai. Support IDBKeyRange as a parameter to all the various get/getKey combinations. Switches the existing get/getKey versions that use IDBKey directly to start using IDBKeyRange.only(). Test: storage/indexeddb/get-keyrange.html * Modules/indexeddb/IDBIndex.cpp: (WebCore::IDBIndex::get): (WebCore): (WebCore::IDBIndex::getKey): * Modules/indexeddb/IDBIndex.h: (IDBIndex): * Modules/indexeddb/IDBIndex.idl: * Modules/indexeddb/IDBIndexBackendImpl.cpp: (WebCore::IDBIndexBackendImpl::getInternal): (WebCore): (WebCore::IDBIndexBackendImpl::getByRangeInternal): (WebCore::IDBIndexBackendImpl::getKeyInternal): (WebCore::IDBIndexBackendImpl::getKeyByRangeInternal): (WebCore::IDBIndexBackendImpl::get): (WebCore::IDBIndexBackendImpl::getKey): * Modules/indexeddb/IDBIndexBackendImpl.h: (IDBIndexBackendImpl): * Modules/indexeddb/IDBIndexBackendInterface.h: (IDBIndexBackendInterface): * Modules/indexeddb/IDBObjectStore.cpp: (WebCore::IDBObjectStore::get): (WebCore): * Modules/indexeddb/IDBObjectStore.h: (IDBObjectStore): * Modules/indexeddb/IDBObjectStore.idl: * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp: (WebCore): (WebCore::IDBObjectStoreBackendImpl::get): (WebCore::IDBObjectStoreBackendImpl::getByRangeInternal): (WebCore::IDBObjectStoreBackendImpl::getInternal): * Modules/indexeddb/IDBObjectStoreBackendImpl.h: (IDBObjectStoreBackendImpl): * Modules/indexeddb/IDBObjectStoreBackendInterface.h: (IDBObjectStoreBackendInterface): 2012-04-20 Sheriff Bot Unreviewed, rolling out r114789. http://trac.webkit.org/changeset/114789 https://bugs.webkit.org/show_bug.cgi?id=84515 Caused 5 tests to fail on mac/ (Requested by jernoble on #webkit). * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): * css/CSSValueKeywords.in: * platform/ThemeTypes.h: * rendering/RenderTheme.cpp: (WebCore::RenderTheme::paint): 2012-04-20 Brady Eidson https://bugs.webkit.org/show_bug.cgi?id=84512 Repurpose ActiveDOMObject::WillShowDialog to WillDeferLoading Reviewed by Eric Carlson. No new tests. (Refactor, no behavior change) Rename WillShowDialog to WillDeferLoading: * dom/ActiveDOMObject.h: * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::suspend): Don't take a ReasonForSuspension argument anymore, just use WillDeferLoading: * page/PageGroupLoadDeferrer.cpp: (WebCore::PageGroupLoadDeferrer::PageGroupLoadDeferrer): * page/PageGroupLoadDeferrer.h: Don't pass a Reason anymore as WillDeferLoading is used by default: * page/Chrome.cpp: (WebCore::Chrome::runModal): (WebCore::Chrome::runBeforeUnloadConfirmPanel): (WebCore::Chrome::runJavaScriptAlert): (WebCore::Chrome::runJavaScriptConfirm): (WebCore::Chrome::runJavaScriptPrompt): (WebCore::Chrome::shouldInterruptJavaScript): 2012-04-20 James Robinson [chromium] Plumb a compositor surface ready notification through to the threaded compositor https://bugs.webkit.org/show_bug.cgi?id=84305 Reviewed by Adrienne Walker. Plumb setSurfaceReady through to the scheduler. * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::setSurfaceReady): (WebCore): * platform/graphics/chromium/cc/CCLayerTreeHost.h: (CCLayerTreeHost): * platform/graphics/chromium/cc/CCProxy.h: (CCProxy): * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp: (WebCore::CCSingleThreadProxy::setSurfaceReady): (WebCore): * platform/graphics/chromium/cc/CCSingleThreadProxy.h: (CCSingleThreadProxy): * platform/graphics/chromium/cc/CCThreadProxy.cpp: (WebCore::CCThreadProxy::setSurfaceReady): (WebCore): (WebCore::CCThreadProxy::setSurfaceReadyOnImplThread): (WebCore::CCThreadProxy::initializeImplOnImplThread): * platform/graphics/chromium/cc/CCThreadProxy.h: (CCThreadProxy): 2012-04-20 Mark Pilgrim [Chromium] Call memoryUsageMB directly https://bugs.webkit.org/show_bug.cgi?id=84376 Reviewed by Kentaro Hara. Now that memoryUsageMB has been moved from PlatformSupport.h to Platform.h, we need to be able to call it directly from WebCore/bindings/v8/V8GCController.cpp. That means we need a new MemoryUsageSupport class in WebCore/platform/ and an implementation in WebCore/platform/chromium/MemoryUsageSupportChromium.cpp. Other ports are welcome to implement their memory usage functions if they wish. This pattern was based on the HistogramSupport/HistogramSupportChromium classes. Part of a refactoring series. See tracking bug 82948. * CMakeLists.txt: * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * bindings/v8/V8GCController.cpp: (WebCore): * platform/MemoryUsageSupport.cpp: Added. (WebCore): (WebCore::MemoryUsageSupport::memoryUsageMB): * platform/MemoryUsageSupport.h: Added. (WebCore): (MemoryUsageSupport): * platform/chromium/MemoryUsageSupportChromium.cpp: Added. (WebCore): (WebCore::MemoryUsageSupport::memoryUsageMB): * platform/chromium/PlatformSupport.h: (PlatformSupport): 2012-04-20 Anders Carlsson Re-land. The non-fast scrollable region is now always updated after layout, and frameViewScrollableAreasDidChange has been removed. computeNonFastScrollableRegion needs to traverse the entire frame tree https://bugs.webkit.org/show_bug.cgi?id=84409 Reviewed by Dan Bernstein. Now that scrollable areas won't be in the set of scrollable areas unless they are actually scrollable, we need to look for scrollable areas in the entire frame tree since there can be a scrollable frame that's a subframe of a non-scrollable frame for example. * page/scrolling/ScrollingCoordinator.cpp: (WebCore::computeNonFastScrollableRegion): (WebCore::ScrollingCoordinator::frameViewLayoutUpdated): 2012-04-20 Adrienne Walker [chromium] Clip TransparencyWin to prevent OOM from large Skia canvas https://bugs.webkit.org/show_bug.cgi?id=84289 Reviewed by James Robinson. TransparencyWin will create a Skia canvas of whatever size is passed in, even if the result will ultimately be clipped. Handle the clip implicitly and try (in some cases) to create a smaller canvas. This can happen due to RenderBox::paintBoxDecorations passing a paint rect down of the entire element's size. Modes with more complicated transforms (ScaleTransform, UnTransform) are not handled yet. Tests: TransparencyWin.ClippedKeepTransformNoLayer TransparencyWin.ClippedKeepTransformOpaqueCompositeLayer TransparencyWin.ClippedKeepTransformOpaqueWhiteLayer * platform/graphics/chromium/TransparencyWin.cpp: (WebCore::TransparencyWin::computeLayerSize): 2012-04-04 Jer Noble apple.com top navigation bar appears inside video during full screen exit animation https://bugs.webkit.org/show_bug.cgi?id=83095 Reviewed by Eric Carlson. Test: fullscreen/full-screen-exit-animation-stacking-context.html Only tell ancestors of the full screen element that they are no longer ancestors once the full screen animation is complete: * dom/Document.cpp: (WebCore::Document::webkitWillExitFullScreenForElement): (WebCore::Document::webkitDidExitFullScreenForElement): To facilitate writing reproducible LayoutTests, expose webkitWill/Did/Enter/ExitFullScreen from the Internals object, so scripts can call them explicitly: * testing/Internals.cpp: (WebCore::Internals::webkitWillEnterFullScreenForElement): Call the Document equivalent. (WebCore::Internals::webkitDidEnterFullScreenForElement): Ditto. (WebCore::Internals::webkitWillExitFullScreenForElement): Ditto. (WebCore::Internals::webkitDidExitFullScreenForElement): Ditto. * testing/Internals.h: * testing/Internals.idl: 2012-04-17 Jer Noble media-exit-fullscreen-button (and related enums) is unnecessary and should be removed. https://bugs.webkit.org/show_bug.cgi?id=84162 Reviewed by Eric Carlson. No new tests; no change in functionality so covered by existing tests. Remove the media-exit-fullscreen-button keyword, and rename media-enter-fullscreen-button to media-fullscreen-button. * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): * css/CSSValueKeywords.in: * css/mediaControls.css: (audio::-webkit-media-controls-fullscreen-button, video::-webkit-media-controls-fullscreen-button): * platform/ThemeTypes.h: * rendering/RenderTheme.cpp: (WebCore::RenderTheme::paint): 2012-04-20 Alexandre Elias [chromium] Fix compile errors when DEBUG_GL_CALLS is enabled https://bugs.webkit.org/show_bug.cgi?id=84491 Reviewed by Ojan Vafai. DEBUG_GL_CALLS had not been used in a while and the mode no longer compiled when I tried it. I improved the GLC macro to support either raw pointers or RefPtrs, and to be a single expression in order to interact properly with if/else blocks. I fixed the cases where we were passing in the "context" method pointer by mistake, and removed the now-unnecessary "get()" calls for the RefPtrs. No new tests. (No-op change in release builds.) * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::initialize): (WebCore::LayerRendererChromium::clearRenderSurface): (WebCore::LayerRendererChromium::beginDrawingFrame): (WebCore::LayerRendererChromium::doNoOp): (WebCore::LayerRendererChromium::drawQuad): (WebCore::LayerRendererChromium::drawTextureQuad): (WebCore::LayerRendererChromium::drawHeadsUpDisplay): (WebCore::LayerRendererChromium::finishDrawingFrame): (WebCore::LayerRendererChromium::useRenderSurface): (WebCore::LayerRendererChromium::bindFramebufferToTexture): (WebCore::LayerRendererChromium::setScissorToRect): (WebCore::LayerRendererChromium::setDrawViewportRect): (WebCore::LayerRendererChromium::initializeSharedObjects): (WebCore::LayerRendererChromium::cleanupSharedObjects): * platform/graphics/chromium/LayerRendererChromium.h: (WebCore): 2012-04-20 Anders Carlsson Fix build. * page/scrolling/ScrollingCoordinator.cpp: (WebCore::ScrollingCoordinator::updateMainFrameScrollPositionAndScrollLayerPosition): 2012-04-19 Simon Fraser Set m_compositingDependsOnGeometry to false if possible https://bugs.webkit.org/show_bug.cgi?id=84391 Reviewed by James Robinson. For some kinds of elements, RenderLayerCompositor has to delay decisions about compositing until the element's size and/or position are known. This was previsouly based on the confusingly named m_compositingDependsOnGeometry flag, but another variant of the same technique, with an additional flag m_compositingNeedsUpdate, was added in r98627. Also, once the m_compositingDependsOnGeometry flag was set to true, nothing set it to false, so every compositing layer update resulted in a computeCompositingRequirements() pass over the layers. Rename the m_compositingDependsOnGeometry flag to m_reevaluateCompositingAfterLayout, and clear the flag when we do a layout-related compositing layer update. Use the same flag for position:fixed compositing. This requires RenderLayerCompositor to distinguish between style- and layout- related updates, requiring some minor refactoring in FrameView. Should not change behavior. * dom/Document.cpp: (WebCore::Document::recalcStyle): (WebCore::Document::implicitClose): * page/FrameView.cpp: (WebCore::FrameView::updateCompositingLayersAfterStyleChange): (WebCore::FrameView::updateCompositingLayersAfterLayout): (WebCore::FrameView::restoreBackingStores): (WebCore::FrameView::layout): * page/FrameView.h: (FrameView): * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::RenderLayerCompositor): (WebCore::RenderLayerCompositor::updateCompositingLayersTimerFired): (WebCore::RenderLayerCompositor::updateCompositingLayers): (WebCore::RenderLayerCompositor::layerTreeAsText): (WebCore::RenderLayerCompositor::requiresCompositingForPlugin): (WebCore::RenderLayerCompositor::requiresCompositingForFrame): (WebCore::RenderLayerCompositor::requiresCompositingForPosition): * rendering/RenderLayerCompositor.h: (RenderLayerCompositor): 2012-04-20 Dan Bernstein Selection highlights of lines in adjoining blocks can overlap https://bugs.webkit.org/show_bug.cgi?id=84489 Reviewed by Anders Carlsson. Test: fast/block/line-layout/selection-highlight-overlap.html * rendering/EllipsisBox.cpp: (WebCore::EllipsisBox::selectionRect): Changed to use selection{Top,Height}AdjustedForPrecedingBlock(). * rendering/InlineTextBox.cpp: (WebCore::InlineTextBox::paintSelection): Ditto. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::inlineSelectionGaps): Ditto. (WebCore::RenderBlock::blockBeforeWithinSelectionRoot): Added. Returns the block which is likely to contain the selected line just before the first line in this block, if it is within the same selection root. * rendering/RenderBlock.h: * rendering/RootInlineBox.cpp: (WebCore::RootInlineBox::selectionTopAdjustedForPrecedingBlock): Added. If the selection starts before our block, finds the last line in the preceding block and adjusts the selection top to avoid overlap with that line’s selection bottom. * rendering/RootInlineBox.h: (WebCore::RootInlineBox::selectionHeightAdjustedForPrecedingBlock): Added. Like selectionHeight(), but uses selectionTopAdjustedForPrecedingBlock(). 2012-04-20 Xianzhu Wang Crash in getOrDrawNodeHighlight after r114659 https://bugs.webkit.org/show_bug.cgi?id=84486 Reviewed by Daniel Bates. No new tests. Fixes a crash in test: inspector/elements/elements-panel-selection-on-refresh.html. * inspector/DOMNodeHighlighter.cpp: 2012-04-20 Brady Eidson https://bugs.webkit.org/show_bug.cgi?id=84490 PageGroupLoadDeferrer needs to take a ReasonForSuspension argument Reviewed by Anders Carlsson. No new tests. (Refactor, no change in behavior) - Make PageGroupLoadDeferrer take a ReasonForSuspension argument so it can pass it along. * page/PageGroupLoadDeferrer.cpp: (WebCore::PageGroupLoadDeferrer::PageGroupLoadDeferrer): * page/PageGroupLoadDeferrer.h: - Change suspendScheduledTasks to take a ReasonForSuspension. - As long as we're changing Document.h, add a m_suspendedScheduledTasks flag and some ASSERTs to catch what would be epically wrong behavior in the future. * dom/Document.cpp: (WebCore::Document::Document): (WebCore::Document::suspendScheduledTasks): (WebCore::Document::resumeScheduledTasks): * dom/Document.h: - Pass ActiveDOMObject::WillShowDialog along to all PageGroupLoadDeferrers, as it used to be the default behavior * page/Chrome.cpp: (WebCore::Chrome::runModal): (WebCore::Chrome::runBeforeUnloadConfirmPanel): (WebCore::Chrome::runJavaScriptAlert): (WebCore::Chrome::runJavaScriptConfirm): (WebCore::Chrome::runJavaScriptPrompt): (WebCore::Chrome::shouldInterruptJavaScript): 2012-04-20 Anders Carlsson Scrolling after going to a find-in-page result jumps to the top of the page https://bugs.webkit.org/show_bug.cgi?id=84485 Reviewed by Beth Dakin. If we're both updating the requested scroll position and entering slow mode in the same commit, the probable main thread scroll position should be the requested scroll position. * page/scrolling/mac/ScrollingTreeNodeMac.mm: (WebCore::ScrollingTreeNodeMac::update): 2012-04-20 James Robinson Avoid synchronously recalculating the nonFastScrollableRegion when the ScrollableArea set changes https://bugs.webkit.org/show_bug.cgi?id=84470 Reviewed by Anders Carlsson. When a scrollable area is added or removed, we shouldn't recalculate the nonFastScrollableRegion synchronously since this is slow, the RenderObject tree might not be in an up-to-date state, and we'll typically do layout soon anyway. * page/FrameView.cpp: (WebCore::FrameView::addScrollableArea): (WebCore::FrameView::removeScrollableArea): * page/scrolling/ScrollingCoordinator.cpp: * page/scrolling/ScrollingCoordinator.h: (ScrollingCoordinator): 2012-04-20 Emil A Eklund Fix use of LayoutUnits in DOMNodeHighlighter https://bugs.webkit.org/show_bug.cgi?id=84472 Reviewed by Eric Seidel. Fix use of subpixel units and rounding in new code introduced in r114659. No new tests, no change in functionality. * inspector/DOMNodeHighlighter.cpp: 2012-04-17 Antonio Gomes Relax ScrollView::adjustScrollPositionWithinRange in case constrainsScrollingToContentEdge is false https://bugs.webkit.org/show_bug.cgi?id=84178 Reviewed by Adam Treat. No new tests since it is not easily testable. When a port has both delegatesScrolling and constrainsScrollingToContentEdge set to FALSE (i.e. it accepts overscrolled position), calling ScrollView::setScrollPosition with an overscrolled position still gets the position clamped to the content size edges. Patch relaxes ::adjustScrollPositionWithinRange in that sense in order to track the actual scroll position. Note: ScrollView::setScrollOffset already does something similar. * platform/ScrollView.cpp: (WebCore::ScrollView::adjustScrollPositionWithinRange): 2012-04-20 Sheriff Bot Unreviewed, rolling out r114535. http://trac.webkit.org/changeset/114535 https://bugs.webkit.org/show_bug.cgi?id=84475 It might have caused V8 crashes. (Requested by pfeldman_ on #webkit). * bindings/v8/V8IsolatedContext.cpp: (WebCore::V8IsolatedContext::V8IsolatedContext): * bindings/v8/V8Proxy.cpp: (WebCore::V8Proxy::evaluateInIsolatedWorld): (WebCore::V8Proxy::setInjectedScriptContextDebugId): (WebCore): * bindings/v8/V8Proxy.h: (V8Proxy): 2012-04-20 Dean Jackson -webkit-filter missing from computed style enumeration https://bugs.webkit.org/show_bug.cgi?id=84468 Reviewed by Timothy Hatcher. CSSComputedStyleDeclaration has a list of properties that it exposes. While the computed style for filter was available, the property wasn't listed and hence missing in clients like the Web Inspector. Covered by existing tests. * css/CSSComputedStyleDeclaration.cpp: (WebCore): add CSSPropertyWebkitFilter 2012-04-20 Emil A Eklund [win] Update windows platform code to use pixel snapped values https://bugs.webkit.org/show_bug.cgi?id=84283 Reviewed by Eric Seidel. No new tests, no change in functionality. * accessibility/AccessibilityObject.h: (WebCore::AccessibilityObject::pixelSnappedElementRect): Use pixel snapped values when computing screenRect. * platform/win/PopupMenuWin.cpp: (WebCore::PopupMenuWin::calculatePositionAndSize): (WebCore::PopupMenuWin::paint): Cast client padding to ints as they are guaranteed to align with device pixels. 2012-04-20 Dana Jansens [chromium] Some filters require inflating damage rect in CCDamageTracker https://bugs.webkit.org/show_bug.cgi?id=84373 Reviewed by James Robinson. When a layer is blurred, damaged pixels are blurred out into a radius and their damage should be expanded to include total blurred region. Unit test: CCDamageTrackerTest.verifyDamageForBlurredSurface * platform/graphics/chromium/cc/CCDamageTracker.cpp: (WebCore::CCDamageTracker::updateDamageTrackingState): (WebCore::CCDamageTracker::expandDamageRectWithForegroundFilters): (WebCore): * platform/graphics/chromium/cc/CCDamageTracker.h: (WebCore): (CCDamageTracker): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::trackDamageForAllSurfaces): 2012-04-20 Sami Kyostila [chromium] Don't crash when scrolling empty layer tree https://bugs.webkit.org/show_bug.cgi?id=84455 Reviewed by James Robinson. Do not try to calculate render passes when there are no layers in the layer tree. Added new unit test. * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::calculateRenderPasses): 2012-04-20 Victor Carbune Ensure text is centered for default captions https://bugs.webkit.org/show_bug.cgi?id=84450 Reviewed by Eric Carlson. Updated existing test. * html/track/TextTrackCue.cpp: (WebCore::TextTrackCue::getDisplayTree): Added default width. 2012-04-20 Pavel Feldman Web Inspector: open file dialog is not centered. https://bugs.webkit.org/show_bug.cgi?id=84464 Reviewed by Yury Semikhatsky. There was an error in the positioning logic. * inspector/front-end/FilteredItemSelectionDialog.js: (WebInspector.FilteredItemSelectionDialog.prototype.position): 2012-04-20 Allan Sandfeld Jensen [Qt] PlatformMouseEventQt.cpp should be deleted. https://bugs.webkit.org/show_bug.cgi?id=84437 Reviewed by Kenneth Rohde Christiansen. * platform/qt/PlatformMouseEventQt.cpp: Removed. 2012-04-20 Pavel Feldman Web Inspector: follow up to r114729: more @return annotations added. https://bugs.webkit.org/show_bug.cgi?id=84447 Reviewed by Yury Semikhatsky. * inspector/front-end/Resource.js: (WebInspector.Resource): (WebInspector.ResourceRevision.prototype.get content): * inspector/front-end/ResourceTreeModel.js: (WebInspector.ResourceTreeFrame.prototype._addRequest): * inspector/front-end/ResourceUtils.js: (String.prototype.asParsedURL): 2012-04-20 Pavel Feldman Web Inspector: migrate from ScriptsNavigator to NavigatorView in the Styles panel https://bugs.webkit.org/show_bug.cgi?id=84459 Reviewed by Yury Semikhatsky. Now that NavigatorView has all the functionality we need, we can use it. * inspector/front-end/NavigatorView.js: (WebInspector.NavigatorScriptTreeElement.prototype.ondblclick): * inspector/front-end/ScriptsNavigator.js: (WebInspector.ScriptsNavigator): * inspector/front-end/StylesPanel.js: (WebInspector.StylesPanel): (WebInspector.StylesPanel.prototype._resourceAdded): (WebInspector.StylesPanel.prototype._reset): (WebInspector.StylesPanel.prototype._itemSelected): (WebInspector.StylesPanel.prototype._showFile): * inspector/front-end/navigatorView.css: (.navigator-tabbed-pane .tabbed-pane-content): (.navigator-tabbed-pane .navigator-container): (.navigator-tabbed-pane .navigator): (.navigator-tabbed-pane .tabbed-pane-header): (.navigator-tabbed-pane .tabbed-pane-header-contents): * inspector/front-end/scriptsPanel.css: 2012-04-20 Sam D Web Inspector: Does not have search navigation button for going through matches in either direction (prev, next) https://bugs.webkit.org/show_bug.cgi?id=84235 Added buttons for navigating on seiarch matches in inspector panel through button clicks as well. Reviewed by Pavel Feldman. No new tests / ux enhanced for search functionality * English.lproj/localizedStrings.js: * WebCore.gypi: * inspector/front-end/Images/searchNext.png: Added. * inspector/front-end/Images/searchPrev.png: Added. * inspector/front-end/SearchController.js: (WebInspector.SearchController): (WebInspector.SearchController.prototype._updateSearchNavigationButtonState): (WebInspector.SearchController.prototype._updateSearchMatchesCountAndCurrentMatchIndex): (WebInspector.SearchController.prototype._onNextButtonSearch): (WebInspector.SearchController.prototype._onPrevButtonSearch): (WebInspector.SearchController.prototype._performSearch): (WebInspector.SearchController.prototype._createSearchNavigationButton): (WebInspector.SearchController.prototype._populateSearchNavigationButtons): * inspector/front-end/WebKit.qrc: * inspector/front-end/inspector.css: (.toolbar-search-item): (#search): (#toolbar-search-navigation-control): (.toolbar-search-navigation-label): (.toolbar-search-navigation-label:hover): (.toolbar-search-navigation-icon-prev , .toolbar-search-navigation-icon-next): (.toolbar-search-navigation-icon-prev): (.toolbar-search-navigation-icon-next): * inspector/front-end/inspector.html: 2012-04-20 Pavel Feldman Web Inspector: extract NavigatorView and NavigatorOverlayController from ScriptsNavigator. https://bugs.webkit.org/show_bug.cgi?id=84441 Reviewed by Yury Semikhatsky. - Moves NavigatorOverlayController out of ScriptsNavigator - Extracts NavigatorView from ScriptsNavigator and makes ScriptsNavigator contain 3 NavigatorView instances (one per tab) - Subclasses SnippetsNavigatorView and leaves it within ScriptsNavigator. * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * inspector/compile-front-end.py: * inspector/front-end/NavigatorOverlayController.js: Added. (WebInspector.NavigatorOverlayController.prototype.wasShown): (WebInspector.NavigatorOverlayController.prototype._createNavigatorControlButton): (WebInspector.NavigatorOverlayController.prototype._escDownWhileNavigatorOverlayOpen): (WebInspector.NavigatorOverlayController.prototype._toggleNavigator): (WebInspector.NavigatorOverlayController.prototype._hidePinnedNavigator): (WebInspector.NavigatorOverlayController.prototype.set _pinNavigator): (WebInspector.NavigatorOverlayController.prototype.set showNavigatorOverlay): (WebInspector.NavigatorOverlayController.prototype.hideNavigatorOverlay): (WebInspector.NavigatorOverlayController.prototype._navigatorOverlayWasShown): * inspector/front-end/NavigatorView.js: Added. (WebInspector.NavigatorView): (WebInspector.NavigatorView.prototype._updateScriptTitle.get if): (WebInspector.NavigatorView.prototype._updateScriptTitle): (WebInspector.NavigatorView.prototype._scriptSelected): (WebInspector.NavigatorView.prototype._removeUISourceCode.get while): (WebInspector.NavigatorView.prototype._removeUISourceCode): (WebInspector.NavigatorView.prototype._showScriptFoldersSettingChanged): (WebInspector.NavigatorView.prototype._fileRenamed): (WebInspector.NavigatorView.prototype.rename.commitHandler): (WebInspector.NavigatorView.prototype.rename.cancelHandler): (WebInspector.NavigatorView.prototype.rename.afterEditing): (WebInspector.NavigatorView.prototype.reset): (WebInspector.NavigatorView.prototype.createFolderTreeElement): (WebInspector.NavigatorView.prototype.getOrCreateFolderTreeElement): (WebInspector.NavigatorView.prototype.handleContextMenu): (WebInspector.NavigatorTreeOutline): (WebInspector.NavigatorTreeOutline._treeElementsCompare.compare.typeWeight): (WebInspector.NavigatorTreeOutline._treeElementsCompare): (WebInspector.NavigatorTreeOutline.prototype.scriptTreeElements): (WebInspector.NavigatorTreeOutline.prototype.searchStarted): (WebInspector.NavigatorTreeOutline.prototype.searchFinished): (WebInspector.BaseNavigatorTreeElement): (WebInspector.BaseNavigatorTreeElement.prototype.onattach): (WebInspector.BaseNavigatorTreeElement.prototype.onreveal): (WebInspector.BaseNavigatorTreeElement.prototype.get titleText): (WebInspector.BaseNavigatorTreeElement.prototype.set titleText): (WebInspector.BaseNavigatorTreeElement.prototype.matchesSearchText): (WebInspector.NavigatorFolderTreeElement): (WebInspector.NavigatorFolderTreeElement.prototype.get folderIdentifier): (WebInspector.NavigatorFolderTreeElement.prototype.get isDomain): (WebInspector.NavigatorFolderTreeElement.prototype.onattach): (WebInspector.NavigatorScriptTreeElement): (WebInspector.NavigatorScriptTreeElement.prototype.get uiSourceCode): (WebInspector.NavigatorScriptTreeElement.prototype.onattach): (WebInspector.NavigatorScriptTreeElement.prototype.onspace): (WebInspector.NavigatorScriptTreeElement.prototype._onclick): (WebInspector.NavigatorScriptTreeElement.prototype.onenter): (WebInspector.NavigatorScriptTreeElement.prototype._handleContextMenuEvent): * inspector/front-end/ScriptsNavigator.js: (WebInspector.ScriptsNavigator): (WebInspector.ScriptsNavigator.prototype.addUISourceCode): (WebInspector.ScriptsNavigator.prototype.isScriptSourceAdded): (WebInspector.ScriptsNavigator.prototype.revealUISourceCode): (WebInspector.ScriptsNavigator.prototype.replaceUISourceCodes): (WebInspector.ScriptsNavigator.prototype._scriptSelected): (WebInspector.ScriptsNavigator.prototype.reset): (WebInspector.SnippetsNavigatorView): (WebInspector.SnippetsNavigatorView.prototype.getOrCreateFolderTreeElement): (WebInspector.SnippetsNavigatorView.prototype._getOrCreateSnippetEvaluationsFolderTreeElement): (WebInspector.SnippetsNavigatorView.prototype.handleContextMenu): (WebInspector.SnippetsNavigatorView.prototype._fileRenamed): * inspector/front-end/WebKit.qrc: * inspector/front-end/inspector.html: * inspector/front-end/navigatorView.css: Added. (.navigator-domain-tree-item .icon): (.navigator-folder-tree-item .icon): (.navigator-script-tree-item .icon): (.navigator li): (.navigator :focus li.selected): (.navigator li.selected .selection): (.navigator :focus li.selected .selection): (.navigator .search-match-found li.selected .selection): (.navigator .search-match-not-found li.selected .selection): (.navigator .searching li.selected .selection): (.navigator .icon): (.navigator .base-navigator-tree-element-title): (.navigator .base-navigator-tree-element-title.editing): (.navigator-tree-search-box): (.navigator-tree-search-box.visible): (.navigator-tree-search-box > input): * inspector/front-end/scriptsPanel.css: 2012-04-19 Pavel Feldman Web Inspector: make ScriptNavigatorController use views only, rename to NavigatorOverlayController. https://bugs.webkit.org/show_bug.cgi?id=84352 Reviewed by Vsevolod Vlasov. This change makes navigator controller use view interfaces only. Focus machinery has been refactored in order to make it possible: now all view ancestors can either override "focus" or "defaultFocusedElement" method with latter method being preferred. * inspector/front-end/ElementsPanel.js: (WebInspector.ElementsPanel.prototype.defaultFocusedElement): * inspector/front-end/ExtensionPanel.js: (WebInspector.ExtensionPanel.prototype.defaultFocusedElement): * inspector/front-end/Panel.js: (WebInspector.Panel.prototype.wasShown): (WebInspector.Panel.prototype.defaultFocusedElement): * inspector/front-end/ScriptsNavigator.js: (WebInspector.ScriptsNavigator): (WebInspector.NavigatorOverlayController.prototype._hidePinnedNavigator): (WebInspector.NavigatorOverlayController.prototype.set _pinNavigator): (WebInspector.NavigatorOverlayController.prototype.set showNavigatorOverlay): (WebInspector.NavigatorOverlayController.prototype.hideNavigatorOverlay): (WebInspector.NavigatorOverlayController.prototype._navigatorOverlayWasShown): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype.defaultFocusedElement): * inspector/front-end/SidebarOverlay.js: (WebInspector.SidebarOverlay.prototype.show): (WebInspector.SidebarOverlay.prototype.hide): * inspector/front-end/SourceFrame.js: (WebInspector.SourceFrame.prototype.defaultFocusedElement): * inspector/front-end/StylesPanel.js: (WebInspector.StylesPanel): * inspector/front-end/TabbedEditorContainer.js: (WebInspector.TabbedEditorContainer.prototype.get view): (WebInspector.TabbedEditorContainer.prototype.get visibleView): * inspector/front-end/TabbedPane.js: (WebInspector.TabbedPane): (WebInspector.TabbedPane.prototype.defaultFocusedElement): * inspector/front-end/TextViewer.js: (WebInspector.TextViewer.prototype.defaultFocusedElement): (WebInspector.TextEditorMainPanel.prototype.defaultFocusedElement): * inspector/front-end/TimelinePanel.js: (WebInspector.TimelinePanel.prototype.defaultFocusedElement): * inspector/front-end/View.js: (WebInspector.View.prototype._collectViewHierarchy): (WebInspector.View.prototype.defaultFocusedElement): (WebInspector.View.prototype.setDefaultFocusedElement): (WebInspector.View.prototype.focus): 2012-04-20 Sergio Villar Senin [GTK] Enable Web Timing https://bugs.webkit.org/show_bug.cgi?id=42432 Reviewed by Gustavo Noronha Silva. Added WebTiming support to the GTK+ port. WebTiming allows developers to collect detailed network timing information per resource. It requires the new SoupMessage's "network-event" signal. * GNUmakefile.am: * bindings/gobject/GNUmakefile.am: * platform/network/soup/ResourceHandleSoup.cpp: (WebCore): (WebCore::restartedCallback): (WebCore::sendRequestCallback): (WebCore::milisecondsSinceRequest): (WebCore::wroteBodyCallback): (WebCore::requestStartedCallback): (WebCore::networkEventCallback): (WebCore::startHTTPRequest): (WebCore::ResourceHandle::platformSetDefersLoading): (WebCore::ResourceHandle::defaultSession): 2012-04-20 'Pavel Feldman' Not reviewed: fixed chromium sanity tests for inspector via assigning last path component to entire url for parsed urls with invalid specs. * inspector/front-end/ResourceUtils.js: (WebInspector.ParsedURL): 2012-04-20 Kentaro Hara Unreviewed, rolling out r114401. http://trac.webkit.org/changeset/114401 https://bugs.webkit.org/show_bug.cgi?id=84161 Chromium crash * bindings/scripts/CodeGeneratorV8.pm: (GenerateHeader): (NativeToJSValue): * bindings/scripts/test/V8/V8Float64Array.h: (WebCore): (WebCore::toV8): * bindings/scripts/test/V8/V8TestActiveDOMObject.h: (WebCore::toV8): * bindings/scripts/test/V8/V8TestCustomNamedGetter.h: (WebCore::toV8): * bindings/scripts/test/V8/V8TestEventConstructor.h: (WebCore::toV8): * bindings/scripts/test/V8/V8TestEventTarget.h: (WebCore::toV8): * bindings/scripts/test/V8/V8TestInterface.h: (WebCore::toV8): * bindings/scripts/test/V8/V8TestMediaQueryListListener.h: (WebCore::toV8): * bindings/scripts/test/V8/V8TestNamedConstructor.h: (WebCore::toV8): * bindings/scripts/test/V8/V8TestNode.h: (WebCore::toV8): * bindings/scripts/test/V8/V8TestObj.h: (WebCore::toV8): * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.h: (WebCore::toV8): * bindings/v8/custom/V8BlobCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8CSSRuleCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8CSSStyleSheetCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8CSSValueCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8CanvasPixelArrayCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8DOMStringMapCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8DOMTokenListCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8DOMWindowCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8DataViewCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8DocumentCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8EntryCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8EntrySyncCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8EventCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8Float32ArrayCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8Float64ArrayCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8HTMLCollectionCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8HTMLDocumentCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8HTMLElementCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8IDBAnyCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8IDBKeyCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8ImageDataCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8Int16ArrayCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8Int32ArrayCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8Int8ArrayCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8LocationCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8NamedNodeMapCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8NodeCustom.cpp: (WebCore::toV8Slow): * bindings/v8/custom/V8SVGDocumentCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8SVGElementCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8SVGPathSegCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8ScriptProfileCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8ScriptProfileNodeCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8StyleSheetCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8Uint16ArrayCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8Uint32ArrayCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8Uint8ArrayCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8Uint8ClampedArrayCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8WorkerContextCustom.cpp: (WebCore::toV8): 2012-04-20 Kentaro Hara Unreviewed, rolling out r114440. http://trac.webkit.org/changeset/114440 https://bugs.webkit.org/show_bug.cgi?id=84173 Chromium crash * bindings/scripts/CodeGeneratorV8.pm: (GenerateHeader): * bindings/v8/custom/V8NodeCustom.cpp: (WebCore::toV8Slow): 2012-04-20 Kentaro Hara Unreviewed, rolling out r114519. http://trac.webkit.org/changeset/114519 https://bugs.webkit.org/show_bug.cgi?id=84202 Chromium crash * bindings/scripts/CodeGeneratorV8.pm: (GenerateHeader): * bindings/scripts/test/V8/V8Float64Array.h: (V8Float64Array): (WebCore::V8Float64Array::wrap): (WebCore): * bindings/scripts/test/V8/V8TestActiveDOMObject.h: (V8TestActiveDOMObject): (WebCore::V8TestActiveDOMObject::wrap): (WebCore::toV8): * bindings/scripts/test/V8/V8TestCustomNamedGetter.h: (V8TestCustomNamedGetter): (WebCore::V8TestCustomNamedGetter::wrap): (WebCore::toV8): * bindings/scripts/test/V8/V8TestEventConstructor.h: (V8TestEventConstructor): (WebCore::V8TestEventConstructor::wrap): (WebCore::toV8): * bindings/scripts/test/V8/V8TestEventTarget.h: (V8TestEventTarget): (WebCore::V8TestEventTarget::wrap): (WebCore::toV8): * bindings/scripts/test/V8/V8TestInterface.h: (V8TestInterface): (WebCore::V8TestInterface::wrap): (WebCore::toV8): * bindings/scripts/test/V8/V8TestMediaQueryListListener.h: (V8TestMediaQueryListListener): (WebCore::V8TestMediaQueryListListener::wrap): (WebCore::toV8): * bindings/scripts/test/V8/V8TestNamedConstructor.h: (V8TestNamedConstructor): (WebCore::V8TestNamedConstructor::wrap): (WebCore::toV8): * bindings/scripts/test/V8/V8TestNode.h: (V8TestNode): (WebCore::V8TestNode::wrap): (WebCore::toV8): * bindings/scripts/test/V8/V8TestObj.h: (V8TestObj): (WebCore::V8TestObj::wrap): (WebCore::toV8): * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.h: (V8TestSerializedScriptValueInterface): (WebCore::V8TestSerializedScriptValueInterface::wrap): (WebCore::toV8): * bindings/v8/custom/V8DocumentCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8HTMLDocumentCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8NodeCustom.cpp: (WebCore::toV8Slow): * bindings/v8/custom/V8SVGDocumentCustom.cpp: (WebCore::toV8): * dom/make_names.pl: (printWrapperFactoryCppFile): 2012-04-19 Pavel Feldman Web Inspector: replace @type annotation with @return annotation for getters https://bugs.webkit.org/show_bug.cgi?id=84362 Reviewed by Yury Semikhatsky. Otherwise, compiler does not check for errors. * inspector/front-end/AdvancedSearchController.js: (WebInspector.SearchView.prototype.get searchConfig): * inspector/front-end/BreakpointManager.js: * inspector/front-end/NetworkRequest.js: (WebInspector.NetworkRequest.prototype.requestContent): * inspector/front-end/ResourceTreeModel.js: (WebInspector.ResourceTreeFrame): (WebInspector.ResourceTreeFrame.prototype._navigate): * inspector/front-end/ScriptsNavigator.js: * inspector/front-end/Settings.js: * inspector/front-end/SnippetsModel.js: * inspector/front-end/SplitView.js: * inspector/front-end/TabbedEditorContainer.js: * inspector/front-end/TabbedPane.js: (WebInspector.TabbedPaneTab): * inspector/front-end/TextEditorModel.js: * inspector/front-end/TimelinePresentationModel.js: 2012-04-20 Mark Pilgrim [Chromium] Call cacheMetadata directly https://bugs.webkit.org/show_bug.cgi?id=84415 Reviewed by Kentaro Hara. Part of a refactoring series. See tracking bug 82948. * platform/chromium/PlatformSupport.h: (PlatformSupport): * platform/network/chromium/ResourceHandle.cpp: (WebCore::ResourceHandle::cacheMetadata): 2012-04-20 Mark Pilgrim [Chromium] Call stopSharedTimer directly https://bugs.webkit.org/show_bug.cgi?id=84418 Reviewed by Kentaro Hara. Part of a refactoring series. See tracking bug 82948. * platform/chromium/PlatformSupport.h: (PlatformSupport): * platform/chromium/SharedTimerChromium.cpp: (WebCore::stopSharedTimer): 2012-04-20 Taiju Tsuiki DOMFileSystem::scheduleCallback() crashes on file() call after reload. https://bugs.webkit.org/show_bug.cgi?id=76461 DOMFileSystem::scheduleCallback() is unavailable when the page in unloading, so we should avoid using it in callback. Reviewed by David Levin. Test: fast/filesystem/file-after-reload-crash.html * Modules/filesystem/DOMFileSystem.cpp: (WebCore): 2012-04-19 Sudarsana Nagineni [EFL] Missing keycode translation for space key https://bugs.webkit.org/show_bug.cgi?id=84153 Reviewed by Antonio Gomes. Map space key to Unicode value in createKeyMap(), and also set correct keyname 'space' for space key in createWindowsKeyMap(). Tests: fast/html/details-keyboard-show-hide.html fast/forms/button-spacebar-click.html * platform/efl/EflKeyboardUtilities.cpp: (WebCore::createKeyMap): 2012-04-19 Antaryami Pandia Inserting empty html moves caret. https://bugs.webkit.org/show_bug.cgi?id=71771 Reviewed by Ryosuke Niwa. When we place the cursor in the middle of a text node and try to insert some text between, then we split text node. But in this case we have nothing to insert since the string to be inserted is empty. So the check for fragments should precedes the call to code block containing splitTextNode. Test: editing/inserting/insert-empty-html.html * editing/ReplaceSelectionCommand.cpp: (WebCore::ReplaceSelectionCommand::doApply): 2012-04-19 Tay Grigg [BlackBerry] Update HTTP connection per host limit in ResourceRequestBlackBerry https://bugs.webkit.org/show_bug.cgi?id=84380 Reviewed by George Staikos. Reviewed Internally by: George Rizkalla, Lyon Chen Set the limit on the http connection count per host to the default of 10000, queue the requests in the networking layer instead, this should increase parallelism at the WebKit layer to remove any potential bottlenecks. * platform/network/blackberry/ResourceRequestBlackBerry.cpp: (WebCore::initializeMaximumHTTPConnectionCountPerHost): 2012-04-19 Sheriff Bot Unreviewed, rolling out r114711. http://trac.webkit.org/changeset/114711 https://bugs.webkit.org/show_bug.cgi?id=84412 Many tests crash in RenderObject::container() (Requested by dimich on #webkit). * page/scrolling/ScrollingCoordinator.cpp: (WebCore::computeNonFastScrollableRegion): (WebCore::ScrollingCoordinator::frameViewLayoutUpdated): (WebCore::ScrollingCoordinator::frameViewScrollableAreasDidChange): 2012-04-19 Anders Carlsson computeNonFastScrollableRegion needs to traverse the entire frame tree https://bugs.webkit.org/show_bug.cgi?id=84409 Reviewed by Dan Bernstein. Now that scrollable areas won't be in the set of scrollable areas unless they are actually scrollable, we need to look for scrollable areas in the entire frame tree since there can be a scrollable frame that's a subframe of a non-scrollable frame for example. * page/scrolling/ScrollingCoordinator.cpp: (WebCore::computeNonFastScrollableRegion): Traverse the entire frame tree looking for scrollable areas. Also, remove the scrollability checks because scrollable areas will only be in the set if they have scrollbars that are enabled. (WebCore::ScrollingCoordinator::frameViewLayoutUpdated): (WebCore::ScrollingCoordinator::frameViewScrollableAreasDidChange): computeNonFastScrollableRegion now takes the main frame. 2012-04-19 Anders Carlsson Focus ring on wikipedia gets blobs when you type https://bugs.webkit.org/show_bug.cgi?id=84407 Reviewed by Dan Bernstein. Make it possible to override the focus ring visible rect from layer drawing code. * platform/graphics/mac/WebLayer.mm: (drawLayerContents): Call ThemeMac::setFocusRingClipRect to set the focus ring clip rect while drawing. * platform/mac/ThemeMac.h: * platform/mac/ThemeMac.mm: (-[WebCoreFlippedView _focusRingVisibleRect]): If there's an active focus ring visible rect, use it. Otherwise, fall back to the previous behavior and just return the view's visible rect. (WebCore::ThemeMac::setFocusRingClipRect): Update the focus clip rect. 2012-04-19 Sheriff Bot Unreviewed, rolling out r114690. http://trac.webkit.org/changeset/114690 https://bugs.webkit.org/show_bug.cgi?id=84408 Broke GlueSerializeTest.BackwardsCompatibleTest in Chromium test_shell_tests (Requested by dimich on #webkit). * history/HistoryItem.cpp: (WebCore::HistoryItem::HistoryItem): * loader/HistoryController.cpp: (WebCore::HistoryController::restoreScrollPositionAndViewState): 2012-04-19 Andreas Kling ElementAttributeData should be fast-malloc'd. Reviewed by Antti Koivisto. Sprinkle missing WTF_MAKE_FAST_ALLOCATED. * dom/ElementAttributeData.h: (ElementAttributeData): 2012-04-19 David Barr REGRESSION(r112177): Numbered list item rendered bulleted https://bugs.webkit.org/show_bug.cgi?id=84216 Reviewed by Ryosuke Niwa. Shorthands that imply omitted values cannot be derived from an incomplete set of longhand rules. No new tests; updated existing tests that should have caught this. * css/CSSParser.cpp: (WebCore::CSSParser::parseTransformOriginShorthand): Set implicit initial for Z when omitted. * css/StylePropertySet.cpp: (WebCore::StylePropertySet::getShorthandValue): 2012-04-19 Peter Beverloo [Chromium] Don't compile FontCacheSkia for Android https://bugs.webkit.org/show_bug.cgi?id=84392 Reviewed by Kent Tamura. Chromium for the Android platform uses its own FontCacheAndroid implementation. Compile errors show up when trying to build the content shell. * WebCore.gyp/WebCore.gyp: 2012-04-19 Martin Robinson [Cairo] Remove rgb24-hacks.txt and scale-removal.txt https://bugs.webkit.org/show_bug.cgi?id=83475 Reviewed by Daniel Bates. No new tests. This does not change functionality. Remove some obsolete patch files for Cairo that were used in some very old versions of Safari for Windows. * platform/graphics/cairo/rgb24-hacks.txt: Removed. * platform/graphics/cairo/scale-removal.txt: Removed. 2012-04-19 Peter Beverloo Use sqrtf instead of sqrt in CanvasRenderingContext2D.cpp https://bugs.webkit.org/show_bug.cgi?id=84403 Reviewed by Andreas Kling. r114679 broke Chromium Win and Android bots due to call ambiguity between a double and float argument. * html/canvas/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::inflateStrokeRect): 2012-04-19 Alexandre Elias Default to null value for HistoryItem::m_pageScaleFactor https://bugs.webkit.org/show_bug.cgi?id=84385 Reviewed by Nate Chapin. Previously, HistoryItem::m_pageScaleFactor defaulted to a value of 1, making it impossible to determine whether this value was never set, or intentionally set to 1. This patch introduces a default value of 0 and makes restoreScrollPositionAndViewState not touch the page scale factor if this value is still present at time of reload. This is a no-op change for common navigation scenarios. The motivation for this change is the corner case of syncing history items from a desktop browser to a mobile device. In that case, we need a way to specify that the history item does not contain a pageScaleFactor so that the mobile device does not display the page overly zoomed in. No new tests. * history/HistoryItem.cpp: (WebCore::HistoryItem::HistoryItem): * loader/HistoryController.cpp: (WebCore::HistoryController::restoreScrollPositionAndViewState): 2012-04-19 Alexis Menard Unreviewed Qt build warning fix. The file editing/StringHelper.h does not exist. * Target.pri: 2012-04-19 Daniel Bates Remove empty directory Source/WebCore/webaudio Changeset 111474 moved all the files in Source/WebCore/webaudio to Source/WebCore/Modules/webaudio. We should remove the empty directory Source/WebCore/webaudio. * webaudio: Removed. 2012-04-19 Pratik Solanki Incorrect inter-caps in “ShouldSkipMetaData” etc. https://bugs.webkit.org/show_bug.cgi?id=72159 Reviewed by Dan Bernstein. No new tests since no change in functionality. * platform/graphics/ImageSource.h: * platform/graphics/cg/ImageSourceCG.cpp: (WebCore::imageSourceOptions): (WebCore::ImageSource::isSizeAvailable): (WebCore::ImageSource::frameSizeAtIndex): (WebCore::ImageSource::orientationAtIndex): (WebCore::ImageSource::getHotSpot): (WebCore::ImageSource::repetitionCount): (WebCore::ImageSource::createFrameAtIndex): (WebCore::ImageSource::frameDurationAtIndex): 2012-04-19 Huang Dongsung Canvas more precisely makes the bounding rect for stroke rendering. https://bugs.webkit.org/show_bug.cgi?id=75792 Reviewed by Simon Fraser. * html/canvas/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::stroke): (WebCore::CanvasRenderingContext2D::drawTextInternal): (WebCore::CanvasRenderingContext2D::inflateStrokeRect): (WebCore): * html/canvas/CanvasRenderingContext2D.h: (CanvasRenderingContext2D): 2012-04-19 Luke Macpherson Eliminate potential null pointer dereference in CSSStyleSelector::containsUncommonAttributeSelector(). https://bugs.webkit.org/show_bug.cgi?id=84366 Reviewed by Kentaro Hara. No new tests / code cleanup only. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::collectMatchingRulesForList): 2012-04-19 Luke Macpherson Fix null-pointer dereference in ApplyPropertyZoom::applyValue(). https://bugs.webkit.org/show_bug.cgi?id=84279 Reviewed by Simon Fraser. Test: fast/css/zoom-on-unattached.html * css/CSSStyleApplyProperty.cpp: (WebCore::ApplyPropertyZoom::applyValue): 2012-04-19 Luke Macpherson Clean up list iteration in MediaQueryExp constructor (avoid unnecessary calls to current()). https://bugs.webkit.org/show_bug.cgi?id=84369 Reviewed by Simon Fraser. No new tests / code cleanup only. * css/MediaQueryExp.cpp: (WebCore::MediaQueryExp::MediaQueryExp): 2012-04-19 Mark Pilgrim [Chromium] Call signedPublicKeyAndChallengeString directly https://bugs.webkit.org/show_bug.cgi?id=84372 Reviewed by Kentaro Hara. Part of a refactoring series. See tracking bug 82948. * platform/chromium/PlatformSupport.h: (PlatformSupport): * platform/chromium/SSLKeyGeneratorChromium.cpp: (WebCore::signedPublicKeyAndChallengeString): 2012-04-19 Luke Macpherson Remove unnecessary assignment in CSSParser::parseCubicBezierTimingFunctionValue(). https://bugs.webkit.org/show_bug.cgi?id=84368 Reviewed by Simon Fraser. No new tests / code cleanup only. * css/CSSParser.cpp: (WebCore::CSSParser::parseCubicBezierTimingFunctionValue): 2012-04-19 Luke Macpherson Initialize all member variables in CSSImageSetValue's copy constructor. https://bugs.webkit.org/show_bug.cgi?id=84379 Reviewed by Simon Fraser. No new tests / code cleanup only. * css/CSSImageSetValue.cpp: (WebCore::CSSImageSetValue::CSSImageSetValue): 2012-04-19 Ken Buchanan Positioned children of ruby runs not handled correctly during layout https://bugs.webkit.org/show_bug.cgi?id=84157 Reviewed by Julien Chaffraix. A positioned ruby text causes a problem because it is excluded from normal layout by its parent and instead gets layout from RenderRubyRun::layoutSpecialExcludedChild; however this means it gets skipped over during the loop in RenderBlock::layoutBlockChildren, which is where positioned RenderBlocks get added to the appropriate positioned object lists. As a result, a dirty positioned ruby text will not get layout again unless the RenderRubyRun also needs layout which is not guaranteed. This patch disqualifies ruby text elements from being positioned. If it is necessary to support this in future, ruby text layout will have to be modified to ensure the renderers are added to the appropriate block lists. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::adjustRenderStyle): * rendering/RenderRubyRun.cpp: (WebCore::RenderRubyRun::rubyText): 2012-04-19 vsevik@chromium.org Web Inspector: No response body available for cached resource requests with error status codes. https://bugs.webkit.org/show_bug.cgi?id=84265 Reviewed by Pavel Feldman. InspectorResourceAgent now saves failed subresource request response body in its cache. Saved data is shown on front-end. Test: http/tests/inspector/network/network-image-404.html * inspector/InspectorResourceAgent.cpp: (WebCore::isErrorStatusCode): (WebCore): (WebCore::InspectorResourceAgent::didReceiveData): * inspector/NetworkResourcesData.cpp: (WebCore::NetworkResourcesData::ResourceData::removeContent): (WebCore::NetworkResourcesData::ResourceData::purgeContent): (WebCore): (WebCore::NetworkResourcesData::responseReceived): (WebCore::NetworkResourcesData::setResourceContent): * inspector/NetworkResourcesData.h: (ResourceData): (WebCore::NetworkResourcesData::ResourceData::httpStatusCode): (WebCore::NetworkResourcesData::ResourceData::setHTTPStatusCode): * inspector/front-end/RequestView.js: (WebInspector.RequestView.hasTextContent): 2012-04-19 Yury Semikhatsky Web Inspector / Heap snapshots: "Object's retaining tree" view doesn't get cleared when navigating between objects https://bugs.webkit.org/show_bug.cgi?id=84337 When DataGrid root node is reset, make sure all existing rows are removed. Reviewed by Vsevolod Vlasov. * inspector/front-end/DataGrid.js: (WebInspector.DataGrid.prototype.setRootNode): 2012-04-19 Beth Dakin https://bugs.webkit.org/show_bug.cgi?id=80536 REGRESSION: When Safari is not frontmost, pages should not get mouse moves or hover Reviewed by Adele Peterson. This patch just adds some code back that was removed by http://trac.webkit.org/changeset/102632 This particular code was unrelated to that bug and should not have been removed. * page/EventHandler.cpp: (WebCore::EventHandler::handleMouseMoveEvent): 2012-04-19 Xianzhu Wang DevTools highlights elements in frames at un-scaled positions https://bugs.webkit.org/show_bug.cgi?id=84181 On mobile platforms (e.g. chromium-android), normally pages are scaled, thus the coordinations of highlight rect inside of a frame needs to consider not only the offset, but also the scale. The change uses FrameView::contentsToRootView() to map the coordinates of a node in a frame to the coordinates in the main frame, instead of calculating by only the offset. Reviewed by Pavel Feldman. Test: inspector/elements/highlight-node-scaled.html * inspector/DOMNodeHighlighter.cpp: 2012-04-19 Yury Semikhatsky Web Inspector / Heap snapshots: "Objects allocated ..." views are empty https://bugs.webkit.org/show_bug.cgi?id=84347 Pass parsed maxJSObjectId value to the profile header constructor. Reviewed by Pavel Feldman. * inspector/front-end/ProfilesPanel.js: (WebInspector.ProfileHeader): (WebInspector.ProfilesPanel.prototype.setRecordingProfile): (WebInspector.ProfilesPanel.prototype.takeHeapSnapshot): (WebInspector.ProfilerDispatcher.prototype.addProfileHeader): 2012-04-19 Brady Eidson and https://bugs.webkit.org/show_bug.cgi?id=84360 StorageThread should have an autorelease pool in place for Cocoa clients Reviewed by Eric Carlson. No new tests. (Not practical to test this with current tools) * storage/StorageThread.cpp: (WebCore::StorageThread::threadEntryPoint): Include an AutodrainedPool and cycle it after each message. 2012-04-19 Luke Macpherson Fix potential null pointer dereference in RuleSet::addRulesFromSheet(). https://bugs.webkit.org/show_bug.cgi?id=84258 Reviewed by Andreas Kling. Fix variable that is dereferenced without null check here, but checked in code above and below. No new test / code cleanup from coverity analysis. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::collectMatchingRulesForList): 2012-04-19 Yury Semikhatsky Web Inspector: exception when hovering object while paused https://bugs.webkit.org/show_bug.cgi?id=84358 Added missing boolean parameter to the call site of evaluate method on call frame. Reviewed by Vsevolod Vlasov. * inspector/front-end/AdvancedSearchController.js: * inspector/front-end/DebuggerPresentationModel.js: annotated slectedCallFrame method so that closure compiler catches errors like in the bug report. (WebInspector.DebuggerPresentationModel.prototype.evaluateInSelectedCallFrame): * inspector/front-end/JavaScriptSourceFrame.js: (WebInspector.JavaScriptSourceFrame.prototype._resolveObjectForPopover): 2012-04-19 Yury Semikhatsky Web Inspector: nodes are not removed from the summary view when switching between allocation ranges https://bugs.webkit.org/show_bug.cgi?id=84354 Clear all top level nodes not only those visible in the viewport when populating the constructors view with new content. Reviewed by Pavel Feldman. * inspector/front-end/HeapSnapshotDataGrids.js: (WebInspector.HeapSnapshotSortableDataGrid.prototype.dispose): (WebInspector.HeapSnapshotSortableDataGrid.prototype.topLevelNodes): (WebInspector.HeapSnapshotSortableDataGrid.prototype.changeNameFilter): (WebInspector.HeapSnapshotViewportDataGrid.prototype.topLevelNodes): (WebInspector.HeapSnapshotViewportDataGrid.prototype.removeTopLevelNodes): (WebInspector.HeapSnapshotConstructorsDataGrid.prototype.populateChildren): (WebInspector.HeapSnapshotDiffDataGrid.prototype.setBaseDataSource): 2012-04-19 Sami Kyostila [chromium] Allow scrolling non-root layers in the compositor thread https://bugs.webkit.org/show_bug.cgi?id=73350 Reviewed by James Robinson. This patch enables scrolling child layers in the compositor thread. Scroll deltas are accumulated for each scrolled CCLayerImpl and synchronized to the main thread. If a layer has no room to scroll in a given direction, one of its ancestor layers is scrolled instead if possible. Added new webkit_unit_tests to verify scrolling behavior. * platform/graphics/chromium/ContentLayerChromium.cpp: (WebCore::ContentLayerChromium::scrollBy): (WebCore): * platform/graphics/chromium/ContentLayerChromium.h: (ContentLayerDelegate): (ContentLayerChromium): * platform/graphics/chromium/GraphicsLayerChromium.h: (WebCore::GraphicsLayerChromium::didScroll): * platform/graphics/chromium/LayerChromium.cpp: (WebCore::LayerChromium::setMaxScrollPosition): (WebCore): (WebCore::LayerChromium::pushPropertiesTo): * platform/graphics/chromium/LayerChromium.h: (LayerChromium): (WebCore::LayerChromium::maxScrollPosition): (WebCore::LayerChromium::scrollable): (WebCore::LayerChromium::scrollBy): * platform/graphics/chromium/cc/CCLayerImpl.cpp: (WebCore::CCLayerImpl::findLayerInSubtree): (WebCore): (WebCore::CCLayerImpl::tryScroll): * platform/graphics/chromium/cc/CCLayerImpl.h: (CCLayerImpl): * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::findLayerById): (WebCore): (WebCore::findFirstScrollableLayer): (WebCore::CCLayerTreeHost::applyScrollAndScale): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::CCLayerTreeHostImpl): (WebCore::CCLayerTreeHostImpl::startPageScaleAnimation): (WebCore::CCLayerTreeHostImpl::contentSize): (WebCore): (WebCore::CCLayerTreeHostImpl::calculateVisibleLayers): (WebCore::CCLayerTreeHostImpl::prepareToDraw): (WebCore::findRootScrollLayer): (WebCore::findScrollLayerForContentLayer): (WebCore::CCLayerTreeHostImpl::setRootLayer): (WebCore::adjustScrollsForPageScaleChange): (WebCore::applyPageScaleDeltaToScrollLayers): (WebCore::CCLayerTreeHostImpl::setPageScaleFactorAndLimits): (WebCore::CCLayerTreeHostImpl::setPageScaleDelta): (WebCore::CCLayerTreeHostImpl::updateMaxScrollPosition): (WebCore::CCLayerTreeHostImpl::scrollBegin): (WebCore::CCLayerTreeHostImpl::scrollBy): (WebCore::CCLayerTreeHostImpl::scrollEnd): (WebCore::CCLayerTreeHostImpl::pinchGestureUpdate): (WebCore::CCLayerTreeHostImpl::computePinchZoomDeltas): (WebCore::CCLayerTreeHostImpl::makeScrollAndScaleSet): (WebCore::collectScrollDeltas): (WebCore::CCLayerTreeHostImpl::processScrollDeltas): (WebCore::CCLayerTreeHostImpl::animatePageScale): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: (WebCore::CCLayerTreeHostImpl::rootScrollLayer): (CCLayerTreeHostImpl): (LayerGeometry): 2012-04-19 Yury Semikhatsky Web Inspector: make constructors and diff heap snapshot data grids use viewport https://bugs.webkit.org/show_bug.cgi?id=84348 HeapSnapshotViewportDataGrid is introduced which allows to add to the tbody only visible rows. HeapSnapshotConstructorsDataGrid and HeapSnapshotDiffDataGrid are inherited from this class which makes them operate well on large amounts of nodes. Reviewed by Pavel Feldman. * inspector/front-end/DataGrid.js: (WebInspector.DataGridNode.prototype.nodeHeight): (WebInspector.DataGridNode.prototype._attach): * inspector/front-end/HeapSnapshotDataGrids.js: (WebInspector.HeapSnapshotSortableDataGrid): (WebInspector.HeapSnapshotSortableDataGrid.prototype.nodesForNameFilter): (WebInspector.HeapSnapshotSortableDataGrid.prototype.changeNameFilter): (WebInspector.HeapSnapshotSortableDataGrid.prototype._performSorting): (WebInspector.HeapSnapshotSortableDataGrid.prototype.appendChildAfterSorting): (WebInspector.HeapSnapshotSortableDataGrid.prototype.updateVisibleNodes): (WebInspector.HeapSnapshotSortableDataGrid.prototype.recursiveSortingEnter): (WebInspector.HeapSnapshotSortableDataGrid.prototype.recursiveSortingLeave): (WebInspector.HeapSnapshotViewportDataGrid): (WebInspector.HeapSnapshotViewportDataGrid.prototype.nodesForNameFilter): (WebInspector.HeapSnapshotViewportDataGrid.prototype.appendChildAfterSorting): (WebInspector.HeapSnapshotViewportDataGrid.prototype.updateVisibleNodes): (WebInspector.HeapSnapshotViewportDataGrid.prototype.appendTopLevelNode): (WebInspector.HeapSnapshotViewportDataGrid.prototype._addPaddingRows): (WebInspector.HeapSnapshotViewportDataGrid.prototype._removePaddingRows): (WebInspector.HeapSnapshotViewportDataGrid.prototype.onResize): (WebInspector.HeapSnapshotViewportDataGrid.prototype._onScroll): (WebInspector.HeapSnapshotPaddingNode): (WebInspector.HeapSnapshotPaddingNode.prototype.setHeight): (WebInspector.HeapSnapshotPaddingNode.prototype.removeFromTable): (WebInspector.HeapSnapshotConstructorsDataGrid): (WebInspector.HeapSnapshotConstructorsDataGrid.prototype.populateChildren): (WebInspector.HeapSnapshotDiffDataGrid): (WebInspector.HeapSnapshotDiffDataGrid.prototype.populateChildren.baseAggregatesReceived.aggregatesReceived.addNodeIfNonZeroDiff): (WebInspector.HeapSnapshotDiffDataGrid.prototype.populateChildren.baseAggregatesReceived.aggregatesReceived): (WebInspector.HeapSnapshotDiffDataGrid.prototype.populateChildren): * inspector/front-end/HeapSnapshotGridNodes.js: (WebInspector.HeapSnapshotGridNode): (WebInspector.HeapSnapshotGridNode.prototype.collapse): (WebInspector.HeapSnapshotGridNode.prototype.sort.afterSort.afterPopulate): (WebInspector.HeapSnapshotGridNode.prototype.sort.afterSort): (WebInspector.HeapSnapshotGridNode.prototype.sort): (WebInspector.HeapSnapshotObjectNode.prototype._createChildNode): (WebInspector.HeapSnapshotObjectNode.prototype.comparator): (WebInspector.HeapSnapshotInstanceNode.prototype._createChildNode): (WebInspector.HeapSnapshotInstanceNode.prototype.comparator): (WebInspector.HeapSnapshotConstructorNode): (WebInspector.HeapSnapshotConstructorNode.prototype._createChildNode): (WebInspector.HeapSnapshotConstructorNode.prototype.comparator): (WebInspector.HeapSnapshotDiffNode): (WebInspector.HeapSnapshotDiffNode.prototype._createChildNode): (WebInspector.HeapSnapshotDiffNode.prototype.comparator): (WebInspector.HeapSnapshotDominatorObjectNode.prototype._createChildNode): (WebInspector.HeapSnapshotDominatorObjectNode.prototype.comparator): * inspector/front-end/ShowMoreDataGridNode.js: (WebInspector.ShowMoreDataGridNode.prototype.createCells): (WebInspector.ShowMoreDataGridNode.prototype.nodeHeight): 2012-04-19 Kentaro Hara Unreviewed, rolling out r114421. http://trac.webkit.org/changeset/114421 https://bugs.webkit.org/show_bug.cgi?id=84103 Chromium crash * bindings/scripts/CodeGeneratorV8.pm: (GenerateNormalAttrGetter): (GenerateFunctionCallString): (NativeToJSValue): * bindings/scripts/test/V8/V8TestEventConstructor.cpp: (WebCore::TestEventConstructorV8Internal::attr1AttrGetter): (WebCore::TestEventConstructorV8Internal::attr2AttrGetter): * bindings/scripts/test/V8/V8TestInterface.cpp: (WebCore::TestInterfaceV8Internal::supplementalStr1AttrGetter): (WebCore::TestInterfaceV8Internal::supplementalStr2AttrGetter): * bindings/scripts/test/V8/V8TestObj.cpp: (WebCore::TestObjV8Internal::readOnlyStringAttrAttrGetter): (WebCore::TestObjV8Internal::stringAttrAttrGetter): (WebCore::TestObjV8Internal::reflectedStringAttrAttrGetter): (WebCore::TestObjV8Internal::reflectedURLAttrAttrGetter): (WebCore::TestObjV8Internal::reflectedCustomURLAttrAttrGetter): (WebCore::TestObjV8Internal::stringAttrWithGetterExceptionAttrGetter): (WebCore::TestObjV8Internal::stringAttrWithSetterExceptionAttrGetter): (WebCore::TestObjV8Internal::hashAttrGetter): (WebCore::TestObjV8Internal::conditionalMethod1Callback): * bindings/v8/V8Binding.cpp: (WebCore::getElementStringAttr): * bindings/v8/V8Binding.h: (WebCore::v8ExternalString): (WebCore::v8String): (WebCore::v8StringOrNull): (WebCore::v8StringOrUndefined): (WebCore::v8StringOrFalse): 2012-04-19 Sheriff Bot Unreviewed, rolling out r114626. http://trac.webkit.org/changeset/114626 https://bugs.webkit.org/show_bug.cgi?id=84349 caused new assertions in debug builds (Requested by smfr_ on #webkit). * inspector/InspectorResourceAgent.cpp: (WebCore::InspectorResourceAgent::didReceiveData): * inspector/NetworkResourcesData.cpp: (WebCore::NetworkResourcesData::responseReceived): * inspector/NetworkResourcesData.h: (ResourceData): (NetworkResourcesData): * inspector/front-end/RequestView.js: (WebInspector.RequestView.hasTextContent): 2012-04-19 Mark Pilgrim [Chromium] Call mimeRegistry directly https://bugs.webkit.org/show_bug.cgi?id=84334 Reviewed by Kentaro Hara. Part of a refactoring series. See tracking bug 82948. * platform/chromium/MIMETypeRegistryChromium.cpp: (WebCore::MIMETypeRegistry::getMIMETypeForExtension): (WebCore::MIMETypeRegistry::getWellKnownMIMETypeForExtension): (WebCore::MIMETypeRegistry::getPreferredExtensionForMIMEType): (WebCore::MIMETypeRegistry::isSupportedImageMIMEType): (WebCore::MIMETypeRegistry::isSupportedJavaScriptMIMEType): (WebCore::MIMETypeRegistry::isSupportedNonImageMIMEType): * platform/chromium/PlatformSupport.h: (PlatformSupport): 2012-04-19 Victor Carbune Display a TextTrackCue when snap-to-lines flag is not set https://bugs.webkit.org/show_bug.cgi?id=79750 Reviewed by Eric Carlson. Support for positioning of a cue on top of the video element when snap-to-lines is not set. Test: media/track/track-cue-rendering-snap-to-lines-not-set.html * css/mediaControls.css: (video::-webkit-media-text-track-container): Marked the container as flexible box in order to use all the available space on top of the controls. (video::-webkit-media-text-track-background): Added background default settings. (video::-webkit-media-text-track-display): Added default position. * html/shadow/MediaControlElements.cpp: (WebCore::MediaControlTextTrackContainerElement::updateDisplay): Updated comments. * html/track/TextTrackCue.cpp: (WebCore): (WebCore::TextTrackCue::TextTrackCue): Updated constructor to calculate the computed line position. (WebCore::TextTrackCue::setLine): Updated call to calculate the computed line position. (WebCore::TextTrackCue::setPosition): (WebCore::TextTrackCue::calculateComputedLinePosition): Partial calculation of the computated line position. (WebCore::TextTrackCue::calculateDisplayParameters): Updated display parameter computations required by the spec. (WebCore::TextTrackCue::getDisplayTree): Updated positioning attributes when snap-to-lines is not set. Added extra anonymous box for background, because setting position:absolute on the display tree determines the background to cover the whole block, not just inline. (WebCore::TextTrackCue::getPositionCoordinates): Determine coordinates as required by the spec. * html/track/TextTrackCue.h: (TextTrackCue): 2012-04-19 Pavel Feldman Web Inspector: introduce styles panel as an experiment https://bugs.webkit.org/show_bug.cgi?id=84331 Reviewed by Vsevolod Vlasov. This change introduces new "Styles" panel that looks like the "Scripts" one, but operates stylesheets. This is happening under the experimental flag. * English.lproj/localizedStrings.js: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * inspector/compile-front-end.py: * inspector/front-end/Panel.js: (WebInspector.Panel.prototype.showAnchorLocation): * inspector/front-end/ResourceView.js: (WebInspector.EditableResourceSourceFrame.prototype.didEditContent): * inspector/front-end/ScriptsNavigator.js: (WebInspector.ScriptsNavigatorController.prototype._navigatorOverlayWasShown): * inspector/front-end/ScriptsPanel.js: * inspector/front-end/Settings.js: (WebInspector.ExperimentsSettings): * inspector/front-end/SourceFrame.js: (WebInspector.SourceFrame.prototype._clearLineHighlight): * inspector/front-end/StylesPanel.js: Added. (WebInspector.StylesPanel): (WebInspector.StylesPanel.prototype.wasShown): (WebInspector.StylesPanel.prototype._initialize): (WebInspector.StylesPanel.prototype._populateResourceTree.populateFrame): (WebInspector.StylesPanel.prototype._populateResourceTree): (WebInspector.StylesPanel.prototype._resourceAdded): (WebInspector.StylesPanel.prototype._reset): (WebInspector.StylesPanel.prototype._cachedResourcesLoaded): (WebInspector.StylesPanel.prototype.get toolbarItemLabel): (WebInspector.StylesPanel.prototype.viewForFile.get if): (WebInspector.StylesPanel.prototype.viewForFile): (WebInspector.StylesPanel.prototype._textEdited): (WebInspector.StylesPanel.prototype._scriptSelected): (WebInspector.StylesPanel.prototype._showFile): (WebInspector.StylesPanel.prototype.canShowAnchorLocation): * inspector/front-end/StylesSidebarPane.js: (WebInspector.StylePropertiesSection): (WebInspector.StylePropertiesSection.prototype._createRuleOriginNode): * inspector/front-end/TabbedEditorContainer.js: (WebInspector.TabbedEditorContainer): * inspector/front-end/WebKit.qrc: * inspector/front-end/inspector.html: * inspector/front-end/inspector.js: (WebInspector._createPanels): (WebInspector._showAnchorLocationInPanel): * inspector/front-end/scriptsPanel.css: * inspector/front-end/splitView.css: (.sidebar-overlay): 2012-04-19 Vsevolod Vlasov Follow up to r114632: build fix. * inspector/InspectorDebuggerAgent.cpp: (WebCore): (WebCore::InspectorDebuggerAgent::evaluateOnCallFrame): 2012-04-19 Mark Pilgrim [Chromium] Call sampleGamepads directly https://bugs.webkit.org/show_bug.cgi?id=84339 Reviewed by Kentaro Hara. Part of a refactoring series. See tracking bug 82948. * platform/chromium/GamepadsChromium.cpp: (WebCore::sampleGamepads): * platform/chromium/PlatformSupport.h: (WebCore): (PlatformSupport): 2012-04-19 Vsevolod Vlasov Web Inspector: x-frame security errors logged when typing in the console are annoying. https://bugs.webkit.org/show_bug.cgi?id=81970 Reviewed by Pavel Feldman. Parameter DoNotPauseOnExceptions in Runtime.evaluate() renamed to DoNotPauseOnExceptionsAndMuteConsole. Added this parameter to Runtime.callFunctionOn() and passed true in all call sites. Added this parameter to Debugger.evaluateOnCallFrame(). Added a flag to console that mutes all messages unless they have ConsoleAPI message source. This flag is now temporarily set from InspectorRuntimeAgent and InspectorDebuggerAgent for certain injected source calls. * inspector/Inspector.json: * inspector/InspectorDebuggerAgent.cpp: (WebCore::asBool): (WebCore): (WebCore::InspectorDebuggerAgent::evaluateOnCallFrame): * inspector/InspectorDebuggerAgent.h: (InspectorDebuggerAgent): * inspector/InspectorRuntimeAgent.cpp: (WebCore): (WebCore::setPauseOnExceptionsState): (WebCore::InspectorRuntimeAgent::evaluate): (WebCore::InspectorRuntimeAgent::callFunctionOn): (WebCore::InspectorRuntimeAgent::getProperties): * inspector/InspectorRuntimeAgent.h: (InspectorRuntimeAgent): * inspector/PageDebuggerAgent.cpp: (WebCore::PageDebuggerAgent::muteConsole): (WebCore): (WebCore::PageDebuggerAgent::unmuteConsole): * inspector/PageDebuggerAgent.h: (PageDebuggerAgent): * inspector/PageRuntimeAgent.cpp: (WebCore::PageRuntimeAgent::muteConsole): (WebCore): (WebCore::PageRuntimeAgent::unmuteConsole): * inspector/PageRuntimeAgent.h: (PageRuntimeAgent): * inspector/WorkerDebuggerAgent.cpp: (WebCore::WorkerDebuggerAgent::muteConsole): (WebCore): (WebCore::WorkerDebuggerAgent::unmuteConsole): * inspector/WorkerDebuggerAgent.h: (WorkerDebuggerAgent): * inspector/WorkerRuntimeAgent.cpp: (WebCore::WorkerRuntimeAgent::muteConsole): (WebCore): (WebCore::WorkerRuntimeAgent::unmuteConsole): * inspector/WorkerRuntimeAgent.h: (WorkerRuntimeAgent): * inspector/front-end/ConsoleView.js: (WebInspector.ConsoleView.prototype.evalInInspectedWindow): * inspector/front-end/DebuggerPresentationModel.js: (WebInspector.DebuggerPresentationModel.prototype.evaluateInSelectedCallFrame): (WebInspector.PresentationCallFrame.prototype.evaluate): * inspector/front-end/RemoteObject.js: (WebInspector.RemoteObject.prototype.setPropertyValue): (WebInspector.RemoteObject.prototype.callFunction): (WebInspector.RemoteObject.prototype.callFunctionJSON): * inspector/front-end/WorkerManager.js: * page/Console.cpp: (WebCore::Console::addMessage): (WebCore::Console::warn): (WebCore): (WebCore::Console::mute): (WebCore::Console::unmute): * page/Console.h: (Console): 2012-04-19 Sheriff Bot Unreviewed, rolling out r114628. http://trac.webkit.org/changeset/114628 https://bugs.webkit.org/show_bug.cgi?id=84341 Breaks EFL and GTK builds (Requested by pfeldman on #webkit). * inspector/Inspector.json: * inspector/InspectorDebuggerAgent.cpp: (WebCore): (WebCore::InspectorDebuggerAgent::evaluateOnCallFrame): * inspector/InspectorDebuggerAgent.h: (InspectorDebuggerAgent): * inspector/InspectorRuntimeAgent.cpp: (WebCore::InspectorRuntimeAgent::evaluate): (WebCore::InspectorRuntimeAgent::callFunctionOn): (WebCore::InspectorRuntimeAgent::getProperties): * inspector/InspectorRuntimeAgent.h: (InspectorRuntimeAgent): * inspector/PageDebuggerAgent.cpp: * inspector/PageDebuggerAgent.h: (PageDebuggerAgent): * inspector/PageRuntimeAgent.cpp: * inspector/PageRuntimeAgent.h: (PageRuntimeAgent): * inspector/WorkerDebuggerAgent.cpp: * inspector/WorkerDebuggerAgent.h: (WorkerDebuggerAgent): * inspector/WorkerRuntimeAgent.cpp: * inspector/WorkerRuntimeAgent.h: (WorkerRuntimeAgent): * inspector/front-end/ConsoleView.js: (WebInspector.ConsoleView.prototype.evalInInspectedWindow): * inspector/front-end/DebuggerPresentationModel.js: (WebInspector.DebuggerPresentationModel.prototype.evaluateInSelectedCallFrame): (WebInspector.PresentationCallFrame.prototype.evaluate): * inspector/front-end/RemoteObject.js: (WebInspector.RemoteObject.prototype.setPropertyValue): (WebInspector.RemoteObject.prototype.callFunction): (WebInspector.RemoteObject.prototype.callFunctionJSON): * inspector/front-end/WorkerManager.js: * page/Console.cpp: (WebCore): (WebCore::Console::addMessage): (WebCore::Console::warn): * page/Console.h: (Console): 2012-04-19 Vsevolod Vlasov Web Inspector: x-frame security errors logged when typing in the console are annoying. https://bugs.webkit.org/show_bug.cgi?id=81970 Reviewed by Pavel Feldman. Parameter DoNotPauseOnExceptions in Runtime.evaluate() renamed to DoNotPauseOnExceptionsAndMuteConsole. Added this parameter to Runtime.callFunctionOn() and passed true in all call sites. Added this parameter to Debugger.evaluateOnCallFrame(). Added a flag to console that mutes all messages unless they have ConsoleAPI message source. This flag is now temporarily set from InspectorRuntimeAgent and InspectorDebuggerAgent for certain injected source calls. * inspector/Inspector.json: * inspector/InspectorDebuggerAgent.cpp: (WebCore::asBool): (WebCore): (WebCore::InspectorDebuggerAgent::evaluateOnCallFrame): * inspector/InspectorDebuggerAgent.h: (InspectorDebuggerAgent): * inspector/InspectorRuntimeAgent.cpp: (WebCore): (WebCore::setPauseOnExceptionsState): (WebCore::InspectorRuntimeAgent::evaluate): (WebCore::InspectorRuntimeAgent::callFunctionOn): (WebCore::InspectorRuntimeAgent::getProperties): * inspector/InspectorRuntimeAgent.h: (InspectorRuntimeAgent): * inspector/PageDebuggerAgent.cpp: (WebCore::PageDebuggerAgent::muteConsole): (WebCore): (WebCore::PageDebuggerAgent::unmuteConsole): * inspector/PageDebuggerAgent.h: (PageDebuggerAgent): * inspector/PageRuntimeAgent.cpp: (WebCore::PageRuntimeAgent::muteConsole): (WebCore): (WebCore::PageRuntimeAgent::unmuteConsole): * inspector/PageRuntimeAgent.h: (PageRuntimeAgent): * inspector/WorkerDebuggerAgent.cpp: (WebCore::WorkerDebuggerAgent::muteConsole): (WebCore): (WebCore::WorkerDebuggerAgent::unmuteConsole): * inspector/WorkerDebuggerAgent.h: (WorkerDebuggerAgent): * inspector/WorkerRuntimeAgent.cpp: (WebCore::WorkerRuntimeAgent::muteConsole): (WebCore): (WebCore::WorkerRuntimeAgent::unmuteConsole): * inspector/WorkerRuntimeAgent.h: (WorkerRuntimeAgent): * inspector/front-end/ConsoleView.js: (WebInspector.ConsoleView.prototype.evalInInspectedWindow): * inspector/front-end/DebuggerPresentationModel.js: (WebInspector.DebuggerPresentationModel.prototype.evaluateInSelectedCallFrame): (WebInspector.PresentationCallFrame.prototype.evaluate): * inspector/front-end/RemoteObject.js: (WebInspector.RemoteObject.prototype.setPropertyValue): (WebInspector.RemoteObject.prototype.callFunction): (WebInspector.RemoteObject.prototype.callFunctionJSON): * inspector/front-end/WorkerManager.js: * page/Console.cpp: (WebCore::Console::addMessage): (WebCore::Console::warn): (WebCore): (WebCore::Console::mute): (WebCore::Console::unmute): * page/Console.h: (Console): 2012-04-19 No'am Rosenthal [Qt] Fix Qt-Mac build after libxml patch https://bugs.webkit.org/show_bug.cgi?id=84313 Use direct include/library paths instead of PKGCONFIG when on Mac. Reviewed by Simon Hausmann. No new tests, build fix. * WebCore.pri: 2012-04-18 Vsevolod Vlasov Web Inspector: No response body available for cached resource requests with error status codes. https://bugs.webkit.org/show_bug.cgi?id=84265 Reviewed by Pavel Feldman. InspectorResourceAgent now saves failed subresource request response body in its cache. Saved data is shown on front-end. Test: http/tests/inspector/network/network-image-404.html * inspector/InspectorResourceAgent.cpp: (WebCore::InspectorResourceAgent::didReceiveData): * inspector/NetworkResourcesData.cpp: (WebCore::NetworkResourcesData::responseReceived): (WebCore::NetworkResourcesData::httpStatusCode): (WebCore): * inspector/NetworkResourcesData.h: (WebCore::NetworkResourcesData::ResourceData::httpStatusCode): (WebCore::NetworkResourcesData::ResourceData::setHTTPStatusCode): (ResourceData): (NetworkResourcesData): * inspector/front-end/RequestView.js: (WebInspector.RequestView.hasTextContent): 2012-04-19 Pavel Feldman Web Inspector: reuse ParsedUrl in the UISourceCode https://bugs.webkit.org/show_bug.cgi?id=84326 Reviewed by Yury Semikhatsky. Migrated UISourceCode to ParsedURL, moved the displayName logic into its only client: TabbedEditorContainer. * inspector/front-end/CompilerScriptMapping.js: (WebInspector.SourceMapParser.prototype._canonicalizeURL): * inspector/front-end/FilteredItemSelectionDialog.js: (WebInspector.OpenResourceDialog.filterOutEmptyURLs): (WebInspector.OpenResourceDialog.compareFunction): (WebInspector.OpenResourceDialog): (WebInspector.OpenResourceDialog.prototype.itemTitleAt): (WebInspector.OpenResourceDialog.prototype.itemKeyAt): * inspector/front-end/ResourceUtils.js: (WebInspector.ParsedURL): * inspector/front-end/ScriptsNavigator.js: (WebInspector.ScriptsNavigator.prototype._getOrCreateFolderTreeElement): (WebInspector.NavigatorFolderTreeElement): * inspector/front-end/TabbedEditorContainer.js: (WebInspector.TabbedEditorContainer.prototype._titleForFile): * inspector/front-end/UISourceCode.js: (WebInspector.UISourceCode): (WebInspector.UISourceCode.prototype.get parsedURL): 2012-04-19 Xingnan Wang Optimize for DARWIN in DirectConvolver::process() https://bugs.webkit.org/show_bug.cgi?id=80256 Reviewed by Chris Rogers. * platform/audio/DirectConvolver.cpp: (WebCore::DirectConvolver::process): 2012-04-18 Noel Gordon [CG] ImageBuffer::toDataURL: Remove alpha stuffing loop when encoding to JPEG https://bugs.webkit.org/show_bug.cgi?id=84319 Reviewed by Eric Seidel. No change in behavior. Covered by existing canvas 2d and 3d tests: canvas/philip/tests/toDataURL.jpeg.alpha.html fast/canvas/webgl/premultiplyalpha-test.html * platform/graphics/cg/ImageBufferCG.cpp: (WebCore::ImageBuffer::toDataURL): Remove the alpha stuffing loop and instead, make JPEG encoder ignore the alpha channel (kCGImageAlphaNoneSkipLast). 2012-04-18 Emil A Eklund Remove unnecessary rounding/conversions in RenderBoxModelObject https://bugs.webkit.org/show_bug.cgi?id=84288 Reviewed by Eric Seidel. No new tests, no change in functionality. * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::paintBoxShadow): Remove unnecessary pixelSnapping logic and casts in paintBoxShadow as shadow rects are now int based. 2012-04-18 Jason Liu [BlackBerry] Parsed Cookie's m_hasDefaultDomain is not needed. https://bugs.webkit.org/show_bug.cgi?id=82830 Reviewed by George Staikos. RFC 2965 3.2.2 Domain = value If an explicitly specified value does not start with a dot, the user agent supplies a leading dot. 3.3.1 Domain Defaults to the effective request-host. (Note that because there is no dot at the beginning of effective request-host, the default Domain can only domain-match itself.) The first char can show the difference even though it is from the cookie database. But m_hasDefaultDomain is set to false if the cookie is from database although the domain is host as a default value. So m_hasDefaultDomain sometimes is wrong. In sum, we shouldn't use m_hasDefaultDomain. Test: http/tests/security/cookies/cookies-wrong-domain-rejected.php * platform/blackberry/CookieManager.cpp: (WebCore::CookieManager::shouldRejectForSecurityReason): * platform/blackberry/CookieParser.cpp: (WebCore::CookieParser::parseOneCookie): * platform/blackberry/ParsedCookie.cpp: (WebCore::ParsedCookie::ParsedCookie): * platform/blackberry/ParsedCookie.h: (ParsedCookie): 2012-04-18 Adrienne Walker [chromium] Consolidate adjustTextRenderMode copypasta into Skia context https://bugs.webkit.org/show_bug.cgi?id=83840 Reviewed by James Robinson. The same logic to decide when to make text use LCD rendering is copy and pasted in all the different font classes. It seems like this should live in a single place. * platform/graphics/harfbuzz/FontHarfBuzz.cpp: (WebCore::Font::drawGlyphs): (WebCore::Font::drawComplexText): * platform/graphics/skia/FontSkia.cpp: (WebCore::Font::drawGlyphs): * platform/graphics/skia/PlatformContextSkia.cpp: (WebCore::PlatformContextSkia::adjustTextRenderMode): (WebCore): (WebCore::PlatformContextSkia::couldUseLCDRenderedText): * platform/graphics/skia/PlatformContextSkia.h: (PlatformContextSkia): * platform/graphics/skia/SkiaFontWin.cpp: (WebCore::setupPaintForFont): 2012-04-18 Hironori Bono Split SpellChecker::didCheck() to SpellChecker::didCheckSucceeded() and SpellChecker::didCheckCanceled() https://bugs.webkit.org/show_bug.cgi?id=83748 Reviewed by Ryosuke Niwa. The current SpellChecker::didCheck() does not delete existing markers. It causes a problem that it leaves misspelled markers when a spellchecker client finishes checking text successfully. This change splits this function to didCheckSucceeded() and didCheckCanceled() so the SpellChecker class can delete existing markers when its client finishes checking text successfully. (We do not have to erase existing markers when the client needs to cancel a text-check request.) Test: platform/chromium/editing/spelling/delete-misspelled-word.html * WebCore.exp.in: Replaced SpellChecker::didCheck with SpellChecker::didCheckSucceeded. * editing/SpellChecker.cpp: (WebCore::SpellChecker::didCheckSucceeded): Added. (WebCore): (WebCore::SpellChecker::didCheckCanceled): Added. * editing/SpellChecker.h: (SpellChecker): Added didCheckSucceeded and didCheckCanceled. Also changed didCheck to a private function. 2012-04-16 James Robinson [chromium] Convert WebPluginContainerImpl over to use WebExternalTextureLayer https://bugs.webkit.org/show_bug.cgi?id=84120 Reviewed by Adrienne Walker. This renames PluginLayerChromium -> TextureLayerChromium since it is now used only as the implementation of WebExternalTextureLayer and cleans it up slightly. * WebCore.gypi: * platform/graphics/chromium/TextureLayerChromium.cpp: Renamed from Source/WebCore/platform/graphics/chromium/PluginLayerChromium.cpp. (WebCore): (WebCore::TextureLayerChromium::create): (WebCore::TextureLayerChromium::TextureLayerChromium): (WebCore::TextureLayerChromium::createCCLayerImpl): (WebCore::TextureLayerChromium::drawsContent): (WebCore::TextureLayerChromium::setTextureId): (WebCore::TextureLayerChromium::setFlipped): (WebCore::TextureLayerChromium::setUVRect): (WebCore::TextureLayerChromium::setIOSurfaceProperties): (WebCore::TextureLayerChromium::pushPropertiesTo): * platform/graphics/chromium/TextureLayerChromium.h: Renamed from Source/WebCore/platform/graphics/chromium/PluginLayerChromium.h. (WebCore): (TextureLayerChromium): (WebCore::TextureLayerChromium::flipped): (WebCore::TextureLayerChromium::uvRect): 2012-04-18 Raymond Toy Expose attack, release as DynamicsCompressorNode's attributes. https://bugs.webkit.org/show_bug.cgi?id=81221 Reviewed by Chris Rogers. * Modules/webaudio/DynamicsCompressorNode.cpp: (WebCore::DynamicsCompressorNode::DynamicsCompressorNode): (WebCore::DynamicsCompressorNode::process): * Modules/webaudio/DynamicsCompressorNode.h: (WebCore::DynamicsCompressorNode::attack): (WebCore::DynamicsCompressorNode::releaseTime): (DynamicsCompressorNode): * Modules/webaudio/DynamicsCompressorNode.idl: Add attack and release attributes. * bindings/scripts/CodeGeneratorObjC.pm: (SkipAttribute): Skip release() (GenerateHeader): Call SkipAttribute for getters/setters. * platform/audio/DynamicsCompressor.h: (DynamicsCompressor): 2012-04-18 Dana Jansens [chromium] Simplify occlusion tracker API by passing layer iterator data https://bugs.webkit.org/show_bug.cgi?id=84088 Reviewed by Adrienne Walker. Previously three methods lived in the API and you needed to call the appropriate method (with different amounts of data) depending on what the current layer iterator was representing. This makes usage of the occlusion tracker simpler to read and harder to mess up, by just passing in the layer iterator at each step of the iteration process. Covered by existing tests. * platform/graphics/chromium/cc/CCLayerIterator.h: (WebCore): (CCLayerIteratorPosition): (CCLayerIterator): (WebCore::CCLayerIterator::operator const CCLayerIteratorPosition): * platform/graphics/chromium/cc/CCLayerTilingData.cpp: (WebCore::CCLayerTilingData::opaqueRegionInLayerRect): * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::paintLayerContents): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::calculateRenderPasses): * platform/graphics/chromium/cc/CCOcclusionTracker.cpp: (WebCore::::enterLayer): (WebCore): (WebCore::::leaveLayer): * platform/graphics/chromium/cc/CCOcclusionTracker.h: (CCOcclusionTrackerBase): 2012-04-18 James Robinson [chromium] Add canBeginFrame state to CCSchedulerStateMachine to suppress initialization before our surface is available https://bugs.webkit.org/show_bug.cgi?id=84301 Reviewed by Adrienne Walker. If our composited surface isn't ready yet, then the compositor may initialize in a state where the first makeContextCurrent() fails. This adds a new state to the scheduler that we can use to suppress initialization until we get notified that the surface is ready. I'll add the plumbing for actually notifying in a follow-up. Updated CCSchedulerTest / CCSchedulerStateMachineTest unit tests. * platform/graphics/chromium/cc/CCScheduler.cpp: (WebCore::CCScheduler::setCanBeginFrame): (WebCore): * platform/graphics/chromium/cc/CCScheduler.h: (CCScheduler): * platform/graphics/chromium/cc/CCSchedulerStateMachine.cpp: (WebCore::CCSchedulerStateMachine::CCSchedulerStateMachine): (WebCore::CCSchedulerStateMachine::nextAction): * platform/graphics/chromium/cc/CCSchedulerStateMachine.h: (WebCore::CCSchedulerStateMachine::setCanBeginFrame): (CCSchedulerStateMachine): * platform/graphics/chromium/cc/CCThreadProxy.cpp: (WebCore::CCThreadProxy::initializeImplOnImplThread): 2012-04-18 David Reveman [Chromium] Solid color layers should respect opacity value. https://bugs.webkit.org/show_bug.cgi?id=84197 Reviewed by Adrienne Walker. Fold opacity into shader color for solid color layers. Test: CCSolidColorLayerImplTest.verifyCorrectOpacityInQuad * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::drawSolidColorQuad): 2012-04-18 Mark Pilgrim [Chromium] Call prefetchDNS directly https://bugs.webkit.org/show_bug.cgi?id=84262 Reviewed by Kentaro Hara. Part of a series, see tracking bug 82948. * platform/chromium/PlatformSupport.h: (PlatformSupport): * platform/network/chromium/DNSChromium.cpp: (WebCore::prefetchDNS): 2012-04-18 Julien Chaffraix REGRESSION(102040): Auto-table layout with percent width doesn't shrink-to-fit content a cell with colspan https://bugs.webkit.org/show_bug.cgi?id=84260 Reviewed by Ojan Vafai. Tests: fast/table/td-width-fifty-percent-regression-expected.html fast/table/td-width-fifty-percent-regression.html * rendering/AutoTableLayout.cpp: (WebCore::AutoTableLayout::calcEffectiveLogicalWidth): As we are spreading the cell's min / max logical width, we should be updating them. This prevents the following logic getting confused and allocating more than needed. 2012-04-18 Justin Schuh Win8 builds usually fail due to cygwin rebasing https://bugs.webkit.org/show_bug.cgi?id=84274 Reviewed by Dirk Pranke. Cygwin can fail to spawn children if the DLL is rebased. This happens frequently enough on Windows 8 that we should retry on failure. No new tests. No behavior changed. * bindings/scripts/preprocessor.pm: (applyPreprocessor): 2012-04-18 Levi Weintraub Add explicit template instantiation to chromium/PopupListBox.cpp to prepare for sub-pixel layout https://bugs.webkit.org/show_bug.cgi?id=84264 Reviewed by Eric Seidel. Explicitly instantiating integer max and min templates to fix compilation in Chromium. We intentionally truncated these values in platform code, which matches earlier behavior. See https://trac.webkit.org/wiki/LayoutUnit for details. No new tests. No change in behavior. * platform/chromium/PopupListBox.cpp: (WebCore::PopupListBox::paintRow): (WebCore::PopupListBox::layout): 2012-04-18 Luke Macpherson Prevent potential null pointer dereference in CSSStyleSelector::applyProperty(). https://bugs.webkit.org/show_bug.cgi?id=84267 Reviewed by Kentaro Hara. No new tests / code cleanup found via static analysis. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::collectMatchingRulesForList): 2012-04-18 Luke Macpherson Prevent switch case fallthrough in StylePropertySet::getPropertyValue(). https://bugs.webkit.org/show_bug.cgi?id=84266 Reviewed by Kentaro Hara. No new tests / code cleanup found by static analysis. * css/StylePropertySet.cpp: (WebCore::StylePropertySet::getPropertyValue): 2012-04-18 Andreas Kling CSSValuePool: Make numeric value caches fixed-size arrays. Reviewed by Antti Koivisto. Change the numeric CSSPrimitiveValue caches in CSSValuePool from HashMaps to fixed-size arrays of RefPtrs. This is more space efficient and doesn't incur the cost of a hash lookup every time a numeric CSSPrimitiveValue is needed. We retain the limit of caching only values between 0-255 for now. * css/CSSValuePool.cpp: (WebCore::CSSValuePool::CSSValuePool): (WebCore::CSSValuePool::createValue): * css/CSSValuePool.h: (CSSValuePool): 2012-04-18 Dana Jansens [chromium] Rename overdraw histograms so we can use field trials in histograms.xml https://bugs.webkit.org/show_bug.cgi?id=83500 Reviewed by James Robinson. * platform/graphics/chromium/cc/CCOverdrawMetrics.cpp: (WebCore::CCOverdrawMetrics::recordMetricsInternal): 2012-04-18 David Reveman [Chromium] Solid color shader should use premultiplied alpha. https://bugs.webkit.org/show_bug.cgi?id=84215 Reviewed by Adrienne Walker. For efficiency and consistency, expect premultiplied alpha in solid color shader. * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::drawDebugBorderQuad): (WebCore::LayerRendererChromium::drawSolidColorQuad): * platform/graphics/chromium/ShaderChromium.cpp: (WebCore::FragmentShaderColor::getShaderString): 2012-04-18 Alexey Proskuryakov [WK2] Sandbox violations prevent attaching files to gmail messages https://bugs.webkit.org/show_bug.cgi?id=84263 Reviewed by Oliver Hunt. * page/DragActions.h: Removed the newly added upload action. We cannot know if or when an upload is going to happen - a drop even listener can always get a reference to a File object, and upload it with XMLHttpRequest. * page/DragController.cpp: (WebCore::DragController::concludeEditDrag): Removed a separate willPerformDragDestinationAction call for upload action - ther is nothing we'd want to only do when dropping on a file upload button. 2012-04-18 Levi Weintraub GraphicsContextCG's roundToDevicePixels should round even when there's no transform https://bugs.webkit.org/show_bug.cgi?id=84191 Reviewed by Eric Seidel. When painting with the identify transform, the roundToDevicePixels function in GraphicsContextCG does an early return that simply returns the FloatRect that was passed in. This proved to be a problem in sub-pixel layout, as we wouldn't adjust the paint rect for text underline, and it could end up being more than one pixel wide. Adding a roundedIntRect method on FloatRect for the simple short-circuit case. No new tests. No change in behavior before switching to sub-pixel layout. * platform/graphics/FloatRect.cpp: (WebCore::roundedIntRect): * platform/graphics/FloatRect.h: * platform/graphics/cg/GraphicsContextCG.cpp: (WebCore::GraphicsContext::roundToDevicePixels): 2012-04-18 Keishi Hattori [chromium] Turn on ENABLE_DATALIST for chromium https://bugs.webkit.org/show_bug.cgi?id=84118 Reviewed by Kent Tamura. * html/HTMLDataListElement.cpp: Touched to avoid build issues. No code change. * html/HTMLDataListElement.h: Ditto. * html/HTMLInputElement.cpp: Ditto. * html/HTMLInputElement.h: Ditto. 2012-04-18 Allan Sandfeld Jensen [Qt] WheelEventQt.cpp should be deleted. https://bugs.webkit.org/show_bug.cgi?id=84237 Reviewed by Simon Hausmann. * platform/qt/WheelEventQt.cpp: Removed. 2012-04-18 Emil A Eklund Unreviewed. Adding FIXME comment to FractionalLayoutUnit explaining the lack of size_t operators. * platform/FractionalLayoutUnit.h: (FractionalLayoutUnit): 2012-04-18 Benjamin Poulain Remove m_subclassData from JSArray, move the attribute to subclass as needed https://bugs.webkit.org/show_bug.cgi?id=84249 Reviewed by Geoffrey Garen. * bridge/runtime_array.cpp: (JSC::RuntimeArray::RuntimeArray): (JSC::RuntimeArray::finishCreation): * bridge/runtime_array.h: (JSC::RuntimeArray::getLength): (JSC::RuntimeArray::getConcreteArray): (RuntimeArray): 2012-04-18 Luiz Agostini matchMedia() MediaQueryList not updating https://bugs.webkit.org/show_bug.cgi?id=75903 Reviewed by Antti Koivisto. Test: fast/media/media-query-list-08.html Viewport related MediaQueryList listeners were not triggered and the value of matches were not updated if the document's style selector were not affected by viewport changes. The new method evaluateMediaQueries() is now called by FrameView instead of styleSelectorChanged() if the style selector is not affected by viewport changes. * dom/Document.cpp: (WebCore::Document::evaluateMediaQueries): (WebCore): (WebCore::Document::styleSelectorChanged): * dom/Document.h: (Document): * page/FrameView.cpp: (WebCore::FrameView::layout): 2012-04-18 Emil A Eklund Use explicit casts for size_t to unsigned conversion https://bugs.webkit.org/show_bug.cgi?id=83602 Reviewed by Eric Seidel. No new tests, no change in functinality. Not all platforms have implicit casts from size_t to unsigned and we can't add size_t versions of the operators to FractionalLayoutUnit for all platforms as it would conflict with the unsigned versions of same. Change support methods to take unsigned instead of size_t and use explicit casts when multiplying or dividing a FractionalLayoutUnit with a size_t and the other way around. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::adjustForColumns): * rendering/RenderFlexibleBox.cpp: (WebCore::initialPackingOffset): (WebCore::packingSpaceBetweenChildren): (WebCore::initialLinePackingOffset): (WebCore::linePackingSpaceBetweenChildren): (WebCore::RenderFlexibleBox::packFlexLines): * rendering/RenderFrameSet.cpp: (WebCore::RenderFrameSet::layout): 2012-04-18 Pavel Feldman Web Inspector: [Chromium] Module's require injects scripts before the debug id is set to the context. https://bugs.webkit.org/show_bug.cgi?id=84166 Re-applying r114497. * bindings/v8/V8IsolatedContext.cpp: (WebCore::setInjectedScriptContextDebugId): (WebCore): (WebCore::V8IsolatedContext::V8IsolatedContext): * bindings/v8/V8Proxy.cpp: (WebCore::V8Proxy::evaluateInIsolatedWorld): * bindings/v8/V8Proxy.h: (V8Proxy): 2012-04-18 Pavel Feldman Web Inspector: extract script navigator overlay logic into the scripts navigator controller. https://bugs.webkit.org/show_bug.cgi?id=84244 Reviewed by Vsevolod Vlasov. Overlay logic is well separable from the scripts panel and does not belong there. Extracting it into a separate class. * inspector/front-end/ScriptsNavigator.js: (WebInspector.ScriptsNavigatorController.prototype.wasShown): (WebInspector.ScriptsNavigatorController.prototype._createNavigatorControlButton): (WebInspector.ScriptsNavigatorController.prototype._escDownWhileNavigatorOverlayOpen): (WebInspector.ScriptsNavigatorController.prototype._toggleNavigator): (WebInspector.ScriptsNavigatorController.prototype._hidePinnedNavigator): (WebInspector.ScriptsNavigatorController.prototype.set _pinNavigator): (WebInspector.ScriptsNavigatorController.prototype.set showNavigatorOverlay): (WebInspector.ScriptsNavigatorController.prototype.hideNavigatorOverlay): (WebInspector.ScriptsNavigatorController.prototype._navigatorOverlayWasShown): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype.wasShown): (WebInspector.ScriptsPanel.prototype._editorClosed): (WebInspector.ScriptsPanel.prototype._editorSelected): (WebInspector.ScriptsPanel.prototype._scriptSelected): 2012-04-18 Alexandru Chiculita Unreviewed, trying to fix QT build. It was using a FilterEffectRenderer::prepare that changed to allocateBackingStoreIfNeeded in 114529. * platform/graphics/texmap/TextureMapperImageBuffer.cpp: (WebCore::BitmapTextureImageBuffer::applyFilters): 2012-04-18 Pavel Feldman Web Inspector: extract script navigator overlay logic into the scripts navigator controller. https://bugs.webkit.org/show_bug.cgi?id=84244 Reviewed by Vsevolod Vlasov. Overlay logic is well separable from the scripts panel and does not belong there. Extracting it into a separate class. * inspector/front-end/ScriptsNavigator.js: (WebInspector.ScriptsNavigatorController.prototype.wasShown): (WebInspector.ScriptsNavigatorController.prototype._createNavigatorControlButton): (WebInspector.ScriptsNavigatorController.prototype._escDownWhileNavigatorOverlayOpen): (WebInspector.ScriptsNavigatorController.prototype._toggleNavigator): (WebInspector.ScriptsNavigatorController.prototype._hidePinnedNavigator): (WebInspector.ScriptsNavigatorController.prototype.set _pinNavigator): (WebInspector.ScriptsNavigatorController.prototype.set showNavigatorOverlay): (WebInspector.ScriptsNavigatorController.prototype.hideNavigatorOverlay): (WebInspector.ScriptsNavigatorController.prototype._navigatorOverlayWasShown): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype.wasShown): (WebInspector.ScriptsPanel.prototype._editorClosed): (WebInspector.ScriptsPanel.prototype._editorSelected): (WebInspector.ScriptsPanel.prototype._scriptSelected): 2012-04-18 Sheriff Bot Unreviewed, rolling out r114497. http://trac.webkit.org/changeset/114497 https://bugs.webkit.org/show_bug.cgi?id=84253 Broke compile on Win, including stdio did not help (Requested by dimich on #webkit). * bindings/v8/V8IsolatedContext.cpp: (WebCore::V8IsolatedContext::V8IsolatedContext): * bindings/v8/V8Proxy.cpp: (WebCore::V8Proxy::evaluateInIsolatedWorld): (WebCore::V8Proxy::setInjectedScriptContextDebugId): (WebCore): * bindings/v8/V8Proxy.h: (V8Proxy): 2012-04-18 Alexandru Chiculita [CSS Filters] Drop-shadow and blur can avoid using full source image https://bugs.webkit.org/show_bug.cgi?id=81263 Reviewed by Dean Jackson. Instead of using the full bounding box of the RenderLayer we now compute the exact rectangle that is needed to compute filter inside the dirty rectangle on screen. That's easy to calculate by reversing the filter outsets. Even if the element is completely offscreen, but its shadow is in the viewport, we can still compute the source rectangle that needs to be drawn in order to update the shadow correctly. No new tests, this change doesn't have visible results and the functionality should already be covered by previous filter tests. * rendering/FilterEffectRenderer.cpp: (WebCore::FilterEffectRenderer::FilterEffectRenderer): (WebCore::FilterEffectRenderer::build): Save the outsets of the filters, so that we can use them in computeSourceImageRectForDirtyRect. (WebCore::FilterEffectRenderer::updateBackingStoreRect): Only allocate a new source image if the size of the source rectangle changed. (WebCore::FilterEffectRenderer::allocateBackingStoreIfNeeded): There's no need to call clearIntermediateResults() in this function. We do that after the filter is computed. (WebCore::FilterEffectRenderer::computeSourceImageRectForDirtyRect): (WebCore): (WebCore::FilterEffectRendererHelper::prepareFilterEffect): (WebCore::FilterEffectRendererHelper::beginFilterEffect): * rendering/FilterEffectRenderer.h: (FilterEffectRendererHelper): (WebCore::FilterEffectRendererHelper::repaintRect): (FilterEffectRenderer): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::paintLayerContents): 2012-04-18 Dominik Röttsches [EFL][DRT] @font-face support fails on EFL https://bugs.webkit.org/show_bug.cgi?id=83264 Reviewed by Dimitri Glazkov. STORE_FONT_CUSTOM_PLATFORM_DATA was not defined for EFL. Fixing that by removing a long standing FIXME with the intention to turn the whitelist for this switch into a blacklist. * loader/cache/CachedFont.cpp: 2012-04-18 Levi Weintraub Convert ShadowData and DropShadowFilterOperation to use IntPoint https://bugs.webkit.org/show_bug.cgi?id=84098 Reviewed by Eric Seidel. Shadows do not flow with the page, so sub-pixel layout doesn't actually offer any benefit that couldn't have been attained before that conversion. With that in mind, this patch reverts drop shadow offsets to integers, but also cleans up the code by switching the x/y location pair to be an IntPoint. No new tests. No change in behavior. * css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::valueForFilter): * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::collectMatchingRulesForList): * css/SVGCSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applySVGProperty): * page/animation/AnimationBase.cpp: (WebCore::blendFunc): (WebCore::shadowForBlending): * platform/animation/AnimationUtilities.h: (WebCore::blend): New blend function that operates on IntPoints. (WebCore): * platform/chromium/support/WebFilterOperations.cpp: (WebKit::WebDropShadowFilterOperation): * platform/graphics/filters/FilterOperation.cpp: (WebCore::DropShadowFilterOperation::blend): * platform/graphics/filters/FilterOperation.h: (WebCore::DropShadowFilterOperation::clone): (WebCore::DropShadowFilterOperation::x): (WebCore::DropShadowFilterOperation::y): (WebCore::DropShadowFilterOperation::location): Preserved the comment about lengths. (WebCore::DropShadowFilterOperation::operator==): (WebCore::DropShadowFilterOperation::DropShadowFilterOperation): (DropShadowFilterOperation): * rendering/RenderBoxModelObject.cpp: (WebCore::areaCastingShadowInHole): Reverted to integers since this operates on the IntRect from a RoundedRect. (WebCore::RenderBoxModelObject::paintBoxShadow): Reduced the complexity and unnecessary conversion between LayoutUnits and integers by using all integers after we calculate the pixel-snapped RoundedRect that we use for painting. * rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::getShadowExtent): (WebCore::RenderStyle::getShadowHorizontalExtent): (WebCore::RenderStyle::getShadowVerticalExtent): * rendering/style/ShadowData.cpp: (WebCore::ShadowData::ShadowData): (WebCore::ShadowData::operator==): (WebCore::calculateShadowExtent): (WebCore::ShadowData::adjustRectForShadow): * rendering/style/ShadowData.h: (WebCore::ShadowData::ShadowData): (WebCore::ShadowData::x): (WebCore::ShadowData::y): (WebCore::ShadowData::location): (ShadowData): 2012-04-17 Kentaro Hara [V8] Add an optional Isolate argument to wrap() https://bugs.webkit.org/show_bug.cgi?id=84202 Reviewed by Nate Chapin. The final objective is to pass Isolate around in V8 bindings. This patch adds an optional Isolate argument to wrap(). After rewriting all wrap() callers so that they pass Isolate to wrap(), I'll make the Isolate argument non-optional. No tests. No change in behavior. * bindings/scripts/CodeGeneratorV8.pm: Modified as described above. (GenerateHeader): * bindings/v8/custom/V8DocumentCustom.cpp: Ditto. (WebCore::toV8): * bindings/v8/custom/V8HTMLDocumentCustom.cpp: Ditto. (WebCore::toV8): * bindings/v8/custom/V8NodeCustom.cpp: Ditto. (WebCore::toV8Slow): * bindings/v8/custom/V8SVGDocumentCustom.cpp: Ditto. (WebCore::toV8): * dom/make_names.pl: Ditto. (printWrapperFactoryCppFile): * bindings/scripts/test/V8/V8Float64Array.h: Updated run-bindings-tests results. (V8Float64Array): (WebCore::V8Float64Array::wrap): * bindings/scripts/test/V8/V8TestActiveDOMObject.h: (V8TestActiveDOMObject): (WebCore::V8TestActiveDOMObject::wrap): (WebCore::toV8): * bindings/scripts/test/V8/V8TestCustomNamedGetter.h: (V8TestCustomNamedGetter): (WebCore::V8TestCustomNamedGetter::wrap): (WebCore::toV8): * bindings/scripts/test/V8/V8TestEventConstructor.h: (V8TestEventConstructor): (WebCore::V8TestEventConstructor::wrap): (WebCore::toV8): * bindings/scripts/test/V8/V8TestEventTarget.h: (V8TestEventTarget): (WebCore::V8TestEventTarget::wrap): (WebCore::toV8): * bindings/scripts/test/V8/V8TestInterface.h: (V8TestInterface): (WebCore::V8TestInterface::wrap): (WebCore::toV8): * bindings/scripts/test/V8/V8TestMediaQueryListListener.h: (V8TestMediaQueryListListener): (WebCore::V8TestMediaQueryListListener::wrap): (WebCore::toV8): * bindings/scripts/test/V8/V8TestNamedConstructor.h: (V8TestNamedConstructor): (WebCore::V8TestNamedConstructor::wrap): (WebCore::toV8): * bindings/scripts/test/V8/V8TestNode.h: (V8TestNode): (WebCore::V8TestNode::wrap): (WebCore::toV8): * bindings/scripts/test/V8/V8TestObj.h: (V8TestObj): (WebCore::V8TestObj::wrap): (WebCore::toV8): * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.h: (V8TestSerializedScriptValueInterface): (WebCore::V8TestSerializedScriptValueInterface::wrap): (WebCore::toV8): 2012-04-18 Alexandru Chiculita [CSS Filters] Do not use clipping rect when calculating the bounds of a layer https://bugs.webkit.org/show_bug.cgi?id=83960 Reviewed by Simon Fraser. The local clip rect should not be used when calculating the bounds of a filter area. Otherwise drop-shadow might not know about the pixels outside the clipping rectangle, even though the actual shadow might be inside it. No new tests added in this patch, but this patch fixes two existing tests that fail. LayoutTests/css3/filters/filter-repaint-shadow-clipped.html LayoutTests/css3/filters/filter-repaint-shadow-rotated.html * rendering/RenderLayer.cpp: (WebCore::RenderLayer::paintLayerContents): (WebCore::RenderLayer::calculateLayerBounds): * rendering/RenderLayer.h: 2012-04-18 Mark Pilgrim Followup to "Call incrementStatsCounter directly" https://bugs.webkit.org/show_bug.cgi?id=83109 Reviewed by Kentaro Hara. Now that incrementStatsCounter has been moved from PlatformSupport.h to Platform.h, we need to be able to call it directly from WebCore/bindings/v8/v8Proxy.h (for the INC_STATS macro). That means we need a new StatsCounter class in WebCore/platform/ and an implementation in WebCore/platform/chromium/StatsCounterChromium.cpp. Other ports are welcome to implement their own stats counters if they wish. This pattern was based on the HistogramSupport/HistogramSupportChromium classes. * CMakeLists.txt: * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * bindings/v8/V8Proxy.h: * bindings/v8/custom/V8DedicatedWorkerContextCustom.cpp: (WebCore::V8DedicatedWorkerContext::postMessageCallback): (WebCore::V8DedicatedWorkerContext::webkitPostMessageCallback): * bindings/v8/custom/V8NotificationCenterCustom.cpp: (WebCore::V8NotificationCenter::createHTMLNotificationCallback): (WebCore::V8NotificationCenter::createNotificationCallback): (WebCore::V8NotificationCenter::requestPermissionCallback): * bindings/v8/custom/V8WorkerContextCustom.cpp: (WebCore::V8WorkerContext::importScriptsCallback): (WebCore::V8WorkerContext::setTimeoutCallback): (WebCore::V8WorkerContext::setIntervalCallback): * platform/StatsCounter.cpp: Added. (WebCore): (WebCore::StatsCounter::incrementStatsCounter): * platform/StatsCounter.h: Added. (WebCore): (StatsCounter): * platform/chromium/StatsCounterChromium.cpp: Added. (WebCore): (WebCore::StatsCounter::incrementStatsCounter): 2012-04-18 Alexander Pavlov [Chromium] REGRESSION: Popup shrinks because of autocomplete https://bugs.webkit.org/show_bug.cgi?id=84139 http://code.google.com/p/chromium/issues/detail?id=123432 Do not update the window rect on the wrong client but instead return the popup widget's new screen coordinates from the refresh() method. Reviewed by Kent Tamura. * platform/chromium/PopupContainer.cpp: (WebCore::PopupContainer::refresh): * platform/chromium/PopupContainer.h: (PopupContainer): 2012-04-18 Simon Fraser ASSERT when a layer with a foreground layer is in 'paint into ancestor' mode https://bugs.webkit.org/show_bug.cgi?id=84221 Reviewed by Dean Jackson. When a RenderLayerBacking doesn't require its own backing store, and is in "paintIntoCompositingAncestor" mode, we would assert when trying to paint its m_foregroundLayer if it had one (because of a negative z-index child). The fix is to set the 'drawsContent' state on the m_foregroundLayer as well as m_graphicsLayer. Test: compositing/backing/no-backing-foreground-layer.html * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::updateDrawsContent): 2012-04-18 Yury Semikhatsky Web Inspector: DataGrid should use explicit root node https://bugs.webkit.org/show_bug.cgi?id=84240 DataGrid now has an explicit root node. All children are added/removed to that node. Reviewed by Pavel Feldman. * inspector/front-end/ApplicationCacheItemsView.js: (WebInspector.ApplicationCacheItemsView.prototype._createDataGrid): (WebInspector.ApplicationCacheItemsView.prototype._populateDataGrid): * inspector/front-end/CSSSelectorProfileView.js: (WebInspector.CSSSelectorProfileView): (WebInspector.CSSSelectorProfileView.prototype.rebuildGridItems): (WebInspector.CSSSelectorProfileView.prototype.refreshData): * inspector/front-end/CookieItemsView.js: (WebInspector.SimpleCookiesTable): (WebInspector.SimpleCookiesTable.prototype.setCookies): * inspector/front-end/CookiesTable.js: (WebInspector.CookiesTable): (WebInspector.CookiesTable.prototype._rebuildTable): * inspector/front-end/DOMStorageItemsView.js: (WebInspector.DOMStorageItemsView.prototype._dataGridForDOMStorageEntries): * inspector/front-end/DataGrid.js: (WebInspector.DataGrid): (WebInspector.DataGrid.createSortableDataGrid.sortDataGrid): (WebInspector.DataGrid.createSortableDataGrid): (WebInspector.DataGrid.prototype.setRootNode): (WebInspector.DataGrid.prototype.rootNode): (WebInspector.DataGrid.prototype.autoSizeColumns): (WebInspector.DataGrid.prototype._enumerateChildren): (WebInspector.DataGrid.prototype._keyDown): (WebInspector.DataGrid.prototype._contextMenuInDataTable): (WebInspector.DataGridNode.prototype.get revealed): (WebInspector.DataGridNode.prototype.get depth): (WebInspector.DataGridNode.prototype.appendChild): (WebInspector.DataGridNode.prototype.insertChild): (WebInspector.DataGridNode.prototype.removeChild): (WebInspector.DataGridNode.prototype.removeChildren): (WebInspector.DataGridNode.prototype.collapse): (WebInspector.DataGridNode.prototype.expand): (WebInspector.DataGridNode.prototype.reveal): (WebInspector.DataGridNode.prototype.revealAndSelect): (WebInspector.DataGridNode.prototype.traverseNextNode): (WebInspector.DataGridNode.prototype.traversePreviousNode): * inspector/front-end/HeapSnapshotDataGrids.js: (WebInspector.HeapSnapshotSortableDataGrid): (WebInspector.HeapSnapshotSortableDataGrid.prototype.dispose): (WebInspector.HeapSnapshotSortableDataGrid.prototype.changeNameFilter): (WebInspector.HeapSnapshotSortableDataGrid.prototype.updateVisibleNodes): (WebInspector.HeapSnapshotSortableDataGrid.prototype._performSorting): (WebInspector.HeapSnapshotContainmentDataGrid.prototype._defaultPopulateCount.100.expandRoute): (WebInspector.HeapSnapshotContainmentDataGrid.prototype.setDataSource): (WebInspector.HeapSnapshotContainmentDataGrid.prototype.sortingChanged): (WebInspector.HeapSnapshotRetainmentDataGrid.prototype.reset): (WebInspector.HeapSnapshotConstructorsDataGrid.prototype.populateChildren): (WebInspector.HeapSnapshotDiffDataGrid.prototype.setBaseDataSource): (WebInspector.HeapSnapshotDiffDataGrid.prototype.populateChildren.baseAggregatesReceived.aggregatesReceived.addNodeIfNonZeroDiff): (WebInspector.HeapSnapshotDiffDataGrid.prototype.populateChildren.baseAggregatesReceived.aggregatesReceived): (WebInspector.HeapSnapshotDiffDataGrid.prototype.populateChildren): (WebInspector.HeapSnapshotDominatorsDataGrid.prototype._defaultPopulateCount.25.setDataSource): (WebInspector.HeapSnapshotDominatorsDataGrid.prototype.sortingChanged): * inspector/front-end/HeapSnapshotGridNodes.js: (WebInspector.HeapSnapshotGenericObjectNode): * inspector/front-end/HeapSnapshotView.js: (WebInspector.HeapSnapshotView.prototype.performSearch): (WebInspector.HeapSnapshotView.prototype.refreshVisibleData): * inspector/front-end/IndexedDBViews.js: (WebInspector.IDBDataView.prototype._createDataGrid): (WebInspector.IDBDataView.prototype._updateData.callback): (WebInspector.IDBDataView.prototype._updateData): (WebInspector.IDBDataView.prototype.clear): * inspector/front-end/NetworkPanel.js: (WebInspector.NetworkLogView.prototype._createTable): (WebInspector.NetworkLogView.prototype.refresh): (WebInspector.NetworkLogView.prototype._reset): * inspector/front-end/ProfileDataGridTree.js: (WebInspector.ProfileDataGridNode.prototype.insertChild): (WebInspector.ProfileDataGridNode.prototype.removeChild): (WebInspector.ProfileDataGridNode.prototype.removeChildren): * inspector/front-end/ProfileView.js: (WebInspector.CPUProfileView.prototype.refresh): * inspector/front-end/treeoutline.js: 2012-04-18 Vineet Chaudhary Add PassThis=* to support the callbacks which requires to pass "this" value. https://bugs.webkit.org/show_bug.cgi?id=84232 Reviewed by Kentaro Hara. Adding PassThisToCallback=XXX to attributes will be useful for the callbacks which requires to pass "this". This will help to identify the type(XXX) of "this" value in codegenerator. Tests: bindings/scripts/test/TestCallback.idl * bindings/scripts/CodeGeneratorJS.pm: (GenerateCallbackImplementation): Modified codegenerator to support [PassThisToCallback] * bindings/scripts/CodeGeneratorV8.pm: (GenerateCallbackImplementation): Ditto. * bindings/scripts/IDLAttributes.txt: Added PassThisToCallback=* * bindings/scripts/test/CPP/WebDOMTestCallback.cpp: Modofied results from run-bindings-tests. (WebDOMTestCallback::callbackWithBoolean): (WebDOMTestCallback::callbackRequiresThisToPass): * bindings/scripts/test/CPP/WebDOMTestCallback.h: Ditto. (WebDOMTestCallback): * bindings/scripts/test/GObject/WebKitDOMTestCallback.cpp: Ditto. (webkit_dom_test_callback_callback_with_boolean): (webkit_dom_test_callback_callback_requires_this_to_pass): * bindings/scripts/test/GObject/WebKitDOMTestCallback.h: Ditto. * bindings/scripts/test/JS/JSTestCallback.cpp: Ditto. (WebCore::JSTestCallback::callbackWithBoolean): (WebCore): (WebCore::JSTestCallback::callbackRequiresThisToPass): * bindings/scripts/test/JS/JSTestCallback.h: Ditto. (JSTestCallback): * bindings/scripts/test/ObjC/DOMTestCallback.h: Ditto. * bindings/scripts/test/ObjC/DOMTestCallback.mm: Ditto. (-[DOMTestCallback callbackWithBoolean:]): (-[DOMTestCallback callbackRequiresThisToPass:thisClassParam:]): * bindings/scripts/test/TestCallback.idl: Added test to verify generated code. * bindings/scripts/test/V8/V8TestCallback.cpp: Ditto. (WebCore::V8TestCallback::callbackWithBoolean): (WebCore): (WebCore::V8TestCallback::callbackRequiresThisToPass): * bindings/scripts/test/V8/V8TestCallback.h: Ditto. (V8TestCallback): 2012-04-18 'Pavel Feldman' Not reviewed: fixing Chromium win compilation. * bindings/v8/V8IsolatedContext.cpp: 2012-04-18 Luke Macpherson Remove unnecessary variable reassignment in CSSParser::parseImageSet(). https://bugs.webkit.org/show_bug.cgi?id=84204 Reviewed by Kentaro Hara. Code calls next and then current instead of reusing the result of next. No new tests / no functionality changed. * css/CSSParser.cpp: (WebCore::CSSParser::parseImageSet): 2012-04-18 Jason Liu [BlackBerry] HTTP GET header has a "Cookie" when refreshing a page after cookies have been cleared. https://bugs.webkit.org/show_bug.cgi?id=84223 Reviewed by George Staikos. Webkit uses the old ResourceRequest when refreshing. Its cookies' header isn't removed after clicking "clear cookies" button. We need to set cookies for this request again. We must click "clear button" to test, so have to write a manual test case. Test: ManualTests/blackberry/clear-cookie-refresh.php * platform/network/blackberry/ResourceRequestBlackBerry.cpp: (WebCore::ResourceRequest::initializePlatformRequest): 2012-04-17 Pavel Feldman Web Inspector: [Chromium] Module's require injects scripts before the debug id is set to the context. https://bugs.webkit.org/show_bug.cgi?id=84166 Reviewed by Yury Semikhatsky. V8IsolatedContext was getting debug id assigned post-construction. At the same time, it was compiling all its module scripts within the constructor. As a result, scripts ended up in the main world's list. * bindings/v8/V8IsolatedContext.cpp: (WebCore::setInjectedScriptContextDebugId): (WebCore): (WebCore::V8IsolatedContext::V8IsolatedContext): * bindings/v8/V8Proxy.cpp: (WebCore::V8Proxy::evaluateInIsolatedWorld): * bindings/v8/V8Proxy.h: (V8Proxy): 2012-04-17 Pavel Feldman Web Inspector: document.open removes the documentElement, but does not clear the elements panel. https://bugs.webkit.org/show_bug.cgi?id=84179 Reviewed by Yury Semikhatsky. Perform total update upon modifications of the document node. Test: inspector/elements/delete-from-document.html * inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::didRemoveDOMNode): * inspector/front-end/ElementsTreeOutline.js: 2012-04-18 Max Feil [BlackBerry] Tab awareness for HTML5 concurrent audio https://bugs.webkit.org/show_bug.cgi?id=82930 Support for concurrent HTML5 audio improvements being made in the platform library, which need to be aware of tabs and tab visibility. PR96004. Reviewed by George Staikos. Test: media/audio-concurrent-supported.html * platform/blackberry/PageClientBlackBerry.h: * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp: (WebCore::MediaPlayerPrivate::MediaPlayerPrivate): (WebCore::MediaPlayerPrivate::showErrorDialog): (WebCore::MediaPlayerPrivate::isTabVisible): (WebCore): * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.h: (MediaPlayerPrivate): 2012-04-18 Noel Gordon [CG] ImageBuffer: check getPremultipliedImageData() error return https://bugs.webkit.org/show_bug.cgi?id=84022 Reviewed by Eric Seidel. ImageBuffer::getPremultipliedImageData() can fail. toDataURL() should check for a failure return, and return "data:," if so. No new tests. Covered by existing toDataURL tests, in particular: canvas/philip/tests/toDataURL.jpeg.alpha.html * platform/graphics/cg/ImageBufferCG.cpp: (WebCore::ImageBuffer::toDataURL): Rename |arr| variable to premultipliedData and return "data:," if premultipliedData is empty. Clean up whitespace and a comment. 2012-04-17 Rachel Blum Skia OOM error when upscaling small subsets of images by large quantities https://bugs.webkit.org/show_bug.cgi?id=84225 Reviewed by David Levin. Tested with manual tests. * platform/graphics/skia/NativeImageSkia.cpp: (WebCore::NativeImageSkia::shouldCacheResampling): 2012-04-17 MORITA Hajime ShadowRoot shouldn't be adopted by any Document. https://bugs.webkit.org/show_bug.cgi?id=84127 Reviewed by Dimitri Glazkov. ShadowRoot cannot cannot be removed from its host, which means ShadowRoot cannot be adopted by any Document directly because the adoptNode() tries to remove it from its parent but it doesn't make sense for ShadowRoot. This change adds a guard to check such a case. Test: fast/dom/shadow/adopt-node-with-shadow-root.html * dom/Document.cpp: (WebCore::Document::adoptNode): 2012-04-17 John Bauman [chromium] Ensure RateLimiter waits for Swapbuffers completion https://bugs.webkit.org/show_bug.cgi?id=83649 Reviewed by James Robinson. We were waiting only on the canvas context, which with the new GPU scheduling was causing the RateLimiter not to ratelimit enough. We need to insert no-op commands in the compositor context, so that we'll wait for the canvas context and SwapBuffers as well. * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::doNoOp): (WebCore): * platform/graphics/chromium/LayerRendererChromium.h: (LayerRendererChromium): * platform/graphics/chromium/RateLimiter.cpp: (WebCore::RateLimiter::create): (WebCore::RateLimiter::RateLimiter): (WebCore::RateLimiter::rateLimitContext): * platform/graphics/chromium/RateLimiter.h: (RateLimiterClient): (WebCore): (RateLimiter): * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::startRateLimiter): (WebCore::CCLayerTreeHost::rateLimit): (WebCore): * platform/graphics/chromium/cc/CCLayerTreeHost.h: (CCLayerTreeHost): * platform/graphics/chromium/cc/CCProxy.h: (CCProxy): * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp: (WebCore::CCSingleThreadProxy::forceNoOpCommand): (WebCore): * platform/graphics/chromium/cc/CCSingleThreadProxy.h: (CCSingleThreadProxy): * platform/graphics/chromium/cc/CCThreadProxy.cpp: (WebCore::CCThreadProxy::forceNoOpCommand): (WebCore): (WebCore::CCThreadProxy::forceNoOpCommandOnImplThread): * platform/graphics/chromium/cc/CCThreadProxy.h: (CCThreadProxy): 2012-04-17 Andreas Kling CSSValuePool: Made identifier value cache a fixed-size array. Reviewed by Antti Koivisto. Change the identifier CSSPrimitiveValue cache in CSSValuePool from a HashMap to a fixed-size array of RefPtrs. We have ~700 values total, so this is quite space efficient now that the CSSValuePool is globally shared. More importantly it avoids a hash lookup every time we need an identifier value. * css/CSSValuePool.h: * css/CSSValuePool.cpp: (WebCore::CSSValuePool::createIdentifierValue): 2012-04-17 Antoine Labour [Chromium] Clean up texture ids on the impl side when losing the context https://bugs.webkit.org/show_bug.cgi?id=84122 Reviewed by James Robinson. Tested by CCLayerTreeHostImplTest.dontUseOldResourcesAfterLostContext. * platform/graphics/chromium/cc/CCTextureLayerImpl.cpp: (WebCore::CCTextureLayerImpl::didLoseContext): * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp: (WebCore::CCTiledLayerImpl::didLoseContext): (WebCore): * platform/graphics/chromium/cc/CCTiledLayerImpl.h: (CCTiledLayerImpl): * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp: (WebCore::CCVideoLayerImpl::didLoseContext): (WebCore): * platform/graphics/chromium/cc/CCVideoLayerImpl.h: (CCVideoLayerImpl): 2012-04-17 Emil A Eklund Change RenderThemeChromiumSkia paint methods to use pixel snapping https://bugs.webkit.org/show_bug.cgi?id=84175 Reviewed by Eric Seidel. No new tests, no change in functionality. Change RenderThemeChromiumSkia to use subpixel types and pixel snap values just before painting. * rendering/RenderThemeChromiumSkia.cpp: (WebCore::RenderThemeChromiumSkia::convertToPaintingRect): (WebCore::RenderThemeChromiumSkia::paintSearchFieldCancelButton): (WebCore::RenderThemeChromiumSkia::paintSearchFieldResultsDecoration): (WebCore::RenderThemeChromiumSkia::paintSearchFieldResultsButton): * rendering/RenderThemeChromiumSkia.h: 2012-04-17 Levi Weintraub Clean up outstanding LayoutUnit misuse in WebCore https://bugs.webkit.org/show_bug.cgi?id=84209 Reviewed by Eric Seidel. Small changes to a handful of files to prepare trunk for FractionalLayoutUnits. For more details, see https://trac.webkit.org/wiki/LayoutUnit No new tests. No change in behavior. * css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): minimumValueForLength preserves sub-pixel precision, so we should avoid unnecessarily using integers. * platform/graphics/FractionalLayoutPoint.h: (WebCore::FractionalLayoutPoint::FractionalLayoutPoint): Adding an explicit constructor from FractionalLayoutSizes. This mirrors a method in IntPoint. * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::paintBorder): The rects that change come from roundedRects, which are already pixel-snapped. * rendering/RenderBoxModelObject.h: Removing a comment that is no longer applicable. * rendering/RenderTable.cpp: (WebCore::RenderTable::computeLogicalWidth): Since we layout tables using integers, we need to explicitly calculate the width to be integral as well to avoid pushing the next element over by a pixel that we won't later paint with our own box decorations. * rendering/RenderText.h: (RenderText): Correcting an unfortunate mismatch between in the return value of linesBoundingBox between the header and implementation. * rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::getRoundedBorderFor): We were incorrectly not using the snapped border rect to pass to calcRadiiFor (which takes an IntRect). Correcting this. 2012-04-17 Luke Macpherson Ensure CSSParser member variables are initialized. https://bugs.webkit.org/show_bug.cgi?id=84205 Reviewed by Andreas Kling. No new tests / code cleanup only. * css/CSSParser.cpp: (WebCore::CSSParser::CSSParser): 2012-04-16 Alexandru Chiculita Regression(114172): Use after free in CustomFilterProgram::notifyClients https://bugs.webkit.org/show_bug.cgi?id=84000 Reviewed by Dean Jackson. The function returned early and the shaders didn't have a chance to be saved. Moving those two lines before the return false just to make sure that FilterEffectRenderer never adds itself as a client for a shader without keeping track of that. No new tests. The problem reproduces with existing tests. css3/filters/custom/custom-filter-property-computed-style.html css3/filters/custom/effect-custom-combined-missing.html * rendering/FilterEffectRenderer.cpp: (WebCore::FilterEffectRenderer::build): 2012-04-17 Alec Flett IndexedDB chooses wrong record on PREV_NO_DUPLICATE index cursor https://bugs.webkit.org/show_bug.cgi?id=60746 Reviewed by Ojan Vafai. When iterating backwards with PREV_NO_DUPLICATE, keep walking past the 'prev' key until it changes, then walk forward one time. This covers the object store and index cases. Test: storage/indexeddb/mozilla/index-prev-no-duplicate.html * Modules/indexeddb/IDBLevelDBBackingStore.cpp: (WebCore): 2012-04-17 Yi Shen Caret is not rendered properly inside an input element with text-indent https://bugs.webkit.org/show_bug.cgi?id=82688 Reviewed by Ryosuke Niwa. For an empty input element, there is no RenderText. Instead, RenderBlock::localCaretRect provides the caret position for rendering the caret in the empty input element. To get correct caret rect, textIndentOffset() should be used to adjust the caret's position. Test: editing/style/text-indent.html * rendering/RenderBlock.cpp: (WebCore::RenderBlock::localCaretRect): 2012-04-17 Filip Pizlo It should be possible to create an inheritorID for the global this object without crashing https://bugs.webkit.org/show_bug.cgi?id=84200 Reviewed by Oliver Hunt. No new tests, because the circumstances necessary to make this happen are rather hairy. * bindings/js/JSDOMWindowShell.h: (WebCore::JSDOMWindowShell::window): (WebCore::JSDOMWindowShell::setWindow): 2012-04-17 Luke Macpherson Make CSSParser::parseValue()'s handling of CSSPropertyCursor more obviously correct. https://bugs.webkit.org/show_bug.cgi?id=83544 Reviewed by Kentaro Hara. No new tests / code cleanup only. The code as it stands appears to be correct, but static analysis was concerned that value could become null. This patch adds a null check and ASSERT_NOT_REACHED() to make the code more obviously correct. * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): 2012-04-17 David Reveman [Chromium] Add TextureUploader which allows us to use persistent GC3D state for texture uploads. https://bugs.webkit.org/show_bug.cgi?id=83972 Reviewed by James Robinson. Add TextureUploader class that allows us to add persistent GC3D state to the upload machinery. * WebCore.gypi: * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::initializeSharedObjects): (WebCore::LayerRendererChromium::cleanupSharedObjects): * platform/graphics/chromium/LayerRendererChromium.h: (WebCore::LayerRendererChromium::textureUploader): (LayerRendererChromium): * platform/graphics/chromium/TextureUploader.cpp: Added. (WebCore): (WebCore::AcceleratedTextureUploader::AcceleratedTextureUploader): (WebCore::AcceleratedTextureUploader::~AcceleratedTextureUploader): (WebCore::AcceleratedTextureUploader::uploadTexture): * platform/graphics/chromium/TextureUploader.h: Added. (WebCore): (TextureUploader): (WebCore::TextureUploader::~TextureUploader): (AcceleratedTextureUploader): (WebCore::AcceleratedTextureUploader::create): * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp: (WebCore::CCSingleThreadProxy::doCommit): * platform/graphics/chromium/cc/CCTextureUpdater.cpp: (WebCore::CCTextureUpdater::update): * platform/graphics/chromium/cc/CCTextureUpdater.h: (WebCore): (CCTextureUpdater): * platform/graphics/chromium/cc/CCThreadProxy.cpp: (WebCore::CCThreadProxy::scheduledActionUpdateMoreResources): 2012-04-17 Luke Macpherson Clean up CSSParser::parseFillRepeat(). https://bugs.webkit.org/show_bug.cgi?id=83547 Reviewed by Kentaro Hara. Removed multiple unnecessary calls to m_valueList->current(). Restructured logic for parsing second value to make it clearer. No new tests / code cleanup only. * css/CSSParser.cpp: (WebCore::CSSParser::parseFillRepeat): 2012-04-17 Kentaro Hara [V8] Pass Isolate to toV8Slow() https://bugs.webkit.org/show_bug.cgi?id=84173 Reviewed by Nate Chapin. The final objective is to pass Isolate around in V8 bindings. This patch passes the Isolate to toV8Slow(). No tests. No change in behavior. * bindings/scripts/CodeGeneratorV8.pm: (GenerateHeader): * bindings/v8/custom/V8NodeCustom.cpp: (WebCore::toV8Slow): 2012-04-17 Julien Chaffraix Fix the ACCELERATED_COMPOSITING code to not expose RenderLayer outside rendering https://bugs.webkit.org/show_bug.cgi?id=83816 Reviewed by James Robinson. No change in behavior expected. This code adds several functions on RenderBoxModelObject to forward to the associated layer. This removes the RenderLayer dependencies at the call sites. Currently only RenderBoxModelObject can be hardware accelerated as we need a RenderLayer, this looks like the best place to put those new functions. * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::contentChanged): (WebCore::RenderBoxModelObject::hasAcceleratedCompositing): (WebCore::RenderBoxModelObject::startTransition): (WebCore::RenderBoxModelObject::transitionPaused): (WebCore::RenderBoxModelObject::transitionFinished): (WebCore::RenderBoxModelObject::startAnimation): (WebCore::RenderBoxModelObject::animationPaused): (WebCore::RenderBoxModelObject::animationFinished): (WebCore::RenderBoxModelObject::suspendAnimations): * rendering/RenderBoxModelObject.h: Added the previous functions to hide the layer need. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::hasAcceleratedCompositing): * rendering/RenderLayer.h: Removed the previous method as it was superseeded by the one on RenderBoxModelObject. Also moved the ContentChangeType enumaration. * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::contentChanged): * rendering/RenderLayerBacking.h: (RenderLayerBacking): Updated after the ContentChangeType enumaration move. * html/HTMLCanvasElement.cpp: (WebCore::HTMLCanvasElement::reset): (WebCore::HTMLCanvasElement::paintsIntoCanvasBuffer): * html/canvas/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::didDraw): * html/canvas/WebGLRenderingContext.cpp: (WebCore::WebGLRenderingContext::markContextChanged): (WebCore::WebGLRenderingContext::reshape): * page/animation/AnimationBase.cpp: (WebCore::AnimationBase::freezeAtTime): * page/animation/ImplicitAnimation.cpp: (WebCore::ImplicitAnimation::startAnimation): (WebCore::ImplicitAnimation::pauseAnimation): (WebCore::ImplicitAnimation::endAnimation): * page/animation/KeyframeAnimation.cpp: (WebCore::KeyframeAnimation::startAnimation): (WebCore::KeyframeAnimation::pauseAnimation): (WebCore::KeyframeAnimation::endAnimation): * rendering/RenderBox.cpp: (WebCore::RenderBox::imageChanged): * rendering/RenderImage.cpp: (WebCore::RenderImage::imageDimensionsChanged): (WebCore::RenderImage::notifyFinished): * rendering/RenderVideo.cpp: (WebCore::RenderVideo::updatePlayer): Updated all those call sites to use the new functions. Also removed unneeded RenderLayer.h include as we went. 2012-04-16 Andy Estes -webkit-mask-box-image does not draw when layer tree flattening is enabled https://bugs.webkit.org/show_bug.cgi?id=84111 Reviewed by Simon Fraser. No new tests since taking pixel test results with PaintBehaviorFlattenCompositingLayers set is not currently supported. tracks fixing this. When painting mask images, we should take the non-composited path if layers are being flattened. * rendering/InlineFlowBox.cpp: (WebCore::InlineFlowBox::paintMask): * rendering/RenderBox.cpp: (WebCore::RenderBox::paintMaskImages): 2012-04-17 Emil A Eklund Rollout r114404 as it broke a couple of chromium builds. * platform/FractionalLayoutUnit.h: (WebCore::FractionalLayoutUnit::FractionalLayoutUnit): (WebCore::FractionalLayoutUnit::isInBounds): (WebCore): 2012-04-17 Ben Murdoch `localStorage.setItem` can overwrite `localStorage` methods https://bugs.webkit.org/show_bug.cgi?id=30996 Update the JSC and V8 bindings such that if the name of the DOM Storage property being retrieved is a match for a property in the prototype, always return the prototype version. If there is a DOM Storage key of the same name, it can still be retrieved via the getItem method. This prevents storage methods from being accidentally hidden. This brings WebKit behavior in line with the de facto standard implemented by FireFox and IE. Reviewed by Kentaro Hara. Test: storage/domstorage/storage-functions-not-overwritten.html * bindings/js/JSStorageCustom.cpp: (WebCore::JSStorage::nameGetter): * bindings/v8/custom/V8StorageCustom.cpp: (WebCore::V8Storage::namedPropertyGetter): 2012-04-17 Emil A Eklund Fix Chromium/Windows build broken by r114404. * platform/FractionalLayoutUnit.h: 2012-04-17 Kentaro Hara [Performance][V8] Skip Isolate look-up to find StringCache https://bugs.webkit.org/show_bug.cgi?id=84103 Reviewed by Nate Chapin. This patch improves the performance of a lot of DOM attribute getters that return a string. - Improves the performance of Dromaeo/dom-attr.html(element.property) by 27.7%. - Improves the performance of Dromaeo/dom-attr.html(getAttribute) by 10.6%. - Improves the performance of div.id, div.className, div.nodeName, text.nodeValue, text.textContent by 12% -- 21%. The followings are the test results in my Linux desktop. Performance test: Dromaeo/dom-attr.html Total: 674.64runs/s -> 707.03runs/s (+ 4.8%) getAttribute: 1537.60runs/s -> 1700.20runs/s (+10.6%) element.property: 1389.00runs/s -> 1774.20runs/s (+27.7%) setAttribute: 538.88runs/s -> 548.87runs/s (+ 1.9%) element.property = value: 644.07runs/s -> 656.67runs/s (+ 2.0%) element.expando = value: 219.76runs/s -> 207.14runs/s (- 6.8%) element.expando: 578.77runs/s -> 554.67runs/s (- 4.2%) Performance test: https://bugs.webkit.org/attachment.cgi?id=137440 div.id: 30.70ns -> 26.70ns (+15%) div.className: 31.10ns -> 26.40ns (+18%) div.nodeName: 37.70ns -> 33.00ns (+14%) text.nodeValue: 31.40ns -> 25.90ns (+21%) text.textContent: 51.50ns -> 45.90ns (+12%) Previously V8 bindings need to look up an Isolate to find an Isolate-local StringCache. This patch skips the look-up by getting the Isolate from AccessorInfo.GetIsolate() or Arguments.GetIsolate(). No tests. No change in behavior. * bindings/scripts/CodeGeneratorV8.pm: (GenerateNormalAttrGetter): (GenerateFunctionCallString): (NativeToJSValue): * bindings/v8/V8Binding.cpp: (WebCore::getElementStringAttr): * bindings/v8/V8Binding.h: (WebCore::v8ExternalString): Make 'isolate' an optional argument. Ideally we want to make 'isolate' a non-optional argument, but it is difficult to rewrite all v8ExternalString() callers at a breath. We can rewrite them incrementally. (WebCore::v8String): Ditto. (WebCore::v8StringOrNull): Ditto. (WebCore::v8StringOrUndefined): Ditto. (WebCore::v8StringOrFalse): Ditto. * bindings/scripts/test/V8/V8TestEventConstructor.cpp: Updated run-bindings-tests results. (WebCore::TestEventConstructorV8Internal::attr1AttrGetter): (WebCore::TestEventConstructorV8Internal::attr2AttrGetter): * bindings/scripts/test/V8/V8TestInterface.cpp: (WebCore::TestInterfaceV8Internal::supplementalStr1AttrGetter): (WebCore::TestInterfaceV8Internal::supplementalStr2AttrGetter): * bindings/scripts/test/V8/V8TestObj.cpp: (WebCore::TestObjV8Internal::readOnlyStringAttrAttrGetter): (WebCore::TestObjV8Internal::stringAttrAttrGetter): (WebCore::TestObjV8Internal::reflectedStringAttrAttrGetter): (WebCore::TestObjV8Internal::reflectedURLAttrAttrGetter): (WebCore::TestObjV8Internal::reflectedCustomURLAttrAttrGetter): (WebCore::TestObjV8Internal::stringAttrWithGetterExceptionAttrGetter): (WebCore::TestObjV8Internal::stringAttrWithSetterExceptionAttrGetter): (WebCore::TestObjV8Internal::hashAttrGetter): (WebCore::TestObjV8Internal::conditionalMethod1Callback): 2012-04-17 Chris Fleizach Crash in invalid index for _textMarkerForIndex https://bugs.webkit.org/show_bug.cgi?id=84104 Reviewed by Beth Dakin. Test: platform/mac/accessibility/textmarker-for-index-out-of-bounds-crash.html * accessibility/mac/WebAccessibilityObjectWrapper.mm: (-[WebAccessibilityObjectWrapper _textMarkerForIndex:]): 2012-04-17 Jer Noble HTML5 Video Full Screen button broken (looks like white square) https://bugs.webkit.org/show_bug.cgi?id=84101 Reviewed by Dan Bernstein. No new tests; updated platform results which were previously rebaselined. Use the correct CSS keyword for the -webkit-appearance of the full screen button. * css/mediaControls.css: (audio::-webkit-media-controls-fullscreen-button, video::-webkit-media-controls-fullscreen-button): 2012-04-17 Tom Sepez Framesniffing defense is too aggressive. https://bugs.webkit.org/show_bug.cgi?id=83721 Reviewed by James Robinson. The RenderLayer code currently propagates scroll position to parent frames without any cross-origin checks. This gives it a quick origin boundary check that is set by FrameLoader only when performing a fragment navigation. This allows us to safely relax the restriction on not scrolling at load time in FrameLoader since the safe thing will happen later on at scroll time. Test: http/tests/navigation/anchor-frames-same-origin.html * dom/Document.cpp: (WebCore::Document::findUnsafeParentScrollPropagationBoundary): * dom/Document.h: (Document): * loader/FrameLoader.cpp: (WebCore::FrameLoader::finishedParsing): (WebCore::FrameLoader::loadInSameDocument): (WebCore::FrameLoader::scrollToFragmentWithParentBoundary): * loader/FrameLoader.h: (FrameLoader): * page/FrameView.cpp: (WebCore::FrameView::FrameView): (WebCore::FrameView::reset): * page/FrameView.h: (WebCore::FrameView::safeToPropagateScrollToParent): (WebCore::FrameView::setSafeToPropagateScrollToParent): (FrameView): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::scrollRectToVisible): 2012-04-17 Emil A Eklund Add size_t versions of multiplication and division operators to FractionalLayoutUnit https://bugs.webkit.org/show_bug.cgi?id=83848 Reviewed by Julien Chaffraix. Add size_t versions of operator* and operator/ for platforms where there is no ambiguity between unsigned int and size_t. No new tests, no new functionality. * platform/FractionalLayoutUnit.h: (FractionalLayoutUnit): (WebCore::FractionalLayoutUnit::FractionalLayoutUnit): (WebCore::FractionalLayoutUnit::isInBounds): (WebCore): (WebCore::operator*): (WebCore::operator/): 2012-04-17 Kentaro Hara [V8] Add an optional Isolate argument to toV8(). https://bugs.webkit.org/show_bug.cgi?id=84161 Reviewed by Nate Chapin. The final objective is to pass Isolate around in V8 bindings. This patch adds an optional Isolate argument to toV8(). After rewriting all toV8() callers so that they pass Isolate, I will make the Isolate argument non-optional. No tests. No change in behavior. * bindings/scripts/CodeGeneratorV8.pm: Modified as described above. (GenerateHeader): (NativeToJSValue): * bindings/v8/custom/V8BlobCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8CSSRuleCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8CSSStyleSheetCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8CSSValueCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8CanvasPixelArrayCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8DOMStringMapCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8DOMTokenListCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8DOMWindowCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8DataViewCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8DocumentCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8EntryCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8EntrySyncCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8EventCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8Float32ArrayCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8Float64ArrayCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8HTMLCollectionCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8HTMLDocumentCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8HTMLElementCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8IDBAnyCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8IDBKeyCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8ImageDataCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8Int16ArrayCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8Int32ArrayCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8Int8ArrayCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8LocationCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8NamedNodeMapCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8NodeCustom.cpp: (WebCore::toV8Slow): * bindings/v8/custom/V8SVGDocumentCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8SVGElementCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8SVGPathSegCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8ScriptProfileCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8ScriptProfileNodeCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8StyleSheetCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8Uint16ArrayCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8Uint32ArrayCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8Uint8ArrayCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8Uint8ClampedArrayCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8WorkerContextCustom.cpp: (WebCore::toV8): * bindings/scripts/test/V8/V8Float64Array.h: Updated run-bindings-tests results. (WebCore): (WebCore::toV8): * bindings/scripts/test/V8/V8TestActiveDOMObject.h: (WebCore::toV8): * bindings/scripts/test/V8/V8TestCustomNamedGetter.h: (WebCore::toV8): * bindings/scripts/test/V8/V8TestEventConstructor.h: (WebCore::toV8): * bindings/scripts/test/V8/V8TestEventTarget.h: (WebCore::toV8): * bindings/scripts/test/V8/V8TestInterface.h: (WebCore::toV8): * bindings/scripts/test/V8/V8TestMediaQueryListListener.h: (WebCore::toV8): * bindings/scripts/test/V8/V8TestNamedConstructor.h: (WebCore::toV8): * bindings/scripts/test/V8/V8TestNode.h: (WebCore::toV8): * bindings/scripts/test/V8/V8TestObj.h: (WebCore::toV8): * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.h: (WebCore::toV8): 2012-04-17 Yury Semikhatsky Web Inspector: move heap snapshot data grids into their own file https://bugs.webkit.org/show_bug.cgi?id=84160 Moved heap snapshot data grids into a separate file. Reviewed by Pavel Feldman. * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * inspector/compile-front-end.py: * inspector/front-end/DataGrid.js: * inspector/front-end/HeapSnapshotDataGrids.js: Added. (WebInspector.HeapSnapshotSortableDataGrid): (WebInspector.HeapSnapshotSortableDataGrid.prototype.dispose): (WebInspector.HeapSnapshotSortableDataGrid.prototype.resetSortingCache): (WebInspector.HeapSnapshotSortableDataGrid.prototype.sortingChanged.SortByTwoFields): (WebInspector.HeapSnapshotSortableDataGrid.prototype.sortingChanged): (WebInspector.HeapSnapshotSortableDataGrid.prototype.updateVisibleNodes): (WebInspector.HeapSnapshotSortableDataGrid.prototype.onResize): (WebInspector.HeapSnapshotSortableDataGrid.prototype._onScroll): (WebInspector.HeapSnapshotSortableDataGrid.prototype._performSorting): (WebInspector.HeapSnapshotSortableDataGrid.prototype.recursiveSortingEnter): (WebInspector.HeapSnapshotSortableDataGrid.prototype.recursiveSortingLeave): (WebInspector.HeapSnapshotContainmentDataGrid): (WebInspector.HeapSnapshotContainmentDataGrid.prototype._defaultPopulateCount.100.expandRoute.nextStep.else.afterExpand): (WebInspector.HeapSnapshotContainmentDataGrid.prototype._defaultPopulateCount.100.expandRoute): (WebInspector.HeapSnapshotContainmentDataGrid.prototype.setDataSource): (WebInspector.HeapSnapshotContainmentDataGrid.prototype.sortingChanged): (WebInspector.HeapSnapshotRetainmentDataGrid): (WebInspector.HeapSnapshotRetainmentDataGrid.prototype._sortFields): (WebInspector.HeapSnapshotRetainmentDataGrid.prototype.reset): (WebInspector.HeapSnapshotConstructorsDataGrid): (WebInspector.HeapSnapshotConstructorsDataGrid.prototype._defaultPopulateCount.100._sortFields): (WebInspector.HeapSnapshotConstructorsDataGrid.prototype.setDataSource): (WebInspector.HeapSnapshotConstructorsDataGrid.prototype.populateChildren): (WebInspector.HeapSnapshotConstructorsDataGrid.prototype._filterSelectIndexChanged): (WebInspector.HeapSnapshotDiffDataGrid): (WebInspector.HeapSnapshotDiffDataGrid.prototype._defaultPopulateCount.50._sortFields): (WebInspector.HeapSnapshotDiffDataGrid.prototype.setDataSource): (WebInspector.HeapSnapshotDiffDataGrid.prototype._baseProfileIndexChanged): (WebInspector.HeapSnapshotDiffDataGrid.prototype.setBaseDataSource): (WebInspector.HeapSnapshotDiffDataGrid.prototype.populateChildren.baseAggregatesReceived.aggregatesReceived.addNodeIfNonZeroDiff): (WebInspector.HeapSnapshotDiffDataGrid.prototype.populateChildren.baseAggregatesReceived.aggregatesReceived): (WebInspector.HeapSnapshotDiffDataGrid.prototype.populateChildren): (WebInspector.HeapSnapshotDominatorsDataGrid): (WebInspector.HeapSnapshotDominatorsDataGrid.prototype._defaultPopulateCount.25.setDataSource): (WebInspector.HeapSnapshotDominatorsDataGrid.prototype.sortingChanged): * inspector/front-end/HeapSnapshotView.js: * inspector/front-end/WebKit.qrc: * inspector/front-end/inspector.html: 2012-04-17 Vivek Galatage Script make_names.pl should generate consistent .h & .cpp files https://bugs.webkit.org/show_bug.cgi?id=84140 Reviewed by Kentaro Hara. Added a newline character and removed ';' after the DEFINE_GLOBAL No test cases required for this change. * dom/make_names.pl: (printNamesCppFile): 2012-04-17 Aaron Colwell Add webkitSourceAddId() & webkitSourceRemoveId() to HTMLMediaElement and propagate calls to the MediaPlayerPrivate interface. These are needed to bring the Media Source implementation up to date with the new 0.4 version of the Media Source spec. http://html5-mediasource-api.googlecode.com/svn/tags/0.4/draft-spec/mediasource-draft-spec.html https://bugs.webkit.org/show_bug.cgi?id=83616 Reviewed by Eric Carlson, Darin Fisher. Test: http/tests/media/media-source/webm/video-media-source-add-and-remove-ids.html * html/HTMLMediaElement.cpp: (WebCore): (WebCore::HTMLMediaElement::isValidSourceId): (WebCore::HTMLMediaElement::webkitSourceAddId): (WebCore::HTMLMediaElement::webkitSourceRemoveId): (WebCore::HTMLMediaElement::setSourceState): * html/HTMLMediaElement.h: (HTMLMediaElement): * html/HTMLMediaElement.idl: * platform/graphics/MediaPlayer.cpp: (WebCore::NullMediaPlayerPrivate::sourceAddId): (WebCore::NullMediaPlayerPrivate::sourceRemoveId): (WebCore): (WebCore::MediaPlayer::sourceAddId): (WebCore::MediaPlayer::sourceRemoveId): * platform/graphics/MediaPlayer.h: * platform/graphics/MediaPlayerPrivate.h: (WebCore::MediaPlayerPrivateInterface::sourceAddId): (WebCore::MediaPlayerPrivateInterface::sourceRemoveId): 2012-04-17 Alexander Pavlov Web Inspector: [CRASH] InspectorDOMAgent::didInsertDOMNode() on page reload with open Inspector https://bugs.webkit.org/show_bug.cgi?id=84154 Check that a node inserted actually has a parent. Reviewed by Yury Semikhatsky. Test: inspector/elements/elements-panel-reload-assert.html * inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::didInsertDOMNode): 2012-04-17 Dana Jansens [chromium] Consistent checking for clipped rects when we need the computed result enclosed within the real result https://bugs.webkit.org/show_bug.cgi?id=83543 Reviewed by Adrienne Walker. It should not be possible to make a rect in layer space that is clipped by the camera but for which the screen space transform gives a rectilinear output. But use consistent methods for checking that the result remains enclosed within the actual pixels. One day when clipped is true, we can find an interior axis-aligned rect within the clipped result, and checking clipped explicitly makes this more clear. Covered by existing tests. * platform/graphics/chromium/cc/CCOcclusionTracker.cpp: (WebCore::computeOcclusionBehindLayer): (WebCore::::markOccludedBehindLayer): 2012-04-17 Vsevolod Vlasov Web Inspector: Suggest box appears after the command was executed in console sometimes. https://bugs.webkit.org/show_bug.cgi?id=84148 Reviewed by Pavel Feldman. TextPrompt.complete() requests completions asynchronously, this change adds a flag that informs TextPrompt._completionsReady() whether completions should still be shown. * inspector/front-end/TextPrompt.js: (WebInspector.TextPrompt.prototype.clearAutoComplete): (WebInspector.TextPrompt.prototype.complete): (WebInspector.TextPrompt.prototype._completionsReady): 2012-04-17 Yong Li REGRESSION (r105453): Crash when handling touch events https://bugs.webkit.org/show_bug.cgi?id=81958 Reviewed by Antonio Gomes. Always perform sanity checks when handling every touch point because the node and document may have been destroyed or detached. ManualTests/touch-stale-iframe-crash.html added. (DumpRenderTree doesn't support transiting touch states in one shot yet) * page/EventHandler.cpp: (WebCore::EventHandler::handleTouchEvent): 2012-04-17 Allan Sandfeld Jensen Asserts in XMLHttpRequestProgressEventThrottle https://bugs.webkit.org/show_bug.cgi?id=81506 Reviewed by Julien Chaffraix. The asserts were incorrectly triggered because suspending active DOM objects (which suspends the XMLHttpRequestProgressEventThrottle) doesn't stop JavaScript from running or suspend any running loader we may have. The previous code would assume those 2 cases were impossible. When XmlHttpRequest::open is called or data is received while the XmlHttpRequest object is suspended the object may attempt to dispatch events. This patch defers these events until the object is resumed. Progress events are coalesced similar to normal throttling, and readystate-change events are coalesced to avoid identical events emitted right after eachother. On resume the events are dispatched after a timer to avoid interfering with ScriptExecutionContext which is iterating over suspended objects. Test: fast/events/pagehide-xhr-open.html * xml/XMLHttpRequestProgressEventThrottle.cpp: (WebCore::XMLHttpRequestProgressEventThrottle::XMLHttpRequestProgressEventThrottle): (WebCore::XMLHttpRequestProgressEventThrottle::dispatchProgressEvent): (WebCore::XMLHttpRequestProgressEventThrottle::dispatchEvent): (WebCore::XMLHttpRequestProgressEventThrottle::flushProgressEvent): (WebCore::XMLHttpRequestProgressEventThrottle::dispatchDeferredEvents): (WebCore::XMLHttpRequestProgressEventThrottle::fired): (WebCore::XMLHttpRequestProgressEventThrottle::suspend): (WebCore::XMLHttpRequestProgressEventThrottle::resume): * xml/XMLHttpRequestProgressEventThrottle.h: (XMLHttpRequestProgressEventThrottle): 2012-04-16 Vsevolod Vlasov Web Inspector: [Chromium] Crash when inspecting empty IndexedDB object store. https://bugs.webkit.org/show_bug.cgi?id=84035 Reviewed by Pavel Feldman. Added a check that m_idbCursor is not null before calling postSuccessHandlerCallback() on it. * inspector/InspectorIndexedDBAgent.cpp: (WebCore): 2012-04-17 Pavel Feldman Web Inspector: [regression r112413]content scripts tree outline is not added to the tab. https://bugs.webkit.org/show_bug.cgi?id=84146 Reviewed by Vsevolod Vlasov. Adding the tree to the container. * inspector/front-end/ScriptsNavigator.js: (WebInspector.ScriptsNavigator): 2012-04-17 Mariusz Grzegorczyk [EFL][WK2] Fix build break when CONTEXT_MENUS is disabled. https://bugs.webkit.org/show_bug.cgi?id=83285 Reviewed by Ryosuke Niwa. * platform/ContextMenuItem.h: Remove macro around enums - needed by InjectedBundle. (WebCore): * platform/Widget.h: Remove namespace WebCore for PlatformPageClient typedef. 2012-04-17 Kent Tamura Introduce an internal feature for a fixed placeholder https://bugs.webkit.org/show_bug.cgi?id=84009 Reviewed by Hajime Morita. This change adds a framework to support fixed placeholder string for textfield-like without the palceholder attribute support. This doesn't change any behavior of input types which support the 'placeholder' attribute. According to the standard, doesn't support the 'placeholder' attribute. However it is a kind of text field in WebKit platforms with ENABLE_CALENDAR_PICKER, and we may show something useful information as the default placeholder. No new tests because of no behavior changes. * html/HTMLTextFormControlElement.h: (HTMLTextFormControlElement): Make isPlaceholderEmpty() virtual. * html/HTMLInputElement.h: (HTMLInputElement): Overrides isPlaceholderEmpty(). * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::isPlaceholderEmpty): Check InputType::defaultPlaceholder() if InputType::usesFixedPlaceholder(). * html/InputType.cpp: (WebCore::InputType::usesFixedPlaceholder): Added. Returns false. (WebCore::InputType::fixedPlaceholder): Added. Returns a null string. * html/InputType.h: (InputType): Add usesFixedPlaceholder() and fixedPlaceholder(). * html/TextFieldInputType.cpp: (WebCore::TextFieldInputType::updatePlaceholderText): Uses fixedPlaceholder() instead of strippedPlaceholder() if usesFixedPlaceholder(). 2012-04-17 Kent Tamura Move some code of LocalizedNumberICU.cpp to ICULocale.cpp https://bugs.webkit.org/show_bug.cgi?id=84128 Reviewed by Hajime Morita. No new tests. No behavior change. * WebCore.gypi: Add ICULocale.cpp * platform/text/ICULocale.cpp: Added. Move some code from LocalizedNumberICU.cpp * platform/text/ICULocale.h: (ICULocale): Add currentLocale(). * platform/text/LocalizedNumberICU.cpp: (WebCore::convertToLocalizedNumber): Use ICULocale::currentLocale(). (WebCore::convertFromLocalizedNumber): ditto. 2012-04-17 Bang Kwang min [Plugins] delete ws_info regardless of window mode. https://bugs.webkit.org/show_bug.cgi?id=83004 Reviewed by Simon Hausmann. m_npWindow.ws_info should be deleted even if plugin run as windowless mode to remove memory leak. Every plugin works well after this patch without any crash. Additionally, change casting syntax to C++ style. * plugins/PluginView.cpp: (WebCore::PluginView::stop): 2012-04-17 Kent Tamura Calendar Picker: Support RTL layout https://bugs.webkit.org/show_bug.cgi?id=83668 Reviewed by Hajime Morita. Manual test: ManualTests/forms/calendar-picker.html * Resources/calendarPicker.js: (layout): If params.isRTL, add dir=rtl to the body. (DaysTable.prototype._handleKey): Reverse Left and Right cursor keys if RTL. * html/shadow/CalendarPickerElement.cpp: (WebCore::addProperty): Add addProperty() with a bool value. (WebCore::CalendarPickerElement::writeDocument): Check the direction of the first character of localized January label, and pass it as isRTL property. 2012-04-16 Carlos Garcia Campos Unreviewed. Fix make distcheck issues. * GNUmakefile.list.am: Add missing files. 2012-04-16 Hajime Morrita insertedIntoDocument and insertedIntoTree should be unitifed. https://bugs.webkit.org/show_bug.cgi?id=82701 Reviewed by Ryosuke Niwa. Both Node::insertedIntoTree() and Node::insertedIntoDocument() are served as lifecycle callbacks which are invoked when a node is inserted into its new parent. There are also removedFromTree() and removedFromDocument() respectively. Considering that this pair of virtual functions are laid onto the hot path, it's worth merging them into one, to gain some speedup. Such unification could clarify the semantics as well. This change makes following change to merge these functions. - pulling the tree traversal out from ContainerNode to ChildNodeInsertionNotifier. - letting new Node::insertInto() do the job for its own, but not for its children and - Pass the parent of each insertion root as a parameter of insertedInto(). This root node can tell inserted node where it is inserted, specifically whetehr the insertion is to the document or not. Same pattern is also applied to Node::removedFromDocument() and Node::removedFromTree(), which are factored to Node::removedFrom() and ChildNodeRemovalNotifier respectively. Speed up on Dromaeo/dom-modify.html is about 2%. Further speed-up by de-virtulization would be possible. Caveat: There is possible situation where a node need to invoke insertedInto() after its children is nofitied, instead of before that. It was represented naturally with previous traversal-by-ContainerNode pattern, but is no longer simple with this new external traversal. To support this scenario, we introduced the InsertionNotificationRequest as a return value of insertedInto() and a supplemental hook Node::didNotifyDescendantInseretions(). See for example HTMLFormElement.cpp to learn how it works. No new tests. Covered by existing tests. * CMakeLists.txt: * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * WebCore.xcodeproj/project.pbxproj: * dom/ContainerNode.cpp: (WebCore::ContainerNode::parserInsertBefore): (WebCore::ContainerNode::removeChild): (WebCore::ContainerNode::parserRemoveChild): (WebCore::ContainerNode::removeChildren): (WebCore::ContainerNode::parserAddChild): (WebCore::updateTreeAfterInsertion): * dom/ContainerNode.h: (ContainerNode): (WebCore::Node::highestAncestor): (WebCore): * dom/ContainerNodeAlgorithms.cpp: Added. (WebCore): (WebCore::ChildNodeInsertionNotifier::notifyDescendantInsertedIntoDocument): (WebCore::ChildNodeInsertionNotifier::notifyDescendantInsertedIntoTree): (WebCore::ChildNodeRemovalNotifier::notifyDescendantRemovedFromDocument): (WebCore::ChildNodeRemovalNotifier::notifyDescendantRemovedFromTree): * dom/ContainerNodeAlgorithms.h: (ChildNodeInsertionNotifier): (WebCore::ChildNodeInsertionNotifier::ChildNodeInsertionNotifier): (WebCore): (ChildNodeRemovalNotifier): (WebCore::ChildNodeRemovalNotifier::ChildNodeRemovalNotifier): (WebCore::removeAllChildrenInContainer): (WebCore::appendChildToContainer): (Private): (WebCore::ChildNodeInsertionNotifier::notifyNodeInsertedIntoDocument): (WebCore::ChildNodeInsertionNotifier::notifyNodeInsertedIntoTree): (WebCore::ChildNodeInsertionNotifier::notifyInsertedIntoDocument): (WebCore::ChildNodeInsertionNotifier::notify): (WebCore::ChildNodeRemovalNotifier::notifyNodeRemovedFromDocument): (WebCore::ChildNodeRemovalNotifier::notifyNodeRemovedFromTree): (WebCore::ChildNodeRemovalNotifier::notify): * dom/DOMAllInOne.cpp: * dom/DocumentType.cpp: (WebCore::DocumentType::insertedInto): (WebCore::DocumentType::removedFrom): * dom/DocumentType.h: (DocumentType): * dom/Element.cpp: (WebCore::Element::insertedInto): (WebCore::Element::removedFrom): * dom/Element.h: (Element): * dom/Node.cpp: (WebCore::Node::insertedInto): (WebCore::Node::removedFrom): * dom/Node.h: (Node): (WebCore::Node::didNotifyDescendantInseretions): * dom/ProcessingInstruction.cpp: (WebCore::ProcessingInstruction::insertedInto): (WebCore::ProcessingInstruction::removedFrom): * dom/ProcessingInstruction.h: (ProcessingInstruction): * dom/ScriptElement.cpp: (WebCore::ScriptElement::insertedInto): * dom/ScriptElement.h: (WebCore): (ScriptElement): * dom/ShadowTree.cpp: (WebCore::ShadowTree::addShadowRoot): (WebCore::ShadowTree::removeAllShadowRoots): * dom/ShadowTree.h: (ShadowTree): (ShadowRootVector): (WebCore::ShadowRootVector::ShadowRootVector): (WebCore): * html/FormAssociatedElement.cpp: (WebCore::FormAssociatedElement::insertedInto): (WebCore::FormAssociatedElement::removedFrom): (WebCore::FormAssociatedElement::formRemovedFromTree): * html/FormAssociatedElement.h: (FormAssociatedElement): * html/HTMLBaseElement.cpp: (WebCore::HTMLBaseElement::insertedInto): (WebCore::HTMLBaseElement::removedFrom): * html/HTMLBaseElement.h: (HTMLBaseElement): * html/HTMLBodyElement.cpp: (WebCore::HTMLBodyElement::insertedInto): (WebCore::HTMLBodyElement::didNotifyDescendantInseretions): * html/HTMLBodyElement.h: (HTMLBodyElement): * html/HTMLFormControlElement.cpp: (WebCore::HTMLFormControlElement::insertedInto): (WebCore::HTMLFormControlElement::removedFrom): * html/HTMLFormControlElement.h: (HTMLFormControlElement): * html/HTMLFormElement.cpp: (WebCore::HTMLFormElement::insertedInto): (WebCore::HTMLFormElement::didNotifyDescendantInseretions): (WebCore::HTMLFormElement::removedFrom): * html/HTMLFormElement.h: (HTMLFormElement): * html/HTMLFrameElementBase.cpp: (WebCore::HTMLFrameElementBase::insertedInto): (WebCore): (WebCore::HTMLFrameElementBase::didNotifyDescendantInseretions): * html/HTMLFrameElementBase.h: (HTMLFrameElementBase): * html/HTMLFrameSetElement.cpp: (WebCore::HTMLFrameSetElement::insertedInto): (WebCore::HTMLFrameSetElement::removedFrom): * html/HTMLFrameSetElement.h: (HTMLFrameSetElement): * html/HTMLIFrameElement.cpp: (WebCore::HTMLIFrameElement::insertedInto): (WebCore::HTMLIFrameElement::removedFrom): * html/HTMLIFrameElement.h: (HTMLIFrameElement): * html/HTMLImageElement.cpp: (WebCore::HTMLImageElement::insertedInto): (WebCore::HTMLImageElement::removedFrom): * html/HTMLImageElement.h: (HTMLImageElement): * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::insertedInto): (WebCore::HTMLInputElement::removedFrom): * html/HTMLInputElement.h: * html/HTMLLinkElement.cpp: (WebCore::HTMLLinkElement::insertedInto): (WebCore::HTMLLinkElement::removedFrom): * html/HTMLLinkElement.h: (HTMLLinkElement): * html/HTMLMapElement.cpp: (WebCore::HTMLMapElement::insertedInto): (WebCore::HTMLMapElement::removedFrom): * html/HTMLMapElement.h: (HTMLMapElement): * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::insertedInto): (WebCore::HTMLMediaElement::removedFrom): * html/HTMLMediaElement.h: (HTMLMediaElement): * html/HTMLMetaElement.cpp: (WebCore::HTMLMetaElement::insertedInto): * html/HTMLMetaElement.h: (HTMLMetaElement): * html/HTMLObjectElement.cpp: (WebCore::HTMLObjectElement::insertedInto): (WebCore::HTMLObjectElement::removedFrom): * html/HTMLObjectElement.h: (HTMLObjectElement): * html/HTMLOptionElement.cpp: (WebCore::HTMLOptionElement::insertedInto): * html/HTMLOptionElement.h: (HTMLOptionElement): * html/HTMLQuoteElement.cpp: (WebCore::HTMLQuoteElement::insertedInto): * html/HTMLQuoteElement.h: (HTMLQuoteElement): * html/HTMLScriptElement.cpp: (WebCore::HTMLScriptElement::insertedInto): * html/HTMLScriptElement.h: (HTMLScriptElement): * html/HTMLSelectElement.cpp: (WebCore::HTMLSelectElement::insertedInto): * html/HTMLSelectElement.h: * html/HTMLSourceElement.cpp: (WebCore::HTMLSourceElement::insertedInto): * html/HTMLSourceElement.h: (HTMLSourceElement): * html/HTMLStyleElement.cpp: (WebCore::HTMLStyleElement::insertedInto): (WebCore::HTMLStyleElement::removedFrom): * html/HTMLStyleElement.h: (HTMLStyleElement): * html/HTMLTextFormControlElement.cpp: (WebCore::HTMLTextFormControlElement::insertedInto): * html/HTMLTextFormControlElement.h: * html/HTMLTitleElement.cpp: (WebCore::HTMLTitleElement::insertedInto): (WebCore::HTMLTitleElement::removedFrom): * html/HTMLTitleElement.h: (HTMLTitleElement): * html/HTMLTrackElement.cpp: (WebCore::HTMLTrackElement::insertedInto): * html/HTMLTrackElement.h: (HTMLTrackElement): * mathml/MathMLMathElement.cpp: (WebCore::MathMLMathElement::insertedInto): * mathml/MathMLMathElement.h: (MathMLMathElement): * svg/SVGElement.cpp: (WebCore::SVGElement::removedFrom): * svg/SVGElement.h: (SVGElement): * svg/SVGFEImageElement.cpp: (WebCore::SVGFEImageElement::insertedInto): (WebCore::SVGFEImageElement::removedFrom): * svg/SVGFEImageElement.h: (SVGFEImageElement): * svg/SVGFontFaceElement.cpp: (WebCore::SVGFontFaceElement::insertedInto): (WebCore::SVGFontFaceElement::removedFrom): * svg/SVGFontFaceElement.h: (SVGFontFaceElement): * svg/SVGFontFaceUriElement.cpp: (WebCore::SVGFontFaceUriElement::insertedInto): * svg/SVGFontFaceUriElement.h: (SVGFontFaceUriElement): * svg/SVGGlyphElement.cpp: (WebCore::SVGGlyphElement::insertedInto): (WebCore::SVGGlyphElement::removedFrom): * svg/SVGGlyphElement.h: (SVGGlyphElement): * svg/SVGHKernElement.cpp: (WebCore::SVGHKernElement::insertedInto): (WebCore::SVGHKernElement::removedFrom): * svg/SVGHKernElement.h: (SVGHKernElement): * svg/SVGImageElement.cpp: (WebCore::SVGImageElement::insertedInto): * svg/SVGImageElement.h: (SVGImageElement): * svg/SVGSVGElement.cpp: (WebCore::SVGSVGElement::insertedInto): (WebCore::SVGSVGElement::removedFrom): * svg/SVGSVGElement.h: (SVGSVGElement): * svg/SVGScriptElement.cpp: (WebCore::SVGScriptElement::insertedInto): * svg/SVGScriptElement.h: (SVGScriptElement): * svg/SVGStyleElement.cpp: (WebCore::SVGStyleElement::insertedInto): (WebCore::SVGStyleElement::removedFrom): * svg/SVGStyleElement.h: (SVGStyleElement): * svg/SVGStyledElement.cpp: (WebCore::SVGStyledElement::insertedInto): (WebCore::SVGStyledElement::removedFrom): (WebCore::SVGStyledElement::updateRelativeLengthsInformation): * svg/SVGStyledElement.h: (SVGStyledElement): * svg/SVGTRefElement.cpp: (WebCore::SVGTRefElement::buildPendingResource): (WebCore::SVGTRefElement::insertedInto): (WebCore::SVGTRefElement::removedFrom): * svg/SVGTRefElement.h: (SVGTRefElement): * svg/SVGTextPathElement.cpp: (WebCore::SVGTextPathElement::insertedInto): * svg/SVGTextPathElement.h: * svg/SVGTitleElement.cpp: (WebCore::SVGTitleElement::insertedInto): (WebCore::SVGTitleElement::removedFrom): * svg/SVGTitleElement.h: (SVGTitleElement): * svg/SVGUseElement.cpp: (WebCore::SVGUseElement::insertedInto): (WebCore::SVGUseElement::removedFrom): * svg/SVGUseElement.h: (SVGUseElement): * svg/SVGVKernElement.cpp: (WebCore::SVGVKernElement::insertedInto): (WebCore::SVGVKernElement::removedFrom): * svg/SVGVKernElement.h: (SVGVKernElement): * svg/animation/SVGSMILElement.cpp: (WebCore::SVGSMILElement::insertedInto): (WebCore::SVGSMILElement::removedFrom): * svg/animation/SVGSMILElement.h: (SVGSMILElement): 2012-04-16 David Barr Stack overflow in CSS parser caused by recursive stylesheet import https://bugs.webkit.org/show_bug.cgi?id=83545 Reviewed by Ryosuke Niwa. Test: http/tests/css/css-imports-redirect-cycle.html * css/CSSImportRule.cpp: (WebCore::StyleRuleImport::requestStyleSheet): 2012-04-16 Kent Tamura Rename LocalizedNumberICU.h to ICULocale.h https://bugs.webkit.org/show_bug.cgi?id=84119 Reviewed by Kentaro Hara. LocalizedNumberICU.h contains only ICULocale class. It should be named as ICULocale.h. We're going to move some functions in LocalizedDateICU.cpp and LocalizedCalendarICU.cpp to ICULocale, and add unit tests for them. * WebCore.gypi: Rename LocalizedNumberICU.h to ICULocale.h * platform/text/ICULocale.h: Renamed from Source/WebCore/platform/text/LocalizedNumberICU.h. * platform/text/LocalizedNumberICU.cpp: Rename LocalizedNumberICU.h to ICULocale.h 2012-04-16 James Robinson [chromium] Move paintRenderedResultsToCanvas code into DrawingBuffer https://bugs.webkit.org/show_bug.cgi?id=84066 Reviewed by Adrienne Walker. WebGLLayerChromium used to be responsible for the readback path for software painting WebGL canvases (for printing, etc), but this path no longer has any compositor interaction. This moves the code into DrawingBufferChromium which is responsible for managing the front / back buffers for WebGL. * platform/graphics/chromium/DrawingBufferChromium.cpp: (WebCore::DrawingBuffer::paintCompositedResultsToCanvas): * platform/graphics/chromium/WebGLLayerChromium.cpp: * platform/graphics/chromium/WebGLLayerChromium.h: (WebGLLayerChromium): 2012-04-16 Dana Jansens [chromium] Expose compositor filters to Aura through WebLayer https://bugs.webkit.org/show_bug.cgi?id=80054 Reviewed by James Robinson. Adds WebFilterOperation that wraps WebCore::FilterOperation and WebFilterOperations that wraps WebCore::FilterOperations. We add support for most of the FilterOperation subclasses, and allow the user to set the WebFilterOperations for both layer content filters and background filters. * WebCore.gypi: * platform/chromium/support/WebFilterOperation.cpp: Added. (WebKit): (WebKit::WebBasicColorMatrixFilterOperation::toFilterOperation): (WebKit::WebBasicComponentTransferFilterOperation::toFilterOperation): (WebKit::WebBlurFilterOperation::toFilterOperation): (WebKit::WebDropShadowFilterOperation::toFilterOperation): * platform/chromium/support/WebFilterOperations.cpp: Added. (WebKit): (WebKit::WebFilterOperations::WebFilterOperations): (WebKit::WebFilterOperations::append): (WebKit::WebFilterOperations::clear): (WebKit::WebFilterOperations::toFilterOperations): 2012-04-16 Andrei Burago Auto-sized frames may be taller than expected https://bugs.webkit.org/show_bug.cgi?id=84106 Reviewed by David Levin. No new tests. The repro steps require using Chrome notifications on Win. * page/FrameView.cpp: (WebCore::FrameView::autoSizeIfEnabled): 2012-04-13 James Robinson [chromium] Expose WebVideoLayer to Platform API and port WebMediaPlayerClientImpl to using it https://bugs.webkit.org/show_bug.cgi?id=83963 Reviewed by Adrienne Walker. Converts VideoLayerChromium / CCVideoLayerImpl to use a Platform WebVideoFrameProvider interface instead of a WebCore VideoFrameProvider. * WebCore.gypi: * platform/graphics/chromium/VideoLayerChromium.cpp: (WebCore::VideoLayerChromium::create): (WebCore::VideoLayerChromium::VideoLayerChromium): * platform/graphics/chromium/VideoLayerChromium.h: (WebKit): (WebCore): (VideoLayerChromium): * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp: (WebCore::CCVideoLayerImpl::CCVideoLayerImpl): * platform/graphics/chromium/cc/CCVideoLayerImpl.h: (WebCore::CCVideoLayerImpl::create): (CCVideoLayerImpl): 2012-04-16 Takashi Sakamoto [Shadow DOM] InsertionPoint should have isActive() member function. https://bugs.webkit.org/show_bug.cgi?id=82010 Reviewed by Hajime Morita. This patch adds isActive public member function to InsertionPoint and makes InsertionPoint elements consider whether active or not. If an InsertionPoint is inactive, the element is not shadow boundary and is needed to be rendered. c.f. https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html#dfn-active-insertion-point Test: update existing tests, i.e. LayoutTests/fast/dom/shadow/shadow-contents-fallback-dynamic.html and LayoutTests/fast/dom/shadow/shadow-contents-fallback.html * html/shadow/InsertionPoint.cpp: (WebCore::InsertionPoint::isActive): A new public method for checking whether an insertion point is active or inactive. If active, returns true. Otherwise, false. (WebCore::InsertionPoint::isShadowBoundary): Make the method consider whether an insertin point is active or inactive. (WebCore::InsertionPoint::rendererIsNeeded): Changed to return true If an insertion point is inactive. (WebCore::InsertionPoint::attach): Changed to call only HTMLElement::attach If an insertion point is inactive. (WebCore::InsertionPoint::detach): Changed to call only HTMLElement::detach If an insertion point is inactive. * html/shadow/InsertionPoint.h: (InsertionPoint): Added isActive public method. * dom/NodeRenderingContext.cpp: (WebCore::NodeRenderingContext::NodeRenderingContext): Changed to take into account an insertion point's activeness when parent is an insertion point. (WebCore::NodeRenderingContext::firstRendererOf): (WebCore::NodeRenderingContext::lastRendererOf): Changed to take into account an insertion point's activeness. 2012-04-16 MORITA Hajime Type tags in NodeFlags could be compressed https://bugs.webkit.org/show_bug.cgi?id=79299 Because existing node flags which indicate the class of each node are mutually exclusive, these flags can be represented as a enum. This patch introduces Node::NodeTypeTag to turn these flags into a enum, and embeds it into Node::m_nodeFlags. Reviewed by Antti Koivisto. No new tests. No bahavior change. * dom/Node.cpp: (WebCore): * dom/Node.h: (WebCore): (Node): (WebCore::Node::typeTag): (WebCore::Node::parentNode): (WebCore::Node::parentNodeGuaranteedHostFree): (WebCore::Node::isContainerNode): (WebCore::Node::isElementNode): (WebCore::Node::isStyledElement): (WebCore::Node::isTextNode): (WebCore::Node::isHTMLElement): (WebCore::Node::isSVGElement): (WebCore::Node::isShadowRoot): 2012-04-16 Sheriff Bot Unreviewed, rolling out r114285. http://trac.webkit.org/changeset/114285 https://bugs.webkit.org/show_bug.cgi?id=84107 broke fast/media/media-query-list-08.html in Mac (Requested by andersca on #webkit). * dom/Document.cpp: (WebCore::Document::styleSelectorChanged): * dom/Document.h: (Document): * page/FrameView.cpp: (WebCore::FrameView::layout): 2012-04-16 Nate Chapin Remove unused variable CachedResourceLoader::m_loadFinishing https://bugs.webkit.org/show_bug.cgi?id=84100 Reviewed by Alexey Proskuryakov. No new tests, removing dead code. * loader/cache/CachedResourceLoader.cpp: (WebCore::CachedResourceLoader::CachedResourceLoader): (WebCore::CachedResourceLoader::loadDone): (WebCore::CachedResourceLoader::decrementRequestCount): * loader/cache/CachedResourceLoader.h: (CachedResourceLoader): (WebCore::CachedResourceLoader::requestCount): 2012-04-16 Andreas Kling Remove contextStyleSheet argument from CSSValuePool::createFontFaceValue(). Reviewed by Antti Koivisto. Remove the 'context style sheet' argument to value parsing. It was only ever used to grab at the CSSValuePool back when they were per-Document. * css/CSSParser.h: * css/CSSParser.cpp: (WebCore::CSSParser::parseFontFaceValue): * css/CSSValuePool.h: * css/CSSValuePool.cpp: (WebCore::CSSValuePool::createFontFaceValue): * html/HTMLFontElement.cpp: (WebCore::HTMLFontElement::collectStyleForAttribute): 2012-04-16 Dana Jansens [chromium] Consistent checking for clipped rects when we need the computed result enclosed within the real result https://bugs.webkit.org/show_bug.cgi?id=83543 Reviewed by Adrienne Walker. It should not be possible to make a rect in layer space that is clipped by the camera but for which the screen space transform gives a rectilinear output. But use consistent methods for checking that the result remains enclosed within the actual pixels. One day when clipped is true, we can find an interior axis-aligned rect within the clipped result, and checking clipped explicitly makes this more clear. Covered by existing tests. * platform/graphics/chromium/cc/CCOcclusionTracker.cpp: (WebCore::computeOcclusionBehindLayer): (WebCore::::markOccludedBehindLayer): 2012-04-16 Erik Arvidsson [V8] Don't delete the per context data until the V8IsolatedContext is deleted https://bugs.webkit.org/show_bug.cgi?id=83831 Reviewed by Nate Chapin. Test: http/tests/security/isolatedWorld/context-destroy.html * bindings/v8/V8IsolatedContext.cpp: (WebCore::V8IsolatedContext::destroy): 2012-04-16 Greg Billock Add V8 code generation support for MessagePortArray attributes. https://bugs.webkit.org/show_bug.cgi?id=83943 Reviewed by Kentaro Hara. * bindings/scripts/CodeGeneratorV8.pm: (GenerateNormalAttrGetter): * bindings/scripts/IDLAttributes.txt: * bindings/scripts/test/CPP/WebDOMTestSerializedScriptValueInterface.cpp: (WebDOMTestSerializedScriptValueInterface::ports): * bindings/scripts/test/CPP/WebDOMTestSerializedScriptValueInterface.h: (WebDOMTestSerializedScriptValueInterface): * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.cpp: (webkit_dom_test_serialized_script_value_interface_get_property): (webkit_dom_test_serialized_script_value_interface_class_init): (webkit_dom_test_serialized_script_value_interface_get_ports): * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.h: * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp: (WebCore): (WebCore::jsTestSerializedScriptValueInterfacePorts): * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h: (WebCore): * bindings/scripts/test/ObjC/DOMTestSerializedScriptValueInterface.h: * bindings/scripts/test/ObjC/DOMTestSerializedScriptValueInterface.mm: (-[DOMTestSerializedScriptValueInterface ports]): * bindings/scripts/test/TestSerializedScriptValueInterface.idl: * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp: (WebCore::TestSerializedScriptValueInterfaceInternal::portsAttrGetter): (TestSerializedScriptValueInterfaceInternal): (WebCore): 2012-04-16 Xiaomei Ji platform/graphics/skia/GlyphPageTreeNodeSkia.cpp mis-use 'continue' for 'break' https://bugs.webkit.org/show_bug.cgi?id=83521 Reviewed by David Levin. No functionality change, so no new tests. * platform/graphics/skia/GlyphPageTreeNodeSkia.cpp: (WebCore::GlyphPage::fill): 2012-04-16 Levi Weintraub Make borderBoxRect sub-pixel precise and add a pixel snapped version https://bugs.webkit.org/show_bug.cgi?id=84063 Reviewed by Eric Seidel. In an effort to prevent misuse, we previously decided to have borderBoxRect return a pixel-snapped IntRect. This is because borderBoxRect returns a rect that's positioned at (0,0), and therefore won't snap to the same size as the element it's covering. There are a couple uses of borderBoxRect that don't pixel snap the values and require sub-pixel precision. This patch adds a pixelSnappedBorderBoxRect that makes the snapping explicit, and moves uses that would otherwise pixel snap the rect to this version to avoid producing a rect of the incorrect size. For details about pixel snapping with LayoutUnits, please see https://trac.webkit.org/wiki/LayoutUnit No new tests. No change in behavior. * html/shadow/TextControlInnerElements.cpp: (WebCore::SpinButtonElement::defaultEventHandler): * rendering/RenderBlock.cpp: (WebCore::RenderBlock::addVisualOverflowFromTheme): * rendering/RenderBox.h: (WebCore::RenderBox::borderBoxRect): (WebCore::RenderBox::pixelSnappedBorderBoxRect): (WebCore::RenderBox::borderBoundingBox): (WebCore::RenderBox::hasVisualOverflow): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::scrollCornerRect): (WebCore::RenderLayer::scrollCornerAndResizerRect): (WebCore::RenderLayer::horizontalScrollbarStart): (WebCore::RenderLayer::positionOverflowControls): (WebCore::RenderLayer::paintResizer): (WebCore::RenderLayer::hitTestOverflowControls): * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry): (WebCore::RenderLayerBacking::startAnimation): (WebCore::RenderLayerBacking::startTransition): * rendering/RenderTable.cpp: (WebCore::RenderTable::addOverflowFromChildren): * rendering/RenderThemeMac.mm: (WebCore::RenderThemeMac::paintSearchFieldCancelButton): (WebCore::RenderThemeMac::paintSearchFieldResultsDecoration): (WebCore::RenderThemeMac::paintSearchFieldResultsButton): * rendering/svg/RenderSVGRoot.cpp: (WebCore::RenderSVGRoot::paintReplaced): (WebCore::RenderSVGRoot::computeFloatRectForRepaint): 2012-04-16 Anders Carlsson Crash when running some editing related tests https://bugs.webkit.org/show_bug.cgi?id=84091 Reviewed by Andreas Kling. Null check triggeringEvent. * editing/Editor.cpp: (WebCore::Editor::insertTextWithoutSendingTextEvent): 2012-04-16 Simon Fraser Rename to updateZOrderListsSlowCase to rebuildZOrderLists https://bugs.webkit.org/show_bug.cgi?id=84071 Reviewed by Antti Koivisto. Use a better name for updateZOrderListsSlowCase(). * rendering/RenderLayer.cpp: (WebCore::RenderLayer::rebuildZOrderLists): * rendering/RenderLayer.h: (RenderLayer): (WebCore::RenderLayer::updateZOrderLists): 2012-04-16 Terry Anderson [chromium] Allow WebGestureEvent to store four floating point values https://bugs.webkit.org/show_bug.cgi?id=84053 Reviewed by Darin Fisher. See bug description for an explanation of the changes made. * platform/PlatformGestureEvent.h: (WebCore::PlatformGestureEvent::PlatformGestureEvent): (PlatformGestureEvent): (WebCore::PlatformGestureEvent::gammaX): (WebCore::PlatformGestureEvent::gammaY): 2012-04-16 Kentaro Hara [Refactoring][V8] Remove $indent from NativeToJSValue() https://bugs.webkit.org/show_bug.cgi?id=84077 Reviewed by Nate Chapin. $indent in NativeToJSValue() in CodeGeneratorV8.pm is not used. This patch removes it. No new tests. No change in behavior. * bindings/scripts/CodeGeneratorV8.pm: (GenerateNormalAttrGetter): (GenerateFunctionCallString): (NativeToJSValue): 2012-04-16 Luiz Agostini matchMedia() MediaQueryList not updating https://bugs.webkit.org/show_bug.cgi?id=75903 Reviewed by Antti Koivisto. Test: fast/media/media-query-list-08.html Viewport related MediaQueryList listeners were not triggered and the value of matches were not updated if the document's style selector were not affected by viewport changes. The new method evaluateMediaQueries() is now called by FrameView instead of styleSelectorChanged() if the style selector is not affected by viewport changes. * dom/Document.cpp: (WebCore::Document::evaluateMediaQueries): (WebCore): (WebCore::Document::styleSelectorChanged): * dom/Document.h: (Document): * page/FrameView.cpp: (WebCore::FrameView::layout): 2012-04-16 James Robinson [chromium] Delete uncalled unreserveContentsTextures function https://bugs.webkit.org/show_bug.cgi?id=84005 Reviewed by Adrienne Walker. This is vestigal dead code. * platform/graphics/chromium/Canvas2DLayerChromium.cpp: * platform/graphics/chromium/Canvas2DLayerChromium.h: (Canvas2DLayerChromium): * platform/graphics/chromium/LayerChromium.h: * platform/graphics/chromium/cc/CCLayerImpl.h: (CCLayerImpl): 2012-04-13 Simon Fraser Avoid using backing store for compositing layers that just need to clip https://bugs.webkit.org/show_bug.cgi?id=40547 Reviewed by Dean Jackson. If a layer becomes composited because it needs to clip composited descendants, or if it has perspective, then it doesn't actually needs its own backing store; its contents can be painted by an ancestor, and we can just have an empty layer that does the clipping or applies the perspective transform. This saves backing store memory on some pages. Tests: compositing/backing/no-backing-for-clip-overlap.html compositing/backing/no-backing-for-clip.html compositing/backing/no-backing-for-perspective.html * rendering/RenderLayer.cpp: (WebCore): (WebCore::RenderLayer::enclosingCompositingLayerForRepaint): (WebCore::RenderLayer::paintLayer): * rendering/RenderLayer.h: (RenderLayer): * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::RenderLayerBacking): (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry): (WebCore::RenderLayerBacking::containsPaintedContent): (WebCore::RenderLayerBacking::setContentsNeedDisplay): (WebCore::RenderLayerBacking::setContentsNeedDisplayInRect): (WebCore::RenderLayerBacking::paintIntoLayer): * rendering/RenderLayerBacking.h: (RenderLayerBacking): (WebCore::RenderLayerBacking::paintsIntoCompositedAncestor): (WebCore::RenderLayerBacking::setRequiresOwnBackingStore): * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::layerWillBeRemoved): (WebCore::RenderLayerCompositor::recursiveRepaintLayerRect): (WebCore::RenderLayerCompositor::requiresCompositingLayer): (WebCore::RenderLayerCompositor::requiresOwnBackingStore): (WebCore): * rendering/RenderLayerCompositor.h: * rendering/RenderObject.cpp: (WebCore::RenderObject::containerForRepaint): * rendering/RenderTreeAsText.cpp: (WebCore::write): * rendering/RenderView.cpp: (WebCore::RenderView::paintBoxDecorations): 2012-04-16 Brady Eidson and https://bugs.webkit.org/show_bug.cgi?id=84050 WebKit2 back/forward items in the page cache are never removed when the page is closed Reviewed by Jessie Berlin and unofficially reviewed by Jon Lee. * WebCore.exp.in: Export PageCache::remove() 2012-04-16 Philippe Normand Unreviewed, GTK build fix after r114269. * GNUmakefile.list.am: 2012-04-16 Andrey Kosyakov Web Inspector: timeline. Range selection works incorrect with right click https://bugs.webkit.org/show_bug.cgi?id=83870 Reviewed by Pavel Feldman. - only start window dragging upon mousedown with left button (right will cause a context menu and we won't see mouseup) * inspector/front-end/TimelineOverviewPane.js: (WebInspector.TimelineOverviewWindow.prototype._dragWindow): 2012-04-16 Andrey Kosyakov Web Inspector: touch pad is pain to use in lower pane of Timeline panel due two two-axis scrolling https://bugs.webkit.org/show_bug.cgi?id=83946 Reviewed by Pavel Feldman. Remove delegation of mousewheel events from lower timeline pane to the timeline overview. This disables support for moving overview window with horizontal swype over lower timeline pane, thus removing an irritating situation when we try to both change overview window and scroll lower timeline pane upon a single touchpad gesture. Those willing to move timeline window now would need to position mouse over overview. * inspector/front-end/TimelineOverviewPane.js: (WebInspector.TimelineOverviewWindow.prototype._onMouseWheel): (WebInspector.TimelineOverviewWindow.prototype._zoom): * inspector/front-end/TimelinePanel.js: (WebInspector.TimelinePanel): 2012-04-16 Yury Semikhatsky Web Inspector: rename heap profiler files and classes DetailedHeapshot* ->HeapSnapshot* https://bugs.webkit.org/show_bug.cgi?id=84038 A bunch of renames "detailed heapshot" -> "heap snapshot". Reviewed by Pavel Feldman. Tests: inspector/profiler/heap-snapshot-comparison-expansion-preserved-when-sorting.html inspector/profiler/heap-snapshot-comparison-show-all.html inspector/profiler/heap-snapshot-comparison-show-next.html inspector/profiler/heap-snapshot-comparison-shown-node-count-preserved-when-sorting.html inspector/profiler/heap-snapshot-comparison-sorting.html inspector/profiler/heap-snapshot-containment-expansion-preserved-when-sorting.html inspector/profiler/heap-snapshot-containment-show-all.html inspector/profiler/heap-snapshot-containment-show-next.html inspector/profiler/heap-snapshot-containment-shown-node-count-preserved-when-sorting.html inspector/profiler/heap-snapshot-containment-sorting.html inspector/profiler/heap-snapshot-dominators-expansion-preserved-when-sorting.html inspector/profiler/heap-snapshot-dominators-show-all.html inspector/profiler/heap-snapshot-dominators-show-next.html inspector/profiler/heap-snapshot-dominators-shown-node-count-preserved-when-sorting.html inspector/profiler/heap-snapshot-dominators-sorting.html inspector/profiler/heap-snapshot-summary-expansion-preserved-when-sorting.html inspector/profiler/heap-snapshot-summary-show-all.html inspector/profiler/heap-snapshot-summary-show-next.html inspector/profiler/heap-snapshot-summary-shown-node-count-preserved-when-sorting.html inspector/profiler/heap-snapshot-summary-sorting.html * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * inspector/compile-front-end.py: * inspector/front-end/HeapSnapshotGridNodes.js: Renamed from Source/WebCore/inspector/front-end/DetailedHeapshotGridNodes.js. (WebInspector.HeapSnapshotGridNode): (WebInspector.HeapSnapshotGridNode.prototype.ensureContentCreated): (WebInspector.HeapSnapshotGridNode.prototype.createCell): (WebInspector.HeapSnapshotGridNode.prototype.dispose): (WebInspector.HeapSnapshotGridNode.prototype.hasHoverMessage.false.queryObjectContent): (WebInspector.HeapSnapshotGridNode.prototype._toPercentString): (WebInspector.HeapSnapshotGridNode.prototype._createValueCell): (WebInspector.HeapSnapshotGridNode.prototype._populate.sorted): (WebInspector.HeapSnapshotGridNode.prototype._populate): (WebInspector.HeapSnapshotGridNode.prototype.populateChildren.callSerialize): (WebInspector.HeapSnapshotGridNode.prototype.populateChildren.childrenRetrieved.notify): (WebInspector.HeapSnapshotGridNode.prototype.populateChildren.childrenRetrieved): (WebInspector.HeapSnapshotGridNode.prototype.populateChildren): (WebInspector.HeapSnapshotGridNode.prototype._saveChildren): (WebInspector.HeapSnapshotGridNode.prototype.sort.afterSort.afterPopulate): (WebInspector.HeapSnapshotGridNode.prototype.sort.afterSort): (WebInspector.HeapSnapshotGridNode.prototype.sort): (WebInspector.HeapSnapshotLazyGridNode): (WebInspector.HeapSnapshotLazyGridNode.prototype.ensureContentCreated): (WebInspector.HeapSnapshotLazyGridNode.prototype.createCells): (WebInspector.HeapSnapshotGenericObjectNode): (WebInspector.HeapSnapshotGenericObjectNode.prototype.createCell): (WebInspector.HeapSnapshotGenericObjectNode.prototype._createObjectCell): (WebInspector.HeapSnapshotGenericObjectNode.prototype.get data): (WebInspector.HeapSnapshotGenericObjectNode.prototype.queryObjectContent.else.formatResult): (WebInspector.HeapSnapshotGenericObjectNode.prototype.queryObjectContent): (WebInspector.HeapSnapshotGenericObjectNode.prototype.get _retainedSizePercent): (WebInspector.HeapSnapshotGenericObjectNode.prototype.get _shallowSizePercent): (WebInspector.HeapSnapshotGenericObjectNode.prototype.updateHasChildren): (WebInspector.HeapSnapshotGenericObjectNode.prototype.isWindow): (WebInspector.HeapSnapshotGenericObjectNode.prototype.shortenWindowURL): (WebInspector.HeapSnapshotObjectNode): (WebInspector.HeapSnapshotObjectNode.prototype.updateHasChildren): (WebInspector.HeapSnapshotObjectNode.prototype._createChildNode): (WebInspector.HeapSnapshotObjectNode.prototype._childHashForEntity): (WebInspector.HeapSnapshotObjectNode.prototype._childHashForNode): (WebInspector.HeapSnapshotObjectNode.prototype.comparator): (WebInspector.HeapSnapshotObjectNode.prototype._emptyData): (WebInspector.HeapSnapshotObjectNode.prototype._enhanceData): (WebInspector.HeapSnapshotObjectNode.prototype._prefixObjectCell): (WebInspector.HeapSnapshotInstanceNode): (WebInspector.HeapSnapshotInstanceNode.prototype._createChildNode): (WebInspector.HeapSnapshotInstanceNode.prototype._childHashForEntity): (WebInspector.HeapSnapshotInstanceNode.prototype._childHashForNode): (WebInspector.HeapSnapshotInstanceNode.prototype.comparator): (WebInspector.HeapSnapshotInstanceNode.prototype._emptyData): (WebInspector.HeapSnapshotInstanceNode.prototype._enhanceData): (WebInspector.HeapSnapshotInstanceNode.prototype.get isDeletedNode): (WebInspector.HeapSnapshotConstructorNode): (WebInspector.HeapSnapshotConstructorNode.prototype.createCell): (WebInspector.HeapSnapshotConstructorNode.prototype._createChildNode): (WebInspector.HeapSnapshotConstructorNode.prototype._createNodesProvider): (WebInspector.HeapSnapshotConstructorNode.prototype.comparator): (WebInspector.HeapSnapshotConstructorNode.prototype._childHashForEntity): (WebInspector.HeapSnapshotConstructorNode.prototype._childHashForNode): (WebInspector.HeapSnapshotConstructorNode.prototype.get data): (WebInspector.HeapSnapshotConstructorNode.prototype.get _countPercent): (WebInspector.HeapSnapshotConstructorNode.prototype.get _retainedSizePercent): (WebInspector.HeapSnapshotConstructorNode.prototype.get _shallowSizePercent): (WebInspector.HeapSnapshotIteratorsTuple): (WebInspector.HeapSnapshotIteratorsTuple.prototype.dispose): (WebInspector.HeapSnapshotIteratorsTuple.prototype.sortAndRewind): (WebInspector.HeapSnapshotDiffNode): (WebInspector.HeapSnapshotDiffNode.prototype.calculateDiff.diffCalculated): (WebInspector.HeapSnapshotDiffNode.prototype.calculateDiff): (WebInspector.HeapSnapshotDiffNode.prototype.calculateDiff.baseIdsReceived): (WebInspector.HeapSnapshotDiffNode.prototype.calculateDiff.idsReceived): (WebInspector.HeapSnapshotDiffNode.prototype._createChildNode): (WebInspector.HeapSnapshotDiffNode.prototype._createNodesProvider.createProvider): (WebInspector.HeapSnapshotDiffNode.prototype._createNodesProvider): (WebInspector.HeapSnapshotDiffNode.prototype._childHashForEntity): (WebInspector.HeapSnapshotDiffNode.prototype._childHashForNode): (WebInspector.HeapSnapshotDiffNode.prototype.comparator): (WebInspector.HeapSnapshotDiffNode.prototype.populateChildren.firstProviderPopulated): (WebInspector.HeapSnapshotDiffNode.prototype.populateChildren.else.firstProviderPopulated): (WebInspector.HeapSnapshotDiffNode.prototype.populateChildren): (WebInspector.HeapSnapshotDiffNode.prototype._signForDelta): (WebInspector.HeapSnapshotDiffNode.prototype.get data): (WebInspector.HeapSnapshotDominatorObjectNode): (WebInspector.HeapSnapshotDominatorObjectNode.prototype._createChildNode): (WebInspector.HeapSnapshotDominatorObjectNode.prototype._createProvider): (WebInspector.HeapSnapshotDominatorObjectNode.prototype._childHashForEntity): (WebInspector.HeapSnapshotDominatorObjectNode.prototype._childHashForNode): (WebInspector.HeapSnapshotDominatorObjectNode.prototype.comparator): (WebInspector.HeapSnapshotDominatorObjectNode.prototype._emptyData): (MixInSnapshotNodeFunctions): * inspector/front-end/HeapSnapshotView.js: Renamed from Source/WebCore/inspector/front-end/DetailedHeapshotView.js. (WebInspector.HeapSnapshotSortableDataGrid): (WebInspector.HeapSnapshotSortableDataGrid.prototype.dispose): (WebInspector.HeapSnapshotSortableDataGrid.prototype.resetSortingCache): (WebInspector.HeapSnapshotSortableDataGrid.prototype.sortingChanged.SortByTwoFields): (WebInspector.HeapSnapshotSortableDataGrid.prototype.sortingChanged): (WebInspector.HeapSnapshotSortableDataGrid.prototype.updateVisibleNodes): (WebInspector.HeapSnapshotSortableDataGrid.prototype.onResize): (WebInspector.HeapSnapshotSortableDataGrid.prototype._onScroll): (WebInspector.HeapSnapshotSortableDataGrid.prototype._performSorting): (WebInspector.HeapSnapshotSortableDataGrid.prototype.recursiveSortingEnter): (WebInspector.HeapSnapshotSortableDataGrid.prototype.recursiveSortingLeave): (WebInspector.HeapSnapshotContainmentDataGrid): (WebInspector.HeapSnapshotContainmentDataGrid.prototype._defaultPopulateCount.100.expandRoute.nextStep.else.afterExpand): (WebInspector.HeapSnapshotContainmentDataGrid.prototype._defaultPopulateCount.100.expandRoute): (WebInspector.HeapSnapshotContainmentDataGrid.prototype.setDataSource): (WebInspector.HeapSnapshotContainmentDataGrid.prototype.sortingChanged): (WebInspector.HeapSnapshotRetainmentDataGrid): (WebInspector.HeapSnapshotRetainmentDataGrid.prototype._sortFields): (WebInspector.HeapSnapshotRetainmentDataGrid.prototype.reset): (WebInspector.HeapSnapshotConstructorsDataGrid): (WebInspector.HeapSnapshotConstructorsDataGrid.prototype._defaultPopulateCount.100._sortFields): (WebInspector.HeapSnapshotConstructorsDataGrid.prototype.setDataSource): (WebInspector.HeapSnapshotConstructorsDataGrid.prototype.populateChildren): (WebInspector.HeapSnapshotConstructorsDataGrid.prototype._filterSelectIndexChanged): (WebInspector.HeapSnapshotDiffDataGrid): (WebInspector.HeapSnapshotDiffDataGrid.prototype._defaultPopulateCount.50._sortFields): (WebInspector.HeapSnapshotDiffDataGrid.prototype.setDataSource): (WebInspector.HeapSnapshotDiffDataGrid.prototype._baseProfileIndexChanged): (WebInspector.HeapSnapshotDiffDataGrid.prototype.setBaseDataSource): (WebInspector.HeapSnapshotDiffDataGrid.prototype.populateChildren.baseAggregatesReceived.aggregatesReceived.addNodeIfNonZeroDiff): (WebInspector.HeapSnapshotDiffDataGrid.prototype.populateChildren.baseAggregatesReceived.aggregatesReceived): (WebInspector.HeapSnapshotDiffDataGrid.prototype.populateChildren): (WebInspector.HeapSnapshotDominatorsDataGrid): (WebInspector.HeapSnapshotDominatorsDataGrid.prototype._defaultPopulateCount.25.setDataSource): (WebInspector.HeapSnapshotDominatorsDataGrid.prototype.sortingChanged): (WebInspector.HeapSnapshotView.profileCallback): (WebInspector.HeapSnapshotView): (WebInspector.HeapSnapshotView.prototype.dispose): (WebInspector.HeapSnapshotView.prototype.get statusBarItems): (WebInspector.HeapSnapshotView.prototype.get profile): (WebInspector.HeapSnapshotView.prototype.get profileWrapper): (WebInspector.HeapSnapshotView.prototype.get baseProfile): (WebInspector.HeapSnapshotView.prototype.get baseProfileWrapper): (WebInspector.HeapSnapshotView.prototype.wasShown.profileCallback1): (WebInspector.HeapSnapshotView.prototype.wasShown.profileCallback2): (WebInspector.HeapSnapshotView.prototype.wasShown): (WebInspector.HeapSnapshotView.prototype.willHide): (WebInspector.HeapSnapshotView.prototype.onResize): (WebInspector.HeapSnapshotView.prototype.searchCanceled): (WebInspector.HeapSnapshotView.prototype.performSearch.matchesByName): (WebInspector.HeapSnapshotView.prototype.performSearch.matchesById): (WebInspector.HeapSnapshotView.prototype.performSearch.matchesQuery): (WebInspector.HeapSnapshotView.prototype.performSearch): (WebInspector.HeapSnapshotView.prototype.jumpToFirstSearchResult): (WebInspector.HeapSnapshotView.prototype.jumpToLastSearchResult): (WebInspector.HeapSnapshotView.prototype.jumpToNextSearchResult): (WebInspector.HeapSnapshotView.prototype.jumpToPreviousSearchResult): (WebInspector.HeapSnapshotView.prototype.showingFirstSearchResult): (WebInspector.HeapSnapshotView.prototype.showingLastSearchResult): (WebInspector.HeapSnapshotView.prototype._jumpToSearchResult): (WebInspector.HeapSnapshotView.prototype.refreshVisibleData): (WebInspector.HeapSnapshotView.prototype._changeBase): (WebInspector.HeapSnapshotView.prototype._changeFilter): (WebInspector.HeapSnapshotView.prototype._createToolbarWithClassNameFilter): (WebInspector.HeapSnapshotView.prototype._changeNameFilter): (WebInspector.HeapSnapshotView.prototype._profiles): (WebInspector.HeapSnapshotView.prototype._loadProfile): (WebInspector.HeapSnapshotView.prototype._loadProfileByIndex): (WebInspector.HeapSnapshotView.prototype.isDetailedSnapshot): (WebInspector.HeapSnapshotView.prototype.processLoadedSnapshot): (WebInspector.HeapSnapshotView.prototype._selectionChanged): (WebInspector.HeapSnapshotView.prototype._inspectedObjectChanged): (WebInspector.HeapSnapshotView.prototype._setRetainmentDataGridSource): (WebInspector.HeapSnapshotView.prototype._mouseDownInContentsGrid): (WebInspector.HeapSnapshotView.prototype.changeView.sortingComplete): (WebInspector.HeapSnapshotView.prototype.changeView): (WebInspector.HeapSnapshotView.prototype._changeView): (WebInspector.HeapSnapshotView.prototype._getHoverAnchor): (WebInspector.HeapSnapshotView.prototype._resolveObjectForPopover): (WebInspector.HeapSnapshotView.prototype._helpClicked.appendHelp): (WebInspector.HeapSnapshotView.prototype._helpClicked): (WebInspector.HeapSnapshotView.prototype._startRetainersHeaderDragging): (WebInspector.HeapSnapshotView.prototype._retainersHeaderDragging): (WebInspector.HeapSnapshotView.prototype._endRetainersHeaderDragging): (WebInspector.HeapSnapshotView.prototype._updateRetainmentViewHeight): (WebInspector.HeapSnapshotView.prototype._updateBaseOptions): (WebInspector.HeapSnapshotView.prototype._updateFilterOptions): (WebInspector.HeapSnapshotProfileType): (WebInspector.HeapSnapshotProfileType.prototype.get buttonTooltip): (WebInspector.HeapSnapshotProfileType.prototype.buttonClicked): (WebInspector.HeapSnapshotProfileType.prototype.get treeItemTitle): (WebInspector.HeapSnapshotProfileType.prototype.get description): (WebInspector.HeapSnapshotProfileType.prototype.createSidebarTreeElementForProfile): (WebInspector.HeapSnapshotProfileType.prototype.createView): * inspector/front-end/ProfilesPanel.js: (WebInspector.ProfilesPanel.prototype._addHeapSnapshotChunk): (WebInspector.ProfilesPanel.prototype.takeHeapSnapshot): (WebInspector.ProfilesPanel.prototype._reportHeapSnapshotProgress): * inspector/front-end/WebKit.qrc: * inspector/front-end/heapProfiler.css: (.heap-snapshot-view): (.heap-snapshot-view.visible): (.heap-snapshot-view .view): (.heap-snapshot-view .view.visible): (.heap-snapshot-view .data-grid tr:empty): (.heap-snapshot-view .data-grid): (.heap-snapshot-view .data-grid td.count-column): (.heap-snapshot-view .data-grid td.addedCount-column): (.heap-snapshot-view .data-grid td.removedCount-column): (.heap-snapshot-view .data-grid td.countDelta-column): (.heap-snapshot-view .data-grid td.addedSize-column): (.heap-snapshot-view .data-grid td.removedSize-column): (.heap-snapshot-view .data-grid td.sizeDelta-column): (.heap-snapshot-view .data-grid td.shallowSize-column): (.heap-snapshot-view .data-grid td.retainedSize-column): (.heap-snapshot-view .data-grid td.distanceToWindow-column): (.heap-snapshot-view .data-grid span.percent-column): (.heap-snapshot-view .console-formatted-object, .console-formatted-node): (.heap-snapshot-view .console-formatted-string): (.heap-snapshot-view .console-formatted-id): (.heap-snapshot-view .data-grid tr.selected *): (.heap-snapshot-view .data-grid:focus tr.selected *): (.heap-snapshot-view .delimiter): (.heap-snapshot-view .views-container): (.heap-snapshot-view .views-container .view): (.heap-snapshot-view .retaining-paths-view): (.heap-snapshot-view .class-view-grid): (.heap-snapshot-view .class-view-toolbar): (.heap-snapshot-view .class-view-toolbar input.class-name-filter): (.heap-snapshot-view .retainers-view-header): (.heap-snapshot-view .retainers-view-header .title > span): (.heap-snapshot-view tr:not(.selected) td.object-column span.highlight): (.heap-snapshot-view td.object-column span.grayed): (.heap-snapshot-help-status-bar-item .glyph): (table.heap-snapshot-help): * inspector/front-end/inspector.html: 2012-04-16 Andrey Kosyakov Web Inspector: touch pad is pain to use in lower pane of Timeline panel due two two-axis scrolling https://bugs.webkit.org/show_bug.cgi?id=83946 Reviewed by Pavel Feldman. Remove delegation of mousewheel events from lower timeline pane to the timeline overview. This disables support for moving overview window with horizontal swype over lower timeline pane, thus removing an irritating situation when we try to both change overview window and scroll lower timeline pane upon a single touchpad gesture. Those willing to move timeline window now would need to position mouse over overview. * inspector/front-end/TimelineOverviewPane.js: (WebInspector.TimelineOverviewWindow.prototype._onMouseWheel): (WebInspector.TimelineOverviewWindow.prototype._zoom): * inspector/front-end/TimelinePanel.js: (WebInspector.TimelinePanel): 2012-04-11 Philippe Normand [GStreamer] HRTFDatabaseLoader conflicts with AudioFileReader https://bugs.webkit.org/show_bug.cgi?id=78095 Reviewed by Martin Robinson. Moved the GStreamer initialization logic to a new GStreamerUtilities module, used by the MediaPlayer and the AudioContext. I also removed the static variables as gst_init_check already handles cases where it's called multiple times. * GNUmakefile.list.am: * Modules/webaudio/AudioContext.cpp: (WebCore::AudioContext::constructCommon): * platform/audio/gstreamer/AudioDestinationGStreamer.cpp: (WebCore::AudioDestinationGStreamer::AudioDestinationGStreamer): * platform/audio/gstreamer/AudioFileReaderGStreamer.cpp: (WebCore::AudioFileReader::createBus): * platform/graphics/gstreamer/GRefPtrGStreamer.cpp: (WTF::adoptGRef): (WTF): (WTF::GstElementFactory): * platform/graphics/gstreamer/GRefPtrGStreamer.h: (WTF): * platform/graphics/gstreamer/GStreamerUtilities.cpp: Added. (WebCore): (WebCore::initializeGStreamer): * platform/graphics/gstreamer/GStreamerUtilities.h: Added. (WebCore): * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: (WebCore::doGstInit): 2012-04-16 ChangSeok Oh Update GraphicsContext3DOpenGLES.cpp and fix some issues to build with GLES. https://bugs.webkit.org/show_bug.cgi?id=83982 Reviewed by Martin Robinson. GL_BGRA is not defined in GLESv2, so it causes build-break at readRenderingResults. To resolve this, a helper function readPixelsAndConvertToBGRAIfNecessary is added in GC3DOpenGL.cpp & GC3DOpenGLES.cpp and it's used in GC3DOpenGLCommon.cpp. And some other issues to build with GLES are gone with this patch. No new tests, since no new feature. * platform/graphics/GraphicsContext3D.h: * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp: (WebCore::GraphicsContext3D::readPixelsAndConvertToBGRAIfNecessary): (WebCore): * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp: (WebCore::GraphicsContext3D::readRenderingResults): * platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp: (WebCore::GraphicsContext3D::readPixelsAndConvertToBGRAIfNecessary): (WebCore): (WebCore::GraphicsContext3D::reshapeFBOs): (WebCore::GraphicsContext3D::resolveMultisamplingIfNecessary): 2012-04-16 Xiaomei Ji [chromium] wrong justification for arabic/persian page in cr-win. https://bugs.webkit.org/show_bug.cgi?id=83227 Reviewed by Kent Tamura. Disable kashida justification if using Skia to draw. Test: fast/text/international/arabic-justify.html * platform/graphics/chromium/UniscribeHelper.cpp: (WebCore::UniscribeHelper::justify): 2012-04-16 Jia Pu Build fix. Change set 114220 broke OS X internal build. Change set 114231 attempted to fix it, but isn't entirely correct. This patch amends change set 114231. * WebCore.exp.in: * editing/DictationAlternative.cpp: (WebCore::DictationAlternative::DictationAlternative): * editing/DictationAlternative.h: (DictationAlternative): 2012-04-16 Antti Koivisto REGRESSION (r104445): Style is not recomputed on serenaandlily.com https://bugs.webkit.org/show_bug.cgi?id=83663 Reviewed by Andreas Kling. CSS class and id selectors are case insensitive in non-strict modes. The code that invalidated the scope elements used getElementByID() which is case sensitive in all modes. As a result we would fail to invalidate elements that would match a style rule but used different case in id. The new code invalidates by crawling the DOM tree. This often (when there are classes) actually faster than the existing code as we can now handle everything in a single pass. Each class scope required a crawl with the old code. The code uses the same functions as the selector matching code to get the same behavior. The maximum class limit is lifted as number of classes does not affect complexity anymore. Test: fast/css/id-or-class-before-stylesheet-strict.html * css/SelectorChecker.h: (WebCore::SelectorChecker::elementMatchesSelectorScopes): (WebCore): * dom/Document.cpp: (WebCore::Document::testAddedStylesheetRequiresStyleRecalc): (WebCore): 2012-04-16 Uday Kiran CSS3 Selectors failures on css3test.com https://bugs.webkit.org/show_bug.cgi?id=83885 Reviewed by Zoltan Herczeg. Parsing fix for CSS3 selectors :nth-child(), :nth-last-child() :nth-of-type() :nth-last-of-type() with values -n-b and n-b as they are of valid form an+b where a and b are integers. http://www.w3.org/TR/selectors/#structural-pseudos Descriptors of form n-b or -n-b, where b is number, are valid CSS identifiers. However, in NthChildMode we need to check whether this identifier is a valid nth child descriptor. The original code only checked this if the string was n- or -n- but this is not enough. We need to check everything which starts with an n- or -n- prefix. Test: css3/parsing-css3-nthchild.html * css/CSSParser.cpp: (WebCore::CSSParser::lex): 2012-04-16 Eric Carlson ASSERT in notifyChildInserted when HTMLMediaElement is removed from tree https://bugs.webkit.org/show_bug.cgi?id=83949 Reviewed by Antti Koivisto. No new tests. I was not able to create a reproducible test case, but I have been unable to reproduce the ASSERT that occassionally fired in existing tests since I have been living on these changes. * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::insertedIntoDocument): Call configureMediaControls. (WebCore::HTMLMediaElement::removedFromDocument): Ditto. (WebCore::HTMLMediaElement::configureMediaControls): Don't show controls when the media element is not in a Document. 2012-04-16 Eric Carlson Layout Test media/track/track-delete-during-setup.html is hitting an ASSERT_NOT_REACHED https://bugs.webkit.org/show_bug.cgi?id=82269 Reviewed by Antti Koivisto. No new tests, already tested by media/track/track-delete-during-setup.html. * html/HTMLTrackElement.cpp: (WebCore::HTMLTrackElement::insertedIntoDocument): Don't notify the media element until/unless the track element is inserted into the document. * html/HTMLTrackElement.h: 2012-04-16 Yael Aharon [Qt][WK2] Fixed elements position is wrong after zooming. https://bugs.webkit.org/show_bug.cgi?id=83981 Reviewed by Kenneth Rohde Christiansen. When setFixedVisibleContentRect is called we mark all fixed elements in the frame for layout. In order to find these elements, RenderView maintains a list of fixed elements. They are added and removed at the same time that they are added and removed from their parent RenderBlock. The idea is taken from the iOS5.1 branch, at opensource.apple.com. Added a manual test that allows removing and adding fixed elements at will. * page/FrameView.cpp: (WebCore::FrameView::setFixedVisibleContentRect): * rendering/RenderBlock.cpp: (WebCore::RenderBlock::insertPositionedObject): (WebCore::RenderBlock::removePositionedObject): * rendering/RenderView.cpp: (WebCore::RenderView::setFixedPositionedObjectsNeedLayout): (WebCore): (WebCore::RenderView::insertFixedPositionedObject): (WebCore::RenderView::removeFixedPositionedObject): * rendering/RenderView.h: (RenderView): 2012-04-13 Pavel Feldman Web Inspector: extract ContentProvider into its own file, make NetworkRequest, Resoruce and others implement it. https://bugs.webkit.org/show_bug.cgi?id=83922 Reviewed by Yury Semikhatsky. We have two different types of requestContent methods: one on the source mapping level and one on the resource level. There are also adapters between the two. I'm aligning it all to a single requestContent method declared in ContentProvider. * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * inspector/compile-front-end.py: * inspector/front-end/BreakpointsSidebarPane.js: (WebInspector.JavaScriptBreakpointsSidebarPane.prototype.addBreakpoint.didRequestContent): (WebInspector.JavaScriptBreakpointsSidebarPane.prototype.addBreakpoint): * inspector/front-end/ContentProvider.js: Added. (WebInspector.ContentProvider): (WebInspector.ContentProvider.prototype.contentURL): (WebInspector.ContentProvider.prototype.requestContent): (WebInspector.ContentProvider.prototype.searchInContent): (WebInspector.ContentProvider.SearchMatch): * inspector/front-end/ContentProviders.js: (WebInspector.ScriptContentProvider.prototype.contentURL): (WebInspector.ScriptContentProvider.prototype.requestContent): (WebInspector.ConcatenatedScriptsContentProvider.prototype.contentURL): (WebInspector.ConcatenatedScriptsContentProvider.prototype.requestContent): (WebInspector.CompilerSourceMappingContentProvider.prototype.contentURL): (WebInspector.CompilerSourceMappingContentProvider.prototype.requestContent): (WebInspector.StaticContentProvider.prototype.contentURL): (WebInspector.StaticContentProvider.prototype.requestContent): * inspector/front-end/DebuggerPresentationModel.js: * inspector/front-end/ExtensionServer.js: (WebInspector.ExtensionServer.prototype._getResourceContent): * inspector/front-end/JavaScriptSourceFrame.js: (WebInspector.JavaScriptSourceFrame.prototype.requestContent): * inspector/front-end/NetworkItemView.js: (WebInspector.RequestContentView.prototype._ensureInnerViewShown.callback): (WebInspector.RequestContentView.prototype._ensureInnerViewShown): * inspector/front-end/NetworkRequest.js: (WebInspector.NetworkRequest.prototype.contentURL): (WebInspector.NetworkRequest.prototype.requestContent): (WebInspector.NetworkRequest.prototype.searchInContent): (WebInspector.NetworkRequest.prototype.populateImageSource): (WebInspector.NetworkRequest.prototype._innerRequestContent.onResourceContent): (WebInspector.NetworkRequest.prototype._innerRequestContent): * inspector/front-end/RawSourceCode.js: (WebInspector.RawSourceCode.prototype._createContentProvider): (WebInspector.RawSourceCode.prototype._createSourceMapping.didRequestContent): (WebInspector.RawSourceCode.prototype._createSourceMapping): * inspector/front-end/Resource.js: (WebInspector.Resource.prototype.contentURL): (WebInspector.Resource.prototype.requestContent): (WebInspector.Resource.prototype._innerRequestContent.callback): (WebInspector.Resource.prototype._innerRequestContent): (WebInspector.ResourceRevision.prototype.contentURL): (WebInspector.ResourceRevision.prototype.requestContent.callbackWrapper): (WebInspector.ResourceRevision.prototype.requestContent): (WebInspector.ResourceRevision.prototype.searchInContent): * inspector/front-end/ResourceView.js: (WebInspector.ResourceSourceFrame.prototype.requestContent): (WebInspector.ResourceSourceFrame.prototype._contentChanged): (WebInspector.ResourceRevisionSourceFrame.prototype.requestContent): * inspector/front-end/ScriptFormatter.js: * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype.requestVisibleScriptOutline): * inspector/front-end/SourceFrame.js: (WebInspector.SourceFrame.prototype.setContent): * inspector/front-end/UISourceCode.js: (WebInspector.UISourceCode): (WebInspector.UISourceCode.prototype.requestContent): (WebInspector.UISourceCode.prototype._didRequestContent): * inspector/front-end/WebKit.qrc: * inspector/front-end/inspector.html: 2012-04-16 Jason Liu [BlackBerry] Missing readyState 2 when a XMLHttpRequest calls xmlhttp.open("HEAD","notExist.html",true). https://bugs.webkit.org/show_bug.cgi?id=83866 Reviewed by George Staikos. We receive 404 for a XMLHttpRequest which calls open("HEAD", "notExist.html", true). There are no data received because its method is HEAD. This case shouldn't be treated as a failure. Test: http/tests/xmlhttprequest/xmlhttprequest-check-head-readystate-for-404.html * platform/network/blackberry/NetworkJob.cpp: (WebCore::NetworkJob::handleNotifyClose): 2012-04-16 Jon Lee Build fix. * WebCore.exp.in: * editing/DictationAlternative.cpp: (WebCore::DictationAlternative::DictationAlternative): * editing/DictationAlternative.h: (DictationAlternative): 2012-04-16 George Staikos Fix signed/unsigned mismatch warning for BlackBerry debug builds. https://bugs.webkit.org/show_bug.cgi?id=80790 Reviewed by Rob Buis. * platform/blackberry/CookieMap.cpp: (WebCore::CookieMap::removeCookieAtIndex): 2012-04-15 Kent Tamura WebCore::weekDayShortLabels() for ICU always returns the fallback labels https://bugs.webkit.org/show_bug.cgi?id=83991 Reviewed by Hajime Morita. We need to specfiy 1-based index to udat_getSymbols() with UDAT_SHORT_WEEKDAYS. Also, udat_countSymbols() with UDAT_SHORT_WEEKDAYS returns 8. No new tests because this behavior depends on locale setting. * platform/text/LocalizedCalendarICU.cpp: (WebCore::createLabelVector): Add startIndex argument. (WebCore::createMonthLabels): Pass UDAT_JANUARRY(0) as startIndex to createLabelVector(). (WebCore::createWeekDayShortLabels): Pass UDAT_SUNDAY(1) as startIndex to createLabelVector(). 2012-04-15 MORITA Hajime Unreviewed attempt to chromium-win build fix. * editing/DictationAlternative.h: 2012-04-15 Noel Gordon Align JSC/V8 bindings canvas.toDataURL() code flows https://bugs.webkit.org/show_bug.cgi?id=84003 Reviewed by Eric Seidel. Align JSC/V8 bindings canvas.toDataURL() code flow so that the binding code implementations read alike. No new tests. Covered by existing cnavas toDataURL tests. * bindings/js/JSHTMLCanvasElementCustom.cpp: (WebCore::JSHTMLCanvasElement::toDataURL): 2012-04-15 Jia Pu Introducing DictationCommand. https://bugs.webkit.org/show_bug.cgi?id=83549 Reviewed by Hajime Morita. No new tests. This patch doesn't introduce any change of new functionality. It prepares for additional changes which will inlude tests. On OS X, alternative dictation results need to be stored as document markers. This patch introduces following changes to achieve this: 1. Added DictationMarkDetails to store non-string type maker detail. 2. Introduce DictationCommand, which is similor to TypingCommand, but allows inserting text with attached markers. 3. Added Editor::insertDictatedText as interaface to WebKit and WebKit2. 4. Added struct DictationAlternative to pass dictation related info from WebKit to WebCore. Several fragments of code in TypingCommand can be also used by DictationCommand. So this patch introduced a new class, TextInsertionBaseCommand. It's a subclass of CompositeEditCommmand, and base class of both TypingCommand and DictationCommand. This patch also extends InsertTextCommand class. Its constructor will take an TextInsertionMarkerSupplier object. After text is inserted to a node, InsertTextCommand would give marker supplier a chance to add document markers to the inserted text. * CMakeLists.txt: * GNUmakefile.list.am: * Target.pri: * WebCore.exp.in: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * dom/Document.cpp: (WebCore::eventTargetNodeForDocument): Moved this function from EventHandler so that it can be used by AlternativeTextController. (WebCore): * dom/Document.h: (WebCore): * dom/DocumentMarker.cpp: (WebCore::DocumentMarker::DocumentMarker): New constructor that takes a pointer to DocumentMarkerDetails object. (WebCore): * dom/DocumentMarker.h: (WebCore::DocumentMarker::AllMarkers::AllMarkers): (DocumentMarker): * dom/DocumentMarkerController.cpp: (WebCore::DocumentMarkerController::addMarker): (WebCore): * dom/DocumentMarkerController.h: (DocumentMarkerController): * dom/TextEvent.cpp: (WebCore::TextEvent::createForDictation): (WebCore): (WebCore::TextEvent::TextEvent): * dom/TextEvent.h: Added member variable for dictation alternatives. (TextEvent): (WebCore::TextEvent::isDictation): (WebCore::TextEvent::dictationAlternatives): * dom/TextEventInputType.h: * editing/AlternativeTextController.cpp: (WebCore::AlternativeTextController::AlternativeTextController): (WebCore::AlternativeTextController::insertDictatedText): Used by Editor::insertDictatedText(). (WebCore): * editing/AlternativeTextController.h: (WebCore): (DictationMarkerDetails): (WebCore::DictationMarkerDetails::create): (WebCore::DictationMarkerDetails::originalText): (WebCore::DictationMarkerDetails::dictationContext): (WebCore::DictationMarkerDetails::DictationMarkerDetails): (AlternativeTextController): * editing/CompositeEditCommand.h: (WebCore::CompositeEditCommand::isDictationCommand): * editing/DictationAlternative.cpp: Added. (WebCore): (WebCore::DictationAlternative::DictationAlternative): * editing/DictationAlternative.h: Added. Data structure for passing dictation related data from WebKit to WebCore. (DictationAlternative): (WebCore): * editing/DictationCommand.cpp: Added. (WebCore): (DictationCommandLineOperation): (WebCore::DictationCommandLineOperation::DictationCommandLineOperation): (WebCore::DictationCommandLineOperation::operator()): (DictationMarkerSupplier): (WebCore::DictationMarkerSupplier::create): (WebCore::DictationMarkerSupplier::addMarkersToTextNode): (WebCore::DictationMarkerSupplier::DictationMarkerSupplier): (WebCore::DictationCommand::DictationCommand): (WebCore::DictationCommand::insertText): (WebCore::DictationCommand::doApply): (WebCore::DictationCommand::insertTextRunWithoutNewlines): (WebCore::DictationCommand::insertParagraphSeparator): (WebCore::DictationCommand::collectDictationAlternativesInRange): * editing/DictationCommand.h: Added. (WebCore): (DictationCommand): (WebCore::DictationCommand::isDictationCommand): (WebCore::DictationCommand::create): * editing/EditingAllInOne.cpp: * editing/Editor.cpp: (WebCore::Editor::insertDictatedText): Main interface that allows WebKit passes in text with attached dictation information. (WebCore): (WebCore::Editor::insertTextWithoutSendingTextEvent): (WebCore::Editor::updateMarkersForWordsAffectedByEditing): * editing/Editor.h: (Editor): * editing/InsertTextCommand.cpp: (WebCore::InsertTextCommand::InsertTextCommand): (WebCore): (WebCore::InsertTextCommand::doApply): * editing/InsertTextCommand.h: (WebCore): (TextInsertionMarkerSupplier): Interface to allow caller of InsertTextCommand to add document markers to inserted text. (WebCore::TextInsertionMarkerSupplier::~TextInsertionMarkerSupplier): (WebCore::TextInsertionMarkerSupplier::TextInsertionMarkerSupplier): (WebCore::InsertTextCommand::createWithMarkerSupplier): (InsertTextCommand): * editing/TextInsertionBaseCommand.cpp: Added. This class contains functions shared by TypingCommand and DictationCommand. (WebCore): (WebCore::TextInsertionBaseCommand::TextInsertionBaseCommand): (WebCore::TextInsertionBaseCommand::applyTextInsertionCommand): (WebCore::dispatchBeforeTextInsertedEvent): (WebCore::canAppendNewLineFeedToSelection): * editing/TextInsertionBaseCommand.h: Added. (WebCore): (TextInsertionBaseCommand): (WebCore::TextInsertionBaseCommand::~TextInsertionBaseCommand): (WebCore::forEachLineInString): * editing/TypingCommand.cpp: (TypingCommandLineOperation): (WebCore::TypingCommandLineOperation::TypingCommandLineOperation): (WebCore::TypingCommandLineOperation::operator()): (WebCore::TypingCommand::TypingCommand): (WebCore::TypingCommand::insertText): (WebCore::TypingCommand::insertLineBreak): (WebCore::TypingCommand::insertParagraphSeparator): * editing/TypingCommand.h: * page/EventHandler.cpp: * rendering/InlineTextBox.cpp: (WebCore::lineStyleForMarkerType): (WebCore::InlineTextBox::paintDocumentMarker): Renamed existing function to reflect new funcationality. (WebCore::InlineTextBox::paintDocumentMarkers): * rendering/InlineTextBox.h: (InlineTextBox): * testing/Internals.cpp: (WebCore::markerTypesFrom): 2012-04-15 James Robinson [chromium] LayerRendererChromium shouldn't know anything about CCLayerImpl https://bugs.webkit.org/show_bug.cgi?id=83415 Reviewed by Adrienne Walker. This removes all knowledge of CCLayerImpl from LayerRendererChromium. The most significant move code-wise is moving the HUD up to live on CCLayerTreeHostImpl, since it's aware of the layer tree. This involves two changes. First, CCHeadsUpDisplay is in charge of populating a ManagedTexture but the actual drawing code now lives in LayerRendererChromium. Second, since we don't recreate CCLayerTreeHostImpl on a lost context, the font atlas ownership is much simpler. Now a CCFontAtlas is created on the main thread if needed and passed asynchronously to the CCHeadsUpDisplay which takes ownership of the atlas. * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::create): (WebCore::LayerRendererChromium::initialize): (WebCore::LayerRendererChromium::~LayerRendererChromium): (WebCore::LayerRendererChromium::beginDrawingFrame): (WebCore::LayerRendererChromium::drawHeadsUpDisplay): (WebCore): (WebCore::LayerRendererChromium::finishDrawingFrame): (WebCore::LayerRendererChromium::swapBuffers): * platform/graphics/chromium/LayerRendererChromium.h: (LayerRendererChromiumClient): (LayerRendererChromium): * platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp: (WebCore::CCHeadsUpDisplay::CCHeadsUpDisplay): (WebCore::CCHeadsUpDisplay::setFontAtlas): (WebCore): (WebCore::CCHeadsUpDisplay::enabled): (WebCore::CCHeadsUpDisplay::showPlatformLayerTree): (WebCore::CCHeadsUpDisplay::draw): (WebCore::CCHeadsUpDisplay::drawHudContents): * platform/graphics/chromium/cc/CCHeadsUpDisplay.h: (WebCore): (WebCore::CCHeadsUpDisplay::create): (CCHeadsUpDisplay): * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::initialize): * platform/graphics/chromium/cc/CCLayerTreeHost.h: (CCLayerTreeHost): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::CCLayerTreeHostImpl): (WebCore::CCLayerTreeHostImpl::~CCLayerTreeHostImpl): (WebCore::CCLayerTreeHostImpl::canDraw): (WebCore::CCLayerTreeHostImpl::calculateRenderPasses): (WebCore::CCLayerTreeHostImpl::prepareToDraw): (WebCore::CCLayerTreeHostImpl::drawLayers): (WebCore::CCLayerTreeHostImpl::swapBuffers): (WebCore::CCLayerTreeHostImpl::initializeLayerRenderer): (WebCore::CCLayerTreeHostImpl::setFullRootLayerDamage): (WebCore::CCLayerTreeHostImpl::layerTreeAsText): (WebCore): (WebCore::CCLayerTreeHostImpl::setFontAtlas): (WebCore::CCLayerTreeHostImpl::dumpRenderSurfaces): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: (CCLayerTreeHostImpl): (WebCore::CCLayerTreeHostImpl::rootLayer): * platform/graphics/chromium/cc/CCProxy.h: (WebCore): (CCProxy): * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp: (WebCore::CCSingleThreadProxy::initializeLayerRenderer): (WebCore::CCSingleThreadProxy::recreateContext): (WebCore::CCSingleThreadProxy::setFontAtlas): (WebCore): * platform/graphics/chromium/cc/CCSingleThreadProxy.h: * platform/graphics/chromium/cc/CCThreadProxy.cpp: (WebCore::CCThreadProxy::initializeLayerRendererOnImplThread): (WebCore::CCThreadProxy::setFontAtlas): (WebCore): (WebCore::CCThreadProxy::setFontAtlasOnImplThread): (WebCore::CCThreadProxy::recreateContextOnImplThread): * platform/graphics/chromium/cc/CCThreadProxy.h: (CCThreadProxy): 2012-04-15 Antti Koivisto Capture CSS parser context https://bugs.webkit.org/show_bug.cgi?id=83998 Reviewed by Andreas Kling. Currently the CSS parser calls to the Document and StyleSheetInternal objects to get settings, base URL etc. The required information should be passed in on parser construction instead. The parser should not need to know about the document at all. The patch adds CSSParserContext struct that captures the parsing context. StyleSheetInternal saves the parsing context and reuses it for any further parsing. If the same stylesheet source is parsed with an identical context then the resulting stylesheet structure will be identical. This will allow sharing parsed stylesheets in the future. * css/CSSGrammar.y: * css/CSSImportRule.cpp: (WebCore::StyleRuleImport::setCSSStyleSheet): * css/CSSMediaRule.cpp: (WebCore::CSSMediaRule::insertRule): * css/CSSPageRule.cpp: (WebCore::CSSPageRule::setSelectorText): * css/CSSParser.cpp: (WebCore): (WebCore::strictCSSParserContext): (WebCore::CSSParserContext::CSSParserContext): (WebCore::CSSParser::CSSParser): (WebCore::CSSParser::parseKeyframeRule): (WebCore::CSSParser::parseValue): (WebCore::CSSParser::parseSelector): (WebCore::CSSParser::completeURL): (WebCore::CSSParser::parseContent): (WebCore::CSSParser::parseAttr): (WebCore::CSSParser::parseFillImage): (WebCore::CSSParser::parseFontFaceSrcURI): (WebCore::CSSParser::parseFontFaceSrc): (WebCore::CSSParser::parseBorderImage): (WebCore::CSSParser::parseImageSet): (WebCore::CSSParser::parseCustomFilter): (WebCore::CSSParser::parseFilter): (WebCore::CSSParser::cssRegionsEnabled): (WebCore::CSSParser::parseFlowThread): (WebCore::CSSParser::createMediaRule): (WebCore::CSSParser::createStyleRule): (WebCore::CSSParser::createFontFaceRule): (WebCore::CSSParser::createPageRule): (WebCore::CSSParser::createKeyframe): * css/CSSParser.h: (CSSParser): (WebCore::CSSParser::inStrictMode): (WebCore::CSSParser::inQuirksMode): (WebCore::CSSParser::validUnit): * css/CSSParserMode.h: (WebCore): (CSSParserContext): * css/CSSRule.h: (WebCore::CSSRule::parserContext): (CSSRule): * css/CSSStyleRule.cpp: (WebCore::CSSStyleRule::setSelectorText): * css/CSSStyleSheet.cpp: (WebCore::StyleSheetInternal::StyleSheetInternal): (WebCore::StyleSheetInternal::parseString): (WebCore::StyleSheetInternal::parseStringAtLine): (WebCore): (WebCore::StyleSheetInternal::updateBaseURL): (WebCore::StyleSheetInternal::completeURL): (WebCore::CSSStyleSheet::insertRule): * css/CSSStyleSheet.h: (StyleSheetInternal): (WebCore::StyleSheetInternal::parserContext): (WebCore::StyleSheetInternal::charset): (WebCore::StyleSheetInternal::setFinalURL): (WebCore::StyleSheetInternal::baseURL): * css/CSSValuePool.cpp: * css/StylePropertySet.cpp: (WebCore::StylePropertySet::parseDeclaration): * css/WebKitCSSKeyframesRule.cpp: (WebCore::WebKitCSSKeyframesRule::insertRule): * dom/Document.cpp: (WebCore::Document::webkitGetFlowByName): (WebCore::Document::pageUserSheet): (WebCore::Document::pageGroupUserSheets): * dom/Element.cpp: (WebCore::Element::webkitMatchesSelector): * dom/Node.cpp: (WebCore::Node::querySelector): (WebCore::Node::querySelectorAll): * dom/ProcessingInstruction.cpp: (WebCore::ProcessingInstruction::parseStyleSheet): * dom/StyleElement.cpp: (WebCore::StyleElement::createSheet): * html/HTMLLinkElement.cpp: (WebCore::HTMLLinkElement::setCSSStyleSheet): * html/shadow/ContentSelectorQuery.cpp: (WebCore::ContentSelectorQuery::ContentSelectorQuery): * inspector/InspectorStyleSheet.cpp: (WebCore::InspectorStyle::setPropertyText): (WebCore::InspectorStyleSheet::reparseStyleSheet): (WebCore::InspectorStyleSheet::ensureSourceData): (WebCore::InspectorStyleSheetForInlineStyle::getStyleAttributeRanges): 2012-04-15 Noel Gordon [Cairo] Separate image encoding from dataURL construction https://bugs.webkit.org/show_bug.cgi?id=83975 Reviewed by Martin Robinson. Remove the implicit assumption that a dataURL is the only desired output format of the image encoding phase. No new tests. Covered by existing canvas toDataURL tests. * platform/graphics/cairo/ImageBufferCairo.cpp: (WebCore::writeFunction): Rename closure to output. (WebCore::encodeImage): Output the encoded image to the provided Vector. PNG format is only supported per the Cairo encoding MIMETypeRegistry. (WebCore): (WebCore::ImageBuffer::toDataURL): Refactor to use encodeImage(). 2012-04-15 Yuta Kitamura Leak in WebSocketChannel with workers/worker-reload.html (part 2) https://bugs.webkit.org/show_bug.cgi?id=83749 Reviewed by David Levin. Second attempt to remove leaks around WorkerThreadableWebSocketChannel. No new tests, as this patch does not impose any functional change. * Modules/websockets/ThreadableWebSocketChannelClientWrapper.cpp: (WebCore::ThreadableWebSocketChannelClientWrapper::ThreadableWebSocketChannelClientWrapper): (WebCore::ThreadableWebSocketChannelClientWrapper::failedWebSocketChannelCreation): (WebCore::ThreadableWebSocketChannelClientWrapper::setFailedWebSocketChannelCreation): * Modules/websockets/ThreadableWebSocketChannelClientWrapper.h: Add a boolean flag indicating whether Bridge::initialize() has exited without receiving a pointer to the peer object. * Modules/websockets/WorkerThreadableWebSocketChannel.cpp: (WebCore::WorkerThreadableWebSocketChannel::WorkerContextDidInitializeTask::create): (WebCore::WorkerThreadableWebSocketChannel::WorkerContextDidInitializeTask::WorkerContextDidInitializeTask): (WebCore::WorkerThreadableWebSocketChannel::WorkerContextDidInitializeTask::performTask): Kick mainThreadDestroy() to delete the peer if the bridge has failed to receive a pointer to the peer (waitForMethodCompletion() exited due to message queue's termination). (WebCore::WorkerThreadableWebSocketChannel::Bridge::mainThreadInitialize): (WebCore::WorkerThreadableWebSocketChannel::Bridge::initialize): * Modules/websockets/WorkerThreadableWebSocketChannel.h: (WorkerThreadableWebSocketChannel): Make WorkerContextDidInitializeTask an inner class of WorkerThreadableWebSocketChannel so it can refer WorkerThreadableWebSocketChannel's static member function (mainThreadDestroy()). 2012-04-14 Emil A Eklund Fix pixelSnapping for CalendarPicker, MediaControl and ScrollbarPart https://bugs.webkit.org/show_bug.cgi?id=83929 Reviewed by Eric Seidel. Update CalendarPickerElement and MediaControlElements to use pixelSnappedSize in preparation for turning on subpixel support. Update RenderScrollbarPart to pixel snap rect before painting to ensure that it is painted on device pixel boundaries. No new tests, no change in functionality. * html/shadow/CalendarPickerElement.cpp: (WebCore::CalendarPickerElement::openPopup): * html/shadow/MediaControlElements.cpp: (WebCore::RenderMediaVolumeSliderContainer::layout): * rendering/RenderScrollbarPart.cpp: (WebCore::RenderScrollbarPart::paintIntoRect): 2012-04-14 Kent Tamura Day of week labels are wrong if WebCore::firstDayOfWeek() is not 0 https://bugs.webkit.org/show_bug.cgi?id=83990 Reviewed by Kentaro Hara. We passed the "weekStartDay" property value as a string. CalendarPickerElement::writeDocument() created: weekStartDay: "1", and the JavaScript code used it in the following code: dayLabels[(weekStartDay + i) % 7] If weekStartDay was "1", the expression (weekStartDay + i) produced "10", "11", "12", ... We expected "1", "2", "3", ... We need to pass the "weekStartDay" property as a number. No new tests because we have no ways to test this for now. We'll introduce tests for the calendar picker later. * html/shadow/CalendarPickerElement.cpp: (WebCore::addProperty): Add addProperty() function for a number. (WebCore::CalendarPickerElement::writeDocument): Pass a number, not a serialized number. 2012-04-14 Joe Thomas Viewport-percentage Length units does not work for Replaced elements size https://bugs.webkit.org/show_bug.cgi?id=83425 Reviewed by Antti Koivisto. Added the support for viewport-percentage length units while calculating the width/height of replaced elements. Tests: css3/viewport-percentage-lengths/viewport-percentage-image-size.html * platform/Length.h: (WebCore::Length::isSpecified): * rendering/RenderBox.cpp: (WebCore::RenderBox::computeReplacedLogicalWidthUsing): 2012-04-14 Joe Thomas CSSStyleDeclaration.getPropertyValue() for 'border-radius' returns null when value is set https://bugs.webkit.org/show_bug.cgi?id=80736 Reviewed by Antti Koivisto. Added support for fetching the value of 'border-radius' CSS property which was missing. Test: fast/css/border-radius-property-value.html * css/StylePropertySet.cpp: (WebCore::StylePropertySet::getPropertyValue): 2012-04-14 David Hyatt https://bugs.webkit.org/show_bug.cgi?id=83826 Wrong Font code path was chosen after r114032. The TextRun constructor has an additional argument that needs to be included if rounding hacks are mentioned. Reviewed by Dan Bernstein. * html/canvas/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::drawTextInternal): * rendering/RenderListBox.cpp: (WebCore::RenderListBox::paintItemForeground): * rendering/break_lines.cpp: (WebCore::nextBreakablePosition): 2012-04-14 Noel Gordon [Cairo] ImageBuffer::toDataURL(): improve error handling, add mimeType ASSERTs https://bugs.webkit.org/show_bug.cgi?id=83569 Reviewed by Eric Seidel. No new tests. Covered by exiting fast/canvas/*toDataURL* tests. * platform/graphics/cairo/ImageBufferCairo.cpp: (WebCore::writeFunction): Return write success or failure with the appropriate cairo status code per http://cairographics.org/manual/cairo-PNG-Support.html (WebCore::ImageBuffer::toDataURL): Add mimeType ASSERT()s. ensures that a valid mimeType (supported by the port) is sent to toDataURL() calls. Check for encoding failure and return "data:," if so. 2012-04-13 David Reveman [Chromium] Avoid unnecessary full tile updates for checkerboard tiles. https://bugs.webkit.org/show_bug.cgi?id=83804 Reviewed by James Robinson. Cleanup code that determines if we need to use a buffered update and avoid buffering of tiles that are not in use by the impl thread. Tests: CCLayerTreeHostTestAtomicCommitWithPartialUpdate.runMultiThread TiledLayerChromiumTest.partialUpdates * platform/graphics/chromium/TiledLayerChromium.cpp: (UpdatableTile): (WebCore::UpdatableTile::UpdatableTile): (WebCore::TiledLayerChromium::pushPropertiesTo): (WebCore::TiledLayerChromium::tileOnlyNeedsPartialUpdate): (WebCore::TiledLayerChromium::tileNeedsBufferedUpdate): (WebCore::TiledLayerChromium::updateTiles): * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::bufferedUpdates): (WebCore): * platform/graphics/chromium/cc/CCLayerTreeHost.h: (CCLayerTreeHost): 2012-04-13 Dana Jansens [chromium] Cleanup texture memory eviction when LayerTreeHost becomes invisible https://bugs.webkit.org/show_bug.cgi?id=83899 Reviewed by Adrienne Walker. When a LTH becomes invisible, the texture eviction is spread out across two different functions and is not entirely clear. We move all the logic together into a single place in didBecomeInvisibleOnImplThread() and make the consequences of the current code more clear. Covered by existing tests. * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::deleteContentsTexturesOnImplThread): (WebCore::CCLayerTreeHost::setVisible): (WebCore::CCLayerTreeHost::didBecomeInvisibleOnImplThread): 2012-04-13 Sheriff Bot Unreviewed, rolling out r114036. http://trac.webkit.org/changeset/114036 https://bugs.webkit.org/show_bug.cgi?id=83969 Breaks gmail.com causing it to never finish loading (Requested by danakj on #webkit). * bindings/scripts/CodeGeneratorJS.pm: (GenerateHeader): (GenerateImplementation): * bindings/scripts/CodeGeneratorV8.pm: (GenerateNamedConstructorCallback): (GenerateImplementation): * bindings/scripts/IDLAttributes.txt: * bindings/scripts/test/JS/JSTestObj.cpp: (WebCore::JSTestObj::createPrototype): * bindings/scripts/test/JS/JSTestObj.h: * bindings/scripts/test/TestObj.idl: * bindings/scripts/test/V8/V8Float64Array.cpp: (WebCore): * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp: (WebCore): * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp: (WebCore): * bindings/scripts/test/V8/V8TestEventConstructor.cpp: (WebCore): * bindings/scripts/test/V8/V8TestEventTarget.cpp: (WebCore): * bindings/scripts/test/V8/V8TestInterface.cpp: (WebCore): * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp: (WebCore): * bindings/scripts/test/V8/V8TestNamedConstructor.cpp: (WebCore): * bindings/scripts/test/V8/V8TestNode.cpp: (WebCore): * bindings/scripts/test/V8/V8TestObj.cpp: (WebCore): * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp: (WebCore): * bindings/v8/NPV8Object.cpp: (WebCore::npObjectTypeInfo): * bindings/v8/V8BindingPerContextData.cpp: (WebCore::V8BindingPerContextData::init): (WebCore::V8BindingPerContextData::createWrapperFromCacheSlowCase): (WebCore::V8BindingPerContextData::constructorForTypeSlowCase): * bindings/v8/V8BindingPerContextData.h: (V8BindingPerContextData): * bindings/v8/V8HiddenPropertyName.h: (WebCore): * bindings/v8/WrapperTypeInfo.h: (WrapperTypeInfo): * bindings/v8/custom/V8HTMLImageElementConstructor.cpp: (WebCore): * dom/NodeList.idl: 2012-04-13 Alexandre Elias [chromium] Add null pointer check to animatePageScale https://bugs.webkit.org/show_bug.cgi?id=83940 Reviewed by James Robinson. Add null pointer check to startPageScaleAnimation. If the root scroll layer goes away in the middle of a page scale animation, there can be a null pointer access here. No new tests. * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::animatePageScale): 2012-04-13 Dana Jansens [chromium] Replicas should be included in the computed occlusion https://bugs.webkit.org/show_bug.cgi?id=82262 Reviewed by Adrienne Walker. When merging a surface's occlusion up to its target, make a copy of it where the replica will be as well, and make sure that occlusion from a RenderSurface does not leave its clipRect. Unit test: CCOcclusionTrackerTestReplicaDoesOcclude CCOcclusionTrackerTestReplicaWithClipping CCOcclusionTrackerTestSurfaceChildOfSurface * platform/graphics/chromium/RenderSurfaceChromium.cpp: (WebCore::RenderSurfaceChromium::hasReplica): (WebCore): * platform/graphics/chromium/RenderSurfaceChromium.h: (RenderSurfaceChromium): * platform/graphics/chromium/cc/CCOcclusionTracker.cpp: (WebCore::transformSurfaceOpaqueRegion): (WebCore::::leaveToTargetRenderSurface): 2012-04-13 Raymond Liu AudioContext createChannelMerger() method should have optional argument for number of inputs. https://bugs.webkit.org/show_bug.cgi?id=83759 Reviewed by Chris Rogers. Check https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html for the optional argument. Test: webaudio/audiochannelmerger-basic.html * Modules/webaudio/AudioChannelMerger.cpp: (WebCore): (WebCore::AudioChannelMerger::create): (WebCore::AudioChannelMerger::AudioChannelMerger): * Modules/webaudio/AudioChannelMerger.h: (AudioChannelMerger): * Modules/webaudio/AudioContext.cpp: (WebCore::AudioContext::createChannelMerger): (WebCore): * Modules/webaudio/AudioContext.h: (AudioContext): * Modules/webaudio/AudioContext.idl: 2012-04-13 Dana Jansens [chromium] Remove viewport memory restrictions https://bugs.webkit.org/show_bug.cgi?id=83316 Reviewed by Adrienne Walker. We remove the memory restriction on web pages based on viewport size on desktop. This is causing pages that have complex use of layers to end up hitting our memory limits, and moreso when the window is small. Page complexity is not really a function of the viewport size. We drop the mininum memory limit entirely, and just evict all unprotected textures instead. Covered by existing tests. * platform/graphics/chromium/TextureManager.cpp: (WebCore::TextureManager::highLimitBytes): (WebCore::TextureManager::reclaimLimitBytes): * platform/graphics/chromium/TextureManager.h: (TextureManager): * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::beginCommitOnImplThread): (WebCore::CCLayerTreeHost::setVisible): (WebCore::CCLayerTreeHost::didBecomeInvisibleOnImplThread): (WebCore::CCLayerTreeHost::updateLayers): 2012-04-13 Ken Buchanan Optimize tracking of intruding floats being removed from RenderBlock during layout https://bugs.webkit.org/show_bug.cgi?id=82928 Reviewed by David Hyatt. Performance tweaks in RenderBlock layout as a follow up to r112935. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::clearFloats): 2012-04-13 Mihnea Ovidenie [CSSRegions]Implement NamedFlow::contentNodes attribute https://bugs.webkit.org/show_bug.cgi?id=80134 Reviewed by David Hyatt. The named flow content nodes collection contains those nodes with webkitFlowInto property set to 'flow'. In the list, the nodes are placed in document order. Nodes with display:none are also part of the list. The list of nodes is returned as a static node list. The content nodes are stored in RenderNamedFlowThread. The content nodes are added to the list in NodeRenderingContext::moveToFlowThreadIfNeeded and removed from the list in Element::detach. When an element -webkit-flow-into property is changed, the element is detached and attached. I have also added a bit in NodeFlags to mark that an element is part of a named flow (and the corresponding inNamedFlow/setInNamedFlow/clearInNamedFlow functions). Test: fast/regions/webkit-named-flow-content-nodes.html * dom/Document.cpp: (WebCore::Document::webkitGetFlowByName): * dom/Document.h: * dom/Element.cpp: (WebCore::Element::detach): * dom/Node.h: (WebCore::Node::inNamedFlow): (WebCore::Node::setInNamedFlow): (WebCore::Node::clearInNamedFlow): (Node): * dom/NodeRenderingContext.cpp: (WebCore::NodeRenderingContext::moveToFlowThreadIfNeeded): * dom/WebKitNamedFlow.cpp: (WebCore::WebKitNamedFlow::contentNodes): (WebCore): * dom/WebKitNamedFlow.h: (WebKitNamedFlow): * dom/WebKitNamedFlow.idl: * rendering/FlowThreadController.cpp: (WebCore::FlowThreadController::registerNamedFlowContentNode): (WebCore): (WebCore::FlowThreadController::unregisterNamedFlowContentNode): * rendering/FlowThreadController.h: (FlowThreadController): * rendering/RenderNamedFlowThread.cpp: (WebCore): (WebCore::RenderNamedFlowThread::registerNamedFlowContentNode): (WebCore::RenderNamedFlowThread::unregisterNamedFlowContentNode): * rendering/RenderNamedFlowThread.h: (WebCore): (RenderNamedFlowThread): (WebCore::RenderNamedFlowThread::contentNodes): (WebCore::RenderNamedFlowThread::hasContentNode): 2012-04-13 Jessie Berlin Remove the calls to CRASH() from ResourceLoader.cpp. https://bugs.webkit.org/show_bug.cgi?id=83962 Reviewed by Alexey Proskuryakov. They were added in r91316 to aid debugging for the issue fixed in r105556 and r106130. * loader/ResourceLoader.cpp: (WebCore::ResourceLoader::willSendRequest): (WebCore::ResourceLoader::didSendData): (WebCore::ResourceLoader::didReceiveResponse): (WebCore::ResourceLoader::didReceiveData): (WebCore::ResourceLoader::didFinishLoading): (WebCore::ResourceLoader::didFail): (WebCore::ResourceLoader::wasBlocked): (WebCore::ResourceLoader::cannotShowURL): (WebCore::ResourceLoader::shouldUseCredentialStorage): (WebCore::ResourceLoader::willCacheResponse): 2012-04-13 Xiaomei Ji REGRESSION(r102190) [chromium] text rendering (font and font size) in some Arabic/Persian page is wrong when using certain fonts https://bugs.webkit.org/show_bug.cgi?id=83523 Reviewed by Kent Tamura. Revert r102190. Convert characters being treatAsSpace to white space. * platform/graphics/chromium/UniscribeHelper.cpp: (WebCore::UniscribeHelper::fillRuns): (WebCore::UniscribeHelper::adjustSpaceAdvances): 2012-04-13 Timothy Hatcher Change how the Web Insector is installed on Mac builds. Reviewed by Mark Rowe. * WebCore.xcodeproj/project.pbxproj: Updated Copy Inspector Resources and Streamline Inspector Source build phases. 2012-04-13 Jer Noble Video at apple.com gets standard controls in addition to custom controls after returning from full screen https://bugs.webkit.org/show_bug.cgi?id=83939 Reviewed by Eric Carlson. No new tests; DRT and WKTR don't have the infrastructure to test full-screen animation related bugs. Instead of asking the media element whether it is in full screen or not, rely on when the media root element was told that it enteredFullscreen() or exitedFullscreen(), which may occur at a different time than the media element due to animations. * html/shadow/MediaControlRootElement.cpp: (WebCore::MediaControlRootElement::reset): (WebCore::MediaControlRootElement::playbackStarted): (WebCore::MediaControlRootElement::enteredFullscreen): (WebCore::MediaControlRootElement::exitedFullscreen): (WebCore::MediaControlRootElement::defaultEventHandler): (WebCore::MediaControlRootElement::startHideFullscreenControlsTimer): (WebCore::MediaControlRootElement::hideFullscreenControlsTimerFired): * html/shadow/MediaControlRootElement.h: (MediaControlRootElement): Added m_isFullscreen; 2012-04-13 Jer Noble fullscreen/video-controls-drag.html failing on Mac https://bugs.webkit.org/show_bug.cgi?id=81176 Reviewed by Eric Carlson. No new tests. Fixes fullscreen/video-controls-drag.html. Regressed in r110409. When the -webkit-media-controls-panel were changed from position:absolute to position:relative, this broke dragging of the controls in fullscreen, which relies on the panel being absolutely positioned to do its drag positioning. Change the way drag positioning is calculated to accommodate position:relative. * css/fullscreenQuickTime.css: (video:-webkit-full-screen::-webkit-media-controls-panel): Instead of bottom:50px, use margin-bottom:50px to push panel up from the bottom of the screen. * html/shadow/MediaControlElements.cpp: (WebCore::MediaControlPanelElement::startDrag): Do not ask for the current renderer location. (WebCore::MediaControlPanelElement::continueDrag): Use the delta between the event locations only to calculate the new panel position. * html/shadow/MediaControlElements.h: 2012-04-13 Simon Fraser Compositing layers not updated after scroll in WebKit1 https://bugs.webkit.org/show_bug.cgi?id=83945 Reviewed by James Robinson. Fix the WebKit1 code path to correctly update compositing layers after a scroll, by calling updateFixedElementsAfterScrolling() from scrollPositionChangedViaPlatformWidget(). Covered by existing tests. * page/FrameView.cpp: (WebCore::FrameView::scrollPositionChangedViaPlatformWidget): 2012-04-13 Dean Jackson Don't process filters if the input region is exceptionally large. https://bugs.webkit.org/show_bug.cgi?id=83317 Reviewed by Simon Fraser. An extremely large element causes problems with filters, either by taking too long to compute the output or using too much memory. The filter engine already has some constants for maximum expected size. Make sure the render tree checks them before deciding to apply effects. Tests: css3/filters/huge-region-composited.html css3/filters/huge-region.html * platform/graphics/filters/FilterEffect.cpp: (WebCore::FilterEffect::apply): * rendering/FilterEffectRenderer.cpp: (WebCore): (WebCore::isFilterSizeValid): (WebCore::FilterEffectRenderer::build): (WebCore::FilterEffectRenderer::updateBackingStore): (WebCore::FilterEffectRendererHelper::beginFilterEffect): * rendering/FilterEffectRenderer.h: (FilterEffectRenderer): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::updateOrRemoveFilterEffect): 2012-04-13 Anna Cavender Queue the cuechange event on HTMLTrackElement for proper sorting. https://bugs.webkit.org/show_bug.cgi?id=83858 Reviewed by Eric Carlson. No new tests. Updates to media/track/track-cues-cuechange.html and media/track/track-mode.html * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::updateActiveTextTrackCues): Add HTMLTrackElement's cuechange event to the event queue rather than firing it synchronously. * html/track/LoadableTextTrack.cpp: Remove fireCueChangeEvent() as it is no longer used. * html/track/LoadableTextTrack.h: Ditto. * html/track/TextTrack.h: (TextTrack): Ditto. 2012-04-11 Antonio Gomes Be more restrictive when adding ScrollableArea's to FrameView's ScrollableArea's map https://bugs.webkit.org/show_bug.cgi?id=79611 Reviewed by James Robinson. Source/WebCore: As of today, any FrameView attached to the Widget-tree or any RenderLayer whose corresponding RenderBox's style has a 'overflow' property set to 'auto' is cached in its containing scrollable areas set. We could be more restrictive about what we in fact want to cache as scrollable areas, by checking if the element as an overflow (i.e. more content than its viewport). * page/FrameView.cpp: (WebCore::FrameView::setFrameRect): Whenever the viewport changes, check if we have an scrollable/overflowed content, and update the cache accordingly. (WebCore::FrameView::setContentsSize): Whenever the contents size changes, check if we have a scrollable/overflowed content, and update the cache accordingly. (WebCore::FrameView::calculateScrollbarModesForLayout): Introduces a way to query for the scrollbars by only taking into account the "rules" set by the web author. For that, a new enum was added called SrollbarModesCalculationStrategy, which allows callers to discard for example client-side scrollbar policies in order to verify if a given frameview is scrollable or not. (WebCore::FrameView::updateScrollableAreaSet): Take into account various factors before considering a FrameView as scrollable. If in the end it is, it gets added to its parent FrameView scrollable areas map, otherwise removed. (WebCore): (WebCore::FrameView::addScrollableArea): Became unneeded, thus removed. (WebCore::FrameView::removeScrollableArea): Whenever a FrameView is removed from the Widget-tree, remove it from the cache. * page/FrameView.h: (FrameView): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::updateScrollbarsAfterLayout): Update scrollable area set after layout. (WebCore::RenderLayer::updateScrollbarsAfterStyleChange): Update scrollable area set after style changes. (WebCore::RenderLayer::styleChanged): Removed the scrollable areas logic detection from it. (WebCore::RenderLayer::updateScrollableAreaSet): Updates the containing FrameView scrollable areas cache only when needed (i.e. an overflow exists). (WebCore): * rendering/RenderLayer.h: (RenderLayer): * testing/Internals.cpp: (WebCore::Internals::numberOfScrollableAreas): (WebCore): * testing/Internals.h: (Internals): * testing/Internals.idl: Tests: fast/scrolling/scrollable-area-frame-inherited-visibility-hidden.html fast/scrolling/scrollable-area-frame-overflow-hidden.html fast/scrolling/scrollable-area-frame-overried-inherited-visibility-hidden.html fast/scrolling/scrollable-area-frame-scrolling-no-overried-inherited-visibility-hidden.html fast/scrolling/scrollable-area-frame-scrolling-no-visibility-hidden-child.html fast/scrolling/scrollable-area-frame-scrolling-no.html fast/scrolling/scrollable-area-frame-scrolling-yes-display-none.html fast/scrolling/scrollable-area-frame-scrolling-yes.html fast/scrolling/scrollable-area-frame-visibility-hidden-child.html fast/scrolling/scrollable-area-frame-zero-size-and-border.html fast/scrolling/scrollable-area-frame.html fast/scrolling/scrollable-area-overflow-auto-display-none-in-parent.html fast/scrolling/scrollable-area-overflow-auto-display-none.html fast/scrolling/scrollable-area-overflow-auto-visibility-hidden-in-parent.html fast/scrolling/scrollable-area-overflow-auto-visibility-hidden.html fast/scrolling/scrollable-area-overflow-auto-visibility-override.html fast/scrolling/scrollable-area-overflow-auto-visibility-visible.html fast/scrolling/scrollable-area-overflow-auto.html fast/scrolling/scrollable-area-overflow-not-set.html fast/scrolling/scrollable-area-overflow-visible.html 2012-04-13 Antti Koivisto Track rem unit usage in StyleSheetInternal https://bugs.webkit.org/show_bug.cgi?id=83923 Reviewed by Andreas Kling. Currently CSSParser sets usesRemUnits flag directly to Document. It should be set to the stylesheet instead so parser does not need to know about the document. This also avoids setting the flag unnecessarily when the stylesheet is not used. * css/CSSGrammar.y: * css/CSSStyleSheet.cpp: (WebCore::StyleSheetInternal::StyleSheetInternal): * css/CSSStyleSheet.h: (WebCore::StyleSheetInternal::parserSetUsesRemUnits): (WebCore::StyleSheetInternal::usesRemUnits): (StyleSheetInternal): * dom/Document.cpp: (WebCore): (WebCore::checkUsesRemUnits): (WebCore::Document::updateActiveStylesheets): * dom/Document.h: (WebCore::Document::usesRemUnits): 2012-04-11 James Robinson [chromium] Remove unused compositeToTexture / compositeOffscreen setting https://bugs.webkit.org/show_bug.cgi?id=83733 Reviewed by Adrienne Walker. Remove compositeOffscreen setting and implementation. This was an experiment that is no longer needed. * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::finishDrawingFrame): (WebCore::LayerRendererChromium::useRenderSurface): (WebCore::LayerRendererChromium::setScissorToRect): * platform/graphics/chromium/LayerRendererChromium.h: (LayerRendererChromium): * platform/graphics/chromium/cc/CCLayerTreeHost.h: (WebCore::CCSettings::CCSettings): (CCSettings): 2012-04-13 Alexey Proskuryakov REGRESSION (XHR Caching): Uncacheable responses sent by Rails through Apache are cached https://bugs.webkit.org/show_bug.cgi?id=83925 Reviewed by Antti Koivisto. Added subtests to http/tests/cache/subresource-expiration-2.html. * platform/network/ResourceResponseBase.cpp: (WebCore::ResourceResponseBase::parseCacheControlDirectives): Honor first max-age instead of the last. New behavior matches both Firefox and IE. 2012-04-13 James Robinson [chromium] Move WebVideoFrame into Platform and remove WebCore::VideoFrameChromium wrapper API https://bugs.webkit.org/show_bug.cgi?id=83851 Reviewed by Adam Barth. Remove VideoFrameChromium wrapper and converts WebCore code to using the Platform WebVideoFrame API directly. Some utility code that previously existed on VideoFrameChromium and only had one caller, such as doing width/height adjustements for YV12 frames, is moved into the calling code (CCVideoLayerImpl). Covered by existing media/ and compositing/ layout tests. * WebCore.gypi: * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::drawYUV): (WebCore::LayerRendererChromium::drawRGBA): (WebCore::LayerRendererChromium::copyFrameToTextures): * platform/graphics/chromium/LayerRendererChromium.h: * platform/graphics/chromium/VideoFrameProvider.h: (VideoFrameProvider): * platform/graphics/chromium/cc/CCVideoDrawQuad.cpp: (WebCore::CCVideoDrawQuad::create): (WebCore::CCVideoDrawQuad::CCVideoDrawQuad): * platform/graphics/chromium/cc/CCVideoDrawQuad.h: (WebKit): (CCVideoDrawQuad): (WebCore::CCVideoDrawQuad::frame): * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp: (WebCore): (WebCore::convertVFCFormatToGC3DFormat): (WebCore::CCVideoLayerImpl::willDraw): (WebCore::videoFrameDimension): (WebCore::hasPaddingBytes): (WebCore::CCVideoLayerImpl::computeVisibleSize): (WebCore::CCVideoLayerImpl::reserveTextures): * platform/graphics/chromium/cc/CCVideoLayerImpl.h: (WebKit): 2012-04-13 Rob Flack Chromium: Should enable -webkit-image-set https://bugs.webkit.org/show_bug.cgi?id=81859 Reviewed by Adam Barth. Test: fast/css/image-set-parsing.html * WebCore.gypi: 2012-04-12 Michael Nordman [chromium] Now that the chromium port is using a different dom_storage backend library in its main browser process, there are a handful of files that should no longer be included in the build, and a few files than should be deleted outright, and the webkit api should be modified to reflect the new (and smaller) contract between the embedder and webkit/webcore. https://bugs.webkit.org/show_bug.cgi?id=83807 Reviewed by Adam Barth. No new tests, existing tests apply. * WebCore.gyp/WebCore.gyp: Exclude several files from the WebCore/storage directory. * storage/StorageEventDispatcher.h: Delete a stale comment. 2012-04-13 Sheriff Bot Unreviewed, rolling out r114140. http://trac.webkit.org/changeset/114140 https://bugs.webkit.org/show_bug.cgi?id=83921 Fails fast/css/image-set-parsing.html test it attempts to introduce. (Requested by scheib on #webkit). * WebCore.gypi: 2012-04-13 Dan Bernstein Pixel access canvas APIs do not operate at backing store resolution https://bugs.webkit.org/show_bug.cgi?id=83836 Reviewed by Darin Adler. Test: fast/canvas/2d.imageDataHD.html Added getImageDataHD and putImageDataHD functions to CanvasRenderingContext2D, as proposed in . The functions are prefixed with “webkit” for now. * html/canvas/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::getImageData): Added this cover function that calls through to getImageData with LogicalCoordinateSystem. (WebCore::CanvasRenderingContext2D::webkitGetImageDataHD): Added. Calls through to getImageData with BackingStoreCoordinateSystem. (WebCore::CanvasRenderingContext2D::getImageData): Added a CoordinateSystem parameter to this now-private function. It is passed through to ImageBuffer::getUnmultipliedImageData(). (WebCore::CanvasRenderingContext2D::putImageData): Added this cover function that calls through to putImageData with LogicalCoordinateSystem. (WebCore::CanvasRenderingContext2D::webkitPutImageDataHD): Added. Calls through to putImageData with BackingStoreCoordinateSystem. (WebCore::CanvasRenderingContext2D::putImageData): Added a CoordinateSystem parameter to this function. It is passed through to ImageBuffer::putByteArray, and used to compute the rect to invalidate after the drawing operation. * html/canvas/CanvasRenderingContext2D.h: * html/canvas/CanvasRenderingContext2D.idl: Added webkitPutImageDataHD() and webkitGetImageDataHD(). * platform/graphics/ImageBuffer.h: Added a CoordinateSystem enum with the values LogicalCoordinateSystem and BackingStoreCoordinateSystem. Added a CoordinateSystem parameter, which defaults to LogicalCoordinateSystem, to getUnmultipliedImageData, getPremultipliedImageData, and putByteArray. * platform/graphics/cairo/ImageBufferCairo.cpp: (WebCore::ImageBuffer::getUnmultipliedImageData): (WebCore::ImageBuffer::getPremultipliedImageData): (WebCore::ImageBuffer::putByteArray): (WebCore::ImageBuffer::toDataURL): * platform/graphics/cg/ImageBufferCG.cpp: (WebCore::ImageBuffer::getUnmultipliedImageData): Now uses the CoordinateSystem parameter to decide whether to ask ImageBufferDaya::getData() to apply the resolution scale or not. (WebCore::ImageBuffer::getPremultipliedImageData): Ditto. (WebCore::ImageBuffer::putByteArray): Now uses the CoordinateSystem parameter to decide whether to maintain the resolution scale while drawing or not. (WebCore::ImageBuffer::toDataURL): * platform/graphics/gtk/ImageBufferGtk.cpp: (WebCore::ImageBuffer::toDataURL): * platform/graphics/qt/ImageBufferQt.cpp: (WebCore::ImageBuffer::getUnmultipliedImageData): (WebCore::ImageBuffer::getPremultipliedImageData): (WebCore::ImageBuffer::putByteArray): (WebCore::ImageBuffer::toDataURL): * platform/graphics/skia/ImageBufferSkia.cpp: (WebCore::ImageBuffer::getUnmultipliedImageData): (WebCore::ImageBuffer::getPremultipliedImageData): (WebCore::ImageBuffer::putByteArray): (WebCore::ImageBuffer::toDataURL): * platform/graphics/wince/ImageBufferWinCE.cpp: (WebCore::ImageBuffer::getUnmultipliedImageData): (WebCore::ImageBuffer::getPremultipliedImageData): (WebCore::ImageBuffer::putByteArray): (WebCore::ImageBuffer::toDataURL): * platform/graphics/wx/ImageBufferWx.cpp: (WebCore::ImageBuffer::getUnmultipliedImageData): (WebCore::ImageBuffer::getPremultipliedImageData): (WebCore::ImageBuffer::putByteArray): (WebCore::ImageBuffer::toDataURL): 2012-04-12 Shawn Singh [chromium] Support CCHeadsUpDisplay in threaded compositing mode https://bugs.webkit.org/show_bug.cgi?id=67499 Reviewed by James Robinson. No new tests because this code is debugging code itself. The last item that was needed to make the CCHeadsUpDisplay work in threaded compositing mode was to remove the font rendering code used on the impl-side thread. To solve this, this patch adds a CCFontAtlas that is initialized on the main thread (where the font rendering takes place). Then, when the HUD draws text on the impl thread, it uses the font atlas directly. * WebCore.gypi: * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::create): (WebCore::LayerRendererChromium::initialize): * platform/graphics/chromium/LayerRendererChromium.h: (WebCore): (LayerRendererChromium): * platform/graphics/chromium/cc/CCFontAtlas.cpp: Added. (WebCore): (WebCore::CCFontAtlas::CCFontAtlas): (WebCore::wrapPositionIfNeeded): (WebCore::CCFontAtlas::generateAtlasForFont): (WebCore::CCFontAtlas::initialize): (WebCore::CCFontAtlas::drawText): (WebCore::CCFontAtlas::drawOneLineOfTextInternal): (WebCore::CCFontAtlas::drawDebugAtlas): * platform/graphics/chromium/cc/CCFontAtlas.h: Added. (WebCore): (CCFontAtlas): (WebCore::CCFontAtlas::create): * platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp: (WebCore::CCHeadsUpDisplay::CCHeadsUpDisplay): (WebCore): (WebCore::CCHeadsUpDisplay::showPlatformLayerTree): (WebCore::CCHeadsUpDisplay::drawHudContents): (WebCore::CCHeadsUpDisplay::drawFPSCounter): (WebCore::CCHeadsUpDisplay::drawFPSCounterText): (WebCore::CCHeadsUpDisplay::drawPlatformLayerTree): * platform/graphics/chromium/cc/CCHeadsUpDisplay.h: (WebCore::CCHeadsUpDisplay::create): (CCHeadsUpDisplay): * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::initialize): * platform/graphics/chromium/cc/CCLayerTreeHost.h: (WebCore): (WebCore::CCLayerTreeHost::headsUpDisplayFontAtlas): (CCLayerTreeHost): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::initializeLayerRenderer): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: (WebCore): (CCLayerTreeHostImpl): * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp: (WebCore::CCSingleThreadProxy::initializeLayerRenderer): (WebCore::CCSingleThreadProxy::recreateContext): * platform/graphics/chromium/cc/CCThreadProxy.cpp: (WebCore::CCThreadProxy::initializeLayerRendererOnImplThread): (WebCore::CCThreadProxy::recreateContextOnImplThread): 2012-04-13 Rob Flack Chromium: Should enable -webkit-image-set https://bugs.webkit.org/show_bug.cgi?id=81859 Reviewed by Adam Barth. Test: fast/css/image-set-parsing.html * WebCore.gypi: 2012-04-13 Pavel Feldman Web Inspector: do not attempt to load content from resource until request finished loading. https://bugs.webkit.org/show_bug.cgi?id=83896 Reviewed by Yury Semikhatsky. When we stop in the inline script on reload, we should only show concatenated script content. When we resume, we should replace UI source code with the actual HTML content. We should not attempt to fetch resource content until request finished loading. I regressed it in the Request extraction and now am bringing it back. * inspector/front-end/RawSourceCode.js: (WebInspector.RawSourceCode): (WebInspector.RawSourceCode.prototype._finishedLoading): * inspector/front-end/ResourceScriptMapping.js: (WebInspector.ResourceScriptMapping.prototype.addScript): 2012-04-13 Pavel Feldman Web Inspector: follow up to r114116 - fixing QT test https://bugs.webkit.org/show_bug.cgi?id=83892 Reviewed by Yury Semikhatsky. Requesting content for the scripts exclusively via the page agent now. * inspector/front-end/Resource.js: (WebInspector.Resource.prototype.get content): (WebInspector.Resource.prototype.get contentEncoded): (WebInspector.Resource.prototype.requestContent): (WebInspector.ResourceRevision.prototype.requestContent): 2012-04-13 Yi Shen InsertHTML fails to insert h6 if the insertion point is before some text. https://bugs.webkit.org/show_bug.cgi?id=82689 Reviewed by Ryosuke Niwa. Added the missing h6 tag for the isHeaderElement. No new tests: updated existing test (editing/execCommand/4128080-1.html) * editing/ReplaceSelectionCommand.cpp: (WebCore::isHeaderElement): 2012-04-13 Yury Semikhatsky Web Inspector: exception in heap profiler when expanding a class in summary view https://bugs.webkit.org/show_bug.cgi?id=83883 Moved all DOM-specific inspector utilities into DOMExtension.js Merged BinarySearch.js and PartialQuickSort.js into utilities.js, HeapSnapshotWorker.js now imports utilities.js which contains all required routines. Reviewed by Pavel Feldman. * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * inspector/compile-front-end.py: * inspector/front-end/BinarySearch.js: Removed. * inspector/front-end/DOMExtension.js: Copied from Source/WebCore/inspector/front-end/utilities.js. (Node.prototype.rangeOfWord): (Node.prototype.traverseNextTextNode): (Node.prototype.rangeBoundaryForOffset): (Element.prototype.removeStyleClass): (Element.prototype.removeMatchingStyleClasses): (Element.prototype.addStyleClass): (Element.prototype.hasStyleClass): (Element.prototype.positionAt): (Element.prototype.pruneEmptyTextNodes): (Element.prototype.isScrolledToBottom): (Node.prototype.enclosingNodeOrSelfWithNodeNameInArray): (Node.prototype.enclosingNodeOrSelfWithNodeName): (Node.prototype.enclosingNodeOrSelfWithClass): (Node.prototype.enclosingNodeWithClass): (Element.prototype.query): (Element.prototype.removeChildren): (Element.prototype.isInsertionCaretInside): (Element.prototype.createChild): (Element.prototype.totalOffsetLeft): (Element.prototype.totalOffsetTop): (Element.prototype.totalOffset): (Element.prototype.scrollOffset): (AnchorBox): (Element.prototype.offsetRelativeToWindow): (Element.prototype.boxInWindow): (Element.prototype.setTextAndTitle): (Event.prototype.consume): (Text.prototype.select): (Element.prototype.selectionLeftOffset): (Node.prototype.isAncestor): (Node.prototype.isDescendant): (Node.prototype.isSelfOrAncestor): (Node.prototype.isSelfOrDescendant): (Node.prototype.traverseNextNode): (Node.prototype.traversePreviousNode): (HTMLTextAreaElement.prototype.moveCursorToEnd): (isEnterKey): (consumeEvent): (highlightSearchResult): (highlightSearchResults): (highlightRangesWithStyleClass): (applyDomChanges): (revertDomChanges): * inspector/front-end/HeapSnapshot.js: Fixed a couple of js compiler warnings by describing structure of heap snapshot header in the protocol. (WebInspector.HeapSnapshotLoader.prototype.pushJSONChunk): * inspector/front-end/HeapSnapshotWorker.js: * inspector/front-end/PartialQuickSort.js: Removed. * inspector/front-end/WebKit.qrc: * inspector/front-end/inspector.html: * inspector/front-end/utilities.js: (.): 2012-04-13 Sheriff Bot Unreviewed, rolling out r114103. http://trac.webkit.org/changeset/114103 https://bugs.webkit.org/show_bug.cgi?id=83884 New breakpoint UI looks bad / needs polish. (Requested by pfeldman_ on #webkit). * inspector/front-end/Images/breakpointConditionalCounterBorder.png: * inspector/front-end/Images/breakpointCounterBorder.png: * inspector/front-end/Images/programCounterBorder.png: * inspector/front-end/textViewer.css: (.webkit-execution-line .webkit-line-number-outer): (.webkit-breakpoint.webkit-execution-line .webkit-line-number-outer): (.webkit-breakpoint-conditional.webkit-execution-line .webkit-line-number-outer): 2012-04-13 Jason Liu [BlackBerry] Sign in cookie for ESPN.com does not retain login account (for fantasy sports). https://bugs.webkit.org/show_bug.cgi?id=83760 Reviewed by George Staikos. When we update cookies' database, protocol shouldn't be checked since it is not a cookie's key. ESPN.com's https cookies should replace old http cookies if they have the same keys(name, path, domain). We must restart the browser to test, so have to write a manual test case. Test: ManualTests/blackberry/http-cookie-database-set.php * platform/blackberry/CookieDatabaseBackingStore/CookieDatabaseBackingStore.cpp: (WebCore::CookieDatabaseBackingStore::invokeOpen): 2012-04-12 Jocelyn Turcotte [Qt] Use QQuickFlickable::setPixelAligned instead of doing pixel-alignment when rendering. https://bugs.webkit.org/show_bug.cgi?id=83770 Reviewed by Kenneth Rohde Christiansen. Revert the previous way of dealing with things. The problem is that different layers would end up rounding in different directions, and would cause jittering between layers or with the QQuickWebPage's background. * platform/graphics/texmap/TextureMapperGL.cpp: (WebCore::TextureMapperGL::drawTexture): 2012-04-13 Pavel Feldman Web Inspector: introduce ParsedURL type, clean up url and displayName mess in Resource and NetworkRequest. https://bugs.webkit.org/show_bug.cgi?id=83871 Reviewed by Yury Semikhatsky. There is a number of random properties created on Resource and NetworkRequest that represent various url fragments. Display name is being based on them and sometimes requires fake Resource instance to be created. This change (officially) introduces WebInspector.ParsedURL as a type that encapsulates this complexity. This change also moves documentURL property into the Resource and NetworkRequest constructors and brushes up factory methods used to create the objects. * inspector/front-end/AuditRules.js: (WebInspector.AuditRules.GzipRule.prototype._shouldCompress): (WebInspector.AuditRules.CookieSizeRule.prototype.processCookies): * inspector/front-end/Database.js: (WebInspector.Database.prototype.get displayDomain): * inspector/front-end/JavaScriptContextManager.js: (WebInspector.FrameEvaluationContext.prototype.get displayName): * inspector/front-end/NetworkManager.js: (WebInspector.NetworkDispatcher.prototype.webSocketCreated): (WebInspector.NetworkDispatcher.prototype._createNetworkRequest): (get WebInspector): * inspector/front-end/NetworkPanel.js: (WebInspector.NetworkLogView.prototype._highlightNthMatchedRequest): (WebInspector.NetworkDataGridNode.prototype._refreshNameCell): * inspector/front-end/NetworkRequest.js: (WebInspector.NetworkRequest): (WebInspector.NetworkRequest.prototype.set url): (WebInspector.NetworkRequest.prototype.get documentURL): (WebInspector.NetworkRequest.prototype.get parsedURL): (WebInspector.NetworkRequest.prototype.get displayName): (WebInspector.NetworkRequest.prototype.get folder): * inspector/front-end/RequestHeadersView.js: (WebInspector.RequestHeadersView.prototype._refreshUrlFragment): * inspector/front-end/Resource.js: (WebInspector.Resource): (WebInspector.Resource.prototype.set url): (WebInspector.Resource.prototype.get parsedURL): (WebInspector.Resource.prototype.get frameId): (WebInspector.Resource.prototype.get loaderId): (WebInspector.Resource.prototype.get displayName): * inspector/front-end/ResourceTreeModel.js: (WebInspector.ResourceTreeModel.prototype._onRequestUpdateDropped): (WebInspector.ResourceTreeModel.prototype._addFramesRecursively): (WebInspector.ResourceTreeModel.prototype._createResourceFromFramePayload): (WebInspector.ResourceTreeFrame.prototype._addRequest): * inspector/front-end/ResourceUtils.js: (WebInspector.ParsedURL): (WebInspector.ParsedURL.prototype.get displayName): (String.prototype.asParsedURL): (WebInspector.displayDomain): (WebInspector.resourceURLForRelatedNode.callback): (WebInspector.resourceURLForRelatedNode): * inspector/front-end/ResourcesPanel.js: (WebInspector.FrameTreeElement.prototype.frameNavigated): (WebInspector.ApplicationCacheManifestTreeElement): (WebInspector.ApplicationCacheFrameTreeElement.prototype._refreshTitles): * inspector/front-end/utilities.js: 2012-04-13 Pavel Feldman Web Inspector: extracting NetworkRequest from Resource (step 3) https://bugs.webkit.org/show_bug.cgi?id=83802 Reviewed by Yury Semikhatsky. This change extracts NetworkRequest from the Resource. It is now clear that these two should have super class that would be responsible for parsing URL and would define the requestContent signature. Corresponding patch will follow. * inspector/front-end/NetworkManager.js: * inspector/front-end/NetworkRequest.js: (WebInspector.NetworkRequest): (WebInspector.NetworkRequest.prototype.get requestId): (WebInspector.NetworkRequest.prototype.set requestId): (WebInspector.NetworkRequest.prototype.get url): (WebInspector.NetworkRequest.prototype.get frameId): (WebInspector.NetworkRequest.prototype.get loaderId): (WebInspector.NetworkRequest.prototype.get startTime): (WebInspector.NetworkRequest.prototype.set startTime): (WebInspector.NetworkRequest.prototype.get responseReceivedTime): (WebInspector.NetworkRequest.prototype.set responseReceivedTime): (WebInspector.NetworkRequest.prototype.get endTime): (WebInspector.NetworkRequest.prototype.set endTime): (WebInspector.NetworkRequest.prototype.get duration): (WebInspector.NetworkRequest.prototype.get latency): (WebInspector.NetworkRequest.prototype.get receiveDuration): (WebInspector.NetworkRequest.prototype.get resourceSize): (WebInspector.NetworkRequest.prototype.set resourceSize): (WebInspector.NetworkRequest.prototype.get transferSize): (WebInspector.NetworkRequest.prototype.increaseTransferSize): (WebInspector.NetworkRequest.prototype.get finished): (WebInspector.NetworkRequest.prototype.set finished): (WebInspector.NetworkRequest.prototype.get failed): (WebInspector.NetworkRequest.prototype.set failed): (WebInspector.NetworkRequest.prototype.get canceled): (WebInspector.NetworkRequest.prototype.set canceled): (WebInspector.NetworkRequest.prototype.get cached): (WebInspector.NetworkRequest.prototype.set cached): (WebInspector.NetworkRequest.prototype.get timing): (WebInspector.NetworkRequest.prototype.set timing): (WebInspector.NetworkRequest.prototype.get mimeType): (WebInspector.NetworkRequest.prototype.set mimeType): (WebInspector.NetworkRequest.prototype.get displayName): (WebInspector.NetworkRequest.prototype.get folder): (WebInspector.NetworkRequest.prototype.get displayDomain): (WebInspector.NetworkRequest.prototype.get type): (WebInspector.NetworkRequest.prototype.set type): (WebInspector.NetworkRequest.prototype.get redirectSource): (WebInspector.NetworkRequest.prototype.set redirectSource): (WebInspector.NetworkRequest.prototype.get requestHeaders): (WebInspector.NetworkRequest.prototype.set requestHeaders): (WebInspector.NetworkRequest.prototype.get requestHeadersText): (WebInspector.NetworkRequest.prototype.set requestHeadersText): (WebInspector.NetworkRequest.prototype.get requestHeadersSize): (WebInspector.NetworkRequest.prototype.requestHeaderValue): (WebInspector.NetworkRequest.prototype.get requestCookies): (WebInspector.NetworkRequest.prototype.get requestFormData): (WebInspector.NetworkRequest.prototype.set requestFormData): (WebInspector.NetworkRequest.prototype.get requestHttpVersion): (WebInspector.NetworkRequest.prototype.get responseHeaders): (WebInspector.NetworkRequest.prototype.set responseHeaders): (WebInspector.NetworkRequest.prototype.get responseHeadersText): (WebInspector.NetworkRequest.prototype.set responseHeadersText): (WebInspector.NetworkRequest.prototype.get responseHeadersSize): (WebInspector.NetworkRequest.prototype.responseHeaderValue): (WebInspector.NetworkRequest.prototype.get responseCookies): (WebInspector.NetworkRequest.prototype.get queryParameters): (WebInspector.NetworkRequest.prototype.get formParameters): (WebInspector.NetworkRequest.prototype.get responseHttpVersion): (WebInspector.NetworkRequest.prototype._parseParameters): (WebInspector.NetworkRequest.prototype._headerValue): (WebInspector.NetworkRequest.prototype.get content): (WebInspector.NetworkRequest.prototype.get contentEncoded): (WebInspector.NetworkRequest.prototype.requestContent): (WebInspector.NetworkRequest.prototype.isHttpFamily): (WebInspector.NetworkRequest.prototype.requestContentType): (WebInspector.NetworkRequest.prototype.isPingRequest): (WebInspector.NetworkRequest.prototype.hasErrorStatusCode): (WebInspector.NetworkRequest.prototype.populateImageSource): (WebInspector.NetworkRequest.prototype._contentURL): (WebInspector.NetworkRequest.prototype._innerRequestContent.onResourceContent): (WebInspector.NetworkRequest.prototype._innerRequestContent): (WebInspector.NetworkRequest.prototype.setResource): (WebInspector.NetworkRequest.prototype.resource): * inspector/front-end/RawSourceCode.js: (WebInspector.RawSourceCode): (WebInspector.RawSourceCode.prototype._resourceAdded): (WebInspector.RawSourceCode.prototype.forceUpdateSourceMapping): (WebInspector.RawSourceCode.prototype._createContentProvider): * inspector/front-end/Resource.js: (WebInspector.Resource): (WebInspector.Resource.displayName): (WebInspector.Resource.prototype.get request): (WebInspector.Resource.prototype.set url): (WebInspector.Resource.prototype.get type): (WebInspector.Resource.prototype.get mimeType): (WebInspector.Resource.prototype.set mimeType): (WebInspector.Resource.prototype.get content): (WebInspector.Resource.prototype.get contentEncoded): (WebInspector.Resource.prototype.requestContent): (WebInspector.Resource.prototype._innerRequestContent.callback): (WebInspector.Resource.prototype._innerRequestContent): (WebInspector.ResourceRevision.prototype.requestContent.callbackWrapper): (WebInspector.ResourceRevision.prototype.requestContent): * inspector/front-end/ResourceScriptMapping.js: (WebInspector.ResourceScriptMapping.prototype.addScript): 2012-04-13 Mike Reed use getClipDeviceBounds, rather than (deprecated) getTotalClip https://bugs.webkit.org/show_bug.cgi?id=83808 Reviewed by Stephen White. Equivalent functionality, existing tests apply. * platform/graphics/skia/OpaqueRegionSkia.cpp: (WebCore::OpaqueRegionSkia::didDraw): 2012-04-13 Thiago Marcos P. Santos [EFL] Add API for color chooser https://bugs.webkit.org/show_bug.cgi?id=83692 Added new API to enable browsers to display a custom color picker when an input field of type "color" is activated. Reviewed by Kenneth Rohde Christiansen. * PlatformEfl.cmake: * platform/efl/ColorChooserEfl.cpp: Added. (WebCore): (WebCore::ColorChooserEfl::ColorChooserEfl): (WebCore::ColorChooserEfl::~ColorChooserEfl): (WebCore::ColorChooserEfl::setSelectedColor): (WebCore::ColorChooserEfl::endChooser): * platform/efl/ColorChooserEfl.h: Added. (WebCore): (ColorChooserEfl): 2012-04-13 Zalan Bujtas Enabling/disabling delegates scrolling when page has no composited content asserts on WK1. https://bugs.webkit.org/show_bug.cgi?id=83860 Reviewed by Kenneth Rohde Christiansen. WK2 has compositing mode on all the time, while Wk1 turns it on only when the page has composited content. This patch ensures that, when delegates scrolling behavior is changed, backing stores are cleared only when there's an actual composition, similarly to what CachedFrame does. Test: fast/viewport/scroll-delegates-switch-on-page-with-no-composition-mode-asserts.html * page/FrameView.cpp: (WebCore::FrameView::delegatesScrollingDidChange): 2012-04-13 Vivek Galatage Web Inspector: Line number is not displayed while debugging javascript https://bugs.webkit.org/show_bug.cgi?id=83786 Reviewed by Pavel Feldman. Changed the textViewer.css to start displaying the line number with appropriate color property. Added outline property for enhanced view No additional test cases required for the above fix. * inspector/front-end/Images/breakpointConditionalCounterBorder.png: * inspector/front-end/Images/breakpointCounterBorder.png: * inspector/front-end/Images/programCounterBorder.png: * inspector/front-end/textViewer.css: (.webkit-execution-line .webkit-line-number-outer): (.webkit-breakpoint.webkit-execution-line .webkit-line-number-outer): (.webkit-breakpoint-conditional.webkit-execution-line .webkit-line-number-outer): 2012-04-13 Kent Tamura Add a runtime flag for https://bugs.webkit.org/show_bug.cgi?id=83853 Reviewed by Adam Barth. * bindings/generic/RuntimeEnabledFeatures.cpp: * bindings/generic/RuntimeEnabledFeatures.h: (WebCore::RuntimeEnabledFeatures::inputTypeDateEnabled): Added. (WebCore::RuntimeEnabledFeatures::setInputTypeDateEnabled): Added. * html/InputType.cpp: (WebCore::createInputTypeFactoryMap): Don't register type=date if !RuntimeEnabledFeatures::inputTypeDateEnabled() 2012-04-13 Adam Barth JSDocument::setLocation does too much bare-handed lifting https://bugs.webkit.org/show_bug.cgi?id=83850 Reviewed by Sam Weinig. As part of auditing all the ways of kicking off a navigation, I happened to read JSDocument::setLocation, which uses very old patterns. This patch updates it to do things the "modern" way. There shouldn't be any behavior change. * bindings/js/JSDocumentCustom.cpp: (WebCore::JSDocument::setLocation): 2012-04-13 Shinya Kawanaka Background width (or height) is wrong if width (or height) * zoom < 1. https://bugs.webkit.org/show_bug.cgi?id=83350 Reviewed by Nikolas Zimmermann. calculateImageIntrinsicDimension will return wrong size if the calculated size is 0. 0 is used for expressing unspecfied, so the method returns the box width(height) instead. Since CachedImage has already similar code, we moved it to IntSize and shared it. Tests: fast/css/zoom-background-repeat-x-expected.html fast/css/zoom-background-repeat-x.html fast/css/zoom-background-repeat-y-expected.html fast/css/zoom-background-repeat-y.html * loader/cache/CachedImage.cpp: (WebCore::CachedImage::imageSizeForRenderer): * platform/graphics/IntSize.h: (IntSize): (WebCore::IntSize::scale): (WebCore::IntSize::clampToMinimumSize): * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::calculateImageIntrinsicDimensions): 2012-04-13 Adam Barth Prepare submitForm for seamless navigation https://bugs.webkit.org/show_bug.cgi?id=83838 Reviewed by Ryosuke Niwa. Previously, FrameLoader::submitForm called FrameTree::find and Document::canNavigate separately. This patch refactors this function to call findFrameForNavigation, which does both checks. This doesn't change any behavior today, but it prepares us to implement seamless navigation. Once the seamless branch lands, this change will be tested by seamless-form-* in https://github.com/eseidel/webkit/tree/seamless/LayoutTests/fast/frames/seamless For context, see: https://github.com/eseidel/webkit/commit/3f27340577ac91b2cc0a834dd2c6fdfcac296c32 * loader/FrameLoader.cpp: (WebCore::FrameLoader::submitForm): 2012-04-13 Kent Tamura Should clear an invalid string in a date field on blur https://bugs.webkit.org/show_bug.cgi?id=83863 Reviewed by Kentaro Hara. Test: fast/forms/date/input-date-commit-valid-only.html * html/DateInputType.cpp: (WebCore::DateInputType::handleBlurEvent): Reset the visible value. The code is same as NumberInputType::handleBlurEvent(). 2012-04-12 Kent Tamura Calendar Picker: remove unnecessary code from calendarPicker.{css,js} https://bugs.webkit.org/show_bug.cgi?id=83685 Reviewed by Kentaro Hara. Remove the followings from input files: - multi line comments /*...*/ (.js and .css) - single line comment //... (.js) - repeating whitespace (.js and .css) - leading and trailing whitespace (.js and .css) - empty lines (.js and .css) This doesn't work for arbitrary JavaScript or CSS inputs, but works well for expected input files like css/make-css-file-arrays.pl * make-file-arrays.py: (strip_whitespace_and_comments): (main): 2012-04-12 Sailesh Agrawal Chromium: Fix scrollbar tickmark drawing on Mountain Lion https://bugs.webkit.org/show_bug.cgi?id=83844 Reviewed by James Robinson. On Mountain Lion overlay scrollbars have a new expanded mode. In expanded mode the scrolllbar is slightly wider which causes the tickmarks to look incorrect. Fix was to explicitly enter expanded mode to get the correct look. Screenshots: broken: http://i.imgur.com/PDKYH.png fixed: http://i.imgur.com/utp0Y.png * platform/chromium/ScrollbarThemeChromiumMac.mm: (WebCore::ScrollbarThemeChromiumMac::paint): Called setExpanded if API is available. * platform/mac/NSScrollerImpDetails.h: Exposed the isExpanded: API. 2012-04-12 Kent Tamura LocalizedDateICU should ignore timezones https://bugs.webkit.org/show_bug.cgi?id=83859 Reviewed by Hajime Morita. udat_parse() and udat_format() shift the input date by the offset of the default timezone. We don't need this behavior for type=date. So we specify "GMT" to udat_open(). No new tests. This behavior depends on the timezone setting of the local machine. * platform/text/LocalizedDateICU.cpp: (WebCore::createShortDateFormatter): Added. Common factory functio for UDateFormat. Use "GMT" instead of the default timezone. (WebCore::parseLocalizedDate): Use createShortDateFormatter(). (WebCore::formatLocalizedDate): ditto. 2012-04-12 Adam Barth Prepare window.location for seamless navigation https://bugs.webkit.org/show_bug.cgi?id=83843 Reviewed by Eric Seidel. This patch refactors window.location to flow through FrameLoader::findFrameForNavigation, which is where we're going to implement the seamless navigation redirect. This patch shouldn't cause any observable changes in behavior today, but it will make all the seamless-window-location* tests in https://github.com/eseidel/webkit/tree/seamless/LayoutTests/fast/frames/seamless pass once we merge the seamlesss branch. See https://github.com/eseidel/webkit/commit/a6e708fa6c643b156397e9a287b40a0868c7959c for context. * bindings/js/JSDOMWindowCustom.cpp: (WebCore::JSDOMWindow::setLocation): * bindings/v8/custom/V8DOMWindowCustom.cpp: (WebCore::V8DOMWindow::locationAccessorSetter): * page/Location.cpp: (WebCore::Location::setHref): (WebCore::Location::setProtocol): (WebCore::Location::setHost): (WebCore::Location::setHostname): (WebCore::Location::setPort): (WebCore::Location::setPathname): (WebCore::Location::setSearch): (WebCore::Location::setHash): (WebCore::Location::assign): (WebCore::Location::replace): (WebCore::Location::setLocation): (WebCore): * page/Location.h: (Location): 2012-04-12 Dana Jansens [chromium] Background filters for composited layers https://bugs.webkit.org/show_bug.cgi?id=80046 Reviewed by Adrienne Walker. Adds background filters to LayerChromium/CCLayerImpl. These filters are applied to any pixels in the contents behind the layer and seen through it. This is done by adding a backgroundTexture() to the render surface, which holds the read-back contents of the target framebuffer, background filter applied, in the surface's own coordinate space. Then this is drawn back into the frame buffer before the contents of the surface itself is drawn. Tests: platform/chromium/compositing/filters/background-filter-blur-off-axis.html platform/chromium/compositing/filters/background-filter-blur-outsets.html platform/chromium/compositing/filters/background-filter-blur.html * platform/graphics/chromium/LayerChromium.cpp: (WebCore::LayerChromium::setBackgroundFilters): (WebCore): (WebCore::LayerChromium::pushPropertiesTo): * platform/graphics/chromium/LayerChromium.h: (LayerChromium): (WebCore::LayerChromium::backgroundFilters): * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::drawBackgroundFilters): (WebCore): (WebCore::LayerRendererChromium::drawRenderSurfaceQuad): (WebCore::LayerRendererChromium::getFramebufferTexture): (WebCore::LayerRendererChromium::isCurrentRenderSurface): (WebCore::LayerRendererChromium::useRenderSurface): (WebCore::LayerRendererChromium::useManagedTexture): (WebCore::LayerRendererChromium::bindFramebufferToTexture): (WebCore::LayerRendererChromium::setScissorToRect): * platform/graphics/chromium/LayerRendererChromium.h: (LayerRendererChromium): * platform/graphics/chromium/RenderSurfaceChromium.h: (WebCore::RenderSurfaceChromium::setBackgroundFilters): (WebCore::RenderSurfaceChromium::backgroundFilters): (RenderSurfaceChromium): * platform/graphics/chromium/cc/CCLayerImpl.cpp: (WebCore::CCLayerImpl::setBackgroundFilters): (WebCore): * platform/graphics/chromium/cc/CCLayerImpl.h: (CCLayerImpl): (WebCore::CCLayerImpl::backgroundFilters): * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp: (WebCore::subtreeShouldRenderToSeparateSurface): (WebCore::calculateDrawTransformsAndVisibilityInternal): * platform/graphics/chromium/cc/CCRenderSurface.cpp: (WebCore::CCRenderSurface::drawableContentRect): (WebCore::CCRenderSurface::prepareBackgroundTexture): (WebCore): (WebCore::CCRenderSurface::releaseBackgroundTexture): (WebCore::CCRenderSurface::computeDeviceTransform): (WebCore::CCRenderSurface::computeDeviceBoundingBox): (WebCore::CCRenderSurface::computeReadbackDeviceBoundingBox): (WebCore::CCRenderSurface::readbackDeviceContentRect): (WebCore::copyTextureToFramebuffer): (WebCore::CCRenderSurface::copyDeviceToBackgroundTexture): (WebCore::getSkBitmapTextureId): (WebCore::CCRenderSurface::drawContents): (WebCore::CCRenderSurface::drawReplica): (WebCore::CCRenderSurface::drawLayer): (WebCore::CCRenderSurface::drawSurface): (WebCore::CCRenderSurface::applyFilters): * platform/graphics/chromium/cc/CCRenderSurface.h: (CCRenderSurface): (WebCore::CCRenderSurface::setBackgroundFilters): (WebCore::CCRenderSurface::backgroundFilters): (WebCore::CCRenderSurface::backgroundTexture): * testing/Internals.cpp: (WebCore): (WebCore::Internals::setBackgroundBlurOnNode): * testing/Internals.h: (Internals): * testing/Internals.idl: 2012-04-12 Adam Barth Remove V8DOMWindowShell::setLocation https://bugs.webkit.org/show_bug.cgi?id=83833 Reviewed by Eric Seidel. V8DOMWindowShell::setLocation is only used by document.location. It's more direct for document.location to call Location::setHref directly. This integrates correctly with the navigation rules for