iOS DRT snapshots are limited to the page visible area
https://bugs.webkit.org/show_bug.cgi?id=137650

Reviewed by Daniel Bates.
Source/WebCore:

LegacyTileCache drawing was limited to the window's visible area, found by
crawling up the layer hierarchy to the root layer. This caused test snapshots to
be missing non-composited content outside the iPhone visible area, which hinders
testing.

Fix by adding a test-only mode where the window visible area is the entire window.

* platform/ios/wak/WAKWindow.h:
* platform/ios/wak/WAKWindow.mm:
(-[WAKWindow setEntireWindowVisibleForTesting:]):
(-[WAKWindow _visibleRectRespectingMasksToBounds:]):

Tools:

LegacyTileCache drawing was limited to the window's visible area, found by
crawling up the layer hierarchy to the root layer. This caused test snapshots to
be missing non-composited content outside the iPhone visible area, which hinders
testing.

Fix by adding a test-only mode where the window visible area is the entire window.

* DumpRenderTree/ios/PixelDumpSupportIOS.mm:
(dumpWebViewAsPixelsAndCompareWithExpected): Drive-by RetainPtr fix.
* DumpRenderTree/mac/DumpRenderTreeWindow.mm:
(-[DumpRenderTreeWindow initWithLayer:]): Call setEntireWindowVisibleForTesting:YES
for the DRT window.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@174650 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[iOS] Stop listening for wireless playback target availability when the default controls are hidden.
https://bugs.webkit.org/show_bug.cgi?id=137633

Reviewed by Dean Jackson.

In order to minimize the excess bandwidth and power consumption required for actively listening
for wireless playback target availablity, unregister for those notifications while the controls
are hidden due to playback, or when the element's document is hidden.

* Modules/mediacontrols/mediaControlsiOS.js:
(ControllerIOS.prototype.createBase): Register for document visiblity change notfications.
(ControllerIOS.prototype.setControlsType): Call updateShouldListenForPlaybackTargetAvailabilityEvent()
    instead of setShouldListenForPlaybackTargetAvailabilityEvent()
(ControllerIOS.prototype.hideControls): Ditto.
(ControllerIOS.prototype.showControls): Ditto.
(ControllerIOS.prototype.updateStatusDisplay): Ditto.
(ControllerIOS.prototype.handleVisibilityChange): Ditto.
(ControllerIOS.prototype.updateShouldListenForPlaybackTargetAvailabilityEvent): Added. Only listen
    for target availability when the video has no errors, is not in the initial "big play button"
    controls state, and when the controls are not hidden.
* platform/audio/ios/MediaSessionManagerIOS.mm:
(-[WebMediaSessionHelper stopMonitoringAirPlayRoutes]): Explicitly set the discoveryMode to "disabled"
    rather than waiting for the autoreleasepool to destroy our routing controller.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@174651 268f45cc-cd09-0410-ab3c-d52691b4dbfc
MediaPlayer::characteristicChanged() is not called when new tracks are found in SourceBufferPrivateAVFObjC
https://bugs.webkit.org/show_bug.cgi?id=137533

Reviewed by Darin Adler.

Source/WebCore:

When a new AVAsset is returned out of the AVStreamDataParser, notify the HTMLMediaElement that
characteristics of the player may have changed.

* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::characteristicsChanged):
* platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
(WebCore::SourceBufferPrivateAVFObjC::didParseStreamDataAsAsset):

Tools:

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit2/WKPageIsPlayingAudio.cpp:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebKit2/file-with-mse.html: Added.
* TestWebKitAPI/Tests/WebKit2/test-mse.mp4: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@174652 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Use is<>() / downcast<>() for Table render objects
https://bugs.webkit.org/show_bug.cgi?id=137641

Reviewed by Mihnea Ovidenie.

Use is<>() / downcast<>() for table-related render objects and clean
up the surrounding code.

No new tests, no behavior change.

* accessibility/AccessibilityARIAGrid.cpp:
(WebCore::AccessibilityARIAGrid::addChildren):
* accessibility/AccessibilityTable.cpp:
(WebCore::AccessibilityTable::tableElement):
(WebCore::AccessibilityTable::isDataTable):
(WebCore::AccessibilityTable::isTableExposableThroughAccessibility):
(WebCore::AccessibilityTable::addChildren):
* accessibility/AccessibilityTableCell.cpp:
(WebCore::AccessibilityTableCell::parentTable):
(WebCore::AccessibilityTableCell::rowIndexRange):
(WebCore::AccessibilityTableCell::columnIndexRange):
(WebCore::AccessibilityTableCell::titleUIElement):
* accessibility/AccessibilityTableColumn.cpp:
(WebCore::AccessibilityTableColumn::headerObject):
* editing/DeleteSelectionCommand.cpp:
(WebCore::DeleteSelectionCommand::removeNode):
* editing/TextIterator.cpp:
(WebCore::shouldEmitTabBeforeNode):
(WebCore::shouldEmitNewlinesBeforeAndAfterNode):
* html/HTMLTableCellElement.cpp:
(WebCore::HTMLTableCellElement::parseAttribute):
(WebCore::HTMLTableCellElement::cellAbove):
* html/HTMLTableColElement.cpp:
(WebCore::HTMLTableColElement::parseAttribute):
* mathml/MathMLElement.cpp:
(WebCore::MathMLElement::parseAttribute):
* rendering/AutoTableLayout.cpp:
(WebCore::AutoTableLayout::recalcColumn):
(WebCore::shouldScaleColumns):
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::computeIntrinsicLogicalWidths):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::computePercentageLogicalHeight):
(WebCore::RenderBox::layoutOverflowRectForPropagation):
* rendering/RenderElement.cpp:
(WebCore::RenderElement::addChild):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::calculateClipRects):
* rendering/RenderTable.cpp:
(WebCore::RenderTable::addChild):
(WebCore::RenderTable::layout):
(WebCore::RenderTable::firstColumn):
(WebCore::RenderTable::recalcSections):
(WebCore::RenderTable::sectionAbove):
(WebCore::RenderTable::sectionBelow):
(WebCore::RenderTable::bottomSection):
* rendering/RenderTable.h:
* rendering/RenderTableCaption.cpp:
(WebCore::RenderTableCaption::table):
* rendering/RenderTableCell.h:
(WebCore::RenderTableCell::nextCell):
(WebCore::RenderTableCell::previousCell):
(WebCore::RenderTableRow::firstCell):
(WebCore::RenderTableRow::lastCell):
* rendering/RenderTableCol.cpp:
(WebCore::RenderTableCol::table):
(WebCore::RenderTableCol::enclosingColumnGroup):
(WebCore::RenderTableCol::nextColumn):
* rendering/RenderTableCol.h:
Make updateFromElement() public to allow the callers to use tighter
typing and devitualize the call as the class is final.

