2014-11-24 Joanmarie Diggs AX: [ATK] Unskip the skipped ATK tests in roles-exposed.html https://bugs.webkit.org/show_bug.cgi?id=139016 Reviewed by Chris Fleizach. There was one test that could not be unskipped without making a change for that one to pass: mapping DocumentRegionRole to ATK_ROLE_PANEL. The rest of the "fix" is just unskipping tests for ATK and updating the test expectations. No new tests needed. * accessibility/atk/WebKitAccessibleWrapperAtk.cpp: (atkRole): 2014-11-23 Antti Koivisto Use segment vector for FlowContents https://bugs.webkit.org/show_bug.cgi?id=139015 Reviewed by Zalan Bujtas. And FlowContents::Segment struct and use it. * rendering/SimpleLineLayout.cpp: (WebCore::SimpleLineLayout::removeTrailingWhitespace): (WebCore::SimpleLineLayout::createLineRuns): (WebCore::SimpleLineLayout::splitRunsAtRendererBoundary): Use segments. If there is only one segment there is nothing to do. Bail out. * rendering/SimpleLineLayoutFlowContents.cpp: (WebCore::SimpleLineLayout::initializeSegments): Move initialization to a function so m_segments can be const. Don't add empty end segment, handle the end case in code. (WebCore::SimpleLineLayout::FlowContents::FlowContents): (WebCore::SimpleLineLayout::FlowContents::textWidth): Simplify and use segments. (WebCore::SimpleLineLayout::FlowContents::segmentForPositionSlow): Replace hand-rolled binary search with std::lower_bounds. (WebCore::SimpleLineLayout::FlowContents::segmentForRenderer): (WebCore::SimpleLineLayout::FlowContents::appendNextRendererContentIfNeeded): (WebCore::SimpleLineLayout::FlowContents::renderer): Deleted. (WebCore::SimpleLineLayout::FlowContents::resolveRendererPositions): Deleted. * rendering/SimpleLineLayoutFlowContents.h: (WebCore::SimpleLineLayout::FlowContents::hasOneSegment): (WebCore::SimpleLineLayout::FlowContents::length): (WebCore::SimpleLineLayout::FlowContents::isEnd): (WebCore::SimpleLineLayout::FlowContents::isEndOfContent): Deleted. Renamed. (WebCore::SimpleLineLayout::FlowContents::segmentForPosition): Inline the fast path. * rendering/SimpleLineLayoutResolver.cpp: (WebCore::SimpleLineLayout::RunResolver::Run::text): (WebCore::SimpleLineLayout::RunResolver::rangeForRenderer): 2014-11-22 Simon Fraser Extend WKRenderObject and WKRenderLayer with some more useful data https://bugs.webkit.org/show_bug.cgi?id=139006 Reviewed by Sam Weinig. Export WebCore::RenderLayerBacking::backingStoreMemoryEstimate() const. * WebCore.exp.in: 2014-11-22 Antti Koivisto Make locale part of the SimpleLineLayout::FlowContent::Style https://bugs.webkit.org/show_bug.cgi?id=139004 Reviewed by Zalan Bujtas. That's the only part of style not extracted out of RenderStyle in the constructor. * rendering/SimpleLineLayoutFlowContents.cpp: (WebCore::SimpleLineLayout::FlowContents::Style::Style): (WebCore::SimpleLineLayout::FlowContents::FlowContents): (WebCore::SimpleLineLayout::FlowContents::appendNextRendererContentIfNeeded): * rendering/SimpleLineLayoutFlowContents.h: Also remove RenderBlockFlow member since it is now unused. (WebCore::SimpleLineLayout::FlowContents::Style::Style): Deleted. Move to cpp. 2014-11-22 Joanmarie Diggs AX: [ATK] Accessible names missing for imagemap images and links https://bugs.webkit.org/show_bug.cgi?id=127288 Reviewed by Chris Fleizach. Return the alt text, if present, for the accessible name for image maps and image map links for ATK. Also expose the accessible element with ATK_ROLE_IMAGE_MAP instead of ATK_ROLE_IMAGE. Test: accessibility/image-with-alt-and-map.html * accessibility/AccessibilityObject.h: (WebCore::AccessibilityObject::isImageMap): * accessibility/atk/WebKitAccessibleWrapperAtk.cpp: (webkitAccessibleGetName): (atkRole): 2014-11-22 Andreas Kling Remove unused Document::ignoreAutofocus(). Reviewed by Antti Koivisto. No one ever actually changes this flag, so let's remove it. * dom/Document.cpp: (WebCore::Document::Document): * dom/Document.h: (WebCore::Document::ignoreAutofocus): Deleted. (WebCore::Document::setIgnoreAutofocus): Deleted. * html/HTMLFormControlElement.cpp: (WebCore::shouldAutofocus): 2014-11-22 Csaba Osztrogonác URTBF after r176459 to fix GTK build. * platform/ScrollAnimatorNone.cpp: (WebCore::ScrollAnimatorNone::ScrollAnimatorNone): (WebCore::ScrollAnimatorNone::requestAnimationTimerFired): * platform/ScrollAnimatorNone.h: 2014-11-22 Andreas Kling Convert PassRefPtr return types to RefPtr. Reviewed by Anders Carlsson. Convert an assortment of DOM and HTML related functions to return RefPtr instead of PassRefPtr. 2014-11-21 Jer Noble Unreviewed iOS build fix; move new symbols out of Mac-only exports. * WebCore.exp.in: 2014-11-21 Timothy Horton Remove a file that r176499 presumably did not mean to add. * WebCore.exp.in.orig: Removed. 2014-11-21 Jer Noble Support multiple signatures of diagnostic logging. https://bugs.webkit.org/show_bug.cgi?id=138690 Reviewed by Anders Carlsson. Pull logDiagnosticMessage() out of ChromeClient and make a new client interface, DiagnosticLoggingClient, which supports multiple kinds of diagnostic logging, namely: simple logging without a parameter, logging with a success parameter, and logging with a generic string value parameter. * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::parseAttribute): Use DiagnosticLoggingClient. * loader/FrameLoader.cpp: (WebCore::FrameLoader::checkLoadCompleteForThisFrame): Ditto. * loader/SubframeLoader.cpp: (WebCore::logPluginRequest): Ditto. * page/ChromeClient.h: (WebCore::ChromeClient::logDiagnosticMessage): Deleted. * page/DiagnosticLoggingClient.h: (WebCore::DiagnosticLoggingClient::logDiagnosticMessage): Added. (WebCore::DiagnosticLoggingClient::logDiagnosticMessageWithResult): Added. (WebCore::DiagnosticLoggingClient::logDiagnosticMessageWithValue): Added. (WebCore::DiagnosticLoggingClient::~DiagnosticLoggingClient): Empty destructor. Rename Page::PageClient to PageConfiguration, and pass that configuration from Page into MainFrame upon construction. * inspector/InspectorOverlay.cpp: (WebCore::InspectorOverlay::overlayPage): Use PageConfiguration instead of PageClients. * loader/EmptyClients.cpp: (WebCore::fillWithEmptyClients): Ditto. * loader/EmptyClients.h: * page/MainFrame.cpp: (WebCore::MainFrame::MainFrame): Pass loaderClientForMainFrame through to the Frame constructor. (WebCore::MainFrame::create): Takes a PageConfiguration. * page/MainFrame.h: (WebCore::MainFrame::diagnosticLoggingClient): Simple accessor. * page/Page.cpp: (WebCore::Page::Page): (WebCore::Page::PageClients::PageClients): Deleted. (WebCore::Page::PageClients::~PageClients): Deleted. * page/Page.h: * page/PageConfiguration.cpp: Added. (WebCore::PageConfiguration::PageConfiguration): Renamed from PageClients(). (WebCore::PageConfiguration::~PageConfiguration): Renamed from ~PageClients(). * page/PageConfiguration.h: Added. * svg/graphics/SVGImage.cpp: (WebCore::SVGImage::dataChanged): Use PageConfiguration instead of PageClients. Add new files and symbols to the project. * CMakeLists.txt: * WebCore.exp.in: * WebCore.vcxproj/WebCore.vcxproj: * WebCore.xcodeproj/project.pbxproj: 2014-11-21 Chris Dumez Throttled DOMTimers can prevent their document from being garbage collected https://bugs.webkit.org/show_bug.cgi?id=138915 Reviewed by Andreas Kling. Throttled DOMTimers whose interval depend on viewport changes would keep a Vector of elements outside viewport causing them to be throttled so that we could check later on (upon scroll or layout) if those elements are still outside viewport. The issue is that these elements could potentially be removed from the document (and destroyed) after the timer has fired. To handle this, DOMTimer was ref'ing the elements. Unfortunately, this was causing us to leak the document as the elements in the Vector would keep the document alive. To handle this issue, this patch updates the DOMTimer Vector to use weak pointers. The WeakPtrFactory is stored in ElementRareData to avoid wasting memory for all kinds of Elements (it is a fair assumption that the number of elements whose style is animated via timers is low). Test: fast/dom/throttled-timer-running-on-document-destruction.html * dom/Element.cpp: (WebCore::Element::createWeakPtr): * dom/Element.h: * dom/ElementRareData.cpp: * dom/ElementRareData.h: (WebCore::ElementRareData::weakPtrFactory): * page/DOMTimer.cpp: (WebCore::DOMTimerFireState::elementsChangedOutsideViewport): (WebCore::DOMTimer::updateThrottlingStateAfterViewportChange): * page/DOMTimer.h: 2014-11-21 Gyuyoung Kim Unreviewed, EFL build fix since r176459. r176459 removed Timer parameter in timer callbacks only for Mac port. So this patch applies it to remaining classes for EFL port. No new tests, fix build break. * Modules/mediastream/RTCDTMFSender.cpp: (WebCore::RTCDTMFSender::RTCDTMFSender): * Modules/mediastream/RTCDataChannel.cpp: (WebCore::RTCDataChannel::RTCDataChannel): * Modules/mediastream/RTCPeerConnection.cpp: (WebCore::RTCPeerConnection::RTCPeerConnection): * Modules/vibration/Vibration.cpp: (WebCore::Vibration::Vibration): (WebCore::Vibration::timerFired): * Modules/vibration/Vibration.h: * bindings/js/GCController.cpp: (WebCore::GCController::GCController): * platform/efl/BatteryProviderEfl.cpp: (WebCore::BatteryProviderEfl::BatteryProviderEfl): (WebCore::BatteryProviderEfl::timerFired): * platform/efl/BatteryProviderEfl.h: * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: (WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer): (WebCore::MediaPlayerPrivateGStreamer::fillTimerFired): * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h: * platform/graphics/texmap/TextureMapper.cpp: (WebCore::BitmapTexturePool::BitmapTexturePool): (WebCore::BitmapTexturePool::releaseUnusedTexturesTimerFired): * platform/graphics/texmap/coordinated/CompositingCoordinator.cpp: (WebCore::CompositingCoordinator::CompositingCoordinator): (WebCore::CompositingCoordinator::releaseInactiveAtlasesTimerFired): * platform/graphics/texmap/coordinated/CompositingCoordinator.h: * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp: (WebCore::CoordinatedGraphicsLayer::CoordinatedGraphicsLayer): (WebCore::CoordinatedGraphicsLayer::animationStartedTimerFired): * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h: * platform/graphics/texmap/coordinated/CoordinatedImageBacking.cpp: (WebCore::CoordinatedImageBacking::CoordinatedImageBacking): (WebCore::CoordinatedImageBacking::clearContentsTimerFired): * platform/graphics/texmap/coordinated/CoordinatedImageBacking.h: * platform/mock/DeviceMotionClientMock.cpp: (WebCore::DeviceMotionClientMock::DeviceMotionClientMock): (WebCore::DeviceMotionClientMock::timerFired): * platform/mock/DeviceMotionClientMock.h: * platform/mock/TimerEventBasedMock.h: (WebCore::TimerEvent::TimerEvent): (WebCore::TimerEvent::timerFired): 2014-11-21 Benjamin Poulain Start using the new :not() and :matches() in the Web Inspector https://bugs.webkit.org/show_bug.cgi?id=138978 Reviewed by Joseph Pecoraro. There are only minor pending issues on :not() and :matches(). The feedback has only been positive so far. It is time to move them out the experimental flag. * css/CSSGrammar.y.in: * css/CSSParser.cpp: (WebCore::CSSParser::detectFunctionTypeToken): * css/CSSSelector.cpp: (WebCore::simpleSelectorSpecificityInternal): (WebCore::simpleSelectorFunctionalPseudoClassStaticSpecificity): (WebCore::appendSelectorList): (WebCore::CSSSelector::selectorText): * css/CSSSelector.h: * css/SelectorChecker.cpp: (WebCore::SelectorChecker::checkOne): (WebCore::SelectorChecker::determineLinkMatchType): * css/SelectorPseudoClassAndCompatibilityElementMap.in: * cssjit/SelectorCompiler.cpp: (WebCore::SelectorCompiler::addPseudoClassType): 2014-11-21 Chris Dumez Unreviewed, iOS build fix after r176462. Export a few extra symbols. * WebCore.exp.in: 2014-11-21 Chris Dumez Properties in CSSPropertyNames.in should use the new StyleBuilder by default https://bugs.webkit.org/show_bug.cgi?id=138983 Reviewed by Andreas Kling. This patch makes using the new StyleBuilder the default and drops the [NewStyleBuilder] option as a result. A new [LegacyStyleBuilder] option is introduced for CSS properties that are not generated in the new StyleBuilder yet. * css/CSSPropertyNames.in: * css/SVGCSSPropertyNames.in: * css/makeprop.pl: 2014-11-21 Chris Dumez [iOS] Regression(r176202): line-height is wrong on marco.org https://bugs.webkit.org/show_bug.cgi?id=138970 Reviewed by Simon Fraser. After r176202, on iOS with IOS_TEXT_AUTOSIZING enabled, we would multiply the lineHeight by RenderStyle::textSizeAdjust()::multiplier() unconditionally. However, we're only supposed to do so if RenderStyle::textSizeAdjust()::isPercentage() returns true. This patch reintroduces the textSizeAdjust().isPercentage() check that was inadvertently dropped when refactoring the code to be shared between iOS and OS X. Additionally, the multiplier is only supposed the be applied if the input CSSPrimitiveValue is a Length or a Number. However, after r176202, we would apply the multiplier if the CSSPrimitiveValue is a Percentage or a Number. This patch updates the code to match the behavior prior to r176202. Test: fast/css/line-height-text-autosizing.html * css/StyleBuilderCustom.h: (WebCore::StyleBuilderFunctions::convertLineHeight): (WebCore::StyleBuilderFunctions::applyValueLineHeight): 2014-11-21 Chris Fleizach AX: com.apple.WebKit.WebContent crashed at WebCore: WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored const https://bugs.webkit.org/show_bug.cgi?id=138905 Reviewed by Mario Sanchez Prada. The crash log indicates that m_renderer is null at the time we ask ancestorsOfType(). This is more of a speculative fix, since I am not entirely sure m_renderer is null when we enter the method. Unable to determine cause of crash or how to reproduce on demand. * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored): 2014-11-21 Jer Noble [EME][Mac] Check the underlying error if the one returned by AVFoundation is AVErrorUnknown. https://bugs.webkit.org/show_bug.cgi?id=138986 Reviewed by Eric Carlson. When we recieve an error with the code AVErrorUnknown, look for an underlying error from CoreMedia (or another lower-level framework) with a (presumably) more informative error code, and return that code instead. * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm: (WebCore::systemCodeForError): (WebCore::CDMSessionMediaSourceAVFObjC::layerDidReceiveError): (WebCore::CDMSessionMediaSourceAVFObjC::rendererDidReceiveError): 2014-11-21 Chris Fleizach AX: Unclear that user and password are autofilled, no VoiceOver version of the yellow outline. https://bugs.webkit.org/show_bug.cgi?id=138904 Reviewed by Mario Sanchez Prada. Add an attribute that marks when a text field is auto-filled. Test: accessibility/auto-filled-value.html * accessibility/AccessibilityObject.cpp: (WebCore::AccessibilityObject::isValueAutofilled): * accessibility/AccessibilityObject.h: * accessibility/mac/WebAccessibilityObjectWrapperMac.mm: (-[WebAccessibilityObjectWrapper accessibilityAttributeNames]): (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]): 2014-11-21 Andreas Kling RenderElement::removeChild() doesn't need a return value. Reviewed by Pantti Koivisto. Nobody uses the return value from RenderElement::removeChild(). Change it to return void and remove all the unnecessary plumbing. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::removeChild): * rendering/RenderBlock.h: * rendering/RenderBlockFlow.cpp: (WebCore::RenderBlockFlow::removeChild): * rendering/RenderBlockFlow.h: * rendering/RenderButton.cpp: (WebCore::RenderButton::removeChild): * rendering/RenderButton.h: * rendering/RenderElement.cpp: (WebCore::RenderElement::removeChild): (WebCore::RenderElement::removeChildInternal): * rendering/RenderElement.h: * rendering/RenderMenuList.cpp: (RenderMenuList::removeChild): * rendering/RenderMenuList.h: * rendering/RenderRuby.cpp: (WebCore::RenderRubyAsInline::removeChild): (WebCore::RenderRubyAsBlock::removeChild): * rendering/RenderRuby.h: * rendering/RenderRubyRun.cpp: (WebCore::RenderRubyRun::removeChild): * rendering/RenderRubyRun.h: * rendering/mathml/RenderMathMLRoot.cpp: (WebCore::RenderMathMLRootWrapper::removeChildWithoutRestructuring): (WebCore::RenderMathMLRootWrapper::removeChild): * rendering/mathml/RenderMathMLRoot.h: * rendering/mathml/RenderMathMLScripts.cpp: (WebCore::RenderMathMLScripts::removeChildInternal): (WebCore::RenderMathMLScripts::removeChild): (WebCore::RenderMathMLScriptsWrapper::removeChildInternal): (WebCore::RenderMathMLScriptsWrapper::removeChild): * rendering/mathml/RenderMathMLScripts.h: * rendering/svg/RenderSVGContainer.cpp: (WebCore::RenderSVGContainer::removeChild): * rendering/svg/RenderSVGContainer.h: * rendering/svg/RenderSVGInline.cpp: (WebCore::RenderSVGInline::removeChild): * rendering/svg/RenderSVGInline.h: * rendering/svg/RenderSVGRoot.cpp: (WebCore::RenderSVGRoot::removeChild): * rendering/svg/RenderSVGRoot.h: * rendering/svg/RenderSVGText.cpp: (WebCore::RenderSVGText::removeChild): * rendering/svg/RenderSVGText.h: 2014-11-21 Tim Horton REGRESSION (r176351): Parts of apple.com/contact aren't Lookup-able ​https://bugs.webkit.org/show_bug.cgi?id=138960 Reviewed by Anders Carlsson. * platform/spi/mac/DataDetectorsSPI.h: Add some DataDetectors SPI. 2014-11-21 Jer Noble [Mac] Random crashes inside media libraries when creating then destroying media quickly. https://bugs.webkit.org/show_bug.cgi?id=138980 Reviewed by Eric Carlson. Speculative fix for random crashes in the layout tests which occur randomly but regularly. The theory is that creating-then-destroying our media objects too quickly triggers crashes deep within the media frameworks when their initialization threads don't have a chance to complete before the main player object is destroyed. Test out this theory by delaying the destruction of the AVPlayer object for 1s after its owner is destroyed. * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: (WebCore::MediaPlayerPrivateAVFoundationObjC::cancelLoad): 2014-11-21 Jer Noble [Mac] Delay of 1-2s after the first paint of a video frame. https://bugs.webkit.org/show_bug.cgi?id=138979 Reviewed by Eric Carlson. Only bother waiting for a signal that a new image is ready when the image isn't ready in the first place. * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: (WebCore::MediaPlayerPrivateAVFoundationObjC::paintWithVideoOutput): 2014-11-21 Glenn Adams and Myles C. Maxfield Add support to -webkit-line-break property for CSS3 Text line-break property values and semantics. https://bugs.webkit.org/show_bug.cgi?id=89235 Reviewed by Eric Seidel and Dave Hyatt. This patch adds semantic support for the CSS3 line-break property (qua -webkit-line-break), and enables testing on (apple) mac ports. Follow on patches will enable these tests on other ports as they are incrementally verified. See also wiki documentation at: [1] http://trac.webkit.org/wiki/LineBreaking [2] http://trac.webkit.org/wiki/LineBreakingCSS3Mapping Tests: css3/line-break/line-break-auto-centered.html css3/line-break/line-break-auto-half-kana.html css3/line-break/line-break-auto-hyphens.html css3/line-break/line-break-auto-inseparables.html css3/line-break/line-break-auto-iteration-marks.html css3/line-break/line-break-auto-postfixes.html css3/line-break/line-break-auto-prefixes.html css3/line-break/line-break-auto-sound-marks.html css3/line-break/line-break-loose-centered.html css3/line-break/line-break-loose-half-kana.html css3/line-break/line-break-loose-hyphens.html css3/line-break/line-break-loose-inseparables.html css3/line-break/line-break-loose-iteration-marks.html css3/line-break/line-break-loose-postfixes.html css3/line-break/line-break-loose-prefixes.html css3/line-break/line-break-loose-sound-marks.html css3/line-break/line-break-normal-centered.html css3/line-break/line-break-normal-half-kana.html css3/line-break/line-break-normal-hyphens.html css3/line-break/line-break-normal-inseparables.html css3/line-break/line-break-normal-iteration-marks.html css3/line-break/line-break-normal-postfixes.html css3/line-break/line-break-normal-prefixes.html css3/line-break/line-break-normal-sound-marks.html css3/line-break/line-break-strict-centered.html css3/line-break/line-break-strict-half-kana.html css3/line-break/line-break-strict-hyphens.html css3/line-break/line-break-strict-inseparables.html css3/line-break/line-break-strict-iteration-marks.html css3/line-break/line-break-strict-postfixes.html css3/line-break/line-break-strict-prefixes.html css3/line-break/line-break-strict-sound-marks.html These tests were previously added in http://trac.webkit.org/changeset/143378, but skipped in generic TestExpectations. In this patch, they are marked as Pass for the (apple) mac ports. * platform/text/LineBreakIteratorPoolICU.h: (WebCore::LineBreakIteratorPool::makeLocaleWithBreakKeyword): Add static function to construct ICU locale argument (also used as pool key) with additional break keyword. (LineBreakIteratorPool): (WebCore::LineBreakIteratorPool::take): (WebCore::LineBreakIteratorPool::put): Remove direct dependency from ICU library (and types), moving that dependency into new {open,close}LineBreakIterator() functions (defined in TextBreakIteratorICU.cpp). Update to take line break mode into account. Create (and cache) different break iterators depending on line break mode (in addition to locale), which entails expanding pool entry key format to optionally append "@break=" + "loose"|"normal"|"strict" keyword to locale string. * platform/text/TextBreakIterator.h: (WebCore::LazyLineBreakIterator::LazyLineBreakIterator): (WebCore::LazyLineBreakIterator::isLooseCJKMode): (WebCore::LazyLineBreakIterator::get): (WebCore::LazyLineBreakIterator::reset): (LazyLineBreakIterator): Define LineBreakIteratorMode enumeration for use in TextBreakIterator et al. Add state member to indicate line break mode. * platform/text/TextBreakIteratorICU.cpp: (WebCore::acquireLineBreakIterator): Use new line break mode when making iterator from pool. Handle change of return type of LineBreakIteratorPool::take() to non-ICU type, i.e., TextBreakIterator* instead of ICU's UBreakIterator*. (WebCore::releaseLineBreakIterator): Handle change of parameter type of LineBreakIteratorPool::put() to non-ICU type, i.e., TextBreakIterator* instead of ICU's UBreakIterator*. (WebCore): (WebCore::isCJKLocale): New functions for determining if CJK rules apply. (WebCore::openLineBreakIterator): New function for abstracting opening of ICU style line break iterator. This is now used in LineBreakIteratorPoolICU.h rather than having direct ICU API dependency there. This function also takes into account the line break mode. Note that this function only calls ubrk_openRules() when the author has opted-in via using the -webkit-line-break CSS property. Eventually, we would like to be able to customize the rules that ICU's line breaking algorithm uses (especially for CJK text); however, ubrk_openRules() currently parses its input string to create a DFA and is therefore very slow. In fact, it's so slow that increasing our cache size in LineBreakIteratorPool doesn't actually help enough. Also note that the default value for the line-break CSS property is 'auto'. (WebCore::closeLineBreakIterator): (WebCore::mapLineIteratorModeToRules): New function for abstracting closing of ICU style line break iterator. This is now used in LineBreakIteratorPoolICU.h rather than having direct ICU API dependency there. * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlock::LineBreaker::nextSegmentBreak): Pass line break iterator mode flag when reseting LazyLineBreakIterator. Add looseMode local variable to prevent need for computing under isBreakable(). * rendering/RenderText.cpp: (WebCore::mapLineBreakToIteratorMode): Add implementation for mapLineBreakToIteratorMode(), used by both RenderText::computePreferredLogicalWidths and RenderBlock::LineBreaker::nextLineBreak. (WebCore): (WebCore::RenderText::computePreferredLogicalWidths): Ensure (lazy line) breakIterator is initialized for line break mode. Ensure isBreakable() is passed loose mode flag to match behavior in RenderBlock::LineBreaker::nextLineBreak. * rendering/RenderText.h: (WebCore): Add declaration for mapLineBreakToIteratorMode(), used by both RenderText::computePreferredLogicalWidths and RenderBlock::LineBreaker::nextLineBreak. * rendering/break_lines.cpp: (WebCore): Introduce (local) enum NBSPBehavior for expanding template on nextBreakablePosition. (WebCore::isBreakableSpace): Add externally specified loose mode parameter to prevent need to invoke line break iterator accessor method on each invocation. Use new loose mode flavors off NBP functions. (WebCore::needsLineBreakIterator): Use enum NBSP behavior template parameter rather than boolean. (WebCore::nextBreakablePositionNonLoosely): Extend name to distinguish from loose flavor of this function. (WebCore::nextBreakablePositionLoosely): Add loose flavor of NBP invoked only when loose mode applies, in which case ASCII shortcut table cannot be used. (WebCore::nextBreakablePosition): (WebCore::nextBreakablePositionIgnoringNBSP): Use (renamed) non-loose flavor of NBP. (WebCore::nextBreakablePositionLoose): (WebCore::nextBreakablePositionIgnoringNBSPLoose): Introduce loose flavor of NBP template expansions. * rendering/break_lines.h: (WebCore): (WebCore::isBreakable): Add externally specified loose mode parameter to prevent need to invoke line break iterator accessor method on each invocation. 2014-11-21 Anders Carlsson More build fixes. * Modules/mediastream/MediaStream.cpp: (WebCore::MediaStream::MediaStream): 2014-11-21 Eric Carlson [iOS] allocate volume view on the main thread https://bugs.webkit.org/show_bug.cgi?id=138971 rdar://problem/18016958 Reviewed by Jer Noble. * platform/audio/ios/MediaSessionManagerIOS.mm: (-[WebMediaSessionHelper allocateVolumeView]): New, dispatch to the main thread if necessary before allocating the volume view. (-[WebMediaSessionHelper initWithCallback:]): Call allocateVolumeView. 2014-11-21 Zalan Bujtas REGRESSION(r175259) Simple line layout text measuring behavior changed. https://bugs.webkit.org/show_bug.cgi?id=138947 rdar://problem/19050653 Reviewed by Antti Koivisto. In certain cases, when block flow needs to compute the preferred width of a particular text renderer, we use the non-simple line layout text measuring. However, the same text renderer might end up at simple line layout later. Complex line layout measures text including the trailing space and it subtracts (the constant value of) space width afterwards, while simple line layout measures runs without the extra space. In such cases, this may result different word widths and produce unexpected line breaking. (preferred width != final width) In long term, any text renderer qualified for simple line layout should go through the simple text measuring code path. (https://bugs.webkit.org/show_bug.cgi?id=138973) For now, just copy complex line layout behaviour. This also matches the previous simple line layout line breaking implementation. Test: fast/text/simple-line-text-measuring-with-trailing-space.html * rendering/SimpleLineLayoutFlowContents.cpp: (WebCore::SimpleLineLayout::FlowContents::textWidth): 2014-11-21 Anders Carlsson More Windows build fixes. * platform/graphics/ca/win/LegacyCACFLayerTreeHost.cpp: (WebCore::LegacyCACFLayerTreeHost::LegacyCACFLayerTreeHost): (WebCore::LegacyCACFLayerTreeHost::renderTimerFired): * platform/graphics/ca/win/LegacyCACFLayerTreeHost.h: * platform/mock/GeolocationClientMock.cpp: (WebCore::GeolocationClientMock::GeolocationClientMock): (WebCore::GeolocationClientMock::permissionTimerFired): (WebCore::GeolocationClientMock::controllerTimerFired): * platform/mock/GeolocationClientMock.h: 2014-11-21 Andreas Kling RenderMathMLScripts isPrescript() helper should take a reference. Reviewed by Antti Koivisto. Tidy this up a bit, since it's never called with a null pointer. * rendering/mathml/RenderMathMLScripts.cpp: (WebCore::isPrescript): (WebCore::RenderMathMLScripts::fixAnonymousStyles): (WebCore::RenderMathMLScripts::addChildInternal): (WebCore::RenderMathMLScripts::removeChildInternal): (WebCore::RenderMathMLScripts::layout): (WebCore::RenderMathMLScriptsWrapper::addChildInternal): (WebCore::RenderMathMLScriptsWrapper::removeChildInternal): 2014-11-21 Anders Carlsson Windows build fixes. * plugins/PluginPackage.cpp: (WebCore::PluginPackage::freeLibraryTimerFired): (WebCore::PluginPackage::PluginPackage): * plugins/PluginPackage.h: * plugins/PluginStream.cpp: (WebCore::PluginStream::PluginStream): (WebCore::PluginStream::delayDeliveryTimerFired): (WebCore::PluginStream::deliverData): Deleted. * plugins/PluginStream.h: * plugins/PluginView.cpp: (WebCore::PluginView::popPopupsStateTimerFired): (WebCore::PluginView::requestTimerFired): (WebCore::PluginView::invalidateTimerFired): (WebCore::PluginView::PluginView): (WebCore::PluginView::lifeSupportTimerFired): (WebCore::PluginView::performRequest): Deleted. (WebCore::PluginView::setValue): Deleted. (WebCore::PluginView::setParameters): Deleted. (WebCore::PluginView::userAgent): Deleted. * plugins/PluginView.h: * plugins/win/PluginMessageThrottlerWin.cpp: (WebCore::PluginMessageThrottlerWin::PluginMessageThrottlerWin): (WebCore::PluginMessageThrottlerWin::messageThrottleTimerFired): * plugins/win/PluginMessageThrottlerWin.h: 2014-11-21 Tim Horton REGRESSION (r176351): Parts of apple.com/contact aren't Lookup-able https://bugs.webkit.org/show_bug.cgi?id=138960 Reviewed by Beth Dakin. * platform/spi/mac/DataDetectorsSPI.h: Softlink some SPI. 2014-11-21 Tim Horton Move TextIndicator{Window} to WebCore https://bugs.webkit.org/show_bug.cgi?id=138954 Some adjustments by Csaba Osztrogonác. Reviewed by Anders Carlsson. Move TextIndicator and TextIndicatorWindow to WebCore so that both WebKits can share the implementation. * CMakeLists.txt: Build TextIndicator. * WebCore.exp.in: Export TextIndicator{Window} symbols for the WebKits. * WebCore.xcodeproj/project.pbxproj: * page/TextIndicator.cpp: Renamed from Source/WebKit2/Shared/TextIndicator.cpp. * page/TextIndicator.h: Renamed from Source/WebKit2/Shared/TextIndicator.h. Straighforward move of TextIndicator from WebKit2, except: Move TextIndicator::Data and TextIndicator::PresentationTransition out directly into the WebCore namespace to allow for implementation of WebKit2 argument coders. Use Image instead of ShareableBitmap internally. Move the TextIndicatorData encode/decode to WebCoreArgumentCoders. * page/mac/TextIndicatorWindow.h: Renamed from Source/WebKit2/UIProcess/mac/TextIndicatorWindow.h. * page/mac/TextIndicatorWindow.mm: Renamed from Source/WebKit2/UIProcess/mac/TextIndicatorWindow.mm. Straighforward move of TextIndicatorWindow from WebKit2. 2014-11-21 Anders Carlsson Remove the Timer parameters from timer callbacks https://bugs.webkit.org/show_bug.cgi?id=138974 Reviewed by Antti Koivisto. * Modules/encryptedmedia/MediaKeySession.cpp: (WebCore::MediaKeySession::MediaKeySession): (WebCore::MediaKeySession::keyRequestTimerFired): (WebCore::MediaKeySession::addKeyTimerFired): * Modules/encryptedmedia/MediaKeySession.h: * Modules/geolocation/Geolocation.cpp: (WebCore::Geolocation::GeoNotifier::GeoNotifier): (WebCore::Geolocation::GeoNotifier::timerFired): (WebCore::Geolocation::Geolocation): (WebCore::Geolocation::resumeTimerFired): * Modules/geolocation/Geolocation.h: * Modules/indexeddb/IDBTransactionBackend.cpp: (WebCore::IDBTransactionBackend::IDBTransactionBackend): (WebCore::IDBTransactionBackend::taskTimerFired): * Modules/indexeddb/IDBTransactionBackend.h: * Modules/mediasource/SourceBuffer.cpp: (WebCore::SourceBuffer::SourceBuffer): (WebCore::SourceBuffer::appendBufferTimerFired): (WebCore::SourceBuffer::removeTimerFired): * Modules/mediasource/SourceBuffer.h: * Modules/mediastream/MediaStream.cpp: (WebCore::MediaStream::MediaStream): (WebCore::MediaStream::scheduledEventTimerFired): * Modules/mediastream/MediaStream.h: * Modules/mediastream/RTCDTMFSender.cpp: (WebCore::RTCDTMFSender::RTCDTMFSender): (WebCore::RTCDTMFSender::scheduledEventTimerFired): * Modules/mediastream/RTCDTMFSender.h: * Modules/mediastream/RTCDataChannel.cpp: (WebCore::RTCDataChannel::RTCDataChannel): (WebCore::RTCDataChannel::scheduledEventTimerFired): * Modules/mediastream/RTCDataChannel.h: * Modules/mediastream/RTCPeerConnection.cpp: (WebCore::RTCPeerConnection::RTCPeerConnection): (WebCore::RTCPeerConnection::scheduledEventTimerFired): * Modules/mediastream/RTCPeerConnection.h: * Modules/notifications/Notification.cpp: (WebCore::Notification::Notification): (WebCore::Notification::taskTimerFired): * Modules/notifications/Notification.h: * Modules/notifications/NotificationCenter.cpp: (WebCore::NotificationCenter::NotificationRequestCallback::NotificationRequestCallback): (WebCore::NotificationCenter::NotificationRequestCallback::timerFired): * Modules/notifications/NotificationCenter.h: * Modules/websockets/WebSocketChannel.cpp: (WebCore::WebSocketChannel::WebSocketChannel): (WebCore::WebSocketChannel::resumeTimerFired): (WebCore::WebSocketChannel::closingTimerFired): * Modules/websockets/WebSocketChannel.h: * accessibility/AXObjectCache.cpp: (WebCore::AXObjectCache::AXObjectCache): (WebCore::AXObjectCache::notificationPostTimerFired): * accessibility/AXObjectCache.h: * bindings/js/GCController.cpp: (WebCore::GCController::GCController): (WebCore::GCController::gcTimerFired): * bindings/js/GCController.h: * css/CSSFontFaceSource.h: * css/CSSFontSelector.cpp: (WebCore::CSSFontSelector::CSSFontSelector): (WebCore::CSSFontSelector::beginLoadTimerFired): * css/CSSFontSelector.h: * css/CSSImageGeneratorValue.cpp: (WebCore::CSSImageGeneratorValue::CachedGeneratedImage::CachedGeneratedImage): * css/StyleResolver.cpp: (WebCore::StyleResolver::StyleResolver): (WebCore::StyleResolver::sweepMatchedPropertiesCache): * css/StyleResolver.h: * dom/Document.cpp: (WebCore::Document::Document): (WebCore::Document::visualUpdatesSuppressionTimerFired): (WebCore::Document::styleRecalcTimerFired): (WebCore::Document::optimizedStyleSheetUpdateTimerFired): (WebCore::Document::sharedObjectPoolClearTimerFired): (WebCore::Document::updateFocusAppearanceTimerFired): (WebCore::Document::pendingTasksTimerFired): (WebCore::Document::webkitWillEnterFullScreenForElement): (WebCore::Document::webkitDidExitFullScreenForElement): (WebCore::Document::fullScreenChangeDelayTimerFired): (WebCore::Document::loadEventDelayTimerFired): (WebCore::Document::didAssociateFormControlsTimerFired): (WebCore::Document::domCookieCacheExpiryTimerFired): * dom/Document.h: * dom/EventSender.h: (WebCore::EventSender::timerFired): (WebCore::EventSender::EventSender): * dom/ScriptRunner.cpp: (WebCore::ScriptRunner::ScriptRunner): (WebCore::ScriptRunner::timerFired): * dom/ScriptRunner.h: * dom/ScriptedAnimationController.cpp: (WebCore::ScriptedAnimationController::ScriptedAnimationController): (WebCore::ScriptedAnimationController::animationTimerFired): * dom/ScriptedAnimationController.h: * dom/StyledElement.cpp: (WebCore::PresentationAttributeCacheCleaner::PresentationAttributeCacheCleaner): (WebCore::PresentationAttributeCacheCleaner::cleanCache): * editing/AlternativeTextController.cpp: (WebCore::AlternativeTextController::AlternativeTextController): (WebCore::AlternativeTextController::timerFired): * editing/AlternativeTextController.h: * editing/Editor.cpp: (WebCore::Editor::Editor): (WebCore::Editor::updateEditorUINowIfScheduled): (WebCore::Editor::editorUIUpdateTimerFired): (WebCore::Editor::scanSelectionForTelephoneNumbers): Deleted. * editing/Editor.h: * editing/FrameSelection.cpp: (WebCore::FrameSelection::FrameSelection): (WebCore::FrameSelection::caretBlinkTimerFired): * editing/FrameSelection.h: * editing/SpellChecker.cpp: (WebCore::SpellChecker::SpellChecker): (WebCore::SpellChecker::timerFiredToProcessQueuedRequest): * editing/SpellChecker.h: * html/HTMLFormElement.cpp: (WebCore::HTMLFormElement::HTMLFormElement): (WebCore::HTMLFormElement::requestAutocompleteTimerFired): * html/HTMLFormElement.h: * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::HTMLMediaElement): (WebCore::HTMLMediaElement::parseAttribute): * html/HTMLMediaElement.h: * html/HTMLPlugInElement.cpp: (WebCore::HTMLPlugInElement::HTMLPlugInElement): (WebCore::HTMLPlugInElement::swapRendererTimerFired): * html/HTMLPlugInElement.h: * html/HTMLPlugInImageElement.cpp: (WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement): (WebCore::HTMLPlugInImageElement::removeSnapshotTimerFired): * html/HTMLPlugInImageElement.h: * html/HTMLSourceElement.cpp: (WebCore::HTMLSourceElement::HTMLSourceElement): (WebCore::HTMLSourceElement::errorEventTimerFired): * html/HTMLSourceElement.h: * html/HTMLTrackElement.cpp: (WebCore::HTMLTrackElement::HTMLTrackElement): (WebCore::HTMLTrackElement::loadTimerFired): * html/HTMLTrackElement.h: * html/MediaController.cpp: (MediaController::MediaController): (MediaController::asyncEventTimerFired): (MediaController::clearPositionTimerFired): (MediaController::timeupdateTimerFired): * html/MediaController.h: * html/MediaDocument.cpp: (WebCore::MediaDocument::MediaDocument): (WebCore::MediaDocument::replaceMediaElementTimerFired): * html/MediaDocument.h: * html/SearchInputType.cpp: (WebCore::SearchInputType::SearchInputType): (WebCore::SearchInputType::searchEventTimerFired): * html/SearchInputType.h: * html/ValidationMessage.cpp: (WebCore::ValidationMessage::setMessage): (WebCore::ValidationMessage::setMessageDOMAndStartTimer): (WebCore::ValidationMessage::buildBubbleTree): (WebCore::ValidationMessage::requestToHideMessage): (WebCore::ValidationMessage::deleteBubbleTree): * html/ValidationMessage.h: * html/canvas/WebGLRenderingContext.cpp: (WebCore::WebGLRenderingContext::WebGLRenderingContext): (WebCore::WebGLRenderingContext::dispatchContextLostEvent): (WebCore::WebGLRenderingContext::maybeRestoreContext): * html/canvas/WebGLRenderingContext.h: * html/parser/HTMLParserScheduler.cpp: (WebCore::HTMLParserScheduler::HTMLParserScheduler): (WebCore::HTMLParserScheduler::continueNextChunkTimerFired): * html/parser/HTMLParserScheduler.h: * html/shadow/MediaControlElements.cpp: (WebCore::MediaControlPanelElement::MediaControlPanelElement): (WebCore::MediaControlPanelElement::transitionTimerFired): (WebCore::MediaControlTextTrackContainerElement::MediaControlTextTrackContainerElement): (WebCore::MediaControlTextTrackContainerElement::updateTimerFired): * html/shadow/MediaControlElements.h: * html/shadow/MediaControls.cpp: (WebCore::MediaControls::MediaControls): (WebCore::MediaControls::hideFullscreenControlsTimerFired): * html/shadow/MediaControls.h: * html/shadow/SpinButtonElement.cpp: (WebCore::SpinButtonElement::SpinButtonElement): (WebCore::SpinButtonElement::repeatingTimerFired): * html/shadow/SpinButtonElement.h: * html/track/LoadableTextTrack.cpp: (WebCore::LoadableTextTrack::LoadableTextTrack): (WebCore::LoadableTextTrack::loadTimerFired): * html/track/LoadableTextTrack.h: * html/track/VTTRegion.cpp: (WebCore::VTTRegion::VTTRegion): (WebCore::VTTRegion::scrollTimerFired): * html/track/VTTRegion.h: * inspector/InspectorCSSAgent.cpp: (WebCore::ChangeRegionOversetTask::ChangeRegionOversetTask): (WebCore::ChangeRegionOversetTask::timerFired): * inspector/InspectorDOMAgent.cpp: (WebCore::RevalidateStyleAttributeTask::RevalidateStyleAttributeTask): (WebCore::RevalidateStyleAttributeTask::timerFired): * inspector/InspectorFrontendClientLocal.cpp: (WebCore::InspectorBackendDispatchTask::InspectorBackendDispatchTask): (WebCore::InspectorBackendDispatchTask::timerFired): * inspector/InspectorOverlay.cpp: (WebCore::InspectorOverlay::InspectorOverlay): (WebCore::InspectorOverlay::updatePaintRectsTimerFired): * inspector/InspectorOverlay.h: * loader/DocumentLoader.cpp: (WebCore::DocumentLoader::DocumentLoader): (WebCore::DocumentLoader::handleSubstituteDataLoadNow): (WebCore::DocumentLoader::handleSubstituteDataLoadSoon): (WebCore::DocumentLoader::substituteResourceDeliveryTimerFired): * loader/DocumentLoader.h: * loader/FrameLoader.cpp: (WebCore::FrameLoader::FrameLoader): (WebCore::FrameLoader::checkTimerFired): * loader/FrameLoader.h: * loader/ImageLoader.cpp: (WebCore::ImageLoader::ImageLoader): (WebCore::ImageLoader::timerFired): * loader/ImageLoader.h: * loader/LinkLoader.cpp: (WebCore::LinkLoader::LinkLoader): (WebCore::LinkLoader::linkLoadTimerFired): (WebCore::LinkLoader::linkLoadingErrorTimerFired): * loader/LinkLoader.h: * loader/NavigationScheduler.cpp: (WebCore::NavigationScheduler::NavigationScheduler): (WebCore::NavigationScheduler::timerFired): * loader/NavigationScheduler.h: * loader/PingLoader.cpp: (WebCore::PingLoader::PingLoader): * loader/PingLoader.h: (WebCore::PingLoader::timeoutTimerFired): * loader/ProgressTracker.cpp: (WebCore::ProgressTracker::ProgressTracker): (WebCore::ProgressTracker::progressHeartbeatTimerFired): * loader/ProgressTracker.h: * loader/ResourceLoadScheduler.cpp: (WebCore::ResourceLoadScheduler::ResourceLoadScheduler): (WebCore::ResourceLoadScheduler::requestTimerFired): * loader/ResourceLoadScheduler.h: * loader/TextTrackLoader.cpp: (WebCore::TextTrackLoader::TextTrackLoader): (WebCore::TextTrackLoader::cueLoadTimerFired): * loader/TextTrackLoader.h: * loader/cache/CachedResource.cpp: (WebCore::CachedResource::CachedResource): (WebCore::CachedResource::Callback::Callback): (WebCore::CachedResource::Callback::timerFired): * loader/cache/CachedResource.h: * loader/cache/CachedResourceLoader.cpp: (WebCore::CachedResourceLoader::CachedResourceLoader): (WebCore::CachedResourceLoader::garbageCollectDocumentResourcesTimerFired): * loader/cache/CachedResourceLoader.h: * loader/icon/IconDatabase.cpp: (WebCore::IconDatabase::IconDatabase): (WebCore::IconDatabase::syncTimerFired): * loader/icon/IconDatabase.h: * page/AutoscrollController.cpp: (WebCore::AutoscrollController::AutoscrollController): (WebCore::AutoscrollController::autoscrollTimerFired): * page/AutoscrollController.h: * page/CaptionUserPreferences.cpp: (WebCore::CaptionUserPreferences::CaptionUserPreferences): (WebCore::CaptionUserPreferences::timerFired): * page/CaptionUserPreferences.h: * page/CaptionUserPreferencesMediaAF.cpp: (WebCore::CaptionUserPreferencesMediaAF::CaptionUserPreferencesMediaAF): (WebCore::CaptionUserPreferencesMediaAF::updateTimerFired): * page/CaptionUserPreferencesMediaAF.h: * page/DeviceController.cpp: (WebCore::DeviceController::DeviceController): (WebCore::DeviceController::fireDeviceEvent): * page/DeviceController.h: * page/EventHandler.cpp: (WebCore::EventHandler::EventHandler): (WebCore::EventHandler::cursorUpdateTimerFired): (WebCore::EventHandler::autoHideCursorTimerFired): (WebCore::EventHandler::recognizeLongMousePress): (WebCore::EventHandler::fakeMouseMoveEventTimerFired): (WebCore::EventHandler::hoverTimerFired): * page/EventHandler.h: * page/EventSource.cpp: (WebCore::EventSource::EventSource): (WebCore::EventSource::connectTimerFired): * page/EventSource.h: * page/FocusController.cpp: (WebCore::FocusController::FocusController): (WebCore::FocusController::focusRepaintTimerFired): * page/FocusController.h: * page/Frame.cpp: (WebCore::Frame::Frame): (WebCore::Frame::overflowAutoScrollTimerFired): * page/Frame.h: * page/FrameView.cpp: (WebCore::FrameView::FrameView): (WebCore::FrameView::delayedScrollEventTimerFired): (WebCore::FrameView::speculativeTilingEnableTimerFired): (WebCore::FrameView::layoutTimerFired): (WebCore::FrameView::updateEmbeddedObjectsTimerFired): (WebCore::FrameView::flushAnyPendingPostLayoutTasks): (WebCore::FrameView::postLayoutTimerFired): * page/FrameView.h: * page/PageOverlay.cpp: (WebCore::PageOverlay::PageOverlay): (WebCore::PageOverlay::fadeAnimationTimerFired): * page/PageOverlay.h: * page/Settings.cpp: (WebCore::Settings::Settings): (WebCore::Settings::imageLoadingSettingsTimerFired): * page/Settings.h: * page/animation/AnimationController.cpp: (WebCore::AnimationControllerPrivate::AnimationControllerPrivate): (WebCore::AnimationControllerPrivate::updateStyleIfNeededDispatcherFired): (WebCore::AnimationControllerPrivate::animationTimerFired): * page/animation/AnimationControllerPrivate.h: * page/mac/ServicesOverlayController.h: * page/mac/ServicesOverlayController.mm: (WebCore::ServicesOverlayController::ServicesOverlayController): (WebCore::ServicesOverlayController::determineActiveHighlightTimerFired): * page/scrolling/AsyncScrollingCoordinator.cpp: (WebCore::AsyncScrollingCoordinator::AsyncScrollingCoordinator): (WebCore::AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScrollTimerFired): * page/scrolling/AsyncScrollingCoordinator.h: * page/scrolling/ios/ScrollingCoordinatorIOS.h: * page/scrolling/ios/ScrollingCoordinatorIOS.mm: (WebCore::ScrollingCoordinatorIOS::ScrollingCoordinatorIOS): (WebCore::ScrollingCoordinatorIOS::scrollingStateTreeCommitterTimerFired): * page/scrolling/mac/ScrollingCoordinatorMac.h: * page/scrolling/mac/ScrollingCoordinatorMac.mm: (WebCore::ScrollingCoordinatorMac::ScrollingCoordinatorMac): (WebCore::ScrollingCoordinatorMac::scrollingStateTreeCommitterTimerFired): * platform/HysteresisActivity.h: (WebCore::HysteresisActivity::HysteresisActivity): (WebCore::HysteresisActivity::hysteresisTimerFired): * platform/ScrollAnimator.cpp: (WebCore::ScrollAnimator::updateScrollAnimatorsAndTimers): (WebCore::ScrollAnimator::horizontalScrollSnapTimerFired): (WebCore::ScrollAnimator::verticalScrollSnapTimerFired): * platform/ScrollAnimator.h: * platform/Scrollbar.cpp: (WebCore::Scrollbar::Scrollbar): (WebCore::Scrollbar::autoscrollTimerFired): * platform/Scrollbar.h: * platform/Timer.h: (WebCore::DeferrableOneShotTimer::DeferrableOneShotTimer): (WebCore::Timer::Timer): Deleted. * platform/audio/MediaSession.cpp: (WebCore::MediaSession::MediaSession): (WebCore::MediaSession::clientDataBufferingTimerFired): * platform/audio/MediaSession.h: * platform/graphics/BitmapImage.cpp: (WebCore::BitmapImage::startAnimation): (WebCore::BitmapImage::advanceAnimation): * platform/graphics/BitmapImage.h: * platform/graphics/MediaPlayer.cpp: (WebCore::MediaPlayer::MediaPlayer): (WebCore::MediaPlayer::reloadTimerFired): * platform/graphics/MediaPlayer.h: * platform/graphics/ShadowBlur.cpp: (WebCore::ScratchBuffer::ScratchBuffer): (WebCore::ScratchBuffer::timerFired): * platform/graphics/avfoundation/MediaSelectionGroupAVFObjC.h: * platform/graphics/avfoundation/MediaSelectionGroupAVFObjC.mm: (WebCore::MediaSelectionGroupAVFObjC::MediaSelectionGroupAVFObjC): (WebCore::MediaSelectionGroupAVFObjC::selectionTimerFired): * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h: * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm: (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::MediaPlayerPrivateMediaSourceAVFObjC): (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekTimerFired): * platform/graphics/ca/LayerPool.cpp: (WebCore::LayerPool::LayerPool): (WebCore::LayerPool::pruneTimerFired): * platform/graphics/ca/LayerPool.h: * platform/graphics/ca/TileController.cpp: (WebCore::TileController::TileController): (WebCore::TileController::tileRevalidationTimerFired): * platform/graphics/ca/TileController.h: * platform/graphics/ca/TileGrid.cpp: (WebCore::TileGrid::TileGrid): (WebCore::TileGrid::cohortRemovalTimerFired): * platform/graphics/ca/TileGrid.h: * platform/graphics/cg/IOSurfacePool.cpp: (WebCore::IOSurfacePool::IOSurfacePool): (WebCore::IOSurfacePool::collectionTimerFired): * platform/graphics/cg/IOSurfacePool.h: * platform/graphics/cg/SubimageCacheWithTimer.cpp: (WebCore::SubimageCacheWithTimer::SubimageCacheWithTimer): * platform/graphics/mac/MediaPlayerPrivateQTKit.h: * platform/graphics/mac/MediaPlayerPrivateQTKit.mm: (WebCore::MediaPlayerPrivateQTKit::MediaPlayerPrivateQTKit): (WebCore::MediaPlayerPrivateQTKit::seekTimerFired): * platform/ios/LegacyTileCache.h: * platform/ios/LegacyTileCache.mm: (WebCore::LegacyTileCache::LegacyTileCache): (WebCore::LegacyTileCache::tileCreationTimerFired): * platform/mac/HIDGamepadProvider.cpp: (WebCore::HIDGamepadProvider::HIDGamepadProvider): (WebCore::HIDGamepadProvider::connectionDelayTimerFired): (WebCore::HIDGamepadProvider::inputNotificationTimerFired): * platform/mac/HIDGamepadProvider.h: * platform/mac/ScrollAnimatorMac.h: * platform/mac/ScrollAnimatorMac.mm: (WebCore::ScrollAnimatorMac::ScrollAnimatorMac): (WebCore::ScrollAnimatorMac::snapRubberBandTimerFired): (WebCore::ScrollAnimatorMac::initialScrollbarPaintTimerFired): (WebCore::ScrollAnimatorMac::sendContentAreaScrolledTimerFired): * platform/mock/DeviceOrientationClientMock.cpp: (WebCore::DeviceOrientationClientMock::DeviceOrientationClientMock): (WebCore::DeviceOrientationClientMock::timerFired): * platform/mock/DeviceOrientationClientMock.h: * platform/mock/PlatformSpeechSynthesizerMock.cpp: (WebCore::PlatformSpeechSynthesizerMock::PlatformSpeechSynthesizerMock): (WebCore::PlatformSpeechSynthesizerMock::speakingFinished): * platform/mock/PlatformSpeechSynthesizerMock.h: * platform/network/DNSResolveQueue.cpp: (WebCore::DNSResolveQueue::DNSResolveQueue): (WebCore::DNSResolveQueue::timerFired): * platform/network/DNSResolveQueue.h: * platform/network/NetworkStateNotifier.h: * platform/network/ResourceHandle.cpp: (WebCore::ResourceHandle::failureTimerFired): * platform/network/ResourceHandle.h: * platform/network/ResourceHandleInternal.h: (WebCore::ResourceHandleInternal::ResourceHandleInternal): * platform/network/mac/NetworkStateNotifierMac.cpp: (WebCore::NetworkStateNotifier::networkStateChangeTimerFired): (WebCore::NetworkStateNotifier::NetworkStateNotifier): * rendering/ImageQualityController.cpp: (WebCore::ImageQualityController::ImageQualityController): (WebCore::ImageQualityController::highQualityRepaintTimerFired): * rendering/ImageQualityController.h: * rendering/RenderButton.cpp: (WebCore::RenderButton::styleDidChange): (WebCore::RenderButton::timerFired): * rendering/RenderButton.h: * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::RenderLayerCompositor): (WebCore::RenderLayerCompositor::updateCompositingLayersTimerFired): (WebCore::RenderLayerCompositor::layerFlushTimerFired): (WebCore::RenderLayerCompositor::paintRelatedMilestonesTimerFired): * rendering/RenderLayerCompositor.h: * rendering/RenderMarquee.cpp: (WebCore::RenderMarquee::RenderMarquee): (WebCore::RenderMarquee::timerFired): * rendering/RenderMarquee.h: * rendering/RenderNamedFlowThread.cpp: (WebCore::RenderNamedFlowThread::RenderNamedFlowThread): (WebCore::RenderNamedFlowThread::regionOversetChangeEventTimerFired): * rendering/RenderNamedFlowThread.h: * rendering/RenderProgress.cpp: (WebCore::RenderProgress::RenderProgress): (WebCore::RenderProgress::animationTimerFired): * rendering/RenderProgress.h: * rendering/RenderView.cpp: (WebCore::RenderView::RenderView): (WebCore::RenderView::lazyRepaintTimerFired): * rendering/RenderView.h: * replay/EventLoopInputDispatcher.cpp: (WebCore::EventLoopInputDispatcher::EventLoopInputDispatcher): (WebCore::EventLoopInputDispatcher::timerFired): * replay/EventLoopInputDispatcher.h: * storage/StorageAreaImpl.cpp: (WebCore::StorageAreaImpl::StorageAreaImpl): (WebCore::StorageAreaImpl::closeDatabaseTimerFired): (WebCore::StorageAreaImpl::closeDatabaseIfIdle): * storage/StorageAreaImpl.h: * storage/StorageAreaSync.cpp: (WebCore::StorageAreaSync::StorageAreaSync): (WebCore::StorageAreaSync::scheduleFinalSync): (WebCore::StorageAreaSync::syncTimerFired): (WebCore::StorageAreaSync::scheduleSync): * storage/StorageAreaSync.h: * svg/SVGElement.cpp: (WebCore::SVGElement::svgLoadEventTimerFired): * svg/SVGElement.h: * svg/SVGScriptElement.cpp: (WebCore::SVGScriptElement::SVGScriptElement): * svg/SVGStyleElement.cpp: (WebCore::SVGStyleElement::SVGStyleElement): * svg/SVGUseElement.cpp: (WebCore::SVGUseElement::SVGUseElement): * svg/animation/SMILTimeContainer.cpp: (WebCore::SMILTimeContainer::SMILTimeContainer): (WebCore::SMILTimeContainer::timerFired): * svg/animation/SMILTimeContainer.h: * xml/XMLHttpRequestProgressEventThrottle.cpp: (WebCore::XMLHttpRequestProgressEventThrottle::XMLHttpRequestProgressEventThrottle): (WebCore::XMLHttpRequestProgressEventThrottle::dispatchDeferredEvents): * xml/XMLHttpRequestProgressEventThrottle.h: 2014-11-21 Chris Dumez Crash when setting 'transition-delay' CSS property to a calculated value https://bugs.webkit.org/show_bug.cgi?id=138784 Reviewed by Sam Weinig. Update CSSPrimitiveValue::computeTime() to use primitiveType() instead of m_primitiveUnitType so that it properly handles calculated values. Without this, we would hit the ASSERT_NOT_REACHED() assertion in computeTime() for calculated values. Test: fast/css/transition-delay-calculated-value.html * css/CSSPrimitiveValue.h: (WebCore::CSSPrimitiveValue::computeTime): 2014-11-21 Chris Dumez Regression(r175381): -webkit-mask-box-image is broken https://bugs.webkit.org/show_bug.cgi?id=138969 Reviewed by Simon Fraser. After r175381, the StyleBuilder would call NinePieceImage::setMaskDefaults() *after* calling CSSToStyleMap::mapNinePieceImage(), instead of *before*, for -webkit-mask-box-image CSS property. This was causing the mask defaults to overwrite what was set by mapNinePieceImage(). Test: fast/css/webkit-mask-box-image.html * css/StyleBuilderConverter.h: (WebCore::StyleBuilderConverter::convertBorderMask): 2014-11-21 Chris Dumez Crash when setting 'font' CSS property to 'calc(2 * 3)' https://bugs.webkit.org/show_bug.cgi?id=138933 Reviewed by Darin Adler. The CSS Parser was not handling calculated values when parsing the font weight. This would lead us to hit an assertion when parsing a font property whose weight is set to a calculated value. This patch updates parseFontWeight() to properly handle calculated values. Test: fast/css/font-calculated-value.html * css/CSSParser.cpp: (WebCore::CSSParser::parseFontWeight): 2014-11-21 Bear Travis [CSS Font Loading] Switch to dispatching events asynchronously https://bugs.webkit.org/show_bug.cgi?id=138755 Reviewed by Simon Fraser. Moving FontLoader to dispatch events and notify callbacks similarly to EventSender or the GenericEventQueue. Several bugs have popped up in the past because FontLoader has been sending events during layout, and there is no need for that to be the case. Covered by existing font loader event tests. Added an additional test for the svg case, fontloader-svg-select. * css/FontLoader.cpp: (WebCore::FontLoader::didLayout): (WebCore::FontLoader::timerFired): Adding asynchronous callback. (WebCore::FontLoader::scheduleEvent): Add an event to the dispatch queue. (WebCore::FontLoader::firePendingEvents): Modified to handle the loading done event and callbacks. (WebCore::FontLoader::loadingDone): Modified to spin up the timer rather than immediately dispatching events. * css/FontLoader.h: 2014-11-21 Daniel Bates Attempt to fix the internal Apple Mavericks build after (https://bugs.webkit.org/show_bug.cgi?id=138930) Declare NSCachedURLResponse SPI when building without the Apple Internal SDK and with the Apple Internal SDK when building for OS X Mavericks or earlier. * platform/spi/cf/CFNetworkSPI.h: 2014-11-21 Anders Carlsson Make memoryCache() return a reference https://bugs.webkit.org/show_bug.cgi?id=138939 Reviewed by Antti Koivisto. * inspector/InspectorPageAgent.cpp: (WebCore::InspectorPageAgent::cachedResource): * inspector/InspectorResourceAgent.cpp: (WebCore::InspectorResourceAgent::replayXHR): (WebCore::InspectorResourceAgent::setCacheDisabled): (WebCore::InspectorResourceAgent::mainFrameNavigated): * loader/DocumentLoader.cpp: (WebCore::areAllLoadersPageCacheAcceptable): (WebCore::DocumentLoader::finishedLoading): (WebCore::DocumentLoader::responseReceived): * loader/FrameLoader.cpp: (WebCore::FrameLoader::tellClientAboutPastMemoryCacheLoads): * loader/SubresourceLoader.cpp: (WebCore::SubresourceLoader::willSendRequest): (WebCore::SubresourceLoader::didReceiveResponse): (WebCore::SubresourceLoader::didFail): (WebCore::SubresourceLoader::willCancel): * loader/archive/cf/LegacyWebArchive.cpp: (WebCore::LegacyWebArchive::create): * loader/cache/CachedImage.cpp: (WebCore::CachedImage::addIncrementalDataBuffer): (WebCore::CachedImage::finishLoading): * loader/cache/CachedResource.cpp: (WebCore::deadDecodedDataDeletionIntervalForResourceType): (WebCore::CachedResource::~CachedResource): (WebCore::CachedResource::failBeforeStarting): (WebCore::CachedResource::addClientToSet): (WebCore::CachedResource::removeClient): (WebCore::CachedResource::destroyDecodedDataIfNeeded): (WebCore::CachedResource::setDecodedSize): (WebCore::CachedResource::setEncodedSize): (WebCore::CachedResource::didAccessDecodedData): * loader/cache/CachedResourceLoader.cpp: (WebCore::CachedResourceLoader::requestUserCSSStyleSheet): (WebCore::CachedResourceLoader::requestResource): (WebCore::CachedResourceLoader::revalidateResource): (WebCore::CachedResourceLoader::loadResource): (WebCore::CachedResourceLoader::clearPreloads): (WebCore::CachedResourceLoader::printPreloadStats): * loader/cache/MemoryCache.cpp: (WebCore::memoryCache): (WebCore::MemoryCache::removeRequestFromCache): (WebCore::MemoryCache::removeRequestFromSessionCaches): * loader/cache/MemoryCache.h: * loader/cocoa/DiskCacheMonitorCocoa.mm: (WebCore::DiskCacheMonitor::resourceBecameFileBacked): * page/FrameView.cpp: (WebCore::FrameView::willPaintContents): (WebCore::FrameView::didPaintContents): * platform/MemoryPressureHandler.cpp: (WebCore::MemoryPressureHandler::releaseCriticalMemory): * testing/Internals.cpp: (WebCore::Internals::isLoadingFromMemoryCache): 2014-11-21 Daniel Bates [iOS] WebKit2 fails to build with public SDK due to missing SPI from CFNetwork, QuartzCore, MediaPlayer, XPC https://bugs.webkit.org/show_bug.cgi?id=138930 Reviewed by Anders Carlsson. * WebCore.xcodeproj/project.pbxproj: Rename header MPAVRoutingControllerSPI.h to MediaPlayerSPI.h. * loader/cocoa/SubresourceLoaderCocoa.mm: Move NSCachedURLResponse forward declarations to file CFNetworkSPI.h and include header CFNetworkSPI.h. * loader/mac/ResourceLoaderMac.mm: Ditto. * platform/audio/ios/MediaSessionManagerIOS.mm: Substitute MediaPlayerSPI.h for MPAVRoutingControllerSPI.h. * platform/spi/cf/CFNetworkSPI.h: Add more SPI. * platform/spi/cg/CoreGraphicsSPI.h: Ditto. * platform/spi/cocoa/QuartzCoreSPI.h: Ditto. * platform/spi/ios/MediaPlayerSPI.h: Renamed from Source/WebCore/platform/spi/ios/MPAVRoutingControllerSPI.h. 2014-11-21 Chris Fleizach AX: MathML expressions are misread by VoiceOver https://bugs.webkit.org/show_bug.cgi?id=138948 Reviewed by Mario Sanchez Prada. The logic for deciding what's the radicand and an index was too tied to children placement. We should instead pull directly from the source. Test: platform/mac/accessibility/mathml-root.html * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::mathRadicandObject): (WebCore::AccessibilityRenderObject::mathRootIndexObject): * rendering/mathml/RenderMathMLRoot.h: 2014-11-20 Benjamin Poulain Remove the remaining vestiges of minimal-ui https://bugs.webkit.org/show_bug.cgi?id=138890 Reviewed by Sam Weinig. In ViewportArguments' setViewportFeature(), I skip the warning for now. * WebCore.exp.in: * dom/ViewportArguments.cpp: (WebCore::setViewportFeature): * dom/ViewportArguments.h: (WebCore::ViewportArguments::ViewportArguments): (WebCore::ViewportArguments::operator==): * page/ViewportConfiguration.cpp: (WebCore::ViewportConfiguration::ViewportConfiguration): (WebCore::ViewportConfiguration::initialScale): (WebCore::ViewportConfiguration::minimumScale): (WebCore::ViewportConfiguration::updateConfiguration): (WebCore::ViewportConfiguration::viewportArgumentsLength): (WebCore::ViewportConfiguration::layoutWidth): (WebCore::ViewportConfiguration::layoutHeight): (WebCore::ViewportConfigurationTextStream::operator<<): (WebCore::ViewportConfiguration::description): (WebCore::ViewportConfiguration::setMinimumLayoutSizeForMinimalUI): Deleted. (WebCore::ViewportConfiguration::activeMinimumLayoutSizeInScrollViewCoordinates): Deleted. (WebCore::ViewportConfiguration::resetMinimalUI): Deleted. (WebCore::ViewportConfiguration::didFinishDocumentLoad): Deleted. * page/ViewportConfiguration.h: (WebCore::ViewportConfiguration::minimumLayoutSizeForMinimalUI): Deleted. (WebCore::ViewportConfiguration::usesMinimalUI): Deleted. 2014-11-20 Benjamin Poulain Web Inspector: do not show invalid specificity for dynamic cases of :matches() https://bugs.webkit.org/show_bug.cgi?id=138911 Reviewed by Joseph Pecoraro. * css/CSSSelector.cpp: (WebCore::simpleSelectorFunctionalPseudoClassStaticSpecificity): (WebCore::functionalPseudoClassStaticSpecificity): (WebCore::staticSpecificityInternal): (WebCore::CSSSelector::staticSpecificity): (WebCore::CSSSelector::specificity): Deleted. * css/CSSSelector.h: Add an additional computation path for the inspector. The regular path ignores everything inside function pseudo classes. This new path takes the static specificity of the regular path, then evaluate recursively all the selector lists inside any level of :matches(). If two complex selector of selector list do not have the same specificity, we bail out and refuse to compute a static specificity representing the selector. * inspector/InspectorStyleSheet.cpp: (WebCore::buildObjectForSelectorHelper): (WebCore::selectorsFromSource): (WebCore::InspectorStyleSheet::buildObjectForSelector): Do not add the complexity to the inspector's CSSSelector structure whenever it is dynamic. 2014-11-20 Benjamin Poulain Remove InspectorCSSAgent::buildArrayForRuleList() https://bugs.webkit.org/show_bug.cgi?id=138907 Reviewed by Andreas Kling. * inspector/InspectorCSSAgent.cpp: (WebCore::InspectorCSSAgent::buildArrayForRuleList): Deleted. * inspector/InspectorCSSAgent.h: 2014-11-20 Zalan Bujtas REGRESSION (174986): CSS clip property is ignored when border-radius is present. https://bugs.webkit.org/show_bug.cgi?id=138935 rdar://problem/18965984 Reviewed by Simon Fraser. Revert back to r163382 and fix bug 127729 properly. Save the graphics context when paint and clip rects are the same, but the clip rect has radius. Each iteration on ::clipRect() from r163382 onwards just introduced yet another regression. Test: fast/clip/css-clip-does-not-work-when-border-radius-is-present.html * rendering/RenderLayer.cpp: (WebCore::RenderLayer::clipToRect): 2014-11-20 Geoffrey Garen Removed the custom allocator for PODRedBlackTree https://bugs.webkit.org/show_bug.cgi?id=138942 Reviewed by Sam Weinig. bmalloc is fast enough. * WebCore.xcodeproj/project.pbxproj: * platform/PODArena.h: Removed. * platform/PODFreeListArena.h: Removed. This is the point of the patch. * platform/PODIntervalTree.h: (WebCore::PODIntervalTree::PODIntervalTree): Deleted. As a side effect of removing our custom allocator, we can no longer have a special "I'm not initialized yet" state. Instead, the tree either exists or not, like an idiomatic C++ object. * platform/PODRedBlackTree.h: (WebCore::PODRedBlackTree::PODRedBlackTree): Ditto. (WebCore::PODRedBlackTree::~PODRedBlackTree): We need to clear in our destructor because we can no longer rely on the arena destructor implicitly freeing our tree nodes. Side note: This change basically removes the whole reason for having a purpose-built tree for POD data. We should probably remove this whole data structure in a follow-up patch, and just use a standard tree. (WebCore::PODRedBlackTree::clear): (WebCore::PODRedBlackTree::add): (WebCore::PODRedBlackTree::remove): (WebCore::PODRedBlackTree::contains): (WebCore::PODRedBlackTree::visitInorder): (WebCore::PODRedBlackTree::size): (WebCore::PODRedBlackTree::checkInvariants): (WebCore::PODRedBlackTree::dump): (WebCore::PODRedBlackTree::deleteNode): (WebCore::PODRedBlackTree::markFree): Use normal new/delete, and mark ourselves as fast allocated so we get the bmalloc goodness. (WebCore::PODRedBlackTree::isInitialized): Deleted. (WebCore::PODRedBlackTree::initIfNeeded): Deleted. * rendering/FloatingObjects.cpp: (WebCore::FloatingObjects::findNextFloatLogicalBottomBelow): (WebCore::FloatingObjects::findNextFloatLogicalBottomBelowForBlock): (WebCore::FloatingObjects::FloatingObjects): (WebCore::FloatingObjects::clear): (WebCore::FloatingObjects::addPlacedObject): (WebCore::FloatingObjects::removePlacedObject): (WebCore::FloatingObjects::computePlacedFloatsTree): (WebCore::FloatingObjects::placedFloatsTree): (WebCore::FloatingObjects::logicalLeftOffsetForPositioningFloat): (WebCore::FloatingObjects::logicalRightOffsetForPositioningFloat): (WebCore::FloatingObjects::logicalLeftOffset): (WebCore::FloatingObjects::logicalRightOffset): POD tree had a slightly weird behavior in which it was valid to use some of its APIs without first initializing it, but not others. It's not really possible to model that behavior with normal C++ objects that use new/delete, so instead I added some explicit NULL checks. * rendering/FloatingObjects.h: * rendering/RenderFlowThread.cpp: (WebCore::RenderFlowThread::updateRegionsFlowThreadPortionRect): * rendering/RenderView.cpp: (WebCore::RenderView::intervalArena): Deleted. * rendering/RenderView.h: Removed custom-allocator-related cruft. 2014-11-20 Dean Jackson Support unprefixed animation event types https://bugs.webkit.org/show_bug.cgi?id=138931 Reviewed by Simon Fraser. Tests: animations/unprefixed-events-mixed-with-prefixed.html animations/unprefixed-events.html Support the unprefixed animation event names: - animationstart (was webkitAnimationStart) - animationiteration (was webkitAnimationIteration) - animationend (was webkitAnimationEnd) (Yes, event types are case sensitive and yes, this will likely cause some head-scratching as people change content) The approach here is to follow what transitions does: - listener only for old event name -> fire old event name - listener for both old and new event name -> fire new event name - listener only for new event name -> fire new event name That way pages that were trying to anticipate the new event name won't get duplicate events. * CMakeLists.txt: Add new AnimationEvent* stuff. * DerivedSources.make: Ditto. * WebCore.vcxproj/WebCore.vcxproj: Ditto. * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto. * WebCore.xcodeproj/project.pbxproj: Ditto. * bindings/js/JSBindingsAllInOne.cpp: New files for all in one builds. * dom/DOMAllInOne.cpp: * dom/AnimationEvent.cpp: Added. Copied from WebKitAnimationEvent.cpp. (WebCore::AnimationEventInit::AnimationEventInit): (WebCore::AnimationEvent::AnimationEvent): (WebCore::AnimationEvent::~AnimationEvent): (WebCore::AnimationEvent::animationName): (WebCore::AnimationEvent::elapsedTime): (WebCore::AnimationEvent::eventInterface): * dom/AnimationEvent.h: Added. Copied from WebKitAnimationEvent.h. * dom/AnimationEvent.idl: Added. Copied from WebKitAnimationEvent.idl. * dom/Document.cpp: (WebCore::Document::addListenerTypeIfNeeded): Handle new event types. * dom/EventNames.h: New names. * dom/EventNames.in: * dom/EventTarget.cpp: (WebCore::legacyType): Provide a mapping from the new names to the older prefixed forms. * html/HTMLAttributeNames.in: Support the on* attributes, even though I hate them and wish this approach would die. * html/HTMLElement.cpp: (WebCore::HTMLElement::populateEventNameForAttributeLocalNameMap): * page/DOMWindow.h: New names, and constructors. * page/DOMWindow.idl: * page/animation/AnimationController.cpp: (WebCore::AnimationControllerPrivate::fireEventsAndUpdateStyle): Fire new type. * page/animation/KeyframeAnimation.cpp: Fire the new types of events. (WebCore::KeyframeAnimation::onAnimationStart): (WebCore::KeyframeAnimation::onAnimationIteration): (WebCore::KeyframeAnimation::onAnimationEnd): (WebCore::KeyframeAnimation::sendAnimationEvent): 2014-11-20 Tim Horton Remove a piece of DataDetectors SPI that we aren't using anymore https://bugs.webkit.org/show_bug.cgi?id=138917 Reviewed by Beth Dakin. * platform/spi/mac/DataDetectorsSPI.h: 2014-11-20 Beth Dakin Invalid message WebPageProxy.DidPerformDictionaryLookup on Google stocks result https://bugs.webkit.org/show_bug.cgi?id=138568 -and corresponding- rdar://problem/18904600 Reviewed by Tim Horton. Add an optional parameter indicating whether or not to include images. * WebCore.exp.in: * editing/cocoa/HTMLConverter.h: * editing/cocoa/HTMLConverter.mm: (WebCore::editingAttributedStringFromRange): 2014-11-20 Myles C. Maxfield Fix the !ENABLE(SVG_FONTS) build after r176276 https://bugs.webkit.org/show_bug.cgi?id=138924 Reviewed by Csaba Osztrogonác. No new tests because there is no behavior change. * css/CSSFontFaceSource.cpp: (WebCore::CSSFontFaceSource::getFontData): * loader/cache/CachedResourceLoader.cpp: (WebCore::CachedResourceLoader::requestFont): 2014-11-19 Ada Chan Add a way to mute an AudioContext. https://bugs.webkit.org/show_bug.cgi?id=138104 Reviewed by Eric Carlson. Keep a muted state in AudioDestinationNode. If m_muted is true, zero out the audio buffers. No new tests, since it's difficult to test whether the audio is indeed muted. * Modules/webaudio/AudioContext.cpp: (WebCore::AudioContext::AudioContext): Call pageMutedStateDidChange() so it'll initialize the destination audio node's muted state accordingly. (WebCore::AudioContext::pageMutedStateDidChange): Set the destination audio node's muted state to match the page's muted state. * Modules/webaudio/AudioDestinationNode.cpp: (WebCore::AudioDestinationNode::AudioDestinationNode): Initialize m_muted. (WebCore::AudioDestinationNode::render): If m_muted is true, call AudioBus::zero() to zero out the buffers. * Modules/webaudio/AudioDestinationNode.h: (WebCore::AudioDestinationNode::setMuted): Set m_muted. 2014-11-20 Chris Dumez Crash when destroying a Document that has a throttled timer still running https://bugs.webkit.org/show_bug.cgi?id=138914 Reviewed by Benjamin Poulain. Upon destruction, a throttled DOMTimer whose interval depends on viewport changes will try to unregister itself from the view. It gets the view pointer from its Document. However, scriptExecutionContext() can return null if the Document is being destroyed (i.e. ~DOMTimer() is called from ~ScriptExecutionContext(), as the ScriptExecutionContext owns the DOMTimer). This patch adds a null check for scriptExecutionContext() in the DOMTimer destructor to avoid this issue. Test: fast/dom/throttled-timer-running-on-document-destruction.html * page/DOMTimer.cpp: (WebCore::DOMTimer::~DOMTimer): (WebCore::DOMTimer::unregisterForViewportChanges): Add assertion to make sure scriptExecutionContext() does not return null. (WebCore::DOMTimerFireState::setChangedStyleOfElementOutsideViewport): Deleted. Killed this function as this was dead code. 2014-11-20 Zalan Bujtas Simple line layout: Introduce text fragment continuation. https://bugs.webkit.org/show_bug.cgi?id=138274 This patch extends simple line layout coverage to multiple text renderers. When a particular render flow has multiple text renderers (but not any other type) then we use simple line layout to process and paint the content. -other, existing requirements still apply so that for example if the content requires decoration, we bail out of simple line layout. FlowContent now supports multiple renderes. It continuously reads content from sibling renderers so that the simple line layout parser sees it as one monolithic block of content. Run positions are all relative to the block and they get resolved to renderer's positions on demand. (painting, computing bounding rects etc) Reviewed by Antti Koivisto. Performance test already been added for the multiple rendere use case, correctness is covered by existing test cases. Test: fast/text/simple-lines-mutliple-renderers.html * rendering/SimpleLineLayout.cpp: (WebCore::SimpleLineLayout::canUseFor): Check if children are all 8bit RenderTexts. (WebCore::SimpleLineLayout::removeTrailingWhitespace): Move the endofline check right before where we might overflow using end position. (WebCore::SimpleLineLayout::initializeNewLine): (WebCore::SimpleLineLayout::closeLineEndingAndAdjustRuns): (WebCore::SimpleLineLayout::splitRunsAtRendererBoundary): Split runs at renderers' boundary to be in sync with inline text renderering. (WebCore::SimpleLineLayout::createTextRuns): (WebCore::SimpleLineLayout::create): * rendering/SimpleLineLayoutFlowContents.cpp: (WebCore::SimpleLineLayout::FlowContents::FlowContents): (WebCore::SimpleLineLayout::FlowContents::findNextBreakablePosition): (WebCore::SimpleLineLayout::FlowContents::findNextNonWhitespacePosition): (WebCore::SimpleLineLayout::FlowContents::textWidth): Do not measure text across renderers. It could produce different width value due to ligature which later can produce unexpected line breaks and out sync rendering in general. (WebCore::SimpleLineLayout::FlowContents::renderer): (WebCore::SimpleLineLayout::FlowContents::resolveRendererPositions): (WebCore::SimpleLineLayout::FlowContents::appendNextRendererContentIfNeeded): Read the next renderer content if needed. (WebCore::SimpleLineLayout::FlowContents::nextNonWhitespacePosition): (WebCore::SimpleLineLayout::FlowContents::runWidth): * rendering/SimpleLineLayoutFlowContents.h: (WebCore::SimpleLineLayout::FlowContents::isNewlineCharacter): (WebCore::SimpleLineLayout::FlowContents::isEndOfContent): * rendering/SimpleLineLayoutResolver.cpp: (WebCore::SimpleLineLayout::RunResolver::Run::text): 2014-11-20 Commit Queue Unreviewed, rolling out r176396. https://bugs.webkit.org/show_bug.cgi?id=138926 revealed some WebCore::BidiResolver issue. rollout this for now. (Requested by zalan on #webkit). Reverted changeset: "Simple line layout: Introduce text fragment continuation." https://bugs.webkit.org/show_bug.cgi?id=138274 http://trac.webkit.org/changeset/176396 2014-11-20 Zalan Bujtas Simple line layout: Introduce text fragment continuation. https://bugs.webkit.org/show_bug.cgi?id=138274 This patch extends simple line layout coverage to multiple text renderers. When a particular render flow has multiple text renderers (but not any other type) then we use simple line layout to process and paint the content. -other, existing requirements still apply so that for example if the content requires decoration, we bail out of simple line layout. FlowContent now supports multiple renderes. It continuously reads content from sibling renderers so that the simple line layout parser sees it as one monolithic block of content. Run positions are all relative to the block and they get resolved to renderer's positions on demand. (painting, computing bounding rects etc) Reviewed by Antti Koivisto. Performance test already been added for the multiple rendere use case, correctness is covered by existing test cases. Test: fast/text/simple-lines-mutliple-renderers.html * rendering/SimpleLineLayout.cpp: (WebCore::SimpleLineLayout::canUseFor): Check if children are all 8bit RenderTexts. (WebCore::SimpleLineLayout::removeTrailingWhitespace): Move the endofline check right before where we might overflow using end position. (WebCore::SimpleLineLayout::initializeNewLine): (WebCore::SimpleLineLayout::closeLineEndingAndAdjustRuns): (WebCore::SimpleLineLayout::splitRunsAtRendererBoundary): Split runs at renderers' boundary to be in sync with inline text renderering. (WebCore::SimpleLineLayout::createTextRuns): (WebCore::SimpleLineLayout::create): * rendering/SimpleLineLayoutFlowContents.cpp: (WebCore::SimpleLineLayout::FlowContents::FlowContents): (WebCore::SimpleLineLayout::FlowContents::findNextBreakablePosition): (WebCore::SimpleLineLayout::FlowContents::findNextNonWhitespacePosition): (WebCore::SimpleLineLayout::FlowContents::textWidth): Do not measure text across renderers. It could produce different width value due to ligature which later can produce unexpected line breaks and out sync renderering in general. (WebCore::SimpleLineLayout::FlowContents::renderer): (WebCore::SimpleLineLayout::FlowContents::resolveRendererPositions): (WebCore::SimpleLineLayout::FlowContents::appendNextRendererContentIfNeeded): Read the next renderer content if needed. (WebCore::SimpleLineLayout::FlowContents::nextNonWhitespacePosition): (WebCore::SimpleLineLayout::FlowContents::runWidth): * rendering/SimpleLineLayoutFlowContents.h: (WebCore::SimpleLineLayout::FlowContents::isNewlineCharacter): (WebCore::SimpleLineLayout::FlowContents::isEndOfContent): * rendering/SimpleLineLayoutResolver.cpp: (WebCore::SimpleLineLayout::RunResolver::Run::text): 2014-11-20 peavo@outlook.com [WinCairo] Compile error when GStreamer is enabled. https://bugs.webkit.org/show_bug.cgi?id=138925 Reviewed by Philippe Normand. A guard is missing for an overridden method. * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp: 2014-11-20 Adrian Perez de Castro [GTK] Provide convenience API in DOM bindings to post messages to user message handlers https://bugs.webkit.org/show_bug.cgi?id=138871 Reviewed by Carlos Garcia Campos. Adds a convenience function in the WebKitGTK+ DOM bindings to post messages to user message handlers in a way convenient way more convenient than using the autogenerated bindings. * bindings/gobject/WebKitDOMCustom.cpp: (webkit_dom_dom_window_webkit_message_handlers_post_message): Added new convenience API function to post messages to user message handlers. * bindings/gobject/WebKitDOMCustom.h: Ditto. * bindings/gobject/WebKitDOMCustom.symbols: Ditto. 2014-11-12 Sergio Villar Senin [CSS Grid Layout] Replace the usage of size_t by unsigned https://bugs.webkit.org/show_bug.cgi?id=136218 Reviewed by Benjamin Poulain. In general, size_t should be used for sizes of objects in memory. We're using it to represent indexes and spans in the grid. Now that the maximum number of tracks is 1 million, it should be safe to replace them by unsigned integers. No new tests as there is no change in functionality. * css/CSSParser.cpp: (WebCore::CSSParser::parseGridTrackRepeatFunction): * css/StyleResolver.cpp: (WebCore::createImplicitNamedGridLinesFromGridArea): (WebCore::createGridTrackList): * rendering/RenderGrid.cpp: (WebCore::RenderGrid::GridIterator::GridIterator): (WebCore::RenderGrid::GridIterator::nextGridItem): (WebCore::RenderGrid::GridIterator::isEmptyAreaEnough): (WebCore::RenderGrid::GridIterator::nextEmptyGridArea): (WebCore::RenderGrid::GridSizingData::GridSizingData): (WebCore::RenderGrid::computeUsedBreadthOfGridTracks): (WebCore::RenderGrid::gridTrackSize): (WebCore::RenderGrid::distributeSpaceToTracks): (WebCore::RenderGrid::tracksAreWiderThanMinTrackBreadth): (WebCore::RenderGrid::ensureGridSize): (WebCore::RenderGrid::populateExplicitGridAndOrderIterator): (WebCore::RenderGrid::createEmptyGridAreaAtSpecifiedPositionsOutsideGrid): (WebCore::RenderGrid::placeAutoMajorAxisItemOnGrid): (WebCore::RenderGrid::populateGridPositions): * rendering/RenderGrid.h: * rendering/style/GridCoordinate.h: (WebCore::GridSpan::integerSpan): * rendering/style/GridResolvedPosition.cpp: (WebCore::GridResolvedPosition::explicitGridColumnCount): (WebCore::GridResolvedPosition::explicitGridRowCount): (WebCore::explicitGridSizeForSide): (WebCore::GridResolvedPosition::resolveNamedGridLinePositionFromStyle): (WebCore::GridResolvedPosition::resolveGridPositionFromStyle): (WebCore::GridResolvedPosition::resolveGridPositionAgainstOppositePosition): (WebCore::firstNamedGridLineBeforePosition): (WebCore::GridResolvedPosition::resolveRowStartColumnStartNamedGridLinePositionAgainstOppositePosition): (WebCore::GridResolvedPosition::resolveRowEndColumnEndNamedGridLinePositionAgainstOppositePosition): * rendering/style/GridResolvedPosition.h: (WebCore::GridResolvedPosition::adjustGridPositionForRowEndColumnEndSide): (WebCore::GridResolvedPosition::adjustGridPositionForSide): (WebCore::GridResolvedPosition::GridResolvedPosition): (WebCore::GridResolvedPosition::toInt): * rendering/style/StyleGridData.h: 2014-11-20 Andreas Kling Remove "document has no sibling rules" optimization. Reviewed by Antti Koivisto. We were keeping a document-level flag to track whether there are any sibling rules in any active style sheets. This information was used to do.. nothing. * css/StyleResolver.h: (WebCore::StyleResolver::usesSiblingRules): Deleted. * dom/DocumentStyleSheetCollection.cpp: (WebCore::DocumentStyleSheetCollection::DocumentStyleSheetCollection): (WebCore::DocumentStyleSheetCollection::combineCSSFeatureFlags): (WebCore::DocumentStyleSheetCollection::resetCSSFeatureFlags): * dom/DocumentStyleSheetCollection.h: (WebCore::DocumentStyleSheetCollection::usesSiblingRules): Deleted. (WebCore::DocumentStyleSheetCollection::setUsesSiblingRulesOverride): Deleted. * mathml/MathMLMathElement.cpp: (WebCore::MathMLMathElement::insertedInto): Deleted. * mathml/MathMLMathElement.h: 2014-11-20 Andreas Kling Caret renderer is always a RenderBlock. Reviewed by Chris Dumez. Tighten typing in the code that finds and deals with the renderer used to paint the caret (it's always a RenderBlock.) * editing/FrameSelection.cpp: (WebCore::CaretBase::updateCaretRect): (WebCore::FrameSelection::caretRendererWithoutUpdatingLayout): (WebCore::DragCaretController::caretRenderer): (WebCore::repaintCaretForLocalRect): (WebCore::CaretBase::paintCaret): * editing/FrameSelection.h: * editing/VisiblePosition.cpp: (WebCore::VisiblePosition::absoluteCaretBounds): * editing/htmlediting.cpp: (WebCore::rendererForCaretPainting): (WebCore::localCaretRectInRendererForCaretPainting): (WebCore::absoluteBoundsForLocalCaretRect): * editing/htmlediting.h: * rendering/RenderBlock.cpp: (WebCore::RenderBlock::paintCaret): 2014-11-20 Antti Koivisto REGRESSION (r172854): Web Viewer in FileMaker does not render a Base64 encoded animated-GIF https://bugs.webkit.org/show_bug.cgi?id=138807 Reviewed by Simon Fraser. Animation gets paused because WebKit thinks the GIF is outside of the view. * page/FrameView.cpp: (WebCore::FrameView::windowClipRect): We need to convert to window coordinates in paintsEntireContents mode too so these functions are consistent. This matters with some WK1 API clients. 2014-11-19 Chris Dumez Move 'clip' CSS property to the new StyleBuilder https://bugs.webkit.org/show_bug.cgi?id=138909 Reviewed by Andreas Kling. Move 'clip' CSS property from DeprecatedStyleBuilder to the new StyleBuilder by using custom code. No new tests, no behavior change. * css/CSSPropertyNames.in: * css/DeprecatedStyleBuilder.cpp: (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder): (WebCore::ApplyPropertyClip::convertToLength): Deleted. (WebCore::ApplyPropertyClip::applyInheritValue): Deleted. (WebCore::ApplyPropertyClip::applyInitialValue): Deleted. (WebCore::ApplyPropertyClip::applyValue): Deleted. (WebCore::ApplyPropertyClip::createHandler): Deleted. * css/StyleBuilderCustom.h: (WebCore::StyleBuilderFunctions::applyInitialClip): (WebCore::StyleBuilderFunctions::applyInheritClip): (WebCore::StyleBuilderFunctions::applyValueClip): 2014-11-19 Ryuan Choi Remove dead code from TiledBackingStore https://bugs.webkit.org/show_bug.cgi?id=138864 Reviewed by Andreas Kling. Since r168151, paint() method, m_commitTileUpdatesOnIdleEventLoop and related code are not used. No new tests, no behavior change. * platform/graphics/TiledBackingStore.cpp: (WebCore::TiledBackingStore::TiledBackingStore): (WebCore::TiledBackingStore::setTileSize): (WebCore::TiledBackingStore::invalidate): (WebCore::TiledBackingStore::createTiles): (WebCore::TiledBackingStore::paint): Deleted. (WebCore::TiledBackingStore::startTileBufferUpdateTimer): Deleted. (WebCore::TiledBackingStore::tileBufferUpdateTimerFired): Deleted. (WebCore::TiledBackingStore::startBackingStoreUpdateTimer): Deleted. (WebCore::TiledBackingStore::backingStoreUpdateTimerFired): Deleted. * platform/graphics/TiledBackingStore.h: (WebCore::TiledBackingStore::setCommitTileUpdatesOnIdleEventLoop): Deleted. 2014-11-19 Andreas Kling Remove "document has no ::before and/or ::after rules" optimization. Reviewed by Antti Koivisto. This optimization has been dead for a long time, since the default UA style contains both ::before and ::after rules. * css/RuleFeature.cpp: (WebCore::recursivelyCollectFeaturesFromSelector): (WebCore::RuleFeatureSet::add): (WebCore::RuleFeatureSet::clear): * css/RuleFeature.h: (WebCore::RuleFeatureSet::RuleFeatureSet): * css/StyleResolver.h: (WebCore::StyleResolver::usesBeforeAfterRules): Deleted. * dom/DocumentStyleSheetCollection.cpp: (WebCore::DocumentStyleSheetCollection::DocumentStyleSheetCollection): (WebCore::DocumentStyleSheetCollection::combineCSSFeatureFlags): (WebCore::DocumentStyleSheetCollection::resetCSSFeatureFlags): * dom/DocumentStyleSheetCollection.h: (WebCore::DocumentStyleSheetCollection::usesBeforeAfterRules): Deleted. (WebCore::DocumentStyleSheetCollection::setUsesBeforeAfterRulesOverride): Deleted. * html/HTMLQuoteElement.cpp: (WebCore::HTMLQuoteElement::insertedInto): Deleted. * html/HTMLQuoteElement.h: * style/StyleResolveTree.cpp: (WebCore::Style::needsPseudoElement): 2014-11-19 Myles C. Maxfield [OS X] Upright vertical text is completely broken for multi-code-unit codepoints https://bugs.webkit.org/show_bug.cgi?id=138891 Reviewed by Dan Bernstein. We were assuming that we can use the string index (in UTF-16) as the glyph index. This falls down when a single codepoint (and glyph) contians multiple code units. Test: platform/mac/fast/text/multiple-codeunit-vertical-upright.html * platform/graphics/GlyphPage.h: * platform/graphics/mac/GlyphPageTreeNodeMac.cpp: (WebCore::GlyphPage::fill): 2014-11-19 Daniel Bates Attempt to fix the Apple Internal Mavericks build after (https://bugs.webkit.org/show_bug.cgi?id=136863) Define enumerator NSHTTPCookieAcceptPolicyExclusivelyFromMainDocumentDomain when building without the Apple Internal SDK or with the Apple Internal SDK on OS X Mavericks or earlier. * platform/spi/cf/CFNetworkSPI.h: 2014-11-16 Sam Weinig Move the 'quotes' CSS property to the new StyleBuilder https://bugs.webkit.org/show_bug.cgi?id=138788 Reviewed by Chris Dumez. Test: fast/css/content/content-quotes-07.html * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): Fix the parser to only accept none as a valid primitive identifier. Tested in the newly added content-quotes-07.html. * css/CSSPropertyNames.in: * css/StyleBuilderConverter.h: (WebCore::StyleBuilderConverter::convertQuotes): * css/StyleResolver.cpp: (WebCore::StyleResolver::applyProperty): Move "quotes" to the new style builder. * rendering/style/RenderStyle.h: Add an initialQuotes() function for use in the auto-generated style builder. 2014-11-19 Dean Jackson Handle unprefixed @keyframes rule https://bugs.webkit.org/show_bug.cgi?id=138899 Reviewed by Simon Fraser. Support the parsing of unprefixed @keyframes. In CSSParser, assign the same token identifier to the prefixed and unprefixed forms. This will keep compatibility with older content. If a page has both forms, then whatever comes last will win (as it does if you had duplicate names of the same form). Tests: animations/unprefixed-keyframes-rule.html animations/unprefixed-keyframes.html * css/CSSGrammar.y.in: Rename the WEBKIT_KEYFRAME_RULE_SYM symbol to be KEYFRAME_RULE_SYM. Same with KEYFRAMES_SYM. * css/CSSParser.cpp: (WebCore::CSSParser::detectAtToken): Look for the @keyframes style strings and assign the new token values. 2014-11-19 Andreas Kling Move pseudo-style code from RenderObject to RenderElement. Reviewed by Antti Koivisto. Migrate get*PseudoStyle() to RenderElement, and the selection color functions along with them. This gets rid of a DOM ancestor walk in pseudo style lookup. Narrow down some argument types to keep things building. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::logicalLeftSelectionGap): (WebCore::RenderBlock::logicalRightSelectionGap): (WebCore::styleForFirstLetter): (WebCore::RenderBlock::updateFirstLetterStyle): (WebCore::RenderBlock::createFirstLetterRenderer): * rendering/RenderBlock.h: * rendering/RenderElement.cpp: (WebCore::RenderElement::getCachedPseudoStyle): (WebCore::RenderElement::getUncachedPseudoStyle): (WebCore::RenderElement::selectionColor): (WebCore::RenderElement::selectionPseudoStyle): (WebCore::RenderElement::selectionForegroundColor): (WebCore::RenderElement::selectionEmphasisMarkColor): (WebCore::RenderElement::selectionBackgroundColor): * rendering/RenderElement.h: * rendering/RenderObject.cpp: (WebCore::RenderObject::selectionBackgroundColor): Deleted. (WebCore::RenderObject::selectionColor): Deleted. (WebCore::RenderObject::selectionPseudoStyle): Deleted. (WebCore::RenderObject::selectionForegroundColor): Deleted. (WebCore::RenderObject::selectionEmphasisMarkColor): Deleted. (WebCore::RenderObject::getCachedPseudoStyle): Deleted. (WebCore::RenderObject::getUncachedPseudoStyle): Deleted. * rendering/RenderObject.h: * rendering/RenderText.h: (WebCore::RenderText::getCachedPseudoStyle): (WebCore::RenderText::selectionBackgroundColor): (WebCore::RenderText::selectionForegroundColor): (WebCore::RenderText::selectionEmphasisMarkColor): * rendering/svg/SVGInlineTextBox.cpp: (WebCore::SVGInlineTextBox::paintSelectionBackground): (WebCore::SVGInlineTextBox::paint): 2014-11-19 Tim Horton Add an optional entry transition (from selection highlight) to TextIndicator https://bugs.webkit.org/show_bug.cgi?id=138856 Reviewed by Anders Carlsson. * WebCore.exp.in: Add an export. * platform/spi/cocoa/QuartzCoreSPI.h: Add some SPI. 2014-11-19 Chris Dumez Move 'outline-style' CSS property to the new StyleBuilder https://bugs.webkit.org/show_bug.cgi?id=138882 Reviewed by Sam Weinig. Move 'outline-style' CSS property from DeprecatedStyleBuilder to the new StyleBuilder by using custom code. No new tests, no behavior change. * css/CSSPropertyNames.in: * css/DeprecatedStyleBuilder.cpp: (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder): (WebCore::ApplyPropertyDefault::setValue): Deleted. (WebCore::ApplyPropertyDefault::applyValue): Deleted. (WebCore::ApplyPropertyDefault::createHandler): Deleted. (WebCore::ApplyPropertyOutlineStyle::applyInheritValue): Deleted. (WebCore::ApplyPropertyOutlineStyle::applyInitialValue): Deleted. (WebCore::ApplyPropertyOutlineStyle::applyValue): Deleted. (WebCore::ApplyPropertyOutlineStyle::createHandler): Deleted. * css/StyleBuilderCustom.h: (WebCore::StyleBuilderFunctions::applyInheritOutlineStyle): (WebCore::StyleBuilderFunctions::applyInitialOutlineStyle): (WebCore::StyleBuilderFunctions::applyValueOutlineStyle): 2014-11-19 Joseph Pecoraro Web Inspector: JSContext inspection Resource search does not work https://bugs.webkit.org/show_bug.cgi?id=131252 Reviewed by Timothy Hatcher. Test: inspector/debugger/search-scripts.html * inspector/InspectorPageAgent.cpp: (WebCore::InspectorPageAgent::searchInResources): A little cleanup. 2014-11-19 Joseph Pecoraro Web Inspector: Provide $exception in the console for the thrown exception value https://bugs.webkit.org/show_bug.cgi?id=138726 Reviewed by Timothy Hatcher. Tests: inspector/debugger/command-line-api-exception-nested-catch.html inspector/debugger/command-line-api-exception.html * inspector/CommandLineAPIModuleSource.js: Expose $exception in the more complete command line API. 2014-11-19 David Hyatt Images/replaced elements that are as tall as a page should be on their own page https://bugs.webkit.org/show_bug.cgi?id=138886 - Reviewed by Dean Jackson. Added fast/multicol/tall-image-behavior.html (and RL/LR variants) * rendering/InlineFlowBox.cpp: (WebCore::InlineFlowBox::computeReplacedAndTextLineTopAndBottom): * rendering/InlineFlowBox.h: Add a new method that computes the line top and line bottom ignoring all margins, overflow and line-height. This allows us to see if a line that is taller than a page can be made to fit if we ignored margins and unused descent. * rendering/RenderBlockFlow.cpp: (WebCore::RenderBlockFlow::adjustLinePositionForPagination): Call the new helper function, computeReplacedAndTextLineTopAndBottom and push to a new page if we see that we can fit on a page by ourselves without blank space included. 2014-11-18 Ada Chan Take Web Audio into account for the Page::isPlayingAudio() API. https://bugs.webkit.org/show_bug.cgi?id=137464 Reviewed by Jer Noble. Make AudioContext a subclass of AudioProducer. It figures out whether there's audio playing by checking whether its AudioDestinationNode is playing (and not silent). It calls Document::updateIsPlayingAudio() whenever its audio playing state has changed. Test: webaudio/web-audio-is-playing.html * Modules/webaudio/AudioContext.cpp: (WebCore::AudioContext::lazyInitialize): Add itself to the Document's list of AudioProducers if it's not an offline audio context. (WebCore::AudioContext::uninitialize): Remove itself from the Document's list of AudioProducers if it's not an offline audio context. (WebCore::AudioContext::stop): Tell the document to update its audio playing state. (WebCore::AudioContext::isPlayingAudio): Return true if the audio context hasn't been stopped and its destination node is playing audio. (WebCore::AudioContext::pageMutedStateDidChange): Add a FIXME for now. (WebCore::AudioContext::isPlayingAudioDidChange): Call Document::updateIsPlayingAudio(). * Modules/webaudio/AudioContext.h: * Modules/webaudio/AudioDestinationNode.cpp: (WebCore::AudioDestinationNode::AudioDestinationNode): Initialize m_isSilent and m_isEffectivelyPlayingAudio. (WebCore::AudioDestinationNode::render): Call setIsSilent() with the appropriate value after rendering. (WebCore::AudioDestinationNode::isPlayingDidChange): Call updateIsEffectivelyPlayingAudio(). (WebCore::AudioDestinationNode::setIsSilent): If m_isSilent has changed, call updateIsEffectivelyPlayingAudio(). (WebCore::AudioDestinationNode::updateIsEffectivelyPlayingAudio): If m_isEffectivelyPlayingAudio has changed, call AudioContext::isPlayingAudioDidChange(). * Modules/webaudio/AudioDestinationNode.h: (WebCore::AudioDestinationNode::isPlaying): (WebCore::AudioDestinationNode::isPlayingAudio): * Modules/webaudio/DefaultAudioDestinationNode.cpp: (WebCore::DefaultAudioDestinationNode::isPlaying): Return whether the AudioDestination is playing. * Modules/webaudio/DefaultAudioDestinationNode.h: * platform/audio/AudioIOCallback.h: * platform/audio/ios/AudioDestinationIOS.cpp: (WebCore::AudioDestinationIOS::start): Call setIsPlaying() instead. (WebCore::AudioDestinationIOS::stop): Ditto. (WebCore::AudioDestinationIOS::setIsPlaying): If m_isPlaying has changed, call AudioIOCallback::isPlayingDidChange(). * platform/audio/ios/AudioDestinationIOS.h: * platform/audio/mac/AudioDestinationMac.cpp: (WebCore::AudioDestinationMac::start): Call setIsPlaying() instead. (WebCore::AudioDestinationMac::stop): Ditto. (WebCore::AudioDestinationMac::setIsPlaying): If m_isPlaying has changed, call AudioIOCallback::isPlayingDidChange(). * platform/audio/mac/AudioDestinationMac.h: * testing/Internals.cpp: (WebCore::Internals::isPagePlayingAudio): * testing/Internals.h: * testing/Internals.idl: Add internals.isPagePlayingAudio() for testing. 2014-11-19 Daniel Bates Attempt to fix the Apple Internal Mountain Lion build after (https://bugs.webkit.org/show_bug.cgi?id=136863) Only import header CFNSURLConnection.h when building for iOS or OS X Yosemite. * platform/spi/cf/CFNetworkSPI.h: 2014-11-19 Antti Koivisto Fix TilesAdded bitmask https://bugs.webkit.org/show_bug.cgi?id=138883 Reviewed by Simon Fraser. Simon spotted this. * platform/graphics/ca/GraphicsLayerCA.h: Use 1LLU << 29 instead of 1LLU < 29 This worked before by pure luck as bit 0 is unused. 2014-11-19 Daniel Bates [iOS] Make WebKit build with public iOS SDK https://bugs.webkit.org/show_bug.cgi?id=136863 Reviewed by David Kilzer. * WebCore.xcodeproj/project.pbxproj: Add private headers CFNetworkSPI.h and NS{CalendarDate, String, URLDownload}SPI.h. * loader/cocoa/DiskCacheMonitorCocoa.mm: Move forward declaration of CFNetwork data types and functions from here to file CFNetworkSPI.h and include header CFNetworkSPI.h. * platform/network/mac/ResourceHandleMac.mm: Substitute CFNetworkSPI.h for CFURLRequestSPI.h as the content of the latter was incorporated into the former. * platform/spi/cf/CFNetworkSPI.h: Added. * platform/spi/cf/CFURLRequestSPI.h: Removed; incorporated its functionality into CFNetworkSPI.h * platform/spi/cocoa/NSCalendarDateSPI.h: Added. * platform/spi/cocoa/NSStringSPI.h: Added. * platform/spi/cocoa/NSURLDownloadSPI.h: Added. 2014-11-19 Benjamin Poulain Get rid of AccessibilityObject::setRoleValue() https://bugs.webkit.org/show_bug.cgi?id=138861 Reviewed by Chris Fleizach. * accessibility/AccessibilityObject.h: (WebCore::AccessibilityObject::setRoleValue): Deleted. 2014-11-19 Philippe Normand Missing NULL-check in VideoTrack::setLanguage https://bugs.webkit.org/show_bug.cgi?id=138867 Reviewed by Jer Noble. * html/track/VideoTrack.cpp: (WebCore::VideoTrack::setLanguage): Prevent change event creation on an empty video track list. 2014-11-19 Chris Fleizach AX: Safari fails to load a web page with VoiceOver https://bugs.webkit.org/show_bug.cgi?id=138849 Reviewed by Mario Sanchez Prada. Sometimes an inlineElementContinuation will continue to an inline RenderBlock, so we case this incorrectly and bad things happen. Test: accessibility/inline-block-assertion.html * accessibility/AccessibilityRenderObject.cpp: (WebCore::startOfContinuations): 2014-11-19 Zalan Bujtas Simple line layout: RenderTreeAsText should use rangeForRenderer() when dumping simple line text. https://bugs.webkit.org/show_bug.cgi?id=138847 Reviewed by Antti Koivisto. This is in preparation to support multiple renderers for simple line layout. Use rangeForRenderer() to get runs for a particular renderer as opposed to for the entire flow. Not testable. * rendering/RenderTreeAsText.cpp: (WebCore::write): 2014-11-19 peavo@outlook.com [WinCairo] Compile error when CSS_SELECTORS_LEVEL4 is not enabled. https://bugs.webkit.org/show_bug.cgi?id=138870 Reviewed by Alex Christensen. * css/CSSSelector.cpp: (WebCore::simpleSelectorSpecificityInternal): 2014-11-19 Chris Fleizach AX: Screen braille input doesn't work on forms. https://bugs.webkit.org/show_bug.cgi?id=138804 Reviewed by Mario Sanchez Prada. Allow iOS to set values of text fields through the API. Test: platform/ios-sim/accessibility/set-value.html * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm: (-[WebAccessibilityObjectWrapper _accessibilitySetValue:]): 2014-11-19 Zalan Bujtas Simple line layout: Add renderer based rect collecting to RunResolver. https://bugs.webkit.org/show_bug.cgi?id=138818 Reviewed by Antti Koivisto. This is in preparation to multiple renderers support. RunResolver should be able to collect rects for a particular renderer that might overlap multiple runs. (or might just be a subset of a Run) Covered by existing tests. * rendering/SimpleLineLayoutFlowContents.cpp: (WebCore::SimpleLineLayout::FlowContents::renderer): It operates on a single renderer currently. (WebCore::SimpleLineLayout::FlowContents::resolveRendererPositions): It operates on a single renderer currently. * rendering/SimpleLineLayoutFlowContents.h: * rendering/SimpleLineLayoutFunctions.cpp: (WebCore::SimpleLineLayout::computeTextBoundingBox): (WebCore::SimpleLineLayout::computeTextFirstRunLocation): (WebCore::SimpleLineLayout::collectTextAbsoluteRects): (WebCore::SimpleLineLayout::collectTextAbsoluteQuads): (WebCore::SimpleLineLayout::showLineLayoutForFlow): * rendering/SimpleLineLayoutResolver.cpp: (WebCore::SimpleLineLayout::baselinePosition): (WebCore::SimpleLineLayout::linePosition): (WebCore::SimpleLineLayout::lineSize): (WebCore::SimpleLineLayout::RunResolver::Run::rect): (WebCore::SimpleLineLayout::RunResolver::Run::rectForTextRenderer): (WebCore::SimpleLineLayout::RunResolver::Run::baseline): (WebCore::SimpleLineLayout::RunResolver::Run::text): (WebCore::SimpleLineLayout::RunResolver::Run::computeRect): (WebCore::SimpleLineLayout::RunResolver::RunResolver): * rendering/SimpleLineLayoutResolver.h: 2014-11-19 Dhi Aurrahman Add selector checker for :lang pseudo class in Selectors level 4 https://bugs.webkit.org/show_bug.cgi?id=138281 Reviewed by Benjamin Poulain. Add selector checker for :lang pseudo class in Selectors level 4. The language tags matching is specified in [1,2]. [1] http://www.ietf.org/rfc/rfc4647.txt [2] http://dev.w3.org/csswg/selectors4/#the-lang-pseudo Tests: fast/selectors/lang-extended-filtering.html fast/selectors/lang-multiple.html * css/SelectorChecker.cpp: (WebCore::SelectorChecker::checkOne): * css/SelectorCheckerTestFunctions.h: (WebCore::containslanguageSubtagMatchingRange): (WebCore::matchesLangPseudoClass): (WebCore::matchesLangPseudoClassDeprecated): * cssjit/SelectorCompiler.cpp: (WebCore::SelectorCompiler::addPseudoClassType): 2014-11-18 Philippe Normand start/stop method for AudioBufferSourceNodes and OscillatorNodes can take no args https://bugs.webkit.org/show_bug.cgi?id=138739 Reviewed by Darin Adler. The patch is inspired by the following Blink revision by : Test: webaudio/dom-exceptions.html * Modules/webaudio/AudioBufferSourceNode.cpp: (WebCore::AudioBufferSourceNode::start): (WebCore::AudioBufferSourceNode::startPlaying): (WebCore::AudioBufferSourceNode::noteGrainOn): (WebCore::AudioBufferSourceNode::startGrain): Deleted. * Modules/webaudio/AudioBufferSourceNode.h: * Modules/webaudio/AudioBufferSourceNode.idl: * Modules/webaudio/AudioScheduledSourceNode.cpp: (WebCore::AudioScheduledSourceNode::start): (WebCore::AudioScheduledSourceNode::stop): * Modules/webaudio/AudioScheduledSourceNode.h: * Modules/webaudio/OscillatorNode.idl: 2014-11-18 Benjamin Poulain Add the initial implementation of dynamic specificity for :matches() https://bugs.webkit.org/show_bug.cgi?id=138822 Reviewed by Andreas Kling. Previously we completely ignored the selector list of :matches() when computing the specificity of the selector. The spec (http://dev.w3.org/csswg/selectors4/#specificity) says: "The specificity of a :matches() pseudo-class, however, is the specificity of the most specific complex selector that matched the given element." This patch does just that. In the CSS JIT, we only consider specificities that can be computed statically for now, this should be extended later. When the specificity is dynamic, we fall back to SelectorChecker. In that case, we execute every selector of the selector list and we keep the maximum value as the specificity for the whole :matches(). Tests: fast/css/matches-specificity-1.html fast/css/matches-specificity-2.html fast/css/matches-specificity-3.html fast/css/matches-specificity-4.html fast/css/matches-specificity-5.html fast/css/matches-specificity-6.html fast/css/matches-specificity-7.html fast/css/matches-specificity-8.html fast/css/matches-specificity-9.html fast/css/matches-specificity-10.html * css/CSSSelector.cpp: (WebCore::selectorSpecificity): (WebCore::maxSpecificity): (WebCore::CSSSelector::specificity): (WebCore::simpleSelectorSpecificityInternal): (WebCore::CSSSelector::simpleSelectorSpecificity): :matches() itself should not have any specificity. The specificity of its components is computed in SelectorChecker. Since :matches() is no longer accounted as a class B specificity, I had to finish the specificity of :not() or some test breaks. * css/CSSSelector.h: * css/PageRuleCollector.cpp: (WebCore::comparePageRules): * css/SelectorChecker.cpp: (WebCore::SelectorChecker::checkOne): We can no longer shortcut the execution when context.pseudoElementEffective is false. There is no guarantee that a following selector wouldn't match with a higher specificity. * cssjit/SelectorCompiler.cpp: (WebCore::SelectorCompiler::addPseudoClassType): (WebCore::SelectorCompiler::SelectorCodeGenerator::SelectorCodeGenerator): (WebCore::SelectorCompiler::constructFragments): (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker): 2014-11-18 David Kilzer FeatureDefines.xcconfig: Switch from using PLATFORM_NAME to SDK selectors Reviewed by Mark Rowe. * Configurations/FeatureDefines.xcconfig: Switch to using SDK selectors. 2014-11-18 Chris Dumez Crash when setting 'z-index' / 'flex-shrink' CSS properties to a calculated value https://bugs.webkit.org/show_bug.cgi?id=138783 Reviewed by Andreas Kling. Update operators converting CSSPrimitiveValue to integer / floating point types to properly handle calculated values (e.g. 'calc(2 * 3)'). Previously, this was not working in release builds and we would hit an ASSERT_NOT_REACHED() in debug builds. Tests: fast/css/flex-shrink-calculated-value.html fast/css/z-index-calculated-value.html * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::operator unsigned short): (WebCore::CSSPrimitiveValue::operator int): (WebCore::CSSPrimitiveValue::operator unsigned): (WebCore::CSSPrimitiveValue::operator float): 2014-11-18 Commit Queue Unreviewed, rolling out r176263 and r176273. https://bugs.webkit.org/show_bug.cgi?id=138854 Underlines are hideous. (Requested by litherum on #webkit). Reverted changesets: "Use underlining metrics from the font file" https://bugs.webkit.org/show_bug.cgi?id=138762 http://trac.webkit.org/changeset/176263 "iOS build fix." http://trac.webkit.org/changeset/176273 2014-11-18 Chris Dumez Add a setting to toggle DOMTimer throttling support https://bugs.webkit.org/show_bug.cgi?id=138844 Reviewed by Andreas Kling. Add a setting to disable DOM timers throttling, in order to help developers determine if a specific issue is caused by timer throttling. * page/DOMTimer.cpp: (WebCore::DOMTimerFireState::contextDocument): (WebCore::DOMTimerFireState::scriptMadeUserObservableChanges): (WebCore::DOMTimer::isDOMTimersThrottlingEnabled): (WebCore::DOMTimer::updateThrottlingStateIfNecessary): * page/DOMTimer.h: * page/Settings.in: 2014-11-18 Beth Dakin REGRESSION: Invoking dictionary lookup on text in some search fields searches for incorrect item https://bugs.webkit.org/show_bug.cgi?id=138853 -and corresponding- rdar://problem/18912505 Reviewed by Tim Horton. Get the visible position based on the frame, not just the renderer. * editing/mac/DictionaryLookup.mm: (WebCore::rangeForDictionaryLookupAtHitTestResult): 2014-11-18 David Hyatt REGRESSION (r167210): Invalid cast in WebCore::RenderBlock::blockSelectionGaps https://bugs.webkit.org/show_bug.cgi?id=137590 Reviewed by Dean Jackson. Added fast/block/selection-block-gaps-crash.html * rendering/RenderBlock.cpp: (WebCore::RenderBlock::blockSelectionGaps): Check that we really are a RenderBlock before recurring. 2014-11-18 Andreas Kling Avoid synchronous style recalc in Document.activeElement Reviewed by Ryosuke Niwa. This subtly changes the behavior of , which was caught by a layout test. Auto-focus doesn't happen until the render tree is attached, although it was possible to force it by accessing document.activeElement. Now auto-focus is always lazy. This is consistent with other browser engines. ~1% progression on Speedometer locally. * dom/Document.cpp: (WebCore::Document::activeElement): 2014-11-18 Chris Dumez Have Vector::capacity() return an unsigned instead of a size_t https://bugs.webkit.org/show_bug.cgi?id=138842 Reviewed by Andreas Kling. Update the code base now that Vector::capacity() returns an unsigned type instead of a size_t. No new tests, no behavior change. * editing/TextIterator.cpp: (WebCore::SearchBuffer::append): (WebCore::SearchBuffer::prependContext): (WebCore::SearchBuffer::search): (WebCore::SearchBuffer::length): * platform/SharedBuffer.cpp: (WebCore::SharedBuffer::duplicateDataBufferIfNecessary): 2014-11-18 Geoffrey Garen Removed the custom allocator for ListHashSet nodes https://bugs.webkit.org/show_bug.cgi?id=138841 Reviewed by Andreas Kling. Uses of ListHashSet no longer need to declare an inline capacity, since that was only used to specify the capacity of the custom allocator. * dom/DOMNamedFlowCollection.h: * dom/DocumentEventQueue.h: * dom/DocumentStyleSheetCollection.h: * dom/NamedFlowCollection.h: * html/FormController.h: * rendering/FloatingObjects.h: * rendering/RenderBlock.h: 2014-11-18 David Hyatt REGRESSION(r152313): Inline-block element doesn't wrap properly https://bugs.webkit.org/show_bug.cgi?id=138846 - Reviewed by Simon Fraser. Added fast/inline-block/inline-block-empty-spans.html * rendering/line/BreakingContextInlineHeaders.h: (WebCore::BreakingContext::canBreakAtThisPosition): 2014-11-18 Myles C. Maxfield Multicolumn layout with negative line spacing and orphans causes pieces of letters to be shown at the bottom of columns https://bugs.webkit.org/show_bug.cgi?id=138204 Reviewed by Dave Hyatt. This code is responsible for pushing block elements to the next column if the "orphans" CSS property is triggered. The mechanism by which this is achieved is to push the block down such that the origin of the block is at the origin of the next column. However, if there is negative line spacing, the top portion of the text might actually be on top of the origin of the block. Therefore, the block wasn't being pushed down enough to entirely contain its text, so the top pieces were being drawn on the previous column. Test: fast/multicol/orphans-negative-line-spacing.html * rendering/RenderBlockFlow.cpp: (WebCore::RenderBlockFlow::adjustLinePositionForPagination): 2014-11-18 Chris Dumez DOMTimers sometimes don't get unthrottled on scrolling https://bugs.webkit.org/show_bug.cgi?id=138838 Reviewed by Antti Koivisto. DOMTimers sometimes didn't get unthrottled on scrolling. This is because we stopped listening for viewport changes every time the timer fires, but we didn't listen for those changes again if we decided the timer should stay throttled after the timer's action was executed. We should listen for viewport changes again after executing the timer's action, if there are elements outside the viewport causing the DOMTimer to be throttled, even if the throttleState hasn't changed (i.e the timer stays throttled). Test: fast/dom/timer-unthrottle-on-scroll.html * page/DOMTimer.cpp: (WebCore::DOMTimer::updateThrottlingStateIfNecessary): (WebCore::DOMTimer::updateTimerIntervalIfNecessary): (WebCore::DOMTimer::updateThrottlingStateAfterViewportChange): 2014-11-18 Daniel Bates [iOS] Make WebCore build and link with public SDK https://bugs.webkit.org/show_bug.cgi?id=136487 Reviewed by David Kilzer. * bindings/objc/DOMInternal.mm: Include header NSMapTableSPI.h. * bindings/objc/WebScriptObject.mm: Ditto; Also fix style nit, substitute #import for #include when importing header WTFString.h. * bridge/objc/objc_instance.mm: Include header NSMapTableSPI.h and remove #import NSMapTable.h as the former will import the latter. * platform/ios/PlatformEventFactoryIOS.mm: Include header wtf/CurrentTime.h for the declaration of WTF::currentTime(). * platform/ios/wak/WebCoreThread.mm: Remove unnecessary include of header CoreFoundation/CFPriv.h. * platform/spi/ios/AVKitSPI.h: Add more SPI. * platform/spi/ios/MPAVRoutingControllerSPI.h: Ditto. 2014-11-18 Myles C. Maxfield Subclass CachedFont for SVG fonts https://bugs.webkit.org/show_bug.cgi?id=138686 Reviewed by Simon Fraser. Re-landing due to flakey bots. CachedFont had many #if ENABLE(SVG_FONTS) scattered throughout it. Splitting out this SVG-specific code into a subclass of CachedFont cleans up the design. No new tests because there is no behavior change. * CMakeLists.txt: * WebCore.vcxproj/WebCore.vcxproj: * WebCore.vcxproj/WebCore.vcxproj.filters: * WebCore.xcodeproj/project.pbxproj: * css/CSSFontFaceSource.cpp: (WebCore::CSSFontFaceSource::getFontData): There are two sections in this function; one for SVG fonts and one for regular fonts. I've moved these two sections into CachedFont and SVGCachedFont, thereby simplifying this function. (WebCore::CSSFontFaceSource::ensureFontData): Ditto. (WebCore::CSSFontFaceSource::svgFontFaceElement): Moved to header. (WebCore::CSSFontFaceSource::setSVGFontFaceElement): Ditto. (WebCore::CSSFontFaceSource::isSVGFontFaceSource): Ditto. * css/CSSFontFaceSource.h: Put functions that are simple enough to be inlined here. * css/CSSFontFaceSrcValue.cpp: (WebCore::CSSFontFaceSrcValue::isSVGFontTarget): Convenience function. (WebCore::CSSFontFaceSrcValue::cachedFont): Pass through a boolean from CSSFontSelector to CachedResourceHandle regarding if we should be using SVGCachedFont instead of CachedFont. * css/CSSFontFaceSrcValue.h: New convenience function. * css/CSSFontSelector.cpp: (WebCore::CSSFontSelector::addFontFaceRule): Pass through a boolean * inspector/InspectorPageAgent.cpp: (WebCore::InspectorPageAgent::cachedResourceType): Update for new CachedResource type (WebCore::cachedResourcesForFrame): Ditto. * loader/cache/CachedFont.cpp: (WebCore::CachedFont::CachedFont): (WebCore::CachedFont::ensureCustomFontData): Taken from CSSFontFaceSource::getFontData() (WebCore::CachedFont::getFontData): Ditto. (WebCore::CachedFont::platformDataFromCustomData): Ditto. (WebCore::CachedFont::ensureSVGFontData): Moved to SVGCachedFont. (WebCore::CachedFont::getSVGFontById): Ditto. * loader/cache/CachedFont.h: * loader/cache/CachedResource.cpp: (WebCore::defaultPriorityForResourceType): Update for new enum type. * loader/cache/CachedResource.h: * loader/cache/CachedResourceLoader.cpp: (WebCore::createResource): Takes new boolean. (WebCore::CachedResourceLoader::requestFont): Ditto. (WebCore::CachedResourceLoader::checkInsecureContent): Update for new enum type (WebCore::CachedResourceLoader::canRequest): Ditto. * loader/cache/CachedResourceLoader.h: * loader/cache/CachedSVGFont.cpp: Added. (WebCore::CachedSVGFont::CachedSVGFont): Moved from CSSFontFaceSource::getFontData() and CachedFont (WebCore::CachedSVGFont::getFontData): Ditto. (WebCore::CachedSVGFont::platformDataFromCustomData): Ditto. (WebCore::CachedSVGFont::ensureCustomFontData): Ditto. (WebCore::CachedSVGFont::getSVGFontById): Ditto. (WebCore::CachedSVGFont::firstFontFace): Ditto. * loader/cache/CachedSVGFont.h: Subclass CachedFont. * loader/cache/MemoryCache.cpp: (WebCore::MemoryCache::getStatistics): Update for new enum. * svg/SVGFontFaceUriElement.cpp: (WebCore::isSVGFontTarget): Convenience function. (WebCore::SVGFontFaceUriElement::loadFont): Update for new boolean. 2014-11-18 Chris Dumez Update the Vector API to deal with unsigned types instead of size_t https://bugs.webkit.org/show_bug.cgi?id=138824 Reviewed by Andreas Kling. Update code base to fix build errors related to the typing changes in the Vector API (size_t -> unsigned). No new tests, no behavior change. * WebCore.exp.in: * bindings/js/JSDOMBinding.h: (WebCore::jsArray): * bindings/js/JSWebGLRenderingContextCustom.cpp: * cssjit/SelectorCompiler.cpp: * html/HTMLFormElement.cpp: (WebCore::removeFromVector): * html/parser/HTMLParserIdioms.h: * html/parser/XSSAuditor.cpp: 2014-11-18 Myles C. Maxfield Unreviewed iOS build fix * platform/graphics/ios/SimpleFontDataIOS.mm: (WebCore::SimpleFontData::platformInit): 2014-11-18 Dan Bernstein iOS build fix. * platform/graphics/ios/SimpleFontDataIOS.mm: (WebCore::SimpleFontData::platformInit): 2014-11-18 Commit Queue Unreviewed, rolling out r176264. https://bugs.webkit.org/show_bug.cgi?id=138837 caused many test failures (Requested by litherum on #webkit). Reverted changeset: "Subclass CachedFont for SVG fonts" https://bugs.webkit.org/show_bug.cgi?id=138686 http://trac.webkit.org/changeset/176264 2014-11-18 Daniel Bates [iOS] Libdispatch, Dyld, IOKit, Mach, NSPointerFunctions, MobileGestalt SPI are not available in public SDK https://bugs.webkit.org/show_bug.cgi?id=138802 Reviewed by David Kilzer. Add SPI wrapper headers {Dispatch, DynamicLinker, IOPMLib, MachVM, NSPointerFunctions, MobileGestalt}SPI.h that forward declare applicable libdispatch, dyld, IOKit, mach, Foundation, MobileGestalt SPI and use these headers instead of the including private headers corresponding to these libraries/frameworks. * WebCore.xcodeproj/project.pbxproj: Add private headers MobileGestaltSPI.h and MachVMSPI.h, and project headers DynamicLinkerSPI.h, NSPointerFunctionsSPI.h, DispatchSPI.h and IOPMLibSPI.h. Also, sort files in Xcode project. * bindings/objc/DOMInternal.mm: Include header NSPointerFunctionsSPI.h. * bridge/objc/objc_instance.mm: Ditto; Also, sort #import directives. * platform/cocoa/DisplaySleepDisablerCocoa.cpp: Substitute header IOPMLibSPI.h for private header IOKit/pwr_mgt/IOPMLib.h. * platform/cocoa/MemoryPressureHandlerCocoa.mm: Substitute header DispatchSPI.h for private header dispatch/private.h. * platform/graphics/ios/FontServicesIOS.mm: Substitute header DynamicLinkerSPI.h for private header mach-o/dyld_priv.h. * platform/ios/PlatformScreenIOS.mm: Substitute header MobileGestaltSPI.h for private header MobileGestalt.h. * platform/spi/cocoa/DispatchSPI.h: Added. * platform/spi/cocoa/DynamicLinkerSPI.h: Added. * platform/spi/cocoa/IOPMLibSPI.h: Added. * platform/spi/cocoa/MachVMSPI.h: Added. * platform/spi/cocoa/NSPointerFunctionsSPI.h: Added. * platform/spi/ios/MobileGestaltSPI.h: Added. 2014-11-18 Myles C. Maxfield Subclass CachedFont for SVG fonts https://bugs.webkit.org/show_bug.cgi?id=138686 Reviewed by Simon Fraser. CachedFont had many #if ENABLE(SVG_FONTS) scattered throughout it. Splitting out this SVG-specific code into a subclass of CachedFont cleans up the design. No new tests because there is no behavior change. * CMakeLists.txt: * WebCore.vcxproj/WebCore.vcxproj: * WebCore.vcxproj/WebCore.vcxproj.filters: * WebCore.xcodeproj/project.pbxproj: * css/CSSFontFaceSource.cpp: (WebCore::CSSFontFaceSource::getFontData): There are two sections in this function; one for SVG fonts and one for regular fonts. I've moved these two sections into CachedFont and SVGCachedFont, thereby simplifying this function. (WebCore::CSSFontFaceSource::ensureFontData): Ditto. (WebCore::CSSFontFaceSource::svgFontFaceElement): Moved to header. (WebCore::CSSFontFaceSource::setSVGFontFaceElement): Ditto. (WebCore::CSSFontFaceSource::isSVGFontFaceSource): Ditto. * css/CSSFontFaceSource.h: Put functions that are simple enough to be inlined here. * css/CSSFontFaceSrcValue.cpp: (WebCore::CSSFontFaceSrcValue::isSVGFontTarget): Convenience function. (WebCore::CSSFontFaceSrcValue::cachedFont): Pass through a boolean from CSSFontSelector to CachedResourceHandle regarding if we should be using SVGCachedFont instead of CachedFont. * css/CSSFontFaceSrcValue.h: New convenience function. * css/CSSFontSelector.cpp: (WebCore::CSSFontSelector::addFontFaceRule): Pass through a boolean * inspector/InspectorPageAgent.cpp: (WebCore::InspectorPageAgent::cachedResourceType): Update for new CachedResource type (WebCore::cachedResourcesForFrame): Ditto. * loader/cache/CachedFont.cpp: (WebCore::CachedFont::CachedFont): (WebCore::CachedFont::ensureCustomFontData): Taken from CSSFontFaceSource::getFontData() (WebCore::CachedFont::getFontData): Ditto. (WebCore::CachedFont::platformDataFromCustomData): Ditto. (WebCore::CachedFont::ensureSVGFontData): Moved to SVGCachedFont. (WebCore::CachedFont::getSVGFontById): Ditto. * loader/cache/CachedFont.h: * loader/cache/CachedResource.cpp: (WebCore::defaultPriorityForResourceType): Update for new enum type. * loader/cache/CachedResource.h: * loader/cache/CachedResourceLoader.cpp: (WebCore::createResource): Takes new boolean. (WebCore::CachedResourceLoader::requestFont): Ditto. (WebCore::CachedResourceLoader::checkInsecureContent): Update for new enum type (WebCore::CachedResourceLoader::canRequest): Ditto. * loader/cache/CachedResourceLoader.h: * loader/cache/CachedSVGFont.cpp: Added. (WebCore::CachedSVGFont::CachedSVGFont): Moved from CSSFontFaceSource::getFontData() and CachedFont (WebCore::CachedSVGFont::getFontData): Ditto. (WebCore::CachedSVGFont::platformDataFromCustomData): Ditto. (WebCore::CachedSVGFont::ensureCustomFontData): Ditto. (WebCore::CachedSVGFont::getSVGFontById): Ditto. (WebCore::CachedSVGFont::firstFontFace): Ditto. * loader/cache/CachedSVGFont.h: Subclass CachedFont. * loader/cache/MemoryCache.cpp: (WebCore::MemoryCache::getStatistics): Update for new enum. * svg/SVGFontFaceUriElement.cpp: (WebCore::isSVGFontTarget): Convenience function. (WebCore::SVGFontFaceUriElement::loadFont): Update for new boolean. 2014-11-18 Myles C. Maxfield Use underlining metrics from the font file https://bugs.webkit.org/show_bug.cgi?id=138762 Reviewed by Dave Hyatt. Test: platform/mac/fast/css3-text/css3-text-decoration/text-decoration-thickness.html * platform/graphics/FontMetrics.h: Adding variables for text decoration thickness and underline position. (WebCore::FontMetrics::FontMetrics): (WebCore::FontMetrics::decorationThickness): (WebCore::FontMetrics::setDecorationThickness): (WebCore::FontMetrics::underlinePosition): (WebCore::FontMetrics::setUnderlinePosition): * platform/graphics/freetype/SimpleFontDataFreeType.cpp: (WebCore::SimpleFontData::platformInit): Initialize new FontMetrics members. * platform/graphics/ios/SimpleFontDataIOS.mm: (WebCore::SimpleFontData::platformInit): Ditto. * platform/graphics/mac/SimpleFontDataMac.mm: (WebCore::SimpleFontData::platformInit): Ditto. * platform/graphics/win/SimpleFontDataCGWin.cpp: (WebCore::SimpleFontData::platformInit): Ditto. * platform/graphics/win/SimpleFontDataCairoWin.cpp: (WebCore::SimpleFontData::platformInit): Ditto. * platform/graphics/win/SimpleFontDataWin.cpp: (WebCore::SimpleFontData::initGDIFont): Ditto. * rendering/InlineTextBox.cpp: (WebCore::InlineTextBox::paintDecoration): Use FontMetrics data. * style/InlineTextBoxStyle.cpp: (WebCore::computeUnderlineOffset): Ditto. (WebCore::visualOverflowForDecorations): Ditto. * style/InlineTextBoxStyle.h: (WebCore::textDecorationStrokeThickness): Deleted. * svg/SVGFontData.cpp: (WebCore::SVGFontData::initializeFontData): Initialize new FontMetrics members. 2014-11-17 David Hyatt Improve Ruby selection (getting rid of overlap and improving gap filling) https://bugs.webkit.org/show_bug.cgi?id=138250 Reviewed by Dean Jackson. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::selectionGaps): (WebCore::RenderBlock::blockSelectionGaps): Add Ruby text in along with the Ruby base. * rendering/RenderBlockFlow.cpp: (WebCore::RenderBlockFlow::inlineSelectionGaps): Don't let block gaps get filled in here. * rendering/RenderRubyBase.h: Expose accessor to the ruby run. * rendering/RenderRubyText.cpp: (WebCore::RenderRubyText::rubyRun): * rendering/RenderRubyText.h: Add accessor to the ruby run. * rendering/RootInlineBox.cpp: (WebCore::RootInlineBox::selectionTop): (WebCore::RootInlineBox::selectionBottom): Improve selectionTop and selectionBottom of ruby bases to avoid the ruby text. Improve the selectionTop and selectionBottom of ruby texts to fill the gap up to the previous/next line as appropriate. 2014-11-18 Shivakumar JM crypto: Use sequence<> instead of KeyUsage[] in IDL. https://bugs.webkit.org/show_bug.cgi?id=138823 Reviewed by Darin Adler. Use sequence instead of KeyUsage[] in crypto IDL as per spec: https://dvcs.w3.org/hg/webcrypto-api/raw-file/tip/spec/ Overview.html#SubtleCrypto-method-generateKey No new tests, no behavior change. * crypto/SubtleCrypto.idl: 2014-11-18 Philippe Normand HRTFDatabaseLoader is not an absolute condition to run audioContext https://bugs.webkit.org/show_bug.cgi?id=138829 Reviewed by Jer Noble. This patch is a port of the following Blink revision by : * Modules/webaudio/AudioContext.cpp: (WebCore::AudioContext::AudioContext): (WebCore::AudioContext::isRunnable): Deleted. * Modules/webaudio/AudioContext.h: (WebCore::AudioContext::hrtfDatabaseLoader): Deleted. * Modules/webaudio/AudioDestinationNode.cpp: (WebCore::AudioDestinationNode::render): * Modules/webaudio/OfflineAudioDestinationNode.cpp: (WebCore::OfflineAudioDestinationNode::offlineRender): * Modules/webaudio/PannerNode.cpp: (WebCore::PannerNode::PannerNode): (WebCore::PannerNode::process): (WebCore::PannerNode::initialize): (WebCore::PannerNode::setPanningModel): * Modules/webaudio/PannerNode.h: * Modules/webaudio/RealtimeAnalyser.cpp: * Modules/webaudio/RealtimeAnalyser.h: * platform/audio/HRTFDatabaseLoader.cpp: (WebCore::HRTFDatabaseLoader::createAndLoadAsynchronouslyIfNecessary): 2014-11-18 Commit Queue Unreviewed, rolling out r176218. https://bugs.webkit.org/show_bug.cgi?id=138827 seems to have caused regressions on the perf bots (Requested by lajava on #webkit). Reverted changeset: "[CSS Grid Layout] Upgrade align-self and align-items parsing to CSS 3" https://bugs.webkit.org/show_bug.cgi?id=133359 http://trac.webkit.org/changeset/176218 2014-11-18 Joanmarie Diggs AX: [ATK] Crash getting the orientation of a MenuListOption after the MenuList was removed from the document https://bugs.webkit.org/show_bug.cgi?id=138727 Reviewed by Chris Fleizach. AccessibilityMenuListOption::elementRect() returns the value of the grandparent MenuList, asserting that the grandparent exists with that role. But it is possible to have an existing MenuListOption and remove the element which had been backing that MenuList from the document. Adding null checks prior to the assertions prevents our crashing if the parent or grandparent was removed. Test: platform/gtk/accessibility/combobox-descendants-orientation-crash.html * accessibility/AccessibilityMenuListOption.cpp: (WebCore::AccessibilityMenuListOption::elementRect): 2014-11-17 Benjamin Poulain Fix a small indentation mistake in SelectorCodeGenerator::generateNthFilterTest * cssjit/SelectorCompiler.cpp: (WebCore::SelectorCompiler::SelectorCodeGenerator::generateNthFilterTest): 2014-11-17 Benjamin Poulain Fix two bad function names of HTMLFormControlElement https://bugs.webkit.org/show_bug.cgi?id=138790 Reviewed by Andreas Kling. Darin suggested some name improvements in https://bugs.webkit.org/show_bug.cgi?id=138769 * dom/CheckedRadioButtons.cpp: (WebCore::RadioButtonGroup::add): (WebCore::RadioButtonGroup::updateCheckedState): (WebCore::RadioButtonGroup::requiredAttributeChanged): (WebCore::RadioButtonGroup::remove): (WebCore::RadioButtonGroup::updateValidityForAllButtons): (WebCore::RadioButtonGroup::setNeedsValidityCheckForAllButtons): Deleted. * html/FileInputType.cpp: (WebCore::FileInputType::setFiles): * html/HTMLButtonElement.cpp: (WebCore::HTMLButtonElement::computeWillValidate): (WebCore::HTMLButtonElement::recalcWillValidate): Deleted. * html/HTMLButtonElement.h: * html/HTMLFieldSetElement.h: * html/HTMLFormControlElement.cpp: (WebCore::HTMLFormControlElement::requiredAttributeChanged): (WebCore::HTMLFormControlElement::computeWillValidate): (WebCore::HTMLFormControlElement::willValidate): (WebCore::HTMLFormControlElement::setNeedsWillValidateCheck): (WebCore::HTMLFormControlElement::isValidFormControlElement): (WebCore::HTMLFormControlElement::updateValidity): (WebCore::HTMLFormControlElement::setCustomValidity): (WebCore::HTMLFormControlElement::recalcWillValidate): Deleted. (WebCore::HTMLFormControlElement::setNeedsValidityCheck): Deleted. * html/HTMLFormControlElement.h: * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::runPostTypeUpdateTasks): (WebCore::HTMLInputElement::parseAttribute): (WebCore::HTMLInputElement::setChecked): (WebCore::HTMLInputElement::setValueInternal): (WebCore::HTMLInputElement::setValueFromRenderer): (WebCore::HTMLInputElement::computeWillValidate): (WebCore::HTMLInputElement::parseMaxLengthAttribute): (WebCore::HTMLInputElement::recalcWillValidate): Deleted. * html/HTMLInputElement.h: * html/HTMLKeygenElement.h: * html/HTMLOutputElement.h: * html/HTMLSelectElement.cpp: (WebCore::HTMLSelectElement::deselectItems): (WebCore::HTMLSelectElement::optionSelectedByUser): (WebCore::HTMLSelectElement::listBoxSelectItem): (WebCore::HTMLSelectElement::add): (WebCore::HTMLSelectElement::parseAttribute): (WebCore::HTMLSelectElement::childrenChanged): (WebCore::HTMLSelectElement::optionElementChildrenChanged): (WebCore::HTMLSelectElement::setLength): (WebCore::HTMLSelectElement::selectAll): (WebCore::HTMLSelectElement::updateListBoxSelection): (WebCore::HTMLSelectElement::selectOption): (WebCore::HTMLSelectElement::restoreFormControlState): (WebCore::HTMLSelectElement::parseMultipleAttribute): (WebCore::HTMLSelectElement::reset): * html/HTMLTextAreaElement.cpp: (WebCore::HTMLTextAreaElement::parseAttribute): (WebCore::HTMLTextAreaElement::subtreeHasChanged): (WebCore::HTMLTextAreaElement::setValue): (WebCore::HTMLTextAreaElement::setNonDirtyValue): 2014-11-17 Sukolsak Sakshuwong Add parsing for :role() https://bugs.webkit.org/show_bug.cgi?id=138310 Reviewed by Benjamin Poulain. Add support for parsing :role() pseudo class. The implementation of selector matching will be in a follow-up patch. * css/CSSGrammar.y.in: * css/CSSParser.cpp: (WebCore::CSSParser::detectFunctionTypeToken): * css/CSSSelector.cpp: (WebCore::appendPseudoClassFunctionTail): (WebCore::CSSSelector::selectorText): * css/CSSSelector.h: * css/SelectorChecker.cpp: (WebCore::SelectorChecker::checkOne): * css/SelectorPseudoClassAndCompatibilityElementMap.in: * cssjit/SelectorCompiler.cpp: (WebCore::SelectorCompiler::addPseudoClassType): 2014-11-17 Simon Fraser [iOS WK1] Sometimes, missing tiles in -webkit-overflow-scrolling: touch in UIWebViews https://bugs.webkit.org/show_bug.cgi?id=138815 rdar://problem/18746203 Reviewed by Tim Horton. The scroll-velocity-related data members on FrameView, added in r168233, were uninitialized in UIWebViews, so FrameView::computeCoverageRect() could return garbage results, leading to too much or too little tile coverage. We still add additional coverage from the new inclusion of a margin area, but, for simplicity, leave that the same between WK1 and WK2 for now. * page/FrameView.cpp: (WebCore::FrameView::FrameView): 2014-11-17 Chris Dumez Add initial layout testing coverage for timer throttling https://bugs.webkit.org/show_bug.cgi?id=138809 Reviewed by Simon Fraser. Add isTimerThrottled() API to Internals so that we can add layout test coverage for timer throttling. Tests: fast/dom/nested-timer-invisible-element-throttling.html fast/dom/nested-timer-visible-element-throttling.html fast/dom/repeating-timer-invisible-element-throttling.html fast/dom/repeating-timer-visible-element-throttling.html * page/DOMTimer.h: * testing/Internals.cpp: (WebCore::Internals::isTimerThrottled): * testing/Internals.h: * testing/Internals.idl: 2014-11-17 Zalan Bujtas Simple line layout: Rename FlowContentIterator and move implementation to SimpleLineLayoutFlowContents.cpp https://bugs.webkit.org/show_bug.cgi?id=138799 Reviewed by Antti Koivisto. This is in preparation to support multiple renderers. The FlowContents class will be used not just when we create runs, but also when we resolve them at painting time. No change in functionality. * CMakeLists.txt: * WebCore.vcxproj/WebCore.vcxproj: * WebCore.vcxproj/WebCore.vcxproj.filters: * WebCore.xcodeproj/project.pbxproj: * rendering/SimpleLineLayout.cpp: (WebCore::SimpleLineLayout::removeTrailingWhitespace): (WebCore::SimpleLineLayout::initializeNewLine): (WebCore::SimpleLineLayout::splitFragmentToFitLine): (WebCore::SimpleLineLayout::nextFragment): (WebCore::SimpleLineLayout::createLineRuns): (WebCore::SimpleLineLayout::closeLineEndingAndAdjustRuns): (WebCore::SimpleLineLayout::createTextRuns): (WebCore::SimpleLineLayout::FlowContentIterator::FlowContentIterator): Deleted. (WebCore::SimpleLineLayout::FlowContentIterator::findNextBreakablePosition): Deleted. (WebCore::SimpleLineLayout::FlowContentIterator::findNextNonWhitespacePosition): Deleted. (WebCore::SimpleLineLayout::FlowContentIterator::textWidth): Deleted. (WebCore::SimpleLineLayout::FlowContentIterator::isNewlineCharacter): Deleted. (WebCore::SimpleLineLayout::FlowContentIterator::isEndOfContent): Deleted. (WebCore::SimpleLineLayout::FlowContentIterator::style): Deleted. (WebCore::SimpleLineLayout::computeLineLeft): Deleted. * rendering/SimpleLineLayoutFlowContents.cpp: Added. (WebCore::SimpleLineLayout::FlowContents::FlowContents): (WebCore::SimpleLineLayout::FlowContents::findNextBreakablePosition): (WebCore::SimpleLineLayout::FlowContents::findNextNonWhitespacePosition): (WebCore::SimpleLineLayout::FlowContents::textWidth): * rendering/SimpleLineLayoutFlowContents.h: Added. (WebCore::SimpleLineLayout::FlowContents::Style::Style): (WebCore::SimpleLineLayout::FlowContents::style): (WebCore::SimpleLineLayout::FlowContents::isNewlineCharacter): (WebCore::SimpleLineLayout::FlowContents::isEndOfContent): 2014-11-17 Daniel Bates Unreviewed, rolling out r176232. Broke the Mac build. Will investigate offline. Reverted changeset: "[iOS] Libdispatch, Dyld, IOKit, Mach, NSPointerFunctions, MobileGestalt" https://bugs.webkit.org/show_bug.cgi?id=138802 http://trac.webkit.org/changeset/176232 2014-11-17 Daniel Bates [iOS] Libdispatch, Dyld, IOKit, Mach, NSPointerFunctions, MobileGestalt SPI are not available in public SDK https://bugs.webkit.org/show_bug.cgi?id=138802 Reviewed by David Kilzer. Add SPI wrapper headers {Dispatch, DynamicLinker, IOPMLib, MachVM, NSPointerFunctions, MobileGestalt}SPI.h that forward declare applicable libdispatch, dyld, IOKit, mach, Foundation, MobileGestalt SPI and use these headers instead of the including private headers corresponding to these libraries/frameworks. * WebCore.xcodeproj/project.pbxproj: Add private headers MobileGestaltSPI.h and MachVMSPI.h, and project headers DynamicLinkerSPI.h, NSPointerFunctionsSPI.h, DispatchSPI.h and IOPMLibSPI.h. Also, sort files in Xcode project. * bindings/objc/DOMInternal.mm: Include header NSPointerFunctionsSPI.h. * bridge/objc/objc_instance.mm: Ditto; Also, sort #import directives. * platform/cocoa/DisplaySleepDisablerCocoa.cpp: Substitute header IOPMLibSPI.h for private header IOKit/pwr_mgt/IOPMLib.h. * platform/cocoa/MemoryPressureHandlerCocoa.mm: Substitute header DispatchSPI.h for private header dispatch/private.h. * platform/graphics/ios/FontServicesIOS.mm: Substitute header DynamicLinkerSPI.h for private header mach-o/dyld_priv.h. * platform/ios/PlatformScreenIOS.mm: Substitute header MobileGestaltSPI.h for private header MobileGestalt.h. * platform/spi/cocoa/DispatchSPI.h: Added. * platform/spi/cocoa/DynamicLinkerSPI.h: Added. * platform/spi/cocoa/IOPMLibSPI.h: Added. * platform/spi/cocoa/MachVMSPI.h: Added. * platform/spi/cocoa/NSPointerFunctionsSPI.h: Added. * platform/spi/ios/MobileGestaltSPI.h: Added. 2014-11-17 Daniel Bates [iOS] CoreText and CoreUI SPI are not available in public SDK https://bugs.webkit.org/show_bug.cgi?id=138760 Reviewed by David Kilzer. Add a SPI wrapper header CoreUISPI.h that forward declares CoreUI SPI and use this header instead of including private headers of CoreUI directly. Additionally, add more forward declarations for CoreText SPI. * WebCore.xcodeproj/project.pbxproj: Add project header CoreUISPI.h. * platform/graphics/ios/FontCacheIOS.mm: Include header CoreTextSPI.h instead of including CoreText headers directly. * platform/graphics/mac/FontMac.mm: Include header CoreUISPI.h instead of including CoreUI headers directly. * platform/graphics/mac/GlyphPageTreeNodeMac.cpp: Remove unnecessary include of CoreText headers. These headers will be included by header CoreTextSPI.h (at the top of the file). * platform/graphics/mac/SimpleFontDataMac.mm: Remove forward declaration of CTFontDescriptorIsSystemUIFont() and include of header CTFontDescriptorPriv.h as this duplicates the logic in CoreTextSPI.h, which is included in this file. * platform/spi/cocoa/CoreTextSPI.h: Added more forward declarations. Simplified #include directives. * platform/spi/ios/CoreUISPI.h: Added. * rendering/RenderThemeIOS.mm: Move CoreUI externs from this file to file CoreUISPI.h and include header CoreUISPI.h. 2014-11-17 Zalan Bujtas Simple line layout: Drop 16bit support temporarily. https://bugs.webkit.org/show_bug.cgi?id=138796 Reviewed by Antti Koivisto. This is in preparation to multiple renderers support. It requires code refactoring on top of the coming multiple renderers codebase. (Not expecting any significant coverage shrinking.) * rendering/SimpleLineLayout.cpp: (WebCore::SimpleLineLayout::canUseFor): (WebCore::SimpleLineLayout::FlowContentIterator::findNextBreakablePosition): (WebCore::SimpleLineLayout::FlowContentIterator::findNextNonWhitespacePosition): (WebCore::SimpleLineLayout::FlowContentIterator::textWidth): (WebCore::SimpleLineLayout::removeTrailingWhitespace): (WebCore::SimpleLineLayout::initializeNewLine): (WebCore::SimpleLineLayout::splitFragmentToFitLine): (WebCore::SimpleLineLayout::nextFragment): (WebCore::SimpleLineLayout::createLineRuns): (WebCore::SimpleLineLayout::closeLineEndingAndAdjustRuns): (WebCore::SimpleLineLayout::createTextRuns): (WebCore::SimpleLineLayout::create): 2014-11-17 Tim Horton DataDetectors PageOverlay callbacks can come in to the wrong overlay https://bugs.webkit.org/show_bug.cgi?id=138801 Reviewed by Anders Carlsson. * page/PageOverlay.cpp: (WebCore::generatePageOverlayID): (WebCore::PageOverlay::PageOverlay): * page/PageOverlay.h: Give each PageOverlay a unique ID. 2014-11-17 Javier Fernandez [CSS Grid Layout] Upgrade align-self and align-items parsing to CSS 3 https://bugs.webkit.org/show_bug.cgi?id=133359 Reviewed by David Hyatt. Broaden justify-self's parsing name as a preparation of migrating align-self, align-items and justify-items to the CSS 3 Alignment syntax. The current naming was too tied to justify-self and needs to be broadened. This will reduce the follow-up implementations' patches. Upgrade align-self and align-items parsing to CSS 3 This change migrates the 2 properties to the CSS 3 Alignment parsing. The new parsing is identical to how we parse 'justify-self'. The 2 properties need to be migrated together as they are used in tandem in CSSComputedStyleDeclaration. This change also removes EAlignItems as it is now unused. Tests: css3/parse-align-items.html css3/parse-align-self.html * css/CSSComputedStyleDeclaration.cpp: (WebCore::valueForItemPositionWithOverflowAlignment): Added. Builds the CSSValue for the for the alignment properties. (WebCore::ComputedStyleExtractor::propertyValue): * css/CSSParser.cpp: (WebCore::isKeywordPropertyID): Removed align-items and align-self from the list. (WebCore::isValidKeywordPropertyAndValue): Removed align-items and align-self from the list. (WebCore::CSSParser::parseValue): Added align-items and align-self to the list and call to the generic parsing fuction for the alignment properties. (WebCore::isBaselinePositionKeyword): Utility function added to identify Baseline keyword values. (WebCore::CSSParser::parseItemPositionOverflowPosition): Generic parsing fuction for the alignment properties. (WebCore::CSSParser::parseJustifySelf): Deleted. * css/CSSParser.h: * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Refactoring some mapping functions. (WebCore::CSSPrimitiveValue::operator ItemPosition): Added. Replace the old EAlignItems enumeration. (WebCore::CSSPrimitiveValue::operator OverflowAlignment): Added. (WebCore::CSSPrimitiveValue::operator EAlignItems): Deleted. (WebCore::CSSPrimitiveValue::operator EJustifySelf): Deleted. (WebCore::CSSPrimitiveValue::operator EJustifySelfOverflowAlignment): Deleted. * css/CSSPropertyNames.in: * css/CSSValueKeywords.in: * css/StyleResolver.cpp: (WebCore::StyleResolver::adjustRenderStyle): Added a new adjustment to resolve the "auto" vale on the alignment properties. (WebCore::StyleResolver::adjustStyleForAlignment): Added. Function to resolve the "auto" vale on the alignment properties. (WebCore::StyleResolver::applyProperty): (WebCore::isDisplayFlexibleBox): Deleted. Moved to the RenderStyle. (WebCore::isDisplayGridBox): Deleted. Moved to the RenderStyle. (WebCore::isDisplayFlexibleOrGridBox): Deleted. Moved to the RenderStyle. * css/StyleResolver.h: * rendering/RenderBox.cpp: (WebCore::flexItemHasStretchAlignment): Adapted to the new ItemPosition enum. * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::firstLineBaseline): Adapted to the new ItemPosition enum. (WebCore::resolveAlignment): Consider also that align-items could be "auto", since it's the default now. (WebCore::RenderFlexibleBox::styleDidChange): Adapted to the new ItemPosition enum. (WebCore::RenderFlexibleBox::alignmentForChild): Adapted to the new ItemPosition enum. (WebCore::RenderFlexibleBox::needToStretchChild): Adapted to the new ItemPosition enum. (WebCore::RenderFlexibleBox::layoutAndPlaceChildren): Adapted to the new ItemPosition enum. (WebCore::RenderFlexibleBox::alignChildren): Adapted to the new ItemPosition enum. * rendering/RenderFlexibleBox.h: * rendering/RenderFullScreen.cpp: (WebCore::createFullScreenStyle): Adapted to the new ItemPosition enum. * rendering/RenderMenuList.cpp: (WebCore::RenderMenuList::adjustInnerStyle): Adapted to the new ItemPosition enum. * rendering/mathml/RenderMathMLRoot.cpp: (WebCore::RenderMathMLRoot::updateStyle): Adapted to the new ItemPosition enum. * rendering/mathml/RenderMathMLScripts.cpp: (WebCore::RenderMathMLScripts::fixAnonymousStyleForSubSupPair): Adapted to the new ItemPosition enum. (WebCore::RenderMathMLScripts::fixAnonymousStyles): Adapted to the new ItemPosition enum. * rendering/style/RenderStyle.h: Adapted to the new ItemPosition enum. * rendering/style/RenderStyleConstants.h: Adapted to the new ItemPosition enum. * rendering/style/StyleRareNonInheritedData.cpp: Adapted to the new ItemPosition enum. (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData): Adapted to the new ItemPosition enum. (WebCore::StyleRareNonInheritedData::operator==): Adapted to the new ItemPosition enum. * rendering/style/StyleRareNonInheritedData.h: Adapted to the new ItemPosition enum. * style/StyleResolveTree.cpp: (WebCore::Style::determineChange): Changes in the alignItems property will cause a Detach. 2014-11-17 Shivakumar JM Attribute text in HTMLAnchorElement should behave as per specification. https://bugs.webkit.org/show_bug.cgi?id=138557 Reviewed by Darin Adler. attribute text in HTMLAnchorElement should not be readonly as per specification http://www.w3.org/TR/html/text-level-semantics.html#dom-a-text. It should behave as textContent attribute. Also This matches the behavior of Chrome 38 and FireFox. Test: fast/dom/HTMLAnchorElement/anchor-text-attribute.html * html/HTMLAnchorElement.cpp: (WebCore::HTMLAnchorElement::text): (WebCore::HTMLAnchorElement::setText): * html/HTMLAnchorElement.h: * html/HTMLAnchorElement.idl: 2014-11-17 Chris Dumez Throttle timers that change the style of elements outside the viewport https://bugs.webkit.org/show_bug.cgi?id=138292 Reviewed by Antti Koivisto. Throttle timers that change the style of elements outside the viewport to 1 second, similarly to what was already done for timers interacting with non user observable plugins. To be conservative, we don't throttle timers that also cause DOM Tree modifications (e.g. adding/removing nodes, modify element attributes). On huffingtonpost.com, the CPU usage is at ~17% when the top scrolling banner is inside the viewport on my machine. Without this patch, CPU usage would stay ~17% when the banner is outside the viewport. Thanks to timer throttling, CPU usage now goes down to ~1.5%, without user observable side effects. The timers get unthrottled when they are inside the viewport again (i.e. due to scrolling or layout). On espn.com, the CPU usage goes down from ~7% at the top of the page to ~1% when scrolling to the bottom of the page. On ebay.com, CPU usage goes down from ~25% at the top of the page to less than 1% when scrolling to the bottom of the page. 2014-11-17 peavo@outlook.com [WinCairo] Compile error, CoreGraphics header file included. https://bugs.webkit.org/show_bug.cgi?id=138795 Reviewed by Brent Fulgham. CoreGraphics is not available on WinCairo. * platform/graphics/win/FontCacheWin.cpp: 2014-11-17 Commit Queue Unreviewed, rolling out r176169. https://bugs.webkit.org/show_bug.cgi?id=138797 Appears to have broken svg/custom/anchor-on-use.svg (Requested by ap on #webkit). Reverted changeset: "Attribute text in HTMLAnchorElement should behave as per specification." https://bugs.webkit.org/show_bug.cgi?id=138557 http://trac.webkit.org/changeset/176169 2014-11-17 Daniel Bates [iOS] AVKit and MediaPlayer SPI are not available in public SDK https://bugs.webkit.org/show_bug.cgi?id=138756 Reviewed by Eric Carlson. Add a SPI wrapper headers {AVKit, MPAVRoutingController}SPI.h that forward declares AVKit and MPAVRoutingController SPI, respectively, and use these header instead of including private headers of AVKit and MediaPlayer directly. * WebCore.xcodeproj/project.pbxproj: Add project and private header AVKitSPI.h and MPAVRoutingControllerSPI.h, respectively. * platform/audio/ios/MediaSessionManagerIOS.mm: Include header MPAVRoutingControllerSPI.h instead of including the private header MPAVRoutingController.h. * platform/ios/WebVideoFullscreenInterfaceAVKit.mm: Include header AVKitSPI.h instead of including AVKit headers directly. 2014-11-17 Daniel Bates Attempt to fix the Mac build after (https://bugs.webkit.org/show_bug.cgi?id=138751) Move declaration of CAContext to be before the declaration of CALayer since the latter depends on the former. * platform/spi/cocoa/QuartzCoreSPI.h: 2014-11-17 Daniel Bates [iOS] QuartzCore SPI not available in public SDK https://bugs.webkit.org/show_bug.cgi?id=138751 Reviewed by David Kilzer. Add a SPI wrapper header called QuartzCoreSPI.h that forward declares QuartzCore SPI and use this header instead of including private headers of QuartzCore directly. * WebCore.xcodeproj/project.pbxproj: Added private header QuartzCoreSPI.h. * platform/graphics/ca/mac/PlatformCAFiltersMac.h: Removed; incorporated its functionality into QuartzCoreSPI.h. * platform/graphics/ca/mac/PlatformCAFiltersMac.mm: Substitute header QuartzCoreSPI.h for PlatformCAFiltersMac.h as the content of the latter was incorporated into the former. * platform/graphics/ca/mac/PlatformCALayerMac.mm: Move CALayer and CATiledLayer forward declarations from this file to file QuartzCoreSPI.h and include header QuartzCoreSPI.h instead of including CATiledLayerPrivate.h directly. Also remove header PlatformCAFiltersMac.h as its content is incorporated into QuartzCoreSPI.h * platform/ios/LegacyTileCache.mm: Include headers CoreGraphicsSPI.h and QuartzCoreSPI.h instead of including QuartzCore headers directly. * platform/ios/LegacyTileGrid.mm: Include header QuartzCoreSPI.h instead of including QuartzCore headers directly. Also sort the list of #include directives. * platform/ios/LegacyTileGridTile.mm: Include header QuartzCoreSPI.h instead of including QuartzCore headers directly. * platform/spi/cocoa/QuartzCoreSPI.h: Added. 2014-11-17 Chris Dumez Move more CSS properties to the new StyleBuilder https://bugs.webkit.org/show_bug.cgi?id=138766 Reviewed by Darin Adler. Move more CSS properties from DeprecatedStyleBuilder to the new StyleBuilder: line-height word-spacing -webkit-marquee-repetition -webkit-text-underline-position No new tests, no behavior change. * css/CSSPropertyNames.in: * css/DeprecatedStyleBuilder.cpp: (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder): (WebCore::csstoLengthConversionDataWithTextZoomFactor): Deleted. (WebCore::ApplyPropertyMarqueeRepetition::applyValue): Deleted. (WebCore::ApplyPropertyMarqueeRepetition::createHandler): Deleted. (WebCore::ApplyPropertyTextUnderlinePosition::applyValue): Deleted. (WebCore::ApplyPropertyTextUnderlinePosition::createHandler): Deleted. (WebCore::ApplyPropertyLineHeight::applyValue): Deleted. (WebCore::ApplyPropertyLineHeight::createHandler): Deleted. (WebCore::ApplyPropertyLineHeightForIOSTextAutosizing::applyValue): Deleted. (WebCore::ApplyPropertyLineHeightForIOSTextAutosizing::applyInitialValue): Deleted. (WebCore::ApplyPropertyLineHeightForIOSTextAutosizing::applyInheritValue): Deleted. (WebCore::ApplyPropertyLineHeightForIOSTextAutosizing::createHandler): Deleted. (WebCore::ApplyPropertyWordSpacing::applyValue): Deleted. (WebCore::ApplyPropertyWordSpacing::createHandler): Deleted. * css/StyleBuilderConverter.h: (WebCore::StyleBuilderConverter::convertMarqueeRepetition): (WebCore::StyleBuilderConverter::convertTextUnderlinePosition): * css/StyleBuilderCustom.h: (WebCore::StyleBuilderFunctions::csstoLengthConversionDataWithTextZoomFactor): (WebCore::StyleBuilderFunctions::convertLineHeight): (WebCore::StyleBuilderFunctions::applyValueWordSpacing): (WebCore::StyleBuilderFunctions::applyInheritLineHeight): (WebCore::StyleBuilderFunctions::applyInitialLineHeight): (WebCore::StyleBuilderFunctions::applyValueLineHeight): 2014-11-16 Andreas Kling Avoid synchronous style recalc when mutating a Node inside FrameSelection. Reviewed by Antti Koivisto. We can safely clear the RenderView's selection without doing a synchronous style recalc first. This is a small progression on Speedometer locally. * editing/FrameSelection.cpp: (WebCore::DragCaretController::nodeWillBeRemoved): (WebCore::FrameSelection::respondToNodeModification): (WebCore::clearRenderViewSelection): Deleted. Merged clearRenderViewSelection() into the call sites and removed the now-unnecessary protection of the Document. 2014-11-17 Eric Carlson [iOS] allow host application to opt-out of alternate fullscreen https://bugs.webkit.org/show_bug.cgi?id=138787 Reviewed by Darin Adler. * Modules/mediacontrols/MediaControlsHost.cpp: (WebCore::MediaControlsHost::optimizedFullscreenSupported): Check mediaSession().allowsAlternateFullscreen. * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::enterFullscreenOptimized): Do nothing if mediaSession().allowsAlternateFullscreen says it isn't allowed. * html/HTMLMediaSession.cpp: (WebCore::HTMLMediaSession::allowsAlternateFullscreen): New, check settings. * html/HTMLMediaSession.h: * page/Settings.cpp: Add allowsAlternateFullscreen. * page/Settings.in: Ditto. 2014-11-16 Zan Dobersek Replace RenderSVGResource::cast() with downcast() https://bugs.webkit.org/show_bug.cgi?id=138290 Reviewed by Chris Dumez. Add type traits for the RenderSVGResource hierarchy. This enables using the typecasting framework in getRenderSVGResourceById() that in return renders the RenderSVGResource::cast<>() template and all the static s_resourceType member variables in the hierarchy removable. * WebCore.order: * rendering/svg/RenderSVGResource.h: (WebCore::RenderSVGResource::cast): Deleted. * rendering/svg/RenderSVGResourceClipper.h: * rendering/svg/RenderSVGResourceContainer.h: (WebCore::getRenderSVGResourceById): * rendering/svg/RenderSVGResourceFilter.h: (isType): * rendering/svg/RenderSVGResourceLinearGradient.h: * rendering/svg/RenderSVGResourceMarker.h: * rendering/svg/RenderSVGResourceMasker.h: * rendering/svg/RenderSVGResourcePattern.h: * rendering/svg/RenderSVGResourceRadialGradient.h: * rendering/svg/RenderSVGResourceSolidColor.h: 2014-11-16 Benjamin Poulain Implement :valid and :invalid matching for the fieldset element https://bugs.webkit.org/show_bug.cgi?id=138769 Reviewed by Darin Adler. In the latest HTML spec, the pseudo classes :valid and :invalid match a fieldset element based on its descendants: https://html.spec.whatwg.org/#selector-valid https://html.spec.whatwg.org/#selector-invalid This patch adds that behavior. There are two key problems to solve with these pseudo classes on fieldset: -Efficient matching. -Style invalidation when any of the descendant changes. To implement the style invalidation, I have modified HTMLFormControlElement to notify its ancestor when its state changes. The first change is making the state fully internal to HTMLFormControlElement, we do not want subclass to be able to change the behavior and forget to update the ancestors. To achieve that encapsulation, the interface was changed a bit: -Neither willValidate() nor isValidFormControlElement() inherit from Element. Instead, willValidate() is the implementation of FormAssociatedElement's interface and it is final. The method isValidFormControlElement() becomes completely internal to HTMLFormControlElement. -Since willValidate() should no longer be re-implemented by subclass, the elements that were depending on it have been migrated to recalcWillValidate() to set the initial state as needed. With the validity state fully encapsulated in HTMLFormControlElement, all I need is a way to communicate that information to HTMLFieldSetElement ancestors. This is done in two cases: -The validity state changes. -The tree changes in a way that would make the input element not a descendant of a HTMLFieldSetElement. The invalidation is simply done by walking up the ancestors and adding the current element to a "validity dependency list" on each HTMLFieldSetElement. Tests: fast/css/pseudo-invalid-fieldset-invalidation-optimization.html fast/css/pseudo-invalid-fieldset-style-sharing.html fast/css/pseudo-invalid-fieldset.html fast/css/pseudo-valid-fieldset-invalidation-optimization.html fast/css/pseudo-valid-fieldset-style-sharing.html fast/css/pseudo-valid-fieldset.html fast/selectors/invalid-fieldset-style-update-1.html fast/selectors/invalid-fieldset-style-update-2.html fast/selectors/invalid-fieldset-style-update-3.html fast/selectors/invalid-fieldset-style-update-4.html fast/selectors/invalid-fieldset-style-update-5.html fast/selectors/valid-fieldset-style-update-1.html fast/selectors/valid-fieldset-style-update-2.html fast/selectors/valid-fieldset-style-update-3.html fast/selectors/valid-fieldset-style-update-4.html fast/selectors/valid-fieldset-style-update-5.html * css/SelectorCheckerTestFunctions.h: (WebCore::isInRange): (WebCore::isOutOfRange): (WebCore::isInvalid): (WebCore::isValid): The hack "ContainsValidityStyleRules" is in the way of correct styling of FieldSet and Form. It is not the right way to get stylesheet properties anyway. * css/StyleResolver.cpp: (WebCore::StyleResolver::canShareStyleWithControl): Make sure style sharing does not incorrectly share style for fieldset elements. * dom/Document.cpp: (WebCore::Document::Document): * dom/Document.h: (WebCore::Document::containsValidityStyleRules): Deleted. (WebCore::Document::setContainsValidityStyleRules): Deleted. * dom/Element.h: (WebCore::Element::matchesValidPseudoClass): (WebCore::Element::matchesInvalidPseudoClass): (WebCore::Element::willValidate): Deleted. (WebCore::Element::isValidFormControlElement): Deleted. * html/FormAssociatedElement.cpp: (WebCore::FormAssociatedElement::customError): * html/FormAssociatedElement.h: * html/HTMLFieldSetElement.cpp: (WebCore::HTMLFieldSetElement::matchesValidPseudoClass): (WebCore::HTMLFieldSetElement::matchesInvalidPseudoClass): (WebCore::HTMLFieldSetElement::addInvalidDescendant): (WebCore::HTMLFieldSetElement::removeInvalidDescendant): Each HTMLFormControlElement that has constraint validation adds or removes itself from its HTMLFieldSetElement ancestors. It should be possible to just keep track of a count instead of a HashSet. I decided to got with the HashSet to make the code more robust and easier to debug. A few assertions ensure that the HashSet is actually used as a counter. * html/HTMLFieldSetElement.h: * html/HTMLFormControlElement.cpp: (WebCore::addInvalidElementToAncestorFromInsertionPoint): (WebCore::removeInvalidElementToAncestorFromInsertionPoint): (WebCore::HTMLFormControlElement::insertedInto): (WebCore::HTMLFormControlElement::removedFrom): One tricky part of those two functions is that we cannot use matchesValidPseudoClass() or matchesInvalidPseudoClass(). The reason is that HTMLFieldSetElement is a subclass of HTMLFormControlElement and it has its own definition of what Valid and Invalid mean when matching selectors. In HTMLFormControlElement, we must use the internal state, willValidate() and isValidFormControlElement() must be used directly. (WebCore::HTMLFormControlElement::matchesValidPseudoClass): (WebCore::HTMLFormControlElement::matchesInvalidPseudoClass): (WebCore::HTMLFormControlElement::willValidate): (WebCore::addInvalidElementToAncestors): (WebCore::removeInvalidElementFromAncestors): (WebCore::HTMLFormControlElement::setNeedsWillValidateCheck): (WebCore::HTMLFormControlElement::setNeedsValidityCheck): (WebCore::HTMLFormControlElement::isValidFormControlElement): Deleted. * html/HTMLFormControlElement.h: (WebCore::HTMLFormControlElement::isValidFormControlElement): * html/HTMLKeygenElement.h: * html/HTMLObjectElement.h: * html/HTMLOutputElement.h: 2014-11-16 Zan Dobersek [TexMap] Add typecasting support for GraphicsLayerTextureMapper https://bugs.webkit.org/show_bug.cgi?id=138741 Reviewed by Martin Robinson. Add type traits for the GraphicsLayerTextureMapper class. This enables using typecasting functions instead of toGraphicsLayerTextureMapper(). Remove toTextureMapperLayer() casting function which actually returned the TextureMapperLayer object that belonged to the passed-in GraphicsLayerTextureMapper. Instead, the GraphicsLayer object is now downcasted and the TextureMapperLayer is accessed by calling the GraphicsLayerTextureMapper::layer() method. * platform/graphics/GraphicsLayer.h: (WebCore::GraphicsLayer::isGraphicsLayerTextureMapper): * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp: (WebCore::toTextureMapperLayerVector): (WebCore::GraphicsLayerTextureMapper::commitLayerChanges): (WebCore::toTextureMapperLayer): Deleted. * platform/graphics/texmap/GraphicsLayerTextureMapper.h: (WebCore::toGraphicsLayerTextureMapper): Deleted. 2014-11-16 Gyuyoung Kim Move WebCore/loader to std::unique_ptr https://bugs.webkit.org/show_bug.cgi?id=138646 Reviewed by Chris Dumez. Replace OwnPtr with std::unique_ptr<> and std::make_unique<>. However this patch leaves ResourceRequest::adopt() because this need to be handled by different patch. No new tests, no behavior changes. * loader/DocumentThreadableLoader.cpp: (WebCore::DocumentThreadableLoader::makeCrossOriginAccessRequest): (WebCore::DocumentThreadableLoader::preflightSuccess): * loader/DocumentThreadableLoader.h: * loader/SubresourceLoader.cpp: (WebCore::SubresourceLoader::SubresourceLoader): (WebCore::SubresourceLoader::didReceiveResponse): (WebCore::SubresourceLoader::notifyDone): * loader/SubresourceLoader.h: * loader/TextTrackLoader.h: * loader/appcache/ApplicationCacheHost.h: * loader/appcache/ApplicationCacheStorage.cpp: (WebCore::ApplicationCacheStorage::storeCopyOfCache): * loader/archive/cf/LegacyWebArchive.cpp: (WebCore::LegacyWebArchive::create): * loader/cache/CachedResourceLoader.cpp: (WebCore::CachedResourceLoader::requestPreload): (WebCore::CachedResourceLoader::clearPreloads): (WebCore::CachedResourceLoader::printPreloadStats): * loader/cache/CachedResourceLoader.h: * loader/icon/IconDatabase.cpp: (WebCore::IconDatabase::deleteAllPreparedStatements): (WebCore::readySQLiteStatement): * loader/icon/IconDatabase.h: * loader/icon/IconRecord.h: 2014-11-16 Chris Dumez Crash when setting 'order' CSS property to a calculated value https://bugs.webkit.org/show_bug.cgi?id=138780 Reviewed by Darin Adler. CSS Calculated values were not handled by the CSS parser for 'order' CSS property. As a result, using calculated values wouldn't work in release builds and would hit an assertion in debug builds. This patch updates the CSS parser to directly convert the CSS Calculated value into a simple integer CSSPrimitiveValue for 'order' property. We could have marked CSS Calculated values as valid in the CSS Parser instead but this would have brought issues: - The calculated value needs to be adjusted to INT_MIN + 2 if it is less than that. This would force us to calculate the expression anyway. - The StyleBuilder would need updating to properly handle CSS Calculated values for 'order'. Test: fast/css/order-calculated-value.html * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): 2014-11-16 Chris Dumez Assertion hit when setting a very large value to 'border-width' / 'font-size' CSS properties https://bugs.webkit.org/show_bug.cgi?id=138770 Reviewed by Darin Adler. When setting a very large value to a CSS property, it is represented internally as infinity. r166114 already tried to deal with this by adding an std::isinf() check in CSSValuePool::createValue() and returning an identifier CSSPrimitiveValue with CSSValueInvalid value in such case. The issue is that doing leads to the StyleBuilder getting a CSSValueInvalid CSSPrimitive value as input, which is not handled and leads to assertions. This patch updates the CSSParser to detect cases where the double value is infinity earlier (in CSSParser::validUnit() and parseSimpleLengthValue()), so that we mark the value as invalid and actually drop it. As a result, CSSPrimitiveValues with CSSValueInvalid value no longer make their way to the StyleBuilder. Test: fast/css/style-builder-infinite-value.html fast/css/infinite-floating-value.html * css/CSSParser.cpp: (WebCore::parseSimpleLengthValue): (WebCore::CSSParser::validUnit): * css/CSSValuePool.cpp: (WebCore::CSSValuePool::createValue): 2014-11-16 Shivakumar JM Attribute text in HTMLAnchorElement should behave as per specification. https://bugs.webkit.org/show_bug.cgi?id=138557 Reviewed by Darin Adler. attribute text in HTMLAnchorElement should not be readonly as per specification http://www.w3.org/TR/html/text-level-semantics.html#dom-a-text. It should behave as textContent attribute. Also This matches the behavior of Chrome 38 and FireFox. Test: fast/dom/HTMLAnchorElement/anchor-text-attribute.html * html/HTMLAnchorElement.cpp: (WebCore::HTMLAnchorElement::text): (WebCore::HTMLAnchorElement::setText): * html/HTMLAnchorElement.h: * html/HTMLAnchorElement.idl: 2014-11-16 Chris Dumez Move 'vertical-align' CSS property to the new StyleBuilder https://bugs.webkit.org/show_bug.cgi?id=138764 Reviewed by Darin Adler. Move 'vertical-align' CSS property from DeprecatedStyleBuilder to the new StyleBuilder by using custom code. No new tests, no behavior change. * css/CSSPropertyNames.in: * css/DeprecatedStyleBuilder.cpp: (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder): (WebCore::ApplyPropertyVerticalAlign::applyValue): Deleted. (WebCore::ApplyPropertyVerticalAlign::createHandler): Deleted. * css/StyleBuilderCustom.h: (WebCore::StyleBuilderFunctions::applyValueVerticalAlign): 2014-11-16 Tim Horton Use TextIndicator instead of the built in Lookup highlight https://bugs.webkit.org/show_bug.cgi?id=138775 Follow-up to r176164. * platform/spi/mac/LookupSPI.h: (WebCore::canDisableLookupIndicator): Deleted. Remove canDisableLookupIndicator. 2014-11-16 Chris Dumez Crash when setting '-webkit-line-clamp' CSS property to a calculated value https://bugs.webkit.org/show_bug.cgi?id=138777 Reviewed by Benjamin Poulain. CSS Calculated values were not handled when converting a CSSPrimitiveValue to a LineClampValue. As a result, we would hit an ASSERT_NOT_REACHED() assertion. To address this issue, this patch updates the code to use primitiveType() / getValue<>() instead of m_primitiveUnitType / m_value.num, as those getter function properly handle CSS Calculated values. Test: fast/css/webkit-line-clamp-calculated-value.html * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::operator LineClampValue): 2014-11-16 Tim Horton Use TextIndicator instead of the built in Lookup highlight https://bugs.webkit.org/show_bug.cgi?id=138775 Reviewed by Anders Carlsson. * WebCore.exp.in: * platform/mac/WebCoreSystemInterface.h: * platform/mac/WebCoreSystemInterface.mm: Remove a WKSI import/export that we don't need anymore. * platform/spi/mac/LookupSPI.h: Added. (WebCore::canDisableLookupIndicator): Add Lookup SPI header. Add a 'canDisableLookupIndicator', which must be called in any translation unit that wants to use either of the soft-linked constants related to that functionality, before calling the get* function. * WebCore.xcodeproj/project.pbxproj: * editing/mac/DictionaryLookup.mm: (WebCore::rangeForDictionaryLookupForSelection): (WebCore::rangeForDictionaryLookupAtHitTestResult): Adopt the Lookup SPI header. 2014-11-16 Joanmarie Diggs AX: [ATK] REGRESSION(r166288): Accessible values are no longer accessible via AT-SPI2 https://bugs.webkit.org/show_bug.cgi?id=138776 Reviewed by Chris Fleizach. r166288 used #if...#else instead of #if...#endif, thus disabling the old AtkValue support. Unfortunately AT-SPI2 doesn't yet have support for the new AtkValue API. Thus r166288 broke access to value-holding elements for AT-SPI2 assistive technologies. Replacing #else with #endif fixes things. No new tests because catching this regression would require AT-SPI2. * accessibility/atk/WebKitAccessibleInterfaceValue.cpp: (webkitAccessibleValueGetMinimumIncrement): (webkitAccessibleValueInterfaceInit): 2014-11-16 Joanmarie Diggs AX: [ATK] Expose the blockquote element using ATK_ROLE_BLOCK_QUOTE https://bugs.webkit.org/show_bug.cgi?id=138771 Reviewed by Chris Fleizach. Add BlockquoteRole and assigns it to blockquote elements. Make corresponding changes to platform role mappings: ATK_ROLE_BLOCK_QUOTE for GTK and EFL; AXGroup (which was being used already) for the Mac. No new tests are required. Instead, updated the existing expectations to reflect the new mapping. * accessibility/AccessibilityNodeObject.cpp: (WebCore::AccessibilityNodeObject::determineAccessibilityRole): * accessibility/AccessibilityObject.cpp: (WebCore::AccessibilityObject::isBlockquote): * accessibility/AccessibilityObject.h: * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::determineAccessibilityRole): * accessibility/atk/WebKitAccessibleWrapperAtk.cpp: (atkRole): * accessibility/mac/WebAccessibilityObjectWrapperMac.mm: (createAccessibilityRoleMap): 2014-11-16 Chris Dumez Crash when setting 'alt' CSS property to inherit or initial https://bugs.webkit.org/show_bug.cgi?id=138774 Reviewed by Chris Fleizach. The StyleResolver was not handling 'inherit' or 'initial' values for 'alt' CSS property. As a result, the code was assuming the CSSValue was a CSSPrimitiveValue (although it could be a CSSInitialValue or a CSSInheritValue). In such case, the code would dereference a null pointer because primitiveValue is initialized using: CSSPrimitiveValue* primitiveValue = is(*value) ? downcast(value) : nullptr; Test: fast/css/alt-inherit-initial.html * css/StyleResolver.cpp: (WebCore::StyleResolver::applyProperty): 2014-11-15 Joanmarie Diggs AX: [ATK] Lists with selectable children should have ATK_ROLE_LIST_BOX https://bugs.webkit.org/show_bug.cgi?id=127060 Reviewed by Chris Fleizach. Corrected the mapping from ATK_ROLE_LIST to ATK_ROLE_LIST_BOX. No new tests. Instead, updated the expectations of roles-exposed.html to reflect the corrected mapping. * accessibility/atk/WebKitAccessibleWrapperAtk.cpp: (atkRole): 2014-11-15 Joanmarie Diggs AX: [ATK] Video and audio elements should be exposed using ATK's video and audio roles. https://bugs.webkit.org/show_bug.cgi?id=138767 Reviewed by Chris Fleizach. Map AudioRole and VideoRole to ATK_ROLE_AUDIO and ATK_ROLE_VIDEO respectively, falling back on the existing mapping to ATK_ROLE_EMBEDDED in environments which have an older version of ATK. No new tests are required. Instead, existing expectations were updated to reflect the new mapping. * accessibility/atk/WebKitAccessibleWrapperAtk.cpp: (atkRole): 2014-11-15 Joanmarie Diggs AX: [ATK] Expose the footer element as ATK_ROLE_FOOTER https://bugs.webkit.org/show_bug.cgi?id=138773 Reviewed by Chris Fleizach. Map FooterRole to ATK_ROLE_FOOTER. No new tests. Unskipped a test that verifies this mapping. * accessibility/atk/WebKitAccessibleWrapperAtk.cpp: (atkRole): 2014-11-14 Dean Jackson Rename WebKitCSSKeyframe(s)Rule into CSSKeyframe(s)Rule https://bugs.webkit.org/show_bug.cgi?id=138763 Reviewed by Simon Fraser. Globally rename WebKitCSSKeyframeRule and WebKitCSSKeyframesRule to CSSKeyframeRule and CSSKeyframesRule respectively. This *may* break some existing content, but is compatible with what Blink and Firefox are doing. To minimize breakage, I kept an alias for the old constant values on CSSRule: WEBKIT_KEYFRAMES_RULE and WEBKIT_KEYFRAME_RULE. Covered by existing tests. * CMakeLists.txt: * DerivedSources.cpp: * DerivedSources.make: * WebCore.vcxproj/WebCore.vcxproj: * WebCore.vcxproj/WebCore.vcxproj.filters: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSCSSRuleCustom.cpp: (WebCore::toJS): * bindings/objc/DOMCSS.mm: (kitClass): * css/CSSGrammar.y.includes: * css/CSSKeyframeRule.cpp: Renamed from Source/WebCore/css/WebKitCSSKeyframeRule.cpp. (WebCore::StyleKeyframe::StyleKeyframe): (WebCore::StyleKeyframe::~StyleKeyframe): (WebCore::StyleKeyframe::mutableProperties): (WebCore::StyleKeyframe::parseKeyString): (WebCore::StyleKeyframe::cssText): (WebCore::CSSKeyframeRule::CSSKeyframeRule): (WebCore::CSSKeyframeRule::~CSSKeyframeRule): (WebCore::CSSKeyframeRule::style): (WebCore::CSSKeyframeRule::reattach): * css/CSSKeyframeRule.h: Renamed from Source/WebCore/css/WebKitCSSKeyframeRule.h. (WebCore::StyleKeyframe::create): (WebCore::StyleKeyframe::keyText): (WebCore::StyleKeyframe::setKeyText): (WebCore::StyleKeyframe::getKeys): (WebCore::StyleKeyframe::properties): * css/CSSKeyframeRule.idl: Renamed from Source/WebCore/css/WebKitCSSKeyframeRule.idl. * css/CSSKeyframesRule.cpp: Renamed from Source/WebCore/css/WebKitCSSKeyframesRule.cpp. (WebCore::StyleRuleKeyframes::StyleRuleKeyframes): (WebCore::StyleRuleKeyframes::~StyleRuleKeyframes): (WebCore::StyleRuleKeyframes::parserAppendKeyframe): (WebCore::StyleRuleKeyframes::wrapperAppendKeyframe): (WebCore::StyleRuleKeyframes::wrapperRemoveKeyframe): (WebCore::StyleRuleKeyframes::findKeyframeIndex): (WebCore::CSSKeyframesRule::CSSKeyframesRule): (WebCore::CSSKeyframesRule::~CSSKeyframesRule): (WebCore::CSSKeyframesRule::setName): (WebCore::CSSKeyframesRule::appendRule): (WebCore::CSSKeyframesRule::insertRule): (WebCore::CSSKeyframesRule::deleteRule): (WebCore::CSSKeyframesRule::findRule): (WebCore::CSSKeyframesRule::cssText): (WebCore::CSSKeyframesRule::length): (WebCore::CSSKeyframesRule::item): (WebCore::CSSKeyframesRule::cssRules): (WebCore::CSSKeyframesRule::reattach): * css/CSSKeyframesRule.h: Renamed from Source/WebCore/css/WebKitCSSKeyframesRule.h. (WebCore::StyleRuleKeyframes::create): (WebCore::StyleRuleKeyframes::keyframes): (WebCore::StyleRuleKeyframes::name): (WebCore::StyleRuleKeyframes::setName): (WebCore::StyleRuleKeyframes::copy): * css/CSSKeyframesRule.idl: Renamed from Source/WebCore/css/WebKitCSSKeyframesRule.idl. * css/CSSParser.cpp: * css/CSSRule.h: * css/CSSRule.idl: * css/CSSStyleSheet.cpp: * css/RuleSet.cpp: * css/StyleResolver.cpp: * css/StyleRule.cpp: (WebCore::StyleRuleBase::createCSSOMWrapper): * inspector/InspectorStyleSheet.cpp: (WebCore::asCSSRuleList): 2014-11-15 David Kilzer REGRESSION (r176137): iOS build broke after moving DataDetectors scanning code to WebCore This regressed with the following commit: Move DataDetectors scanning code to WebCore https://bugs.webkit.org/show_bug.cgi?id=138731 This fixes the following build failures: In file included from WebCore/editing/mac/DataDetection.mm:29: WebCore/platform/spi/mac/DataDetectorsSPI.h:66:11: error: unknown type name 'NSRect' @property NSRect highlightFrame; ^ WebCore/editing/mac/DataDetection.mm:42:28: error: use of undeclared identifier 'DataDetection' RetainPtr DataDetection::detectItemAroundHitTestResult(const HitTestResult& hitTestResult, FloatRect& detectedDataBoundingBox, RefPtr& detectedDataRange) ^ 2 errors generated. * WebCore.exp.in: (DataDetection::detectItemAroundHitTestResult): Move symbol from shared section to Mac-only section. * editing/mac/DataDetection.mm: Add PLATFORM(MAC) check around the entire implementation since it it unused on iOS. * platform/spi/mac/DataDetectorsSPI.h: Expand PLATFORM(MAC) check around DDActionContext class declarations. 2014-11-14 Benjamin Poulain Compute the selector specificity as we match simple selectors https://bugs.webkit.org/show_bug.cgi?id=138718 Reviewed by Andreas Kling. This is an other tiny step toward dynamic specificity. Instead of computing the entire specificity at the end, compute it dynamically as we are matching each individual simple selector. * css/CSSSelector.cpp: (WebCore::CSSSelector::specificity): (WebCore::CSSSelector::simpleSelectorSpecificity): (WebCore::CSSSelector::addSpecificities): (WebCore::CSSSelector::specificityForPage): (WebCore::CSSSelector::specificityForOneSelector): Deleted. * css/CSSSelector.h: * css/SelectorChecker.cpp: (WebCore::SelectorChecker::match): (WebCore::SelectorChecker::matchRecursively): (WebCore::SelectorChecker::checkOne): (WebCore::SelectorChecker::matchSelectorList): * css/SelectorChecker.h: 2014-11-14 Andreas Kling [mac] Only images that are actually purgeable should be advertised as such. Reviewed by Tim Horton. Instead of saying that all images on >=Yosemite are purgeable, have BitmapImage forward the question to CGImage for the correct answer. The memory may be marked non-volatile by frameworks underneath WebKit at any given time, but that's not something we need to worry about. * platform/graphics/BitmapImage.cpp: (WebCore::BitmapImage::decodedDataIsPurgeable): * platform/graphics/BitmapImage.h: * platform/graphics/cg/BitmapImageCG.cpp: (WebCore::BitmapImage::decodedDataIsPurgeable): * platform/graphics/cg/ImageSourceCG.cpp: (WebCore::ImageSource::createFrameAtIndex): * platform/spi/cg/CoreGraphicsSPI.h: 2014-11-14 Zalan Bujtas Remove computeTextPaintStyle's RenderText dependency. https://bugs.webkit.org/show_bug.cgi?id=138754 Reviewed by Simon Fraser. So that we can compute text paint style across renderers in simple line layout. No change in functionality. * rendering/InlineTextBox.cpp: (WebCore::InlineTextBox::paint): * rendering/SimpleLineLayoutFunctions.cpp: (WebCore::SimpleLineLayout::paintFlow): * rendering/TextPaintStyle.cpp: (WebCore::computeTextPaintStyle): * rendering/TextPaintStyle.h: 2014-11-14 Myles C. Maxfield Get rid of WebFontCache https://bugs.webkit.org/show_bug.cgi?id=134752 Reviewed by Dave Hyatt. No new tests because there is no behavior change. * Configurations/WebCore.xcconfig: * PlatformMac.cmake: * WebCore.exp.in: * WebCore.order: * WebCore.xcodeproj/project.pbxproj: * platform/graphics/mac/FontCacheMac.mm: (WebCore::acceptableChoice): (WebCore::betterChoice): (WebCore::toTraitsMask): (WebCore::desiredFamilyToAvailableFamilyDictionary): (WebCore::rememberDesiredFamilyToAvailableFamilyMapping): (WebCore::fontWithFamily): (WebCore::invalidateFontCache): (WebCore::FontCache::getTraitsInFamily): (WebCore::FontCache::createFontPlatformData): * platform/mac/WebFontCache.h: Removed. * platform/mac/WebFontCache.mm: Removed. 2014-11-14 Daniel Bates [iOS] NSFileManager and QuickLook SPI not available in public SDK https://bugs.webkit.org/show_bug.cgi?id=138742 Reviewed by Pratik Solanki. Add a SPI wrapper headers {NSFileManager, QuickLook}SPI.h that forward declares NSFileManager and QuickLook SPI, respectively, and use these header instead of including private headers of Foundation and QuickLook directly. * WebCore.xcodeproj/project.pbxproj: Add project and private header QuickLookSPI.h and NSFileManagerSPI.h, respectively. * platform/network/ios/QuickLook.mm: Include headers QuickLookSPI.h and NSFileManagerSPI.h instead of including headers of QuickLook and Foundation directly. * platform/spi/cocoa/NSFileManagerSPI.h: Added. * platform/spi/ios/QuickLookSPI.h: Added. 2014-11-14 Daniel Bates [iOS] CoreGraphics SPI not available in public SDK https://bugs.webkit.org/show_bug.cgi?id=138709 Reviewed by David Kilzer. Add a SPI wrapper header called CoreGraphicsSPI.h that forward declares CoreGraphics SPI and use this header instead of including private headers of CoreGraphics directly. * WebCore.xcodeproj/project.pbxproj: Add WebCore private header CoreGraphicsSPI.h. Also remove header CGFontUnicodeSupportSPI.h as its functionality has been incorporated into header CoreGraphicsSPI.h. * WebCore.vcxproj/WebCore.vcxproj: Add WebCore private header CoreGraphicsSPI.h. * WebCore.vcxproj/WebCore.vcxproj.filters: Add directories platform/spi and platform/spi/cg. * WebCore.vcxproj/WebCoreCG.props: Add include directory platform/spi/cg. * WebCore.vcxproj/copyForwardingHeaders.cmd: Copy WebCore headers from directory platform/spi/cg. This is necessary because WebCore/platform/graphics/SimpleFontData.h includes CoreGraphicsSPI.h. And WebCore/platform/graphics/SimpleFontData.h is compiled for the Apple Windows port. * platform/graphics/SimpleFontData.h: Move CGFontRenderingStyle declaration and associated enum from this file to file CoreGraphicsSPI.h and include header CoreGraphicsSPI.h. * platform/graphics/cg/BitmapImageCG.cpp: Remove unnecessary #include of header CGContextPrivate.h. * platform/graphics/cg/ColorCG.cpp: Include header CoreGraphicsSPI.h instead of including headers of CoreGraphics directly. * platform/graphics/cg/GraphicsContextCG.cpp: Move forward declarations of CoreGraphics functions from this file to file CoreGraphicsSPI.h and include header CoreGraphicsSPI.h. Also sort the list of #include directives. * platform/graphics/cg/ImageSourceCG.cpp: Include header CoreGraphicsSPI.h instead of including headers of CoreGraphics directly. * platform/graphics/cg/PDFDocumentImage.cpp: Ditto. * platform/graphics/cocoa/FontPlatformDataCocoa.mm: Ditto. * platform/graphics/ios/FontCacheIOS.mm: Include header CoreGraphicsSPI.h instead of including header directly. * platform/graphics/ios/FontServicesIOS.mm: Include header CoreGraphicsSPI.h instead of including headers of CoreGraphics directly. * platform/graphics/ios/SimpleFontDataIOS.mm: Ditto. * platform/graphics/mac/FontMac.mm: Move forward declarations of CoreGraphics functions from this file to file CoreGraphicsSPI.h and include header CoreGraphicsSPI.h. * platform/graphics/mac/GlyphPageTreeNodeMac.cpp: Substitute header CoreGraphicsSPI.h for CGFontUnicodeSupportSPI.h and remove #include of headers CGFontUnicodeSupport.h (it will be included by CoreGraphicsSPI.h). * platform/graphics/mac/SimpleFontDataMac.mm: Move forward declarations of CoreGraphics functions from this file to file CoreGraphicsSPI.h and include header CoreGraphicsSPI.h. * platform/ios/LegacyTileGrid.mm: Include header CoreGraphicsSPI.h instead of including headers of CoreGraphics directly. * platform/ios/wak/WKGraphics.h: Remove #include of header CoreGraphicsPrivate.h and forward declare CGFontAntialiasingStyle Additionally, declare WKCompositeOperation as an alias of int and use this data type instead of CGCompositeOperation (SPI). This approach lets us keep the definition of CGCompositeOperation in file CoreGraphicsSPI.h, where all the other definitions/forward declarations of CoreGraphics data types reside, as opposed to defining it in this file. * platform/ios/wak/WKGraphics.mm: (WKRectFillUsingOperation): Cast data type WKCompositeOperation to CGCompositeOperation and added compile-time assert to ensure that the size of WKCompositeOperation is identical to the size of CGCompositeOperation. * platform/graphics/cg/ImageSourceCG.cpp: Move CGImageCachingFlags declaration, associated enum, and forward declaration of CGImageSetCachingFlags() from this file to file CoreGraphicsSPI.h and include header CoreGraphicsSPI.h. (WebCore::ImageSource::createFrameAtIndex): Fix incorrect comment. * platform/spi/cocoa/CGFontUnicodeSupportSPI.h: Removed; moved its functionality into header CoreGraphicsSPI.h. * platform/spi/cg/CoreGraphicsSPI.h: Added. (CGFloatMin): * rendering/RenderThemeIOS.mm: Substitute header CoreGraphics.h for CGPathPrivate.h as we no longer make use of any functionality from CGPathPrivate.h in this file. The functionality we used from CGPathPrivate.h, including CGPathAddRoundedRect(), has been moved to the public API header, CGPath.h, which is included from header CoreGraphics.h. 2014-11-14 Dean Jackson [Media] Timeline scrubber not updating as the video plays https://bugs.webkit.org/show_bug.cgi?id=138717 Reviewed by Jer Noble. There is some confusing logic that determines whether or not the controls are hidden, and a slight error caused timelines to not advance unless they were explicitly showing. The fix was to be a bit more liberal in deciding when the controls are showing, but still cautious enough to stop up causing repaints when things are hidden. Test: media/media-controls-timeline-updates.html * Modules/mediacontrols/mediaControlsApple.js: (Controller.prototype.controlsAreHidden): We only need to check if we're an audio element or explicitly hidden. (Controller.prototype.showControls): Explicitly call updateTime. 2014-11-14 Tim Horton Move DataDetectors scanning code to WebCore https://bugs.webkit.org/show_bug.cgi?id=138731 Reviewed by Anders Carlsson. * WebCore.exp.in: Export our new function. * WebCore.xcodeproj/project.pbxproj: Add DataDetection.{mm, h} Adjust the project so that editing/mac actually points to editing/mac instead of editing/ * editing/mac/DictionaryLookup.h: * editing/mac/DictionaryLookup.mm: Swap to PLATFORM(MAC) instead of !PLATFORM(IOS). Move DictionaryLookup.{mm, h} to editing/mac, where they were in the project but not on disk. * editing/mac/DataDetection.h: Added. * editing/mac/DataDetection.mm: Added. (WebCore::DataDetection::detectItemAroundHitTestResult): Moved from WebKit2. 2014-11-14 Dan Bernstein Wrong (off-by-1) navigation snapshots shown after a mix of gesture and button back/forward navigation https://bugs.webkit.org/show_bug.cgi?id=138753 Reviewed by Tim Horton. Removed a FrameLoaderClient function that no one overrides anymore. * loader/FrameLoaderClient.h: (WebCore::FrameLoaderClient::willChangeCurrentHistoryItem): Deleted. * loader/HistoryController.cpp: (WebCore::HistoryController::setCurrentItem): Removed call to willChangeCurrentHistoryItem. (WebCore::HistoryController::replaceCurrentItem): Ditto. 2014-11-14 Jeremy Jones Do proper teardown for optimized fullscreen https://bugs.webkit.org/show_bug.cgi?id=138648 Reviewed by Eric Carlson. * platform/ios/WebVideoFullscreenInterfaceAVKit.mm: (WebVideoFullscreenInterfaceAVKit::invalidate): must do corresponding teardown based on mode. 2014-11-11 David Hyatt Table rows repaint entire table when their background color changes. https://bugs.webkit.org/show_bug.cgi?id=26662 Reviewed by Simon Fraser. Added fast/repaint/table-row-repaint.html * rendering/RenderTableCell.h: * rendering/RenderTableRow.cpp: (WebCore::RenderTableRow::clippedOverflowRectForRepaint): Improve table row's function to unite with the cell rects that can possibly have the the row's background color painted behind them. 2014-11-14 Zalan Bujtas Simple line layout: Move simple line layout RunResolver and LineResolver implementation to SimpleLineLayoutResolver.cpp https://bugs.webkit.org/show_bug.cgi?id=138704 Reviewed by Antti Koivisto. No change in functionality. * CMakeLists.txt: * WebCore.vcxproj/WebCore.vcxproj: * WebCore.vcxproj/WebCore.vcxproj.filters: * WebCore.xcodeproj/project.pbxproj: * rendering/SimpleLineLayoutResolver.cpp: Added. (WebCore::SimpleLineLayout::RunResolver::Run::Run): (WebCore::SimpleLineLayout::RunResolver::Run::rect): (WebCore::SimpleLineLayout::RunResolver::Run::baseline): (WebCore::SimpleLineLayout::RunResolver::Run::text): (WebCore::SimpleLineLayout::RunResolver::Iterator::Iterator): (WebCore::SimpleLineLayout::RunResolver::Iterator::advance): (WebCore::SimpleLineLayout::RunResolver::Iterator::advanceLines): (WebCore::SimpleLineLayout::RunResolver::RunResolver): (WebCore::SimpleLineLayout::RunResolver::lineIndexForHeight): (WebCore::SimpleLineLayout::RunResolver::rangeForRect): (WebCore::SimpleLineLayout::LineResolver::Iterator::Iterator): (WebCore::SimpleLineLayout::LineResolver::Iterator::operator*): (WebCore::SimpleLineLayout::LineResolver::LineResolver): * rendering/SimpleLineLayoutResolver.h: (WebCore::SimpleLineLayout::RunResolver::Run::Run): Deleted. (WebCore::SimpleLineLayout::RunResolver::Run::rect): Deleted. (WebCore::SimpleLineLayout::RunResolver::Run::baseline): Deleted. (WebCore::SimpleLineLayout::RunResolver::Run::text): Deleted. (WebCore::SimpleLineLayout::RunResolver::Iterator::Iterator): Deleted. (WebCore::SimpleLineLayout::RunResolver::Iterator::advance): Deleted. (WebCore::SimpleLineLayout::RunResolver::Iterator::advanceLines): Deleted. (WebCore::SimpleLineLayout::RunResolver::RunResolver): Deleted. (WebCore::SimpleLineLayout::RunResolver::lineIndexForHeight): Deleted. (WebCore::SimpleLineLayout::RunResolver::rangeForRect): Deleted. (WebCore::SimpleLineLayout::LineResolver::Iterator::Iterator): Deleted. (WebCore::SimpleLineLayout::LineResolver::Iterator::operator*): Deleted. (WebCore::SimpleLineLayout::LineResolver::LineResolver): Deleted. 2014-11-14 Andrzej Badowski AX: Improve AccessibilityTableCell isColumnHeaderCell function. https://bugs.webkit.org/show_bug.cgi?id=138423 Reviewed by Chris Fleizach. cell in the zero row should be column header. New tests are not necessary. * accessibility/AccessibilityTableCell.cpp: (WebCore::AccessibilityTableCell::isColumnHeaderCell): 2014-11-14 Carlos Garcia Campos [SOUP] Use GMainLoopSource for request timeout in ResourceHandle https://bugs.webkit.org/show_bug.cgi?id=138695 Reviewed by Sergio Villar Senin. We are currently using soup_timeout_add() that simply creates a GSource and attaches it to the given context. Using GMainLoopSource we simplify the code and fix any potential problem of converting the double value into milliseconds. * platform/network/ResourceHandleInternal.h: * platform/network/soup/ResourceHandleSoup.cpp: (WebCore::cleanupSoupRequestOperation): (WebCore::ResourceHandle::sendPendingRequest): (WebCore::ResourceHandle::platformSetDefersLoading): (WebCore::requestTimeoutCallback): Deleted. 2014-11-13 Tim Horton [mac] Keep around more decoded image data, since it's purgeable https://bugs.webkit.org/show_bug.cgi?id=125273 Reviewed by Simon Fraser. No new tests, just an optimization. Instead of throwing away decoded image data eagerly, allow the operating system to manage the memory via the standard purgeability mechanism, where it can. This improves the performance on some pathological cases (extremely large animated GIFs) by up to 8x. * loader/cache/MemoryCache.cpp: (WebCore::MemoryCache::pruneLiveResourcesToSize): Don't prune live resources' decoded data if it is purgeable. * platform/graphics/BitmapImage.cpp: (WebCore::BitmapImage::destroyDecodedDataIfNecessary): Don't eagerly throw away decoded image data if it's purgeable. * loader/cache/CachedImage.h: * loader/cache/CachedResource.h: (WebCore::CachedResource::decodedDataIsPurgeable): * platform/graphics/BitmapImage.h: * platform/graphics/Image.h: (WebCore::Image::decodedDataIsPurgeable): 2014-11-13 Myles C. Maxfield Addressing post-review comment https://bugs.webkit.org/show_bug.cgi?id=138633 * platform/spi/cg/CoreGraphicsSPI.h: 2014-11-13 Myles C. Maxfield Move FontMac and FontCacheMac off of WKSI https://bugs.webkit.org/show_bug.cgi?id=138633 Reviewed by Simon Fraser. No new tests because there is no behavior change. * WebCore.exp.in: * WebCore.order: * WebCore.vcxproj/WebCoreCG.props: * WebCore.xcodeproj/project.pbxproj: * platform/graphics/ios/FontCacheIOS.mm: (WebCore::FontCache::platformInit): * platform/graphics/mac/FontCacheMac.mm: (WebCore::FontCache::platformInit): (WebCore::FontCache::systemFallbackForCharacters): * platform/graphics/mac/FontMac.mm: (WebCore::isIntegral): (WebCore::setCGFontRenderingMode): (WebCore::Font::drawGlyphs): * platform/graphics/mac/GlyphPageTreeNodeMac.cpp: * platform/graphics/win/FontCacheWin.cpp: (WebCore::FontCache::platformInit): * platform/ios/WebCoreSystemInterfaceIOS.mm: * platform/mac/WebCoreSystemInterface.h: * platform/mac/WebCoreSystemInterface.mm: * platform/spi/cocoa/CoreGraphicsSPI.h: Copied from Source/WebCore/platform/spi/cocoa/CGFontUnicodeSupportSPI.h. * platform/spi/cocoa/CoreTextSPI.h: * platform/spi/mac/NSFontSPI.h: Renamed from Source/WebCore/platform/spi/cocoa/CGFontUnicodeSupportSPI.h. 2014-11-13 Chris Dumez Move 'image-resolution' CSS property to the new StyleBuilder https://bugs.webkit.org/show_bug.cgi?id=138715 Reviewed by Andreas Kling. Move 'image-resolution' CSS property from DeprecatedStyleBuilder to the new StyleBuilder by using custom code. No new tests, no behavior change. * css/CSSPropertyNames.in: * css/DeprecatedStyleBuilder.cpp: (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder): (WebCore::ApplyPropertyImageResolution::applyInheritValue): Deleted. (WebCore::ApplyPropertyImageResolution::applyInitialValue): Deleted. (WebCore::ApplyPropertyImageResolution::applyValue): Deleted. (WebCore::ApplyPropertyImageResolution::createHandler): Deleted. * css/StyleBuilderCustom.h: (WebCore::StyleBuilderFunctions::applyInheritImageResolution): (WebCore::StyleBuilderFunctions::applyInitialImageResolution): (WebCore::StyleBuilderFunctions::applyValueImageResolution): 2014-11-13 Commit Queue Unreviewed, rolling out r176106. https://bugs.webkit.org/show_bug.cgi?id=138719 needs build love (Requested by kling on #webkit). Reverted changeset: "[mac] Keep around more decoded image data, since it's purgeable" https://bugs.webkit.org/show_bug.cgi?id=125273 http://trac.webkit.org/changeset/176106 2014-11-13 Eric Carlson Context menus should not offer the "Download video" option for videos that cannot be downloaded https://bugs.webkit.org/show_bug.cgi?id=138530 -and corresponding- rdar://problem/18919130 Reviewed by Tim Horton. * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::parseAttribute): * html/HTMLMediaElement.h: * page/ContextMenuController.cpp: (WebCore::ContextMenuController::populate): * platform/graphics/MediaPlayer.cpp: (WebCore::MediaPlayer::canSaveMediaData): (WebCore::MediaPlayer::supportsSave): Deleted. * platform/graphics/MediaPlayer.h: * platform/graphics/MediaPlayerPrivate.h: (WebCore::MediaPlayerPrivateInterface::supportsFullscreen): (WebCore::MediaPlayerPrivateInterface::canSaveMediaData): (WebCore::MediaPlayerPrivateInterface::supportsSave): Deleted. * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp: (WebCore::MediaPlayerPrivateAVFoundation::resolvedURL): (WebCore::MediaPlayerPrivateAVFoundation::canSaveMediaData): * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h: * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h: * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: (WebCore::MediaPlayerPrivateAVFoundationObjC::resolvedURL): * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: (WebCore::MediaPlayerPrivateGStreamer::canSaveMediaData): * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h: * platform/graphics/mac/MediaPlayerPrivateQTKit.h: * platform/graphics/mac/MediaPlayerPrivateQTKit.mm: (WebCore::MediaPlayerPrivateQTKit::canSaveMediaData): * rendering/HitTestResult.cpp: (WebCore::HitTestResult::isDownloadableMedia): 2014-11-02 Tim Horton [mac] Keep around more decoded image data, since it's purgeable Reviewed by Simon Fraser and Andreas Kling. No new tests, just an optimization. Instead of throwing away decoded image data eagerly, allow the operating system to manage the memory via the standard purgeability mechanism, where it can. This improves the performance on some pathological cases (extremely large animated GIFs) by up to 8x. * loader/cache/MemoryCache.cpp: (WebCore::MemoryCache::pruneLiveResourcesToSize): Don't prune live resources' decoded data if it is purgeable. * platform/graphics/BitmapImage.cpp: (WebCore::BitmapImage::destroyDecodedDataIfNecessary): Don't eagerly throw away decoded image data if it's purgeable. * loader/cache/CachedImage.h: * loader/cache/CachedResource.h: (WebCore::CachedResource::decodedDataIsPurgeable): * platform/graphics/BitmapImage.h: * platform/graphics/Image.h: (WebCore::Image::decodedDataIsPurgeable): 2014-11-13 Daniel Bates [iOS] NSGeometry data types are not available in the public SDK https://bugs.webkit.org/show_bug.cgi?id=137536 Reviewed by David Kilzer. Towards building iOS WebKit with the public iOS SDK, define NSGeometry data types and functions in terms of CGGeometry data types and functions because the former is SPI on iOS. * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: Include header WAKAppKitStubs.h when building for iOS. Otherwise, include header NSGeometry.h. * platform/graphics/ca/mac/PlatformCALayerMac.mm: Remove import of private header NSGeometry.h. We will use the NSGeometry data types defined in WAKAppKitStubs.h, which is implicitly imported by header WAKWindow.h. * platform/graphics/mac/MediaPlayerProxy.h: Substitute WAKAppKitStubs.h for NSGeometry.h. * platform/ios/PlatformEventFactoryIOS.mm: Ditto. Also fix up style issues with #import directives. * platform/ios/WebEvent.mm: Ditto. * platform/ios/wak/WAKAppKitStubs.h: Define typedefs and macros that map NSGeometry data types and functions to the analogous CGGeometry data types and functions. Also, remove #ifdef __OBJC__- guard as the existing content in WAKAppKitStubs.h assumes that this file will only be included in an Objective-C/Objective-C++ file. * platform/ios/wak/WAKView.h: Import header WAKAppKitStubs.h instead of defining macros for some NSGeometry data types. 2014-11-13 Simon Fraser [WK2] Fire a layout milestone on session restore based on render tree size https://bugs.webkit.org/show_bug.cgi?id=138711 rdar://problem/16033854 Reviewed by Anders Carlsson. New layout milestone for session restore based on render tree size. Only used in WK2 at present. * page/LayoutMilestones.h: 2014-11-13 Dan Bernstein Policy client not called for navigations through the page cache https://bugs.webkit.org/show_bug.cgi?id=138703 Reviewed by Alexey Proskuryakov. Test added to TestWebKitAPI/Tests/WebKit2Cocoa/Navigation.mm. * loader/FrameLoader.cpp: (WebCore::FrameLoader::loadDifferentDocumentItem): When using a cached page, which already has a document loader, set the document loader’s triggering action (so that the policy client sees that this is a back/forward navigation) and clear its last checked request (so that the policy client gets called). 2014-11-13 Joanmarie Diggs AX: [ATK] Do not return ATK_ROLE_UNKNOWN for null or otherwise invalid accessible objects https://bugs.webkit.org/show_bug.cgi?id=137867 Reviewed by Chris Fleizach. Return ATK_ROLE_INVALID for null or otherwise invalid accessible objects. Test: platform/gtk/accessibility/detached-object-role.html * accessibility/atk/WebKitAccessibleWrapperAtk.cpp: (webkitAccessibleGetRole): 2014-11-13 Eric Carlson [iOS] update optimized fullscreen media controls artwork https://bugs.webkit.org/show_bug.cgi?id=138705 Reviewed by Dean Jackson. * Modules/mediacontrols/MediaControlsHost.cpp: (WebCore::MediaControlsHost::mediaUIImageData): Remove one button. * Modules/mediacontrols/MediaControlsHost.idl: * Modules/mediacontrols/mediaControlsApple.js: (Controller.prototype.controlsAreHidden): Add parentheses to fix the logic. * Modules/mediacontrols/mediaControlsiOS.js: (ControllerIOS.prototype.shouldHaveStartPlaybackButton): The big play button should not be visible during playback. (ControllerIOS.prototype.createControls): No longer necessary to insert style dynamically, (ControllerIOS.prototype.setPlaying): Call the base class first so "isPlaying" is set before calling updateControls, which calls shouldHaveStartPlaybackButton. * platform/ios/WebCoreSystemInterfaceIOS.h: Update constants. * rendering/RenderThemeIOS.mm: (WebCore::RenderThemeIOS::mediaControlsStyleSheet): Add button style to the media controls sheet. 2014-11-13 Benjamin Poulain Implement the matching for :nth-last-child(An+B of selector-list) https://bugs.webkit.org/show_bug.cgi?id=138650 Reviewed by Andreas Kling. Matching is trivial based on the existing CSS4 infrastructure. The tricky part is style invalidation. In the cases of the old :nth-last-child() and :nth-last-of-type(), we were using the flag ChildrenAffectedByBackwardPositionalRules. The problem with ChildrenAffectedByBackwardPositionalRules is that it only invalidate subtrees when nodes are being added or removed. It is a valuable optimization by itself since tree updates are less common than property updates. For the case of property updates, I have added the new flag "ChildrenAffectedByPropertyBasedBackwardPositionalRules". It pretty much work the same way but invalidates subtree on style recalc. Tests: fast/css/nth-child-and-nth-last-child.html fast/css/nth-last-child-of-classname.html fast/css/nth-last-child-of-complex-selector.html fast/css/nth-last-child-of-compound-selector.html fast/css/nth-last-child-of-style-sharing-1.html fast/css/nth-last-child-of-style-sharing-2.html fast/css/nth-last-child-of-style-update-optimization.html fast/css/nth-last-child-of-tagname.html fast/selectors/nth-last-child-of-class-style-update.html * css/SelectorChecker.cpp: (WebCore::SelectorChecker::checkOne): * dom/Element.cpp: (WebCore::Element::setChildrenAffectedByPropertyBasedBackwardPositionalRules): (WebCore::Element::hasFlagsSetDuringStylingOfChildren): (WebCore::Element::rareDataChildrenAffectedByPropertyBasedBackwardPositionalRules): * dom/Element.h: (WebCore::Element::childrenAffectedByPropertyBasedBackwardPositionalRules): * dom/ElementRareData.h: (WebCore::ElementRareData::childrenAffectedByPropertyBasedBackwardPositionalRules): (WebCore::ElementRareData::setChildrenAffectedByPropertyBasedBackwardPositionalRules): (WebCore::ElementRareData::ElementRareData): (WebCore::ElementRareData::resetDynamicRestyleObservations): * dom/Node.cpp: (WebCore::Node::updateAncestorsForStyleRecalc): (WebCore::Node::setNeedsStyleRecalc): (WebCore::markAncestorsWithChildNeedsStyleRecalc): Deleted. * dom/Node.h: Unlike the other marking steps, ChildrenAffectedByPropertyBasedBackwardPositionalRules can only really affect one level (because we don't have a parent-selectors). It is quite easy to mark large trees with ChildrenAffectedByPropertyBasedBackwardPositionalRules by using a selector list that is a bit too generic. When that happen, we must be careful not invalidating everything, just the affected subtree. 2014-11-12 Jon Honeycutt REGRESSION (r172826): Password field placeholder text is missing if placeholder attribute precedes type attribute When the placeholder attribute is encountered, a shadow tree is created to include the placeholder element. When the type attribute is encountered, the previous shadow tree is destroyed, and a new shadow tree is created. TextFieldInputType::createShadowSubtree() did not handle creating the placeholder element. This regressed in r172826 because prior to r172826, the placeholder element would be recreated when HTMLTextFormControlElement::updatePlaceholderVisibility() was called. In r172826, updatePlaceholderVisibility() was changed to only show or hide the placeholder element if it exists. Reviewed by Benjamin Poulain. * html/TextFieldInputType.cpp: (WebCore::TextFieldInputType::createShadowSubtree): Call updatePlaceholderVisibility() to insert the placeholder element (after the inner text element has been inserted, as it appears before it in the shadow DOM). 2014-11-13 Joanmarie Diggs AX: [ATK] Accessible focus events are emitted when the selection is changed in non-focused combo boxes https://bugs.webkit.org/show_bug.cgi?id=137866 Reviewed by Mario Sanchez Prada. Check that the AccessibilityMenuList is really focused before notifying the platform that it is focused. Likewise, only notify the platform of an AccessibilityMenuListOption focus gain if the AccessibilityMenuList containing that option is expanded. Test: platform/gtk/accessibility/menu-list-unfocused-notifications.html * accessibility/atk/AXObjectCacheAtk.cpp: (WebCore::notifyChildrenSelectionChange): (WebCore::AXObjectCache::postPlatformNotification): 2014-11-13 Gyuyoung Kim [EFL] Unexpected crashes in layout test after r175953 https://bugs.webkit.org/show_bug.cgi?id=138652 Reviewed by Csaba Osztrogonác. In r175953, it set reusableNodeIndex value with m_partCache's size(). It causes out of bound index crash because the reusableNodeIndex is Vector object. No new test. This patch is to fix broken tests related to widgets on EFL port. * platform/efl/RenderThemeEfl.cpp: (WebCore::RenderThemeEfl::getThemePartFromCache): Need to set reusableNodeIndex with "size() - 1". 2014-11-13 Chris Dumez Lazily create HTMLInputElement's inputType and shadow subtree https://bugs.webkit.org/show_bug.cgi?id=138524 Reviewed by Ryosuke Niwa. When an HTMLInputElement was created by the parser, we would first call HTMLInputElement::create(), then call Element::parserSetAttributes() on the constructed input. With the previous implementation, this was a bit inefficient because HTMLInputElement::create() would construct a TextInputType inputType (as this is the default) as well as its corresponding shadow subtree. Then, parserSetAttributes() would often set the |type| attribute and would need to destroy this input type as well as its subtree if the new |type| is not 'text', to create a new inputType / shadow subtree of the right type. The profiler showed that this was fairly expensive. To improve this, this patch delays the inputType / shadow subtree creation when the HTMLInputElement is constructed by the parser, until the attributes are actually set by the parser. This way, we directly create an inputType / shadow subtree of the right type. I see a 1.4% speed up on speedometer (73.95 -> 75.0). Test: fast/dom/HTMLInputElement/border-attribute-crash.html * dom/Element.cpp: (WebCore::Element::parserSetAttributes): (WebCore::Element::parserDidSetAttributes): * dom/Element.h: * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::HTMLInputElement): (WebCore::HTMLInputElement::create): (WebCore::HTMLInputElement::updateType): (WebCore::HTMLInputElement::runPostTypeUpdateTasks): (WebCore::HTMLInputElement::initializeInputType): (WebCore::HTMLInputElement::parseAttribute): (WebCore::HTMLInputElement::parserDidSetAttributes): (WebCore::HTMLInputElement::finishParsingChildren): * html/HTMLInputElement.h: 2014-11-12 Chris Dumez Have DOMTimer deal with more ScriptExecutionContext references https://bugs.webkit.org/show_bug.cgi?id=138679 Reviewed by Andreas Kling. Have DOMTimer deal with more ScriptExecutionContext references instead of pointers, to make it clear the script execution context cannot be null. No new tests, no behavior change. * bindings/js/ScheduledAction.cpp: (WebCore::ScheduledAction::execute): (WebCore::ScheduledAction::executeFunctionInContext): * bindings/js/ScheduledAction.h: * dom/DocumentEventQueue.cpp: * page/DOMTimer.cpp: (WebCore::DOMTimerFireState::DOMTimerFireState): (WebCore::NestedTimersMap::instanceForContext): (WebCore::DOMTimer::DOMTimer): (WebCore::DOMTimer::install): (WebCore::DOMTimer::removeById): (WebCore::DOMTimer::fired): * page/DOMTimer.h: * page/DOMWindow.cpp: (WebCore::DOMWindow::setTimeout): (WebCore::DOMWindow::clearTimeout): (WebCore::DOMWindow::setInterval): (WebCore::DOMWindow::clearInterval): * page/SuspendableTimer.cpp: (WebCore::SuspendableTimer::SuspendableTimer): * page/SuspendableTimer.h: * workers/WorkerGlobalScope.cpp: (WebCore::WorkerGlobalScope::setTimeout): (WebCore::WorkerGlobalScope::clearTimeout): (WebCore::WorkerGlobalScope::setInterval): (WebCore::WorkerGlobalScope::clearInterval): 2014-11-12 Dean Jackson Support unprefixed animation property names https://bugs.webkit.org/show_bug.cgi?id=138678 Reviewed by Simon Fraser. Step 1 of 3 in unprefixing CSS animations: handling the property names and values. Unlike other unprefixing, where we use an alias that effectively removes the prefixed values from the code, for animations we need to keep the old values around so that existing content will not break (e.g. computed style). During testing I noticed that we didn't handle the (relatively) new animation-direction values of "reverse" and "alternate-reverse" when querying computed style. Tests: animations/unprefixed-properties.html animations/unprefixed-shorthand.html * css/CSSComputedStyleDeclaration.cpp: (WebCore::ComputedStyleExtractor::propertyValue): Handle the unprefixed values, but also get animation direction to produce the correct results when "reverse" and "alternate-reverse" is specified. * css/CSSParser.cpp: Handle the new values. If necessary, pass a flag around indicating whether it is prefixed or unprefixed. (WebCore::CSSParser::parseValue): (WebCore::CSSParser::parseAnimationShorthand): Use the flag to decide which of the forms we're going to check. (WebCore::CSSParser::parseAnimationProperty): * css/CSSParser.h: * css/CSSProperty.h: (WebCore::prefixingVariantForPropertyId): Add prefixing/unprefixing variants for all the animation values, and clean up the code a bit. * css/CSSPropertyNames.in: Add new properties. * css/DeprecatedStyleBuilder.cpp: (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder): We need handlers for the unprefixed forms. This should move to the new StyleBuilder soon. * css/StyleProperties.cpp: Handle new values. (WebCore::StyleProperties::getPropertyValue): (WebCore::StyleProperties::asText): * css/StylePropertyShorthand.cpp: (WebCore::animationShorthand): (WebCore::animationShorthandForParsing): Decide which list of properties to use. (WebCore::shorthandForProperty): (WebCore::matchingShorthandsForLonghand): (WebCore::webkitAnimationShorthandForParsing): Deleted. * css/StylePropertyShorthand.h: * css/StyleResolver.cpp: Since the new properties come before "background" in alphabetical order, they are earlier in the CSSPropertyNames.in file, and thus we need to update the call sites that think CSSPropertyBackground is the first property. (WebCore::StyleResolver::styleForKeyframe): Replace CSSPropertyBackground with CSSPropertyAnimation. (WebCore::StyleResolver::styleForPage): (WebCore::StyleResolver::applyMatchedProperties): (WebCore::StyleResolver::applyProperty): 2014-11-12 Beth Dakin Speculative build fix. * WebCore.exp.in: 2014-11-12 Timothy Horton Fix the iOS build. * platform/spi/mac/DataDetectorsSPI.h: It's likely that more of this file should be compiled out on iOS, but this is all we need to build. 2014-11-12 Beth Dakin WK1: Support default actions for images https://bugs.webkit.org/show_bug.cgi?id=138668 -and corresponding- rdar://problem/18785434 Reviewed by Tim Horton. Symbol needed for copying image. * WebCore.exp.in: 2014-11-05 Ada Chan Implement new plug-in API for muting plug-ins https://bugs.webkit.org/show_bug.cgi?id=138105 Reviewed by Anders Carlsson. Add the new NPNVmuteAudioBool NPNVariable. Test: platform/mac-wk2/plugins/muted-state.html * plugins/npapi.h: 2014-11-12 Tim Horton Need to show the text indicator when Data Detectors shows a popover https://bugs.webkit.org/show_bug.cgi?id=138664 Reviewed by Beth Dakin. * platform/spi/mac/DataDetectorsSPI.h: Add new DataDetectors SPI. 2014-11-12 Chris Dumez Minor improvements to RenderListItem https://bugs.webkit.org/show_bug.cgi?id=138601 Reviewed by Darin Adler. Make several minor improvements to RenderListItem and clean up the code a bit. No new tests, no behavior change. * rendering/RenderListItem.cpp: (WebCore::isHTMLListElement): - Rename isList to isHTMLListElement() for clarity as it checks for HTMLOListElement and HTMLUListElement types - Inline the function as it is short. - Use is() for type checking - Update the argument to take a Node& instead of an Element*. This is because the argument is expected to the non-null. Also using looser typing here allows us to use this utility function is one more place, without impacting performance as hasTagName(HTMLQualifiedName) is defined on Node. (WebCore::enclosingList): - Pass the argument as a reference instead of a pointer as it is expected to be non-null. - Initialize firstNode before the loop to avoid the if (!firstNode) check for every iteration. (WebCore::nextListItem): - Take an Element as second argument instead of a RenderListItem* and provide convenience overloads so that we don't need to do null checks just because some calls sites call this function with 2 arguments and others with 1 argument. This way, we avoid unnecessary null checks as most call sites already do such checks (or have references). - Transform the while loop into a for loop for clarity. - Don't traverse an Element's subtree if the Element does not have a renderer as it is impossible of any of its descendant to have a renderer (and we are looking for a specific type of renderer). (WebCore::previousListItem): - Pass the item argument as a reference instead of a pointer as it is expected to be non-null. - Reduce the scope of the |current| so that it is now declared inside the loop. (WebCore::RenderListItem::updateItemValuesForOrderedList): (WebCore::RenderListItem::itemCountForOrderedList): - Pass argument as a reference instead of a pointer as it was expected to be non-null (There was an assertion in place to make sure of it). (WebCore::RenderListItem::calcValue): - Use is() instead of hasTagName(). (WebCore::getParentOfFirstLineBox): - Rename variables to stop using abbreviations. - Pass arguments as references instead of pointers as they are expected to be non-null. - Remove the firstChild null check before the loop as it does not change behavior. The loop will abort early if firstChild is null and we will end up returning nullptr as well. - Use is<>() more for type checking. - Reuse the isHTMLListElement() utility function instead of duplicating its code inside this function. (WebCore::firstNonMarkerChild): - Pass argument as a reference as it is expected to be non-null. - Rename variable from result to child for clarity, as we are traversing the children. (WebCore::RenderListItem::markerTextWithSuffix): - Use String appending instead of StringBuilder as it simplifies the code a lot and should not impact performance in this case. (WebCore::RenderListItem::explicitValueChanged): - Restructure the code a bit to do the |listNode| null check before the loop, now that nextListItem() takes a reference in argument. This is the only call site where we didn't already know that listNode is non-null. (WebCore::previousOrNextItem): - Mark this function as inline as it is short and called repeatedly. 2014-11-12 Chris Dumez Speed up HTMLTextFormControlElement::setInnerTextValue() a bit https://bugs.webkit.org/show_bug.cgi?id=138619 Reviewed by Darin Adler. Speed up HTMLTextFormControlElement::setInnerTextValue() a bit by: - Not doing a virtual isTextFormControl() call. Relying on innerTextElement() not returning null is sufficient. - Caching the result of innerTextElement() instead of repeatedly calling that virtual function. - De-virtualizing setFormControlValueMatchesRenderer() / formControlValueMatchesRenderer() as these are never overridden. - Moving the code constructing the innerTextValue from a TextControlInnerTextElement from innerTextValue() to a new innerTextValueFrom(TextControlInnerTextElement&) function and call this new function from setInnerTextValue() to avoid calling innerTextElement() again and making sure it is non-null - Do the tree traversal from innerTextElement's firstChild instead of from innerTextElement. The innerTextElement is a TextControlInnerTextElement. Therefore, it cannot be an HTMLBRElement or a Text node. No new tests, no behavior change. * html/HTMLFormControlElement.h: (WebCore::HTMLFormControlElement::formControlValueMatchesRenderer): (WebCore::HTMLFormControlElement::setFormControlValueMatchesRenderer): * html/HTMLTextFormControlElement.cpp: (WebCore::stripTrailingNewline): (WebCore::innerTextValueFrom): (WebCore::HTMLTextFormControlElement::setInnerTextValue): (WebCore::HTMLTextFormControlElement::innerTextValue): (WebCore::HTMLTextFormControlElement::valueWithHardLineBreaks): (WebCore::finishText): Deleted. 2014-11-12 Jer Noble [Mac] media/track/audio-track.html is flakey https://bugs.webkit.org/show_bug.cgi?id=138394 Reviewed by Alexey Proskuryakov. The above test fails if the HTMLMediaElement's "canplaythrough" event fires before the AudioTrackList's "addtrack" event fires. This can happen because each object keeps its own GenericEventQueue, which empties when that individual queue's timer fires. So events can be enqueued in the following order: 1, A, 2, B, 3, C; but fired in a different order: 1, 2, 3, A, B, C. Make events enqueued in GenericEventQueues globally ordered, so that events are fired in the order which they are enqueued, regardless of which object owns the queue. Use a static queue of GenericEventQueues to manage which GenericEventQueue fires and in what order. GenericEventQueues will use a WeakPtrFactory to cancel pending events. Revoking a GenericEventQueue's weak pointers means those queue's entries will be skipped the next time the meta-queue is processed. * dom/GenericEventQueue.cpp: (WebCore::GenericEventQueue::GenericEventQueue): Create a WeakPtrFactory instead of a Timer. (WebCore::GenericEventQueue::enqueueEvent): Enqueue this queue with the MetaQueue. (WebCore::GenericEventQueue::sharedTimer): Lazily-initializing accessor. (WebCore::GenericEventQueue::sharedTimerFired): Ask each queue to dispatch one event. (WebCore::GenericEventQueue::pendingQueues): Lazily-initializing accessor. (WebCore::GenericEventQueue::dispatchOneEvent): Renamed from timerFired. (WebCore::GenericEventQueue::close): Revoke all WeakPtrs. (WebCore::GenericEventQueue::cancelAllEvents): Ditto. (WebCore::GenericEventQueue::hasPendingEvents): Use !isEmpty(). (WebCore::GenericEventQueue::timerFired): Deleted. * dom/GenericEventQueue.h: 2014-11-12 Carlos Garcia Campos [GTK] Expose user script messages to GObject DOM bindings https://bugs.webkit.org/show_bug.cgi?id=138411 Reviewed by Philippe Normand. * PlatformGTK.cmake: Add WebKitDOMCustomUnstable.h to the list of installed headers and make a symlink for it in the DerivedSources dir. * bindings/gobject/WebKitDOMCustomUnstable.h: Added. * bindings/gobject/WebKitDOMCustom.cpp: (webkit_dom_dom_window_get_webkit_namespace): (webkit_dom_user_message_handlers_namespace_get_handler): * bindings/scripts/CodeGeneratorGObject.pm: (HasUnstableCustomAPI): Helper function to check if the given class has custom unstable API. (WriteData): Include WebKitDOMCustomUnstable.h header if the class has API defined there. 2014-11-12 Carlos Garcia Campos [GTK] Fix how SerializedScriptValue is exposed to GObject DOM bindings https://bugs.webkit.org/show_bug.cgi?id=138409 Reviewed by Philippe Normand. It's currently exposed as a WebKitDOMSerializedScriptValue class that doesn't really exist. It should be handled as a string, that is used to create a SerializedScriptValue when coming from the API, and converted to a string again when returned to the API. * bindings/scripts/CodeGeneratorGObject.pm: (GetGlibTypeName): Return gchar* as glib type of SerializedScriptValue. (IsGDOMClassType): Don't consider SerializedScriptValue as a GDOM class. (GenerateFunction): Handle SerializedScriptValue parameters and return values specially. * bindings/scripts/test/GObject/WebKitDOMTestCallback.cpp: (webkit_dom_test_callback_callback_with_serialized_script_value_param): * bindings/scripts/test/GObject/WebKitDOMTestCallback.h: * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp: (webkit_dom_test_obj_serialized_value): * bindings/scripts/test/GObject/WebKitDOMTestObj.h: * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.cpp: (webkit_dom_test_serialized_script_value_interface_class_init): (webkit_dom_test_serialized_script_value_interface_get_value): (webkit_dom_test_serialized_script_value_interface_set_value): (webkit_dom_test_serialized_script_value_interface_get_readonly_value): (webkit_dom_test_serialized_script_value_interface_get_cached_value): (webkit_dom_test_serialized_script_value_interface_set_cached_value): (webkit_dom_test_serialized_script_value_interface_get_cached_readonly_value): * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.h: * bindings/scripts/test/GObject/WebKitDOMTestTypedefs.cpp: (webkit_dom_test_typedefs_class_init): (webkit_dom_test_typedefs_get_immutable_serialized_script_value): (webkit_dom_test_typedefs_set_immutable_serialized_script_value): * bindings/scripts/test/GObject/WebKitDOMTestTypedefs.h: 2014-11-12 Carlos Garcia Campos [GTK] Move RedirectedXCompositeWindow from platform to WebKit2 layer https://bugs.webkit.org/show_bug.cgi?id=138093 Reviewed by Martin Robinson. Remove RedirectedXCompositeWindow. * PlatformGTK.cmake: 2014-09-01 Philippe Normand [WK2] UserMediaClient support https://bugs.webkit.org/show_bug.cgi?id=123158 Reviewed by Benjamin Poulain. Added document and frame accessors, needed by the UserMediaRequestManager of the WebProcess. Also added two methods used by the permission request manager to know if access to audio or video devices is requested. Tests: fast/mediastream/error.html fast/mediastream/success.html fast/mediastream/delayed-permission-allowed.html fast/mediastream/delayed-permission-denied.html http/tests/media/media-stream/disconnected-frame-already.html http/tests/media/media-stream/disconnected-frame-permission-denied.html http/tests/media/media-stream/disconnected-frame.html * Modules/mediastream/UserMediaRequest.cpp: (WebCore::UserMediaRequest::document): (WebCore::UserMediaRequest::frame): * Modules/mediastream/UserMediaRequest.h: (WebCore::UserMediaRequest::requiresAudio): (WebCore::UserMediaRequest::requiresVideo): 2014-11-12 Gyuyoung Kim [EFL] Clean up OwnPtr in RenderThemeEfl https://bugs.webkit.org/show_bug.cgi?id=138642 Reviewed by Zoltan Herczeg. No new tests, no behavior change. * platform/efl/RenderThemeEfl.cpp: (WebCore::RenderThemeEfl::applyEdjeRTLState): Clean up all remaining OwnPtr. 2014-11-11 Gyuyoung Kim Move Modules/websockets to std::unique_ptr https://bugs.webkit.org/show_bug.cgi?id=138649 Reviewed by Chris Dumez. Remove create() factory function and use std::make_unique<>, std::unique_ptr<> instead of OwnPtr, PassOwnPtr. However didReceiveBinaryData() is still using PassOwnPtr. It should be replaced with std::unique_ptr<> No new tests, no behavior. * Modules/websockets/ThreadableWebSocketChannelClientWrapper.h: * Modules/websockets/WebSocket.cpp: * Modules/websockets/WebSocketChannel.cpp: (WebCore::WebSocketChannel::connect): (WebCore::WebSocketChannel::didFail): (WebCore::WebSocketChannel::processFrame): (WebCore::WebSocketChannel::enqueueTextFrame): (WebCore::WebSocketChannel::enqueueRawFrame): (WebCore::WebSocketChannel::enqueueBlobFrame): (WebCore::WebSocketChannel::processOutgoingFrameQueue): (WebCore::WebSocketChannel::sendFrame): * Modules/websockets/WebSocketChannel.h: * Modules/websockets/WebSocketDeflateFramer.cpp: (WebCore::WebSocketDeflateFramer::createExtensionProcessor): (WebCore::WebSocketDeflateFramer::enableDeflate): (WebCore::WebSocketDeflateFramer::deflate): (WebCore::WebSocketDeflateFramer::inflate): (WebCore::WebSocketExtensionDeflateFrame::create): Deleted. * Modules/websockets/WebSocketDeflateFramer.h: (WebCore::DeflateResultHolder::create): Deleted. (WebCore::InflateResultHolder::create): Deleted. * Modules/websockets/WebSocketDeflater.cpp: (WebCore::WebSocketDeflater::WebSocketDeflater): (WebCore::WebSocketInflater::WebSocketInflater): (WebCore::WebSocketDeflater::create): Deleted. (WebCore::WebSocketInflater::create): Deleted. * Modules/websockets/WebSocketDeflater.h: * Modules/websockets/WebSocketExtensionDispatcher.cpp: (WebCore::WebSocketExtensionDispatcher::addProcessor): * Modules/websockets/WebSocketExtensionDispatcher.h: * Modules/websockets/WebSocketHandshake.cpp: (WebCore::WebSocketHandshake::addExtensionProcessor): * Modules/websockets/WebSocketHandshake.h: 2014-11-11 Chris Dumez Unreviewed iOS build fix after r176001. Export an additional symbol. * WebCore.exp.in: 2014-11-11 Jer Noble [Mac] Add diagnostic logging for per-media-engine load failures https://bugs.webkit.org/show_bug.cgi?id=138647 Reviewed by Eric Carlson. Add diagnostic logging fired whenever a media engine fails to load media, even if another engine subsequentially succeeds. Add a mechanism for retrieving the platform-specific error code from a given engine. * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::parseAttribute): * html/HTMLMediaElement.h: * page/DiagnosticLoggingKeys.cpp: (WebCore::DiagnosticLoggingKeys::engineFailedToLoadKey): * page/DiagnosticLoggingKeys.h: * platform/graphics/MediaPlayer.cpp: (WebCore::MediaPlayer::networkStateChanged): (WebCore::MediaPlayer::platformErrorCode): * platform/graphics/MediaPlayer.h: (WebCore::MediaPlayerClient::mediaPlayerEngineFailedToLoad): * platform/graphics/MediaPlayerPrivate.h: (WebCore::MediaPlayerPrivateInterface::platformErrorCode): * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h: (WebCore::MediaPlayerPrivateAVFoundation::platformErrorCode): * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp: (WebCore::MediaPlayerPrivateAVFoundationCF::assetErrorCode): * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h: * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h: * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: (WebCore::MediaPlayerPrivateAVFoundationObjC::assetErrorCode): * platform/graphics/mac/MediaPlayerPrivateQTKit.h: * platform/graphics/mac/MediaPlayerPrivateQTKit.mm: (WebCore::MediaPlayerPrivateQTKit::platformErrorCode): 2014-11-11 Chris Dumez Mark more virtual functions in HTMLInputElement as final https://bugs.webkit.org/show_bug.cgi?id=138644 Reviewed by Andreas Kling. Mark more virtual functions in HTMLInputElement as final to help the compiler optimize better. No new tests, no behavior change. * html/HTMLInputElement.h: 2014-11-11 Gyuyoung Kim Remove IncrementalSweeper::create() https://bugs.webkit.org/show_bug.cgi?id=138243 Reviewed by Filip Pizlo. As a step to use std::unique_ptr<> and std::make_unique<>, this patch removes IncrementalSweeper::create(), then set constructor of IncrementalSweeper to public. Now we begins to use std::make_unique<> to create IncrementalSweeper instance. No new tests, no behavior changes. * bindings/js/JSDOMWindowBase.cpp: (WebCore::JSDOMWindowBase::commonVM): * platform/ios/WebSafeIncrementalSweeperIOS.h: 2014-11-11 Chris Dumez Move 'border-image-*' / '-webkit-mask-box-image-*' CSS properties to the new StyleBuilder https://bugs.webkit.org/show_bug.cgi?id=138594 Reviewed by Antti Koivisto. Move 'border-image-*' / '-webkit-mask-box-image-*' CSS properties from DeprecatedStyleBuilder to the new StyleBuilder using custom code. No new tests, no behavior change. * css/CSSPropertyNames.in: * css/DeprecatedStyleBuilder.cpp: (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder): (WebCore::ApplyPropertyBorderImageModifier::getValue): Deleted. (WebCore::ApplyPropertyBorderImageModifier::setValue): Deleted. (WebCore::ApplyPropertyBorderImageModifier::applyInheritValue): Deleted. (WebCore::ApplyPropertyBorderImageModifier::applyInitialValue): Deleted. (WebCore::ApplyPropertyBorderImageModifier::applyValue): Deleted. (WebCore::ApplyPropertyBorderImageModifier::createHandler): Deleted. * css/StyleBuilderCustom.h: (WebCore::StyleBuilderFunctions::ApplyPropertyBorderImageModifier::applyInheritValue): (WebCore::StyleBuilderFunctions::ApplyPropertyBorderImageModifier::applyInitialValue): (WebCore::StyleBuilderFunctions::ApplyPropertyBorderImageModifier::applyValue): (WebCore::StyleBuilderFunctions::ApplyPropertyBorderImageModifier::getValue): (WebCore::StyleBuilderFunctions::ApplyPropertyBorderImageModifier::setValue): 2014-11-11 David Kilzer Modernize $buildingForIPhone in CodeGeneratorObjC.pm Reviewed by Daniel Bates. Mac OS X is the only platform that supports NSColor, so rename $buildingForIPhone to $shouldUseCGColor (which is actually what the variable represents) and define it in terms of the "macosx" platform name. * bindings/scripts/CodeGeneratorObjC.pm: ($buildingForIPhone): Rename to $shouldUseCGColor. ($shouldUseCGColor): False if PLATFORM_NAME is not defined, which is the case on older Xcodes when building for Mac OS X, or if PLATFORM_NAME is equal to "macosx". True otherwise. (GetClassName): Switch to use new variable name. (AddIncludesForType): Ditto. (GenerateHeader): Remove dead code. The $buildingForTigerOrEarlier variable was accidentally re-introduced in r161638, but was originally removed in r127032! (GenerateImplementation): Switch to use new variable name. 2014-11-11 Tim Horton Add support for mailto: link action menus https://bugs.webkit.org/show_bug.cgi?id=138641 Reviewed by Beth Dakin. * WebCore.exp.in: Add an export. * platform/spi/mac/DataDetectorsSPI.h: Add some DataDetectors SPI. 2014-11-11 Eric Carlson [iOS] video is sometimes allowed to play from the background https://bugs.webkit.org/show_bug.cgi?id=138522 Rubber-stamped by Jer Noble. * platform/audio/MediaSession.cpp: (WebCore::MediaSession::updateClientDataBuffering): Call MediaSessionManager::sessionCanLoadMedia. 2014-11-11 Eric Carlson [iOS] a page with video in optimized fullscreen is visible https://bugs.webkit.org/show_bug.cgi?id=138632 Reviewed by Anders Carlsson. * platform/ios/WebVideoFullscreenInterfaceAVKit.h: (WebCore::WebVideoFullscreenInterfaceAVKit::mode): Expose fullscreen mode. 2014-11-11 Myles C. Maxfield Mountain Lion build fix https://bugs.webkit.org/show_bug.cgi?id=138631 Reviewed by Simon Fraser. * platform/spi/cocoa/CoreTextSPI.h: 2014-11-11 Eric Carlson [iOS] cleanup wireless route monitoring https://bugs.webkit.org/show_bug.cgi?id=138614 Reviewed by Jer Noble. * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::clearMediaPlayer): Add logging. (WebCore::HTMLMediaElement::removeEventListener): Ditto. (WebCore::HTMLMediaElement::createMediaPlayer): Ditto. * platform/audio/ios/MediaSessionManagerIOS.mm: (WebCore::MediaSessionManageriOS::resetRestrictions): Add logging. (WebCore::MediaSessionManageriOS::configureWireLessTargetMonitoring): Ditto. (WebCore::MediaSessionManageriOS::updateNowPlayingInfo): Ditto. (-[WebMediaSessionHelper initWithCallback:]): Ditto. (-[WebMediaSessionHelper dealloc]): Always deallocate volume view and routing controller on the main thread. (-[WebMediaSessionHelper clearCallback]): Add logging. (-[WebMediaSessionHelper hasWirelessTargetsAvailable]): Ditto. (-[WebMediaSessionHelper startMonitoringAirPlayRoutes]): Always call routing controller on the main thread. (-[WebMediaSessionHelper stopMonitoringAirPlayRoutes]): Ditto. (-[WebMediaSessionHelper interruption:]): Add logging. (-[WebMediaSessionHelper applicationWillEnterForeground:]): Ditto. (-[WebMediaSessionHelper applicationDidBecomeActive:]): Ditto. (-[WebMediaSessionHelper applicationWillResignActive:]): Ditto. (-[WebMediaSessionHelper wirelessRoutesAvailableDidChange:]): Ditto. 2014-11-11 Myles C. Maxfield Unreviewd iOS build fix * platform/spi/cocoa/CoreTextSPI.h: 2014-11-11 David Kilzer Protect Document in ProcessingInstruction::setXSLStyleSheet() Reviewed by Andreas Kling. The patch is inspired by the following Blink revision by : * dom/ProcessingInstruction.cpp: (WebCore::ProcessingInstruction::setXSLStyleSheet): 2014-11-11 Myles C. Maxfield Finish moving CTFontGetVerticalGlyphsForCharacters and CTLineCreateWithUniCharProvider out from WKSI https://bugs.webkit.org/show_bug.cgi?id=138623 Reviewed by Geoff Garen. No new tests because there is no behavior change. * WebCore.exp.in: * WebCore.order: * platform/graphics/mac/GlyphPageTreeNodeMac.cpp: (WebCore::GlyphPage::fill): * platform/graphics/mac/SimpleFontDataMac.mm: (WebCore::SimpleFontData::canRenderCombiningCharacterSequence): * platform/ios/WebCoreSystemInterfaceIOS.mm: * platform/mac/WebCoreSystemInterface.h: * platform/mac/WebCoreSystemInterface.mm: * platform/spi/cocoa/CoreTextSPI.h: 2014-11-11 Myles C. Maxfield Unreviewed Mountain Lion build fix * platform/spi/cocoa/CoreTextSPI.h: 2014-11-11 Commit Queue Unreviewed, rolling out r175852. https://bugs.webkit.org/show_bug.cgi?id=138626 Broke PLT by introducing a crash. (Requested by rniwa on #webkit). Reverted changeset: "Lazily create HTMLInputElement's inputType and shadow subtree" https://bugs.webkit.org/show_bug.cgi?id=138524 http://trac.webkit.org/changeset/175852 2014-11-11 Chris Dumez Regression(r175947): Caused assertions in debug builds https://bugs.webkit.org/show_bug.cgi?id=138620 Reviewed by Benjamin Poulain. In HTMLCollection::traverseForward(), traversedCount was incremented 1 time too many when hitting the end of the collection (i.e. element becomes null). Doing a partial revert. No new tests, already covered by existing tests. * html/HTMLCollection.cpp: (WebCore::HTMLCollection::traverseForward): 2014-11-11 Tim Horton DataDetectors' menu items aren't presented in the telephone number menu https://bugs.webkit.org/show_bug.cgi?id=138602 Reviewed by Beth Dakin. * English.lproj/Localizable.strings: Remove a now-unused localized string. 2014-11-11 Daniel Bates [Frame Flattening] ASSERT(transaction->view == &view()) fails in RenderBlock::removeFromUpdateScrollInfoAfterLayoutTransaction() https://bugs.webkit.org/show_bug.cgi?id=138615 Reviewed by David Hyatt. Fixes an issue where we always expected that the RenderView associated with the RenderBlock called in RenderBlock::removeFromUpdateScrollInfoAfterLayoutTransaction() is the same as the RenderView associated with the top transaction in the UpdateScrollInfoAfterLayoutTransaction stack regardless of frame flattening. This expectation is only true when frame flattening is disabled. Test: fast/frames/flattening/iframe-flattening-inside-flexbox-with-delayed-scroll-update.html * rendering/RenderBlock.cpp: (WebCore::RenderBlock::removeFromUpdateScrollInfoAfterLayoutTransaction): 2014-11-11 Tim Horton Adopt DDActionContext menu type SPI https://bugs.webkit.org/show_bug.cgi?id=138603 Reviewed by Anders Carlsson. * platform/spi/mac/DataDetectorsSPI.h: Add the new SPI. 2014-11-11 Tim Horton Data Detectors popovers should be dismissed upon scrolling https://bugs.webkit.org/show_bug.cgi?id=138600 Reviewed by Beth Dakin. * platform/spi/mac/DataDetectorsSPI.h: Adjust the SPI header. 2014-11-11 Tim Horton Localize strings for action menus https://bugs.webkit.org/show_bug.cgi?id=138591 Reviewed by Dan Bates. * English.lproj/Localizable.strings: Add a bunch of localizable strings. 2014-11-11 Myles C. Maxfield Cleanup from r175379 https://bugs.webkit.org/show_bug.cgi?id=138616 Reviewed by Simon Fraser. No new tests because there is no behavior change. * WebCore.exp.in: * platform/ios/WebCoreSystemInterfaceIOS.mm: * platform/mac/WebCoreSystemInterface.h: * platform/mac/WebCoreSystemInterface.mm: 2014-11-11 Myles C. Maxfield Move CTFontTransformGlyphs out from WKSI https://bugs.webkit.org/show_bug.cgi?id=138599 Reviewed by Simon Fraser. No new tests because there is no behavior change. * WebCore.exp.in: * WebCore.order: * platform/graphics/SimpleFontData.cpp: (WebCore::SimpleFontData::applyTransforms): * platform/graphics/SimpleFontData.h: * platform/ios/WebCoreSystemInterfaceIOS.mm: * platform/mac/WebCoreSystemInterface.h: * platform/mac/WebCoreSystemInterface.mm: * platform/spi/cocoa/CoreTextSPI.h: 2014-11-11 Gyuyoung Kim Use std::unique_ptr<>|std::make_unique_ptr in RenderThemeEfl::ThemePartCacheEntry::create() https://bugs.webkit.org/show_bug.cgi?id=138558 Reviewed by Anders Carlsson. This patch removes PassOwnPtr and OwnPtr in RenderThemeEfl::ThemePartCacheEntry::create(). It would be good if we also remove create() factory function though, in this case, it is a little hard to remove it since the create() factory function does many works to create a ThemePartCacheEntry instance. Thus this patch just replaces PassOwnPtr|OwnPtr with std::unique_ptr<> and std::make_unique<> in RenderThemeEfl::ThemePartCacheEntry::create(). Besides the theme entries have been maintained by Eina_List*. Unfortunately it doesn't support std::unique_ptr<> yet. Thus the Eina_List* should be replaced with Vector> so that m_partCache has ownship of all EFL theme entries. This patch tries to keep original cache algorithm based on Vector class. No new tests, no behavior changes. * platform/efl/RenderThemeEfl.cpp: (WebCore::RenderThemeEfl::ThemePartCacheEntry::create): (WebCore::RenderThemeEfl::getThemePartFromCache): * platform/efl/RenderThemeEfl.h: 2014-11-09 Darin Adler Minor tweaks to HTMLCollection https://bugs.webkit.org/show_bug.cgi?id=138556 Reviewed by Chris Dumez. * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::addRadioButtonGroupMembers): Update for namedElements function that now returns a Vector; also use a new style for loop to iterate it. * bindings/js/JSHTMLAllCollectionCustom.cpp: Removed some unneeded includes. (WebCore::namedItems): Updated name to match WebKit coding style, and also updated to use the return value from namedItems, which now returns a Vector. (WebCore::callHTMLAllCollection): Updated for namedItems name change. Also removed explicit Node* type from result of namedItemWithIndex, since that function now returns a more specific type. (WebCore::JSHTMLAllCollection::nameGetter): Update for namedItems name change. (WebCore::JSHTMLAllCollection::item): Ditto. (WebCore::JSHTMLAllCollection::namedItem): Ditto. * bindings/js/JSHTMLFormControlsCollectionCustom.cpp: Removed some unneeded includes. (WebCore::namedItems): Updated name to match WebKit coding style, and also updated to use the return value from namedItems, which now returns a Vector. (WebCore::JSHTMLFormControlsCollection::nameGetter): Update for namedItems name change. (WebCore::JSHTMLFormControlsCollection::namedItem): Ditto. * bindings/js/JSHTMLFormElementCustom.cpp: (WebCore::JSHTMLFormElement::nameGetter): Updated to use the return value from namedItems, which now returns a Vector. * html/HTMLAllCollection.cpp: (WebCore::HTMLAllCollection::HTMLAllCollection): Marked the constructor inline, since it's only used in one place, the create function. (WebCore::HTMLAllCollection::~HTMLAllCollection): Deleted. No need to have an explicit destructor since there's nothing special to implement, and includers of the header file have everything they ened to compile the compiler-generated one. (WebCore::HTMLAllCollection::namedItemWithIndex): Changed return type to Element. * html/HTMLAllCollection.h: Removed unneeded explicit declaration of destructor. Chagned return type of namedItemWithIndex to Element. * html/HTMLCollection.cpp: (WebCore::HTMLCollection::rootTypeFromCollectionType): Marked this inline. Also changed this to be a static member function so it can use the RootType enum, which is now private to the class. (WebCore::isMatchingHTMLElement): Marked this function static so it will get internal linkage. (WebCore::isMatchingElement): Ditto. (WebCore::previousElement): Marked this function inline since it's called in only one place. Changed argument type to a reference since it can never be null. (WebCore::HTMLCollection::iterateForPreviousElement): Changed argument name and also updated for above changes. (WebCore::firstMatchingElement): Marked this function static so it will get internal linkage. (WebCore::nextMatchingElement): Ditto. Changed argument type to a reference since it can never be null. (WebCore::HTMLCollection::item): Changed return type to Element. (WebCore::nameShouldBeVisibleInDocumentAll): Added an overload that takes an Element. This streamlines the code below that calls it so it fits on one line. (WebCore::firstMatchingChildElement): Marked this function static so it will get internal linkage. (WebCore::nextMatchingSiblingElement): Ditto. Changed argument type to a reference since it can never be null. (WebCore::HTMLCollection::usesCustomForwardOnlyTraversal): Moved here from the header since, although it's marked inline, it's only used inside this file. (WebCore::HTMLCollection::traverseForward): Restructured the code a little bit to make the function smaller and possibly easier to read. This does add one redundant null check, but it seems OK to do that. (WebCore::HTMLCollection::collectionTraverseBackward): Tweaked foramtting a bit. (WebCore::HTMLCollection::namedItem): Changed return type to Element. Tightened the code that calls nameShouldBeVisibleInDocumentAll so it fits better on one line. Changed code that handles m_shouldOnlyIncludeDirectChildren to use a nested if instead of an && since it makes the code a little easier to read. (WebCore::HTMLCollection::updateNamedElementCache): Tweaked code a little bit, using shorter variable names, and using references instead of pointers. Also removed the call to didPopulate, since setNamedItemCache now takes care of that. (WebCore::HTMLCollection::namedItems): Changed to return a Vector instead of appending to an existing one. Also use reserveInitialCapacity and uncheckedAppend for better performance. Added a FIXME, because there seems to be something wrong here about this being non-virtual. Made other small tweaks to streamline the code. (WebCore::HTMLCollection::customElementAfter): Moved this here from the header. There is no reason to need to inline this. * html/HTMLCollection.h: Removed unneeded includes. Moved function bodies out of the class definitions so the class definitions are easier to read. Made some functions that were formerly public or protected be private instead. Added a call to didPopulate to setNamedItemCache so the callers don't have to do it. * html/HTMLFormControlsCollection.cpp: (WebCore::HTMLFormControlsCollection::namedItem): Changed return value to Element. Tweaked coding style a little bit. (WebCore::HTMLFormControlsCollection::updateNamedElementCache): Rearranged to simplify a bit. Don't build the foundInputElements set when the owner is not a form element, since we don't use the set in that case. Use shorter variable names, and modern for loops. Also removed the call to didPopulate, since setNamedItemCache now takes care of that. * html/HTMLFormControlsCollection.h: Removed some uneeded forward declarations. Updated return type for namedItem, and also made the override private. * html/HTMLFormElement.cpp: (WebCore::HTMLFormElement::namedElements): Changed to return a Vector and updated function name accordingly. * html/HTMLFormElement.h: Ditto. * html/HTMLNameCollection.h: Removed a stray blank line. * html/HTMLSelectElement.cpp: (WebCore::HTMLSelectElement::namedItem): Changed return value to Element. (WebCore::HTMLSelectElement::item): Ditto. * html/HTMLSelectElement.h: Ditto. * page/scrolling/AxisScrollSnapOffsets.cpp: (WebCore::appendChildSnapOffsets): Rewrote loop as a for loop rather than a while loop. Removed unwanted use of children()->collectionBegin() to get the first element child of an HTMLElement. This function uses a mix of DOM and rendering functions that is probably incorrect, but I did not tackle fixing that at this time. 2014-11-11 Dan Bernstein [Mac] WebCore includes unused cursor image resources https://bugs.webkit.org/show_bug.cgi?id=138605 Reviewed by Anders Carlsson. * Resources/aliasCursor.png: Removed. * Resources/cellCursor.png: Removed. * Resources/contextMenuCursor.png: Removed. * Resources/copyCursor.png: Removed. * Resources/eastResizeCursor.png: Removed. * Resources/eastWestResizeCursor.png: Removed. * Resources/helpCursor.png: Removed. * Resources/linkCursor.png: Removed. * Resources/moveCursor.png: Removed. * Resources/noDropCursor.png: Removed. * Resources/noneCursor.png: Removed. * Resources/northEastResizeCursor.png: Removed. * Resources/northEastSouthWestResizeCursor.png: Removed. * Resources/northResizeCursor.png: Removed. * Resources/northSouthResizeCursor.png: Removed. * Resources/northWestResizeCursor.png: Removed. * Resources/northWestSouthEastResizeCursor.png: Removed. * Resources/progressCursor.png: Removed. * Resources/southEastResizeCursor.png: Removed. * Resources/southResizeCursor.png: Removed. * Resources/southWestResizeCursor.png: Removed. * Resources/verticalTextCursor.png: Removed. * Resources/waitCursor.png: Removed. * Resources/westResizeCursor.png: Removed. * Resources/zoomInCursor.png: Removed. * Resources/zoomOutCursor.png: Removed. * WebCore.xcodeproj/project.pbxproj: Removed references to the above files. * platform/mac/CursorMac.mm: (WebCore::Cursor::ensurePlatformCursor): For Help, Cell, ZoomIn and ZoomOut, don’t check for a nil return value from wkCursor(), which can’t occur in any supported configuration. For None, create a cursor with an empty NSImage instead of loading a transparent image from the file system. (WebCore::createNamedCursor): Deleted. 2014-11-11 Gyuyoung Kim Unreviewed, rolling out r175844. Win debug build has broken since r175844. Reverted changeset: "Use std::unique_ptr<> and std::make_unique<> in WebCore" https://bugs.webkit.org/show_bug.cgi?id=138560 http://trac.webkit.org/changeset/175844 2014-11-11 Philippe Normand Qt/Chromium remnants in MediaPlayer https://bugs.webkit.org/show_bug.cgi?id=138611 Reviewed by Jer Noble. * platform/graphics/MediaPlayer.h: Remove unused Qt/Chromium stuff. 2014-11-11 Chris Dumez Move '-webkit-marquee-speed' CSS property to the new StyleBuilder https://bugs.webkit.org/show_bug.cgi?id=138595 Reviewed by Antti Koivisto. Move '-webkit-marquee-speed' CSS property from DeprecatedStyleBuilder to the new StyleBuilder by adding a new MarqueeSpeed Converter. No new tests, no behavior change. * css/CSSPropertyNames.in: * css/DeprecatedStyleBuilder.cpp: (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder): (WebCore::ApplyPropertyMarqueeSpeed::applyValue): Deleted. (WebCore::ApplyPropertyMarqueeSpeed::createHandler): Deleted. * css/StyleBuilderConverter.h: (WebCore::StyleBuilderConverter::convertMarqueeSpeed): 2014-10-07 Sergio Villar Senin [CSS Grid Layout] Limit the size of explicit/implicit grid https://bugs.webkit.org/show_bug.cgi?id=136217 Reviewed by Andreas Kling. A recent change in the specs allow us to set a limit (maximum size) for both the explicit and implicit grids so we can protect ourselves from absurdly huge grid specifications. It was decided to use the recommended limit which is 1 million. This means that we can remove the old limitation for the number of repetitions in repeat(). Instead we now clamp the number of repetitions to the maximum value that allow us to have the maximum number of whole repetitions without exceeding the track number limit. * WebCore.xcodeproj/project.pbxproj: * css/CSSParser.cpp: (WebCore::CSSParser::parseGridTrackRepeatFunction): Replaced the old limit by the new one. * rendering/RenderGrid.cpp: (WebCore::RenderGrid::placeItemsOnGrid): Use the amount of tracks provided by GridResolvedPosition. (WebCore::RenderGrid::populateExplicitGridAndOrderIterator): Ditto. * rendering/style/GridCoordinate.h: (WebCore::GridSpan::GridSpan): * rendering/style/GridResolvedPosition.cpp: (WebCore::GridResolvedPosition::explicitGridColumnCount): Bring the static function back to life. (WebCore::GridResolvedPosition::explicitGridRowCount): Ditto. (WebCore::explicitGridSizeForSide): * rendering/style/GridResolvedPosition.h: 2014-11-11 Yusuke Suzuki CSS4 Selectors: Add multiple pseudo elements support to :matches https://bugs.webkit.org/show_bug.cgi?id=138214 Reviewed by Benjamin Poulain. In this patch, we implement (multiple) pseudo elements support to :matches. Currently, we implemented it in css/SelectorChecker and there's no CSS JIT implementation. And we change the semantics of pseudo element selector behavior. Previously when pseudo element selector appeared in the non-rightmost fragment, it was ignored. This patch changes it to unmatched. * css/SelectorChecker.cpp: (WebCore::SelectorChecker::CheckingContextWithStatus::CheckingContextWithStatus): (WebCore::SelectorChecker::match): (WebCore::hasScrollbarPseudoElement): (WebCore::SelectorChecker::matchRecursively): (WebCore::SelectorChecker::checkOne): (WebCore::SelectorChecker::matchSelectorList): * css/SelectorChecker.h: (WebCore::SelectorChecker::MatchResult::matches): (WebCore::SelectorChecker::MatchResult::updateWithMatchType): (WebCore::SelectorChecker::MatchResult::fails): * cssjit/SelectorCompiler.cpp: (WebCore::SelectorCompiler::addPseudoClassType): (WebCore::SelectorCompiler::SelectorCodeGenerator::SelectorCodeGenerator): (WebCore::SelectorCompiler::constructFragments): (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementHasPseudoElement): * rendering/style/RenderStyle.h: (WebCore::RenderStyle::setHasPseudoStyles): * rendering/style/RenderStyleConstants.h: (WebCore::PseudoIdSet::PseudoIdSet): (WebCore::PseudoIdSet::fromMask): (WebCore::PseudoIdSet::has): (WebCore::PseudoIdSet::add): (WebCore::PseudoIdSet::merge): (WebCore::PseudoIdSet::operator &): (WebCore::PseudoIdSet::operator |): (WebCore::PseudoIdSet::operator bool): (WebCore::PseudoIdSet::data): 2014-11-10 Chris Dumez Lazily create HTMLInputElement's inputType and shadow subtree https://bugs.webkit.org/show_bug.cgi?id=138524 Reviewed by Ryosuke Niwa. When an HTMLInputElement was created by the parser, we would first call HTMLInputElement::create(), then call Element::parserSetAttributes() on the constructed input. With the previous implementation, this was a bit inefficient because HTMLInputElement::create() would construct a TextInputType inputType (as this is the default) as well as its corresponding shadow subtree. Then, parserSetAttributes() would often set the |type| attribute and would need to destroy this input type as well as its subtree if the new |type| is not 'text', to create a new inputType / shadow subtree of the right type. The profiler showed that this was fairly expensive. To improve this, this patch delays the inputType / shadow subtree creation when the HTMLInputElement is constructed by the parser, until the attributes are actually set by the parser. This way, we directly create an inputType / shadow subtree of the right type. I see a 1.4% speed up on speedometer (73.95 -> 75.0). No new tests, no behavior change. * dom/Element.cpp: (WebCore::Element::parserSetAttributes): (WebCore::Element::parserDidFinishParsingAttributes): * dom/Element.h: * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::HTMLInputElement): (WebCore::HTMLInputElement::create): (WebCore::HTMLInputElement::updateType): (WebCore::HTMLInputElement::runPostTypeUpdateTasks): (WebCore::HTMLInputElement::ensureInputType): (WebCore::HTMLInputElement::parseAttribute): (WebCore::HTMLInputElement::parserDidFinishParsingAttributes): * html/HTMLInputElement.h: 2014-11-10 Benjamin Poulain Add parsing support for the extended :nth-last-child(An+B of selector-list) defined https://bugs.webkit.org/show_bug.cgi?id=138520 Reviewed by Andreas Kling. Add parsing for :nth-last-child(An+B of selector-list). The selector is defined in CSS Selectors Level 4: http://dev.w3.org/csswg/selectors4/#the-nth-last-child-pseudo Tests: fast/css/parsing-css-nth-last-child-of-1.html fast/css/parsing-css-nth-last-child-of-2.html fast/css/parsing-css-nth-last-child-of-3.html fast/css/parsing-css-nth-last-child-of-4.html * css/CSSGrammar.y.in: * css/CSSParser.cpp: (WebCore::CSSParser::detectFunctionTypeToken): * css/CSSSelector.cpp: (WebCore::CSSSelector::selectorText): 2014-11-10 Said Abou-Hallawa SVG foreign objects do not inherit the container coordinates system if they are repainted. https://bugs.webkit.org/show_bug.cgi?id=138481. Reviewed by Simon Fraser. If a foreign object is included in an SVG, it should inherit the coordinates system of the container if it is repainted. The foreign object is actually redrawn in the CSS coordinates system regardless of the transformation that may be applied to the container. The bug is RenderSVG* classes use computeFloatRectForRepaint(), but the rest of the render classes use computeRectForRepaint(). RenderSVGForeignObject::computeRectForRepaint() was not defined, so we end up hitting RenderObject::computeRectForRepaint() for a RenderSVGTransformableContainer and completely miss the transform. Tests: svg/transforms/svg-transform-foreign-object-repaint.html Implement RenderSVGForeignObject::computeRectForRepaint() so we can apply the container transformation on the SVG foreign object repaint rectangle. * rendering/svg/RenderSVGForeignObject.cpp: (WebCore::RenderSVGForeignObject::computeRectForRepaint): * rendering/svg/RenderSVGForeignObject.h: 2014-11-10 Gyuyoung Kim Use std::unique_ptr<> and std::make_unique<> in WebCore https://bugs.webkit.org/show_bug.cgi?id=138560 Reviewed by Chris Dumez. Clean up unused OwnPtr.h and PassOwnPtr.h and use std::unique_ptr. No new tests, no behavior changes. * Modules/encryptedmedia/CDMPrivateMediaPlayer.h: * dom/ContainerNode.h: * dom/ElementIteratorAssertions.h: (WebCore::ElementIteratorAssertions::ElementIteratorAssertions): * dom/ElementRareData.h: * page/DragController.h: * rendering/RenderView.h: 2014-11-10 Beth Dakin WK1: Support default actions for editable text with misspelled word https://bugs.webkit.org/show_bug.cgi?id=138590 -and corresponding- rdar://problem/18877506 Reviewed by Tim Horton. * WebCore.exp.in: 2014-11-10 Chris Dumez Remove unnecessary null check in FrameSelection::nodeWillBeRemoved() https://bugs.webkit.org/show_bug.cgi?id=138578 Reviewed by Andreas Kling. Remove unnecessary null check in FrameSelection::nodeWillBeRemoved() and turn the argument into a reference to make it clear it cannot be null. No new tests, no behavior change. * dom/ContainerNode.cpp: (WebCore::ContainerNode::willRemoveChild): * dom/Document.cpp: (WebCore::Document::nodeChildrenWillBeRemoved): (WebCore::Document::nodeWillBeRemoved): * dom/Document.h: * dom/NodeIterator.cpp: (WebCore::NodeIterator::nodeWillBeRemoved): (WebCore::NodeIterator::updateForNodeRemoval): * dom/NodeIterator.h: * dom/Range.cpp: (WebCore::Range::insertNode): (WebCore::boundaryNodeWillBeRemoved): (WebCore::Range::nodeWillBeRemoved): * dom/Range.h: * dom/RangeBoundaryPoint.h: (WebCore::RangeBoundaryPoint::setToBeforeChild): * editing/CompositeEditCommand.cpp: (WebCore::CompositeEditCommand::updatePositionForNodeRemovalPreservingChildren): * editing/CompositeEditCommand.h: * editing/DeleteSelectionCommand.cpp: (WebCore::DeleteSelectionCommand::removeNode): (WebCore::DeleteSelectionCommand::handleGeneralDelete): (WebCore::DeleteSelectionCommand::removeRedundantBlocks): * editing/FrameSelection.cpp: (WebCore::removingNodeRemovesPosition): (WebCore::DragCaretController::nodeWillBeRemoved): (WebCore::FrameSelection::nodeWillBeRemoved): (WebCore::FrameSelection::respondToNodeModification): * editing/FrameSelection.h: * editing/ReplaceSelectionCommand.cpp: (WebCore::ReplaceSelectionCommand::mergeTextNodesAroundPosition): * editing/htmlediting.cpp: (WebCore::updatePositionForNodeRemoval): * editing/htmlediting.h: * page/EventHandler.cpp: (WebCore::EventHandler::nodeWillBeRemoved): * page/EventHandler.h: 2014-11-10 Benjamin Poulain Fix the build when CSS Selectors Level 4 is disabled https://bugs.webkit.org/show_bug.cgi?id=138533 * css/CSSSelector.cpp: (WebCore::appendArgumentList): * cssjit/SelectorCompiler.cpp: (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementLinkMatching): 2014-11-10 Chris Dumez Support throttling of DOMTimers using nested setTimeout() calls https://bugs.webkit.org/show_bug.cgi?id=138262 Reviewed by Gavin Barraclough. Extend DOMTimers throttling support to timers that are using nested setTimeout() calls instead of a setInterval(). To achieve this, this patch introduces a NestedTimersMap singleton class where nested timers are added, and for which we potentially update the next firing time, after the parent timer is done executing. I have verified this helps on ebay.com for example, which has timers interacting with non-visible plugins that are scheduled using nested setTimeout() calls with a frequency of 150 / 200 ms. This is a second take on r175441, which caused intermittent crashes. This time, nested timers are removed from the NestedTimersMap when DOMTimer::removeById() is called. It would be unsafe to use the nested timer afterwards because we don't hold a strong reference to it and the ScriptExecutionContext is unref'ing the DOMTimer when ScriptExecutionContext::removeTimeout() is called from DOMTimer::removeById(). * page/DOMTimer.cpp: (WebCore::NestedTimersMap::NestedTimersMap): (WebCore::NestedTimersMap::~NestedTimersMap): (WebCore::NestedTimersMap::add): (WebCore::NestedTimersMap::remove): (WebCore::NestedTimersMap::begin): (WebCore::NestedTimersMap::end): (WebCore::DOMTimer::install): (WebCore::DOMTimer::removeById): (WebCore::DOMTimer::fired): 2014-11-10 Jer Noble [EME][Mac] Add a systemCode to distinguish when no expired sessions were found in response to a "keyrelease" message. https://bugs.webkit.org/show_bug.cgi?id=138199 Reviewed by Eric Carlson. Clients may want to be able to distinguish between cases where expired session data is not supported, and when those data are supported, but none are found. * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm: (WebCore::CDMSessionMediaSourceAVFObjC::generateKeyReleaseMessage): 2014-11-04 Jer Noble REGRESSION(r174823): Several tests fail due to canplaythrough firing before tracks are available https://bugs.webkit.org/show_bug.cgi?id=137882 Reviewed by Eric Carlson. For HLS streams with only one video, audio, or text track, there will be no media selection group for that media characteristic. When culling out AVPlayerItemTracks in tracksDidChange(), do not skip tracks for which there is no matching AVMediaSelectionGroup. * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h: * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: (WebCore::MediaPlayerPrivateAVFoundationObjC::hasLoadedMediaSelectionGroups): Refactored. (WebCore::MediaPlayerPrivateAVFoundationObjC::safeMediaSelectionGroupForLegibleMedia): Call above. (WebCore::MediaPlayerPrivateAVFoundationObjC::safeMediaSelectionGroupForAudibleMedia): Ditto. (WebCore::MediaPlayerPrivateAVFoundationObjC::safeMediaSelectionGroupForVisualMedia): Ditto. (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksDidChange): 2014-11-10 Commit Queue Unreviewed, rolling out r175813. https://bugs.webkit.org/show_bug.cgi?id=138573 Breaks complex text layout spacing (Requested by litherum on #webkit). Reverted changeset: "[OSX] Some words are placed on top of each other in complex text layout" https://bugs.webkit.org/show_bug.cgi?id=138348 http://trac.webkit.org/changeset/175813 2014-11-10 Beth Dakin Rolling out failed build fix http://trac.webkit.org/changeset/175819 * WebCore.exp.in: 2014-11-10 Beth Dakin Speculative build fix. * WebCore.exp.in: 2014-11-10 Beth Dakin Speculative build fix. * WebCore.exp.in: 2014-11-10 Simon Fraser [iOS WK2] Layers with negative z position disapear behind the page tiles https://bugs.webkit.org/show_bug.cgi?id=138571 rdar://problem/18873480 Reviewed by Dean Jackson. Some crufty iOS-only code in RenderLayerBacking::parentForSublayers() caused us to fail to use the m_childContainmentLayer as the ancestor for descendants, so layers with negative z position would get depth-sorted behind the tiles. Fix by removing that code. This should have been detected by compositing/tile-cache-must-flatten.html, but testing infrastructure suck prevented us from doing so. * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::parentForSublayers): * rendering/RenderLayerBacking.h: Just some nullptr cleanup. 2014-11-10 Chris Dumez Move 'resize' CSS property to the new StyleBuilder https://bugs.webkit.org/show_bug.cgi?id=138550 Reviewed by Andreas Kling. No new tests, no behavior change. Move 'resize' CSS property from DeprecatedStyleBuilder to the new StyleBuilder by adding a new 'Resize' Converter function. * css/CSSPropertyNames.in: * css/DeprecatedStyleBuilder.cpp: (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder): (WebCore::ApplyPropertyResize::applyValue): Deleted. (WebCore::ApplyPropertyResize::createHandler): Deleted. * css/StyleBuilderConverter.h: (WebCore::StyleBuilderConverter::convertResize): 2014-11-10 Beth Dakin Speculative build fix. * editing/DictionaryLookup.h: * editing/DictionaryLookup.mm: 2014-11-10 Chris Dumez Move 'text-indent' CSS property to the new StyleBuilder https://bugs.webkit.org/show_bug.cgi?id=138547 Reviewed by Andreas Kling. Move 'text-indent' CSS property from DeprecatedStyleBuilder to the new StyleBuilder, by using custom code. No new tests, no behavior change. * css/CSSPropertyNames.in: * css/DeprecatedStyleBuilder.cpp: (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder): (WebCore::ApplyPropertyTextIndent::applyInheritValue): Deleted. (WebCore::ApplyPropertyTextIndent::applyInitialValue): Deleted. (WebCore::ApplyPropertyTextIndent::applyValue): Deleted. (WebCore::ApplyPropertyTextIndent::createHandler): Deleted. * css/StyleBuilderConverter.h: * css/StyleBuilderCustom.h: (WebCore::StyleBuilderFunctions::applyInheritTextIndent): (WebCore::StyleBuilderFunctions::applyInitialTextIndent): (WebCore::StyleBuilderFunctions::applyValueTextIndent): 2014-11-10 Beth Dakin WK1: Support default actions for read-only text https://bugs.webkit.org/show_bug.cgi?id=138552 -and corresponding- rdar://problem/18877483 Reviewed by Tim Horton. WK1 now needs to do a lot of dictionary lookup operations that it did not previously have to handle. So this patch takes a lot of that functionality, which was implemented as static functions in WebPageMac for WK2 and moves it into WebCore. * WebCore.exp.in: * WebCore.xcodeproj/project.pbxproj: * editing/DictionaryLookup.h: Added. * editing/DictionaryLookup.mm: Added. (WebCore::isPositionInRange): (WebCore::shouldUseSelection): (WebCore::rangeExpandedAroundPositionByCharacters): (WebCore::rangeForDictionaryLookupForSelection): (WebCore::rangeForDictionaryLookupAtHitTestResult): * platform/mac/WebCoreSystemInterface.h: * platform/mac/WebCoreSystemInterface.mm: 2014-11-10 Myles C. Maxfield [OSX] Some words are placed on top of each other in complex text layout https://bugs.webkit.org/show_bug.cgi?id=138348 Reviewed by Simon Fraser. Some complex text layouts have lots of diacritics being placed all over the place. CoreText sometimes compensates for this by adjusting the advances of the glyphs throughout the string to make glyphs appear in the correct place. This means that we can't naively cache the width of a space character; instead, we must obey CoreText when it gives us an advance for a space. Test: fast/text/large-space-width-complex.html * platform/graphics/mac/ComplexTextController.cpp: (WebCore::ComplexTextController::adjustGlyphsAndAdvances): 2014-11-10 Eric Carlson [iOS] wireless playback placeholder UI doesn't always draw https://bugs.webkit.org/show_bug.cgi?id=138548 While it is important to only listen for the 'webkitplaybacktargetavailabilitychanged' event when we are displaying inline controls because listening for it increases power consumption, we should always listen for the 'webkitcurrentplaybacktargetiswirelesschanged' event because it controls whether or not we draw the placeholder UI which is always visible during wireless playback. Reviewed by Brent Fulgham. * Modules/mediacontrols/mediaControlsiOS.js: (ControllerIOS.prototype.addVideoListeners): Always listen for the 'webkitcurrentplaybacktargetiswirelesschanged' event. (ControllerIOS.prototype.removeVideoListeners): Always stop listening for the 'webkitcurrentplaybacktargetiswirelesschanged' event. (ControllerIOS.prototype.handleStartPlaybackButtonTouchEnd): Call updateControls so we update the type of controls rendered and start listening for wireless target changes immediately. (ControllerIOS.prototype.setShouldListenForPlaybackTargetAvailabilityEvent): Don't start and stop listening for 'webkitcurrentplaybacktargetiswirelesschanged', we should always listen for it. 2014-11-10 Csaba Osztrogonác Crash in WebCore::Node::getFlag https://bugs.webkit.org/show_bug.cgi?id=137961 Reviewed by Antti Koivisto. * editing/ApplyStyleCommand.cpp: (WebCore::ApplyStyleCommand::applyBlockStyle): Null pointer check added. 2014-11-10 Mihnea Ovidenie ASSERTION FAILED: !object || !object->parent()->isRuby() || is(*object) || (object->isInline() && (object->isBeforeContent() || object->isAfterContent())) || (object->isAnonymous() && ... ) in WebCore::isAnonymousRubyInlineBlock https://bugs.webkit.org/show_bug.cgi?id=137958 Reviewed by Chris Dumez. When a ruby element, with block behavior, dynamically changes its style from multicol to without multicol, we have to remove its special children, RenderMultiColumnFlowThread and RenderMultiColumnSet, the normal way using the method in RenderBlockFlow base class. This patch adds both RenderMultiColumnFlowThread and RenderMultiColumnSet to the list of RenderRuby children removed normally and adds a new function - isRubyChildForNormalRemove - to test the condition and use it in the assertion in RenderRuby*::removeChild method. Test: fast/multicol/newmulticol/ruby-from-multicol-to-auto.html * rendering/RenderRuby.cpp: (WebCore::isRubyChildForNormalRemove): (WebCore::RenderRubyAsInline::removeChild): (WebCore::RenderRubyAsBlock::removeChild): 2014-11-09 Gyuyoung Kim [EFL] Remove GamepadDeviceEfl::create() https://bugs.webkit.org/show_bug.cgi?id=138553 Reviewed by Darin Adler. As a step to use std::unique_ptr<> and std::make_unique<>, this patch removes GamepadDeviceEfl::create(). Instead we use std::make_unique<>. No new tests, no behavior changes. * platform/efl/GamepadsEfl.cpp: (WebCore::GamepadsEfl::registerDevice): (WebCore::GamepadDeviceEfl::create): Deleted. (WebCore::GamepadsEfl::unregisterDevice): Deleted. 2014-11-09 Gyuyoung Kim Remove create() factory function in FooAnimationValue classes https://bugs.webkit.org/show_bug.cgi?id=138206 Reviewed by Darin Adler. As a step to use std::unique_ptr and std::make_unique, this patch removes create() factory function in FooAnimationValue classes. As this changes, FooAnimationValue::create() are changed to std::make_unique<>. No new tests, no behavior changes. * platform/graphics/GraphicsLayer.cpp: (WebCore::KeyframeValueList::insert): * platform/graphics/GraphicsLayer.h: (WebCore::FloatAnimationValue::FloatAnimationValue): (WebCore::TransformAnimationValue::TransformAnimationValue): (WebCore::FilterAnimationValue::FilterAnimationValue): (WebCore::FloatAnimationValue::create): Deleted. (WebCore::TransformAnimationValue::create): Deleted. (WebCore::FilterAnimationValue::create): Deleted. * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::startAnimation): (WebCore::RenderLayerBacking::startTransition): 2014-11-09 Chris Dumez Add a more correct way to compare floating point numbers and use it https://bugs.webkit.org/show_bug.cgi?id=138527 Reviewed by Darin Adler. Use the new WTF::areEssentuallyEqual() utility function from MathExtras.h to compare floating-point numbers. No new tests, no behavior change. * page/DOMTimer.cpp: (WebCore::DOMTimer::updateTimerIntervalIfNecessary): * platform/graphics/FloatQuad.cpp: (WebCore::FloatQuad::isRectilinear): * platform/graphics/FloatRoundedRect.cpp: (WebCore::FloatRoundedRect::Radii::isUniformCornerRadius): * platform/graphics/FloatSize.h: (WebCore::areEssentiallyEqual): (WebCore::withinEpsilon): Deleted. 2014-11-08 Simon Fraser Implement round-rect clipping on video elements https://bugs.webkit.org/show_bug.cgi?id=138537 rdar://problem/9534399 Reviewed by Darin Adler. Support border-radius on video and other layers with composited contents, by pushing a FloatRoundedRect onto the GraphicsLayer as the contentsClippingRect, and, on Mac, using layer corner-radius or a CAShapeLayer mask. Test: compositing/video/video-border-radius.html * WebCore.exp.in: * platform/graphics/FloatRoundedRect.cpp: (WebCore::FloatRoundedRect::Radii::isUniformCornerRadius): Returns true if all corner radii are the same, and have equal widths and heights. * platform/graphics/FloatRoundedRect.h: Allow construction without an explicit rect. * platform/graphics/GraphicsLayer.cpp: (WebCore::GraphicsLayer::GraphicsLayer): nullptr goodness. (showGraphicsLayerTree): Print contents layers when debugging. * platform/graphics/GraphicsLayer.h: (WebCore::GraphicsLayer::contentsClippingRect): Make this take a FloatRoundedRect. (WebCore::GraphicsLayer::setContentsClippingRect): * platform/graphics/ca/GraphicsLayerCA.cpp: (WebCore::GraphicsLayerCA::setContentsClippingRect): (WebCore::GraphicsLayerCA::setContentsToSolidColor): (WebCore::GraphicsLayerCA::setContentsToImage): (WebCore::GraphicsLayerCA::setContentsToPlatformLayer): (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers): (WebCore::GraphicsLayerCA::updateClippingStrategy): Determines whether we can simply use corner-radius on the existing contentsClippingLayer, or whether we have to create a shape layer to use as a mask. (WebCore::GraphicsLayerCA::updateContentsRects): We have to add/remove the shape layer based on the rounded rect radii. Calls updateClippingStrategy() on the clipping layer, and also updates clones accordingly. (WebCore::dumpInnerLayer): (WebCore::GraphicsLayerCA::dumpAdditionalProperties): Dump all the inner layers (requiring on test rebaseline), including the new shape and backdrop layers. * platform/graphics/ca/GraphicsLayerCA.h: * platform/graphics/ca/PlatformCALayer.h: Add a new shape layer type. * platform/graphics/ca/mac/PlatformCALayerMac.h: Support for corner radius and a rounded rect shape mask. * platform/graphics/ca/mac/PlatformCALayerMac.mm: (PlatformCALayerMac::PlatformCALayerMac): (PlatformCALayerMac::clone): (PlatformCALayerMac::setMask): (PlatformCALayerMac::cornerRadius): (PlatformCALayerMac::setCornerRadius): (PlatformCALayerMac::shapeRoundedRect): (PlatformCALayerMac::setShapeRoundedRect): * platform/graphics/ca/win/PlatformCALayerWin.cpp: (PlatformCALayerWin::cornerRadius): (PlatformCALayerWin::setCornerRadius): (PlatformCALayerWin::shapeRoundedRect): (PlatformCALayerWin::setShapeRoundedRect): * platform/graphics/ca/win/PlatformCALayerWin.h: * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::resetContentsRect): Use getRoundedInnerBorderFor() to get the rounded rect used to clip contents. (WebCore::RenderLayerBacking::positionOverflowControlsLayers): Push a FloatRoundedRect for the contents clip, (WebCore::RenderLayerBacking::updateDirectlyCompositedBackgroundColor): Ditto. (WebCore::RenderLayerBacking::updateDirectlyCompositedBackgroundImage): Ditto. (WebCore::RenderLayerBacking::updateImageContents): Get the rounded rect clip. * rendering/RenderLayerBacking.h: nullptr. 2014-11-09 Darin Adler Fix various cases of incorrect cross-thread capture of non-thread-safe RefCounted https://bugs.webkit.org/show_bug.cgi?id=138539 Reviewed by Alexey Proskuryakov. * Modules/websockets/WorkerThreadableWebSocketChannel.cpp: (WebCore::WorkerThreadableWebSocketChannel::Peer::didConnect): Use StringCapture instead of isolatedCopy, to avoid a problem where the original thread does its deref after passing the string to the other thread. (WebCore::WorkerThreadableWebSocketChannel::Peer::didReceiveMessage): Ditto. (WebCore::WorkerThreadableWebSocketChannel::Peer::didClose): Ditto. (WebCore::WorkerThreadableWebSocketChannel::Bridge::initialize): Ditto. (WebCore::WorkerThreadableWebSocketChannel::Bridge::connect): Ditto. (WebCore::WorkerThreadableWebSocketChannel::Bridge::send): Ditto. (WebCore::WorkerThreadableWebSocketChannel::Bridge::close): Ditto. (WebCore::WorkerThreadableWebSocketChannel::Bridge::fail): Ditto. * dom/Document.cpp: (WebCore::Document::addConsoleMessage): Pass a StringCapture when creating AddConsoleMessageTask. Same reason as above, but in a different context. (WebCore::Document::addMessage): Ditto. * dom/ScriptExecutionContext.h: Changed AddConsoleMessageTask to take and capture a StringCapture rather than a String, for the same reason as above. * fileapi/AsyncFileStream.cpp: (WebCore::AsyncFileStream::write): Use URLCapture instead of trying to use StringCapture on a URL, since that doesn't preserve the validity flag. * loader/WorkerThreadableLoader.cpp: (WebCore::WorkerThreadableLoader::MainThreadBridge::MainThreadBridge): Use StringCapture. (WebCore::WorkerThreadableLoader::MainThreadBridge::didFail): Ditto. (WebCore::WorkerThreadableLoader::MainThreadBridge::didFailAccessControlCheck): Ditto. * platform/URL.h: Added URLCapture. * platform/network/FormData.cpp: (WebCore::appendBlobResolved): Remove incorrect pointless code that creates a new URL from an existing URL with the ParsedURLString constructor. * workers/DefaultSharedWorkerRepository.cpp: Fixed code that was trying to copy a URL by copying a string to instead just use URL::copy. The comment claimed that URL::copy is not thread safe, but that claim is incorrect. (WebCore::SharedWorkerProxy::postExceptionToWorkerObject): Use StringCapture. (WebCore::SharedWorkerProxy::postConsoleMessageToWorkerObject): Ditto. (WebCore::DefaultSharedWorkerRepository::getProxy): Use URL::copy. * workers/WorkerGlobalScope.cpp: (WebCore::WorkerGlobalScope::addConsoleMessage): Use StringCapture. (WebCore::WorkerGlobalScope::addMessage): Ditto. * workers/WorkerMessagingProxy.cpp: (WebCore::WorkerMessagingProxy::postExceptionToWorkerObject): Ditto. (WebCore::WorkerMessagingProxy::postConsoleMessageToWorkerObject): Ditto. (WebCore::WorkerMessagingProxy::sendMessageToInspector): Ditto. (WebCore::WorkerMessagingProxy::postMessageToPageInspector): Ditto. * workers/WorkerRunLoop.cpp: (WebCore::WorkerRunLoop::postTaskAndTerminate): Make a Task with make_unique rather than with Task::create. Removed an extra isolatedCopy, unneeded because the Task constructor already does an isolatedCopy. (WebCore::WorkerRunLoop::postTaskForMode): Ditto. (WebCore::WorkerRunLoop::Task::create): Deleted. * workers/WorkerRunLoop.h: Removed unneeded create function and explicit public empty destructor. 2014-11-09 Chris Dumez Use is<>() / downcast<>() for HTMLCollection subclasses https://bugs.webkit.org/show_bug.cgi?id=138541 Reviewed by Sam Weinig. Use is<>() / downcast<>() for HTMLCollection subclasses for safety and consistency with the rest of the code base. No new tests, no behavior change. * bindings/gobject/WebKitDOMPrivate.cpp: (WebKit::wrap): * html/HTMLAllCollection.h: * html/HTMLCollection.cpp: (WebCore::isMatchingHTMLElement): (WebCore::isMatchingElement): * html/HTMLCollection.h: * html/HTMLFormControlsCollection.h: * html/HTMLNameCollection.h: * html/HTMLOptionsCollection.h: * html/HTMLSelectElement.cpp: (WebCore::HTMLSelectElement::options): * html/HTMLTableRowsCollection.h: 2014-11-08 Chris Dumez Call faster HTMLElement::hasTagName() in HTMLCollection https://bugs.webkit.org/show_bug.cgi?id=138529 Reviewed by Darin Adler. Call faster HTMLElement::hasTagName() in HTMLCollection instead of slower Node::hasTagName() by restructuring the code a bit to distinguish collection that deal only with HTMLElements from others. No new tests, no behavior change. * html/HTMLCollection.cpp: (WebCore::isMatchingHTMLElement): (WebCore::isMatchingElement): 2014-11-08 Chris Dumez Move isEmptyValue() logic from HTMLInputElement to TextFieldInputType https://bugs.webkit.org/show_bug.cgi?id=138538 Reviewed by Darin Adler. Move isEmptyValue() logic from HTMLInputElement to TextFieldInputType as this only makes sense for text field input types. No new tests, no behavior change. * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::isEmptyValue): * html/InputType.cpp: (WebCore::InputType::isEmptyValue): * html/InputType.h: * html/TextFieldInputType.cpp: (WebCore::TextFieldInputType::isEmptyValue): * html/TextFieldInputType.h: 2014-11-08 Darin Adler Replace FileThread class with a single function https://bugs.webkit.org/show_bug.cgi?id=138282 Reviewed by Alexey Proskuryakov. * CMakeLists.txt: Removed FileThread.cpp. * WebCore.vcxproj/WebCore.vcxproj: Removed FileThread.cpp/.h. * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto. * WebCore.xcodeproj/project.pbxproj: Ditto. * bindings/generic/ActiveDOMCallback.cpp: Removed unneeded includes. * dom/ActiveDOMObject.cpp: Ditto. * fileapi/AsyncFileStream.cpp: (WebCore::callOnFileThread): Added. Implements the file thread. (WebCore::AsyncFileStream::AsyncFileStream): Take a reference to the client. Make m_internals. Use the destroyed flag instead of trickier techniques to handle stopping. Once the stream is destroyed, there will be no further callbacks. (WebCore::AsyncFileStream::~AsyncFileStream): Added assertions and merged in the stop behavior here. This class no longer requires an explicit stop function. (WebCore::AsyncFileStream::perform): Added. Helper used for all the operations below. Takes a function that performs an operation and then returns a client callback function. Respects the m_stopped boolean on the file thread (so we don't do extra operations) and on the client thread (so we are guaranteed not to get any client callbacks even if the file thread was partway through an operation). (WebCore::AsyncFileStream::getSize): Changed to use the perform function. (WebCore::AsyncFileStream::openForRead): Ditto. Also fixed reference count thread safety issue by capturing a StringCapture rather than a String. (WebCore::AsyncFileStream::openForWrite): Ditto. (WebCore::AsyncFileStream::close): Changed to use callOnFileThread. (WebCore::AsyncFileStream::read): Changed to use the perform function. (WebCore::AsyncFileStream::write): Ditto. Also fixed reference count thread safety issue by capturing a StringCapture rather than a URL. (WebCore::AsyncFileStream::truncate): Ditto. * fileapi/AsyncFileStream.h: Removed use of RefCounted since we only need single ownership. Removed the stop function, since we can now stop when the stream is destroyed since we have single ownership. Made a new Internals object to handle destruction while operations are still going on the file thread. * fileapi/FileThread.cpp: Removed. * fileapi/FileThread.h: Removed. * loader/ResourceLoader.cpp: Removed unneeded include. * platform/FileStream.cpp: (WebCore::FileStream::~FileStream): Merged the stop function in here. * platform/FileStream.h: Removed use of RefCounted since we only need single ownership. Removed the empty start function. Removed the stop function, since we can now stop when the stream is destroyed since we have single ownership. * platform/FileStreamClient.h: Removed unneeded didStart and didStop. * platform/network/BlobResourceHandle.cpp: (WebCore::BlobResourceHandle::BlobResourceHandle): Use make_unique to make the stream objects instead of custom create functions. (WebCore::BlobResourceHandle::~BlobResourceHandle): Removed now-unneeded code to call stop functions. Destroying the objects now takes care of the this, and that's done by the unique_ptrs. (WebCore::BlobResourceHandle::cancel): Removed the rest of the code to stop the m_asyncStream, keeping only the code that sets it to null. That now stops the stream by destroying it. * platform/network/BlobResourceHandle.h: Use std::unique_ptr rather than RefPtr for the file stream objects. * storage/StorageThread.h: Tweaked formatting of std::function to match the format used elsewhere in WebKit. 2014-11-08 Simon Fraser Don't try to schedule a GraphicsLayer flush when propagating changes to replicas inside a flush https://bugs.webkit.org/show_bug.cgi?id=138532 Reviewed by Dan Bernstein. When changing masks on replica layers with certain layer configurations, it was possible to hit an assertion that a flush was being scheduled when already flushing, via propagateLayerChangeToReplicas(). Fix by passing the scheduleFlush flag along. Not testable with current GraphicsLayer configurations. * platform/graphics/ca/GraphicsLayerCA.cpp: * platform/graphics/ca/GraphicsLayerCA.h: 2014-11-08 Beth Dakin Implement action menu support for videos https://bugs.webkit.org/show_bug.cgi?id=138534 -and corresponding- rdar://problem/18742164 Reviewed by Tim Horton. Export needed symbols and added not-yet-implemented HitTestResult::isMediaThatCanBeDownloaded() so that action menus will work as expected once it is implemented. * WebCore.exp.in: * rendering/HitTestResult.cpp: (WebCore::HitTestResult::isMediaThatCanBeDownloaded): * rendering/HitTestResult.h: 2014-11-08 Chris Dumez Speed up HTMLInputElement::isEmptyValue() https://bugs.webkit.org/show_bug.cgi?id=138515 Reviewed by Geoffrey Garen. HTMLInputElement::isEmptyValue() was calling HTMLTextFormControlElement::innerTextValue() which causes a full subtree traversal to construct a string representation of that subtree using a StringBuilder. In the case of HTMLInputElement::isEmptyValue(), we don't have to do all this: We don't need to construct a String and we can return false as soon as we find a non-empty descendant. No new tests, no behavior change. * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::isEmptyValue): * html/HTMLInputElement.h: 2014-11-07 Eric Carlson [iOS] video is sometimes allowed to play from the background https://bugs.webkit.org/show_bug.cgi?id=138522 Reviewed by Jer Noble. * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::displayType): New. * html/HTMLMediaElement.h: * platform/audio/MediaSession.cpp: (WebCore::MediaSession::isHidden): New, client passthrough. (WebCore::MediaSession::displayType): Ditto. * platform/audio/MediaSession.h: (WebCore::MediaSessionClient::displayType): * platform/audio/MediaSessionManager.cpp: (WebCore::MediaSessionManager::sessionCanLoadMedia): New, default implementation returns true if client is visible or playing. * platform/audio/MediaSessionManager.h: * platform/audio/ios/MediaSessionManagerIOS.h: * platform/audio/ios/MediaSessionManagerIOS.mm: (WebCore::MediaSessionManageriOS::sessionCanLoadMedia): iOS override, also allows buffering when displaying optimized fullscreen. 2014-11-07 Benjamin Poulain Fix the build after r175772 * inspector/InspectorCSSAgent.cpp: (WebCore::InspectorCSSAgent::buildArrayForMatchedRuleList): 2014-11-07 Benjamin Poulain Make the Selector's specificity part of Selector matching https://bugs.webkit.org/show_bug.cgi?id=138486 Reviewed by Andreas Kling. In CSS Selectors Level 4, the specificity of selectors is computed dynamically based on which element is being matched. For example, a selector: :matches(#foo, .bar, baz) has a specificity of (1, 0, 0) on (0, 1, 0) on (0, 0, 1) on Previously, the specificity of each selector was computed statically when populating RuleSet. With more recent CSS, this gives us the wrong specificity because we do not know how the selectors applies to the target. This patch moves one tiny step in the direction of dynamic specificity. The specificity is removed from RuleSet and is moved inside Selector Matching. There is one bit worth keeping static: matching based on rule hash. This path is important to avoid spending time compiling trivial selectors. In order to keep rule hash matching working, the RuleData store which specificity class the rule has in addition to the information about matching/not-matching. When going through the fast path in ElementCollector, we compute the right specificity based on the type of rule-hash matching. * css/CSSSelector.cpp: (WebCore::CSSSelector::specificityForOneSelector): * css/CSSSelector.h: * css/ElementRuleCollector.cpp: (WebCore::ElementRuleCollector::addMatchedRule): (WebCore::ElementRuleCollector::sortAndTransferMatchedRules): (WebCore::ElementRuleCollector::ruleMatches): (WebCore::ElementRuleCollector::collectMatchingRulesForList): (WebCore::compareRules): * css/ElementRuleCollector.h: * css/RuleSet.cpp: (WebCore::computeMatchBasedOnRuleHash): (WebCore::RuleData::RuleData): (WebCore::isSelectorMatchingHTMLBasedOnRuleHash): Deleted. * css/RuleSet.h: (WebCore::RuleData::matchBasedOnRuleHash): (WebCore::RuleData::hasRightmostSelectorMatchingHTMLBasedOnRuleHash): Deleted. (WebCore::RuleData::specificity): Deleted. * css/SelectorChecker.cpp: (WebCore::SelectorChecker::match): * css/SelectorChecker.h: * css/StyleResolver.h: (WebCore::checkRegionSelector): * cssjit/SelectorCompiler.cpp: (WebCore::SelectorCompiler::SelectorCodeGenerator::SelectorCodeGenerator): (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker): * cssjit/SelectorCompiler.h: (WebCore::SelectorCompiler::ruleCollectorSimpleSelectorCheckerFunction): (WebCore::SelectorCompiler::querySelectorSimpleSelectorCheckerFunction): (WebCore::SelectorCompiler::ruleCollectorSelectorCheckerFunctionWithCheckingContext): (WebCore::SelectorCompiler::querySelectorSelectorCheckerFunctionWithCheckingContext): (WebCore::SelectorCompiler::simpleSelectorCheckerFunction): Deleted. (WebCore::SelectorCompiler::selectorCheckerFunctionWithCheckingContext): Deleted. * dom/SelectorQuery.cpp: (WebCore::SelectorDataList::selectorMatches): (WebCore::SelectorDataList::selectorClosest): (WebCore::SelectorDataList::executeCompiledSimpleSelectorChecker): (WebCore::SelectorDataList::executeCompiledSelectorCheckerWithCheckingContext): (WebCore::SelectorDataList::executeCompiledSingleMultiSelectorData): (WebCore::SelectorDataList::execute): * dom/SelectorQuery.h: 2014-11-07 Alexey Proskuryakov CSP is enforced for eval in report-only mode on first page load https://bugs.webkit.org/show_bug.cgi?id=138492 rdar://problem/15782525 Reviewed by Daniel Bates. This is covered by existing tests when running as one test per process invocation. * page/ContentSecurityPolicy.cpp: (WebCore::CSPDirectiveList::allowEval): Allow when in report only mode. The allowEval function itself needs to return false, because it's used in checkEvalAndReportViolation(). (WebCore::CSPDirectiveList::allowJavaScriptURLs): Apply the same fix, although it's not changing the behavior - this function is never called with ContentSecurityPolicy::SuppressReport. (WebCore::CSPDirectiveList::allowInlineEventHandlers): Ditto. (WebCore::CSPDirectiveList::allowInlineScript): Ditto. (WebCore::CSPDirectiveList::allowInlineStyle): Ditto. (WebCore::CSPDirectiveList::allowPluginType): Ditto. (WebCore::CSPDirectiveList::allowScriptFromSource): Ditto. (WebCore::CSPDirectiveList::allowObjectFromSource): Ditto. (WebCore::CSPDirectiveList::allowChildFrameFromSource): Ditto. (WebCore::CSPDirectiveList::allowImageFromSource): Ditto. (WebCore::CSPDirectiveList::allowStyleFromSource): Ditto. (WebCore::CSPDirectiveList::allowFontFromSource): Ditto. (WebCore::CSPDirectiveList::allowMediaFromSource): Ditto. (WebCore::CSPDirectiveList::allowConnectToSource): Ditto. (WebCore::CSPDirectiveList::allowFormAction): Ditto. (WebCore::CSPDirectiveList::allowBaseURI): Ditto. (WebCore::ContentSecurityPolicy::didReceiveHeader): Remove isReportOnly() check, which is now inside allowEval(). 2014-11-07 Andreas Kling [Mac] Avoid repainting scrollbar track when the scrollbar track is transparent. Reviewed by Simon Fraser. Don't bother invalidating the entire WebCore scrollbar when we've opted into AppKit's special mode to use individual layers for scrollbar components. NSScrollerImp will invalidate what's necessary below e.g setKnobAlpha. * platform/mac/ScrollAnimatorMac.mm: (-[WebScrollbarPartAnimation setCurrentProgress:]): 2014-11-07 Chris Dumez Rename HTMLInputElement::imageLoader() to ensureImageLoader() https://bugs.webkit.org/show_bug.cgi?id=138508 Reviewed by Andreas Kling. Rename HTMLInputElement::imageLoader() to ensureImageLoader() and have it return a reference to make it clear that it constructs an ImageLoader if missing. Also introduce a lightweight imageLoader() getter which just returns the imageLoader or null if missing. No new tests, no behavior change. * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::ensureImageLoader): (WebCore::HTMLInputElement::didMoveToNewDocument): (WebCore::HTMLInputElement::imageLoader): Deleted. * html/HTMLInputElement.h: (WebCore::HTMLInputElement::imageLoader): (WebCore::HTMLInputElement::hasImageLoader): Deleted. * html/ImageInputType.cpp: (WebCore::ImageInputType::srcAttributeChanged): (WebCore::ImageInputType::attach): (WebCore::ImageInputType::height): (WebCore::ImageInputType::width): 2014-11-07 Chris Dumez Move 'webkit-clip-path' CSS property to the new StyleBuilder https://bugs.webkit.org/show_bug.cgi?id=138452 Reviewed by Andreas Kling. Move 'webkit-clip-path' CSS property from DeprecatedStyleBuilder to the new StyleBuilder so that it is now generated from CSSPropertyNames.in. A ClipPath converter was added to support this. Custom code was avoided by replacing if checks by assertions, relying on the CSSParser to make sure the input is valid. Test: fast/masking/clip-path-bad-value.html * css/CSSPropertyNames.in: * css/DeprecatedStyleBuilder.cpp: (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder): (WebCore::ApplyPropertyClipPath::setValue): Deleted. (WebCore::ApplyPropertyClipPath::applyValue): Deleted. (WebCore::ApplyPropertyClipPath::createHandler): Deleted. * css/StyleBuilderConverter.h: (WebCore::StyleBuilderConverter::convertClipPath): 2014-11-07 Joseph Pecoraro Web Inspector: Pseudo element matchedCSSRules do not include matching selector info https://bugs.webkit.org/show_bug.cgi?id=138438 Reviewed by Benjamin Poulain. Test: inspector/css/psuedo-element-matches.html Element::matches is not the correct API to use to check selectors with pseudo-elements. Instead we should use the CSS Selector checking machinary which understands them. * inspector/InspectorCSSAgent.cpp: (WebCore::InspectorCSSAgent::getSupportedCSSProperties): (WebCore::InspectorCSSAgent::buildArrayForRuleList): (WebCore::InspectorCSSAgent::buildArrayForRegions): (WebCore::InspectorCSSAgent::buildObjectForNamedFlow): Some RefPtr release improvements. (WebCore::InspectorCSSAgent::buildArrayForMatchedRuleList): Use a SelectorChecker to check each Selector against the element. This matches the SelectorChecker used when we collected the rules for this element. 2014-11-07 Chris Dumez Drop useless HTMLElement::isURLAttribute() override https://bugs.webkit.org/show_bug.cgi?id=138479 Reviewed by Mark Lam. Drop useless HTMLElement::isURLAttribute() override as it is doing nothing but calling the parent class' isURLAttribute(). No new tests, no behavior change. * html/HTMLElement.cpp: (WebCore::HTMLElement::isURLAttribute): Deleted. * html/HTMLElement.h: 2014-11-07 Eric Carlson [iOS] Update optimized fullscreen media controls https://bugs.webkit.org/show_bug.cgi?id=138493 Reviewed by Brent Fulgham. * Modules/mediacontrols/MediaControlsHost.cpp: (WebCore::MediaControlsHost::fullscreenMode): New. (WebCore::MediaControlsHost::mediaUIImageData): New. * Modules/mediacontrols/MediaControlsHost.h: * Modules/mediacontrols/MediaControlsHost.idl: * Modules/mediacontrols/mediaControlsiOS.css: Renamed -webkit-media-controls-wireless-playback-status to -webkit-media-controls-inline-playback-placeholder because it is now used for other inline playback status display. Add z-index:0 so the placeholder renders above captions. Remove the background-image, it is now set from script. (audio::-webkit-media-controls-inline-playback-placeholder): (audio::-webkit-media-controls-inline-playback-placeholder.hidden): (video::-webkit-media-controls-optimized-fullscreen-button): (audio::-webkit-media-controls-wireless-playback-status): Deleted. (audio::-webkit-media-controls-wireless-playback-status.hidden): Deleted. (video::-webkit-media-controls-optimized-fullscreen-button:active): Deleted. * Modules/mediacontrols/mediaControlsiOS.js: (ControllerIOS): Set doingSetup to true around setup so we don't draw the inline controls briefly when an element is created as a result of a user gesture. (ControllerIOS.prototype.shouldHaveStartPlaybackButton): Don't allow inline controls during initial setup to prevent inline controls from begin drawn briefly when a media element is created and inserted by a script called from a user gesture. (ControllerIOS.prototype.updateWirelessPlaybackStatus): wirelessPlaybackStatus -> inlinePlaybackPlaceholder. (ControllerIOS.prototype.createControls): Ditto. Add style rules for optimized fullscreen button. (ControllerIOS.prototype.configureInlineControls): Add the inlinePlaybackPlaceholder as a peer of the inline controls compositing child instead of as a child so it renders correctly. (ControllerIOS.prototype.addControls): (ControllerIOS.prototype.updateControls): wirelessPlaybackStatus -> inlinePlaybackPlaceholder. (ControllerIOS.prototype.handleWrapperTouchStart): (ControllerIOS.prototype.get pageScaleFactor): Cleanup. (ControllerIOS.prototype.set pageScaleFactor): Ditto. (ControllerIOS.prototype.handleFullscreenChange): Show the placeholder. * WebCore.exp.in: Export _wkGetMediaUIImageData. * html/HTMLMediaElement.h: (WebCore::HTMLMediaElement::fullscreenMode): Expose fullscreen mode. * platform/ios/WebCoreSystemInterfaceIOS.h: * platform/ios/WebCoreSystemInterfaceIOS.mm: 2014-11-06 Carlos Garcia Campos Unreviewed. Try to fix GTK build after r175719. Rename the Timer fired function as requestAnimationTimerFired() to avoid ambiguity. * platform/ScrollAnimatorNone.cpp: (WebCore::ScrollAnimatorNone::ScrollAnimatorNone): (WebCore::ScrollAnimatorNone::requestAnimationTimerFired): (WebCore::ScrollAnimatorNone::animationTimerFired): Deleted. * platform/ScrollAnimatorNone.h: 2014-11-06 Chris Dumez Remove useless if check in HTMLInputElement::setValue() https://bugs.webkit.org/show_bug.cgi?id=138485 Reviewed by Daniel Bates. Remove useless if check in HTMLInputElement::setValue(). It was inadvertently left in as part of r94836. * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::setValue): 2014-11-06 Simon Fraser Put names on a couple of video-related CALayers https://bugs.webkit.org/show_bug.cgi?id=138491 Reviewed by Eric Carlson. In debug, set layer names on a couple of video-related layers to make debugging easier. * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerLayer): * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm: (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::ensureLayer): 2014-11-06 Darin Adler REGRESSION (r175549): http/tests/multipart/stop-crash.html failing (assertion failure in CachedResource::setEncodedSize) https://bugs.webkit.org/show_bug.cgi?id=138358 Reviewed by Alexey Proskuryakov. * loader/cache/CachedResource.cpp: (WebCore::CachedResource::setEncodedSize): Removed the incorrect assertion here. The code asserts that resources only get bigger, never smaller. This is incorrect for a multipart/mixed-replace image, where a later image that is smaller can replace an earlier one. I don't fully understand why this assertion was not firing before, but the relevant websites are working fine and the test otherwise passes. * loader/DocumentLoader.cpp: (WebCore::DocumentLoader::subresourceLoaderFinishedLoadingOnePart): Fix another incorrect assertion that can fire for any parts after the first one. I ran into this while testing various websites that use multipart/mixed-replace. 2014-11-06 Jeremy Jones Fix typo in optimized fullscreen activation. https://bugs.webkit.org/show_bug.cgi?id=138480 Reviewed by Jer Noble. * Modules/mediacontrols/mediaControlsiOS.js: (ControllerIOS.prototype.handleWrapperTouchStart): fix typo doubleTouchIntervalThresholdms (ControllerIOS.prototype.handleOptimizedFullscreenButtonClicked): fix typo isFullScreen 2014-11-06 Chris Dumez Stop special-casing wbr elements in HTMLElement::createElementRenderer() https://bugs.webkit.org/show_bug.cgi?id=138474 Reviewed by Ryosuke Niwa. Stop special-casing wbr elements in HTMLElement::createElementRenderer() and move the code to a HTMLWBRElement subclass instead, that is overriding createElementRenderer(). This function is already virtual. No new tests, no behavior change. * CMakeLists.txt: * WebCore.vcxproj/WebCore.vcxproj: * WebCore.xcodeproj/project.pbxproj: * html/HTMLElement.cpp: (WebCore::HTMLElement::createElementRenderer): * html/HTMLElementsAllInOne.cpp: * html/HTMLTagNames.in: * html/HTMLWBRElement.cpp: Added. (WebCore::HTMLWBRElement::create): (WebCore::HTMLWBRElement::HTMLWBRElement): (WebCore::HTMLWBRElement::createElementRenderer): * html/HTMLWBRElement.h: Added. * rendering/RenderLineBreak.cpp: (WebCore::RenderLineBreak::RenderLineBreak): 2014-11-05 Jer Noble De-templatize Timer https://bugs.webkit.org/show_bug.cgi?id=138450 Reviewed by Anders Carlsson. Timer does not need to be a templated class; only it's constructors need to be templated. Remove the template specifier from Timer and add same to its two class method constructors. Replace the function pointer typedefs with using statements. Add a helper typedef which allows invalid combinations of TimerFiredClass and TimerFiredFunction to be caught early by the compiler, while still allowing valid combinations (such as when the caller specifies a function on a subclass of TimerFiredClass). * Modules/encryptedmedia/MediaKeySession.cpp: (WebCore::MediaKeySession::keyRequestTimerFired): (WebCore::MediaKeySession::addKeyTimerFired): * Modules/encryptedmedia/MediaKeySession.h: * Modules/geolocation/Geolocation.cpp: (WebCore::Geolocation::GeoNotifier::timerFired): (WebCore::Geolocation::resumeTimerFired): * Modules/geolocation/Geolocation.h: * Modules/indexeddb/IDBTransactionBackend.cpp: (WebCore::IDBTransactionBackend::taskTimerFired): * Modules/indexeddb/IDBTransactionBackend.h: * Modules/mediasource/SourceBuffer.cpp: (WebCore::SourceBuffer::appendBufferTimerFired): (WebCore::SourceBuffer::removeTimerFired): * Modules/mediasource/SourceBuffer.h: * Modules/mediastream/MediaStream.cpp: (WebCore::MediaStream::scheduledEventTimerFired): * Modules/mediastream/MediaStream.h: * Modules/mediastream/RTCDTMFSender.cpp: (WebCore::RTCDTMFSender::scheduledEventTimerFired): * Modules/mediastream/RTCDTMFSender.h: * Modules/mediastream/RTCDataChannel.cpp: (WebCore::RTCDataChannel::scheduledEventTimerFired): * Modules/mediastream/RTCDataChannel.h: * Modules/mediastream/RTCPeerConnection.cpp: (WebCore::RTCPeerConnection::scheduledEventTimerFired): * Modules/mediastream/RTCPeerConnection.h: * Modules/notifications/Notification.cpp: (WebCore::Notification::Notification): (WebCore::Notification::taskTimerFired): * Modules/notifications/Notification.h: * Modules/notifications/NotificationCenter.cpp: (WebCore::NotificationCenter::NotificationRequestCallback::timerFired): * Modules/notifications/NotificationCenter.h: * Modules/vibration/Vibration.cpp: (WebCore::Vibration::timerFired): * Modules/vibration/Vibration.h: * Modules/websockets/WebSocketChannel.cpp: (WebCore::WebSocketChannel::resumeTimerFired): (WebCore::WebSocketChannel::closingTimerFired): * Modules/websockets/WebSocketChannel.h: * accessibility/AXObjectCache.cpp: (WebCore::AXObjectCache::notificationPostTimerFired): * accessibility/AXObjectCache.h: (WebCore::AXObjectCache::AXObjectCache): * bindings/js/GCController.cpp: (WebCore::GCController::gcTimerFired): * bindings/js/GCController.h: * css/CSSFontFaceSource.h: * css/CSSFontSelector.cpp: (WebCore::CSSFontSelector::beginLoadTimerFired): * css/CSSFontSelector.h: * css/StyleResolver.cpp: (WebCore::StyleResolver::sweepMatchedPropertiesCache): * css/StyleResolver.h: * dom/Document.cpp: (WebCore::Document::visualUpdatesSuppressionTimerFired): (WebCore::Document::styleRecalcTimerFired): (WebCore::Document::optimizedStyleSheetUpdateTimerFired): (WebCore::Document::sharedObjectPoolClearTimerFired): (WebCore::Document::updateFocusAppearanceTimerFired): (WebCore::Document::pendingTasksTimerFired): (WebCore::Document::fullScreenChangeDelayTimerFired): (WebCore::Document::loadEventDelayTimerFired): (WebCore::Document::didAssociateFormControlsTimerFired): (WebCore::Document::domCookieCacheExpiryTimerFired): * dom/Document.h: * dom/EventSender.h: (WebCore::EventSender::timerFired): * dom/GenericEventQueue.cpp: (WebCore::GenericEventQueue::timerFired): * dom/GenericEventQueue.h: * dom/ScriptRunner.cpp: (WebCore::ScriptRunner::timerFired): * dom/ScriptRunner.h: * dom/ScriptedAnimationController.cpp: (WebCore::ScriptedAnimationController::animationTimerFired): * dom/ScriptedAnimationController.h: * dom/StyledElement.cpp: (WebCore::PresentationAttributeCacheCleaner::cleanCache): * editing/AlternativeTextController.cpp: (WebCore::AlternativeTextController::timerFired): * editing/AlternativeTextController.h: * editing/Editor.cpp: (WebCore::Editor::scanSelectionForTelephoneNumbers): (WebCore::Editor::editorUIUpdateTimerFired): * editing/Editor.h: * editing/FrameSelection.cpp: (WebCore::FrameSelection::caretBlinkTimerFired): * editing/FrameSelection.h: * editing/SpellChecker.cpp: (WebCore::SpellChecker::timerFiredToProcessQueuedRequest): * editing/SpellChecker.h: * html/HTMLFormElement.cpp: (WebCore::HTMLFormElement::requestAutocompleteTimerFired): * html/HTMLFormElement.h: * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::parseAttribute): * html/HTMLMediaElement.h: * html/HTMLPlugInElement.cpp: (WebCore::HTMLPlugInElement::swapRendererTimerFired): * html/HTMLPlugInElement.h: * html/HTMLPlugInImageElement.cpp: (WebCore::HTMLPlugInImageElement::removeSnapshotTimerFired): * html/HTMLPlugInImageElement.h: * html/HTMLSourceElement.cpp: (WebCore::HTMLSourceElement::errorEventTimerFired): * html/HTMLSourceElement.h: * html/HTMLTrackElement.cpp: (WebCore::HTMLTrackElement::loadTimerFired): * html/HTMLTrackElement.h: * html/MediaController.cpp: (MediaController::asyncEventTimerFired): (MediaController::clearPositionTimerFired): (MediaController::timeupdateTimerFired): * html/MediaController.h: * html/MediaDocument.cpp: (WebCore::MediaDocument::replaceMediaElementTimerFired): * html/MediaDocument.h: * html/SearchInputType.cpp: (WebCore::SearchInputType::searchEventTimerFired): * html/SearchInputType.h: * html/ValidationMessage.cpp: (WebCore::ValidationMessage::setMessage): (WebCore::ValidationMessage::setMessageDOMAndStartTimer): (WebCore::ValidationMessage::buildBubbleTree): (WebCore::ValidationMessage::requestToHideMessage): (WebCore::ValidationMessage::deleteBubbleTree): * html/ValidationMessage.h: * html/canvas/WebGLRenderingContext.cpp: (WebCore::WebGLRenderingContext::dispatchContextLostEvent): (WebCore::WebGLRenderingContext::maybeRestoreContext): * html/canvas/WebGLRenderingContext.h: * html/parser/HTMLParserScheduler.cpp: (WebCore::HTMLParserScheduler::continueNextChunkTimerFired): * html/parser/HTMLParserScheduler.h: * html/shadow/MediaControlElements.cpp: (WebCore::MediaControlPanelElement::transitionTimerFired): (WebCore::MediaControlTextTrackContainerElement::updateTimerFired): * html/shadow/MediaControlElements.h: * html/shadow/MediaControls.cpp: (WebCore::MediaControls::hideFullscreenControlsTimerFired): * html/shadow/MediaControls.h: * html/shadow/SpinButtonElement.cpp: (WebCore::SpinButtonElement::repeatingTimerFired): * html/shadow/SpinButtonElement.h: * html/track/LoadableTextTrack.cpp: (WebCore::LoadableTextTrack::loadTimerFired): * html/track/LoadableTextTrack.h: * html/track/VTTRegion.cpp: (WebCore::VTTRegion::scrollTimerFired): * html/track/VTTRegion.h: * inspector/InspectorCSSAgent.cpp: (WebCore::ChangeRegionOversetTask::timerFired): * inspector/InspectorDOMAgent.cpp: (WebCore::RevalidateStyleAttributeTask::timerFired): * inspector/InspectorFrontendClientLocal.cpp: (WebCore::InspectorBackendDispatchTask::timerFired): * inspector/InspectorOverlay.cpp: (WebCore::InspectorOverlay::updatePaintRectsTimerFired): * inspector/InspectorOverlay.h: * loader/DocumentLoader.cpp: (WebCore::DocumentLoader::substituteResourceDeliveryTimerFired): * loader/DocumentLoader.h: * loader/FrameLoader.cpp: (WebCore::FrameLoader::checkTimerFired): * loader/FrameLoader.h: * loader/ImageLoader.cpp: (WebCore::ImageLoader::timerFired): * loader/ImageLoader.h: * loader/LinkLoader.cpp: (WebCore::LinkLoader::linkLoadTimerFired): (WebCore::LinkLoader::linkLoadingErrorTimerFired): * loader/LinkLoader.h: * loader/NavigationScheduler.cpp: (WebCore::ScheduledNavigation::didStartTimer): (WebCore::NavigationScheduler::timerFired): * loader/NavigationScheduler.h: * loader/PingLoader.h: (WebCore::PingLoader::timeoutTimerFired): * loader/ProgressTracker.cpp: (WebCore::ProgressTracker::progressHeartbeatTimerFired): * loader/ProgressTracker.h: * loader/ResourceLoadScheduler.cpp: (WebCore::ResourceLoadScheduler::requestTimerFired): * loader/ResourceLoadScheduler.h: * loader/TextTrackLoader.cpp: (WebCore::TextTrackLoader::cueLoadTimerFired): * loader/TextTrackLoader.h: * loader/cache/CachedResource.cpp: (WebCore::CachedResource::Callback::timerFired): * loader/cache/CachedResource.h: * loader/cache/CachedResourceLoader.cpp: (WebCore::CachedResourceLoader::garbageCollectDocumentResourcesTimerFired): * loader/cache/CachedResourceLoader.h: * loader/icon/IconDatabase.cpp: (WebCore::IconDatabase::syncTimerFired): * loader/icon/IconDatabase.h: * page/AutoscrollController.cpp: (WebCore::AutoscrollController::autoscrollTimerFired): * page/AutoscrollController.h: * page/CaptionUserPreferences.cpp: (WebCore::CaptionUserPreferences::timerFired): * page/CaptionUserPreferences.h: * page/CaptionUserPreferencesMediaAF.cpp: (WebCore::CaptionUserPreferencesMediaAF::updateTimerFired): * page/CaptionUserPreferencesMediaAF.h: * page/DeviceController.cpp: (WebCore::DeviceController::fireDeviceEvent): * page/DeviceController.h: * page/EventHandler.cpp: (WebCore::EventHandler::cursorUpdateTimerFired): (WebCore::EventHandler::autoHideCursorTimerFired): (WebCore::EventHandler::recognizeLongMousePress): (WebCore::EventHandler::fakeMouseMoveEventTimerFired): (WebCore::EventHandler::hoverTimerFired): * page/EventHandler.h: * page/EventSource.cpp: (WebCore::EventSource::connectTimerFired): * page/EventSource.h: * page/FocusController.cpp: (WebCore::FocusController::focusRepaintTimerFired): * page/FocusController.h: * page/Frame.cpp: (WebCore::Frame::overflowAutoScrollTimerFired): * page/Frame.h: * page/FrameView.cpp: (WebCore::FrameView::delayedScrollEventTimerFired): (WebCore::FrameView::speculativeTilingEnableTimerFired): (WebCore::FrameView::layoutTimerFired): (WebCore::FrameView::updateEmbeddedObjectsTimerFired): (WebCore::FrameView::postLayoutTimerFired): * page/FrameView.h: * page/PageOverlay.cpp: (WebCore::PageOverlay::fadeAnimationTimerFired): * page/PageOverlay.h: * page/Settings.cpp: (WebCore::Settings::imageLoadingSettingsTimerFired): * page/Settings.h: * page/animation/AnimationController.cpp: (WebCore::AnimationControllerPrivate::updateStyleIfNeededDispatcherFired): (WebCore::AnimationControllerPrivate::animationTimerFired): * page/animation/AnimationControllerPrivate.h: * page/mac/ServicesOverlayController.h: * page/mac/ServicesOverlayController.mm: (WebCore::ServicesOverlayController::determineActiveHighlightTimerFired): * page/scrolling/AsyncScrollingCoordinator.cpp: (WebCore::AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScrollTimerFired): * page/scrolling/AsyncScrollingCoordinator.h: * page/scrolling/ios/ScrollingCoordinatorIOS.h: * page/scrolling/ios/ScrollingCoordinatorIOS.mm: (WebCore::ScrollingCoordinatorIOS::scrollingStateTreeCommitterTimerFired): * page/scrolling/mac/ScrollingCoordinatorMac.h: * page/scrolling/mac/ScrollingCoordinatorMac.mm: (WebCore::ScrollingCoordinatorMac::scrollingStateTreeCommitterTimerFired): * platform/HysteresisActivity.h: (WebCore::HysteresisActivity::hysteresisTimerFired): * platform/ScrollAnimator.cpp: (WebCore::ScrollAnimator::updateScrollAnimatorsAndTimers): (WebCore::ScrollAnimator::startScrollSnapTimer): (WebCore::ScrollAnimator::stopScrollSnapTimer): (WebCore::ScrollAnimator::horizontalScrollSnapTimerFired): (WebCore::ScrollAnimator::verticalScrollSnapTimerFired): * platform/ScrollAnimator.h: * platform/ScrollAnimatorNone.cpp: (WebCore::ScrollAnimatorNone::animationTimerFired): * platform/ScrollAnimatorNone.h: * platform/Scrollbar.cpp: (WebCore::Scrollbar::autoscrollTimerFired): * platform/Scrollbar.h: * platform/Timer.h: (WebCore::Timer::Timer): * platform/audio/MediaSession.cpp: (WebCore::MediaSession::clientDataBufferingTimerFired): * platform/audio/MediaSession.h: * platform/efl/BatteryProviderEfl.cpp: (WebCore::BatteryProviderEfl::timerFired): * platform/efl/BatteryProviderEfl.h: * platform/graphics/BitmapImage.cpp: (WebCore::BitmapImage::startAnimation): (WebCore::BitmapImage::advanceAnimation): * platform/graphics/BitmapImage.h: * platform/graphics/MediaPlayer.cpp: (WebCore::MediaPlayer::reloadTimerFired): * platform/graphics/MediaPlayer.h: * platform/graphics/ShadowBlur.cpp: (WebCore::ScratchBuffer::timerFired): * platform/graphics/TiledBackingStore.cpp: (WebCore::TiledBackingStore::tileBufferUpdateTimerFired): (WebCore::TiledBackingStore::backingStoreUpdateTimerFired): * platform/graphics/TiledBackingStore.h: * platform/graphics/avfoundation/MediaSelectionGroupAVFObjC.h: * platform/graphics/avfoundation/MediaSelectionGroupAVFObjC.mm: (WebCore::MediaSelectionGroupAVFObjC::selectionTimerFired): * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h: * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm: (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekTimerFired): * platform/graphics/ca/LayerPool.cpp: (WebCore::LayerPool::pruneTimerFired): * platform/graphics/ca/LayerPool.h: * platform/graphics/ca/TileController.cpp: (WebCore::TileController::tileRevalidationTimerFired): * platform/graphics/ca/TileController.h: * platform/graphics/ca/TileGrid.cpp: (WebCore::TileGrid::cohortRemovalTimerFired): * platform/graphics/ca/TileGrid.h: * platform/graphics/ca/win/LegacyCACFLayerTreeHost.cpp: (WebCore::LegacyCACFLayerTreeHost::renderTimerFired): * platform/graphics/ca/win/LegacyCACFLayerTreeHost.h: * platform/graphics/cg/IOSurfacePool.cpp: (WebCore::IOSurfacePool::collectionTimerFired): * platform/graphics/cg/IOSurfacePool.h: * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: (WebCore::MediaPlayerPrivateGStreamer::fillTimerFired): * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h: * platform/graphics/mac/MediaPlayerPrivateQTKit.h: * platform/graphics/mac/MediaPlayerPrivateQTKit.mm: (WebCore::MediaPlayerPrivateQTKit::seekTimerFired): * platform/graphics/texmap/TextureMapper.cpp: (WebCore::BitmapTexturePool::releaseUnusedTexturesTimerFired): * platform/graphics/texmap/coordinated/CompositingCoordinator.cpp: (WebCore::CompositingCoordinator::releaseInactiveAtlasesTimerFired): * platform/graphics/texmap/coordinated/CompositingCoordinator.h: * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp: (WebCore::CoordinatedGraphicsLayer::animationStartedTimerFired): * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h: * platform/graphics/texmap/coordinated/CoordinatedImageBacking.cpp: (WebCore::CoordinatedImageBacking::clearContentsTimerFired): * platform/graphics/texmap/coordinated/CoordinatedImageBacking.h: * platform/ios/LegacyTileCache.h: * platform/ios/LegacyTileCache.mm: (WebCore::LegacyTileCache::tileCreationTimerFired): * platform/mac/HIDGamepadProvider.cpp: (WebCore::HIDGamepadProvider::connectionDelayTimerFired): (WebCore::HIDGamepadProvider::inputNotificationTimerFired): * platform/mac/HIDGamepadProvider.h: * platform/mac/ScrollAnimatorMac.h: * platform/mac/ScrollAnimatorMac.mm: (WebCore::ScrollAnimatorMac::snapRubberBandTimerFired): (WebCore::ScrollAnimatorMac::initialScrollbarPaintTimerFired): (WebCore::ScrollAnimatorMac::sendContentAreaScrolledTimerFired): * platform/mock/DeviceMotionClientMock.cpp: (WebCore::DeviceMotionClientMock::timerFired): * platform/mock/DeviceMotionClientMock.h: * platform/mock/DeviceOrientationClientMock.cpp: (WebCore::DeviceOrientationClientMock::timerFired): * platform/mock/DeviceOrientationClientMock.h: * platform/mock/GeolocationClientMock.cpp: (WebCore::GeolocationClientMock::permissionTimerFired): (WebCore::GeolocationClientMock::controllerTimerFired): * platform/mock/GeolocationClientMock.h: * platform/mock/PlatformSpeechSynthesizerMock.cpp: (WebCore::PlatformSpeechSynthesizerMock::speakingFinished): * platform/mock/PlatformSpeechSynthesizerMock.h: * platform/mock/TimerEventBasedMock.h: (WebCore::TimerEvent::timerFired): * platform/network/DNSResolveQueue.cpp: (WebCore::DNSResolveQueue::timerFired): * platform/network/DNSResolveQueue.h: * platform/network/NetworkStateNotifier.h: * platform/network/ResourceHandle.cpp: (WebCore::ResourceHandle::failureTimerFired): * platform/network/ResourceHandle.h: * platform/network/ResourceHandleInternal.h: * platform/network/curl/ResourceHandleManager.cpp: (WebCore::ResourceHandleManager::downloadTimerCallback): * platform/network/curl/ResourceHandleManager.h: * platform/network/mac/NetworkStateNotifierMac.cpp: (WebCore::NetworkStateNotifier::networkStateChangeTimerFired): * platform/network/win/ResourceHandleWin.cpp: (WebCore::ResourceHandle::fileLoadTimer): * plugins/PluginPackage.cpp: (WebCore::PluginPackage::freeLibraryTimerFired): * plugins/PluginPackage.h: * plugins/PluginStream.cpp: (WebCore::PluginStream::delayDeliveryTimerFired): * plugins/PluginStream.h: * plugins/PluginView.cpp: (WebCore::PluginView::popPopupsStateTimerFired): (WebCore::PluginView::requestTimerFired): (WebCore::PluginView::invalidateTimerFired): (WebCore::PluginView::lifeSupportTimerFired): * plugins/PluginView.h: * plugins/win/PluginMessageThrottlerWin.cpp: (WebCore::PluginMessageThrottlerWin::messageThrottleTimerFired): * plugins/win/PluginMessageThrottlerWin.h: * rendering/ImageQualityController.cpp: (WebCore::ImageQualityController::highQualityRepaintTimerFired): * rendering/ImageQualityController.h: * rendering/RenderButton.cpp: (WebCore::RenderButton::styleDidChange): (WebCore::RenderButton::timerFired): * rendering/RenderButton.h: * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::updateCompositingLayersTimerFired): (WebCore::RenderLayerCompositor::layerFlushTimerFired): (WebCore::RenderLayerCompositor::paintRelatedMilestonesTimerFired): * rendering/RenderLayerCompositor.h: * rendering/RenderMarquee.cpp: (WebCore::RenderMarquee::timerFired): * rendering/RenderMarquee.h: * rendering/RenderNamedFlowThread.cpp: (WebCore::RenderNamedFlowThread::regionOversetChangeEventTimerFired): * rendering/RenderNamedFlowThread.h: * rendering/RenderProgress.cpp: (WebCore::RenderProgress::animationTimerFired): * rendering/RenderProgress.h: * rendering/RenderView.cpp: (WebCore::RenderView::lazyRepaintTimerFired): * rendering/RenderView.h: * replay/EventLoopInputDispatcher.cpp: (WebCore::EventLoopInputDispatcher::timerFired): * replay/EventLoopInputDispatcher.h: * storage/StorageAreaImpl.cpp: (WebCore::StorageAreaImpl::closeDatabaseTimerFired): * storage/StorageAreaImpl.h: * storage/StorageAreaSync.cpp: (WebCore::StorageAreaSync::syncTimerFired): * storage/StorageAreaSync.h: * svg/SVGElement.cpp: (WebCore::SVGElement::svgLoadEventTimerFired): (WebCore::SVGElement::svgLoadEventTimer): * svg/SVGElement.h: * svg/SVGScriptElement.h: * svg/SVGStyleElement.h: * svg/SVGUseElement.h: * svg/animation/SMILTimeContainer.cpp: (WebCore::SMILTimeContainer::timerFired): * svg/animation/SMILTimeContainer.h: * xml/XMLHttpRequestProgressEventThrottle.cpp: (WebCore::XMLHttpRequestProgressEventThrottle::dispatchDeferredEvents): * xml/XMLHttpRequestProgressEventThrottle.h: 2014-11-06 Yongjun Zhang Don't send identifierForInitialRequest callback method for request with DoNotSendCallbacks option. https://bugs.webkit.org/show_bug.cgi?id=138473 The iOS specific code that sets up a valid m_identifier is not needed any more, since this will be done later in ResourceLoader::willSendRequest. This also matches the behavior that we don't call assignIdentifierToInitialRequest callback method if the reqeust has DoNotSendCallbacks option. Reviewed by Pratik Solanki. * loader/ResourceLoader.cpp: (WebCore::ResourceLoader::willSendRequest): Remove iOS specific block for setting up a valid m_identifier. In iOS, also make sure we still bail out if the resource loader was stopped in assignIdentifierToInitialRequest callback by a client. 2014-11-06 Dean Jackson [filters2] Support for backdrop-filter https://bugs.webkit.org/show_bug.cgi?id=138384 Reviewed by Simon Fraser. Take 2!! Previous patch was rolled out. Add prototype support for backdrop-filter http://dev.w3.org/fxtf/filters-2/#BackdropFilterProperty This adds support for parsing the new CSS property, adding the value to RenderStyle, noticing that on the layer tree, and the platform code in GraphicsLayer to render a backdrop and apply an effect to the result. Some things are missing: - animation of the backdrop-filter is not yet supported - backdrops will not work in cloned layers yet (e.g. reflections) Tests: css3/filters/backdrop/backdropfilter-property-computed-style.html css3/filters/backdrop/backdropfilter-property-parsing-invalid.html css3/filters/backdrop/backdropfilter-property-parsing.html css3/filters/backdrop/backdropfilter-property.html css3/filters/backdrop/effect-hw.html * WebCore.exp.in: Export the setBackdropFilters method so it can be used from WebKit. * css/CSSComputedStyleDeclaration.cpp: New property name. (WebCore::isLayoutDependent): (WebCore::ComputedStyleExtractor::propertyValue): Use the existing valueForFilter method. * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): Piggyback on the filter parser. * css/CSSPropertyNames.in: Add -webkit-backdrop-filter. * css/StyleResolver.cpp: (WebCore::StyleResolver::adjustRenderStyle): Add test for backdrop. (WebCore::StyleResolver::applyProperty): Support new property. * platform/graphics/GraphicsLayer.h: (WebCore::GraphicsLayer::needsBackdrop): New method to test for existence of values. (WebCore::GraphicsLayer::backdropFilters): Keeps the list of filters. (WebCore::GraphicsLayer::setBackdropFilters): (WebCore::GraphicsLayer::clearBackdropFilters): * platform/graphics/ca/GraphicsLayerCA.cpp: This adds a new m_backdropLayer CALayer that will sit behind the contents layer and provide the element's backdrop. (WebCore::GraphicsLayerCA::willBeDestroyed): (WebCore::GraphicsLayerCA::moveOrCopyAnimations): (WebCore::GraphicsLayerCA::setBackdropFilters): Set a custom appearance so remote layer hosts will notice the special layer. Also set the actual layer properties. (WebCore::GraphicsLayerCA::addAnimation): Remove whitespace. (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers): Update backdrop if necessary. (WebCore::GraphicsLayerCA::updateLayerNames): Give the new layer a name. (WebCore::GraphicsLayerCA::updateSublayerList): (WebCore::GraphicsLayerCA::updateGeometry): Make the backdrop layer match the contents layer geometry. (WebCore::GraphicsLayerCA::updateBackdropFilters): Create the backdrop layer if necessary, and copy the filter values to any clones. (WebCore::GraphicsLayerCA::ensureStructuralLayer): We need a structural layer if we have backdrop filters. (WebCore::GraphicsLayerCA::structuralLayerPurpose): (WebCore::GraphicsLayerCA::createAnimationFromKeyframes): (WebCore::GraphicsLayerCA::swapFromOrToTiledLayer): * platform/graphics/ca/GraphicsLayerCA.h: New StructuralLayerPurpose, new LayerChangeFlag. * platform/graphics/ca/PlatformCALayer.h: New LayerType. * platform/graphics/ca/mac/PlatformCALayerMac.mm: Define CABackdropLayer. (PlatformCALayerMac::PlatformCALayerMac): Create the correct CALayer type. * rendering/RenderElement.h: (WebCore::RenderElement::createsGroup): (WebCore::RenderElement::hasBackdropFilter): This method is always around, but only can return true when FILTERS_LEVEL_2 is enabled. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::paintsWithFilters): Remove an unnecessary comment. (WebCore::RenderLayer::calculateClipRects): * rendering/RenderLayer.h: Add hasBackdropFilter. * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::RenderLayerBacking): (WebCore::RenderLayerBacking::createPrimaryGraphicsLayer): Update the backdrop filters. (WebCore::RenderLayerBacking::updateBackdropFilters): Set the filters on the GraphicsLayer. (WebCore::RenderLayerBacking::updateGeometry): * rendering/RenderLayerBacking.h: * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::requiresOwnBackingStore): Needs backingstore if it has a backdrop filter. (WebCore::RenderLayerCompositor::reasonsForCompositing): (WebCore::RenderLayerCompositor::requiresCompositingForFilters): Return early if we have a backdrop filter, because currently we absolutely require compositing. * rendering/RenderLayerModelObject.cpp: (WebCore::RenderLayerModelObject::styleWillChange): Add hasBackdropFilter(). * rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::changeRequiresLayout): Check backdrops for change. * rendering/style/RenderStyle.h: Add the backdropFilter style stuff. * rendering/style/StyleRareNonInheritedData.cpp: (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData): (WebCore::StyleRareNonInheritedData::operator==): (WebCore::StyleRareNonInheritedData::hasBackdropFilters): * rendering/style/StyleRareNonInheritedData.h: 2014-11-06 Benjamin Poulain Give pseudo elements the correct specificity https://bugs.webkit.org/show_bug.cgi?id=138378 Reviewed by Dean Jackson. WebKit had an old silly bug where pseudo elements were given specificity in the class B instead of the class C. Now that the inspector shows the specificity, this bug is much more visible which is why I fix it now. Test: fast/css/pseudo-element-specificity.html * css/CSSSelector.cpp: (WebCore::CSSSelector::specificityForOneSelector): Give pseudo-elements the right specificity. * Modules/mediacontrols/mediaControlsApple.css: (video::-webkit-media-controls-volume-slider): (audio::-webkit-media-controls-volume-slider::-webkit-slider-thumb): (audio::-webkit-media-controls-volume-slider::-webkit-slider-thumb:active::-webkit-slider-thumb): (audio::-webkit-media-controls-timeline): (audio::-webkit-media-controls-timeline::-webkit-slider-thumb): (audio::-webkit-media-controls-timeline:active::-webkit-slider-thumb,): (video:-webkit-full-screen::-webkit-media-controls-volume-slider): (video:-webkit-full-screen::-webkit-media-controls-volume-slider::-webkit-slider-thumb): * Modules/mediacontrols/mediaControlsBase.css: (video::-webkit-media-controls-volume-slider): (audio::-webkit-media-controls-volume-slider::-webkit-slider-thumb): (audio::-webkit-media-controls-volume-slider::-webkit-slider-thumb:active::-webkit-slider-thumb): (audio::-webkit-media-controls-timeline): (audio::-webkit-media-controls-timeline::-webkit-slider-thumb): (audio::-webkit-media-controls-timeline:active::-webkit-slider-thumb,): (video:-webkit-full-screen::-webkit-media-controls-volume-slider): (video:-webkit-full-screen::-webkit-media-controls-volume-slider::-webkit-slider-thumb): * css/mediaControls.css: (audio::-webkit-media-controls-volume-slider, video::-webkit-media-controls-volume-slider): (audio::-webkit-media-controls-volume-slider-mute-button, video::-webkit-media-controls-volume-slider-mute-button): * css/mediaControlsGtk.css: (audio::-webkit-media-controls-timeline, video::-webkit-media-controls-timeline): (audio::-webkit-media-controls-timeline[disabled], video::-webkit-media-controls-timeline[disabled]): (audio::-webkit-media-controls-volume-slider, video::-webkit-media-controls-volume-slider): The media controls were relying on the bug to override the style of input[type=range]. Ideally we should either: -Implement some kind of high level style isolation (e.g. CSS Scoping). -Fix the media control tree to use regular CSS scoped by a shadow pseudo ID. Until we have one of those, I just fixed the styling by forcing the properties with lower specificity with !important. 2014-11-06 Beth Dakin Preview views often misplaced inside popover https://bugs.webkit.org/show_bug.cgi?id=138472 Reviewed by Tim Horton. * WebCore.exp.in: 2014-11-06 Michael Saboff REGRESSION (r174985-174986): Site display disappears https://bugs.webkit.org/show_bug.cgi?id=138082 Reviewed by Geoffrey Garen. This effectively reverts to the behavior before r174985 by using the lexical global object of the caller's frame to find the active document. Before r174985, native functions are invoked with the ScopeShain of their caller. The lexical global object is accessed from the ScopeChain. * bindings/js/JSHTMLDocumentCustom.cpp: (WebCore::JSHTMLDocument::getOwnPropertySlot): (WebCore::findOwningDocument): (WebCore::documentWrite): (WebCore::JSHTMLDocument::write): (WebCore::JSHTMLDocument::writeln): * html/HTMLDocument.idl: 2014-11-05 Sam Weinig Use std::unique_ptr for TileController https://bugs.webkit.org/show_bug.cgi?id=138429 Reviewed by Anders Carlsson. * WebCore.exp.in: * platform/graphics/ca/TileController.cpp: (WebCore::TileController::create): Deleted. * platform/graphics/ca/TileController.h: * platform/graphics/ca/mac/WebTiledBackingLayer.h: * platform/graphics/ca/mac/WebTiledBackingLayer.mm: (-[WebTiledBackingLayer createTileController:]): * platform/graphics/ca/win/PlatformCALayerWinInternal.cpp: (PlatformCALayerWinInternal::createTileController): * platform/graphics/ca/win/PlatformCALayerWinInternal.h: 2014-11-06 Chris Dumez Use lambda functions in DocumentOrderedMap https://bugs.webkit.org/show_bug.cgi?id=138376 Reviewed by Darin Adler. Use lambda functions in DocumentOrderedMap instead of separate named functions. No new tests, no behavior change. * dom/DocumentOrderedMap.cpp: (WebCore::DocumentOrderedMap::get): (WebCore::DocumentOrderedMap::getElementById): (WebCore::DocumentOrderedMap::getElementByName): (WebCore::DocumentOrderedMap::getElementByMapName): (WebCore::DocumentOrderedMap::getElementByLowercasedMapName): (WebCore::DocumentOrderedMap::getElementByLowercasedUsemap): (WebCore::DocumentOrderedMap::getElementByLabelForAttribute): (WebCore::DocumentOrderedMap::getElementByWindowNamedItem): (WebCore::DocumentOrderedMap::getElementByDocumentNamedItem): (WebCore::DocumentOrderedMap::getAllElementsById): (WebCore::keyMatchesId): Deleted. (WebCore::keyMatchesName): Deleted. (WebCore::keyMatchesMapName): Deleted. (WebCore::keyMatchesLowercasedMapName): Deleted. (WebCore::keyMatchesLowercasedUsemap): Deleted. (WebCore::keyMatchesLabelForAttribute): Deleted. (WebCore::keyMatchesWindowNamedItem): Deleted. (WebCore::keyMatchesDocumentNamedItem): Deleted. * dom/DocumentOrderedMap.h: 2014-11-05 Shivakumar JM splitText API does not match DOM specification. https://bugs.webkit.org/show_bug.cgi?id=138405 Reviewed by Chris Dumez. Make the offset argument for splitText API as mandatory (and thus throw if it is omitted) and stop throwing if the offset argument is negative (and wraps to a valid index) as per specification: https://w3c.github.io/dom/#interface-text. Also This matches the behavior of both Firefox 33 and Chrome 38. Test: fast/dom/Text/splitText.html * dom/Text.idl: 2014-11-05 Commit Queue Unreviewed, rolling out r175672. https://bugs.webkit.org/show_bug.cgi?id=138455 Tries to make backdrop layers on every layer, asserts on Mavericks (Requested by smfr on #webkit). Reverted changeset: "[filters2] Support for backdrop-filter" https://bugs.webkit.org/show_bug.cgi?id=138384 http://trac.webkit.org/changeset/175672 2014-11-04 Ada Chan Figure out whether a plug-in is playing audio. https://bugs.webkit.org/show_bug.cgi?id=137219 Reviewed by Anders Carlsson. Add NPPVpluginIsPlayingAudio. Export some WebCore methods that will be used in WebKit2. No new tests, but manually tested with an example plugin. * WebCore.exp.in: * plugins/npapi.h: 2014-11-05 Simon Fraser Fix crash introduced in r175656 https://bugs.webkit.org/show_bug.cgi?id=138453 Reviewed by Dan Bernstein. repaintContainer can be null sometimes. Covered by existing tests. * rendering/RenderLayerCompositor.cpp: (WebCore::styleChangeRequiresLayerRebuild): 2014-11-05 Dan Bernstein Tried to fix the Windows build after removing the deletion UI. * WebCore.vcxproj/WebCore.vcxproj: * WebCore.vcxproj/WebCore.vcxproj.filters: * editing/EditingAllInOne.cpp: 2014-11-04 Dean Jackson [filters2] Support for backdrop-filter https://bugs.webkit.org/show_bug.cgi?id=138384 Reviewed by Simon Fraser. Add prototype support for backdrop-filter http://dev.w3.org/fxtf/filters-2/#BackdropFilterProperty This adds support for parsing the new CSS property, adding the value to RenderStyle, noticing that on the layer tree, and the platform code in GraphicsLayer to render a backdrop and apply an effect to the result. Some things are missing: - animation of the backdrop-filter is not yet supported - backdrops will not work in cloned layers yet (e.g. reflections) Tests: css3/filters/backdrop/backdropfilter-property-computed-style.html css3/filters/backdrop/backdropfilter-property-parsing-invalid.html css3/filters/backdrop/backdropfilter-property-parsing.html css3/filters/backdrop/backdropfilter-property.html css3/filters/backdrop/effect-hw.html * WebCore.exp.in: Export the setBackdropFilters method so it can be used from WebKit. * css/CSSComputedStyleDeclaration.cpp: New property name. (WebCore::isLayoutDependent): (WebCore::ComputedStyleExtractor::propertyValue): Use the existing valueForFilter method. * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): Piggyback on the filter parser. * css/CSSPropertyNames.in: Add -webkit-backdrop-filter. * css/StyleResolver.cpp: (WebCore::StyleResolver::adjustRenderStyle): Add test for backdrop. (WebCore::StyleResolver::applyProperty): Support new property. * platform/graphics/GraphicsLayer.h: (WebCore::GraphicsLayer::needsBackdrop): New method to test for existence of values. (WebCore::GraphicsLayer::backdropFilters): Keeps the list of filters. (WebCore::GraphicsLayer::setBackdropFilters): (WebCore::GraphicsLayer::clearBackdropFilters): * platform/graphics/ca/GraphicsLayerCA.cpp: This adds a new m_backdropLayer CALayer that will sit behind the contents layer and provide the element's backdrop. (WebCore::GraphicsLayerCA::willBeDestroyed): (WebCore::GraphicsLayerCA::moveOrCopyAnimations): (WebCore::GraphicsLayerCA::setBackdropFilters): Set a custom appearance so remote layer hosts will notice the special layer. Also set the actual layer properties. (WebCore::GraphicsLayerCA::addAnimation): Remove whitespace. (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers): Update backdrop if necessary. (WebCore::GraphicsLayerCA::updateLayerNames): Give the new layer a name. (WebCore::GraphicsLayerCA::updateSublayerList): (WebCore::GraphicsLayerCA::updateGeometry): Make the backdrop layer match the contents layer geometry. (WebCore::GraphicsLayerCA::updateBackdropFilters): Create the backdrop layer if necessary, and copy the filter values to any clones. (WebCore::GraphicsLayerCA::ensureStructuralLayer): We need a structural layer if we have backdrop filters. (WebCore::GraphicsLayerCA::structuralLayerPurpose): (WebCore::GraphicsLayerCA::createAnimationFromKeyframes): (WebCore::GraphicsLayerCA::swapFromOrToTiledLayer): * platform/graphics/ca/GraphicsLayerCA.h: New StructuralLayerPurpose, new LayerChangeFlag. * platform/graphics/ca/PlatformCALayer.h: New LayerType. * platform/graphics/ca/mac/PlatformCALayerMac.mm: Define CABackdropLayer. (PlatformCALayerMac::PlatformCALayerMac): Create the correct CALayer type. * rendering/RenderElement.h: (WebCore::RenderElement::createsGroup): (WebCore::RenderElement::hasBackdropFilter): This method is always around, but only can return true when FILTERS_LEVEL_2 is enabled. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::paintsWithFilters): Remove an unnecessary comment. (WebCore::RenderLayer::calculateClipRects): * rendering/RenderLayer.h: Add hasBackdropFilter. * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::RenderLayerBacking): (WebCore::RenderLayerBacking::createPrimaryGraphicsLayer): Update the backdrop filters. (WebCore::RenderLayerBacking::updateBackdropFilters): Set the filters on the GraphicsLayer. (WebCore::RenderLayerBacking::updateGeometry): * rendering/RenderLayerBacking.h: * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::requiresOwnBackingStore): Needs backingstore if it has a backdrop filter. (WebCore::RenderLayerCompositor::reasonsForCompositing): (WebCore::RenderLayerCompositor::requiresCompositingForFilters): Return early if we have a backdrop filter, because currently we absolutely require compositing. * rendering/RenderLayerModelObject.cpp: (WebCore::RenderLayerModelObject::styleWillChange): Add hasBackdropFilter(). * rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::changeRequiresLayout): Check backdrops for change. * rendering/style/RenderStyle.h: Add the backdropFilter style stuff. * rendering/style/StyleRareNonInheritedData.cpp: (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData): (WebCore::StyleRareNonInheritedData::operator==): (WebCore::StyleRareNonInheritedData::hasBackdropFilters): * rendering/style/StyleRareNonInheritedData.h: 2014-11-05 Chris Dumez Move 'size' CSS property to the new StyleBuilder https://bugs.webkit.org/show_bug.cgi?id=138337 Reviewed by Andreas Kling. Move 'size' CSS property from DeprecatedStyleBuilder to the new StyleBuilder by using custom code as it requires special handling. No new tests, new behavior change. * css/CSSPropertyNames.in: * css/DeprecatedStyleBuilder.cpp: (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder): (WebCore::ApplyPropertyPageSize::mmLength): Deleted. (WebCore::ApplyPropertyPageSize::inchLength): Deleted. (WebCore::ApplyPropertyPageSize::getPageSizeFromName): Deleted. (WebCore::ApplyPropertyPageSize::applyInheritValue): Deleted. (WebCore::ApplyPropertyPageSize::applyInitialValue): Deleted. (WebCore::ApplyPropertyPageSize::applyValue): Deleted. (WebCore::ApplyPropertyPageSize::createHandler): Deleted. * css/StyleBuilderCustom.h: (WebCore::StyleBuilderFunctions::mmLength): (WebCore::StyleBuilderFunctions::inchLength): (WebCore::StyleBuilderFunctions::getPageSizeFromName): (WebCore::StyleBuilderFunctions::applyInheritSize): (WebCore::StyleBuilderFunctions::applyInitialSize): (WebCore::StyleBuilderFunctions::applyValueSize): 2014-11-05 Chris Dumez Revert r175441 as it seems to be causing intermittent crashes in DOMTimer https://bugs.webkit.org/show_bug.cgi?id=138449 Unreviewed roll out. Revert r175441 as it seems to be causing intermittent crashes in DOMTimer due to the scriptExecutionContext going away. See . * page/DOMTimer.cpp: (WebCore::DOMTimer::install): (WebCore::DOMTimer::fired): (WebCore::NestedTimersVector::NestedTimersVector): Deleted. (WebCore::NestedTimersVector::~NestedTimersVector): Deleted. (WebCore::NestedTimersVector::registerTimer): Deleted. (WebCore::NestedTimersVector::begin): Deleted. (WebCore::NestedTimersVector::end): Deleted. 2014-11-05 Simon Fraser Avoid backing store for opacity:0 descendant layers https://bugs.webkit.org/show_bug.cgi?id=138448 Reviewed by Dean Jackson. If a composited layer has no rendered content but a painting zero-opacity descendant layer, than we can avoid making backing store. When the opacity on such a child changes, we need to trigger a tree rebuild to force the backing store to come back (this could be optimized later). Tests: compositing/backing/no-backing-for-opacity-0-child.html compositing/backing/toggle-opacity-0-child.html * rendering/RenderLayer.cpp: (WebCore::RenderLayer::calculateClipRects): * rendering/RenderLayerCompositor.cpp: (WebCore::styleChangeRequiresLayerRebuild): * rendering/RenderObject.cpp: (WebCore::RenderObject::containerForRepaint): 2014-11-05 Chris Dumez Assertion hit DOMTimer::updateTimerIntervalIfNecessary() https://bugs.webkit.org/show_bug.cgi?id=138440 Reviewed by Geoffrey Garen. We sometimes hit the ASSERT(repeatInterval() == previousInterval) assertion in DOMTimer::updateTimerIntervalIfNecessary() when visiting the following pages: http://lifehacker.com/the-healthiest-foods-for-one-handed-snacking-while-gami-1654728164 http://longform.org/posts/like-something-the-lord-made After debugging, the issue turned out to be that we are comparing floating point numbers using ==, and the check sometimes fails even though the values really close to each other. This patch updates the DOMTimer code to use WTF::withinEpsilon() instead of operator==() to compare the floating point intervals. I confirmed manually that the assertion is no longer hit. * page/DOMTimer.cpp: (WebCore::DOMTimer::updateTimerIntervalIfNecessary): * platform/graphics/FloatQuad.cpp: (WebCore::FloatQuad::isRectilinear): (WebCore::withinEpsilon): Deleted. 2014-11-05 Chris Fleizach AX: add "alt" as an overriding synonym of "-webkit-alt" (now in the CSS4 spec) https://bugs.webkit.org/show_bug.cgi?id=138393 Reviewed by Dean Jackson. Add official "alt" CSS keyword and map -webkit-alt to that. Test: platform/mac/accessibility/alt-for-css-content.html * css/CSSComputedStyleDeclaration.cpp: (WebCore::ComputedStyleExtractor::propertyValue): * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): * css/CSSPropertyNames.in: * css/StyleResolver.cpp: (WebCore::StyleResolver::applyProperty): 2014-11-05 Gyuyoung Kim Unreviewed, EFL build fix since r175647 * CMakeLists.txt: Remove DeleteButton.cpp and DeleteButtonController.cpp. 2014-11-05 Chris Dumez Allow constructing a PassRef from a Ref https://bugs.webkit.org/show_bug.cgi?id=138389 Reviewed by Andreas Kling. Remove calls to Ref::get() now that a PassRef can be directly constructed from a Ref. No new tests, no behavior change. * css/CSSValuePool.cpp: (WebCore::CSSValuePool::createColorValue): * css/CSSValuePool.h: (WebCore::CSSValuePool::createInheritedValue): (WebCore::CSSValuePool::createImplicitInitialValue): (WebCore::CSSValuePool::createExplicitInitialValue): * html/HTMLLinkElement.cpp: (WebCore::HTMLLinkElement::setCSSStyleSheet): 2014-11-05 Dan Bernstein Remove the unused deletion UI feature https://bugs.webkit.org/show_bug.cgi?id=138442 Rubber-stamped by Alexey Proskuryakov. * Resources/deleteButton.png: Removed. * Resources/deleteButton@2x.png: Removed. * Resources/deleteButtonPressed.png: Removed. * Resources/deleteButtonPressed@2x.png: Removed. * WebCore.xcodeproj/project.pbxproj: Removed references to removed files. * dom/ContainerNode.cpp: (WebCore::ContainerNode::cloneChildNodes): Folded the below helper function into this member function, after removing the deleteButtonContainerElement parameter. (WebCore::cloneChildNodesAvoidingDeleteButton): Deleted. * editing/CompositeEditCommand.cpp: (WebCore::EditCommandComposition::unapply): Removed use of DeleteButtonControllerDisableScope. (WebCore::EditCommandComposition::reapply): Ditto. (WebCore::CompositeEditCommand::apply): Ditto. * editing/DeleteButton.cpp: Removed. * editing/DeleteButton.h: Removed. * editing/DeleteButtonController.cpp: Removed. * editing/DeleteButtonController.h: Removed. * editing/EditCommand.cpp: (WebCore::EditCommand::EditCommand): Removed use of Editor::avoidIntersectionWithDeleteButtonController. * editing/Editor.cpp: (WebCore::Editor::Editor): Removed initialization of m_deleteButtonController. (WebCore::Editor::rangeForPoint): Removed use of avoidIntersectionWithDeleteButtonController. (WebCore::Editor::editorUIUpdateTimerFired): Removed call to DeleteButtonController function. (WebCore::Editor::avoidIntersectionWithDeleteButtonController): Deleted. (WebCore::Editor::deviceScaleFactorChanged): Deleted. * editing/Editor.h: (WebCore::Editor::deleteButtonController): Deleted. (WebCore::Editor::avoidIntersectionWithDeleteButtonController): Deleted. * editing/MarkupAccumulator.cpp: (WebCore::MarkupAccumulator::serializeNodes): Removed nodeToSkip parameter. (WebCore::MarkupAccumulator::serializeNodesWithNamespaces): Ditto. * editing/MarkupAccumulator.h: * editing/markup.cpp: (WebCore::createMarkupInternal): Removed updateRange parameter, which had become identical to the range parameter, and changed to use the latter everywhere instead. (WebCore::createMarkup): Don’t compute and pass separate updateRanage parameter. * loader/EmptyClients.h: Removed shouldShowDeleteInterface override. * page/EditorClient.h: Removed shouldShowDeleteInterface. * page/Page.cpp: (WebCore::Page::setDeviceScaleFactor): Removed call to Editor::deviceScaleFactorChanged. * page/PageSerializer.cpp: (WebCore::PageSerializer::serializeFrame): Updated for MarkupAccumulator::serializeNodes change. * testing/Internals.cpp: (WebCore::Internals::findEditingDeleteButton): Deleted. * testing/Internals.h: * testing/Internals.idl: 2014-11-04 David Hyatt Descendant ends up in wrong flow thread with nested columns and spans. https://bugs.webkit.org/show_bug.cgi?id=137273 Reviewed by Simon Fraser. Unskipped the two problematic span tests. * rendering/RenderMultiColumnFlowThread.cpp: (WebCore::isValidColumnSpanner): Remove the guard and comment and added the assertion back in. (WebCore::RenderMultiColumnFlowThread::flowThreadDescendantInserted): Changed to no longer use handleSpannerRemoval. Because the spanner was removed from the flow thread's map, handleSpannerRemoval was a no-op. So instead I just removed the placeholder by hand. The second fix was to stop destroying the placeholder. Since the placeholder can just have been inserted, you can't delete it, since otherwise code further up the stack will access the deleted object. For now, we just leak the placeholder. The third fix is to make sure the subtreeRoot is properly updated to be the new placeholder. 2014-11-05 Andreas Kling RenderBlock shouldn't need a pre-destructor hook. Reviewed by Antti Koivisto. All that was interesting in RenderBlock::willBeDestroyed() has migrated to RenderBlockFlow. removeFromUpdateScrollInfoAfterLayoutTransaction() can be called from the plain destructor, so just move it there. We don't have to worry about destroyLeftoverChildren(), since RenderElement will take care of that for us. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::~RenderBlock): (WebCore::RenderBlock::willBeDestroyed): Deleted. * rendering/RenderBlock.h: 2014-11-05 Chris Dumez Remove 2 unnecessary virtual functions on InputType https://bugs.webkit.org/show_bug.cgi?id=138433 Reviewed by Andreas Kling. Remove 2 unused virtual functions on InputType: - valueAttributeChanged() - updateClearButtonVisibility() No new tests, no behavior change. * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::parseAttribute): (WebCore::HTMLInputElement::updateClearButtonVisibility): Deleted. * html/HTMLInputElement.h: * html/InputType.cpp: (WebCore::InputType::valueAttributeChanged): Deleted. (WebCore::InputType::updateClearButtonVisibility): Deleted. * html/InputType.h: 2014-11-05 Chris Dumez Re-evaluate if a repetitive timer should be throttled upon firing https://bugs.webkit.org/show_bug.cgi?id=138339 Reviewed by Gavin Barraclough. Re-evaluate if a repetitive timer should be throttled upon firing in case the plugin observability state has changed: - It used to be visible but now isn't and thus the timer can be throttled - It used to play audio but now doesn't and thus the timer can be throttled We already stopped throttling if the plugin became observable. However, we didn't start throttling if the plugin became non-observable. * page/DOMTimer.cpp: (WebCore::DOMTimer::updateThrottlingStateIfNecessary): 2014-11-03 Dean Jackson Add ENABLE_FILTERS_LEVEL_2 feature guard. https://bugs.webkit.org/show_bug.cgi?id=138362 Reviewed by Tim Horton. Add a new feature define for Level 2 of CSS Filters. http://dev.w3.org/fxtf/filters-2/ * Configurations/FeatureDefines.xcconfig: 2014-11-05 Chris Dumez Move text-align CSS property to the new StyleBuilder https://bugs.webkit.org/show_bug.cgi?id=138398 Reviewed by Antti Koivisto. Move text-align CSS property from DeprecatedStyleBuilder to the new StyleBuilder so that it is now generated from CSSPropertyNames.in. This patch adds a TextAlign Converter to support this. No new tests, no behavior change. * css/CSSPropertyNames.in: * css/DeprecatedStyleBuilder.cpp: (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder): (WebCore::ApplyPropertyTextAlign::applyValue): Deleted. (WebCore::ApplyPropertyTextAlign::createHandler): Deleted. * css/StyleBuilderConverter.h: (WebCore::StyleBuilderConverter::convertTextAlign): 2014-11-05 Sanghyup Lee Fix build warning in SVGMarkerElement.cpp https://bugs.webkit.org/show_bug.cgi?id=138407 Reviewed by Darin Adler. Build warning in debug cause 'comparison of unsigned expression >= 0 is always true [-Wtype-limits]' * svg/SVGMarkerElement.cpp: (WebCore::SVGMarkerElement::orientType): Removed useless condition in ASSERT. 2014-11-05 Chris Dumez Stop special-casing the empty string in HTMLInputElement.type setter https://bugs.webkit.org/show_bug.cgi?id=138403 Reviewed by Ryosuke Niwa. Stop special-casing the empty string in HTMLInputElement.type setter. Previously, if input.type is set to "", we would remove the type attribute. This is inconsistent with the specification and the behavior of other browsers (tested Firefox 33 and Chrome 38). Instead, we should set the attribute to the empty string. Also stop treating null as a null string to align with the specification and other browsers (tested Firefox 33 and Chrome 38). Finally, update HTMLInputElement::setType() to take an AtomicString in argument instead of a String as it ends up calling setAttribute(), and thus needing an AtomicString. Test: fast/dom/HTMLInputElement/input-type-attribute.html * html/FileInputType.cpp: (WebCore::UploadButtonElement::UploadButtonElement): * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::setType): * html/HTMLInputElement.h: * html/HTMLInputElement.idl: 2014-11-05 peavo@outlook.com [WinCairo] Compile error, missing guard. https://bugs.webkit.org/show_bug.cgi?id=138421 Reviewed by Brent Fulgham. There is missing a guard for CSS_SELECTORS_LEVEL4 in CSSParserValues.cpp. * css/CSSParserValues.cpp: 2014-11-05 Antti Koivisto REGRESSION(r175601): Assertion failures in SimpleLineLayout https://bugs.webkit.org/show_bug.cgi?id=138422 Check for end. * rendering/SimpleLineLayout.cpp: (WebCore::SimpleLineLayout::FlowContentIterator::isNewlineCharacter): (WebCore::SimpleLineLayout::removeTrailingWhitespace): 2014-11-05 Andreas Kling Simple line layout: support text-transform: lowercase|uppercase|capitalize Reviewed by Antti Koivisto. Expand the simple line layout coverage to include all text-transform values. Since the property works on the text string level, it's really only a matter of removing the short-circuit. Test: fast/text/simple-lines-text-transform.html * rendering/SimpleLineLayout.cpp: (WebCore::SimpleLineLayout::canUseFor): 2014-11-05 Jer Noble [EME][Mac] Allow the client to specify FPS protocol versions in the keySystem type field. https://bugs.webkit.org/show_bug.cgi?id=138380 Reviewed by Eric Carlson. Parse out the requested FPS protocol version of the keySystem type string and pass it to AVStreamDataParser as an options dictionary. * platform/graphics/avfoundation/CDMPrivateMediaSourceAVFObjC.mm: (WebCore::validKeySystemRE): Added, match comma-separated version suffixes. (WebCore::CDMPrivateMediaSourceAVFObjC::supportsKeySystem): Call above. (WebCore::CDMPrivateMediaSourceAVFObjC::createSession): Parse out the version numbers and pass into the session as a vector. * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h: * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm: (WebCore::CDMSessionMediaSourceAVFObjC::CDMSessionMediaSourceAVFObjC): Take a vector of protocol version numbers. (WebCore::CDMSessionMediaSourceAVFObjC::update): Create an NSArray and pass into the key request creation method in an options dictionary. 2014-11-05 Antti Koivisto Move HTTPHeaderMap encoding to the class https://bugs.webkit.org/show_bug.cgi?id=138412 Reviewed by Andreas Kling. * platform/network/HTTPHeaderMap.h: (WebCore::HTTPHeaderMap::encode): (WebCore::HTTPHeaderMap::decode): Use generic encoding for the uncommon header map. Common headers still require custom code due to the enum class. 2014-11-04 Beth Dakin Un-anchor data detector popovers on scroll https://bugs.webkit.org/show_bug.cgi?id=138385 -and corresponding- rdar://problem/18869345 Reviewed by Tim Horton. * platform/spi/mac/DataDetectorsSPI.h: 2014-11-04 Chris Dumez Avoid double hash table lookup in SpaceSplitStringData::create() https://bugs.webkit.org/show_bug.cgi?id=138396 Reviewed by Ryosuke Niwa. Avoid double hash table lookup in SpaceSplitStringData::create() by calling HashMap::add() and using the AddResult, instead of calling HashMap::get() then HashMap::add(). No new tests, no behavior change. * dom/SpaceSplitString.cpp: (WebCore::SpaceSplitStringData::create): 2014-11-04 Zalan Bujtas Simple line layout: Abstract out content iteration and text handling in general. https://bugs.webkit.org/show_bug.cgi?id=138346 Reviewed by Antti Koivisto. Add a class that can act as the primary iterator/fragment handling interface to the line parser. This helps adding support multiple renderer elements without changing the parser logic. Currently it operates strictly on the first child of the RenderBlockFlow. Covered by existing tests. * rendering/SimpleLineLayout.cpp: (WebCore::SimpleLineLayout::FlowContentIterator::FlowContentIterator): (WebCore::SimpleLineLayout::FlowContentIterator::findNextBreakablePosition): (WebCore::SimpleLineLayout::FlowContentIterator::findNextNonWhitespacePosition): (WebCore::SimpleLineLayout::FlowContentIterator::textWidth): (WebCore::SimpleLineLayout::FlowContentIterator::isNewlineCharacter): (WebCore::SimpleLineLayout::FlowContentIterator::isEndOfContent): (WebCore::SimpleLineLayout::FlowContentIterator::style): (WebCore::SimpleLineLayout::computeLineLeft): (WebCore::SimpleLineLayout::TextFragment::TextFragment): (WebCore::SimpleLineLayout::removeTrailingWhitespace): (WebCore::SimpleLineLayout::initializeNewLine): (WebCore::SimpleLineLayout::splitFragmentToFitLine): (WebCore::SimpleLineLayout::nextFragment): (WebCore::SimpleLineLayout::createLineRuns): (WebCore::SimpleLineLayout::closeLineEndingAndAdjustRuns): (WebCore::SimpleLineLayout::createTextRuns): (WebCore::SimpleLineLayout::create): (WebCore::SimpleLineLayout::skipWhitespace): Deleted. (WebCore::SimpleLineLayout::textWidth): Deleted. * rendering/SimpleLineLayout.h: 2014-11-04 Jeremy Jones Fix build after r138351 https://bugs.webkit.org/show_bug.cgi?id=138401 Ureviewed. Make return type match. * platform/ios/WebCoreSystemInterfaceIOS.mm: 2014-11-04 Tim Horton Add bundle SPI allowing PageOverlay to customize the action menu https://bugs.webkit.org/show_bug.cgi?id=138388 Reviewed by Anders Carlsson. * page/PageOverlayController.h: Expose the list of all overlays. 2014-11-03 Jeremy Jones Add button and enable optimized fullscreen. https://bugs.webkit.org/show_bug.cgi?id=138351 Reviewed by Eric Carlson. Added optimizedFullscreenButton to js media element controls. Remove #if conditional and use optimizedFullscreenSupported to enable feature at runtime * Modules/mediacontrols/MediaControlsHost.cpp: (WebCore::MediaControlsHost::enterFullscreenOptimized): enable (WebCore::MediaControlsHost::optimizedFullscreenSupported): added * Modules/mediacontrols/MediaControlsHost.h: add optimizedFullscreenSupported * Modules/mediacontrols/MediaControlsHost.idl: ditto * Modules/mediacontrols/mediaControlsApple.css: (audio::-webkit-media-controls-optimized-fullscreen-button): added * Modules/mediacontrols/mediaControlsApple.js: (Controller.prototype.createControls): add button (Controller.prototype.handleReadyStateChange): update button (Controller.prototype.updateOptimizedFullscreenButton): added * Modules/mediacontrols/mediaControlsiOS.css: (audio::-webkit-media-controls-optimized-fullscreen-button): added (video::-webkit-media-controls-optimized-fullscreen-button): added (video::-webkit-media-controls-optimized-fullscreen-button:active): added * Modules/mediacontrols/mediaControlsiOS.js: (ControllerIOS.prototype.createControls): listen for events from optimizedFullscreenButton (ControllerIOS.prototype.configureInlineControls): add button for non-audio when supported. (ControllerIOS.prototype.handleBaseGestureChange): 2-finger double-tap gesture for optimized fullscreen (ControllerIOS.prototype.handleWrapperTouchStart): ditto (ControllerIOS.prototype.handleOptimizedFullscreenButtonClicked): added (ControllerIOS.prototype.handleOptimizedFullscreenTouchStart): added (ControllerIOS.prototype.handleOptimizedFullscreenTouchEnd): added (ControllerIOS.prototype.handleOptimizedFullscreenTouchCancel): added (ControllerIOS.prototype.handleStartPlaybackButtonTouchStart): fix typo (ControllerIOS.prototype.handleStartPlaybackButtonTouchEnd): fix typo (ControllerIOS.prototype.handleStartPlaybackButtonTouchCancel): fix typo * WebCore.exp.in: * platform/ios/WebCoreSystemInterfaceIOS.h: added wkIsOptimizedFullscreenSupported * platform/ios/WebCoreSystemInterfaceIOS.mm: added wkIsOptimizedFullscreenSupported * platform/ios/WebVideoFullscreenInterfaceAVKit.h: * platform/ios/WebVideoFullscreenInterfaceAVKit.mm: (WebVideoFullscreenInterfaceAVKit::enterFullscreen): enable feature (WebVideoFullscreenInterfaceAVKit::exitFullscreen): enable feature (WebVideoFullscreenInterfaceAVKit::cleanupFullscreen): only request exit when entered and not requested exit (WebVideoFullscreenInterfaceAVKit::requestHideAndExitFullscreen): ditto 2014-11-04 Joseph Pecoraro Web Inspector: Pause on exceptions should show the actual exception https://bugs.webkit.org/show_bug.cgi?id=63096 Reviewed by Timothy Hatcher. * inspector/InspectorInstrumentation.cpp: (WebCore::InspectorInstrumentation::addMessageToConsoleImpl): Pass assertion message on. 2014-11-04 Reza Abbasian [iOS] Fix incorrect interface orientation that can be caused by fullscreen video dismissal. https://bugs.webkit.org/show_bug.cgi?id=137930. Reviewed by Jer Noble. When a fullscreen video gets dismissed programmatically, for instance for removing a webview from the view hierarchy, it can put the device in an incorrect orientation. Make sure we retain the window of parentView when we attempt to go to fullscreen and use the retained window for putting the device in correct orientation after dismissal. * platform/ios/WebVideoFullscreenInterfaceAVKit.h: * platform/ios/WebVideoFullscreenInterfaceAVKit.mm: (WebVideoFullscreenInterfaceAVKit::setupFullscreen): (WebVideoFullscreenInterfaceAVKit::cleanupFullscreen): (WebVideoFullscreenInterfaceAVKit::invalidate): 2014-11-04 Andreas Kling Remove two unused ScrollingCoordinator methods. Reviewed by Chris Dumez. These appear to be leftovers from the now-defunct chromium port. * page/scrolling/ScrollingCoordinator.cpp: (WebCore::ScrollingCoordinator::horizontalScrollbarLayerForScrollableArea): Deleted. (WebCore::ScrollingCoordinator::verticalScrollbarLayerForScrollableArea): Deleted. * page/scrolling/ScrollingCoordinator.h: 2014-11-04 Chris Dumez Add ptr() method to Ref class https://bugs.webkit.org/show_bug.cgi?id=138361 Reviewed by Darin Adler. Use the new Ref::ptr() method. No new tests, no behavior change. * accessibility/AccessibilityMenuList.cpp: (WebCore::AccessibilityMenuList::didUpdateActiveOption): * bindings/js/JSHTMLAllCollectionCustom.cpp: (WebCore::getNamedItems): * bindings/js/JSHTMLFormControlsCollectionCustom.cpp: (WebCore::getNamedItems): * css/CSSStyleRule.h: * css/CSSStyleSheet.cpp: (WebCore::CSSStyleSheet::insertRule): * css/CSSValueList.h: (WebCore::CSSValueList::item): (WebCore::CSSValueList::itemWithoutBoundsCheck): * css/InspectorCSSOMWrappers.cpp: (WebCore::InspectorCSSOMWrappers::collect): * dom/ChildListMutationScope.cpp: (WebCore::ChildListMutationAccumulator::~ChildListMutationAccumulator): (WebCore::ChildListMutationAccumulator::childAdded): * dom/ChildNodeList.cpp: (WebCore::ChildNodeList::namedItem): * dom/ContainerNode.cpp: (WebCore::ContainerNode::removeChild): * dom/CurrentScriptIncrementer.h: (WebCore::CurrentScriptIncrementer::CurrentScriptIncrementer): (WebCore::CurrentScriptIncrementer::~CurrentScriptIncrementer): * dom/MutationRecord.cpp: * dom/NodeRareData.h: (WebCore::NodeListsNodeData::ensureChildNodeList): (WebCore::NodeListsNodeData::ensureEmptyChildNodeList): (WebCore::NodeListsNodeData::addCacheWithQualifiedName): * dom/Range.cpp: (WebCore::Range::setDocument): * dom/ScriptElement.cpp: (WebCore::ScriptElement::requestScript): (WebCore::ScriptElement::executeScript): * dom/StaticNodeList.cpp: (WebCore::StaticNodeList::item): (WebCore::StaticElementList::item): * editing/CompositeEditCommand.cpp: (WebCore::CompositeEditCommand::moveRemainingSiblingsToNewParent): * editing/DictationCommand.cpp: (WebCore::DictationCommand::insertText): * editing/DictationCommand.h: * editing/Editor.cpp: (WebCore::Editor::insertTextWithoutSendingTextEvent): * editing/ReplaceNodeWithSpanCommand.cpp: (WebCore::swapInNodePreservingAttributesAndChildren): * editing/SimplifyMarkupCommand.cpp: (WebCore::SimplifyMarkupCommand::doApply): * editing/markup.cpp: (WebCore::hasOneChild): (WebCore::hasOneTextChild): (WebCore::replaceChildrenWithFragment): (WebCore::replaceChildrenWithText): * html/HTMLFormControlElement.cpp: (WebCore::HTMLFormControlElement::checkValidity): * html/HTMLFormElement.cpp: (WebCore::HTMLFormElement::getNamedElements): * html/HTMLLinkElement.cpp: (WebCore::HTMLLinkElement::shouldLoadLink): * inspector/InspectorStyleSheet.cpp: (WebCore::InspectorStyleSheet::buildObjectForSelectorList): (WebCore::InspectorStyleSheet::buildObjectForRule): (WebCore::InspectorStyleSheet::revalidateStyle): * loader/FrameLoader.cpp: (WebCore::FrameLoader::continueLoadAfterNewWindowPolicy): * page/FocusController.cpp: (WebCore::FocusController::setFocusedElement): * page/PageSerializer.cpp: (WebCore::PageSerializer::retrieveResourcesForRule): * page/PageSerializer.h: * page/animation/AnimationController.cpp: (WebCore::AnimationController::updateAnimations): * platform/graphics/ca/TileCoverageMap.cpp: (WebCore::TileCoverageMap::platformCALayerPaintContents): * rendering/ClipPathOperation.h: * rendering/RenderBlock.cpp: (WebCore::styleForFirstLetter): (WebCore::RenderBlock::updateFirstLetterStyle): (WebCore::RenderBlock::createFirstLetterRenderer): * rendering/RenderBlockFlow.cpp: (WebCore::RenderBlockFlow::updateColumnProgressionFromStyle): * rendering/RenderBlockFlow.h: * rendering/RenderBox.cpp: (WebCore::RenderBox::styleDidChange): * rendering/RenderElement.cpp: (WebCore::RenderElement::setStyle): (WebCore::RenderElement::styleDidChange): * rendering/RenderNamedFlowFragment.cpp: (WebCore::RenderNamedFlowFragment::restoreRegionObjectsOriginalStyle): * rendering/RenderTextControl.cpp: (WebCore::RenderTextControl::adjustInnerTextStyle): * rendering/RenderTextControl.h: * rendering/RenderTextControlMultiLine.cpp: (WebCore::RenderTextControlMultiLine::createInnerTextStyle): * rendering/RenderTextControlSingleLine.cpp: (WebCore::RenderTextControlSingleLine::createInnerTextStyle): * rendering/style/DataRef.h: (WebCore::DataRef::get): (WebCore::DataRef::access): (WebCore::DataRef::operator==): (WebCore::DataRef::operator!=): * rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::changeRequiresLayout): (WebCore::RenderStyle::changeRequiresPositionedLayoutOnly): (WebCore::RenderStyle::changeRequiresLayerRepaint): (WebCore::RenderStyle::changeRequiresRepaint): (WebCore::RenderStyle::changeRequiresRepaintIfTextOrBorderOrOutline): (WebCore::RenderStyle::changeRequiresRecompositeLayer): (WebCore::RenderStyle::diff): (WebCore::RenderStyle::diffRequiresLayerRepaint): * rendering/style/RenderStyle.h: * rendering/style/StyleGeneratedImage.cpp: (WebCore::StyleGeneratedImage::cssValue): * rendering/style/StyleGeneratedImage.h: * style/StyleResolveForDocument.cpp: (WebCore::Style::resolveForDocument): * style/StyleResolveTree.cpp: (WebCore::Style::determineChange): (WebCore::Style::resolveLocal): (WebCore::Style::resolveTree): * style/StyleResolveTree.h: 2014-11-04 Chris Dumez Move -webkit-text-emphasis-position to the new StyleBuilder https://bugs.webkit.org/show_bug.cgi?id=138359 Reviewed by Andreas Kling. Move -webkit-text-emphasis-position from DeprecatedStyleBilder to the new StyleBuilder so that it is now generated from CSSPropertyNames.in. A new TextEmphasisPosition Converter was added to support this. No new tests, no behavior change. * css/CSSPropertyNames.in: * css/DeprecatedStyleBuilder.cpp: (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder): (WebCore::valueToEmphasisPosition): Deleted. (WebCore::ApplyPropertyTextEmphasisPosition::applyValue): Deleted. (WebCore::ApplyPropertyTextEmphasisPosition::createHandler): Deleted. * css/StyleBuilderConverter.h: (WebCore::StyleBuilderConverter::valueToEmphasisPosition): (WebCore::StyleBuilderConverter::convertTextEmphasisPosition): 2014-11-04 Andreas Kling RenderBox shouldn't need a pre-destructor hook. Reviewed by Antti Koivisto. Move teardown logic from willBeDestroyed() to the regular ~RenderBox() destructor since none of it depends on being in-tree or having a fully constructed vtable. * rendering/RenderBox.cpp: (WebCore::RenderBox::~RenderBox): (WebCore::RenderBox::willBeDestroyed): Deleted. * rendering/RenderBox.h: 2014-11-04 Myles C. Maxfield [OSX] CJK characters styled with font-family: cursive are italicized https://bugs.webkit.org/show_bug.cgi?id=138328 rdar://problem/18801907 Reviewed by Simon Fraser. FontCache::createFontPlatformData doesn’t set the oblique flag if the requested font isn’t oblique, but FontCache::systemFallbackForCharacters() does. This patch simply adopts this behavior in both places. Test: fast/text/font-cursive-italic-cjk.html * platform/graphics/mac/FontCacheMac.mm: (WebCore::FontCache::systemFallbackForCharacters): 2014-11-04 Benjamin Poulain When computing the specificity of selectors, use saturated arithmetic per component https://bugs.webkit.org/show_bug.cgi?id=138336 Reviewed by Andreas Kling. The code handling overflow in CSSSelector::specificity() was assuming that the value returned by specificityForOneSelector() can only overflow one field at a time. That assumption is no longer correct with the extended :not(). It is now possible to have a complex selector saturating multiple fields inside a single :not(). This patch solves the problem by considering each field independently. Test: fast/selectors/specificity-overflow-2.html * css/CSSSelector.cpp: (WebCore::CSSSelector::specificity): 2014-11-04 Zalan Bujtas Windows build fix after r175565. MSVC requires default c'tor even if it's never called. -0 length array. * rendering/SimpleLineLayout.h: (WebCore::SimpleLineLayout::Run::Run): 2014-11-04 Zalan Bujtas Simple line layout: Cleanup line initialization and line closing. https://bugs.webkit.org/show_bug.cgi?id=138273 Reviewed by Antti Koivisto. This is in preparation to support multiple render elements. Move line start and line end activities to dedicated functions. Covered by existing tests. * rendering/SimpleLineLayout.cpp: (WebCore::SimpleLineLayout::LineState::LineState): Add lineStartRunIndex to be more explicit about whether a line advanced with new runs. Rename a few members. Introduce LineState::oveflowedFragment so that line closing can handled separately. (WebCore::SimpleLineLayout::LineState::commitAndCreateRun): (WebCore::SimpleLineLayout::LineState::addUncommitted): (WebCore::SimpleLineLayout::LineState::jumpTo): (WebCore::SimpleLineLayout::LineState::addUncommittedWhitespace): Deleted. : Remove redundant function. (WebCore::SimpleLineLayout::LineState::removeCommittedTrailingWhitespace): (WebCore::SimpleLineLayout::LineState::resetTrailingWhitespace): (WebCore::SimpleLineLayout::removeTrailingWhitespace): Add resetTrailingWhitespace() so that all trailing whitespace handling is in one function. (WebCore::SimpleLineLayout::initializeNewLine): Separate line start and line end initialization/reset. (WebCore::SimpleLineLayout::createLineRuns): (WebCore::SimpleLineLayout::closeLineEndingAndAdjustRuns): This function manages all line ending activities. (WebCore::SimpleLineLayout::createTextRuns): (WebCore::SimpleLineLayout::create): (WebCore::SimpleLineLayout::initializeLine): Deleted. * rendering/SimpleLineLayout.h: (WebCore::SimpleLineLayout::Run::Run): Deleted. 2014-11-04 Tim Horton Implement yellow highlight over data detected items https://bugs.webkit.org/show_bug.cgi?id=138340 Reviewed by Anders Carlsson. * platform/spi/mac/DataDetectorsSPI.h: Add completionHandler SPI. 2014-11-04 Darin Adler Eliminate ResourceBuffer and use SharedBuffer directly instead https://bugs.webkit.org/show_bug.cgi?id=138174 Reviewed by Antti Koivisto. Refactoring, with test coverage across many existing tests. * CMakeLists.txt: Deleted ResourceBuffer.cpp. * WebCore.exp.in: Removed ResourceBuffer-related symbols, and updated symbol for one function that used to take a PassRefPtr but now takes a reference instead. * WebCore.vcxproj/WebCore.vcxproj: Deleted ResourceBuffer.cpp/.h. * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto. * WebCore.xcodeproj/project.pbxproj: Deleted ResourceBuffer.mm/.cpp/.h. * bindings/objc/DOMUIKitExtensions.mm: (-[DOMHTMLImageElement dataRepresentation:]): Use SharedBuffer directly. * editing/ios/EditorIOS.mm: (WebCore::Editor::writeImageToPasteboard): Ditto. * editing/mac/EditorMac.mm: (WebCore::Editor::writeImageToPasteboard): Ditto. * html/ImageDocument.cpp: (WebCore::ImageDocument::updateDuringParsing): Use SharedBuffer directly, and also pass a reference only if non-null rather than passing a pointer. (WebCore::ImageDocument::finishedParsing): Ditto. Added a missing null check. * inspector/InspectorPageAgent.cpp: (WebCore::InspectorPageAgent::cachedResourceContent): Use SharedBuffer directly. (WebCore::InspectorPageAgent::mainResourceContent): Ditto. * inspector/InspectorResourceAgent.cpp: (WebCore::InspectorResourceAgent::didFinishLoading): Ditto. (WebCore::InspectorResourceAgent::didFailLoading): Ditto. * loader/DocumentLoader.cpp: (WebCore::DocumentLoader::mainResourceData): Use SharedBuffer directly, and use the copy function rather than a hand-written alternative. (WebCore::DocumentLoader::maybeCreateArchive): Ditto. (WebCore::DocumentLoader::mainResource): Ditto. (WebCore::DocumentLoader::subresource): Ditto. (WebCore::DocumentLoader::maybeFinishLoadingMultipartContent): Ditto. * loader/DocumentLoader.h: Changed mainResourceData to return a PassRefPtr. Would be better if it returned a SharedBuffer&, but it currently returns a newly created buffer when there is substitute data and can also return null, even though many callers assume it will not! * loader/MediaResourceLoader.cpp: (WebCore::MediaResourceLoader::dataReceived): Removed call to unused client function bufferReceived. (WebCore::MediaResourceLoader::notifyFinished): Removed unused buffer argument to client function loadFinished. * loader/ResourceBuffer.cpp: Removed. * loader/ResourceBuffer.h: Removed. * loader/ResourceLoader.cpp: (WebCore::ResourceLoader::addDataOrBuffer): Use SharedBuffer directly. * loader/ResourceLoader.h: (WebCore::ResourceLoader::resourceData): Use SharedBuffer. * loader/SubresourceLoader.cpp: (WebCore::SubresourceLoader::didReceiveResponse): Use SharedBuffer. (WebCore::SubresourceLoader::didReceiveDataOrBuffer): Ditto. * loader/TextTrackLoader.cpp: (WebCore::TextTrackLoader::processNewCueData): Use SharedBuffer. * loader/appcache/ApplicationCacheGroup.cpp: (WebCore::ApplicationCacheGroup::finishedLoadingMainResource): Ditto. * loader/archive/cf/LegacyWebArchive.cpp: (WebCore::LegacyWebArchive::create): Ditto. * loader/cache/CachedCSSStyleSheet.cpp: (WebCore::CachedCSSStyleSheet::finishLoading): Use SharedBuffer. * loader/cache/CachedCSSStyleSheet.h: Ditto. * loader/cache/CachedFont.cpp: (WebCore::CachedFont::finishLoading): Ditto. (WebCore::CachedFont::ensureCustomFontData): Ditto. * loader/cache/CachedFont.h: Ditto. * loader/cache/CachedImage.cpp: (WebCore::CachedImage::didAddClient): Use SharedBuffer. (WebCore::CachedImage::didRemoveClient): Ditto. (WebCore::CachedImage::addIncrementalDataBuffer): Ditto. Changed to take a reference rather than a pointer. (WebCore::CachedImage::addDataBuffer): Ditto. Also added call through to base class and changed to take a reference rather than a pointer. (WebCore::CachedImage::addData): Ditto. Also added call through to base class. (WebCore::CachedImage::finishLoading): Ditto. * loader/cache/CachedImage.h: Ditto. Also changed the type of some bit fields to be unsigned instead of unsigend char. * loader/cache/CachedRawResource.cpp: (WebCore::CachedRawResource::calculateIncrementalDataChunk): Use SharedBuffer. (WebCore::CachedRawResource::addDataBuffer): Ditto. Changed to take a reference rather than a pointer. (WebCore::CachedRawResource::addData): Ditto. (WebCore::CachedRawResource::finishLoading): Ditto. (WebCore::CachedRawResource::canReuse): Ditto. * loader/cache/CachedRawResource.h: Ditto. * loader/cache/CachedResource.cpp: (WebCore::CachedResource::CachedResource): Reordered data members due to change in header. (WebCore::CachedResource::addDataBuffer): Changed argument type. (WebCore::CachedResource::finishLoading): Ditto. (WebCore::CachedResource::didAddClient): Refactored to eliminate one extra hash table lookup by using the return value from the remove function. (WebCore::CachedResource::addClientToSet): Use std::make_unique directly instead of using a function named "schedule" to allocate the callback object. (WebCore::CachedResource::Callback::Callback): Changed function and data member name. (WebCore::CachedResource::Callback::cancel): Ditto. (WebCore::CachedResource::Callback::timerFired): Ditto. (WebCore::CachedResource::tryReplaceEncodedData): Changed to take a SharedBuffer&. * loader/cache/CachedResource.h: Changed types to use SharedBuffer. Also made most data members and one function member private instead of protected. Also renamed the CachedResource::CachedResourceCallback function CachedResource::Callback and moved its definition out of the CachedResource class definition. * loader/cache/CachedResourceClient.h: Removed unneeded include. * loader/cache/CachedSVGDocument.cpp: (WebCore::CachedSVGDocument::finishLoading): Use SharedBuffer. * loader/cache/CachedSVGDocument.h: Ditto. Made data members private. * loader/cache/CachedScript.cpp: (WebCore::CachedScript::finishLoading): Use SharedBuffer. * loader/cache/CachedScript.h: Ditto. Also fixed indenting and removed unneeded forward declaration. * loader/cache/CachedTextTrack.cpp: (WebCore::CachedTextTrack::updateData): Added, so that finishLoading does not call addDataBuffer. (WebCore::CachedTextTrack::addDataBuffer): Take SharedBuffer, call updateData. (WebCore::CachedTextTrack::finishLoading): Ditto. * loader/cache/CachedTextTrack.h: Take out unneeded explicit override of the destructor. Updated for above changes. * loader/cache/CachedXSLStyleSheet.cpp: (WebCore::CachedXSLStyleSheet::finishLoading): Updated to use SharedBuffer. * loader/cache/CachedXSLStyleSheet.h: Took out unneeded includes, made everything private rather than protected. Added an explicit virtual constructor so we can compile without knowing how to ref/deref TextResourceDecoder. * loader/cf/SubresourceLoaderCF.cpp: (WebCore::SubresourceLoader::didReceiveDataArray): Updated to use SharedBuffer and to call addDataBuffer only if there is a new data buffer. * loader/cocoa/DiskCacheMonitorCocoa.h: Use SharedBuffer& instead of PassRefPtr. * loader/cocoa/DiskCacheMonitorCocoa.mm: (WebCore::DiskCacheMonitor::DiskCacheMonitor): Ditto. (WebCore::DiskCacheMonitor::resourceBecameFileBacked): Ditto. * loader/icon/IconLoader.cpp: (WebCore::IconLoader::notifyFinished): Use SharedBuffer* instead of RefPtr. * loader/mac/ResourceBuffer.mm: Removed. * loader/mac/ResourceLoaderMac.mm: (WebCore::ResourceLoader::didReceiveDataArray): Use SharedBuffer. * platform/SharedBuffer.cpp: (WebCore::SharedBuffer::clear): Use a modern for loop. (WebCore::SharedBuffer::copy): Return a PassRef instead of a PassRefPtr, since this never returns null. Use modern for loops. (WebCore::SharedBuffer::copyBufferAndClear): Use a modern for loop. * platform/SharedBuffer.h: Changed copy to return PassRef instead of PassRefPtr. Changed tryReplaceContentsWithPlatformBuffer to take a reference rather than a pointer. * platform/cf/SharedBufferCF.cpp: (WebCore::SharedBuffer::tryReplaceContentsWithPlatformBuffer): Take a reference instead of a pointer. * platform/graphics/PlatformMediaResourceLoader.h: Removed unused function bufferReceived and unneeded buffer argument from loadFinished. Also marked the constructor explicit. * platform/graphics/avfoundation/cf/WebCoreAVCFResourceLoader.cpp: Removed include of ResourceBuffer.h. * platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm: (WebCore::WebCoreAVFResourceLoader::fulfillRequestWithResource): Use SharedBuffer directly. * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp: (CachedResourceStreamingClient::loadFinished): Updated for change to PlatformMediaResourceLoaderClient. * platform/mac/PasteboardMac.mm: Removed include of ResourceBuffer.h. * platform/soup/SharedBufferSoup.cpp: Removed unused, unneeded tryReplaceContentsWithPlatformBuffer function. 2014-11-04 Chris Dumez Use SPECIALIZE_TYPE_TRAITS_*() macro for StyleRuleGroup subclasses https://bugs.webkit.org/show_bug.cgi?id=138345 Reviewed by Andreas Kling. Use SPECIALIZE_TYPE_TRAITS_*() macro for StyleRuleGroup subclasses instead of old-fashion toXXX() functions. No new tests, no behavior change. * css/CSSMediaRule.cpp: (WebCore::CSSMediaRule::mediaQueries): * css/CSSSupportsRule.cpp: (WebCore::CSSSupportsRule::conditionText): * css/StyleRule.h: (isType): (WebCore::toStyleRuleMedia): Deleted. (WebCore::toStyleRuleSupports): Deleted. (WebCore::toStyleRuleRegion): Deleted. * css/WebKitCSSRegionRule.cpp: (WebCore::WebKitCSSRegionRule::cssText): 2014-11-04 Andreas Kling RenderQuote shouldn't need a pre-destructor hook. Reviewed by Antti Koivisto. The willBeDestroyed() hook in RenderQuote came from the time when it was potential unsafe to access the RenderView from a renderer destructor. Move the code to the plain ol' destructor instead. * rendering/RenderQuote.cpp: (WebCore::RenderQuote::~RenderQuote): (WebCore::RenderQuote::willBeDestroyed): Deleted. * rendering/RenderQuote.h: 2014-11-04 Csaba Osztrogonác Fix the !ENABLE(VIDEO) build after r175380 https://bugs.webkit.org/show_bug.cgi?id=138322 Reviewed by Benjamin Poulain. * html/HTMLImageLoader.cpp: (WebCore::HTMLImageLoader::dispatchLoadEvent): 2014-11-03 Philippe Normand [LEAK] [GStreamer] Removing video element will not free assigned memory https://bugs.webkit.org/show_bug.cgi?id=46560 Reviewed by Eric Carlson. Moved the ::extraMemoryCost() implementation to the MediaPlayerPivateInterface base class. This default implementation is now shared between the various MediaPlayerPrivate backends, excepted the AVF MediaSource player which still reports no extra memory cost. * platform/graphics/MediaPlayerPrivate.h: (WebCore::MediaPlayerPrivateInterface::totalBytes): Make totalBytes() part of the MediaPlayerPrivate interface. (WebCore::MediaPlayerPrivateInterface::extraMemoryCost): Default implementation. * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp: (WebCore::MediaPlayerPrivateAVFoundation::extraMemoryCost): Deleted. * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h: * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h: 2014-11-04 Nikos Andronikos Fix animation of orient attribute on marker element https://bugs.webkit.org/show_bug.cgi?id=137942 Reviewed by Dirk Schulze. Fixed implementation of SVG animated angles and the SVG marker element orient attribute. SVG animated angle was missing the logic to support animation from auto to a numeric angle value - this is now added. The SVG marker element getter for orientType was not returning the animated value for orientType so in some cases (i.e. when the initial value and the animated values were of different types) the animation was not being rendered - although it was running. Tests: svg/animations/animate-marker-orienttype-1.html svg/animations/animate-marker-orienttype-2.html svg/animations/animate-marker-orienttype-3.html * svg/SVGAnimatedAngle.cpp: (WebCore::SVGAnimatedAngleAnimator::calculateAnimatedValue): Added logic to support auto to angle animation. * svg/SVGMarkerElement.cpp: (WebCore::SVGMarkerElement::orientType): This method now returns the animated value if an animation is running. * svg/SVGMarkerElement.h: 2014-11-03 Chris Dumez Allow implicit conversion from Ref to T& https://bugs.webkit.org/show_bug.cgi?id=138331 Reviewed by Andreas Kling. Remove unnecessary calls to Ref::get() now that a Ref can be converted implicitly to a T&. No new tests, no behavior change. 2014-11-03 Simon Fraser Non-fast scrollable region overlay offsets the overlay by topContentInset https://bugs.webkit.org/show_bug.cgi?id=138344 Reviewed Tim Horton. Offset the region by topContentInset, and make it not green. * page/DebugPageOverlays.cpp: (WebCore::NonFastScrollableRegionOverlay::updateRegion): 2014-11-03 Andreas Kling Clarify RenderListMarker ownership model. Reviewed by Antti Koivisto. A RenderListMarker is either in-tree and owned by the tree, or out-of-tree and owned by a RenderListItem. This patch changes RenderListItem::m_marker to be a raw pointer, and removes the special handling of list markers in RenderElement child teardown. We also remove the willBeDestroyed() hook. It was used to clear out the m_marker pointer, but this is now done in the regular ~RenderListItem() destructor with an assertion for marker sanity. m_marker is automatically nulled out by a didDestroyListMarker() callback on RenderListItem. * rendering/RenderElement.cpp: (WebCore::RenderElement::destroyLeftoverChildren): Removed special handling of list marker renderers when deleting a RenderElement's children. * rendering/RenderListItem.cpp: (WebCore::RenderListItem::RenderListItem): (WebCore::RenderListItem::~RenderListItem): (WebCore::RenderListItem::styleDidChange): (WebCore::RenderListItem::insertOrMoveMarkerRendererIfNeeded): (WebCore::RenderListItem::positionListMarker): Made m_marker a raw pointer instead of a RenderPtr since the ownership really switches between weak and strong reference. (WebCore::RenderListItem::willBeDestroyed): * rendering/RenderListMarker.cpp: (WebCore::RenderListMarker::~RenderListMarker): Added a regular destructor to replace the willBeDestroyed() hook. * rendering/RenderListItem.h: (WebCore::RenderListItem::didDestroyListMarker): Added. Called by ~RenderListMarker to null out RenderListItem::m_marker. 2014-11-03 Gyuyoung Kim Move WebCore/bridge to std::unique_ptr https://bugs.webkit.org/show_bug.cgi?id=138280 Reviewed by Anders Carlsson. Clean up OwnPtr in WebCore/bridge. No new tests, no behavior changes. * bridge/c/c_class.cpp: (JSC::Bindings::CClass::methodNamed): (JSC::Bindings::CClass::fieldNamed): * bridge/c/c_class.h: Use std::unique_ptr instead of OwnPtr. * bridge/objc/objc_class.h: ditto. * bridge/objc/objc_class.mm: (JSC::Bindings::ObjcClass::methodNamed): (JSC::Bindings::ObjcClass::fieldNamed): * bridge/objc/objc_runtime.mm: (JSC::Bindings::callObjCFallbackObject): * bridge/runtime_method.h: 2014-11-03 Dan Bernstein Client certificate credentials with session persistence don’t work https://bugs.webkit.org/show_bug.cgi?id=138330 Reviewed by Alexey Proskuryakov. I think this is not testable with our test HTTP server. * platform/network/CredentialStorage.cpp: (WebCore::CredentialStorage::set): Don’t require a valid URL for client certificate credentials, since they don’t apply to a specific path. Don’t save such credentials to CFNetwork’s persistent storage (we only do that as a workaround for sharing credentials with the media framework, and we don’t want to expand the scope of the workaround). * platform/network/cf/ResourceHandleCFNet.cpp: (WebCore::ResourceHandle::receivedCredential): Changed to use the Credential consturctor that takes a Credential and a new persistence, so that this code works not only with user+password credentials. 2014-11-03 Simon Fraser Add page overlays that show regions with mouseWheel event handlers, and the non-fast-scrollable region, and code to toggle them in MiniBrowser WK2 https://bugs.webkit.org/show_bug.cgi?id=138257 Reviewed by Tim Horton. Add code for debugging page overlays that show the non-fast scrollable region, and the region with wheel event handlers. The list of region types is intended to be easily extensible. A singleton DebugPageOverlays maintains a map of Frame -> vector of overlays. A purely inline code path is provided so that DebugPageOverlays::didLayout() is fast. For each region type, a PageOverlay::Client subclass knows how to generate the region, which is painted into a document-level page overlay. Add a set of bitflags to Settings to control region visibility. * WebCore.exp.in: * WebCore.xcodeproj/project.pbxproj: * page/DebugPageOverlays.cpp: Added. (WebCore::RegionOverlay::overlay): (WebCore::MouseWheelRegionOverlay::updateRegion): (WebCore::NonFastScrollableRegionOverlay::updateRegion): (WebCore::RegionOverlay::create): (WebCore::RegionOverlay::RegionOverlay): (WebCore::RegionOverlay::~RegionOverlay): (WebCore::RegionOverlay::pageOverlayDestroyed): (WebCore::RegionOverlay::willMoveToPage): (WebCore::RegionOverlay::didMoveToPage): (WebCore::RegionOverlay::drawRect): (WebCore::RegionOverlay::mouseEvent): (WebCore::RegionOverlay::didScrollFrame): (WebCore::RegionOverlay::recomputeRegion): (WebCore::DebugPageOverlays::shared): (WebCore::indexOf): (WebCore::DebugPageOverlays::ensureRegionOverlayForFrame): (WebCore::DebugPageOverlays::showRegionOverlay): (WebCore::DebugPageOverlays::hideRegionOverlay): (WebCore::DebugPageOverlays::regionChanged): (WebCore::DebugPageOverlays::regionOverlayForFrame): (WebCore::DebugPageOverlays::updateOverlayRegionVisibility): (WebCore::DebugPageOverlays::settingsChanged): * page/DebugPageOverlays.h: Added. (WebCore::DebugPageOverlays::hasOverlaysForFrame): (WebCore::DebugPageOverlays::hasOverlays): (WebCore::DebugPageOverlays::didLayout): * page/FrameView.cpp: (WebCore::FrameView::layout): * page/Settings.h: * page/Settings.in: 2014-11-03 Simon Fraser Video controls have lots of compositing layers https://bugs.webkit.org/show_bug.cgi?id=138294 Reviewed by Eric Carlson. After r175268 we get lots of separate small layers in the video controls (but they pop into a single layer when opacity animates). Fix this by putting an explicit z-index on -webkit-media-controls-panel which is the element that animates opacity. * Modules/mediacontrols/mediaControlsApple.css: (audio::-webkit-media-controls-panel): 2014-11-03 Commit Queue Unreviewed, rolling out r175406, r175413, and r175423. https://bugs.webkit.org/show_bug.cgi?id=138327 Multipart tests are still broken (Requested by ap on #webkit). Reverted changesets: "Eliminate ResourceBuffer and use SharedBuffer directly instead" https://bugs.webkit.org/show_bug.cgi?id=138174 http://trac.webkit.org/changeset/175406 "Unreviewed, iOS build fix since 175406." http://trac.webkit.org/changeset/175413 "Fix assertion in CachedResource::addDataBuffer" http://trac.webkit.org/changeset/175423 2014-11-03 Chris Dumez Unreviewed, fix bad assertion in r175487. I mistakenly used it != values.end() instead of it == values.end() so the debug bots are crashing. * css/StyleResolver.cpp: (WebCore::createGridPosition): 2014-11-03 Csaba Osztrogonác Fix the !ENABLE(VIDEO) build after r175279 https://bugs.webkit.org/show_bug.cgi?id=138320 Reviewed by Jer Noble. * page/ChromeClient.h: 2014-11-03 Chris Dumez Support modern range loops over CSSValueList https://bugs.webkit.org/show_bug.cgi?id=138285 Reviewed by Andreas Kling. Add support for modern range loops over CSSValueList objects. Port the code base to using range loops for CSSValueList objects and drop the CSSValueListInspector / CSSValueListIterator classes as they are no longer needed. No new tests, no behavior change. 2014-11-03 Andreas Kling RenderCounter shouldn't need a pre-destructor hook. Reviewed by Antti Koivisto. RenderCounter will automatically register/unregister itself with the RenderView when constructed/destroyed. It was using a willBeDestroyed() hook because it used to be that you couldn't get to the RenderView in the destructor. That's no longer an issue as Document promises that RenderView is the last render tree node to go away. * rendering/RenderCounter.cpp: (WebCore::RenderCounter::~RenderCounter): (WebCore::RenderCounter::willBeDestroyed): Deleted. * rendering/RenderCounter.h: 2014-11-03 Tim Horton Use FrameSnapshotting functions in FindController::getFindIndicatorBitmap https://bugs.webkit.org/show_bug.cgi?id=138300 Reviewed by Simon Fraser. * WebCore.exp.in: * page/FrameSnapshotting.cpp: (WebCore::snapshotSelection): Move knowledge that selectionBounds can be empty down to WebCore. 2014-11-03 Joseph Pecoraro Web Inspector: Show Selector's Specificity https://bugs.webkit.org/show_bug.cgi?id=138189 Reviewed by Timothy Hatcher. Test: inspector/css/selector-specificity.html * css/CSSSelector.h: Remove very stale comment. '*' is a starAtom now instead of a special -1 tag. Made the specificity masks public class constants. * inspector/InspectorStyleSheet.h: * inspector/InspectorStyleSheet.cpp: (WebCore::InspectorStyle::buildArrayForComputedStyle): (WebCore::InspectorStyle::styleWithProperties): (WebCore::InspectorStyleSheet::buildObjectForStyleSheetInfo): Drive by use release() in some cases to reduce ref count churn. (WebCore::buildObjectForSelectorHelper): (WebCore::selectorsFromSource): (WebCore::InspectorStyleSheet::buildObjectForSelector): (WebCore::InspectorStyleSheet::buildObjectForSelectorList): Build CSSSelector objects for SelectorLists. 2014-11-03 Chris Dumez Move -webkit-shape-outside to the new StyleBuilder https://bugs.webkit.org/show_bug.cgi?id=138296 Reviewed by Zoltan Horvath. Move -webkit-shape-outside to the new StyleBuilder, using custom code as it does not always call setShapeOutside(). No new tests, no behavior change. * css/CSSPropertyNames.in: * css/DeprecatedStyleBuilder.cpp: (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder): (WebCore::ApplyPropertyShape::setValue): Deleted. (WebCore::ApplyPropertyShape::applyValue): Deleted. (WebCore::ApplyPropertyShape::createHandler): Deleted. * css/StyleBuilderCustom.h: (WebCore::StyleBuilderFunctions::applyValueWebkitShapeOutside): 2014-11-03 Alexey Proskuryakov REGRESSION: Using a media element changes window.name https://bugs.webkit.org/show_bug.cgi?id=138278 rdar://problem/18704134 Apply the same fix to mediaControlsBase.js. I do not know who uses this file, but there is no reason to have the bug there. * Modules/mediacontrols/mediaControlsBase.js: (Controller.prototype.addVideoListeners): (Controller.prototype.removeVideoListeners): (Controller.prototype.disconnectControls): 2014-11-03 Andreas Kling RenderLayerModelObject shouldn't need a pre-destructor hook. Reviewed by Antti Koivisto. Move code from the willBeDestroyed() pre-destructor hook to the regular ~RenderLayerModelObject() destructor. We just need to unregister the renderer from the FrameView's set of viewport-constrained objects. That doesn't require being able to walk the render tree or call virtuals, which is the main reason you'd use willBeDestroyed(). * rendering/RenderLayerModelObject.cpp: (WebCore::RenderLayerModelObject::~RenderLayerModelObject): (WebCore::RenderLayerModelObject::willBeDestroyed): Deleted. * rendering/RenderLayerModelObject.h: 2014-11-03 Tibor Meszaros [EFL] Fix the build if LOG_DISABLED=0 in release mode https://bugs.webkit.org/show_bug.cgi?id=138309 Reviewed by Chris Dumez. * platform/efl/LoggingEfl.cpp: 2014-11-03 Chris Dumez Move 'zoom' CSS property to the new StyleBuilder https://bugs.webkit.org/show_bug.cgi?id=138297 Reviewed by Antti Koivisto. Move 'zoom' CSS property from DeprecatedStyleBuilder to the new StyleBuilder by using custom code as it requires special handling. No new tests, no behavior change. * css/makeprop.pl: Add support for Custom=All StyleBuilder option to indicate that the property requires custom code to set the initial, inherit and current values. 2014-11-03 Sungmann Cho AX: Fix some minor typos related to the word "accessibility". https://bugs.webkit.org/show_bug.cgi?id=138299 Reviewed by Chris Fleizach. No new tests, no behavior change. * accessibility/AccessibilityNodeObject.cpp: (WebCore::shouldUseAccessibilityObjectInnerText): (WebCore::AccessibilityNodeObject::textUnderElement): (WebCore::shouldUseAccessiblityObjectInnerText): Deleted. * accessibility/atk/WebKitAccessibleInterfaceText.cpp: (getRunAttributesFromAccessibilityObject): (webkitAccessibleTextGetRunAttributes): (getRunAttributesFromAccesibilityObject): Deleted. * page/CaptionUserPreferencesMediaAF.cpp: (WebCore::CaptionUserPreferencesMediaAF::textTrackSelectionScore): 2014-11-02 Chris Dumez Move string-typed properties to the new StyleBuilder https://bugs.webkit.org/show_bug.cgi?id=138295 Reviewed by Antti Koivisto. Move string-typed properties to the new StyleBuilder: -webkit-hyphenate-character -webkit-line-grid -webkit-flow-into -webkit-flow-from No new tests, no behavior change. 2014-11-02 Chris Dumez Unreviewed, rebaseline bindings tests after r175462. * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp: (WebCore::jsTestActiveDOMObjectPrototypeFunctionExcitingFunction): (WebCore::jsTestActiveDOMObjectPrototypeFunctionPostMessage): * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp: (WebCore::jsTestCustomNamedGetterPrototypeFunctionAnotherFunction): * bindings/scripts/test/JS/JSTestEventTarget.cpp: (WebCore::jsTestEventTargetPrototypeFunctionItem): (WebCore::jsTestEventTargetPrototypeFunctionDispatchEvent): * bindings/scripts/test/JS/JSTestInterface.cpp: (WebCore::JSTestInterfaceConstructor::constructJSTestInterface): (WebCore::jsTestInterfacePrototypeFunctionImplementsMethod2): (WebCore::jsTestInterfacePrototypeFunctionSupplementalMethod2): * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp: (WebCore::jsTestMediaQueryListListenerPrototypeFunctionMethod): * bindings/scripts/test/JS/JSTestNamedConstructor.cpp: (WebCore::JSTestNamedConstructorNamedConstructor::constructJSTestNamedConstructor): * bindings/scripts/test/JS/JSTestObj.cpp: (WebCore::JSTestObjConstructor::constructJSTestObj): (WebCore::jsTestObjPrototypeFunctionVoidMethodWithArgs): (WebCore::jsTestObjPrototypeFunctionByteMethodWithArgs): (WebCore::jsTestObjPrototypeFunctionOctetMethodWithArgs): (WebCore::jsTestObjPrototypeFunctionLongMethodWithArgs): (WebCore::jsTestObjPrototypeFunctionObjMethodWithArgs): (WebCore::jsTestObjPrototypeFunctionMethodWithSequenceArg): (WebCore::jsTestObjPrototypeFunctionMethodReturningSequence): (WebCore::jsTestObjPrototypeFunctionMethodWithEnumArg): (WebCore::jsTestObjPrototypeFunctionMethodThatRequiresAllArgsAndThrows): (WebCore::jsTestObjPrototypeFunctionSerializedValue): (WebCore::jsTestObjPrototypeFunctionOptionsObject): (WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndOptionalArg): (WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndTwoOptionalArgs): (WebCore::jsTestObjPrototypeFunctionMethodWithCallbackArg): (WebCore::jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackArg): (WebCore::jsTestObjConstructorFunctionStaticMethodWithCallbackArg): (WebCore::jsTestObjPrototypeFunctionOverloadedMethod1): (WebCore::jsTestObjPrototypeFunctionOverloadedMethod2): (WebCore::jsTestObjPrototypeFunctionOverloadedMethod3): (WebCore::jsTestObjPrototypeFunctionOverloadedMethod4): (WebCore::jsTestObjPrototypeFunctionOverloadedMethod5): (WebCore::jsTestObjPrototypeFunctionOverloadedMethod6): (WebCore::jsTestObjPrototypeFunctionOverloadedMethod7): (WebCore::jsTestObjPrototypeFunctionOverloadedMethod8): (WebCore::jsTestObjPrototypeFunctionOverloadedMethod9): (WebCore::jsTestObjPrototypeFunctionOverloadedMethod10): (WebCore::jsTestObjPrototypeFunctionOverloadedMethod11): (WebCore::jsTestObjConstructorFunctionClassMethod2): (WebCore::jsTestObjConstructorFunctionOverloadedMethod11): (WebCore::jsTestObjConstructorFunctionOverloadedMethod12): (WebCore::jsTestObjPrototypeFunctionClassMethodWithClamp): (WebCore::jsTestObjPrototypeFunctionMethodWithUnsignedLongSequence): (WebCore::jsTestObjPrototypeFunctionStringArrayFunction): (WebCore::jsTestObjPrototypeFunctionDomStringListFunction): (WebCore::jsTestObjPrototypeFunctionMethodWithAndWithoutNullableSequence): (WebCore::jsTestObjPrototypeFunctionMethodWithAndWithoutNullableSequence2): (WebCore::jsTestObjPrototypeFunctionConvert1): (WebCore::jsTestObjPrototypeFunctionConvert2): (WebCore::jsTestObjPrototypeFunctionConvert4): (WebCore::jsTestObjPrototypeFunctionConvert5): (WebCore::jsTestObjPrototypeFunctionStrictFunction): (WebCore::jsTestObjPrototypeFunctionStrictFunctionWithSequence): (WebCore::jsTestObjPrototypeFunctionStrictFunctionWithArray): (WebCore::jsTestObjPrototypeFunctionVariadicStringMethod): (WebCore::jsTestObjPrototypeFunctionVariadicDoubleMethod): (WebCore::jsTestObjPrototypeFunctionVariadicNodeMethod): (WebCore::jsTestObjPrototypeFunctionAny): * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp: (WebCore::JSTestOverloadedConstructorsConstructor::constructJSTestOverloadedConstructors1): (WebCore::JSTestOverloadedConstructorsConstructor::constructJSTestOverloadedConstructors2): (WebCore::JSTestOverloadedConstructorsConstructor::constructJSTestOverloadedConstructors3): (WebCore::JSTestOverloadedConstructorsConstructor::constructJSTestOverloadedConstructors4): * bindings/scripts/test/JS/JSTestTypedefs.cpp: (WebCore::JSTestTypedefsConstructor::constructJSTestTypedefs): (WebCore::jsTestTypedefsPrototypeFunctionSetShadow): (WebCore::jsTestTypedefsPrototypeFunctionMethodWithSequenceArg): (WebCore::jsTestTypedefsPrototypeFunctionNullableArrayArg): (WebCore::jsTestTypedefsPrototypeFunctionFuncWithClamp): (WebCore::jsTestTypedefsPrototypeFunctionStringArrayFunction): (WebCore::jsTestTypedefsPrototypeFunctionStringArrayFunction2): (WebCore::jsTestTypedefsPrototypeFunctionCallWithSequenceThatRequiresInclude): 2014-11-02 Chris Dumez Reduce the cost of argumentCount checks in the JS bindings https://bugs.webkit.org/show_bug.cgi?id=138289 Reviewed by Sam Weinig. Slightly reduce the cost of argumentCount checks in the JS bindings by hinting to the compiler that it is UNLIKELY that those methods are called with too few arguments. I see a 3% progression on PerformanceTests/DOM/DOMDivWalk.html performance test. No new tests, no behavior change. * bindings/scripts/CodeGeneratorJS.pm: (GenerateArgumentsCountCheck): 2014-11-01 Alexey Proskuryakov REGRESSION: Using a media element changes window.name https://bugs.webkit.org/show_bug.cgi?id=138278 rdar://problem/18704134 Reviewed by Jer Noble. Test: fast/media/window-name.html Use an actual variable for name (and while at it, for "item" as well). * Modules/mediacontrols/mediaControlsApple.js: (Controller.prototype.addVideoListeners): (Controller.prototype.removeVideoListeners): (Controller.prototype.disconnectControls): 2014-11-01 Chris Dumez Move "direction" CSS property to the new StyleBuilder https://bugs.webkit.org/show_bug.cgi?id=138288 Reviewed by Sam Weinig. Move "direction" CSS property to the new StyleBuilder by using custom code as it requires special handling to call Document::setDirectionSetOnDocumentElement() when necessary. No new tests, no behavior change. * css/CSSPropertyNames.in: * css/DeprecatedStyleBuilder.cpp: (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder): (WebCore::ApplyPropertyDirection::applyValue): Deleted. (WebCore::ApplyPropertyDirection::createHandler): Deleted. * css/StyleBuilderCustom.h: (WebCore::StyleBuilderFunctions::applyValueDirection): 2014-11-01 Sam Weinig Move the -webkit-transform property to the new StyleBuilder https://bugs.webkit.org/show_bug.cgi?id=138283 Reviewed by Chris Dumez. Move the -webkit-transform property from StyleResolver to the new generated StyleBuilder. Adds a converter for TransformOperations. * css/CSSPropertyNames.in: * css/StyleBuilderConverter.h: (WebCore::StyleBuilderConverter::convertTransform): * css/StyleResolver.cpp: (WebCore::StyleResolver::applyProperty): * css/TransformFunctions.cpp: (WebCore::transformsForValue): * css/TransformFunctions.h: * css/WebKitCSSMatrix.cpp: (WebCore::WebKitCSSMatrix::setMatrixValue): 2014-11-01 Benjamin Poulain Fix the specificity of the extended :not() selector https://bugs.webkit.org/show_bug.cgi?id=138275 Reviewed by Andreas Kling. The current draft says "The specificity of a :not() pseudo-class is the specificity of the most specifc complex selector in its selector list." It is still unclear how :not() plays with other new selectors. Until that is clarified, this only handle the simple cases. Tests: fast/css/not-self-specificity.html fast/css/not-specificity-1.html fast/css/not-specificity-2.html fast/css/not-specificity-3.html fast/css/not-specificity-4.html fast/css/not-specificity-5.html fast/css/not-specificity-6.html * css/CSSSelector.cpp: (WebCore::CSSSelector::specificityForOneSelector): 2014-10-31 Benjamin Poulain Fix the Debug builds after r175446 * css/CSSSelector.cpp: (WebCore::CSSSelector::selectorText): 2014-10-31 Dhi Aurrahman Add initial parsing functionality of :lang pseudo class in Selectors Level 4. https://bugs.webkit.org/show_bug.cgi?id=138170 Reviewed by Benjamin Poulain. Add initial parsing functionality of :lang pseudo class in Selectors Level 4, as specified in [1]. It parses comma-separated list of string arguments. Currently, it throws error on arguments with "*" (e.g. :lang(zh, *-hant)). Add additional test file fast/selectors/lang-invalid.html along side the fast/css/css-selector-text.html. [1] http://dev.w3.org/csswg/selectors4/#the-lang-pseudo Test: fast/selectors/lang-invalid.html * css/CSSGrammar.y.in: * css/CSSParser.cpp: (WebCore::CSSParser::detectFunctionTypeToken): * css/CSSParserValues.cpp: (WebCore::CSSParserSelector::setArgumentList): * css/CSSParserValues.h: * css/CSSSelector.cpp: (WebCore::appendArgumentList): (WebCore::CSSSelector::selectorText): (WebCore::CSSSelector::setArgumentList): * css/CSSSelector.h: (WebCore::CSSSelector::argumentList): * css/SelectorChecker.cpp: (WebCore::SelectorChecker::checkOne): * cssjit/SelectorCompiler.cpp: (WebCore::SelectorCompiler::addPseudoClassType): 2014-10-31 Chris Dumez StyleBuilder: Stop using custom code for -webkit-hyphenate-limit-lines https://bugs.webkit.org/show_bug.cgi?id=138270 Reviewed by Antti Koivisto. Stop using custom code for -webkit-hyphenate-limit-lines in the new StyleBuilder. We don't really need to, we can just have a Converter specific to this property. No new tests, no behavior change. * css/CSSPropertyNames.in: * css/StyleBuilderConverter.h: (WebCore::StyleBuilderConverter::convertWebkitHyphenateLimitLines): * css/StyleBuilderCustom.h: (WebCore::StyleBuilderFunctions::applyValueWebkitHyphenateLimitLines): Deleted. 2014-10-31 Chris Dumez Support throttling of DOMTimers using nested setTimeout() calls https://bugs.webkit.org/show_bug.cgi?id=138262 Reviewed by Gavin Barraclough. Extend DOMTimers throttling support to timers that are using nested setTimeout() calls instead of a setInterval(). To achieve this, this patch introduces a NestedTimersVector singleton class where nested timers are appended, and for which we potentially update the next firing time, after the parent timer is done executing. I have verified this helps on cnn.com for example, which has timers interacting with non-visible plugins that are scheduled using nested setTimeout() calls with a frequency of 150 / 200 ms. * page/DOMTimer.cpp: (WebCore::NestedTimersVector::NestedTimersVector): (WebCore::NestedTimersVector::~NestedTimersVector): (WebCore::NestedTimersVector::registerTimer): (WebCore::NestedTimersVector::begin): (WebCore::NestedTimersVector::end): (WebCore::DOMTimer::install): (WebCore::DOMTimer::updateThrottlingStateIfNecessary): (WebCore::DOMTimer::fired): * page/DOMTimer.h: 2014-10-31 Chris Dumez Move -webkit-marquee-increment property to the new StyleBuilder https://bugs.webkit.org/show_bug.cgi?id=138208 Reviewed by Andreas Kling. Move -webkit-marquee-increment property from DeprecatedStyleBuilder to the new StyleBuilder so that it is generated from CSSPropertyNames.in. Custom code is used to set the value due to the !length.isUndefined() check before calling setMarqueeIncrement(). Test: fast/css/webkit-marquee-increment-bad-value.html * css/CSSPropertyNames.in: * css/DeprecatedStyleBuilder.cpp: (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder): (WebCore::ApplyPropertyLength::setValue): Deleted. (WebCore::ApplyPropertyLength::applyValue): Deleted. (WebCore::ApplyPropertyLength::createHandler): Deleted. (WebCore::ApplyPropertyMarqueeIncrement::applyValue): Deleted. (WebCore::ApplyPropertyMarqueeIncrement::createHandler): Deleted. * css/StyleBuilderCustom.h: (WebCore::StyleBuilderFunctions::applyValueWebkitMarqueeIncrement): 2014-10-31 Simon Fraser Brace cleanup in StyleResolver::adjustRenderStyle() https://bugs.webkit.org/show_bug.cgi?id=138267 Reviewed by Chris Dumez. No braces for single-line clauses. * css/StyleResolver.cpp: (WebCore::StyleResolver::adjustRenderStyle): 2014-10-31 Chris Dumez Fix several warnings reported by clang static analyzer in WebCore https://bugs.webkit.org/show_bug.cgi?id=138258 Reviewed by Joseph Pecoraro. Fix several warnings reported by clang static analyzer in WebCore related to variable unnecessary assignments and scope. No new tests, no behavior change. * dom/ContainerNode.cpp: (WebCore::ContainerNode::getUpperLeftCorner): * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::parseAttribute): * inspector/InspectorStyleTextEditor.cpp: (WebCore::InspectorStyleTextEditor::replaceProperty): * page/ContextMenuController.cpp: (WebCore::openNewWindow): * page/DragController.cpp: (WebCore::createMouseEvent): * rendering/RenderBlockFlow.cpp: (WebCore::RenderBlockFlow::computeInlinePreferredLogicalWidths): * rendering/svg/SVGInlineTextBox.cpp: (WebCore::SVGInlineTextBox::paintSelectionBackground): 2014-10-31 Simon Fraser Whitespace cleanup in Screen.h https://bugs.webkit.org/show_bug.cgi?id=138265 Reviewed by Chris Dumez. No indent for namespaces. Mark 'final'. Fix * placement. * page/Screen.h: (WebCore::Screen::create): 2014-10-31 Simon Fraser Change the ScrollingThread code to use RunLoop::main().dispatch() rather than callOnMainThread(), which has Obj-C overhead https://bugs.webkit.org/show_bug.cgi?id=138263 Reviewed by Geoffrey Garen. callOnMainThread() uses -performSelector:onMainThread:withObject:waitUntilDone:, so it's slightly more efficient to use RunLoop::main().dispatch(). * page/scrolling/ThreadedScrollingTree.cpp: (WebCore::ThreadedScrollingTree::invalidate): (WebCore::ThreadedScrollingTree::scrollingTreeNodeDidScroll): (WebCore::ThreadedScrollingTree::handleWheelEventPhase): 2014-10-31 Benjamin Poulain Pseudo classes with an escaped parenthesis generate invalid rules https://bugs.webkit.org/show_bug.cgi?id=138266 Reviewed by Antti Koivisto. Since the functional pseudo classes are part of the list of PseudoClassAndCompatibilityElement, they could be created by the rule pseudo: ':' IDENT if the parenthesis is escaped. For example, with ":not\\(", the IDENT would be "not(", CSSParserSelector::parsePseudoClassAndCompatibilityElementSelector would find a pseudo class type of PseudoClassNot, and the action would create an invalid CSSSelector for a :not() without nested selector. This patch fixes the issue by detecting the function case in CSSParserSelector::parsePseudoClassAndCompatibilityElementSelector(). An other solution would be to split PseudoClassAndCompatibilityElement into simple pseudo class and functional pseudo classes. We may do that some day but at the moment it is a lot of work with a little benefit. Tests: fast/css/crash-on-incomplete-webkit-any.html fast/css/pseudo-escaped-parenthesis.html fast/selectors/invalid-functional-pseudo-class.html * css/CSSParserValues.cpp: (WebCore::CSSParserSelector::parsePseudoClassAndCompatibilityElementSelector): 2014-10-31 Chris Dumez Make CSSDefaultStyleSheets::ensureDefaultStyleSheetsForElement() faster https://bugs.webkit.org/show_bug.cgi?id=138227 Reviewed by Benjamin Poulain. Restructure CSSDefaultStyleSheets::ensureDefaultStyleSheetsForElement() a bit to do less if checks. The previous implementation was doing 7 if checks no matter the input value. The new implementation does less if checks depending on the input type. Also, the isImageControlsRootElement() was showing in the profiles so I updated the condition to only do this virtual function call if the input is an HTMLDivElement (which we can check more efficiently). With the change, I see that we're spending about ~26% less time in this method when running speedometer. However, the impact on the overall score is within noise. No new tests, no behavior change. * css/CSSDefaultStyleSheets.cpp: (WebCore::CSSDefaultStyleSheets::ensureDefaultStyleSheetsForElement): 2014-10-31 Antti Koivisto Fix assertion in CachedResource::addDataBuffer * loader/cache/CachedRawResource.cpp: (WebCore::CachedRawResource::addDataBuffer): Don't call to base class if buffering mode changed (happens with some special top level document types). 2014-10-31 Said Abou-Hallawa Remove webkit prefix from CSS columns. https://bugs.webkit.org/show_bug.cgi?id=137132. Reviewed by Dean Jackson. CSS columns properties are ready for un-prefixing. There are still a couple that we haven't implemented, such as the ones starting with "break-", so we're just going to do the ones starting with "column-". The list of column un- prefixed properties in this change set is: - column-count - column-fill - column-gap - column-progression - column-rule - column-rule-color - column-rule-style - column-rule-width - column-span - column-width - columns Tests: fast/multicol/column-box-alignment-rtl.html fast/multicol/multicol-aliases.html imported/w3c/css/multicol/multicol-basic-001.html imported/w3c/css/multicol/multicol-basic-002.html imported/w3c/css/multicol/multicol-basic-003.html imported/w3c/css/multicol/multicol-basic-004.html Add new un-prefixed column properties and make the -webkit* ones be aliases to the new ones. * css/CSSPropertyNames.in: Use the new enums CSSPropertyColumn* instead of the prefixed ones. * css/CSSComputedStyleDeclaration.cpp: (WebCore::ComputedStyleExtractor::propertyValue): * css/CSSParser.cpp: (WebCore::isColorPropertyID): (WebCore::isValidKeywordPropertyAndValue): (WebCore::isKeywordPropertyID): (WebCore::CSSParser::parseValue): * css/DeprecatedStyleBuilder.cpp: (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder): * css/StyleProperties.cpp: (WebCore::StyleProperties::getPropertyValue): * css/StylePropertyShorthand.cpp: (WebCore::webkitColumnsShorthand): (WebCore::webkitColumnRuleShorthand): (WebCore::shorthandForProperty): (WebCore::matchingShorthandsForLonghand): * css/StyleResolver.cpp: (WebCore::isValidVisitedLinkProperty): (WebCore::StyleResolver::applyProperty): * page/animation/CSSPropertyAnimation.cpp: (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap): * rendering/RenderMultiColumnSet.cpp: (WebCore::RenderMultiColumnSet::paintColumnRules): * rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::colorIncludingFallback): 2014-10-31 Tim Horton Remove "Add to iPhoto" from the action menu's sharing menu https://bugs.webkit.org/show_bug.cgi?id=138251 Reviewed by Anders Carlsson. * platform/spi/mac/NSSharingServiceSPI.h: Add 'name' to the NSSharingService SPI header. 2014-10-31 Akos Kiss Fix type clash warning in supports_error rule of CSSGrammar. https://bugs.webkit.org/show_bug.cgi?id=138248 Reviewed by Antti Koivisto. Added explicit actions to supports_error rule in CSSGrammar.y.in since the default actions caused bison to emit type clash warnings. No new tests because there is no behavior change. * css/CSSGrammar.y.in: 2014-10-31 Adrian Perez de Castro [GTK] Support script message handlers WebKitUserContentManager https://bugs.webkit.org/show_bug.cgi?id=133730 Reviewed by Carlos Garcia Campos. Support user script message handlers in WebKitUserContentManager. This needs building with ENABLE_USER_MESSAGE_HANDLERS, for which an option is added to the CMake build files. The option is disabled globally by default, and the WebKitGTK port enables it. On the API level, two new methods to register and unregister names are provided in the "window.webkit" namespace, and on message reception the "WebKitUserContentManager::script-message-received" signal is emitted, using the registered names as signal detail. * CMakeLists.txt: Conditionally add the needed files to the build when the ENABLE_USER_MESSAGE_HANDLERS feature is enabled. 2014-10-31 Andrzej Badowski [ATK] Improve AccessibilityTableCell's determineAccessibilityRole function. https://bugs.webkit.org/show_bug.cgi?id=137737 Reviewed by Chris Fleizach. Use of new functions isRowHeaderCell and isColumnHeaderCell (bug 136818) to more accurately determine accessibility role of the table cell. Test: accessibility/table-cells-roles.html * accessibility/AccessibilityARIAGridCell.cpp: (WebCore::AccessibilityARIAGridCell::rowIndexRange): Change to const. * accessibility/AccessibilityARIAGridCell.h: Change rowIndexRange function to const. * accessibility/AccessibilityTableCell.cpp: (WebCore::AccessibilityTableCell::determineAccessibilityRole): Use of isRowHeaderCell and isColumnHeaderCell to more accurately determine accessibility role (ATK). (WebCore::AccessibilityTableCell::isColumnHeaderCell): Add a case of direct placement a row in the table. (WebCore::AccessibilityTableCell::isRowHeaderCell): Add a case of direct placement a row in the table. (WebCore::AccessibilityTableCell::rowIndexRange): Change to const. * accessibility/AccessibilityTableCell.h: Change rowIndexRange function to const. 2014-10-30 Darin Adler Eliminate ResourceBuffer and use SharedBuffer directly instead https://bugs.webkit.org/show_bug.cgi?id=138174 Reviewed by Antti Koivisto. Refactoring, with test coverage across many existing tests. * CMakeLists.txt: Deleted ResourceBuffer.cpp. * WebCore.exp.in: Removed ResourceBuffer-related symbols, and updated symbol for one function that used to take a PassRefPtr but now takes a reference instead. * WebCore.vcxproj/WebCore.vcxproj: Deleted ResourceBuffer.cpp/.h. * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto. * WebCore.xcodeproj/project.pbxproj: Deleted ResourceBuffer.mm/.cpp/.h. * bindings/objc/DOMUIKitExtensions.mm: (-[DOMHTMLImageElement dataRepresentation:]): Use SharedBuffer directly. * editing/ios/EditorIOS.mm: (WebCore::Editor::writeImageToPasteboard): Ditto. * editing/mac/EditorMac.mm: (WebCore::Editor::writeImageToPasteboard): Ditto. * html/ImageDocument.cpp: (WebCore::ImageDocument::updateDuringParsing): Use SharedBuffer directly, and also pass a reference only if non-null rather than passing a pointer. (WebCore::ImageDocument::finishedParsing): Ditto. Added a missing null check. * inspector/InspectorPageAgent.cpp: (WebCore::InspectorPageAgent::cachedResourceContent): Use SharedBuffer directly. (WebCore::InspectorPageAgent::mainResourceContent): Ditto. * inspector/InspectorResourceAgent.cpp: (WebCore::InspectorResourceAgent::didFinishLoading): Ditto. (WebCore::InspectorResourceAgent::didFailLoading): Ditto. * loader/DocumentLoader.cpp: (WebCore::DocumentLoader::mainResourceData): Use SharedBuffer directly, and use the copy function rather than a hand-written alternative. (WebCore::DocumentLoader::maybeCreateArchive): Ditto. (WebCore::DocumentLoader::mainResource): Ditto. (WebCore::DocumentLoader::subresource): Ditto. (WebCore::DocumentLoader::maybeFinishLoadingMultipartContent): Ditto. * loader/DocumentLoader.h: Changed mainResourceData to return a PassRefPtr. Would be better if it returned a SharedBuffer&, but it currently returns a newly created buffer when there is substitute data and can also return null, even though many callers assume it will not! * loader/MediaResourceLoader.cpp: (WebCore::MediaResourceLoader::dataReceived): Removed call to unused client function bufferReceived. (WebCore::MediaResourceLoader::notifyFinished): Removed unused buffer argument to client function loadFinished. * loader/ResourceBuffer.cpp: Removed. * loader/ResourceBuffer.h: Removed. * loader/ResourceLoader.cpp: (WebCore::ResourceLoader::addDataOrBuffer): Use SharedBuffer directly. * loader/ResourceLoader.h: (WebCore::ResourceLoader::resourceData): Use SharedBuffer. * loader/SubresourceLoader.cpp: (WebCore::SubresourceLoader::didReceiveResponse): Use SharedBuffer. (WebCore::SubresourceLoader::didReceiveDataOrBuffer): Ditto. * loader/TextTrackLoader.cpp: (WebCore::TextTrackLoader::processNewCueData): Use SharedBuffer. * loader/appcache/ApplicationCacheGroup.cpp: (WebCore::ApplicationCacheGroup::finishedLoadingMainResource): Ditto. * loader/archive/cf/LegacyWebArchive.cpp: (WebCore::LegacyWebArchive::create): Ditto. * loader/cache/CachedCSSStyleSheet.cpp: (WebCore::CachedCSSStyleSheet::finishLoading): Use SharedBuffer. * loader/cache/CachedCSSStyleSheet.h: Ditto. * loader/cache/CachedFont.cpp: (WebCore::CachedFont::finishLoading): Ditto. (WebCore::CachedFont::ensureCustomFontData): Ditto. * loader/cache/CachedFont.h: Ditto. * loader/cache/CachedImage.cpp: (WebCore::CachedImage::didAddClient): Use SharedBuffer. (WebCore::CachedImage::didRemoveClient): Ditto. (WebCore::CachedImage::addIncrementalDataBuffer): Ditto. Changed to take a reference rather than a pointer. (WebCore::CachedImage::addDataBuffer): Ditto. Also added call through to base class and changed to take a reference rather than a pointer. (WebCore::CachedImage::addData): Ditto. Also added call through to base class. (WebCore::CachedImage::finishLoading): Ditto. * loader/cache/CachedImage.h: Ditto. Also changed the type of some bit fields to be unsigned instead of unsigend char. * loader/cache/CachedRawResource.cpp: (WebCore::CachedRawResource::calculateIncrementalDataChunk): Use SharedBuffer. (WebCore::CachedRawResource::addDataBuffer): Ditto. Changed to take a reference rather than a pointer. (WebCore::CachedRawResource::addData): Ditto. (WebCore::CachedRawResource::finishLoading): Ditto. (WebCore::CachedRawResource::canReuse): Ditto. * loader/cache/CachedRawResource.h: Ditto. * loader/cache/CachedResource.cpp: (WebCore::CachedResource::CachedResource): Reordered data members due to change in header. (WebCore::CachedResource::addDataBuffer): Changed argument type. (WebCore::CachedResource::finishLoading): Ditto. (WebCore::CachedResource::didAddClient): Refactored to eliminate one extra hash table lookup by using the return value from the remove function. (WebCore::CachedResource::addClientToSet): Use std::make_unique directly instead of using a function named "schedule" to allocate the callback object. (WebCore::CachedResource::Callback::Callback): Changed function and data member name. (WebCore::CachedResource::Callback::cancel): Ditto. (WebCore::CachedResource::Callback::timerFired): Ditto. (WebCore::CachedResource::tryReplaceEncodedData): Changed to take a SharedBuffer&. * loader/cache/CachedResource.h: Changed types to use SharedBuffer. Also made most data members and one function member private instead of protected. Also renamed the CachedResource::CachedResourceCallback function CachedResource::Callback and moved its definition out of the CachedResource class definition. * loader/cache/CachedResourceClient.h: Removed unneeded include. * loader/cache/CachedSVGDocument.cpp: (WebCore::CachedSVGDocument::finishLoading): Use SharedBuffer. * loader/cache/CachedSVGDocument.h: Ditto. Made data members private. * loader/cache/CachedScript.cpp: (WebCore::CachedScript::finishLoading): Use SharedBuffer. * loader/cache/CachedScript.h: Ditto. Also fixed indenting and removed unneeded forward declaration. * loader/cache/CachedTextTrack.cpp: (WebCore::CachedTextTrack::updateData): Added, so that finishLoading does not call addDataBuffer. (WebCore::CachedTextTrack::addDataBuffer): Take SharedBuffer, call updateData. (WebCore::CachedTextTrack::finishLoading): Ditto. * loader/cache/CachedTextTrack.h: Take out unneeded explicit override of the destructor. Updated for above changes. * loader/cache/CachedXSLStyleSheet.cpp: (WebCore::CachedXSLStyleSheet::finishLoading): Updated to use SharedBuffer. * loader/cache/CachedXSLStyleSheet.h: Took out unneeded includes, made everything private rather than protected. Added an explicit virtual constructor so we can compile without knowing how to ref/deref TextResourceDecoder. * loader/cf/SubresourceLoaderCF.cpp: (WebCore::SubresourceLoader::didReceiveDataArray): Updated to use SharedBuffer and to call addDataBuffer only if there is a new data buffer. * loader/cocoa/DiskCacheMonitorCocoa.h: Use SharedBuffer& instead of PassRefPtr. * loader/cocoa/DiskCacheMonitorCocoa.mm: (WebCore::DiskCacheMonitor::DiskCacheMonitor): Ditto. (WebCore::DiskCacheMonitor::resourceBecameFileBacked): Ditto. * loader/icon/IconLoader.cpp: (WebCore::IconLoader::notifyFinished): Use SharedBuffer* instead of RefPtr. * loader/mac/ResourceBuffer.mm: Removed. * loader/mac/ResourceLoaderMac.mm: (WebCore::ResourceLoader::didReceiveDataArray): Use SharedBuffer. * platform/SharedBuffer.cpp: (WebCore::SharedBuffer::clear): Use a modern for loop. (WebCore::SharedBuffer::copy): Return a PassRef instead of a PassRefPtr, since this never returns null. Use modern for loops. (WebCore::SharedBuffer::copyBufferAndClear): Use a modern for loop. * platform/SharedBuffer.h: Changed copy to return PassRef instead of PassRefPtr. Changed tryReplaceContentsWithPlatformBuffer to take a reference rather than a pointer. * platform/cf/SharedBufferCF.cpp: (WebCore::SharedBuffer::tryReplaceContentsWithPlatformBuffer): Take a reference instead of a pointer. * platform/graphics/PlatformMediaResourceLoader.h: Removed unused function bufferReceived and unneeded buffer argument from loadFinished. Also marked the constructor explicit. * platform/graphics/avfoundation/cf/WebCoreAVCFResourceLoader.cpp: Removed include of ResourceBuffer.h. * platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm: (WebCore::WebCoreAVFResourceLoader::fulfillRequestWithResource): Use SharedBuffer directly. * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp: (CachedResourceStreamingClient::loadFinished): Updated for change to PlatformMediaResourceLoaderClient. * platform/mac/PasteboardMac.mm: Removed include of ResourceBuffer.h. * platform/soup/SharedBufferSoup.cpp: Removed unused, unneeded tryReplaceContentsWithPlatformBuffer function. 2014-10-30 Chris Dumez Move border-image-source / -webkit-mask-box-image-source to the new StyleBuilder https://bugs.webkit.org/show_bug.cgi?id=138209 Reviewed by Andreas Kling. Move border-image-source / -webkit-mask-box-image-source CSS properties from DeprecatedStyleBuilder to the new StyleBuilder so that they are now generated from CSSPropertyNames.in. No new tests, no behavior change. * css/CSSPropertyNames.in: * css/DeprecatedStyleBuilder.cpp: (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder): (WebCore::ApplyPropertyBorderImageSource::applyValue): Deleted. (WebCore::ApplyPropertyBorderImageSource::createHandler): Deleted. * css/StyleBuilderConverter.h: (WebCore::StyleBuilderConverter::convertBorderImageSource): 2014-10-30 Jer Noble [EME] Add Setting for accessing storage location for MediaKeys data https://bugs.webkit.org/show_bug.cgi?id=138147 Reviewed by Brady Eidson. Allow MediaPlayerPrivateAVFoundationObjC to query for the MediaKeys storage directory by piping that request down from WebKit and WebKit2 into Settings. * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::mediaKeysStorageDirectory): Get the location from Settings and append the current origin. * html/HTMLMediaElement.h: * page/Settings.h: (WebCore::Settings::setMediaKeysStorageDirectory): Simple setter. (WebCore::Settings::mediaKeysStorageDirectory): Simple accessor. * platform/graphics/MediaPlayer.cpp: (WebCore::MediaPlayer::mediaKeysStorageDirectory): Pass through to m_client. * platform/graphics/MediaPlayer.h: (WebCore::MediaPlayerClient::mediaPlayerMediaKeysStorageDirectory): Default implementation. * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm: (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::streamSession): Fetch the location from MediaPlayer. (WebCore::sessionStorageDirectory): Deleted. 2014-10-30 Dana Burkart Prepare for the mysterious future Reviewed by Lucas Forschler. * Configurations/Base.xcconfig: * Configurations/DebugRelease.xcconfig: * Configurations/FeatureDefines.xcconfig: * Configurations/Version.xcconfig: 2014-10-30 Simon Fraser Short-circuit repaints with empty rects https://bugs.webkit.org/show_bug.cgi?id=138234 Reviewed by Zalan Bujtas. Repaints with an empty rectangle are common enough that it's worth short-circuiting them. * rendering/RenderObject.cpp: (WebCore::RenderObject::repaintUsingContainer): 2014-10-30 Chris Dumez Clean up virtual functions in css/ https://bugs.webkit.org/show_bug.cgi?id=138230 Reviewed by Benjamin Poulain. Clean up virtual functions in css/ by: - Making virtual functions final when possible - Making classes final when possible - Using 'override' when appropriate - Explicitly marking functions / destructors as virtual when they are inherently virtual - Making isXXX() virtual functions private on XXX classes to avoid unnecessary type checks No new tests, no behavior change. * WebCore.exp.in: * css/CSSBasicShapes.h: * css/CSSCharsetRule.h: * css/CSSComputedStyleDeclaration.h: * css/CSSCrossfadeValue.h: * css/CSSFilterImageValue.h: * css/CSSFontFaceLoadEvent.h: * css/CSSFontFaceRule.h: * css/CSSFontFaceSource.h: * css/CSSImportRule.h: * css/CSSMediaRule.h: * css/CSSPageRule.h: * css/CSSRuleList.h: (WebCore::StaticCSSRuleList::ref): Deleted. (WebCore::StaticCSSRuleList::styleSheet): Deleted. (WebCore::StaticCSSRuleList::length): Deleted. (WebCore::StaticCSSRuleList::item): Deleted. (WebCore::LiveCSSRuleList::ref): Deleted. (WebCore::LiveCSSRuleList::deref): Deleted. (WebCore::LiveCSSRuleList::length): Deleted. (WebCore::LiveCSSRuleList::item): Deleted. (WebCore::LiveCSSRuleList::styleSheet): Deleted. * css/CSSStyleRule.h: * css/CSSSupportsRule.h: * css/CSSUnknownRule.h: * css/FontLoader.h: * css/PropertySetCSSStyleDeclaration.h: (WebCore::PropertySetCSSStyleDeclaration::parentElement): * css/WebKitCSSKeyframeRule.h: * css/WebKitCSSViewportRule.h: 2014-10-30 Tim Horton Long spins under rangeExpandedAroundPosition on Yahoo Mail https://bugs.webkit.org/show_bug.cgi?id=138223 Reviewed by Enrica Casucci. * WebCore.exp.in: Export some things. 2014-10-30 Ada Chan The Page's muted setting should not affect the HTMLMediaElement's 'muted' IDL attribute. https://bugs.webkit.org/show_bug.cgi?id=138215 Reviewed by Eric Carlson. Add m_muted in Page to keep track of the Page's muted state. Change AudioProducer::setMuted() to pageMutedStateDidChange(). When that method is called, the AudioProducer is supposed to update its muted state again taking the Page's muted state into account. Add HTMLMediaElement::effectiveMuted(), which returns the effective muted state of the HTMLMediaElement, taking the Page's muted state into account. Test: media/video-muted-after-setting-page-muted-state.html * dom/Document.cpp: (WebCore::Document::pageMutedStateDidChange): (WebCore::Document::setMuted): Deleted. * dom/Document.h: * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::setMuted): Set the MediaPlayer's muted state to the result of effectiveMuted() rather than m_muted. (WebCore::HTMLMediaElement::updateVolume): Ditto, and also make sure the MediaController's muted state does not override the Page's muted state. (WebCore::HTMLMediaElement::updatePlayState): Set the MediaPlayer's muted state to the result of effectiveMuted() rather than muted(). (WebCore::HTMLMediaElement::pageMutedStateDidChange): Call updateVolume(), which will update the MediaPlayer's muted state. (WebCore::HTMLMediaElement::effectiveMuted): Figure out the muted value taking Page's muted state into account. * html/HTMLMediaElement.h: * page/AudioProducer.h: * page/Page.cpp: (WebCore::Page::Page): (WebCore::Page::setMuted): Update m_muted, and only iterate through the frames' documents to call pageMutedStateDidChange() if m_muted changes. * page/Page.h: (WebCore::Page::isMuted): * testing/Internals.cpp: (WebCore::Internals::setPageMuted): Expose a way to set the Page's muted state in Internals for testing. * testing/Internals.h: * testing/Internals.idl: 2014-10-30 Myles C. Maxfield Use references in calculateMinimumPageHeight() for non-optional arguments https://bugs.webkit.org/show_bug.cgi?id=138231 Reviewed by Dean Jackson. No new tests because there is no behavior change. * rendering/RenderBlockFlow.cpp: (WebCore::calculateMinimumPageHeight): (WebCore::RenderBlockFlow::adjustLinePositionForPagination): 2014-10-30 Chris Dumez Move -webkit-border-image / -webkit-mask-box-image to the new StyleBuilder https://bugs.webkit.org/show_bug.cgi?id=138207 Reviewed by Andreas Kling. Move -webkit-border-image / -webkit-mask-box-image CSS properties to the new StyleBuilder so that they are now generated from CSSPropertyNames.in. No new tests, no behavior change. * css/CSSPropertyNames.in: * css/DeprecatedStyleBuilder.cpp: (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder): (WebCore::ApplyPropertyBorderImage::applyValue): Deleted. (WebCore::ApplyPropertyBorderImage::createHandler): Deleted. * css/StyleBuilderConverter.h: (WebCore::StyleBuilderConverter::convertBorderImage): (WebCore::StyleBuilderConverter::convertBorderMask): 2014-10-30 Chris Dumez Optimize HTMLVideoElement / HTMLAudioElement type checks a bit https://bugs.webkit.org/show_bug.cgi?id=138202 Reviewed by Benjamin Poulain. Optimize HTMLVideoElement / HTMLAudioElement type checks a bit by: 1. Using is() instead of (is() || is()) if the caller is interested in both video and audio elements. This is faster because it ends up doing: - virtual call to Element::isMediaElement() instead of - Node::isHTMLElement() + virtual call to HTMLElement::isHTMLUnknownElement() + 2 * HTMLElement::hasTagName() 2. Updating HTMLVideoElement / HTMLAudioElement type traits specializations to: - Avoid doing any virtual function call if the input type is an HTMLMediaElement (which is common in the code base). - Speed up check if the input is an Element by doing: - virtual call to Element::isMediaElement() + HTMLElement::hasTagName() instead of - Node::isHTMLElement() + virtual call to !HTMLElement::isHTMLUnknownElement() + HTMLElement::hasTagName() The speed stays the same if the input is a Node or an HTMLElement. No new tests, no behavior change. * css/CSSDefaultStyleSheets.cpp: (WebCore::CSSDefaultStyleSheets::ensureDefaultStyleSheetsForElement): * dom/make_names.pl: (defaultTagPropertyHash): (printTypeHelpers): * html/HTMLAudioElement.h: (isType): * html/HTMLImageLoader.cpp: * html/HTMLTagNames.in: * html/HTMLVideoElement.h: (isType): * page/ChromeClient.h: 2014-10-30 Myles C. Maxfield Migrate ComplexTextControllerCoreText to use SPI instead of WKSI https://bugs.webkit.org/show_bug.cgi?id=138228 Reviewed by Simon Fraser. No new tests because there is no behavior change. * WebCore.xcodeproj/project.pbxproj: * platform/graphics/mac/ComplexTextControllerCoreText.mm: (WebCore::ComplexTextController::ComplexTextRun::ComplexTextRun): (WebCore::ComplexTextController::collectComplexTextRunsForCharacters): * platform/spi/cocoa/CoreTextSPI.h: Added. 2014-10-30 Eric Carlson Add diagnostic logging to track page loads. https://bugs.webkit.org/show_bug.cgi?id=138205 Reviewed by Jer Noble. * loader/FrameLoader.cpp: (WebCore::FrameLoader::checkLoadCompleteForThisFrame): Log page load success or failure. * page/DiagnosticLoggingKeys.cpp: (WebCore::DiagnosticLoggingKeys::pageLoadedKey): New. * page/DiagnosticLoggingKeys.h: 2014-10-24 Philippe Normand [GStreamer] Video resolution changes trigger a crash in the TextureMapper https://bugs.webkit.org/show_bug.cgi?id=137065 Reviewed by Gustavo Noronha Silva. Switch to GstSample for buffer+caps communication between the video sink and the player. Using a single object type for this avoid issues where the caps might not correctly describe the buffer contents anymore, for example when the video resolution is changed. * platform/graphics/gstreamer/ImageGStreamer.h: Use GstSample instead of GstBuffer+GstCaps. (WebCore::ImageGStreamer::createImage): * platform/graphics/gstreamer/ImageGStreamerCairo.cpp: Ditto. (ImageGStreamer::ImageGStreamer): * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp: (WebCore::mediaPlayerPrivateRepaintCallback): The repaint signal now uses a GstSample instead of a GstBuffer. (WebCore::MediaPlayerPrivateGStreamerBase::MediaPlayerPrivateGStreamerBase): Store the current sample instead of a buffer. Also renamed the mutex protecting access to the sample. (WebCore::MediaPlayerPrivateGStreamerBase::~MediaPlayerPrivateGStreamerBase): Ditto. (WebCore::MediaPlayerPrivateGStreamerBase::naturalSize): Return early if no sample is available. The caps used to get the video size are store in the sample. (WebCore::MediaPlayerPrivateGStreamerBase::updateTexture): Use GstSample instead of GstBuffer. (WebCore::MediaPlayerPrivateGStreamerBase::triggerRepaint): Ditto. (WebCore::MediaPlayerPrivateGStreamerBase::paint): Ditto. * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h: * platform/graphics/gstreamer/VideoSinkGStreamer.cpp: Now store a GstSample internally. Also removed the now useless current-caps property. (_WebKitVideoSinkPrivate::_WebKitVideoSinkPrivate): Renamed the mutex protecting access to the sample. (_WebKitVideoSinkPrivate::~_WebKitVideoSinkPrivate): Ditto. (webkit_video_sink_init): Disable last-sample in basesink since we already store one in our sink anyway. (webkitVideoSinkTimeoutCallback): Switch to GstSample. (webkitVideoSinkRender): Ditto. (unlockSampleMutex): Ditto. (webkitVideoSinkUnlock): Ditto. (webkitVideoSinkUnlockStop): Ditto. (webkitVideoSinkStop): Ditto! (webkitVideoSinkStart): Ditto. (webkit_video_sink_class_init): Drop current-caps property. (webkitVideoSinkGetProperty): Deleted. (unlockBufferMutex): Deleted. 2014-10-30 Carlos Garcia Campos FormDataBuilder should not use Document https://bugs.webkit.org/show_bug.cgi?id=138172 Reviewed by Alexey Proskuryakov. It's only used by encodingFromAcceptCharset() to fallback to document input encoding. That method is only used by FormSubmission::create(), so it could be moved as a static function to FormSubmission.cpp. * loader/FormSubmission.cpp: (WebCore::encodingFromAcceptCharset): (WebCore::FormSubmission::create): * platform/network/FormDataBuilder.cpp: (WebCore::FormDataBuilder::encodingFromAcceptCharset): Deleted. * platform/network/FormDataBuilder.h: 2014-10-29 Said Abou-Hallawa ASSERTION NOT REACHED because RenderStyle::setWordSpacing() does not handle a Length value of type 'Calculated'. https://bugs.webkit.org/show_bug.cgi?id=138054. Reviewed by Zalan Bujtas. A Length of type 'Calculated' can be generated from blending two lengths of different types. Setting the wordSpacing of the render style should be handled correctly when the type of the new value is 'Calculated'. Tests: css3/calculated-word-spacing.html. Add a case for setting the render style wordSpacing to a of type 'Calculated'. * rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::setWordSpacing): 2014-10-29 Hunseop Jeong [CoordinatedGraphics] Use modern for-loops https://bugs.webkit.org/show_bug.cgi?id=138168 Reviewed by Andreas Kling. No new tests as there is no change in functionality. * platform/graphics/texmap/coordinated/CompositingCoordinator.cpp: Use a modern for loop. (WebCore::CompositingCoordinator::renderNextFrame): (WebCore::CompositingCoordinator::paintToSurface): * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp: Use a modern for loop. (WebCore::CoordinatedGraphicsLayer::setShouldUpdateVisibleRect): (WebCore::CoordinatedGraphicsLayer::flushCompositingState): (WebCore::CoordinatedGraphicsLayer::syncChildren): (WebCore::CoordinatedGraphicsLayer::syncPendingStateChangesIncludingSubLayers): (WebCore::CoordinatedGraphicsLayer::findFirstDescendantWithContentsRecursively): (WebCore::CoordinatedGraphicsLayer::updateContentBuffersIncludingSubLayers): * platform/graphics/texmap/coordinated/CoordinatedImageBacking.cpp: Use a modern for loop. (WebCore::CoordinatedImageBacking::updateVisibilityIfNeeded): 2014-10-29 Chris Dumez Final-ize more of TextFieldInputType's virtual functions https://bugs.webkit.org/show_bug.cgi?id=138194 Reviewed by Andreas Kling. Final-ize more of TextFieldInputType's virtual functions for performance. No new tests, no behavior change. * html/TextFieldInputType.h: 2014-10-29 Chris Dumez Clean up virtual functions in inspector/ https://bugs.webkit.org/show_bug.cgi?id=138190 Reviewed by Andreas Kling. Clean up virtual functions in inspector/ by: - Making virtual functions final when possible - Making classes final when possible - Explicitly marking functions / destructors as virtual when they are inherently virtual - Making isXXX() virtual functions private on XXX classes to avoid unnecessary type checks No new tests, no behavior change. * inspector/InspectorApplicationCacheAgent.h: (WebCore::InspectorApplicationCacheAgent::~InspectorApplicationCacheAgent): Deleted. * inspector/InspectorCSSAgent.h: * inspector/InspectorDOMAgent.h: * inspector/InspectorDOMDebuggerAgent.h: * inspector/InspectorDOMStorageAgent.h: * inspector/InspectorDatabaseAgent.h: * inspector/InspectorFrontendClientLocal.h: * inspector/InspectorIndexedDBAgent.h: * inspector/InspectorLayerTreeAgent.h: * inspector/InspectorPageAgent.h: * inspector/InspectorReplayAgent.h: * inspector/InspectorResourceAgent.h: * inspector/InspectorStyleSheet.h: * inspector/InspectorTimelineAgent.h: * inspector/InspectorWorkerAgent.h: * inspector/PageConsoleAgent.h: * inspector/WorkerInspectorController.h: 2014-10-29 Andreas Kling Generalize dirtying of parent's line boxes when taking a renderer out of tree. Reviewed by Antti Koivisto. Instead of calling dirtyLinesFromChangedChild() when certain types of renderers are about to be destroyed, always do this in RenderElement::willBeRemovedFromTree(). This is part of an effort to make render tree teardown less incomprehensible. We still don't bother at all if we're in the process of tearing down the entire render tree, since that would be a waste of time. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::willBeDestroyed): * rendering/RenderBlockFlow.cpp: (WebCore::RenderBlockFlow::willBeDestroyed): * rendering/RenderElement.cpp: (WebCore::RenderElement::willBeRemovedFromTree): * rendering/RenderInline.cpp: (WebCore::RenderInline::willBeDestroyed): * rendering/RenderReplaced.cpp: (WebCore::RenderReplaced::willBeDestroyed): Deleted. * rendering/RenderReplaced.h: 2014-10-28 Ada Chan Implement WKPageSetMuted(bool). https://bugs.webkit.org/show_bug.cgi?id=138158 Reviewed by Anders Carlsson. * WebCore.exp.in: * page/Page.h: 2014-10-29 Alexey Proskuryakov Notify Settings object when its Page object goes away. https://bugs.webkit.org/show_bug.cgi?id=138183 rdar://problem/18786900 Reviewed by Andreas Kling. I could not make a test for this issue. * page/Page.cpp: (WebCore::Page::~Page): * page/Settings.cpp: (WebCore::setImageLoadingSettings): (WebCore::Settings::Settings): (WebCore::Settings::setTextAutosizingEnabled): (WebCore::Settings::setTextAutosizingWindowSizeOverride): (WebCore::Settings::setTextAutosizingFontScaleFactor): (WebCore::Settings::setMediaTypeOverride): (WebCore::Settings::setScriptEnabled): (WebCore::Settings::setUserStyleSheetLocation): (WebCore::Settings::setMinDOMTimerInterval): (WebCore::Settings::minDOMTimerInterval): (WebCore::Settings::domTimerAlignmentInterval): (WebCore::Settings::setUsesPageCache): (WebCore::Settings::setScreenFontSubstitutionEnabled): (WebCore::Settings::setFontRenderingMode): (WebCore::Settings::setDNSPrefetchingEnabled): (WebCore::Settings::setStorageBlockingPolicy): (WebCore::Settings::setBackgroundShouldExtendBeyondPage): (WebCore::Settings::setScrollingPerformanceLoggingEnabled): (WebCore::Settings::setHiddenPageDOMTimerThrottlingEnabled): (WebCore::Settings::setHiddenPageCSSAnimationSuspensionEnabled): (WebCore::Settings::setFontFallbackPrefersPictographs): * page/Settings.h: (WebCore::Settings::pageDestroyed): 2014-10-29 Zalan Bujtas Remove invalid float from RootInlineBox. https://bugs.webkit.org/show_bug.cgi?id=137707 Reviewed by Antti Koivisto. In certain cases, floating boxes get attached to the last (root) inline box. When this particular floating box gets destroyed, it also needs to be detached from the last inline box. 1. Introduce RootInlineBox::removeFloat() (vs. RootInlineBox::appendFloat()) 2. Ensure that it is called when the floating box is being destroyed. Test: fast/inline/crash-when-inline-box-has-invalid-float.html * rendering/RenderBlockFlow.cpp: (WebCore::RenderBlockFlow::removeFloatingObject): (WebCore::RenderBlockFlow::markAllDescendantsWithFloatsForLayout): During style recalc, while tearing down the render tree, we can get to a state where a block element has both inline and block children. It happens when the style change on an element makes sibling anonymous block wrappers detached. In that case the markAllDescendantsWithFloatsForLayout() call does not get propagated down on the block child elements as we return early at the childrenInline() check. * rendering/RootInlineBox.h: (WebCore::RootInlineBox::removeFloat): 2014-10-29 Antti Koivisto Factor cache validity computation functions out of CachedResource https://bugs.webkit.org/show_bug.cgi?id=138156 Reviewed by Andreas Kling. These can be used to implement cache logic on WebKit level. * CMakeLists.txt: * WebCore.exp.in: * WebCore.vcxproj/WebCore.vcxproj: * WebCore.xcodeproj/project.pbxproj: * loader/CacheValidation.cpp: Added. (WebCore::computeCurrentAge): (WebCore::computeFreshnessLifetimeForHTTPFamily): (WebCore::updateRedirectChainStatus): (WebCore::redirectChainAllowsReuse): * loader/CacheValidation.h: Added. (WebCore::RedirectChainCacheStatus::RedirectChainCacheStatus): * loader/cache/CachedResource.cpp: (WebCore::updateResponseHeadersAfterRevalidation): (WebCore::CachedResource::CachedResource): (WebCore::CachedResource::isExpired): (WebCore::CachedResource::freshnessLifetime): (WebCore::CachedResource::willSendRequest): (WebCore::CachedResource::updateResponseAfterRevalidation): (WebCore::CachedResource::redirectChainAllowsReuse): (WebCore::currentAge): Deleted. * loader/cache/CachedResource.h: 2014-10-29 Antti Koivisto Unreviewed, rolling out r175342. a file ended up in a wrong directory Reverted changeset: "Factor cache validity computation functions out of CachedResource" https://bugs.webkit.org/show_bug.cgi?id=138156 http://trac.webkit.org/changeset/175342 2014-10-29 Antti Koivisto Factor cache validity computation functions out of CachedResource https://bugs.webkit.org/show_bug.cgi?id=138156 Reviewed by Andreas Kling. These can be used to implement cache logic on WebKit level. * CMakeLists.txt: * WebCore.exp.in: * WebCore.vcxproj/WebCore.vcxproj: * WebCore.xcodeproj/project.pbxproj: * loader/CacheValidation.cpp: Added. (WebCore::computeCurrentAge): (WebCore::computeFreshnessLifetimeForHTTPFamily): (WebCore::updateRedirectChainStatus): (WebCore::redirectChainAllowsReuse): * loader/CacheValidation.h: Added. (WebCore::RedirectChainCacheStatus::RedirectChainCacheStatus): * loader/cache/CachedResource.cpp: (WebCore::updateResponseHeadersAfterRevalidation): (WebCore::CachedResource::CachedResource): (WebCore::CachedResource::isExpired): (WebCore::CachedResource::freshnessLifetime): (WebCore::CachedResource::willSendRequest): (WebCore::CachedResource::updateResponseAfterRevalidation): (WebCore::CachedResource::redirectChainAllowsReuse): (WebCore::currentAge): Deleted. * loader/cache/CachedResource.h: 2014-10-28 Ada Chan Add API to mute/unmute a page. https://bugs.webkit.org/show_bug.cgi?id=138150 Reviewed by Eric Carlson. No new tests, since it's difficult to test whether the Page has indeed been muted. * dom/Document.cpp: (WebCore::Document::setMuted): Go through each AudioProducer and call setMuted() on it. * dom/Document.h: * page/AudioProducer.h: Add setMuted(bool). HTMLMediaElement, the only derived class of AudioProducer so far, has already implemented setMuted(). * page/Page.cpp: (WebCore::Page::setMuted): Go through all its frames and call setMuted() on each frame's Document. * page/Page.h: 2014-10-29 Tim Horton Implement action menus for data detected items https://bugs.webkit.org/show_bug.cgi?id=138178 Reviewed by Anders Carlsson. * WebCore.exp.in: Export a symbol from Position that we need. * WebCore.xcodeproj/project.pbxproj: * platform/spi/mac/DataDetectorsSPI.h: Add a combined SPI header for all of the random bits of DataDetectors that we use. 2014-10-29 Jer Noble [EME] NULL-dereference crash in MediaKeys::setMediaElement(). https://bugs.webkit.org/show_bug.cgi?id=138177 Reviewed by Eric Carlson. NULL-check m_mediaElement->player() before using. It may have been cleared if the HTMLMediaElement has previously had stop() called. * Modules/encryptedmedia/MediaKeys.cpp: (WebCore::MediaKeys::setMediaElement): 2014-10-29 Jer Noble [EME] MediaKeySession resources persist across page reloads https://bugs.webkit.org/show_bug.cgi?id=138176 Reviewed by Eric Carlson. MediaKeySession is an ActiveDOMObject, so when told to stop() by our execution context, close() the session, releasing all our resources. * Modules/encryptedmedia/MediaKeySession.h: 2014-10-29 Jer Noble [EME][Mac] MediaKeySession type "keyrelease" is ignored. https://bugs.webkit.org/show_bug.cgi?id=138175 Reviewed by Eric Carlson. To indicate that they would like to recevie expired session confirmation messages, clients will create a MediaKeySession with a type parameter of "keyrelease". The code which validates this type needs to be updated to recognize "keyrelease" as a valid type. Also, the code which validates update() requests needs to allow updates containing the string "acknowledged", so that clients can request the confirmation messages be discarded. * platform/graphics/avfoundation/CDMPrivateMediaSourceAVFObjC.mm: (WebCore::CDMPrivateMediaSourceAVFObjC::supportsMIMEType): * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm: (WebCore::CDMSessionMediaSourceAVFObjC::update): 2014-10-28 Ada Chan Remove MediaSessionClient::hasMediaCharacteristics() and MediaSessionClient::mediaStateDidChange(). https://bugs.webkit.org/show_bug.cgi?id=138153 Reviewed by Jer Noble. After http://trac.webkit.org/changeset/175273, Document no longer keeps a set of MediaSessions and it doesn't need to query each MediaSession for its characteristics and play state. MediaSessionClient::hasMediaCharacteristics() is no longer needed and MediaSessionClient::mediaStateDidChange() can be removed if HTMLMediaElement calls Document::updateIsPlayingAudio() after m_playing has changed. No new tests, no behavior change. * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::updatePlayState): Call setPlaying() rather than setting m_playing directly. (WebCore::HTMLMediaElement::setPlaying): Update m_playing. If it has changed, call Document::updateIsPlayingAudio(). (WebCore::HTMLMediaElement::setPausedInternal): Call setPlaying() rather than setting m_playing directly. (WebCore::HTMLMediaElement::isPlayingAudio): Call isPlaying() directly rather than checking the MediaSession's state. * html/HTMLMediaElement.h: * platform/audio/MediaSession.cpp: (WebCore::MediaSession::setState): MediaSessionClient::mediaStateDidChange() has been removed. (WebCore::MediaSession::hasMediaCharacteristics): Deleted. * platform/audio/MediaSession.h: (WebCore::MediaSessionClient::mediaStateDidChange): Deleted. * platform/audio/ios/AudioDestinationIOS.h: * platform/audio/mac/AudioDestinationMac.h: 2014-10-29 Chris Dumez Clean up virtual functions in html/ https://bugs.webkit.org/show_bug.cgi?id=138166 Reviewed by Andreas Kling. Clean up virtual functions in html/ by: - Making virtual functions final when possible - Making classes final when possible - Using 'override' when appropriate - Explicitly marking functions / destructors as virtual when they are inherently virtual - Dropping virtual destructors when the class does not have subclasses and mark the class as final, to get rid of unnecessary vtables - Making isXXX() virtual functions private on XXX classes to avoid unnecessary type checks - De-virtualizing some functions that do not need to be virtual - Dropping final for virtual functions in classes already marked as final No new tests, no behavior change. * html/ButtonInputType.h: * html/CheckboxInputType.h: * html/ColorInputType.h: * html/DOMSettableTokenList.h: * html/DateInputType.h: * html/DateTimeInputType.h: * html/DateTimeLocalInputType.h: * html/EmailInputType.h: * html/FTPDirectoryDocument.h: * html/HTMLAnchorElement.h: * html/HTMLDetailsElement.cpp: * html/HTMLFormControlElement.h: * html/HTMLFormControlsCollection.h: * html/HTMLFrameElement.h: * html/HTMLFrameElementBase.h: * html/HTMLFrameOwnerElement.h: * html/HTMLInputElement.h: * html/HTMLMarqueeElement.h: * html/HTMLMediaElement.h: * html/HTMLMediaSession.h: (WebCore::HTMLMediaSession::requiresPlaybackTargetRouteMonitoring): Deleted. * html/HTMLMeterElement.h: * html/HTMLNameCollection.h: * html/HTMLObjectElement.h: * html/HTMLOptGroupElement.h: * html/HTMLOptionElement.h: * html/HTMLSpanElement.h: * html/HTMLStyleElement.h: * html/HTMLSummaryElement.cpp: * html/HTMLSummaryElement.h: * html/HTMLUnknownElement.h: * html/HTMLVideoElement.h: * html/HiddenInputType.h: * html/ImageInputType.h: * html/MediaKeyEvent.h: * html/MonthInputType.h: * html/NumberInputType.h: * html/PasswordInputType.h: * html/PublicURLManager.h: * html/RadioInputType.h: * html/ResetInputType.h: * html/SubmitInputType.h: * html/TelephoneInputType.h: * html/TextInputType.h: * html/TimeInputType.h: * html/URLInputType.h: * html/WeekInputType.h: * html/canvas/ANGLEInstancedArrays.h: * html/canvas/CanvasRenderingContext2D.h: * html/canvas/DOMPath.h: * html/canvas/EXTShaderTextureLOD.h: * html/canvas/EXTTextureFilterAnisotropic.h: * html/canvas/OESElementIndexUint.h: * html/canvas/OESStandardDerivatives.h: * html/canvas/OESTextureFloat.h: * html/canvas/OESTextureFloatLinear.h: * html/canvas/OESTextureHalfFloat.h: * html/canvas/OESTextureHalfFloatLinear.h: * html/canvas/OESVertexArrayObject.h: * html/canvas/WebGLBuffer.h: * html/canvas/WebGLCompressedTextureATC.h: * html/canvas/WebGLCompressedTexturePVRTC.h: * html/canvas/WebGLCompressedTextureS3TC.h: * html/canvas/WebGLContextAttributes.h: * html/canvas/WebGLContextEvent.h: * html/canvas/WebGLDebugRendererInfo.h: * html/canvas/WebGLDebugShaders.h: * html/canvas/WebGLDepthTexture.h: * html/canvas/WebGLDrawBuffers.h: * html/canvas/WebGLFramebuffer.h: (WebCore::WebGLFramebuffer::isFramebuffer): Deleted. * html/canvas/WebGLLoseContext.h: * html/canvas/WebGLProgram.h: * html/canvas/WebGLRenderbuffer.h: * html/canvas/WebGLRenderingContext.h: * html/canvas/WebGLShader.h: * html/canvas/WebGLSharedObject.h: (WebCore::WebGLSharedObject::isFramebuffer): Deleted. * html/canvas/WebGLTexture.h: * html/canvas/WebGLVertexArrayObjectOES.h: (WebCore::WebGLVertexArrayObjectOES::isVertexArray): Deleted. * html/shadow/ImageControlsRootElement.h: * html/shadow/InsertionPoint.h: * html/shadow/MediaControlElementTypes.h: * html/shadow/MediaControlElements.h: * html/shadow/MediaControls.h: * html/shadow/MediaControlsApple.h: * html/shadow/SpinButtonElement.h: * html/track/AudioTrack.h: * html/track/AudioTrackList.h: * html/track/DataCue.h: (WebCore::DataCue::cueType): Deleted. * html/track/InbandDataTextTrack.h: * html/track/InbandGenericTextTrack.h: * html/track/InbandTextTrack.h: * html/track/InbandWebVTTTextTrack.h: * html/track/LoadableTextTrack.h: * html/track/TextTrackList.h: * html/track/TrackEvent.h: * html/track/VTTCue.h: (WebCore::VTTCueBox::setFontSizeFromCaptionUserPrefs): * html/track/VTTRegion.h: * html/track/VideoTrack.h: * html/track/VideoTrackList.h: * html/track/WebVTTParser.h: (WebCore::WebVTTCueData::~WebVTTCueData): Deleted. 2014-10-17 Sergio Villar Senin ASSERTION FAILED: growthShare > 0 in WebCore::RenderGrid::distributeSpaceToTracks https://bugs.webkit.org/show_bug.cgi?id=137772 Reviewed by Andreas Kling. We're hitting the ASSERTION because if the number of tracks an item spans does greatly exceed the available logical space, then the result of the division availableLogicalSpace/numberOfTracks is truncated to 0. So the ASSERTION was theoretically right because the result has to be always >0 (as the dividend > 0) but the fact that the result is a LayoutUnit forces us to accept 0 as a valid outcome of the operation. Test: fast/css-grid-layout/tracks-number-greatly-exceeding-available-size-crash.html * rendering/RenderGrid.cpp: (WebCore::RenderGrid::distributeSpaceToTracks): 2014-10-29 Chris Dumez Crash in CachedRawResource::canReuse() when reloading http://dnd.wizards.com/dungeons-and-dragons/story https://bugs.webkit.org/show_bug.cgi?id=138164 Reviewed by Andreas Kling. This patch fixes a crash when reloading the following URL: http://dnd.wizards.com/dungeons-and-dragons/story We were crashing in CachedRawResource::canReuse() because header.key would sometimes be a null String and we would call HashMap::get(nullString). The real issue was that header.key was null in the first place, which means that even though the HTTPHeaderMap iterator is valid, it->key is a null String, which should never happen. There was a bug in the HTTPHeaderMapConstIterator() constructor that would cause the iterator key/value pair to not get initialized if the HTTPHeaderMap contained *only* uncommon HTTP headers. This patch updates the constructor so that we fall back to updating the key/value from the uncommon header map, if we failed to initialized from the common header map (because it was empty). Test: http/tests/cache/xhr-uncommon-header.html * platform/network/HTTPHeaderMap.h: (WebCore::HTTPHeaderMap::HTTPHeaderMapConstIterator::HTTPHeaderMapConstIterator): 2014-10-28 Benjamin Poulain CSS4 Selectors: Add the pseudo class :any-link https://bugs.webkit.org/show_bug.cgi?id=138128 Reviewed by Andreas Kling. Defined here: http://dev.w3.org/csswg/selectors4/#the-any-link-pseudo After :link and :-webkit-any-link were fixed, :any-link behaves exactly like :-webkit-any-link. All I had left to do here was make them synonyms when evaluating selectors. Defined here: http://dev.w3.org/csswg/selectors4/#the-any-link-pseudo After :link and :-webkit-any-link were fixed, :any-link behaves exactly like :-webkit-any-link. All I had left to do here was make them synonyms when evaluating selectors. Tests: fast/selectors/any-link-basics-2.html fast/selectors/any-link-basics.html fast/selectors/any-link-styling.html * css/CSSSelector.cpp: (WebCore::CSSSelector::selectorText): * css/CSSSelector.h: * css/RuleSet.cpp: (WebCore::RuleSet::addRule): * css/SelectorChecker.cpp: (WebCore::SelectorChecker::checkOne): * css/SelectorChecker.h: (WebCore::SelectorChecker::isCommonPseudoClassSelector): * css/SelectorPseudoClassAndCompatibilityElementMap.in: * cssjit/SelectorCompiler.cpp: (WebCore::SelectorCompiler::addPseudoClassType): (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementLinkMatching): 2014-10-28 Jer Noble [EME][Mac] Adopt new AVStreamSession API: pass storageDirectoryAtURL at creation-time https://bugs.webkit.org/show_bug.cgi?id=138149 Reviewed by Brent Fulgham. AVStreamSession now requires its storage location at creation-time, rather than post-creation. This requires us to move storage location code from CDMSessionMediaSourceAVFObjC to MediaPlayerPrivateMediaSourceAVFObjC. * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm: (-[WebAVStreamDataParserListener streamDataParserWillProvideContentKeyRequestInitializationData:forTrackID:]): Renamed. (WebCore::CDMSessionMediaSourceAVFObjC::update): (WebCore::sessionStorageDirectory): Deleted. * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm: (WebCore::sessionStorageDirectory): (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::streamSession): 2014-10-28 Geoffrey Garen All networking crashes on Mac 32bit https://bugs.webkit.org/show_bug.cgi?id=138157 Reviewed by Andy Estes. NEFilterSource content filtering is not available on 32bit, so soft-linking fails at runtime. The simplest solution is just to disable it at compile time. * platform/ContentFilter.h: 2014-10-28 Jeremy Jones Add optimized fullscreen mode. https://bugs.webkit.org/show_bug.cgi?id=138044 Reviewed by Jer Noble. Enable different types of fullscreen video behavior. Add an enum parameter to enterVideoFullscreenForVideoElement for alternate types of fullscreen. Add gesture for alternate fullscreen. * Modules/mediacontrols/MediaControlsHost.cpp: (WebCore::MediaControlsHost::enterFullscreenOptimized): added * Modules/mediacontrols/MediaControlsHost.h: added enterFullscreenOptimized * Modules/mediacontrols/MediaControlsHost.idl: added enterFullscreenOptimized * Modules/mediacontrols/mediaControlsiOS.js: (ControllerIOS.prototype.handleBaseGestureChange): recognize alternate gesture * WebCore.exp.in: added parameter to setupFullscreen * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::removedFrom) : replace m_isInVideoFullscreen with m_videoFullscreenType (WebCore::HTMLMediaElement::stop) : ditto (WebCore::HTMLMediaElement::isFullscreen) : ditto (WebCore::HTMLMediaElement::enterFullscreen): add parameter to enterVideoFullscreenForVideoElement (WebCore::HTMLMediaElement::exitFullscreen): replace m_isInVideoFullscreen with m_videoFullscreenType (WebCore::HTMLMediaElement::enterFullscreenOptimized): added * html/HTMLMediaElement.h: added enterFullscreenOptimized * page/ChromeClient.h: (WebCore::ChromeClient::enterVideoFullscreenForVideoElement): added parameter * platform/ios/WebVideoFullscreenControllerAVKit.h: add parameter * platform/ios/WebVideoFullscreenControllerAVKit.mm: (-[WebVideoFullscreenController enterFullscreen:type:]): add parameter (-[WebVideoFullscreenController enterFullscreen:]): Deleted. * platform/ios/WebVideoFullscreenInterfaceAVKit.h: reorder protected to after public * platform/ios/WebVideoFullscreenInterfaceAVKit.mm: (-[WebAVPlayerController player]): this stub is now required (-[WebAVPlayerController layoutSublayersOfLayer:]): this is a better way to update video frames (WebVideoFullscreenInterfaceAVKit::setupFullscreen): implement optimized fullscreen interface (WebVideoFullscreenInterfaceAVKit::enterFullscreen): ditto (WebVideoFullscreenInterfaceAVKit::exitFullscreen): ditto (WebVideoFullscreenInterfaceAVKit::requestHideAndExitFullscreen): ditto 2014-10-28 Chris Dumez Clean up virtual functions in accessibility/ https://bugs.webkit.org/show_bug.cgi?id=138148 Reviewed by Chris Fleizach. Clean up virtual functions in accessibility/ by: - Marking classes as final when suitable - Marking virtual functions as final when suitable - Dropping final on virtual functions in classes that are already final - Make isXXX() virtual type checking functions in XXX classes to avoid useless type checks No new tests, no behavior change. * accessibility/AccessibilityARIAGrid.h: * accessibility/AccessibilityARIAGridCell.h: * accessibility/AccessibilityARIAGridRow.h: * accessibility/AccessibilityImageMapLink.h: * accessibility/AccessibilityList.h: * accessibility/AccessibilityListBox.h: * accessibility/AccessibilityListBoxOption.h: * accessibility/AccessibilityMediaControls.h: * accessibility/AccessibilityMenuList.h: * accessibility/AccessibilityMenuListOption.h: * accessibility/AccessibilityMenuListPopup.h: * accessibility/AccessibilityMockObject.h: (WebCore::AccessibilityMockObject::setParent): * accessibility/AccessibilityNodeObject.h: * accessibility/AccessibilityProgressIndicator.h: * accessibility/AccessibilityRenderObject.h: * accessibility/AccessibilitySVGRoot.h: * accessibility/AccessibilityScrollView.h: * accessibility/AccessibilityScrollbar.h: * accessibility/AccessibilitySearchFieldButtons.h: * accessibility/AccessibilitySlider.h: * accessibility/AccessibilitySpinButton.h: * accessibility/AccessibilityTable.h: * accessibility/AccessibilityTableCell.h: * accessibility/AccessibilityTableColumn.h: * accessibility/AccessibilityTableHeaderContainer.h: * accessibility/AccessibilityTableRow.h: 2014-10-24 Jeffrey Pfau FrameProgressTracker expects Page to not have detached https://bugs.webkit.org/show_bug.cgi?id=138061 Reviewed by Alexey Proskuryakov. In some cases, a Page may be detached from a Frame before its FrameLoader is torn down, causing FrameProgressTracker's destructor to hit a null pointer. No new tests; it is impossible to reliably simulate the null pointer case without intrusive code changes. * loader/FrameLoader.cpp: (WebCore::FrameLoader::FrameProgressTracker::~FrameProgressTracker): 2014-10-27 Ada Chan Introduce a new abstract class called AudioProducer and keep a set of AudioProducers rather than the active MediaSessions in Document https://bugs.webkit.org/show_bug.cgi?id=138107 Reviewed by Eric Carlson. No new tests, no behavior change. * WebCore.xcodeproj/project.pbxproj: Add AudioProducer.h to the project. * dom/Document.cpp: (WebCore::Document::addAudioProducer): (WebCore::Document::removeAudioProducer): (WebCore::Document::updateIsPlayingAudio): Go through the set of AudioProducers and see if any is playing audio. Now that this method no longer refers to MediaSessions directly, this code does not need to be guarded by #if ENABLE(VIDEO). (WebCore::Document::registerMediaSession): Deleted. (WebCore::Document::unregisterMediaSession): Deleted. * dom/Document.h: * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::registerWithDocument): (WebCore::HTMLMediaElement::unregisterWithDocument): (WebCore::HTMLMediaElement::isPlayingAudio): Return whether this element is playing audio. * html/HTMLMediaElement.h: * page/AudioProducer.h: Added. (WebCore::AudioProducer::~AudioProducer): * page/Page.cpp: (WebCore::Page::updateIsPlayingAudio): This is no longer guarded with #if ENABLE(VIDEO) since the Document methods it calls are no longer guarded. * page/Page.h: 2014-10-28 Chris Dumez Unreviewed comment fix from r175267. Fix namespace name in comment. * css/StyleBuilderCustom.h: 2014-10-28 Jer Noble REGRESSION(r171593) [Mac] Media controls create a large (and unnecessary) backing store https://bugs.webkit.org/show_bug.cgi?id=137757 Reviewed by Eric Carlson. In r171593, a
was added to the media controls which is only ever used on iOS. Instead of creating and adding this
in mediaControlsApple.js (which is used on OS X), this
should be created and added in mediaControlsiOS.js, which requires overloading Controller.addControls. * Modules/mediacontrols/mediaControlsApple.css: (audio::-webkit-media-controls-panel.hidden): Drive-by fix: allow the panel itself to be hidden. (video::-webkit-media-controls-panel-composited-parent): Deleted. * Modules/mediacontrols/mediaControlsApple.js: (Controller.prototype.createControls): Remove the composited parent. (Controller.prototype.addControls): Ditto. * Modules/mediacontrols/mediaControlsiOS.js: (ControllerIOS.prototype.createControls): Create the composited parent. (ControllerIOS.prototype.addControls): Copied from (previous) apple.js. 2014-10-28 Chris Dumez Move "Number" CSS properties to the new StyleBuilder https://bugs.webkit.org/show_bug.cgi?id=138125 Reviewed by Antti Koivisto. Move "Number" CSS properties from DeprecatedStyleBuilder to the new StyleBuilder: -webkit-hyphenate-limit-after -webkit-hyphenate-limit-before -webkit-shape-image-threshold -webkit-hyphenate-limit-lines They are now generated from CSSPropertyNames.in For -webkit-hyphenate-limit-lines, I used custom code instead of the Number converter as it required special handling for the id value. This patch thus adds support for [Custom=Value] to CSSPropertyNames.in and the custom code goes into css/StyleBuilderCustom.h. No new tests, no behavior change. * WebCore.xcodeproj/project.pbxproj: * css/CSSPropertyNames.in: * css/DeprecatedStyleBuilder.cpp: (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder): (WebCore::ApplyPropertyNumber::setValue): Deleted. (WebCore::ApplyPropertyNumber::applyValue): Deleted. (WebCore::ApplyPropertyNumber::createHandler): Deleted. * css/StyleBuilderConverter.h: (WebCore::StyleBuilderConverter::convertNumber): * css/StyleBuilderCustom.h: Added. (WebCore::StyleBuilderFunctions::applyValueWebkitHyphenateLimitLines): * css/makeprop.pl: 2014-10-28 Zan Dobersek [WebCore] Remove uses of WTF::bind() in the Media Stream module https://bugs.webkit.org/show_bug.cgi?id=138016 Reviewed by Eric Carlson. Replace uses of WTF::bind() in the Media Stream module with C++11 lambdas. Internal helper methods are removed in favor of inlining the code directly into the lambdas. Range-based for-loops are deployed where appropriate. * Modules/mediastream/MediaStreamTrack.cpp: (WebCore::MediaStreamTrack::scheduleEventDispatch): (WebCore::MediaStreamTrack::dispatchQueuedEvents): Deleted. * Modules/mediastream/MediaStreamTrack.h: * Modules/mediastream/MediaStreamTrackSourcesRequest.cpp: (WebCore::MediaStreamTrackSourcesRequest::didCompleteRequest): (WebCore::MediaStreamTrackSourcesRequest::callCompletionHandler): Deleted. * Modules/mediastream/MediaStreamTrackSourcesRequest.h: * Modules/mediastream/UserMediaRequest.cpp: (WebCore::UserMediaRequest::constraintsValidated): (WebCore::UserMediaRequest::userMediaAccessGranted): (WebCore::UserMediaRequest::didCreateStream): (WebCore::UserMediaRequest::failedToCreateStreamWithConstraintsError): (WebCore::UserMediaRequest::failedToCreateStreamWithPermissionError): (WebCore::UserMediaRequest::requestPermission): Deleted. (WebCore::UserMediaRequest::createMediaStream): Deleted. (WebCore::UserMediaRequest::callSuccessHandler): Deleted. (WebCore::UserMediaRequest::callErrorHandler): Deleted. * Modules/mediastream/UserMediaRequest.h: 2014-10-28 Pascal Jacquemart Abandoned select option is reselected when shift selecting new options https://bugs.webkit.org/show_bug.cgi?id=137553 Reviewed by Ryosuke Niwa. Previous active selection is wrongly recorded by HTMLSelectElement after selecting a new item using typeAhead. Fixed by clearing previously selected options before starting a new active selection. Test: fast/forms/listbox-selection-after-typeahead.html * html/HTMLSelectElement.cpp: (WebCore::HTMLSelectElement::selectOption): Code re-ordering 2014-10-28 Milan Crha Use constants from wtf/MathExtras.h https://bugs.webkit.org/show_bug.cgi?id=137967 Reviewed by Darin Adler. * platform/graphics/freetype/FontPlatformDataFreeType.cpp: (WebCore::rotateCairoMatrixForVerticalOrientation): * rendering/mathml/RenderMathMLMenclose.cpp: (WebCore::RenderMathMLMenclose::computePreferredLogicalWidths): (WebCore::RenderMathMLMenclose::updateLogicalHeight): * rendering/mathml/RenderMathMLOperator.cpp: (WebCore::RenderMathMLOperator::getDisplayStyleLargeOperator): 2014-10-28 David Hyatt Selection gap painting is ugly for ruby bases. https://bugs.webkit.org/show_bug.cgi?id=138136 Reviewed by Dean Jackson. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::selectionGaps): For ruby bases don't fill to the end of the block (in the block direction), since ideographic baselines push that end below the text baseline. (WebCore::RenderBlock::blockSelectionGaps): * rendering/RenderBlockFlow.cpp: Skip ruby bases for block selection gap filling. 2014-10-28 Zalan Bujtas Speed up line parsing for simple line layout. https://bugs.webkit.org/show_bug.cgi?id=137275 Reviewed by Antti Koivisto. This patch speeds up the line parsing for simple line layout by reducing the number of text measurement calls. The parsing logic hasn't changed. We simply walk over the whitespace/non-whitespace fragments and measure them to figure out whether they fit. The performance gain mainly comes from the more efficient line wrapping so that we don't re-measure the fragment when it is pushed to the next line. No change in behaviour. (except the empty line-break run removal.) * rendering/SimpleLineLayout.cpp: (WebCore::SimpleLineLayout::skipWhitespace): (WebCore::SimpleLineLayout::computeLineLeft): (WebCore::SimpleLineLayout::TextFragment::TextFragment): (WebCore::SimpleLineLayout::TextFragment::isEmpty): (WebCore::SimpleLineLayout::LineState::LineState): (WebCore::SimpleLineLayout::LineState::commitAndCreateRun): adds uncommitted text to the line and creates a run out of it. (WebCore::SimpleLineLayout::LineState::addUncommitted): appends fragment to the uncommitted text. (WebCore::SimpleLineLayout::LineState::addUncommittedWhitespace): appends whitespace to the uncommitted text. (WebCore::SimpleLineLayout::LineState::jumpTo): moves line's current position without committing text. (WebCore::SimpleLineLayout::LineState::width): current width of the line including committed and uncommitted text. (WebCore::SimpleLineLayout::LineState::fits): checks if committed + uncommitted text fits the line. (WebCore::SimpleLineLayout::LineState::removeCommittedTrailingWhitespace): (WebCore::SimpleLineLayout::removeTrailingWhitespace): post processing the trailing whitespace. (WebCore::SimpleLineLayout::initializeLine): (WebCore::SimpleLineLayout::splitFragmentToFitLine): breaks the fragments into 2 so that the first (sub)fragment fits the line. (WebCore::SimpleLineLayout::nextFragment): returns the next valid fragment of the text. (WebCore::SimpleLineLayout::createLineRuns): creates runs for the current line and returns when we can't fit more text on the line. (WebCore::SimpleLineLayout::updateLineConstrains): updates left/right constrains for the current line. (WebCore::SimpleLineLayout::createTextRuns): creates runs for the whole text. (WebCore::SimpleLineLayout::isWhitespace): Deleted. (WebCore::SimpleLineLayout::skipWhitespaces): Deleted. (WebCore::SimpleLineLayout::measureWord): Deleted. (WebCore::SimpleLineLayout::adjustRunOffsets): Deleted. * rendering/SimpleLineLayout.h: (WebCore::SimpleLineLayout::Run::Run): 2014-10-28 Alexey Proskuryakov Windows build fix. * platform/network/cf/NetworkStorageSessionCFNet.cpp: (WebCore::NetworkStorageSession::switchToNewTestingSession): Use a WTF function for getting current process ID instead of getpid(). 2014-10-28 Mihnea Ovidenie Clean up subtrees selection code https://bugs.webkit.org/show_bug.cgi?id=137740 Reviewed by David Hyatt. Clean up subtrees selection code. Add a new class SelectionSubtreeData that keeps only the selection data. Have SelectionSubtreeRoot class embed a SelectionSubtreeData member and keep the business logic methods. No functionality changed therefore no new layout tests. * rendering/RenderObject.cpp: (WebCore::RenderObject::selectionStartEnd): * rendering/RenderView.cpp: (WebCore::RenderView::subtreeSelectionBounds): (WebCore::RenderView::repaintSubtreeSelection): (WebCore::RenderView::setSelection): (WebCore::RenderView::splitSelectionBetweenSubtrees): (WebCore::RenderView::updateSelectionForSubtrees): (WebCore::RenderView::clearSubtreeSelection): (WebCore::RenderView::applySubtreeSelection): * rendering/RenderView.h: * rendering/SelectionSubtreeRoot.cpp: (WebCore::SelectionSubtreeRoot::SelectionSubtreeRoot): (WebCore::SelectionSubtreeRoot::adjustForVisibleSelection): * rendering/SelectionSubtreeRoot.h: (WebCore::SelectionSubtreeRoot::SelectionSubtreeData::SelectionSubtreeData): (WebCore::SelectionSubtreeRoot::SelectionSubtreeData::selectionStart): (WebCore::SelectionSubtreeRoot::SelectionSubtreeData::selectionStartPos): (WebCore::SelectionSubtreeRoot::SelectionSubtreeData::selectionEnd): (WebCore::SelectionSubtreeRoot::SelectionSubtreeData::selectionEndPos): (WebCore::SelectionSubtreeRoot::SelectionSubtreeData::selectionClear): (WebCore::SelectionSubtreeRoot::SelectionSubtreeData::selectionStartEndPositions): (WebCore::SelectionSubtreeRoot::SelectionSubtreeData::setSelectionStart): (WebCore::SelectionSubtreeRoot::SelectionSubtreeData::setSelectionStartPos): (WebCore::SelectionSubtreeRoot::SelectionSubtreeData::setSelectionEnd): (WebCore::SelectionSubtreeRoot::SelectionSubtreeData::setSelectionEndPos): (WebCore::SelectionSubtreeRoot::SelectionSubtreeData::clearSelection): (WebCore::SelectionSubtreeRoot::selectionData): (WebCore::SelectionSubtreeRoot::setSelectionData): (WebCore::SelectionSubtreeRoot::selectionStart): Deleted. (WebCore::SelectionSubtreeRoot::selectionStartPos): Deleted. (WebCore::SelectionSubtreeRoot::selectionEnd): Deleted. (WebCore::SelectionSubtreeRoot::selectionEndPos): Deleted. (WebCore::SelectionSubtreeRoot::selectionStartEndPositions): Deleted. (WebCore::SelectionSubtreeRoot::selectionClear): Deleted. (WebCore::SelectionSubtreeRoot::setSelectionStart): Deleted. (WebCore::SelectionSubtreeRoot::setSelectionStartPos): Deleted. (WebCore::SelectionSubtreeRoot::setSelectionEnd): Deleted. (WebCore::SelectionSubtreeRoot::setSelectionEndPos): Deleted. 2014-10-28 Jer Noble [Mac] The first software paint of a