2014-08-31 Tim Horton Remove duplicate implementation of drawEllipse and some related PLATFORM(IOS) ifdefs https://bugs.webkit.org/show_bug.cgi?id=136413 Reviewed by Dan Bernstein. No new tests, just cleanup. * platform/graphics/GraphicsContext.cpp: (WebCore::GraphicsContext::drawRaisedEllipse): There's nothing iOS specific about this function. * platform/graphics/GraphicsContext.h: * platform/graphics/cairo/GraphicsContextCairo.cpp: (WebCore::GraphicsContext::drawEllipse): * platform/graphics/cg/GraphicsContextCG.cpp: (WebCore::GraphicsContext::drawEllipse): Un-ifdef drawRaisedEllipse; delete the reimplementation of drawEllipse that takes a FloatRect and make the normal one take a FloatRect instead. (WebCore::GraphicsContext::platformInit): Make sure that the CGContext's line width starts out in sync with GraphicsContext's. By default, CGContext has a line width of 1 and GraphicsContext 0, so they could previously have been out of sync until someone set the width explicitly. 2014-08-31 Tim Horton Fix a harmless mismerge in BitmapImage::destroyDecodedDataIfNecessary https://bugs.webkit.org/show_bug.cgi?id=136412 Reviewed by Alexey Proskuryakov. No new tests, just cleanup. * platform/graphics/BitmapImage.cpp: (WebCore::BitmapImage::destroyDecodedDataIfNecessary): Drop the leading 'c' and the 'static' on the cutoff parameter. Remove the duplicated early return (seems like it happened in the merge). Remove reference to the exact size in the comment, since it's different on iOS. 2014-08-31 Tim Horton Use SinkDocument instead of PDFDocument; get rid of PDFDocument https://bugs.webkit.org/show_bug.cgi?id=136414 Reviewed by Alexey Proskuryakov. * WebCore.xcodeproj/project.pbxproj: * loader/DocumentWriter.cpp: (WebCore::DocumentWriter::createDocument): * pdf/ios/PDFDocument.cpp: Removed. * pdf/ios/PDFDocument.h: Removed. Use the generic SinkDocument, which ignores all incoming data just like PDFDocument. Delete the unnecessary and iOS-specific PDFDocument.cpp/h 2014-08-31 Tim Horton Adjust an antique comment in Image::drawPattern https://bugs.webkit.org/show_bug.cgi?id=136411 Reviewed by Dan Bernstein. * platform/graphics/cg/ImageCG.cpp: (WebCore::Image::drawPattern): Reword the comment. 2014-08-31 Tim Horton SVGImage::drawPatternForContainer creates a buffer without respecting the destination's acceleration setting https://bugs.webkit.org/show_bug.cgi?id=136408 Reviewed by Dan Bernstein. No new tests required, just a performance improvement. * svg/graphics/SVGImage.cpp: (WebCore::SVGImage::drawPatternForContainer): Use ImageBuffer::createCompatibleBuffer, which passes the destination's acceleration setting through to the ImageBuffer constructor. I didn't use GraphicsContext::createCompatibleBuffer because adjusting how this function applies the destination's CTM is outside the scope of this patch. 2014-08-30 Joseph Pecoraro Convert string literals to character literals in makeString usage https://bugs.webkit.org/show_bug.cgi?id=136394 Reviewed by Sam Weinig. * inspector/InspectorOverlay.cpp: (WebCore::InspectorOverlay::evaluateInOverlay): * loader/FrameLoader.cpp: (WebCore::FrameLoader::setOriginalURLForDownloadRequest): * loader/MixedContentChecker.cpp: (WebCore::MixedContentChecker::logWarning): * page/ContentSecurityPolicy.cpp: (WebCore::CSPDirectiveList::checkMediaTypeAndReportViolation): (WebCore::ContentSecurityPolicy::reportUnsupportedDirective): (WebCore::ContentSecurityPolicy::reportInvalidPathCharacter): Also reorder some code to ensure single string creation. 2014-08-26 Maciej Stachowiak Use RetainPtr::autorelease in some places where it seems appropriate https://bugs.webkit.org/show_bug.cgi?id=136280 Reviewed by Darin Adler. * platform/mac/URLMac.mm: (WebCore::URL::operator NSURL *): Use autorelease() instead of CFBridgingRelease(leakRef()) 2014-08-30 Yusuke Suzuki CSS: Refactor :visited handling in SelectorChecker https://bugs.webkit.org/show_bug.cgi?id=135639 Reviewed by Benjamin Poulain. :visited is specially handled in the SelectorChecker and style resolution because of security issues. That is nested links and adjacent combinators. Since we propagate linkState from the ancestors, 1. linkStates of ancestors from the target node are only used to calculate the linkState of the current node. This is why adjacent combinators disable :visited. 2. linkState is overrides by the closest link element in the ancestors. This is why :visited is effective on the closest link element. In this patch, we fix 3 things. 1. Simplify SelectorChecker. Move m_mode to CheckingContext and it makes CheckingContext more similar to SelectorCompiler::CheckingContext in CSS JIT. And hide visitedMatchType parameter from the caller of SelectorChecker. 2. Disable :visited inside :-webkit-any. Currently, :-webkit-any provides MatchAll link match type. So considering visited match type in the matching phase of :visited provides inconsistency. In this patch, :-webkit-any(:visited) never matches. And :-webkit-any(:link) acts like a :-webkit-any(:any-link). This behavior represents that visited match type is always considered as disabled inside :-webkit-any. This behavior may be changed when Selector Level4 is implemented. 3. Fix the issue when traversing the descendant element, first encountered link check is missing. Tests: fast/history/link-inside-any.html fast/history/link-inside-not.html fast/history/nested-visited-test-override.html fast/history/visited-inside-any.html fast/history/visited-inside-not.html * css/ElementRuleCollector.cpp: (WebCore::ElementRuleCollector::ruleMatches): * css/SelectorChecker.cpp: (WebCore::SelectorChecker::SelectorChecker): (WebCore::SelectorChecker::match): (WebCore::hasScrollbarPseudoElement): (WebCore::checkingContextForParent): (WebCore::SelectorChecker::matchRecursively): (WebCore::SelectorChecker::checkOne): * css/SelectorChecker.h: (WebCore::SelectorChecker::SelectorCheckingContext::SelectorCheckingContext): * css/StyleResolver.h: (WebCore::checkRegionSelector): * dom/SelectorQuery.cpp: (WebCore::SelectorDataList::selectorMatches): 2014-08-29 Zalan Bujtas Subpixel layout: Remove LayoutUnit's kEffectiveFixedPointDenominator. https://bugs.webkit.org/show_bug.cgi?id=136383. Reviewed by Simon Fraser. There's only one subpixel denominator now. No change in functionality. * platform/LayoutUnit.h: (WebCore::LayoutUnit::LayoutUnit): (WebCore::LayoutUnit::fromFloatCeil): (WebCore::LayoutUnit::fromFloatFloor): (WebCore::LayoutUnit::toInt): (WebCore::LayoutUnit::toFloat): (WebCore::LayoutUnit::toDouble): (WebCore::LayoutUnit::operator++): (WebCore::LayoutUnit::ceil): (WebCore::LayoutUnit::round): (WebCore::LayoutUnit::floor): (WebCore::LayoutUnit::ceilToFloat): (WebCore::LayoutUnit::fraction): (WebCore::LayoutUnit::epsilon): (WebCore::LayoutUnit::nearlyMax): (WebCore::LayoutUnit::nearlyMin): (WebCore::LayoutUnit::isInBounds): (WebCore::LayoutUnit::setValue): (WebCore::boundedMultiply): (WebCore::operator*): (WebCore::operator/): (WebCore::operator%): (WebCore::roundToDevicePixel): (WebCore::floorToDevicePixel): (WebCore::ceilToDevicePixel): 2014-08-29 Zalan Bujtas Rename updatePreferredWidth to make it more explicit. https://bugs.webkit.org/show_bug.cgi?id=136389 Reviewed by Simon Fraser. No change in functionality. * rendering/RenderBlock.cpp: (WebCore::preferredWidth): (WebCore::RenderBlock::computeInlinePreferredLogicalWidths): (WebCore::updatePreferredWidth): Deleted. 2014-08-29 Gavin Barraclough Make timerNestingLevel threadsafe https://bugs.webkit.org/show_bug.cgi?id=136401 Reviewed by Tim Horton. timerNestingLevel, used by DOMTimer to determine whether a timer is 'nested' (repeating, possible due to a timer rescheduling itself) is a global. Since worker threads can set timers too this is not thread safe. * dom/ScriptExecutionContext.cpp: (WebCore::ScriptExecutionContext::ScriptExecutionContext): - added initialize m_timerNestingLevel * dom/ScriptExecutionContext.h: (WebCore::ScriptExecutionContext::timerNestingLevel): (WebCore::ScriptExecutionContext::setTimerNestingLevel): - added accessors * page/DOMTimer.cpp: (WebCore::DOMTimer::DOMTimer): (WebCore::DOMTimer::fired): - move timerNestingLevel to the context 2014-08-29 Gavin Barraclough DOMTimer::m_nestingLevel is prone to overflow https://bugs.webkit.org/show_bug.cgi?id=136399 Reviewed by Alexey Proskuryakov. Since this would happen after the 2 billionth timer fire this is unlikely, and consequences aren't severe (breaks throttling). This change has the following consequences. - m_nestingLevel saturates to its max value. - unnested timers are indicated by a nesting level of 0. - repeat timers update m_nestingLevel on every fire, not just those that should have been throttled. The last point is subtle, but ultimately should be inconsequential. Timers whose requested timeout is less that the minimum interval will saturate quickly anyway; timers with an original interval greater than the minimum previously wouldn't have incremented m_nestingLevel, but doing so now doesn't hurt since they won't be throttled when they hit the threshold. This simplifies things conceptually a little & reduces the test performed on each timer fire. * page/DOMTimer.cpp: (WebCore::shouldForwardUserGesture): - unnested timers are indicated by a nesting level of 0 (WebCore::DOMTimer::DOMTimer): - don't increment nesting level on construction (WebCore::DOMTimer::fired): - saturating increments (WebCore::DOMTimer::adjustMinimumTimerInterval): (WebCore::DOMTimer::intervalClampedToMinimum): - added ASSERTs 2014-08-29 Zalan Bujtas Improve showRenderTree() output. https://bugs.webkit.org/show_bug.cgi?id=136244 Reviewed by Darin Adler. Add more debugging information to showRenderTree(). Not testable. * rendering/InlineBox.cpp: (WebCore::InlineBox::showLineTreeForThis): (WebCore::InlineBox::showLineTreeAndMark): (WebCore::InlineBox::showLineBox): (showNodeTree): (showLineTree): (WebCore::InlineBox::showBox): Deleted. * rendering/InlineBox.h: * rendering/InlineFlowBox.cpp: (WebCore::InlineFlowBox::showLineTreeAndMark): * rendering/InlineFlowBox.h: * rendering/InlineTextBox.cpp: (WebCore::InlineTextBox::showLineBox): (WebCore::InlineTextBox::showBox): Deleted. * rendering/InlineTextBox.h: * rendering/RenderBlock.cpp: (WebCore::RenderBlock::showLineTreeAndMark): Deleted. * rendering/RenderBlock.h: * rendering/RenderBlockFlow.cpp: (WebCore::RenderBlockFlow::showLineTreeAndMark): * rendering/RenderBlockFlow.h: * rendering/RenderObject.cpp: (WebCore::showRenderTreeLegend): (WebCore::RenderObject::showNodeTreeForThis): (WebCore::RenderObject::showRenderTreeForThis): (WebCore::RenderObject::showLineTreeForThis): (WebCore::RenderObject::showRegionsInformation): (WebCore::RenderObject::showRenderObject): (WebCore::RenderObject::showRenderSubTreeAndMark): (showNodeTree): (showLineTree): (showRenderTree): (WebCore::RenderObject::showRenderTreeAndMark): Deleted. * rendering/RenderObject.h: * rendering/RootInlineBox.h: 2014-08-29 Csaba Osztrogonác Unreviwed, remove empty directories. * Modules/networkinfo: Removed. * inspector/front-end: Removed. * inspector/front-end/Images: Removed. * inspector/front-end/UglifyJS: Removed. * inspector/front-end/ace: Removed. * inspector/front-end/cm: Removed. * platform/audio/ffmpeg: Removed. * platform/audio/ipp: Removed. * platform/graphics/gpu/opencl: Removed. 2014-08-29 Eva Balazsfalvi [EFL] Remove non Coordinated Graphics code path from cmake build system after r142169 https://bugs.webkit.org/show_bug.cgi?id=135560 Reviewed by Gyuyoung Kim. No new tests required, no new functionality. * PlatformEfl.cmake: Removed TEXTURE_MAPPER and 3D_GRAPHICS guards. * platform/graphics/efl/GraphicsContext3DEfl.cpp: Removed TEXTURE_MAPPER_GL and GRAPHICS_SURFACE guards. (WebCore::GraphicsContext3D::platformLayer): (WebCore::GraphicsContext3D::createGraphicsSurfaces): * platform/graphics/efl/GraphicsContext3DPrivate.cpp: Removed TEXTURE_MAPPER_GL and GRAPHICS_SURFACE guards. (WebCore::GraphicsContext3DPrivate::initialize): (WebCore::GraphicsContext3DPrivate::releaseResources): (WebCore::GraphicsContext3DPrivate::paintToTextureMapper): (WebCore::GraphicsContext3DPrivate::graphicsSurfaceFlags): * platform/graphics/efl/GraphicsContext3DPrivate.h: Removed TEXTURE_MAPPER_GL and GRAPHICS_SURFACE guards. * platform/graphics/surfaces/efl/GraphicsSurfaceCommon.cpp: Removed GRAPHICS_SURFACE guard. 2014-08-29 Carlos Garcia Campos RenderThemeGtk depends on classes outside of platform https://bugs.webkit.org/show_bug.cgi?id=22176 Reviewed by Martin Robinson. Move RenderThemeGtk.cpp from platform to rendering. * PlatformGTK.cmake: * rendering/RenderThemeGtk.cpp: Renamed from Source/WebCore/platform/gtk/RenderThemeGtk.cpp. 2014-08-29 Carlos Garcia Campos [GTK] ScrollbarThemeGtk should not depend on RenderThemeGtk https://bugs.webkit.org/show_bug.cgi?id=136338 Reviewed by Philippe Normand. Remove the dependency by creating the GtkStyleContext for the scrollbars in ScrollbarThemeGtk. * platform/gtk/RenderThemeGtk.cpp: (WebCore::gtkStyleChangedCallback): Call ScrollbarThemeGtk::themeChanged(). (WebCore::getStyleContext): Remove the scrollbar style context support. * platform/gtk/RenderThemeGtk.h: Remove gtkScrollbarStyle(). * platform/gtk/ScrollbarThemeGtk.cpp: (WebCore::ScrollbarStyleContext::ScrollbarStyleContext): Helper class to create the global GtkStyleContext for scrollbars. (WebCore::ScrollbarStyleContext::~ScrollbarStyleContext): (WebCore::ScrollbarStyleContext::context): (WebCore::gtkScrollbarStyleContext): (WebCore::ScrollbarThemeGtk::ScrollbarThemeGtk): Remove m_context initialization. (WebCore::ScrollbarThemeGtk::themeChanged): Invalidate the GtkStylecontext and call updateThemeProperties(). (WebCore::ScrollbarThemeGtk::updateThemeProperties): Use the global style context. (WebCore::ScrollbarThemeGtk::paintTrackBackground): Ditto. (WebCore::ScrollbarThemeGtk::paintScrollbarBackground): Ditto. (WebCore::ScrollbarThemeGtk::paintThumb): Ditto. (WebCore::ScrollbarThemeGtk::paintButton): Ditto. * platform/gtk/ScrollbarThemeGtk.h: 2014-08-28 Carlos Garcia Campos [GTK] Merge RenderThemeGtk3.cpp into RenderThemeGtk.cpp and ScrollbarThemeGtk3.cpp intoScrollbarThemeGtk.cpp https://bugs.webkit.org/show_bug.cgi?id=136336 Reviewed by Philippe Normand. There's no reason to have two files now that there's no GTK+2 support. Also fix coding style issues and compile warnings. * PlatformGTK.cmake: * platform/gtk/RenderThemeGtk.cpp: * platform/gtk/RenderThemeGtk.h: * platform/gtk/RenderThemeGtk3.cpp: Removed. * platform/gtk/ScrollbarThemeGtk.cpp: * platform/gtk/ScrollbarThemeGtk3.cpp: Removed. 2014-08-28 Mark Lam DebuggerCallFrame::scope() should return a DebuggerScope. Reviewed by Geoffrey Garen. No new tests. Rolling back in r170680 with the fix for . * bindings/js/ScriptController.cpp: (WebCore::ScriptController::attachDebugger): - We should acquire the JSLock before modifying a JS global object. 2014-08-28 Enrica Casucci Can't hit tab key more than 3 times continuously. https://bugs.webkit.org/show_bug.cgi?id=136357 rdar://problem/17927266 Reviewed by Dean Jackson. Test: fast/css/multiple-tabs.html When computing the tabWidth disregard increments of less than half the size of the space character for the given font. * platform/graphics/Font.h: (WebCore::Font::tabWidth): 2014-08-28 Daniel Bates [iOS] Clients that include WebCoreThread.h fail to build after (https://bugs.webkit.org/show_bug.cgi?id=136108) Define WEBCORE_EXPORT (if its not already defined) in WebCoreThread.h so as to fix the build for clients that include this header. * platform/ios/wak/WebCoreThread.h: 2014-08-28 Pratik Solanki WebContent hangs under SharedBuffer::duplicateDataBufferIfNecessary() while browsing some websites https://bugs.webkit.org/show_bug.cgi?id=136347 Reviewed by Andreas Kling. When passing data to ImageIO, we create a copy if we have to reallocate the buffer. We would set the size of the new buffer to be the size of the SharedBuffer data. This causes memory churn since we would create a new buffer for every data chunk we get. Fix this by at least doubling the capacity of the buffer when we duplicate it. * platform/SharedBuffer.cpp: (WebCore::SharedBuffer::duplicateDataBufferIfNecessary): 2014-08-28 Dan Bernstein iOS build fix. * WebCore.exp.in: Updated symbol. 2014-08-28 Benjamin Poulain Scrolling with spacebar on a page with fixed header breaks reading flow https://bugs.webkit.org/show_bug.cgi?id=135506 Reviewed by Simon Fraser. When scrolling by page, find the height of any bar that is obscuring the top or bottom of the page, and substract that height from the step to scroll. Tests: scrollbars/scrolling-backward-by-page-accounting-bottom-fixed-elements-on-keyboard-spacebar.html scrollbars/scrolling-backward-by-page-on-keyboard-spacebar.html scrollbars/scrolling-by-page-accounting-oversized-fixed-elements-on-keyboard-spacebar.html scrollbars/scrolling-by-page-accounting-top-fixed-elements-on-keyboard-spacebar.html scrollbars/scrolling-by-page-accounting-top-fixed-elements-with-negative-top-on-keyboard-spacebar.html scrollbars/scrolling-by-page-ignoring-hidden-fixed-elements-on-keyboard-spacebar.html scrollbars/scrolling-by-page-ignoring-transparent-fixed-elements-on-keyboard-spacebar.html scrollbars/scrolling-by-page-on-keyboard-spacebar.html * WebCore.exp.in: * page/FrameView.cpp: (WebCore::FrameView::adjustScrollStepForFixedContent): * page/FrameView.h: * platform/ScrollableArea.cpp: (WebCore::ScrollableArea::adjustScrollStepForFixedContent): (WebCore::ScrollableArea::scroll): * platform/ScrollableArea.h: 2014-08-28 Zalan Bujtas Subpixel layout: Remove unused pixel snapping functions. https://bugs.webkit.org/show_bug.cgi?id=136341 Reviewed by Simon Fraser. Let's not encourage integral snapping by having these functions around. No change in functionality. * accessibility/AccessibilityObject.h: (WebCore::AccessibilityObject::pixelSnappedElementRect): Deleted. (WebCore::AccessibilityObject::pixelSnappedSize): Deleted. * accessibility/mac/WebAccessibilityObjectWrapperMac.mm: (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]): * html/HTMLImageElement.cpp: (WebCore::HTMLImageElement::width): (WebCore::HTMLImageElement::height): * page/FrameView.cpp: (WebCore::FrameView::qualifiesAsVisuallyNonEmpty): * platform/graphics/LayoutPoint.h: (WebCore::snappedIntSize): (WebCore::snapSizeToDevicePixel): * platform/graphics/LayoutRect.h: (WebCore::LayoutRect::pixelSnappedLocation): Deleted. (WebCore::LayoutRect::pixelSnappedX): Deleted. (WebCore::LayoutRect::pixelSnappedY): Deleted. (WebCore::LayoutRect::pixelSnappedWidth): Deleted. (WebCore::LayoutRect::pixelSnappedHeight): Deleted. (WebCore::LayoutRect::pixelSnappedMaxX): Deleted. (WebCore::LayoutRect::pixelSnappedMaxY): Deleted. (WebCore::snappedIntRectFromEdges): Deleted. * rendering/RenderBlockFlow.h: (WebCore::RenderBlockFlow::pixelSnappedLogicalTopForFloat): Deleted. (WebCore::RenderBlockFlow::pixelSnappedLogicalBottomForFloat): Deleted. (WebCore::RenderBlockFlow::pixelSnappedLogicalLeftForFloat): Deleted. (WebCore::RenderBlockFlow::pixelSnappedLogicalRightForFloat): Deleted. * rendering/RenderBox.h: (WebCore::RenderBox::pixelSnappedLogicalHeight): (WebCore::RenderBox::pixelSnappedLogicalWidth): (WebCore::RenderBox::pixelSnappedBorderBoxRect): (WebCore::RenderBox::pixelSnappedWidth): Deleted. (WebCore::RenderBox::pixelSnappedHeight): Deleted. (WebCore::RenderBox::pixelSnappedFrameRect): Deleted. * rendering/RenderFileUploadControl.cpp: (WebCore::nodeWidth): (WebCore::nodeHeight): (WebCore::RenderFileUploadControl::maxFilenameWidth): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::updateLayerPosition): (WebCore::RenderLayer::isPointInResizeControl): * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::ensureRootLayer): * rendering/RenderMediaControls.cpp: (WebCore::RenderMediaControls::volumeSliderOffsetFromMuteButton): * rendering/RenderMultiColumnSet.cpp: (WebCore::RenderMultiColumnSet::paintColumnRules): * rendering/RenderScrollbar.cpp: (WebCore::RenderScrollbar::buttonRect): * rendering/RenderView.h: 2014-08-27 Enrica Casucci textStylingAtPosition returns incorrect values after executing toggleBold, toggleItalic and toggleUnderline. https://bugs.webkit.org/show_bug.cgi?id=136323 rdar://problem/18141964 Reviewed by Antti Koivisto. For underline style we need to check typingStyle first and use that information to populate the dictionary. If there is no typing style we can use the render style. * WebCore.exp.in: * editing/ios/EditorIOS.mm: (WebCore::Editor::fontAttributesForSelectionStart): 2014-08-28 Iago Toral and Zan Dobersek [GTK] Add WaylandEventSource https://bugs.webkit.org/show_bug.cgi?id=136213 Reviewed by Martin Robinson. Add the WaylandEventSource class. Its static method, createEventSource(), creates a new GSource object that is attached to the main context and enables handling Wayland display events through the GLib's main loop. The method will be called by the nested Wayland compositor during its initialization, which will also take the control over the ownership and will be tasked with properly removing the GSource from the main context. GLibSource is a GSource-based struct that additionally holds a GPollFD object and the pointer to the wl_display object whose event loop we'll be dispatching during the GSource dispatch. This is the type that g_source_new uses when allocating the new GSource object. The GSource is assigned the default priorty, can recurse, and is attached to the main context. * PlatformGTK.cmake: * platform/graphics/wayland/WaylandEventSource.cpp: Added. (WebCore::GLibSource::initialize): (WebCore::GLibSource::check): (WebCore::GLibSource::dispatch): (WebCore::prepareCallback): (WebCore::checkCallback): (WebCore::dispatchCallback): (WebCore::WaylandEventSource::createDisplayEventSource): * platform/graphics/wayland/WaylandEventSource.h: Added. 2014-08-28 Chris Fleizach AX: Safari at com.apple.WebCore: WebCore::AXObjectCache::clearTextMarkerNodesInUse https://bugs.webkit.org/show_bug.cgi?id=136333 Reviewed by David Kilzer. If a Node is asked for it's Document when it's not actually in a document, it can lead to an assert/crash. We can avoid this by checking that the node is in a document before asking for its document. I was not able to make a test case. * accessibility/AXObjectCache.cpp: (WebCore::AXObjectCache::clearTextMarkerNodesInUse): 2014-08-28 Andreas Kling ASSERTION FAILED: !m_renderView.document().inPageCache() in compositing/iframes/resources/page-cache-helper.html Cancel any pending compositing layer updates when moving a document into the page cache. Reviewed by Zalan Bujtas. * dom/Document.cpp: (WebCore::Document::documentWillSuspendForPageCache): * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::cancelCompositingLayerUpdate): * rendering/RenderLayerCompositor.h: 2014-08-28 Mihnea Ovidenie [CSSRegions] Incorrect selection clearing on a document without regions https://bugs.webkit.org/show_bug.cgi?id=134901 Reviewed by David Hyatt. When we select all the content of document with named flows but without regions, the start and end points of selection is cached in RenderView. However, since the document has named flows, the selection is split between the subtrees. During the split, it is possible that the cached end-points of the original selection are not included in any of the resulting subtree selection and they are not marked accordingly. In order to process the selection clearing correctly, we have to take the original selection end-points into account. Test: fast/regions/selection/select-all-without-regions.html * rendering/RenderObject.cpp: (WebCore::RenderObject::isSelectionBorder): 2014-08-28 Carlos Garcia Campos [GTK] Add webkit_uri_response_get_http_headers to WebKit2 GTK+ API https://bugs.webkit.org/show_bug.cgi?id=136248 Reviewed by Gustavo Noronha Silva. Move the code to update the SoupMessageHeaders to a new public method. * platform/network/soup/ResourceResponse.h: * platform/network/soup/ResourceResponseSoup.cpp: (WebCore::ResourceResponse::updateSoupMessageHeaders): (WebCore::ResourceResponse::toSoupMessage): 2014-08-28 Carlos Garcia Campos [GTK] Remove support for GTK+2 theme rendering https://bugs.webkit.org/show_bug.cgi?id=136285 Reviewed by Philippe Normand. GTK+2 is only used by the plugin process that doesn't need to render html controls themed. Since the theme files are still built for WebCorePlatformGTK2, we need to provide dummy implementations for the pure virtual methods when GTK_API_VERSION_2 is defined. * PlatformGTK.cmake: Remove deleted files from compilation. * platform/gtk/RenderThemeGtk.cpp: (WebCore::RenderThemeGtk::create): (WebCore::RenderTheme::themeForPage): (WebCore::getScreenDPI): (WebCore::RenderThemeGtk::systemFont): (WebCore::RenderThemeGtk::sliderTickSize): (WebCore::RenderThemeGtk::sliderTickOffsetFromTrackCenter): (WebCore::RenderThemeGtk::getScreenDPI): Deleted. * platform/gtk/RenderThemeGtk.h: * platform/gtk/RenderThemeGtk2.cpp: Removed. * platform/gtk/RenderThemeGtk3.cpp: * platform/gtk/ScrollbarThemeGtk.cpp: (WebCore::ScrollbarThemeGtk::hasThumb): (WebCore::ScrollbarThemeGtk::backButtonRect): (WebCore::ScrollbarThemeGtk::forwardButtonRect): (WebCore::ScrollbarThemeGtk::trackRect): (WebCore::ScrollbarThemeGtk::registerScrollbar): (WebCore::ScrollbarThemeGtk::unregisterScrollbar): (WebCore::ScrollbarThemeGtk::updateScrollbarsFrameThickness): * platform/gtk/ScrollbarThemeGtk.h: * platform/gtk/ScrollbarThemeGtk2.cpp: Removed. * platform/gtk/WidgetRenderingContext.cpp: Removed. * platform/gtk/WidgetRenderingContext.h: Removed. 2014-08-28 Zan Dobersek Unreviewed GTK build fix for the Wayland windowing target after r173052. * platform/graphics/wayland/WaylandSurface.cpp: Include the IntSize header. * platform/graphics/wayland/WaylandSurface.h: Forward-declare IntSize. 2014-08-27 Csaba Osztrogonác One more URTBF after r173047. * accessibility/atk/WebKitAccessibleInterfaceComponent.cpp: (webkitAccessibleComponentGetExtents): 2014-08-27 Iago Toral and Zan Dobersek [GTK] Add WaylandSurface https://bugs.webkit.org/show_bug.cgi?id=136220 Reviewed by Martin Robinson. Add the WaylandSurface class. An objects of this type is meant to be used by the LayerTreeHostGtk in the WebProcess and is constructed via the WaylandDisplay::createSurface() method. LayerTreeHostGtk uses such object to perform frame requests to the nested Wayland compositor in the UIProcess, and to create the GLContextEGL object that's used during the layer flushing and compositing. The resize() method is called whenever LayerTreeHostGtk is being resized, and basically only wraps the wl_egL_window_resize() call. * PlatformGTK.cmake: * platform/graphics/wayland/WaylandSurface.cpp: Added. (WebCore::frameCallback): (WebCore::WaylandSurface::WaylandSurface): (WebCore::WaylandSurface::~WaylandSurface): (WebCore::WaylandSurface::resize): (WebCore::WaylandSurface::createGLContext): (WebCore::WaylandSurface::requestFrame): * platform/graphics/wayland/WaylandSurface.h: Added. (WebCore::WaylandSurface::surface): (WebCore::WaylandSurface::nativeWindowHandle): 2014-08-27 Csaba Osztrogonác URTBF after r173047. * accessibility/atk/WebKitAccessibleInterfaceImage.cpp: (webkitAccessibleImageGetImagePosition): 2014-08-27 Zalan Bujtas Subpixel layout: Cleanup snapSizeToPixel/snapSizeToDevicePixel. https://bugs.webkit.org/show_bug.cgi?id=136264 Reviewed by Simon Fraser. 1. Align snapSizeToPixel()/snapSizeToDevicePixel() function names with the rest of snapping functions. ->snappedIntSize()/snapSizeToDevicePixel(). 2. Operate on LayoutSize/LayoutPoint instead of LayoutUnit/LayoutUnit to reflect functionality. Covered by existing tests. * platform/LayoutUnit.h: (WebCore::snapSizeToPixel): Deleted. (WebCore::snapSizeToDevicePixel): Deleted. * platform/graphics/LayoutPoint.h: (WebCore::snappedIntSize): (WebCore::snapSizeToDevicePixel): (WebCore::pixelSnappedIntSize): Deleted. * platform/graphics/LayoutRect.h: (WebCore::LayoutRect::pixelSnappedSize): (WebCore::LayoutRect::pixelSnappedWidth): (WebCore::LayoutRect::pixelSnappedHeight): (WebCore::pixelSnappedIntRect): (WebCore::pixelSnappedIntRectFromEdges): (WebCore::pixelSnappedForPainting): (WebCore::directionalPixelSnappedForPainting): * rendering/RenderBox.cpp: (WebCore::RenderBox::pixelSnappedClientWidth): (WebCore::RenderBox::pixelSnappedClientHeight): (WebCore::RenderBox::pixelSnappedOffsetWidth): (WebCore::RenderBox::pixelSnappedOffsetHeight): (WebCore::RenderBox::scrollWidth): (WebCore::RenderBox::scrollHeight): * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::pixelSnappedOffsetWidth): (WebCore::RenderBoxModelObject::pixelSnappedOffsetHeight): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::updateLayerPosition): (WebCore::RenderLayer::scrollWidth): (WebCore::RenderLayer::scrollHeight): * rendering/RenderTreeAsText.cpp: (WebCore::writeLayers): 2014-08-27 Zalan Bujtas Subpixel layout: Rename LayoutRect's device pixel snapping functions. https://bugs.webkit.org/show_bug.cgi?id=136319 Reviewed by Simon Fraser. From pixelSnappedForPainting() to snapRectToDevicePixels() and pixelSnappedIntRect*() to snappedIntRect*(). No change in functionality. * accessibility/AccessibilityObject.cpp: (WebCore::AccessibilityObject::boundingBoxForQuads): (WebCore::AccessibilityObject::isOnscreen): (WebCore::AccessibilityObject::scrollToMakeVisible): * accessibility/AccessibilityObject.h: (WebCore::AccessibilityObject::pixelSnappedBoundingBoxRect): (WebCore::AccessibilityObject::pixelSnappedElementRect): * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::isOffScreen): (WebCore::AccessibilityRenderObject::boundsForVisiblePositionRange): * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm: (-[WebAccessibilityObjectWrapper accessibilityActivationPoint]): (-[WebAccessibilityObjectWrapper accessibilityFrame]): * accessibility/mac/WebAccessibilityObjectWrapperMac.mm: (-[WebAccessibilityObjectWrapper position]): (-[WebAccessibilityObjectWrapper accessibilityShowContextMenu]): * bindings/objc/DOMUIKitExtensions.mm: (-[DOMHTMLAreaElement boundingBoxWithOwner:]): (-[DOMHTMLAreaElement absoluteQuadWithOwner:]): * css/CSSComputedStyleDeclaration.cpp: (WebCore::computedTransform): * dom/Node.h: (WebCore::Node::pixelSnappedBoundingBox): (WebCore::Node::pixelSnappedRenderRect): * editing/RenderedPosition.cpp: (WebCore::RenderedPosition::absoluteRect): * editing/mac/FrameSelectionMac.mm: (WebCore::FrameSelection::notifyAccessibilityForSelectionChange): * html/HTMLCanvasElement.cpp: (WebCore::HTMLCanvasElement::paint): * inspector/InspectorOverlay.cpp: (WebCore::buildObjectForElementInfo): * inspector/InspectorPageAgent.cpp: (WebCore::InspectorPageAgent::didPaint): * page/FrameSnapshotting.cpp: (WebCore::snapshotNode): * page/FrameView.cpp: (WebCore::FrameView::scrollContentsFastPath): (WebCore::FrameView::extendedBackgroundRectForPainting): (WebCore::FrameView::windowClipRectForFrameOwner): (WebCore::FrameView::convertFromRendererToContainingView): * page/Page.cpp: (WebCore::Page::addRelevantRepaintedObject): (WebCore::Page::addRelevantUnpaintedObject): * page/ios/FrameIOS.mm: (WebCore::ancestorRespondingToClickEvents): * platform/DragImage.cpp: (WebCore::createDragImageForImage): * platform/graphics/LayoutRect.cpp: (WebCore::enclosingRectToDevicePixels): (WebCore::enclosingRectForPainting): Deleted. * platform/graphics/LayoutRect.h: (WebCore::snappedIntRect): (WebCore::snappedIntRectFromEdges): (WebCore::snapRectToDevicePixels): (WebCore::snapRectToDevicePixelsWithWritingDirection): (WebCore::pixelSnappedIntRect): Deleted. (WebCore::pixelSnappedIntRectFromEdges): Deleted. (WebCore::pixelSnappedForPainting): Deleted. (WebCore::directionalPixelSnappedForPainting): Deleted. * platform/graphics/RoundedRect.cpp: (WebCore::RoundedRect::pixelSnappedRoundedRectForPainting): * platform/graphics/ca/GraphicsLayerCA.cpp: (WebCore::GraphicsLayerCA::computePixelAlignment): * platform/text/TextStream.cpp: (WebCore::TextStream::operator<<): * rendering/EllipsisBox.cpp: (WebCore::EllipsisBox::paintSelection): * rendering/FilterEffectRenderer.cpp: (WebCore::FilterEffectRendererHelper::applyFilterEffect): * rendering/InlineFlowBox.cpp: (WebCore::InlineFlowBox::paint): * rendering/InlineTextBox.cpp: (WebCore::InlineTextBox::paintSelection): (WebCore::InlineTextBox::paintCompositionBackground): (WebCore::InlineTextBox::paintTextMatchMarker): (WebCore::InlineTextBox::positionForOffset): * rendering/RenderBlock.cpp: (WebCore::RenderBlock::addVisualOverflowFromTheme): (WebCore::RenderBlock::paint): (WebCore::RenderBlock::blockSelectionGap): (WebCore::RenderBlock::logicalLeftSelectionGap): (WebCore::RenderBlock::logicalRightSelectionGap): (WebCore::RenderBlock::absoluteRects): (WebCore::RenderBlock::addFocusRingRects): * rendering/RenderBlockFlow.cpp: (WebCore::RenderBlockFlow::clipOutFloatingObjects): (WebCore::RenderBlockFlow::addFocusRingRectsForInlineChildren): * rendering/RenderBox.cpp: (WebCore::RenderBox::absoluteRects): (WebCore::RenderBox::absoluteContentBox): (WebCore::RenderBox::outlineBoundsForRepaint): (WebCore::RenderBox::addFocusRingRects): (WebCore::RenderBox::getBackgroundPaintedExtent): (WebCore::RenderBox::pushContentsClip): (WebCore::RenderBox::computeRectForRepaint): * rendering/RenderBox.h: (WebCore::RenderBox::pixelSnappedFrameRect): * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::paintFillLayerExtended): (WebCore::RenderBoxModelObject::pixelSnapBackgroundImageGeometryForPainting): (WebCore::RenderBoxModelObject::paintNinePieceImage): (WebCore::RenderBoxModelObject::paintBorder): (WebCore::RenderBoxModelObject::drawBoxSideFromPath): (WebCore::RenderBoxModelObject::paintBoxShadow): * rendering/RenderDetailsMarker.cpp: (WebCore::RenderDetailsMarker::paint): * rendering/RenderEmbeddedObject.cpp: (WebCore::RenderEmbeddedObject::paintSnapshotImage): (WebCore::RenderEmbeddedObject::isReplacementObscured): * rendering/RenderFieldset.cpp: (WebCore::RenderFieldset::paintBoxDecorations): * rendering/RenderFlowThread.cpp: (WebCore::RenderFlowThread::addRegionsVisualOverflowFromTheme): * rendering/RenderFrameSet.cpp: (WebCore::RenderFrameSet::paint): (WebCore::RenderFrameSet::layout): (WebCore::RenderFrameSet::positionFramesWithFlattening): * rendering/RenderHTMLCanvas.cpp: (WebCore::RenderHTMLCanvas::paintReplaced): * rendering/RenderImage.cpp: (WebCore::RenderImage::paintReplaced): * rendering/RenderInline.cpp: (WebCore::RenderInline::paintOutlineForLine): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::updateTransform): (WebCore::RenderLayer::currentTransform): (WebCore::RenderLayer::beginTransparencyLayers): (WebCore::RenderLayer::scrollRectToVisible): (WebCore::RenderLayer::scrollCornerRect): (WebCore::RenderLayer::drawPlatformResizerImage): (WebCore::RenderLayer::paintResizer): (WebCore::RenderLayer::hitTestOverflowControls): (WebCore::RenderLayer::clipToRect): (WebCore::RenderLayer::paintLayerByApplyingTransform): (WebCore::RenderLayer::paintOverflowControlsForFragments): (WebCore::RenderLayer::hitTestResizerInFragments): (WebCore::RenderLayer::calculateClipRects): * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::updateTransform): (WebCore::RenderLayerBacking::updateGeometry): (WebCore::RenderLayerBacking::resetContentsRect): (WebCore::RenderLayerBacking::updateImageContents): (WebCore::RenderLayerBacking::backgroundBoxForPainting): (WebCore::RenderLayerBacking::setContentsNeedDisplayInRect): (WebCore::RenderLayerBacking::paintContents): * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::addToOverlapMap): (WebCore::RenderLayerCompositor::requiresCompositingForPlugin): (WebCore::RenderLayerCompositor::requiresCompositingForFrame): (WebCore::RenderLayerCompositor::paintContents): * rendering/RenderListBox.cpp: (WebCore::RenderListBox::addFocusRingRects): (WebCore::RenderListBox::paintScrollbar): (WebCore::RenderListBox::paintItemBackground): * rendering/RenderListMarker.cpp: (WebCore::RenderListMarker::paint): * rendering/RenderMeter.cpp: (WebCore::RenderMeter::updateLogicalWidth): (WebCore::RenderMeter::computeLogicalHeight): * rendering/RenderMultiColumnSet.cpp: (WebCore::RenderMultiColumnSet::paintColumnRules): * rendering/RenderObject.cpp: (WebCore::RenderObject::drawLineForBoxSide): (WebCore::RenderObject::addPDFURLRect): (WebCore::RenderObject::paintOutline): (WebCore::RenderObject::absoluteBoundingBoxRect): (WebCore::RenderObject::repaintUsingContainer): (WebCore::RenderObject::repaintSlowRepaintObject): (WebCore::RenderObject::pixelSnappedAbsoluteClippedOverflowRect): * rendering/RenderProgress.cpp: (WebCore::RenderProgress::computeLogicalHeight): * rendering/RenderReplaced.cpp: (WebCore::RenderReplaced::paint): * rendering/RenderScrollbarPart.cpp: (WebCore::RenderScrollbarPart::paintIntoRect): * rendering/RenderSearchField.cpp: (WebCore::RenderSearchField::showPopup): * rendering/RenderSnapshottedPlugIn.cpp: (WebCore::RenderSnapshottedPlugIn::paintSnapshot): * rendering/RenderTableCell.cpp: (WebCore::RenderTableCell::paintCollapsedBorders): * rendering/RenderTextControl.cpp: (WebCore::RenderTextControl::addFocusRingRects): * rendering/RenderTextControlSingleLine.cpp: (WebCore::RenderTextControlSingleLine::paint): * rendering/RenderTheme.cpp: (WebCore::RenderTheme::paint): (WebCore::RenderTheme::paintBorderOnly): (WebCore::RenderTheme::paintDecorations): * rendering/RenderThemeMac.mm: (WebCore::RenderThemeMac::paintSnapshottedPluginOverlay): * rendering/RenderTreeAsText.cpp: (WebCore::write): * rendering/RenderVideo.cpp: (WebCore::RenderVideo::videoBox): (WebCore::RenderVideo::paintReplaced): * rendering/RenderView.cpp: (WebCore::RenderView::repaintViewRectangle): (WebCore::RenderView::computeRectForRepaint): (WebCore::RenderView::absoluteRects): (WebCore::RenderView::selectionBounds): (WebCore::RenderView::unscaledDocumentRect): * rendering/RenderView.h: * rendering/RenderWidget.cpp: (WebCore::RenderWidget::paintContents): (WebCore::RenderWidget::paint): * rendering/SimpleLineLayoutFunctions.cpp: (WebCore::SimpleLineLayout::paintDebugBorders): * rendering/shapes/Shape.cpp: (WebCore::Shape::createRasterShape): * rendering/svg/RenderSVGModelObject.cpp: (WebCore::RenderSVGModelObject::outlineBoundsForRepaint): * rendering/svg/RenderSVGRoot.cpp: (WebCore::RenderSVGRoot::paintReplaced): * rendering/svg/SVGInlineTextBox.cpp: (WebCore::SVGInlineTextBox::selectionRectForTextFragment): 2014-08-27 Daniel Bates Scrollbar corner can be drawn outside containing frame https://bugs.webkit.org/show_bug.cgi?id=133131 Reviewed by Simon Fraser. Merged from Blink (patch by Levi Weintraub): Fixes an issue where the scroll corner may be painted outside the rectangle of its associated frame by setting a clip rectangle before painting the scroll bar(s) and scroll corner. Test: scrollbars/custom-scrollbars-paint-outside-iframe.html * platform/ScrollView.cpp: (WebCore::ScrollView::paint): 2014-08-27 Zalan Bujtas Subpixel layout: Rename FloatPoint/FloatRect device pixel snapping functions. https://bugs.webkit.org/show_bug.cgi?id=136314 Reviewed by Simon Fraser. From *edToDevicePixels() to *PointToDevicePixels() (* = floor/round/ceil) EnclosedIntRect -> enclosingIntRect() changes functionality for InspectorOverlay painting, but currently untestable. * WebCore.exp.in: * inspector/InspectorOverlay.cpp: (WebCore::InspectorOverlay::showPaintRect): * platform/graphics/FloatPoint.h: (WebCore::flooredIntSize): (WebCore::floorPointToDevicePixels): (WebCore::ceilPointToDevicePixels): (WebCore::flooredToDevicePixels): Deleted. (WebCore::ceiledToDevicePixels): Deleted. * platform/graphics/FloatRect.cpp: (WebCore::enclosingRectToDevicePixels): (WebCore::enclosingRectExtendedToDevicePixels): Deleted. Renamed. (WebCore::enclosedIntRect): Deleted. Not needed. * platform/graphics/FloatRect.h: 2014-08-27 Zalan Bujtas Subpixel layout: Rename LayoutPoint's device pixel snapping functions. https://bugs.webkit.org/show_bug.cgi?id=136306 Reviewed by Simon Fraser. From *edForPainting() to *PointToDevicePixels() (* = floor/round/ceil) No change in functionality. * platform/graphics/LayoutPoint.h: (WebCore::roundPointToDevicePixels): (WebCore::floorPointToDevicePixels): (WebCore::ceilPointToDevicePixels): (WebCore::roundedForPainting): Deleted. (WebCore::flooredForPainting): Deleted. (WebCore::ceiledForPainting): Deleted. * platform/graphics/LayoutRect.cpp: (WebCore::enclosingRectForPainting): * platform/graphics/LayoutRect.h: (WebCore::directionalPixelSnappedForPainting): * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::pixelSnapBackgroundImageGeometryForPainting): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::paintLayerByApplyingTransform): (WebCore::RenderLayer::calculateClipRects): * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::updateGeometry): 2014-08-27 Zalan Bujtas Subpixel layout: Rename LayoutSize's device pixel snapping functions. https://bugs.webkit.org/show_bug.cgi?id=136310 Reviewed by Simon Fraser. From *edForPainting() to *SizeToDevicePixels() (* = floor/round/ceil) No change in functionality. * platform/graphics/LayoutSize.h: (WebCore::floorSizeToDevicePixels): (WebCore::flooredForPainting): Deleted. * rendering/style/StyleGeneratedImage.cpp: (WebCore::StyleGeneratedImage::computeIntrinsicDimensions): 2014-08-27 Brian J. Burg Enums in ScrollTypes and PlatformWheelEvent should not use uint64_t storage https://bugs.webkit.org/show_bug.cgi?id=136318 Reviewed by Simon Fraser. This regressed in a replay-related patch. Revert back to uint8_t storage size. * platform/PlatformWheelEvent.h: * platform/ScrollTypes.h: * replay/WebInputs.json: 2014-08-27 Simon Fraser Speling is hard. Reviewed by Tim Horton. * page/EventHandler.cpp: (WebCore::EventHandler::handleMousePressEvent): (WebCore::EventHandler::handleMouseDoubleClickEvent): (WebCore::EventHandler::handleMouseMoveEvent): (WebCore::EventHandler::handleMouseReleaseEvent): (WebCore::EventHandler::handlePasteGlobalSelection): (WebCore::EventHandler::updateMouseEventTargetNode): (WebCore::EventHandler::dispatchMouseEvent): (WebCore::EventHandler::sendContextMenuEventForKey): (WebCore::EventHandler::dispatchSyntheticTouchEventIfEnabled): 2014-08-27 Simon Fraser Fix the iOS build. * page/EventHandler.cpp: (WebCore::EventHandler::handleMousePressEvent): 2014-08-27 Andreas Kling Drawing text in an SVG font causes load events to be fired. Don't flush pending load events in Document::implicitClose() for frameless documents. This is a targeted fix for an issue where parsing SVG fonts during layout would cause event dispatch to happen in the main document, leading to arbitrary JS execution. Note that the testcase only works in DRT/WTR, since once the SVG font is in cached by WebCore, we won't reparse it again. Caches are cleared between tests, so it will correctly fail if this should regress. Longer-term, we should clean this up and get rid of the global dispatch entirely. Reviewed by Simon Fraser. Test: fast/text/svg-font-trigger-load-event.html * dom/Document.cpp: (WebCore::Document::implicitClose): 2014-08-27 Simon Fraser Some EventHandler naming cleanup https://bugs.webkit.org/show_bug.cgi?id=136303 Reviewed by Beth Dakin. Rename "mev" variables to "mouseEvent". No behavior change. * page/EventHandler.cpp: (WebCore::EventHandler::handleMousePressEvent): (WebCore::EventHandler::handleMouseDoubleClickEvent): (WebCore::EventHandler::handleMouseMoveEvent): (WebCore::EventHandler::handleMouseReleaseEvent): (WebCore::EventHandler::updateDragAndDrop): (WebCore::EventHandler::prepareMouseEvent): (WebCore::EventHandler::sendContextMenuEvent): (WebCore::EventHandler::passMousePressEventToScrollbar): (WebCore::EventHandler::dispatchSyntheticTouchEventIfEnabled): 2014-08-27 Simon Fraser Some EventHandler naming cleanup https://bugs.webkit.org/show_bug.cgi?id=136303 Reviewed by Beth Dakin. Rename PlatformMouseEvent variables from "mouseEvent" to "platformMouseEvent" so that a later patch can rename "mev" to "mouseEvent". 0 => nullptr. No behavior change. * page/EventHandler.cpp: (WebCore::EventHandler::clear): (WebCore::EventHandler::handleMousePressEvent): (WebCore::EventHandler::handleMouseDoubleClickEvent): (WebCore::EventHandler::handleMouseMoveEvent): (WebCore::EventHandler::invalidateClick): (WebCore::EventHandler::handleMouseReleaseEvent): (WebCore::EventHandler::handlePasteGlobalSelection): (WebCore::EventHandler::updateMouseEventTargetNode): (WebCore::EventHandler::dispatchMouseEvent): (WebCore::EventHandler::sendContextMenuEventForKey): (WebCore::EventHandler::dispatchSyntheticTouchEventIfEnabled): 2014-08-27 Beth Dakin Make isScrollableOrRubberbandable() a virtual function on RenderLayerModelObject https://bugs.webkit.org/show_bug.cgi?id=136307 Reviewed by Simon Fraser. Remove extra parentheses. * page/FrameView.cpp: (WebCore::FrameView::isScrollable): Mark isScrollableOrRubberbandable() as override now that the root implementation is moving to RenderLayerModelObject. It can also be private now. * rendering/RenderBox.h: isBox() check and cast are no longer necessary. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::hasScrollableOrRubberbandableAncestor): Base implementation should return false. * rendering/RenderLayerModelObject.h: (WebCore::RenderLayerModelObject::isScrollableOrRubberbandable): Mark as override. * rendering/RenderView.h: 2014-08-27 Antti Koivisto REGRESSION(r172946): Plugin tests asserting on Yosemite debug bot https://bugs.webkit.org/show_bug.cgi?id=136301 Reviewed by Alexey Proskuryakov. Don't pull the priority from the platform request if it is not defined. * platform/network/cf/ResourceRequestCFNet.cpp: (WebCore::ResourceRequest::doUpdateResourceRequest): * platform/network/cocoa/ResourceRequestCocoa.mm: (WebCore::ResourceRequest::doUpdateResourceRequest): 2014-08-27 Timothy Hatcher Web Inspector: Crash when you open Web Inspector in a private window (due to IndexedDB) https://bugs.webkit.org/show_bug.cgi?id=136293 Reviewed by Joseph Pecoraro. * inspector/InspectorIndexedDBAgent.cpp: (WebCore::InspectorIndexedDBAgent::requestDatabaseNames): Null check idbRequest from IDBFactory::getDatabaseNames, which can return null now after r172603 in private browsing. 2014-08-27 Beth Dakin overflow:scroll elements should not latch to the body if the body is overflow:hidden https://bugs.webkit.org/show_bug.cgi?id=136273 Reviewed by Darin Adler. This patch adds an optional parameter to isScrollable(). The Scrollability parameter that allows the caller to define what they mean by 'scrollable.' Most callers are interested in the default value, Scrollability::Scrollable, which means that there is actually content to scroll to, and a scrollbar that will allow you to access it. In some cases, such as this latching case, callers want to know if the FrameView is allowed to rubber-band, which the main frame might be allowed to do even if there is no content to scroll to. In that case, callers use Scrollability::ScrollableOrRubberbandable. * page/FrameView.cpp: (WebCore::FrameView::isScrollable): (WebCore::FrameView::hasScrollableOrRubberbandableAncestor): New virtual function on ScrollableArea answers whether a ScrollableArea has any scrollable or rubber-bandable ancestor. * page/FrameView.h: * platform/ScrollableArea.h: Events should only be allowed to prevent stretching if there is some ancestor ScrollableArea that will be able to make use of the event. * platform/mac/ScrollAnimatorMac.mm: (WebCore::ScrollAnimatorMac::allowsVerticalStretching): (WebCore::ScrollAnimatorMac::allowsHorizontalStretching): New ScrollableArea virtual function. * platform/win/PopupMenuWin.h: New RenderBox isScrollableOrRubberbandable() returns just canBeScrolledAndHasScrollableArea() for most RenderBox, but will be overridden by RenderView. * rendering/RenderBox.cpp: (WebCore::RenderBox::isScrollableOrRubberbandable): * rendering/RenderBox.h: Recurse up the parent chain to find out if anything is scrollable or just rubber- bandable. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::hasScrollableOrRubberbandableAncestor): * rendering/RenderLayer.h: Call into RenderLayer. * rendering/RenderListBox.cpp: (WebCore::RenderListBox::hasScrollableOrRubberbandableAncestor): * rendering/RenderListBox.h: Override isScrollableOrRubberbandable() to handle the main frame case where the main frame is typically allowed to rubber-band even if there is no content to scroll to. * rendering/RenderView.cpp: (WebCore::RenderView::isScrollableOrRubberbandable): * rendering/RenderView.h: 2014-08-27 Benjamin Poulain Updating attributes on HTML elements do not invalidate the style correctly unless the attribute name is lowercase in the stylesheet https://bugs.webkit.org/show_bug.cgi?id=136270 Reviewed by Andreas Kling. In HTML, WebKit treats every attribute name lowercase to implement case-insensitive matching. When invalidating style, the StyleResolver was ignoring HTML and always using the XML names. This patch split the names on RuleFeatureSet in two sets: one for XML, one for HTML. In StyleResolver, the name used depends on the type of the element being updated. This patch also adds nodeNeedsStyleRecalc() to Internals to test the optimization and various cases of style update. Tests: fast/css/attribute-for-content-property-style-update-html.html fast/css/attribute-for-content-property-style-update-xhtml.xhtml fast/css/attribute-style-invalidation-optimization-html.html fast/css/attribute-style-invalidation-optimization-xhtml.xhtml fast/css/attribute-style-update-html.html fast/selectors/attribute-style-update-html.html fast/selectors/attribute-style-update-svg-in-html.html fast/selectors/attribute-style-update-xhtml.xhtml * css/RuleFeature.cpp: (WebCore::RuleFeatureSet::collectFeaturesFromSelector): (WebCore::RuleFeatureSet::add): (WebCore::RuleFeatureSet::clear): * css/RuleFeature.h: * css/StyleResolver.cpp: (WebCore::StyleResolver::applyProperty): * css/StyleResolver.h: (WebCore::StyleResolver::hasSelectorForAttribute): * dom/Element.cpp: (WebCore::Element::willModifyAttribute): * testing/Internals.cpp: (WebCore::Internals::address): (WebCore::Internals::nodeNeedsStyleRecalc): * testing/Internals.h: * testing/Internals.idl: 2014-08-27 Benjamin Poulain Update the CSS Grammar selector names to get closer to the latest terminology https://bugs.webkit.org/show_bug.cgi?id=136277 Reviewed by Andreas Kling. CSS Selector Level 4 gives useful definitions for various parts of a selector (see http://dev.w3.org/csswg/selectors4/#structure). This patch updates our names to be closer to that spec. Stricto sensu, our definition of "simple selector list" is wrong. I did not attempt to fix this because updates of CSS Selector Level 4 and WebVTT will eventually make that whole concept useless. * css/CSSGrammar.y.in: 2014-08-27 Gyuyoung Kim [EFL] Unskip compositing test https://bugs.webkit.org/show_bug.cgi?id=136151 Reviewed by Csaba Osztrogonác. * rendering/RenderLayerBacking.cpp: Set true to setContentsOpaque() to support compositing test. (WebCore::RenderLayerBacking::createPrimaryGraphicsLayer): 2014-08-26 Vivek Galatage Canvas direction should reflect change in dir attribute and also across save/restore operations https://bugs.webkit.org/show_bug.cgi?id=136098 Reviewed by Darin Adler. Changed State.m_direction type from TextDirection to Direction enum to accomodate 'inherit' as a separate value. Modified the getter to compute the 'live' value for the direction attribute. Removed explicit passing of direction to CanvasRenderingContext2D::State constructor. Updated existing canvas-direction.html with additional cases to reflect this change. * html/canvas/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::CanvasRenderingContext2D): (WebCore::CanvasRenderingContext2D::reset): (WebCore::CanvasRenderingContext2D::State::State): (WebCore::CanvasRenderingContext2D::toTextDirection): (WebCore::CanvasRenderingContext2D::direction): (WebCore::CanvasRenderingContext2D::setDirection): (WebCore::CanvasRenderingContext2D::drawTextInternal): (WebCore::inheritedDirection): Deleted. * html/canvas/CanvasRenderingContext2D.h: 2014-08-26 Benjamin Poulain Minor style tweak on StyleResolveTree https://bugs.webkit.org/show_bug.cgi?id=136233 Reviewed by Sam Weinig. * style/StyleResolveTree.cpp: (WebCore::Style::resolveTree): Clang likely optimized it away, but I find that explicit style cleaner. 2014-08-26 Brian J. Burg Web Inspector: put feature flags for Inspector domains in the protocol specification https://bugs.webkit.org/show_bug.cgi?id=136027 Reviewed by Timothy Hatcher. Add 'featureGuard' settings to wrap domains with ENABLE macros. No new tests. No behavior was changed. * inspector/protocol/Database.json: * inspector/protocol/IndexedDB.json: * inspector/protocol/Replay.json: 2014-08-26 Andy Estes [Cocoa] Some projects are incorrectly installed to $BUILT_PRODUCTS_DIR https://bugs.webkit.org/show_bug.cgi?id=136267 Reviewed by Dan Bernstein. INSTALL_PATH was set to $BUILT_PRODUCTS_DIR for engineering configurations in r20225 as part of a build fix. Not only is this no longer necessary to build, but it causes built products to be incorrectly installed in engineering configurations. Remove the setting of INSTALL_PATH from the pbxproj file so that the value specified in the xcconfig files is used instead. * WebCore.xcodeproj/project.pbxproj: 2014-08-26 Brent Fulgham [Win] WebKit IDL incorrectly passes HWND as OLE_HANDLE https://bugs.webkit.org/show_bug.cgi?id=136258 Reviewed by Tim Horton. Avoid 32/64-bit truncation by preventing 64-bit HWND (and other) values from passing through the 32-bit OLE_HANDLE data type. * platform/win/WindowMessageBroadcaster.cpp: (WebCore::WindowMessageBroadcaster::addListener): (WebCore::WindowMessageBroadcaster::removeListener): (WebCore::WindowMessageBroadcaster::destroy): (WebCore::WindowMessageBroadcaster::unsubclassWindow): (WebCore::WindowMessageBroadcaster::SubclassedWndProc): 2014-08-25 Maciej Stachowiak Replace use of WKCopyCFLocalizationPreferredName with NSLocale public API https://bugs.webkit.org/show_bug.cgi?id=136082 Reviewed by Alexey Proskuryakov. * platform/mac/Language.mm: (WebCore::httpStyleLanguageCode): Replace use of WKCopyCFLocalizationPreferredName with new WebCoreNSStringExtras helper. * platform/mac/WebCoreNSStringExtras.mm: Replacements for the aspects of WKCopyCFLocalizationPreferredName. (preferredBundleLocalizationName): New helper - most preferred localization available in the main bundle, canonicalized the way we like it. (canonicalLocalizationName): Convert a lcalization name to a string with language and country code, using default if necessary (e.g. "en" maps to "en_US"). * WebCore.order: Remove mention of WKCopyCFLocalizationPreferredName. * WebCore.exp.in: ditto; also export preferredBundleLocalizationName for WebKit(2). * platform/ios/WebCoreSystemInterfaceIOS.mm: ditto * platform/mac/WebCoreSystemInterface.h: ditto * platform/mac/WebCoreSystemInterface.mm: ditto * platform/spi/cf: Added. * platform/spi/cf/CFLocaleSPI.h: Added. Declare CFLocaleGetLanguageRegionEncodingForLocaleIdentifier. 2014-08-26 Zoltan Horvath [CSS Shapes] Positioned polygon reftests failing https://bugs.webkit.org/show_bug.cgi?id=135925 Reviewed by David Hyatt. We didn't respect the shape-margin before a positioned polygon, since we checked the shape-margin for only 1 vertex for a polygon edge. This patch fixes the behavior, removes the tests from the skipped list and updates 1 test, which was incorrect. Updated existing test and removed tests from skipped list. * rendering/shapes/PolygonShape.cpp: (WebCore::clippedCircleXRange): (WebCore::PolygonShape::getExcludedInterval): 2014-08-26 Zalan Bujtas Subpixel layout: Remove float to LayoutUnit ceil/round function wrappers. https://bugs.webkit.org/show_bug.cgi?id=136253 Reviewed by Simon Fraser. These functions wrap LayoutUnit::fromFloatCeil/fromFloatRound() functions to ceil/round float to LayoutUnit. Their usage is limited and can easily be confused with the snapping functions (snap to css/device pixels). No change in functionality. * platform/LayoutUnit.h: (WebCore::roundedLayoutUnit): Deleted. : Callers use the more explicit LayoutUnit::fromFloatRound() function. (WebCore::ceiledLayoutUnit): Deleted. : Callers use the more explicit LayoutUnit::fromFloatCeil() function. * rendering/RenderBlock.cpp: (WebCore::updatePreferredWidth): (WebCore::RenderBlock::computeInlinePreferredLogicalWidths): (WebCore::adjustFloatForSubPixelLayout): Deleted. * rendering/RenderBox.cpp: (WebCore::RenderBox::positionLineBox): * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::resolveFlexibleLengths): * rendering/RenderInline.cpp: (WebCore::RenderInline::offsetForInFlowPositionedInline): * rendering/RenderTextControlSingleLine.cpp: (WebCore::RenderTextControlSingleLine::preferredContentLogicalWidth): 2014-08-26 Simon Fraser Ensure that layout is up-to-date before hit testing https://bugs.webkit.org/show_bug.cgi?id=136242 rdar://problem/17435564 Reviewed by Tim Horton. Various code paths can call into RenderView::hitTest() but fail to ensure that layout is up-to-date. This is a conservative change that fixes the issue for callers of EventHandler::hitTestResultAtPoint(), including WebPage::acceptsFirstMouse() and WebFrame::hitTest(). This change is not general enough that we can ASSERT(!needsLayout()) in RenderView::hitTest() yet. * page/EventHandler.cpp: (WebCore::EventHandler::hitTestResultAtPoint): 2014-08-26 Beth Dakin Rubber-banding in overflow:scroll regions does not work correctly with direction:rtl https://bugs.webkit.org/show_bug.cgi?id=136176 Reviewed by Tim Horton. Small cleanup. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::visibleContentRectInternal): 2014-08-26 Tim Horton Fix the build after r172963 * page/DOMTimer.h: 2014-08-25 Gavin Barraclough DOMTimer may be deleted during timer fire https://bugs.webkit.org/show_bug.cgi?id=136198 Reviewed by Geoff Garen. Consequentially ScheduledActions may also be deleted mid execution. This is fairly surprising & fragile, let's make this simpler. Currently DOMTimer instances are effectively owned by the ScriptExecutionContext. There is a 1-1 mapping between timers and contexts, all timers are help in a map on the context and if the context goes away all timers are deleted. Rather than being implemented in a straightforward fashion (a smart pointer type for the map value) this is currently implemented by having the timer objects listen for the context going away using contextDestroyed, and deleting themselves if so. Switch to using a smart pointer for values of m_timeouts in ScriptExecutionContext. By using a RefCounted object we can also extend the lifetime of the DOMTimer instance from within the DOMTimer::fired method, so the object is not destroyed while the member function is still on the stack. * WebCore.xcodeproj/project.pbxproj: - project -> private since DOMTimer could no longer be a forward declare in ScriptExecutionContext.h. * dom/ScriptExecutionContext.cpp: (WebCore::ScriptExecutionContext::adjustMinimumTimerInterval): (WebCore::ScriptExecutionContext::didChangeTimerAlignmentInterval): - auto* -> auto& since value type in map is no longer a raw pointer. * dom/ScriptExecutionContext.h: (WebCore::ScriptExecutionContext::addTimeout): - DOMTimer* -> PassRefPtr * page/DOMTimer.cpp: (WebCore::DOMTimer::DOMTimer): - adopt the initial ref, and pass to addTimeout. (WebCore::DOMTimer::install): - updated comment. (WebCore::DOMTimer::removeById): - instead of explicitly deleting the timer and assuming this will implicitly remove it from the context map, we explicitly remove it from the context map and assume this will implicitly deleting the timer! (WebCore::DOMTimer::fired): - Add a RefPtr to keep the DOMTimer object alive until the fired method completes; to cancel a one-shot timer just remove it from the context's map, rather than explicitly deleting it. (WebCore::DOMTimer::~DOMTimer): Deleted. (WebCore::DOMTimer::contextDestroyed): Deleted. - no need! object lifetime management now handled by smart pointers. * page/DOMTimer.h: - added parent class RefCounted. 2014-08-26 Carlos Garcia Campos [GTK] Selection background is rendered white when unfocused with recent GTK+ https://bugs.webkit.org/show_bug.cgi?id=136251 Reviewed by Martin Robinson. This is due to a change in the GTK+ theme, but because we are not using the right flags to get the selections colors. We should use GTK_STATE_FLAG_SELECTED | GTK_STATE_FLAG_FOCUSED when focused and GTK_STATE_FLAG_SELECTED when unfocused, instead of GTK_STATE_FLAG_ACTIVE when unfocused. * platform/gtk/RenderThemeGtk3.cpp: (WebCore::RenderThemeGtk::platformActiveSelectionBackgroundColor): (WebCore::RenderThemeGtk::platformInactiveSelectionBackgroundColor): (WebCore::RenderThemeGtk::platformActiveSelectionForegroundColor): (WebCore::RenderThemeGtk::platformInactiveSelectionForegroundColor): (WebCore::RenderThemeGtk::platformActiveListBoxSelectionBackgroundColor): (WebCore::RenderThemeGtk::platformInactiveListBoxSelectionBackgroundColor): (WebCore::RenderThemeGtk::platformActiveListBoxSelectionForegroundColor): (WebCore::RenderThemeGtk::platformInactiveListBoxSelectionForegroundColor): 2014-08-26 Krzysztof Czech [EFL] Utilize espeak as a synthesizer back-end for WebSpeech https://bugs.webkit.org/show_bug.cgi?id=136127 Reviewed by Gyuyoung Kim. Utilize espeak API to have support for speak, cancel and initializeVoiceList. * PlatformEfl.cmake: * platform/efl/PlatformSpeechSynthesisProviderEfl.cpp: (WebCore::PlatformSpeechSynthesisProviderEfl::PlatformSpeechSynthesisProviderEfl): (WebCore::PlatformSpeechSynthesisProviderEfl::convertRateToEspeakValue): (WebCore::PlatformSpeechSynthesisProviderEfl::convertVolumeToEspeakValue): (WebCore::PlatformSpeechSynthesisProviderEfl::convertPitchToEspeakValue): (WebCore::PlatformSpeechSynthesisProviderEfl::voiceName): (WebCore::PlatformSpeechSynthesisProviderEfl::engineInit): (WebCore::PlatformSpeechSynthesisProviderEfl::currentVoice): (WebCore::PlatformSpeechSynthesisProviderEfl::initializeVoiceList): (WebCore::PlatformSpeechSynthesisProviderEfl::speak): (WebCore::PlatformSpeechSynthesisProviderEfl::cancel): (WebCore::PlatformSpeechSynthesisProviderEfl::fireSpeechEvent): * platform/efl/PlatformSpeechSynthesisProviderEfl.h: * platform/efl/PlatformSpeechSynthesizerEfl.cpp: (WebCore::PlatformSpeechSynthesizer::PlatformSpeechSynthesizer): (WebCore::PlatformSpeechSynthesizer::initializeVoiceList): (WebCore::PlatformSpeechSynthesizer::pause): (WebCore::PlatformSpeechSynthesizer::resume): (WebCore::PlatformSpeechSynthesizer::speak): (WebCore::PlatformSpeechSynthesizer::cancel): 2014-08-26 Ryuan Choi [EFL] Build break using clang https://bugs.webkit.org/show_bug.cgi?id=136245 Reviewed by Gyuyoung Kim. * css/ViewportStyleResolver.cpp: Includes NodeRenderStyle.h 2014-08-26 Mark Rowe Build fix after r172951. * fileapi/Blob.h: Give the argument the name that the predicates expect. 2014-08-25 Gyuyoung Kim Generate toFile() instead of manual functions. https://bugs.webkit.org/show_bug.cgi?id=136207 Reviewed by Darin Adler. No new tests, no behavior changes. * fileapi/Blob.h: Define BLOB_TYPE_CASTS. * fileapi/File.h: Use BLOB_TYPE_CASTS to generate toFile(). (WebCore::toFile): Deleted. 2014-08-25 Zalan Bujtas Subpixel layout: remove roundedLayoutPoint/roundedLayoutSize functions. https://bugs.webkit.org/show_bug.cgi?id=136236 Reviewed by Simon Fraser. These functions simply call LayoutPoint/LayoutSize c'tors. They don't round the input value at all. Non change in functionality. * dom/MouseRelatedEvent.cpp: (WebCore::MouseRelatedEvent::computePageLocation): (WebCore::MouseRelatedEvent::computeRelativePosition): * dom/Touch.cpp: (WebCore::Touch::Touch): * html/shadow/SliderThumbElement.cpp: (WebCore::SliderThumbElement::setPositionFromPoint): * page/DragController.cpp: (WebCore::elementUnderMouse): * page/EventHandler.cpp: (WebCore::selectionExtentRespectingEditingBoundary): * page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.mm: (WebCore::ScrollingTreeFrameScrollingNodeIOS::updateChildNodesAfterScroll): * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm: (WebCore::ScrollingTreeFrameScrollingNodeMac::setScrollLayerPosition): * platform/graphics/LayoutPoint.h: (WebCore::roundedLayoutPoint): Deleted. * platform/graphics/LayoutSize.h: (WebCore::roundedLayoutSize): Deleted. * rendering/EllipsisBox.cpp: (WebCore::EllipsisBox::nodeAtPoint): * rendering/RenderBlock.cpp: (WebCore::RenderBlock::selectionGapRectsForRepaint): * rendering/RenderBox.cpp: (WebCore::RenderBox::mapLocalToContainer): (WebCore::RenderBox::positionLineBox): * rendering/RenderEmbeddedObject.cpp: (WebCore::RenderEmbeddedObject::isInUnavailablePluginIndicator): * rendering/RenderEmbeddedObject.h: * rendering/RenderInline.cpp: (WebCore::RenderInline::localCaretRect): (WebCore::RenderInline::mapLocalToContainer): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::absoluteToContents): (WebCore::RenderLayer::calculateClipRects): * rendering/RenderMultiColumnFlowThread.cpp: (WebCore::RenderMultiColumnFlowThread::mapAbsoluteToLocalPoint): * rendering/RenderObject.cpp: (WebCore::RenderObject::mapLocalToContainer): * rendering/shapes/ShapeOutsideInfo.cpp: (WebCore::ShapeOutsideInfo::createShapeForImage): * rendering/svg/RenderSVGContainer.cpp: (WebCore::RenderSVGContainer::nodeAtFloatPoint): * rendering/svg/RenderSVGForeignObject.cpp: (WebCore::RenderSVGForeignObject::nodeAtFloatPoint): * rendering/svg/RenderSVGImage.cpp: (WebCore::RenderSVGImage::nodeAtFloatPoint): * rendering/svg/RenderSVGShape.cpp: (WebCore::RenderSVGShape::nodeAtFloatPoint): * testing/Internals.cpp: (WebCore::Internals::nodesFromRect): 2014-08-25 Zalan Bujtas Rename RenderObject::showTree() and showTreeForThis() to showNodeTree*(). https://bugs.webkit.org/show_bug.cgi?id=136238 Reviewed by Simon Fraser. showNodeTree()/showNodeTreeForThis() reflects the functionality better. No change in functionality. * rendering/InlineBox.cpp: (WebCore::InlineBox::showNodeTreeForThis): (showNodeTree): (WebCore::InlineBox::showTreeForThis): Deleted. (showTree): Deleted. * rendering/InlineBox.h: * rendering/RenderObject.cpp: (WebCore::RenderObject::showNodeTreeForThis): (showNodeTree): (WebCore::RenderObject::showTreeForThis): Deleted. (showTree): Deleted. * rendering/RenderObject.h: 2014-08-25 Antti Koivisto Don't pass priority as parameter to ResourceLoadScheduler https://bugs.webkit.org/show_bug.cgi?id=136232 Reviewed by Sam Weinig. It is part of the ResourceRequest which is also passed in. * WebCore.exp.in: * loader/ResourceLoadScheduler.cpp: (WebCore::ResourceLoadScheduler::scheduleSubresourceLoad): (WebCore::ResourceLoadScheduler::schedulePluginStreamLoad): (WebCore::ResourceLoadScheduler::scheduleLoad): * loader/ResourceLoadScheduler.h: * loader/cache/CachedResource.cpp: (WebCore::CachedResource::load): * platform/network/cf/ResourceRequestCFNet.cpp: (WebCore::ResourceRequest::updateFromDelegatePreservingOldProperties): * platform/network/cocoa/ResourceRequestCocoa.mm: (WebCore::ResourceRequest::updateFromDelegatePreservingOldProperties): Restore the original request priority when a delegate modifies the request. 2014-08-25 Beth Dakin Rubber-banding in overflow:scroll regions does not work correctly with direction:rtl https://bugs.webkit.org/show_bug.cgi?id=136176 Reviewed by Sam Weinig. Use scrollPosition() instead of scrollXOffset() and scrollYOffset() which both add in the scrollOrigin(). Other implementations of visibleContentRectInternal() do not add in the scrollOrigin(), so RenderLayer's shouldn't either in order to be consistent. This makes rubber-banding work for RTL because ScrollAnimatorMac::pinnedInDirection() and ScrollAnimatorMac::absoluteScrollPosition() both return the expect values now. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::visibleContentRectInternal): 2014-08-25 Benjamin Poulain Reduce style marking when using the pseudo class :placeholder-shown https://bugs.webkit.org/show_bug.cgi?id=136203 Reviewed by Darin Adler. When the :placeholder-shown filter is hit, we were always marking the RenderStyle as unique. As a result, if :placeholder-shown was used without a more restrictive filter (e.g. "*:placeholder-shown" or simply ":placeholder-shown"), style sharing was disabled for the whole tree. This patch rescope the tree marking to any element that can be affected by a placeholder: any the subclass of HTMLTextFormControlElement. For other elements, any change in internal state would be irrelevant for "isPlaceholderVisible". Styling of :placeholder-shown is covered by the existing tests. Style sharing of :placeholder-shown is covered by LayoutTests/fast/css/placeholder-shown-basics.html. * css/SelectorChecker.cpp: (WebCore::SelectorChecker::checkOne): * css/SelectorCheckerTestFunctions.h: (WebCore::isPlaceholderShown): Deleted. * cssjit/SelectorCompiler.cpp: (WebCore::SelectorCompiler::makeContextStyleUniqueIfNecessaryAndTestIsPlaceholderShown): (WebCore::SelectorCompiler::makeElementStyleUniqueIfNecessaryAndTestIsPlaceholderShown): (WebCore::SelectorCompiler::isPlaceholderShown): (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementHasPlaceholderShown): (WebCore::SelectorCompiler::makeUniqueIfNecessaryAndTestIsPlaceholderShown): Deleted. 2014-08-25 Antti Koivisto Remove ResourceLoader::didChangePriority https://bugs.webkit.org/show_bug.cgi?id=136230 Reviewed by Andreas Kling. It doesn't do anything on any platform. * loader/ResourceLoader.cpp: (WebCore::ResourceLoader::didChangePriority): Deleted. * loader/ResourceLoader.h: * loader/cache/CachedResource.cpp: (WebCore::CachedResource::setLoadPriority): * platform/network/ResourceHandle.cpp: (WebCore::ResourceHandle::didChangePriority): Deleted. * platform/network/ResourceHandle.h: 2014-08-24 Brian J. Burg Web Inspector: rename Inspector::TypeBuilder to Inspector::Protocol https://bugs.webkit.org/show_bug.cgi?id=136031 Reviewed by Timothy Hatcher. Rename TypeBuilder namespace to Protocol. Disambiguate where necessary. Also rename InspectorTypeBuilder to ProtocolTypes. * CMakeLists.txt: * DerivedSources.make: * ForwardingHeaders/inspector/InspectorJSTypeBuilders.h: Removed. * ForwardingHeaders/inspector/InspectorTypeBuilder.h: Removed. * WebCore.order: * WebCore.vcxproj/WebCore.vcxproj: * WebCore.vcxproj/WebCore.vcxproj.filters: * WebCore.xcodeproj/project.pbxproj: * inspector/CommandLineAPIHost.cpp: (WebCore::CommandLineAPIHost::inspectImpl): * inspector/InspectorApplicationCacheAgent.cpp: (WebCore::InspectorApplicationCacheAgent::getFramesWithManifests): (WebCore::InspectorApplicationCacheAgent::getApplicationCacheForFrame): (WebCore::InspectorApplicationCacheAgent::buildObjectForApplicationCache): (WebCore::InspectorApplicationCacheAgent::buildArrayForApplicationCacheResources): (WebCore::InspectorApplicationCacheAgent::buildObjectForApplicationCacheResource): * inspector/InspectorApplicationCacheAgent.h: * inspector/InspectorCSSAgent.cpp: (WebCore::InspectorCSSAgent::getMatchedStylesForNode): (WebCore::InspectorCSSAgent::getInlineStylesForNode): (WebCore::InspectorCSSAgent::getComputedStyleForNode): (WebCore::InspectorCSSAgent::getAllStyleSheets): (WebCore::InspectorCSSAgent::getStyleSheet): (WebCore::InspectorCSSAgent::setStyleText): (WebCore::InspectorCSSAgent::setPropertyText): (WebCore::InspectorCSSAgent::toggleProperty): (WebCore::InspectorCSSAgent::setRuleSelector): (WebCore::InspectorCSSAgent::addRule): (WebCore::InspectorCSSAgent::getSupportedCSSProperties): (WebCore::InspectorCSSAgent::getNamedFlowCollection): (WebCore::InspectorCSSAgent::asInspectorStyleSheet): (WebCore::InspectorCSSAgent::collectStyleSheets): (WebCore::InspectorCSSAgent::viaInspectorStyleSheet): (WebCore::InspectorCSSAgent::detectOrigin): (WebCore::InspectorCSSAgent::buildObjectForRule): (WebCore::InspectorCSSAgent::buildArrayForRuleList): (WebCore::InspectorCSSAgent::buildArrayForMatchedRuleList): (WebCore::InspectorCSSAgent::buildObjectForAttributesStyle): (WebCore::InspectorCSSAgent::buildArrayForRegions): (WebCore::InspectorCSSAgent::buildObjectForNamedFlow): * inspector/InspectorCSSAgent.h: * inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::didCreateFrontendAndBackend): (WebCore::InspectorDOMAgent::getDocument): (WebCore::InspectorDOMAgent::pushChildNodesToFrontend): (WebCore::InspectorDOMAgent::querySelectorAll): (WebCore::InspectorDOMAgent::pushNodePathToFrontend): (WebCore::InspectorDOMAgent::getEventListenersForNode): (WebCore::InspectorDOMAgent::getAccessibilityPropertiesForNode): (WebCore::InspectorDOMAgent::getSearchResults): (WebCore::InspectorDOMAgent::resolveNode): (WebCore::InspectorDOMAgent::getAttributes): (WebCore::InspectorDOMAgent::buildObjectForNode): (WebCore::InspectorDOMAgent::buildArrayForElementAttributes): (WebCore::InspectorDOMAgent::buildArrayForContainerChildren): (WebCore::InspectorDOMAgent::buildObjectForEventListener): (WebCore::InspectorDOMAgent::processAccessibilityChildren): (WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties): (WebCore::InspectorDOMAgent::didCommitLoad): (WebCore::InspectorDOMAgent::didInsertDOMNode): (WebCore::InspectorDOMAgent::styleAttributeInvalidated): * inspector/InspectorDOMAgent.h: * inspector/InspectorDOMDebuggerAgent.cpp: (WebCore::InspectorDOMDebuggerAgent::descriptionForDOMEvent): * inspector/InspectorDOMStorageAgent.cpp: (WebCore::InspectorDOMStorageAgent::getDOMStorageItems): (WebCore::InspectorDOMStorageAgent::storageId): (WebCore::InspectorDOMStorageAgent::didDispatchDOMStorageEvent): * inspector/InspectorDOMStorageAgent.h: * inspector/InspectorDatabaseAgent.cpp: (WebCore::InspectorDatabaseAgent::getDatabaseTableNames): * inspector/InspectorDatabaseAgent.h: * inspector/InspectorDatabaseResource.cpp: (WebCore::InspectorDatabaseResource::bind): * inspector/InspectorIndexedDBAgent.cpp: * inspector/InspectorLayerTreeAgent.cpp: (WebCore::InspectorLayerTreeAgent::layersForNode): (WebCore::InspectorLayerTreeAgent::gatherLayersUsingRenderObjectHierarchy): (WebCore::InspectorLayerTreeAgent::gatherLayersUsingRenderLayerHierarchy): (WebCore::InspectorLayerTreeAgent::buildObjectForLayer): (WebCore::InspectorLayerTreeAgent::buildObjectForIntRect): (WebCore::InspectorLayerTreeAgent::reasonsForCompositingLayer): * inspector/InspectorLayerTreeAgent.h: * inspector/InspectorPageAgent.cpp: (WebCore::InspectorPageAgent::resourceTypeJson): (WebCore::InspectorPageAgent::cachedResourceTypeJson): (WebCore::buildObjectForCookie): (WebCore::buildArrayForCookies): (WebCore::InspectorPageAgent::getCookies): (WebCore::InspectorPageAgent::getResourceTree): (WebCore::InspectorPageAgent::searchInResource): (WebCore::buildObjectForSearchResult): (WebCore::InspectorPageAgent::searchInResources): (WebCore::InspectorPageAgent::buildObjectForFrame): (WebCore::InspectorPageAgent::buildObjectForFrameTree): * inspector/InspectorPageAgent.h: * inspector/InspectorReplayAgent.cpp: (WebCore::buildInspectorObjectForPosition): (WebCore::buildInspectorObjectForInput): (WebCore::buildInspectorObjectForSession): (WebCore::buildInspectorObjectForSessionState): (WebCore::buildInspectorObjectForSegmentState): (WebCore::SerializeInputToJSONFunctor::SerializeInputToJSONFunctor): (WebCore::SerializeInputToJSONFunctor::operator()): (WebCore::buildInspectorObjectForSegment): (WebCore::InspectorReplayAgent::switchSession): (WebCore::InspectorReplayAgent::insertSessionSegment): (WebCore::InspectorReplayAgent::removeSessionSegment): (WebCore::InspectorReplayAgent::currentReplayState): (WebCore::InspectorReplayAgent::getAvailableSessions): (WebCore::InspectorReplayAgent::getSessionData): (WebCore::InspectorReplayAgent::getSegmentData): * inspector/InspectorReplayAgent.h: * inspector/InspectorResourceAgent.cpp: (WebCore::buildObjectForTiming): (WebCore::buildObjectForResourceRequest): (WebCore::buildObjectForResourceResponse): (WebCore::buildObjectForCachedResource): (WebCore::InspectorResourceAgent::willSendRequest): (WebCore::InspectorResourceAgent::didReceiveResponse): (WebCore::InspectorResourceAgent::didLoadResourceFromMemoryCache): (WebCore::InspectorResourceAgent::buildInitiatorObject): (WebCore::InspectorResourceAgent::willSendWebSocketHandshakeRequest): (WebCore::InspectorResourceAgent::didReceiveWebSocketHandshakeResponse): (WebCore::InspectorResourceAgent::didReceiveWebSocketFrame): (WebCore::InspectorResourceAgent::didSendWebSocketFrame): * inspector/InspectorResourceAgent.h: * inspector/InspectorStyleSheet.cpp: (WebCore::buildSourceRangeObject): (WebCore::buildMediaObject): (WebCore::fillMediaListChain): (WebCore::InspectorStyle::buildObjectForStyle): (WebCore::InspectorStyle::buildArrayForComputedStyle): (WebCore::InspectorStyle::styleWithProperties): (WebCore::InspectorStyleSheet::create): (WebCore::InspectorStyleSheet::InspectorStyleSheet): (WebCore::InspectorStyleSheet::buildObjectForStyleSheet): (WebCore::InspectorStyleSheet::buildObjectForStyleSheetInfo): (WebCore::selectorsFromSource): (WebCore::InspectorStyleSheet::buildObjectForSelectorList): (WebCore::InspectorStyleSheet::buildObjectForRule): (WebCore::InspectorStyleSheet::buildObjectForStyle): (WebCore::InspectorStyleSheet::resourceStyleSheetText): (WebCore::InspectorStyleSheet::buildArrayForRuleList): (WebCore::InspectorStyleSheetForInlineStyle::create): (WebCore::InspectorStyleSheetForInlineStyle::InspectorStyleSheetForInlineStyle): * inspector/InspectorStyleSheet.h: (WebCore::InspectorStyleSheet::canBind): * inspector/InspectorTimelineAgent.cpp: (WebCore::toProtocol): (WebCore::InspectorTimelineAgent::addRecordToTimeline): (WebCore::InspectorTimelineAgent::sendEvent): * inspector/PageRuntimeAgent.cpp: 2014-08-25 Brendan Long [GStreamer] ASSERT failure in WebKitWebSource in StreamingClient https://bugs.webkit.org/show_bug.cgi?id=136132 adoptGRef() has an ASSERT failure if it's used on a floating pointer. For some reason, WebKitWebSrc* src in StreamingClient's constructor is floating. Since we don't construct this ourselves, I assume this is happening in Playbin. If we remove the ref and adopt, GRefPtr's constructor calls gst_object_ref_sink, which removes the floating reference and doesn't increment the reference count. This should work, but actually causes the page to either lock up or crash (different results for different testers). In this case, it seems like the adoptGRef / gst_object_ref was the correct thing to do, but adoptGRef won't actually let us do. Removing the ASSERT is a bad idea, because usually we don't want to adopt floating pointers. This is all a long way of saying that making m_src a raw pointer and manually calling gst_object_ref(), and calling gst_object_unref in the destructor is the best solution in this case, since it fixes the problem while leaving the ASSERT to protect us in the much more common case where adopting a floating reference is bad. Reviewed by Philippe Normand. * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp: (StreamingClient::StreamingClient): Make m_src a raw pointer instead of a GRefPtr. (StreamingClient::~StreamingClient): Unref m_src. (StreamingClient::createReadBuffer): Replace m_src.get() with m_src, since it's a raw pointer now. (StreamingClient::handleResponseReceived): Same. (StreamingClient::handleDataReceived): Same. (StreamingClient::handleNotifyFinished): Same. (CachedResourceStreamingClient::notifyFinished): Same. (ResourceHandleStreamingClient::didFail): Same. (ResourceHandleStreamingClient::wasBlocked): Same. (ResourceHandleStreamingClient::cannotShowURL): Same. 2014-08-25 Zan Dobersek [GTK] Remove PopupMenuGtk, SearchPopupMenuGtk https://bugs.webkit.org/show_bug.cgi?id=136211 Reviewed by Carlos Garcia Campos. Remove the two classes from the codebase. They're not used anymore after the WebKit1 layer of the GTK port was removed some time ago. * PlatformGTK.cmake: * platform/gtk/PopupMenuGtk.cpp: Removed. * platform/gtk/PopupMenuGtk.h: Removed. * platform/gtk/SearchPopupMenuGtk.cpp: Removed. * platform/gtk/SearchPopupMenuGtk.h: Removed. 2014-08-25 Shivakumar JM Web Core: Fix unused parameter build warning. https://bugs.webkit.org/show_bug.cgi?id=136208 Reviewed by Darin Adler. Fix unused build warning by removing parameter, which is not used. * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp: (WebCore::CoordinatedGraphicsLayer::setContentsToPlatformLayer): 2014-08-22 Sergio Villar Senin ASSERTION FAILED: !trackSizes.isEmpty() in WebCore::createGridTrackList https://bugs.webkit.org/show_bug.cgi?id=136149 Reviewed by Darin Adler. The second argument of the repeat() function is a that must have at least one . Should it not be found, the declaration must be invalidated. * css/CSSParser.cpp: (WebCore::CSSParser::parseGridTrackRepeatFunction): 2014-08-24 Zan Dobersek Move WebCore storage code to C++11 lambdas, std::function https://bugs.webkit.org/show_bug.cgi?id=126435 Reviewed by Darin Adler. Use C++11 lambdas instead of WTF::bind and std::function instead of WTF::Function in StorageAreaSync, StorageSyncManager, StorageThread and StorageTracker classes. * storage/StorageAreaSync.cpp: (WebCore::StorageAreaSync::StorageAreaSync): (WebCore::StorageAreaSync::scheduleFinalSync): (WebCore::StorageAreaSync::syncTimerFired): * storage/StorageSyncManager.cpp: (WebCore::StorageSyncManager::dispatch): * storage/StorageSyncManager.h: * storage/StorageThread.cpp: (WebCore::StorageThread::dispatch): (WebCore::StorageThread::terminate): (WebCore::StorageThread::releaseFastMallocFreeMemoryInAllThreads): * storage/StorageThread.h: * storage/StorageTracker.cpp: (WebCore::StorageTracker::importOriginIdentifiers): (WebCore::StorageTracker::syncImportOriginIdentifiers): (WebCore::StorageTracker::syncFileSystemAndTrackerDatabase): (WebCore::StorageTracker::setOriginDetails): (WebCore::StorageTracker::deleteAllOrigins): (WebCore::StorageTracker::deleteOrigin): 2014-08-24 Alexey Proskuryakov ASSERT(extractable()) when storing a non-extractable key in IndexedDB https://bugs.webkit.org/show_bug.cgi?id=136202 rdar://problem/17993967 Reviewed by Darin Adler. Test: crypto/subtle/rsa-indexeddb-non-exportable.html Removed the obsolete assertion. * crypto/keys/CryptoKeyAES.cpp: (WebCore::CryptoKeyAES::exportData): * crypto/keys/CryptoKeyHMAC.cpp: (WebCore::CryptoKeyHMAC::exportData): * crypto/mac/CryptoKeyRSAMac.cpp: (WebCore::CryptoKeyRSA::exportData): 2014-08-24 Brian J. Burg Web Inspector: Rename DOM.RGBA and remove workarounds in the bindings generator https://bugs.webkit.org/show_bug.cgi?id=136025 Reviewed by Joseph Pecoraro. Rename DOM.RGBA to DOM.RGBAColor to avoid name clashes with headers on Windows CE. This workaround used to be special-cased in the bindings generator. Type names are not used in protocol messages, so this does not introduce legacy issues. * inspector/protocol/DOM.json: 2014-08-24 Michael Catanzaro [GTK] Toggle buttons visually broken with GTK+ 3.13.7 https://bugs.webkit.org/show_bug.cgi?id=136130 Reviewed by Martin Robinson. No new tests. Hopefully covered by existing tests, and our tests only run with GTK+ 3.6 anyway. * platform/gtk/RenderThemeGtk3.cpp: (WebCore::paintToggle): use GTK_STATE_FLAG_CHECKED when compiling for GTK+ 3.13.7 and above to ensure toggle buttons display as toggled. 2014-08-23 Brady Eidson Random Gamepad cleanup https://bugs.webkit.org/show_bug.cgi?id=136193 Reviewed by Sam Weinig. No new tests (Not tested yet, and no change in behavior anyways) - Use DOMWindow WeakPtrs when iterating - More references instead of pointers * Modules/gamepad/GamepadEvent.cpp: (WebCore::GamepadEvent::GamepadEvent): * Modules/gamepad/GamepadEvent.h: (WebCore::GamepadEvent::create): * Modules/gamepad/GamepadManager.cpp: (WebCore::GamepadManager::platformGamepadDisconnected): (WebCore::GamepadManager::makeGamepadVisible): * Modules/gamepad/NavigatorGamepad.cpp: (WebCore::NavigatorGamepad::gamepadFromPlatformGamepad): (WebCore::NavigatorGamepad::gamepadAtIndex): Deleted. * Modules/gamepad/NavigatorGamepad.h: * page/DOMWindow.cpp: (WebCore::DOMWindow::DOMWindow): * page/DOMWindow.h: 2014-08-23 Byungseon Shin Unify GraphicsLayer::setContentsToMedia and setContentsToCanvas https://bugs.webkit.org/show_bug.cgi?id=109658 Reviewed by Martin Robinson. Based on patch originally written by Tim Horton. Merge setContentsToMedia and setContentsToCanvas into setContentsToPlatformLayer. * WebCore.exp.in: Adjust exports. * platform/graphics/GraphicsLayer.h: Move ContentsLayerPurpose enum up out of GraphicsLayer platform implmentations and into GraphicsLayer, so we can use it as a parameter. Add ContentsLayerForPlugin. (WebCore::GraphicsLayer::setContentsToPlatformLayer): Remove setContentsToMedia and setContentsToCanvas, and replace them with setContentsToPlatformLayer, which previously existed but was unused and simply called setContentsToMedia. setContentsToPlatformLayer takes a ContentsLayerPurpose, primarily so that GraphicsLayerCA can know whether it needs to setNeedsDisplay the layer when parenting it (canvas) or not (everything else). * platform/graphics/ca/GraphicsLayerCA.cpp: (WebCore::GraphicsLayerCA::setContentsToPlatformLayer): Rename function setContentsToMedia -> setContentsToPlatformLayer. Rename argument mediaLayer -> platformLayer. Store the passed-in ContentsLayerPurpose. Remove setContentsToCanvas. (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers): (WebCore::GraphicsLayerCA::updateContentsPlatformLayer): Remove updateContentsMediaLayer and updateContentsCanvas layer, add updateContentsPlatformLayer. * platform/graphics/ca/GraphicsLayerCA.h: Do the same to the LayerChange enum. * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp: (WebCore::GraphicsLayerTextureMapper::setContentsToImage): (WebCore::GraphicsLayerTextureMapper::setContentsToPlatformLayer): * platform/graphics/texmap/GraphicsLayerTextureMapper.h: * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp: (WebCore::CoordinatedGraphicsLayer::CoordinatedGraphicsLayer): (WebCore::CoordinatedGraphicsLayer::setContentsNeedsDisplay): (WebCore::CoordinatedGraphicsLayer::setContentsToPlatformLayer): (WebCore::CoordinatedGraphicsLayer::syncPlatformLayer): (WebCore::CoordinatedGraphicsLayer::destroyPlatformLayerIfNeeded): (WebCore::CoordinatedGraphicsLayer::createPlatformLayerIfNeeded): (WebCore::CoordinatedGraphicsLayer::flushCompositingStateForThisLayerOnly): Fold these together in the same way as elsewhere. * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h: Do the same to the LayerChange enum. * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp: (WebCore::CoordinatedGraphicsScene::createPlatformLayerIfNeeded): (WebCore::CoordinatedGraphicsScene::syncPlatformLayerIfNeeded): (WebCore::CoordinatedGraphicsScene::destroyPlatformLayerIfNeeded): (WebCore::CoordinatedGraphicsScene::setLayerState): * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.h: * platform/graphics/texmap/coordinated/CoordinatedGraphicsState.h: (WebCore::CoordinatedGraphicsLayerState::CoordinatedGraphicsLayerState): Rename canvasLayer -> platformLayer. * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::updateConfiguration): Use the new setContentsToPlatformLayer, passing in the relevant ContentsLayerPurpose. 2014-08-23 Joseph Pecoraro Web Inspector: Do not copy large module source strings https://bugs.webkit.org/show_bug.cgi?id=136191 Reviewed by Benjamin Poulain. * inspector/CommandLineAPIModule.cpp: (WebCore::CommandLineAPIModule::source): 2014-08-23 Zan Dobersek Remove uses of CrossThreadTask in ThreadableWebSocketChannelClientWrapper, WorkerThreadableWebSocketChannel https://bugs.webkit.org/show_bug.cgi?id=133954 Reviewed by Darin Adler. Replace uses of CrossThreadTask with C++11 lambdas in the ThreadableWebSocketChannelClientWrapper and WorkerThreadableWebSocketChannel classes. * Modules/websockets/ThreadableWebSocketChannelClientWrapper.cpp: (WebCore::ThreadableWebSocketChannelClientWrapper::didConnect): (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveMessage): (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveBinaryData): (WebCore::ThreadableWebSocketChannelClientWrapper::didUpdateBufferedAmount): (WebCore::ThreadableWebSocketChannelClientWrapper::didStartClosingHandshake): (WebCore::ThreadableWebSocketChannelClientWrapper::didClose): (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveMessageError): (WebCore::ThreadableWebSocketChannelClientWrapper::processPendingTasks): (WebCore::ThreadableWebSocketChannelClientWrapper::processPendingTasksCallback): Deleted. (WebCore::ThreadableWebSocketChannelClientWrapper::didConnectCallback): Deleted. (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveMessageCallback): Deleted. (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveBinaryDataCallback): Deleted. (WebCore::ThreadableWebSocketChannelClientWrapper::didUpdateBufferedAmountCallback): Deleted. (WebCore::ThreadableWebSocketChannelClientWrapper::didStartClosingHandshakeCallback): Deleted. (WebCore::ThreadableWebSocketChannelClientWrapper::didCloseCallback): Deleted. (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveMessageErrorCallback): Deleted. * Modules/websockets/ThreadableWebSocketChannelClientWrapper.h: * Modules/websockets/WorkerThreadableWebSocketChannel.cpp: (WebCore::WorkerThreadableWebSocketChannel::Peer::send): (WebCore::WorkerThreadableWebSocketChannel::Peer::bufferedAmount): (WebCore::WorkerThreadableWebSocketChannel::Peer::didConnect): (WebCore::WorkerThreadableWebSocketChannel::Peer::didReceiveMessage): (WebCore::WorkerThreadableWebSocketChannel::Peer::didReceiveBinaryData): (WebCore::WorkerThreadableWebSocketChannel::Peer::didUpdateBufferedAmount): (WebCore::WorkerThreadableWebSocketChannel::Peer::didStartClosingHandshake): (WebCore::WorkerThreadableWebSocketChannel::Peer::didClose): (WebCore::WorkerThreadableWebSocketChannel::Peer::didReceiveMessageError): (WebCore::WorkerThreadableWebSocketChannel::Bridge::mainThreadInitialize): (WebCore::WorkerThreadableWebSocketChannel::Bridge::connect): (WebCore::WorkerThreadableWebSocketChannel::Bridge::send): (WebCore::WorkerThreadableWebSocketChannel::Bridge::bufferedAmount): (WebCore::WorkerThreadableWebSocketChannel::Bridge::close): (WebCore::WorkerThreadableWebSocketChannel::Bridge::fail): (WebCore::WorkerThreadableWebSocketChannel::Bridge::disconnect): (WebCore::WorkerThreadableWebSocketChannel::Bridge::suspend): (WebCore::WorkerThreadableWebSocketChannel::Bridge::resume): (WebCore::workerGlobalScopeDidSend): Deleted. (WebCore::workerGlobalScopeDidGetBufferedAmount): Deleted. (WebCore::workerGlobalScopeDidConnect): Deleted. (WebCore::workerGlobalScopeDidReceiveMessage): Deleted. (WebCore::workerGlobalScopeDidReceiveBinaryData): Deleted. (WebCore::workerGlobalScopeDidUpdateBufferedAmount): Deleted. (WebCore::workerGlobalScopeDidStartClosingHandshake): Deleted. (WebCore::workerGlobalScopeDidClose): Deleted. (WebCore::workerGlobalScopeDidReceiveMessageError): Deleted. (WebCore::WorkerThreadableWebSocketChannel::mainThreadConnect): Deleted. (WebCore::WorkerThreadableWebSocketChannel::mainThreadSend): Deleted. (WebCore::WorkerThreadableWebSocketChannel::mainThreadSendArrayBuffer): Deleted. (WebCore::WorkerThreadableWebSocketChannel::mainThreadSendBlob): Deleted. (WebCore::WorkerThreadableWebSocketChannel::mainThreadBufferedAmount): Deleted. (WebCore::WorkerThreadableWebSocketChannel::mainThreadClose): Deleted. (WebCore::WorkerThreadableWebSocketChannel::mainThreadFail): Deleted. (WebCore::WorkerThreadableWebSocketChannel::mainThreadDestroy): Deleted. (WebCore::WorkerThreadableWebSocketChannel::mainThreadSuspend): Deleted. (WebCore::WorkerThreadableWebSocketChannel::mainThreadResume): Deleted. * Modules/websockets/WorkerThreadableWebSocketChannel.h: 2014-08-23 Yusuke Suzuki Clean up build warnings: control reaches end of non-void function https://bugs.webkit.org/show_bug.cgi?id=135889 Reviewed by Alexey Proskuryakov. * bindings/js/JSCryptoAlgorithmDictionary.cpp: (WebCore::JSCryptoAlgorithmDictionary::createParametersForEncrypt): (WebCore::JSCryptoAlgorithmDictionary::createParametersForDecrypt): (WebCore::JSCryptoAlgorithmDictionary::createParametersForSign): (WebCore::JSCryptoAlgorithmDictionary::createParametersForVerify): (WebCore::JSCryptoAlgorithmDictionary::createParametersForDigest): (WebCore::JSCryptoAlgorithmDictionary::createParametersForGenerateKey): (WebCore::JSCryptoAlgorithmDictionary::createParametersForDeriveKey): (WebCore::JSCryptoAlgorithmDictionary::createParametersForDeriveBits): (WebCore::JSCryptoAlgorithmDictionary::createParametersForImportKey): (WebCore::JSCryptoAlgorithmDictionary::createParametersForExportKey): * crypto/CryptoKey.cpp: (WebCore::CryptoKey::type): 2014-08-23 Zan Dobersek [TexMap] Only notify of a required flush on the first layer property change https://bugs.webkit.org/show_bug.cgi?id=136104 Reviewed by Martin Robinson. The GraphicsLayer's client should only be notified that a flush is required when the first change of one of the layer's properties is initiated, instead of requesting the flush on every such change. * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp: (WebCore::GraphicsLayerTextureMapper::notifyChange): 2014-08-22 Dan Bernstein Try to fix the Mac build using the internal SDK. * bindings/objc/PublicDOMInterfaces.h: 2014-08-22 Renato Nagy Remove LevelDB. https://bugs.webkit.org/show_bug.cgi?id=136170 Reviewed by Gyuyoung Kim. * CMakeLists.txt: * Modules/indexeddb/IDBObjectStore.cpp: (WebCore::IDBObjectStore::createIndex): * Modules/indexeddb/IDBTransactionCoordinator.cpp: (WebCore::IDBTransactionCoordinator::canRunTransaction): (WebCore::doScopesOverlap): Deleted. * Modules/indexeddb/leveldb/IDBBackingStoreCursorLevelDB.cpp: Removed. * Modules/indexeddb/leveldb/IDBBackingStoreCursorLevelDB.h: Removed. * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp: Removed. * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.h: Removed. * Modules/indexeddb/leveldb/IDBBackingStoreTransactionLevelDB.cpp: Removed. * Modules/indexeddb/leveldb/IDBBackingStoreTransactionLevelDB.h: Removed. * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.cpp: Removed. * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.h: Removed. * Modules/indexeddb/leveldb/IDBIndexWriterLevelDB.cpp: Removed. * Modules/indexeddb/leveldb/IDBIndexWriterLevelDB.h: Removed. * Modules/indexeddb/leveldb/IDBLevelDBCoding.cpp: Removed. * Modules/indexeddb/leveldb/IDBLevelDBCoding.h: Removed. * Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.cpp: Removed. * Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.h: Removed. * WebCore.vcxproj/WebCore.vcxproj: * WebCore.vcxproj/WebCore.vcxproj.filters: * WebCore.xcodeproj/project.pbxproj: * platform/DatabaseStrategy.cpp: (WebCore::DatabaseStrategy::createIDBFactoryBackend): * platform/leveldb/LevelDBComparator.h: Removed. * platform/leveldb/LevelDBDatabase.cpp: Removed. * platform/leveldb/LevelDBDatabase.h: Removed. * platform/leveldb/LevelDBIterator.h: Removed. * platform/leveldb/LevelDBSlice.h: Removed. * platform/leveldb/LevelDBTransaction.cpp: Removed. * platform/leveldb/LevelDBTransaction.h: Removed. * platform/leveldb/LevelDBWriteBatch.cpp: Removed. * platform/leveldb/LevelDBWriteBatch.h: Removed. 2014-08-22 KwangHyuk Kim [EFL] Fix build break caused by ENABLE_GAMEPAD_DEPRECATED. https://bugs.webkit.org/show_bug.cgi?id=136110 Reviewed by Gyuyoung Kim. WebCore_INCLUDE_DIRECTORY for gamepad was removed from WK2 Efl in order to fix build break when ENABLE_GAMEPAD_DEPRECATED is on. No new tests because no functional changes. * PlatformEfl.cmake: 2014-08-22 Benjamin Poulain Style invalidation does not work for adjacent node updates https://bugs.webkit.org/show_bug.cgi?id=136145 Reviewed by Antti Koivisto. There were a bunch of cases in which the style would be in an inconsistent state until the style resolver kicks in for the entire document. For example, let's take the selector "foo.bar + target". When the class "bar" changes, the element foo is invalidated. The element target is untouched. Now, if the style of "target" is accessed, nodeOrItsAncestorNeedsStyleRecalc() returns false and the old style is accessed. At some point, when the style of the entire document is resolved, the node "foo" is styled, and "target" is invalidated. To fix the issue, this patch adds an extra flag keeping track of subtrees that have any node needing style recalc: DirectChildNeedsStyleRecalcFlag. When invalidating the node "foo", its parent is marked with DirectChildNeedsStyleRecalcFlag to note that one of the child nodes has an invalid style. When verifying the style state in nodeOrItsAncestorNeedsStyleRecalc(), we check that flag in addition to the siblings dependencies to find if the node is part of a subtree that may be invalid due to sibling selectors. Similarly, in the style resolver, we use the flag to clear the style on all elements that could potentially be invalid. This patch removes the changes introduced by r172721 (The style is not updated correctly when the pseudo class :empty is applied on anything but the rightmost element). That bug was just a special case of what is solved here. Tests: fast/selectors/attribute-direct-adjacent-style-update.html fast/selectors/attribute-sibling-style-update.html fast/selectors/class-direct-adjacent-style-update.html fast/selectors/class-sibling-style-update.html fast/selectors/first-child-direct-adjacent-style-update.html fast/selectors/first-child-sibling-style-update.html * css/SelectorChecker.cpp: (WebCore::SelectorChecker::checkOne): * cssjit/SelectorCompiler.cpp: (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsEmpty): (WebCore::SelectorCompiler::setStyleOfSiblingsAffectedByEmpty): Deleted. * dom/ContainerNode.h: (WebCore::ContainerNode::directChildNeedsStyleRecalc): (WebCore::ContainerNode::setDirectChildNeedsStyleRecalc): Remove the special case for :empty. * dom/Document.cpp: (WebCore::nodeOrItsAncestorNeedsStyleRecalc): * dom/Element.cpp: (WebCore::checkForEmptyStyleChange): (WebCore::checkForSiblingStyleChanges): (WebCore::Element::setStyleOfSiblingsAffectedByEmpty): Deleted. (WebCore::Element::rareDataStyleOfSiblingsAffectedByEmpty): Deleted. * dom/Element.h: (WebCore::Element::styleOfSiblingsAffectedByEmpty): Deleted. * dom/ElementRareData.h: (WebCore::ElementRareData::ElementRareData): (WebCore::ElementRareData::styleOfSiblingsAffectedByEmpty): Deleted. (WebCore::ElementRareData::setStyleOfSiblingsAffectedByEmpty): Deleted. * dom/Node.cpp: (WebCore::markAncestorsWithChildNeedsStyleRecalc): (WebCore::Node::setNeedsStyleRecalc): (WebCore::Node::markAncestorsWithChildNeedsStyleRecalc): Deleted. * dom/Node.h: (WebCore::Node::clearChildNeedsStyleRecalc): * style/StyleResolveTree.cpp: (WebCore::Style::resetStyleForNonRenderedDescendants): 2014-08-22 Joseph Pecoraro Remove unused legacy InspectorFrontendHost methods https://bugs.webkit.org/show_bug.cgi?id=136186 Reviewed by Andreas Kling. * bindings/js/JSInspectorFrontendHostCustom.cpp: (WebCore::JSInspectorFrontendHost::recordActionTaken): Deleted. (WebCore::JSInspectorFrontendHost::recordPanelShown): Deleted. (WebCore::JSInspectorFrontendHost::recordSettingChanged): Deleted. * inspector/InspectorFrontendHost.idl: 2014-08-22 Joseph Pecoraro Remove unnecessary WTFString creation in Dictionary getter https://bugs.webkit.org/show_bug.cgi?id=136184 Reviewed by Benjamin Poulain. * bindings/js/Dictionary.cpp: (WebCore::Dictionary::getWithUndefinedOrNullCheck): * bindings/js/Dictionary.h: * bindings/js/JSDictionary.cpp: (WebCore::JSDictionary::getWithUndefinedOrNullCheck): * bindings/js/JSDictionary.h: 2014-08-22 Commit Queue Unreviewed, rolling out r172866. https://bugs.webkit.org/show_bug.cgi?id=136177 Broke iOS build (Requested by othermaciej on #webkit). Reverted changeset: "Replace use of WKCopyCFLocalizationPreferredName with NSLocale public API" https://bugs.webkit.org/show_bug.cgi?id=136082 http://trac.webkit.org/changeset/172866 2014-08-22 David Hyatt Add proper support for letter-spacing to bopomofo Ruby https://bugs.webkit.org/show_bug.cgi?id=136171 Reviewed by Sam Weinig. Added fast/ruby/bopomofo-letter-spacing.html * rendering/RenderRubyRun.cpp: (WebCore::RenderRubyRun::layout): Alter the layout of bopomofo ruby so that the distance between the base characters is the max of the letter-spacing between the characters and the minimum required width to hold two rows of Ruby. Push the bopomofo ruby into the letter-spacing to ensure that it comes right after the base character and not after all the letter-spacing. 2014-08-22 Simon Fraser Fix showing paint rects when selecting lines in the timeline https://bugs.webkit.org/show_bug.cgi?id=136173 Reviewed by Joseph Pecoraro. Fix the condition used to decide when to show the overlay. * inspector/InspectorOverlay.cpp: (WebCore::InspectorOverlay::shouldShowOverlay): 2014-08-22 Simon Fraser Use the correct rect for paint flashing https://bugs.webkit.org/show_bug.cgi?id=136169 Reviewed by Sam Weinig. Use the rect we've converted to root document coordinates for paint flashing. * inspector/InspectorPageAgent.cpp: (WebCore::InspectorPageAgent::didPaint): 2014-08-22 Dean Jackson Google Canvas2D maps are too slow and uncontrollable with Safari with full screen mode https://bugs.webkit.org/show_bug.cgi?id=136168 Reviewed by Tim Horton. When Google maps are using their 2D "lite" fallback and you're drawing in a huge window such as fullscreen 4K, we would drop back to unaccelerated mode, thinking that we'd exceeded the maximum IOSurface size. Remove the hardcoded limit on IOSurface sizes, and instead ask the system what it believe the maximum to be. This was significantly higher than our limit on the systems I tested. * platform/graphics/cg/ImageBufferCG.cpp: (WebCore::ImageBuffer::ImageBuffer): Include our IOSurface wrapper, which has a query for maximum size, and use that instead. 2014-08-22 Simon Fraser Maybe fix Windows. * inspector/InspectorOverlay.cpp: (WebCore::InspectorOverlay::showPaintRect): 2014-08-22 Simon Fraser Implement paint flashing in the WK1 InspectorOverlay page https://bugs.webkit.org/show_bug.cgi?id=136138 Reviewed by Sam Weinig, Joseph Pecoraro. Implement paint flashing for the WebKit1 InspectorOverlay via a second canvas in the overlay page. We avoid allocating backing store for this canvas until we have paint rects. Because this overlay page is weird and doesn't know how to paint itself, InspectorOverlay manages an array of rects, and pushes them to the page when they change, before forcing a paint. Because iOS doesn't use the InspectorOverlay page, stub out setShowPaintRects on its WebKit WebInspectorClient, but don't yet implement paint flashing there. * inspector/InspectorOverlay.cpp: (WebCore::InspectorOverlay::InspectorOverlay): (WebCore::InspectorOverlay::shouldShowOverlay): (WebCore::InspectorOverlay::update): (WebCore::buildObjectForRect): (WebCore::InspectorOverlay::setShowingPaintRects): (WebCore::InspectorOverlay::showPaintRect): (WebCore::InspectorOverlay::updatePaintRectsTimerFired): (WebCore::InspectorOverlay::drawPaintRects): (WebCore::InspectorOverlay::forcePaint): (WebCore::quadToPath): Deleted. (WebCore::drawOutlinedQuad): Deleted. (WebCore::InspectorOverlay::drawOutline): Deleted. * inspector/InspectorOverlay.h: * inspector/InspectorOverlayPage.html: * inspector/InspectorOverlayPage.js: (updatePaintRects): (reset): (_drawShapeHighlight): * inspector/InspectorPageAgent.cpp: (WebCore::InspectorPageAgent::setShowPaintRects): (WebCore::InspectorPageAgent::didPaint): 2014-08-22 Eric Carlson [iOS] Cleanup media code https://bugs.webkit.org/show_bug.cgi?id=136163 Reviewed by Jer Noble. No new tests, no functionality was changed. * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::HTMLMediaElement): Don't initialize m_requestingPlay. (WebCore::HTMLMediaElement::parseMediaPlayerAttribute): Deleted. (WebCore::HTMLMediaElement::parseAttribute): Don't call parseMediaPlayerAttribute. (WebCore::HTMLMediaElement::playInternal): m_requestingPlay is dead, Jim. (WebCore::HTMLMediaElement::updatePlayState): Ditto. (WebCore::HTMLMediaElement::updatePlayState): Remove obsolete FIXME. * html/HTMLMediaElement.h: * platform/graphics/MediaPlayer.cpp: (WebCore::MediaPlayer::attributeChanged): Deleted. (WebCore::MediaPlayer::readyForPlayback): Deleted. * platform/graphics/MediaPlayer.h: * platform/graphics/MediaPlayerPrivate.h: (WebCore::MediaPlayerPrivateInterface::attributeChanged): Deleted. (WebCore::MediaPlayerPrivateInterface::readyForPlayback): Deleted. 2014-08-20 Maciej Stachowiak Replace use of WKCopyCFLocalizationPreferredName with NSLocale public API https://bugs.webkit.org/show_bug.cgi?id=136082 Reviewed by Alexey Proskuryakov. * platform/mac/Language.mm: (WebCore::httpStyleLanguageCode): Replace use of WKCopyCFLocalizationPreferredName with new WebCoreNSStringExtras helper. * platform/mac/WebCoreNSStringExtras.mm: Replacements for the aspects of WKCopyCFLocalizationPreferredName. (preferredBundleLocalizationName): New helper - most preferred localization available in the main bundle, canonicalized the way we like it. (canonicalLocalizationName): Convert a lcalization name to a string with language and country code, using default if necessary (e.g. "en" maps to "en_US"). * WebCore.order: Remove mention of WKCopyCFLocalizationPreferredName. * WebCore.exp.in: ditto; also export preferredBundleLocalizationName for WebKit(2). * platform/ios/WebCoreSystemInterfaceIOS.mm: ditto * platform/mac/WebCoreSystemInterface.h: ditto * platform/mac/WebCoreSystemInterface.mm: ditto 2014-08-22 Daniel Bates [iOS] Disable ENABLE_IOS_{GESTURE, TOUCH}_EVENTS, and temporarily disable ENABLE_TOUCH_EVENTS and ENABLE_XSLT when building with the iOS public SDK https://bugs.webkit.org/show_bug.cgi?id=135945 Reviewed by Andy Estes. Towards bringing up the iOS WebKit port using the iOS public SDK, disable the proprietary iOS gesture and touch event code. For now we also temporarily disable ENABLE_TOUCH_EVENTS and ENABLE_XSLT while we focus to get the rest of the port built using the public SDK. We'll look to enable these features once we stabilize the build. * Configurations/FeatureDefines.xcconfig: Disable ENABLE_IOS_{GESTURE, TOUCH}_EVENTS, ENABLE_TOUCH_EVENTS and ENABLE_XSLT when building with the public SDK. * Configurations/WebCore.xcconfig: * DerivedSources.make: Conditionally generate derived sources for touch and gesture events as applicable and pass define WTF_USE_APPLE_INTERNAL_SDK when generating bindings (if applicable). Make the logic for determining whether WTF_PLATFORM_IOS is defined consistent with logic for determining whether WTF_USE_APPLE_INTERNAL_SDK and ENABLE_ORIENTATION_EVENTS are defined. We should look to further cleanup this code. * bindings/js/ios/TouchConstructors.cpp: Substitute ENABLE(IOS_TOUCH_EVENTS) for macro expression "PLATFORM(IOS) && ENABLE(TOUCH_EVENTS)". * bindings/objc/DOMEvents.h: Write preprocessor logic in terms of ENABLE_TOUCH_EVENTS and ENABLE_IOS_GESTURE_EVENTS. * bindings/objc/PublicDOMInterfaces.h: Include private header when it exists as opposed to assuming it exists when building for iOS. * dom/Document.cpp: (WebCore::Document::Document): Substitute ENABLE(IOS_TOUCH_EVENTS) for macro expression "ENABLE(TOUCH_EVENTS) && PLATFORM(IOS)". (WebCore::Document::prepareForDestruction): Ditto. (WebCore::Document::removeAllEventListeners): Ditto. * dom/Document.h: Write preprocessor logic in terms of ENABLE_IOS_TOUCH_EVENTS and ENABLE_TOUCH_EVENTS. * dom/Document.idl: Ditto. * dom/Touch.h: Substitute ENABLE(IOS_TOUCH_EVENTS) for PLATFORM(IOS).. * dom/TouchEvent.h: Ditto. * dom/TouchList.h: Ditto. * dom/ios/TouchEvents.cpp: Substitute ENABLE(IOS_TOUCH_EVENTS) for macro expression "PLATFORM(IOS) && ENABLE(TOUCH_EVENTS)". * history/CachedFrame.cpp: Add PLATFORM(IOS) guard. * html/shadow/SliderThumbElement.cpp: (WebCore::SliderThumbElement::SliderThumbElement): Substitute ENABLE(IOS_TOUCH_EVENTS) for ENABLE(TOUCH_EVENTS). (WebCore::SliderThumbElement::willDetachRenderers): Ditto. * html/shadow/SliderThumbElement.h: Ditto. * loader/EmptyClients.h: Ditto. * platform/ios/PlatformEventFactoryIOS.h: Write preprocessor logic in terms of ENABLE_IOS_TOUCH_EVENTS and ENABLE_TOUCH_EVENTS. Only include header when building with ENABLE_TOUCH_EVENTS enabled. 2014-08-22 Simon Fraser Implement paint flashing via GraphicsLayers in the WK2 inspector overlay https://bugs.webkit.org/show_bug.cgi?id=136136 Reviewed by Sam Weinig, Joseph Pecoraro. Allow InspectorClient to have a custom implementation of showPaintRect(). For WebKit2's WebInspectorClient, implement this by creating a set of GraphicsLayers which are parented in a document overlay, with 0.25s fade-out animations. Also change InspectorInstrumentation::didPaintImpl() to no longer take a GraphicsContext; it makes no sense to paint the paint rects directly into the context of the web page. Now that the paint rects are painted into an overlay, the rectangles need to be converted to root document coordinates, which is done in InspectorInstrumentation::didPaintImpl(). Remove the generic InspectorOverlay::drawOutline()-based indicators; they will be reimplemented in a later patch. * WebCore.exp.in: * inspector/InspectorClient.h: (WebCore::InspectorClient::showPaintRect): * inspector/InspectorInstrumentation.cpp: (WebCore::InspectorInstrumentation::didPaintImpl): * inspector/InspectorInstrumentation.h: (WebCore::InspectorInstrumentation::didPaint): * inspector/InspectorPageAgent.cpp: (WebCore::InspectorPageAgent::didPaint): * inspector/InspectorPageAgent.h: * page/FrameView.cpp: (WebCore::FrameView::didPaintContents): * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::paintContents): 2014-08-22 Commit Queue Unreviewed, rolling out r172844. https://bugs.webkit.org/show_bug.cgi?id=136164 re-applying WEBCORE_EXPORTS patch (Requested by alexchristensen on #webkit). Reverted changeset: "Revert r172831, it broke the Windows build." http://trac.webkit.org/changeset/172844 2014-08-21 David Hyatt Implement rudimentary Bopomofo Ruby support (ruby-position:inter-character) https://bugs.webkit.org/show_bug.cgi?id=136137 Reviewed by Sam Weinig. Added fast/ruby/bopomofo.html and fast/ruby/bopomofo-rl.html. * css/CSSParser.cpp: (WebCore::isValidKeywordPropertyAndValue): * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): (WebCore::CSSPrimitiveValue::operator RubyPosition): * css/CSSPropertyNames.in: * css/CSSValueKeywords.in: Add support for the new inter-character value for ruby-position and also add support for a new font-size keyword, -webkit-ruby-text, that is used to set a smart initial font size based off the type of ruby being presented. * css/DeprecatedStyleBuilder.cpp: (WebCore::ApplyPropertyFontSize::determineRubyTextSizeMultiplier): (WebCore::ApplyPropertyFontSize::applyValue): Determine the Ruby text size multiplier when -webkit-ruby-text is specified as the font size. For ruby-position of before/after, we use 50% of the parent font size. For inter-character ruby, we default to 25% instead. If inter-character Ruby is nested, we assume it's to display tone marks, and we use 100% to ensure the tone mark is the same size and does not get smaller. * css/StyleResolver.cpp: (WebCore::StyleResolver::adjustStyleForInterCharacterRuby): (WebCore::StyleResolver::applyMatchedProperties): * css/StyleResolver.h: ruby-position is now the highest priority CSS property, and it is resolved before all other properties to ensure that its value can be checked when determining a smart default font size. adjustStyleForInterCharacterRuby is a new function called to auto-adjust inter-character ruby text to be vertical writing mode when encountered inside horizontal documents. * css/html.css: (ruby > rt): Change the font-size from 50% to -webkit-ruby-text to allow us to customize it as needed depending on what kind of Ruby we want to show. * rendering/RenderRubyRun.cpp: (WebCore::RenderRubyRun::layout): * rendering/RenderRubyRun.h: Add layout code to properly position vertical ruby text relative to a horizontal base. * rendering/style/RenderStyleConstants.h: Add the new inter-character constant for ruby-position. * rendering/style/StyleRareInheritedData.h: Increase the number of storage bits for RubyPosition from 1 to 2 now that we support 3 values. 2014-08-22 Jon Lee Fix iOS build due to r172832 and move RUBBER_BANDING out of FeatureDefines.h https://bugs.webkit.org/show_bug.cgi?id=136157 Reviewed by Simon Fraser. * Configurations/FeatureDefines.xcconfig: Add ENABLE(RUBBER_BANDING). 2014-08-22 Iago Toral and Zan Dobersek [GTK] Add the Wayland protocol extension https://bugs.webkit.org/show_bug.cgi?id=136102 Reviewed by Martin Robinson. Add the Wayland protocol extension that allows mapping GtkWidget objects (via an ID that's unique to that GtkWidget) to the corresponding Wayland surface objects. This way the nested compositor has the proper information about what GtkWidget has to be updated when surfaces are committed by the LayerTreeHost. * PlatformGTK.cmake: * platform/graphics/wayland: Added. * platform/graphics/wayland/WebKitGtkWaylandClientProtocol.xml: Added. 2014-08-21 Antti Koivisto Animated GIFs scrolled out of view still cause titlebar blur to update, on tumblr.com page https://bugs.webkit.org/show_bug.cgi?id=136139 Reviewed by Simon Fraser. The mechanism for pausing GIF images outside the viewport did not work for subframes. Test: fast/repaint/no-animation-outside-viewport-subframe.html * WebCore.exp.in: * page/FrameView.cpp: (WebCore::FrameView::scrollPositionChanged): (WebCore::FrameView::resumeVisibleImageAnimationsIncludingSubframes): Add a function for resuming animations as needed in all subframes. This is used after scrolling instead of calling the RenderView function directly. * page/FrameView.h: * page/Page.cpp: (WebCore::Page::resumeAnimatingImages): * rendering/RenderElement.cpp: (WebCore::RenderElement::newImageAnimationFrameAvailable): Determine the overall visible rect so that it is correct in subframes too. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::scrollTo): * rendering/RenderView.cpp: (WebCore::RenderView::resumePausedImageAnimationsIfNeeded): 2014-08-21 Alex Christensen More WEBCORE_EXPORT macros! https://bugs.webkit.org/show_bug.cgi?id=136146 Reviewed by Benjamin Poulain. * Modules/geolocation/GeolocationClient.h: * Modules/mediastream/UserMediaClient.h: * Modules/mediastream/UserMediaRequest.h: * Modules/notifications/NotificationClient.h: * Modules/speech/SpeechSynthesis.h: * bindings/generic/RuntimeEnabledFeatures.h: * bindings/js/DOMWrapperWorld.h: * bindings/js/GCController.h: * bindings/js/IDBBindingUtilities.h: * bindings/js/JSDOMBinding.h: * bindings/js/JSNodeCustom.h: * bindings/js/JSNodeListCustom.h: * bindings/js/JSPluginElementFunctions.h: * bindings/js/ScriptController.h: * bindings/js/SerializedScriptValue.h: * crypto/SerializedCryptoKeyWrap.h: * css/LengthFunctions.h: * css/StyleProperties.h: * css/StyleSheetContents.h: * dom/DeviceOrientationClient.h: * dom/Range.h: * dom/ScriptExecutionContext.h: * dom/StyledElement.h: * dom/TreeScope.h: * dom/UIEventWithKeyState.h: * dom/UserGestureIndicator.h: * dom/UserTypingGestureIndicator.h: * dom/ViewportArguments.h: * editing/SmartReplace.h: * editing/TextIterator.h: * editing/VisiblePosition.h: * editing/VisibleSelection.h: * editing/VisibleUnits.h: * editing/cocoa/HTMLConverter.h: * editing/htmlediting.h: * editing/mac/TextAlternativeWithRange.h: * editing/mac/TextUndoInsertionMarkupMac.h: * editing/markup.h: * history/HistoryItem.cpp: * history/PageCache.h: * html/TimeRanges.h: * html/parser/HTMLParserIdioms.h: * inspector/InstrumentingAgents.h: * loader/FrameLoader.h: * loader/ResourceBuffer.h: * loader/ResourceLoadScheduler.h: * loader/ResourceLoader.h: (WebCore::ResourceLoader::originalRequest): * loader/SubframeLoader.h: * loader/SubresourceLoader.h: * loader/TextResourceDecoder.h: * loader/appcache/ApplicationCacheStorage.h: * loader/cache/MemoryCache.h: * loader/icon/IconDatabaseBase.h: * loader/ios/DiskImageCacheIOS.h: * page/Chrome.h: * page/SecurityOrigin.h: * page/SecurityPolicy.h: * page/Settings.h: * page/UserContentController.h: * page/UserContentURLPattern.h: * page/UserMessageHandlerDescriptor.h: * page/ViewportConfiguration.h: * page/VisitedLinkStore.h: * page/WheelEventDeltaTracker.h: * page/cocoa/UserAgent.h: * page/scrolling/ScrollingConstraints.h: * page/scrolling/ScrollingCoordinator.h: * page/scrolling/ScrollingStateFixedNode.h: * page/scrolling/ScrollingStateFrameScrollingNode.h: * page/scrolling/ScrollingStateNode.h: * page/scrolling/ScrollingStateOverflowScrollingNode.h: * page/scrolling/ScrollingStateScrollingNode.h: * page/scrolling/ScrollingStateStickyNode.h: * page/scrolling/ScrollingStateTree.h: * page/scrolling/ScrollingThread.h: * page/scrolling/ScrollingTree.h: * page/scrolling/ScrollingTreeOverflowScrollingNode.h: * page/scrolling/ScrollingTreeScrollingNode.h: * page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.h: * page/scrolling/mac/ScrollingTreeFixedNode.h: * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h: * page/scrolling/mac/ScrollingTreeStickyNode.h: * platform/Cursor.h: * platform/DragImage.h: * platform/FileSystem.h: * platform/Language.h: * platform/LinkHash.h: * platform/LocalizedStrings.h: * platform/Logging.h: * platform/MemoryPressureHandler.h: * platform/NotImplemented.h: * platform/PlatformStrategies.h: * platform/PublicSuffix.h: * platform/RuntimeApplicationChecks.h: * platform/RuntimeApplicationChecksIOS.h: * platform/SchemeRegistry.h: * platform/ScrollView.h: * platform/ScrollableArea.h: * platform/Scrollbar.h: * platform/ScrollbarTheme.h: * platform/SharedBuffer.h: * platform/ThreadCheck.h: * platform/ThreadGlobalData.h: * platform/Timer.h: * platform/URL.h: * platform/UUID.h: * platform/UserActivity.h: * platform/Widget.h: * platform/cf/CFURLExtras.h: * platform/cf/RunLoopObserver.h: * platform/cocoa/SystemVersion.h: * platform/graphics/Color.h: * platform/graphics/FloatRect.h: * platform/graphics/FontCache.h: * platform/graphics/GeometryUtilities.h: * platform/graphics/GraphicsContext.h: * platform/graphics/IntRect.h: * platform/graphics/LayoutRect.h: * platform/graphics/StringTruncator.h: * platform/graphics/TextRun.h: * platform/graphics/ca/TileController.h: * platform/graphics/ca/mac/PlatformCAAnimationMac.h: * platform/graphics/cg/GraphicsContextCG.h: * platform/graphics/mac/ColorMac.h: * platform/graphics/transforms/TransformationMatrix.h: * platform/ios/FileSystemIOS.h: * platform/ios/PlatformEventFactoryIOS.h: * platform/ios/SelectionRect.h: * platform/ios/SystemMemory.h: * platform/ios/TileControllerMemoryHandlerIOS.h: * platform/ios/WebVideoFullscreenInterfaceAVKit.h: * platform/mac/PlatformEventFactoryMac.h: * platform/mac/ScrollbarThemeMac.h: * platform/mac/WebCoreNSURLExtras.h: * platform/mac/WebNSAttributedStringExtras.h: * platform/network/BlobRegistry.h: * platform/network/CookieStorage.h: * platform/network/DNS.h: * platform/network/NetworkStateNotifier.h: * platform/network/PlatformCookieJar.h: * platform/network/ProxyServer.h: * platform/network/ResourceErrorBase.h: * platform/network/ResourceHandle.h: * platform/network/ResourceHandleClient.h: * platform/network/ResourceRequestBase.h: * platform/network/ResourceResponseBase.h: * platform/network/SynchronousLoaderClient.h: * platform/network/cf/ResourceError.h: * platform/network/cf/ResourceRequest.h: * platform/network/cf/ResourceResponse.h: * platform/network/ios/QuickLook.h: * platform/network/mac/AuthenticationMac.h: * platform/sql/SQLiteDatabase.cpp: * platform/text/LocaleToScriptMapping.h: * platform/text/TextBreakIterator.h: * platform/text/TextEncoding.h: (WebCore::TextEncoding::decode): * platform/text/TextEncodingRegistry.h: * platform/text/TextStream.h: * rendering/RenderBlock.h: * rendering/RenderBox.h: * rendering/RenderEmbeddedObject.h: * rendering/RenderLayer.h: * rendering/RenderLayerBacking.h: * rendering/RenderLayerCompositor.h: * rendering/RenderListItem.h: * rendering/RenderObject.h: * rendering/RenderText.h: * rendering/RenderTextControl.h: * rendering/RenderThemeIOS.h: * rendering/RenderTreeAsText.h: * rendering/RenderView.h: * rendering/RenderWidget.h: * rendering/ScrollBehavior.cpp: * rendering/break_lines.cpp: * rendering/style/RenderStyle.h: * replay/UserInputBridge.h: * storage/StorageEventDispatcher.h: * storage/StorageMap.h: * storage/StorageStrategy.h: * storage/StorageTracker.h: * testing/Internals.h: * workers/WorkerThread.h: Added more WEBCORE_EXPORT macros where needed. 2014-08-21 Tim Horton Revert r172831, it broke the Windows build. 2014-08-21 Ryuan Choi Unreviewed build fix when RUBBER_BANDING is not enabled. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::overhangAmount): (WebCore::RenderLayer::setHasHorizontalScrollbar): (WebCore::RenderLayer::setHasVerticalScrollbar): 2014-08-21 Brent Fulgham [Win] WebCore.proj is not copying WebKit resource files. https://bugs.webkit.org/show_bug.cgi?id=136142 Reviewed by Tim Horton. * WebCore.vcxproj/WebCore.proj: Copy missing resource files during post-build step. 2014-08-21 Simon Fraser Try to fix the 32-bit build by using wildcards in the exported non-virtual thunks for GraphicsLayerCA::platformCALayerAnimationStarted and GraphicsLayerCA::platformCALayerAnimationEnded. * WebCore.exp.in: 2014-08-21 Simon Fraser Add animationDidEnd callbacks on GraphicsLayer https://bugs.webkit.org/show_bug.cgi?id=136084 Reviewed by Tim Horton. Hook up GraphicsLayerClient::notifyAnimationEnded() so that code using GraphicsLayers directly can add animations, and know when they finish. * WebCore.exp.in: * platform/graphics/GraphicsLayerClient.h: (WebCore::GraphicsLayerClient::notifyAnimationStarted): (WebCore::GraphicsLayerClient::notifyAnimationEnded): * platform/graphics/ca/GraphicsLayerCA.cpp: (WebCore::GraphicsLayerCA::platformCALayerAnimationStarted): (WebCore::GraphicsLayerCA::platformCALayerAnimationEnded): * platform/graphics/ca/GraphicsLayerCA.h: * platform/graphics/ca/PlatformCALayer.h: * platform/graphics/ca/PlatformCALayerClient.h: (WebCore::PlatformCALayerClient::platformCALayerAnimationStarted): (WebCore::PlatformCALayerClient::platformCALayerAnimationEnded): * platform/graphics/ca/mac/PlatformCALayerMac.h: * platform/graphics/ca/mac/PlatformCALayerMac.mm: (-[WebAnimationDelegate animationDidStart:]): (-[WebAnimationDelegate animationDidStop:finished:]): (PlatformCALayerMac::animationStarted): (PlatformCALayerMac::animationEnded): * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::notifyAnimationStarted): * rendering/RenderLayerBacking.h: 2014-08-21 Zalan Bujtas Enable SATURATED_LAYOUT_ARITHMETIC. https://bugs.webkit.org/show_bug.cgi?id=136106 Reviewed by Simon Fraser. SATURATED_LAYOUT_ARITHMETIC protects LayoutUnit against arithmetic overflow. (No measurable performance regression on Mac.) Test: fast/dynamic/saturated-layout-arithmetic.html * Configurations/FeatureDefines.xcconfig: 2014-08-21 Yuki Sekiguchi New ruby parsing rule breaks some real web sites. https://bugs.webkit.org/show_bug.cgi?id=136062 Reviewed by Ryosuke Niwa. An RP element should not auto close an RTC element. The HTML5.1 spec was changed: http://www.w3.org/html/wg/drafts/html/master/syntax.html#parsing-main-inbody This was done at the following commit: https://github.com/w3c/html/commit/c61397b989b28235ee2228f280aa8d475f3b9ebf This patch changed the RP element's behavior to follow the spec change. Test: fast/ruby/rp-inside-rtc.html * html/parser/HTMLTreeBuilder.cpp: (WebCore::HTMLTreeBuilder::processStartTagForInBody): 2014-08-21 Yuki Sekiguchi REGRESSION: CSS not() selector does not work when it appears after or within @supports https://bugs.webkit.org/show_bug.cgi?id=136063 Reviewed by Darin Adler. CSSParser changes its m_parsingMode to SupportsMode when it finds "@supports" token. However, the mode will be never changed to NormalMode. This changes parsing algorithm for "not" token forever, and it cannot parse not pseudo class selector. When we finish parsing @supports rule, we should change to normal mode. @media does the same thing. This patch changed CharacterEndMediaQuery to CharacterEndConditionQuery, and we change parsing mode from SupportsMode to NormalMode when the parser finished to parse @supports rule. Like "@-webkit-mediaquery", we cannot use '{' to "@-webkit-supports-condition". Changed "@-webkit-supports-condition" parsing rule and parseSupportsCondition() not to use '{'. Tests: css3/supports-not-selector-cssom.html css3/supports-not-selector.html * css/CSSGrammar.y.in: * css/CSSParser.cpp: (WebCore::CSSParser::parseSupportsCondition): (WebCore::isCSSLetter): (WebCore::CSSParser::realLex): 2014-08-21 Beth Dakin overflow:scroll elements should support rubber-banding https://bugs.webkit.org/show_bug.cgi?id=91655 Reviewed by Sam Weinig and Darin Adler. This patch enables rubber-banding in overflow regions and it keeps latching working as currently implemented. We cannot return early here if there is no scroll delta. There won't be a scroll delta in most cases during event.phase() == PlatformWheelEventPhaseEnded, but that phase is required to be processed in order for rubber-banding to work properly. * dom/Element.cpp: (WebCore::Element::dispatchWheelEvent): * page/EventHandler.cpp: (WebCore::handleWheelEventInAppropriateEnclosingBoxForSingleAxis): Add a setting for this, which will default to true. This allows us to disable the feature in WebKit1 for now. There is a bug about making it work. * page/Settings.in: allowsHorizontalStretching() and allowsVerticalStretching() now take the PlatformWheelEvent as a parameter, so that ScrollElasticityAutomatic can use the event to decide whether or not stretching should be allowed in this case. ScrollElasticityAutomatic will not allow stretching if it is a brand new gesture that would result in a rubber-band. We don't want to rubber-band in that case because we want the event to propagate up to a parent view. Also added some helper functions just to make that code easier to read. * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h: * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm: (WebCore::newGestureIsStarting): (WebCore::ScrollingTreeFrameScrollingNodeMac::isAlreadyPinnedInDirectionOfGesture): (WebCore::ScrollingTreeFrameScrollingNodeMac::allowsHorizontalStretching): (WebCore::ScrollingTreeFrameScrollingNodeMac::allowsVerticalStretching): * platform/mac/ScrollAnimatorMac.h: * platform/mac/ScrollAnimatorMac.mm: (WebCore::ScrollAnimatorMac::handleWheelEvent): (WebCore::newGestureIsStarting): (WebCore::ScrollAnimatorMac::isAlreadyPinnedInDirectionOfGesture): (WebCore::ScrollAnimatorMac::allowsVerticalStretching): (WebCore::ScrollAnimatorMac::allowsHorizontalStretching): * platform/mac/ScrollElasticityController.h: * platform/mac/ScrollElasticityController.mm: (WebCore::ScrollElasticityController::handleWheelEvent): To opt into rubber-banding, all we have to do is implement overhangAmount and set scroll elasticity. We'll choose ScrollElasticityAutomatic which means that we'll only rubber-band in directions that can scroll and that we won't rubber-band for new gestures when we're already pinned to the edge. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::overhangAmount): (WebCore::RenderLayer::setHasHorizontalScrollbar): (WebCore::RenderLayer::setHasVerticalScrollbar): 2014-08-21 Alex Christensen More WEBCORE_EXPORT macros. https://bugs.webkit.org/show_bug.cgi?id=136129 Reviewed by Tim Horton. * Modules/geolocation/Geolocation.h: * Modules/geolocation/GeolocationController.h: * Modules/indexeddb/IDBDatabaseBackend.h: * Modules/indexeddb/IDBDatabaseMetadata.h: * Modules/indexeddb/IDBKey.h: * Modules/indexeddb/IDBKeyData.h: * Modules/indexeddb/IDBKeyPath.h: * Modules/indexeddb/IDBKeyRange.h: * Modules/indexeddb/IDBKeyRangeData.h: * Modules/notifications/Notification.h: * Modules/notifications/NotificationController.h: * bindings/js/GCController.h: * bridge/IdentifierRep.h: * css/StyleProperties.h: * dom/ExceptionCodePlaceholder.h: * dom/KeyboardEvent.h: * dom/MouseEvent.h: * dom/MouseRelatedEvent.h: * dom/Node.h: (WebCore::Node::hasEditableStyle): * dom/NodeTraversal.h: * dom/Position.h: (WebCore::Position::Position): * dom/Range.h: (WebCore::Range::startContainer): (WebCore::Range::startOffset): (WebCore::Range::endContainer): (WebCore::Range::endOffset): * editing/FrameSelection.h: (WebCore::DragCaretController::clear): * history/HistoryItem.h: * history/PageCache.h: * html/FormController.h: * html/HTMLElement.h: * html/HTMLFormElement.h: * html/HTMLFrameOwnerElement.h: * html/HTMLInputElement.h: * html/HTMLMediaElement.h: * html/HTMLOptGroupElement.h: * html/HTMLOptionElement.h: * html/HTMLPlugInElement.h: * html/HTMLPlugInImageElement.h: * html/HTMLSelectElement.h: * html/HTMLTableCellElement.h: * html/HTMLTextAreaElement.h: * html/HTMLTextFormControlElement.h: * html/HTMLVideoElement.h: * html/ImageDocument.h: * html/PluginDocument.h: * html/forms/FileIconLoader.h: * html/shadow/InsertionPoint.h: * inspector/InspectorClient.h: * inspector/InspectorController.h: * inspector/InspectorFrontendClientLocal.h: * inspector/InspectorInstrumentation.h: * loader/FrameLoadRequest.h: * loader/FrameLoader.h: * loader/FrameLoaderStateMachine.h: * loader/HistoryController.h: * loader/LoaderStrategy.h: * loader/NavigationAction.h: * loader/NetscapePlugInStreamLoader.h: * loader/ProgressTracker.h: * loader/archive/cf/LegacyWebArchive.h: * loader/cache/MemoryCache.h: * loader/icon/IconController.h: * loader/icon/IconDatabase.h: * loader/icon/IconDatabaseBase.h: * page/FocusController.h: * page/Frame.h: * page/FrameDestructionObserver.h: Replaced WEBCORE_TESTING with WEBCORE_EXPORT. * page/FrameTree.h: * page/FrameView.h: * page/Page.h: * page/PageConsole.h: * page/PageGroup.h: * page/PageThrottler.h: * page/PrintContext.h: * page/scrolling/ScrollingConstraints.h: * page/scrolling/ScrollingStateNode.h: * platform/FileChooser.h: * platform/GamepadProvider.h: * platform/Length.h: * platform/MIMETypeRegistry.h: * platform/MemoryPressureHandler.h: * platform/Pasteboard.h: * platform/PlatformExportMacros.h: Removed WEBCORE_TESTING, which I'm replacing with WEBCORE_EXPORT. * platform/PlatformKeyboardEvent.h: * platform/PlatformPasteboard.h: * platform/PlatformSpeechSynthesisVoice.h: * platform/PlatformSpeechSynthesizer.h: * platform/audio/MediaSessionManager.h: * platform/graphics/FloatPoint.h: * platform/graphics/FloatQuad.h: * platform/graphics/FloatRect.h: * platform/graphics/FloatSize.h: * platform/graphics/Font.h: * platform/graphics/FontCache.h: * platform/graphics/FontGlyphs.h: * platform/graphics/FontPlatformData.h: * platform/graphics/GlyphPageTreeNode.h: * platform/graphics/Gradient.h: * platform/graphics/GraphicsContext.h: * platform/graphics/GraphicsLayer.h: * platform/graphics/Icon.h: * platform/graphics/Image.h: * platform/graphics/ImageBuffer.h: * platform/graphics/IntPoint.h: * platform/graphics/IntRect.h: * platform/graphics/IntSize.h: * platform/graphics/LayoutRect.h: * platform/graphics/MediaPlayer.h: * platform/graphics/Path.h: * platform/graphics/Region.h: * platform/graphics/ca/GraphicsLayerCA.h: * platform/graphics/ca/LayerFlushScheduler.h: * platform/graphics/ca/LayerPool.h: * platform/graphics/ca/PlatformCAFilters.h: * platform/graphics/ca/PlatformCALayer.h: * platform/graphics/ca/mac/PlatformCAAnimationMac.h: * platform/graphics/ca/mac/PlatformCALayerMac.h: * platform/graphics/cg/IOSurfacePool.h: * platform/graphics/cocoa/IOSurface.h: * platform/graphics/filters/FilterOperations.h: * platform/graphics/mac/MediaPlayerPrivateQTKit.h: * platform/ios/LegacyTileCache.h: * platform/ios/PlatformEventFactoryIOS.h: * platform/ios/wak/FloatingPointEnvironment.h: * platform/mac/HIDGamepadProvider.h: * platform/mock/MockMediaStreamCenter.h: * platform/network/FormData.h: * platform/network/HTTPHeaderMap.h: * platform/network/NetworkStorageSession.h: * platform/network/ProtectionSpaceBase.h: * platform/network/cocoa/ProtectionSpaceCocoa.h: (WebCore::ProtectionSpace::encodingRequiresPlatformData): * platform/network/ios/QuickLook.h: * platform/text/TextBreakIterator.h: * plugins/PluginData.h: * plugins/PluginMainThreadScheduler.h: * rendering/HitTestLocation.h: * rendering/HitTestResult.h: * rendering/InlineBox.h: Added more WEBCORE_EXPORT macros, which don't do anything yet. 2014-08-21 Víctor Manuel Jáquez Leal [GTK] WebkitWebProcess crashing navigating away from ogg video element https://bugs.webkit.org/show_bug.cgi?id=135348 Reviewed by Philippe Normand. Let GraphicsLayerTextureMapper know it needs to detach the platform layer when a MediaPlayerPrivateGStreamerBase is destroyed. No new test since media/restore-from-page-cache.html covers it. * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp: (WebCore::MediaPlayerPrivateGStreamerBase::~MediaPlayerPrivateGStreamerBase): 2014-08-20 Benjamin Poulain CSS: Implement the :placeholder-shown pseudo-class from Selectors Level 4 https://bugs.webkit.org/show_bug.cgi?id=118162 Reviewed by Antti Koivisto. Previously, HTMLTextFormControlElement was using some mix of its own state and style to change the visibility of the placeholder. That approach was a little bit too fragile, and we do not want the style to depends on the renderer() since that creates circular dependencies. The biggest change here is refactoring HTMLTextFormControlElement to have 1) An explicit "visible placeholder" state. 2) Separate the textUpdate() from the visibilityUpdate(). 3) Remove the dependencies between the Element's style and the placeholder's style. This is done by simply using display:none; on the placeholder so that its parent's visibility is irrelevant. When matching the selector, the style is set as unique since style sharing does not deal with the changes of HTMLTextFormControlElement. Tests: fast/css/placeholder-shown-basics.html fast/selectors/placeholder-shown-long-adjacent-backtracking.html fast/selectors/placeholder-shown-sibling-style-update.html fast/selectors/placeholder-shown-style-update.html fast/selectors/placeholder-shown-with-input-basics.html fast/selectors/placeholder-shown-with-textarea-basics.html * css/CSSSelector.cpp: (WebCore::CSSSelector::selectorText): Add the CSS Selector description for CSSOM. * css/CSSSelector.h: * css/SelectorChecker.cpp: (WebCore::SelectorChecker::checkOne): * css/SelectorCheckerTestFunctions.h: (WebCore::isPlaceholderShown): * css/SelectorPseudoClassAndCompatibilityElementMap.in: * css/html.css: (::-webkit-input-placeholder): Previously, the display was forced through the UA stylesheet. Since the display is now part of the placeholder visibility, it is explicitly handled by HTMLTextFormControlElement and its subclasses. * cssjit/SelectorCompiler.cpp: (WebCore::SelectorCompiler::addPseudoClassType): (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatching): (WebCore::SelectorCompiler::makeUniqueIfNecessaryAndTestIsPlaceholderShown): (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementHasPlaceholderShown): * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::parseAttribute): * html/HTMLTextAreaElement.cpp: (WebCore::HTMLTextAreaElement::updateValue): (WebCore::HTMLTextAreaElement::setValueCommon): (WebCore::HTMLTextAreaElement::updatePlaceholderText): * html/HTMLTextFormControlElement.cpp: (WebCore::HTMLTextFormControlElement::HTMLTextFormControlElement): (WebCore::HTMLTextFormControlElement::dispatchFocusEvent): (WebCore::HTMLTextFormControlElement::dispatchBlurEvent): (WebCore::HTMLTextFormControlElement::placeholderShouldBeVisible): (WebCore::HTMLTextFormControlElement::updatePlaceholderVisibility): (WebCore::HTMLTextFormControlElement::selectionDirection): (WebCore::HTMLTextFormControlElement::restoreCachedSelection): (WebCore::HTMLTextFormControlElement::parseAttribute): (WebCore::HTMLTextFormControlElement::hidePlaceholder): (WebCore::HTMLTextFormControlElement::showPlaceholderIfNecessary): * html/HTMLTextFormControlElement.h: (WebCore::HTMLTextFormControlElement::isPlaceholderVisible): (WebCore::HTMLTextFormControlElement::cachedSelectionDirection): * html/TextFieldInputType.cpp: (WebCore::TextFieldInputType::updatePlaceholderText): (WebCore::TextFieldInputType::subtreeHasChanged): (WebCore::TextFieldInputType::updateInnerTextValue): * rendering/RenderTextControl.cpp: (WebCore::RenderTextControl::styleDidChange): * testing/Internals.cpp: (WebCore::Internals::visiblePlaceholder): 2014-08-20 Mark Rowe Fix the release build after r172806. * Modules/mediasource/SourceBuffer.cpp: (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveRenderingError): Add a missing semicolon. 2014-08-20 Benjamin Poulain Remove HTMLInputElement's suggestedValue https://bugs.webkit.org/show_bug.cgi?id=136094 Reviewed by Darin Adler. That code is Chrome specific. It is unused now. * WebCore.exp.in: * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::setValue): (WebCore::HTMLInputElement::setValueFromRenderer): (WebCore::HTMLInputElement::suggestedValue): Deleted. (WebCore::HTMLInputElement::setSuggestedValue): Deleted. * html/HTMLInputElement.h: * html/HTMLTextFormControlElement.cpp: (WebCore::HTMLTextFormControlElement::placeholderShouldBeVisible): * html/HTMLTextFormControlElement.h: (WebCore::HTMLTextFormControlElement::isEmptySuggestedValue): Deleted. * html/InputType.cpp: (WebCore::InputType::canSetSuggestedValue): Deleted. * html/InputType.h: * html/TextFieldInputType.cpp: (WebCore::TextFieldInputType::updateInnerTextValue): (WebCore::TextFieldInputType::canSetSuggestedValue): Deleted. * html/TextFieldInputType.h: * testing/Internals.cpp: (WebCore::Internals::suggestedValue): Deleted. (WebCore::Internals::setSuggestedValue): Deleted. * testing/Internals.h: * testing/Internals.idl: 2014-08-20 Dean Jackson WebAudio FFT analysis uses incorrect scaling https://bugs.webkit.org/show_bug.cgi?id=136120 Reviewed by Tim Horton. This is a port of Blink r166687 (author rtoy) https://codereview.chromium.org/156993002 Currently, for a fixed sine-wave input, the peak FFT amplitude changes depending on the selected FFT size. This is incorrect; the FFT amplitude should not appreciably change when the FFT size changes. Layout test added to verify the FFT result stays approximately constant, independent of the FFT size used. When this test is run using an older version of WebKit, the peak varies from about -44 dB (FFT size 32) to -7 dB (FFT size 2048). With this CL, the peak is about -7 dB. (It's not 0 dB because of the Blackman window that is applied.) Note: this change may break existing applications that depended on this strange scaling effect. Test: webaudio/realtimeanalyser-fft-scaling.html * Modules/webaudio/RealtimeAnalyser.cpp: (WebCore::RealtimeAnalyser::doFFTAnalysis): 2014-08-20 Alex Christensen Introducing WEBCORE_EXPORT macro. https://bugs.webkit.org/show_bug.cgi?id=136108 Reviewed by Antti Koivisto. This should eventually replace WebCore.exp.in. * platform/PlatformExportMacros.h: Define WEBCORE_EXPORT to nothing to not cause problems while I'm working on it. * Modules/encryptedmedia/CDM.h: * Modules/speech/DOMWindowSpeechSynthesis.h: * Modules/webdatabase/DatabaseManager.h: * Modules/webdatabase/DatabaseTracker.h: * accessibility/AXObjectCache.h: * bindings/js/DOMWrapperWorld.h: * bridge/jsc/BridgeJSC.h: * bridge/runtime_method.h: * bridge/runtime_object.h: * bridge/runtime_root.h: * css/CSSComputedStyleDeclaration.h: * css/CSSParserMode.h: * css/CSSValue.h: * css/DOMWindowCSS.h: * css/StyleSheetContents.h: * dom/CharacterData.h: * dom/ClientRect.h: * dom/ClientRectList.h: * dom/ContainerNode.h: * dom/ContextDestructionObserver.h: * dom/DOMImplementation.h: * dom/DataTransfer.h: * dom/DeviceMotionData.h: * dom/DeviceOrientationData.h: * dom/Document.h: (WebCore::Document::setAnnotatedRegionsDirty): * dom/DocumentMarker.h: * dom/DocumentMarkerController.h: * dom/DocumentStyleSheetCollection.h: * dom/Element.h: * dom/Event.h: (WebCore::Event::create): * dom/EventListenerMap.h: * editing/DictationAlternative.h: * editing/EditCommand.h: * editing/EditingStyle.h: * editing/Editor.h: * editing/mac/AlternativeTextUIController.h: * history/BackForwardController.h: * history/BackForwardList.h: * history/CachedFrame.h: * loader/CookieJar.h: * loader/CrossOriginPreflightResultCache.h: * loader/DocumentLoader.h: * loader/DocumentWriter.h: * loader/appcache/ApplicationCache.h: * loader/appcache/ApplicationCacheHost.h: * loader/appcache/ApplicationCacheStorage.h: * loader/archive/ArchiveResource.h: * loader/cache/CachedImage.h: * loader/cache/CachedResource.h: * loader/cache/CachedResourceHandle.h: * loader/cache/CachedResourceLoader.h: * page/Chrome.h: * page/ContextMenuController.h: * page/DOMWindow.h: * page/DOMWindowExtension.h: * page/DragController.h: * page/EventHandler.h: * page/animation/AnimationController.h: * page/scrolling/AsyncScrollingCoordinator.h: * platform/CalculationValue.h: * platform/ContentFilter.h: * platform/ContextMenu.h: * platform/ContextMenuItem.h: * platform/CrossThreadCopier.h: * platform/Cursor.h: * platform/DatabaseStrategy.h: * platform/DisplaySleepDisabler.h: * platform/DragData.h: * platform/LocalizedStrings.h: * platform/audio/AudioHardwareListener.h: * platform/audio/AudioSession.h: * platform/audio/ios/MediaSessionManagerIOS.mm: * platform/graphics/BitmapImage.h: * platform/graphics/Color.h: * platform/graphics/DisplayRefreshMonitor.h: * platform/graphics/transforms/AffineTransform.h: * platform/ios/WebCoreSystemInterfaceIOS.mm: * platform/ios/WebVideoFullscreenModelMediaElement.h: * platform/ios/wak/WAKView.mm: * platform/ios/wak/WKContentObservation.h: * platform/ios/wak/WKView.h: * platform/ios/wak/WebCoreThread.h: * platform/ios/wak/WebCoreThreadMessage.h: * platform/mac/BlockExceptions.h: * platform/mock/DeviceOrientationClientMock.h: * platform/network/AuthenticationChallengeBase.h: * platform/network/BlobData.h: * platform/network/BlobDataFileReference.h: * platform/network/BlobRegistry.h: * platform/network/BlobRegistryImpl.h: * platform/network/CredentialBase.h: * platform/network/CredentialStorage.h: * platform/network/PlatformCookieJar.h: * platform/network/cf/AuthenticationChallenge.h: * platform/network/cocoa/CredentialCocoa.h: * platform/network/mac/CertificateInfo.h: * platform/sql/SQLiteDatabase.h: (WebCore::SQLiteDatabase::disableThreadingChecks): * platform/sql/SQLiteDatabaseTracker.h: * platform/sql/SQLiteStatement.h: * platform/sql/SQLiteTransaction.h: * platform/text/BidiContext.h: Added WEBCORE_EXPORT macros. 2014-08-20 Pratik Solanki Move DiskCacheMonitor to WebCore so that WebKit1 clients can use it as well https://bugs.webkit.org/show_bug.cgi?id=135896 Reviewed by Andreas Kling. Refactor code and move it to WebCore. * WebCore.exp.in: * WebCore.xcodeproj/project.pbxproj: * loader/ResourceLoader.h: Make willCacheResponse protected so that SubresourceLoader can override it. * loader/SubresourceLoader.h: * loader/cocoa/DiskCacheMonitorCocoa.h: Added. Mostly the same as the existing NetworkDiskCacheMonitor class in WebKit2. In the CFNetwork callback block, it calls a virtual function that is overridden by NetworkDiskCacheMonitor to send a message to WebContent process. (WebCore::DiskCacheMonitor::~DiskCacheMonitor): (WebCore::DiskCacheMonitor::resourceRequest): (WebCore::DiskCacheMonitor::sessionID): * loader/cocoa/DiskCacheMonitorCocoa.mm: (WebCore::DiskCacheMonitor::tryGetFileBackedSharedBufferFromCFURLCachedResponse): Copied from NetworkResourceLoader::tryGetFileBackedSharedBufferFromCFURLCachedResponse. (WebCore::DiskCacheMonitor::monitorFileBackingStoreCreation): (WebCore::DiskCacheMonitor::DiskCacheMonitor): (WebCore::DiskCacheMonitor::resourceBecameFileBacked): Replace the cached resource data with the contents of the file backed buffer. This is used in WebKit1 (and also for any resource loads that happen from the WebContent process). * loader/cocoa/SubresourceLoaderCocoa.mm: Added. (WebCore::SubresourceLoader::willCacheResponse): Override willCacheresponse from ResourceLoader to listen for disk cache notifications. 2014-08-20 Eric Carlson Cleanup MediaSession https://bugs.webkit.org/show_bug.cgi?id=136116 Reviewed by Brent Fulgham. MediaSessionManagerClient interface isn't used, remove it. No new tests, this doesn't change behavior. * WebCore.exp.in: * platform/audio/MediaSessionManager.cpp: (WebCore::MediaSessionManager::addSession): (WebCore::MediaSessionManager::removeSession): (WebCore::MediaSessionManager::sessionWillBeginPlayback): (WebCore::MediaSessionManager::addClient): Deleted. (WebCore::MediaSessionManager::removeClient): Deleted. * platform/audio/MediaSessionManager.h: (WebCore::MediaSessionManagerClient::~MediaSessionManagerClient): Deleted. (WebCore::MediaSessionManagerClient::MediaSessionManagerClient): Deleted. 2014-08-20 Eric Carlson [MSE] add additional SourceBuffer and MediaSource logging https://bugs.webkit.org/show_bug.cgi?id=136114 Reviewed by Brent Fulgham. No new tests, this adds debug-only logging. * Modules/mediasource/MediaSource.cpp: (WebCore::MediaSource::setReadyState): Fix a typo. (WebCore::MediaSource::streamEndedWithError): Log the error. * Modules/mediasource/SourceBuffer.cpp: (WebCore::SourceBuffer::sourceBufferPrivateAppendComplete): Log when parsing fails. (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveRenderingError): Log error. (WebCore::SourceBuffer::sourceBufferPrivateDidEndStream): Ditto. (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveInitializationSegment): Log. (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample): Log error. 2014-08-20 Commit Queue Unreviewed, rolling out r172798. https://bugs.webkit.org/show_bug.cgi?id=136113 Broke builds (Requested by msaboff on #webkit). Reverted changeset: "Introducing WEBCORE_EXPORT macro." https://bugs.webkit.org/show_bug.cgi?id=136108 http://trac.webkit.org/changeset/172798 2014-08-20 Alex Christensen Introducing WEBCORE_EXPORT macro. https://bugs.webkit.org/show_bug.cgi?id=136108 Reviewed by Antti Koivisto. This should eventually replace WebCore.exp.in. * platform/PlatformExportMacros.h: Define WEBCORE_EXPORT to nothing to not cause problems while I'm working on it. * Modules/encryptedmedia/CDM.h: * Modules/speech/DOMWindowSpeechSynthesis.h: * Modules/webdatabase/DatabaseManager.h: * Modules/webdatabase/DatabaseTracker.h: * accessibility/AXObjectCache.h: * bindings/js/DOMWrapperWorld.h: * bridge/jsc/BridgeJSC.h: * bridge/runtime_method.cpp: * bridge/runtime_method.h: * bridge/runtime_object.cpp: * bridge/runtime_object.h: * bridge/runtime_root.h: * css/CSSComputedStyleDeclaration.h: * css/CSSParserMode.h: * css/CSSValue.h: * css/DOMWindowCSS.h: * css/StyleSheetContents.h: * dom/CharacterData.h: * dom/ClientRect.h: * dom/ClientRectList.h: * dom/ContainerNode.h: * dom/ContextDestructionObserver.h: * dom/DOMImplementation.h: * dom/DataTransfer.h: * dom/DeviceMotionData.h: * dom/DeviceOrientationData.h: * dom/Document.h: (WebCore::Document::setAnnotatedRegionsDirty): * dom/DocumentMarker.h: * dom/DocumentMarkerController.h: * dom/DocumentStyleSheetCollection.h: * dom/Element.h: * dom/Event.h: (WebCore::Event::create): * dom/EventListenerMap.h: * editing/DictationAlternative.h: * editing/EditCommand.h: * editing/EditingStyle.h: * editing/Editor.h: * editing/mac/AlternativeTextUIController.h: * history/BackForwardController.h: * history/BackForwardList.h: * history/CachedFrame.h: * loader/CookieJar.h: * loader/CrossOriginPreflightResultCache.h: * loader/DocumentLoader.h: * loader/DocumentWriter.h: * loader/appcache/ApplicationCache.h: * loader/appcache/ApplicationCacheHost.h: * loader/appcache/ApplicationCacheStorage.h: * loader/archive/ArchiveResource.h: * loader/cache/CachedImage.h: * loader/cache/CachedResource.h: * loader/cache/CachedResourceHandle.h: * loader/cache/CachedResourceLoader.h: * page/Chrome.h: * page/ContextMenuController.h: * page/DOMWindow.h: * page/DOMWindowExtension.h: * page/DragController.h: * page/EventHandler.h: * page/animation/AnimationController.h: * page/scrolling/AsyncScrollingCoordinator.h: * platform/CalculationValue.h: * platform/ContentFilter.h: * platform/ContextMenu.h: * platform/ContextMenuItem.h: * platform/CrossThreadCopier.h: * platform/Cursor.h: * platform/DatabaseStrategy.h: * platform/DisplaySleepDisabler.h: * platform/DragData.h: * platform/LocalizedStrings.h: * platform/audio/AudioHardwareListener.h: * platform/audio/AudioSession.h: * platform/audio/ios/MediaSessionManagerIOS.mm: * platform/graphics/BitmapImage.h: * platform/graphics/Color.h: * platform/graphics/DisplayRefreshMonitor.h: * platform/graphics/transforms/AffineTransform.h: * platform/ios/WebCoreSystemInterfaceIOS.mm: * platform/ios/WebVideoFullscreenModelMediaElement.h: * platform/ios/wak/WAKView.mm: * platform/ios/wak/WKContentObservation.h: * platform/ios/wak/WKView.h: * platform/ios/wak/WebCoreThread.h: * platform/ios/wak/WebCoreThreadMessage.h: * platform/mac/BlockExceptions.h: * platform/mock/DeviceOrientationClientMock.h: * platform/network/AuthenticationChallengeBase.h: * platform/network/BlobData.h: * platform/network/BlobDataFileReference.h: * platform/network/BlobRegistry.h: * platform/network/BlobRegistryImpl.h: * platform/network/CredentialBase.h: * platform/network/CredentialStorage.h: * platform/network/PlatformCookieJar.h: * platform/network/cf/AuthenticationChallenge.h: * platform/network/cocoa/CredentialCocoa.h: * platform/network/mac/CertificateInfo.h: * platform/sql/SQLiteDatabase.h: (WebCore::SQLiteDatabase::disableThreadingChecks): * platform/sql/SQLiteDatabaseTracker.h: * platform/sql/SQLiteStatement.h: * platform/sql/SQLiteTransaction.h: * platform/text/BidiContext.h: Added WEBCORE_EXPORT macros. 2014-08-20 Zalan Bujtas Dashed/dotted borders do not paint. https://bugs.webkit.org/show_bug.cgi?id=135898 Reviewed by Simon Fraser. Remove the empty line checks for drawLines. There's no need to protect the graphics context from empty lines. Tests: fast/borders/border-painting-dashed-at-all.html fast/borders/border-painting-dashed.html fast/borders/border-painting-dotted-at-all.html fast/borders/border-painting-dotted.html fast/borders/border-painting-double-at-all.html fast/borders/border-painting-double.html fast/borders/border-painting-groove-at-all.html fast/borders/border-painting-inset-at-all.html fast/borders/border-painting-inset.html fast/borders/border-painting-outset-at-all.html fast/borders/border-painting-outset.html fast/borders/border-painting-ridge-at-all.html fast/borders/border-painting-solid-at-all.html fast/borders/border-painting-solid.html fast/borders/hidpi-border-painting-groove.html fast/borders/hidpi-border-painting-ridge.html * rendering/RenderObject.cpp: (WebCore::RenderObject::drawLineForBoxSide): (WebCore::drawBorderLineRect): Deleted. (WebCore::drawBorderLine): Deleted. 2014-08-19 Jinwoo Song Ignore usemap attributes without '#' in img element https://bugs.webkit.org/show_bug.cgi?id=133336 Reviewed by Ryosuke Niwa. HTML5 specification says we should ignore usemap attributes without #. http://www.w3.org/TR/html5/infrastructure.html#valid-hash-name-reference Test: fast/dom/replaced-image-map-valid-hash-name.html * dom/TreeScope.cpp: (WebCore::TreeScope::getImageMap): 2014-08-19 Pratik Solanki Remove PurgeableBuffer since it is not very useful any more https://bugs.webkit.org/show_bug.cgi?id=135939 Reviewed by Andreas Kling. The usefulness of having purgeable memory for cached resources has diminished now that WebKit uses file backed resources when possible. Since this is read only memory, it is in essence "purgeable". Having the PurgeableBuffer code adds additional complexity that we don't need. e.g. on my Mac, I am not seeing any entry for "WebCore purgeable data" when I run vmmap against the web processes that I have running. It is used on iOS, however even there much of the purgeable memory we create gets replaced by file backed memory once we get the notification from CFNetwork. No new tests because no functional changes. * WebCore.xcodeproj/project.pbxproj: * inspector/InspectorPageAgent.cpp: (WebCore::prepareCachedResourceBuffer): * loader/DocumentLoader.cpp: (WebCore::DocumentLoader::subresource): * loader/ResourceBuffer.cpp: (WebCore::ResourceBuffer::hasPurgeableBuffer): Deleted. (WebCore::ResourceBuffer::setShouldUsePurgeableMemory): Deleted. (WebCore::ResourceBuffer::createPurgeableBuffer): Deleted. (WebCore::ResourceBuffer::releasePurgeableBuffer): Deleted. * loader/ResourceBuffer.h: * loader/SubresourceLoader.cpp: (WebCore::SubresourceLoader::didFinishLoading): * loader/cache/CachedCSSStyleSheet.cpp: (WebCore::CachedCSSStyleSheet::sheetText): (WebCore::CachedCSSStyleSheet::destroyDecodedData): * loader/cache/CachedCSSStyleSheet.h: * loader/cache/CachedImage.cpp: (WebCore::CachedImage::image): (WebCore::CachedImage::imageForRenderer): (WebCore::CachedImage::imageSizeForRenderer): (WebCore::CachedImage::destroyDecodedData): (WebCore::CachedImage::canUseDiskImageCache): * loader/cache/CachedImage.h: * loader/cache/CachedResource.cpp: (WebCore::CachedResource::addClientToSet): (WebCore::CachedResource::isSafeToMakePurgeable): Deleted. (WebCore::CachedResource::makePurgeable): Deleted. (WebCore::CachedResource::isPurgeable): Deleted. (WebCore::CachedResource::wasPurged): Deleted. * loader/cache/CachedResource.h: (WebCore::CachedResource::resourceBuffer): (WebCore::CachedResource::purgePriority): Deleted. * loader/cache/CachedScript.cpp: (WebCore::CachedScript::script): (WebCore::CachedScript::destroyDecodedData): * loader/cache/CachedScript.h: * loader/cache/MemoryCache.cpp: (WebCore::MemoryCache::resourceForRequestImpl): (WebCore::MemoryCache::pruneDeadResourcesToSize): (WebCore::MemoryCache::evict): (WebCore::MemoryCache::TypeStatistic::addResource): (WebCore::MemoryCache::dumpStats): (WebCore::MemoryCache::dumpLRULists): (WebCore::MemoryCache::makeResourcePurgeable): Deleted. * loader/cache/MemoryCache.h: (WebCore::MemoryCache::TypeStatistic::TypeStatistic): (WebCore::MemoryCache::shouldMakeResourcePurgeableOnEviction): Deleted. * platform/PurgePriority.h: Removed. * platform/PurgeableBuffer.h: Removed. * platform/SharedBuffer.cpp: (WebCore::SharedBuffer::SharedBuffer): (WebCore::SharedBuffer::size): (WebCore::SharedBuffer::data): (WebCore::SharedBuffer::append): (WebCore::SharedBuffer::clear): (WebCore::SharedBuffer::copy): (WebCore::SharedBuffer::getSomeData): (WebCore::SharedBuffer::adoptPurgeableBuffer): Deleted. (WebCore::SharedBuffer::createPurgeableBuffer): Deleted. (WebCore::SharedBuffer::releasePurgeableBuffer): Deleted. * platform/SharedBuffer.h: (WebCore::SharedBuffer::hasPurgeableBuffer): Deleted. (WebCore::SharedBuffer::shouldUsePurgeableMemory): Deleted. * platform/cf/SharedBufferCF.cpp: (WebCore::SharedBuffer::SharedBuffer): * platform/mac/PurgeableBufferMac.cpp: Removed. * platform/mac/SharedBufferMac.mm: (WebCore::SharedBuffer::createCFData): * platform/soup/SharedBufferSoup.cpp: 2014-08-19 Zalan Bujtas Remove ENABLE(SUBPIXEL_LAYOUT). https://bugs.webkit.org/show_bug.cgi?id=136077 Reviewed by Simon Fraser. Remove compile time flag SUBPIXEL_LAYOUT. All ports have it enabled for a while now. * Configurations/FeatureDefines.xcconfig: * css/CSSPrimitiveValue.cpp: (WebCore::CSSPrimitiveValue::computeLength): * dom/Element.cpp: (WebCore::adjustForLocalZoom): (WebCore::Element::offsetWidth): (WebCore::Element::offsetHeight): (WebCore::Element::clientLeft): (WebCore::Element::clientTop): (WebCore::Element::clientWidth): (WebCore::Element::clientHeight): * platform/LayoutUnit.h: (WebCore::LayoutUnit::LayoutUnit): (WebCore::LayoutUnit::ceilToFloat): (WebCore::LayoutUnit::ceil): (WebCore::LayoutUnit::round): (WebCore::LayoutUnit::floor): (WebCore::boundedMultiply): (WebCore::operator*): (WebCore::operator/): (WebCore::intMod): (WebCore::operator%): (WebCore::roundedLayoutUnit): (WebCore::ceiledLayoutUnit): (WebCore::LayoutUnit::toInt): Deleted. (WebCore::LayoutUnit::toFloat): Deleted. (WebCore::LayoutUnit::toDouble): Deleted. (WebCore::LayoutUnit::epsilon): Deleted. * platform/graphics/LayoutPoint.h: (WebCore::roundedForPainting): (WebCore::flooredForPainting): (WebCore::ceiledForPainting): (WebCore::roundedLayoutPoint): * platform/graphics/LayoutRect.cpp: (WebCore::enclosingLayoutRect): * platform/graphics/LayoutRect.h: (WebCore::pixelSnappedIntRect): (WebCore::pixelSnappedForPainting): * platform/graphics/LayoutSize.h: (WebCore::roundedLayoutSize): (WebCore::flooredForPainting): * rendering/RenderBlock.cpp: (WebCore::adjustFloatForSubPixelLayout): * rendering/RenderBlockFlow.cpp: (WebCore::RenderBlockFlow::layoutBlockChild): * rendering/RenderElement.h: (WebCore::adjustLayoutUnitForAbsoluteZoom): * rendering/style/RenderStyle.h: (WebCore::adjustLayoutUnitForAbsoluteZoom): 2014-08-19 Bem Jones-Bey [CSS Shapes] A few calc() test failures in the shape-image-threshold parsing tests https://bugs.webkit.org/show_bug.cgi?id=135926 Reviewed by Dirk Schulze. shape-image-threshold is a Number, so it should be parsed as one. The default parsing doesn't support calcs, but numbers do. No new tests, fixes exitsing test to pass. * css/DeprecatedStyleBuilder.cpp: (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder): Use ApplyPropertyNumber instead of ApplyPropertyDefault for shape-image-threshold. 2014-08-18 Maciej Stachowiak Use NSURLFileTypeMappings directly instead of depending on WebKitSystemInterface wrappers for it https://bugs.webkit.org/show_bug.cgi?id=136035 Reviewed by Dan Bernstein. * WebCore.exp.in: Remove reference to no longer existent sumbols. * WebCore.order: ditto * WebCore.xcodeproj/project.pbxproj: Install new NSURLFileTyeMappings.h header. * platform/ios/MIMETypeRegistryIOS.mm: (WebCore::MIMETypeRegistry::getMIMETypeForExtension): Use NSURLFileTypeMappings directly instead of via WKSI wrapper. * platform/mac/MIMETypeRegistryMac.mm: (WebCore::MIMETypeRegistry::getMIMETypeForExtension): ditto (WebCore::MIMETypeRegistry::getExtensionsForMIMEType): ditto (WebCore::MIMETypeRegistry::getPreferredExtensionForMIMEType): ditto * platform/mac/WebCoreSystemInterface.h: Remove references to the no-longer-used WKGetExtensionsForMIMEType, WKGetPreferredExtensionForMIMEType, or WKGetMIMETypeForExtension * platform/mac/WebCoreSystemInterface.mm: ditto * platform/spi: Added. This is where headers to declare SPI go. * platform/spi/cocoa: Added. See above. * platform/spi/cocoa/NSURLFileTypeMappingsSPI.h: Added. Header to declare the internal class NSURLFileTypeMappings and some of its methods. 2014-08-18 Commit Queue Unreviewed, rolling out r172736. https://bugs.webkit.org/show_bug.cgi?id=136060 Caused 14% PLT regressions (Requested by rniwa on #webkit). Reverted changeset: "Remove PurgeableBuffer since it is not very useful any more" https://bugs.webkit.org/show_bug.cgi?id=135939 http://trac.webkit.org/changeset/172736 2014-08-18 Simon Fraser Provide default implementations of all GraphicsLayerClient methods https://bugs.webkit.org/show_bug.cgi?id=136054 Reviewed by Tim Horton. Make none of the functions in GraphicsLayerClient pure virtual, since in many cases subclasses don't need to provide their own implementations. * platform/graphics/GraphicsLayerClient.h: (WebCore::GraphicsLayerClient::notifyAnimationStarted): (WebCore::GraphicsLayerClient::notifyFlushRequired): (WebCore::GraphicsLayerClient::paintContents): * rendering/RenderLayerCompositor.h: 2014-08-18 Pratik Solanki Remove PurgeableBuffer since it is not very useful any more https://bugs.webkit.org/show_bug.cgi?id=135939 Reviewed by Geoffrey Garen. The usefulness of having purgeable memory for cached resources has diminished now that WebKit uses file backed resources when possible. Since this is read only memory, it is in essence "purgeable". Having the PurgeableBuffer code adds additional complexity that we don't need. e.g. on my Mac, I am not seeing any entry for "WebCore purgeable data" when I run vmmap against the web processes that I have running. It is used on iOS, however even there much of the purgeable memory we create gets replaced by file backed memory once we get the notification from CFNetwork. No new tests because no functional changes. * WebCore.xcodeproj/project.pbxproj: * inspector/InspectorPageAgent.cpp: (WebCore::prepareCachedResourceBuffer): * loader/DocumentLoader.cpp: (WebCore::DocumentLoader::subresource): * loader/ResourceBuffer.cpp: (WebCore::ResourceBuffer::hasPurgeableBuffer): Deleted. (WebCore::ResourceBuffer::setShouldUsePurgeableMemory): Deleted. (WebCore::ResourceBuffer::createPurgeableBuffer): Deleted. (WebCore::ResourceBuffer::releasePurgeableBuffer): Deleted. * loader/ResourceBuffer.h: * loader/SubresourceLoader.cpp: (WebCore::SubresourceLoader::didFinishLoading): * loader/cache/CachedCSSStyleSheet.cpp: (WebCore::CachedCSSStyleSheet::sheetText): (WebCore::CachedCSSStyleSheet::destroyDecodedData): * loader/cache/CachedCSSStyleSheet.h: * loader/cache/CachedImage.cpp: (WebCore::CachedImage::image): (WebCore::CachedImage::imageForRenderer): (WebCore::CachedImage::imageSizeForRenderer): (WebCore::CachedImage::destroyDecodedData): (WebCore::CachedImage::canUseDiskImageCache): * loader/cache/CachedImage.h: * loader/cache/CachedResource.cpp: (WebCore::CachedResource::addClientToSet): (WebCore::CachedResource::isSafeToMakePurgeable): Deleted. (WebCore::CachedResource::makePurgeable): Deleted. (WebCore::CachedResource::isPurgeable): Deleted. (WebCore::CachedResource::wasPurged): Deleted. * loader/cache/CachedResource.h: (WebCore::CachedResource::resourceBuffer): (WebCore::CachedResource::purgePriority): Deleted. * loader/cache/CachedScript.cpp: (WebCore::CachedScript::script): (WebCore::CachedScript::destroyDecodedData): * loader/cache/CachedScript.h: * loader/cache/MemoryCache.cpp: (WebCore::MemoryCache::resourceForRequestImpl): (WebCore::MemoryCache::pruneDeadResourcesToSize): (WebCore::MemoryCache::evict): (WebCore::MemoryCache::TypeStatistic::addResource): (WebCore::MemoryCache::dumpStats): (WebCore::MemoryCache::dumpLRULists): (WebCore::MemoryCache::makeResourcePurgeable): Deleted. * loader/cache/MemoryCache.h: (WebCore::MemoryCache::TypeStatistic::TypeStatistic): (WebCore::MemoryCache::shouldMakeResourcePurgeableOnEviction): Deleted. * platform/PurgePriority.h: Removed. * platform/PurgeableBuffer.h: Removed. * platform/SharedBuffer.cpp: (WebCore::SharedBuffer::SharedBuffer): (WebCore::SharedBuffer::size): (WebCore::SharedBuffer::data): (WebCore::SharedBuffer::append): (WebCore::SharedBuffer::clear): (WebCore::SharedBuffer::copy): (WebCore::SharedBuffer::getSomeData): (WebCore::SharedBuffer::adoptPurgeableBuffer): Deleted. (WebCore::SharedBuffer::createPurgeableBuffer): Deleted. (WebCore::SharedBuffer::releasePurgeableBuffer): Deleted. * platform/SharedBuffer.h: (WebCore::SharedBuffer::hasPurgeableBuffer): Deleted. (WebCore::SharedBuffer::shouldUsePurgeableMemory): Deleted. * platform/cf/SharedBufferCF.cpp: (WebCore::SharedBuffer::SharedBuffer): * platform/mac/PurgeableBufferMac.cpp: Removed. * platform/mac/SharedBufferMac.mm: (WebCore::SharedBuffer::createCFData): * platform/soup/SharedBufferSoup.cpp: 2014-08-18 Pratik Solanki Use modern for loop instead of iterators in SharedBufferCF.cpp https://bugs.webkit.org/show_bug.cgi?id=136000 Reviewed by Andreas Kling. * platform/cf/SharedBufferCF.cpp: (WebCore::SharedBuffer::copyBufferAndClear): (WebCore::SharedBuffer::copySomeDataFromDataArray): (WebCore::SharedBuffer::maybeAppendDataArray): Use auto& instead of auto for less RetainPtr/refcount churn. 2014-08-18 Antti Koivisto Tighten RenderCounter typing https://bugs.webkit.org/show_bug.cgi?id=136049 Reviewed by Andreas Kling. RenderObject* -> RenderElement& * rendering/CounterNode.cpp: (WebCore::CounterNode::CounterNode): (WebCore::CounterNode::create): (WebCore::showTreeAndMark): * rendering/CounterNode.h: (WebCore::CounterNode::owner): * rendering/RenderCounter.cpp: (WebCore::previousInPreOrder): (WebCore::parentOrPseudoHostElement): (WebCore::previousSiblingOrParent): (WebCore::areRenderersElementsSiblings): (WebCore::nextInPreOrder): (WebCore::planCounter): (WebCore::findPlaceForCounter): (WebCore::makeCounterNode): (WebCore::RenderCounter::originalText): (WebCore::destroyCounterNodeWithoutMapRemoval): (WebCore::RenderCounter::destroyCounterNodes): (WebCore::RenderCounter::destroyCounterNode): (WebCore::RenderCounter::rendererRemovedFromTree): (WebCore::updateCounters): (WebCore::RenderCounter::rendererSubtreeAttached): (WebCore::RenderCounter::rendererStyleChanged): (showCounterRendererTree): * rendering/RenderCounter.h: * rendering/RenderElement.cpp: (WebCore::RenderElement::RenderElement): (WebCore::RenderElement::insertChildInternal): (WebCore::RenderElement::removeChildInternal): (WebCore::RenderElement::styleDidChange): (WebCore::RenderElement::willBeDestroyed): * rendering/RenderElement.h: (WebCore::RenderElement::hasCounterNodeMap): (WebCore::RenderElement::setHasCounterNodeMap): Move CounterNodeMap to RenderElement from RenderObject. * rendering/RenderObject.cpp: (WebCore::RenderObject::willBeDestroyed): * rendering/RenderObject.h: (WebCore::RenderObject::RenderObjectBitfields::RenderObjectBitfields): (WebCore::RenderObject::hasCounterNodeMap): Deleted. (WebCore::RenderObject::setHasCounterNodeMap): Deleted. 2014-08-18 Peyton Randolph Expose long mouse press WebKit API. Part of 135257 - Add long mouse press gesture https://bugs.webkit.org/show_bug.cgi?id=136048 Reviewed by Dan Bernstein. This patch exposes long mouse press API callbacks in both the injected bundle and on the UI process through their respective page UI clients. The callbacks are modeled off of the mouseDidMoveOverElement callback. Like the mouseDidMoveOverElement callback, these callbacks allow the bundle to pass information to the UI process via a userData out parameter. * page/Chrome.cpp: (WebCore::Chrome::didBeginTrackingPotentialLongMousePress): Added. (WebCore::Chrome::didRecognizeLongMousePress): Added. (WebCore::Chrome::didCancelTrackingPotentialLongMousePress): Added. * page/Chrome.h: * page/ChromeClient.h: (WebCore::ChromeClient::didBeginTrackingPotentialLongMousePress): Added. (WebCore::ChromeClient::didRecognizeLongMousePress): Added. (WebCore::ChromeClient::didCancelTrackingPotentialLongMousePress): Added. * page/EventHandler.cpp: (WebCore::EventHandler::handleMousePressEvent): Pass the press hit test result to kick off the long mouse press. (WebCore::EventHandler::beginTrackingPotentialLongMousePress): Notify the chrome. (WebCore::EventHandler::recognizeLongMousePress): Ditto. (WebCore::EventHandler::cancelTrackingPotentialLongMousePress): Ditto. Also opportunistically remove a runtime switch check to see if long pressing is enabled. The runtime switch check was only triggered when long pressing was disabled in the middle of a long press. * page/EventHandler.h: 2014-08-18 Przemyslaw Kuczynski Fix unintentional integer overflow before widen https://bugs.webkit.org/show_bug.cgi?id=135463 Reviewed by Oliver Hunt. Overflowing expression is evaluated using operands arithmetic but then is used in context which expects an wider integer type. To avoid overflow at least one operand has to be representative of the wider type. * loader/FTPDirectoryParser.cpp: (WebCore::parseOneFTPLine): Changed strtoul to strtoull. * loader/ProgressTracker.cpp: (WebCore::ProgressTracker::incrementProgress): Added static_cast to long long. * platform/efl/FileSystemEfl.cpp: (WebCore::getVolumeFreeSizeForPath): Added static_cast to uint64_t. 2014-08-18 Vivek Galatage Implement CanvasRenderingContext2D direction attribute https://bugs.webkit.org/show_bug.cgi?id=135878 Reviewed by Darin Adler. The attribute, 'direction', represents the text directionality. This is an important attribute for the bi-directional text within the CanvasRenderingContext2D. The allowed set of values are 'rtl', 'ltr' and 'inherit'. Specification URL: http://www.whatwg.org/specs/web-apps/current-work/multipage/scripting.html#dom-context-2d-direction Test: fast/canvas/canvas-direction.html * html/canvas/CanvasRenderingContext2D.cpp: (WebCore::inheritedDirection): (WebCore::CanvasRenderingContext2D::CanvasRenderingContext2D): (WebCore::CanvasRenderingContext2D::reset): (WebCore::CanvasRenderingContext2D::State::State): (WebCore::CanvasRenderingContext2D::State::operator=): (WebCore::CanvasRenderingContext2D::direction): (WebCore::CanvasRenderingContext2D::setDirection): (WebCore::CanvasRenderingContext2D::drawTextInternal): * html/canvas/CanvasRenderingContext2D.h: * html/canvas/CanvasRenderingContext2D.idl: 2014-08-18 Benjamin Poulain The style is not updated correctly when the pseudo class :empty is applied on anything but the rightmost element https://bugs.webkit.org/show_bug.cgi?id=135999 Reviewed by Antti Koivisto. In Element's checkForEmptyStyleChange(), the style invalidation was only considering the invalidation of the element for which the subtree has changed. When the pseudo class :empty is used with a sibling combinator (e.g. foo:empty+bar), we were never invalidating the style of the element on which the selector applies. This patch fixes the issue by invalidating the whole subtree rooted at the parent if the :empty rules applies to siblings. A new flag "styleOfSiblingsAffectedByEmpty" is introduced to cover this case. SelectorChecker just sets the flag all the time if any sibling rule exists. This is overkill but that code is just there for non-jit cases. SelectorCompiler does a better job and only sets the flag if matching anything else than the rightmost element. There is a case not optimized, :empty with descendant (e.g. foo:empty>bar). Those cases are useless in practice, it is not worth optimizing them. Tests: fast/css/pseudo-element-updates-on-empty.html fast/selectors/not-empty-adjacent-style-update.html fast/selectors/not-empty-style-update.html * css/SelectorChecker.cpp: (WebCore::SelectorChecker::checkOne): * cssjit/SelectorCompiler.cpp: (WebCore::SelectorCompiler::fragmentMatchesTheRightmostElement): shouldUseRenderStyleFromCheckingContext() is renamed fragmentMatchesTheRightmostElement() because it is now also used by generateElementIsEmpty() in a context where the Context's style is irrelevant. (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker): (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsActive): (WebCore::SelectorCompiler::setStyleOfSiblingsAffectedByEmpty): (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsEmpty): (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsFirstChild): (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsHovered): (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsLastChild): (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsOnlyChild): (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthChild): (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementHasPseudoElement): (WebCore::SelectorCompiler::SelectorCodeGenerator::generateRequestedPseudoElementEqualsToSelectorPseudoElement): (WebCore::SelectorCompiler::shouldUseRenderStyleFromCheckingContext): Deleted. (WebCore::SelectorCompiler::setElementStyleIsAffectedByEmptyAndUpdateRenderStyleIfNecessary): Deleted. * dom/Element.cpp: (WebCore::checkForEmptyStyleChange): (WebCore::Element::setStyleOfSiblingsAffectedByEmpty): (WebCore::Element::rareDataStyleOfSiblingsAffectedByEmpty): * dom/Element.h: (WebCore::Element::styleOfSiblingsAffectedByEmpty): * dom/ElementRareData.h: (WebCore::ElementRareData::styleOfSiblingsAffectedByEmpty): (WebCore::ElementRareData::setStyleOfSiblingsAffectedByEmpty): (WebCore::ElementRareData::ElementRareData): 2014-08-18 Brent Fulgham [Mac] Unreviewed merge correction. * page/mac/EventHandlerMac.mm: (WebCore::EventHandler::platformCompleteWheelEvent): Revert an unintended change from r172705. 2014-08-18 Bem Jones-Bey Small cleanup for ShapeOutsideDeltas https://bugs.webkit.org/show_bug.cgi?id=136043 Reviewed by Zoltan Horvath. Remove explicit initializtion of LayoutUnit members and explicitly size the boolean flags so they pack properly. No new tests, no behavior change. * rendering/shapes/ShapeOutsideInfo.h: 2014-08-18 Dirk Schulze calc() doesn't work for SVG CSS properties https://bugs.webkit.org/show_bug.cgi?id=136026 Reviewed by Andreas Kling. Make calc() work on SVG CSS properties as well. stroke-width and stroke-dashoffset used SVGLength. SVGLength doesn't work together with cross units length arguments like % and px (just returns 0 in these cases). I moved these properties over to Length. All modified files beside to SVGCSSParser are related to this switch. Test: svg/css/parse-calc-length.html * css/CSSComputedStyleDeclaration.cpp: (WebCore::ComputedStyleExtractor::propertyValue): * css/DeprecatedStyleBuilder.cpp: (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder): * css/SVGCSSComputedStyleDeclaration.cpp: (WebCore::ComputedStyleExtractor::svgPropertyValue): * css/SVGCSSParser.cpp: (WebCore::CSSParser::parseSVGValue): * css/SVGCSSStyleSelector.cpp: (WebCore::StyleResolver::applySVGProperty): * page/animation/CSSPropertyAnimation.cpp: (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap): * rendering/style/RenderStyle.h: * rendering/style/SVGRenderStyle.h: (WebCore::SVGRenderStyle::setStrokeWidth): (WebCore::SVGRenderStyle::setStrokeDashOffset): (WebCore::SVGRenderStyle::strokeWidth): (WebCore::SVGRenderStyle::strokeDashOffset): (WebCore::SVGRenderStyle::initialStrokeDashOffset): Deleted. (WebCore::SVGRenderStyle::initialStrokeWidth): Deleted. * rendering/style/SVGRenderStyleDefs.cpp: (WebCore::StyleStrokeData::StyleStrokeData): * rendering/style/SVGRenderStyleDefs.h: * rendering/svg/RenderSVGShape.cpp: (WebCore::RenderSVGShape::strokeWidth): * rendering/svg/RenderSVGText.cpp: (WebCore::RenderSVGText::strokeBoundingBox): * rendering/svg/SVGRenderSupport.cpp: (WebCore::SVGRenderSupport::applyStrokeStyleToContext): * rendering/svg/SVGRenderTreeAsText.cpp: (WebCore::writeStyle): * svg/SVGLengthContext.cpp: (WebCore::SVGLengthContext::valueForLength): 2014-08-18 Andy Estes REGRESSION (r167856): adobe.com no longer able to launch Create Cloud app using a URL with a custom scheme https://bugs.webkit.org/show_bug.cgi?id=136010 Reviewed by Darin Adler. r167856 caused WebKit to stop scheduling certain kinds of navigations (window.location changes, meta-refresh, and some calls to window.open) when the request URL is invalid. Adobe.com performs one of these navigations to an invalid URL with an external scheme (aam:), relying on Safari's navigation policy delegate to ignore the navigation and launch the external app registered to handle aam: URLs. Since the navigation is no longer scheduled, the policy delegate is never executed and the external app never launches. Instead of not scheduling the navigation, allow it to proceed until the client's policy delegate has executed and made a decision. Only disallow the navigation if the policy delegate told WebKit to proceed with the load. This exposes these navigations to clients via the policy delegate and via willPerformClientRedirectToURL and didCancelClientRedirectForFrame on the frame load delegate. To constrain this check only to the navigation types covered by r167856, only two NavigationSchedulers (ScheduledRedirect and ScheduledLocationChange) enable the invalid URL check. Note that r167856 also caused an iOS regression, and this was resolved in r170120 by adding a linked-on-or-after check and a WebCore setting. Since the iOS regression is also resolved by the approach described above, this patch reverts r170120 (but keeps some of its tests). Tests: fast/loader/redirect-to-invalid-url-using-javascript-calls-policy-delegate.html fast/loader/redirect-to-invalid-url-using-javascript-disallowed.html fast/loader/redirect-to-invalid-url-using-meta-refresh-calls-policy-delegate.html fast/loader/redirect-to-invalid-url-using-meta-refresh-disallowed.html fast/loader/window-open-to-invalid-url-calls-policy-delegate.html fast/loader/window-open-to-invalid-url-disallowed.html * WebCore.exp.in: Updated the symbol FrameLoader::loadFrameRequest. * loader/FrameLoader.cpp: (WebCore::FrameLoader::changeLocation): Added an AllowNavigationToInvalidURL argument; passed down to urlSelected. (WebCore::FrameLoader::urlSelected): Added an AllowNavigationToInvalidURL argument; passed down to loadFrameRequest. (WebCore::FrameLoader::loadURLIntoChildFrame): Passed AllowNavigationToInvalidURL::Yes to loadURL. (WebCore::FrameLoader::loadFrameRequest): Added an AllowNavigationToInvalidURL argument; passed down to loadURL and loadPostRequest. (WebCore::FrameLoader::loadURL): Added an AllowNavigationToInvalidURL argument; passed down to continueLoadAfterNewWindowPolicy and loadWithNavigationAction. (WebCore::FrameLoader::loadPostRequest): Ditto. (WebCore::FrameLoader::load): Passed AllowNavigationToInvalidURL::Yes to continueLoadAfterNewWindowPolicy. (WebCore::FrameLoader::loadWithNavigationAction): Added an AllowNavigationToInvalidURL argument; passed down to loadWithDocumentLoader. (WebCore::FrameLoader::loadWithDocumentLoader): Added an AllowNavigationToInvalidURL argument; passed down to continueLoadAfterNavigationPolicy. (WebCore::FrameLoader::reloadWithOverrideEncoding): Passed AllowNavigationToInvalidURL::Yes to loadWithDocumentLoader. (WebCore::FrameLoader::reload): Ditto. (WebCore::FrameLoader::continueLoadAfterNavigationPolicy): Added an AllowNavigationToInvalidURL argument; if its value is No and the request's URL is invalid, do not continue. Added a FIXME about calling clientRedirectCancelledOrFinished on non-quick redirect cancellations. (WebCore::FrameLoader::continueLoadAfterNewWindowPolicy): Added an AllowNavigationToInvalidURL argument; passed down to loadWithNavigationAction. (WebCore::FrameLoader::loadDifferentDocumentItem): Passed AllowNavigationToInvalidURL::Yes to either loadWithDocumentLoader or loadWithNavigationAction. * loader/FrameLoader.h: * loader/FrameLoaderTypes.h: Defined AllowNavigationToInvalidURL to have values of Yes and No. * loader/NavigationScheduler.cpp: (WebCore::ScheduledRedirect::fire): Passed AllowNavigationToInvalidURL::No to FrameLoader::changeLocation. (WebCore::ScheduledLocationChange::fire): Ditto. (WebCore::NavigationScheduler::shouldScheduleNavigation): Removed the URL::isValid check. (WebCore::NavigationScheduler::scheduleLocationChange): Passed AllowNavigationToInvalidURL::No to FrameLoder::changeLocation during fragment navigations. * page/ContextMenuController.cpp: (WebCore::openNewWindow): Passed AllowNavigationToInvalidURL::Yes to FrameLoader::loadFrameRequest. (WebCore::ContextMenuController::contextMenuItemSelected): Ditto. * page/Settings.in: Removed allowNavigationToInvalidURL. 2014-08-18 Renata Hodovan Fix keyTimes list length of from/to/by animations. https://bugs.webkit.org/show_bug.cgi?id=136037 Reviewed by Darin Adler. For from/to/by animations, the length of keyTimes and keyPoints attribute if are specified must be equal and must have at least 2 values. This is backport of my fix in Blink: https://codereview.chromium.org/453243003/ Test: svg/animations/invalid-keytime-number-crash.html * svg/SVGAnimationElement.cpp: (WebCore::SVGAnimationElement::startedActiveInterval): 2014-08-18 Brent Fulgham [Mac] Follow-up to r136040 based on Darin Adler's comments. Pass Widget* as a Widget&, since it can never be null. * page/EventHandler.cpp: (WebCore::EventHandler::platformCompletePlatformWidgetWheelEvent): (WebCore::EventHandler::handleWheelEvent): * page/EventHandler.h: * page/mac/EventHandlerMac.mm: (WebCore::EventHandler::platformCompleteWheelEvent): (WebCore::EventHandler::platformCompletePlatformWidgetWheelEvent): 2014-08-17 Brent Fulgham [Mac] Gesture scrolls don't work in the WebKit1 clients after scrolling a non-scrollable iFrame https://bugs.webkit.org/show_bug.cgi?id=136029 Reviewed by Maciej Stachowiak. This is difficult to test in our layout tests, since it relies on specific host application behavior. If the platform widget is a frame view (IFrame), and we are in WebKit1, 'passWheelEventToWidget' has already called 'scrollWheel' on the underlying platform widget. We need to return true in this case to avoid getting multiple copies of the scrollWheel event sent to the platform widget. * page/EventHandler.cpp: (WebCore::EventHandler::platformCompletePlatformWidgetWheelEvent): Revise default stub to accept a Widget* argument. (WebCore::EventHandler::handleWheelEvent): * page/EventHandler.h: * page/mac/EventHandlerMac.mm: (WebCore::EventHandler::platformCompletePlatformWidgetWheelEvent): Check for WK1 case and return 'true' when the underlying NSScrollView has been issues a scrollWheel event. 2014-08-18 Andy Estes Revert r172697. It made several webarchive layout tests flaky and didn't have the correct behavior for non-quick redirects. * loader/FrameLoader.cpp: (WebCore::FrameLoader::continueLoadAfterNavigationPolicy): * loader/NavigationScheduler.cpp: (WebCore::NavigationScheduler::shouldScheduleNavigation): * page/Settings.in: 2014-08-15 Andy Estes REGRESSION (r167856): adobe.com no longer able to launch Create Cloud app using a URL with a custom scheme https://bugs.webkit.org/show_bug.cgi?id=136010 Reviewed by Darin Adler. r167856 caused WebKit to stop scheduling certain kinds of navigations (window.location changes, meta-refresh, and some calls to window.open) when the request URL is invalid. Adobe.com performs one of these navigations to an invalid URL with an external scheme (aam:), relying on Safari's navigation policy delegate to ignore the navigation and launch the external app registered to handle aam: URLs. Since the navigation is no longer scheduled, the policy delegate is never executed and the external app never launches. Instead of not scheduling the navigation, allow it to proceed until the client's policy delegate has executed and made a decision. Only disallow the navigation if the policy delegate told WebKit to proceed with the load. This exposes these navigations to clients via the policy delegate and via willPerformClientRedirectToURL and didCancelClientRedirectForFrame on the frame load delegate. Note that r167856 also caused an iOS regression, and this was resolved in r170120 by adding a linked-on-or-after check and a WebCore setting. Since the iOS regression is also resolved by the approach described above, this patch reverts r170120 (but keeps some of its tests). Tests: fast/loader/redirect-to-invalid-url-using-javascript-calls-policy-delegate.html fast/loader/redirect-to-invalid-url-using-javascript-disallowed.html fast/loader/redirect-to-invalid-url-using-meta-refresh-calls-policy-delegate.html fast/loader/redirect-to-invalid-url-using-meta-refresh-disallowed.html fast/loader/window-open-to-invalid-url-calls-policy-delegate.html fast/loader/window-open-to-invalid-url-disallowed.html * loader/FrameLoader.cpp: (WebCore::FrameLoader::continueLoadAfterNavigationPolicy): Do not continue if the navigation will be a redirect to an invalid URL. * loader/NavigationScheduler.cpp: (WebCore::NavigationScheduler::shouldScheduleNavigation): Resumed scheduling navigations to invalid URLs. * page/Settings.in: Removed the allowNavigationToInvalidURL setting. 2014-08-15 Dean Jackson REGRESSION (r164173): Safari AutoFill button in popover, default buttons on iCloud control panel and Safari Safe Browsing pages don't have default appearance https://bugs.webkit.org/show_bug.cgi?id=136011 Reviewed by Sam Weinig. When we render some controls, we need to make sure the NSWindow subclass we use as the host of the AppKit views identifies itself as the key window (if the control state is correct). We already have a flag tracking this for key appearance - just make sure we do the same for isKeyWindow. * platform/mac/ThemeMac.mm: (-[WebCoreThemeWindow isKeyWindow]): New override to mirror the static variable for key appearance. 2014-08-15 Zalan Bujtas Do not use FloatRect::infiniteRect() to flag full repaints. https://bugs.webkit.org/show_bug.cgi?id=135900 Reviewed by Simon Fraser. Converting FloatRect::infiniteRect() to IntRect leads to value overflow and we end up with invalid repaint rectangle. Use a boolean flag to indicate full repaint request. Covered by existing tests. * platform/graphics/ca/GraphicsLayerCA.cpp: (WebCore::GraphicsLayerCA::GraphicsLayerCA): (WebCore::GraphicsLayerCA::setNeedsDisplay): (WebCore::GraphicsLayerCA::setNeedsDisplayInRect): (WebCore::GraphicsLayerCA::repaintLayerDirtyRects): * platform/graphics/ca/GraphicsLayerCA.h: * platform/graphics/ca/PlatformCALayer.h: * platform/graphics/ca/TileGrid.cpp: (WebCore::TileGrid::setTileNeedsDisplayInRect): * platform/graphics/ca/mac/PlatformCALayerMac.h: * platform/graphics/ca/mac/PlatformCALayerMac.mm: (PlatformCALayerMac::setNeedsDisplay): (PlatformCALayerMac::setNeedsDisplayInRect): 2014-08-15 Benjamin Poulain Unify the modes style resolution modes SharingRules and StyleInvalidation https://bugs.webkit.org/show_bug.cgi?id=135969 Reviewed by Andreas Kling. Unifying the Collector and SelectorCheckers was done in previous patches, this is just removing the enums. * css/ElementRuleCollector.cpp: (WebCore::ElementRuleCollector::collectMatchingRules): (WebCore::ElementRuleCollector::hasAnyMatchingRules): * css/SelectorChecker.cpp: (WebCore::SelectorChecker::match): * css/SelectorChecker.h: * css/StyleInvalidationAnalysis.cpp: (WebCore::invalidateStyleRecursively): * cssjit/SelectorCompiler.cpp: (WebCore::SelectorCompiler::SelectorCodeGenerator::generateMarkPseudoStyleForPseudoElement): 2014-08-15 Benjamin Poulain CSS JIT: compile :-webkit-full-page-media https://bugs.webkit.org/show_bug.cgi?id=135968 Reviewed by Alexey Proskuryakov. Add the pseudo class :-webkit-full-page-media with an unoptimized function call. It would be possible to inline it, but this selector is so uncommon I don't think it is worth having any additional complexity for it. * css/SelectorChecker.cpp: (WebCore::SelectorChecker::checkOne): * css/SelectorCheckerTestFunctions.h: (WebCore::isMediaDocument): * cssjit/SelectorCompiler.cpp: (WebCore::SelectorCompiler::addPseudoClassType): 2014-08-15 Wenson Hsieh Fix gliding in AxisScrollSnapAnimator for Mac https://bugs.webkit.org/show_bug.cgi?id=135971 Reviewed by Dean Jackson. Previously, momentum events that are handled immediately after finishing a glide animation cause a second, extremely slow glide animation to trigger. To fix this, I added a new state DestinationReached. During this state, additional momentum events that are handled after the glide animation completes will not fill up the momentum window and trigger a second glide event. * platform/mac/AxisScrollSnapAnimator.h: * platform/mac/AxisScrollSnapAnimator.mm: (WebCore::AxisScrollSnapAnimator::AxisScrollSnapAnimator): (WebCore::AxisScrollSnapAnimator::handleWheelEvent): (WebCore::AxisScrollSnapAnimator::scrollSnapAnimationUpdate): (WebCore::AxisScrollSnapAnimator::endScrollSnapAnimation): (WebCore::AxisScrollSnapAnimator::computeGlideDelta): 2014-08-15 Eric Carlson [MSE] Implement a maximum buffer size for SourceBuffer https://bugs.webkit.org/show_bug.cgi?id=135614 Reviewed by Jer Noble. Implement the MSE coded frame eviction algorithm: when new buffers are appended attempt to keep the amount of data buffered below a maximum size (which is determined by the media session manager) by freeing coded frames as follows: 1 - Free frames in 30 second chunks from 0 to 30 seconds before the current time. 2 - If there are time ranges after the range with the current time, free frames in 30 second chunks from duration back to the beginning of the time range after current time. For now we DO NOT throw a QUOTA_EXCEEDED_ERR when we are not able to free up enough space to remain below the prescribed quota, because some big name, widely deployed, code bases ignore the error and continue appending data as though the failed append succeeded, leading to a corrupted bitstream and failure to play. * Modules/mediasource/SampleMap.cpp: (WebCore::SampleMap::addSample): Drive-by performance optimization: sample->presentationTime() is used more than once, stash it in a local variable. (WebCore::SampleMap::removeSample): Ditto. * Modules/mediasource/SourceBuffer.cpp: (WebCore::logRanges): Debug-only function to log TimeRanges. (WebCore::SourceBuffer::SourceBuffer): (WebCore::SourceBuffer::remove): Optimize logging. Buffer full and coded frame eviction logic is in SourceBuffer instead of SourceBufferPrivate. (WebCore::SourceBuffer::appendBufferInternal): Ditto. (WebCore::SourceBuffer::sourceBufferPrivateAppendComplete): Set m_bufferFull when more data has been buffered than allowed. (WebCore::removeSamplesFromTrackBuffer): Add logging. (WebCore::SourceBuffer::removeCodedFrames): Improve logging. Avoid debug build assert when current time is after last enqueued presentation time. (WebCore::SourceBuffer::evictCodedFrames): The coded frame eviction algorithm. (WebCore::SourceBuffer::maximumBufferSize): Return the maximum amount of data that can be buffered. (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample): Improve logging. Don't attempt to create a PlatformTimeRanges with inverted start and end to avoid an assert in debug. (WebCore::SourceBuffer::hasAudio): New, return true if there are any audio tracks. (WebCore::SourceBuffer::hasVideo): New, return true if there are any video tracks. (WebCore::SourceBuffer::sourceBufferPrivateHasAudio): Call hasAudio. (WebCore::SourceBuffer::sourceBufferPrivateHasVideo): Call hasVideo. (WebCore::SourceBuffer::hasCurrentTime): Return true if currentTime is greater than duration. (WebCore::SourceBuffer::hasFutureTime): Ditto. (WebCore::SourceBuffer::extraMemoryCost): Return the amount of data buffered: the size of the input buffer plus the size of all track samples. (WebCore::SourceBuffer::reportExtraMemoryCost): Move buffered size calculation to extraMemoryCost. (WebCore::SourceBuffer::document): Document accessor. * Modules/mediasource/SourceBuffer.h: Drive-by size optimization by moving all bool member variables to the end of class. * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::refreshCachedTime): Drive-by removal of overly chatty logging. (WebCore::HTMLMediaElement::maximumSourceBufferSize): New, maximum source buffer size. * html/HTMLMediaElement.h: * html/HTMLMediaSession.cpp: (WebCore::HTMLMediaSession::maximumMediaSourceBufferSize): New, get maximum source buffer size from settings, return full amount for an SourceBuffer with video and audio, return 5% of the maximum for an audio-only SourceBuffer. * html/HTMLMediaSession.h: * page/Settings.in: Add maximumSourceBufferSize. Default value is enough for approximately five minutes of 1080p video and stereo audio. * platform/graphics/PlatformTimeRanges.cpp: (WebCore::PlatformTimeRanges::totalDuration): Drive-by optimization. (WebCore::PlatformTimeRanges::dump): New, allow a PlatformTimeRanges to be printed. * platform/graphics/PlatformTimeRanges.h: * platform/graphics/SourceBufferPrivate.h: Delete evictCodedFrames and isFull, that logic is not in SourceBuffer. * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h: * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm: (WebCore::SourceBufferPrivateAVFObjC::processCodedFrame): Drive-by logging fix. (WebCore::SourceBufferPrivateAVFObjC::evictCodedFrames): Deleted. (WebCore::SourceBufferPrivateAVFObjC::isFull): Deleted. * platform/mock/mediasource/MockSourceBufferPrivate.cpp: (WebCore::MockSourceBufferPrivate::evictCodedFrames): Deleted. (WebCore::MockSourceBufferPrivate::isFull): Deleted. * platform/mock/mediasource/MockSourceBufferPrivate.h: 2014-08-15 Zalan Bujtas REGRESSION: Parts of the route/route options windows are invisible at maps.google.com https://bugs.webkit.org/show_bug.cgi?id=135977 Reviewed by Andreas Kling. When the style change requires both layout and repaint, the style diff is set to 'layout is needed' (and masks the repaint change) as normally layout is followed by a repaint. However, in compositing context, layout may not be followed by repaint, so when the style diff indicates layout, we need to figure out whether it implies repaint too. This logic should eventually be moved from RenderElement to RenderLayerModelObject/RenderLayer. -tracked here: webkit.org/b/135990 Test: compositing/cliprect-and-position-change-on-compositing-layer.html * rendering/RenderElement.cpp: (WebCore::RenderElement::setNeedsPositionedMovementLayout): * rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::changeRequiresLayerRepaint): (WebCore::RenderStyle::diffRequiresLayerRepaint): (WebCore::RenderStyle::diffRequiresRepaint): Deleted. * rendering/style/RenderStyle.h: * rendering/style/RenderStyleConstants.h: 2014-08-15 Brian J. Burg Web Inspector: rewrite CodeGeneratorInspector to be modular and testable https://bugs.webkit.org/show_bug.cgi?id=131596 Reviewed by Joseph Pecoraro. Aside from hooking up the new inspector bindings generator to the build system, there are a few comingled changes that would be painful to split from the main patch. Together, these changes make it possible to forward-declare all protocol enumerations as scoped enums, reducing weird ordering dependencies between domains. All runtimeCast() methods are now static methods of BindingTraits specializations, rather than as static methods of the type builder classes. All protocol enumeration types are scoped enums rather than struct-namespaced enums. Remove some implicit protocol type and enumeration definitions because they trigger compiler bugs or introduce unnecessary complexity in the bindings generator. No new tests, no behavior changed. * CMakeLists.txt: * DerivedSources.make: Update script dependencies and the bindings generator script name. * inspector/CommandLineAPIHost.cpp: (WebCore::CommandLineAPIHost::inspectImpl): Convert to BindingTraits. * inspector/InspectorCSSAgent.cpp: (WebCore::InspectorCSSAgent::detectOrigin): (WebCore::InspectorCSSAgent::buildArrayForRegions): * inspector/InspectorCSSAgent.h: * inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties): * inspector/InspectorPageAgent.cpp: (WebCore::InspectorPageAgent::resourceTypeJson): (WebCore::InspectorPageAgent::cachedResourceTypeJson): (WebCore::InspectorPageAgent::getScriptExecutionStatus): Convert to scoped enums. (WebCore::InspectorPageAgent::buildObjectForFrameTree): Extract FrameResourceTree::Resources into its own explicitly-defined object type. The new generator does not support implicitly defining object types as elements of arrays. * inspector/InspectorPageAgent.h: * inspector/InspectorReplayAgent.cpp: Disambiguate between internal and protocol types. (WebCore::buildInspectorObjectForSessionState): (WebCore::buildInspectorObjectForSegmentState): (WebCore::InspectorReplayAgent::sessionState): (WebCore::InspectorReplayAgent::didCreateFrontendAndBackend): (WebCore::InspectorReplayAgent::frameNavigated): (WebCore::InspectorReplayAgent::frameDetached): (WebCore::InspectorReplayAgent::willDispatchEvent): (WebCore::InspectorReplayAgent::startCapturing): (WebCore::InspectorReplayAgent::stopCapturing): (WebCore::InspectorReplayAgent::replayToPosition): (WebCore::InspectorReplayAgent::replayToCompletion): (WebCore::InspectorReplayAgent::pausePlayback): (WebCore::InspectorReplayAgent::cancelPlayback): (WebCore::InspectorReplayAgent::switchSession): (WebCore::InspectorReplayAgent::insertSessionSegment): (WebCore::InspectorReplayAgent::removeSessionSegment): (WebCore::InspectorReplayAgent::currentReplayState): (WebCore::InspectorReplayAgent::getAvailableSessions): (WebCore::InspectorReplayAgent::getSessionData): (WebCore::InspectorReplayAgent::getSegmentData): * inspector/InspectorReplayAgent.h: * inspector/InspectorResourceAgent.cpp: (WebCore::InspectorResourceAgent::willSendRequest): * inspector/InspectorStyleSheet.cpp: Convert to scoped enums. Extract CSSProperty::Status because scoped enums defined in a class scope trigger compiler bugs in GCC 4.8. (WebCore::buildMediaObject): (WebCore::InspectorStyle::styleWithProperties): Work around compiler disagreements. (WebCore::InspectorStyleSheet::create): (WebCore::InspectorStyleSheet::InspectorStyleSheet): (WebCore::InspectorStyleSheetForInlineStyle::create): (WebCore::InspectorStyleSheetForInlineStyle::InspectorStyleSheetForInlineStyle): * inspector/InspectorStyleSheet.h: * inspector/InspectorTimelineAgent.cpp: Convert to scoped enums and BindingTraits. (WebCore::toProtocol): (WebCore::InspectorTimelineAgent::addRecordToTimeline): (WebCore::InspectorTimelineAgent::sendEvent): * inspector/protocol/CSS.json: Extract CSSProperty::Status. * inspector/protocol/Page.json: Extract FrameResourceTree::Resources. 2014-08-15 Jer Noble [EME][Mac] Adopt AVStreamSession. https://bugs.webkit.org/show_bug.cgi?id=135983 Reviewed by Eric Carlson. Add AVStreamDataParsers to a new AVStreamSession instance, and expire that session when asked to release the session's keys. * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h: * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm: (WebCore::CDMSessionMediaSourceAVFObjC::~CDMSessionMediaSourceAVFObjC): (WebCore::CDMSessionMediaSourceAVFObjC::releaseKeys): (WebCore::CDMSessionMediaSourceAVFObjC::update): 2014-08-15 Wenson Hsieh Implement snapping behavior for iOS https://bugs.webkit.org/show_bug.cgi?id=135769 Reviewed by Brent Fulgham. Added support for snap points on iOS. This entails sending snap points from the web process to the UI process by encoding and decoding snap points and updating ScrollingTreeOverflowScrollingNodeIOS and WKWebView to support animation to snap points in the cases of mainframe and overflow scrolling, respectively. There are no new tests yet -- we'll need to find a way to test this! * WebCore.exp.in: * page/scrolling/AsyncScrollingCoordinator.cpp: (WebCore::setStateScrollingNodeSnapOffsetsAsFloat): Helper functions used to convert LayoutUnits to floats for snap offsets. (WebCore::AsyncScrollingCoordinator::frameViewLayoutUpdated): Update snap offsets for mainframe scrolling, as well as the state node. (WebCore::AsyncScrollingCoordinator::updateOverflowScrollingNode): Added snap offsets. * page/scrolling/AxisScrollSnapOffsets.h: (WebCore::closestSnapOffset): Computes the closest snap offset given a sorted vector of comparable types (e.g. float, LayoutUnit). * page/scrolling/ScrollingCoordinator.h: * page/scrolling/ScrollingStateScrollingNode.cpp: (WebCore::ScrollingStateScrollingNode::ScrollingStateScrollingNode): (WebCore::ScrollingStateScrollingNode::setHorizontalSnapOffsets): (WebCore::ScrollingStateScrollingNode::setVerticalSnapOffsets): * page/scrolling/ScrollingStateScrollingNode.h: (WebCore::ScrollingStateScrollingNode::horizontalSnapOffsets): (WebCore::ScrollingStateScrollingNode::verticalSnapOffsets): * page/scrolling/ScrollingTreeScrollingNode.cpp: (WebCore::ScrollingTreeScrollingNode::updateBeforeChildren): * page/scrolling/ScrollingTreeScrollingNode.h: (WebCore::ScrollingTreeScrollingNode::horizontalSnapOffsets): (WebCore::ScrollingTreeScrollingNode::verticalSnapOffsets): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::updateScrollInfoAfterLayout): Update snap offsets for overflow scrolling. * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::updateScrollCoordinatedLayer): Updates the state node's snap offsets for overflow scrolling. 2014-08-15 Dirk Schulze Turn r/rx/ry to presentation attributes https://bugs.webkit.org/show_bug.cgi?id=135978 Unreviewed typo. * rendering/svg/RenderSVGEllipse.cpp: (WebCore::RenderSVGEllipse::calculateRadiiAndCenter): 2014-08-15 Dirk Schulze Turn r/rx/ry to presentation attributes https://bugs.webkit.org/show_bug.cgi?id=135978 Reviewed by Dean Jackson. This follows the patch for width and height presentation attributes and turns rx, ry and r to presentation attributes as well: ​http://trac.webkit.org/changeset/171341 Extended existing tests. * css/CSSComputedStyleDeclaration.cpp: (WebCore::ComputedStyleExtractor::propertyValue): * css/CSSParser.cpp: (WebCore::isSimpleLengthPropertyID): * css/DeprecatedStyleBuilder.cpp: (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder): * css/SVGCSSParser.cpp: (WebCore::CSSParser::parseSVGValue): * css/SVGCSSPropertyNames.in: * page/animation/CSSPropertyAnimation.cpp: (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap): * rendering/style/RenderStyle.h: * rendering/style/SVGRenderStyle.h: (WebCore::SVGRenderStyle::setR): (WebCore::SVGRenderStyle::setRx): (WebCore::SVGRenderStyle::setRy): (WebCore::SVGRenderStyle::r): (WebCore::SVGRenderStyle::rx): (WebCore::SVGRenderStyle::ry): * rendering/style/SVGRenderStyleDefs.cpp: (WebCore::StyleLayoutData::StyleLayoutData): (WebCore::StyleLayoutData::operator==): * rendering/style/SVGRenderStyleDefs.h: * rendering/svg/RenderSVGEllipse.cpp: (WebCore::RenderSVGEllipse::calculateRadiiAndCenter): * rendering/svg/SVGPathData.cpp: (WebCore::updatePathFromCircleElement): (WebCore::updatePathFromEllipseElement): (WebCore::updatePathFromRectElement): (WebCore::updatePathFromLineElement): Deleted. * svg/SVGCircleElement.cpp: (WebCore::SVGCircleElement::svgAttributeChanged): * svg/SVGElement.cpp: (WebCore::populateAttributeNameToCSSPropertyIDMap): (WebCore::populateCSSPropertyWithSVGDOMNameToAnimatedPropertyTypeMap): * svg/SVGEllipseElement.cpp: (WebCore::SVGEllipseElement::svgAttributeChanged): * svg/SVGRectElement.cpp: (WebCore::SVGRectElement::svgAttributeChanged): 2014-08-15 Dirk Schulze Turn cx/cy to presentation attributes https://bugs.webkit.org/show_bug.cgi?id=135975 Reviewed by Dean Jackson. This follows the patch for width and height presentation attributes and turns x and y to presentation attributes as well: ​http://trac.webkit.org/changeset/171341 Extended existing tests. * css/CSSComputedStyleDeclaration.cpp: (WebCore::ComputedStyleExtractor::propertyValue): * css/CSSParser.cpp: (WebCore::isSimpleLengthPropertyID): * css/DeprecatedStyleBuilder.cpp: (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder): * css/SVGCSSParser.cpp: (WebCore::CSSParser::parseSVGValue): * css/SVGCSSPropertyNames.in: * page/animation/CSSPropertyAnimation.cpp: (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap): * rendering/style/RenderStyle.h: * rendering/style/SVGRenderStyle.h: (WebCore::SVGRenderStyle::setCx): (WebCore::SVGRenderStyle::setCy): (WebCore::SVGRenderStyle::cx): (WebCore::SVGRenderStyle::cy): * rendering/style/SVGRenderStyleDefs.cpp: (WebCore::StyleLayoutData::StyleLayoutData): (WebCore::StyleLayoutData::operator==): * rendering/style/SVGRenderStyleDefs.h: * rendering/svg/RenderSVGEllipse.cpp: (WebCore::RenderSVGEllipse::calculateRadiiAndCenter): * rendering/svg/SVGPathData.cpp: (WebCore::updatePathFromCircleElement): (WebCore::updatePathFromEllipseElement): * svg/SVGCircleElement.cpp: (WebCore::SVGCircleElement::svgAttributeChanged): (WebCore::SVGCircleElement::selfHasRelativeLengths): Deleted. * svg/SVGCircleElement.h: * svg/SVGElement.cpp: (WebCore::populateAttributeNameToCSSPropertyIDMap): (WebCore::populateCSSPropertyWithSVGDOMNameToAnimatedPropertyTypeMap): * svg/SVGEllipseElement.cpp: (WebCore::SVGEllipseElement::svgAttributeChanged): (WebCore::SVGEllipseElement::selfHasRelativeLengths): Deleted. * svg/SVGEllipseElement.h: 2014-08-15 Adenilson Cavalcanti Fix typo in Path comment https://bugs.webkit.org/show_bug.cgi?id=135960 Reviewed by Alexey Proskuryakov. No new tests, no change on behavior. * platform/graphics/Path.h: 2014-08-14 Andreas Kling Remove two unused Range functions. Reviewed by Geoffrey Garen. * dom/Range.cpp: (WebCore::Range::maxStartOffset): Deleted. (WebCore::Range::maxEndOffset): Deleted. * dom/Range.h: 2014-08-14 Daniel Bates Preserve editing style for -webkit-tap-highlight-color on all ports that enable ENABLE_TOUCH_EVENTS https://bugs.webkit.org/show_bug.cgi?id=135963 Reviewed by Andy Estes. Currently we only preserve the CSS property -webkit-tap-highlight-color during editing operations for iOS. Instead we should preserve it for all ports that enable ENABLE_TOUCH_EVENTS as this CSS property isn't specific to iOS. Also added FIXME comment with regards to the CSS property -webkit-composition-fill-color. * editing/EditingStyle.cpp: 2014-08-14 Benjamin Poulain CSS JIT: compile the :empty pseudo class https://bugs.webkit.org/show_bug.cgi?id=135958 Reviewed by Andreas Kling. Compile :empty, nothing fancy. Tests: fast/selectors/empty-basics.html fast/selectors/empty-long-adjacent-backtracking.html fast/selectors/empty-adjacent-style-update.html fast/selectors/empty-style-update.html * cssjit/SelectorCompiler.cpp: (WebCore::SelectorCompiler::addPseudoClassType): (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatching): (WebCore::SelectorCompiler::jumpIfElementIsNotEmpty): (WebCore::SelectorCompiler::setElementStyleIsAffectedByEmpty): (WebCore::SelectorCompiler::setElementStyleFromContextIsAffectedByEmptyAndUpdateRenderStyleIfNecessary): (WebCore::SelectorCompiler::setElementStyleIsAffectedByEmptyAndUpdateRenderStyleIfNecessary): (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsEmpty): * dom/CharacterData.h: (WebCore::CharacterData::dataMemoryOffset): * dom/ContainerNode.h: (WebCore::ContainerNode::firstChildMemoryOffset): * dom/Node.h: (WebCore::Node::flagIsText): 2014-08-14 Wenson Hsieh Implement scroll snapping animations on Mac https://bugs.webkit.org/show_bug.cgi?id=135768 Reviewed by Beth Dakin. Implementing the scroll snap animations required for snapping in both overflow and mainframe areas on Mac. Since we receive a series of discrete wheel events, we need to predict the distance we need to traverse, compute the appropriate snap point, and then compute an animation curve to that location. The snap animations are split into two types: snapping, which handles letting go of the trackpad with zero velocity, and gliding, which handles flick gestures. In both cases, sinusoidal curves are used to ease animation to the target location. In the former case, the initial velocity is low, and increases to a maximum value during the middle of the animation before decreasing to 0. In the latter case, the curve is computed such that the initial velocity matches the user's scroll velocity, and the final velocity matches a lower final velocity that is somewhat arbitrarily computed. (See the FIXME in AxisScrollSnapOffsets::initializeGlideParameters). How the equations and constants were chosen is described in greater detail in the comments above AxisScrollSnapOffsets::computeGlideDelta and AxisScrollSnapOffsets::computeSnapDelta. Note that the final velocity should ideally be equal to 0. However, with this particular curve, this caused the animation to feel too slow near the snap point. No tests, since there is no observable change in behavior. Tests will be included when iOS and Mac scrolling areas hook into this code. * PlatformMac.cmake: * WebCore.xcodeproj/project.pbxproj: * page/scrolling/AxisScrollSnapOffsets.cpp: (WebCore::closestSnapOffset): Computes the closest snap offset given velocity and prdicted destination. * page/scrolling/AxisScrollSnapOffsets.h: * platform/mac/AxisScrollSnapAnimator.h: Added. (WebCore::AxisScrollSnapAnimatorClient::~AxisScrollSnapAnimatorClient): * platform/mac/AxisScrollSnapAnimator.mm: Added. (WebCore::toWheelEventStatus): Converts a pair of PlatformWheelEventPhases to a WheelEventStatus. (WebCore::projectedInertialScrollDistance): Attempts to predict the distance covered by the inertial scrolling phase. (WebCore::AxisScrollSnapAnimator::AxisScrollSnapAnimator): (WebCore::AxisScrollSnapAnimator::handleWheelEvent): Updates the internal state of the AxisScrollSnapAnimator, given a PlatformWheelEvent (WebCore::AxisScrollSnapAnimator::shouldOverrideWheelEvent): Determines whether or not we should override a wheel event given the animator's internal state. (WebCore::AxisScrollSnapAnimator::scrollSnapAnimationUpdate): Updates a single loop of the scroll snapping animation. (WebCore::AxisScrollSnapAnimator::beginScrollSnapAnimation): (WebCore::AxisScrollSnapAnimator::endScrollSnapAnimation): (WebCore::AxisScrollSnapAnimator::computeSnapDelta): See comments for more information. (WebCore::AxisScrollSnapAnimator::computeGlideDelta): See comments for more information. (WebCore::AxisScrollSnapAnimator::initializeGlideParameters): (WebCore::AxisScrollSnapAnimator::pushInitialWheelDelta): (WebCore::AxisScrollSnapAnimator::averageInitialWheelDelta): (WebCore::AxisScrollSnapAnimator::clearInitialWheelDeltaWindow): 2014-08-14 Saam Barati Allow high fidelity type profiling to be enabled and disabled. https://bugs.webkit.org/show_bug.cgi?id=135423 Reviewed by Geoffrey Garen. PageRuntimeAgent and WorkerRuntimeAgent now call their super class's (InspectorRuntimeAgent) implementation of willDestroyFrontendAndBackend to give InspectorRuntimeAgent a chance to recompile all JavaScript functions, if necessary, for type profiling. * inspector/PageRuntimeAgent.cpp: (WebCore::PageRuntimeAgent::willDestroyFrontendAndBackend): * inspector/WorkerRuntimeAgent.cpp: (WebCore::WorkerRuntimeAgent::willDestroyFrontendAndBackend): 2014-08-14 Brent Fulgham [Win] Correct build when DerivedSources location not supplied by build environment https://bugs.webkit.org/show_bug.cgi?id=135954 Reviewed by Joseph Pecoraro. The DerivedSourcesDirectory is not always defined, depending on what solution is being used to build this project. Instead, just define it directly, since we already know where it needs to go. Also: 1. Stop redirecting the copy output to NUL so I can see if this fails in the future. 2. Make sure the target directory exists before copying to it. * WebCore.vcxproj/copyForwardingHeaders.cmd: Properly specify the directories for copying the JS file. 2014-08-14 Zoltan Horvath [CSS3-Text] Cosmetics on RenderBlockFlow::textAlignmentForLine https://bugs.webkit.org/show_bug.cgi?id=135940 Reviewed by Darin Adler. Processing the not CSS3_TEXT case first, and removing an extra whitespace after r172524. * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlockFlow::textAlignmentForLine): 2014-08-14 Martin Hock IndexedDB should respect SchemeRegistry's database access setting. https://bugs.webkit.org/show_bug.cgi?id=135890 Reviewed by Alexey Proskuryakov. Test: storage/indexeddb/open-db-private-browsing.html * Modules/indexeddb/IDBFactory.cpp: 2014-08-14 Yoav Weiss srcset with w descriptor doesn't behave as expected when sizes is not supported. https://bugs.webkit.org/show_bug.cgi?id=135935 Reviewed by Dean Jackson. In current implementation, if sizes is not supported, when authors would write markup such as `` the first candidate in srcset would be picked, regardless of its dimensions That is likely to be confusing for authors. Dropping these "not yet supported" candidates is likely to be less confusing, and will result in the "fallback.jpg" candidate being picked. No new tests since this change only concerns builds that are built with the PICTURE_SIZES compile flag turned off. * html/parser/HTMLSrcsetParser.cpp: (WebCore::parseDescriptors): Drop candidates that include either 'w' or 'h' descriptors when the sizes feature is not supported. 2014-08-14 Antti Koivisto Make inherited style and parent renderer references https://bugs.webkit.org/show_bug.cgi?id=135857 Reviewed by Andreas Kling. We don't recurse into non-rendered subtrees anymore so they can't be null. Also stop using Element::renderStyle() as it differs from e->renderer().style() in some rare cases (that should be fixed). * style/StyleResolveTree.cpp: (WebCore::Style::RenderTreePosition::parent): (WebCore::Style::RenderTreePosition::RenderTreePosition): (WebCore::Style::RenderTreePosition::canInsert): (WebCore::Style::RenderTreePosition::insert): (WebCore::Style::RenderTreePosition::computeNextSibling): (WebCore::Style::shouldCreateRenderer): (WebCore::Style::styleForElement): (WebCore::Style::createRendererIfNeeded): (WebCore::Style::textRendererIsNeeded): (WebCore::Style::createTextRendererIfNeeded): (WebCore::Style::updateTextRendererAfterContentChange): (WebCore::Style::attachChildren): (WebCore::Style::attachDistributedChildren): (WebCore::Style::attachShadowRoot): (WebCore::Style::resetStyleForNonRenderedDescendants): (WebCore::Style::attachBeforeOrAfterPseudoElementIfNeeded): (WebCore::Style::attachRenderTree): (WebCore::Style::resolveLocal): (WebCore::Style::resolveShadowTree): (WebCore::Style::updateBeforeOrAfterPseudoElement): (WebCore::Style::resolveTree): 2014-08-14 Antti Koivisto [Forms] We should share RenderStyle object for optgroup and option element https://bugs.webkit.org/show_bug.cgi?id=88405 Reviewed by Andreas Kling. We can remove this special case now. * css/StyleResolver.cpp: (WebCore::StyleResolver::canShareStyleWithElement): 2014-08-14 Antti Koivisto Remove nonRendererStyle https://bugs.webkit.org/show_bug.cgi?id=135938 Reviewed by Andreas Kling. It is used to support styling of non-renderer option elements. We have a better mechanism for this, Element::computedStyle(). * dom/Element.cpp: (WebCore::Element::resetComputedStyle): (WebCore::Element::willResetComputedStyle): Add a virtual callback for computed style reset. * dom/Element.h: * dom/Node.h: (WebCore::Node::nonRendererStyle): Deleted. * dom/NodeRenderStyle.h: (WebCore::Node::renderStyle): renderStyle() now always matches renderer()->style() * html/HTMLOptGroupElement.cpp: (WebCore::HTMLOptGroupElement::HTMLOptGroupElement): (WebCore::HTMLOptGroupElement::isFocusable): (WebCore::HTMLOptGroupElement::didAttachRenderers): Deleted. (WebCore::HTMLOptGroupElement::willDetachRenderers): Deleted. (WebCore::HTMLOptGroupElement::updateNonRenderStyle): Deleted. (WebCore::HTMLOptGroupElement::nonRendererStyle): Deleted. (WebCore::HTMLOptGroupElement::customStyleForRenderer): Deleted. * html/HTMLOptGroupElement.h: * html/HTMLOptionElement.cpp: (WebCore::HTMLOptionElement::isFocusable): Use computedStyle. (WebCore::HTMLOptionElement::willResetComputedStyle): (WebCore::HTMLOptionElement::didAttachRenderers): Deleted. (WebCore::HTMLOptionElement::willDetachRenderers): Deleted. (WebCore::HTMLOptionElement::updateNonRenderStyle): Deleted. (WebCore::HTMLOptionElement::nonRendererStyle): Deleted. (WebCore::HTMLOptionElement::customStyleForRenderer): Deleted. (WebCore::HTMLOptionElement::didRecalcStyle): Deleted. * html/HTMLOptionElement.h: * rendering/RenderMenuList.cpp: (RenderMenuList::updateOptionsWidth): (RenderMenuList::setTextFromOption): Use computedStyle. 2014-08-14 Jer Noble [MSE] Altering the quality of a YouTube video will cause the video to distort and display an error message https://bugs.webkit.org/show_bug.cgi?id=135931 Reviewed by Eric Carlson. When removing samples from the TrackBuffer's sample map, also remove those samples from the TrackBuffer's decode queue. Otherwise, removed samples may persist in the decode queue and either break sync-sample dependencies or cause decoding artifacts. Pull the code which removes samples from a track buffer into its own utility function, and use this function both from removeCodedFrames(), and also when samples are removed due to overlapping appends in sourceBufferPrivateDidReceiveSample(). In order to reference TrackBuffers outside of SourceBuffer (and in the static removeSamplesFromTrackBuffer() function), make TrackBuffer a public forward declaration. * Modules/mediasource/SourceBuffer.cpp: (WebCore::removeSamplesFromTrackBuffer): (WebCore::SourceBuffer::removeCodedFrames): (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample): * Modules/mediasource/SourceBuffer.h: 2014-08-14 Zan Dobersek ImageBufferDataCairo.h is missing header guards https://bugs.webkit.org/show_bug.cgi?id=135933 Reviewed by Philippe Normand. * platform/graphics/cairo/ImageBufferDataCairo.h: Add the missing head guards to avoid problems when re-inclusion occurs. 2014-08-13 Wenson Hsieh Enable CSS_SCROLL_SNAP for iOS https://bugs.webkit.org/show_bug.cgi?id=135915 Turn on CSS_SCROLL_SNAP for iOS and the iOS simulator. Reviewed by Tim Horton. * Configurations/FeatureDefines.xcconfig: 2014-08-13 Wenson Hsieh Compute and store snap point positions https://bugs.webkit.org/show_bug.cgi?id=135268 Reviewed by Simon Fraser. Working towards implementing a way to extract snap positions (i.e. LayoutUnits) from the parsed snap point properties from CSS, as well as a way of storing the information. Supports both mainframe and overflow scrolling. No changes in behavior. I will write tests when I implement snapping for iOS and Mac. * WebCore.xcodeproj/project.pbxproj: * page/FrameView.cpp: (WebCore::FrameView::updateSnapOffsets): Invokes the static routine in AxisScrollSnapOffsets to update snap offsets for mainframe. * page/FrameView.h: * page/scrolling/AxisScrollSnapOffsets.cpp: Added. (WebCore::appendAndSortChildSnapOffsets): (WebCore::updateFromStyle): (WebCore::updateSnapOffsetsForScrollableArea): Update the ScrollableArea's snap axes. * page/scrolling/AxisScrollSnapOffsets.h: Added. * platform/ScrollableArea.cpp: (WebCore::ScrollableArea::setHorizontalSnapOffsets): (WebCore::ScrollableArea::setVerticalSnapOffsets): (WebCore::ScrollableArea::clearHorizontalSnapOffsets): Resets the unique_ptr for horizontal snap points. (WebCore::ScrollableArea::clearVerticalSnapOffsets): Resets the unique_ptr for vertical snap points. * platform/ScrollableArea.h: (WebCore::ScrollableArea::horizontalSnapOffsets): Returns a pointer to the ScrollableArea's horizontal snap points. (WebCore::ScrollableArea::verticalSnapOffsets): Returns a pointer to the ScrollableArea's vertical snap points. (WebCore::ScrollableArea::updateSnapOffsets): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::updateSnapOffsets): Invokes the static routine in AxisScrollSnapOffsets to update snap offsets for an overflow area. * rendering/RenderLayer.h: 2014-08-13 Mark Rowe WebKit should build on Yosemite with the public SDK. Reviewed by Darin Adler. * rendering/RenderThemeMac.mm: Fix the forward-declaration of NSServicesRolloverButtonCell. 2014-08-13 Alex Christensen Progress towards CMake on Mac. https://bugs.webkit.org/show_bug.cgi?id=135819 Reviewed by Laszlo Gombos. * CMakeLists.txt: Include derived sources directory, which is needed by Apple ports. Separated svg and non-svg idls for ObjC bindings. Don't build the new gamepad API right now. It's causing naming conflicts and it's not done. Process CSSUnknownRule.idl. * PlatformGTK.cmake: Added cpp as the extension of the generated bindings. * PlatformMac.cmake: Include more directories and sources. Add forwarding headers. Generate ObjC bindings. * bindings/objc/DOMUIKitExtensions.mm: Moved config.h to recognize the PLATFORM macro. * bindings/scripts/CodeGeneratorObjC.pm: (ReadPublicInterfaces): (GenerateInterface): Added some workarounds for CMake. * bindings/scripts/IDLAttributes.txt: Added missing attribute names. * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: Added PLATFORM(IOS) to protect IOS_AIRPLAY code. * platform/mac/PasteboardMac.mm: Added necessary DRAG_SUPPORT protection. * platform/text/mac/TextCodecMac.cpp: Moved config.h to recognize the PLATFORM macro. 2014-08-13 Jer Noble [MSE] Replacing existing samples with overlapping new samples will cause playback to stutter. https://bugs.webkit.org/show_bug.cgi?id=135902 Reviewed by Eric Carlson. Only mark the TrackBuffer as needing re-enqueueing if the samples removed by overlapping samples themselves overlap with potentially enqueued but not yet displayed frames. * Modules/mediasource/SourceBuffer.cpp: (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample): 2014-08-13 Andreas Kling CSSValueList should never contain null values. It's not legal for a CSSValueList to contain null CSSValues, so make it store a Vector of Ref internally instead. This allows the compiler to avoid emitting a number of null checks. It will also allow a future patch to make CSSValueList vend CSSValue& instead of CSSValue*. Most of the patch is fixing up things on their way into a CSSValueList to not be null at the call site, now that append() and prepend() are taking PassRef instead of PassRefPtr. Reviewed by Sam Weinig. * css/BasicShapeFunctions.cpp: (WebCore::valueForBasicShape): * css/BasicShapeFunctions.h: * css/CSSBorderImage.cpp: (WebCore::createBorderImageValue): * css/CSSBorderImage.h: * css/CSSComputedStyleDeclaration.cpp: (WebCore::valueForImageSliceSide): (WebCore::valueForNinePieceImageSlice): (WebCore::valueForNinePieceImageQuad): (WebCore::valueForNinePieceImage): (WebCore::getBorderRadiusShorthandValue): (WebCore::ComputedStyleExtractor::valueForShadow): (WebCore::ComputedStyleExtractor::valueForFilter): (WebCore::specifiedValueForGridTrackSize): (WebCore::addValuesForNamedGridLinesAtIndex): (WebCore::scrollSnapCoordinates): (WebCore::createTimingFunctionValue): (WebCore::fillSourceTypeToCSSValue): (WebCore::contentToCSSValue): (WebCore::shapePropertyValue): (WebCore::ComputedStyleExtractor::propertyValue): (WebCore::ComputedStyleExtractor::getCSSPropertyValuesForShorthandProperties): (WebCore::ComputedStyleExtractor::getCSSPropertyValuesForSidesShorthand): (WebCore::ComputedStyleExtractor::getCSSPropertyValuesForGridShorthand): (WebCore::ComputedStyleExtractor::getBackgroundShorthandValue): * css/CSSComputedStyleDeclaration.h: * css/CSSFontSelector.cpp: (WebCore::CSSFontSelector::addFontFaceRule): * css/CSSParser.cpp: (WebCore::createPrimitiveValuePair): (WebCore::parseTranslateTransformValue): (WebCore::CSSParser::createPrimitiveNumericValue): (WebCore::CSSParser::createPrimitiveStringValue): (WebCore::CSSParser::addFillValue): (WebCore::CSSParser::parseNonElementSnapPoints): (WebCore::CSSParser::parseScrollSnapDestination): (WebCore::CSSParser::parseFillShorthand): (WebCore::CSSParser::addAnimationValue): (WebCore::CSSParser::parseAnimationShorthand): (WebCore::CSSParser::parseTransitionShorthand): (WebCore::CSSParser::parseQuotes): (WebCore::CSSParser::parseContent): (WebCore::CSSParser::parseFillProperty): (WebCore::CSSParser::parseAnimationProperty): (WebCore::CSSParser::parseGridPosition): (WebCore::CSSParser::parseGridTemplateRowsAndAreas): (WebCore::CSSParser::parseGridLineNames): (WebCore::CSSParser::parseGridTrackList): (WebCore::CSSParser::parseGridTrackRepeatFunction): (WebCore::CSSParser::parseGridTrackSize): (WebCore::CSSParser::parseBasicShapeAndOrBox): (WebCore::CSSParser::parseFontVariant): (WebCore::CSSParser::parseTransform): (WebCore::CSSParser::parseBuiltinFilterArguments): (WebCore::CSSParser::parseFilter): (WebCore::CSSParser::parseTextEmphasisStyle): * css/CSSParser.h: * css/CSSProperty.cpp: (WebCore::CSSProperty::wrapValueInCommaSeparatedList): * css/CSSValueList.cpp: (WebCore::CSSValueList::CSSValueList): (WebCore::CSSValueList::removeAll): (WebCore::CSSValueList::hasValue): (WebCore::CSSValueList::copy): (WebCore::CSSValueList::customCSSText): (WebCore::CSSValueList::equals): (WebCore::CSSValueList::addSubresourceStyleURLs): (WebCore::CSSValueList::hasFailedOrCanceledSubresources): * css/CSSValueList.h: (WebCore::CSSValueList::item): (WebCore::CSSValueList::itemWithoutBoundsCheck): (WebCore::CSSValueList::append): (WebCore::CSSValueList::prepend): * css/SVGCSSComputedStyleDeclaration.cpp: (WebCore::paintOrder): * css/SVGCSSParser.cpp: (WebCore::CSSParser::parsePaintOrder): * editing/EditingStyle.cpp: (WebCore::mergeTextDecorationValues): * editing/EditorCommand.cpp: (WebCore::executeToggleStyleInList): * svg/SVGFontFaceSrcElement.cpp: (WebCore::SVGFontFaceSrcElement::srcValue): * svg/SVGLength.cpp: (WebCore::SVGLength::toCSSPrimitiveValue): * svg/SVGLength.h: 2014-08-13 Alex Christensen Removed dead plugins code. https://bugs.webkit.org/show_bug.cgi?id=135862 Reviewed by Alexey Proskuryakov. * plugins/PluginDataNone.cpp: Removed. * plugins/mac: Removed. * plugins/mac/PluginPackageMac.cpp: Removed. * plugins/mac/PluginViewMac.mm: Removed. 2014-08-13 Simon Fraser [WK1] A fixed-position may not show on page load https://bugs.webkit.org/show_bug.cgi?id=135893 Reviewed by Tim Horton. A position:fixed image could fail to display because we didn't make a compositing layer for it under some circumstances. This can happen if RenderLayerCompositor::requiresCompositingForPosition() runs before the image is loaded, in which cause the layer is zero-sized, so does not get composited. When the image loads, there was no code path that ensured that compositing would be re-evaluated (unlike size changes due to style updates). Fix by having RenderLayer::contentChanged() also check for ImageChanged. Test: compositing/fixed-image-loading.html * rendering/RenderLayer.cpp: (WebCore::RenderLayer::contentChanged): 2014-08-13 Bem Jones-Bey Refactor ShapeOutsideInfo so it isn't mutated for each line https://bugs.webkit.org/show_bug.cgi?id=135781 Reviewed by Zoltan Horvath. Encapsulate the per line state into a ShapeOutsideDeltas object. updateDeltasForContainingBlockLine has been renamed to computeDeltasForContainingBlockLine, and it returns an instance of the ShapeOutsideDeltas object for that line. This object is cached, but none of the functionality of ShapeOutsideInfo is dependant on any line specific data anymore. No new tests, no behavior change. * rendering/FloatingObjects.cpp: (WebCore::ComputeFloatOffsetForFloatLayoutAdapter::updateOffsetIfNeeded): Update to take a FloatingObject reference because the FloatingObject cannot be null. (WebCore::ComputeFloatOffsetForFloatLayoutAdapter::updateOffsetIfNeeded): Ditto. (WebCore::ComputeFloatOffsetAdapter::collectIfNeeded): Pass FloatingObject to updateOffsetIfNeeded as a reference, since it cannot be null. (WebCore::ComputeFloatOffsetForLineLayoutAdapter::updateOffsetIfNeeded): Use ShapeOutsideDeltas object to calculate the offset and take the FloatingObject as a reference. (WebCore::ComputeFloatOffsetForLineLayoutAdapter::updateOffsetIfNeeded): Ditto. (WebCore::shapeInfoForFloat): Deleted. * rendering/line/LineWidth.cpp: (WebCore::LineWidth::shrinkAvailableWidthForNewFloatIfNeeded): Update to use ShapeOutsideDeltas object. * rendering/shapes/ShapeOutsideInfo.cpp: (WebCore::ShapeOutsideInfo::computeDeltasForContainingBlockLine): Return a ShaoeOutsideDeltas object instead of storing line specific data in instance variables. (WebCore::ShapeOutsideInfo::updateDeltasForContainingBlockLine): Deleted. * rendering/shapes/ShapeOutsideInfo.h: 2014-08-13 Zoltan Horvath [CSS3-Text] Add rendering support for the none value of text-justify property https://bugs.webkit.org/show_bug.cgi?id=135349 Reviewed by David Hyatt. Spec: http://dev.w3.org/csswg/css-text-3/#valdef-text-justify.none Test: fast/css3-text/css3-text-justify/text-justify-none.html * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlockFlow::computeInlineDirectionPositionsForSegment): 2014-08-13 Eric Carlson Media document sends incorrect referer header https://bugs.webkit.org/show_bug.cgi?id=135839 Reviewed by Jer Noble. Test: http/tests/media/media-document-referer.html * html/MediaDocument.cpp: (WebCore::MediaDocumentParser::MediaDocumentParser): Stash referrer. (WebCore::MediaDocumentParser::createDocumentStructure): Set outgoing referrer. (WebCore::MediaDocument::MediaDocument): Stash referrer. * html/MediaDocument.h: 2014-08-13 Antti Koivisto Don't recurse into non-rendered subtrees when computing style https://bugs.webkit.org/show_bug.cgi?id=135844 Reviewed by Andreas Kling. * style/StyleResolveTree.cpp: (WebCore::Style::resetStyleForNonRenderedDescendants): Do a simple reset of the style dirty bits and any computed style in non-renderer subtrees. (WebCore::Style::attachRenderTree): (WebCore::Style::resolveTree): Don't recurse into descendants if the element does not create a renderer. We didn't compute style anyway in such subtrees. 2014-08-11 Myles C. Maxfield Elements whose contents start with an astral Unicode symbol disappear when CSS `::first-letter` is applied to them https://bugs.webkit.org/show_bug.cgi?id=135756 Reviewed by Darin Adler. The previous code assumed that all "characters" are exactly 1 16-bit code unit wide. Instead, use numCharactersInGraphemeClusters(). This patch also modifies the signature of numCharactersInGraphemeClusters() to take a StringView instead of a string, which will avoid a copy. Test: css1/pseudo/firstletter-surrogate.html * platform/text/TextBreakIterator.cpp: (WebCore::numCharactersInGraphemeClusters): Update numCharactersInGraphemeClusters() to take a StringView. * platform/text/TextBreakIterator.h: Ditto. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::createFirstLetterRenderer): Use numCharactersInGraphemeClusters() to determine the length of the first letter, rather than assuming it has length of 1 code unit (WebCore::RenderBlock::updateFirstLetter): Add a FIXME comment. 2014-08-12 Jer Noble [MSE][Mac] Seeking to the very beginning of a buffered range stalls video playback https://bugs.webkit.org/show_bug.cgi?id=135865 Reviewed by Eric Carlson. AVSampleBufferRenderSynchronizer will report a current time of about 100ms or so before the destination seek time when seeking. It does this in order to pre-roll the synchronized audio renderer, but this can lead to playback stalling when MediaSource::monitorSourceBuffers() looks at the media element's current time and determines that the current time is 100ms before any buffered samples. Clamp the value of currentMediaTime() to, at a minimum, the last requested seek time. This was the suggested course of action from . * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h: * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm: (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::durationDouble): (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::currentMediaTime): (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekInternal): 2014-08-12 Jer Noble [MSE] YouTube will lose audio, video after seeking backwards to an unbuffered range. https://bugs.webkit.org/show_bug.cgi?id=135855 Reviewed by Eric Carlson. When seeking into an unbuffered or partially buffered range, we will unconditionally pass samples to the decode queue even if there exist large gaps between those samples. Subsequently, the decoder will not notify us that it has become ready for new samples until playback reaches those later samples and the samples are discarded. When sending samples to be decoded in provideMediaData(), stop if there exists a large gap in the sample timeline. Do this by tracking the last enqueued decode end time, and look to see if the next sample's decode time indicates a gap of greater than 1 second. * Modules/mediasource/SourceBuffer.cpp: (WebCore::SourceBuffer::TrackBuffer::TrackBuffer): Initialize lastEnqueuedDecodeEndTime. (WebCore::SourceBuffer::seekToTime): Set needsReenqueueing, in case samples do not yet exist in the trackBuffer sufficient to re-enqueue for the destination time, so that re-enqueueing will occur after the next append. (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample): Check against lastEnqueuedDecodeEndTime, rather than lastEnqueuedPresentationTime before adding samples to the decodeQueue. (WebCore::SourceBuffer::provideMediaData): Stop when we reach a large gap between samples. (WebCore::SourceBuffer::reenqueueMediaForTime): Set or clear lastEnqueuedDecodeEndTime based on whether we have appended any non-displaying samples after flushing. 2014-08-12 Commit Queue Unreviewed, rolling out r172494. https://bugs.webkit.org/show_bug.cgi?id=135864 asserting on bots (Requested by kling on #webkit). Reverted changeset: "Don't recurse into non-rendered subtrees when computing style" https://bugs.webkit.org/show_bug.cgi?id=135844 http://trac.webkit.org/changeset/172494 2014-08-12 Myles C. Maxfield Fonts forced to use non synthetic italics might be laid out with the incorrect baseline https://bugs.webkit.org/show_bug.cgi?id=135403 Reviewed by Darin Adler. When italics is specified on a font, and the font isn't coming from the cache, we ask the SimpleFontData to provide a non-synthetic-italic version of itself. Our current implementation doesn't preserve whether or not the SimpleFontData includes vertical glyphs (glyphs that are not rotated when drawn in the vertical writing mode), which determines which baseline we use to lay out the text. By passing "false" to the isTextOrientationFallback argument to SimpleFontData::create(), we preserve this hasVerticalGlyphs flag. Test: fast/text/international/synthesized-italic-vertical-latin-double.html * platform/graphics/SimpleFontData.cpp: (WebCore::SimpleFontData::nonSyntheticItalicFontData): * testing/Internals.cpp: (WebCore::Internals::invalidateFontCache): Add "invalidateFontCache" to window.internals. * testing/Internals.h: Ditto. * testing/Internals.idl: Ditto. 2014-08-12 Peyton Randolph Runtime switch for long mouse press gesture. Part of 135257 - Add long mouse press gesture. https://bugs.webkit.org/show_bug.cgi?id=135682 Reviewed by Tim Horton. This patch adds a runtime switch for the Long Mouse Press Gesture and initially sets the feature flag to false. It also removes the ENABLE_LONG_MOUSE_PRESS feature flag as the runtime switch now guards its functionality. * Configurations/FeatureDefines.xcconfig: Remove LONG_MOUSE_PRESS feature flag. * page/EventHandler.cpp: (WebCore::EventHandler::EventHandler): (WebCore::EventHandler::clear): Remove feature flag. (WebCore::EventHandler::handleMousePressEvent): Ditto. (WebCore::EventHandler::eventMayStartDrag): Ditto. (WebCore::EventHandler::handleMouseReleaseEvent): Perform event iff long mouse presses are enabled. (WebCore::EventHandler::beginTrackingPotentialLongMousePress): Ditto. (WebCore::EventHandler::recognizeLongMousePress): Ditto. (WebCore::EventHandler::cancelTrackingPotentialLongMousePress): Ditto. (WebCore::EventHandler::handleMouseMoveEvent): Remove feature flag. (WebCore::EventHandler::handleDrag): Ditto. (WebCore::EventHandler::mouseMovementExceedsThreshold): Ditto. * page/EventHandler.h: * page/Settings.in: Add longMousePressEnabled setting, initially false. 2014-08-12 Pratik Solanki Cached file backed resources don't make it to the Web Process when NETWORK_CFDATA_ARRAY_CALLBACK is enabled https://bugs.webkit.org/show_bug.cgi?id=135727 Reviewed by Darin Adler. Add SharedBuffer::existingCFData() which returns CFDataRef if it has one. Refactor this code out of createCFData(). * WebCore.exp.in: * platform/SharedBuffer.h: * platform/mac/SharedBufferMac.mm: (WebCore::SharedBuffer::existingCFData): Added. (WebCore::SharedBuffer::createCFData): 2014-08-12 Tim Horton Small region (~1px tall) where you get the selection button instead of the phone number overlay https://bugs.webkit.org/show_bug.cgi?id=135852 Reviewed by Enrica Casucci. * WebCore.exp.in: 2014-08-12 Alex Christensen Generate header detection headers for CMake on Windows. https://bugs.webkit.org/show_bug.cgi?id=135807 Reviewed by Brent Fulgham. * CMakeLists.txt: * PlatformWin.cmake: Generate and include a stub WebCoreHeaderDetection.h. 2014-08-12 Renata Hodovan Make sure that begin time cannot be greater than SMILTime::indefiniteValue unintentionally. https://bugs.webkit.org/show_bug.cgi?id=135838 Reviewed by Darin Adler. When WebCore::SVGSMILElement::resolveInterval creates a SMILTime begin node for a SMILInterval, then it only checks if the value of begin is indefinite or unresolved but misses the case if it is between these two reference values. This is a backport of my fix in Blink: https://codereview.chromium.org/406263002/. Test: svg/animations/animateMotion-crash-with-large-begin-time.html * svg/animation/SVGSMILElement.cpp: (WebCore::SVGSMILElement::parseOffsetValue): (WebCore::SVGSMILElement::parseClockValue): 2014-08-12 Andy Estes Revert a change that wasn't meant to be a part of r172482. * loader/ResourceLoader.cpp: (WebCore::ResourceLoader::init): 2014-08-12 Antti Koivisto Don't recurse into non-rendered subtrees when computing style https://bugs.webkit.org/show_bug.cgi?id=135844 Reviewed by Andreas Kling. * style/StyleResolveTree.cpp: (WebCore::Style::resetStyleForNonRenderedDescendants): Do a simple reset of the style dirty bits and any computed style in non-rendered subtrees. (WebCore::Style::attachRenderTree): (WebCore::Style::resolveTree): Don't recurse into descendants if the element does not create a renderer. We didn't compute style anyway in such subtrees. 2014-08-12 Antti Koivisto Remove isInCanvasSubtree bit https://bugs.webkit.org/show_bug.cgi?id=135837 Reviewed by Andreas Kling. The logic to update this bit is in a wrong place and it is not clear it does the right thing in all cases. Also the optimization doesn't seem necessary, the focus code is not that hot. * accessibility/AXObjectCache.cpp: (WebCore::AXObjectCache::getOrCreate): * dom/Element.cpp: (WebCore::Element::isFocusable): (WebCore::Element::clearStyleDerivedDataBeforeDetachingRenderer): (WebCore::Element::setIsInCanvasSubtree): Deleted. (WebCore::Element::isInCanvasSubtree): Deleted. * dom/Element.h: * dom/ElementRareData.h: (WebCore::ElementRareData::ElementRareData): (WebCore::ElementRareData::isInCanvasSubtree): Deleted. (WebCore::ElementRareData::setIsInCanvasSubtree): Deleted. * html/HTMLAnchorElement.cpp: (WebCore::HTMLAnchorElement::isKeyboardFocusable): * html/HTMLCanvasElement.cpp: (WebCore::HTMLCanvasElement::HTMLCanvasElement): (WebCore::HTMLCanvasElement::willAttachRenderers): Deleted. * html/HTMLCanvasElement.h: * style/StyleResolveTree.cpp: (WebCore::Style::attachRenderTree): 2014-08-11 Andy Estes [iOS] Get rid of iOS.xcconfig https://bugs.webkit.org/show_bug.cgi?id=135809 Reviewed by Joseph Pecoraro. All iOS.xcconfig did was include AspenFamily.xcconfig, so there's no need for the indirection. * Configurations/Base.xcconfig: * Configurations/iOS.xcconfig: Removed. * WebCore.xcodeproj/project.pbxproj: 2014-08-11 Roger Fong Adjust max-width of cues based on text alignment when cue size is expanded. https://bugs.webkit.org/show_bug.cgi?id=135823. Reviewed by Brent Fulgham. All units are in percentages. If we are left aligned the max cue width is the 100 minus the cue position. If we are right aligned the max cue width is the cue position. If we are centered the max cue width is just 100. * html/track/TextTrackCueGeneric.cpp: (WebCore::TextTrackCueGenericBoxElement::applyCSSProperties): * html/track/VTTCue.cpp: (WebCore::VTTCueBox::applyCSSProperties): 2014-08-12 Fabien Vallée [GStreamer] playback rate is rounded to integer https://bugs.webkit.org/show_bug.cgi?id=135802 Reviewed by Philippe Normand. Test: media/video-ended-event-slow-motion-playback.html * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: (WebCore::MediaPlayerPrivateGStreamer::setRate): 2014-08-12 Brent Fulgham [Win] Unreviewed build fix after r17425 * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h: Remove unused 'currentTime' declaration from header file. This is now fully implemented in platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h. 2014-08-12 Zan Dobersek Dont allocate GCond in VideoSinkGStreamer.cpp dynamically. Rubber-stamped by Carlos Garcia Campos. * platform/graphics/gstreamer/VideoSinkGStreamer.cpp: (_WebKitVideoSinkPrivate::_WebKitVideoSinkPrivate): Move the g_cond_init() and gst_video_info_init() calls here. (_WebKitVideoSinkPrivate::~_WebKitVideoSinkPrivate): Move the g_cond_clear() call here. (webkit_video_sink_init): (webkitVideoSinkTimeoutCallback): (webkitVideoSinkRender): (unlockBufferMutex): (webkit_video_sink_class_init): (webkitVideoSinkDispose): Deleted. Not required anymore. 2014-08-12 Zan Dobersek Clean up GMutexLocker https://bugs.webkit.org/show_bug.cgi?id=135833 Reviewed by Carlos Garcia Campos. Don't dynamically allocate GMutex objects. Update GMutexLocker initializations to pass in a GMutex reference, not a pointer. * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp: (WebCore::MediaPlayerPrivateGStreamerBase::MediaPlayerPrivateGStreamerBase): (WebCore::MediaPlayerPrivateGStreamerBase::~MediaPlayerPrivateGStreamerBase): * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h: * platform/graphics/gstreamer/VideoSinkGStreamer.cpp: (_WebKitVideoSinkPrivate::_WebKitVideoSinkPrivate): Initialize the GMutex. (_WebKitVideoSinkPrivate::~_WebKitVideoSinkPrivate): Clear the GMutex. (webkit_video_sink_init): (webkitVideoSinkRender): (webkitVideoSinkDispose): * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp: (webKitWebSrcGetProperty): (webKitWebSrcStop): (webKitWebSrcStart): (webKitWebSrcChangeState): (webKitWebSrcQueryWithParent): (webKitWebSrcGetUri): (webKitWebSrcSetUri): (webKitWebSrcNeedDataMainCb): (webKitWebSrcNeedDataCb): (webKitWebSrcEnoughDataMainCb): (webKitWebSrcEnoughDataCb): (webKitWebSrcSeekDataCb): (webKitWebSrcSetMediaPlayer): (StreamingClient::createReadBuffer): (StreamingClient::handleResponseReceived): (StreamingClient::handleDataReceived): (StreamingClient::handleNotifyFinished): (ResourceHandleStreamingClient::wasBlocked): (ResourceHandleStreamingClient::cannotShowURL): 2014-08-12 Eduardo Lima Mitev [GTK] Adds dependency on GnuTLS 3.0+ for the implementation of subtle crypto algorithms https://bugs.webkit.org/show_bug.cgi?id=133317 Reviewed by Philippe Normand. No new tests since no new functionality has been added. * PlatformGTK.cmake: Adds GnuTLS libs and included dirs to WebCore targets 2014-08-10 Philippe Normand [WebAudio] FFTFrame is cluttered with dead code https://bugs.webkit.org/show_bug.cgi?id=135751 Reviewed by Eric Carlson. Cleaned up unused FFTFrame implementations from the tree. If the FFMPEG or IPP versions are needed later on again this patch can be rolled out. No new tests, the code removed was disabled on all ports. * platform/audio/Biquad.cpp: (WebCore::Biquad::Biquad): (WebCore::Biquad::~Biquad): (WebCore::Biquad::process): (WebCore::Biquad::reset): (WebCore::Biquad::setNormalizedCoefficients): * platform/audio/Biquad.h: * platform/audio/DirectConvolver.cpp: (WebCore::DirectConvolver::DirectConvolver): (WebCore::DirectConvolver::process): (WebCore::DirectConvolver::reset): * platform/audio/DirectConvolver.h: * platform/audio/FFTFrame.h: * platform/audio/FFTFrameStub.cpp: * platform/audio/ffmpeg/FFTFrameFFMPEG.cpp: Removed. * platform/audio/ipp/FFTFrameIPP.cpp: Removed. * platform/audio/mac/FFTFrameMac.cpp: 2014-08-11 Mark Rowe Fix the Mac build. * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: #if a function that's only used on iOS. 2014-08-11 Brent Fulgham [Mac, iOS] Some media content never reaches full 'loaded' state https://bugs.webkit.org/show_bug.cgi?id=135814 Reviewed by Jer Noble. * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp: (WebCore::MediaPlayerPrivateAVFoundation::duration): Change to a wrapper that just calls the durationDouble method and narrows to a float. (WebCore::MediaPlayerPrivateAVFoundation::durationDouble): Revised version of duration that works with doubles. (WebCore::MediaPlayerPrivateAVFoundation::currentTime): Wrapper that calls the currentTimeDouble method and narrows to a float. (WebCore::MediaPlayerPrivateAVFoundation::seekWithTolerance): Use durationDouble for comparison with passed 'time' argument (which is a double). (WebCore::MediaPlayerPrivateAVFoundation::didEnd): Use 'currentTimeDouble' so we can cache the double precision version of this value. (WebCore::MediaPlayerPrivateAVFoundation::extraMemoryCost): Use 'durationDouble' since the rest of the calculation is in terms of doubles. * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h: * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp: (WebCore::MediaPlayerPrivateAVFoundationCF::platformDuration): Convert to 'double'. All uses of this method are internal to the MediaPlayerPrivateAVFoundation* files. (WebCore::MediaPlayerPrivateAVFoundationCF::currentTimeDouble): Switch from float implementation. (WebCore::MediaPlayerPrivateAVFoundationCF::currentTime): Deleted. (Moved to parent class) * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h: * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h: * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: (WebCore::MediaPlayerPrivateAVFoundationObjC::platformDuration): Convert to 'double'. All uses of this method are internal to the MediaPlayerPrivateAVFoundation* files. (WebCore::MediaPlayerPrivateAVFoundationObjC::currentTimeDouble): Switch from floating implementation. (WebCore::MediaPlayerPrivateAVFoundationObjC::currentTime): Deleted. (Moved to parent class) 2014-08-11 Enrica Casucci Improve look and feel of combined service menu.. https://bugs.webkit.org/show_bug.cgi?id=135824 Reviewed by Tim Horton. Adding some localizable strings. * English.lproj/Localizable.strings: 2014-08-11 Jer Noble [iOS]