* rendering/RenderTableRow.cpp:
(WebCore::RenderTableRow::addChild):
* rendering/RenderTableRow.h:
(WebCore::RenderTableSection::firstRow):
(WebCore::RenderTableSection::lastRow):
(WebCore::RenderTableRow::nextRow):
(WebCore::RenderTableRow::previousRow):
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::addChild):
(WebCore::RenderTableSection::layoutRows):
(WebCore::RenderTableSection::paintCell):
* rendering/RenderTableSection.h:
* rendering/RenderTreeAsText.cpp:
(WebCore::writeTextRun):
(WebCore::writeSimpleLine):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@174653 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Use is<>() / downcast<>() for Filter / FilterOperation subclasses
https://bugs.webkit.org/show_bug.cgi?id=137644

Reviewed by Darin Adler.

Use is<>() / downcast<>() for Filter / FilterOperation subclasses.

Source/WebCore:

No new tests, no behavior change.

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::valueForFilter):
* platform/graphics/ca/mac/PlatformCAFiltersMac.mm:
(PlatformCAFilters::filterValueForOperation):
(PlatformCAFilters::colorMatrixValueForFilter):
* platform/graphics/filters/Filter.h:
* platform/graphics/filters/FilterOperation.cpp:
(WebCore::DefaultFilterOperation::operator==):
(WebCore::ReferenceFilterOperation::operator==):
(WebCore::BasicColorMatrixFilterOperation::blend):
(WebCore::BasicColorMatrixFilterOperation::operator==):
(WebCore::BasicComponentTransferFilterOperation::blend):
(WebCore::BasicComponentTransferFilterOperation::operator==):
(WebCore::BlurFilterOperation::operator==):
(WebCore::BlurFilterOperation::blend):
(WebCore::DropShadowFilterOperation::operator==):
(WebCore::DropShadowFilterOperation::blend):
* platform/graphics/filters/FilterOperation.h:
* platform/graphics/filters/FilterOperations.cpp:
(WebCore::FilterOperations::outsets):
* rendering/FilterEffectRenderer.cpp:
(WebCore::FilterEffectRenderer::build):
* rendering/RenderLayerFilterInfo.cpp:
(WebCore::RenderLayer::FilterInfo::updateReferenceFilterClients):
* rendering/svg/RenderSVGResourceFilterPrimitive.cpp:
(WebCore::RenderSVGResourceFilterPrimitive::determineFilterPrimitiveSubregion):
* svg/graphics/filters/SVGFilter.h:
(isType):

Source/WebKit2:

* Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
(IPC::ArgumentCoder<WebCore::FilterOperations>::encode):
* Shared/WebCoreArgumentCoders.cpp:
(IPC::ArgumentCoder<FilterOperation>::encode):
* Shared/mac/RemoteLayerTreeTransaction.mm:
(WebKit::RemoteLayerTreeTextStream::operator<<):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@174654 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add more detailed wait time information to EWS metrics
https://bugs.webkit.org/show_bug.cgi?id=137649

Reviewed by Daniel Bates.

Added average and worst time (we used to only have median), and also a percentage
of patches that took a non-trivial time to start. Non-trivial is defined as 3 minutes.

There is always some wait due to the polling nature of the queues, which is well understood
and doesn't need to be measured. What needs to be measured is whether there is enough
bot machines to process patches as soon as they are submitted.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/MetricsAnalyzer.js:
(Analyzer.prototype._analyzeBubblePerformance):
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/MetricsBubbleView.js:
(MetricsBubbleView.prototype._update):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@174655 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[XvfbDriver] Regular expression used to match running X servers fails on Fedora 21.
https://bugs.webkit.org/show_bug.cgi?id=137659

Reviewed by Martin Robinson.

* Scripts/webkitpy/port/xvfbdriver.py:
(XvfbDriver._next_free_display): Update the regular expression to also match Xorg.bin


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@174656 268f45cc-cd09-0410-ab3c-d52691b4dbfc