2014-01-05 Andreas Kling Use lineageOfType to simplify two rendering helpers. Reviewed by Antti Koivisto. * rendering/RenderRuby.cpp: (WebCore::findRubyRunParent): * rendering/svg/SVGRenderSupport.cpp: (WebCore::SVGRenderSupport::findTreeRootObject): Simplify two functions that walk their parent chain to find the closest ancestor of a certain type. * rendering/RenderRubyRun.h: Add requisite isRendererOfType(). 2014-01-05 Csaba Osztrogonác Fix the Mac build too. * page/PageThrottler.h: 2014-01-05 Csaba Osztrogonác Weekend URTBF after r161319 to make non Mac builds work again. * page/PageThrottler.h: 2014-01-05 Gavin Barraclough Move process suppression of WebProcess to Page (from UIProcess) https://bugs.webkit.org/show_bug.cgi?id=126480 Reviewed by Sam Weinig. Let each page take a UserActivity rather than having to coalesce this state, and take different activity tokens for normal visibility and suppression disabled, so we can see why the process is not suppressed. * WebCore.exp.in: * page/Page.cpp: (WebCore::Page::setIsVisuallyIdle): * page/Page.h: - setThrottled -> setIsVisuallyIdle. * page/PageThrottler.cpp: (WebCore::PageThrottler::PageThrottler): - Initialize m_visuallyNonIdle. (WebCore::PageThrottler::~PageThrottler): - setThrottled -> setIsVisuallyIdle. (WebCore::PageThrottler::setIsVisuallyIdle): - Use m_visuallyNonIdle to disable supression when the page is not visually idle. * page/PageThrottler.h: - setThrottled -> setIsVisuallyIdle, added m_visuallyNonIdle. 2014-01-04 Sam Weinig Move a few more functions from RenderBlock to RenderBlockFlow https://bugs.webkit.org/show_bug.cgi?id=126494 Reviewed by Andreas Kling. * rendering/RenderBlock.h: * rendering/RenderBlockFlow.h: (WebCore::RenderBlockFlow::adjustInlineDirectionLineBounds): * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlockFlow::textAlignmentForLine): (WebCore::RenderBlockFlow::updateLogicalWidthForAlignment): (WebCore::RenderBlockFlow::startAlignedOffsetForLine): These are only used by RenderBlockFlow, so move them there. 2014-01-04 Simon Fraser Prepare the ScrollingTree for remote use https://bugs.webkit.org/show_bug.cgi?id=126493 Reviewed by Sam Weinig. When committing the scrolling tree, we clone the ScrollingStateTree to hand off to another thread, or (in future) to encode to send to the UI process. During this cloning process, two types of layer transformations take place: for threaded scrolling, we replace GraphicsLayer with PlatformLayers. For remote scrolling, we'll replace GraphicsLayers with PlatformLayerIDs. Allow the ScrollingCoordinator to specify which type of transformation occurs by giving ScrollingStateTree a LayerRepresentation::Type member, which is consulted during ScrollingStateNode cloning. Also only copy layers that have changed to avoid setting dirty bits. Expose some other stuff on ScrollingStateTree which will be needed for remote scrolling. * page/scrolling/ScrollingStateFixedNode.cpp: (WebCore::ScrollingStateFixedNode::syncLayerPositionForViewportRect): * page/scrolling/ScrollingStateNode.cpp: (WebCore::ScrollingStateNode::ScrollingStateNode): * page/scrolling/ScrollingStateNode.h: (WebCore::LayerRepresentation::operator GraphicsLayer::PlatformLayerID): (WebCore::LayerRepresentation::toRepresentation): (WebCore::ScrollingStateNode::changedProperties): (WebCore::ScrollingStateNode::setChangedProperties): (WebCore::ScrollingStateNode::parentNodeID): * page/scrolling/ScrollingStateScrollingNode.cpp: (WebCore::ScrollingStateScrollingNode::ScrollingStateScrollingNode): * page/scrolling/ScrollingStateStickyNode.cpp: (WebCore::ScrollingStateStickyNode::syncLayerPositionForViewportRect): * page/scrolling/ScrollingStateTree.cpp: (WebCore::ScrollingStateTree::ScrollingStateTree): (WebCore::ScrollingStateTree::commit): (WebCore::ScrollingStateTree::setRemovedNodes): (WebCore::ScrollingStateTree::stateNodeForID): * page/scrolling/ScrollingStateTree.h: (WebCore::ScrollingStateTree::nodeCount): (WebCore::ScrollingStateTree::nodeMap): (WebCore::ScrollingStateTree::preferredLayerRepresentation): (WebCore::ScrollingStateTree::setPreferredLayerRepresentation): * page/scrolling/mac/ScrollingCoordinatorMac.mm: (WebCore::ScrollingCoordinatorMac::commitTreeState): 2014-01-04 Sam Weinig Move LineBreaker functions to LineBreaker.cpp https://bugs.webkit.org/show_bug.cgi?id=126491 Reviewed by Simon Fraser. - Moves LineBreaker::nextLineBreak() and LineBreaker::nextSegmentBreak() to LineBreaker.cpp from RenderBlockLineLayout.cpp - Moves requiresIndent() to LineWidth.h/cpp from RenderBlockLineLayout.cpp so it can be shared. - Adds missing inline specifier to BreakingContext::handleEndOfLine() to avoid duplicate symbols. * rendering/RenderBlockLineLayout.cpp: (WebCore::updateLogicalInlinePositions): (WebCore::RenderBlockFlow::computeInlineDirectionPositionsForLine): * rendering/line/BreakingContextInlineHeaders.h: (WebCore::BreakingContext::handleEndOfLine): * rendering/line/LineBreaker.cpp: (WebCore::LineBreaker::nextLineBreak): (WebCore::LineBreaker::nextSegmentBreak): * rendering/line/LineWidth.cpp: (WebCore::requiresIndent): * rendering/line/LineWidth.h: 2014-01-04 Martin Robinson [GTK] [CMake] Fix the video and audio build https://bugs.webkit.org/show_bug.cgi?id=126464 Reviewed by Philippe Normand. * PlatformGTK.cmake: Complete the audio and video source lists. 2014-01-04 Zan Dobersek Explicitly use the std:: nested name specifier when using std::pair, std::make_pair https://bugs.webkit.org/show_bug.cgi?id=126439 Reviewed by Andreas Kling. Instead of relying on std::pair and std::make_pair symbols being present in the current scope through the pair and make_pair symbols, the std:: specifier should be used explicitly. * Modules/webdatabase/DatabaseTracker.cpp: (WebCore::DatabaseTracker::scheduleNotifyDatabaseChanged): * accessibility/AXObjectCache.h: * accessibility/AccessibilityARIAGridCell.cpp: (WebCore::AccessibilityARIAGridCell::rowIndexRange): (WebCore::AccessibilityARIAGridCell::columnIndexRange): * accessibility/AccessibilityARIAGridCell.h: * accessibility/AccessibilityObject.h: * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::mathPrescripts): (WebCore::AccessibilityRenderObject::mathPostscripts): * accessibility/AccessibilityTable.cpp: (WebCore::AccessibilityTable::cellForColumnAndRow): * accessibility/AccessibilityTableCell.cpp: (WebCore::AccessibilityTableCell::rowIndexRange): (WebCore::AccessibilityTableCell::columnIndexRange): * accessibility/AccessibilityTableCell.h: * accessibility/atk/WebKitAccessibleInterfaceTable.cpp: (webkitAccessibleTableGetColumnAtIndex): (webkitAccessibleTableGetRowAtIndex): (webkitAccessibleTableGetColumnExtentAt): (webkitAccessibleTableGetRowExtentAt): (webkitAccessibleTableGetColumnHeader): (webkitAccessibleTableGetRowHeader): * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm: (-[WebAccessibilityObjectWrapper accessibilityHeaderElements]): (-[WebAccessibilityObjectWrapper accessibilityRowRange]): (-[WebAccessibilityObjectWrapper accessibilityColumnRange]): * accessibility/mac/WebAccessibilityObjectWrapperBase.mm: (convertMathPairsToNSArray): * accessibility/mac/WebAccessibilityObjectWrapperMac.mm: (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]): * bindings/js/SerializedScriptValue.cpp: * dom/ContainerNode.cpp: * dom/StyledElement.cpp: (WebCore::attributeNameSort): * html/MediaFragmentURIParser.cpp: (WebCore::MediaFragmentURIParser::parseTimeFragment): * html/parser/HTMLMetaCharsetParser.h: * inspector/ContentSearchUtils.cpp: (WebCore::ContentSearchUtils::getRegularExpressionMatchesByLines): (WebCore::ContentSearchUtils::searchInTextByLines): * inspector/DOMPatchSupport.cpp: (WebCore::DOMPatchSupport::diff): (WebCore::DOMPatchSupport::innerPatchChildren): * inspector/DOMPatchSupport.h: * inspector/InspectorAgent.cpp: (WebCore::InspectorAgent::enable): (WebCore::InspectorAgent::evaluateForTestInFrontend): * inspector/InspectorAgent.h: * loader/FormSubmission.cpp: (WebCore::FormSubmission::create): * loader/cache/CachedImage.cpp: (WebCore::CachedImage::brokenImage): * loader/cache/CachedImage.h: * platform/URL.cpp: (WebCore::findHostnamesInMailToURL): (WebCore::encodeHostnames): * platform/blackberry/CookieDatabaseBackingStore/CookieDatabaseBackingStore.h: * platform/graphics/FontCache.cpp: (WebCore::FontCache::getCachedFontData): * platform/graphics/WidthIterator.cpp: * platform/network/HTTPHeaderMap.cpp: (WebCore::HTTPHeaderMap::adopt): * platform/network/ResourceResponseBase.cpp: (WebCore::ResourceResponseBase::parseCacheControlDirectives): (WebCore::parseCacheHeader): * platform/text/AtomicStringKeyedMRUCache.h: * platform/text/LineBreakIteratorPoolICU.h: * rendering/InlineFlowBox.h: * rendering/RenderImage.cpp: (WebCore::RenderImage::imageSizeForError): (WebCore::RenderImage::paintReplaced): * rendering/RenderTableSection.cpp: (WebCore::RenderTableSection::cachedCollapsedBorder): * rendering/RenderTableSection.h: * rendering/svg/SVGTextRunRenderingContext.cpp: (WebCore::SVGTextRunRenderingContext::glyphDataForCharacter): * svg/SVGAnimatedAngle.cpp: (WebCore::SVGAnimatedAngleAnimator::constructFromString): (WebCore::SVGAnimatedAngleAnimator::addAnimatedTypes): (WebCore::SVGAnimatedAngleAnimator::calculateAnimatedValue): * svg/SVGAnimatedIntegerOptionalInteger.cpp: (WebCore::SVGAnimatedIntegerOptionalIntegerAnimator::constructFromString): (WebCore::SVGAnimatedIntegerOptionalIntegerAnimator::addAnimatedTypes): (WebCore::SVGAnimatedIntegerOptionalIntegerAnimator::calculateAnimatedValue): * svg/SVGAnimatedNumberOptionalNumber.cpp: (WebCore::SVGAnimatedNumberOptionalNumberAnimator::constructFromString): (WebCore::SVGAnimatedNumberOptionalNumberAnimator::addAnimatedTypes): (WebCore::SVGAnimatedNumberOptionalNumberAnimator::calculateAnimatedValue): * svg/SVGAnimatedType.cpp: (WebCore::SVGAnimatedType::createIntegerOptionalInteger): (WebCore::SVGAnimatedType::createNumberOptionalNumber): * svg/SVGAnimatedType.h: (WebCore::SVGAnimatedType::integerOptionalInteger): (WebCore::SVGAnimatedType::numberOptionalNumber): * svg/SVGAnimatedTypeAnimator.h: (WebCore::SVGAnimatedTypeAnimator::constructFromBaseValues): (WebCore::SVGAnimatedTypeAnimator::resetFromBaseValues): * svg/SVGParserUtilities.h: * svg/animation/SMILTimeContainer.h: 2014-01-03 Simon Fraser Attempt to fix EFL build. * page/scrolling/ScrollingStateTree.cpp: (WebCore::ScrollingStateTree::setHasChangedProperties): 2014-01-03 Simon Fraser Clean up the means of committing the scrolling state tree https://bugs.webkit.org/show_bug.cgi?id=126482 Reviewed by Tim Horton. ScrollingStateNodes would manually call scrollingStateTree().setHasChangedProperties() after setPropertyChanged() in lots of places, which was repetitive, and AsyncScrollingCoordinator manually called scheduleTreeStateCommit() in many places. Clean up both of these with a clearer trigger for state tree commits. ScrollingStateNodes::setPropertyChanged() calls ScrollingStateTree::setHasChangedProperties(), which turns around and tells the ScrollingCoordinator that the state tree became dirty. * page/scrolling/AsyncScrollingCoordinator.cpp: (WebCore::AsyncScrollingCoordinator::AsyncScrollingCoordinator): (WebCore::AsyncScrollingCoordinator::scrollingStateTreePropertiesChanged): (WebCore::AsyncScrollingCoordinator::frameViewLayoutUpdated): (WebCore::AsyncScrollingCoordinator::requestScrollPositionUpdate): (WebCore::AsyncScrollingCoordinator::updateScrollingNode): (WebCore::AsyncScrollingCoordinator::updateViewportConstrainedNode): (WebCore::AsyncScrollingCoordinator::setScrollLayerForNode): (WebCore::AsyncScrollingCoordinator::setCounterScrollingLayerForNode): (WebCore::AsyncScrollingCoordinator::setHeaderLayerForNode): (WebCore::AsyncScrollingCoordinator::setFooterLayerForNode): (WebCore::AsyncScrollingCoordinator::setNonFastScrollableRegionForNode): (WebCore::AsyncScrollingCoordinator::setWheelEventHandlerCountForNode): (WebCore::AsyncScrollingCoordinator::setScrollBehaviorForFixedElementsForNode): (WebCore::AsyncScrollingCoordinator::setScrollbarPaintersFromScrollbarsForNode): (WebCore::AsyncScrollingCoordinator::setSynchronousScrollingReasons): * page/scrolling/AsyncScrollingCoordinator.h: * page/scrolling/ScrollingStateFixedNode.cpp: (WebCore::ScrollingStateFixedNode::updateConstraints): * page/scrolling/ScrollingStateNode.cpp: (WebCore::ScrollingStateNode::setPropertyChanged): (WebCore::ScrollingStateNode::setLayer): * page/scrolling/ScrollingStateNode.h: * page/scrolling/ScrollingStateScrollingNode.cpp: (WebCore::ScrollingStateScrollingNode::setViewportRect): (WebCore::ScrollingStateScrollingNode::setTotalContentsSize): (WebCore::ScrollingStateScrollingNode::setScrollOrigin): (WebCore::ScrollingStateScrollingNode::setScrollableAreaParameters): (WebCore::ScrollingStateScrollingNode::setFrameScaleFactor): (WebCore::ScrollingStateScrollingNode::setNonFastScrollableRegion): (WebCore::ScrollingStateScrollingNode::setWheelEventHandlerCount): (WebCore::ScrollingStateScrollingNode::setSynchronousScrollingReasons): (WebCore::ScrollingStateScrollingNode::setScrollBehaviorForFixedElements): (WebCore::ScrollingStateScrollingNode::setRequestedScrollPosition): (WebCore::ScrollingStateScrollingNode::setHeaderHeight): (WebCore::ScrollingStateScrollingNode::setFooterHeight): (WebCore::ScrollingStateScrollingNode::setCounterScrollingLayer): (WebCore::ScrollingStateScrollingNode::setHeaderLayer): (WebCore::ScrollingStateScrollingNode::setFooterLayer): * page/scrolling/ScrollingStateStickyNode.cpp: (WebCore::ScrollingStateStickyNode::updateConstraints): * page/scrolling/ScrollingStateTree.cpp: (WebCore::ScrollingStateTree::create): (WebCore::ScrollingStateTree::ScrollingStateTree): (WebCore::ScrollingStateTree::setHasChangedProperties): (WebCore::ScrollingStateTree::didRemoveNode): * page/scrolling/ScrollingStateTree.h: * page/scrolling/mac/ScrollingCoordinatorMac.mm: (WebCore::ScrollingCoordinatorMac::scheduleTreeStateCommit): * page/scrolling/mac/ScrollingStateScrollingNodeMac.mm: (WebCore::ScrollingStateScrollingNode::setScrollbarPaintersFromScrollbars): 2014-01-03 Simon Fraser Try to fix CoordinatedGraphics build after r161303. Remove implementations which are now in the cross-platform file. * page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.cpp: (WebCore::ScrollingCoordinatorCoordinatedGraphics::detachFromStateTree): (WebCore::ScrollingCoordinatorCoordinatedGraphics::updateViewportConstrainedNode): * page/scrolling/coordinatedgraphics/ScrollingStateNodeCoordinatedGraphics.cpp: * page/scrolling/coordinatedgraphics/ScrollingStateScrollingNodeCoordinatedGraphics.cpp: 2014-01-03 Simon Fraser Simplify ScrollingStateNode references to various layer types https://bugs.webkit.org/show_bug.cgi?id=126477 Reviewed by Tim Horton. ScrollingStateNodes referenced both GraphicsLayer and PlatformLayers, in confusing ways. In the main thread they have a GraphicsLayer*, but need to check to see if the underlying PlatformLayer changed. Then, when cloned to commit to the scrolling thread, they drop the GraphicsLayer and store a PlatformLayer. Hide the complexity (and prepare for the future) by adding LayerRepresentation, which wraps various different flavors of layers, and knows how to check whether the PlatformLayer underlying a GraphicsLayer changed. ScrollingStateNode layer setters then just take and compare LayerRepresentations. Copy constructors convert to a PlatformLayer representation (though not really in the right place currently), and ScrollingTreeNodes get PlatformLayers. * page/scrolling/AsyncScrollingCoordinator.cpp: (WebCore::AsyncScrollingCoordinator::updateScrollingNode): (WebCore::AsyncScrollingCoordinator::setScrollLayerForNode): * page/scrolling/ScrollingStateFixedNode.cpp: (WebCore::ScrollingStateFixedNode::syncLayerPositionForViewportRect): * page/scrolling/ScrollingStateNode.cpp: (WebCore::ScrollingStateNode::ScrollingStateNode): (WebCore::ScrollingStateNode::setLayer): * page/scrolling/ScrollingStateNode.h: (WebCore::LayerRepresentation::LayerRepresentation): (WebCore::LayerRepresentation::operator GraphicsLayer*): (WebCore::LayerRepresentation::operator PlatformLayer*): (WebCore::LayerRepresentation::operator GraphicsLayer::PlatformLayerID): (WebCore::LayerRepresentation::operator ==): (WebCore::LayerRepresentation::toPlatformLayer): (WebCore::LayerRepresentation::representsGraphicsLayer): (WebCore::LayerRepresentation::representsPlatformLayer): (WebCore::LayerRepresentation::representsPlatformLayerID): (WebCore::ScrollingStateNode::layer): * page/scrolling/ScrollingStateScrollingNode.cpp: (WebCore::ScrollingStateScrollingNode::ScrollingStateScrollingNode): (WebCore::ScrollingStateScrollingNode::setCounterScrollingLayer): (WebCore::ScrollingStateScrollingNode::setHeaderLayer): (WebCore::ScrollingStateScrollingNode::setFooterLayer): * page/scrolling/ScrollingStateScrollingNode.h: * page/scrolling/ScrollingStateStickyNode.cpp: (WebCore::ScrollingStateStickyNode::syncLayerPositionForViewportRect): * page/scrolling/mac/ScrollingStateNodeMac.mm: * page/scrolling/mac/ScrollingStateScrollingNodeMac.mm: * page/scrolling/mac/ScrollingTreeFixedNode.mm: (WebCore::ScrollingTreeFixedNode::updateBeforeChildren): * page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm: (WebCore::ScrollingTreeScrollingNodeMac::updateBeforeChildren): * page/scrolling/mac/ScrollingTreeStickyNode.mm: (WebCore::ScrollingTreeStickyNode::updateBeforeChildren): 2014-01-03 Brent Fulgham [WebGL] Blit operation from Multisample FBO to rendering FBO must ignore GL_SCISSOR test https://bugs.webkit.org/show_bug.cgi?id=126470 Reviewed by Dean Jackson. Covered by webgl/1.0.2/resources/webgl_test_files/conformance/rendering/gl-scissor-test.html * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp: (WebCore::GraphicsContext3D::resolveMultisamplingIfNecessary): Temporarily deactivate the GL_SCISSOR test while we do our blit, then reactivate if necessary. 2014-01-03 Brent Fulgham [WebGL] CGLPixelFormat should specify SampleBuffer and Sample count when using MSAA https://bugs.webkit.org/show_bug.cgi?id=126468 Reviewed by Dean Jackson. Covered by webgl/1.0.2/resources/webgl_test_files/conformance/rendering/gl-scissor-test.html * platform/graphics/mac/GraphicsContext3DMac.mm: (WebCore::setPixelFormat): Add kCGLPFAMultisample, kCGLPFASampleBuffers (and count), and kCGLPFASamples (and count) to our pixel format when 'antialias=true'. (WebCore::GraphicsContext3D::GraphicsContext3D): Pass a new 'antialias' flag to the setPixelFormat method so we can turn on MSAA features when needed. 2014-01-03 Simon Fraser Give all PlatformCALayers a PlatformLayerID, not just remote ones https://bugs.webkit.org/show_bug.cgi?id=126466 Reviewed by Tim Horton. The ScrollingStateTree has references to both GraphicsLayers and PlatformLayers which is confusing, and is necessary because the underlying PlatformLayer inside a GraphicsLayer can change. In order to hide some of this complexity, expose GraphicsLayer::primaryLayerID() which is a PlatformLayerID that clients can hold onto to test for underlying layer swapping. Also constify LayerType m_layerType on PlatformCALayer, which required cleaning up the construction of PlatformCALayerMac in the case where a PlatformCALayerMac is wrapping an existing CALayer (which happens for video). * WebCore.exp.in: * platform/graphics/GraphicsLayer.h: (WebCore::GraphicsLayer::primaryLayerID): * platform/graphics/ca/GraphicsLayerCA.cpp: (WebCore::GraphicsLayerCA::primaryLayerID): * platform/graphics/ca/GraphicsLayerCA.h: * platform/graphics/ca/PlatformCALayer.cpp: (WebCore::generateLayerID): (WebCore::PlatformCALayer::PlatformCALayer): * platform/graphics/ca/PlatformCALayer.h: (WebCore::PlatformCALayer::layerID): * platform/graphics/ca/mac/PlatformCALayerMac.h: * platform/graphics/ca/mac/PlatformCALayerMac.mm: (PlatformCALayerMac::create): (PlatformCALayerMac::PlatformCALayerMac): (PlatformCALayerMac::commonInit): 2014-01-03 Andreas Kling Add lineageOfType renderer iterator and start using it. Add a convenient way to iterate over a renderers ancestry *including* the starting point renderer (if it meets the type criteria.) This works just like lineageOfType for Elements. Reviewed by Geoffrey Garen. * rendering/RenderAncestorIterator.h: (WebCore::lineageOfType): Added. Returns an adapter for walking a renderer's entire lineage matching any renderer of the given type. * rendering/RenderBoxModelObject.h: * rendering/RenderLayerModelObject.h: Add the requisite isRendererOfType helpers. * rendering/RenderBox.cpp: (WebCore::RenderBox::enclosingFloatPaintingLayer): * rendering/RenderObject.cpp: (WebCore::RenderObject::enclosingLayer): (WebCore::RenderObject::enclosingBox): (WebCore::RenderObject::enclosingBoxModelObject): Simplify with lineageOfType. Added some FIXMEs about functions that should return references instead of pointers. 2014-01-03 Martin Robinson Small build fix for the GTK+ CMake port * PlatformGTK.cmake: Add an IDL file that is missing from the list of IDLs used to generate GObject DOM bindings. 2014-01-03 Daniel Bates [iOS] Upstream WebCore/css changes https://bugs.webkit.org/show_bug.cgi?id=126237 Reviewed by Simon Fraser. * css/CSSComputedStyleDeclaration.cpp: (WebCore::ComputedStyleExtractor::propertyValue): Added iOS-specific code and FIXME comment. * css/CSSParser.cpp: (WebCore::CSSParserContext::CSSParserContext): Ditto. (WebCore::CSSParser::parseValue): Ditto. * css/CSSPropertyNames.in: Added property -webkit-composition-fill-color. Also added FIXME comment. * css/CSSValueKeywords.in: Added iOS-specific -apple-system-* values. * css/DeprecatedStyleBuilder.cpp: (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder): Added iOS-specific code and FIXME comments. * css/MediaFeatureNames.h: Added media feature -webkit-video-playable-inline. * css/MediaQueryEvaluator.cpp: (WebCore::isRunningOnIPhoneOrIPod): Added. Also added FIXME comment. (WebCore::video_playable_inlineMediaFeatureEval): Added. * css/StyleResolver.cpp: (WebCore::StyleResolver::canShareStyleWithElement): Substitute toHTMLMediaElement() for toMediaElement(). (WebCore::StyleResolver::applyProperty): Added iOS-specific code and FIXME comment. * css/html.css: Added iOS-specific CSS styles. (input, textarea, keygen, select, button, isindex): (isindex): (input[type="date"]): (input[type="datetime"]): (input[type="datetime-local"]): (input[type="month"]): (input[type="time"]): (textarea): (input:-webkit-autofill): (input[type="radio"], input[type="checkbox"]): (input[type="button"], input[type="submit"], input[type="reset"], input[type="file"]::-webkit-file-upload-button, button): (input[type="range"]::-webkit-slider-thumb, input[type="range"]::-webkit-media-slider-thumb): (input[type="range"]::-webkit-slider-thumb:active): (input:disabled, textarea:disabled): (input[readonly], textarea[readonly]): (textarea::-webkit-input-placeholder): (input[type="checkbox"]): (input[type="radio"]): (input[type="checkbox"]:checked, input[type="radio"]:checked): (input[type="checkbox"]:checked:disabled, input[type="radio"]:checked:disabled): (select:focus): (select): * css/mathml.css: Added iOS-specific CSS styles. (math, mfenced > *): (mo, mfenced): * css/mediaControlsiOS.css: Added. * css/svg.css: Added iOS-specific CSS styles. (text, tspan, tref): 2014-01-03 Brent Fulgham [WebGL] glScissor test is not accounted for when generating internal rendering textures. https://bugs.webkit.org/show_bug.cgi?id=126455 Reviewed by Dean Jackson. Covered by webgl/1.0.2/conformance/rendering/gl-scissor-test.html * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp: (WebCore::GraphicsContext3D::prepareTexture): Check state of GL_SCISSOR_TEST and GL_DITHER, deactivate them during our internal drawing, then turn them back on for further processing. 2014-01-03 Simon Fraser Maybe fix Windows build. * WebCore.vcxproj/copyForwardingHeaders.cmd: 2014-01-03 Jer Noble [MediaControls][iOS] Enable JavaScript Media Controls on iOS. https://bugs.webkit.org/show_bug.cgi?id=126440 Reviewed by Eric Carlson. Drive-by misspelling fix, and add a convenience function to check if the controls are currently hidden: * Modules/mediacontrols/mediaControlsApple.js: (Controller.prototype.handleWrapperMouseMove): (Controller.prototype.handleWrapperMouseOut): (Controller.prototype.updatePlaying): (Controller.prototype.controlsAreHidden): Added. Add a new subclass of Controller for iOS and a matching CSS: * Modules/mediacontrols/mediaControlsiOS.css: Added. * Modules/mediacontrols/mediaControlsiOS.js: Added. (createControls): Override the createControls() in mediaControlsApple.js. (ControllerIOS): Define a new class. (ControllerIOS.prototype.inheritFrom): Convenience method to mixin parent prototype methods. (ControllerIOS.prototype.createBase): Override, listen for touches instead of mouse events. (ControllerIOS.prototype.createControls): Ditto. (ControllerIOS.prototype.configureInlineControls): Override, only add play, timeline, and full screen butttons. (ControllerIOS.prototype.configureFullScreenControls): Override, and add no buttons. (ControllerIOS.prototype.handlePlayButtonTouchStart): Activate. (ControllerIOS.prototype.handlePlayButtonTouchEnd): De-activate and do action. (ControllerIOS.prototype.handlePlayButtonTouchCancel): De-activate and cancel. (ControllerIOS.prototype.handleWrapperTouchStart): Show controls. (ControllerIOS.prototype.handlePanelTouchStart): Disable video selection. (ControllerIOS.prototype.handlePanelTouchEnd): Re-enable video selection. (ControllerIOS.prototype.handlePanelTouchCancel): Ditto. Drive-by fix to enable the JavaScript controls when the plugin is disabled: * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::parseAttribute): Add the iOS JavaScript by appending it to the generic (Apple) JavaScript: * rendering/RenderThemeIOS.mm: (WebCore::RenderThemeIOS::mediaControlsScript): Add new files to project: * DerivedSources.make: * WebCore.xcodeproj/project.pbxproj: 2014-01-03 Simon Fraser Allow the ChromeClient to provide a custom ScrollingCoordinator https://bugs.webkit.org/show_bug.cgi?id=126450 Reviewed by Tim Horton. Some platforms will want to provide a custom ScrollingCoordinator, so let them do so by asking ChromeClient first for one. * page/ChromeClient.h: (WebCore::ChromeClient::createScrollingCoordinator): * page/Page.cpp: (WebCore::Page::scrollingCoordinator): 2014-01-03 Andreas Kling Deploy more child renderer iterators in RenderBlockFlow. Reviewed by Sam Weinig. * rendering/RenderBlockFlow.cpp: (WebCore::shouldCheckLines): Make this helper take a RenderBlockFlow instead of a RenderObject and simplified it a bit. RenderDeprecatedFlexibleBox does not derive from RenderBlockFlow so those checks can be omitted. (WebCore::RenderBlockFlow::layoutBlock): (WebCore::RenderBlockFlow::markAllDescendantsWithFloatsForLayout): (WebCore::RenderBlockFlow::lineAtIndex): (WebCore::RenderBlockFlow::lineCount): (WebCore::RenderBlockFlow::clearTruncation): Use childrenOfType to iterate over block and block-flow children. Tweaked some early return/continue to reduce nesting. 2014-01-03 Simon Fraser Allow different types of ScrollingTrees to have different types of ScrollingTreeNode subclasses https://bugs.webkit.org/show_bug.cgi?id=126445 Reviewed by Tim Horton. Make it possible to have ScrollingTree subclasses with different subclasses of ScrollingTreeNodes, by giving ScrollingTree a pure virtual createNode() function. ThreadedScrollingTree implements this, and then delegates node creation to its AsyncScrollingCoordinator (since we have a ScrollingCoordinatorMac but no real need for a ThreadedScrollingTreeMac). Also made ThreadedScrollingTree's m_scrollingCoordinator an AsyncScrollingCoordinator, since by definition a threaded scrolling tree uses an async coordinator. * page/scrolling/AsyncScrollingCoordinator.h: * page/scrolling/ScrollingTree.cpp: (WebCore::ScrollingTree::updateTreeFromStateNode): * page/scrolling/ScrollingTree.h: * page/scrolling/ScrollingTreeScrollingNode.h: * page/scrolling/ThreadedScrollingTree.cpp: (WebCore::ThreadedScrollingTree::create): (WebCore::ThreadedScrollingTree::ThreadedScrollingTree): (WebCore::ThreadedScrollingTree::createNode): * page/scrolling/ThreadedScrollingTree.h: * page/scrolling/mac/ScrollingCoordinatorMac.h: * page/scrolling/mac/ScrollingCoordinatorMac.mm: (WebCore::ScrollingCoordinatorMac::createScrollingTreeNode): * page/scrolling/mac/ScrollingTreeScrollingNodeMac.h: * page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm: (WebCore::ScrollingTreeScrollingNodeMac::create): 2014-01-03 Gavin Barraclough Refactor NSActivity handling code from ChildProcess to UserActivity https://bugs.webkit.org/show_bug.cgi?id=126330 Unreviewed build fix. * platform/UserActivity.h: - case fix. 2014-01-02 Gavin Barraclough Refactor NSActivity handling code from ChildProcess to UserActivity https://bugs.webkit.org/show_bug.cgi?id=126330 Reviewed by Sam Weinig. UserActivity is a mechanism to express to the operating system (where appropriate) that a user initiated activity is taking place, and as such that resources should be made available to the process accordingly. Currently we hold a single NSActivity, at the WebKit layer. This refactoring allows us to hold different activity tokens for different user actions (which simplifies the handling, and aides debugging since the token can more accurately express the activity taking place), and also will allow us to avoid the layering difficulty of calling back up the stack to WebKit to register that an activity is taking place. * WebCore.xcodeproj/project.pbxproj: - added new files. * platform/UserActivity.cpp: Added. (WebCore::UserActivity::UserActivity): - nop implementation - ignore description. (WebCore::UserActivity::beginActivity): (WebCore::UserActivity::endActivity): - nop implementation - just inc/dec m_count. * platform/UserActivity.h: Added. (WebCore::UserActivity::isActive): - returns true if one or more instance of this activity is in progress. * platform/mac/UserActivityMac.mm: Added. (WebCore::UserActivity::UserActivity): - constructor accepts one argument, a description string. (WebCore::UserActivity::isValid): - used by assertions. (WebCore::UserActivity::beginActivity): (WebCore::UserActivity::endActivity): - track start/end of an activity - calls to these methods should be balanced. (WebCore::UserActivity::hysteresisTimerFired): - used to implement hysteresis in releasing NSActivity. 2014-01-03 Alexey Proskuryakov Line ending conversion should be able to handle strings with null chars https://bugs.webkit.org/show_bug.cgi?id=126202 This is a merge from Blink. Reviewed by Alexey Proskuryakov. Test: http/tests/local/formdata/send-form-data-with-string-containing-null.html * platform/text/LineEnding.cpp: (WebCore::normalizeToCROrLF): Do it right. 2014-01-03 Alberto Garcia WebKit-GTK 1.8.1 does not build on OS X 10.7 https://bugs.webkit.org/show_bug.cgi?id=88407 Reviewed by Carlos Garcia Campos. Replace non-portable 'echo -n' with 'true'. * GNUmakefile.am: 2014-01-03 peavo@outlook.com [WinCairo] Compile error. https://bugs.webkit.org/show_bug.cgi?id=126428 Reviewed by Brent Fulgham. The NativeImagePtr type is not an CGImageRef on WinCairo, cannot use CFRetain. * loader/cache/MemoryCache.cpp: Replace USE(CF) with USE(CG). * loader/cache/MemoryCache.h: Ditto. 2014-01-03 Hans Muller [CSS Shapes] Simplify FloatRoundedRect, BoxShape construction https://bugs.webkit.org/show_bug.cgi?id=125995 Reviewed by Andreas Kling. Cleanup of various internal Shape issues: - Removed unnecessary Shape() initialization list entries in Shape subclasses per https://bugs.webkit.org/show_bug.cgi?id=125548#c2. - Used const references instead of pointers for non-deprecated Shape:createShape() logic. - Replaced createShape() overloads for Rasters and Boxes with functions named createRasterShape() and createBoxShape(). - Added a FloatRoundedRect::Radii() constructor to reduce the parameter list length of the FloatRoundedRect constructor in createBoxShape(). There are no new tests, this is just internal refactoring. * platform/graphics/FloatRoundedRect.h: (WebCore::FloatRoundedRect::Radii::Radii): * rendering/shapes/BoxShape.h: (WebCore::BoxShape::BoxShape): * rendering/shapes/PolygonShape.h: (WebCore::PolygonShape::PolygonShape): * rendering/shapes/RasterShape.h: (WebCore::RasterShape::RasterShape): * rendering/shapes/RectangleShape.h: (WebCore::RectangleShape::RectangleShape): * rendering/shapes/Shape.cpp: (WebCore::createInsetShape): (WebCore::Shape::createShape): (WebCore::Shape::createRasterShape): (WebCore::Shape::createBoxShape): * rendering/shapes/Shape.h: * rendering/shapes/ShapeInfo.cpp: (WebCore::ShapeInfo::computedShape): 2014-01-03 Andreas Kling Remove unused Document::openSearchDescriptionURL(). Reviewed by Antti Koivisto. * dom/Document.h: * dom/Document.cpp: Scrub leftovers from the defunct Chromium port. 2014-01-03 Jinwoo Song VibrationPattern should allocate an single vector instance for single integer input https://bugs.webkit.org/show_bug.cgi?id=126417 Reviewed by Gyuyoung Kim. When the Vibration pattern is set with a single integer, the VibrationPattern should be set with this integer as a vibration time. But the VibrationPattern(unsigned vector) was initialized with a single parameter, the vibration time, so the time was used to set the size of vector. * Modules/vibration/NavigatorVibration.cpp: (WebCore::NavigatorVibration::vibrate): 2014-01-02 Jaehun Lim IconController.cpp needs to include https://bugs.webkit.org/show_bug.cgi?id=126415 Reviewed by Gyuyoung Kim. Build fails in IconController.cpp when ICONDATABASE is disabled. WebKit/Source/WebCore/loader/icon/IconController.cpp:124:110: error: invalid use of incomplete type ‘class WTF::CString’ IconController.cpp needs #include . No new tests. Just build fix. * loader/icon/IconController.cpp: Add #include statement. 2014-01-02 Ryuan Choi [EFL] Previous scrollbar is remained sometimes https://bugs.webkit.org/show_bug.cgi?id=126414 Reviewed by Gyuyoung Kim. * platform/efl/ScrollbarEfl.cpp: (ScrollbarEfl::invalidate): Updated scrollbar visibility in Scrollbar::invalidate(). * platform/efl/ScrollbarEfl.h: Removed show()/hide() which never been called() for scrollbar. 2014-01-02 Brent Fulgham [WebGL] Correct symbol lookup logic to handle 1-element arrays https://bugs.webkit.org/show_bug.cgi?id=126411 Reviewed by Dean Jackson. Tested by revisions to webgl/1.0.2/conformance/glsl/misc/shader-with-array-of-structs-containing-arrays.html * html/canvas/WebGLRenderingContext.cpp: (WebCore::WebGLRenderingContext::getUniformLocation): Revise to handle access to zeroeth element of the array. 2014-01-02 Myles C. Maxfield Crash in WebCore::translateIntersectionPointsToSkipInkBoundaries https://bugs.webkit.org/show_bug.cgi?id=126252 Reviewed by Alexey Proskuryakov. lastIntermediate was a iterator pointing into a Vector, which was being re-used even while appending to the Vector. If any of the append operators triggered a realloc, the iterator would point to the old free'ed memory. Test: fast/css3-text/css3-text-decoration/text-decoration-skip/text-decoration-skip-ink-crash-many-gaps.html * rendering/InlineTextBox.cpp: (WebCore::translateIntersectionPointsToSkipInkBoundaries): 2014-01-02 Brent Fulgham [WebGL] Correct symbol lookup logic to handle 1-element arrays https://bugs.webkit.org/show_bug.cgi?id=126411 Reviewed by Dean Jackson. * html/canvas/WebGLRenderingContext.cpp: (WebCore::WebGLRenderingContext::getUniformLocation): Revise code to handle the case of single-element arrays. 2014-01-02 Sam Weinig Update Promises to the https://github.com/domenic/promises-unwrapping spec https://bugs.webkit.org/show_bug.cgi?id=120954 Reviewed by Filip Pizlo. * ForwardingHeaders/runtime/JSPromiseDeferred.h: Added. * ForwardingHeaders/runtime/JSPromiseResolver.h: Removed. * bindings/js/JSDOMGlobalObjectTask.cpp: (WebCore::JSGlobalObjectTask::JSGlobalObjectTask): * bindings/js/JSDOMGlobalObjectTask.h: * bindings/js/JSDOMPromise.cpp: (WebCore::DeferredWrapper::DeferredWrapper): (WebCore::DeferredWrapper::promise): (WebCore::DeferredWrapper::resolve): (WebCore::DeferredWrapper::reject): * bindings/js/JSDOMPromise.h: (WebCore::DeferredWrapper::resolve): (WebCore::DeferredWrapper::reject): (WebCore::DeferredWrapper::resolve): (WebCore::DeferredWrapper::resolve): (WebCore::char>>): (WebCore::DeferredWrapper::reject): * bindings/js/JSDOMWindowBase.cpp: (WebCore::JSDOMWindowBase::queueTaskToEventLoop): * bindings/js/JSDOMWindowBase.h: * bindings/js/JSSubtleCryptoCustom.cpp: (WebCore::JSSubtleCrypto::encrypt): (WebCore::JSSubtleCrypto::decrypt): (WebCore::JSSubtleCrypto::sign): (WebCore::JSSubtleCrypto::verify): (WebCore::JSSubtleCrypto::digest): (WebCore::JSSubtleCrypto::generateKey): (WebCore::JSSubtleCrypto::importKey): (WebCore::JSSubtleCrypto::exportKey): (WebCore::JSSubtleCrypto::wrapKey): (WebCore::JSSubtleCrypto::unwrapKey): * bindings/js/JSWorkerGlobalScopeBase.cpp: (WebCore::JSWorkerGlobalScopeBase::queueTaskToEventLoop): * bindings/js/JSWorkerGlobalScopeBase.h: 2014-01-02 Tim Horton ImageBufferBackingStoreCache should use DeferrableOneShotTimer https://bugs.webkit.org/show_bug.cgi?id=126155 Reviewed by Anders Carlsson. Since ImageBufferBackingStoreCache's purge timer is pushed out every time a backing store is deallocated, we can easily waste a lot of time rescheduling the timer. Since it's a cache purge timer and doesn't need that kind of precision, adopt DeferrableOneShotTimer, which is much more performant when deferred frequently. * platform/graphics/cg/ImageBufferBackingStoreCache.cpp: (WebCore::ImageBufferBackingStoreCache::ImageBufferBackingStoreCache): (WebCore::ImageBufferBackingStoreCache::timerFired): (WebCore::ImageBufferBackingStoreCache::schedulePurgeTimer): * platform/graphics/cg/ImageBufferBackingStoreCache.h: 2014-01-02 Myles C. Maxfield Allow ImageBuffer to re-use IOSurfaces https://bugs.webkit.org/show_bug.cgi?id=125477 Reviewed by Geoff Garen. Modifications reviewed by Tim Horton. This patch is taken from r160945, but the modifications to ImageBufferCG.cpp have been reverted. This test adds a static class, ImageBufferBackingStoreCache, that vends IOSurfaces. It remembers IOSurfaces that have been returned to it until a configurable timeout. The storage used by this class is in the form of a HashMap from a bucketed size to the IOSurface. There are many other data structures that could be used, but this implementation gives a 80% hit rate on normal browsing of some example sites with Canvas and text-decoration-skip: ink. Because the buckets are fairly small (rounding the width and height up to multiples of 8), traversing the bucket contents takes on average 2 steps. Test: fast/canvas/canvas-backing-store-reuse.html * WebCore.xcodeproj/project.pbxproj: Added new caching class * platform/graphics/cg/ImageBufferBackingStoreCache.cpp: Added. (WebCore::createIOSurface): Copied from ImageBufferCG.cpp (WebCore::ImageBufferBackingStoreCache::timerFired): Forget the cache contents (WebCore::ImageBufferBackingStoreCache::schedulePurgeTimer): (WebCore::ImageBufferBackingStoreCache::get): Static getter (WebCore::ImageBufferBackingStoreCache::ImageBufferBackingStoreCache): (WebCore::ImageBufferBackingStoreCache::insertIntoCache): Memory-management creation function (WebCore::ImageBufferBackingStoreCache::takeFromCache): Memory-management deletion function (WebCore::ImageBufferBackingStoreCache::isAcceptableSurface): Does this cached IOSurface fit the bill? (WebCore::ImageBufferBackingStoreCache::tryTakeFromCache): Lookup a bucket and walk through its contents (WebCore::ImageBufferBackingStoreCache::getOrAllocate): Public function for clients who want a IOSurface from the cache (WebCore::ImageBufferBackingStoreCache::deallocate): Public function for clients to return an IOSurface to the pool * platform/graphics/cg/ImageBufferBackingStoreCache.h: Added. (WebCore::ImageBuffer::ImageBuffer): (WebCore::ImageBuffer::~ImageBuffer): 2014-01-02 Piotr Grad Video-seek-with-negative-playback was flaky. https://bugs.webkit.org/show_bug.cgi?id=126379 Reviewed by Eric Carlson. No new tests. Covered by existing tests. m_player->setRate() should be called before updating m_playbackRate, because potentiallyPlaying() depends on endedPlayback(), which checks m_playbackRate. * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::setPlaybackRate): 2014-01-02 Daniel Bates [iOS] Tapping any link crashes in WebCore::EventHandler::mouseMoved() (also crashes when scrolling certain sites) https://bugs.webkit.org/show_bug.cgi?id=126401 Reviewed by Tim Horton. * page/ios/EventHandlerIOS.mm: (WebCore::currentEventSlot): Make the shared variable have static-storage duration. 2014-01-02 Gavin Barraclough Remove WindowIsVisible https://bugs.webkit.org/show_bug.cgi?id=126270 Reviewed by Tim Horton. We currently track visibility in two ways - ViewState::IsVisible and ViewState::WindowIsVisible. The latter detects that the content is hidden in fewer cases than the former, and as such, the former is always preferable. This affects the hidden state provided to FocusController::contentAreaDidShowOrHide and to Plugin::windowVisibilityChanged. * WebCore.exp.in: * page/FocusController.cpp: (WebCore::FocusController::FocusController): (WebCore::FocusController::setContentIsVisible): * page/FocusController.h: - rename ContainingWindowIsVisible -> ContentIsVisible. 2014-01-02 Gavin Barraclough Merge didMoveOnscreen / page visibility to isVisible https://bugs.webkit.org/show_bug.cgi?id=126268 Reviewed by Tim Horton. The onscreen state most closely tracks view visibility (though currently also tracks a mix of in-window state). Make more consistent, simplify, and move all animation suspension logic to Page, so it can be controlled by the PageThrottler. * WebCore.exp.in: * page/EventHandler.cpp: (WebCore::EventHandler::fakeMouseMoveEventTimerFired): * page/FrameView.cpp: (WebCore::FrameView::shouldSetCursor): * page/Page.cpp: (WebCore::Page::Page): - initialize new variables. (WebCore::Page::setIsVisible): - merge setVisibilityState, didMoveOnscreen, willMoveOffscreen. (WebCore::Page::setIsPrerender): - switches visibility state from hidden to prerender. (WebCore::Page::visibilityState): - computed from m_isVisible, m_isPrerender. (WebCore::Page::hiddenPageCSSAnimationSuspensionStateChanged): - m_visibilityState -> m_isVisible. * page/Page.h: - remove didMoveOnscreen/willMoveOffscreen m_isOnscreen & m_visibilityState -> m_isVisible & m_isPrerender setVisibilityState -> setIsVisible & setIsPrerender. (WebCore::Page::isVisible): - isOnscreen -> isVisible. 2014-01-02 Oliver Hunt Update bindings test results * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp: (WebCore::jsTestActiveDOMObjectConstructor): * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp: (WebCore::jsTestCustomNamedGetterConstructor): * bindings/scripts/test/JS/JSTestEventConstructor.cpp: (WebCore::jsTestEventConstructorConstructor): * bindings/scripts/test/JS/JSTestEventTarget.cpp: (WebCore::jsTestEventTargetConstructor): * bindings/scripts/test/JS/JSTestException.cpp: (WebCore::jsTestExceptionConstructor): * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp: (WebCore::jsTestGenerateIsReachableConstructor): * bindings/scripts/test/JS/JSTestInterface.cpp: (WebCore::jsTestInterfaceConstructor): * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp: (WebCore::jsTestMediaQueryListListenerConstructor): * bindings/scripts/test/JS/JSTestNamedConstructor.cpp: (WebCore::jsTestNamedConstructorConstructor): * bindings/scripts/test/JS/JSTestNode.cpp: (WebCore::jsTestNodeConstructor): * bindings/scripts/test/JS/JSTestObj.cpp: (WebCore::jsTestObjConstructor): * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp: (WebCore::jsTestOverloadedConstructorsConstructor): * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp: (WebCore::jsTestSerializedScriptValueInterfaceConstructor): * bindings/scripts/test/JS/JSTestTypedefs.cpp: (WebCore::jsTestTypedefsConstructor): * bindings/scripts/test/JS/JSattribute.cpp: (WebCore::jsattributeConstructor): * bindings/scripts/test/JS/JSreadonly.cpp: (WebCore::jsreadonlyConstructor): 2013-12-23 Oliver Hunt Refactor PutPropertySlot to be aware of custom properties https://bugs.webkit.org/show_bug.cgi?id=126187 Reviewed by Antti Koivisto. Update the bindings code generation and custom objects to the new function signatures * bindings/js/JSDOMWindowCustom.cpp: (WebCore::JSDOMWindow::put): * bindings/objc/WebScriptObject.mm: (-[WebScriptObject setValue:forKey:]): * bindings/scripts/CodeGeneratorJS.pm: (GenerateImplementation): * bindings/scripts/test/JS/JSTestInterface.cpp: (WebCore::JSTestInterface::putByIndex): * bridge/NP_jsobject.cpp: (_NPN_SetProperty): 2014-01-02 Simon Fraser Add AsyncScrollingCoordinator, which is a base class for threaded and future remote ScrollingCoordinators https://bugs.webkit.org/show_bug.cgi?id=126389 Reviewed by Tim Horton. Add AsyncScrollingCoordinator, a ScrollingCoordinator that knows about ScrollingStateTrees and ScrollingTrees, but leaves it up to subclasses to decide when and how to commit. * WebCore.xcodeproj/project.pbxproj: Added AsyncScrollingCoordinator.* * page/scrolling/AsyncScrollingCoordinator.cpp: Copied from Source/WebCore/page/scrolling/mac/ScrollingCoordinatorMac.mm. (WebCore::AsyncScrollingCoordinator::AsyncScrollingCoordinator): (WebCore::AsyncScrollingCoordinator::~AsyncScrollingCoordinator): (WebCore::AsyncScrollingCoordinator::frameViewLayoutUpdated): (WebCore::AsyncScrollingCoordinator::frameViewRootLayerDidChange): (WebCore::AsyncScrollingCoordinator::requestScrollPositionUpdate): (WebCore::AsyncScrollingCoordinator::scrollableAreaScrollbarLayerDidChange): (WebCore::AsyncScrollingCoordinator::attachToStateTree): (WebCore::AsyncScrollingCoordinator::detachFromStateTree): (WebCore::AsyncScrollingCoordinator::clearStateTree): (WebCore::AsyncScrollingCoordinator::syncChildPositions): (WebCore::AsyncScrollingCoordinator::ensureRootStateNodeForFrameView): (WebCore::AsyncScrollingCoordinator::updateScrollingNode): (WebCore::AsyncScrollingCoordinator::updateViewportConstrainedNode): (WebCore::AsyncScrollingCoordinator::setScrollLayerForNode): (WebCore::AsyncScrollingCoordinator::setCounterScrollingLayerForNode): (WebCore::AsyncScrollingCoordinator::setHeaderLayerForNode): (WebCore::AsyncScrollingCoordinator::setFooterLayerForNode): (WebCore::AsyncScrollingCoordinator::setNonFastScrollableRegionForNode): (WebCore::AsyncScrollingCoordinator::setWheelEventHandlerCountForNode): (WebCore::AsyncScrollingCoordinator::setScrollBehaviorForFixedElementsForNode): (WebCore::AsyncScrollingCoordinator::setScrollbarPaintersFromScrollbarsForNode): (WebCore::AsyncScrollingCoordinator::setSynchronousScrollingReasons): (WebCore::AsyncScrollingCoordinator::updateMainFrameScrollLayerPosition): (WebCore::AsyncScrollingCoordinator::recomputeWheelEventHandlerCountForFrameView): (WebCore::AsyncScrollingCoordinator::isRubberBandInProgress): (WebCore::AsyncScrollingCoordinator::setScrollPinningBehavior): (WebCore::AsyncScrollingCoordinator::scrollingStateTreeAsText): * page/scrolling/AsyncScrollingCoordinator.h: Copied from Source/WebCore/page/scrolling/mac/ScrollingCoordinatorMac.h. (WebCore::AsyncScrollingCoordinator::scrollingTree): (WebCore::AsyncScrollingCoordinator::setScrollingTree): (WebCore::AsyncScrollingCoordinator::scrollingStateTree): (WebCore::AsyncScrollingCoordinator::releaseScrollingTree): * page/scrolling/ScrollingCoordinator.h: Add casting support. (WebCore::ScrollingCoordinator::isAsyncScrollingCoordinator): * page/scrolling/ThreadedScrollingTree.h: commitNewTreeState() needs to be public. * page/scrolling/mac/ScrollingCoordinatorMac.h: * page/scrolling/mac/ScrollingCoordinatorMac.mm: Lots of code moved to AsyncScrollingCoordinator. (WebCore::ScrollingCoordinatorMac::ScrollingCoordinatorMac): (WebCore::ScrollingCoordinatorMac::~ScrollingCoordinatorMac): (WebCore::ScrollingCoordinatorMac::pageDestroyed): (WebCore::ScrollingCoordinatorMac::commitTreeStateIfNeeded): (WebCore::ScrollingCoordinatorMac::handleWheelEvent): (WebCore::ScrollingCoordinatorMac::scheduleTreeStateCommit): (WebCore::ScrollingCoordinatorMac::commitTreeState): (WebCore::ScrollingCoordinatorMac::updateTiledScrollingIndicator): 2014-01-02 Andreas Kling Simplify the insides of DocumentSharedObjectPool and reduce memory usage. Merging Blink r164152 by Elliott Sprehn. Instead of storing an OwnPtr to an object that has a pointer to the ShareableElementData as well as a pointer into the ShareableElementData and the length we can just store a RefPtr to the SharableElementData. This also reduces the memory usage of the pool by 2 pointers per entry. * dom/DocumentSharedObjectPool.h: * dom/DocumentSharedObjectPool.cpp: (WebCore::attributeHash): (WebCore::hasSameAttributes): (WebCore::DocumentSharedObjectPool::cachedShareableElementDataWithAttributes): 2014-01-02 Dirk Schulze Support values computed style for 'clip-path' property https://bugs.webkit.org/show_bug.cgi?id=126148 Reviewed by Simon Fraser. Calculate computed style for 'clip-path' property. Updated tests to check for computed style. * css/BasicShapeFunctions.cpp: Add box value bounding-box. (WebCore::valueForBox): (WebCore::boxForValue): * css/CSSComputedStyleDeclaration.cpp: Return the computed style for 'clip-path'. (WebCore::ComputedStyleExtractor::propertyValue): * css/DeprecatedStyleBuilder.cpp: Create CSSValueLists for 'clip-th'. (WebCore::ApplyPropertyClipPath::applyValue): * rendering/ClipPathOperation.h: Add bounding-box value. (WebCore::ShapeClipPathOperation::pathForReferenceRect): (WebCore::ShapeClipPathOperation::setReferenceBox): (WebCore::ShapeClipPathOperation::referenceBox): (WebCore::BoxClipPathOperation::create): (WebCore::BoxClipPathOperation::pathForReferenceRect): (WebCore::BoxClipPathOperation::referenceBox): (WebCore::BoxClipPathOperation::BoxClipPathOperation): * rendering/shapes/ShapeInfo.h: Add bounding-box value. (WebCore::ShapeInfo::setShapeSize): (WebCore::ShapeInfo::logicalTopOffset): (WebCore::ShapeInfo::logicalLeftOffset): * rendering/style/BasicShapes.cpp: Add bounding-box value. (WebCore::BasicShape::referenceBoxSize): * rendering/style/BasicShapes.h: 2014-01-02 Antti Koivisto Always resolve style from root https://bugs.webkit.org/show_bug.cgi?id=126380 Reviewed by Andreas Kling. Forced style resolve that does not start from the root is never really correct. Remove the few remaining instances. * dom/ShadowRoot.cpp: (WebCore::ShadowRoot::setResetStyleInheritance): Update style asynchronously. * dom/ShadowRoot.h: * dom/Text.h: * html/HTMLPlugInImageElement.cpp: (WebCore::HTMLPlugInImageElement::createElementRenderer): (WebCore::HTMLPlugInImageElement::documentWillSuspendForPageCache): (WebCore::HTMLPlugInImageElement::documentDidResumeFromPageCache): Delete the render tree synchronously on suspend and rebuild it asynchronously on resume. No need for m_customStyleForPageCache hack. * html/HTMLPlugInImageElement.h: Remove m_customStyleForPageCache. * style/StyleResolveTree.cpp: * style/StyleResolveTree.h: Remove Element version of resolveTree from the interface. * svg/SVGUseElement.h: 2014-01-02 Antti Koivisto Remove PlaceholderDocument https://bugs.webkit.org/show_bug.cgi?id=126382 Reviewed by Andreas Kling. Remove PlaceholderDocument class and replace it with a bit in Document. * WebCore.xcodeproj/project.pbxproj: * dom/Document.cpp: (WebCore::Document::Document): (WebCore::Document::createRenderTree): * dom/Document.h: Also make Synthesized a construction flag instead of a boolean parameter. (WebCore::Document::createNonRenderedPlaceholder): * html/HTMLDocument.cpp: (WebCore::HTMLDocument::HTMLDocument): * html/HTMLDocument.h: (WebCore::HTMLDocument::create): (WebCore::HTMLDocument::createSynthesizedDocument): * loader/DocumentWriter.cpp: (WebCore::DocumentWriter::createDocument): * loader/PlaceholderDocument.cpp: Removed. * loader/PlaceholderDocument.h: Removed. * pdf/ios/PDFDocument.h: (WebCore::PDFDocument::PDFDocument): 2014-01-01 Antti Koivisto Remove public attachRenderTree https://bugs.webkit.org/show_bug.cgi?id=126368 Reviewed by Andreas Kling. Remove the remaining explicit render tree construction. * dom/Document.cpp: (WebCore::Document::createRenderTree): Use recalcStyle() instead of calling attachRenderTree directly. * html/HTMLViewSourceDocument.cpp: (WebCore::HTMLViewSourceDocument::addText): Remove forgotten attachTextRenderer. * html/shadow/InsertionPoint.cpp: (WebCore::InsertionPoint::InsertionPoint): Remove willAttachRenderers/didAttachRenderers hack. * html/shadow/InsertionPoint.h: (WebCore::toInsertionPoint): * loader/PlaceholderDocument.cpp: (WebCore::PlaceholderDocument::createRenderTree): Seriously, nothing to do here. * style/StyleResolveTree.cpp: (WebCore::Style::attachDistributedChildren): (WebCore::Style::attachChildren): (WebCore::Style::detachDistributedChildren): (WebCore::Style::detachChildren): Making attaching and detaching distributed insertion point children part of ResolveTree internals. * style/StyleResolveTree.h: Remove interfaces with no clients. 2014-01-01 Seokju Kwon Remove stale ScriptProfiler methods https://bugs.webkit.org/show_bug.cgi?id=126373 Reviewed by Darin Adler. No new tests, No change behavior. * bindings/js/ScriptProfiler.h: Remove dead code. 2014-01-01 Andreas Kling Remove ChromeClient::fullScreenRendererChanged(). This hook was added in r75277 to notify WebFullScreenController when the full screen renderer changed. In r110216 the code was refactored, making this notification unnecessary. Reviewed by Antti Koivisto. 2014-01-01 Simon Fraser Fix the build by exposing some more scrolling state node headers as Private in WebCore.framework. * WebCore.xcodeproj/project.pbxproj: 2014-01-01 Ryuan Choi [EFL] Unreviewed build fix after r160903 when ACCESSIBILITY is disabled * accessibility/AccessibilityObject.h: (WebCore::AccessibilityObject::children): 2014-01-01 Andreas Kling RenderScrollbar: Map of scrollbar parts should use RenderPtr. Turn RenderScrollbar::m_parts into HashMap of RenderPtrs. This makes renderer destruction automatic and lets us remove some code. Reviewed by Antti Koivisto. * rendering/RenderPtr.h: Add HashTraits for RenderPtr so we can use them as values in WTF hash tables. * rendering/RenderScrollbar.h: * rendering/RenderScrollbar.cpp: (WebCore::RenderScrollbar::~RenderScrollbar): (WebCore::RenderScrollbar::setParent): (WebCore::RenderScrollbar::updateScrollbarParts): (WebCore::RenderScrollbar::updateScrollbarPart): Remove now-unneeded kludges of logic to manually delete scrollbar part renderers in various scenarios. 2014-01-01 Antti Koivisto Remove reattachRenderTree https://bugs.webkit.org/show_bug.cgi?id=126366 Reviewed by Andreas Kling. Remove the last remaining client. * html/HTMLSelectElement.cpp: (WebCore::HTMLSelectElement::parseAttribute): Reconstruct render tree asynchronously. (WebCore::HTMLSelectElement::scrollToSelection): (WebCore::HTMLSelectElement::setOptionsChangedOnRenderer): (WebCore::HTMLSelectElement::selectOption): It is not safe to cast the renderer based on usesMenuList test. Switch to RenderObject::isMenuList test. (WebCore::HTMLSelectElement::parseMultipleAttribute): Reconstruct render tree asynchronously. (WebCore::HTMLSelectElement::platformHandleKeydownEvent): (WebCore::HTMLSelectElement::menuListDefaultEventHandler): (WebCore::HTMLSelectElement::defaultEventHandler): * style/StyleResolveTree.cpp: * style/StyleResolveTree.h: Remove the function. 2014-01-01 Simon Fraser Create a ThreadedScrollingTree subclass of ScrollingTree, and push all knowledge of the scrolling thread into it https://bugs.webkit.org/show_bug.cgi?id=126362 Reviewed by Sam Weinig. Eventually we'll have a ScrollingTree in situations where there is no scrolling thread, so make the ScrollingTree base class thread-agnostic (but threadsafe), and subclass it in ThreadedScrollingTree for scrolling-thread-specific functionality. The ScrollingTree base class also no longer needs to know about the ScrollingCoordinator. ScrollingCoordinatorMac creates a ThreadedScrollingTree. * WebCore.exp.in: * WebCore.xcodeproj/project.pbxproj: Add ThreadedScrollingTree.* Make some headers Private that we'll need in WebKit2 soon. * page/scrolling/ScrollingStateTree.h: Drive-by cleanup: clone() was unimplemented. * page/scrolling/ScrollingTree.cpp: (WebCore::ScrollingTree::ScrollingTree): (WebCore::ScrollingTree::~ScrollingTree): (WebCore::ScrollingTree::shouldHandleWheelEventSynchronously): Wrap up some logic that involves taking the mutex, so ThreadedScrollingTree can conveniently call it. (WebCore::ScrollingTree::handleWheelEvent): (WebCore::ScrollingTree::commitNewTreeState): (WebCore::ScrollingTree::setMainFrameScrollPosition): (WebCore::ScrollingTree::isHandlingProgrammaticScroll): * page/scrolling/ScrollingTree.h: (WebCore::ScrollingTree::isThreadedScrollingTree): (WebCore::ScrollingTree::invalidate): * page/scrolling/ThreadedScrollingTree.cpp: Added. (WebCore::ThreadedScrollingTree::create): (WebCore::ThreadedScrollingTree::ThreadedScrollingTree): (WebCore::ThreadedScrollingTree::~ThreadedScrollingTree): (WebCore::ThreadedScrollingTree::tryToHandleWheelEvent): (WebCore::ThreadedScrollingTree::handleWheelEvent): (WebCore::derefScrollingCoordinator): (WebCore::ThreadedScrollingTree::invalidate): (WebCore::ThreadedScrollingTree::commitNewTreeState): (WebCore::ThreadedScrollingTree::updateMainFrameScrollPosition): (WebCore::ThreadedScrollingTree::handleWheelEventPhase): * page/scrolling/ThreadedScrollingTree.h: Added. (WebCore::ThreadedScrollingTree::isThreadedScrollingTree): * page/scrolling/mac/ScrollingCoordinatorMac.h: * page/scrolling/mac/ScrollingCoordinatorMac.mm: (WebCore::ScrollingCoordinatorMac::ScrollingCoordinatorMac): (WebCore::ScrollingCoordinatorMac::handleWheelEvent): 2014-01-01 Andreas Kling FrameView: Store scroll corner renderer in a RenderPtr. Make FrameView::m_scrollCorner a RenderPtr and remove two manual destroy() calls. Reviewed by Antti Koivisto. 2014-01-01 Antti Koivisto Remove elementChildren/elementDescendants shorthands https://bugs.webkit.org/show_bug.cgi?id=126363 Reviewed by Anders Carlsson. Just use childrenOfType/descendantsOfType instead. They are not that much longer and consistency is valuable. * accessibility/AccessibilityNodeObject.cpp: (WebCore::AccessibilityNodeObject::canvasHasFallbackContent): (WebCore::siblingWithAriaRole): * accessibility/AccessibilityTable.cpp: (WebCore::AccessibilityTable::isDataTable): * css/StyleInvalidationAnalysis.cpp: (WebCore::StyleInvalidationAnalysis::invalidateStyle): * dom/ChildNodeList.cpp: (WebCore::ChildNodeList::namedItem): * dom/Document.cpp: (WebCore::Document::buildAccessKeyMap): (WebCore::Document::childrenChanged): * dom/Element.cpp: (WebCore::Element::resetComputedStyle): * dom/ElementChildIterator.h: * dom/ElementDescendantIterator.h: * dom/SelectorQuery.cpp: (WebCore::elementsForLocalName): (WebCore::anyElement): (WebCore::SelectorDataList::executeSingleTagNameSelectorData): (WebCore::SelectorDataList::executeSingleClassNameSelectorData): (WebCore::SelectorDataList::executeSingleSelectorData): (WebCore::SelectorDataList::executeSingleMultiSelectorData): * editing/ApplyStyleCommand.cpp: (WebCore::ApplyStyleCommand::cleanupUnstyledAppleStyleSpans): * editing/ReplaceSelectionCommand.cpp: (WebCore::removeHeadContents): * editing/markup.cpp: (WebCore::completeURLs): * html/HTMLFieldSetElement.cpp: (WebCore::HTMLFieldSetElement::refreshElementsIfNeeded): * html/HTMLObjectElement.cpp: (WebCore::HTMLObjectElement::containsJavaApplet): * loader/PlaceholderDocument.cpp: (WebCore::PlaceholderDocument::createRenderTree): * rendering/RenderChildIterator.h: * svg/SVGSVGElement.cpp: (WebCore::SVGSVGElement::getElementById): * svg/SVGUseElement.cpp: (WebCore::subtreeContainsDisallowedElement): (WebCore::removeDisallowedElementsFromSubtree): 2014-01-01 Antti Koivisto Do less synchronous render tree construction https://bugs.webkit.org/show_bug.cgi?id=126359 Reviewed by Anders Carlsson. Remove some now-unnecessary attachRenderTree calls. * html/HTMLDetailsElement.cpp: (WebCore::HTMLDetailsElement::parseAttribute): * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::parseAttribute): * html/HTMLObjectElement.cpp: (WebCore::HTMLObjectElement::renderFallbackContent): * html/HTMLPlugInElement.cpp: (WebCore::HTMLPlugInElement::didAddUserAgentShadowRoot): * html/HTMLPlugInImageElement.cpp: (WebCore::HTMLPlugInImageElement::willRecalcStyle): (WebCore::HTMLPlugInImageElement::createShadowIFrameSubtree): (WebCore::HTMLPlugInImageElement::restartSnapshottedPlugIn): * html/HTMLViewSourceDocument.cpp: (WebCore::HTMLViewSourceDocument::createContainingTable): (WebCore::HTMLViewSourceDocument::addSpanWithClassName): (WebCore::HTMLViewSourceDocument::addLine): (WebCore::HTMLViewSourceDocument::finishLine): (WebCore::HTMLViewSourceDocument::addBase): (WebCore::HTMLViewSourceDocument::addLink): * xml/XMLErrors.cpp: (WebCore::XMLErrors::insertErrorMessageBlock): 2014-01-01 Simon Fraser Updating the scrolling tree should use references to state nodes https://bugs.webkit.org/show_bug.cgi?id=126360 Reviewed by Anders Carlsson. Change functions related to ScrollingTreeNode updating to take const references to state nodes rather than pointers. * page/scrolling/ScrollingStateNode.h: (WebCore::ScrollingStateNode::hasChangedProperty): * page/scrolling/ScrollingTree.cpp: (WebCore::ScrollingTree::commitNewTreeState): (WebCore::ScrollingTree::updateTreeFromStateNode): The node can be nil so this continues to take a pointer. (WebCore::ScrollingTree::removeDestroyedNodes): * page/scrolling/ScrollingTree.h: * page/scrolling/ScrollingTreeNode.h: (WebCore::ScrollingTreeNode::updateAfterChildren): * page/scrolling/ScrollingTreeScrollingNode.cpp: (WebCore::ScrollingTreeScrollingNode::updateBeforeChildren): * page/scrolling/ScrollingTreeScrollingNode.h: * page/scrolling/mac/ScrollingTreeFixedNode.h: * page/scrolling/mac/ScrollingTreeFixedNode.mm: (WebCore::ScrollingTreeFixedNode::updateBeforeChildren): * page/scrolling/mac/ScrollingTreeScrollingNodeMac.h: * page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm: (WebCore::ScrollingTreeScrollingNodeMac::updateBeforeChildren): (WebCore::ScrollingTreeScrollingNodeMac::updateAfterChildren): * page/scrolling/mac/ScrollingTreeStickyNode.h: * page/scrolling/mac/ScrollingTreeStickyNode.mm: (WebCore::ScrollingTreeStickyNode::updateBeforeChildren): 2014-01-01 Simon Fraser Add a typedef for PlatformLayerID on GraphicsLayer, and migrate RemoteLayerTreeTransaction to use it https://bugs.webkit.org/show_bug.cgi?id=126346 Reviewed by Tim Horton. Remote scrolling tree code is soon going to use RemoteLayerTreeTransaction::LayerID, so it makes more sense to put this layerID type on GraphicsLayer as GraphicsLayer::PlatformLayerID. Also add some type cast macros for PlatformCALayer and subclasses, and use them where appropriate. * platform/graphics/GraphicsLayer.h: * platform/graphics/ca/GraphicsLayerCA.cpp: (WebCore::GraphicsLayerCA::setName): * platform/graphics/ca/PlatformCALayer.h: (WebCore::PlatformCALayer::isPlatformCALayerMac): (WebCore::PlatformCALayer::isPlatformCALayerRemote): (WebCore::PlatformCALayer::PlatformCALayer): * platform/graphics/ca/mac/PlatformCALayerMac.h: 2013-12-31 Simon Fraser ScrollingStateNodes should have a reference to the ScrollingStateTree https://bugs.webkit.org/show_bug.cgi?id=126348 Reviewed by Sam Weinig. Make ScrollingStateNodes always belong to a ScrollingStateTree, and thus have a reference to the tree rather than a pointer. When cloning nodes, they are adopted by a new ScrollingStateTree, which adds them to its node map (which didn't happen before). In subclasses access the ScrollingStateTree through a member function. * page/scrolling/ScrollingStateFixedNode.cpp: (WebCore::ScrollingStateFixedNode::create): (WebCore::ScrollingStateFixedNode::ScrollingStateFixedNode): (WebCore::ScrollingStateFixedNode::clone): (WebCore::ScrollingStateFixedNode::updateConstraints): * page/scrolling/ScrollingStateFixedNode.h: * page/scrolling/ScrollingStateNode.cpp: (WebCore::ScrollingStateNode::ScrollingStateNode): (WebCore::ScrollingStateNode::cloneAndReset): (WebCore::ScrollingStateNode::cloneAndResetChildren): (WebCore::ScrollingStateNode::willBeRemovedFromStateTree): * page/scrolling/ScrollingStateNode.h: (WebCore::ScrollingStateNode::scrollingStateTree): * page/scrolling/ScrollingStateScrollingNode.cpp: (WebCore::ScrollingStateScrollingNode::create): (WebCore::ScrollingStateScrollingNode::ScrollingStateScrollingNode): (WebCore::ScrollingStateScrollingNode::clone): (WebCore::ScrollingStateScrollingNode::setViewportRect): (WebCore::ScrollingStateScrollingNode::setTotalContentsSize): (WebCore::ScrollingStateScrollingNode::setScrollOrigin): (WebCore::ScrollingStateScrollingNode::setScrollableAreaParameters): (WebCore::ScrollingStateScrollingNode::setFrameScaleFactor): (WebCore::ScrollingStateScrollingNode::setNonFastScrollableRegion): (WebCore::ScrollingStateScrollingNode::setWheelEventHandlerCount): (WebCore::ScrollingStateScrollingNode::setSynchronousScrollingReasons): (WebCore::ScrollingStateScrollingNode::setScrollBehaviorForFixedElements): (WebCore::ScrollingStateScrollingNode::setRequestedScrollPosition): (WebCore::ScrollingStateScrollingNode::setHeaderHeight): (WebCore::ScrollingStateScrollingNode::setFooterHeight): * page/scrolling/ScrollingStateScrollingNode.h: * page/scrolling/ScrollingStateStickyNode.cpp: (WebCore::ScrollingStateStickyNode::create): (WebCore::ScrollingStateStickyNode::ScrollingStateStickyNode): (WebCore::ScrollingStateStickyNode::clone): (WebCore::ScrollingStateStickyNode::updateConstraints): * page/scrolling/ScrollingStateStickyNode.h: * page/scrolling/ScrollingStateTree.cpp: (WebCore::ScrollingStateTree::attachNode): (WebCore::ScrollingStateTree::commit): (WebCore::ScrollingStateTree::addNode): * page/scrolling/ScrollingStateTree.h: * page/scrolling/mac/ScrollingStateNodeMac.mm: (WebCore::ScrollingStateNode::setScrollLayer): * page/scrolling/mac/ScrollingStateScrollingNodeMac.mm: (WebCore::ScrollingStateScrollingNode::setCounterScrollingLayer): (WebCore::ScrollingStateScrollingNode::setHeaderLayer): (WebCore::ScrollingStateScrollingNode::setFooterLayer): (WebCore::ScrollingStateScrollingNode::setScrollbarPaintersFromScrollbars): 2013-12-31 Simon Fraser Give ScrollingStateNodes a nodeType() https://bugs.webkit.org/show_bug.cgi?id=126347 Reviewed by Tim Horton. When we start serializing ScrollingStateNodes to send to the UI process, it's more convenient if they have a nodeType member rather than virtual functions, so give them one, and fix the casting macros to use it. This allows us to use a switch() on node creation, so the compiler will tell us if we forgot to create a node type. * page/scrolling/ScrollingStateFixedNode.cpp: (WebCore::ScrollingStateFixedNode::ScrollingStateFixedNode): * page/scrolling/ScrollingStateFixedNode.h: * page/scrolling/ScrollingStateNode.cpp: (WebCore::ScrollingStateNode::ScrollingStateNode): * page/scrolling/ScrollingStateNode.h: const ScrollingNodeType field (can't be modified after construction), and move the m_scrollingStateTree member after it (the awkward protected:/private: will be cleaned up in a later patch). (WebCore::ScrollingStateNode::nodeType): * page/scrolling/ScrollingStateScrollingNode.cpp: (WebCore::ScrollingStateScrollingNode::ScrollingStateScrollingNode): * page/scrolling/ScrollingStateScrollingNode.h: * page/scrolling/ScrollingStateStickyNode.cpp: (WebCore::ScrollingStateStickyNode::ScrollingStateStickyNode): * page/scrolling/ScrollingStateStickyNode.h: * page/scrolling/ScrollingTree.cpp: (WebCore::ScrollingTree::updateTreeFromStateNode): 2013-12-31 Andreas Kling Out-of-line RenderStyle substructure copying helpers. This shrinks the .access() calls by moving memory allocation logic out-of-line, though I'm really doing this to make Instruments.app allocations output more readable. Writes to e.g 'font' or 'color' will now be grouped under a single StyleInheritedData::copy() call instead of being spread out over setFontDescription(), setLineHeight(), setColor(), etc. Reviewed by Anders Carlsson. 2013-12-31 Andreas Kling RenderListItem should store its marker in a RenderPtr. Make RenderListItem::m_marker a RenderPtr and remove two manual destroy() calls. Tweaked code to reduce nesting. Reviewed by Anders Carlsson. 2013-12-31 Andreas Kling Element's renderer factory should return RenderPtrs. Rename Element::createRenderer() to createElementRenderer() and have it return RenderPtr. Propagate signature until it builds again. We leakPtr() the renderer at two call sites when handing things over to raw pointer API. This'll get tidied up in subsequent patches. Reviewed by Sam Weinig. 2013-12-31 Carlos Garcia Campos [SOUP] Return early in ResourceHandle::receivedCancellation if the load has already cancelled https://bugs.webkit.org/show_bug.cgi?id=126287 Reviewed by Martin Robinson. This situation can happen when using the network process, because the ReceivedCancellation message can be received when the resource loader has already been removed, but the authentication challenge still has a reference to the ResourceHandleClient. * platform/network/soup/ResourceHandleSoup.cpp: (WebCore::ResourceHandle::receivedCancellation): 2013-12-31 Carlos Garcia Campos [SOUP] The initiating page is lost after a redirection https://bugs.webkit.org/show_bug.cgi?id=126293 Reviewed by Martin Robinson. The initiating page id is attached to the initial soup request object, but not to the one created after a redirection. * platform/network/soup/ResourceHandleSoup.cpp: (WebCore::createSoupRequestAndMessageForHandle): Call setSoupRequestInitiatingPageIDFromNetworkingContext() here if the soup request is created successfully. (WebCore::ResourceHandle::start): Remove the call to setSoupRequestInitiatingPageIDFromNetworkingContext(). 2013-12-31 Carlos Garcia Campos [SOUP] Implement ResourceHandle::continueWillSendRequest() https://bugs.webkit.org/show_bug.cgi?id=126291 Reviewed by Martin Robinson. * platform/network/soup/ResourceHandleSoup.cpp: (WebCore::continueAfterWillSendRequest): Helper function that continues with the load after willSendRequest has been called. (WebCore::doRedirect): Call continueAfterWillSendRequest() when client doesn't use async callbacks. (WebCore::ResourceHandle::continueWillSendRequest): Call continueAfterWillSendRequest(). 2013-12-30 Carlos Garcia Campos [SOUP] willSendRequest doesn't work after a redirect https://bugs.webkit.org/show_bug.cgi?id=126290 Reviewed by Martin Robinson. The problem is that we are creating the new soup request for the redirect before calling ResourceHandleClient::willSendRequest() so that any change made to the request by the client is ignored. * platform/network/soup/ResourceHandleSoup.cpp: (WebCore::doRedirect): Create the new soup request and soup message for the redirect after calling willSendRequest() on the client. 2013-12-30 Andreas Kling InputType should return input renderers wrapped in RenderPtr. Rename InputType::createRenderer() to createInputRenderer() and make it return RenderPtr. Also made it non-const. Reviewed by Anders Carlsson. 2013-12-30 Gyuyoung Kim Cleanup static_cast by using toHTMLFormElement() https://bugs.webkit.org/show_bug.cgi?id=126309 Reviewed by Andreas Kling. To detect bad type casts, it would be good to use toHTMLFormElement() instead of using manual type cast. Additionally FORM_ASSOCIATED_ELEMENT_TYPE_CASTS is introduced newly to do it. No new tests, no behavior changes. * html/FormAssociatedElement.h: * html/HTMLFormControlElement.h: * html/HTMLFormElement.cpp: (WebCore::HTMLFormElement::submitImplicitly): (WebCore::HTMLFormElement::validateInteractively): (WebCore::HTMLFormElement::submit): (WebCore::HTMLFormElement::reset): (WebCore::HTMLFormElement::defaultButton): (WebCore::HTMLFormElement::checkInvalidControlsAndCollectUnhandled): (WebCore::HTMLFormElement::documentDidResumeFromPageCache): * loader/FormSubmission.cpp: (WebCore::FormSubmission::create): 2013-12-30 Anders Carlsson Replace yield() and pauseBriefly() with std::this_thread::yield() https://bugs.webkit.org/show_bug.cgi?id=126105 Reviewed by Sam Weinig. * platform/sql/SQLiteDatabase.cpp: (WebCore::SQLiteDatabase::interrupt): 2013-12-30 Andreas Kling Rename createRenderObject() to createRenderer(). Somewhat rubber-stamped by Antti Koivisto. 2013-12-30 Andreas Kling Document should store its RenderView in a RenderPtr. Make Document::m_renderView a RenderPtr and remove one manual destroy() call. Also removed the setRenderView() helper and inlined it at the two call sites. Reviewed by Antti Koivisto. 2013-12-30 Martin Robinson [CMake] [GTK] Add support for GObject introspection https://bugs.webkit.org/show_bug.cgi?id=126162 Reviewed by Daniel Bates. * PlatformGTK.cmake: Build a list of WebKitDOM headers and expose it to the parent scope of the build. 2013-12-30 Andreas Kling Text::createTextRenderer() should return a RenderPtr. Make createTextRenderer() return a RenderPtr and remove one manual destroy() call. Also, since it should always return a valid object, I turned a null check into an assertion instead. Reviewed by Antti Koivisto. 2013-12-30 Antti Koivisto Remove attachChild https://bugs.webkit.org/show_bug.cgi?id=126288 Reviewed by Andreas Kling. * dom/ContainerNode.cpp: (WebCore::destroyRenderTreeIfNeeded): Rename detachChild and move the tests here. (WebCore::ContainerNode::takeAllChildrenFrom): No need to call attachRenderTree explicitly anymore. (WebCore::ContainerNode::removeBetween): 2013-12-29 Andreas Kling RenderLayer: Store corner and resizer renderers in RenderPtrs. Turn RenderLayer::m_scrollCorner and m_resizer into RenderPtrs. Removed manual destroy() calls as appropriate. Also tweaked some code to reduce nesting. Reviewed by Anders Carlsson. 2013-12-30 Antti Koivisto XML document builder should create render tree asynchronously https://bugs.webkit.org/show_bug.cgi?id=126285 Reviewed by Andreas Kling. Stop creating renderers explicitly. Fix SVG element to not rely on parse time render tree construction. * svg/SVGUseElement.cpp: (WebCore::SVGUseElement::svgAttributeChanged): Remove renderer check, we may not have created the render tree yet. (WebCore::SVGUseElement::willAttachRenderers): Switch to willAttachRenderers from willRecalcStyle. The latter is only called as long as style recalc doesn't start creating new renderers. (WebCore::SVGUseElement::invalidateShadowTree): Remove renderer check, we may not have created the render tree yet. Invalidate with ReconstructRenderTree so willAttachRenderers will always get called. * svg/SVGUseElement.h: * xml/parser/XMLDocumentParser.cpp: (WebCore::XMLDocumentParser::exitText): * xml/parser/XMLDocumentParserLibxml2.cpp: (WebCore::XMLDocumentParser::startElementNs): (WebCore::XMLDocumentParser::cdataBlock): Remove explicit call to attachRenderTree. The render tree will be created lazily. 2013-12-29 Joone Hur Reverted r156742. The same fix was reverted from Blink due to heap-use-after-free on ClusterFuzz. https://bugs.webkit.org/show_bug.cgi?id=126275 https://codereview.chromium.org/102993011 Reviewed by Darin Adler. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::updateFirstLetter): 2013-12-29 ChangSeok Oh Remove unused functions in GraphicsContext3D.cpp https://bugs.webkit.org/show_bug.cgi?id=126265 Reviewed by Andreas Kling. platformGraphicsContext3D, platformTexture and platformLayer in GC3D.cpp seem not used by any ports. No new tests, no functionality changed. * platform/graphics/GraphicsContext3D.cpp: 2013-12-29 Gyuyoung Kim Fix build error on 64bit debug build. https://bugs.webkit.org/show_bug.cgi?id=126248 r161076 used ‘%lli’(for long long int) for int64_t(aka long int). However, in a 64bit compile, int64_t is 'long int', not a 'long long int'. To support 32bit and 64bit, we use static_cast. * Modules/indexeddb/IDBTransactionBackend.cpp: (WebCore::IDBTransactionBackend::commit): 2013-12-29 Antti Koivisto Remove some accidental commented out code. * testing/Internals.cpp: (WebCore::Internals::mallocStatistics): 2013-12-29 Antti Koivisto Fix build. * xml/parser/XMLDocumentParser.cpp: 2013-12-29 Antti Koivisto Remove Node::attached() https://bugs.webkit.org/show_bug.cgi?id=126276 Reviewed by Sam Weinig. Node::attached() is poorly defined. Replace it with renderer() and inRenderedDocument() tests as appropriate. Also remove some unnecessary explicit attachRenderTree/detachRenderTree calls from the tree builders. 2013-12-29 Andreas Kling RenderLayer: Store reflection renderer in a RenderPtr. Reviewed by Anders Carlsson. * rendering/RenderLayer.h: * rendering/RenderLayer.cpp: (WebCore::RenderLayer::RenderLayer): (WebCore::RenderLayer::calculateClipRects): Turn RenderLayer::m_reflection into a RenderPtr instead of a raw pointer. * WebCore.xcodeproj/project.pbxproj: Add RenderPtr.h to private headers. 2013-12-28 Andreas Kling Add an owning smart pointer for RenderObjects and start using it. This patch adds a RenderPtr pointer, essentially an OwnPtr for RenderObjects. The difference is that RenderPtr destroys the object by calling destroy() on it. This is necessary to implement the willBeDestroyed() mechanism in RenderObject that notifies renderers just before they are about to be deleted, while they can still do tree traversal, etc. I also added a make_unique-alike helper so you can write: auto renderer = createRenderObject(...); Put it all to use by making ContentData::createRenderer() return RenderPtr instead of raw RenderObject*. Reviewed by Antti Koivisto. 2013-12-28 Benjamin Poulain Add a missing include path for GTK https://bugs.webkit.org/show_bug.cgi?id=126257 Reviewed by Philippe Normand. * GNUmakefile.am: 2013-12-28 Carlos Garcia Campos Unreviewed. Update GObject DOM symbols file after r160733. * bindings/gobject/webkitdom.symbols: 2013-12-28 Carlos Garcia Campos [GTK] Downloads are broken with the network process enabled https://bugs.webkit.org/show_bug.cgi?id=126131 Reviewed by Martin Robinson. The problem is that the network process crashes when trying to convert the handle to a download, because at that point the download has finished and the handle is NULL. This happens because we are not implementing ResourceHandle::continueDidReceiveResponse(). * platform/network/soup/ResourceHandleSoup.cpp: (WebCore::nextMultipartResponsePartCallback): Call continueAfterDidReceiveResponse() when not using async callbacks. (WebCore::sendRequestCallback): Ditto. (WebCore::continueAfterDidReceiveResponse): Helper function that continues the load after didReceiveResponse. (WebCore::ResourceHandle::continueDidReceiveResponse): Call continueAfterDidReceiveResponse(). 2013-12-27 Daniel Bates Another attempt to fix the Windows build after (https://bugs.webkit.org/show_bug.cgi?id=126180) * WebCore.vcxproj/WebCore.vcxproj.filters: Add files platform/audio/{AudioSession, AudioSessionListener}.h * WebCore.vcxproj/WebCoreCommon.props: Add directory WebCore/platform/audio to the list of include directories. 2013-12-27 Daniel Bates Attempt to fix the Windows build after (https://bugs.webkit.org/show_bug.cgi?id=126180) Add files platform/audio/AudioSession.{cpp, h} and platform/audio/AudioSessionListener.h to the Visual Studio project. Note, the contents of these files are guarded by USE(AUDIO_SESSION), which is only enabled on Mac and iOS at the time of writing. I thought to try this approach to fix the build so as to avoid adding an extraneous USE(AUDIO_SESSION)-guard around the #include "AudioSession.h" in Settings.cpp since the contents of the file AudioSession.h is guarded by USE(AUDIO_SESSION). * WebCore.vcxproj/WebCore.vcxproj: 2013-12-27 Daniel Bates [iOS] Upstream WebCore/page changes https://bugs.webkit.org/show_bug.cgi?id=126180 Reviewed by Darin Adler. * WebCore.xcodeproj/project.pbxproj: * dom/EventNames.h: (WebCore::EventNames::isGestureEventType): Added. * page/AlternativeTextClient.h: Do not define WTF_USE_DICTATION_ALTERNATIVES when building for iOS. * page/Chrome.cpp: (WebCore::Chrome::Chrome): (WebCore::Chrome::dispatchViewportPropertiesDidChange): Added; guarded by PLATFORM(IOS). (WebCore::Chrome::setCursor): Make this an empty function when building for iOS. (WebCore::Chrome::setCursorHiddenUntilMouseMoves): Ditto. (WebCore::Chrome::didReceiveDocType): Added; iOS-specific. * page/Chrome.h: (WebCore::Chrome::setDispatchViewportDataDidChangeSuppressed): Added; guarded by PLATFORM(IOS). * page/ChromeClient.h: (WebCore::ChromeClient::didFlushCompositingLayers): Added; guarded by PLATFORM(IOS). (WebCore::ChromeClient::fetchCustomFixedPositionLayoutRect): Added; guarded by PLATFORM(IOS). (WebCore::ChromeClient::updateViewportConstrainedLayers): Added; guarded by PLATFORM(IOS). * page/DOMTimer.cpp: (WebCore::DOMTimer::install): Added iOS-specific code. (WebCore::DOMTimer::fired): Ditto. * page/DOMWindow.cpp: (WebCore::DOMWindow::DOMWindow): Ditto. (WebCore::DOMWindow::innerHeight): Ditto. (WebCore::DOMWindow::innerWidth): Ditto. (WebCore::DOMWindow::scrollX): Ditto. (WebCore::DOMWindow::scrollY): Ditto. (WebCore::DOMWindow::scrollBy): Ditto. (WebCore::DOMWindow::scrollTo): Ditto. (WebCore::DOMWindow::clearTimeout): Ditto. (WebCore::DOMWindow::addEventListener): Ditto. (WebCore::DOMWindow::incrementScrollEventListenersCount): Added; guarded by PLATFORM(IOS). (WebCore::DOMWindow::decrementScrollEventListenersCount): Added; guarded by PLATFORM(IOS). (WebCore::DOMWindow::resetAllGeolocationPermission): Added; Also added FIXME comment. (WebCore::DOMWindow::removeEventListener): Added iOS-specific code. (WebCore::DOMWindow::dispatchEvent): Modified to prevent dispatching duplicate pageshow and pagehide events per . (WebCore::DOMWindow::removeAllEventListeners): Added iOS-specific code. * page/DOMWindow.h: * page/DOMWindow.idl: Added IOS_GESTURE_EVENTS-guarded attributes: ongesture{change, end, start}. Also added IOS_TOUCH_EVENTS-guarded attributes: {Touch, TouchList}Constructor. * page/EditorClient.h: * page/EventHandler.cpp: (WebCore::EventHandler::EventHandler): Added iOS-specific code. (WebCore::EventHandler::clear): Ditto. (WebCore::EventHandler::startPanScrolling): Make this an empty function when building for iOS. (WebCore::EventHandler::handleMousePressEvent): Modified to invalidate a click when the clicked node is null. Also, opt out of code for updating the scrollbars as UIKit manages scrollbars on iOS. (WebCore::EventHandler::handleMouseMoveEvent): Opt of code for updating the scrollbars and cursor when building on iOS. (WebCore::hitTestResultInFrame): Made this a file-local static function since it's only used in EventHandler.cpp. (WebCore::EventHandler::dispatchSyntheticTouchEventIfEnabled): Added iOS-specific code. * page/EventHandler.h: * page/FocusController.h: * page/Frame.cpp: (WebCore::Frame::Frame): Added iOS-specific code. (WebCore::Frame::scrollOverflowLayer): Added; iOS-specific. (WebCore::Frame::overflowAutoScrollTimerFired): Added; iOS-specific. (WebCore::Frame::startOverflowAutoScroll): Added; iOS-specific. (WebCore::Frame::checkOverflowScroll): Added; iOS-specific. (WebCore::Frame::willDetachPage): Added iOS-specific code. (WebCore::Frame::createView): Ditto. (WebCore::Frame::setSelectionChangeCallbacksDisabled): Added; iOS-specific. (WebCore::Frame::selectionChangeCallbacksDisabled): Added; iOS-specific. * page/Frame.h: (WebCore::Frame::timersPaused): Added; guarded by PLATFORM(IOS). * page/FrameView.cpp: (WebCore::FrameView::FrameView): Added iOS-specific code. (WebCore::FrameView::clear): Ditto. (WebCore::FrameView::flushCompositingStateForThisFrame): Ditto. (WebCore::FrameView::graphicsLayerForPlatformWidget): Added. (WebCore::FrameView::scheduleLayerFlushAllowingThrottling): Added. (WebCore::FrameView::layout): Added iOS-specific code. (WebCore::countRenderedCharactersInRenderObjectWithThreshold): Added; helper function used by FrameView::renderedCharactersExceed(). Also added FIXME comment. (WebCore::FrameView::renderedCharactersExceed): Added. (WebCore::FrameView::visibleContentsResized): Added iOS-specific code. (WebCore::FrameView::adjustTiledBackingCoverage): Ditto. (WebCore::FrameView::performPostLayoutTasks): Ditto. (WebCore::FrameView::sendResizeEventIfNeeded): Ditto. (WebCore::FrameView::paintContents): Added iOS-specific code. Also added FIXME comments. (WebCore::FrameView::setUseCustomFixedPositionLayoutRect): Added; iOS-specific. (WebCore::FrameView::setCustomFixedPositionLayoutRect): Added; iOS-specific. (WebCore::FrameView::updateFixedPositionLayoutRect): Added; iOS-specific. * page/FrameView.h: * page/Navigator.cpp: (WebCore::Navigator::standalone): Added; iOS-specific. * page/Navigator.h: * page/Navigator.idl: Added WTF_PLATFORM_IOS-guarded attribute: standalone. Also added FIXME comment. * page/NavigatorBase.cpp: (WebCore::NavigatorBase::platform): Added iOS-specific code. * page/Page.h: (WebCore::Page::hasCustomHTMLTokenizerTimeDelay): Added; guarded by PLATFORM(IOS). Also added FIXME comment to remove this method. (WebCore::Page::customHTMLTokenizerTimeDelay): Added; guarded by PLATFORM(IOS). Also added FIXME comment to remove this method. * page/PageGroup.cpp: (WebCore::PageGroup::removeVisitedLink): Added. * page/PageGroup.h: * page/Settings.cpp: (WebCore::Settings::Settings): (WebCore::Settings::setScriptEnabled): Added; guarded by PLATFORM(IOS). (WebCore::Settings::setStandalone): Added; guarded by PLATFORM(IOS). (WebCore::Settings::setAudioSessionCategoryOverride): Added; guarded by PLATFORM(IOS). (WebCore::Settings::audioSessionCategoryOverride): Added; guarded by PLATFORM(IOS). (WebCore::Settings::setNetworkDataUsageTrackingEnabled): Added; guarded by PLATFORM(IOS). (WebCore::Settings::networkDataUsageTrackingEnabled): Added; guarded by PLATFORM(IOS). (WebCore::sharedNetworkInterfaceNameGlobal): Added; guarded by PLATFORM(IOS). (WebCore::Settings::setNetworkInterfaceName): Added; guarded by PLATFORM(IOS). (WebCore::Settings::networkInterfaceName): Added; guarded by PLATFORM(IOS). * page/Settings.h: (WebCore::Settings::setMaxParseDuration): Added; guarded by PLATFORM(IOS). Also added FIXME comment. (WebCore::Settings::maxParseDuration): Added; guarded by PLATFORM(IOS). Also added FIXME comment. (WebCore::Settings::standalone): Added; guarded by PLATFORM(IOS). (WebCore::Settings::setTelephoneNumberParsingEnabled): Added; guarded by PLATFORM(IOS). (WebCore::Settings::telephoneNumberParsingEnabled): Added; guarded by PLATFORM(IOS). (WebCore::Settings::setMediaDataLoadsAutomatically): Added; guarded by PLATFORM(IOS). (WebCore::Settings::mediaDataLoadsAutomatically): Added; guarded by PLATFORM(IOS). (WebCore::Settings::setShouldTransformsAffectOverflow): Added; guarded by PLATFORM(IOS). (WebCore::Settings::shouldTransformsAffectOverflow): Added; guarded by PLATFORM(IOS). (WebCore::Settings::setShouldDispatchJavaScriptWindowOnErrorEvents): Added; guarded by PLATFORM(IOS). (WebCore::Settings::shouldDispatchJavaScriptWindowOnErrorEvents): Added; guarded by PLATFORM(IOS). (WebCore::Settings::setAlwaysUseBaselineOfPrimaryFont): Added; guarded by PLATFORM(IOS). (WebCore::Settings::alwaysUseBaselineOfPrimaryFont): Added; guarded by PLATFORM(IOS). (WebCore::Settings::setAlwaysUseAcceleratedOverflowScroll): Added; guarded by PLATFORM(IOS). (WebCore::Settings::alwaysUseAcceleratedOverflowScroll): Added; guarded by PLATFORM(IOS). * page/Settings.in: Added IOS_AIRPLAY-guarded setting: mediaPlaybackAllowsAirPlay. * page/animation/CSSPropertyAnimation.cpp: (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap): Added iOS-specific code and FIXME comment. * page/ios/EventHandlerIOS.mm: Added. * page/ios/FrameIOS.mm: Added. * page/mac/ChromeMac.mm: * page/mac/PageMac.cpp: (WebCore::Page::addSchedulePair): Opt out of code when building for iOS. (WebCore::Page::removeSchedulePair): Ditto. * page/mac/SettingsMac.mm: (WebCore::Settings::shouldEnableScreenFontSubstitutionByDefault): Added iOS-specific code. * page/mac/WebCoreFrameView.h: 2013-12-27 Gavin Barraclough Merge PageVisibilityState & ViewState::IsVisible in WebKit2 https://bugs.webkit.org/show_bug.cgi?id=126214 Reviewed by Alexey Proskuryakov. WebKit2 redundantly tracks the visibility of the view through two mechanisms - the visibility state, and the view state. Remove visibility state from the WebKit2 layer. The visibility state also tracks the prerender state - so split this out and handle it separately (a change we should make in WebCore, too). WebCore - changes the API tests exposed a bug, a view should only ever come out of the prerender state when it becomes visible - redundant notifications that the view is still hidden should be ignored. * page/Page.cpp: (WebCore::Page::setVisibilityState): - ignore visibility state change to hidden, if the current state is prerender. 2013-12-27 Joseph Pecoraro Unreviewed Windows build fix for r160946. Add another file to the Windows InspectorAllInOne.cpp. * inspector/InspectorAllInOne.cpp: 2013-12-27 Commit Queue Unreviewed, rolling out r161096. http://trac.webkit.org/changeset/161096 https://bugs.webkit.org/show_bug.cgi?id=126256 Made lots of tests crash (Requested by ap on #webkit). * dom/ContainerNode.cpp: (WebCore::ContainerNode::insertBefore): (WebCore::ContainerNode::replaceChild): (WebCore::willRemoveChildren): (WebCore::ContainerNode::appendChild): * dom/Document.cpp: (WebCore::Document::visibilityStateChanged): (WebCore::Document::moveNodeIteratorsToNewDocument): (WebCore::Document::updateRangesAfterChildrenChanged): (WebCore::Document::nodeChildrenWillBeRemoved): (WebCore::Document::nodeWillBeRemoved): (WebCore::Document::textInserted): (WebCore::Document::textRemoved): (WebCore::Document::textNodesMerged): (WebCore::Document::textNodeSplit): (WebCore::Document::documentWillSuspendForPageCache): (WebCore::Document::documentDidResumeFromPageCache): (WebCore::Document::mediaVolumeDidChange): (WebCore::Document::privateBrowsingStateDidChange): (WebCore::Document::captionPreferencesChanged): (WebCore::Document::validateAutoSizingNodes): (WebCore::Document::resetAutoSizingNodes): (WebCore::Document::webkitExitFullscreen): * dom/MutationObserver.cpp: (WebCore::MutationObserver::disconnect): (WebCore::MutationObserver::getObservedNodes): (WebCore::MutationObserver::deliver): * dom/MutationObserverInterestGroup.cpp: (WebCore::MutationObserverInterestGroup::isOldValueRequested): (WebCore::MutationObserverInterestGroup::enqueueMutationRecord): * dom/MutationObserverRegistration.cpp: (WebCore::MutationObserverRegistration::clearTransientRegistrations): (WebCore::MutationObserverRegistration::addRegistrationNodesToSet): * dom/Node.cpp: (WebCore::Node::dumpStatistics): (WebCore::Document::invalidateNodeListAndCollectionCaches): (WebCore::NodeListsNodeData::invalidateCaches): (WebCore::Node::didMoveToNewDocument): (WebCore::collectMatchingObserversForMutation): (WebCore::Node::notifyMutationObserversNodeWillDetach): * dom/NodeRareData.h: (WebCore::NodeListsNodeData::adoptDocument): * dom/ScriptExecutionContext.cpp: (WebCore::ScriptExecutionContext::~ScriptExecutionContext): (WebCore::ScriptExecutionContext::canSuspendActiveDOMObjects): (WebCore::ScriptExecutionContext::suspendActiveDOMObjects): (WebCore::ScriptExecutionContext::resumeActiveDOMObjects): (WebCore::ScriptExecutionContext::stopActiveDOMObjects): (WebCore::ScriptExecutionContext::closeMessagePorts): (WebCore::ScriptExecutionContext::adjustMinimumTimerInterval): (WebCore::ScriptExecutionContext::didChangeTimerAlignmentInterval): * dom/WebKitNamedFlow.cpp: (WebCore::WebKitNamedFlow::getRegionsByContent): (WebCore::WebKitNamedFlow::getRegions): (WebCore::WebKitNamedFlow::getContent): 2013-12-26 Sam Weinig Convert some of WebCore/dom over to range-for loops https://bugs.webkit.org/show_bug.cgi?id=126250 Reviewed by Andreas Kling. * dom/ContainerNode.cpp: * dom/Document.cpp: * dom/MutationObserver.cpp: * dom/MutationObserverInterestGroup.cpp: * dom/MutationObserverRegistration.cpp: * dom/Node.cpp: * dom/NodeRareData.h: * dom/ScriptExecutionContext.cpp: * dom/WebKitNamedFlow.cpp: 2013-12-26 Thiago de Barros Lacerda [Nix] Cleanup Source/WebCore/PlatformNix.cmake https://bugs.webkit.org/show_bug.cgi?id=126226 Reviewed by Csaba Osztrogonác. No new tests needed. * PlatformNix.cmake: 2013-12-26 Joseph Pecoraro Unreviewed attempt at Windows build fix. I think Window's "AllInOne.cpp" is causing a using namespace JSC to cause naming conflicts between Inspector::TypeBuilder::Debugger::types and JSC::types. So removing the ambiguity. * inspector/InjectedScript.cpp: (WebCore::InjectedScript::getProperties): (WebCore::InjectedScript::wrapCallFrames): 2013-12-22 Andreas Kling Make Text::createTextRenderer() take a const RenderStyle&. Nuke a FIXME about constifying a RenderStyle& local. Reviewed by Anders Carlsson. 2013-12-22 Andreas Kling Move more inlines from RenderObject to RenderElement. Lift some inline functions that use style() from RenderObject over to RenderElement, making them branchless. Reviewed by Anders Carlsson. 2013-12-26 ChangSeok Oh Unreviewed build fix after r159526. isBoxValue is used at out of ENABLE_CSS_SHAPES gaurd. It causes a compile failure. So I moved isBoxValue to out side of ENABLE_CSS_SHAPES. * css/CSSParser.cpp: 2013-12-25 Gyuyoung Kim Set m_pos as private in InlineIterator, and use getter and setter functions. https://bugs.webkit.org/show_bug.cgi?id=125614 Reviewed by Alexey Proskuryakov. InlineIterator has been exported m_pos as public directly though it is member variable. This patch set it as private, and add getter/setter functions for it. No new tests, no behavior changes. * rendering/InlineIterator.h: (WebCore::InlineIterator::setOffset): (WebCore::operator==): (WebCore::operator!=): (WebCore::InlineBidiResolver::appendRun): * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlockFlow::appendRunsForObject): (WebCore::constructBidiRunsForLine): (WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange): (WebCore::RenderBlockFlow::matchedEndLine): (WebCore::LineBreaker::nextSegmentBreak): * rendering/line/BreakingContextInlineHeaders.h: (WebCore::BreakingContext::handleBR): (WebCore::BreakingContext::handleFloat): (WebCore::iteratorIsBeyondEndOfRenderCombineText): (WebCore::ensureCharacterGetsLineBox): (WebCore::BreakingContext::handleText): (WebCore::checkMidpoints): (WebCore::BreakingContext::handleEndOfLine): * rendering/line/TrailingObjects.cpp: (WebCore::TrailingObjects::updateMidpointsForTrailingBoxes): 2013-12-25 Kim Byung Jun [EFL] Delete file.edc and file_*.png. https://bugs.webkit.org/show_bug.cgi?id=125134 Reviewed by Gyuyoung Kim. File_theme uses button form. * platform/efl/DefaultTheme/CMakeLists.txt: * platform/efl/DefaultTheme/default.edc: * platform/efl/DefaultTheme/widget/file/file.edc: Removed. * platform/efl/DefaultTheme/widget/file/file_focus.png: Removed. * platform/efl/DefaultTheme/widget/file/file_hover.png: Removed. * platform/efl/DefaultTheme/widget/file/file_normal.png: Removed. * platform/efl/DefaultTheme/widget/file/file_press.png: Removed. 2013-12-25 Thiago de Barros Lacerda [Nix] Adding createDragImageIconForCachedImageFilename method to DragImageNix https://bugs.webkit.org/show_bug.cgi?id=126230 Reviewed by Daniel Bates. Also returning nullptr in other functions that were returning 0 as a pointer. * platform/nix/DragImageNix.cpp: (WebCore::createDragImageFromImage): (WebCore::createDragImageIconForCachedImage): (WebCore::createDragImageIconForCachedImageFilename): 2013-12-25 Thiago de Barros Lacerda [Nix] Fixing DragData::asFragment signature in DragDataNix.cpp https://bugs.webkit.org/show_bug.cgi?id=126229 Reviewed by Daniel Bates. * platform/nix/DragDataNix.cpp: (WebCore::DragData::asFragment): 2013-12-25 Commit Queue Unreviewed, rolling out r161033 and r161074. http://trac.webkit.org/changeset/161033 http://trac.webkit.org/changeset/161074 https://bugs.webkit.org/show_bug.cgi?id=126240 Oliver says that a rollout would be better (Requested by ap on #webkit). * bindings/js/JSDOMWindowCustom.cpp: (WebCore::JSDOMWindow::put): * bindings/objc/WebScriptObject.mm: (-[WebScriptObject setValue:forKey:]): * bindings/scripts/CodeGeneratorJS.pm: (GenerateImplementation): * bindings/scripts/test/JS/JSTestInterface.cpp: (WebCore::JSTestInterface::putByIndex): * bridge/NP_jsobject.cpp: (_NPN_SetProperty): 2013-12-25 Brady Eidson DatabaseProcess: Implement version changing https://bugs.webkit.org/show_bug.cgi?id=126099 Reviewed by Sam Weinig. No new tests (No change in WebCore behavior). * Modules/indexeddb/IDBTransactionBackend.cpp: (WebCore::IDBTransactionBackend::commit): Update some logging. * Modules/indexeddb/IDBTransactionBackendOperations.cpp: (WebCore::IDBDatabaseBackend::VersionChangeOperation::perform): Move some things that used to be in IDBServerConnectionLevelDB::changeDatabaseVersion to this cross-platform location. * Modules/indexeddb/IDBTransactionBackendOperations.h: (WebCore::IDBDatabaseBackend::VersionChangeOperation::transaction): * Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.cpp: (WebCore::IDBServerConnectionLevelDB::changeDatabaseVersion): Move the actual updating of the database backend metadata to the VersionChangeOperation. 2013-12-25 Martin Robinson [GTK] [CMake] Clean up generated sources directories https://bugs.webkit.org/show_bug.cgi?id=126216 Reviewed by Gustavo Noronha Silva. * PlatformGTK.cmake: Use the new directory variables. 2013-12-25 Dirk Schulze Support values parsing on 'clip-path' property https://bugs.webkit.org/show_bug.cgi?id=126147 Reviewed by Ryosuke Niwa. Support parsing of the background reference boxes, margin-box and bounding-box. A box will be a reference box and define the origin for a basic shape. If no basic shape is specified, the box defines the clipping path itself. The specification text follows the changes to CSS Shapes now. https://dvcs.w3.org/hg/FXTF/raw-file/3f213145303e/css-masking-1/index.html#the-clip-path Existing parsing test have been extended to test box values as well. * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): (WebCore::CSSParser::parseClipPath): * css/CSSParser.h: * css/CSSValueKeywords.in: * css/DeprecatedStyleBuilder.cpp: (WebCore::ApplyPropertyClipPath::applyValue): 2013-12-25 David Kilzer [iOS] Upstream WebCore/pdf changes http://webkit.org/b/126097 Reviewed by Sam Weinig. * WebCore.xcodeproj/project.pbxproj: Added files to project. * pdf/ios/PDFDocument.cpp: Added. (WebCore::PDFDocumentParser::create): (WebCore::PDFDocumentParser::document): (WebCore::PDFDocumentParser::PDFDocumentParser): (WebCore::PDFDocument::createParser): * pdf/ios/PDFDocument.h: Added. (WebCore::PDFDocument::create): (WebCore::PDFDocument::PDFDocument): 2013-12-24 Commit Queue Unreviewed, rolling out r160959. http://trac.webkit.org/changeset/160959 https://bugs.webkit.org/show_bug.cgi?id=126222 Caused Windows build to fail (Requested by rfong on #webkit). * platform/sql/SQLiteDatabase.cpp: (WebCore::SQLiteDatabase::interrupt): 2013-12-24 Ryosuke Niwa Unreviewed, rolling out r161051. http://trac.webkit.org/changeset/161051 https://bugs.webkit.org/show_bug.cgi?id=45994 Caused two DFG tests to hit assertions due to a separate bug * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::status): (WebCore::XMLHttpRequest::statusText): * xml/XMLHttpRequest.h: * xml/XMLHttpRequest.idl: 2013-12-24 Mihnea Ovidenie [CSSRegions] Crash while repainting an invalid region https://bugs.webkit.org/show_bug.cgi?id=126152 Reviewed by Daniel Bates. An invalid region, part of a dependency cycle, should not attempt to repaint content from its associated named flow, otherwise there may be the case of an infinite repaint cycle, resulting in a crash due to a stack overflow. Test: fast/regions/repaint/invalid-region-repaint-crash.html * rendering/RenderLayer.cpp: (WebCore::RenderLayer::repaintIncludingDescendants): 2013-12-23 Ryosuke Niwa XMLHttpRequest: status and statusText throw DOM Exception 11 when the state is UNSENT or OPENED. https://bugs.webkit.org/show_bug.cgi?id=45994 Reviewed by Alexey Proskuryakov. Merged https://chromium.googlesource.com/chromium/blink/+/23c90460de16e04c5aba7ed942fba76cb79fdb9b. Latest XHR spec says that XHR should return 0 and an empty string when it's in UNSENT or OPENED state or error flag is set: http://www.w3.org/TR/2012/WD-XMLHttpRequest-20121206/#the-status-attribute * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::status): (WebCore::XMLHttpRequest::statusText): * xml/XMLHttpRequest.h: * xml/XMLHttpRequest.idl: 2013-12-23 Ryosuke Niwa Crash in ReplaceSelectionCommand https://bugs.webkit.org/show_bug.cgi?id=126107 Reviewed by Benjamin Poulain. Merge https://chromium.googlesource.com/chromium/blink/+/c1ebe5c1e808daf9db5e348a8d0ab32570b9f7a5 except the test since it doesn't reproduce the crash in WebKit. * editing/ReplaceSelectionCommand.cpp: (WebCore::ReplaceSelectionCommand::doApply): 2013-12-23 Benjamin Poulain Add the pseudo classes link and any-link to the Selector Code Generator https://bugs.webkit.org/show_bug.cgi?id=126196 Reviewed by Ryosuke Niwa. * cssjit/SelectorCompiler.cpp: (WebCore::SelectorCompiler::addPseudoType): (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatching): (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsLink): * dom/Node.h: (WebCore::Node::flagIsElement): (WebCore::Node::flagIsLink): Fix the type to match TrustedImm32. 2013-12-23 Benjamin Poulain Add the experimental CSS code generator files to the remaining build systems https://bugs.webkit.org/show_bug.cgi?id=126192 Reviewed by Sam Weinig. * CMakeLists.txt: * GNUmakefile.list.am: * WebCore.vcxproj/WebCore.vcxproj: * WebCore.vcxproj/WebCore.vcxproj.filters: 2013-12-23 Benjamin Poulain Add the pseudo class :focus to the Selector Code Generator https://bugs.webkit.org/show_bug.cgi?id=126189 Reviewed by Ryosuke Niwa. * cssjit/SelectorCompiler.cpp: (WebCore::SelectorCompiler::addPseudoType): (WebCore::SelectorCompiler::SelectorCodeGenerator::SelectorCodeGenerator): (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatching): (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsFocused): 2013-12-23 Ryosuke Niwa Remove boolean argument from Element::setChildrenAffectBy* methods https://bugs.webkit.org/show_bug.cgi?id=126183 Reviewed by Daniel Bates. Merge https://chromium.googlesource.com/chromium/blink/+/066ef2fa78336b2b65052cb17cb81b367fe7dbbf These functions are never called with false. * css/SelectorChecker.cpp: (WebCore::SelectorChecker::checkOne): * dom/Element.cpp: (WebCore::Element::setChildrenAffectedByActive): (WebCore::Element::setChildrenAffectedByDrag): * dom/Element.h: (WebCore::Element::setChildrenAffectedByHover): 2013-12-23 Tim Horton Fix the iOS build after r161013 and r160672. * WebCore.exp.in: * platform/graphics/ca/mac/PlatformCALayerMac.mm: (PlatformCALayerMac::updateCustomAppearance): 2013-12-23 Oliver Hunt Refactor PutPropertySlot to be aware of custom properties https://bugs.webkit.org/show_bug.cgi?id=126187 Reviewed by msaboff. Update the bindings code generation and custom objects to the new function signatures * bindings/js/JSDOMWindowCustom.cpp: (WebCore::JSDOMWindow::put): * bindings/objc/WebScriptObject.mm: (-[WebScriptObject setValue:forKey:]): * bindings/scripts/CodeGeneratorJS.pm: (GenerateImplementation): * bindings/scripts/test/JS/JSTestInterface.cpp: (WebCore::JSTestInterface::putByIndex): * bridge/NP_jsobject.cpp: (_NPN_SetProperty): 2013-12-23 Benjamin Poulain Add class matching to the Selector Code Generator https://bugs.webkit.org/show_bug.cgi?id=126176 Reviewed by Antti Koivisto. Add selector matching based on classname to the Selector Compiler. * cssjit/SelectorCompiler.cpp: (WebCore::SelectorCompiler::SelectorCodeGenerator::SelectorCodeGenerator): (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementDataMatching): (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementHasClasses): * dom/ElementData.h: (WebCore::ElementData::classNamesMemoryOffset): * dom/SpaceSplitString.h: (WebCore::SpaceSplitStringData::sizeMemoryOffset): (WebCore::SpaceSplitStringData::tokensMemoryOffset): 2013-12-23 Daniel Bates [iOS] Upstream WebCore/storage changes https://bugs.webkit.org/show_bug.cgi?id=125913 Reviewed by David Kilzer. * storage/StorageAreaSync.cpp: (WebCore::StorageAreaSync::openDatabase): Added iOS-specific code. (WebCore::StorageAreaSync::sync): Ditto. * storage/StorageTracker.cpp: (WebCore::StorageTracker::openTrackerDatabase): Ditto. (WebCore::StorageTracker::syncImportOriginIdentifiers): Ditto. (WebCore::StorageTracker::syncFileSystemAndTrackerDatabase): Ditto. (WebCore::StorageTracker::syncSetOriginDetails): Ditto. (WebCore::StorageTracker::syncDeleteAllOrigins): Ditto. (WebCore::StorageTracker::syncDeleteOrigin): Ditto. (WebCore::StorageTracker::databasePathForOrigin): Ditto. 2013-12-23 Daniel Bates Fix the iOS build following (https://bugs.webkit.org/show_bug.cgi?id=125239) * rendering/RenderBlock.h: * rendering/RenderBox.cpp: (WebCore::RenderBox::containingBlockLogicalWidthForPositioned): Substitute view() for &view(). * rendering/RenderLayer.cpp: (WebCore::RenderLayer::scrollTo): Fix indentation of closing brace. * rendering/RenderLayerCompositor.cpp: Include MainFrame.h. (WebCore::RenderLayerCompositor::contentsScaleMultiplierForNewTiles): Check that page->mainFrame().view() is non-null; also add explicit #else clause. (WebCore::RenderLayerCompositor::ensureRootLayer): Fix up main frame check. * rendering/RenderTheme.h: (WebCore::RenderTheme::paintFileUploadIconDecorations): Substitute rect for r. * rendering/RenderThemeIOS.mm: (WebCore::RenderThemeIOS::paintTextFieldDecorations): Use .get() to access underlying NeverDestroyed item. (WebCore::RenderThemeIOS::systemFont): * rendering/RenderView.cpp: (WebCore::fixedPositionOffset): Substitute frameView.scrollOffset() for frameView->scrollOffset(). 2013-12-23 Ryosuke Niwa Minor optimization in FrameSelection::setNonDirectionalSelectionIfNeeded() https://bugs.webkit.org/show_bug.cgi?id=126108 Reviewed by Benjamin Poulain. Merge https://chromium.googlesource.com/chromium/blink/+/237b987c324e2e389a9e0350293bfaf16a5e201d * editing/FrameSelection.cpp: (WebCore::FrameSelection::setNonDirectionalSelectionIfNeeded): 2013-12-23 Ryosuke Niwa Use isDocumentFragment() instead of comparing nodeType() with Node::DOCUMENT_FRAGMENT_NODE https://bugs.webkit.org/show_bug.cgi?id=126178 Reviewed by Antti Koivisto. Inspired by https://chromium.googlesource.com/chromium/blink/+/a622cb80af2bfb0c5d91123cbcfa4fa72a06554c Use inline Node::isDocumentFragment() instead of virtual nodeType(). * dom/ContainerNode.cpp: (WebCore::collectChildrenAndRemoveFromOldParent): * dom/Document.cpp: (WebCore::Document::canReplaceChild): 2013-12-23 Gwang Yoon Hwang Clear ScratchBuffer::m_lastLayerSize when clearing the scratch buffer. https://bugs.webkit.org/show_bug.cgi?id=126150 Reviewed by Simon Fraser. Since ScratchBuffer::clearScratchBuffer only clears m_lastRadius, ShadowBlur doesn't draw shadow into the re-created scratch buffer if it tries to draw shadow without blurRadius. Clear m_lastLayerSize to empty is enought to ensure that there is no drawn contents in the scratch buffer. No new tests due to the flaky nature of reproducing the issue. * platform/graphics/ShadowBlur.cpp: (WebCore::ScratchBuffer::clearScratchBuffer): 2013-12-23 Benjamin Poulain Add id matching to the Selector Code Generator https://bugs.webkit.org/show_bug.cgi?id=126154 Reviewed by Antti Koivisto. Compile matching for #id selectors. IDs are Atomic String so it is just a matter of comparing the pointers. No attempt is made at optimizing for the double #id case because such problem do not really happen outside tests. * cssjit/SelectorCompiler.cpp: (WebCore::SelectorCompiler::SelectorFragment::SelectorFragment): (WebCore::SelectorCompiler::SelectorCodeGenerator::SelectorCodeGenerator): (WebCore::SelectorCompiler::SelectorCodeGenerator::compile): (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatching): (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementDataMatching): (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementHasId): * dom/Element.h: (WebCore::Element::elementDataMemoryOffset): * dom/ElementData.h: (WebCore::ElementData::idForStyleResolutionMemoryOffset): 2013-12-23 Oliver Hunt Update custom setter implementations to perform type checks https://bugs.webkit.org/show_bug.cgi?id=126171 Reviewed by Daniel Bates. Update the bindings code generator for setters so that they perform a real type check. * bindings/scripts/CodeGeneratorJS.pm: (GenerateAttributeEventListenerCall): (GenerateHeader): (GenerateImplementation): * bindings/scripts/test/JS/JSTestInterface.cpp: (WebCore::setJSTestInterfaceConstructorImplementsStaticAttr): (WebCore::setJSTestInterfaceImplementsStr2): (WebCore::setJSTestInterfaceImplementsStr3): (WebCore::setJSTestInterfaceImplementsNode): (WebCore::setJSTestInterfaceConstructorSupplementalStaticAttr): (WebCore::setJSTestInterfaceSupplementalStr2): (WebCore::setJSTestInterfaceSupplementalStr3): (WebCore::setJSTestInterfaceSupplementalNode): * bindings/scripts/test/JS/JSTestInterface.h: * bindings/scripts/test/JS/JSTestObj.cpp: (WebCore::setJSTestObjConstructorStaticStringAttr): (WebCore::setJSTestObjTestSubObjEnabledBySettingConstructor): (WebCore::setJSTestObjEnumAttr): (WebCore::setJSTestObjByteAttr): (WebCore::setJSTestObjOctetAttr): (WebCore::setJSTestObjShortAttr): (WebCore::setJSTestObjUnsignedShortAttr): (WebCore::setJSTestObjLongAttr): (WebCore::setJSTestObjLongLongAttr): (WebCore::setJSTestObjUnsignedLongLongAttr): (WebCore::setJSTestObjStringAttr): (WebCore::setJSTestObjTestObjAttr): (WebCore::setJSTestObjXMLObjAttr): (WebCore::setJSTestObjCreate): (WebCore::setJSTestObjReflectedStringAttr): (WebCore::setJSTestObjReflectedIntegralAttr): (WebCore::setJSTestObjReflectedUnsignedIntegralAttr): (WebCore::setJSTestObjReflectedBooleanAttr): (WebCore::setJSTestObjReflectedURLAttr): (WebCore::setJSTestObjReflectedCustomIntegralAttr): (WebCore::setJSTestObjReflectedCustomBooleanAttr): (WebCore::setJSTestObjReflectedCustomURLAttr): (WebCore::setJSTestObjTypedArrayAttr): (WebCore::setJSTestObjAttrWithGetterException): (WebCore::setJSTestObjAttrWithSetterException): (WebCore::setJSTestObjStringAttrWithGetterException): (WebCore::setJSTestObjStringAttrWithSetterException): (WebCore::setJSTestObjCustomAttr): (WebCore::setJSTestObjWithScriptStateAttribute): (WebCore::setJSTestObjWithScriptExecutionContextAttribute): (WebCore::setJSTestObjWithScriptStateAttributeRaises): (WebCore::setJSTestObjWithScriptExecutionContextAttributeRaises): (WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateAttribute): (WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateAttributeRaises): (WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttribute): (WebCore::setJSTestObjWithScriptArgumentsAndCallStackAttribute): (WebCore::setJSTestObjConditionalAttr1): (WebCore::setJSTestObjConditionalAttr2): (WebCore::setJSTestObjConditionalAttr3): (WebCore::setJSTestObjConditionalAttr4Constructor): (WebCore::setJSTestObjConditionalAttr5Constructor): (WebCore::setJSTestObjConditionalAttr6Constructor): (WebCore::setJSTestObjAnyAttribute): (WebCore::setJSTestObjMutablePoint): (WebCore::setJSTestObjImmutablePoint): (WebCore::setJSTestObjStrawberry): (WebCore::setJSTestObjStrictFloat): (WebCore::setJSTestObjId): (WebCore::setJSTestObjReplaceableAttribute): (WebCore::setJSTestObjNullableLongSettableAttribute): (WebCore::setJSTestObjNullableStringValue): (WebCore::setJSTestObjAttributeWithReservedEnumType): * bindings/scripts/test/JS/JSTestObj.h: * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp: (WebCore::setJSTestSerializedScriptValueInterfaceValue): (WebCore::setJSTestSerializedScriptValueInterfaceCachedValue): * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h: * bindings/scripts/test/JS/JSTestTypedefs.cpp: (WebCore::setJSTestTypedefsUnsignedLongLongAttr): (WebCore::setJSTestTypedefsImmutableSerializedScriptValue): (WebCore::setJSTestTypedefsAttrWithGetterException): (WebCore::setJSTestTypedefsAttrWithSetterException): (WebCore::setJSTestTypedefsStringAttrWithGetterException): (WebCore::setJSTestTypedefsStringAttrWithSetterException): * bindings/scripts/test/JS/JSTestTypedefs.h: 2013-12-23 Lucas Forschler Update copyright strings Reviewed by Dan Bernstein * Info.plist: 2013-12-23 Commit Queue Unreviewed, rolling out r160945. http://trac.webkit.org/changeset/160945 https://bugs.webkit.org/show_bug.cgi?id=126164 Seems to have broken multiple canvas tests (Requested by ap on #webkit). * WebCore.xcodeproj/project.pbxproj: * platform/graphics/cg/ImageBufferBackingStoreCache.cpp: Removed. * platform/graphics/cg/ImageBufferBackingStoreCache.h: Removed. * platform/graphics/cg/ImageBufferCG.cpp: (WebCore::createIOSurface): (WebCore::ImageBuffer::ImageBuffer): (WebCore::ImageBuffer::~ImageBuffer): 2013-12-23 Eric Carlson AudioSessionManager should be MediaSessionManager https://bugs.webkit.org/show_bug.cgi?id=126087 Reviewed by Jer Noble. No new tests, no change in functionality. * WebCore.xcodeproj/project.pbxproj: Change file names. * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::HTMLMediaElement): MediaSessionManagerToken::create() takes a client interface instead of the media type. * html/HTMLMediaElement.h: * platform/audio/AudioSessionListener.h: Include . AudioSessionManager.* -> MediaSessionManager.* * platform/audio/AudioSessionManager.cpp: Removed. * platform/audio/AudioSessionManager.h: Removed. * platform/audio/MediaSessionManager.cpp: Copied from Source/WebCore/platform/audio/AudioSessionManager.cpp. (MediaSessionManagerToken::create): (MediaSessionManagerToken::MediaSessionManagerToken): (MediaSessionManagerToken::~MediaSessionManagerToken): (MediaSessionManager::sharedManager): (MediaSessionManager::MediaSessionManager): (MediaSessionManager::has): (MediaSessionManager::count): (MediaSessionManager::addToken): (MediaSessionManager::removeToken): (MediaSessionManager::updateSessionState): * platform/audio/MediaSessionManager.h: Copied from Source/WebCore/platform/audio/AudioSessionManager.h. * platform/audio/mac/AudioDestinationMac.cpp: (WebCore::AudioDestinationMac::AudioDestinationMac): MediaSessionManagerToken::create() takes a client interface instead of the media type. * platform/audio/mac/AudioDestinationMac.h: * platform/audio/mac/AudioSessionMac.cpp: * platform/audio/mac/AudioSessionManagerMac.cpp: Removed. * platform/audio/mac/MediaSessionManagerMac.cpp: Copied from Source/WebCore/platform/audio/mac/AudioSessionManagerMac.cpp. (MediaSessionManager::updateSessionState): 2013-12-23 Zan Dobersek webkit gtk 2.2.3 stable tarball compilation error https://bugs.webkit.org/show_bug.cgi?id=125987 Reviewed by Gustavo Noronha Silva. Only try including and using GDK_IS_WAYLAND_DISPLAY if the Wayland support has been enabled and when not compiling with GTK+ 2 (which occurs when building for libPlatformGtk2). * platform/graphics/GLContext.cpp: (WebCore::GLContext::createContextForWindow): 2013-12-23 Piotr Grad [GStreamer] video/audio seeking is not unified. https://bugs.webkit.org/show_bug.cgi?id=125852 Reviewed by Philippe Normand. This bug is fixing regression with seeking audio/video elements and unifies seeking in MediaPlayerPrivateGStreamer. Test: media/video-seek-with-negative-playback.html * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: (WebCore::MediaPlayerPrivateGStreamer::seek): (WebCore::MediaPlayerPrivateGStreamer::seekIncludingRate): (WebCore::MediaPlayerPrivateGStreamer::setRate): (WebCore::MediaPlayerPrivateGStreamer::updateStates): * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h: 2013-12-23 ChangSeok Oh [GTK][WK2] WebGL is not working with GLES https://bugs.webkit.org/show_bug.cgi?id=126138 Reviewed by Martin Robinson. m_texture has been unnecessarily regenerated. It's generated in GraphicsContext3D constructor for offscreen rendering. And m_compositorTexture is used by only Mac port. They create it in their GraphicsContext3D constructor so that we don't need to recreate it in GC3DOpenGLES::reshapeFBOs. No new tests since no functionality changed. * platform/graphics/cairo/GraphicsContext3DCairo.cpp: (WebCore::GraphicsContext3D::~GraphicsContext3D): * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp: (WebCore::GraphicsContext3D::reshapeFBOs): * platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp: (WebCore::GraphicsContext3D::reshapeFBOs): 2013-12-22 Benjamin Poulain Create a skeleton for CSS Selector code generation https://bugs.webkit.org/show_bug.cgi?id=126044 Reviewed by Antti Koivisto and Gavin Barraclough. Add CSSCompiler, which provides the basic infrastructure to compile CSS Selectors on x86_64. Compilation happens in two phases. 1) The various matching and relation of each CSSSelector is aggregated into units matching a single element: SelectorFragment. SelectorFragment also knows about the relations between different fragments, and contains all the information to generate the code for a particular element. 2) The compiler then goes over the fragments, and generate code based on the information of each fragment. It the current state, SelectorCompiler only compiles the tag matching selectors and any of the relation between selectors. Depending on the relation and position of a fragment, failure on traversal or matching does not necessarily causes the complete selector. A failure can cause matching to resume from the parent or the sibling of a previously visisted node. The implementation of this is done through the BacktrackingAction. In case of failure, the next starting state is setup and the program counter jumps back to the appropriate starting point. When backtracking, the method used to save the starting point depends on the type of backtracking. The child/parent relation (">") is very common so it uses an additional register to keep the next starting point (m_descendantBacktrackingStart). The indirect sibling relation ("~") is much less common and uses the stack to save the next starting point. * WebCore.xcodeproj/project.pbxproj: * cssjit/SelectorCompiler.cpp: Added. (WebCore::SelectorCompiler::SelectorFragment::SelectorFragment): (WebCore::SelectorCompiler::compileSelector): (WebCore::SelectorCompiler::fragmentRelationForSelectorRelation): (WebCore::SelectorCompiler::SelectorCodeGenerator::SelectorCodeGenerator): (WebCore::SelectorCompiler::SelectorCodeGenerator::compile): (WebCore::SelectorCompiler::updateChainStates): (WebCore::SelectorCompiler::isFirstAncestor): (WebCore::SelectorCompiler::isFirstAdjacent): (WebCore::SelectorCompiler::isAfterChildRelation): (WebCore::SelectorCompiler::solveBacktrackingAction): (WebCore::SelectorCompiler::requiresAdjacentTail): (WebCore::SelectorCompiler::requiresDescendantTail): (WebCore::SelectorCompiler::SelectorCodeGenerator::computeBacktrackingInformation): (WebCore::SelectorCompiler::testIsElementFlagOnNode): (WebCore::SelectorCompiler::SelectorCodeGenerator::generateWalkToParentElement): (WebCore::SelectorCompiler::SelectorCodeGenerator::generateParentElementTreeWalker): (WebCore::SelectorCompiler::SelectorCodeGenerator::generateAncestorTreeWalker): (WebCore::SelectorCompiler::SelectorCodeGenerator::generateWalkToPreviousAdjacent): (WebCore::SelectorCompiler::SelectorCodeGenerator::generateDirectAdjacentTreeWalker): (WebCore::SelectorCompiler::SelectorCodeGenerator::generateIndirectAdjacentTreeWalker): (WebCore::SelectorCompiler::SelectorCodeGenerator::markParentElementIfResolvingStyle): (WebCore::SelectorCompiler::SelectorCodeGenerator::linkFailures): (WebCore::SelectorCompiler::SelectorCodeGenerator::generateAdjacentBacktrackingTail): (WebCore::SelectorCompiler::SelectorCodeGenerator::generateDescendantBacktrackingTail): (WebCore::SelectorCompiler::SelectorCodeGenerator::generateBacktrackingTailsIfNeeded): (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatching): (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementHasTagName): * cssjit/SelectorCompiler.h: Added. (WebCore::SelectorCompilationStatus::SelectorCompilationStatus): (WebCore::SelectorCompilationStatus::operator Status): (WebCore::SelectorCompiler::simpleSelectorCheckerFunction): (WebCore::SelectorCompiler::selectorCheckerFunctionWithCheckingContext): * dom/Element.cpp: (WebCore::Element::setChildrenAffectedByDirectAdjacentRules): (WebCore::Element::setChildrenAffectedByForwardPositionalRules): * dom/Element.h: (WebCore::Element::tagQNameMemoryOffset): (WebCore::Element::setChildrenAffectedByForwardPositionalRules): * dom/Node.h: (WebCore::Node::parentNodeMemoryOffset): (WebCore::Node::previousSiblingMemoryOffset): (WebCore::Node::nodeFlagsMemoryOffset): (WebCore::Node::flagIsElement): * dom/QualifiedName.h: (WebCore::QualifiedName::QualifiedNameImpl::localNameMemoryOffset): (WebCore::QualifiedName::QualifiedNameImpl::namespaceMemoryOffset): (WebCore::QualifiedName::implMemoryOffset): 2013-12-22 Mihnea Ovidenie [CSSRegions] Crash when trying to select content from invalid region https://bugs.webkit.org/show_bug.cgi?id=126113 Reviewed by Antti Koivisto. After fix for https://bugs.webkit.org/show_bug.cgi?id=120769, positionForPoint for a region attempts to use the associated named flow to perform its task. However, this should happen only when the region is valid. If the region is invalid, part of a dependency cycle, positionForPoint should behave as usual for a block instead of a region, otherwise it may run into an infinite loop due to cyclic dependencies and a crash will occur. This patch ensures that positionForPoint region specifie behaviour is followed only if the region is valid - not part of a dependency cycle. Test: fast/regions/selection/invalid-region-selection-crash.html * rendering/RenderRegion.cpp: (WebCore::RenderRegion::positionForPoint): 2013-12-21 Dirk Schulze Start refactoring Filter code to reuse CachedSVGDocument for clipPath https://bugs.webkit.org/show_bug.cgi?id=126069 Reviewed by Andreas Kling. Smaller refactoring of the CSS filter style resolver code. Previously the code requested the FilterOperations list from RenderStyle and compared the content in this list with an internal map. Then the resource loading was triggered. With the refactoring we do not request the list from RenderStyle anymore but rely on the hash map data entirely. * css/StyleResolver.cpp: (WebCore::StyleResolver::loadPendingSVGDocuments): * platform/graphics/filters/FilterOperation.h: 2013-12-20 Andy Estes [Mac] Soft-link WebContentAnalysis.framework https://bugs.webkit.org/show_bug.cgi?id=126102 Reviewed by Dan Bernstein. * Configurations/WebCore.xcconfig: There's no need to modify LDFLAGS now that we don't hard link against WebContentAnalysis.framework. * WebCore.xcodeproj/project.pbxproj: Removed WebContentAnalysis.framework from the 'Link Binary with Libraries' build phase. * platform/mac/ContentFilterMac.mm: Soft-linked WebContentAnalysis.framework and the WebFilterEvaluator @class. (WebCore::ContentFilter::ContentFilter): Called getWebFilterEvaluatorClass(). (WebCore::ContentFilter::isEnabled): Ditto. * platform/mac/SoftLinking.h: Added an implementation of SOFT_LINK_PRIVATE_FRAMEWORK(). 2013-12-21 Antti Koivisto Unreviewed, rolling out r160916. http://trac.webkit.org/changeset/160916 https://bugs.webkit.org/show_bug.cgi?id=126073 Roll out a temporary fix. The underlying issue was fixed. * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::AccessibilityRenderObject): (WebCore::AccessibilityRenderObject::~AccessibilityRenderObject): (WebCore::AccessibilityRenderObject::detach): (WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored): * accessibility/AccessibilityRenderObject.h: 2013-12-21 Antti Koivisto Figure out if node is focusable without requiring renderer https://bugs.webkit.org/show_bug.cgi?id=126118 Reviewed by Andreas Kling. * dom/Element.cpp: (WebCore::Element::computedStyle): Use inDocument() test instead of the attached() test. We can compute style for anything that is in document. * dom/Node.cpp: (WebCore::Node::isContentEditable): (WebCore::Node::isContentRichlyEditable): (WebCore::Node::hasEditableStyle): Use computedStyle instead of getting the style from renderer. Computed style gets constructed on demand if renderer does not exist. If it does then the existing style is used. (WebCore::Node::isEditableToAccessibility): (WebCore::Node::canStartSelection): (WebCore::Node::isRootEditableElement): (WebCore::Node::rootEditableElement): * dom/Node.h: (WebCore::Node::hasEditableStyle): (WebCore::Node::hasRichlyEditableStyle): Renamed from rendererIsEditable since these no longer require renderer. (WebCore::HTMLElement::supportsFocus): Stop calling updateStyleIfNeeded() and forcing render tree construction. 2013-12-21 Carlos Garcia Campos [SOUP] ResourceHandleSoup should use async client callbacks when client uses async callbacks https://bugs.webkit.org/show_bug.cgi?id=126006 Reviewed by Martin Robinson. This fixes WebKit2 loader client unit tests when using the network process. * platform/network/ResourceHandle.cpp: * platform/network/soup/ResourceHandleSoup.cpp: (WebCore::doRedirect): Call willSendRequestAsync on the client when usesAsyncCallbacks returns true. (WebCore::nextMultipartResponsePartCallback): Call didReceiveResponseAsync on the client when usesAsyncCallbacks returns true. (WebCore::sendRequestCallback): Ditto. (WebCore::ResourceHandle::continueWillSendRequest): Empty implementation for now because the default one asserts. (WebCore::ResourceHandle::continueDidReceiveResponse): Ditto. (WebCore::ResourceHandle::continueShouldUseCredentialStorage): Ditto. 2013-12-20 Anders Carlsson Replace yield() and pauseBriefly() with std::this_thread::yield() https://bugs.webkit.org/show_bug.cgi?id=126105 Reviewed by Sam Weinig. * platform/sql/SQLiteDatabase.cpp: (WebCore::SQLiteDatabase::interrupt): 2013-12-20 Ryosuke Niwa Assert that RootInlineBox::setLineBreakInfo should is never called on a RenderInline without line boxes https://bugs.webkit.org/show_bug.cgi?id=126101 Reviewed by Simon Fraser. Merge assertions added in https://chromium.googlesource.com/chromium/blink/+/716ac74fd475b581d69c0aa8ec2d806201c3a420 The code change was not merged since we never hit the added assertion on the attached test case in WebKit. * rendering/RootInlineBox.cpp: (WebCore::RootInlineBox::setLineBreakInfo): 2013-12-20 Joseph Pecoraro Web Inspector: Remove the references to Node in InjectedScript https://bugs.webkit.org/show_bug.cgi?id=126091 Reviewed by Timothy Hatcher. Remove the last DOM references from InjectedScript so that InjectedScript can move down into JavaScriptCore. The only remaining references were to Nodes, which are all just thin wrappers around existing functions. Move Node / JSNode (JSValue) conversion into InspectorDOMAgent, where it was used. No new tests, no observable change in functionality. * bindings/js/JSInjectedScriptHostCustom.cpp: * inspector/InjectedScript.cpp: (WebCore::InjectedScript::inspectObject): (WebCore::InjectedScript::releaseObject): * inspector/InjectedScript.h: * inspector/InjectedScriptHost.h: * inspector/InjectedScriptSource.js: * inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::focusNode): (WebCore::InspectorDOMAgent::highlightNode): (WebCore::InspectorDOMAgent::requestNode): (WebCore::InspectorDOMAgent::nodeForObjectId): (WebCore::InspectorDOMAgent::resolveNode): (WebCore::InspectorDOMAgent::scriptValueAsNode): (WebCore::InspectorDOMAgent::nodeAsScriptValue): * inspector/InspectorDOMAgent.h: * inspector/PageConsoleAgent.cpp: 2013-12-20 Myles C. Maxfield Faster implementation of text-decoration-skip: ink https://bugs.webkit.org/show_bug.cgi?id=125718 Reviewed by Simon Fraser. This new implementation of text-decoration-skip: ink extracts each glyph into a path, then decomposes each path into a series of contours. It then intersects each contour with the top and bottom of the underline (by approximating the contour with a line). It then draws underlines in between these intersection regions. Tests for text-decoration-skip: ink already exist in fast/css3-text/css3-text-decoration/text-decoration-skip * platform/graphics/Font.h: Signature of new function * platform/graphics/mac/FontMac.mm: (WebCore::GlyphIterationState::GlyphIterationState): Persistent between calls to findPathIntersections (WebCore::findIntersectionPoint): Calculates an intersection point between two lines (WebCore::findPathIntersections): Called by CGPathApply to find intersections of each contour (WebCore::Font::intersectionPoints): Function to get the places where an underline would intersect a TextRun. * rendering/InlineTextBox.cpp: (WebCore::compareTuples): Used for sorting intersection ranges (WebCore::translateIntersectionPointsToSkipInkBoundaries): Converts a sequence of intersection points to the locations where text-decoration-skip: ink should draw underlines (WebCore::drawSkipInkUnderline): Draws a sequence of short underlines (WebCore::InlineTextBox::paintDecoration): * rendering/TextPainter.cpp: (WebCore::TextPainter::intersectionPoints): Calls Font::intersectionPoints * rendering/TextPainter.h: 2013-12-20 Joseph Pecoraro Web Inspector: Give the CommandLineAPIModule its own Host object, making InjectedScriptHost viable for a JS Context https://bugs.webkit.org/show_bug.cgi?id=126082 Reviewed by Timothy Hatcher. Extract CommandLineAPIHost from InjectedScriptHost. The command line API contained a bunch of DOM specific JavaScript that would not be suitable for a pure JavaScript environment. Now that the DOM related code is in this WebCore only module, give this module a host object that WebCore will provide. No new tests, no observable change in functionality. * CMakeLists.txt: * DerivedSources.cpp: * DerivedSources.make: * GNUmakefile.list.am: * UseJSC.cmake: * WebCore.vcxproj/WebCore.vcxproj: * WebCore.vcxproj/WebCore.vcxproj.filters: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSBindingsAllInOne.cpp: Add new files. * bindings/js/JSCommandLineAPIHostCustom.cpp: Added. (WebCore::JSCommandLineAPIHost::inspectedObject): (WebCore::getJSListenerFunctions): (WebCore::JSCommandLineAPIHost::getEventListeners): (WebCore::JSCommandLineAPIHost::inspect): (WebCore::JSCommandLineAPIHost::databaseId): (WebCore::JSCommandLineAPIHost::storageId): * bindings/js/JSInjectedScriptHostCustom.cpp: * inspector/CommandLineAPIHost.cpp: Copied from Source/WebCore/inspector/InjectedScriptHost.cpp. (WebCore::CommandLineAPIHost::create): (WebCore::CommandLineAPIHost::CommandLineAPIHost): (WebCore::CommandLineAPIHost::~CommandLineAPIHost): (WebCore::CommandLineAPIHost::disconnect): (WebCore::CommandLineAPIHost::inspectImpl): (WebCore::CommandLineAPIHost::getEventListenersImpl): (WebCore::CommandLineAPIHost::clearConsoleMessages): (WebCore::CommandLineAPIHost::copyText): (WebCore::CommandLineAPIHost::InspectableObject::get): (WebCore::CommandLineAPIHost::addInspectedObject): (WebCore::CommandLineAPIHost::clearInspectedObjects): (WebCore::CommandLineAPIHost::inspectedObject): (WebCore::CommandLineAPIHost::databaseIdImpl): (WebCore::CommandLineAPIHost::storageIdImpl): * inspector/CommandLineAPIHost.h: Copied from Source/WebCore/inspector/InjectedScriptHost.h. (WebCore::CommandLineAPIHost::init): * inspector/CommandLineAPIHost.idl: Copied from Source/WebCore/inspector/InjectedScriptHost.idl. * inspector/CommandLineAPIModule.cpp: These are almost all pure copies from InjectedScriptHost files. Cleaned up a bit. * inspector/InjectedScriptModule.h: * inspector/InjectedScriptModule.cpp: (WebCore::InjectedScriptModule::ensureInjected): Modules can now define a host object when they are getting injected. (WebCore::CommandLineAPIModule::host): * inspector/CommandLineAPIModule.h: Provide a CommandLineAPIHost, host object. * inspector/InjectedScriptCanvasModule.h: * inspector/InjectedScriptCanvasModule.cpp: (WebCore::InjectedScriptCanvasModule::host): No host object is needed for the CanvasModule. * inspector/InjectedScriptSource.js: * inspector/CommandLineAPIModuleSource.js: When injecting a module, pass on an optional host object to the module's source. Move a little more code between the two files. The two files are very tightly coupled right now. * inspector/InjectedScriptHost.cpp: (WebCore::InjectedScriptHost::create): * inspector/InjectedScriptHost.h: (WebCore::InjectedScriptHost::~InjectedScriptHost): (WebCore::InjectedScriptHost::InjectedScriptHost): * inspector/InjectedScriptHost.idl: Move any command line specific logic to CommandLineAPIHost classes. * inspector/InjectedScriptManager.cpp: (WebCore::InjectedScriptManager::disconnect): * inspector/InjectedScriptManager.h: (WebCore::InjectedScriptManager::commandLineAPIHost): * inspector/InspectorConsoleAgent.cpp: (WebCore::InspectorConsoleAgent::addInspectedHeapObject): * inspector/InspectorController.cpp: (WebCore::InspectorController::InspectorController): * inspector/InspectorHeapProfilerAgent.cpp: (WebCore::InspectorHeapProfilerAgent::resetState): * inspector/InspectorProfilerAgent.cpp: (WebCore::InspectorProfilerAgent::resetState): * inspector/PageConsoleAgent.cpp: (WebCore::PageConsoleAgent::addInspectedNode): * inspector/PageInjectedScriptManager.cpp: (WebCore::PageInjectedScriptManager::PageInjectedScriptManager): (WebCore::PageInjectedScriptManager::disconnect): * inspector/PageInjectedScriptManager.h: * inspector/WorkerInspectorController.cpp: (WebCore::WorkerInspectorController::WorkerInspectorController): An InjectedScriptManager may optionally have a commandLineAPIHost object. If it does, initialize it, and send it messages. 2013-12-09 Myles C. Maxfield Allow ImageBuffer to re-use IOSurfaces https://bugs.webkit.org/show_bug.cgi?id=125477 Reviewed by Geoff Garen. This test adds a static class, ImageBufferBackingStoreCache, that vends IOSurfaces. It remembers IOSurfaces that have been returned to it until a configurable timeout. The storage used by this class is in the form of a HashMap from a bucketed size to the IOSurface. There are many other data structures that could be used, but this implementation gives a 80% hit rate on normal browsing of some example sites with Canvas and text-decoration-skip: ink. Because the buckets are fairly small (rounding the width and height up to multiples of 8), traversing the bucket contents takes on average 2 steps. Test: fast/canvas/canvas-backing-store-reuse.html * WebCore.xcodeproj/project.pbxproj: Added new caching class * platform/graphics/cg/ImageBufferBackingStoreCache.cpp: Added. (WebCore::createIOSurface): Moved from ImageBufferCG.cpp (WebCore::ImageBufferBackingStoreCache::timerFired): Forget the cache contents (WebCore::ImageBufferBackingStoreCache::schedulePurgeTimer): (WebCore::ImageBufferBackingStoreCache::get): Static getter (WebCore::ImageBufferBackingStoreCache::ImageBufferBackingStoreCache): (WebCore::ImageBufferBackingStoreCache::insertIntoCache): Memory-management creation function (WebCore::ImageBufferBackingStoreCache::takeFromCache): Memory-management deletion function (WebCore::ImageBufferBackingStoreCache::isAcceptableSurface): Does this cached IOSurface fit the bill? (WebCore::ImageBufferBackingStoreCache::tryTakeFromCache): Lookup a bucket and walk through its contents (WebCore::ImageBufferBackingStoreCache::getOrAllocate): Public function for clients who want a IOSurface from the cache (WebCore::ImageBufferBackingStoreCache::deallocate): Public function for clients to return an IOSurface to the pool * platform/graphics/cg/ImageBufferBackingStoreCache.h: Added. * platform/graphics/cg/ImageBufferCG.cpp: Update to use new cache (WebCore::ImageBuffer::ImageBuffer): (WebCore::ImageBuffer::~ImageBuffer): 2013-12-20 Simon Fraser Change "threaded scrolling" terminology to "asynchronous scrolling" https://bugs.webkit.org/show_bug.cgi?id=126094 Reviewed by Tim Horton. Rename ENABLE_THREADED_SCROLLING to ENABLE_ASYNC_SCROLLING, and change references to "main thread scrolling" to "synchronous scrolling". In a few places, functions with names like shouldUpdateScrollLayerPositionOnMainThread() were actually returning SynchronousScrollingReasons, so rename them appropriately. * WebCore.exp.in: * page/FrameView.cpp: (WebCore::FrameView::shouldUpdateCompositingLayersAfterScrolling): (WebCore::FrameView::isRubberBandInProgress): (WebCore::FrameView::requestScrollPositionUpdate): (WebCore::FrameView::updatesScrollLayerPositionOnMainThread): (WebCore::FrameView::wheelEvent): * page/Page.cpp: (WebCore::Page::synchronousScrollingReasonsAsText): * page/Page.h: * page/scrolling/ScrollingCoordinator.cpp: (WebCore::ScrollingCoordinator::create): (WebCore::ScrollingCoordinator::ScrollingCoordinator): (WebCore::ScrollingCoordinator::frameViewHasSlowRepaintObjectsDidChange): (WebCore::ScrollingCoordinator::frameViewFixedObjectsDidChange): (WebCore::ScrollingCoordinator::frameViewRootLayerDidChange): (WebCore::ScrollingCoordinator::synchronousScrollingReasons): (WebCore::ScrollingCoordinator::updateSynchronousScrollingReasons): (WebCore::ScrollingCoordinator::setForceSynchronousScrollLayerPositionUpdates): (WebCore::ScrollingCoordinator::synchronousScrollingReasonsAsText): * page/scrolling/ScrollingCoordinator.h: (WebCore::ScrollingCoordinator::shouldUpdateScrollLayerPositionSynchronously): (WebCore::ScrollingCoordinator::setSynchronousScrollingReasons): * page/scrolling/ScrollingStateFixedNode.cpp: * page/scrolling/ScrollingStateFixedNode.h: * page/scrolling/ScrollingStateNode.cpp: * page/scrolling/ScrollingStateNode.h: * page/scrolling/ScrollingStateScrollingNode.cpp: (WebCore::ScrollingStateScrollingNode::ScrollingStateScrollingNode): (WebCore::ScrollingStateScrollingNode::setSynchronousScrollingReasons): (WebCore::ScrollingStateScrollingNode::dumpProperties): * page/scrolling/ScrollingStateScrollingNode.h: Awkward "ReasonsForSynchronousScrolling" to avoid conflict with the enum called SynchronousScrollingReasons. * page/scrolling/ScrollingStateStickyNode.cpp: * page/scrolling/ScrollingStateStickyNode.h: * page/scrolling/ScrollingStateTree.cpp: * page/scrolling/ScrollingStateTree.h: * page/scrolling/ScrollingThread.cpp: * page/scrolling/ScrollingThread.h: * page/scrolling/ScrollingTree.cpp: * page/scrolling/ScrollingTree.h: * page/scrolling/ScrollingTreeNode.cpp: * page/scrolling/ScrollingTreeNode.h: * page/scrolling/ScrollingTreeScrollingNode.cpp: (WebCore::ScrollingTreeScrollingNode::ScrollingTreeScrollingNode): (WebCore::ScrollingTreeScrollingNode::updateBeforeChildren): * page/scrolling/ScrollingTreeScrollingNode.h: (WebCore::ScrollingTreeScrollingNode::synchronousScrollingReasons): (WebCore::ScrollingTreeScrollingNode::shouldUpdateScrollLayerPositionSynchronously): * page/scrolling/mac/ScrollingCoordinatorMac.h: * page/scrolling/mac/ScrollingCoordinatorMac.mm: (WebCore::ScrollingCoordinatorMac::setSynchronousScrollingReasons): (WebCore::ScrollingCoordinatorMac::commitTreeState): * page/scrolling/mac/ScrollingStateNodeMac.mm: * page/scrolling/mac/ScrollingStateScrollingNodeMac.mm: * page/scrolling/mac/ScrollingThreadMac.mm: * page/scrolling/mac/ScrollingTreeFixedNode.h: * page/scrolling/mac/ScrollingTreeFixedNode.mm: * page/scrolling/mac/ScrollingTreeScrollingNodeMac.h: * page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm: (WebCore::ScrollingTreeScrollingNodeMac::updateBeforeChildren): (WebCore::ScrollingTreeScrollingNodeMac::scrollPosition): (WebCore::ScrollingTreeScrollingNodeMac::setScrollPositionWithoutContentEdgeConstraints): (WebCore::ScrollingTreeScrollingNodeMac::setScrollLayerPosition): (WebCore::logThreadedScrollingMode): * page/scrolling/mac/ScrollingTreeStickyNode.h: * page/scrolling/mac/ScrollingTreeStickyNode.mm: * platform/Scrollbar.cpp: (WebCore::Scrollbar::supportsUpdateOnSecondaryThread): * platform/graphics/TiledBacking.h: * platform/graphics/ca/mac/TileController.mm: (WebCore::TileController::TileController): (WebCore::TileController::updateTileCoverageMap): * platform/mac/MemoryPressureHandlerMac.mm: (WebCore::MemoryPressureHandler::releaseMemory): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::setupFontSubpixelQuantization): * rendering/RenderLayerBacking.cpp: (WebCore::computeTileCoverage): * testing/Internals.cpp: (WebCore::Internals::mainThreadScrollingReasons): * testing/Internals.idl: 2013-12-20 Tim Horton Revert r160327, r160273, and r160260. We'll come up with something less aggressive, as this doesn't quite work. * loader/cache/CachedImage.h: * loader/cache/CachedResource.h: * loader/cache/MemoryCache.cpp: (WebCore::MemoryCache::pruneLiveResourcesToSize): * platform/graphics/BitmapImage.cpp: (WebCore::BitmapImage::destroyDecodedDataIfNecessary): * platform/graphics/BitmapImage.h: * platform/graphics/Image.h: 2013-12-20 Anders Carlsson PostAttachCallbackDisabler should take a Document https://bugs.webkit.org/show_bug.cgi?id=126090 Reviewed by Andreas Kling. suspendPostAttachCallbacks and resumePostAttachCallbacks always only get the document from the container node, so make them static member functions that take a Document&. Also, move PostAttachCallbackDisabler to Element.h in preparation for moving post attach callback handling to Element. * dom/ContainerNode.cpp: (WebCore::ContainerNode::suspendPostAttachCallbacks): (WebCore::ContainerNode::resumePostAttachCallbacks): * dom/ContainerNode.h: * dom/Element.h: (WebCore::PostAttachCallbackDisabler::PostAttachCallbackDisabler): (WebCore::PostAttachCallbackDisabler::~PostAttachCallbackDisabler): * style/StyleResolveTree.cpp: (WebCore::Style::attachRenderTree): 2013-12-20 Anders Carlsson Move scheduleSetNeedsStyleRecalc to HTMLFrameOwnerElement https://bugs.webkit.org/show_bug.cgi?id=126083 Reviewed by Antti Koivisto. scheduleSetNeedsStyleRecalc is only ever called on HTMLFrameOwnerElement, so move it there, remove the Node implementation and make it non-virtual. * dom/ContainerNode.cpp: * dom/ContainerNode.h: * dom/Node.h: * html/HTMLFrameOwnerElement.cpp: (WebCore::needsStyleRecalcCallback): (WebCore::HTMLFrameOwnerElement::scheduleSetNeedsStyleRecalc): * html/HTMLFrameOwnerElement.h: 2013-12-20 Andy Estes Remove an unneeded include of WebCoreSystemInterface.h. Rubber-stamped by Dan Bernstein. * platform/mac/ContentFilterMac.mm: 2013-12-20 Anders Carlsson Node post attach callbacks should use references https://bugs.webkit.org/show_bug.cgi?id=126081 Reviewed by Antti Koivisto. * dom/ContainerNode.cpp: (WebCore::ContainerNode::queuePostAttachCallback): (WebCore::ContainerNode::dispatchPostAttachCallbacks): (WebCore::needsStyleRecalcCallback): (WebCore::ContainerNode::scheduleSetNeedsStyleRecalc): * dom/ContainerNode.h: * html/HTMLFormControlElement.cpp: (WebCore::focusPostAttach): (WebCore::HTMLFormControlElement::didAttachRenderers): (WebCore::updateFromElementCallback): (WebCore::HTMLFormControlElement::didRecalcStyle): * html/HTMLPlugInImageElement.cpp: (WebCore::HTMLPlugInImageElement::didAttachRenderers): (WebCore::HTMLPlugInImageElement::updateWidgetCallback): (WebCore::HTMLPlugInImageElement::startLoadingImageCallback): * html/HTMLPlugInImageElement.h: 2013-12-20 Joseph Pecoraro Web Inspector: Extract CommandLineAPI into its own InjectedScriptModule https://bugs.webkit.org/show_bug.cgi?id=126038 Reviewed by Timothy Hatcher. Only inject the CommandLineAPIModule once, when the InjectedScript is first created. This avoids running a small snippet of JavaScript to check if the module is loaded every time we fetch the InjectedScript. * CMakeLists.txt: * GNUmakefile.list.am: * WebCore.vcxproj/WebCore.vcxproj: * WebCore.vcxproj/WebCore.vcxproj.filters: * WebCore.xcodeproj/project.pbxproj: * inspector/InspectorAllInOne.cpp: Add new files to the build. * inspector/InjectedScriptManager.h: * inspector/InjectedScriptManager.cpp: (WebCore::InjectedScriptManager::createForPage): (WebCore::InjectedScriptManager::injectedScriptFor): (WebCore::InjectedScriptManager::didCreateInjectedScript): Add didCreateInjectedScript hook for a subclass to inject more scripts. * inspector/PageInjectedScriptManager.h: Added. * inspector/PageInjectedScriptManager.cpp: Added. (WebCore::PageInjectedScriptManager::didCreateInjectedScript): For pages, inject the CommandLineAPIModule. * inspector/PageRuntimeAgent.cpp: (WebCore::PageRuntimeAgent::injectedScriptForEval): This is replaced by PageInjectedScriptManager, we no longer need to do extra work every time we fetch the injectedScriptForEval. 2013-12-20 Joseph Pecoraro Web Inspector: Extract CommandLineAPI into its own InjectedScriptModule https://bugs.webkit.org/show_bug.cgi?id=126038 Reviewed by Timothy Hatcher. No tests, no observable change in behavior. Move the CommandLineAPI source into its own module. Load the module in InjectedScripts for WebCore::Pages. Not for workers. Moving CommandLineAPI into it's own module moves it from being inside the same anonymous function to being evaluated outside the anonymous function. To connect the two InjectedScript passes itself to the injected module, and the CommandLineAPI module places its class on the injectedScript as injectedScript.CommandLineAPI. This essentially makes the CommandLineAPI module an InjectedScript extension. InjectedScriptSource checks for the existence of this.CommandLineAPI to see if the fuller version is available. Otherwise it falls back to a BasicCommandLineAPI which only exposes "$_", which is the "last evaluated result". That will be useful for JS Contexts and Workers. At the same time, this patch makes InjectedScriptModule more generic, to support being used in a pure JavaScript environment, meaning one without "window" as the global object. * CMakeLists.txt: * DerivedSources.make: * GNUmakefile.am: * GNUmakefile.list.am: * WebCore.vcxproj/WebCore.vcxproj: * WebCore.vcxproj/WebCore.vcxproj.filters: * WebCore.xcodeproj/project.pbxproj: * inspector/InspectorAllInOne.cpp: Add files. Minify the CommandLineAPIModuleSource in generation. * inspector/CommandLineAPIModule.h: Added. * inspector/CommandLineAPIModule.cpp: Added. (WebCore::CommandLineAPIModule::CommandLineAPIModule): (WebCore::CommandLineAPIModule::injectIfNeeded): (WebCore::CommandLineAPIModule::source): Inject the module that doesn't return an object, its just evaluated code extending the original InjectedScript. * inspector/InjectedScriptModule.h: * inspector/InjectedScriptModule.cpp: (WebCore::InjectedScriptModule::ensureInjected): Only ASSERT the result was an object if the Module claims it returns an object. * inspector/InjectedScriptCanvasModule.h: (WebCore::InjectedScriptCanvasModule::returnsObject): Return an object used later to call into the CanvasModule. * inspector/PageRuntimeAgent.cpp: (WebCore::PageRuntimeAgent::injectedScriptForEval): Ensure the CommandLineAPIModule is loaded in the Page's InjectedScript. * inspector/CommandLineAPIModuleSource.js: Added. Create the CommandLineAPI class and place it on injectedScript. * inspector/InjectedScriptSource.js: (InjectedScript.prototype._evaluateOn): Inject either the BasicCommandLineAPI or extended CommandLineAPI. Derive the globalObject dynamically instead of assuming window. Inject the commandLineAPI on window.console or the globalObject based on context. Audit and rename uses of "window" to something like globalObject. 2013-12-20 Tim Horton WebKit2 View Gestures: Implement smartMagnifyWithEvent: and make it work https://bugs.webkit.org/show_bug.cgi?id=125752 Reviewed by Anders Carlsson. * WebCore.exp.in: Add some exports. 2013-12-20 Antti Koivisto http/tests/misc/object-image-error.html asserts https://bugs.webkit.org/show_bug.cgi?id=126074 Reviewed by Andreas Kling. * html/HTMLPlugInImageElement.cpp: (WebCore::HTMLPlugInImageElement::didAttachRenderers): (WebCore::HTMLPlugInImageElement::updateWidgetCallback): (WebCore::HTMLPlugInImageElement::startLoadingImage): (WebCore::HTMLPlugInImageElement::startLoadingImageCallback): * html/HTMLPlugInImageElement.h: Start image load from post-attach so we don't re-enter attach when image load fails synchronously. 2013-12-20 Antti Koivisto Crashes in AccessibilityRenderObject::computeAccessibilityIsIgnored() https://bugs.webkit.org/show_bug.cgi?id=126073 Reviewed by Ryosuke Niwa. Prevent the crash and try to catch in debug why it is happening. * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::AccessibilityRenderObject): (WebCore::AccessibilityRenderObject::~AccessibilityRenderObject): (WebCore::AccessibilityRenderObject::detach): (WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored): * accessibility/AccessibilityRenderObject.h: 2013-12-20 Antti Koivisto Fix asserting accesibility tests. * html/HTMLElement.cpp: (WebCore::HTMLElement::supportsFocus): Accessibility code checks focus status during painting. 2013-12-20 Zan Dobersek Unreviewed GTK build fix after r160909. Remove remaining uses of AttachLazily in code specific to the GTK port. * html/shadow/MediaControlsGtk.cpp: (WebCore::MediaControlsGtk::initializeControls): (WebCore::MediaControlsGtk::createTextTrackDisplay): 2013-12-19 Antti Koivisto Create render tree lazily https://bugs.webkit.org/show_bug.cgi?id=120685 Reviewed by Andreas Kling. We currently recompute style and construct renderer for each DOM node immediately after they are added to the tree. This is often inefficient as the style may change immediately afterwards and the work needs to be redone. With this patch we always compute style and construct render tree lazily, either on style recalc timer or synchronously when they are needed. It also removes the 'attached' bit. If document has render tree then all nodes are conceptually "attached" even if this happens lazily. The patch slightly changes behavior of implicit CSS transitions. A synchronous style change during parsing may not trigger the animation anymore as laziness means we don't see anything changing. This matches Firefox and Chrome in our test cases. * WebCore.exp.in: * bindings/js/JSNodeCustom.cpp: (WebCore::JSNode::insertBefore): (WebCore::JSNode::replaceChild): (WebCore::JSNode::appendChild): All attaching is now lazy, remove AttachLazily. * css/CSSComputedStyleDeclaration.cpp: (WebCore::ComputedStyleExtractor::propertyValue): SVG renderers with !isValid() have empty display property value for some reason. Keep the behavior. * dom/ContainerNode.cpp: (WebCore::ContainerNode::insertBefore): (WebCore::ContainerNode::parserInsertBefore): (WebCore::ContainerNode::replaceChild): (WebCore::ContainerNode::appendChild): (WebCore::ContainerNode::parserAppendChild): (WebCore::ContainerNode::updateTreeAfterInsertion): * dom/ContainerNode.h: * dom/Document.cpp: (WebCore::Document::~Document): (WebCore::Document::updateStyleIfNeeded): (WebCore::Document::createRenderTree): (WebCore::Document::destroyRenderTree): Remove attach bit maintenance. (WebCore::Document::webkitDidExitFullScreenForElement): Do lazy render tree reconstruction after returning from full screen. That is the only reliable way to get the render tree back to decent shape. * dom/Element.cpp: (WebCore::Element::isFocusable): Remove pointless !renderer()->needsLayout() assert. (WebCore::Element::addShadowRoot): (WebCore::Element::childShouldCreateRenderer): (WebCore::Element::resetComputedStyle): Take care to reset computed style in all descendants. attachRenderTree no longer does this. * dom/Element.h: * dom/Node.cpp: (WebCore::Node::insertBefore): (WebCore::Node::replaceChild): (WebCore::Node::appendChild): (WebCore::Node::setNeedsStyleRecalc): Propagate ReconstructRenderTree. (WebCore::Node::attached): Emulate the behavior of old attached bit for now so existing code calling this mostly stays working. * dom/Node.h: Add new ReconstructRenderTree value for StyleChangeType. * dom/Range.cpp: (WebCore::Range::isPointInRange): (WebCore::Range::comparePoint): (WebCore::Range::compareNode): (WebCore::Range::intersectsNode): * editing/AppendNodeCommand.cpp: (WebCore::AppendNodeCommand::doApply): * editing/CompositeEditCommand.cpp: (WebCore::CompositeEditCommand::canRebalance): * editing/InsertNodeBeforeCommand.cpp: (WebCore::InsertNodeBeforeCommand::doApply): * html/HTMLDetailsElement.cpp: (WebCore::HTMLDetailsElement::didAddUserAgentShadowRoot): * html/HTMLDocument.cpp: (WebCore::HTMLDocument::activeElement): * html/HTMLElement.cpp: (WebCore::HTMLElement::setInnerText): TextControlInnerTextElement always preserves newline even if it doesn't have style yet. (WebCore::HTMLElement::supportsFocus): * html/HTMLEmbedElement.cpp: (WebCore::HTMLEmbedElement::parseAttribute): * html/HTMLFormControlElement.cpp: (WebCore::shouldAutofocus): Don't autofocus until we have renderer. * html/HTMLFormControlElementWithState.cpp: (WebCore::HTMLFormControlElementWithState::shouldSaveAndRestoreFormControlState): * html/HTMLFrameElementBase.cpp: (WebCore::HTMLFrameElementBase::didNotifySubtreeInsertions): * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::updateType): Lazy render tree construction. (WebCore::HTMLInputElement::parseAttribute): (WebCore::HTMLInputElement::defaultEventHandler): * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::parseAttribute): * html/HTMLObjectElement.cpp: (WebCore::HTMLObjectElement::parseAttribute): * html/HTMLSummaryElement.cpp: (WebCore::HTMLSummaryElement::didAddUserAgentShadowRoot): * html/parser/HTMLConstructionSite.cpp: (WebCore::executeTask): Don't attach renderer after construction. * html/parser/HTMLTreeBuilder.cpp: (WebCore::HTMLTreeBuilder::callTheAdoptionAgency): * html/shadow/ContentDistributor.cpp: (WebCore::ContentDistributor::invalidateDistribution): * html/shadow/InsertionPoint.cpp: (WebCore::InsertionPoint::willAttachRenderers): (WebCore::InsertionPoint::willDetachRenderers): * html/shadow/MediaControlElements.cpp: (WebCore::MediaControlTextTrackContainerElement::updateDisplay): * html/shadow/MediaControls.cpp: (WebCore::MediaControls::createTextTrackDisplay): * html/shadow/MediaControlsApple.cpp: (WebCore::MediaControlsApple::createControls): * html/track/TextTrackCue.cpp: (WebCore::TextTrackCue::getDisplayTree): * loader/PlaceholderDocument.cpp: (WebCore::PlaceholderDocument::createRenderTree): * loader/cache/CachedResourceLoader.cpp: (WebCore::CachedResourceLoader::preload): * style/StyleResolveTree.cpp: (WebCore::Style::attachTextRenderer): (WebCore::Style::detachTextRenderer): Remove attached bit maintenance. (WebCore::Style::attachChildren): (WebCore::Style::attachShadowRoot): (WebCore::Style::attachRenderTree): (WebCore::Style::detachShadowRoot): (WebCore::Style::detachRenderTree): (WebCore::Style::resolveLocal): * svg/SVGTests.cpp: (WebCore::SVGTests::handleAttributeChange): Make lazy. * testing/Internals.cpp: (WebCore::Internals::attached): (WebCore::Internals::elementRenderTreeAsText): (WebCore::Internals::markerAt): (WebCore::Internals::nodesFromRect): 2013-12-20 Andreas Kling Devirtualize RenderElement::setStyle(). setStyle() was only virtual in order to let RenderSVGBlock override the display type in some cases. Devirtualized it and moved the fixup logic to StyleResolver::adjustRenderStyle(). This hack had an evil twin in RenderElement::initializeStyle() that also goes away. FIXME--! Based on a Blink change by Elliott Sprehn. Reviewed by Antti Koivisto. 2013-12-20 Radu Stavila [CSS Regions] When changing flow-from/flow-into on :hover, elements overflowing the region are not correctly repainted https://bugs.webkit.org/show_bug.cgi?id=117259 Reviewed by Antti Koivisto. When computing the repaint rect for a region, the existing visual overflow must be taken into consideration. For this purpose, I overridden the visualOverflowRect method in RenderNamedFlowFragment, which ends up being called from RenderBox::clippedOverflowRectForRepaint. Test: fast/regions/hover-single-flow-from-none-overflow.html fast/regions/hover-single-flow-from-none-overflow-top.html * rendering/RenderNamedFlowFragment.cpp: (WebCore::RenderNamedFlowFragment::visualOverflowRect): * rendering/RenderNamedFlowFragment.h: 2013-12-20 Mario Sanchez Prada Programmatically-inserted children lack accessibility events https://bugs.webkit.org/show_bug.cgi?id=100275 Reviewed by Chris Fleizach. Test: accessibility/children-changed-sends-notification.html Emit children-changed::add and children-changed::remove whenever an object has been added/removed to the accessibility hierarchy, that is, when a new AtkObject is being attached/detached. * accessibility/AXObjectCache.h: (WebCore::AXObjectCache::detachWrapper): Added a new parameter and updated all the prototypes in different ports. * accessibility/AXObjectCache.cpp: (WebCore::AXObjectCache::~AXObjectCache): Call detachWrapper() specifying that we do it because the cache is being destroyed. (WebCore::AXObjectCache::remove): Call detachWrapper() specifying that we do it because an accessible element is being destroyed. * accessibility/atk/AXObjectCacheAtk.cpp: (WebCore::AXObjectCache::detachWrapper): Emit the children-changed signal when needed. We rely on the cached reference to the parent AtkObject (using the implementation of atk_object_get_parent from the AtkObject class) to find the right object to emit the signal from here, since the accessibility hierarchy from WebCore will no longer be accessible at this point. (WebCore::AXObjectCache::attachWrapper): Emit the children-change signal from here unless we are in the middle of a layout update, trying to provide as much information (e.g. the offset) as possible. (WebCore::AXObjectCache::postPlatformNotification): Make sure we update (touch) the subtree under an accessibility object whenever we receive AXChildrenChanded from WebCore, to ensure that those objects will also be visible rightaway to ATs, and that those get properly notified of the event at that very same moment. * accessibility/ios/AXObjectCacheIOS.mm: (WebCore::AXObjectCache::detachWrapper): Updated function signature. * accessibility/mac/AXObjectCacheMac.mm: (WebCore::AXObjectCache::detachWrapper): Ditto. * accessibility/win/AXObjectCacheWin.cpp: (WebCore::AXObjectCache::detachWrapper): Ditto. * accessibility/AccessibilityObject.cpp: (WebCore::AccessibilityObject::children): Add the option ot request the AccessibilityChildrenVector without updating it if needed, to avoid maybe recreating the child subtree when trying to get the offset of a newly attached element from attachWrapper. * accessibility/AccessibilityObject.h: 2013-12-20 Laszlo Vidacs Move function calls outside loop in dom https://bugs.webkit.org/show_bug.cgi?id=125916 Reviewed by Csaba Osztrogonác. Do not call length() in each iteration. * dom/Element.cpp: (WebCore::Element::cloneAttributesFromElement): * dom/Node.cpp: (WebCore::Node::dumpStatistics): 2013-12-19 Beth Dakin REGRESSION: cnn.com will continue to reveal 1 px of overhang after rubber-banding at the top https://bugs.webkit.org/show_bug.cgi?id=126054 Reviewed by Simon Fraser. This regression was caused by http://trac.webkit.org/changeset/160791 It turns out that the line of code I removed was not always a no-op. In some instances, like on cnn.com, it would ensure that our final scroll position after a rubber-band was not something within the overhang area. It was still wrong in its assumption that rubber-band is always bouncing back the spot it originated from. So this patch continues to ignore the rubber-bands origin, and instead finds the nearest point that is not in the overhang area, and scrolls to that point instead of the origin. * page/scrolling/mac/ScrollingTreeScrollingNodeMac.h: * page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm: (WebCore::ScrollingTreeScrollingNodeMac::adjustScrollPositionToBoundsIfNecessary): * platform/mac/ScrollAnimatorMac.h: * platform/mac/ScrollAnimatorMac.mm: (WebCore::ScrollAnimatorMac::adjustScrollPositionToBoundsIfNecessary): * platform/mac/ScrollElasticityController.h: * platform/mac/ScrollElasticityController.mm: (WebCore::ScrollElasticityController::snapRubberBandTimerFired): 2013-12-19 Simon Fraser Clarify the behavior of composited canvases https://bugs.webkit.org/show_bug.cgi?id=126042 Reviewed by Tim Horton. Different platforms composite 2D and 3D canvases in different ways. "Accelerated 2D" canvases, and WebGL are always set as GraphicsLayer contents. "IOSurface" canvases (Mac and iOS-only) get a compositing layer, but paint into it (because this is fast, and a convenient way to get synchronization). So make these behaviors explicit in RenderLayerBacking and RenderLayerCompositor. No behavior changes on OS X, bug fix on iOS. * rendering/RenderLayerBacking.cpp: (WebCore::canvasCompositingStrategy): (WebCore::RenderLayerBacking::updateGraphicsLayerConfiguration): (WebCore::RenderLayerBacking::containsPaintedContent): (WebCore::RenderLayerBacking::contentChanged): * rendering/RenderLayerBacking.h: * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::requiresCompositingForCanvas): 2013-12-19 Joseph Pecoraro Web Inspector: Add InspectorFrontendHost.debuggableType to let the frontend know it's backend is JavaScript or Web https://bugs.webkit.org/show_bug.cgi?id=126016 Reviewed by Timothy Hatcher. * inspector/InspectorFrontendHost.cpp: (WebCore::InspectorFrontendHost::debuggableType): * inspector/InspectorFrontendHost.h: * inspector/InspectorFrontendHost.idl: Expose the debuggableType to the frontend. In WebCore it is always a "web" type. 2013-12-19 Benjamin Poulain Add an utility class to simplify generating function calls https://bugs.webkit.org/show_bug.cgi?id=125972 Reviewed by Geoffrey Garen. FunctionCall is a little helper class to make function calls from the JIT in 3 or 4 lines. FunctionCall takes a StackAllocator, a RegisterAllocator and a function pointer. When the call is generated, the helper saves the registers as necessary, aligns the stack, does the call, restores the stack, and restore the registers. * cssjit/FunctionCall.h: Added. (WebCore::FunctionCall::FunctionCall): (WebCore::FunctionCall::setFunctionAddress): (WebCore::FunctionCall::setFirstArgument): (WebCore::FunctionCall::call): (WebCore::FunctionCall::callAndBranchOnCondition): Most test functions used with FunctionCall return a boolean. When the boolean is the sole purpose of the function call, this provides an easy way to branch on the boolean without worrying about registers. The return register is tested first, then all the saved registers are restored from the stack (which can include the return register), finally the flags are used for a jump. (WebCore::FunctionCall::prepareAndCall): (WebCore::FunctionCall::cleanupPostCall): (WebCore::FunctionCall::saveAllocatedRegisters): (WebCore::FunctionCall::restoreAllocatedRegisters): * WebCore.xcodeproj/project.pbxproj: * cssjit/FunctionCall.h: Added. (WebCore::FunctionCall::FunctionCall): (WebCore::FunctionCall::setFunctionAddress): (WebCore::FunctionCall::setFirstArgument): (WebCore::FunctionCall::call): (WebCore::FunctionCall::callAndBranchOnCondition): (WebCore::FunctionCall::prepareAndCall): (WebCore::FunctionCall::cleanupPostCall): (WebCore::FunctionCall::saveAllocatedRegisters): (WebCore::FunctionCall::restoreAllocatedRegisters): 2013-12-19 Anders Carlsson Begin stubbing out the KeyedDecoder class https://bugs.webkit.org/show_bug.cgi?id=126031 Reviewed by Andreas Kling. KeyedDecoder is going to be the new way to decode back forward trees. * history/HistoryItem.cpp: (WebCore::HistoryItem::decodeBackForwardTree): * history/HistoryItem.h: * platform/KeyedCoding.h: (WebCore::KeyedDecoder::~KeyedDecoder): 2013-12-19 Oliver Hunt DOM bindings should use thisValue for attributes https://bugs.webkit.org/show_bug.cgi?id=126011 Reviewed by Antti Koivisto. Make all standard DOM attributes use the thisValue instead of the slot object. This requires using a dynamic cast in the attribute getters. Happily for normal uses this a single indirect load and pointer compare, and we were already doing it for many attributes. Alas it's too expensive to do this on the window object still due to the proxy indirection that intercepts global variable access. I'll correct this in a follow on patch (bug 126013). A number of custom getters have also been updated to use the thisValue and full type checks. This patch still leaves the index and generic named getters on the slot based model as fixing these cases requires more complicated changes. * bindings/js/JSCSSStyleDeclarationCustom.cpp: (WebCore::cssPropertyGetterPixelOrPosPrefixCallback): (WebCore::cssPropertyGetterCallback): * bindings/js/JSPluginElementFunctions.cpp: (WebCore::pluginElementPropertyGetter): * bindings/scripts/CodeGeneratorJS.pm: (GenerateImplementation): * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp: (WebCore::jsTestActiveDOMObjectExcitingAttr): (WebCore::jsTestActiveDOMObjectConstructor): * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp: (WebCore::jsTestCustomNamedGetterConstructor): * bindings/scripts/test/JS/JSTestEventConstructor.cpp: (WebCore::jsTestEventConstructorAttr1): (WebCore::jsTestEventConstructorAttr2): (WebCore::jsTestEventConstructorConstructor): * bindings/scripts/test/JS/JSTestEventTarget.cpp: (WebCore::jsTestEventTargetConstructor): * bindings/scripts/test/JS/JSTestException.cpp: (WebCore::jsTestExceptionName): (WebCore::jsTestExceptionConstructor): * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp: (WebCore::jsTestGenerateIsReachableConstructor): * bindings/scripts/test/JS/JSTestInterface.cpp: (WebCore::jsTestInterfaceConstructorImplementsStaticReadOnlyAttr): (WebCore::jsTestInterfaceConstructorImplementsStaticAttr): (WebCore::jsTestInterfaceImplementsStr1): (WebCore::jsTestInterfaceImplementsStr2): (WebCore::jsTestInterfaceImplementsStr3): (WebCore::jsTestInterfaceImplementsNode): (WebCore::jsTestInterfaceConstructorSupplementalStaticReadOnlyAttr): (WebCore::jsTestInterfaceConstructorSupplementalStaticAttr): (WebCore::jsTestInterfaceSupplementalStr1): (WebCore::jsTestInterfaceSupplementalStr2): (WebCore::jsTestInterfaceSupplementalStr3): (WebCore::jsTestInterfaceSupplementalNode): (WebCore::jsTestInterfaceConstructor): * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp: (WebCore::jsTestMediaQueryListListenerConstructor): * bindings/scripts/test/JS/JSTestNamedConstructor.cpp: (WebCore::jsTestNamedConstructorConstructor): * bindings/scripts/test/JS/JSTestNode.cpp: (WebCore::jsTestNodeConstructor): * bindings/scripts/test/JS/JSTestObj.cpp: (WebCore::jsTestObjReadOnlyLongAttr): (WebCore::jsTestObjReadOnlyStringAttr): (WebCore::jsTestObjReadOnlyTestObjAttr): (WebCore::jsTestObjConstructorStaticReadOnlyLongAttr): (WebCore::jsTestObjConstructorStaticStringAttr): (WebCore::jsTestObjConstructorTestSubObj): (WebCore::jsTestObjTestSubObjEnabledBySettingConstructor): (WebCore::jsTestObjEnumAttr): (WebCore::jsTestObjByteAttr): (WebCore::jsTestObjOctetAttr): (WebCore::jsTestObjShortAttr): (WebCore::jsTestObjUnsignedShortAttr): (WebCore::jsTestObjLongAttr): (WebCore::jsTestObjLongLongAttr): (WebCore::jsTestObjUnsignedLongLongAttr): (WebCore::jsTestObjStringAttr): (WebCore::jsTestObjTestObjAttr): (WebCore::jsTestObjXMLObjAttr): (WebCore::jsTestObjCreate): (WebCore::jsTestObjReflectedStringAttr): (WebCore::jsTestObjReflectedIntegralAttr): (WebCore::jsTestObjReflectedUnsignedIntegralAttr): (WebCore::jsTestObjReflectedBooleanAttr): (WebCore::jsTestObjReflectedURLAttr): (WebCore::jsTestObjReflectedCustomIntegralAttr): (WebCore::jsTestObjReflectedCustomBooleanAttr): (WebCore::jsTestObjReflectedCustomURLAttr): (WebCore::jsTestObjTypedArrayAttr): (WebCore::jsTestObjAttrWithGetterException): (WebCore::jsTestObjAttrWithSetterException): (WebCore::jsTestObjStringAttrWithGetterException): (WebCore::jsTestObjStringAttrWithSetterException): (WebCore::jsTestObjCustomAttr): (WebCore::jsTestObjWithScriptStateAttribute): (WebCore::jsTestObjWithScriptExecutionContextAttribute): (WebCore::jsTestObjWithScriptStateAttributeRaises): (WebCore::jsTestObjWithScriptExecutionContextAttributeRaises): (WebCore::jsTestObjWithScriptExecutionContextAndScriptStateAttribute): (WebCore::jsTestObjWithScriptExecutionContextAndScriptStateAttributeRaises): (WebCore::jsTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttribute): (WebCore::jsTestObjWithScriptArgumentsAndCallStackAttribute): (WebCore::jsTestObjConditionalAttr1): (WebCore::jsTestObjConditionalAttr2): (WebCore::jsTestObjConditionalAttr3): (WebCore::jsTestObjConditionalAttr4Constructor): (WebCore::jsTestObjConditionalAttr5Constructor): (WebCore::jsTestObjConditionalAttr6Constructor): (WebCore::jsTestObjCachedAttribute1): (WebCore::jsTestObjCachedAttribute2): (WebCore::jsTestObjAnyAttribute): (WebCore::jsTestObjContentDocument): (WebCore::jsTestObjMutablePoint): (WebCore::jsTestObjImmutablePoint): (WebCore::jsTestObjStrawberry): (WebCore::jsTestObjStrictFloat): (WebCore::jsTestObjDescription): (WebCore::jsTestObjId): (WebCore::jsTestObjHash): (WebCore::jsTestObjReplaceableAttribute): (WebCore::jsTestObjNullableDoubleAttribute): (WebCore::jsTestObjNullableLongAttribute): (WebCore::jsTestObjNullableBooleanAttribute): (WebCore::jsTestObjNullableStringAttribute): (WebCore::jsTestObjNullableLongSettableAttribute): (WebCore::jsTestObjNullableStringValue): (WebCore::jsTestObjAttribute): (WebCore::jsTestObjAttributeWithReservedEnumType): (WebCore::jsTestObjConstructor): * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp: (WebCore::jsTestOverloadedConstructorsConstructor): * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp: (WebCore::jsTestSerializedScriptValueInterfaceValue): (WebCore::jsTestSerializedScriptValueInterfaceReadonlyValue): (WebCore::jsTestSerializedScriptValueInterfaceCachedValue): (WebCore::jsTestSerializedScriptValueInterfacePorts): (WebCore::jsTestSerializedScriptValueInterfaceCachedReadonlyValue): (WebCore::jsTestSerializedScriptValueInterfaceConstructor): * bindings/scripts/test/JS/JSTestTypedefs.cpp: (WebCore::jsTestTypedefsUnsignedLongLongAttr): (WebCore::jsTestTypedefsImmutableSerializedScriptValue): (WebCore::jsTestTypedefsConstructorTestSubObj): (WebCore::jsTestTypedefsAttrWithGetterException): (WebCore::jsTestTypedefsAttrWithSetterException): (WebCore::jsTestTypedefsStringAttrWithGetterException): (WebCore::jsTestTypedefsStringAttrWithSetterException): (WebCore::jsTestTypedefsConstructor): * bindings/scripts/test/JS/JSattribute.cpp: (WebCore::jsattributeReadonly): (WebCore::jsattributeConstructor): * bindings/scripts/test/JS/JSreadonly.cpp: (WebCore::jsreadonlyConstructor): * bridge/runtime_array.cpp: (JSC::RuntimeArray::lengthGetter): * bridge/runtime_method.cpp: (JSC::RuntimeMethod::lengthGetter): 2013-12-19 Andy Estes Remove WebFilterEvaluator wrappers from WebKitSystemInterface https://bugs.webkit.org/show_bug.cgi?id=126028 Reviewed by Anders Carlsson. It's overkill to pipe access to WebFilterEvaluator through WebKitSystemInterface. Instead, include WebFilterEvaluator.h when it exists and re-declare WebFilterEvaluator when it doesn't. WebKitSystemInterface used to soft-link WebContentAnalysis.framework since OS X 10.7 didn't contain this framework. Since we no longer support 10.7, we can now directly link against the framework. * Configurations/WebCore.xcconfig: Add /System/Library/PrivateHeaders to the system framework search path at both compile and link time so that we can find WebContentAnalysis.framework. * WebCore.exp.in: Don't export removed symbols. * WebCore.xcodeproj/project.pbxproj: Added WebContentAnalysis.framework to the 'Link Binary With Libraries' build phase. * platform/mac/ContentFilterMac.mm: Included WebFilterEvaluator.h when it exists and re-declared WebFilterEvaluator when it doesn't. (WebCore::ContentFilter::ContentFilter): Directly called a method on m_platformContentFilter rather than going through WKSI. (WebCore::ContentFilter::isEnabled): Ditto. (WebCore::ContentFilter::addData): Ditto. (WebCore::ContentFilter::finishedAddingData): Ditto. (WebCore::ContentFilter::needsMoreData): Ditto. (WebCore::ContentFilter::didBlockData): Ditto. * platform/mac/WebCoreSystemInterface.h: Removed function pointers for calling into WKSI. * platform/mac/WebCoreSystemInterface.mm: Ditto. 2013-12-19 Andreas Kling Use CascadedProperties for page and keyframe style resolution as well. Port StyleResolver's styleForKeyframe() and styleForPage() over to the new property cascading code. Neither of them care about !important or matched properties caches, so the code is very simple. Removed the old applyMatchedProperties and applyProperties code with low/high priority passes. Reviewed by Antti Koivisto. 2013-12-19 Eric Carlson tryAddEventListener uses local PassRefPtr<> https://bugs.webkit.org/show_bug.cgi?id=126001 Reviewed by Daniel Bates. * dom/Node.cpp: (WebCore::tryAddEventListener): Put PassRefPtr parameter into a local RefPtr because it is sometimes used twice. 2013-12-19 Ryosuke Niwa overflowchanged event could cause a crash https://bugs.webkit.org/show_bug.cgi?id=125978 Reviewed by Tim Horton. Made the event asynchrnous by re-using Document's event queuing ability. Also removed the infrastructure to queue up events in FrameView. Test: fast/events/overflowchanged-inside-selection-collapse-crash.html * dom/Document.cpp: (WebCore::Document::recalcStyle): (WebCore::Document::enqueueOverflowEvent): * dom/Document.h: * page/FrameView.cpp: (WebCore::FrameView::FrameView): (WebCore::FrameView::~FrameView): (WebCore::FrameView::layout): (WebCore::FrameView::performPostLayoutTasks): (WebCore::FrameView::updateOverflowStatus): * page/FrameView.h: * rendering/RenderBlock.cpp: (WebCore::OverflowEventDispatcher::~OverflowEventDispatcher): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::scrollRectToVisible): * rendering/RenderMarquee.cpp: (WebCore::RenderMarquee::start): 2013-12-19 Daniel Bates Fix the Windows build after (https://bugs.webkit.org/show_bug.cgi?id=125879) Add ENABLE(CACHE_PARTITIONING)-guard around call to ResourceRequest::setCachePartition() as this function is only compiled when building with cache partitioning enabled. * loader/cache/MemoryCache.cpp: (WebCore::MemoryCache::addImageToCache): 2013-12-19 Daniel Bates [iOS] Upstream WebCore/accessibility changes https://bugs.webkit.org/show_bug.cgi?id=125925 Reviewed by Chris Fleizach. * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::visiblePositionForPoint): Opt out of code when building for iOS. 2013-12-19 Alex Christensen [WinCairo] Compile fix for VS2013 when using ACCELERATED_COMPOSITING. https://bugs.webkit.org/show_bug.cgi?id=124866 Reviewed by Darin Adler. * platform/graphics/TiledBackingStore.cpp: (WebCore::TiledBackingStore::TiledBackingStore): * platform/graphics/TiledBackingStore.h: Added constructor overload to avoid compile errors from using MSVC's make_unique as a default parameter. 2013-12-19 Daniel Bates [iOS] Upstream WebCore/loader changes https://bugs.webkit.org/show_bug.cgi?id=125879 Reviewed by Darin Adler. * WebCore.exp.in: Added symbols for MemoryCache::{addImageToCache, removeImageFromCache}(). * loader/DocumentLoader.cpp: (WebCore::areAllLoadersPageCacheAcceptable): Added. (WebCore::DocumentLoader::DocumentLoader): Initialize m_subresourceLoadersArePageCacheAcceptable. (WebCore::DocumentLoader::stopLoading): Modified to conditionally call areAllLoadersPageCacheAcceptable(). (WebCore::DocumentLoader::handleSubstituteDataLoadSoon): Modified to query FrameLoader::loadsSynchronously() whether to load substitute data immediately or to schedule a load. (WebCore::DocumentLoader::responseReceived): Modified to create a content filer when the response protocol is either HTTP or HTTPS, assuming content filtering is enabled. (WebCore::DocumentLoader::dataReceived): Modified to call DocumentLoader::setContentFilterForBlockedLoad() as appropriate. (WebCore::DocumentLoader::clearMainResourceLoader): Added PLATFORM(IOS)-guarded code. Also added a FIXME comment to remove the PLATFORM(IOS)-guard once we upstream the iOS changes to ResourceRequest.h. (WebCore::DocumentLoader::setResponseMIMEType): Added; guard by PLATFORM(IOS). Also added FIXME comment. (WebCore::DocumentLoader::startLoadingMainResource): Added PLATFORM(IOS)-guarded code. Also added a FIXME comment to remove the PLATFORM(IOS)-guard once we upstream the iOS changes to ResourceRequest.h. I also substituted static NeverDestroyed<> for DEFINE_STATIC_LOCAL. (WebCore::DocumentLoader::setContentFilterForBlockedLoad): Added; guarded by USE(CONTENT_FILTERING). (WebCore::DocumentLoader::handleContentFilterRequest): Added; guarded by USE(CONTENT_FILTERING) and PLATFORM(IOS). Also added a FIXME comment to remove the PLATFORM(IOS) guard inside its function body once we upstream file ContentFilterIOS.mm and implement ContentFilter::requestUnblockAndDispatchIfSuccessful() for Mac. * loader/DocumentLoader.h: (WebCore::DocumentLoader::setResponse): Added; guard by PLATFORM(IOS). Also added a FIXME comment as this method seems to violate the encapsulation of DocumentLoader. (WebCore::DocumentLoader::subresourceLoadersArePageCacheAcceptable): Added. (WebCore::DocumentLoader::documentURL): Added; returns the URL of the document resulting from the DocumentLoader. * loader/DocumentWriter.cpp: (WebCore::DocumentWriter::createDocument): Added iOS-specific code to create a PDF document. * loader/EmptyClients.cpp: (WebCore::EmptyChromeClient::openDateTimeChooser): Opt out of compiling this code for iOS. Also substituted nullptr for 0. * loader/EmptyClients.h: * loader/FrameLoader.cpp: (WebCore::FrameLoader::FrameProgressTracker::~FrameProgressTracker): (WebCore::FrameLoader::FrameLoader): Initialize m_loadsSynchronously. (WebCore::FrameLoader::initForSynthesizedDocument): Added; guarded by PLATFORM(IOS). Also added FIXME comment. (WebCore::FrameLoader::checkCompleted): Added iOS-specific code with FIXME comment. (WebCore::FrameLoader::willLoadMediaElementURL): Added iOS-specific code. (WebCore::FrameLoader::stopForUserCancel): Added iOS-specific code and FIXME comment. (WebCore::FrameLoader::commitProvisionalLoad): Added iOS-specific code and FIXME comment. (WebCore::FrameLoader::transitionToCommitted): Opt out of ENABLE(TOUCH_EVENTS) logic when building for iOS. (WebCore::FrameLoader::didFirstLayout): Added iOS-specific code. (WebCore::FrameLoader::connectionProperties): Added; guarded by PLATFORM(IOS). (WebCore::createWindow): Added iOS-specific code and FIXME comment. * loader/FrameLoader.h: (WebCore::FrameLoader::setLoadsSynchronously): Added. (WebCore::FrameLoader::loadsSynchronously): Added. * loader/FrameLoaderClient.h: * loader/HistoryController.cpp: (WebCore::HistoryController::restoreScrollPositionAndViewState): Opt out of scroll position logic when building for iOS. (WebCore::HistoryController::replaceCurrentItem): Added. * loader/HistoryController.h: * loader/PlaceholderDocument.h: Changed access control of constructor from private to protected and removed the FINAL keyword from the class so that we can subclass PlaceholderDocument on iOS. * loader/PolicyChecker.cpp: (WebCore::PolicyChecker::checkNavigationPolicy): Added USE(QUICK_LOOK)- and USE(CONTENT_FILTERING)-guarded code. * loader/ResourceBuffer.cpp: (WebCore::ResourceBuffer::shouldUsePurgeableMemory): Added; guarded by PLATFORM(IOS). * loader/ResourceBuffer.h: * loader/ResourceLoadNotifier.cpp: (WebCore::ResourceLoadNotifier::dispatchWillSendRequest): Added USE(QUICK_LOOK)-guarded code. * loader/ResourceLoadScheduler.cpp: (WebCore::ResourceLoadScheduler::scheduleSubresourceLoad): Added iOS-specific code. (WebCore::ResourceLoadScheduler::scheduleLoad): Ditto. (WebCore::ResourceLoadScheduler::remove): Added iOS-specific code with FIXME comment. (WebCore::ResourceLoadScheduler::crossOriginRedirectReceived): Added null-check for variable oldHost. Also added iOS-specific code. (WebCore::ResourceLoadScheduler::servePendingRequests): Added iOS-specific code. * loader/ResourceLoader.cpp: (WebCore::ResourceLoader::init): Ditto. (WebCore::ResourceLoader::willSendRequest): Ditto. (WebCore::ResourceLoader::connectionProperties): Added; guarded by PLATFORM(IOS). * loader/ResourceLoader.h: (WebCore::ResourceLoader::startLoading): Added; guarded by PLATFORM(IOS). (WebCore::ResourceLoader::iOSOriginalRequest): Added; iOS-specific. * loader/SubframeLoader.cpp: (WebCore::SubframeLoader::loadPlugin): Added iOS-specific code. * loader/SubresourceLoader.cpp: (WebCore::SubresourceLoader::create): Ditto. (WebCore::SubresourceLoader::startLoading): Added; guarded by PLATFORM(IOS). (WebCore::SubresourceLoader::didFinishLoading): Added iOS-specific code. (WebCore::SubresourceLoader::willCancel): Ditto. (WebCore::SubresourceLoader::notifyDone): Ditto. (WebCore::SubresourceLoader::releaseResources): Ditto. * loader/SubresourceLoader.h: * loader/appcache/ApplicationCacheStorage.cpp: (WebCore::ApplicationCacheStorage::loadCacheGroup): Added iOS-specific code. (WebCore::ApplicationCacheStorage::loadManifestHostHashes): Ditto. (WebCore::ApplicationCacheStorage::cacheGroupForURL): Ditto. (WebCore::ApplicationCacheStorage::fallbackCacheGroupForURL): Ditto. (WebCore::ApplicationCacheStorage::calculateQuotaForOrigin): Ditto. (WebCore::ApplicationCacheStorage::calculateUsageForOrigin): Ditto. (WebCore::ApplicationCacheStorage::calculateRemainingSizeForOriginExcludingCache): Ditto. (WebCore::ApplicationCacheStorage::storeUpdatedQuotaForOrigin): Ditto. (WebCore::ApplicationCacheStorage::executeSQLCommand): Ditto. (WebCore::ApplicationCacheStorage::verifySchemaVersion): Ditto. (WebCore::ApplicationCacheStorage::openDatabase): Ditto. (WebCore::ApplicationCacheStorage::executeStatement): Ditto. (WebCore::ApplicationCacheStorage::store): Ditto. (WebCore::ApplicationCacheStorage::storeUpdatedType): Ditto. (WebCore::ApplicationCacheStorage::ensureOriginRecord): Ditto. (WebCore::ApplicationCacheStorage::loadCache): Ditto. (WebCore::ApplicationCacheStorage::remove): Ditto. (WebCore::ApplicationCacheStorage::empty): Ditto. (WebCore::ApplicationCacheStorage::storeCopyOfCache): Ditto. (WebCore::ApplicationCacheStorage::manifestURLs): Ditto. (WebCore::ApplicationCacheStorage::cacheGroupSize): Ditto. (WebCore::ApplicationCacheStorage::deleteCacheGroup): Ditto. (WebCore::ApplicationCacheStorage::vacuumDatabaseFile): Ditto. * loader/cache/CachedImage.cpp: (WebCore::CachedImage::CachedImage): Added. (WebCore::CachedImage::imageSizeForRenderer): Added iOS-specific code. (WebCore::CachedImageManual::CachedImageManual): Added; guarded by USE(CF). Also added FIXME comment to incorporate the functionality of this class into CachedImage and to remove the USE(CF)-guard once we make MemoryCache::addImageToCache() platform-independent. (WebCore::CachedImageManual::mustRevalidateDueToCacheHeaders): Added; guarded by USE(CF). * loader/cache/CachedImage.h: Removed FINAL keyword from class so that we can define derived class CachedImageManual. (WebCore::CachedImage::isManual): Added; guarded by USE(CF). Also added FIXME comment. (WebCore::CachedImageManual::addFakeClient): Added; guarded by USE(CF). (WebCore::CachedImageManual::removeFakeClient): Added; guarded by USE(CF). * loader/cache/CachedResource.cpp: (WebCore::CachedResource::load): Added iOS-specific code. * loader/cache/CachedResource.h: * loader/cache/CachedResourceLoader.cpp: (WebCore::CachedResourceLoader::loadDone): Added argument shouldPerformPostLoadActions, defaults to true. Modified to conditionally call performPostLoadActions() with respect to the argument shouldPerformPostLoadActions. (WebCore::CachedResourceLoader::preload): Added iOS-specific code. (WebCore::CachedResourceLoader::checkForPendingPreloads): Ditto. * loader/cache/CachedResourceLoader.h: * loader/cache/MemoryCache.cpp: (WebCore::memoryCache): (WebCore::MemoryCache::add): Added iOS-specific code. (WebCore::MemoryCache::revalidationFailed): Ditto. (WebCore::MemoryCache::resourceForRequest): Ditto. (WebCore::MemoryCache::addImageToCache): Added; guarded by USE(CF). Also added FIXME comment. (WebCore::MemoryCache::removeImageFromCache): Added; guarded by USE(CF). Also added FIXME comment. (WebCore::MemoryCache::pruneLiveResources): Modified to take argument shouldDestroyDecodedDataForAllLiveResources. (WebCore::MemoryCache::pruneLiveResourcesToSize): Modified to take argument shouldDestroyDecodedDataForAllLiveResources, defaults to false. When this argument is true we destroy the decoded data for all live resources from the memory cache. Such functionality is useful when the system is running low on memory. (WebCore::MemoryCache::evict): Added iOS-specific code. * loader/cache/MemoryCache.h: * loader/cf/SubresourceLoaderCF.cpp: (WebCore::SubresourceLoader::didReceiveDataArray): Actually make this code compile. In particular, there is no method called sendDataToResource on SubresourceLoader or in its class hierarchy. * loader/mac/DocumentLoaderMac.cpp: (WebCore::DocumentLoader::schedule): This method has an empty implementation when building for iOS. (WebCore::DocumentLoader::unschedule): Ditto. * platform/graphics/BitmapImage.h: Exposed decodedSize() to access the decoded size of the bitmap image. This functionality is used in MemoryCache::addImageToCache(). 2013-12-19 Jer Noble Build fix for platforms which do not define -[AVSampleBufferAudioRenderer muted]. Rubber-stamped by Eric Carlson. To work around platforms with broken AVSampleBufferAudioRenderer headers, just declare only those functions we need, and update isAvalable to bail out early if those methods are not present. * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm: 2013-12-16 Darin Adler Improve "bad parent" and "bad child list" assertions in line boxes https://bugs.webkit.org/show_bug.cgi?id=125656 Reviewed by Sam Weinig. * rendering/InlineBox.cpp: (WebCore::InlineBox::root): Use parent() function with assertions rather than using m_parent function, which skips the assertions. * rendering/RenderText.cpp: (WebCore::RenderText::removeAndDestroyTextBoxes): Call invalidateParentChildLists if we are in the optimized document-destruction code path and destroying children without removing them from their parents. * rendering/RenderTextLineBoxes.cpp: (WebCore::RenderTextLineBoxes::invalidateParentChildLists): Added. * rendering/RenderTextLineBoxes.h: Added invalidateParentChildLists. 2013-12-19 Dan Bernstein [CFNetwork] Loading stops at server redirects https://bugs.webkit.org/show_bug.cgi?id=125984 Reviewed by Anders Carlsson. * platform/network/cf/ResourceHandleCFNet.cpp: (WebCore::ResourceHandle::willSendRequest): If the client uses async callbacks, call its willSendRequestAsync callback instead if willSendRequest. 2013-12-19 Andreas Kling CascadedProperties: Deferred properties should have inline capacity. Give CascadedProperties::m_deferredProperties an inline capacity of 8 to sidestep malloc churn (0.2% of HTML5-8266 profile.) Reviewed by Antti Koivisto. 2013-12-19 Andreas Kling Two small refinements to matched properties cache. - Avoid computing the matched properties hash if we're banned from using the cache anyway. - When adding a new entry to the cache, use move semantics to avoid creating a transient copy of all the data. Reviewed by Antti Koivisto. 2013-12-19 Andreas Kling CascadedProperties should use a bitset to track property presence. Avoid zeroing out a bunch of memory in the CascadedProperties ctor by using a bitset to track whether each property is present in the cascaded set. Reviewed by Antti Koivisto. 2013-12-19 Seokju Kwon Web Inspector: Fix description of parameters in Page.setGeolocationOverride https://bugs.webkit.org/show_bug.cgi?id=125983 Reviewed by Joseph Pecoraro. No new tests, no changes in behavior. * inspector/protocol/Page.json: 2013-12-18 Jer Noble [MSE][Mac] Add AVSampleBufferRendererSynchronizer support. https://bugs.webkit.org/show_bug.cgi?id=125954 Reviewed by Eric Carlson. Instead of slaving all the various renderer's CMTimebases to one master timebase, use AVSampleBufferRenderSynchronizer, which essentially does the same thing. * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h: * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm: (WebCore::CMTimebaseEffectiveRateChangedCallback): Added; call effectiveRateChanged(). (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::MediaPlayerPrivateMediaSourceAVFObjC): Set up the synchronizer and all the observers. (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::~MediaPlayerPrivateMediaSourceAVFObjC): Tear down the same. (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::isAvailable): Require the AVSampleBufferRenderSynchronizer class. (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::playInternal): Convert Clock -> Synchronizer. (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::pauseInternal): Ditto. (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::paused): Ditto. (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::currentTimeDouble): Ditto. (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekInternal): Ditto. (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setRateDouble): Ditto. (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::ensureLayer): Ditto. (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::destroyLayer): Ditto. (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::effectiveRateChanged): Ditto. (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::addDisplayLayer): Ditto. (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::removeDisplayLayer): Ditto. (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::addAudioRenderer): Ditto. (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::removeAudioRenderer): Ditto. Drive-by fix; audio samples can't be subdivided, and video samples are rarely combined, so remove the call to CMSampleBufferCallForEachSample: * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm: (WebCore::SourceBufferPrivateAVFObjC::didProvideMediaDataForTrackID): 2013-12-18 Andreas Kling CSS: Fall back to cache-less cascade when encountering explicitly inherited value. When encountering an explicitly inherited value for a property that's not "statically inherited", drop out of the matched properties cache path immediately instead of waiting for some coincidence to trigger it later on. Fixes 3 asserting table tests: - fast/table/border-collapsing/cached-69296.html - tables/mozilla/bugs/bug27038-3.html - tables/mozilla_expected_failures/marvin/backgr_border-table-row-group.html Reviewed by Antti Koivisto. 2013-12-18 Ryosuke Niwa Crash in WebCore::LogicalSelectionOffsetCaches::LogicalSelectionOffsetCaches https://bugs.webkit.org/show_bug.cgi?id=125970 Reviewed by Antti Koivisto. The bug was caused by containingBlockForAbsolutePosition returning a non-RenderBlock render object. Fixed the bug by obtaining its containg block. Also changed the return type of containingBlockForFixedPosition, containingBlockForAbsolutePosition, containingBlockForObjectInFlow from RenderElement to RenderBlock as all callers of these functions had assumed the return value to be an instance of RenderBlock. Test: svg/text/select-text-inside-non-static-position.html * rendering/LogicalSelectionOffsetCaches.h: (WebCore::containingBlockForFixedPosition): (WebCore::containingBlockForAbsolutePosition): (WebCore::containingBlockForObjectInFlow): (WebCore::LogicalSelectionOffsetCaches::LogicalSelectionOffsetCaches): 2013-12-18 Andreas Kling Don't waste cycles on zeroing every CascadedProperties::Property. The CascadedProperties constructor already zeroes out the whole property array. Move the memset() to setDeferred() which is the only other place we create a Property. Brought to you by Instruments.app. Profile your code today! Reviewed by Antti Koivisto. 2013-12-18 Hans Muller [CSS Shapes] Simplify the BoxShape implementation https://bugs.webkit.org/show_bug.cgi?id=125548 Reviewed by Andreas Kling. Reduce BoxShape's footprint by about 2/3rds. Instead of caching the FloatRoundedRects which represent a BoxShape's shape-padding and shape-margin boundaries, compute them as needed. No new tests, this is just an internal refactoring. * rendering/shapes/BoxShape.cpp: (WebCore::BoxShape::shapeMarginLogicalBoundingBox): Now just computes the bounding box rect. (WebCore::BoxShape::shapePaddingLogicalBoundingBox): Ditto. (WebCore::BoxShape::shapeMarginBounds): Removed the caching logic. (WebCore::BoxShape::shapePaddingBounds): Ditto. (WebCore::BoxShape::getExcludedIntervals): Use the computed margin bounds, instead of the cached one. (WebCore::BoxShape::getIncludedIntervals): Ditto (padding bounds). * rendering/shapes/BoxShape.h: (WebCore::BoxShape::BoxShape): Simplified the constructor. * rendering/shapes/Shape.cpp: (WebCore::createBoxShape): (WebCore::Shape::createShape): 2013-12-17 Jer Noble [MSE][Mac] Add AVSampleBufferAudioRenderer support. https://bugs.webkit.org/show_bug.cgi?id=125905 Reviewed by Eric Carlson. On platforms which support AVSampleBufferAudioRenderer, add support for playback of audio CMSampleBufferRefs generated by AVStreamDataParser. * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h: * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm: (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::isAvailable): Require AVSampleBufferAudioRenderer. (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setVolume): Pass through to every audio renderer. (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setMuted): Ditto. (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::addAudioRenderer): Slave the renderer's timebase to the master clock. (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::removeAudioRenderer): * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h: * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm: (WebCore::SourceBufferPrivateAVFObjC::SourceBufferPrivateAVFObjC): Drive by fix; initialize m_enabledVideoTrackID. (WebCore::SourceBufferPrivateAVFObjC::~SourceBufferPrivateAVFObjC): Call destroyRenderers(). (WebCore::callProcessCodedFrameForEachSample): Drive by fix; convert the bool return to an OSErr. (WebCore::SourceBufferPrivateAVFObjC::destroyRenderers): Added; flush and destroy the audio renderers. (WebCore::SourceBufferPrivateAVFObjC::removedFromMediaSource): Call destroyRenderers(). (WebCore::SourceBufferPrivateAVFObjC::trackDidChangeEnabled): Enable or disable the audio renderer in response. (WebCore::SourceBufferPrivateAVFObjC::flushAndEnqueueNonDisplayingSamples): Added audio specific version. (WebCore::SourceBufferPrivateAVFObjC::enqueueSample): Ditto. (WebCore::SourceBufferPrivateAVFObjC::isReadyForMoreSamples): Ditto. (WebCore::SourceBufferPrivateAVFObjC::didBecomeReadyForMoreSamples): Ditto. (WebCore::SourceBufferPrivateAVFObjC::notifyClientWhenReadyForMoreSamples): Ditto. 2013-12-18 Seokju Kwon Web Inspector: Remove leftover code from InspectorController after r108965 https://bugs.webkit.org/show_bug.cgi?id=125956 Reviewed by Joseph Pecoraro. No new tests, no changes in behavior. * inspector/InspectorController.h: PostWorkerNotificationToFrontendTask was removed in r108965. 2013-12-18 Andreas Kling CSS: Add a property cascading pass to style application. Add an intermediate pass to style application where we cascade all style properties to figure out their final values before starting to build RenderStyles. This opens up various opportunities for further optimization. Reviewed by Antti Koivisto. * css/StyleResolver.cpp: (WebCore::StyleResolver::CascadedProperties::Property::Property): (WebCore::StyleResolver::CascadedProperties::CascadedProperties): (WebCore::StyleResolver::CascadedProperties::property): (WebCore::StyleResolver::CascadedProperties::set): (WebCore::StyleResolver::CascadedProperties::addStyleProperties): (WebCore::StyleResolver::CascadedProperties::addMatches): (WebCore::StyleResolver::CascadedProperties::Property::apply): Added. CascadedProperties is something of a container class that takes CSS property/value/linkMatchType as input and boils them down to the final values that will actually be used. Most properties are poked into an unfancy array where latest is greatest (unless !important, of course.) Some properties are queued up to be applied in parse order, more on that below. (WebCore::StyleResolver::applyCascadedProperties): (WebCore::StyleResolver::applyMatchedProperties): The brains of this patch. applyMatchedProperties() now creates a CascadedProperties and uses it to figure out the final values and uses applyCascadedProperties() to apply them. Deferred properties (parse order) are applied last. We may discover during property application that we won't be able to use a matched properties cache item. This happens if the effective zoom or font changes. If that happens, we start the process over, now with the cache disabled. This may need some optimization work. (WebCore::extractDirectionAndWritingMode): Directional properties ending in e.g -before or -after depend on the direction and writing mode in effect, so we must begin with resolving those properties before doing the full cascade. This is done by simply walking the set of matched properties and manually applying '-webkit-writing-mode' and 'direction'. If this starts showing up in profiles, we can easily cache some of the information in e.g RuleData to avoid the traversal here. (WebCore::elementTypeHasAppearanceFromUAStyle): To determine whether a form element is styled beyond the default UA style sheet, StyleResolver caches the border and background values from RenderStyle after applying the UA style sheet. Those values are then compared against after all style is applied and if some (platform-dependent) values differ, the element is considered "styled." This really only affects elements with -webkit-appearance values in the default UA style sheet, so this function determines if an element should take the goofy slow path for this. (WebCore::shouldApplyPropertyInParseOrder): (WebCore::StyleResolver::CascadedProperties::setDeferred): (WebCore::StyleResolver::CascadedProperties::applyDeferredProperties): Some CSS properties will write to the same RenderStyle fields when applied, so in order to maintain previous behavior, we must apply them in the order they were parsed. We accomplish this by keeping an ordered queue of such properties to apply separately after all the other properties. (WebCore::StyleResolver::CascadedProperties::setPropertyInternal): Helper for poking values into a CascadedProperties::Property. * css/StyleResolver.h: (WebCore::StyleResolver::state): Expose the StyleResolver::State so CascadedProperties can access it. 2013-12-16 Martin Robinson [GTK] [CMake] Add support for building WebKit1 https://bugs.webkit.org/show_bug.cgi?id=116377 Reviewed by Gustavo Noronha Silva. * PlatformGTK.cmake: Add a missing source required by WebKit1 to the WebCore build. 2013-12-18 Hans Muller [CSS Shapes] Simplify RectangleShape implementation https://bugs.webkit.org/show_bug.cgi?id=125536 Reviewed by Andreas Kling. Instead of caching an instance of a private FloatRoundedRect (ish) class for RectangleShape's shape-margin and shape-padding bounds, we just compute the FloatRect and radii as needed. This reduces the classes footprint a little and it simplifies the implementation. Removed the private RectangleShape::ShapeBounds class and made its cornerInterceptForWidth() method a static function. Added members for the RectangleShape constructor args, and private getters for their properties. There are no new tests because this is just an internal refactoring. * rendering/shapes/RectangleShape.cpp: (WebCore::RectangleShape::shapePaddingBounds): (WebCore::RectangleShape::shapeMarginBounds): (WebCore::ellipseXIntercept): (WebCore::ellipseYIntercept): (WebCore::RectangleShape::getExcludedIntervals): (WebCore::RectangleShape::getIncludedIntervals): (WebCore::cornerInterceptForWidth): (WebCore::RectangleShape::firstIncludedIntervalLogicalTop): (WebCore::RectangleShape::buildPath): * rendering/shapes/RectangleShape.h: (WebCore::RectangleShape::RectangleShape): (WebCore::RectangleShape::rx): (WebCore::RectangleShape::ry): (WebCore::RectangleShape::x): (WebCore::RectangleShape::y): (WebCore::RectangleShape::width): (WebCore::RectangleShape::height): * rendering/shapes/Shape.cpp: (WebCore::createCircleShape): Renamed this internal function (it was createShapeCircle) because it was inconsistent. (WebCore::createEllipseShape): Ditto. (WebCore::Shape::createShape): 2013-12-18 Benjamin Poulain Add a simple stack abstraction for x86_64 https://bugs.webkit.org/show_bug.cgi?id=125908 Reviewed by Geoffrey Garen. StackAllocator provides an abstraction to make it hard to make mistakes and protects from obvious issues at runtime. The key roles of StackAllocators are: -Provide the necessary stack alignment for function calls (only x86_64 stack for now). -Provide ways to save registers on the stack, restore or discard them as needed. -Crash at runtime if an operation would obviously cause a stack inconsistency. The way simple inconsistencies are detected is through the StackReference object returned whenever something is added on the stack. The object keeps a reference to the offset of what has been pushed. When the StackReference is used to recover the register, if the offset is different, there is a missmatch between push() and pop() after the object was pushed. * cssjit/StackAllocator.h: Added. (WebCore::StackAllocator::StackReference::StackReference): (WebCore::StackAllocator::StackReference::operator unsigned): (WebCore::StackAllocator::StackAllocator): (WebCore::StackAllocator::~StackAllocator): (WebCore::StackAllocator::push): (WebCore::StackAllocator::pop): (WebCore::StackAllocator::alignStackPreFunctionCall): (WebCore::StackAllocator::unalignStackPostFunctionCall): Those helpers provide a simple way to have a valid stack prior to a function call. Since StackAllocator knows the offset and the platform rules, it can adjust the stack if needed for x86_64. (WebCore::StackAllocator::discard): Discard a single register or the full stack. (WebCore::StackAllocator::combine): combining stacks is the way to solve branches where the stack is used differently in each case. To do that, the stack is first copied to A and B. Each branch works on its own StackAllocator copy, then the two copies are linked together to the original stack. The copies ensure the local consistency in each branch, linking the copies ensure global consistencies and that both branches end in the same stack state. (WebCore::StackAllocator::offsetToStackReference): Helper function to access the stack by address through its StackReference. (WebCore::StackAllocator::reset): 2013-12-18 Alex Christensen [WinCairo] Preparation for GStreamer on Windows. https://bugs.webkit.org/show_bug.cgi?id=125946 Reviewed by Brent Fulgham. * WebCore.vcxproj/WebCore.vcxproj: Use new GStreamer property sheets for WinCairo. * WebCore.vcxproj/WebCoreCairo.props: Include GStreamer directory. 2013-12-18 Oliver Hunt Refactor CodeGeneratorJS - Move attribute function creation out of getOwnPropertyName guard https://bugs.webkit.org/show_bug.cgi?id=125940 Reviewed by Simon Fraser. This is just a huge block move of code out from behind the ImplementationOverridesGetOwnProperty guard. * bindings/scripts/CodeGeneratorJS.pm: (GenerateImplementation): 2013-12-18 Tim Horton [iOS] Frequent ASSERT(hasOneRef()) in SharedBuffer::releasePurgeableBuffer https://bugs.webkit.org/show_bug.cgi?id=125939 Reviewed by Simon Fraser. r146082 fixed these assertions by not making a purgeable buffer if a SharedBuffer has multiple refs, but the check was put in ResourceBuffer::createPurgeableBuffer instead of down in SharedBuffer::createPurgeableBuffer. This is fine for most WebKit ports, because ResourceBuffer::createPurgeableBuffer is the only caller of SharedBuffer::createPurgeableBuffer, but causes trouble for not-quite-yet-upstreamed iOS SharedBuffer code, which adds another caller of SharedBuffer::createPurgeableBuffer. Push the early-return down into SharedBuffer::createPurgeableBuffer to ensure that all callers are protected from creating a purgeable buffer if the SharedBuffer has previously been vended elsewhere. No new tests, has no effect on the current Open Source tree. * loader/ResourceBuffer.cpp: (WebCore::ResourceBuffer::createPurgeableBuffer): * platform/SharedBuffer.cpp: (WebCore::SharedBuffer::createPurgeableBuffer): 2013-12-18 Beth Dakin Starting a momentum scroll while rubber banding can cause scrolling to jump back when the rubberband snaps https://bugs.webkit.org/show_bug.cgi?id=119507 -and corresponding- Reviewed by Simon Fraser. This line of code was added with the very first implementation of rubber-banding. As far as I can tell, it was always a belt-and-suspenders line of code that is a no-op in all normal rubber-banding. In this J-shaped scrolling case, this line of code is what causes the bug to occur because this line of code assumes that your rubber-band is always trying to take you back to the origin. * platform/mac/ScrollElasticityController.mm: (WebCore::ScrollElasticityController::snapRubberBandTimerFired): 2013-12-18 Chris Fleizach AX: make aria-hidden=false work with subtrees https://bugs.webkit.org/show_bug.cgi?id=125592 Reviewed by Mario Sanchez Prada. When a hidden object uses aria-hidden=false, that needs to apply to the entire sub-tree (not just the object with aria-hidden on it as it does now). Enabling this had the side effect of exposing non-rendered text nodes, so there's some extra checks to ensure we don't include those elements in this cases. Test: accessibility/aria-hidden-false-works-in-subtrees.html * accessibility/AXObjectCache.cpp: (WebCore::isNodeAriaVisible): * accessibility/AccessibilityNodeObject.cpp: (WebCore::AccessibilityNodeObject::computeAccessibilityIsIgnored): 2013-12-18 Oliver Hunt Simplify bindings codegen for adding getOwnPropertySlot overrides https://bugs.webkit.org/show_bug.cgi?id=125934 Reviewed by Alexey Proskuryakov. Simple refactoring no change in behavior. * bindings/scripts/CodeGeneratorJS.pm: (InstanceOverridesGetOwnPropertySlot): (PrototypeOverridesGetOwnPropertySlot): (GenerateHeader): (GenerateImplementation): 2013-12-18 Conrad Shultz AudioSessionManagerMac.cpp: kLowPowerVideoBufferSize unused before OS X 10.9 https://bugs.webkit.org/show_bug.cgi?id=125935 Reviewed by Jer Noble. * platform/audio/mac/AudioSessionManagerMac.cpp: Add __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090 guard. 2013-12-18 Joseph Pecoraro Web Inspector: Some basic DebuggerAgent cleanup https://bugs.webkit.org/show_bug.cgi?id=125901 Reviewed by Timothy Hatcher. * inspector/InspectorDebuggerAgent.h: Remove virtual from not really virtual method. * inspector/InspectorDebuggerAgent.cpp: (WebCore::InspectorDebuggerAgent::enable): (WebCore::InspectorDebuggerAgent::disable): Use member variable instead of private function. (WebCore::InspectorDebuggerAgent::setPauseOnExceptions): Inline the three lines from the private function. 2013-12-18 Martin Hodovan REGRESSION (r155536): Broken error recovery in @media at-rule https://bugs.webkit.org/show_bug.cgi?id=125637 Reviewed by Darin Adler. Error recovery in @media is broken if any of its rules misses the opening '{'. The problem is that when the parser recognises the mistake it removes only the last WHITESPACE token instead of the whole selector and tries to recover the selector again. it swallows everything until it finds the next opening bracket. thats why the '}' brackets of both subrules and even the @media rule are ignored, and the whole @media will be considered invalid. By joining the selector and its trailing whitespace the error recovery ignores the bad selector only and keep the @media rule. Test: fast/css/media-error-recovery.html * css/CSSGrammar.y.in: 2013-12-18 Chris Fleizach AX: WebKit not sending AXMenuClosed notification https://bugs.webkit.org/show_bug.cgi?id=125783 Reviewed by Mario Sanchez Prada. When an object with a role=menu is removed, we need to send out a notification informing that the menu has closed. This means detecting the right kind of destruction event for an element, because we do not want to send this notification when the entire cache is being torn down. Test: platform/mac/accessibility/aria-menu-closed-notification.html * accessibility/AXObjectCache.cpp: (WebCore::AXObjectCache::~AXObjectCache): (WebCore::AXObjectCache::remove): * accessibility/AXObjectCache.h: (WebCore::AXObjectCache::document): * accessibility/AccessibilityNodeObject.cpp: (WebCore::AccessibilityNodeObject::detach): * accessibility/AccessibilityNodeObject.h: * accessibility/AccessibilityObject.cpp: (WebCore::AccessibilityObject::detach): * accessibility/AccessibilityObject.h: * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::detach): * accessibility/AccessibilityRenderObject.h: * accessibility/AccessibilityScrollView.cpp: (WebCore::AccessibilityScrollView::detach): * accessibility/AccessibilityScrollView.h: * accessibility/mac/AXObjectCacheMac.mm: (WebCore::AXObjectCache::postPlatformNotification): 2013-12-18 Eric Carlson Do not create cue subtree just to delete it https://bugs.webkit.org/show_bug.cgi?id=125904 Reviewed by Jer Noble. No new tests, covered by existing tests. * html/track/TextTrackCue.cpp: (WebCore::TextTrackCue::setIsActive): Return early if display tree is NULL. (WebCore::TextTrackCue::removeDisplayTree): Ditto. 2013-12-17 Oliver Hunt Remove JSInlineGetOwnPropertySlot attribute as it is no longer necessary https://bugs.webkit.org/show_bug.cgi?id=125875 Reviewed by Brady Eidson. Tested this on dromaeo and acid3 (the original reason for this attribute) and it no longer provided any benefit. This makes it easier to reason about creation of getOwnPropertySlot during binding generation. * bindings/scripts/CodeGeneratorJS.pm: (GenerateHeader): (GenerateImplementation): * bindings/scripts/IDLAttributes.txt: * dom/Document.idl: * dom/Element.idl: * dom/Node.idl: 2013-12-18 Tamas Gergely Fix ASSERTION FAILED in WebCore::SVGLengthContext::determineViewport https://bugs.webkit.org/show_bug.cgi?id=120284 Reviewed by Philip Rogers. Added handling of root elements. Blink merge: https://chromium.googlesource.com/chromium/blink/+/a7dedf81eb7008276bb6854f0e46465e039788f8 SVGLengthContext::determineViewport() currently asserts that we're not resolving lengths for the topmost element, but there's nothing to prevent such calls. The patch updates determineViewport() to handle root elements geracefully (using their current viewport). It also changes the signature slightly to operate directly on a FloatSize, reducing some of the boiler-plate client code. Tests: svg/custom/svg-length-value-handled.svg svg/dom/svg-root-lengths.html * svg/SVGLengthContext.cpp: (WebCore::SVGLengthContext::convertValueFromUserUnitsToPercentage): (WebCore::SVGLengthContext::convertValueFromPercentageToUserUnits): (WebCore::SVGLengthContext::determineViewport): * svg/SVGLengthContext.h: * svg/graphics/filters/SVGFEImage.cpp: (WebCore::FEImage::platformApplySoftware): 2013-12-18 Darin Adler Additional refinement in MathMLSelectElement toggle implementation https://bugs.webkit.org/show_bug.cgi?id=125785 Reviewed by Andreas Kling. * mathml/MathMLSelectElement.cpp: (WebCore::MathMLSelectElement::defaultEventHandler): Call setDefaultHandled so this will be handled by only one element. (WebCore::MathMLSelectElement::willRespondToMouseClickEvents): Return true only when action is set to toggle, since other select elements will not respond to mouse click events. (WebCore::MathMLSelectElement::toggle): Simplified code a bit and gave local a clearer variable name. 2013-12-18 Rob Buis [CSS Shapes] Implement interpolation between keywords in basic shapes https://bugs.webkit.org/show_bug.cgi?id=125108 Reviewed by Simon Fraser. Allow blending for all center coordinates since top/left and bottom/right default to correct Length values of 0% and 100%. For mixed keyword and value positions compute the length's used for blending to percentages. This is possible since we compute the reference box bounds given the renderer. * page/animation/CSSPropertyAnimation.cpp: (WebCore::blendFunc): Pass additional RenderBox parameter. * rendering/style/BasicShapes.cpp: (WebCore::BasicShape::canBlend): Don't check circle/ellipse center anymore, but do check that both shapes use the same reference box. (WebCore::BasicShape::referenceBoxSize): Compute box dimension depending on reference box. (WebCore::BasicShapeCenterCoordinate::lengthForBlending): Convert to percentage for Bottom/Right. (WebCore::BasicShapeRectangle::blend): (WebCore::DeprecatedBasicShapeCircle::blend): (WebCore::BasicShapeCircle::blend): (WebCore::DeprecatedBasicShapeEllipse::blend): (WebCore::BasicShapeEllipse::blend): (WebCore::BasicShapePolygon::blend): (WebCore::BasicShapeInsetRectangle::blend): (WebCore::BasicShapeInset::blend): * rendering/style/BasicShapes.h: (WebCore::BasicShapeCenterCoordinate::blend): Use new lengthForBlending. 2013-12-18 Dániel Bátyai CSS: Null-pointer dereference with negative 'orphans' value. https://bugs.webkit.org/show_bug.cgi?id=125924 Reviewed by Andreas Kling. orphans and widows should be positive integer. spec link: http://www.w3.org/TR/CSS2/page.html#propdef-orphans Backported from Blink: https://codereview.chromium.org/108663009 Test: fast/css/negative-orphans-crash.html * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): 2013-12-18 Andreas Kling Make more computed style helpers return values by PassRef. Tighten yet another handful of CSS computed style helper functions to return their CSSValues by PassRef where we never return null. Reviewed by Antti Koivisto. 2013-12-18 Andreas Kling Use range for syntax in Frame and FrameView. Convert code in Frame and FrameView to use C++11's range for syntax. Reviewed by Antti Koivisto. 2013-12-18 Andreas Kling RenderElement-ize adjustForAbsoluteZoom() and friends. Make adjustForAbsoluteZoom() take a const RenderElement& instead of a RenderObject* so we can avoid the extra branch in style(). All call sites already had RenderElements. Reviewed by Antti Koivisto. 2013-12-18 Chris Fleizach AX: HTML spec change indicates @aria-required should trump @required on any element https://bugs.webkit.org/show_bug.cgi?id=122145 Reviewed by Mario Sanchez Prada. aria-required should win over the native "required" attribute. Updated tests: accessibility/aria-required.html * accessibility/AccessibilityNodeObject.cpp: (WebCore::AccessibilityNodeObject::isRequired): 2013-12-18 Carlos Garcia Campos Unreviewed. Fix make distcheck. * GNUmakefile.am: * GNUmakefile.list.am: 2013-12-18 Dániel Bátyai [soup] Fix unused parameter warnings in ResourceHandleSoup. https://bugs.webkit.org/show_bug.cgi?id=125918 Reviewed by Martin Robinson. Comment out the method parameters to avoid the warnings. No tests required. * platform/network/soup/ResourceHandleSoup.cpp: (WebCore::WebCoreSynchronousLoader::didReceiveData): 2013-12-17 Jer Noble [MSE] Periodically monitor source buffers. https://bugs.webkit.org/show_bug.cgi?id=125898 Reviewed by Eric Carlson. Test: media/media-source/media-source-monitor-source-buffers.html The MSE spec requires that the SourceBuffer Monitoring step is run periodically during playback. No specific update interval is specified so we will re-use the existing HTMLMediaElement playback progress timer to signal the media source monitoring. * html/HTMLMediaElement.cpp: (HTMLMediaElement::playbackProgressTimerFired): 2013-12-17 Jer Noble [MSE] Add per-track signalling between SourceBuffer and SourceBufferPrivate. https://bugs.webkit.org/show_bug.cgi?id=125899 Reviewed by Eric Carlson. To accommodate the future addition of audio support to MSE in the Mac port, add the concept of trackIDs to the communication between SourceBuffer and SourceBufferPrivate. The following virtual methods now take a trackID parameter: * platform/graphics/SourceBufferPrivate.h: (WebCore::SourceBufferPrivate::isReadyForMoreSamples): (WebCore::SourceBufferPrivate::stopAskingForMoreSamples): (WebCore::SourceBufferPrivate::notifyClientWhenReadyForMoreSamples): * platform/graphics/SourceBufferPrivateClient.h: (WebCore::SourceBufferPrivateClient::sourceBufferPrivateDidBecomeReadyForMoreSamples): Update overridden methods in subclasses: * Modules/mediasource/SourceBuffer.cpp: (WebCore::SourceBuffer::sourceBufferPrivateDidBecomeReadyForMoreSamples): * Modules/mediasource/SourceBuffer.h: * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h: * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm: (WebCore::SourceBufferPrivateAVFObjC::trackDidChangeEnabled): (WebCore::SourceBufferPrivateAVFObjC::isReadyForMoreSamples): * platform/mock/mediasource/MockSourceBufferPrivate.h: Change the logic in provideMediaData to update a single TrackBuffer rather than iterating over all of them: * Modules/mediasource/SourceBuffer.cpp: (WebCore::SourceBuffer::sourceBufferPrivateSeekToTime): (WebCore::SourceBuffer::appendBufferTimerFired): (WebCore::SourceBuffer::provideMediaData): 2013-12-17 Joseph Pecoraro Web Inspector: Remove InspectorAgent::hasFrontend https://bugs.webkit.org/show_bug.cgi?id=125907 Reviewed by Timothy Hatcher. Remove InspectorAgent::hasFrontend only used by InspectorInstrumentation::collectingHTMLParseErrors. However, following the single callers of that, the result is unused in the HTMLDocumentParser and HTMLTreeBuilder. So remove more stale / unused code. * html/FTPDirectoryDocument.cpp: (WebCore::FTPDirectoryDocumentParser::FTPDirectoryDocumentParser): * html/HTMLDocument.cpp: (WebCore::HTMLDocument::createParser): * html/parser/HTMLDocumentParser.cpp: (WebCore::HTMLDocumentParser::HTMLDocumentParser): * html/parser/HTMLDocumentParser.h: (WebCore::HTMLDocumentParser::create): * html/parser/HTMLTreeBuilder.cpp: (WebCore::HTMLTreeBuilder::HTMLTreeBuilder): * html/parser/HTMLTreeBuilder.h: (WebCore::HTMLTreeBuilder::create): * html/parser/TextDocumentParser.cpp: (WebCore::TextDocumentParser::TextDocumentParser): * inspector/DOMPatchSupport.cpp: (WebCore::DOMPatchSupport::patchDocument): * inspector/InspectorAgent.h: * inspector/InspectorInstrumentation.cpp: * inspector/InspectorInstrumentation.h: 2013-12-17 Joseph Pecoraro Web Inspector: Some basic InjectedScriptHost cleanup https://bugs.webkit.org/show_bug.cgi?id=125902 Reviewed by Timothy Hatcher. Remove InjectedScriptHost::scriptDebugServer. Nobody accesses the ScriptDebugServer through the injected script host. This also lets us remove the reference to the DebuggerAgent. * inspector/InjectedScriptHost.cpp: * inspector/InjectedScriptHost.h: (WebCore::InjectedScriptHost::init): * inspector/InspectorController.cpp: (WebCore::InspectorController::InspectorController): * inspector/WorkerInspectorController.cpp: (WebCore::WorkerInspectorController::WorkerInspectorController): 2013-12-17 Joseph Pecoraro Web Inspector: Remove InspectorFrontendHost.setInjectedScriptForOrigin https://bugs.webkit.org/show_bug.cgi?id=125906 Reviewed by Timothy Hatcher. Remove stale code related to a since removed feature, Inspector extensions. This allows us to remove a number of entry points into InspectorAgent. * inspector/InspectorAgent.cpp: (WebCore::InspectorAgent::InspectorAgent): (WebCore::InspectorAgent::willDestroyFrontendAndBackend): * inspector/InspectorAgent.h: (WebCore::InspectorAgent::create): Remove setInjectedScriptForOrigin and InjectedScript management. * inspector/InspectorController.cpp: (WebCore::InspectorController::InspectorController): * inspector/InspectorController.h: * inspector/InspectorFrontendHost.cpp: * inspector/InspectorFrontendHost.h: * inspector/InspectorFrontendHost.idl: Remove the API and calling through InspectorController. * inspector/InspectorInstrumentation.cpp: (WebCore::InspectorInstrumentation::didClearWindowObjectInWorldImpl): (WebCore::InspectorInstrumentation::domContentLoadedEventFiredImpl): (WebCore::InspectorInstrumentation::didCommitLoadImpl): Remove now unnecessary calls into InspectorAgent. 2013-12-17 Jer Noble Fix TimeRanges::intersectWith https://bugs.webkit.org/show_bug.cgi?id=118802 Test: TestWebKitAPI/Tests/WebCore/TimeRanges.cpp. Reviewed by Eric Carlson. * WebCore.exp.in: * WebCore.xcodeproj/project.pbxproj: * html/TimeRanges.cpp: (TimeRanges::invert): (TimeRanges::intersectWith): Merge https://chromium.googlesource.com/chromium/blink/+/f557582b6c6283a8b165514f52d01cfd98130e85 2013-12-17 Eric Carlson ASSERT setting pseudoID with registered DOMSubtreeModified listener https://bugs.webkit.org/show_bug.cgi?id=125900 Reviewed by Ryosuke Niwa. Test: fast/dom/attribute-set-before-element-in-tree.html * dom/Node.cpp: (WebCore::Node::dispatchSubtreeModifiedEvent): Return early if the node does not have a parent and does not have a DOMSubtreeModified listener. 2013-12-17 Ryosuke Niwa Remove dead code for reflected attributes from audio, video, and track elements https://bugs.webkit.org/show_bug.cgi?id=125838 Reviewed by Eric Carlson. Merge https://chromium.googlesource.com/chromium/blink/+/310514e2f0fd934975b841d463bad0cd62e6fd64 Where [Reflect] is used in the IDL, the getters and setters in C++ are only for internal convenience, and these were unused. * html/HTMLMediaElement.cpp: * html/HTMLMediaElement.h: * html/HTMLTrackElement.cpp: * html/HTMLTrackElement.h: * html/HTMLVideoElement.cpp: * html/HTMLVideoElement.h: 2013-12-17 Simon Fraser Rename "canRubberBands" to "canRubberBand" https://bugs.webkit.org/show_bug.cgi?id=125897 Reviewed by Anders Carlsson. Rename "canRubberBands" to "canRubberBand" in various places. * page/scrolling/ScrollingTree.cpp: (WebCore::ScrollingTree::setCanRubberBandState): * page/scrolling/ScrollingTree.h: 2013-12-17 Jer Noble [MSE] Update duration after appending samples, per spec. https://bugs.webkit.org/show_bug.cgi?id=125703 Reviewed by Eric Carlson. Test: media/media-source/media-source-duration-after-append.html After appending a sample, update the MediaSource duration if the sample's presentation end time is greater than the existing duration. * Modules/mediasource/SourceBuffer.cpp: (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample): * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h: * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.mm: (WebCore::MediaSourcePrivateAVFObjC::setDuration): Notify the MediaPlayer. 2013-12-17 Jer Noble [MSE][Mac] Null-deref in CMSampleBufferIsRandomAccess(). https://bugs.webkit.org/show_bug.cgi?id=125698 Reviewed by Sam Weinig. If a given CMSampleBufferRef does not have a sample attachments array (which is unlikely, but possible), CMSampleBufferGetAttachmentsArray() will return a null value. Additionally, the CMSampleBuffer documentation states that "samples are assumed to be sync samples by default", so the absence of an attachment array (or the absense of a kCMSampleAttachmentKey_NotSync entry in any of the attachment dictionaries) indicates the sample is sync. * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm: (WebCore::CMSampleBufferIsRandomAccess): 2013-12-17 Ryosuke Niwa Video element's width and height content attributes should not influence intrinsic width and height https://bugs.webkit.org/show_bug.cgi?id=125822 Reviewed by Darin Adler. Merge https://chromium.googlesource.com/chromium/blink/+/022ce34efb5b70cb964c3ca29f23c8980ffaef05 The width/height content attributes already influence specified style via HTMLVideoElement::collectStyleForPresentationAttribute, to also influence the intrinsic size has never been part of the spec: http://www.w3.org/TR/2013/WD-html51-20130528/embedded-content-0.html#dom-dim-width The test case passes in Firefox Nightly and IE11 Release Preview, but fails in Opera Presto, which has no default intrinsic size. Test: media/video-intrinsic-width-height.html * rendering/RenderVideo.cpp: (WebCore::RenderVideo::calculateIntrinsicSize): 2013-12-16 Daniel Bates [iOS] Upstream WebCore/html changes https://bugs.webkit.org/show_bug.cgi?id=125765 Reviewed by Darin Adler. * WebCore.xcodeproj/project.pbxproj: * html/Autocapitalize.cpp: Added. * html/Autocapitalize.h: Added. Also, added FIXME comment to forward declare AtomicString once we upstream more of the iOS port. * html/BaseChooserOnlyDateAndTimeInputType.cpp: (WebCore::BaseChooserOnlyDateAndTimeInputType::handleDOMActivateEvent): Opt out of code when building for iOS. * html/BaseDateAndTimeInputType.cpp: (WebCore::BaseDateAndTimeInputType::isKeyboardFocusable): Added; iOS-specific. * html/BaseDateAndTimeInputType.h: * html/FileInputType.cpp: (WebCore::FileInputType::FileInputType): Added iOS-specific code. (WebCore::FileInputType::~FileInputType): Opt out of code when building for iOS. Also, added FIXME comment. (WebCore::FileInputType::requestIcon): Ditto. (WebCore::FileInputType::filesChosen): Added; iOS-specific. (WebCore::FileInputType::displayString): Added; iOS-specific. (WebCore::FileInputType::receiveDroppedFiles): Guarded code with ENABLE(DRAG_SUPPORT). * html/FileInputType.h: * html/FormController.cpp: (WebCore::FormController::formElementsCharacterCount): Added. * html/FormController.h: * html/HTMLAppletElement.cpp: (WebCore::HTMLAppletElement::updateWidget): Opt out of code when building for iOS. * html/HTMLAreaElement.cpp: (WebCore::HTMLAreaElement::computePath): Changed argument datatype from RenderElement* to RenderObject*. Also, added FIXME comment to fix this up once we upstream iOS's DOMUIKitExtensions.{h, mm}. (WebCore::HTMLAreaElement::computeRect): Ditto. * html/HTMLAreaElement.h: * html/HTMLAttributeNames.in: Added attributes ongesture{start, change, end}, autocorrect, autocapitalize, data-youtube-id, onwebkit{currentplaybacktargetiswirelesschanged, playbacktargetavailabilitychanged}, webkit-playsinline, x-webkit-airplay, and x-webkit-wirelessvideoplaybackdisabled. * html/HTMLBodyElement.cpp: (WebCore::HTMLBodyElement::scrollLeft): Added iOS-specific code. (WebCore::HTMLBodyElement::scrollTop): Ditto. * html/HTMLCanvasElement.cpp: (WebCore::HTMLCanvasElement::HTMLCanvasElement): Added iOS-specific code and FIXME comment. (WebCore::HTMLCanvasElement::createImageBuffer): Added iOS-specific code. * html/HTMLCanvasElement.h: Added iOS-specific code and FIXME comment. * html/HTMLDocument.cpp: (WebCore::HTMLDocument::HTMLDocument): Added argument isSynthesized (default to false), which is passed through to Document::Document(), to create a synthesized document. * html/HTMLDocument.h: (WebCore::HTMLDocument::createSynthesizedDocument): Added. * html/HTMLElement.cpp: (WebCore::HTMLElement::collectStyleForPresentationAttribute): Added iOS-specific code. (WebCore::populateEventNameForAttributeLocalNameMap): Ditto. (WebCore::HTMLElement::willRespondToMouseMoveEvents): Added; iOS-specific. (WebCore::HTMLElement::willRespondToMouseWheelEvents): Added; iOS-specific. (WebCore::HTMLElement::willRespondToMouseClickEvents): Added; iOS-specific. * html/HTMLElement.h: * html/HTMLFormControlElement.cpp: Added FIXME comment to share more code with class HTMLFormElement. (WebCore::HTMLFormControlElement::autocorrect): Added; guarded by PLATFORM(IOS_AUTOCORRECT_AND_AUTOCAPITALIZE). (WebCore::HTMLFormControlElement::setAutocorrect): Added; guarded by PLATFORM(IOS_AUTOCORRECT_AND_AUTOCAPITALIZE). (WebCore::HTMLFormControlElement::autocapitalizeType): Added; guarded by PLATFORM(IOS_AUTOCORRECT_AND_AUTOCAPITALIZE). (WebCore::HTMLFormControlElement::autocapitalize): Added; guarded by PLATFORM(IOS_AUTOCORRECT_AND_AUTOCAPITALIZE). (WebCore::HTMLFormControlElement::setAutocapitalize): Added; guarded by PLATFORM(IOS_AUTOCORRECT_AND_AUTOCAPITALIZE). * html/HTMLFormControlElement.h: * html/HTMLFormElement.cpp: Added FIXME comment to share more code with class HTMLFormControlElement. (WebCore::HTMLFormElement::submitImplicitly): Modified to code to allow implicit submission of multi-input forms only if Settings::allowMultiElementImplicitSubmission() returns true. Such behavior is expected by older iOS apps. Also, changed datatype of variable submissionTriggerCount from int to unsigned because it represents a non-negative value. (WebCore::HTMLFormElement::autocorrect): Added; guarded by PLATFORM(IOS_AUTOCORRECT_AND_AUTOCAPITALIZE). (WebCore::HTMLFormElement::setAutocorrect): Added; guarded by PLATFORM(IOS_AUTOCORRECT_AND_AUTOCAPITALIZE). (WebCore::HTMLFormElement::autocapitalizeType): Added; guarded by PLATFORM(IOS_AUTOCORRECT_AND_AUTOCAPITALIZE). (WebCore::HTMLFormElement::autocapitalize): Added; guarded by PLATFORM(IOS_AUTOCORRECT_AND_AUTOCAPITALIZE). (WebCore::HTMLFormElement::setAutocapitalize): Added; guarded by PLATFORM(IOS_AUTOCORRECT_AND_AUTOCAPITALIZE). * html/HTMLFormElement.h: * html/HTMLFormElement.idl: Added iOS-specific attributes: autocorrect and autocapitalize. * html/HTMLIFrameElement.h: * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::displayString): Added; guarded by PLATFORM(IOS). (WebCore::HTMLInputElement::dateType): Added; guarded by PLATFORM(IOS). * html/HTMLInputElement.h: * html/HTMLInputElement.idl: Added iOS-specific attributes: autocorrect and autocapitalize. * html/HTMLLabelElement.cpp: (WebCore::HTMLLabelElement::willRespondToMouseClickEvents): Added iOS-specific code. * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::HTMLMediaElement): Added iOS-specific code and FIXME comment. (WebCore::HTMLMediaElement::~HTMLMediaElement): Added iOS-specific code. (WebCore::HTMLMediaElement::parseMediaPlayerAttribute): Added; iOS-specific. (WebCore::HTMLMediaElement::parseAttribute): Added iOS-specific code. (WebCore::HTMLMediaElement::insertedInto): Ditto. (WebCore::HTMLMediaElement::load): Ditto. (WebCore::HTMLMediaElement::prepareForLoad): Ditto. (WebCore::HTMLMediaElement::autoplay): Ditto. (WebCore::HTMLMediaElement::play): Ditto. (WebCore::HTMLMediaElement::playInternal): Ditto. (WebCore::HTMLMediaElement::pauseInternal): Ditto. (WebCore::HTMLMediaElement::setVolumne): Opt out of code when building for iOS. (WebCore::HTMLMediaElement::setMuted): Ditto. (WebCore::HTMLMediaElement::mediaPlayerTimeChanged): Added iOS-specific code. (WebCore::HTMLMediaElement::updateVolume): Ditto. (WebCore::HTMLMediaElement::updatePlayState): Ditto. (WebCore::HTMLMediaElement::userCancelledLoad): Added iOS-specific code and FIXME comment. (WebCore::HTMLMediaElement::resume): Added iOS-specific comment. See . (WebCore::HTMLMediaElement::deliverNotification): Added iOS-specific code. (WebCore::HTMLMediaElement::getPluginProxyParams): Added iOS-specific code. Also, changed src() to getNonEmptyURLAttribute() in the non-iOS code as their doesn't exist a method called src in this class or its superclasses. (WebCore::HTMLMediaElement::webkitShowPlaybackTargetPicker): Added; guarded by ENABLE(IOS_AIRPLAY). (WebCore::HTMLMediaElement::webkitCurrentPlaybackTargetIsWireless): Added; guarded by ENABLE(IOS_AIRPLAY). (WebCore::HTMLMediaElement::mediaPlayerCurrentPlaybackTargetIsWirelessChanged): Added; guarded by ENABLE(IOS_AIRPLAY). (WebCore::HTMLMediaElement::mediaPlayerPlaybackTargetAvailabilityChanged): Added; guarded by ENABLE(IOS_AIRPLAY). (WebCore::HTMLMediaElement::addEventListener): Added; guarded by ENABLE(IOS_AIRPLAY). (WebCore::HTMLMediaElement::removeEventListener): Added; guarded by ENABLE(IOS_AIRPLAY). (WebCore::HTMLMediaElement::enqueuePlaybackTargetAvailabilityChangedEvent): Added; guarded by ENABLE(IOS_AIRPLAY). (WebCore::HTMLMediaElement::enterFullscreen): Added iOS-specific code. (WebCore::HTMLMediaElement::exitFullscreen): Ditto. (WebCore::HTMLMediaElement::createMediaPlayer): Added ENABLE(IOS_AIRPLAY)-guarded code. (WebCore::HTMLMediaElement::userRequestsMediaLoading): Added; guarded by PLATFORM(IOS). (WebCore::HTMLMediaElement::shouldUseVideoPluginProxy): Use dot operator instead of dereference operator (->) when accessing Document::settings(). (WebCore::HTMLMediaElement::didAddUserAgentShadowRoot): Added ENABLE(PLUGIN_PROXY_FOR_VIDEO)-guarded code. * html/HTMLMediaElement.h: (WebCore::HTMLMediaElement::userGestureRequiredToShowPlaybackTargetPicker): Added; guarded by ENABLE(IOS_AIRPLAY). * html/HTMLMediaElement.idl: Added ENABLE_IOS_AIRPLAY-guarded attributes and functions:webkitCurrentPlaybackTargetIsWireless, onwebkit{currentplaybacktargetiswirelesschanged, playbacktargetavailabilitychanged}, and webkitShowPlaybackTargetPicker(). * html/HTMLMetaElement.cpp: (WebCore::HTMLMetaElement::process): Added iOS-specific code. * html/HTMLObjectElement.cpp: (WebCore::shouldNotPerformURLAdjustment): Added; iOS-specific. (WebCore::HTMLObjectElement::parametersForPlugin): Modified to call shouldNotPerformURLAdjustment() when building for iOS. * html/HTMLPlugInElement.h: * html/HTMLPlugInImageElement.cpp: (WebCore::HTMLPlugInImageElement::createRenderer): Added iOS-specific code. (WebCore::HTMLPlugInImageElement::createShadowIFrameSubtree): Added; iOS-specific. * html/HTMLPlugInImageElement.h: * html/HTMLSelectElement.cpp: (WebCore::HTMLSelectElement::usesMenuList): Added iOS-specific code. (WebCore::HTMLSelectElement::createRenderer): Ditto. (WebCore::HTMLSelectElement::childShouldCreateRenderer): Ditto. (WebCore::HTMLSelectElement::willRespondToMouseClickEvents): Added; iOS-specific. (WebCore::HTMLSelectElement::updateListBoxSelection): Added iOS-specific code. (WebCore::HTMLSelectElement::scrollToSelection): Ditto. (WebCore::HTMLSelectElement::setOptionsChangedOnRenderer): Ditto. (WebCore::HTMLSelectElement::menuListDefaultEventHandler): Opt out of code when building for iOS. (WebCore::HTMLSelectElement::defaultEventHandler): Added iOS-specific code. * html/HTMLSelectElement.h: * html/HTMLTextAreaElement.cpp: (WebCore::HTMLTextAreaElement::willRespondToMouseClickEvents): Added; iOS-specific. * html/HTMLTextAreaElement.h: * html/HTMLTextAreaElement.idl: Added iOS-specific attributes: autocorrect and autocapitalize. * html/HTMLTextFormControlElement.cpp: (WebCore::HTMLTextFormControlElement::select): Added iOS-specific code and FIXME comment. (WebCore::HTMLTextFormControlElement::setSelectionRange): Opt out of code when building for iOS. (WebCore::HTMLTextFormControlElement::hidePlaceholder): Added; guarded by PLATFORM(IOS). (WebCore::HTMLTextFormControlElement::showPlaceholderIfNecessary): Added; guarded by PLATFORM(IOS). * html/HTMLTextFormControlElement.h: * html/HTMLVideoElement.cpp: (WebCore::HTMLVideoElement::createRenderer): Fix up call to HTMLMediaElement::createRenderer(). (WebCore::HTMLVideoElement::parseAttribute): Added iOS-specific code. (WebCore::HTMLVideoElement::supportsFullscreen): Ditto. (WebCore::HTMLVideoElement::webkitWirelessVideoPlaybackDisabled): Added; guarded by ENABLE(IOS_AIRPLAY). (WebCore::HTMLVideoElement::setWebkitWirelessVideoPlaybackDisabled): Added; guarded by ENABLE(IOS_AIRPLAY). * html/HTMLVideoElement.h: * html/HTMLVideoElement.idl: Added ENABLE_IOS_AIRPLAY-guarded attribute: webkitWirelessVideoPlaybackDisabled. * html/ImageDocument.cpp: (WebCore::ImageDocument::createDocumentStructure): Added iOS-specific code. (WebCore::ImageDocument::scale): Ditto. (WebCore::ImageDocument::resizeImageToFit): Ditto. (WebCore::ImageDocument::imageClicked): Ditto. (WebCore::ImageDocument::imageFitsInWindow): Ditto. (WebCore::ImageDocument::windowSizeChanged): Ditto. * html/InputType.cpp: (WebCore::InputType::dateType): Added; guarded by PLATFORM(IOS). (WebCore::InputType::isKeyboardFocusable): Added iOS-specific code. (WebCore::InputType::displayString): Added; guarded by PLATFORM(IOS). * html/InputType.h: * html/PluginDocument.cpp: (WebCore::PluginDocumentParser::createDocumentStructure): Added iOS-specific code. * html/RangeInputType.cpp: (WebCore::RangeInputType::handleTouchEvent): Ditto. (WebCore::RangeInputType::disabledAttributeChanged): Added; iOS-specific. * html/RangeInputType.h: * html/SearchInputType.cpp: (WebCore::SearchInputType::addSearchResult): Opt out of code when building for iOS. * html/TextFieldInputType.cpp: (WebCore::TextFieldInputType::isKeyboardFocusable): Added iOS-specific code. * html/TextFieldInputType.h: * html/WebAutocapitalize.h: Added. * html/canvas/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::createImageData): Added iOS-specific code. (WebCore::CanvasRenderingContext2D::getImageData): Ditto. * html/parser/HTMLConstructionSite.h: (WebCore::HTMLConstructionSite::isTelephoneNumberParsingEnabled): Added; guarded by PLATFORM(IOS). * html/parser/HTMLParserScheduler.h: (WebCore::HTMLParserScheduler::checkForYieldBeforeToken): Added iOS-specific code. * html/parser/HTMLTreeBuilder.cpp: (WebCore::HTMLTreeBuilder::insertPhoneNumberLink): Added; guarded by PLATFORM(IOS). (WebCore::HTMLTreeBuilder::linkifyPhoneNumbers): Added; guarded by PLATFORM(IOS). (WebCore::disallowTelephoneNumberParsing): Added; guarded by PLATFORM(IOS). (WebCore::shouldParseTelephoneNumbersInNode): Added; guarded by PLATFORM(IOS). (WebCore::HTMLTreeBuilder::processCharacterBufferForInBody): Added iOS-specific code. * html/parser/HTMLTreeBuilder.h: * html/shadow/MediaControlElements.cpp: (WebCore::MediaControlClosedCaptionsTrackListElement::MediaControlClosedCaptionsTrackListElement): Guarded member initialization of m_controls with ENABLE(VIDEO_TRACK). Also added UNUSED_PARAM(event) when building with VIDEO_TRACK disabled. (WebCore::MediaControlClosedCaptionsTrackListElement::defaultEventHandler): Added UNUSED_PARAM(event) when building with VIDEO_TRACK disabled. * html/shadow/MediaControls.h: * html/shadow/SliderThumbElement.cpp: (WebCore::SliderThumbElement::SliderThumbElement): Added iOS-specific code. (WebCore::SliderThumbElement::dragFrom): Opt out of code when building for iOS. (WebCore::SliderThumbElement::willDetachRenderers): Added iOS-specific code. (WebCore::SliderThumbElement::exclusiveTouchIdentifier): Added; guarded by ENABLE(TOUCH_EVENTS) && PLATFORM(IOS). (WebCore::SliderThumbElement::setExclusiveTouchIdentifier): Added; guarded by ENABLE(TOUCH_EVENTS) && PLATFORM(IOS). (WebCore::SliderThumbElement::clearExclusiveTouchIdentifier): Added; guarded by ENABLE(TOUCH_EVENTS) && PLATFORM(IOS). (WebCore::findTouchWithIdentifier): Added; guarded by ENABLE(TOUCH_EVENTS) && PLATFORM(IOS). (WebCore::SliderThumbElement::handleTouchStart): Added; guarded by ENABLE(TOUCH_EVENTS) && PLATFORM(IOS). (WebCore::SliderThumbElement::handleTouchMove): Added; guarded by ENABLE(TOUCH_EVENTS) && PLATFORM(IOS). (WebCore::SliderThumbElement::handleTouchEndAndCancel): Added; guarded by ENABLE(TOUCH_EVENTS) && PLATFORM(IOS). (WebCore::SliderThumbElement::didAttachRenderers): Added; guarded by ENABLE(TOUCH_EVENTS) && PLATFORM(IOS). (WebCore::SliderThumbElement::handleTouchEvent): Added; guarded by ENABLE(TOUCH_EVENTS) && PLATFORM(IOS). (WebCore::SliderThumbElement::shouldAcceptTouchEvents): Added; guarded by ENABLE(TOUCH_EVENTS) && PLATFORM(IOS). (WebCore::SliderThumbElement::registerForTouchEvents): Added; guarded by ENABLE(TOUCH_EVENTS) && PLATFORM(IOS). (WebCore::SliderThumbElement::unregisterForTouchEvents): Added; guarded by ENABLE(TOUCH_EVENTS) && PLATFORM(IOS). (WebCore::SliderThumbElement::disabledAttributeChanged): Added; guarded by ENABLE(TOUCH_EVENTS) && PLATFORM(IOS). * html/shadow/SliderThumbElement.h: * html/shadow/TextControlInnerElements.cpp: (WebCore::SearchFieldResultsButtonElement::defaultEventHandler): Opt out of code when building for iOS. * html/shadow/TextControlInnerElements.h: * page/Settings.in: Added setting allowMultiElementImplicitSubmission to enable/disable multi-input implicit form submission (disabled by default). Also added FIXME comment to rename this setting to allowMultiElementImplicitFormSubmission once we upstream the iOS changes to WebView.mm. 2013-12-17 Brady Eidson DatabaseProcess: Pipe through object store IDs and transaction mode for "openTransaction" https://bugs.webkit.org/show_bug.cgi?id=125872 Reviewed by Alexey Proskuryakov. Make these enums into enum classes. Add const maximums for each enum class that might be serialized to allow for conversion later: * Modules/indexeddb/IndexedDB.h: Add cross-thread copying for these new enum classes. * platform/CrossThreadCopier.cpp: (WebCore::::copy): * platform/CrossThreadCopier.h: Adopt the new enum classes throughout the rest of WebCore: * Modules/indexeddb/IDBCursor.cpp: (WebCore::IDBCursor::continueFunction): (WebCore::IDBCursor::stringToDirection): (WebCore::IDBCursor::directionToString): * Modules/indexeddb/IDBCursor.h: * Modules/indexeddb/IDBCursorBackend.cpp: (WebCore::IDBCursorBackend::deleteFunction): * Modules/indexeddb/IDBCursorBackend.h: (WebCore::IDBCursorBackend::value): * Modules/indexeddb/IDBDatabaseBackend.cpp: (WebCore::IDBDatabaseBackend::createObjectStore): (WebCore::IDBDatabaseBackend::deleteObjectStore): (WebCore::IDBDatabaseBackend::createIndex): (WebCore::IDBDatabaseBackend::deleteIndex): (WebCore::IDBDatabaseBackend::get): (WebCore::IDBDatabaseBackend::put): (WebCore::IDBDatabaseBackend::setIndexKeys): (WebCore::IDBDatabaseBackend::openCursor): (WebCore::IDBDatabaseBackend::deleteRange): (WebCore::IDBDatabaseBackend::clearObjectStore): (WebCore::IDBDatabaseBackend::transactionStarted): (WebCore::IDBDatabaseBackend::transactionFinished): (WebCore::IDBDatabaseBackend::transactionFinishedAndAbortFired): (WebCore::IDBDatabaseBackend::transactionFinishedAndCompleteFired): (WebCore::IDBDatabaseBackend::createTransaction): (WebCore::IDBDatabaseBackend::runIntVersionChangeTransaction): (WebCore::IDBDatabaseBackend::deleteDatabase): * Modules/indexeddb/IDBDatabaseBackend.h: * Modules/indexeddb/IDBFactory.cpp: (WebCore::IDBFactory::open): (WebCore::IDBFactory::openInternal): (WebCore::IDBFactory::deleteDatabase): * Modules/indexeddb/IDBIndex.cpp: (WebCore::IDBIndex::openCursor): (WebCore::IDBIndex::openKeyCursor): * Modules/indexeddb/IDBObjectStore.cpp: (WebCore::IDBObjectStore::openCursor): * Modules/indexeddb/IDBOpenDBRequest.cpp: (WebCore::IDBOpenDBRequest::onUpgradeNeeded): * Modules/indexeddb/IDBRequest.cpp: (WebCore::IDBRequest::IDBRequest): (WebCore::IDBRequest::setResultCursor): (WebCore::IDBRequest::onSuccess): * Modules/indexeddb/IDBTransaction.cpp: (WebCore::IDBTransaction::create): (WebCore::IDBTransaction::IDBTransaction): (WebCore::IDBTransaction::stringToMode): (WebCore::IDBTransaction::modeToString): * Modules/indexeddb/IDBTransaction.h: * Modules/indexeddb/IDBTransactionBackendOperations.cpp: (WebCore::PutOperation::perform): * Modules/indexeddb/IDBTransactionCoordinator.cpp: (WebCore::IDBTransactionCoordinator::processStartedTransactions): (WebCore::IDBTransactionCoordinator::canRunTransaction): * Modules/indexeddb/IDBVersionChangeEvent.h: (WebCore::IDBVersionChangeEvent::create): (WebCore::IDBVersionChangeEvent::newVersion): * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp: (WebCore::objectStoreCursorOptions): (WebCore::indexCursorOptions): * Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.cpp: (WebCore::IDBServerConnectionLevelDB::get): (WebCore::IDBServerConnectionLevelDB::openCursor): (WebCore::IDBServerConnectionLevelDB::count): (WebCore::IDBServerConnectionLevelDB::deleteRange): (WebCore::IDBServerConnectionLevelDB::cursorPrefetchIteration): * WebCore.exp.in: 2013-12-17 Gavin Barraclough Remove PageVisibilityStateUnloaded https://bugs.webkit.org/show_bug.cgi?id=125869 Reviewed by Anders Carlsson. This is not currently supported by WebKit, remove this enum value. We can always add this back later if/when we add support for this state. * page/PageVisibilityState.cpp: (WebCore::pageVisibilityStateString): * page/PageVisibilityState.h: - removed PageVisibilityStateUnloaded 2013-12-12 Martin Robinson [GTK] [CMake] Build the plugin process against GTK+ 2 https://bugs.webkit.org/show_bug.cgi?id=116374 Reviewed by Gustavo Noronha Silva. * PlatformGTK.cmake: Split off the GTK+-dependent sources into libWebCorePlatformGTK and compile libWebCorePlatformGTK2 when WebKit2 is enabled. 2013-12-17 Alex Christensen Compile fix for WebGL on Windows without GRAPHICS_SURFACE. https://bugs.webkit.org/show_bug.cgi?id=125867 Reviewed by Martin Robinson. * platform/graphics/opengl/GLPlatformSurface.cpp: (WebCore::GLPlatformSurface::createOffScreenSurface): Protect reference to EGLOffScreenSurface with USE(GRAPHICS_SURFACE). 2013-12-17 Radu Stavila [CSS Regions] Positioned elements in regions get clipped if they fall outside the region https://bugs.webkit.org/show_bug.cgi?id=117120 Reviewed by Mihnea Ovidenie. Fixed the computing of the box decorations clip rect when having statically positioned elements inside positioned elements. The existing algorithm computed the rect in a loop running up the containing block chain and only checked for positioned elements before starting the loop. If a positioned elements was found in the middle of a loop (as would be the case with a positioned element parenting a non-positioned element), it was not correctly handled. Also changed it so the clip is only performed in the fragmentation direction as that was the original purpose of this method. Tests: fast/regions/absolute-in-relative-overflow.html fast/regions/static-in-relative-overflow.html fast/regions/sticky-border-overflow.html * rendering/RenderFlowThread.cpp: (WebCore::RenderFlowThread::decorationsClipRectForBoxInRegion): 2013-12-17 Commit Queue Unreviewed, rolling out r160717. http://trac.webkit.org/changeset/160717 https://bugs.webkit.org/show_bug.cgi?id=125863 New tests are failing, and possibly broke an existing test (Requested by ap on #webkit). * rendering/FlowThreadController.cpp: (WebCore::FlowThreadController::collectFixedPositionedLayers): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::paintFixedLayersInNamedFlows): (WebCore::RenderLayer::hitTestFixedLayersInNamedFlows): 2013-12-17 Ryosuke Niwa Invalid dir attributes should resolve to ltr https://bugs.webkit.org/show_bug.cgi?id=125830 Reviewed by Darin Adler. Merge https://chromium.googlesource.com/chromium/blink/+/2d592d1c998bec9438e421e1ce1ee6caba05a884 The dir attribute should resolve to direction: ltr by default when the attribute value is "not in a defined state": http://www.w3.org/TR/2013/WD-html51-20130528/dom.html#the-directionality Test: fast/dom/HTMLElement/set-and-clear-dir-attribute.html * html/HTMLElement.cpp: (WebCore::isLTROrRTLIgnoringCase): Extracted from HTMLElement::directionality. (WebCore::HTMLElement::collectStyleForPresentationAttribute): (WebCore::HTMLElement::directionality): 2013-12-17 Mihnea Ovidenie [CSSRegions] Incorrect repaint of fixed element with transformed parent https://bugs.webkit.org/show_bug.cgi?id=125756 Reviewed by Darin Adler. When collecting the layers for fixed positioned elements with named flow as a containing block, use layers collection at named flow layer level instead of relying on the positioned elements collection. Modified also FlowThreadController::collectFixedPositionedLayers function to always return the layers sorted by z-index, as this operation was always done at the call sites. Tests: fast/regions/repaint/fixed-in-named-flow-cb-changed.html fast/regions/repaint/fixed-in-named-flow-cb-changed2.html * rendering/FlowThreadController.cpp: (WebCore::compareZIndex): (WebCore::FlowThreadController::collectFixedPositionedLayers): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::paintFixedLayersInNamedFlows): (WebCore::RenderLayer::hitTestFixedLayersInNamedFlows): 2013-12-17 Bem Jones-Bey REGRESSION(r159166?): fast/block/float/float-with-fractional-height-vertical-lr.html, fast/block/float/float-with-fractional-height.html are failing https://bugs.webkit.org/show_bug.cgi?id=124506 Reviewed by Dirk Schulze. Floor the endpoints of the floating object interval to keep the old behavior until a better fix can be created. No new tests, fixes regression in existing tests. * rendering/FloatingObjects.cpp: (WebCore::FloatingObjects::intervalForFloatingObject): 2013-12-17 Alex Christensen [Win] Visual Studio workaround for compiling WebGL. https://bugs.webkit.org/show_bug.cgi?id=125808 Reviewed by Darin Adler. * platform/graphics/GraphicsContext3D.cpp: Don't inline outermost function to prevent Visual Studio crash. 2013-12-17 Mario Sanchez Prada [ATK] Expose accessibility objects for
,
and
https://bugs.webkit.org/show_bug.cgi?id=125857 Reviewed by Chris Fleizach. Map description lists to the newly introduced ATK roles ATK_ROLE_DESCRIPTION_LIST, ATK_ROLE_DESCRIPTION_TERM and ATK_ROLE_DESCRIPTION_VALUE, introduced in ATK 2.11.4. * accessibility/atk/WebKitAccessibleWrapperAtk.cpp: (atkRole): Do the right mapping. (webkitAccessibleGetRole): Update call to atkRole, now that it receives an AccessibilityObject* as parameter. 2013-12-17 Frédéric Wang Ensure inferred mrows for msqrt, mstyle, merror, mphantom and math. https://bugs.webkit.org/show_bug.cgi?id=124841 Reviewed by Darin Adler. Tests: mathml/presentation/inferred-mrow-baseline.html mathml/presentation/inferred-mrow-stretchy.html * css/mathml.css: make merror, mphantom and mstyle behave like an mrow. (mo, mrow, mfenced, mfrac, msub, msup, msubsup, mmultiscripts, mprescripts, none, munder, mover, munderover, msqrt, mroot, merror, mphantom, mstyle): (math, mrow, mfenced, msqrt, mroot, merror, mphantom, mstyle): * mathml/MathMLInlineContainerElement.cpp: ditto (WebCore::MathMLInlineContainerElement::createRenderer): * mathml/mathtags.in: ditto * rendering/mathml/RenderMathMLOperator.cpp: (WebCore::RenderMathMLOperator::paint): fix failure in mathml/presentation/phantom.html now that phantom can stretch operators. 2013-12-17 Simon Pena [NIX] Enable full debug builds by having ar creating thin archives https://bugs.webkit.org/show_bug.cgi?id=125850 Reviewed by Csaba Osztrogonác. By default, CMake uses ar to generate libWebCore.a with cr parameters (do not warn if the library has to be created, and replace existing files in the archive). That results in a very large file, and ar fails with sizes over 4GB. By using thin archives (the T option of ar), the generated libWebCore.a is much smaller, and can be successfully archived. As a result, we can generate a full debug build. This patch is based on Xan López's webkit.org/b/110580. * PlatformNix.cmake: Instruct cmake to invoke ar with T option. 2013-12-17 Carlos Garcia Campos Unreviewed. Update GObject DOM symbols file after r160336. * bindings/gobject/webkitdom.symbols: Add new methods exposed for VideoPlaybackQuality. 2013-12-17 Mihai Maerean Fix hit testing for divs with a hierarchy of css transformed and non-transformed elements https://bugs.webkit.org/show_bug.cgi?id=124777 Reviewed by Darin Adler. After bug #124647, the hit test will still behave incorrectly for transformed divs with non transformed siblings that are all inside a transformed element (tested by the hover-rotated-with-children-negative-z.html layout test). The fix is to not take zOffset into account during hit-testing when child layers are in the same 3D rendering context. Only when preserve3d is true, should hit-testing compute the zOffset of the layers with transformations and, when two layers overlap, to return the layer with the highest zOffset. The patch includes the work of a.renevier from https://codereview.chromium.org/79943002/ Tests: transforms/3d/hit-testing/hover-rotated-with-children-negative-z.html transforms/3d/hit-testing/negative-zoffset-hit-test.html transforms/3d/hit-testing/overlapping-layers-hit-test.html * rendering/RenderLayer.cpp: (WebCore::computeZOffset): (WebCore::RenderLayer::hitTestLayer): 2013-12-17 Carlos Garcia Campos Remove a few more guards mistakenly added in r160367 Reviewed by Martin Robinson. r160367 was too liberal in hiding APIs from the GObject DOM bindings. * Modules/battery/NavigatorBattery.idl: Expose NavigatorBattery. 2013-12-17 Benjamin Poulain Add a simple register allocator to WebCore for x86_64 https://bugs.webkit.org/show_bug.cgi?id=125771 Reviewed by Geoffrey Garen. Add a brain dead register allocator to simplify the use of registers when writting code generators. RegisterAllocator has two purposes: -make it easy to name registers properly. -make it hard to reuse a register accidentally. A helper class LocalRegister is also defined to provide an easy way to work with registers within a C++ scope. For example: LocalRegister elementPointer(allocator); assembler.load(address, elementPointer); RegisterAllocator makes no attempt at optimizing register allocations, but it reduces implicit dependencies by returning used register at the end of the queue, making it less likely they will be reused before their last instruction is executed. The current implementation only support unix x86_64, it only uses caller saved registers. * WebCore.xcodeproj/project.pbxproj: * cssjit/RegisterAllocator.h: Added. (WebCore::RegisterAllocator::allocateRegister): Provides any available register. To restrict runtime exploitation of compiler bugs, the method crashes in release if the register pool is empty. (WebCore::RegisterAllocator::reserveRegister): Reserve a particular register. (WebCore::RegisterAllocator::returnRegister): Return a previously allocated or reserved register. (WebCore::RegisterAllocator::allocatedRegisters): (WebCore::LocalRegister::LocalRegister): (WebCore::LocalRegister::~LocalRegister): (WebCore::LocalRegister::operator JSC::MacroAssembler::RegisterID): (WebCore::RegisterAllocator::RegisterAllocator): 2013-12-16 Thiago de Barros Lacerda Checking RTCPeerConnection signalingState before setting local/remoteDescription https://bugs.webkit.org/show_bug.cgi?id=125655 Reviewed by Eric Carlson. Before setting a session description RTCPeerConnection must check if it is in valid state for that SDP type. New tests: fast/mediastream/RTCPeerConnection-have-local-answer.html fast/mediastream/RTCPeerConnection-have-local-offer.html fast/mediastream/RTCPeerConnection-have-local-pranswer.html fast/mediastream/RTCPeerConnection-have-remote-offer.html fast/mediastream/RTCPeerConnection-have-remote-pranswer.html fast/mediastream/RTCPeerConnection-stable.html Modified: fast/mediastream/RTCPeerConnection-remoteDescription.html * Modules/mediastream/RTCPeerConnection.cpp: (WebCore::RTCPeerConnection::checkStateForLocalDescription): Checks if the current state of RTCPeerConnection is valid for the local SDP that is being set. (WebCore::RTCPeerConnection::checkStateForRemoteDescription): Checks if the current state of RTCPeerConnection is valid for the remote SDP that is being set. (WebCore::RTCPeerConnection::setLocalDescription): Now calls checkStateForLocalDescription prior to set the local SDP. (WebCore::RTCPeerConnection::setRemoteDescription): Now Calls checkStateForRemoteDescription prior to set the remote SDP. * Modules/mediastream/RTCPeerConnection.h: * platform/mock/RTCNotifiersMock.cpp: Adding new class to notify RTCPeerConnection about a signaling state change: SignalingStateNotifier. (WebCore::SignalingStateNotifier::SignalingStateNotifier): (WebCore::SignalingStateNotifier::fire): * platform/mock/RTCNotifiersMock.h: * platform/mock/RTCPeerConnectionHandlerMock.cpp: (WebCore::RTCPeerConnectionHandlerMock::signalingStateFromSDP): Defines the new state that RTCPeerConnection should be, according the SDP that is being set. (WebCore::RTCPeerConnectionHandlerMock::setLocalDescription): Calls signalingStateFromSDP, in order to get the new signaling state and notify RTCPeerConnection object. (WebCore::RTCPeerConnectionHandlerMock::setRemoteDescription): Ditto. * platform/mock/RTCPeerConnectionHandlerMock.h: 2013-12-16 Tim Horton Revert a mysterious and inexplicable part of http://trac.webkit.org/changeset/160685 * platform/KeyedCoding.h: (WebCore::KeyedEncoder::encodeEnum): (WebCore::KeyedEncoder::encodeObject): (WebCore::KeyedEncoder::encodeConditionalObject): (WebCore::KeyedEncoder::encodeObjects): 2013-12-16 Anders Carlsson Remove EnumClass.h from WTF https://bugs.webkit.org/show_bug.cgi?id=125820 Reviewed by Darin Adler. Replace uses of ENUM_CLASS with real enum class declarations. * Modules/webdatabase/DatabaseBasicTypes.h: * Modules/webdatabase/DatabaseError.h: * Modules/webdatabase/SQLTransactionState.h: * bindings/js/JSSubtleCryptoCustom.cpp: * bindings/js/SerializedScriptValue.cpp: * crypto/CryptoAlgorithmIdentifier.h: * crypto/CryptoAlgorithmParameters.h: * crypto/CryptoKey.h: * crypto/CryptoKeyData.h: * crypto/CryptoKeyType.h: * crypto/keys/CryptoKeyDataRSAComponents.h: * inspector/InspectorTimelineAgent.h: 2013-12-16 Tim Horton WebKit2 View Gestures: Pinching beyond the extremes doesn't animate back to the min/max https://bugs.webkit.org/show_bug.cgi?id=125750 Reviewed by Simon Fraser. * WebCore.exp.in: Export a few things so WebKit2 can use them. 2013-12-16 Joseph Pecoraro Fix some whitespace issues in inspector code https://bugs.webkit.org/show_bug.cgi?id=125814 Reviewed by Darin Adler. * inspector/protocol/DOM.json: * inspector/protocol/DOMStorage.json: * inspector/protocol/Timeline.json: 2013-12-16 Joseph Pecoraro Web Inspector: Use JSC::SourceID and JSC::BreakpointID instead of WebCore dups https://bugs.webkit.org/show_bug.cgi?id=125818 Reviewed by Mark Lam. Remove the WebCore typedefs of JSC types. Prefer JSC namespace prefixed types throughout WebCore's Inspector code. * GNUmakefile.list.am: * WebCore.vcxproj/WebCore.vcxproj: * WebCore.vcxproj/WebCore.vcxproj.filters: * WebCore.xcodeproj/project.pbxproj: * bindings/js/BreakpointID.h: Removed. * bindings/js/ScriptDebugServer.cpp: (WebCore::ScriptDebugServer::setBreakpoint): (WebCore::ScriptDebugServer::removeBreakpoint): (WebCore::ScriptDebugServer::dispatchDidParseSource): * bindings/js/ScriptDebugServer.h: * bindings/js/SourceID.h: Removed. * inspector/InspectorDebuggerAgent.cpp: (WebCore::InspectorDebuggerAgent::InspectorDebuggerAgent): (WebCore::parseLocation): (WebCore::InspectorDebuggerAgent::setBreakpoint): (WebCore::InspectorDebuggerAgent::continueToLocation): (WebCore::InspectorDebuggerAgent::resolveBreakpoint): (WebCore::InspectorDebuggerAgent::searchInContent): (WebCore::InspectorDebuggerAgent::getScriptSource): (WebCore::InspectorDebuggerAgent::didParseSource): (WebCore::InspectorDebuggerAgent::didPause): (WebCore::InspectorDebuggerAgent::clear): * inspector/InspectorDebuggerAgent.h: * inspector/ScriptDebugListener.h: 2013-12-16 Daniel Bates [iOS] Upstream WebCore/dom changes https://bugs.webkit.org/show_bug.cgi?id=125646 Reviewed by David Kilzer. * WebCore.exp.in: Added symbol __ZN7WebCore8Settings17setLayoutIntervalEi and removed symbol __ZN7WebCore24cLayoutScheduleThresholdE. * dom/ActiveDOMObject.h: Add suspension reason DocumentWillBePaused. * dom/DOMImplementation.cpp: (WebCore::DOMImplementation::createDocument): Opt-out of ENABLE(VIDEO) logic when building for iOS. * dom/DeviceMotionClient.h: Made class non-copyable. (WebCore::DeviceMotionClient::DeviceMotionClient): Added; * dom/DeviceMotionController.cpp: Added FIXME comment to reconcile iOS and OpenSource differences. (WebCore::DeviceMotionController::suspendUpdates): Added; guarded by PLATFORM(IOS). (WebCore::DeviceMotionController::resumeUpdates): Added; guarded by PLATFORM(IOS). * dom/DeviceMotionController.h: Added FIXME comment to reconcile iOS and OpenSource differences. * dom/DeviceOrientationClient.h: Made class non-copyable. (WebCore::DeviceOrientationClient::DeviceOrientationClient): Added. * dom/DeviceOrientationController.cpp: Added FIXME comment to reconcile iOS and OpenSource differences. (WebCore::DeviceOrientationController::DeviceOrientationController): (WebCore::DeviceOrientationController::suspendUpdates): Added; guarded by PLATFORM(IOS). (WebCore::DeviceOrientationController::resumeUpdates): Added; guarded by PLATFORM(IOS). * dom/DeviceOrientationController.h: Added FIXME comment to reconcile iOS and OpenSource differences. * dom/DeviceOrientationData.cpp: (WebCore::DeviceOrientationData::create): Added; iOS-specific. Added FIXME comment. (WebCore::DeviceOrientationData::DeviceOrientationData): Added iOS-specific code. (WebCore::DeviceOrientationData::compassHeading): Added; guarded by PLATFORM(IOS). (WebCore::DeviceOrientationData::compassAccuracy): Added; guarded by PLATFORM(IOS). (WebCore::DeviceOrientationData::canProvideCompassHeading): Added; guarded by PLATFORM(IOS). (WebCore::DeviceOrientationData::canProvideCompassAccuracy): Added; guarded by PLATFORM(IOS). * dom/DeviceOrientationData.h: * dom/DeviceOrientationEvent.idl: Added iOS-specific code. * dom/Document.cpp: Moved constant cLayoutScheduleThreshold to Settings.cpp and renamed it layoutScheduleThreshold towards allowing a port to configure the layout interval. (WebCore::Document::Document): Added optional argument isSynthesized, defaults false. (WebCore::Document::~Document): Added iOS-specific code to destroy the device motion and device orientation controllers. (WebCore::Document::didBecomeCurrentDocumentInFrame): Added iOS-specific code with FIXME comment. (WebCore::Document::prepareForDestruction): Added iOS-specific touch event code. (WebCore::Document::removeAllEventListeners): Ditto. (WebCore::Document::platformSuspendOrStopActiveDOMObjects): Added; compiles to an empty function on non-iOS port. (WebCore::Document::suspendActiveDOMObjects): Modified to call platformSuspendOrStopActiveDOMObjects(). (WebCore::Document::resumeActiveDOMObjects): Ditto. (WebCore::Document::stopActiveDOMObjects): Added. (WebCore::Document::implicitClose): Modified to query Settings::layoutInterval(). (WebCore::Document::minimumLayoutDelay): Ditto. (WebCore::Document::processViewport): Added iOS-specific code. (WebCore::Document::updateViewportArguments): Ditto. (WebCore::setParserFeature): Added; guarded by PLATFORM(IOS). (WebCore::Document::processFormatDetection): Added; guarded by PLATFORM(IOS). (WebCore::Document::processWebAppOrientations): Added; guarded by PLATFORM(IOS). (WebCore::Document::isTelephoneNumberParsingEnabled): Added; guarded by PLATFORM(IOS). (WebCore::Document::setIsTelephoneNumberParsingAllowed): Added; guarded by PLATFORM(IOS). (WebCore::Document::isTelephoneNumberParsingAllowed): Added; guarded by PLATFORM(IOS). (WebCore::Document::initSecurityContext): Added iOS-specific code. (WebCore::Document::suspendScheduledTasks): Added; guarded by PLATFORM(IOS). (WebCore::Document::deviceMotionController): Added; iOS-specific. (WebCore::Document::deviceOrientationController): Added; iOS-specific. (WebCore::Document::adjustFloatQuadsForScrollAndAbsoluteZoomAndFrameScale): Added iOS-specific code. (WebCore::Document::adjustFloatRectForScrollAndAbsoluteZoomAndFrameScale): Added iOS-specific code. * dom/Document.h: Register gesture events gesture{change, end, start}; guarded by ENABLE(IOS_GESTURE_EVENTS). (WebCore::Document::isSynthesized): Added. (WebCore::Document::platformSuspendOrStopActiveDOMObjects): Added. * dom/Document.idl: * dom/DocumentMarker.h: Added iOS-specific changes. We should look to reconcile the differences between iOS and OpenSource. See . (WebCore::DocumentMarker::AllMarkers::AllMarkers): (WebCore::DocumentMarker::DocumentMarker): Added; iOS-specific. (WebCore::DocumentMarker::alternatives): Added; iOS-specific. (WebCore::DocumentMarker::setAlternative): Added; iOS-specific. (WebCore::DocumentMarker::metadata): Added; iOS-specific. (WebCore::DocumentMarker::setMetadata): Added; iOS-specific. * dom/DocumentMarkerController.cpp: (WebCore::DocumentMarkerController::addMarker): (WebCore::DocumentMarkerController::addDictationPhraseWithAlternativesMarker): (WebCore::DocumentMarkerController::addDictationResultMarker): (WebCore::DocumentMarkerController::shiftMarkers): * dom/DocumentMarkerController.h: * dom/Element.cpp: (WebCore::Element::focus): Add iOS-specific workaround for . * dom/Element.h: Register gesture events gesture{change, end, start}; guarded by ENABLE(IOS_GESTURE_EVENTS). * dom/EventContext.cpp: Opt-out of ENABLE(TOUCH_EVENTS)-guarded code when building the iOS port. * dom/EventContext.h: Ditto. * dom/EventDispatcher.cpp: (WebCore::EventRelatedNodeResolver::EventRelatedNodeResolver): Ditto. (WebCore::EventDispatcher::dispatchEvent): Ditto. (WebCore::EventPath::EventPath): Ditto. * dom/EventNames.h: Added events webkit{currentplaybacktargetiswirelesschanged, playbacktargetavailabilitychanged} and gesture{change, end, start}. * dom/EventNames.in: Added event names GestureEvent and WebKitPlaybackTargetAvailabilityEvent conditioned on the macro defines ENABLE_IOS_GESTURE_EVENTS and ENABLE_IOS_AIRPLAY. * dom/MouseRelatedEvent.cpp: (WebCore::contentsScrollOffset): Added iOS-specific code. (WebCore::MouseRelatedEvent::MouseRelatedEvent): Ditto. * dom/Node.cpp: (WebCore::Node::willBeDeletedFrom): Ditto. (WebCore::Node::isDescendantOf): Fixed style issue in function prototype; moved '*' to the left side. (WebCore::Node::isDescendantOrShadowDescendantOf): Added. (WebCore::tryAddEventListener): Added iOS-specific code; also added FIXME comment. (WebCore::tryRemoveEventListener): Ditto. (WebCore::Node::dispatchEvent): Opt-out of ENABLE(TOUCH_EVENTS)-guarded code when building the iOS port. (WebCore::Node::defaultEventHandler): Added iOS-specific code. (WebCore::Node::willRespondToMouseMoveEvents): Added iOS-specific code; also added FIXME comment. (WebCore::Node::willRespondToMouseClickEvents): Added iOS-specific code; also added FIXME comment. (WebCore::Node::willRespondToMouseWheelEvents): Added. * dom/Node.h: * dom/Position.h: (WebCore::operator<): Added. (WebCore::operator>): Added. (WebCore::operator>=): Added. (WebCore::operator<=): Added. * dom/Range.cpp: (WebCore::Range::create): Added iOS-specific code; also added FIXME comment. (WebCore::intervalsSufficientlyOverlap): Added; guarded by PLATFORM(IOS). (WebCore::printRects): Added; guarded by PLATFORM(IOS). (WebCore::adjustLineHeightOfSelectionRects): Added; guarded by PLATFORM(IOS). (WebCore::coalesceSelectionRects): Added; guarded by PLATFORM(IOS). (WebCore::Range::collectSelectionRects): Added; guarded by PLATFORM(IOS). * dom/Range.h: * dom/ScriptExecutionContext.cpp: (WebCore::ScriptExecutionContext::suspendActiveDOMObjects): Added iOS-specific code. (WebCore::ScriptExecutionContext::dispatchErrorEvent): Ditto. * dom/TreeScope.cpp: (WebCore::nodeFromPoint): Ditto. * dom/ViewportArguments.cpp: (WebCore::computeViewportAttributes): Ditto. (WebCore::setViewportFeature): Added iOS-specific code. (WebCore::finalizeViewportArguments): Added; iOS-specific. * dom/ViewportArguments.h: * dom/make_names.pl: Added support to find the path to gcc with respect to the environment variable SDKROOT. * html/HTMLMediaElement.cpp: (HTMLMediaElement::suspend): * page/Settings.cpp: (WebCore::Settings::Settings): Initialize setting m_layoutInterval to layoutScheduleThreshold. (WebCore::Settings::setLayoutInterval): Added. * page/Settings.h: (WebCore::Settings::layoutInterval): Added. 2013-12-16 Simon Fraser Attempt to fix the Windows build after r160672. * platform/graphics/ca/win/PlatformCALayerWin.cpp: (PlatformCALayerWin::PlatformCALayerWin): * platform/graphics/ca/win/PlatformCALayerWin.h: 2013-12-16 Simon Fraser Apply overhang shadow and linen to UI-side layers https://bugs.webkit.org/show_bug.cgi?id=125807 Reviewed by Tim Horton. With UI-side compositing, we need to apply the overhang shadow and linen background to layers in the UI process. Achieve this by setting a "custom appearance" flag on layers that need a shadow or linen background, and migrating this flag to the UI process. Static functions on ScrollbarThemeMac are exposed to do the actual setting. * WebCore.exp.in: Export ScrollbarThemeMac and GraphicsLayerCA functions. * WebCore.xcodeproj/project.pbxproj: ScrollbarThemeMac.h and ScrollbarThemeComposite.h need to be Private. * platform/graphics/GraphicsLayer.cpp: Initialize m_customAppearance. (WebCore::GraphicsLayer::GraphicsLayer): * platform/graphics/GraphicsLayer.h: Getter/setter for CustomAppearance. (WebCore::GraphicsLayer::setCustomAppearance): (WebCore::GraphicsLayer::customAppearance): * platform/graphics/ca/GraphicsLayerCA.cpp: Update CustomAppearanceChanged as we do other properties. (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers): (WebCore::GraphicsLayerCA::updateCustomAppearance): (WebCore::GraphicsLayerCA::setCustomAppearance): * platform/graphics/ca/GraphicsLayerCA.h: * platform/graphics/ca/PlatformCALayer.h: * platform/graphics/ca/mac/PlatformCALayerMac.h: * platform/graphics/ca/mac/PlatformCALayerMac.mm: When we have a custom appearance, use ScrollbarThemeMac functions to update the layer. Ensure that if the bounds change, we update the shadow (whose path depends on the bounds). (PlatformCALayerMac::PlatformCALayerMac): (PlatformCALayerMac::clone): (PlatformCALayerMac::setBounds): (PlatformCALayerMac::requiresCustomAppearanceUpdateOnBoundsChange): (PlatformCALayerMac::updateCustomAppearance): * platform/mac/ScrollbarThemeMac.h: Export some static functions. * platform/mac/ScrollbarThemeMac.mm: Change code to use static functions. (WebCore::ScrollbarThemeMac::setUpOverhangAreaBackground): (WebCore::ScrollbarThemeMac::removeOverhangAreaBackground): (WebCore::ScrollbarThemeMac::setUpOverhangAreaShadow): (WebCore::ScrollbarThemeMac::removeOverhangAreaShadow): (WebCore::ScrollbarThemeMac::setUpOverhangAreasLayerContents): (WebCore::ScrollbarThemeMac::setUpContentShadowLayer): * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::updateRootLayerPosition): No need to call setUpContentShadowLayer() now when size changes; PlatformCALayer takes care of that. (WebCore::RenderLayerCompositor::updateOverflowControlsLayers): Now set custom appearance via GraphicsLayer. 2013-12-16 Brent Fulgham [Win] Remove dead code after converstion to VS2013 https://bugs.webkit.org/show_bug.cgi?id=125795 Reviewed by Darin Adler. * WebCorePrefix.h: Remove VS2012 include kludge. * loader/FTPDirectoryParser.cpp: Remove gmtime workaround code. * page/DOMWindow.cpp: Remove older pointer-based open implementation. * page/DOMWindow.h: Ditto * platform/text/TextEncodingRegistry.cpp: (WebCore::TextEncodingNameHash::equal): Remove optimization bug workaround * testing/Internals.cpp: (WebCore::Internals::openDummyInspectorFrontend): Remove compiler workaround 2013-12-16 Daniel Bates [iOS] Upstream WebCore/history changes https://bugs.webkit.org/show_bug.cgi?id=125769 Reviewed by Darin Adler. * history/BackForwardClient.h: * history/BackForwardList.cpp: (WebCore::BackForwardList::current): Added; guard by PLATFORM(IOS). Also added FIXME comment. (WebCore::BackForwardList::setCurrent): Added; guard by PLATFORM(IOS). Also added FIXME comment. (WebCore::BackForwardList::clearAllPageCaches): Added; guarded by PLATFORM(IOS). * history/BackForwardList.h: * history/CachedFrame.cpp: (WebCore::CachedFrameBase::restore): Added iOS-specific code. (WebCore::CachedFrame::CachedFrame): Ditto. * history/CachedPage.cpp: (WebCore::CachedPage::restore): Ditto. * history/HistoryItem.cpp: (WebCore::HistoryItem::HistoryItem): Ditto. * history/HistoryItem.h: (WebCore::HistoryItem::scale): Added; guarded by PLATFORM(IOS). (WebCore::HistoryItem::scaleIsInitial): Added; guarded by PLATFORM(IOS). (WebCore::HistoryItem::setScale): Added; guarded by PLATFORM(IOS). (WebCore::HistoryItem::viewportArguments): Added; guarded by PLATFORM(IOS). (WebCore::HistoryItem::setViewportArguments): Added; guarded by PLATFORM(IOS). (WebCore::HistoryItem::bookmarkID): Added; guarded by PLATFORM(IOS). (WebCore::HistoryItem::setBookmarkID): Added; guarded by PLATFORM(IOS). (WebCore::HistoryItem::sharedLinkUniqueIdentifier): Added; guarded by PLATFORM(IOS). (WebCore::HistoryItem::setSharedLinkUniqueIdentifier): Added; guarded by PLATFORM(IOS). * history/PageCache.cpp: (WebCore::logCanCacheFrameDecision): Added iOS-specific code. (WebCore::logCanCachePageDecision): Ditto. (WebCore::PageCache::canCachePageContainingThisFrame): Ditto. (WebCore::PageCache::canCache): Ditto. (WebCore::PageCache::pruneToCapacityNow): Added. * history/PageCache.h: 2013-12-16 Daniel Bates [iOS] Upstream WebCore/svg changes https://bugs.webkit.org/show_bug.cgi?id=125784 Reviewed by Darin Adler. * svg/SVGAElement.cpp: (WebCore::SVGAElement::willRespondToMouseClickEvents): Added. * svg/SVGAElement.h: * svg/SVGElement.cpp: (WebCore::SVGElement::parseAttribute): Added attribute listeners for touch{cancel, end, move, start}, and gesture{change, end, start}. 2013-12-13 Jeffrey Pfau [Mac] Cache partitioning asserts when associated NSURLRequest is nil https://bugs.webkit.org/show_bug.cgi?id=125716 Reviewed by Darin Adler. * platform/network/mac/ResourceRequestMac.mm: (WebCore::ResourceRequest::doUpdateResourceRequest): 2013-12-16 Brady Eidson DatabaseProcess: Fix a few bugs with opening an IDB connection https://bugs.webkit.org/show_bug.cgi?id=125798 Reviewed by Alexey Proskuryakov. * Modules/indexeddb/IDBDatabaseBackend.cpp: (WebCore::IDBDatabaseBackend::processPendingCalls): As the comment says, we should only early return when there *are* pending delete calls. The logic here was backwards, preventing the backend from ever getting to processPendingOpenCalls(). 2013-12-16 Alex Christensen Fixed Win64 build on VS2013. https://bugs.webkit.org/show_bug.cgi?id=125753 Reviewed by Brent Fulgham. * WebCore.vcxproj/WebCore.vcxproj: * WebCore.vcxproj/WebCoreTestSupport.vcxproj: Added correct PlatformToolset for 64-bit builds. 2013-12-16 Simon Fraser Package up some data about scrollability into a struct for use in the scrolling tree https://bugs.webkit.org/show_bug.cgi?id=125792 Reviewed by Beth Dakin. Both scrolling state nodes and scrolling nodes share a set of parameters relating to scrollability and rubberbanding, so package them into a struct for re-use. Send the struct wholesale to the scrolling thread. * page/scrolling/ScrollingCoordinator.h: (WebCore::ScrollableAreaParameters::ScrollableAreaParameters): New struct. (WebCore::ScrollableAreaParameters::operator==): * page/scrolling/ScrollingStateScrollingNode.cpp: (WebCore::ScrollingStateScrollingNode::ScrollingStateScrollingNode): Reordering. (WebCore::ScrollingStateScrollingNode::setScrollOrigin): Moved. (WebCore::ScrollingStateScrollingNode::setScrollableAreaParameters): Set the parameters all at once. (WebCore::ScrollingStateScrollingNode::setRequestedScrollPosition): * page/scrolling/ScrollingStateScrollingNode.h: Getters access the struct. Reorder member variables. * page/scrolling/ScrollingTreeScrollingNode.cpp: (WebCore::ScrollingTreeScrollingNode::ScrollingTreeScrollingNode): (WebCore::ScrollingTreeScrollingNode::updateBeforeChildren): * page/scrolling/ScrollingTreeScrollingNode.h: (WebCore::ScrollingTreeScrollingNode::scrollOrigin): (WebCore::ScrollingTreeScrollingNode::horizontalScrollElasticity): (WebCore::ScrollingTreeScrollingNode::verticalScrollElasticity): (WebCore::ScrollingTreeScrollingNode::hasEnabledHorizontalScrollbar): (WebCore::ScrollingTreeScrollingNode::hasEnabledVerticalScrollbar): (WebCore::ScrollingTreeScrollingNode::canHaveScrollbars): * page/scrolling/mac/ScrollingCoordinatorMac.h: * page/scrolling/mac/ScrollingCoordinatorMac.mm: Removed setScrollParametersForNode(). (WebCore::ScrollingCoordinatorMac::frameViewLayoutUpdated): Set the params in this function. Reordering. 2013-12-16 Sam Weinig CTTE: Convert more of SVG to use references https://bugs.webkit.org/show_bug.cgi?id=125762 Reviewed by Darin Adler. * rendering/svg/RenderSVGImage.cpp: (WebCore::RenderSVGImage::imageChanged): * rendering/svg/RenderSVGResource.cpp: (WebCore::removeFromCacheAndInvalidateDependencies): (WebCore::RenderSVGResource::markForLayoutAndParentResourceInvalidation): * rendering/svg/RenderSVGResource.h: * rendering/svg/RenderSVGResourceClipper.cpp: (WebCore::RenderSVGResourceClipper::removeClientFromCache): * rendering/svg/RenderSVGResourceClipper.h: * rendering/svg/RenderSVGResourceContainer.cpp: (WebCore::RenderSVGResourceContainer::markAllClientsForInvalidation): (WebCore::RenderSVGResourceContainer::markAllClientLayersForInvalidation): (WebCore::RenderSVGResourceContainer::markClientForInvalidation): (WebCore::RenderSVGResourceContainer::removeClient): * rendering/svg/RenderSVGResourceContainer.h: * rendering/svg/RenderSVGResourceFilter.cpp: (WebCore::RenderSVGResourceFilter::removeClientFromCache): (WebCore::RenderSVGResourceFilter::postApplyResource): (WebCore::RenderSVGResourceFilter::primitiveAttributeChanged): * rendering/svg/RenderSVGResourceFilter.h: * rendering/svg/RenderSVGResourceGradient.cpp: (WebCore::RenderSVGResourceGradient::removeClientFromCache): * rendering/svg/RenderSVGResourceGradient.h: * rendering/svg/RenderSVGResourceMarker.cpp: (WebCore::RenderSVGResourceMarker::removeClientFromCache): * rendering/svg/RenderSVGResourceMarker.h: * rendering/svg/RenderSVGResourceMasker.cpp: (WebCore::RenderSVGResourceMasker::removeClientFromCache): * rendering/svg/RenderSVGResourceMasker.h: * rendering/svg/RenderSVGResourcePattern.cpp: (WebCore::RenderSVGResourcePattern::removeClientFromCache): * rendering/svg/RenderSVGResourcePattern.h: * rendering/svg/RenderSVGResourceSolidColor.h: (WebCore::RenderSVGResourceSolidColor::removeClientFromCache): * rendering/svg/SVGRenderSupport.cpp: (WebCore::invalidateResourcesOfChildren): * rendering/svg/SVGResources.cpp: (WebCore::SVGResources::removeClientFromCache): * rendering/svg/SVGResources.h: * rendering/svg/SVGResourcesCache.cpp: (WebCore::SVGResourcesCache::clientLayoutChanged): (WebCore::SVGResourcesCache::clientStyleChanged): (WebCore::SVGResourcesCache::clientWasAddedToTree): (WebCore::SVGResourcesCache::clientWillBeRemovedFromTree): (WebCore::SVGResourcesCache::clientDestroyed): * svg/SVGAnimateMotionElement.cpp: (WebCore::SVGAnimateMotionElement::applyResultsToTarget): * svg/SVGCircleElement.cpp: (WebCore::SVGCircleElement::svgAttributeChanged): * svg/SVGEllipseElement.cpp: (WebCore::SVGEllipseElement::svgAttributeChanged): * svg/SVGFEImageElement.cpp: (WebCore::SVGFEImageElement::notifyFinished): * svg/SVGFELightElement.cpp: (WebCore::SVGFELightElement::childrenChanged): * svg/SVGFilterPrimitiveStandardAttributes.cpp: (WebCore::invalidateFilterPrimitiveParent): * svg/SVGFilterPrimitiveStandardAttributes.h: (WebCore::SVGFilterPrimitiveStandardAttributes::invalidate): (WebCore::SVGFilterPrimitiveStandardAttributes::primitiveAttributeChanged): * svg/SVGForeignObjectElement.cpp: (WebCore::SVGForeignObjectElement::svgAttributeChanged): * svg/SVGGElement.cpp: (WebCore::SVGGElement::svgAttributeChanged): * svg/SVGGraphicsElement.cpp: (WebCore::SVGGraphicsElement::svgAttributeChanged): * svg/SVGImageElement.cpp: (WebCore::SVGImageElement::svgAttributeChanged): * svg/SVGLineElement.cpp: (WebCore::SVGLineElement::svgAttributeChanged): * svg/SVGPathElement.cpp: (WebCore::SVGPathElement::svgAttributeChanged): (WebCore::SVGPathElement::invalidateMPathDependencies): (WebCore::SVGPathElement::pathSegListChanged): * svg/SVGPolyElement.cpp: (WebCore::SVGPolyElement::svgAttributeChanged): * svg/SVGRectElement.cpp: (WebCore::SVGRectElement::svgAttributeChanged): * svg/SVGSVGElement.cpp: (WebCore::SVGSVGElement::svgAttributeChanged): (WebCore::SVGSVGElement::setupInitialView): * svg/SVGStopElement.cpp: (WebCore::SVGStopElement::svgAttributeChanged): * svg/SVGTRefElement.cpp: (WebCore::SVGTRefElement::svgAttributeChanged): * svg/SVGTextContentElement.cpp: (WebCore::SVGTextContentElement::svgAttributeChanged): * svg/SVGTextPathElement.cpp: (WebCore::SVGTextPathElement::svgAttributeChanged): * svg/SVGTextPositioningElement.cpp: (WebCore::SVGTextPositioningElement::svgAttributeChanged): * svg/SVGUseElement.cpp: (WebCore::SVGUseElement::svgAttributeChanged): 2013-12-16 Hans Muller [CSS Shapes] Add support for the computing the included intervals for a BoxShape https://bugs.webkit.org/show_bug.cgi?id=124605 Reviewed by Andreas Kling. Setting shape-inside to content-box now works. Changed FloatRoundedRect::xInterceptsAtY() to include the bottom edge of the rectangle and to check for the special cases where any or all of the corner radii are empty. Test: fast/shapes/shape-inside/shape-inside-content-box.html * platform/graphics/FloatRoundedRect.cpp: (WebCore::FloatRoundedRect::xInterceptsAtY): * rendering/shapes/BoxShape.cpp: (WebCore::BoxShape::getIncludedIntervals): Replaced the stub implementation with logic that's similar to getExcludedIntervals(). * rendering/shapes/ShapeInfo.cpp: (WebCore::::computedShape): Removed a meaningless assert. * rendering/shapes/ShapeInsideInfo.cpp: (WebCore::ShapeInsideInfo::isEnabledFor): 2013-12-16 Mario Sanchez Prada [ATK] Expose accessibility objects for more WAI-ARIA roles https://bugs.webkit.org/show_bug.cgi?id=125596 Reviewed by Chris Fleizach. Exposed accessibility objects with the proper AtkRoles, some of them to be provided by the next stable release of ATK. * accessibility/atk/WebKitAccessibleWrapperAtk.cpp: (atkRole): 2013-12-16 Eric Carlson Fix QuickTime plug-in replacement scripting bugs https://bugs.webkit.org/show_bug.cgi?id=125717 Reviewed by Sam Weinig. No new tests, existing test updated. * Modules/plugins/QuickTimePluginReplacement.js: (Replacement): Change '' to "" to avoid "Empty character constant" warning when creating Derived Sources. (Replacement.prototype.createVideoElement): Handle qtsrc attribute. Remember base url. (Replacement.prototype.setURL): Resolve urls relative to base. 2013-12-15 Darin Adler Catch callers who forget to use initializeStyle https://bugs.webkit.org/show_bug.cgi?id=125763 Reviewed by Andreas Kling. A recent fix was because a caller used setStyle first rather than using initializeStyle. This patch adds an assertion to catch cases where we do that so we see the mistake right away instead of indirectly later. * rendering/RenderElement.cpp: (WebCore::RenderElement::initializeStyle): Simplified an assertion. (WebCore::RenderElement::setStyle): Added an assertion that m_hasInitializedStyle is true, with an exception for RenderView, which needs to be created before we have the correct style computed for it (at least for now). Also broke out an assertion that was using &&, since we would prefer to know which clause failed, making separate assertions more useful than a combined assertion. 2013-12-16 Mario Sanchez Prada [ATK] Expose accessibility objects with ATK_ROLE_CHECK_MENU_ITEM https://bugs.webkit.org/show_bug.cgi?id=125594 Reviewed by Chris Fleizach. Exposed accessibility objects with checkmenuitem role with the proper AtkRole, to be provided by the next stable release of ATK. * accessibility/atk/WebKitAccessibleWrapperAtk.cpp: (atkRole): 2013-12-16 Mario Sanchez Prada [ATK] Expose accessibility objects with ATK_ROLE_ARTICLE https://bugs.webkit.org/show_bug.cgi?id=125587 Reviewed by Chris Fleizach. Exposed accessibility objects with article role with the proper AtkRole, to be provided by the next stable release of ATK. * accessibility/atk/WebKitAccessibleWrapperAtk.cpp: (atkRole): 2013-11-27 Sergio Villar Senin [CSS Grid Layout] Fix the preferred logical widths code to work with spanning grid items https://bugs.webkit.org/show_bug.cgi?id=123994 Reviewed by Andreas Kling. From Blink r159189 by There was no definition in the specs for the intrinsic / preferred logical widths on the grid element. The following was proposed to the WG and later accepted: - The sum of the grid tracks' UsedBreadth is the minimum logical width - The sum of the grid tracks' MaxBreadth is the maximum logical width http://lists.w3.org/Archives/Public/www-style/2013Oct/0054.html for more information. * rendering/RenderGrid.cpp: (WebCore::RenderGrid::computeIntrinsicLogicalWidths): (WebCore::RenderGrid::computedUsedBreadthOfGridTracks): (WebCore::RenderGrid::minContentForChild): (WebCore::RenderGrid::maxContentForChild): * rendering/RenderGrid.h: 2013-12-15 Frédéric Wang Add support for maction@toggle https://bugs.webkit.org/show_bug.cgi?id=120059 Reviewed by Chris Fleizach. Test: mathml/presentation/maction-toggle.html * mathml/MathMLSelectElement.cpp: (WebCore::MathMLSelectElement::getSelectedChildAndIndex): (WebCore::MathMLSelectElement::updateSelectedChild): (WebCore::MathMLSelectElement::defaultEventHandler): (WebCore::MathMLSelectElement::willRespondToMouseClickEvents): (WebCore::MathMLSelectElement::toggle): * mathml/MathMLSelectElement.h: 2013-12-15 Darin Adler More nullptr in RenderElement https://bugs.webkit.org/show_bug.cgi?id=125764 Reviewed by Andreas Kling. * rendering/RenderElement.cpp: (WebCore::RenderElement::uncachedFirstLineStyle): (WebCore::RenderElement::updateShapeImage): (WebCore::RenderElement::destroyLeftoverChildren): (WebCore::RenderElement::findNextLayer): Use nullptr in a few more places. 2013-12-15 Ryosuke Niwa REGRESSION: 2x regression on Dromaeo DOM query tests https://bugs.webkit.org/show_bug.cgi?id=125377 Reviewed by Filip Pizlo. The bug was caused by JSC not JIT'ing property accesses on document because of its having custom named getter (named properties). This resulted in resolution of methods on document such as getElementById to happen inside the interpreter. Fixed the bug by using the new JSC type info flag which tells JSC to JIT property access on document, and then notifying JSC whenever a new named property appeared on document. Tests: js/dom/dfg-prototype-chain-caching-with-impure-get-own-property-slot-traps-2.html js/dom/dfg-prototype-chain-caching-with-impure-get-own-property-slot-traps-3.html js/dom/dfg-prototype-chain-caching-with-impure-get-own-property-slot-traps-4.html js/dom/prototype-chain-caching-with-impure-get-own-property-slot-traps-2.html js/dom/prototype-chain-caching-with-impure-get-own-property-slot-traps-3.html js/dom/prototype-chain-caching-with-impure-get-own-property-slot-traps-4.html * bindings/js/JSDOMBinding.cpp: (WebCore::addImpureProperty): Wraps VM::addImpureProperty. * bindings/js/JSDOMBinding.h: * bindings/scripts/CodeGeneratorJS.pm: (GenerateHeader): Added the support for NewImpurePropertyFiresWatchpoints. * bindings/scripts/IDLAttributes.txt: Ditto. * html/HTMLDocument.cpp: (WebCore::HTMLDocument::addDocumentNamedItem): Calls addImpureProperty. * html/HTMLDocument.idl: Added NewImpurePropertyFiresWatchpoints. 2013-12-15 Brent Fulgham [WIn] Unreviewed build fix after r160599 * rendering/RenderMediaControls.cpp: (WebCore::determineState): RenderObject::theme now returns a reference. 2013-12-15 Brent Fulgham [Win] Unreviewed build fix The build system continues to attempt to build QTMovieWin, even though it is excluded from the build solution. I'm actually removing the project files to prevent this. * WebCore.vcxproj/QTMovieWin/QTMovieWin.vcxproj: Removed. * WebCore.vcxproj/QTMovieWin/QTMovieWin.vcxproj.filters: Removed. 2013-12-15 Rob Buis [CSS Shapes] shape-outside animation does not handle 'auto' well https://bugs.webkit.org/show_bug.cgi?id=125700 Reviewed by Dirk Schulze. Handle the case where we are blending/animating with a null ShapeValue due to 'auto'. Adapted LayoutTests/fast/shapes/shape-outside-floats/shape-outside-animation.html for testing this. * page/animation/CSSPropertyAnimation.cpp: (WebCore::blendFunc): 2013-12-15 Andy Estes [iOS] Upstream changes to FeatureDefines.xcconfig https://bugs.webkit.org/show_bug.cgi?id=125742 Reviewed by Dan Bernstein. * Configurations/FeatureDefines.xcconfig: 2013-12-14 Darin Adler Crash in CSSImageGeneratorValue and RenderScrollbar https://bugs.webkit.org/show_bug.cgi?id=125702 Reviewed by Alexey Proskuryakov. This crash had two causes at two different levels. The crash fixes both. At the RenderScrollbar level, we were setting up a new renderer, a RenderScrollbarPart, and never calling initializeStyle. This meant that we did not do proper style setup, which meant we did not end up calling CSSImageGeneratorValue::addClient and so had a removeClient that was not properly balanced by an addClient. This is the primary bug. At the CSSImageGeneratorValue level, the addClient and removeClient functions were not properly handling possibly-mismatched calls. It was easy to fix the functions to work even if the calls are not perfectly matched up, which makes the consequences of a missed addClient call much less dire, no longer messing up reference counting. Fixing this mitigates the risk if we made this same mistake elsewhere, although I could not find any other places with some quick searches. Test: fast/css/scrollbar-image-crash.html * css/CSSImageGeneratorValue.cpp: (WebCore::CSSImageGeneratorValue::addClient): Only call ref if this will add the first client. (WebCore::CSSImageGeneratorValue::removeClient): Only call deref if this removes the last client. Also added an assertion that can fire if we call removeClient without first calling addClient, which is illegal. However, the function handles that case without over-deref'ing itself. * rendering/RenderScrollbar.cpp: (WebCore::RenderScrollbar::updateScrollbarPart): Simplify the logic for needRenderer a bit. Use initializeStyle rather than setStyle when first creating the RenderScrollbarPart. Also use add and take properly so we don't do extra hash lookups the old code did with get/set and get/remove. 2013-12-14 Sam Weinig CTTE: SVGResourcesCache::cachedResourcesForRenderObject() should take a reference https://bugs.webkit.org/show_bug.cgi?id=125743 Reviewed by Dan Bernstein. * rendering/svg/RenderSVGContainer.cpp: (WebCore::RenderSVGContainer::selfWillPaint): * rendering/svg/RenderSVGImage.cpp: (WebCore::RenderSVGImage::imageChanged): * rendering/svg/RenderSVGResource.cpp: (WebCore::requestPaintingResource): (WebCore::removeFromCacheAndInvalidateDependencies): (WebCore::RenderSVGResource::markForLayoutAndParentResourceInvalidation): * rendering/svg/RenderSVGResourceClipper.cpp: (WebCore::RenderSVGResourceClipper::applyClippingToContext): * rendering/svg/RenderSVGRoot.cpp: (WebCore::RenderSVGRoot::paintReplaced): * rendering/svg/RenderSVGShape.cpp: (WebCore::RenderSVGShape::shouldGenerateMarkerPositions): (WebCore::RenderSVGShape::markerRect): (WebCore::RenderSVGShape::drawMarkers): * rendering/svg/SVGRenderSupport.cpp: (WebCore::invalidateResourcesOfChildren): (WebCore::SVGRenderSupport::layoutChildren): (WebCore::SVGRenderSupport::intersectRepaintRectWithResources): (WebCore::SVGRenderSupport::filtersForceContainerLayout): (WebCore::SVGRenderSupport::pointInClippingArea): * rendering/svg/SVGRenderingContext.cpp: (WebCore::SVGRenderingContext::prepareToRenderSVGContent): * rendering/svg/SVGResourcesCache.cpp: (WebCore::SVGResourcesCache::cachedResourcesForRenderObject): (WebCore::SVGResourcesCache::clientLayoutChanged): (WebCore::SVGResourcesCache::clientDestroyed): * rendering/svg/SVGResourcesCache.h: * rendering/svg/SVGResourcesCycleSolver.cpp: (WebCore::SVGResourcesCycleSolver::resourceContainsCycles): 2013-12-14 Dan Bernstein Clean up the project after r160487 * WebCore.xcodeproj/project.pbxproj: Moved reference to Security.framework from the top level of the project to the Frameworks group, and made it SDK-relative. 2013-12-14 Andreas Kling Page::theme() should return a reference. There's always a RenderTheme, and not a single call site was checking for null pointers anyway. Updated RenderObject::theme() as well. Reviewed by Antti Koivisto. 2013-12-13 Sam Weinig CTTE: Convert Element and RenderObject iterator usage to use range-based for loops https://bugs.webkit.org/show_bug.cgi?id=125731 Reviewed by Andreas Kling. Perform straight forward conversions. A few stragglers that do odd things remain. 2013-12-14 Joseph Pecoraro Small string improvements to JSInjectedScriptHost::type and other bindings https://bugs.webkit.org/show_bug.cgi?id=125722 Reviewed by Timothy Hatcher. * bindings/js/JSInjectedScriptHostCustom.cpp: (WebCore::JSInjectedScriptHost::type): Use SmallStrings, jsNontrivialString and ASCIILiteral. * bindings/js/JSJavaScriptCallFrameCustom.cpp: (WebCore::JSJavaScriptCallFrame::type): Use jsNontrivialString. * bridge/c/c_instance.cpp: (JSC::Bindings::CInstance::stringValue): Use jsNontrivialString and ASCIILiteral. 2013-12-14 Andreas Kling Move a couple of inlines from RenderObject to RenderElement. Take most of the inline functions on RenderObject that call style() and move them over to RenderElement where style() is branchless. Reviewed by Antti Koivisto. 2013-12-14 Andreas Kling RenderElement::rendererForRootBackground() should return a reference. This function always finds a renderer to return. Reviewed by Antti Koivisto. 2013-12-14 Mark Rowe Build fix after r160557. * Configurations/WebCore.xcconfig: Find JavaScriptCore.framework below SDKROOT so that we'll pick up the built version in production builds rather than the system version. 2013-12-14 Brendan Long [GStreamer] Use GMutexLocker instead of g_mutex_lock https://bugs.webkit.org/show_bug.cgi?id=125588 Reviewed by Philippe Normand. No new tests because this is just code simplification. * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp: (WebCore::MediaPlayerPrivateGStreamerBase::updateTexture): (WebCore::MediaPlayerPrivateGStreamerBase::triggerRepaint): (WebCore::MediaPlayerPrivateGStreamerBase::paint): * platform/graphics/gstreamer/VideoSinkGStreamer.cpp: (webkitVideoSinkTimeoutCallback): (webkitVideoSinkRender): (unlockBufferMutex): (webkitVideoSinkUnlockStop): (webkitVideoSinkStart): 2013-12-13 Andreas Kling Move RenderObject::repaintAfterLayoutIfNeeded() to RenderElement. This function is only ever called on RenderElements, so move it there. Removes some RenderObject::style() branchiness. Reviewed by Darin Adler. 2013-12-13 Joseph Pecoraro Web Inspector: Move Inspector and Debugger protocol domains into JavaScriptCore https://bugs.webkit.org/show_bug.cgi?id=125707 Reviewed by Timothy Hatcher. - Switch TypeBuilder::Page::SearchMatch to TypeBuilder::GenericTypes::SearchMatch which comes from InspectorJSTypeBuilders. - Remove domains that moved to JavaScriptCore. No new tests, this only moves code around. There are no functional changes. * CMakeLists.txt: * DerivedSources.make: * GNUmakefile.am: Add new files. * inspector/ContentSearchUtils.cpp: (WebCore::ContentSearchUtils::buildObjectForSearchMatch): (WebCore::ContentSearchUtils::searchInTextByLines): * inspector/ContentSearchUtils.h: * inspector/InspectorAgent.cpp: * inspector/InspectorAgent.h: * inspector/InspectorDebuggerAgent.h: * inspector/InspectorPageAgent.cpp: (WebCore::InspectorPageAgent::searchInResource): * inspector/InspectorPageAgent.h: * inspector/protocol/Page.json: Update includes and type builder type names. * inspector/InspectorDebuggerAgent.cpp: (WebCore::breakpointActionTypeForString): (WebCore::InspectorDebuggerAgent::searchInContent): * inspector/InspectorTimelineAgent.cpp: (WebCore::InspectorTimelineAgent::innerAddRecordToTimeline): Use the new getEnum function names. 2013-12-13 Brent Fulgham [Win] Remove pre-VS2013 support code. https://bugs.webkit.org/show_bug.cgi?id=125693 Reviewed by Darin Adler. * Modules/webdatabase/DatabaseTracker.cpp: (WebCore::DatabaseTracker::setQuota): Use C99 format arguments * loader/FTPDirectoryParser.cpp: (WebCore::parseOneFTPLine): Ditto * loader/icon/IconDatabase.cpp: (WebCore::IconDatabase::pruneUnretainedIcons): Ditto * platform/sql/SQLiteDatabase.cpp: (WebCore::SQLiteDatabase::setMaximumSize): Ditto 2013-12-13 Brent Fulgham SVG bindings are improperly being generated with "fastGetAttribute" https://bugs.webkit.org/show_bug.cgi?id=125670 Reviewed by Darin Adler. A bug was introduced in r152845 that improperly called the IsSVGAnimatedType using the $attribute hash, rather than the expected $attribute->signature->type. * bindings/scripts/CodeGenerator.pm: (GetterExpression): Clean up attribute type confusion. 2013-12-13 Brent Fulgham [Win] Unreviewed build fix after r160548 * WebCore.vcxproj/WebCore.vcxproj: Exclude MediaPlayerPrivateQuickTimeVisualContext from Windows build. * platform/graphics/MediaPlayer.cpp: Don't use QuickTime as the PlatformMediaEngine. 2013-12-13 Joseph Pecoraro [GTK] Remove Warnings in building about duplicate INSPECTOR variables https://bugs.webkit.org/show_bug.cgi?id=125710 Reviewed by Tim Horton. * GNUmakefile.am: 2013-12-13 Roger Fong [WebGL] Check for global variable precision mismatch between vertex and fragment shaders. https://bugs.webkit.org/show_bug.cgi?id=125546. Reviewed by Brent Fulgham. Covered Khronos conformances tests: webgl/1.0.2/glsl/misc/shader-with-global-variable-precision-mismatch.html * html/canvas/WebGLRenderingContext.cpp: (WebCore::WebGLRenderingContext::linkProgram): * platform/graphics/GraphicsContext3D.h: Rename areProgramSymbolsValid since it currently only serves one purpose. * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp: (WebCore::GraphicsContext3D::precisionsMatch): 2013-12-13 Brent Fulgham [Win] Unreviewed build fix after r160548 * WebCore.vcxproj/WebCoreGenerated.vcxproj: Specify that we are using the vs120_xp build target for Makefile-based projects. 2013-12-13 Joseph Pecoraro Web Inspector: Add Inspector Code Generation to JavaScriptCore for Runtime Domain https://bugs.webkit.org/show_bug.cgi?id=125595 Reviewed by Timothy Hatcher. - CodeGeneration changed to output Frontend and Backend dispatchers in namespace Inspector. So update all the agent's appropriately. - Update Derived Sources code generation to use the Scripts that had moved to JavaScriptCore. Some ports just use JSC/inspector/scripts directly, but others have to use the Scripts exported by JSC in JavaScriptCore's PrivateHeaders. - Add ForwardingHeaders for the files generated in JavaScriptCore. - Update the names of Inspector DerivedSources files, since they were renamed to InspectorWeb*. No new tests, this only moves code around. There are no functional changes. * CMakeLists.txt: * DerivedSources.make: * ForwardingHeaders/inspector/InspectorJSBackendDispatchers.h: Added. * ForwardingHeaders/inspector/InspectorJSFrontendDispatchers.h: Added. * ForwardingHeaders/inspector/InspectorJSTypeBuilders.h: Added. * GNUmakefile.am: * GNUmakefile.list.am: * WebCore.vcxproj/WebCore.vcxproj: * WebCore.vcxproj/WebCore.vcxproj.filters: * WebCore.vcxproj/build-generated-files.sh: * WebCore.xcodeproj/project.pbxproj: Remove files, rename files, update code generation. * make-generated-sources.sh: Update this standalone developer script to fill in the new InspectorScripts variable. * inspector/ConsoleMessage.h: * inspector/InjectedScriptHost.cpp: * inspector/InspectorAgent.cpp: * inspector/InspectorAgent.h: * inspector/InspectorApplicationCacheAgent.cpp: * inspector/InspectorApplicationCacheAgent.h: * inspector/InspectorCSSAgent.h: * inspector/InspectorCanvasAgent.cpp: * inspector/InspectorCanvasAgent.h: * inspector/InspectorConsoleAgent.cpp: * inspector/InspectorConsoleAgent.h: * inspector/InspectorController.cpp: * inspector/InspectorDOMAgent.cpp: * inspector/InspectorDOMAgent.h: * inspector/InspectorDOMDebuggerAgent.cpp: * inspector/InspectorDOMDebuggerAgent.h: * inspector/InspectorDOMStorageAgent.cpp: * inspector/InspectorDOMStorageAgent.h: * inspector/InspectorDatabaseAgent.cpp: * inspector/InspectorDatabaseAgent.h: * inspector/InspectorDatabaseResource.cpp: * inspector/InspectorDatabaseResource.h: * inspector/InspectorDebuggerAgent.cpp: * inspector/InspectorDebuggerAgent.h: * inspector/InspectorFrontendClientLocal.cpp: * inspector/InspectorHeapProfilerAgent.h: * inspector/InspectorIndexedDBAgent.cpp: * inspector/InspectorIndexedDBAgent.h: * inspector/InspectorInputAgent.h: * inspector/InspectorLayerTreeAgent.cpp: * inspector/InspectorLayerTreeAgent.h: * inspector/InspectorMemoryAgent.cpp: * inspector/InspectorMemoryAgent.h: * inspector/InspectorPageAgent.cpp: * inspector/InspectorPageAgent.h: * inspector/InspectorProfilerAgent.cpp: * inspector/InspectorProfilerAgent.h: * inspector/InspectorResourceAgent.cpp: * inspector/InspectorResourceAgent.h: * inspector/InspectorRuntimeAgent.h: * inspector/InspectorTimelineAgent.cpp: * inspector/InspectorTimelineAgent.h: * inspector/InspectorWorkerAgent.cpp: * inspector/InspectorWorkerAgent.h: * inspector/PageRuntimeAgent.h: * inspector/ScriptCallFrame.cpp: * inspector/WorkerInspectorController.cpp: * inspector/WorkerRuntimeAgent.h: Updates header names and class namespace changes. 2013-12-13 Thiago de Barros Lacerda Adding RTCPeerConnectionErrorCallback https://bugs.webkit.org/show_bug.cgi?id=125574 Reviewed by Eric Carlson. According to the spec there should be a RTCPeerConnectionErrorCallback function type for createOffer/Answer, setLocal/RemoteDescription and updateIce function calls. This callback must handle a DOMError object. Existing tests were updated. * CMakeLists.txt: * GNUmakefile.list.am: * Modules/mediastream/RTCPeerConnection.cpp: (WebCore::RTCPeerConnection::createOffer): (WebCore::RTCPeerConnection::createAnswer): (WebCore::RTCPeerConnection::setLocalDescription): (WebCore::RTCPeerConnection::setRemoteDescription): (WebCore::RTCPeerConnection::addIceCandidate): * Modules/mediastream/RTCErrorCallback.h: Removed. * Modules/mediastream/RTCErrorCallback.idl: Removed. * Modules/mediastream/RTCPeerConnection.h: * Modules/mediastream/RTCPeerConnection.idl: * Modules/mediastream/RTCPeerConnectionErrorCallback.h: Added. * Modules/mediastream/RTCPeerConnectionErrorCallback.idl: Added. * Modules/mediastream/RTCSessionDescriptionRequestImpl.cpp: (WebCore::RTCSessionDescriptionRequestImpl::create): (WebCore::RTCSessionDescriptionRequestImpl::RTCSessionDescriptionRequestImpl): (WebCore::RTCSessionDescriptionRequestImpl::requestFailed): * Modules/mediastream/RTCSessionDescriptionRequestImpl.h: * Modules/mediastream/RTCVoidRequestImpl.cpp: (WebCore::RTCVoidRequestImpl::create): (WebCore::RTCVoidRequestImpl::RTCVoidRequestImpl): (WebCore::RTCVoidRequestImpl::requestFailed): * Modules/mediastream/RTCVoidRequestImpl.h: * WebCore.xcodeproj/project.pbxproj: * platform/mediastream/RTCPeerConnectionHandler.cpp: (WebCore::RTCPeerConnectionHandler::incompatibleConstraintsErrorName): (WebCore::RTCPeerConnectionHandler::invalidSessionDescriptionErrorName): (WebCore::RTCPeerConnectionHandler::incompatibleSessionDescriptionErrorName): (WebCore::RTCPeerConnectionHandler::internalErrorName): * platform/mediastream/RTCPeerConnectionHandler.h: * platform/mock/RTCNotifiersMock.cpp: (WebCore::SessionRequestNotifier::SessionRequestNotifier): (WebCore::SessionRequestNotifier::fire): (WebCore::VoidRequestNotifier::VoidRequestNotifier): (WebCore::VoidRequestNotifier::fire): * platform/mock/RTCNotifiersMock.h: * platform/mock/RTCPeerConnectionHandlerMock.cpp: (WebCore::RTCPeerConnectionHandlerMock::createOffer): (WebCore::RTCPeerConnectionHandlerMock::createAnswer): 2013-12-13 Brent Fulgham [Win] Switch WebKit solution to Visual Studio 2013 https://bugs.webkit.org/show_bug.cgi?id=125192 Reviewed by Anders Carlsson. * WebCore.vcxproj/WebCore.vcxproj: Update for VS2013 * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto * WebCore.vcxproj/WebCoreTestSupport.vcxproj: Ditto 2013-12-13 Alexey Proskuryakov WebCrypto Key.usages should be ordered alphabetically https://bugs.webkit.org/show_bug.cgi?id=125696 Reviewed by Darin Adler. * crypto/CryptoKey.cpp: (WebCore::CryptoKey::usages): Do it. 2013-12-13 Darin Adler Make some optimizations for DOM bindings involving vectors https://bugs.webkit.org/show_bug.cgi?id=125680 Reviewed by Andreas Kling. * bindings/js/JSDOMBinding.h: (WebCore::toJS): Removed unnecessary copying of vectors when converting them to JavaScript values. (WebCore::toRefPtrNativeArray): Use reserveInitialCapacity and uncheckedAppend. (WebCore::toNativeArray): Ditto. (WebCore::toNativeArguments): Ditto. 2013-12-13 Carlos Garcia Campos REGRESSION(r155784): [GTK] Some methods incorrectly removed in r155784 and deprecated in r158662 https://bugs.webkit.org/show_bug.cgi?id=125692 Reviewed by Martin Robinson. In r155784 the build was fixed by skipping Console::profile() and Console::profileEnd(), but the patch also skipped other methods containing the profile method name. Those were incorrectly deprecated in r158662 thinking that the property had been removed in the idl. * bindings/gobject/WebKitDOMDeprecated.cpp: Undeprecate webkit_dom_html_head_element_get_profile and webkit_dom_html_head_element_set_profile. * bindings/gobject/WebKitDOMDeprecated.h: Ditto. * bindings/gobject/WebKitDOMDeprecated.symbols: Ditto. * bindings/scripts/CodeGeneratorGObject.pm: (SkipFunction): Skip webkit_dom_console_profile and webkit_dom_console_profile_end. 2013-12-13 Rob Buis Clean up SVGScriptElement https://bugs.webkit.org/show_bug.cgi?id=125527 Reviewed by Darin Adler. From the Blink port of this bug it becomes clear that svg/dom/SVGScriptElement/script-set-href.svg and svg/dom/svg-element-attribute-js-null.xhtml still hit an assert in Debug because SVGNames::typeAttr can't be used with fastGetAttribute in all cases, because it can be animatable. However for SVGScriptElement it is not animatable, so make isAnimatableAttribute virtual (note Debug only method) and allow typeAttr in the SVGScriptElement case to be useable for fastGetAttribute. Test: svg/dom/SVGScriptElement/script-type-attribute.svg * svg/SVGElement.h: * svg/SVGScriptElement.cpp: (WebCore::SVGScriptElement::isAnimatableAttribute): * svg/SVGScriptElement.h: 2013-12-13 Carlos Garcia Campos [GTK] Expose also webkit_dom_document_get_url https://bugs.webkit.org/show_bug.cgi?id=125691 Reviewed by Martin Robinson. For some reason we expose the URL property, so it can be accessed with g_object_get(), but we have a special case to not provide a public getter. * bindings/gobject/webkitdom.symbols: Add new symbol. * bindings/scripts/CodeGeneratorGObject.pm: (GenerateFunctions): Remove the special case of URL property. 2013-12-13 Andreas Kling CSSFilterImageValue constructor should require both image and filter. Make the CSSFilterImageValue::create() helper take both the image and filter CSSValues by PassRef since they should never be null. Tweaked ComputedStyleExtractor::valueForFilter() to return a PassRef for this to work. Reviewed by Anders Carlsson. 2013-12-12 Andreas Kling StyleResolver::adjustRenderStyle() should take RenderStyle references. This function doesn't handle null styles being passed, so prevent it at compile time. Reviewed by Anders Carlsson. 2013-12-13 Darin Adler Eliminate awkward virtualComputedStyle construction https://bugs.webkit.org/show_bug.cgi?id=125681 Reviewed by Andreas Kling. * dom/Element.cpp: (WebCore::Element::computedStyle): Tweak coding style a bit. * dom/Element.h: Marked computedStyle virtual and got rid of virtualComputedStyle. This fixes a bug that we would not call SVGElement::computedStyle if we called it through an Element pointer or reference. Not sure how to get test coverage for this. * dom/Node.cpp: (WebCore::Node::computedStyle): Use a loop instead of recursive virtual calls. * dom/Node.h: Made computedStyle virtual and got rid of virtualComputedStyle. * svg/SVGElement.cpp: (WebCore::SVGElement::computedStyle): Tweak coding style a bit. * svg/SVGElement.h: Made computedStyle virtual (and FINAL) and got rid fo virtualComputedStyle. 2013-12-13 Darin Adler Fix a couple stray uses of RefPtr that should release https://bugs.webkit.org/show_bug.cgi?id=125679 Reviewed by Andreas Kling. * css/CSSParser.cpp: (WebCore::CSSParser::parseFilter): Add calls to release, in one case rearranging the order of operations slightly so we don't release the pointer before using it. 2013-12-12 Alexey Proskuryakov WebCrypto wrapKey operation doesn't check key usage https://bugs.webkit.org/show_bug.cgi?id=125675 Reviewed by Darin Adler. Tests: crypto/subtle/unwrapKey-check-usage.html crypto/subtle/wrapKey-check-usage.html * bindings/js/JSSubtleCryptoCustom.cpp: (WebCore::JSSubtleCrypto::wrapKey): Added accidentally omitted code. Other operations are fine. 2013-12-12 Darin Adler Make some improvements in CSSImageGeneratorValue code https://bugs.webkit.org/show_bug.cgi?id=125676 Reviewed by Simon Fraser. * css/CSSCrossfadeValue.cpp: (WebCore::subimageKnownToBeOpaque): Take a reference to the CSSValue, since it's known not to be null. Used checked cast. (WebCore::CSSCrossfadeValue::knownToBeOpaque): Updated to pass a reference. * css/CSSImageGeneratorValue.cpp: (WebCore::CSSImageGeneratorValue::saveCachedImageForSize): Use make_unique instead of adoptPtr. (WebCore::CSSImageGeneratorValue::subimageIsPending): Use checked cast. (WebCore::CSSImageGeneratorValue::cachedImageForCSSValue): Ditto, also use nullptr. * css/CSSImageGeneratorValue.h: Removed unneeded includes, added some forward declarations, used unique_ptr instead of OwnPtr, and used CSS_VALUE_TYPE_CASTS macro to create cast functions. * css/CSSValue.cpp: Removed unneeded include of CSSImageGeneratorValue.h. * css/StyleResolver.cpp: (WebCore::StyleResolver::State::clear): Use nullptr instead of 0. (WebCore::StyleResolver::applyProperty): Use checked cast and pass references instead of pointers to StyleGeneratedImage::create. (WebCore::StyleResolver::styleImage): Use checked cast and pass references instead of pointers to generatedOrPendingFromValue. (WebCore::StyleResolver::generatedOrPendingFromValue): Take the value as a reference instead of a pointer. (WebCore::StyleResolver::loadPendingImage): Pass a refernece instead of a pointer to StyleGeneratedImage::create. (WebCore::StyleResolver::loadPendingImages): Use auto for iteration instead of a lot type name. * css/StyleResolver.h: Changed generatedOrPendingFromValue to take the value as a reference instead of a pointer. * page/animation/CSSPropertyAnimation.cpp: (WebCore::blendFilter): Pass a reference insted of a pointer to StyleGeneratedImage::create. (WebCore::crossfadeBlend): Ditto. (WebCore::blendFunc): Ditto. Also use references for local variables. * rendering/style/StyleGeneratedImage.cpp: (WebCore::StyleGeneratedImage::StyleGeneratedImage): Use PassRef instead of PassRefPtr for the argument type. (WebCore::StyleGeneratedImage::cssValue): Updated since m_imageGeneratorValue is now a Ref instead of a RefPtr. Sadly this requires a const_cast that we can come back and get rid of later. (WebCore::StyleGeneratedImage::imageSize): Ditto. (WebCore::StyleGeneratedImage::image): Ditto. * rendering/style/StyleGeneratedImage.h: Changed create function and constructor to take a PassRef. Made imageValue non-const since it returns a non-const value, to be consistent with "conceptual const". Changed m_imageGeneratorValue to be a Ref instead of a RefPtr. * rendering/style/StyleImage.h: Made WrappedImagePtr be const void*, since it's a pointer used only for equality checks. Not a great idiom, but fine to use a const pointer instead of non-const, and avoids the const_cast we'd otherwise need in StyleGeneratedImage::data. 2013-12-12 KyungTae Kim Improve the find word boundary performance https://bugs.webkit.org/show_bug.cgi?id=125619 In endWordBoundary case, the textBreakPrevious call in findWordBoundary is unnecessary. So use separate function for endWordBoundary can improve the performance. Reviewed by Darin Adler. No tests because no operation changes. * editing/VisibleUnits.cpp: Use findEndWordBoundary in endWordBoundary (WebCore::endWordBoundary): * platform/text/TextBoundaries.cpp: Add findEndWordBoundary function (WebCore::findEndWordBoundary): * platform/text/TextBoundaries.h: * platform/text/mac/TextBoundaries.mm: Add findEndWordBoundary function (WebCore::findEndWordBoundary): 2013-12-12 Benjamin Poulain Fix a silly mistake of r160467 https://bugs.webkit.org/show_bug.cgi?id=125657 Reviewed by Alexey Proskuryakov. Fix a typo. The validity check was missing the logical not. * platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp: (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::willSendRequest): (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveResponse): (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveData): (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didFinishLoading): (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didFail): (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::willCacheResponse): (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveChallenge): (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didSendBodyData): (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::shouldUseCredentialStorage): (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::canRespondToProtectionSpace): (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveDataArray): 2013-12-12 Tim Horton [wk2] Handle pinch-to-zoom gesture https://bugs.webkit.org/show_bug.cgi?id=125604 Reviewed by Simon Fraser. * WebCore.exp.in: Export some TransformationMatrix functions. * WebCore.xcodeproj/project.pbxproj: Make some headers private so that RenderLayerCompositor/Backing can be used from WebKit2. * rendering/RenderLayerCompositor.h: (WebCore::RenderLayerCompositor::layerForContentShadow): Add a getter for the content shadow layer. 2013-12-12 Brady Eidson DatabaseProcess IndexedDB: Establish a metadata backing store on disk https://bugs.webkit.org/show_bug.cgi?id=125258 Reviewed by Alexey Proskuryakov, Anders Carlsson, and Tim Horton. Teach CrossThreadCopier how to handle IDBDatabaseMetadata. * CMakeLists.txt: * GNUmakefile.list.am: * WebCore.exp.in: * WebCore.xcodeproj/project.pbxproj: * Modules/indexeddb/IDBDatabaseMetadata.cpp: Added. (WebCore::IDBDatabaseMetadata::isolatedCopy): (WebCore::IDBObjectStoreMetadata::isolatedCopy): (WebCore::IDBIndexMetadata::isolatedCopy): * Modules/indexeddb/IDBDatabaseMetadata.h: * Modules/indexeddb/IDBKeyPath.cpp: (WebCore::IDBKeyPath::isolatedCopy): * Modules/indexeddb/IDBKeyPath.h: * platform/CrossThreadCopier.cpp: (WebCore::::copy): Add an IDBDatabaseMetadata specialization. * platform/CrossThreadCopier.h: 2013-12-12 Alexey Proskuryakov Add support for RSAES-PKCS1-v1_5 https://bugs.webkit.org/show_bug.cgi?id=125647 Build fix. * crypto/CommonCryptoUtilities.h: Declare a newly used private constant. 2013-12-12 Alexey Proskuryakov Add support for RSAES-PKCS1-v1_5 https://bugs.webkit.org/show_bug.cgi?id=125647 Reviewed by Anders Carlsson. Tests: crypto/subtle/rsaes-pkcs1-v1_5-decrypt.html crypto/subtle/rsaes-pkcs1-v1_5-wrap-unwrap-aes.html * crypto/algorithms/CryptoAlgorithmAES_KW.cpp: * crypto/algorithms/CryptoAlgorithmAES_KW.h: Removed meaningless parameters arguments from private functions. The base arguments class is always empty. * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSCryptoAlgorithmDictionary.cpp: (WebCore::JSCryptoAlgorithmDictionary::createParametersForEncrypt): (WebCore::JSCryptoAlgorithmDictionary::createParametersForDecrypt): * bindings/js/JSCryptoKeySerializationJWK.cpp: (WebCore::JSCryptoKeySerializationJWK::reconcileAlgorithm): (WebCore::JSCryptoKeySerializationJWK::keySizeIsValid): (WebCore::JSCryptoKeySerializationJWK::addJWKAlgorithmToJSON): * crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.cpp: Added. (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::CryptoAlgorithmRSAES_PKCS1_v1_5): (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::~CryptoAlgorithmRSAES_PKCS1_v1_5): (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::create): (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::identifier): (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::keyAlgorithmMatches): (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::encrypt): (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::decrypt): (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::generateKey): (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::importKey): * crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.h: Added. * crypto/mac/CryptoAlgorithmRSAES_PKCS1_v1_5Mac.cpp: Added. (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::platformEncrypt): (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::platformDecrypt): * crypto/mac/CryptoAlgorithmRegistryMac.cpp: (WebCore::CryptoAlgorithmRegistry::platformRegisterAlgorithms): Added support for this algorithm. 2013-12-12 Andreas Kling [Mac] Stop not caching HTTP resources with "Vary" header in response. Remove the workaround preventing resources with the "Vary" header from going into cache, as the CFNetwork cache has supported this for quite a while now. 31.5 MB progression on Membuster3, because we can now mmap those resources from disk once they are in the cache. We keep the workaround on PLATFORM(WIN) for now. Reviewed by Antti Koivisto. 2013-12-12 Sam Weinig Replace uses of WTF::BitArray with std::bitset https://bugs.webkit.org/show_bug.cgi?id=125642 Reviewed by Anders Carlsson. * css/CSSParser.cpp: (WebCore::filterProperties): (WebCore::CSSParser::createStyleProperties): * css/StyleProperties.cpp: (WebCore::StyleProperties::asText): 2013-12-12 Alexey Proskuryakov Public key in a generated KeyPair should always be extractable https://bugs.webkit.org/show_bug.cgi?id=125643 Reviewed by Sam Weinig. The spec doesn't explain how generateKey works with key pairs (there are open bugs about that). Making public keys non-extractable makes no sense one way or another. Test: crypto/subtle/rsa-oaep-generate-non-extractable-key.html * crypto/mac/CryptoKeyRSAMac.cpp: (WebCore::CryptoKeyRSA::generatePair): 2013-12-12 Alexey Proskuryakov Make algorithm.name return registered name, not normalized one https://bugs.webkit.org/show_bug.cgi?id=125641 Reviewed by Anders Carlsson. Currently, WebCrypto editor's draft stipulates that algorithm name is lowercased as part of normalization. But it makes little sense to register algorithms as mixed (mostly upper) case, yet return the name lowercased. Other implementations don't bother respecting this, and signs are that the spec will change. I'd like to match other implementations here, because sticking to the spec only makes us fail 3rd party test suites for no good reason. Updated many existing tests. * crypto/CryptoAlgorithmRegistry.cpp: (WebCore::CryptoAlgorithmRegistry::getIdentifierForName): (WebCore::CryptoAlgorithmRegistry::registerAlgorithm): * crypto/CryptoAlgorithmRegistry.h: * crypto/algorithms/CryptoAlgorithmAES_CBC.cpp: * crypto/algorithms/CryptoAlgorithmAES_KW.cpp: * crypto/algorithms/CryptoAlgorithmHMAC.cpp: * crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp: * crypto/algorithms/CryptoAlgorithmRSA_OAEP.cpp: * crypto/algorithms/CryptoAlgorithmSHA1.cpp: * crypto/algorithms/CryptoAlgorithmSHA224.cpp: * crypto/algorithms/CryptoAlgorithmSHA256.cpp: * crypto/algorithms/CryptoAlgorithmSHA384.cpp: * crypto/algorithms/CryptoAlgorithmSHA512.cpp: 2013-12-12 Csaba Osztrogonác Move CertificateInfo to WebCore https://bugs.webkit.org/show_bug.cgi?id=124720 Reviewed by Darin Adler. Based on the patch by Kwang Yul Seo * GNUmakefile.list.am: * PlatformEfl.cmake: * PlatformGTK.cmake: * WebCore.exp.in: * WebCore.xcodeproj/project.pbxproj: * platform/network/mac/CertificateInfo.h: Renamed from Source/WebKit2/Shared/mac/CertificateInfo.h. (WebCore::CertificateInfo::setCertificateChain): Added, because WebCoreArgumentCoders needs it. * platform/network/mac/CertificateInfoMac.mm: Renamed from Source/WebKit2/Shared/mac/CertificateInfo.mm. (WebCore::CertificateInfo::CertificateInfo): Moved encode() and decode() to WebCoreArgumentCodersMac.mm. * platform/network/soup/CertificateInfo.cpp: Copied from Source/WebKit2/Shared/WebCertificateInfo.h. (WebCore::CertificateInfo::CertificateInfo): Moved encode() and decode() to WebCoreArgumentCodersSoup.cpp. * platform/network/soup/CertificateInfo.h: Renamed from Source/WebKit2/Shared/soup/CertificateInfo.h. (WebCore::CertificateInfo::setCertificate): Added, because WebCoreArgumentCoders needs it. (WebCore::CertificateInfo::setTLSErrors): Added, because WebCoreArgumentCoders needs it. 2013-12-12 Commit Queue Unreviewed, rolling out r160417. http://trac.webkit.org/changeset/160417 https://bugs.webkit.org/show_bug.cgi?id=125629 The patch is causing crashes (Requested by zdobersek1 on #webkit). * accessibility/AXObjectCache.cpp: (WebCore::AXObjectCache::~AXObjectCache): (WebCore::AXObjectCache::remove): * accessibility/AXObjectCache.h: (WebCore::AXObjectCache::detachWrapper): * accessibility/atk/AXObjectCacheAtk.cpp: (WebCore::AXObjectCache::detachWrapper): (WebCore::AXObjectCache::attachWrapper): (WebCore::AXObjectCache::postPlatformNotification): * accessibility/ios/AXObjectCacheIOS.mm: (WebCore::AXObjectCache::detachWrapper): * accessibility/mac/AXObjectCacheMac.mm: (WebCore::AXObjectCache::detachWrapper): * accessibility/win/AXObjectCacheWin.cpp: (WebCore::AXObjectCache::detachWrapper): 2013-12-12 Martin Robinson Remove a few more guards mistakenly added in r160367 Reviewed by Carlos Garcia Campos r160367 was too liberal in hiding APIs from the GObject DOM bindings. We should expose the BatteryManager and the text and audio tracks. * Modules/battery/BatteryManager.idl: * html/HTMLMediaElement.idl: 2013-12-11 Darin Adler StylePendingImage needs to correctly manage the CSSValue pointer lifetime https://bugs.webkit.org/show_bug.cgi?id=125468 Reviewed by Andreas Kling. Test: fast/css/pending-image-crash.xhtml Disconnect the reference counted StylePendingImage from the CSSValue that owns it when it's not needed any more, otherwise we could end up using a pointer that might no longer be valid. * css/CSSCursorImageValue.cpp: (WebCore::CSSCursorImageValue::detachPendingImage): Added. Calls detachFromCSSValue on the current image if it is a StylePendingImage. (WebCore::CSSCursorImageValue::~CSSCursorImageValue): Call detachPendingImage. (WebCore::CSSCursorImageValue::cachedImage): Call detachPendingImage before changing m_image to a new value. (WebCore::CSSCursorImageValue::clearCachedImage): Ditto. * css/CSSCursorImageValue.h: Added detachPendingImage. * css/CSSImageSetValue.cpp: (WebCore::CSSImageSetValue::detachPendingImage): Added. Calls detachFromCSSValue on the current image set if it is a StylePendingImage. (WebCore::CSSImageSetValue::~CSSImageSetValue): Call detachPendingImage. (WebCore::CSSImageSetValue::cachedImageSet): Call detachPendingImage before changing m_imageSet to a new value. * css/CSSImageSetValue.h: Added detachPendingImage. * css/CSSImageValue.cpp: (WebCore::CSSImageValue::detachPendingImage): Added. Calls detachFromCSSValue on the current image if it is a StylePendingImage. (WebCore::CSSImageValue::~CSSImageValue): Call detachPendingImage. (WebCore::CSSImageValue::cachedImage): Call detachPendingImage before changing m_image to a new value. * css/CSSImageValue.h: Added detachPendingImage. * rendering/style/StylePendingImage.h: (WebCore::StylePendingImage::cssImageValue): Added a null check. (WebCore::StylePendingImage::cssImageGeneratorValue): Added a null check. (WebCore::StylePendingImage::cssCursorImageValue): Added a null check. (WebCore::StylePendingImage::cssImageSetValue): Added a null check. (WebCore::StylePendingImage::detachFromCSSValue): Added. Sets m_value to null since the style is no longer using this StylePendingImage. (WebCore::StylePendingImage::data): Changed to use the "this" pointer since all we need is some arbitrary pointer uniquely identifying the image. Before loading the image, we have no suitable weak identifier, so it suffices to use the unique pointer to each StylePendingImage object. This function is used only in a limited way; it would be nice to find a way to make the code less strange long term. 2013-12-11 Darin Adler Remove some unneeded code noticed while looking at StylePendingImage https://bugs.webkit.org/show_bug.cgi?id=125618 Reviewed by Andreas Kling. * css/StyleResolver.cpp: (WebCore::StyleResolver::loadPendingImage): Removed redundant function calls. * rendering/RenderImageResource.cpp: Removed unneeded nullImage and usesImageContainerSize member functions. (WebCore::RenderImageResource::image): Use Image::nullImage directly instead of through RenderImageResourceImage::nullImage. * rendering/RenderImageResource.h: Removed unneeded usesImageContainerSize and nullImage functions. Also removed unneeded includes. * rendering/RenderImageResourceStyleImage.h: Removed unneeded usesImageContainerSize override. Nobody was calling it. 2013-12-11 Benjamin Poulain Add the CFNetwork implementation of the asynchronous ResourceHandle https://bugs.webkit.org/show_bug.cgi?id=124440 Reviewed by Alexey Proskuryakov. Add a second subclass of ResourceHandleCFURLConnectionDelegate: ResourceHandleCFURLConnectionDelegateWithOperationQueue. The difference is those objects handle the network callback on a different queue. Some common code has been refactored in ResourceHandleCFURLConnectionDelegate to reduce duplicated code. The initialization of the request and connection is moved to the subclass to clean up initialization. * WebCore.xcodeproj/project.pbxproj: * platform/network/ResourceHandle.h: * platform/network/ResourceHandleClient.cpp: (WebCore::ResourceHandleClient::willCacheResponseAsync): * platform/network/ResourceHandleClient.h: * platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp: Added. (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::ResourceHandleCFURLConnectionDelegateWithOperationQueue): (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::~ResourceHandleCFURLConnectionDelegateWithOperationQueue): (WebCore::connectionWasCancelled): (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::setupRequest): (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::setupConnectionScheduling): (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::willSendRequest): (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveResponse): (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveData): (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didFinishLoading): (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didFail): (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::willCacheResponse): (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveChallenge): (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didSendBodyData): (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::shouldUseCredentialStorage): (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::canRespondToProtectionSpace): (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveDataArray): (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::continueWillSendRequest): (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::continueDidReceiveResponse): (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::continueShouldUseCredentialStorage): (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::continueWillCacheResponse): (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::continueCanAuthenticateAgainstProtectionSpace): * platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.h: Copied from Source/WebCore/platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.h. * platform/network/cf/ResourceHandleCFNet.cpp: (WebCore::ResourceHandleInternal::~ResourceHandleInternal): (WebCore::ResourceHandle::createCFURLConnection): (WebCore::ResourceHandle::start): (WebCore::ResourceHandle::shouldUseCredentialStorage): (WebCore::ResourceHandle::canAuthenticateAgainstProtectionSpace): (WebCore::ResourceHandle::continueWillSendRequest): (WebCore::ResourceHandle::continueDidReceiveResponse): (WebCore::ResourceHandle::continueShouldUseCredentialStorage): (WebCore::ResourceHandle::continueCanAuthenticateAgainstProtectionSpace): (WebCore::ResourceHandle::continueWillCacheResponse): * platform/network/cf/ResourceHandleCFURLConnectionDelegate.cpp: (WebCore::ResourceHandleCFURLConnectionDelegate::releaseHandle): (WebCore::ResourceHandleCFURLConnectionDelegate::synthesizeRedirectResponseIfNecessary): (WebCore::ResourceHandleCFURLConnectionDelegate::createResourceRequest): * platform/network/cf/ResourceHandleCFURLConnectionDelegate.h: * platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.cpp: (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::setupRequest): (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::setupConnectionScheduling): (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::willSendRequest): (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::continueWillSendRequest): (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::continueDidReceiveResponse): (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::continueShouldUseCredentialStorage): (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::continueWillCacheResponse): (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::continueCanAuthenticateAgainstProtectionSpace): * platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.h: 2013-12-11 David Kilzer Define m_hasBadParent in InlineBox if defined(ADDRESS_SANITIZER) Reviewed by Darin Adler. No tests since this is a build fix for: $ ./Tools/Scripts/build-webkit --release OTHER_CFLAGS="$inherited -DADDRESS_SANITIZER=1" * rendering/InlineBox.cpp: * rendering/InlineBox.h: - Replace ASSERT_DISABLED use with ASSERT_WITH_SECURITY_IMPLICATION_DISABLED for m_hasBadParent. * rendering/InlineFlowBox.cpp: (WebCore::InlineFlowBox::~InlineFlowBox): - Use !ASSERT_WITH_SECURITY_IMPLICATION_DISABLED instead of #ifndef NDEBUG since this calls setHasBadParent(). (WebCore::InlineFlowBox::checkConsistency): - Move ASSERT(!m_hasBadChildList) outside of #if CHECK_CONSISTENCY and change to ASSERT_WITH_SECURITY_IMPLICATION(!m_hasBadChildList). * rendering/InlineFlowBox.h: (WebCore::InlineFlowBox::InlineFlowBox): (WebCore::InlineFlowBox::setHasBadChildList): - Change #ifndef NDEBUG to #if !ASSERT_WITH_SECURITY_IMPLICATION_DISABLED for code using m_hasBadChildList. 2013-12-11 Ralph Thomas [WebGL] Fix build on GL ES 2.0 targets after r160119 https://bugs.webkit.org/show_bug.cgi?id=125541 Reviewed by Brent Fulgham. GL ES 2.0 doesn't define GL_HALF_FLOAT_ARB, so pass through HALF_FLOAT_OES (which is defined for GL ES 2.0). This change also reverts r160324 which incorrectly defined GL_HALF_FLOAT_ARB for the Windows ANGLE target. No new tests, no change in functionality. * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp: (WebCore::GraphicsContext3D::texSubImage2D): 2013-12-11 Joseph Pecoraro Web Inspector: Push More Inspector Required Classes Down into JavaScriptCore https://bugs.webkit.org/show_bug.cgi?id=125324 Reviewed by Timothy Hatcher. Part 1: Push down core inspector classes. - Move InspectAgentBase, InspectorAgentRegistry, InspectorBackendDispatcher, InspectorValues down to JavaScriptCore and into the Inspector namespace. - Add forwarding headers for JavaScriptCore/inspector files. - Use the Inspector namespace where appropriate. - Rename InspectorBaseAgent to InspectorAgentBase for clarity. Part 2: Push Script wrapper classes down into JavaScriptCore/bindings. - Move ScriptObject and ScriptValue into JavaScriptCore but namespace Deprecated - Add forwarding headers - Use Deprecated::ScriptObject and Deprecated::ScriptValue everywhere. Part 3: Push Down ScriptFunctionCall - Move ScriptFunctionCall to JavaScriptCore/bindings into namespace Deprecated. - Give constructor a function to all for a different JSC::call, because WebCore ScriptFunctionCall's use JSMainThreadExecState when isMainThread. - Prefer Deprecated::ScriptFunctionCall everywhere it is used in WebCore. Part 4: Extract InspectorTypeBuilder helper functions - There is a chunk of InspectorTypeBuilder that never changes. Extract it into its own file, InspectorTypeBuilder.h in JSC/inspector, Inspector namespace. - This moves TypeBuilder from namespace WebCore to namespace Inspector - Rename the WebCore generated InspectorTypeBuilder to InspectorWebTypeBuilders, eventually the CodeGenerator script will do this for more then TypeBuilders and there will be "JS" TypeBuilders and "Web" TypeBuilders files. No new tests. No change in functionality, just moving things around. * CMakeLists.txt: * ForwardingHeaders/bindings/ScriptFunctionCall.h: Added. * ForwardingHeaders/bindings/ScriptObject.h: Added. * ForwardingHeaders/bindings/ScriptValue.h: Added. * ForwardingHeaders/inspector/InspectorAgentBase.h: Added. * ForwardingHeaders/inspector/InspectorAgentRegistry.h: Added. * ForwardingHeaders/inspector/InspectorBackendDispatcher.h: Added. * ForwardingHeaders/inspector/InspectorTypeBuilder.h: Added. * ForwardingHeaders/inspector/InspectorValues.h: Added. * GNUmakefile.am: * GNUmakefile.list.am: * Modules/indexeddb/IDBAny.cpp: (WebCore::IDBAny::scriptValue): (WebCore::IDBAny::IDBAny): * Modules/indexeddb/IDBAny.h: * Modules/indexeddb/IDBCursor.cpp: (WebCore::IDBCursor::key): (WebCore::IDBCursor::primaryKey): (WebCore::IDBCursor::value): (WebCore::IDBCursor::update): (WebCore::IDBCursor::continueFunction): (WebCore::IDBCursor::setValueReady): * Modules/indexeddb/IDBCursor.h: * Modules/indexeddb/IDBFactory.cpp: (WebCore::IDBFactory::cmp): * Modules/indexeddb/IDBFactory.h: * Modules/indexeddb/IDBIndex.cpp: (WebCore::IDBIndex::openCursor): (WebCore::IDBIndex::count): (WebCore::IDBIndex::openKeyCursor): (WebCore::IDBIndex::get): (WebCore::IDBIndex::getKey): * Modules/indexeddb/IDBIndex.h: (WebCore::IDBIndex::openCursor): (WebCore::IDBIndex::openKeyCursor): * Modules/indexeddb/IDBKeyRange.cpp: (WebCore::IDBKeyRange::lowerValue): (WebCore::IDBKeyRange::upperValue): (WebCore::IDBKeyRange::only): (WebCore::IDBKeyRange::lowerBound): (WebCore::IDBKeyRange::upperBound): (WebCore::IDBKeyRange::bound): * Modules/indexeddb/IDBKeyRange.h: (WebCore::IDBKeyRange::lowerBound): (WebCore::IDBKeyRange::upperBound): (WebCore::IDBKeyRange::bound): * Modules/indexeddb/IDBObjectStore.cpp: (WebCore::IDBObjectStore::get): (WebCore::generateIndexKeysForValue): (WebCore::IDBObjectStore::add): (WebCore::IDBObjectStore::put): (WebCore::IDBObjectStore::deleteFunction): (WebCore::IDBObjectStore::openCursor): (WebCore::IDBObjectStore::count): * Modules/indexeddb/IDBObjectStore.h: * Modules/indexeddb/IDBRequest.cpp: (WebCore::IDBRequest::setResultCursor): (WebCore::IDBRequest::onSuccess): (WebCore::IDBRequest::onSuccessInternal): * Modules/indexeddb/IDBRequest.h: * Modules/mediastream/CapabilityRange.cpp: (WebCore::scriptValue): (WebCore::CapabilityRange::min): (WebCore::CapabilityRange::max): * Modules/mediastream/CapabilityRange.h: * Modules/mediastream/MediaTrackConstraint.h: * Modules/mediastream/RTCIceCandidate.cpp: * Modules/plugins/QuickTimePluginReplacement.cpp: * Modules/plugins/QuickTimePluginReplacement.h: * UseJSC.cmake: * WebCore.exp.in: * WebCore.vcxproj/WebCore.vcxproj: * WebCore.vcxproj/WebCore.vcxproj.filters: * WebCore.xcodeproj/project.pbxproj: * bindings/js/Dictionary.h: (WebCore::Dictionary::getEventListener): * bindings/js/IDBBindingUtilities.cpp: (WebCore::createIDBKeyFromScriptValueAndKeyPath): (WebCore::injectIDBKeyIntoScriptValue): (WebCore::canInjectIDBKeyIntoScriptValue): (WebCore::deserializeIDBValue): (WebCore::deserializeIDBValueBuffer): (WebCore::idbKeyToScriptValue): (WebCore::scriptValueToIDBKey): * bindings/js/IDBBindingUtilities.h: * bindings/js/JSBindingsAllInOne.cpp: * bindings/js/JSDictionary.cpp: (WebCore::JSDictionary::convertValue): * bindings/js/JSDictionary.h: * bindings/js/JSHTMLCanvasElementCustom.cpp: (WebCore::JSHTMLCanvasElement::getContext): * bindings/js/JSInjectedScriptHostCustom.cpp: (WebCore::InjectedScriptHost::scriptValueAsNode): (WebCore::InjectedScriptHost::nodeAsScriptValue): (WebCore::JSInjectedScriptHost::inspectedObject): (WebCore::JSInjectedScriptHost::inspect): * bindings/js/JSInjectedScriptManager.cpp: (WebCore::InjectedScriptManager::createInjectedScript): * bindings/js/JSMainThreadExecState.cpp: (WebCore::functionCallHandlerFromAnyThread): * bindings/js/JSMainThreadExecState.h: (WebCore::JSMainThreadExecState::currentState): * bindings/js/JSMessageEventCustom.cpp: (WebCore::JSMessageEvent::data): (WebCore::handleInitMessageEvent): * bindings/js/ScheduledAction.cpp: * bindings/js/ScriptCallStackFactory.cpp: (WebCore::createScriptArguments): * bindings/js/ScriptController.cpp: (WebCore::ScriptController::evaluateInWorld): (WebCore::ScriptController::evaluate): (WebCore::ScriptController::executeScriptInWorld): (WebCore::ScriptController::executeScript): (WebCore::ScriptController::executeIfJavaScriptURL): * bindings/js/ScriptController.h: * bindings/js/ScriptDebugServer.cpp: (WebCore::ScriptDebugServer::setScriptSource): (WebCore::ScriptDebugServer::updateCallStack): (WebCore::ScriptDebugServer::dispatchDidPause): (WebCore::ScriptDebugServer::runScript): * bindings/js/ScriptDebugServer.h: * bindings/js/ScriptGlobalObject.cpp: Renamed from Source/WebCore/bindings/js/ScriptObject.cpp. (WebCore::handleException): (WebCore::ScriptGlobalObject::set): (WebCore::ScriptGlobalObject::get): (WebCore::ScriptGlobalObject::remove): * bindings/js/ScriptGlobalObject.h: Copied from Source/WebCore/inspector/ScriptCallStack.h. (WebCore::ScriptGlobalObject::ScriptGlobalObject): * bindings/js/ScriptObject.h: Removed. * bindings/js/ScriptProfile.cpp: (WebCore::buildInspectorObjectFor): (WebCore::ScriptProfile::buildInspectorObjectForHead): (WebCore::ScriptProfile::buildInspectorObjectForBottomUpHead): * bindings/js/ScriptProfile.h: * bindings/js/ScriptProfiler.cpp: (WebCore::ScriptProfiler::objectByHeapObjectId): (WebCore::ScriptProfiler::getHeapObjectId): * bindings/js/ScriptProfiler.h: * bindings/js/ScriptState.h: * bindings/js/SerializedScriptValue.cpp: (WebCore::SerializedScriptValue::deserializeForInspector): (WebCore::SerializedScriptValue::serialize): (WebCore::SerializedScriptValue::deserialize): * bindings/js/SerializedScriptValue.h: * bindings/js/WorkerScriptController.cpp: (WebCore::WorkerScriptController::evaluate): (WebCore::WorkerScriptController::setException): * bindings/js/WorkerScriptController.h: * bindings/scripts/CodeGeneratorJS.pm: * bindings/scripts/test/JS/JSTestObj.cpp: (WebCore::setJSTestObjAnyAttribute): * dom/CustomEvent.cpp: (WebCore::CustomEvent::initCustomEvent): * dom/CustomEvent.h: (WebCore::CustomEvent::detail): * dom/MessageEvent.cpp: (WebCore::MessageEvent::MessageEvent): (WebCore::MessageEvent::initMessageEvent): * dom/MessageEvent.h: (WebCore::MessageEvent::create): (WebCore::MessageEvent::dataAsScriptValue): * dom/PopStateEvent.h: (WebCore::PopStateEvent::state): * dom/ScriptElement.cpp: * html/HTMLMediaElement.cpp: * html/parser/XSSAuditor.cpp: * html/parser/XSSAuditorDelegate.cpp: * inspector/CodeGeneratorInspector.py: (RawTypes.BaseType.get_raw_validator_call_text): (RawTypes.Object.get_array_item_raw_c_type_text): (RawTypes.Any.get_array_item_raw_c_type_text): (RawTypes.Array.get_array_item_raw_c_type_text): (CommandReturnPassModel.OptOutput.get_return_var_type): (CommandReturnPassModel.OptOutput.get_output_parameter_type): (TypeModel.ExactlyInt.get_input_param_type_text): (TypeModel.ExactlyInt.get_opt_output_type_): (TypeModel.init_class): (TypeBindings.create_named_type_declaration.Helper): (TypeBindings.create_type_declaration_.EnumBinding.get_code_generator.CodeGenerator.generate_type_builder): (TypeBindings.create_type_declaration_.EnumBinding.get_setter_value_expression_pattern): (TypeBindings.create_type_declaration_.ClassBinding.get_code_generator.CodeGenerator.generate_type_builder): (Inspector): (ArrayBinding.get_array_item_c_type_text): (Generator.go): (Generator.process_command): * inspector/CodeGeneratorInspectorStrings.py: (void): (InspectorFrontend_h): (InspectorBackendDispatchers_h): * inspector/ConsoleMessage.cpp: (WebCore::messageSourceValue): (WebCore::messageTypeValue): (WebCore::messageLevelValue): (WebCore::ConsoleMessage::addToFrontend): * inspector/ConsoleMessage.h: * inspector/ContentSearchUtils.cpp: (WebCore::ContentSearchUtils::buildObjectForSearchMatch): (WebCore::ContentSearchUtils::searchInTextByLines): * inspector/ContentSearchUtils.h: * inspector/InjectedScript.cpp: (WebCore::InjectedScript::InjectedScript): (WebCore::InjectedScript::evaluate): (WebCore::InjectedScript::callFunctionOn): (WebCore::InjectedScript::evaluateOnCallFrame): (WebCore::InjectedScript::getFunctionDetails): (WebCore::InjectedScript::getProperties): (WebCore::InjectedScript::getInternalProperties): (WebCore::InjectedScript::nodeForObjectId): (WebCore::InjectedScript::releaseObject): (WebCore::InjectedScript::wrapCallFrames): (WebCore::InjectedScript::wrapObject): (WebCore::InjectedScript::wrapTable): (WebCore::InjectedScript::wrapNode): (WebCore::InjectedScript::findObjectById): (WebCore::InjectedScript::inspectNode): (WebCore::InjectedScript::releaseObjectGroup): (WebCore::InjectedScript::nodeAsScriptValue): * inspector/InjectedScript.h: * inspector/InjectedScriptBase.cpp: (WebCore::InjectedScriptBase::InjectedScriptBase): (WebCore::InjectedScriptBase::initialize): (WebCore::InjectedScriptBase::injectedScriptObject): (WebCore::InjectedScriptBase::callFunctionWithEvalEnabled): (WebCore::InjectedScriptBase::makeCall): (WebCore::InjectedScriptBase::makeEvalCall): * inspector/InjectedScriptBase.h: * inspector/InjectedScriptCanvasModule.cpp: (WebCore::InjectedScriptCanvasModule::wrapCanvas2DContext): (WebCore::InjectedScriptCanvasModule::wrapWebGLContext): (WebCore::InjectedScriptCanvasModule::callWrapContextFunction): (WebCore::InjectedScriptCanvasModule::markFrameEnd): (WebCore::InjectedScriptCanvasModule::callStartCapturingFunction): (WebCore::InjectedScriptCanvasModule::callVoidFunctionWithTraceLogIdArgument): (WebCore::InjectedScriptCanvasModule::traceLog): (WebCore::InjectedScriptCanvasModule::replayTraceLog): (WebCore::InjectedScriptCanvasModule::resourceInfo): (WebCore::InjectedScriptCanvasModule::resourceState): * inspector/InjectedScriptCanvasModule.h: * inspector/InjectedScriptHost.cpp: (WebCore::InjectedScriptHost::inspectImpl): (WebCore::InjectedScriptHost::InspectableObject::get): * inspector/InjectedScriptHost.h: * inspector/InjectedScriptManager.cpp: (WebCore::InjectedScriptManager::injectedScriptFor): * inspector/InjectedScriptManager.h: * inspector/InjectedScriptModule.cpp: (WebCore::InjectedScriptModule::ensureInjected): * inspector/InspectorAgent.cpp: (WebCore::InspectorAgent::InspectorAgent): (WebCore::InspectorAgent::didCreateFrontendAndBackend): (WebCore::InspectorAgent::inspect): * inspector/InspectorAgent.h: * inspector/InspectorAllInOne.cpp: * inspector/InspectorApplicationCacheAgent.cpp: (WebCore::InspectorApplicationCacheAgent::InspectorApplicationCacheAgent): (WebCore::InspectorApplicationCacheAgent::didCreateFrontendAndBackend): (WebCore::InspectorApplicationCacheAgent::getFramesWithManifests): (WebCore::InspectorApplicationCacheAgent::getApplicationCacheForFrame): (WebCore::InspectorApplicationCacheAgent::buildObjectForApplicationCache): (WebCore::InspectorApplicationCacheAgent::buildArrayForApplicationCacheResources): (WebCore::InspectorApplicationCacheAgent::buildObjectForApplicationCacheResource): * inspector/InspectorApplicationCacheAgent.h: * inspector/InspectorCSSAgent.cpp: (WebCore::SelectorProfile::toInspectorObject): (WebCore::InspectorCSSAgent::InspectorCSSAgent): (WebCore::InspectorCSSAgent::didCreateFrontendAndBackend): (WebCore::InspectorCSSAgent::getMatchedStylesForNode): (WebCore::InspectorCSSAgent::getInlineStylesForNode): (WebCore::InspectorCSSAgent::getComputedStyleForNode): (WebCore::InspectorCSSAgent::getAllStyleSheets): (WebCore::InspectorCSSAgent::getStyleSheet): (WebCore::InspectorCSSAgent::setStyleText): (WebCore::InspectorCSSAgent::setPropertyText): (WebCore::InspectorCSSAgent::toggleProperty): (WebCore::InspectorCSSAgent::setRuleSelector): (WebCore::InspectorCSSAgent::addRule): (WebCore::InspectorCSSAgent::getSupportedCSSProperties): (WebCore::InspectorCSSAgent::getNamedFlowCollection): (WebCore::InspectorCSSAgent::stopSelectorProfiler): (WebCore::InspectorCSSAgent::stopSelectorProfilerImpl): (WebCore::InspectorCSSAgent::asInspectorStyleSheet): (WebCore::InspectorCSSAgent::collectStyleSheets): (WebCore::InspectorCSSAgent::viaInspectorStyleSheet): (WebCore::InspectorCSSAgent::detectOrigin): (WebCore::InspectorCSSAgent::buildObjectForRule): (WebCore::InspectorCSSAgent::buildArrayForRuleList): (WebCore::InspectorCSSAgent::buildArrayForMatchedRuleList): (WebCore::InspectorCSSAgent::buildObjectForAttributesStyle): (WebCore::InspectorCSSAgent::buildArrayForRegions): (WebCore::InspectorCSSAgent::buildObjectForNamedFlow): * inspector/InspectorCSSAgent.h: * inspector/InspectorCanvasAgent.cpp: (WebCore::InspectorCanvasAgent::InspectorCanvasAgent): (WebCore::InspectorCanvasAgent::didCreateFrontendAndBackend): (WebCore::InspectorCanvasAgent::wrapCanvas2DRenderingContextForInstrumentation): (WebCore::InspectorCanvasAgent::wrapWebGLRenderingContextForInstrumentation): (WebCore::InspectorCanvasAgent::notifyRenderingContextWasWrapped): (WebCore::InspectorCanvasAgent::injectedScriptCanvasModule): * inspector/InspectorCanvasAgent.h: * inspector/InspectorCanvasInstrumentation.h: (WebCore::InspectorInstrumentation::wrapCanvas2DRenderingContextForInstrumentation): (WebCore::InspectorInstrumentation::wrapWebGLRenderingContextForInstrumentation): * inspector/InspectorClient.cpp: * inspector/InspectorClient.h: * inspector/InspectorConsoleAgent.cpp: (WebCore::InspectorConsoleAgent::InspectorConsoleAgent): (WebCore::InspectorConsoleAgent::didCreateFrontendAndBackend): (WebCore::InspectableHeapObject::get): * inspector/InspectorConsoleAgent.h: * inspector/InspectorController.cpp: * inspector/InspectorController.h: * inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::InspectorDOMAgent): (WebCore::InspectorDOMAgent::didCreateFrontendAndBackend): (WebCore::InspectorDOMAgent::getDocument): (WebCore::InspectorDOMAgent::pushChildNodesToFrontend): (WebCore::InspectorDOMAgent::querySelectorAll): (WebCore::InspectorDOMAgent::pushNodePathToFrontend): (WebCore::InspectorDOMAgent::getEventListenersForNode): (WebCore::InspectorDOMAgent::getSearchResults): (WebCore::InspectorDOMAgent::resolveNode): (WebCore::InspectorDOMAgent::getAttributes): (WebCore::InspectorDOMAgent::buildObjectForNode): (WebCore::InspectorDOMAgent::buildArrayForElementAttributes): (WebCore::InspectorDOMAgent::buildArrayForContainerChildren): (WebCore::InspectorDOMAgent::buildObjectForEventListener): (WebCore::InspectorDOMAgent::didCommitLoad): (WebCore::InspectorDOMAgent::didInsertDOMNode): (WebCore::InspectorDOMAgent::styleAttributeInvalidated): * inspector/InspectorDOMAgent.h: * inspector/InspectorDOMDebuggerAgent.cpp: (WebCore::InspectorDOMDebuggerAgent::InspectorDOMDebuggerAgent): (WebCore::InspectorDOMDebuggerAgent::didCreateFrontendAndBackend): (WebCore::InspectorDOMDebuggerAgent::descriptionForDOMEvent): * inspector/InspectorDOMDebuggerAgent.h: * inspector/InspectorDOMStorageAgent.cpp: (WebCore::InspectorDOMStorageAgent::InspectorDOMStorageAgent): (WebCore::InspectorDOMStorageAgent::didCreateFrontendAndBackend): (WebCore::InspectorDOMStorageAgent::getDOMStorageItems): (WebCore::InspectorDOMStorageAgent::storageId): (WebCore::InspectorDOMStorageAgent::didDispatchDOMStorageEvent): * inspector/InspectorDOMStorageAgent.h: * inspector/InspectorDatabaseAgent.cpp: (WebCore::InspectorDatabaseAgent::InspectorDatabaseAgent): (WebCore::InspectorDatabaseAgent::didCreateFrontendAndBackend): (WebCore::InspectorDatabaseAgent::getDatabaseTableNames): * inspector/InspectorDatabaseAgent.h: * inspector/InspectorDatabaseResource.cpp: (WebCore::InspectorDatabaseResource::bind): * inspector/InspectorDebuggerAgent.cpp: (WebCore::InspectorDebuggerAgent::InspectorDebuggerAgent): (WebCore::InspectorDebuggerAgent::didCreateFrontendAndBackend): (WebCore::breakpointActionTypeForString): (WebCore::InspectorDebuggerAgent::setBreakpointByUrl): (WebCore::InspectorDebuggerAgent::setBreakpoint): (WebCore::InspectorDebuggerAgent::resolveBreakpoint): (WebCore::scriptToInspectorObject): (WebCore::InspectorDebuggerAgent::searchInContent): (WebCore::InspectorDebuggerAgent::setScriptSource): (WebCore::InspectorDebuggerAgent::getFunctionDetails): (WebCore::InspectorDebuggerAgent::evaluateOnCallFrame): (WebCore::InspectorDebuggerAgent::compileScript): (WebCore::InspectorDebuggerAgent::runScript): (WebCore::InspectorDebuggerAgent::currentCallFrames): (WebCore::InspectorDebuggerAgent::didParseSource): (WebCore::InspectorDebuggerAgent::didPause): (WebCore::InspectorDebuggerAgent::didContinue): (WebCore::InspectorDebuggerAgent::clear): * inspector/InspectorDebuggerAgent.h: * inspector/InspectorForwarding.h: * inspector/InspectorFrontendClientLocal.cpp: (WebCore::InspectorFrontendClientLocal::evaluateAsBoolean): * inspector/InspectorFrontendHost.cpp: (WebCore::FrontendMenuProvider::create): (WebCore::FrontendMenuProvider::disconnect): (WebCore::FrontendMenuProvider::FrontendMenuProvider): (WebCore::FrontendMenuProvider::contextMenuItemSelected): (WebCore::FrontendMenuProvider::contextMenuCleared): (WebCore::InspectorFrontendHost::showContextMenu): * inspector/InspectorHeapProfilerAgent.cpp: (WebCore::InspectorHeapProfilerAgent::InspectorHeapProfilerAgent): (WebCore::InspectorHeapProfilerAgent::didCreateFrontendAndBackend): (WebCore::InspectorHeapProfilerAgent::createSnapshotHeader): (WebCore::InspectorHeapProfilerAgent::getProfileHeaders): (WebCore::InspectorHeapProfilerAgent::getObjectByHeapObjectId): (WebCore::InspectorHeapProfilerAgent::getHeapObjectId): * inspector/InspectorHeapProfilerAgent.h: * inspector/InspectorIndexedDBAgent.cpp: (WebCore::InspectorIndexedDBAgent::InspectorIndexedDBAgent): (WebCore::InspectorIndexedDBAgent::didCreateFrontendAndBackend): * inspector/InspectorIndexedDBAgent.h: * inspector/InspectorInputAgent.cpp: (WebCore::InspectorInputAgent::InspectorInputAgent): (WebCore::InspectorInputAgent::didCreateFrontendAndBackend): * inspector/InspectorInputAgent.h: * inspector/InspectorInstrumentation.cpp: * inspector/InspectorInstrumentation.h: * inspector/InspectorLayerTreeAgent.cpp: (WebCore::InspectorLayerTreeAgent::InspectorLayerTreeAgent): (WebCore::InspectorLayerTreeAgent::didCreateFrontendAndBackend): (WebCore::InspectorLayerTreeAgent::layersForNode): (WebCore::InspectorLayerTreeAgent::gatherLayersUsingRenderObjectHierarchy): (WebCore::InspectorLayerTreeAgent::gatherLayersUsingRenderLayerHierarchy): (WebCore::InspectorLayerTreeAgent::buildObjectForLayer): (WebCore::InspectorLayerTreeAgent::buildObjectForIntRect): (WebCore::InspectorLayerTreeAgent::reasonsForCompositingLayer): * inspector/InspectorLayerTreeAgent.h: * inspector/InspectorMemoryAgent.cpp: (WebCore::InspectorMemoryAgent::didCreateFrontendAndBackend): (WebCore::InspectorMemoryAgent::InspectorMemoryAgent): * inspector/InspectorMemoryAgent.h: * inspector/InspectorOverlay.cpp: * inspector/InspectorOverlay.h: * inspector/InspectorPageAgent.cpp: (WebCore::InspectorPageAgent::resourceTypeJson): (WebCore::InspectorPageAgent::cachedResourceTypeJson): (WebCore::InspectorPageAgent::InspectorPageAgent): (WebCore::InspectorPageAgent::didCreateFrontendAndBackend): (WebCore::buildObjectForCookie): (WebCore::buildArrayForCookies): (WebCore::InspectorPageAgent::getCookies): (WebCore::InspectorPageAgent::getResourceTree): (WebCore::InspectorPageAgent::searchInResource): (WebCore::buildObjectForSearchResult): (WebCore::InspectorPageAgent::searchInResources): (WebCore::InspectorPageAgent::buildObjectForFrame): (WebCore::InspectorPageAgent::buildObjectForFrameTree): * inspector/InspectorPageAgent.h: * inspector/InspectorProfilerAgent.cpp: (WebCore::InspectorProfilerAgent::InspectorProfilerAgent): (WebCore::InspectorProfilerAgent::createProfileHeader): (WebCore::InspectorProfilerAgent::createSnapshotHeader): (WebCore::InspectorProfilerAgent::getProfileHeaders): (WebCore::InspectorProfilerAgent::getCPUProfile): (WebCore::InspectorProfilerAgent::didCreateFrontendAndBackend): (WebCore::InspectorProfilerAgent::getObjectByHeapObjectId): (WebCore::InspectorProfilerAgent::getHeapObjectId): * inspector/InspectorProfilerAgent.h: * inspector/InspectorResourceAgent.cpp: (WebCore::InspectorResourceAgent::didCreateFrontendAndBackend): (WebCore::buildObjectForTiming): (WebCore::buildObjectForResourceRequest): (WebCore::buildObjectForResourceResponse): (WebCore::buildObjectForCachedResource): (WebCore::InspectorResourceAgent::willSendRequest): (WebCore::InspectorResourceAgent::didReceiveResponse): (WebCore::InspectorResourceAgent::didLoadResourceFromMemoryCache): (WebCore::InspectorResourceAgent::buildInitiatorObject): (WebCore::InspectorResourceAgent::willSendWebSocketHandshakeRequest): (WebCore::InspectorResourceAgent::didReceiveWebSocketHandshakeResponse): (WebCore::InspectorResourceAgent::didReceiveWebSocketFrame): (WebCore::InspectorResourceAgent::didSendWebSocketFrame): (WebCore::InspectorResourceAgent::InspectorResourceAgent): * inspector/InspectorResourceAgent.h: * inspector/InspectorRuntimeAgent.cpp: (WebCore::InspectorRuntimeAgent::InspectorRuntimeAgent): (WebCore::buildErrorRangeObject): (WebCore::InspectorRuntimeAgent::parse): (WebCore::InspectorRuntimeAgent::evaluate): (WebCore::InspectorRuntimeAgent::callFunctionOn): (WebCore::InspectorRuntimeAgent::getProperties): * inspector/InspectorRuntimeAgent.h: * inspector/InspectorStyleSheet.cpp: (WebCore::buildSourceRangeObject): (WebCore::buildMediaObject): (WebCore::fillMediaListChain): (WebCore::InspectorStyle::buildObjectForStyle): (WebCore::InspectorStyle::buildArrayForComputedStyle): (WebCore::InspectorStyle::styleWithProperties): (WebCore::InspectorStyleSheet::create): (WebCore::InspectorStyleSheet::InspectorStyleSheet): (WebCore::InspectorStyleSheet::buildObjectForStyleSheet): (WebCore::InspectorStyleSheet::buildObjectForStyleSheetInfo): (WebCore::selectorsFromSource): (WebCore::InspectorStyleSheet::buildObjectForSelectorList): (WebCore::InspectorStyleSheet::buildObjectForRule): (WebCore::InspectorStyleSheet::buildObjectForStyle): (WebCore::InspectorStyleSheet::resourceStyleSheetText): (WebCore::InspectorStyleSheet::buildArrayForRuleList): (WebCore::InspectorStyleSheetForInlineStyle::create): (WebCore::InspectorStyleSheetForInlineStyle::InspectorStyleSheetForInlineStyle): * inspector/InspectorStyleSheet.h: (WebCore::InspectorCSSId::InspectorCSSId): (WebCore::InspectorStyleSheet::canBind): * inspector/InspectorStyleTextEditor.cpp: * inspector/InspectorTimelineAgent.cpp: (WebCore::InspectorTimelineAgent::didCreateFrontendAndBackend): (WebCore::toProtocol): (WebCore::InspectorTimelineAgent::innerAddRecordToTimeline): (WebCore::InspectorTimelineAgent::setDOMCounters): (WebCore::InspectorTimelineAgent::InspectorTimelineAgent): (WebCore::InspectorTimelineAgent::sendEvent): * inspector/InspectorTimelineAgent.h: (WebCore::InspectorTimelineAgent::TimelineRecordEntry::TimelineRecordEntry): * inspector/InspectorWebAgentBase.h: Renamed from Source/WebCore/inspector/InspectorAgentRegistry.h. (WebCore::InspectorAgentBase::InspectorAgentBase): * inspector/InspectorWorkerAgent.cpp: (WebCore::InspectorWorkerAgent::InspectorWorkerAgent): (WebCore::InspectorWorkerAgent::didCreateFrontendAndBackend): * inspector/InspectorWorkerAgent.h: * inspector/InstrumentingAgents.cpp: * inspector/NetworkResourcesData.cpp: * inspector/PageConsoleAgent.cpp: (WebCore::InspectableNode::get): * inspector/PageDebuggerAgent.cpp: * inspector/PageDebuggerAgent.h: * inspector/PageRuntimeAgent.cpp: (WebCore::PageRuntimeAgent::didCreateFrontendAndBackend): * inspector/PageRuntimeAgent.h: * inspector/ScriptArguments.cpp: (WebCore::ScriptArguments::create): (WebCore::ScriptArguments::ScriptArguments): (WebCore::ScriptArguments::argumentAt): (WebCore::ScriptArguments::getFirstArgumentAsString): * inspector/ScriptArguments.h: * inspector/ScriptCallFrame.cpp: (WebCore::ScriptCallFrame::buildInspectorObject): * inspector/ScriptCallFrame.h: * inspector/ScriptCallStack.cpp: (WebCore::ScriptCallStack::buildInspectorArray): * inspector/ScriptCallStack.h: * inspector/ScriptDebugListener.h: * inspector/TimelineRecordFactory.cpp: * inspector/TimelineRecordFactory.h: (WebCore::TimelineRecordFactory::createWebSocketCreateData): (WebCore::TimelineRecordFactory::createGenericWebSocketData): * inspector/WorkerConsoleAgent.cpp: * inspector/WorkerDebuggerAgent.cpp: * inspector/WorkerInspectorController.cpp: * inspector/WorkerInspectorController.h: * inspector/WorkerRuntimeAgent.cpp: (WebCore::WorkerRuntimeAgent::didCreateFrontendAndBackend): * inspector/WorkerRuntimeAgent.h: * page/Console.cpp: * page/ContentSecurityPolicy.cpp: * page/Frame.cpp: * page/PageConsole.cpp: * plugins/PluginView.cpp: (WebCore::PluginView::performRequest): * testing/Internals.cpp: (WebCore::Internals::parserMetaData): * testing/Internals.h: * workers/SharedWorkerGlobalScope.cpp: (WebCore::createConnectEvent): * workers/WorkerGlobalScope.cpp: (WebCore::WorkerGlobalScope::importScripts): * workers/WorkerThread.cpp: * xml/XMLTreeViewer.cpp: * xml/parser/XMLDocumentParser.cpp: * xml/parser/XMLDocumentParserLibxml2.cpp: 2013-12-11 Laszlo Vidacs Store SHA1 hash in std::array https://bugs.webkit.org/show_bug.cgi?id=125446 Reviewed by Darin Adler. Change Vector to std::array and use typedef. * Modules/websockets/WebSocketHandshake.cpp: (WebCore::WebSocketHandshake::getExpectedWebSocketAccept): * inspector/DOMPatchSupport.cpp: (WebCore::DOMPatchSupport::createDigest): * platform/network/soup/ResourceHandleSoup.cpp: (WebCore::HostTLSCertificateSet::computeCertificateHash): 2013-12-11 Alexey Proskuryakov WebCrypto keys should support structured clone https://bugs.webkit.org/show_bug.cgi?id=125590 Reviewed by Oliver Hunt. Tests: crypto/subtle/aes-postMessage.html crypto/subtle/hmac-postMessage.html crypto/subtle/postMessage-worker.html crypto/subtle/rsa-postMessage.html * crypto/CryptoAlgorithmIdentifier.h: (WebCore::CryptoAlgorithmIdentifier): * bindings/js/JSCryptoAlgorithmDictionary.cpp: (WebCore::JSCryptoAlgorithmDictionary::createParametersForEncrypt): (WebCore::JSCryptoAlgorithmDictionary::createParametersForDecrypt): (WebCore::JSCryptoAlgorithmDictionary::createParametersForSign): (WebCore::JSCryptoAlgorithmDictionary::createParametersForVerify): (WebCore::JSCryptoAlgorithmDictionary::createParametersForDigest): (WebCore::JSCryptoAlgorithmDictionary::createParametersForGenerateKey): (WebCore::JSCryptoAlgorithmDictionary::createParametersForDeriveKey): (WebCore::JSCryptoAlgorithmDictionary::createParametersForDeriveBits): (WebCore::JSCryptoAlgorithmDictionary::createParametersForImportKey): (WebCore::JSCryptoAlgorithmDictionary::createParametersForExportKey): AES_KW was added to WebCrypto spec editor's draft yesterday night. Now that we're adding a matching enum for structired clone serialization, it's as good a time as any to update the order of values to match. * bindings/js/SerializedScriptValue.cpp: (WebCore::countUsages): (WebCore::CloneSerializer::dumpIfTerminal): (WebCore::CloneSerializer::write): (WebCore::CloneDeserializer::read): (WebCore::CloneDeserializer::readHMACKey): (WebCore::CloneDeserializer::readAESKey): (WebCore::CloneDeserializer::readRSAKey): (WebCore::CloneDeserializer::readCryptoKey): (WebCore::CloneDeserializer::readTerminal): Added serialization/deserialization for CryptoKey. This doesn't update version number, because we don't currently store structured clones in persistent storage - and even if we did, we wouldn't want to invalidate everything users already stored. * crypto/CryptoAlgorithmRegistry.cpp: (WebCore::CryptoAlgorithmRegistry::shared): (WebCore::registryMutex): (WebCore::CryptoAlgorithmRegistry::getIdentifierForName): (WebCore::CryptoAlgorithmRegistry::nameForIdentifier): (WebCore::CryptoAlgorithmRegistry::create): (WebCore::CryptoAlgorithmRegistry::registerAlgorithm): * crypto/CryptoKey.idl: With structured clone, it is now possible to send a Key to a web worker. That's of no practical use because the crypto API is not exposed in workers, but we shouldn't crash anyway. * crypto/keys/CryptoKeyAES.cpp: (WebCore::CryptoKeyAES::CryptoKeyAES): (WebCore::CryptoKeyAES::isValidAESAlgorithm): * crypto/keys/CryptoKeyAES.h: Exposed isValidAESAlgorithm, so that a caller could know whether the constructor will assert. * CMakeLists.txt: * GNUmakefile.am: * WebCore.vcxproj/WebCore.vcxproj.filters: * WebCore.vcxproj/WebCoreCommon.props: Added crypto/keys to search paths to avoid build breakage. 2013-12-11 Bear Travis Web Inspector: [CSS Shapes] Highlight margin-shape for shape-outside https://bugs.webkit.org/show_bug.cgi?id=125175 Reviewed by Darin Adler. In addition to highlighting the shape, also highlight the shape created by shape-margin with a slightly more transparent color. This patch modifies the shape info passed to the Inspector Overlay to include a path for both the raw shape and the shape with margin. Test: inspector-protocol/model/highlight-shape-outside-margin.html * inspector/InspectorOverlay.cpp: (WebCore::buildObjectForShapeOutside): Call Shape::buildDisplayPaths rather than Shape::buildPath, and pass along any relevant paths to the Inspector overlay. * inspector/InspectorOverlayPage.js: (_drawShapeHighlight): Draw the margin shape in addition to the raw shape. * rendering/shapes/BoxShape.cpp: (WebCore::addRoundedRect): Add a rounded rect to the path. (WebCore::BoxShape::buildDisplayPaths): Create the applicable [margin/padding/raw] shapes. * rendering/shapes/BoxShape.h: * rendering/shapes/PolygonShape.cpp: (WebCore::addPolygon): Add a set of vertices as a polygon to the path. (WebCore::PolygonShape::buildDisplayPaths): Create the applicable [margin/padding/raw] shapes. * rendering/shapes/PolygonShape.h: * rendering/shapes/RasterShape.h: (WebCore::RasterShape::buildDisplayPaths): Ditto. * rendering/shapes/RectangleShape.cpp: (WebCore::RectangleShape::buildDisplayPaths): Ditto. * rendering/shapes/RectangleShape.h: * rendering/shapes/Shape.h: 2013-12-11 Mario Sanchez Prada [ATK] Expose accessibility objects WAI-ARIA landmark roles https://bugs.webkit.org/show_bug.cgi?id=125584 Reviewed by Chris Fleizach. Exposed accessibility objects with landmark roles with the proper AtkRole, to be provided by the next stable release of ATK. * accessibility/atk/WebKitAccessibleWrapperAtk.cpp: (webkitAccessibleGetAttributes): (atkRole): 2013-12-11 José Dapena Paz and Zan Dobersek [GTK] Add a UPower-based BatteryProvider https://bugs.webkit.org/show_bug.cgi?id=115719 Reviewed by Martin Robinson. Introduce the BatteryProviderUPower, a provider of the system's battery status that produces the information using the upower-glib library. The BatteryProviderUPower creates a new UPower client when the provider should start emitting updates and hooks up to device alteration signals. These only fire recalculation of the battery status when a battery device is altered. When recalculating, every battery device is taken into account, accumulating the energy capacities when both empty and full, the current rate of energy charging/discharging, and the battery status (whether the device is charging or discharging). This gives a set of data that covers the overall battery status of the system. This data is then used to calculate the battery status as perceived by the WebCore implementation. Charging is determined by examining the integral sign of the current combined energy rate. Charging and discharging times are calculated, when appropriate, by dividing the chargable/dischargable capacity with the current combined energy rate. The battery level is calculated by dividing the current energy capacity with the full energy capacity (i.e. the combined capacity of all the batteries that the system possesses). The status is (indirectly) passed onto BatteryManager by invoking the updateBatteryStatus method on the client, with the first parameter representing the battery charging/discharging state, the second parameter representing the time left until the battery is fully charged (when charging) or fully depleted (when discharging), and the third parameter representing the current battery level. Whenever the implementation cannot provide any information about the battery status of the system, the client's updateBatteryStatus method is invoked with the first parameter reporting the unavailability of any information about the battery status. The other two parameters can be omitted as they default to 0 when not given and are neither available nor useful in such circumstances. The client should handle such an update by reporting the 'default' battery status - charging, the battery level being at 1.0 and both the charging and discharging time having the value of the positive infinity (as per the Battery Status API specification). The implementation is heavily inspired by a similar approach to calculating battery status in GNOME Settings Daemon. No new tests - no new functionality. The feature is not yet enabled. When enabled, the relevant tests pass. * GNUmakefile.list.am: Add the BatteryProviderUPower(Client) build targets. * platform/glib/BatteryProviderUPower.cpp: Added. (powerDeviceAlterationCallback): (BatteryProviderUPower::BatteryProviderUPower): (BatteryProviderUPower::startUpdating): (BatteryProviderUPower::stopUpdating): (BatteryProviderUPower::updateBatteryStatus): * platform/glib/BatteryProviderUPower.h: Added. (WebCore): (BatteryProviderUPower): * platform/glib/BatteryProviderUPowerClient.h: Added. (WebCore): (BatteryProviderUPowerClient): 2013-12-11 Thiago de Barros Lacerda Improving createOffer and createAnswer LayoutTests https://bugs.webkit.org/show_bug.cgi?id=125568 Reviewed by Philippe Normand. The constraints parameter should be optional in both. Also adding tests to check if we already have a local SDP when creating an answer. Existing tests were updated. * platform/mock/RTCPeerConnectionHandlerMock.cpp: (WebCore::RTCPeerConnectionHandlerMock::createOffer): 2013-12-11 Michał Pakuła vel Rutka [EFL] Fix build with CONTEXT_MENUS flag set OFF https://bugs.webkit.org/show_bug.cgi?id=125572 Reviewed by Gyuyoung Kim. dispatchEventAsContextMenuEvent is called regardless of CONTEXT_MENUS flag setting, thus its definition in InspectorFrontendHost should not be guarded by this flag. No new tests, no behaviour change. * inspector/InspectorFrontendHost.cpp: (WebCore::InspectorFrontendHost::dispatchEventAsContextMenuEvent): 2013-12-11 Tamas Gergely [CURL] Build fails after r160386. https://bugs.webkit.org/show_bug.cgi?id=125571 Reviewed by Zoltan Herczeg. Need no new tests. Fix a typo in commit r160386 that prevents building with curl. * platform/network/curl/CurlCacheEntry.cpp: (WebCore::CurlCacheEntry::generateBaseFilename): 2013-12-11 Rob Buis [CSS Shapes] Take into account fill-rule for polygon interpolation https://bugs.webkit.org/show_bug.cgi?id=125508 Reviewed by Dirk Schulze. Implement the polygon fill-rule part of http://dev.w3.org/csswg/css-shapes/#basic-shape-interpolation. Adapt fast/shapes/shape-outside-floats/shape-outside-animation.html. * rendering/style/BasicShapes.cpp: (WebCore::BasicShape::canBlend): 2013-12-11 Mario Sanchez Prada Programmatically-inserted children lack accessibility events https://bugs.webkit.org/show_bug.cgi?id=100275 Reviewed by Chris Fleizach. Test: accessibility/children-changed-sends-notification.html Emit children-changed::add and children-changed::remove whenever an object has been added/removed to the accessibility hierarchy, that is, when a new AtkObject is being attached/detached. * accessibility/AXObjectCache.h: Added new enumeration to know when we are detaching a wrapper because of the cache or the element is being destroyed, so we can use that information. (WebCore::AXObjectCache::detachWrapper): Added a new parameter and updated all the prototypes in different ports. * accessibility/AXObjectCache.cpp: (WebCore::AXObjectCache::~AXObjectCache): Call detachWrapper() specifying that we do it because the cache is being destroyed. (WebCore::AXObjectCache::remove): Call detachWrapper() specifying that we do it because an accessible element is being destroyed. * accessibility/atk/AXObjectCacheAtk.cpp: (WebCore::AXObjectCache::detachWrapper): Emit the children-changed signal when needed. We rely on the cached reference to the parent AtkObject (using the implementation of atk_object_get_parent from the AtkObject class) to find the right object to emit the signal from here, since the accessibility hierarchy from WebCore will no longer be accessible at this point. (WebCore::AXObjectCache::attachWrapper): Emit the children-change signal from here unless we are in the middle of a layout update, trying to provide as much information (e.g. the offset) as possible. (WebCore::AXObjectCache::postPlatformNotification): Make sure we update (touch) the subtree under an accessibility object whenever we receive AXChildrenChanded from WebCore, to ensure that those objects will also be visible rightaway to ATs, and that those get properly notified of the event at that very same moment. * accessibility/ios/AXObjectCacheIOS.mm: (WebCore::AXObjectCache::detachWrapper): Updated function signature. * accessibility/mac/AXObjectCacheMac.mm: (WebCore::AXObjectCache::detachWrapper): Ditto. * accessibility/win/AXObjectCacheWin.cpp: (WebCore::AXObjectCache::detachWrapper): Ditto. 2013-12-11 Andreas Kling REGRESSION(r160389): SVG test assertion extravaganza. Unreviewed. Use getAttribute() instead of fastGetAttribute() for the "type" attribute since it's animatable on SVG elements. 2013-12-11 Gyuyoung Kim Set m_nextBreakablePosition as private in InlineIterator, and use it. https://bugs.webkit.org/show_bug.cgi?id=125482 Reviewed by Andreas Kling. InlineIterator has been exported m_nextBreakablePosition as public though it is member variable. This patch set it as private, and add getter/setter functions for it. No new tests, no behavior changes. * rendering/InlineIterator.h: (WebCore::InlineIterator::InlineIterator): (WebCore::InlineIterator::nextBreakablePosition): (WebCore::InlineIterator::setNextBreakablePosition): * rendering/line/BreakingContextInlineHeaders.h: (WebCore::BreakingContext::handleText): 2013-12-10 Gurpreet Kaur top and bottom black background line not getting displayed https://bugs.webkit.org/show_bug.cgi?id=21664 Reviewed by Simon Fraser. The table cell's background was not being displayed. Since the table cell had no child correct offsetWidth was not being set even if table width is being defined. Test: fast/dom/HTMLTableElement/empy-table-cell-with-background-color.html * rendering/AutoTableLayout.cpp: (WebCore::AutoTableLayout::recalcColumn): cellHasContent should also be set to true incase background color is present. 2013-12-10 Beth Dakin Horizontal rubber-banding without a horizontal scrollbar is distracting https://bugs.webkit.org/show_bug.cgi?id=125550 Reviewed by Simon Fraser. Setting the ScrollElasticity to ScrollElasticityAutomatic will make sure we only rubber-band horizontally when there is a horizontal scrollbar. * page/FrameView.cpp: (WebCore::FrameView::FrameView): 2013-12-10 Martin Robinson Correct a preprocessor guard from a mis-merged patch In r160367, I mismerged a patch from Gustavo Noronha. This commit fixes the merge and thus fixes the CMake build. * html/HTMLMediaElement.idl: Move the preprocessor guard to the correct property. 2013-12-10 Rob Buis Clean up SVGScriptElement https://bugs.webkit.org/show_bug.cgi?id=125527 Reviewed by Sam Weinig. Rewrite to not store type in m_type and also remove type getter/setter. * svg/SVGScriptElement.cpp: (WebCore::SVGScriptElement::parseAttribute): (WebCore::SVGScriptElement::typeAttributeValue): * svg/SVGScriptElement.h: * svg/SVGScriptElement.idl: 2013-12-10 Laszlo Vidacs Use std::array when computing MD5 checksum https://bugs.webkit.org/show_bug.cgi?id=125509 Reviewed by Anders Carlsson. Use MD5::Digest type and MD5::hashSize when computing MD5 checksum. * platform/network/curl/CurlCacheEntry.cpp: (WebCore::CurlCacheEntry::generateBaseFilename): 2013-12-10 Mario Sanchez Prada [ATK] Expose splitter elements with ATK_ROLE_SEPARATOR https://bugs.webkit.org/show_bug.cgi?id=125522 Reviewed by Chris Fleizach. Expose objects with SplitterRole role as ATK_ROLE_SEPARATOR. * accessibility/atk/WebKitAccessibleWrapperAtk.cpp: (atkRole): 2013-12-10 Mario Sanchez Prada [ATK] Elements with role 'alertdialog' should be ATK_ROLE_ALERT https://bugs.webkit.org/show_bug.cgi?id=125521 Reviewed by Chris Fleizach. Stop exposing alert dialogs as ATK_ROLE_DIALOG and do it as ATK_ROLE_ALERT instead. * accessibility/atk/WebKitAccessibleWrapperAtk.cpp: (atkRole): 2013-12-10 Brendan Long [GTK][GStreamer] media/video-preload.html is flakily crashing on WK2 https://bugs.webkit.org/show_bug.cgi?id=125411 Reviewed by Philippe Normand. No new tests because this fixes flakeyness in existing tests (media/video-preload.html, and various tests in media/track/{audio,in-band,video}). * platform/graphics/gstreamer/TextCombinerGStreamer.cpp: (webkitTextCombinerPadGetProperty): Copy tag list to prevent concurrent modification problems. (webkitTextCombinerPadEvent): Add locking. * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp: (WebCore::TrackPrivateBaseGStreamer::TrackPrivateBaseGStreamer): Call tagsChanged() because we need it to setup m_tags. (WebCore::TrackPrivateBaseGStreamer::disconnect): Clear m_tags. (WebCore::TrackPrivateBaseGStreamer::tagsChanged): Lookup the tags while we're in this callback, because it's the only time we can guarantee that the input-selector won't unref them. (WebCore::TrackPrivateBaseGStreamer::notifyTrackOfTagsChanged): Use m_tags. * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.h: Add m_tags and a mutex. 2013-12-10 László Langó PageConsole::addMessage should automatically determine column number alongside line number https://bugs.webkit.org/show_bug.cgi?id=114319 Reviewed by Joseph Pecoraro. * dom/InlineStyleSheetOwner.cpp: (WebCore::InlineStyleSheetOwner::InlineStyleSheetOwner): * dom/ScriptElement.cpp: (WebCore::ScriptElement::ScriptElement): * dom/ScriptableDocumentParser.h: * dom/StyledElement.cpp: (WebCore::StyledElement::styleAttributeChanged): * html/parser/HTMLDocumentParser.cpp: (WebCore::HTMLDocumentParser::didReceiveParsedChunkFromBackgroundParser): (WebCore::HTMLDocumentParser::pumpPendingSpeculations): * html/parser/HTMLDocumentParser.h: * inspector/InspectorResourceAgent.cpp: (WebCore::InspectorResourceAgent::buildInitiatorObject): * page/Console.cpp: (WebCore::internalAddMessage): * page/PageConsole.cpp: (WebCore::PageConsole::printSourceURLAndPosition): (WebCore::PageConsole::addMessage): * page/PageConsole.h: * xml/parser/XMLDocumentParser.h: * xml/parser/XMLDocumentParserLibxml2.cpp: (WebCore::XMLDocumentParser::error): 2013-12-10 Andreas Kling Jettison all StyleResolver data on memory pressure. The StyleResolver can be rebuilt relatively quickly; we already have an optimization that discards it some time after last use. If we find ourseles under serious memory pressure, don't wait for the timer to kick in, throw everything overboard right away. ~5MB progression post-pressure on Membuster3. Reviewed by Anders Carlsson. 2013-12-10 Martin Robinson [GTK] [CMake] Add support for building the DOM bindings https://bugs.webkit.org/show_bug.cgi?id=116375 Reviewed by Gustavo Noronha Silva. The CMake build is more complete than the autotools counterpart, so autotools doesn't consider some supplemental IDL attributes when building the DOM bindings. To prevent API breaks we should protect these attributes from DOM binding generation. * Modules/battery/BatteryManager.idl: Protect non-GObject DOM bound methods by C preprocessor checks. * Modules/battery/NavigatorBattery.idl: Ditto. * Modules/mediastream/HTMLMediaElementMediaStream.idl: Ditto. * Modules/networkinfo/NavigatorNetworkInfoConnection.idl: Ditto. * Modules/networkinfo/NetworkInfoConnection.idl: Ditto. * PlatformGTK.cmake: Add build steps for building the bindings. * dom/Document.idl: Protect non-GObject DOM bound methods by C preprocessor checks. * html/HTMLMediaElement.idl: Ditto. 2013-12-10 Martin Robinson Various fixes for the CMake GTK+ build Reviewed by Gustavo Noronha. * PlatformGTK.cmake: Update source list. 2013-12-10 Robert Sipka [nix][curl] Buildfix after r160310 https://bugs.webkit.org/show_bug.cgi?id=125489 Reviewed by Gustavo Noronha Silva. Curl doesn't include soup files. * PlatformNix.cmake: 2013-12-10 Gustavo Noronha Silva [GTK] REGRESSION: www.yahoo.com redirects to the mobile version after UA change https://bugs.webkit.org/show_bug.cgi?id=125444 Reviewed by Martin Robinson. * platform/gtk/UserAgentGtk.cpp: (WebCore::platformVersionForUAString): more correctly pretend we're Mac OS X. (WebCore::standardUserAgent): ditto. 2013-12-09 Gustavo Noronha Silva [Soup] Send original encoded data size to didReceiveBuffer https://bugs.webkit.org/show_bug.cgi?id=125410 Reviewed by Martin Robinson. No tests, the only way to test this seems to be through the inspector UI. * platform/network/ResourceHandle.h: * platform/network/ResourceHandleInternal.h: (WebCore::ResourceHandleInternal::ResourceHandleInternal): data member to track stream position. * platform/network/soup/ResourceHandleSoup.cpp: (WebCore::ResourceHandle::currentStreamPosition): obtains the current stream position by querying the first seekable input stream we find. (WebCore::nextMultipartResponsePartCallback): store the position before we start reading a new part. (WebCore::sendRequestCallback): store the position before we start reading the response body. (WebCore::readCallback): pass the position delta to didReceiveData. 2013-12-09 Andreas Kling Clear out font width measurement caches on memory pressure. The data kept in WidthCaches can be regenerated on demand. Throwing it away when we're under memory pressure buys us ~4MB on Membuster3. Reviewed by Antti Koivisto. 2013-12-09 Seokju Kwon Web Inspector: Remove enabled() in InspectorRuntimeAgent. https://bugs.webkit.org/show_bug.cgi?id=125476 Reviewed by Joseph Pecoraro. Dead code. It's never called anywhere. No new tests, no behavior change. * inspector/InspectorRuntimeAgent.h: 2013-12-09 Sam Weinig Replace use of WTF::FixedArray with std::array https://bugs.webkit.org/show_bug.cgi?id=125475 Reviewed by Anders Carlsson. * crypto/parameters/CryptoAlgorithmAesCbcParams.h: * platform/graphics/GlyphMetricsMap.h: 2013-12-09 Benjamin Poulain Refactor the CFURLConnectionClient to be the synchronous implementation of an abstract network delegate https://bugs.webkit.org/show_bug.cgi?id=125379 Reviewed by Alexey Proskuryakov. * WebCore.vcxproj/WebCore.vcxproj: * WebCore.vcxproj/WebCore.vcxproj.filters: * WebCore.xcodeproj/project.pbxproj: * platform/network/ResourceHandle.h: * platform/network/ResourceHandleInternal.h: * platform/network/cf/ResourceHandleCFNet.cpp: (WebCore::ResourceHandle::createCFURLConnection): * platform/network/cf/ResourceHandleCFURLConnectionDelegate.cpp: Added. (WebCore::ResourceHandleCFURLConnectionDelegate::ResourceHandleCFURLConnectionDelegate): (WebCore::ResourceHandleCFURLConnectionDelegate::~ResourceHandleCFURLConnectionDelegate): (WebCore::ResourceHandleCFURLConnectionDelegate::willSendRequestCallback): (WebCore::ResourceHandleCFURLConnectionDelegate::didReceiveResponseCallback): (WebCore::ResourceHandleCFURLConnectionDelegate::didReceiveDataCallback): (WebCore::ResourceHandleCFURLConnectionDelegate::didFinishLoadingCallback): (WebCore::ResourceHandleCFURLConnectionDelegate::didFailCallback): (WebCore::ResourceHandleCFURLConnectionDelegate::willCacheResponseCallback): (WebCore::ResourceHandleCFURLConnectionDelegate::didReceiveChallengeCallback): (WebCore::ResourceHandleCFURLConnectionDelegate::didSendBodyDataCallback): (WebCore::ResourceHandleCFURLConnectionDelegate::shouldUseCredentialStorageCallback): (WebCore::ResourceHandleCFURLConnectionDelegate::canRespondToProtectionSpaceCallback): (WebCore::ResourceHandleCFURLConnectionDelegate::didReceiveDataArrayCallback): (WebCore::ResourceHandleCFURLConnectionDelegate::makeConnectionClient): * platform/network/cf/ResourceHandleCFURLConnectionDelegate.h: Added. * platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.cpp: Added. (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::SynchronousResourceHandleCFURLConnectionDelegate): (WebCore::synthesizeRedirectResponseIfNecessary): (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::willSendRequest): (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::didReceiveResponse): (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::didReceiveData): (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::didFinishLoading): (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::didFail): (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::willCacheResponse): (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::didReceiveChallenge): (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::didSendBodyData): (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::shouldUseCredentialStorageCallback): (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::canRespondToProtectionSpace): (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::didReceiveDataArray): * platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.h: Added. 2013-12-09 Ryosuke Niwa REGRESSION(r136280): input[type=image] should assume coords of 0,0 when activated without physically clicking https://bugs.webkit.org/show_bug.cgi?id=125392 Reviewed by Darin Adler. Merge https://chromium.googlesource.com/chromium/blink/+/3c33d42207cd209bb171083ba66c225f694f2101 Activating an image button with the keyboard or element.click() should result in selected coords of (0,0) per http://www.w3.org/TR/2013/CR-html5-20130806/forms.html#image-button-state-(type=image) "If the user activates the control without explicitly selecting a coordinate, then the coordinate (0,0) must be assumed." New behavior also matches that of Internet Explorer and Firefox. Tests: fast/forms/input-image-submit.html * html/ImageInputType.cpp: (WebCore::ImageInputType::handleDOMActivateEvent): Set m_clickLocation to (0, 0) for simulated events. 2013-12-09 Jer Noble [MSE] Add support for VideoPlaybackMetrics. https://bugs.webkit.org/show_bug.cgi?id=125380 Reviewed by Eric Carlson. Test: media/media-source/media-source-video-playback-quality.html Add a new object type VideoPlaybackQuality to be returned by HTMLMediaElement.getVideoPlaybackQuality(). HTMLMediaElements must separately track a droppedVideoFrame count, as certain operations on SourceBuffer will drop incoming frames, which must be accounted for. Reset this count when the media engine changes, which is indicitive of a new media load requset starting. Add the new VideoPlaybackQuality class: * Modules/mediasource/VideoPlaybackQuality.cpp: Added. (WebCore::VideoPlaybackQuality::create): (WebCore::VideoPlaybackQuality::VideoPlaybackQuality): * Modules/mediasource/VideoPlaybackQuality.h: Added. (WebCore::VideoPlaybackQuality::creationTime): (WebCore::VideoPlaybackQuality::totalVideoFrames): (WebCore::VideoPlaybackQuality::droppedVideoFrames): (WebCore::VideoPlaybackQuality::corruptedVideoFrames): (WebCore::VideoPlaybackQuality::totalFrameDelay): * Modules/mediasource/VideoPlaybackQuality.idl: Added. Add support for the new class to HTMLMediaElement: * html/HTMLMediaElement.cpp: (HTMLMediaElement::shouldUseVideoPluginProxy): (HTMLMediaElement::getVideoPlaybackQuality): * html/HTMLMediaElement.h: * html/HTMLMediaElement.idl: Report the video quality metrics from the MediaPlayer: * platform/graphics/MediaPlayer.cpp: (WebCore::MediaPlayer::totalVideoFrames): (WebCore::MediaPlayer::droppedVideoFrames): (WebCore::MediaPlayer::corruptedVideoFrames): (WebCore::MediaPlayer::totalFrameDelay): * platform/graphics/MediaPlayer.h: * platform/graphics/MediaPlayerPrivate.h: (WebCore::MediaPlayerPrivateInterface::totalVideoFrames): (WebCore::MediaPlayerPrivateInterface::droppedVideoFrames): (WebCore::MediaPlayerPrivateInterface::corruptedVideoFrames): (WebCore::MediaPlayerPrivateInterface::totalFrameDelay): Correctly report the dropped frame count: * Modules/mediasource/SourceBuffer.cpp: (WebCore::SourceBuffer::TrackBuffer::TrackBuffer): needsRandomAccessFlag defaults to true. (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample): Check the sync status of the incoming sample. (WebCore::SourceBuffer::didDropSample): Notify the media element of a dropped frame. * Modules/mediasource/SourceBuffer.h: * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::HTMLMediaElement): (HTMLMediaElement::mediaPlayerEngineUpdated): Reset m_droppedFrameCount. (HTMLMediaElement::getVideoPlaybackQuality): Return a new VideoPlaybackQuality object. * html/HTMLMediaElement.h: (WebCore::HTMLMediaElement::incrementDroppedFrameCount): Simple incrementer. * platform/MediaSample.h: (WebCore::MediaSample::isSync): Convenience function. (WebCore::MediaSample::isNonDisplaying): Ditto. Add support in the AVFoundation MediaSource Engine: * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h: * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm: (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::totalVideoFrames): (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::droppedVideoFrames): (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::corruptedVideoFrames): (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::totalFrameDelay): Add support in the Mock MediaSource Engine: * platform/mock/mediasource/MockBox.h: * platform/mock/mediasource/MockMediaPlayerMediaSource.cpp: (WebCore::MockMediaPlayerMediaSource::totalVideoFrames): Simple accessor. (WebCore::MockMediaPlayerMediaSource::droppedVideoFrames): Ditto. (WebCore::MockMediaPlayerMediaSource::corruptedVideoFrames): Ditto. (WebCore::MockMediaPlayerMediaSource::totalFrameDelay): Ditto. * platform/mock/mediasource/MockMediaPlayerMediaSource.h: * platform/mock/mediasource/MockMediaSourcePrivate.cpp: (WebCore::MockMediaSourcePrivate::MockMediaSourcePrivate): * platform/mock/mediasource/MockMediaSourcePrivate.h: * platform/mock/mediasource/MockSourceBufferPrivate.cpp: (WebCore::MockSourceBufferPrivate::enqueueSample): Increment the frame counts based on the incoming sample. * platform/mock/mediasource/MockSourceBufferPrivate.h: Add the new files to the project: * bindings/gobject/GNUmakefile.am: * DerivedSources.make: * WebCore.xcodeproj/project.pbxproj: * GNUMakefile.list.am: * CMakeLists.txt: 2013-12-09 Simon Fraser Avoid divide by zero in scrollbar code, and protect against Obj-C exceptions https://bugs.webkit.org/show_bug.cgi?id=125469 Reviewed by Beth Dakin. In ScrollbarThemeMac::setPaintCharacteristicsForScrollbar(), proportion could end up as NaN if scrollbar->totalSize() were zero. Protect against that. Also wrap functions that call into Objective-C with BEGIN_BLOCK_OBJC_EXCEPTIONS/ END_BLOCK_OBJC_EXCEPTIONS. * platform/mac/ScrollbarThemeMac.mm: (WebCore::ScrollbarThemeMac::scrollbarThickness): (WebCore::ScrollbarThemeMac::updateScrollbarOverlayStyle): (WebCore::ScrollbarThemeMac::minimumThumbLength): (WebCore::ScrollbarThemeMac::updateEnabledState): (WebCore::ScrollbarThemeMac::setPaintCharacteristicsForScrollbar): (WebCore::scrollbarPainterPaint): 2013-12-09 Ryosuke Niwa Implement Document.cloneNode() https://bugs.webkit.org/show_bug.cgi?id=11646 Reviewed by Darin Adler. Merge https://chromium.googlesource.com/chromium/blink/+/dc7879025e01d63be9fcf6a84ca6c9b8b5768a80 Implement the behavior specified in the current DOM4 working draft: http://www.w3.org/TR/2013/WD-dom-20131107/#dom-node-clonenode Tests: fast/dom/Document/clone-node.html fast/dom/HTMLDocument/clone-node-quirks-mode.html svg/custom/clone-node.html * dom/Document.cpp: (WebCore::Document::cloneNode): (WebCore::Document::cloneDocumentWithoutChildren): (WebCore::Document::cloneDataFromDocument): * dom/Document.h: * html/HTMLDocument.cpp: (WebCore::HTMLDocument::cloneDocumentWithoutChildren): * html/HTMLDocument.h: * svg/SVGDocument.cpp: (WebCore::SVGDocument::cloneDocumentWithoutChildren): * svg/SVGDocument.h: 2013-12-09 Andreas Kling REGRESSION(r160260): Memory pressure signal causes web process to hang. Reviewed by Tim Horton. This command caused all of my web processes to hang: notifyutil -p org.WebKit.lowMemory This only happens when the cache pruning code encounters a resource using purgeable memory. * loader/cache/MemoryCache.cpp: (WebCore::MemoryCache::pruneLiveResourcesToSize): Grab the next CachedResource pointer before continuing the loop. 2013-12-09 peavo@outlook.com [WinCairo] OpenGL compile error. https://bugs.webkit.org/show_bug.cgi?id=125383 Reviewed by Darin Adler. * platform/graphics/opengl/Extensions3DOpenGLES.h: Define GL_HALF_FLOAT_ARB on Windows when OPENGL_ES_2 is used. 2013-12-09 Peter Molnar Fix handling of 'inherit' and 'initial' for grid lines. https://bugs.webkit.org/show_bug.cgi?id=125223 Reviewed by Darin Adler. 'initial' and 'inherit' are always allowed values for CSS properties. As the CSSParser handles them automatically, those 2 values were never taken care of in StyleResolver, leading to crashes. Added tests cases for 'inherit' and 'initial' to the following tests: fast/css-grid-layout/grid-item-column-row-get-set.html fast/css-grid-layout/grid-item-end-after-get-set.html fast/css-grid-layout/grid-item-start-before-get-set.html Patch backported from Blink: https://src.chromium.org/viewvc/blink?revision=149257&view=revision * css/StyleResolver.cpp: (WebCore::StyleResolver::applyProperty): * rendering/style/RenderStyle.h: * rendering/style/StyleGridItemData.cpp: (WebCore::StyleGridItemData::StyleGridItemData): 2013-12-09 Joseph Pecoraro Web Inspector: Inspector.json and CodeGenerator tweaks https://bugs.webkit.org/show_bug.cgi?id=125321 Reviewed by Timothy Hatcher. * inspector/protocol/Runtime.json: Runtime.js was depending on Network.FrameId. This is a layering violation, so ideally we can fix this later. For now, just copy the FrameId type into Runtime. They are strings so all is good. * inspector/CodeGeneratorInspector.py: (Generator.EventMethodStructTemplate.append_epilog): * inspector/CodeGeneratorInspectorStrings.py: Improve --help usage information. Make the script work with a single domain json file. Add ASCIILiteral's where appropriate. 2013-12-09 Nick Diego Yamane [Nix] Fix file name typo in PlatformNix.cmake https://bugs.webkit.org/show_bug.cgi?id=125457 Reviewed by Gustavo Noronha Silva. Wrong file name introduced in http://trac.webkit.org/changeset/160310. * PlatformNix.cmake: 2013-12-09 Brendan Long [GStreamer] Memory leak due to incorrect use of gst_tag_list_merge in TextCombinerGStreamer https://bugs.webkit.org/show_bug.cgi?id=125452 Reviewed by Philippe Normand. No new tests because this fixes a memory leak. * platform/graphics/gstreamer/TextCombinerGStreamer.cpp: (webkitTextCombinerPadEvent): Use gst_tag_list_insert instead of gst_tag_list_merge, since we don't want to create a new list. 2013-12-09 Chris Fleizach AX: WebKit ignores @alt on IMG elements with role="text" https://bugs.webkit.org/show_bug.cgi?id=125363 Reviewed by Mario Sanchez Prada. If an element has a different role, the alt attribute should still be used in the name calculation if present. Test: accessibility/alt-tag-on-image-with-nonimage-role.html * accessibility/AccessibilityNodeObject.cpp: (WebCore::AccessibilityNodeObject::usesAltTagForTextComputation): (WebCore::AccessibilityNodeObject::alternativeText): (WebCore::AccessibilityNodeObject::accessibilityDescription): (WebCore::AccessibilityNodeObject::text): * accessibility/AccessibilityNodeObject.h: 2013-12-08 Martin Robinson [WK2][Soup] Use didReceiveBuffer instead of didReceiveData https://bugs.webkit.org/show_bug.cgi?id=118598 Reviewed by Gustavo Noronha Silva. Original patch by Kwang Yul Seo and Csaba Osztrogonác . Switch from using didReceiveData to didReceiveBuffer for the Soup backend and let SharedBuffer wrap a SoupBuffer. This is necessary because the NetworkProcess only supports getting data via SharedBuffer. * GNUmakefile.list.am: Add the new SharedBufferSoup.cpp file to the list. * PlatformEfl.cmake: * PlatformGTK.cmake: * PlatformNix.cmake: * platform/SharedBuffer.cpp: We no longer used the no-op version of the platformFoo methods. * platform/SharedBuffer.h: Ditto. * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp: Use didReceiveBuffer instead of didReceiveData. * platform/network/ResourceHandleInternal.h: Have only a m_soupBuffer member instead of three to manage the buffer. * platform/network/soup/GOwnPtrSoup.cpp: Add support for SoupBuffer. * platform/network/soup/GOwnPtrSoup.h: Ditto. * platform/network/soup/ResourceHandleSoup.cpp: (WebCore::WebCoreSynchronousLoader::didReceiveData): ASSERT_NOT_REACHED here, since it should never be called now. (WebCore::WebCoreSynchronousLoader::didReceiveBuffer): Handle this call properly. (WebCore::ResourceHandle::ensureReadBuffer): Now we package up our buffer into a SoupBuffer. (WebCore::redirectSkipCallback): Use the new m_soupBuffer member. (WebCore::cleanupSoupRequestOperation): Ditto. (WebCore::nextMultipartResponsePartCallback): Ditto. (WebCore::sendRequestCallback): Ditto. (WebCore::readCallback): * platform/soup/SharedBufferSoup.cpp: Added. 2013-12-09 Michal Poteralski DataCloneError exception is not thrown when postMessage's second parameter is the source port or the target port. https://bugs.webkit.org/show_bug.cgi?id=124708 Reviewed by Alexey Proskuryakov. According to specification: http://www.whatwg.org/specs/web-apps/current-work/multipage/web-messaging.html#dom-window-postmessage If the method was invoked with a second argument transfer then if any of the objects in the transfer are either the source port or the target port (if any), then a DataCloneError exception should be thrown. Currently an InvalidStateError exception is thrown what is an incorrect behaviour. The proposed solution is change to the correct the exception value. Tests: fast/dom/Window/postMessage-clone-port-error.html * dom/MessagePort.cpp: (WebCore::MessagePort::postMessage): Improve exception value 2013-12-09 Carlos Garcia Campos Unreviewed. Fix the GTK+ build with NetworkProcess enabled. * GNUmakefile.list.am: Add missing file to compilation. 2013-12-08 Ryosuke Niwa getComputedStyle border-radius shorthand omits vertical radius information https://bugs.webkit.org/show_bug.cgi?id=125394 Reviewed by Andreas Kling. Merge https://chromium.googlesource.com/chromium/blink/+/4c2866855dddbb28bb7d978ad627acc368af23d0 getComputedStyle of border-radius shows the vertical radius components if they differ from their horizontal counterpants. We were incorrectly detecting this case and over simplifying the results of getComputedStyle. This patch ensures we only hide the vertical values if they are identical to the horizontal values. * css/CSSComputedStyleDeclaration.cpp: (WebCore::getBorderRadiusShorthandValue): 2013-12-08 Carlos Garcia Campos [GTK] Do not skip attributes with only custom setter https://bugs.webkit.org/show_bug.cgi?id=125417 Reviewed by Gustavo Noronha Silva. For attributes with a custom setter, we now generate the code as a read-only attribute with a getter method, unless it also has a custom getter in which case the attribute is skipped. * bindings/gobject/GNUmakefile.am: Generate WebKitDOMMediaController that is now required by an attribute having a custom setter. * bindings/gobject/WebKitDOMCustom.cpp: Remove methods that are now generated. * bindings/gobject/WebKitDOMCustom.h: Ditto. * bindings/gobject/WebKitDOMCustom.symbols: Ditto. * bindings/gobject/webkitdom.symbols: Add new symbols. * bindings/scripts/CodeGeneratorGObject.pm: (SkipAttribute): Do not skip attributes having a custom setter. (GetWriteableProperties): Do not include attributes having a custom setter. (GenerateProperty): Do not return early for attributes having custom setter. (GenerateFunctions): Do not generate setter for attributes having a custom setter. 2013-12-08 Carlos Garcia Campos [GTK] Do not generate new dispatch_event methods marked as deprecated https://bugs.webkit.org/show_bug.cgi?id=125416 Reviewed by Gustavo Noronha Silva. * bindings/scripts/CodeGeneratorGObject.pm: (SkipFunction): Skip dispatch_event methods for objects implementing EventTarget interface unless they are already deprecated. (GenerateFunction): Pass also the parentNode to SkipFunction(). 2013-12-05 Jer Noble [MSE] Bring end-of-stream algorithm section up to current spec. https://bugs.webkit.org/show_bug.cgi?id=125270 Reviewed by Darin Adler. Test: media/media-source/media-source-end-of-stream.html Separate the "endOfStream()" method from the "end of stream algorithm". * Modules/mediasource/MediaSource.cpp: (WebCore::SourceBufferIsUpdating): Added predicate function. (WebCore::MediaSource::endOfStream): Call streamEndedWithError(). (WebCore::MediaSource::streamEndedWithError): Added. * Modules/mediasource/MediaSource.h: * Modules/mediasource/SourceBuffer.cpp: (WebCore::SourceBuffer::appendBufferTimerFired): Call streamEndedWithError(). (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample): Ditto. * Modules/mediasource/SourceBuffer.h: * html/HTMLMediaElement.cpp: (HTMLMediaElement::mediaLoadingFailedFatally): Renamed from mediaEngineError. (HTMLMediaElement::mediaLoadingFailed): Call renamed method. * html/HTMLMediaElement.h: * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.mm: (WebCore::MediaSourcePrivateAVFObjC::markEndOfStream): Set load state to Loaded. * platform/mock/mediasource/MockMediaPlayerMediaSource.cpp: (WebCore::MockMediaPlayerMediaSource::setNetworkState): Simple setter. * platform/mock/mediasource/MockMediaPlayerMediaSource.h: * platform/mock/mediasource/MockMediaSourcePrivate.cpp: (WebCore::MockMediaSourcePrivate::MockMediaSourcePrivate): Set the intitial duration to NaN. (WebCore::MockMediaSourcePrivate::markEndOfStream): Set load state to Loaded. 2013-12-04 Jer Noble [MSE][Mac] Crash when removing MediaSource from HTMLMediaElement. https://bugs.webkit.org/show_bug.cgi?id=125269 Reviewed by Sam Weinig. Fixes the media/media-source/media-source-fastseek.html test when run with MallocScribble enabled. It's possible for a SourceBufferPrivateAVFObjC to outlive its MediaSourcePrivateAVFObjC, so make sure to clear the pointer from the former to the latter when the latter is destroyed. That means we now have to check to see if the pointer to the latter is still valid at every call site. As a drive-by fix, rename m_parent to m_mediaSource to more accurately reflect what the pointer points to. * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.mm: (WebCore::MediaSourcePrivateAVFObjC::~MediaSourcePrivateAVFObjC): Clear the SourceBuffer's backpointer. * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h: (WebCore::SourceBufferPrivateAVFObjC::clearMediaSource): * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm: (WebCore::SourceBufferPrivateAVFObjC::SourceBufferPrivateAVFObjC): Rename m_parent -> m_mediaSource. (WebCore::SourceBufferPrivateAVFObjC::append): Check m_mediaSource before calling. (WebCore::SourceBufferPrivateAVFObjC::removedFromMediaSource): Ditto. (WebCore::SourceBufferPrivateAVFObjC::readyState): Ditto. (WebCore::SourceBufferPrivateAVFObjC::setReadyState): Ditto. (WebCore::SourceBufferPrivateAVFObjC::trackDidChangeEnabled): Ditto. (WebCore::SourceBufferPrivateAVFObjC::flushAndEnqueueNonDisplayingSamples): Ditto. (WebCore::SourceBufferPrivateAVFObjC::enqueueSample): Ditto. (WebCore::SourceBufferPrivateAVFObjC::setActive): Ditto. * platform/mock/mediasource/MockMediaSourcePrivate.cpp: (WebCore::MockMediaSourcePrivate::~MockMediaSourcePrivate): Clear the SourceBuffer's backpointer. * platform/mock/mediasource/MockSourceBufferPrivate.cpp: (WebCore::MockSourceBufferPrivate::MockSourceBufferPrivate): Rename m_parent -> m_mediaSource. (WebCore::MockSourceBufferPrivate::removedFromMediaSource): Check m_mediaSource before calling. (WebCore::MockSourceBufferPrivate::readyState): Ditto. (WebCore::MockSourceBufferPrivate::setReadyState): Ditto. (WebCore::MockSourceBufferPrivate::setActive): Ditto. * platform/mock/mediasource/MockSourceBufferPrivate.h: (WebCore::MockSourceBufferPrivate::clearMediaSource): 2013-12-07 Zoltan Horvath Remove statusWithDirection static function from RenderBlockLineLayout https://bugs.webkit.org/show_bug.cgi?id=125372 Reviewed by Andreas Kling. I run into a FIXME about using BidiStatus constructor rather than statusWithDirection, once it's implemented. BidiStatus has got the appropriate constructor now, so I removed statusWithDirection and updated the code to use the constructor of BidiStatus. No new tests, no behavior change. * rendering/RenderBlockLineLayout.cpp: (WebCore::constructBidiRunsForSegment): 2013-12-07 ChangSeok Oh Unreviewed. Build fix for gtk port after r160260. * loader/cache/CachedImage.h: Add missing a header. 2013-12-07 Gustavo Noronha Silva ubuntu software center hits _XReadEvents() error https://bugs.webkit.org/show_bug.cgi?id=123480 Reviewed by Martin Robinson. * platform/gtk/WidgetBackingStoreGtkX11.cpp: (WebCore::WidgetBackingStoreGtkX11::~WidgetBackingStoreGtkX11): clear the surface before freeing the associated pixmap. 2013-12-06 Tim Horton [mac] Keep around more decoded image data, since it's purgeable https://bugs.webkit.org/show_bug.cgi?id=125273 Unreviewed patch to fix review comments... * platform/graphics/BitmapImage.h: Dan noticed that these return statements were improperly indented. 2013-12-05 Jer Noble [MSE][Mac] Disable AVFoundation when enabling the MockMediaPlayerMediaSource. https://bugs.webkit.org/show_bug.cgi?id=125338 Reviewed by Darin Adler. The MediaSource API has some assumptions which break if more than one installed media engine supports MediaSources at the same time. So when enabling the mock media source engine in DRT or WKTR, disable AVFoundation so that only the mock engine will support media source loading. * testing/Internals.cpp: (WebCore::Internals::initializeMockMediaSource): 2013-12-06 Antti Koivisto Use NeverDestroyed instead of DEFINE_STATIC_LOCAL Reviewed by Anders Carlsson. * rendering/RenderText.cpp: (WebCore::originalTextMap): 2013-12-05 Jer Noble [MSE] Add a runtime-setting for the MediaSource constructor. https://bugs.webkit.org/show_bug.cgi?id=125336 Reviewed by Eric Carlson. Add a Setting to enable the MediaSource constructor. * Modules/mediasource/MediaSource.idl: * page/Settings.in: 2013-12-06 Tim Horton [mac] Keep around more decoded image data, since it's purgeable https://bugs.webkit.org/show_bug.cgi?id=125273 Reviewed by Simon Fraser. No new tests, just an optimization. Instead of throwing away decoded image data eagerly, allow the operating system to manage the memory via the standard purgeability mechanism, where it can. This improves the performance on some pathological cases (extremely large animated GIFs) by up to 8x. * loader/cache/MemoryCache.cpp: (WebCore::MemoryCache::pruneLiveResourcesToSize): Don't prune live resources' decoded data if it is purgeable. * platform/graphics/BitmapImage.cpp: (WebCore::BitmapImage::destroyDecodedDataIfNecessary): Don't eagerly throw away decoded image data if it's purgeable. * loader/cache/CachedImage.h: * loader/cache/CachedResource.h: (WebCore::CachedResource::decodedDataIsPurgeable): * platform/graphics/BitmapImage.h: * platform/graphics/Image.h: (WebCore::Image::decodedDataIsPurgeable): 2013-12-06 Antti Koivisto Save original text for RenderText to a map https://bugs.webkit.org/show_bug.cgi?id=125278 Reviewed by Darin Adler. Currently the original text is fetched from the Text node. This is one of the few things where we use the RenderText node pointer and is stopping Text nodes from being anonymous. It is very rare of original text to differ from the actual text so we can just squirrel the original to a map when it differs. This is also simplifies the code. * rendering/RenderQuote.cpp: (WebCore::RenderQuote::styleDidChange): (WebCore::RenderQuote::updateDepth): * rendering/RenderText.cpp: (WebCore::originalTextMap): (WebCore::RenderText::RenderText): (WebCore::RenderText::~RenderText): (WebCore::RenderText::styleDidChange): (WebCore::RenderText::originalText): (WebCore::RenderText::setTextInternal): (WebCore::RenderText::setText): * rendering/RenderText.h: * rendering/RenderTextFragment.cpp: * rendering/RenderTextFragment.h: 2013-12-04 Jer Noble [MSE] Refactor MediaSourceBase back into MediaSource https://bugs.webkit.org/show_bug.cgi?id=125245 Reviewed by Eric Carlson. Now that the legacy WebKitMediaSource has been removed, there is no reason to have a separate MediaSource and MediaSourceBase. Re-integrate the two. Copy all the methods from MediaSource into MediaSourceBase, and rename the class MediaSource: * Modules/mediasource/MediaSource.cpp: Copied from MediaSourceBase.cpp. (WebCore::MediaSource::create): Copied from MediaSource.cpp. (WebCore::MediaSource::addSourceBuffer): Ditto. (WebCore::MediaSource::removeSourceBuffer): Ditto. (WebCore::MediaSource::isTypeSupported): Ditto. (WebCore::MediaSource::eventTargetInterface): Ditto. (WebCore::MediaSource::sourceBufferDidChangeAcitveState): Ditto. * Modules/mediasource/MediaSource.h: Copied from MediaSourceBase.h. (WebCore::MediaSource::sourceBuffers): Copied from MediaSource.h. (WebCore::MediaSource::activeSourceBuffers): Copied from MediaSource.h. * Modules/mediasource/MediaSourceBase.cpp: Removed. * Modules/mediasource/MediaSourceBase.h: Removed. Change all references to MediaSourceBase into MediaSource: * Modules/mediasource/DOMURLMediaSource.cpp: (WebCore::DOMURLMediaSource::createObjectURL): * Modules/mediasource/DOMURLMediaSource.h: * Modules/mediasource/MediaSourceRegistry.cpp: (WebCore::MediaSourceRegistry::registerURL): (WebCore::MediaSourceRegistry::unregisterURL): * Modules/mediasource/MediaSourceRegistry.h: Remove MediaSourceBase.cpp/h from the project file: * WebCore.xcodeproj/project.pbxproj: * GNUmakefile.list.am: 2013-12-06 Eric Carlson r159827 broke plug-in snapshotting https://bugs.webkit.org/show_bug.cgi?id=125365 Reviewed by Dean Jackson. No new tests, covered by existing tests. * html/HTMLPlugInImageElement.cpp: (WebCore::HTMLPlugInImageElement::didAddUserAgentShadowRoot): Return early if there is NOT a page, not if there IS a page. 2013-12-06 Roger Fong and Brent Fulgham [Win] Support compiling with VS2013 https://bugs.webkit.org/show_bug.cgi?id=125353 Reviewed by Anders Carlsson. * loader/archive/cf/LegacyWebArchive.cpp: (WebCore::LegacyWebArchive::create): Use nullptr (WebCore::LegacyWebArchive::createFromSelection): Ditto 2013-11-15 Jer Noble [MSE][Mac] Add a new MSE-compatible MediaPlayerPrivate implementation, MediaPlayerPrivateMediaSourceAVFObjC https://bugs.webkit.org/show_bug.cgi?id=123378 Reviewed by Eric Carlson. Add an AVFoundation implementation of MediaPlayerPrivate which creates and uses MediaSourcePrivate and SourceBufferPrivate subclasses. Add the new media engine to the list of installed engines: * platform/MediaSample.h: * platform/graphics/MediaPlayer.cpp: (WebCore::installedMediaEngines): * platform/graphics/MediaPlayer.h: Add the new files to the project: * WebCore.xcodeproj/project.pbxproj: Drive by fix for ports who implement seekDouble(): * platform/graphics/MediaPlayerPrivate.h: (WebCore::MediaPlayerPrivateInterface::seekWithTolerance): Add new Video and AudioTrackPrivate types which handle their own enable state: * platform/graphics/avfoundation/objc/AudioTrackPrivateMediaSourceAVFObjC.cpp: Added (WebCore::AudioTrackPrivateMediaSourceAVFObjC::AudioTrackPrivateMediaSourceAVFObjC): (WebCore::AudioTrackPrivateMediaSourceAVFObjC::resetPropertiesFromTrack): (WebCore::AudioTrackPrivateMediaSourceAVFObjC::setAssetTrack): (WebCore::AudioTrackPrivateMediaSourceAVFObjC::assetTrack): (WebCore::AudioTrackPrivateMediaSourceAVFObjC::setEnabled): * platform/graphics/avfoundation/objc/AudioTrackPrivateMediaSourceAVFObjC.h: Added * platform/graphics/avfoundation/objc/VideoTrackPrivateMediaSourceAVFObjC.cpp: Added. (WebCore::VideoTrackPrivateMediaSourceAVFObjC::VideoTrackPrivateMediaSourceAVFObjC): (WebCore::VideoTrackPrivateMediaSourceAVFObjC::resetPropertiesFromTrack): (WebCore::VideoTrackPrivateMediaSourceAVFObjC::setAssetTrack): (WebCore::VideoTrackPrivateMediaSourceAVFObjC::assetTrack): (WebCore::VideoTrackPrivateMediaSourceAVFObjC::setSelected): * platform/graphics/avfoundation/objc/VideoTrackPrivateMediaSourceAVFObjC.h: Added. Add a new MediaPlayerPrivate which can handle MediaSource objects: * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h: Added. * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm: Added. (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::MediaPlayerPrivateMediaSourceAVFObjC): (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::~MediaPlayerPrivateMediaSourceAVFObjC): (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::registerMediaEngine): (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::create): (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::isAvailable): (WebCore::mimeTypeCache): (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::getSupportedTypes): (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::supportsType): (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::load): (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::cancelLoad): (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::prepareToPlay): (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::platformMedia): (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::platformLayer): (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::play): (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::playInternal): (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::pause): (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::pauseInternal): (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::paused): (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::supportsScanning): (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::naturalSize): (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::hasVideo): (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::hasAudio): (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setVisible): (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::durationDouble): (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::currentTimeDouble): (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::startTimeDouble): (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::initialTime): (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekWithTolerance): (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekInternal): (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seeking): (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setRateDouble): (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::networkState): (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::readyState): (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekable): (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::maxTimeSeekableDouble): (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::minTimeSeekable): (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::buffered): (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::didLoadingProgress): (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setSize): (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::paint): (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::paintCurrentFrameInContext): (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::hasAvailableVideoFrame): (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::supportsAcceleratedRendering): (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::acceleratedRenderingStateChanged): (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::movieLoadType): (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::prepareForRendering): (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::engineDescription): (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::languageOfPrimaryAudioTrack): (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::extraMemoryCost): (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::ensureLayer): (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::destroyLayer): (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::updateDuration): (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::updateStates): (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setReadyState): (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setNetworkState): (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::addDisplayLayer): (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::removeDisplayLayer): Add a new MediaSourcePrivate implementation: * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.h: Added. (WebCore::MediaSourcePrivateAVFObjC::player): (WebCore::MediaSourcePrivateAVFObjC::activeSourceBuffers): * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.mm: Added. (WebCore::MediaSourcePrivateAVFObjC::create): (WebCore::MediaSourcePrivateAVFObjC::MediaSourcePrivateAVFObjC): (WebCore::MediaSourcePrivateAVFObjC::~MediaSourcePrivateAVFObjC): (WebCore::MediaSourcePrivateAVFObjC::addSourceBuffer): (WebCore::MediaSourcePrivateAVFObjC::removeSourceBuffer): (WebCore::MediaSourcePrivateAVFObjC::duration): (WebCore::MediaSourcePrivateAVFObjC::setDuration): (WebCore::MediaSourcePrivateAVFObjC::markEndOfStream): (WebCore::MediaSourcePrivateAVFObjC::unmarkEndOfStream): (WebCore::MediaSourcePrivateAVFObjC::readyState): (WebCore::MediaSourcePrivateAVFObjC::setReadyState): (WebCore::MediaSourcePrivateAVFObjC::sourceBufferPrivateDidChangeActiveState): (WebCore::MediaSourcePrivateAVFObjCHasAudio): (WebCore::MediaSourcePrivateAVFObjC::hasAudio): (WebCore::MediaSourcePrivateAVFObjCHasVideo): (WebCore::MediaSourcePrivateAVFObjC::hasVideo): (WebCore::MediaSourcePrivateAVFObjC::seekToTime): Add a new SourceBufferPrivate implementation: * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h: Added. * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm: Added. (-[WebAVStreamDataParserListener initWithParser:parent:WebCore::]): (-[WebAVStreamDataParserListener dealloc]): (-[WebAVStreamDataParserListener streamDataParser:didParseStreamDataAsAsset:]): (-[WebAVStreamDataParserListener streamDataParser:didFailToParseStreamDataWithError:]): (-[WebAVStreamDataParserListener streamDataParser:didProvideMediaData:forTrackID:mediaType:flags:]): (-[WebAVStreamDataParserListener streamDataParser:didReachEndOfTrackWithTrackID:mediaType:]): (WebCore::MediaSampleAVFObjC::create): (WebCore::MediaSampleAVFObjC::~MediaSampleAVFObjC): (WebCore::MediaSampleAVFObjC::MediaSampleAVFObjC): (WebCore::MediaSampleAVFObjC::platformSample): (WebCore::CMSampleBufferIsRandomAccess): (WebCore::MediaSampleAVFObjC::flags): (WebCore::MediaDescriptionAVFObjC::create): (WebCore::MediaDescriptionAVFObjC::~MediaDescriptionAVFObjC): (WebCore::MediaDescriptionAVFObjC::MediaDescriptionAVFObjC): (WebCore::SourceBufferPrivateAVFObjC::create): (WebCore::SourceBufferPrivateAVFObjC::SourceBufferPrivateAVFObjC): (WebCore::SourceBufferPrivateAVFObjC::~SourceBufferPrivateAVFObjC): (WebCore::SourceBufferPrivateAVFObjC::didParseStreamDataAsAsset): (WebCore::SourceBufferPrivateAVFObjC::didFailToParseStreamDataWithError): (WebCore::callProcessCodedFrameForEachSample): (WebCore::SourceBufferPrivateAVFObjC::didProvideMediaDataForTrackID): (WebCore::SourceBufferPrivateAVFObjC::processCodedFrame): (WebCore::SourceBufferPrivateAVFObjC::didReachEndOfTrackWithTrackID): (WebCore::SourceBufferPrivateAVFObjC::setClient): (WebCore::SourceBufferPrivateAVFObjC::append): (WebCore::SourceBufferPrivateAVFObjC::abort): (WebCore::SourceBufferPrivateAVFObjC::removedFromMediaSource): (WebCore::SourceBufferPrivateAVFObjC::readyState): (WebCore::SourceBufferPrivateAVFObjC::setReadyState): (WebCore::SourceBufferPrivateAVFObjC::evictCodedFrames): (WebCore::SourceBufferPrivateAVFObjC::isFull): (WebCore::SourceBufferPrivateAVFObjC::hasVideo): (WebCore::SourceBufferPrivateAVFObjC::hasAudio): (WebCore::SourceBufferPrivateAVFObjC::trackDidChangeEnabled): (WebCore::createNonDisplayingCopy): (WebCore::SourceBufferPrivateAVFObjC::flushAndEnqueueNonDisplayingSamples): (WebCore::SourceBufferPrivateAVFObjC::enqueueSample): (WebCore::SourceBufferPrivateAVFObjC::isReadyForMoreSamples): (WebCore::SourceBufferPrivateAVFObjC::setActive): (WebCore::SourceBufferPrivateAVFObjC::fastSeekTimeForMediaTime): (WebCore::SourceBufferPrivateAVFObjC::seekToTime): * platform/mac/PlatformClockCM.h: Add a SOFT_LINK_CLASS_OPTIONAL macro: * platform/mac/SoftLinking.h: 2013-12-06 Alexey Proskuryakov Remove some duplicate checks from SerializedScriptValue https://bugs.webkit.org/show_bug.cgi?id=125358 Reviewed by Geoffrey Garen. There is no need to call inherits() before WebCore's toXXX(JSValue) functions. Also, the result of toArrayBuffer() is a raw pointer, not a RefPtr (it's confusing because toArrayBufferView returns a RefPtr). * bindings/js/SerializedScriptValue.cpp: (WebCore::CloneSerializer::dumpIfTerminal): 2013-12-06 Tim Horton Remove Image::decodedSize() https://bugs.webkit.org/show_bug.cgi?id=125327 Reviewed by Simon Fraser. Missed a comment when removing this code. * svg/graphics/SVGImage.h: 2013-12-06 Rob Buis [CSS Shapes] ShapeOutsideInfo needs to use the parent's writing mode when calculating offsets https://bugs.webkit.org/show_bug.cgi?id=124680 Reviewed by Dirk Schulze. Do not take the writing-mode property on the float into account for shape-outside. Add a virtual method writingMode() in order to do this for shape-outside but keep old behavior (element writingMode) for shape-inside. Change existing test floats/shape-outside-floats-different-writing-modes.html to test the new behavior. * rendering/shapes/ShapeInfo.cpp: (WebCore::::computedShape): * rendering/shapes/ShapeInfo.h: (WebCore::ShapeInfo::writingMode): * rendering/shapes/ShapeOutsideInfo.cpp: (WebCore::ShapeOutsideInfo::writingMode): * rendering/shapes/ShapeOutsideInfo.h: 2013-12-06 Joseph Pecoraro Web Inspector: Remove Staging Workaround https://bugs.webkit.org/show_bug.cgi?id=125354 Reviewed by Timothy Hatcher. * inspector/CodeGeneratorInspector.py: 2013-12-06 Joseph Pecoraro Simplify ScriptFunctionCall by removing dead code. https://bugs.webkit.org/show_bug.cgi?id=125274 Reviewed by Timothy Hatcher. * bindings/js/ScriptFunctionCall.cpp: (WebCore::ScriptFunctionCall::call): * bindings/js/ScriptFunctionCall.h: 2013-12-06 Daniel Bates [iOS] Upstream WebCore/rendering changes https://bugs.webkit.org/show_bug.cgi?id=125239 Reviewed by Simon Fraser. * WebCore.xcodeproj/project.pbxproj: * rendering/InlineBox.cpp: (WebCore::InlineBox::previousOnLineExists): Added. * rendering/InlineBox.h: * rendering/InlineTextBox.cpp: (WebCore::InlineTextBox::paintCompositionBackground): Modified to query RenderStyle on iOS for the composition fill color. Added FIXME to make this platform-independent. (WebCore::InlineTextBox::paintDecoration): Added iOS-specific decoration code. (WebCore::lineStyleForMarkerType): (WebCore::InlineTextBox::paintDocumentMarkers): Added iOS-specific code. Also, added FIXME to make this code platform-independent. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::paint): Ditto. (WebCore::positionForPointRespectingEditingBoundaries): Added iOS-specific code. * rendering/RenderBlock.h: Changed access control of logical{Left, Right}SelectionOffset() from private to protected so that these methods can be used from RenderImage::collectSelectionRects(). * rendering/RenderBox.cpp: (WebCore::RenderBox::borderRadii): Added. (WebCore::RenderBox::paintBoxDecorations): Added iOS-specific workaround. See for more details. (WebCore::RenderBox::computeRectForRepaint): Added iOS-specific code. (WebCore::customContainingBlockWidth): Added; guarded by PLATFORM(IOS). (WebCore::customContainingBlockHeight): Added; guarded by PLATFORM(IOS). (WebCore::customContainingBlockLogicalWidth): Added; guarded by PLATFORM(IOS). (WebCore::customContainingBlockLogicalHeight): Added; guarded by PLATFORM(IOS). (WebCore::customContainingBlockAvailableLogicalHeight): Added; guarded by PLATFORM(IOS). (WebCore::RenderBox::availableLogicalHeightUsing): Added iOS-specific code; calls customContainingBlockAvailableLogicalHeight(). (WebCore::RenderBox::containingBlockLogicalWidthForPositioned): Added iOS-specific code; calls customContainingBlockLogicalWidth(). (WebCore::RenderBox::containingBlockLogicalHeightForPositioned): Added iOS-specific code; calls customContainingBlockLogicalHeight(). (WebCore::RenderBox::layoutOverflowRectForPropagation): Added iOS-specific code. * rendering/RenderBox.h: * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::stickyPositionOffset): Use FrameView::customFixedPositionLayoutRect() instead of FrameView::viewportConstrainedVisibleContentRect(). * rendering/RenderButton.cpp: (WebCore::RenderButton::layout): Added; iOS-specific. Includes FIXME comment. See for more details. * rendering/RenderElement.cpp: (WebCore::RenderElement::styleWillChange): Added iOS-specific code. (WebCore::RenderElement::styleDidChange): Modified to only call areCursorsEqual() and EventHandler::scheduleCursorUpdate() on a non-iOS port. * rendering/RenderEmbeddedObject.cpp: (WebCore::RenderEmbeddedObject::allowsAcceleratedCompositing): Added iOS-specific code. (WebCore::RenderEmbeddedObject::setPluginUnavailabilityReason): This method has an empty implementation for iOS. (WebCore::RenderEmbeddedObject::setPluginUnavailabilityReasonWithDescription): Ditto. * rendering/RenderFileUploadControl.cpp: (WebCore::nodeHeight): (WebCore::RenderFileUploadControl::maxFilenameWidth): Added iOS-specific code. (WebCore::RenderFileUploadControl::paintObject): Ditto. (WebCore::RenderFileUploadControl::fileTextValue): Ditto. * rendering/RenderFrameSet.cpp: (WebCore::RenderFrameSet::positionFrames): Ditto; Also added FIXME comment as this code may not be specific to iOS. * rendering/RenderIFrame.h: Added iOS-specific workaround to RenderObject::renderName(). Added FIXME comment to determine whether this workaround is still applicable. * rendering/RenderImage.cpp: (WebCore::RenderImage::collectSelectionRects): Added; guarded by PLATFORM(IOS). (WebCore::RenderImage::paintAreaElementFocusRing): This method has an empty implementation for iOS. * rendering/RenderImage.h: * rendering/RenderInline.cpp: (WebCore::RenderInline::absoluteQuadsForSelection): Added; guarded by PLATFORM(IOS). * rendering/RenderInline.h: * rendering/RenderLayer.cpp: (WebCore::RenderLayer::RenderLayer): Added iOS-specific member initialization. (WebCore::RenderLayer::~RenderLayer): Added iOS-specific code. (WebCore::RenderLayer::willBeDestroyed): Added; iOS-specific. (WebCore::RenderLayer::hasAcceleratedTouchScrolling): Ditto. (WebCore::RenderLayer::handleTouchEvent): Ditto. (WebCore::RenderLayer::registerAsTouchEventListenerForScrolling): Ditto. (WebCore::RenderLayer::unregisterAsTouchEventListenerForScrolling): Ditto. (WebCore::RenderLayer::updateNeedsCompositedScrolling): Added iOS-specific code as we use UIKit to composite our scroll bars. (WebCore::RenderLayer::scrollTo): Added iOS-specific code. (WebCore::RenderLayer::scrollRectToVisible): Ditto. (WebCore::RenderLayer::styleChanged): Modified to make use of the passed StyleDifference on iOS. (WebCore::RenderLayer::visibleContentRect): Added; iOS-specific. (WebCore::RenderLayer::didStartScroll): Ditto. (WebCore::RenderLayer::didEndScroll): Ditto. (WebCore::RenderLayer::didUpdateScroll): Ditto. (WebCore::RenderLayer::invalidateScrollbarRect): Added iOS-specific code. (WebCore::RenderLayer::invalidateScrollCornerRect): Ditto. (WebCore::RenderLayer::verticalScrollbarWidth): Ditto. (WebCore::RenderLayer::horizontalScrollbarHeight): Ditto. (WebCore::RenderLayer::updateScrollableAreaSet): Ditto. (WebCore::RenderLayer::updateScrollInfoAfterLayout): Add iOS-specific workaround with FIXME. See for more details. (WebCore::RenderLayer::paintOverflowControls): Added iOS-specific code. (WebCore::RenderLayer::calculateClipRects): Ditto. * rendering/RenderLayer.h: * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::createPrimaryGraphicsLayer): Modified to not apply page scale on iOS as we apply a page scale at a different time in the code. (WebCore::RenderLayerBacking::layerWillBeDestroyed): Added; guarded by PLATFORM(IOS). (WebCore::layerOrAncestorIsTransformedOrScrolling): Added iOS-specific variant with FIXME comment. (WebCore::RenderLayerBacking::shouldClipCompositedBounds): Added iOS-specific code. (WebCore::RenderLayerBacking::updateGraphicsLayerConfiguration): Ditto. (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry): Ditto. (WebCore::RenderLayerBacking::registerScrollingLayers): Ditto. (WebCore::RenderLayerBacking::updateScrollingLayers): Ditto. (WebCore::RenderLayerBacking::containsPaintedContent): Call RenderLayer::hasBoxDecorationsOrBackground() when building on iOS Simulator. (WebCore::RenderLayerBacking::parentForSublayers): Added iOS-specific code and FIXME comment. (WebCore::RenderLayerBacking::paintsIntoWindow): Opt-into coordinated graphics code path. (WebCore::RenderLayerBacking::setContentsNeedDisplayInRect): Added iOS-specific code. (WebCore::RenderLayerBacking::paintIntoLayer): Compile-out ASSERT_NOT_REACHED for iOS and added FIXME comment. * rendering/RenderLayerBacking.h: * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::scheduleLayerFlush): Added iOS-specific code. (WebCore::RenderLayerCompositor::chromeClient): Added; guarded by PLATFORM(IOS). (WebCore::RenderLayerCompositor::flushPendingLayerChanges): Added iOS-specific code. (WebCore::scrollbarHasDisplayNone): Added; iOS-specific. (WebCore::updateScrollingLayerWithClient): Ditto. (WebCore::RenderLayerCompositor::updateCustomLayersAfterFlush): Ditto. (WebCore::RenderLayerCompositor::didFlushChangesForLayer): Added iOS-specific code. (WebCore::RenderLayerCompositor::didChangeVisibleRect): Ditto. (WebCore::RenderLayerCompositor::addToOverlapMap): Don't apply page scale factor on iOS. We apply the page scale factor at a different time in the code. Also, added FIXME comment. (WebCore::RenderLayerCompositor::computeCompositingRequirements): Added iOS-specific workaround. See for more details. (WebCore::RenderLayerCompositor::setIsInWindow): Use non-Mac code path for iOS. (WebCore::RenderLayerCompositor::allowsIndependentlyCompositedFrames): Added iOS-specific code. (WebCore::RenderLayerCompositor::requiresCompositingLayer): Ditto. (WebCore::RenderLayerCompositor::requiresOwnBackingStore): Ditto. (WebCore::RenderLayerCompositor::reasonsForCompositing): Ditto. (WebCore::RenderLayerCompositor::requiresCompositingForAnimation): Opt-into calling AnimationController::isRunningAnimationOnRenderer() on iOS. (WebCore::RenderLayerCompositor::requiresCompositingForScrolling): Added; guarded by PLATFORM(IOS). (WebCore::isStickyInAcceleratedScrollingLayerOrViewport): Added iOS-specific code. (WebCore::isViewportConstrainedFixedOrStickyLayer): Ditto. (WebCore::RenderLayerCompositor::requiresCompositingForPosition): Use FrameView::customFixedPositionLayoutRect() instead of FrameView::viewportConstrainedVisibleContentRect(). (WebCore::RenderLayerCompositor::contentsScaleMultiplierForNewTiles): Ditto. (WebCore::RenderLayerCompositor::ensureRootLayer): Ditto. (WebCore::RenderLayerCompositor::computeFixedViewportConstraints): Use FrameView::customFixedPositionLayoutRect() instead of FrameView::viewportConstrainedVisibleContentRect(). (WebCore::RenderLayerCompositor::computeStickyViewportConstraints): Ditto. (WebCore::RenderLayerCompositor::registerOrUpdateViewportConstrainedLayer): This method has an empty implementation for iOS as we batch update viewport-constrained layers in the iOS-specific method, RenderLayerCompositor::updateCustomLayersAfterFlush(). (WebCore::RenderLayerCompositor::unregisterViewportConstrainedLayer): Ditto. (WebCore::RenderLayerCompositor::registerAllViewportConstrainedLayers): Added; guarded by PLATFORM(IOS). (WebCore::RenderLayerCompositor::unregisterAllViewportConstrainedLayers): Ditto. (WebCore::RenderLayerCompositor::registerAllScrollingLayers): Ditto. (WebCore::RenderLayerCompositor::unregisterAllScrollingLayers): Ditto. (WebCore::RenderLayerCompositor::scrollingLayerAddedOrUpdated): Ditto. (WebCore::RenderLayerCompositor::scrollingLayerRemoved): Ditto. (WebCore::RenderLayerCompositor::startInitialLayerFlushTimerIfNeeded): Ditto. * rendering/RenderLayerCompositor.h: * rendering/RenderLayerFilterInfo.h: Added iOS-specific Clang workaround to ignore an unused private field. * rendering/RenderMenuList.cpp: (WebCore::selectedOptionCount): Added; guarded by PLATFORM(IOS). (WebCore::RenderMenuList::RenderMenuList): On iOS we don't make use of RenderMenuList::m_popupIsVisible. (WebCore::RenderMenuList::~RenderMenuList): On iOS we don't make use of RenderMenuList::m_popup. (WebCore::RenderMenuList::adjustInnerStyle): Add iOS-specific code. (RenderMenuList::updateFromElement): On iOS we don't make use of RenderMenuList::m_popup. (RenderMenuList::setTextFromOption): Add iOS-specific code. (RenderMenuList::showPopup): Define RenderMenuList::showPopup() to ASSERT_NOT_REACHED() on iOS as we don't make use of RenderMenuList::m_popup. (RenderMenuList::hidePopup): This method has an empty implementation for iOS as we don't make use of RenderMenuList::m_popup. (RenderMenuList::popupDidHide): This method has an empty implementation for iOS as we don't make use of RenderMenuList::m_popupIsVisible. * rendering/RenderMenuList.h: * rendering/RenderObject.cpp: (WebCore::RenderObject::columnNumberForOffset): Added; guarded by PLATFORM(IOS). Also, added a FIXME comment to make this function return an unsigned integer instead of a signed integer. (WebCore::RenderObject::collectSelectionRects): Added; guarded by PLATFORM(IOS). (WebCore::RenderObject::destroy): Added iOS-specific code. (WebCore::RenderObject::innerLineHeight): Added. (WebCore::RenderObject::willRenderImage): Added iOS-specific code. * rendering/RenderObject.h: Change the access control of RenderObject::drawLineForBoxSide() from protected to public so that it can be used from RenderThemeIOS::adjustMenuListButtonStyle(). (WebCore::RenderObject::absoluteQuadsForSelection): * rendering/RenderScrollbar.h: Change the access control of RenderScrollbar::getScrollbarPseudoStyle() from private to public so that it can be used from the iOS-specific static function, scrollbarHasDisplayNone, defined in RenderLayerCompositor.cpp. * rendering/RenderSearchField.cpp: (WebCore::RenderSearchField::itemText): Added iOS-specific code. * rendering/RenderText.cpp: (WebCore::RenderText::collectSelectionRects): Added; guarded by PLATFORM(IOS). (WebCore::RenderText::setTextInternal): Added iOS-specific code. * rendering/RenderText.h: * rendering/RenderTextControl.cpp: (WebCore::RenderTextControl::adjustInnerTextStyle): Ditto. (WebCore::RenderTextControl::canScroll): Added; guarded by PLATFORM(IOS). (WebCore::RenderTextControl::innerLineHeight): Ditto. * rendering/RenderTextControl.h: * rendering/RenderTextControlMultiLine.cpp: (WebCore::RenderTextControlMultiLine::getAvgCharWidth): Compile-out code when building for iOS. (WebCore::RenderTextControlMultiLine::createInnerTextStyle): Added iOS-specific code. * rendering/RenderTextControlSingleLine.cpp: (WebCore::RenderTextControlSingleLine::layout): Ditto. (WebCore::RenderTextControlSingleLine::getAvgCharWidth): Compile-out code when building for iOS. (WebCore::RenderTextControlSingleLine::preferredContentLogicalWidth): Ditto. * rendering/RenderTextLineBoxes.cpp: (WebCore::lineDirectionPointFitsInBox): Ditto. (WebCore::RenderTextLineBoxes::positionForPoint): Added iOS-specific code. * rendering/RenderTheme.cpp: (WebCore::RenderTheme::paintBorderOnly): Ditto. (WebCore::RenderTheme::paintDecorations): Modified to call the control-specific paint*Decorations(). * rendering/RenderTheme.h: (WebCore::RenderTheme::paintCheckboxDecorations): Added. (WebCore::RenderTheme::paintRadioDecorations): Added. (WebCore::RenderTheme::paintButtonDecorations): Added. (WebCore::RenderTheme::paintTextFieldDecorations): Added. (WebCore::RenderTheme::paintTextAreaDecorations): Added. (WebCore::RenderTheme::paintMenuListDecorations): Added. (WebCore::RenderTheme::paintPushButtonDecorations): Added. (WebCore::RenderTheme::paintSquareButtonDecorations): Added. (WebCore::RenderTheme::paintFileUploadIconDecorations): Added. (WebCore::RenderTheme::paintSliderThumbDecorations): Added. (WebCore::RenderTheme::paintSearchFieldDecorations): Added. * rendering/RenderThemeIOS.h: Added. * rendering/RenderThemeIOS.mm: Added. * rendering/RenderThemeMac.h: Don't compile the contents of this file when building for iOS. * rendering/RenderThemeMac.mm: Ditto. * rendering/RenderVideo.cpp: (WebCore::RenderVideo::calculateIntrinsicSize): Compile-out code when building for iOS. * rendering/RenderView.cpp: (WebCore::RenderView::availableLogicalHeight): Add iOS-specific workaround. See . (WebCore::fixedPositionOffset): Added; used in iOS-specific code (e.g. RenderView::mapLocalToContainer()). (WebCore::RenderView::mapLocalToContainer): Use WebCore::fixedPositionOffset() instead of FrameView::scrollOffsetForFixedPosition(). (WebCore::RenderView::pushMappingToContainer): Ditto. (WebCore::RenderView::mapAbsoluteToLocalPoint): Ditto. (WebCore::RenderView::repaintViewRectangle): Ditto. (WebCore::RenderView::computeRectForRepaint): Ditto. (WebCore::isFixedPositionInViewport): Added; used in RenderView::hasCustomFixedPosition(). (WebCore::RenderView::hasCustomFixedPosition): Added; guarded by PLATFORM(IOS). * rendering/RenderView.h: * rendering/RenderWidget.cpp: (WebCore::RenderWidget::willBeDestroyed): Added iOS-specific code. * rendering/RootInlineBox.cpp: (WebCore::RootInlineBox::ascentAndDescentForBox): Ditto. * rendering/break_lines.cpp: Only include header when building for Mac. 2013-12-06 Zoltan Horvath Clean up the includes of RenderBlock.h https://bugs.webkit.org/show_bug.cgi?id=125351 Reviewed by Darin Adler. I turned some header includes into forward declarations. I also removed / moved out some includes, which don't belong to RenderBlock.h anymore. No new tests, no behavior change. * editing/VisibleUnits.cpp: * html/HTMLInputElement.cpp: * html/HTMLTextAreaElement.cpp: * html/TextFieldInputType.cpp: * html/TextInputType.cpp: * rendering/InlineElementBox.cpp: * rendering/RenderBlock.h: * rendering/RenderBlockFlow.cpp: * rendering/line/LineBreaker.h: * rendering/line/LineWidth.cpp: 2013-12-06 Laszlo Vidacs Define SHA1 hash size in SHA1.h and use it at various places. https://bugs.webkit.org/show_bug.cgi?id=125345 Reviewed by Darin Adler. Use SHA1::hashSize instead of local variables. * Modules/websockets/WebSocketHandshake.cpp: (WebCore::WebSocketHandshake::getExpectedWebSocketAccept): * platform/network/soup/ResourceHandleSoup.cpp: (WebCore::HostTLSCertificateSet::computeCertificateHash): 2013-12-06 Dan Bernstein [Cocoa] Add load delegate methods for responding to authentication challenges https://bugs.webkit.org/show_bug.cgi?id=125333 Reviewed by Darin Adler. * WebCore.exp.in: Exported core(NSURLCredential *). 2013-12-06 Daniel Bates Rename {adjust, paint}SearchFieldDecoration, {adjust, paint}SearchFieldResultsDecoration https://bugs.webkit.org/show_bug.cgi?id=125191 Reviewed by Joseph Pecoraro. Towards upstreaming the iOS concept of render theme decorations, we should rename RenderTheme::{adjust, paint}SearchFieldDecorationStyle and RenderTheme::{adjust, paint}SearchFieldResultsDecoration to avoid ambiguity with the iOS concept. * platform/efl/RenderThemeEfl.cpp: * platform/efl/RenderThemeEfl.h: * platform/gtk/RenderThemeGtk.cpp: * platform/gtk/RenderThemeGtk.h: * rendering/RenderTheme.cpp: * rendering/RenderTheme.h: * rendering/RenderThemeMac.h: * rendering/RenderThemeMac.mm: * rendering/RenderThemeSafari.cpp: * rendering/RenderThemeSafari.h: * rendering/RenderThemeWin.cpp: * rendering/RenderThemeWin.h: * rendering/RenderThemeWinCE.cpp: * rendering/RenderThemeWinCE.h: 2013-12-06 Andreas Kling Make remaining CSSValue constructors return PassRef. Tweak the remaining CSSValue create() helpers to return PassRef instead of PassRefPtr in the cases where nullptr is never returned. Reviewed by Anders Carlsson. 2013-12-06 Roger Fong Hook into some shader symbol logic following the ANGLE update in r159533. https://bugs.webkit.org/show_bug.cgi?id=125332. Reviewed by Brent Fulgham. No new functionality added. * html/canvas/WebGLRenderingContext.cpp: Add some error checking for errors related to shader symbols that exist across both vertex and fragment shaders. (WebCore::WebGLRenderingContext::linkProgram): * platform/graphics/ANGLEWebKitBridge.cpp: Add logic for handling varyings and add new fields to the ANGLEShaderSymbol struct. (WebCore::getSymbolInfo): * platform/graphics/ANGLEWebKitBridge.h: * platform/graphics/GraphicsContext3D.h: Add those same fields to the SymbolInfo struct as well so that we can access them from our shader source map. Also add a map of varyings along side the uniforms and attributes. (WebCore::GraphicsContext3D::SymbolInfo::SymbolInfo): (WebCore::GraphicsContext3D::ShaderSourceEntry::symbolMap): * platform/graphics/opengl/Extensions3DOpenGLCommon.cpp: (WebCore::Extensions3DOpenGLCommon::getTranslatedShaderSourceANGLE): * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp: (WebCore::GraphicsContext3D::areProgramSymbolsValid): Will be filled in later, this method will use the shader source map to check for issues with unused varyings and precisions mismatches of shader symbols that exist across both the vertex and fragment shaders. 2013-12-06 Lukasz Gajowy [ATK] Missing aria roles mappings https://bugs.webkit.org/show_bug.cgi?id=117729 Reviewed by Mario Sanchez Prada. Added a few mappings from ARIA roles to ATK roles. Test: accessibility/aria-mappings.html * accessibility/atk/WebKitAccessibleWrapperAtk.cpp: (atkRole): 2013-11-11 Philippe Normand [GStreamer] webkitwebaudiosrc element needs to emit stream-start, caps and segment events https://bugs.webkit.org/show_bug.cgi?id=123015 Reviewed by Martin Robinson. When the source element starts emitting buffers send along various events to notify downstream elements. No new tests, change covered by existing webaudio tests. * platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp: (webkit_web_audio_src_init): Initialize segment. (webKitWebAudioSrcConstructed): Give an explicit name to each queue added in front of the interleave element. (webKitWebAudioSrcLoop): Before sending the first buffers push stream-start, caps and segment events on each queue's sinkpad. 2013-12-05 Philippe Normand [GStreamer] Audio/Video sink management is incoherent https://bugs.webkit.org/show_bug.cgi?id=125304 Reviewed by Gustavo Noronha Silva. Allow subclasses of MediaPlayerPrivateGStreamerBase to create custom audio/video sinks in a coherent manner using create{Audio,Video}Sink methods. Convenience getters are also available. Also removed some un-needed member variables in the playbin-based player. No new tests, existing media tests cover this change. * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: (WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer): (WebCore::MediaPlayerPrivateGStreamer::updateStates): (WebCore::MediaPlayerPrivateGStreamer::createAudioSink): (WebCore::MediaPlayerPrivateGStreamer::audioSink): (WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin): * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h: * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp: * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h: (WebCore::MediaPlayerPrivateGStreamerBase::createAudioSink): 2013-12-05 Gyuyoung Kim Introduce IMAGE_TYPE_CASTS, and use it https://bugs.webkit.org/show_bug.cgi?id=125330 Reviewed by Ryosuke Niwa. As a step to use TYPE_CASTS_BASE, this cl introduce IMAGE_TYPE_CASTS. BitmapImage and SVGImage can use it to generate toFoo() type case helper functions. No new tests, no behavior changes. * loader/cache/CachedImage.cpp: (WebCore::CachedImage::imageSizeForRenderer): (WebCore::CachedImage::resumeAnimatingImagesForLoader): * platform/graphics/BitmapImage.h: * platform/graphics/Image.h: * platform/mac/DragImageMac.mm: (WebCore::createDragImageFromImage): * svg/graphics/SVGImage.h: 2013-12-05 Zoltan Horvath Clean up the forwarding headers of RenderBlock.h https://bugs.webkit.org/show_bug.cgi?id=125323 Reviewed by Ryosuke Niwa. In this patch, I removed the unnecessary forwarding headers from RenderBlock.h, and moved some to RenderBlockFlow.h. No new tests, no behavior change. * rendering/RenderBlock.h: Remove unnecessary forwarding headers. * rendering/RenderBlockFlow.h: Moved some forwarding headers from RenderBlock.h 2013-12-04 Oliver Hunt Refactor static getter function prototype to include thisValue in addition to the base object https://bugs.webkit.org/show_bug.cgi?id=124461 Reviewed by Geoffrey Garen. Change bindings codegen to produce static getter functions with the correct types. Also update the many custom implementations to the new type. No change in behaviour. * bindings/js/JSCSSStyleDeclarationCustom.cpp: (WebCore::cssPropertyGetterPixelOrPosPrefixCallback): (WebCore::cssPropertyGetterCallback): * bindings/js/JSDOMBinding.cpp: (WebCore::objectToStringFunctionGetter): * bindings/js/JSDOMBinding.h: * bindings/js/JSDOMMimeTypeArrayCustom.cpp: (WebCore::JSDOMMimeTypeArray::nameGetter): * bindings/js/JSDOMPluginArrayCustom.cpp: (WebCore::JSDOMPluginArray::nameGetter): * bindings/js/JSDOMPluginCustom.cpp: (WebCore::JSDOMPlugin::nameGetter): * bindings/js/JSDOMStringMapCustom.cpp: (WebCore::JSDOMStringMap::nameGetter): * bindings/js/JSDOMWindowCustom.cpp: (WebCore::nonCachingStaticFunctionGetter): (WebCore::childFrameGetter): (WebCore::indexGetter): (WebCore::namedItemGetter): * bindings/js/JSHTMLAllCollectionCustom.cpp: (WebCore::JSHTMLAllCollection::nameGetter): * bindings/js/JSHTMLCollectionCustom.cpp: (WebCore::JSHTMLCollection::nameGetter): * bindings/js/JSHTMLDocumentCustom.cpp: (WebCore::JSHTMLDocument::nameGetter): * bindings/js/JSHTMLFormControlsCollectionCustom.cpp: (WebCore::JSHTMLFormControlsCollection::nameGetter): * bindings/js/JSHTMLFormElementCustom.cpp: (WebCore::JSHTMLFormElement::nameGetter): * bindings/js/JSHTMLFrameSetElementCustom.cpp: (WebCore::JSHTMLFrameSetElement::nameGetter): * bindings/js/JSHistoryCustom.cpp: (WebCore::nonCachingStaticBackFunctionGetter): (WebCore::nonCachingStaticForwardFunctionGetter): (WebCore::nonCachingStaticGoFunctionGetter): * bindings/js/JSJavaScriptCallFrameCustom.cpp: (WebCore::JSJavaScriptCallFrame::scopeType): * bindings/js/JSLocationCustom.cpp: (WebCore::nonCachingStaticReplaceFunctionGetter): (WebCore::nonCachingStaticReloadFunctionGetter): (WebCore::nonCachingStaticAssignFunctionGetter): * bindings/js/JSNamedNodeMapCustom.cpp: (WebCore::JSNamedNodeMap::nameGetter): * bindings/js/JSNodeListCustom.cpp: (WebCore::JSNodeList::nameGetter): * bindings/js/JSPluginElementFunctions.cpp: (WebCore::pluginElementPropertyGetter): * bindings/js/JSPluginElementFunctions.h: * bindings/js/JSRTCStatsResponseCustom.cpp: (WebCore::JSRTCStatsResponse::nameGetter): * bindings/js/JSStorageCustom.cpp: (WebCore::JSStorage::nameGetter): * bindings/js/JSStyleSheetListCustom.cpp: (WebCore::JSStyleSheetList::nameGetter): * bindings/scripts/CodeGeneratorJS.pm: (GenerateHeader): (GenerateImplementation): (GenerateParametersCheck): * bridge/runtime_array.cpp: (JSC::RuntimeArray::lengthGetter): (JSC::RuntimeArray::indexGetter): * bridge/runtime_array.h: * bridge/runtime_method.cpp: (JSC::RuntimeMethod::lengthGetter): * bridge/runtime_method.h: * bridge/runtime_object.cpp: (JSC::Bindings::RuntimeObject::fallbackObjectGetter): (JSC::Bindings::RuntimeObject::fieldGetter): (JSC::Bindings::RuntimeObject::methodGetter): * bridge/runtime_object.h: 2013-12-05 Tim Horton Remove Image::decodedSize() https://bugs.webkit.org/show_bug.cgi?id=125327 Reviewed by Sam Weinig. No new tests, just removing dead code. * platform/graphics/BitmapImage.cpp: (WebCore::BitmapImage::resetAnimation): * platform/graphics/BitmapImage.h: * platform/graphics/GeneratedImage.h: * platform/graphics/Image.h: * platform/graphics/cg/PDFDocumentImage.cpp: * platform/graphics/cg/PDFDocumentImage.h: * svg/graphics/SVGImage.h: * svg/graphics/SVGImageForContainer.h: 2013-12-05 Commit Queue Unreviewed, rolling out r160133. http://trac.webkit.org/changeset/160133 https://bugs.webkit.org/show_bug.cgi?id=125325 broke bindings tests on all the bots (Requested by thorton on #webkit). * bindings/js/JSCSSStyleDeclarationCustom.cpp: (WebCore::cssPropertyGetterPixelOrPosPrefixCallback): (WebCore::cssPropertyGetterCallback): * bindings/js/JSDOMBinding.cpp: (WebCore::objectToStringFunctionGetter): * bindings/js/JSDOMBinding.h: * bindings/js/JSDOMMimeTypeArrayCustom.cpp: (WebCore::JSDOMMimeTypeArray::nameGetter): * bindings/js/JSDOMPluginArrayCustom.cpp: (WebCore::JSDOMPluginArray::nameGetter): * bindings/js/JSDOMPluginCustom.cpp: (WebCore::JSDOMPlugin::nameGetter): * bindings/js/JSDOMStringMapCustom.cpp: (WebCore::JSDOMStringMap::nameGetter): * bindings/js/JSDOMWindowCustom.cpp: (WebCore::nonCachingStaticFunctionGetter): (WebCore::childFrameGetter): (WebCore::indexGetter): (WebCore::namedItemGetter): * bindings/js/JSHTMLAllCollectionCustom.cpp: (WebCore::JSHTMLAllCollection::nameGetter): * bindings/js/JSHTMLCollectionCustom.cpp: (WebCore::JSHTMLCollection::nameGetter): * bindings/js/JSHTMLDocumentCustom.cpp: (WebCore::JSHTMLDocument::nameGetter): * bindings/js/JSHTMLFormControlsCollectionCustom.cpp: (WebCore::JSHTMLFormControlsCollection::nameGetter): * bindings/js/JSHTMLFormElementCustom.cpp: (WebCore::JSHTMLFormElement::nameGetter): * bindings/js/JSHTMLFrameSetElementCustom.cpp: (WebCore::JSHTMLFrameSetElement::nameGetter): * bindings/js/JSHistoryCustom.cpp: (WebCore::nonCachingStaticBackFunctionGetter): (WebCore::nonCachingStaticForwardFunctionGetter): (WebCore::nonCachingStaticGoFunctionGetter): * bindings/js/JSJavaScriptCallFrameCustom.cpp: (WebCore::JSJavaScriptCallFrame::scopeType): * bindings/js/JSLocationCustom.cpp: (WebCore::nonCachingStaticReplaceFunctionGetter): (WebCore::nonCachingStaticReloadFunctionGetter): (WebCore::nonCachingStaticAssignFunctionGetter): * bindings/js/JSNamedNodeMapCustom.cpp: (WebCore::JSNamedNodeMap::nameGetter): * bindings/js/JSNodeListCustom.cpp: (WebCore::JSNodeList::nameGetter): * bindings/js/JSPluginElementFunctions.cpp: (WebCore::pluginElementPropertyGetter): * bindings/js/JSPluginElementFunctions.h: * bindings/js/JSRTCStatsResponseCustom.cpp: (WebCore::JSRTCStatsResponse::nameGetter): * bindings/js/JSStorageCustom.cpp: (WebCore::JSStorage::nameGetter): * bindings/js/JSStyleSheetListCustom.cpp: (WebCore::JSStyleSheetList::nameGetter): * bindings/scripts/CodeGeneratorJS.pm: (GenerateHeader): (GenerateImplementation): (GenerateParametersCheck): * bridge/runtime_array.cpp: (JSC::RuntimeArray::lengthGetter): (JSC::RuntimeArray::indexGetter): * bridge/runtime_array.h: * bridge/runtime_method.cpp: (JSC::RuntimeMethod::lengthGetter): * bridge/runtime_method.h: * bridge/runtime_object.cpp: (JSC::Bindings::RuntimeObject::fallbackObjectGetter): (JSC::Bindings::RuntimeObject::fieldGetter): (JSC::Bindings::RuntimeObject::methodGetter): * bridge/runtime_object.h: 2013-12-05 Seokju Kwon Web Inspector: Remove 'cookiesString' output from Page.getCookies https://bugs.webkit.org/show_bug.cgi?id=125268 Reviewed by Timothy Hatcher. Remove 'cookiesString' output from Page.getCookies protocol. It is no longer meaningful because it is an unused parameter. No new tests, no behavior change. * inspector/InspectorPageAgent.cpp: (WebCore::InspectorPageAgent::getCookies): * inspector/InspectorPageAgent.h: * inspector/protocol/Page.json: 2013-12-05 Brian J. Burg Web Inspector: expose node and frame snapshot capabilities. https://bugs.webkit.org/show_bug.cgi?id=124326 Reviewed by Joseph Pecoraro. This adds snapshotRect() and snapshotNode() to the Page domain. Both methods create snapshots using FrameSnapshotting APIs and send images to the inspector frontend as a data URL. Remove the unimplemented Page.captureScreenshot API. * inspector/InspectorPageAgent.cpp: (WebCore::InspectorPageAgent::snapshotNode): Added. (WebCore::InspectorPageAgent::snapshotRect): Added. * inspector/InspectorPageAgent.h: * inspector/protocol/Page.json: Added new protocol APIs. 2013-12-04 Bear Travis [CSS Shapes] Enable CSS Shapes on Windows https://bugs.webkit.org/show_bug.cgi?id=89957 Reviewed by Brent Fulgham. * css/CSSPropertyNames.in: Tweak to ensure shapes properties are regenerated. 2013-12-05 Roger Fong [WebGL] Make sure we satisfy uniform and varying packing restrictions. https://bugs.webkit.org/show_bug.cgi?id=125124. Reviewed by Brent Fulgham. Tests covered by WebGL Khronos conformance tests: webgl/1.0.2/conformance/glsl/misc/shader-uniform-packing-restrictions.html webgl/1.0.2/conformance/glsl/misc/shader-varying-packing-restrictions.html * platform/graphics/opengl/Extensions3DOpenGLCommon.cpp: (WebCore::Extensions3DOpenGLCommon::getTranslatedShaderSourceANGLE): 2013-12-05 Laszlo Vidacs 32bit buildfix after r160151 https://bugs.webkit.org/show_bug.cgi?id=125298 Reviewed by Csaba Osztrogonác. * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp: (StreamingClient::handleDataReceived): 2013-12-05 Myles C. Maxfield Cropping and drawing ImageBuffers results in uninitialized data being shown https://bugs.webkit.org/show_bug.cgi?id=125271 Reviewed by Simon Fraser. createCroppedImageIfNecessary() crops to the bottom left of the ImageBuffer backing store instead of the top left. In addition, ImageBuffer::draw() draws the entire ImageBuffer's backing store instead of just the relevant portion of it. No new tests are necessary because the existing tests already test this functionality * platform/graphics/cg/ImageBufferCG.cpp: (WebCore::createCroppedImageIfNecessary): Crop to the top left of the backing store (WebCore::ImageBuffer::draw): Draw only the logical portion of the backing store 2013-12-05 Joseph Pecoraro Remove stale ScriptGlobalObject methods https://bugs.webkit.org/show_bug.cgi?id=125276 Reviewed by Sam Weinig. * bindings/js/ScriptObject.cpp: (WebCore::ScriptGlobalObject::set): * bindings/js/ScriptObject.h: 2013-12-04 Ryosuke Niwa Change how the form element pointer affects parsing template elements, to reduce weirdness in templates https://bugs.webkit.org/show_bug.cgi?id=125279 Reviewed by Antti Koivisto. Faithfully update the HTML5 parser after http://html5.org/tools/web-apps-tracker?from=8330&to=8331. Test: fast/dom/HTMLTemplateElement/no-form-association-2.html * html/parser/HTMLConstructionSite.cpp: (WebCore::HTMLConstructionSite::insertHTMLFormElement): Don't the form element pointer if the context element or its ancestor is a template element. (WebCore::HTMLConstructionSite::insideTemplateElement): Added. (WebCore::HTMLConstructionSite::createHTMLElement): Renamed openElementsContainTemplateElement to insideTemplateElement to reflect the true semantics of the boolean. * html/parser/HTMLConstructionSite.h: * html/parser/HTMLTreeBuilder.cpp: (WebCore::HTMLTreeBuilder::processIsindexStartTagForInBody): Ignore the form element pointer if there is a template element on the stack of open elements. This faithfully reflects what's being said in the specification. We should probably make isParsingTemplateContents more efficient by storing a boolean and then wrap from() in some helper function but that should probbaly happen in a separate patch. (WebCore::HTMLTreeBuilder::processStartTagForInBody): Ditto. (WebCore::HTMLTreeBuilder::processStartTagForInTable): Ditto. (WebCore::HTMLTreeBuilder::processEndTagForInBody): Don't unset or rely on the form element pointer when there is a template element on the stack of open elements. * html/parser/HTMLTreeBuilder.h: (WebCore::HTMLTreeBuilder::isParsingTemplateContents): Added a trivial implementation for when TEMPLATE_ELEMENT is disabled. (WebCore::HTMLTreeBuilder::isParsingFragmentOrTemplateContents): Merged two implementations. 2013-12-05 Thiago de Barros Lacerda [MediaStream] Firing negotiationneeded event upon track add/remove on MediaStream https://bugs.webkit.org/show_bug.cgi?id=125243 Reviewed by Eric Carlson. Spec states that: In particular, if an RTCPeerConnection object is consuming a MediaStream on which a track is added, by, e.g., the addTrack() method being invoked, the RTCPeerConnection object must fire the "negotiationneeded" event. Removal of media components must also trigger "negotiationneeded". Existing tests updated. * Modules/mediastream/MediaStream.cpp: (WebCore::MediaStream::addTrack): (WebCore::MediaStream::removeTrack): (WebCore::MediaStream::addObserver): (WebCore::MediaStream::removeObserver): * Modules/mediastream/MediaStream.h: * Modules/mediastream/RTCPeerConnection.cpp: (WebCore::RTCPeerConnection::~RTCPeerConnection): (WebCore::RTCPeerConnection::addStream): (WebCore::RTCPeerConnection::removeStream): (WebCore::RTCPeerConnection::didAddOrRemoveTrack): * Modules/mediastream/RTCPeerConnection.h: * platform/mock/RTCPeerConnectionHandlerMock.cpp: (WebCore::RTCPeerConnectionHandlerMock::addStream): 2013-12-05 Beth Dakin Bad repaints on twitter when the tile cache has a margin https://bugs.webkit.org/show_bug.cgi?id=125263 -and corresponding- Reviewed by Tim Horton. When tiles that used to be margin tiles become real-content tiles, they need to be invalidated. Two new helper functions will make it so that we don’t have to manually factor out the margin from the bounds in more than one place in the code. * platform/graphics/ca/mac/TileController.h: * platform/graphics/ca/mac/TileController.mm: (WebCore::TileController::boundsWithoutMargin): (WebCore::TileController::boundsAtLastRevalidateWithoutMargin): Here is one existing place where we used to factor out the margin, but now we can call boundsWithoutMargin(). (WebCore::TileController::adjustRectAtTileIndexForMargin): And here is where we invalidate the formerly-margin tiles. (WebCore::TileController::revalidateTiles): 2013-12-05 Zoltan Horvath Remove the forward declaration of BidiContext class from RenderBlock.h https://bugs.webkit.org/show_bug.cgi?id=125265 Reviewed by Csaba Osztrogonác. No new tests, no behavior change. * rendering/RenderBlock.h: BidiContext is not used in RenderBlock.h 2013-12-05 Aloisio Almeida Jr [Cairo] Avoid extra copy when drawing images https://bugs.webkit.org/show_bug.cgi?id=124209 Reviewed by Carlos Garcia Campos. This commit applies some changes proposed after the original patch has been landed. It fixes the logic to create the subsurface (as it was inverted). It also remove an unnecessary RefPtr variable to hold the subsurface. No new tests. It's an enhancement. Already covered by existing tests. * platform/graphics/cairo/PlatformContextCairo.cpp: (WebCore::PlatformContextCairo::drawSurfaceToContext): 2013-12-05 Zoltan Horvath [CSS Shapes] Fix inset when only a subset of the arguments are defined https://bugs.webkit.org/show_bug.cgi?id=125277 Reviewed by David Hyatt. I thought Length's default value is fixed-0, but actually it's auto-0. For the optional arguments of inset shape, we need to use fixed-0, so I updated the code and the tests to use that explicitly. No new tests, I updated the old ones. * css/BasicShapeFunctions.cpp: (WebCore::basicShapeForValue): 2013-12-05 Carlos Garcia Campos [GTK] Do not use deprecated gtk-doc 'Rename to' tag https://bugs.webkit.org/show_bug.cgi?id=125303 Reviewed by Philippe Normand. GObject introspection rename-to annotation is available in since version 0.6.3 so we should use that instead. * bindings/gobject/WebKitDOMEventTarget.h: 2013-12-05 Carlos Garcia Campos [GTK] Add missing symbols to WebKitDOMDeprecated.symbols https://bugs.webkit.org/show_bug.cgi?id=125300 Reviewed by Philippe Normand. Add webkit_dom_html_element_get_id and webkit_dom_html_element_set_id to the symbols files. * bindings/gobject/WebKitDOMDeprecated.symbols: * bindings/gobject/webkitdom.symbols: 2013-12-05 Carlos Garcia Campos Unreviewed. Update GObject DOM bindings symbols file after r159711. * bindings/gobject/webkitdom.symbols: 2013-12-05 Zan Dobersek [GTK] Move platform sources free of layering violations under libPlatform https://bugs.webkit.org/show_bug.cgi?id=117509 Reviewed by Carlos Garcia Campos. * GNUmakefile.list.am: Move additional source files located in the platform layer under libPlatform. All moved sources are free of layering violations and thus ready for the migration. 2013-12-05 László Langó Remove bridge/testqtbindings.cpp. https://bugs.webkit.org/show_bug.cgi?id=125287 Reviewed by Alexey Proskuryakov. * bridge/testqtbindings.cpp: Removed. There is no QT anymore. We don't need this file. 2013-12-04 Gurpreet Kaur % unit heights don't work if parent block height is set in vh https://bugs.webkit.org/show_bug.cgi?id=118516 Reviewed by Simon Fraser. From Blink r156449 by An element having height as percentage needs to have the containingblock's height or availableheight to calculate its own height. The containing block having a height set in vh unit was not being considered for calculating the child's height. Tests: fast/css/viewport-percentage-compute-box-height.html fast/css/viewport-percentage-compute-box-width.html * rendering/RenderBox.cpp: (WebCore::RenderBox::computePercentageLogicalHeight): Correct child's height(in pecentage) was not being calculated incase of parent having height set in vh unit. Added condition to calculate the containing block height in terms of viewport size. 2013-12-04 Roger Fong [Windows] Unreviewed build fix. Copy headers from rendering/line to build directory. * WebCore.vcxproj/copyForwardingHeaders.cmd: 2013-12-04 Ryosuke Niwa bgColor, setBgColor, alinkColor, setAlinkColor, and etc... on HTMLBodyElement are useless https://bugs.webkit.org/show_bug.cgi?id=125208 Rubber-stamped by Anders Carlsson. Address Darin's comment to use fastGetAttribute instead of getAttribute. * html/HTMLDocument.cpp: (WebCore::HTMLDocument::bgColor): (WebCore::HTMLDocument::fgColor): (WebCore::HTMLDocument::alinkColor): (WebCore::HTMLDocument::linkColor): (WebCore::HTMLDocument::vlinkColor): 2013-12-04 Brian J. Burg Consolidate various frame snapshot capabilities. https://bugs.webkit.org/show_bug.cgi?id=124325 Reviewed by Darin Adler. Various snapshot creation methods had duplicated code and were split between Frame, DragImage, and platform-specific implementationss. This patch puts WebCore snapshot methods into FrameSnapshotting and removes platform implementations where possible. DragImage methods reuse snapshot methods where possible. Inspector will be able to take snapshots without using drag images. No new tests, this is a refactoring. * CMakeLists.txt: * GNUmakefile.list.am: * WebCore.exp.in: * WebCore.vcxproj/WebCore.vcxproj: * WebCore.vcxproj/WebCore.vcxproj.filters: * WebCore.xcodeproj/project.pbxproj: * bindings/objc/DOM.mm: (-[DOMNode renderedImage]): (-[DOMRange renderedImageForcingBlackText:]): * dom/Clipboard.cpp: (WebCore::Clipboard::createDragImage): * dom/ClipboardMac.mm: (WebCore::Clipboard::createDragImage): * page/DragController.cpp: (WebCore::DragController::startDrag): * page/Frame.cpp: * page/Frame.h: * page/FrameSnapshotting.cpp: Added. (WebCore::ScopedFramePaintingState::ScopedFramePaintingState): (WebCore::ScopedFramePaintingState::~ScopedFramePaintingState): (WebCore::snapshotFrameRect): Move most buffer logic to here. (WebCore::snapshotSelection): Moved from Frame. (WebCore::snapshotNode): Moved from Frame. * page/FrameSnapshotting.h: Added. * page/mac/FrameMac.mm: Removed. * page/mac/FrameSnapshottingMac.h: Removed. * page/mac/FrameSnapshottingMac.mm: Removed. * page/win/FrameWin.cpp: remove duplicate implementation. * page/win/FrameWin.h: Fix an incorrect parameter name. * platform/DragImage.cpp: (WebCore::ScopedNodeDragState::ScopedNodeDragState): (WebCore::ScopedNodeDragState::~ScopedNodeDragState): (WebCore::createDragImageFromSnapshot): Boilerplate buffer conversion. (WebCore::createDragImageForNode): (WebCore::createDragImageForSelection): (WebCore::ScopedFrameSelectionState::ScopedFrameSelectionState): (WebCore::ScopedFrameSelectionState::~ScopedFrameSelectionState): (WebCore::createDragImageForRange): Moved from Frame. (WebCore::createDragImageForImage): Moved from FrameSnapshottingMac. (WebCore::createDragImageForLink): use nullptr. 2013-12-04 Benjamin Poulain Remove spaces on a blank line to have ResourceHandleCFNet.cpp identical to iOS Unreviewed. * platform/network/cf/ResourceHandleCFNet.cpp: (WebCore::ResourceHandle::platformLoadResourceSynchronously): 2013-12-04 Antti Koivisto Move pseudo element construction out from Element https://bugs.webkit.org/show_bug.cgi?id=125257 Reviewed by Anders Carlsson. This is logically part of the style resolve/render tree construction. This will make future refactoring easier. * dom/Element.cpp: * dom/Element.h: * style/StyleResolveTree.cpp: (WebCore::Style::beforeOrAfterPseudoElement): (WebCore::Style::setBeforeOrAfterPseudoElement): (WebCore::Style::clearBeforeOrAfterPseudoElement): (WebCore::Style::needsPseudeElement): (WebCore::Style::attachBeforeOrAfterPseudoElementIfNeeded): (WebCore::Style::attachRenderTree): (WebCore::Style::updateBeforeOrAfterPseudoElement): (WebCore::Style::resolveTree): 2013-12-04 Zoltan Horvath Move TrailingObjects class into its own h/cpp https://bugs.webkit.org/show_bug.cgi?id=124956 Reviewed by David Hyatt. Since I moved space-ignoring inline functions into MidpointState in r160074, I can nicely separate TrailingObjects class from BreakingContextInlineHeader.h. This change improves the readability, and it's part of the RenderBlockLineLayout refactoring campaign, which is tracked under bug #121261. No new tests, no behavior change. * CMakeLists.txt: * GNUmakefile.list.am: * WebCore.vcxproj/WebCore.vcxproj: * WebCore.xcodeproj/project.pbxproj: * rendering/RenderBlock.h: * rendering/RenderBlockFlow.h: * rendering/line/BreakingContextInlineHeaders.h: * rendering/line/TrailingObjects.cpp: Added. (WebCore::TrailingObjects::updateMidpointsForTrailingBoxes): * rendering/line/TrailingObjects.h: Added. (WebCore::TrailingObjects::TrailingObjects): (WebCore::TrailingObjects::setTrailingWhitespace): (WebCore::TrailingObjects::clear): (WebCore::TrailingObjects::appendBoxIfNeeded): 2013-12-04 Oliver Hunt Refactor static getter function prototype to include thisValue in addition to the base object https://bugs.webkit.org/show_bug.cgi?id=124461 Reviewed by Geoffrey Garen. Change bindings codegen to produce static getter functions with the correct types. Also update the many custom implementations to the new type. No change in behaviour. * bindings/js/JSCSSStyleDeclarationCustom.cpp: (WebCore::cssPropertyGetterPixelOrPosPrefixCallback): (WebCore::cssPropertyGetterCallback): * bindings/js/JSDOMBinding.cpp: (WebCore::objectToStringFunctionGetter): * bindings/js/JSDOMBinding.h: * bindings/js/JSDOMMimeTypeArrayCustom.cpp: (WebCore::JSDOMMimeTypeArray::nameGetter): * bindings/js/JSDOMPluginArrayCustom.cpp: (WebCore::JSDOMPluginArray::nameGetter): * bindings/js/JSDOMPluginCustom.cpp: (WebCore::JSDOMPlugin::nameGetter): * bindings/js/JSDOMStringMapCustom.cpp: (WebCore::JSDOMStringMap::nameGetter): * bindings/js/JSDOMWindowCustom.cpp: (WebCore::nonCachingStaticFunctionGetter): (WebCore::childFrameGetter): (WebCore::indexGetter): (WebCore::namedItemGetter): * bindings/js/JSHTMLAllCollectionCustom.cpp: (WebCore::JSHTMLAllCollection::nameGetter): * bindings/js/JSHTMLCollectionCustom.cpp: (WebCore::JSHTMLCollection::nameGetter): * bindings/js/JSHTMLDocumentCustom.cpp: (WebCore::JSHTMLDocument::nameGetter): * bindings/js/JSHTMLFormControlsCollectionCustom.cpp: (WebCore::JSHTMLFormControlsCollection::nameGetter): * bindings/js/JSHTMLFormElementCustom.cpp: (WebCore::JSHTMLFormElement::nameGetter): * bindings/js/JSHTMLFrameSetElementCustom.cpp: (WebCore::JSHTMLFrameSetElement::nameGetter): * bindings/js/JSHistoryCustom.cpp: (WebCore::nonCachingStaticBackFunctionGetter): (WebCore::nonCachingStaticForwardFunctionGetter): (WebCore::nonCachingStaticGoFunctionGetter): * bindings/js/JSJavaScriptCallFrameCustom.cpp: (WebCore::JSJavaScriptCallFrame::scopeType): * bindings/js/JSLocationCustom.cpp: (WebCore::nonCachingStaticReplaceFunctionGetter): (WebCore::nonCachingStaticReloadFunctionGetter): (WebCore::nonCachingStaticAssignFunctionGetter): * bindings/js/JSNamedNodeMapCustom.cpp: (WebCore::JSNamedNodeMap::nameGetter): * bindings/js/JSNodeListCustom.cpp: (WebCore::JSNodeList::nameGetter): * bindings/js/JSPluginElementFunctions.cpp: (WebCore::pluginElementPropertyGetter): * bindings/js/JSPluginElementFunctions.h: * bindings/js/JSRTCStatsResponseCustom.cpp: (WebCore::JSRTCStatsResponse::nameGetter): * bindings/js/JSStorageCustom.cpp: (WebCore::JSStorage::nameGetter): * bindings/js/JSStyleSheetListCustom.cpp: (WebCore::JSStyleSheetList::nameGetter): * bindings/scripts/CodeGeneratorJS.pm: (GenerateHeader): (GenerateImplementation): (GenerateParametersCheck): * bridge/runtime_array.cpp: (JSC::RuntimeArray::lengthGetter): (JSC::RuntimeArray::indexGetter): * bridge/runtime_array.h: * bridge/runtime_method.cpp: (JSC::RuntimeMethod::lengthGetter): * bridge/runtime_method.h: * bridge/runtime_object.cpp: (JSC::Bindings::RuntimeObject::fallbackObjectGetter): (JSC::Bindings::RuntimeObject::fieldGetter): (JSC::Bindings::RuntimeObject::methodGetter): * bridge/runtime_object.h: 2013-12-04 Zoltan Horvath [CSS Shapes] Support inset for shape-outside Reviewed by David Hyatt. This patch adds inset support for shape-outside. Parsing has previously landed in r159968. Specification: http://dev.w3.org/csswg/css-shapes/#supported-basic-shapes Tests: fast/shapes/shape-outside-floats/shape-outside-floats-inset-rounded-bottom-left.html fast/shapes/shape-outside-floats/shape-outside-floats-inset-rounded-bottom-right.html fast/shapes/shape-outside-floats/shape-outside-floats-inset-rounded-top-left.html fast/shapes/shape-outside-floats/shape-outside-floats-inset-rounded-top-right.html fast/shapes/shape-outside-floats/shape-outside-floats-inset.html * platform/LengthSize.h: (WebCore::LengthSize::floatSize): Add conversion to FloatSize. * rendering/shapes/Shape.cpp: (WebCore::Shape::createShape): Handle inset case. 2013-12-04 Bear Travis Web Inspector: [CSS Shapes] Support raster shape visualizations https://bugs.webkit.org/show_bug.cgi?id=124080 Reviewed by Joseph Pecoraro. Create an inspector visualization for a shape created from an image. The visualization takes each line of the image, combining where possible. Test added to inspector-protocol/model/highlight-shape-outside.html * rendering/shapes/RasterShape.cpp: (WebCore::RasterShapeIntervals::buildBoundsPath): Create a path representing the RasterShapeIntervals. * rendering/shapes/RasterShape.h: 2013-12-04 Zoltan Horvath [CSS Shapes] Remove explicit numbering from BasicShape::Type and CSSBasicShape::Type enums https://bugs.webkit.org/show_bug.cgi?id=125163 Reviewed by Rob Buis. I don't see any reason to have explicit numbering for the Type enum in our [CSS]BasicShape classes. I removed numbering, which will decrease for instance the merge conflicts on Type changes. No new tests, no behavior change. * css/CSSBasicShapes.h: * rendering/style/BasicShapes.h: 2013-12-04 Myles C. Maxfield Allow ImageBuffer to use an IOSurface that is larger than necessary https://bugs.webkit.org/show_bug.cgi?id=124626 Reviewed by Simon Fraser. Because creating ImageBuffer's backing store can be so expensive, it would be beneficial to have a pool of pre-created backing stores available. However, this means that ImageBuffer might have to use a backing store that is larger than the exact dimensions that it needs. This patch adds a field, m_backingStoreSize, to CG's ImageBufferData class, and uses this new field when performing ImageBuffer operations to allow for larger-than-necessary backing stores. Content is always drawn in the top left corner of the backing store. No new tests are necessary because there is no behavior change. * platform/graphics/ImageBuffer.h: (WebCore::ImageBuffer::baseTransform): The base transform has to put content at the top left corner instead of bottom left * platform/graphics/cg/ImageBufferCG.cpp: (WebCore::createCroppedImageIfNecessary): Convenience function to figure out the dimensions of the backing texture in user space (WebCore::ImageBuffer::ImageBuffer): Set up new m_backingStoreSize member (WebCore::maybeCropToBounds): Some ImageBuffer API functions require outputting an image with logical size. This function performs the cropping (WebCore::ImageBuffer::copyImage): Updated for larger-than-necessary backing stores (WebCore::ImageBuffer::copyNativeImage): Ditto (WebCore::ImageBuffer::draw): Ditto (WebCore::ImageBuffer::clip): Ditto (WebCore::ImageBuffer::putByteArray): Ditto (WebCore::ImageBuffer::toDataURL): Ditto * platform/graphics/cg/ImageBufferDataCG.cpp: (WebCore::ImageBufferData::getData): Ditto (WebCore::ImageBufferData::putData): Ditto * platform/graphics/cg/ImageBufferDataCG.h: New m_backingStoreSize field 2013-12-03 Dean Jackson [WebGL] Support for texImage2D of type HALF_FLOAT_OES https://bugs.webkit.org/show_bug.cgi?id=110936 Reviewed by Brent Fulgham. Add support for the HALF_FLOAT_OES texture format from texImage2D and texSubImage2D. A lot of this patch comes from the original patch on the bug by Nayan Kumar, and the Blink commit: https://codereview.chromium.org/13842017 Tests: fast/canvas/webgl/oes-texture-half-float-with-canvas.html fast/canvas/webgl/oes-texture-half-float-with-image.html fast/canvas/webgl/oes-texture-half-float-with-video.html * html/canvas/OESTextureHalfFloat.idl: New HALF_FLOAT_OES constant value. * html/canvas/WebGLRenderingContext.cpp: (WebCore::WebGLRenderingContext::validateTexFunc): Remove the code that would bail if half-float values were used. * platform/graphics/GraphicsContext3D.cpp: - Return appropriate DataFormats for half floating point types. - Copy the float -> half-float code from Blink - New pack functions for half floats * platform/graphics/GraphicsContext3D.h: New format types. * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp: (WebCore::GraphicsContext3D::texSubImage2D): Use GL_HALF_FLOAT_ARB if we're passed a HALF_FLOAT_OES. 2013-12-04 Daniel Bates Fix the Apple Windows build after (https://bugs.webkit.org/show_bug.cgi?id=125193) * rendering/RenderThemeWin.cpp: (WebCore::RenderThemeWin::paintMenuList): Substitute paintInfo for i. 2013-12-04 Daniel Bates Rename RenderTheme::paintMenuListButton() https://bugs.webkit.org/show_bug.cgi?id=125193 Reviewed by Simon Fraser. Towards upstreaming the iOS concept of render theme decorations we should rename RenderTheme::paintMenuListButton() to RenderTheme::paintMenuListButtonDecorations() to better describe its purpose. Also, fix code style issues. * platform/blackberry/RenderThemeBlackBerry.cpp: (WebCore::RenderThemeBlackBerry::paintMenuListButtonDecorations): * platform/blackberry/RenderThemeBlackBerry.h: * platform/efl/RenderThemeEfl.cpp: (WebCore::RenderThemeEfl::paintMenuListButtonDecorations): * platform/efl/RenderThemeEfl.h: * platform/gtk/RenderThemeGtk.cpp: (WebCore::RenderThemeGtk::paintMenuListButtonDecorations): * platform/gtk/RenderThemeGtk.h: * platform/nix/RenderThemeNix.h: * rendering/RenderTheme.cpp: (WebCore::RenderTheme::paintDecorations): Rename argument o, r to renderer and rect, respectively. * rendering/RenderTheme.h: (WebCore::RenderTheme::paintMenuListButtonDecorations): * rendering/RenderThemeMac.h: * rendering/RenderThemeMac.mm: (WebCore::RenderThemeMac::paintMenuListButtonDecorations): Rename argument o, r to renderer and rect, respectively; also remove extraneous white space and substitute 1 for 1.0f. * rendering/RenderThemeSafari.cpp: (WebCore::RenderThemeSafari::paintMenuListButtonDecorations): Ditto. * rendering/RenderThemeSafari.h: * rendering/RenderThemeWin.cpp: (WebCore::RenderThemeWin::paintMenuList): Rename argument o, i, r to renderer, paintInfo, and rect, respectively. (WebCore::RenderThemeWin::paintMenuListButtonDecorations): Ditto. * rendering/RenderThemeWin.h: * rendering/RenderThemeWinCE.cpp: (WebCore::RenderThemeWinCE::paintMenuList): Ditto. (WebCore::RenderThemeWinCE::paintMenuListButtonDecorations): Ditto. * rendering/RenderThemeWinCE.h: 2013-12-04 Andy Estes [iOS] Build projects with $(ARCHS_STANDARD_32_64_BIT) https://bugs.webkit.org/show_bug.cgi?id=125236 Reviewed by Sam Weinig. $(ARCHS_STANDARD_32_64_BIT) is what we want for both device and simulator builds. * Configurations/DebugRelease.xcconfig: 2013-12-04 Joseph Pecoraro Unreviewed Windows build fix attempt after r160099. * WebCore.vcxproj/WebCore.vcxproj.filters: * WebCore.vcxproj/copyForwardingHeaders.cmd: 2013-12-03 Joseph Pecoraro Web Inspector: Push Remote Inspector debugging connection management into JavaScriptCore https://bugs.webkit.org/show_bug.cgi?id=124613 Reviewed by Timothy Hatcher. Make a WebCore::Page a "Web" Remote Debuggable. * bindings/js/JSDOMGlobalObject.cpp: Disable JavaScript context inspection on JSGlobalObjects inside WebCore::Page's. * page/Page.cpp: (WebCore::Page::Page): (WebCore::Page::remoteInspectionAllowed): (WebCore::Page::setRemoteInspectionAllowed): (WebCore::Page::remoteInspectorInformationDidChange): * page/Page.h: * page/PageDebuggable.h: * page/PageDebuggable.cpp: Added. (WebCore::PageDebuggable::PageDebuggable): (WebCore::PageDebuggable::name): (WebCore::PageDebuggable::url): (WebCore::PageDebuggable::hasLocalDebugger): (WebCore::PageDebuggable::connect): (WebCore::PageDebuggable::disconnect): (WebCore::PageDebuggable::dispatchMessageFromRemoteFrontend): (WebCore::PageDebuggable::setIndicating): Make a page a "Web" debuggable. * GNUmakefile.list.am: * WebCore.exp.in: * WebCore.vcxproj/WebCore.vcxproj: * WebCore.vcxproj/WebCore.vcxproj.filters: * WebCore.xcodeproj/project.pbxproj: Misc. * inspector/InspectorClient.h: (WebCore::InspectorClient::indicate): (WebCore::InspectorClient::hideIndicate): Forward indicate methods to WebKit clients. * loader/FrameLoader.cpp: (WebCore::FrameLoader::didChangeTitle): (WebCore::FrameLoader::dispatchDidCommitLoad): Push updates when remote debuggable information like the Page's URL or title change. * ForwardingHeaders/inspector/InspectorFrontendChannel.h: * inspector/InspectorForwarding.h: Re-export Inspector::InspectorFrontendChannel as WebCore::InspectorFrontendChannel to avoid needlessly updating code all over the place. * inspector/CodeGeneratorInspectorStrings.py: * inspector/InspectorWorkerAgent.cpp: * inspector/WorkerInspectorController.cpp: * testing/Internals.cpp: Update include names. * page/ContextMenuController.cpp: (WebCore::ContextMenuController::populate): Make the "Inspect Element" context menu work correctly when there is a remote inspector instead of a local inspector. 2013-12-03 Joseph Pecoraro Web Inspector: Add missing folders and files to Xcode project https://bugs.webkit.org/show_bug.cgi?id=124802 Reviewed by Timothy Hatcher. * WebCore.xcodeproj/project.pbxproj: 2013-12-04 José Dapena Paz [texmap] Borders on rotating images are hidden/wrongly rendered with edge distance antialiasing https://bugs.webkit.org/show_bug.cgi?id=124653 Reviewed by Noam Rosenthal. Texture mapper edge distance antialiasing texture sampling was causing borders to be shaded (and made them almost disappear in some cases). This was because calculation of sampling happened on vertex shader, so the border of the texture would go to the border of the inflation area. What algorithm should do is sampling the border pixel for all the inflation area (it is the closest pixel to all the samples in inflation area), and then use the standard sampling for the other parts of the texture. No new test because this is already covered by test transforms/3d/point-mapping/3d-point-mapping.html * platform/graphics/texmap/TextureMapperShaderProgram.cpp: fix edge distance antialiasing texture sampling. 2013-12-04 László Langó Typo fix after r160074 to fix debug builds. Reviewed by Csaba Osztrogonác. * platform/text/BidiResolver.h: (WebCore::MidpointState::stopIgnoringSpaces): 2013-12-04 Zoltan Horvath Move space-ignoring inline functions into MidpointState Reviewed by David Hyatt. Since: - The following inline functions were used only with a mandatory LineMidpointState argument: startIgnoringSpaces, stopIgnoringSpaces, ensureLineBoxInsideIgnoredSpaces, deprecatedAddMidpoint. - TrailingObjects class uses these functions. Since they're inline in BreakingContextInlineHeaders.h, it's hard to separate TrailingObjects into it's own file. (blocks bug #124956) I made these functions as a member of LineMidpointState, and I also updated the call sites. No new tests, no behavior change. * platform/text/BidiResolver.h: (WebCore::MidpointState::startIgnoringSpaces): (WebCore::MidpointState::stopIgnoringSpaces): (WebCore::MidpointState::ensureLineBoxInsideIgnoredSpaces): (WebCore::MidpointState::deprecatedAddMidpoint): * rendering/RenderBlock.h: * rendering/line/BreakingContextInlineHeaders.h: (WebCore::TrailingObjects::updateMidpointsForTrailingBoxes): (WebCore::BreakingContext::handleBR): (WebCore::BreakingContext::handleOutOfFlowPositioned): (WebCore::shouldSkipWhitespaceAfterStartObject): (WebCore::BreakingContext::handleEmptyInline): (WebCore::BreakingContext::handleReplaced): (WebCore::ensureCharacterGetsLineBox): (WebCore::BreakingContext::handleText): 2013-12-03 Zoltan Horvath Remove BreakingContext's friendship from RenderBlockFlow Reviewed by David Hyatt. BreakingContext uses only 2 functions from RenderBlockFlow: insertFloatingObject/positionNewFloatOnLine. I added helper functions to LineBreaker, what is already a friend of RenderBlockFlow, so BreakingContext doesn't need to be anymore. No new tests, no behavior change. * rendering/RenderBlockFlow.h: * rendering/line/BreakingContextInlineHeaders.h: (WebCore::BreakingContext::handleFloat): * rendering/line/LineBreaker.h: (WebCore::LineBreaker::insertFloatingObject): (WebCore::LineBreaker::positionNewFloatOnLine): 2013-12-03 Ryosuke Niwa bgColor, setBgColor, alinkColor, setAlinkColor, and etc... on HTMLBodyElement are useless https://bugs.webkit.org/show_bug.cgi?id=125208 Reviewed by Antti Koivisto. Merge https://chromium.googlesource.com/chromium/blink/+/49b1eeabbbf573d5271288c66d2b566cf33a09cf These member functions of HTMLBodyElement were only used by corresponding functions in HTMLDocument since they had the Reflect option specified in HTMLBodyElement.idl. Removed the functions and directly called getAttribute and setAttribute in relevant functions in HTMLDocument. The optimization to avoid assignment is no longer needed here since we've added that optimization to setAttributeInternal a while ago. * html/HTMLBodyElement.cpp: * html/HTMLBodyElement.h: * html/HTMLDocument.cpp: (WebCore::HTMLDocument::bgColor): (WebCore::HTMLDocument::setBgColor): (WebCore::HTMLDocument::fgColor): (WebCore::HTMLDocument::setFgColor): (WebCore::HTMLDocument::alinkColor): (WebCore::HTMLDocument::setAlinkColor): (WebCore::HTMLDocument::linkColor): (WebCore::HTMLDocument::setLinkColor): (WebCore::HTMLDocument::vlinkColor): (WebCore::HTMLDocument::setVlinkColor): * html/HTMLDocument.h: 2013-12-03 Andreas Kling Add a CSSProperty::isDirectionAwareProperty() helper. Move the block of case labels for checking whether a CSS property ID is a directional property into a separate function. Also removed an outdated comment about CSS variables. Reviewed by Antti Koivisto. 2013-12-03 Ryosuke Niwa Revert the inadvertently committed change. * html/HTMLElement.idl: 2013-12-03 Ryosuke Niwa Remove nodeIsDetachedFromDocument and visualWordMovementEnabled in FrameSelection https://bugs.webkit.org/show_bug.cgi?id=125210 Reviewed by Antti Koivisto. Inspired by https://chromium.googlesource.com/chromium/blink/+/92409870f0ff8fafe31217830db0838a9e1ffb98 Removed some unused code. * editing/FrameSelection.cpp: (WebCore::FrameSelection::textWasReplaced): * editing/FrameSelection.h: * page/Settings.in: 2013-12-03 Ryosuke Niwa Potential crash in RenderView::selectionBounds and RenderView::repaintSelection https://bugs.webkit.org/show_bug.cgi?id=125207 Reviewed by Simon Fraser. Merge https://chromium.googlesource.com/chromium/blink/+/f9e6e288a5aa959f05c374806121aaf0fc52d440 Update style in FrameSelection instead of RenderView's member functions. These are the last two member functions of RenderView that updates the style. * editing/FrameSelection.cpp: (WebCore::FrameSelection::focusedOrActiveStateChanged): (WebCore::FrameSelection::bounds): * rendering/RenderView.cpp: (WebCore::RenderView::selectionBounds): (WebCore::RenderView::repaintSelection): 2013-12-03 Mark Rowe Improve the formatting in the generated Objective-C headers. Add a space between @property and any parenthesized attributes. Prefer strong over retain when specifying memory management semantics. Reviewed by Darin Adler. * bindings/objc/PublicDOMInterfaces.h: * bindings/scripts/CodeGeneratorObjC.pm: (GetPropertyAttributes): Generate strong instead of retain. Include a space before the parenthesis. * bindings/scripts/test/ObjC/DOMTestActiveDOMObject.h: * bindings/scripts/test/ObjC/DOMTestEventConstructor.h: * bindings/scripts/test/ObjC/DOMTestException.h: * bindings/scripts/test/ObjC/DOMTestInterface.h: * bindings/scripts/test/ObjC/DOMTestObj.h: * bindings/scripts/test/ObjC/DOMTestSerializedScriptValueInterface.h: * bindings/scripts/test/ObjC/DOMTestTypedefs.h: * bindings/scripts/test/ObjC/DOMattribute.h: 2013-12-03 Alexey Proskuryakov Update WebCrypto JWK mapping to newer proposal https://bugs.webkit.org/show_bug.cgi?id=124218 Reviewed by Anders Carlsson. Tests: crypto/subtle/jwk-export-use-values.html crypto/subtle/jwk-import-use-values.html 1. "extractable" renamed to "ext" in JWK. 2. New values for "use" mapping, which can now be combined into comma separated lists, and cover all possible WebCrypto usages. * bindings/js/JSCryptoKeySerializationJWK.cpp: (WebCore::JSCryptoKeySerializationJWK::reconcileUsages): (WebCore::JSCryptoKeySerializationJWK::reconcileExtractable): (WebCore::JSCryptoKeySerializationJWK::addJWKAlgorithmToJSON): (WebCore::processUseValue): (WebCore::JSCryptoKeySerializationJWK::addJWKUseToJSON): (WebCore::JSCryptoKeySerializationJWK::serialize): 2013-12-03 Simon Fraser Remove some iOS-related documentScale code https://bugs.webkit.org/show_bug.cgi?id=125194 Reviewed by Enrica Casucci. Remove exports of nonexistent documentScale-related functions on Frame. * WebCore.exp.in: 2013-12-03 Eric Carlson Fix regression caused by r158599 https://bugs.webkit.org/show_bug.cgi?id=125188 Reviewed by Jer Noble. * html/HTMLMediaElement.cpp: (HTMLMediaElement::clearMediaPlayer): Do not clear m_player when PLUGIN_PROXY_FOR_VIDEO is enabled. 2013-12-03 Thiago de Barros Lacerda Nix Upstream: Updating WebCore files https://bugs.webkit.org/show_bug.cgi?id=124981 Reviewed by Benjamin Poulain. Just to sync our github repo files and the trunk, as part of the upstream process No new tests needed. * PlatformNix.cmake: * css/mediaControlsNix.css: (audio): (video::-webkit-media-controls): (audio::-webkit-media-controls-enclosure, video::-webkit-media-controls-enclosure): (video::-webkit-media-controls-enclosure): (audio::-webkit-media-controls-panel, video::-webkit-media-controls-panel): (video:-webkit-full-page-media): (audio:-webkit-full-page-media, video:-webkit-full-page-media): (audio::-webkit-media-controls-mute-button, video::-webkit-media-controls-mute-button): (audio::-webkit-media-controls-overlay-play-button, video::-webkit-media-controls-overlay-play-button): (audio::-webkit-media-controls-play-button, video::-webkit-media-controls-play-button): (audio::-webkit-media-controls-timeline-container, video::-webkit-media-controls-timeline-container): (audio::-webkit-media-controls-time-remaining-display, video::-webkit-media-controls-time-remaining-display): (audio::-webkit-media-controls-timeline, video::-webkit-media-controls-timeline): (audio::-webkit-media-controls-volume-slider, video::-webkit-media-controls-volume-slider): (input[type="range"]::-webkit-media-slider-container): (input[type="range"]::-webkit-media-slider-container > div): (input[type="range"]::-webkit-media-slider-thumb): (audio::-webkit-media-controls-seek-back-button, video::-webkit-media-controls-seek-back-button): (audio::-webkit-media-controls-seek-forward-button, video::-webkit-media-controls-seek-forward-button): (audio::-webkit-media-controls-fullscreen-button, video::-webkit-media-controls-fullscreen-button): (audio::-webkit-media-controls-toggle-closed-captions-button, video::-webkit-media-controls-toggle-closed-captions-button): (audio::-webkit-media-controls-fullscreen-volume-slider, video::-webkit-media-controls-fullscreen-volume-slider): (audio::-webkit-media-controls-fullscreen-volume-min-button, video::-webkit-media-controls-fullscreen-volume-min-button): (audio::-webkit-media-controls-fullscreen-volume-max-button, video::-webkit-media-controls-fullscreen-volume-max-button): (video::-webkit-media-text-track-container): (video::cue): (video::-webkit-media-text-track-region): (video::-webkit-media-text-track-region-container): (video::-webkit-media-text-track-region-container.scrolling): (video::-webkit-media-text-track-display): (video::cue(:future)): (video::-webkit-media-text-track-container b): (video::-webkit-media-text-track-container u): (video::-webkit-media-text-track-container i): * editing/Editor.cpp: (WebCore::Editor::cut): (WebCore::Editor::copy): (WebCore::Editor::copyImage): * editing/Editor.h: * html/HTMLCanvasElement.h: * platform/Cursor.h: * platform/audio/FFTFrame.h: * platform/audio/nix/AudioBusNix.cpp: (WebCore::AudioBus::loadPlatformResource): * platform/graphics/GLContext.h: * platform/nix/CursorNix.cpp: (WebCore::Cursor::ensurePlatformCursor): * platform/nix/GamepadsNix.cpp: (WebCore::sampleGamepads): * platform/nix/RenderThemeNix.cpp: (WebCore::toIntSize): (WebCore::toNixRect): (WebCore::RenderThemeNix::platformActiveSelectionBackgroundColor): (WebCore::RenderThemeNix::platformInactiveSelectionBackgroundColor): (WebCore::RenderThemeNix::platformActiveSelectionForegroundColor): (WebCore::RenderThemeNix::platformInactiveSelectionForegroundColor): (WebCore::RenderThemeNix::platformActiveListBoxSelectionBackgroundColor): (WebCore::RenderThemeNix::platformInactiveListBoxSelectionBackgroundColor): (WebCore::RenderThemeNix::platformActiveListBoxSelectionForegroundColor): (WebCore::RenderThemeNix::platformInactiveListBoxSelectionForegroundColor): (WebCore::RenderThemeNix::platformActiveTextSearchHighlightColor): (WebCore::RenderThemeNix::platformInactiveTextSearchHighlightColor): (WebCore::RenderThemeNix::platformFocusRingColor): (WebCore::RenderThemeNix::platformTapHighlightColor): (WebCore::RenderThemeNix::paintButton): (WebCore::RenderThemeNix::paintTextField): (WebCore::RenderThemeNix::paintCheckbox): (WebCore::RenderThemeNix::setCheckboxSize): (WebCore::RenderThemeNix::paintRadio): (WebCore::RenderThemeNix::setRadioSize): (WebCore::RenderThemeNix::paintMenuList): (WebCore::RenderThemeNix::paintProgressBar): (WebCore::RenderThemeNix::paintSliderTrack): (WebCore::RenderThemeNix::paintSliderThumb): (WebCore::RenderThemeNix::paintInnerSpinButton): (WebCore::RenderThemeNix::paintMeter): (WebCore::RenderThemeNix::extraMediaControlsStyleSheet): (WebCore::RenderThemeNix::paintMediaPlayButton): (WebCore::RenderThemeNix::paintMediaMuteButton): (WebCore::RenderThemeNix::paintMediaSeekBackButton): (WebCore::RenderThemeNix::paintMediaSeekForwardButton): (WebCore::RenderThemeNix::paintMediaSliderTrack): (WebCore::RenderThemeNix::paintMediaVolumeSliderContainer): (WebCore::RenderThemeNix::paintMediaVolumeSliderTrack): (WebCore::RenderThemeNix::paintMediaRewindButton): * platform/nix/RenderThemeNix.h: * rendering/SimpleLineLayout.cpp: (WebCore::SimpleLineLayout::canUseFor): 2013-12-03 Ralph Thomas Typo: FixedPositionConstaint -> FixedPositionConstraint https://bugs.webkit.org/show_bug.cgi?id=125171 Reviewed by Simon Fraser. No new tests, no change in behavior. * page/scrolling/ScrollingConstraints.h: * page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.cpp: (WebCore::ScrollingCoordinatorCoordinatedGraphics::updateViewportConstrainedNode): * page/scrolling/mac/ScrollingCoordinatorMac.mm: (WebCore::ScrollingCoordinatorMac::updateViewportConstrainedNode): 2013-12-03 Samuel White AXPress event coordinates are always sent as (0, 0) https://bugs.webkit.org/show_bug.cgi?id=76677 Reviewed by Simon Fraser. Set the coordinates of a simulated press equal to the center of the target element when the simulated press does not have a related mouse event. Test: accessibility/press-targets-center-point.html * dom/Element.cpp: (WebCore::Element::clientRect): (WebCore::Element::screenRect): * dom/Element.h: * dom/EventDispatcher.cpp: (WebCore::EventDispatcher::dispatchSimulatedClick): * dom/MouseEvent.cpp: (WebCore::SimulatedMouseEvent::create): (WebCore::SimulatedMouseEvent::SimulatedMouseEvent): * dom/MouseEvent.h: 2013-12-03 Dean Jackson [WebGL] Implement OES texture float linear https://bugs.webkit.org/show_bug.cgi?id=124871 Reviewed by Brent Fulgham. Implement the OES_texture_float_linear extension. Generally we'd also enable OES_texture_half_float_linear at the same time, but that's blocked on webkit.org/b/110936. Test: fast/canvas/webgl/oes-texture-float-linear.html * CMakeLists.txt: Add new files. * DerivedSources.cpp: Ditto. * DerivedSources.make: Generate new file from IDL. * GNUmakefile.list.am: Add new files. * WebCore.vcxproj/WebCore.vcxproj: Ditto. * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto. * WebCore.xcodeproj/project.pbxproj: New files for OESTextureFloatLinear. * bindings/js/JSWebGLRenderingContextCustom.cpp: (WebCore::toJS): Map the new name into the appropriate type. * html/canvas/OESTextureFloatLinear.cpp: Added. This is a very simple class that's mostly empty. (WebCore::OESTextureFloatLinear::OESTextureFloatLinear): (WebCore::OESTextureFloatLinear::~OESTextureFloatLinear): (WebCore::OESTextureFloatLinear::getName): (WebCore::OESTextureFloatLinear::create): * html/canvas/OESTextureFloatLinear.h: Added. * html/canvas/OESTextureFloatLinear.idl: Added. * html/canvas/WebGLExtension.h: Declare the new name in the enum of extensions. * html/canvas/WebGLRenderingContext.cpp: (WebCore::WebGLRenderingContext::drawArrays): Call new name. (WebCore::WebGLRenderingContext::drawElements): Call new name. (WebCore::WebGLRenderingContext::getExtension): Create the new extension if asked. (WebCore::WebGLRenderingContext::checkTextureCompleteness): Renamed from handleNPOTTextures. Now checks for the type of the texture too. * html/canvas/WebGLRenderingContext.h: Member variable for new extension. * html/canvas/WebGLTexture.cpp: (WebCore::WebGLTexture::WebGLTexture): (WebCore::WebGLTexture::needToUseBlackTexture): Takes an extra parameter which indicates if it has an extension enabled. (WebCore::WebGLTexture::update): Note it is a float type when updating. * html/canvas/WebGLTexture.h: New flag to indicate float type. * platform/graphics/Extensions3D.h: New flag type. * platform/graphics/opengl/Extensions3DOpenGL.cpp: (WebCore::Extensions3DOpenGL::supportsExtension): Add a comment about the extension. 2013-12-03 Alexey Proskuryakov Support exporting private WebCrypto RSA keys https://bugs.webkit.org/show_bug.cgi?id=124483 Reviewed by Anders Carlsson. Test: crypto/subtle/rsa-export-private-key.html It might be better to have our own bignum implementation in WTF, but we currently don't, and the need for this computation is Common Crypto specific anyway. * crypto/CommonCryptoUtilities.h: * crypto/CommonCryptoUtilities.cpp: (WebCore::CCBigNum::CCBigNum): (WebCore::CCBigNum::~CCBigNum): (WebCore::CCBigNum::operator=): (WebCore::CCBigNum::data): (WebCore::CCBigNum::operator-): (WebCore::CCBigNum::operator%): (WebCore::CCBigNum::inverse): Added a minimal wrapper around CommonCrypto BigNum. * crypto/mac/CryptoKeyRSAMac.cpp: (WebCore::getPrivateKeyComponents): Compute missing parts using CCBigNum. (WebCore::CryptoKeyRSA::exportData): Implemented private key case. 2013-12-03 Ryosuke Niwa XML fragment parsing algorithm doesn't use the context element's default namespace URI https://bugs.webkit.org/show_bug.cgi?id=125132 Reviewed by Darin Adler. Always use the context element's namespace as the default namespace URI when one is not specified by xmlns. The new behavior matches that of Internet Explorer and the specified behavior in HTML5: http://www.w3.org/TR/2013/CR-html5-20130806/the-xhtml-syntax.html#parsing-xhtml-fragments "The default namespace is the namespace for which the DOM isDefaultNamespace() method on the element would return true." Test: fast/parser/fragment-parsing-in-document-without-xmlns.html * xml/parser/XMLDocumentParserLibxml2.cpp: (WebCore::XMLDocumentParser::XMLDocumentParser): 2013-12-03 Nick Diego Yamane Remove some CSS Variables leftovers https://bugs.webkit.org/show_bug.cgi?id=125167 Reviewed by Darin Adler. No new tests needed. Only removing leftover code. * css/CSSBasicShapes.cpp: * css/CSSBasicShapes.h: 2013-12-03 Myles C. Maxfield Checking second-to-last bit in address is a typo https://bugs.webkit.org/show_bug.cgi?id=125162 Reviewed by Darin Adler. After talking with the original author of this line, is was a typo to make sure that the second-to-last bit in an address is 0. Instead, we want to make sure that the address is aligned to a 4-byte boundary No behavior change, so no test is necessary * platform/graphics/cg/ImageBufferCG.cpp: (WebCore::ImageBuffer::ImageBuffer): 2013-12-03 Radu Stavila The overflow border of a relatively positioned element inside a region is not painted https://bugs.webkit.org/show_bug.cgi?id=124919 Relative positioned elements have self-painting layers that don't propagate the visual overflow so the layer's position should be used when determining the clipping rectangle for box decorations. Reviewed by Mihnea Ovidenie. Test: fast/regions/relative-borders-overflow.html * rendering/RenderFlowThread.cpp: (WebCore::RenderFlowThread::decorationsClipRectForBoxInRegion): 2013-12-03 Seokju Kwon Web Inspector: Get rid of 'hasFrontend()' in InspectorController and WorkerInspectorController https://bugs.webkit.org/show_bug.cgi?id=125135 Reviewed by Darin Adler. Remove 'hasFrontend()' from InspectorController and WorkerInspectorController as it's never called. No new tests, no behavior changes. * inspector/InspectorController.h: * inspector/WorkerInspectorController.h: 2013-12-03 Seokju Kwon Web Inspector: webViewResized() is not used anywhere in WebInspectorUI https://bugs.webkit.org/show_bug.cgi?id=125137 Reviewed by Darin Adler. Remove leftover code. No new tests, no behavior changes. * inspector/InspectorController.cpp: * inspector/InspectorController.h: * inspector/InspectorOverlay.cpp: * inspector/InspectorOverlay.h: * inspector/InspectorPageAgent.cpp: * inspector/InspectorPageAgent.h: 2013-12-03 László Langó ASSERTION FAILED: !value || (value->isPrimitiveValue()) in WebCore::StyleProperties::getLayeredShorthandValue. https://bugs.webkit.org/show_bug.cgi?id=125146 Reviewed by Darin Adler. Do not presume that |yValue| is primitive if |value| is implicit in StylePropertySerializer. An implicit y-value can become explicit if specified as a separate longhand. At the same time, its new value can be non-primitive. Backported from Blink: http://src.chromium.org/viewvc/blink?view=rev&rev=153678 Test: fast/css/webkit-mask-crash-implicit.html * css/StyleProperties.cpp: (WebCore::StyleProperties::getLayeredShorthandValue): 2013-12-03 Rob Buis Fix build break after r160007. * rendering/style/BasicShapes.cpp: (WebCore::BasicShape::canBlend): 2013-12-03 Rob Buis [css shapes] layout for new ellipse syntax https://bugs.webkit.org/show_bug.cgi?id=124621 Reviewed by Dirk Schulze. Implement support for doing layout with the new ellipse shape syntax, including basic animation support. Test: fast/shapes/shape-outside-floats/shape-outside-floats-ellipse-000.html * rendering/shapes/Shape.cpp: (WebCore::Shape::createShape): Convert new ellipse to a layout shape. * rendering/style/BasicShapes.cpp: (WebCore::BasicShape::canBlend): Ignore ellipses with values that cannot be interpolated. (WebCore::BasicShapeEllipse::floatValueForRadiusInBox): Helper function to calculate either radiusX or radiusY, shared by clip-path and shape code paths. (WebCore::BasicShapeEllipse::path): * rendering/style/BasicShapes.h: 2013-12-03 Frédéric Wang Add an MathMLSelectElement class to implement and . Reviewed by Chris Fleizach. Tests: mathml/presentation/maction-dynamic.html mathml/presentation/maction.html mathml/presentation/semantics.html This adds a new MathMLSelectElement class to prepare the implementation of the and elements, for which only one "selected" child is visible. We now simply display the first child of the element instead of hiding the annotations and this allows to handle the use case of SVG-in-MathML as generated by Instiki when bug 124128 is fixed ; Gecko's selection algorithm will be implemented later (bug 100626). We now also rely on the @actiontype and @selection attributes to select the visible child ; It remains to deal with the user interaction (bug 85734). * CMakeLists.txt: add the new files. * GNUmakefile.list.am: ditto * Target.pri: ditto * WebCore.vcxproj/WebCore.vcxproj: ditto * WebCore.vcxproj/WebCore.vcxproj.filters: ditto * WebCore.xcodeproj/project.pbxproj: ditto * css/mathml.css: remove the CSS rule for annotation/annotation-xml. * mathml/MathMLAllInOne.cpp: add the new cpp file. * mathml/MathMLSelectElement.cpp: Added. (WebCore::MathMLSelectElement::MathMLSelectElement): (WebCore::MathMLSelectElement::create): (WebCore::MathMLSelectElement::createRenderer): (WebCore::MathMLSelectElement::childShouldCreateRenderer): (WebCore::MathMLSelectElement::finishParsingChildren): (WebCore::MathMLSelectElement::childrenChanged): (WebCore::MathMLSelectElement::attributeChanged): (WebCore::MathMLSelectElement::updateSelectedChild): basic implementation for maction, semantics, maction@actiontype and maction@selection. * mathml/MathMLSelectElement.h: Added. * mathml/mathattrs.in: add actiontype and selection attributes. * mathml/mathtags.in: set element classes for maction, semantics, annotation and annotation-xml. 2013-12-03 Thiago de Barros Lacerda Nix Upstream: Adding missing nix new files to WebCore https://bugs.webkit.org/show_bug.cgi?id=124987 Reviewed by Benjamin Poulain. No new tests needed. * PlatformNix.cmake: * platform/nix/ErrorsNix.cpp: Added. * platform/nix/ErrorsNix.h: Added. * platform/nix/FileSystemNix.cpp: Added. * platform/nix/MIMETypeRegistryNix.cpp: Added. * platform/nix/SharedTimerNix.cpp: Added. * platform/nix/TemporaryLinkStubs.cpp: Added. 2013-12-03 Tamas Gergely Correct broken build on efl port with --no-netscape-plugin-api configuration. https://bugs.webkit.org/show_bug.cgi?id=123997 Reviewed by Zoltan Herczeg. Build failed on efl port with --no-netscape-plugin-api configuration as ld did not found some methods. The configuration uses a minimal empty implementation of the class, which is now extended with empty method implementations. * plugins/PluginPackageNone.cpp: (WebCore::PluginPackage::createPackage): Returns NULL pointer. (WebCore::PluginPackage::hash): Returns 0. (WebCore::PluginPackage::equal): Returns true (equals). (WebCore::PluginPackage::compare): Returns 0 (equals). (WebCore::PluginPackage::~PluginPackage): Do nothing. 2013-12-02 Andreas Kling Avoid setting style twice for generated image content. Take care of a FIXME I added in r158097 and avoid redundant work in ImageContentData::createRenderer(). I changed the inheritance helper RenderImage::setPseudoStyle() into a new createStyleInheritingFromPseudoStyle() function instead so it can be used from both PseudoElement and ImageContentData. Reviewed by Antti Koivisto. 2013-12-02 Samuel White AX: Add AXUIElementCountForSearchPredicate parameterized attribute. https://bugs.webkit.org/show_bug.cgi?id=124561 Reviewed by Chris Fleizach. Added ability to fetch the number of elements that match a specific criteria. This will enable VoiceOver to interface with WebKit much more dynamically. We can now get an idea of how many interesting elements exist on a page, and then fetch them in chunks as needed. Test: platform/mac/accessibility/search-predicate-element-count.html * accessibility/AccessibilityObject.cpp: (WebCore::AccessibilityObject::isAccessibilityTextSearchMatch): * accessibility/AccessibilityObject.h: (WebCore::AccessibilitySearchCriteria::AccessibilitySearchCriteria): * accessibility/mac/WebAccessibilityObjectWrapperMac.mm: (accessibilitySearchCriteriaForSearchPredicateParameterizedAttribute): (-[WebAccessibilityObjectWrapper accessibilityParameterizedAttributeNames]): (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]): 2013-12-02 Bem Jones-Bey [css shapes] Layout support for new circle shape syntax https://bugs.webkit.org/show_bug.cgi?id=124619 Reviewed by Dirk Schulze. Implement support for doing layout with the new circle shape syntax, inclduing basic animation support. Tests: fast/shapes/shape-outside-floats/shape-outside-floats-circle-000.html fast/shapes/shape-outside-floats/shape-outside-floats-circle-001.html fast/shapes/shape-outside-floats/shape-outside-floats-circle-002.html fast/shapes/shape-outside-floats/shape-outside-floats-circle-003.html fast/shapes/shape-outside-floats/shape-outside-floats-circle-004.html fast/shapes/shape-outside-floats/shape-outside-floats-circle-005.html * css/BasicShapeFunctions.cpp: (WebCore::floatValueForCenterCoordinate): Used by both the CSS Shapes layout code and the clip path code. * css/BasicShapeFunctions.h: * css/CSSBasicShapes.cpp: (WebCore::buildCircleString): Update to use appendLiteral, and remove call to reserveCapacity - if we find that it's actually slow when doing performance tests, we can hopefully do something smarter and less ugly than that. * css/CSSParser.cpp: (WebCore::CSSParser::parseShapeRadius): Fix a logic error that caused the radius keywords not to work properly. * rendering/shapes/Shape.cpp: (WebCore::Shape::createShape): Convert new circle to a layout shape. * rendering/style/BasicShapes.cpp: (WebCore::BasicShape::canBlend): Ignore circles with values that cannot be interpolated. (WebCore::BasicShapeCircle::floatValueForRadiusInBox): Convert circle radius keywords to a float value. (WebCore::BasicShapeCircle::path): (WebCore::BasicShapeCircle::blend): * rendering/style/BasicShapes.h: (WebCore::BasicShapeCenterCoordinate::canBlend): (WebCore::BasicShapeRadius::canBlend): 2013-12-02 Alexey Proskuryakov WebCrypto HMAC doesn't check key algorithm's hash https://bugs.webkit.org/show_bug.cgi?id=125114 Reviewed by Anders Carlsson. Test: crypto/subtle/hmac-check-algorithm.html * crypto/algorithms/CryptoAlgorithmHMAC.cpp: (WebCore::CryptoAlgorithmHMAC::keyAlgorithmMatches): Check it. 2013-12-02 Brady Eidson Possible crash in ProgressTracker::progressHeartbeatTimerFired(Timer*) https://bugs.webkit.org/show_bug.cgi?id=125110 Reviewed by Darin Adler. FrameLoader::loadProgressingStatusChanged() might be called while the Frame has a null FrameView. It’s unclear how to reproduce, but there’s no harm in a null check. * loader/FrameLoader.cpp: (WebCore::FrameLoader::loadProgressingStatusChanged): 2013-12-02 Brady Eidson Possible crash in ProgressTracker::progressHeartbeatTimerFired(Timer*) https://bugs.webkit.org/show_bug.cgi?id=125110 Reviewed by Darin Adler. It’s possible to have a null m_originatingProgressFrame when the heartbeat timer fires. On the surface this seems impossible because the only time m_originatingProgressFrame is cleared out the heartbeat timer is also stopped. But there’s likely still a race condition in multi-threaded environments. There’s no harm in null-checking m_originatingProgressFrame before accessing its loader. * loader/ProgressTracker.cpp: (WebCore::ProgressTracker::progressHeartbeatTimerFired): 2013-12-02 Brady Eidson Add more CachedPage null checks https://bugs.webkit.org/show_bug.cgi?id=125106 Reviewed by Sam Weinig. Only some functions in PageCache.cpp null-check the CachedPages in HistoryItems. Every part that manipulates the CachedPage should. * history/PageCache.cpp: (WebCore::PageCache::markPagesForVistedLinkStyleRecalc): (WebCore::PageCache::markPagesForFullStyleRecalc): (WebCore::PageCache::markPagesForDeviceScaleChanged): (WebCore::PageCache::markPagesForCaptionPreferencesChanged): 2013-12-02 Zoltan Horvath [CSS Shapes] Support inset parsing https://bugs.webkit.org/show_bug.cgi?id=124903 Reviewed by David Hyatt. In this patch I added support for inset shape parsing for CSS Shapes. Inset is defined by CSS Shapes Level 1 (http://dev.w3.org/csswg/css-shapes-1/#supported-basic-shapes). Inset is going to be used by shape-outside (bug #124905), and eventually by shape-inside. No new tests, I updated existing tests to cover the changes. * css/BasicShapeFunctions.cpp: (WebCore::valueForBasicShape): Add support for inset. (WebCore::basicShapeForValue): Add support for inset. * css/CSSBasicShapes.cpp: (WebCore::buildInsetString): Create inset css string. (WebCore::CSSBasicShapeInset::cssText): Convert inset shape to a CSS string. (WebCore::CSSBasicShapeInset::equals): Compare two inset rectangles. (WebCore::CSSBasicShapeInset::serializeResolvingVariables): Create an inset string, with CSS variables resolved. (WebCore::CSSBasicShapeInset::hasVariableReference): Determine if this inset has any CSS Variable references. * css/CSSBasicShapes.h: Add inset class. (WebCore::CSSBasicShapeInset::create): (WebCore::CSSBasicShapeInset::top): (WebCore::CSSBasicShapeInset::right): (WebCore::CSSBasicShapeInset::bottom): (WebCore::CSSBasicShapeInset::left): (WebCore::CSSBasicShapeInset::topLeftRadius): (WebCore::CSSBasicShapeInset::topRightRadius): (WebCore::CSSBasicShapeInset::bottomRightRadius): (WebCore::CSSBasicShapeInset::bottomLeftRadius): (WebCore::CSSBasicShapeInset::setTop): (WebCore::CSSBasicShapeInset::setRight): (WebCore::CSSBasicShapeInset::setBottom): (WebCore::CSSBasicShapeInset::setLeft): (WebCore::CSSBasicShapeInset::setTopLeftRadius): (WebCore::CSSBasicShapeInset::setTopRightRadius): (WebCore::CSSBasicShapeInset::setBottomRightRadius): (WebCore::CSSBasicShapeInset::setBottomLeftRadius): (WebCore::CSSBasicShapeInset::CSSBasicShapeInset): * css/CSSParser.cpp: (WebCore::completeBorderRadii): Move static function before parseInsetBorderRadius. (WebCore::CSSParser::parseInsetRoundedCorners): I added this helper function for parsing the rounded corners (WebCore::CSSParser::parseBasicShapeInset): Parse inset. (WebCore::CSSParser::parseBasicShape): Add call to parse inset. * css/CSSParser.h: * css/CSSPrimitiveValue.cpp: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Add constructor for LengthSize. (WebCore::CSSPrimitiveValue::init): Initialize LengthSize. * css/CSSPrimitiveValue.h: (WebCore::CSSPrimitiveValue::create): Add support for creating PrimitiveValue from LengthSize. * css/CSSValuePool.h: (WebCore::CSSValuePool::createValue): Add support for LengthSize. * platform/LengthSize.h: (WebCore::LengthSize::blend): Add blend for LengthSize. * rendering/shapes/ShapeInsideInfo.cpp: (WebCore::ShapeInsideInfo::isEnabledFor): Keep inset disabled for shape-inside now. * rendering/style/BasicShapes.cpp: (WebCore::BasicShapeInset::path): Calculate path for an inset. (WebCore::BasicShapeInset::blend): Blend two insets. * rendering/style/BasicShapes.h: Add higher level inset. (WebCore::BasicShapeInset::create): (WebCore::BasicShapeInset::top): (WebCore::BasicShapeInset::right): (WebCore::BasicShapeInset::bottom): (WebCore::BasicShapeInset::left): (WebCore::BasicShapeInset::topLeftRadius): (WebCore::BasicShapeInset::topRightRadius): (WebCore::BasicShapeInset::bottomRightRadius): (WebCore::BasicShapeInset::bottomLeftRadius): (WebCore::BasicShapeInset::setTop): (WebCore::BasicShapeInset::setRight): (WebCore::BasicShapeInset::setBottom): (WebCore::BasicShapeInset::setLeft): (WebCore::BasicShapeInset::setTopLeftRadius): (WebCore::BasicShapeInset::setTopRightRadius): (WebCore::BasicShapeInset::setBottomRightRadius): (WebCore::BasicShapeInset::setBottomLeftRadius): (WebCore::BasicShapeInset::BasicShapeInset): 2013-12-02 Alexey Proskuryakov Support WebCrypto AES-KW https://bugs.webkit.org/show_bug.cgi?id=125105 Reviewed by Sam Weinig. Tests: crypto/subtle/aes-kw-key-manipulation.html crypto/subtle/aes-kw-wrap-unwrap-aes.html * WebCore.xcodeproj/project.pbxproj: Added new files. * crypto/CryptoAlgorithmIdentifier.h: (WebCore::CryptoAlgorithmIdentifier): Added AES-KW. It's not standardized yet, but there appears to be a consensus that it will be specified. * bindings/js/JSCryptoAlgorithmDictionary.cpp: (WebCore::JSCryptoAlgorithmDictionary::createParametersForEncrypt): (WebCore::JSCryptoAlgorithmDictionary::createParametersForDecrypt): (WebCore::JSCryptoAlgorithmDictionary::createParametersForSign): (WebCore::JSCryptoAlgorithmDictionary::createParametersForVerify): (WebCore::JSCryptoAlgorithmDictionary::createParametersForDigest): (WebCore::JSCryptoAlgorithmDictionary::createParametersForGenerateKey): (WebCore::JSCryptoAlgorithmDictionary::createParametersForDeriveKey): (WebCore::JSCryptoAlgorithmDictionary::createParametersForDeriveBits): (WebCore::JSCryptoAlgorithmDictionary::createParametersForImportKey): (WebCore::JSCryptoAlgorithmDictionary::createParametersForExportKey): Added AES-KW cases everywhere. * bindings/js/JSCryptoKeySerializationJWK.cpp: (WebCore::JSCryptoKeySerializationJWK::reconcileAlgorithm): (WebCore::JSCryptoKeySerializationJWK::keySizeIsValid): (WebCore::JSCryptoKeySerializationJWK::addJWKAlgorithmToJSON): Support importing/exporting AES-KW keys in JWK. * bindings/js/JSSubtleCryptoCustom.cpp: (WebCore::JSSubtleCrypto::importKey): (WebCore::JSSubtleCrypto::exportKey): (WebCore::JSSubtleCrypto::wrapKey): (WebCore::JSSubtleCrypto::unwrapKey): Added some accidentally forgotten std::moves. * crypto/algorithms/CryptoAlgorithmAES_KW.cpp: Added. * crypto/algorithms/CryptoAlgorithmAES_KW.h: Added. * crypto/mac/CryptoAlgorithmAES_KWMac.cpp: Added. * crypto/keys/CryptoKeyAES.cpp: (WebCore::CryptoKeyAES::CryptoKeyAES): Allow AES-KW as valid algorithm for AES keys. * crypto/mac/CryptoAlgorithmRegistryMac.cpp: (WebCore::CryptoAlgorithmRegistry::platformRegisterAlgorithms): Register AES-KW. 2013-12-02 Beth Dakin Add a setting to opt into a mode where the background extends and fixed elements don't move on rubber-band https://bugs.webkit.org/show_bug.cgi?id=124745 Reviewed by Tim Horton. New setting backgroundShouldExtendBeyondPage() will cause the tile cache to have a margin, and it will also cause fixed elements and backgrounds to stick to the viewport on scroll instead of sticking to the document. * WebCore.exp.in: * page/FrameView.cpp: (WebCore::FrameView::scrollBehaviorForFixedElements): * page/Settings.in: * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::RenderLayerBacking): 2013-12-02 Roger Zanoni [MediaStream] Use iterator-based loops instead of index-based loops https://bugs.webkit.org/show_bug.cgi?id=125021 Reviewed by Eric Carlson. Also, changing iterator variable names from iter to it and initializing an 'end' variable in each loop instead of evaluating 'collection.end()' multiple times. No new tests, covered by existing ones. * Modules/mediastream/MediaStream.cpp: (WebCore::MediaStream::cloneMediaStreamTrackVector): (WebCore::MediaStream::haveTrackWithSource): (WebCore::MediaStream::getTrackById): (WebCore::MediaStream::trackDidEnd): (WebCore::MediaStream::scheduledEventTimerFired): 2013-12-02 Rob Buis [css shapes] Parse new ellipse shape syntax https://bugs.webkit.org/show_bug.cgi?id=124620 Reviewed by Dirk Schulze. Implement parsing of the new ellipse shape syntax. This closely follows the patch for the new circle syntax (https://bugs.webkit.org/show_bug.cgi?id=124618), with some refactoring of functionality shared by both. Updated existing parsing tests to cover this. * css/BasicShapeFunctions.cpp: (WebCore::BasicShapeRadiusToCSSValue): (WebCore::valueForBasicShape): (WebCore::CSSValueToBasicShapeRadius): (WebCore::basicShapeForValue): * css/CSSBasicShapes.cpp: (WebCore::buildEllipseString): (WebCore::CSSBasicShapeEllipse::cssText): (WebCore::CSSBasicShapeEllipse::equals): (WebCore::buildDeprecatedEllipseString): (WebCore::CSSDeprecatedBasicShapeEllipse::cssText): (WebCore::CSSDeprecatedBasicShapeEllipse::equals): * css/CSSBasicShapes.h: (WebCore::CSSDeprecatedBasicShapeEllipse::create): (WebCore::CSSDeprecatedBasicShapeEllipse::centerX): (WebCore::CSSDeprecatedBasicShapeEllipse::centerY): (WebCore::CSSDeprecatedBasicShapeEllipse::radiusX): (WebCore::CSSDeprecatedBasicShapeEllipse::radiusY): (WebCore::CSSDeprecatedBasicShapeEllipse::setCenterX): (WebCore::CSSDeprecatedBasicShapeEllipse::setCenterY): (WebCore::CSSDeprecatedBasicShapeEllipse::setRadiusX): (WebCore::CSSDeprecatedBasicShapeEllipse::setRadiusY): (WebCore::CSSDeprecatedBasicShapeEllipse::CSSDeprecatedBasicShapeEllipse): * css/CSSParser.cpp: (WebCore::CSSParser::parseBasicShapeEllipse): (WebCore::CSSParser::parseDeprecatedBasicShapeEllipse): (WebCore::CSSParser::parseBasicShape): * css/CSSParser.h: * rendering/shapes/Shape.cpp: (WebCore::Shape::createShape): * rendering/style/BasicShapes.cpp: (WebCore::DeprecatedBasicShapeEllipse::path): (WebCore::DeprecatedBasicShapeEllipse::blend): (WebCore::BasicShapeEllipse::path): (WebCore::BasicShapeEllipse::blend): * rendering/style/BasicShapes.h: (WebCore::BasicShapeEllipse::centerX): (WebCore::BasicShapeEllipse::centerY): (WebCore::BasicShapeEllipse::radiusX): (WebCore::BasicShapeEllipse::radiusY): (WebCore::BasicShapeEllipse::setCenterX): (WebCore::BasicShapeEllipse::setCenterY): (WebCore::BasicShapeEllipse::setRadiusX): (WebCore::BasicShapeEllipse::setRadiusY): (WebCore::BasicShapeEllipse::BasicShapeEllipse): (WebCore::DeprecatedBasicShapeEllipse::create): (WebCore::DeprecatedBasicShapeEllipse::DeprecatedBasicShapeEllipse): 2013-12-02 Alexey Proskuryakov Add support for WebCrypto RSA-OAEP https://bugs.webkit.org/show_bug.cgi?id=125084 Build fix. * crypto/CommonCryptoUtilities.h: * crypto/mac/CryptoAlgorithmRSASSA_PKCS1_v1_5Mac.cpp: * crypto/mac/CryptoKeyRSAMac.cpp: 2013-12-02 Brendan Long Use GenericEventQueue in TrackListBase and reduce code duplication with scheduleTrackEvent() https://bugs.webkit.org/show_bug.cgi?id=124811 Reviewed by Eric Carlson. No new tests because this is just refactoring. * html/track/TrackListBase.cpp: (TrackListBase::TrackListBase): Replace event code with a GenericEventQueue. (TrackListBase::scheduleTrackEvent): Factor out duplicate code in schedule{Add,Remove}TrackEvent functions. (TrackListBase::scheduleAddTrackEvent): Same. (TrackListBase::scheduleRemoveTrackEvent): Same. (TrackListBase::scheduleChangeEvent): Use GenericEventQueue. * html/track/TrackListBase.h: Replace event code with GenericEventQueue. 2013-12-02 Alexey Proskuryakov Add support for WebCrypto RSA-OAEP https://bugs.webkit.org/show_bug.cgi?id=125084 Build fix. * WebCore.xcodeproj/project.pbxproj: Fix an automatic merge failure by re-adding CryptoAlgorithmRsaOaepParams.h. 2013-12-02 Victor Jaquez [Gstreamer] update webkitvideosink metadata https://bugs.webkit.org/show_bug.cgi?id=125082 Reviewed by Philippe Normand. No new tests, no behavior changes. * platform/graphics/gstreamer/VideoSinkGStreamer.cpp: (webkit_video_sink_class_init): 2013-12-02 Víctor Manuel Jáquez Leal Simplify MediaPlayerPrivateGStreamerBase::createVideoSink() https://bugs.webkit.org/show_bug.cgi?id=125077 Remove the method's unused parameter. Remove the GStreamer 0.10.22 run-time validation, since we are using GStreamer 1.0 officially. Remove the creation of a spurious Bin for the video sink, since either the fpssink or the webkitsink are valid sink elements. Change fpsink to a GRefPtr. Now, createVideoSink() returns a simple pointer to the created sink element. Reviewed by Philippe Normand. No new tests, no behavior changes. * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: (WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin): * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp: (WebCore::MediaPlayerPrivateGStreamerBase::createVideoSink): (WebCore::MediaPlayerPrivateGStreamerBase::decodedFrameCount): (WebCore::MediaPlayerPrivateGStreamerBase::droppedFrameCount): * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h: 2013-12-02 Alexey Proskuryakov Add support for WebCrypto RSA-OAEP https://bugs.webkit.org/show_bug.cgi?id=125084 Reviewed by Sam Weinig. Tests: crypto/subtle/rsa-oaep-key-manipulation.html crypto/subtle/rsa-oaep-plaintext-length.html crypto/subtle/rsa-oaep-wrap-unwrap-aes.html * WebCore.xcodeproj/project.pbxproj: Added new files. * bindings/js/JSCryptoAlgorithmDictionary.cpp: (WebCore::createRsaOaepParams): (WebCore::JSCryptoAlgorithmDictionary::createParametersForEncrypt): (WebCore::JSCryptoAlgorithmDictionary::createParametersForDecrypt): (WebCore::JSCryptoAlgorithmDictionary::createParametersForImportKey): Added RSA-OAEP parameters. * bindings/js/JSCryptoKeySerializationJWK.cpp: (WebCore::JSCryptoKeySerializationJWK::reconcileAlgorithm): (WebCore::JSCryptoKeySerializationJWK::keySizeIsValid): (WebCore::JSCryptoKeySerializationJWK::addJWKAlgorithmToJSON): Support RSA-OAEP in JWK. It is more limited than general WebCrypto, as JWK only allows SHA-1 as hash. * crypto/CommonCryptoUtilities.cpp: Added. (WebCore::getCommonCryptoDigestAlgorithm): * crypto/CommonCryptoUtilities.h: Added. Extracted some shared code and forward declarations for CommonCrypto. * crypto/CryptoAlgorithmParameters.h: (WebCore::CryptoAlgorithmParameters::Class): * crypto/parameters/CryptoAlgorithmRsaOaepParams.h: Added. Added RsaOaepParams. * crypto/algorithms/CryptoAlgorithmRSA_OAEP.cpp: Added. * crypto/algorithms/CryptoAlgorithmRSA_OAEP.h: Added. * crypto/mac/CryptoAlgorithmRSA_OAEPMac.cpp: Added. * crypto/mac/CryptoAlgorithmHMACMac.cpp: (WebCore::getCommonCryptoHMACAlgorithm): (WebCore::CryptoAlgorithmHMAC::platformSign): (WebCore::CryptoAlgorithmHMAC::platformVerify): * crypto/mac/CryptoAlgorithmRSASSA_PKCS1_v1_5Mac.cpp: * crypto/mac/CryptoKeyMac.cpp: * crypto/mac/CryptoKeyRSAMac.cpp: Use CommonCryptoUtilities. * crypto/mac/CryptoAlgorithmRegistryMac.cpp: (WebCore::CryptoAlgorithmRegistry::platformRegisterAlgorithms): Register RSA-OAEP. 2013-12-02 Andres Gomez [GTK] Fails to build with freetype 2.5.1 https://bugs.webkit.org/show_bug.cgi?id=125074 Reviewed by Carlos Garcia Campos. FreeType specifies a canonical way of including their own headers. Now, we are following this recommendation so the compilation won't be broken again due to an upgrade in FeeType's including paths. * platform/graphics/freetype/FontPlatformDataFreeType.cpp: * platform/graphics/freetype/SimpleFontDataFreeType.cpp: * platform/graphics/harfbuzz/HarfBuzzFaceCairo.cpp: 2013-12-02 Chris Fleizach AX: Crash at WebCore::commonTreeScope https://bugs.webkit.org/show_bug.cgi?id=125042 Reviewed by Mario Sanchez Prada. When an AX text marker that references a node in a detached document is used to create a text marker range, a crash occurs because the method to determine commonTreeScopes does not account for when there are no common tree scopes. Test: platform/mac/accessibility/ordered-textmarker-crash.html * accessibility/AccessibilityObject.cpp: (WebCore::AccessibilityObject::visiblePositionRangeForUnorderedPositions): * dom/TreeScope.cpp: (WebCore::commonTreeScope): 2013-12-02 Nick Diego Yamane Fix a crash in the webaudio source provider when the audio track is going away. https://bugs.webkit.org/show_bug.cgi?id=124975 Reviewed by Philippe Normand. Merged https://chromium.googlesource.com/chromium/blink/+/b21838b32bf11b1a972dfc449ddde71115490c23 Before this patch, it was hitting a use-after-free crash when the audio track in the media stream is going away and the webaudio mediastreamsourcenode is still running. * Modules/webaudio/AudioContext.cpp: (WebCore::AudioContext::createMediaStreamSource): Passing audio track pointer to MediaStreamAudioSourceNode constructor. * Modules/webaudio/MediaStreamAudioSourceNode.cpp: (WebCore::MediaStreamAudioSourceNode::create): (WebCore::MediaStreamAudioSourceNode::MediaStreamAudioSourceNode): * Modules/webaudio/MediaStreamAudioSourceNode.h: Added MediaStreamTrack class variable and change the constructor to receive it as parameter. 2013-12-02 Andrzej Badowski [ATK] Support active state for listbox elements. https://bugs.webkit.org/show_bug.cgi?id=125009 Reviewed by Chris Fleizach. Added support for ATK_STATE_ACTIVE for listbox elements. * accessibility/atk/WebKitAccessibleWrapperAtk.cpp: (setAtkStateSetFromCoreObject): 2013-12-02 Seokju Kwon Web Inspector: Remove unused functions from InspectorAgent https://bugs.webkit.org/show_bug.cgi?id=125061 Reviewed by Antoine Quint. Get rid of unused functions, redundant inclusion and forward declaration. No new tests, no behavior changes. * inspector/InspectorAgent.cpp: * inspector/InspectorAgent.h: 2013-12-02 Tibor Meszaros Fix build warning in EventHandler.cpp https://bugs.webkit.org/show_bug.cgi?id=125010 Reviewed by Csaba Osztrogonác. * page/EventHandler.cpp: (WebCore::EventHandler::eventInvertsTabsToLinksClientCallResult): 2013-12-02 Attila Dusnoki HTML5 required attribute validation messages implemented. https://bugs.webkit.org/show_bug.cgi?id=125003 Reviewed by Gyuyoung Kim. * platform/efl/LocalizedStringsEfl.cpp: (WebCore::validationMessagePatternMismatchText): (WebCore::validationMessageValueMissingText): (WebCore::validationMessageValueMissingForCheckboxText): (WebCore::validationMessageValueMissingForFileText): (WebCore::validationMessageValueMissingForMultipleFileText): (WebCore::validationMessageValueMissingForRadioText): (WebCore::validationMessageValueMissingForSelectText): (WebCore::validationMessageBadInputForNumberText): 2013-12-01 Andreas Kling SVG: Intersection/enclosure checks should use RenderElement. Make RenderSVGModelObject's checkIntersection() and checkEnclosure() take RenderElement* instead of RenderObject*. They are only ever called with SVGElement's renderers. Reviewed by Sam Weinig. 2013-12-01 Andreas Kling Remove unreachable labels for -webkit-margin-*-collapse properties. The following properties are implemented in DeprecatedStyleBuilder and should not have case labels in the applyProperty() switch: -webkit-margin-before-collapse -webkit-margin-top-collapse -webkit-margin-after-collapse -webkit-margin-bottom-collapse This seems counter-intuitive, but they are actually *not* like other directional properties. In this case, before/after are only aliases for top/bottom, and do not depend on writing-mode or text-direction. See also r68561, where the aliases were originally added. Reviewed by Anders Carlsson. 2013-12-01 Andreas Kling CSSFunctionValue constructors should return PassRef. Make CSSFunctionValue::create() helpers return PassRef instead of PassRefPtr since they will never return null. Reviewed by Anders Carlsson. 2013-12-01 Commit Queue Unreviewed, rolling out r159764. http://trac.webkit.org/changeset/159764 https://bugs.webkit.org/show_bug.cgi?id=125055 appears to hurt html5-full-render times (Requested by kling on #webkit). * html/parser/HTMLConstructionSite.cpp: (WebCore::HTMLConstructionSite::insertTextNode): * html/parser/HTMLConstructionSite.h: 2013-12-01 Andreas Kling Make more computed style helpers return PassRef. Reduce branchiness in computed style code by making more of the file-local helpers return PassRef instead of PassRefPtr. Reviewed by Anders Carlsson. 2013-11-30 Ryuan Choi [EFL] Implement scrollbarThickness for opaque scrollbar https://bugs.webkit.org/show_bug.cgi?id=125034 Reviewed by Gyuyoung Kim. Implemented scrollbarThickness to support opaque scrollbar. Now, edj can decide whether to support opaque scrollbar by adding scrollbar.thickness. In addition, added OVERRIDE/FINAL keyword and removed unnecessary destructor in ScrollbarThemeEfl.cpp. No new tests, no behavior changes with default theme. * platform/efl/RenderThemeEfl.cpp: (WebCore::RenderThemeEfl::loadTheme): Update thickness of scrollbar when theme was loaded. * platform/efl/ScrollbarThemeEfl.cpp: * platform/efl/ScrollbarThemeEfl.h: (WebCore::ScrollbarThemeEfl::setScrollbarThickness): (WebCore::ScrollbarThemeEfl::scrollbarThickness): (WebCore::ScrollbarThemeEfl::registerScrollbar): (WebCore::ScrollbarThemeEfl::unregisterScrollbar): 2013-11-29 Tamas Gergely Remove Symbian specific code. https://bugs.webkit.org/show_bug.cgi?id=124939 Reviewed by Zoltan Herczeg. Symbian is not supported, remove leftover code. * plugins/npapi.h: 2013-11-28 Gyuyoung Kim Rename InlineIterator::m_obj and make it private https://bugs.webkit.org/show_bug.cgi?id=124837 Reviewed by Antti Koivisto. InlineIterator has been exported m_obj as public though there is a getter function. Besides *object* name isn't ambigious. So, changed it with m_renderer and renderer(). Additionally, setRenderer() is added as well. No new tests, no behavior changes. * rendering/InlineIterator.h: (WebCore::InlineIterator::setObject): (WebCore::operator==): (WebCore::operator!=): (WebCore::InlineBidiResolver::appendRun): * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlockFlow::appendRunsForObject): (WebCore::constructBidiRunsForLine): (WebCore::RenderBlockFlow::createLineBoxesFromBidiRuns): (WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange): (WebCore::RenderBlockFlow::matchedEndLine): * rendering/line/BreakingContextInlineHeaders.h: (WebCore::TrailingObjects::updateMidpointsForTrailingBoxes): (WebCore::BreakingContext::BreakingContext): (WebCore::BreakingContext::currentObject): (WebCore::BreakingContext::initializeForCurrentObject): (WebCore::BreakingContext::handleBR): (WebCore::BreakingContext::handleOutOfFlowPositioned): (WebCore::BreakingContext::handleFloat): (WebCore::BreakingContext::handleEmptyInline): (WebCore::BreakingContext::handleReplaced): (WebCore::iteratorIsBeyondEndOfRenderCombineText): (WebCore::ensureCharacterGetsLineBox): (WebCore::BreakingContext::handleText): (WebCore::BreakingContext::canBreakAtThisPosition): (WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded): (WebCore::checkMidpoints): (WebCore::BreakingContext::handleEndOfLine): * rendering/line/LineBreaker.cpp: (WebCore::LineBreaker::skipTrailingWhitespace): (WebCore::LineBreaker::skipLeadingWhitespace): * rendering/line/LineInlineHeaders.h: (WebCore::skipNonBreakingSpace): (WebCore::requiresLineBox): 2013-11-28 Antti Koivisto Rename StylePropertySet to StyleProperties https://bugs.webkit.org/show_bug.cgi?id=124990 Reviewed by Andreas Kling. "Set" does not add useful information here. Use less clunky plural name. 2013-11-28 Thiago de Barros Lacerda Nix Upstream: Adding EditorNix to WebCore https://bugs.webkit.org/show_bug.cgi?id=124984 Reviewed by Csaba Osztrogonác. No new tests needed. * PlatformNix.cmake: * editing/nix/EditorNix.cpp: Added. 2013-11-28 Zoltan Horvath [Win] Update vcxproj.filters, since LineInfo.h and LineLayoutState.h have been moved to rendering/line https://bugs.webkit.org/show_bug.cgi?id=124959 Reviewed by Brent Fulgham. Update WebCore.vcxproj.filters, since LineInfo.h (r155628) and LineLayoutState.h (158121) have been moved to rendering/line. No new tests, no behavior change. * WebCore.vcxproj/WebCore.vcxproj.filters: 2013-11-28 Laszlo Vidacs RenderTableSection Blink merge asserting https://bugs.webkit.org/show_bug.cgi?id=124857 Reviewed by Csaba Osztrogonác. Use border spacing at the end of all sections. * rendering/RenderTableSection.cpp: (WebCore::RenderTableSection::calcRowLogicalHeight): 2013-11-28 Antti Koivisto Remove feature: CSS variables https://bugs.webkit.org/show_bug.cgi?id=114119 Reviewed by Andreas Kling. The feature is unmaintained and it is getting in the way of refactoring. Code quality is not up to WebKit standards either. * Configurations/FeatureDefines.xcconfig: * GNUmakefile.list.am: * WebCore.xcodeproj/project.pbxproj: * css/CSSBasicShapes.cpp: * css/CSSBasicShapes.h: * css/CSSCalculationValue.cpp: (WebCore::unitCategory): (WebCore::hasDoubleValue): (WebCore::CSSCalcPrimitiveValue::toCalcValue): (WebCore::CSSCalcPrimitiveValue::computeLengthPx): (WebCore::determineCategory): (WebCore::CSSCalcBinaryOperation::primitiveType): * css/CSSCalculationValue.h: * css/CSSComputedStyleDeclaration.cpp: (WebCore::ComputedStyleExtractor::propertyValue): * css/CSSGrammar.y.in: * css/CSSParser.cpp: (WebCore::CSSParserContext::CSSParserContext): (WebCore::operator==): (WebCore::filterProperties): (WebCore::CSSParser::createStylePropertySet): (WebCore::CSSParser::addProperty): (WebCore::CSSParser::validCalculationUnit): (WebCore::CSSParser::validUnit): (WebCore::CSSParser::createPrimitiveNumericValue): (WebCore::CSSParser::parseValidPrimitive): (WebCore::CSSParser::parseValue): (WebCore::CSSParser::parseReflect): (WebCore::CSSParser::detectDashToken): (WebCore::CSSParser::realLex): * css/CSSParser.h: * css/CSSParserMode.h: * css/CSSParserValues.cpp: (WebCore::CSSParserValue::createCSSValue): * css/CSSParserValues.h: * css/CSSPrimitiveValue.cpp: (WebCore::isValidCSSUnitTypeForDoubleConversion): (WebCore::CSSPrimitiveValue::primitiveType): (WebCore::CSSPrimitiveValue::cleanup): (WebCore::CSSPrimitiveValue::getStringValue): (WebCore::CSSPrimitiveValue::customCSSText): (WebCore::CSSPrimitiveValue::equals): * css/CSSPrimitiveValue.h: * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::convertToLength): * css/CSSProperty.cpp: * css/CSSProperty.h: (WebCore::CSSProperty::CSSProperty): * css/CSSReflectValue.cpp: * css/CSSReflectValue.h: * css/CSSValue.cpp: (WebCore::CSSValue::equals): (WebCore::CSSValue::cssText): (WebCore::CSSValue::destroy): * css/CSSValue.h: (WebCore::CSSValue::setCssText): * css/CSSValueList.cpp: * css/CSSValueList.h: * css/CSSVariableValue.h: Removed. * css/Pair.h: * css/Rect.h: * css/StylePropertySet.cpp: (WebCore::StylePropertySet::asText): (WebCore::StylePropertySet::PropertyReference::cssName): * css/StyleResolver.cpp: (WebCore::StyleResolver::styleForPage): (WebCore::StyleResolver::applyProperties): (WebCore::StyleResolver::applyMatchedProperties): (WebCore::StyleResolver::applyProperty): * css/StyleResolver.h: * css/WebKitCSSTransformValue.cpp: * css/WebKitCSSTransformValue.h: (WebCore::WebKitCSSTransformValue::equals): * css/makeprop.pl: * page/Settings.cpp: (WebCore::Settings::Settings): * page/Settings.h: * rendering/style/RenderStyle.h: * rendering/style/StyleRareInheritedData.cpp: (WebCore::StyleRareInheritedData::StyleRareInheritedData): (WebCore::StyleRareInheritedData::operator==): * rendering/style/StyleRareInheritedData.h: * rendering/style/StyleVariableData.h: Removed. * testing/InternalSettings.cpp: (WebCore::InternalSettings::Backup::Backup): (WebCore::InternalSettings::Backup::restoreTo): * testing/InternalSettings.h: * testing/InternalSettings.idl: 2013-11-28 Thiago de Barros Lacerda Updating RTCPeerConnectionHandlerMock after r159769 https://bugs.webkit.org/show_bug.cgi?id=124947 Reviewed by Philippe Normand. Adding its create function back, in order to run RTCPeerConnection LayoutTests. No new tests needed. * platform/mock/RTCPeerConnectionHandlerMock.cpp: (WebCore::RTCPeerConnectionHandlerMock::create): * platform/mock/RTCPeerConnectionHandlerMock.h: 2013-11-27 Gustavo Noronha Silva [GTK] Support custom types for drag and drop data https://bugs.webkit.org/show_bug.cgi?id=124659 Reviewed by Martin Robinson. Covered by fast/events/drag-customData.html. * platform/gtk/DataObjectGtk.cpp: (WebCore::DataObjectGtk::unknownTypes): returns a hash map with all custom types set. (WebCore::DataObjectGtk::clearAllExceptFilenames): clear custom types. * platform/gtk/DataObjectGtk.h: (WebCore::DataObjectGtk::hasUnknownTypeData): returns whether custom types are set. (WebCore::DataObjectGtk::unknownTypeData): returns the data for a custom type. (WebCore::DataObjectGtk::setUnknownTypeData): sets the data for a custom type. * platform/gtk/PasteboardGtk.cpp: (WebCore::Pasteboard::writeString): handle unknown types as custom. (WebCore::Pasteboard::writePasteboard): ditto. (WebCore::Pasteboard::hasData): also check for custom types. (WebCore::Pasteboard::types): also obtain the list of custom types. (WebCore::Pasteboard::readString): handle unknown types as custom. * platform/gtk/PasteboardHelper.cpp: (WebCore::initGdkAtoms): new unknown atom. (WebCore::PasteboardHelper::PasteboardHelper): add custom type to the list of targets. (WebCore::PasteboardHelper::fillSelectionData): turns any custom types' data into a GVariant, which is in turn serialized to a single string for GtkSelectionData to hold. (WebCore::PasteboardHelper::targetListForDataObject): add custom data to the target list if any is set. (WebCore::PasteboardHelper::fillDataObjectFromDropData): retrieve the custom types and their data from the serialized GVariant string held by GtkSelectionData. (WebCore::PasteboardHelper::dropAtomsForContext): handle custom types. 2013-11-27 Eric Carlson Allow the QuickTime plug-in to be replaced by script in an isolated word https://bugs.webkit.org/show_bug.cgi?id=124900 Reviewed by Dean Jackson. Test: plugins/quicktime-plugin-replacement.html * CMakeLists.txt: Add new Modules path. * DerivedSources.make: Add new files. * GNUmakefile.am: Add new Modules path. * GNUmakefile.list.am: Add new header. * WebCore.vcxproj/WebCore.vcxproj: Add new header. * WebCore.vcxproj/WebCoreCommon.props: Add new Modules path. * WebCore.xcodeproj/project.pbxproj: Add new files. * Modules/plugins: Added. * Modules/plugins/PluginReplacement.h: Added. Defines the interface for a plug-in replacement. Create a replacement for the QuickTime plug-in. * Modules/plugins/QuickTimePluginReplacement.cpp: Added. * Modules/plugins/QuickTimePluginReplacement.css: Added. * Modules/plugins/QuickTimePluginReplacement.h: Added. * Modules/plugins/QuickTimePluginReplacement.idl: Added. * Modules/plugins/QuickTimePluginReplacement.js: Added. Allow plug-in replacement to be enabled at runtime. * bindings/generic/RuntimeEnabledFeatures.h: (WebCore::RuntimeEnabledFeatures::setPluginReplacementEnabled): (WebCore::RuntimeEnabledFeatures::pluginReplacementEnabled): * bindings/js/JSDOMBinding.h: (WebCore::toJS): Add toJS(... const String& ...). * bindings/js/JSPluginElementFunctions.cpp: (WebCore::pluginScriptObject): Give a plug-in replacement a first shot at defining the script interface. * html/HTMLEmbedElement.cpp: (WebCore::HTMLEmbedElement::updateWidget): Call base class requestObject. * html/HTMLMediaElement.cpp: (HTMLMediaElement::fileSize): New, passthrough to media engine. * html/HTMLMediaElement.h: * html/HTMLObjectElement.cpp: (WebCore::HTMLObjectElement::updateWidget): Call base class requestObject. Moved some logic that was previously used only for creating a plug-in snapshot to the base class so it can be shared by a plug-in replacement. * html/HTMLPlugInElement.cpp: (WebCore::HTMLPlugInElement::HTMLPlugInElement): Initialize timer used to swap renderers. (WebCore::HTMLPlugInElement::createRenderer): Allow plug-in replacement to create the renderer. (WebCore::HTMLPlugInElement::swapRendererTimerFired): Create a shadow root. (WebCore::HTMLPlugInElement::setDisplayState): Set the new state, prime the swap renderer timer if necessary. (WebCore::HTMLPlugInElement::didAddUserAgentShadowRoot): Tell the plug-in replacement to install itself in the new shadow DOM. (WebCore::registeredPluginReplacements): Return vector of all registered plug-in replacements. (WebCore::registerPluginReplacement): Add a plug-in replacement. (WebCore::pluginReplacementForType): Find a plug-in replacement for a MIME type. (WebCore::HTMLPlugInElement::requestObject): If there is a plug-in replacement for the MIME type, create it and set the display state. (WebCore::HTMLPlugInElement::scriptObjectForPluginReplacement): Return the script object for the current plug-in replacement, if any. * html/HTMLPlugInElement.h: Move some plug-in snapshot code into the base class. * html/HTMLPlugInImageElement.cpp: (WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement): No need to initialize timer. (WebCore::HTMLPlugInImageElement::setDisplayState): Call base class. (WebCore::HTMLPlugInImageElement::createRenderer): Ditto. (WebCore::HTMLPlugInImageElement::didAddUserAgentShadowRoot): Ditto. (WebCore::HTMLPlugInImageElement::userDidClickSnapshot): Remove unnecessary class name. (WebCore::HTMLPlugInImageElement::requestObject): New. * html/HTMLPlugInImageElement.h: * html/HTMLVideoElement.h: Make createRenderer public so the QuickTime plug-in replacement can call it. * platform/graphics/MediaPlayer.cpp: (WebCore::MediaPlayer::fileSize): New. * platform/graphics/MediaPlayer.h: * platform/graphics/MediaPlayerPrivate.h: * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp: (WebCore::MediaPlayerPrivateAVFoundation::extraMemoryCost): totalBytes returns an unsigned long long. * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h: (WebCore::MediaPlayerPrivateAVFoundation::fileSize): * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp: (WebCore::MediaPlayerPrivateAVFoundationCF::totalBytes): Return an unsigned long long. * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h: * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h: * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: (WebCore::MediaPlayerPrivateAVFoundationObjC::totalBytes): Ditto. * testing/InternalSettings.cpp: (WebCore::InternalSettings::Backup::Backup): Backup the plug-in replacement runtime setting. (WebCore::InternalSettings::Backup::restoreTo): Restore it. (WebCore::InternalSettings::setPluginReplacementEnabled): Set it. * testing/InternalSettings.h: * testing/InternalSettings.idl: 2013-11-27 Thiago de Barros Lacerda Adding MediaConstraintsMock class https://bugs.webkit.org/show_bug.cgi?id=124902 Reviewed by Eric Carlson. Validate constraints used in RTCPeerConnection LayoutTests Existing test was updated. * CMakeLists.txt: * GNUmakefile.list.am: * platform/mock/MediaConstraintsMock.cpp: Added. * platform/mock/MediaConstraintsMock.h: Added. * platform/mock/MockMediaStreamCenter.cpp: (WebCore::MockMediaStreamCenter::validateRequestConstraints): Now using MediaConstraintsMock (WebCore::MockMediaStreamCenter::createMediaStream): Ditto. * platform/mock/RTCPeerConnectionHandlerMock.cpp: (WebCore::RTCPeerConnectionHandlerMock::initialize): Ditto. 2013-11-27 Bear Travis [CSS Shapes] Shape-Inside Should Default to 'auto' https://bugs.webkit.org/show_bug.cgi?id=124851 Reviewed by Alexandru Chiculita. The current shape-inside specification has the property default to the 'auto' value, not 'outside-shape'. Updated tests are under fast/shapes. * rendering/style/RenderStyle.cpp: * rendering/style/RenderStyle.h: 2013-11-27 Hans Muller [CSS Shapes] shape-inside rectangle layout can fail https://bugs.webkit.org/show_bug.cgi?id=124784 Reviewed by Andreas Kling. Apply LayoutUnit::fromFloatCeil() consistently in RectangleShape::firstIncludedIntervalLogicalTop(). Test: fast/shapes/shape-inside/shape-inside-subpixel-rectangle-top.html * rendering/shapes/RectangleShape.cpp: (WebCore::RectangleShape::firstIncludedIntervalLogicalTop): 2013-11-27 Nick Diego Yamane Remove Qt-specific .qrc files https://bugs.webkit.org/show_bug.cgi?id=124944 Reviewed by Andreas Kling. No new tests needed. * WebCore.qrc: Removed. 2013-11-27 Xabier Rodriguez Calvar [GStreamer] Invalid command line error when visiting www.chessbase.com https://bugs.webkit.org/show_bug.cgi?id=124715 Reviewed by Philippe Normand. We were not handling the HTTP errors in the WebKit GStreamer source and therefore the 404 error page was being 'decoded'. As no decoder could be found (for obvious reasons), playback failed, but it should be failing for the source not being found instead of the decoding problem. Test: http/tests/media/video-error-does-not-exist.html * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp: (StreamingClient::handleResponseReceived): Handle HTTP errors in the source and raise a GStreamer error to the pipeline. 2013-11-14 Sergio Villar Senin [CSS Grid Layout] Fix positioning of grid items with margins https://bugs.webkit.org/show_bug.cgi?id=124345 Reviewed by David Hyatt. From Blink r157925 and r158041 by Test: fast/css-grid-layout/grid-item-margin-resolution.html Adds margin start/before to the positions of grid items (removing several FIXME's in the current code). This means calling findChildLogicalPosition() after the layout in order to have the right values for the margins. In order to match flexbox and author's intents we're also including the margins of grid items in the intrinsic size of the grid. That's why flexbox's marginLogicalPositionForChild() is moved up to RenderBlock in order to share it with RenderGrid. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::marginIntrinsicLogicalWidthForChild): Moved from RenderFlexibleBox::marginLogicalWidthForChild(). * rendering/RenderBlock.h: * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::computeIntrinsicLogicalWidths): * rendering/RenderGrid.cpp: (WebCore::RenderGrid::computePreferredTrackWidth): (WebCore::RenderGrid::layoutGridItems): (WebCore::RenderGrid::findChildLogicalPosition): 2013-11-26 Sergio Villar Senin [CSS Grid Layout] Support grid-definition-{rows|columns} repeat() syntax https://bugs.webkit.org/show_bug.cgi?id=103312 Reviewed by Andreas Kling. Added support for the repeat() syntax inside grid-definition-{rows|columns} by just adding the repeated values to our list of column|row definitions. The parsing of was refactored in a new function as it's used now in three different places. The parsing was also refactored to share it with the repeat() parsing. Test: fast/css-grid-layout/grid-element-repeat-get-set.html * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): (WebCore::CSSParser::parseGridTrackNames): (WebCore::CSSParser::parseGridTrackList): (WebCore::CSSParser::parseGridTrackRepeatFunction): (WebCore::CSSParser::parseGridTrackSize): * css/CSSParser.h: 2013-11-26 Marcelo Lira Nix upstreaming - Adding build files and supporting scripts https://bugs.webkit.org/show_bug.cgi?id=118367 Reviewed by Ryosuke Niwa. No new tests needed. * CMakeLists.txt: * PlatformNix.cmake: Added. 2013-11-26 Tim Horton Don't parent the TileController root layer in two places https://bugs.webkit.org/show_bug.cgi?id=124873 Reviewed by Brent Fulgham. * platform/graphics/ca/mac/TileController.mm: (WebCore::TileController::TileController): The TileController's layer is already parented by callers of TileController::create, and in a special way. TileController shouldn't parent itself, anyway... 2013-11-26 Nick Diego Yamane [MediaStream API] HTMLMediaElement should be able to use MediaStream as source https://bugs.webkit.org/show_bug.cgi?id=121943 Reviewed by Eric Carlson. Implement MediaStream direct assignment to Media Elements using the new 'srcObject' attribute: http://www.w3.org/TR/mediacapture-streams/#direct-assignment-to-media-elements Test: fast/mediastream/MediaStream-MediaElement-srcObject.html * CMakeLists.txt: Added new HTMLMediaElementMediaStream.h and .cpp to cmake build. * DerivedSources.make: Added HTMLMediaElementMediaStream.idl. * GNUmakefile.list.am: Added new HTMLMediaElementMediaStream* to autotools build. * WebCore.xcodeproj/project.pbxproj: Added new files. * Modules/mediastream/HTMLMediaElementMediaStream.cpp: Added. (WebCore::HTMLMediaElementMediaStream::srcObject): implements srcObject getter. (WebCore::HTMLMediaElementMediaStream::setSrcObject): implements srcObject setter. * Modules/mediastream/HTMLMediaElementMediaStream.h: Added. * Modules/mediastream/HTMLMediaElementMediaStream.idl: Added. * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::setSrcObject): This is an initial implementation, and is still incomplete, that will be addressed in a separate bug: https://webkit.org/b/124896 * html/HTMLMediaElement.h: Added m_mediaStreamSrcObject class variable and its corresponding getter. 2013-11-26 Andreas Kling Use child iterator to find operators in RenderMathMLRow::layout(). Replace manual children walk with childrenOfType. Minor update to fix build. Reviewed by Martin Robinson. 2013-11-26 Andreas Kling RenderObject: Inline isBody() and isHR(). Together these account for ~0.3% of samples on HTML5-8266. Almost all of it is call overhead. Reviewed by Anders Carlsson. 2013-11-26 Bear Travis [CSS Shapes] Layout using [ || ] value https://bugs.webkit.org/show_bug.cgi?id=124428 Reviewed by David Hyatt. When a box value is supplied, use it to size and position the shape. Otherwise, use a default value (content-box for shape-inside, margin-box for shape-outside). This patch extends the sizing and positioning code used for the box patch (Bug 124227) to also apply to shapes. With this patch, we also no longer use the box-sizing property to size and position shapes. Tests: fast/shapes/shape-outside-floats/shape-outside-shape-boxes-001.html fast/shapes/shape-outside-floats/shape-outside-shape-boxes-002.html fast/shapes/shape-outside-floats/shape-outside-shape-boxes-003.html * css/CSSComputedStyleDeclaration.cpp: (WebCore::ComputedStyleExtractor::propertyValue): Adjust for ShapeValues storing BasicShape::ReferenceBox as their box value, rather than a CSSValueID. * css/DeprecatedStyleBuilder.cpp: (WebCore::ApplyPropertyShape::applyValue): Ditto. * rendering/shapes/ShapeInfo.h: (WebCore::ShapeInfo::setShapeSize): Adjust for BasicShapes with reference boxes as well as plain box values. Also, remove old box-sizing code. (WebCore::ShapeInfo::logicalTopOffset): Ditto. (WebCore::ShapeInfo::logicalLeftOffset): Ditto. * rendering/shapes/ShapeInsideInfo.h: * rendering/shapes/ShapeOutsideInfo.h: * rendering/style/ShapeValue.h: (WebCore::ShapeValue::createBoxValue): Adjust for boxes being stored as BasicShape::ReferenceBoxes. (WebCore::ShapeValue::box): Ditto. (WebCore::ShapeValue::ShapeValue): Ditto. 2013-11-26 Brian J. Burg ImageBuffer::create should return a std::unique_ptr instead of OwnPtr. https://bugs.webkit.org/show_bug.cgi?id=124822 Reviewed by Andreas Kling. Replace all uses of OwnPtr and PassOwnPtr with std::unique_ptr. Replace calls to OwnPtr::clear() and OwnPtr::release() with reset() and std::move(). Remove unnecessary includes. No new tests. This is a mechanical refactoring. * css/CSSFilterImageValue.cpp: (WebCore::CSSFilterImageValue::image): * html/HTMLCanvasElement.cpp: (WebCore::HTMLCanvasElement::setSurfaceSize): * html/HTMLCanvasElement.h: * html/canvas/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::createCompositingBuffer): (WebCore::CanvasRenderingContext2D::fullCanvasCompositedDrawImage): (WebCore::CanvasRenderingContext2D::fullCanvasCompositedFill): (WebCore::CanvasRenderingContext2D::drawTextInternal): * html/canvas/CanvasRenderingContext2D.h: * html/canvas/WebGLRenderingContext.cpp: (WebCore::WebGLRenderingContext::LRUImageBufferCache::LRUImageBufferCache): (WebCore::WebGLRenderingContext::LRUImageBufferCache::imageBuffer): * html/canvas/WebGLRenderingContext.h: * html/shadow/MediaControlElements.cpp: (WebCore::MediaControlTextTrackContainerElement::createTextTrackRepresentationImage): * page/Frame.cpp: (WebCore::Frame::nodeImage): (WebCore::Frame::dragImageForSelection): * platform/graphics/BitmapImage.cpp: (WebCore::BitmapImage::drawPattern): * platform/graphics/CrossfadeGeneratedImage.cpp: (WebCore::CrossfadeGeneratedImage::drawPattern): * platform/graphics/GradientImage.h: * platform/graphics/GraphicsContext.cpp: (WebCore::GraphicsContext::createCompatibleBuffer): * platform/graphics/GraphicsContext.h: * platform/graphics/ImageBuffer.cpp: (WebCore::ImageBuffer::createCompatibleBuffer): * platform/graphics/ImageBuffer.h: (WebCore::ImageBuffer::create): * platform/graphics/ShadowBlur.cpp: * platform/graphics/cg/ImageBufferCG.cpp: (WebCore::ImageBuffer::putByteArray): * platform/graphics/cg/PDFDocumentImage.h: * platform/graphics/filters/FETile.cpp: (WebCore::FETile::platformApplySoftware): * platform/graphics/filters/Filter.h: (WebCore::Filter::setSourceImage): * platform/graphics/filters/FilterEffect.cpp: (WebCore::FilterEffect::clearResult): * platform/graphics/filters/FilterEffect.h: * platform/graphics/texmap/TextureMapper.cpp: (WebCore::BitmapTexture::updateContents): * platform/graphics/texmap/TextureMapperImageBuffer.h: * rendering/InlineTextBox.cpp: (WebCore::InlineTextBox::paintDecoration): * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::paintFillLayerExtended): * rendering/RenderThemeMac.mm: (WebCore::RenderThemeMac::paintProgressBar): * rendering/shapes/Shape.cpp: (WebCore::Shape::createShape): * rendering/svg/RenderSVGImage.cpp: (WebCore::RenderSVGImage::invalidateBufferedForeground): * rendering/svg/RenderSVGImage.h: * rendering/svg/RenderSVGResourceClipper.cpp: (WebCore::RenderSVGResourceClipper::applyClippingToContext): * rendering/svg/RenderSVGResourceClipper.h: * rendering/svg/RenderSVGResourceFilter.cpp: (WebCore::RenderSVGResourceFilter::applyResource): (WebCore::RenderSVGResourceFilter::postApplyResource): * rendering/svg/RenderSVGResourceFilter.h: * rendering/svg/RenderSVGResourceGradient.cpp: Remove method parameter wrapping/indentation. (WebCore::createMaskAndSwapContextForTextGradient): (WebCore::clipToTextMask): (WebCore::RenderSVGResourceGradient::applyResource): * rendering/svg/RenderSVGResourceGradient.h: * rendering/svg/RenderSVGResourceMasker.cpp: (WebCore::RenderSVGResourceMasker::applyResource): * rendering/svg/RenderSVGResourceMasker.h: * rendering/svg/RenderSVGResourcePattern.cpp: Remove method parameter wrapping/indentation. (WebCore::RenderSVGResourcePattern::buildPattern): (WebCore::RenderSVGResourcePattern::createTileImage): * rendering/svg/RenderSVGResourcePattern.h: Remove method parameter wrapping/indentation. * rendering/svg/SVGRenderingContext.cpp: (WebCore::SVGRenderingContext::createImageBuffer): (WebCore::SVGRenderingContext::createImageBufferForPattern): (WebCore::SVGRenderingContext::clipToImageBuffer): (WebCore::SVGRenderingContext::bufferForeground): * rendering/svg/SVGRenderingContext.h: * svg/graphics/SVGImage.cpp: (WebCore::SVGImage::nativeImageForCurrentFrame): (WebCore::SVGImage::drawPatternForContainer): 2013-11-26 Eric Carlson video.currentSrc should return empty when no resource is loaded https://bugs.webkit.org/show_bug.cgi?id=124898 Reviewed by Dan Bernstein. Test: media/video-currentsrc-cleared.html * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::prepareForLoad): Set m_currentSrc to empty in preparation for attempting to load a new url. 2013-11-26 Hans Muller [CSS Shapes] Support for shape-margin in BoxShape https://bugs.webkit.org/show_bug.cgi?id=124788 Reviewed by Andreas Kling. Corrected BoxShape's internal shape-margin/padding bounds FloatRoundedRect initialization. Tests for the padding bounds will be added when the rest of shape-padding for box shapes implementation is ready. Tests: fast/shapes/shape-outside-floats/shape-outside-margin-boxes-001.html fast/shapes/shape-outside-floats/shape-outside-margin-boxes-002.html * rendering/shapes/BoxShape.cpp: Use constructor shape-margin,shape-padding parameters. (WebCore::BoxShape::BoxShape): * rendering/shapes/BoxShape.h: * rendering/shapes/Shape.cpp: (WebCore::createBoxShape): Pass the shape-margin and shape-padding values along to the BoxShape constructor. (WebCore::Shape::createShape): Ditto. 2013-11-26 Nick Diego Yamane Remove unnecessary webaudio include from MediaStreamSource header https://bugs.webkit.org/show_bug.cgi?id=124897 Reviewed by Eric Carlson. AudioDestinationConsumer.h is included but not used anywhere in MediaStreamSource implementation. * platform/mediastream/MediaStreamSource.h: 2013-11-26 Andreas Kling Avoid unnecessary copy-on-write in FillLayer style application. We ended up with a lot of cloned StyleBackgroundData objects on HTML5-8266. This happened because we always forced a copy-on-write when applying background-image:inherit / background-image:initial. This patch adds early returns to both functions. In the "inherit" case, we bail early if the target style already has the same fill layer data as its parent style. In the "initial" case, we optimize for the single-FillLayer case and add an early return if the relevant value is either unset or equal to the templatized initial value. 2.46 MB progression on HTML5-8266 locally. Reviewed by Antti Koivisto. 2013-11-26 Antoine Quint Web Inspector: Allow showing a context menu on all mouse events. https://bugs.webkit.org/show_bug.cgi?id=124747 Reviewed by Joseph Pecoraro. Add a new InspectorFrontendHost::dispatchEventAsContextMenuEvent(Event*) method to let the inspector front-end dispatch a native contextmenu event that will allow for a context menu to be shown from within a non-contextmenu event handler. * inspector/InspectorFrontendHost.cpp: (WebCore::InspectorFrontendHost::dispatchEventAsContextMenuEvent): Check that we're dealing with a mouse event, get the frame for the event target and the event's location to call ContextMenuController::showContextMenuAt() which will handle the new contextmenu event dispatch to the original event target. * inspector/InspectorFrontendHost.h: * inspector/InspectorFrontendHost.idl: 2013-11-25 Sam Weinig Convert some Shape code to use references https://bugs.webkit.org/show_bug.cgi?id=124876 Reviewed by Andreas Kling. * inspector/InspectorOverlay.cpp: * rendering/FloatingObjects.cpp: * rendering/LayoutState.cpp: * rendering/RenderBlock.cpp: * rendering/RenderBlock.h: * rendering/RenderBlockLineLayout.cpp: * rendering/RenderBox.cpp: * rendering/RenderBox.h: * rendering/line/BreakingContextInlineHeaders.h: * rendering/line/LineWidth.cpp: * rendering/shapes/ShapeInfo.cpp: * rendering/shapes/ShapeInfo.h: * rendering/shapes/ShapeInsideInfo.cpp: * rendering/shapes/ShapeInsideInfo.h: * rendering/shapes/ShapeOutsideInfo.cpp: * rendering/shapes/ShapeOutsideInfo.h: Replace yet more pointers with references. 2013-11-25 Simon Pena [EFL] X11Helper::createPixmap doesn't initialise out value handleId https://bugs.webkit.org/show_bug.cgi?id=124722 Reviewed by Gyuyoung Kim. The overloaded functions X11Helper::createPixmap don't initialise out value handleId, and they do early returns on error situations. Since the functions are void and they don't communicate their failure in any way, returning an out value without initialising it could make the error go farther unnoticed. With the variable being initialised, it can be reliably checked for errors when the function returns. * platform/graphics/surfaces/glx/X11Helper.cpp: (WebCore::X11Helper::createPixmap): Initialise handleId to 0. 2013-11-25 Nick Diego Yamane Mark URLRegistry's lookup() as const and its child classes as final https://bugs.webkit.org/show_bug.cgi?id=124865 Reviewed by Eric Carlson. No new tests needed. No behavior changes. * Modules/mediasource/MediaSourceRegistry.cpp: (WebCore::MediaSourceRegistry::lookup): marked as const. * Modules/mediasource/MediaSourceRegistry.h: MediaSourceRegistry marked as final. * Modules/mediastream/MediaStreamRegistry.cpp: (WebCore::MediaStreamRegistry::lookup): marked as const. * Modules/mediastream/MediaStreamRegistry.h: MediaStreamRegistry marked as final. * fileapi/Blob.cpp: * html/URLRegistry.h: lookup() marked as const. (WebCore::URLRegistry::lookup): marked as const. 2013-11-25 Sergio Correia [MediaStream] Use std::unique_ptr instead of OwnPtr/PassOwnPtr https://bugs.webkit.org/show_bug.cgi?id=124858 Reviewed by Eric Carlson. Another step of the OwnPtr/PassOwnPtr => std::unique_ptr conversion, now targeting mediastream-related code. No new tests, covered by existing ones. * Modules/mediastream/RTCDTMFSender.cpp: * Modules/mediastream/RTCDTMFSender.h: * Modules/mediastream/RTCDataChannel.cpp: * Modules/mediastream/RTCDataChannel.h: * Modules/mediastream/RTCPeerConnection.cpp: * Modules/mediastream/RTCPeerConnection.h: * platform/mediastream/MediaStreamSource.cpp: * platform/mediastream/RTCPeerConnectionHandler.cpp: * platform/mediastream/RTCPeerConnectionHandler.h: * platform/mediastream/RTCPeerConnectionHandlerClient.h: * platform/mock/RTCNotifiersMock.cpp: * platform/mock/RTCPeerConnectionHandlerMock.cpp: * platform/mock/RTCPeerConnectionHandlerMock.h: 2013-11-25 Nick Diego Yamane MediaStreamRegistry should store MediaStreams instead of MediaStreamPrivates https://bugs.webkit.org/show_bug.cgi?id=124860 Reviewed by Eric Carlson. MediaStreamRegistry::lookup() should return a MediaStream instead of MediaStreamPrivate. No new tests needed. No behavior changes. * Modules/mediastream/MediaStreamRegistry.cpp: (WebCore::MediaStreamRegistry::registerURL): m_privateStreams -> m_mediaStreams (WebCore::MediaStreamRegistry::unregisterURL): Ditto. (WebCore::MediaStreamRegistry::lookup): Override URLRegistry::lookup() instead of add a new method MediaStream::lookupMediaStreamPrivate(). * Modules/mediastream/MediaStreamRegistry.h: * html/HTMLMediaElement.cpp: (HTMLMediaElement::loadResource): call lookup() instead of lookupMediaStreamPrivate() 2013-11-25 peavo@outlook.com [WinCairo] Compile fails when GSTREAMER is not used. https://bugs.webkit.org/show_bug.cgi?id=124853 Reviewed by Philippe Normand. * platform/graphics/gstreamer/GStreamerUtilities.cpp: Don't include GStreamerUtilities.h when GSTREAMER is not used. 2013-11-25 Andreas Kling Deduplicate shortish Text node strings during tree construction. Let HTMLConstructionSite keep a hash set of already seen strings over its lifetime. Use this to deduplicate the strings inside Text nodes for any string up to 64 characters of length. This optimization already sort-of existed for whitespace-only Texts, but those are laundered in the AtomicString table which we definitely don't want to pollute with every single Text. It might be a good idea to stop using the AtomicString table for all-whitespace Text too. 3.82 MB progression on HTML5-8266 locally. Reviewed by Anders Carlsson. 2013-11-25 Nick Diego Yamane Remove unnecessary MediaStreamTrackDescriptor forward declaration https://bugs.webkit.org/show_bug.cgi?id=124854 Reviewed by Eric Carlson. No new tests needed. No behavior changed. * Modules/mediastream/VideoStreamTrack.h: 2013-11-25 Robert Hogan Remove code now unnecessary after r159575 https://bugs.webkit.org/show_bug.cgi?id=124809 Reviewed by Antti Koivisto. Covered by existing tests fast/block/margin-collapse/self-collapsing-block-with-float* * rendering/line/LineBreaker.cpp: (WebCore::LineBreaker::skipLeadingWhitespace): 2013-11-25 Laszlo Vidacs Vertical border spacing is doubled between table row groups https://bugs.webkit.org/show_bug.cgi?id=20040 Reviewed by Csaba Osztrogonác. Based on Chromium fix https://chromium.googlesource.com/chromium/blink/+/eb615069267f895c59bc576f9d65b3fa5add41e9 Rebaseline needed for table related tests (100+). * rendering/RenderTableSection.cpp: (WebCore::RenderTableSection::calcRowLogicalHeight): 2013-11-25 Andres Gomez [GStreamer] Seeking fails on media content provided by servers not supporting Range requests https://bugs.webkit.org/show_bug.cgi?id=85994 Reviewed by Philippe Normand. Based on the patch written by Andre Moreira Magalhaes. When the GStreamer web source was doing a "Range" request we were expecting to receive a 206 status reply with the "Content-Range" header and just the requested data. Supporting "Range" requests is not mandatory so, for the servers not supporting it they will be replying with a 200 status and the whole content of the media element. Now, we are properly handling these replies too. Test: http/tests/media/media-seeking-no-ranges-server.html * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp: (StreamingClient::handleResponseReceived): Do not fail when receiving 200 as response for HTTP range requests. (StreamingClient::handleDataReceived): Manually seek on stream when receiving the full data after a seek. 2013-11-25 Radu Stavila Removed obsolete FIXME after the landing of visual overflow patch (https://bugs.webkit.org/show_bug.cgi?id=118665). https://bugs.webkit.org/show_bug.cgi?id=124833 Reviewed by Mihnea Ovidenie. * rendering/RenderRegion.cpp: (WebCore::RenderRegion::layoutBlock): 2013-11-18 Sergio Villar Senin [CSS Grid Layout] Cache several vectors to avoid malloc/free churn https://bugs.webkit.org/show_bug.cgi?id=123995 Reviewed by Dean Jackson. From Blink r158228 by Laying-out the grid items means a lot of calls to distributeSpaceToTracks() and resolveContentBasedTrackSizingFunctionsForItems() as they're called in a loop. This means that there is a lot of malloc/free going on there. By moving the vectors used by these methods to a new class which is kept during the whole layout process we save a lot of those calls. This obviously mean that the price we pay for a significant perfomance improvement is that we keep the maximum allocation till the end of each layout, but it's an amount of memory that we have to allocate anyway. The improvement in the auto-grid-lots-of-data.html perf test is ~24% (165 runs/s vs 207 runs/s). No new tests required as we're just refactoring code to a new helper class. Nevertheless the performance improvement is backed by the perf test mentioned above. * rendering/RenderGrid.cpp: (WebCore::RenderGrid::GridSizingData::GridSizingData): (WebCore::RenderGrid::computedUsedBreadthOfGridTracks): (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctions): (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctionsForItems): (WebCore::RenderGrid::distributeSpaceToTracks): (WebCore::RenderGrid::layoutGridItems): (WebCore::RenderGrid::findChildLogicalPosition): * rendering/RenderGrid.h: 2013-11-24 Brady Eidson DatabaseProcess: Add "UniqueIDBDatabase" that multiple WebProcesses can connect to https://bugs.webkit.org/show_bug.cgi?id=124819 Reviewed by Dan Bernstein. * Modules/indexeddb/IDBDatabaseBackend.cpp: (WebCore::IDBDatabaseBackend::~IDBDatabaseBackend): Unregister from the IDBFactory. 2013-11-24 Gyuyoung Kim Generate toHTMLMarquee|OListElement() to cleanup static_cast<> https://bugs.webkit.org/show_bug.cgi?id=124707 Reviewed by Darin Adler. As a step to use toFoo(), we need to generate toHTMLMarquee|OListElement(). Besides this patch cleans up remaining static_cast<> usage. No new tests, no behavior changes. * css/StyleResolver.cpp: (WebCore::StyleResolver::State::initElement): (WebCore::StyleResolver::locateCousinList): (WebCore::StyleResolver::findSiblingForStyleSharing): * dom/Attr.cpp: (WebCore::Attr::style): * dom/Element.cpp: (WebCore::Element::removeAttribute): * editing/ApplyStyleCommand.cpp: (WebCore::ApplyStyleCommand::removeEmbeddingUpToEnclosingBlock): (WebCore::ApplyStyleCommand::pushDownInlineStyleAroundNode): * editing/EditingStyle.cpp: (WebCore::EditingStyle::wrappingStyleForSerialization): * editing/Editor.cpp: (WebCore::Editor::applyEditingStyleToElement): * editing/ReplaceSelectionCommand.cpp: (WebCore::ReplaceSelectionCommand::removeRedundantStylesAndKeepStyleSpanInline): * html/HTMLMarqueeElement.h: * html/HTMLOListElement.h: * html/HTMLTagNames.in: * inspector/InspectorCSSAgent.cpp: (WebCore::InspectorCSSAgent::buildObjectForAttributesStyle): * inspector/InspectorOverlay.cpp: (WebCore::buildObjectForElementInfo): * page/PageSerializer.cpp: (WebCore::PageSerializer::serializeFrame): * rendering/RenderCounter.cpp: (WebCore::planCounter): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::resize): * rendering/RenderListItem.cpp: (WebCore::RenderListItem::calcValue): (WebCore::RenderListItem::updateListMarkerNumbers): * rendering/RenderMarquee.cpp: (WebCore::RenderMarquee::marqueeSpeed): 2013-11-24 Tim Horton REGRESSION (r156291): TileController tiles don't always repaint when they resize https://bugs.webkit.org/show_bug.cgi?id=124796 Reviewed by Simon Fraser. In removing platformCALayerDidCreateTiles, r156291 also removed the call to setNeedsDisplay when tiles are resized, without putting it somewhere else. * platform/graphics/ca/mac/TileController.mm: (WebCore::TileController::setNeedsDisplay): Use hasStaleContent when invalidating a whole tile, just like we do for partial tile repaints. (WebCore::TileController::setTileNeedsDisplayInRect): Mark hasStaleContent for any unparented layers, so they'll be painted when they are reparented. (WebCore::TileController::ensureTilesForRect): Invalidate the whole tile when it changes size. 2013-11-23 Xabier Rodriguez Calvar [GStreamer] Remove 0.10 codepath https://bugs.webkit.org/show_bug.cgi?id=124534 Reviewed by Philippe Normand. All GStreamer ports are using 1.0 now so we remove the 0.10 codepath. * GNUmakefile.list.am: * PlatformEfl.cmake: * PlatformGTK.cmake: * WebCore.vcxproj/WebCore.vcxproj: * WebCore.vcxproj/WebCore.vcxproj.filters: Removed GStreamerVersioning. * platform/audio/gstreamer/AudioDestinationGStreamer.cpp: (onGStreamerWavparsePadAddedCallback): Removed. (WebCore::AudioDestinationGStreamer::AudioDestinationGStreamer): Replaced webkitGstPipelineGetBus and removed 0.10 codepath. (WebCore::AudioDestinationGStreamer::~AudioDestinationGStreamer): Replaced webkitGstPipelineGetBus. * platform/audio/gstreamer/AudioFileReaderGStreamer.cpp: (WebCore::copyGstreamerBuffersToAudioChannel): (WebCore::onAppsinkPullRequiredCallback): Removed 0.10 codepath. (WebCore::AudioFileReader::~AudioFileReader): Replaced webkitGstPipelineGetBus and removed 0.10 codepath. (WebCore::AudioFileReader::handleSample): Left as only codepath. (WebCore::AudioFileReader::handleBuffer): Removed. (WebCore::AudioFileReader::handleNewDeinterleavePad): Removed 0.10 codepath. (WebCore::AudioFileReader::plugDeinterleave): Replaced getGstAudioCaps. (WebCore::AudioFileReader::decodeAudioForBusCreation): Replaced webkitGstPipelineGetBus. (WebCore::AudioFileReader::createBus): Removed 0.10 codepath. * platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp: (getGStreamerMonoAudioCaps): (webKitWebAudioGStreamerChannelPosition): Removed 0.10 codepath. (webkit_web_audio_src_class_init): Replaced setGstElementClassMetadata. (webkit_web_audio_src_init): (webKitWebAudioSrcConstructed): (webKitWebAudioSrcFinalize): (webKitWebAudioSrcLoop): Removed 0.10 codepath. * platform/graphics/gstreamer/AudioTrackPrivateGStreamer.cpp: * platform/graphics/gstreamer/AudioTrackPrivateGStreamer.h: Removed checks for 1.0 as it is the only codepath now. * platform/graphics/gstreamer/GRefPtrGStreamer.cpp: (WTF::GstElement): (WTF::GstPad): (WTF::GstPadTemplate): (WTF::GstTask): (WTF::GstBus): (WTF::GstElementFactory): (WTF::adoptGRef): Replaced gstObjectIsFloating. (WTF::refGRef): Replaced webkitGstObjectRefSink. (WTF::GstTagList): (WTF::GstSample): Removed checks for 1.0 as it is the only codepath now. * platform/graphics/gstreamer/GRefPtrGStreamer.h: Removed checks for 1.0 as it is the only codepath now. * platform/graphics/gstreamer/GStreamerUtilities.cpp: (WebCore::webkitGstGhostPadFromStaticTemplate): (WebCore::getVideoSizeAndFormatFromCaps): (WebCore::createGstBuffer): (WebCore::createGstBufferForData): (WebCore::getGstBufferDataPointer): (WebCore::mapGstBuffer): (WebCore::unmapGstBuffer): Moved here from GstVersioning and added to WebCore namespace. * platform/graphics/gstreamer/GStreamerUtilities.h: (WebCore::webkitGstCheckVersion): Moved here from GstVersioning and added to WebCore namespace. * platform/graphics/gstreamer/GStreamerVersioning.cpp: Removed. * platform/graphics/gstreamer/GStreamerVersioning.h: Removed. * platform/graphics/gstreamer/ImageGStreamer.h: Removed checks for 1.0 as it is the only codepath now. * platform/graphics/gstreamer/ImageGStreamerCairo.cpp: (ImageGStreamer::ImageGStreamer): Removed 0.10 codepath. (ImageGStreamer::~ImageGStreamer): Removed checks for 1.0 as it is the only codepath now. * platform/graphics/gstreamer/InbandMetadataTextTrackPrivateGStreamer.h: * platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.cpp: * platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.h: Removed checks for 1.0 as it is the only codepath now. * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: (WebCore::setAudioStreamPropertiesCallback): Removed 0.10 codepath. (WebCore::mediaPlayerPrivateTextChangedCallback): Removed checks for 1.0 as it is the only codepath now. (WebCore::MediaPlayerPrivateGStreamer::isAvailable): Replaced gPlaybinName. (WebCore::MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer): Removed checks for 1.0 and replaced webkitGstPipelineGetBus. (WebCore::MediaPlayerPrivateGStreamer::duration): Removed 0.10 codepath. (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfVideo): (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfAudio): (WebCore::MediaPlayerPrivateGStreamer::textChanged): Removed checks for 1.0 as it is the only codepath now. (WebCore::MediaPlayerPrivateGStreamer::buffered): Replaced gPercentMax. (WebCore::MediaPlayerPrivateGStreamer::handleMessage): Removed 0.10 codepath. (WebCore::MediaPlayerPrivateGStreamer::processTableOfContents): Removed checks for 1.0 as it is the only codepath now. (WebCore::MediaPlayerPrivateGStreamer::totalBytes): Removed 0.10 codepath. (WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin): Replaced gPlaybinName and webkitGstPipelineGetBus and removed checks for 1.0. * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h: Removed checks for 1.0 as it is the only codepath now. * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp: (WebCore::MediaPlayerPrivateGStreamerBase::naturalSize): (WebCore::MediaPlayerPrivateGStreamerBase::updateTexture): (WebCore::MediaPlayerPrivateGStreamerBase::paint): Removed 0.10 codepath. * platform/graphics/gstreamer/TextCombinerGStreamer.cpp: * platform/graphics/gstreamer/TextCombinerGStreamer.h: * platform/graphics/gstreamer/TextSinkGStreamer.cpp: * platform/graphics/gstreamer/TextSinkGStreamer.h: * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp: * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.h: Removed checks for 1.0 as it is the only codepath now. * platform/graphics/gstreamer/VideoSinkGStreamer.cpp: (webkitVideoSinkRender): Removed 0.10 codepath and added WebCore as createGstBuffer namespace. (webkitVideoSinkSetCaps): Removed 0.10 codepath. (webkitVideoSinkProposeAllocation): Removed checks for 1.0 as it is the only codepath now. (webkitVideoSinkMarshalVoidAndMiniObject): Removed as it was 0.10. (webkit_video_sink_class_init): Removed 0.10 codepath and replaced setGstElementClassMetadata. * platform/graphics/gstreamer/VideoTrackPrivateGStreamer.cpp: * platform/graphics/gstreamer/VideoTrackPrivateGStreamer.h: Removed checks for 1.0 as it is the only codepath now. * platform/graphics/gstreamer/WebKitMediaSourceGStreamer.cpp: (webkit_media_src_class_init): Replaced setGstElementClassMetadata. (webKitMediaSrcAddSrc): Added WebCore namespace to webkitGstGhostPadFromStaticTemplate. (MediaSourceClientGstreamer::didReceiveData): Added WebCore namespace to createGstBufferForData. * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp: Removed 0.10 codepath. (webKitWebSrcQuery): Removed as it was 0.10 only. (void webkit_web_src_class_init): Replaced setGstElementClassMetadata. (webkit_web_src_init): Removed haveAppSrc27 private attribute and 0.10 codepath. (webKitWebSrcStop): Removed checks for 1.0 as it is the only codepath now. (webKitWebSrcSetProperty): (webKitWebSrcUriGetType): (webKitWebSrcGetProtocols): (webKitWebSrcGetUri): (webKitWebSrcSetUri): Removed 0.10 codepath. (StreamingClient::createReadBuffer): Removed checks for 1.0 and replaced getGstBufferSize. (StreamingClient::handleResponseReceived): Removed 0.10 codepath and replaced notifyGstTagsOnPad. (StreamingClient::handleDataReceived): Removed 0.10 codepath and replaced setGstBufferSize and gst_buffer_get_size. 2013-11-22 Jer Noble [Mac] Can't drag full-screen video to another monitor https://bugs.webkit.org/show_bug.cgi?id=124798 Reviewed by Geoffrey Garen. Make full screen windows movable by default. Previously, we wanted non-movable full screen windows since they were in the same space and were just placed atop non-full screen windows. Now that all our supported Mac platforms have explicit full screen support, we can remove this non-movable restriction. * platform/mac/WebCoreFullScreenWindow.mm: (-[WebCoreFullScreenWindow initWithContentRect:styleMask:backing:defer:]): 2013-11-22 Brent Fulgham [Win] Clean up ColorSpace handling in Windows code https://bugs.webkit.org/show_bug.cgi?id=124795 Reviewed by Tim Horton. Functionality covered by existing fast/css/color test suite. * platform/graphics/cg/GraphicsContextCG.cpp: (WebCore::safeRGBColorSpaceRef): Handle case of Windows CG implementation not handling sRGB correctly. (WebCore::sRGBColorSpaceRef): Use new helper function. * platform/graphics/win/FontCGWin.cpp: (WebCore::Font::drawGlyphs): Pass correct color space to fill functions. * platform/graphics/win/GraphicsContextCGWin.cpp: (WebCore::GraphicsContext::platformInit): Initialize color space to value passed via the style to the constructor. 2013-11-22 Alexey Proskuryakov WebCrypto algorithms should check that key algorithm matches https://bugs.webkit.org/show_bug.cgi?id=123628 Reviewed by Anders Carlsson. No change in behavior yet, because we have one algorithm per key class. Will be tested once more algorithms are added. * WebCore.xcodeproj/project.pbxproj: Updated for file renames. * bindings/js/JSCryptoAlgorithmDictionary.cpp: (WebCore::createRsaKeyParamsWithHash): (WebCore::JSCryptoAlgorithmDictionary::createParametersForImportKey): * bindings/js/JSCryptoKeySerializationJWK.cpp: (WebCore::createRSAKeyParametersWithHash): (WebCore::JSCryptoKeySerializationJWK::reconcileAlgorithm): * crypto/CryptoAlgorithmParameters.h: (WebCore::CryptoAlgorithmParameters::ENUM_CLASS): * crypto/parameters/CryptoAlgorithmRsaKeyParamsWithHash.h: Copied from Source/WebCore/crypto/parameters/CryptoAlgorithmRsaSsaKeyParams.h. * crypto/parameters/CryptoAlgorithmRsaSsaKeyParams.h: Removed. Renamed RsaSsaKeyParams to RsaKeyParamsWithHash, because other algorithms (like RSA-OAEP) are in the same boat. Depending on where the spec goes, we might need to introduce algorithm specific RSA parameter classes later, but let's reduce copy/pasted code at least for now. * crypto/CryptoAlgorithmRSASSA_PKCS1_v1_5Mac.cpp: Moved to the correct directory. * crypto/mac/CryptoAlgorithmRSASSA_PKCS1_v1_5Mac.cpp: Copied from Source/WebCore/crypto/CryptoAlgorithmRSASSA_PKCS1_v1_5Mac.cpp. (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::platformSign): Factored out Mac specific code, leaving type casting to cross-platform files. (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::platformVerify): Ditto. * crypto/CryptoAlgorithmRegistry.h: (WebCore::CryptoAlgorithmRegistry::registerAlgorithm): * crypto/mac/CryptoAlgorithmRegistryMac.cpp: (WebCore::CryptoAlgorithmRegistry::platformRegisterAlgorithms): Reduce copy/pasting in registration code. * crypto/algorithms/CryptoAlgorithmAES_CBC.cpp: (WebCore::CryptoAlgorithmAES_CBC::keyAlgorithmMatches): Check key type and algorithm. (WebCore::CryptoAlgorithmAES_CBC::encrypt): Cross platform type casting code. Maybe we'll find a way to autogenerate or eliminate it one day. (WebCore::CryptoAlgorithmAES_CBC::decrypt): Ditto. * crypto/algorithms/CryptoAlgorithmAES_CBC.h: * crypto/algorithms/CryptoAlgorithmHMAC.cpp: (WebCore::CryptoAlgorithmHMAC::keyAlgorithmMatches): (WebCore::CryptoAlgorithmHMAC::sign): (WebCore::CryptoAlgorithmHMAC::verify): * crypto/algorithms/CryptoAlgorithmHMAC.h: * crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp: (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::keyAlgorithmMatches): (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::sign): (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::verify): (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::importKey): * crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.h: * crypto/mac/CryptoAlgorithmAES_CBCMac.cpp: (WebCore::CryptoAlgorithmAES_CBC::platformEncrypt): (WebCore::CryptoAlgorithmAES_CBC::platformDecrypt): * crypto/mac/CryptoAlgorithmHMACMac.cpp: (WebCore::CryptoAlgorithmHMAC::platformSign): (WebCore::CryptoAlgorithmHMAC::platformVerify): Same changes for all algorithms that have keys. 2013-11-22 Brendan Long Fire "change" event on TextTrackList when a TextTrack's mode changes https://bugs.webkit.org/show_bug.cgi?id=124789 Reviewed by Eric Carlson. Since AudioTrackList and VideoTrackList already have this event, the interesting bits are in TrackListBase::scheduleChangeEvent(), and we just need to call it for TextTrackList changes. Test: media/track/track-change-event.html * html/HTMLMediaElement.cpp: (HTMLMediaElement::textTrackModeChanged): Call TrackListBase::scheduleChangeEvent(). * html/track/TextTrackList.idl: Add onchange event listener. 2013-11-22 Brendan Long Add TextTrackList::getTrackById(). https://bugs.webkit.org/show_bug.cgi?id=124785 Reviewed by Eric Carlson. Test: media/track/track-id.html * html/track/TextTrackList.cpp: Add getTrackById() (TextTrackList::getTrackById): * html/track/TextTrackList.h: Same. * html/track/TextTrackList.idl: Same. 2013-11-22 Hans Muller [CSS Shapes] When the value is set, derive radii from border-radius https://bugs.webkit.org/show_bug.cgi?id=124228 Reviewed by Dean Jackson. Add support for BoxShape elliptical corners. Tests: fast/shapes/shape-outside-floats/shape-outside-rounded-boxes-001.html fast/shapes/shape-outside-floats/shape-outside-rounded-boxes-002.html * platform/graphics/FloatRoundedRect.h: (WebCore::FloatRoundedRect::bottomLeftCorner): Corrected a copy-and-pasteO. * rendering/shapes/BoxShape.cpp: (WebCore::BoxShape::getExcludedIntervals): Returned interval now depends on the top and bottom of the line. * rendering/shapes/Shape.cpp: (WebCore::Shape::createShape): Rounded rect parameters are now specified with a RoundedRect parameter. * rendering/shapes/Shape.h: * rendering/shapes/ShapeInfo.cpp: (WebCore::::computedShape): Pass style's rounded border to createShape(). 2013-11-22 Andres Gomez Several missing/incorrect guards for LOG_DISABLED=0 against Release build (Mac) https://bugs.webkit.org/show_bug.cgi?id=78735 Reviewed by Mario Sanchez Prada. In a "Debug" build the CString.h header comes from another indirect dependency. Now, we explicitly add this missing include. * page/CaptionUserPreferencesMediaAF.cpp: Explicitly adding missing include. 2013-11-22 Robert Sipka [curl] Fix of SSL certificate chain storage https://bugs.webkit.org/show_bug.cgi?id=124768 Reviewed by Brent Fulgham. Change the certificates storage type into ListHashSet from HashSet to keep the chain order in each case. This ensures that there is no difference between the stored and the recieved certificate chain. * platform/network/curl/SSLHandle.cpp: (WebCore::allowsAnyHTTPSCertificateHosts): (WebCore::sslIgnoreHTTPSCertificate): (WebCore::pemData): (WebCore::certVerifyCallback): 2013-11-22 Brent Fulgham [Win] Avoid deadlock when interacting with some AVFoundationCF content and https://bugs.webkit.org/show_bug.cgi?id=124752 Prevent deadlock caused by conflict over the "mapLock" mutex. Notification handling in the file, which modify assets and make other changes, are required to happen on the main thread. This patch enforces this requirement. Reviewed by Eric Carlson. * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp: (WebCore::NotificationCallbackData::NotificationCallbackData): Added (WebCore::AVFWrapper::processNotification): Moved logic from 'notificationCallback', which was sometimes happening on a background thread. (WebCore::AVFWrapper::notificationCallback): Dispatch calls to main thread. 2013-11-22 peavo@outlook.com [WinCairo] Compile error when ACCELERATED_COMPOSITING is not used. https://bugs.webkit.org/show_bug.cgi?id=124773 Reviewed by Brent Fulgham. * rendering/RenderView.cpp: (WebCore::RenderView::paintBoxDecorations): Added USE(ACCELERATED_COMPOSITING) guard. 2013-11-18 Sergio Villar Senin [CSS Grid Layout] Improve content-sized track layout https://bugs.webkit.org/show_bug.cgi?id=124408 Reviewed by Dean Jackson. Test: fast/css-grid-layout/grid-item-with-percent-min-max-height-dynamic.html From Blink r156122 & r157633 by Added a couple of optimizations to speed up the layout of content based tracks. The idea is to narrow down the conditions for relayouting when the height of a grid area changes. We basically just need to layout tracks with percentage heights as they're the only ones that change. A new performance test is attached to demonstrate the effect of these optimizations. We get a ~1000% improvement on a i7 M620 going from 14.5 runs/s to 165 runs/s. * rendering/RenderGrid.cpp: (WebCore::RenderGrid::logicalContentHeightForChild): (WebCore::RenderGrid::layoutGridItems): 2013-11-08 Sergio Villar Senin [CSS Grid Layout] Run the content-sized tracks sizing algorithm only when required https://bugs.webkit.org/show_bug.cgi?id=124039 Reviewed by Dean Jackson. The current code runs the content sized track sizing algorithm all the time, which forces a layout even when the track is not content-sized. This change improves the situation by applying two optimizations. In the first one, we bail out the algorithm if we detect that we don't need to run it. And by the second one we reduce the amount of recomputations by only iterating over the content sized tracks instead of all of them. Both changes follow the ideas introduced in Blink r156028 and r156168 by . As we changed the way we iterate over children (we use the GridIterator now) the way they're stored in the RenderGrid changes too. If a item spans through several "cells" inside the grid, we will have a reference to it on each of them. These two changes account for a ~3200% improvement on a i7 M620 in the test that accompanies this change (15.5 vs 520 run/s). New perf test: PerformanceTests/Layout/fixed-grid-lots-of-data.html * rendering/RenderGrid.cpp: (WebCore::RenderGrid::computedUsedBreadthOfGridTracks): Keep track of content sized tracks and only iterate over them. (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctions): (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctionsForItems): Early return if there are no tracks to pass to the algorithm. * rendering/RenderGrid.h: * rendering/style/GridLength.h: (WebCore::GridLength::isContentSized): * rendering/style/GridTrackSize.h: (WebCore::GridTrackSize::isContentSized): 2013-11-22 Manuel Rego Casasnovas [CSS Regions] Move code after early break in RenderRegion::repaintFlowThreadContentRectangle https://bugs.webkit.org/show_bug.cgi?id=124743 Reviewed by Mihnea Ovidenie. No new tests, covered by existing tests. * rendering/RenderRegion.cpp: (WebCore::RenderRegion::repaintFlowThreadContentRectangle): Variable flippedFlowThreadPortionRect is not used before the early break, so we can move it after and save some unneeded operations. 2013-11-22 Manuel Rego Casasnovas [CSS Regions] Use hasOverflowClip() in RenderRegion https://bugs.webkit.org/show_bug.cgi?id=124746 Reviewed by Mihnea Ovidenie. Implement the suggested FIXME in RenderRegion using hasOverflowClip(). No new tests, covered by existing tests. * rendering/RenderRegion.cpp: (WebCore::RenderRegion::overflowRectForFlowThreadPortion): Use hasOverflowClip(). (WebCore::RenderRegion::rectFlowPortionForBox): Ditto. 2013-11-21 Frédéric Wang Map the dir attribute to the CSS direction property. https://bugs.webkit.org/show_bug.cgi?id=124572. Reviewed by Darin Adler. Test: mathml/presentation/mstyle-css-attributes.html * mathml/MathMLElement.cpp: (WebCore::MathMLElement::isPresentationAttribute): reorder attributes (WebCore::MathMLElement::collectStyleForPresentationAttribute): reorder tags that accept dir (WebCore::MathMLElement::isMathMLToken): add an inline function to test that a tag corresponds to a MathML Token Element. * mathml/MathMLElement.h: Follow-up work to address Darin's comments. 2013-11-21 Peter Molnar Remove ENABLE_WORKERS https://bugs.webkit.org/show_bug.cgi?id=105784 Reviewed by Darin Adler. 2013-11-21 Alex Christensen [Win] Unreviewed build fix after r159632. * platform/network/curl/SSLHandle.cpp: (WebCore::certVerifyCallback): Fixed template syntax. 2013-11-21 Bear Travis Web Inspector: [CSS Shapes] Refactor highlighting code to decrease Shapes API surface https://bugs.webkit.org/show_bug.cgi?id=124737 Reviewed by Timothy Hatcher. Add a virtual method to Shapes, buildPath, that can be used to build the path (in the Shape coordinate system) for display in the Inspector. This allows us to remove methods such as type(), polygon(), and logicalRx/Ry() which exposed the inner workings of the Shapes classes. Also covers the addition of the BoxShape type. Refactoring, existing test is inspector-protocol/model/highlight-shape-outside.html. * inspector/InspectorOverlay.cpp: (WebCore::appendPathCommandAndPoints): Points need to be translated from shape space to renderer space using ShapeInfo. (WebCore::buildObjectForShapeOutside): Add the ShapeOutsideInfo to the path info struct. * rendering/shapes/BoxShape.cpp: (WebCore::BoxShape::buildPath): Build the path for a BoxShape. * rendering/shapes/BoxShape.h: * rendering/shapes/PolygonShape.cpp: (WebCore::PolygonShape::buildPath): Build the path for a PolygonShape. * rendering/shapes/PolygonShape.h: * rendering/shapes/RasterShape.h: * rendering/shapes/RectangleShape.cpp: (WebCore::RectangleShape::buildPath): Build the path for a RectangleShape. * rendering/shapes/RectangleShape.h: * rendering/shapes/Shape.h: 2013-11-21 Mark Rowe Stop overriding VALID_ARCHS. All modern versions of Xcode set it appropriately for our needs. Reviewed by Alexey Proskuryakov. * Configurations/Base.xcconfig: 2013-11-21 Gwang Yoon Hwang [GTK] Unreviewed buildfix after r159614 and r159656. * bindings/gobject/WebKitDOMCustom.cpp: Add missing header 2013-11-21 Laszlo Vidacs Fix WinCairo unreachable code warnings in SimpleLineLayout.cpp https://bugs.webkit.org/show_bug.cgi?id=124704 Reviewed by Antti Koivisto. Fix unreachable code warnings using conditional directives. * rendering/SimpleLineLayout.cpp: (WebCore::SimpleLineLayout::canUseFor): 2013-11-21 Mark Rowe Fix an error in a few Xcode configuration setting files. Reviewed by Alexey Proskuryakov. * Configurations/Base.xcconfig: 2013-11-21 Mark Rowe Fix some deprecation warnings. Reviewed by Anders Carlsson. * platform/mac/HTMLConverter.mm: (fileWrapperForURL): Move off a deprecated NSFileWrapper method. 2013-11-21 Daniel Bates [iOS] Build fix; export symbol for WebCore::provideDeviceOrientationTo() Add the symbol __ZN7WebCore26provideDeviceOrientationToEPNS_4PageEPNS_23DeviceOrientationClientE. * WebCore.exp.in: 2013-11-21 Daniel Bates Add !USE(NETWORK_CFDATA_ARRAY_CALLBACK)-guard https://bugs.webkit.org/show_bug.cgi?id=124741 Reviewed by Alexey Proskuryakov. Add !USE(NETWORK_CFDATA_ARRAY_CALLBACK)-guard around code that is unused when building with feature NETWORK_CFDATA_ARRAY_CALLBACK. Additionally, add a declaration for allocateSegment() with attribute WARN_UNUSED_RETURN to have the compiler warn when the return value of this function is unused. Together with warnings treated as errors this change will prevent a memory leak. * platform/SharedBuffer.cpp: 2013-11-21 Daniel Bates Remove unused functions from WebCore and WebKit2 https://bugs.webkit.org/show_bug.cgi?id=124739 Reviewed by Alexey Proskuryakov. * editing/markup.cpp: Remove unused functions isHTMLBlockElement and ancestorToRetainStructureAndAppearanceWithNoRenderer. * rendering/InlineElementBox.cpp: Append newline to the end of the file. 2013-11-21 Daniel Bates Only generate isObservable() when IDL specifies GenerateIsReachable https://bugs.webkit.org/show_bug.cgi?id=124729 Reviewed by Geoffrey Garen. We should only generate the static inline function isObservable() when the IDL specifies GenerateIsReachable. Otherwise, this function is unused. Added a new test IDL TestGenerateIsReachable.idl and expected results to test that we generate isObservable() when an IDL specifies GenerateIsReachable. Additionally, rebased existing test results. * bindings/scripts/CodeGeneratorJS.pm: (GenerateImplementation): * bindings/scripts/test/CPP/WebDOMTestGenerateIsReachable.cpp: Added. * bindings/scripts/test/CPP/WebDOMTestGenerateIsReachable.h: Added. * bindings/scripts/test/GObject/WebKitDOMTestGenerateIsReachable.cpp: Added. * bindings/scripts/test/GObject/WebKitDOMTestGenerateIsReachable.h: Added. * bindings/scripts/test/GObject/WebKitDOMTestGenerateIsReachablePrivate.h: Added. * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp: Removed unused function isObservable(). * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp: Ditto. * bindings/scripts/test/JS/JSTestEventConstructor.cpp: Ditto. * bindings/scripts/test/JS/JSTestEventTarget.cpp: Ditto. * bindings/scripts/test/JS/JSTestException.cpp: Ditto. * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp: Added. * bindings/scripts/test/JS/JSTestGenerateIsReachable.h: Added. * bindings/scripts/test/JS/JSTestInterface.cpp: Removed unused function isObservable(). * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp: Ditto. * bindings/scripts/test/JS/JSTestNamedConstructor.cpp: Ditto. * bindings/scripts/test/JS/JSTestObj.cpp: Ditto. * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp: Ditto. * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp: Ditto. * bindings/scripts/test/JS/JSTestTypedefs.cpp: Ditto. * bindings/scripts/test/JS/JSattribute.cpp: Ditto. * bindings/scripts/test/JS/JSreadonly.cpp: Ditto. * bindings/scripts/test/ObjC/DOMTestGenerateIsReachable.h: Added. * bindings/scripts/test/ObjC/DOMTestGenerateIsReachable.mm: Added. * bindings/scripts/test/ObjC/DOMTestGenerateIsReachableInternal.h: Added. * bindings/scripts/test/TestGenerateIsReachable.idl: Added. 2013-11-21 Beth Dakin Add a new mode to extend the tile cache beyond the page https://bugs.webkit.org/show_bug.cgi?id=124216 Reviewed by Simon Fraser. This patch makes it possible to give the tile cache a margin of tiles. If there is a margin of tiles, this patch paints those tiles with the background color. Note that this patch does not actually give the tile cache a margin at this time. You opt into a margined tiled cache by called setTileMargins() with number of pixels that the margin on that side should be. * platform/graphics/TiledBacking.h: * platform/graphics/ca/mac/TileController.h: * platform/graphics/ca/mac/TileController.mm: (WebCore::TileController::TileController): (WebCore::TileController::tilesWouldChangeForVisibleRect): TileController::bounds() now computes the bounds INCLUDING the margin. (WebCore::TileController::bounds): adjustRectAtTileIndexForMargin() is a new function that is required to get the rect size for tiles in the margin right. rectForTileIndex() assumes all tiles strive to be the size of m_tileSize, but now margin tiles will be whatever the margin sizes were set to. (WebCore::TileController::adjustRectAtTileIndexForMargin): (WebCore::TileController::rectForTileIndex): This is another instance where m_tileSize is not always the right size to use. (WebCore::TileController::getTileIndexRangeForRect): The tile coverage rect now might include the margin tiles. Only include them in slow-scrolling mode if the current position is within one tile of the edge. (WebCore::TileController::computeTileCoverageRect): tileSizeForCoverageRect() does not make sense in a world where the coverage rect will include margin. Instead, this patch implements the current strategy more explicitly by returning the visibleRect in the slow scrolling case, and in the process this patch also re-names tileSizeForCoverageRect() to computeTileSize() since it no longer takes a coverageRect. (WebCore::TileController::computeTileSize): (WebCore::TileController::revalidateTiles): New setters and getters for the tile margins on each side. (WebCore::TileController::setTileMargins): (WebCore::TileController::hasMargins): (WebCore::TileController::topMarginHeight): (WebCore::TileController::bottomMarginHeight): (WebCore::TileController::leftMarginWidth): (WebCore::TileController::rightMarginWidth): New function to add margin onto the composited bounds if there is one. * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::tiledBackingHasMargin): (WebCore::RenderLayerBacking::paintContents): (WebCore::RenderLayerBacking::compositedBoundsIncludingMargin): * rendering/RenderLayerBacking.h: Do not set masks to bounds if there is a margin on the root layer. * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::updateBacking): (WebCore::RenderLayerCompositor::mainFrameBackingIsTiledWithMargin): * rendering/RenderLayerCompositor.h: Allow background color to paint into the margin tiles. * rendering/RenderView.cpp: (WebCore::RenderView::paintBoxDecorations): 2013-11-21 Alexey Proskuryakov Implement WebCrypto wrapKey https://bugs.webkit.org/show_bug.cgi?id=124738 Reviewed by Anders Carlsson. Tests: crypto/subtle/aes-cbc-wrap-rsa-non-extractable.html crypto/subtle/aes-cbc-wrap-rsa.html * bindings/js/JSSubtleCryptoCustom.cpp: (WebCore::exportKey): Factored out the actual operation that can be chained with encryption for wrapKey. (WebCore::JSSubtleCrypto::exportKey): (WebCore::JSSubtleCrypto::wrapKey): (WebCore::JSSubtleCrypto::unwrapKey): Fixed a memory leak in failure code path. * crypto/SubtleCrypto.idl: Added wrapKey. 2013-11-21 Alexey Proskuryakov Implement WebCrypto unwrapKey https://bugs.webkit.org/show_bug.cgi?id=124725 Reviewed by Anders Carlsson. Tests: crypto/subtle/aes-cbc-unwrap-failure.html crypto/subtle/aes-cbc-unwrap-rsa.html * bindings/js/JSCryptoAlgorithmDictionary.cpp: * bindings/js/JSCryptoAlgorithmDictionary.h: Removed calls for wrap/unwrap parameter parsing, these are just the same as encrypt/decrypt. * bindings/js/JSCryptoOperationData.cpp: (WebCore::cryptoOperationDataFromJSValue): * bindings/js/JSCryptoOperationData.h: * crypto/CryptoKeySerialization.h: More Vector elimination. * bindings/js/JSDOMPromise.cpp: * bindings/js/JSDOMPromise.h: Removed unneccessary copy constructor and assignment operator, they are no diffdrent than compiler generated ones. * bindings/js/JSSubtleCryptoCustom.cpp: (WebCore::cryptoKeyUsagesFromJSValue): Minor style fixes. (WebCore::JSSubtleCrypto::encrypt): Ditto. (WebCore::JSSubtleCrypto::decrypt): Ditto. (WebCore::JSSubtleCrypto::sign): Ditto. (WebCore::JSSubtleCrypto::verify): Ditto. (WebCore::JSSubtleCrypto::generateKey): Ditto. (WebCore::importKey): Separated actual import operation and the parts that read arguments from ExecState, and call the promise. Logically, this should be outside of bindings code even, but JWK makes that quite challenging. (WebCore::JSSubtleCrypto::importKey): This only does the more mundane arguments and return parts now. (WebCore::JSSubtleCrypto::exportKey): Minor style fixes. (WebCore::JSSubtleCrypto::unwrapKey): Chain decrypt and import. * crypto/CryptoAlgorithm.cpp: (WebCore::CryptoAlgorithm::encryptForWrapKey): (WebCore::CryptoAlgorithm::decryptForUnwrapKey): * crypto/CryptoAlgorithm.h: There are algorithms that expose wrap/unwrap, but not encrypt/decrypt. These will override these new functions, and leave encrypt/decrypt to raise NOT_SUPPORTED_ERR. * crypto/SubtleCrypto.idl: Added unwrapKey. 2013-11-21 Robert Sipka [curl]Improve ssl certificate storage and check https://bugs.webkit.org/show_bug.cgi?id=124569 Reviewed by Brent Fulgham. Storage and check the whole certificate chain, not just the root certificate. * platform/network/curl/SSLHandle.cpp: (WebCore::allowsAnyHTTPSCertificateHosts): (WebCore::sslIgnoreHTTPSCertificate): (WebCore::pemData): (WebCore::certVerifyCallback): 2013-11-21 Mihai Maerean Fix hover area for divs with css transforms https://bugs.webkit.org/show_bug.cgi?id=124647 Reviewed by Allan Sandfeld Jensen. Non transformed layers are now being hit last, not through or in-between transformed layers. The paint order says that the divs creating stacking contexts (including transforms) are painted after the other siblings so they should be hit tested in the reverse order. Also, a rotated div in a non-rotated parent should be hit in its entire area, not hit its parent's background, even if the z-coordinate is negative where the mouse is located. Test: transforms/3d/hit-testing/hover-rotated-negative-z.html * rendering/RenderLayer.cpp: (WebCore::computeZOffset): 2013-11-21 Andres Gomez [GTK] Release compilation fails when defining "LOG_DISABLED=0" https://bugs.webkit.org/show_bug.cgi?id=124661 Reviewed by Mario Sanchez Prada. In a "Debug" build the CString.h header comes from another indirect dependency. Now, we explicitly add this missing include. * html/HTMLTrackElement.cpp: Explicitly adding missing include. 2013-11-21 Ryosuke Niwa Fix Range.insertNode when the inserted node is in the same container as the Range https://bugs.webkit.org/show_bug.cgi?id=123957 Reviewed by Antti Koivisto. Inspired by https://chromium.googlesource.com/chromium/blink/+/fb6ca1f488703e8d4f20ce6449cc8ea210be6edb When a node from the same container is inserted, we can't simply adjust m_end with the offset. Compute m_start and m_end from the inserted nodes instead. Also, don't adjust m_start and m_end to nodes outside of the document if the inserted nodes had been removed by mutation events. Test: fast/dom/Range/range-insertNode-same-container.html * dom/Range.cpp: (WebCore::Range::insertNode): 2013-11-21 Ryosuke Niwa nextBoundary and previousBoundary are very slow when there is a password field https://bugs.webkit.org/show_bug.cgi?id=123973 Reviewed by Antti Koivisto. Merge https://chromium.googlesource.com/chromium/blink/+/57366eec5e3edea54062d4e74c0e047f8681dbad When iterating through DOM nodes nextBoundary and previousBoundary convert the contents of nodes using text security to a sequence of 'x' characters. The SimplifiedBackwardsTextIterator and TextIterator may iterate past node boundaries. Before this patch, the transformation was done looking at the starting node rather than the current node. In some situations, this replaced all boundaries with 'x' and caused the text iterator to continue iterating and transforming until the extent of the document. Test: editing/deleting/password-delete-performance.html * editing/TextIterator.h: (WebCore::SimplifiedBackwardsTextIterator::node): * editing/VisibleUnits.cpp: (WebCore::previousBoundary): (WebCore::nextBoundary): 2013-11-21 Ryosuke Niwa HTML parser should not associate elements inside templates with forms https://bugs.webkit.org/show_bug.cgi?id=117779 Reviewed by Antti Koivisto. Merge https://chromium.googlesource.com/chromium/blink/+/45aadf7ee7ee010327eb692066cf013315ef3ed7 When parsing