Timeline



Feb 3, 2017:

10:03 PM Changeset in webkit [211668] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

Simple line layout: Remove redundant codepath check.
https://bugs.webkit.org/show_bug.cgi?id=167827
<rdar://problem/30361850>

Reviewed by Myles C. Maxfield.

FontCascade::codePath() iterates through the entire text. It's rather wasteful to do twice.

No change in functionality.

  • rendering/SimpleLineLayout.cpp:

(WebCore::SimpleLineLayout::canUseForFontAndText):
(WebCore::SimpleLineLayout::printReason):

9:53 PM Changeset in webkit [211667] by mmaxfield@apple.com
  • 3 edits
    2 adds in trunk

REGRESSION(r204858): Synthetic bold text in vertical writing mode is rotated away from original text
https://bugs.webkit.org/show_bug.cgi?id=167826
<rdar://problem/28193222>

Reviewed by Zalan Bujtas.

Source/WebCore:

When drawing vertical text, the rotation is not reset between successive paint calls. We implement
synthetic bold by drawing text twice, which means that the second draw call was getting rotated
twice. This was an oversight in r204858.

Test: fast/text/synthetic-bold-vertical-text.html

  • platform/graphics/cocoa/FontCascadeCocoa.mm:

(WebCore::showGlyphsWithAdvances):

LayoutTests:

  • fast/text/synthetic-bold-vertical-text-expected.html: Added.
  • fast/text/synthetic-bold-vertical-text.html: Added.
9:18 PM Changeset in webkit [211666] by Joseph Pecoraro
  • 5 edits in trunk/Source

Unreviewed rollout of r211486, r211629.

Original change is not ideal and is causing issues.

Source/JavaScriptCore:

  • inspector/agents/InspectorHeapAgent.cpp:

(Inspector::SendGarbageCollectionEventsTask::SendGarbageCollectionEventsTask):

  • runtime/InitializeThreading.cpp:

(JSC::initializeThreading):

Source/WebKit2:

  • Shared/WebKit2Initialize.cpp:

(WebKit::InitializeWebKit2):

7:23 PM Changeset in webkit [211665] by commit-queue@webkit.org
  • 33 edits in trunk/Source

Performance Timing: Convert WTF::MonotonicTime and WTF::Seconds
https://bugs.webkit.org/show_bug.cgi?id=167768

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2017-02-03
Reviewed by Geoffrey Garen.

Source/WebCore:

The public APIs still return double (DOMHighResTimeStamp), which
is milliseconds since a time origin:
https://w3c.github.io/hr-time/#dom-domhighrestimestamp

  • loader/LoadTiming.cpp:

(WebCore::LoadTiming::secondsSinceStartTime):
(WebCore::LoadTiming::monotonicTimeToPseudoWallTime):
(WebCore::LoadTiming::markStartTime):
(WebCore::LoadTiming::addRedirect):
(WebCore::LoadTiming::monotonicTimeToZeroBasedDocumentTime): Deleted.

  • loader/LoadTiming.h:

(WebCore::LoadTiming::markUnloadEventStart):
(WebCore::LoadTiming::markUnloadEventEnd):
(WebCore::LoadTiming::markRedirectStart):
(WebCore::LoadTiming::markRedirectEnd):
(WebCore::LoadTiming::markFetchStart):
(WebCore::LoadTiming::setResponseEnd):
(WebCore::LoadTiming::markLoadEventStart):
(WebCore::LoadTiming::markLoadEventEnd):
(WebCore::LoadTiming::startTime):
(WebCore::LoadTiming::unloadEventStart):
(WebCore::LoadTiming::unloadEventEnd):
(WebCore::LoadTiming::redirectStart):
(WebCore::LoadTiming::redirectEnd):
(WebCore::LoadTiming::fetchStart):
(WebCore::LoadTiming::responseEnd):
(WebCore::LoadTiming::loadEventStart):
(WebCore::LoadTiming::loadEventEnd):
(WebCore::LoadTiming::redirectCount):
(WebCore::LoadTiming::referenceMonotonicTime):
(WebCore::LoadTiming::referenceWallTime):
Use MonotonicTime and WallTime for timestamps and references.

  • dom/Document.cpp:

(WebCore::Document::setReadyState):
(WebCore::Document::finishedParsing):
(WebCore::Document::monotonicTimestamp):

  • dom/DocumentTiming.h:

(WebCore::DocumentTiming::DocumentTiming): Deleted.

  • dom/ScriptedAnimationController.cpp:

(WebCore::ScriptedAnimationController::serviceScriptedAnimations):

  • inspector/InspectorNetworkAgent.cpp:

(WebCore::InspectorNetworkAgent::buildObjectForTiming):
(WebCore::InspectorNetworkAgent::didFinishLoading):

  • loader/DocumentLoader.cpp:

(WebCore::DocumentLoader::finishedLoading):
(WebCore::DocumentLoader::dataReceived):

  • loader/DocumentLoader.h:
  • loader/SubresourceLoader.cpp:

(WebCore::SubresourceLoader::didFinishLoading):

  • loader/cache/CachedResourceLoader.cpp:

(WebCore::CachedResourceLoader::requestResource):

  • page/DOMWindow.cpp:

(WebCore::DOMWindow::performance):
Use new types instead of raw doubles.

  • page/Performance.cpp:

(WebCore::Performance::Performance):
(WebCore::Performance::now):
(WebCore::Performance::reduceTimeResolution):
(WebCore::Performance::addResourceTiming):

  • page/Performance.h:

Do time arithmatic with WTF::Time classes.
This clarifies that we reduce our timestamps to 100us
resolution instead of the maximum 5us allowed by the spec.

  • page/PerformanceResourceTiming.cpp:

(WebCore::monotonicTimeToDOMHighResTimeStamp):
(WebCore::PerformanceResourceTiming::PerformanceResourceTiming):
(WebCore::PerformanceResourceTiming::networkLoadTimeToDOMHighResTimeStamp):

  • page/PerformanceResourceTiming.h:
  • page/PerformanceTiming.cpp:

(WebCore::PerformanceTiming::resourceLoadTimeRelativeToFetchStart):
(WebCore::PerformanceTiming::monotonicTimeToIntegerMilliseconds):
(WebCore::toIntegerMilliseconds): Deleted.

  • page/PerformanceTiming.h:

Do time arithmatic with WTF::Time classes.

  • workers/DedicatedWorkerGlobalScope.cpp:

(WebCore::DedicatedWorkerGlobalScope::create):
(WebCore::DedicatedWorkerGlobalScope::DedicatedWorkerGlobalScope):

  • workers/DedicatedWorkerGlobalScope.h:
  • workers/DedicatedWorkerThread.cpp:

(WebCore::DedicatedWorkerThread::DedicatedWorkerThread):
(WebCore::DedicatedWorkerThread::createWorkerGlobalScope):

  • workers/DedicatedWorkerThread.h:
  • workers/WorkerGlobalScope.cpp:

(WebCore::WorkerGlobalScope::WorkerGlobalScope):

  • workers/WorkerGlobalScope.h:
  • workers/WorkerGlobalScopeProxy.h:
  • workers/WorkerMessagingProxy.cpp:

(WebCore::WorkerMessagingProxy::startWorkerGlobalScope):

  • workers/WorkerMessagingProxy.h:
  • workers/WorkerThread.cpp:

(WebCore::WorkerThreadStartupData::WorkerThreadStartupData):
(WebCore::WorkerThread::WorkerThread):

  • workers/WorkerThread.h:

Pass time origin as MonotonicTime.

  • workers/Worker.cpp:

(WebCore::Worker::create):
(WebCore::Worker::notifyFinished):

  • workers/Worker.h:

Rename creation timestamp member. This matches Document's m_documentCreationTime.

Source/WTF:

  • wtf/Stopwatch.h:

(WTF::Stopwatch::elapsedTimeSince):
(WTF::Stopwatch::elapsedTimeSinceMonotonicTime): Deleted.

7:16 PM Changeset in webkit [211664] by achristensen@apple.com
  • 3 edits
    1 add in trunk/Source/ThirdParty/libwebrtc

[WebRTC] Add more files to libwebrtc build
https://bugs.webkit.org/show_bug.cgi?id=167824

Reviewed by Youenn Fablet.

  • Configurations/libwebrtc.xcconfig:
  • Configurations/usrsctp.xcconfig: Added.
  • libwebrtc.xcodeproj/project.pbxproj:
7:03 PM Changeset in webkit [211663] by commit-queue@webkit.org
  • 8 edits in trunk

WK1 mouse events are missing movementX and movementY for pointerlock.
https://bugs.webkit.org/show_bug.cgi?id=167775
rdar://problem/30343810

Patch by Jeremy Jones <jeremyj@apple.com> on 2017-02-03
Reviewed by Alexey Proskuryakov.

Source/WebCore:

pointer-lock/mouse-event-delivery.html

Improve mouse-event-delivery.html test to mouse move and check for valid movementX and movementY.

  • platform/mac/PlatformEventFactoryMac.mm:

(WebCore::PlatformMouseEventBuilder::PlatformMouseEventBuilder): WK1 plumb throuhg movementX and movementY

Tools:

Set kCGMouseEventDeltaX and kCGMouseEventDeltaY when synthesizing mouse move events.

  • DumpRenderTree/mac/EventSendingController.mm:

(-[EventSendingController mouseMoveToX:Y:]):

  • WebKitTestRunner/mac/EventSenderProxy.mm:

(WTR::EventSenderProxy::mouseMoveTo):

LayoutTests:

Enable pointer-lock/mouse-event-delivery.html for mac.

  • platform/mac/TestExpectations:
5:53 PM Changeset in webkit [211662] by Simon Fraser
  • 83 edits
    2 adds in trunk

Correctly set the "inWindow" flag for TileControllers that aren't the page tiles, and clarify "usingTiledBacking" logic
https://bugs.webkit.org/show_bug.cgi?id=167774

Reviewed by Tim Horton.
Source/WebCore:

RenderLayerBacking had some very confusing "usingTiledCacheLayer" uses.

Its member variable, m_usingTiledCacheLayer, really meant "m_isMainFrameLayerWithTiledBacking" so make it so.
It had a usingTiledBacking(), which returned the same thing, which this patch replaces with isMainFrameLayerWithTiledBacking().

The fact that usingTiledBacking() was only true for the page tiled layer tripped up
RenderLayerCompositor::setIsInWindowForLayerIncludingDescendants(), which would only ever call setIsInWindow()
on the page tiled layer. These changes fix that.

Also make a way for tests to unparent the web view via UIScriptController, and dump out the "in window"
status of TileBackings when dumping tile caches.

Test: tiled-drawing/tiled-backing-in-window.html

  • platform/graphics/TiledBacking.h:
  • platform/graphics/ca/GraphicsLayerCA.cpp:

(WebCore::GraphicsLayerCA::dumpAdditionalProperties):

  • platform/graphics/ca/TileController.h:
  • rendering/RenderLayerBacking.cpp:

(WebCore::RenderLayerBacking::RenderLayerBacking):
(WebCore::computePageTiledBackingCoverage):
(WebCore::RenderLayerBacking::adjustTiledBackingCoverage):
(WebCore::RenderLayerBacking::setTiledBackingHasMargins):
(WebCore::RenderLayerBacking::createPrimaryGraphicsLayer):
(WebCore::RenderLayerBacking::shouldClipCompositedBounds):
(WebCore::RenderLayerBacking::updateDescendantClippingLayer):
(WebCore::RenderLayerBacking::updateRootLayerConfiguration):
(WebCore::RenderLayerBacking::paintsIntoWindow):
(WebCore::computeTileCoverage): Deleted.

  • rendering/RenderLayerBacking.h:
  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::flushPendingLayerChanges):
(WebCore::RenderLayerCompositor::rootFixedBackgroundsChanged):
(WebCore::RenderLayerCompositor::setIsInWindowForLayerIncludingDescendants):
(WebCore::RenderLayerCompositor::supportsFixedRootBackgroundCompositing):
(WebCore::RenderLayerCompositor::documentUsesTiledBacking):

Tools:

Implement UIScriptController removeViewFromWindow() and addViewToWindow(), and hook
up for Mac WK1 and WK2, and iOS WK2. It takes a callback because view state updates to the
web process are async, so the callback fires after the web process gets the new state.

  • DumpRenderTree/ios/UIScriptControllerIOS.mm:

(WTR::UIScriptController::removeViewFromWindow):
(WTR::UIScriptController::addViewToWindow):

  • DumpRenderTree/mac/DumpRenderTree.mm:

(createWebViewAndOffscreenWindow):
(resetWebViewToConsistentStateBeforeTesting):

  • DumpRenderTree/mac/DumpRenderTreeMac.h:
  • DumpRenderTree/mac/UIScriptControllerMac.mm:

(WTR::UIScriptController::removeViewFromWindow):
(WTR::UIScriptController::addViewToWindow):

  • TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl:
  • TestRunnerShared/UIScriptContext/UIScriptController.cpp:

(WTR::UIScriptController::removeViewFromWindow):
(WTR::UIScriptController::addViewToWindow):

  • TestRunnerShared/UIScriptContext/UIScriptController.h:
  • WebKitTestRunner/PlatformWebView.h:
  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::resetStateToConsistentValues):

  • WebKitTestRunner/ios/PlatformWebViewIOS.mm:

(WTR::PlatformWebView::removeFromWindow):
(WTR::PlatformWebView::addToWindow):

  • WebKitTestRunner/ios/UIScriptControllerIOS.mm:

(WTR::UIScriptController::removeViewFromWindow):
(WTR::UIScriptController::addViewToWindow):

  • WebKitTestRunner/mac/PlatformWebViewMac.mm:

(WTR::PlatformWebView::removeFromWindow):
(WTR::PlatformWebView::addToWindow):

  • WebKitTestRunner/mac/UIScriptControllerMac.mm:

(WTR::UIScriptController::removeViewFromWindow):
(WTR::UIScriptController::addViewToWindow):

LayoutTests:

Rebase to include the "in window" output.

tiled-drawing/background-transparency-toggle.html was sensitive to the length of the output, so give the body
a fixed size.

  • compositing/tiling/offscreen-tiled-layer-expected.txt:
  • compositing/tiling/transform-origin-tiled-expected.txt:
  • platform/mac-wk1/compositing/tiling/offscreen-tiled-layer-expected.txt:
  • platform/mac-wk1/compositing/tiling/transform-origin-tiled-expected.txt:
  • platform/mac-wk2/compositing/tiling/rotated-tiled-clamped-expected.txt:
  • platform/mac-wk2/compositing/tiling/rotated-tiled-preserve3d-clamped-expected.txt:
  • platform/mac-wk2/compositing/tiling/tile-cache-zoomed-expected.txt:
  • platform/mac-wk2/compositing/tiling/tiled-layer-resize-expected.txt:
  • platform/mac/compositing/tiling/rotated-tiled-clamped-expected.txt:
  • platform/mac/compositing/tiling/rotated-tiled-preserve3d-clamped-expected.txt:
  • platform/mac/compositing/tiling/tiled-layer-resize-expected.txt:
  • tiled-drawing/background-transparency-toggle-expected.txt:
  • tiled-drawing/background-transparency-toggle.html:
  • tiled-drawing/scrolling/fast-scroll-div-latched-div-expected.txt:
  • tiled-drawing/scrolling/fast-scroll-div-latched-div-with-handler-expected.txt:
  • tiled-drawing/scrolling/fast-scroll-div-latched-mainframe-expected.txt:
  • tiled-drawing/scrolling/fast-scroll-div-latched-mainframe-with-handler-expected.txt:
  • tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe-expected.txt:
  • tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe-with-handler-expected.txt:
  • tiled-drawing/scrolling/fast-scroll-iframe-latched-mainframe-expected.txt:
  • tiled-drawing/scrolling/fast-scroll-iframe-latched-mainframe-with-handler-expected.txt:
  • tiled-drawing/scrolling/fast-scroll-select-latched-mainframe-expected.txt:
  • tiled-drawing/scrolling/fast-scroll-select-latched-mainframe-with-handler-expected.txt:
  • tiled-drawing/scrolling/fast-scroll-select-latched-select-expected.txt:
  • tiled-drawing/scrolling/fast-scroll-select-latched-select-with-handler-expected.txt:
  • tiled-drawing/scrolling/fixed-background/fixed-background-no-image-expected.txt:
  • tiled-drawing/scrolling/fixed-background/fixed-body-background-body-layer-expected.txt:
  • tiled-drawing/scrolling/fixed-background/fixed-body-background-expected.txt:
  • tiled-drawing/scrolling/fixed-background/fixed-body-background-opacity-expected.txt:
  • tiled-drawing/scrolling/fixed-background/fixed-body-background-positioned-expected.txt:
  • tiled-drawing/scrolling/fixed-background/fixed-body-background-transformed-expected.txt:
  • tiled-drawing/scrolling/fixed-background/fixed-body-background-zoomed-expected.txt:
  • tiled-drawing/scrolling/fixed-background/fixed-html-background-expected.txt:
  • tiled-drawing/scrolling/fixed-background/fixed-non-propagated-body-background-expected.txt:
  • tiled-drawing/scrolling/fixed/four-bars-zoomed-expected.txt:
  • tiled-drawing/simple-document-with-margin-tiles-expected.txt:
  • tiled-drawing/tile-coverage-after-scroll-expected.txt:
  • tiled-drawing/tile-coverage-after-scroll-speculative-expected.txt:
  • tiled-drawing/tile-coverage-scroll-to-bottom-expected.txt:
  • tiled-drawing/tile-coverage-slow-scrolling-expected.txt:
  • tiled-drawing/tile-coverage-speculative-expected.txt:
  • tiled-drawing/tile-coverage-view-exposed-rect-expected.txt:
  • tiled-drawing/tile-size-both-scrollable-expected.txt:
  • tiled-drawing/tile-size-horizontally-scrollable-expected.txt:
  • tiled-drawing/tile-size-slow-zoomed-expected.txt:
  • tiled-drawing/tile-size-unscrollable-expected.txt:
  • tiled-drawing/tile-size-vertically-scrollable-expected.txt:
  • tiled-drawing/tile-size-view-exposed-rect-expected.txt:
  • tiled-drawing/tiled-backing-in-window-expected.txt: Added.
  • tiled-drawing/tiled-backing-in-window.html: Added.
  • tiled-drawing/tiled-drawing-scroll-position-page-cache-restoration-expected.txt:
  • tiled-drawing/tiled-drawing-zoom-expected.txt:
  • tiled-drawing/tiled-drawing-zoom-scrolled-expected.txt:
  • tiled-drawing/use-tiled-drawing-expected.txt:
  • tiled-drawing/visible-rect-content-inset-expected.txt:
5:42 PM Changeset in webkit [211661] by Alan Bujtas
  • 3 edits
    2 adds in trunk

Simple line layout: Bail out from Simple Line Layout when the primary font is insufficient.
https://bugs.webkit.org/show_bug.cgi?id=167820
Source/WebCore:

<rdar://problem/30359685>

Reviewed by Myles C. Maxfield.

Currently simple line layout requires the primary font to have all the glyps for the content.

Test: fast/text/simple-line-layout-do-not-support-unicode-range.html

  • rendering/SimpleLineLayout.cpp:

(WebCore::SimpleLineLayout::canUseForText):
(WebCore::SimpleLineLayout::canUseForFontAndText):
(WebCore::SimpleLineLayout::printReason):

LayoutTests:

Reviewed by Myles C. Maxfield.

  • fast/text/simple-line-layout-do-not-support-unicode-range-expected.html: Added.
  • fast/text/simple-line-layout-do-not-support-unicode-range.html: Added.
5:39 PM Changeset in webkit [211660] by commit-queue@webkit.org
  • 2 edits
    17 adds in trunk/LayoutTests/imported/w3c

Import web-platform-tests/hr-time tests
https://bugs.webkit.org/show_bug.cgi?id=167819

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2017-02-03
Reviewed by Youenn Fablet.

We pass all of these tests upstream.

  • resources/ImportExpectations:
  • web-platform-tests/hr-time/OWNERS: Added.
  • web-platform-tests/hr-time/basic-expected.txt: Added.
  • web-platform-tests/hr-time/basic.html: Added.
  • web-platform-tests/hr-time/basic.worker-expected.txt: Added.
  • web-platform-tests/hr-time/basic.worker.html: Added.
  • web-platform-tests/hr-time/basic.worker.js: Added.
  • web-platform-tests/hr-time/idlharness-expected.txt: Added.
  • web-platform-tests/hr-time/idlharness.html: Added.
  • web-platform-tests/hr-time/monotonic-clock-expected.txt: Added.
  • web-platform-tests/hr-time/monotonic-clock.html: Added.
  • web-platform-tests/hr-time/resources/now_frame.html: Added.
  • web-platform-tests/hr-time/resources/w3c-import.log: Added.
  • web-platform-tests/hr-time/test_cross_frame_start-expected.txt: Added.
  • web-platform-tests/hr-time/test_cross_frame_start.html: Added.
  • web-platform-tests/hr-time/w3c-import.log: Added.
5:20 PM Changeset in webkit [211659] by jer.noble@apple.com
  • 3 edits
    2 adds in trunk

ASSERT in HTMLMediaElement::~HTMLMediaElement
https://bugs.webkit.org/show_bug.cgi?id=167818

Reviewed by Brent Fulgham.

Source/WebCore:

Test: media/audio-dealloc-crash.html

HTMLMediaElement's MediaElementSession can nominate the HTMLMediaElement itself
to become the playback controls session from inside the HTMLMediaElement destructor. Protect
against this by clearing out the session before calling updatePlaybackControlsManager().

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::~HTMLMediaElement):

LayoutTests:

  • media/audio-dealloc-crash-expected.txt: Added.
  • media/audio-dealloc-crash.html: Added.
5:17 PM Changeset in webkit [211658] by jfbastien@apple.com
  • 7 edits in trunk/Source/JavaScriptCore

OSR entry: delay outer-loop compilation when at inner-loop
https://bugs.webkit.org/show_bug.cgi?id=167149

Reviewed by Filip Pizlo.

r211224 and r211461 were reverted because they caused massive
kraken/ai-astar regressions. This patch instead does the
minimally-disruptive change to fix the original bug as described
below, but omits extra tuning and refactoring which I had
before. I'll commit tuning and refactoring separately, if this
sticks. This patch is therefore very minimal, and layers carefully
on top of the complex spaghetti-logic. The only change it makes is
that it uses triggers to indicate to outer loops that they should
compile, which fixes the immediate bug and seems roughly perf
neutral (maybe a small gain on kraken sometimes, other times a
small regression as would be expected from slightly compiling
later). As opposed to r211461 this patch doesn't unconditionally
unset the trigger because it prevents further DFG executions from
entering. It therefore makes the trigger a tri-state enum class:
don't trigger, compilation done, start compilation. Only "start
compilation" gets reset to "don't trigger". "Compilation done"
does not (unless there's a problem compiling, then it gets set
back to "don't trigger").

As of https://bugs.webkit.org/show_bug.cgi?id=155217 OSR
compilation can be kicked off for an entry into an outer-loop,
while executing an inner-loop. This is desirable because often the
codegen from an inner-entry isn't as good as the codegen from an
outer-entry, but execution from an inner-loop is often pretty hot
and likely to kick off compilation. This approach provided nice
speedups on Kraken because we'd select to enter to the outer-loop
very reliably, which reduces variability (the inner-loop was
selected roughly 1/5 times from my unscientific measurements).

When compilation starts we take a snapshot of the JSValues at the
current execution state using OSR's recovery mechanism. These
values are passed to the compiler and are used as way to perform
type profiling, and could be used to observe cell types as well as
to perform predictions such as through constant propagation.

It's therefore desired to enter from the outer-loop when we can,
but we need to be executing from that location to capture the
right JSValues, otherwise we're confusing the compiler and giving
it inaccurate JSValues which can lead it to predict the wrong
things, leading to suboptimal code or recompilation due to
misprediction, or in super-corner-cases a crash.

DFG tier-up was added here:
https://bugs.webkit.org/show_bug.cgi?id=112838

  • dfg/DFGJITCode.h:
  • dfg/DFGJITCompiler.cpp:

(JSC::DFG::JITCompiler::JITCompiler):

  • dfg/DFGOperations.cpp:
  • dfg/DFGSpeculativeJIT64.cpp:

(JSC::DFG::SpeculativeJIT::compile):

  • dfg/DFGToFTLForOSREntryDeferredCompilationCallback.cpp:

(JSC::DFG::ToFTLForOSREntryDeferredCompilationCallback::ToFTLForOSREntryDeferredCompilationCallback):
(JSC::DFG::Ref<ToFTLForOSREntryDeferredCompilationCallback>ToFTLForOSREntryDeferredCompilationCallback::create):
(JSC::DFG::ToFTLForOSREntryDeferredCompilationCallback::compilationDidBecomeReadyAsynchronously):
(JSC::DFG::ToFTLForOSREntryDeferredCompilationCallback::compilationDidComplete):

  • dfg/DFGToFTLForOSREntryDeferredCompilationCallback.h:
4:05 PM Changeset in webkit [211657] by ap@apple.com
  • 2 edits in trunk/Tools

Remove check for SkipSafariExecutableEntitlementChecks
https://bugs.webkit.org/show_bug.cgi?id=167762

Reviewed by Dan Bernstein.

Follow-up fix: don't break internal behavior.

  • Scripts/webkitdirs.pm:

(safariPath):
(executableHasEntitlements): Deleted.
(safariPathFromSafariBundle): Deleted.
(installedSafariPath): Deleted.

3:14 PM Changeset in webkit [211656] by dbates@webkit.org
  • 21 edits
    5 adds in trunk

[Mac][WK2] Add SPI to override the Content Security Policy of a page
https://bugs.webkit.org/show_bug.cgi?id=167810
<rdar://problem/30102568>

Reviewed by Anders Carlsson.

Source/WebCore:

  • dom/Document.cpp:

(WebCore::Document::initSecurityContext): Apply the embedding client's override Content Security
Policy to the document if one exists.

  • loader/FrameLoaderClient.h: Add function overrideContentSecurityPolicy() that a FrameLoaderClient

can override to provide a custom Content Security Policy for a document (defaults: null string - no policy).
As its name implies, the policy returned by overrideContentSecurityPolicy() will define the Content
Security Policy for the document, overriding any subsequently received Content Security Policy for
the document.

  • page/csp/ContentSecurityPolicy.cpp:

(WebCore::ContentSecurityPolicy::copyStateFrom): Only copy policies from the specified ContentSecurityPolicy
object if our policy was not specified by the embedding client.
(WebCore::ContentSecurityPolicy::didReceiveHeader): Set ContentSecurityPolicy::m_hasAPIPolicy to true
when we receive an API policy from the embedding client (ContentSecurityPolicy::PolicyFrom::API). An
API policy must be defined before a policy received from a document. Do not process a received header
if we already have an API policy as the API policy overrides all other policies.

  • page/csp/ContentSecurityPolicy.h:

Source/WebKit2:

Add SPI to WKWebViewConfiguration so that an embedding client can define a custom Content Security
Policy that overrides the Content Security Policy of any page loaded in the web view.

  • Shared/WebPageCreationParameters.cpp:

(WebKit::WebPageCreationParameters::encode): Encode instance variable overrideContentSecurityPolicy.
(WebKit::WebPageCreationParameters::decode): Decode instance variable overrideContentSecurityPolicy.

  • Shared/WebPageCreationParameters.h:
  • UIProcess/API/APIPageConfiguration.cpp:

(API::PageConfiguration::copy): Copy instance variable overrideContentSecurityPolicy.

  • UIProcess/API/APIPageConfiguration.h:

(API::PageConfiguration::overrideContentSecurityPolicy): Added.
(API::PageConfiguration::setOverrideContentSecurityPolicy): Added.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _initializeWithConfiguration:]): Copy overrideContentSecurityPolicy set on the WKWebViewConfiguration
object to the API::PageConfiguration object if non-nil.

  • UIProcess/API/Cocoa/WKWebViewConfiguration.mm:

(-[WKWebViewConfiguration copyWithZone:]): Copy the instance variable overrideContentSecurityPolicy.
(-[WKWebViewConfiguration _overrideContentSecurityPolicy]): Added.
(-[WKWebViewConfiguration _setOverrideContentSecurityPolicy:]): Added.

  • UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h: Define SPI property _overrideContentSecurityPolicy.
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::WebPageProxy): Initialize m_overrideContentSecurityPolicy from the passed
page configuration.
(WebKit::WebPageProxy::creationParameters): Set WebPageCreationParameters::overrideContentSecurityPolicy
so that the WebPage object (in the WebProcess) will know the overridden Content Security Policy
to apply to the document.

  • UIProcess/WebPageProxy.h:
  • WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:

(WebKit::WebFrameLoaderClient::overrideContentSecurityPolicy): Added. Returns the custom Content
Security Policy to apply to a new document.

  • WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
  • WebProcess/WebPage/WebPage.cpp:
  • WebProcess/WebPage/WebPage.h:

(WebKit::WebPage::overrideContentSecurityPolicy): Added.

Tools:

Add tests to ensure that we do not regress -[WKWebView _setOverrideContentSecurityPolicy:].

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKit2Cocoa/OverrideContentSecurityPolicy.mm: Added.

(TEST):

  • TestWebKitAPI/Tests/WebKit2Cocoa/page-with-csp-iframe.html: Added.
  • TestWebKitAPI/Tests/WebKit2Cocoa/page-with-csp.html: Added.
  • TestWebKitAPI/Tests/WebKit2Cocoa/page-without-csp-iframe.html: Added.
  • TestWebKitAPI/Tests/WebKit2Cocoa/page-without-csp.html: Added.
3:08 PM Changeset in webkit [211655] by andersca@apple.com
  • 2 edits in trunk/Source/WebKit2

Revert toString behavior to what we had in the last version we shipped
https://bugs.webkit.org/show_bug.cgi?id=167814
rdar://problem/30344753

Reviewed by Tim Horton.

This is a speculative fix for a crash that we've seen on recent builds. It simply reverts the toString call back to
what we have in the last version of Safari we shipped.

  • WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:

(WebKit::NPRuntimeObjectMap::convertJSValueToNPVariant):

2:40 PM Changeset in webkit [211654] by Chris Dumez
  • 7 edits in trunk

Drop Mac App Store workaround for window.getComputedStyle()
https://bugs.webkit.org/show_bug.cgi?id=166891
<rdar://problem/28282452>

Reviewed by Sam Weinig.

Drop Mac App Store workaround for window.getComputedStyle() now that
<rdar://problem/28020681> has been fixed.

  • page/DOMWindow.cpp:
  • page/DOMWindow.h:
  • page/DOMWindow.idl:
  • platform/RuntimeApplicationChecks.h:
  • platform/RuntimeApplicationChecks.mm:

(WebCore::MacApplication::isAppStore): Deleted.

2:18 PM Changeset in webkit [211653] by Chris Dumez
  • 11 edits
    2 adds in trunk

Dismiss HTML form validation popover when pressing Escape key
https://bugs.webkit.org/show_bug.cgi?id=167716
<rdar://problem/29872943>

Reviewed by Simon Fraser.

Source/WebCore:

Dismiss any visible HTML form validation popover when pressing
the Escape key.

Test: fast/forms/validation-bubble-escape-key-dismiss.html

  • page/EventHandler.cpp:

(WebCore::EventHandler::keyEvent):

  • page/ValidationMessageClient.h:

Source/WebKit/mac:

Override ValidationMessageClient::hideAnyValidationMessage().

  • WebCoreSupport/WebValidationMessageClient.h:
  • WebCoreSupport/WebValidationMessageClient.mm:

(WebValidationMessageClient::hideAnyValidationMessage):

Source/WebKit2:

Override ValidationMessageClient::hideAnyValidationMessage().

  • WebProcess/WebCoreSupport/WebValidationMessageClient.cpp:

(WebKit::WebValidationMessageClient::hideAnyValidationMessage):

  • WebProcess/WebCoreSupport/WebValidationMessageClient.h:

LayoutTests:

Add layout test coverage.

  • fast/forms/validation-bubble-escape-key-dismiss-expected.txt: Added.
  • fast/forms/validation-bubble-escape-key-dismiss.html: Added.
  • platform/ios-simulator/TestExpectations:
2:01 PM Changeset in webkit [211652] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit2

Require keyboard focus for pointer lock.
https://bugs.webkit.org/show_bug.cgi?id=167750

Patch by Jeremy Jones <jeremyj@apple.com> on 2017-02-03
Reviewed by Tim Horton.

When keyboard focus leaves the page, end pointer lock
Prevent pointer lock when the page doesn't have keyboard focus.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::dispatchActivityStateChange):
(WebKit::WebPageProxy::requestPointerLock):

1:59 PM Changeset in webkit [211651] by commit-queue@webkit.org
  • 2 edits in trunk/Source/bmalloc

Include cstdlib before using ::malloc and posix_memalign
https://bugs.webkit.org/show_bug.cgi?id=167800

Patch by Ting-Wei Lan <Ting-Wei Lan> on 2017-02-03
Reviewed by Geoffrey Garen.

  • bmalloc/DebugHeap.cpp:
1:56 PM Changeset in webkit [211650] by commit-queue@webkit.org
  • 8 edits in trunk

Pointer lock events should be delivered directly to the target element
https://bugs.webkit.org/show_bug.cgi?id=167134
rdar://problem/30268004

Patch by Jeremy Jones <jeremyj@apple.com> on 2017-02-03
Reviewed by Dean Jackson.

Source/WebCore:

pointer-lock/mouse-event-delivery.html: Enabled for mac, added wheel event tests.

When pointer is locked on an element, route mouse events directly to the target element, instead of
doing the normal event disptach.

  • page/EventHandler.cpp:

(WebCore::EventHandler::handleMousePressEvent):
(WebCore::EventHandler::handleMouseDoubleClickEvent):
(WebCore::EventHandler::handleMouseMoveEvent):
(WebCore::EventHandler::handleMouseReleaseEvent):
(WebCore::EventHandler::handleMouseForceEvent):
(WebCore::EventHandler::handleWheelEvent):

  • page/PointerLockController.cpp:

(WebCore::PointerLockController::isLocked): Added.
(WebCore::PointerLockController::dispatchLockedWheelEvent): Added.

  • page/PointerLockController.h:

LayoutTests:

The pointer-lock/mouse-event-delivery.html test is modified to explicitly move the mouse pointer to a valid
location before sending mouse actions. Without this, the test infrastructure doesn't know that the pointer
is over the web view and doesn't deliver events.

The pointer-lock/mouse-event-delivery.html is also modified to explicitly wait for the delivery of the
wheel event before continuing with the test. This prevents flakeyness with the order the events are received.

Added code to test for wheel events.

  • platform/mac/TestExpectations: enabled test.
  • pointer-lock/mouse-event-delivery.html:
  • pointer-lock/mouse-event-delivery-expected.txt:
1:52 PM Changeset in webkit [211649] by yoav@yoav.ws
  • 13 edits
    2 adds in trunk

Avoid evicting link preload resources when parsing is done.
https://bugs.webkit.org/show_bug.cgi?id=167415

Reviewed by Ryosuke Niwa.

Source/WebCore:

Currently all preloads (speculative and link preload) are being cleared when the document has finished parsing.
When it comes to link preloads, it can result in resources being cleared before the page had a chance to use them. (e.g. resources
that are preloaded in order to be loaded through script after DOMContentLoaded)

This patch fixes that by marking link preload resources as such, so that they can be handled separately inside clearPreloads().
As this fix also exposed an issue with load cancelation with invalid hrefs (which tests were passing before due to the preloads
being cleared), said issue is also fixed by clearing previousely preloaded resources if an invalid link preload is later detected.

Test: http/tests/preload/not_evicting_preload_at_onload.html

  • dom/Document.cpp:

(WebCore::Document::finishedParsing): Only clear speculative preloads when parsing is finished.

  • loader/LinkLoader.cpp:

(WebCore::LinkLoader::preloadIfNeeded): Set request flag indicating link preload.
(WebCore::LinkLoader::loadLink): Clear previousely preloaded resource to cancel their load.

  • loader/LinkPreloadResourceClients.h:

(WebCore::LinkPreloadResourceClient::clearResource): Call cancelLoad() when the client is cleared.

  • loader/cache/CachedResource.h:

(WebCore::CachedResource::isLinkPreload):
(WebCore::CachedResource::setLinkPreload):

  • loader/cache/CachedResource.cpp:

(WebCore::CachedResource::CachedResource): Initialize m_isLinkPreload with the request's value.

  • loader/cache/CachedResourceLoader.cpp:

(WebCore::CachedResourceLoader::~CachedResourceLoader):
(WebCore::CachedResourceLoader::requestResource): Mirror the request link preload flag to the resource if it's fetched from cache.
(WebCore::CachedResourceLoader::clearPreloads): Add a "speculative only" mode, which doesn't clear link preloads.

  • loader/cache/CachedResourceLoader.h:
  • loader/cache/CachedResourceRequest.cpp:

(WebCore::CachedResourceRequest::CachedResourceRequest):

  • loader/cache/CachedResourceRequest.h:

(WebCore::CachedResourceRequest::isLinkPreload):
(WebCore::CachedResourceRequest::setIsLinkPreload):

LayoutTests:

  • http/tests/preload/dynamic_remove_preload_href.html: Test passed before for the wrong reasons. Cache-busting in order for it to genuinely pass.
  • http/tests/preload/not_delaying_window_onload_before_discovery.html: Test passed before for the wrong reasons. Cache-busting in order for it to genuinely pass.
  • http/tests/preload/not_evicting_preload_at_onload-expected.txt: Added.
  • http/tests/preload/not_evicting_preload_at_onload.html: Added.
  • platform/mac/TestExpectations: Skipping http/tests/preload/dynamic_removing_preload.html due to https://bugs.webkit.org/show_bug.cgi?id=167792
1:48 PM Changeset in webkit [211648] by andersca@apple.com
  • 2 edits in trunk/Source/WebKit2

Stash away the ports - they will be nulled out before the cancel handlers are called
https://bugs.webkit.org/show_bug.cgi?id=167812

Reviewed by Geoffrey Garen.

  • Platform/IPC/mac/ConnectionMac.mm:

(IPC::Connection::open):

1:17 PM Changeset in webkit [211647] by Alan Bujtas
  • 3 edits
    2 adds in trunk

Simple line layout: Removing adjacent trailing whitespace runs should not crash.
https://bugs.webkit.org/show_bug.cgi?id=167803
<rdar://problem/30337368>

Reviewed by Antti Koivisto.

Source/WebCore:

In case of adjacent collapsed whitespace fragments, the length of these fragments (TextFragmentIterator::TextFragment)
do not necessarily equal the length of the final runs (SimpleLineLayout::Run).
This patch removes the dependency on the length and switches over to using the position information instead.

Test: fast/text/simple-line-layout-multiple-trailingwhitespace-crash.html

  • rendering/SimpleLineLayout.cpp:

(WebCore::SimpleLineLayout::LineState::appendFragmentAndCreateRunIfNeeded):
(WebCore::SimpleLineLayout::LineState::removeTrailingWhitespace):

LayoutTests:

  • fast/text/simple-line-layout-multiple-trailingwhitespace-crash-expected.txt: Added.
  • fast/text/simple-line-layout-multiple-trailingwhitespace-crash.html: Added.
12:53 PM Changeset in webkit [211646] by Brent Fulgham
  • 2 edits in trunk/Source/WebCore

Correct memory leak in MediaConstraints
https://bugs.webkit.org/show_bug.cgi?id=167744
<rdar://problem/30331444>

Reviewed by Anders Carlsson.

ConstraintHolder returns a reference to an object created by operator new. When the
returned value is assigned or stored in Vector or other containers we leak memory.
Instead, this value should just be returned as a regular object so that the return
value optimization can make sure memory is properly (and efficiently) used.

Tested by existing mediastream tests.

  • platform/mediastream/MediaConstraints.h:

(WebCore::FlattenedConstraint::ConstraintHolder::create): Return by value.
(WebCore::FlattenedConstraint::ConstraintHolder::~ConstraintHolder): Don't attempt to
delete memory that was moved away.
(WebCore::FlattenedConstraint::ConstraintHolder::ConstraintHolder): Add Move constructor.

12:49 PM Changeset in webkit [211645] by Chris Dumez
  • 3 edits
    2 adds in trunk

Fix bad assertion under HTMLTreeBuilder::processStartTagForInBody()
https://bugs.webkit.org/show_bug.cgi?id=167799
<rdar://problem/30237241>

Reviewed by Brent Fulgham.

Source/WebCore:

Fix bad assertion under HTMLTreeBuilder::processStartTagForInBody() that was
expecting the root element to be an <html> element when parsing a <frameset>.
While this assertion is true in theory and as per the specification, it does
not hold in WebKit when parsing a DocumentFragment. This is because WebKit
has an optimization causing us to have a DocumentFragment as root element
when parsing a fragment. See the following constructor:
"HTMLTreeBuilder(HTMLDocumentParser&, DocumentFragment&, Element&, ParserContentPolicy, const HTMLParserOptions&)"

which has the following code:
"""
https://html.spec.whatwg.org/multipage/syntax.html#parsing-html-fragments
For efficiency, we skip step 5 ("Let root be a new html element with no attributes") and instead use the DocumentFragment as a root node.
m_tree.openElements().pushRootNode(HTMLStackItem::create(fragment));
"""

Update the assertion to expect a DocumentFragment as root element when parsing
a fragment, and keep expecting an <html> element otherwise.

Test: fast/parser/fragment-with-frameset-crash.html

  • html/parser/HTMLTreeBuilder.cpp:

(WebCore::HTMLTreeBuilder::processStartTagForInBody):

LayoutTests:

Add layout test coverage. This test passes in all major browsers but used to hit
the bad assertion in WebKit debug builds.

  • fast/parser/fragment-with-frameset-crash-expected.txt: Added.
  • fast/parser/fragment-with-frameset-crash.html: Added.
12:28 PM Changeset in webkit [211644] by andersca@apple.com
  • 2 edits in trunk/Source/WebKit2

Inline createReceiveSource in its two call sites
https://bugs.webkit.org/show_bug.cgi?id=167809

Reviewed by Alex Christensen.

  • Platform/IPC/mac/ConnectionMac.mm:

(IPC::Connection::open):
(IPC::createReceiveSource): Deleted.

12:07 PM Changeset in webkit [211643] by Wenson Hsieh
  • 3 edits in trunk/Source/WebKit2

WKActionSheet should dismiss with animation when done with the sheet
https://bugs.webkit.org/show_bug.cgi?id=167804
<rdar://problem/30334861>

Reviewed by Tim Horton.

Currently, we do not dismiss the action menu when -doneWithSheet is invoked. While this is okay when the menu is
dismissed via tap (since it will be dismissed as default behavior by the popover controller) we need to manually
dismiss it if we are trying to programmatically dismiss the action sheet/menu.

  • UIProcess/ios/WKActionSheet.mm:

(-[WKActionSheet presentSheetFromRect:]):
(-[WKActionSheet doneWithSheet]):

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView setupInteraction]):
(-[WKContentView resignFirstResponder]):

12:00 PM Changeset in webkit [211642] by sbarati@apple.com
  • 9 edits in trunk/Source/JavaScriptCore

When OSR entering to the baseline JIT from the LLInt for a ProgramCodeBlock we can skip compiling a lot of the program
https://bugs.webkit.org/show_bug.cgi?id=167725
<rdar://problem/30339082>

Reviewed by Michael Saboff.

We often want to baseline compile ProgramCode once we hit a loop in the LLInt.
However, some programs execute a non-trivial amount of code before the loop.
This code can never be executed again because ProgramCodeBlocks never run more
than once. We're wasting time and memory by compiling code that is unreachable
from the OSR entry destination. This patch fixes this by only compiling code
that is reachable from the OSR entry destination.

This is a speedup on Kraken/ai-astar for devices with limited CPUs (I've been
testing on devices with 2 CPUs). On ai-astar, we were spending 50-100ms compiling
a huge ProgramCodeBlock in the baseline JIT where the majority of the code
would never execute. If this compilation was kicked off on the main thread,
then we'd be stalled for a long time. If it were started on the baseline JITs
background compilation thread, we'd still waste 50-100ms in that thread, causing
all other baseline compilations to happen on the main thread.

  • interpreter/Interpreter.cpp:

(JSC::Interpreter::executeProgram):

  • interpreter/Interpreter.h:
  • jit/JIT.cpp:

(JSC::JIT::JIT):
(JSC::JIT::privateCompileMainPass):

  • jit/JIT.h:

(JSC::JIT::compile):

  • jit/JITWorklist.cpp:

(JSC::JITWorklist::Plan::Plan):
(JSC::JITWorklist::Plan::compileNow):
(JSC::JITWorklist::compileLater):
(JSC::JITWorklist::compileNow):

  • jit/JITWorklist.h:
  • llint/LLIntSlowPaths.cpp:

(JSC::LLInt::jitCompileAndSetHeuristics):
(JSC::LLInt::LLINT_SLOW_PATH_DECL):

  • runtime/Completion.cpp:

(JSC::evaluate):

11:53 AM Changeset in webkit [211641] by commit-queue@webkit.org
  • 3 edits
    2 adds in trunk

[Modern Media Controls] Skip back button is visible with a live broadcast video
https://bugs.webkit.org/show_bug.cgi?id=167793

Patch by Antoine Quint <Antoine Quint> on 2017-02-03
Reviewed by Eric Carlson.

Source/WebCore:

We shouldn't be showing the skip back button when a live broadcast video is playing.
We now listen to the "durationchange" event to determine when we have an inifinite-duration
video and disable the skip button in that case.

Test: http/tests/media/modern-media-controls/skip-back-support/skip-back-support-live-broadcast.html

  • Modules/modern-media-controls/media/skip-back-support.js:

(SkipBackSupport.prototype.get mediaEvents):
(SkipBackSupport.prototype.syncControl):
(SkipBackSupport):

LayoutTests:

Add a new test to check that a live broadcast video doesn't show the skip back button.

  • http/tests/media/modern-media-controls/skip-back-support/skip-back-support-live-broadcast-expected.txt: Added.
  • http/tests/media/modern-media-controls/skip-back-support/skip-back-support-live-broadcast.html: Added.
11:08 AM Changeset in webkit [211640] by Matt Baker
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Add stroke-linecap property values to CSS autocompletion
https://bugs.webkit.org/show_bug.cgi?id=167778

Reviewed by Joseph Pecoraro.

  • UserInterface/Models/CSSKeywordCompletions.js:

Add autocompletion values for fill-rule and stroke-linecap.

10:45 AM Changeset in webkit [211639] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit2

Doc generation failure in WebKitSecurityOrigin
https://bugs.webkit.org/show_bug.cgi?id=167796

Patch by Olivier Blin <Olivier Blin> on 2017-02-03
Reviewed by Michael Catanzaro.

  • UIProcess/API/gtk/WebKitSecurityOrigin.cpp:

warning: Free-form return value description in webkit_security_origin_get_protocol. Use `Returns:' to avoid ambiguities.

9:44 AM Changeset in webkit [211638] by achristensen@apple.com
  • 7 edits in trunk

URLParser: implement forbidden host code points for non-special URLs
https://bugs.webkit.org/show_bug.cgi?id=167779

Reviewed by Chris Dumez.

LayoutTests/imported/w3c:

  • web-platform-tests/url/a-element-expected.txt:
  • web-platform-tests/url/a-element-xhtml-expected.txt:
  • web-platform-tests/url/url-constructor-expected.txt:
  • web-platform-tests/url/url-setters-expected.txt:

Source/WebCore:

Covered by newly passing web platform tests.

  • platform/URLParser.cpp:

(WebCore::isC0Control):
(WebCore::isForbiddenHostCodePoint):
(WebCore::URLParser::parseHostAndPort):
In non-special URL hosts such as customprotocol://strange%host
don't accept characters that are part of the URL grammar and would be forbidden
in a special URL host, like https://not[allowed
This was recently added to the spec in https://github.com/whatwg/url/issues/214

9:39 AM Changeset in webkit [211637] by pvollan@apple.com
  • 3 edits
    2 adds in trunk

The CSS property -webkit-text-stroke is not applied on captions.
https://bugs.webkit.org/show_bug.cgi?id=167687

Reviewed by Brent Fulgham.

Source/WebCore:

Add style to list of valid properties for cue.

Test: media/track/track-css-stroke-cues.html

  • css/StyleResolver.cpp:

(WebCore::StyleResolver::isValidCueStyleProperty):

LayoutTests:

  • media/track/track-css-stroke-cues-expected.txt: Added.
  • media/track/track-css-stroke-cues.html: Added.
9:30 AM WebKitGTK/2.14.x edited by Michael Catanzaro
Remove last proposal, not ready for this yet (diff)
9:28 AM WebKitGTK/2.14.x edited by Michael Catanzaro
(diff)
9:21 AM Changeset in webkit [211636] by achristensen@apple.com
  • 6 edits in trunk

Align URL setters with spec for URLs that cannot be a base URL
https://bugs.webkit.org/show_bug.cgi?id=167783

Reviewed by Chris Dumez.

LayoutTests/imported/w3c:

  • web-platform-tests/url/url-setters-expected.txt:

Source/WebCore:

Setting things like credentials on mailto URLs doesn't make sense.
It's forbidden by the spec.

Covered by newly passing web platform tests.

  • html/URLUtils.h:

(WebCore::URLUtils<T>::setUsername):
(WebCore::URLUtils<T>::setPassword):
(WebCore::URLUtils<T>::setHost):
(WebCore::URLUtils<T>::setHostname):
(WebCore::URLUtils<T>::setPort):
(WebCore::URLUtils<T>::setPathname):

  • platform/URL.cpp:

(WebCore::URL::serialize):

  • platform/URL.h:

(WebCore::URL::cannotBeABaseURL):

9:21 AM Changeset in webkit [211635] by Konstantin Tokarev
  • 2 edits in trunk

[CMake] RelWithDebInfo builds are super broken at runtime
https://bugs.webkit.org/show_bug.cgi?id=163897

Reviewed by Michael Catanzaro.

  • Source/cmake/OptionsCommon.cmake: Apply -fno-strict-aliasing,

-fno-exceptions, and -fno-rtti flags to all configurations,
instead of only "Release".

9:11 AM Changeset in webkit [211634] by eric.carlson@apple.com
  • 2 edits
    4 adds in trunk/Source/WebCore

[Mac] Add classes to manage audio samples
https://bugs.webkit.org/show_bug.cgi?id=167739

Reviewed by Jer Noble.

No new tests, this code isn't used yet.

  • WebCore.xcodeproj/project.pbxproj:
  • platform/audio/mac/AudioSampleBufferList.cpp: Added.

(WebCore::AudioSampleBufferList::create):
(WebCore::AudioSampleBufferList::AudioSampleBufferList):
(WebCore::AudioSampleBufferList::~AudioSampleBufferList):
(WebCore::AudioSampleBufferList::setSampleCount):
(WebCore::AudioSampleBufferList::applyGain):
(WebCore::AudioSampleBufferList::mixFrom):
(WebCore::AudioSampleBufferList::copyFrom):
(WebCore::AudioSampleBufferList::copyTo):
(WebCore::AudioSampleBufferList::reset):
(WebCore::AudioSampleBufferList::zero):
(WebCore::AudioSampleBufferList::zeroABL):
(WebCore::AudioSampleBufferList::convertInput):
(WebCore::AudioSampleBufferList::audioConverterCallback):
(WebCore::AudioSampleBufferList::configureBufferListForStream):

  • platform/audio/mac/AudioSampleBufferList.h: Added.

(WebCore::AudioSampleBufferList::streamDescription):
(WebCore::AudioSampleBufferList::bufferList):
(WebCore::AudioSampleBufferList::sampleCapacity):
(WebCore::AudioSampleBufferList::sampleCount):
(WebCore::AudioSampleBufferList::timestamp):
(WebCore::AudioSampleBufferList::hostTime):
(WebCore::AudioSampleBufferList::setTimes):
(WebCore::AudioSampleBufferList::audioBufferListSizeForStream):

  • platform/audio/mac/AudioSampleDataSource.cpp: Added.

(WebCore::AudioSampleDataSource::create):
(WebCore::AudioSampleDataSource::AudioSampleDataSource):
(WebCore::AudioSampleDataSource::~AudioSampleDataSource):
(WebCore::AudioSampleDataSource::setPaused):
(WebCore::AudioSampleDataSource::setupConverter):
(WebCore::AudioSampleDataSource::setInputFormat):
(WebCore::AudioSampleDataSource::setOutputFormat):
(WebCore::AudioSampleDataSource::hostTime):
(WebCore::AudioSampleDataSource::pushSamplesInternal):
(WebCore::AudioSampleDataSource::pushSamples):
(WebCore::AudioSampleDataSource::pullSamplesInternal):
(WebCore::AudioSampleDataSource::pullSamples):

  • platform/audio/mac/AudioSampleDataSource.h: Added.

(WebCore::AudioSampleDataSource::setVolume):
(WebCore::AudioSampleDataSource::volume):
(WebCore::AudioSampleDataSource::setMuted):
(WebCore::AudioSampleDataSource::muted):

6:21 AM Changeset in webkit [211633] by Carlos Garcia Campos
  • 3 edits in trunk/Source/WebCore

Unreviewed. Fix the buidl after r211631.

I added the OS(LINUX) ifdef to the wrong file by mistake.

  • page/ResourceUsageThread.h:
  • page/linux/ResourceUsageThreadLinux.cpp:
5:04 AM Changeset in webkit [211632] by Csaba Osztrogonác
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed typo fix after r211630.

  • CMakeLists.txt:
5:03 AM Changeset in webkit [211631] by Carlos Garcia Campos
  • 16 edits
    3 adds in trunk

[GTK] Add initial implementation of resource usage overlay
https://bugs.webkit.org/show_bug.cgi?id=167731

Reviewed by Michael Catanzaro.

.:

Enable RESOURCE_USAGE.

  • Source/cmake/OptionsGTK.cmake:

Source/JavaScriptCore:

Also expose nextFireTime() for GTK+ port.

  • heap/GCActivityCallback.cpp:

(JSC::GCActivityCallback::scheduleTimer):
(JSC::GCActivityCallback::cancelTimer):

  • heap/GCActivityCallback.h:

Source/WebCore:

Add an implementation of ResourceUsageOverlay and ResourceUsageThread for Linux systems.

  • PlatformGTK.cmake: Add new new files to compilation.
  • page/Page.cpp:

(WebCore::Page::setResourceUsageOverlayVisible): Do not create the page overlay if accelerated compositing is
not enabled.

  • page/ResourceUsageOverlay.h:
  • page/linux/ResourceUsageOverlayLinux.cpp: Added.

(WebCore::cpuUsageString):
(WebCore::formatByteNumber):
(WebCore::gcTimerString):
(WebCore::ResourceUsageOverlay::platformInitialize):
(WebCore::ResourceUsageOverlay::platformDestroy):

  • page/linux/ResourceUsageThreadLinux.cpp: Added.

(WebCore::cpuPeriod):
(WebCore::cpuUsage):
(WebCore::ResourceUsageThread::platformThreadBody):

Source/WebKit2:

Toggle the resource usage overlay visibility by pressing CTRL + Shift + G. Only available when building with
developer mode enabled.

  • UIProcess/API/gtk/WebKitWebViewBase.cpp:

(webkitWebViewBaseKeyPressEvent):

Source/WTF:

Enable RESOURCE_USAGE for GTK+ port too.

  • wtf/Platform.h:

LayoutTests:

Unskip inpector tests depending on RESOURCE_USAGE.

  • platform/gtk/TestExpectations:
4:56 AM Changeset in webkit [211630] by Csaba Osztrogonác
  • 2 edits in trunk/Source/JavaScriptCore

[cmake] Unreviewed AArch64 buildfix after r211603.
https://bugs.webkit.org/show_bug.cgi?id=167714

  • CMakeLists.txt:
4:40 AM Changeset in webkit [211629] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit2

REGRESSION(r211486) [GTK] The MiniBrowser doesn't work anymore.
https://bugs.webkit.org/show_bug.cgi?id=167776

Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2017-02-03
Reviewed by Yusuke Suzuki.

Since r211486 JSC::initializeThreading() also initializes the main run loop. It would be possible that RunLoop
need to know if it's the main one or not in its constructor, like the GLib impementation does, so we need to
ensure that WTF threading and MainThread are initialized before creating the main RunLoop. This is a quick fix
because the regression made impossible to load anything in a WebView, but I think we should review all the
initialize methods, what they do and how they are called in all the code.

  • Shared/WebKit2Initialize.cpp:

(WebKit::InitializeWebKit2): Call WTF::initializeThreading() and WTF::initializeMainThread() before
JSC::initializeThreading() and do not call RunLoop::initializeMainRunLoop() because it's already called by JSC.

4:21 AM WebKitGTK/2.14.x edited by Michael Catanzaro
(diff)
4:21 AM Changeset in webkit [211628] by Csaba Osztrogonác
  • 2 edits in trunk/Source/WebKit2

[Mac][cmake] One more unreviewed speculative buildfix after r211403.
https://bugs.webkit.org/show_bug.cgi?id=165478

  • UIProcess/API/Cocoa/WKWebView.mm: WebSQLiteDatabaseTrackerClient.h is an iOS specific

header in platform/ios directory which shouldn't and can't be included on non iOS build.

4:03 AM Changeset in webkit [211627] by eocanha@igalia.com
  • 3 edits in trunk/Source/WebCore

[GStreamer] Store preloaded media in webkit's cache
https://bugs.webkit.org/show_bug.cgi?id=119477

Reviewed by Xabier Rodriguez-Calvar.

Files cached on disk by MediaPlayerPrivateGStreamer are deleted only when the player is closed. If the
WebProcess crashed, they're just left there in the cache directory. This patch changes the location
of those temporary files to a proper temporary directory (/var/tmp, as those files aren't actually
reusable, so they don't belong to a cache directory, and /tmp is a bad place because it's RAM-based on
some distros), unlinks (deletes) them right after creation and also deletes any other stalled temporary
file on the old legacy cache directory.

There's no API in GstPlaybin to control the temporary file location, so we do it manually by locating
the GstDownloadBuffer element in the pipeline as soon as it's created, reconfiguring it with the right
temporary file path and deleting the file as soon as it's created.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:

(WebCore::MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer): Stop listening to element-added.
(WebCore::MediaPlayerPrivateGStreamer::uriDecodeBinElementAddedCallback): Look for GstDownloadBuffer.
(WebCore::MediaPlayerPrivateGStreamer::downloadBufferFileCreatedCallback): Remove the file after creation.
(WebCore::MediaPlayerPrivateGStreamer::purgeOldDownloadFiles): Delete legacy files.
(WebCore::MediaPlayerPrivateGStreamer::sourceChanged): Listen to element-added signals on GstUriDecodeBin.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h: New reference to GstDownloadBuffer.
3:53 AM Changeset in webkit [211626] by Csaba Osztrogonác
  • 2 edits in trunk/Source/WebKit2

[Mac][cmake] Unreviewed speculative buildfix after r211403.
https://bugs.webkit.org/show_bug.cgi?id=165478

  • UIProcess/API/Cocoa/WKWebView.mm: WebBackgroundTaskController.h is an iOS specific

header in platform/ios directory which shouldn't and can't be included on non iOS build.

3:12 AM Changeset in webkit [211625] by Antti Koivisto
  • 2 edits in trunk/Source/WebCore

WebContent crash when pasting into input fields at com.apple.WebCore: WebCore::ResourceRequestBase::url const + 9
https://bugs.webkit.org/show_bug.cgi?id=167787
rdar://problem/29168795

Reviewed by Andreas Kling.

No test, don't know how to get here.

  • page/animation/CSSPropertyAnimation.cpp:

(WebCore::crossfadeBlend): Null check.

2:23 AM Changeset in webkit [211624] by berto@igalia.com
  • 2 edits in trunk/Source/WebCore

JSDOMWindowBase.cpp doesn't build if the JIT is disabled
https://bugs.webkit.org/show_bug.cgi?id=167785

Reviewed by Carlos Garcia Campos.

r211403 moved GetCallerGlobalObjectFunctor from JSDOMBinding.cpp
to JSDOMWindowBase.cpp, but forgot to include bytecode/CodeBlock.h
in the latter file.

This breaks the build if the JIT is disabled because the headers
that would include ClodeBlock.h indirectly are guarded by
ENABLE(JIT).

  • bindings/js/JSDOMWindowBase.cpp:
1:05 AM Changeset in webkit [211623] by commit-queue@webkit.org
  • 2 edits in trunk/LayoutTests

LayoutTest media/modern-media-controls/tracks-panel/tracks-panel-hide-click-outside.html is a flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=165290

Unreviewed test gardening.

Patch by Antoine Quint <Antoine Quint> on 2017-02-03

  • platform/mac/TestExpectations:

Feb 2, 2017:

11:25 PM Changeset in webkit [211622] by akling@apple.com
  • 19 edits
    2 copies in trunk/Source

[Mac] In-process memory pressure monitor for WebContent processes AKA websam
<https://webkit.org/b/167491>
<rdar://problem/30116072>

Reviewed by Antti Koivisto.

Source/JavaScriptCore:

Remove the sloppy "max live heap size" mechanism from JSC in favor of the new
WebCore-side memory footprint monitor.

  • heap/Heap.cpp:

(JSC::Heap::updateAllocationLimits):
(JSC::Heap::didExceedMaxLiveSize): Deleted.

  • heap/Heap.h:

(JSC::Heap::setMaxLiveSize): Deleted.

Source/WebCore:

Add a new timer-based memory pressure monitor that checks the process memory
footprint every 30 seconds and reacts to changes by setting a MemoryUsagePolicy.

There are four MemoryUsagePolicy values:

  • Unrestricted (below 1GB)
  • Conservative (above 1GB)
  • Strict (above 2GB)
  • Panic (above 4GB, or 3GB if 32-bit)

For Strict and above, the old-style "isUnderMemoryPressure()" API will return true.

Transitioning to a higher policy will cause memory pressure handlers to run:

At Strict, we run the "non-critical" memory pressure handler, then carry on.

At Panic, we run the "critical" memory pressure handler. If that fails to recover
enough memory to bring us back below 4GB, we may kill the process:

A process is eligible to get killed for using too much memory if:

  • It's not visible on screen (i.e it's a background tab.)
  • It's not playing audio.
  • It has not performed a main frame navigation in the last hour.

Before killing the process, an exit-time callback will run. This patch installs such
a callback that prints out some time-of-death statistics about C++ and JavaScript memory
usage to hopefully help understand what was soaking up all the memory.

  • bindings/js/CommonVM.cpp:

(WebCore::commonVMSlow):

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::setState):

  • page/MainFrame.cpp:

(WebCore::MainFrame::didCompleteLoad):

  • page/MainFrame.h:
  • page/MemoryRelease.cpp:

(WebCore::pageCount):
(WebCore::logMemoryStatisticsAtTimeOfDeath):
(WebCore::didExceedMemoryLimitAndFailedToRecover):
(WebCore::processIsEligibleForMemoryKill):

  • page/MemoryRelease.h:
  • page/ResourceUsageThread.h:
  • page/cocoa/ResourceUsageThreadCocoa.mm:

(WebCore::vmPageSize):

  • platform/MemoryPressureHandler.cpp:

(WebCore::MemoryPressureHandler::MemoryPressureHandler):
(WebCore::MemoryPressureHandler::setShouldUsePeriodicMemoryMonitor):
(WebCore::toString):
(WebCore::thresholdForPolicy):
(WebCore::policyForFootprint):
(WebCore::MemoryPressureHandler::measurementTimerFired):

  • platform/MemoryPressureHandler.h:

(WebCore::MemoryPressureHandler::setMemoryKillCallback):
(WebCore::MemoryPressureHandler::setProcessIsEligibleForMemoryKillCallback):
(WebCore::MemoryPressureHandler::isUnderMemoryPressure):

Source/WebKit2:

Enable the in-process memory monitor for WebContent processes on macOS 10.12+

  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::initializeWebProcess):

Source/WTF:

Add a WTF helper function for getting the current process's memory footprint.

  • WTF.xcodeproj/project.pbxproj:
  • wtf/CMakeLists.txt:
  • wtf/MemoryFootprint.cpp:

(WTF::memoryFootprint):

  • wtf/MemoryFootprint.h:
10:30 PM Changeset in webkit [211621] by achristensen@apple.com
  • 5 edits in trunk

URLParser: Fix parsing invalid IPv4 addresses with non-ASCII characters
https://bugs.webkit.org/show_bug.cgi?id=167773
<rdar://problem/30221102>

Reviewed by Ryosuke Niwa.

Source/WebCore:

If an invalid IPv4 address contains the first syntaxViolation (difference between input and canonicalized URL),
an iterator is used to calculate how far we have parsed in the input string to copy all the syntax-violation-free
characters into a Vector. If a URL contains only ASCII that doesn't contain anything percent-encoded in the host,
there is a fast path to parse ASCII hosts. All my existing invalid IPv4 tests followed this path.
If there is a non-ASCII character, we need to use an iterator to the original string instead of an iterator
to the string after converting the input string's host to ASCII.

Covered by a new API test which used to RELEASE_ASSERT.

  • platform/URLParser.cpp:

(WebCore::URLParser::parseIPv4Host):
(WebCore::URLParser::parseIPv6Host):
(WebCore::URLParser::parseHostAndPort):

  • platform/URLParser.h:

Tools:

  • TestWebKitAPI/Tests/WebCore/URLParser.cpp:

(TestWebKitAPI::TEST_F):

10:25 PM WebKitGTK/2.14.x edited by Carlos Garcia Campos
(diff)
10:20 PM Changeset in webkit [211620] by achristensen@apple.com
  • 18 edits
    2 adds in trunk/LayoutTests/imported/w3c

Update URL web platform tests
https://bugs.webkit.org/show_bug.cgi?id=167777

Reviewed by Ryosuke Niwa.

  • web-platform-tests/url/a-element-expected.txt:
  • web-platform-tests/url/a-element-origin-expected.txt:
  • web-platform-tests/url/a-element-origin-xhtml-expected.txt:
  • web-platform-tests/url/a-element-origin-xhtml.xhtml:
  • web-platform-tests/url/a-element-origin.html:
  • web-platform-tests/url/a-element-xhtml-expected.txt:
  • web-platform-tests/url/a-element-xhtml.xhtml:
  • web-platform-tests/url/a-element.html:
  • web-platform-tests/url/setters_tests.json:
  • web-platform-tests/url/url-constructor-expected.txt:
  • web-platform-tests/url/url-origin-expected.txt:
  • web-platform-tests/url/url-setters-expected.txt:
  • web-platform-tests/url/urlencoded-parser-expected.txt: Added.
  • web-platform-tests/url/urlencoded-parser.html: Added.
  • web-platform-tests/url/urlsearchparams-constructor-expected.txt:
  • web-platform-tests/url/urlsearchparams-constructor.html:
  • web-platform-tests/url/urlsearchparams-sort-expected.txt:
  • web-platform-tests/url/urlsearchparams-sort.html:
  • web-platform-tests/url/urltestdata.json:
8:50 PM Changeset in webkit [211619] by bshafiei@apple.com
  • 6 edits in tags/Safari-604.1.5.3.1/Source

Versioning.

8:46 PM Changeset in webkit [211618] by bshafiei@apple.com
  • 1 copy in tags/Safari-604.1.5.3.1

New tag.

5:54 PM Changeset in webkit [211617] by matthew_hanson@apple.com
  • 5 edits in branches/safari-603-branch/Source

Versioning.

5:46 PM Changeset in webkit [211616] by ap@apple.com
  • 16 edits
    2 moves
    2 adds
    2 deletes in trunk/LayoutTests

Multiple HTTP tests fail with Apache 2.4.25
https://bugs.webkit.org/show_bug.cgi?id=167678
<rdar://problem/30060142>

Reviewed by Sam Weinig.

Newer versions of Apache have a security fix where they generate an internal server
error upon seeing an invalid HTTP header field. There is an opt-out configuration
option which didn't quite work in my testing, but regardless, we should only use
"nph-" CGIs for invalid responses. This is how Apache knows that it shouldn't
attempt to parse the response.

This also uncovered a test bug.

  • http/tests/cache/disk-cache/resources/cache-test.js: (generateTestURL):

Without escaping, we were getting a broken response in attachment tests:

Content-Disposition: attachment

filename: "f.txt"

Note how ";" turned into a newline.

  • http/tests/misc/non-utf8-header-name-expected.txt: Removed.
  • http/tests/misc/non-utf8-header-name.php: Removed.
  • http/tests/misc/nph-non-utf8-header-name-expected.txt: Copied from LayoutTests/http/tests/misc/non-utf8-header-name-expected.txt.
  • http/tests/misc/nph-non-utf8-header-name.pl: Copied from LayoutTests/http/tests/misc/non-utf8-header-name.php.
  • http/tests/preload/download_resources_from_invalid_headers.html:
  • http/tests/preload/resources/invalid_resources_from_header.php: Removed.
  • http/tests/preload/resources/nph-invalid_resources_from_header.pl: Copied from LayoutTests/http/tests/preload/resources/invalid_resources_from_header.php.
  • http/tests/security/contentSecurityPolicy/directive-parsing-01.html:
  • http/tests/security/contentSecurityPolicy/directive-parsing-02.html:
  • http/tests/security/contentSecurityPolicy/directive-parsing-03.html:
  • http/tests/security/contentSecurityPolicy/directive-parsing-04.html:
  • http/tests/security/contentSecurityPolicy/directive-parsing-05.html:
  • http/tests/security/contentSecurityPolicy/resources/echo-script-src.pl: Removed.
  • http/tests/security/contentSecurityPolicy/resources/multiple-iframe-test.js:
  • http/tests/security/contentSecurityPolicy/resources/nph-echo-script-src.pl: Copied from LayoutTests/http/tests/security/contentSecurityPolicy/resources/echo-script-src.pl.
  • http/tests/security/contentSecurityPolicy/script-loads-with-img-src.html:
  • http/tests/security/contentSecurityPolicy/script-src-none.html:
  • http/tests/security/contentSecurityPolicy/script-src-self-blocked-01.html:
  • http/tests/security/contentSecurityPolicy/script-src-self-blocked-02.html:
  • http/tests/security/contentSecurityPolicy/script-src-self-blocked-03.html:
  • http/tests/security/contentSecurityPolicy/script-src-self.html:
  • http/tests/security/contentSecurityPolicy/script-src-star-cross-scheme.html:

Changed scripts that are used to generate invalid responses to "nph-" ones.

5:36 PM Changeset in webkit [211615] by matthew_hanson@apple.com
  • 6 edits in branches/safari-604.1.5-branch/Source

Versioning.

5:15 PM Changeset in webkit [211614] by matthew_hanson@apple.com
  • 1 copy in tags/Safari-604.1.5.3

Tag Safari-604.1.5.3.

5:01 PM Changeset in webkit [211613] by Wenson Hsieh
  • 2 edits in trunk/Source/WebCore

CrashTracer: [USER] com.apple.WebKit.WebContent at com.apple.WebCore: WebCore::URL::host const + 9
https://bugs.webkit.org/show_bug.cgi?id=167766
<rdar://problem/30132707>

Reviewed by Chris Dumez.

The mainframe's document pointer may be null when tearing down a page upon navigation to a page that is in the
page cache. If this triggers a GC sweep, we will attempt to reload touch bar media controls, which (as a part of
the media controller heuristic) checks the mainframe's document URL to see if quirks should be enabled. This
assumes that the mainframe's document exists, which is not a safe assumption if page navigation is occurring. As
such, we need a null check for the mainframe's document in needsPlaybackControlsManagerQuirk().

No test, as we were unable to reproduce this crash.

  • html/HTMLMediaElement.cpp:

(WebCore::needsPlaybackControlsManagerQuirk):

5:00 PM Changeset in webkit [211612] by Chris Dumez
  • 9 edits
    2 adds in trunk

Suspend SVG animations in hidden pages
https://bugs.webkit.org/show_bug.cgi?id=167763
<rdar://problem/29986313>

Reviewed by Simon Fraser.

Source/WebCore:

Suspend SVG animations in hidden pages to save power, similarly to what
we already do for another types of animations.

Test: svg/animations/animations-paused-page-non-visible.html

  • page/Page.cpp:

(WebCore::setSVGAnimationSuspended):
(WebCore::Page::setIsVisibleInternal):

  • svg/SVGDocumentExtensions.cpp:

(WebCore::SVGDocumentExtensions::pauseAnimations):
(WebCore::SVGDocumentExtensions::unpauseAnimations):

  • svg/SVGDocumentExtensions.h:

(WebCore::SVGDocumentExtensions::areAnimationsPaused):

  • testing/Internals.cpp:

(WebCore::Internals::areSVGAnimationsPaused):

  • testing/Internals.h:
  • testing/Internals.idl:

LayoutTests:

Add layout test coverage.

  • svg/animations/animations-paused-page-non-visible-expected.txt: Added.
  • svg/animations/animations-paused-page-non-visible.html: Added.
4:53 PM Changeset in webkit [211611] by matthew_hanson@apple.com
  • 1 copy in tags/Safari-603.1.24

Tag Safari-603.1.24.

4:35 PM Changeset in webkit [211610] by Ryan Haddad
  • 2 edits
    4 deletes in trunk/Source/WebCore

Unreviewed, rolling out r211596 and r211605.
https://bugs.webkit.org/show_bug.cgi?id=167767

This change broke certain build configurations (Requested by
ryanhaddad on #webkit).

Reverted changesets:

"[Mac] Add classes to manage audio samples"
https://bugs.webkit.org/show_bug.cgi?id=167739
http://trac.webkit.org/changeset/211596

"Unreviewed speculative build fix."
http://trac.webkit.org/changeset/211605

Patch by Commit Queue <commit-queue@webkit.org> on 2017-02-02

4:26 PM Changeset in webkit [211609] by mark.lam@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Add a SIGILL crash analyzer to make debugging SIGILLs easier.
https://bugs.webkit.org/show_bug.cgi?id=167714
<rdar://problem/30318237>

Not reviewed.

Build fix for CLOOP build.

  • tools/VMInspector.cpp:
4:22 PM Changeset in webkit [211608] by commit-queue@webkit.org
  • 7 edits in trunk/Source/WebInspectorUI

Web Inspector: can't jump from Search Tab result to see resource in other tabs (Resource, Debugger, Network)
https://bugs.webkit.org/show_bug.cgi?id=167072

Patch by Devin Rousso <Devin Rousso> on 2017-02-02
Reviewed by Timothy Hatcher.

  • UserInterface/Base/Main.js:

(WebInspector.tabContentViewForRepresentedObject):
(WebInspector.showRepresentedObject):
(WebInspector.showMainFrameDOMTree):
(WebInspector.showSourceCodeForFrame):
(WebInspector.showSourceCode):
(WebInspector.showSourceCodeLocation):
(WebInspector.showOriginalUnformattedSourceCodeLocation):
(WebInspector.showOriginalOrFormattedSourceCodeLocation):
(WebInspector.showOriginalOrFormattedSourceCodeTextRange):
(WebInspector.showResourceRequest):
Rework parameters to add optional options dictionary that can be used to indicate
additional functionality.

  • UserInterface/Views/TabBrowser.js:

(WebInspector.TabBrowser.prototype.bestTabContentViewForRepresentedObject):
Ignore instances of SearchTabContentView as it can display content views for all types of
searchable data. Determined by a newly added optional options parameter.

  • UserInterface/Base/Utilities.js:

(Object.shallowMerge):
Merges the keys of two objects into a new one.

  • UserInterface/Views/ComputedStyleDetailsPanel.js:

(WebInspector.ComputedStyleDetailsPanel.prototype._goToRegionFlowArrowWasClicked):
(WebInspector.ComputedStyleDetailsPanel.prototype._goToContentFlowArrowWasClicked):

  • UserInterface/Views/SearchSidebarPanel.js:

(WebInspector.SearchSidebarPanel.prototype.performSearch.createTreeElementForMatchObject):
(WebInspector.SearchSidebarPanel.prototype.performSearch.resourceCallback):
(WebInspector.SearchSidebarPanel.prototype.performSearch.resourcesCallback):
(WebInspector.SearchSidebarPanel.prototype.performSearch.searchScripts.scriptCallback):
(WebInspector.SearchSidebarPanel.prototype.performSearch.searchScripts):
(WebInspector.SearchSidebarPanel.prototype.performSearch.domSearchResults):
(WebInspector.SearchSidebarPanel.prototype.performSearch.domCallback):
(WebInspector.SearchSidebarPanel.prototype.performSearch):
(WebInspector.SearchSidebarPanel.prototype._treeElementDoubleClick):

  • UserInterface/Views/TreeElement.js:

(WebInspector.TreeElement.treeElementDoubleClicked):
Add an event dispatch whenever a TreeElement is double clicked via the dblclick event.

4:15 PM Changeset in webkit [211607] by achristensen@apple.com
  • 2 edits in trunk

Build fix after r211602
https://bugs.webkit.org/show_bug.cgi?id=167758

  • Source/Makefile:

Don't build libwebrtc by default. It's not used yet anyway.

4:09 PM Changeset in webkit [211606] by ap@apple.com
  • 2 edits in trunk/Tools

Remove check for SkipSafariExecutableEntitlementChecks
https://bugs.webkit.org/show_bug.cgi?id=167762
rdar://problem/22480673

Reviewed by Dan Bernstein.

  • Scripts/webkitdirs.pm:

(safariPathFromSafariBundle):
(skipSafariExecutableEntitlementChecks): Deleted.

4:05 PM Changeset in webkit [211605] by Ryan Haddad
  • 2 edits in trunk/Source/WebCore

Unreviewed speculative build fix.

  • platform/audio/mac/AudioSampleDataSource.cpp:

(WebCore::AudioSampleDataSource::setupConverter):
(WebCore::AudioSampleDataSource::pushSamples):

3:39 PM Changeset in webkit [211604] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit2

Unreviewed, rolling out r211535, r211566, and r211568.
https://bugs.webkit.org/show_bug.cgi?id=167765

Causing timeouts? (Requested by andersca_ on #webkit).

Reverted changesets:

"IPC::Connection receive ports should be guarded"
https://bugs.webkit.org/show_bug.cgi?id=167704
http://trac.webkit.org/changeset/211535

"<rdar://problem/30323148> Webkit Nightly on 10.10 broken"
http://trac.webkit.org/changeset/211566

"<rdar://problem/30323148> Webkit Nightly on 10.10 broken"
http://trac.webkit.org/changeset/211568

3:32 PM Changeset in webkit [211603] by mark.lam@apple.com
  • 17 edits
    5 adds in trunk/Source

Add a SIGILL crash analyzer to make debugging SIGILLs easier.
https://bugs.webkit.org/show_bug.cgi?id=167714
<rdar://problem/30318237>

Reviewed by Filip Pizlo.

Source/JavaScriptCore:

The current implementation is only for X86_64 and ARM64 on OS(DARWIN). The
analyzer is not enabled for all other ports.

  • CMakeLists.txt:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • API/JSVirtualMachine.mm:
  • assembler/ARM64Assembler.h:

(JSC::ARM64Assembler::illegalInstruction):

  • assembler/MacroAssemblerARM64.h:

(JSC::MacroAssemblerARM64::illegalInstruction):

  • assembler/MacroAssemblerX86Common.h:

(JSC::MacroAssemblerX86Common::illegalInstruction):

  • assembler/X86Assembler.h:

(JSC::X86Assembler::illegalInstruction):

  • heap/Heap.cpp:

(JSC::Heap::forEachCodeBlockIgnoringJITPlansImpl):

  • heap/Heap.h:
  • heap/HeapInlines.h:

(JSC::Heap::forEachCodeBlockIgnoringJITPlans):

  • runtime/Options.cpp:

(JSC::Options::isAvailable):
(JSC::recomputeDependentOptions):

  • runtime/Options.h:
  • runtime/VM.cpp:

(JSC::VM::VM):
(JSC::VM::~VM):

  • runtime/VM.h:
  • tools/SigillCrashAnalyzer.cpp: Added.

(JSC::SignalContext::SignalContext):
(JSC::SignalContext::dump):
(JSC::handleCrash):
(JSC::initializeCrashHandler):
(JSC::ensureSigillCrashAnalyzer):
(JSC::SigillCrashAnalyzer::analyze):
(JSC::SigillCrashAnalyzer::dumpCodeBlock):

  • tools/SigillCrashAnalyzer.h: Added.
  • tools/VMInspector.cpp: Added.

(JSC::VMInspector::instance):
(JSC::VMInspector::add):
(JSC::VMInspector::remove):
(JSC::ensureIsSafeToLock):

  • tools/VMInspector.h: Added.

(JSC::VMInspector::iterate):

Source/WTF:

  • wtf/StdLibExtras.h:
3:31 PM Changeset in webkit [211602] by achristensen@apple.com
  • 5 edits
    6 adds in trunk/Source

Build libwebrtc and dependencies with Xcode
https://bugs.webkit.org/show_bug.cgi?id=167758

Reviewed by Dean Jackson.

Source/ThirdParty/libwebrtc:

  • Configurations: Added.
  • Configurations/Base.xcconfig: Added.
  • Configurations/DebugRelease.xcconfig: Added.
  • Configurations/boringssl.xcconfig: Added.
  • Configurations/libwebrtc.xcconfig: Added.
  • Configurations/opus.xcconfig: Added.
  • libwebrtc.xcodeproj/project.pbxproj:

Source/WebCore:

  • WebCore.xcodeproj/project.pbxproj:
3:21 PM Changeset in webkit [211601] by Megan Gardner
  • 3 edits in trunk/Source/WebKit2

Don't attempt wide gammut on older OSes
https://bugs.webkit.org/show_bug.cgi?id=167754
<rdar://problem/29931587>

Reviewed by Tim Horton.

We need to guard our extended color checks the same way throughout the code, or we will attempt to set up
support for wide gamut partially, which causes crashes when using sharable bitmap.

  • WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:

(WebKit::convertImageToBitmap):

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::getPositionInformation):

3:18 PM Changeset in webkit [211600] by Chris Dumez
  • 14 edits in trunk

{}.toString.call(crossOriginWindow) should return "[object Object]"
https://bugs.webkit.org/show_bug.cgi?id=167701
<rdar://problem/30330797>

Reviewed by Keith Miller.

LayoutTests/imported/w3c:

Rebaseline W3C test now that one more check is passing.

  • web-platform-tests/html/browsers/origin/cross-origin-objects/cross-origin-objects-expected.txt:

Source/JavaScriptCore:

Have JSProxy forward toStringName calls to its target so Window
can override it.

  • runtime/JSProxy.cpp:

(JSC::JSProxy::toStringName):

  • runtime/JSProxy.h:

Source/WebCore:

{}.toString.call() to should "[object Object] for cross origin
Window / Location objects. This new behavior is consistent with
Firefox and Chrome.

No new tests, rebaselined existing tests.

  • bindings/js/JSDOMWindowCustom.cpp:

(WebCore::JSDOMWindow::toStringName):

  • bindings/js/JSLocationCustom.cpp:

(WebCore::JSLocation::toStringName):

  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateHeader):

  • bindings/scripts/IDLAttributes.txt:
  • page/DOMWindow.idl:
  • page/Location.idl:

LayoutTests:

Rebaselined existing test now that more checks are passing.

  • http/tests/security/symbols-cross-origin-expected.txt:
3:15 PM Changeset in webkit [211599] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Mark inspector/debugger/breakpoint-scope.html as flaky on macOS debug.
https://bugs.webkit.org/show_bug.cgi?id=164293

Unreviewed test gardening.

  • platform/mac/TestExpectations:
3:12 PM Changeset in webkit [211598] by enrica@apple.com
  • 2 edits in trunk/Source/WebKit2

WK2: cannot tap on candidate view with hardware keyboard.
https://bugs.webkit.org/show_bug.cgi?id=167761
rdar://problem/28775395

Reviewed by Tim Horton.

The candidate view is a subview of the view returned by
automaticallySelectedOverlay and it should be the unscaled view
instead of the WKContentView.

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView automaticallySelectedOverlay]):

3:03 PM Changeset in webkit [211597] by Wenson Hsieh
  • 26 edits in trunk/Source

Drag images should be anchored to the mouse location
https://bugs.webkit.org/show_bug.cgi?id=167690
<rdar://problem/30295261>

Reviewed by Enrica Casucci.

Source/WebCore:

Adds logic to compute the mouse anchor point. This is a point in the unit square indicating where the drag
origin is relative to the bounds of the drag image. There is no behavior change, since this anchor point is not
used by any client yet; this patch only computes and vends this information from WebCore.

  • loader/EmptyClients.cpp:
  • page/DragClient.h:
  • page/DragController.cpp:

(WebCore::DragController::startDrag):
(WebCore::DragController::doImageDrag):
(WebCore::DragController::doSystemDrag):

  • page/DragController.h:
  • platform/DragImage.h:

Source/WebKit/mac:

Adds some plumbing for the anchor point in the WK1 client layer.

  • WebCoreSupport/WebDragClient.h:
  • WebCoreSupport/WebDragClient.mm:

(WebDragClient::startDrag):

Source/WebKit/win:

Adds some plumbing for the anchor point in the WK1 client layer.

  • WebCoreSupport/WebDragClient.cpp:

(WebDragClient::startDrag):

  • WebCoreSupport/WebDragClient.h:

Source/WebKit2:

Adds some plumbing for the mouse anchor point in the UI process. Additionally, refactors some unrelated code
for handling data interaction.

  • UIProcess/PageClient.h:
  • UIProcess/WebPageProxy.h:
  • UIProcess/WebPageProxy.messages.in:
  • UIProcess/ios/PageClientImplIOS.h:
  • UIProcess/ios/PageClientImplIOS.mm:

(WebKit::PageClientImpl::startDataInteractionWithImage):

  • UIProcess/ios/WKContentViewInteraction.h:
  • UIProcess/mac/PageClientImpl.h:
  • UIProcess/mac/PageClientImpl.mm:

(WebKit::PageClientImpl::startDataInteractionWithImage):

  • UIProcess/mac/WebPageProxyMac.mm:

(WebKit::WebPageProxy::setDragImage):

  • WebProcess/WebCoreSupport/WebDragClient.cpp:

(WebKit::WebDragClient::startDrag):

  • WebProcess/WebCoreSupport/WebDragClient.h:
  • WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:

(WebKit::WebDragClient::startDrag):

3:01 PM Changeset in webkit [211596] by eric.carlson@apple.com
  • 2 edits
    4 adds in trunk/Source/WebCore

[Mac] Add classes to manage audio samples
https://bugs.webkit.org/show_bug.cgi?id=167739

Reviewed by Jer Noble.

No new tests, this code isn't used yet.

  • WebCore.xcodeproj/project.pbxproj:
  • platform/audio/mac/AudioSampleBufferList.cpp: Added.

(WebCore::AudioSampleBufferList::create):
(WebCore::AudioSampleBufferList::AudioSampleBufferList):
(WebCore::AudioSampleBufferList::~AudioSampleBufferList):
(WebCore::AudioSampleBufferList::setSampleCount):
(WebCore::AudioSampleBufferList::applyGain):
(WebCore::AudioSampleBufferList::mixFrom):
(WebCore::AudioSampleBufferList::copyFrom):
(WebCore::AudioSampleBufferList::copyTo):
(WebCore::AudioSampleBufferList::reset):
(WebCore::AudioSampleBufferList::zero):
(WebCore::AudioSampleBufferList::zeroABL):
(WebCore::AudioSampleBufferList::convertInput):
(WebCore::AudioSampleBufferList::audioConverterCallback):
(WebCore::AudioSampleBufferList::configureBufferListForStream):

  • platform/audio/mac/AudioSampleBufferList.h: Added.

(WebCore::AudioSampleBufferList::streamDescription):
(WebCore::AudioSampleBufferList::bufferList):
(WebCore::AudioSampleBufferList::sampleCapacity):
(WebCore::AudioSampleBufferList::sampleCount):
(WebCore::AudioSampleBufferList::timestamp):
(WebCore::AudioSampleBufferList::hostTime):
(WebCore::AudioSampleBufferList::setTimes):
(WebCore::AudioSampleBufferList::audioBufferListSizeForStream):

  • platform/audio/mac/AudioSampleDataSource.cpp: Added.

(WebCore::AudioSampleDataSource::create):
(WebCore::AudioSampleDataSource::AudioSampleDataSource):
(WebCore::AudioSampleDataSource::~AudioSampleDataSource):
(WebCore::AudioSampleDataSource::setPaused):
(WebCore::AudioSampleDataSource::setupConverter):
(WebCore::AudioSampleDataSource::setInputFormat):
(WebCore::AudioSampleDataSource::setOutputFormat):
(WebCore::AudioSampleDataSource::hostTime):
(WebCore::AudioSampleDataSource::pushSamplesInternal):
(WebCore::AudioSampleDataSource::pushSamples):
(WebCore::AudioSampleDataSource::pullSamplesInternal):
(WebCore::AudioSampleDataSource::pullSamples):

  • platform/audio/mac/AudioSampleDataSource.h: Added.

(WebCore::AudioSampleDataSource::setVolume):
(WebCore::AudioSampleDataSource::volume):
(WebCore::AudioSampleDataSource::setMuted):
(WebCore::AudioSampleDataSource::muted):

2:45 PM Changeset in webkit [211595] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Mark workesr/bomb/html as flaky on macOS.
https://bugs.webkit.org/show_bug.cgi?id=167757

Unreviewed test gardening.

  • platform/mac/TestExpectations:
2:07 PM Changeset in webkit [211594] by Joseph Pecoraro
  • 37 edits
    4 copies
    13 adds in trunk

Support Performance API (performance.now(), UserTiming) in Workers
https://bugs.webkit.org/show_bug.cgi?id=167717

Reviewed by Ryosuke Niwa.

Source/WebCore:

Tests: performance-api/performance-mark-name.html

performance-api/performance-now-api.html
performance-api/performance-now-time-origin-in-worker.html
performance-api/user-timing-apis.html

  • CMakeLists.txt:
  • DerivedSources.make:

New files.

  • page/DOMWindow.idl:
  • page/GlobalPerformance.idl:
  • workers/WorkerGlobalScope.idl:

Add partial interface for performance attribute.

  • page/Performance.idl:
  • page/PerformanceEntry.idl:
  • page/PerformanceMark.idl:
  • page/PerformanceMeasure.idl:
  • page/PerformanceObserver.idl:
  • page/PerformanceObserverEntryList.idl:

Expose these to Workers.

  • page/Performance.cpp:

(WebCore::Performance::Performance):
(WebCore::Performance::contextDestroyed):

  • page/Performance.h:

Use the EventQueue variant that works with any ScriptExectionContext.

  • page/PerformanceObserver.cpp:

(WebCore::PerformanceObserver::PerformanceObserver):
Get the Performance base in a Worker context.

  • page/PerformanceUserTiming.cpp:

(WebCore::UserTiming::mark):
Only reject legacy special mark names in a Window, not a Worker.

(WebCore::UserTiming::findExistingMarkStartTime):
Simple implementation returns 0 as the start time in Workers. The spec
is currently imprecise here, but it does not have the unusual
PerformanceTiming behavior in a Window which is part of User Timing 1.

  • workers/Worker.cpp:

(WebCore::Worker::create):
(WebCore::Worker::notifyFinished):

  • workers/Worker.h:

Record the moment of Worker creation.

  • workers/WorkerGlobalScope.cpp:

(WebCore::WorkerGlobalScope::WorkerGlobalScope):
(WebCore::WorkerGlobalScope::performance):

  • workers/WorkerGlobalScope.h:

Construct the Performance object with the moment of creation (timeOrigin).

  • workers/DedicatedWorkerGlobalScope.cpp:

(WebCore::DedicatedWorkerGlobalScope::create):
(WebCore::DedicatedWorkerGlobalScope::DedicatedWorkerGlobalScope):

  • workers/DedicatedWorkerGlobalScope.h:
  • workers/DedicatedWorkerThread.cpp:

(WebCore::DedicatedWorkerThread::DedicatedWorkerThread):
(WebCore::DedicatedWorkerThread::createWorkerGlobalScope):

  • workers/DedicatedWorkerThread.h:
  • workers/WorkerGlobalScopeProxy.h:
  • workers/WorkerMessagingProxy.cpp:

(WebCore::WorkerMessagingProxy::startWorkerGlobalScope):

  • workers/WorkerMessagingProxy.h:
  • workers/WorkerThread.cpp:

(WebCore::WorkerThreadStartupData::WorkerThreadStartupData):
(WebCore::WorkerThread::WorkerThread):
(WebCore::WorkerThread::workerThread):

  • workers/WorkerThread.h:

Pass the moment of creation (timeOrigin) through to WorkerGlobalScope creation.

LayoutTests:

  • js/dom/global-constructors-attributes-dedicated-worker-expected.txt:

Updated now that Performance classes are in Workers.

  • performance-api/performance-now-api-expected.txt: Added.
  • performance-api/performance-now-api.html: Added.
  • performance-api/performance-now-time-origin-in-worker-expected.txt: Added.
  • performance-api/performance-now-time-origin-in-worker.html: Added.

New tests to cover performance.now.

  • performance-api/performance-mark-name-expected.txt: Added.
  • performance-api/performance-mark-name.html: Added.
  • performance-api/resources/mark-name.js: Added.
  • performance-api/resources/user-timing-api.js: Added.
  • performance-api/user-timing-apis-expected.txt: Added.
  • performance-api/user-timing-apis.html: Added.

New tests to cover user-timing and performance.mark behavior.

  • performance-api/performance-observer-api-expected.txt:
  • performance-api/performance-observer-api.html:
  • performance-api/performance-observer-basic-expected.txt:
  • performance-api/performance-observer-basic.html:
  • performance-api/performance-timeline-api-expected.txt:
  • performance-api/performance-timeline-api.html:
  • performance-api/resources/now-api.js: Added.
  • performance-api/resources/observer-api.js: Copied from LayoutTests/performance-api/performance-observer-api.html.
  • performance-api/resources/observer-basic.js: Copied from LayoutTests/performance-api/performance-observer-basic.html.
  • performance-api/resources/time-origin-in-worker.js: Added.
  • performance-api/resources/timeline-api.js: Copied from LayoutTests/performance-api/performance-timeline-api.html.

Update some of the existing tests to check in a Document and Worker.

  • imported/w3c/web-platform-tests/user-timing/test_user_timing_mark_and_measure_exception_when_invoke_with_timing_attributes-expected.txt:

Minor progression.

1:36 PM Changeset in webkit [211593] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Mark imported/w3c/web-platform-tests/shadow-dom/slotchange.html as flaky on macOS.
https://bugs.webkit.org/show_bug.cgi?id=167652

Unreviewed test gardening.

  • platform/mac/TestExpectations:
1:31 PM Changeset in webkit [211592] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

Unreviewed, rolling out r211579.
https://bugs.webkit.org/show_bug.cgi?id=167753

Caused mediastream crashes. (Requested by bfulgham_ on
#webkit).

Reverted changeset:

"Correct memory leak in MediaConstraints"
https://bugs.webkit.org/show_bug.cgi?id=167744
http://trac.webkit.org/changeset/211579

1:29 PM Changeset in webkit [211591] by Chris Dumez
  • 93 edits in trunk/Source

Rename Node::inDocument() to isConnected()
https://bugs.webkit.org/show_bug.cgi?id=167743

Reviewed by Sam Weinig.

Rename Node::inDocument() to isConnected() to match the DOM specification more closely:

Source/WebKit/mac:

  • DOM/DOMNode.mm:

(-[DOMNode isConnected]):

  • WebView/WebFrame.mm:

(-[WebFrame selectNSRange:onElement:]):

1:25 PM Changeset in webkit [211590] by graouts@webkit.org
  • 26 edits
    4 copies
    21 adds in trunk

[Modern Media Controls] Provide a compact mode for when the controls are small
https://bugs.webkit.org/show_bug.cgi?id=167746
<rdar://problem/29565842>

Reviewed by Dean Jackson.

Source/WebCore:

When the macOS inline media controls become too narrow to display both the volume and fullscreen
buttons in their right container (width < 242), we switch to a compact mode where the controls bar
is shorter and the buttons smaller.

To facilitate this, we provide a new subclass of MacOSInlineMediaControls called MacOSCompactInlineMediaControls
which changes some of the layout properties of the buttons to have shorter margins around buttons.

We also added a new "Compact" LayoutTrait and improved IconService to provide specific icons
for this mode for the buttons that can exist in compact mode.

To correctly implement the design, we needed to add a way to provide different margins around the
left and right edges of the container, so the "padding" property is now split between "leftMargin"
and "rightMargin", and to make property naming cleaner, the "margin" property which specifies the
space between each button in a container is now called "buttonMargin". We also set the default
values for those properties to be 24 (instead of 0) which are the most widely used values, requiring
less customization.

Tests: media/modern-media-controls/macos-compact-inline-media-controls/macos-compact-inline-media-controls-buttons-styles.html

media/modern-media-controls/macos-compact-inline-media-controls/macos-compact-inline-media-controls-constructor.html
media/modern-media-controls/macos-compact-inline-media-controls/macos-compact-inline-media-controls-controls-bar-styles.html
media/modern-media-controls/macos-compact-inline-media-controls/macos-compact-inline-media-controls-layout.html
media/modern-media-controls/macos-compact-inline-media-controls/macos-compact-inline-media-controls-volume-styles.html
media/modern-media-controls/media-controller/media-controller-toggle-compact-mode.html

  • Modules/modern-media-controls/controls/buttons-container.js:

(ButtonsContainer.prototype.layout): Refactor the "margin" and "padding" properties into
"leftMargin", "rightMargin" and "buttonMargin".

  • Modules/modern-media-controls/controls/icon-button.js:

(IconButton.prototype._updateImage): Fix a small bug that would prevent the image source
change to occur after changing the "iconName" property should the previous and new icons
share the same metrics, which is the case for the "play" and "pause" icons in compact mode.

  • Modules/modern-media-controls/controls/icon-service.js: Add support for compact variants.

(const.iconService.new.IconService.prototype._fileNameAndPlatformForIconNameAndLayoutTraits):
(const.iconService.new.IconService):

  • Modules/modern-media-controls/controls/ios-inline-media-controls.js: Adopt new margin defaults.
  • Modules/modern-media-controls/controls/layout-item.js: Add the new "Compact" LayoutTrait.
  • Modules/modern-media-controls/controls/macos-compact-inline-media-controls.css: Added.

(.media-controls.mac.inline.compact > .controls-bar):
(.media-controls.mac.inline.compact button.play-pause):
(.media-controls.mac.inline.compact button.skip-back):
(.media-controls.mac.inline.compact .scrubber.slider):
(.media-controls.mac.inline.compact button.mute):
(.media-controls.mac.inline.compact button.fullscreen):
(.media-controls.mac.inline.compact .time-label,):
(.media-controls.mac.inline.compact .volume-slider-container):
(.media-controls.mac.inline.compact .volume.slider):
(.media-controls.mac.inline.compact .scrubber.slider > input::-webkit-slider-thumb):

  • Modules/modern-media-controls/controls/macos-compact-inline-media-controls.js: Added.

(MacOSCompactInlineMediaControls):

  • Modules/modern-media-controls/controls/macos-fullscreen-media-controls.js: Adopt new margin defaults.

(MacOSFullscreenMediaControls.prototype.layout):

  • Modules/modern-media-controls/controls/macos-inline-media-controls.js: Adopt new margin defaults

and make the _leftContainer and _rightContainer properties public such that the MacOSCompactInlineMediaControls
subclass may customize them without accessing a private property.
(MacOSInlineMediaControls.prototype.layout):
(MacOSInlineMediaControls.prototype.showTracksPanel):

are below the 242px width threshold.
(MediaController.prototype.get layoutTraits):
(MediaController.prototype.handleEvent):
(MediaController.prototype._updateControlsIfNeeded):
(MediaController.prototype._shouldFadeBetweenControls):
(MediaController.prototype._updateControlsSize):
(MediaController.prototype._controlsWidth):
(MediaController.prototype._controlsClass):
(MediaController):

  • WebCore.xcodeproj/project.pbxproj: Add new files and perform some cleanup so that the

project accurately lists all the existing project files and remove some older ones.

LayoutTests:

Add some new tests for the compact mode and update some tests after the ButtonsContainer
"padding" and "margin" properties refactoring.

  • media/modern-media-controls/buttons-container/buttons-container-buttons-property.html:
  • media/modern-media-controls/buttons-container/buttons-container-constructor-expected.txt:
  • media/modern-media-controls/buttons-container/buttons-container-constructor.html:
  • media/modern-media-controls/buttons-container/buttons-container-layout.html:
  • media/modern-media-controls/ios-inline-media-controls/ios-inline-media-controls-constructor-expected.txt:
  • media/modern-media-controls/ios-inline-media-controls/ios-inline-media-controls-constructor.html:
  • media/modern-media-controls/macos-compact-inline-media-controls/macos-compact-inline-media-controls-buttons-styles-expected.txt: Added.
  • media/modern-media-controls/macos-compact-inline-media-controls/macos-compact-inline-media-controls-buttons-styles.html: Added.
  • media/modern-media-controls/macos-compact-inline-media-controls/macos-compact-inline-media-controls-constructor-expected.txt: Added.
  • media/modern-media-controls/macos-compact-inline-media-controls/macos-compact-inline-media-controls-constructor.html: Added.
  • media/modern-media-controls/macos-compact-inline-media-controls/macos-compact-inline-media-controls-controls-bar-styles-expected.txt: Added.
  • media/modern-media-controls/macos-compact-inline-media-controls/macos-compact-inline-media-controls-controls-bar-styles.html: Added.
  • media/modern-media-controls/macos-compact-inline-media-controls/macos-compact-inline-media-controls-layout-expected.txt: Added.
  • media/modern-media-controls/macos-compact-inline-media-controls/macos-compact-inline-media-controls-layout.html: Added.
  • media/modern-media-controls/macos-compact-inline-media-controls/macos-compact-inline-media-controls-volume-styles-expected.txt: Added.
  • media/modern-media-controls/macos-compact-inline-media-controls/macos-compact-inline-media-controls-volume-styles.html: Added.
  • media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-constructor-expected.txt:
  • media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-constructor.html:
  • media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-right-container-margin-expected.txt:
  • media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-right-container-margin.html:
  • media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-constructor-expected.txt:
  • media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-constructor.html:
  • media/modern-media-controls/media-controller/media-controller-toggle-compact-mode-expected.txt: Added.
  • media/modern-media-controls/media-controller/media-controller-toggle-compact-mode.html: Added.
  • media/modern-media-controls/resources/media-controls-loader.js:
  • platform/ios-simulator/TestExpectations:
1:24 PM Changeset in webkit [211589] by commit-queue@webkit.org
  • 19 edits
    2 deletes in trunk/Source

Unreviewed, rolling out r211571 and r211582.
https://bugs.webkit.org/show_bug.cgi?id=167751

This change caused API test WebKit1.MemoryPressureHandler to
fail with an assertion. (Requested by ryanhaddad on #webkit).

Reverted changesets:

"[Mac] In-process memory pressure monitor for WebContent
processes."
https://bugs.webkit.org/show_bug.cgi?id=167491
http://trac.webkit.org/changeset/211571

"Unreviewed attempt to fix the Windows build after r211571."
http://trac.webkit.org/changeset/211582

1:05 PM Changeset in webkit [211588] by mitz@apple.com
  • 2 edits in trunk/Source/WebKit2

The Make Frameworks Symbolic Link build phase can end up creating a symlink inside the Frameworks subdirectory
https://bugs.webkit.org/show_bug.cgi?id=167745

Reviewed by Tim Horton.

  • WebKit2.xcodeproj/project.pbxproj: Pass the -h option to ln(1) so that it will replace, rather than follow, an existing symlink.
1:00 PM Changeset in webkit [211587] by jmarcell@apple.com
  • 6 edits in trunk/Source

Versioning.

12:56 PM Changeset in webkit [211586] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Mark imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-details-element/toggleEvent.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=164041

Unreviewed test gardening.

12:45 PM Changeset in webkit [211585] by jmarcell@apple.com
  • 1 delete in tags/Safari-604.1.6

Deleting Tag.

12:42 PM Changeset in webkit [211584] by pvollan@apple.com
  • 2 edits in trunk/Source/WebKit/win

[Win][HiDPI] Scale factor is applied twice in accelerated compositing mode.
https://bugs.webkit.org/show_bug.cgi?id=167732

Reviewed by Brent Fulgham.

Backing layer should not be scaled when CACFLayerSetContentsScale is used for scaling.

  • WebView.cpp:

(WebView::setAcceleratedCompositing):

12:24 PM Changeset in webkit [211583] by Ryan Haddad
  • 3 edits in trunk/LayoutTests

Unreviewed ios-simulator test gardening.

  • platform/ios-simulator-wk2/TestExpectations:
  • platform/ios-simulator/TestExpectations:
12:22 PM Changeset in webkit [211582] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

Unreviewed attempt to fix the Windows build after r211571.

  • platform/MemoryPressureHandler.cpp:

(WebCore::thresholdForPolicy):
(WebCore::policyForFootprint):

12:21 PM Changeset in webkit [211581] by Simon Fraser
  • 3 edits in trunk/LayoutTests

Clean up css3/filters/backdrop/dynamic-with-clip-path.html

This test used a clip-path that was entirely outside the element, making it confusing.
Move the clipping circle to the center.

  • css3/filters/backdrop/dynamic-with-clip-path-expected.html:
  • css3/filters/backdrop/dynamic-with-clip-path.html:
11:34 AM Changeset in webkit [211580] by ddkilzer@apple.com
  • 2 edits in trunk

Make the Makefile great again after r211570, r211572

  • Makefile: Restore tabs and ending newline.
11:33 AM Changeset in webkit [211579] by Brent Fulgham
  • 2 edits in trunk/Source/WebCore

Correct memory leak in MediaConstraints
https://bugs.webkit.org/show_bug.cgi?id=167744
<rdar://problem/30331444>

Reviewed by Anders Carlsson.

ConstraintHolder returns a reference to an object created by operator new. When the
returned value is assigned or stored in Vector or other containers we leak memory.
Instead, this value should just be returned as a regular object so that the return
value optimization can make sure memory is properly (and efficiently) used.

  • platform/mediastream/MediaConstraints.h:

(WebCore::FlattenedConstraint::ConstraintHolder::create): Return by value.

11:20 AM Changeset in webkit [211578] by matthew_hanson@apple.com
  • 5 edits in branches/safari-604.1.5-branch

Merge r211502. rdar://problem/30319184

11:20 AM Changeset in webkit [211577] by matthew_hanson@apple.com
  • 3 edits
    2 adds in branches/safari-604.1.5-branch

Merge r211495. rdar://problem/30106362

11:20 AM Changeset in webkit [211576] by matthew_hanson@apple.com
  • 4 edits
    2 adds in branches/safari-604.1.5-branch

Merge r211339. rdar://problem/29601646

11:20 AM Changeset in webkit [211575] by matthew_hanson@apple.com
  • 12 edits in branches/safari-604.1.5-branch/Source

Merge r211438.

11:12 AM Changeset in webkit [211574] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Marking http/tests/inspector/worker/blob-script-with-cross-domain-imported-scripts.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=167607

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
10:55 AM Changeset in webkit [211573] by ddkilzer@apple.com
  • 29 edits
    1 copy in trunk/LayoutTests

Clean up accessibility & animations tests to stop calling testRunner.waitUntilDone() twice
<https://webkit.org/b/167598>

Reviewed by Alexey Proskuryakov.

  • accessibility/frame-disconnect-textmarker-cache-crash.html:
  • accessibility/loading-iframe-sends-notification.html:
  • accessibility/mac/combobox-activedescendant-notifications.html:
  • accessibility/mac/ordered-textmarker-crash.html:
  • accessibility/mac/stale-textmarker-crash.html:
  • accessibility/notification-listeners.html:
  • accessibility/scroll-to-global-point-iframe-nested.html:
  • accessibility/scroll-to-global-point-iframe.html:
  • accessibility/scroll-to-make-visible-iframe.html:
  • accessibility/svg-element-press.html:
  • Remove call to testRunner.waitUntilDone() since window.jsTestIsAsync is set to true, and thus waitUntilDone() is called from either js-test.js or js-test-post.js.
  • animations/animation-delay-changed.html:
  • animations/change-keyframes-name.html:
  • animations/font-variations/font-variation-settings-order.html:
  • animations/font-variations/font-variation-settings-unlike.html:
  • animations/font-variations/font-variation-settings.html:
  • animations/longhand-timing-function.html:
  • animations/transition-and-animation-3.html:
  • animations/unanimated-style.html:
  • Remove call to testRunner.waitUntilDone() since that's moved into animation-test-helpers.js.
  • animations/resources/animation-test-helpers.js:

(runAnimationTest): Call testRunner.waitUntilDone() when this
script resource is included instead of when runAnimationTest()
is called since runAnimationTest() expects it to be set anyway.

  • animations/animation-direction-reverse-fill-mode-hardware.html:
  • animations/animation-direction-reverse-fill-mode.html:
  • animations/animation-hit-test-transform.html:
  • animations/animation-hit-test.html:
  • animations/animation-internals-api-multiple-keyframes.html:
  • animations/animation-internals-api.html:
  • animations/change-transform-style-during-animation.html:
  • animations/keyframes-iteration-count-non-integer.html:
  • Remove call to testRunner.waitUntilDone() since that now happens when loading animation-test-helpers.js. These tests don't currently call runAnimationTest(), but they manage their own state by calling testRunner.notifyDone() themselves.
  • animations/crash-on-removing-animation.html:
  • animations/resources/crash-on-removing-animation-window.html: Copied from LayoutTests/animations/crash-on-removing-animation.html.
  • Split this test into a main resource and a window resource. Previously testRunner.waitUntilDone() was being called twice when js-test-post.js was loaded in the main window and then loaded a second time when the window was opened. The new resource file doesn't load either js-test-pre.js or js-test-post.js, avoiding the duplicate call.
10:42 AM Changeset in webkit [211572] by Jonathan Bedard
  • 1 edit
    1 add in trunk

Unreviewed build fix after r211570

  • Makefile: Placed back.
10:35 AM Changeset in webkit [211571] by akling@apple.com
  • 19 edits
    2 copies in trunk/Source

Source/JavaScriptCore:
[Mac] In-process memory pressure monitor for WebContent processes.
<https://webkit.org/b/167491>
<rdar://problem/30116072>

Reviewed by Antti Koivisto.

Remove the sloppy "max live heap size" mechanism from JSC in favor of the new
WebCore-side memory footprint monitor.

  • heap/Heap.cpp:

(JSC::Heap::updateAllocationLimits):
(JSC::Heap::didExceedMaxLiveSize): Deleted.

  • heap/Heap.h:

(JSC::Heap::setMaxLiveSize): Deleted.

Source/WebCore:
[Mac] In-process memory pressure monitor for WebContent processes AKA websam
<https://webkit.org/b/167491>
<rdar://problem/30116072>

Reviewed by Antti Koivisto.

Add a new timer-based memory pressure monitor that checks the process memory
footprint every 30 seconds and reacts to changes by setting a MemoryUsagePolicy.

There are four MemoryUsagePolicy values:

  • Unrestricted (below 1GB)
  • Conservative (above 1GB)
  • Strict (above 2GB)
  • Panic (above 4GB, or 3GB if 32-bit)

For Strict and above, the old-style "isUnderMemoryPressure()" API will return true.

Transitioning to a higher policy will cause memory pressure handlers to run:

At Strict, we run the "non-critical" memory pressure handler, then carry on.

At Panic, we run the "critical" memory pressure handler. If that fails to recover
enough memory to bring us back below 4GB, we may kill the process:

A process is eligible to get killed for using too much memory if:

  • It's not visible on screen (i.e it's a background tab.)
  • It's not playing audio.
  • It has not performed a main frame navigation in the last hour.

Before killing the process, an exit-time callback will run. This patch installs such
a callback that prints out some time-of-death statistics about C++ and JavaScript memory
usage to hopefully help understand what was soaking up all the memory.

  • bindings/js/CommonVM.cpp:

(WebCore::commonVMSlow):

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::setState):

  • page/MainFrame.cpp:

(WebCore::MainFrame::didCompleteLoad):

  • page/MainFrame.h:
  • page/MemoryRelease.cpp:

(WebCore::pageCount):
(WebCore::logMemoryStatisticsAtTimeOfDeath):
(WebCore::didExceedMemoryLimitAndFailedToRecover):
(WebCore::processIsEligibleForMemoryKill):

  • page/MemoryRelease.h:
  • page/ResourceUsageThread.h:
  • page/cocoa/ResourceUsageThreadCocoa.mm:

(WebCore::vmPageSize):

  • platform/MemoryPressureHandler.cpp:

(WebCore::MemoryPressureHandler::MemoryPressureHandler):
(WebCore::MemoryPressureHandler::setShouldUsePeriodicMemoryMonitor):
(WebCore::toString):
(WebCore::thresholdForPolicy):
(WebCore::policyForFootprint):
(WebCore::MemoryPressureHandler::measurementTimerFired):

  • platform/MemoryPressureHandler.h:

(WebCore::MemoryPressureHandler::setMemoryKillCallback):
(WebCore::MemoryPressureHandler::setProcessIsEligibleForMemoryKillCallback):
(WebCore::MemoryPressureHandler::isUnderMemoryPressure):

Source/WebKit2:
[Mac] In-process memory pressure monitor for WebContent processes.
<https://webkit.org/b/167491>
<rdar://problem/30116072>

Reviewed by Antti Koivisto.

Enable the in-process memory monitor for WebContent processes on macOS 10.12+

  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::initializeWebProcess):

Source/WTF:
[Mac] In-process memory pressure monitor for WebContent processes.
<https://webkit.org/b/167491>
<rdar://problem/30116072>

Reviewed by Antti Koivisto.

Add a WTF helper function for getting the current process's memory footprint.

  • WTF.xcodeproj/project.pbxproj:
  • wtf/CMakeLists.txt:
  • wtf/MemoryFootprint.cpp:

(WTF::memoryFootprint):

  • wtf/MemoryFootprint.h:
10:33 AM Changeset in webkit [211570] by Jonathan Bedard
  • 2 edits
    1 delete in trunk

Undefined subroutine in svn-create-patch
https://bugs.webkit.org/show_bug.cgi?id=167742

Unreviewed build-fix after r211543.

  • Scripts/VCSUtils.pm: fixSVNPatchForAdditionWithHistory was not exported.
10:31 AM Changeset in webkit [211569] by Chris Dumez
  • 13 edits in trunk/Source

[Crash] com.apple.WebKit.WebContent at WebKit: WebKit::WebPage::fromCorePage()
https://bugs.webkit.org/show_bug.cgi?id=167738
<rdar://problem/30229990>

Reviewed by Andreas Kling.

Source/WebCore:

Upon destruction of a Page, we destroy the BackForwardClient, which is supposed
to keep track of HistoryItems associated to this particular page and remove them
from the PageCache. Given the crash trace, the issue seems to be that some
HistoryItems associated with the Page sometimes linger in the PageCache *after*
the Page has been destroyed, which leads to crashes later on when pruning the
PageCache.

In order to make the process more robust, this patch refactors the code so that
the Page is now in charge of removing all its associated HistoryItems from the
PageCache instead of relying on the BackForwardClient. Also, instead of having
the Page keep track of which HistoryItems are associated with it (which is
error prone), we now scan all PageCache entries instead to find which ones are
associated with the Page. While this is in theory slower, this is much safer
and in practice not an issue because the PageCache usually has 3-5 entries.

No new tests, could not reproduce.

  • history/CachedPage.cpp:

(WebCore::CachedPage::CachedPage):

  • history/CachedPage.h:

(WebCore::CachedPage::page):

  • history/PageCache.cpp:

(WebCore::PageCache::removeAllItemsForPage):

  • history/PageCache.h:
  • page/Page.cpp:

(WebCore::Page::~Page):

Source/WebKit/mac:

The BackForwardClient no longer needs to worry about removing HistoryItems
from the PageCache now that WebCore takes care of it.

  • History/BackForwardList.mm:

(BackForwardList::close):

Source/WebKit/win:

The BackForwardClient no longer needs to worry about removing HistoryItems
from the PageCache now that WebCore takes care of it.

  • BackForwardList.cpp:

(BackForwardList::close):

Source/WebKit2:

The BackForwardClient no longer needs to worry about removing HistoryItems
from the PageCache now that WebCore takes care of it.

  • WebProcess/WebPage/WebBackForwardListProxy.cpp:

(WebKit::WebBackForwardListProxy::addItemFromUIProcess):
(WebKit::WebBackForwardListProxy::addItem):
(WebKit::WebBackForwardListProxy::close):

  • WebProcess/WebPage/WebBackForwardListProxy.h:
9:52 AM Changeset in webkit [211568] by andersca@apple.com
  • 2 edits in trunk/Source/WebKit2

<rdar://problem/30323148> Webkit Nightly on 10.10 broken

Follow-up fix.

  • Platform/IPC/mac/ConnectionMac.mm:

(IPC::Connection::open):

9:46 AM Changeset in webkit [211567] by calvaris@igalia.com
  • 2 edits in trunk/Tools

Unreviewed. Fix jhbuild dependencies build.

  • gtk/patches/gst-plugins-good-0004-qtdemux-add-context-for-a-preferred-protection.patch:

Patch updated.

9:39 AM Changeset in webkit [211566] by andersca@apple.com
  • 2 edits in trunk/Source/WebKit2

<rdar://problem/30323148> Webkit Nightly on 10.10 broken

Try to fix the 10.10 build.

  • Platform/IPC/mac/ConnectionMac.mm:

(IPC::Connection::open):

9:37 AM Changeset in webkit [211565] by andersca@apple.com
  • 2 edits in trunk/Source/WebKit2

Handle m_processLauncher being null in ChildProcessProxy::processIdentifier()
https://bugs.webkit.org/show_bug.cgi?id=167713
rdar://problem/28896113

Reviewed by Dan Bernstein.

This can happen if the process has been explicitly terminated.

  • UIProcess/ChildProcessProxy.h:

(WebKit::ChildProcessProxy::processIdentifier):

9:06 AM Changeset in webkit [211564] by Antti Koivisto
  • 3 edits
    2 adds in trunk

Column progression wrong after enabling pagination on RTL document
https://bugs.webkit.org/show_bug.cgi?id=167733
<rdar://problem/29012252>

Reviewed by Zalan Bujtas.

Source/WebCore:

Column progression depends on document direction but was not updated when direction changed.

Test: fast/multicol/pagination/pagination-dynamic-rtl.html

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::styleDidChange):

Update column styles if document direction changes.

LayoutTests:

  • fast/multicol/pagination/pagination-dynamic-rtl-expected.html: Added.
  • fast/multicol/pagination/pagination-dynamic-rtl.html: Added.
9:04 AM Changeset in webkit [211563] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Marking http/tests/contentextensions/block-everything-unless-domain.html as flaky on macOS.
https://bugs.webkit.org/show_bug.cgi?id=167653

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
8:54 AM Changeset in webkit [211562] by calvaris@igalia.com
  • 13 edits
    2 adds in trunk

[EME][GStreamer] Fixed decryptor selection
https://bugs.webkit.org/show_bug.cgi?id=167588

Reviewed by Žan Doberšek.

Source/WebCore:

GStreamer selected a decryptor automatically but we need to be
able to tell it which decryptor we want because one file can be
encrypted with more than one system and the one we want to use can
depend on what the user tells us.

Now when the demuxer is about to select the demuxer, it runs a
GstContext query with the events, which are forwarded through the
EME api to the application, which will answer the the
generateKeyRequest and then we can instruct the demuxer to select
the one we tell it, not the one that is selected automatically. If
the demuxer has already a preferred decryptor, the codepath will
be similar to the older one.

Something that is also fixed is the report of the keyneeded event,
which will contain all pssh boxes as requested by the spec.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:

(WebCore::MediaPlayerPrivateGStreamer::handleMessage): Intercept
the event and handle it.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:

(WebCore::MediaPlayerPrivateGStreamerBase::MediaPlayerPrivateGStreamerBase):
Initialize the CDM session.
(WebCore::MediaPlayerPrivateGStreamerBase::~MediaPlayerPrivateGStreamerBase):
Unlock the protection condition just in case and set CDM to null.
(WebCore::extractEventsAndSystemsFromMessage): Access the events
and accepted key systems coming at the message from the demuxer.
(WebCore::MediaPlayerPrivateGStreamerBase::handleSyncMessage):
Handle the protection event not as an element event but as a
context request. It also concatenates all the initdatas in case
there is more than one. The event is sent in the main thread and
the current one blocks until a timeout is hit or the
generateKeyRequest is called.
(WebCore::MediaPlayerPrivateGStreamerBase::handleProtectionEvent):
Check if the event was already handled and if not, run the need
key event.
(WebCore::MediaPlayerPrivateGStreamerBase::receivedGenerateKeyRequest):
Notify the that the query arrived so that we can unlock the
demuxer thread.
(WebCore::keySystemIdToUuid): Translates ids to uuids, meaning
the ones coming from JS to the ones coming from the media engine.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:

Attributes and methods.

  • platform/graphics/gstreamer/eme/WebKitClearKeyDecryptorGStreamer.cpp:

(webkit_media_clear_key_decrypt_class_init):
(webKitMediaClearKeyDecryptorRequestDecryptionKey): Deleted.

  • platform/graphics/gstreamer/eme/WebKitClearKeyDecryptorGStreamer.h:

Added the ui and uuid.

  • platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.cpp:

(webkitMediaCommonEncryptionDecryptSinkEventHandler): Do not rely
on the subclass, just forward the event to the pipeline inside a message.

  • platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.h:

Remove unused function signature.

  • platform/graphics/gstreamer/mse/AppendPipeline.cpp:

(WebCore::appendPipelineNeedContextMessageCallback): Renamed from
appendPipelineElementMessageCallback.
(WebCore::AppendPipeline::AppendPipeline): Connect to the
need-context message instead of the element one.
(WebCore::AppendPipeline::dispatchPendingDecryptionKey):
Dispatches the drm-cypher message if there is one pending.
(WebCore::AppendPipeline::dispatchDecryptionKey): Dispatches the
drm-cypher.
(WebCore::AppendPipeline::handleNeedContextSyncMessage): Handles
the need-context event instead of the element one.
(WebCore::AppendPipeline::connectDemuxerSrcPadToAppsinkFromAnyThread):
Dispatches the key to the pipeline if there's any pending.
(WebCore::appendPipelineElementMessageCallback): Deleted.
(WebCore::AppendPipeline::handleElementMessage): Deleted.

  • platform/graphics/gstreamer/mse/AppendPipeline.h: New methods

and attributes.

  • platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp:

(WebCore::MediaPlayerPrivateGStreamerMSE::dispatchDecryptionKey):
Use the dispatchDecryptionKey method of the AppendPipeline.

Tools:

This patches are pending at https://bugzilla.gnome.org/show_bug.cgi?id=770107

  • gtk/jhbuild.modules: Added patches to gstreamer and

gst-plugins-good packages.

  • gtk/patches/gst-plugins-good-0004-qtdemux-add-context-for-a-preferred-protection.patch: Added.
  • gtk/patches/gstreamer-0001-protection-added-function-to-filter-system-ids.patch: Added.
8:30 AM Changeset in webkit [211561] by graouts@webkit.org
  • 2 edits in trunk/LayoutTests

LayoutTest media/modern-media-controls/buttons-container/buttons-container-buttons-property.html is a flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=167371

Unreviewed test gardening.

  • platform/mac-wk1/TestExpectations:
8:08 AM Changeset in webkit [211560] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Skip fast/visual-viewport/ios/bottom-bar-with-keyboard.html on ios-simulator.

Unreviewed test gardening.

  • platform/ios-simulator/TestExpectations:
8:04 AM Changeset in webkit [211559] by Ryan Haddad
  • 1 edit
    1 move
    2 adds in trunk/LayoutTests

Unreviewed, rolling out r211529.

This change caused the test to fail on macOS.

Reverted changeset:

"Clean up css3/filters/backdrop/backdrop-filter-with-clip-
path.html expected results."
http://trac.webkit.org/changeset/211529

6:59 AM Changeset in webkit [211558] by commit-queue@webkit.org
  • 2 edits in trunk/LayoutTests

LayoutTest media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-buttons-styles.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=167372

Unreviewed test gardening.

Patch by Antoine Quint <Antoine Quint> on 2017-02-02

  • platform/mac-wk1/TestExpectations:
6:26 AM Changeset in webkit [211557] by commit-queue@webkit.org
  • 2 edits in trunk/LayoutTests

LayoutTest media/modern-media-controls/media-controller/media-controller-resize.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=164571

Unreviewed test gardening.

Patch by Antoine Quint <Antoine Quint> on 2017-02-02

  • platform/mac-wk1/TestExpectations:
6:22 AM Changeset in webkit [211556] by commit-queue@webkit.org
  • 2 edits in trunk/LayoutTests

LayoutTest media/modern-media-controls/rewind-button/rewind-button.html is a flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=167352

Unreviewed test gardening.

Patch by Antoine Quint <Antoine Quint> on 2017-02-02

  • platform/mac-wk1/TestExpectations:
2:38 AM Changeset in webkit [211555] by commit-queue@webkit.org
  • 7 edits in trunk/Source/WebCore

Removed unused EventHandler members
https://bugs.webkit.org/show_bug.cgi?id=167723

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2017-02-02
Reviewed by Yusuke Suzuki.

  • page/EventHandler.cpp:

(WebCore::EventHandler::clear):
(WebCore::EventHandler::handleWheelEvent):

  • page/EventHandler.h:

Remove unused members.

  • editing/FrameSelection.cpp:
  • html/HTMLTextAreaElement.cpp:
  • rendering/RenderObject.cpp:
  • rendering/RenderSlider.cpp:

Remove unnecessary includes.

2:31 AM Changeset in webkit [211554] by Yusuke Suzuki
  • 16 edits
    2 adds in trunk

Web Inspector: Upgrade Esprima to the latest one to support dynamic import
https://bugs.webkit.org/show_bug.cgi?id=167698

Reviewed by Joseph Pecoraro.

Source/WebInspectorUI:

  • UserInterface/External/Esprima/esprima.js:

Update to Esprima@5307e30 (4.0.0-dev).

  • UserInterface/Models/ScriptSyntaxTree.js:

(WebInspector.ScriptSyntaxTree.prototype._gatherIdentifiersInDeclaration.gatherIdentifiers):
(WebInspector.ScriptSyntaxTree.prototype._gatherIdentifiersInDeclaration):
(WebInspector.ScriptSyntaxTree.prototype._recurse):
(WebInspector.ScriptSyntaxTree.prototype._createInternalSyntaxTree):
(WebInspector.ScriptSyntaxTree):

  • UserInterface/Workers/Formatter/ESTreeWalker.js:

(ESTreeWalker.prototype._walkChildren):
(ESTreeWalker):
Add new nodes, SpreadProperty, RestProperty, and Import.
SpreadProperty and RestProperty are the part of ES2018 rest and spread properties.
https://github.com/sebmarkbage/ecmascript-rest-spread
Import is dynamic import node. The syntax is similar to Super.
https://github.com/tc39/proposal-dynamic-import

  • UserInterface/Workers/Formatter/EsprimaFormatter.js:

(EsprimaFormatter.prototype._handleTokenAtNode):

LayoutTests:

  • inspector/formatting/formatting-javascript-expected.txt:
  • inspector/formatting/formatting-javascript.html:
  • inspector/formatting/resources/javascript-tests/import-expected.js: Added.

(async.load):

  • inspector/formatting/resources/javascript-tests/import.js: Added.

(async.load):

  • inspector/formatting/resources/javascript-tests/object-array-literal-expected.js:
  • inspector/formatting/resources/javascript-tests/object-array-literal.js:
  • inspector/formatting/resources/javascript-tests/variable-declaration-expected.js:
  • inspector/formatting/resources/javascript-tests/variable-declaration.js:
  • inspector/formatting/resources/utilities.js:

(TestPage.registerInitializer.):
(TestPage.registerInitializer):
Fix a bug which occurs when output is not expected one.

  • inspector/model/parse-script-syntax-tree-expected.txt:
  • inspector/model/parse-script-syntax-tree.html:
2:30 AM Changeset in webkit [211553] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebCore

Removed unused m_navigationStart from NavigatorGamepad
https://bugs.webkit.org/show_bug.cgi?id=167722

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2017-02-02
Reviewed by Yusuke Suzuki.

  • Modules/gamepad/NavigatorGamepad.cpp:

(WebCore::NavigatorGamepad::NavigatorGamepad):
(WebCore::NavigatorGamepad::from):

  • Modules/gamepad/NavigatorGamepad.h:

(WebCore::NavigatorGamepad::navigationStart): Deleted.

1:49 AM Changeset in webkit [211552] by commit-queue@webkit.org
  • 3 edits in trunk/Source/JavaScriptCore

Removed unused m_errorHandlingModeReentry from Interpreter
https://bugs.webkit.org/show_bug.cgi?id=167726

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2017-02-02
Reviewed by Yusuke Suzuki.

  • interpreter/Interpreter.cpp:

(JSC::Interpreter::Interpreter):

  • interpreter/Interpreter.h:
12:33 AM Changeset in webkit [211551] by commit-queue@webkit.org
  • 14 edits
    3 copies
    1 add
    1 delete in trunk/Source

In iOS, we should take background assertion when accessing localstorage databases.
https://bugs.webkit.org/show_bug.cgi?id=165478

Source/WebCore:

Move WebSQLiteDatabaseTrackerClient from WebKitLegacy to WebCore so that it can be accessible from
WebKit1 and WebKit2. Previously, to avoid dependencies on UIKit, WebKitLegacy introduced several
global methods for UIKit to setup the start/end background task blocks on runtime (WebKitSetStartBackgroundTaskBlock,
WebKitSetInvalidWebBackgroundTaskIdentifier and WebKitSetEndBackgroundTaskBlock). Since we have to
move the background task handling to WebCore, to avoid adding WebCore dependencies on UIKit, this
patch introdues a new WebCore class WebBackgroundTaskController which holds the start/end background
task blocks. The existing WebKitSetStartBackgroundTaskBlock and WebKitSetEndBackgroundTaskBlock methods
in WebKit1 will use WebBackgroundTaskController to store the blocks set by UIKit.

Patch by Yongjun Zhang <yongjun_zhang@apple.com> on 2017-02-02
Reviewed by Brady Eidson.

No new test since this is code refactoring.

  • WebCore.xcodeproj/project.pbxproj: Add a new class WebBackgroundTaskController to the project. Also move

WebSQLiteDatabaseTrackerClient from WebKitLegacy to WebCore.

  • platform/ios/WebBackgroundTaskController.h: Use properties to hold the blocks for starting or ending background tasks.
  • platform/ios/WebBackgroundTaskController.mm:

(+[WebBackgroundTaskController sharedController]):
(-[WebBackgroundTaskController dealloc]):
(-[WebBackgroundTaskController startBackgroundTaskWithExpirationHandler:]): Start a background task with a expiration handler;

to start the background task, we will use backgroundTaskStartBlock set up by UIKit.

(-[WebBackgroundTaskController endBackgroundTaskWithIdentifier:]): Call backgroundTaskEndBlack to end a background task.

  • platform/ios/WebSQLiteDatabaseTrackerClient.h: Copied from Source/WebKit/ios/Storage/WebSQLiteDatabaseTrackerClient.h.
  • platform/ios/WebSQLiteDatabaseTrackerClient.mm: Copied from Source/WebKit/ios/Storage/WebSQLiteDatabaseTrackerClient.mm.

(WebCore::WebSQLiteDatabaseTrackerClient::sharedWebSQLiteDatabaseTrackerClient): Make WebSQLiteDatabaseTrackerClient a singleton.
(WebCore::WebSQLiteDatabaseTrackerClient::WebSQLiteDatabaseTrackerClient):
(WebCore::WebSQLiteDatabaseTrackerClient::~WebSQLiteDatabaseTrackerClient):
(WebCore::WebSQLiteDatabaseTrackerClient::willBeginFirstTransaction): Use a utility class WebDatabaseTransactionBackgroundTaskController

to schedule database transaction background task.

(WebCore::WebSQLiteDatabaseTrackerClient::didFinishLastTransaction): Use WebDatabaseTransactionBackgroundTaskController to stop

databas transaction background task.

(transactionBackgroundTaskIdentifierLock: Moved from Source/WebKit/mac/Storage/WebDatabaseManager.mm.
(setTransactionBackgroundTaskIdentifier): Ditto.
(getTransactionBackgroundTaskIdentifier): Ditto.
(+[WebDatabaseTransactionBackgroundTaskController startBackgroundTask]): Ditto.
(+[WebDatabaseTransactionBackgroundTaskController endBackgroundTask]): Ditto.

Source/WebKit:

Patch by Yongjun Zhang <yongjun_zhang@apple.com> on 2017-02-02
Reviewed by Brady Eidson.

  • WebKit.xcodeproj/project.pbxproj: Moved WebSQLiteDatabaseTrackerClient to WebCore.

Source/WebKit/ios:

Move application background task handling code from WebKit to WebCore.

Patch by Yongjun Zhang <yongjun_zhang@apple.com> on 2017-02-02
Reviewed by Brady Eidson.

  • Misc/WebUIKitSupport.h: Remove several methods that only used internally for background

task handling. They are not needed in WebKit any more since background task handling
is moved to WebCore and wrapped in WebBackgroundTaskController class.

  • Misc/WebUIKitSupport.mm:

(WebKitSetInvalidWebBackgroundTaskIdentifier): Instead of storing the value in a static global

variable, save it in WebBackgroundTaskController.

(WebKitSetStartBackgroundTaskBlock): Ditto.
(WebKitSetEndBackgroundTaskBlock): Ditto.

Source/WebKit/mac:

Move database transaction background task handling code from WebDatabaseManager to
WebCore's WebSQLiteDatabaseTrackerClient.

Patch by Yongjun Zhang <yongjun_zhang@apple.com> on 2017-02-02
Reviewed by Brady Eidson.

  • Storage/WebDatabaseManager.mm:
  • Storage/WebDatabaseManagerInternal.h: Remove a category for background task handling.
  • WebCoreSupport/WebApplicationCache.mm:

(+[WebApplicationCache initializeWithBundleIdentifier:]): Use WebCore::WebSQLiteDatabaseTrackerClient.

  • WebView/WebView.mm:

(-[WebView _commonInitializationWithFrameName:groupName:]): Ditto.

Source/WebKit2:

Just like in WebKit1, when initializing a WKWebView, initialize the database transaction
tracker client. Also, we should set up the start and end background task blocks here. In
WebKit1, this is done inside UIKit.

Patch by Yongjun Zhang <yongjun_zhang@apple.com> on 2017-02-02
Reviewed by Brady Eidson.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _initializeWithConfiguration:]):
(-[WKWebView _setUpSQLiteDatabaseTrackerClient]): Set up the start/end background task blocks

and database transaction tracker client.

Feb 1, 2017:

10:28 PM Changeset in webkit [211550] by zandobersek@gmail.com
  • 12 edits
    2 adds in trunk

[EME] Implement MediaKeySession::update()
https://bugs.webkit.org/show_bug.cgi?id=167636

Reviewed by Xabier Rodriguez-Calvar.

Source/WebCore:

Implement the MediaKeySession::update() method by following the steps as
they are described in the specification.

In order to sanitize the passed-in response data, CDM::sanitizeResponse()
is added. It passes the SharedBuffer object by reference to the CDMPrivate
interface implementor, which returns a SharedBuffer object containing
sanitized response data.

CDMInstance::updateLicense() virtual method is added to perform the license
update for some specific CDMInstance object. After the update the CDMInstance
invokes the callback that's passed to updateLicense(), providing information
about session being closed, changed keys or expiration value, any message
that has to be enqueued, and whether the update was successful.

After that callback is invoked, MediaKeySession::update() goes on to handle
all the provided information in a future task, finally resolving the promise
(or rejecting it beforehand in case of any failure during response handling
or license update).

Three algorithms that can be invoked from MediaKeySession::update() (key
status update, expiration update and session closure) will be implemented
separately. Placeholder methods are provided until then.

MockCDM::sanitizeResponse() and MockCDMInstance::updateLicense() are
implemented for testing purposes. For now only the response sanitization
and sanitized response format are checked there. Key status update,
expiration update and session closure should be tested once the
implementations for those algorithms are added.

Test: media/encrypted-media/mock-MediaKeySession-update.html

  • Modules/encryptedmedia/CDM.cpp:

(WebCore::CDM::sanitizeResponse):

  • Modules/encryptedmedia/CDM.h:
  • Modules/encryptedmedia/CDMInstance.h:
  • Modules/encryptedmedia/CDMPrivate.h:
  • Modules/encryptedmedia/MediaKeySession.cpp:

(WebCore::MediaKeySession::update):
(WebCore::MediaKeySession::updateKeyStatuses):
(WebCore::MediaKeySession::updateExpiration):
(WebCore::MediaKeySession::sessionClosed):

  • Modules/encryptedmedia/MediaKeySession.h:
  • testing/MockCDMFactory.cpp:

(WebCore::MockCDM::sanitizeResponse):
(WebCore::MockCDMInstance::updateLicense):

  • testing/MockCDMFactory.h:

LayoutTests:

Add the mock-MediaKeySession-update.html test, cotaining a few cases that check
the basic operations of MediaKeySession::update(), focusing on proper promise
resolution and rejection based on the state of the object and the passed-in
response argument. Skip the test on all platforms for now.

  • media/encrypted-media/mock-MediaKeySession-update-expected.txt: Added.
  • media/encrypted-media/mock-MediaKeySession-update.html: Added.
  • platform/efl/TestExpectations:
  • platform/mac/TestExpectations:
7:10 PM Changeset in webkit [211549] by Dewei Zhu
  • 8 edits in trunk/Tools

Make run-benchmark script supports 'config' key in test plan.
https://bugs.webkit.org/show_bug.cgi?id=167715

Reviewed by Ryosuke Niwa.

Add support for 'config' key in test paln.
'config' key is a dictionary that specifies environment configurations while test is running.
Specifies orientation to be portrait in MotionMark benchmark.

  • Scripts/webkitpy/benchmark_runner/README.md:
  • Scripts/webkitpy/benchmark_runner/benchmark_runner.py:

(BenchmarkRunner.init):
(BenchmarkRunner._run_benchmark):

  • Scripts/webkitpy/benchmark_runner/browser_driver/browser_driver.py:

(BrowserDriver.prepare_env):

  • Scripts/webkitpy/benchmark_runner/browser_driver/linux_browser_driver.py:

(LinuxBrowserDriver.prepare_env):

  • Scripts/webkitpy/benchmark_runner/browser_driver/osx_browser_driver.py:

(OSXBrowserDriver.prepare_env):

  • Scripts/webkitpy/benchmark_runner/browser_driver/osx_safari_driver.py:

(OSXSafariDriver.prepare_env):

  • Scripts/webkitpy/benchmark_runner/data/plans/motionmark.plan:
5:57 PM Changeset in webkit [211548] by commit-queue@webkit.org
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed, rolling out r211461.
https://bugs.webkit.org/show_bug.cgi?id=167721

Big regression on kraken (Requested by jfbastien on #webkit).

Reverted changeset:

"OSR entry: delay outer-loop compilation when at inner-loop"
https://bugs.webkit.org/show_bug.cgi?id=167149
http://trac.webkit.org/changeset/211461

5:54 PM Changeset in webkit [211547] by Wenson Hsieh
  • 5 edits in trunk/Source/WebKit2

Unreviewed, fix the nightly open source build.

Adds more header checks when importing from WebKitAdditions.

  • UIProcess/Cocoa/WebPageProxyCocoa.mm:
  • UIProcess/ios/WKContentViewInteraction.h:
  • UIProcess/ios/WKContentViewInteraction.mm:
  • WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
5:49 PM Changeset in webkit [211546] by keith_miller@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed, fix unintended change.

  • runtime/SamplingProfiler.cpp:

(JSC::SamplingProfiler::StackFrame::displayName):

5:48 PM Changeset in webkit [211545] by eric.carlson@apple.com
  • 2 edits in trunk/Source/WebCore

[Mac] Update CARingBuffer class
https://bugs.webkit.org/show_bug.cgi?id=167656
<rdar://problem/30318329>

Unreviewed fix the 32-bit build after r211539.

  • platform/audio/mac/CAAudioStreamDescription.cpp:

(WebCore::CAAudioStreamDescription::CAAudioStreamDescription):

5:47 PM Changeset in webkit [211544] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Rebaseline compositing/geometry/fixed-in-composited.html for ios-simulator.

Unreviewed test gardening.

  • platform/ios-simulator/compositing/geometry/fixed-in-composited-expected.txt:
5:41 PM Changeset in webkit [211543] by dbates@webkit.org
  • 3 edits
    1 add in trunk/Tools

REGRESSION (r210820): svn-create-patch does not emit property change only diff
https://bugs.webkit.org/show_bug.cgi?id=167169

Reviewed by David Kilzer.

More directly handle the SVN 1.9 or newer syntax change for a diff of a copied or moved file

  • a SVN diff header and an empty body. In particular, remove a duplicate leading SVN diff

header from the output of "svn diff" on a file that was copied or moved.

Following r210820 svn-create-patch emits to standard output a diff only if it has at least one
chunk range line (e.g. @@ -0,0 +1,7 @@) as a means to workaround a syntax change in the diff
output of a copied or moved file in SVN version 1.9 or newer. In SVN 1.9 or newer "svn diff"
of a copied or moved file always emits to standard output a leading SVN diff header (an "Index:"
line followed by a separator line) with an empty body; => no chunk range lines. However a diff
of a file with only a property change also does not contain any chunk range lines. Therefore
svn-create-patch no longer emitted to standard output such a diff. Instead of indirectly detecting
a SVN diff header with an empty body by counting the number of chunk range lines in the diff
we should directly test for the presence of a leading SVN diff header with an empty body and
remove such lines from the diff.

  • Scripts/VCSUtils.pm:

(fixSVNPatchForAdditionWithHistory): Added.

  • Scripts/svn-create-patch:

(generateDiff): Pass the output from "svn diff" to fixSVNPatchForAdditionWithHistory() when
we have a non empty patch for an added file with history (i.e. a copied or moved file).

  • Scripts/webkitperl/VCSUtils_unittest/fixSVNPatchForAdditionWithHistory.pl: Added.
5:23 PM Changeset in webkit [211542] by keith_miller@apple.com
  • 4 edits in trunk/Source/JavaScriptCore

The sampling profile should have an option to sample from C frames.
https://bugs.webkit.org/show_bug.cgi?id=167614

Reviewed by Saam Barati.

We should be able to use the sampling profiler, at least
internally, to trace C calls. This patch only modifies the JSC
shell although it would be nice to add it to the Web Inspector in
a future patch.

  • runtime/Options.h:
  • runtime/SamplingProfiler.cpp:

(JSC::FrameWalker::FrameWalker):
(JSC::FrameWalker::walk):
(JSC::FrameWalker::recordJSFrame):
(JSC::CFrameWalker::CFrameWalker):
(JSC::CFrameWalker::walk):
(JSC::CFrameWalker::isCFrame):
(JSC::CFrameWalker::advanceToParentFrame):
(JSC::CFrameWalker::frame):
(JSC::SamplingProfiler::takeSample):
(JSC::SamplingProfiler::processUnverifiedStackTraces):
(JSC::SamplingProfiler::StackFrame::displayName):

  • runtime/SamplingProfiler.h:

(JSC::SamplingProfiler::UnprocessedStackFrame::UnprocessedStackFrame):

5:12 PM Changeset in webkit [211541] by Simon Fraser
  • 5 edits
    2 adds in trunk

[iOS WK2] With visual viewports, a fixed bottom bar can be clipped out when the keyboard is visible
https://bugs.webkit.org/show_bug.cgi?id=167710
rdar://problem/30100286

Reviewed by Wenson Hsieh.
Source/WebCore:

Add a bit of logging to show when RLC decides to not composite a fixed element which
is out of bounds.

Test: fast/visual-viewport/ios/bottom-bar-with-keyboard.html

  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::requiresCompositingForPosition):

Source/WebKit2:

The unobscuredRectInContentCoordinates passed to -didUpdateVisibleRect:... could project outside
of the bounds of the document, which is OK when rubber-banding, but not when we're in a stable state,
because that can cause fixed elements to get pushed outside the doc. This happened when the keyboard
triggered bottom content insets on the scroll view.

LayoutTests:

  • fast/visual-viewport/ios/bottom-bar-with-keyboard-expected.txt: Added.
  • fast/visual-viewport/ios/bottom-bar-with-keyboard.html: Added.
3:49 PM Changeset in webkit [211540] by eric.carlson@apple.com
  • 2 edits in trunk/Source/WebCore

[Mac] Update CARingBuffer class
https://bugs.webkit.org/show_bug.cgi?id=167656

Unreviewed build fix after r211539.

  • platform/audio/mac/CAAudioStreamDescription.cpp:

(WebCore::CAAudioStreamDescription::CAAudioStreamDescription): Initialize a variable to fix
release builds.

3:38 PM Changeset in webkit [211539] by eric.carlson@apple.com
  • 11 edits
    1 add in trunk

[Mac] Update CARingBuffer class
https://bugs.webkit.org/show_bug.cgi?id=167656

Reviewed by NOBODY (OOPS!).

Source/WebCore:

API test CARingBufferTest added.

  • WebCore.xcodeproj/project.pbxproj: Add headers to framework so they can be used from the API test.
  • platform/audio/AudioStreamDescription.h: Add Int32.
  • platform/audio/mac/CAAudioStreamDescription.cpp:

(WebCore::CAAudioStreamDescription::CAAudioStreamDescription):
(WebCore::CAAudioStreamDescription::~CAAudioStreamDescription):
(WebCore::CAAudioStreamDescription::format): Support Int32.
(WebCore::CAAudioStreamDescription::operator==): Make inline.

  • platform/audio/mac/CAAudioStreamDescription.h:
  • platform/audio/mac/CARingBuffer.cpp:

(WebCore::CARingBuffer::CARingBuffer): Move initializers into class declaration.
(WebCore::CARingBuffer::allocate): Use flush method, get allocation info from a CAAudioStreamDescription.
(WebCore::FetchABL): Add a mode parameter to allow samples to replace or mix into destination.
(WebCore::CARingBuffer::flush): New.
(WebCore::CARingBuffer::fetch): Add mode parameter.
(WebCore::CARingBuffer::~CARingBuffer): Deleted.

  • platform/audio/mac/CARingBuffer.h:

(WebCore::CARingBuffer::~CARingBuffer):

  • platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm:

(WebCore::AudioSourceProviderAVFObjC::prepare): Use new CARingBuffer constructor.
(WebCore::operator==): Deleted.
(WebCore::operator!=): Deleted.

  • platform/mediastream/mac/WebAudioSourceProviderAVFObjC.mm:

(WebCore::WebAudioSourceProviderAVFObjC::prepare): Use new CARingBuffer constructor
(WebCore::operator==): Deleted.
(WebCore::operator!=): Deleted.

Tools:

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebCore/CARingBuffer.cpp: Added.

(TestWebKitAPI::CARingBufferTest::SetUp):
(TestWebKitAPI::CARingBufferTest::setup):
(TestWebKitAPI::CARingBufferTest::setListDataBuffer):
(TestWebKitAPI::CARingBufferTest::description):
(TestWebKitAPI::CARingBufferTest::bufferList):
(TestWebKitAPI::CARingBufferTest::ringBuffer):
(TestWebKitAPI::CARingBufferTest::capacity):
(TestWebKitAPI::CARingBufferTest::audioBufferListSizeForStream):
(TestWebKitAPI::CARingBufferTest::configureBufferListForStream):
(TestWebKitAPI::TEST_F):
(TestWebKitAPI::MixingTest::run):

3:25 PM Changeset in webkit [211538] by enrica@apple.com
  • 2 edits in trunk/Source/WebKit2

WebProcess crashes in int WTF::throw_bad_variant_access<int> when expanding/shrinking a block selection.
https://bugs.webkit.org/show_bug.cgi?id=167673
rdar://problem/30229620

Reviewed by Anders Carlsson

This is a speculative fix for a bug that might have been introduced
with http://trac.webkit.org/changeset/208479.
The code in containsRange inline fuction in WebPageIOS.mm has not been
updated when the return value of Range::compareBoundaryPoints was changed
to ExceptionOr<short>.
Since there is already a method containsRange in the Range class that
does the right thing, expandedRangeFromHandle now uses that.

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::expandedRangeFromHandle):
(WebKit::containsRange): Deleted.

3:16 PM Changeset in webkit [211537] by jmarcell@apple.com
  • 6 edits in trunk/Source

Versioning.

3:08 PM Changeset in webkit [211536] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Marking compositing/repaint/fixed-background-scroll.html as flaky on macOS WK1.
https://bugs.webkit.org/show_bug.cgi?id=154612

Unreviewed test gardening.

  • platform/mac-wk1/TestExpectations:
2:52 PM Changeset in webkit [211535] by andersca@apple.com
  • 2 edits in trunk/Source/WebKit2

IPC::Connection receive ports should be guarded
https://bugs.webkit.org/show_bug.cgi?id=167704

Reviewed by Tim Horton.

Guarding receive rights will make sure that they won't be closed accidentally. They are created
with a context pointer and can only be unguarded or destructed with the same context pointer.

  • Platform/IPC/mac/ConnectionMac.mm:

(IPC::Connection::platformInvalidate):
Use mach_port_destruct and pass the connection pointer as the context.

(IPC::Connection::platformInitialize):
Guard the server port with the connection pointer as the context.

(IPC::Connection::open):
Use mach_port_construct to create the port which lets us avoid a call to mach_port_set_attributes and setMachPortQueueLength.
Make the port guarded and use the connection pointer as the context.

(IPC::createReceiveSource):
Get rid of this and just duplicate the five lines of code in two places. For the receive port we want to use mach_port_destruct
in our cancel handler.

2:41 PM Changeset in webkit [211534] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Rebaselining compositing/geometry/fixed-in-composited.html for macOS after r211523.
https://bugs.webkit.org/show_bug.cgi?id=167620

Unreviewed test gardening.

  • platform/mac/compositing/geometry/fixed-in-composited-expected.txt:
2:41 PM Changeset in webkit [211533] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Marking inspector/debugger/probe-manager-add-remove-actions.html as slow on macOS debug.
https://bugs.webkit.org/show_bug.cgi?id=167711

Unreviewed test gardening.

  • platform/mac/TestExpectations:
2:34 PM Changeset in webkit [211532] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Marking inspector/worker/debugger-shared-breakpoint.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=167203

Unreviewed test gardening.

  • platform/mac/TestExpectations:
2:25 PM Changeset in webkit [211531] by Alan Bujtas
  • 4 edits in trunk/Source/WebCore

Simple line layout: Move TextFragmentIterator::runWidth to ::textWidth.
https://bugs.webkit.org/show_bug.cgi?id=167705
<rdar://problem/30314393>

Reviewed by Antti Koivisto.

We also don't need to compute logicalHeight for logicalLeft/right since the
cases where it matters (floating boxes) are not supported by simple line layout.

Covered by existing test.

  • rendering/SimpleLineLayout.cpp:

(WebCore::SimpleLineLayout::updateLineConstrains):

  • rendering/SimpleLineLayoutTextFragmentIterator.cpp:

(WebCore::SimpleLineLayout::nextBreakablePositionInSegment):
(WebCore::SimpleLineLayout::TextFragmentIterator::textWidth):
(WebCore::SimpleLineLayout::TextFragmentIterator::runWidth): Deleted.

  • rendering/SimpleLineLayoutTextFragmentIterator.h:
2:15 PM Changeset in webkit [211530] by jer.noble@apple.com
  • 2 edits in trunk/Source/WebCore

Fix compilation error under recent clang update
https://bugs.webkit.org/show_bug.cgi?id=167707

Reviewed by Eric Carlson.

Include TypedArrayInlines.h to fix a "missing symbol" link error when compiling under a recent clang update.

  • platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
2:13 PM Changeset in webkit [211529] by Simon Fraser
  • 1 edit
    1 move
    2 deletes in trunk/LayoutTests

Clean up css3/filters/backdrop/backdrop-filter-with-clip-path.html expected results.

https://trac.webkit.org/changeset/201374 added some very confused results for this test.
Just move the -expected.html next to the test, and remove the .txt and .png results.

  • css3/filters/backdrop/backdrop-filter-with-clip-path-expected.html: Renamed from LayoutTests/platform/ios-simulator/css3/filters/backdrop/backdrop-filter-with-clip-path-expected.html.
  • css3/filters/backdrop/backdrop-filter-with-clip-path-expected.txt: Removed.
  • platform/mac/css3/filters/backdrop/backdrop-filter-with-clip-path-expected.png: Removed.
2:08 PM Changeset in webkit [211528] by Joseph Pecoraro
  • 2 edits in trunk/Websites/bugs.webkit.org

Patch Details: EWS Bubbles wrap on Patch Details page
https://bugs.webkit.org/show_bug.cgi?id=167709

Reviewed by Ryosuke Niwa.

  • template/en/default/attachment/edit.html.tmpl:

Match the iframe size in list.html.tmpl.

2:08 PM Changeset in webkit [211527] by Joseph Pecoraro
  • 9 edits in trunk/Source/WebCore

Performance Timeline: Prepare for Worker support
https://bugs.webkit.org/show_bug.cgi?id=167633

Reviewed by Ryosuke Niwa.

Remove references to Document/Frame in Performance. Instead use
ScriptExecutionContext and pass in the time origin / SecurityOrigin
where it is relevant. No tests should change this is just refactoring.

  • loader/ResourceTimingInformation.cpp:

(WebCore::ResourceTimingInformation::addResourceTiming):

  • page/DOMWindow.cpp:

(WebCore::DOMWindow::performance):

  • page/Performance.cpp:

(WebCore::Performance::Performance):
(WebCore::Performance::now):
(WebCore::Performance::reduceTimeResolution):
(WebCore::Performance::navigation):
(WebCore::Performance::timing):
(WebCore::Performance::addResourceTiming):
(WebCore::Performance::scriptExecutionContext): Deleted.

  • page/Performance.h:
  • page/Performance.idl:
  • page/PerformanceResourceTiming.cpp:

(WebCore::monotonicTimeToDOMHighResTimeStamp):
(WebCore::passesTimingAllowCheck):
(WebCore::PerformanceResourceTiming::PerformanceResourceTiming):
(WebCore::PerformanceResourceTiming::redirectStart):
(WebCore::PerformanceResourceTiming::redirectEnd):
(WebCore::PerformanceResourceTiming::fetchStart):
(WebCore::PerformanceResourceTiming::domainLookupStart):
(WebCore::PerformanceResourceTiming::domainLookupEnd):
(WebCore::PerformanceResourceTiming::connectStart):
(WebCore::PerformanceResourceTiming::connectEnd):
(WebCore::PerformanceResourceTiming::secureConnectionStart):
(WebCore::PerformanceResourceTiming::requestStart):
(WebCore::PerformanceResourceTiming::responseStart):
(WebCore::PerformanceResourceTiming::responseEnd):
(WebCore::PerformanceResourceTiming::networkLoadTimeToDOMHighResTimeStamp):
(WebCore::monotonicTimeToDocumentMilliseconds): Deleted.
(WebCore::PerformanceResourceTiming::initiatorType): Deleted.
(WebCore::PerformanceResourceTiming::resourceTimeToDocumentMilliseconds): Deleted.

  • page/PerformanceResourceTiming.h:
  • page/PerformanceUserTiming.cpp:

(WebCore::UserTiming::findExistingMarkStartTime):

2:02 PM Changeset in webkit [211526] by ap@apple.com
  • 2 edits in trunk/Tools

[Mac] TestWebKitAPI includes system frameworks incorrectly
https://bugs.webkit.org/show_bug.cgi?id=167703
rdar://problem/30301498

Reviewed by Ryosuke Niwa.

FRAMEWORK_SEARCH_PATH results in frameworks being treated as user ones, not system.
Make TestWebKitAPI use -iframework instead, like the rest of WebKit does.

Also, reduced the number of subframework search paths, looks like we only need one now.

  • TestWebKitAPI/Configurations/Base.xcconfig:
1:49 PM Changeset in webkit [211525] by matthew_hanson@apple.com
  • 5 edits in tags/Safari-603.1.23.1

Merge r211502. rdar://problem/30298722

1:49 PM Changeset in webkit [211524] by matthew_hanson@apple.com
  • 5 edits in tags/Safari-603.1.23.1/Source

Versioning.

1:44 PM Changeset in webkit [211523] by Simon Fraser
  • 3 edits in trunk/LayoutTests

REGRESSION (r211379): [ios-simulator] LayoutTest compositing/geometry/fixed-in-composited.html is failing
https://bugs.webkit.org/show_bug.cgi?id=167620
rdar://problem/30309207

The body needs to be taller to allow the scrollBy() to be a stable scroll.

  • compositing/geometry/fixed-in-composited.html:
1:26 PM Changeset in webkit [211522] by matthew_hanson@apple.com
  • 5 edits in branches/safari-603-branch

Merge r211502. rdar://problem/30298722

1:26 PM Changeset in webkit [211521] by matthew_hanson@apple.com
  • 6 edits
    2 adds in branches/safari-603-branch

Merge r211387. rdar://problem/29500273

1:26 PM Changeset in webkit [211520] by matthew_hanson@apple.com
  • 2 edits in branches/safari-603-branch/Source/WebCore

Merge r211386. rdar://problem/30204866

1:26 PM Changeset in webkit [211519] by matthew_hanson@apple.com
  • 15 edits
    1 copy
    2 adds in branches/safari-603-branch

Merge r211385. rdar://problem/29738502

1:26 PM Changeset in webkit [211518] by matthew_hanson@apple.com
  • 5 edits
    2 adds in branches/safari-603-branch

Merge r211337. rdar://problem/30126535

1:26 PM Changeset in webkit [211517] by matthew_hanson@apple.com
  • 2 edits in branches/safari-603-branch/Source/WebCore

Merge r211309. rdar://problem/30240378

1:26 PM Changeset in webkit [211516] by matthew_hanson@apple.com
  • 3 edits in branches/safari-603-branch/LayoutTests

Merge r211307. rdar://problem/29320059

1:26 PM Changeset in webkit [211515] by matthew_hanson@apple.com
  • 4 edits
    2 adds in branches/safari-603-branch

Merge r211305. rdar://problem/29320059

1:26 PM Changeset in webkit [211514] by matthew_hanson@apple.com
  • 2 edits in branches/safari-603-branch/Source/JavaScriptCore

Merge r211300. rdar://problem/30135571

1:26 PM Changeset in webkit [211513] by matthew_hanson@apple.com
  • 2 edits in branches/safari-603-branch/Source/WebKit2

Merge r211295. rdar://problem/30236297

1:26 PM Changeset in webkit [211512] by matthew_hanson@apple.com
  • 6 edits in branches/safari-603-branch

Merge r211249. rdar://problem/29539389

1:26 PM Changeset in webkit [211511] by matthew_hanson@apple.com
  • 11 edits
    1 add in branches/safari-603-branch

Merge r211240. rdar://problem/30247467b

1:26 PM Changeset in webkit [211510] by matthew_hanson@apple.com
  • 2 edits in branches/safari-603-branch/Source/WebCore

Merge r210217. rdar://problem/30260068

1:26 PM Changeset in webkit [211509] by matthew_hanson@apple.com
  • 4 edits
    1 add in branches/safari-603-branch

Merge r211194. rdar://problem/30201008

1:26 PM Changeset in webkit [211508] by matthew_hanson@apple.com
  • 5 edits in branches/safari-603-branch/Source

Versioning.

1:18 PM Changeset in webkit [211507] by jmarcell@apple.com
  • 1 copy in tags/Safari-604.1.6

Tag Safari-604.1.6.

1:06 PM Changeset in webkit [211506] by matthew_hanson@apple.com
  • 1 copy in tags/Safari-603.1.23.1

Tag Safari-603.1.23.1.

12:20 PM Changeset in webkit [211505] by jmarcell@apple.com
  • 1 delete in tags/Safari-604.1.6

Deleting tag.

12:13 PM Changeset in webkit [211504] by Chris Dumez
  • 6 edits
    2 adds in trunk

REGRESSION(r205136): {}.toString.call(crossOriginWindow) should not throw
https://bugs.webkit.org/show_bug.cgi?id=167681
<rdar://problem/30301117>

Reviewed by Mark Lam.

LayoutTests/imported/w3c:

Rebaseline W3C test now that we passing one more check. We're still failing
later because {}.toString.call(crossOriginWindow) returns "[object Window]"
instead of "[object Object]". I am planning to fix this in a follow-up.
This is not a regression since we were returning "[object Window]" before
r205136.

  • web-platform-tests/html/browsers/origin/cross-origin-objects/cross-origin-objects-expected.txt:

Source/WebCore:

As per https://html.spec.whatwg.org/#crossorigingetownpropertyhelper-(-o,-p-):
"""
If P is @@toStringTag, @@hasInstance, or @@isConcatSpreadable, then return
PropertyDescriptor{ Value?: undefined, Writable?: false, Enumerable?: false, Configurable?: true }.
"""

We now implement this behavior instead of throwing.

Test: http/tests/security/symbols-cross-origin.html

  • bindings/js/JSDOMWindowCustom.cpp:

(WebCore::jsDOMWindowGetOwnPropertySlotRestrictedAccess):

  • bindings/js/JSLocationCustom.cpp:

(WebCore::JSLocation::getOwnPropertySlotDelegate):

LayoutTests:

Add layout test coverage.

  • http/tests/security/symbols-cross-origin-expected.txt: Added.
  • http/tests/security/symbols-cross-origin.html: Added.
12:03 PM Changeset in webkit [211503] by Wenson Hsieh
  • 2 edits in trunk/Source/WTF

Unreviewed, fix the WebKit nightly open source build
<rdar://problem/30308635>

We cannot assume all internal SDKs have the latest WebKitAdditions, so we need an explicit header check here.

  • wtf/Platform.h:
12:00 PM Changeset in webkit [211502] by Brent Fulgham
  • 5 edits in trunk

Correct "filesHaveSameVolume" predicate
https://bugs.webkit.org/show_bug.cgi?id=167696
<rdar://problem/30298722>

Reviewed by David Kilzer.

Source/WebCore:

We are passing %-encoded strings to the underlying operating system's file system APIs.
This doesn't work. Instead, we need to present a decoded version of the file path
that matches what the system APIs expect.

Tested by new TestWebKitAPI Test.

  • platform/FileSystem.cpp:

(WebCore::filesHaveSameVolume): Make sure the file paths we give to the underlying
operating system are not percent encoded.

  • platform/FileSystem.h: Export 'filesHaveSameVolume' for use by testing system.

Tools:

Add new tests that confirm that the 'filesHaveSamePath' predicate properly handles
percent-escaped path inputs.

  • TestWebKitAPI/Tests/WebCore/FileSystem.cpp:

(TestWebKitAPI::FileSystemTest::spaceContainingFilePath):
(TestWebKitAPI::FileSystemTest::bangContainingFilePath):
(TestWebKitAPI::FileSystemTest::quoteContainingFilePath):
(TestWebKitAPI::TEST_F):

11:54 AM Changeset in webkit [211501] by commit-queue@webkit.org
  • 8 edits in trunk

[mac-wk1] LayoutTest media/modern-media-controls/tracks-support/tracks-support-click-track-in-panel.html is a flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=165319
<rdar://problem/30284104>

Patch by Antoine Quint <Antoine Quint> on 2017-02-01
Reviewed by Dean Jackson.

Source/WebCore:

Running media/controls/track-menu.html before media/modern-media-controls/tracks-support/tracks-
support-click-track-in-panel.html makes that test time out in all test runs. The root of the issue
is that animations are suspended by media/controls/track-menu.html with a call to
internals.suspendAnimations(), and that state isn't reset with a call to internals.resumeAnimations().
Then, media/modern-media-controls/tracks-support/tracks-support-click-track-in-panel.html fails because
the selection animation for the tracks panel menu item that is clicked never completes and the delegate
to notify that an item in the tracks panel was selected is never fired, which leads to the test failure.

We change Internals::suspendAnimations() and Internals::resumeAnimations() to only affect the current
document, rather than calling into AnimationController::suspendAnimations() which would do just that,
but also set a Frame-wide flag that would prevent further animations from running, even in a subsequent
document load.

  • dom/Document.cpp:

(WebCore::Document::prepareForDestruction): Ensure the document that is about to be destroyed is no longer
associated with an AnimationController.

  • page/animation/AnimationController.cpp:

(WebCore::AnimationControllerPrivate::ensureCompositeAnimation): Update the animation's suspend state in case
the document its renderer is associated with is suspended. This is required since previously CompositeAnimations
would set their suspend state in their constructor, based on the Frame-wide suspended state, but there is no
document to use as a basis to query its suspended state in that constructor.
(WebCore::AnimationControllerPrivate::animationsAreSuspendedForDocument):
(WebCore::AnimationControllerPrivate::detachFromDocument):
(WebCore::AnimationControllerPrivate::suspendAnimationsForDocument):
(WebCore::AnimationControllerPrivate::resumeAnimationsForDocument):
(WebCore::AnimationControllerPrivate::startAnimationsIfNotSuspended):
(WebCore::AnimationController::animationsAreSuspendedForDocument):
(WebCore::AnimationController::detachFromDocument):

  • page/animation/AnimationController.h:
  • page/animation/AnimationControllerPrivate.h:
  • testing/Internals.cpp:

(WebCore::Internals::animationsAreSuspended):
(WebCore::Internals::suspendAnimations):
(WebCore::Internals::resumeAnimations):

LayoutTests:

Since we've fixed the root cause of this test's flakiness, we no longer need to mark it as flaky.

  • platform/mac/TestExpectations:
11:44 AM Changeset in webkit [211500] by Ryan Haddad
  • 2 edits in trunk/Source/WebCore

Unreviewed build fix after r211488.

  • accessibility/AXObjectCache.h: Removed property svn:executable.
11:25 AM Changeset in webkit [211499] by matthew_hanson@apple.com
  • 6 edits in branches/safari-604.1.5-branch/Source

Versioning.

10:34 AM Changeset in webkit [211498] by Yusuke Suzuki
  • 2 edits in trunk/JSTests

Unreviewed, remove loop
https://bugs.webkit.org/show_bug.cgi?id=167694

It causes timeout.
Original bug can be tested even without this loop.

  • stress/arity-fixup-should-not-touch-stack-area-below-sp.js:
10:31 AM Changeset in webkit [211497] by Brent Fulgham
  • 2 edits in trunk/Source/WebCore

Unreviewed build fix.

  • html/HTMLMediaElement.h: Removed property svn:executable.
10:22 AM Changeset in webkit [211496] by matthew_hanson@apple.com
  • 1 copy in tags/Safari-604.1.5.2

New Tag.

10:22 AM Changeset in webkit [211495] by jer.noble@apple.com
  • 3 edits
    2 adds in trunk

NULL-deref crash in TextTrack::removeCue()
https://bugs.webkit.org/show_bug.cgi?id=167615

Reviewed by Eric Carlson.

Source/WebCore:

Test: http/tests/media/track-in-band-hls-metadata-crash.html

Follow-up to r211401. When passing around a reference to an object, the assumption is that
the caller is retaining the underlying object. This breaks down for
InbandDataTextTrack::removeDataCue(), which releases its own ownership of the cue object,
then passes the reference to that object to its superclass to do further remove steps. The
retain count of the cue can thus drop to zero within the scope of
InbandTextTrack::removeCue(). Use "take" semantics to remove the cue from the
m_incompleteCueMap without releasing ownership, and pass a reference to that retained object
on to removeCue(), guaranteeing that the cue will not be destroyed until after the
romeveDataCue() method returns.

  • html/track/InbandDataTextTrack.cpp:

(WebCore::InbandDataTextTrack::removeDataCue):

LayoutTests:

  • http/tests/media/track-in-band-hls-metadata-crash-expected.txt: Added.
  • http/tests/media/track-in-band-hls-metadata-crash.html: Added.
10:20 AM Changeset in webkit [211494] by matthew_hanson@apple.com
  • 2 edits in branches/safari-604.1.5-branch/Source/WebKit/mac

Merge r211492. rdar://problem/30305390

10:17 AM Changeset in webkit [211493] by matthew_hanson@apple.com
  • 6 edits in branches/safari-604.1.5-branch/Source

Versioning.

10:15 AM Changeset in webkit [211492] by Wenson Hsieh
  • 2 edits in trunk/Source/WebKit/mac

[WK1] Allow the drag client to be initialized on platforms that do not support drag and drop
https://bugs.webkit.org/show_bug.cgi?id=167695
<rdar://problem/30305390>

Reviewed by Sam Weinig.

Due to the common codepath for destroying the drag client, we need to ensure that the drag client actually
exists, even on platforms that do not support drag and drop, in order to avoid crashing when the DragController
is destroyed.

  • WebView/WebView.mm:

(-[WebView _commonInitializationWithFrameName:groupName:]):

10:12 AM Changeset in webkit [211491] by n_wang@apple.com
  • 3 edits
    2 adds in trunk

AX: Incorrect range from index and length in text controls when there are newlines
https://bugs.webkit.org/show_bug.cgi?id=167677
<rdar://problem/30300099>

Reviewed by Chris Fleizach.

Source/WebCore:

When there are newlines in text controls, the VisiblePosition that is created
from the index could be wrong. Because the index doesn't include the information
regarding a position's affinity. Fixed it by using CharacterOffset instead, since
it doesn't require that information.

Test: accessibility/mac/range-for-contenteditable-newline.html

  • accessibility/AXObjectCache.cpp:

(WebCore::AXObjectCache::traverseToOffsetInRange):
(WebCore::AXObjectCache::nextCharacterOffset):
(WebCore::AXObjectCache::characterOffsetForIndex):

LayoutTests:

  • accessibility/mac/range-for-contenteditable-newline-expected.txt: Added.
  • accessibility/mac/range-for-contenteditable-newline.html: Added.
10:08 AM Changeset in webkit [211490] by matthew_hanson@apple.com
  • 1 copy in tags/Safari-604.1.6

Tag Safari-604.1.6.

9:54 AM Changeset in webkit [211489] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

ios-simulator TestExpectations gardening.

Unreviewed test gardening.

  • platform/ios-simulator/TestExpectations:
9:46 AM Changeset in webkit [211488] by timothy@hatcher.name
  • 2 edits in trunk/Source/WebCore

AXObjectCache is missing two functions at link time when !HAVE(ACCESSIBILITY)
https://bugs.webkit.org/show_bug.cgi?id=167691

Reviewed by Chris Fleizach.

  • accessibility/AXObjectCache.h:

(WebCore::AXObjectCache::recomputeDeferredIsIgnored): Added empty stub.
(WebCore::AXObjectCache::performDeferredIsIgnoredChange): Added empty stub.

9:37 AM Changeset in webkit [211487] by timothy@hatcher.name
  • 2 edits in trunk/Source/WebCore

HTMLMediaElement.h fails to build when ENABLE(MEDIA_CONTROLS_SCRIPT) is false
https://bugs.webkit.org/show_bug.cgi?id=167689

Reviewed by Joseph Pecoraro.

  • html/HTMLMediaElement.h: Move mediaControlsHost() into the ENABLE(MEDIA_CONTROLS_SCRIPT)

block that is just above it to match m_mediaControlsHost.

9:34 AM Changeset in webkit [211486] by commit-queue@webkit.org
  • 3 edits in trunk/Source/JavaScriptCore

Web Inspector: Use guaranteed RunLoop instead of RunLoop::current for dispatching inspector GC event
https://bugs.webkit.org/show_bug.cgi?id=167683
<rdar://problem/30167791>

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2017-02-01
Reviewed by Timothy Hatcher.

  • inspector/agents/InspectorHeapAgent.cpp:

(Inspector::SendGarbageCollectionEventsTask::SendGarbageCollectionEventsTask):
Use RunLoop::main instead of RunLoop::current which may go away.

  • runtime/InitializeThreading.cpp:

(JSC::initializeThreading):
Ensure RunLoop::main is initialized when using JSC APIs.

9:33 AM Changeset in webkit [211485] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Remove keyboard shortcut to close tab - does not match expectations
https://bugs.webkit.org/show_bug.cgi?id=167672

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2017-02-01
Reviewed by Timothy Hatcher.

  • UserInterface/Views/TabBrowser.js:

(WebInspector.TabBrowser):

8:17 AM Changeset in webkit [211484] by commit-queue@webkit.org
  • 5 edits in trunk

[Readable Streams API] Implement ReadableByteStreamController pull()
https://bugs.webkit.org/show_bug.cgi?id=167593

Patch by Romain Bellessort <romain.bellessort@crf.canon.fr> on 2017-02-01
Reviewed by Youenn Fablet.

Source/WebCore:

Implemented pull() method for ReadableByteStreamController. Also updated
pendingPullIntos attribute, which was a more complex object than necessary
(an array is enough).

Added 2 tests that allow covering most of new code. Code not yet tested will
become reachable as the rest of the spec is implemented (new tests will then
be added).

  • Modules/streams/ReadableByteStreamInternals.js:

(privateInitializeReadableByteStreamController): Updated pendingPullIntos.
(readableByteStreamControllerCancel): Updated pendingPullIntos.
(readableByteStreamControllerClose): Updated pendingPullIntos.
(readableByteStreamControllerHandleQueueDrain): Added.
(readableByteStreamControllerPull): Added.

LayoutTests:

Added 2 tests that allow covering most of new code. Code not yet tested will
become reachable as the rest of the spec is implemented (new tests will then
be added).

  • streams/readable-byte-stream-controller-expected.txt:
  • streams/readable-byte-stream-controller.js:
7:28 AM Changeset in webkit [211483] by tpopela@redhat.com
  • 2 edits in trunk/Tools

Unreviewed. Fix coding style in MiniBrowser

  • MiniBrowser/gtk/BrowserWindow.c:

(editingCommandCallback):
(insertImageCommandCallback):
(insertLinkCommandCallback):

6:55 AM Changeset in webkit [211482] by akling@apple.com
  • 22 edits in trunk/Source

Implement the alwaysRunsAtBackgroundPriority WK2 setting using thread QoS.
<https://webkit.org/b/167387>
<rdar://problem/29711409>

Reviewed by Antti Koivisto.

Source/bmalloc:

Support changing the QoS level of the scavenger thread asynchronously through
a request variable. This is not the most elegant thing in the world, but since
threads are only allowed to change their own QoS class, our options are limited.

  • bmalloc/Heap.cpp:

(bmalloc::Heap::concurrentScavenge):

  • bmalloc/Heap.h:

(bmalloc::Heap::takeRequestedScavengerThreadQOSClass):
(bmalloc::Heap::setScavengerThreadQOSClass):

  • bmalloc/bmalloc.h:

(bmalloc::api::setScavengerThreadQOSClass):

Source/WebKit2:

Remove the old ProcessThrottlerClient implementation of alwaysRunsAtBackgroundPriority
and replace it with WTF::setGlobalMaxQOSClass().

If the setting is enabled, it's passed over to each WK2 child process along with its
bootstrap parameter, and we notify WTF in XPCServiceInitializer(), before anything
too threading related happens.

  • Platform/IPC/Connection.cpp:

(IPC::Connection::processIncomingMessage):

  • Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.h:

(WebKit::XPCServiceInitializer):

  • Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.mm:

(WebKit::XPCServiceInitializerDelegate::getExtraInitializationData):

  • UIProcess/API/APIProcessPoolConfiguration.h:
  • UIProcess/ChildProcessProxy.cpp:

(WebKit::ChildProcessProxy::ChildProcessProxy):
(WebKit::ChildProcessProxy::getLaunchOptions):

  • UIProcess/ChildProcessProxy.h:
  • UIProcess/Databases/DatabaseProcessProxy.cpp:

(WebKit::DatabaseProcessProxy::DatabaseProcessProxy):

  • UIProcess/Network/NetworkProcessProxy.cpp:

(WebKit::NetworkProcessProxy::NetworkProcessProxy):
(WebKit::NetworkProcessProxy::alwaysRunsAtBackgroundPriority): Deleted.

  • UIProcess/Network/NetworkProcessProxy.h:
  • UIProcess/ProcessThrottler.cpp:

(WebKit::ProcessThrottler::assertionState):

  • UIProcess/ProcessThrottlerClient.h:
  • UIProcess/WebProcessProxy.cpp:

(WebKit::WebProcessProxy::WebProcessProxy):
(WebKit::WebProcessProxy::alwaysRunsAtBackgroundPriority): Deleted.

  • UIProcess/WebProcessProxy.h:

Source/WTF:

Add a new mechanism for overriding the max thread QoS level globally:

void setGlobalMaxQOSClass(qos_class_t)
qos_class_t adjustedQOSClass(qos_class_t)

The QoS cap applies to all newly created threads, threads that try to override
their QoS class manually, and also passed down to bmalloc.

  • wtf/Threading.cpp:

(WTF::setCurrentThreadIsUserInteractive):
(WTF::setCurrentThreadIsUserInitiated):
(WTF::setGlobalMaxQOSClass):
(WTF::adjustedQOSClass):

  • wtf/Threading.h:
  • wtf/ThreadingPthreads.cpp:

(WTF::createThreadInternal):

  • wtf/cocoa/WorkQueueCocoa.cpp:

(WTF::dispatchQOSClass):

6:14 AM Changeset in webkit [211481] by tpopela@redhat.com
  • 10 edits
    3 adds in trunk

[GTK] Add an API to add a custom tab into the print dialog
https://bugs.webkit.org/show_bug.cgi?id=151998

Reviewed by Carlos Garcia Campos.

Source/WebKit2:

Add a new create-custom-widget signal to the WebKitPrintOperation. The
signal is emitted before the dialog is displayed and it gives an
opportunity to embed a custom widget in the dialog. You can do so by
creating a new WebKitPrintCustomWidget and returning it from the
create-custom-widget signal handler. The WebKitPrintCustomWidget is
emitting two signals:

  • update - emitted when the currently selected printer is changed,

to be able to actualize the custom widget based on the
current printer

  • apply - emitted when the dialog is closed, just before the

printing will start, to be able e.g. to change content
based on the custom widget state.

  • PlatformGTK.cmake:
  • UIProcess/API/gtk/WebKitAutocleanups.h:
  • UIProcess/API/gtk/WebKitPrintCustomWidget.cpp: Added.

(webkitPrintCustomWidgetSetProperty):
(webkit_print_custom_widget_class_init):
(webkit_print_custom_widget_new):
(webkit_print_custom_widget_get_widget):
(webkit_print_custom_widget_get_title):
(webkitPrintCustomWidgetEmitCustomWidgetApplySignal):
(webkitPrintCustomWidgetEmitUpdateCustomWidgetSignal):

  • UIProcess/API/gtk/WebKitPrintCustomWidget.h: Added.
  • UIProcess/API/gtk/WebKitPrintCustomWidgetPrivate.h: Added.
  • UIProcess/API/gtk/WebKitPrintOperation.cpp:

(webkitPrintOperationAccumulatorObjectHandled):
(webkit_print_operation_class_init):
(notifySelectedPrinterCallback):
(webkitPrintOperationRunDialog):

  • UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt:
  • UIProcess/API/gtk/docs/webkit2gtk-4.0.types:
  • UIProcess/API/gtk/docs/webkit2gtk-docs.sgml:
  • UIProcess/API/gtk/webkit2.h:

Tools:

Add a new WebKitPrintOperation/custom-widget test in TestPrinting
that is testing a newly added API.

  • TestWebKitAPI/Tests/WebKit2Gtk/TestPrinting.cpp:

(testPrintCustomWidget):
(beforeAll):

5:38 AM Changeset in webkit [211480] by Antti Koivisto
  • 9 edits in trunk/Source/WebKit2

Load resources speculatively
https://bugs.webkit.org/show_bug.cgi?id=167660

Reviewed by Andreas Kling.

  • NetworkProcess/cache/NetworkCache.cpp:

(WebKit::NetworkCache::Cache::makeEntry):

Factor to a function.

(WebKit::NetworkCache::Cache::store):

  • NetworkProcess/cache/NetworkCache.h:
  • NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp:

(WebKit::NetworkCache::SpeculativeLoad::SpeculativeLoad):

Support loads where we don't have existing cache entry to validate.

(WebKit::NetworkCache::SpeculativeLoad::didReceiveBuffer):

Synthesize a NetworkCache::Entry if we can't store it.

(WebKit::NetworkCache::SpeculativeLoad::didFinishLoading):
(WebKit::NetworkCache::SpeculativeLoad::didFailLoading):
(WebKit::NetworkCache::SpeculativeLoad::abort):
(WebKit::NetworkCache::SpeculativeLoad::didComplete):

  • NetworkProcess/cache/NetworkCacheSpeculativeLoad.h:
  • NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp:

(WebKit::NetworkCache::constructRevalidationRequest):

Make having existing cache entry optional.

(WebKit::NetworkCache::SpeculativeLoadManager::retrieveEntryFromStorage):

Allow validation without validation headers (that is, normal load).

(WebKit::NetworkCache::SpeculativeLoadManager::revalidateSubresource):

Make having existing cache entry optional.

(WebKit::NetworkCache::canRevalidate):

Allow speculative loads without validation headers if we have high confidence that the
page is going to request this resource again. This is based on the time span we have
seen this resource being loaded on a given page and how much time has elapsed since we
last loaded it.

For example if we have seen the resource over the last 10 days we'll speculate that it will
be required for the next 5 days.

(WebKit::NetworkCache::SpeculativeLoadManager::preloadEntry):
(WebKit::NetworkCache::SpeculativeLoadManager::revalidateEntry): Deleted.

  • NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.h:
  • NetworkProcess/cache/NetworkCacheSubresourcesEntry.cpp:

(WebKit::NetworkCache::SubresourceInfo::encode):
(WebKit::NetworkCache::SubresourceInfo::decode):

Encode the firstSeen and lastSeen time stamps.

(WebKit::NetworkCache::SubresourceInfo::SubresourceInfo):
(WebKit::NetworkCache::makeSubresourceInfoVector):
(WebKit::NetworkCache::SubresourcesEntry::SubresourcesEntry):
(WebKit::NetworkCache::SubresourcesEntry::updateSubresourceLoads):

  • NetworkProcess/cache/NetworkCacheSubresourcesEntry.h:

(WebKit::NetworkCache::SubresourceInfo::lastSeen):
(WebKit::NetworkCache::SubresourceInfo::firstSeen):
(WebKit::NetworkCache::SubresourceInfo::setNonTransient):
(WebKit::NetworkCache::SubresourceInfo::SubresourceInfo): Deleted.
(WebKit::NetworkCache::SubresourceInfo::setTransient): Deleted.

3:29 AM Changeset in webkit [211479] by Yusuke Suzuki
  • 5 edits
    1 add in trunk

ArityFixup should adjust SP first
https://bugs.webkit.org/show_bug.cgi?id=167239

Reviewed by Michael Saboff.

JSTests:

Significantly large arity fixup reliably causes this crash.

  • stress/arity-fixup-should-not-touch-stack-area-below-sp.js: Added.

Source/JavaScriptCore:

Arity fixup extends the stack and copy/fill the stack with
the values. At that time, we accidentally read/write stack
space below the stack pointer. As a result, we touch the area
of the stack space below the x64 red zone. These areas are unsafe.
OS may corrupt this space when constructing a signal stack.
The Linux kernel could not populate the pages for this space
and causes segmentation fault. This patch changes the stack
pointer before performing the arity fixup.

  • jit/ThunkGenerators.cpp:

(JSC::arityFixupGenerator):

  • llint/LowLevelInterpreter32_64.asm:
  • llint/LowLevelInterpreter64.asm:
2:59 AM Changeset in webkit [211478] by eocanha@igalia.com
  • 4 edits in trunk

[GStreamer][MSE] qtdemux: Update the tfdt patch to the version finally accepted upstream
https://bugs.webkit.org/show_bug.cgi?id=166529

Reviewed by Xabier Rodriguez-Calvar.

Source/WebCore:

  • platform/graphics/gstreamer/mse/AppendPipeline.cpp:

(WebCore::AppendPipeline::AppendPipeline): Don't use the "always-honor-tfdt" property
in qtdemux anymore.

Tools:

  • gtk/patches/gst-plugins-good-use-the-tfdt-decode-time.patch:

New patch version accepted in GStreamer upstream.

2:58 AM Changeset in webkit [211477] by calvaris@igalia.com
  • 2 edits in trunk/Tools

[GTK] Install either libxfont1-dev or libxfont-dev as dependency
https://bugs.webkit.org/show_bug.cgi?id=167498

Reviewed by Carlos Garcia Campos.

Depending on the distro version you can need either libxfont1-dev
or libfont-dev to build with jhbuild.

  • gtk/install-dependencies:
2:46 AM Changeset in webkit [211476] by Csaba Osztrogonác
  • 2 edits in trunk/Source/WebKit2

[Mac][cmake] Unreviewed speculative buildfix after r211403.
https://bugs.webkit.org/show_bug.cgi?id=167601

  • UIProcess/API/Cocoa/WKWebView.mm:
2:42 AM Changeset in webkit [211475] by Yusuke Suzuki
  • 2 edits in trunk/Source/WebCore

Unreviewed, build fix for macOS and iOS ports, part 2

Annotate the function with static.

  • bindings/js/ScriptModuleLoader.cpp:

(WebCore::rejectToPropagateNetworkError):

2:32 AM Changeset in webkit [211474] by Yusuke Suzuki
  • 1 edit
    1 move in trunk/Source/WebCore

Unreviewed, build fix for macOS and iOS ports

  • bindings/js/ModuleFetchFailureKind.h: Renamed from Source/ModuleFetchFailureKind.h.
2:00 AM Changeset in webkit [211473] by Yusuke Suzuki
  • 9 edits
    6 adds in trunk

Propagate networking errors correctly for import() operator
https://bugs.webkit.org/show_bug.cgi?id=167501

Reviewed by Ryosuke Niwa.

.:

  • Source/ModuleFetchFailureKind.h: Added.

Source/WebCore:

We use the promise chain inside the module loader pipeline.
The problem is that,

  1. The errors of loading module scripts are propagated through the promise's rejection.
  2. Some module related errors like syntax error (when scanning module dependencies) are reported at loading time (evaluating time). These errors are propagated through the promise rejections and dumped to the console. LoadableModuleScript set catch handler for that and print these errors to the console for ScriptElement.
  3. Some of errors are already reported to the console. For example, networking errors are reported by the CachedModuleLoader.
  4. But there is no way to distinguish between (2) and (3) at the catch handler.

Previously, we propagate the special symbol for the already reported errors to distinguish
that. This was OK because these errors cannot be catched by the user code. However,
recent import() call needs to expose these errors to the user code. So now, accidentally,
the special purpose symbol is exposed.

Instead of propagating the special symbol, this patch just propagates the errors. But these
error objects are annotated with the private symbol. So these errors can be distinguished
from the other ones.

Currently, we do not have the way to expose the error details to the client of the
CachedScript. So we just report the error with the failed / canceled. This should be
more descriptive error messages in the separate patch[1].

[1]: https://bugs.webkit.org/show_bug.cgi?id=167553

Tests: http/tests/security/mixedContent/import-insecure-script-in-iframe.html

js/dom/modules/import-not-found-error.html

  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/JSDOMPromise.h:

(WebCore::DeferredPromise::resolveWithCallback):
(WebCore::DeferredPromise::rejectWithCallback):

  • bindings/js/ScriptController.cpp:

(WebCore::ScriptController::setupModuleScriptHandlers):

  • bindings/js/ScriptController.h:

(WebCore::ScriptController::moduleLoaderAlreadyReportedErrorSymbol): Deleted.
(WebCore::ScriptController::moduleLoaderFetchingIsCanceledSymbol): Deleted.

  • bindings/js/ScriptModuleLoader.cpp:

(WebCore::rejectToPropagateNetworkError):
(WebCore::ScriptModuleLoader::fetch):
(WebCore::ScriptModuleLoader::notifyFinished):

  • bindings/js/WebCoreBuiltinNames.h:

LayoutTests:

  • http/tests/security/mixedContent/import-insecure-script-in-iframe-expected.txt: Added.
  • http/tests/security/mixedContent/import-insecure-script-in-iframe.html: Added.
  • http/tests/security/mixedContent/resources/frame-with-insecure-import.html: Added.
  • js/dom/modules/import-not-found-error-expected.txt: Added.
  • js/dom/modules/import-not-found-error.html: Added.

Jan 31, 2017:

11:55 PM Changeset in webkit [211472] by Antti Koivisto
  • 4 edits in trunk/Source

Teach cache coders to encode time_points
https://bugs.webkit.org/show_bug.cgi?id=167670

Reviewed by Andreas Kling.

Source/WebKit2:

Encode time_point instead of duration.

  • NetworkProcess/cache/NetworkCacheStorage.cpp:

(WebKit::NetworkCache::decodeRecordMetaData):
(WebKit::NetworkCache::Storage::readRecord):
(WebKit::NetworkCache::encodeRecordMetaData):
(WebKit::NetworkCache::Storage::encodeRecord):
(WebKit::NetworkCache::Storage::traverse):

Source/WTF:

  • wtf/persistence/Coders.h:

(WTF::Persistence::Coder<std::chrono::system_clock::time_point>::encode):
(WTF::Persistence::Coder<std::chrono::system_clock::time_point>::decode):

11:46 PM Changeset in webkit [211471] by Wenson Hsieh
  • 5 edits
    2 adds in trunk

Regression (Safari 10.1): Pressing Return in a contenteditable no longer inserts a line break under certain conditions
https://bugs.webkit.org/show_bug.cgi?id=167525
<rdar://problem/30270210>

Reviewed by Ryosuke Niwa.

Source/WebCore:

Test: fast/events/input-events-insert-newlines-after-mutation.html

Reverts an unintended change made while refactoring code for input events that caused input events to be
dispatched immediately rather than on the scoped queue. Normally, input events are dispatched in
CompositeEditCommand::apply after the end of the scope, but TypingCommands may fire input events *from within*
the scope by calling typingAddedToOpenCommand.

Instead, TypingCommands should always dispatch events
synchronously after the end of the scoped queue in CompositeEditCommand::apply, but this is a riskier change
than we should currently allow, so we should revert to our old behavior for the time being.

  • editing/Editor.cpp:

LayoutTests:

Adds a new test covering newline insertion with mutation observers and an input event handler. Also rebaselines
a drag and drop test to account for dispatching input events on the scoped queue.

  • fast/events/input-events-drag-and-drop-expected.txt:
  • fast/events/input-events-insert-newlines-after-mutation-expected.txt: Added.
  • fast/events/input-events-insert-newlines-after-mutation.html: Added.
  • platform/ios-simulator/TestExpectations:
10:07 PM Changeset in webkit [211470] by Brent Fulgham
  • 5 edits in trunk/Source/WebKit2

[WebRTC][WebKit2] Support expanding the sandbox to allow microphone access at process launch
https://bugs.webkit.org/show_bug.cgi?id=167669
<rdar://problem/29974333>

Reviewed by Alexey Proskuryakov.

This change implements a temporary workaround to <rdar://problem/29448368> to allow us to do live
testing of WebRTC microphone access. It should be removed when that underlying bug is fixed.

This change adds a new process creation parameter that indicates whether we wish to expand the
sandbox to allow microphone access.

Tested by WebRTC suite (part of another set of bugs).

  • Shared/WebProcessCreationParameters.cpp:

(WebKit::WebProcessCreationParameters::encode): Serialize the audio access entitlement handle.
(WebKit::WebProcessCreationParameters::decode): Ditto.

  • Shared/WebProcessCreationParameters.h:
  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::createNewWebProcess): Create an entitlement handle and pass along to
the child process.

  • WebProcess/cocoa/WebProcessCocoa.mm:

(WebKit::WebProcess::platformInitializeWebProcess): If an audio entitlement (for the microphone)
was desired, expand the sandbox to include access.

9:40 PM Changeset in webkit [211469] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WTF

Removed unused m_nestedCount from RunLoop
https://bugs.webkit.org/show_bug.cgi?id=167674

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2017-01-31
Reviewed by Sam Weinig.

  • wtf/RunLoop.h:
  • wtf/cf/RunLoopCF.cpp:

(WTF::RunLoop::RunLoop):
(WTF::RunLoop::run):

9:34 PM Changeset in webkit [211468] by Joseph Pecoraro
  • 5 edits in trunk/Source/WebKit/mac

ld: warning: instance method '_setAutofilled:' in category conflicts with same method from another category
https://bugs.webkit.org/show_bug.cgi?id=167684

Reviewed by Dan Bernstein.

  • DOM/DOMHTML.mm:

(-[DOMHTMLInputElement _isAutofilled]): Deleted.
(-[DOMHTMLInputElement _setAutofilled:]): Deleted.
Consolidate in the WebDOMOperationsPrivate category.

  • DOM/DOMPrivate.h:

Include WebDOMOperationsPrivate header to get other DOM Private categories.

  • DOM/WebDOMOperations.mm:

(-[DOMHTMLInputElement _isAutofilled]):

  • DOM/WebDOMOperationsPrivate.h:

Include getter alongside the setter.

7:56 PM Changeset in webkit [211467] by Ryan Haddad
  • 2 edits in trunk/Tools

Disable API test WebKit2.WKWebProcessPlugInRangeHandle
https://bugs.webkit.org/show_bug.cgi?id=167594

Unreviewed test gardening.

Disabling this test while we investigate the cause of a timeout on ios-simulator.

  • TestWebKitAPI/Tests/WebKit2Cocoa/BundleRangeHandle.mm:

(TEST):

7:19 PM Changeset in webkit [211466] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

Simple line layout: Do not assert on zero length/width trailing whitespace.
https://bugs.webkit.org/show_bug.cgi?id=167679

Reviewed by Simon Fraser.

It's valid to have an zero length/width trailing whitespace.

Covered by existing tests.

  • rendering/SimpleLineLayout.cpp:

(WebCore::SimpleLineLayout::LineState::removeTrailingWhitespace): Zero length -> nothing to do.
Zero width with length > 0 (font-size: 0) -> remove trailing run.

6:16 PM Changeset in webkit [211465] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Marking gamepad/gamepad-visibility-1.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=167517

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
5:48 PM Changeset in webkit [211464] by fpizlo@apple.com
  • 3 edits
    12 moves
    3 adds in trunk

Move slow-running microbenchmarks out of JSTests/microbenchmarks
https://bugs.webkit.org/show_bug.cgi?id=167676

Reviewed by Saam Barati.
JSTests:


The microbenchmarks directory is profitable when it's cheap to run. This change moves very slow
tests (>=200ms running time on my machine) and puts them in JSTests/slowMicrobenchmarks instead.
That directory is run only through slow!; defaultQuickRun and is not run by run-jsc-benchmarks.
This is a big progression in test running time. But because it frontloads more slow tests, the
tests will seem to run more slowly when you first start the test runner.

  • microbenchmarks/default-derived-constructor.js: Removed.
  • microbenchmarks/dense-set.js: Removed.
  • microbenchmarks/ftl-polymorphic-div.js: Removed.
  • microbenchmarks/ftl-polymorphic-mul.js: Removed.
  • microbenchmarks/function-bind-inlining.js: Removed.
  • microbenchmarks/function-bind-no-inlining.js: Removed.
  • microbenchmarks/large-map-iteration-with-additions.js: Removed.
  • microbenchmarks/large-map-iteration-with-mutation.js: Removed.
  • microbenchmarks/map-get-get-cse.js: Removed.
  • microbenchmarks/misc-bugs-847389-jpeg2000.js: Removed.
  • microbenchmarks/spread-small-array.js: Removed.
  • microbenchmarks/v8-raytrace-with-try-catch-high-frequency-throws.js: Removed.
  • slowMicrobenchmarks: Added.
  • slowMicrobenchmarks.yaml: Added.
  • slowMicrobenchmarks/README: Added.
  • slowMicrobenchmarks/default-derived-constructor.js: Copied from JSTests/microbenchmarks/default-derived-constructor.js.
  • slowMicrobenchmarks/dense-set.js: Copied from JSTests/microbenchmarks/dense-set.js.
  • slowMicrobenchmarks/ftl-polymorphic-div.js: Copied from JSTests/microbenchmarks/ftl-polymorphic-div.js.
  • slowMicrobenchmarks/ftl-polymorphic-mul.js: Copied from JSTests/microbenchmarks/ftl-polymorphic-mul.js.
  • slowMicrobenchmarks/function-bind-inlining.js: Copied from JSTests/microbenchmarks/function-bind-inlining.js.
  • slowMicrobenchmarks/function-bind-no-inlining.js: Copied from JSTests/microbenchmarks/function-bind-no-inlining.js.
  • slowMicrobenchmarks/large-map-iteration-with-additions.js: Copied from JSTests/microbenchmarks/large-map-iteration-with-additions.js.
  • slowMicrobenchmarks/large-map-iteration-with-mutation.js: Copied from JSTests/microbenchmarks/large-map-iteration-with-mutation.js.
  • slowMicrobenchmarks/map-get-get-cse.js: Copied from JSTests/microbenchmarks/map-get-get-cse.js.
  • slowMicrobenchmarks/misc-bugs-847389-jpeg2000.js: Copied from JSTests/microbenchmarks/misc-bugs-847389-jpeg2000.js.
  • slowMicrobenchmarks/spread-small-array.js: Copied from JSTests/microbenchmarks/spread-small-array.js.
  • slowMicrobenchmarks/v8-raytrace-with-try-catch-high-frequency-throws.js: Copied from JSTests/microbenchmarks/v8-raytrace-with-try-catch-high-frequency-throws.js.

Tools:

  • Scripts/run-javascriptcore-tests:

(runJSCStressTests): Add slowMicrobenchmarks.yaml.

5:46 PM Changeset in webkit [211463] by fpizlo@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Make verifyEdge a RELEASE_ASSERT
<rdar://problem/30296879>

Rubber stamped by Saam Barati.

  • dfg/DFGAbstractInterpreterInlines.h:

(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):

5:26 PM Changeset in webkit [211462] by commit-queue@webkit.org
  • 23 edits in trunk/Source/WebInspectorUI

Web Inspector: Tooltip text should not end in a period
https://bugs.webkit.org/show_bug.cgi?id=167130

Patch by Devin Rousso <Devin Rousso> on 2017-01-31
Reviewed by Brian Burg.

  • Localizations/en.lproj/localizedStrings.js:
  • UserInterface/Views/BezierEditor.js:

(WebInspector.BezierEditor):

  • UserInterface/Views/CSSStyleDeclarationSection.js:

(WebInspector.CSSStyleDeclarationSection.prototype._handleSelectorPaste):

  • UserInterface/Views/CSSStyleDeclarationTextEditor.js:

(WebInspector.CSSStyleDeclarationTextEditor.prototype._createTextMarkerForPropertyIfNeeded):

  • UserInterface/Views/DOMNodeDetailsSidebarPanel.js:

(WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshAccessibility.accessibilityPropertiesCallback):

  • UserInterface/Views/DebuggerSidebarPanel.js:

(WebInspector.DebuggerSidebarPanel):

  • UserInterface/Views/GeneralTabBarItem.js:

(WebInspector.GeneralTabBarItem):

  • UserInterface/Views/HeapSnapshotContentView.js:

(WebInspector.HeapSnapshotInstancesContentView):
(WebInspector.HeapSnapshotObjectGraphContentView):

  • UserInterface/Views/InlineSwatch.js:

(WebInspector.InlineSwatch):

  • UserInterface/Views/ObjectTreePropertyTreeElement.js:

(WebInspector.ObjectTreePropertyTreeElement.prototype._updateEntries):
(WebInspector.ObjectTreePropertyTreeElement.prototype._updateProperties):

  • UserInterface/Views/ObjectTreeView.js:

(WebInspector.ObjectTreeView.prototype._updateEntries):
(WebInspector.ObjectTreeView.prototype._updateProperties):

  • UserInterface/Views/ResourceTimelineDataGridNode.js:

(WebInspector.ResourceTimelineDataGridNode.prototype._mouseoverRecordBar):

  • UserInterface/Views/SpringEditor.js:

(WebInspector.SpringEditor):

  • UserInterface/Views/TypeTreeElement.js:

(WebInspector.TypeTreeElement.prototype.onpopulate):

  • UserInterface/Views/TypeTreeView.js:

(WebInspector.TypeTreeView.prototype._populate):

  • UserInterface/Views/VisualStyleCommaSeparatedKeywordEditor.js:

(WebInspector.VisualStyleCommaSeparatedKeywordEditor):

  • UserInterface/Views/VisualStyleDetailsPanel.js:

(WebInspector.VisualStyleDetailsPanel.prototype._generateSection.createOptionsElement):

  • UserInterface/Views/VisualStylePropertyEditorLink.js:

(WebInspector.VisualStylePropertyEditorLink.prototype.set linked):

  • UserInterface/Views/VisualStylePropertyNameInput.js:

(WebInspector.VisualStylePropertyNameInput):

  • UserInterface/Views/VisualStyleSelectorSection.js:

(WebInspector.VisualStyleSelectorSection):

  • UserInterface/Views/VisualStyleSelectorTreeItem.js:

(WebInspector.VisualStyleSelectorTreeItem.prototype._updateCheckboxTitle):
(WebInspector.VisualStyleSelectorTreeItem.prototype._updateSelectorIcon):

5:26 PM Changeset in webkit [211461] by jfbastien@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

OSR entry: delay outer-loop compilation when at inner-loop
https://bugs.webkit.org/show_bug.cgi?id=167149

Reviewed by Filip Pizlo.

r211224 was reverted because it caused a massive kraken/ai-astar
regression. This patch instead does the minimally-disruptive
change to fix the original bug as described below, but omits extra
tuning and refactoring which I had before. I'll commit tuning and
refactoring separately, if this sticks. This patch is therefore
very minimal, and layers carefully on top of the complex
spaghetti-logic. The only change it makes is that it uses triggers
to indicate to outer loops that they should compile, which fixes
the immediate bug and seems roughly perf neutral (maybe a small
gain on kraken sometimes, other times a small regression as would
be expected from compiling later).

As of https://bugs.webkit.org/show_bug.cgi?id=155217 OSR
compilation can be kicked off for an entry into an outer-loop,
while executing an inner-loop. This is desirable because often the
codegen from an inner-entry isn't as good as the codegen from an
outer-entry, but execution from an inner-loop is often pretty hot
and likely to kick off compilation. This approach provided nice
speedups on Kraken because we'd select to enter to the outer-loop
very reliably, which reduces variability (the inner-loop was
selected roughly 1/5 times from my unscientific measurements).

When compilation starts we take a snapshot of the JSValues at the
current execution state using OSR's recovery mechanism. These
values are passed to the compiler and are used as way to perform
type profiling, and could be used to observe cell types as well as
to perform predictions such as through constant propagation.

It's therefore desired to enter from the outer-loop when we can,
but we need to be executing from that location to capture the
right JSValues, otherwise we're confusing the compiler and giving
it inaccurate JSValues which can lead it to predict the wrong
things, leading to suboptimal code or recompilation due to
misprediction, or in super-corner-cases a crash.

These effects are pretty hard to measure: Fil points out that
marsalis-osr-entry really needs mustHandleValues (the JSValues
from the point of execution) because right now it just happens to
correctly guess int32. I tried removing mustHandleValues entirely
and saw no slowdowns, but our benchmarks probably aren't
sufficient to reliably find issues, sometimes because we happen to
have sufficient mitigations.

DFG tier-up was added here:
https://bugs.webkit.org/show_bug.cgi?id=112838

  • dfg/DFGOperations.cpp:
5:04 PM Changeset in webkit [211460] by Megan Gardner
  • 2 edits in trunk/Tools

Make Dump Render Tree not crash
https://bugs.webkit.org/show_bug.cgi?id=167667

DumpRenderTree is crashing when running WK2 tests that it's not supposed to be running.
DumpRenderTree uses RunLoop::main.dispatch(), but that crashes because it's not set up on iOS.
So we're making use of RunWebThread, which is the correct thing to do on iOS, and it doesn't crash.
This does not fix any tests, it just fixes the crash.

Reviewed by Simon Fraser.

  • DumpRenderTree/TestRunner.cpp:

(TestRunner::callUIScriptCallback):

4:39 PM Changeset in webkit [211459] by timothy_horton@apple.com
  • 2 edits in trunk/Source/WebKit2

Fix the build.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _snapshotRect:intoImageOfWidth:completionHandler:]):

4:18 PM Changeset in webkit [211458] by achristensen@apple.com
  • 2 edits in trunk/Source/WebCore

Fix debug libwebrtc build after r211439
https://bugs.webkit.org/show_bug.cgi?id=167572

  • platform/mediastream/libwebrtc/LibWebRTCAudioModule.cpp:

(WebCore::LibWebRTCAudioModule::OnMessage):

4:15 PM Changeset in webkit [211457] by Jonathan Bedard
  • 2 edits in trunk/Tools

Workaround for simctl install failing to report install failure
https://bugs.webkit.org/show_bug.cgi?id=167654

Reviewed by Daniel Bates.

simctl install will sometimes report success even though install has failed.
To workaround this bug, we attempt an app launch after install to ensure
install has succeeded.

  • Scripts/webkitpy/xcode/simulator.py:

(Device.install_app): Attempt app launch after install, retry install if launch fails.
(Device.launch_app): Correct comment.

4:01 PM Changeset in webkit [211456] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

Simple line layout: Collect fragments in LineState only when needed for post-processing.
https://bugs.webkit.org/show_bug.cgi?id=167655
<rdar://problem/30290592>

Reviewed by Antti Koivisto.

The fragments we need to keep around for basic line breaking are the last and last non-whitespace fragments.
However in certain cases such as text-align: justify, we have to traverse the entire line
at post-processing which requires all the fragments on the current line.
This patch speeds up the basic line handling by using m_fragment list only for the special cases.
It improves PerformanceTests/Layout/simple-line-layout-non-repeating-text.html by ~7% (local measurement)
median: 114.25 runs/s -> median: 122.16 runs

Covered by existing tests.

  • rendering/SimpleLineLayout.cpp:

(WebCore::SimpleLineLayout::LineState::setNeedsAllFragments):
(WebCore::SimpleLineLayout::LineState::hasTrailingWhitespace):
(WebCore::SimpleLineLayout::LineState::lastFragment):
(WebCore::SimpleLineLayout::LineState::expansionOpportunityCount):
(WebCore::SimpleLineLayout::LineState::isEmpty):
(WebCore::SimpleLineLayout::LineState::endPositionForCollapsedFragment):
(WebCore::SimpleLineLayout::LineState::appendFragmentAndCreateRunIfNeeded): Track uncompleted width.
(WebCore::SimpleLineLayout::LineState::revertToLastCompleteFragment):
(WebCore::SimpleLineLayout::LineState::removeTrailingWhitespace):
(WebCore::SimpleLineLayout::removeTrailingWhitespace):
(WebCore::SimpleLineLayout::updateLineConstrains): Set the slow path for text-align: justify.
(WebCore::SimpleLineLayout::createLineRuns):
(WebCore::SimpleLineLayout::closeLineEndingAndAdjustRuns):
(WebCore::SimpleLineLayout::createTextRuns):

  • rendering/SimpleLineLayoutTextFragmentIterator.h:

(WebCore::SimpleLineLayout::TextFragmentIterator::TextFragment::isValid):
(WebCore::SimpleLineLayout::TextFragmentIterator::TextFragment::length):

3:49 PM Changeset in webkit [211455] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

com.apple.WebKit.WebContent.Development crashed in com.apple.WebCore: WebCore::FrameView::didDestroyRenderTree
https://bugs.webkit.org/show_bug.cgi?id=167665
<rdar://problem/30241193>

Reviewed by Andreas Kling.

When destroying a PageCache entry, we would call Document::prepareFromDestruction()
which would destroy the render tree and then call FrameView::didDestroyRenderTree().
We would sometimes hit the ASSERT(m_widgetsInRenderTree.isEmpty()) assertion in
didDestroyRenderTree(). This indicates that there are still RenderWidgets associated
with the FrameView even though we claim we already destroyed the render tree.

The reason for this is that, in the PageCache context, the top document's frame is
reused on navigation and may not be associated with a new document that is currently
displayed, has a render tree (and possible RenderWidgets). The solution proposed is
to stop calling FrameView::didDestroyRenderTree() in Document::prepareFromDestruction()
if the frame's document is not |this|. This happens when the document is destroyed
while in PageCache. We do not want to mess with the frame / frameview in this case
since they are no longer associated to the present document anymore.

No new tests, already covered by existing tests which currently crash flakily.

  • dom/Document.cpp:

(WebCore::Document::destroyRenderTree):

3:38 PM Changeset in webkit [211454] by commit-queue@webkit.org
  • 11 edits in trunk/Source/WebCore

Remove unused/rarely used bindings helpers
https://bugs.webkit.org/show_bug.cgi?id=167648

Patch by Sam Weinig <sam@webkit.org> on 2017-01-31
Reviewed by Anders Carlsson.

  • bindings/js/JSDOMBinding.cpp:
  • bindings/js/JSDOMBinding.h:

(WebCore::jsString): Deleted.
(WebCore::jsStringOrUndefined): Deleted.
(WebCore::finiteInt32Value): Deleted.
(WebCore::toJS): Deleted.
Remove unused functions. The toJS overrides can be replaced with their
modern JSDOMConvert counterparts.

  • bindings/js/JSDOMExceptionHandling.h:

(WebCore::toJS): Deleted.
(WebCore::toJSNewlyCreated): Deleted.
Remove unused functions.

  • bindings/js/JSDOMIterator.h:

Add more specific include of JSDOMConvert.h to fix compile.

  • bindings/js/JSDOMPromise.cpp:

(WebCore::DeferredPromise::reject):
Create the Symbol directly, instead of using the toJS override.

  • bindings/js/JSWorkerCustom.cpp:

(WebCore::constructJSWorker):
Use JSDOMConvert toJS function.

  • bindings/js/JSXMLHttpRequestCustom.cpp:

(WebCore::JSXMLHttpRequest::retrieveResponse):
Use JSDOMConvert toJS functions.

  • bindings/js/ScriptController.h:

Add missing forward declaration of URL.

  • bindings/js/ScriptModuleLoader.cpp:

(WebCore::ScriptModuleLoader::resolve):
Create the Symbol directly, instead of using the toJS override.

  • html/HTMLPlugInImageElement.cpp:

(WebCore::HTMLPlugInImageElement::didAddUserAgentShadowRoot):
Use JSDOMConvert toJS functions.

3:28 PM Changeset in webkit [211453] by Wenson Hsieh
  • 2 edits in trunk/Source/WebCore

WebItemProviderPasteboard should be robust when UIItemProvider fails to initialize an object
https://bugs.webkit.org/show_bug.cgi?id=167663
<rdar://problem/30294240>

Reviewed by Tim Horton.

Adds a nil check for the result of -createObjectOfClass:error:.

  • platform/ios/WebItemProviderPasteboard.mm:

(-[WebItemProviderPasteboard valuesForPasteboardType:inItemSet:]):
(-[WebItemProviderPasteboard _tryToCreateAndAppendObjectOfClass:toArray:usingProvider:]):

3:24 PM Changeset in webkit [211452] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: add CSS color keyword entries for all grey/gray variations
https://bugs.webkit.org/show_bug.cgi?id=167668

Patch by Devin Rousso <Devin Rousso> on 2017-01-31
Reviewed by Matt Baker.

  • UserInterface/Models/Color.js:

(WebInspector.Color.Keywords):

3:22 PM Changeset in webkit [211451] by commit-queue@webkit.org
  • 9 edits in trunk/Source/WebInspectorUI

Web Inspector: Network tab: provide a way to preserve log on navigation
https://bugs.webkit.org/show_bug.cgi?id=166908

Patch by Devin Rousso <Devin Rousso> on 2017-01-31
Reviewed by Matt Baker.

  • Localizations/en.lproj/localizedStrings.js:
  • UserInterface/Base/Setting.js:

(WebInspector.settings):
Add clearNetworkOnNavigate global setting.

  • UserInterface/Views/NetworkGridContentView.css:

(.content-view.network-grid > .data-grid .preserved:not(.selected) .cell-content):
(.content-view.network-grid > .data-grid .preserved:not(.selected) .cell-content .timeline-record-bar > .segment):

  • UserInterface/Views/NetworkGridContentView.js:

(WebInspector.NetworkGridContentView):
(WebInspector.NetworkGridContentView.prototype._mainResourceDidChange):

  • UserInterface/Views/NetworkSidebarPanel.css:

(.sidebar > .panel.navigation.network .tree-outline > .preserved:not(.selected) > :not(.status)):
(.sidebar > .panel.navigation.network .tree-outline > .preserved:not(.selected) > .icon):

  • UserInterface/Views/NetworkSidebarPanel.js:

(WebInspector.NetworkSidebarPanel):
(WebInspector.NetworkSidebarPanel.prototype._mainResourceDidChange):
Add styling to preserved network records.

  • UserInterface/Controllers/TimelineManager.js:

(WebInspector.TimelineManager.prototype._mainResourceDidChange):
Only reset the persistent network timeline if the clearNetworkOnNavigate setting is true.

  • UserInterface/Views/SettingsTabContentView.js:

(WebInspector.SettingsTabContentView.prototype.initialLayout):
(WebInspector.SettingsTabContentView):
Add checkbox and spacers for new setting.

2:44 PM Changeset in webkit [211450] by Ryan Haddad
  • 1 edit
    1 add in trunk/LayoutTests

Adding ios-simulator result file for fast/shadow-dom/copy-shadow-tree.html.

Unreviewed test gardening.

  • platform/ios-simulator/fast/shadow-dom/copy-shadow-tree-expected.txt: Added.
2:40 PM Changeset in webkit [211449] by Keith Rollin
  • 2 edits in trunk/Source/WebCore

Variable used after it's been WTFMove'd
https://bugs.webkit.org/show_bug.cgi?id=167658

Reviewed by Chris Dumez.

Rather than WTFMoving the variable as part of passing it to a function
that takes an RValue-ref, call copyRef to provide the RValue-ref. This
preserves the original variable for later use in the function.

No new tests -- this issue was found by inspection. It's not apparent
what the side-effect of this bug is or how a test would verify it.

  • loader/SubresourceLoader.cpp:

(WebCore::SubresourceLoader::didReceiveDataOrBuffer):

2:31 PM Changeset in webkit [211448] by fpizlo@apple.com
  • 15 edits in trunk/Source

The mutator should be able to perform increments of GC work
https://bugs.webkit.org/show_bug.cgi?id=167528

Reviewed by Keith Miller and Geoffrey Garen.

Source/JavaScriptCore:

The cool thing about having a concurrent and parallel collector is that it's easy to also make
it incremental, because the load balancer can also hand over work to anyone (including the
mutator) and since the collector is running concurrently anyway, the mutator can usually rely
on the balancer having some spare work.

This change adds a classic work-based incremental mode to the GC. When you allocate K bytes,
you have to do Options::gcIncrementScale() * K "bytes" of draining. This is ammortized so that
it only happens in allocation slow paths.

On computers that have a lot of CPUs, this mode is not profitable and we set gcIncrementScale
to zero. On such computers, Riptide was already performing great because there was no way that
one mutator thread could outpace many GC threads. But on computers with fewer CPUs, there were
problems having to do with making the collector progress quickly enough so that the heap
doesn't grow too much. The stochastic scheduler actually made things worse, because it relies
a lot on the fact that the GC will simply be faster than the mutator anyway. The old scheduler
claimed to address the problem of GC pace, but it used a time-based scheduler, which is not as
precise at keeping pase as the new work-based incremental mode.

In theory, the work-based mode guarantees a bound on how much the heap can grow during a
collection just because each byte allocated means some number of bytes visited. We don't try
to create such a theoretical bound. We're just trying to give the collector an unfair advantage
in any race with the mutator.

Turning on incremental mode, the stochastic scheduler, and passive draining in combination with
each other is a huge splay-latency speed-up on my iPad. It's also a CDjs progression. It does
regress splay-throughput, but I think that's fine (the regression is 11%, the progression is
3x).

  • heap/Heap.cpp:

(JSC::Heap::Heap):
(JSC::Heap::~Heap):
(JSC::Heap::markToFixpoint):
(JSC::Heap::updateObjectCounts):
(JSC::Heap::endMarking):
(JSC::Heap::finalize):
(JSC::Heap::didAllocate):
(JSC::Heap::visitCount):
(JSC::Heap::bytesVisited):
(JSC::Heap::forEachSlotVisitor):
(JSC::Heap::performIncrement):
(JSC::Heap::threadVisitCount): Deleted.
(JSC::Heap::threadBytesVisited): Deleted.

  • heap/Heap.h:
  • heap/MarkStack.cpp:

(JSC::MarkStackArray::transferTo):

  • heap/MarkStack.h:
  • heap/SlotVisitor.cpp:

(JSC::SlotVisitor::didStartMarking):
(JSC::SlotVisitor::clearMarkStacks):
(JSC::SlotVisitor::appendToMarkStack):
(JSC::SlotVisitor::noteLiveAuxiliaryCell):
(JSC::SlotVisitor::donateKnownParallel):
(JSC::SlotVisitor::drain):
(JSC::SlotVisitor::performIncrementOfDraining):
(JSC::SlotVisitor::didReachTermination):
(JSC::SlotVisitor::hasWork):
(JSC::SlotVisitor::drainFromShared):
(JSC::SlotVisitor::drainInParallelPassively):
(JSC::SlotVisitor::donateAll):
(JSC::SlotVisitor::correspondingGlobalStack):

  • heap/SlotVisitor.h:
  • heap/SlotVisitorInlines.h:

(JSC::SlotVisitor::reportExtraMemoryVisited):
(JSC::SlotVisitor::forEachMarkStack):

  • heap/SpaceTimeMutatorScheduler.cpp:

(JSC::SpaceTimeMutatorScheduler::log):

  • heap/StochasticSpaceTimeMutatorScheduler.cpp:

(JSC::StochasticSpaceTimeMutatorScheduler::log):

  • jsc.cpp:

(GlobalObject::finishCreation):
(functionHeapCapacity):

  • runtime/Options.cpp:

(JSC::overrideDefaults):

  • runtime/Options.h:

Source/WTF:

We want dataLog to be locked even if you're not logging to a file!

  • wtf/DataLog.cpp:

(WTF::initializeLogFileOnce):

2:22 PM Changeset in webkit [211447] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

LayoutTest media/modern-media-controls/media-controller/media-controller-auto-hide-mouse-enter-over-controls-bar.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=167266

Unreviewed test gardening.

Marking this test as flaky again.

  • platform/mac/TestExpectations:
2:03 PM Changeset in webkit [211446] by andersca@apple.com
  • 5 edits in trunk

Apple Pay button does nothing on nytimes.com
https://bugs.webkit.org/show_bug.cgi?id=167664
rdar://problem/30273885

Reviewed by Sam Weinig.

Source/WebCore:

Separate line item validation into convertAndValidateTotal and convertAndValidate. The former
works on totals (which require an amount), and the latter works on regular line items that do not require an amount
if the item type is "pending".

  • Modules/applepay/ApplePaySession.cpp:

(WebCore::convertAndValidateTotal):
(WebCore::convertAndValidate):
Only check the amount if the type is not pending.

(WebCore::ApplePaySession::completeShippingMethodSelection):
(WebCore::ApplePaySession::completeShippingContactSelection):
(WebCore::ApplePaySession::completePaymentMethodSelection):
Call convertAndValidateTotal for totals.

LayoutTests:

Add a new test.

  • http/tests/ssl/applepay/ApplePaySession-expected.txt:
  • http/tests/ssl/applepay/ApplePaySession.html:
1:04 PM Changeset in webkit [211445] by commit-queue@webkit.org
  • 4 edits in trunk/Source/WebInspectorUI

Web Inspector: User Settings: Secondary-clicking the New Tab and Settings tabs should not produce a context menu
https://bugs.webkit.org/show_bug.cgi?id=167651

Patch by Devin Rousso <Devin Rousso> on 2017-01-31
Reviewed by Joseph Pecoraro.

  • UserInterface/Views/PinnedTabBarItem.js:

(WebInspector.PinnedTabBarItem):
(WebInspector.PinnedTabBarItem.prototype._handleContextMenuEvent):
Always preventDefault() to ensure that the system context menu is never shown.

  • UserInterface/Views/TabBar.js:

(WebInspector.TabBar):
(WebInspector.TabBar.prototype.get newTabTabBarItem):
(WebInspector.TabBar.prototype._handleNewTabContextMenu): Deleted.
Move the event dispatch to WebInspector.PinnedTabBarItem to give all instances a contextmenu
event handler.

  • UserInterface/Views/TabBrowser.js:

(WebInspector.TabBrowser):

12:45 PM Changeset in webkit [211444] by fpizlo@apple.com
  • 2 edits in trunk/PerformanceTests

Add framerate baselines to the splay-detail test
https://bugs.webkit.org/show_bug.cgi?id=167659

Reviewed by Geoffrey Garen.

  • JetStream/Octane2/splay-detail.html:
12:25 PM Changeset in webkit [211443] by andersca@apple.com
  • 2 edits in trunk/Source/WebKit2

Add more CRASH calls to try to figure out why we're failing to send mach ports over the wire
https://bugs.webkit.org/show_bug.cgi?id=167657

Reviewed by Tim Horton.

  • WebProcess/WebPage/WebInspector.cpp:

(WebKit::WebInspector::openFrontendConnection):

11:49 AM Changeset in webkit [211442] by Wenson Hsieh
  • 3 edits in trunk/Source/WebKit2

Crash when trying to compute global location when the WKContentView does not have a window
https://bugs.webkit.org/show_bug.cgi?id=167627
<rdar://problem/30272380>

Reviewed by Beth Dakin.

Moves data interaction state out of OpenSource and into WebKitAdditions. Work towards fixing a crash in
<rdar://problem/30272380>.

  • UIProcess/ios/WKContentViewInteraction.h:
  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView resignFirstResponder]):

11:37 AM Changeset in webkit [211441] by commit-queue@webkit.org
  • 10 edits
    33 adds in trunk/Source/WebKit2

[WebRTC] Add support for WK2 libwebrtc endpoint
https://bugs.webkit.org/show_bug.cgi?id=167306
<rdar://problem/30245426>

Patch by Youenn Fablet <youennf@gmail.com> on 2017-01-31
Reviewed by Alex Christensen.

Implementation of the LibWebRTC networking in WebKit2.
The following features are required to be moved from WebProcess to NetworkProcess:
1 Resolution of DNS names (RTCResolver)
2 Enumeration of interfaces/gathering of host addresses (RTCMonitor)
3 Implementation of Packet Socket for TCP/UDP communication (RTCSocket).

This patch implements the related classes in WebProcess/NetworkProcess and the integration with libwebrtc.
NetworkProcess implementation is using libwebetc for NetworkRTCMonitor and NetworkRTCSocket.
This ensures an as-close implementation to libwebrtc as possible.
In the future, after getting a better test infrastructure we should try to implement these using native APIs.

Currently, the implementation is as follow:

  • libwebrtc is calling WebProcess stack on the rtc network thread
  • WebProcess stack is forwarding calls to the main thread and makes related IPC calls
  • NetworkProcess receives the IPC calls and forward them to the rtc network thread.
  • The calls are processed in the rtc network thread

Conversely, when the rtc network thread wants to notify its client, the reverse path is used.

This patch also implements the LibWebRTCProvider for WebKit2.
This provider uses the related classes to create a peer connection factory that will use them.

  • CMakeLists.txt:
  • DerivedSources.make:
  • NetworkProcess/NetworkConnectionToWebProcess.cpp:

(WebKit::NetworkConnectionToWebProcess::~NetworkConnectionToWebProcess):
(WebKit::NetworkConnectionToWebProcess::didReceiveMessage):
(WebKit::NetworkConnectionToWebProcess::rtcProvider):
(WebKit::NetworkConnectionToWebProcess::didClose):

  • NetworkProcess/NetworkConnectionToWebProcess.h:
  • NetworkProcess/webrtc/LibWebRTCSocketClient.cpp: Added.

(WebKit::LibWebRTCSocketClient::LibWebRTCSocketClient):
(WebKit::LibWebRTCSocketClient::sendTo):
(WebKit::LibWebRTCSocketClient::close):
(WebKit::LibWebRTCSocketClient::setOption):
(WebKit::LibWebRTCSocketClient::signalReadPacket):
(WebKit::LibWebRTCSocketClient::signalSentPacket):
(WebKit::LibWebRTCSocketClient::signalAddressReady):
(WebKit::LibWebRTCSocketClient::signalConnect):
(WebKit::LibWebRTCSocketClient::signalClose):

  • NetworkProcess/webrtc/LibWebRTCSocketClient.h: Added.
  • NetworkProcess/webrtc/NetworkRTCMonitor.cpp: Added.

(WebKit::NetworkRTCMonitor::startUpdating):
(WebKit::NetworkRTCMonitor::stopUpdating):
(WebKit::NetworkRTCMonitor::onNetworksChanged):

  • NetworkProcess/webrtc/NetworkRTCMonitor.h: Added.
  • NetworkProcess/webrtc/NetworkRTCMonitor.messages.in: Added.
  • NetworkProcess/webrtc/NetworkRTCProvider.cpp: Added.

(WebKit::createThread):
(WebKit::NetworkRTCProvider::NetworkRTCProvider):
(WebKit::NetworkRTCProvider::close):
(WebKit::NetworkRTCProvider::createUDPSocket):
(WebKit::NetworkRTCProvider::createServerTCPSocket):
(WebKit::NetworkRTCProvider::createClientTCPSocket):
(WebKit::NetworkRTCProvider::addSocket):
(WebKit::NetworkRTCProvider::takeSocket):
(WebKit::NetworkRTCProvider::didReceiveNetworkRTCSocketMessage):
(WebKit::NetworkRTCProvider::createResolver):
(WebKit::NetworkRTCProvider::stopResolver):
(WebKit::NetworkRTCProvider::resolvedName):
(WebKit::NetworkMessageData::NetworkMessageData):
(WebKit::NetworkRTCProvider::OnMessage):
(WebKit::NetworkRTCProvider::callOnRTCNetworkThread):
(WebKit::NetworkRTCProvider::callSocket):
(WebKit::NetworkRTCProvider::sendFromMainThread):

  • NetworkProcess/webrtc/NetworkRTCProvider.h: Added.

(WebKit::NetworkRTCProvider::create):
(WebKit::NetworkRTCProvider::didReceiveNetworkRTCMonitorMessage):
(WebKit::NetworkRTCProvider::Resolver::Resolver):
(WebKit::NetworkRTCProvider::Resolver::~Resolver):

  • NetworkProcess/webrtc/NetworkRTCProvider.messages.in: Added.
  • NetworkProcess/webrtc/NetworkRTCSocket.cpp: Added.

(WebKit::NetworkRTCSocket::NetworkRTCSocket):
(WebKit::NetworkRTCSocket::sendTo):
(WebKit::NetworkRTCSocket::close):
(WebKit::NetworkRTCSocket::setOption):

  • NetworkProcess/webrtc/NetworkRTCSocket.h: Added.
  • NetworkProcess/webrtc/NetworkRTCSocket.messages.in: Added.
  • Shared/RTCNetwork.cpp: Added.

(WebKit::RTCNetwork::RTCNetwork):
(WebKit::ips):
(WebKit::RTCNetwork::value):
(WebKit::RTCNetwork::IPAddress::decode):
(WebKit::RTCNetwork::IPAddress::encode):
(WebKit::RTCNetwork::decode):
(WebKit::RTCNetwork::encode):

  • Shared/RTCNetwork.h: Added.

(WebKit::RTCNetwork::IPAddress::IPAddress):

  • WebKit2.xcodeproj/project.pbxproj:
  • WebProcess/Network/NetworkProcessConnection.cpp:

(WebKit::NetworkProcessConnection::didReceiveMessage):

  • WebProcess/Network/webrtc/LibWebRTCNetwork.h: Added.

(WebKit::LibWebRTCNetwork::monitor):
(WebKit::LibWebRTCNetwork::socketFactory):
(WebKit::LibWebRTCNetwork::socket):
(WebKit::LibWebRTCNetwork::resolver):

  • WebProcess/Network/webrtc/LibWebRTCProvider.cpp: Added.

(WebKit::LibWebRTCProvider::createPeerConnection):

  • WebProcess/Network/webrtc/LibWebRTCProvider.h: Added.
  • WebProcess/Network/webrtc/LibWebRTCResolver.cpp: Added.

(WebKit::sendOnMainThread):
(WebKit::LibWebRTCResolver::Start):
(WebKit::LibWebRTCResolver::GetResolvedAddress):
(WebKit::LibWebRTCResolver::Destroy):
(WebKit::LibWebRTCResolver::setResolvedAddress):
(WebKit::LibWebRTCResolver::setError):

  • WebProcess/Network/webrtc/LibWebRTCResolver.h: Added.
  • WebProcess/Network/webrtc/LibWebRTCSocket.cpp: Added.

(WebKit::sendOnMainThread):
(WebKit::LibWebRTCSocket::LibWebRTCSocket):
(WebKit::LibWebRTCSocket::~LibWebRTCSocket):
(WebKit::LibWebRTCSocket::GetLocalAddress):
(WebKit::LibWebRTCSocket::GetRemoteAddress):
(WebKit::LibWebRTCSocket::signalAddressReady):
(WebKit::LibWebRTCSocket::signalReadPacket):
(WebKit::LibWebRTCSocket::signalSentPacket):
(WebKit::LibWebRTCSocket::signalConnect):
(WebKit::LibWebRTCSocket::signalClose):
(WebKit::authKey):
(WebKit::LibWebRTCSocket::willSend):
(WebKit::LibWebRTCSocket::SendTo):
(WebKit::LibWebRTCSocket::Close):
(WebKit::LibWebRTCSocket::GetOption):
(WebKit::LibWebRTCSocket::SetOption):

  • WebProcess/Network/webrtc/LibWebRTCSocket.h: Added.
  • WebProcess/Network/webrtc/LibWebRTCSocketFactory.cpp: Added.

(WebKit::LibWebRTCSocketFactory::CreateServerTcpSocket):
(WebKit::LibWebRTCSocketFactory::CreateUdpSocket):
(WebKit::LibWebRTCSocketFactory::CreateClientTcpSocket):
(WebKit::LibWebRTCSocketFactory::detach):
(WebKit::LibWebRTCSocketFactory::CreateAsyncResolver):

  • WebProcess/Network/webrtc/LibWebRTCSocketFactory.h: Added.
  • WebProcess/Network/webrtc/WebRTCMonitor.cpp: Added.

(WebKit::sendOnMainThread):
(WebKit::WebRTCMonitor::StartUpdating):
(WebKit::WebRTCMonitor::StopUpdating):
(WebKit::WebRTCMonitor::networksChanged):

  • WebProcess/Network/webrtc/WebRTCMonitor.h: Added.
  • WebProcess/Network/webrtc/WebRTCMonitor.messages.in: Added.
  • WebProcess/Network/webrtc/WebRTCResolver.cpp: Added.

(WebKit::WebRTCResolver::WebRTCResolver):
(WebKit::WebRTCResolver::setResolvedAddress):
(WebKit::WebRTCResolver::resolvedAddressError):

  • WebProcess/Network/webrtc/WebRTCResolver.h: Added.
  • WebProcess/Network/webrtc/WebRTCResolver.messages.in: Added.
  • WebProcess/Network/webrtc/WebRTCSocket.cpp: Added.

(WebKit::WebRTCSocket::signalOnNetworkThread):
(WebKit::WebRTCSocket::WebRTCSocket):
(WebKit::WebRTCSocket::signalAddressReady):
(WebKit::WebRTCSocket::signalReadPacket):
(WebKit::WebRTCSocket::signalSentPacket):
(WebKit::WebRTCSocket::signalConnect):
(WebKit::WebRTCSocket::signalClose):

  • WebProcess/Network/webrtc/WebRTCSocket.h: Added.
  • WebProcess/Network/webrtc/WebRTCSocket.messages.in: Added.
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::m_userInterfaceLayoutDirection):

  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::initializeLibWebRTC):

  • WebProcess/WebProcess.h:

(WebKit::WebProcess::libWebRTC):

10:59 AM Changeset in webkit [211440] by Chris Dumez
  • 3 edits in trunk/LayoutTests

Unreviewed, fix layout tests added in r211435.

It is important that window.open() is called *after* testRunner.waitUntilDone()
has been called or you'll hit assertions in DRT.

  • http/tests/security/cross-origin-window-open-insert-script.html:
  • http/tests/security/cross-origin-window-open-javascript-url.html:
10:57 AM Changeset in webkit [211439] by commit-queue@webkit.org
  • 3 edits
    2 adds in trunk/Source/WebCore

[WebRTC] Add a libwebrtc AudioModule specific to WebKit
https://bugs.webkit.org/show_bug.cgi?id=167572

Patch by Youenn Fablet <youenn@apple.com> on 2017-01-31
Reviewed by Alex Christensen.

To be covered by webrtc audio tests.
Adding an AudioModule to circumvent the default LibWebRTC Audio Module which does the audio directly.
The implementation of the AudioModule is restricted to enable fueling the incoming audio tracks with incoming data.
Code inspired from https://chromium.googlesource.com/chromium/src/+/master/remoting/protocol/webrtc_audio_module.h

  • WebCore.xcodeproj/project.pbxproj:
  • platform/mediastream/libwebrtc/LibWebRTCAudioModule.cpp: Added.

(WebCore::LibWebRTCAudioModule::LibWebRTCAudioModule):
(WebCore::LibWebRTCAudioModule::RegisterAudioCallback):
(WebCore::LibWebRTCAudioModule::OnMessage):
(WebCore::LibWebRTCAudioModule::StartPlayout):
(WebCore::LibWebRTCAudioModule::StopPlayout):
(WebCore::LibWebRTCAudioModule::StartPlayoutOnAudioThread):
(WebCore::LibWebRTCAudioModule::PollFromSource):

  • platform/mediastream/libwebrtc/LibWebRTCAudioModule.h: Added.
  • platform/mediastream/libwebrtc/LibWebRTCUtils.cpp:

(WebCore::ThreadMessageData::ThreadMessageData):
(WebCore::initializePeerConnectionFactoryAndThreads):

10:41 AM Changeset in webkit [211438] by jberlin@webkit.org
  • 12 edits in trunk/Source

Build fix.

Source/WebCore:

  • editing/mac/EditorMac.mm:

(WebCore::Editor::pasteWithPasteboard):
(WebCore::Editor::takeFindStringFromSelection):
(WebCore::Editor::replaceNodeFromPasteboard):

  • page/mac/EventHandlerMac.mm:

(WebCore::EventHandler::createDraggingDataTransfer):

  • platform/mac/PasteboardMac.mm:

(WebCore::Pasteboard::createForCopyAndPaste):
(WebCore::Pasteboard::createForDragAndDrop):

Source/WebKit/mac:

  • Misc/WebNSPasteboardExtras.mm:

(+[NSPasteboard _web_setFindPasteboardString:withOwner:]):
(-[NSPasteboard _web_declareAndWriteDragImageForElement:URL:title:archive:source:]):

  • WebView/WebHTMLView.mm:

(-[WebHTMLView _fontAttributesFromFontPasteboard]):
(-[WebHTMLView copyFont:]):

Source/WebKit2:

  • UIProcess/Cocoa/WebViewImpl.mm:

(WebKit::WebViewImpl::dragImageForView):

  • WebProcess/Plugins/PDF/DeprecatedPDFPlugin.mm:

(-[WKPDFLayerControllerDelegate writeItemsToPasteboard:withTypes:]):
(WebKit::PDFPlugin::handleEditingCommand):

  • WebProcess/Plugins/PDF/PDFPlugin.mm:

(-[WKPDFLayerControllerDelegate pdfLayerController:copyItems:withTypes:]):
(WebKit::PDFPlugin::handleEditingCommand):

  • WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:

(WebKit::WebDragClient::declareAndWriteAttachment):
(WebKit::WebDragClient::declareAndWriteDragImage):

10:18 AM Changeset in webkit [211437] by eric.carlson@apple.com
  • 2 edits
    3 adds in trunk/Source/WebCore

[Mac] Add an audio stream description class
https://bugs.webkit.org/show_bug.cgi?id=167639

Reviewed by Youenn Fablet.

No new tests, the new class is not used yet.

  • WebCore.xcodeproj/project.pbxproj:
  • platform/audio/AudioStreamDescription.h: Added.

(WebCore::AudioStreamDescription::isPCM):

  • platform/audio/mac/CAAudioStreamDescription.cpp: Added.

(WebCore::CAAudioStreamDescription::CAAudioStreamDescription):
(WebCore::CAAudioStreamDescription::platformDescription):
(WebCore::CAAudioStreamDescription::format):
(WebCore::toCAAudioStreamDescription):
(WebCore::CAAudioStreamDescription::operator==):
(WebCore::operator==):

  • platform/audio/mac/CAAudioStreamDescription.h: Added.

(WebCore::operator!=):
(WebCore::CAAudioStreamDescription::bytesPerFrame):
(WebCore::CAAudioStreamDescription::bytesPerPacket):
(WebCore::CAAudioStreamDescription::formatFlags):
(WebCore::CAAudioStreamDescription::operator==):
(WebCore::CAAudioStreamDescription::operator!=):
(WebCore::CAAudioStreamDescription::streamDescription):

9:52 AM Changeset in webkit [211436] by commit-queue@webkit.org
  • 10 edits
    2 adds
    2 deletes in trunk

RTCPeerConnection methods can take dictionaries as input
https://bugs.webkit.org/show_bug.cgi?id=167590

Patch by Youenn Fablet <youenn@apple.com> on 2017-01-31
Reviewed by Alex Christensen.

Source/WebCore:

Test: webrtc/rtcpeerconnection-error-messages.html

Made addIceCandidate/setRemoteDescription/setLocalDescription take either dictionaries or objects as parameter.
Spec only mandates this for addIceCandidate, but sites may be using the old version for setRemoteDescription and setLocalDescription.

Updated RTCPeerConnection methods error messages.

  • Modules/mediastream/RTCPeerConnection.js:

(getLocalStreams):
(getStreamById):
(addStream):
(createOffer):
(createAnswer):
(setLocalDescription):
(setRemoteDescription):
(addIceCandidate):
(getStats):

  • Modules/mediastream/RTCPeerConnectionInternals.js:

LayoutTests:

Replacing fast/mediastream/RTCPeerConnection-js-built-ins-check-this.html by webrtc/rtcpeerconnection-error-messages.html.
It is a bit more thorough and does not hard code the error message.

  • fast/mediastream/RTCPeerConnection-addIceCandidate-expected.txt:
  • fast/mediastream/RTCPeerConnection-addIceCandidate.html:
  • fast/mediastream/RTCPeerConnection-js-built-ins-check-this-expected.txt: Removed.
  • fast/mediastream/RTCPeerConnection-js-built-ins-check-this.html: Removed.
  • fast/mediastream/RTCPeerConnection-setLocalDescription-offer-expected.txt:
  • fast/mediastream/RTCPeerConnection-setLocalDescription-offer.html:
  • fast/mediastream/RTCPeerConnection-setRemoteDescription-offer-expected.txt:
  • fast/mediastream/RTCPeerConnection-setRemoteDescription-offer.html:
  • webrtc/rtcpeerconnection-error-messages-expected.txt: Added.
  • webrtc/rtcpeerconnection-error-messages.html: Added.
9:21 AM Changeset in webkit [211435] by Chris Dumez
  • 1 edit
    4 adds in trunk/LayoutTests

Add better test coverage for scripting windows opened via window.open()
https://bugs.webkit.org/show_bug.cgi?id=167531

Reviewed by Brent Fulgham.

Add better test coverage for scripting windows opened via window.open().

  • http/tests/security/cross-origin-window-open-insert-script-expected.txt: Added.
  • http/tests/security/cross-origin-window-open-insert-script.html: Added.
  • http/tests/security/cross-origin-window-open-javascript-url-expected.txt: Added.
  • http/tests/security/cross-origin-window-open-javascript-url.html: Added.
8:52 AM Changeset in webkit [211434] by tpopela@redhat.com
  • 2 edits in trunk/Source/JavaScriptCore

Compilation error in JSArrayBufferView.h
https://bugs.webkit.org/show_bug.cgi?id=167642

Reviewed by Alex Christensen.

  • runtime/JSArrayBufferView.h:

(JSC::JSArrayBufferView::vector):

8:09 AM Changeset in webkit [211433] by Simon Fraser
  • 3 edits
    2 adds in trunk

REGRESSION (r209411): Scrolling to a fragment identifier in overflow:scroll inside position:fixed no longer works
https://bugs.webkit.org/show_bug.cgi?id=167630
rdar://problem/30091558

Reviewed by Zalan Bujtas.
Source/WebCore:

r209411 added special handling for scrolling inside position:fixed, but cut off all scrolling, breaking
overflow:scroll inside position:fixed. Fix by only handling the position:fixed case when we get to
the root layer, which is where we scroll the document.

Test: fast/overflow/scroll-anchor-in-overflow-in-position-fixed.html

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::getRectToExpose):

LayoutTests:

  • fast/overflow/scroll-anchor-in-overflow-in-position-fixed-expected.txt: Added.
  • fast/overflow/scroll-anchor-in-overflow-in-position-fixed.html: Added.
7:59 AM Changeset in webkit [211432] by commit-queue@webkit.org
  • 18 edits in trunk/Source/WebInspectorUI

Web Inspector: Address some ESLint warnings
https://bugs.webkit.org/show_bug.cgi?id=167634

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2017-01-31
Reviewed by Brian Burg.

  • UserInterface/Base/DOMUtilities.js:

(WebInspector.linkifyNodeReference):
(isSimiliarNode):
(WebInspector.xpathIndex):
These empty statements were supposed to be returns!

  • UserInterface/Base/Main.js:
  • UserInterface/Models/CSSProperty.js:

(WebInspector.CSSProperty.prototype.get relatedLonghandProperties):

  • UserInterface/Models/DOMNode.js:
  • UserInterface/Protocol/Connection.js:

(InspectorBackend.Connection):
(InspectorBackend.MainConnection):
(InspectorBackend.WorkerConnection):

  • UserInterface/Protocol/MainTarget.js:

(WebInspector.MainTarget):

  • UserInterface/Protocol/WorkerTarget.js:

(WebInspector.WorkerTarget):

  • UserInterface/Test/Test.js:
  • UserInterface/Views/CSSStyleDeclarationTextEditor.js:
  • UserInterface/Views/ConsoleSession.js:

(WebInspector.ConsoleSession):

  • UserInterface/Views/DOMNodeDetailsSidebarPanel.js:

(WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshAccessibility.accessibilityPropertiesCallback):
(WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshAccessibility):

  • UserInterface/Views/ResourceSidebarPanel.js:

(WebInspector.ResourceSidebarPanel.prototype._scriptWasAdded):

  • UserInterface/Views/ScopeChainDetailsSidebarPanel.js:

(WebInspector.ScopeChainDetailsSidebarPanel):

  • UserInterface/Views/ScriptContentView.js:

(WebInspector.ScriptContentView.prototype._toggleTypeAnnotations):

  • UserInterface/Views/SourceCodeTextEditor.js:

(WebInspector.SourceCodeTextEditor.prototype._createControlFlowScrollEventHandler):

  • UserInterface/Views/TextResourceContentView.js:

(WebInspector.TextResourceContentView.prototype._toggleTypeAnnotations):

  • UserInterface/Workers/Formatter/EsprimaFormatter.js:

(EsprimaFormatter.prototype._handleTokenAtNode):
Address pedantic warnings for consistent style.

7:49 AM Changeset in webkit [211431] by Jonathan Bedard
  • 2 edits in trunk/Tools

Unreviewed webkitpy fix after r211405.

  • Scripts/webkitpy/xcode/simulator.py:

(Device.launch_app): Remove @staticmethod on _log_debug_error.

7:33 AM Changeset in webkit [211430] by clopez@igalia.com
  • 2 edits in trunk/PerformanceTests

[EFL][GTK] Skip some IndexedDB tests that time out on the Perf bots.

Unreviewed performance test gardening.

  • Skipped:
3:41 AM Changeset in webkit [211429] by zandobersek@gmail.com
  • 5 edits in trunk

[EME] InitDataRegistry should use base64url encoding and decoding for keyids
https://bugs.webkit.org/show_bug.cgi?id=167592

Reviewed by Jer Noble.

Source/WebCore:

In InitDataRegistry, WTF::base64URLEncode() and WTF::base64URLDecode() should
be used to encode and decode the 'keyids' initialization data format, as
required by the relevant specification.
https://w3c.github.io/encrypted-media/format-registry/initdata/keyids.html#format

Relevant test case was added to media/encrypted-media/mock-MediaKeySession-generateRequest.html.

  • Modules/encryptedmedia/InitDataRegistry.cpp:

(WebCore::extractKeyIDsKeyids):
(WebCore::sanitizeKeyids):

LayoutTests:

  • media/encrypted-media/mock-MediaKeySession-generateRequest-expected.txt:
  • media/encrypted-media/mock-MediaKeySession-generateRequest.html: Include a test case

that passes an init data JSON to generateRequest() that fails to decode when using the
plain base64 decoding algorithm. The test passes when base64url encoding and decoding
are used in InitDataRegistry.

3:26 AM Changeset in webkit [211428] by Carlos Garcia Campos
  • 1 copy in releases/WebKitGTK/webkit-2.15.4

WebKitGTK+ 2.15.4

3:24 AM Changeset in webkit [211427] by Carlos Garcia Campos
  • 4 edits in trunk

Unreviewed. Update OptionsGTK.cmake and NEWS for 2.15.4 release.

.:

  • Source/cmake/OptionsGTK.cmake: Bump version numbers.

Source/WebKit2:

  • gtk/NEWS: Add release notes for 2.15.4.
3:01 AM Changeset in webkit [211426] by graouts@webkit.org
  • 2 edits in trunk/LayoutTests

[Sierra WK1] LayoutTest media/modern-media-controls/placard-support/placard-support-pip.html is a flaky crash
https://bugs.webkit.org/show_bug.cgi?id=167320

Unreviewed.

This test doesn't look like it has been flaky of late, no longer marking as flaky.

  • platform/mac-wk1/TestExpectations:
3:00 AM Changeset in webkit [211425] by graouts@webkit.org
  • 2 edits in trunk/LayoutTests

LayoutTest media/modern-media-controls/placard-support/placard-support-airplay.html is a flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=167441

Unreviewed.

This test doesn't look like it has been flaky of late, no longer marking as flaky.

  • platform/mac/TestExpectations:
2:59 AM Changeset in webkit [211424] by graouts@webkit.org
  • 2 edits in trunk/LayoutTests

LayoutTest media/modern-media-controls/media-controller/media-controller-auto-hide-mouse-enter-over-controls-bar.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=167266

Unreviewed.

This test doesn't look like it has been flaky of late, no longer marking as flaky.

  • platform/mac/TestExpectations:
2:57 AM Changeset in webkit [211423] by graouts@webkit.org
  • 2 edits in trunk/LayoutTests

Unreviewed, this test is only flaky on El Capitan / Debug of late.

  • platform/mac-wk1/TestExpectations:
2:54 AM Changeset in webkit [211422] by graouts@webkit.org
  • 2 edits in trunk/LayoutTests

Unreviewed, this test is only flaky on El Capitan of late.

  • platform/mac/TestExpectations:
2:50 AM Changeset in webkit [211421] by graouts@webkit.org
  • 2 edits in trunk/LayoutTests

LayoutTest media/modern-media-controls/skip-back-button/skip-back-button.html is a flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=164620

Unreviewed.

This test doesn't look like it has been flaky of late, no longer marking as flaky.

  • platform/mac-wk1/TestExpectations:
2:49 AM Changeset in webkit [211420] by graouts@webkit.org
  • 2 edits in trunk/LayoutTests

LayoutTest media/modern-media-controls/pip-button/pip-button.html is a flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=167350

Unreviewed.

This test doesn't look like it has been flaky of late, no longer marking as flaky.

  • platform/mac-wk1/TestExpectations:
2:46 AM Changeset in webkit [211419] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebKit2

Unreviewed. Fix syntax error in GTK+ API docs.

  • UIProcess/API/gtk/WebKitWebContext.cpp:
2:44 AM Changeset in webkit [211418] by graouts@webkit.org
  • 3 edits in trunk/LayoutTests

Unreviewed, mark a couple of very flaky tests as skipped until we get to fix them.

  • platform/ios-simulator-wk2/TestExpectations:
  • platform/mac/TestExpectations:
2:44 AM Changeset in webkit [211417] by Carlos Garcia Campos
  • 2 edits in trunk/Tools

Unreviewed. Do not include libwebrtc and qunit in GTK+ tarballs.

  • gtk/manifest.txt.in:
1:55 AM Changeset in webkit [211416] by graouts@webkit.org
  • 3 edits in trunk/LayoutTests

[EFL] Dozens of tests of modern-media-controls have been timeout
https://bugs.webkit.org/show_bug.cgi?id=167357

Unreviewed.

Modern Media Controls are Mac-specific, we should skip all those tests on EFL just like
we do on GTK. We had forgotten to skip Modern Media Controls tests under http/tests/media
on GTK, so we do that as well.

  • platform/efl/TestExpectations:
  • platform/gtk/TestExpectations:
1:23 AM Changeset in webkit [211415] by Manuel Rego Casasnovas
  • 2 edits in trunk/Source/WebKit2

[css-grid] Enable CSS Grid Layout by default
https://bugs.webkit.org/show_bug.cgi?id=167578

Reviewed by Michael Catanzaro.

Now that Safari 10.1 is shipping CSS Grid Layout it seems safe to enable the feature by default:
https://developer.apple.com/library/prerelease/content/releasenotes/General/WhatsNewInSafari/Articles/Safari_10_1.html

  • Shared/WebPreferencesDefinitions.h: Remove Grid Layout from the list of experimental flags and enable it by default.
1:13 AM Changeset in webkit [211414] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit2

[CoordinatedGraphics] WebCoordinatedSurface::create should do null-check of the return value of ShareableBitmap::createShareable
https://bugs.webkit.org/show_bug.cgi?id=167631

Patch by Fujii Hironori <Fujii Hironori> on 2017-01-31
Reviewed by Carlos Garcia Campos.

  • Shared/CoordinatedGraphics/WebCoordinatedSurface.cpp:

(WebKit::WebCoordinatedSurface::create): Do null-check of the
return value of ShareableBitmap::createShareable.

12:57 AM Changeset in webkit [211413] by commit-queue@webkit.org
  • 3 edits
    2 adds in trunk

Performance Timeline: Add serializer to PerformanceEntry
https://bugs.webkit.org/show_bug.cgi?id=167632

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2017-01-31
Reviewed by Ryosuke Niwa.

Source/WebCore:

Test: performance-api/performance-timeline-serializers.html

  • page/PerformanceEntry.idl:

LayoutTests:

  • performance-api/performance-timeline-serializers-expected.txt: Added.
  • performance-api/performance-timeline-serializers.html: Added.
12:57 AM Changeset in webkit [211412] by Carlos Garcia Campos
  • 4 edits
    2 adds in trunk/Source/WebKit2

[GTK] Environment variables for enabling/disabling AC mode should take precedence over the API.
https://bugs.webkit.org/show_bug.cgi?id=167605

Reviewed by Žan Doberšek.

Add HardwareAccelerationManager singleton helper to handle the global values for enabling, disabling or forcing
accelerated compositing. This is used by WebPreferences to initialize the values like always, but also by
WebKitSettings to ensure those values are honored and are not changed when it's not possible. This new class can
be used in the future to implement the GPU blacklist.

  • PlatformGTK.cmake: Add new files to compilation.
  • UIProcess/API/gtk/WebKitSettings.cpp:

(webkit_settings_class_init): Document that the setting depends on actual hardware capabilities.
(webkit_settings_set_hardware_acceleration_policy): Check HardwareAccelerationManager before trying to change
the settings.

  • UIProcess/gtk/HardwareAccelerationManager.cpp: Added.

(WebKit::HardwareAccelerationManager::singleton):
(WebKit::HardwareAccelerationManager::HardwareAccelerationManager): Initialize m_canUseHardwareAcceleration and
m_forceHardwareAcceleration dependoing on hardware and system capabilites and
WEBKIT_DISABLE_COMPOSITING_MODE/WEBKIT_FORCE_COMPOSITING_MODE variables.

  • UIProcess/gtk/HardwareAccelerationManager.h: Added.

(WebKit::HardwareAccelerationManager::canUseHardwareAcceleration):
(WebKit::HardwareAccelerationManager::forceHardwareAcceleration):

  • UIProcess/gtk/WebPreferencesGtk.cpp:

(WebKit::WebPreferences::platformInitializeStore): Use HardwareAccelerationManager to set the initial values.

12:07 AM Changeset in webkit [211411] by Chris Fleizach
  • 16 edits
    2 adds in trunk

AX: enable search predication for iOS
https://bugs.webkit.org/show_bug.cgi?id=167558
<rdar://problem/30251367>

Reviewed by Joanmarie Diggs.

Source/WebCore:

Move the code to support accessibility searching into a shared place so it can be used by iOS.

Test: accessibility/ios-simulator/ios-search-predicate.html

  • accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:

(-[WebAccessibilityObjectWrapper accessibilityFindMatchingObjects:]):

  • accessibility/mac/WebAccessibilityObjectWrapperBase.h:
  • accessibility/mac/WebAccessibilityObjectWrapperBase.mm:

(convertToNSArray):
(createAccessibilitySearchKeyMap):
(accessibilitySearchKeyForString):
(accessibilitySearchCriteriaForSearchPredicateParameterizedAttribute):

  • accessibility/mac/WebAccessibilityObjectWrapperMac.mm:

(createAccessibilitySearchKeyMap): Deleted.
(accessibilitySearchKeyForString): Deleted.
(accessibilitySearchCriteriaForSearchPredicateParameterizedAttribute): Deleted.
(convertToNSArray): Deleted.

Tools:

  • DumpRenderTree/ios/AccessibilityUIElementIOS.mm:

(AccessibilityUIElement::uiElementForSearchPredicate):

  • DumpRenderTree/mac/AccessibilityCommonMac.h:
  • DumpRenderTree/mac/AccessibilityCommonMac.mm:

(searchPredicateParameterizedAttributeForSearchCriteria):

  • DumpRenderTree/mac/AccessibilityUIElementMac.mm:

(searchPredicateParameterizedAttributeForSearchCriteria): Deleted.

  • WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm:

(WTR::AccessibilityUIElement::uiElementCountForSearchPredicate):
(WTR::AccessibilityUIElement::uiElementForSearchPredicate):

  • WebKitTestRunner/InjectedBundle/mac/AccessibilityCommonMac.h:
  • WebKitTestRunner/InjectedBundle/mac/AccessibilityCommonMac.mm:

(WTR::searchPredicateParameterizedAttributeForSearchCriteria):

  • WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:

(WTR::searchPredicateParameterizedAttributeForSearchCriteria): Deleted.

  • WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj:

LayoutTests:

Add basic searching smoke test to ensure fundamentals work on iOS.

  • accessibility/ios-simulator/ios-search-predicate-expected.txt: Added.
  • accessibility/ios-simulator/ios-search-predicate.html: Added.

Jan 30, 2017:

11:21 PM Changeset in webkit [211410] by Yusuke Suzuki
  • 4 edits in trunk

[JSC] Do not reject WebAssembly.compile() with Exception
https://bugs.webkit.org/show_bug.cgi?id=167585

Reviewed by Mark Lam.

JSTests:

  • wasm/js-api/Module-compile.js:

(async.testPromiseAPI):

Source/JavaScriptCore:

We accidentally reject the promise with Exception instead of Exception::value()
for the result of WebAssembly::compile().

  • wasm/JSWebAssembly.cpp:

(JSC::webAssemblyCompileFunc):

11:17 PM Changeset in webkit [211409] by Joseph Pecoraro
  • 6 edits
    2 copies
    5 adds in trunk/Source/WebCore

[WebIDL] Add support for inherit serializer attribute
https://bugs.webkit.org/show_bug.cgi?id=167274

Reviewed by Darin Adler.

Support for serializer { inherit }, which will be used by Resource Timing.
https://heycam.github.io/webidl/#idl-serializers

  • bindings/scripts/CodeGenerator.pm:

(GetInterfaceForAttribute):
(IsSerializableAttribute):
Determine if an attribute is serializable at generation time so we can
verify types. This allows us to support typedefs. We don't yet support
serializing an attribute that is itself a serializable interface.

  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateSerializerFunction):
(GenerateSerializerAttributesForInterface):
Generate inherited attributes first, then generate our own list.
Explicitly provided attribute names are expected to be serializable,
so produce an error if they are not.

  • bindings/scripts/IDLParser.pm:

(parseSerializationAttributes):
Update parsing of serializer attributes to allow for multiple
special strings. The spec does not precisely define where the
special "attribute" keyword is allowed.

(applyMemberList):
(isSerializableAttribute): Deleted.
Move serializable attribute checking to generation.

  • bindings/scripts/test/JS/JSTestSerialization.cpp:
  • bindings/scripts/test/JS/JSTestSerializationInherit.cpp: Added.
  • bindings/scripts/test/JS/JSTestSerializationInherit.h: Added.
  • bindings/scripts/test/JS/JSTestSerializationInheritFinal.cpp: Added.
  • bindings/scripts/test/JS/JSTestSerializationInheritFinal.h: Added.

The toJSON implementations are the most interesting.

  • bindings/scripts/test/TestSerialization.idl:

Extend this test for typedefed attributes that are serializable.
Change TestNode (a serializable Interface) to TestException (an
unserializable Interface) for expected behavior of an
unserializable attribute.

  • bindings/scripts/test/TestSerializationInherit.idl:

Test for { inherit, attribute }.

  • bindings/scripts/test/TestSerializationInheritFinal.idl:

Test for { inherit, attribute_names... }, and multi-level inherit.

11:11 PM Changeset in webkit [211408] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: "bouncy highlight" element in TextEditor/DOMTreeOutline should update or dismiss when user scrolls
https://bugs.webkit.org/show_bug.cgi?id=167146

Patch by Devin Rousso <Devin Rousso> on 2017-01-30
Reviewed by Timothy Hatcher.

  • UserInterface/Views/TextEditor.js:

(WebInspector.TextEditor.prototype._revealSearchResult.scrollHandler):
(WebInspector.TextEditor.prototype._revealSearchResult.animationEnded):
(WebInspector.TextEditor.prototype._revealSearchResult):

10:27 PM Changeset in webkit [211407] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebKit2

[GTK] HTTP authentication is not implemented for downloads
https://bugs.webkit.org/show_bug.cgi?id=167583

Reviewed by Michael Catanzaro.

When a normal load is converted to a download, the HTTP authentication happens before the load is converted, and
the download starts already authenticated. However, downloads started by DownloadManager::startDownload use the
DownloadClient API to do the authentication. We don't implement didReceiveAuthenticationChallenge() in our
download client, what makes the load to be cancelled and then fail silently. We should probably add API to
handle downloads authentication, but we can also forward the authentication to the web view for downloads having
a web view associated. That would cover most of the cases, like downloading from the context menu.

  • UIProcess/API/gtk/WebKitDownloadClient.cpp: Add didReceiveAuthenticationChallenge implementation.
10:21 PM Changeset in webkit [211406] by Joseph Pecoraro
  • 28 edits
    3 copies
    26 adds in trunk

Implement PerformanceObserver
https://bugs.webkit.org/show_bug.cgi?id=167546
<rdar://problem/30247959>

Reviewed by Ryosuke Niwa.

Source/JavaScriptCore:

  • runtime/CommonIdentifiers.h:

Source/WebCore:

This implements PerformanceObserver from Performance Timeline Level 2:
https://w3c.github.io/performance-timeline/

Tests: performance-api/performance-observer-api.html

performance-api/performance-observer-basic.html
performance-api/performance-observer-callback-mutate.html
performance-api/performance-observer-callback-task.html
performance-api/performance-observer-entry-sort.html
performance-api/performance-observer-exception.html
performance-api/performance-observer-nested.html
performance-api/performance-observer-order.html
performance-api/performance-observer-periodic.html
performance-api/performance-timeline-api.html

  • CMakeLists.txt:
  • DerivedSources.make:
  • WebCore.xcodeproj/project.pbxproj:

New files.

  • page/Performance.h:
  • page/Performance.cpp:

(WebCore::Performance::mark):
(WebCore::Performance::measure):
(WebCore::Performance::registerPerformanceObserver):
(WebCore::Performance::unregisterPerformanceObserver):
(WebCore::Performance::queueEntry):
Register PerformanceObservers with the Performance object.
When new PerformanceEntries are created (Mark and Measure
right now) check them against observers.

  • page/PerformanceEntry.cpp:

(WebCore::PerformanceEntry::PerformanceEntry):
(WebCore::PerformanceEntry::typeForEntryTypeString):

  • page/PerformanceEntry.h:

(WebCore::PerformanceEntry::type):
Give PerformanceEntry a convenience enum for easy comparison
and to know if it is one of the built-in known types (which the
PerformanceObserver API takes into account).

  • page/PerformanceObserver.cpp: Added.

(WebCore::PerformanceObserver::PerformanceObserver):
(WebCore::PerformanceObserver::observe):
(WebCore::PerformanceObserver::disconnect):
(WebCore::PerformanceObserver::queueEntry):
(WebCore::PerformanceObserver::deliver):

  • page/PerformanceObserver.h:

(WebCore::PerformanceObserver::create):
(WebCore::PerformanceObserver::typeFilter):

  • TypeErrors on observe bad behavior
  • Completely replace types filter on observe
  • Handle register and unregister
  • Handle calling the callback
  • page/PerformanceObserverCallback.idl: Added.
  • page/PerformanceObserverEntryList.cpp: Added.

(WebCore::PerformanceObserverEntryList::PerformanceObserverEntryList):
(WebCore::PerformanceObserverEntryList::getEntries):
(WebCore::PerformanceObserverEntryList::getEntriesByType):
(WebCore::PerformanceObserverEntryList::getEntriesByName):

  • page/PerformanceObserverEntryList.h:

(WebCore::PerformanceObserverEntryList::create):

  • page/PerformanceObserverEntryList.idl: Added.

Implement sorting and filtering of entries.

  • page/PerformanceObserver.idl: Added.
  • page/PerformanceObserverCallback.h:

(WebCore::PerformanceObserverCallback::~PerformanceObserverCallback):
Mostly autogenerated.

  • page/PerformanceUserTiming.cpp:

(WebCore::UserTiming::mark):
(WebCore::UserTiming::measure):

  • page/PerformanceUserTiming.h:

Update these to return the entry so it can be passed on to
any interested PerformanceObservers.

Source/WebInspectorUI:

  • UserInterface/Models/NativeFunctionParameters.js:

Improve API view display of built-in performance methods.

LayoutTests:

  • performance-api/performance-observer-api-expected.txt: Added.
  • performance-api/performance-observer-api.html: Added.
  • performance-api/performance-observer-basic-expected.txt: Added.
  • performance-api/performance-observer-basic.html: Added.
  • performance-api/performance-observer-callback-mutate-expected.txt: Added.
  • performance-api/performance-observer-callback-mutate.html: Added.
  • performance-api/performance-observer-callback-task-expected.txt: Added.
  • performance-api/performance-observer-callback-task.html: Added.
  • performance-api/performance-observer-entry-sort-expected.txt: Added.
  • performance-api/performance-observer-entry-sort.html: Added.
  • performance-api/performance-observer-exception-expected.txt: Added.
  • performance-api/performance-observer-exception.html: Added.
  • performance-api/performance-observer-nested-expected.txt: Added.
  • performance-api/performance-observer-nested.html: Added.
  • performance-api/performance-observer-order-expected.txt: Added.
  • performance-api/performance-observer-order.html: Added.
  • performance-api/performance-observer-periodic-expected.txt: Added.
  • performance-api/performance-observer-periodic.html: Added.

PerformanceObserver tests.

  • performance-api/performance-timeline-api-expected.txt: Added.
  • performance-api/performance-timeline-api.html: Added.

Performance timeline tests.

  • platform/efl/js/dom/global-constructors-attributes-expected.txt:
  • platform/gtk/js/dom/global-constructors-attributes-expected.txt:
  • platform/mac-elcapitan/js/dom/global-constructors-attributes-expected.txt:
  • platform/mac-wk1/js/dom/global-constructors-attributes-expected.txt:
  • platform/mac-yosemite/js/dom/global-constructors-attributes-expected.txt:
  • platform/mac/js/dom/global-constructors-attributes-expected.txt:
  • platform/win/js/dom/global-constructors-attributes-expected.txt:

New global constructors.

8:50 PM Changeset in webkit [211405] by Jonathan Bedard
  • 2 edits in trunk/Tools

Workaround for simctl launch bug
https://bugs.webkit.org/show_bug.cgi?id=167613

Reviewed by Daniel Bates.

simctl launch will sometimes fail because of a race condition when many
simulators are being run simultaneously. These failures will always have
an exit code of 1. This change attempts to launch an app multiple times
before reporting a failure to workaround this bug.

  • Scripts/webkitpy/xcode/simulator.py:

(Device.launch_app): Execute multiple launch attempts, better logging of failures.

8:34 PM Changeset in webkit [211404] by commit-queue@webkit.org
  • 11 edits in trunk

[WebRTC] getStats does not support legacy callback
https://bugs.webkit.org/show_bug.cgi?id=167617

Patch by Youenn Fablet <youenn@apple.com> on 2017-01-30
Reviewed by Alex Christensen.

Source/WebCore:

Covered by updated tests.

  • Modules/mediastream/RTCPeerConnection.cpp:

(WebCore::RTCPeerConnection::getStats):
(WebCore::RTCPeerConnection::privateGetStats): Deleted.

  • Modules/mediastream/RTCPeerConnection.h:
  • Modules/mediastream/RTCPeerConnection.idl:
  • Modules/mediastream/RTCPeerConnection.js:

(addIceCandidate):
(getStats): Deleted.

LayoutTests:

  • fast/mediastream/RTCPeerConnection-js-built-ins-check-this-expected.txt:
  • fast/mediastream/RTCPeerConnection-overloaded-operations-params-expected.txt:
  • fast/mediastream/RTCPeerConnection-overloaded-operations-params.html:
  • fast/mediastream/RTCPeerConnection-stats.html:
  • fast/mediastream/RTCPeerConnection-statsSelector.html:
7:37 PM Changeset in webkit [211403] by weinig@apple.com
  • 72 edits
    8 copies
    3 deletes in trunk/Source

JSDOMBinding is too big. Split it up!
https://bugs.webkit.org/show_bug.cgi?id=167601

Reviewed by Darin Adler.

Source/WebCore:

Splits JSDOMBinding.h/cpp up a bit by splitting out:

  • JSDOMBindingCaller.h
  • JSDOMBindingSecurity.h/cpp
  • JSDOMExceptionHandling.h/cpp
  • JSDOMWrapperCache.h/cpp

Also:

  • Moves all constructor objects to JSDOMConstructor.h/cpp,
  • Moves special DOMWindow accessors to JSDOMWindowBase.
  • Deletes unused CallbackFunction.h/cpp
  • CMakeLists.txt:
  • Modules/webdatabase/Database.cpp:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/CallbackFunction.cpp: Removed.
  • bindings/js/CallbackFunction.h: Removed.
  • bindings/js/DOMConstructorWithDocument.h: Removed.
  • bindings/js/JSCryptoCustom.cpp:
  • bindings/js/JSCustomXPathNSResolver.cpp:
  • bindings/js/JSDOMBinding.cpp:
  • bindings/js/JSDOMBinding.h:
  • bindings/js/JSDOMBindingCaller.h: Copied from Source/WebCore/bindings/js/JSDOMBinding.h.
  • bindings/js/JSDOMBindingSecurity.cpp: Copied from Source/WebCore/bindings/js/JSDOMBinding.cpp.
  • bindings/js/JSDOMBindingSecurity.h: Copied from Source/WebCore/bindings/js/JSDOMBinding.h.
  • bindings/js/JSDOMConstructor.cpp: Copied from Source/WebCore/bindings/js/JSDOMBinding.cpp.
  • bindings/js/JSDOMConstructor.h:
  • bindings/js/JSDOMConvert.h:
  • bindings/js/JSDOMExceptionHandling.cpp: Copied from Source/WebCore/bindings/js/JSDOMBinding.cpp.
  • bindings/js/JSDOMExceptionHandling.h: Copied from Source/WebCore/bindings/js/JSDOMBinding.h.
  • bindings/js/JSDOMWindowBase.cpp:

(WebCore::callerDOMWindow): Moved from JSDOMBinding.h
(WebCore::activeDOMWindow): Moved from JSDOMBinding.h
(WebCore::firstDOMWindow): Moved from JSDOMBinding.h

  • bindings/js/JSDOMWindowBase.h:
  • bindings/js/JSDOMWindowCustom.cpp:
  • bindings/js/JSDOMWindowProperties.cpp:
  • bindings/js/JSDOMWrapperCache.cpp: Copied from Source/WebCore/bindings/js/JSDOMBinding.cpp.
  • bindings/js/JSDOMWrapperCache.h: Copied from Source/WebCore/bindings/js/JSDOMBinding.h.
  • bindings/js/JSEventTargetCustom.h:
  • bindings/js/JSHTMLElementCustom.cpp:
  • bindings/js/JSLocationCustom.cpp:
  • bindings/js/JSMutationObserverCustom.cpp:
  • bindings/js/JSSQLStatementErrorCallbackCustom.cpp:
  • bindings/js/JSStorageCustom.cpp:
  • bindings/js/JSWorkerCustom.cpp:
  • bindings/js/JSXPathNSResolverCustom.cpp:
  • bindings/js/ScheduledAction.cpp:
  • bindings/js/ScriptController.cpp:
  • bindings/js/ScriptController.h:
  • bindings/js/ScriptGlobalObject.cpp:

(WebCore::ScriptGlobalObject::set):

  • bindings/js/StructuredClone.cpp:
  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateImplementation):
(GenerateCallWith):
(GenerateParametersCheck):
(GenerateCallbackImplementationContent):
(NativeToJSValue):

  • bridge/objc/WebScriptObject.mm:
  • html/HTMLFrameElementBase.cpp:
  • html/HTMLVideoElement.cpp:
  • inspector/InspectorController.cpp:
  • inspector/InspectorDOMAgent.cpp:
  • inspector/PageScriptDebugServer.cpp:
  • inspector/WorkerScriptDebugServer.cpp:

Source/WebKit2:

  • Shared/WebCoreArgumentCoders.cpp:

Replace include of JSDOMBinding with JSDOMExceptionHandling.

7:06 PM Changeset in webkit [211402] by aestes@apple.com
  • 13 edits in trunk/Source

[QuickLook] FrameLoaderClient should return the new QuickLookHandleClient it creates
https://bugs.webkit.org/show_bug.cgi?id=167625

Reviewed by Andreas Kling.

Source/WebCore:

QuickLookHandleClients were being created by QuickLookHandle calling
FrameLoaderClient::didCreateQuickLookHandle() then having the FrameLoaderClient create a new
QuickLookHandleClient and set it using QuickLookHandle::setClient().

Since all FrameLoaderClient::didCreateQuickLookHandle() does is create a new
QuickLookHandleClient, this patch changes the FrameLoaderClient function to return the new
QuickLookHandleClient directly and removes the API from QuickLookHandle to set a client.
This also removes previewFileName() and previewUTI() from QuickLookHandle and instead passes
these as arguments to the FrameLoaderClient.

No change in behavior. Covered by existing tests.

  • loader/EmptyClients.cpp: Added an implementation of createQuickLookHandleClient() that

returns nullptr.

  • loader/FrameLoaderClient.h: Declared createQuickLookHandleClient() and removed

didCreateQuickLookHandle().

  • loader/ios/QuickLook.h: Removed setClient(), previewFileName(), and previewUTI().
  • loader/ios/QuickLook.mm: Removed testingOrEmptyClient().

(-[WebPreviewLoader initWithResourceLoader:resourceResponse:quickLookHandle:]): Set _client
to testingClient() if it exists, otherwise set it to the client returned by
FrameLoaderClient::createQuickLookHandleClient() it non-null, otherwise set it to
emptyClient().
(testingOrEmptyClient): Deleted.
(-[WebPreviewLoader setClient:]): Deleted.
(-[WebPreviewLoader converter]): Deleted.
(WebCore::QuickLookHandle::setClient): Deleted.
(WebCore::QuickLookHandle::previewFileName): Deleted.
(WebCore::QuickLookHandle::previewUTI): Deleted.

Source/WebKit/mac:

  • WebCoreSupport/WebFrameLoaderClient.h: Declared createQuickLookHandleClient().
  • WebCoreSupport/WebFrameLoaderClient.mm:

(WebFrameLoaderClient::createQuickLookHandleClient): Renamed from didCreateQuickLookHandle().
(WebFrameLoaderClient::didCreateQuickLookHandle): Renamed to createQuickLookHandleClient().

Source/WebKit2:

  • WebProcess/WebCoreSupport/WebFrameLoaderClient.h: Declared createQuickLookHandleClient().
  • WebProcess/WebCoreSupport/ios/WebFrameLoaderClientIOS.mm:

(WebKit::WebFrameLoaderClient::createQuickLookHandleClient): Renamed from didCreateQuickLookHandle().
(WebKit::WebFrameLoaderClient::didCreateQuickLookHandle): Renamed to createQuickLookHandleClient().

  • WebProcess/WebCoreSupport/ios/WebQuickLookHandleClient.cpp:

(WebKit::WebQuickLookHandleClient::WebQuickLookHandleClient): Set m_fileName and m_uti from
the constructor arguments instead of from handle.

  • WebProcess/WebCoreSupport/ios/WebQuickLookHandleClient.h:
6:38 PM Changeset in webkit [211401] by jer.noble@apple.com
  • 2 edits in trunk/Source/WebCore

NULL-deref crash in TextTrack::removeCue()
https://bugs.webkit.org/show_bug.cgi?id=167615

Reviewed by Eric Carlson.

It's possible for a track to be removed which was never actually added to the cue list.
Specifically, if an in-band track with a negative start or end time was parsed, it would
have been rejected by TextTrack::addCue(). When it comes time to flush those in-band cues,
TextTrack::m_cues will still be NULL. Rather than ASSERT in this case, we should revert the
behavior added in r210319 and throw an exception.

  • html/track/TextTrack.cpp:

(WebCore::TextTrack::removeCue):

6:36 PM Changeset in webkit [211400] by Chris Dumez
  • 1 edit
    2 deletes in trunk/LayoutTests

Unreviewed, remove a couple JS files that were missed in r211395.

  • dom/xhtml/level3/core/attrisid04.js: Removed.
  • dom/xhtml/level3/core/attrisid05.js: Removed.
6:12 PM Changeset in webkit [211399] by akling@apple.com
  • 2 edits in trunk/Source/WebCore

Fix CMSampleBuffer leak in MediaSampleAVFObjC::createNonDisplayingCopy().
<https://webkit.org/b/167621>

Reviewed by Andy Estes.

We were failing to adopt the CMSampleBuffer after copying it. Seen on leaks bot.

  • platform/graphics/avfoundation/objc/MediaSampleAVFObjC.mm:

(WebCore::MediaSampleAVFObjC::createNonDisplayingCopy):

5:54 PM Changeset in webkit [211398] by aestes@apple.com
  • 12 edits
    2 adds in trunk/Source/WebCore

[QuickLook] QLPreviewConverter and QuickLookHandle have different lifetime requirements
https://bugs.webkit.org/show_bug.cgi?id=167609

Reviewed by Andreas Kling.

Currently, QuickLookHandles are owned by DocumentLoader so that the underlying
QLPreviewConverter stays alive to service subresource requests. However, the QuickLookHandle
itself only needs to live long enough to handle the main resource load. And in a follow-on
patch we will need to create QLPreviewConverters independent of QuickLookHandle.

This patch moves ownership of QuickLookHandle from DocumentLoader to ResourceLoader. It also
creates a C++ wrapper around QLPreviewConverter and teaches QuickLookHandle to transfer
ownership of the wrapper to DocumentLoader once the main resource conversion is complete.

No change in behavior. Covered by existing tests.

  • WebCore.xcodeproj/project.pbxproj: Added PreviewConverter.{h,mm}.
  • loader/DocumentLoader.cpp:

(WebCore::DocumentLoader::setPreviewConverter): Renamed from setQuickLookHandle().
(WebCore::DocumentLoader::previewConverter): Renamed from quickLookHandle().
(WebCore::DocumentLoader::setQuickLookHandle): Renamed to setPreviewConverter().

  • loader/DocumentLoader.h:

(WebCore::DocumentLoader::quickLookHandle): Renamed to quickLookHandle().

  • loader/ResourceLoader.cpp:

(WebCore::ResourceLoader::willSendRequestInternal): Changed to call PreviewConverter::safeRequest().
(WebCore::ResourceLoader::isQuickLookResource): Changed to check if m_quickLookHandle is null.
(WebCore::ResourceLoader::didCreateQuickLookHandle): Deleted.

  • loader/ResourceLoader.h:
  • loader/SubresourceLoader.cpp:

(WebCore::SubresourceLoader::shouldCreateQuickLookHandleForResponse): Changed to access m_quickLookHandle.
(WebCore::SubresourceLoader::didReceiveResponse): Ditto.
(WebCore::SubresourceLoader::didReceiveData): Ditto.
(WebCore::SubresourceLoader::didReceiveBuffer): Ditto.
(WebCore::SubresourceLoader::didFinishLoading): Ditto.
(WebCore::SubresourceLoader::didFail): Ditto.

  • loader/cache/CachedRawResource.cpp:

(WebCore::CachedRawResource::finishLoading): Wrapped the call to ResourceLoader::isQuickLookResource() in USE(QUICK_LOOK).

  • loader/ios/QuickLook.h: Renamed m_converter to m_previewLoader.
  • loader/ios/QuickLook.mm: Renamed WebPreviewConverter to WebPreviewLoader.

(WebCore::registerQLPreviewConverterIfNeeded): Created a PreviewConverter instead of a QLPreviewConverter.
(-[WebPreviewLoader initWithResourceLoader:resourceResponse:quickLookHandle:]): Ditto.
(-[WebPreviewLoader appendDataArray:]): Accessed the QLPreviewConverter from the PreviewConverter.
(-[WebPreviewLoader finishedAppending]): Ditto.
(-[WebPreviewLoader failed]): Ditto.
(-[WebPreviewLoader converter]): Renamed from platformConverter. Returns a pointer to the PreviewConverter.
(-[WebPreviewLoader _sendDidReceiveResponseIfNecessary]): Moved _converter to DocumentLoader.
(-[WebPreviewLoader connection:didFailWithError:]): Created a PreviewConverter instead of a QLPreviewConverter.
(WebCore::QuickLookHandle::QuickLookHandle): Called FrameLoaderClient::didCreateQuickLookHandle() instead of going through FrameLoader.
(WebCore::QuickLookHandle::didReceiveData): Renamed m_converter to m_previewLoader.
(WebCore::QuickLookHandle::didReceiveBuffer): Ditto.
(WebCore::QuickLookHandle::didFinishLoading): Ditto.
(WebCore::QuickLookHandle::didFail): Ditto.
(WebCore::QuickLookHandle::setClient): Ditto.
(WebCore::QuickLookHandle::previewFileName): Ditto.
(WebCore::QuickLookHandle::previewUTI): Ditto.
(WebCore::QuickLookHandle::willSendRequest): Deleted.

  • platform/ios/QuickLookSoftLink.h: Removed soft-linking of QLPreviewConverter and kQLPreviewOptionPasswordKey.
  • platform/ios/QuickLookSoftLink.mm: Ditto.
  • platform/network/ios/PreviewConverter.h: Added.

(WebCore::PreviewConverter::platformConverter): Added. Returns the underlying QLPreviewConverter.

  • platform/network/ios/PreviewConverter.mm: Added.

(WebCore::optionsWithPassword): Creates a dictionary with the kQLPreviewOptionPasswordKey option set if password is non-null.
(WebCore::PreviewConverter::PreviewConverter): Added constructors for the delegate/response and data/uti cases.
(WebCore::PreviewConverter::safeRequest): Wraps -[QLPreviewConverter safeRequestForRequest:].
(WebCore::PreviewConverter::previewRequest): Wraps -[QLPreviewConverter previewRequest].
(WebCore::PreviewConverter::previewResponse): Wraps -[QLPreviewConverter previewResponse].
(WebCore::PreviewConverter::previewFileName): Wraps -[QLPreviewConverter previewFileName].
(WebCore::PreviewConverter::previewUTI): Wraps -[QLPreviewConverter previewUTI].

5:20 PM Changeset in webkit [211397] by ap@apple.com
  • 4 edits in trunk/Tools

Commit queue fails to look at real name aliases for the reviewer
https://bugs.webkit.org/show_bug.cgi?id=167422

Reviewed by Joseph Pecoraro.

  • Scripts/webkitpy/common/checkout/changelog_unittest.py:

(test_has_valid_reviewer): Added tests.

  • Scripts/webkitpy/common/config/committers.py:

(CommitterList._name_to_contributor_map):
Made _name_to_contributor_map include alias names.

  • Scripts/webkitpy/common/config/committers_unittest.py:

(CommittersTest.test_contributors_by_fuzzy_match):
Removed subtests that are now obsolete, as these matches are strict. It is not
obvious if distance based fuzzy matching for names is useful at all, but we can
look into that some other time.

4:54 PM Changeset in webkit [211396] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Marking media/modern-media-controls/buttons-container/buttons-container-buttons-property.html as flaky on macOS WK1.
https://bugs.webkit.org/show_bug.cgi?id=167371

Unreviewed test gardening.

  • platform/mac-wk1/TestExpectations:
4:22 PM Changeset in webkit [211395] by Chris Dumez
  • 11 edits
    6 deletes in trunk

Drop legacy Attributes.isId attribute
https://bugs.webkit.org/show_bug.cgi?id=167603

Reviewed by Ryosuke Niwa.

LayoutTests/imported/w3c:

Rebaseline W3C test now that one more check is passing.

  • web-platform-tests/dom/historical-expected.txt:

Source/WebCore:

Drop legacy Attributes.isId attribute.

This attribute is not in the specification:

Both Firefox and Chrome currently do not expose this attribute.

No new tests, rebaselined existing test.

  • dom/Attr.cpp:
  • dom/Attr.h:
  • dom/Attr.idl:

Source/WebKit/mac:

Keep Attr.isId in ObjC bindings.

  • DOM/DOMAttr.mm:

(-[DOMAttr isId]):

LayoutTests:

Drop outdated tests.

  • dom/xhtml/level3/core/attrisid04-expected.txt: Removed.
  • dom/xhtml/level3/core/attrisid04.xhtml: Removed.
  • dom/xhtml/level3/core/attrisid05-expected.txt: Removed.
  • dom/xhtml/level3/core/attrisid05.xhtml: Removed.
  • fast/dom/Attr/change-id-via-attr-node-value-expected.txt:
  • fast/dom/Attr/change-id-via-attr-node-value.html:
  • fast/dom/Element/attrisid-extra01-expected.txt: Removed.
  • fast/dom/Element/attrisid-extra01.html: Removed.
4:17 PM Changeset in webkit [211394] by Alan Bujtas
  • 7 edits
    1 add in trunk

Simple line layout: Small tweaks to improve performance.
https://bugs.webkit.org/show_bug.cgi?id=167611
<rdar://problem/30274294>

Reviewed by Simon Fraser.

PerformanceTests:

  • Layout/simple-line-layout-non-repeating-text.html: Added.

Source/WebCore:

This is ~10% progression on the attached test case (paragraphs with non-redundant content).
median: 102.08 runs/s -> median: 114.25 runs/s

  • rendering/SimpleLineLayout.cpp:

(WebCore::SimpleLineLayout::LineState::appendFragmentAndCreateRunIfNeeded):

  • rendering/SimpleLineLayoutFlowContents.cpp:

(WebCore::SimpleLineLayout::initializeSegments):
(WebCore::SimpleLineLayout::FlowContents::FlowContents):

  • rendering/SimpleLineLayoutFlowContents.h:
  • rendering/SimpleLineLayoutTextFragmentIterator.cpp:

(WebCore::SimpleLineLayout::TextFragmentIterator::nextNonWhitespacePosition):
(WebCore::SimpleLineLayout::TextFragmentIterator::skipToNextPosition):

  • rendering/SimpleLineLayoutTextFragmentIterator.h:
4:11 PM Changeset in webkit [211393] by Chris Dumez
  • 11 edits in trunk

Drop legacy constants on Event interface
https://bugs.webkit.org/show_bug.cgi?id=167602

Reviewed by Sam Weinig.

LayoutTests/imported/w3c:

Rebaseline W3C test now that more checks are passing.

  • web-platform-tests/dom/historical-expected.txt:

Source/WebCore:

Drop legacy constants on Event interface:
MOUSEDOWN, MOUSEUP, MOUSEOVER, MOUSEOUT, MOUSEMOVE, MOUSEDRAG,
CLICK, DBLCLICK, KEYDOWN, KEYUP, KEYPRESS, DRAGDROP, FOCUS,
BLUR, SELECT, and CHANGE.

Those constants are not used for anything, they are not in the
specification and Chrome / Firefox do not have them.

No new tests, rebaselined existing test.

  • dom/Event.idl:

LayoutTests:

Update / Rebaseline existing tests to stop covering those constants.

  • fast/dom/constants-expected.txt:
  • fast/dom/constants.html:
  • fast/xmlhttprequest/xmlhttprequest-get-expected.txt:
  • http/tests/workers/worker-importScriptsOnError-expected.txt:
  • inspector/model/remote-object-get-properties-expected.txt:
4:08 PM Changeset in webkit [211392] by matthew_hanson@apple.com
  • 1 copy in tags/Safari-604.1.5.1

New tag.

4:06 PM Changeset in webkit [211391] by commit-queue@webkit.org
  • 1 edit
    1 add in trunk/Source/ThirdParty/libwebrtc

[WebRTC] Upload a diff of WebKit libwebrtc code and original libwebrtc code
https://bugs.webkit.org/show_bug.cgi?id=167573

Patch by Youenn Fablet <youennf@gmail.com> on 2017-01-30
Reviewed by Alex Christensen.

  • WebKit/patch-libwebrtc: Added.
3:37 PM Changeset in webkit [211390] by andersca@apple.com
  • 2 edits in trunk/Source/WebKit2

Add some more crash reporter information to diagnose a failed mach_msg
https://bugs.webkit.org/show_bug.cgi?id=167610

Reviewed by Dean Jackson.

Include the receive port name as well.

  • Platform/IPC/mac/ConnectionMac.mm:

(IPC::readFromMachPort):

3:21 PM Changeset in webkit [211389] by aakash_jain@apple.com
  • 2 edits in trunk/Tools

QueueStatusServer should have an explicit timeout for _fetch_url
https://bugs.webkit.org/show_bug.cgi?id=167467

Reviewed by Alexey Proskuryakov.

  • Scripts/webkitpy/common/net/statusserver.py:

(StatusServer._fetch_url): Add an explicit timeout of 300s.

3:03 PM Changeset in webkit [211388] by commit-queue@webkit.org
  • 4 edits in trunk/Tools

Add support for Trac instances that host multiple projects.
https://bugs.webkit.org/show_bug.cgi?id=167524

Patch by Kocsen Chung <Kocsen Chung> on 2017-01-30
Reviewed by Alexey Proskuryakov.

When multiple projects are hosted on a single Trac instance, the current
behavior will retrieve changesets from all tracked projects.
This patch teaches Trac.js to get project-specific changesets from Trac.
We do this by replacing the parameter changeset=on to repo-projectname=on
when querying the Trac timeline.

To tell Trac to be aware of multi-project instances we leverage the
options parameter when creating a new instance:

new Trac("https://mytrac.com/", { projectIdentifier: "tracProjectName" });

If this option is not provided, the original behaviour will prevail.
Additionally, add corresponding tests.

  • BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Trac.js:

(Trac): Reason about new optional parameter 'projectIdentifier'.
(Trac.prototype.revisionURL): Given a projectIdentifier, append it to the end of the URL.
(Trac.prototype._xmlTimelineURL): Given a projectIdentifier,
replace default parameter changeset=on with repo-projectname=on.
(Trac.prototype._convertCommitInfoElementToObject): Fix missing ';'.

  • BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/resources/MockTrac.js:

(MockTrac): Add support for instantiating Trac with a projectIdentifier.

  • BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/resources/tests.js:

(setup): Provide a multiple-project MockTrac instance to all test cases for testing.
Add the following tests:

test("revisionURL")
test("revisionURL with Trac Identifier")
test("_xmlTimelineURL")
test("_xmlTimelineURL with Trac Identifier")

(this.view._latestProductiveIteration): Fix missing ';'.

2:51 PM Changeset in webkit [211387] by Simon Fraser
  • 6 edits
    2 adds in trunk

[iOS] position:fixed inside touch-scrollable overflow is mispositioned
https://bugs.webkit.org/show_bug.cgi?id=167604
Source/WebCore:

rdar://problem/29500273

Reviewed by Zalan Bujtas.

For layers inside touch-scrollable overflow, RenderLayerBacking::computeParentGraphicsLayerRect() needs
to account for the offset from the ancestor compositing layer's origin, to handle scrollable elements with
box-shadow, for example.

Also make the compositing log output a little easier to read.

Test: compositing/scrolling/fixed-inside-scroll.html

  • rendering/RenderLayerBacking.cpp:

(WebCore::RenderLayerBacking::computeParentGraphicsLayerRect):

  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::logLayerInfo):

Source/WebKit2:

rdar://problem/29500273

Reviewed by Zalan Bujtas.

Make sure we tell m_webPageProxy.computeCustomFixedPositionRect() when visual viewports are enabled.

  • UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm:

(WebKit::RemoteScrollingCoordinatorProxy::customFixedPositionRect):

LayoutTests:

Reviewed by Zalan Bujtas.

  • compositing/scrolling/fixed-inside-scroll-expected.html: Added.
  • compositing/scrolling/fixed-inside-scroll.html: Added.
2:09 PM Changeset in webkit [211386] by jer.noble@apple.com
  • 2 edits in trunk/Source/WebCore

NULL-deref crash at PlatformMediaSession::endInterruption
https://bugs.webkit.org/show_bug.cgi?id=167595

Reviewed by Eric Carlson.

Use the same, NULL-aware forEachSession() iterator rather than iterating over m_sessions directly.

  • platform/audio/PlatformMediaSessionManager.cpp:

(WebCore::PlatformMediaSessionManager::beginInterruption):
(WebCore::PlatformMediaSessionManager::endInterruption):

2:01 PM Changeset in webkit [211385] by Matt Baker
  • 15 edits
    1 copy
    2 adds in trunk

Web Inspector: Need some limit on Async Call Stacks for async loops (rAF loops)
https://bugs.webkit.org/show_bug.cgi?id=165633
<rdar://problem/29738502>

Reviewed by Joseph Pecoraro.

Source/JavaScriptCore:

This patch limits the memory used by the Inspector backend to store async
stack trace data.

Asynchronous stack traces are stored as a disjoint set of parent pointer
trees. Tree nodes represent asynchronous operations, and hold a copy of
the stack trace at the time the operation was scheduled. Each tree can
be regarded as a set of stack traces, stored as singly linked lists that
share part of their structure (specifically their tails). Traces belonging
to the same tree will at least share a common root. A stack trace begins
at a leaf node and follows the chain of parent pointers to the root of
of the tree. Leaf nodes always contain pending asynchronous calls.

When an asynchronous operation is scheduled with requestAnimationFrame,
setInterval, etc, a node is created containing the current call stack and
some bookkeeping data for the operation. An unique identifier comprised
of an operation type and callback identifier is mapped to the node. If
scheduling the callback was itself the result of an asynchronous call,
the node becomes a child of the node associated with that call, otherwise
it becomes the root of a new tree.

A node is either pending, active, dispatched, or canceled. Nodes
start out as pending. After a callback for a pending node is dispatched
the node is marked as such, unless it is a repeating callback such as
setInterval, in which case it remains pending. Once a node is no longer
pending it is removed, as long as it has no children. Since nodes are
reference counted, it is a property of the stack trace tree that nodes
that are no longer pending and have no children pointing to them will be
automatically pruned from the tree.

If an async operation is canceled (e.g. cancelTimeout), the associated
node is marked as such. If the callback is not being dispatched at the
time, and has no children, it is removed.

Because async operations can be chained indefinitely, stack traces are
limited to a maximum depth. The depth of a stack trace is equal to the
sum of the depths of its nodes, with a node's depth equal to the number
of frames in its associated call stack. For any stack trace,

S = { s𝟶, s𝟷, …, s𝑘 }, with endpoints s𝟶, s𝑘
depth(S) = depth(s𝟶) + depth(s𝟷) + … + depth(s𝑘)

A stack trace is truncated when it exceeds the maximum depth. Truncation
occurs on node boundaries, not call frames, consequently the maximum depth
is more of a target than a guarantee:

d = maximum stack trace depth
for all S, depth(S) ≤ d + depth(s𝑘)

Because nodes can belong to multiple stack traces, it may be necessary
to clone the tail of a stack trace being truncated to prevent other traces
from being effected.

  • CMakeLists.txt:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • inspector/AsyncStackTrace.cpp: Added.

(Inspector::AsyncStackTrace::create):
(Inspector::AsyncStackTrace::AsyncStackTrace):
(Inspector::AsyncStackTrace::~AsyncStackTrace):
(Inspector::AsyncStackTrace::isPending):
(Inspector::AsyncStackTrace::isLocked):
(Inspector::AsyncStackTrace::willDispatchAsyncCall):
(Inspector::AsyncStackTrace::didDispatchAsyncCall):
(Inspector::AsyncStackTrace::didCancelAsyncCall):
(Inspector::AsyncStackTrace::buildInspectorObject):
(Inspector::AsyncStackTrace::truncate):
(Inspector::AsyncStackTrace::remove):

  • inspector/AsyncStackTrace.h:
  • inspector/agents/InspectorDebuggerAgent.cpp:

(Inspector::InspectorDebuggerAgent::didScheduleAsyncCall):
(Inspector::InspectorDebuggerAgent::didCancelAsyncCall):
(Inspector::InspectorDebuggerAgent::willDispatchAsyncCall):
(Inspector::InspectorDebuggerAgent::didDispatchAsyncCall):
(Inspector::InspectorDebuggerAgent::didPause):
(Inspector::InspectorDebuggerAgent::clearAsyncStackTraceData):
(Inspector::InspectorDebuggerAgent::buildAsyncStackTrace): Deleted.
(Inspector::InspectorDebuggerAgent::refAsyncCallData): Deleted.
(Inspector::InspectorDebuggerAgent::derefAsyncCallData): Deleted.

  • inspector/agents/InspectorDebuggerAgent.h:
  • inspector/protocol/Console.json:

Source/WebInspectorUI:

  • Localizations/en.lproj/localizedStrings.js:

Text for "Truncated" marker tree element.

  • UserInterface/Models/StackTrace.js:

(WebInspector.StackTrace):
(WebInspector.StackTrace.fromPayload):
(WebInspector.StackTrace.prototype.get truncated):
Plumbing for new Console.StackTrace property truncated.

  • UserInterface/Views/ThreadTreeElement.css:

(.tree-outline > .item.thread + ol > .item.truncated-call-frames):
(.tree-outline > .item.thread + ol > .item.truncated-call-frames .icon):
Styles for "Truncated" marker tree element.

  • UserInterface/Views/ThreadTreeElement.js:

(WebInspector.ThreadTreeElement.prototype.refresh):
Append "Truncated" marker tree element if necessary.

  • Versions/Inspector-iOS-10.3.json:

LayoutTests:

Add truncation test cases and cleanup call frame logging.

  • inspector/debugger/async-stack-trace-expected.txt:
  • inspector/debugger/async-stack-trace.html:
  • inspector/debugger/resources/log-active-stack-trace.js: Added.

(TestPage.registerInitializer.window.getActiveStackTrace):
(TestPage.registerInitializer.logStackTrace.logCallFrame):
(TestPage.registerInitializer.):
(TestPage.registerInitializer.window.logActiveStackTrace):
(TestPage.registerInitializer):

1:02 PM Changeset in webkit [211384] by matthew_hanson@apple.com
  • 3 edits in branches/safari-604.1.5-branch/Source/WebKit/mac

Merge r211323. rdar://problem/30107776

1:02 PM Changeset in webkit [211383] by matthew_hanson@apple.com
  • 6 edits in branches/safari-604.1.5-branch/Source

Versioning.

12:43 PM Changeset in webkit [211382] by mmaxfield@apple.com
  • 7 edits in trunk

Correct spacing regression on inter-element complex path shaping on some fonts
https://bugs.webkit.org/show_bug.cgi?id=166013

Reviewed by Simon Fraser.

Source/WebCore:

This patch brings the implementation of ComplexTextController in-line with the
design at https://trac.webkit.org/wiki/ComplexTextController. Previously,
ComplexTextController had a few problems:

you iterated over the entire string and added up the advances

  • FontCascade::getGlyphsAndAdvancesForComplexText() tried to compensate for

the above by construing the concepts of paint advances as distinct from layout
advances

  • Initial advances were considered part of layout sometimes and part of painting

other times, depending on which function reports the information

  • For RTL runs, the wrong origin was added to the initial advance, and the origin

should have been subtracted instead of added

This patch exhaustively updates every function in ComplexTextController to be
consistent with the design linked to above. This design solves all of these
problems.

Tests: ComplexTextControllerTest.InitialAdvanceWithLeftRunInRTL

ComplexTextControllerTest.InitialAdvanceInRTL
ComplexTextControllerTest.InitialAdvanceWithLeftRunInLTR
ComplexTextControllerTest.InitialAdvanceInLTR
ComplexTextControllerTest.InitialAdvanceInRTLNoOrigins
ComplexTextControllerTest.LeadingExpansion
ComplexTextControllerTest.VerticalAdvances

  • platform/graphics/GlyphBuffer.h:

(WebCore::GlyphBuffer::setLeadingExpansion): Deleted. No longer necessary.
(WebCore::GlyphBuffer::leadingExpansion): Deleted. Ditto.

  • platform/graphics/cocoa/FontCascadeCocoa.mm:

(WebCore::FontCascade::adjustSelectionRectForComplexText): Removed use of
unnecessary leadingExpansion().
(WebCore::FontCascade::getGlyphsAndAdvancesForComplexText): This function needs
to compute paint advances, which means that it can't base this information off
of layout advances. This function uses the trick mentioned at the end of the
above link to compute the paint offset of an arbitrary glyph in the middle of
an RTL run.

  • platform/graphics/mac/ComplexTextController.cpp:

(WebCore::ComplexTextController::computeExpansionOpportunity): Refactored for
testing.
(WebCore::ComplexTextController::ComplexTextController): Ditto.
(WebCore::ComplexTextController::finishConstruction): Ditto.
(WebCore::ComplexTextController::offsetForPosition): This function operates on
layout advances, and the initial layout advance is already added into the
m_adjustedBaseAdvances vector by adjustGlyphsAndAdvances(). Therefore, there is
no need to add it again here.
(WebCore::ComplexTextController::advance): This function had completely busted
logic about the relationship between initial advances and the first origin in
each run. Because of the fortunate choice of only representing layout advances
in m_adjustedBaseAdvances, this entire block can be removed and the raw paint
initial advance can be reported to the GlyphBuffer. Later in the function, we
have to update the logic about how to compute a paint advance given a layout
advance and some origins. In particular, there are two tricky pieces here: 1.
The layout advance for the first glyph is equal to (initial advance - first
origin + first Core Text advance, so computing the paint offset must cancel out
the initial layout offset, and 2. the last paint advance in a run must actually
end up at the position of the first glyph in the next run, so the next run's
initial advance must be queried.
(WebCore::ComplexTextController::adjustGlyphsAndAdvances): Previously, we
represented an initial advance of a successive run by just adding it to the
previous run's last advance. However, this is incompatible with the new model
presented in the link above, so we remove this section. We also have to add in
the logic that the layout advance for the first glyph is equal to the formula
presented above.

  • platform/graphics/mac/ComplexTextController.h:

(WebCore::ComplexTextController::ComplexTextRun::initialAdvance): Adjust comment
to reflect reality.
(WebCore::ComplexTextController::leadingExpansion): Deleted.

Tools:

Unskip existing tests and make some new tests:

  • Testing complex text with no origins
  • Testing initial expansions
  • Testing the sign of vertical advances
  • TestWebKitAPI/Tests/WebCore/ComplexTextController.cpp:

(TestWebKitAPI::TEST_F):

12:08 PM Changeset in webkit [211381] by Ryan Haddad
  • 15 edits
    3 deletes in trunk

Unreviewed, rolling out r211345.

The LayoutTest for this change is failing an assertion.

Reverted changeset:

"Web Inspector: Need some limit on Async Call Stacks for async
loops (rAF loops)"
https://bugs.webkit.org/show_bug.cgi?id=165633
http://trac.webkit.org/changeset/211345

12:05 PM Changeset in webkit [211380] by clopez@igalia.com
  • 2 edits in trunk/Tools

[GTK][EFL] Avoid using a thin directory to create the built product on the archive-built-product step.
https://bugs.webkit.org/show_bug.cgi?id=167596

Reviewed by Daniel Bates.

We avoid needing a thin directory by invoking the zip program with
the list of directories from the build directory to be zipped,
and by using the zip feature to exclude files matching a pattern.

  • BuildSlaveSupport/built-product-archive:

(copyBuildFiles):
(createZipFromList):
(archiveBuiltProduct):

11:46 AM Changeset in webkit [211379] by Simon Fraser
  • 16 edits
    6 adds in trunk

Fixed elements should not rubber-band in WK2, nor remain at negative offsets
https://bugs.webkit.org/show_bug.cgi?id=167484
rdar://problem/29453068

Reviewed by Dean Jackson.
Source/WebCore:

There were various problems with the layout rect computation:

  1. It ignored the scrollBehaviorForFixedElements() which we use to avoid rubber-banding fixed elements in WK2, but allow in WK1, so make use of that.
  2. Sometimes layouts/paints of fixed elements would be triggered when coalesced calls to AsyncScrollingCoordinator::scheduleUpdateScrollPositionAfterAsyncScroll() failed to copy the layoutViewportOrigin to the scheduled update.
  3. The layout viewport could be left with a negative top/left after rubber-banding.

Also add a way to do unconstrained scrollTo(), so that a test can call window.scrollTo(-10, -10) to
simulate rubberbanding.

Tests: fast/visual-viewport/rubberbanding-viewport-rects-header-footer.html

fast/visual-viewport/rubberbanding-viewport-rects.html

  • page/FrameView.cpp:

(WebCore::FrameView::computeLayoutViewportOrigin): Handle ScrollBehaviorForFixedElements, incorporating it
into logic that clamps layoutViewportOrigin between min/max when rubberbanding is not allowed, or not in progress.
(WebCore::FrameView::updateLayoutViewport): Pass in scrollBehaviorForFixedElements().
(WebCore::FrameView::visibleDocumentRect): The clamping here was preventing the visible rect from
escaping the document bounds, which caused fixed elements to bounce with rubber-banding, so remove the clamping,
and fix the logic to allow rubber-banding while taking headers and footers into account.

  • page/FrameView.h:
  • page/scrolling/AsyncScrollingCoordinator.cpp:

(WebCore::AsyncScrollingCoordinator::scheduleUpdateScrollPositionAfterAsyncScroll): layoutViewportOrigin has to
be pushed onto the scheduled update, just like scroll position.

  • page/scrolling/ScrollingTreeFrameScrollingNode.cpp:

(WebCore::ScrollingTreeFrameScrollingNode::layoutViewportForScrollPosition): Pass in m_behaviorForFixed.

  • platform/ScrollView.cpp:

(WebCore::ScrollView::ScrollView):
(WebCore::ScrollView::adjustScrollPositionWithinRange):
(WebCore::ScrollView::setScrollOffset):

  • platform/ScrollView.h:

(WebCore::ScrollView::setAllowsUnclampedScrollPositionForTesting):
(WebCore::ScrollView::allowsUnclampedScrollPosition):

  • testing/InternalSettings.cpp:

(WebCore::InternalSettings::setAllowUnclampedScrollPosition):

  • testing/InternalSettings.h:
  • testing/InternalSettings.idl:

Source/WebKit2:

Pass in StickToViewportBounds as we did before visual viewports.

  • UIProcess/ios/WebPageProxyIOS.mm:

(WebKit::WebPageProxy::computeCustomFixedPositionRect):

LayoutTests:

Add two tests that use internals.settings.setAllowUnclampedScrollPosition(true) and then
over-scroll to simulator rubber-banding, dumping viewport rects.

setAllowUnclampedScrollPosition() only works in WebKit2, so skip the tests elsewhere.

  • TestExpectations:
  • fast/visual-viewport/rubberbanding-viewport-rects-expected.txt: Added.
  • fast/visual-viewport/rubberbanding-viewport-rects-header-footer-expected.txt: Added.
  • fast/visual-viewport/rubberbanding-viewport-rects-header-footer.html: Added.
  • fast/visual-viewport/rubberbanding-viewport-rects.html: Added.
  • platform/ios-simulator-wk2/TestExpectations:
  • platform/ios-simulator-wk2/fast/visual-viewport/rubberbanding-viewport-rects-expected.txt: Added.
  • platform/ios-simulator-wk2/fast/visual-viewport/rubberbanding-viewport-rects-header-footer-expected.txt: Added.
  • platform/mac-wk2/TestExpectations:
11:40 AM Changeset in webkit [211378] by matthew_hanson@apple.com
  • 1 copy in branches/safari-604.1.5-branch

New Branch.

10:59 AM Changeset in webkit [211377] by Wenson Hsieh
  • 2 edits in trunk/Source/WebCore

Web content process crashes when initiating a drag on a very large image
https://bugs.webkit.org/show_bug.cgi?id=167564

Reviewed by Beth Dakin.

If we begin dragging an image element that is too large to show the cached image for, we will show an image file
icon instead of the cached image. This may return null if createDragImageIconForCachedImageFilename is
unimplemented, so in the meantime, we should not assume that dragImage will always exist before calling into
doSystemDrag in doImageDrag and bail from the drag operation if that is the case.

  • page/DragController.cpp:

(WebCore::DragController::doImageDrag):

10:45 AM Changeset in webkit [211376] by Chris Dumez
  • 20 edits in trunk/Source

Update DiagnosticLoggingClient::logDiagnosticMessageWithValue() to take in the value as a double
https://bugs.webkit.org/show_bug.cgi?id=167536

Reviewed by Darin Adler.

Update DiagnosticLoggingClient::logDiagnosticMessageWithValue() to take in the value as a double
instead of a string. The value needs to be numeric and the current API is error-prone.

Source/WebCore:

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::mediaPlayerEngineFailedToLoad):

  • loader/EmptyClients.cpp:
  • page/DiagnosticLoggingClient.h:

Source/WebKit2:

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::logDiagnosticMessage):
(WebKit::NetworkProcess::logDiagnosticMessageWithResult):
(WebKit::NetworkProcess::logDiagnosticMessageWithValue):

  • NetworkProcess/NetworkProcess.h:
  • Scripts/webkit/messages.py:

(headers_for_type):

  • Shared/WebCoreArgumentCoders.h:
  • UIProcess/HighPerformanceGraphicsUsageSampler.cpp:

(WebKit::HighPerformanceGraphicsUsageSampler::timerFired):

  • UIProcess/Network/NetworkProcessProxy.cpp:

(WebKit::NetworkProcessProxy::logDiagnosticMessage):
(WebKit::NetworkProcessProxy::logDiagnosticMessageWithResult):
(WebKit::NetworkProcessProxy::logDiagnosticMessageWithValue):

  • UIProcess/Network/NetworkProcessProxy.h:
  • UIProcess/Network/NetworkProcessProxy.messages.in:
  • UIProcess/PerActivityStateCPUUsageSampler.cpp:

(WebKit::PerActivityStateCPUUsageSampler::loggingTimerFired):

  • UIProcess/WebBackForwardList.cpp:

(WebKit::WebBackForwardList::goToItem):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::logDiagnosticMessage):
(WebKit::WebPageProxy::logDiagnosticMessageWithResult):
(WebKit::WebPageProxy::logDiagnosticMessageWithValue):

  • UIProcess/WebPageProxy.h:
  • UIProcess/WebPageProxy.messages.in:
  • WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.cpp:

(WebKit::WebDiagnosticLoggingClient::logDiagnosticMessage):
(WebKit::WebDiagnosticLoggingClient::logDiagnosticMessageWithResult):
(WebKit::WebDiagnosticLoggingClient::logDiagnosticMessageWithValue):

  • WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.h:
10:18 AM Changeset in webkit [211375] by Ryan Haddad
  • 8 edits in trunk

Unreviewed, rollout r211235 Pointer lock events should be delivered directly to the target element.

The LayoutTest for this change is frequently failing.

Source/WebCore:

  • page/EventHandler.cpp:

(WebCore::EventHandler::handleMousePressEvent):
(WebCore::EventHandler::handleMouseDoubleClickEvent):
(WebCore::EventHandler::handleMouseMoveEvent):
(WebCore::EventHandler::handleMouseReleaseEvent):
(WebCore::EventHandler::handleMouseForceEvent):
(WebCore::EventHandler::handleWheelEvent):

  • page/PointerLockController.cpp:

(WebCore::PointerLockController::isLocked): Deleted.
(WebCore::PointerLockController::dispatchLockedWheelEvent): Deleted.

  • page/PointerLockController.h:

LayoutTests:

  • platform/mac/TestExpectations:
  • pointer-lock/mouse-event-delivery-expected.txt:
  • pointer-lock/mouse-event-delivery.html:
10:16 AM Changeset in webkit [211374] by graouts@webkit.org
  • 7 edits in trunk

LayoutTest media/modern-media-controls/media-controller/media-controller-auto-hide-mouse-leave-after-play.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=167254
<rdar://problem/30259293>

Reviewed by Dean Jackson.

Source/WebCore:

When we would identify that we need to prolong an existing auto-hide timer, when the previous
auto-hide timer was marked as non-cancelable, calling _cancelAutoHideTimer() would not actually
cancel the previous timer, which would let it fire and hide the controls bar. We now have two
methods, _cancelAutoHideTimer() which always cancels the current auto-hide timer, and
_cancelNonEnforcedAutoHideTimer() which is used from all other existing call sites, which only
cancels the current auto-hide timer if it was marked as cancelable. This, and revised timing in
the test itself, make media/modern-media-controls/media-controller/media-controller-auto-hide-
mouse-leave-after-play.html a lot more reliable.

We also make a small drive-by fix where we ensure the "autoHideDelay" property is set first so
that setting other members which may set a timer do not used an undefined value for the auto-hide
timer delay.

  • Modules/modern-media-controls/controls/controls-bar.js:

(ControlsBar.prototype.set visible):
(ControlsBar.prototype.handleEvent):
(ControlsBar.prototype._cancelNonEnforcedAutoHideTimer):
(ControlsBar.prototype._cancelAutoHideTimer):

LayoutTests:

We improve the test by setting off timers when the actual "play" and "pause" events are
triggered rather than when we call .play() or .pause() on the media element. This matches
when the auto-hide timer are set in ControlsBar and makes the test more robust. Combined
with the modern-media-controls WebCore module source changes, we can now stop marking this
test as flaky.

We apply the same change to media/modern-media-controls/media-controller/media-controller-auto-hide-pause.html
since it also sets off a timer based on the media being paused.

  • media/modern-media-controls/media-controller/media-controller-auto-hide-mouse-leave-after-play-expected.txt:
  • media/modern-media-controls/media-controller/media-controller-auto-hide-mouse-leave-after-play.html:
  • media/modern-media-controls/media-controller/media-controller-auto-hide-pause.html:
  • platform/mac/TestExpectations:
10:14 AM Changeset in webkit [211373] by dbates@webkit.org
  • 11 edits
    3 adds
    1 delete in trunk/LayoutTests

[QuickLook] Make HTTP QuickLook tests work in Apple Internal DumpRenderTree
https://bugs.webkit.org/show_bug.cgi?id=167483

Reviewed by Andy Estes.

Write QuickLook tests that tap a hyperlink in terms of UIHelper (in LayoutTests/resources/ui-helper.js)
so that we can run these tests in an Apple Internal build of DumpRenderTree.

  • http/tests/quicklook/at-import-stylesheet-blocked.html: Write in terms of UIHelper.
  • http/tests/quicklook/base-url-blocked.html: Ditto.
  • http/tests/quicklook/cross-origin-iframe-blocked.html: Ditto.
  • http/tests/quicklook/document-domain-is-empty-string.html: Ditto.
  • http/tests/quicklook/external-stylesheet-blocked.html: Ditto.
  • http/tests/quicklook/hide-referer-on-navigation.html: Ditto.
  • http/tests/quicklook/resources/tap-at-point-and-notify-done.js: Removed.
  • http/tests/quicklook/resources/tap-run-test-hyperlink.js: Added.

(runTest):

  • http/tests/quicklook/submit-form-blocked.html: Ditto.
  • http/tests/quicklook/top-navigation-blocked.html: Ditto.
  • platform/ios-simulator-wk1/TestExpectations: Unskip QuickLook tests as we can now run

them in an Apple Internal build of DumpRenderTree. Note that these test are listed in
file LayoutTests/platform/ios-simulator/TestExpectations so that they are skipped in
WebKit for iOS Simulator built with the public iOS SDK as we need to fix <https://bugs.webkit.org/show_bug.cgi?id=141906>.

  • platform/ios-simulator-wk1/http/tests/quicklook/top-navigation-blocked-expected.txt: Added.

For some reason the console message "Unsafe JavaScript attempt to initiate navigation" includes
a line number in DumpRenderTree (why?). This line number is not emitted when the test is run
in WebKitTestRunner. Add platform-specific result for now.

10:13 AM Changeset in webkit [211372] by Carlos Garcia Campos
  • 5 edits in trunk/Source/WebCore

REGRESSION(r202615?): [GStreamer] ASSERTION FAILED: isMainThread() in WebCore::BuiltinResourceHandleConstructorMap& WebCore::builtinResourceHandleConstructorMap()
https://bugs.webkit.org/show_bug.cgi?id=167003

Reviewed by Michael Catanzaro.

Add a way to create a ResourceHandle for a given SoupNetworkSession and use it in the GStreamer streaming client
to ensure both the session and the handle are created and destroyed in the secondary thread. This way we also
avoid using the default session for downloading HLS fragments.

  • platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:

(ResourceHandleStreamingClient::ResourceHandleStreamingClient): Create a SoupNetworkSession and pass it to ResourceHandle::create().

  • platform/network/ResourceHandle.h: Add create and constructor to receive a SoupNetworkSession.
  • platform/network/ResourceHandleInternal.h: Add SoupNetworkSession member.
  • platform/network/soup/ResourceHandleSoup.cpp:

(WebCore::ResourceHandleInternal::soupSession): Return the SoupNetworkSession if not nullptr.
(WebCore::ResourceHandle::create): Create a ResourceHandle without trying to use any builtin constructor and
using the given SoupNetworkSession.
(WebCore::ResourceHandle::ResourceHandle): Set the SoupNetworkSession if early request validations didn't fail.

9:36 AM Changeset in webkit [211371] by commit-queue@webkit.org
  • 10 edits
    1 copy
    1 add in trunk/Source/WebCore

[WebRTC] Add support for libwebrtc data channel
https://bugs.webkit.org/show_bug.cgi?id=167489

Patch by Youenn Fablet <youennf@gmail.com> on 2017-01-30
Reviewed by Alex Christensen.

Partially covered by webrtc/datachannel/basic.html but not yet enabled on bots.

Introducing LibWebRTCDataChannelHandler as the integration layer between WebCore (RTCDataChannel)
and libwebrtc (DataChannelObserver).

  • Modules/mediastream/RTCDataChannel.cpp:

(WebCore::RTCDataChannel::create):
(WebCore::RTCDataChannel::RTCDataChannel):
(WebCore::RTCDataChannel::bufferedAmount):
(WebCore::RTCDataChannel::bufferedAmountIsDecreasing):

  • Modules/mediastream/RTCDataChannel.h:
  • Modules/mediastream/libwebrtc/LibWebRTCDataChannelHandler.cpp: Added.

(WebCore::LibWebRTCDataChannelHandler::~LibWebRTCDataChannelHandler):
(WebCore::LibWebRTCDataChannelHandler::setClient):
(WebCore::LibWebRTCDataChannelHandler::sendStringData):
(WebCore::LibWebRTCDataChannelHandler::sendRawData):
(WebCore::LibWebRTCDataChannelHandler::close):
(WebCore::LibWebRTCDataChannelHandler::OnStateChange):
(WebCore::LibWebRTCDataChannelHandler::OnMessage):

  • Modules/mediastream/libwebrtc/LibWebRTCDataChannelHandler.h:
  • Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:

(WebCore::LibWebRTCMediaEndpoint::OnRemoveStream):
(WebCore::LibWebRTCMediaEndpoint::addDataChannel):
(): Deleted.

  • Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp:

(WebCore::LibWebRTCPeerConnectionBackend::createDataChannelHandler):

  • dom/EventNames.h:
  • platform/mediastream/RTCDataChannelHandler.h:
  • platform/mediastream/RTCDataChannelHandlerClient.h:
  • platform/mock/RTCDataChannelHandlerMock.h:
9:31 AM Changeset in webkit [211370] by Jonathan Bedard
  • 10 edits
    1 add in trunk/Tools

Use simctl instead of LayoutTestRelay
https://bugs.webkit.org/show_bug.cgi?id=165927

Reviewed by Daniel Bates.

Part 1

LayoutTestRelay uses SPI, since recent versions of the iOS SDK allow for installing apps on
simulators through simctl (iOS 10 and later), use this functionality instead.

  • Scripts/webkitpy/port/base.py:

(Port.init): Added _test_runner_process_constructor.

  • Scripts/webkitpy/port/darwin.py:

(DarwinPort.app_identifier_from_bundle): Added function to extract bundle ID from plist.

  • Scripts/webkitpy/port/driver.py:

(Driver._start): Pass worker_number to server_process so we can look up the correct simulator device to use.
(IOSSimulatorDriver): Deleted.

  • Scripts/webkitpy/port/driver_unittest.py:

(DriverTest.test_stop_cleans_up_properly): Set _test_runner_process_constructor for testing.
(DriverTest.test_two_starts_cleans_up_properly): Ditto.
(DriverTest.test_start_actually_starts): Ditto.

  • Scripts/webkitpy/port/ios.py:

(IOSSimulatorPort): Remove relay_name.
(IOSSimulatorPort.init): Set _test_runner_process_constructor to SimulatorProcess for IOSSimulatorPort.
(IOSSimulatorPort._create_simulators): Formatting change.
(IOSSimulatorPort.relay_path): Deleted.
(IOSSimulatorPort._check_relay): Deleted.
(IOSSimulatorPort._check_port_build): Deleted. Use base class implementation
(IOSSimulatorPort._build_relay): Deleted.
(IOSSimulatorPort._build_driver): Deleted. Use base class implementation
(IOSSimulatorPort._driver_class): Deleted. Use base class implementation

  • Scripts/webkitpy/port/ios_unittest.py:

(iosTest.test_32bit): Update test.
(iosTest.test_64bit): Update test.

  • Scripts/webkitpy/port/server_process.py:

(ServerProcess.init): Added argument worker_number. This class does not make use of it. We will make use of this argument in SimulatorProcess to lookup the associated simulator device.
(ServerProcess._set_file_nonblocking): Added to share common code.

  • Scripts/webkitpy/port/server_process_mock.py:

(MockServerProcess.init): Added argument worker_number.

  • Scripts/webkitpy/port/simulator_process.py: Added.

(SimulatorProcess): Added.
(SimulatorProcess.Popen): Added.
(SimulatorProcess.Popen.init): Added. Initialize Popen structure with stdin, stdout, stderr and pid.
(SimulatorProcess.Popen.poll): Added. Check if the process is running.
(SimulatorProcess.Popen.wait): Added. Wait for process to close.
(SimulatorProcess.init): Added. Install app to device specified through port and worker_number.
(SimulatorProcess._reset): Added. Unlink fifos.
(SimulatorProcess._start): Added. Launch app on simulator, link fifos.
(SimulatorProcess._kill): Added. Shutdown app on simulator.

  • Scripts/webkitpy/xcode/simulator.py:

(Device.init): Accept host to run install/launch/terminate.
(Device.install_app): Install app to target Device.
(Device.launch_app): Launch app on target Device.
(Device.terminate_app): Shutdown app on target Device.
(Simulator._parse_devices): Pass host to Device.

9:09 AM Changeset in webkit [211369] by clopez@igalia.com
  • 2 edits in trunk/Tools

[GTK] pixman fails to compile on Raspberry Pi (GCC crash)
https://bugs.webkit.org/show_bug.cgi?id=167411

Reviewed by Michael Catanzaro.

Disable the ARM iwMMXt fast path for pixman, because it triggers
a GCC bug on the RPi with Raspbian/PIXEL causing a build failure.

  • gtk/jhbuild.modules:
9:04 AM Changeset in webkit [211368] by Csaba Osztrogonác
  • 2 edits in trunk/Source/WebKit2

[Mac][cmake] Fix the build after r211354.
https://bugs.webkit.org/show_bug.cgi?id=167565

Unreviewed buildfix.

  • PlatformMac.cmake:
8:53 AM Changeset in webkit [211367] by magomez@igalia.com
  • 2 edits in trunk/Source/WebKit2

[GTK] Scrolling iframes, doesn't redraw their content
https://bugs.webkit.org/show_bug.cgi?id=167581

Reviewed by Carlos Garcia Campos.

Take into account whether we are using AC or not in order to repaint an area after scrolling.

No behaviour change, no new tests.

  • WebProcess/WebCoreSupport/WebChromeClient.cpp:

(WebKit::WebChromeClient::invalidateContentsForSlowScroll):

8:47 AM Changeset in webkit [211366] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebKit2

Unreviewed. Fix GTK+ debug build after r211365.

Remove invalid assert.

  • WebProcess/WebPage/AcceleratedDrawingArea.cpp:

(WebKit::AcceleratedDrawingArea::exitAcceleratedCompositingModeNow):

8:42 AM Changeset in webkit [211365] by Carlos Garcia Campos
  • 7 edits in trunk/Source/WebKit2

[GTK] Do not release OpenGL resource immediately when leaving accelerated compositing mode
https://bugs.webkit.org/show_bug.cgi?id=167544

Reviewed by Michael Catanzaro.

Sometimes the conditions to be in AC mode or not change quickly, and then we leave AC mode just enter it again
after a very short period of time. In those cases we are dropping all the GL resources and the compositor
thread, and creating it again. We could keep the layer tree host alive for a while when exiting AC mode, and
reuse it if we enter AC mode before the previous one has been discarded. While the previous layer tree host is
alive we still need to keep it up to date, for example if the web view is resized or contents size change, and
synchronize with the threaded compositor when it becomes the layer tree host again.

  • WebProcess/WebPage/AcceleratedDrawingArea.cpp:

(WebKit::AcceleratedDrawingArea::~AcceleratedDrawingArea): Discard the previous layer tree host.
(WebKit::AcceleratedDrawingArea::AcceleratedDrawingArea): Initialize the timer to discard the previous layer
tree host.
(WebKit::AcceleratedDrawingArea::pageBackgroundTransparencyChanged): Notify the previous layer tree host if needed.
(WebKit::AcceleratedDrawingArea::mainFrameContentSizeChanged): Ditto.
(WebKit::AcceleratedDrawingArea::updateBackingStoreState): Ditto.
(WebKit::AcceleratedDrawingArea::enterAcceleratedCompositingMode): Reuse the previous layer tree host if possible.
(WebKit::AcceleratedDrawingArea::exitAcceleratedCompositingModeNow): Exit AC mode and save the layer tree host
starting a timer of 5 seconds to discard it if not reused.
(WebKit::AcceleratedDrawingArea::discardPreviousLayerTreeHost): Invalidate and destroy the previous layer tree host.
(WebKit::AcceleratedDrawingArea::didChangeViewportAttributes): Notify the previous layer tree host if needed.
(WebKit::AcceleratedDrawingArea::deviceOrPageScaleFactorChanged): Ditto.

  • WebProcess/WebPage/AcceleratedDrawingArea.h:
  • WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.cpp:

(WebKit::ThreadedCoordinatedLayerTreeHost::scrollNonCompositedContents): If it's discardable add the action to
be synchronized instead.
(WebKit::ThreadedCoordinatedLayerTreeHost::contentsSizeChanged): Ditto.
(WebKit::ThreadedCoordinatedLayerTreeHost::deviceOrPageScaleFactorChanged): Ditto.
(WebKit::ThreadedCoordinatedLayerTreeHost::pageBackgroundTransparencyChanged): Ditto.
(WebKit::ThreadedCoordinatedLayerTreeHost::sizeDidChange): Ditto.
(WebKit::ThreadedCoordinatedLayerTreeHost::didChangeViewportAttributes): Ditto.
(WebKit::ThreadedCoordinatedLayerTreeHost::setIsDiscardable): When the layer tree host becomes discardable,
reset the sync actions and return. When it becomes the real layer tree host again, apply all pending actions to
synchronize with the threaded compositor.

  • WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.h:
  • WebProcess/WebPage/DrawingAreaImpl.cpp:

(WebKit::DrawingAreaImpl::scroll): Notify the previous layer tree host if needed.
(WebKit::DrawingAreaImpl::mainFrameContentSizeChanged): Ditto.
(WebKit::DrawingAreaImpl::exitAcceleratedCompositingMode): Use AcceleratedDrawingArea::exitAcceleratedCompositingModeNow().

  • WebProcess/WebPage/LayerTreeHost.h:

(WebKit::LayerTreeHost::setIsDiscardable): Added.

8:35 AM Changeset in webkit [211364] by Manuel Rego Casasnovas
  • 3 edits
    2 deletes in trunk/Source/WebKit2

[GTK] Remove support to enable/disable experimental features
https://bugs.webkit.org/show_bug.cgi?id=167586

Reviewed by Michael Catanzaro.

As requested in bug #167578 we should remove the support to enable/disable
experimental features in WebKitGTK+.
One reason is that CSS Grid Layout is going to be enabled by default now,
so we don't need it to be in this file.
Another is that this support needs to be rewritten to use
the enumerable experimental features API.

  • PlatformGTK.cmake:
  • UIProcess/API/gtk/WebKitSettings.cpp:

(webKitSettingsConstructed):

  • UIProcess/gtk/ExperimentalFeatures.cpp: Removed.
  • UIProcess/gtk/ExperimentalFeatures.h: Removed.
7:38 AM EnvironmentVariables edited by Michael Catanzaro
Removed WEBKITGTK_EXPERIMENTAL_FEATURES (diff)
6:31 AM WebKitGTK/2.14.x edited by clopez@igalia.com
(diff)
5:50 AM WebKitGTK/2.14.x edited by Michael Catanzaro
(diff)
5:50 AM Changeset in webkit [211363] by Carlos Garcia Campos
  • 8 edits in trunk

[GTK] Add API to handle the accelerated compositing policy
https://bugs.webkit.org/show_bug.cgi?id=167509

Reviewed by Michael Catanzaro.

Source/WebKit2:

Now that we have brought back the on demand mode, we should allow applications to choose the policy, without
having to deal with environment variables. Settings also allows to set different policy depending on the web
view, so for example evolution could disable AC for the composer, but leave the on demand mode for the email
viewer. This patch adds a single new setting hardware-acceleration-policy to handle both
acceleratedCompositingEnabled and forceCompositingMode preferences using an enum with values
WEBKIT_HARDWARE_ACCELERATION_POLICY_ON_DEMAND, WEBKIT_HARDWARE_ACCELERATION_POLICY_ALWAYS and
WEBKIT_HARDWARE_ACCELERATION_POLICY_NEVER.

  • UIProcess/API/gtk/WebKitSettings.cpp:

(webKitSettingsSetProperty): Add setter for hardware-acceleration-policy property.
(webKitSettingsGetProperty): Add getter for hardware-acceleration-policy property.
(webkit_settings_class_init): Add hardware-acceleration-policy property.
(webkit_settings_get_hardware_acceleration_policy): Return policy according to the preferences.
(webkit_settings_set_hardware_acceleration_policy): set preferences according to the given policy.

  • UIProcess/API/gtk/WebKitSettings.h:
  • UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt: Add new symbols.
  • WebProcess/WebPage/DrawingAreaImpl.cpp:

(WebKit::DrawingAreaImpl::updatePreferences):

Tools:

Handle new setting in MiniBrowser. The settings dialog doesn't support enum settings so it needs to be handled
as a special case. Also add test cases to the get/set API.

  • MiniBrowser/gtk/BrowserSettingsDialog.c:

(hardwareAccelerationPolicyToString):
(stringToHardwareAccelerationPolicy):
(cellRendererChanged):
(browserSettingsDialogConstructed):

  • TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitSettings.cpp:

(testWebKitSettings):

4:07 AM Changeset in webkit [211362] by akling@apple.com
  • 2 edits in trunk/Source/WebKit/mac

[macOS] WebHTMLView has an internal retain cycle with its flagsChangedEventMonitor.
<https://webkit.org/b/167580>

Reviewed by Antti Koivisto.

Avoid the implicit strong capture of self by keeping it in a block variable.
Also add code to dealloc to unregister the event monitor, since it will otherwise leak.
This fixes huge WebHTMLView leaks seen on the leaks bot.

  • WebView/WebHTMLView.mm:

(-[WebHTMLViewPrivate dealloc]):
(-[WebHTMLView viewDidMoveToWindow]):

2:27 AM Changeset in webkit [211361] by Carlos Garcia Campos
  • 2 edits in trunk/LayoutTests

Unreviewed. Skip more tests timing out in GTK+ bots.

Skip two mores tests that use UIScriptController to generate events and another one expecting native
HTML form validation popover.

  • platform/gtk/TestExpectations:
2:14 AM Changeset in webkit [211360] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebCore

Several web timing tests crash in GTK+ and AppleWin bots
https://bugs.webkit.org/show_bug.cgi?id=167577

Reviewed by Ryosuke Niwa.

The problem is that entry is used in both the key, to get name, and in the value with WTFMove. So, the name is
invalidated by the move. It could be fixed by simply copying the name, instead of using entry->name, but I think
that code could be simplified using HashMap::ensure and then we don't need any string copy, nor even the static
insertPerformanceEntry().

Fix crashes in several imported/w3c/web-platform-tests/user-timing/ tests.

  • page/PerformanceUserTiming.cpp:

(WebCore::UserTiming::mark):
(WebCore::UserTiming::measure):
(WebCore::insertPerformanceEntry): Deleted.

2:10 AM Changeset in webkit [211359] by Carlos Garcia Campos
  • 2 edits in trunk/LayoutTests

Unreviewed. Skip form validation tests timing out in GTK+ bots.

  • platform/gtk/TestExpectations:
12:47 AM Changeset in webkit [211358] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebCore

[Threaded Compositor] Crash in GraphicsContext3D::deleteTexture when destroying TextureMapperPlatformLayerProxy
https://bugs.webkit.org/show_bug.cgi?id=167575

Reviewed by Žan Doberšek.

We should clear all the buffers on invalidate to ensure we don't have textures alive after CoordinatedGraphicsScene::purgeGLResources().

Fix crash in media/video-poster-background.html.

  • platform/graphics/texmap/TextureMapperPlatformLayerProxy.cpp:

(WebCore::TextureMapperPlatformLayerProxy::invalidate): Clear current, pending and all used buffers.

Note: See TracTimeline for information about the timeline view.