2014-10-07 Andreas Kling Use more Ref and PassRef for Gradient. Codify the fact that CanvasGradient always has an internal WebCore::Gradient and make GraphicsContext gradient setters take PassRef, exposing some unnecessary null checks. Reviewed by Christophe Dumez. * WebCore.exp.in: * html/canvas/CanvasGradient.h: (WebCore::CanvasGradient::gradient): * platform/graphics/Gradient.h: (WebCore::Gradient::create): * platform/graphics/GraphicsContext.cpp: (WebCore::GraphicsContext::setStrokeGradient): (WebCore::GraphicsContext::setFillGradient): * platform/graphics/GraphicsContext.h: * rendering/RenderThemeIOS.mm: (WebCore::RenderThemeIOS::paintProgressBar): * rendering/svg/RenderSVGPath.cpp: (WebCore::useStrokeStyleToFill): * rendering/svg/RenderSVGResourceGradient.cpp: (WebCore::RenderSVGResourceGradient::applyResource): 2014-10-07 Martin Hock Defer resolution of viewport size. https://bugs.webkit.org/show_bug.cgi?id=137376 rdar://problem/18558094 Reviewed by Benjamin Poulain. ViewportConfiguration should resolve the viewport size on configuration update. * dom/Document.cpp: (WebCore::Document::processViewport): Defer resolution of viewport size. * dom/ViewportArguments.cpp: (WebCore::finalizeViewportArguments): Deleted. * dom/ViewportArguments.h: * page/ViewportConfiguration.cpp: (WebCore::ViewportConfiguration::updateConfiguration): Resolve viewport size. (WebCore::ViewportConfiguration::viewportArgumentsLength): Resolves width or height based on viewport arguments. * page/ViewportConfiguration.h: 2014-10-07 Pratik Solanki [iOS] WebKit1 clients crash in DiskCacheMonitor::tryGetFileBackedSharedBufferFromCFURLCachedResponse() https://bugs.webkit.org/show_bug.cgi?id=137495 Reviewed by Andreas Kling. Retain/release the CFCachedURLResponseRef object otherwise we could access a deleted object and crash on the web thread. * loader/cocoa/DiskCacheMonitorCocoa.mm: (WebCore::DiskCacheMonitor::DiskCacheMonitor): 2014-10-07 Christophe Dumez Use is<>() / downcast<>() for RenderText / RenderTextFragment https://bugs.webkit.org/show_bug.cgi?id=137476 Reviewed by Darin Adler. Use is<>() / downcast<>() for RenderText / RenderTextFragment, and clean up the surrounding code. No new tests, no behavior change. * WebCore.exp.in: Export symbol for RenderInline::linesBoundingBox() as it is used by RenderInline::orderBoundingBox() which is inlined and now called in WebRenderNode.mm. * WebCore.xcodeproj/project.pbxproj: Make RenderInline.h header as Private so that it can be included by WebRenderNode.mm, similarly to RenderText.h. * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::textUnderElement): (WebCore::AccessibilityRenderObject::boundingBoxRect): (WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored): (WebCore::AccessibilityRenderObject::passwordFieldValue): * accessibility/atk/AccessibilityObjectAtk.cpp: (WebCore::AccessibilityObject::getLengthForTextRange): * bindings/objc/DOMUIKitExtensions.mm: (-[DOMNode textHeight]): (-[DOMNode findExplodedTextNodeAtPoint:]): * dom/ContainerNode.cpp: (WebCore::ContainerNode::getUpperLeftCorner): (WebCore::ContainerNode::getLowerRightCorner): * dom/DocumentMarkerController.cpp: (WebCore::DocumentMarkerController::addMarker): * dom/Position.cpp: (WebCore::hasInlineBoxWrapper): (WebCore::Position::upstream): (WebCore::Position::downstream): (WebCore::Position::hasRenderedNonAnonymousDescendantsWithHeight): (WebCore::Position::isCandidate): (WebCore::Position::rendersInDifferentPosition): (WebCore::searchAheadForBetterMatch): (WebCore::Position::getInlineBoxAndOffset): * dom/PositionIterator.cpp: (WebCore::PositionIterator::isCandidate): * dom/Range.cpp: (WebCore::Range::textRects): (WebCore::Range::textQuads): (WebCore::Range::getBorderAndTextQuads): * editing/FrameSelection.cpp: (WebCore::FrameSelection::debugRenderer): * editing/TextIterator.cpp: (WebCore::hasVisibleTextNode): (WebCore::TextIterator::handleTextNode): (WebCore::maxOffsetIncludingCollapsedSpaces): (WebCore::SimplifiedBackwardsTextIterator::handleFirstLetter): * editing/VisibleUnits.cpp: (WebCore::startOfParagraph): (WebCore::endOfParagraph): * page/FrameView.cpp: (WebCore::countRenderedCharactersInRenderObjectWithThreshold): * rendering/BidiRun.cpp: (WebCore::BidiRun::BidiRun): * rendering/InlineIterator.cpp: (WebCore::InlineIterator::surrogateTextDirection): * rendering/InlineIterator.h: (WebCore::InlineIterator::atTextParagraphSeparator): (WebCore::InlineIterator::atParagraphSeparator): (WebCore::isEmptyInline): (WebCore::InlineIterator::fastIncrementInTextNode): (WebCore::InlineIterator::increment): (WebCore::InlineIterator::characterAt): (WebCore::InlineIterator::direction): * rendering/InlineTextBox.h: (WebCore::InlineTextBox::renderer): * rendering/RenderBlock.cpp: (WebCore::RenderBlock::updateFirstLetterStyle): (WebCore::RenderBlock::updateFirstLetter): * rendering/RenderBlockFlow.cpp: (WebCore::RenderBlockFlow::deleteLineBoxesBeforeSimpleLineLayout): (WebCore::isVisibleRenderText): (WebCore::RenderBlockFlow::adjustComputedFontSizes): (WebCore::stripTrailingSpace): (WebCore::RenderBlockFlow::computeInlinePreferredLogicalWidths): * rendering/RenderBlockLineLayout.cpp: (WebCore::createInlineBoxForRenderer): (WebCore::dirtyLineBoxesForRenderer): (WebCore::reachedEndOfTextRenderer): (WebCore::RenderBlockFlow::computeInlineDirectionPositionsForSegment): (WebCore::RenderBlockFlow::computeBlockDirectionPositionsForLine): (WebCore::RenderBlockFlow::handleTrailingSpaces): (WebCore::RenderBlockFlow::determineStartPosition): * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::moveChildrenTo): * rendering/RenderElement.cpp: (WebCore::RenderElement::hasImmediateNonWhitespaceTextChildOrBorderOrOutline): (WebCore::RenderElement::addChild): * rendering/RenderInline.cpp: (WebCore::RenderInline::generateCulledLineBoxRects): (WebCore::RenderInline::culledInlineFirstLineBox): (WebCore::RenderInline::culledInlineLastLineBox): (WebCore::RenderInline::culledInlineVisualOverflowBoundingBox): (WebCore::RenderInline::dirtyLineBoxes): * rendering/RenderInline.h: Make borderBoundingBox() public so that call sites (here WebRenderNode.mm) can use tighter typing and benefit from the virtual function being final. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::calculateClipRects): * rendering/RenderLineBoxList.cpp: (WebCore::RenderLineBoxList::dirtyLinesFromChangedChild): * rendering/RenderNamedFlowThread.cpp: (WebCore::RenderNamedFlowThread::getRanges): * rendering/RenderRubyRun.cpp: (WebCore::RenderRubyRun::getOverhang): * rendering/RenderSelectionInfo.cpp: (WebCore::RenderSelectionInfo::RenderSelectionInfo): * rendering/RenderText.cpp: (WebCore::isInlineFlowOrEmptyText): (WebCore::RenderText::previousCharacter): * rendering/RenderText.h: (WebCore::Text::renderer): * rendering/RenderTextFragment.h: (isType): * rendering/RenderTreeAsText.cpp: (WebCore::RenderTreeAsText::writeRenderObject): (WebCore::write): * rendering/SimpleLineLayout.cpp: (WebCore::SimpleLineLayout::canUseFor): (WebCore::SimpleLineLayout::create): * rendering/SimpleLineLayoutFunctions.cpp: (WebCore::SimpleLineLayout::paintFlow): (WebCore::SimpleLineLayout::hitTestFlow): * rendering/SimpleLineLayoutResolver.h: (WebCore::SimpleLineLayout::RunResolver::RunResolver): * rendering/TextAutoSizing.cpp: (WebCore::TextAutoSizingValue::addNode): * rendering/TextAutosizer.cpp: (WebCore::TextAutosizer::containerIsRowOfLinks): (WebCore::TextAutosizer::measureDescendantTextWidth): * rendering/line/BreakingContextInlineHeaders.h: (WebCore::BreakingContext::commitLineBreakAtCurrentWidth): (WebCore::shouldAddBorderPaddingMargin): (WebCore::shouldSkipWhitespaceAfterStartObject): (WebCore::BreakingContext::handleText): (WebCore::textBeginsWithBreakablePosition): (WebCore::BreakingContext::canBreakAtThisPosition): 2014-10-07 Jer Noble [Media] Expose AudioTracks in the "captions" menu. https://bugs.webkit.org/show_bug.cgi?id=137472 Reviewed by Brent Fulgham. Test: media/video-controls-audiotracks-trackmenu.html If more than one AudioTrack is present in the video element, add those tracks to the captions menu: * English.lproj/mediaControlsLocalizedStrings.js: * Modules/mediacontrols/mediaControlsApple.js: (Controller.prototype.addVideoListeners): (Controller.prototype.removeVideoListeners): (Controller.prototype.handleAudioTrackChange): (Controller.prototype.handleAudioTrackAdd): (Controller.prototype.handleAudioTrackRemove): (Controller.prototype.updateCaptionButton): (Controller.prototype.buildCaptionMenu): (Controller.prototype.handleCaptionItemKeyUp): (Controller.prototype.audioTrackItemSelected): (Controller.prototype.focusSiblingAudioTrackItem): (Controller.prototype.handleAudioTrackItemKeyUp): Add support to MediaControlHost for retrieving the sorted audio track list, and the localized names for every audio track: * Modules/mediacontrols/MediaControlsHost.cpp: (WebCore::MediaControlsHost::sortedTrackListForMenu): (WebCore::MediaControlsHost::displayNameForTrack): * Modules/mediacontrols/MediaControlsHost.h: * Modules/mediacontrols/MediaControlsHost.idl: * page/CaptionUserPreferences.cpp: (WebCore::trackDisplayName): (WebCore::CaptionUserPreferences::displayNameForTrack): (WebCore::CaptionUserPreferences::sortedTrackListForMenu): * page/CaptionUserPreferences.h: * platform/LocalizedStrings.cpp: (WebCore::audioTrackNoLabelText): * platform/LocalizedStrings.h: * platform/efl/LocalizedStringsEfl.cpp: (WebCore::audioTrackNoLabelText): * platform/gtk/LocalizedStringsGtk.cpp: (WebCore::audioTrackNoLabelText): Drive-by fix; do not recurse into AudioTrackPrivate->setEnabled() when the enabled state changes. * html/track/AudioTrack.cpp: (WebCore::AudioTrack::enabledChanged): Fix possible out-of-bounds Vector access when adding tracks to a track list by sorting the list at insert time, rather than inserting into the track's reported position in the Vector: * html/track/AudioTrackList.cpp: (AudioTrackList::append): * html/track/VideoTrackList.cpp: (VideoTrackList::append): Correctly report the trackIndex of audio and video tracks from AVFoundation: * platform/graphics/avfoundation/AudioTrackPrivateAVF.h: (WebCore::AudioTrackPrivateAVF::trackIndex): (WebCore::AudioTrackPrivateAVF::setTrackIndex): (WebCore::AudioTrackPrivateAVF::AudioTrackPrivateAVF): * platform/graphics/avfoundation/VideoTrackPrivateAVF.h: (WebCore::VideoTrackPrivateAVF::trackIndex): (WebCore::VideoTrackPrivateAVF::setTrackIndex): (WebCore::VideoTrackPrivateAVF::VideoTrackPrivateAVF): * platform/graphics/avfoundation/objc/AudioTrackPrivateAVFObjC.mm: (WebCore::AudioTrackPrivateAVFObjC::resetPropertiesFromTrack): * platform/graphics/avfoundation/objc/VideoTrackPrivateAVFObjC.cpp: (WebCore::VideoTrackPrivateAVFObjC::resetPropertiesFromTrack): 2014-10-07 Christophe Dumez [WK2] Use is<>() / downcast<>() for DrawingAreaProxy subclasses https://bugs.webkit.org/show_bug.cgi?id=137477 Reviewed by Andreas Kling. Include TypeCastsCF.h now that the header was renamed. No new tests, no behavior change. * platform/cf/SharedBufferCF.cpp: 2014-10-07 Carlos Garcia Campos [SOUP] TLS errors should take precedence over HTTP authentication https://bugs.webkit.org/show_bug.cgi?id=137300 Reviewed by Sergio Villar Senin. Handle TLS errors in got-headers callback to make sure it happens before starting the authentication process. * platform/network/soup/ResourceHandleSoup.cpp: (WebCore::handleUnignoredTLSErrors): Refactored to receive the soup message. (WebCore::gotHeadersCallback): Return early and cancel the request in case of TLS errors. (WebCore::sendRequestCallback): Do not handle TLS errors here, the request should have already been cancelled at this point in case of TLS errors. 2014-10-07 Andy Estes Fix a warning when passing an NSInteger to abs(). https://bugs.webkit.org/show_bug.cgi?id=137480 Reviewed by Mark Rowe. Use std::abs() instead, which is overloaded for both long (a.k.a. NSInteger) and int. * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm: (WebCore::CDMSessionMediaSourceAVFObjC::layerDidReceiveError): (WebCore::CDMSessionMediaSourceAVFObjC::rendererDidReceiveError): 2014-10-06 Darin Adler Make StringView check the lifetime of the StringImpl it's created from https://bugs.webkit.org/show_bug.cgi?id=137202 Reviewed by Anders Carlsson. * platform/graphics/TextRun.cpp: Update since TextRun's definition now uses a StringView. 2014-10-06 Andy Estes [iOS] Fix remaining misuses of abs() and fabsf() https://bugs.webkit.org/show_bug.cgi?id=130947 Reviewed by Simon Fraser. Fixed issues found when compiling with -Wabsolute-value. * platform/ios/ScrollAnimatorIOS.mm: (WebCore::ScrollAnimatorIOS::handleTouchEvent): Called abs() instead of fabsf for integral types. Explicitly cast the divisor to float in the call to atanf(). * platform/ios/wak/WKView.mm: (_WKViewAutoresizeCoord): Explicitly cast origMarginsTotal to an int before calling abs(). Added a FIXME indicating the strange behavior when origMarginsTotal is in the range (0, 1) (as pointed out by Darin). 2014-10-06 Andreas Kling CanvasPattern always has an internal WebCore::Pattern. Use more Ref & PassRef for CanvasPattern and Pattern. Removed some impossible null checks in GraphicsContext that got exposed as compile errors with these changes. Reviewed by Anders Carlsson. * html/canvas/CanvasPattern.h: (WebCore::CanvasPattern::pattern): * platform/graphics/GraphicsContext.cpp: (WebCore::GraphicsContext::setStrokePattern): (WebCore::GraphicsContext::setFillPattern): * platform/graphics/GraphicsContext.h: * platform/graphics/Pattern.cpp: (WebCore::Pattern::create): * platform/graphics/Pattern.h: * platform/graphics/filters/FETile.cpp: (WebCore::FETile::platformApplySoftware): * rendering/svg/RenderSVGPath.cpp: (WebCore::useStrokeStyleToFill): * rendering/svg/RenderSVGResourcePattern.cpp: (WebCore::RenderSVGResourcePattern::applyResource): 2014-10-06 Gyuyoung Kim [EFL] Restore previous scroll position using restoreViewState() https://bugs.webkit.org/show_bug.cgi?id=136999 Reviewed by Benjamin Poulain. There are duplicating code paths to restore previous scroll position and scale factor in HistoryController::restoreScrollPositionAndViewState. EFL port has processed the two code paths. It causes wrong rendering update or scroll position change when previous page's scroll position is restored. Thus EFL port begins to use restoreViewState() to restore scroll position and scale factor. This patch is first step to support it. Additionally EFL port has supported to use ScrollingCoordinatorCoordinatedGraphics::requestScrollPositionUpdate() since r173785. So EFL port can use the requestScrollPositionUpdate() to restore scroll position on previous page instead of delegatedScrollRequested(). However setScrollPosition() can't be used there for now, because iOS port should call it when delegatesScrolling is disabled. On the other hand, EFL port supports it only when delegatesScrolling is enabled. Test covered by WKViewRestoreZoomAndScrollBackForward API test. * loader/HistoryController.cpp: (WebCore::HistoryController::restoreScrollPositionAndViewState): EFL port only calls restoreViewState() to restore previous page's view state. * page/Page.cpp: (WebCore::Page::setPageScaleFactor): 2014-10-06 Benjamin Poulain Web Inspector: Highlighted selectors in Rules sidebar break with selectors that contain nested selector lists https://bugs.webkit.org/show_bug.cgi?id=137378 Reviewed by Joseph Pecoraro. We should not update the parser's selectorRange when matching a nested selector list. To implement this with low risk of unbalanced start+end and good error recovery, I have wrapped the parsing of selector_list between a start/end function at the grammar level. Whenever the parser enter a nested selector list, m_nestedSelectorLevel goes up by one. Any time the parsing is currently in a nested selector list, we never update the selector ranges. * css/CSSGrammar.y.in: * css/CSSParser.cpp: (WebCore::CSSParser::CSSParser): (WebCore::CSSParser::markSelectorStart): (WebCore::CSSParser::markSelectorEnd): * css/CSSParser.h: (WebCore::CSSParser::startNestedSelectorList): (WebCore::CSSParser::endNestedSelectorList): 2014-10-06 Roger Fong [Windows] Build fix for EWS bots. * WebCore.vcxproj/WebCoreGenerated.make: Make sure we always regenerate WebCore derived sources. 2014-10-06 Christophe Dumez Add is<>() / downcast<>() support for RenderObject subclasses https://bugs.webkit.org/show_bug.cgi?id=137424 Reviewed by Benjamin Poulain. Add is<>() / downcast<>() support for RenderObject subclasses, and get rid of IsRendererOfType traits struct as we can now rely on the TypeCastsTraits instead. toRender*() is still supported for most render objects because I did not want to remove all usages in this patch, to keep the size small. For now, only the MathML render objects were ported over to using is<>() / downcast<>(). Other render objects will be taken care of in follow-up patches and I will drop support for toRender*() incrementally. No new tests, no behavior change. * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::isMathFenceOperator): (WebCore::AccessibilityRenderObject::isMathSeparatorOperator): (WebCore::AccessibilityRenderObject::mathLineThickness): * dom/make_names.pl: (printTypeHelpers): * mathml/MathMLInlineContainerElement.cpp: (WebCore::MathMLInlineContainerElement::childrenChanged): * mathml/MathMLTextElement.cpp: (WebCore::MathMLTextElement::didAttachRenderers): (WebCore::MathMLTextElement::childrenChanged): * rendering/RenderAncestorIterator.h: (WebCore::lineageOfType): * rendering/RenderBlock.h: * rendering/RenderBlockFlow.h: * rendering/RenderBox.h: * rendering/RenderBoxModelObject.h: * rendering/RenderButton.h: * rendering/RenderCombineText.h: * rendering/RenderCounter.h: * rendering/RenderDetailsMarker.h: * rendering/RenderElement.h: * rendering/RenderEmbeddedObject.h: * rendering/RenderFieldset.h: * rendering/RenderFileUploadControl.h: * rendering/RenderFlexibleBox.h: * rendering/RenderFlowThread.h: * rendering/RenderFrame.h: * rendering/RenderFrameSet.h: * rendering/RenderFullScreen.h: * rendering/RenderGrid.h: * rendering/RenderHTMLCanvas.h: * rendering/RenderIFrame.h: * rendering/RenderImage.h: * rendering/RenderInline.h: * rendering/RenderIterator.h: (WebCore::isRendererOfType): (WebCore::RenderTraversal::firstChild): (WebCore::RenderTraversal::lastChild): (WebCore::RenderTraversal::nextSibling): (WebCore::RenderTraversal::previousSibling): (WebCore::RenderTraversal::findAncestorOfType): * rendering/RenderLayerModelObject.h: * rendering/RenderLineBreak.h: * rendering/RenderListBox.h: * rendering/RenderListItem.h: * rendering/RenderListMarker.h: * rendering/RenderMedia.h: * rendering/RenderMenuList.h: * rendering/RenderMeter.h: * rendering/RenderMultiColumnFlowThread.h: * rendering/RenderMultiColumnSet.h: * rendering/RenderMultiColumnSpannerPlaceholder.h: * rendering/RenderNamedFlowFragment.h: * rendering/RenderNamedFlowThread.h: * rendering/RenderObject.h: (WebCore::RenderObject>): Deleted. * rendering/RenderProgress.h: * rendering/RenderQuote.h: * rendering/RenderRegion.h: * rendering/RenderReplaced.h: * rendering/RenderRubyRun.h: * rendering/RenderScrollbarPart.h: * rendering/RenderSearchField.h: * rendering/RenderSlider.h: * rendering/RenderSnapshottedPlugIn.h: * rendering/RenderTable.h: * rendering/RenderTableCaption.h: * rendering/RenderTableCell.h: * rendering/RenderTableCol.h: * rendering/RenderTableRow.h: * rendering/RenderTableSection.h: * rendering/RenderText.h: * rendering/RenderTextControl.h: * rendering/RenderTextControlMultiLine.h: * rendering/RenderTextControlSingleLine.h: * rendering/RenderTextFragment.h: * rendering/RenderVideo.h: * rendering/RenderView.h: * rendering/RenderWidget.h: * rendering/mathml/RenderMathMLBlock.h: * rendering/mathml/RenderMathMLFenced.cpp: (WebCore::RenderMathMLFenced::updateFromElement): * rendering/mathml/RenderMathMLFraction.cpp: (WebCore::RenderMathMLFraction::unembellishedOperator): * rendering/mathml/RenderMathMLFraction.h: * rendering/mathml/RenderMathMLOperator.h: * rendering/mathml/RenderMathMLRadicalOperator.h: * rendering/mathml/RenderMathMLRoot.cpp: (WebCore::RenderMathMLRoot::baseWrapper): (WebCore::RenderMathMLRoot::radicalWrapper): (WebCore::RenderMathMLRoot::indexWrapper): (WebCore::RenderMathMLRoot::radicalOperator): (WebCore::RenderMathMLRootWrapper::removeChild): * rendering/mathml/RenderMathMLRoot.h: * rendering/mathml/RenderMathMLRow.cpp: (WebCore::RenderMathMLRow::updateOperatorProperties): (WebCore::RenderMathMLRow::layout): * rendering/mathml/RenderMathMLRow.h: * rendering/mathml/RenderMathMLScripts.cpp: (WebCore::RenderMathMLScripts::addChildInternal): (WebCore::RenderMathMLScripts::removeChildInternal): (WebCore::RenderMathMLScripts::unembellishedOperator): (WebCore::RenderMathMLScripts::layout): (WebCore::RenderMathMLScriptsWrapper::addChildInternal): (WebCore::RenderMathMLScriptsWrapper::addChild): (WebCore::RenderMathMLScriptsWrapper::removeChildInternal): (WebCore::RenderMathMLScriptsWrapper::removeChild): * rendering/mathml/RenderMathMLScripts.h: * rendering/mathml/RenderMathMLSpace.h: * rendering/mathml/RenderMathMLSquareRoot.h: * rendering/mathml/RenderMathMLToken.h: * rendering/mathml/RenderMathMLUnderOver.cpp: (WebCore::RenderMathMLUnderOver::unembellishedOperator): * rendering/svg/RenderSVGContainer.h: * rendering/svg/RenderSVGGradientStop.h: * rendering/svg/RenderSVGImage.h: * rendering/svg/RenderSVGInlineText.h: * rendering/svg/RenderSVGModelObject.h: * rendering/svg/RenderSVGPath.h: * rendering/svg/RenderSVGResourceContainer.h: * rendering/svg/RenderSVGResourceFilter.h: * rendering/svg/RenderSVGRoot.h: * rendering/svg/RenderSVGShape.h: * rendering/svg/RenderSVGText.h: * rendering/svg/RenderSVGTextPath.h: * rendering/svg/RenderSVGViewportContainer.h: 2014-10-06 Christophe Dumez Use is<>() / downcast<>() for ScrollingTreeNode subclasses https://bugs.webkit.org/show_bug.cgi?id=137451 Reviewed by Tim Horton. Use is<>() / downcast<>() for ScrollingTreeNode subclasses. No new tests, no behavior change. * page/scrolling/ScrollingTree.cpp: (WebCore::ScrollingTree::handleWheelEvent): (WebCore::ScrollingTree::viewportChangedViaDelegatedScrolling): (WebCore::ScrollingTree::scrollPositionChangedViaDelegatedScrolling): * page/scrolling/ScrollingTreeFrameScrollingNode.h: * page/scrolling/ScrollingTreeNode.h: * page/scrolling/ScrollingTreeOverflowScrollingNode.h: * page/scrolling/ScrollingTreeScrollingNode.h: * page/scrolling/mac/ScrollingTreeFixedNode.h: * page/scrolling/mac/ScrollingTreeStickyNode.h: * page/scrolling/mac/ScrollingTreeStickyNode.mm: (WebCore::ScrollingTreeStickyNode::updateLayersAfterAncestorChange): 2014-10-06 Myles C. Maxfield Addressing post-review comment on r174297. https://bugs.webkit.org/show_bug.cgi?id=137355 Unreviewed. * rendering/RenderText.cpp: (WebCore::RenderText::stringView): 2014-10-06 Myles C. Maxfield Unreviewed merge fix for r174279. https://bugs.webkit.org/show_bug.cgi?id=137097 * svg/SVGToOTFFontConversion.cpp: (WebCore::SVGToOTFFontConverter::convertSVGToOTFFont): 2014-10-06 David Hyatt REGRESSION (Simple Line Layout): Inline block baselines computed incorrectly https://bugs.webkit.org/show_bug.cgi?id=137461 Reviewed by Simon Fraser. Added fast/inline-block/simple-line-layout.html * rendering/SimpleLineLayoutFunctions.h: (WebCore::SimpleLineLayout::computeFlowFirstLineBaseline): (WebCore::SimpleLineLayout::computeFlowLastLineBaseline): Fix the baseline computation functions in simple line layout to use lineCount rather than runCount. 2014-10-06 Ada Chan Add ChromeClient::isPlayingAudioDidChange(). https://bugs.webkit.org/show_bug.cgi?id=137220 Reviewed by Jer Noble. This is called when the Page's m_isPlayingAudio changes. No new tests, no behavior change. * page/ChromeClient.h: (WebCore::ChromeClient::isPlayingAudioDidChange): * page/Page.cpp: (WebCore::Page::updateIsPlayingAudio): 2014-10-06 Benjamin Poulain Unreviewed, rolling out r174336. Mozilla's Dromaeo still relies on the deprecated function. Reverted changeset: "Add a deprecation warning for Element.webkitMatchesSelector" https://bugs.webkit.org/show_bug.cgi?id=137417 http://trac.webkit.org/changeset/174336 2014-10-06 Christophe Dumez Use is<>() / downcast<>() for CryptoKey subclasses https://bugs.webkit.org/show_bug.cgi?id=137436 Reviewed by Ryosuke Niwa. Use is<>() / downcast<>() for CryptoKey subclasses. No new tests, no behavior change. * bindings/js/JSCryptoKeySerializationJWK.cpp: (WebCore::addJWKAlgorithmToJSON): * bindings/js/SerializedScriptValue.cpp: (WebCore::CloneSerializer::write): * crypto/CryptoKey.h: * crypto/algorithms/CryptoAlgorithmAES_CBC.cpp: (WebCore::CryptoAlgorithmAES_CBC::keyAlgorithmMatches): (WebCore::CryptoAlgorithmAES_CBC::encrypt): (WebCore::CryptoAlgorithmAES_CBC::decrypt): * crypto/algorithms/CryptoAlgorithmAES_KW.cpp: (WebCore::CryptoAlgorithmAES_KW::keyAlgorithmMatches): (WebCore::CryptoAlgorithmAES_KW::encryptForWrapKey): (WebCore::CryptoAlgorithmAES_KW::decryptForUnwrapKey): * crypto/algorithms/CryptoAlgorithmHMAC.cpp: (WebCore::CryptoAlgorithmHMAC::keyAlgorithmMatches): (WebCore::CryptoAlgorithmHMAC::sign): (WebCore::CryptoAlgorithmHMAC::verify): * crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.cpp: (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::keyAlgorithmMatches): (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::encrypt): (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::decrypt): * crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp: (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::keyAlgorithmMatches): (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::sign): (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::verify): * crypto/algorithms/CryptoAlgorithmRSA_OAEP.cpp: (WebCore::CryptoAlgorithmRSA_OAEP::keyAlgorithmMatches): (WebCore::CryptoAlgorithmRSA_OAEP::encrypt): (WebCore::CryptoAlgorithmRSA_OAEP::decrypt): * crypto/keys/CryptoKeyAES.h: (WebCore::isCryptoKeyAES): Deleted. * crypto/keys/CryptoKeyHMAC.h: (WebCore::isCryptoKeyHMAC): Deleted. * crypto/keys/CryptoKeyRSA.h: (WebCore::isCryptoKeyRSA): Deleted. 2014-10-06 Simon Fraser Some compositing logic cleanup https://bugs.webkit.org/show_bug.cgi?id=133060 Reviewed by Zalan Bujtas. Move compositing-related code from RenderLayer::styleChanged() to RenderLayerCompositor::layerStyleChanged(). Combine various tests (many clip-related) for changes that require layer rebuilding into styleChangeRequiresLayerRebuild(). Remove code that calls setBackingNeedsRepaint() after filters change between being composited or not; I verified that existing "repaint after style change" code takes care those repaints. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::calculateClipRects): (WebCore::RenderLayer::checkIfDescendantClippingContextNeedsUpdate): Deleted. * rendering/RenderLayer.h: * rendering/RenderLayerCompositor.cpp: (WebCore::checkIfDescendantClippingContextNeedsUpdate): (WebCore::styleChangeRequiresLayerRebuild): (WebCore::RenderLayerCompositor::layerStyleChanged): * rendering/RenderLayerCompositor.h: 2014-10-06 Ada Chan Fix the iOS build after https://trac.webkit.org/changeset/174353. * platform/audio/ios/AudioDestinationIOS.h: 2014-10-06 Ada Chan Implement Page::isPlayingAudio(). https://bugs.webkit.org/show_bug.cgi?id=137218 Reviewed by Eric Carlson. - Add a hasMediaCharacteristics() method to MediaSession. There are three characteristics: audible, visual, and legible. MediaSession gets the media characteristics information from its MediaSessionClient. - Add a mediaStateDidChange() method to MediaSessionClient that MediaSession can call when its state changes. - Each Document keeps a set of MediaSessions it contains. When that set changes, or when a MediaSession changes state, or when its characteristics change, Document::updateIsPlayingAudio() is called. That method iterates through all its MediaSessions to check if the overall isPlayingAudio state has changed in the Document. - Each Page caches its overall isPlayingAudio state. Whenever a Document's isPlayingAudio state changes, it calls Page::updateIsPlayingAudio() which iterates through its frames' documents to calculate its overall isPlayingAudio state. No new tests, no behavior change. * dom/Document.cpp: (WebCore::Document::Document): Initialize m_isPlayingAudio. (WebCore::Document::registerMediaSession): Add the MediaSession to m_mediaSessions. Call updateIsPlayingAudio(). (WebCore::Document::unregisterMediaSession): Remove the MediaSession from m_mediaSessions. Call updateIsPlayingAudio(). (WebCore::Document::updateIsPlayingAudio): Go through all the MediaSessions in this Document and check if any has the Audible characteristic and is playing. If the overall isPlayingAudio state changes, call Page::updateIsPlayingAudio(). * dom/Document.h: (WebCore::Document::isPlayingAudio): * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::registerWithDocument): Call Document::registerMediaSession(). (WebCore::HTMLMediaElement::unregisterWithDocument): Call Document::unregisterMediaSession(). (WebCore::HTMLMediaElement::mediaPlayerCharacteristicChanged): Call Document::updateIsPlayingAudio(). (WebCore::HTMLMediaElement::stop): Call MediaSession::clientWillPausePlayback() so the MediaSession's state can be set back to Paused. (WebCore::HTMLMediaElement::hasMediaCharacteristics): Call hasAudio() to check if the HTMLMediaElement has the Audible characteristic. Call hasVideo() to check if it has the Visual characteristic. Call hasClosedCaptions() to check if it has the Legible characteristic. (WebCore::HTMLMediaElement::mediaStateDidChange): Call Document::updateIsPlayingAudio(). * html/HTMLMediaElement.h: * page/Page.cpp: (WebCore::Page::Page): Initialize m_isPlayingAudio. (WebCore::Page::updateIsPlayingAudio): Iterate through all its frames' documents to check if any has audio playing. If the overall isPlayingAudio state has changed, update m_isPlayingAudio. * page/Page.h: (WebCore::Page::isPlayingAudio): * platform/audio/MediaSession.cpp: (WebCore::MediaSession::setState): If the MediaSession's state has changed, call Document::updateIsPlayingAudio(). (WebCore::MediaSession::hasMediaCharacteristics): Call MediaSessionClient::hasMediaCharacteristics(). * platform/audio/MediaSession.h: (WebCore::MediaSessionClient::mediaStateDidChange): * platform/audio/mac/AudioDestinationMac.h: AudioDestination only has the Audible characteristic. 2014-10-06 Christophe Dumez Use is<>() / downcast<>() for ScrollingTree subclasses https://bugs.webkit.org/show_bug.cgi?id=137449 Reviewed by Ryosuke Niwa. Use is<>() / downcast<>() for ScrollingTree subclasses. No new tests, no behavior change. * page/scrolling/ScrollingTree.h: * page/scrolling/ThreadedScrollingTree.h: * page/scrolling/ios/ScrollingTreeIOS.h: * page/scrolling/mac/ScrollingCoordinatorMac.mm: (WebCore::ScrollingCoordinatorMac::handleWheelEvent): (WebCore::ScrollingCoordinatorMac::commitTreeState): 2014-10-06 Brent Fulgham [Win] Build fix aftr r174347. * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp: Use correct build macro to prevent build break when ENCRYPTED_MEDIA_V2 is not enabled. 2014-10-06 Brent Fulgham [Win] Project file gardening. * WebCore.vcxproj/WebCore.vcxproj.filters: Move EditorWin.cpp and MediatTimeAVFoundation to proper folder locations in project. 2014-10-06 Brent Fulgham [Win] Extend AVFoundationCF Media Implementation https://bugs.webkit.org/show_bug.cgi?id=137409 Reviewed by Eric Carlson. This code is not yet being built and tested by our system. Appropriate tests will be activated when we enable the build. Most of this patch involves correcting some misuse of the AVFoundationCF API. 1. It is never appropriate in AVCF to pass a null CFErrorRef; instead you must pass a CFErrorRef with error type kCFURLErrorUnknown. 2. Because of the asynchronous way we handle the request/response, it is possible for AVCF to make two AVCF requests while negotiating the key exchange. * platform/graphics/avfoundation/cf/AVFoundationCFSoftLinking.h: Add missing declaration. * platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.cpp: (WebCore::CDMSessionAVFoundationCF::generateKeyRequest): Tighten up scope of 'underlyingError'. (WebCore::CDMSessionAVFoundationCF::update): Add call to complete the loading process. * platform/graphics/avfoundation/cf/InbandTextTrackPrivateAVCF.cpp: (WebCore::InbandTextTrackPrivateAVCF::label): Handle null titles CFArray found during testing. (WebCore::InbandTextTrackPrivateAVCF::language): Ditto for a null locale. * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp: (WebCore::MediaPlayerPrivateAVFoundationCF::registerMediaEngine): Add support for the new 'supportsKeySystem' method. (WebCore::MediaPlayerPrivateAVFoundationCF::createContextVideoRenderer): Add assertion for mainThread. (WebCore::MediaPlayerPrivateAVFoundationCF::destroyContextVideoRenderer): Ditto. (WebCore::MediaPlayerPrivateAVFoundationCF::createVideoLayer): Ditto. (WebCore::MediaPlayerPrivateAVFoundationCF::destroyVideoLayer): Ditto. (WebCore::MediaPlayerPrivateAVFoundationCF::createAVPlayer): Ditto. (WebCore::MediaPlayerPrivateAVFoundationCF::createAVPlayerItem): Ditto. (WebCore::MediaPlayerPrivateAVFoundationCF::platformLayer): Ditto. (WebCore::MediaPlayerPrivateAVFoundationCF::platformSetVisible): Ditto. (WebCore::MediaPlayerPrivateAVFoundationCF::paintCurrentFrameInContext): Ditto. (WebCore::MediaPlayerPrivateAVFoundationCF::paint): Ditto. (WebCore::MediaPlayerPrivateAVFoundationCF::supportsKeySystem): Added. (WebCore::MediaPlayerPrivateAVFoundationCF::sizeChanged): Add assertion that this is being called on the main thread. (WebCore::MediaPlayerPrivateAVFoundationCF::processMediaSelectionOptions): Handle the allows empty media selection properly based on test behavior. (WebCore::AVFWrapper::AVFWrapper): Initialize resource loader callback structure when building with AVFOUNDATION_LOADER_DELEGATE. (WebCore::AVFWrapper::createAssetForURL): Use AVFWrapper's loader callback struct, rather than passing the address of a temporary value. (WebCore::AVFWrapper::processNotification): Stop using the deprecated 'dispatch_get_current_queue' function. (WebCore::AVFWrapper::processCue): Ditto. (WebCore::AVFWrapper::legibleOutputCallback): Ditto. (WebCore::AVFWrapper::processShouldWaitForLoadingOfResource): Pass a valid CFError object; nullptr is not allowed as an argument to the "...FinishedLoadingWithError" method. (WebCore::AVFWrapper::shouldWaitForLoadingOfResource): Add support for multiple in-flight requests. (WebCore::AVFWrapper::platformLayer): Assert we are on the main thread. (WebCore::AVFWrapper::setRequestForKey): Add support for multiple in-flight requests. (WebCore::AVFWrapper::takeRequestForKeyURI): Ditto. (WebCore::LayerClient::platformCALayerLayoutSublayersOfLayer): Ditto. * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h: * platform/graphics/avfoundation/cf/WebCoreAVCFResourceLoader.cpp: Make sure we pass valid CFError objects, rather than nullptr. 2014-10-06 Chris Fleizach AX: Performance: Certain Web site causes Safari to hang completely while entering form data https://bugs.webkit.org/show_bug.cgi?id=137420 Reviewed by Mario Sanchez Prada. If a website has multiple nested tables that are not "accessibility" tables, the performance of accessibility slows to a crawl because: 1) We are re-computing accessibilityIsIgnored many times. As a solution, we can enable the isIgnoredCache when updating children. 2) When asking if an object isTableCell, we'd go up the parent chain, asking each of those parents the same question, which exploded into calling this many times. As a solution, I've changed our determination of isTableCell to instead check if the parent is an accessibiltyTable which should be much faster. No new functionality. Existing tests cover changes. * accessibility/AccessibilityObject.cpp: (WebCore::AccessibilityObject::updateChildrenIfNecessary): (WebCore::AccessibilityObject::accessibilityIsIgnored): * accessibility/AccessibilityTableCell.cpp: (WebCore::AccessibilityTableCell::parentTable): (WebCore::AccessibilityTableCell::isTableCell): 2014-10-06 Csaba Osztrogonác Unreviewed, touch testing/Internals.idl to try to fix Windows EWS after r174315. * testing/Internals.idl: Remove unnecessary whitespaces. 2014-10-05 Christophe Dumez Use is<>() / downcast<>() for ScrollingCoordinator / ScrollingStateNode subclasses https://bugs.webkit.org/show_bug.cgi?id=137440 Reviewed by Ryosuke Niwa. Use is<>() / downcast<>() for ScrollingCoordinator / ScrollingStateNode subclasses. No new tests, no behavior change. * page/scrolling/AsyncScrollingCoordinator.cpp: (WebCore::AsyncScrollingCoordinator::frameViewLayoutUpdated): (WebCore::AsyncScrollingCoordinator::frameViewRootLayerDidChange): (WebCore::AsyncScrollingCoordinator::requestScrollPositionUpdate): (WebCore::AsyncScrollingCoordinator::updateFrameScrollingNode): (WebCore::AsyncScrollingCoordinator::updateOverflowScrollingNode): (WebCore::AsyncScrollingCoordinator::updateViewportConstrainedNode): (WebCore::AsyncScrollingCoordinator::recomputeWheelEventHandlerCountForFrameView): * page/scrolling/AsyncScrollingCoordinator.h: * page/scrolling/ScrollingCoordinator.h: * page/scrolling/ScrollingStateFixedNode.h: * page/scrolling/ScrollingStateFrameScrollingNode.h: * page/scrolling/ScrollingStateNode.h: * page/scrolling/ScrollingStateOverflowScrollingNode.h: * page/scrolling/ScrollingStateScrollingNode.h: * page/scrolling/ScrollingStateStickyNode.h: * page/scrolling/ScrollingTreeFrameScrollingNode.cpp: (WebCore::ScrollingTreeFrameScrollingNode::updateBeforeChildren): * page/scrolling/ScrollingTreeScrollingNode.cpp: (WebCore::ScrollingTreeScrollingNode::updateBeforeChildren): (WebCore::ScrollingTreeScrollingNode::updateAfterChildren): * page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.cpp: (WebCore::ScrollingCoordinatorCoordinatedGraphics::updateViewportConstrainedNode): * page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.mm: (WebCore::ScrollingTreeFrameScrollingNodeIOS::updateBeforeChildren): (WebCore::ScrollingTreeFrameScrollingNodeIOS::updateAfterChildren): * page/scrolling/mac/ScrollingTreeFixedNode.mm: (WebCore::ScrollingTreeFixedNode::updateBeforeChildren): * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm: (WebCore::ScrollingTreeFrameScrollingNodeMac::updateBeforeChildren): (WebCore::ScrollingTreeFrameScrollingNodeMac::updateAfterChildren): * page/scrolling/mac/ScrollingTreeStickyNode.mm: (WebCore::ScrollingTreeStickyNode::updateBeforeChildren): 2014-10-05 Christophe Dumez Use is<>() / downcast<>() for CachedRawResource https://bugs.webkit.org/show_bug.cgi?id=137439 Reviewed by Ryosuke Niwa. Use is<>() / downcast<>() for CachedRawResource. No new tests, no behavior change. * inspector/InspectorResourceAgent.cpp: (WebCore::InspectorResourceAgent::didLoadResourceFromMemoryCache): * loader/cache/CachedRawResource.cpp: (WebCore::CachedRawResource::switchClientsToRevalidatedResource): * loader/cache/CachedRawResource.h: (isType): * loader/cache/CachedResourceLoader.cpp: (WebCore::CachedResourceLoader::requestRawResource): (WebCore::CachedResourceLoader::requestMainResource): 2014-10-05 Christophe Dumez Use is<>() / downcast<>() for TextTrack subclasses https://bugs.webkit.org/show_bug.cgi?id=137438 Reviewed by Ryosuke Niwa. Use is<>() / downcast<>() for TextTrack subclasses. No new tests, no behavior change. * Modules/mediasource/SourceBuffer.cpp: (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveInitializationSegment): * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::parseAttribute): * html/track/InbandTextTrack.h: (isType): * html/track/LoadableTextTrack.h: (isType): * html/track/TextTrackList.cpp: (TextTrackList::getTrackIndex): (TextTrackList::append): Deleted. 2014-10-05 Christophe Dumez Use is<>() / downcast<>() for CryptoKeyData subclasses https://bugs.webkit.org/show_bug.cgi?id=137437 Reviewed by Ryosuke Niwa. Use is<>() / downcast<>() for CryptoKeyData subclasses. No new tests, no behavior change. * bindings/js/JSCryptoKeySerializationJWK.cpp: (WebCore::JSCryptoKeySerializationJWK::serialize): * bindings/js/SerializedScriptValue.cpp: (WebCore::CloneSerializer::write): * crypto/CryptoKeyData.h: * crypto/algorithms/CryptoAlgorithmAES_CBC.cpp: (WebCore::CryptoAlgorithmAES_CBC::importKey): * crypto/algorithms/CryptoAlgorithmAES_KW.cpp: (WebCore::CryptoAlgorithmAES_KW::importKey): * crypto/algorithms/CryptoAlgorithmHMAC.cpp: (WebCore::CryptoAlgorithmHMAC::importKey): * crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.cpp: (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::importKey): * crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp: (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::importKey): * crypto/algorithms/CryptoAlgorithmRSA_OAEP.cpp: (WebCore::CryptoAlgorithmRSA_OAEP::importKey): * crypto/keys/CryptoKeyDataOctetSequence.h: (WebCore::isCryptoKeyDataOctetSequence): Deleted. * crypto/keys/CryptoKeyDataRSAComponents.h: (WebCore::isCryptoKeyDataRSAComponents): Deleted. * crypto/keys/CryptoKeySerializationRaw.cpp: (WebCore::CryptoKeySerializationRaw::serialize): 2014-10-05 Benjamin Poulain Add a deprecation warning for Element.webkitMatchesSelector https://bugs.webkit.org/show_bug.cgi?id=137417 Reviewed by Christophe Dumez. Many scripts have assumed that the unprefixed version of ElementwebkitMatchesSelector would be Element.matchesSelector. Feature detection scripts too often test for Element.matchesSelector instead of Element.matches before calling Element.webkitMatchesSelector. This patch add a deprecation warning for Element.webkitMatchesSelector with the hope that it will push the adoption of the unprefixed version. * dom/Element.cpp: (WebCore::Element::webkitMatchesSelector): * dom/Element.h: * dom/Element.idl: 2014-10-05 Benjamin Poulain Element.matches()'s argument is not supposed to be optional https://bugs.webkit.org/show_bug.cgi?id=137427 Reviewed by Christophe Dumez. The argument was marked as optional, it is not supposed to: https://dom.spec.whatwg.org/#interface-element Also update the webkit-prefixed version: webkitMatchesSelector(). Tests: fast/dom/SelectorAPI/closest-definition.html fast/dom/SelectorAPI/closest-null-undefined.html fast/dom/SelectorAPI/matches-definition.html fast/dom/SelectorAPI/matches-null-undefined.html * dom/Element.idl: 2014-10-05 Christophe Dumez Use is<>() / downcast<>() for CachedResource subclasses https://bugs.webkit.org/show_bug.cgi?id=137431 Reviewed by Benjamin Poulain. Use is<>() / downcast<>() for CachedResource subclasses. No new tests, no behavior change. * inspector/InspectorPageAgent.cpp: (WebCore::InspectorPageAgent::cachedResourceContent): * loader/cache/CachedCSSStyleSheet.h: * loader/cache/CachedFont.h: * loader/cache/CachedImage.cpp: (WebCore::CachedImage::switchClientsToRevalidatedResource): * loader/cache/CachedImage.h: * loader/cache/CachedResource.h: * loader/cache/CachedResourceLoader.cpp: (WebCore::CachedResourceLoader::requestImage): (WebCore::CachedResourceLoader::requestFont): (WebCore::CachedResourceLoader::requestTextTrack): (WebCore::CachedResourceLoader::requestCSSStyleSheet): (WebCore::CachedResourceLoader::requestUserCSSStyleSheet): (WebCore::CachedResourceLoader::requestScript): (WebCore::CachedResourceLoader::requestXSLStyleSheet): (WebCore::CachedResourceLoader::requestSVGDocument): (WebCore::CachedResourceLoader::reloadImagesIfNotDeferred): * loader/cache/CachedSVGDocument.h: * loader/cache/CachedScript.h: * loader/cache/CachedTextTrack.h: * loader/cache/CachedXSLStyleSheet.h: * loader/cache/MemoryCache.cpp: (WebCore::MemoryCache::removeImageFromCache): 2014-10-05 Christophe Dumez Use is<>() / downcast<>() for StyleSheet subclasses https://bugs.webkit.org/show_bug.cgi?id=137429 Reviewed by Benjamin Poulain. Use is<>() / downcast<>() for StyleSheet subclasses. No new tests, no behavior change. * bindings/gobject/WebKitDOMPrivate.cpp: (WebKit::wrap): * css/CSSStyleSheet.h: (isType): * css/StyleSheet.h: * dom/Document.cpp: (WebCore::Document::applyXSLTransform): * dom/DocumentStyleSheetCollection.cpp: (WebCore::filterEnabledNonemptyCSSStyleSheets): * dom/ProcessingInstruction.cpp: (WebCore::ProcessingInstruction::parseStyleSheet): * inspector/InspectorCSSAgent.cpp: (WebCore::InspectorCSSAgent::getAllStyleSheets): * xml/XSLStyleSheet.h: (isType): 2014-10-05 Christophe Dumez Use is<>() / downcast<>() for CryptoAlgorithmParameters subclasses https://bugs.webkit.org/show_bug.cgi?id=137432 Reviewed by Benjamin Poulain. Use is<>() / downcast<>() for CryptoAlgorithmParameters subclasses. No new tests, no behavior change. * bindings/js/JSCryptoKeySerializationJWK.cpp: (WebCore::JSCryptoKeySerializationJWK::reconcileAlgorithm): * crypto/CryptoAlgorithmParameters.h: * crypto/algorithms/CryptoAlgorithmAES_CBC.cpp: (WebCore::CryptoAlgorithmAES_CBC::encrypt): (WebCore::CryptoAlgorithmAES_CBC::decrypt): (WebCore::CryptoAlgorithmAES_CBC::generateKey): * crypto/algorithms/CryptoAlgorithmAES_KW.cpp: (WebCore::CryptoAlgorithmAES_KW::generateKey): * crypto/algorithms/CryptoAlgorithmHMAC.cpp: (WebCore::CryptoAlgorithmHMAC::sign): (WebCore::CryptoAlgorithmHMAC::verify): (WebCore::CryptoAlgorithmHMAC::generateKey): (WebCore::CryptoAlgorithmHMAC::importKey): * crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.cpp: (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::generateKey): * crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp: (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::sign): (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::verify): (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::generateKey): (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::importKey): * crypto/algorithms/CryptoAlgorithmRSA_OAEP.cpp: (WebCore::CryptoAlgorithmRSA_OAEP::encrypt): (WebCore::CryptoAlgorithmRSA_OAEP::decrypt): (WebCore::CryptoAlgorithmRSA_OAEP::generateKey): (WebCore::CryptoAlgorithmRSA_OAEP::importKey): * crypto/parameters/CryptoAlgorithmAesCbcParams.h: * crypto/parameters/CryptoAlgorithmAesKeyGenParams.h: * crypto/parameters/CryptoAlgorithmHmacKeyParams.h: * crypto/parameters/CryptoAlgorithmHmacParams.h: * crypto/parameters/CryptoAlgorithmRsaKeyGenParams.h: * crypto/parameters/CryptoAlgorithmRsaKeyParamsWithHash.h: * crypto/parameters/CryptoAlgorithmRsaOaepParams.h: * crypto/parameters/CryptoAlgorithmRsaSsaParams.h: 2014-10-05 Chris Fleizach AX: iOS8: Crash at -[WebAccessibilityObjectWrapper accessibilityElementAtIndex:] https://bugs.webkit.org/show_bug.cgi?id=137289 Reviewed by Mario Sanchez Prada. Casting a NSInteger to an unsigned can bypass the check we were hoping to achieve, because size_t is not the same as unsigned. Test: platform/ios-sim/accessibility/out-of-bounds-child-access.html * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm: (-[WebAccessibilityObjectWrapper accessibilityElementAtIndex:]): 2014-10-05 Christophe Dumez Use is<>() / downcast<>() for ElementData subclasses https://bugs.webkit.org/show_bug.cgi?id=137430 Reviewed by Benjamin Poulain. Use is<>() / downcast<>() for ElementData subclasses. No new tests, no behavior change. * dom/Element.cpp: (WebCore::Element::cloneAttributesFromElement): (WebCore::Element::createUniqueElementData): * dom/ElementData.cpp: (WebCore::ElementData::destroy): * dom/ElementData.h: (WebCore::ElementData::length): (WebCore::ElementData::attributeBase): (WebCore::ElementData::presentationAttributeStyle): (WebCore::ElementData::attributesIterator): (WebCore::ElementData::findAttributeByName): (isType): 2014-10-05 Lorenzo Tilve [GTK] Fix build when DRAG_SUPPORT is disabled https://bugs.webkit.org/show_bug.cgi?id=137361 Reviewed by Carlos Garcia Campos. Flag out unbuildable code without DRAG_SUPPORT. * platform/gtk/GtkDragAndDropHelper.cpp: * platform/gtk/GtkDragAndDropHelper.h: 2014-10-05 Carlos Garcia Campos [GTK] Do not generate a symlink in derived sources for every header in WebCore/bindings/gobject https://bugs.webkit.org/show_bug.cgi?id=137389 Reviewed by Martin Robinson. We only need a symlink for static sources that are included in public generated headers, because they are added with as so they need to be inside a webkitdom directory. Also use proper targets and commands to create the symlinks only when needed instead of for every build. * PlatformGTK.cmake: 2014-10-04 Myles C. Maxfield [SVG -> OTF Converter] Arabic forms are not substituted correctly https://bugs.webkit.org/show_bug.cgi?id=137092 Reviewed by Darin Adler. Tests: svg/W3C-SVG-1.1/fonts-glyph-02-t.svg svg/custom/glyph-selection-arabic-forms.svg * svg/SVGToOTFFontConversion.cpp: (WebCore::SVGToOTFFontConverter::appendArabicReplacementSubtable): Invoked for each of the three Arabic form substitutions. (WebCore::SVGToOTFFontConverter::appendGSUBTable): OpenType "Advanced Typographic Table": "Glyph substitution data" (WebCore::SVGToOTFFontConverter::SVGToOTFFontConverter): Re-order the m_codepointsToIndicesMap to prefer isolated forms of glyphs. (WebCore::SVGToOTFFontConverter::convertSVGToOTFFont): Append the GSUB table. (WebCore::calculateChecksum): Deleted. 2014-10-04 Dhi Aurrahman Implement Element.closest() API https://bugs.webkit.org/show_bug.cgi?id=137418 Reviewed by Benjamin Poulain. Implement Element.closest() API as specified in [1]. [1]: https://dom.spec.whatwg.org/#dom-element-closest Tests: fast/selectors/closest-general.html fast/selectors/closest-scope.html * dom/Element.cpp: (WebCore::Element::closest): * dom/Element.h: * dom/Element.idl: * dom/SelectorQuery.cpp: (WebCore::SelectorDataList::selectorClosest): (WebCore::SelectorDataList::closest): * dom/SelectorQuery.h: (WebCore::SelectorQuery::closest): 2014-10-04 Brian J. Burg Unreviewed, rolling out r174319. Causes assertions in fast/profiler tests. Needs nontrivial investigation, will take offline. Reverted changeset: "Web Inspector: timelines should not count time elapsed while paused in the debugger" https://bugs.webkit.org/show_bug.cgi?id=136351 http://trac.webkit.org/changeset/174319 2014-10-04 Brian J. Burg Web Inspector: timelines should not count time elapsed while paused in the debugger https://bugs.webkit.org/show_bug.cgi?id=136351 Reviewed by Timothy Hatcher. To avoid counting time elapsed while the debugger is paused, timeline records should keep track of time elapsed since the start of timeline capturing, rather than wall clock timestamps. We can easily compute elapsed time by sharing Stopwatch instance among all timeline record-generating code. The stopwatch is paused while the debugger is paused, so subsequent time measurements will not include time elapsed while the debugger is paused. Agents use the shared stopwatch to generate timestamps if the timeline agent is active (i.e., a timeline recording is being captured). If not, use a zero timestamp since the timing data is only revealed through the Timeline interface. This refactoring is safe because start and end times are only used to graph records; the timestamp's actual value is irrelevant and is not displayed in the user interface. Date timestamps are still included with network-related records as part of their header data. No new tests, because we cannot reliably test timing changes induced by debugger pauses. It is possible for records to accrue time before the debugger pauses or after it resumes. * inspector/InspectorCSSAgent.cpp: Remove unused include. * inspector/InspectorPageAgent.cpp: Use timestamps from the shared stopwatch. (WebCore::InspectorPageAgent::timestamp): (WebCore::InspectorPageAgent::domContentEventFired): (WebCore::InspectorPageAgent::loadEventFired): * inspector/InspectorPageAgent.h: * inspector/InspectorResourceAgent.cpp: Use timestamps from the shared stopwatch. (WebCore::InspectorResourceAgent::timestamp): (WebCore::InspectorResourceAgent::willSendRequest): (WebCore::InspectorResourceAgent::didReceiveResponse): (WebCore::InspectorResourceAgent::didReceiveData): (WebCore::InspectorResourceAgent::didFinishLoading): (WebCore::InspectorResourceAgent::didFailLoading): (WebCore::InspectorResourceAgent::didLoadResourceFromMemoryCache): (WebCore::InspectorResourceAgent::willSendWebSocketHandshakeRequest): (WebCore::InspectorResourceAgent::didReceiveWebSocketHandshakeResponse): (WebCore::InspectorResourceAgent::didCloseWebSocket): (WebCore::InspectorResourceAgent::didReceiveWebSocketFrame): (WebCore::InspectorResourceAgent::didSendWebSocketFrame): (WebCore::InspectorResourceAgent::didReceiveWebSocketFrameError): * inspector/InspectorResourceAgent.h: * inspector/InspectorTimelineAgent.cpp: Add calls to reset, start, and stop the stopwatch. (WebCore::InspectorTimelineAgent::didCreateFrontendAndBackend): (WebCore::InspectorTimelineAgent::internalStart): (WebCore::InspectorTimelineAgent::internalStop): (WebCore::startProfiling): (WebCore::InspectorTimelineAgent::startFromConsole): (WebCore::InspectorTimelineAgent::willCallFunction): (WebCore::InspectorTimelineAgent::willEvaluateScript): (WebCore::InspectorTimelineAgent::didPause): (WebCore::InspectorTimelineAgent::didContinue): (WebCore::InspectorTimelineAgent::InspectorTimelineAgent): (WebCore::InspectorTimelineAgent::timestamp): (WebCore::TimelineTimeConverter::reset): Deleted. * inspector/InspectorTimelineAgent.h: Make timestamp() public, and remove old timepieces. (WebCore::TimelineTimeConverter::TimelineTimeConverter): Deleted. (WebCore::TimelineTimeConverter::fromMonotonicallyIncreasingTime): Deleted. (WebCore::InspectorTimelineAgent::timeConverter): Deleted. * inspector/TimelineRecordFactory.cpp: 2014-10-04 Tim Horton Make it possible to test page overlays https://bugs.webkit.org/show_bug.cgi?id=137339 Reviewed by Dan Bernstein. Tests: pageoverlay/overlay-installation.html pageoverlay/overlay-large-document-scrolled.html pageoverlay/overlay-large-document.html Do some initial work to make page overlays testable. There are many more tests to be written, but this lays the groundwork. * WebCore.exp.in: * WebCore.xcodeproj/project.pbxproj: * WebCore.vcxproj/WebCoreTestSupport.vcxproj: * WebCore.vcxproj/WebCoreTestSupport.vcxproj.filters: * CMakeLists.txt: Add MockPageOverlayClient. * platform/graphics/GraphicsLayer.h: * page/PageOverlayController.h: * page/PageOverlayController.cpp: (WebCore::PageOverlayController::shouldSkipLayerInDump): Don't skip PageOverlayController-owned layers in the layer tree dump if the layerTreeAsText behavior says that we should include them. * platform/graphics/GraphicsLayer.cpp: (WebCore::dumpChildren): * platform/graphics/GraphicsLayerClient.h: (WebCore::GraphicsLayerClient::shouldSkipLayerInDump): * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::shouldSkipLayerInDump): * rendering/RenderLayerBacking.h: Pass the LayerTreeAsTextBehavior through shouldSkipLayerInDump. * testing/Internals.cpp: (WebCore::Internals::resetToConsistentState): Uninstall all page overlays when resetting to a consistent state. (WebCore::Internals::installMockPageOverlay): (WebCore::Internals::pageOverlayLayerTreeAsText): Expose two new internals functions. installMockPageOverlay takes "view" or "document", allowing script to choose the appropriate overlay type. pageOverlayLayerTreeAsText dumps both view and document-relative overlays, from each overlay container layer. * testing/Internals.h: * testing/Internals.idl: Fix some typos. * testing/MockPageOverlayClient.cpp: Added. (WebCore::MockPageOverlayClient::shared): (WebCore::MockPageOverlayClient::MockPageOverlayClient): (WebCore::MockPageOverlayClient::installOverlay): (WebCore::MockPageOverlayClient::uninstallAllOverlays): (WebCore::MockPageOverlayClient::layerTreeAsText): (WebCore::MockPageOverlayClient::pageOverlayDestroyed): (WebCore::MockPageOverlayClient::willMoveToPage): (WebCore::MockPageOverlayClient::didMoveToPage): When the overlay is parented, mark it as needing repaint. Future tests might want to test overlays without content, but for now this is a reasonable default behavior. (WebCore::MockPageOverlayClient::drawRect): Paint the overlay rects as described in the LayoutTests ChangeLog. (WebCore::MockPageOverlayClient::mouseEvent): (WebCore::MockPageOverlayClient::didScrollFrame): (WebCore::MockPageOverlayClient::copyAccessibilityAttributeStringValueForPoint): (WebCore::MockPageOverlayClient::copyAccessibilityAttributeBoolValueForPoint): (WebCore::MockPageOverlayClient::copyAccessibilityAttributeNames): * testing/MockPageOverlayClient.h: Added. 2014-10-04 Carlos Garcia Campos Move DragController::createFragmentFromDragData implementation to the editor https://bugs.webkit.org/show_bug.cgi?id=136819 Reviewed by Darin Adler. Make Editor::webContentFromPasteboard() common to all ports and add a implementation for every port. * PlatformWin.cmake: Add new files to compilation. * WebCore.vcxproj/WebCore.vcxproj: Ditto. * editing/Editor.cpp: (WebCore::Editor::pasteWithPasteboard): Move to EditorWin.cpp since this is only used by windows port. * editing/Editor.h: * editing/efl/EditorEfl.cpp: (WebCore::Editor::webContentFromPasteboard): * editing/gtk/EditorGtk.cpp: (WebCore::Editor::webContentFromPasteboard): * editing/win/EditorWin.cpp: Added. (WebCore::Editor::pasteWithPasteboard): (WebCore::Editor::webContentFromPasteboard): * page/DragController.cpp: (WebCore::documentFragmentFromDragData): Use the editor instead of createFragmentFromDragData() that has been removed. Also made this method a static funtion again. * page/DragController.h: * page/efl/DragControllerEfl.cpp: Remove createFragmentFromDragData(). * page/gtk/DragControllerGtk.cpp: Ditto. * page/mac/DragControllerMac.mm: Ditto. * page/win/DragControllerWin.cpp: Ditto. * platform/Pasteboard.h: (WebCore::Pasteboard::dragDataMap): Add a getter for m_dragDataMap as required by Editor::webContentFromPasteboard for windows. 2014-10-04 Christophe Dumez Use is<>() / downcast<>() for CSS StyleProperties https://bugs.webkit.org/show_bug.cgi?id=137398 Reviewed by Benjamin Poulain. Use is<>() / downcast<>() for CSS StyleProperties subclasses. No new tests, no behavior change. * css/StyleProperties.cpp: (WebCore::StyleProperties::immutableCopyIfNeeded): (WebCore::MutableStyleProperties::MutableStyleProperties): (WebCore::StyleProperties::hasCSSOMWrapper): * css/StyleProperties.h: (WebCore::StyleProperties::PropertyReference::propertyMetadata): (WebCore::StyleProperties::PropertyReference::propertyValue): (WebCore::StyleProperties::propertyCount): (WebCore::StyleProperties::deref): (WebCore::StyleProperties::findPropertyIndex): (isType): (WebCore::toMutableStyleProperties): Deleted. (WebCore::toImmutableStyleProperties): Deleted. * css/StyleRule.cpp: (WebCore::StyleRule::mutableProperties): (WebCore::StyleRulePage::mutableProperties): (WebCore::StyleRuleFontFace::mutableProperties): * css/WebKitCSSKeyframeRule.cpp: (WebCore::StyleKeyframe::mutableProperties): * dom/StyledElement.cpp: (WebCore::StyledElement::ensureMutableInlineStyle): (WebCore::StyledElement::setInlineStyleFromString): 2014-10-04 Zan Dobersek [TexMap] Clean up GraphicsLayerTextureMapper::prepareBackingStoreIfNeeded() https://bugs.webkit.org/show_bug.cgi?id=137263 Reviewed by Darin Adler. * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp: (WebCore::GraphicsLayerTextureMapper::prepareBackingStoreIfNeeded): Clean up the method a bit. When the backing store will not be in use the change mask should only get updated if there was a backing store present beforehand. 2014-10-04 Zan Dobersek [TexMap] Remove QDoc comments in GraphicsLayerTextureMapper https://bugs.webkit.org/show_bug.cgi?id=137264 Reviewed by Andreas Kling. Remove all the QDoc comments in the class that were left over by the Qt port. * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp: (WebCore::GraphicsLayerTextureMapper::setNeedsDisplay): 2014-10-03 Christophe Dumez Use is<>() / downcast<>() for CSSValue subclasses https://bugs.webkit.org/show_bug.cgi?id=137381 Reviewed by Benjamin Poulain. Use is<>() / downcast<>() for CSSValue subclasses. No new tests, no behavior change. * css/CSSAspectRatioValue.h: * css/CSSBorderImageSliceValue.h: * css/CSSCalculationValue.cpp: (WebCore::CSSCalcExpressionNodeParser::parseValue): * css/CSSCalculationValue.h: * css/CSSCanvasValue.h: * css/CSSComputedStyleDeclaration.cpp: (WebCore::getBorderRadiusShorthandValue): (WebCore::ComputedStyleExtractor::propertyMatches): * css/CSSCrossfadeValue.cpp: (WebCore::subimageKnownToBeOpaque): * css/CSSCrossfadeValue.h: * css/CSSCursorImageValue.cpp: (WebCore::CSSCursorImageValue::~CSSCursorImageValue): (WebCore::CSSCursorImageValue::updateIfSVGCursorIsUsed): (WebCore::CSSCursorImageValue::cachedImage): (WebCore::CSSCursorImageValue::cachedOrPendingImage): (WebCore::CSSCursorImageValue::isSVGCursor): * css/CSSCursorImageValue.h: * css/CSSFilterImageValue.h: * css/CSSFontFaceSrcValue.h: * css/CSSFontFeatureValue.h: * css/CSSFontSelector.cpp: (WebCore::CSSFontSelector::addFontFaceRule): * css/CSSFontValue.h: * css/CSSFunctionValue.h: * css/CSSGradientValue.cpp: (WebCore::CSSGradientValue::image): (WebCore::CSSGradientValue::gradientWithStylesResolved): * css/CSSGradientValue.h: * css/CSSGridLineNamesValue.h: * css/CSSGridTemplateAreasValue.h: * css/CSSImageGeneratorValue.cpp: (WebCore::CSSImageGeneratorValue::image): (WebCore::CSSImageGeneratorValue::isFixedSize): (WebCore::CSSImageGeneratorValue::fixedSize): (WebCore::CSSImageGeneratorValue::isPending): (WebCore::CSSImageGeneratorValue::knownToBeOpaque): (WebCore::CSSImageGeneratorValue::loadSubimages): (WebCore::CSSImageGeneratorValue::subimageIsPending): (WebCore::CSSImageGeneratorValue::cachedImageForCSSValue): * css/CSSImageGeneratorValue.h: * css/CSSImageSetValue.cpp: (WebCore::CSSImageSetValue::fillImageSet): * css/CSSImageSetValue.h: * css/CSSImageValue.h: * css/CSSInheritedValue.h: * css/CSSInitialValue.h: * css/CSSLineBoxContainValue.h: * css/CSSParser.cpp: (WebCore::CSSParser::parseColor): (WebCore::CSSParser::addFillValue): (WebCore::CSSParser::addAnimationValue): (WebCore::CSSParser::parse3ValuesFillPosition): (WebCore::CSSParser::parseFillPosition): (WebCore::CSSParser::parseFillRepeat): (WebCore::gridMissingGridPositionValue): (WebCore::CSSParser::parseGridTemplateRowsAndAreas): (WebCore::CSSParser::parseBasicShapeCircle): (WebCore::CSSParser::parseBasicShapeEllipse): (WebCore::CSSParser::parseDeprecatedGradient): (WebCore::CSSParser::parseDeprecatedRadialGradient): (WebCore::CSSParser::parseRadialGradient): (WebCore::CSSParser::createFontFaceRule): * css/CSSPrimitiveValue.h: * css/CSSReflectValue.h: * css/CSSShadowValue.h: * css/CSSTimingFunctionValue.h: * css/CSSToStyleMap.cpp: (WebCore::CSSToStyleMap::mapFillAttachment): (WebCore::CSSToStyleMap::mapFillClip): (WebCore::CSSToStyleMap::mapFillComposite): (WebCore::CSSToStyleMap::mapFillBlendMode): (WebCore::CSSToStyleMap::mapFillOrigin): (WebCore::CSSToStyleMap::mapFillRepeatX): (WebCore::CSSToStyleMap::mapFillRepeatY): (WebCore::CSSToStyleMap::mapFillSize): (WebCore::CSSToStyleMap::mapFillXPosition): (WebCore::CSSToStyleMap::mapFillYPosition): (WebCore::CSSToStyleMap::mapFillMaskSourceType): (WebCore::CSSToStyleMap::mapAnimationDelay): (WebCore::CSSToStyleMap::mapAnimationDirection): (WebCore::CSSToStyleMap::mapAnimationDuration): (WebCore::CSSToStyleMap::mapAnimationFillMode): (WebCore::CSSToStyleMap::mapAnimationIterationCount): (WebCore::CSSToStyleMap::mapAnimationName): (WebCore::CSSToStyleMap::mapAnimationPlayState): (WebCore::CSSToStyleMap::mapAnimationProperty): (WebCore::CSSToStyleMap::mapAnimationTimingFunction): (WebCore::CSSToStyleMap::mapNinePieceImage): (WebCore::CSSToStyleMap::mapNinePieceImageSlice): (WebCore::CSSToStyleMap::mapNinePieceImageQuad): (WebCore::CSSToStyleMap::mapNinePieceImageRepeat): * css/CSSUnicodeRangeValue.h: * css/CSSValue.cpp: (WebCore::CSSValue::isImplicitInitialValue): (WebCore::CSSValue::addSubresourceStyleURLs): (WebCore::CSSValue::hasFailedOrCanceledSubresources): (WebCore::CSSValue::equals): (WebCore::CSSValue::cssText): (WebCore::CSSValue::destroy): (WebCore::CSSValue::cloneForCSSOM): * css/CSSValue.h: * css/CSSValueList.h: (WebCore::CSSValueListInspector::CSSValueListInspector): * css/DeprecatedStyleBuilder.cpp: (WebCore::ApplyPropertyDefault::applyValue): (WebCore::ApplyPropertyNumber::applyValue): (WebCore::ApplyPropertyAuto::applyValue): (WebCore::ApplyPropertyClip::applyValue): (WebCore::ApplyPropertyColor::applyValue): (WebCore::ApplyPropertyLength::applyValue): (WebCore::ApplyPropertyString::applyValue): (WebCore::ApplyPropertyBorderRadius::applyValue): (WebCore::ApplyPropertyFillLayer::applyValue): (WebCore::ApplyPropertyComputeLength::applyValue): (WebCore::ApplyPropertyFont::applyValue): (WebCore::ApplyPropertyFontFamily::applyValue): (WebCore::ApplyPropertyFontSize::applyValue): (WebCore::ApplyPropertyFontWeight::applyValue): (WebCore::ApplyPropertyFontVariantLigatures::applyValue): (WebCore::ApplyPropertyCounter::applyValue): (WebCore::ApplyPropertyCursor::applyValue): (WebCore::ApplyPropertyTextAlign::applyValue): (WebCore::ApplyPropertyTextDecoration::applyValue): (WebCore::ApplyPropertyTextDecorationSkip::applyValue): (WebCore::ApplyPropertyMarqueeIncrement::applyValue): (WebCore::ApplyPropertyMarqueeRepetition::applyValue): (WebCore::ApplyPropertyMarqueeSpeed::applyValue): (WebCore::ApplyPropertyTextUnderlinePosition::applyValue): (WebCore::ApplyPropertyLineHeight::applyValue): (WebCore::ApplyPropertyLineHeightForIOSTextAutosizing::applyValue): (WebCore::ApplyPropertyWordSpacing::applyValue): (WebCore::ApplyPropertyPageSize::applyValue): (WebCore::ApplyPropertyTextEmphasisStyle::applyValue): (WebCore::ApplyPropertyTextEmphasisPosition::applyValue): (WebCore::ApplyPropertyResize::applyValue): (WebCore::ApplyPropertyVerticalAlign::applyValue): (WebCore::ApplyPropertyAspectRatio::applyValue): (WebCore::ApplyPropertyZoom::applyValue): (WebCore::ApplyPropertyDisplay::applyValue): (WebCore::ApplyPropertyClipPath::applyValue): (WebCore::ApplyPropertyShape::applyValue): (WebCore::ApplyPropertyImageResolution::applyValue): (WebCore::ApplyPropertyTextIndent::applyValue): * css/MediaList.cpp: (WebCore::reportMediaQueryWarningIfNeeded): * css/MediaQueryEvaluator.cpp: (WebCore::compareAspectRatioValue): (WebCore::numberValue): (WebCore::orientationMediaFeatureEval): (WebCore::evalResolution): (WebCore::device_pixel_ratioMediaFeatureEval): (WebCore::resolutionMediaFeatureEval): (WebCore::computeLength): (WebCore::view_modeMediaFeatureEval): (WebCore::pointerMediaFeatureEval): * css/SVGCSSComputedStyleDeclaration.cpp: (WebCore::strokeDashArrayToCSSValueList): (WebCore::ComputedStyleExtractor::svgPropertyValue): * css/SVGCSSStyleSelector.cpp: (WebCore::StyleResolver::applySVGProperty): * css/SourceSizeList.cpp: (WebCore::computeLength): * css/StyleProperties.cpp: (WebCore::StyleProperties::getLayeredShorthandValue): * css/StyleResolver.cpp: (WebCore::extractDirectionAndWritingMode): (WebCore::createGridTrackSize): (WebCore::createGridTrackList): (WebCore::createGridPosition): (WebCore::StyleResolver::parseSnapCoordinate): (WebCore::StyleResolver::parseSnapPoints): (WebCore::StyleResolver::applyProperty): (WebCore::StyleResolver::styleImage): (WebCore::StyleResolver::generatedOrPendingFromValue): (WebCore::StyleResolver::createFilterOperations): * css/TransformFunctions.cpp: (WebCore::transformsForValue): * css/ViewportStyleResolver.cpp: (WebCore::ViewportStyleResolver::getViewportArgumentValue): * css/WebKitCSSFilterValue.h: * css/WebKitCSSMatrix.cpp: (WebCore::WebKitCSSMatrix::setMatrixValue): * css/WebKitCSSTransformValue.h: (WebCore::toWebKitCSSTransformValue): Deleted. * editing/ApplyStyleCommand.cpp: (WebCore::ApplyStyleCommand::computedFontSize): * editing/EditingStyle.cpp: (WebCore::identifierForStyleProperty): (WebCore::HTMLElementEquivalent::valueIsPresentInStyle): (WebCore::HTMLTextDecorationEquivalent::valueIsPresentInStyle): (WebCore::cssValueToRGBA): (WebCore::EditingStyle::extractFontSizeDelta): (WebCore::EditingStyle::textDirection): (WebCore::EditingStyle::prepareToApplyAt): (WebCore::EditingStyle::mergeStyle): (WebCore::EditingStyle::mergeStyleFromRulesForSerialization): (WebCore::EditingStyle::legacyFontSize): (WebCore::EditingStyle::textDirectionForSelection): (WebCore::StyleChange::extractTextStyles): (WebCore::diffTextDecorations): (WebCore::fontWeightIsBold): (WebCore::isTransparentColorValue): * editing/EditorCommand.cpp: (WebCore::executeToggleStyleInList): * editing/cocoa/HTMLConverter.mm: (stringFromCSSValue): (HTMLConverterCaches::floatPropertyValueForNode): (HTMLConverterCaches::colorPropertyValueForNode): * editing/markup.cpp: (WebCore::propertyMissingOrEqualToNone): * page/PageSerializer.cpp: (WebCore::PageSerializer::retrieveResourcesForProperties): * page/animation/CSSPropertyAnimation.cpp: (WebCore::blendFunc): * rendering/RenderTextControl.cpp: (WebCore::RenderTextControl::adjustInnerTextStyle): * rendering/style/StylePendingImage.h: (WebCore::StylePendingImage::cssImageValue): (WebCore::StylePendingImage::cssCursorImageValue): (WebCore::StylePendingImage::cssImageSetValue): * svg/SVGColor.h: * svg/SVGFontFaceElement.cpp: (WebCore::SVGFontFaceElement::rebuildFontFace): * svg/SVGPaint.h: 2014-10-03 Myles C. Maxfield Clean up interface to Font::expansionOpportunityCount() https://bugs.webkit.org/show_bug.cgi?id=137355 Reviewed by Dean Jackson. There are two overloads of Font::expansionOpportunityCount() which perform the same operation. One overload takes a UChar*, the other takes an LChar*, and they both take a length. This is the abstraction that StringView was designed to be. Instead of forcing each caller to take a different overload based on if their data is 8 bit or not, allow the caller to construct a StringView and pass that into Font::expansionOpportunityCount() instead of a raw pointer/length. No new tests because there is no behavior change. * platform/graphics/Font.cpp: (WebCore::Font::expansionOpportunityCountInternal): Original two functions, renamed. (WebCore::Font::expansionOpportunityCount): Takes a StringView, calls expansionOpportunityCountInternal(). * platform/graphics/Font.h: Update signatures. * platform/graphics/WidthIterator.cpp: (WebCore::WidthIterator::WidthIterator): Use new signature to Font::expansionOpportunityCount(). * platform/graphics/mac/ComplexTextController.cpp: (WebCore::ComplexTextController::ComplexTextController): Ditto. * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlockFlow::computeInlineDirectionPositionsForSegment): Ditto. * rendering/RenderText.cpp: (WebCore::RenderText::stringView): Accessor to encapsulate character pointer and length. * rendering/RenderText.h: Signature of new accessor. 2014-10-03 Brent Fulgham [Win] Unreviewed build fix for MSVC 2013 SP 3. The std::array initializer is not fully implemented in SP3 and causes a build error. * platform/graphics/transforms/AffineTransform.cpp: Use old style assignment initialization for MSVC builds until this bug is fixed. 2014-10-03 Tim Horton WKWebView snapshot of Daring Fireball has the wrong color in the obscured inset https://bugs.webkit.org/show_bug.cgi?id=137383 Reviewed by Sam Weinig. * rendering/RenderView.cpp: (WebCore::RenderView::paintBoxDecorations): Use documentBackgroundColor instead of baseBackgroundColor if backgroundShouldExtendBeyondPage is set. 2014-10-03 Dean Jackson webkit-appearance: default-button styling does not set the button font color to white https://bugs.webkit.org/show_bug.cgi?id=137399 rdar://problem/17788616 Reviewed by Dave Hyatt. When a button is styled with -webkit-appearance: default-button, it should use the CSSValueActivebuttontext value for its text color when the window is active, and the normal value when the window is inactive. Since activating (focus/blur) windows doesn't cause a style recalculation, this is applied as a paint-time operation. However, the render tree children that paint the text don't know that they are contained within a RenderButton and that the button is a default type. So I added an inherited flag, similar to what we use for visited links, to remember if we're in a button. And then computeTextPaintStyle chooses the correct value. We can't test this because our LayoutTest system doesn't have an active window, and thus the default button renders like a normal button. This should cause no regressions though. Also, the appearance is protected behind an SPI (or Setting), so this is not exposed to the Web. * rendering/RenderTheme.cpp: (WebCore::RenderTheme::adjustStyle): Set the flag if we're inside a default button. * rendering/TextPaintStyle.cpp: (WebCore::computeTextPaintStyle): If we're in a default button inside an active window, use the CSSValueActivebuttontext color. * rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::RenderStyle): Add and expose the new inherited flag: ._insideDefaultButton. (WebCore::RenderStyle::changeRequiresRepaint): Ditto. * rendering/style/RenderStyle.h: Ditto. 2014-09-28 Myles C. Maxfield [SVG -> OTF Converter] Support non-BMP codepoints https://bugs.webkit.org/show_bug.cgi?id=137097 Reviewed by Darin Adler. This patch has two pieces: 1) Moves write16(), overwrite32() and overwrite16() inside SVGToOTFFontConverter. This is so that we don't have to keep passing around references to m_result everywhere. Instead, put the output vector inside the class as an instance member variable. In addition, rename write32() and write16() to append32() and append16(), and provide a copy of append32 inside SVGToOTFFontConverter. 2) Change the "Codepoint" typedef to be a String, and rename it to Codepoints. This is so that we can implement ligatures later on. Update all the places that use this variable to work with a String of multiple codepoints. This patch updates the CMAP table to use format 12 instead of format 4. It currently only maps single codepoints to glyph IDs and skips all multi-codepoint glyphs. We will implement ligatures in another patch. Test: svg/custom/glyph-selection-non-bmp.svg * svg/SVGToOTFFontConversion.cpp: (WebCore::append32): Append a result to a given vector. This is for the path transcoder. (WebCore::SVGToOTFFontConverter::releaseResult): WTF::move()'s the result. (WebCore::SVGToOTFFontConverter::GlyphData::GlyphData): Update to take Codepoints instead of Codepoint. (WebCore::SVGToOTFFontConverter::append32): Piece 1 above. (WebCore::SVGToOTFFontConverter::append16): Ditto. (WebCore::SVGToOTFFontConverter::append4ByteCode): Convenience function. (WebCore::SVGToOTFFontConverter::overwrite32): Piece 1 above. (WebCore::SVGToOTFFontConverter::overwrite16): Ditto. (WebCore::SVGToOTFFontConverter::appendCMAPTable): Update to format 12. (WebCore::SVGToOTFFontConverter::appendHEADTable): Passing in a result vector is no longer necessary. (WebCore::SVGToOTFFontConverter::appendHHEATable): Ditto. (WebCore::SVGToOTFFontConverter::appendHMTXTable): Ditto. (WebCore::SVGToOTFFontConverter::appendMAXPTable): Ditto. (WebCore::SVGToOTFFontConverter::appendNAMETable): Ditto. (WebCore::SVGToOTFFontConverter::appendOS2Table): Ditto. (WebCore::SVGToOTFFontConverter::appendPOSTTable): Ditto. (WebCore::isValidStringForCFF): Ditto. (WebCore::SVGToOTFFontConverter::appendCFFValidString): Ditto. (WebCore::SVGToOTFFontConverter::appendCFFTable): Ditto. (WebCore::SVGToOTFFontConverter::appendVORGTable): Ditto. (WebCore::SVGToOTFFontConverter::appendVHEATable): Ditto. (WebCore::SVGToOTFFontConverter::appendVMTXTable): Ditto. (WebCore::SVGToOTFFontConverter::addCodepointRanges): Update for Codepoints. (WebCore::SVGToOTFFontConverter::addCodepoints): Ditto. (WebCore::SVGToOTFFontConverter::addGlyphNames): Ditto. (WebCore::SVGToOTFFontConverter::appendKERNSubtable): Ditto. (WebCore::SVGToOTFFontConverter::appendKERNTable): Ditto. (WebCore::writeCFFEncodedNumber): Passing in a result vector is no longer necessary. (WebCore::SVGToOTFFontConverter::appendGlyphData): Update for Codepoints. (WebCore::SVGToOTFFontConverter::processGlyphElement): Update for Codepoints. (WebCore::SVGToOTFFontConverter::compareCodepointsLexicographically): Comparing Codepoints (WebCore::SVGToOTFFontConverter::SVGToOTFFontConverter): Update for Codepoints. (WebCore::SVGToOTFFontConverter::calculateChecksum): Passing in a result vector is no longer necessary. (WebCore::SVGToOTFFontConverter::appendTable): Ditto. (WebCore::SVGToOTFFontConverter::convertSVGToOTFFont): Ditto. (WebCore::convertSVGToOTFFont): Move out of the result vector. (WebCore::write32): Deleted. (WebCore::write16): Deleted. (WebCore::overwrite32): Deleted. (WebCore::appendCFFValidString): Deleted. (WebCore::transcodeGlyphPaths): Deleted. (WebCore::calculateChecksum): Deleted. 2014-10-03 Commit Queue Unreviewed, rolling out r174270. https://bugs.webkit.org/show_bug.cgi?id=137397 crashes on the bots (Requested by dethbakin on #webkit). Reverted changeset: "EventSender dispatches should be per-Document" https://bugs.webkit.org/show_bug.cgi?id=136051 http://trac.webkit.org/changeset/174270 2014-10-03 Jer Noble [iOS] Back-to-back fullscreen videos result in incorrectly sized videos https://bugs.webkit.org/show_bug.cgi?id=137380 Reviewed by Eric Carlson. During a normal workflow, a