2013-03-12 Sheriff Bot Unreviewed, rolling out r145277. http://trac.webkit.org/changeset/145277 https://bugs.webkit.org/show_bug.cgi?id=112170 chromium-gpu and android testers are seeing failures/crashes relating to this code (Requested by eseidel on #webkit). * html/parser/BackgroundHTMLInputStream.cpp: (WebCore::BackgroundHTMLInputStream::rewindTo): * html/parser/BackgroundHTMLInputStream.h: (BackgroundHTMLInputStream): (Checkpoint): * html/parser/BackgroundHTMLParser.cpp: * html/parser/BackgroundHTMLParser.h: (BackgroundHTMLParser): * html/parser/HTMLDocumentParser.cpp: (WebCore::HTMLDocumentParser::pumpPendingSpeculations): 2013-03-12 Simon Fraser Keep track of the number of GraphicsLayers with tiled backing in RenderLayerCompositor https://bugs.webkit.org/show_bug.cgi?id=112083 Reviewed by Dean Jackson. Have RenderLayerCompositor keep track of how many of its GraphicsLayers use TiledBacking. This is useful for platforms to decide whether it's necessary to force GraphicsLayer flushes to update the visibleRect of those TiledBackings. GraphicsLayers are always created without TiledBacking. There are two ways the count can change: 1. A GraphicsLayerCA toggles into or out of tiled mode. It notifies its client via a new tiledBackingUsageChanged() callback on GraphicsLayerClient. 2. A tiled GraphicsLayerCA is destroyed. Added a new bottleneck function to RenderLayerBacking::willDestroyLayer() that is called everywhere we destroy layers. The main page TiledBacking is not counted as part of this. Also renamed uses of "tiledLayer" to "tiledBacking" in GraphicsLayer[CA]. * platform/graphics/GraphicsLayer.cpp: (WebCore::GraphicsLayer::GraphicsLayer): (WebCore::GraphicsLayer::getDebugBorderInfo): (WebCore::GraphicsLayer::dumpProperties): * platform/graphics/GraphicsLayer.h: (WebCore::GraphicsLayer::usingTiledBacking): * platform/graphics/GraphicsLayerClient.h: (WebCore::GraphicsLayerClient::tiledBackingUsageChanged): * platform/graphics/ca/GraphicsLayerCA.cpp: (WebCore::GraphicsLayerCA::recursiveCommitChanges): (WebCore::GraphicsLayerCA::updateGeometry): (WebCore::GraphicsLayerCA::updateLayerDrawsContent): (WebCore::GraphicsLayerCA::updateContentsScale): (WebCore::GraphicsLayerCA::swapFromOrToTiledLayer): * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::willDestroyLayer): (WebCore::RenderLayerBacking::tiledBackingUsageChanged): (WebCore::RenderLayerBacking::destroyGraphicsLayers): (WebCore::RenderLayerBacking::updateClippingLayers): (WebCore::RenderLayerBacking::updateOverflowControlsLayers): (WebCore::RenderLayerBacking::updateForegroundLayer): (WebCore::RenderLayerBacking::updateBackgroundLayer): (WebCore::RenderLayerBacking::updateMaskLayer): (WebCore::RenderLayerBacking::updateScrollingLayers): (WebCore::RenderLayerBacking::compositingLayerType): * rendering/RenderLayerBacking.h: * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::RenderLayerCompositor): (WebCore::RenderLayerCompositor::layerTiledBackingUsageChanged): * rendering/RenderLayerCompositor.h: (WebCore::RenderLayerCompositor::haveNonMainLayersWithTiledBacking): 2013-03-12 Abhishek Arya Replace static_casts with to* functions. https://bugs.webkit.org/show_bug.cgi?id=112072 Reviewed by Philip Rogers. to* functions are preferred over static_cast calls since they help to catch bad casts easily on the testing infrastructure. * accessibility/AccessibilityMenuList.cpp: (WebCore::AccessibilityMenuList::canSetFocusAttribute): * bindings/objc/DOM.mm: (kitClass): * bindings/v8/V8LazyEventListener.cpp: (WebCore::V8LazyEventListener::prepareListenerObject): * css/SelectorChecker.cpp: (WebCore::SelectorChecker::checkOne): * editing/ApplyStyleCommand.cpp: (WebCore::isLegacyAppleStyleSpan): (WebCore::isEmptyFontTag): (WebCore::ApplyStyleCommand::applyBlockStyle): * editing/FormatBlockCommand.cpp: (WebCore::isElementForFormatBlock): * editing/ReplaceSelectionCommand.cpp: (WebCore::isMailPasteAsQuotationNode): (WebCore::haveSameTagName): (WebCore::ReplaceSelectionCommand::removeRedundantStylesAndKeepStyleSpanInline): (WebCore::ReplaceSelectionCommand::makeInsertedContentRoundTrippableWithHTMLTreeBuilder): * history/CachedPage.cpp: (WebCore::CachedPage::restore): * html/ColorInputType.cpp: (WebCore::ColorInputType::suggestions): * html/HTMLTableRowsCollection.cpp: (WebCore::isInHead): (WebCore::isInBody): (WebCore::isInFoot): * inspector/DOMPatchSupport.cpp: (WebCore::DOMPatchSupport::innerPatchNode): * page/PageSerializer.cpp: (WebCore::SerializerMarkupAccumulator::appendCustomAttributes): * plugins/PluginView.cpp: (WebCore::PluginView::getValue): * rendering/RenderEmbeddedObject.cpp: (WebCore::RenderEmbeddedObject::paintContents): (WebCore::RenderEmbeddedObject::handleUnavailablePluginIndicatorEvent): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::name): * rendering/RenderMedia.cpp: (WebCore::RenderMedia::mediaElement): * rendering/RenderSearchField.cpp: (WebCore::RenderSearchField::autosaveName): * rendering/RenderTextControl.cpp: (WebCore::RenderTextControl::textFormControlElement): (WebCore::updateUserModifyProperty): * rendering/mathml/RenderMathMLFenced.cpp: (WebCore::RenderMathMLFenced::updateFromElement): * rendering/mathml/RenderMathMLFraction.cpp: (WebCore::RenderMathMLFraction::updateFromElement): * xml/parser/XMLDocumentParserLibxml2.cpp: (WebCore::XMLDocumentParser::XMLDocumentParser): (WebCore::XMLDocumentParser::endElementNs): 2013-03-12 Zan Dobersek [GTK] Remove HILDON_CPPFLAGS and HILDON_CFLAGS references from GNUmakefiles https://bugs.webkit.org/show_bug.cgi?id=112163 Reviewed by Martin Robinson. No new tests - no new functionality, merely a cleanup. * GNUmakefile.am: The Hildon dependency doesn't exist anymore so there's no need for references to HILDON_CPPFLAGS and HILDON_CFLAGS. 2013-03-12 Pavel Feldman Not reviewed: removing GtkVersioning from chromium targets. * WebCore.gypi: 2013-03-12 Marja Hölttä [V8] Store main world and non-main world templates separately. https://bugs.webkit.org/show_bug.cgi?id=111724 Reviewed by Jochen Eisinger. This is needed for generating specialized bindings for the main world (bug 110874). No new tests (updated existing bindings tests). * bindings/scripts/CodeGeneratorV8.pm: (GenerateHeader): (GenerateDomainSafeFunctionGetter): (GenerateImplementation): (CreateCustomSignature): * bindings/scripts/test/V8/V8Float64Array.cpp: (WebCore::ConfigureV8Float64ArrayTemplate): (WebCore::V8Float64Array::GetTemplate): (WebCore::V8Float64Array::HasInstance): * bindings/scripts/test/V8/V8Float64Array.h: (V8Float64Array): * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp: (WebCore::TestActiveDOMObjectV8Internal::postMessageAttrGetter): (WebCore::ConfigureV8TestActiveDOMObjectTemplate): (WebCore::V8TestActiveDOMObject::GetTemplate): (WebCore::V8TestActiveDOMObject::HasInstance): * bindings/scripts/test/V8/V8TestActiveDOMObject.h: (V8TestActiveDOMObject): * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp: (WebCore::V8TestCustomNamedGetter::GetTemplate): (WebCore::V8TestCustomNamedGetter::HasInstance): * bindings/scripts/test/V8/V8TestCustomNamedGetter.h: (V8TestCustomNamedGetter): * bindings/scripts/test/V8/V8TestEventConstructor.cpp: (WebCore::V8TestEventConstructor::GetTemplate): (WebCore::V8TestEventConstructor::HasInstance): * bindings/scripts/test/V8/V8TestEventConstructor.h: (V8TestEventConstructor): * bindings/scripts/test/V8/V8TestEventTarget.cpp: (WebCore::ConfigureV8TestEventTargetTemplate): (WebCore::V8TestEventTarget::GetTemplate): (WebCore::V8TestEventTarget::HasInstance): * bindings/scripts/test/V8/V8TestEventTarget.h: (V8TestEventTarget): * bindings/scripts/test/V8/V8TestException.cpp: (WebCore::V8TestException::GetTemplate): (WebCore::V8TestException::HasInstance): * bindings/scripts/test/V8/V8TestException.h: (V8TestException): * bindings/scripts/test/V8/V8TestInterface.cpp: (WebCore::ConfigureV8TestInterfaceTemplate): (WebCore::V8TestInterface::GetTemplate): (WebCore::V8TestInterface::HasInstance): * bindings/scripts/test/V8/V8TestInterface.h: (V8TestInterface): * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp: (WebCore::V8TestMediaQueryListListener::GetTemplate): (WebCore::V8TestMediaQueryListListener::HasInstance): * bindings/scripts/test/V8/V8TestMediaQueryListListener.h: (V8TestMediaQueryListListener): * bindings/scripts/test/V8/V8TestNamedConstructor.cpp: (WebCore::V8TestNamedConstructor::GetTemplate): (WebCore::V8TestNamedConstructor::HasInstance): * bindings/scripts/test/V8/V8TestNamedConstructor.h: (V8TestNamedConstructor): * bindings/scripts/test/V8/V8TestNode.cpp: (WebCore::V8TestNode::GetTemplate): (WebCore::V8TestNode::HasInstance): * bindings/scripts/test/V8/V8TestNode.h: (V8TestNode): * bindings/scripts/test/V8/V8TestObj.cpp: (WebCore::ConfigureV8TestObjTemplate): (WebCore::V8TestObj::GetTemplate): (WebCore::V8TestObj::HasInstance): * bindings/scripts/test/V8/V8TestObj.h: (V8TestObj): * bindings/scripts/test/V8/V8TestOverloadedConstructors.cpp: (WebCore::V8TestOverloadedConstructors::GetTemplate): (WebCore::V8TestOverloadedConstructors::HasInstance): * bindings/scripts/test/V8/V8TestOverloadedConstructors.h: (V8TestOverloadedConstructors): * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp: (WebCore::V8TestSerializedScriptValueInterface::GetTemplate): (WebCore::V8TestSerializedScriptValueInterface::HasInstance): * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.h: (V8TestSerializedScriptValueInterface): * bindings/scripts/test/V8/V8TestTypedefs.cpp: (WebCore::ConfigureV8TestTypedefsTemplate): (WebCore::V8TestTypedefs::GetTemplate): (WebCore::V8TestTypedefs::HasInstance): * bindings/scripts/test/V8/V8TestTypedefs.h: (V8TestTypedefs): * bindings/v8/V8AdaptorFunction.cpp: (WebCore::V8AdaptorFunction::getTemplate): * bindings/v8/V8GCController.cpp: * bindings/v8/V8PerIsolateData.cpp: (WebCore::V8PerIsolateData::reportMemoryUsage): (WebCore::V8PerIsolateData::privateTemplate): (WebCore::V8PerIsolateData::rawTemplate): (WebCore::V8PerIsolateData::hasInstance): * bindings/v8/V8PerIsolateData.h: (WebCore::V8PerIsolateData::rawTemplateMap): (V8PerIsolateData): (WebCore::V8PerIsolateData::templateMap): * bindings/v8/WrapperTypeInfo.h: * bindings/v8/custom/V8LocationCustom.cpp: (WebCore::V8Location::reloadAttrGetterCustom): (WebCore::V8Location::replaceAttrGetterCustom): (WebCore::V8Location::assignAttrGetterCustom): 2013-03-12 Zan Dobersek [GTK] Set up the libPlatformGtk.la library https://bugs.webkit.org/show_bug.cgi?id=111738 Reviewed by Martin Robinson. No new tests - no new functionality. * GNUmakefile.am: Reference platformgtk_cppflags, platformgtk_sources variables along with webcoregtk_cppflags, webcoregtk_sources variables. * GNUmakefile.list.am: Removing GtkVersioning.c and GtkVersioning.h from the sources list, these files have been moved under Source/Platform. * bindings/gobject/GNUmakefile.am: Ditto on the platformgtk_* variables. 2013-03-12 Alberto Garcia [BlackBerry] Image,ImageBuffer: add missing parameters to methods https://bugs.webkit.org/show_bug.cgi?id=112148 Reviewed by Rob Buis. BitmapImage::draw(), Image::drawPattern() and ImageBuffer::draw() have a BlendMode parameter since r137011. ImageBuffer::copyImage() has a ScaleBehavior parameter since r134100. * platform/graphics/blackberry/ImageBlackBerry.cpp: (WebCore::BitmapImage::draw): (WebCore::Image::drawPattern): * platform/graphics/blackberry/ImageBufferBlackBerry.cpp: (WebCore::ImageBuffer::copyImage): (WebCore::ImageBuffer::draw): 2013-03-12 Alberto Garcia [BlackBerry] MediaPlayerPrivate: fix call to MediaStreamDescriptor::label() https://bugs.webkit.org/show_bug.cgi?id=112140 Reviewed by Rob Buis. MediaStreamDescriptor::id() was renamed to MediaStreamDescriptor::label() in r139352. * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp: (WebCore::toWebMediaStreamDescriptor): 2013-03-12 Eugene Klyuchnikov Web Inspector: [REGRESSION] StepInto (F11) and StepOut (Shift-F11) shortcuts toggle Inspector window full-screen state https://bugs.webkit.org/show_bug.cgi?id=112113 Reviewed by Alexander Pavlov. Updated handlers missed in first patch. Added JSDocs to all handlers. * inspector/front-end/Panel.js: Fixed JSDocs. * inspector/front-end/CallStackSidebarPane.js: Added return values. Added JSDocs. * inspector/front-end/ScriptsPanel.js: Ditto. * inspector/front-end/GoToLineDialog.js: Added JSDocs. * inspector/front-end/TimelinePanel.js: Ditto. 2013-03-12 Alberto Garcia [BlackBerry] DisplayRefreshMonitor: rename m_timestamp back to m_monotonicAnimationStartTime https://bugs.webkit.org/show_bug.cgi?id=112139 Reviewed by Rob Buis. This changed in r131131, but it was accidentally renamed back in r144465. * platform/graphics/blackberry/DisplayRefreshMonitorBlackBerry.cpp: (WebCore::DisplayRefreshMonitor::displayLinkFired): 2013-03-12 Alberto Garcia [BlackBerry] FontPlatformData: HarfBuzz renaming https://bugs.webkit.org/show_bug.cgi?id=112142 Reviewed by Rob Buis. When the old HarfBuzz code was removed in r141291, HarfBuzzNGFace.h was renamed to HarfBuzzFace.h and m_harfbuzzFace was renamed to m_harfBuzzFace. These changes need to be reflected in the BlackBerry port. * platform/graphics/blackberry/FontPlatformDataBlackBerry.cpp: (WebCore::FontPlatformData::FontPlatformData): (WebCore::FontPlatformData::platformDataInit): (WebCore::FontPlatformData::platformDataAssign): (WebCore::FontPlatformData::harfBuzzFace): 2013-03-12 Alberto Garcia [BlackBerry] FontCacheBlackBerry: return PassRefPtr https://bugs.webkit.org/show_bug.cgi?id=112022 Reviewed by Rob Buis. FontData functions return PassRefPtr since r130160. * platform/graphics/blackberry/FontCacheBlackBerry.cpp: (WebCore::FontCache::getFontDataForCharacters): (WebCore::FontCache::getSimilarFontPlatformData): (WebCore::FontCache::getLastResortFallbackFont): * platform/graphics/blackberry/SimpleFontDataBlackBerry.cpp: (WebCore::SimpleFontData::createScaledFontData): 2013-03-12 Vsevolod Vlasov Web Inspector: Fix checkContentUpdated behavior in UISourceCode. https://bugs.webkit.org/show_bug.cgi?id=112037 Reviewed by Alexander Pavlov. UISourceCode.checkContentUpdated now saves last updated content that was loaded and rejected by user on the per-file basis (only the last one was saved currently). * inspector/front-end/FileSystemProjectDelegate.js: (WebInspector.FileSystemProjectDelegate.prototype.innerCallback): (WebInspector.FileSystemProjectDelegate.prototype.requestFileContent): (WebInspector.FileSystemProjectDelegate.prototype.canSetFileContent): (WebInspector.FileSystemWorkspaceProvider.prototype._fileSystemAdded): * inspector/front-end/SimpleWorkspaceProvider.js: (WebInspector.SimpleProjectDelegate.prototype.canSetFileContent): * inspector/front-end/UISourceCode.js: (WebInspector.UISourceCode.prototype.checkContentUpdated.contentLoaded): (WebInspector.UISourceCode.prototype.checkContentUpdated): (WebInspector.UISourceCode.prototype._commitContent): (WebInspector.UISourceCode.prototype.addRevision): (WebInspector.UISourceCode.prototype.commitWorkingCopy): * inspector/front-end/Workspace.js: (WebInspector.ProjectDelegate.prototype.canSetFileContent): (WebInspector.Project.prototype.canSetFileContent): 2013-03-12 Tomas Popela [Gtk] NBSP are not replaced when using X clipboard https://bugs.webkit.org/show_bug.cgi?id=112118 Reviewed by Martin Robinson. We're not replacing nbsp with spaces when using X clipboard (Shift+Insert or middle mouse button). * platform/gtk/DataObjectGtk.cpp: (WebCore::DataObjectGtk::text): 2013-03-12 Florin Malita SVG Pattern pixelated on inline SVG with CSS transforms https://bugs.webkit.org/show_bug.cgi?id=111587 Reviewed by Dirk Schulze. When calculating the resolution for resource image buffers, we need to also consider CSS transforms. This patch updates calculateTransformationToOutermostSVGCoordinateSystem() (renamed to calculateTransformationToOutermostCoordinateSystem) to include the affine component from CSS transforms by walking the parent layer tree. Test: svg/custom/resources-css-scaled.html * rendering/svg/RenderSVGResourceClipper.cpp: (WebCore::RenderSVGResourceClipper::applyClippingToContext): * rendering/svg/RenderSVGResourceFilter.cpp: (WebCore::RenderSVGResourceFilter::applyResource): * rendering/svg/RenderSVGResourceGradient.cpp: (WebCore::createMaskAndSwapContextForTextGradient): (WebCore::clipToTextMask): * rendering/svg/RenderSVGResourceMasker.cpp: (WebCore::RenderSVGResourceMasker::applyResource): * rendering/svg/RenderSVGResourcePattern.cpp: (WebCore::RenderSVGResourcePattern::buildPattern): * rendering/svg/SVGRenderingContext.cpp: (WebCore::SVGRenderingContext::calculateScreenFontSizeScalingFactor): (WebCore::SVGRenderingContext::calculateTransformationToOutermostCoordinateSystem): * rendering/svg/SVGRenderingContext.h: (SVGRenderingContext): 2013-03-12 Yury Semikhatsky Web Inspector: add html canvas memory details to the native memory overview https://bugs.webkit.org/show_bug.cgi?id=112123 Reviewed by Alexander Pavlov. Show memory occupied vby HTMLCanvasElements under Image category in the native memory overview. * inspector/front-end/NativeHeapSnapshot.js: (WebInspector.NativeHeapSnapshot.prototype.images.getImageName): (WebInspector.NativeHeapSnapshot.prototype.images.getCanvasName): (WebInspector.NativeHeapSnapshot.prototype.images): (WebInspector.NativeHeapSnapshot.prototype._addNodes): 2013-03-12 Vsevolod Vlasov Web Inspector: ResourceScriptFile diverged state should be correctly reset after debugger reset. https://bugs.webkit.org/show_bug.cgi?id=112036 Reviewed by Alexander Pavlov. * inspector/front-end/ResourceScriptMapping.js: (WebInspector.ResourceScriptFile): (WebInspector.ResourceScriptFile.prototype._workingCopyChanged): (WebInspector.ResourceScriptFile.prototype._maybeDirtyChanged): 2013-03-12 Marja Hölttä [V8] Move the GetRawTemplate and HasInstance logic from generated bindings to V8PerIsolateData https://bugs.webkit.org/show_bug.cgi?id=112136 Reviewed by Kentaro Hara. When templates for main world and non-main worlds will be separated (bug 111724), HasInstance logic will be a bit ugly: We cannot determine the world type on the fly, because during GC there is no entered context, and HasInstance is called during GC. So we need to check against templates from all the worlds. It's cleaner if that logic is in V8PerIsolateData. No new tests (Updated existing bindings tests). * bindings/scripts/CodeGeneratorV8.pm: (GenerateHeader): (GenerateDomainSafeFunctionGetter): (GenerateImplementation): (CreateCustomSignature): * bindings/scripts/test/V8/V8Float64Array.cpp: (WebCore::ConfigureV8Float64ArrayTemplate): (WebCore::V8Float64Array::GetTemplate): (WebCore::V8Float64Array::HasInstance): * bindings/scripts/test/V8/V8Float64Array.h: (V8Float64Array): * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp: (WebCore::TestActiveDOMObjectV8Internal::postMessageAttrGetter): (WebCore::ConfigureV8TestActiveDOMObjectTemplate): (WebCore::V8TestActiveDOMObject::GetTemplate): (WebCore::V8TestActiveDOMObject::HasInstance): * bindings/scripts/test/V8/V8TestActiveDOMObject.h: (V8TestActiveDOMObject): * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp: (WebCore::V8TestCustomNamedGetter::GetTemplate): (WebCore::V8TestCustomNamedGetter::HasInstance): * bindings/scripts/test/V8/V8TestCustomNamedGetter.h: (V8TestCustomNamedGetter): * bindings/scripts/test/V8/V8TestEventConstructor.cpp: (WebCore::V8TestEventConstructor::GetTemplate): (WebCore::V8TestEventConstructor::HasInstance): * bindings/scripts/test/V8/V8TestEventConstructor.h: (V8TestEventConstructor): * bindings/scripts/test/V8/V8TestEventTarget.cpp: (WebCore::ConfigureV8TestEventTargetTemplate): (WebCore::V8TestEventTarget::GetTemplate): (WebCore::V8TestEventTarget::HasInstance): * bindings/scripts/test/V8/V8TestEventTarget.h: (V8TestEventTarget): * bindings/scripts/test/V8/V8TestException.cpp: (WebCore::V8TestException::GetTemplate): (WebCore::V8TestException::HasInstance): * bindings/scripts/test/V8/V8TestException.h: (V8TestException): * bindings/scripts/test/V8/V8TestInterface.cpp: (WebCore::ConfigureV8TestInterfaceTemplate): (WebCore::V8TestInterface::GetTemplate): (WebCore::V8TestInterface::HasInstance): * bindings/scripts/test/V8/V8TestInterface.h: (V8TestInterface): * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp: (WebCore::V8TestMediaQueryListListener::GetTemplate): (WebCore::V8TestMediaQueryListListener::HasInstance): * bindings/scripts/test/V8/V8TestMediaQueryListListener.h: (V8TestMediaQueryListListener): * bindings/scripts/test/V8/V8TestNamedConstructor.cpp: (WebCore::V8TestNamedConstructor::GetTemplate): (WebCore::V8TestNamedConstructor::HasInstance): * bindings/scripts/test/V8/V8TestNamedConstructor.h: (V8TestNamedConstructor): * bindings/scripts/test/V8/V8TestNode.cpp: (WebCore::V8TestNode::GetTemplate): (WebCore::V8TestNode::HasInstance): * bindings/scripts/test/V8/V8TestNode.h: (V8TestNode): * bindings/scripts/test/V8/V8TestObj.cpp: (WebCore::ConfigureV8TestObjTemplate): (WebCore::V8TestObj::GetTemplate): (WebCore::V8TestObj::HasInstance): * bindings/scripts/test/V8/V8TestObj.h: (V8TestObj): * bindings/scripts/test/V8/V8TestOverloadedConstructors.cpp: (WebCore::V8TestOverloadedConstructors::GetTemplate): (WebCore::V8TestOverloadedConstructors::HasInstance): * bindings/scripts/test/V8/V8TestOverloadedConstructors.h: (V8TestOverloadedConstructors): * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp: (WebCore::V8TestSerializedScriptValueInterface::GetTemplate): (WebCore::V8TestSerializedScriptValueInterface::HasInstance): * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.h: (V8TestSerializedScriptValueInterface): * bindings/scripts/test/V8/V8TestTypedefs.cpp: (WebCore::ConfigureV8TestTypedefsTemplate): (WebCore::V8TestTypedefs::GetTemplate): (WebCore::V8TestTypedefs::HasInstance): * bindings/scripts/test/V8/V8TestTypedefs.h: (V8TestTypedefs): * bindings/v8/V8PerIsolateData.cpp: (WebCore::V8PerIsolateData::rawTemplate): (WebCore): (WebCore::V8PerIsolateData::hasInstance): * bindings/v8/V8PerIsolateData.h: (V8PerIsolateData): * bindings/v8/custom/V8LocationCustom.cpp: (WebCore::V8Location::reloadAttrGetterCustom): (WebCore::V8Location::replaceAttrGetterCustom): (WebCore::V8Location::assignAttrGetterCustom): 2013-03-12 Eugene Klyuchnikov Web Inspector: Fix JSDocs in TimelinePanel.js https://bugs.webkit.org/show_bug.cgi?id=112137 Reviewed by Vsevolod Vlasov. Fix parameter type annotation of _loadFromFile. * inspector/front-end/TimelinePanel.js: Fixed JSDoc. 2013-03-12 Vsevolod Vlasov Web Inspector: Add a test for Workspace add/removeMapping methods. https://bugs.webkit.org/show_bug.cgi?id=112035 Reviewed by Alexander Pavlov. Test: inspector/debugger/file-system-project-mapping.html * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype._mapFileSystemToNetwork.mapFileSystemToNetwork): (WebInspector.ScriptsPanel.prototype._mapFileSystemToNetwork): (WebInspector.ScriptsPanel.prototype._mapNetworkToFileSystem.mapNetworkToFileSystem): (WebInspector.ScriptsPanel.prototype._mapNetworkToFileSystem): * inspector/front-end/Workspace.js: (WebInspector.Project.prototype._fileAdded): (WebInspector.Workspace.prototype.addMapping): 2013-03-12 Vsevolod Vlasov Web Inspector: SourceFrames are leaking on reload. https://bugs.webkit.org/show_bug.cgi?id=111961 Reviewed by Alexander Pavlov. Added dispose method on UISourceCodeFrame. Scripts panel now calls dispose when SourceFrame is removed and JavaScriptSourceFrame could remove breakpoint manager listeners in it. TabbedEditorContainer does not call viewForFile other than in appendFileTab methods to avoid recreating SourceFrame for uiSourceCode when it was already removed. Test: inspector/debugger/breakpoint-manager-listeners-count.html * inspector/front-end/JavaScriptSourceFrame.js: (WebInspector.JavaScriptSourceFrame.prototype.dispose): * inspector/front-end/ScriptsPanel.js: * inspector/front-end/TabbedEditorContainer.js: (WebInspector.TabbedEditorContainer.prototype._addScrollAndSelectionListeners): (WebInspector.TabbedEditorContainer.prototype._removeScrollAndSelectionListeners): (WebInspector.TabbedEditorContainer.prototype._tabClosed): * inspector/front-end/UISourceCodeFrame.js: (WebInspector.UISourceCodeFrame.prototype.dispose): 2013-03-12 Alexander Pavlov Web Inspector: [Elements] Unable to undo "Edit as HTML" changes in the editor https://bugs.webkit.org/show_bug.cgi?id=112119 Reviewed by Vsevolod Vlasov. No new tests, a UI change. * inspector/front-end/ElementsPanel.js: (WebInspector.ElementsPanel.prototype.handleShortcut): Do not undo/redo DOM/CSS changes if editing DOM text. * inspector/front-end/ElementsTreeOutline.js: (WebInspector.ElementsTreeOutline.prototype.editing): Added. 2013-03-12 Andrey Lushnikov Web Inspector: [CodeMirror] there are bugs in TokenHighlight feature https://bugs.webkit.org/show_bug.cgi?id=112039 Reviewed by Vsevolod Vlasov. Fix token highlight in codeMirror experiment - rewrite token highlight overlay mode to highlight words, not substrings - add workaround to avoid selection of already selected word No new tests. * inspector/front-end/CodeMirrorTextEditor.js: (WebInspector.CodeMirrorTextEditor.TokenHighlighter.prototype._cursorChange): (WebInspector.CodeMirrorTextEditor.TokenHighlighter.prototype._removeHighlight): (WebInspector.CodeMirrorTextEditor.TokenHighlighter.prototype.nextToken): (WebInspector.CodeMirrorTextEditor.TokenHighlighter.prototype._addHighlight): * inspector/front-end/cm/cmdevtools.css: (.line-with-selection .cm-column-with-selection): 2013-03-12 Sheriff Bot Unreviewed, rolling out r145514. http://trac.webkit.org/changeset/145514 https://bugs.webkit.org/show_bug.cgi?id=112134 breaks Mac build (Requested by falken on #webkit). * dom/Element.cpp: * dom/Element.h: * dom/EventDispatcher.cpp: (WebCore::EventDispatcher::dispatchSimulatedClick): * dom/GestureEvent.cpp: (WebCore::GestureEventDispatchMediator::dispatchEvent): * dom/MouseEvent.cpp: (WebCore::MouseEventDispatchMediator::dispatchEvent): * dom/Node.cpp: (WebCore): (WebCore::Node::isInert): (WebCore::Node::handleLocalEvents): (WebCore::Node::disabled): (WebCore::Node::willRespondToMouseMoveEvents): (WebCore::Node::willRespondToMouseClickEvents): (WebCore::Node::willRespondToTouchEvents): * dom/Node.h: (Node): 2013-03-12 Andrey Lushnikov Web Inspector: [CodeMirror] highlight matching braces https://bugs.webkit.org/show_bug.cgi?id=112041 Reviewed by Vsevolod Vlasov. Add "matchbrackets" add-on to CodeMirror text editor add override default styles for matched and unmatched braces. No new tests. * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.vcxproj/WebCore.vcxproj: * WebCore.vcxproj/WebCore.vcxproj.filters: * inspector/front-end/CodeMirrorTextEditor.js: (WebInspector.CodeMirrorTextEditor): * inspector/front-end/WebKit.qrc: * inspector/front-end/cm/cmdevtools.css: (.CodeMirror-matchingbracket): (.CodeMirror-nonmatchingbracket): * inspector/front-end/cm/matchbrackets.js: Added. (.): 2013-03-12 Matt Falkenhagen Refactoring: Pull Node::disabled() and Node::isInert() down to Element. https://bugs.webkit.org/show_bug.cgi?id=112085 Reviewed by Hajime Morrita. Node is too low a level for these methods. No new tests, just refactoring. * dom/Element.cpp: (WebCore::Element::disabled): (WebCore): (WebCore::Element::isInert): * dom/Element.h: (Element): * dom/EventDispatcher.cpp: (WebCore::EventDispatcher::dispatchSimulatedClick): * dom/GestureEvent.cpp: (WebCore::GestureEventDispatchMediator::dispatchEvent): * dom/MouseEvent.cpp: (WebCore::MouseEventDispatchMediator::dispatchEvent): * dom/Node.cpp: (WebCore::Node::handleLocalEvents): (WebCore::Node::willRespondToMouseMoveEvents): (WebCore::Node::willRespondToMouseClickEvents): (WebCore::Node::willRespondToTouchEvents): * dom/Node.h: (Node): 2013-03-12 Marja Hölttä [V8] Get rid of function-level static FunctionTemplates in generated bindings code https://bugs.webkit.org/show_bug.cgi?id=111971 Reviewed by Jochen Eisinger. In the future we'll create and store function templates for main world and non-main worlds separately (see bug 111724), having function templates as static variables inside functions will break the functionality. No new tests (updated the bindings test expectations). * bindings/scripts/CodeGeneratorV8.pm: (GenerateDomainSafeFunctionGetter): * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp: (WebCore::TestActiveDOMObjectV8Internal::postMessageAttrGetter): * bindings/v8/V8PerIsolateData.cpp: (WebCore::V8PerIsolateData::V8PerIsolateData): (WebCore::V8PerIsolateData::privateTemplate): (WebCore): * bindings/v8/V8PerIsolateData.h: (V8PerIsolateData): * bindings/v8/custom/V8LocationCustom.cpp: (WebCore::V8Location::reloadAttrGetterCustom): (WebCore::V8Location::replaceAttrGetterCustom): (WebCore::V8Location::assignAttrGetterCustom): 2013-03-12 Takashi Sakamoto [Refactoring] Implement RuleCollector https://bugs.webkit.org/show_bug.cgi?id=109916 Reviewed by Antti Koivisto. Implemented rule collector for an element and collector for a page. Not all members in class State are required entire while resolving a style. No new tests, because just refactoring. * CMakeLists.txt: * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * WebCore.xcodeproj/project.pbxproj: * css/CSSAllInOne.cpp: Added ElementRuleCollector and PageRuleCollector. * css/DocumentRuleSets.cpp: (WebCore::ShadowDistributedRules::collectMatchRequests): Since behaviorAtBoundary is a state owned by ElementRuleCollector, removed from here. * css/DocumentRuleSets.h: (WebCore::ShadowDistributedRules::isEmpty): Added to quickly check whether there exist any ShadowDistributedRules or not. * css/ElementRuleCollector.cpp: Copied from Source/WebCore/css/StyleResolver.cpp. (WebCore): (WebCore::ElementRuleCollector::matchedResult): (WebCore::ElementRuleCollector::matchedRuleList): (WebCore::ElementRuleCollector::addMatchedRule): (WebCore::ElementRuleCollector::clearMatchedRules): (WebCore::ElementRuleCollector::ensureRuleList): (WebCore::ElementRuleCollector::addElementStyleProperties): (WebCore::ElementRuleCollector::collectMatchingRules): (WebCore::ElementRuleCollector::collectMatchingRulesForRegion): (WebCore::ElementRuleCollector::sortAndTransferMatchedRules): (WebCore::ElementRuleCollector::matchScopedAuthorRules): (WebCore::ElementRuleCollector::matchHostRules): (WebCore::ElementRuleCollector::matchShadowDistributedRules): (WebCore::ElementRuleCollector::matchAuthorRules): (WebCore::ElementRuleCollector::matchUserRules): (WebCore::ElementRuleCollector::matchUARules): (WebCore::ElementRuleCollector::ruleMatches): (WebCore::ElementRuleCollector::collectMatchingRulesForList): (WebCore::ElementRuleCollector::sortMatchedRules): (WebCore::ElementRuleCollector::matchAllRules): Moved these methods from StyleResolver to this class. (WebCore::ElementRuleCollector::hasAnyMatchingRules): This method is used for checking whether a given element can share a cache. * css/ElementRuleCollector.h: Copied from Source/WebCore/css/StyleResolver.h. (WebCore): (WebCore::ElementRuleCollector::ElementRuleCollector): Use styleResolver instance to initialize its member variables, i.e. SelectorFilter, RuleSets, InspectorCSSOMWrappers, and StyleScopedResolver. (ElementRuleCollector): (WebCore::ElementRuleCollector::setMode): (WebCore::ElementRuleCollector::setPseudoStyleRequest): (WebCore::ElementRuleCollector::setSameOriginOnly): (WebCore::ElementRuleCollector::setRegionForStyling): Mode, SameOriginOnly, RegionForStyling are only used while collecting matched rules. (WebCore::ElementRuleCollector::setMedium): Need to know which default stylesheet should be looked up. (WebCore::ElementRuleCollector::document): * css/PageRuleCollector.cpp: Copied from Source/WebCore/css/StyleResolver.cpp. (WebCore::comparePageRules): (WebCore::PageRuleCollector::isLeftPage): (WebCore::PageRuleCollector::isFirstPage): (WebCore::PageRuleCollector::pageName): (WebCore::PageRuleCollector::matchAllPageRules): (WebCore::PageRuleCollector::matchPageRules): (WebCore::checkPageSelectorComponents): (WebCore::PageRuleCollector::matchPageRulesForList): Moved from StyleResolver. * css/PageRuleCollector.h: Copied from Source/WebCore/css/StyleResolver.h. (WebCore): (WebCore::PageRuleCollector::PageRuleCollector): (PageRuleCollector): (WebCore::PageRuleCollector::matchedResult): * css/StyleResolver.cpp: (WebCore): (WebCore::StyleResolver::State::clear): (WebCore::StyleResolver::MatchResult::addMatchedProperties): (WebCore::StyleResolver::State::initForStyleResolve): (WebCore::StyleResolver::styleSharingCandidateMatchesRuleSet): (WebCore::StyleResolver::styleForElement): (WebCore::StyleResolver::styleForKeyframe): (WebCore::StyleResolver::pseudoStyleForElement): (WebCore::StyleResolver::styleForPage): (WebCore::StyleResolver::pseudoStyleRulesForElement): (WebCore::StyleResolver::applyMatchedProperties): * css/StyleResolver.h: (WebCore::MatchRequest::MatchRequest): Removed behaviorAtBoundary. Instead, ElementRuleCollector have the state. (MatchRequest): (WebCore::StyleResolver::selectorFilter): Added to obtain SelectorFilter in ElementRuleCollector's constructor. (StyleResolver): (MatchResult): (WebCore::StyleResolver::State::State): To pass ASSERT in StyleResolver::applyProperties, need to keep m_regionForStyling. (State): (WebCore::StyleResolver::State::regionForStyling): (WebCore::StyleResolver::State::useSVGZoomRules): (WebCore::StyleResolver::hasSelectorForId): (WebCore): (WebCore::checkRegionSelector): * inspector/InspectorCSSAgent.cpp: (WebCore::InspectorCSSAgent::willMatchRule): Removed StyleResolver from its parameter list. Instead, added InspectorCSSOMWrappers and DocumentStyleSheetCollection. * inspector/InspectorCSSAgent.h: (WebCore): (InspectorCSSAgent): * inspector/InspectorInstrumentation.cpp: (WebCore): (WebCore::InspectorInstrumentation::willMatchRuleImpl): * inspector/InspectorInstrumentation.h: (WebCore): (InspectorInstrumentation): (WebCore::InspectorInstrumentation::willMatchRule): 2013-03-12 Floris Bos [Qt] WebKit fails to compile if EGL headers are not in default INCLUDEPATH https://bugs.webkit.org/show_bug.cgi?id=111859 Reviewed by Jocelyn Turcotte. The 3D graphics code wants to include EGL header files. But on some platforms such as the Raspberry Pi those are not in /usr/include but in another folder. Fix adds "egl" to CONFIG when OpenGL ES2 is used, so the right include paths are added. * WebCore.pri: 2013-03-12 Mike West XSSAuditor should send only one console error when blocking a page. https://bugs.webkit.org/show_bug.cgi?id=110733 Reviewed by Daniel Bates. Currently, we send two console errors when XSSAuditor blocks a page: "Refused to execute a JavaScript script. Source code of script found within request.\n", and "Entire page will be blocked.". We should only send one message, tuning it properly for the context, and including the URL of the page effected by the XSSAuditor's work. Covered by rebaselines of all the XSSAuditor and 'reflected-xss' tests. * html/parser/XSSAuditor.cpp: * html/parser/XSSAuditor.h: (WebCore::XSSAuditor::XSSAuditor): Add two booleans to track the headers used to set the XSSAuditor state. (WebCore::XSSAuditor::init): (WebCore::XSSAuditor::filterToken): Add detail about the header status to the constructed XSSInfo object. * html/parser/XSSAuditorDelegate.cpp: (WebCore::buildConsoleError): Move message construction out into a separate inlined function, as it's becoming complex. (WebCore::XSSAuditorDelegate::didBlockScript): Fold the "Entire page will be blocked" message into the main console error. * html/parser/XSSAuditorDelegate.h: (WebCore::XSSInfo::create): (WebCore::XSSInfo::XSSInfo): Add detail about header status to XSSInfo in order to correctly construct the console error. 2013-03-12 Sheriff Bot Unreviewed, rolling out r145494. http://trac.webkit.org/changeset/145494 https://bugs.webkit.org/show_bug.cgi?id=112117 Breaks Chromium Mac (Requested by pfeldman on #webkit). * bindings/scripts/CodeGeneratorV8.pm: (GenerateDomainSafeFunctionGetter): * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp: (WebCore::TestActiveDOMObjectV8Internal::postMessageAttrGetter): * bindings/v8/V8PerIsolateData.cpp: (WebCore::V8PerIsolateData::V8PerIsolateData): * bindings/v8/V8PerIsolateData.h: (V8PerIsolateData): * bindings/v8/custom/V8LocationCustom.cpp: (WebCore::V8Location::reloadAttrGetterCustom): (WebCore::V8Location::replaceAttrGetterCustom): (WebCore::V8Location::assignAttrGetterCustom): 2013-03-12 Yury Semikhatsky Web Inspector: add memory instrumentation for ImageLoader https://bugs.webkit.org/show_bug.cgi?id=112115 Reviewed by Alexander Pavlov. Added memory instrumentation to ImageLoader. CachedImage referenced by the loader is reported as having retaining reference. This allows to see in the native memory graph CachedImages that are not reachable from MemoryCache but referenced by HTMLImageElement. * loader/ImageLoader.cpp: (WebCore::ImageLoader::reportMemoryUsage): (WebCore): * loader/ImageLoader.h: (ImageLoader): 2013-03-12 Vsevolod Vlasov Web Inspector: Broken shortcuts in Snippets SourceFrame https://bugs.webkit.org/show_bug.cgi?id=112038 Reviewed by Pavel Feldman. * inspector/front-end/SnippetJavaScriptSourceFrame.js: (WebInspector.SnippetJavaScriptSourceFrame): (WebInspector.SnippetJavaScriptSourceFrame.prototype._onKeyDown): 2013-03-12 Eugene Klyuchnikov Web Inspector: [Timeline] File selector control becomes visible on "tab" navigation. https://bugs.webkit.org/show_bug.cgi?id=111710 Reviewed by Pavel Feldman. Solution: Exclude file selector control from tab-navigation flow. * inspector/front-end/FileUtils.js: Set tab-index to control. * inspector/front-end/TimelinePanel.js: Remove duplicating code. * inspector/front-end/inspector.css: (.status-bar-item): Make scroll height equal to offset height. 2013-03-12 Marja Hölttä [V8] Get rid of function-level static FunctionTemplates in generated bindings code https://bugs.webkit.org/show_bug.cgi?id=111971 Reviewed by Kentaro Hara. In the future we'll create and store function templates for main world and non-main worlds separately (see bug 111724), having function templates as static variables inside functions will break the functionality. No new tests (updated the bindings test expectations). * bindings/scripts/CodeGeneratorV8.pm: (GenerateDomainSafeFunctionGetter): * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp: (WebCore::TestActiveDOMObjectV8Internal::postMessageAttrGetter): * bindings/v8/V8PerIsolateData.cpp: (WebCore::V8PerIsolateData::V8PerIsolateData): (WebCore::V8PerIsolateData::privateTemplate): (WebCore): * bindings/v8/V8PerIsolateData.h: (V8PerIsolateData): * bindings/v8/custom/V8LocationCustom.cpp: (WebCore::V8Location::reloadAttrGetterCustom): (WebCore::V8Location::replaceAttrGetterCustom): (WebCore::V8Location::assignAttrGetterCustom): 2013-03-12 Tien-Ren Chen Need to notify ScrollingCoordinator when frame scrollbars are destroyed https://bugs.webkit.org/show_bug.cgi?id=112104 Reviewed by James Robinson. Need to notify ScrollingCoordinatorChromium whenever m_layerForHorizontalScrollbar / m_layerForVerticalScrollbar changes, for correct lifetime management. No new tests. Difficult to test lifetime management internal to ScrollingCoordinatorChromium. * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::destroyRootLayer): 2013-03-11 Simon Fraser We'll get there eventually. * platform/graphics/ca/win/PlatformCAFiltersWin.cpp: 2013-03-11 Simon Fraser Fumbled adding new files to the vcproj. Fixing. * WebCore.vcproj/WebCore.vcproj: 2013-03-11 Simon Fraser Fix the Windows build by providing implementations of PlatformCAFilters::setFiltersOnLayer(), PlatformCAFilters::numAnimatedFilterProperties() and PlatformCAFilters::animatedFilterPropertyName(), adding PlatformCAFiltersWin.cpp to the vcproj. * WebCore.vcproj/WebCore.vcproj: * platform/graphics/ca/PlatformCAFilters.h: (PlatformCAFilters): * platform/graphics/ca/win/PlatformCAFiltersWin.cpp: Copied from Source/WebCore/platform/graphics/ca/PlatformCAFilters.h. (PlatformCAFilters::setFiltersOnLayer): (PlatformCAFilters::numAnimatedFilterProperties): (PlatformCAFilters::animatedFilterPropertyName): 2013-03-11 Jochen Eisinger Don't create multiple user gesture indicators when forwarding events to sub frames https://bugs.webkit.org/show_bug.cgi?id=111923 Reviewed by Adam Barth. Ports that implement consumable user gestures depend on a single user gesture indicator being created in response to a single user gesture. Test: platform/chromium/fast/events/popup-allowed-from-gesture-only-once-iframes.html * dom/UserGestureIndicator.cpp: (WebCore::isDefinite): (WebCore::UserGestureIndicator::UserGestureIndicator): (WebCore::UserGestureIndicator::processingUserGesture): * dom/UserGestureIndicator.h: * page/EventHandler.cpp: (WebCore::EventHandler::handleMousePressEvent): (WebCore::EventHandler::handleMouseDoubleClickEvent): (WebCore::EventHandler::handleMouseReleaseEvent): (WebCore::EventHandler::keyEvent): (WebCore::EventHandler::handleTouchEvent): 2013-03-11 Simon Fraser Fix Windows build. * platform/graphics/ca/win/PlatformCAAnimationWin.cpp: 2013-03-11 Tim Horton Unreviewed build fix after http://trac.webkit.org/changeset/145472. * platform/graphics/ca/mac/PlatformCAFiltersMac.mm: (PlatformCAFilters::colorMatrixValueForFilter): 2013-03-11 Takashi Sakamoto [CSS] shadow from radius has wrong render in webkit https://bugs.webkit.org/show_bug.cgi?id=99928 Reviewed by Simon Fraser. No rounded cornder should be expanded in the mixed case, i.e. some corners are rounded, but others are not rounded. Need to look at each corner independently, i.e. top-left, top-right, bottom-left and bottom-right, and to expand corners whose width and height are larger than 0. Test: fast/box-shadow/box-shadow-with-zero-radius.html * platform/graphics/RoundedRect.cpp: (WebCore::RoundedRect::Radii::expand): 2013-03-11 Simon Fraser [CA] Animations of CSS filters don't work correctly https://bugs.webkit.org/show_bug.cgi?id=111905 Reviewed by Dean Jackson. Fix various issues with transitions of composited filters on Mac, most of which stemmed from the conversion to use CAFilter. Put the Mac CA filter-related code into a new file, PlatformCAFilters, to group code that creates filter properties into a single place. Animations of CIFilters using multiple values never worked correctly, because we would clobber all but the last property for each filter, so fix that. Changes in the moved filter code: - Made use of sepiaFullConstants in the CIFilter and CAFilter code. - For CI, return CIVectors instead of NSArrays of NSNumbers. - Fudge the inputColor for the CI grayscale filter to better match software filters. - fix some cases where the behavior was wrong in the isDefault() case. * WebCore.xcodeproj/project.pbxproj: Add PlatformCAFilters.h, PlatformCAFiltersMac.mm. * platform/graphics/GraphicsLayer.cpp: (WebCore::GraphicsLayer::animationNameForTransition): This function was creating a string containing non-ASCII characters. * platform/graphics/ca/GraphicsLayerCA.cpp: (WebCore::animationIdentifier): To handle CIFilter animations, we need to tack another index onto the animation identifier, since some animations require animating multiple properties of the same CIFilter. Add "subIndex" for this. (WebCore::GraphicsLayerCA::moveOrCopyAnimations): Ditto. (WebCore::GraphicsLayerCA::updateAnimations): Ditto. (WebCore::GraphicsLayerCA::setAnimationOnLayer): Ditto. (WebCore::GraphicsLayerCA::removeCAAnimationFromLayer): Ditto. (WebCore::GraphicsLayerCA::pauseCAAnimationOnLayer): Ditto. (WebCore::GraphicsLayerCA::createAnimationFromKeyframes): Ditto. (WebCore::GraphicsLayerCA::appendToUncommittedAnimations): Ditto. * platform/graphics/ca/GraphicsLayerCA.h: Ditto. (WebCore::GraphicsLayerCA::LayerPropertyAnimation::LayerPropertyAnimation): (LayerPropertyAnimation): * platform/graphics/ca/PlatformCAAnimation.h: (PlatformCAAnimation): Functions moved. * platform/graphics/ca/PlatformCAFilters.h: Added. (PlatformCAFilters): * platform/graphics/ca/mac/PlatformCAAnimationMac.mm: (PlatformCAAnimation::setFromValue): (PlatformCAAnimation::setToValue): (PlatformCAAnimation::setValues): * platform/graphics/ca/mac/PlatformCAFiltersMac.mm: Added. (PlatformCAFilters::filterValueForOperation): (PlatformCAFilters::colorMatrixValueForFilter): (PlatformCAFilters::numAnimatedFilterProperties): (PlatformCAFilters::animatedFilterPropertyName): * platform/graphics/ca/mac/PlatformCALayerMac.mm: (PlatformCALayer::PlatformCALayer): (PlatformCALayer::addAnimationForKey): (PlatformCALayer::setFilters): (PlatformCALayer::filtersCanBeComposited): 2013-03-11 Sheriff Bot Unreviewed, rolling out r145462. http://trac.webkit.org/changeset/145462 https://bugs.webkit.org/show_bug.cgi?id=112097 Compilation failure in PluginView.cpp (Requested by jamesr_ on #webkit). * accessibility/AccessibilityMenuList.cpp: (WebCore::AccessibilityMenuList::canSetFocusAttribute): * bindings/objc/DOM.mm: (kitClass): * bindings/v8/V8LazyEventListener.cpp: (WebCore::V8LazyEventListener::prepareListenerObject): * css/SelectorChecker.cpp: (WebCore::SelectorChecker::checkOne): * editing/ApplyStyleCommand.cpp: (WebCore::isLegacyAppleStyleSpan): (WebCore::isEmptyFontTag): (WebCore::ApplyStyleCommand::applyBlockStyle): * editing/FormatBlockCommand.cpp: (WebCore::isElementForFormatBlock): * editing/ReplaceSelectionCommand.cpp: (WebCore::isMailPasteAsQuotationNode): (WebCore::haveSameTagName): (WebCore::ReplaceSelectionCommand::removeRedundantStylesAndKeepStyleSpanInline): (WebCore::ReplaceSelectionCommand::makeInsertedContentRoundTrippableWithHTMLTreeBuilder): * history/CachedPage.cpp: (WebCore::CachedPage::restore): * html/ColorInputType.cpp: (WebCore::ColorInputType::suggestions): * html/HTMLTableRowsCollection.cpp: (WebCore::isInHead): (WebCore::isInBody): (WebCore::isInFoot): * inspector/DOMPatchSupport.cpp: (WebCore::DOMPatchSupport::innerPatchNode): * page/PageSerializer.cpp: (WebCore::SerializerMarkupAccumulator::appendCustomAttributes): * plugins/PluginView.cpp: (WebCore::PluginView::getValue): * rendering/RenderEmbeddedObject.cpp: (WebCore::RenderEmbeddedObject::paintContents): (WebCore::RenderEmbeddedObject::handleUnavailablePluginIndicatorEvent): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::name): * rendering/RenderMedia.cpp: (WebCore::RenderMedia::mediaElement): * rendering/RenderSearchField.cpp: (WebCore::RenderSearchField::autosaveName): * rendering/RenderTextControl.cpp: (WebCore::RenderTextControl::textFormControlElement): (WebCore::updateUserModifyProperty): * rendering/mathml/RenderMathMLFenced.cpp: (WebCore::RenderMathMLFenced::updateFromElement): * rendering/mathml/RenderMathMLFraction.cpp: (WebCore::RenderMathMLFraction::updateFromElement): * xml/parser/XMLDocumentParserLibxml2.cpp: (WebCore::XMLDocumentParser::XMLDocumentParser): (WebCore::XMLDocumentParser::endElementNs): 2013-03-11 Alexey Proskuryakov Move SharedWorkerRepository functions out of DefaultSharedWorkerRepository https://bugs.webkit.org/show_bug.cgi?id=100418 Reviewed by Sam Weinig. * CMakeLists.txt: * GNUmakefile.list.am: * Target.pri: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: Added SharedWorkerRepository.cpp. * WebCore.gyp/WebCore.gyp: * WebCore.gypi: Chromium uses WebKit/chromium/src/SharedWorkerRepository.cpp instead of WebCore/workers/DefaultSharedWorkerRepository.cpp. Not sure why it's added and then excluded, but did the same with the new SharedWorkerRepository.cpp, which just contains some code moved from that file. * workers/DefaultSharedWorkerRepository.cpp: (WebCore::SharedWorkerScriptLoader::load): Removed a PLATFORM(CHROMIUM) clause, chromium doesn't compile this file. (WebCore::DefaultSharedWorkerRepository::connectToWorker): Added a FIXME about seemingly wrong code. * workers/SharedWorkerRepository.cpp: Added. (WebCore::SharedWorkerRepository::isAvailable): (WebCore::SharedWorkerRepository::connect): (WebCore::SharedWorkerRepository::documentDetached): (WebCore::SharedWorkerRepository::hasSharedWorkers): Moved from DefaultSharedWorkerRepository.cpp, because this is part of SharedWorkerRepository. 2013-03-11 Adam Barth Make BackgroundHTMLParser work with doc.writes that enter or leave foreign content https://bugs.webkit.org/show_bug.cgi?id=109764 Reviewed by Eric Seidel. Previously, we were not reseting the state of the HTMLTreeBuilderSimulator when we failed speculative parsing. This had a number of observable consequences, including not parsing CDATA sections correctly when document.write caused us to enter foreign content. Test: fast/parser/document-write-svg-cdata.html * html/parser/BackgroundHTMLParser.cpp: (WebCore::BackgroundHTMLParser::BackgroundHTMLParser): (WebCore::BackgroundHTMLParser::resumeFrom): (WebCore::BackgroundHTMLParser::pumpTokenizer): (WebCore::BackgroundHTMLParser::sendTokensToMainThread): * html/parser/BackgroundHTMLParser.h: (Checkpoint): (BackgroundHTMLParser): * html/parser/HTMLDocumentParser.cpp: (WebCore::HTMLDocumentParser::validateSpeculations): (WebCore::HTMLDocumentParser::didFailSpeculation): * html/parser/HTMLDocumentParser.h: (ParsedChunk): * html/parser/HTMLElementStack.h: (WebCore::HTMLElementStack::ElementRecord::namespaceURI): * html/parser/HTMLTreeBuilder.h: (WebCore::HTMLTreeBuilder::options): (WebCore::HTMLTreeBuilder::openElements): (HTMLTreeBuilder): * html/parser/HTMLTreeBuilderSimulator.cpp: (WebCore::HTMLTreeBuilderSimulator::stateFor): (WebCore): * html/parser/HTMLTreeBuilderSimulator.h: (WebCore): (WebCore::HTMLTreeBuilderSimulator::state): (WebCore::HTMLTreeBuilderSimulator::setState): (HTMLTreeBuilderSimulator): 2013-03-11 Abhishek Arya Replace static_casts with to* functions. https://bugs.webkit.org/show_bug.cgi?id=112072 Reviewed by Philip Rogers. to* functions are preferred over static_cast calls since they help to catch bad casts easily on the testing infrastructure. * accessibility/AccessibilityMenuList.cpp: (WebCore::AccessibilityMenuList::canSetFocusAttribute): * bindings/objc/DOM.mm: (kitClass): * bindings/v8/V8LazyEventListener.cpp: (WebCore::V8LazyEventListener::prepareListenerObject): * css/SelectorChecker.cpp: (WebCore::SelectorChecker::checkOne): * editing/ApplyStyleCommand.cpp: (WebCore::isLegacyAppleStyleSpan): (WebCore::isEmptyFontTag): (WebCore::ApplyStyleCommand::applyBlockStyle): * editing/FormatBlockCommand.cpp: (WebCore::isElementForFormatBlock): * editing/ReplaceSelectionCommand.cpp: (WebCore::isMailPasteAsQuotationNode): (WebCore::haveSameTagName): (WebCore::ReplaceSelectionCommand::removeRedundantStylesAndKeepStyleSpanInline): (WebCore::ReplaceSelectionCommand::makeInsertedContentRoundTrippableWithHTMLTreeBuilder): * history/CachedPage.cpp: (WebCore::CachedPage::restore): * html/ColorInputType.cpp: (WebCore::ColorInputType::suggestions): * html/HTMLTableRowsCollection.cpp: (WebCore::isInHead): (WebCore::isInBody): (WebCore::isInFoot): * inspector/DOMPatchSupport.cpp: (WebCore::DOMPatchSupport::innerPatchNode): * page/PageSerializer.cpp: (WebCore::SerializerMarkupAccumulator::appendCustomAttributes): * plugins/PluginView.cpp: (WebCore::PluginView::getValue): * rendering/RenderEmbeddedObject.cpp: (WebCore::RenderEmbeddedObject::paintContents): (WebCore::RenderEmbeddedObject::handleUnavailablePluginIndicatorEvent): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::name): * rendering/RenderMedia.cpp: (WebCore::RenderMedia::mediaElement): * rendering/RenderSearchField.cpp: (WebCore::RenderSearchField::autosaveName): * rendering/RenderTextControl.cpp: (WebCore::RenderTextControl::textFormControlElement): (WebCore::updateUserModifyProperty): * rendering/mathml/RenderMathMLFenced.cpp: (WebCore::RenderMathMLFenced::updateFromElement): * rendering/mathml/RenderMathMLFraction.cpp: (WebCore::RenderMathMLFraction::updateFromElement): * xml/parser/XMLDocumentParserLibxml2.cpp: (WebCore::XMLDocumentParser::XMLDocumentParser): (WebCore::XMLDocumentParser::endElementNs): 2013-03-11 Philip Rogers Replace static_casts for SVGSVGElement and SVGStopElement https://bugs.webkit.org/show_bug.cgi?id=111651 Reviewed by Stephen Chenney. toSVGSVGElement and toSVGStopElement are preferred over static_casts because bad casts can be caught on our testing infrastructure. This patches replaces all static_casts for SVGSVGElement and SVGStopElement with toSVGSVGElement and toSVGStopElement, respectively. Additionaly, this patch renames SVGElement::isSVG to SVGElement::isSVGSVGElement to remove ambiguity for callers who may confuse this with isSVGElement. No new tests as this is covered with existing tests. * rendering/svg/RenderSVGRoot.cpp: (WebCore::RenderSVGRoot::computeIntrinsicRatioInformation): (WebCore::RenderSVGRoot::computeReplacedLogicalWidth): (WebCore::RenderSVGRoot::computeReplacedLogicalHeight): (WebCore::RenderSVGRoot::layout): (WebCore::RenderSVGRoot::buildLocalToBorderBoxTransform): (WebCore::RenderSVGRoot::hasRelativeDimensions): (WebCore::RenderSVGRoot::hasRelativeIntrinsicLogicalWidth): (WebCore::RenderSVGRoot::hasRelativeLogicalHeight): * rendering/svg/RenderSVGViewportContainer.cpp: (WebCore::RenderSVGViewportContainer::determineIfLayoutSizeChanged): (WebCore::RenderSVGViewportContainer::calcViewport): (WebCore::RenderSVGViewportContainer::viewportTransform): * svg/SVGDocument.cpp: (WebCore::SVGDocument::rootElement): (WebCore::SVGDocument::childShouldCreateRenderer): * svg/SVGElement.cpp: (WebCore::SVGElement::ownerSVGElement): * svg/SVGElement.h: (WebCore::SVGElement::isSVGSVGElement): * svg/SVGGradientElement.cpp: (WebCore::SVGGradientElement::buildStops): * svg/SVGLengthContext.cpp: (WebCore::SVGLengthContext::determineViewport): * svg/SVGSVGElement.h: (WebCore): (WebCore::toSVGSVGElement): * svg/SVGStopElement.h: (WebCore::toSVGStopElement): (WebCore): 2013-03-11 Tony Chang Small code cleanup in RenderFlexibleBox https://bugs.webkit.org/show_bug.cgi?id=112076 Reviewed by Ojan Vafai. No new tests, this is a refactor and existing tests in css3/flexbox should pass. * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::layoutBlock): Remove unused param from repositionLogicalHeightDependentFlexItems. (WebCore::RenderFlexibleBox::repositionLogicalHeightDependentFlexItems): Remove unused param from repositionLogicalHeightDependentFlexItems. The clientLogicalBottom can't have changed in this time (the only thing we've done is align children). (WebCore::RenderFlexibleBox::computeMainAxisPreferredSizes): Just call layout() if we marked the flexitem as needing layout. (WebCore::RenderFlexibleBox::applyStretchAlignmentToChild): Just call layout() if we marked the flexitem as needing layout. * rendering/RenderFlexibleBox.h: (RenderFlexibleBox): Remove unused param from repositionLogicalHeightDependentFlexItems. 2013-03-11 Jochen Eisinger Rename DefinitelyProcessingUserGesture to DefinitelyProcessingNewUserGesture https://bugs.webkit.org/show_bug.cgi?id=111959 Reviewed by Alexey Proskuryakov. The rationale is that the UserGestureIndicator will increase the number of consumable user gestures when it's invoked with what is now DefinitelyProcessingNewUserGesture. In a follow-up change I will reintroduce DefinitelyProcessingUserGesture which will only increase the consumable user gesture count if we are not already processing a user gesture. No new tests, no change in functionality. * accessibility/AccessibilityNodeObject.cpp: (WebCore::AccessibilityNodeObject::increment): (WebCore::AccessibilityNodeObject::decrement): * accessibility/AccessibilityObject.cpp: (WebCore::AccessibilityObject::press): * bindings/ScriptControllerBase.cpp: (WebCore::ScriptController::executeScript): * bindings/js/ScriptController.cpp: (WebCore::ScriptController::executeScriptInWorld): * bindings/v8/NPV8Object.cpp: (_NPN_EvaluateHelper): * dom/UserGestureIndicator.cpp: (WebCore::isDefinite): (WebCore::UserGestureIndicator::UserGestureIndicator): (WebCore::UserGestureIndicator::processingUserGesture): * dom/UserGestureIndicator.h: * inspector/InspectorFrontendClientLocal.cpp: (WebCore::InspectorFrontendClientLocal::openInNewTab): * inspector/InspectorFrontendHost.cpp: (WebCore::FrontendMenuProvider::contextMenuItemSelected): * inspector/InspectorPageAgent.cpp: (WebCore::InspectorPageAgent::navigate): * loader/NavigationScheduler.cpp: (WebCore::ScheduledURLNavigation::fire): (WebCore::ScheduledURLNavigation::didStartTimer): (WebCore::ScheduledRedirect::fire): (WebCore::ScheduledRefresh::fire): (WebCore::ScheduledHistoryNavigation::fire): (WebCore::ScheduledFormSubmission::fire): (WebCore::ScheduledFormSubmission::didStartTimer): * page/EventHandler.cpp: (WebCore::EventHandler::handleMousePressEvent): (WebCore::EventHandler::handleMouseDoubleClickEvent): (WebCore::EventHandler::handleMouseReleaseEvent): (WebCore::EventHandler::keyEvent): (WebCore::EventHandler::handleTouchEvent): * platform/chromium/PopupContainer.cpp: (WebCore::PopupContainer::handleMouseDownEvent): (WebCore::PopupContainer::handleMouseMoveEvent): (WebCore::PopupContainer::handleMouseReleaseEvent): (WebCore::PopupContainer::handleWheelEvent): (WebCore::PopupContainer::handleKeyEvent): 2013-03-11 Yuki Sekiguchi Ruby text is incorrectly positioned when its writing-mode is changed to vertical after layout is done https://bugs.webkit.org/show_bug.cgi?id=96592 Reviewed by Hajime Morrita. Fixed logical left of RenderRubyText is not cleared. This causes trouble when RenderRubyTest is laid out vertically after horizontally. Horizontal layout set logical top(== y). Vertical layout don't set logical left(== y). RenderRubyText::y remain old one. We clear old RenderRubyText::y at the first part of layout(). Test: fast/writing-mode/ruby-text-logical-left.html * rendering/RenderRubyRun.cpp: (WebCore::RenderRubyRun::layout): Reset logicalLeft not to reuse old one. 2013-03-11 Lamarque V. Souza [css3-text] Add partial parsing support for text-underline-position property from CSS3 Text https://bugs.webkit.org/show_bug.cgi?id=102491 Reviewed by Julien Chaffraix. This patch extends the existing parsing to support 'auto', 'alphabetic' and 'under'. We don't fully match the specification as we don't support [ left | right ] and this is left for another implementation as the rendering will need to be added. Test: fast/css3-text/css3-text-decoration/getComputedStyle/getComputedStyle-text-underline-position.html * css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): (WebCore::CSSParser::parseTextUnderlinePosition): * css/CSSParser.h: * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): (WebCore::CSSPrimitiveValue::operator TextUnderlinePosition): * css/CSSProperty.cpp: (WebCore::CSSProperty::isInheritedProperty): Added parsing-related checks for text-underline-position property. * css/CSSPropertyNames.in: Added '-webkit-underline-position' property. * css/CSSValueKeywords.in: * css/SVGCSSValueKeywords.in: * css/StyleBuilder.cpp: (ApplyPropertyTextUnderlinePosition): (WebCore::ApplyPropertyTextUnderlinePosition::applyValue): (WebCore::ApplyPropertyTextUnderlinePosition::createHandler): (WebCore::StyleBuilder::StyleBuilder): Set property handler for text-underline-position. * css/StyleResolver.cpp: (WebCore::StyleResolver::applyProperty): * rendering/style/RenderStyle.h: * rendering/style/RenderStyleConstants.h: * rendering/style/StyleRareInheritedData.cpp: (WebCore::StyleRareInheritedData::StyleRareInheritedData): (WebCore::StyleRareInheritedData::operator==): Added support for m_textUnderlinePosition on copy constructor and operator assignment functions. * rendering/style/StyleRareInheritedData.h: (StyleRareInheritedData): Added m_textUnderlinePosition here as it won't be used regularly. 2013-03-11 Christian Biesinger Hit testing should use ancestorInThisScope to get the non-shadow ancestor https://bugs.webkit.org/show_bug.cgi?id=112068 Reviewed by Dimitri Glazkov. Tests: media/nodesFromRect-shadowContent.html * rendering/HitTestResult.cpp: (WebCore::HitTestResult::setToNonShadowAncestor): (WebCore::HitTestResult::addNodeToRectBasedTestResult): Use ancestorInThisScope which is not deprecated and which produces correct results for nested shadow trees (e.g. in case of