2015-05-27 Myles C. Maxfield [iOS] Arabic ligatures are broken in Google Maps https://bugs.webkit.org/show_bug.cgi?id=145336 Reviewed by Darin Adler. When we fall off the end of the font fallback list, we ask the platform for which particular font we should use to display a particular codepoint. When we do this, we supply the font which is first in the fallback list so that the platform can try to match it as best it can. However, web fonts' FontPlatformData have a null m_font property, which means that we were passing nullptr to this platform fallback function. The solution is something I've wanted to do for a while, which is migrate webfonts from using CGDataProviderCreateWithCFData() to using CTFontManagerCreateFontDescriptorFromData(). This call creates a CoreText font for an in-memory buffer (the old call was creating a CoreGraphics front from the same thing). This means that we can use the FontPlatformData constructor which accepts a CoreText font, thereby making web fonts not have a null m_font property. Note that not all platforms can use this call, which means that this new codepath is gated to only certain OSes (which is okay because only certain OSes use the CTFontCreatePhysicalFontDescriptorForCharactersWithLanguage() call inside FontCache). Because web fonts are the only user of the constructor which just takes a CG font, we can make the constructor private to the FontPlatformData class (as soon as all platforms can use this new codepath). Test: platform/ios-simulator/fast/text/arabic-with-no-supporting-webfont.html * platform/graphics/FontPlatformData.h: Make the FontPlatformData constructor which takes a CGFontRef private. * platform/graphics/mac/FontCustomPlatformData.cpp: (WebCore::FontCustomPlatformData::fontPlatformData): Use the CoreText type instead of the CoreGraphics type. (WebCore::createFontCustomPlatformData): Migrate to CTFontManagerCreateFontDescriptorFromData(). * platform/graphics/mac/FontCustomPlatformData.h: (WebCore::FontCustomPlatformData::FontCustomPlatformData): Store a CTFontDescriptorRef instead of a CGFontRef. 2015-05-26 Said Abou-Hallawa An SVG with no intrinsic size does not draw correct slices when used as a border-image for an HTML element. https://bugs.webkit.org/show_bug.cgi?id=139405 Reviewed by Darin Adler. When using a non-intrinsic-sized image as an image-border, all the source slices have to be extracted from the top-left corner of the source image. This is because the right and bottom sides of the image can not be known. Also all the slices should not be stretched. In other words, the sizes of source slices for a non-intrinsic-sized image should be equal to the sizes of the destination container slices. This is not compliant with the css3 w3c specs. I think the specs makes it harder to predict what exactly will be drawn for the image-border in this case. See http://www.w3.org/TR/css3-background/#border-image-slice. This approach is implemented by FireFox. And I think it gives a more predictable rendering for image-border in the case of non-intrinsic-sized images. Test: fast/borders/border-image-fill-no-intrinsic-size.html * CMakeLists.txt: * WebCore.vcxproj/WebCore.vcxproj: * WebCore.vcxproj/WebCore.vcxproj.filters: * WebCore.xcodeproj/project.pbxproj: * platform/LengthBox.cpp: Removed. * platform/graphics/LayoutBoxExtent.cpp: Removed. * platform/graphics/LayoutBoxExtent.h: Removed. * platform/graphics/LayoutRect.h: Delete LengthBox.cpp and move all the functionalities to LengthBox.h. Delete LayoutBoxExtent.cpp since it is the same class as LengthBox. * css/CSSProperty.cpp: * platform/text/WritingMode.h: Move the enums LogicalBoxSide and PhysicalBoxSide from CSSProperty.cpp to WritingMode.h so it can be used by other classes. * css/CSSToStyleMap.cpp: (WebCore::CSSToStyleMap::mapNinePieceImageSlice): (WebCore::CSSToStyleMap::mapNinePieceImageQuad): * css/CSSToStyleMap.h: * inspector/InspectorOverlay.cpp: (WebCore::buildRendererHighlight): * rendering/InlineFlowBox.cpp: (WebCore::InlineFlowBox::addBorderOutsetVisualOverflow): * rendering/RenderBox.h: (WebCore::RenderBox::marginLogicalLeft): (WebCore::RenderBox::marginLogicalRight): (WebCore::RenderBox::setMarginBefore): (WebCore::RenderBox::setMarginAfter): (WebCore::RenderBox::setMarginStart): (WebCore::RenderBox::setMarginEnd): * rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::setClip): (WebCore::RenderStyle::noneDashboardRegions): * rendering/style/RenderStyle.h: Use the new BoxExtent access methods for getting and settings the sides of LengthBox and LayoutBoxExtent. * platform/LengthBox.h: (WebCore::BoxExtent::BoxExtent): (WebCore::BoxExtent::at): (WebCore::BoxExtent::top): (WebCore::BoxExtent::right): (WebCore::BoxExtent::bottom): (WebCore::BoxExtent::left): (WebCore::BoxExtent::setAt): (WebCore::BoxExtent::setTop): (WebCore::BoxExtent::setRight): (WebCore::BoxExtent::setBottom): (WebCore::BoxExtent::setLeft): (WebCore::BoxExtent::before): (WebCore::BoxExtent::end): (WebCore::BoxExtent::after): (WebCore::BoxExtent::start): (WebCore::BoxExtent::setBefore): (WebCore::BoxExtent::setEnd): (WebCore::BoxExtent::setAfter): (WebCore::BoxExtent::setStart): (WebCore::BoxExtent::operator==): (WebCore::BoxExtent::operator!=): (WebCore::LengthBox::LengthBox): (WebCore::LengthBox::isZero): (WebCore::LengthBox::left): Deleted. (WebCore::LengthBox::right): Deleted. (WebCore::LengthBox::top): Deleted. (WebCore::LengthBox::bottom): Deleted. (WebCore::LengthBox::operator==): Deleted. (WebCore::LengthBox::operator!=): Deleted. (WebCore::LengthBox::nonZero): Deleted. Define a new template class for 'BoxExtent'. A 'BoxExtent' represents the extent of four sides of a box. Use this class template to define the exiting classes 'LengthBox' and 'LayoutBoxExtent'. Use it also to and define the new class FloatBoxExtent * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::calculateImageIntrinsicDimensions): * rendering/RenderBoxModelObject.h: (WebCore::RenderBoxModelObject::calculateFillTileSize): * rendering/RenderListMarker.cpp: (WebCore::RenderListMarker::updateContent): * rendering/shapes/ShapeOutsideInfo.cpp: (WebCore::ShapeOutsideInfo::createShapeForImage): Change the return value of calculateImageIntrinsicDimensions() to be a bool which indicates whether the image has an intrinsic size or not. Add a new reference argument to this function receive the resolved image size. (WebCore::RenderBoxModelObject::paintNinePieceImage): Move all the painting code of this function to NinePieceImage::paint() (WebCore::computeBorderImageSide): Deleted. Renamed to be NinePieceImage::computeSlice(). * rendering/style/BorderData.h: (WebCore::BorderData::borderWidth): Add a new method to return the extents of the border in a FloatBoxExtent. * rendering/style/NinePieceImage.cpp: (WebCore::NinePieceImage::computeSlice): Moved from NinePieceImage::computeSlice(). (WebCore::NinePieceImage::computeSlices): The first version of this function computes the slices given their lengths. The slices have to be clamped to the container size. The second version of this function computes the slices given their lengths, their actual extents and their source slices. (WebCore::NinePieceImage::scaleSlicesIfNeeded): Reduce the slices if they are too large. (WebCore::NinePieceImage::isEmptyPieceRect): Returns true if an ImagePiece should not be drawn. (WebCore::NinePieceImage::horizontalTileRules): (WebCore::NinePieceImage::verticalTileRules): Fill vectors of tiling rules to be passed to GraphicsContext::drawTiledImage() (WebCore::NinePieceImage::computeIntrinsicRects): Computes the nine pieces rectangles for an intrinsic-sized container. (WebCore::NinePieceImage::computeNonIntrinsicRects): Computes the nine pieces rectangles for an non-intrinsic-sized source image. The computed rectangles have to start at (0, 0) and their sizes should be equal to the sizes of the nine pieces rectangles of the destination container. (WebCore::NinePieceImage::computeIntrinsicSideTileScale): (WebCore::NinePieceImage::computeIntrinsicMiddleTileScale): (WebCore::NinePieceImage::computeIntrinsicTileScales): (WebCore::NinePieceImage::computeNonIntrinsicTileScales): Computes the scaling factors for drawing the tiles. For non-intrinsic source images, there should not be any scaling factors. (WebCore::NinePieceImage::paint): Moved from RenderBoxModelObject::paintNinePieceImage() but simplified and restructured. (WebCore::NinePieceImageData::NinePieceImageData): Use nullptr instead of 0. * rendering/style/NinePieceImage.h: (WebCore::operator++): (WebCore::isCornerPiece): (WebCore::isMiddlePiece): (WebCore::imagePieceHorizontalSide): (WebCore::imagePieceVerticalSide): Add helper functions for the enum ImagePiece. 2015-05-26 Andreas Kling doesn't support plus character in font family names. Reviewed by Darin Adler. Turn CSSParser::parseFontFaceValue() into a fast-path parser for attributes. Going through the full CSS parser was hurting us here, as it would misunderstand unquoted family names and choke on e.g '+'. Test: fast/dom/HTMLFontElement/face-attribute.html * css/CSSParser.cpp: (WebCore::CSSParser::parseFontFaceValue): 2015-05-26 Chris Fleizach AX: display:none content exposed to accessibility when aria-hidden is toggled on ancestor element https://bugs.webkit.org/show_bug.cgi?id=139142 Reviewed by Darin Adler. Amend the code that determines when an invisible, but aria-hidden=false, element is exposed to accessibility. The new guideline is that you must have aria-hidden=false on every node that is not rendered (except text which inherits) otherwise the element will not be visible. Modified existing test: accessibility/aria-hidden-false-works-in-subtrees.html * accessibility/AXObjectCache.cpp: (WebCore::isNodeAriaVisible): (WebCore::AXObjectCache::rootWebArea): 2015-05-26 Roger Fong Enable element unsigned index in WebGL2 again. https://bugs.webkit.org/show_bug.cgi?id=145392 . Reviewed by Dean Jackson. * html/canvas/WebGLRenderingContextBase.cpp: (WebCore::WebGLRenderingContextBase::validateDrawElements): Fix some incorrect logic that disables the feature for WebGL2. 2015-05-26 Chris Dumez Add assertions to make sure pages in the PageCache are not loading https://bugs.webkit.org/show_bug.cgi?id=145397 Reviewed by Antti Koivisto. Add assertions to make sure pages in the PageCache are not loading. These will hopefully help track down why PacheCache entries sometimes have pending subresource loads when being destroyed. * history/CachedFrame.cpp: (WebCore::CachedFrame::CachedFrame): * loader/DocumentLoader.cpp: (WebCore::DocumentLoader::stopLoadingSubresources): (WebCore::DocumentLoader::addSubresourceLoader): 2015-05-26 Commit Queue Unreviewed, rolling out r184872. https://bugs.webkit.org/show_bug.cgi?id=145396 Bindings tests broken on the bots. (Requested by dethbakin on #webkit). Reverted changeset: "Binding generator should support interfaces with CustomConstructor and NoInterfaceObject" https://bugs.webkit.org/show_bug.cgi?id=145016 http://trac.webkit.org/changeset/184872 2015-05-26 Zalan Bujtas Overhanging float sets are not cleaned up properly when floating renderer is destroyed. https://bugs.webkit.org/show_bug.cgi?id=145323 rdar://problem/20980628 Reviewed by Dave Hyatt. This patch ensures when an overhanging float renderer is destroyed, all the sibling containers' floating object set(m_floatingObjects) gets properly cleaned up. When an overhanging float is present, we cache the renderer on the parent and on the affected sibling containers too. (RenderBlockFlow::m_floatingObjects) These caches(sets) get cleared and repopulated during ::layout(). In order to have a float renderer removed from a set, a layout needs to be initiated on the container. This is normally done through RenderBlockFlow::markSiblingsWithFloatsForLayout() and RenderBlockFlow::markAllDescendantsWithFloatsForLayout(). However, when the float container's parent's writing direction changes (and we promote the children containers to new formatting contexts), the layout propagation through siblings does not work anymore. The avoidsFloats() check in RenderBlockFlow::markSiblingsWithFloatsForLayout() has very little performance gain, but it prevents us from propagating layout to siblings when certain properties of the parent container changes. Test: fast/block/float/crash-when-floating-object-is-removed.xhtml * rendering/RenderBlockFlow.cpp: (WebCore::RenderBlockFlow::markSiblingsWithFloatsForLayout): * rendering/RenderBox.cpp: (WebCore::outermostBlockContainingFloatingObject): (WebCore::RenderBox::removeFloatingOrPositionedChildFromBlockLists): (WebCore::RenderBox::outermostBlockContainingFloatingObject): Deleted. * rendering/RenderBox.h: 2015-05-26 Ryuan Choi [EFL][CoordinatedGraphics] Remove CoordinatedTileClient and CoordinatedTileBackend https://bugs.webkit.org/show_bug.cgi?id=133337 Reviewed by Darin Adler. This patch simplifies relationship between CoordinatedGraphicsLayer and TiledBackingStore by removing TiledBackingStoreBackend because TiledBackingStore only support CoordinatedTileBackend. And it also moves CoordinatedTileClient interface to TiledBackingStoreClient. * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp: (WebCore::CoordinatedGraphicsLayer::createBackingStore): * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h: * platform/graphics/texmap/coordinated/CoordinatedTile.cpp: (WebCore::CoordinatedTile::create): (WebCore::CoordinatedTile::CoordinatedTile): (WebCore::CoordinatedTile::~CoordinatedTile): (WebCore::CoordinatedTile::updateBackBuffer): (WebCore::CoordinatedTileBackend::CoordinatedTileBackend): Deleted. (WebCore::CoordinatedTileBackend::createTile): Deleted. (WebCore::CoordinatedTileBackend::paintCheckerPattern): Deleted. * platform/graphics/texmap/coordinated/CoordinatedTile.h: (WebCore::CoordinatedTile::create): Deleted. (WebCore::CoordinatedTileClient::~CoordinatedTileClient): Deleted. * platform/graphics/texmap/coordinated/TiledBackingStore.cpp: (WebCore::TiledBackingStore::TiledBackingStore): (WebCore::TiledBackingStore::createTiles): * platform/graphics/texmap/coordinated/TiledBackingStore.h: * platform/graphics/texmap/coordinated/TiledBackingStoreBackend.h: Removed. (WebCore::TiledBackingStoreBackend::~TiledBackingStoreBackend): Deleted. * platform/graphics/texmap/coordinated/TiledBackingStoreClient.h: 2015-05-26 Daegyu Lee Fullscreen video does not display on platforms without accelerated video rendering https://bugs.webkit.org/show_bug.cgi?id=145118 In order to paint video contents in fullscreen mode, add supportsAcceleratedRendering condition. Reviewed by Simon Fraser. * rendering/RenderVideo.cpp: (WebCore::RenderVideo::paintReplaced): 2015-05-26 Said Abou-Hallawa SVG fragment identifier rendering issue https://bugs.webkit.org/show_bug.cgi?id=137328 Reviewed by Darin Adler. This is a follow up for http://trac.webkit.org/changeset/164983. In this changeset, scrolling to the fragment should have been added before the the paint to guarantee setting the proper display position for the SVG fragment. Test: svg/css/svg-resource-fragment-identifier-order.html * svg/graphics/SVGImage.cpp: (WebCore::SVGImage::draw): Move view->scrollToFragment() before calling view->paint(). 2015-05-26 Youenn Fablet Binding generator should support interfaces with CustomConstructor and NoInterfaceObject https://bugs.webkit.org/show_bug.cgi?id=145016 Reviewed by Darin Adler. Updated code generator to generate the necessary declarations (constructor property in the prototype, the constructor class). In the case of CustomConstructor with NoInterfaceObject, the implementation of the constructor property related JS function is changed as follow: It creates a constructor object and shadows the constructor property JS function with this object. This ensures that only one constructor object is created per prototype. The constructor is not exposed as it is not added to the global object constructor map. NoInterfaceObject is asking to not make the interface visible, which is contradictory with having a visible constructor of the interface. The case for having NoInterfaceObject and CustomConstructor is the following: We do not want to expose the interface but we still want to have a constructor property on the prototype of objects implementing the interface. One such case is https://streams.spec.whatwg.org/#globals Added TestCustomConstructorWithNoInterfaceObject.idl to check that case. * bindings/scripts/CodeGeneratorJS.pm: (GenerateHeader): (GenerateAttributesHashTable): (GenerateImplementation): (HasConstructorProperty): * bindings/scripts/test/GObject/WebKitDOMTestCustomConstructorWithNoInterfaceObject.cpp: Added. (WebKit::kit): (WebKit::core): (WebKit::wrapTestCustomConstructorWithNoInterfaceObject): (webkit_dom_test_custom_constructor_with_no_interface_object_finalize): (webkit_dom_test_custom_constructor_with_no_interface_object_constructor): (webkit_dom_test_custom_constructor_with_no_interface_object_class_init): (webkit_dom_test_custom_constructor_with_no_interface_object_init): * bindings/scripts/test/GObject/WebKitDOMTestCustomConstructorWithNoInterfaceObject.h: Added. * bindings/scripts/test/GObject/WebKitDOMTestCustomConstructorWithNoInterfaceObjectPrivate.h: Added. * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp: Added. (WebCore::JSTestCustomConstructorWithNoInterfaceObjectPrototype::create): (WebCore::JSTestCustomConstructorWithNoInterfaceObjectPrototype::createStructure): (WebCore::JSTestCustomConstructorWithNoInterfaceObjectPrototype::JSTestCustomConstructorWithNoInterfaceObjectPrototype): (WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::create): (WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::createStructure): (WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::JSTestCustomConstructorWithNoInterfaceObjectConstructor): (WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::finishCreation): (WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::getConstructData): (WebCore::JSTestCustomConstructorWithNoInterfaceObjectPrototype::finishCreation): (WebCore::JSTestCustomConstructorWithNoInterfaceObject::JSTestCustomConstructorWithNoInterfaceObject): (WebCore::JSTestCustomConstructorWithNoInterfaceObject::createPrototype): (WebCore::JSTestCustomConstructorWithNoInterfaceObject::getPrototype): (WebCore::JSTestCustomConstructorWithNoInterfaceObject::destroy): (WebCore::JSTestCustomConstructorWithNoInterfaceObject::~JSTestCustomConstructorWithNoInterfaceObject): (WebCore::jsTestCustomConstructorWithNoInterfaceObjectConstructor): (WebCore::JSTestCustomConstructorWithNoInterfaceObject::getConstructor): (WebCore::JSTestCustomConstructorWithNoInterfaceObjectOwner::isReachableFromOpaqueRoots): (WebCore::JSTestCustomConstructorWithNoInterfaceObjectOwner::finalize): (WebCore::toJS): (WebCore::JSTestCustomConstructorWithNoInterfaceObject::toWrapped): * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.h: Added. (WebCore::wrapperOwner): (WebCore::toJS): * bindings/scripts/test/ObjC/DOMTestCustomConstructorWithNoInterfaceObject.h: Added. * bindings/scripts/test/ObjC/DOMTestCustomConstructorWithNoInterfaceObject.mm: Added. (-[DOMTestCustomConstructorWithNoInterfaceObject dealloc]): (-[DOMTestCustomConstructorWithNoInterfaceObject finalize]): (core): (kit): * bindings/scripts/test/ObjC/DOMTestCustomConstructorWithNoInterfaceObjectInternal.h: Added. * bindings/scripts/test/TestCustomConstructor.idl: Added. 2015-05-26 Joseph Pecoraro CSS properties (font-synthesis, column-fill) are missing in getComputedStyles https://bugs.webkit.org/show_bug.cgi?id=145343 Reviewed by Timothy Hatcher. * css/CSSComputedStyleDeclaration.cpp: 2015-05-26 Dan Bernstein Update build settings Reviewed by Anders Carlsson. * Configurations/DebugRelease.xcconfig: * Configurations/FeatureDefines.xcconfig: * Configurations/Version.xcconfig: 2015-05-26 Csaba Osztrogonác [ARM] Build SVGPathElement.cpp with -O2 due to a GCC bug https://bugs.webkit.org/show_bug.cgi?id=145377 Reviewed by Carlos Garcia Campos. * CMakeLists.txt: 2015-05-25 Dan Bernstein Fixed a failing bindings test after r184853. * bindings/scripts/CodeGeneratorObjC.pm: (GenerateImplementation): Removed an extraneous semicolon. 2015-05-25 Dan Bernstein ASSERT_MAIN_THREAD and DOM_ASSERT_MAIN_THREAD are unnecessary no-ops https://bugs.webkit.org/show_bug.cgi?id=145372 Reviewed by Sam Weinig. * Configurations/Base.xcconfig: Removed DISABLE_THREAD_CHECK from DEBUG_DEFINES. * bindings/objc/DOMAbstractView.mm: (-[DOMAbstractView dealloc]): Removed use of DOM_ASSERT_MAIN_THREAD. (kit): Ditto. * bindings/objc/ExceptionHandlers.h: Removed definition of DOM_ASSERT_MAIN_THREAD. * bindings/scripts/CodeGeneratorObjC.pm: (GenerateImplementation): Don’t emit DOM_ASSERT_MAIN_THREAD. Updated expected bindings test results: * bindings/scripts/test/ObjC/DOMFloat64Array.mm: * bindings/scripts/test/ObjC/DOMTestActiveDOMObject.mm: * bindings/scripts/test/ObjC/DOMTestCallback.mm: * bindings/scripts/test/ObjC/DOMTestCustomNamedGetter.mm: * bindings/scripts/test/ObjC/DOMTestEventConstructor.mm: * bindings/scripts/test/ObjC/DOMTestEventTarget.mm: * bindings/scripts/test/ObjC/DOMTestException.mm: * bindings/scripts/test/ObjC/DOMTestGenerateIsReachable.mm: * bindings/scripts/test/ObjC/DOMTestInterface.mm: * bindings/scripts/test/ObjC/DOMTestMediaQueryListListener.mm: * bindings/scripts/test/ObjC/DOMTestNamedConstructor.mm: * bindings/scripts/test/ObjC/DOMTestNode.mm: * bindings/scripts/test/ObjC/DOMTestNondeterministic.mm: * bindings/scripts/test/ObjC/DOMTestObj.mm: * bindings/scripts/test/ObjC/DOMTestOverloadedConstructors.mm: * bindings/scripts/test/ObjC/DOMTestSerializedScriptValueInterface.mm: * bindings/scripts/test/ObjC/DOMTestTypedefs.mm: * bindings/scripts/test/ObjC/DOMattribute.mm: * bindings/scripts/test/ObjC/DOMreadonly.mm: 2015-05-25 Hunseop Jeong Replaced 0 with nullptr in WebCore/svg. https://bugs.webkit.org/show_bug.cgi?id=145367 Reviewed by Gyuyoung Kim. No new tests, no behavior changes. * svg/PatternAttributes.h: (WebCore::PatternAttributes::PatternAttributes): * svg/SVGAnimatedType.h: * svg/SVGElement.cpp: (WebCore::SVGElement::cursorElementRemoved): (WebCore::SVGElement::cursorImageValueRemoved): (WebCore::SVGElement::getPresentationAttribute): * svg/SVGException.cpp: (WebCore::SVGException::initializeDescription): * svg/SVGFEImageElement.cpp: (WebCore::SVGFEImageElement::clearResourceReferences): * svg/SVGFontFaceElement.cpp: (WebCore::SVGFontFaceElement::SVGFontFaceElement): (WebCore::SVGFontFaceElement::removedFrom): * svg/SVGFontFaceUriElement.cpp: (WebCore::SVGFontFaceUriElement::loadFont): * svg/SVGLength.h: (WebCore::SVGLength::blend): * svg/SVGPathBlender.cpp: (WebCore::SVGPathBlender::SVGPathBlender): (WebCore::SVGPathBlender::cleanup): * svg/SVGPathBuilder.cpp: (WebCore::SVGPathBuilder::SVGPathBuilder): * svg/SVGPathBuilder.h: * svg/SVGPathByteStreamBuilder.cpp: (WebCore::SVGPathByteStreamBuilder::SVGPathByteStreamBuilder): * svg/SVGPathByteStreamBuilder.h: * svg/SVGPathElement.cpp: (WebCore::SVGPathElement::dPropertyInfo): * svg/SVGPathParser.cpp: (WebCore::SVGPathParser::SVGPathParser): (WebCore::SVGPathParser::cleanup): * svg/SVGPathSegListBuilder.cpp: (WebCore::SVGPathSegListBuilder::SVGPathSegListBuilder): * svg/SVGPathSegListBuilder.h: * svg/SVGPathTraversalStateBuilder.cpp: (WebCore::SVGPathTraversalStateBuilder::SVGPathTraversalStateBuilder): * svg/SVGPathUtilities.cpp: (WebCore::globalSVGPathBuilder): (WebCore::globalSVGPathSegListBuilder): (WebCore::globalSVGPathByteStreamBuilder): (WebCore::globalSVGPathStringBuilder): (WebCore::globalSVGPathTraversalStateBuilder): (WebCore::globalSVGPathParser): (WebCore::globalSVGPathBlender): * svg/SVGPolyElement.cpp: (WebCore::SVGPolyElement::pointsPropertyInfo): * svg/SVGTRefElement.cpp: (WebCore::SVGTRefTargetEventListener::cast): (WebCore::SVGTRefTargetEventListener::SVGTRefTargetEventListener): * svg/SVGTextContentElement.cpp: (WebCore::SVGTextContentElement::textLengthPropertyInfo): * svg/SVGURIReference.h: * svg/SVGViewSpec.cpp: (WebCore::SVGViewSpec::viewBoxPropertyInfo): (WebCore::SVGViewSpec::preserveAspectRatioPropertyInfo): (WebCore::SVGViewSpec::transformPropertyInfo): * svg/SVGViewSpec.h: (WebCore::SVGViewSpec::resetContextElement): * svg/animation/SMILTimeContainer.cpp: (WebCore::SMILTimeContainer::updateAnimations): * svg/animation/SVGSMILElement.cpp: (WebCore::ConditionEventListener::cast): (WebCore::ConditionEventListener::disconnectAnimation): (WebCore::SVGSMILElement::SVGSMILElement): (WebCore::SVGSMILElement::removedFrom): * svg/graphics/SVGImage.cpp: (WebCore::SVGImage::drawForContainer): * svg/graphics/filters/SVGFEImage.cpp: (WebCore::FEImage::FEImage): * svg/graphics/filters/SVGFilterBuilder.cpp: (WebCore::SVGFilterBuilder::clearEffects): * svg/properties/SVGAnimatedPathSegListPropertyTearOff.h: (WebCore::SVGAnimatedPathSegListPropertyTearOff::animationEnded): (WebCore::SVGAnimatedPathSegListPropertyTearOff::SVGAnimatedPathSegListPropertyTearOff): * svg/properties/SVGAnimatedPropertyDescription.h: (WebCore::SVGAnimatedPropertyDescription::SVGAnimatedPropertyDescription): * svg/properties/SVGAnimatedPropertyTearOff.h: (WebCore::SVGAnimatedPropertyTearOff::~SVGAnimatedPropertyTearOff): * svg/properties/SVGAnimatedStaticPropertyTearOff.h: (WebCore::SVGAnimatedStaticPropertyTearOff::animationEnded): (WebCore::SVGAnimatedStaticPropertyTearOff::SVGAnimatedStaticPropertyTearOff): * svg/properties/SVGPropertyTearOff.h: (WebCore::SVGPropertyTearOff::SVGPropertyTearOff): 2015-05-24 Sam Weinig Crash when using a removed ScriptMessageHandler https://bugs.webkit.org/show_bug.cgi?id=145359 Reviewed by Dan Bernstein. Added tests: WKUserContentController.ScriptMessageHandlerBasicRemove WKUserContentController.ScriptMessageHandlerCallRemovedHandler * page/UserMessageHandler.cpp: (WebCore::UserMessageHandler::~UserMessageHandler): (WebCore::UserMessageHandler::postMessage): (WebCore::UserMessageHandler::name): * page/UserMessageHandler.h: (WebCore::UserMessageHandler::create): * page/UserMessageHandler.idl: * page/UserMessageHandlerDescriptor.cpp: (WebCore::UserMessageHandlerDescriptor::UserMessageHandlerDescriptor): * page/UserMessageHandlerDescriptor.h: (WebCore::UserMessageHandlerDescriptor::client): (WebCore::UserMessageHandlerDescriptor::invalidateClient): Add support for invalidating the descriptor and throw an exception if someone tries to post a message using an invalidated descriptor. * page/UserMessageHandlersNamespace.cpp: (WebCore::UserMessageHandlersNamespace::handler): Add logic to remove message handlers if their descriptor has been invalidated. 2015-05-23 Dan Bernstein Remove unused definitions of WEBKIT_VERSION_MIN_REQUIRED https://bugs.webkit.org/show_bug.cgi?id=145345 Reviewed by Sam Weinig. * Configurations/WebCore.xcconfig: Also changed to use $(inherited). 2015-05-24 Hunseop Jeong Use modern for-loops in WebCore/svg. https://bugs.webkit.org/show_bug.cgi?id=145209 Reviewed by Darin Adler. No new tests, no behavior changes. * svg/SVGAnimateElementBase.cpp: (WebCore::propertyTypesAreConsistent): * svg/SVGAnimatedPath.cpp: (WebCore::SVGAnimatedPathAnimator::startAnimValAnimation): * svg/SVGAnimatedTypeAnimator.h: (WebCore::SVGAnimatedTypeAnimator::executeAction): * svg/SVGAnimationElement.cpp: (WebCore::SVGAnimationElement::parseAttribute): * svg/SVGCursorElement.cpp: (WebCore::SVGCursorElement::~SVGCursorElement): * svg/SVGDocumentExtensions.cpp: (WebCore::SVGDocumentExtensions::pauseAnimations): (WebCore::SVGDocumentExtensions::unpauseAnimations): (WebCore::SVGDocumentExtensions::dispatchSVGLoadEventToOutermostSVGElements): (WebCore::SVGDocumentExtensions::isElementWithPendingResources): (WebCore::SVGDocumentExtensions::removeElementFromPendingResources): (WebCore::SVGDocumentExtensions::removeAllTargetReferencesForElement): * svg/SVGElement.cpp: (WebCore::populateAttributeNameToCSSPropertyIDMap): (WebCore::populateAttributeNameToAnimatedPropertyTypeMap): (WebCore::populateCSSPropertyWithSVGDOMNameToAnimatedPropertyTypeMap): (WebCore::hasLoadListener): * svg/SVGFontData.cpp: (WebCore::SVGFontData::applySVGGlyphSelection): * svg/SVGFontElement.cpp: (WebCore::SVGFontElement::registerLigaturesInGlyphCache): (WebCore::SVGKerningMap::insert): (WebCore::stringMatchesUnicodeRange): * svg/SVGPathByteStream.h: (WebCore::SVGPathByteStream::append): * svg/animation/SMILTimeContainer.cpp: (WebCore::SMILTimeContainer::setElapsed): (WebCore::SMILTimeContainer::updateAnimations): * svg/animation/SVGSMILElement.cpp: (WebCore::SVGSMILElement::parseBeginOrEnd): (WebCore::SVGSMILElement::connectConditions): (WebCore::SVGSMILElement::disconnectConditions): (WebCore::SVGSMILElement::notifyDependentsIntervalChanged): (WebCore::SVGSMILElement::createInstanceTimesFromSyncbase): * svg/graphics/filters/SVGFilterBuilder.cpp: (WebCore::SVGFilterBuilder::clearResultsRecursive): * svg/graphics/filters/SVGFilterBuilder.h: (WebCore::SVGFilterBuilder::addBuiltinEffects): * svg/properties/SVGAnimatedProperty.cpp: (WebCore::SVGAnimatedProperty::~SVGAnimatedProperty): * svg/properties/SVGListProperty.h: (WebCore::SVGListProperty::detachListWrappersAndResize): * svg/properties/SVGPathSegListPropertyTearOff.cpp: (WebCore::SVGPathSegListPropertyTearOff::clearContextAndRoles): 2015-05-24 Jeremy Jones Register media MIME types as supported by HTML view in WebKit1. https://bugs.webkit.org/show_bug.cgi?id=145356 Reviewed by Eric Carlson. getSupportedMediaMIMETypes is now used in WebKit1. * platform/MIMETypeRegistry.h: Export getSupportedMediaMIMETypes. 2015-05-23 Antti Koivisto Permanent redirects should have long implicit cache lifetime https://bugs.webkit.org/show_bug.cgi?id=145348 rdar://problem/20680519 Reviewed by Sam Weinig. 301 Moved Permanently response that doesn't specify explicit lifetime should have long implicit lifetime. This matches other browsers. * platform/network/CacheValidation.cpp: (WebCore::computeFreshnessLifetimeForHTTPFamily): Give 301 Moved Permanently (and similarly semantically permanent 410 Gone) long implicit lifetime. (WebCore::updateRedirectChainStatus): 2015-05-23 Myles C. Maxfield Cleanup after r184796 https://bugs.webkit.org/show_bug.cgi?id=145333 Reviewed by Alexey Proskuryakov. No new tests because there is no behavior change. * platform/graphics/cocoa/FontCascadeCocoa.mm: (WebCore::RenderingStyleSaver::RenderingStyleSaver): Deleted. (WebCore::RenderingStyleSaver::~RenderingStyleSaver): Deleted. 2015-05-23 Yusuke Suzuki Introduce UniquedStringImpl and SymbolImpl to separate symbolic strings from AtomicStringImpl https://bugs.webkit.org/show_bug.cgi?id=144848 Reviewed by Darin Adler. Use UniquedStringImpl, SymbolImpl and AtomicStringImpl. * bindings/js/JSDOMWindowCustom.cpp: (WebCore::JSDOMWindow::getOwnPropertySlotByIndex): * bindings/js/SerializedScriptValue.cpp: (WebCore::CloneSerializer::write): 2015-05-23 Zalan Bujtas Simple line layout: Ignore -webkit-flow-*content while collecting text content for innerText. https://bugs.webkit.org/show_bug.cgi?id=145344 rdar://problem/20959522 Reviewed by Antti Koivisto. This patch ensures that when a -webkit-flow-into content is present in a simple line layout container, we skip it while collecting the text content for innerText. It's not always guaranteed that a simple line layout container only contains simple text nodes. In such cases, we need to ensure that text offset computing only takes the simple text nodes into account. Test: fast/text/simple-line-layout-inner-text-with-flow-content.html * editing/TextIterator.cpp: (WebCore::TextIterator::handleTextNode): * editing/TextIterator.h: 2015-05-22 Mark Lam Document::ensurePlugInsInjectedScript() should evaluate the injected script on its own frame. https://bugs.webkit.org/show_bug.cgi?id=145328 Reviewed by Jon Lee. trac.webkit.org/r184329 fixed HTMLPlugInImageElement::didAddUserAgentShadowRoot() to use the document's frame instead of the page's main frame. However, Document::ensurePlugInsInjectedScript() is still evaluating the injected script on the main frame. As a result, HTMLPlugInImageElement::didAddUserAgentShadowRoot()'s attempt to get the injected createOverlay function from the document frame's global object will fail. Fixing Document::ensurePlugInsInjectedScript() to evaluating the injected script on the document's frame fixes the issue. No new tests. * dom/Document.cpp: (WebCore::Document::ensurePlugInsInjectedScript): 2015-05-22 Eric Carlson MediaPlayer doesn't need isPlayingToWirelessPlaybackTarget and isCurrentPlaybackTargetWireless https://bugs.webkit.org/show_bug.cgi?id=145325 Reviewed by Brent Fulgham. * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::webkitCurrentPlaybackTargetIsWireless): Call isCurrentPlaybackTargetWireless directly. (WebCore::HTMLMediaElement::wirelessRoutesAvailableDidChange): Ditto. (WebCore::HTMLMediaElement::isPlayingToWirelessPlaybackTarget): Ditto. (WebCore::HTMLMediaElement::mediaState): Ditto. * html/HTMLMediaSession.cpp: (WebCore::HTMLMediaSession::currentPlaybackTargetIsWireless): Deleted. * html/HTMLMediaSession.h: * platform/graphics/MediaPlayer.cpp: (WebCore::MediaPlayer::isPlayingToWirelessPlaybackTarget): Deleted. * platform/graphics/MediaPlayer.h: * platform/graphics/MediaPlayerPrivate.h: (WebCore::MediaPlayerPrivateInterface::isPlayingToWirelessPlaybackTarget): Deleted. * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h: * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: (WebCore::MediaPlayerPrivateAVFoundationObjC::isPlayingToWirelessPlaybackTarget): Deleted. * platform/ios/WebVideoFullscreenModelVideoElement.mm: (WebVideoFullscreenModelVideoElement::updateForEventName): Call webkitCurrentPlaybackTargetIsWireless. 2015-05-22 Jon Lee Rename MediaPlaybackAllowsInline https://bugs.webkit.org/show_bug.cgi?id=145315 Reviewed by Eric Carlson. Our API uses allowsInlineMediaPlayback. Our symbols should reflect the same. * page/Settings.cpp: Update the static variable name as well as the setting. * page/Settings.in: Ditto. * Modules/mediacontrols/MediaControlsHost.idl: Rename to allowsInlineMediaPlayback. Affects the media controls code. * Modules/mediacontrols/MediaControlsHost.h: * Modules/mediacontrols/MediaControlsHost.cpp: (WebCore::MediaControlsHost::allowsInlineMediaPlayback): (WebCore::MediaControlsHost::mediaPlaybackAllowsInline): Deleted. Update to use the new name in the media controls. * Modules/mediacontrols/mediaControlsApple.js: (Controller.prototype.shouldHaveControls): * Modules/mediacontrols/mediaControlsiOS.js: (ControllerIOS.prototype.shouldHaveStartPlaybackButton): * css/MediaQueryEvaluator.cpp: (WebCore::video_playable_inlineMediaFeatureEval): * html/HTMLMediaSession.cpp: (WebCore::HTMLMediaSession::requiresFullscreenForVideoPlayback): 2015-05-22 Jon Lee Rename MediaPlaybackAllowsAirPlay https://bugs.webkit.org/show_bug.cgi?id=145316 Reviewed by Eric Carlson. In preparation for an API rename, update internal symbols from mediaPlaybackAllowsAirPlay to allowsAirPlayForMediaPlayback. * page/Settings.in: Update the setting name. * html/HTMLMediaSession.cpp: (WebCore::HTMLMediaSession::wirelessVideoPlaybackDisabled): Update the call to settings. * testing/InternalSettings.h: Update the name of the member variable. * testing/InternalSettings.cpp: Update the names and calls to settings. (WebCore::InternalSettings::Backup::Backup): (WebCore::InternalSettings::InternalSettings): (WebCore::InternalSettings::resetToConsistentState): (WebCore::InternalSettings::setWirelessPlaybackDisabled): 2015-05-22 Jon Lee Rename MediaPlaybackRequiresUserGesture https://bugs.webkit.org/show_bug.cgi?id=145314 Reviewed by Anders Carlsson. In preparation for an API rename, update internal symbols from mediaPlaybackRequiresUserGesture to requiresUserGestureForMediaPlayback. * page/Settings.cpp: update static const default variable name. * page/Settings.in: update the setting name and static const default variable name. * Modules/webaudio/AudioContext.cpp: (WebCore::AudioContext::constructCommon): Update settings call. * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::HTMLMediaElement): Ditto. 2015-05-22 Joanmarie Diggs AX: Figure out why list-detection2.html test fails on GTK https://bugs.webkit.org/show_bug.cgi?id=145273 Reviewed by Chris Fleizach. Only consider the text under the pseudo element for GTK and EFL. The other platforms expose rendered text content through their own accessible objects. This will fix the crash on Windows until it can be looked into properly. No new tests. This should stop list-detection2.html to stop crashing on Windows. * accessibility/AccessibilityList.cpp: (WebCore::AccessibilityList::childHasPseudoVisibleListItemMarkers): 2015-05-22 Jer Noble [Mac] Audio tracks tagged as 'describes-video' are not automatically selected when that system accessibility option is set. https://bugs.webkit.org/show_bug.cgi?id=145228 Reviewed by Eric Carlson. Tests: http/tests/media/hls/hls-accessiblity-describes-video.html media/accessiblity-describes-video.html Add support to CaptionUserPreferences to return the user's preferred audio characteristics, including "public.accessibility.describes-video". When the media accessibility options change, trigger the HTMLMediaElement to update the list of tracks, and chose a new audio track if appropriate. Manually filter those tracks matching the requested characteristics in MediaSelectionGroupAVFObjC. Allow these characteristics to be overrided by Internals for testing purposes. * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::captionPreferencesChanged): Call tracksChanged(). (WebCore::HTMLMediaElement::mediaPlayerPreferredAudioCharacteristics): Pass through to the page's caption preferences. * html/HTMLMediaElement.h: * page/CaptionUserPreferences.cpp: (WebCore::CaptionUserPreferences::setPreferredAudioCharacteristic): Simple setter. (WebCore::CaptionUserPreferences::preferredAudioCharacteristics): Simple getter. * page/CaptionUserPreferences.h: * page/CaptionUserPreferencesMediaAF.cpp: (WebCore::CaptionUserPreferencesMediaAF::~CaptionUserPreferencesMediaAF): Unregister for audio characteristics change notifications. (WebCore::CaptionUserPreferencesMediaAF::setInterestedInCaptionPreferenceChanges): Register for same. (WebCore::CaptionUserPreferencesMediaAF::setPreferredAudioCharacteristic): If in testing mode, pass to superclass; otherwise no-op. (WebCore::CaptionUserPreferencesMediaAF::preferredAudioCharacteristics): If in testing mode, pass to superclass; otherwise, ask the media accessibility framework. * page/CaptionUserPreferencesMediaAF.h: * platform/graphics/MediaPlayer.cpp: (WebCore::MediaPlayer::tracksChanged): Pass through to m_private. (WebCore::MediaPlayer::preferredAudioCharacteristics): Pass through to HTMLMediaElement. * platform/graphics/MediaPlayer.h: (WebCore::MediaPlayerClient::mediaPlayerPreferredAudioCharacteristics): Added; return empty vector by default. * platform/graphics/MediaPlayerPrivate.h: (WebCore::MediaPlayerPrivateInterface::tracksChanged): Added; no-op by default. * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h: * platform/graphics/avfoundation/MediaSelectionGroupAVFObjC.h: * platform/graphics/avfoundation/MediaSelectionGroupAVFObjC.mm: (WebCore::MediaSelectionGroupAVFObjC::create): Added characteristics parameter. (WebCore::MediaSelectionGroupAVFObjC::MediaSelectionGroupAVFObjC): Ditto. (WebCore::MediaSelectionGroupAVFObjC::updateOptions): Add an additional filter against the passed-in characteristics. * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h: * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: (WebCore::determineChangedTracksFromNewTracksAndOldItems): Pass the characteristics to the media selection group. (WebCore::MediaPlayerPrivateAVFoundationObjC::updateAudioTracks): Pass in the user's preferred characteristics. (WebCore::MediaPlayerPrivateAVFoundationObjC::updateVideoTracks): Pass in an empty vector. * testing/Internals.cpp: (WebCore::Internals::userPreferredAudioCharacteristics): Added; return the current setting. (WebCore::Internals::setUserPreferredAudioCharacteristic): Added; pass through to CaptionUserPreferences. * testing/Internals.h: * testing/Internals.idl: Add soft link macros which account for a possible failure to look up constants. * platform/cf/MediaAccessibilitySoftLink.cpp: * platform/cf/MediaAccessibilitySoftLink.h: * platform/mac/SoftLinking.h: * platform/win/SoftLinking.h: 2015-05-22 Myles C. Maxfield [Cocoa] Use CTFontDrawGlyphs() instead of CGContextShowGlyphsWithAdvances()/CGContextShowGlyphsAtPositions() https://bugs.webkit.org/show_bug.cgi?id=145234 Reviewed by Enrica Casucci. Eventually, we want to migrate entirely off of text-related CoreGraphics calls and onto CoreText calls (in order to reduce complexity as well as eventually removing the need for FontPlatformData to hold a CGFontRef). There is an equivalent call to CGContextShowGlyphsWithAdvances() and CGContextShowGlyphsAtPositions(), namely, CTFontDrawGlyphs(), which we have found is as performant as its CoreGraphics counterparts. This patch simply migrates these two CG calls to its CT counterpart. Performance was measured on a iPhone 4s as well as a Mid 2010 Mac Pro. No new tests because there is no behavior change. * platform/graphics/cocoa/FontCascadeCocoa.mm: (WebCore::showGlyphsWithAdvances): (WebCore::FontCascade::drawGlyphs): 2015-05-22 Eric Carlson [Mac] Don't show default controls after playing to wireless target https://bugs.webkit.org/show_bug.cgi?id=145317 Reviewed by Dean Jackson. * Modules/mediacontrols/mediaControlsApple.js: (Controller.prototype.handlePanelTransitionEnd): Don't show controls unless the video element has the 'controls' attribute. (Controller.prototype.setPlaying): Check this.video.controls directly because we never want to show controls unless the attribute is present. (Controller.prototype.showControls): Ditto. (Controller.prototype.updateWirelessPlaybackStatus): Call reconnectControls. (Controller.prototype.handleWirelessPlaybackChange): Don't call reconnectControls, it will happen in updateWirelessPlaybackStatus. (Controller.prototype.showInlinePlaybackPlaceholderOnly): Deleted. 2015-05-22 Chris Dumez [CG] Regression(r78652): Partially decoded images are not properly removed from MemoryCache when pruning https://bugs.webkit.org/show_bug.cgi?id=145310 Reviewed by Antti Koivisto. r78652 added partially decoded images to the MemoryCache's list of live decoded resources so that they can be pruned on memory pressure. This was needed because CG decodes part of the image to determine its properties (e.g. its size). On memory pressure, we call BitmapImage::destroyDecodedData() which clears the ImageSource and frees up this extra decoded data. However, we would fail to remove such partially decoded images from the MemoryCache's list of live resources when pruning. This is because BitmapImage::destroyMetadataAndNotify() fails to take into account the decoded properties size when no frame has been cleared. We would thus fail to detect a decoded size change and not call CachedImage::decodedSizeChanged(). As a result, the CachedImage's decoded size is not reset to 0 and we don't remove it from live decoded resources. This patch updates BitmapImage::destroyMetadataAndNotify() to account for m_decodedPropertiesSize even if frameBytesCleared is 0. This way, images for which we have't decoded any frames yet will correctly report that we cleared the decoded data used to determine the image properties and their decoded size will be properly reset to 0. As a result, these will be removed from the MemoryCache's list of live decoded resources. * platform/graphics/BitmapImage.cpp: (WebCore::BitmapImage::destroyDecodedData): (WebCore::BitmapImage::destroyMetadataAndNotify): (WebCore::BitmapImage::dataChanged): * platform/graphics/BitmapImage.h: 2015-05-22 Joseph Pecoraro Web Inspector: Unable to get cursor in new Rule section after creating multiple New Rules https://bugs.webkit.org/show_bug.cgi?id=145294 Reviewed by Timothy Hatcher. * inspector/InspectorStyleSheet.cpp: (WebCore::InspectorStyleSheet::ensureParsedDataReady): Allow stylesheets with mutations for the inspector stylesheet which we control mutations of. 2015-05-22 Eric Carlson [Mac] Device picker menu should be persistent https://bugs.webkit.org/show_bug.cgi?id=145311 Reviewed by Brent Fulgham. * Modules/mediasession/WebMediaSessionManager.cpp: (WebCore::WebMediaSessionManager::addPlaybackTargetPickerClient): Add logging. (WebCore::WebMediaSessionManager::removePlaybackTargetPickerClient): Ditto. (WebCore::WebMediaSessionManager::removeAllPlaybackTargetPickerClients): Ditto. (WebCore::WebMediaSessionManager::showPlaybackTargetPicker): Ditto. (WebCore::WebMediaSessionManager::clientStateDidChange): Ditto. (WebCore::WebMediaSessionManager::externalOutputDeviceAvailableDidChange): Ditto. (WebCore::WebMediaSessionManager::configurePlaybackTargetMonitoring): Ditto. * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::mediaState): Don't set ExternalDeviceAutoPlayCandidate unless there is an event listener. * platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm: (WebCore::MediaPlaybackTargetPickerMac::~MediaPlaybackTargetPickerMac): Release the menu controller and remove observers. (WebCore::MediaPlaybackTargetPickerMac::create): Add logging. (WebCore::MediaPlaybackTargetPickerMac::pendingActionTimerFired): Ditto. (WebCore::MediaPlaybackTargetPickerMac::availableDevicesDidChange): Ditto. (WebCore::MediaPlaybackTargetPickerMac::devicePicker): Ditto. (WebCore::MediaPlaybackTargetPickerMac::showPlaybackTargetPicker): Ditto. (WebCore::MediaPlaybackTargetPickerMac::addPendingAction): Start the timer after a brief pause to debounce multiple identical notifications. (WebCore::MediaPlaybackTargetPickerMac::currentDeviceDidChange): Add logging. (WebCore::MediaPlaybackTargetPickerMac::startingMonitoringPlaybackTargets): Add logging. (WebCore::MediaPlaybackTargetPickerMac::stopMonitoringPlaybackTargets): Don't release the menu controller delegate. (-[WebAVOutputDeviceMenuControllerHelper observeValueForKeyPath:ofObject:change:context:]): Add logging. * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: (WebCore::MediaPlayerPrivateAVFoundationObjC::setWirelessPlaybackTarget): Update logging. (WebCore::MediaPlayerPrivateAVFoundationObjC::setShouldPlayToPlaybackTarget): Ditto. 2015-05-22 Alexey Proskuryakov Build fix. Added a platform ifdef. * platform/network/cf/ResourceRequestCFNet.cpp: (WebCore::ResourceRequest::isUserInitiatedKey): 2015-05-22 Tim Horton Remove action menu support https://bugs.webkit.org/show_bug.cgi?id=145305 Reviewed by Anders Carlsson. * WebCore.xcodeproj/project.pbxproj: * platform/spi/mac/NSMenuSPI.h: * platform/spi/mac/NSViewSPI.h: Removed. Remove some SPI. 2015-05-22 Antti Koivisto MaskImageOperation code does not manage CachedImageClients correctly https://bugs.webkit.org/show_bug.cgi?id=145276 rdar://problem/20959822 * rendering/RenderLayerMaskImageInfo.cpp: (WebCore::RenderLayer::MaskImageInfo::removeMaskImageClients): Followup fix: clear m_maskImageOperations vector. 2015-05-22 Brady Eidson Rework how the ResourceRequest user initiated property key is used. Followup to https://bugs.webkit.org/show_bug.cgi?id=145281 Reviewed by Dan Bernstein. * platform/mac/WebCoreSystemInterface.h: * platform/network/cf/ResourceRequest.h: * platform/network/cf/ResourceRequestCFNet.cpp: (WebCore::ResourceRequest::doUpdatePlatformRequest): (WebCore::ResourceRequest::doUpdateResourceRequest): (WebCore::ResourceRequest::isUserInitiatedKey): * platform/network/cocoa/ResourceRequestCocoa.mm: (WebCore::ResourceRequest::doUpdateResourceRequest): (WebCore::ResourceRequest::doUpdatePlatformRequest): 2015-05-22 Zalan Bujtas Unreviewed build fix for ENABLE(TREE_DEBUGGING) * editing/VisibleSelection.h: * html/parser/HTMLElementStack.h: * html/parser/HTMLFormattingElementList.h: 2015-05-22 Joanmarie Diggs AX: Figure out why list-detection2.html test fails on GTK https://bugs.webkit.org/show_bug.cgi?id=145273 Reviewed by Chris Fleizach. Platforms which expose rendered text content through the parent element "ignore" the child renderers. This was causing AccessibilityList::childHasPseudoVisibleListItemMarker to fail, which in turn caused the list detection heuristic to fail. Therefore add one final check to this method to look for non-empty, non-whitespace text under the ::before pseudo element. No new tests; list-detection2.html now passes on GTK. * accessibility/AccessibilityList.cpp: (WebCore::AccessibilityList::childHasPseudoVisibleListItemMarkers): 2015-05-21 Jer Noble [iOS] Tell AVPlayerLayer when we enter optimized fullscreen mode. https://bugs.webkit.org/show_bug.cgi?id=145289 Reviewed by Eric Carlson. AVFoundation would normally already know that its AVPlayerLayer is in optimized fullscreen mode, but because of the WebProcess/UIProcess split, they need to be told explicitly in the WebProcess when the UIProcess enters optimized fullscreen mode. * html/HTMLMediaElement.h: * html/HTMLVideoElement.cpp: (WebCore::HTMLVideoElement::fullscreenModeChanged): Pass to private(). * platform/graphics/MediaPlayer.cpp: (WebCore::MediaPlayer::setVideoFullscreenMode): Pass to m_private. (WebCore::MediaPlayer::fullscreenMode): Pass to m_client. * platform/graphics/MediaPlayer.h: (WebCore::MediaPlayerClient::mediaPlayerFullscreenMode): Default implementation returns None. * platform/graphics/MediaPlayerPrivate.h: (WebCore::MediaPlayerPrivateInterface::setVideoFullscreenMode): Default implementation is a no-op. * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h: * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerLayer): Get the fullscreen mode from MediaPlayer and tell the AVPlayerLayer if the mode is optimized. (WebCore::MediaPlayerPrivateAVFoundationObjC::setVideoFullscreenMode): Ditto. * platform/spi/mac/AVFoundationSPI.h: 2015-05-21 Joanmarie Diggs AX: [GTK] Implement computedRoleString in AccessibilityUIElement https://bugs.webkit.org/show_bug.cgi?id=128420 Reviewed by Chris Fleizach. Expose all ARIA roles (not just landmark-related roles) via an "xml-roles" AtkObject attribute as per http://www.w3.org/TR/core-aam-1.1/#roleMappingGeneralRules Expose non-empty computed role strings via AtkObject attribute named "computed-role". Currently the computed role and the ARIA role value happen to be the same string, but that might not always be the case. And AtkObject attributes are cheap. Test: platform/gtk/accessibility/xml-roles-exposed.html. * accessibility/atk/WebKitAccessibleWrapperAtk.cpp: (webkitAccessibleGetAttributes): 2015-05-21 Antti Koivisto MaskImageOperation code does not manage CachedImageClients correctly https://bugs.webkit.org/show_bug.cgi?id=145276 rdar://problem/20959822 Reviewed by Andreas Kling. Test: css3/masking/mask-image-client-crash.html * platform/graphics/MaskImageOperation.cpp: (WebCore::MaskImageOperation::isMaskLoaded): (WebCore::MaskImageOperation::setImage): If image changes transfer the clients to the new image. (WebCore::MaskImageOperation::setRenderLayerImageClient): Always use setImage. (WebCore::MaskImageOperation::notifyFinished): * platform/graphics/MaskImageOperation.h: * rendering/RenderLayer.cpp: (WebCore::RenderLayer::calculateClipRects): * rendering/RenderLayer.h: * rendering/RenderLayerMaskImageInfo.cpp: (WebCore::RenderLayer::MaskImageInfo::~MaskImageInfo): (WebCore::RenderLayer::MaskImageInfo::updateMaskImageClients): Store the MaskImageOperations where we added clients. (WebCore::RenderLayer::MaskImageInfo::removeMaskImageClients): Make sure we remove the clients from the same MaskImageOperations we added them to. * rendering/RenderLayerMaskImageInfo.h: 2015-05-21 Daniel Bates Update Autofill button icon https://bugs.webkit.org/show_bug.cgi?id=145191 Reviewed by Jessie Berlin. * css/html.css: (input::-webkit-auto-fill-button): (input::-webkit-auto-fill-button:active): (input::-webkit-auto-fill-button:hover): 2015-05-21 Brady Eidson Add an "initiated by user gesture" flag to ResourceRequest. https://bugs.webkit.org/show_bug.cgi?id=145281 Reviewed by Alex Christensen. Allow WebKit to tell WebCore what the new property key is: * platform/ios/WebCoreSystemInterfaceIOS.mm: * platform/mac/WebCoreSystemInterface.h: * platform/mac/WebCoreSystemInterface.mm: Add the flag to ResourceRequest, and make sure it encodes/decodes: * platform/network/ResourceRequestBase.h: (WebCore::ResourceRequestBase::initiatedByUserGesture): (WebCore::ResourceRequestBase::setInitiatedByUserGesture): (WebCore::ResourceRequestBase::encodeWithoutPlatformData): (WebCore::ResourceRequestBase::decodeWithoutPlatformData): Set/get the property on native CFURLRequestRefs: * platform/network/cf/ResourceRequestCFNet.cpp: (WebCore::ResourceRequest::doUpdatePlatformRequest): (WebCore::ResourceRequest::doUpdateResourceRequest): Set/get the property on native NSURLRequests: * platform/network/cocoa/ResourceRequestCocoa.mm: (WebCore::ResourceRequest::doUpdateResourceRequest): (WebCore::ResourceRequest::doUpdatePlatformRequest): 2015-05-21 Daniel Bates Rollout (https://bugs.webkit.org/show_bug.cgi?id=144657) Revert since pausing the database thread prevents in-progress transactions from completing. We need to think about this change some more. * Modules/webdatabase/AbstractDatabaseServer.h: * Modules/webdatabase/DatabaseManager.cpp: (WebCore::DatabaseManager::setPauseAllDatabases): Deleted. * Modules/webdatabase/DatabaseManager.h: * Modules/webdatabase/DatabaseServer.cpp: (WebCore::DatabaseServer::setPauseAllDatabases): Deleted. * Modules/webdatabase/DatabaseServer.h: 2015-05-21 Jake Nielsen r184718 and r184725 caused four tests to begin crashing Unreviewed rollback. Tests that started crashing: svg/carto.net/textbox.svg svg/custom/tref-clone-crash.html svg/custom/use-animation-in-fill.html svg/custom/use-multiple-on-nested-disallowed-font.html * svg/SVGAnimateElementBase.cpp: (WebCore::propertyTypesAreConsistent): * svg/SVGAnimatedPath.cpp: (WebCore::SVGAnimatedPathAnimator::startAnimValAnimation): * svg/SVGAnimatedTypeAnimator.h: (WebCore::SVGAnimatedTypeAnimator::executeAction): * svg/SVGAnimationElement.cpp: (WebCore::SVGAnimationElement::parseAttribute): * svg/SVGCursorElement.cpp: (WebCore::SVGCursorElement::~SVGCursorElement): (WebCore::SVGCursorElement::isSupportedAttribute): * svg/SVGDocumentExtensions.cpp: (WebCore::SVGDocumentExtensions::pauseAnimations): (WebCore::SVGDocumentExtensions::unpauseAnimations): (WebCore::SVGDocumentExtensions::dispatchSVGLoadEventToOutermostSVGElements): (WebCore::SVGDocumentExtensions::isElementWithPendingResources): (WebCore::SVGDocumentExtensions::removeElementFromPendingResources): (WebCore::SVGDocumentExtensions::removeAllTargetReferencesForElement): (WebCore::SVGDocumentExtensions::rebuildElements): * svg/SVGElement.cpp: (WebCore::populateAttributeNameToCSSPropertyIDMap): (WebCore::populateAttributeNameToAnimatedPropertyTypeMap): (WebCore::attributeNameToAnimatedPropertyTypeMap): (WebCore::populateCSSPropertyWithSVGDOMNameToAnimatedPropertyTypeMap): (WebCore::cssPropertyWithSVGDOMNameToAnimatedPropertyTypeMap): (WebCore::hasLoadListener): * svg/SVGFontData.cpp: (WebCore::SVGFontData::applySVGGlyphSelection): * svg/SVGFontElement.cpp: (WebCore::SVGFontElement::registerLigaturesInGlyphCache): (WebCore::SVGKerningMap::insert): (WebCore::stringMatchesUnicodeRange): * svg/SVGPathByteStream.h: (WebCore::SVGPathByteStream::begin): (WebCore::SVGPathByteStream::end): (WebCore::SVGPathByteStream::append): (WebCore::SVGPathByteStream::clear): (WebCore::SVGPathByteStream::isEmpty): * svg/SVGPathUtilities.cpp: (WebCore::appendSVGPathByteStreamFromSVGPathSeg): * svg/animation/SMILTimeContainer.cpp: (WebCore::SMILTimeContainer::setElapsed): (WebCore::SMILTimeContainer::updateAnimations): * svg/animation/SVGSMILElement.cpp: (WebCore::SVGSMILElement::parseBeginOrEnd): (WebCore::SVGSMILElement::connectConditions): (WebCore::SVGSMILElement::disconnectConditions): (WebCore::SVGSMILElement::notifyDependentsIntervalChanged): (WebCore::SVGSMILElement::createInstanceTimesFromSyncbase): * svg/graphics/filters/SVGFilterBuilder.cpp: (WebCore::SVGFilterBuilder::clearResultsRecursive): * svg/graphics/filters/SVGFilterBuilder.h: (WebCore::SVGFilterBuilder::addBuiltinEffects): * svg/properties/SVGAnimatedProperty.cpp: (WebCore::SVGAnimatedProperty::~SVGAnimatedProperty): * svg/properties/SVGListProperty.h: (WebCore::SVGListProperty::detachListWrappersAndResize): * svg/properties/SVGPathSegListPropertyTearOff.cpp: (WebCore::SVGPathSegListPropertyTearOff::clearContextAndRoles): 2015-05-21 Brent Fulgham Scroll-snap points needs to be updated during programmatic scrolls https://bugs.webkit.org/show_bug.cgi?id=145216 Reviewed by Dean Jackson. Whenever we adjust the current scroll position, make sure we also update the current active scroll snap offset index (if applicable). * platform/ScrollAnimator.cpp: (WebCore::ScrollAnimator::scrollToOffsetWithoutAnimation): Call the new 'updateActiveScrollSnapIndexForOffset' method after moving to a new position. (WebCore::ScrollAnimator::setCurrentPosition): Ditto. (WebCore::ScrollAnimator::updateActiveScrollSnapIndexForOffset): New method. Asks the scroll controller to identify the closest scroll snap offset index. If it finds something relevant, update the ScrollableArea state to track these new values. * platform/ScrollAnimator.h: * platform/cocoa/ScrollController.h: (WebCore::ScrollController::activeScrollSnapIndexDidChange): (WebCore::ScrollController::setScrollSnapIndexDidChange): * platform/cocoa/ScrollController.mm: (WebCore::ScrollController::setNearestScrollSnapIndexForAxisAndOffset): Added. Find the closest relevant scroll snap offset index for the given scroll offset, and update the internal scroll snap state to reflect it. (WebCore::ScrollController::setActiveScrollSnapIndicesForOffset): Given the x and y offset for a scroll, set the relevant scroll snap offset indices. * platform/mac/ScrollAnimatorMac.mm: (WebCore::ScrollAnimatorMac::immediateScrollTo): Call the new 'updateActiveScrollSnapIndexForOffset' method after moving to a new position. (WebCore::ScrollAnimatorMac::immediateScrollBy): Ditto. 2015-05-21 Matt Baker Unreviewed build fix. * svg/SVGAnimateElementBase.cpp: (WebCore::propertyTypesAreConsistent): should be type.properties, not type.properties(). 2015-05-21 Xabier Rodriguez Calvar and Youenn Fablet [Streams API] Remove ReadableStreamReader closed promise internal slot https://bugs.webkit.org/show_bug.cgi?id=145215 Reviewed by Darin Adler. Using the new JSPromiseDeferred member generated by binding generator to handle closed promise attribute. Removed internal slots routines previously used to ensure persistency of the promise. Existing tests cover the changes. * bindings/js/JSReadableStreamReaderCustom.cpp: (WebCore::JSReadableStreamReader::closed): (WebCore::JSReadableStreamReader::cancel): Deleted. (WebCore::JSReadableStreamReader::releaseLock): Deleted. * bindings/js/ReadableJSStream.cpp: (WebCore::getPropertyFromObject): Deleted. (WebCore::callFunction): Deleted. (WebCore::ReadableJSStream::Source::create): Deleted. (WebCore::ReadableJSStream::Source::Source): Deleted. * bindings/js/ReadableJSStream.h: 2015-05-21 Roger Fong Media Controls stop updating after hovering for a few seconds. https://bugs.webkit.org/show_bug.cgi?id=144770. Reviewed by Jer Noble. * Modules/mediacontrols/mediaControlsApple.js: (Controller.prototype.createBase): We should never hide controls immediately as a result of mousing out of the controls. It should only happen when the mouse leaves the video entirely. (Controller.prototype.updateTimelineMetricsIfNeeded): Don’t update if controls are hidden, timeline dimensions will be 0. (Controller.prototype.handlePanelTransitionEnd): Instead of adjusting visibility via adding and removing classes, remove controls entirely from the tree. (Controller.prototype.showControls): Add controls back into the tree when showing controls. (Controller.prototype.updateForShowingControls): Helper method for showControls. (Controller.prototype.controlsAreHidden): Controls also hidden if removed from tree. Remove forceUpdate logic, no longer necessary. (Controller.prototype.handleDurationChange): (Controller.prototype.updateProgress): (Controller.prototype.updateTime): Override methods to use add and remove panelContainer for iOS. * Modules/mediacontrols/mediaControlsiOS.js: (ControllerIOS.prototype.handlePanelTransitionEnd): (ControllerIOS.prototype.showControls): (ControllerIOS.prototype.controlsAreHidden): 2015-05-21 Chris Dumez Regression(r179293): We no longer call destroyDecodedData() on CachedResources on memory pressure https://bugs.webkit.org/show_bug.cgi?id=145270 Reviewed by Andreas Kling. We no longer call destroyDecodedData() on CachedResources on memory pressure after r179293. In r179293, we started calling MemoryCache::evictResources() on memory pressure instead of MemoryCache::pruneToPercentage(0). However, unlike MemoryCache::pruneToPercentage(), it appears MemoryCache::evictResources() removes the CachedResources from the memory cache without calling destroyDecodedData() on them. This caused a regression on Membuster. This patch now calls MemoryCache::pruneLiveResourcesToSize(0) on critical memory pressure, instead of evictResources(). We don't need to call pruneDeadResourcesToSize(0) here because the non-critical memory pressure handler already takes care of this. During local testing, this change seemed to decrease the overall memory usage of WebProcesses by ~10MB on Membuster (tested on Yosemite). * platform/MemoryPressureHandler.cpp: (WebCore::MemoryPressureHandler::releaseNoncriticalMemory): (WebCore::MemoryPressureHandler::releaseCriticalMemory): 2015-05-21 Said Abou-Hallawa SVG as image uses very tiny default font-size https://bugs.webkit.org/show_bug.cgi?id=68090 Reviewed by Darin Adler. When loading a document, WebKit creates a Page object and then changes its setting from the browser's preferences. This is true for interactive resources also, such as a stand-alone SVG or an SVG embedded in an tag for example. For non-interactive resources, like an SVG embedded in an tag for example, this function is called after loading the resource is finished. This function creates an artificial page and fabricates a scoped settings for it. This turns out to be problematic for cases like the default font size because its initial value is zero. We cannot go from WebCore to WebKit to ask for the global settings. But we can inherit the global settings from the the master page. This is not the best solution because of two reasons. (1) Once the resource is cached and the styles for the text elements are calculated, nothing can change the values of styles except removing the resource itself from the cache if the browser's preferences change. Also there is no mechanism to notify this artificial page if the browser's preferences change. (2) An image like a non-interactive SVG, should be displayed the same way regardless of the browser's preferences. A user may be able to change the default font size for other text. But this should not affect images even if they are vector images like SVG. An easy and more agreeable solution is to hard-code the default font size for this case and do not depend on the global settings at all. Test: svg/text/text-default-font-size.html * page/Settings.in: Set the initial value of the setting defaultFontSize to be 16. 2015-05-21 Hunseop Jeong Use modern for-loops in WebCore/svg. https://bugs.webkit.org/show_bug.cgi?id=145209 Reviewed by Darin Adler. No new tests, no new tests. * svg/SVGAnimateElementBase.cpp: (WebCore::propertyTypesAreConsistent): * svg/SVGAnimatedPath.cpp: (WebCore::SVGAnimatedPathAnimator::startAnimValAnimation): * svg/SVGAnimatedTypeAnimator.h: (WebCore::SVGAnimatedTypeAnimator::executeAction): * svg/SVGAnimationElement.cpp: (WebCore::SVGAnimationElement::parseAttribute): * svg/SVGCursorElement.cpp: (WebCore::SVGCursorElement::~SVGCursorElement): * svg/SVGDocumentExtensions.cpp: (WebCore::SVGDocumentExtensions::pauseAnimations): (WebCore::SVGDocumentExtensions::unpauseAnimations): (WebCore::SVGDocumentExtensions::dispatchSVGLoadEventToOutermostSVGElements): (WebCore::SVGDocumentExtensions::isElementWithPendingResources): (WebCore::SVGDocumentExtensions::removeElementFromPendingResources): (WebCore::SVGDocumentExtensions::removeAllTargetReferencesForElement): * svg/SVGElement.cpp: (WebCore::populateAttributeNameToCSSPropertyIDMap): (WebCore::populateAttributeNameToAnimatedPropertyTypeMap): (WebCore::populateCSSPropertyWithSVGDOMNameToAnimatedPropertyTypeMap): (WebCore::hasLoadListener): * svg/SVGFontData.cpp: (WebCore::SVGFontData::applySVGGlyphSelection): * svg/SVGFontElement.cpp: (WebCore::SVGFontElement::registerLigaturesInGlyphCache): (WebCore::SVGKerningMap::insert): (WebCore::stringMatchesUnicodeRange): * svg/SVGPathByteStream.h: (WebCore::SVGPathByteStream::append): * svg/animation/SMILTimeContainer.cpp: (WebCore::SMILTimeContainer::setElapsed): (WebCore::SMILTimeContainer::updateAnimations): * svg/animation/SVGSMILElement.cpp: (WebCore::SVGSMILElement::parseBeginOrEnd): (WebCore::SVGSMILElement::connectConditions): (WebCore::SVGSMILElement::disconnectConditions): (WebCore::SVGSMILElement::notifyDependentsIntervalChanged): (WebCore::SVGSMILElement::createInstanceTimesFromSyncbase): * svg/graphics/filters/SVGFilterBuilder.cpp: (WebCore::SVGFilterBuilder::clearResultsRecursive): * svg/graphics/filters/SVGFilterBuilder.h: (WebCore::SVGFilterBuilder::addBuiltinEffects): * svg/properties/SVGAnimatedProperty.cpp: (WebCore::SVGAnimatedProperty::~SVGAnimatedProperty): * svg/properties/SVGListProperty.h: (WebCore::SVGListProperty::detachListWrappersAndResize): * svg/properties/SVGPathSegListPropertyTearOff.cpp: (WebCore::SVGPathSegListPropertyTearOff::clearContextAndRoles): 2015-05-21 Gyuyoung Kim Purge PassRefPtr in WebCore/Modules https://bugs.webkit.org/show_bug.cgi?id=145112 Reviewed by Darin Adler. As a step to remove PassRefPtr, this patch replaces PassRefPtr with Ref or RefPtr depends on null of return value. No new tests, no behavior changes. * Modules/encryptedmedia/MediaKeySession.cpp: (WebCore::MediaKeySession::create): * Modules/encryptedmedia/MediaKeySession.h: * Modules/encryptedmedia/MediaKeys.cpp: (WebCore::MediaKeys::create): (WebCore::MediaKeys::createSession): * Modules/encryptedmedia/MediaKeys.h: * Modules/gamepad/Gamepad.h: * Modules/gamepad/NavigatorGamepad.cpp: (WebCore::NavigatorGamepad::gamepadFromPlatformGamepad): * Modules/gamepad/deprecated/Gamepad.h: * Modules/geolocation/GeolocationError.h: (WebCore::GeolocationError::create): * Modules/geolocation/GeolocationPosition.h: (WebCore::GeolocationPosition::create): * Modules/geolocation/Geoposition.h: (WebCore::Geoposition::create): * Modules/geolocation/PositionError.h: (WebCore::PositionError::create): * Modules/geolocation/PositionOptions.h: (WebCore::PositionOptions::create): * Modules/mediacontrols/MediaControlsHost.cpp: (WebCore::MediaControlsHost::create): * Modules/mediacontrols/MediaControlsHost.h: * Modules/mediasource/MediaSource.cpp: (WebCore::MediaSource::create): * Modules/mediasource/MediaSource.h: * Modules/mediastream/RTCDataChannel.cpp: (WebCore::RTCDataChannel::create): * Modules/mediastream/RTCDataChannel.h: * Modules/mediastream/RTCIceCandidate.cpp: (WebCore::RTCIceCandidate::create): * Modules/mediastream/RTCIceCandidate.h: * Modules/webaudio/OfflineAudioContext.cpp: (WebCore::OfflineAudioContext::create): * Modules/webaudio/OfflineAudioContext.h: * Modules/webaudio/OfflineAudioDestinationNode.h: (WebCore::OfflineAudioDestinationNode::create): * Modules/webaudio/OscillatorNode.cpp: (WebCore::OscillatorNode::create): * Modules/webaudio/OscillatorNode.h: * Modules/webdatabase/Database.cpp: (WebCore::Database::runTransaction): * Modules/webdatabase/DatabaseTracker.cpp: (WebCore::DatabaseTracker::originLockFor): * Modules/webdatabase/DatabaseTracker.h: * Modules/webdatabase/SQLError.h: (WebCore::SQLError::create): * Modules/webdatabase/SQLResultSet.h: (WebCore::SQLResultSet::create): * Modules/webdatabase/SQLResultSetRowList.h: (WebCore::SQLResultSetRowList::create): * Modules/webdatabase/SQLStatementBackend.cpp: (WebCore::SQLStatementBackend::create): * Modules/webdatabase/SQLStatementBackend.h: * Modules/webdatabase/SQLTransactionBackend.cpp: (WebCore::SQLTransactionBackend::create): * Modules/webdatabase/SQLTransactionBackend.h: * Modules/websockets/ThreadableWebSocketChannelClientWrapper.cpp: (WebCore::ThreadableWebSocketChannelClientWrapper::create): * Modules/websockets/ThreadableWebSocketChannelClientWrapper.h: * Modules/websockets/WebSocket.cpp: (WebCore::WebSocket::create): * Modules/websockets/WebSocket.h: * Modules/websockets/WebSocketChannel.h: (WebCore::WebSocketChannel::create): * Modules/websockets/WorkerThreadableWebSocketChannel.h: (WebCore::WorkerThreadableWebSocketChannel::create): (WebCore::WorkerThreadableWebSocketChannel::Bridge::create): * editing/InsertListCommand.h: (WebCore::InsertListCommand::create): * workers/Worker.cpp: (WebCore::Worker::create): * workers/Worker.h: * xml/XPathExpression.cpp: (WebCore::XPathExpression::createExpression): (WebCore::XPathExpression::evaluate): * xml/XPathExpression.h: 2015-05-20 Commit Queue Unreviewed, rolling out r184667 and r184682. https://bugs.webkit.org/show_bug.cgi?id=145245 Broke media/media-controls-timeline-updates.html on WebKit2 (Requested by ap on #webkit). Reverted changesets: "Media Controls stop updating after hovering for a few seconds." https://bugs.webkit.org/show_bug.cgi?id=144770 http://trac.webkit.org/changeset/184667 "Unreviewed. Media Controls stop updating after hovering for a few seconds." https://bugs.webkit.org/show_bug.cgi?id=144770 http://trac.webkit.org/changeset/184682 2015-05-20 Jon Lee [iOS] Update optimized fullscreen controls artwork https://bugs.webkit.org/show_bug.cgi?id=145208 rdar://problem/21034032 Reviewed by Jer Noble. Update the artwork when media goes into optimized fullscreen. Add a new UI part representing return-from-optimized. * Modules/mediacontrols/MediaControlsHost.cpp: (WebCore::MediaControlsHost::mediaUIImageData): Return data for the return button. * Modules/mediacontrols/MediaControlsHost.idl: Add a new part ID. * Modules/mediacontrols/mediaControlsApple.js: Add a new ClassName to apply to the button when in the proper state. * Modules/mediacontrols/mediaControlsiOS.js: (ControllerIOS.prototype.handlePresentationModeChange): Add the ClassName when the video goes into optimized fullscreen mode. Remove it otherwise. * platform/ios/WebCoreSystemInterfaceIOS.h: * rendering/RenderThemeIOS.mm: (WebCore::RenderThemeIOS::mediaControlsStyleSheet): Add the return button data to the stylesheet. 2015-05-20 Alex Christensen [ContentExtensions] Properly initialize ActionKey.state https://bugs.webkit.org/show_bug.cgi?id=145237 rdar://problem/20716683 Reviewed by Benjamin Poulain. * contentextensions/DFAMinimizer.cpp: Initialize ActionKey.state to Valid if it is a valid ActionKey. Inlining can now be done safely. 2015-05-20 Roger Fong Unreviewed. Media Controls stop updating after hovering for a few seconds. https://bugs.webkit.org/show_bug.cgi?id=144770. Followup to r184667. * Modules/mediacontrols/mediaControlsApple.js: (Controller.prototype.showControls): Only put controls back into the tree if they don’t yet exist in the tree. Otherwise we interrupt operations like scrubbing. 2015-05-20 Enrica Casucci [iOS] Using CSS viewport units causes incorrect layout. https://bugs.webkit.org/show_bug.cgi?id=145225 rdar://problem/20924495 Reviewed by Benjamin Poulain. * page/ViewportConfiguration.cpp: (WebCore::ViewportConfiguration::initialScaleFromSize): (WebCore::ViewportConfiguration::initialScale): (WebCore::ViewportConfiguration::initialScaleIgnoringContentSize): * page/ViewportConfiguration.h: (WebCore::ViewportConfiguration::initialScaleFromSize): (WebCore::ViewportConfiguration::initialScaleIgnoringContentSize): 2015-05-20 Chris Fleizach AX: improve list heuristics (presentational use versus actual lists) https://bugs.webkit.org/show_bug.cgi?id=134187 Reviewed by Darin Adler. Improve heuristics for list detection by: 1. Not exposing lists without list markers (unless explicitly marked as lists) 2. Recognizing css: before-content as list markers Test: accessibility/list-detection2.html * accessibility/AccessibilityList.cpp: (WebCore::AccessibilityList::isDescriptionList): (WebCore::AccessibilityList::childHasPseudoVisibleListItemMarkers): (WebCore::AccessibilityList::determineAccessibilityRole): * accessibility/AccessibilityList.h: 2015-05-20 Antti Koivisto REGRESSION (r172591): Can no longer style with colors (LayoutTests/fast/forms/select/optgroup-rendering.html) https://bugs.webkit.org/show_bug.cgi?id=145227 rdar://problem/20967472 Reviewed by Darin Adler. Test: fast/forms/select/select-painting.html Use computedStyle() consistently for option and optgroup items. * rendering/RenderListBox.cpp: (WebCore::RenderListBox::paintItemForeground): (WebCore::RenderListBox::paintItemBackground): We can always use computedStyle() and it can't be null. If there was renderer style it would return that. * rendering/RenderMenuList.cpp: (RenderMenuList::itemStyle): (RenderMenuList::getItemBackgroundColor): 2015-05-19 Jer Noble Touching HTMLMediaElement.h or MediaPlayer.h causes a world rebuild. https://bugs.webkit.org/show_bug.cgi?id=145193 Reviewed by Eric Carlson. HTMLMediaElement.h and MediaPlayer.h are included in a number of headers solely for access to the enums defined within the classes contained within. Move these enums into their own--otherwise empty--classes. Then add `using` declarations to pull those inherited enums back into the namespace of HTMLMediaElement and MediaPlayer. Classes and headers which do not need to directly include HTMLMediaElement.h can now include HTMLMediaElementEnums.h instead; the same goes for MediaPlayer.h and MediaPlayerEnums.h. * WebCore.xcodeproj/project.pbxproj: Add new files to project. * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::TrackGroup::TrackGroup): Move definition here from the header. * html/HTMLMediaElement.h: (WebCore::HTMLMediaElement::videoFullscreenGravity): MediaPlayer -> MediaPlayerEnums. (WebCore::HTMLMediaElement::preloadValue): Ditto. (WebCore::HTMLMediaElement::TrackGroup::TrackGroup): Deleted; moved to implementation file. * html/HTMLMediaElementEnums.h: Added. * html/MediaControllerInterface.h: Inherit from HTMLMediaElementEnums. * page/ChromeClient.h: HTMLMediaElement -> HTMLMediaElementEnums. * platform/graphics/MediaPlayer.h: MediaPlayer -> MediaPlayerEnums. * platform/graphics/MediaPlayerEnums.h: Added. * platform/ios/WebVideoFullscreenControllerAVKit.h: * platform/ios/WebVideoFullscreenControllerAVKit.mm: (-[WebVideoFullscreenController enterFullscreen:mode:]): HTMLMediaElement -> HTMLMediaElementEnums. * platform/ios/WebVideoFullscreenInterfaceAVKit.h: * platform/ios/WebVideoFullscreenInterfaceAVKit.mm: (WebVideoFullscreenInterfaceAVKit::setupFullscreen): Ditto. (WebVideoFullscreenInterfaceAVKit::setupFullscreenInternal): Ditto. (WebVideoFullscreenInterfaceAVKit::enterFullscreen): Ditto. (WebVideoFullscreenInterfaceAVKit::exitFullscreenInternal): Ditto. (WebVideoFullscreenInterfaceAVKit::cleanupFullscreenInternal): Ditto. (WebVideoFullscreenInterfaceAVKit::requestHideAndExitFullscreen): Ditto. (WebVideoFullscreenInterfaceAVKit::mayAutomaticallyShowVideoOptimized): Ditto. (WebVideoFullscreenInterfaceAVKit::willStartOptimizedFullscreen): Ditto. (WebVideoFullscreenInterfaceAVKit::didStopOptimizedFullscreen): Ditto. (WebVideoFullscreenInterfaceAVKit::didCancelOptimizedFullscreen): Ditto. (WebVideoFullscreenInterfaceAVKit::setMode): Ditto. (WebVideoFullscreenInterfaceAVKit::clearMode): Ditto. * platform/ios/WebVideoFullscreenModel.h: * platform/ios/WebVideoFullscreenModelVideoElement.h: * platform/ios/WebVideoFullscreenModelVideoElement.mm: (WebVideoFullscreenModelVideoElement::setVideoElement): Ditto. (WebVideoFullscreenModelVideoElement::fullscreenModeChanged): Ditto. 2015-05-20 Roger Fong Media Controls stop updating after hovering for a few seconds. https://bugs.webkit.org/show_bug.cgi?id=144770. Reviewed by Jer Noble. * Modules/mediacontrols/mediaControlsApple.js: (Controller.prototype.createBase): We should never hide controls immediately as a result of mousing out of the controls. It should only happen when the mouse leaves the video entirely. (Controller.prototype.updateTimelineMetricsIfNeeded): Don’t update if controls are hidden, timeline dimensions will be 0. (Controller.prototype.handlePanelTransitionEnd): Instead of adjusting visibility via adding and removing classes, remove controls entirely from the tree. (Controller.prototype.showControls): Add controls back into the tree when showing controls. (Controller.prototype.updateForShowingControls): Helper method for showControls. (Controller.prototype.controlsAreHidden): Controls also hidden if removed from tree. Remove forceUpdate logic, no longer necessary. (Controller.prototype.handleDurationChange): (Controller.prototype.updateProgress): (Controller.prototype.updateTime): Override methods to use add and remove panelContainer for iOS. * Modules/mediacontrols/mediaControlsiOS.js: (ControllerIOS.prototype.handlePanelTransitionEnd): (ControllerIOS.prototype.showControls): (ControllerIOS.prototype.controlsAreHidden): 2015-05-20 Eric Carlson [Mac] inform media session of all state changes https://bugs.webkit.org/show_bug.cgi?id=145222 Reviewed by Dean Jackson. * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::~HTMLMediaElement): Call updateMediaState. (WebCore::HTMLMediaElement::mediaPlayerEngineUpdated): Ditto. (WebCore::HTMLMediaElement::mediaPlayerFirstVideoFrameAvailable): Ditto. (WebCore::HTMLMediaElement::removeEventListener): Ditto. (WebCore::HTMLMediaElement::enqueuePlaybackTargetAvailabilityChangedEvent): Ditto. 2015-05-20 Daniel Bates AX: AutoFill button is not accessible with VoiceOver https://bugs.webkit.org/show_bug.cgi?id=145200 Reviewed by Chris Fleizach. Add ARIA label and role attributes to the AutoFill button markup so that VoiceOver can identify and interact with it. Test: accessibility/input-auto-fill-button.html * English.lproj/Localizable.strings: Add placeholder localized string for AutoFill button. * html/TextFieldInputType.cpp: (WebCore::TextFieldInputType::createAutoFillButton): Add ARIA label and role attributes. * platform/LocalizedStrings.cpp: (WebCore::AXAutoFillButtonText): Added; returns the localized string for the AutoFill button. * platform/LocalizedStrings.h: * platform/efl/LocalizedStringsEfl.cpp: (WebCore::AXAutoFillButtonText): Ditto. * platform/gtk/LocalizedStringsGtk.cpp: (WebCore::AXAutoFillButtonText): Ditto. 2015-05-20 Dean Jackson Label text for default buttons don’t have the correct white color https://bugs.webkit.org/show_bug.cgi?id=145221 Follow-up commit. After discussion with the AppKit team, we've concluded that a solid white is the color that best matches the system. * rendering/RenderThemeMac.mm: (WebCore::RenderThemeMac::systemColor): Use Color::white. 2015-05-20 Dean Jackson Label text for default buttons don’t have the correct white color https://bugs.webkit.org/show_bug.cgi?id=145221 Reviewed by Tim Horton. Use a 85% solid white for the active text color on buttons. As has been disappointingly pointed out in other patches, we don't have a good way to test ActiveButtonText since it only applies at paint time. * rendering/RenderThemeMac.mm: (WebCore::RenderThemeMac::systemColor): Move to an 85% solid white. 2015-05-20 Alexey Proskuryakov ThreadableLoaderOptions::isolatedCopy() doesn't produce a copy that is safe for sending to another thread https://bugs.webkit.org/show_bug.cgi?id=145217 Reviewed by Anders Carlsson. Caught by existing tests, rarely. I don't know how to catch such bugs more reliably. * loader/ThreadableLoader.cpp: (WebCore::ThreadableLoaderOptions::isolatedCopy): * loader/ThreadableLoader.h: 2015-05-20 Tim Horton Add a mechanism to opt-out of the automatic scaling applied to not-really-responsive sites https://bugs.webkit.org/show_bug.cgi?id=144760 Reviewed by Darin Adler. Add a new viewport property, shrink-to-fit, which can be used to disable the automatic scaling introduced in r181400. This provides sites with a way to tell WebKit that they're really sure they want to be laid out at window-width/height, even if they fail to fit within that size. * dom/ViewportArguments.cpp: (WebCore::ViewportArguments::resolve): (WebCore::findBooleanValue): (WebCore::setViewportFeature): * dom/ViewportArguments.h: (WebCore::ViewportArguments::ViewportArguments): (WebCore::ViewportArguments::operator==): * page/ViewportConfiguration.cpp: (WebCore::ViewportConfiguration::shouldIgnoreHorizontalScalingConstraints): (WebCore::ViewportConfiguration::shouldIgnoreVerticalScalingConstraints): (WebCore::ViewportConfiguration::webpageParameters): (WebCore::ViewportConfiguration::textDocumentParameters): (WebCore::ViewportConfiguration::imageDocumentParameters): (WebCore::ViewportConfiguration::testingParameters): (WebCore::booleanViewportArgumentIsSet): (WebCore::ViewportConfiguration::updateConfiguration): (WebCore::ViewportConfigurationTextStream::operator<<): (WebCore::viewportArgumentUserZoomIsSet): Deleted. * page/ViewportConfiguration.h: (WebCore::ViewportConfiguration::Parameters::Parameters): Plumb the shrink-to-fit viewport property through. If shrink-to-fit is set to yes, or not set, we behave as usual; if it is set to no, we will bail from shouldIgnore[Horizontal|Vertical]ScalingConstraints, effectively disabling the automatic scaling introduced in r181400. 2015-05-20 Antti Koivisto Assertion failure in WebCore::BidiRun::BidiRun() https://bugs.webkit.org/show_bug.cgi?id=145203 rdar://problem/20958973 Reviewed by Andreas Kling. Test: fast/text/text-combine-crash.html * rendering/line/BreakingContext.h: (WebCore::BreakingContext::handleText): Renove !isCombined() check. RenderCombineText::combineText() doesn't do any work unless needed and text may become uncombined too. * rendering/line/LineBreaker.cpp: (WebCore::LineBreaker::skipLeadingWhitespace): Same here. 2015-05-20 Youenn Fablet AudioContext resume/close/suspend should reject promises with a DOM exception in lieu of throwing exceptions https://bugs.webkit.org/show_bug.cgi?id=145064 Reviewed by Darin Adler. Rejecting resume/suspend/close promises with InvalidStateError values in case context is offline. Removed unneeded calls to postTask for resolving/rejecting promises. Adding promise rejection of DOM Exception values, 0 being equivalent of no error passed to reject callback. Test: webaudio/audiocontext-promise-throwing.html * Modules/webaudio/AudioContext.cpp: (WebCore::AudioContext::suspendContext): Rejecting promise in lieu of throwing exception. (WebCore::AudioContext::resumeContext): Ditto. (WebCore::AudioContext::closeContext): Ditto. * Modules/webaudio/AudioContext.h: * bindings/js/JSAudioContextCustom.cpp: (WebCore::JSAudioContext::suspend): Removing ExceptionCode handling. (WebCore::JSAudioContext::resume): Ditto. (WebCore::JSAudioContext::close): Ditto. * bindings/js/JSDOMBinding.cpp: (WebCore::createDOMException): Splitting DOM exception creation from throwing. (WebCore::setDOMException): Ditto. * bindings/js/JSDOMBinding.h: Adding createDOMException prototype. * bindings/js/JSDOMPromise.h: (WebCore::DeferredWrapper::reject): 2015-05-20 Commit Queue Unreviewed, rolling out r184645. https://bugs.webkit.org/show_bug.cgi?id=145220 Broken build (Requested by jacob_nielsen on #webkit). Reverted changeset: "AX: AutoFill button is not accessible with VoiceOver" https://bugs.webkit.org/show_bug.cgi?id=145200 http://trac.webkit.org/changeset/184645 2015-05-20 Daniel Bates AX: AutoFill button is not accessible with VoiceOver https://bugs.webkit.org/show_bug.cgi?id=145200 Reviewed by Chris Fleizach. Add ARIA label and role attributes to the AutoFill button markup so that VoiceOver can identify and interact with it. Test: accessibility/input-auto-fill-button.html * English.lproj/Localizable.strings: Add placeholder localized string for AutoFill button. * html/TextFieldInputType.cpp: (WebCore::TextFieldInputType::createAutoFillButton): Add ARIA label and role attributes. * platform/LocalizedStrings.cpp: (WebCore::AXAutoFillButtonText): Added; returns the localized string for the AutoFill button. * platform/LocalizedStrings.h: * platform/efl/LocalizedStringsEfl.cpp: (WebCore::AXAutoFillButtonText): Ditto. * platform/gtk/LocalizedStringsGtk.cpp: (WebCore::AXAutoFillButtonText): Ditto. 2015-05-20 Alex Christensen [Content Extensions] Relax restrictions on triggers that match everything. https://bugs.webkit.org/show_bug.cgi?id=145069 Reviewed by Benjamin Poulain. Added API tests that cover the new functionality and test for correctness in behavior. * contentextensions/CompiledContentExtension.cpp: (WebCore::ContentExtensions::CompiledContentExtension::globalDisplayNoneSelectors): * contentextensions/ContentExtensionCompiler.cpp: (WebCore::ContentExtensions::addUniversalActionsToDFA): (WebCore::ContentExtensions::compileRuleList): Put universalActionsWithoutDomains into the DFA from filtersWithoutDomains and put universalActionsWithDomains into the DFA from filtersWithDomains. * contentextensions/ContentExtensionError.cpp: (WebCore::ContentExtensions::contentExtensionErrorCategory): * contentextensions/ContentExtensionError.h: Remove error codes for errors that are not errors any more. * contentextensions/ContentExtensionsBackend.cpp: (WebCore::ContentExtensions::ContentExtensionsBackend::actionsForResourceLoad): * contentextensions/ContentExtensionsBackend.h: * contentextensions/DFABytecode.h: (WebCore::ContentExtensions::instructionSizeWithArguments): * contentextensions/DFABytecodeCompiler.cpp: (WebCore::ContentExtensions::set32Bits): (WebCore::ContentExtensions::DFABytecodeCompiler::emitAppendAction): (WebCore::ContentExtensions::DFABytecodeCompiler::emitJump): (WebCore::ContentExtensions::DFABytecodeCompiler::emitCheckValue): (WebCore::ContentExtensions::DFABytecodeCompiler::emitCheckValueRange): (WebCore::ContentExtensions::DFABytecodeCompiler::compileNode): (WebCore::ContentExtensions::DFABytecodeCompiler::compile): (WebCore::ContentExtensions::DFABytecodeCompiler::emitTestFlagsAndAppendAction): Deleted. * contentextensions/DFABytecodeCompiler.h: * contentextensions/DFABytecodeInterpreter.cpp: (WebCore::ContentExtensions::DFABytecodeInterpreter::interpretAppendAction): (WebCore::ContentExtensions::DFABytecodeInterpreter::interpretTestFlagsAndAppendAction): (WebCore::ContentExtensions::DFABytecodeInterpreter::actionsForDefaultStylesheetFromDFARoot): (WebCore::ContentExtensions::DFABytecodeInterpreter::interpret): (WebCore::ContentExtensions::DFABytecodeInterpreter::actionsFromDFARoot): Deleted. * contentextensions/DFABytecodeInterpreter.h: Add a new bytecode AppendActionDefaultStylesheet to mark actions that are css-display-none that need to be put in the default stylesheet to be ignored or not as a whole. css-display-none actions with flags or domain rules and css-display-none actions after ignore-previous-rules actions are not to be in this precompiled stylesheet, but they will be applied as needed per page. The precompiled stylesheet is already applied if no ignore-previous-rules action is triggered. * loader/ResourceLoadInfo.h: 2015-05-20 Youenn Fablet JS binding generator should create a member variable for each Promise attribute of an interface https://bugs.webkit.org/show_bug.cgi?id=145056 Reviewed by Darin Adler. For each attribute XXX whose type is Promise, a member m_XXXPromiseDeferred is created, its type being a JSC::Strong of JSPromiseDeferred. The purpose is to enable custom getters to create the JSPromiseDeferred and store ino the class member to ensure the same promise is returned each time the custom getter is called. This patch will enable simplifying ReadableStreamReader custom binding. Covered by added attribute in TestObj.idl. * bindings/scripts/CodeGeneratorJS.pm: (GenerateHeader): * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp: (webkit_dom_test_obj_get_property): (webkit_dom_test_obj_class_init): (webkit_dom_test_obj_get_test_promise_attr): (webkit_dom_test_obj_set_nullable_string_value): Deleted. * bindings/scripts/test/GObject/WebKitDOMTestObj.h: * bindings/scripts/test/JS/JSTestObj.cpp: (WebCore::jsTestObjTestPromiseAttr): (WebCore::jsTestObjAttributeWithReservedEnumType): Deleted. * bindings/scripts/test/JS/JSTestObj.h: * bindings/scripts/test/ObjC/DOMTestObj.h: * bindings/scripts/test/ObjC/DOMTestObj.mm: (-[DOMTestObj testPromiseAttr]): (-[DOMTestObj attribute]): Deleted. * bindings/scripts/test/TestObj.idl: 2015-05-20 Youenn Fablet AudioContext suspend/resume/close should resolve promises immediately when state is already suspended/active/closed https://bugs.webkit.org/show_bug.cgi?id=145164 Reviewed by Jer Noble. Test: webaudio/audiocontext-promise.html * Modules/webaudio/AudioContext.cpp: (WebCore::AudioContext::suspendContext): Immediatly call callbacks whenever possible to resolve/reject promises. (WebCore::AudioContext::resumeContext): Ditto. (WebCore::AudioContext::closeContext): Ditto 2015-05-20 Carlos Garcia Campos REGRESSION(r184420): [GTK] webkit_dom_html_element_get_children has been removed https://bugs.webkit.org/show_bug.cgi?id=145174 Reviewed by Philippe Normand. children property has been moved to Element, Document and DocumentFragment to match the spec, so we need to expose the new get_children and bring back webkit_dom_html_element_get_children() as deprecated. * bindings/gobject/WebKitDOMDeprecated.cpp: (webkit_dom_html_element_get_children): * bindings/gobject/WebKitDOMDeprecated.h: * bindings/gobject/WebKitDOMDeprecated.symbols: * bindings/gobject/webkitdom.symbols: 2015-05-20 Hunseop Jeong nullptr cleanup in WebCore/xml. https://bugs.webkit.org/show_bug.cgi?id=145165 Reviewed by Csaba Osztrogonác. No new tests, no behavior changes * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::responseXML): (WebCore::XMLHttpRequest::internalAbort): (WebCore::XMLHttpRequest::clearResponseBuffers): (WebCore::XMLHttpRequest::clearRequest): (WebCore::XMLHttpRequest::didFinishLoading): * xml/XMLHttpRequestProgressEventThrottle.cpp: (WebCore::XMLHttpRequestProgressEventThrottle::flushProgressEvent): * xml/XSLImportRule.cpp: (WebCore::XSLImportRule::XSLImportRule): (WebCore::XSLImportRule::~XSLImportRule): (WebCore::XSLImportRule::setXSLStyleSheet): (WebCore::XSLImportRule::loadSheet): * xml/XSLStyleSheet.h: * xml/XSLStyleSheetLibxslt.cpp: (WebCore::XSLStyleSheet::XSLStyleSheet): (WebCore::XSLStyleSheet::~XSLStyleSheet): (WebCore::XSLStyleSheet::clearDocuments): * xml/XSLTProcessorLibxslt.cpp: (WebCore::saveResultToString): (WebCore::xsltParamArrayFromParameterMap): (WebCore::xmlDocPtrFromNode): (WebCore::XSLTProcessor::transformToString): * xml/parser/XMLDocumentParser.cpp: (WebCore::XMLDocumentParser::clearCurrentNodeStack): (WebCore::XMLDocumentParser::exitText): (WebCore::XMLDocumentParser::notifyFinished): * xml/parser/XMLDocumentParser.h: * xml/parser/XMLDocumentParserLibxml2.cpp: (WebCore::openFunc): (WebCore::XMLDocumentParser::XMLDocumentParser): * xml/parser/XMLDocumentParserScope.cpp: * xml/parser/XMLDocumentParserScope.h: 2015-05-19 Carlos Garcia Campos [SOUP] Network Cache: Implement ShareableResource for Soup and enable it for GTK platform https://bugs.webkit.org/show_bug.cgi?id=144380 Reviewed by Antti Koivisto. Add a soup implementation of SharedBuffer::tryReplaceContentsWithPlatformBuffer(). Covered by http/tests/cache/disk-cache/ tests. * loader/cache/CachedResource.cpp: Define CachedResource::tryReplaceEncodedData() also for Soup. * loader/cache/CachedResource.h: Ditto. * platform/soup/SharedBufferSoup.cpp: (WebCore::SharedBuffer::tryReplaceContentsWithPlatformBuffer): 2015-05-17 Sam Weinig Organize event handlers a bit https://bugs.webkit.org/show_bug.cgi?id=145106 Reviewed by Darin Adler. - Add GlobalEventHandlers.idl (from https://html.spec.whatwg.org/multipage/webappapis.html#globaleventhandlers) and move all event handlers shared by Element, Document and DOMWindow there. Put all the standard defined event handlers at the top (commenting out the ones that aren't implemented yet) and the non-standard ones at the bottom. There is one change in behavior here. Previously, the media related event handlers where only exposed on Element and DOMWindow. The spec says they should also be on Document, so this adds support for that (this is tested in fast/dom/event-handler-attributes.html). - Add WindowEventHandlers.idl (from https://html.spec.whatwg.org/multipage/webappapis.html#windoweventhandlers) and move all event handlers shared by DOMWindow, HTMLBodyElement and HTMLFrameSetElement there. Put all the standard defined event handlers at the top (commenting out the ones that aren't implemented yet) and the non-standard ones at the bottom. - Group remaining event handlers in Element, Document, DOMWindow, HTMLBodyElement and HTMLFrameSetElement by their grouping, and add some FIXMEs for future cleaning. * CMakeLists.txt: * DerivedSources.make: * WebCore.xcodeproj/project.pbxproj: - Add GlobalEventHandlers.idl and WindowEventHandlers.idl. * bindings/scripts/CodeGeneratorJS.pm: (GenerateImplementation): Add special cases for WindowEventHandler when used on DOMWindow and DocumentEventHandler when used on Document so that event handlers using those extended attributes can be set on shared interfaces. This is used to allow DOMWindow to implement WindowEventHandlers. * dom/Document.idl: Move event handlers to GlobalEventHandlers and have Document implement it. Group remaining event handlers. * dom/Element.idl: Move event handlers to GlobalEventHandlers and have Element implement it. Group remaining event handlers. * dom/GlobalEventHandlers.idl: Added. * html/HTMLBodyElement.idl: Move event handlers to WindowEventHandlers and have HTMLBodyElement implement it. Group remaining event handlers. * html/HTMLFrameSetElement.idl: Move event handlers to WindowEventHandlers and have HTMLFrameSetElement implement it. Group remaining event handlers. * page/DOMWindow.idl: Move event handlers to GlobalEventHandlers and WindowEventHandlers and have DOMWindow implement both of them. Group remaining event handlers. * page/WindowEventHandlers.idl: Added. 2015-05-19 Antti Koivisto Crash under WebCore::invalidateStyleRecursively https://bugs.webkit.org/show_bug.cgi?id=145186 rdar://problem/19736838 Reviewed by Andreas Kling We have seen crashes where we run out of stack under invalidateStyleRecursively in StyleInvalidationAnalysis on some devices. Switch to iterative algorithm. * css/StyleInvalidationAnalysis.cpp: (WebCore::StyleInvalidationAnalysis::StyleInvalidationAnalysis): (WebCore::invalidateIfNeeded): (WebCore::invalidateStyleForTree): (WebCore::StyleInvalidationAnalysis::invalidateStyle): (WebCore::invalidateStyleRecursively): Deleted. 2015-05-19 Yusuke Suzuki Move AtomicStringImpl table related operations from AtomicString to AtomicStringImpl https://bugs.webkit.org/show_bug.cgi?id=145109 Reviewed by Darin Adler. * dom/TreeScope.cpp: (WebCore::TreeScope::getElementById): 2015-05-19 Jon Lee [iOS] Optimized fullscreen placeholder is incorrectly sized https://bugs.webkit.org/show_bug.cgi?id=145196 rdar://problem/21031188 Reviewed by Dean Jackson. Add a new media part UI for the placeholder text when entering optimized fullscreen, and use it as part of the title text in the placeholder. Now the wireless playback status div serves as a multi-purpose placeholder. * Modules/mediacontrols/MediaControlsHost.cpp: (WebCore::MediaControlsHost::mediaUIImageData): Return the placeholder text. * Modules/mediacontrols/MediaControlsHost.idl: Add a new UI part for placeholder text. * Modules/mediacontrols/mediaControlsApple.js: Add a new "optimized" ClassName when the presentation mode is set to optimized. * Modules/mediacontrols/mediaControlsiOS.css: (audio::-webkit-media-controls-wireless-playback-status): The text should be at medium weight, not light weight. (audio::-webkit-media-controls-wireless-playback-text-top): The title text should be white for both wireless playback and optimized fullscreen. It matches the style when taking a video fullscreen. Add new CSS rules when the placard is used for optimized fullscreen. (audio::-webkit-media-controls-wireless-playback-status.optimized): Accommodate the size of the graphic, and position appropriately. (audio::-webkit-media-controls-wireless-playback-text-top.optimized): One line is needed, so use this one, and place it where the bottom one is since more room is needed to accommodate the graphic. (audio::-webkit-media-controls-wireless-playback-text-bottom.optimized): One line is needed, so hide this one. * Modules/mediacontrols/mediaControlsiOS.js: (ControllerIOS.prototype.createControls): Several of the container divs are already created in Controller.prototype.createControls(). Fly-by fix to avoid creation of those divs. Only the panelContainer is new for the iOS controls. Fly-by fix of a missing semicolon. (ControllerIOS.prototype.handlePresentationModeChange): When the presentation mode changes do several things: 1- Update the background image. Clear the inline background image when going back to inline or in wireless playback. 2- Add the "optimized" ClassName to the placeholder container, and the two text divs when entering optimized fullscreen. Remove them in other cases. 3- Set -webkit-media-controls-wireless-playback-text-top to the placeholder text. This is better than embedding it inside the graphic. Clear the -bottom text. * platform/ios/WebCoreSystemInterfaceIOS.h: Add a new enum to obtain the placeholder text. 2015-05-19 Ryuan Choi [EFL] Use GSimpleProxyResolver instead of custom SoupProxyResolver https://bugs.webkit.org/show_bug.cgi?id=145154 Reviewed by Gyuyoung Kim. SoupProxyResolver was deprecated since libsoup 2.42. So, this patch refactors the custom SoupProxyResolver to GSimpleProxyResolver which provides same functionality in gio. No new tests, because there is not behavior change. * PlatformEfl.cmake: * WebCore.vcxproj/WebCore.vcxproj: * WebCore.vcxproj/WebCore.vcxproj.filters: * platform/network/soup/ProxyResolverSoup.cpp: Removed. * platform/network/soup/ProxyResolverSoup.h: Removed. * platform/network/soup/SoupNetworkSession.cpp: (WebCore::SoupNetworkSession::setHTTPProxy): Moved to private member. (WebCore::SoupNetworkSession::httpProxy): Deleted because nobody calls it. * platform/network/soup/SoupNetworkSession.h: 2015-05-19 Commit Queue Unreviewed, rolling out r184595. https://bugs.webkit.org/show_bug.cgi?id=145197 Introduced a crash in 15 layout tests on Mavericks on #webkit (Requested by rniwa on #webkit). Reverted changeset: "Media Controls stop updating after hovering for a few seconds." https://bugs.webkit.org/show_bug.cgi?id=144770 http://trac.webkit.org/changeset/184595 2015-05-19 Carlos Alberto Lopez Perez REGRESSION(r181571): Build broken when USE(OPENGL_ES_2) is defined. https://bugs.webkit.org/show_bug.cgi?id=145156 Reviewed by Alex Christensen. No new tests, no behavior changes. Vertex Array Objects are not available in OpenGLESv2. Add guards to avoid using this when building with GLESv2. * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp: (WebCore::GraphicsContext3D::createVertexArray): (WebCore::GraphicsContext3D::deleteVertexArray): (WebCore::GraphicsContext3D::isVertexArray): (WebCore::GraphicsContext3D::bindVertexArray): 2015-05-19 Roger Fong Upper half of volume control should be filled, not hollow. https://bugs.webkit.org/show_bug.cgi?id=145187. Reviewed by Dean Jackson. * Modules/mediacontrols/mediaControlsApple.js: (Controller.prototype.drawVolumeBackground): 2015-05-19 Michael Saboff REGRESSION(183787): JIT is enabled for all builds https://bugs.webkit.org/show_bug.cgi?id=145179 Reviewed by Geoffrey Garen. Eliminated the setting of ENABLE_JIT, as wtf/Platform.h has appropriate logic to set it depending on OS and CPU type. Only changed the way build options are initialized. * Configurations/FeatureDefines.xcconfig: 2015-05-19 Chris Dumez [Mac] Font lookups are flakey due to caching https://bugs.webkit.org/show_bug.cgi?id=145180 Reviewed by Darin Adler. Font lookups were flakey on Mac due to the cache in fontWithFamily(). The reason is that the "desired family" to "available family" mapping is sometimes dependent on the desired traits. However, our cache was only using the "desired family" as key. This patch now uses a std::pair as key containing both the "desired family" and the "desired traits" for correctness. I also updated the cache to use WTF types instead of NS types. Test: platform/mac/fast/text/font-weights.html * platform/graphics/mac/FontCacheMac.mm: (WebCore::desiredFamilyToAvailableFamilyMap): (WebCore::hasDesiredFamilyToAvailableFamilyMapping): (WebCore::rememberDesiredFamilyToAvailableFamilyMapping): (WebCore::fontWithFamily): (WebCore::invalidateFontCache): (WebCore::desiredFamilyToAvailableFamilyDictionary): Deleted. 2015-05-19 Brady Eidson X-Frame-Options headers not respected when loading from application cache. and https://bugs.webkit.org/show_bug.cgi?id=131800 Reviewed by Alexey Proskuryakov. Test: http/tests/appcache/x-frame-options-prevents-framing.php This patch updates SubstituteData to hold on to a ResourceResponse instead of just a URL. It also updates all users of SubstituteData to reflect this. Finally it updates ApplicationCacheHost to put the full response (including x-frame-options header) in the SubstituteData so they can be checked at the appropriate times. * loader/DocumentLoader.cpp: (WebCore::DocumentLoader::handleSubstituteDataLoadNow): (WebCore::DocumentLoader::responseReceived): Update an ASSERT to reflect that it's okay to not have a main resource as long as you have a substitute identifier for it. (WebCore::DocumentLoader::documentURL): (WebCore::DocumentLoader::contentFilterDidDecide): * loader/FrameLoader.cpp: (WebCore::FrameLoader::loadArchive): (WebCore::FrameLoader::defaultSubstituteDataForURL): * loader/SubstituteData.h: (WebCore::SubstituteData::SubstituteData): (WebCore::SubstituteData::shouldRevealToSessionHistory): (WebCore::SubstituteData::mimeType): (WebCore::SubstituteData::textEncoding): (WebCore::SubstituteData::response): (WebCore::SubstituteData::responseURL): Deleted. * loader/appcache/ApplicationCacheHost.cpp: (WebCore::ApplicationCacheHost::maybeLoadMainResource): Put the full ResourceResponse here, which includes x-frame-options headers sent back when the resources was initially loaded from the network. * platform/network/ResourceResponseBase.h: 2015-05-19 Brent Fulgham REGRESSION(142590): Part 2: Scroll-snap points are improperly snapping to earlier index values (Scrolling Thread) https://bugs.webkit.org/show_bug.cgi?id=145175 Reviewed by Beth Dakin. Extend the main-thread scrolling changes done in Bug 145140 to also handle Scrolling Thread snapping. The post-layout fixup (needed to handle window resize and device orientation changes) should not fire while Scrolling Thread scroll-snap animations are running, since these animations will most likely move the scroll view into the proper position. If we attempt to 'fix up' the scroll position before these animations finish, we get an ugly 'jump' in the display. * page/FrameView.cpp: (WebCore::FrameView::isScrollSnapInProgress): New method based on isRubberBandInProgress, which considers both the ScrollAnimator (main thread) scrolling, as well as the ScrollingCoordinator (Scrolling Thread) scrolling operations. Returns true if a scroll-snap animation is still active. * page/FrameView.h: * page/scrolling/AsyncScrollingCoordinator.cpp: (WebCore::AsyncScrollingCoordinator::isScrollSnapInProgress): Added. Returns scrolling tree's 'isScrollSnapInProgress' state. * page/scrolling/AsyncScrollingCoordinator.h: * page/scrolling/ScrollingCoordinator.h: (WebCore::ScrollingCoordinator::isScrollSnapInProgress): Added default 'false' stub. * page/scrolling/ScrollingTree.cpp: (WebCore::ScrollingTree::ScrollingTree): Use modern C++11 initializers. (WebCore::ScrollingTree::isScrollSnapInProgress): Added. (WebCore::ScrollingTree::setMainFrameIsScrollSnapping): Added. * page/scrolling/ScrollingTree.h: * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h: * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm: (WebCore::ScrollingTreeFrameScrollingNodeMac::handleWheelEvent): Update scrolling tree state to match the ScrollController's scroll-snap state. (WebCore::ScrollingTreeFrameScrollingNodeMac::startScrollSnapTimer): Added. When starting a scroll snap timer, always set the scrolling tree scroll-snapping state to true. (WebCore::ScrollingTreeFrameScrollingNodeMac::stopScrollSnapTimer): Added. When ending a scroll snap timer, only set the scrolling tree scroll-snapping state to false if the other axis animator is inactive. * platform/ScrollableArea.cpp: (WebCore::ScrollableArea::updateScrollSnapState): Revise implementation to use its 'isScrollSnapInProgress' method, rather than only looking at the ScrollAnimator (main thread) state. * platform/ScrollableArea.h: (WebCore::ScrollableArea::isScrollSnapInProgress): Added. * platform/cocoa/ScrollController.h: * platform/cocoa/ScrollController.mm: (WebCore::ScrollController::hasActiveScrollSnapTimerForAxis): Added. Reports if the scroll snap animation timer on the requested axis is running or not. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::isScrollSnapInProgress): Added. * rendering/RenderLayer.h: 2015-05-19 Roger Fong Media Controls stop updating after hovering for a few seconds. https://bugs.webkit.org/show_bug.cgi?id=144770. Reviewed by Jer Noble. * Modules/mediacontrols/mediaControlsApple.js: (Controller.prototype.createBase): We should never hide controls immediately as a result of mousing out of the controls. It should only happen when the mouse leaves the video entirely. (Controller.prototype.updateTimelineMetricsIfNeeded): Don’t update if controls are hidden, timeline dimensions will be 0. (Controller.prototype.handlePanelTransitionEnd): Instead of adjusting visibility via adding and removing classes, remove controls entirely from the tree. (Controller.prototype.showControls): Add controls back into the tree when showing controls. (Controller.prototype.updateForShowingControls): Helper method for showControls. (Controller.prototype.controlsAreHidden): Controls also hidden if removed from tree. Remove forceUpdate logic, no longer necessary. (Controller.prototype.handleDurationChange): (Controller.prototype.updateProgress): (Controller.prototype.updateTime): Override methods to use add and remove panelContainer for iOS. * Modules/mediacontrols/mediaControlsiOS.js: (ControllerIOS.prototype.handlePanelTransitionEnd): (ControllerIOS.prototype.showControls): (ControllerIOS.prototype.controlsAreHidden): 2015-05-19 Brent Fulgham Scroll-snap animations should not start on axes with zero-delta https://bugs.webkit.org/show_bug.cgi?id=145148 Reviewed by Dean Jackson. Don't begin a scroll snap animation on an axis that had no change in position (on that axis) during the gesture. * platform/cocoa/ScrollController.mm: (WebCore::ScrollController::processWheelEventForScrollSnapOnAxis): Don't begin a scroll snap animation if no movement on this axis was ever made. 2015-05-19 Youenn Fablet AudioContext should resolve promises with jsUndefined() and not jsNull() https://bugs.webkit.org/show_bug.cgi?id=145063 Reviewed by Sam Weinig. Covered by updated test. * bindings/js/JSDOMPromise.h: (WebCore::DeferredWrapper::resolve): resolving std::nullptr_t as jsUndefined() and not jsNull() 2015-05-19 Xabier Rodriguez Calvar and Youenn Fablet [Streams API] Migrate closed promise handling from ReadableStreamReader to ReadableStream https://bugs.webkit.org/show_bug.cgi?id=145110 Reviewed by Darin Adler. Reader is now just checking whether it is the reader locking the stream or not. If not and stream is readable, it resolves the closed promise. Otherwise, it delegates the promise handling to its stream. No change in behavior. * Modules/streams/ReadableStream.cpp: (WebCore::ReadableStream::cleanCallbacks): Cleaning of closed callbacks. (WebCore::ReadableStream::changeStateToClosed): Resolving closed promise if set. (WebCore::ReadableStream::changeStateToErrored): Rejecting closed promise if set. (WebCore::ReadableStream::getReader): Removed reader state notification. (WebCore::ReadableStream::closed): Moved from reader to stream. * Modules/streams/ReadableStream.h: (WebCore::ReadableStream::reader): Added to allow reader to check whether it is locking its stream or not. (WebCore::ReadableStream::isReadable): Added as an improvement over internalState which is removed. (WebCore::ReadableStream::internalState): Deleted. * Modules/streams/ReadableStreamReader.cpp: (WebCore::ReadableStreamReader::closed): * Modules/streams/ReadableStreamReader.h: Removed state and closed promise callbacks. * bindings/js/JSReadableStreamControllerCustom.cpp: (WebCore::JSReadableStreamController::close): Refactoring of internalState to isReadable. (WebCore::JSReadableStreamController::error): Ditto. * bindings/js/JSReadableStreamReaderCustom.cpp: (WebCore::JSReadableStreamReader::closed): Refactoring to have the promise value as callback parameter. 2015-05-19 Jeremy Jones Remove use of deprecated AVKit SPI cancelOptimizedFullscreen. https://bugs.webkit.org/show_bug.cgi?id=145159 Reviewed by Eric Carlson. Remove cancelOptimizedFullscreen, and use stopOptimizedFullscreen instead. * platform/ios/WebVideoFullscreenInterfaceAVKit.mm: (WebVideoFullscreenInterfaceAVKit::cleanupFullscreenInternal): * platform/spi/cocoa/AVKitSPI.h: remove declaration. 2015-05-19 Zalan Bujtas Merged anonymous blocks should invalidate simple line layout path. https://bugs.webkit.org/show_bug.cgi?id=145104 rdar://problem/20980930 Reviewed by Antti Koivisto. When anonymous blocks are merged together, it's not guaranteed that the final block can use simple line layout. This patch ensures that the flow block, where the other block's content gets moved to, is no longer on simple line layout path. Whether the final flow block ends up using inline boxes or simple line layout will be determined during the next layout. Test: fast/block/crash-when-anonymous-blocks-are-merged-with-simple-line-layout.html * rendering/RenderElement.cpp: (WebCore::RenderElement::insertChildInternal): 2015-05-19 Beth Dakin Crash in WebCore::RenderLayer::updateScrollbarsAfterLayout https://bugs.webkit.org/show_bug.cgi?id=145142 Reviewed by Simon Fraser. I have not been able to reproduce this crash, but according to symbolication m_vBar is null. It seems like this crash was probably caused by http://trac.webkit.org/changeset/173668 which made it so that overflow:scroll behaves like overflow:auto when the scrollbars are overlay. I can see how you could encounter this crash with that change if the layout caused styleRequiresScrollbar() to return true when it used to return false. Then this code, by failing to null-check the scrollbars, assumes that styleRequiresScrollbar() could not have changed based on a layout. But it could change if the css changed the scrollbars to be custom or if the user managed switch to legacy style scrollbars at just the wrong time. Or I suppose it could also happen if the user has legacy scrollbars and the style switched from auto to scroll during the layout. Anyway, we should null-check the scrollbars. This is a speculative fix. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::updateScrollbarsAfterLayout): 2015-05-19 Hunseop Jeong Use modern for-loops in WebCore/xml. https://bugs.webkit.org/show_bug.cgi?id=145046 Reviewed by Chris Dumez. No new tests, no new tests. * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::uppercaseKnownHTTPMethod): * xml/XPathExpressionNode.cpp: (WebCore::XPath::Expression::setSubexpressions): * xml/XPathFunctions.cpp: (WebCore::XPath::FunSum::evaluate): (WebCore::XPath::populateFunctionMap): * xml/XPathNodeSet.cpp: (WebCore::XPath::NodeSet::traversalSort): * xml/XPathParser.cpp: (WebCore::XPath::populateAxisNamesMap): * xml/XPathPath.cpp: (WebCore::XPath::Filter::evaluate): (WebCore::XPath::LocationPath::evaluate): * xml/XPathPredicate.cpp: (WebCore::XPath::EqTestOp::compare): (WebCore::XPath::Union::evaluate): * xml/XPathStep.cpp: (WebCore::XPath::Step::optimize): (WebCore::XPath::Step::predicatesAreContextListInsensitive): (WebCore::XPath::Step::evaluate): (WebCore::XPath::nodeMatches): * xml/XSLStyleSheetLibxslt.cpp: (WebCore::XSLStyleSheet::~XSLStyleSheet): (WebCore::XSLStyleSheet::isLoading): (WebCore::XSLStyleSheet::clearDocuments): (WebCore::XSLStyleSheet::locateStylesheetSubResource): * xml/XSLTProcessorLibxslt.cpp: (WebCore::xsltParamArrayFromParameterMap): 2015-05-19 Jon Lee Improve text rendering of placeholder https://bugs.webkit.org/show_bug.cgi?id=145135 Reviewed by Eric Carlson. * Modules/mediacontrols/mediaControlsApple.css: The

elements of the wireless playback text are being popped out into separate layers, causing the text to render antialiased, which looks bad on non-retina machines. Explicitly set the background color (which is ok since the container element for the placeholder is also black). Also extend the height out 1pt to prevent clipping of descenders. (audio::-webkit-media-controls-wireless-playback-text-top): Set background color to black and add 1 to the height. (audio::-webkit-media-controls-wireless-playback-text-bottom): Ditto. 2015-05-19 Jon Lee [iOS] Current time display should be right-aligned https://bugs.webkit.org/show_bug.cgi?id=145163 rdar://problem/21014339 Reviewed by Eric Carlson. * Modules/mediacontrols/mediaControlsiOS.css: Use flex-start and flex-end instead of right and left, similar to the Mac controls. (video::-webkit-media-controls-current-time-display): (video::-webkit-media-controls-time-remaining-display): 2015-05-14 Chris Fleizach AX: Select text mechanism returns results outside of text control regions https://bugs.webkit.org/show_bug.cgi?id=145041 Reviewed by Mario Sanchez Prada. The behavior of the select text mechanism (inside accessibility) should make sure that results returned stay within text control elements if the search was initiated inside a text control element. Test: platform/mac/accessibility/select-text-stays-inside-text-controls.html * accessibility/AccessibilityObject.cpp: (WebCore::rangeClosestToRange): (WebCore::AccessibilityObject::selectText): 2015-05-19 Chris Dumez Mark static variables as const when possible https://bugs.webkit.org/show_bug.cgi?id=145161 Reviewed by Andreas Kling. * Modules/mediasession/WebMediaSessionManager.cpp: * Modules/mediasource/SourceBuffer.cpp: * Modules/webdatabase/SQLException.cpp: * dom/DOMCoreException.cpp: * inspector/NetworkResourcesData.cpp: * loader/icon/IconDatabase.cpp: (WebCore::urlForLogging): * page/AutoscrollController.cpp: * page/Page.cpp: * platform/RuntimeApplicationChecksIOS.mm: (WebCore::applicationIsAdSheet): (WebCore::applicationIsMobileMail): (WebCore::applicationIsMobileSafari): (WebCore::applicationIsDumpRenderTree): (WebCore::applicationIsWebApp): (WebCore::applicationIsOkCupid): (WebCore::applicationIsFacebook): (WebCore::applicationIsEpicurious): (WebCore::applicationIsDaijisenDictionary): (WebCore::applicationIsNASAHD): (WebCore::applicationIsMASH): (WebCore::applicationIsTheEconomistOnIPhone): (WebCore::applicationIsWebProcess): (WebCore::applicationIsIBooksOnIOS): * platform/audio/HRTFElevation.cpp: * platform/audio/mac/AudioHardwareListenerMac.cpp: (WebCore::processIsRunningPropertyDescriptor): (WebCore::outputDevicePropertyDescriptor): * platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm: * platform/graphics/ca/GraphicsLayerCA.cpp: * platform/graphics/mac/FontCacheMac.mm: (WebCore::toCoreTextFontWeight): (WebCore::toAppKitFontWeight): (WebCore::toNSFontWeight): * platform/mac/ScrollAnimatorMac.mm: (supportsUIStateTransitionProgress): (supportsExpansionTransitionProgress): (supportsContentAreaScrolledInDirection): * platform/mac/ScrollbarThemeMac.mm: * platform/mac/WebCoreNSURLExtras.mm: (WebCore::dataForURLComponentType): * platform/mock/ScrollbarThemeMock.cpp: * platform/text/icu/UTextProviderLatin1.cpp: * platform/text/ios/LocalizedDateCache.mm: (WebCore::LocalizedDateCache::calculateMaximumWidth): * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlockFlow::matchedEndLine): * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::paintTranslucentBorderSides): * rendering/RenderFrameBase.cpp: (WebCore::shouldExpandFrame): * rendering/RenderTableSection.cpp: * rendering/RenderThemeIOS.mm: (WebCore::getInsetGradient): (WebCore::getShineGradient): (WebCore::getShadeGradient): (WebCore::getConvexGradient): (WebCore::getConcaveGradient): (WebCore::getSliderTrackGradient): (WebCore::getReadonlySliderTrackGradient): (WebCore::getSliderThumbOpaquePressedGradient): (WebCore::RenderThemeIOS::paintCheckboxDecorations): (WebCore::RenderThemeIOS::paintRadioDecorations): * rendering/RenderThemeMac.mm: (WebCore::toFontWeight): (WebCore::TopGradientInterpolate): (WebCore::BottomGradientInterpolate): (WebCore::MainGradientInterpolate): (WebCore::TrackGradientInterpolate): 2015-05-18 Gyuyoung Kim Use Ref instead of PassRefPtr in WebCore/bindings https://bugs.webkit.org/show_bug.cgi?id=144981 Reviewed by Darin Adler. As a step to purge PassRefPtr, remove PassRefPtr in WebCore/bindings. No new tests, no behavior changes. * bindings/gobject/GObjectNodeFilterCondition.h: (WebCore::GObjectNodeFilterCondition::create): * bindings/gobject/GObjectXPathNSResolver.h: (WebCore::GObjectXPathNSResolver::create): * bindings/js/JSCustomXPathNSResolver.cpp: (WebCore::JSCustomXPathNSResolver::create): * bindings/js/JSCustomXPathNSResolver.h: * bindings/js/JSDOMGlobalObjectTask.cpp: * bindings/js/JSErrorHandler.h: (WebCore::JSErrorHandler::create): * bindings/js/JSLazyEventListener.cpp: (WebCore::JSLazyEventListener::createForNode): (WebCore::JSLazyEventListener::createForDOMWindow): * bindings/js/JSLazyEventListener.h: * bindings/js/JSMutationCallback.h: (WebCore::JSMutationCallback::create): * bindings/js/JSNodeFilterCondition.h: (WebCore::JSNodeFilterCondition::create): * bindings/js/SerializedScriptValue.cpp: (WebCore::SerializedScriptValue::create): (WebCore::SerializedScriptValue::numberValue): (WebCore::SerializedScriptValue::undefinedValue): (WebCore::SerializedScriptValue::nullValue): * bindings/js/SerializedScriptValue.h: * bindings/objc/ObjCEventListener.h: * bindings/objc/ObjCEventListener.mm: (WebCore::ObjCEventListener::wrap): * bindings/objc/ObjCNodeFilterCondition.h: (WebCore::ObjCNodeFilterCondition::create): 2015-05-18 Csaba Osztrogonác Fix uninitialized warnings in RealtimeMediaSourceCenterOwr.cpp https://bugs.webkit.org/show_bug.cgi?id=145119 Reviewed by Gyuyoung Kim. * platform/mediastream/openwebrtc/RealtimeMediaSourceCenterOwr.cpp: (WebCore::RealtimeMediaSourceCenterOwr::validateRequestConstraints): (WebCore::RealtimeMediaSourceCenterOwr::mediaSourcesAvailable): 2015-05-18 Michael Catanzaro [CMake] Ignore warnings in system headers https://bugs.webkit.org/show_bug.cgi?id=144747 Reviewed by Darin Adler. Separate include directories into WebKit project includes and system includes. Suppress all warnings from headers in system include directories using the SYSTEM argument to the include_directories command. * CMakeLists.txt: * PlatformEfl.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: 2015-05-18 Myles C. Maxfield Addressing post-review comments on r184353 https://bugs.webkit.org/show_bug.cgi?id=145146 Reviewed by Benjamin Poulain. See per-file comments. No new tests because there is no behavior change. * platform/graphics/mac/FontCacheMac.mm: (WebCore::fontWithFamilySpecialCase): Use equalIgnoringASCIICase() AtomicString overload. * rendering/RenderThemeMac.mm: (WebCore::RenderThemeMac::updateCachedSystemFontDescription): Implement Ben's ideas for cheaply constructing AtomicStrings only when necessary. 2015-05-18 Skachkov Alexandr [ES6] Arrow function syntax. Feature flag for arrow function https://bugs.webkit.org/show_bug.cgi?id=145108 Reviewed by Ryosuke Niwa. Added feature flag ENABLE_ES6_ARROWFUNCTION_SYNTAX for arrow function * Configurations/FeatureDefines.xcconfig: 2015-05-18 Brent Fulgham REGRESSION(142590): Scroll-snap points are improperly snapping to earlier index values https://bugs.webkit.org/show_bug.cgi?id=145140 Reviewed by Beth Dakin. The new "nearestActiveSnapPoint" logic is firing while scroll snap animations are running. We need to add an "isScrollSnapInProgress" predicate, much like the existing "isRubberBandInProgress" to avoid certain "fix-up" logic that we don't want running while we are in the process of moving to a new position. * platform/ScrollAnimator.h: (WebCore::ScrollAnimator::ScrollAnimator::isScrollSnapInProgress): Added. * platform/ScrollableArea.cpp: (WebCore::ScrollableArea::updateScrollSnapState): If we are in the midst of a scroll snap operation, do not attempt to reset position to the current active snap point. * platform/cocoa/ScrollController.h: * platform/cocoa/ScrollController.mm: (WebCore::ScrollController::isScrollSnapInProgress): Added. * platform/mac/ScrollAnimatorMac.h: * platform/mac/ScrollAnimatorMac.mm: (WebCore::ScrollAnimatorMac::isScrollSnapInProgress): Added. 2015-05-17 Manuel Rego Casasnovas [CSS Grid Layout] Add scrollbar width in intrinsic logical widths computation https://bugs.webkit.org/show_bug.cgi?id=145021 Like for flexboxes we've to take into account the scrollbar logical width while computing the intrinsic min and max logical widths. Reviewed by Sergio Villar Senin. Test: fast/css-grid-layout/compute-intrinsic-widths-scrollbar.html * rendering/RenderGrid.cpp: (WebCore::RenderGrid::computeIntrinsicLogicalWidths): Add scrollbar logical width. 2015-05-17 Xabier Rodriguez Calvar and Youenn Fablet [Streams API] Delegate ReadableStreamReader reference counting to ReadableStream https://bugs.webkit.org/show_bug.cgi?id=144907 Reviewed by Darin Adler. Changed the link between readadable stream and reader. Controller ref()/deref() now increments/decrements its stream ref counter, similarly to ReadableStreamController. This ensures that even if JS scripts do not keep track of the readable stream, the readable stream will not be disposed as long as the JS script has access to its reader. All readers of a given stream are kept by the stream, either in an array (for released readers) or and in ReadableStream::m_reader for the active reader. This removes the need for the code synchronizing stream and reader. As a reader can now already count on its stream, the reader no longer needs to store the error in errored state. Removal of ReadableJSStream::Reader as closed promise rejection error is directly retrieved from the ReadableStream. Moved the creation of reader directly in ReadableStream. Next step should be to remove ReadableStreamReader::m_state and to delegate the handling of ReadableStreamReader closed promise callbacks to ReadableStream. No change in behavior. * Modules/streams/ReadableStream.cpp: (WebCore::ReadableStream::changeStateToClosed): (WebCore::ReadableStream::changeStateToErrored): (WebCore::ReadableStream::getReader): * Modules/streams/ReadableStream.h: (WebCore::ReadableStream::reader): * Modules/streams/ReadableStreamReader.cpp: (WebCore::ReadableStreamReader::clean): (WebCore::ReadableStreamReader::ref): (WebCore::ReadableStreamReader::deref): (WebCore::ReadableStreamReader::closed): (WebCore::ReadableStreamReader::changeStateToClosed): (WebCore::ReadableStreamReader::changeStateToErrored): * Modules/streams/ReadableStreamReader.h: (WebCore::ReadableStreamReader::ReadableStreamReader): * Modules/streams/ReadableStreamReader.idl: * bindings/js/JSReadableStreamCustom.cpp: (WebCore::JSReadableStream::getReader): * bindings/js/JSReadableStreamReaderCustom.cpp: (WebCore::JSReadableStreamReader::closed): (WebCore::constructJSReadableStreamReader): * bindings/js/ReadableJSStream.cpp: (WebCore::ReadableJSStream::storeError): (WebCore::ReadableJSStream::ReadableJSStream): Deleted. * bindings/js/ReadableJSStream.h: 2015-05-17 Alexey Proskuryakov Crash when uploading huge files to YouTube or Google Drive https://bugs.webkit.org/show_bug.cgi?id=145083 rdar://problem/15468529 Reviewed by Darin Adler. This fixes the crash, but uploading will fail. * fileapi/FileReaderLoader.cpp: (WebCore::FileReaderLoader::start): Tell SubresourceLoader to not store a copy of all received data, FileReaderLoader has its own buffer. (WebCore::FileReaderLoader::didReceiveResponse): Fixed a bounds check - not every 64-bit value that doesn't fit into 32 bits is negative. With this, FileReader fails on huge files right away, as intended. (WebCore::FileReaderLoader::didReceiveData): Fixed multiple bugs in code that's executed when size is not available upfront. This is the code that used to crash, but with the above fix, it's not executed by YouTube. Not only overflow was handled incorrectly, but even simply growing a buffer for append was buggy. 2015-05-16 Zalan Bujtas REGRESSION (Subpixel): Dashed underline is missing when box is positioned at subpixels. https://bugs.webkit.org/show_bug.cgi?id=145097 rdar://problem/18588415 Reviewed by Simon Fraser. Dashed and dotted border painting needs clipping in order to properly display corners. Similarly to solid border's quad calculation, we pixelsnap the border positions before computing the clipping quad values. Test: fast/borders/dashed-border-on-subpixel-position.html fast/borders/dotted-border-on-subpixel-position.html * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::clipBorderSidePolygon): 2015-05-16 Sungmann Cho Remove styleText() and applyStyleText() from InspectorStyle. https://bugs.webkit.org/show_bug.cgi?id=145093 Reviewed by Darin Adler. styleText() and applyStyleText() in InspectorStyle are private aliases for the public accessors in the same class but are rarely used. I think it would be better off removing these aliases and updating all the current call sites to use the public accessors directly as noted in InspectorStyleSheet.h. No new tests, no behavior change. * inspector/InspectorStyleSheet.cpp: (WebCore::InspectorStyle::populateAllProperties): * inspector/InspectorStyleSheet.h: 2015-05-16 Sungmann Cho Remove MessageType variant of addMessageToConsole() from ChromeClient. https://bugs.webkit.org/show_bug.cgi?id=145095 Reviewed by Darin Adler. All addMessageToConsole() in ChromeClient are exactly the same thing. So there is no reason to keep all this methods. No new tests, no behavior change. * page/ChromeClient.h: * page/PageConsoleClient.cpp: (WebCore::PageConsoleClient::messageWithTypeAndLevel): 2015-05-15 Sam Weinig Add getElementById to DocumentFragment https://bugs.webkit.org/show_bug.cgi?id=145094 Reviewed by Alexey Proskuryakov. Match the latest DOM standard and other browsers by adding getElementById to DocumentFragment in addition to Document and SVGSVGElement. Add NonElementParentNode interface that the DOM standard defines. Test: fast/dom/DocumentFragment/getElementById.html * DerivedSources.make: * WebCore.xcodeproj/project.pbxproj: Add NonElementParentNode.idl * dom/Document.idl: Mark Document as implementing NonElementParentNode and remove now redundant getElementById declaration. * dom/DocumentFragment.cpp: (WebCore::DocumentFragment::getElementById): * dom/DocumentFragment.h: Add implementation of getElementById for DocumentFragments. Add a fast path for ShadowRoots which can take advantage of the fact that they are TreeScopes to use the elements by id cache in TreeScrope. * dom/DocumentFragment.idl: Mark DocumentFragment as implementing NonElementParentNode. * dom/NonElementParentNode.idl: Copied from Source/WebCore/dom/NonDocumentTypeChildNode.idl. Added. * svg/SVGSVGElement.cpp: (WebCore::SVGSVGElement::getElementById): * svg/SVGSVGElement.h: * svg/SVGSVGElement.idl: Convert to taking an AtomicString to match other getElementByIds. 2015-05-15 Antti Koivisto When redirecting to data URL use HTTP response for same origin policy checks https://bugs.webkit.org/show_bug.cgi?id=145054 rdar://problem/20299050 Reviewed by Alexey Proskuryakov. Test: http/tests/security/canvas-remote-read-data-url-image-redirect.html * dom/ScriptElement.cpp: (WebCore::ScriptElement::notifyFinished): * dom/ScriptExecutionContext.cpp: (WebCore::ScriptExecutionContext::sanitizeScriptError): * html/canvas/CanvasRenderingContext.cpp: (WebCore::CanvasRenderingContext::wouldTaintOrigin): * loader/ImageLoader.cpp: (WebCore::ImageLoader::notifyFinished): * loader/MediaResourceLoader.cpp: (WebCore::MediaResourceLoader::responseReceived): * loader/TextTrackLoader.cpp: (WebCore::TextTrackLoader::notifyFinished): * loader/cache/CachedImage.cpp: (WebCore::CachedImage::isOriginClean): * loader/cache/CachedResource.cpp: (WebCore::CachedResource::passesAccessControlCheck): (WebCore::CachedResource::passesSameOriginPolicyCheck): Factor repeatedly used same origin policy test into a function. (WebCore::CachedResource::redirectReceived): When redirecting to a data URL save the redirect response. (WebCore::CachedResource::responseForSameOriginPolicyChecks): In case we got redirected to data use that response instead of the final data response for policy checks. * loader/cache/CachedResource.h: 2015-05-16 Jon Lee [iOS] wireless playback picker button is drawn incorrectly https://bugs.webkit.org/show_bug.cgi?id=145057 rdar://problem/20877518 Reviewed by Jer Noble. * Modules/mediacontrols/mediaControlsiOS.js: (ControllerIOS.prototype.updateWirelessTargetPickerButton): This method is defined in Controller, but is only meant to run on Macs. Override it with an empty function for iOS. 2015-05-15 Simon Fraser REGRESSION (r183300): Background missing on top links on apple.com https://bugs.webkit.org/show_bug.cgi?id=145079 rdar://problem/20914252 Reviewed by Tim Horton. Re-land r184421 with a fix to check against rects.coverageRect rather than the stale m_coverageRect. Test: compositing/visible-rect/backing-change-height-from-zero.html * platform/graphics/ca/GraphicsLayerCA.cpp: (WebCore::GraphicsLayerCA::setVisibleAndCoverageRects): * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::shouldSkipLayerInDump): 2015-05-15 Matt Baker Web Inspector: REGRESSION (r181625): Timeline recording started from console.profile is always empty https://bugs.webkit.org/show_bug.cgi?id=144882 Reviewed by Joseph Pecoraro. A timeline recording will always be stopped before the end of the current run loop is observed. Before dispatching the recording stopped event, any events that are currently in progress should be considered complete and sent to the frontend. * inspector/InspectorTimelineAgent.cpp: (WebCore::InspectorTimelineAgent::internalStop): 2015-05-15 Commit Queue Unreviewed, rolling out r184421. https://bugs.webkit.org/show_bug.cgi?id=145087 Introduced 42 layout test failures (Requested by rniwa on #webkit). Reverted changeset: "REGRESSION (r183300): Background missing on top links on apple.com" https://bugs.webkit.org/show_bug.cgi?id=145079 http://trac.webkit.org/changeset/184421 2015-05-15 Simon Fraser REGRESSION (r183300): Background missing on top links on apple.com https://bugs.webkit.org/show_bug.cgi?id=145079 rdar://problem/20914252 Reviewed by Tim Horton. GraphicsLayerCA::setVisibleAndCoverageRects() only set the m_intersectsCoverageRect flag if the coverage rect changed, but it doesn't if you simply change the size of the layer. Instead, always re-evaluate the intersection, and set the CoverageRectChanged bit if it changes. Test: compositing/visible-rect/backing-change-height-from-zero.html * platform/graphics/ca/GraphicsLayerCA.cpp: (WebCore::GraphicsLayerCA::setVisibleAndCoverageRects): * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::shouldSkipLayerInDump): Don't skip any layers in a debug layer dump, to assist debugging. 2015-05-15 Sam Weinig Move HTMLElement's children property to ParentNode https://bugs.webkit.org/show_bug.cgi?id=145072 Reviewed by Chris Dumez. Match the latest DOM standard and other browsers by moving the children property to ParentNode, thus exposing it on Element, Document and DocumentFragment. Test: fast/dom/ParentNode-children.html * dom/ContainerNode.cpp: (WebCore::ContainerNode::children): Moved implementation from HTMLElement to here. (WebCore::ContainerNode::ensureCachedHTMLCollection): (WebCore::ContainerNode::cachedHTMLCollection): Moved implementation from Element to here so that ContainerNode::children can use it. (WebCore::ContainerNode::firstElementChild): (WebCore::ContainerNode::lastElementChild): (WebCore::ContainerNode::childElementCount): Remove unnecessary assertions. * dom/ContainerNode.h: Moved declarations from HTMLElement and Element to here. * dom/Element.cpp: (WebCore::Element::ensureCachedHTMLCollection): Deleted. (WebCore::Element::cachedHTMLCollection): Deleted. * dom/Element.h: Moved to ContainerNode. * dom/Node.cpp: (WebCore::Node::previousElementSibling): (WebCore::Node::nextElementSibling): Remove unnecessary assertions. * dom/ParentNode.idl: Moved the children property here from HTMLElement. * html/HTMLElement.cpp: (WebCore::HTMLElement::children): Deleted. * html/HTMLElement.h: Moved to ContainerNode. * html/HTMLElement.idl: Get rid of the children property for all bindings except Objective-C which needs to keep it to avoid changing the public API. 2015-05-15 Zalan Bujtas WebCore ASan debug build fails. ERROR: WebCore has a weak external symbol in it. https://bugs.webkit.org/show_bug.cgi?id=145070 Reviewed by David Kilzer. Build fix. * Configurations/WebCore.unexp: 2015-05-15 Beth Dakin Prefix force on MouseEvent and add constants for click and force click values https://bugs.webkit.org/show_bug.cgi?id=145065 -and corresponding- rdar://problem/20770052 Reviewed by Tim Horton. (WebCore::MouseEvent::webkitForce): * dom/MouseEvent.idl: 2015-05-15 Jer Noble [MediaControls] Refactor media controls & bring improvements made to iOS controls to Mac. https://bugs.webkit.org/show_bug.cgi?id=144973 Reviewed by Dean Jackson. Pull improvements made to the iOS media controls back into the Mac controls by moving code from mediaControlsiOS.js into MediaControlsApple.js. The largest refactored feature is the ability to drop individual controls from the media controls when the video is too small to contain them. To allow these controls to resize dynamically, a new "resize" event is fired inside the media element's shadow DOM. * Modules/mediacontrols/mediaControlsApple.css: (audio::-webkit-media-controls-panel .dropped): Added; sets "display: none". * Modules/mediacontrols/mediaControlsApple.js: (Controller): Set defaults for new variables. (Controller.prototype.updateControls): Update the controls width; moved from iOS.js. (Controller.prototype.handleReadyStateChange): Update the controls; moved from iOS.js. (Controller.prototype.handleTimeUpdate): Update the progress; moved from iOS.js. (Controller.prototype.handleTimelineInput): Pause if scrubbing; moved from iOS.js. (Controller.prototype.handleTimelineChange): Update the progress; moved from iOS.js. (Controller.prototype.showControls): Update the controls width; moved from iOS.js. (Controller.prototype.hideControls): Removed _potentiallyScrubbing check; not needed due to changes to controlsAlwaysVisible(). (Controller.prototype.scheduleUpdateLayoutForDisplayedWidth): Moved from iOS.js. (Controller.prototype.isControlVisible): Added; checks whether control is parented & not hidden. (Controller.prototype.updateLayoutForDisplayedWidth): Moved from iOS.js and refactored. (Controller.prototype.controlsAlwaysVisible): Return true if scrubbing. (Controller.prototype.updateHasAudio): Check currentPlaybackTargetIsWireless(); moved from iOS.js. (Controller.prototype.get scrubbing): Simple getter for _scrubbing. (Controller.prototype.set scrubbing): Check play state if scrubbing; start playback (if necessary) if not scrubbing. (Controller.prototype.get pageScaleFactor): Moved from iOS.js. (Controller.prototype.set pageScaleFactor): Ditto. (Controller.prototype.handleRootResize): Schedule an update of the contrtols width. Remove a bunch of newly unnecessary code from the iOS media controls: * Modules/mediacontrols/mediaControlsiOS.js: (ControllerIOS): (ControllerIOS.prototype.createControls): Remove ivars moved into Apple.js. (ControllerIOS.prototype.configureInlineControls): Remove spacer; made unnecessary. (ControllerIOS.prototype.showControls): Deleted. (ControllerIOS.prototype.updateTime): Deleted. (ControllerIOS.prototype.handleTimelineTouchStart): Just call "scrubbing = true", handled in Apple.js. (ControllerIOS.prototype.handleTimelineTouchEnd): Just call "scrubbing = false", handled in Apple.js. (ControllerIOS.prototype.handleReadyStateChange): Deleted. (ControllerIOS.prototype.setPlaying): Don't check _timelineIsHidden; not needed. (ControllerIOS.prototype.get pageScaleFactor): Deleted. (ControllerIOS.prototype.set pageScaleFactor): Deleted. (ControllerIOS.prototype.scheduleUpdateLayoutForDisplayedWidth): Deleted. (ControllerIOS.prototypeupdateLayoutForDisplayedWidth): Deleted. Fire a "resize" event at the shadow DOM root when layout results in a size change. * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::layoutSizeChanged): Fire the "resize" event at the shadow DOM. * html/HTMLMediaElement.h: * rendering/RenderMedia.cpp: (WebCore::RenderMedia::layout): Trigger layoutSizeChanged() * rendering/RenderMedia.h: Drive-by fixes: * Modules/mediacontrols/mediaControlsApple.js: (Controller.prototype.createControls): aria-label text is totally wrong; removed. (Controller.prototype.updateWirelessPlaybackStatus): Use class-names to hide controls, not inline styles. 2015-05-15 Alex Christensen [Content Extensions] Fail to load old content extension files https://bugs.webkit.org/show_bug.cgi?id=145027 Reviewed by Eric Carlson. * contentextensions/DFABytecode.h: 2015-05-15 Eric Carlson Unreviewed build fix. * platform/ios/WebVideoFullscreenInterfaceAVKit.mm: Add clang pragmas to ignore deprecation warnings. 2015-05-15 Jeremy Jones Limit alternate fullscreen with linked on or after. https://bugs.webkit.org/show_bug.cgi?id=144894 Reviewed by Dean Jackson. * platform/ios/WebCoreSystemInterfaceIOS.h: add new wkIOSSystemVersion 2015-05-15 Roger Fong Unreviewed. Revert part of r184361. * Modules/mediacontrols/mediaControlsApple.js: (Controller.prototype.configureInlineControls): HI wants the buttons flipped. 2015-05-15 Sungmann Cho Fix trivial typo in TextEncodingDetectorICU.cpp. https://bugs.webkit.org/show_bug.cgi?id=145055 Reviewed by Alexey Proskuryakov. No new tests, no behavior change.. * platform/text/TextEncodingDetectorICU.cpp: (WebCore::detectTextEncoding): 2015-05-15 Alexey Proskuryakov Cyrillic top-level domains are displayed as punycode https://bugs.webkit.org/show_bug.cgi?id=145024 rdar://problem/17747133 rdar://problem/14116594 Reviewed by Tim Horton. Handling each TLD in code is annoying, but we can probably survive like this for a few more years, and maybe we'll think of an entirely different way to deal with non-ASCII domain labels in the meanwhile. * platform/mac/WebCoreNSURLExtras.mm: (WebCore::isSecondLevelDomainNameAllowedByTLDRules): (WebCore::allCharactersAllowedByTLDRules): 2015-05-15 Roger Fong Cursor is displayed after full screen video controls fade away. https://bugs.webkit.org/show_bug.cgi?id=145034. Reviewed by Jer Noble. * Modules/mediacontrols/mediaControlsApple.css: (video::-webkit-media-controls-panel): Unnecessary cursor style is on the control panel while hidden but the cursor will already be hidden anyways from being auto-hidden. Causes style to change when controls are hidden, which causes the cursor to reappear. 2015-05-15 Roger Fong Checkmark on OFF option of captions sometimes does not appear. https://bugs.webkit.org/show_bug.cgi?id=145060. Reviewed by Eric Carlson. * Modules/mediacontrols/mediaControlsApple.js: (Controller.prototype.buildCaptionMenu): Audio tracks don’t have an OFF option. Remove related code to allow OFF option for subtitles to work properly. 2015-05-15 Zalan Bujtas White edge on animating panel on http://rokkosunnyvale.com https://bugs.webkit.org/show_bug.cgi?id=144986 rdar://problem/20907683 Reviewed by Simon Fraser. Background image geometry calculation needs to be based on the final painting size of the container in order to accurately compute tile sizes, repeating positions etc. The container's size is pixelsnapped at painting using absolute coordinates. This patch ensures that we snap to the same size while computing background geometry. Test: fast/images/background-image-size-changes-fractional-position.html * rendering/InlineFlowBox.cpp: (WebCore::InlineFlowBox::paintBoxDecorations): * rendering/RenderBox.cpp: (WebCore::RenderBox::paintBoxDecorations): (WebCore::RenderBox::paintBackground): (WebCore::RenderBox::getBackgroundPaintedExtent): (WebCore::RenderBox::computeBackgroundIsKnownToBeObscured): (WebCore::RenderBox::maskClipRect): (WebCore::RenderBox::repaintLayerRectsForImage): unable to get absolute coords. * rendering/RenderBox.h: * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::paintFillLayerExtended): (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry): (WebCore::RenderBoxModelObject::getGeometryForBackgroundImage): (WebCore::RenderBoxModelObject::boxShadowShouldBeAppliedToBackground): * rendering/RenderBoxModelObject.h: * rendering/RenderFieldset.cpp: (WebCore::RenderFieldset::paintBoxDecorations): * rendering/RenderImage.cpp: (WebCore::RenderImage::boxShadowShouldBeAppliedToBackground): (WebCore::RenderImage::computeBackgroundIsKnownToBeObscured): * rendering/RenderImage.h: * rendering/RenderLayer.cpp: unable to get absolute coords. (WebCore::RenderLayer::calculateClipRects): * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::updateDirectlyCompositedBackgroundImage): currently not used. * rendering/RenderObject.h: (WebCore::RenderObject::computeBackgroundIsKnownToBeObscured): (WebCore::RenderObject::backgroundIsKnownToBeObscured): * rendering/RenderTable.cpp: (WebCore::RenderTable::paintBoxDecorations): * rendering/RenderTableCell.cpp: (WebCore::RenderTableCell::boxShadowShouldBeAppliedToBackground): * rendering/RenderTableCell.h: 2015-05-15 Jer Noble Crash in RenderFlowThread::popFlowThreadLayoutState() due to mismatched push/pop count https://bugs.webkit.org/show_bug.cgi?id=145042 Reviewed by David Hyatt. RenderFlowThread previously used a ListHashSet to store its stack of active objects. This is problematic because, if the same object is pushed twice, only a single entry of that object is added to the stack. After this occurs, a matching number of pushes will pop too many items off the stack, causing a crash when popping a stack with zero items. This specifically happens in FrameView::layout(), which will push its root renderer on the stack of active items, and then ask the root to layout(), which will attempt to push itself on the stack of active items. Instead of a ListHashSet, use a Vector, which has similar memory characteristics and no uniqueness requirements. * rendering/RenderFlowThread.cpp: (WebCore::RenderFlowThread::pushFlowThreadLayoutState): (WebCore::RenderFlowThread::popFlowThreadLayoutState): * rendering/RenderFlowThread.h: 2015-05-15 Per Arne Vollan [Curl] WebSocket platform part is not implemented. https://bugs.webkit.org/show_bug.cgi?id=144628 Reviewed by Darin Adler. Add Curl platform code implementation for WebSockets. * platform/network/curl/SocketStreamHandle.h: (WebCore::SocketStreamHandle::create): (WebCore::SocketStreamHandle::SocketData::SocketData): * platform/network/curl/SocketStreamHandleCurl.cpp: (WebCore::SocketStreamHandle::SocketStreamHandle): (WebCore::SocketStreamHandle::~SocketStreamHandle): (WebCore::SocketStreamHandle::platformSend): (WebCore::SocketStreamHandle::platformClose): (WebCore::SocketStreamHandle::readData): (WebCore::SocketStreamHandle::sendData): (WebCore::SocketStreamHandle::waitForAvailableData): (WebCore::SocketStreamHandle::startThread): (WebCore::SocketStreamHandle::stopThread): (WebCore::SocketStreamHandle::didReceiveData): (WebCore::SocketStreamHandle::didOpenSocket): (WebCore::SocketStreamHandle::createCopy): 2015-05-14 Carlos Garcia Campos REGRESSION(r183861): [SOUP] Downloads are broken when using the Network Process https://bugs.webkit.org/show_bug.cgi?id=144738 Reviewed by Alexey Proskuryakov. Add ResourceHandle::releaseForDownload() that releases the current handle to be used as a download. * platform/network/ResourceHandle.h: * platform/network/soup/ResourceHandleSoup.cpp: (WebCore::ResourceHandle::releaseForDownload): 2015-05-15 Zan Dobersek [GTK] Fix PlatformDisplayWayland construction error, implement the destructor https://bugs.webkit.org/show_bug.cgi?id=144997 Reviewed by Carlos Garcia Campos. The PlatformDisplayWayland constructor is private, so we can't use std::make_unique<>() to construct an object of this class. Implement the PlatformDisplayWayland destructor, cleaning out all the Wayland resources, if present. * platform/graphics/wayland/PlatformDisplayWayland.cpp: (WebCore::PlatformDisplayWayland::create): (WebCore::PlatformDisplayWayland::PlatformDisplayWayland): (WebCore::PlatformDisplayWayland::~PlatformDisplayWayland): 2015-05-14 Zalan Bujtas Images on www.fitstylelife.com jiggle on hover. https://bugs.webkit.org/show_bug.cgi?id=145020 rdar://problem/20885337 Reviewed by Simon Fraser. This patch ensures that the clipping layer of a composited content is pixel snapped properly. Tests: compositing/composited-parent-clipping-layer-on-subpixel-position.html compositing/parent-clipping-layer-on-subpixel-position.html * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::updateGeometry): 2015-05-14 Chris Dumez Have DOMWindow::createWindow() take references to frames https://bugs.webkit.org/show_bug.cgi?id=145037 Reviewed by Gyuyoung Kim. Have DOMWindow::createWindow() take references to frames instead of pointers as they are expected to be non-null. Also return a RefPtr instead of a PassRefPtr. * inspector/InspectorFrontendClientLocal.cpp: (WebCore::InspectorFrontendClientLocal::openInNewTab): * loader/FrameLoader.cpp: (WebCore::createWindow): * loader/FrameLoader.h: * page/DOMWindow.cpp: (WebCore::DOMWindow::createWindow): (WebCore::DOMWindow::open): (WebCore::DOMWindow::showModalDialog): * page/DOMWindow.h: 2015-05-14 Simon Fraser REGRESSION (r183794): Garbage tiles when body background switches to fixed https://bugs.webkit.org/show_bug.cgi?id=145032 rdar://problem/20963679 Reviewed by Dean Jackson. After r183794 (or possibly an earlier commit), we failed to dynamically update the configuration of layers that handled fixed background attachment on the root. This would result in unpainted tiles, and non-fixed-background behavior. Fix by calling RenderLayerCompositor::rootOrBodyStyleChanged() whenever the style changes on the root or body renderers, and triggering a compositing update if the fixedness of the background changes. It calls the existing rootBackgroundTransparencyChanged() if the color changes. Test: platform/mac-wk2/tiled-drawing/toggle-to-fixed-background.html * rendering/RenderBox.cpp: (WebCore::RenderBox::styleDidChange): * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::rootOrBodyStyleChanged): (WebCore::RenderLayerCompositor::rootBackgroundTransparencyChanged): * rendering/RenderLayerCompositor.h: 2015-05-14 Commit Queue Unreviewed, rolling out r184359 and r184362. https://bugs.webkit.org/show_bug.cgi?id=145035 Introduced a crash in six media element tests (Requested by rniwa on #webkit). Reverted changesets: "[MediaControls] Refactor media controls & bring improvements made to iOS controls to Mac." https://bugs.webkit.org/show_bug.cgi?id=144973 http://trac.webkit.org/changeset/184359 "Unreviewed build fix after r184359; typo." http://trac.webkit.org/changeset/184362 2015-05-14 Jer Noble Unreviewed build fix after r184359; typo. * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::layoutSizeChanged): 2015-05-14 Roger Fong Adjust button CSS and positioning in preparation. https://bugs.webkit.org/show_bug.cgi?id=144973. Reviewed by Dean Jackson. The only visual change here is the swapping of the rewind and play button positions. Also, position buttons based off of both left and right margins instead of just one of the two. This allows the controls drop off to work without having to use a spacer element to take the place of the timeline if the controls are too small. * Modules/mediacontrols/mediaControlsApple.css: (audio::-webkit-media-controls-rewind-button): (audio::-webkit-media-controls-play-button): (audio::-webkit-media-controls-panel .mute-box): (audio::-webkit-media-controls-wireless-playback-picker-button): (audio::-webkit-media-controls-toggle-closed-captions-button): (audio::-webkit-media-controls-fullscreen-button): (audio::-webkit-media-controls-fullscreen-button.exit): (audio::-webkit-media-controls-time-remaining-display): (audio:-webkit-full-screen::-webkit-media-controls-toggle-closed-captions-button): (audio:-webkit-full-screen::-webkit-media-controls-wireless-playback-picker-button): * Modules/mediacontrols/mediaControlsApple.js: (Controller.prototype.configureInlineControls): 2015-05-14 Dean Jackson MediaControls: controls are live even when invisible https://bugs.webkit.org/show_bug.cgi?id=145029 Reviewed by Jer Noble. When the controls are invisible they should ignore touch/mouse events. * Modules/mediacontrols/mediaControlsiOS.css: Add pointer-events: none where appropriate. (video::-webkit-media-controls-panel-container): (video::-webkit-media-controls-panel-background): (video::-webkit-media-controls-panel): (video::-webkit-media-controls-panel.paused): 2015-05-14 Jer Noble [MediaControls] Refactor media controls & bring improvements made to iOS controls to Mac. https://bugs.webkit.org/show_bug.cgi?id=144973 Reviewed by Dean Jackson. Pull improvements made to the iOS media controls back into the Mac controls by moving code from mediaControlsiOS.js into MediaControlsApple.js. The largest refactored feature is the ability to drop individual controls from the media controls when the video is too small to contain them. To allow these controls to resize dynamically, a new "resize" event is fired inside the media element's shadow DOM. * Modules/mediacontrols/mediaControlsApple.css: (audio::-webkit-media-controls-panel .dropped): Added; sets "display: none". * Modules/mediacontrols/mediaControlsApple.js: (Controller): Set defaults for new variables. (Controller.prototype.updateControls): Update the controls width; moved from iOS.js. (Controller.prototype.handleReadyStateChange): Update the controls; moved from iOS.js. (Controller.prototype.handleTimeUpdate): Update the progress; moved from iOS.js. (Controller.prototype.handleTimelineInput): Pause if scrubbing; moved from iOS.js. (Controller.prototype.handleTimelineChange): Update the progress; moved from iOS.js. (Controller.prototype.showControls): Update the controls width; moved from iOS.js. (Controller.prototype.hideControls): Removed _potentiallyScrubbing check; not needed due to changes to controlsAlwaysVisible(). (Controller.prototype.scheduleUpdateLayoutForDisplayedWidth): Moved from iOS.js. (Controller.prototype.isControlVisible): Added; checks whether control is parented & not hidden. (Controller.prototype.updateLayoutForDisplayedWidth): Moved from iOS.js and refactored. (Controller.prototype.controlsAlwaysVisible): Return true if scrubbing. (Controller.prototype.updateHasAudio): Check currentPlaybackTargetIsWireless(); moved from iOS.js. (Controller.prototype.get scrubbing): Simple getter for _scrubbing. (Controller.prototype.set scrubbing): Check play state if scrubbing; start playback (if necessary) if not scrubbing. (Controller.prototype.get pageScaleFactor): Moved from iOS.js. (Controller.prototype.set pageScaleFactor): Ditto. (Controller.prototype.handleRootResize): Schedule an update of the contrtols width. Remove a bunch of newly unnecessary code from the iOS media controls: * Modules/mediacontrols/mediaControlsiOS.js: (ControllerIOS): (ControllerIOS.prototype.createControls): Remove ivars moved into Apple.js. (ControllerIOS.prototype.configureInlineControls): Remove spacer; made unnecessary. (ControllerIOS.prototype.showControls): Deleted. (ControllerIOS.prototype.updateTime): Deleted. (ControllerIOS.prototype.handleTimelineTouchStart): Just call "scrubbing = true", handled in Apple.js. (ControllerIOS.prototype.handleTimelineTouchEnd): Just call "scrubbing = false", handled in Apple.js. (ControllerIOS.prototype.handleReadyStateChange): Deleted. (ControllerIOS.prototype.setPlaying): Don't check _timelineIsHidden; not needed. (ControllerIOS.prototype.get pageScaleFactor): Deleted. (ControllerIOS.prototype.set pageScaleFactor): Deleted. (ControllerIOS.prototype.scheduleUpdateLayoutForDisplayedWidth): Deleted. (ControllerIOS.prototypeupdateLayoutForDisplayedWidth): Deleted. Fire a "resize" event at the shadow DOM root when layout results in a size change. * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::layoutSizeChanged): Fire the "resize" event at the shadow DOM. * html/HTMLMediaElement.h: * rendering/RenderMedia.cpp: (WebCore::RenderMedia::layout): Trigger layoutSizeChanged() * rendering/RenderMedia.h: Drive-by fixes: * Modules/mediacontrols/mediaControlsApple.js: (Controller.prototype.createControls): aria-label text is totally wrong; removed. (Controller.prototype.updateWirelessPlaybackStatus): Use class-names to hide controls, not inline styles. 2015-05-13 Ryosuke Niwa Crash in ReplaceSelectionCommand::removeRedundantStylesAndKeepStyleSpanInline https://bugs.webkit.org/show_bug.cgi?id=119068 Reviewed by Enrica Casucci. The bug was caused by makeInsertedContentRoundTrippableWithHTMLTreeBuilder not updating nodes kept tracked by insertedNodes and moveNodeOutOfAncestor stumbling upon it. Fixed the bug by updating insertedNodes in makeInsertedContentRoundTrippableWithHTMLTreeBuilder. Test: editing/inserting/insert-table-in-paragraph-crash.html * editing/ReplaceSelectionCommand.cpp: (WebCore::ReplaceSelectionCommand::makeInsertedContentRoundTrippableWithHTMLTreeBuilder): (WebCore::ReplaceSelectionCommand::moveNodeOutOfAncestor): * editing/ReplaceSelectionCommand.h: 2015-05-14 Myles C. Maxfield [Mac] Expose more font weights for -apple-system https://bugs.webkit.org/show_bug.cgi?id=144707 Reviewed by Simon Fraser. Previously, when we parsed a CSS declaration of the form font: keyword; where keyword is one of caption, icon, menu, message-box, small-caption, -webkit-mini-control, -webkit-small-control, or -webkit-control (which html.css does for form controls), we would ask the system what the appropriate system font is, get that font's family name, and synthesize a font-family CSS property for the element. Then, later when we actually go to look up the font, we would look up the font by family name using this information. However, this round-tripping of a font through a family name is actually lossy, and is not guaranteed to preserve system-font-ness (which we use for various things including metrics calculations). This patch modifies this logic to specify a token family name instead, which the font lookup code special cases (and reacts by making the appropriate system-font lookup call). This approach is currently how iOS handles these system fonts; this patch simply brings this approach to OS X. There is also an added progression here. We used to simply call [NSFont fontWithName:size:] on the system font family name (which the parser found for us) which entirely disregards weight. This means that we used to be getting synthesized bold in form controls which ask for a heavy weight. Migrating to this system-font aware call means that we get the real bold font instead of synthesized bold. Once this system-font-ness is guaranteed to be preserved between parsing time and font lookup time, we can safely migrate to using [NSFont systemFontOfSize:weight] instead of [NSFont systemFontOfSize:] on platforms which support it. Tests: fast/text/systemFont.html fast/css/css2-system-fonts.html fast/forms/select/optgroup-rendering.html fast/forms/validation-message-appearance.html * css/CSSParser.cpp: (WebCore::CSSParser::parseSystemFont): Add a comment regarding why we are bothering with expanding out the font property in the first place. * platform/graphics/cocoa/FontCascadeCocoa.mm: (WebCore::FontCascade::primaryFontIsSystemFont): Update to use new system font tokens. * platform/graphics/mac/FontCacheMac.mm: (WebCore::toNSFontWeight): New static method to map font weights to NSFontWeight constants available on Yosemite and later. (WebCore::fontWithFamilySpecialCase): Pull all these special-case font token name handling into a separate function, which returns an Optional. (WebCore::fontWithFamily): * platform/mac/ThemeMac.mm: (WebCore::ThemeMac::controlFont): Use the font token name instead of the generated system font family name. * platform/spi/mac/NSFontSPI.h: Add [NSFont systemFontWithSize:weight:] and the proper NSFontWeight constants. * rendering/RenderThemeMac.mm: (WebCore::RenderThemeMac::updateCachedSystemFontDescription): Use the font token names instead of the generated system font family name. (WebCore::RenderThemeMac::setFontFromControlSize): Ditto. 2015-05-14 Roger Fong Add internals setting to disable wireless playback availability for layout tests https://bugs.webkit.org/show_bug.cgi?id=145012. Reviewed by Eric Carlson. * testing/InternalSettings.cpp: (WebCore::InternalSettings::resetToConsistentState): (WebCore::InternalSettings::setWirelessPlaybackDisabled): * testing/InternalSettings.idl: 2015-05-14 Beth Dakin Change range of possible forces for mouseforcechanged DOM event https://bugs.webkit.org/show_bug.cgi?id=144987 -and corresponding- rdar://problem/20472802 Reviewed by Tim Horton. Change to a 0-3 range. * platform/PlatformMouseEvent.h: * platform/mac/PlatformEventFactoryMac.mm: (WebCore::PlatformMouseEventBuilder::PlatformMouseEventBuilder): 2015-05-14 Manuel Rego Casasnovas Fix typo in RenderBox::instrinsicScrollbarLogicalWidth() https://bugs.webkit.org/show_bug.cgi?id=144999 Reviewed by Sergio Villar Senin. Rename RenderBox::instrinsicScrollbarLogicalWidth() to RenderBox::intrinsicScrollbarLogicalWidth(). No new tests, no behavior changes. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::computeIntrinsicLogicalWidths): * rendering/RenderBlockFlow.cpp: (WebCore::RenderBlockFlow::computeIntrinsicLogicalWidths): * rendering/RenderBox.cpp: (WebCore::RenderBox::intrinsicScrollbarLogicalWidth): (WebCore::RenderBox::instrinsicScrollbarLogicalWidth): Deleted. * rendering/RenderBox.h: * rendering/RenderDeprecatedFlexibleBox.cpp: (WebCore::RenderDeprecatedFlexibleBox::computeIntrinsicLogicalWidths): * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::computeIntrinsicLogicalWidths): 2015-05-14 Youenn Fablet SharedBuffer::createWithContentsOfFile should use map file routines https://bugs.webkit.org/show_bug.cgi?id=144192 Reviewed by Darin Adler. Made use of mmap routines within SharedBuffer::createWithContentsOfFile for EFL, GTK and Mac ports. If mapping is failing, it falls back to the previous version of SharedBuffer::createWithContentsOfFile renamed as SharedBuffer::createFromReadingFile (using open/read method). File content is mapped until SharedBuffer is cleared, destroyed or additional content is appended to the SharedBuffer. A helper class, MappedFileData, is introduced to handle mapped files through calls to open/mmap/munmap/close. Patch covered by existing layout tests and added unit tests. * platform/FileSystem.cpp: (WebCore::MappedFileData::MappedFileData): (WebCore::MappedFileData::operator=): (WebCore::MappedFileData::~MappedFileData): * platform/FileSystem.h: (WebCore::MappedFileData::MappedFileData): (WebCore::MappedFileData::operator bool): (WebCore::MappedFileData::data): (WebCore::MappedFileData::size): * platform/SharedBuffer.cpp: (WebCore::SharedBuffer::SharedBuffer): (WebCore::SharedBuffer::createWithContentsOfFile): Making use of MappedFileData before using createFromReadingFile. (WebCore::SharedBuffer::size): Checking whether data is coming from a MappedFileData. (WebCore::SharedBuffer::data): Ditto. (WebCore::SharedBuffer::append): Ditto. (WebCore::SharedBuffer::clear): Clearing MappedFileData if needed. (WebCore::SharedBuffer::copy): Transferring mapped data to buffer if needed. (WebCore::SharedBuffer::getSomeData): (WebCore::SharedBuffer::maybeTransferMappedFileData): * platform/SharedBuffer.h: * platform/gtk/SharedBufferGtk.cpp: (WebCore::SharedBuffer::createFromReadingFile): renamed from createWithContentsOfFile. * platform/mac/SharedBufferMac.mm: (WebCore::SharedBuffer::createFromReadingFile): Dito. * platform/posix/SharedBufferPOSIX.cpp: (WebCore::SharedBuffer::createFromReadingFile): Ditto. * platform/win/SharedBufferWin.cpp: (WebCore::SharedBuffer::createFromReadingFile): Ditto. 2015-05-13 Simon Fraser Get the ScriptController from the correct frame for media elements and plug-ins https://bugs.webkit.org/show_bug.cgi?id=144983 rdar://problem/20692642&19943135 Reviewed by Sam Weinig. HTMLMediaElement, QuickTimePluginReplacement and HTMLPlugInImageElement were getting the main frame's ScriptController instead of the one for their frame. This caused media controls JS to be running in the context of the main frame, which broke media controls which use getCSSCanvasContext() and -webkit-canvas. Fix by getting the frame via the element's document. Also undo r180584 which was working around this bug. * Modules/mediacontrols/mediaControlsiOS.js: (ControllerIOS.prototype.drawTimelineBackground): * Modules/plugins/QuickTimePluginReplacement.mm: (WebCore::QuickTimePluginReplacement::ensureReplacementScriptInjected): (WebCore::QuickTimePluginReplacement::installReplacement): * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::updateCaptionContainer): (WebCore::HTMLMediaElement::ensureMediaControlsInjectedScript): (WebCore::HTMLMediaElement::didAddUserAgentShadowRoot): (WebCore::HTMLMediaElement::pageScaleFactorChanged): * html/HTMLPlugInImageElement.cpp: (WebCore::HTMLPlugInImageElement::didAddUserAgentShadowRoot): 2015-05-13 Sungmann Cho Fix trivial typos in ApplyBlockElementCommand https://bugs.webkit.org/show_bug.cgi?id=144984 Reviewed by Alexey Proskuryakov. No new tests, no behavior change. * editing/ApplyBlockElementCommand.cpp: (WebCore::ApplyBlockElementCommand::formatSelection): (WebCore::ApplyBlockElementCommand::endOfNextParagraphSplittingTextNodesIfNeeded): (WebCore::ApplyBlockElementCommand::endOfNextParagrahSplittingTextNodesIfNeeded): Deleted. * editing/ApplyBlockElementCommand.h: 2015-05-13 David Kilzer REGRESION (r179958): Crash in WebCore::DocumentLoader::detachFromFrame when -[id decidePolicyForMIMEType:request:frame:decisionListener:] fails to call -[id download|ignore|use] Reviewed by Andy Estes. This change reverts r179958. It changes RELEASE_ASSERT*() statements back to Debug-only ASSERT*() statements. * loader/DocumentLoader.cpp: (WebCore::DocumentLoader::~DocumentLoader): (WebCore::DocumentLoader::continueAfterContentPolicy): (WebCore::DocumentLoader::detachFromFrame): 2015-05-13 Antti Koivisto Cached CSS image resources don't show up after reloading https://bugs.webkit.org/show_bug.cgi?id=144952 rdar://problem/13387307 Reviewed by Oliver Hunt. This is a symptom of a general problem that we don't revalidate subresources of cached parsed stylesheets. Fix by tightening the check we perform when choosing to used the cached sheet. If there are expired subresources we reparse the sheet. Test: http/tests/cache/stylesheet-sharing.html * css/CSSCrossfadeValue.cpp: (WebCore::CSSCrossfadeValue::traverseSubresources): (WebCore::CSSCrossfadeValue::hasFailedOrCanceledSubresources): Deleted. Replace hasFailedOrCanceledSubresources with general purpose subresource traversal functions. * css/CSSCrossfadeValue.h: * css/CSSFilterImageValue.cpp: (WebCore::CSSFilterImageValue::traverseSubresources): (WebCore::CSSFilterImageValue::hasFailedOrCanceledSubresources): Deleted. * css/CSSFilterImageValue.h: * css/CSSFontFaceSrcValue.cpp: (WebCore::CSSFontFaceSrcValue::traverseSubresources): (WebCore::CSSFontFaceSrcValue::hasFailedOrCanceledSubresources): Deleted. * css/CSSFontFaceSrcValue.h: * css/CSSImageSetValue.cpp: (WebCore::CSSImageSetValue::traverseSubresources): (WebCore::CSSImageSetValue::hasFailedOrCanceledSubresources): Deleted. * css/CSSImageSetValue.h: * css/CSSImageValue.cpp: (WebCore::CSSImageValue::traverseSubresources): (WebCore::CSSImageValue::hasFailedOrCanceledSubresources): Deleted. * css/CSSImageValue.h: * css/CSSValue.cpp: (WebCore::CSSValue::traverseSubresources): (WebCore::CSSValue::hasFailedOrCanceledSubresources): Deleted. * css/CSSValue.h: * css/CSSValueList.cpp: (WebCore::CSSValueList::traverseSubresources): (WebCore::CSSValueList::hasFailedOrCanceledSubresources): Deleted. * css/CSSValueList.h: * css/StyleProperties.cpp: (WebCore::StyleProperties::traverseSubresources): (WebCore::StyleProperties::hasFailedOrCanceledSubresources): Deleted. * css/StyleProperties.h: * css/StyleSheetContents.cpp: (WebCore::traverseSubresourcesInRules): (WebCore::StyleSheetContents::traverseSubresources): (WebCore::StyleSheetContents::subresourcesAllowReuse): Disallow reuse if there are expired subresources. (WebCore::StyleSheetContents::isLoadingSubresources): Testing support. (WebCore::childRulesHaveFailedOrCanceledSubresources): Deleted. (WebCore::StyleSheetContents::hasFailedOrCanceledSubresources): Deleted. * css/StyleSheetContents.h: (WebCore::StyleSheetContents::loadCompleted): * html/HTMLLinkElement.cpp: (WebCore::HTMLLinkElement::setCSSStyleSheet): * loader/cache/CachedCSSStyleSheet.cpp: (WebCore::CachedCSSStyleSheet::restoreParsedStyleSheet): * loader/cache/CachedCSSStyleSheet.h: * loader/cache/CachedImage.cpp: (WebCore::CachedImage::makeRevalidationDecision): (WebCore::CachedImage::mustRevalidateDueToCacheHeaders): Deleted. Move the logging code out from this function (it requires frame access this function doesn't otherwise need) and refactor to return a decision enum. * loader/cache/CachedImage.h: * loader/cache/CachedResource.cpp: (WebCore::CachedResource::makeRevalidationDecision): (WebCore::logResourceRevalidationReason): Deleted. (WebCore::CachedResource::mustRevalidateDueToCacheHeaders): Deleted. * loader/cache/CachedResource.h: (WebCore::CachedResource::loadFailedOrCanceled): * loader/cache/CachedResourceLoader.cpp: (WebCore::logRevalidation): (WebCore::logResourceRevalidationDecision): (WebCore::CachedResourceLoader::determineRevalidationPolicy): Move logging here. * testing/Internals.cpp: (WebCore::Internals::isSharingStyleSheetContents): (WebCore::Internals::isStyleSheetLoadingSubresources): * testing/Internals.h: * testing/Internals.idl: 2015-05-13 Ryuan Choi [CoordinatedGraphics] Remove scaleFactor from SurfaceUpdateInfo https://bugs.webkit.org/show_bug.cgi?id=144935 Reviewed by Darin Adler. The members of SurfaceUpdateInfo are only used to update tile except scaleFactor. So, this patch removes scaleFactor from SurfaceUpdateInfo. In addition, removes unnecessary parameters in createTile() No new tests because there is no behavior change. * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp: (WebCore::CoordinatedGraphicsLayer::createTile): * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h: * platform/graphics/texmap/coordinated/CoordinatedTile.cpp: (WebCore::CoordinatedTile::updateBackBuffer): * platform/graphics/texmap/coordinated/CoordinatedTile.h: * platform/graphics/texmap/coordinated/SurfaceUpdateInfo.h: 2015-05-13 Sam Weinig Modernize ContainerNode::childElementCount https://bugs.webkit.org/show_bug.cgi?id=144930 Reviewed by Darin Adler. * dom/ContainerNode.cpp: (WebCore::ContainerNode::childElementCount): Use std::distance to compute the number of child elements. * dom/ElementChildIterator.h: Add typedefs to make the child element iterators conform STL standards. 2015-05-13 Ryosuke Niwa REGRESSION(r183770): Crash inside WebEditorClient::shouldApplyStyle when applying underline https://bugs.webkit.org/show_bug.cgi?id=144949 Reviewed by Darin Adler. The crash was caused by the variant of applyStyleToSelection that takes EditingStyle passing a null pointer to shouldApplyStyle when we're only applying text decoration changes so that m_mutableStyle in the editing style is null. This didn't reproduce in execCommand since we wouldn't call shouldApplyStyle in that case. It didn't reproduce in my manual testing because font panel also sets text shadow, which ends up filling up m_mutableStyle. Fixed the bug by creating a mutable style properties when one is not provided by EditingStyle. Also fixed the "FIXME" in the function by converting text decoration changes to a corresponding text decoration value. The values passed to shouldApplyStyle now matches the old behavior prior to r183770. Test: editing/style/underline-by-user.html * editing/EditingStyle.cpp: (WebCore::EditingStyle::styleWithResolvedTextDecorations): Added. * editing/EditingStyle.h: * editing/Editor.cpp: (WebCore::Editor::applyStyleToSelection): Use styleWithResolvedTextDecorations to avoid the crash. 2015-05-13 Eric Carlson Work around HTMLMediaElement::documentDidResumeFromPageCache being called twice https://bugs.webkit.org/show_bug.cgi?id=144969 Reviewed by Alexey Proskuryakov. * dom/Document.cpp: (WebCore::Document::addPlaybackTargetPickerClient): Replace ASSERT with early return to work around https://webkit.org/b/144970. 2015-05-13 Timothy Horton Going back after resizing causes scroll knob to appear in the middle of the page https://bugs.webkit.org/show_bug.cgi?id=144968 Reviewed by Beth Dakin. * history/CachedPage.cpp: (WebCore::CachedPage::restore): (WebCore::CachedPage::clear): * history/CachedPage.h: (WebCore::CachedPage::markForContentsSizeChanged): * history/PageCache.cpp: (WebCore::PageCache::markPagesForContentsSizeChanged): * history/PageCache.h: Add a flag that will cause us to call updateContentsSize() after a page comes out of the page cache, if necessary. * page/FrameView.cpp: (WebCore::FrameView::setContentsSize): * page/FrameView.h: Mark all cached pages for this frame as needing updateContentsSize() when setContentsSize happens. This will ensure that scrollbar layers are repositioned when coming out of the page cache. 2015-05-13 Beth Dakin Need SPI to set the overlay scroll bar style https://bugs.webkit.org/show_bug.cgi?id=144928 -and corresponding- rdar://problem/20143614 Reviewed by Anders Carlsson. New ChromeClient function preferredScrollbarOverlayStyle() will fetch the scrollbar style that was set via the new SPI. * page/ChromeClient.h: If the preferredScrollbarOverlayStyle() is anything but None, then use it. None is used to indicate that the normal heuristic should compute the appropriate color. * page/FrameView.cpp: (WebCore::FrameView::recalculateScrollbarOverlayStyle): * page/FrameView.h: 2015-05-13 Brent Fulgham Scrollbars in overflow regions are not vanishing after scrolling with scroll snap points https://bugs.webkit.org/show_bug.cgi?id=142521 Reviewed by Darin Adler. The scrollbars were not being dismissed because they were not being notified that the wheel gesture was finished. This was happening because the wheel event 'ended' state has zero deltaX and deltaY. If the region did not allow stretching, it would exit early, never passing through the 'handleWheelEventPhase' code that would notify the scrollbar controller that the gesture had ended. * platform/ScrollableArea.cpp: (WebCore::ScrollableArea::mouseExitedContentArea): The wrong ScrollAnimator method was being called when the mouse exited the content area. * platform/mac/ScrollAnimatorMac.mm: (WebCore::ScrollAnimatorMac::handleWheelEvent): Do not early return when the wheel event has no change in X or Y coordinate. 2015-05-12 David Hyatt Don't compute selection painting info when we don't have selection. https://bugs.webkit.org/show_bug.cgi?id=144920 Reviewed by Simon Fraser. * rendering/InlineTextBox.cpp: (WebCore::InlineTextBox::paint): Just set the selection paint style to the text paint style when we don't have a selection at all. Computing the selection style takes time in the case where a ::selection pseudo is used on the page, so we don't want to waste time computing that info unless it's actually needed. 2015-05-13 Joseph Pecoraro Pass String as reference in more places https://bugs.webkit.org/show_bug.cgi?id=144769 Reviewed by Daniel Bates. * bindings/js/SerializedScriptValue.cpp: (WebCore::CloneSerializer::dumpString): (WebCore::CloneSerializer::dumpStringObject): * dom/DocumentMarkerController.cpp: (WebCore::DocumentMarkerController::addMarker): * dom/DocumentMarkerController.h: * inspector/InspectorApplicationCacheAgent.cpp: (WebCore::InspectorApplicationCacheAgent::assertFrameWithDocumentLoader): * inspector/InspectorApplicationCacheAgent.h: * inspector/InspectorNodeFinder.cpp: (WebCore::stripCharacters): (WebCore::InspectorNodeFinder::InspectorNodeFinder): * inspector/InspectorNodeFinder.h: 2015-05-13 Timothy Horton View scale changes are temporarily lost after restoring a page from the page cache https://bugs.webkit.org/show_bug.cgi?id=144934 Reviewed by Brady Eidson. * history/CachedPage.cpp: (WebCore::CachedPage::CachedPage): (WebCore::CachedPage::restore): (WebCore::CachedPage::clear): * history/CachedPage.h: (WebCore::CachedPage::markForDeviceOrPageScaleChanged): Renamed. * history/PageCache.cpp: (WebCore::PageCache::markPagesForDeviceOrPageScaleChanged): Renamed. * history/PageCache.h: Rename PageCache/CachedPage methods to make it more clear that they will eventually result in calling deviceOrPageScaleFactorChanged(). Also, use modern initialization for CachedPage members. * loader/HistoryController.cpp: (WebCore::HistoryController::saveScrollPositionAndViewStateToItem): (WebCore::HistoryController::restoreScrollPositionAndViewState): Store the pageScaleFactor on HistoryItem with the view scale factored out, because the view scale can change while the page is in the page cache, and WebCore needs a way - without consulting with WebKit2 - to apply the changed view scale to the cached page scale. * page/Page.cpp: (WebCore::Page::setViewScaleFactor): (WebCore::Page::setDeviceScaleFactor): * page/Page.h: (WebCore::Page::viewScaleFactor): Keep track of the viewScaleFactor, and mark all pages in the page cache as needing to call deviceOrPageScaleFactorChanged and do a full style recalc when they come back from the page cache. For now, we expect all callers of setPageScaleFactor (including WebKit2 and HistoryController) to multiply the viewScale in manually, to avoid the significant amount of change in WebCore that would be required to keep them totally separately. 2015-05-12 Zan Dobersek Reduce TransformationMatrix copies in MatrixTransformOperation, Matrix3DTransformOperation https://bugs.webkit.org/show_bug.cgi?id=144797 Reviewed by Darin Adler. Using std::swap() on TransformationMatrix objects which don't provide move constructors will result in copies. Instead, use a helper function in both MatrixTransformOperation and Matrix3DTransformOperation that calls TransformationMatrix::blend() and returns the new Matrix(3D)TransformOperation object, and call it with fromT and toT arguments switched when blending to identity. * platform/graphics/transforms/Matrix3DTransformOperation.cpp: (WebCore::createOperation): (WebCore::Matrix3DTransformOperation::blend): * platform/graphics/transforms/Matrix3DTransformOperation.h: No need to copy the m_matrix member, it won't change when passed to TransformationMatrix::multiply(). * platform/graphics/transforms/MatrixTransformOperation.cpp: (WebCore::createOperation): (WebCore::MatrixTransformOperation::blend): 2015-05-12 Carlos Garcia Campos [EGL][X11] XPixmap created in GLContextEGL::createPixmapContext() is leaked https://bugs.webkit.org/show_bug.cgi?id=144909 Reviewed by Sergio Villar Senin and Žan Doberšek. The pixmap is created and passed to eglCreatePixmapSurface(), but never released. eglCreatePixmapSurface() doesn't take the ownership of the pixmap, so we should explicitly free it when the GLContextEGL is destroyed. * platform/graphics/egl/GLContextEGL.cpp: (WebCore::GLContextEGL::createPixmapContext): Use XUniquePixmap and transfer the ownership to the context by using the new constructor that receives a XUniquePixmap&&. (WebCore::GLContextEGL::createContext): createPixmapContext() is now only defined for X11. (WebCore::GLContextEGL::GLContextEGL): New constructor that receives a XUniquePixmap&&. * platform/graphics/egl/GLContextEGL.h: Add new constructor and initialize the cairo device when defined to simplify constructors. 2015-05-12 Sungmann Cho Reindent DIBPixelData.h for consistency. https://bugs.webkit.org/show_bug.cgi?id=144942 Reviewed by Darin Adler. No new tests, no behavior change. * platform/graphics/win/DIBPixelData.h: (WebCore::DIBPixelData::DIBPixelData): (WebCore::DIBPixelData::buffer): (WebCore::DIBPixelData::bufferLength): (WebCore::DIBPixelData::size): (WebCore::DIBPixelData::bytesPerRow): (WebCore::DIBPixelData::bitsPerPixel): 2015-05-12 Commit Queue Unreviewed, rolling out r184224. https://bugs.webkit.org/show_bug.cgi?id=144946 Made inspector/page/main-frame-resource.html assert every time (Requested by ap on #webkit). Reverted changeset: "Web Inspector: REGRESSION (r181625): Timeline recording started from console.profile is always empty" https://bugs.webkit.org/show_bug.cgi?id=144882 http://trac.webkit.org/changeset/184224 2015-05-12 Jer Noble [Mac] Hang in MediaPlayerPrivateAVFoundationObjC::audioSourceProvider() - 'tracks' property not yet loaded https://bugs.webkit.org/show_bug.cgi?id=144937 Reviewed by Eric Carlson. Querying for the -[AVAsset tracks] property blocks for network loading; and could block forever if the asset in question is not reachable. Add a "safe" mechanism for querying the list of audible tracks, and use that when providing the audioSourceProvider() with an audible track. * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h: * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerItem): (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged): (WebCore::MediaPlayerPrivateAVFoundationObjC::audioSourceProvider): (WebCore::MediaPlayerPrivateAVFoundationObjC::processLegacyClosedCaptionsTracks): (WebCore::MediaPlayerPrivateAVFoundationObjC::safeAVAssetTracksForAudibleMedia): 2015-05-12 Ryosuke Niwa Mac build fix after r184228. * bindings/scripts/CodeGeneratorJS.pm: 2015-05-12 Simon Fraser Turn antialiased font dilation off by default https://bugs.webkit.org/show_bug.cgi?id=144940 rdar://problem/20923031 Reviewed by Sam Weinig. Turn antialised font dilation off by default. * page/Settings.cpp: (WebCore::Settings::Settings): * platform/graphics/FontCascade.cpp: 2015-05-12 Alex Christensen Don't export all JS bindings classes. https://bugs.webkit.org/show_bug.cgi?id=144932 Reviewed by Dan Bernstein. This change is good if it compiles and links successfully. * bindings/scripts/CodeGeneratorJS.pm: (ExportLabelForClass): Add a list of the JS bindings classes that need WEBCORE_EXPORT to prevent exporting too many symbols from WebCore. * bindings/scripts/test/JS/JSTestActiveDOMObject.h: * bindings/scripts/test/JS/JSTestCustomNamedGetter.h: * bindings/scripts/test/JS/JSTestEventConstructor.h: * bindings/scripts/test/JS/JSTestEventTarget.h: * bindings/scripts/test/JS/JSTestException.h: * bindings/scripts/test/JS/JSTestGenerateIsReachable.h: * bindings/scripts/test/JS/JSTestMediaQueryListListener.h: * bindings/scripts/test/JS/JSTestNamedConstructor.h: * bindings/scripts/test/JS/JSTestNode.h: * bindings/scripts/test/JS/JSTestNondeterministic.h: * bindings/scripts/test/JS/JSTestObj.h: * bindings/scripts/test/JS/JSTestOverloadedConstructors.h: * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h: * bindings/scripts/test/JS/JSTestTypedefs.h: * bindings/scripts/test/JS/JSattribute.h: * bindings/scripts/test/JS/JSreadonly.h: Update bindings tests to remove WEBCORE_EXPORT from most of the tests, but keep one test with WEBCORE_EXPORT and one test with WEBCORE_TESTSUPPORT_EXPORT. 2015-05-12 Brent Fulgham [Win] Update DXSDK_DIR settings for build system. Unreviewed build fix. * WebCore.vcxproj/WebCore.proj: Add DXSDK_DIR definition for builder. 2015-05-12 Gyuyoung Kim Return Ref instead of PassRefPtr in create() factory functions of WebCore/dom https://bugs.webkit.org/show_bug.cgi?id=144904 Reviewed by Andreas Kling. We return Ref when we're sure if pointer can't be null. If not, we use RefPtr instead PassRefPtr. No new tests, no behavior changes. * dom/AutocompleteErrorEvent.h: * dom/DOMNamedFlowCollection.h: (WebCore::DOMNamedFlowCollection::create): * dom/MessageChannel.h: (WebCore::MessageChannel::create): * dom/MessagePort.h: * dom/MutationObserver.cpp: (WebCore::MutationObserver::create): * dom/MutationObserver.h: * dom/NamedFlowCollection.h: * dom/NodeFilter.h: (WebCore::NodeFilter::create): * dom/NodeIterator.h: (WebCore::NodeIterator::create): * dom/ProcessingInstruction.cpp: (WebCore::ProcessingInstruction::create): * dom/ProcessingInstruction.h: * dom/ScriptedAnimationController.h: (WebCore::ScriptedAnimationController::create): * dom/SecurityPolicyViolationEvent.h: * dom/StaticNodeList.h: * dom/TemplateContentDocumentFragment.h: * dom/Touch.cpp: (WebCore::Touch::cloneWithNewTarget): * dom/Touch.h: (WebCore::Touch::create): * dom/TouchEvent.h: * dom/TouchList.h: (WebCore::TouchList::create): * dom/TreeWalker.h: (WebCore::TreeWalker::create): * dom/WebKitNamedFlow.cpp: (WebCore::WebKitNamedFlow::create): * dom/WebKitNamedFlow.h: * dom/default/PlatformMessagePortChannel.cpp: (WebCore::PlatformMessagePortChannel::create): * dom/default/PlatformMessagePortChannel.h: (WebCore::PlatformMessagePortChannel::MessagePortQueue::create): 2015-05-12 Matt Baker Web Inspector: REGRESSION (r181625): Timeline recording started from console.profile is always empty https://bugs.webkit.org/show_bug.cgi?id=144882 Reviewed by Brian Burg. A timeline recording will always be stopped before the end of the current run loop is observed. Before dispatching the recording stopped event, the last run loop record must be completed and sent to the frontend to prevent it from being discarded. * inspector/InspectorTimelineAgent.cpp: (WebCore::InspectorTimelineAgent::internalStop): 2015-05-12 Zalan Bujtas REGRESSION(r175617): Some text doesn't render on internationalculinarycenter.com https://bugs.webkit.org/show_bug.cgi?id=144917 rdar://problem/20545878 Reviewed by Andreas Kling. This patch ensures that text stroke width value is taken into account while calculating visual overflow for simple line layout. Ceiling the text stroke width value matches the normal text layout behaviour. Test: fast/text/simple-line-layout-text-stroke-width.html * rendering/SimpleLineLayoutFunctions.cpp: (WebCore::SimpleLineLayout::paintFlow): (WebCore::SimpleLineLayout::collectFlowOverflow): 2015-05-12 Alexey Proskuryakov Build fix. * platform/spi/cf/CFNetworkSPI.h: 2015-05-12 Brent Fulgham ROLLOUT [Win] Unreviewed build fix for older DirectX build environments. * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp: 2015-05-12 Joanmarie Diggs AX: [ATK] ARIA menu items should not have anonymous block children https://bugs.webkit.org/show_bug.cgi?id=144653 Reviewed by Chris Fleizach. Exclude anonymous block children of menu items from the accessible tree for ATK. Exclude list markers from the accessibility tree if the parent is not being exposed as an accessible list item. No new tests. Instead, modified the existing tests to reflect the correct behavior. * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored): * accessibility/atk/AccessibilityObjectAtk.cpp: (WebCore::AccessibilityObject::accessibilityPlatformIncludesObject): 2015-05-08 Alexey Proskuryakov [Mac] Share cookie storage between UI process and secondary processes https://bugs.webkit.org/show_bug.cgi?id=144820 rdar://problem/20572830 Reviewed by Darin Adler. * platform/network/mac/CookieJarMac.mm: * platform/spi/cf/CFNetworkSPI.h: Moved SPIs into an SPI header, so that WebKit2 could use them too without duplication. 2015-05-12 Chris Dumez [WK2] Log using diagnostic logging how far back in history we navigate https://bugs.webkit.org/show_bug.cgi?id=144919 Reviewed by Gavin Barraclough. Add diagnostic logging keys for logging back history navigation delta. * page/DiagnosticLoggingKeys.cpp: (WebCore::DiagnosticLoggingKeys::deltaKey): (WebCore::DiagnosticLoggingKeys::backNavigationKey): * page/DiagnosticLoggingKeys.h: 2015-05-12 Yoav Weiss Avoid CSSPrimitiveValue allocation when parsing sizes https://bugs.webkit.org/show_bug.cgi?id=144910 Reviewed by Darin Adler. Turn non-calc length calculation logic into a static method, so that it can be called without a CSSPrimitiveValue object. Then, call that method to calculate the default source-size length. No new tests, since no functionality change. * css/CSSPrimitiveValue.cpp: (WebCore::CSSPrimitiveValue::computeLengthDouble): Split out the logic for everything that's not calc into a static method. (WebCore::CSSPrimitiveValue::computeNonCalcLengthDouble): Static length computation logic for everything that is not calc. * css/CSSPrimitiveValue.h: (WebCore::CSSPrimitiveValue::isFontRelativeLength): Turn into static. * css/SourceSizeList.cpp: (WebCore::defaultLength): Use the new static method to compute the length. (WebCore::computeLength): Use the calc length computation methods directly. 2015-05-12 Brent Fulgham [Win] Unreviewed build fix for older DirectX build environments. * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp: Switch back to our d3d stub header to avoid build failures on July 2004 DXSDK build environments. 2015-05-12 Eric Carlson [Mac] Refine media playback target client configuration https://bugs.webkit.org/show_bug.cgi?id=144892 Reviewed by Brent Fulgham. Client and target picker state changes fequently happen several times in quick succession, so don't react to immediately so we can batch callbacks to the web process. * Modules/mediasession/WebMediaSessionManager.cpp: (WebCore::ClientState::ClientState): Store the client as a reference rather than a pointer because it can never be NULL. (WebCore::ClientState::operator == ): New. (WebCore::WebMediaSessionManager::addPlaybackTargetPickerClient): Schedule the initial client configuration and a target configuration check. (WebCore::WebMediaSessionManager::removePlaybackTargetPickerClient): Schedule a target monitoring update, and a target configuration check. (WebCore::WebMediaSessionManager::removeAllPlaybackTargetPickerClients): Ditto. (WebCore::WebMediaSessionManager::showPlaybackTargetPicker): Schedule a target monitoring update. (WebCore::WebMediaSessionManager::clientStateDidChange): If the client whose state has changed can play to a target, tell it to start using the target even if it isn't playing as long as no other client is actively using a target. (WebCore::WebMediaSessionManager::setPlaybackTarget): Configure clients after a pause. (WebCore::WebMediaSessionManager::configureNewClients): New, do new client configuration. (WebCore::WebMediaSessionManager::configurePlaybackTargetClients): New, configure target clients. (WebCore::WebMediaSessionManager::scheduleDelayedTask): Schedule the timer. (WebCore::WebMediaSessionManager::taskTimerFired): Execute delayed tasks. (WebCore::WebMediaSessionManager::find): * Modules/mediasession/WebMediaSessionManager.h: * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::setMuted): Call updateMediaState. (WebCore::HTMLMediaElement::setPlaying): Ditto. (WebCore::HTMLMediaElement::mediaPlayerCurrentPlaybackTargetIsWirelessChanged): Ditto. (WebCore::HTMLMediaElement::enqueuePlaybackTargetAvailabilityChangedEvent): Expand logging. (WebCore::HTMLMediaElement::updateMediaState): New, don't broadcast a media state change unless something actually changed. * html/HTMLMediaElement.h: * html/HTMLMediaSession.cpp: (WebCore::HTMLMediaSession::externalOutputDeviceAvailableDidChange): Update logging. (WebCore::HTMLMediaSession::setShouldPlayToPlaybackTarget): Ditto. (WebCore::HTMLMediaSession::mediaEngineUpdated): Cleanup. * platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm: (WebCore::MediaPlaybackTargetPickerMac::showPlaybackTargetPicker): Remove the call to deprecated API and the "-Wdeprecated-declarations". 2015-05-12 Joanmarie Diggs AX: [GTK] Defer to WebCore Accessibility for table exposure https://bugs.webkit.org/show_bug.cgi?id=144896 Reviewed by Chris Fleizach. Stop unconditionally exposing all HTMLTableElement nodes as AccessibilityTables for WebKitGtk. No new tests. Several existing tests already cover table exposure. They have been updated accordingly. * accessibility/AccessibilityTable.cpp: (WebCore::AccessibilityTable::computeIsTableExposableThroughAccessibility): 2015-05-12 Joanmarie Diggs [GTK][WK2] rowAtIndex is not implemented in DRT/WKTR https://bugs.webkit.org/show_bug.cgi?id=116971 Reviewed by Chris Fleizach. Because ATK lacks API to directly get an accessible row via its index, the implementation of rowAtIndex gets a cell in the indexed row and returns the parent row. The failing test continued to fail because AccessibilityARIAGridCell::parentTable called parentObjectUnignored at most twice, the second call in place to handle rows which are included in the tree. However, given a well-formed ARIA grid with a rowgroup that is interactive, that rowgroup also needs to be in the tree necessitating parentObjectUnignored be called a third time to get to the grid. Given a poorly-formed ARIA grid, there may additional objects which pass the test for inclusion standing in between the cell and grid necessitating more calls still. Therefore, ascend the hierarchy to find the parent grid. No new tests. The failing test now passes. * accessibility/AccessibilityARIAGridCell.cpp: (WebCore::AccessibilityARIAGridCell::parentTable): 2015-05-08 Carlos Garcia Campos [X11] Add XUniquePtr and XUniqueResource to automatically free X resources https://bugs.webkit.org/show_bug.cgi?id=144521 Reviewed by Darin Adler. Add XUniquePtr as a template alias of std:unique_ptr to handle X resources using pointers and XUniqueResource as a new class to handle X resources using a long unsigned identifier. This simplifies the code and makes it more difficult to leak X resources. * PlatformEfl.cmake: Add new files to compilation. * PlatformGTK.cmake: Ditto. * platform/graphics/cairo/BackingStoreBackendCairoX11.cpp: (WebCore::BackingStoreBackendCairoX11::BackingStoreBackendCairoX11): Remove the display member, and use XUnique for Pixmap and GC. (WebCore::BackingStoreBackendCairoX11::~BackingStoreBackendCairoX11): Remove code to explicitly free Pixmap and GC. (WebCore::BackingStoreBackendCairoX11::scroll): * platform/graphics/cairo/BackingStoreBackendCairoX11.h: * platform/graphics/glx/GLContextGLX.cpp: (WebCore::GLContextGLX::createWindowContext): Use XUnique and the new constructor that receives a XID, since there's no longer conflict with the one receiving a Pbuffer. (WebCore::GLContextGLX::createPbufferContext): Use XUnique and the new constructor that receives a XUniqueGLXPbuffer&&. (WebCore::GLContextGLX::createPixmapContext): (WebCore::GLContextGLX::createContext): (WebCore::GLContextGLX::GLContextGLX): (WebCore::GLContextGLX::~GLContextGLX): Remove code to explicitly free X resources. (WebCore::GLContextGLX::makeContextCurrent): (WebCore::GLContextGLX::cairoDevice): (WebCore::GLContextGLX::platformContext): * platform/graphics/glx/GLContextGLX.h: * platform/graphics/surfaces/egl/EGLXSurface.cpp: (WebCore::EGLXTransportSurfaceClient::EGLXTransportSurfaceClient): (WebCore::EGLXTransportSurfaceClient::destroy): (WebCore::EGLXTransportSurfaceClient::prepareTexture): * platform/graphics/surfaces/egl/EGLXSurface.h: * platform/graphics/surfaces/glx/GLXConfigSelector.h: (WebCore::GLXConfigSelector::findMatchingConfig): Use XUnique instead of the custom std::unique X11Deleter. (WebCore::GLXConfigSelector::findMatchingConfigWithVisualId): Ditto. * platform/graphics/surfaces/glx/GLXSurface.cpp: (WebCore::GLXTransportSurface::GLXTransportSurface): Ditto. (WebCore::GLXOffScreenSurface::initialize): * platform/graphics/surfaces/glx/X11Helper.cpp: (WebCore::X11Helper::createOffScreenWindow): Ditto. (WebCore::X11Helper::createPixmap): Ditto. * platform/graphics/surfaces/glx/X11Helper.h: * platform/graphics/x11/XUniquePtr.h: Remove X11Deleter. (WebCore::XPtrDeleter::operator()): * platform/graphics/x11/XUniqueResource.cpp: Added. (WebCore::XUniqueResource::deleteXResource): (WebCore::XUniqueResource::deleteXResource): (WebCore::XUniqueResource::deleteXResource): (WebCore::XUniqueResource::deleteXResource): (WebCore::XUniqueResource::deleteXResource): (WebCore::XUniqueResource::deleteXResource): * platform/graphics/x11/XUniqueResource.h: Added. (WebCore::XUniqueResource::XUniqueResource): (WebCore::XUniqueResource::operator=): (WebCore::XUniqueResource::~XUniqueResource): (WebCore::XUniqueResource::get): (WebCore::XUniqueResource::release): (WebCore::XUniqueResource::reset): (WebCore::XUniqueResource::operator!): (WebCore::XUniqueResource::operator UnspecifiedBoolType*): 2015-05-12 Zan Dobersek Move TransformOperation-based classes off of PassRefPtr https://bugs.webkit.org/show_bug.cgi?id=144876 Reviewed by Darin Adler. Remove uses of PassRefPtr from the TransformOperation class and its derivatives, operating on Ref and RefPtr objects instead. * platform/graphics/transforms/IdentityTransformOperation.h: * platform/graphics/transforms/Matrix3DTransformOperation.cpp: (WebCore::Matrix3DTransformOperation::blend): * platform/graphics/transforms/Matrix3DTransformOperation.h: * platform/graphics/transforms/MatrixTransformOperation.cpp: (WebCore::MatrixTransformOperation::blend): * platform/graphics/transforms/MatrixTransformOperation.h: * platform/graphics/transforms/PerspectiveTransformOperation.cpp: (WebCore::PerspectiveTransformOperation::blend): * platform/graphics/transforms/PerspectiveTransformOperation.h: * platform/graphics/transforms/RotateTransformOperation.cpp: (WebCore::RotateTransformOperation::blend): * platform/graphics/transforms/RotateTransformOperation.h: * platform/graphics/transforms/ScaleTransformOperation.cpp: (WebCore::ScaleTransformOperation::blend): * platform/graphics/transforms/ScaleTransformOperation.h: * platform/graphics/transforms/SkewTransformOperation.cpp: (WebCore::SkewTransformOperation::blend): * platform/graphics/transforms/SkewTransformOperation.h: * platform/graphics/transforms/TransformOperation.h: * platform/graphics/transforms/TransformOperations.cpp: (WebCore::TransformOperations::blendByMatchingOperations): * platform/graphics/transforms/TranslateTransformOperation.cpp: (WebCore::TranslateTransformOperation::blend): * platform/graphics/transforms/TranslateTransformOperation.h: 2015-05-12 Xabier Rodriguez Calvar and Youenn Fablet [Streams API] ReadableStream reader should not be disposable when having pending promises https://bugs.webkit.org/show_bug.cgi?id=144869 Reviewed by Darin Adler. Made error promise callback to take a ref to the reader so that the reader is not disposed as long as the promise callback is not resolved. Covered by tests added to streams/readable-stream-gc.html. * Modules/streams/ReadableStreamReader.cpp: (WebCore::ReadableStreamReader::ReadableStreamReader): Moved initialize() call outside constructor as it can ref/unref. (WebCore::ReadableStreamReader::releaseStreamAndClean): Added protector. * Modules/streams/ReadableStreamReader.h: * bindings/js/JSReadableStreamReaderCustom.cpp: (WebCore::JSReadableStreamReader::closed): Lambda for error now takes a ref to the reader. * bindings/js/ReadableJSStream.cpp: (WebCore::ReadableJSStream::Reader::create): Calling initialize() after adoptRef(). 2015-05-11 Zan Dobersek Clean up redundant resources in case of failure in GLContextEGL context creation methods https://bugs.webkit.org/show_bug.cgi?id=144878 Reviewed by Martin Robinson. GLContextEGL::createWindowContext() and GLContextEGL::createPixmapContext() methods should clean up the freshly-created resources when prematurely returning due to a failure. * platform/graphics/egl/GLContextEGL.cpp: (WebCore::GLContextEGL::createWindowContext): (WebCore::GLContextEGL::createPixmapContext): 2015-05-11 Dan Bernstein WebCore part of Trying to navigate to an invalid URL loads about:blank, but -[WKWebView URL] returns the invalid URL Reviewed by Alexey Proskuryakov. Test: TestWebKitAPI/Tests/WebKit2Cocoa/ProvisionalURLChange.mm In some cases, trying to navigate to an invalid URL results in navigation to about:blank. When the about:blank load is committed, the UI process still thinks that the provisional URL is the original, invalid URL, and updates its state to reflect that that’s the URL that has been committed. The provisional URL changes (1) when a provisional load begins, (2) when a server redirect happens, (3) when the client changes the request in willSendRequest, and (4) in this about:blank case. For (1) and (2), there are frame loader client callbacks. (3) is client- initiated. So this patch addresses (4). * loader/DocumentLoader.cpp: (WebCore::DocumentLoader::maybeLoadEmpty): If our request URL is changing to about:blank and while loading the main resource, call FrameLoaderClient::dispatchDidChangeProvisionalURL. * loader/FrameLoaderClient.h: Added dispatchDidChangeProvisionalURL with an empty implementation. 2015-05-11 Zalan Bujtas Text is misplaced when custom font does not have space glyph. https://bugs.webkit.org/show_bug.cgi?id=144879 Reviewed by Myles C. Maxfield This patch ensures that we use fallback font for the missing space glyph only when the rendered text has space in it. If a font does not provide all the glyphs required to render the associated text, we initiate fallback fonts. It is done while measuring the text at layout time. However due to the fact that we always pre-measure space, a font with no space glyph in it is never sufficient. (even when the text does not require space at all) Fallback fonts impact line positions through ascent/descent calculation. Test: fast/text/font-with-no-space-glyph.html * rendering/RenderText.cpp: (WebCore::RenderText::computePreferredLogicalWidths): * rendering/line/BreakingContext.h: (WebCore::WordTrailingSpace::WordTrailingSpace): (WebCore::WordTrailingSpace::width): (WebCore::BreakingContext::handleText): 2015-05-11 Simon Fraser Small tidyup in animations code https://bugs.webkit.org/show_bug.cgi?id=144893 Reviewed by Eric Carlson. Reading progress(1, 0, 0) in callers of AnimationBase::progress() was confusing, particularly as the last parameter is a TimingFunction*. Put default values in the header (with nullptr) and fix the callers. Also fix variable names in the implementation. * page/animation/AnimationBase.cpp: (WebCore::AnimationBase::progress): * page/animation/AnimationBase.h: * page/animation/ImplicitAnimation.cpp: (WebCore::ImplicitAnimation::animate): (WebCore::ImplicitAnimation::getAnimatedStyle): (WebCore::ImplicitAnimation::blendPropertyValueInStyle): 2015-05-11 Gyuyoung Kim Purge PassRefPtr in WebCore/rendering https://bugs.webkit.org/show_bug.cgi?id=144872 Reviewed by Darin Adler. As a step to remove PassRefPtr, this patch replaces PassRefPtr with Ref in WebCore/rendering. No new tests, no behavior changes. * rendering/HitTestingTransformState.h: (WebCore::HitTestingTransformState::create): * rendering/RenderLayer.cpp: (WebCore::ClipRects::create): * rendering/RenderThemeGtk.cpp: (WebCore::RenderThemeGtk::create): (WebCore::RenderTheme::themeForPage): * rendering/RenderThemeGtk.h: * rendering/RenderThemeIOS.h: * rendering/RenderThemeIOS.mm: (WebCore::RenderTheme::themeForPage): (WebCore::RenderThemeIOS::create): * rendering/RenderThemeMac.h: * rendering/RenderThemeMac.mm: (WebCore::RenderTheme::themeForPage): (WebCore::RenderThemeMac::create): * rendering/RenderThemeSafari.cpp: (WebCore::RenderThemeSafari::create): (WebCore::RenderTheme::themeForPage): * rendering/RenderThemeSafari.h: * rendering/RenderThemeWin.cpp: (WebCore::RenderThemeWin::create): (WebCore::RenderTheme::themeForPage): * rendering/RenderThemeWin.h: * rendering/TextAutoSizing.h: (WebCore::TextAutoSizingValue::create): * rendering/style/ShapeValue.h: (WebCore::ShapeValue::createShapeValue): (WebCore::ShapeValue::createBoxShapeValue): (WebCore::ShapeValue::createImageValue): * rendering/style/StyleCachedImage.h: * rendering/style/StyleCachedImageSet.h: * rendering/style/StyleGeneratedImage.h: * rendering/style/StylePendingImage.h: * rendering/style/StyleReflection.h: (WebCore::StyleReflection::create): 2015-05-11 Eric Carlson [Mac] Update device picker icon when video tracks change https://bugs.webkit.org/show_bug.cgi?id=144889 Reviewed by Brent Fulgham. * Modules/mediacontrols/mediaControlsApple.js: (Controller.prototype.updateHasVideo): 2015-05-11 Brent Fulgham Scroll snap logic should be triggered when resizing the WebView https://bugs.webkit.org/show_bug.cgi?id=142590 Reviewed by Simon Fraser. Tests coming in a second patch. Resizing of the main frame or overflow regions was properly recalculating the scroll snap points, but there was no code to honor these values when window resizing was occurring. The correction was handled in two ways: 1. Scrolling thread operations that moved to new snap points needed to notify the main thread that it had shifted to a new snap point, so that the resize code (which happens on the main thread) could ensure that we stayed clamped to the correct 'tile' in the snap region. 2. Main thread (overflow) resizes were likewise missing code to honor the current snap position after resizing calculations were complete. This change also required the addition of two indices to the scrollable area to track which scroll snap point was currently being used. We don't bother with a 'none' case because you cannot have a 'none' state when you have an active set of scroll snap points, and we do not execute this code if the scroll snap points are null. The FrameView code was computing updated snap offsets after it had dispatched frame view layout information to the scrolling thread, which was wrong. This was also corrected. I think it might be possible to track all of this state inside the ScrollController, but the current scroll snap architecture destroys and recreates the state each time a new set of interactions starts. This should be fixed in the future, which would allow us to remove some of this local state. * page/FrameView.cpp: (WebCore::FrameView::performPostLayoutTasks): Make sure 'updateSnapOffsets' is called prior to calling 'frameViewLayoutUpdated' so the scrolling thread gets correct updated points. Add a new call to 'scrollToNearestActiveSnapPoint', which will keep us on our current snap point during resize (if appropriate). * page/scrolling/AsyncScrollingCoordinator.cpp: (WebCore::AsyncScrollingCoordinator::updateScrollSnapOffsetIndices): Added. This finds and notifies the correct scroll region when a new snap position (index) has been selected by user interaction on the scrolling thread. (WebCore::AsyncScrollingCoordinator::deferTestsForReason): Added an assertion for 'isMainThread'. (WebCore::AsyncScrollingCoordinator::removeTestDeferralForReason): Ditto. * page/scrolling/AsyncScrollingCoordinator.h: * page/scrolling/AxisScrollSnapOffsets.h: (WebCore::closestSnapOffset): Modified to also return the selected snap point index so we can track it to handle resize operations. * page/scrolling/ScrollingTree.h: (WebCore::ScrollingTree::updateScrollSnapOffsetIndices): * page/scrolling/ThreadedScrollingTree.cpp: (WebCore::ThreadedScrollingTree::updateScrollSnapOffsetIndices): Added method to dispatch the active horizontal and vertical scroll snap indices back to the main thread. * page/scrolling/ThreadedScrollingTree.h: * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm: (WebCore::ScrollingTreeFrameScrollingNodeMac::handleWheelEvent): After the scroll controller processes the current event, notify the main thread of any change in the active scroll snap index. * platform/ScrollAnimator.cpp: (WebCore::ScrollAnimator::activeScrollSnapOffsetIndexDidChange): Added method to allow ScrollAnimator clients to find out about the current scroll snap state, which is only known by the ScrollController. (WebCore::ScrollAnimator::activeScrollSnapOffsetIndexForAxis): Ditto. * platform/ScrollAnimator.h: * platform/ScrollView.cpp: (WebCore::ScrollView::scrollToNearestActiveSnapPoint): Added method that allows us to set scroll position to one of our active scroll snap offsets. * platform/ScrollView.h: * platform/ScrollableArea.cpp: (WebCore::ScrollableArea::handleWheelEvent): If the active scroll snap offset has changed, make sure we keep track of the new values for potential resize operations. (WebCore::ScrollableArea::clearHorizontalSnapOffsets): Make sure to also clear out the current snap index. (WebCore::ScrollableArea::clearVerticalSnapOffsets): Ditto. (WebCore::ScrollableArea::nearestActiveSnapPoint): New method that returns an updated IntPoint reflecting the proper scroll position based on the active scroll snap offset. * platform/ScrollableArea.h: (WebCore::ScrollableArea::currentHorizontalSnapPointIndex): Added. (WebCore::ScrollableArea::setCurrentHorizontalSnapPointIndex): Added. (WebCore::ScrollableArea::currentVerticalSnapPointIndex): Added. (WebCore::ScrollableArea::setCurrentVerticalSnapPointIndex): Added. (WebCore::ScrollableArea::scrollToNearestActiveSnapPoint): Added. * platform/cocoa/ScrollController.h: (WebCore::ScrollControllerClient::activeScrollOffsetIndex): Added new method for clients to implement. (WebCore::ScrollController::activeScrollSnapOffsetIndexDidChange): Added. (WebCore::ScrollController::setScrollSnapOffsetIndexDidChange): Added. * platform/cocoa/ScrollController.mm: (WebCore::ScrollController::activeScrollSnapOffsetIndexForAxis): Helper method to return current active index (if applicable). (WebCore::ScrollController::setActiveScrollSnapOffsetIndexForAxis): Helper function to safely set the current active index. (WebCore::ScrollController::beginScrollSnapAnimation): Updated to keep track of the new active scroll snap index, as well as whether the current animation actually changed the active snap point offset. * platform/cocoa/ScrollSnapAnimatorState.h: Revise to use modern C++ initializers, and to track a new index that represents the current scroll snap offset. * platform/cocoa/ScrollSnapAnimatorState.mm: (WebCore::ScrollSnapAnimatorState::ScrollSnapAnimatorState): Update for modern C++ syntax. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::scrollToNearestActiveSnapPoint): New method to set scroll position to be one of our active scroll snap points. (WebCore::RenderLayer::updateScrollInfoAfterLayout): Add a new call to 'scrollToNearestActiveSnapPoint' so that we stay on the current scroll snap offset during resizing. * rendering/RenderLayer.h: 2015-05-11 Myles C. Maxfield Addressing post-review comments after r184037. Unreviewed. No new tests because there is no behavior change. * rendering/SimpleLineLayoutTextFragmentIterator.cpp: (WebCore::SimpleLineLayout::TextFragmentIterator::runWidth): 2015-05-11 Brent Fulgham [Win] Move Windows build target to Windows 7 (or newer) https://bugs.webkit.org/show_bug.cgi?id=144890 Reviewed by Anders Carlsson. Update linked SDK and minimal Windows level to be compatible with Windows 7 or newer. * WebCore.vcxproj/WebCore.vcxproj: * WebCore.vcxproj/WebCoreGenerated.vcxproj: * WebCore.vcxproj/WebCoreTestSupport.vcxproj: * WebCorePrefix.h: * config.h: * testing/js/WebCoreTestSupportPrefix.h: 2015-05-11 Joanmarie Diggs AX: [ATK] Always include rows in the tree of accessible tables https://bugs.webkit.org/show_bug.cgi?id=144885 Reviewed by Chris Fleizach. Remove the code that excluded rows from the tree of accessible tables for Gtk and Efl, the latter of which inherited the exclusion from the former. No new tests. We already have several tests which cover table hierarchy. The associated expectations have been updated as part of this fix. * accessibility/AccessibilityTable.cpp: (WebCore::AccessibilityTable::addChildrenFromSection): * accessibility/atk/WebKitAccessibleWrapperAtk.cpp: (webkitAccessibleGetParent): 2015-05-11 Matt Baker Web Inspector: REGRESSION (r175203): No profile information is shown in Inspector https://bugs.webkit.org/show_bug.cgi?id=144808 Reviewed by Darin Adler. Profiles started from the console should always use the Inspector environment's shared stopwatch. * inspector/InspectorTimelineAgent.cpp: (WebCore::InspectorTimelineAgent::startFromConsole): 2015-05-11 Alex Christensen [Content Extensions] Support domain-specific rules and exceptions. https://bugs.webkit.org/show_bug.cgi?id=144833 Reviewed by Darin Adler. Test: http/tests/contentextensions/domain-rules.html (And lots of API tests) This patch adds if-domain and unless-domain to the trigger in the JSON format. if-domain makes the rule apply only to domains in the list. unless-domain makes the rule apply to domains that are not in the list. All rules without if-domain or unless-domain are compiled into a set of DFAs. This behavior is unchanged. All rules with if-domain or unless-domain are compiled into a separate set of DFAs. The domains are also compiled into another set of DFAs. This makes 3 arrays of DFA bytecode instead of 1. If there are no domain specific rules, there is no change in behavior. If there are domain specific rules, the URL will be checked for matches in both filtersWithoutDomainsBytecode and filtersWithDomainsBytecode. If there are matches from filtersWithDomainsBytecode then the domain of the main document will be checked with domainFiltersBytecode to see which of the matches applies to this domain. * contentextensions/CombinedURLFilters.cpp: (WebCore::ContentExtensions::CombinedURLFilters::isEmpty): (WebCore::ContentExtensions::CombinedURLFilters::addDomain): * contentextensions/CombinedURLFilters.h: Added addDomain, which adds characters from a domain to the prefix tree directly without using YARR. * contentextensions/CompiledContentExtension.cpp: (WebCore::ContentExtensions::CompiledContentExtension::globalDisplayNoneSelectors): * contentextensions/CompiledContentExtension.h: * contentextensions/ContentExtensionCompiler.cpp: (WebCore::ContentExtensions::serializeActions): (WebCore::ContentExtensions::compileRuleList): Separate the rules into rules with domains and rules without domains and compile to bytecode. * contentextensions/ContentExtensionCompiler.h: Updated compiler interface to reflect the slightly more complicated structure. * contentextensions/ContentExtensionError.cpp: (WebCore::ContentExtensions::contentExtensionErrorCategory): * contentextensions/ContentExtensionError.h: Added new parsing errors. * contentextensions/ContentExtensionParser.cpp: (WebCore::ContentExtensions::getDomainList): (WebCore::ContentExtensions::loadTrigger): (WebCore::ContentExtensions::loadEncodedRules): * contentextensions/ContentExtensionRule.h: (WebCore::ContentExtensions::Trigger::operator==): Parse the new domain structures from JSON into the Trigger structure. * contentextensions/ContentExtensionsBackend.cpp: (WebCore::ContentExtensions::ContentExtensionsBackend::actionsForResourceLoad): Interpret as much bytecode as necessary to determine which rules apply to this URL and domain. * contentextensions/DFABytecode.h: (WebCore::ContentExtensions::instructionSizeWithArguments): * contentextensions/DFABytecodeCompiler.cpp: (WebCore::ContentExtensions::DFABytecodeCompiler::emitAppendAction): (WebCore::ContentExtensions::DFABytecodeCompiler::emitTestFlagsAndAppendAction): (WebCore::ContentExtensions::DFABytecodeCompiler::compileNode): * contentextensions/DFABytecodeCompiler.h: * contentextensions/DFABytecodeInterpreter.cpp: (WebCore::ContentExtensions::DFABytecodeInterpreter::interpretAppendAction): (WebCore::ContentExtensions::DFABytecodeInterpreter::interpretTestFlagsAndAppendAction): (WebCore::ContentExtensions::DFABytecodeInterpreter::actionsFromDFARoot): (WebCore::ContentExtensions::DFABytecodeInterpreter::interpret): * contentextensions/DFABytecodeInterpreter.h: * loader/ResourceLoadInfo.h: Keep track of which actions have an if-domain trigger. If an action is in the filtersWithDomainsBytecode, then it either has an if-domain or an unless-domain in its trigger. This requires additional information in the bytecode, so there are two new bytecode types. 2015-05-11 Yoav Weiss Add srcset, sizes and picture to the features json https://bugs.webkit.org/show_bug.cgi?id=144862 Reviewed by Benjamin Poulain. Add the srcset w descriptor and sizes attribute as a new feature in the JSON file, as well as adding the picture element and srcset's x descriptor as seperate features. No new tests, since no new functionality added. * features.json: 2015-05-11 Chris Dumez Fix checkingLogicalHeight initialization in Document::updateLayoutIfDimensionsOutOfDate() https://bugs.webkit.org/show_bug.cgi?id=144873 Reviewed by Simon Fraser. Fix checkingLogicalHeight initialization in Document::updateLayoutIfDimensionsOutOfDate(). checkingLogicalHeight should only be initialized to true when "dimensionsCheck & WidthDimensionsCheck" if isVertical is true. * dom/Document.cpp: (WebCore::Document::updateLayoutIfDimensionsOutOfDate): 2015-05-11 Daniel Bates [iOS] Close all open databases in expiration handler of process assertion https://bugs.webkit.org/show_bug.cgi?id=144661 Reviewed by Darin Adler. Expose functionality in WebCore to close all open databases. Closing a SQLite database will interrupt any in-progress database transactions. * Modules/webdatabase/AbstractDatabaseServer.h: * Modules/webdatabase/DatabaseManager.cpp: (WebCore::DatabaseManager::closeAllDatabases): Added; turns around and calls DatabaseServer::closeAllDatabases(). * Modules/webdatabase/DatabaseManager.h: Export DatabaseManager::closeAllDatabases() so that we can call in from WebKit2. * Modules/webdatabase/DatabaseServer.cpp: (WebCore::DatabaseServer::closeAllDatabases): Added; turns around and calls DatabaseTracker::closeAllDatabases(). * Modules/webdatabase/DatabaseServer.h: * Modules/webdatabase/DatabaseTracker.cpp: (WebCore::DatabaseTracker::closeAllDatabases): Added; closes all open databases. * Modules/webdatabase/DatabaseTracker.h: Export DatabaseTracker::closeAllDatabases() so that we can call in from Legacy WebKit. 2015-05-11 Antti Koivisto WebContent crash under com.apple.WebCore: WebCore::WebKitCSSResourceValue::isCSSValueNone const + 6 https://bugs.webkit.org/show_bug.cgi?id=144870 rdar://problem/20727702 Reviewed by Simon Fraser. No repro but we are seeing null pointer crashes like this: Thread 0 Crashed:: Dispatch queue: com.apple.main-thread 0 com.apple.WebCore 0x00007fff92da5706 WebCore::WebKitCSSResourceValue::isCSSValueNone() const + 6 1 com.apple.WebCore 0x00007fff93382b48 WebCore::MaskImageOperation::isCSSValueNone() const + 24 2 com.apple.WebCore 0x00007fff92e0475e WebCore::FillLayer::hasNonEmptyMaskImage() const + 30 * platform/graphics/MaskImageOperation.cpp: (WebCore::MaskImageOperation::MaskImageOperation): (WebCore::MaskImageOperation::isCSSValueNone): This would crash like this if both m_styleImage and m_cssMaskImageValue are null. There are no obvious guarantees that this doesn't happen. Two of the constructor variants allow it and there is setImage which may turn m_styleImage null later too. Fix by making null m_cssMaskImageValue always signify CSSValueNone. (WebCore::MaskImageOperation::cssValue): 2015-05-11 Chris Fleizach AX: Crash at WebCore::AccessibilityMenuList::addChildren() https://bugs.webkit.org/show_bug.cgi?id=144860 Reviewed by Mario Sanchez Prada. There were some unsafe pointer accesses in AccessibilityMenuList code that needed to be cleaned up. Test: accessibility/menu-list-crash2.html * accessibility/AccessibilityMenuList.cpp: (WebCore::AccessibilityMenuList::addChildren): 2015-05-11 Przemyslaw Szymanski [WebGL] Unnecessary condition check in the while loop https://bugs.webkit.org/show_bug.cgi?id=125001 Reviewed by Csaba Osztrogonác. While loop in this case needs to be optimized a little. For now a conditional statement in while will execute two times at begin. do-while loop avoids to check first statement. No new tests. No behaviour changed. * html/canvas/WebGLFramebuffer.cpp: (WebCore::WebGLFramebuffer::removeAttachmentFromBoundFramebuffer): 2015-05-11 Joonghun Park [GTK] Reorder Performance class's member initialization sequence https://bugs.webkit.org/show_bug.cgi?id=144858 Reviewed by Csaba Osztrogonác. No new tests, no new behaviors. * page/Performance.cpp: (WebCore::Performance::Performance): 2015-05-11 Zan Dobersek Reduce TransformationMatrix copies in WebKitCSSMatrix operations https://bugs.webkit.org/show_bug.cgi?id=144795 Reviewed by Darin Adler. Instead of copying the TransformationMatrix member, performing the operation on it and then copying it again when creating the new WebKitCSSMatrix object, copy it just once by first creating the new WebKitCSSMatrix object and then performing the operation on that object's TransformationMatrix directly. * css/WebKitCSSMatrix.cpp: (WebCore::WebKitCSSMatrix::multiply): (WebCore::WebKitCSSMatrix::translate): (WebCore::WebKitCSSMatrix::scale): (WebCore::WebKitCSSMatrix::rotate): (WebCore::WebKitCSSMatrix::rotateAxisAngle): (WebCore::WebKitCSSMatrix::skewX): (WebCore::WebKitCSSMatrix::skewY): 2015-05-11 Zan Dobersek Add missing vtable override specifiers under Source/WebCore/loader, Source/WebCore/xml https://bugs.webkit.org/show_bug.cgi?id=144793 Reviewed by Darin Adler. Update virtual method overrides under Source/WebCore/loader and Source/WebCore/dom which are missing the override specifier. * loader/DocumentThreadableLoader.h: (WebCore::DocumentThreadableLoader::refThreadableLoader): (WebCore::DocumentThreadableLoader::derefThreadableLoader): * loader/cache/CachedRawResource.h: * xml/parser/XMLDocumentParser.h: 2015-05-11 Zan Dobersek Add missing vtable override specifiers under Source/WebCore/accessibility, Source/WebCore/dom https://bugs.webkit.org/show_bug.cgi?id=144792 Reviewed by Darin Adler. Update virtual method overrides under Source/WebCore/accessibility and Source/WebCore/dom which are missing the override specifier. * accessibility/AccessibilityMockObject.h: (WebCore::AccessibilityMockObject::isDetachedFromParent): Deleted. * accessibility/AccessibilityRenderObject.h: * dom/DecodedDataDocumentParser.h: * dom/TouchEvent.h: 2015-05-10 Zan Dobersek Have MediaStream::getAudioTracks(), MediaStream::getVideoTracks() return const references https://bugs.webkit.org/show_bug.cgi?id=144794 Reviewed by Philippe Normand. * Modules/mediastream/MediaStream.h: getAudioTracks() and getVideoTracks() should return a const reference to the member variables, instead of copying the objects on every call. 2015-05-10 Gyuyoung Kim Use Ref instead of PassRefPtr in WebCore/page https://bugs.webkit.org/show_bug.cgi?id=144841 Reviewed by Darin Adler. To kill PassRefPtr, this patch replaces PassRefPtr with Ref or RefPtr in WebCore/page. No new tests, no behavior changes. * page/DebugPageOverlays.cpp: * page/EventSource.cpp: (WebCore::EventSource::create): * page/EventSource.h: * page/History.h: (WebCore::History::create): * page/Location.h: (WebCore::Location::create): * page/MainFrame.cpp: (WebCore::MainFrame::create): * page/MainFrame.h: * page/Navigator.h: (WebCore::Navigator::create): * page/PageOverlay.cpp: (WebCore::PageOverlay::create): * page/PageOverlay.h: * page/Performance.h: * page/PerformanceEntryList.h: (WebCore::PerformanceEntryList::create): * page/PerformanceMark.h: (WebCore::PerformanceMark::create): * page/PerformanceMeasure.h: (WebCore::PerformanceMeasure::create): * page/PerformanceNavigation.h: (WebCore::PerformanceNavigation::create): * page/PerformanceResourceTiming.h: (WebCore::PerformanceResourceTiming::create): * page/PerformanceTiming.h: (WebCore::PerformanceTiming::create): * page/PerformanceUserTiming.h: (WebCore::UserTiming::create): * page/Screen.h: * page/Settings.cpp: (WebCore::Settings::create): * page/Settings.h: * page/TextIndicator.cpp: (WebCore::TextIndicator::create): * page/TextIndicator.h: * page/UserContentController.cpp: (WebCore::UserContentController::create): * page/UserContentController.h: * page/UserMessageHandlerDescriptor.h: (WebCore::UserMessageHandlerDescriptor::create): * page/UserMessageHandlersNamespace.h: * page/VisitedLinkStore.h: * page/WebKitNamespace.h: (WebCore::WebKitNamespace::create): * page/WebKitPoint.h: (WebCore::WebKitPoint::create): * page/WorkerNavigator.h: (WebCore::WorkerNavigator::create): * page/animation/ImplicitAnimation.h: (WebCore::ImplicitAnimation::create): * page/animation/KeyframeAnimation.h: * page/mac/ServicesOverlayController.h: * page/mac/ServicesOverlayController.mm: (WebCore::ServicesOverlayController::Highlight::createForSelection): (WebCore::ServicesOverlayController::Highlight::createForTelephoneNumber): * page/scrolling/ScrollingCoordinator.cpp: (WebCore::ScrollingCoordinator::create): * page/scrolling/ScrollingCoordinator.h: * page/scrolling/ScrollingStateFixedNode.cpp: (WebCore::ScrollingStateFixedNode::create): (WebCore::ScrollingStateFixedNode::clone): * page/scrolling/ScrollingStateFixedNode.h: * page/scrolling/ScrollingStateFrameScrollingNode.cpp: (WebCore::ScrollingStateFrameScrollingNode::create): (WebCore::ScrollingStateFrameScrollingNode::clone): * page/scrolling/ScrollingStateFrameScrollingNode.h: * page/scrolling/ScrollingStateNode.h: * page/scrolling/ScrollingStateOverflowScrollingNode.cpp: (WebCore::ScrollingStateOverflowScrollingNode::create): (WebCore::ScrollingStateOverflowScrollingNode::clone): * page/scrolling/ScrollingStateOverflowScrollingNode.h: * page/scrolling/ScrollingStateStickyNode.cpp: (WebCore::ScrollingStateStickyNode::create): (WebCore::ScrollingStateStickyNode::clone): * page/scrolling/ScrollingStateStickyNode.h: * page/scrolling/ios/ScrollingCoordinatorIOS.mm: (WebCore::ScrollingCoordinator::create): * page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.h: * page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.mm: (WebCore::ScrollingTreeFrameScrollingNodeIOS::create): * page/scrolling/ios/ScrollingTreeIOS.cpp: (WebCore::ScrollingTreeIOS::create): * page/scrolling/mac/ScrollingCoordinatorMac.mm: (WebCore::ScrollingCoordinator::create): * page/scrolling/mac/ScrollingTreeFixedNode.h: * page/scrolling/mac/ScrollingTreeFixedNode.mm: (WebCore::ScrollingTreeFixedNode::create): * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h: * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm: (WebCore::ScrollingTreeFrameScrollingNodeMac::create): * page/scrolling/mac/ScrollingTreeMac.cpp: (ScrollingTreeMac::create): * page/scrolling/mac/ScrollingTreeMac.h: * page/scrolling/mac/ScrollingTreeStickyNode.h: * page/scrolling/mac/ScrollingTreeStickyNode.mm: (WebCore::ScrollingTreeStickyNode::create): 2015-05-10 Simon Fraser background-position sometimes doesn't work properly with background-attachment: fixed https://bugs.webkit.org/show_bug.cgi?id=103757 rdar://problem/18749925 Reviewed by Darin Adler. Fix sizing issues with fixed backgrounds when top content inset (blurred toolbar) is in effect. The primary issue was that positioningAreaSize was including the top content inset height, and should not have been, but there were also issues with the "fixedBackgroundPaintsInLocalCoordinates" code path, which kicks in when the root background is fixed. Tests: platform/mac-wk2/tiled-drawing/top-content-inset-fixed-attachment-cover-local.html platform/mac-wk2/tiled-drawing/top-content-inset-fixed-attachment-cover.html platform/mac-wk2/tiled-drawing/top-content-inset-fixed-attachment-local.html platform/mac-wk2/tiled-drawing/top-content-inset-fixed-attachment-positioned.html * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry): 2015-05-10 Sungmann Cho Get rid of the public item accessors in BackForwardClient https://bugs.webkit.org/show_bug.cgi?id=144827 Reviewed by Darin Adler. Remove backItem(), currentItem(), and forwardItem() from BackForwardClient. We can still use these functionalities through BackForwardController. No new tests, no behavior change. * history/BackForwardClient.h: (WebCore::BackForwardClient::backItem): Deleted. (WebCore::BackForwardClient::currentItem): Deleted. (WebCore::BackForwardClient::forwardItem): Deleted. 2015-05-10 Sungmann Cho Rename Length::isPercent() and Length::isPercentNotCalculated(). https://bugs.webkit.org/show_bug.cgi?id=144791 Reviewed by Darin Adler. 1. Rename these methods as below for consistency and clarity. Length::isPercentNotCalculated() => Length::isPercent() Length::isPercent() => Length::isPercentOrCalculated() 2. Simplify the condition check of length type in SVGLengthContext::valueForLength(). "length.isPercent() && !length.isCalculated()" => "length.isPercent()" No new tests, no behavior change. * css/CSSComputedStyleDeclaration.cpp: (WebCore::valueForImageSliceSide): (WebCore::valueForReflection): (WebCore::percentageOrZoomAdjustedValue): (WebCore::lineHeightFromStyle): (WebCore::ComputedStyleExtractor::propertyValue): * html/HTMLPlugInImageElement.cpp: (WebCore::is100Percent): * page/animation/AnimationBase.cpp: (WebCore::AnimationBase::computeTransformedExtentViaTransformList): * platform/Length.h: (WebCore::Length::percent): (WebCore::Length::isPercent): (WebCore::Length::isPercentOrCalculated): (WebCore::Length::isSpecified): (WebCore::Length::isPercentNotCalculated): Deleted. * platform/graphics/transforms/TranslateTransformOperation.h: * rendering/AutoTableLayout.cpp: (WebCore::AutoTableLayout::recalcColumn): (WebCore::AutoTableLayout::fullRecalc): (WebCore::shouldScaleColumns): (WebCore::AutoTableLayout::computeIntrinsicLogicalWidths): (WebCore::AutoTableLayout::calcEffectiveLogicalWidth): (WebCore::AutoTableLayout::layout): * rendering/FixedTableLayout.cpp: (WebCore::FixedTableLayout::calcWidthArray): (WebCore::FixedTableLayout::applyPreferredLogicalWidthQuirks): (WebCore::FixedTableLayout::layout): * rendering/RenderBlock.cpp: (WebCore::RenderBlock::isSelfCollapsingBlock): (WebCore::RenderBlock::textIndentOffset): * rendering/RenderBox.cpp: (WebCore::RenderBox::needsPreferredWidthsRecalculation): (WebCore::RenderBox::computeLogicalHeight): (WebCore::RenderBox::computeContentAndScrollbarLogicalHeightUsing): (WebCore::RenderBox::computePercentageLogicalHeight): (WebCore::RenderBox::computeReplacedLogicalWidthRespectingMinMaxWidth): (WebCore::RenderBox::computeReplacedLogicalWidthUsing): (WebCore::RenderBox::computeReplacedLogicalHeightUsing): (WebCore::RenderBox::availableLogicalHeightUsing): (WebCore::logicalWidthIsResolvable): (WebCore::RenderBox::percentageLogicalHeightIsResolvableFromBlock): (WebCore::RenderBox::hasUnsplittableScrollingOverflow): (WebCore::RenderBox::layoutOverflowRectForPropagation): * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::hasAutoHeightOrContainingBlockWithAutoHeight): (WebCore::RenderBoxModelObject::relativePositionOffset): (WebCore::RenderBoxModelObject::computedCSSPadding): (WebCore::RenderBoxModelObject::calculateImageIntrinsicDimensions): (WebCore::RenderBoxModelObject::calculateFillTileSize): * rendering/RenderDeprecatedFlexibleBox.cpp: (WebCore::RenderDeprecatedFlexibleBox::applyLineClamp): (WebCore::RenderDeprecatedFlexibleBox::clearLineClamp): * rendering/RenderElement.cpp: (WebCore::mustRepaintFillLayers): * rendering/RenderFileUploadControl.cpp: (WebCore::RenderFileUploadControl::computeIntrinsicLogicalWidths): * rendering/RenderFrameSet.cpp: (WebCore::RenderFrameSet::layOutAxis): * rendering/RenderImage.cpp: (WebCore::RenderImage::repaintOrMarkForLayout): * rendering/RenderInline.cpp: (WebCore::computeMargin): * rendering/RenderListBox.cpp: (WebCore::RenderListBox::computeIntrinsicLogicalWidths): * rendering/RenderMenuList.cpp: (RenderMenuList::computeIntrinsicLogicalWidths): * rendering/RenderObject.cpp: (WebCore::objectIsRelayoutBoundary): * rendering/RenderReplaced.cpp: (WebCore::RenderReplaced::computePreferredLogicalWidths): * rendering/RenderSlider.cpp: (WebCore::RenderSlider::computeIntrinsicLogicalWidths): * rendering/RenderTable.cpp: (WebCore::RenderTable::convertStyleLogicalHeightToComputedHeight): * rendering/RenderTableSection.cpp: (WebCore::RenderTableSection::layoutRows): * rendering/RenderTextControl.cpp: (WebCore::RenderTextControl::computeIntrinsicLogicalWidths): * rendering/RenderView.cpp: (WebCore::RenderView::layout): * rendering/RootInlineBox.cpp: (WebCore::RootInlineBox::verticalPositionForBox): * rendering/style/GridLength.h: (WebCore::GridLength::isPercentage): * rendering/style/GridTrackSize.h: (WebCore::GridTrackSize::isPercentage): * rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::computedLineHeight): * rendering/svg/RenderSVGRoot.cpp: (WebCore::RenderSVGRoot::hasRelativeDimensions): * svg/SVGLengthContext.cpp: (WebCore::SVGLengthContext::valueForLength): * svg/graphics/SVGImage.cpp: (WebCore::SVGImage::hasRelativeWidth): (WebCore::SVGImage::hasRelativeHeight): 2015-05-10 Sungmann Cho Remove unnecessary semicolons. https://bugs.webkit.org/show_bug.cgi?id=144844 Reviewed by Darin Adler. No new tests, no behavior change. * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: (WebCore::MediaPlayerPrivateAVFoundationObjC::supportsType): * platform/ios/PasteboardIOS.mm: (WebCore::Pasteboard::readString): * platform/mediastream/RealtimeMediaSourceCapabilities.h: (WebCore::RealtimeMediaSourceCapabilities::setHasVideoSource): * platform/network/mac/ResourceErrorMac.mm: (WebCore::ResourceError::nsError): * rendering/RenderThemeIOS.mm: (WebCore::getSharedFunctionRef): 2015-05-10 Sungmann Cho Remove unnecessary forward declarations in StyleProperties.h https://bugs.webkit.org/show_bug.cgi?id=144843 Reviewed by Darin Adler. No new tests, no behavior change. * css/StyleProperties.h: 2015-05-10 Darin Adler [Cocoa] Fix paths and resort WebCore project file https://bugs.webkit.org/show_bug.cgi?id=144838 Reviewed by Dan Bernstein. * WebCore.xcodeproj/project.pbxproj: Re-sorted this file with the sort-Xcode-project-file script and fixed the paths in the platform/ios directory. 2015-05-10 Xabier Rodriguez Calvar and Youenn Fablet [Streams API] Refactor ReadableStreamReader close promise callback cleaning https://bugs.webkit.org/show_bug.cgi?id=144799 Reviewed by Darin Adler. Moved close callback cleaning to releaseStream, which is now releaseStreamAndClean. Moved that method to private as it is no longer needed by subclasses. No behavior changes. * Modules/streams/ReadableStreamReader.cpp: (WebCore::ReadableStreamReader::releaseStreamAndClean): (WebCore::ReadableStreamReader::changeStateToClosed): (WebCore::ReadableStreamReader::changeStateToErrored): * Modules/streams/ReadableStreamReader.h: 2015-05-10 Darin Adler [Cocoa] Don't soft link DataDetectorsCore https://bugs.webkit.org/show_bug.cgi?id=144837 Reviewed by Dan Bernstein. Linking this in the normal way should slightly speed up the web process startup time. We don't need to soft link it: It's present in the OS X base system and there is no reference cycle with WebKit. * Configurations/WebCore.xcconfig: Added PrivateFrameworks to FRAMEWORK_SEARCH_PATHS for Mac and added DataDetectorsCore to OTHER_LDFLAGS_PLATFORM for Mac. We may want to do this later for iOS too. * WebCore.xcodeproj/project.pbxproj: Added DataDetectorsCoreSPI.h. * editing/mac/DataDetection.mm: (WebCore::DataDetection::detectItemAroundHitTestResult): Removed check to see if DataDetectorsCore is available. * page/mac/ServicesOverlayController.h: Simplified a forward declaration to only declare what we actually use. * page/mac/ServicesOverlayController.mm: Moved SOFT_LINK from here to the DataDetectorsSPI.h header. * platform/spi/cocoa/DataDetectorsCoreSPI.h: Added. This is the low level DataDetectorsCore framework, which has no reference cycle with WebKit, and which we can link to normally. Moved the content here from DataDetectorsSPI.h, added a USE(APPLE_INTERNAL_SDK) path that uses the system headers, and fixed the incorrect return type on DDScannerScanQuery, which was detected when using the system headers in conjunction with this file. * platform/spi/mac/DataDetectorsSPI.h: Removed the content of this file that was actually about DataDetectorsCore. Also added a USE(APPLE_INTERNAL_SDK) path that uses the system headers and moved a few stray DataDetectors SPI definitions from elsewhere into this header. 2015-05-10 Chris Fleizach AX: Don't expose elements as data tables just because they use display: table https://bugs.webkit.org/show_bug.cgi?id=144804 Reviewed by Mario Sanchez Prada. Elements will create RenderTable objects if they have display:table. We shouldn't assume these are accessibility tables. Test: accessibility/css-table-ignored.html * accessibility/AccessibilityTable.cpp: (WebCore::AccessibilityTable::isDataTable): 2015-05-09 Chris Dumez Introduce ParentNode.idl / NonDocumentTypeChildNode.idl https://bugs.webkit.org/show_bug.cgi?id=144825 Reviewed by Sam Weinig. Introduce ParentNode.idl / NonDocumentTypeChildNode.idl as per DOM specification and to avoid IDL code duplication: - https://dom.spec.whatwg.org/#interface-parentnode - https://dom.spec.whatwg.org/#interface-nondocumenttypechildnode No Web-Exposed behavior change. * CMakeLists.txt: * DerivedSources.make: * WebCore.xcodeproj/project.pbxproj: * dom/CharacterData.idl: * dom/Document.idl: * dom/DocumentFragment.idl: * dom/Element.idl: * dom/NonDocumentTypeChildNode.idl: Copied from Source/WebCore/dom/DocumentFragment.idl. * dom/ParentNode.idl: Copied from Source/WebCore/dom/DocumentFragment.idl. 2015-05-09 Chris Dumez Invalidate the FontCache on WebProcess suspension / critical memory pressure https://bugs.webkit.org/show_bug.cgi?id=144821 Reviewed by Antti Koivisto. Invalidate the FontCache on WebProcess suspension / critical memory pressure to free a bit more memory (an extra 4-16Kb per WebProcess on the pages I tested). We already purge inactive font data on non-critical memory warning but invalidating the whole FontCache takes care of clearing the FontCascade cache and the fontPlatformData cache as well. * platform/MemoryPressureHandler.cpp: (WebCore::MemoryPressureHandler::releaseCriticalMemory): 2015-05-09 Yoav Weiss Remove the PICTURE_SIZES build flag https://bugs.webkit.org/show_bug.cgi?id=144679 Reviewed by Benjamin Poulain. Removed the PICTURE_SIZES build time flag. No new tests, since there's no functionality change. * Configurations/FeatureDefines.xcconfig: * css/CSSGrammar.y.in: * css/CSSParser.cpp: (WebCore::CSSParser::detectAtToken): * css/CSSParser.h: * css/SourceSizeList.cpp: (WebCore::parseSizesAttribute): Deleted. * html/HTMLImageElement.cpp: (WebCore::HTMLImageElement::setBestFitURLAndDPRFromImageCandidate): * html/HTMLImageElement.h: (WebCore::HTMLImageElement::currentSrc): * html/HTMLImageElement.idl: * html/parser/HTMLPreloadScanner.cpp: (WebCore::TokenPreloadScanner::StartTagScanner::processAttributes): (WebCore::TokenPreloadScanner::StartTagScanner::processAttribute): * html/parser/HTMLSrcsetParser.cpp: (WebCore::parseDescriptors): (WebCore::pickBestImageCandidate): 2015-05-08 Myles C. Maxfield Remove convenience constructors for TextRun https://bugs.webkit.org/show_bug.cgi?id=144752 These convenience constructors are unnecessary. Moving the code that makes the StringView back to the call site will also help us make things more elegant in future refactoring. Reviewed by Darin Adler. No new tests because there is no behavior change. * css/CSSPrimitiveValue.cpp: (WebCore::CSSPrimitiveValue::formatNumberForCustomCSSText): Remove ambiguous call. * platform/graphics/StringTruncator.cpp: (WebCore::stringWidth): * platform/graphics/TextRun.h: (WebCore::TextRun::TextRun): * platform/mac/DragImageMac.mm: (WebCore::widthWithFont): (WebCore::drawAtPoint): * rendering/SimpleLineLayout.cpp: (WebCore::SimpleLineLayout::canUseFor): * rendering/SimpleLineLayoutTextFragmentIterator.cpp: (WebCore::SimpleLineLayout::TextFragmentIterator::Style::Style): (WebCore::SimpleLineLayout::TextFragmentIterator::runWidth): * rendering/TextPainter.cpp: (WebCore::TextPainter::paintText): 2015-05-08 Sam Weinig Element Traversal is not just Elements anymore https://bugs.webkit.org/show_bug.cgi?id=144822 Reviewed by Simon Fraser. Match other browsers and the new DOM spec at https://dom.spec.whatwg.org by exposing the element traversal methods on non-Elements. - Makes firstElementChild, lastElementChild and childElementCount available on Document and DocumentFragment in addition to Element. - Makes nextElementSibling and previousElementSibling available on CharacterData in addition to Element. Tests: fast/dom/element-traversal-on-character-data.html fast/dom/element-traversal-on-document-fragment.html fast/dom/element-traversal-on-document.html * dom/CharacterData.idl: Expose nextElementSibling and previousElementSibling. * dom/ContainerNode.cpp: (WebCore::ContainerNode::firstElementChild): (WebCore::ContainerNode::lastElementChild): (WebCore::ContainerNode::childElementCount): * dom/ContainerNode.h: Move implementations of firstElementChild, lastElementChild and childElementCount here from Element to make them shareable. * dom/Document.idl: * dom/DocumentFragment.idl: Expose firstElementChild, lastElementChild and childElementCount. * dom/Element.cpp: (WebCore::Element::firstElementChild): Deleted. (WebCore::Element::lastElementChild): Deleted. (WebCore::Element::previousElementSibling): Deleted. (WebCore::Element::nextElementSibling): Deleted. (WebCore::Element::childElementCount): Deleted. * dom/Element.h: Move element traversal functions down to Node and ContainerNode. * dom/Element.idl: Update comments to indicate where these functions are defined now. * dom/Node.cpp: (WebCore::Node::previousElementSibling): (WebCore::Node::nextElementSibling): * dom/Node.h: Move implementations of nextElementSibling and previousElementSibling here from Element to make them shareable. 2015-05-08 Michael Catanzaro , Martin Robinson [GTK] Checks for DEVELOPMENT_BUILD are all wrong https://bugs.webkit.org/show_bug.cgi?id=144746 Reviewed by Carlos Garcia Campos. Use ENABLE(DEVELOPER_MODE) rather than DEVELOPMENT_BUILD. * platform/gtk/GtkUtilities.cpp: * platform/gtk/GtkUtilities.h: * platform/text/gtk/HyphenationLibHyphen.cpp: (WebCore::availableLocales): 2015-05-08 Alexey Proskuryakov Crashes in SocketStreamHandleBase::close https://bugs.webkit.org/show_bug.cgi?id=144767 rdar://problem/20486538 Reviewed by Brady Eidson. This is a speculative fix, I could not reproduce the crash. * Modules/websockets/WebSocketChannel.cpp: (WebCore::WebSocketChannel::processFrame): Normally, processOutgoingFrameQueue() closes the handle in the end when called in OutgoingFrameQueueClosing state. But there is no definitive protection against processing two CLOSE frames, in which case we'd try to close the handle twice. * platform/network/cf/SocketStreamHandleCFNet.cpp: (WebCore::SocketStreamHandle::readStreamCallback): Passing empty data to the client results in the socket being closed, which makes no sense here. 2015-05-08 Commit Queue Unreviewed, rolling out r183996. https://bugs.webkit.org/show_bug.cgi?id=144806 ASan detected use-after free (Requested by ap on #webkit). Reverted changeset: "Remove convenience constructors for TextRun" https://bugs.webkit.org/show_bug.cgi?id=144752 http://trac.webkit.org/changeset/183996 2015-05-08 Eric Carlson [Mac] Playback target clients do not unregister on page reload https://bugs.webkit.org/show_bug.cgi?id=144761 Reviewed by Brady Eidson. * dom/Document.cpp: (WebCore::Document::prepareForDestruction): Unregister all target picker clients. * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::registerWithDocument): Register for page cache callback. (WebCore::HTMLMediaElement::unregisterWithDocument): Unregister for page cache callback. (WebCore::HTMLMediaElement::documentWillSuspendForPageCache): New. (WebCore::HTMLMediaElement::documentDidResumeFromPageCache): New. 2015-05-08 Chris Dumez Throttle RequestAnimationFrame in subframes that are outside the viewport https://bugs.webkit.org/show_bug.cgi?id=144718 Reviewed by Simon Fraser. Throttle RequestAnimationFrame in subframes that are outside the viewport or have "display: none" for performance and power. Tests: fast/animation/request-animation-frame-throttle-subframe-display-none.html fast/animation/request-animation-frame-throttle-subframe.html * dom/Document.h: (WebCore::Document::scriptedAnimationController): * dom/ScriptedAnimationController.cpp: (WebCore::ScriptedAnimationController::setThrottled): (WebCore::ScriptedAnimationController::isThrottled): * dom/ScriptedAnimationController.h: * loader/FrameLoader.cpp: (WebCore::FrameLoader::open): Call FrameView::setFrameRect() only *after* the view has been set on the Frame. Otherwise, setFrameRect() ends up calling viewportContentsChanged() and we hit the ASSERT(frame().view() == this) assertion in windowClipRect() because the Frame still has its old FrameView. This is covered by loader/go-back-to-different-window-size.html layout test. * page/FrameView.cpp: (WebCore::FrameView::viewportContentsChanged): (WebCore::FrameView::applyRecursivelyWithVisibleRect): (WebCore::FrameView::resumeVisibleImageAnimations): (WebCore::FrameView::updateScriptedAnimationsThrottlingState): (WebCore::FrameView::resumeVisibleImageAnimationsIncludingSubframes): (WebCore::FrameView::updateThrottledDOMTimersState): (WebCore::FrameView::scrollPositionChanged): Deleted. (WebCore::FrameView::sendResizeEventIfNeeded): Deleted. * page/FrameView.h: * testing/Internals.cpp: (WebCore::Internals::isRequestAnimationFrameThrottled): (WebCore::Internals::isTimerThrottled): Deleted. * testing/Internals.h: * testing/Internals.idl: 2015-05-08 Daniel Bates Fix the iOS Simulator external SDK build following Remove unused iOS Simulator-variant of CARenderServerRenderLayerWithTransform(). Also guard IOSurfaceRef-variant of CARenderServerRenderLayerWithTransform() with USE(IOSURFACE) since it is only applicable on platforms that use IOSurface. * platform/spi/cocoa/QuartzCoreSPI.h: 2015-05-08 Myles C. Maxfield Remove convenience constructors for TextRun https://bugs.webkit.org/show_bug.cgi?id=144752 These convenience constructors are unnecessary. Moving the code that makes the StringView back to the call site will also help us make things more elegant in future refactoring. Reviewed by Darin Adler. No new tests because there is no behavior change. * css/CSSPrimitiveValue.cpp: (WebCore::CSSPrimitiveValue::formatNumberForCustomCSSText): Remove ambiguous call. * platform/graphics/StringTruncator.cpp: (WebCore::stringWidth): * platform/graphics/TextRun.h: (WebCore::TextRun::TextRun): * platform/mac/DragImageMac.mm: (WebCore::widthWithFont): (WebCore::drawAtPoint): * rendering/SimpleLineLayout.cpp: (WebCore::SimpleLineLayout::canUseFor): * rendering/SimpleLineLayoutTextFragmentIterator.cpp: (WebCore::SimpleLineLayout::TextFragmentIterator::Style::Style): (WebCore::SimpleLineLayout::TextFragmentIterator::runWidth): * rendering/TextPainter.cpp: (WebCore::TextPainter::paintText): 2015-05-08 Xabier Rodriguez Calvar and Youenn Fablet [Streams API] ReadableStream constructor start function should be able to error the stream https://bugs.webkit.org/show_bug.cgi?id=141162 Reviewed by Darin Adler. This patch implements the functionality of the ReadableStreamController error function. It basically changes the state of the stream to errored, resolves the ready promise and rejects the closed promise. Adding support to reject promise with any JSValue. Support for storing the error is added to both reader and stream. Test: streams/readable-stream-controller-error.html and rebased tests * Modules/streams/ReadableStream.cpp: (WebCore::ReadableStream::changeStateToErrored): * Modules/streams/ReadableStream.h: * Modules/streams/ReadableStreamReader.cpp: (WebCore::ReadableStreamReader::initialize): (WebCore::ReadableStreamReader::closed): (WebCore::ReadableStreamReader::changeStateToClosed): (WebCore::ReadableStreamReader::changeStateToErrored): * Modules/streams/ReadableStreamReader.h: * bindings/js/JSDOMPromise.h: (WebCore::DeferredWrapper::reject): * bindings/js/JSReadableStreamControllerCustom.cpp: (WebCore::JSReadableStreamController::error): * bindings/js/JSReadableStreamReaderCustom.cpp: (WebCore::JSReadableStreamReader::closed): * bindings/js/ReadableJSStream.cpp: (WebCore::ReadableJSStream::createReader): (WebCore::ReadableJSStream::storeError): (WebCore::ReadableJSStream::Reader::storeError): (WebCore::ReadableJSStream::jsController): Deleted. * bindings/js/ReadableJSStream.h: 2015-05-08 Commit Queue Unreviewed, rolling out r183985. https://bugs.webkit.org/show_bug.cgi?id=144796 broke loader/go-back-to-different-window-size.html (Requested by kling on #webkit). Reverted changeset: "Throttle RequestAnimationFrame in subframes that are outside the viewport" https://bugs.webkit.org/show_bug.cgi?id=144718 http://trac.webkit.org/changeset/183985 2015-05-08 Youenn Fablet SharedBuffer::m_size should be initialized to 0 when defining it https://bugs.webkit.org/show_bug.cgi?id=144740 Reviewed by Darin Adler. Setting m_size to 0 when declaring it and updating constructor definitions. No change in behaviour. * platform/SharedBuffer.cpp: (WebCore::SharedBuffer::SharedBuffer): * platform/SharedBuffer.h: * platform/cf/SharedBufferCF.cpp: (WebCore::SharedBuffer::SharedBuffer): * platform/soup/SharedBufferSoup.cpp: (WebCore::SharedBuffer::SharedBuffer): 2015-05-08 Commit Queue Unreviewed, rolling out r183945. https://bugs.webkit.org/show_bug.cgi?id=144789 "It broke all the GTK+ tests" (Requested by KaL on #webkit). Reverted changeset: "[GTK] Checks for DEVELOPMENT_BUILD are all wrong" https://bugs.webkit.org/show_bug.cgi?id=144746 http://trac.webkit.org/changeset/183945 2015-05-07 Chris Dumez Throttle RequestAnimationFrame in subframes that are outside the viewport https://bugs.webkit.org/show_bug.cgi?id=144718 Reviewed by Simon Fraser. Throttle RequestAnimationFrame in subframes that are outside the viewport or have "display: none" for performance and power. Tests: fast/animation/request-animation-frame-throttle-subframe-display-none.html fast/animation/request-animation-frame-throttle-subframe.html * dom/Document.h: (WebCore::Document::scriptedAnimationController): * dom/ScriptedAnimationController.cpp: (WebCore::ScriptedAnimationController::setThrottled): (WebCore::ScriptedAnimationController::isThrottled): * dom/ScriptedAnimationController.h: * page/FrameView.cpp: (WebCore::FrameView::viewportContentsChanged): (WebCore::FrameView::applyRecursivelyWithVisibleRect): (WebCore::FrameView::resumeVisibleImageAnimations): (WebCore::FrameView::updateScriptedAnimationsThrottlingState): (WebCore::FrameView::resumeVisibleImageAnimationsIncludingSubframes): (WebCore::FrameView::updateThrottledDOMTimersState): (WebCore::FrameView::scrollPositionChanged): Deleted. (WebCore::FrameView::sendResizeEventIfNeeded): Deleted. * page/FrameView.h: * testing/Internals.cpp: (WebCore::Internals::isRequestAnimationFrameThrottled): (WebCore::Internals::isTimerThrottled): Deleted. * testing/Internals.h: * testing/Internals.idl: 2015-05-07 Yoav Weiss Calculate source-size length as a float https://bugs.webkit.org/show_bug.cgi?id=144766 Reviewed by Dean Jackson. Make sure that the source-size length is calculated as a float, to align with the spec. Test: fast/dom/HTMLImageElement/sizes/image-sizes-1x.html fast/dom/HTMLImageElement/sizes/image-sizes-2x.html * css/SourceSizeList.cpp: (WebCore::parseSizesAttribute): (WebCore::defaultLength): (WebCore::computeLength): * css/SourceSizeList.h: * html/HTMLImageElement.cpp: (WebCore::HTMLImageElement::parseAttribute): * html/parser/HTMLPreloadScanner.cpp: (WebCore::TokenPreloadScanner::StartTagScanner::processAttributes): * html/parser/HTMLSrcsetParser.cpp: (WebCore::pickBestImageCandidate): (WebCore::bestFitSourceForImageAttributes): * html/parser/HTMLSrcsetParser.h: 2015-05-07 Commit Queue Unreviewed, rolling out r183895. https://bugs.webkit.org/show_bug.cgi?id=144786 Many tests became flaky (Requested by ap on #webkit). Reverted changeset: "Expose more font weights for -apple-system" https://bugs.webkit.org/show_bug.cgi?id=144707 http://trac.webkit.org/changeset/183895 2015-05-07 Hyungwook Lee Add first-letter assert exception in RenderButton::setupInnerStyle(). https://bugs.webkit.org/show_bug.cgi?id=140517OB Reviewed by Darin Adler. StyleResolver references inner block's render style temporary in RenderBlock::styleDidChange() when we have first-letter css pseudo element. * rendering/RenderButton.cpp: (WebCore::RenderButton::setupInnerStyle): 2015-05-07 Chris Dumez Unreviewed, fix build after r183970. WEBCORE_EXPORT should not be used on inlined functions. * platform/graphics/ca/GraphicsLayerCA.h: 2015-05-07 Anders Carlsson Build fixes. * accessibility/mac/WebAccessibilityObjectWrapperMac.mm: (-[WebAccessibilityObjectWrapper doAXRTFForRange:]): * editing/cocoa/HTMLConverter.mm: (HTMLConverter::_addMarkersToList): * platform/mac/PasteboardMac.mm: (WebCore::writeFileWrapperAsRTFDAttachment): * platform/mac/PlatformPasteboardMac.mm: (WebCore::PlatformPasteboard::setTypes): Pass empty arrays and dictionaries instead of nil. * rendering/RenderThemeMac.mm: (WebCore::RenderThemeMac::paintSliderThumb): Pass the document view to the AppKit paint method. 2015-05-07 Gyuyoung Kim Purge PassRefPtr in WebCore/html - 3 https://bugs.webkit.org/show_bug.cgi?id=144686 Reviewed by Andreas Kling. Replace PassRefPtr with Ref in create() factory functions, because it doesn't have to change to be null. No new tests, no behavior changes. * html/FTPDirectoryDocument.h: * html/HTMLDetailsElement.cpp: (WebCore::DetailsContentElement::create): * html/HTMLKeygenElement.cpp: * html/HTMLSummaryElement.cpp: (WebCore::SummaryContentElement::create): * html/TimeRanges.cpp: (WebCore::TimeRanges::create): * html/shadow/SliderThumbElement.cpp: (WebCore::SliderContainerElement::create): * html/shadow/SliderThumbElement.h: (WebCore::SliderThumbElement::create): * html/shadow/SpinButtonElement.cpp: (WebCore::SpinButtonElement::create): * html/shadow/SpinButtonElement.h: * html/shadow/TextControlInnerElements.cpp: (WebCore::TextControlInnerContainer::create): (WebCore::TextControlInnerElement::create): (WebCore::TextControlInnerTextElement::create): (WebCore::SearchFieldResultsButtonElement::create): (WebCore::SearchFieldCancelButtonElement::create): * html/shadow/TextControlInnerElements.h: * html/shadow/YouTubeEmbedShadowElement.cpp: (WebCore::YouTubeEmbedShadowElement::create): * html/track/InbandDataTextTrack.cpp: (WebCore::InbandDataTextTrack::create): * html/track/InbandDataTextTrack.h: * html/track/InbandGenericTextTrack.cpp: (WebCore::InbandGenericTextTrack::create): * html/track/InbandGenericTextTrack.h: * html/track/InbandWebVTTTextTrack.cpp: (WebCore::InbandWebVTTTextTrack::create): * html/track/InbandWebVTTTextTrack.h: * html/track/LoadableTextTrack.h: * html/track/TextTrack.h: (WebCore::TextTrack::create): * html/track/TextTrackCueGeneric.cpp: * html/track/TextTrackCueGeneric.h: * html/track/TextTrackList.h: * html/track/VTTRegionList.h: (WebCore::VTTRegionList::create): 2015-05-07 Dean Jackson [iOS] MediaControls: disappear while scrubbing https://bugs.webkit.org/show_bug.cgi?id=144777 Reviewed by Eric Carlson. If we are scrubbing we shouldn't hide the controls. * Modules/mediacontrols/mediaControlsApple.js: (Controller.prototype.hideControls): Return early if we are scrubbing. * Modules/mediacontrols/mediaControlsiOS.js: (ControllerIOS.prototype): Add initial value for _potentiallyScrubbing and rename from non-underscored value throughout the file. (ControllerIOS.prototype.handleTimelineTouchEnd): When we finish scrubbing, reset the timer to hide the controls. 2015-05-07 Simon Fraser REGRESSION (r183300): Fixed elements flash when scrolling https://bugs.webkit.org/show_bug.cgi?id=144778 rdar://problem/20769741 Reviewed by Dean Jackson. After r183300 we can detached layer backing store when outside the coverage region. However, position:fixed layers are moved around by the ScrollingCoordinator behind GraphicsLayer's back, so we can do layer flushes with stale information about layer geometry. To avoid dropping backing store for layers in this situation, prevent backing store detachment on layers registered with the ScrollingCoordinator as viewport-constrained layers. Preventing detachment on a layer also prevents detachment on all descendant layers. * platform/graphics/GraphicsLayer.h: (WebCore::GraphicsLayer::setAllowsBackingStoreDetachment): (WebCore::GraphicsLayer::allowsBackingStoreDetachment): * platform/graphics/ca/GraphicsLayerCA.cpp: (WebCore::GraphicsLayerCA::GraphicsLayerCA): (WebCore::GraphicsLayerCA::setVisibleAndCoverageRects): Set m_intersectsCoverageRect to true if backing store detachment is prevented. (WebCore::GraphicsLayerCA::recursiveCommitChanges): Set a bit in the CommitState to communicate to descendants that detachment is prevented. * platform/graphics/ca/GraphicsLayerCA.h: (WebCore::GraphicsLayerCA::CommitState::CommitState): Deleted. * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::setIsScrollCoordinatedWithViewportConstrainedRole): * rendering/RenderLayerBacking.h: (WebCore::RenderLayerBacking::setScrollingNodeIDForRole): If registering with a non-zero nodeID for the ViewportConstrained role, turn off backing store detachment. 2015-05-07 Sam Weinig Consider implementing Document.scrollingElement https://bugs.webkit.org/show_bug.cgi?id=143609 Reviewed by Simon Fraser. Add the non-compliant implementation of Document.scrollingElement that the spec, found at http://dev.w3.org/csswg/cssom-view/#dom-document-scrollingelement, says we should have while we have non-compliant implementations of Element.scrollTop and Element.scrollLeft (fixing that is tracked by https://bugs.webkit.org/show_bug.cgi?id=106133). Tests: fast/dom/Document/scrollingElement-quirks-mode.html fast/dom/Document/scrollingElement-standards-mode.html * dom/Document.cpp: (WebCore::Document::scrollingElement): * dom/Document.h: * dom/Document.idl: 2015-05-07 Dean Jackson [iOS] While scrubbing and holding down, video continues to play https://bugs.webkit.org/show_bug.cgi?id=144776 Reviewed by Simon Fraser. When we are scrubbing a video, we should pause playback. As we let go of the scrubber playback can resume (but only if it was playing originally). * Modules/mediacontrols/mediaControlsiOS.js: (ControllerIOS.prototype.createControls): Listen for touchstart on the scrubber. (ControllerIOS.prototype.handleTimelineInput): Call the prototype, but pause if necessary. (ControllerIOS.prototype.handleTimelineChange): Just moved this to be with the other timeline functions. (ControllerIOS.prototype.handleTimelineTouchStart): Add the listeners for end and cancel. Remember that we are potentially about to scrub. (ControllerIOS.prototype.handleTimelineTouchEnd): Remove the listeners. 2015-05-07 Said Abou-Hallawa Applying a filter on an SVG element, which is larger than 4096 pixels, causes this element to be rendered shifted to the left https://bugs.webkit.org/show_bug.cgi?id=144335 Reviewed by Daniel Bates. Address comments raised by Darin Adler in review. * platform/graphics/ImageBuffer.cpp: (WebCore::ImageBuffer::sizeNeedsClamping): (WebCore::ImageBuffer::clampedSize): (WebCore::ImageBuffer::isSizeClamped): Deleted. * platform/graphics/ImageBuffer.h: The condition for the negative width/height in isSizeClamped() was wrong. Use FloatSize::isEmpty() instead and rename the function to sizeNeedsClamping(). The new function should return the opposite of the old function return value. * platform/graphics/filters/FilterEffect.cpp: (WebCore::FilterEffect::apply): (WebCore::FilterEffect::asUnmultipliedImage): (WebCore::FilterEffect::asPremultipliedImage): (WebCore::FilterEffect::copyUnmultipliedImage): (WebCore::FilterEffect::copyPremultipliedImage): (WebCore::FilterEffect::createUnmultipliedImageResult): (WebCore::FilterEffect::createPremultipliedImageResult): * rendering/FilterEffectRenderer.cpp: (WebCore::FilterEffectRenderer::updateBackingStoreRect): (WebCore::FilterEffectRendererHelper::beginFilterEffect): * rendering/svg/RenderSVGResourceFilter.cpp: (WebCore::RenderSVGResourceFilter::applyResource): Call the new function and negate the condition for the return value. 2015-05-07 Anders Carlsson Build fix. * editing/mac/EditorMac.mm: (WebCore::dataInRTFDFormat): (WebCore::dataInRTFFormat): 2015-05-07 Said Abou-Hallawa Applying a filter on an SVG element, which is larger than 4096 pixels, causes this element to be rendered shifted to the left https://bugs.webkit.org/show_bug.cgi?id=144335 Reviewed by Darin Adler. When the SVG element is larger than 4096x4096 pixels and it has a filter, a clipper or a masker, the ImageBuffer which is created for drawing the sourceGraphicBuffer has to be clamped to this size. The reason for this clamping is the FilterEffect simply ignores processing any ImageBuffer larger than this size. The bug was happening because we did not propagate the clamping logic to the FilterEffect. The FilterEffect result ImageBuffer was not clamped as what we do for drawing the sourceGraphicBuffer. If only the destination point is specified, the GraphicsContext::drawImageBuffer() assumes the source and the destination images have the same size which is not true with the clamping. The fix is to add the clamping logic to the FilterEffect. Two places we need to change. (1) FilterEffect::createImageBufferResult() has to apply the same clamping we do in SVGRenderingContext::createImageBuffer(). (2) FilterEffect::drawingRegionOfInputImage() has to consider the clamping when mapping from absolute coordinates to the ImageBuffer coordinates. Tests: svg/filters/big-sized-off-viewport-filter.svg * platform/graphics/ImageBuffer.cpp: (WebCore::ImageBuffer::isSizeClamped): (WebCore::ImageBuffer::clampedSize): (WebCore::ImageBuffer::clampedRect): * platform/graphics/ImageBuffer.h: (WebCore::ImageBuffer::setSpaceSize): Move all the clamping helper methods from SVGRenderingContext and RenderSVGResourceFilter to the ImageBuffer. * platform/graphics/filters/FEColorMatrix.cpp: (WebCore::FEColorMatrix::platformApplySoftware): Use logicalSize() of the result image instead of using absolutePaintRect(). The later returns the rectangle of the element without clamping. * platform/graphics/filters/FETile.cpp: (WebCore::FETile::platformApplySoftware): * rendering/svg/RenderSVGResourceClipper.cpp: (WebCore::RenderSVGResourceClipper::applyClippingToContext): * rendering/svg/RenderSVGResourceFilter.cpp: (WebCore::RenderSVGResourceFilter::applyResource): (WebCore::RenderSVGResourceFilter::fitsInMaximumImageSize): Deleted. * rendering/svg/RenderSVGResourceFilter.h: * rendering/svg/RenderSVGResourceGradient.cpp: (WebCore::createMaskAndSwapContextForTextGradient): (WebCore::clipToTextMask): * rendering/svg/RenderSVGResourceMasker.cpp: (WebCore::RenderSVGResourceMasker::applySVGMask): * rendering/svg/RenderSVGResourcePattern.cpp: (WebCore::RenderSVGResourcePattern::buildPattern): (WebCore::RenderSVGResourcePattern::createTileImage): Make the modifications which are needed because of moving the clamping helper methods to ImageBuffer and because of changing the prototype of SVGRenderingContext methods. * platform/graphics/filters/FilterEffect.cpp: (WebCore::FilterEffect::drawingRegionOfInputImage): Consider the clamping when mapping from absolute coordinates to the ImageBuffer coordinates. (WebCore::FilterEffect::createImageBufferResult): Apply the same clamping we do in SVGRenderingContext::createImageBuffer() when creating the FilterEffect result ImageBuffer. (WebCore::FilterEffect::apply): (WebCore::FilterEffect::asUnmultipliedImage): (WebCore::FilterEffect::asPremultipliedImage): (WebCore::FilterEffect::copyUnmultipliedImage): (WebCore::FilterEffect::copyPremultipliedImage): (WebCore::FilterEffect::createUnmultipliedImageResult): (WebCore::FilterEffect::createPremultipliedImageResult): (WebCore::FilterEffect::maxFilterArea): Deleted. (WebCore::FilterEffect::isFilterSizeValid): Deleted. * platform/graphics/filters/FilterEffect.h: Use the new ImageBuffer clamping helper methods and delete the local ones. * platform/graphics/transforms/AffineTransform.cpp: (WebCore::AffineTransform::scaleNonUniform): (WebCore::AffineTransform::scale): (WebCore::AffineTransform::translate): * platform/graphics/transforms/AffineTransform.h: Add new scale and translate overloads to AffineTransform. * rendering/FilterEffectRenderer.cpp: (WebCore::FilterEffectRenderer::updateBackingStoreRect): (WebCore::FilterEffectRendererHelper::beginFilterEffect): Code clean up. * rendering/svg/SVGRenderingContext.cpp: (WebCore::SVGRenderingContext::calculateScreenFontSizeScalingFactor): (WebCore::SVGRenderingContext::calculateTransformationToOutermostCoordinateSystem): Return the AffineTransform instead of passing it through the reference of an argument. (WebCore::SVGRenderingContext::createImageBuffer): (WebCore::SVGRenderingContext::createImageBufferForPattern): Deleted. Code clean up and method rename. (WebCore::SVGRenderingContext::clampedAbsoluteTargetRect): Deleted. (WebCore::SVGRenderingContext::clampedAbsoluteSize): Deleted. * rendering/svg/SVGRenderingContext.h: Move the clamping helper methods to the ImageBuffer class. 2015-05-07 Beth Dakin New force-related DOM events should fire in WK1 views https://bugs.webkit.org/show_bug.cgi?id=144663 -and corresponding- rdar://problem/20281886 Reviewed by Sam Weinig. All of the WK1 mouse events need to take the correspondingPressureEvent. * page/EventHandler.h: Make correspondingPressureEvent a part of CurrentEventScope. This is needed to have accurate pressure information for all of the mouse events in subframes. * page/mac/EventHandlerMac.mm: (WebCore::correspondingPressureEventSlot): (WebCore::EventHandler::correspondingPressureEvent): (WebCore::CurrentEventScope::CurrentEventScope): (WebCore::CurrentEventScope::~CurrentEventScope): These events don’t have an associated pressure, so send nil for the correspondingPressureEvent. (WebCore::EventHandler::wheelEvent): (WebCore::EventHandler::keyEvent): Pipe through correspondingPressureEvent. (WebCore::EventHandler::mouseDown): (WebCore::EventHandler::mouseDragged): (WebCore::EventHandler::mouseUp): (WebCore::EventHandler::mouseMoved): New function to handle pressure change events. (WebCore::EventHandler::pressureChange): Pipe through correspondingPressureEvent. (WebCore::EventHandler::passMouseMovedEventToScrollbars): (WebCore::EventHandler::currentPlatformMouseEvent): Take the correspondingPressureEvent in order to build a PlatformMouseEvent with the correct pressure information. * platform/mac/PlatformEventFactoryMac.h: * platform/mac/PlatformEventFactoryMac.mm: (WebCore::globalPointForEvent): (WebCore::pointForEvent): (WebCore::mouseButtonForEvent): (WebCore::PlatformMouseEventBuilder::PlatformMouseEventBuilder): (WebCore::PlatformEventFactory::createPlatformMouseEvent): 2015-05-06 Roger Fong Media Controls: Scrubber should be independent of actual video time, causes scrubber to be jumpy. https://bugs.webkit.org/show_bug.cgi?id=144700. Reviewed by Jer Noble. Update time and timeline during the timeline input event instead of the wrapper's mousemove. (Controller.prototype.handleWrapperMouseMove): (Controller.prototype.handleTimelineMouseMove): (Controller.prototype.drawTimelineBackground): (Controller.prototype.updateControlsWhileScrubbing): Updates time and scrubber to reflect timeline user input. 2015-05-07 Yoav Weiss Handle meta viewport in HTMLPreloadScanner https://bugs.webkit.org/show_bug.cgi?id=144640 Reviewed by Dean Jackson. Add support for the tag to the HTMLPreloadScanner and when the meta tag's name is viewport, get the document to process the tag's attribute value, and set its ViewportArgument. Tests: fast/dom/HTMLMetaElement/meta-preloader.html * html/parser/HTMLPreloadScanner.cpp: (WebCore::TokenPreloadScanner::tagIdFor): Added meta. (WebCore::TokenPreloadScanner::initiatorFor): Added meta. (WebCore::TokenPreloadScanner::StartTagScanner::StartTagScanner): Call document.processViewport is meta viewport encountered. (WebCore::TokenPreloadScanner::StartTagScanner::processAttributes): (WebCore::TokenPreloadScanner::StartTagScanner::processAttribute): Keep track of meta viewport tags. (WebCore::testPreloadScannerViewportSupport): Testing function that makes sure this functionality is working. * html/parser/HTMLPreloadScanner.h: * testing/Internals.cpp: (WebCore::Internals::testPreloaderSettingViewport): Calls the testing function. * testing/Internals.h: * testing/Internals.idl: 2015-05-07 Zalan Bujtas REGRESSION (r164449): Subpixel rendering: http://www.apple.com/iphone-6/ "Faster wireless." image displays vertical black line on 1x displays at specific window width. https://bugs.webkit.org/show_bug.cgi?id=144723 rdar://problem/18307094 Reviewed by Simon Fraser. This patch ensures that the backing store's graphics layer is always positioned on a device pixel boundary. While calculating the backing store's graphics layer location, its ancestor layer's compositing bounds is taken into account. However the compositing bounds is an unsnapped value, so in order to place the graphics layer properly, we need to pixel align the ancestor compositing bounds before using it to adjust the child's graphics layer position. Test: compositing/ancestor-compositing-layer-is-on-subpixel-position.html * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::updateGeometry): 2015-05-07 Yoav Weiss Fix sizes crash and add invalid value tests. https://bugs.webkit.org/show_bug.cgi?id=144739 Reviewed by Darin Adler. Make sure that only CSS length are allowed when the sizes parser is calling computeLength. Also make sure that for invalid lengths, the 100vw default is used instead. Test: fast/dom/HTMLImageElement/sizes/image-sizes-invalids.html * css/SourceSizeList.cpp: (WebCore::computeLength): (WebCore::defaultLength): (WebCore::parseSizesAttribute): 2015-05-07 Michael Catanzaro [GTK] Checks for DEVELOPMENT_BUILD are all wrong https://bugs.webkit.org/show_bug.cgi?id=144746 Reviewed by Martin Robinson. Use DEVELOPER_MODE rather than DEVELOPMENT_BUILD. * platform/gtk/GtkUtilities.cpp: * platform/gtk/GtkUtilities.h: * platform/text/gtk/HyphenationLibHyphen.cpp: (WebCore::availableLocales): 2015-05-07 Simon Fraser Remove the WK1-only code path for independently composited iframes https://bugs.webkit.org/show_bug.cgi?id=144722 Reviewed by Dean Jackson. In WebKit1 on Mac, we allowed iframes to be composited independently of their parent document, relying on the fact that the frame's platform view can host a layer-backed view. However, this ran into bugs (rdar://problem/18862298), and triggers the assertion at the end of FrameView::updateLayoutAndStyleIfNeededRecursive(), because the compositing update after a layout can dirty style in notifyIFramesOfCompositingChange(). Removing the WK1-only code path solves these problems. It also eliminates the need to do compositing-specific frame overlap testing. * page/FrameView.cpp: (WebCore::FrameView::setIsOverlapped): No need to do compositing-related things here. Any iframe that gets composited will participate in the normal compositing overlap testing in its parent frame. (WebCore::FrameView::hasCompositedContentIncludingDescendants): Deleted. (WebCore::FrameView::hasCompositingAncestor): Deleted. * page/FrameView.h: * rendering/RenderLayerCompositor.cpp: Replace ownerElement() checks in this file with an isMainFrameCompositor() for readability. Some 0->nullptr. (WebCore::RenderLayerCompositor::cacheAcceleratedCompositingFlags): (WebCore::RenderLayerCompositor::chromeClient): (WebCore::RenderLayerCompositor::enclosingCompositorFlushingLayers): (WebCore::RenderLayerCompositor::updateCompositingLayers): (WebCore::RenderLayerCompositor::appendDocumentOverlayLayers): (WebCore::RenderLayerCompositor::updateBacking): (WebCore::RenderLayerCompositor::layerTreeAsText): (WebCore::RenderLayerCompositor::frameContentsCompositor): (WebCore::RenderLayerCompositor::setIsInWindow): (WebCore::RenderLayerCompositor::requiresCompositingForScrollableFrame): (WebCore::RenderLayerCompositor::requiresCompositingForFrame): frameRenderer.requiresAcceleratedCompositing() already bails on no content RenderView, so the shouldPropagateCompositingToEnclosingFrame() check does nothing and is removed. (WebCore::RenderLayerCompositor::isAsyncScrollableStickyLayer): (WebCore::RenderLayerCompositor::requiresScrollLayer): (WebCore::RenderLayerCompositor::documentUsesTiledBacking): (WebCore::RenderLayerCompositor::isMainFrameCompositor): (WebCore::RenderLayerCompositor::shouldCompositeOverflowControls): (WebCore::RenderLayerCompositor::requiresOverhangAreasLayer): (WebCore::RenderLayerCompositor::requiresContentShadowLayer): (WebCore::RenderLayerCompositor::updateLayerForTopOverhangArea): (WebCore::RenderLayerCompositor::updateLayerForBottomOverhangArea): (WebCore::RenderLayerCompositor::updateLayerForHeader): (WebCore::RenderLayerCompositor::updateLayerForFooter): (WebCore::RenderLayerCompositor::ensureRootLayer): Main frame attaches via ChromeClient, all other frames attach via parent frame. (WebCore::RenderLayerCompositor::notifyIFramesOfCompositingChange): This call to scheduleSetNeedsStyleRecalc(SyntheticStyleChange) was the source of dirtying style after layout, but is no longer needed so remove it. (WebCore::RenderLayerCompositor::registerAllViewportConstrainedLayers): (WebCore::RenderLayerCompositor::unregisterAllViewportConstrainedLayers): (WebCore::RenderLayerCompositor::scrollingCoordinator): (WebCore::RenderLayerCompositor::graphicsLayerFactory): (WebCore::RenderLayerCompositor::allowsIndependentlyCompositedFrames): Deleted. (WebCore::RenderLayerCompositor::shouldPropagateCompositingToEnclosingFrame): Deleted. (WebCore::RenderLayerCompositor::mainFrameBackingIsTiled): Deleted. This was mis-named; it really asks whether the document uses tiled backing, but does not check for main frame. * rendering/RenderLayerCompositor.h: * rendering/RenderWidget.cpp: (WebCore::RenderWidget::paintContents): No need to do frame overlap testing for compositing now. 2015-05-06 Dean Jackson Handle backdrop views that have to tile https://bugs.webkit.org/show_bug.cgi?id=142317 Reviewed by Simon Fraser. Take 2 - this was rolled out because Mavericks was crashing. Make sure backdrop layers don't tile. If they are big enough, we'll leave it to the platform compositor to handle. This also fixes a bug where if a layer changed from a backdrop type to a tiled type, it would still retain its custom appearance and we'd try to add children to the wrong layer. Test: compositing/media-controls-bar-appearance-big.html * platform/graphics/ca/GraphicsLayerCA.cpp: (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers): Check if a layer needs a backdrop before checking if it needs to tile. 2015-05-05 Myles C. Maxfield Revert "Introducing the Platform Abstraction Layer (PAL)" https://bugs.webkit.org/show_bug.cgi?id=144751 Unreviewed. PAL should be a new target inside WebCore, rather than a top-level folder. * WebCore.xcodeproj/project.pbxproj: * Configurations/FeatureDefines.xcconfig: 2015-05-07 Dan Bernstein Tried to fix the build. * Configurations/WebCoreTestSupport.xcconfig: 2015-05-07 Joanmarie Diggs AX: [ATK] The pre element should be mapped to ATK_ROLE_SECTION; not ATK_ROLE_PANEL https://bugs.webkit.org/show_bug.cgi?id=144702 Reviewed by Chris Fleizach. Add a new PreRole AccessibilityRole so that per-platform mapping is possible. Map PreRole to ATK_ROLE_SECTION for Efl and Gtk; to NSAccessibilityGroupRole for the Mac. Add PreRole to the list of "text type" ATK roles. No new tests. Existing tests were updated to reflect the corrected mapping. * accessibility/AccessibilityObject.h: * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::determineAccessibilityRole): * accessibility/atk/AccessibilityObjectAtk.cpp: (WebCore::AccessibilityObject::allowsTextRanges): * accessibility/atk/WebKitAccessibleWrapperAtk.cpp: (atkRole): (roleIsTextType): * accessibility/mac/WebAccessibilityObjectWrapperMac.mm: (createAccessibilityRoleMap): 2015-05-07 Dan Bernstein [Xcode] Remove usage of AspenFamily.xcconfig in Source/ https://bugs.webkit.org/show_bug.cgi?id=144727 Reviewed by Darin Adler. * Configurations/Base.xcconfig: Don’t include AspenFamily.xcconfig. * Configurations/WebCore.xcconfig: For iOS, define INSTALL_PATH in terms of INSTALL_PATH_PREFIX, and set INSTALL_PATH_PREFIX for the iOS 8.x Simulator. * Configurations/WebCoreTestSupport.xcconfig: Define INSTALL_PATH in terms of INSTALL_PATH_PREFIX and INSTALL_PATH_ACTUAL, and define INSTALL_PATH_PREFIX for the iOS 8.x Simulator. 2015-05-07 Eric Carlson [Mac] Playback target isn't set on new element https://bugs.webkit.org/show_bug.cgi?id=144724 Reviewed by Jer Noble. * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h: * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer): Call setShouldPlayToPlaybackTarget if necessary. (WebCore::MediaPlayerPrivateAVFoundationObjC::setShouldPlayToPlaybackTarget): Remember the setting in case we don't have an AVPlayer yet. 2015-05-07 Yoav Weiss Fix will cause that DocumentMarkerController still stores the markers for detached node. The same issue occurs when the text gets cleared, for example, No new tests. Internals marker APIs operate on text node attached to the element. To test it we could expose document().markers().hasMarkers() but there is no more useful cases where it could be used. Another obstacle is that we are in isInShadowTree() so that there is no possible to register on "DOMSubtreeModified" event. Test cases attached to the bug: 1. input.value = "" https://bug-140999-attachments.webkit.org/attachment.cgi?id=245704 2. elem.removeChild(textNode) https://bug-140999-attachments.webkit.org/attachment.cgi?id=246515 Remove markers when text nodes are about to remove. * dom/Document.cpp: (WebCore::Document::nodeChildrenWillBeRemoved): Fixes input.value = "" (WebCore::Document::nodeWillBeRemoved): Fixes elem.removeChild(textNode) 2015-02-15 David Kilzer REGRESSION (r180082): WebCore Debug builds fail on Mavericks due to weak export symbols This should fix the build, but leaves a FIXME list in WebCore.unexp. * Configurations/WebCore.unexp: Add weak externals with a FIXME statement so they can be removed later. It's more important to fix the build first. * Configurations/WebCore.xcconfig: Change XCODE_VERSION_MINOR to XCODE_VERSION_MAJOR since the internal bots use version 5.1.1 which still has the error. 2015-02-15 Brian J. Burg Web Inspector: remove unused XHR replay code https://bugs.webkit.org/show_bug.cgi?id=141622 Reviewed by Timothy Hatcher. XHR Replay functionality became unused with the last frontend rewrite. Remove instrumentation and data storage classes only used by this feature. * inspector/InspectorInstrumentation.cpp: (WebCore::InspectorInstrumentation::documentThreadableLoaderStartedLoadingForClientImpl): Deleted. (WebCore::InspectorInstrumentation::willLoadXHRImpl): Deleted. (WebCore::InspectorInstrumentation::didFailXHRLoadingImpl): Deleted. * inspector/InspectorInstrumentation.h: (WebCore::InspectorInstrumentation::documentThreadableLoaderStartedLoadingForClient): Deleted. (WebCore::InspectorInstrumentation::willLoadXHR): Deleted. (WebCore::InspectorInstrumentation::didFailXHRLoading): Deleted. * inspector/InspectorResourceAgent.cpp: (WebCore::InspectorResourceAgent::didLoadResourceFromMemoryCache): (WebCore::InspectorResourceAgent::didFinishXHRLoading): (WebCore::InspectorResourceAgent::documentThreadableLoaderStartedLoadingForClient): Deleted. (WebCore::InspectorResourceAgent::willLoadXHR): Deleted. (WebCore::InspectorResourceAgent::didFailXHRLoading): Deleted. (WebCore::InspectorResourceAgent::replayXHR): Deleted. * inspector/InspectorResourceAgent.h: * inspector/NetworkResourcesData.cpp: (WebCore::NetworkResourcesData::clear): (WebCore::XHRReplayData::create): Deleted. (WebCore::XHRReplayData::XHRReplayData): Deleted. (WebCore::NetworkResourcesData::xhrReplayData): Deleted. (WebCore::NetworkResourcesData::setXHRReplayData): Deleted. (WebCore::NetworkResourcesData::reuseXHRReplayData): Deleted. * inspector/NetworkResourcesData.h: (WebCore::XHRReplayData::method): Deleted. (WebCore::XHRReplayData::url): Deleted. (WebCore::XHRReplayData::async): Deleted. (WebCore::XHRReplayData::formData): Deleted. (WebCore::XHRReplayData::headers): Deleted. (WebCore::XHRReplayData::includeCredentials): Deleted. (WebCore::NetworkResourcesData::ResourceData::xhrReplayData): Deleted. (WebCore::NetworkResourcesData::ResourceData::setXHRReplayData): Deleted. * loader/DocumentThreadableLoader.cpp: (WebCore::DocumentThreadableLoader::loadRequest): * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::createRequest): (WebCore::XMLHttpRequest::internalAbort): (WebCore::XMLHttpRequest::sendForInspectorXHRReplay): Deleted. * xml/XMLHttpRequest.h: 2015-02-15 Said Abou-Hallawa Crash when accessing an item in SVGTransformList and then removing a previous item from this list. https://bugs.webkit.org/show_bug.cgi?id=141550. Reviewed by David Kilzer. * svg/properties/SVGMatrixTearOff.h: (WebCore::SVGMatrixTearOff::create): Fix a compilation error on the release build. The ASSERT() here references a parameter which is not used anywhere else. We need to change it to ASSERT_UNUSED(). 2015-02-15 Said Abou-Hallawa Crash when accessing an item in SVGTransformList and then removing a previous item from this list. https://bugs.webkit.org/show_bug.cgi?id=141550. Reviewed by Darin Adler. Tests: LayoutTests/svg/dom/SVGTransformList-basics.xhtml: This test is modified to include a new test case. * svg/properties/SVGMatrixTearOff.h: m_value of SVGMatrixTearOff will be a null pointer. There is no point in having SVGMatrixTearOff points to the parent and the property of the parent at the same time. (WebCore::SVGMatrixTearOff::create): SVGMatrixTearOff will hold a pointer to the parent SVGPropertyTearOff. But it should overrides setValue() and propertyReference() so it can set and get the SVGMatrix from the SVGTransform parent. (WebCore::SVGMatrixTearOff::SVGMatrixTearOff): Pass a nullptr to the base class. SVGMatrixTearOff will act as a proxy of the parent. It does not hold any data by itself but it knows what property to set and get from the parent. * svg/properties/SVGPropertyTearOff.h: (WebCore::SVGPropertyTearOff::create): Add a create method which can take a pointer value. (WebCore::SVGPropertyTearOff::propertyReference): (WebCore::SVGPropertyTearOff::setValue): Make these functions virtual so concrete classes like SVGMatrixTearOff can override them. (WebCore::SVGPropertyTearOff::SVGPropertyTearOff): Add a new constructor. 2015-02-15 Said Abou-Hallawa Crash when accessing an item in SVGLengthList and then replacing it with a previous item in the list. https://bugs.webkit.org/show_bug.cgi?id=141552. Reviewed by Darin Adler. Tests: LayoutTests/svg/dom/SVGLengthList-basics.xhtml: This test is modified to include a new test case. * svg/properties/SVGListPropertyTearOff.h: Commit the removal of the replacing item before trying to detach the wrapper of the item which going to be replaced. 2015-02-15 David Kilzer CoreText only needs to be soft-linked on Windows More work towards the Maverick Debug build fix: REGRESSION (r180082): WebCore Debug builds fail on Mavericks due to weak export symbols * page/CaptionUserPreferencesMediaAF.cpp: 2015-02-15 Alexey Proskuryakov More build fixing. * platform/cocoa/TelephoneNumberDetectorCocoa.cpp: 2015-02-14 Alexey Proskuryakov More internal build fixing. DDDFACache.h is not an actual private header, so we were using open source redeclaration of DDDFACacheRef with an internal function prototype from DDDFAScanner.h. * platform/cocoa/TelephoneNumberDetectorCocoa.cpp: (WebCore::TelephoneNumberDetector::phoneNumbersScanner): 2015-02-14 Benjamin Poulain Add the initial matching implementation for attribute selectors with case-insensitive value https://bugs.webkit.org/show_bug.cgi?id=141615 Reviewed by Andreas Kling. Tests: fast/css/case-insensitive-attribute-selector-specificity.html fast/css/case-insensitive-attribute-selector-styling-html-1.html fast/css/case-insensitive-attribute-selector-styling-html-2.html fast/css/case-insensitive-attribute-selector-styling-html-3.html fast/css/case-insensitive-attribute-selector-styling-xhtml-1.xhtml fast/css/case-insensitive-attribute-selector-styling-xhtml-2.xhtml fast/css/case-insensitive-attribute-selector-styling-xhtml-3.xhtml fast/selectors/case-insensitive-attribute-bascis.html fast/selectors/case-insensitive-attribute-matching-style-attribute.html fast/selectors/case-insensitive-attribute-style-update.html fast/selectors/case-insensitive-attribute-with-case-sensitive-name.html * css/SelectorChecker.cpp: (WebCore::SelectorChecker::checkOne): We already had case-insensitive value matching due to some legacy HTML behaviors where some attribute values would be matched case-insensitively depending on the attribute name. For this patch, I just re-use the same mechanism. I used branches to try to convey the idea that matching is case sensitive by default unless the selector has a flag or we are in the weird HTML exception. * cssjit/SelectorCompiler.cpp: (WebCore::SelectorCompiler::constructFragmentsInternal): Disable that case in the CSS JIT for now, I'll implement it later. 2015-02-14 David Kilzer Declare soft-linked functions with extern "C" linkage More work towards the Maverick Debug build fix: REGRESSION (r180082): WebCore Debug builds fail on Mavericks due to weak export symbols * platform/mac/SoftLinking.h: Try declaring soft-linked functions with extern "C" linkage to see if they stop appearing as weak externals. This has the added benefit that if the function signature changes, we'll get a build failure. 2015-02-14 Joseph Pecoraro [Mac] RetainPtr member cleanup, possible leaks https://bugs.webkit.org/show_bug.cgi?id=141616 Reviewed by Andreas Kling. * platform/mac/PlatformSpeechSynthesizerMac.mm: (-[WebSpeechSynthesisWrapper speakUtterance:]): Adopt the allocated object to avoid a possible leak. * platform/mac/ScrollAnimatorMac.mm: (WebCore::ScrollAnimatorMac::ScrollAnimatorMac): Adopt to avoid unnecessary retain/autorelease. 2015-02-14 Joseph Pecoraro IncompleteMetaDataCue leak seen on leaks bot https://bugs.webkit.org/show_bug.cgi?id=141611 Reviewed by Eric Carlson. * platform/graphics/avfoundation/InbandMetadataTextTrackPrivateAVF.h: (WebCore::IncompleteMetaDataCue::IncompleteMetaDataCue): Deleted. (WebCore::IncompleteMetaDataCue::~IncompleteMetaDataCue): Deleted. (WebCore::IncompleteMetaDataCue::cueData): Deleted. (WebCore::IncompleteMetaDataCue::startTime): Deleted. Convert to a struct and hold a list of structs instead of pointers. * platform/graphics/avfoundation/InbandMetadataTextTrackPrivateAVF.cpp: (WebCore::InbandMetadataTextTrackPrivateAVF::addDataCue): (WebCore::InbandMetadataTextTrackPrivateAVF::updatePendingCueEndTimes): (WebCore::InbandMetadataTextTrackPrivateAVF::flushPartialCues): Update use of IncompleteMetaDataCue and modernize related code. 2015-02-09 Brian J. Burg Web Inspector: remove some unnecessary Inspector prefixes from class names in Inspector namespace https://bugs.webkit.org/show_bug.cgi?id=141372 Reviewed by Joseph Pecoraro. * WebCore.exp.in: * inspector/InspectorApplicationCacheAgent.cpp: (WebCore::InspectorApplicationCacheAgent::didCreateFrontendAndBackend): (WebCore::InspectorApplicationCacheAgent::willDestroyFrontendAndBackend): * inspector/InspectorApplicationCacheAgent.h: * inspector/InspectorCSSAgent.cpp: (WebCore::InspectorCSSAgent::didCreateFrontendAndBackend): (WebCore::InspectorCSSAgent::willDestroyFrontendAndBackend): * inspector/InspectorCSSAgent.h: * inspector/InspectorController.cpp: (WebCore::InspectorController::InspectorController): (WebCore::InspectorController::inspectedPageDestroyed): (WebCore::InspectorController::connectFrontend): (WebCore::InspectorController::disconnectFrontend): (WebCore::InspectorController::show): (WebCore::InspectorController::close): (WebCore::InspectorController::dispatchMessageFromFrontend): * inspector/InspectorController.h: * inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::didCreateFrontendAndBackend): (WebCore::InspectorDOMAgent::willDestroyFrontendAndBackend): * inspector/InspectorDOMAgent.h: * inspector/InspectorDOMDebuggerAgent.cpp: (WebCore::InspectorDOMDebuggerAgent::didCreateFrontendAndBackend): (WebCore::InspectorDOMDebuggerAgent::willDestroyFrontendAndBackend): (WebCore::InspectorDOMDebuggerAgent::didInvalidateStyleAttr): (WebCore::InspectorDOMDebuggerAgent::willInsertDOMNode): (WebCore::InspectorDOMDebuggerAgent::willRemoveDOMNode): (WebCore::InspectorDOMDebuggerAgent::willModifyDOMAttr): (WebCore::InspectorDOMDebuggerAgent::pauseOnNativeEventIfNeeded): (WebCore::InspectorDOMDebuggerAgent::willSendXMLHttpRequest): * inspector/InspectorDOMDebuggerAgent.h: * inspector/InspectorDOMStorageAgent.cpp: (WebCore::InspectorDOMStorageAgent::didCreateFrontendAndBackend): (WebCore::InspectorDOMStorageAgent::willDestroyFrontendAndBackend): * inspector/InspectorDOMStorageAgent.h: * inspector/InspectorDatabaseAgent.cpp: (WebCore::InspectorDatabaseAgent::didCreateFrontendAndBackend): (WebCore::InspectorDatabaseAgent::willDestroyFrontendAndBackend): * inspector/InspectorDatabaseAgent.h: * inspector/InspectorDatabaseResource.cpp: (WebCore::InspectorDatabaseResource::bind): * inspector/InspectorDatabaseResource.h: * inspector/InspectorForwarding.h: * inspector/InspectorIndexedDBAgent.cpp: (WebCore::InspectorIndexedDBAgent::didCreateFrontendAndBackend): (WebCore::InspectorIndexedDBAgent::willDestroyFrontendAndBackend): * inspector/InspectorIndexedDBAgent.h: * inspector/InspectorLayerTreeAgent.cpp: (WebCore::InspectorLayerTreeAgent::didCreateFrontendAndBackend): (WebCore::InspectorLayerTreeAgent::willDestroyFrontendAndBackend): * inspector/InspectorLayerTreeAgent.h: * inspector/InspectorPageAgent.cpp: (WebCore::InspectorPageAgent::didCreateFrontendAndBackend): (WebCore::InspectorPageAgent::willDestroyFrontendAndBackend): (WebCore::InspectorPageAgent::getScriptExecutionStatus): * inspector/InspectorPageAgent.h: * inspector/InspectorReplayAgent.cpp: (WebCore::InspectorReplayAgent::didCreateFrontendAndBackend): (WebCore::InspectorReplayAgent::willDestroyFrontendAndBackend): * inspector/InspectorReplayAgent.h: * inspector/InspectorResourceAgent.cpp: (WebCore::InspectorResourceAgent::didCreateFrontendAndBackend): (WebCore::InspectorResourceAgent::willDestroyFrontendAndBackend): * inspector/InspectorResourceAgent.h: * inspector/InspectorStyleSheet.cpp: (WebCore::InspectorStyle::styleWithProperties): * inspector/InspectorTimelineAgent.cpp: (WebCore::InspectorTimelineAgent::didCreateFrontendAndBackend): (WebCore::InspectorTimelineAgent::willDestroyFrontendAndBackend): * inspector/InspectorTimelineAgent.h: * inspector/InspectorWorkerAgent.cpp: (WebCore::InspectorWorkerAgent::WorkerFrontendChannel::WorkerFrontendChannel): (WebCore::InspectorWorkerAgent::didCreateFrontendAndBackend): (WebCore::InspectorWorkerAgent::willDestroyFrontendAndBackend): * inspector/InspectorWorkerAgent.h: * inspector/PageRuntimeAgent.cpp: (WebCore::PageRuntimeAgent::didCreateFrontendAndBackend): (WebCore::PageRuntimeAgent::willDestroyFrontendAndBackend): * inspector/PageRuntimeAgent.h: * inspector/WorkerInspectorController.cpp: (WebCore::WorkerInspectorController::~WorkerInspectorController): (WebCore::WorkerInspectorController::connectFrontend): (WebCore::WorkerInspectorController::disconnectFrontend): * inspector/WorkerInspectorController.h: * inspector/WorkerRuntimeAgent.cpp: (WebCore::WorkerRuntimeAgent::didCreateFrontendAndBackend): (WebCore::WorkerRuntimeAgent::willDestroyFrontendAndBackend): * inspector/WorkerRuntimeAgent.h: * loader/EmptyClients.h: * page/PageDebuggable.cpp: (WebCore::PageDebuggable::connect): (WebCore::PageDebuggable::disconnect): * page/PageDebuggable.h: * testing/Internals.cpp: (WebCore::Internals::closeDummyInspectorFrontend): * workers/WorkerMessagingProxy.cpp: (WebCore::WorkerMessagingProxy::disconnectFromInspector): 2015-02-14 David Kilzer REGRESSION (r180082): WebCore Debug builds fail on Mavericks due to weak export symbols Work towards fixing the Mavericks Debug build. * dom/Document.h: (WebCore::Document::setAnnotatedRegionsDirty): * dom/Event.h: (WebCore::Event::create): * dom/Node.h: (WebCore::Node::hasEditableStyle): * dom/Position.h: (WebCore::Position::Position): * editing/FrameSelection.h: (WebCore::DragCaretController::clear): * loader/ResourceLoader.h: (WebCore::ResourceLoader::originalRequest): - Do not mark inline methods for export. 2015-02-14 Alexey Proskuryakov rel="noreferrer" should make window.opener null https://bugs.webkit.org/show_bug.cgi?id=141579 Reviewed by Darin Adler. Tests: http/tests/navigation/target-blank-opener-post.html http/tests/navigation/target-blank-opener.html We used to avoid passing window.opener policy by temporarily storing it in a FrameLoader member variable. This works for some clients - ones that invoke delegate callbacks synchronously - but not in the general case. So, changed to passing the policy explicitly. * WebCore.exp.in: * loader/FrameLoader.cpp: (WebCore::FrameLoader::FrameLoader): (WebCore::FrameLoader::urlSelected): (WebCore::FrameLoader::loadURLIntoChildFrame): (WebCore::FrameLoader::loadFrameRequest): (WebCore::FrameLoader::loadURL): (WebCore::FrameLoader::load): (WebCore::FrameLoader::loadPostRequest): (WebCore::FrameLoader::continueLoadAfterNewWindowPolicy): * loader/FrameLoader.h: (WebCore::FrameLoader::suppressOpenerInNewFrame): Deleted. * loader/FrameLoaderTypes.h: * loader/NavigationScheduler.cpp: * page/ContextMenuController.cpp: (WebCore::openNewWindow): (WebCore::ContextMenuController::contextMenuItemSelected): 2015-02-14 David Kilzer REGRESSION (r180082): WebCore build on Mountain Lion fails due to weak export for i386 * Configurations/WebCore.unexp: Add missing symbol. 2015-02-13 Chris Dumez RenderListItem resets its marker's style on style change even if the diff is StyleDifferenceEqual https://bugs.webkit.org/show_bug.cgi?id=141572 Reviewed by Simon Fraser. Do not unnecessarily update the marker's style in RenderListItem::styleDidChange() if the RenderStyle diff is StyleDifferenceEqual. Doing so can cause unnecessary layouts. This was causing high cpu usage on http://www.nokogiri.org/tutorials/searching_a_xml_html_document.html because there is an animation that changes the style every second (but the diff is equal) and the RenderListItem keeps resetting its marker's margin, which triggers a layout and the RenderListMarker re-computes its margin during layout and updates its style again. With this change, CPU usage on the page goes from 150% to 20%. There is only a style recalc happening every second, no more relayouts and repaints. Test: fast/repaint/list-item-equal-style-change-no-repaint.html * rendering/RenderListItem.cpp: (WebCore::RenderListItem::styleDidChange): 2015-02-13 Timothy Horton Make WebCore::IOSurface have single ownership instead of refcounting https://bugs.webkit.org/show_bug.cgi?id=141578 Reviewed by Anders Carlsson. In the interests of making it harder to misuse and to make it more like ImageBuffer, our IOSurface wrapper should have single ownership. This will also allow future changes which depend on temporarily consuming an IOSurface to more easily enforce correct usage. * WebCore.exp.in: * platform/graphics/cg/IOSurfacePool.cpp: (WebCore::IOSurfacePool::takeSurface): (WebCore::IOSurfacePool::addSurface): (WebCore::IOSurfacePool::insertSurfaceIntoPool): (WebCore::IOSurfacePool::tryEvictInUseSurface): (WebCore::IOSurfacePool::tryEvictOldestCachedSurface): (WebCore::IOSurfacePool::collectInUseSurfaces): * platform/graphics/cg/IOSurfacePool.h: * platform/graphics/cocoa/IOSurface.h: * platform/graphics/cocoa/IOSurface.mm: (IOSurface::create): (IOSurface::createFromSendRight): (IOSurface::createFromSurface): (IOSurface::createFromImage): Make IOSurface::create()s return a unique_ptr, and adjust everywhere. 2015-02-12 Enrica Casucci Additional emoji group support. https://bugs.webkit.org/show_bug.cgi?id=141539 rdar://problem/19727527 Reviewed by Sam Weinig. Adding some new emoji ligatures. Updated existing test to include the new sequences. * platform/text/TextBreakIterator.cpp: (WebCore::cursorMovementIterator): * rendering/RenderText.cpp: (WebCore::isEmojiGroupCandidate): 2015-02-13 Alex Christensen Really stop using export files. https://bugs.webkit.org/show_bug.cgi?id=141521 Reviewed by Mark Rowe. * Configurations/WebCore.xcconfig: Don't use exported symbols files. * Configurations/WebCore.unexp: Added list of symbols not to export (needed by Xcode 5.0.2). 2015-02-13 Zalan Bujtas Simplify ASSERT in lastRubyRun(). https://bugs.webkit.org/show_bug.cgi?id=141574 Reviewed by Daniel Bates. r180064 made some of the conditions in the ASSERT redundant. Covered by existing tests. * rendering/RenderRuby.cpp: (WebCore::lastRubyRun): 2015-02-13 Brent Fulgham [Mac, iOS] Adjust pagination behavior for Mail.app printing use https://bugs.webkit.org/show_bug.cgi?id=141569 Reviewed by Anders Carlsson. * page/Settings.in: Add new pagination setting flag. * rendering/RenderBlockFlow.cpp: (WebCore::messageContainerName): Added. (WebCore::needsPaginationQuirk): Added. (WebCore::RenderBlockFlow::adjustLinePositionForPagination): Don't move the message content div to a new page when using this special printing mode. 2015-02-13 Daniel Bates [iOS] DumpRenderTree.app fails to link due to undefined classes Following r179945, DumpRenderTree.app fails to link due to undefined symbols: Undefined symbols for architecture x86_64: "_OBJC_CLASS_$_WebEvent", referenced from: objc-class-ref in libDumpRenderTree.a(EventSendingController.o) "_OBJC_CLASS_$_WebUndefined", referenced from: objc-class-ref in libDumpRenderTree.a(ObjCController.o) We need to export the classes WebScriptObject and WebEvent. * bindings/objc/WebScriptObject.h: * platform/ios/WebEvent.h: 2015-02-13 Andreas Kling CachedResource::clearLoader() should self-destruct if nothing else retains the CachedResource. Reviewed by Antti Koivisto. Anything that may cause CachedResource::canDelete() to return true must also make sure to call CachedResource::deleteIfPossible(), or we risk leaking the CachedResource. This is because CachedResource employs an extremely convoluted lifetime mechanism that depends on its presence in a number of collections, as well as internal counters and state. This is a speculative fix for a potential CachedResource leak that I'm not sure exists in practice, but let's be good citizens here. * loader/cache/CachedResource.cpp: (WebCore::CachedResource::clearLoader): 2015-02-13 Jer Noble [MSE][Mac] Crash at WebCore::SourceBufferPrivateAVFObjC::didParseStreamDataAsAsset + 2357 https://bugs.webkit.org/show_bug.cgi?id=141566 rdar://problem/19826075 Reviewed by Andreas Kling. Null check m_mediaSource before dereferencing. * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm: (WebCore::SourceBufferPrivateAVFObjC::didParseStreamDataAsAsset): 2015-02-13 Zalan Bujtas REGRESSION (r174761): Invalid cast in WebCore::lastRubyRun / WebCore::RenderRubyAsBlock::addChild https://bugs.webkit.org/show_bug.cgi?id=137929 rdar://problem/18723492 Reviewed by Chris Dumez. Ensure that the child renderer is a RenderRubyRun. Test: fast/ruby/crash-with-before-after-on-ruby.html * rendering/RenderRuby.cpp: (WebCore::lastRubyRun): 2015-02-13 Simon Fraser Crashes under RenderLayer::hitTestLayer under determinePrimarySnapshottedPlugIn() https://bugs.webkit.org/show_bug.cgi?id=141551 Reviewed by Zalan Bujtas. It's possible for a layout to dirty the parent frame's state, via the calls to ownerElement()->scheduleSetNeedsStyleRecalc() that RenderLayerCompositor does when iframes toggle their compositing mode. That could cause FrameView::updateLayoutAndStyleIfNeededRecursive() to fail to leave all the frames in a clean state. Later on, we could enter hit testing, which calls document().updateLayout() on each frame's document. Document::updateLayout() does layout on all ancestor documents, so in the middle of hit testing, we could layout a subframe (dirtying an ancestor frame), then layout another frame, which would forcing that ancestor to be laid out while we're hit testing it, thus corrupting the RenderLayer tree while it's being iterated over. Fix by having FrameView::updateLayoutAndStyleIfNeededRecursive() do a second layout after laying out subframes, which most of the time will be a no-op. Also add a stronger assertion, that this frame and all subframes are clean at the end of FrameView::updateLayoutAndStyleIfNeededRecursive() for the main frame. Various existing frames tests hit the new assertion if the code change is removed, so this is covered by existing tests. * page/FrameView.cpp: (WebCore::FrameView::needsStyleRecalcOrLayout): (WebCore::FrameView::updateLayoutAndStyleIfNeededRecursive): * page/FrameView.h: * rendering/RenderWidget.cpp: (WebCore::RenderWidget::willBeDestroyed): 2015-02-12 Simon Fraser determinePrimarySnapshottedPlugIn() should only traverse visible Frames https://bugs.webkit.org/show_bug.cgi?id=141547 Part of rdar://problem/18445733. Reviewed by Anders Carlsson. There's an expectation from clients that FrameView::updateLayoutAndStyleIfNeededRecursive() updates layout in all frames, but it uses the widget tree, so only hits frames that are parented via renderers (i.e. not display:none frames or their descendants). Moving towards a future where we remove Widgets, fix by adding a FrameTree traversal function that only finds rendered frames (those with an ownerRenderer). Not testable. * page/FrameTree.cpp: (WebCore::FrameTree::firstRenderedChild): (WebCore::FrameTree::nextRenderedSibling): (WebCore::FrameTree::traverseNextRendered): (printFrames): * page/FrameTree.h: * page/FrameView.cpp: (WebCore::FrameView::updateLayoutAndStyleIfNeededRecursive): 2015-02-13 Alexey Proskuryakov TimerBase::m_heapInsertionOrder calculation is racy https://bugs.webkit.org/show_bug.cgi?id=141554 Reviewed by Anders Carlsson. Use an atomic increment. * platform/Timer.cpp: (WebCore::TimerBase::setNextFireTime): 2015-02-13 Andreas Kling [iOS] Refine GC behavior in response to process suspension and memory pressure. Reviewed by Geoffrey Garen. Do an immediate full garbage collection when the web process is about to be suspended (when another tab is moving to the foreground on iOS.) This ensures that we make a best effort to reduce the process footprint before we lose the ability to execute code. When receiving a memory pressure warning, tell the garbage collector to accelerate its next collection (by calling garbageCollectSoon().) This gives us some confidence that a collection will happen within a reasonable timeframe, but doesn't risk dooming us to a loop of endless garbage collections. * platform/cocoa/MemoryPressureHandlerCocoa.mm: (WebCore::MemoryPressureHandler::platformReleaseMemory): 2015-02-13 Antti Koivisto Add some RELEASE_ASSERTs to try to catch crashes in StyleResolver::loadPendingImages https://bugs.webkit.org/show_bug.cgi?id=141561 Reviewed by Simon Fraser. One possibility is that loads triggered by loadPendingImages end up synchronously destroying or re-entering style resolver. Try to catch these in release builds. * css/StyleResolver.cpp: (WebCore::StyleResolver::~StyleResolver): (WebCore::StyleResolver::styleForElement): (WebCore::StyleResolver::styleForKeyframe): (WebCore::StyleResolver::styleForPage): (WebCore::StyleResolver::loadPendingImages): * css/StyleResolver.h: 2015-02-13 ChangSeok Oh Div having contentEditable and display:grid cannot be edited if it is empty. https://bugs.webkit.org/show_bug.cgi?id=141465 Reviewed by Ryosuke Niwa. This bug is quite similar to webkit.org/b/141218. RenderGrid should be also treated as a candidate for visible position as like RenderFlexibleBox. The only different situation between them is that RenderGrid has a bug setting "0px" for logicalHeight when it is empty. RenderGrid should also have a minimum height of a single line if it is editable as well as RenderFlexibleBox does. Test: fast/events/key-events-in-editable-gridbox.html * dom/Position.cpp: (WebCore::Position::isCandidate): (WebCore::Position::isRenderedCharacter): * rendering/RenderGrid.cpp: (WebCore::RenderGrid::layoutGridItems): 2015-02-12 Zalan Bujtas REGRESSION (r176262): Invalid cast in WebCore`WebCore::RootInlineBox::selectionTop https://bugs.webkit.org/show_bug.cgi?id=138992 Reviewed by Dave Hyatt. RenderRubyText requires the ancestor chain to be (RenderRubyAsInline | RenderRubyAsBlock) -> RenderRubyRun -> RenderRubyText. This patch ensures that we create RenderRubyText for an element only when the expected ancestor chain is guaranteed. Test: fast/ruby/crash-when-ruby-is-set-to-inline-block.html * rendering/RenderElement.cpp: (WebCore::RenderElement::createFor): treat inline-block as block. * rendering/RenderObject.h: (WebCore::RenderObject::isRubyInline): (WebCore::RenderObject::isRubyBlock): (WebCore::RenderObject::isRuby): Deleted. * rendering/RenderRuby.cpp: (WebCore::isAnonymousRubyInlineBlock): * rendering/RenderRuby.h: add support for is(renderer) and for is(renderer) The isRuby() method does not follow the is*() -> maps to one class pattern. (WebCore::isRuby): * rendering/RenderRubyRun.cpp: (WebCore::RenderRubyRun::addChild): (WebCore::RenderRubyRun::staticCreateRubyRun): 2015-02-13 Csaba Osztrogonac Fix the gperf related build issue on the WinCairo bot https://bugs.webkit.org/show_bug.cgi?id=141507 Reviewed by Alex Christensen. * platform/ColorData.gperf: Modified property svn:eol-style. 2015-02-13 Csaba Osztrogonác Unreviewed, remove empty directories. * loader/icon/wince: Removed. * platform/graphics/wince: Removed. * storage/wince: Removed. 2015-02-12 Timothy Horton Crashes under detectItemAroundHitTestResult when DataDetectors is not available https://bugs.webkit.org/show_bug.cgi?id=141549 Reviewed by Dan Bernstein. * editing/mac/DataDetection.mm: (WebCore::DataDetection::detectItemAroundHitTestResult): Bail out from data detection if either of the relevant frameworks aren't loaded. 2015-02-12 Dean Jackson [iOS Media] Audio should hide timeline scrubber until playback starts https://bugs.webkit.org/show_bug.cgi?id=141542 Reviewed by Eric Carlson. We regressed from the system behaviour in iOS 7, where the timeline scrubber for an audio element is not shown until the user starts playback. * Modules/mediacontrols/mediaControlsiOS.css: (video::-webkit-media-controls-panel): Fix the alignment of the flexbox. (audio::-webkit-media-controls-status-display): Add the style for the status display. * Modules/mediacontrols/mediaControlsiOS.js: (ControllerIOS.prototype.configureInlineControls): Start hidden if we are an