Timeline



Apr 21, 2017:

11:18 PM Changeset in webkit [215663] by wenson_hsieh@apple.com
  • 20 edits in trunk

Support writing link titles to the pasteboard when beginning data interaction on a link
https://bugs.webkit.org/show_bug.cgi?id=171154
<rdar://problem/31356937>

Reviewed by Andy Estes.

Source/WebCore:

Currently, when writing NSURLs to the pasteboard, we only write a String to the pasteboard corresponding to
kUTTypeURL. This means richer data associated with the link (in this case, the title) are not captured when
writing to the pasteboard. To address this, we introduce a new codepath for writing links to the pasteboard that
mirrors the way PasteboardImage and PasteboardWebContent are written to the pasteboard.

Test: Augmented DataInteractionTests.LinkToInput.

  • platform/PasteboardStrategy.h:
  • platform/PlatformPasteboard.h:

Add plumbing support for writing PasteboardURLs.

  • platform/ios/PasteboardIOS.mm:

(WebCore::Pasteboard::write):

  • platform/ios/PlatformPasteboardIOS.mm:

(WebCore::PlatformPasteboard::writeObjectRepresentations):

Teach PlatformPasteboard to also set the _title attribute of the NSURL when creating an NSURL representation
for registering with the shared WebItemProviderPasteboard.

(WebCore::PlatformPasteboard::write):

  • platform/ios/WebItemProviderPasteboard.mm:

Remove deprecation guards and replace deprecated method calls with the latest undeprecated versions.

(-[WebItemProviderPasteboard setItemsFromObjectRepresentations:]):

Source/WebKit/mac:

Adjust for some changes in WebCore to introduce a separate codepath for writing PasteboardURLs. See WebCore
and WebKit2 ChangeLogs for more details.

  • WebCoreSupport/WebPlatformStrategies.h:
  • WebCoreSupport/WebPlatformStrategies.mm:

(WebPlatformStrategies::writeToPasteboard):

Source/WebKit2:

Adds support for setting the _title attribute of NSURLs written to the pasteboard. See WebCore ChangeLog for more details.

  • Scripts/webkit/messages.py:

(headers_for_type):

  • Shared/WebCoreArgumentCoders.cpp:

(IPC::ArgumentCoder<PasteboardURL>::encode):
(IPC::ArgumentCoder<PasteboardURL>::decode):

  • Shared/WebCoreArgumentCoders.h:

Teach PasteboardURL to be serialized in IPC. For now, we just send across the absolute string of the link and
its title.

  • UIProcess/Cocoa/WebPasteboardProxyCocoa.mm:

(WebKit::WebPasteboardProxy::writeURLToPasteboard):

  • UIProcess/WebPasteboardProxy.h:
  • UIProcess/WebPasteboardProxy.messages.in:

Add IPC plumbing for writing PasteboarURLs to the pasteboard.

  • WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:

(WebKit::WebPlatformStrategies::writeToPasteboard):

  • WebProcess/WebCoreSupport/WebPlatformStrategies.h:

Tools:

Augments an existing unit test, DataInteractionTests.LinkToInput, to also check that the fetching the NSURL from
the source UIItemProvider generated by performing data interaction results in an NSURL with the _title attribute
matching the title of the link.

  • TestWebKitAPI/Tests/ios/DataInteractionTests.mm:

(TestWebKitAPI::TEST):

9:31 PM Changeset in webkit [215662] by jfbastien@apple.com
  • 2 edits in trunk/JSTests

Noisy OOM

7:23 PM Changeset in webkit [215661] by mcatanzaro@igalia.com
  • 51 edits in trunk

Unreviewed, rolling out r215608.

Hundreds of test failures on GTK bot

Reverted changeset:

"Reduce copies and allocations in SharedBuffer::append"
https://bugs.webkit.org/show_bug.cgi?id=170956
http://trac.webkit.org/changeset/215608

7:01 PM Changeset in webkit [215660] by zalan@apple.com
  • 5 edits
    4 adds in trunk

REGRESSION(r205374): <li> content inside <ul> should mid-word wrap when word-break: break-word is present.
https://bugs.webkit.org/show_bug.cgi?id=171108
<rdar://problem/30271747>

Reviewed by Dan Bernstein.

Source/WebCore:

This patch ensures that we search for mid-word breaks when a zero sized element has been committed on the line
unless it's an image or some other replaced element with special properties (e.g. list-style: inside).

Tests: fast/replaced/ul-li-word-break-break-word.html

fast/replaced/zero-width-image-force-linebreak.html

  • rendering/line/BreakingContext.h:

(WebCore::BreakingContext::handleReplaced):
(WebCore::BreakingContext::handleText): This matches pre-r205374 behaviour, but it's explicit about whether a
replaced width has already been committed on the current line.

  • rendering/line/LineWidth.cpp:

(WebCore::LineWidth::commit):

  • rendering/line/LineWidth.h:

(WebCore::LineWidth::hasCommittedReplaced):
(WebCore::LineWidth::addUncommittedReplacedWidth): These 2 last functions were removed with r205374 (and now I am adding them back).

LayoutTests:

  • fast/replaced/ul-li-word-break-break-word-expected.html: Added.
  • fast/replaced/ul-li-word-break-break-word.html: Added.
  • fast/replaced/zero-width-image-force-linebreak-expected.html: Added.
  • fast/replaced/zero-width-image-force-linebreak.html: Added.
6:00 PM Changeset in webkit [215659] by jer.noble@apple.com
  • 3 edits in trunk/Source/WebCore

[MediaCapture] Improvements to CoreAudioCaptureSource
https://bugs.webkit.org/show_bug.cgi?id=171146

Reviewed by Eric Carlson.

Various interlocking improvements to CoreAudioCaptureSource:

  • Allow the volume, sampleRate, and echoCancellation settings to be applied to the source.
  • Update the values returned via settings() when these values change.
  • Obey the sampleRate and echoCancellation settings when creating the VPIO unit.
  • Because AudioUnitRender() mutates the passed in AudioBufferList, reset it immediately before calling.
  • platform/mediastream/mac/CoreAudioCaptureSource.cpp:

(WebCore::CoreAudioCaptureSource::create):
(WebCore::CoreAudioCaptureSource::CoreAudioCaptureSource):
(WebCore::CoreAudioCaptureSource::preferredSampleRate):
(WebCore::CoreAudioCaptureSource::preferredIOBufferSize):
(WebCore::CoreAudioCaptureSource::configureMicrophoneProc):
(WebCore::CoreAudioCaptureSource::configureSpeakerProc):
(WebCore::CoreAudioCaptureSource::processMicrophoneSamples):
(WebCore::CoreAudioCaptureSource::setupAudioUnits):
(WebCore::CoreAudioCaptureSource::stopProducingData):
(WebCore::CoreAudioCaptureSource::settings):
(WebCore::CoreAudioCaptureSource::settingsDidChange):
(WebCore::CoreAudioCaptureSource::preferredIOBufferDuration): Deleted.

  • platform/mediastream/mac/CoreAudioCaptureSource.h:
5:55 PM Changeset in webkit [215658] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebCore

com.apple.WebCore: non-virtual thunk to WebCore::LibWebRTCDataChannelHandler::OnBufferedAmountChange + 39
https://bugs.webkit.org/show_bug.cgi?id=171087
<rdar://problem/31739051>

Patch by Youenn Fablet <youenn@apple.com> on 2017-04-21
Reviewed by Eric Carlson.

Covered by existing tests.
No test added as this behavior is really libwebrtc specific and cannot be triggered easily.

  • Modules/mediastream/RTCDataChannel.cpp:

(WebCore::RTCDataChannel::close): Stopping observing libwebrtc data channel before closing it.
This ensures we will stop getting notified as soon as there is no more interest.

  • Modules/mediastream/libwebrtc/LibWebRTCDataChannelHandler.cpp:

(WebCore::LibWebRTCDataChannelHandler::OnStateChange): libwebrtc can still notify us even though we said we were
not interested. Ensuring we do not call the client if we are no longer interested.
(WebCore::LibWebRTCDataChannelHandler::OnMessage): Ditto.
(WebCore::LibWebRTCDataChannelHandler::OnBufferedAmountChange): Ditto.

5:53 PM Changeset in webkit [215657] by aestes@apple.com
  • 4 edits in trunk/Source

[macOS] Enable media selection button on AVTouchBarScrubber
https://bugs.webkit.org/show_bug.cgi?id=171149
<rdar://problem/29875010>

Reviewed by Beth Dakin.

Source/WebCore:

  • platform/spi/cocoa/AVKitSPI.h:

Source/WebKit2:

  • UIProcess/Cocoa/WebViewImpl.mm:

(WebKit::WebViewImpl::updateMediaTouchBar):

5:51 PM Changeset in webkit [215656] by aestes@apple.com
  • 3 edits in trunk/Source/WebCore

[macOS] Name WebPlaybackControlsManager delegate methods correctly depending on OS version
https://bugs.webkit.org/show_bug.cgi?id=171147
<rdar://problem/29875010>

Reviewed by Beth Dakin.

On macOS 10.12, WebPlaybackControlsManager conforms to
AVFunctionBarPlaybackControlsControlling, but on 10.13 it conforms to
AVTouchBarPlaybackControlsControlling. These protocols are near-identical, except for
instances of "FunctionBar" in method names are renamed to "TouchBar". This patch updates to
the new method names, and generally renames things with "FunctionBar" to "TouchBar".

  • platform/mac/WebPlaybackControlsManager.h:
  • platform/mac/WebPlaybackControlsManager.mm:

(-[WebPlaybackControlsManager generateTouchBarThumbnailsForTimes:tolerance:size:thumbnailHandler:]):
(-[WebPlaybackControlsManager generateTouchBarAudioAmplitudeSamples:completionHandler:]):
(-[WebPlaybackControlsManager canBeginTouchBarScrubbing]):
(-[WebPlaybackControlsManager beginTouchBarScrubbing]):
(-[WebPlaybackControlsManager endTouchBarScrubbing]):
(-[WebPlaybackControlsManager generateFunctionBarThumbnailsForTimes:size:completionHandler:]):
(-[WebPlaybackControlsManager generateFunctionBarAudioAmplitudeSamples:completionHandler:]):
(-[WebPlaybackControlsManager canBeginFunctionBarScrubbing]):
(-[WebPlaybackControlsManager beginFunctionBarScrubbing]):
(-[WebPlaybackControlsManager endFunctionBarScrubbing]):
(-[WebPlaybackControlsManager audioTouchBarMediaSelectionOptions]):
(-[WebPlaybackControlsManager setAudioTouchBarMediaSelectionOptions:]):
(-[WebPlaybackControlsManager currentAudioTouchBarMediaSelectionOption]):
(-[WebPlaybackControlsManager setCurrentAudioTouchBarMediaSelectionOption:]):
(-[WebPlaybackControlsManager legibleTouchBarMediaSelectionOptions]):
(-[WebPlaybackControlsManager setLegibleTouchBarMediaSelectionOptions:]):
(-[WebPlaybackControlsManager currentLegibleTouchBarMediaSelectionOption]):
(-[WebPlaybackControlsManager setCurrentLegibleTouchBarMediaSelectionOption:]):
(-[WebPlaybackControlsManager setAudioMediaSelectionOptions:withSelectedIndex:]):
(-[WebPlaybackControlsManager setLegibleMediaSelectionOptions:withSelectedIndex:]):
(-[WebPlaybackControlsManager audioFunctionBarMediaSelectionOptions]): Deleted.
(-[WebPlaybackControlsManager setAudioFunctionBarMediaSelectionOptions:]): Deleted.
(-[WebPlaybackControlsManager currentAudioFunctionBarMediaSelectionOption]): Deleted.
(-[WebPlaybackControlsManager setCurrentAudioFunctionBarMediaSelectionOption:]): Deleted.
(-[WebPlaybackControlsManager legibleFunctionBarMediaSelectionOptions]): Deleted.
(-[WebPlaybackControlsManager setLegibleFunctionBarMediaSelectionOptions:]): Deleted.
(-[WebPlaybackControlsManager currentLegibleFunctionBarMediaSelectionOption]): Deleted.
(-[WebPlaybackControlsManager setCurrentLegibleFunctionBarMediaSelectionOption:]): Deleted.

5:14 PM Changeset in webkit [215655] by jer.noble@apple.com
  • 7 edits in trunk/Source/WebCore

Make CoreAudioCaptureDevice stackable.
https://bugs.webkit.org/show_bug.cgi?id=171097

Reviewed by Eric Carlson.

There's no real reason to keep CoreAudioCaptureDevice from being created on the stack.
Make it un-RefCounted, and have it's static factory method return an std::optional rather
than a RefPtr.

Drive-by fix: clean up the factory method of CoreAudioCaptureSource a bit.

  • platform/mediastream/mac/CoreAudioCaptureDevice.cpp:

(WebCore::CoreAudioCaptureDevice::create):
(WebCore::CoreAudioCaptureDevice::deviceID): Deleted.

  • platform/mediastream/mac/CoreAudioCaptureDevice.h:

(WebCore::CoreAudioCaptureDevice::deviceID):

  • platform/mediastream/mac/CoreAudioCaptureDeviceManager.cpp:

(WebCore::CoreAudioCaptureDeviceManager::coreAudioCaptureDevices):
(WebCore::CoreAudioCaptureDeviceManager::coreAudioDeviceWithUID):
(WebCore::CoreAudioCaptureDeviceManager::refreshAudioCaptureDevices):

  • platform/mediastream/mac/CoreAudioCaptureDeviceManager.h:
  • platform/mediastream/mac/CoreAudioCaptureSource.cpp:

(WebCore::CoreAudioCaptureSource::create):
(WebCore::CoreAudioCaptureSource::CoreAudioCaptureSource):

  • platform/mediastream/mac/CoreAudioCaptureSource.h:
5:06 PM Changeset in webkit [215654] by eric.carlson@apple.com
  • 2 edits in trunk/Source/WebCore

[MediaStream iOS] Release capture session when not producing data
https://bugs.webkit.org/show_bug.cgi?id=171148
<rdar://problem/29265868>

Reviewed by Jer Noble.

On iOS, only one AVCaptureSession can be active at a time, so release a session whenever
it is told to stop producing data. The session will recreated if the capture source if/when
told to produce data again.

  • platform/mediastream/mac/AVMediaCaptureSource.mm:

(WebCore::AVMediaCaptureSource::stopProducingData): Clear m_session to release the session.
It will be re-allocated if startProducingData is called later.

5:03 PM Changeset in webkit [215653] by wenson_hsieh@apple.com
  • 18 edits
    1 delete in trunk

[WK2] Add delegate hooks for overriding unhanded data interaction operations
https://bugs.webkit.org/show_bug.cgi?id=171005
<rdar://problem/31669646>

Reviewed by Tim Horton.

Source/WebKit2:

Adds support for overriding data interaction operations through two new delegate methods:
_webView:willUpdateDataInteractionOperationToOperation:forSession:, and
_webView:dataInteractionOperationWasHandled:forSession:. The former may be overridden to return a different
operation type than what WebKit would originally have returned, and the latter may be overridden to run custom
logic after the web process has handled a data interaction operation.

Additionally, includes some minor cleanup around WKContentViewInteraction. With the new
_webView:dataInteractionOperationWasHandled:forSession: delegate method, the last method on _WKTestingDelegate
may be removed. This means _WKTestingDelegate is no longer needed, so this patch removes its header entirely.
Also, relocates some state variables formerly on WKContentView to WKContentView's WKDataInteractionState struct
instead, so that all state associated with data interaction may be cleaned up at the same time.

  • UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _testingDelegate]): Deleted.
(-[WKWebView _setTestingDelegate:]): Deleted.

  • UIProcess/API/Cocoa/WKWebViewPrivate.h:
  • UIProcess/API/Cocoa/_WKTestingDelegate.h: Removed.
  • UIProcess/PageClient.h:
  • UIProcess/WebPageProxy.h:
  • UIProcess/WebPageProxy.messages.in:

Add a new "handled" IPC argument to DidPerformDataInteractionControllerOperation. This lets the UI process
know whether or not the data interaction operation was handled by the web process, and is eventually plumbed
through to the UI delegate via the new SPI.

  • UIProcess/ios/PageClientImplIOS.h:
  • UIProcess/ios/PageClientImplIOS.mm:

(WebKit::PageClientImpl::didPerformDataInteractionControllerOperation):

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

(-[WKContentView cleanupInteraction]):
(-[WKContentView _displayFormNodeInputView]):
(-[WKContentView _startAssistingNode:userIsInteracting:blurPreviousNode:userObject:]):

  • UIProcess/ios/WebPageProxyIOS.mm:

(WebKit::WebPageProxy::didPerformDataInteractionControllerOperation):

  • WebKit2.xcodeproj/project.pbxproj:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::performDragControllerAction):

Tools:

Adds a new API test checking that normal WebKit behavior when vending updated data interaction operations may
be overridden, resulting in a data interaction operation being performed when it otherwise would not have. Also
adjusts for some changes in WebKit2 (See WebKit2 ChangeLog for more details).

New API test:
DataInteractionTests.OverrideDataInteractionOperation

  • TestWebKitAPI/Tests/ios/DataInteractionTests.mm:

(-[UIItemProvider registerDataRepresentationForTypeIdentifier:withData:]):
(TestWebKitAPI::TEST):

  • TestWebKitAPI/ios/DataInteractionSimulator.h:
  • TestWebKitAPI/ios/DataInteractionSimulator.mm:

(-[DataInteractionSimulator initWithWebView:]):
(-[DataInteractionSimulator dealloc]):
(-[DataInteractionSimulator _webView:dataInteractionOperationWasHandled:forSession:itemProviders:]):
(-[DataInteractionSimulator _webView:willUpdateDataInteractionOperationToOperation:forSession:]):
(-[DataInteractionSimulator webViewDidPerformDataInteractionControllerOperation:]): Deleted.

4:58 PM Changeset in webkit [215652] by commit-queue@webkit.org
  • 5 edits
    2 adds in trunk

AX: FKA: Buttons need a visible focus indicator
https://bugs.webkit.org/show_bug.cgi?id=171040
<rdar://problem/30922548>

Patch by Aaron Chu <aaron_chu@apple.com> on 2017-04-21
Reviewed by Antoine Quint.

Source/WebCore:

Added a background color for the focus state of the icon buttons in modern media controls.

Test: media/modern-media-controls/icon-button/icon-button-focus-state.html

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

(button.icon:focus):

LayoutTests:

  • TestExpectations:
  • media/modern-media-controls/icon-button/icon-button-focus-state-expected.txt: Added.
  • media/modern-media-controls/icon-button/icon-button-focus-state.html: Added.
  • platform/mac/TestExpectations:
3:55 PM Changeset in webkit [215651] by Ryan Haddad
  • 3 edits in trunk/Tools

Temporarily disable two flaky API tests.

Unreviewed test gardening.

  • TestWebKitAPI/Tests/WebKit2Cocoa/BundleRangeHandle.mm:

(TEST):

  • TestWebKitAPI/Tests/WebKit2Cocoa/DataDetection.mm:

(TEST):

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

Mark inspector/debugger/tail-deleted-frames-this-value.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=169119

Unreviewed test gardening.

  • platform/mac/TestExpectations:
3:45 PM Changeset in webkit [215649] by mrajca@apple.com
  • 5 edits in trunk/Source/WebCore

Consider muting audio hardware a form of autoplay interference.
https://bugs.webkit.org/show_bug.cgi?id=169971

Reviewed by Eric Carlson.

If the user mutes audio hardware and a media element is auto-playing, consider that
as a form of auto-play interference that we tell clients about.

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::HTMLMediaElement):
(WebCore::HTMLMediaElement::~HTMLMediaElement):
(WebCore::HTMLMediaElement::hardwareMutedStateDidChange):

  • html/HTMLMediaElement.h:
  • platform/audio/AudioSession.h:

(WebCore::AudioSession::MutedStateObserver::~MutedStateObserver):

  • platform/audio/mac/AudioSessionMac.cpp:

(WebCore::AudioSession::isMuted):
(WebCore::muteProcess):
(WebCore::AudioSession::handleMutedStateChange):
(WebCore::AudioSession::addMutedStateObserver):
(WebCore::AudioSession::removeMutedStateObserver):

3:23 PM Changeset in webkit [215648] by Chris Dumez
  • 24 edits
    2 adds in trunk

Regression(r206240): XMLSerializer.serializeToString() does not properly escape '<' / '>' in attribute values
https://bugs.webkit.org/show_bug.cgi?id=171132
<rdar://problem/31426752>

Reviewed by Ryosuke Niwa.

LayoutTests/imported/w3c:

Re-sync web-platform-tests/domparsing from upstream.

  • web-platform-tests/domparsing/DOMParser-parseFromString-html.html:
  • web-platform-tests/domparsing/DOMParser-parseFromString-xml-doctype.html:
  • web-platform-tests/domparsing/DOMParser-parseFromString-xml.html:
  • web-platform-tests/domparsing/XMLSerializer-serializeToString.html:
  • web-platform-tests/domparsing/createContextualFragment.html:
  • web-platform-tests/domparsing/innerhtml-01.xhtml:
  • web-platform-tests/domparsing/innerhtml-03.xhtml:
  • web-platform-tests/domparsing/innerhtml-04.html:
  • web-platform-tests/domparsing/innerhtml-05.xhtml:
  • web-platform-tests/domparsing/innerhtml-06.html:
  • web-platform-tests/domparsing/innerhtml-07.html:
  • web-platform-tests/domparsing/insert-adjacent.html:
  • web-platform-tests/domparsing/insert_adjacent_html-xhtml.xhtml:
  • web-platform-tests/domparsing/insert_adjacent_html.html:
  • web-platform-tests/domparsing/outerhtml-01.html:
  • web-platform-tests/domparsing/outerhtml-02.html:
  • web-platform-tests/domparsing/style_attribute_html.html:
  • web-platform-tests/domparsing/w3c-import.log:
  • web-platform-tests/domparsing/xml-serialization.xhtml:

Source/WebCore:

Use XMLSerialization [1] in MarkupAccumulator::appendAttribute() when inXMLFragmentSerialization()
returns true, even if the node's associated document is an HTML document. When XMLSerializer.serializeToString()
is called on a Node, we want XML serialization, even if the node comes from an HTML document.

[1] https://w3c.github.io/DOM-Parsing/#dfn-xml-serialization

Test: fast/dom/XMLSerializer-serializeToString-entities.html

  • editing/MarkupAccumulator.cpp:

(WebCore::MarkupAccumulator::appendAttributeValue):
(WebCore::MarkupAccumulator::appendAttribute):

  • editing/MarkupAccumulator.h:

LayoutTests:

Add layout test coverage. This test is passing in both Firefox and Chrome.

  • fast/dom/XMLSerializer-serializeToString-entities-expected.txt: Added.
  • fast/dom/XMLSerializer-serializeToString-entities.html: Added.
3:17 PM Changeset in webkit [215647] by commit-queue@webkit.org
  • 2 edits in trunk/LayoutTests

[ios-simulator] LayoutTest webrtc/multi-video.html is a flaky crash
https://bugs.webkit.org/show_bug.cgi?id=170823
<rdar://problem/31611583>

Unreviewed.

Patch by Youenn Fablet <youenn@apple.com> on 2017-04-21

3:13 PM Changeset in webkit [215646] by weinig@apple.com
  • 11 edits
    2 adds in trunk/Source

Split cryptographic digest computation and parsing out of CSP code so it can be reused
https://bugs.webkit.org/show_bug.cgi?id=171076

Reviewed by Chris Dumez.

Source/WebCore:

Factor out cryptographic digest parsing from Content Security Policy code
so that it can be reused for the Subresource Integrity implementation.

  • CMakeLists.txt:
  • WebCore.xcodeproj/project.pbxproj:

Add new files.

  • html/parser/ParsingUtilities.h:

(WebCore::skipExactlyIgnoringASCIICase):
Add parsing helper to match / skip over a constant string, using IgnoringASCIICase semantics.

  • loader/ResourceCryptographicDigest.cpp: Added.

(WebCore::parseHashAlgorithmAdvancingPosition):
(WebCore::parseCryptographicDigestImpl):
(WebCore::parseCryptographicDigest):
Move parsing of cryptographic-digest strings from ContentSecurityPolicySourceList.cpp
and optimize it a little by avoiding String allocations and generalizing it so that it
can parse either UChars or LChars.

  • loader/ResourceCryptographicDigest.h: Added.

(WebCore::ResourceCryptographicDigest::operator==):
(WebCore::ResourceCryptographicDigest::operator!=):
(WTF::DefaultHash<WebCore::ResourceCryptographicDigest>::Hash::hash):
(WTF::DefaultHash<WebCore::ResourceCryptographicDigest>::Hash::equal):
(WTF::HashTraits<WebCore::ResourceCryptographicDigest>::emptyValue):
(WTF::HashTraits<WebCore::ResourceCryptographicDigest>::constructDeletedValue):
(WTF::HashTraits<WebCore::ResourceCryptographicDigest>::isDeletedValue):
Add a struct (rather than using a std::pair) to represent the digest + algorithm. And add
HashTraits so it can be used as HashMap.

  • page/csp/ContentSecurityPolicy.cpp:

(WebCore::ContentSecurityPolicy::findHashOfContentInPolicies):
(WebCore::toCryptoDigestAlgorithm): Deleted.
Move algorithm conversion to ResourceCryptographicDigest.cpp. Make use of new
cryptographicDigestForBytes function to do hashing.

  • page/csp/ContentSecurityPolicy.h:
  • page/csp/ContentSecurityPolicyHash.h:

(WTF::DefaultHash<WebCore::ContentSecurityPolicyDigest>::Hash::hash): Deleted.
(WTF::DefaultHash<WebCore::ContentSecurityPolicyDigest>::Hash::equal): Deleted.
Remove HashTraits for the digest, this is now handled by ResourceCryptographicDigest.
To keep things relatively straight-forward, redefine ContentSecurityPolicyHashAlgorithm
and ContentSecurityPolicyHash in terms of ResourceCryptographicDigest, so that less code
has to be changed all at once. In a later pass, if wanted, we can remove these using
declarations.

  • page/csp/ContentSecurityPolicySourceList.cpp:

(WebCore::isNonceCharacter):
Use renamed isBase64OrBase64URLCharacter predicate.

(WebCore::ContentSecurityPolicySourceList::parseHashSource):
Rework using ResourceCryptographicDigest parsing. Quotation and maximum digest
length have been kept here, as they are not applicable to other uses of
the digest, specifically Subresource Integrity.

Source/WTF:

  • wtf/text/Base64.cpp:

(WTF::base64Decode):
(WTF::base64URLDecode):
Add overloads for base64Decode and base64URLDecode that take a StringView, to avoid allocations
of Strings.

  • wtf/text/Base64.h:

(WTF::isBase64OrBase64URLCharacter):
Move helper predicate used for parsing either type of Base64 encoded string from WebCore.

3:01 PM Changeset in webkit [215645] by jer.noble@apple.com
  • 2 edits in trunk/Source/WebCore

Unreviewed fix after r215624; null-deref crash.

Make sure to call reset() inside each constructor.

  • platform/audio/WebAudioBufferList.cpp:

(WebCore::WebAudioBufferList::WebAudioBufferList):

2:45 PM Changeset in webkit [215644] by sbarati@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

SharedArrayBuffer-opt.js fails with Briggs
https://bugs.webkit.org/show_bug.cgi?id=170948
<rdar://problem/31740568>

Reviewed by Michael Saboff.

The bug was not actually with Briggs, but instead was with
our X86-64 MacroAssembler. Michael fixed the bug here:
https://trac.webkit.org/changeset/215618/webkit

The issue was we weren't adding the REX byte for AtomicXchg8,
leading to the incorrect encoding for the result register depending
on which register it was. If you look at this code, you'll see the issue:

Int32 @38 = AtomicXchg(@59, @64, width = 8, range = 0, fenceRange = 0, ControlDependent|Fence|Writes:0|Reads:0, DFG:@49)

AtomicXchg8 %rsi, (%rax,%rdx), @38

0x2dcb5bc0015e: lock xchg %dh, (%rax,%rdx)

Int32 @66 = Const32(255, DFG:@49)
Int32 @67 = BitAnd(@38, $255(@66), DFG:@49)

ZeroExtend8To32 %rsi, %rax, @67

0x2dcb5bc00162: movzx %sil, %eax

Air thought the result was in the lower 8 bits of %rsi,
however, the code we emitted stored it in the [8-15] bits
of %rdx. Since this issue is fixed, I'm turning Briggs back
on.

  • b3/air/AirAllocateRegistersByGraphColoring.h:

(JSC::B3::Air::useIRC):

2:43 PM Changeset in webkit [215643] by dbates@webkit.org
  • 2 edits in trunk/LayoutTests

[iOS] Skip http/tests/security/contentSecurityPolicy/{audio, video}-redirect-allowed2.html
<rdar://problem/31690952>

Rubber-stamped by Jer Noble.

We can enable these tests again once we fix <rdar://problem/25780035>.

  • platform/ios/TestExpectations:
2:42 PM Changeset in webkit [215642] by mark.lam@apple.com
  • 10 edits
    4 adds in trunk/Source/JavaScriptCore

Refactor MASM probe to allow printing of custom types.
https://bugs.webkit.org/show_bug.cgi?id=171101

Reviewed by JF Bastien.

For example, this allows us to add MASM printing of CodeBlock* and Air::Args.

In general, MASM print can be used like dataLog, except that it generates JITted
code for doing the dataLogging later when the JITted code runs. MASM print can
print any value type that a specialized Printer template or a setPrinter()
function implemented for that type.

  • CMakeLists.txt:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • assembler/MacroAssembler.h:
  • assembler/MacroAssemblerPrinter.cpp:

(JSC::Printer::printAllRegisters):
(JSC::Printer::printPCRegister):
(JSC::Printer::printRegisterID):
(JSC::Printer::printFPRegisterID):
(JSC::Printer::printAddress):
(JSC::Printer::printMemory):
(JSC::Printer::printCallback):
(JSC::printIndent): Deleted.
(JSC::printCPU): Deleted.
(JSC::printCPURegisters): Deleted.
(JSC::printPC): Deleted.
(JSC::printRegister): Deleted.
(JSC::printMemory): Deleted.
(JSC::MacroAssemblerPrinter::printCallback): Deleted.

  • assembler/MacroAssemblerPrinter.h:

(JSC::AllRegisters::AllRegisters):
(JSC::Printer::Printer<AllRegisters>::Printer):
(JSC::Printer::Printer<PCRegister>::Printer):
(JSC::Printer::Printer<MacroAssembler::RegisterID>::Printer):
(JSC::Printer::Printer<MacroAssembler::FPRegisterID>::Printer):
(JSC::Printer::Printer<MacroAssembler::Address>::Printer):
(JSC::Printer::Printer<Memory>::Printer):
(JSC::Printer::Printer<MemWord<IntType>>::Printer):
(JSC::MacroAssembler::print):
(JSC::MacroAssemblerPrinter::print): Deleted.
(JSC::MacroAssemblerPrinter::PrintArg::PrintArg): Deleted.
(JSC::MacroAssemblerPrinter::appendPrintArg): Deleted.

  • Refactored to move the underlying PrintRecord (and associated data structures) out to Printer.cpp/h.
  • MacroAssemblerPrinter.cpp/h now only add custom Printers for MASM types like RegisterID and Memory. It also defines the implementation of MacroAssembler::print().

As before, JIT code that wishes to use MacroAssembler::print() needs to
#include "MacroAssemblerPrinter.h".

  • Also added the ability to specify an optional indentation (in number of chars) when MASM printing AllRegisters. This is useful because AllRegisters prints a block of data unlike other printers which print inline.
  • assembler/Printer.cpp: Added.

(JSC::Printer::printConstCharString):
(JSC::Printer::printIntptr):
(JSC::Printer::printUintptr):
(JSC::Printer::printPointer):
(JSC::Printer::setPrinter):

  • assembler/Printer.h: Added.

(JSC::Printer::Context::Context):
(JSC::Printer::PrintRecord::PrintRecord):
(JSC::Printer::appendPrinter):
(JSC::Printer::makePrintRecordList):
(JSC::Printer::Printer<RawPointer>::Printer):
(JSC::Printer::setPrinter):
(JSC::Printer::Printer::Printer):

  • Data structures for creating a list of PrintRecords. Classes which wish to add custom support for MASM printing can #include "Printer.h" and implement either:
    1. a specialized Printer template, or
    2. a setPrinter() function.

See Printer<Reg> and Printer<B3::Air::Tmp> in AirPrintSpecial.h for examples of
(1). See CodeBlock's setPrinter() for an example of (2).

  • b3/B3LowerToAir.cpp:

(JSC::B3::Air::LowerToAir::print):

  • b3/air/AirPrintSpecial.cpp: Added.

(JSC::B3::Air::PrintSpecial::PrintSpecial):
(JSC::B3::Air::PrintSpecial::~PrintSpecial):
(JSC::B3::Air::PrintSpecial::forEachArg):
(JSC::B3::Air::PrintSpecial::isValid):
(JSC::B3::Air::PrintSpecial::admitsStack):
(JSC::B3::Air::PrintSpecial::reportUsedRegisters):
(JSC::B3::Air::PrintSpecial::generate):
(JSC::B3::Air::PrintSpecial::extraEarlyClobberedRegs):
(JSC::B3::Air::PrintSpecial::extraClobberedRegs):
(JSC::B3::Air::PrintSpecial::dumpImpl):
(JSC::B3::Air::PrintSpecial::deepDumpImpl):
(JSC::Printer::printAirArg):

  • b3/air/AirPrintSpecial.h: Added.

(JSC::Printer::appendAirArg):
(JSC::Printer::appendAirArgs):
(JSC::Printer::Printer<B3::Air::Tmp>::Printer):
(JSC::Printer::Printer<Reg>::Printer):

  • Add the print() operation for use in LowerToAir. print() will emit a PrintSpecial that will ultimately emit a MASM print to print what we want.
  • LowerToAir's print() adds the ability to print Air::Args.
  • Unlike in the baseline JIT and the DFG, LowerToAir's print() can perturb the usage of registers. This is because PrintSpecial is a patch point, and it prevents certain optimizations. If not used carefully, an attempt to print() an Arg by taking a Tmp, can force the B3 Value into a Tmp earlier than it would otherwise do so. So, use LowerToAir's print() with care.
  • bytecode/CodeBlock.cpp:

(JSC::setPrinter):

  • Now we can MASM print CodeBlock*.

(WTF::printInternal):

  • Now we can dataLog CodeBlock* (including null CodeBlock pointers).
  • bytecode/CodeBlock.h:
  • runtime/VM.cpp:

(JSC::VM::throwException):

  • Use the new ability to dataLog CodeBlock*. No need to do an explicit null check before printing anymore.
2:41 PM Changeset in webkit [215641] by zalan@apple.com
  • 1 edit
    1 add in trunk/PerformanceTests

Simple line layout: Add performance test to measure mid-word line breaking with long text.
https://bugs.webkit.org/show_bug.cgi?id=171136

Reviewed by Ryosuke Niwa.

  • Layout/simple-line-layout-word-break-long-text.html: Added.
2:31 PM Changeset in webkit [215640] by rniwa@webkit.org
  • 6 edits in trunk/Websites/perf.webkit.org

Rename commit_set_relationships to commit_set_items
https://bugs.webkit.org/show_bug.cgi?id=171143

Reviewed by Joseph Pecoraro.

Renamed commit_set_relationships to commit_set_items. Also added commitset_patch_file in the preparation to add
the support for applying patches in custom test groups. To migrate an existing database, run:

`sql
BEGIN;
ALTER TABLE commit_set_relationships RENAME TO commit_set_items;
ALTER TABLE commit_set_items ADD COLUMN commitset_patch_file integer REFERENCES uploaded_files;
ALTER TABLE commit_set_items ADD CONSTRAINT commitset_with_patch_must_have_commit

CHECK (commitset_patch_file IS NULL OR commitset_commit IS NOT NULL);

END;
`

  • init-database.sql:
  • public/include/build-requests-fetcher.php:
  • public/privileged-api/create-test-group.php:
  • server-tests/resources/mock-data.js:

(MockData.addMockData):
(MockData.addMockTestGroupWithGitWebKit):

  • tools/js/database.js:
2:28 PM Changeset in webkit [215639] by andersca@apple.com
  • 6 edits in trunk/Source

Stop using deprecated APIs, part 5
https://bugs.webkit.org/show_bug.cgi?id=171134
rdar://problem/31589635

Reviewed by Tim Horton.

Source/WebCore:

  • Modules/applepay/ApplePaySession.cpp:

(WebCore::convertAndValidate):
Stop using the toPaymentAuthorizationStatus. Convert the passed in status results to the remaining
PaymentAuthorizationStatus values, and add errors if needed.

(WebCore::toPaymentAuthorizationStatus):
This function is no longer used.

  • Modules/applepay/PaymentAuthorizationStatus.h:

Remove deprecated status values. We can achieve the same results with errors now.

  • Modules/applepay/PaymentRequest.cpp:

(WebCore::isFinalStateResult):
Remove deprecated status values.

  • Modules/applepay/PaymentRequest.h:

Remove deprecated status values.

Source/WebKit2:

  • UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:

(WebKit::toPKPaymentAuthorizationStatus):
Remove this and add a new version that doesn't use any deprecated values.

(WebKit::toPKPaymentAuthorizationStatus):
New function that takes a WebCore::PaymentAuthorizationResult and converts it to a status, for older OSes.

(WebKit::WebPaymentCoordinatorProxy::platformCompletePaymentSession):
Use the new toPKPaymentAuthorizationStatus versions.

(WebKit::WebPaymentCoordinatorProxy::platformCompleteShippingContactSelection):
Ditto.

(WebKit::status): Deleted.

2:28 PM Changeset in webkit [215638] by keith_miller@apple.com
  • 15 edits
    6 adds in trunk

Unreviewed, rolling out r215634.

underlying build issues should have been fixed

Reverted changeset:

"Unreviewed, rolling out r215620 and r215623."
https://bugs.webkit.org/show_bug.cgi?id=171139
http://trac.webkit.org/changeset/215634

2:14 PM Changeset in webkit [215637] by keith_miller@apple.com
  • 9 edits in trunk/Source

Source/JavaScriptCore:
Unreviewed, rolling out r215620 and r215623.
https://bugs.webkit.org/show_bug.cgi?id=171139

broke arm64 build (Requested by keith_miller on #webkit).

Reverted changesets:

"Add signaling API"
https://bugs.webkit.org/show_bug.cgi?id=170976
http://trac.webkit.org/changeset/215620

"Unreviewed, fix Cloop build."
http://trac.webkit.org/changeset/215623

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

Source/WTF:
Remove LL/SC from Atomics
https://bugs.webkit.org/show_bug.cgi?id=171141

Reviewed by Saam Barati.

Adding load link and store conditionally was not an actual progression
and the existing code is causing problems for users of Atomics. So let's
get rid of it.

  • wtf/Atomics.h:

(WTF::hasFence):
(WTF::Atomic::exchange):
(WTF::Atomic::transaction):
(WTF::Atomic::transactionRelaxed):
(WTF::Atomic::prepare): Deleted.
(WTF::Atomic::attempt): Deleted.

  • wtf/Bitmap.h:

(WTF::WordType>::concurrentTestAndSet):
(WTF::WordType>::concurrentTestAndClear):

  • wtf/LockAlgorithm.h:

(WTF::LockAlgorithm::lockFast):
(WTF::LockAlgorithm::unlockFast):

2:08 PM Changeset in webkit [215636] by rniwa@webkit.org
  • 11 edits
    1 add in trunk/Websites/perf.webkit.org

Add the support for creating a custom test group in the analysis task page

Make it possible to create more custom test groups in the analysis task page
https://bugs.webkit.org/show_bug.cgi?id=171138

Rubber-stamped by Chris Dumez.

Extracted CustomConfigurationTestGroupForm out of CreateAnalysisTaskPage and added it to AnalysisTaskPage inside
AnalysisTaskConfiguratorPane. This allows configuration of a new test group within a custom analysis task.

  • public/privileged-api/create-test-group.php:

(main): Fixed the bug that the triggerable wasn't resolved when creating a test group in a custom analysis task.

  • public/v3/components/custom-analysis-task-configurator.js:

(CustomAnalysisTaskConfigurator.prototype.selectTests): Added. Used by CustomConfigurationTestGroupForm's
setConfigurations.
(CustomAnalysisTaskConfigurator.prototype.selectPlatform): Ditto.
(CustomAnalysisTaskConfigurator.prototype.setCommitSets): Ditto.
(CustomAnalysisTaskConfigurator.prototype._setUploadedFilesIfEmpty): Added.
(CustomAnalysisTaskConfigurator.prototype._revisionMapFromCommitSet): Added.
(CustomAnalysisTaskConfigurator.prototype.render): Update the currently selected platforms and tests now that
they can be set externally via selectTests and selectPlatform.
(CustomAnalysisTaskConfigurator.prototype._renderTriggerableTests): Return the result of _renderRadioButtonList
so that the caller can update the currently selected tests without having to reconstruct the list.
(CustomAnalysisTaskConfigurator.prototype._renderTriggerablePlatforms): Ditto.
(CustomAnalysisTaskConfigurator.prototype._renderRadioButtonList): Renamed from _buildCheckboxList. Now returns
a function which updates the currently selected items. We still pretend that multiple items can be selected to
make it future-proof.

  • public/v3/components/custom-configuration-test-group-form.js: Added.

(CustomConfigurationTestGroupForm): Added. Inherits from TestGroupForm. Extracted from CreateAnalysisTaskPage.
(CustomConfigurationTestGroupForm.prototype.setHasTask): Added.
(CustomConfigurationTestGroupForm.prototype.hasCommitSets): Added.
(CustomConfigurationTestGroupForm.prototype.setConfigurations): Added. Used by AnalysisTaskConfiguratorPane to
set the default configuration to what the latest test group used.
(CustomConfigurationTestGroupForm.prototype.startTesting): Added. Dispatches "startTesting" action with
platform, test, taskName in addition to what CustomizedTestGroupForm emits.
(CustomConfigurationTestGroupForm.prototype.didConstructShadowTree): Added.
(CustomConfigurationTestGroupForm.prototype.render): Added.
(CustomConfigurationTestGroupForm.prototype._updateTestGroupName): Added.
(CustomConfigurationTestGroupForm.cssTemplate): Added.
(CustomConfigurationTestGroupForm.htmlTemplate): Added.

  • public/v3/components/test-group-form.js:

(TestGroupForm.cssTemplate): Make the form display: block.

  • public/v3/index.html:
  • public/v3/models/test-group.js:

(TestGroup.prototype.test): Added.
(TestGroup.prototype.platform): Added.
(TestGroup.createWithCustomConfiguration): Added. Creates a custom test group with an existing analysis task.

  • public/v3/models/uploaded-file.js:

(UploadedFile): Fixed a bug that _deletedAt was set to a Date object even when object.deletedAt is null.

  • public/v3/pages/analysis-task-page.js:

(AnalysisTaskConfiguratorPane): Added.
(AnalysisTaskConfiguratorPane.prototype.didConstructShadowTree): Added. Dispatch createCustomTestGroup action
in turn when receiving startTesting from CustomConfigurationTestGroupForm.
(AnalysisTaskConfiguratorPane.prototype.setTestGroups): Added.
(AnalysisTaskConfiguratorPane.prototype.render): Added.
(AnalysisTaskConfiguratorPane.htmlTemplate): Added. We override this instead of formContent to display the
"Start" button at the end instead of at the beginnning.
(AnalysisTaskConfiguratorPane.cssTemplate): Added.
(AnalysisTaskPage.prototype.didConstructShadowTree): Listen to createCustomTestGroup.
(AnalysisTaskPage.prototype.render): Hide AnalysisTaskConfiguratorPane when the analysis task is not custom.
(AnalysisTaskPage.prototype._showTestGroup): Let AnalysisTaskConfiguratorPane know of the current test group
so that it can update the default configuration if the user hasn't modified yet.
(AnalysisTaskPage.prototype._createCustomTestGroup): Added.

  • public/v3/pages/create-analysis-task-page.js:

(CreateAnalysisTaskPage.prototype.didConstructShadowTree):
(CreateAnalysisTaskPage.prototype._createAnalysisTaskWithGroup):
(CreateAnalysisTaskPage.prototype.render):
(CreateAnalysisTaskPage.prototype._renderMessage):
(CreateAnalysisTaskPage.htmlTemplate):
(CreateAnalysisTaskPage.cssTemplate):

  • server-tests/privileged-api-create-test-group-tests.js: Added a test case for creating a custom test group for

an existing analysis task.

  • server-tests/resources/mock-data.js:

(MockData.otherPlatformId): Added.
(MockData.addMockData): Added a test configuration for otherPlatformId.

1:56 PM Changeset in webkit [215635] by aakash_jain@apple.com
  • 2 edits in trunk/Tools

Bubbles on dashboard doesn't turn red for test262 failures
https://bugs.webkit.org/show_bug.cgi?id=171129

Reviewed by Alexey Proskuryakov.

  • BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotIteration.js: Added test262-test.
1:31 PM Changeset in webkit [215634] by commit-queue@webkit.org
  • 15 edits
    6 deletes in trunk

Unreviewed, rolling out r215620 and r215623.
https://bugs.webkit.org/show_bug.cgi?id=171139

broke arm64 build (Requested by keith_miller on #webkit).

Reverted changesets:

"Add signaling API"
https://bugs.webkit.org/show_bug.cgi?id=170976
http://trac.webkit.org/changeset/215620

"Unreviewed, fix Cloop build."
http://trac.webkit.org/changeset/215623

1:20 PM Changeset in webkit [215633] by rniwa@webkit.org
  • 15 edits
    3 adds
    1 delete in trunk/Websites/perf.webkit.org

Make it possible to view results for sub tests and metrics in A/B testing
https://bugs.webkit.org/show_bug.cgi?id=170975

Reviewed by Chris Dumez.

Replaced TestGroupResultsTable, which was a single table that presented the test results with a set of revisions
each build request used, with TestGroupResultsViewer and TestGroupRevisionTable. TestGroupResultsViewer provides
an UI to look the results of sub-tests and sub-metrics and TestGroupRevisionTable provides an UI to display
the set of revisions each build request used. TestGroupRevisionTable can also show the list of custom roots now
that we've added UI to schedule an analysis task with a custom test group.

This patch extends BarGraphGroup to show multiple bars per SingleBarGraph using a canvas with bars indicating
their mean and confidence interval.

  • browser-tests/index.html:

(ChartTest.importChartScripts): Include lazily-evaluated-function.js now that Test model object uses
LazilyEvaluatedFunction.

  • public/v3/components/analysis-results-viewer.js:

(AnalysisResultsViewer.TestGroupStackingBlock.prototype._valuesForCommitSet):
(AnalysisResultsViewer.TestGroupStackingBlock.prototype._computeTestGroupStatus):

  • public/v3/components/bar-graph-group.js:

(BarGraphGroup): No longer takes formatter. Added _computeRangeLazily and _showLabels as instance variables.
(BarGraphGroup.prototype.addBar): Now takes a list of values, their labels, mean, confidence interval, and
the colors of bar graphs shown for each value and the mean indicator.
(BarGraphGroup.prototype.showLabels): Added.
(BarGraphGroup.prototype.setShowLabels): Added.
(BarGraphGroup.prototype.range): Added.
(BarGraphGroup.prototype._computeRange): Renamed from updateGroupRendering. Now returns the range instead off
setting it to each bar, and each SingleBarGraph's render function uses the value via BarGraphGroup's range.
(BarGraph): Renamed from SingleBarGraph. Added various arguments introduced in addBar, and now stores various
lazily evaluated functions used for rendering.
(BarGraph.prototype.render): Rewritten to use canvas to draw bar graphs and show a label when group's
showLabels() returns true.
(BarGraph.prototype._resizeCanvas): Added.
(BarGraph.prototype._renderCanvas): Added.
(BarGraph.prototype._renderLabels): Added. We align the top of each label to the middle of each bar and shift it
back up by half the height of the label (0.4rem) using margin-top in css.
(BarGraph.htmlTemplate): Uses a canvas now.
(BarGraph.cssTemplate):

  • public/v3/components/results-table.js:

(ResultsTable.prototype.renderTable): Updated per code changes to BarGraphGroup.
(ResultsTableRow.prototype.resultContent): Ditto.

  • public/v3/components/test-group-results-table.js: Removed.
  • public/v3/components/test-group-results-viewer.js: Added.

(TestGroupResultsViewer): Added. Shows a list of test results with bar graphs with mean and confidence interval
indicators. The results of sub tests and metrics can be expanded via "(Breakdown)" link shown below each test.
(TestGroupResultsViewer.prototype.setTestGroup): Added.
(TestGroupResultsViewer.prototype.setAnalysisResults): Added.
(TestGroupResultsViewer.prototype.render): Added.
(TestGroupResultsViewer.prototype._renderResultsTable): Compute the depth of the test tree we show, and construct
the header rows. Each sub test is "indented" by a new column.
(TestGroupResultsViewer.prototype._buildRowForTest): Added. Build rows for metrics of the given test. Expand the
list of its child tests if it's in expandedTests. Otherwise add a link to "Breakdown" if it has any child tests.
(TestGroupResultsViewer.prototype._buildRowForMetric): Added. Builds rows of table cells to show the results for
the given metric for each configuration.
(TestGroupResultsViewer.prototype._buildRowForMetric.createConfigurationRow): Added. A helper to build cells for
a given configuration represented by a requested commit set.
(TestGroupResultsViewer.prototype._buildValueMap): Added. Creates a mappting between a requested commit set, and
the list of values, mean, etc... associated with the results for the commit set.
(TestGroupResultsViewer.prototype._buildEmptyCells): Added. A helper to create empty cells to indent sub tests.
(TestGroupResultsViewer.prototype._expandCurrentMetrics): Added. Highlights the current metrics and renders the
label for each bar in the results.
(TestGroupResultsViewer.htmlTemplate): Added.
(TestGroupResultsViewer.cssTemplate): Added.

  • public/v3/components/test-group-revision-table.js: Added.

(TestGroupRevisionTable): Added. Renders the list of revisions requested for each test configuration as well as
ones used in actual testing, and additional repositories being reported (e.g. repositories for helper scripts).
(TestGroupRevisionTable.prototype.setTestGroup): Added.
(TestGroupRevisionTable.prototype.setAnalysisResults): Added.
(TestGroupRevisionTable.prototype.render): Added.
(TestGroupRevisionTable.prototype._renderTable): Added. The basic algorithm here is to first create a row entry
object for each build request, merge cells that use the same revision of the same repository, and then render
the entire table.
(TestGroupRevisionTable.prototype._buildCommitCell): Added.
(TestGroupRevisionTable.prototype._buildCustomRootsCell): Added.
(TestGroupRevisionTable.prototype._mergeCellsWithSameCommitsAcrossRows): Added. Compute rowspan for each cell
by traversing the rows that use the same revision per repository, and store it in rowCountByRepository while
adding the repository to each succeeding row's repositoriesToSkip.
(TestGroupRevisionTable.htmlTemplate): Added.
(TestGroupRevisionTable.cssTemplate): Added.

  • public/v3/index.html:
  • public/v3/models/analysis-results.js:

(AnalysisResults): Added _metricIds and _lazilyComputedHighestTests as instance variables.
(AnalysisResults.prototype.findResult): Renamed from find.
(AnalysisResults.prototype.highestTests): Added.
(AnalysisResults.prototype._computeHighestTests): Added. Finds the root tests for this analysis result.
(AnalysisResults.prototype.add): Update _metricIds.
(AnalysisResults.prototype.commitSetForRequest): Added. Returns the reported commit set for the build request.
This commit set contains the set of revisions reported to /api/report by A/B testers.
(AnalysisResultsView.prototype.resultForRequest): Renamed from resultForBuildId.

  • public/v3/models/metric.js:

(Metric.prototype.relativeName): Added. Computes the relative name given the test/metric path. This function is
used to determine the label for each test/metric in TestGroupResultsViewer.
(Metric.prototype.aggregatorLabel): Extracted from label.
(Metric.prototype.label):
(Metric.makeFormatter): Added the default value of false to alwaysShowSign.

  • public/v3/models/test-group.js:

(TestGroup.prototype.compareTestResults): Now takes a metric instead of retrieving it from the analysis task
since a custom analysis task may not have a metric associated with it.

  • public/v3/models/test.js:

(Test): Added _computePathLazily as an instance variable.
(Test.prototype.path): Lazily computes the path now that this function can be called on the same test for many
times in TestGroupResultsViewer while computing relative names of tests and metrics.
(Test.prototype._computePath): Extracted path.
(Test.prototype.fullName): Modernized the code.
(Test.prototype.relativeName): Added.

  • public/v3/models/uploaded-file.js:

(UploadedFile):
(UploadedFile.prototype.deletedAt): Added.
(UploadedFile.prototype.label): Added.
(UploadedFile.prototype.url): Added.

  • public/v3/pages/analysis-task-page.js:

(AnalysisTaskTestGroupPane.prototype.setTestGroups):
(AnalysisTaskTestGroupPane.prototype.setAnalysisResults): Replaced setAnalysisResultsView. Now takes an
analysisResults instead of its view.
(AnalysisTaskTestGroupPane.prototype.render): No longer enqueues the results table and the retry form to render
since the results table no longer exists, and the retry form re-renders itself as needed.
(AnalysisTaskTestGroupPane.htmlTemplate): Now uses test-group-results-viewer and test-group-revision-table
instead of test-group-results-table, which has been removed.
(AnalysisTaskTestGroupPane.cssTemplate):
(AnalysisTaskPage.prototype._assignTestResultsIfPossible):

  • public/v3/pages/create-analysis-task-page.js:

(CreateAnalysisTaskPage.prototype._createAnalysisTaskWithGroup): Removed superflous console.log's.

  • tools/js/v3-models.js: Import LazilyEvaluatedFunction now that it's used in the Test model.
  • unit-tests/test-model-tests.js: Added.
1:07 PM Changeset in webkit [215632] by bfulgham@apple.com
  • 3 edits
    2 adds in trunk

Validate vImage arguments
https://bugs.webkit.org/show_bug.cgi?id=171109
Source/WebCore:

rdar://problem/30236606

Patch by Per Arne Vollan <pvollan@apple.com> on 2017-04-21
Reviewed by Brent Fulgham.

When writing data to a canvas context, clip the source rectangle to the data rectangle
to make sure we will not attempt to read data outside of the buffer.

Test: fast/canvas/canvas-crash.html

  • html/canvas/CanvasRenderingContext2D.cpp:

(WebCore::CanvasRenderingContext2D::putImageData):

LayoutTests:

Patch by Per Arne Vollan <pvollan@apple.com> on 2017-04-21
Reviewed by Brent Fulgham.

  • fast/canvas/canvas-crash-expected.txt: Added.
  • fast/canvas/canvas-crash.html: Added.
1:06 PM Changeset in webkit [215631] by webkit@devinrousso.com
  • 3 edits in trunk/Source/WebInspectorUI

Web Inspector: Add titles to Network grid items for easier reading when text overflows
https://bugs.webkit.org/show_bug.cgi?id=170792

Reviewed by Brian Burg.

  • UserInterface/Views/NetworkGridContentView.js:

(WebInspector.NetworkGridContentView):

  • UserInterface/Views/ResourceTimelineDataGridNode.js:

(WebInspector.ResourceTimelineDataGridNode.prototype.createCellContent):
(WebInspector.ResourceTimelineDataGridNode.prototype._cachedCellContent):
Do not add a title if the text is an em-dash, as that title will not convey any information.

1:05 PM Changeset in webkit [215630] by commit-queue@webkit.org
  • 34 edits in trunk/Source/WebInspectorUI

Web Inspector: Don't show the Search tab if it's open and matches the representedObject
https://bugs.webkit.org/show_bug.cgi?id=168709

Patch by Devin Rousso <Devin Rousso> on 2017-04-21
Reviewed by Brian Burg.

  • UserInterface/Base/Main.js:

(WebInspector.handlePossibleLinkClick):
(WebInspector.openURL):
(WebInspector.showSourceCode):
(WebInspector.showOriginalUnformattedSourceCodeLocation):
(WebInspector.showOriginalOrFormattedSourceCodeLocation):
(WebInspector.showOriginalOrFormattedSourceCodeTextRange):
(WebInspector._frameWasAdded):
(WebInspector.createSourceCodeLocationLink):
(WebInspector.linkifyLocation):
(WebInspector.linkifyElement):
Add options parameter to provide greater customization. Also fix some style issues.

  • UserInterface/Views/NetworkGridContentView.js:

(WebInspector.NetworkGridContentView.prototype.hasRepresentedObject): Deleted.

  • UserInterface/Views/NetworkSidebarPanel.js:

(WebInspector.NetworkSidebarPanel.prototype.hasRepresentedObject): Deleted.

  • UserInterface/Views/NetworkTabContentView.js:

(WebInspector.NetworkTabContentView.prototype.canShowRepresentedObject):

  • UserInterface/Views/SearchTabContentView.js:

(WebInspector.SearchTabContentView.prototype.canShowRepresentedObject):
Ensure that the Search tab can only display resources that it has entries for in its view.
Also rework the way in which this is determined.

  • UserInterface/Controllers/BreakpointPopoverController.js:

(WebInspector.BreakpointPopoverController.prototype.appendContextMenuItems):

  • UserInterface/Protocol/InspectorFrontendAPI.js:

(InspectorFrontendAPI.showMainResourceForFrame):

  • UserInterface/Views/CSSStyleDeclarationSection.js:

(WebInspector.CSSStyleDeclarationSection.prototype.refresh):

  • UserInterface/Views/CSSStyleDeclarationTextEditor.js:

(WebInspector.CSSStyleDeclarationTextEditor.tokenTrackingControllerHighlightedRangeWasClicked.showRangeInSourceCode):
(WebInspector.CSSStyleDeclarationTextEditor.tokenTrackingControllerHighlightedRangeWasClicked):

  • UserInterface/Views/ComputedStyleDetailsPanel.js:

(WebInspector.ComputedStyleDetailsPanel.prototype.cssStyleDeclarationTextEditorShowProperty):

  • UserInterface/Views/ConsoleMessageView.js:

(WebInspector.ConsoleMessageView.prototype._linkifyLocation):

  • UserInterface/Views/DOMDetailsSidebarPanel.js:

(WebInspector.DOMDetailsSidebarPanel.prototype._mouseWasClicked):

  • UserInterface/Views/DOMTreeContentView.js:

(WebInspector.DOMTreeContentView.prototype._mouseWasClicked.followLink):

  • UserInterface/Views/DOMTreeElement.js:

(WebInspector.DOMTreeElement.prototype._showCustomElementDefinition):

  • UserInterface/Views/DebuggerDashboardView.js:

(WebInspector.DebuggerDashboardView.prototype._rebuildLocation):

  • UserInterface/Views/DebuggerSidebarPanel.js:

(WebInspector.DebuggerSidebarPanel.prototype._treeSelectionDidChange):
(WebInspector.DebuggerSidebarPanel.prototype._updatePauseReasonGotoArrow):

  • UserInterface/Views/ErrorObjectView.js:

(WebInspector.ErrorObjectView.makeSourceLinkWithPrefix):

  • UserInterface/Views/EventListenerSectionGroup.js:

(WebInspector.EventListenerSectionGroup.prototype._functionTextOrLink):

  • UserInterface/Views/HeapSnapshotInstanceDataGridNode.js:

(WebInspector.HeapSnapshotInstanceDataGridNode.prototype._populatePreview):
(WebInspector.HeapSnapshotInstanceDataGridNode.prototype._mouseoverHandler.appendPathRow):

  • UserInterface/Views/ObjectTreeBaseTreeElement.js:

(WebInspector.ObjectTreeBaseTreeElement.prototype._appendMenusItemsForObject):
(WebInspector.ObjectTreeBaseTreeElement):

  • UserInterface/Views/ProbeSetDetailsSection.js:

(WebInspector.ProbeSetDetailsSection.prototype._updateLinkElement):

  • UserInterface/Views/ProfileDataGridNode.js:

(WebInspector.ProfileDataGridNode.prototype._displayContent):

  • UserInterface/Views/ResourceDetailsSidebarPanel.js:

(WebInspector.ResourceDetailsSidebarPanel.prototype._refreshRelatedResourcesSection):
(WebInspector.ResourceDetailsSidebarPanel.prototype._goToRequestDataClicked):

  • UserInterface/Views/ResourceSidebarPanel.js:

(WebInspector.ResourceSidebarPanel.prototype._treeSelectionDidChange):

  • UserInterface/Views/ResourceTimelineDataGridNode.js:

(WebInspector.ResourceTimelineDataGridNode.prototype._dataGridNodeGoToArrowClicked):

  • UserInterface/Views/RulesStyleDetailsPanel.js:

(WebInspector.RulesStyleDetailsPanel.prototype.refresh.insertMediaOrInheritanceLabel):

  • UserInterface/Views/SearchSidebarPanel.js:

(WebInspector.SearchSidebarPanel.prototype._treeElementDoubleClick):

  • UserInterface/Views/SourceCodeTextEditor.js:

(WebInspector.SourceCodeTextEditor.prototype.tokenTrackingControllerHighlightedRangeWasClicked):

  • UserInterface/Views/SourceCodeTimelineTimelineDataGridNode.js:

(WebInspector.SourceCodeTimelineTimelineDataGridNode.prototype._createNameCellContent):

  • UserInterface/Views/TimelineDataGrid.js:

(WebInspector.TimelineDataGrid.prototype._popoverCallStackTreeSelectionDidChange):

  • UserInterface/Views/TimelineDataGridNode.js:

(WebInspector.TimelineDataGridNode.prototype.createCellContent):

  • UserInterface/Views/VisualStyleSelectorTreeItem.js:

(WebInspector.VisualStyleSelectorTreeItem.prototype.populateContextMenu):
Ensure that the Search tab is never shown from links generated by these functions.
Also do the same for the Network tab in some cases.

  • UserInterface/Views/NetworkTimelineView.js:

(WebInspector.NetworkTimelineView.prototype.canShowContentViewForTreeElement): Deleted.
(WebInspector.NetworkTimelineView.prototype.showContentViewForTreeElement): Deleted.
Drive-by cleanup: remove dead code.

1:02 PM Changeset in webkit [215629] by ddkilzer@apple.com
  • 4 edits in trunk/Source

Switch from -std=gnu++11 to -std=gnu++14 for consistency in DerivedSources.make
<https://webkit.org/b/171122>

Reviewed by Brent Fulgham.

  • DerivedSources.make: Switch to -std=gnu++14 for preprocessing

headers to check for build settings.

1:01 PM Changeset in webkit [215628] by jer.noble@apple.com
  • 6 edits in trunk/Source/WebKit2

[WK2][MediaCapture] Pass muted and enabled state across process boundary when capturing in UIProcess
https://bugs.webkit.org/show_bug.cgi?id=170846

Reviewed by Jon Lee.

  • UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp:

(WebKit::UserMediaCaptureManagerProxy::setMuted):
(WebKit::UserMediaCaptureManagerProxy::setEnabled):

  • UIProcess/Cocoa/UserMediaCaptureManagerProxy.h:
  • UIProcess/Cocoa/UserMediaCaptureManagerProxy.messages.in:
  • WebProcess/cocoa/UserMediaCaptureManager.cpp:

(WebKit::UserMediaCaptureManager::Source::setMuted):
(WebKit::UserMediaCaptureManager::Source::setEnabled):
(WebKit::UserMediaCaptureManager::setMuted):
(WebKit::UserMediaCaptureManager::setEnabled):

  • WebProcess/cocoa/UserMediaCaptureManager.h:
1:01 PM Changeset in webkit [215627] by jer.noble@apple.com
  • 3 edits in trunk/Source/WebKit2

[WK2][MediaCapture] Remove now-unused WKWebViewConfiguration property for shouldCaptureAudioInUIProcess
https://bugs.webkit.org/show_bug.cgi?id=170847

Reviewed by Jon Lee.

  • Shared/WebPreferencesDefinitions.h:
  • UIProcess/API/Cocoa/WKWebViewConfiguration.mm:

(-[WKWebViewConfiguration copyWithZone:]):
(-[WKWebViewConfiguration _shouldCaptureAudioInUIProcess]): Deleted.
(-[WKWebViewConfiguration _setShouldCaptureAudioInUIProcess:]): Deleted.

12:59 PM Changeset in webkit [215626] by jer.noble@apple.com
  • 5 edits in trunk/Source/WebCore

[MediaCapture][iOS] AVAudioSession must be active and the correct category before IO AudioUnits start producing data.
https://bugs.webkit.org/show_bug.cgi?id=171095

Reviewed by Youenn Fablet.

If an input audio unit is asked to start before the AVAudioSession is in a recording category and active,
CoreAudio will return an error stating that no input device is available.

The PlatformMediaSessionManager will automatically set the category of and activate the AVAudioSession when one
of its associated MediaStreams has a capturing RealtimeMediaSource and is currently producing data. To solve
the chicken-or-egg problem of activating the AVAudioSession before the source produces data, move the state bit
of "producing data" directly into MediaStreams, and notify the PlatformMediaSessionManager that capturing is
occurring after flipping that bit, but before asking the constituent tracks to begin producing data.

In places (i.e. UserMediaRequest) where we previously told a stream's tracks to begin producing data, instead
allow the stream to handle that by telling it to produce data directly.

  • Modules/mediastream/MediaStream.cpp:

(WebCore::MediaStream::startProducingData):
(WebCore::MediaStream::stopProducingData):
(WebCore::MediaStream::mediaState):
(WebCore::MediaStream::mediaType):
(WebCore::MediaStream::characteristics):
(WebCore::MediaStream::canProduceAudio):

  • Modules/mediastream/MediaStream.h:
  • Modules/mediastream/UserMediaRequest.cpp:

(WebCore::UserMediaRequest::allow):

  • platform/mediastream/mac/CoreAudioCaptureSource.h:
12:56 PM Changeset in webkit [215625] by jer.noble@apple.com
  • 5 edits in trunk/Source/WebCore

Add a method to retrieve the current I/O buffer size from AudioSession
https://bugs.webkit.org/show_bug.cgi?id=171126

Reviewed by Eric Carlson.

There is an existing method to get and set the preferred I/O buffer size; add a matching method to return
the acutal I/O buffer size.

  • platform/audio/AudioSession.cpp:

(WebCore::AudioSession::bufferSize):

  • platform/audio/AudioSession.h:
  • platform/audio/ios/AudioSessionIOS.mm:

(WebCore::AudioSession::bufferSize):

  • platform/audio/mac/AudioSessionMac.cpp:

(WebCore::AudioSession::bufferSize):

12:22 PM Changeset in webkit [215624] by jer.noble@apple.com
  • 5 edits in trunk/Source/WebCore

Make AudioSampleBufferList::reset() less expensive.
https://bugs.webkit.org/show_bug.cgi?id=171124

Reviewed by Eric Carlson.

Previously, AudioSampleBufferList would reallocate its constituent WebAudioBufferList every time reset() was
called. Instead, add a reset() method to WebAudioBufferList which re-initializes its AudioBufferList (which is a
simple memcpy of a 24-byte struct), reusing the existing memory buffers.

While making these changes, we'll also take the opportunity to clean up the AudioSampleBufferList class by
making some of its members into UniqueRefs instead of unique_ptrs, thus removing the possibility of null-
dereferences.

  • platform/audio/WebAudioBufferList.cpp:

(WebCore::WebAudioBufferList::WebAudioBufferList):
(WebCore::WebAudioBufferList::reset):

  • platform/audio/WebAudioBufferList.h:
  • platform/audio/mac/AudioSampleBufferList.cpp:

(WebCore::AudioSampleBufferList::AudioSampleBufferList):
(WebCore::AudioSampleBufferList::applyGain):
(WebCore::AudioSampleBufferList::mixFrom):
(WebCore::AudioSampleBufferList::reset):
(WebCore::AudioSampleBufferList::zero):
(WebCore::AudioSampleBufferList::~AudioSampleBufferList): Deleted.

  • platform/audio/mac/AudioSampleBufferList.h:

(WebCore::AudioSampleBufferList::bufferList):

12:04 PM Changeset in webkit [215623] by keith_miller@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed, fix Cloop build.

  • jit/ExecutableAllocator.h:

(JSC::isJITPC):

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

Mark webrtc/datachannel/bufferedAmountLowThreshold.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=170701

Unreviewed test gardening.

11:40 AM Changeset in webkit [215621] by andersca@apple.com
  • 2 edits in trunk/Source/WebKit2

Stop using deprecated APIs, part 4
https://bugs.webkit.org/show_bug.cgi?id=171125
rdar://problem/31589635

Reviewed by Tim Horton.

It doesn't really matter what we pass to these completion functions, since the sheet has already been dismissed at this point
so just remove the status parameter.

  • UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:

(-[WKPaymentAuthorizationViewControllerDelegate paymentAuthorizationViewController:didSelectPaymentMethod:handler:]):
(-[WKPaymentAuthorizationViewControllerDelegate paymentAuthorizationViewController:didSelectShippingMethod:handler:]):
(-[WKPaymentAuthorizationViewControllerDelegate paymentAuthorizationViewController:didSelectShippingContact:handler:]):

11:35 AM Changeset in webkit [215620] by keith_miller@apple.com
  • 15 edits
    6 adds in trunk

Add signaling API
https://bugs.webkit.org/show_bug.cgi?id=170976

Reviewed by Filip Pizlo.

Source/JavaScriptCore:

Update various uses of sigaction to use the new signaling API.
Also switch VMTraps to use the thread message system instead of
rolling it's own.

  • jit/ExecutableAllocator.h:

(JSC::isJITPC):

  • runtime/VMTraps.cpp:

(JSC::installSignalHandler):
(JSC::VMTraps::VMTraps):
(JSC::VMTraps::SignalSender::send):
(JSC::handleSigusr1): Deleted.
(JSC::handleSigtrap): Deleted.
(JSC::installSignalHandlers): Deleted.

  • runtime/VMTraps.h:
  • tools/SigillCrashAnalyzer.cpp:

(JSC::installCrashHandler):
(JSC::handleCrash): Deleted.

  • wasm/WasmFaultSignalHandler.cpp:

(JSC::Wasm::trapHandler):
(JSC::Wasm::enableFastMemory):

Source/WTF:

This patch adds a bunch of new functionality to WTF. First, it add
a new data structure of a lockless bag. The LocklessBag class can
be used as either a multi-writer multi-reader lockless bag or a
multi-writer single consumer lockless bag.

Next, this patch adds an abstraction around sigaction in WTF.
Basically, you can add a handler, which can be an arbitrary
lambda. Although it should still be safe for the signal you are
handling. the signal handler manager will then do all the
appropriate handling of chaining:

In the SIGUSR case we always forward the signal to any other
non-default handler installed before us. We need to do this,
otherwise, since it's not possible to tell if a SIGUSR was
intended exlusively for our handlers. Signal handlers don't record
how many times they were sent only that there is at least one
unhandled signal.

In the faulting cases we require that every handle be able to
recognise a fault they installed, vs crashes. If none of our
handlers claim to have handled the fault we will forward the
fault. If a handler was installed before the first fault handler
we simply call that handler and rely on them to take the
appropriate action. If no handler was installed before our first
handler we restore the default handler and allow the fault to
happen again.

Finally, this patch adds a signal based messaging system. This
system allows the user to run an arbitrary lambda from the SIGUSR2
signal handler of any target WTF::Thread. This is already in use
for the VMTraps API which allows us to kill rogue VMs by sending
the VM's running WTF::Thread a SIGUSR and requesting it jetison
all optimized code and throw an uncatchable exception from all
function entries/loop backedges. In the future, we will also use
this API for Wasm to reset the instruction caches in currently
executing Wasm threads.

  • WTF.xcodeproj/project.pbxproj:
  • wtf/Atomics.h:

(WTF::Atomic::Atomic):

  • wtf/LocklessBag.h: Added.

(WTF::LocklessBag::LocklessBag):
(WTF::LocklessBag::add):
(WTF::LocklessBag::iterate):
(WTF::LocklessBag::consumeAll):

  • wtf/ThreadMessage.cpp: Added.

(WTF::ThreadMessageData::ThreadMessageData):
(WTF::initializeThreadMessages):
(WTF::sendMessageScoped):

  • wtf/ThreadMessage.h: Added.

(WTF::sendMessage):

  • wtf/Threading.cpp:

(WTF::initializeThreading):

  • wtf/Threading.h:

(WTF::Thread::threadMessages):

  • wtf/ThreadingPthreads.cpp:

(WTF::Thread::currentMayBeNull):
(WTF::Thread::current):
(WTF::Thread::signal):

  • wtf/threads/Signals.cpp: Added.

(WTF::jscSignalHandler):
(WTF::installSignalHandler):

  • wtf/threads/Signals.h: Added.

(WTF::toSystemSignal):
(WTF::fromSystemSignal):

Tools:

Add tests for ThreadMessages.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WTF/ThreadMessages.cpp: Added.

(runThreadMessageTest):
(TEST):

11:32 AM Changeset in webkit [215619] by commit-queue@webkit.org
  • 5 edits in trunk/Source/WebKit2

-[WKUIDelegatePrivate _webView:requestUserMediaAuthorizationForMicrophone:camera:url:mainFrameURL:decisionHandler:]
decision handler should only have one parameter.
https://bugs.webkit.org/show_bug.cgi?id=171081

Patch by Andrew Gold <agold@apple.com> on 2017-04-21
Reviewed by Tim Horton.

Because user media authorization is all or nothing, we should not have separate booleans
to indicate authorization. Additionally, rather than passing two separate booleans to the
UIDelegate, we now pass an NS_OPTIONS parameter.

  • UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
  • UIProcess/API/Cocoa/WKWebViewPrivate.h: Added _WKCaptureDevice NS_OPTIONS.
  • UIProcess/Cocoa/UIDelegate.mm:
  • UIProcess/Cocoa/UIDelegate.mm:

(WebKit::UIDelegate::setDelegate): Uses new WKUIDelegatePrivate method.
(WebKit::UIDelegate::UIClient::decidePolicyForUserMediaPermissionRequest): Ditto.

11:28 AM Changeset in webkit [215618] by msaboff@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

X86-64 Assembler doesn't handle xchg with byte register src
https://bugs.webkit.org/show_bug.cgi?id=171118

Reviewed by Saam Barati.

  • assembler/X86Assembler.h:

(JSC::X86Assembler::xchgb_rm): Use oneByteOp8() since these are 8 bit opcodes.

11:09 AM Changeset in webkit [215617] by jer.noble@apple.com
  • 4 edits in trunk/Source/WebCore

Fix some spurious ASSERTs when working with capturing media elements
https://bugs.webkit.org/show_bug.cgi?id=171096

Reviewed by Youenn Fablet.

Two related ASSERTS:

1) When we added a new PlatformMediaSession MediaType (MediaStreamCapturingAudio), we did not update all the
places that validated the enum. This would lead to spurious ASSERTs when an element capturing audio would
fail various checks to enusre it's type's validity.

2) Audio elements will ASSERT when they change page visibility, as they do not have a renderer which implements
visibleInViewportStateChanged(). So opt out of visibility-state checking for non-video media elements.

  • html/MediaElementSession.cpp:

(WebCore::MediaElementSession::wantsToObserveViewportVisibilityForAutoplay):

  • platform/audio/PlatformMediaSessionManager.cpp:

(WebCore::PlatformMediaSessionManager::resetRestrictions):
(WebCore::PlatformMediaSessionManager::addRestriction):
(WebCore::PlatformMediaSessionManager::removeRestriction):
(WebCore::PlatformMediaSessionManager::restrictions):

  • platform/audio/PlatformMediaSessionManager.h:
10:58 AM Changeset in webkit [215616] by commit-queue@webkit.org
  • 11 edits
    1 add in trunk

[INTL] Implement Intl.DateTimeFormat.prototype.formatToParts
https://bugs.webkit.org/show_bug.cgi?id=169458

Patch by Andy VanWagoner <thetalecrafter@gmail.com> on 2017-04-21
Reviewed by JF Bastien.

Source/JavaScriptCore:

Use udat_formatForFields to iterate through the parts of a formatted date string.
Make formatToParts and related functions dependent on ICU version >= 55.

  • icu/unicode/udat.h: Update to 55.1.
  • icu/unicode/ufieldpositer.h: Added from 55.1.
  • icu/unicode/uvernum.h: Update to 55.1
  • runtime/IntlDateTimeFormat.cpp:

(JSC::IntlDateTimeFormat::partTypeString): Convert UDateFormatField to string.
(JSC::IntlDateTimeFormat::formatToParts): Return parts of formatted date string.

  • runtime/IntlDateTimeFormat.h:
  • runtime/IntlDateTimeFormatPrototype.cpp:

(JSC::IntlDateTimeFormatPrototypeFuncFormatToParts): Add prototype function formatToParts.

LayoutTests:

Add tests for formatToParts

  • js/intl-datetimeformat-expected.txt:
  • js/script-tests/intl-datetimeformat.js:
10:26 AM Changeset in webkit [215615] by conrad_shultz@apple.com
  • 2 edits in trunk/Tools

commit-log-editor should respect the git editor if one is set
https://bugs.webkit.org/show_bug.cgi?id=171085
<rdar://problem/31745506>

Reviewed by Daniel Bates.

  • Scripts/commit-log-editor:

If Git is available, consider GIT_LOG_EDITOR and any global Git editor preference when
deciding which editor to present. We examine the global editor preference since that may be
set automatically by installers or third-party tools.

10:26 AM Changeset in webkit [215614] by Konstantin Tokarev
  • 6 edits in trunk

[cmake] WTF target should not have wtf and subdirectries in public interface
https://bugs.webkit.org/show_bug.cgi?id=171115

Reviewed by Michael Catanzaro.

In r209665 WEBCORE_FRAMEWORK macro started to export INCLUDE_DIRECTORIES of
targets as their public interface, so that linked targets can use them
implicitly without copying directory lists around. This matches existing
practice for all targets except WTF, headers from which are always included
with full path starting from "<wtf/...".

Since r209665 it became possible to include headers from wtf or its
subdirectories in CMake builds without using "<wtf/..." path. It should
not be allowed.

.:

  • Source/cmake/WebKitMacros.cmake: Support xxx_PRIVATE_HEADERS

CMake variables.

Source/WebCore:

  • platform/graphics/texmap/coordinated/TiledBackingStore.cpp: Fix

incorrect include of WTF header.

Source/WTF:

  • wtf/CMakeLists.txt: WTF/wtf and its sudirectories should not be in

public include paths of WTF target.

9:58 AM Changeset in webkit [215613] by yoon@igalia.com
  • 6 edits in trunk/Source/WebCore

Do not paint the border of the box if the dirty region does not intersect with border area
https://bugs.webkit.org/show_bug.cgi?id=170988

Reviewed by Simon Fraser.

No new tests, since there is no change in behavior.

  • platform/graphics/GeometryUtilities.cpp:

(WebCore::ellipseContainsPoint):
Checks if a point is within an ellipse.

  • platform/graphics/GeometryUtilities.h:

Replace header-guards with #pragma once.

  • platform/graphics/RoundedRect.cpp:

(WebCore::RoundedRect::contains):
Implemented to know the dirty rectangle intersects with rounded rectangle or not.

  • platform/graphics/RoundedRect.h:
  • rendering/RenderBoxModelObject.cpp:

(WebCore::RenderBoxModelObject::paintBorder):
When typing in decorated text box, the dirty rect generated only for the
inside of the text box, not for the decorations. So we can avoid the
calculations to draw borders if the inner border totally covers the
target surface. It will optimize the rendering process since we don't
have to render border decorations whenever we type somethings in side of
the text input element.

9:40 AM Changeset in webkit [215612] by andersca@apple.com
  • 2 edits in trunk/Source/WebCore

Remove another use of toPaymentAuthorizationStatus
https://bugs.webkit.org/show_bug.cgi?id=171114

Reviewed by Dan Bernstein.

  • Modules/applepay/ApplePaySession.cpp:

(WebCore::ApplePaySession::completeShippingContactSelection):

8:13 AM Changeset in webkit [215611] by Konstantin Tokarev
  • 2 edits in trunk/Source/WebKit2

Unreviewed, added missing file to PlatformMac.cmake

  • PlatformMac.cmake:
8:00 AM Changeset in webkit [215610] by Konstantin Tokarev
  • 2 edits in trunk/Source/WebKit2

Unreviewed follow-up for r215609

  • UIProcess/API/Cocoa/WKWebView.mm: Move internal header include too.
7:44 AM Changeset in webkit [215609] by Konstantin Tokarev
  • 2 edits in trunk/Source/WebKit2

Include iOS-specific headers inside preprocessor guard
https://bugs.webkit.org/show_bug.cgi?id=171104

Reviewed by Michael Catanzaro.

This patch should fix Mac cmake build.

  • UIProcess/API/Cocoa/WKWebView.mm:
7:21 AM Changeset in webkit [215608] by achristensen@apple.com
  • 51 edits in trunk

Reduce copies and allocations in SharedBuffer::append
https://bugs.webkit.org/show_bug.cgi?id=170956

Reviewed by Andreas Kling.

Source/WebCore:

SharedBuffer was a mess of different data structures added over the years.
SharedBuffer::append would allocate large Vector<char>s and call memcpy, and that
is inefficient and causes crashes when large allocations fail, and the allocations
and copies aren't even necessary. There were also const correctness problems in
ResourceLoader::addDataOrBuffer, and iterating a SharedBuffer was strange because
sometimes we don't want to add unnecessary copies.

These problems are solved by making SharedBuffer a Vector of read-only data segments,
which can be contained in various ways but we don't care because all we want to do is
read them. Appending SharedBuffers is now const correct because we just add to a
Vector<Ref<DataSegment>> and neither SharedBuffer can write to the data. Sometimes,
though, we want all the data to be in continuous memory, and if there are multiple
segments then the data needs to be copied once to a new segment. We should audit the
call sites of SharedBuffer::data and see if this is really necessary.

No change in functional behavior. Fewer copies of the data are made when buffering
data in the NetworkProcess. No extra memory is allocated for bytes we think we might
need to append in the future. Data is now only copied into one buffer lazily as needed,
which could slightly change when small delays from memcpy happen, but it's an overall
improvement. We could have a performance hit if we were to call append() then data()
then append() then data() etc. but that doesn't happen in WebKit because we call append
repeatedly when buffering the data then call data() once when reading the data.

  • editing/cocoa/EditorCocoa.mm:

(WebCore::archivedDataForAttributedString):
(WebCore::Editor::selectionInWebArchiveFormat):
(WebCore::Editor::dataInRTFDFormat):
(WebCore::Editor::dataInRTFFormat):

  • editing/ios/EditorIOS.mm:

(WebCore::Editor::WebContentReader::readURL):

  • editing/mac/EditorMac.mm:

(WebCore::Editor::imageInWebArchiveFormat):

  • loader/TextTrackLoader.cpp:

(WebCore::TextTrackLoader::processNewCueData):

  • loader/archive/cf/LegacyWebArchive.cpp:

(WebCore::LegacyWebArchive::createResource):

  • loader/cache/CachedResource.cpp:

(WebCore::CachedResource::tryReplaceEncodedData):

  • loader/cocoa/DiskCacheMonitorCocoa.mm:

(WebCore::DiskCacheMonitor::tryGetFileBackedSharedBufferFromCFURLCachedResponse):

  • platform/SharedBuffer.cpp:

(WebCore::SharedBuffer::SharedBuffer):
(WebCore::SharedBuffer::create):
(WebCore::SharedBuffer::combineToOneSegment):
(WebCore::SharedBuffer::data):
(WebCore::SharedBuffer::createArrayBuffer):
(WebCore::SharedBuffer::append):
(WebCore::SharedBuffer::clear):
(WebCore::SharedBuffer::copy):
(WebCore::SharedBuffer::DataSegment::data):
(WebCore::SharedBuffer::DataSegment::size):
(WebCore::segmentIndex): Deleted.
(WebCore::offsetInSegment): Deleted.
(WebCore::allocateSegment): Deleted.
(WebCore::freeSegment): Deleted.
(WebCore::SharedBuffer::~SharedBuffer): Deleted.
(WebCore::SharedBuffer::size): Deleted.
(WebCore::SharedBuffer::duplicateDataBufferIfNecessary): Deleted.
(WebCore::SharedBuffer::appendToDataBuffer): Deleted.
(WebCore::SharedBuffer::clearDataBuffer): Deleted.
(WebCore::SharedBuffer::copyBufferAndClear): Deleted.
(WebCore::SharedBuffer::buffer): Deleted.
(WebCore::SharedBuffer::getSomeData): Deleted.
(WebCore::SharedBuffer::maybeTransferMappedFileData): Deleted.
(WebCore::SharedBuffer::clearPlatformData): Deleted.
(WebCore::SharedBuffer::maybeTransferPlatformData): Deleted.
(WebCore::SharedBuffer::hasPlatformData): Deleted.
(WebCore::SharedBuffer::platformData): Deleted.
(WebCore::SharedBuffer::maybeAppendPlatformData): Deleted.

  • platform/SharedBuffer.h:

(WebCore::SharedBuffer::create): Deleted.
(WebCore::SharedBuffer::isEmpty): Deleted.

  • platform/SharedBufferChunkReader.cpp:

(WebCore::SharedBufferChunkReader::nextChunk):
(WebCore::SharedBufferChunkReader::peek):

  • platform/SharedBufferChunkReader.h:
  • platform/URLParser.cpp:

(WebCore::URLParser::URLParser):

  • platform/cf/KeyedEncoderCF.cpp:

(WebCore::KeyedEncoderCF::finishEncoding):

  • platform/cf/SharedBufferCF.cpp:

(WebCore::SharedBuffer::SharedBuffer):
(WebCore::SharedBuffer::createCFData):
(WebCore::SharedBuffer::create):
(WebCore::SharedBuffer::hintMemoryNotNeededSoon):
(WebCore::SharedBuffer::append):
(WebCore::SharedBuffer::wrapCFData): Deleted.
(WebCore::SharedBuffer::hasPlatformData): Deleted.
(WebCore::SharedBuffer::platformData): Deleted.
(WebCore::SharedBuffer::platformDataSize): Deleted.
(WebCore::SharedBuffer::maybeTransferPlatformData): Deleted.
(WebCore::SharedBuffer::clearPlatformData): Deleted.
(WebCore::SharedBuffer::tryReplaceContentsWithPlatformBuffer): Deleted.
(WebCore::SharedBuffer::maybeAppendPlatformData): Deleted.
(WebCore::SharedBuffer::copyBufferAndClear): Deleted.
(WebCore::SharedBuffer::copySomeDataFromDataArray): Deleted.
(WebCore::SharedBuffer::singleDataArrayBuffer): Deleted.
(WebCore::SharedBuffer::maybeAppendDataArray): Deleted.

  • platform/cocoa/NetworkExtensionContentFilter.mm:

(WebCore::NetworkExtensionContentFilter::replacementData):

  • platform/cocoa/ParentalControlsContentFilter.mm:

(WebCore::ParentalControlsContentFilter::replacementData):

  • platform/cocoa/SharedBufferCocoa.mm:

(-[WebCoreSharedBufferData initWithSharedBufferDataSegment:]):
(-[WebCoreSharedBufferData length]):
(-[WebCoreSharedBufferData bytes]):
(WebCore::SharedBuffer::create):
(WebCore::SharedBuffer::createCFData):
(WebCore::SharedBuffer::createFromReadingFile):
(WebCore::SharedBuffer::createNSDataArray):
(-[WebCoreSharedBufferData initWithSharedBufferDataBuffer:]): Deleted.
(WebCore::SharedBuffer::wrapNSData): Deleted.
(WebCore::SharedBuffer::existingCFData): Deleted.

  • platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm:

(WebCore::WebCoreAVFResourceLoader::fulfillRequestWithResource):

  • platform/graphics/cocoa/FontPlatformDataCocoa.mm:

(WebCore::FontPlatformData::openTypeTable):

  • platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:

(ResourceHandleStreamingClient::didReceiveBuffer):

  • platform/graphics/mac/ImageMac.mm:

(WebCore::Image::loadPlatformResource):

  • platform/image-decoders/ImageDecoder.cpp:

(WebCore::ImageDecoder::create):

  • platform/image-decoders/png/PNGImageDecoder.cpp:

(WebCore::PNGImageReader::decode):

  • platform/ios/PlatformPasteboardIOS.mm:

(WebCore::PlatformPasteboard::readBuffer):

  • platform/mac/PasteboardMac.mm:

(WebCore::writeFileWrapperAsRTFDAttachment):
(WebCore::Pasteboard::write):

  • platform/mac/PlatformPasteboardMac.mm:

(WebCore::PlatformPasteboard::bufferForType):

  • platform/network/BlobResourceHandle.cpp:

(WebCore::BlobResourceHandle::notifyReceiveData):

  • platform/network/MIMEHeader.cpp:
  • platform/network/MIMEHeader.h:
  • platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp:

(WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveData):

  • platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.cpp:

(WebCore::SynchronousResourceHandleCFURLConnectionDelegate::didReceiveData):

  • platform/network/mac/WebCoreResourceHandleAsDelegate.mm:

(-[WebCoreResourceHandleAsDelegate connection:didReceiveData:lengthReceived:]):

  • platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm:

(-[WebCoreResourceHandleAsOperationQueueDelegate connection:didReceiveData:lengthReceived:]):

  • platform/soup/SharedBufferSoup.cpp:

(WebCore::SharedBuffer::SharedBuffer):
(WebCore::SharedBuffer::createSoupBuffer):
(WebCore::SharedBuffer::clearPlatformData): Deleted.
(WebCore::SharedBuffer::maybeTransferPlatformData): Deleted.
(WebCore::SharedBuffer::hasPlatformData): Deleted.
(WebCore::SharedBuffer::platformData): Deleted.
(WebCore::SharedBuffer::platformDataSize): Deleted.
(WebCore::SharedBuffer::maybeAppendPlatformData): Deleted.
(WebCore::SharedBuffer::tryReplaceContentsWithPlatformBuffer): Deleted.

Source/WebKit/mac:

  • WebView/WebArchive.mm:

(-[WebArchive initWithData:]):

  • WebView/WebFrame.mm:

(-[WebFrame _loadData:MIMEType:textEncodingName:baseURL:unreachableURL:]):

  • WebView/WebResource.mm:

(-[WebResource initWithCoder:]):
(-[WebResource _initWithData:URL:MIMEType:textEncodingName:frameName:response:copyData:]):

Source/WebKit2:

  • NetworkProcess/cocoa/NetworkSessionCocoa.mm:

(-[WKNetworkSessionDelegate URLSession:dataTask:didReceiveData:]):

  • Platform/IPC/DataReference.cpp:

(IPC::SharedBufferDataReference::encode):

  • Shared/ShareableResource.cpp:

(WebKit::ShareableResource::wrapInSharedBuffer):

  • UIProcess/API/Cocoa/WKURLSchemeHandlerTask.mm:

(-[WKURLSchemeHandlerTaskImpl didReceiveData:]):

  • WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:

(-[WKWebProcessPlugInBrowserContextController _setEditingDelegate:]):

  • WebProcess/Plugins/PDF/PDFPlugin.mm:

(WebKit::PDFPlugin::addArchiveResource):
(WebKit::PDFPlugin::liveResourceData):
(WebKit::PDFPlugin::writeItemsToPasteboard):

  • WebProcess/Plugins/PluginView.cpp:

(WebKit::PluginView::redeliverManualStream):

  • WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:

(WebKit::WebDragClient::declareAndWriteDragImage):

  • WebProcess/WebPage/mac/WebPageMac.mm:

(WebKit::WebPage::cachedResponseDataForURL):

Tools:

  • TestWebKitAPI/Tests/WebCore/cocoa/SharedBuffer.mm:

(TestWebKitAPI::TEST_F):

12:34 AM Changeset in webkit [215607] by timothy_horton@apple.com
  • 14 edits
    12 adds in trunk

Expose obscured insets to web content (as "safe area insets")
https://bugs.webkit.org/show_bug.cgi?id=171013
<rdar://problem/31564652>

Reviewed by Wenson Hsieh and Dave Hyatt.

Tests: fast/css/variables/constants/invalid-constant-name-fallback.html

fast/css/variables/constants/ios/safe-area-inset-set.html
fast/css/variables/constants/safe-area-inset-cannot-override.html
fast/css/variables/constants/safe-area-inset-zero.html

  • CMakeLists.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • css/CSSValueKeywords.in:
  • css/CSSVariableData.cpp:

(WebCore::CSSVariableData::checkVariablesForCyclesWithRange):
(WebCore::CSSVariableData::resolveTokenRange):

  • css/parser/CSSVariableParser.cpp:

(WebCore::isValidConstantName):
(WebCore::classifyBlock):
(WebCore::isValidConstantReference):
Add a constant() function, which takes both custom properties and
arbitrary idents which are looked up in ConstantPropertyMap, allowing
fallback from the arbitrary, UA-defined idents to custom properties.

  • dom/ConstantPropertyMap.cpp: Added.

(WebCore::ConstantPropertyMap::ConstantPropertyMap):
(WebCore::ConstantPropertyMap::values):
(WebCore::ConstantPropertyMap::nameForProperty):
(WebCore::ConstantPropertyMap::setValueForProperty):
(WebCore::ConstantPropertyMap::buildValues):
(WebCore::variableDataForSafeAreaInset):
(WebCore::ConstantPropertyMap::didChangeObscuredInsets):

  • dom/ConstantPropertyMap.h: Added.

Keep a mapping of UA-defined "constants", which can be looked up
from CSS via the aforementioned function. For now, this mapping
includes only safe-area-inset-{top, right, bottom, left}, which
expose the obscured insets (now that they can be painted into via
the viewport parameter clip-to-safe-area-inset=no).

  • dom/Document.cpp:

(WebCore::Document::Document):
(WebCore::Document::didChangeObscuredInsets):

  • dom/Document.h:

(WebCore::Document::constantProperties):

  • page/Page.cpp:

(WebCore::Page::setObscuredInsets):

  • page/Page.h:

(WebCore::Page::setObscuredInsets): Deleted.
Make setObscuredInsets and related storage not iOS-specific, though
nothing from the other platforms yet calls this code.

  • style/StyleResolveForDocument.cpp:

(WebCore::Style::resolveForDocument):
Grab the constant properties from ConstantPropertyMap and plop them into
the CustomPropertyValueMap. Constant properties aren't allowed to start
with --, and variable properties must, so there is no opportunity here
for exposing things to var() (or allowing custom properties to override
UA-defined constant properties).

  • TestExpectations:
  • fast/css/variables/constants/invalid-constant-name-fallback-expected.html: Added.
  • fast/css/variables/constants/invalid-constant-name-fallback.html: Added.
  • fast/css/variables/constants/ios/safe-area-inset-set-expected.html: Added.
  • fast/css/variables/constants/ios/safe-area-inset-set.html: Added.
  • fast/css/variables/constants/safe-area-inset-cannot-override-expected.html: Added.
  • fast/css/variables/constants/safe-area-inset-cannot-override.html: Added.
  • fast/css/variables/constants/safe-area-inset-zero-expected.html: Added.
  • fast/css/variables/constants/safe-area-inset-zero.html: Added.
  • platform/ios-wk2/TestExpectations:

Apr 20, 2017:

11:08 PM Changeset in webkit [215606] by Konstantin Tokarev
  • 29 edits in trunk

[cmake] Define FORWARDING_HEADERS_DIR in WebKitFS and use it everywhere
https://bugs.webkit.org/show_bug.cgi?id=171071

Reviewed by Michael Catanzaro.

"${DERIVED_SOURCES_DIR}/ForwardingHeaders" path occurs very often in the
build system files. GTK-specifc FORWARDING_HEADERS_DIR variable should
be available for all ports.

.:

  • Source/cmake/OptionsGTK.cmake:
  • Source/cmake/WebKitFS.cmake:
  • Source/cmake/WebKitMacros.cmake:

Source/JavaScriptCore:

  • CMakeLists.txt:
  • PlatformWin.cmake:

Source/ThirdParty/ANGLE:

  • CMakeLists.txt:

Source/WebCore:

  • CMakeLists.txt:
  • PlatformMac.cmake:
  • PlatformWin.cmake:
  • PlatformWinCairo.cmake:

Source/WebKit:

  • CMakeLists.txt:
  • PlatformMac.cmake:
  • PlatformWin.cmake:

Source/WebKit2:

  • CMakeLists.txt:
  • PlatformMac.cmake:

Tools:

  • DumpRenderTree/PlatformMac.cmake:
  • MiniBrowser/mac/CMakeLists.txt:
  • MiniBrowser/win/CMakeLists.txt:
  • TestWebKitAPI/PlatformJSCOnly.cmake:
  • TestWebKitAPI/PlatformMac.cmake:
  • TestWebKitAPI/PlatformWin.cmake:
  • WebKitTestRunner/PlatformMac.cmake:
11:04 PM Changeset in webkit [215605] by commit-queue@webkit.org
  • 14 edits
    3 deletes in trunk

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

Made all tests crash under GuardMalloc (Requested by ap on
#webkit).

Reverted changeset:

"Expose obscured insets to web content (as "safe area
insets")"
https://bugs.webkit.org/show_bug.cgi?id=171013
http://trac.webkit.org/changeset/215597

10:36 PM Changeset in webkit [215604] by dino@apple.com
  • 1 edit in trunk/Source/WebCore/features.json

Fix typo

10:34 PM Changeset in webkit [215603] by dino@apple.com
  • 2 edits in trunk/Source/WebCore

Add Web Sharing to the features under consideration.

  • features.json:
10:20 PM Changeset in webkit [215602] by dino@apple.com
  • 2 edits in trunk/Source/WebCore

Add Scroll Anchoring to features under consideration.

  • features.json:
8:38 PM Changeset in webkit [215601] by Konstantin Tokarev
  • 8 edits in trunk/Source

Remove unused lamda captures
https://bugs.webkit.org/show_bug.cgi?id=171098

Reviewed by Yusuke Suzuki.

Source/JavaScriptCore:

  • bytecompiler/NodesCodegen.cpp:

(JSC::ArrayNode::emitBytecode):

  • ftl/FTLState.cpp:

(JSC::FTL::State::State):

  • wasm/WasmB3IRGenerator.cpp:

Source/WebCore:

  • Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:

(WebCore::IDBServer::SQLiteIDBBackingStore::getOrEstablishDatabaseInfo):

  • Modules/indexeddb/server/UniqueIDBDatabase.cpp:

(WebCore::IDBServer::UniqueIDBDatabase::activateTransactionInBackingStore):

  • loader/ResourceLoadStatisticsStore.cpp:

(WebCore::ResourceLoadStatisticsStore::createEncoderFromData):
(WebCore::ResourceLoadStatisticsStore::readDataFromDecoder):

7:08 PM Changeset in webkit [215600] by Yusuke Suzuki
  • 6 edits
    1 add in trunk

[JSC][FTL] FTL should support Arrayify
https://bugs.webkit.org/show_bug.cgi?id=169596

Reviewed by Saam Barati.

JSTests:

  • stress/arrayify.js: Added.

(arrayifyInt32):
(arrayifyDouble):
(arrayifyContiguous):

Source/JavaScriptCore:

This patch simply expands the coverage of FTL by supporting Arrayify.
While ArrayifyToStructure is already supported, Arrayify is not supported
in FTL. While supporting Arrayify in FTL itself does not offer so much
performance difference from DFG's one, no FTL support for Arrayify
prevents us applying FTL to the code including Arrayify.

  • dfg/DFGArrayMode.cpp:

(JSC::DFG::toIndexingShape):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::jumpSlowForUnwantedArrayMode):

  • ftl/FTLCapabilities.cpp:

(JSC::FTL::canCompile):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileNode):
(JSC::FTL::DFG::LowerDFGToB3::compileArrayify):
(JSC::FTL::DFG::LowerDFGToB3::compileCheckArray):
(JSC::FTL::DFG::LowerDFGToB3::isArrayTypeForArrayify):
(JSC::FTL::DFG::LowerDFGToB3::isArrayTypeForCheckArray):
(JSC::FTL::DFG::LowerDFGToB3::compileArrayifyToStructure): Deleted.
(JSC::FTL::DFG::LowerDFGToB3::isArrayType): Deleted.

6:49 PM Changeset in webkit [215599] by joepeck@webkit.org
  • 3 edits in trunk/Tools

Test262 bot does not go red with failures
https://bugs.webkit.org/show_bug.cgi?id=171044

Reviewed by Aakash Jain.

The piped output of run-jsc-stress-tests is different from
its non-piped output. Switch to parsing the correct output.

  • BuildSlaveSupport/build.webkit.org-config/master.cfg:

(RunTest262Tests.countFailures):
Just count the number of lines that start with "FAIL:".

  • BuildSlaveSupport/build.webkit.org-config/mastercfg_unittest.py:

(RunTest262TestsTest.test_no_regressions_output):
(test_failure_output):
(test_failures_output):
Updated tests with new sample output produced partially from bots and
locally. In cases of failure the return code of run-jsc-stress-tests
is still 0 so update the expected return code in the tests.

6:02 PM Changeset in webkit [215598] by beidson@apple.com
  • 5 edits in trunk

WebContent process becomes unresponsive after returning nil from async version of -webView:createWebViewWithConfiguration:...
<rdar://problem/31739023> and https://bugs.webkit.org/show_bug.cgi?id=171090

Reviewed by Andy Estes.

Source/WebKit2:

  • UIProcess/Cocoa/UIDelegate.mm:

(WebKit::UIDelegate::UIClient::createNewPageCommon): Handle the perfectly valid "nil webView" case correctly.

Tools:

  • TestWebKitAPI/Tests/WebKit2/open-and-close-window.html:
  • TestWebKitAPI/Tests/WebKit2Cocoa/OpenAndCloseWindow.mm:

(resetToConsistentState):
(-[OpenAndCloseWindowUIDelegate webViewDidClose:]):
(-[OpenAndCloseWindowUIDelegate webView:createWebViewWithConfiguration:forNavigationAction:windowFeatures:]):
(TEST):
(-[OpenAndCloseWindowUIDelegateAsync _webView:createWebViewWithConfiguration:forNavigationAction:windowFeatures:completionHandler:]):

6:00 PM Changeset in webkit [215597] by timothy_horton@apple.com
  • 14 edits
    12 adds in trunk

Expose obscured insets to web content (as "safe area insets")
https://bugs.webkit.org/show_bug.cgi?id=171013
<rdar://problem/31564652>

Reviewed by Wenson Hsieh and Dave Hyatt.

Tests: fast/css/variables/constants/invalid-constant-name-fallback.html

fast/css/variables/constants/ios/safe-area-inset-set.html
fast/css/variables/constants/safe-area-inset-cannot-override.html
fast/css/variables/constants/safe-area-inset-zero.html

  • CMakeLists.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • css/CSSValueKeywords.in:
  • css/CSSVariableData.cpp:

(WebCore::CSSVariableData::checkVariablesForCyclesWithRange):
(WebCore::CSSVariableData::resolveTokenRange):

  • css/parser/CSSVariableParser.cpp:

(WebCore::isValidConstantName):
(WebCore::classifyBlock):
(WebCore::isValidConstantReference):
Add a constant() function, which takes both custom properties and
arbitrary idents which are looked up in ConstantPropertyMap, allowing
fallback from the arbitrary, UA-defined idents to custom properties.

  • dom/ConstantPropertyMap.cpp: Added.

(WebCore::ConstantPropertyMap::ConstantPropertyMap):
(WebCore::ConstantPropertyMap::values):
(WebCore::ConstantPropertyMap::nameForProperty):
(WebCore::ConstantPropertyMap::setValueForProperty):
(WebCore::ConstantPropertyMap::buildValues):
(WebCore::variableDataForSafeAreaInset):
(WebCore::ConstantPropertyMap::didChangeObscuredInsets):

  • dom/ConstantPropertyMap.h: Added.

Keep a mapping of UA-defined "constants", which can be looked up
from CSS via the aforementioned function. For now, this mapping
includes only safe-area-inset-{top, right, bottom, left}, which
expose the obscured insets (now that they can be painted into via
the viewport parameter clip-to-safe-area-inset=no).

  • dom/Document.cpp:

(WebCore::Document::Document):
(WebCore::Document::didChangeObscuredInsets):

  • dom/Document.h:

(WebCore::Document::constantProperties):

  • page/Page.cpp:

(WebCore::Page::setObscuredInsets):

  • page/Page.h:

(WebCore::Page::setObscuredInsets): Deleted.
Make setObscuredInsets and related storage not iOS-specific, though
nothing from the other platforms yet calls this code.

  • style/StyleResolveForDocument.cpp:

(WebCore::Style::resolveForDocument):
Grab the constant properties from ConstantPropertyMap and plop them into
the CustomPropertyValueMap. Constant properties aren't allowed to start
with --, and variable properties must, so there is no opportunity here
for exposing things to var() (or allowing custom properties to override
UA-defined constant properties).

  • TestExpectations:
  • fast/css/variables/constants/invalid-constant-name-fallback-expected.html: Added.
  • fast/css/variables/constants/invalid-constant-name-fallback.html: Added.
  • fast/css/variables/constants/ios/safe-area-inset-set-expected.html: Added.
  • fast/css/variables/constants/ios/safe-area-inset-set.html: Added.
  • fast/css/variables/constants/safe-area-inset-cannot-override-expected.html: Added.
  • fast/css/variables/constants/safe-area-inset-cannot-override.html: Added.
  • fast/css/variables/constants/safe-area-inset-zero-expected.html: Added.
  • fast/css/variables/constants/safe-area-inset-zero.html: Added.
  • platform/ios-wk2/TestExpectations:
5:30 PM Changeset in webkit [215596] by mark.lam@apple.com
  • 3 edits
    1 add in trunk

virtualThunkFor() needs to materialize its of tagMaskRegister for tail calls.
https://bugs.webkit.org/show_bug.cgi?id=171079
<rdar://problem/31684756>

Reviewed by Saam Barati.

JSTests:

  • stress/regress-171079.js: Added.

Source/JavaScriptCore:

This is needed because tail calls would restore callee saved registers (and
therefore, potentially clobber the tag registers) before jumping to the thunk.

  • jit/ThunkGenerators.cpp:

(JSC::virtualThunkFor):

5:20 PM Changeset in webkit [215595] by mark.lam@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Build fix after r215592.
https://bugs.webkit.org/show_bug.cgi?id=171088

Not reviewed.

  • assembler/MacroAssemblerPrinter.h:
5:00 PM Changeset in webkit [215594] by wenson_hsieh@apple.com
  • 2 edits in trunk/Tools

[ios-simulator] PositionInformationTests API tests are timing out
https://bugs.webkit.org/show_bug.cgi?id=171089

Rubber-stamped by Tim Horton.

Addresses failures observed in the new position information tests added in r215573 by only running them if the
DATA_INTERACTION feature flag is enabled.

  • TestWebKitAPI/Tests/ios/PositionInformationTests.mm:
4:55 PM Changeset in webkit [215593] by jmarcell@apple.com
  • 2 edits in tags/Safari-604.1.18/Source/ThirdParty/ANGLE

Cherry-pick r215527. rdar://problem/31714717

4:55 PM Changeset in webkit [215592] by mark.lam@apple.com
  • 14 edits in trunk/Source/JavaScriptCore

Update the MASM probe to only take 1 arg instead of 2 (in addition to the callback function).
https://bugs.webkit.org/show_bug.cgi?id=171088

Reviewed by Michael Saboff and Saam Barati.

Experience shows that we never use the 2nd arg. So, let's remove it to reduce
the footprint at each probe site.

Also fix the MacroAssembler::print() function so that it is a no-op when
!ENABLE(MASM_PROBE). This will allow us to have print() statements in JIT code
without a lot of #if ENABLE(MASM_PROBE)s later.

  • assembler/AbstractMacroAssembler.h:
  • assembler/MacroAssembler.cpp:

(JSC::stdFunctionCallback):
(JSC::MacroAssembler::probe):

  • assembler/MacroAssembler.h:
  • assembler/MacroAssemblerARM.cpp:

(JSC::MacroAssemblerARM::probe):

  • assembler/MacroAssemblerARM.h:
  • assembler/MacroAssemblerARM64.cpp:

(JSC::MacroAssemblerARM64::probe):

  • assembler/MacroAssemblerARM64.h:
  • assembler/MacroAssemblerARMv7.cpp:

(JSC::MacroAssemblerARMv7::probe):

  • assembler/MacroAssemblerARMv7.h:
  • assembler/MacroAssemblerPrinter.cpp:

(JSC::MacroAssemblerPrinter::printCallback):

  • assembler/MacroAssemblerPrinter.h:

(JSC::MacroAssemblerPrinter::print):
(JSC::MacroAssembler::print):

  • assembler/MacroAssemblerX86Common.cpp:

(JSC::MacroAssemblerX86Common::probe):

  • assembler/MacroAssemblerX86Common.h:
4:53 PM Changeset in webkit [215591] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Mark media/modern-media-controls/tracks-support/tracks-support-click-track-in-panel.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=169109

Unreviewed test gardening.

  • platform/mac/TestExpectations:
4:53 PM Changeset in webkit [215590] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Mark imported/w3c/web-platform-tests/WebCryptoAPI/sign_verify/ecdsa.worker.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=170921

Unreviewed test gardening.

4:50 PM Changeset in webkit [215589] by mitz@apple.com
  • 2 edits in trunk/Source/WebKit2

Disable header postprocessing when building for Sierra

Absolutely rubber-stamped by Anders Carlsson.

  • Configurations/WebKit.xcconfig:
4:49 PM Changeset in webkit [215588] by andersca@apple.com
  • 2 edits in trunk/Source/WebCore

Remove one use of toPaymentAuthorizationStatus
https://bugs.webkit.org/show_bug.cgi?id=171086

Reviewed by Tim Horton.

Just switch on the individual ApplePaySession::STATUS_ values.

  • Modules/applepay/ApplePaySession.cpp:

(WebCore::ApplePaySession::completeShippingMethodSelection):

4:42 PM Changeset in webkit [215587] by mrajca@apple.com
  • 9 edits
    1 add in trunk

Cocoa: add private API for suppressing first responder changes
https://bugs.webkit.org/show_bug.cgi?id=171069
<rdar://problem/31658967>

Reviewed by Tim Horton.

Some clients may not want the web view to be programmatically made the first responder
and invoking -makeFirstResponder: unconditionally posts 'first responder did change'
notifications.

Added API test.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _setShouldSuppressFirstResponderChanges:]):

  • UIProcess/API/Cocoa/WKWebViewPrivate.h:
  • UIProcess/Cocoa/WebViewImpl.h:
  • UIProcess/Cocoa/WebViewImpl.mm:

(WebKit::WebViewImpl::setShouldSuppressFirstResponderChanges):

  • UIProcess/PageClient.h:
  • UIProcess/mac/PageClientImpl.h:
  • UIProcess/mac/PageClientImpl.mm:

(WebKit::PageClientImpl::makeFirstResponder):

4:27 PM Changeset in webkit [215586] by beidson@apple.com
  • 2 edits in trunk/Tools

Skip WebKit2.OpenAndCloseWindowAsyncCallbackException for now.
https://bugs.webkit.org/show_bug.cgi?id=171083

Unreviewed.

  • TestWebKitAPI/Tests/WebKit2Cocoa/OpenAndCloseWindow.mm:
4:11 PM Changeset in webkit [215585] by commit-queue@webkit.org
  • 15 edits
    2 adds in trunk/Source

[WinCairo] Fix build break after updating ANGLE
https://bugs.webkit.org/show_bug.cgi?id=170980

Patch by Fujii Hironori <Fujii Hironori> on 2017-04-20
Reviewed by Brent Fulgham.

Source/ThirdParty/ANGLE:

  • CMakeLists.txt: Added some new source files.
  • PlatformMac.cmake: Ditto.
  • PlatformWin.cmake: Ditto. Remove a macro 'ANGLE_WEBKIT_WIN'

because SoftLinking is not used anymore.

  • src/third_party/systeminfo/: Restored.

Source/WebCore:

By stopping using SoftLinking for ANGLE, some changes are needed
for WebCore and WebKit.

  • Define a macro 'GL_GLEXT_PROTOTYPES' before #include <GLES2/gl2.h> or <GLES2/gl2ext.h>.
  • Link libEGL import library explicitly.
  • PlatformWin.cmake: Link libEGL to WebCore.
  • platform/graphics/PlatformDisplay.cpp:

(WebCore::PlatformDisplay::initializeEGLDisplay): Removed the code for SoftLinking.

  • platform/graphics/GLContext.cpp: Define GL_GLEXT_PROTOTYPES.
  • platform/graphics/egl/GLContextEGL.cpp: Ditto.
  • platform/graphics/opengl/Extensions3DOpenGLCommon.cpp: Ditto.
  • platform/graphics/opengl/Extensions3DOpenGLES.h: Ditto.
  • platform/graphics/opengl/TemporaryOpenGLSetting.cpp: Ditto.
  • platform/graphics/texmap/TextureMapperGC3DPlatformLayer.cpp: Ditto.

Source/WebKit/win:

  • WebCoreSupport/AcceleratedCompositingContext.cpp: Define GL_GLEXT_PROTOTYPES.
4:09 PM Changeset in webkit [215584] by Matt Baker
  • 16 edits
    2 copies
    2 adds in trunk

Web Inspector: Add regular expression support to XHR breakpoints
https://bugs.webkit.org/show_bug.cgi?id=170099
<rdar://problem/31558082>

Reviewed by Joseph Pecoraro.

Source/JavaScriptCore:

  • inspector/protocol/DOMDebugger.json:

New optional isRegex parameter denotes whether url contains
a regular expression.

Source/WebCore:

  • inspector/InspectorDOMDebuggerAgent.cpp:

(WebCore::InspectorDOMDebuggerAgent::setXHRBreakpoint):
(WebCore::InspectorDOMDebuggerAgent::willSendXMLHttpRequest):
Use ContentSearchUtilities for both Text and RegularExpression breakpoints.

  • inspector/InspectorDOMDebuggerAgent.h:

Associate XHR breakpoint with a type.

Source/WebInspectorUI:

  • Localizations/en.lproj/localizedStrings.js:

New strings for the Add XHR Breakpoint popover.

  • UserInterface/Controllers/DOMDebuggerManager.js:

(WebInspector.DOMDebuggerManager):
(WebInspector.DOMDebuggerManager.prototype.addXHRBreakpoint):
Update for new XHRBreakpoint constructor.
(WebInspector.DOMDebuggerManager.prototype._updateXHRBreakpoint):
Set isRegex flag.

  • UserInterface/Main.html:

New files for CodeMirror mode and breakpoint popover.

  • UserInterface/Models/XHRBreakpoint.js:

Breakpoint can be of type Text or RegularExpression.
(WebInspector.XHRBreakpoint):
(WebInspector.XHRBreakpoint.prototype.get type):
(WebInspector.XHRBreakpoint.prototype.get serializableInfo):

  • UserInterface/Views/CodeMirrorRegexMode.css: Added.

(.cm-s-default .cm-regex-character-set):
(.cm-s-default .cm-regex-character-set-negate):
(.cm-s-default :matches(.cm-regex-escape, .cm-regex-escape-2, .cm-regex-escape-3)):
(.cm-s-default :matches(.cm-regex-group, .cm-regex-lookahead)):
(.cm-s-default .cm-regex-quantifier):
(.cm-s-default :matches(.cm-regex-literal, .cm-regex-special, .cm-regex-backreference)):
Colors for regular expression syntax highlighting. The regex mode emits
more class names than we have separate colors for, allowing for further
customization in the future.

  • UserInterface/Views/CodeMirrorRegexMode.js: Added.

(characterSetTokenizer):
(consumeEscapeSequence):
(tokenBase):
New CodeMirror mode for highlighting "text/x-regex" content.

  • UserInterface/Views/DebuggerSidebarPanel.js:

Use new popover type for creating XHR breakpoints.
(WebInspector.DebuggerSidebarPanel.prototype._addXHRBreakpointButtonClicked):
(WebInspector.DebuggerSidebarPanel.prototype.willDismissPopover):
(WebInspector.DebuggerSidebarPanel):

  • UserInterface/Views/XHRBreakpointPopover.css: Added.

(.popover .xhr-breakpoint-content):
(.popover .xhr-breakpoint-content > .editor-wrapper):
(.popover .xhr-breakpoint-content > .editor-wrapper > .editor):
(body[dir=ltr] .popover .xhr-breakpoint-content > .editor-wrapper > .editor):
(body[dir=rtl] .popover .xhr-breakpoint-content > .editor-wrapper > .editor):
(.popover .xhr-breakpoint-content > .editor-wrapper > .editor > .CodeMirror):
(.popover .xhr-breakpoint-content > .editor-wrapper > .editor > .CodeMirror-scroll):
Styles for new popover.

  • UserInterface/Views/XHRBreakpointPopover.js: Added.

New popover class. Includes a picker for selecting breakpoint type
(Text or RegularExpression), and has an improved popover caption. Input
field style and placeholder text changes based on the breakpoint type.

(WebInspector.XHRBreakpointPopover):
(WebInspector.XHRBreakpointPopover.prototype.get result):
(WebInspector.XHRBreakpointPopover.prototype.get type):
(WebInspector.XHRBreakpointPopover.prototype.get value):
(WebInspector.XHRBreakpointPopover.prototype.show.addOption):
(WebInspector.XHRBreakpointPopover.prototype.show):
(WebInspector.XHRBreakpointPopover.prototype._createEditor):
(WebInspector.XHRBreakpointPopover.prototype._updateEditor):
(WebInspector.XHRBreakpointPopover.prototype._presentOverTargetElement):

  • UserInterface/Views/XHRBreakpointTreeElement.js:

(WebInspector.XHRBreakpointTreeElement):
Differentiate breakpoint type by enclosing subtitle in either double quotes
or regex-literal delimiters, depending on the type of breakpoint.

LayoutTests:

Update tests and expectations for new XHR breakpoint type.

  • inspector/dom-debugger/xhr-breakpoints-expected.txt:
  • inspector/dom-debugger/xhr-breakpoints.html:
4:09 PM Changeset in webkit [215583] by eric.carlson@apple.com
  • 2 edits in trunk/Source/WebCore

[MediaStream] Cleanup and simplify CoreAudioCaptureSource
https://bugs.webkit.org/show_bug.cgi?id=171064

There is no need for a mutex to guard against internal state changes because we
don't currently change configuration after the audio unit is allocated. Once
we do support reconfiguration on the fly, we can just stop the output unit before
changing configuration because the I/O proc isn't called if the output unit
is stopped, and AudioOutputUnitStop blocks until the audio device has stopped.

Reviewed by Jer Noble.

  • platform/mediastream/mac/CoreAudioCaptureSource.cpp:

(WebCore::CoreAudioCaptureSource::~CoreAudioCaptureSource): Call cleanupAudioUnits
instead of duplicating logic.
(WebCore::CoreAudioCaptureSource::preferredIOBufferDuration): Change preferred
duration from 20ms to 40ms.
(WebCore::CoreAudioCaptureSource::configureMicrophoneProc): Set mSampleRate to the
preferred sample rate if it is 0.
(WebCore::CoreAudioCaptureSource::configureSpeakerProc): Ditto.
(WebCore::CoreAudioCaptureSource::provideSpeakerData): Only increment counter and
check timestamps in debug builds.
(WebCore::CoreAudioCaptureSource::processMicrophoneSamples): Ditto.
(WebCore::CoreAudioCaptureSource::cleanupAudioUnits): We only need the audio unit
name in debug builds.
(WebCore::CoreAudioCaptureSource::setupAudioUnits): Ditto. No more internal state
lock. Don't try to get the default input device on iOS.
(WebCore::CoreAudioCaptureSource::startProducingData): No more internal state lock.
Assert if not called on the main thread.
(WebCore::CoreAudioCaptureSource::stopProducingData): Ditto.
(WebCore::CoreAudioCaptureSource::suspend): Ditto.
(WebCore::CoreAudioCaptureSource::resume): Ditto.

  • platform/mediastream/mac/CoreAudioCaptureSource.h:
3:23 PM Changeset in webkit [215582] by eric.carlson@apple.com
  • 7 edits in trunk/Source

[MediaStream iOS] Hold process assertion while media capture is active
https://bugs.webkit.org/show_bug.cgi?id=171017
<rdar://problem/31719177>

Reviewed by Dean Jackson.

Source/WebCore:

  • page/ActivityState.h: Add IsCapturingMedia flag.
  • page/Page.cpp:

(WebCore::Page::updateTimerThrottlingState): Enable timer throttling when capture is active
like we do when playing audio.
(WebCore::Page::setActivityState): Ditto.

  • page/PerformanceMonitor.cpp:

(WebCore::PerformanceMonitor::updateProcessStateForMemoryPressure): A process is active when
capturing media, as it is when playing audio.

Source/WebKit2:

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::updateActivityState): Update IsCapturingMedia when necessary.
(WebKit::WebPageProxy::updateThrottleState): Hold a token when capture is active.
(WebKit::WebPageProxy::setMuted): Capture state may change when the page is muted,
so pass IsCapturingMedia to activityStateDidChange.
(WebKit::WebPageProxy::isPlayingMediaDidChange): Ditto.

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::updateThrottleState): Don't allow page suppression when capture
is active.

3:06 PM Changeset in webkit [215581] by wenson_hsieh@apple.com
  • 5 edits
    2 adds in trunk

Inline anchor elements cannot be dragged when starting the drag from a block descendant
https://bugs.webkit.org/show_bug.cgi?id=171062
<rdar://problem/31697835>

Reviewed by Tim Horton.

Source/WebCore:

Tweaks DragController::draggableElement to traverse the DOM instead of the render tree when finding a draggable
element. This prevents us from skipping elements that are in the DOM ancestor chain, but appear as siblings to
the hit-tested node's renderer in the render tree.

There was also previously a check to ensure that we skip anonymous RenderObjects while traversing up the chain,
but this is no longer necessary fter this change, since all the elements we traverse in the DOM should have
renderers that are not anonymous.

Test: fast/events/drag-and-drop-link-containing-block.html

  • page/DragController.cpp:

(WebCore::DragController::draggableElement):

LayoutTests:

Adds a new test on WK1 Mac to verify that link dragging succeeds when the link's anchor element is inline and
the drag is started from a block element under the link.

  • fast/events/drag-and-drop-link-containing-block-expected.txt: Added.
  • fast/events/drag-and-drop-link-containing-block.html: Added.
  • platform/ios/TestExpectations:
  • platform/mac-wk2/TestExpectations:

Skip the test on iOS and Mac WK2.

2:56 PM Changeset in webkit [215580] by mcatanzaro@igalia.com
  • 2 edits in trunk/Source/WebCore

-Wformat warning on HistoryController.cpp:295:5
https://bugs.webkit.org/show_bug.cgi?id=171028

Reviewed by Daniel Bates.

Need to cast WebCore::FrameLoadType to int before using it in printf.

  • loader/HistoryController.cpp:

(WebCore::HistoryController::goToItem):

2:42 PM Changeset in webkit [215579] by pvollan@apple.com
  • 3 edits in trunk/Source/WebCore

The toleranceBefore parameter in the AVPlayerItem method seekToTime should not be negative.
https://bugs.webkit.org/show_bug.cgi?id=171063

Reviewed by Eric Carlson.

The AVPlayerItem method seekToTime will throw an exception if toleranceBefore is negative.

No new tests since the change is a sanity check.

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::seekTask):

  • platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:

(WebCore::MediaPlayerPrivateAVFoundationObjC::seekToTime):

2:30 PM Changeset in webkit [215578] by andersca@apple.com
  • 2 edits in trunk/Source/WebKit2

Fix build.

  • UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:

(WebKit::WebPaymentCoordinatorProxy::platformCompletePaymentSession):

1:53 PM Changeset in webkit [215577] by beidson@apple.com
  • 4 edits in trunk

Add CompletionHandlerCallChecker to SPI added in r215545.
https://bugs.webkit.org/show_bug.cgi?id=171067

Reviewed by Dan Bernstein.

Source/WebKit2:

  • UIProcess/Cocoa/UIDelegate.mm:

(WebKit::UIDelegate::UIClient::createNewPageCommon):

Tools:

  • TestWebKitAPI/Tests/WebKit2Cocoa/OpenAndCloseWindow.mm:

(TEST):
(-[OpenAndCloseWindowUIDelegateAsync _webView:createWebViewWithConfiguration:forNavigationAction:windowFeatures:completionHandler:]):

1:52 PM Changeset in webkit [215576] by andersca@apple.com
  • 8 edits in trunk/Source

Replace isFinalStateStatus with isFinalStateResult
https://bugs.webkit.org/show_bug.cgi?id=171072
rdar://problem/31589635

Reviewed by Tim Horton.

Source/WebCore:

This will let us get rid of some of the status enum declarations.

  • Modules/applepay/ApplePaySession.cpp:

(WebCore::ApplePaySession::completePayment):

  • Modules/applepay/PaymentAuthorizationStatus.h:

(WebCore::isFinalStateStatus): Deleted.

  • Modules/applepay/PaymentCoordinator.cpp:

(WebCore::PaymentCoordinator::completePaymentSession):

  • Modules/applepay/PaymentRequest.cpp:

(WebCore::isFinalStateResult):

  • Modules/applepay/PaymentRequest.h:

Source/WebKit2:

  • UIProcess/ApplePay/WebPaymentCoordinatorProxy.cpp:

(WebKit::WebPaymentCoordinatorProxy::completePaymentSession):

1:14 PM Changeset in webkit [215575] by bfulgham@apple.com
  • 2 edits in trunk/Source/WebCore

[Win] REGRESSION(r215486): Windows Release build is broken
https://bugs.webkit.org/show_bug.cgi?id=171024
<rdar://problem/31722618>

Reviewed by Mark Lam.

Add missing include needed for clean Release build on Windows (proper
fix found by Fujii Hironori).

  • bindings/js/JSDOMGlobalObject.h:
1:09 PM Changeset in webkit [215574] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

CachedImage should cancel loading images for unsupported/unknown types
https://bugs.webkit.org/show_bug.cgi?id=170697

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2017-04-20
Reviewed by Youenn Fablet.

Currently when the image decoder detects an error with the incoming encoded
data of an image, we mark the image to be a broken image. But the network
process keeps feeding the web process with the rest of the data. We should
cancel loading the rest of the data to save network bandwidth and CPU time
loading and processing useless data.

  • loader/cache/CachedImage.cpp:

(WebCore::CachedImage::addIncrementalDataBuffer):
(WebCore::CachedImage::finishLoading):

12:59 PM Changeset in webkit [215573] by wenson_hsieh@apple.com
  • 8 edits
    4 adds in trunk

[WK2] -[WKContentView doAfterPositionInformationUpdate:atPosition:] should be robust against synchronous reentrancy
https://bugs.webkit.org/show_bug.cgi?id=170922
<rdar://problem/31634990>

Reviewed by Tim Horton.

Source/WebKit2:

Refactors part of the asynchronous position information mechanism introduced in
<https://trac.webkit.org/changeset/215171>, and introduces infrastructure for unit testing UI-side position
information requests.

_invokeAndRemovePendingHandlersValidForCurrentPositionInformation is a helper method on WKContentView
responsible for invoking queued position information handlers after receiving a position information response
from the web process. Previously, this method would iterate over the list of pending callbacks and invoke all
callbacks whose requests are satisfied by the incoming position information update, saving the indices of these
handled callbacks in the process. At the end, it would then remove callbacks at these indices from the array of
pending callbacks. This is problematic when a synchronous position update (via
ensurePositionInformationIsUpToDate:) is triggered from within one of these callbacks, since
_invokeAndRemovePendingHandlersValidForCurrentPositionInformation will be called from within itself, and then we
will attempt to remove a callback at the same index twice.

To fix this, we change the array of pending position information handlers to be an array of optionals instead.
When invoking and removing pending handlers after a position information response arrives, we now mark callbacks
as handled by setting them to std::nullopt. Then, when the top-level invocation to
_invokeAndRemovePendingHandlersValidForCurrentPositionInformation is finished, we remove all marked handlers
from the pending vector.

Covered by 6 new unit tests:

  • PositionInformationTests.FindDraggableLinkAtPosition
  • PositionInformationTests.RequestDraggableLinkAtPosition
  • PositionInformationTests.FindDraggableLinkAtDifferentPositionWithinRequestBlock
  • PositionInformationTests.FindDraggableLinkAtSamePositionWithinRequestBlock
  • PositionInformationTests.RequestDraggableLinkAtSamePositionWithinRequestBlock
  • PositionInformationTests.RequestDraggableLinkAtDifferentPositionWithinRequestBlock
  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView draggableElementAtPosition:]):
(-[WKWebView requestDraggableElementAtPosition:completionBlock:]):

Uses WKContentView's position information request helpers to search for draggable elements on the page. There
are both synchronous and asynchronous versions of this, both of which retrieve a _WKDraggableElementInfo.

  • UIProcess/API/Cocoa/WKWebViewPrivate.h:
  • UIProcess/API/Cocoa/_WKDraggableElementInfo.h: Added.
  • UIProcess/API/Cocoa/_WKDraggableElementInfo.mm: Added.

Exposes what elements are draggable at a given position as SPI (only for use in testing code, at the moment).

(-[_WKDraggableElementInfo initWithInteractionInformationAtPosition:]):
(-[_WKDraggableElementInfo copyWithZone:]):

  • UIProcess/API/Cocoa/_WKDraggableElementInfoInternal.h: Added.
  • UIProcess/ios/WKContentViewInteraction.h:
  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView currentPositionInformation]):
(-[WKContentView doAfterPositionInformationUpdate:forRequest:]):
(-[WKContentView _invokeAndRemovePendingHandlersValidForCurrentPositionInformation]):

  • WebKit2.xcodeproj/project.pbxproj:

Tools:

Adds six new unit tests for retrieving interaction information at a given position in the UI process. See
WebKit2 ChangeLog for more details.

  • TestWebKitAPI/Tests/ios/PositionInformationTests.mm:

(-[_WKDraggableElementInfo expectToBeLink:image:atPoint:]):
(TestWebKitAPI::TEST):
(TestWebKitAPI::expectCGPointsToBeEqual): Deleted.

12:45 PM Changeset in webkit [215572] by commit-queue@webkit.org
  • 8 edits
    2 adds in trunk

AX: Modern Media Controls Timeline slider should be operable
https://bugs.webkit.org/show_bug.cgi?id=170250

Patch by Aaron Chu <aaron_chu@apple.com> on 2017-04-20
Reviewed by Antoine Quint.

Source/WebCore:

Added a "change" event listener and aria-valuetext to the slider so that when a
VoiceOver user operates the timeline control, VO speaks the updated timestamp

Test: media/modern-media-controls/scrubber/scrubber-has-correct-ax-label.html

  • English.lproj/modern-media-controls-localized-strings.js:
  • Modules/modern-media-controls/controls/scrubber.js:

(Scrubber.prototype.set inputAccessibleLabel):
(Scrubber.prototype._formatTime):

  • Modules/modern-media-controls/controls/slider.js:

(Slider.prototype.handleEvent):
(Slider.prototype._handleInputEvent): Deleted.

  • Modules/modern-media-controls/controls/time-control.js:

(TimeControl.prototype.updateScrubberLabel):

  • Modules/modern-media-controls/controls/time-label.js:

(TimeLabel.prototype.commitProperty):
(TimeLabel.prototype._formattedTime):

  • Modules/modern-media-controls/main.js:

(formatTimeByUnit):
(unitizeTime):

LayoutTests:

  • media/modern-media-controls/scrubber/scrubber-has-correct-ax-label-expected.txt: Added.
  • media/modern-media-controls/scrubber/scrubber-has-correct-ax-label.html: Added.
12:44 PM Changeset in webkit [215571] by weinig@apple.com
  • 4 edits
    1 add in trunk/Source/WTF

Move notFound into its own file
https://bugs.webkit.org/show_bug.cgi?id=170972

Reviewed by Zalan Bujtas.

It is odd to require including <wtf/Vector.h> just to use WTF::notFound.
This is not causing any current problems, but does in few changes I have
queued up.

  • WTF.xcodeproj/project.pbxproj:
  • wtf/NotFound.h: Added.
  • wtf/Vector.h:
  • wtf/text/StringCommon.h:
12:39 PM Changeset in webkit [215570] by aestes@apple.com
  • 2 edits in trunk/Source/WebCore

Fix indentation in AVKitSPI.h
https://bugs.webkit.org/show_bug.cgi?id=171066

Reviewed by Jer Noble.

  • platform/spi/cocoa/AVKitSPI.h:
12:34 PM Changeset in webkit [215569] by andersca@apple.com
  • 2 edits in trunk/Source/WebKit2

Fix a PassKit function declaration typo
https://bugs.webkit.org/show_bug.cgi?id=171068
rdar://problem/31635008

Reviewed by Tim Horton.

  • UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:

(WebKit::WebPaymentCoordinatorProxy::platformCanMakePaymentsWithActiveCard):

12:22 PM Changeset in webkit [215568] by jer.noble@apple.com
  • 16 edits in trunk/Source

[MediaCapture] gUM() with CoreAudio fails if capturing audio in the UIProcess.
https://bugs.webkit.org/show_bug.cgi?id=171021

Reviewed by Eric Carlson.

Source/WebCore:

Refactor the creation of RealtimeMediaSources to take a persistent device ID rather
than a CaptureDevice directly. This allows WebKit2 to iterate devices in the UIProcess
rather than the WebProcess.

  • platform/mediastream/RealtimeMediaSource.h:
  • platform/mediastream/mac/AVAudioCaptureSource.mm:
  • platform/mediastream/mac/AVVideoCaptureSource.mm:
  • platform/mediastream/mac/CoreAudioCaptureSource.cpp:

(WebCore::CoreAudioCaptureSource::create):
(WebCore::CoreAudioCaptureSource::CoreAudioCaptureSource):

  • platform/mediastream/mac/CoreAudioCaptureSource.h:
  • platform/mediastream/mac/RealtimeMediaSourceCenterMac.cpp:

(WebCore::RealtimeMediaSourceCenterMac::createMediaStream):
(WebCore::RealtimeMediaSourceCenterMac::bestSourcesForTypeAndConstraints):

  • platform/mock/MockRealtimeAudioSource.cpp:
  • platform/mock/MockRealtimeVideoSource.cpp:

Source/WebKit2:

Pass a deviceID rather than a CaptureDevice across the process boundary.

  • Shared/WebCoreArgumentCoders.h:
  • UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp:

(WebKit::UserMediaCaptureManagerProxy::createMediaSourceForCaptureDeviceWithConstraints):

  • UIProcess/Cocoa/UserMediaCaptureManagerProxy.h:
  • UIProcess/Cocoa/UserMediaCaptureManagerProxy.messages.in:
  • WebProcess/cocoa/UserMediaCaptureManager.cpp:

(WebKit::UserMediaCaptureManager::createMediaSourceForCaptureDeviceWithConstraints):

  • WebProcess/cocoa/UserMediaCaptureManager.h:
12:13 PM Changeset in webkit [215567] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit2

Fix assertions in webProcessProxyFromConnection
https://bugs.webkit.org/show_bug.cgi?id=171025
<rdar://problem/31184073>

Patch by Alex Christensen <achristensen@webkit.org> on 2017-04-20
Reviewed by Brady Eidson.

  • UIProcess/WebProcessPool.cpp:

(WebKit::webProcessProxyFromConnection):
If we have a Connection, then we have a valid process attached to that connection,
unless it's a Connection to a different type of child process.
Calling ChildProcessProxy::connection on other web processes that are in State::Launching,
then we get an assertion. Luckily, ChildProcessProxy::hasConnection was introduced in r210861
for this reason.

11:23 AM Changeset in webkit [215566] by timothy_horton@apple.com
  • 14 edits in trunk/Source/WebCore

Make it possible to request the non-expanded scrollbar width from ScrollbarTheme
https://bugs.webkit.org/show_bug.cgi?id=171047

Reviewed by Sam Weinig.

No new tests, new behavior is not exposed in any way.

  • platform/ScrollTypes.h:
  • platform/ScrollbarTheme.h:

(WebCore::ScrollbarTheme::scrollbarThickness):

  • platform/gtk/ScrollbarThemeGtk.cpp:

(WebCore::ScrollbarThemeGtk::scrollbarThickness):

  • platform/gtk/ScrollbarThemeGtk.h:
  • platform/ios/ScrollbarThemeIOS.h:
  • platform/ios/ScrollbarThemeIOS.mm:

(WebCore::ScrollbarThemeIOS::scrollbarThickness):

  • platform/mac/ScrollbarThemeMac.h:
  • platform/mac/ScrollbarThemeMac.mm:

(WebCore::ScrollbarThemeMac::scrollbarThickness):

  • platform/mock/ScrollbarThemeMock.cpp:

(WebCore::ScrollbarThemeMock::scrollbarThickness):

  • platform/mock/ScrollbarThemeMock.h:
  • platform/win/ScrollbarThemeWin.cpp:

(WebCore::ScrollbarThemeWin::scrollbarThickness):

  • platform/win/ScrollbarThemeWin.h:
  • rendering/RenderScrollbarTheme.h:

On Mac, when the scrollbar is hovered, it gets bigger.
Currently, scrollbarThickness always returns the big size.
It should be possible to request the smaller, "regular" scrollbar size as well.

10:55 AM Changeset in webkit [215565] by fpizlo@apple.com
  • 40 edits
    6 adds in trunk

Optimize SharedArrayBuffer in the DFG+FTL
https://bugs.webkit.org/show_bug.cgi?id=164108

Reviewed by Saam Barati.

JSTests:

Added a fairly comprehensive test of the intrinsics. This creates a function for each possible
combination of type and operation, and then first uses it nicely and then tries a bunch of
erroneous conditions like OOB.

  • stress/SharedArrayBuffer-opt.js: Added.

(string_appeared_here.switch):
(string_appeared_here.str):
(runAtomic):
(shouldFail):
(Symbol):
(string_appeared_here.a.of.arrays.m.of.atomics):

  • stress/SharedArrayBuffer.js:

Source/JavaScriptCore:

This adds atomics intrinsics to the DFG and wires them through to the DFG and FTL backends. This
was super easy in the FTL since B3 already has comprehensive atomic intrinsics, which are more
powerful than what we need right now. In the DFG backend, I went with an easy-to-write
implementation that just reduces everything to a weak CAS loop. It's very inefficient with
registers (it needs ~8) but it's the DFG backend, so it's not obvious how much we care.

To make the rare cases easy to handle, I refactored AtomicsObject.cpp so that the operations for
the slow paths can share code with the native functions.

This also fixes register handling in the X86 implementations of CAS, in the case that
expectedAndResult is not %rax. This also fixes the ARM64 implementation of branchWeakCAS.

I adapted the CascadeLock from WTF/benchmarks/ToyLocks.h as a microbenchmark of lock performance.
This benchmark performs 2.5x faster, in both the contended and uncontended case, thanks to this
change. It's still about 3x slower than native. I investigated this only a bit. I suspect that
the story will be different in asm.js code, which will get constant-folding of the typed array
backing store by virtue of how it uses lexically scoped variables as pointers to the heap arrays.
It's worth noting that the native lock I was comparing against, the very nicely-tuned
CascadeLock, is at the very high end of lock throughput under virtually all conditions
(uncontended, microcontended, held for a long time). I also compared to WTF::Lock and others, and
the only ones that performed better in this microbenchmark were spinlocks. I don't recommend
using those. So, when I say this is 3x slower than native, I really mean that it's 3x slower than
the fastest native lock that I have in my arsenal.

Also worth noting is that I experimented with exposing Atomics.yield(), which uses sched_yield,
as a way of testing if adding a yield loop to the JS cascadeLock would help. It does not help. I
did not investigate why.

  • assembler/AbstractMacroAssembler.h:

(JSC::AbstractMacroAssembler::JumpList::append):

  • assembler/CPU.h:

(JSC::is64Bit):
(JSC::is32Bit):

  • b3/B3Common.h:

(JSC::B3::is64Bit): Deleted.
(JSC::B3::is32Bit): Deleted.

  • b3/B3LowerToAir.cpp:

(JSC::B3::Air::LowerToAir::appendTrapping):
(JSC::B3::Air::LowerToAir::appendCAS):
(JSC::B3::Air::LowerToAir::appendGeneralAtomic):

  • dfg/DFGAbstractInterpreterInlines.h:

(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::handleIntrinsicCall):

  • dfg/DFGClobberize.h:

(JSC::DFG::clobberize):

  • dfg/DFGDoesGC.cpp:

(JSC::DFG::doesGC):

  • dfg/DFGFixupPhase.cpp:

(JSC::DFG::FixupPhase::fixupNode):

  • dfg/DFGNode.h:

(JSC::DFG::Node::hasHeapPrediction):
(JSC::DFG::Node::hasArrayMode):

  • dfg/DFGNodeType.h:

(JSC::DFG::isAtomicsIntrinsic):
(JSC::DFG::numExtraAtomicsArgs):

  • dfg/DFGPredictionPropagationPhase.cpp:
  • dfg/DFGSSALoweringPhase.cpp:

(JSC::DFG::SSALoweringPhase::handleNode):

  • dfg/DFGSafeToExecute.h:

(JSC::DFG::safeToExecute):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::loadFromIntTypedArray):
(JSC::DFG::SpeculativeJIT::setIntTypedArrayLoadResult):
(JSC::DFG::SpeculativeJIT::compileGetByValOnIntTypedArray):
(JSC::DFG::SpeculativeJIT::getIntTypedArrayStoreOperand):
(JSC::DFG::SpeculativeJIT::compilePutByValForIntTypedArray):

  • dfg/DFGSpeculativeJIT.h:

(JSC::DFG::SpeculativeJIT::callOperation):

  • dfg/DFGSpeculativeJIT32_64.cpp:

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

  • dfg/DFGSpeculativeJIT64.cpp:

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

  • ftl/FTLAbstractHeapRepository.cpp:

(JSC::FTL::AbstractHeapRepository::decorateFencedAccess):
(JSC::FTL::AbstractHeapRepository::computeRangesAndDecorateInstructions):

  • ftl/FTLAbstractHeapRepository.h:
  • ftl/FTLCapabilities.cpp:

(JSC::FTL::canCompile):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileNode):
(JSC::FTL::DFG::LowerDFGToB3::compileAtomicsReadModifyWrite):
(JSC::FTL::DFG::LowerDFGToB3::compileAtomicsIsLockFree):
(JSC::FTL::DFG::LowerDFGToB3::compileGetByVal):
(JSC::FTL::DFG::LowerDFGToB3::compilePutByVal):
(JSC::FTL::DFG::LowerDFGToB3::pointerIntoTypedArray):
(JSC::FTL::DFG::LowerDFGToB3::loadFromIntTypedArray):
(JSC::FTL::DFG::LowerDFGToB3::storeType):
(JSC::FTL::DFG::LowerDFGToB3::setIntTypedArrayLoadResult):
(JSC::FTL::DFG::LowerDFGToB3::getIntTypedArrayStoreOperand):
(JSC::FTL::DFG::LowerDFGToB3::vmCall):

  • ftl/FTLOutput.cpp:

(JSC::FTL::Output::store):
(JSC::FTL::Output::store32As8):
(JSC::FTL::Output::store32As16):
(JSC::FTL::Output::atomicXchgAdd):
(JSC::FTL::Output::atomicXchgAnd):
(JSC::FTL::Output::atomicXchgOr):
(JSC::FTL::Output::atomicXchgSub):
(JSC::FTL::Output::atomicXchgXor):
(JSC::FTL::Output::atomicXchg):
(JSC::FTL::Output::atomicStrongCAS):

  • ftl/FTLOutput.h:

(JSC::FTL::Output::store32):
(JSC::FTL::Output::store64):
(JSC::FTL::Output::storePtr):
(JSC::FTL::Output::storeFloat):
(JSC::FTL::Output::storeDouble):

  • jit/JITOperations.h:
  • runtime/AtomicsObject.cpp:

(JSC::atomicsFuncAdd):
(JSC::atomicsFuncAnd):
(JSC::atomicsFuncCompareExchange):
(JSC::atomicsFuncExchange):
(JSC::atomicsFuncIsLockFree):
(JSC::atomicsFuncLoad):
(JSC::atomicsFuncOr):
(JSC::atomicsFuncStore):
(JSC::atomicsFuncSub):
(JSC::atomicsFuncWait):
(JSC::atomicsFuncWake):
(JSC::atomicsFuncXor):
(JSC::operationAtomicsAdd):
(JSC::operationAtomicsAnd):
(JSC::operationAtomicsCompareExchange):
(JSC::operationAtomicsExchange):
(JSC::operationAtomicsIsLockFree):
(JSC::operationAtomicsLoad):
(JSC::operationAtomicsOr):
(JSC::operationAtomicsStore):
(JSC::operationAtomicsSub):
(JSC::operationAtomicsXor):

  • runtime/AtomicsObject.h:

Source/WTF:

Made small changes as part of benchmarking the JS versions of these locks.

  • benchmarks/LockSpeedTest.cpp:
  • benchmarks/ToyLocks.h:
  • wtf/Range.h:

(WTF::Range::dump):

LayoutTests:

Add a test of futex performance.

  • workers/sab/cascade_lock-worker.js: Added.

(onmessage):

  • workers/sab/cascade_lock.html: Added.
  • workers/sab/worker-resources.js:

(cascadeLockSlow):
(cascadeLock):
(cascadeUnlock):

10:53 AM Changeset in webkit [215564] by jonlee@apple.com
  • 8 edits in trunk

Update pip placard to "picture in picture"
https://bugs.webkit.org/show_bug.cgi?id=171036
rdar://problem/30201536

Reviewed by Antoine Quint.

Source/WebCore:

Updated media/modern-media-controls/pip-placard/pip-placard.html

Update the text shown with the picture in picture placard.

  • English.lproj/mediaControlsLocalizedStrings.js:
  • English.lproj/modern-media-controls-localized-strings.js:
  • Modules/mediacontrols/mediaControlsApple.js:

(Controller.prototype.updatePictureInPicturePlaceholder):

  • Modules/modern-media-controls/controls/pip-placard.js:

(PiPPlacard):

LayoutTests:

  • media/modern-media-controls/pip-placard/pip-placard-expected.txt: Updated expected results.
  • media/modern-media-controls/pip-placard/pip-placard.html:
10:49 AM Changeset in webkit [215563] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Mark two crypto/subtle/ecdsa LayoutTests as flaky.
https://bugs.webkit.org/show_bug.cgi?id=171059

Unreviewed test gardening.

10:49 AM Changeset in webkit [215562] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Mark memory/memory-pressure-simulation.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=170629

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
9:46 AM Changeset in webkit [215561] by clopez@igalia.com
  • 2 edits in trunk/LayoutTests

[GTK] Update layout tests expectations after r215556
https://bugs.webkit.org/show_bug.cgi?id=170942

Unreviewed gardening.

  • platform/gtk/TestExpectations:
9:16 AM Changeset in webkit [215560] by dewei_zhu@apple.com
  • 2 edits in trunk/Source/WebKit/mac

Build fix to start using C++14.
https://bugs.webkit.org/show_bug.cgi?id=171038

Reviewed by Alex Christensen.

Use 'c++14' instead of 'c++11' in order to use 'auto' in lambda.

  • Configurations/WebKitLegacy.xcconfig:
8:55 AM Changeset in webkit [215559] by bfulgham@apple.com
  • 2 edits in trunk/Source/WebKit2

[WK2][macOS] Allow iokit-get-properties for IOAudioControlValue
https://bugs.webkit.org/show_bug.cgi?id=171020
<rdar://problem/30878974>

Reviewed by Alexey Proskuryakov.

  • WebProcess/com.apple.WebProcess.sb.in: Add missing property name.
8:48 AM Changeset in webkit [215558] by commit-queue@webkit.org
  • 7 edits
    2 adds in trunk

RTCPeerConnection is stopping its backend twice sometimes
https://bugs.webkit.org/show_bug.cgi?id=171043

Patch by Youenn Fablet <youenn@apple.com> on 2017-04-20
Reviewed by Eric Carlson.

Source/WebCore:

Test: webrtc/closing-peerconnection.html

Making sure we stop the backend only once.
Adding an internals API to close the peer connection so as to replicate frame disconnection.

  • Modules/mediastream/RTCPeerConnection.cpp:

(WebCore::RTCPeerConnection::doClose):
(WebCore::RTCPeerConnection::doStop):

  • Modules/mediastream/RTCPeerConnection.h:
  • testing/Internals.cpp:

(WebCore::Internals::stopPeerConnection):

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

LayoutTests:

  • webrtc/closing-peerconnection-expected.txt: Added.
  • webrtc/closing-peerconnection.html: Added.
5:57 AM Changeset in webkit [215557] by antti@apple.com
  • 2 edits in trunk/Source/WebCore

Increase large animation cutoff
https://bugs.webkit.org/show_bug.cgi?id=171051
<rdar://problem/31731532>

Reviewed by Andreas Kling.

We currently switch to per-frame decoding if the animation is larger than 5MB. This is very
power-inefficient and such animations are now common. The cutoff originates from 2007 (r20069),
it is time update it.

Note that the normal low memory handling will still kill animation frames as needed.

  • platform/graphics/BitmapImage.h:

Increase cutoff to 30MB. This is enough (with some room to spare) for animations on current
tumblr.com/search/aww.

Also remove the separate cutoff value for iOS.

3:24 AM Changeset in webkit [215556] by commit-queue@webkit.org
  • 3 edits
    1 delete in trunk/Tools

[GTK][jhbuild] Update glib and glib-networking to the latest stable versions
https://bugs.webkit.org/show_bug.cgi?id=170942

Patch by Xan Lopez <xlopez@igalia.com> on 2017-04-20
Reviewed by Carlos Garcia Campos.

Update glib and glib-networking to the last stable releases. This
is needed to get working TLS certificate verification at all at
least in Fedora.

  • gtk/install-dependencies: add libmount, needed for newer glib.
  • gtk/jhbuild.modules: update glib and glib-networking to last

stable releases.

2:02 AM Changeset in webkit [215555] by zandobersek@gmail.com
  • 2 edits in trunk/Source/WebCore

Register missing AES_CTR, ECDSA and HKDF algorithms in
GCrypt's CryptoAlgorithmRegistry implementation.

Rubber-stamped by Carlos Alberto Lopez Perez.

  • crypto/gcrypt/CryptoAlgorithmRegistryGCrypt.cpp:

(WebCore::CryptoAlgorithmRegistry::platformRegisterAlgorithms):

1:48 AM Changeset in webkit [215554] by jdiggs@igalia.com
  • 19 edits in trunk

[ATK] Implement support for DPub ARIA roles
https://bugs.webkit.org/show_bug.cgi?id=170679

Reviewed by Chris Fleizach.

Source/WebCore:

Create two new WebCore AccessibilityRole values: TextGroup and ApplicationTextGroup.
These roles make it possible for platforms to distinguish groups which are primarily
intended to display textual content from groups which are primarily intended to hold
user-interface objects. Use these roles to fix the ATK mapping of DPub's groups, which
should be exposed as ATK_ROLE_SECTION; not ATK_ROLE_PANEL.

Modify the following WebCore AccessibilityRole mappings:

  • doc-abstract changed to ApplicationTextGroupRole because this DPub ARIA role does not subclass the ARIA landmark role
  • doc-biblioentry and doc-endnote changed to ListItemRole, because these DPub ARIA roles subclass the ARIA listitem role
  • doc-notice and doc-tip changed to DocumentNoteRole because these DPub ARIA roles subclass the ARIA note role
  • doc-pagebreak changed to SplitterRole because this DPub ARIA role subclasses the ARIA separator role

No new tests required: New test cases were added to xml-roles-exposed.html, and
the platform expectations for roles-exposed.html were updated to reflect the
correct mappings.

  • accessibility/AccessibilityList.cpp:

(WebCore::AccessibilityList::determineAccessibilityRole):

  • accessibility/AccessibilityNodeObject.cpp:

(WebCore::AccessibilityNodeObject::isGroup):
(WebCore::AccessibilityNodeObject::helpText):

  • accessibility/AccessibilityObject.cpp:

(WebCore::AccessibilityObject::ariaTreeItemContent):
(WebCore::initializeRoleMap):
(WebCore::AccessibilityObject::computedRoleString):

  • accessibility/AccessibilityObject.h:
  • accessibility/AccessibilityRenderObject.cpp:

(WebCore::AccessibilityRenderObject::helpText):
(WebCore::AccessibilityRenderObject::shouldFocusActiveDescendant):
(WebCore::AccessibilityRenderObject::determineAccessibilityRole):

  • accessibility/atk/WebKitAccessibleWrapperAtk.cpp:

(webkitAccessibleGetAttributes):
(atkRole):
(roleIsTextType):

  • accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:

(-[WebAccessibilityObjectWrapper determineIsAccessibilityElement]):
(-[WebAccessibilityObjectWrapper containsUnnaturallySegmentedChildren]):

  • accessibility/mac/WebAccessibilityObjectWrapperMac.mm:

(createAccessibilityRoleMap):
(-[WebAccessibilityObjectWrapper subrole]):

Tools:

Add DPub ARIA landmark roles to roleToString().

  • WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:

LayoutTests:

Update tests and expectations to reflect the modified WebCore Accessibility
role mappings, and the corresponding changes for the platforms.

  • accessibility/gtk/xml-roles-exposed-expected.txt:
  • accessibility/gtk/xml-roles-exposed.html:
  • accessibility/roles-exposed.html:
  • inspector/dom/getAccessibilityPropertiesForNode-expected.txt:
  • platform/gtk/TestExpectations:
  • platform/gtk/accessibility/roles-exposed-expected.txt:
  • platform/mac/accessibility/roles-exposed-expected.txt:

Apr 19, 2017:

11:26 PM Changeset in webkit [215553] by mcatanzaro@igalia.com
  • 3 edits in trunk/Source/ThirdParty

[GTK] ../../Source/ThirdParty/xdgmime/src/xdgmimecache.c:200:62: warning: pointer of type ‘void *’ used in arithmetic [-Wpointer-arith]
https://bugs.webkit.org/show_bug.cgi?id=171026

Reviewed by Carlos Garcia Campos.

  • xdgmime/README.webkit:
  • xdgmime/src/xdgmimecache.c:

(cache_magic_matchlet_compare_to_data):

10:26 PM Changeset in webkit [215552] by commit-queue@webkit.org
  • 6 edits in trunk

Remove WebKitTestRunner code for enabling features that are already enabled by default
https://bugs.webkit.org/show_bug.cgi?id=171033

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2017-04-19
Reviewed by Ryosuke Niwa.

Source/WebKit2:

  • WebProcess/InjectedBundle/InjectedBundle.cpp:

(WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):

Tools:

  • WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:

(WTR::InjectedBundle::beginTesting):

  • WebKitTestRunner/InjectedBundle/TestRunner.cpp:

(WTR::TestRunner::setShadowDOMEnabled): Deleted.
(WTR::TestRunner::setCustomElementsEnabled): Deleted.
(WTR::TestRunner::setFetchAPIEnabled): Deleted.
(WTR::TestRunner::setDownloadAttributeEnabled): Deleted.

  • WebKitTestRunner/InjectedBundle/TestRunner.h:
9:36 PM Changeset in webkit [215551] by bfulgham@apple.com
  • 4 edits in trunk/Source/WebKit/win

[Win] REGRESSION(r215486): Windows Release build is broken
https://bugs.webkit.org/show_bug.cgi?id=171024
<rdar://problem/31722618>

Reviewed by Mark Lam.

Windows WebKit refers to a handful of JSC methods that are always
inline. We need to include 'HeapInlines.h' to get the implementation
of these methods.

  • Plugins/PluginPackage.cpp:
  • WebFrame.cpp:
  • WebView.cpp:
8:40 PM Changeset in webkit [215550] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Mark imported/w3c/web-platform-tests/WebCryptoAPI/derive_bits_keys/hkdf.worker.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=170907

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
8:40 PM Changeset in webkit [215549] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Rebaseline imported/w3c/web-platform-tests/html/dom/reflection-embedded.html.

Unreviewed test gardening.

  • platform/ios-wk2/imported/w3c/web-platform-tests/html/dom/reflection-embedded-expected.txt:
8:08 PM Changeset in webkit [215548] by commit-queue@webkit.org
  • 18 edits
    2 copies in trunk

[Mac] Allow customizing H264 encoder
https://bugs.webkit.org/show_bug.cgi?id=170829

Patch by Youenn Fablet <youenn@apple.com> on 2017-04-19
Reviewed by Alex Christensen.

Source/JavaScriptCore:

  • Configurations/FeatureDefines.xcconfig:

Source/ThirdParty/libwebrtc:

  • Configurations/libwebrtc.xcconfig:
  • Source/webrtc/sdk/objc/Framework/Classes/h264_video_toolbox_encoder.h:
  • Source/webrtc/sdk/objc/Framework/Classes/h264_video_toolbox_encoder.mm:

(webrtc::H264VideoToolboxEncoder::ResetCompressionSession):
(webrtc::H264VideoToolboxEncoder::CreateCompressionSession): Default implementation, fixing memory leak for dictionary.

  • Source/webrtc/sdk/objc/Framework/Classes/videotoolboxvideocodecfactory.cc:

Source/WebCore:

Using WebKitAdditions CreateCompressionSession if available.

  • Configurations/FeatureDefines.xcconfig:
  • WebCore.xcodeproj/project.pbxproj:
  • platform/mediastream/libwebrtc/H264VideoToolBoxEncoder.h: Added.
  • platform/mediastream/libwebrtc/H264VideoToolBoxEncoder.mm: Added.

(WebCore::H264VideoToolboxEncoder::CreateCompressionSession):

  • platform/mediastream/libwebrtc/VideoToolBoxEncoderFactory.cpp:

(WebCore::VideoToolboxVideoEncoderFactory::CreateSupportedVideoEncoder):

Source/WebCore/PAL:

  • Configurations/FeatureDefines.xcconfig:

Source/WebKit/mac:

  • Configurations/FeatureDefines.xcconfig:

Source/WebKit2:

  • Configurations/FeatureDefines.xcconfig:
  • WebKit2.xcodeproj/project.pbxproj:

Tools:

  • TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
7:29 PM Changeset in webkit [215547] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Mark imported/w3c/web-platform-tests/XMLHttpRequest/getallresponseheaders-cl.htm as failing.
https://bugs.webkit.org/show_bug.cgi?id=171031

Unreviewed test gardening.

5:53 PM Changeset in webkit [215546] by eric.carlson@apple.com
  • 3 edits in trunk/Source/WebCore

Another deadlock in CoreAudioCaptureSource
https://bugs.webkit.org/show_bug.cgi?id=171001

Fix another regression introduced by r215201, plus make changes suggested
in the review of 170771.

Reviewed by Youenn Fablet.

  • platform/mediastream/mac/CoreAudioCaptureSource.cpp:

(WebCore::CoreAudioCaptureSource::configureSpeakerProc): Assert if the lock is no held.
(WebCore::CoreAudioCaptureSource::provideSpeakerData): Don't reset the buffer.
(WebCore::CoreAudioCaptureSource::processMicrophoneSamples): Take the state lock. Don't
reset the buffer. No more microphone callbacks.
(WebCore::CoreAudioCaptureSource::stopProducingData): Return early if the io unit isn't
running. Drop the lock before calling setMuted to avoid another deadlock.
(WebCore::CoreAudioCaptureSource::addMicrophoneDataConsumer): Deleted.
(WebCore::CoreAudioCaptureSource::removeMicrophoneDataConsumer): Deleted.

  • platform/mediastream/mac/CoreAudioCaptureSource.h:
5:43 PM Changeset in webkit [215545] by beidson@apple.com
  • 10 edits in trunk

Add asynchronous equivalent of -[<WKUIDelegate> webView:createWebViewWithConfiguration:...].
<rdar://problem/30699851> and https://bugs.webkit.org/show_bug.cgi?id=171018

Reviewed by Tim Horton.

Source/WebKit2:

  • UIProcess/API/APIUIClient.h:

(API::UIClient::createNewPageAsync):

  • UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
  • UIProcess/Cocoa/UIDelegate.h:
  • UIProcess/Cocoa/UIDelegate.mm:

(WebKit::UIDelegate::setDelegate):
(WebKit::UIDelegate::UIClient::createNewPageCommon):
(WebKit::UIDelegate::UIClient::createNewPage):
(WebKit::UIDelegate::UIClient::createNewPageAsync):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::createNewPage):

  • UIProcess/WebPageProxy.h:
  • UIProcess/WebPageProxy.messages.in:

Tools:

  • TestWebKitAPI/Tests/WebKit2Cocoa/OpenAndCloseWindow.mm:

(TEST):
(-[OpenAndCloseWindowUIDelegateAsync webView:createWebViewWithConfiguration:forNavigationAction:windowFeatures:]):
(-[OpenAndCloseWindowUIDelegateAsync _webView:createWebViewWithConfiguration:forNavigationAction:windowFeatures:completionHandler:]):

4:48 PM Changeset in webkit [215544] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WTF

[Win] Activate streams API by default
https://bugs.webkit.org/show_bug.cgi?id=171000

Patch by Youenn Fablet <youenn@apple.com> on 2017-04-19
Reviewed by Brent Fulgham.

  • wtf/FeatureDefines.h:
4:41 PM Changeset in webkit [215543] by nvasilyev@apple.com
  • 2 edits in trunk/Source/WebInspectorUI

REGRESSION (r209882): Web Inspector: Console's filter bar has text search field, but the next/previous buttons don't do anything
https://bugs.webkit.org/show_bug.cgi?id=170556
<rdar://problem/31481755>

Reviewed by Matt Baker.

  • UserInterface/Views/LogContentView.js:

(WebInspector.LogContentView.prototype.performSearch):
Update numberOfResults setter, which sets "disabled" attribute to false when numberOfResults > 0.

4:38 PM Changeset in webkit [215542] by Ryan Haddad
  • 3 edits
    4 deletes in trunk/LayoutTests

Remove two tests after r215515.
https://bugs.webkit.org/show_bug.cgi?id=171014

Unreviewed test gardening.

LayoutTests/imported/w3c:

  • web-platform-tests/fetch/api/basic/scheme-about.worker-expected.txt: Removed.
  • web-platform-tests/fetch/api/basic/scheme-about.worker.html: Removed.
  • web-platform-tests/user-timing/clear_one_measure.worker-expected.txt: Removed.
  • web-platform-tests/user-timing/clear_one_measure.worker.html: Removed.

LayoutTests:

4:30 PM Changeset in webkit [215541] by andersca@apple.com
  • 21 edits in trunk/Source

Stop using deprecated APIs, part 3
https://bugs.webkit.org/show_bug.cgi?id=171003
rdar://problem/31589635
Source/WebCore:

rdar://problem/31589635

Reviewed by Tim Horton.

  • Modules/applepay/ApplePaySession.cpp:

(WebCore::convertAndValidate):
The status member variable has been removed from ApplePayShippingMethodUpdate.

(WebCore::ApplePaySession::completeShippingMethodSelection):
If status is not STATUS_SUCCESS, cancel the payment session.

(WebCore::ApplePaySession::canSuspendForDocumentSuspension):
(WebCore::ApplePaySession::canBegin):
(WebCore::ApplePaySession::canAbort):
(WebCore::ApplePaySession::canCancel):
(WebCore::ApplePaySession::canCompleteShippingMethodSelection):
(WebCore::ApplePaySession::canCompleteShippingContactSelection):
(WebCore::ApplePaySession::canCompletePaymentMethodSelection):
(WebCore::ApplePaySession::canCompletePayment):
(WebCore::ApplePaySession::isFinalState):
Add State::CancelRequested.

  • Modules/applepay/ApplePayShippingMethodUpdate.h:
  • Modules/applepay/ApplePayShippingMethodUpdate.idl:

Remove status.

  • Modules/applepay/PaymentCoordinator.cpp:

(WebCore::PaymentCoordinator::cancelPaymentSession):
Call through to the client.

  • Modules/applepay/PaymentCoordinator.h:
  • Modules/applepay/PaymentCoordinatorClient.h:

Add cancelPaymentSession().

  • Modules/applepay/PaymentRequest.h:

Remove status.

  • loader/EmptyClients.cpp:

Add new client member function.

Source/WebKit/mac:

Reviewed by Tim Horton.

  • WebCoreSupport/WebPaymentCoordinatorClient.h:
  • WebCoreSupport/WebPaymentCoordinatorClient.mm:

(WebPaymentCoordinatorClient::cancelPaymentSession):
Update for WebCore changes.

Source/WebKit2:

Reviewed by Tim Horton.

  • Shared/Cocoa/WebCoreArgumentCodersCocoa.mm:

(IPC::ArgumentCoder<WebCore::ShippingMethodUpdate>::encode):
(IPC::ArgumentCoder<WebCore::ShippingMethodUpdate>::decode):
Don't encode/decode status.

  • UIProcess/ApplePay/WebPaymentCoordinatorProxy.cpp:

(WebKit::WebPaymentCoordinatorProxy::cancelPaymentSession):
Hide the UI and report back.

  • UIProcess/ApplePay/WebPaymentCoordinatorProxy.h:

Add new member.

  • UIProcess/ApplePay/WebPaymentCoordinatorProxy.messages.in:

Add new message.

  • UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:

(WebKit::WebPaymentCoordinatorProxy::platformCompleteShippingMethodSelection):
Always pass success in the old code path. Stop using the deprecated method.

  • WebProcess/ApplePay/WebPaymentCoordinator.cpp:

(WebKit::WebPaymentCoordinator::cancelPaymentSession):
Send a message to the UI process.

  • WebProcess/ApplePay/WebPaymentCoordinator.h:

Add new member.

4:27 PM Changeset in webkit [215540] by Ryan Haddad
  • 12 edits in trunk/LayoutTests

Rebaseline tests after r215515.
https://bugs.webkit.org/show_bug.cgi?id=171014

Unreviewed test gardening.

LayoutTests/imported/w3c:

  • web-platform-tests/XMLHttpRequest/getallresponseheaders-cl-expected.txt:
  • web-platform-tests/fetch/api/redirect/redirect-count-expected.txt:
  • web-platform-tests/fetch/api/redirect/redirect-count-worker-expected.txt:
  • web-platform-tests/fetch/api/redirect/redirect-location-expected.txt:
  • web-platform-tests/fetch/api/redirect/redirect-location-worker-expected.txt:
  • web-platform-tests/html/webappapis/timers/negative-settimeout-expected.txt:

LayoutTests:

  • TestExpectations:
  • platform/ios-wk2/imported/w3c/web-platform-tests/html/dom/reflection-embedded-expected.txt:
  • platform/ios/imported/w3c/web-platform-tests/html/browsers/browsing-the-web/history-traversal/persisted-user-state-restoration/scroll-restoration-fragment-scrolling-cross-origin-expected.txt:
  • platform/ios/imported/w3c/web-platform-tests/html/dom/reflection-embedded-expected.txt:
4:23 PM Changeset in webkit [215539] by msaboff@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Tune GC related JSC options for iOS
https://bugs.webkit.org/show_bug.cgi?id=171019

Reviewed by Mark Lam.

Always set these GC options on iOS.

  • runtime/Options.cpp:

(JSC::overrideDefaults):

4:21 PM Changeset in webkit [215538] by ddkilzer@apple.com
  • 2 edits in trunk/Source/WTF

Vector.h: error: 'auto' not allowed in lambda parameter
<https://webkit.org/b/171010>
<rdar://problem/31716076>

Reviewed by Saam Barati.

  • wtf/Vector.h:

(WTF::removeRepeatedElements): Replace 'auto' with a specific
type, 'T', based on a Vector<> template type.

4:13 PM Changeset in webkit [215537] by eric.carlson@apple.com
  • 12 edits in trunk/Source

[MediaStream] Limit capture to one tab at a time
https://bugs.webkit.org/show_bug.cgi?id=171009

Reviewed by Jon Lee.

Source/WebCore:

No new tests yet, filed bug 171011.

  • Modules/mediastream/MediaStreamTrack.cpp:

(WebCore::MediaStreamTrack::stopTrack): Drive-by fix: renamed from stopProducingData
because stopProducingData is a method in RealtimeMediaSource that does something different.
(WebCore::MediaStreamTrack::stop): Call stopTrack.
(WebCore::MediaStreamTrack::stopProducingData): Deleted.

  • Modules/mediastream/MediaStreamTrack.h:
  • Modules/mediastream/MediaStreamTrack.idl:
  • Modules/mediastream/RTCRtpSender.cpp:

(WebCore::RTCRtpSender::replaceTrack): Update for rename.

  • platform/mediastream/MediaStreamPrivate.cpp:

(WebCore::MediaStreamPrivate::muted): Drive-by fix: a track that has ended but
which is not muted will never produce data.

Source/WebKit2:

  • UIProcess/UserMediaPermissionRequestManagerProxy.cpp:

(WebKit::UserMediaPermissionRequestManagerProxy::stopCapture): Deleted, not used.

  • UIProcess/UserMediaPermissionRequestManagerProxy.h:
  • UIProcess/UserMediaProcessManager.cpp:

(WebKit::UserMediaProcessManager::willEnableMediaStreamInPage): Mute media streams
on other pages.
(WebKit::UserMediaProcessManager::willCreateMediaStream): Call willEnableMediaStreamInPage.

  • UIProcess/UserMediaProcessManager.h:
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::setMuted): If media streams in the page will be unmuted, call
willEnableMediaStreamInPage so streams in other pages are muted first.

3:43 PM Changeset in webkit [215536] by beidson@apple.com
  • 6 edits
    1 add in trunk

REGRESSION (r213168): An extra Web Content process is spun up on launch and is never closed.
<rdar://problem/30774839> and https://bugs.webkit.org/show_bug.cgi?id=171002

Reviewed by Alex Christensen.

Source/WebKit2:

The original change unnecessarily avoided using the initial warmed process if an explicit
data store was set on the new WKWebView.

Fixing that fixes the regression.

  • UIProcess/API/Cocoa/WKProcessPool.mm:

(-[WKProcessPool _webProcessCount]):

  • UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::createWebPage):

Tools:

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKit2Cocoa/InitialWarmedProcessUsed.mm: Added.
3:27 PM Changeset in webkit [215535] by achristensen@apple.com
  • 3 edits
    2 adds in trunk

Parsing large XML strings fails
https://bugs.webkit.org/show_bug.cgi?id=170999
<rdar://problem/17336267>

Reviewed by Brady Eidson.

Source/WebCore:

Test: fast/dom/xml-large.html

  • xml/parser/XMLDocumentParserLibxml2.cpp:

(WebCore::XMLParserContext::createStringParser):
(WebCore::XMLParserContext::createMemoryParser):
Allow huge XML strings. They work fine in Chrome and Firefox.

LayoutTests:

  • fast/dom/xml-large-expected.txt: Added.
  • fast/dom/xml-large.html: Added.
3:06 PM Changeset in webkit [215534] by Ryan Haddad
  • 4 edits
    1 delete in trunk/Source/WTF

Unreviewed, rolling out r215518.

This change appears to have broken the Windows build.

Reverted changeset:

"Move notFound into its own file"
https://bugs.webkit.org/show_bug.cgi?id=170972
http://trac.webkit.org/changeset/215518

3:05 PM Changeset in webkit [215533] by jfbastien@apple.com
  • 12 edits in trunk/Source/JavaScriptCore

WebAssembly: fast memory cleanups
https://bugs.webkit.org/show_bug.cgi?id=170909

Reviewed by Saam Barati.

  • b3/B3LowerToAir.cpp: correct comment, and make wasm-independent

(JSC::B3::Air::LowerToAir::lower):

  • b3/B3Procedure.h:
  • b3/B3Validate.cpp:
  • b3/B3Value.cpp:

(JSC::B3::Value::effects):

  • b3/B3WasmBoundsCheckValue.cpp: have the creator pass in a

maximum, so we don't have to know so much about wasm here
(JSC::B3::WasmBoundsCheckValue::WasmBoundsCheckValue):
(JSC::B3::WasmBoundsCheckValue::cloneImpl):
(JSC::B3::WasmBoundsCheckValue::dumpMeta):

  • b3/B3WasmBoundsCheckValue.h:

(JSC::B3::WasmBoundsCheckValue::boundsType):
(JSC::B3::WasmBoundsCheckValue::bounds):

  • b3/air/AirCode.h:
  • b3/air/AirCustom.h:

(JSC::B3::Air::WasmBoundsCheckCustom::generate):

  • b3/testb3.cpp:

(JSC::B3::testWasmBoundsCheck):

  • wasm/WasmB3IRGenerator.cpp:

(JSC::Wasm::B3IRGenerator::B3IRGenerator):
(JSC::Wasm::B3IRGenerator::emitCheckAndPreparePointer):
(JSC::Wasm::createJSToWasmWrapper): remove dead code

  • wasm/WasmMemory.cpp: don't GC if no memory could possibly be free'd

(JSC::Wasm::Memory::initializePreallocations): verbose-only code,
and copy-pasta bug

2:58 PM Changeset in webkit [215532] by cfleizach@apple.com
  • 7 edits in trunk

AX: <hr> should use a different role description than interactive separators
https://bugs.webkit.org/show_bug.cgi?id=170317
<rdar://problem/31363024>

Reviewed by Joanmarie Diggs.

Source/WebCore:

Users are confused with WebKit's accessibility description of separators.
We should call these what they are, horizontal rules.

Updated test: accessibility/mac/hr-element-expected.txt

  • English.lproj/Localizable.strings:
  • accessibility/AccessibilityRenderObject.cpp:

(WebCore::AccessibilityRenderObject::orientation):

  • platform/cocoa/LocalizedStringsCocoa.mm:

(WebCore::AXHorizontalRuleDescriptionText):

LayoutTests:

  • accessibility/mac/hr-element-expected.txt:
  • accessibility/mac/hr-element.html:
2:51 PM Changeset in webkit [215531] by mark.lam@apple.com
  • 6 edits
    1 add in trunk

B3StackmapSpecial should handle when stackmap values are not recoverable from a Def'ed arg.
https://bugs.webkit.org/show_bug.cgi?id=170973
<rdar://problem/30318657>

Reviewed by Filip Pizlo.

JSTests:

  • stress/regress-170973.js: Added.

Source/JavaScriptCore:

In the event of an arithmetic overflow on a binary sub instruction (where the
result register is same as one of the operand registers), the CheckSub FTL
operation will try to recover the original value in the clobbered result register.

This recover is done by adding the other operand value to the result register.
However, this recovery method only works if the width of the original value in
the result register is less or equal to the width of the expected result. If the
width of the original operand value (e.g. a JSInt32) is wider than the result
(e.g. a machine Int32), then the sub operation would have zero extended the
result and cleared the upper 32-bits of the result register. Recovery by adding
back the other operand will not restore the JSValue tag in the upper word.

This poses a problem if the stackmap value for the operand relies on that same
clobbered register.

The fix is to detect this potential scenario (i.e. width of the Def's arg < width
of a stackmap value). If this condition is detected, we'll declare the stackmap
value to be LateColdUse to ensure that the register allocator gives it a
different register if needed so that it's not dependent on the clobbered register.

  • b3/B3CheckSpecial.cpp:

(JSC::B3::CheckSpecial::forEachArg):

  • b3/B3PatchpointSpecial.cpp:

(JSC::B3::PatchpointSpecial::forEachArg):

  • b3/B3StackmapSpecial.cpp:

(JSC::B3::StackmapSpecial::forEachArgImpl):

  • b3/B3StackmapSpecial.h:
2:30 PM Changeset in webkit [215530] by andersca@apple.com
  • 12 edits in trunk/Source

Rename cancelPayment to cancelPaymentSession
https://bugs.webkit.org/show_bug.cgi?id=171007

Reviewed by Tim Horton.

Source/WebCore:

  • Modules/applepay/ApplePaySession.cpp:

(WebCore::ApplePaySession::didCancelPaymentSession):
(WebCore::ApplePaySession::didCancelPayment): Deleted.

  • Modules/applepay/ApplePaySession.h:
  • Modules/applepay/PaymentCoordinator.cpp:

(WebCore::PaymentCoordinator::didCancelPaymentSession):
(WebCore::PaymentCoordinator::didCancelPayment): Deleted.

  • Modules/applepay/PaymentCoordinator.h:

Source/WebKit2:

  • UIProcess/ApplePay/WebPaymentCoordinatorProxy.cpp:

(WebKit::WebPaymentCoordinatorProxy::showPaymentUI):
(WebKit::WebPaymentCoordinatorProxy::didCancelPaymentSession):
(WebKit::WebPaymentCoordinatorProxy::didCancelPayment): Deleted.

  • UIProcess/ApplePay/WebPaymentCoordinatorProxy.h:
  • UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:

(-[WKPaymentAuthorizationViewControllerDelegate paymentAuthorizationViewControllerDidFinish:]):

  • WebProcess/ApplePay/WebPaymentCoordinator.cpp:

(WebKit::WebPaymentCoordinator::didCancelPaymentSession):
(WebKit::WebPaymentCoordinator::didCancelPayment): Deleted.

  • WebProcess/ApplePay/WebPaymentCoordinator.h:
  • WebProcess/ApplePay/WebPaymentCoordinator.messages.in:
2:00 PM Changeset in webkit [215529] by mitz@apple.com
  • 8 copies
    1 add in releases/Apple/Safari Technology Preview 28

Added a tag for Safari Technology Preview release 28.

1:22 PM Changeset in webkit [215528] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebCore

ASAN Crash running LayoutTests/inspector/worker tests
https://bugs.webkit.org/show_bug.cgi?id=170967
<rdar://problem/31256437>

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2017-04-19
Reviewed by Alex Christensen.

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

(WebCore::WorkerMessagingProxy::WorkerMessagingProxy):
(WebCore::WorkerMessagingProxy::workerGlobalScopeDestroyedInternal):
Make the MessagingProxy thread safe ref counted. Since it used to
delete itself, turn this into a ref (implicit on construction)
and deref (replacing delete this).

(WebCore::WorkerMessagingProxy::postMessageToPageInspector):
When dispatching have the lambda implicitly ref/deref with the
lambda to keep the proxy alive while a lambda is queued.

1:20 PM Changeset in webkit [215527] by Ryan Haddad
  • 2 edits in trunk/Source/ThirdParty/ANGLE

Remove executable property from a header file.

  • include/KHR/khrplatform.h: Removed property svn:executable.
1:03 PM Changeset in webkit [215526] by jfbastien@apple.com
  • 8 edits
    1 delete in trunk

Unreviewed, rolling out r215520.

Broke Debian 8

Reverted changeset:

"[INTL] Implement Intl.DateTimeFormat.prototype.formatToParts"
https://bugs.webkit.org/show_bug.cgi?id=169458
http://trac.webkit.org/changeset/215520

12:38 PM Changeset in webkit [215525] by jfbastien@apple.com
  • 4 edits
    2 adds in trunk

WebAssembly: limit slow memories
https://bugs.webkit.org/show_bug.cgi?id=170825

Reviewed by Saam Barati.

JSTests:

  • wasm.yaml:
  • wasm/stress/oom.js: Added.

(try.true.WebAssemblyMemoryMode):
(catch):

Source/JavaScriptCore:

We limits the number of fast memories, partly because ASLR. The
code then falls back to slow memories. It first tries to virtually
allocated any declared maximum (and in there, physically the
initial), and if that fails it tries to physically allocate the
initial without any extra.

This can still be used to cause a bunch of virtual
allocation. This patch imposes soft limit on slow memories as
well. The total virtual maximum for slow memories is set at the
same (theoretical) value as that for fast memories.

Anything exceeding that limit causes allocation/grow to fail.

  • wasm/WasmMemory.cpp:
12:11 PM Changeset in webkit [215524] by bfulgham@apple.com
  • 2 edits in trunk/Tools

[WK2] Run tests with ResourceLoadStatistics enabled
https://bugs.webkit.org/show_bug.cgi?id=170952

Reviewed by Andy Estes.

Excercise the load statistics code during tests.

  • WebKitTestRunner/cocoa/TestControllerCocoa.mm:

(WTR::initializeWebViewConfiguration):

11:57 AM Changeset in webkit [215523] by commit-queue@webkit.org
  • 2 edits in trunk/Tools

close_fds should be set to False on Windows.
https://bugs.webkit.org/show_bug.cgi?id=170838

Patch by Bill Ming <mbbill@gmail.com> on 2017-04-19
Reviewed by Brent Fulgham.

  • Scripts/webkitpy/common/system/executive.py:

(Executive._should_close_fds):

11:25 AM Changeset in webkit [215522] by jfbastien@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Cannot compile JavaScriptCore/runtime/VMTraps.cpp on FreeBSD because std::pair has a non-trivial copy constructor
https://bugs.webkit.org/show_bug.cgi?id=170875

Reviewed by Mark Lam.

WTF::ExpectedDetail::ConstexprBase doesn't have a user-defined
copy constructor, and its implicitly-defined copy constructor is
deleted because the default std::pair implementation on FreeBSD
has a non-trivial copy constructor. /usr/include/c++/v1/config
says _LIBCPP_TRIVIAL_PAIR_COPY_CTOR is disabled in order to keep
ABI compatibility:
https://svnweb.freebsd.org/changeset/base/261801.

That's a huge bummer, and I'm not a fan of broken stdlibs, but in
this case it's pretty nice to have a custom named type anyways and
costs nothing.

  • runtime/VMTraps.cpp:

(JSC::findActiveVMAndStackBounds):
(JSC::handleSigusr1):
(JSC::handleSigtrap):

11:17 AM Changeset in webkit [215521] by ddkilzer@apple.com
  • 6 edits
    1 add in trunk

Stop using strcpy() in WebKit::EnvironmentUtilities::stripValuesEndingWithString()
<https://webkit.org/b/170994>
<rdar://problem/29889932>

Reviewed by Brent Fulgham.

Source/WebKit2:

  • Platform/unix/EnvironmentUtilities.cpp:

(WebKit::EnvironmentUtilities::stripValuesEndingWithString):
Switch from using strcpy() to strlcpy(). Also switch from using
strstr() to strnstr().

  • Platform/unix/EnvironmentUtilities.h: Switch to #pragma once.

(WebKit::EnvironmentUtilities::stripValuesEndingWithString):
Export function for testing.

  • WebKit2.xcodeproj/project.pbxproj:

(EnvironmentUtilitiesTest.h): Make header private for testing.

Tools:

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:

(EnvironmentUtilitiesTest.cpp): Add to TestWebKitAPILibrary
target.

  • TestWebKitAPI/Tests/WebKit2/EnvironmentUtilitiesTest.cpp: Add.

(TestWebKitAPI::strip): Helper method to set/get environment
variable for testing.
(TestWebKitAPI::WebKit2_StripValuesEndingWithString_Test): Add
tests.

11:08 AM Changeset in webkit [215520] by commit-queue@webkit.org
  • 8 edits
    1 add in trunk

[INTL] Implement Intl.DateTimeFormat.prototype.formatToParts
https://bugs.webkit.org/show_bug.cgi?id=169458

Patch by Andy VanWagoner <thetalecrafter@gmail.com> on 2017-04-19
Reviewed by JF Bastien.

Source/JavaScriptCore:

Use udat_formatForFields to iterate through the parts of a formatted date string.

  • icu/unicode/udat.h: Update to 55.1.
  • icu/unicode/ufieldpositer.h: Added from 55.1.
  • runtime/IntlDateTimeFormat.cpp:

(JSC::IntlDateTimeFormat::partTypeString): Convert UDateFormatField to string.
(JSC::IntlDateTimeFormat::formatToParts): Return parts of formatted date string.

  • runtime/IntlDateTimeFormat.h:
  • runtime/IntlDateTimeFormatPrototype.cpp:

(JSC::IntlDateTimeFormatPrototypeFuncFormatToParts): Add prototype function formatToParts.

LayoutTests:

Add tests for formatToParts

  • js/intl-datetimeformat-expected.txt:
  • js/script-tests/intl-datetimeformat.js:
11:02 AM Changeset in webkit [215519] by jfbastien@apple.com
  • 2 edits
    1 add in trunk/Tools

WebAssembly: add script which can import GCC torture tests
https://bugs.webkit.org/show_bug.cgi?id=170740

Reviewed by Saam Barati.

Add a script which can import the GCC torture tests and create a
yaml file to run them as part of jsc's WebAssembly regression
tests.

This patch doesn't commit the tests themselves because they're
licensed differently.

  • Scripts/run-jsc-stress-tests: learn how to run

Emscripten-generated .js+.wasm files, and do a bit of cleanup on
the options because WebAssembly is enabled by default.

  • Scripts/update-wasm-gcc-torture.py: Added.

(parse_args):
(update_lkgr):
(untar_torture):
(list_js_files):
(waterfall_known_failures):
(create_yaml):
(main):

10:57 AM Changeset in webkit [215518] by commit-queue@webkit.org
  • 4 edits
    1 add in trunk/Source/WTF

Move notFound into its own file
https://bugs.webkit.org/show_bug.cgi?id=170972

Patch by Sam Weinig <sam@webkit.org> on 2017-04-19
Reviewed by Zalan Bujtas.

It is odd to require including <wtf/Vector.h> just to use WTF::notFound.
This is not causing any current problems, but does in few changes I have
queued up.

  • WTF.xcodeproj/project.pbxproj:
  • wtf/NotFound.h: Added.
  • wtf/Vector.h:
  • wtf/text/StringCommon.h:
10:12 AM Changeset in webkit [215517] by jfbastien@apple.com
  • 4 edits
    2 adds in trunk

WebAssembly: don't expose any WebAssembly JS object if JIT is off
https://bugs.webkit.org/show_bug.cgi?id=170782

Reviewed by Saam Barati.

JSTests:

  • wasm.yaml:
  • wasm/noJIT/noJIT.js: Added.

Source/JavaScriptCore:

It's unexpected that we expose the global WebAssembly object if no
JIT is present because it can't be used to compile or
instantiate. Other APIs such as Memory should also be Inaccessible
in those circumstances.

Also ensure that we don't pre-allocate fast memories if
WebAssembly won't be used, and don't mark our intention to use a
fast TLS slot for WebAssembly.

  • runtime/Options.cpp:

(JSC::recomputeDependentOptions):

9:49 AM Changeset in webkit [215516] by Yusuke Suzuki
  • 5 edits in trunk/Source/JavaScriptCore

r211670 broke double to int conversion.
https://bugs.webkit.org/show_bug.cgi?id=170961

Reviewed by Mark Lam.

In this patch, we take a template parameter way.
While it reduces duplicate code, it effectively produces
optimized code for operationToInt32SensibleSlow,
and fixes kraken pbkdf2 regression on Linux.

And this patch also fixes undefined behavior by changing
int32_t to uint32_t. If exp is 31, missingOne is 1 << 31,
INT32_MIN. Thus missingOne - 1 will cause int32_t overflow,
and it is an undefined behavior.

  • runtime/MathCommon.cpp:

(JSC::operationToInt32SensibleSlow):

  • runtime/MathCommon.h:

(JSC::toInt32Internal):
(JSC::toInt32):

9:32 AM Changeset in webkit [215515] by Ryan Haddad
  • 55 edits
    4 copies
    40 moves
    1129 adds
    42 deletes in trunk

LayoutTests/imported/w3c:
Adding wpt tools

Import web-platform-tests/tools
https://bugs.webkit.org/show_bug.cgi?id=170718

Patch by Youenn Fablet <youenn@apple.com> on 2017-04-19
Reviewed by Alex Christensen.

  • resources/TestRepositories:
  • resources/import-expectations.json:
  • resources/resource-files.json:
  • resources/web-platform-tests-modules.json: Removed.
  • web-platform-tests/.gitignore:
  • web-platform-tests/XMLHttpRequest/XMLHttpRequest-withCredentials.any.worker-expected.txt: Added.
  • web-platform-tests/XMLHttpRequest/XMLHttpRequest-withCredentials.any.worker.html: Copied from LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/XMLHttpRequest-withCredentials.worker.html.
  • web-platform-tests/XMLHttpRequest/XMLHttpRequest-withCredentials.worker-expected.txt: Removed.
  • web-platform-tests/XMLHttpRequest/getallresponseheaders-cl-expected.txt:
  • web-platform-tests/XMLHttpRequest/responsetype-expected.txt:
  • web-platform-tests/XMLHttpRequest/send-usp.any.worker-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/send-usp.worker-expected.txt.
  • web-platform-tests/XMLHttpRequest/send-usp.any.worker.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/send-usp.worker.html.
  • web-platform-tests/XMLHttpRequest/send-usp.worker.js: Removed.
  • web-platform-tests/XMLHttpRequest/timeout-sync-expected.txt:
  • web-platform-tests/dom/nodes/Document-contentType/contentType/contenttype_datauri_01-expected.txt:
  • web-platform-tests/dom/nodes/Document-contentType/contentType/contenttype_datauri_02-expected.txt:
  • web-platform-tests/fetch/api/basic/accept-header.any-expected.txt:
  • web-platform-tests/fetch/api/basic/accept-header.any.worker-expected.txt: Added.
  • web-platform-tests/fetch/api/basic/accept-header.any.worker.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/accept-header.worker.html.
  • web-platform-tests/fetch/api/basic/accept-header.worker-expected.txt: Removed.
  • web-platform-tests/fetch/api/basic/mode-same-origin.any-expected.txt:
  • web-platform-tests/fetch/api/basic/mode-same-origin.any.worker-expected.txt: Added.
  • web-platform-tests/fetch/api/basic/mode-same-origin.any.worker.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/mode-same-origin.worker.html.
  • web-platform-tests/fetch/api/basic/mode-same-origin.worker-expected.txt: Removed.
  • web-platform-tests/fetch/api/basic/referrer.any-expected.txt:
  • web-platform-tests/fetch/api/basic/referrer.any.worker-expected.txt: Added.
  • web-platform-tests/fetch/api/basic/referrer.any.worker.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/referrer.worker.html.
  • web-platform-tests/fetch/api/basic/referrer.worker-expected.txt: Removed.
  • web-platform-tests/fetch/api/basic/request-forbidden-headers.any-expected.txt:
  • web-platform-tests/fetch/api/basic/request-forbidden-headers.any.worker-expected.txt: Added.
  • web-platform-tests/fetch/api/basic/request-forbidden-headers.any.worker.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/request-forbidden-headers.worker.html.
  • web-platform-tests/fetch/api/basic/request-forbidden-headers.worker-expected.txt: Removed.
  • web-platform-tests/fetch/api/basic/request-head.any.worker-expected.txt: Added.
  • web-platform-tests/fetch/api/basic/request-head.any.worker.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/request-head.worker.html.
  • web-platform-tests/fetch/api/basic/request-head.worker-expected.txt: Removed.
  • web-platform-tests/fetch/api/basic/request-headers.any-expected.txt:
  • web-platform-tests/fetch/api/basic/request-headers.any.worker-expected.txt: Added.
  • web-platform-tests/fetch/api/basic/request-headers.any.worker.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/request-headers.worker.html.
  • web-platform-tests/fetch/api/basic/request-headers.worker-expected.txt: Removed.
  • web-platform-tests/fetch/api/basic/request-referrer-redirected-worker-expected.txt:
  • web-platform-tests/fetch/api/basic/request-referrer.any-expected.txt:
  • web-platform-tests/fetch/api/basic/request-referrer.any.worker-expected.txt: Added.
  • web-platform-tests/fetch/api/basic/request-referrer.any.worker.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/request-referrer.worker.html.
  • web-platform-tests/fetch/api/basic/request-referrer.worker-expected.txt: Removed.
  • web-platform-tests/fetch/api/basic/request-upload.any-expected.txt:
  • web-platform-tests/fetch/api/basic/request-upload.any.worker-expected.txt: Added.
  • web-platform-tests/fetch/api/basic/request-upload.any.worker.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/request-upload.worker.html.
  • web-platform-tests/fetch/api/basic/request-upload.worker-expected.txt: Removed.
  • web-platform-tests/fetch/api/basic/scheme-about.any.worker-expected.txt: Added.
  • web-platform-tests/fetch/api/basic/scheme-about.any.worker.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-data.worker.html.
  • web-platform-tests/fetch/api/basic/scheme-about.worker-expected.txt:
  • web-platform-tests/fetch/api/basic/scheme-data.any.worker-expected.txt: Added.
  • web-platform-tests/fetch/api/basic/scheme-data.any.worker.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/stream-response.worker.html.
  • web-platform-tests/fetch/api/basic/scheme-data.worker-expected.txt: Removed.
  • web-platform-tests/fetch/api/basic/stream-response.any-expected.txt:
  • web-platform-tests/fetch/api/basic/stream-response.any.worker-expected.txt: Added.
  • web-platform-tests/fetch/api/basic/stream-response.any.worker.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-basic.worker.html.
  • web-platform-tests/fetch/api/basic/stream-response.worker-expected.txt: Removed.
  • web-platform-tests/fetch/api/cors/cors-basic.any-expected.txt:
  • web-platform-tests/fetch/api/cors/cors-basic.any.worker-expected.txt: Added.
  • web-platform-tests/fetch/api/cors/cors-basic.any.worker.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-cookies.worker.html.
  • web-platform-tests/fetch/api/cors/cors-basic.worker-expected.txt: Removed.
  • web-platform-tests/fetch/api/cors/cors-cookies.any-expected.txt:
  • web-platform-tests/fetch/api/cors/cors-cookies.any.worker-expected.txt: Added.
  • web-platform-tests/fetch/api/cors/cors-cookies.any.worker.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-no-preflight.worker.html.
  • web-platform-tests/fetch/api/cors/cors-cookies.worker-expected.txt: Removed.
  • web-platform-tests/fetch/api/cors/cors-no-preflight.any-expected.txt:
  • web-platform-tests/fetch/api/cors/cors-no-preflight.any.worker-expected.txt: Added.
  • web-platform-tests/fetch/api/cors/cors-no-preflight.any.worker.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-origin.worker.html.
  • web-platform-tests/fetch/api/cors/cors-no-preflight.worker-expected.txt: Removed.
  • web-platform-tests/fetch/api/cors/cors-origin.any-expected.txt:
  • web-platform-tests/fetch/api/cors/cors-origin.any.worker-expected.txt: Added.
  • web-platform-tests/fetch/api/cors/cors-origin.any.worker.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-preflight-redirect.worker.html.
  • web-platform-tests/fetch/api/cors/cors-origin.worker-expected.txt: Removed.
  • web-platform-tests/fetch/api/cors/cors-preflight-redirect.any-expected.txt:
  • web-platform-tests/fetch/api/cors/cors-preflight-redirect.any.worker-expected.txt: Added.
  • web-platform-tests/fetch/api/cors/cors-preflight-redirect.any.worker.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-preflight-referrer.worker.html.
  • web-platform-tests/fetch/api/cors/cors-preflight-redirect.worker-expected.txt: Removed.
  • web-platform-tests/fetch/api/cors/cors-preflight-referrer.any-expected.txt:
  • web-platform-tests/fetch/api/cors/cors-preflight-referrer.any.worker-expected.txt: Added.
  • web-platform-tests/fetch/api/cors/cors-preflight-referrer.any.worker.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-preflight-star.worker.html.
  • web-platform-tests/fetch/api/cors/cors-preflight-referrer.worker-expected.txt: Removed.
  • web-platform-tests/fetch/api/cors/cors-preflight-star.any-expected.txt:
  • web-platform-tests/fetch/api/cors/cors-preflight-star.any.worker-expected.txt: Added.
  • web-platform-tests/fetch/api/cors/cors-preflight-star.any.worker.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-preflight-status.worker.html.
  • web-platform-tests/fetch/api/cors/cors-preflight-star.worker-expected.txt: Removed.
  • web-platform-tests/fetch/api/cors/cors-preflight-status.any-expected.txt:
  • web-platform-tests/fetch/api/cors/cors-preflight-status.any.worker-expected.txt: Added.
  • web-platform-tests/fetch/api/cors/cors-preflight-status.any.worker.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-preflight.worker.html.
  • web-platform-tests/fetch/api/cors/cors-preflight-status.worker-expected.txt: Removed.
  • web-platform-tests/fetch/api/cors/cors-preflight.any-expected.txt:
  • web-platform-tests/fetch/api/cors/cors-preflight.any.worker-expected.txt: Added.
  • web-platform-tests/fetch/api/cors/cors-preflight.any.worker.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-redirect-credentials.worker.html.
  • web-platform-tests/fetch/api/cors/cors-preflight.worker-expected.txt: Removed.
  • web-platform-tests/fetch/api/cors/cors-redirect-credentials.any-expected.txt:
  • web-platform-tests/fetch/api/cors/cors-redirect-credentials.any.worker-expected.txt: Added.
  • web-platform-tests/fetch/api/cors/cors-redirect-credentials.any.worker.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-redirect-preflight.worker.html.
  • web-platform-tests/fetch/api/cors/cors-redirect-credentials.worker-expected.txt: Removed.
  • web-platform-tests/fetch/api/cors/cors-redirect-preflight.any-expected.txt:
  • web-platform-tests/fetch/api/cors/cors-redirect-preflight.any.worker-expected.txt: Added.
  • web-platform-tests/fetch/api/cors/cors-redirect-preflight.any.worker.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-redirect.worker.html.
  • web-platform-tests/fetch/api/cors/cors-redirect-preflight.worker-expected.txt: Removed.
  • web-platform-tests/fetch/api/cors/cors-redirect.any-expected.txt:
  • web-platform-tests/fetch/api/cors/cors-redirect.any.worker-expected.txt: Added.
  • web-platform-tests/fetch/api/cors/cors-redirect.any.worker.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/fetch/api/credentials/authentication-basic.worker.html.
  • web-platform-tests/fetch/api/cors/cors-redirect.worker-expected.txt: Removed.
  • web-platform-tests/fetch/api/credentials/authentication-basic.any-expected.txt:
  • web-platform-tests/fetch/api/credentials/authentication-basic.any.worker-expected.txt: Added.
  • web-platform-tests/fetch/api/credentials/authentication-basic.any.worker.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/fetch/api/credentials/cookies.worker.html.
  • web-platform-tests/fetch/api/credentials/authentication-basic.worker-expected.txt: Removed.
  • web-platform-tests/fetch/api/credentials/cookies.any-expected.txt:
  • web-platform-tests/fetch/api/credentials/cookies.any.worker-expected.txt: Added.
  • web-platform-tests/fetch/api/credentials/cookies.any.worker.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/fetch/api/headers/historical.worker.html.
  • web-platform-tests/fetch/api/credentials/cookies.worker-expected.txt: Removed.
  • web-platform-tests/fetch/api/headers/historical.any.worker-expected.txt: Added.
  • web-platform-tests/fetch/api/headers/historical.any.worker.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/hr-time/basic.worker.html.
  • web-platform-tests/fetch/api/headers/historical.worker-expected.txt: Removed.
  • web-platform-tests/fetch/api/redirect/redirect-count-expected.txt:
  • web-platform-tests/fetch/api/redirect/redirect-count-worker-expected.txt:
  • web-platform-tests/fetch/api/redirect/redirect-location-expected.txt:
  • web-platform-tests/fetch/api/redirect/redirect-location-worker-expected.txt:
  • web-platform-tests/fetch/api/request/request-cache-only-if-cached-expected.txt: Copied from LayoutTests/platform/mac/imported/w3c/web-platform-tests/fetch/api/request/request-cache-only-if-cached-expected.txt.
  • web-platform-tests/fetch/http-cache/partial-expected.txt:
  • web-platform-tests/hr-time/basic.any.worker-expected.txt: Added.
  • web-platform-tests/hr-time/basic.any.worker.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/hr-time/monotonic-clock.worker.html.
  • web-platform-tests/hr-time/basic.worker-expected.txt: Removed.
  • web-platform-tests/hr-time/basic.worker.js: Removed.
  • web-platform-tests/hr-time/monotonic-clock.any.worker-expected.txt: Added.
  • web-platform-tests/hr-time/monotonic-clock.any.worker.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/html/dom/self-origin.worker.html.
  • web-platform-tests/hr-time/monotonic-clock.worker-expected.txt: Removed.

Tools:
Import web-platform-tests/tools
https://bugs.webkit.org/show_bug.cgi?id=170718

Patch by Youenn Fablet <youenn@apple.com> on 2017-04-19
Reviewed by Alex Christensen.

  • Scripts/webkitpy/layout_tests/servers/web_platform_test_launcher.py:

(main):

  • Scripts/webkitpy/layout_tests/servers/web_platform_test_server.py:

(WebPlatformTestServer.ports_to_forward):
(WebPlatformTestServer._prepare_config):
(WebPlatformTestServer._install_modules): Deleted.

  • Scripts/webkitpy/w3c/test_importer.py:

(TestImporter.write_html_files_for_templated_js_tests):

LayoutTests:
Import web-platform-tests/tools
https://bugs.webkit.org/show_bug.cgi?id=170718

Patch by Youenn Fablet <youenn@apple.com> on 2017-04-19
Reviewed by Alex Christensen.

  • TestExpectations:
  • platform/mac-wk1/imported/w3c/web-platform-tests/fetch/api/cors/cors-basic.any-expected.txt: Added.
  • platform/mac-wk1/imported/w3c/web-platform-tests/fetch/api/cors/cors-basic.any.worker-expected.txt: Added.
  • platform/mac-wk1/imported/w3c/web-platform-tests/fetch/api/cors/cors-no-preflight.any-expected.txt: Added.
  • platform/mac-wk1/imported/w3c/web-platform-tests/fetch/api/cors/cors-no-preflight.any.worker-expected.txt: Added.
  • platform/mac-wk1/imported/w3c/web-platform-tests/fetch/api/cors/cors-origin.any-expected.txt: Added.
  • platform/mac-wk1/imported/w3c/web-platform-tests/fetch/api/cors/cors-origin.any.worker-expected.txt: Added.
  • platform/mac-wk1/imported/w3c/web-platform-tests/fetch/api/request/request-cache-only-if-cached-expected.txt: Renamed from LayoutTests/platform/mac/imported/w3c/web-platform-tests/fetch/api/request/request-cache-only-if-cached-expected.txt.
  • tests-options.json:
9:17 AM Changeset in webkit [215514] by bfulgham@apple.com
  • 2 edits in trunk/Source/WebCore

[iOS, macOS] Guard against passing nullptr to vImagePremultiplyData
https://bugs.webkit.org/show_bug.cgi?id=170912
<rdar://problem/30565800>

Reviewed by Brady Eidson.

  • platform/graphics/cg/ImageBufferDataCG.cpp:

(WebCore::affineWarpBufferData): Assert if we passed nullptr buffers.
(WebCore::transferData): Ditto.
(WebCore::ImageBufferData::getData): Check for nullptr data member and avoid passing to vImage routines.
(WebCore::ImageBufferData::putData): Ditto.

9:14 AM Changeset in webkit [215513] by hyatt@apple.com
  • 2 edits in trunk/Source/WebCore

Remove bogus assert for :not.
https://bugs.webkit.org/show_bug.cgi?id=170995
<rdar://problem/29693115>

Reviewed by Zalan Bujtas.

  • css/parser/CSSSelectorParser.cpp:
8:51 AM Changeset in webkit [215512] by eric.carlson@apple.com
  • 2 edits in trunk/Source/WebKit2

Provide a way for clients to unmute a media stream.
https://bugs.webkit.org/show_bug.cgi?id=170855
<rdar://problem/31656855>

Unreviewed, fix a typo missed in the review of r215420.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _setPageMuted:]):

8:20 AM Changeset in webkit [215511] by jmarcell@apple.com
  • 7 edits in trunk/Source

Versioning.

8:15 AM Changeset in webkit [215510] by jmarcell@apple.com
  • 1 copy in tags/Safari-604.1.18

Tag Safari-604.1.18.

7:57 AM Changeset in webkit [215509] by graouts@webkit.org
  • 11 edits in trunk/Source/WebCore

[Modern Media Controls] Allow non-PNG resources
https://bugs.webkit.org/show_bug.cgi?id=170992
<rdar://problem/31706590>

Reviewed by Dean Jackson.

Instead of passing in a name and a platform to MediaControlsHost::base64StringForIconAndPlatform(),
we now pass in a name and a type to MediaControlsHost::base64StringForIconNameAndType(). We've removed
the need to provide a platform by copying the resources directly under "Resources/modern-media-controls"
insted of "Resources/modern-media-controls/platform-name-here", and now we provide a type so that it
may be passed down to -[NSBundle pathForResource:ofType:inDirectory:].

  • Modules/mediacontrols/MediaControlsHost.cpp:

(WebCore::MediaControlsHost::base64StringForIconNameAndType):
(WebCore::MediaControlsHost::base64StringForIconAndPlatform): Deleted.

  • Modules/mediacontrols/MediaControlsHost.h:
  • Modules/mediacontrols/MediaControlsHost.idl:
  • Modules/modern-media-controls/controls/icon-service.js:

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

  • WebCore.xcodeproj/project.pbxproj:
  • rendering/RenderTheme.h:

(WebCore::RenderTheme::mediaControlsBase64StringForIconNameAndType):
(WebCore::RenderTheme::mediaControlsBase64StringForIconAndPlatform): Deleted.

  • rendering/RenderThemeIOS.h:
  • rendering/RenderThemeIOS.mm:

(WebCore::RenderThemeIOS::mediaControlsBase64StringForIconNameAndType):
(WebCore::RenderThemeIOS::mediaControlsBase64StringForIconAndPlatform): Deleted.

  • rendering/RenderThemeMac.h:
  • rendering/RenderThemeMac.mm:

(WebCore::RenderThemeMac::mediaControlsBase64StringForIconNameAndType):
(WebCore::RenderThemeMac::mediaControlsBase64StringForIconAndPlatform): Deleted.

6:00 AM Changeset in webkit [215508] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit2

[GTK] WebKitAutocleanups.h regression in v2.16.1 release
https://bugs.webkit.org/show_bug.cgi?id=170987

Patch by Adrian Perez de Castro <Adrian Perez de Castro> on 2017-04-19
Reviewed by Carlos Garcia Campos.

  • UIProcess/API/gtk/WebKitAutocleanups.h: Remove stray semicolon.
5:15 AM Changeset in webkit [215507] by antti@apple.com
  • 3 edits
    2 adds in trunk

Avoid repaints for invisible animations on tumblr.com/search/aww
https://bugs.webkit.org/show_bug.cgi?id=170986
<rdar://problem/28644580>

Reviewed by Andreas Kling.

Source/WebCore:

Test: fast/repaint/mutate-non-visible.html

  • rendering/style/RenderStyle.cpp:

(WebCore::requiresPainting):
(WebCore::RenderStyle::changeRequiresRepaint):

If an element is invisible it does not require repaint even if something else changes.

LayoutTests:

  • fast/repaint/mutate-non-visible-expected.txt: Added.
  • fast/repaint/mutate-non-visible.html: Added.
1:41 AM Changeset in webkit [215506] by dino@apple.com
  • 2 edits in trunk/Source/WebCore

Non-muxable GPUs shouldn't allow offline rendering
https://bugs.webkit.org/show_bug.cgi?id=170984
<rdar://problem/31614406>

Reviewed by Myles Maxfield.

Setting the kCGLPFAAllowOfflineRenderers flag doesn't do any
harm on devices that only have one GPU. It's also what we
want on devices that can mux between GPUs. However, we were
also setting it unconditionally on devices with multiple
GPUs that have issues muxing.

  • platform/graphics/mac/GraphicsContext3DMac.mm:

(WebCore::setPixelFormat): Add a test for hasMuxableGPU.

12:42 AM Changeset in webkit [215505] by rniwa@webkit.org
  • 2 edits in trunk/Websites/perf.webkit.org

Another build fix after r215061. Clear TriggerableRepositoryGroup's static map in each iteration.

  • tools/sync-buildbot.js:

(syncLoop):

Apr 18, 2017:

10:59 PM Changeset in webkit [215504] by pvollan@apple.com
  • 3 edits in trunk/Source/WebKit2

Dragging a few items over MiniBrowser has 0 in the red indicator.
https://bugs.webkit.org/show_bug.cgi?id=170874

Reviewed by Tim Horton.

When WebKit does not accept the drag items, the drag count badge should not be updated.
Also, if WebKit changes the drag count badge, it should be restored to its original
value when the drag exits.

  • UIProcess/Cocoa/WebViewImpl.h:
  • UIProcess/Cocoa/WebViewImpl.mm:

(WebKit::WebViewImpl::draggingEntered):
(WebKit::WebViewImpl::draggingUpdated):
(WebKit::WebViewImpl::draggingExited):

10:58 PM Changeset in webkit [215503] by rniwa@webkit.org
  • 3 edits in trunk/Websites/perf.webkit.org

Build fix after r215061.

There was a mismatch between the format updateTriggerable and /api/update-triggerable were using.
Namely, each repository group was assumed to contain a name field in /api/update-triggerable
but updateTriggerable was not including that at all.

We didn't catch this because the test for updateTriggerable also used the wrong format :(

  • server-tests/tools-buildbot-triggerable-tests.js:
  • tools/js/buildbot-triggerable.js:

(BuildbotTriggerable.prototype.updateTriggerable):

9:22 PM Changeset in webkit [215502] by wenson_hsieh@apple.com
  • 8 edits in trunk

[WK2] Add infrastructure and unit tests for file uploads using data interaction
https://bugs.webkit.org/show_bug.cgi?id=170903
<rdar://problem/31314689>

Reviewed by Tim Horton.

Source/WebKit2:

See Tools/ChangeLog for more details. Makes a small adjustment to _simulateDataInteractionUpdated: to return a
BOOL indicating whether or not to allow the operation to proceed. This is necessary for testing scenarios where
multiple files are being "data interacted" onto an element. See <https://bugs.webkit.org/show_bug.cgi?id=170880>
for more details about the change this patch is testing.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _simulateDataInteractionUpdated:]):

  • UIProcess/API/Cocoa/WKWebViewPrivate.h:
  • UIProcess/ios/WKContentViewInteraction.h:

Tools:

Adds 5 new unit tests covering different cases of uploading files through data interaction, as well as
infrastructure for simulating UIItemProviders that load file data. Makes a few adjustments to the
DataInteractionSimulator along the way, detailed in the per-method annotations below. See
<https://bugs.webkit.org/show_bug.cgi?id=170880> for more details about the change this patch is testing.

New tests:
DataInteractionTests.ExternalSourceImageToFileInput
DataInteractionTests.ExternalSourceHTMLToUploadArea
DataInteractionTests.ExternalSourceImageAndHTMLToSingleFileInput
DataInteractionTests.ExternalSourceImageAndHTMLToMultipleFileInput
DataInteractionTests.ExternalSourceImageAndHTMLToUploadArea

  • TestWebKitAPI/Tests/ios/DataInteractionTests.mm:

(testIconImage):
(temporaryURLForDataInteractionFileLoad):
(cleanUpDataInteractionTemporaryPath):

Creates and tears down temporary file directories for testing data interaction.

(-[UIItemProvider registerFileRepresentationForTypeIdentifier:withData:filename:]):
(TestWebKitAPI::TEST):

  • TestWebKitAPI/ios/DataInteractionSimulator.h:
  • TestWebKitAPI/ios/DataInteractionSimulator.mm:

Make necessary changes to be able to test what happens when data interaction ends over an element with no
operation. Previously, we would always simulate performing a data interaction operation when ending the
simulation, but this causes us to wait indefinitely for a data operation response to arrive in the UI process.
Instead, we need to note whether or not the content view is allowing data interaction, and only perform an
operation and wait for the -didPerform call if the operation was allowed. Otherwise, we immediately transition
the phase to Cancelled and end the run.

(-[DataInteractionSimulator _resetSimulatedState]):
(-[DataInteractionSimulator runFrom:to:]):
(-[DataInteractionSimulator _concludeDataInteractionAndPerformOperationIfNecessary]):
(-[DataInteractionSimulator _advanceProgress]):
(-[DataInteractionSimulator externalItemProviders]):
(-[DataInteractionSimulator setExternalItemProviders:]):

Previously, we hard-coded DataInteractionSimulator to only support a single external item provider. In order to
test the scenario where multiple files are being "data interacted" into a file-type input, we generalize this to
take multiple item providers.

(-[DataInteractionSimulator externalItemProvider]): Deleted.
(-[DataInteractionSimulator setExternalItemProvider:]): Deleted.

9:01 PM Changeset in webkit [215501] by commit-queue@webkit.org
  • 6 edits in trunk/Source/WebCore

RTCOfferOptions iceRestart should be supported
https://bugs.webkit.org/show_bug.cgi?id=170966

Patch by Youenn Fablet <youenn@apple.com> on 2017-04-18
Reviewed by Alex Christensen.

No ability to test iceRestart as of now.
Passing iceRestart value to libwebrtc.
Passing also voiceActivityDetection value to libwebrtc.
Updating mock to use the new overloaded CreateOffer method.

  • Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:

(WebCore::LibWebRTCMediaEndpoint::doCreateOffer):

  • Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h:
  • Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp:

(WebCore::LibWebRTCPeerConnectionBackend::doCreateOffer):

  • Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:

(WebCore::LibWebRTCMediaEndpoint::doCreateOffer):

  • testing/MockLibWebRTCPeerConnection.cpp:

(WebCore::MockLibWebRTCPeerConnection::CreateOffer):

  • testing/MockLibWebRTCPeerConnection.h:
8:29 PM Changeset in webkit [215500] by dino@apple.com
  • 3 edits in trunk/Source/ThirdParty/ANGLE

Add the actual content to the files, now that
SVN knows they can have tabs.

  • src/third_party/murmurhash/MurmurHash3.cpp:
  • src/third_party/murmurhash/MurmurHash3.h:
8:27 PM Changeset in webkit [215499] by dino@apple.com
  • 1 edit
    4 adds in trunk/Source/ThirdParty/ANGLE

WinCairo needs these files I recently removed
from our copy of ANGLE.

  • src/third_party/murmurhash/LICENSE: Added.
  • src/third_party/murmurhash/MurmurHash3.cpp: Added.
  • src/third_party/murmurhash/MurmurHash3.h: Added.
8:22 PM Changeset in webkit [215498] by wenson_hsieh@apple.com
  • 23 edits in trunk/Source

[WK2] Support DataTransfer::files() when performing a DHTML data interaction
https://bugs.webkit.org/show_bug.cgi?id=170880
<rdar://problem/31314689>

Reviewed by Tim Horton.

Source/WebCore:

Adds support for fetching files from the DataTransfer when performing a data interaction operation handled by
JavaScript. There are two changes we make here to achieve this:

First, we teach the Pasteboard on iOS to know what file paths hold the item provider contents used in the
current data interaction operation. On iOS, Pasteboard::readFilenames is currently hard-coded to return an empty
vector. To fix this, we add logic to the iOS Pasteboard to remember what the paths of all files that were
successfully loaded from item providers as the data interaction is taking place. This ensures that at the
WebCore layer, the implementation of Pasteboard::readFilenames on Mac and iOS is similar -- they both call out
to the client layer in order to read file paths off of their respective pasteboards. Once in the client layer
(WebKit1 or WebKit2) we then call into PlatformPasteboard::filenamesForDataInteraction, which then calls into
WebItemProviderPasteboard if applicable.

The second tweak is to propagate information about whether the document is preventing default data interaction
behavior to the client layer. This prevents us from having to save pasteboard content when performing data
interaction in cases where file information is not needed (i.e. the default behavior is being performed, and
the target is not a file input). This also avoids compatibility issues with insertion animations when performing
data interaction in editable areas, due to the extra time spent loading item provider data into a temporary
file.

Unit tests in <https://bugs.webkit.org/show_bug.cgi?id=170903>.

  • page/DragController.cpp:

(WebCore::DragController::DragController):
(WebCore::DragController::performDragOperation):
(WebCore::DragController::dragEnteredOrUpdated):
(WebCore::DragController::tryDocumentDrag):

Refactor DragController::tryDocumentDrag to return a DragHandlingMethod. This method currently returns either
true or false; this patch changes it to return a DragHandlingMethod, which is either None (the equivalent of
returning false before the patch), Default (indicating that the drop destination is allowing default handling),
or NonDefault, which indicates that the drop destination has explicitly prevented default.

  • page/DragController.h:

(WebCore::DragController::documentIsHandlingNonDefaultDrag):

Used by WebPage when sending an IPC response after handling dragentered or dragupdated.

  • platform/PasteboardStrategy.h:
  • platform/PlatformPasteboard.h:
  • platform/ios/AbstractPasteboard.h:
  • platform/ios/PasteboardIOS.mm:

(WebCore::Pasteboard::readFilenames):

  • platform/ios/PlatformPasteboardIOS.mm:

(WebCore::PlatformPasteboard::filenamesForDataInteraction):

  • platform/ios/WebItemProviderPasteboard.h:
  • platform/ios/WebItemProviderPasteboard.mm:

WebItemProviderPasteboard now remembers the file URLs of successfully loaded item provider content when a data
interaction is being performed. The new filenamesForDataInteraction property returns the array of data
interaction file URLs which have been propagated to the web process along with sandbox extensions. This state
is cleaned up when list of item providers change (i.e. when the data interaction operation is finished, or if
the web content process crashes, etc.)

(-[WebItemProviderPasteboard init]):
(-[WebItemProviderPasteboard setItemProviders:]):
(-[WebItemProviderPasteboard filenamesForDataInteraction]):
(-[WebItemProviderPasteboard doAfterLoadingProvidedContentIntoFileURLs:]):

Source/WebKit/mac:

Adjust for a change in PasteboardStrategy. See WebCore ChangeLog for more details.

  • WebCoreSupport/WebPlatformStrategies.h:
  • WebCoreSupport/WebPlatformStrategies.mm:

(WebPlatformStrategies::getFilenamesForDataInteraction):

Source/WebKit2:

See the WebCore ChangeLog for more details.

  • UIProcess/Cocoa/WebPasteboardProxyCocoa.mm:

(WebKit::WebPasteboardProxy::getFilenamesForDataInteraction):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::didPerformDragControllerAction):
(WebKit::WebPageProxy::resetCurrentDragInformation):

  • UIProcess/WebPageProxy.h:

(WebKit::WebPageProxy::documentIsHandlingNonDefaultDrag):

  • UIProcess/WebPageProxy.messages.in:

Adds an IPC argument to DidPerformDragControllerAction specifying whether the page prevented the default behavior.

  • UIProcess/WebPasteboardProxy.h:
  • UIProcess/WebPasteboardProxy.messages.in:

Adds IPC plumbing for the new filenamesForDataInteraction Pasteboard codepath.

  • WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:

(WebKit::WebPlatformStrategies::getFilenamesForDataInteraction):

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

(WebKit::WebPage::performDragControllerAction):

7:12 PM Changeset in webkit [215497] by dino@apple.com
  • 2 edits in trunk/Source/WebCore

Cairo build fix.
https://bugs.webkit.org/show_bug.cgi?id=170941

  • platform/graphics/cairo/GraphicsContext3DCairo.cpp:

(WebCore::GraphicsContext3D::GraphicsContext3D):

7:10 PM Changeset in webkit [215496] by dino@apple.com
  • 2 edits in trunk/Source/ThirdParty/ANGLE

Still trying to fix Windows.

  • PlatformWin.cmake:
6:56 PM Changeset in webkit [215495] by dino@apple.com
  • 2 edits in trunk/Source/ThirdParty/ANGLE

Attempt to fix the Windows build.

  • PlatformWin.cmake:
6:51 PM Changeset in webkit [215494] by commit-queue@webkit.org
  • 8 edits in trunk/Source/ThirdParty/libwebrtc

Add NDEBUG and CodeStripping to libwebrtc build system
https://bugs.webkit.org/show_bug.cgi?id=170954

Patch by Youenn Fablet <youenn@apple.com> on 2017-04-18
Reviewed by Alex Christensen.

This optimizes libwebrtc library size and efficiency.
This allows allocating libwebrtc objects in WebCore without issues.

  • Configurations/Base.xcconfig:
  • Configurations/boringssl.xcconfig:
  • Configurations/libsrtp.xcconfig:
  • Configurations/libwebrtc.xcconfig:
  • Configurations/libwebrtcpcrtc.xcconfig:
  • Configurations/opus.xcconfig:
  • Configurations/usrsctp.xcconfig:
6:46 PM Changeset in webkit [215493] by Ryan Haddad
  • 2 edits in trunk/Source/WebCore

Rebaseline bindings tests after r215486.

Unreviewed test gardening.

  • bindings/scripts/test/JS/JSTestObj.cpp:

(WebCore::jsTestObjOnfooGetter):
(WebCore::jsTestObjOnwebkitfooGetter):

6:22 PM Changeset in webkit [215492] by dino@apple.com
  • 2 edits in trunk/Source/WebCore

Attempted build fix. Add/remove some files from ANGLE.

  • CMakeLists.txt:
6:07 PM Changeset in webkit [215491] by wilander@apple.com
  • 9 edits
    2 adds in trunk

Resource Load Statistics: Check both origins and cookieHostNames for domain matches in data removal
https://bugs.webkit.org/show_bug.cgi?id=170763
<rdar://problem/31573091>

Reviewed by Alex Christensen.

Source/WebKit2:

  • UIProcess/WebProcessProxy.cpp:

(WebKit::WebProcessProxy::deleteWebsiteDataForTopPrivatelyControlledDomainsInAllPersistentDataStores):

Move semantics for topPrivatelyControlledDomains vector.

(WebKit::WebProcessProxy::deleteWebsiteDataForTopPrivatelyOwnedDomainsInAllPersistentDataStores): Deleted.

Renamed 'PrivatelyControlled' instead of 'PrivatelyOwned.'

  • UIProcess/WebProcessProxy.h:
  • UIProcess/WebResourceLoadStatisticsStore.cpp:

(WebKit::WebResourceLoadStatisticsStore::removeDataRecords):

Move semantics for prevalentResourceDomains vector.

  • UIProcess/WebsiteData/WebsiteDataRecord.cpp:

(WebKit::hostIsInDomain):

Static convenience function.

(WebKit::WebsiteDataRecord::matchesTopPrivatelyControlledDomain):

Checks for matching cookieHostNames if types contains WebsiteDataType::Cookies.
Also checks origins.

  • UIProcess/WebsiteData/WebsiteDataRecord.h:
  • UIProcess/WebsiteData/WebsiteDataStore.cpp:

(WebKit::WebsiteDataStore::fetchDataForTopPrivatelyControlledDomains):

Now makes use of the new function
WebKit::WebsiteDataRecord::validForTopPrivatelyControlledDomain().

(WebKit::WebsiteDataStore::removeDataForTopPrivatelyControlledDomains):

Move semantics for topPrivatelyControlledDomains vector.

(WebKit::WebsiteDataStore::fetchDataForTopPrivatelyOwnedDomains): Deleted.

Renamed 'PrivatelyControlled' instead of 'PrivatelyOwned.'

(WebKit::WebsiteDataStore::removeDataForTopPrivatelyOwnedDomains): Deleted.

Renamed 'PrivatelyControlled' instead of 'PrivatelyOwned.'

  • UIProcess/WebsiteData/WebsiteDataStore.h:

LayoutTests:

  • http/tests/loading/resourceLoadStatistics/partitioned-and-unpartitioned-cookie-deletion-expected.txt: Added.
  • http/tests/loading/resourceLoadStatistics/partitioned-and-unpartitioned-cookie-deletion.html: Added.
5:37 PM Changeset in webkit [215490] by dino@apple.com
  • 594 edits
    1 copy
    5 moves
    67 adds
    258 deletes in trunk

Update ANGLE
https://bugs.webkit.org/show_bug.cgi?id=170941
<rdar://problem/31633999>

Reviewed by Alex Christensen.

Source/ThirdParty/ANGLE:

Huge list of changed files omitted.

Source/WebCore:

  • platform/graphics/ANGLEWebKitBridge.cpp:

(WebCore::getSymbolInfo):
(WebCore::ANGLEWebKitBridge::ANGLEWebKitBridge):
(WebCore::ANGLEWebKitBridge::cleanupCompilers):
(WebCore::ANGLEWebKitBridge::compileShaderSource):

  • platform/graphics/mac/GraphicsContext3DMac.mm:

(WebCore::GraphicsContext3D::GraphicsContext3D):

  • platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:

(WebCore::GraphicsContext3D::checkVaryingsPacking):

LayoutTests:

  • fast/canvas/webgl/fragment-shader-assertion-expected.txt:
5:04 PM Changeset in webkit [215489] by wilander@apple.com
  • 4 edits in trunk

Make WebCore::topPrivatelyControlledDomain() return "localhost" for localhost
https://bugs.webkit.org/show_bug.cgi?id=170798
<rdar://problem/31595108>

Reviewed by Alex Christensen.

Source/WebCore:

API test augmented.

  • platform/mac/PublicSuffixMac.mm:

(WebCore::topPrivatelyControlledDomain):

Now returns the lowercase top privately controlled
domain including "localhost" for the host localhost.

Tools:

  • TestWebKitAPI/Tests/mac/PublicSuffix.mm:

(TestWebKitAPI::TEST_F):

Added two negative test cases for WebCore::isPublicSuffix().
Added test cases with mixed case domains, localhost, and
non-ASCII for WebCore::topPrivatelyControlledDomain().

4:38 PM Changeset in webkit [215488] by bfulgham@apple.com
  • 4 edits
    1 add in trunk/Source/WebKit2

[iOS][WK2] Prevent ephemeral files from being backed up
https://bugs.webkit.org/show_bug.cgi?id=170963
<rdar://problem/30470332>

Reviewed by Brady Eidson.

Tell the OS to skip temporary data files when performing backups.

  • UIProcess/Cocoa/WebResourceLoadStatisticsStoreCocoa.mm: Added.

(WebKit::WebResourceLoadStatisticsStore::platformExcludeFromBackup): Added.

  • UIProcess/WebResourceLoadStatisticsStore.cpp:

(WebKit::WebResourceLoadStatisticsStore::writeEncoderToDisk):
(WebKit::WebResourceLoadStatisticsStore::platformExcludeFromBackup): Add stub for
non-iOS platforms.

  • UIProcess/WebResourceLoadStatisticsStore.h:
  • WebKit2.xcodeproj/project.pbxproj: Add new file.
4:34 PM Changeset in webkit [215487] by bfulgham@apple.com
  • 3 edits in trunk/Source/WebCore

JSEventListener::m_isolatedWorld should be a Ref
https://bugs.webkit.org/show_bug.cgi?id=170910
<rdar://problem/30470332>

Reviewed by Alex Christensen.

Since m_isolatedWorld should never be nullptr, change the implementation of m_isolatedWorld
from a RefPtr to a Ref, and adjust the various call sites to support this change.

This should help us catch any changes that permit the isolatedWorld to be set to nullptr.

No new tests since there should be no change in behavior.

  • bindings/js/JSEventListener.cpp:

(WebCore::JSEventListener::JSEventListener):
(WebCore::JSEventListener::initializeJSFunction):
(WebCore::JSEventListener::handleEvent):

  • bindings/js/JSEventListener.h:

(WebCore::JSEventListener::cast):
(WebCore::JSEventListener::isolatedWorld):
(WebCore::JSEventListener::jsFunction):

4:27 PM Changeset in webkit [215486] by bfulgham@apple.com
  • 14 edits
    4 adds in trunk

Correct handling of isolatedWorld in event handling
https://bugs.webkit.org/show_bug.cgi?id=65589
<rdar://problem/24097804>

Reviewed by Geoffrey Garen.

Source/WebCore:

This patch was inspired by Adam's original patch as well as the
following Blink change:
https://src.chromium.org/viewvc/blink?revision=152377&view=revision

Thread isolatedWorld state through event handling logic.

Tests: fast/dom/event-attrs-isolated-world.html

http/tests/security/isolatedWorld/onclick-attribute.html

  • bindings/js/JSEventListener.cpp:

(WebCore::JSEventListener::initializeJSFunction):
(WebCore::JSEventListener::world):
(WebCore::eventHandlerAttribute):
(WebCore::setEventHandlerAttribute):
(WebCore::windowEventHandlerAttribute):
(WebCore::setWindowEventHandlerAttribute):
(WebCore::documentEventHandlerAttribute):
(WebCore::setDocumentEventHandlerAttribute):

  • bindings/js/JSEventListener.h:
  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateImplementation):

  • dom/Document.cpp:

(WebCore::Document::setWindowAttributeEventListener):
(WebCore::Document::getWindowAttributeEventListener):

  • dom/Document.h:
  • dom/Element.cpp:

(WebCore::Element::setAttributeEventListener):

  • dom/EventTarget.cpp:

(WebCore::EventTarget::setAttributeEventListener):
(WebCore::EventTarget::attributeEventListener):

  • dom/EventTarget.h:
  • editing/ReplaceSelectionCommand.cpp:

(WebCore::ReplacementFragment::ReplacementFragment):

  • html/HTMLBodyElement.cpp:

(WebCore::HTMLBodyElement::parseAttribute):

  • html/HTMLFrameSetElement.cpp:

(WebCore::HTMLFrameSetElement::parseAttribute):

  • svg/SVGSVGElement.cpp:

(WebCore::SVGSVGElement::parseAttribute):

LayoutTests:

This following test cases are from the following Blink change:
https://src.chromium.org/viewvc/blink?revision=152377&view=revision

  • fast/dom/event-attrs-isolated-world-expected.txt: Added.
  • fast/dom/event-attrs-isolated-world.html: Added.
  • http/tests/security/isolatedWorld/onclick-attribute-expected.txt: Added.
  • http/tests/security/isolatedWorld/onclick-attribute.html: Added.
4:14 PM Changeset in webkit [215485] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebCore

Deadlock in CoreAudioCaptureSource
https://bugs.webkit.org/show_bug.cgi?id=170771
rdar://problem/31578919

Patch by Jeremy Jones <jeremyj@apple.com> on 2017-04-18
Reviewed by Eric Carlson.

Fixes a regression introduced by r215201.

  • platform/mediastream/mac/CoreAudioCaptureSource.cpp:

(WebCore::CoreAudioCaptureSource::startProducingData):
(WebCore::CoreAudioCaptureSource::stopProducingData):

4:12 PM Changeset in webkit [215484] by wenson_hsieh@apple.com
  • 4 edits
    2 adds in trunk

[WK2] Cannot select text on nytimes.com when the selection granularity is WKSelectionGranularityCharacter
https://bugs.webkit.org/show_bug.cgi?id=170968
<rdar://problem/31692560>

Reviewed by Dan Bernstein.

Source/WebKit2:

Makes a small adjustment to textInteractionGesture:shouldBeginAtPoint:. When determining whether to allow the
text interaction assistant to recognize at a given point, instead of depending on whether or not the hit node is
the same as the assisted node, only enforce this restriction when editing an assisted node. Otherwise, default
to allowing the selection gesture.

Note that character granularity selection was working on most pages before, due to the fact that
nodeAtPositionIsAssistedNode was true in many cases when there is no assisted node at all. This is because, in
WebPage.mm, we compute the hit-tested node responding to click events to be null, and then set
nodeAtPositionIsAssistedNode to be equal to hitNode == m_assistedNode, which ends up being true because both of
these values are null.

This allowed text selection to work in the simple case when selection granularity character is used, but not
when the node containing the selected point actually does respond to click events, since the comparison returns
false.

New layout test: LayoutTests/editing/selection/character-granularity-select-text-with-click-handler.html.

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView textInteractionGesture:shouldBeginAtPoint:]):

LayoutTests:

Adds a new layout test checking that text within a node with a click handler can be selected when using
character selection granularity.

  • editing/selection/character-granularity-select-text-with-click-handler-expected.txt: Added.
  • editing/selection/character-granularity-select-text-with-click-handler.html: Added.
3:58 PM Changeset in webkit [215483] by Ryan Haddad
  • 3 edits in branches/safari-603-branch/LayoutTests

Land LayoutTest changes for rdar://problem/31636547.

  • fast/forms/range/range-drag-when-toggled-disabled-expected.txt:
  • fast/forms/range/range-drag-when-toggled-disabled.html:
3:34 PM Changeset in webkit [215482] by mark.lam@apple.com
  • 6 edits
    2 adds in trunk

r211670 broke double to int conversion.
https://bugs.webkit.org/show_bug.cgi?id=170961
<rdar://problem/31687696>

Reviewed by Yusuke Suzuki.

JSTests:

  • microbenchmarks/double-to-int32.js: Added.
  • stress/to-int32-sensible2.js: Added.

Source/JavaScriptCore:

This is because operationToInt32SensibleSlow() assumes that left shifts of greater
than 31 bits on an 31-bit value will produce a 0. However, the spec says that
"if the value of the right operand is negative or is greater or equal to the
number of bits in the promoted left operand, the behavior is undefined."
See http://en.cppreference.com/w/cpp/language/operator_arithmetic#Bitwise_shift_operators.

This patch fixes this by restoring the check to prevent a shift of greater than
31 bits. It also consolidates the optimization in operationToInt32SensibleSlow()
back into toInt32() so that we don't have 2 copies of the same code with only a
slight variation.

JSC benchmarks shows that performance is neutral with this patch.

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileValueToInt32):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::sensibleDoubleToInt32):

  • runtime/MathCommon.cpp:

(JSC::operationToInt32SensibleSlow): Deleted.

  • runtime/MathCommon.h:

(JSC::toInt32):

3:28 PM Changeset in webkit [215481] by krollin@apple.com
  • 2 edits in trunk/Source/WebKit2

Add additional information when logging URL disposition in WebLoaderStrategy::scheduleLoad
https://bugs.webkit.org/show_bug.cgi?id=170813

Reviewed by Alex Christensen.

There are a few logging statements in WebLoaderStrategy::scheduleLoad
that report, for example, "URL will be loaded as data". These
statements also log the address of the frame doing the loading and the
identifier of the resource. For consistency with other logging and to
make scripted analysis of the logs more robust, also include the
pageID and frameID in the logging.

  • WebProcess/Network/WebLoaderStrategy.cpp:

(WebKit::WebLoaderStrategy::scheduleLoad):

3:22 PM Changeset in webkit [215480] by andersca@apple.com
  • 7 edits in trunk/Source

Stop using deprecated APIs, part 2
https://bugs.webkit.org/show_bug.cgi?id=170965
Source/WebCore:

rdar://problem/31589635

Reviewed by Tim Horton.

  • Modules/applepay/ApplePaySession.cpp:

(WebCore::convertAndValidate):
No need to convert the status anymore.

(WebCore::ApplePaySession::completeShippingContactSelection):
Create an ApplePayError given the status.

  • Modules/applepay/ApplePayShippingContactUpdate.h:

Remove the status member variable.

  • Modules/applepay/PaymentRequest.h:

Remove the status member variable.

Source/WebKit2:

Reviewed by Tim Horton.

  • Shared/Cocoa/WebCoreArgumentCodersCocoa.mm:

(IPC::ArgumentCoder<WebCore::ShippingContactUpdate>::encode):
(IPC::ArgumentCoder<WebCore::ShippingContactUpdate>::decode):
Remove the status member variable.

  • UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:

(WebKit::status):
New function to be used by older OSes. This will recreate a PKPaymentAuthorizationStatus given a ShippingContactUpdate.

(WebKit::WebPaymentCoordinatorProxy::platformCompleteShippingContactSelection):
Stop using the deprecated API.

1:59 PM Changeset in webkit [215479] by timothy_horton@apple.com
  • 2 edits in trunk/Source/WebCore

Safari crash when clicking phone number data detector popover button
https://bugs.webkit.org/show_bug.cgi?id=170936
<rdar://problem/31416570>

Reviewed by Wenson Hsieh.

  • platform/spi/mac/DataDetectorsSPI.h:

Soft-link the phone number key from the correct framework.

1:37 PM Changeset in webkit [215478] by joepeck@webkit.org
  • 2 edits in trunk/LayoutTests

[mac-wk1 Debug] LayoutTest http/tests/inspector/network/resource-sizes-network.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=170953

Unreviewed test gardening.

  • platform/mac-wk1/TestExpectations:

Mark a flakey test in WebKit1.

1:35 PM Changeset in webkit [215477] by weinig@apple.com
  • 48 edits in trunk

[WebIDL] Make annotated types first class allowing them to be used in sequences and unions
https://bugs.webkit.org/show_bug.cgi?id=170926

Reviewed by Chris Dumez.

Source/WebCore:

  • Adds IDL types for WebIDL annotated types:

[Clamp] T -> IDLClampAdaptor<T>
[EnforceRange] T -> IDLEnforceRangeAdaptor<T>
[TreatNullAs=EmptyString] T -> IDLTreatNullAsEmptyAdaptor<T>

  • Adds additional adaptors for existing specializations

[AtomicString] T -> IDLAtomicStringAdaptor<T>
[RequiresExistingAtomicString] T -> IDLRequiresExistingAtomicStringAdaptor<T>

  • Removes the need for IntegerConversionConfiguration and StringConversionConfiguration overloads of convert().
  • Allows the use of annotated types as subtypes, such as in sequences and unions.
  • bindings/IDLTypes.h:

Add new types:

  • IDLClampAdaptor
  • IDLEnforceRangeAdaptor
  • IDLTreatNullAsEmptyAdaptor
  • IDLAtomicStringAdaptor
  • IDLRequiresExistingAtomicStringAdaptor

Add new predicates for matching strings and strings/enumerations.

  • bindings/js/JSDOMConvertNullable.h:

Remove now unnecessary overloads of convert that took IntegerConversionConfiguration
and StringConversionConfiguration.

  • bindings/js/JSDOMConvertNumbers.cpp:
  • bindings/js/JSDOMConvertNumbers.h:

Replace individually named conversion functions with explicit template specializations
based on type.
(WebCore::Converter<IDLByte>::convert):
(WebCore::Converter<IDLOctet>::convert):
(WebCore::Converter<IDLShort>::convert):
(WebCore::Converter<IDLUnsignedShort>::convert):
(WebCore::Converter<IDLLong>::convert):
(WebCore::Converter<IDLUnsignedLong>::convert):
(WebCore::Converter<IDLLongLong>::convert):
(WebCore::Converter<IDLUnsignedLongLong>::convert):
Simplify convert functions for normal integer converters to only handle
the normal case.

(WebCore::Converter<IDLClampAdaptor<T>>::convert):
(WebCore::JSConverter<IDLClampAdaptor<T>>::convert):
(WebCore::Converter<IDLEnforceRangeAdaptor<T>>::convert):
(WebCore::JSConverter<IDLEnforceRangeAdaptor<T>>::convert):
Add converters for the new annotated types that call into the new
template specialized conversion functions.

  • bindings/js/JSDOMConvertStrings.h:

(WebCore::Converter<IDLDOMString>::convert):
(WebCore::Converter<IDLByteString>::convert):
(WebCore::Converter<IDLUSVString>::convert):
Remove no longer needed StringConversionConfiguration parameter.

(WebCore::Converter<IDLTreatNullAsEmptyAdaptor<T>>::convert):
(WebCore::JSConverter<IDLTreatNullAsEmptyAdaptor<T>>::convert):
(WebCore::Converter<IDLAtomicStringAdaptor<T>>::convert):
(WebCore::JSConverter<IDLAtomicStringAdaptor<T>>::convert):
(WebCore::Converter<IDLRequiresExistingAtomicStringAdaptor<T>>::convert):
(WebCore::JSConverter<IDLRequiresExistingAtomicStringAdaptor<T>>::convert):
Add converters for new annotated types. Statically assert that the atomic string
adaptors only work for DOMString at present.

  • bindings/js/JSDOMConvertUnion.h:

Update union code to fix a long standing FIXME, treating enumerations as strings
for the purposes of the union algorithm, and using the new predicate that works
with the slightly more complicated IDLString type (e.g. it can now either be a String
or an AtomicString).

  • bindings/js/JSCSSStyleDeclarationCustom.cpp:
  • bindings/js/JSCryptoAlgorithmDictionary.cpp:
  • bindings/js/JSDocumentCustom.cpp:
  • bindings/js/JSEventListener.cpp:
  • bindings/js/JSHTMLCanvasElementCustom.cpp:
  • bindings/js/JSMockContentFilterSettingsCustom.cpp:
  • bindings/js/JSNodeFilterCustom.cpp:
  • bindings/js/JSSubtleCryptoCustom.cpp:

Remove explicit passing of Normal for the conversion configuration
and use new adaptors where appropriate.

  • bindings/scripts/CodeGeneratorJS.pm:

(IsAnnotatedType):
(GetAnnotatedIDLType):
(GetIDLType):
(JSValueToNative):
(UnsafeToNative):
(GetIntegerConversionConfiguration): Deleted.
(GetStringConversionConfiguration): Deleted.
Replace passing conversion configuration and specializing for atomic string
with annotated types.

  • bindings/scripts/IDLParser.pm:

(parseUnionMemberType):
Fix parser error where we weren't parsing extended attributes for a union correctly.

  • bindings/scripts/test/JS/JSMapLike.cpp:
  • bindings/scripts/test/JS/JSReadOnlyMapLike.cpp:
  • bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
  • bindings/scripts/test/JS/JSTestCEReactions.cpp:
  • bindings/scripts/test/JS/JSTestCEReactionsStringifier.cpp:
  • bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
  • bindings/scripts/test/JS/JSTestDOMJIT.cpp:
  • bindings/scripts/test/JS/JSTestEventConstructor.cpp:
  • bindings/scripts/test/JS/JSTestEventTarget.cpp:
  • bindings/scripts/test/JS/JSTestGlobalObject.cpp:
  • bindings/scripts/test/JS/JSTestInterface.cpp:
  • bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
  • bindings/scripts/test/JS/JSTestNode.cpp:
  • bindings/scripts/test/JS/JSTestObj.cpp:
  • bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
  • bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp:
  • bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
  • bindings/scripts/test/JS/JSTestSerialization.cpp:
  • bindings/scripts/test/JS/JSTestSerializationInherit.cpp:
  • bindings/scripts/test/JS/JSTestSerializationInheritFinal.cpp:
  • bindings/scripts/test/JS/JSTestStandaloneDictionary.cpp:
  • bindings/scripts/test/JS/JSTestTypedefs.cpp:

Update tests for changes to integer and string conversion.

  • domjit/DOMJITIDLConvert.h:
  • domjit/DOMJITIDLType.h:
  • domjit/DOMJITIDLTypeFilter.h:

Add specializations for AtomicString related adaptors.

  • testing/TypeConversions.h:
  • testing/TypeConversions.idl:
  • Re-arrange integer attributes to be in size order, and add [Clamp] variants.
  • Replace function taking a dictionary + attributes to inspect it with a dictionary attribute. This has been supported for a while and makes the test much clearer (this includes the enum used for inspecting the union in the dictionary).
  • Add additional test unions that exercise annotated types as subtypes.
  • Add additional dictionary items that exercise annotated types as subtypes.

LayoutTests:

  • js/dom/webidl-type-mapping-expected.txt:
  • js/dom/webidl-type-mapping.html:

Update test to account for testDictionary now being an attribute,
and test that the annotated type members behave correctly.

12:35 PM Changeset in webkit [215476] by gskachkov@gmail.com
  • 49 edits
    13 adds in trunk

[ES6]. Implement Annex B.3.3 function hoisting rules for eval
https://bugs.webkit.org/show_bug.cgi?id=163208

Reviewed by Saam Barati.

JSTests:

  • stress/eval-func-decl-block-scoping-reassign.js: Added.

(assert):
(throw.new.Error.f):
(throw.new.Error):

  • stress/eval-func-decl-block-with-remove.js: Added.

(assert):
(foo.boo):
(foo):

  • stress/eval-func-decl-block-with-var-and-remove.js: Added.

(assert):
(assertThrow):
(foo):
(boo):
(joo):
(koo):

  • stress/eval-func-decl-block-with-var-sinthesize.js: Added.

(assert):
(assertThrow):
(foo):
(boo):
(hoo):
(joo):
(koo):

  • stress/eval-func-decl-in-block-scope-and-bind-to-top-eval-scope.js: Added.
  • stress/eval-func-decl-in-eval-within-block-with-let.js: Added.

(assert):
(assertThrow):
(foo):
(boo):
(goo):

  • stress/eval-func-decl-in-eval-within-with-scope.js: Added.

(assert):
(assertThrow):
(foo):
(boo):
(boo.let.val2):
(boo.let.val3):

  • stress/eval-func-decl-in-frozen-global.js: Added.

(assert):
(assertThrow):
(throw.new.Error):
(Object.freeze):

  • stress/eval-func-decl-in-global-of-eval.js: Added.

(assert):
(assertThrow):
(bar):
(baz):
(foobar):

  • stress/eval-func-decl-in-global.js: Added.

(assert):
(assertThrow):

  • stress/eval-func-decl-in-if.js: Added.

(assert):

  • stress/eval-func-decl-within-eval-with-reassign-to-var.js: Added.

(assert):
(assertThrow):
(foo):
(boo):
(foobar):
(hoo):
(joo):
(koo):
(loo):

  • stress/eval-func-decl-within-eval-without-reassign-to-let.js: Added.

(assert):
(assertThrow):
(foo):
(boo):
(goo):

  • stress/variable-under-tdz-eval-tricky.js:

(assert):

  • test262.yaml:

Source/JavaScriptCore:

Current patch implements Annex B.3.3 that is related to
hoisting of function declaration in eval.
https://tc39.github.io/ecma262/#sec-web-compat-evaldeclarationinstantiation
Function declaration in eval should create variable with
function name in function scope where eval is invoked
or bind to variable if it declared outside of the eval.
If variable is created it can be removed by 'delete a;' command.
If eval is invoke in block scope that contains let/const
variable with the same name as function declaration
we do not bind. This patch leads to the following behavior:

function foo() {

{

print(boo); undefined
eval('{ function boo() {}}');
print(boo);
function boo() {}

}
print(boo); function boo() {}

}

function foobar() {

{

let boo = 10;
print(boo); 10;
eval('{ function boo() {}}');
print(boo);
10;

}
print(boo) 10

}

function bar() {

{

var boo = 10;
print(boo); 10
eval('{ function boo() {} }');
print(boo);
function boo() {}

}
print(boo); function boo() {}

}

function bas() {

{

let boo = 10;
eval(' { function boo() {} } ');
print(boo); 10

}
print(boo); Reference Error

}

Current implementation relies on already implemented
'hoist function in sloppy mode' feature, with small changes.
In short it works in following way: during hoisting of function
with name S in eval, we are looking for first scope that
contains space for variable with name S and if this scope
has var type we bind function there

To implement this feature was added bytecode ops:
op_resolve_scope_for_hoisting_func_decl_in_eval - get variable scope
or return undefined if variable can't be binded there.

There is a corner case, hoist function in eval within catch block,
that is not covered by this patch, and will be fixed in
https://bugs.webkit.org/show_bug.cgi?id=168184

  • bytecode/BytecodeDumper.cpp:

(JSC::BytecodeDumper<Block>::dumpBytecode):

  • bytecode/BytecodeList.json:
  • bytecode/BytecodeUseDef.h:

(JSC::computeUsesForBytecodeOffset):
(JSC::computeDefsForBytecodeOffset):

  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::finalizeLLIntInlineCaches):

  • bytecode/EvalCodeBlock.h:

(JSC::EvalCodeBlock::functionHoistingCandidate):
(JSC::EvalCodeBlock::numFunctionHoistingCandidates):

  • bytecode/UnlinkedEvalCodeBlock.h:
  • bytecompiler/BytecodeGenerator.cpp:

(JSC::BytecodeGenerator::BytecodeGenerator):
(JSC::BytecodeGenerator::hoistSloppyModeFunctionIfNecessary):
(JSC::BytecodeGenerator::emitResolveScopeForHoistingFuncDeclInEval):

  • bytecompiler/BytecodeGenerator.h:
  • dfg/DFGAbstractInterpreterInlines.h:

(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::parseBlock):

  • dfg/DFGCapabilities.cpp:

(JSC::DFG::capabilityLevel):

  • dfg/DFGClobberize.h:

(JSC::DFG::clobberize):

  • dfg/DFGDoesGC.cpp:

(JSC::DFG::doesGC):

  • dfg/DFGFixupPhase.cpp:

(JSC::DFG::FixupPhase::fixupNode):

  • dfg/DFGNode.h:

(JSC::DFG::Node::hasIdentifier):

  • dfg/DFGNodeType.h:
  • dfg/DFGOperations.cpp:
  • dfg/DFGOperations.h:
  • dfg/DFGPredictionPropagationPhase.cpp:
  • dfg/DFGSafeToExecute.h:

(JSC::DFG::safeToExecute):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileResolveScopeForHoistingFuncDeclInEval):

  • dfg/DFGSpeculativeJIT.h:

(JSC::DFG::SpeculativeJIT::callOperation):

  • dfg/DFGSpeculativeJIT32_64.cpp:

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

  • dfg/DFGSpeculativeJIT64.cpp:

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

  • ftl/FTLCapabilities.cpp:

(JSC::FTL::canCompile):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileNode):
(JSC::FTL::DFG::LowerDFGToB3::compileResolveScopeForHoistingFuncDeclInEval):

  • interpreter/Interpreter.cpp:

(JSC::Interpreter::execute):

  • jit/JIT.cpp:

(JSC::JIT::privateCompileMainPass):

  • jit/JIT.h:
  • jit/JITOperations.h:
  • jit/JITPropertyAccess.cpp:

(JSC::JIT::emit_op_resolve_scope_for_hoisting_func_decl_in_eval):

  • jit/JITPropertyAccess32_64.cpp:

(JSC::JIT::emit_op_resolve_scope_for_hoisting_func_decl_in_eval):

  • llint/LowLevelInterpreter.asm:
  • parser/Parser.cpp:

(JSC::Parser<LexerType>::parseFunctionDeclarationStatement):

  • parser/Parser.h:

(JSC::Scope::getSloppyModeHoistedFunctions):
(JSC::Parser::declareFunction):

  • runtime/CommonSlowPaths.cpp:

(JSC::SLOW_PATH_DECL):

  • runtime/CommonSlowPaths.h:
  • runtime/EvalExecutable.h:

(JSC::EvalExecutable::numFunctionHoistingCandidates):
(JSC::EvalExecutable::numTopLevelFunctionDecls):
(JSC::EvalExecutable::numberOfFunctionDecls): Deleted.

  • runtime/JSScope.cpp:

(JSC::JSScope::resolve):
(JSC::JSScope::resolveScopeForHoistingFuncDeclInEval):

  • runtime/JSScope.h:

LayoutTests:

  • inspector/runtime/evaluate-CommandLineAPI-expected.txt:
  • inspector/runtime/evaluate-CommandLineAPI.html:
  • js/parser-syntax-check-expected.txt:
  • js/script-tests/parser-syntax-check.js:
12:27 PM Changeset in webkit [215475] by fpizlo@apple.com
  • 3 edits in trunk/JSTests

wasm/function-tests/memory-multiagent times out sometimes
https://bugs.webkit.org/show_bug.cgi?id=170958

Reviewed by Keith Miller.

Add the ability to skip tests easily. Skip the test.

  • wasm.yaml:
  • wasm/function-tests/memory-multiagent.js:
12:02 PM Changeset in webkit [215474] by sbarati@apple.com
  • 8 edits in trunk

JSTests:
Follow up to debug build stack overflow in test after r215453

Rubber stamped by Mark Lam.

  • stress/call-apply-exponential-bytecode-size.js: Decrease the call

size to prevent stack overflow errors on debug builds.

Source/JavaScriptCore:
Follow up to address Mark's comments after r215453

Rubber stamped by Mark Lam.

This patch chooses better names for things, adhering to Mark's suggestions
in https://bugs.webkit.org/show_bug.cgi?id=139847

  • bytecompiler/NodesCodegen.cpp:

(JSC::CallFunctionCallDotNode::emitBytecode):
(JSC::ApplyFunctionCallDotNode::emitBytecode):

  • parser/NodeConstructors.h:

(JSC::CallFunctionCallDotNode::CallFunctionCallDotNode):
(JSC::ApplyFunctionCallDotNode::ApplyFunctionCallDotNode):

  • parser/Nodes.h:
  • parser/Parser.cpp:

(JSC::recordCallOrApplyDepth):
(JSC::Parser<LexerType>::parseMemberExpression):

  • parser/Parser.h:

(JSC::Parser::CallOrApplyDepthScope::CallOrApplyDepthScope):
(JSC::Parser::CallOrApplyDepthScope::distanceToInnermostChild):
(JSC::Parser::CallOrApplyDepthScope::~CallOrApplyDepthScope):
(JSC::Parser::CallOrApplyDepth::CallOrApplyDepth): Deleted.
(JSC::Parser::CallOrApplyDepth::maxChildDepth): Deleted.
(JSC::Parser::CallOrApplyDepth::~CallOrApplyDepth): Deleted.

11:50 AM Changeset in webkit [215473] by Matt Baker
  • 3 edits in trunk/Source/WebInspectorUI

Web Inspector: XHR breakpoints shouldn't be cleared from the sidebar on reload
https://bugs.webkit.org/show_bug.cgi?id=170930

Reviewed by Joseph Pecoraro.

XHR breakpoints aren't associated with the main resource, and shouldn't
be cleared from the manager or sidebar UI When the main resource changes.

  • UserInterface/Controllers/DOMDebuggerManager.js:

(WebInspector.DOMDebuggerManager.prototype._mainResourceDidChange):

  • UserInterface/Controllers/XHRBreakpointTreeController.js:

(WebInspector.XHRBreakpointTreeController):
(WebInspector.XHRBreakpointTreeController.prototype._mainResourceDidChange): Deleted.

11:06 AM Changeset in webkit [215472] by Yusuke Suzuki
  • 4 edits
    4 adds in trunk

[DFG] Convert ValueAdd(Int32, String) => MakeRope(ToString(Int32), String)
https://bugs.webkit.org/show_bug.cgi?id=170943

Reviewed by Geoffrey Garen.

JSTests:

  • microbenchmarks/number-to-string-with-add-empty.js: Added.

(toStringLeft):
(toStringRight):

  • microbenchmarks/number-to-string-with-add-in-loop.js: Added.

(toStringLeft):
(toStringRight):

  • microbenchmarks/number-to-string-with-add.js: Added.

(toStringLeft):
(toStringRight):

  • stress/number-to-string-with-add.js: Added.

(shouldBe):
(toStringRight):
(toStringLeftEmpty):
(toStringRightEmpty):

Source/JavaScriptCore:

This patch converts ValueAdd(Int32, String) to MakeRope(ToString(Int32), String).
This has 2 great features.

  1. MakeRope(ToString(Int32), String) is less clobbering.

While ValueAdd ends up calling functions, VM knows much about MakeRope(ToString(Int32), String)
and VM knows it is less clobbering. It encourages LICM and other operations that is conservatively
executed because of ValueAdd's clobbering.

  1. Simply, MakeRope(ToString(Int32), String) is faster than ValueAdd.

While ValueAdd ends up calling a generic function, our ToString(Int32) calls well-optimized toString
operation. And later, MakeRope can fall into the fast path that just takes a string from a free list.
It is simply faster than ValueAdd.

We ensure that this patch shows performance improvement in attached benchmarks.

baseline patched

number-to-string-with-add-empty 16.2763+-3.3930 10.3142+-1.0967 definitely 1.5780x faster
number-to-string-with-add-in-loop 168.7621+-10.9738 15.5307+-3.3179 definitely 10.8664x faster
number-to-string-with-add 18.8557+-4.8292 11.6901+-2.5650 might be 1.6130x faster

In SixSpeed,

baseline patched

template_string_tag.es5 200.1027+-20.6871 25.7925+-11.4052 definitely 7.7582x faster
template_string_tag.es6 331.3913+-12.1750 286.6958+-26.0441 definitely 1.1559x faster
for-of-array.es5 412.4344+-23.2517 272.8707+-47.2118 definitely 1.5115x faster
for-of-array.es6 504.0082+-65.5045 300.3277+-12.8193 definitely 1.6782x faster

  • dfg/DFGFixupPhase.cpp:

(JSC::DFG::FixupPhase::fixupNode):
(JSC::DFG::FixupPhase::createToString):

  • dfg/DFGPredictionPropagationPhase.cpp:
10:54 AM Changeset in webkit [215471] by msaboff@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

REGRESSION(215272): microbenchmark/seal-and-do-work and microbenchmark/freeze-and-do-work are 27x slower
https://bugs.webkit.org/show_bug.cgi?id=170881

Reviewed by Saam Barati.

  • runtime/ObjectConstructor.cpp:

(JSC::objectConstructorSeal):
(JSC::objectConstructorFreeze):
Restored fast paths for final objects that don't have indexed properties.

10:34 AM Changeset in webkit [215470] by jbedard@apple.com
  • 3 edits in trunk/Tools

Unreviewed, rolling out r215346 and 215361.

The problem these changes were fixing was addressed in
<https://trac.webkit.org/changeset/215416/webkit>.

Reverted changesets:

"webkitpy: Ignore previously launched pid when system is under
stress"
https://bugs.webkit.org/show_bug.cgi?id=170741
http://trac.webkit.org/changeset/215346
http://trac.webkit.org/changeset/215361

10:31 AM Changeset in webkit [215469] by antti@apple.com
  • 10 edits
    2 adds in trunk

Enable optimized layer flushes on iOS
https://bugs.webkit.org/show_bug.cgi?id=170938
<rdar://problem/31677395>

Reviewed by Simon Fraser.

Source/WebCore:

Test: compositing/ios/overflow-scroll-touch-tiles.html

  • platform/graphics/GraphicsLayer.h:

(WebCore::GraphicsLayer::setApproximatePosition):

Make virtual.

(WebCore::GraphicsLayer::flushCompositingState):

  • platform/graphics/ca/GraphicsLayerCA.cpp:

(WebCore::GraphicsLayerCA::syncPosition):

Rename PositionChanged enum value to more descriptive NeedsComputeVisibleAndCoverageRect.

(WebCore::GraphicsLayerCA::setApproximatePosition):
(WebCore::GraphicsLayerCA::syncBoundsOrigin):

Like syncPosition make these invalidate the geometry without scheduling a flush. This is needed
so when flush happens we don't just optimize it away. Tile coverage depends on position and bounds.

(WebCore::GraphicsLayerCA::flushCompositingState):

Remove FlushScope argument.
Disable optimization on WK1 due to some UIKit interactions.

  • platform/graphics/ca/GraphicsLayerCA.h:
  • platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:

(WebCore::GraphicsLayerTextureMapper::flushCompositingState):

  • platform/graphics/texmap/GraphicsLayerTextureMapper.h:

LayoutTests:

Add test verifying that tiles get created for touch overflow scrolling.

  • compositing/ios/overflow-scroll-touch-tiles-expected.txt: Added.
  • compositing/ios/overflow-scroll-touch-tiles.html: Added.
10:14 AM Changeset in webkit [215468] by timothy_horton@apple.com
  • 3 edits in trunk/Source/WebKit2

Force scroll view insets to be respected regardless of rubber-banding state
https://bugs.webkit.org/show_bug.cgi?id=170937
<rdar://problem/31412788>

Reviewed by Simon Fraser.

  • Platform/spi/ios/UIKitSPI.h:
  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _initializeWithConfiguration:]):

10:11 AM Changeset in webkit [215467] by timothy_horton@apple.com
  • 2 edits in trunk/Source/WebCore

Try to fix the iOS Debug build

  • platform/LengthBox.h:
9:42 AM Changeset in webkit [215466] by Yusuke Suzuki
  • 2 edits in trunk/Source/JavaScriptCore

[DFG] Use Phantom for base instead of getter when inlining intrinsic getter
https://bugs.webkit.org/show_bug.cgi?id=170947

Reviewed by Saam Barati.

getter does not need to be live after OSR Exit.

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::handleGetById):

9:34 AM Changeset in webkit [215465] by akling@apple.com
  • 2 edits in trunk/Source/WebCore

Break Document::m_associatedFormControls reference cycle.
<https://webkit.org/b/170946>

Reviewed by Antti Koivisto.

There was a race between didAssociateFormControls() and didAssociateFormControlsTimerFired()
where detaching Document from its frame between the two would lead to an unbreakable reference
cycle between Document and its form elements.

Solve this by clearing the set of associated form elements in removedLastRef(), where we clear
all the other strong smart pointers to elements.

  • dom/Document.cpp:

(WebCore::Document::removedLastRef):

9:33 AM Changeset in webkit [215464] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Update TestExpectations for "selectors4" tests on mac-wk1.
https://trac.webkit.org/changeset/215457/webkit

Unreviewed test gardening.

  • platform/mac-wk1/TestExpectations:
9:27 AM Changeset in webkit [215463] by Manuel Rego Casasnovas
  • 8 edits
    2 adds in trunk

[css-grid] Add support for percentage gaps
https://bugs.webkit.org/show_bug.cgi?id=170764

Reviewed by Sergio Villar Senin.

Source/WebCore:

Part of the code to support percentage gaps was already imported
from Blink in r213149 (bug #168657). However parsing was not enabled yet,
so some pieces were missing.

This patch accepts percentages in the parsing of grid-column-gap and
grid-row-gap properties, and the grid-gap shorthand.
On top of that it gets rid of GridTrackSizingAlgorithm::sizingOperation()
method as it's not needed. And instead it passes the specific operation
to each call to RenderGrid::guttersSize(), otherwise we would be getting
wrong results.

Test: fast/css-grid-layout/grid-gutters-as-percentage.html

  • css/parser/CSSPropertyParser.cpp:

(WebCore::CSSPropertyParser::parseSingleValue): Add support for
percentage values.
(WebCore::CSSPropertyParser::parseShorthand): Ditto.

  • rendering/GridTrackSizingAlgorithm.cpp:

(WebCore::IndefiniteSizeStrategy::recomputeUsedFlexFractionIfNeeded):
Pass the specific sizing operation.

  • rendering/GridTrackSizingAlgorithm.h: Remove sizingOperation().
  • rendering/RenderGrid.cpp:

(WebCore::RenderGrid::computeTrackBasedLogicalHeight): Pass the specific
sizing operation.
(WebCore::RenderGrid::computeTrackSizesForDefiniteSize): Ditto.
(WebCore::RenderGrid::computeTrackSizesForIndefiniteSize): Ditto.
(WebCore::RenderGrid::populateGridPositionsForDirection): Ditto.

LayoutTests:

Import tests from Blink.

  • fast/css-grid-layout/grid-gutters-as-percentage-expected.txt: Added.
  • fast/css-grid-layout/grid-gutters-as-percentage.html: Added.
  • fast/css-grid-layout/grid-gutters-get-set-expected.txt:
  • fast/css-grid-layout/grid-gutters-get-set.html:
9:17 AM Changeset in webkit [215462] by Jon Davis
  • 2 edits in trunk/Websites/webkit.org

Images in WebKit.org blog article are stretched out
https://bugs.webkit.org/show_bug.cgi?id=169208

Reviewed by Michael Catanzaro.

  • wp-content/themes/webkit/style.css:

(article figure > img):

9:15 AM Changeset in webkit [215461] by pvollan@apple.com
  • 3 edits in trunk/Source/WebCore

Add fallback fonts to video captions stylesheet.
https://bugs.webkit.org/show_bug.cgi?id=170495

Reviewed by Eric Carlson.

The kCTFontCascadeListAttribute key is used to obtain the cascade list for a font reference.

I have not added a test, since CaptionUserPreferences::testingMode() returns true when running tests,
preventing this code path from being executed.

  • page/CaptionUserPreferencesMediaAF.cpp:

(WebCore::CaptionUserPreferencesMediaAF::captionsDefaultFontCSS):

  • platform/spi/win/CoreTextSPIWin.h:
8:39 AM Changeset in webkit [215460] by Yusuke Suzuki
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed, follow-up patch after r215459
https://bugs.webkit.org/show_bug.cgi?id=170940

Reviewed by Filip Pizlo.

CheckCell can cause OSRExit. Thus Phantom should be placed after CheckCell.

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::emitFunctionChecks):
(JSC::DFG::ByteCodeParser::handleGetById):

8:04 AM Changeset in webkit [215459] by Yusuke Suzuki
  • 3 edits
    1 add in trunk

[DFG] Drop unknown use of CheckCell's child2 to work ObjectAllocationSinking for Array iterator object
https://bugs.webkit.org/show_bug.cgi?id=170940

Reviewed by Filip Pizlo.

JSTests:

  • microbenchmarks/for-of-array.js: Added.

(fn):

Source/JavaScriptCore:

The second argument of CheckCell is not used in meaningful way. It is just *use* the node.
The problem is that it effectively *use* the child2 in ObjectAllocationSinking phase, and
prevent us from eliminating object allocations. Actually, it materializes Array iterator
when inlining next(). Instead, we should use Phantom in such a case.

It improves destructuring.es6 in SixSpeed 2.5x.

destructuring.es6 308.5184+-25.3490 119.5680+-15.0520 definitely 2.5803x faster

Note that SixSpeed tested in arewefastyet executes all the tests in one process while our SixSpeed
tests each one in isolated way.

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::emitFunctionChecks):
(JSC::DFG::ByteCodeParser::handleGetById):

4:54 AM Changeset in webkit [215458] by magomez@igalia.com
  • 3 edits
    3 adds in trunk

[GTK+] Crash in WebCore::ImageFrame::ImageFrame()
https://bugs.webkit.org/show_bug.cgi?id=170332

Reviewed by Carlos Garcia Campos.

Source/WebCore:

When decoding a PNG image, don't reset the number of frames to 1 when there's a decoding error. Doing
so causes a crash if the number of frames we reported before is bigger than 1.

Test: fast/images/bad-png-missing-fdat.html

  • platform/image-decoders/png/PNGImageDecoder.cpp:

(WebCore::PNGImageDecoder::fallbackNotAnimated):

LayoutTests:

Added a test to ensure that the browser doesn't crash when loading a PNG image which
reports a wrong number of frames.

  • fast/images/bad-png-missing-fdat-expected.txt: Added.
  • fast/images/bad-png-missing-fdat.html: Added.
  • fast/images/resources/bad-png-missing-fdAT.png: Added.
2:17 AM Changeset in webkit [215457] by Manuel Rego Casasnovas
  • 5 edits
    41 adds in trunk/LayoutTests

[selectors4] Import W3C Test Suite
https://bugs.webkit.org/show_bug.cgi?id=170898

Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

This patch imports "selectors4" test suite from WPT repo:
https://github.com/w3c/web-platform-tests/tree/master/css/selectors4

  • resources/import-expectations.json:
  • web-platform-tests/css/selectors4/OWNERS: Added.
  • web-platform-tests/css/selectors4/focus-within-001-expected.html: Added.
  • web-platform-tests/css/selectors4/focus-within-001.html: Added.
  • web-platform-tests/css/selectors4/focus-within-002-expected.html: Added.
  • web-platform-tests/css/selectors4/focus-within-002.html: Added.
  • web-platform-tests/css/selectors4/focus-within-003-expected.html: Added.
  • web-platform-tests/css/selectors4/focus-within-003.html: Added.
  • web-platform-tests/css/selectors4/focus-within-004-expected.html: Added.
  • web-platform-tests/css/selectors4/focus-within-004.html: Added.
  • web-platform-tests/css/selectors4/focus-within-005-expected.html: Added.
  • web-platform-tests/css/selectors4/focus-within-005.html: Added.
  • web-platform-tests/css/selectors4/focus-within-006-expected.html: Added.
  • web-platform-tests/css/selectors4/focus-within-006.html: Added.
  • web-platform-tests/css/selectors4/focus-within-007-expected.html: Added.
  • web-platform-tests/css/selectors4/focus-within-007.html: Added.
  • web-platform-tests/css/selectors4/focus-within-008-expected.html: Added.
  • web-platform-tests/css/selectors4/focus-within-008.html: Added.
  • web-platform-tests/css/selectors4/focus-within-009-expected.txt: Added.
  • web-platform-tests/css/selectors4/focus-within-009.html: Added.
  • web-platform-tests/css/selectors4/focus-within-shadow-001-expected.html: Added.
  • web-platform-tests/css/selectors4/focus-within-shadow-001.html: Added.
  • web-platform-tests/css/selectors4/focus-within-shadow-002-expected.html: Added.
  • web-platform-tests/css/selectors4/focus-within-shadow-002.html: Added.
  • web-platform-tests/css/selectors4/focus-within-shadow-003-expected.html: Added.
  • web-platform-tests/css/selectors4/focus-within-shadow-003.html: Added.
  • web-platform-tests/css/selectors4/focus-within-shadow-004-expected.html: Added.
  • web-platform-tests/css/selectors4/focus-within-shadow-004.html: Added.
  • web-platform-tests/css/selectors4/focus-within-shadow-005-expected.html: Added.
  • web-platform-tests/css/selectors4/focus-within-shadow-005.html: Added.
  • web-platform-tests/css/selectors4/focus-within-shadow-006-expected.html: Added.
  • web-platform-tests/css/selectors4/focus-within-shadow-006.html: Added.
  • web-platform-tests/css/selectors4/of-type-selectors-expected.xhtml: Added.
  • web-platform-tests/css/selectors4/of-type-selectors.xhtml: Added.
  • web-platform-tests/css/selectors4/selector-required-expected.html: Added.
  • web-platform-tests/css/selectors4/selector-required.html: Added.
  • web-platform-tests/css/selectors4/selectors-dir-selector-ltr-001-expected.xht: Added.
  • web-platform-tests/css/selectors4/selectors-dir-selector-ltr-001.html: Added.
  • web-platform-tests/css/selectors4/selectors-dir-selector-rtl-001-expected.xht: Added.
  • web-platform-tests/css/selectors4/selectors-dir-selector-rtl-001.html: Added.
  • web-platform-tests/css/selectors4/w3c-import.log: Added.

LayoutTests:

  • TestExpectations: Mark a few tests as failure linking to the related bugs.
  • platform/mac-wk1/TestExpectations: Marking some tests that have issues on WK1.
1:11 AM Changeset in webkit [215456] by Carlos Garcia Campos
  • 2 edits in trunk/LayoutTests

Unreviewed GTK+ gardening. Add several test expectations.

  • platform/gtk/TestExpectations:
12:57 AM Changeset in webkit [215455] by commit-queue@webkit.org
  • 9 edits in trunk/Source

[GLIB] Define priorities also for async network IO tasks
https://bugs.webkit.org/show_bug.cgi?id=170905

Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2017-04-18
Reviewed by Žan Doberšek.

Source/WebCore:

  • platform/network/soup/ResourceHandleSoup.cpp:

(WebCore::redirectSkipCallback):
(WebCore::sendRequestCallback):
(WebCore::continueAfterDidReceiveResponse):
(WebCore::readCallback):

  • platform/network/soup/SocketStreamHandleImplSoup.cpp:

(WebCore::SocketStreamHandleImpl::connected):
(WebCore::SocketStreamHandleImpl::readBytes):

Source/WebKit2:

  • NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp:

(WebKit::NetworkCache::inputStreamReadReadyCallback):
(WebKit::NetworkCache::IOChannel::read):
(WebKit::NetworkCache::outputStreamWriteReadyCallback):
(WebKit::NetworkCache::IOChannel::write):

  • NetworkProcess/soup/NetworkDataTaskSoup.cpp:

(WebKit::NetworkDataTaskSoup::skipInputStreamForRedirection):
(WebKit::NetworkDataTaskSoup::read):
(WebKit::NetworkDataTaskSoup::requestNextPart):
(WebKit::NetworkDataTaskSoup::writeDownload):
(WebKit::NetworkDataTaskSoup::didFinishDownload):

  • UIProcess/API/gtk/WebKitURISchemeRequest.cpp:

(webkitURISchemeRequestReadCallback):
(webkit_uri_scheme_request_finish):

Source/WTF:

Add AsyncIONetwork, DiskCacheRead and DiskCacheWrite priorities.

  • wtf/glib/RunLoopSourcePriority.h:
12:28 AM Changeset in webkit [215454] by Yusuke Suzuki
  • 5 edits in trunk/Source

[JSC][GTK] glib RunLoop does not accept negative start interval
https://bugs.webkit.org/show_bug.cgi?id=170775

Reviewed by Saam Barati.

Source/JavaScriptCore:

  • heap/GCActivityCallback.cpp:

(JSC::GCActivityCallback::scheduleTimer):

Source/WTF:

RunLoop::Timer for glib does not accept negative start interval.
We use 0_s if the given value is negative.

  • wtf/glib/RunLoopGLib.cpp:

(WTF::RunLoop::TimerBase::secondsUntilFire):

Apr 17, 2017:

11:43 PM Changeset in webkit [215453] by sbarati@apple.com
  • 9 edits
    1 add in trunk

BytecodeGenerator ".call" and ".apply" is exponential in nesting depth
https://bugs.webkit.org/show_bug.cgi?id=139847
<rdar://problem/19321122>

Reviewed by Oliver Hunt.

JSTests:

  • stress/call-apply-exponential-bytecode-size.js: Added.

(assert):
(const.inc):
(const.inc2):
(bar):
(randomApplyOrCall):
(baz):
(jaz):
(haz):
(foo):

Source/JavaScriptCore:

The BytecodeGenerator's .apply(...) and .call(...) code would
emit bytecode for the evaluation of its arguments twice. This
is exponential, specifically, 2n, where n is the nesting depth of
.call(...) or .apply(...) inside other .call(...) or .apply(...).

The reason we emit code for the arguments twice is that we try
to emit efficient code for when .call or .apply is Function.prototype.call
or Function.prototype.apply. Because of this, we compare .call/.apply to
Function.prototype.call/.apply, and if they're the same, we emit a specialized
function call in bytecode. Otherwise, we emit the generalized version.

This patch makes it so that each .call(...) and .apply(...) records
its max inner nesting depth. Then, we only perform the optimization
for the bottom k (where k = 6) layers of the nesting tree. The reason we
apply the optimization to the bottom k layers instead of top k layers
is that we'll produce less code this way.

  • bytecompiler/NodesCodegen.cpp:

(JSC::CallFunctionCallDotNode::emitBytecode):
(JSC::ApplyFunctionCallDotNode::emitBytecode):

  • parser/ASTBuilder.h:

(JSC::ASTBuilder::makeFunctionCallNode):

  • parser/NodeConstructors.h:

(JSC::CallFunctionCallDotNode::CallFunctionCallDotNode):
(JSC::ApplyFunctionCallDotNode::ApplyFunctionCallDotNode):

  • parser/Nodes.h:
  • parser/Parser.cpp:

(JSC::recordCallOrApplyDepth):
(JSC::Parser<LexerType>::parseMemberExpression):

  • parser/Parser.h:

(JSC::Parser::CallOrApplyDepth::CallOrApplyDepth):
(JSC::Parser::CallOrApplyDepth::maxChildDepth):
(JSC::Parser::CallOrApplyDepth::~CallOrApplyDepth):

  • parser/SyntaxChecker.h:

(JSC::SyntaxChecker::makeFunctionCallNode):

11:05 PM Changeset in webkit [215452] by zandobersek@gmail.com
  • 2 edits in trunk/Source/WebCore

Unreviewed build fix for !ENABLE(MEDIA_STREAM) configurations.

  • html/MediaElementSession.cpp:

(WebCore::MediaElementSession::playbackPermitted): Guard the use of
HTMLMediaElement::hasMediaStreamSrcObject() with ENABLE(MEDIA_STREAM).

10:55 PM Changeset in webkit [215451] by mark.lam@apple.com
  • 3 edits
    1 add in trunk

JSArray::appendMemcpy() needs to handle copying from Undecided indexing type too.
https://bugs.webkit.org/show_bug.cgi?id=170896
<rdar://problem/31651319>

Reviewed by JF Bastien and Keith Miller.

JSTests:

  • stress/regress-170896.js: Added.

Source/JavaScriptCore:

  • runtime/JSArray.cpp:

(JSC::JSArray::appendMemcpy):

10:37 PM Changeset in webkit [215450] by achristensen@apple.com
  • 7 edits in trunk

Allow Variants of RetainPtrs
https://bugs.webkit.org/show_bug.cgi?id=170923

Reviewed by Tim Horton and Sam Weinig.

Source/WebCore:

No change in behavior. Just updated the one class that used RetainPtr::operator& to cleanly initialize
RetainPtrs instead of taking the address of a smart pointer and forcing a value inside of it.

  • platform/mac/SSLKeyGeneratorMac.mm:

(WebCore::signedPublicKeyAndChallengeString):

Source/WTF:

  • wtf/RetainPtr.h:

(WTF::RetainPtr::operator&): Deleted.
Operator& was causing a compile error when making Variant<RetainPtr<T>, ...>
and because it is strange and only used once, let's just remove it.

  • wtf/Variant.h:

(WTF::get):
(WTF::get_if):
Use std::addressof instead of operator& which could be overloaded to return any type with any meaning.

Tools:

  • TestWebKitAPI/Tests/WTF/Variant.cpp:

(TestWebKitAPI::TEST):
Add tests for RetainPtr and for another class with overloaded operator& to verify such classes can
work in Variants.

9:55 PM Changeset in webkit [215449] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Network columns don't get saved when Web Inspector is closed
https://bugs.webkit.org/show_bug.cgi?id=170373
<rdar://problem/31386336>

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2017-04-17
Reviewed by Matt Baker.

  • UserInterface/Views/DataGrid.js:

(WebInspector.DataGrid.prototype.setColumnVisible):
(WebInspector.DataGrid.prototype._contextMenuInHeader):
The context menu was often passing undefined as the visible value
which would cause the setting to not be saved appropriately. Ensure
we always get an explicit boolean.

9:48 PM Changeset in webkit [215448] by nvasilyev@apple.com
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Use text-align: start for DataGrid headers
https://bugs.webkit.org/show_bug.cgi?id=170871

Reviewed by Matt Baker.

text-align: start didn't work for th elements.
It was fixed in <webkit.org/b/141417>.

  • UserInterface/Views/DataGrid.css:

(.data-grid th):
(body[dir=ltr] .data-grid th): Deleted.
(body[dir=rtl] .data-grid th): Deleted.

8:21 PM Changeset in webkit [215447] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebCore

[WinCairo] 'WebCore::GraphicsLayerTextureMapper::flushCompositingStated': method with override specifier 'override' did not override any base class methods
https://bugs.webkit.org/show_bug.cgi?id=170928

Patch by Fujii Hironori <Fujii Hironori> on 2017-04-17
Reviewed by Simon Fraser.

Apply the same change of CoordinatedGraphicsLayer.{cpp,h} of r215410 to GraphicsLayerTextureMapper.{cpp,h}.

  • platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:

(WebCore::GraphicsLayerTextureMapper::flushCompositingState): Added the second argument.

  • platform/graphics/texmap/GraphicsLayerTextureMapper.h: Ditto.
7:37 PM Changeset in webkit [215446] by timothy_horton@apple.com
  • 25 edits in trunk/Source

Plumb all four obscured insets to WebCore, instead of just top/left
https://bugs.webkit.org/show_bug.cgi?id=170913

Reviewed by Wenson Hsieh.

Source/WebCore:

No new tests, no observable behavior change yet.

In preparation for a future patch (for rdar://problem/31564652), plumb
all four obscured insets to WebCore/the Web Content process, instead of
just the top and left insets.

  • history/HistoryItem.cpp:

(WebCore::HistoryItem::HistoryItem):

  • history/HistoryItem.h:

(WebCore::HistoryItem::obscuredInsets):
(WebCore::HistoryItem::setObscuredInsets):
(WebCore::HistoryItem::obscuredInset): Deleted.
(WebCore::HistoryItem::setObscuredInset): Deleted.

  • loader/HistoryController.cpp:

(WebCore::HistoryController::saveScrollPositionAndViewStateToItem):

  • page/Page.h:

(WebCore::Page::obscuredInsets):
(WebCore::Page::setObscuredInsets):
(WebCore::Page::obscuredInset): Deleted.
(WebCore::Page::setObscuredInset): Deleted.
Adopt FloatBoxExtent for obscuredInsets (and adjust pluralization).

Source/WebKit2:

  • Shared/VisibleContentRectUpdateInfo.cpp:

(WebKit::VisibleContentRectUpdateInfo::encode):
(WebKit::VisibleContentRectUpdateInfo::decode):
(WebKit::operator<<):

  • Shared/VisibleContentRectUpdateInfo.h:

(WebKit::VisibleContentRectUpdateInfo::VisibleContentRectUpdateInfo):
(WebKit::VisibleContentRectUpdateInfo::obscuredInsets):
(WebKit::operator==):
(WebKit::VisibleContentRectUpdateInfo::obscuredInset): Deleted.

  • Shared/WebCoreArgumentCoders.cpp:

(IPC::ArgumentCoder<FloatRectInsets>::encode):
(IPC::ArgumentCoder<FloatRectInsets>::decode):

  • Shared/WebCoreArgumentCoders.h:
  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _didCommitLayerTree:]):
(-[WKWebView _restorePageScrollPosition:scrollOrigin:previousObscuredInset:scale:]):
(-[WKWebView _updateVisibleContentRects]):

  • UIProcess/API/Cocoa/WKWebViewInternal.h:
  • UIProcess/PageClient.h:
  • UIProcess/WebPageProxy.cpp:
  • UIProcess/WebPageProxy.h:
  • UIProcess/WebPageProxy.messages.in:
  • UIProcess/ios/PageClientImplIOS.h:
  • UIProcess/ios/PageClientImplIOS.mm:

(WebKit::PageClientImpl::restorePageState):

  • UIProcess/ios/WKContentView.h:
  • UIProcess/ios/WKContentView.mm:

(-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:obscuredInsets:inputViewBounds:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:enclosedInScrollableAncestorView:]):
(-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:obscuredInset:inputViewBounds:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:enclosedInScrollableAncestorView:]): Deleted.

  • UIProcess/ios/WebPageProxyIOS.mm:

(WebKit::WebPageProxy::restorePageState):

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::restorePageState):
(WebKit::WebPage::updateVisibleContentRects):
Adopt FloatBoxExtent for obscuredInsets (and adjust pluralization).

6:30 PM Changeset in webkit [215445] by joepeck@webkit.org
  • 17 edits
    14 adds in trunk

Web Inspector: Doesn't show size of compressed content correctly
https://bugs.webkit.org/show_bug.cgi?id=155112
<rdar://problem/25006728>

Reviewed by Alex Christensen and Timothy Hatcher.

Source/JavaScriptCore:

  • inspector/protocol/Network.json:

New, exact size metrics, available after the load completes.

Source/WebCore:

Tests: http/tests/inspector/network/resource-sizes-disk-cache.html

http/tests/inspector/network/resource-sizes-memory-cache.html
http/tests/inspector/network/resource-sizes-network.html

  • inspector/InspectorNetworkAgent.cpp:

(WebCore::InspectorNetworkAgent::buildObjectForMetrics):

  • platform/network/NetworkLoadMetrics.h:

(WebCore::NetworkLoadMetrics::isolatedCopy):
(WebCore::NetworkLoadMetrics::reset):
(WebCore::NetworkLoadMetrics::clearNonTimingData):
(WebCore::NetworkLoadMetrics::operator==):
(WebCore::NetworkLoadMetrics::encode):
(WebCore::NetworkLoadMetrics::decode):

  • platform/spi/cf/CFNetworkSPI.h:

Source/WebInspectorUI:

  • UserInterface/Controllers/FrameResourceManager.js:

(WebInspector.FrameResourceManager.prototype.resourceRequestWasServedFromMemoryCache):
Set an exact size.

  • UserInterface/Models/Resource.js:

(WebInspector.Resource):
(WebInspector.Resource.prototype.get requestHeadersTransferSize):
(WebInspector.Resource.prototype.get requestBodyTransferSize):
(WebInspector.Resource.prototype.get responseHeadersTransferSize):
(WebInspector.Resource.prototype.get responseBodyTransferSize):
(WebInspector.Resource.prototype.get cachedResponseBodySize):
(WebInspector.Resource.prototype.get size):
(WebInspector.Resource.prototype.get networkEncodedSize):
(WebInspector.Resource.prototype.get networkDecodedSize):
(WebInspector.Resource.prototype.get networkTotalTransferSize):
(WebInspector.Resource.prototype.get estimatedNetworkEncodedSize):
(WebInspector.Resource.prototype.get estimatedTotalTransferSize):
(WebInspector.Resource.prototype.get compressed):
(WebInspector.Resource.prototype.updateForResponse):
(WebInspector.Resource.prototype.updateWithMetrics):
(WebInspector.Resource.prototype.setCachedResponseBodySize):
(WebInspector.Resource.prototype.increaseSize):
(WebInspector.Resource.prototype.increaseTransferSize):
(WebInspector.Resource.prototype.get encodedSize): Deleted.
(WebInspector.Resource.prototype.get transferSize): Deleted.
Be more explicit with size getters.

(WebInspector.Resource.prototype.updateWithMetrics):
If we receive the size metrics, update the specific metric values.

  • UserInterface/Views/ResourceDetailsSidebarPanel.js:

(WebInspector.ResourceDetailsSidebarPanel.prototype._refreshCompressed):
(WebInspector.ResourceDetailsSidebarPanel.prototype._refreshDecodedSize):
(WebInspector.ResourceDetailsSidebarPanel.prototype._refreshTransferSize):

  • UserInterface/Views/ResourceTimelineDataGridNode.js:

(WebInspector.ResourceTimelineDataGridNode.prototype.get data):
Show exact values if we have them, otherwise fall back to the calculated
values during loading.

Source/WebKit2:

  • NetworkProcess/NetworkResourceLoader.cpp:

(WebKit::NetworkResourceLoader::sendResultForCacheEntry):

  • NetworkProcess/cocoa/NetworkSessionCocoa.mm:

(-[WKNetworkSessionDelegate URLSession:task:didFinishCollectingMetrics:]):
Include size information in network load metrics.

LayoutTests:

  • http/tests/inspector/network/resource-sizes-disk-cache-expected.txt: Added.
  • http/tests/inspector/network/resource-sizes-disk-cache.html: Added.
  • http/tests/inspector/network/resource-sizes-memory-cache-expected.txt: Added.
  • http/tests/inspector/network/resource-sizes-memory-cache.html: Added.
  • http/tests/inspector/network/resource-sizes-network-expected.txt: Added.
  • http/tests/inspector/network/resource-sizes-network.html: Added.

Test resource sizes under different load conditions.

  • platform/mac/http/tests/inspector/network/resource-sizes-memory-cache-expected.txt: Added.
  • platform/mac/http/tests/inspector/network/resource-sizes-network-expected.txt: Added.

Older versions of macOS will not have the new metrics, but test their output anyways.

  • http/tests/inspector/network/resources/404.php: Added.
  • http/tests/inspector/network/resources/gzipped-lorem-no-content-length.php: Added.
  • http/tests/inspector/network/resources/gzipped-lorem.php: Added.
  • http/tests/inspector/network/resources/lorem.txt: Added.

Different resources with fixed sizes (text, gzipped, 404 with fixed response).

  • http/tests/inspector/network/resources/resource-size-test.js: Added.

(TestPage.registerInitializer.InspectorTest.gracefulExpectEquals):
(TestPage.registerInitializer.window.addResourceSizeTest):
(TestPage.registerInitializer):
Shared test code for resource sizes.

  • platform/mac-wk1/TestExpectations:
  • platform/win/TestExpectations:
5:43 PM Changeset in webkit [215444] by commit-queue@webkit.org
  • 6 edits
    2 adds in trunk

Enable video autoplay when getUserMedia is on
https://bugs.webkit.org/show_bug.cgi?id=170919

Patch by Youenn Fablet <youenn@apple.com> on 2017-04-17
Reviewed by Geoffrey Garen.

Source/WebCore:

Test: webrtc/video-autoplay.html

  • dom/Document.h:

(WebCore::Document::isCapturing):

  • html/HTMLMediaElement.h:

(WebCore::HTMLMediaElement::hasMediaStreamSrcObject):

  • html/MediaElementSession.cpp:

(WebCore::MediaElementSession::playbackPermitted): Allowing playback if getUserMedia is capturing audio or video
on the document and if element is rendering MediaStream based content.

  • page/MediaProducer.h:

(WebCore::MediaProducer::isCapturing):

LayoutTests:

  • webrtc/video-autoplay-expected.txt: Added.
  • webrtc/video-autoplay.html: Added.
5:14 PM Changeset in webkit [215443] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebKit2

com.apple.WebKit.Networking.Development crashed in com.apple.WebKit: WebKit::NetworkRTCProvider::resolvedName
https://bugs.webkit.org/show_bug.cgi?id=170889

Patch by Youenn Fablet <youenn@apple.com> on 2017-04-17
Reviewed by Alex Christensen.

  • NetworkProcess/webrtc/NetworkRTCProvider.cpp:

(WebKit::NetworkRTCProvider::Resolver::~Resolver): Unschedule the host resolution in addition to cancelling it.
Providing a test would need to stop the resolver between the time the resolver is created and gets
data in the network process. Or we would need to change Resolver to be instantiated/tested on its own.

  • NetworkProcess/webrtc/NetworkRTCProvider.h:
4:26 PM Changeset in webkit [215442] by jmarcell@apple.com
  • 7 edits in tags/Safari-604.1.17.1/Source

Versioning.

4:22 PM Changeset in webkit [215441] by beidson@apple.com
  • 9 edits in trunk

Make WKHTTPCookieStore public.
<rdar://problem/31024691> and https://bugs.webkit.org/show_bug.cgi?id=170920

Reviewed by Geoffrey Garen.

Source/WebKit2:

  • UIProcess/API/Cocoa/WKHTTPCookieStore.h:
  • UIProcess/API/Cocoa/WKHTTPCookieStore.mm:

(-[WKHTTPCookieStore getAllCookies:]):
(-[WKHTTPCookieStore allCookies:]): Deleted.

  • UIProcess/API/Cocoa/WKWebsiteDataStore.h:
  • UIProcess/API/Cocoa/WKWebsiteDataStore.mm:

(-[WKWebsiteDataStore httpCookieStore]):
(-[WKWebsiteDataStore _httpCookieStore]): Deleted.

  • UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h:
  • WebKit2.xcodeproj/project.pbxproj:

Tools:

  • TestWebKitAPI/Tests/WebKit2Cocoa/WKHTTPCookieStore.mm:

(TEST):

4:16 PM Changeset in webkit [215440] by Jon Davis
  • 3 edits
    2 adds in trunk/Source/WebInspectorUI

Web Inspector: new icon for Disable Caches button in Network Tab
https://bugs.webkit.org/show_bug.cgi?id=170196

Reviewed by Joseph Pecoraro.

  • UserInterface/Images/IgnoreCaches.svg: Added.

Added new art for the Disable Caches button.

  • UserInterface/Images/gtk/IgnoreCaches.svg: Added.

Used GTK's StepOver.svg for fallback art for GTK.

  • UserInterface/Images/NavigationItemClear.svg:

Improved artwork for Clear Console button icon to match the weight and
style of the Disable Caches button icon.

  • UserInterface/Views/NetworkGridContentView.js:

(WebInspector.NetworkGridContentView):

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

Skip webrtc/multi-video.html.
https://bugs.webkit.org/show_bug.cgi?id=170823

Unreviewed test gardening.

3:46 PM Changeset in webkit [215438] by achristensen@apple.com
  • 2 edits in trunk/Source/WebCore

Fix CMake build.

  • PlatformMac.cmake:
3:28 PM Changeset in webkit [215437] by Ryan Haddad
  • 5 edits in branches/safari-603-branch/LayoutTests

Merge r211155.

3:17 PM Changeset in webkit [215436] by eric.carlson@apple.com
  • 2 edits in trunk/Source/WebKit2

[MediaStream] Fix typo in UIDelegate::mediaCaptureStateDidChange
https://bugs.webkit.org/show_bug.cgi?id=170911

Reviewed by Youenn Fablet.

  • UIProcess/Cocoa/UIDelegate.mm:

(WebKit::UIDelegate::UIClient::mediaCaptureStateDidChange): Fix typo.

3:15 PM Changeset in webkit [215435] by Matt Baker
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Enabled state of "All Requests" XHR breakpoint not restored correctly
https://bugs.webkit.org/show_bug.cgi?id=170916

Reviewed by Joseph Pecoraro.

  • UserInterface/Controllers/DOMDebuggerManager.js:

(WebInspector.DOMDebuggerManager):
Set breakpoint with backend agent, if enabled.

3:04 PM Changeset in webkit [215434] by commit-queue@webkit.org
  • 2 edits in trunk/LayoutTests

LayoutTest webrtc/video-mute.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=170704

Patch by Youenn Fablet <youenn@apple.com> on 2017-04-17
Reviewed by Eric Carlson.

  • webrtc/video-mute.html: Another try at making the test not flaky.
2:51 PM Changeset in webkit [215433] by krollin@apple.com
  • 2 edits in trunk/Source/WebKit2

Move and update WebLoaderStrategy logging statement
https://bugs.webkit.org/show_bug.cgi?id=170140

Reviewed by Alex Christensen.

WebLoaderStrategy::scheduleLoad has a logging statement that says, in
part: "Resource has been queued for scheduling with the
NetworkProcess". This statement is emitted after the
ScheduleResourceLoad message has been successfully sent to the
NetworkProcess. The logging statement was added at this location to
indicate that the resource-load had been successfully handed off; it
pairs a similar logging statement that is emitted if the sending of
the ScheduleResourceLoad message fails.

I think it would be better to move this logging statement before the
ScheduleResourceLoad message is sent to the NetworkProcess (and change
its wording to "Resource is being scheduled with the NetworkProcess").
The reason for this change is to help make sure that the sequence of
logging statements is more deterministic. In the current form, the
message "Resource has been queued for scheduling with the
NetworkProcess" normally appears before any NetworkProcess logging
statements that indicate that the resource-loading is continuing
there, but in rare occasions the logging statements can be reversed.
This change in the ordering of the statements has caused a problem in
a script I've written that examines the resource-loading process and
looks for errors. By ensuring that the WebLoaderStrategy statement
always appears before the NetworkResourceLoader statement, the flow
makes better sense and the script can be more robust.

In making this change, we are probably not giving up any assurance
that the ScheduleResourceLoad message has been sent to the
NetworkResourceLoader. If the message is successfully sent, we'll see
logging in the NetworkProcess. If the message has not been sent, we'll
see WebLoaderStrategy logging an error.

  • WebProcess/Network/WebLoaderStrategy.cpp:

(WebKit::WebLoaderStrategy::scheduleLoad):

2:39 PM Changeset in webkit [215432] by jmarcell@apple.com
  • 27 edits in tags/Safari-604.1.17.1

Cherry-pick r215386. rdar://problem/31628104

2:34 PM Changeset in webkit [215431] by andersca@apple.com
  • 8 edits in trunk/Source

Stop using deprecated APIs, part 1
https://bugs.webkit.org/show_bug.cgi?id=170915
rdar://problem/31589635

Reviewed by Tim Horton.

Source/WebCore:

Get rid of the status parameter from ApplePayPaymentMethodUpdate.

  • Modules/applepay/ApplePayPaymentMethodUpdate.h:
  • Modules/applepay/ApplePayPaymentMethodUpdate.idl:
  • Modules/applepay/ApplePaySession.cpp:

(WebCore::convertAndValidate):
(WebCore::ApplePaySession::completePaymentMethodSelection):

  • Modules/applepay/PaymentRequest.h:

Source/WebKit2:

Stop using the PKPaymentRequestPaymentMethodUpdate initializer that takes a status, it's been deprecated
and we always passed PKPaymentAuthorizationStatusSuccess anyway.

  • Shared/Cocoa/WebCoreArgumentCodersCocoa.mm:

(IPC::ArgumentCoder<WebCore::PaymentMethodUpdate>::encode):
(IPC::ArgumentCoder<WebCore::PaymentMethodUpdate>::decode):

  • UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:

(WebKit::WebPaymentCoordinatorProxy::platformCompletePaymentMethodSelection):

2:29 PM Changeset in webkit [215430] by jmarcell@apple.com
  • 1 copy in tags/Safari-604.1.17.1

New tag.

2:24 PM Changeset in webkit [215429] by commit-queue@webkit.org
  • 71 edits in trunk

Disable outdated WritableStream API
https://bugs.webkit.org/show_bug.cgi?id=170749
<rdar://problem/31446233>

Patch by Youenn Fablet <youenn@apple.com> on 2017-04-17
Reviewed by Alex Christensen.

Source/JavaScriptCore:

  • Configurations/FeatureDefines.xcconfig:

Source/WebCore:

No change of behavior.
Replacing READABLE_STREAM_API, READABLE_BYTE_STREAM_API and WRITABLE_STREAM_API compilation flag by:

  • A STREAMS_API compilation flag.
  • A ReadableByteStreamAPI and WritableStreamAPI runtime flags, turned off except for RWT and DRT.
  • Configurations/FeatureDefines.xcconfig:
  • Modules/fetch/FetchBody.cpp:
  • Modules/fetch/FetchBody.h:
  • Modules/fetch/FetchBodyOwner.cpp:

(WebCore::FetchBodyOwner::isDisturbedOrLocked):
(WebCore::FetchBodyOwner::blobLoadingSucceeded):
(WebCore::FetchBodyOwner::blobLoadingFailed):
(WebCore::FetchBodyOwner::blobChunk):

  • Modules/fetch/FetchBodyOwner.h:
  • Modules/fetch/FetchResponse.cpp:

(WebCore::FetchResponse::BodyLoader::didSucceed):
(WebCore::FetchResponse::BodyLoader::didFail):
(WebCore::FetchResponse::BodyLoader::didReceiveData):

  • Modules/fetch/FetchResponse.h:
  • Modules/fetch/FetchResponse.idl:
  • Modules/fetch/FetchResponseSource.cpp:
  • Modules/fetch/FetchResponseSource.h:
  • Modules/streams/ByteLengthQueuingStrategy.idl:
  • Modules/streams/ByteLengthQueuingStrategy.js:
  • Modules/streams/CountQueuingStrategy.idl:
  • Modules/streams/CountQueuingStrategy.js:
  • Modules/streams/ReadableByteStreamController.idl:
  • Modules/streams/ReadableByteStreamController.js:
  • Modules/streams/ReadableByteStreamInternals.js:
  • Modules/streams/ReadableStream.idl:
  • Modules/streams/ReadableStream.js:

(initializeReadableStream): Using readableByteStreamAPI runtime flag directly.

  • Modules/streams/ReadableStreamBYOBRequest.idl:
  • Modules/streams/ReadableStreamBYOBRequest.js:
  • Modules/streams/ReadableStreamDefaultController.idl:
  • Modules/streams/ReadableStreamDefaultController.js:
  • Modules/streams/ReadableStreamDefaultReader.idl:
  • Modules/streams/ReadableStreamDefaultReader.js:
  • Modules/streams/ReadableStreamInternals.js:
  • Modules/streams/ReadableStreamSource.h:
  • Modules/streams/ReadableStreamSource.idl:
  • Modules/streams/StreamInternals.js:
  • Modules/streams/WritableStream.idl:
  • Modules/streams/WritableStream.js:
  • Modules/streams/WritableStreamInternals.js:
  • bindings/js/JSDOMGlobalObject.cpp:

(WebCore::isReadableByteStreamAPIEnabled):
(WebCore::JSDOMGlobalObject::addBuiltinGlobals):

  • bindings/js/JSReadableStreamPrivateConstructors.cpp:

(WebCore::constructJSReadableStreamBYOBRequest):
(WebCore::JSBuiltinReadableStreamBYOBRequestPrivateConstructor::initializeExecutable):
(WebCore::createReadableStreamBYOBRequestPrivateConstructor):

  • bindings/js/JSReadableStreamPrivateConstructors.h:
  • bindings/js/JSReadableStreamSourceCustom.cpp:
  • bindings/js/ReadableStreamDefaultController.cpp:
  • bindings/js/ReadableStreamDefaultController.h:
  • bindings/js/WebCoreBuiltinNames.h:
  • page/RuntimeEnabledFeatures.h:

(WebCore::RuntimeEnabledFeatures::setReadableByteStreamAPIEnabled):
(WebCore::RuntimeEnabledFeatures::readableByteStreamAPIEnabled):
(WebCore::RuntimeEnabledFeatures::setWritableStreamAPIEnabled):
(WebCore::RuntimeEnabledFeatures::writableStreamAPIEnabled):

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

Source/WebCore/PAL:

  • Configurations/FeatureDefines.xcconfig:

Source/WebKit/mac:

Replacing READABLE_STREAM_API, READABLE_BYTE_STREAM_API and WRITABLE_STREAM_API compilation flag by:

  • A STREAMS_API compilation flag.
  • A ReadableByteStreamAPI and WritableStreamAPI runtime flags, turned off except for RWT and DRT.
  • Configurations/FeatureDefines.xcconfig:
  • WebView/WebPreferenceKeysPrivate.h:
  • WebView/WebPreferences.mm:

(+[WebPreferences initialize]):
(-[WebPreferences readableByteStreamAPIEnabled]):
(-[WebPreferences setReadableByteStreamAPIEnabled:]):
(-[WebPreferences writableStreamAPIEnabled]):
(-[WebPreferences setWritableStreamAPIEnabled:]):

  • WebView/WebPreferencesPrivate.h:
  • WebView/WebView.mm:

(-[WebView _preferencesChanged:]):

Source/WebKit2:

Replacing READABLE_STREAM_API, READABLE_BYTE_STREAM_API and WRITABLE_STREAM_API compilation flag by:

  • A STREAMS_API compilation flag.
  • A ReadableByteStreamAPI and WritableStreamAPI runtime flags, turned off except for RWT and DRT.
  • Configurations/FeatureDefines.xcconfig:
  • WebProcess/InjectedBundle/InjectedBundle.cpp:

(WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):

Source/WTF:

Replacing READABLE_STREAM_API, READABLE_BYTE_STREAM_API and WRITABLE_STREAM_API compilation flag by:

  • A STREAMS_API compilation flag.
  • A ReadableByteStreamAPI and WritableStreamAPI runtime flags, turned off except for RWT and DRT.
  • wtf/FeatureDefines.h:

Tools:

Replacing READABLE_STREAM_API, READABLE_BYTE_STREAM_API and WRITABLE_STREAM_API compilation flag by:

  • A STREAMS_API compilation flag.
  • A ReadableByteStreamAPI and WritableStreamAPI runtime flags, turned off except for RWT and DRT.
  • DumpRenderTree/mac/DumpRenderTree.mm:

(enableExperimentalFeatures):

  • TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
  • WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:

(WTR::InjectedBundle::beginTesting):

  • WebKitTestRunner/InjectedBundle/TestRunner.cpp:

(WTR::TestRunner::setFetchAPIEnabled):
(WTR::TestRunner::setWritableStreamAPIEnabled):
(WTR::TestRunner::setReadableByteStreamAPIEnabled):

  • WebKitTestRunner/InjectedBundle/TestRunner.h:
2:15 PM Changeset in webkit [215428] by Ryan Haddad
  • 2 edits in branches/safari-603-branch/LayoutTests

Update expected results for rdar://problem/31636583.

  • platform/mac/fast/text/complex-text-opacity-expected.txt:
1:37 PM Changeset in webkit [215427] by Matt Baker
  • 4 edits in trunk/Source/WebInspectorUI

Web Inspector: Show pause reason for "All Requests" XHR breakpoint
https://bugs.webkit.org/show_bug.cgi?id=170895

Reviewed by Joseph Pecoraro.

  • Localizations/en.lproj/localizedStrings.js:

Add generic pause reason text: "Requesting: <url>".

  • UserInterface/Controllers/DOMDebuggerManager.js:

(WebInspector.DOMDebuggerManager.prototype.xhrBreakpointForURL):
Relocated helper method from the sidebar.

  • UserInterface/Views/DebuggerSidebarPanel.js:

(WebInspector.DebuggerSidebarPanel.prototype._updatePauseReasonSection):
Add an XHR breakpoint tree element when pause data contains a breakpoint
URL, otherwise just add a generic text row.

1:25 PM Changeset in webkit [215426] by jmarcell@apple.com
  • 5 edits in branches/safari-603-branch/Source

Versioning.

1:24 PM Changeset in webkit [215425] by timothy_horton@apple.com
  • 34 edits
    4 adds in trunk

Provide a viewport parameter to disable clipping to the safe area
https://bugs.webkit.org/show_bug.cgi?id=170766
<rdar://problem/31564634>

Reviewed by Beth Dakin.

Tests: tiled-drawing/ios/viewport-clip-to-safe-area-no-gets-margin-tiles.html,

tiled-drawing/ios/viewport-clip-to-safe-area-yes-gets-no-margin-tiles.html,

  • dom/ViewportArguments.cpp:

(WebCore::ViewportArguments::resolve):
(WebCore::setViewportFeature):

  • dom/ViewportArguments.h:

(WebCore::ViewportArguments::operator==):

  • page/ViewportConfiguration.cpp:

(WebCore::ViewportConfiguration::updateConfiguration):
(WebCore::operator<<):
(WebCore::ViewportConfiguration::description):

  • page/ViewportConfiguration.h:

(WebCore::ViewportConfiguration::Parameters::Parameters):
(WebCore::ViewportConfiguration::clipToSafeArea):
Add viewport parameter.

  • page/ChromeClient.h:
  • page/FrameView.h:
  • page/FrameView.cpp:

(WebCore::FrameView::enableSpeculativeTilingIfNeeded):
If not clipping to the safe area, enable "speculative" tiling immediately,
because the margin tiles can be visible immediately.

(WebCore::FrameView::hasExtendedBackgroundRectForPainting):
(WebCore::FrameView::updateTilesForExtendedBackgroundMode):
Don't check the setting here; just respect the mode that is computed
by calculateExtendedBackgroundMode.

(WebCore::FrameView::calculateExtendedBackgroundMode):
If the viewport parameter was set, add margin tiles on both axes.

(WebCore::FrameView::setClipToSafeArea):
Notify ChromeClient of the change, and re-compute the margin tile mode.

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

Factor out code that decides whether the content layer clips to bounds,
and make it take the new viewport parameter into account.

  • rendering/RenderObject.cpp:

Don't clip RenderView repaints to RenderView's GraphicsLayer bounds if
clip-to-safe-area is off, just like we do for slow-repaint objects in
extended background mode.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::resetState):
(WebKit::WebPageProxy::setClipToSafeArea):

  • UIProcess/WebPageProxy.h:

(WebKit::WebPageProxy::clipToSafeArea):

  • UIProcess/WebPageProxy.messages.in:
  • WebProcess/WebCoreSupport/WebChromeClient.cpp:

(WebKit::WebChromeClient::didChangeClipToSafeArea):

  • WebProcess/WebCoreSupport/WebChromeClient.h:
  • UIProcess/API/gtk/PageClientImpl.h:
  • UIProcess/PageClient.h:
  • UIProcess/ios/PageClientImplIOS.h:
  • UIProcess/ios/PageClientImplIOS.mm:

(WebKit::PageClientImpl::didChangeClipToSafeArea):

  • UIProcess/mac/PageClientImpl.h:

Forward clip-to-safe-area changes from ChromeClient to WKWebView.
Update visible content rects when it changes, which will
result in a call to updateFixedClippingView, as below.
Keep track of the current state in the UI process.

  • UIProcess/API/Cocoa/WKWebViewPrivate.h:
  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _contentMayDrawInObscuredInsets]):
Expose the current state of the clip-to-safe-area bit as SPI.

  • UIProcess/ios/WKContentView.mm:

(-[WKContentView updateFixedClippingView:]):
Disable fixed clipping when clip-to-safe-area is disabled.

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::viewportConfigurationChanged):
Push the viewport's clip-to-safe-area bit onto the main frame's FrameView.

  • DumpRenderTree/ios/UIScriptControllerIOS.mm:

(WTR::UIScriptController::setObscuredInsets):

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

(WTR::UIScriptController::setObscuredInsets):

  • TestRunnerShared/UIScriptContext/UIScriptController.h:
  • WebKitTestRunner/ios/TestControllerIOS.mm:

(WTR::TestController::platformResetStateToConsistentValues):

  • WebKitTestRunner/ios/UIScriptControllerIOS.mm:

(WTR::UIScriptController::setObscuredInsets):
Add a UIScriptController mechanism to install obscured insets
on the web view.

  • tiled-drawing/ios/viewport-clip-to-safe-area-no-gets-margin-tiles-expected.txt: Added.
  • tiled-drawing/ios/viewport-clip-to-safe-area-no-gets-margin-tiles.html: Added.
  • tiled-drawing/ios/viewport-clip-to-safe-area-yes-gets-no-margin-tiles-expected.txt: Added.
  • tiled-drawing/ios/viewport-clip-to-safe-area-yes-gets-no-margin-tiles.html: Added.
1:22 PM Changeset in webkit [215424] by mitz@apple.com
  • 9 edits
    7 adds in trunk

[Cocoa] Move isNullFunctionPointer down into WTF
https://bugs.webkit.org/show_bug.cgi?id=170892

Reviewed by Sam Weinig.

Source/WebCore:

  • platform/mediastream/libwebrtc/LibWebRTCProvider.cpp:

(WebCore::LibWebRTCProvider::webRTCAvailable): Changed to use WTF::isNullFunctionPointer,

and removed the static variable, so instead of loading from the initialization guard,
branching, then loading from the variable itself, we just load from the function pointer.

(WebCore::isNullFunctionPointer): Deleted.

Source/WebKit2:

  • Platform/classifier/cocoa/ResourceLoadStatisticsClassifierCocoa.cpp:

(WebKit::ResourceLoadStatisticsClassifierCocoa::canUseCorePrediction): Changed to use

WTF::isNullFunctionPointer.

(WebKit::isNullFunctionPointer): Deleted.

Source/WTF:

Test: TestWebKitAPI/Tests/WTF/darwin/WeakLinking.cpp

  • WTF.xcodeproj/project.pbxproj: Added reference to new file.
  • wtf/darwin: Added.
  • wtf/darwin/WeakLinking.h: Added.

(WTF::isNullFunctionPointer): Copied from ResourceLoadStatisticsClassifierCocoa.cpp in

WebKit2 and changed into a function template that works with any function pointer.

Tools:

  • TestWebKitAPI/Configurations/TestWTF.xcconfig:
  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WTF/darwin/WeakLinking.cpp: Added.

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WTF/darwin/libTestWTFAlwaysMissing-iOS-v2.tbd: Added.
  • TestWebKitAPI/Tests/WTF/darwin/libTestWTFAlwaysMissing-iOS.tbd: Added.
  • TestWebKitAPI/Tests/WTF/darwin/libTestWTFAlwaysMissing-macOS-v2.tbd: Added.
  • TestWebKitAPI/Tests/WTF/darwin/libTestWTFAlwaysMissing-macOS.tbd: Added.
1:07 PM Changeset in webkit [215423] by jiewen_tan@apple.com
  • 33 edits
    10 copies
    4 moves
    41 adds in trunk

[WebCrypto] Add support for ECDSA
https://bugs.webkit.org/show_bug.cgi?id=170789
<rdar://problem/31588604>

Reviewed by Brent Fulgham.

LayoutTests/imported/w3c:

  • web-platform-tests/WebCryptoAPI/generateKey/failures_ECDSA.worker-expected.txt:
  • web-platform-tests/WebCryptoAPI/generateKey/successes_ECDSA.worker-expected.txt:
  • web-platform-tests/WebCryptoAPI/generateKey/test_failures_ECDSA-expected.txt:
  • web-platform-tests/WebCryptoAPI/generateKey/test_successes_ECDSA-expected.txt:
  • web-platform-tests/WebCryptoAPI/import_export/ec_importKey.worker-expected.txt:
  • web-platform-tests/WebCryptoAPI/import_export/test_ec_importKey-expected.txt:
  • web-platform-tests/WebCryptoAPI/sign_verify/ecdsa.worker-expected.txt:
  • web-platform-tests/WebCryptoAPI/sign_verify/hmac.worker-expected.txt:
  • web-platform-tests/WebCryptoAPI/sign_verify/test_ecdsa-expected.txt:
  • web-platform-tests/WebCryptoAPI/sign_verify/test_hmac-expected.txt:

Source/WebCore:

This patch implements ECDSA according to the spec: https://www.w3.org/TR/WebCryptoAPI/#ecdsa.
Supported operations include sign, verify, generateKey, importKey and exportKey.

Tests: crypto/subtle/ecdh-generate-export-key-pkcs8-p256.html

crypto/subtle/ecdh-generate-export-key-pkcs8-p384.html
crypto/subtle/ecdsa-generate-export-jwk-key.html
crypto/subtle/ecdsa-generate-export-key-pkcs8.html
crypto/subtle/ecdsa-generate-export-key-raw.html
crypto/subtle/ecdsa-generate-export-key-spki.html
crypto/subtle/ecdsa-generate-key-sign-verify-p256.html
crypto/subtle/ecdsa-generate-key-sign-verify-p384.html
crypto/subtle/ecdsa-generate-key.html
crypto/subtle/ecdsa-import-jwk-private-key.html
crypto/subtle/ecdsa-import-jwk-public-key-alg-256.html
crypto/subtle/ecdsa-import-jwk-public-key-alg-384.html
crypto/subtle/ecdsa-import-jwk-public-key.html
crypto/subtle/ecdsa-import-key-sign-p256.html
crypto/subtle/ecdsa-import-key-sign-p384.html
crypto/subtle/ecdsa-import-key-verify-p256.html
crypto/subtle/ecdsa-import-key-verify-p384.html
crypto/subtle/ecdsa-import-pkcs8-key.html
crypto/subtle/ecdsa-import-raw-key.html
crypto/subtle/ecdsa-import-spki-key.html
crypto/subtle/ecdsa-verify-malformed-parameters.html
crypto/workers/subtle/ecdsa-import-key-sign.html
crypto/workers/subtle/ecdsa-import-key-verify.html

  • CMakeLists.txt:
  • DerivedSources.make:
  • PlatformGTK.cmake:
  • PlatformMac.cmake:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/JSSubtleCryptoCustom.cpp:

(WebCore::normalizeCryptoAlgorithmParameters):
(WebCore::jsSubtleCryptoFunctionSignPromise):
(WebCore::jsSubtleCryptoFunctionVerifyPromise):
Add missing parameters.

  • crypto/CommonCryptoUtilities.h:
  • crypto/CryptoAlgorithm.cpp:

(WebCore::CryptoAlgorithm::sign):
(WebCore::CryptoAlgorithm::verify):

  • crypto/CryptoAlgorithm.h:

Add missing parameters.

  • crypto/CryptoAlgorithmParameters.h:
  • crypto/algorithms/CryptoAlgorithmECDSA.cpp: Added.

(WebCore::CryptoAlgorithmECDSA::create):
(WebCore::CryptoAlgorithmECDSA::identifier):
(WebCore::CryptoAlgorithmECDSA::sign):
(WebCore::CryptoAlgorithmECDSA::verify):
(WebCore::CryptoAlgorithmECDSA::generateKey):
(WebCore::CryptoAlgorithmECDSA::importKey):
(WebCore::CryptoAlgorithmECDSA::exportKey):

  • crypto/algorithms/CryptoAlgorithmECDSA.h: Added.
  • crypto/algorithms/CryptoAlgorithmHMAC.cpp:

(WebCore::CryptoAlgorithmHMAC::sign):
(WebCore::CryptoAlgorithmHMAC::verify):

  • crypto/algorithms/CryptoAlgorithmHMAC.h:

Add missing parameters.

  • crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp:

(WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::sign):
(WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::verify):

  • crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.h:

Add missing parameters.

  • crypto/gcrypt/CryptoAlgorithmECDSAGCrypt.cpp: Added.

(WebCore::CryptoAlgorithmECDSA::platformSign):
(WebCore::CryptoAlgorithmECDSA::platformVerify):

  • crypto/mac/CommonCryptoDERUtilities.cpp: Added.

(WebCore::bytesUsedToEncodedLength):
(WebCore::extraBytesNeededForEncodedLength):
(WebCore::addEncodedASN1Length):
(WebCore::bytesNeededForEncodedLength):

  • crypto/mac/CommonCryptoDERUtilities.h:

(WebCore::bytesUsedToEncodedLength): Deleted.
(WebCore::extraBytesNeededForEncodedLength): Deleted.
(WebCore::addEncodedASN1Length): Deleted.
(WebCore::bytesNeededForEncodedLength): Deleted.
Move implementations to a .cpp file.

  • crypto/mac/CryptoAlgorithmECDSAMac.cpp: Added.

(WebCore::cryptoDigestAlgorithm):
(WebCore::signECDSA):
(WebCore::verifyECDSA):
(WebCore::CryptoAlgorithmECDSA::platformSign):
(WebCore::CryptoAlgorithmECDSA::platformVerify):

  • crypto/mac/CryptoAlgorithmRegistryMac.cpp:

(WebCore::CryptoAlgorithmRegistry::platformRegisterAlgorithms):

  • crypto/parameters/CryptoAlgorithmEcdsaParams.h: Added.
  • crypto/parameters/EcdsaParams.idl: Added.

LayoutTests:

  • crypto/subtle/ec-generate-key-malformed-parameters-expected.txt:
  • crypto/subtle/ec-generate-key-malformed-parameters.html:
  • crypto/subtle/ec-import-key-malformed-parameters-expected.txt:
  • crypto/subtle/ec-import-key-malformed-parameters.html:
  • crypto/subtle/ecdh-generate-export-key-pkcs8-p256-expected.txt: Renamed from LayoutTests/crypto/subtle/ecdh-generate-export-pkcs8-p256-expected.txt.
  • crypto/subtle/ecdh-generate-export-key-pkcs8-p256.html: Renamed from LayoutTests/crypto/subtle/ecdh-generate-export-pkcs8-p256.html.
  • crypto/subtle/ecdh-generate-export-key-pkcs8-p384-expected.txt: Renamed from LayoutTests/crypto/subtle/ecdh-generate-export-pkcs8-p384-expected.txt.
  • crypto/subtle/ecdh-generate-export-key-pkcs8-p384.html: Renamed from LayoutTests/crypto/subtle/ecdh-generate-export-pkcs8-p384.html.
  • crypto/subtle/ecdsa-generate-export-jwk-key-expected.txt: Added.
  • crypto/subtle/ecdsa-generate-export-jwk-key.html: Added.
  • crypto/subtle/ecdsa-generate-export-key-pkcs8-expected.txt: Added.
  • crypto/subtle/ecdsa-generate-export-key-pkcs8.html: Added.
  • crypto/subtle/ecdsa-generate-export-key-raw-expected.txt: Added.
  • crypto/subtle/ecdsa-generate-export-key-raw.html: Added.
  • crypto/subtle/ecdsa-generate-export-key-spki-expected.txt: Added.
  • crypto/subtle/ecdsa-generate-export-key-spki.html: Added.
  • crypto/subtle/ecdsa-generate-key-expected.txt: Added.
  • crypto/subtle/ecdsa-generate-key-sign-verify-p256-expected.txt: Added.
  • crypto/subtle/ecdsa-generate-key-sign-verify-p256.html: Added.
  • crypto/subtle/ecdsa-generate-key-sign-verify-p384-expected.txt: Added.
  • crypto/subtle/ecdsa-generate-key-sign-verify-p384.html: Added.
  • crypto/subtle/ecdsa-generate-key.html: Added.
  • crypto/subtle/ecdsa-import-jwk-private-key-expected.txt: Added.
  • crypto/subtle/ecdsa-import-jwk-private-key.html: Added.
  • crypto/subtle/ecdsa-import-jwk-public-key-alg-256-expected.txt: Added.
  • crypto/subtle/ecdsa-import-jwk-public-key-alg-256.html: Added.
  • crypto/subtle/ecdsa-import-jwk-public-key-alg-384-expected.txt: Added.
  • crypto/subtle/ecdsa-import-jwk-public-key-alg-384.html: Added.
  • crypto/subtle/ecdsa-import-jwk-public-key-expected.txt: Added.
  • crypto/subtle/ecdsa-import-jwk-public-key.html: Added.
  • crypto/subtle/ecdsa-import-key-sign-p256-expected.txt: Added.
  • crypto/subtle/ecdsa-import-key-sign-p256.html: Added.
  • crypto/subtle/ecdsa-import-key-sign-p384-expected.txt: Added.
  • crypto/subtle/ecdsa-import-key-sign-p384.html: Added.
  • crypto/subtle/ecdsa-import-key-verify-p256-expected.txt: Added.
  • crypto/subtle/ecdsa-import-key-verify-p256.html: Added.
  • crypto/subtle/ecdsa-import-key-verify-p384-expected.txt: Added.
  • crypto/subtle/ecdsa-import-key-verify-p384.html: Added.
  • crypto/subtle/ecdsa-import-pkcs8-key-expected.txt: Added.
  • crypto/subtle/ecdsa-import-pkcs8-key.html: Added.
  • crypto/subtle/ecdsa-import-raw-key-expected.txt: Added.
  • crypto/subtle/ecdsa-import-raw-key.html: Added.
  • crypto/subtle/ecdsa-import-spki-key-expected.txt: Added.
  • crypto/subtle/ecdsa-import-spki-key.html: Added.
  • crypto/subtle/ecdsa-verify-malformed-parameters-expected.txt: Added.
  • crypto/subtle/ecdsa-verify-malformed-parameters.html: Added.
  • crypto/workers/subtle/ecdsa-import-key-sign-expected.txt: Added.
  • crypto/workers/subtle/ecdsa-import-key-sign.html: Added.
  • crypto/workers/subtle/ecdsa-import-key-verify-expected.txt: Added.
  • crypto/workers/subtle/ecdsa-import-key-verify.html: Added.
  • crypto/workers/subtle/resources/ecdsa-import-key-sign.js: Added.
  • crypto/workers/subtle/resources/ecdsa-import-key-verify.js: Added.
12:30 PM Changeset in webkit [215422] by Matt Baker
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: XHR breakpoints restored from settings do not appear in the sidebar
https://bugs.webkit.org/show_bug.cgi?id=170890

Reviewed by Joseph Pecoraro.

Need to check for existing breakpoints when XHRBreakpointTreeController
is constructed, instead of just listening for added breakpoints.

  • UserInterface/Controllers/XHRBreakpointTreeController.js:

(WebInspector.XHRBreakpointTreeController):
(WebInspector.XHRBreakpointTreeController.prototype._xhrBreakpointAdded):
(WebInspector.XHRBreakpointTreeController.prototype._addTreeElement):

12:26 PM Changeset in webkit [215421] by wenson_hsieh@apple.com
  • 3 edits in trunk/Source/WebKit2

[WK2] Respect a new internal setting for defaulting to character selection granularity
https://bugs.webkit.org/show_bug.cgi?id=170904
<rdar://problem/31364280>

Reviewed by Dan Bernstein.

Respect a new WebKitDebugDefaultSelectionGranularityCharacter user default by initializing
WKWebViewConfiguration with WKSelectionGranularityCharacter, but only when linked on or after the first iOS to
use WKSelectionGranularityCharacter by default.

  • UIProcess/API/Cocoa/WKWebViewConfiguration.mm:

(-[WKWebViewConfiguration init]):

  • UIProcess/Cocoa/VersionChecks.h:
11:26 AM Changeset in webkit [215420] by eric.carlson@apple.com
  • 3 edits in trunk/Source/WebKit2

Provide a way for clients to unmute a media stream.
https://bugs.webkit.org/show_bug.cgi?id=170855
<rdar://problem/31656855>

Reviewed by Jon Lee.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _setPageMuted:]): New.

  • UIProcess/API/Cocoa/WKWebViewPrivate.h:
10:58 AM Changeset in webkit [215419] by timothy_horton@apple.com
  • 1 edit
    6 deletes in trunk/LayoutTests/imported/w3c

Remove some accidentally-added .orig files
https://bugs.webkit.org/show_bug.cgi?id=170908

Reviewed by Youenn Fablet.

  • web-platform-tests/resources/docs/api.md.orig: Removed.
  • web-platform-tests/resources/examples/apisample12.html.orig: Removed.
  • web-platform-tests/resources/webidl2/test/widlproc/doc/htmltodtd.xsl.orig: Removed.
  • web-platform-tests/resources/webidl2/test/widlproc/doc/widlproc.html.orig: Removed.
  • web-platform-tests/resources/webidl2/test/widlproc/examples/spectowidl.xsl.orig: Removed.
  • web-platform-tests/resources/webidl2/test/widlproc/src/widlprocxmltohtml.xsl.orig: Removed.
10:00 AM Changeset in webkit [215418] by commit-queue@webkit.org
  • 14 edits
    2 copies
    2 adds in trunk/Source

Refactor enumerateDevices to allow separate CaptureDeviceManagers for audio and video.
https://bugs.webkit.org/show_bug.cgi?id=170778

Patch by Jeremy Jones <jeremyj@apple.com> on 2017-04-17
Source/WebCore:

Reviewed by Eric Carlson.

Add CoreAudioCaptureDeviceManager to enumerate CoreAudio devices.

Refactor RealtimeMediaSourceCenter and RealtimeMediaSourceCenterMac to provide independent audio and video capture device managers
and the abiliity to override the capture device managers.

CoreAudioCaptureSource now uses CoreAudioCaptureDeviceManager to use the specified device instead of the default one.

  • WebCore.xcodeproj/project.pbxproj:
  • platform/mediastream/CaptureDeviceManager.cpp:

(CaptureDeviceManager::getAudioSourcesInfo):
(CaptureDeviceManager::getVideoSourcesInfo):
(CaptureDeviceManager::getSourcesInfo): Deleted.

  • platform/mediastream/CaptureDeviceManager.h:
  • platform/mediastream/RealtimeMediaSourceCenter.cpp:

(WebCore::RealtimeMediaSourceCenter::setAudioCaptureDeviceManager):
(WebCore::RealtimeMediaSourceCenter::unsetAudioCaptureDeviceManager):
(WebCore::RealtimeMediaSourceCenter::setVideoCaptureDeviceManager):
(WebCore::RealtimeMediaSourceCenter::unsetVideoCaptureDeviceManager):

  • platform/mediastream/RealtimeMediaSourceCenter.h:

(WebCore::RealtimeMediaSourceCenter::defaultAudioCaptureDeviceManager):
(WebCore::RealtimeMediaSourceCenter::defaultVideoCaptureDeviceManager):
(WebCore::RealtimeMediaSourceCenter::audioCaptureDeviceManager):
(WebCore::RealtimeMediaSourceCenter::videoCaptureDeviceManager):

  • platform/mediastream/mac/AVCaptureDeviceManager.h:
  • platform/mediastream/mac/AVCaptureDeviceManager.mm:

(WebCore::AVCaptureDeviceManager::refreshAVCaptureDevicesOfType):
(WebCore::AVCaptureDeviceManager::refreshCaptureDevices):
(WebCore::AVCaptureDeviceManager::getAudioSourcesInfo):
(WebCore::AVCaptureDeviceManager::getVideoSourcesInfo):
(WebCore::AVCaptureDeviceManager::setUseAVFoundationAudioCapture): Deleted.
(WebCore::AVCaptureDeviceManager::getSourcesInfo): Deleted.

  • platform/mediastream/mac/CoreAudioCaptureDevice.cpp: Added.

(WebCore::getDeviceInfo):
(WebCore::CoreAudioCaptureDevice::create):
(WebCore::CoreAudioCaptureDevice::CoreAudioCaptureDevice):
(WebCore::CoreAudioCaptureDevice::deviceID):
(WebCore::CoreAudioCaptureDevice::deviceClock):
(WebCore::CoreAudioCaptureDevice::isAlive):

  • platform/mediastream/mac/CoreAudioCaptureDevice.h: Copied from Source/WebCore/platform/mediastream/CaptureDeviceManager.h.
  • platform/mediastream/mac/CoreAudioCaptureDeviceManager.cpp: Added.

(WebCore::CoreAudioCaptureDeviceManager::singleton):
(WebCore::CoreAudioCaptureDeviceManager::captureDevices):
(WebCore::deviceHasInputStreams):
(WebCore::CoreAudioCaptureDeviceManager::coreAudioCaptureDevices):
(WebCore::CoreAudioCaptureDeviceManager::refreshAudioCaptureDevices):
(WebCore::CoreAudioCaptureDeviceManager::devicesChanged):

  • platform/mediastream/mac/CoreAudioCaptureDeviceManager.h: Copied from Source/WebCore/platform/mediastream/CaptureDeviceManager.h.
  • platform/mediastream/mac/CoreAudioCaptureSource.cpp:

(WebCore::CoreAudioCaptureSource::CoreAudioCaptureSource):
(WebCore::CoreAudioCaptureSource::startProducingData):
(WebCore::CoreAudioCaptureSource::stopProducingData):

  • platform/mediastream/mac/RealtimeMediaSourceCenterMac.cpp:

(WebCore::RealtimeMediaSourceCenterMac::setUseAVFoundationAudioCapture):
(WebCore::RealtimeMediaSourceCenterMac::RealtimeMediaSourceCenterMac):
(WebCore::RealtimeMediaSourceCenterMac::createMediaStream):
(WebCore::RealtimeMediaSourceCenterMac::getMediaStreamDevices):

  • platform/mediastream/mac/RealtimeMediaSourceCenterMac.h:

Source/WebKit2:

Reviewed by Tim Horton.

setUseAVFoundationAudioCapture is moved from AVCaptureDeviceManager to RealtimeMediaSourceCenterMac.

  • UIProcess/UserMediaPermissionRequestManagerProxy.cpp:

(WebKit::UserMediaPermissionRequestManagerProxy::syncWithWebCorePrefs):

9:37 AM Changeset in webkit [215417] by Ryan Haddad
  • 5 edits
    1 delete in trunk

Unreviewed, rolling out r215366.

This test is failing on performance bots.

Reverted changeset:

"Add performance test for asking the platform for a font for
U+2060 WORD JOINER"
https://bugs.webkit.org/show_bug.cgi?id=170842
http://trac.webkit.org/changeset/215366

9:15 AM Changeset in webkit [215416] by jbedard@apple.com
  • 2 edits in trunk/Tools

webkitpy: Correct poll when killing ServerProcess

Unreviewed infrastructure fix.

  • Scripts/webkitpy/port/server_process.py:

(ServerProcess._kill): A polled process equaling 'None' means the process is running.

9:08 AM Changeset in webkit [215415] by jmarcell@apple.com
  • 1 copy in tags/Safari-603.2.4

Tag Safari-603.2.4.

8:44 AM Changeset in webkit [215414] by commit-queue@webkit.org
  • 2 edits in trunk/LayoutTests

LayoutTestwebrtc/audio-replace-track.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=170837

Patch by Youenn Fablet <youenn@apple.com> on 2017-04-17
Reviewed by Eric Carlson.

  • webrtc/audio-replace-track.html: Updating the test to be less flaky.
8:34 AM Changeset in webkit [215413] by eric.carlson@apple.com
  • 4 edits in trunk/Tools

[MediaStream] Enable getUserMedia API test
https://bugs.webkit.org/show_bug.cgi?id=170901
<rdar://problem/31656594>

Reviewed by Youenn Fablet.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: Add test.
  • TestWebKitAPI/Tests/WebKit2/UserMedia.cpp:

(TestWebKitAPI::decidePolicyForUserMediaPermissionRequestCallBack):
(TestWebKitAPI::TEST): Enable capture with mock devices.

  • TestWebKitAPI/Tests/WebKit2/getUserMedia.html: Update to mediaDevices.getUserMedia
8:27 AM Changeset in webkit [215412] by commit-queue@webkit.org
  • 3 edits
    2 adds in trunk

RTCPeerConnection addTrack does not require a stream parameter
https://bugs.webkit.org/show_bug.cgi?id=170894

Patch by Youenn Fablet <youenn@apple.com> on 2017-04-17
Reviewed by Alex Christensen.

Source/WebCore:

Test: webrtc/video-addTrack.html

  • Modules/mediastream/RTCPeerConnection.cpp:

(WebCore::RTCPeerConnection::addTrack): Removing obsolete error throwing.

LayoutTests:

  • webrtc/video-addTrack-expected.txt: Added.
  • webrtc/video-addTrack.html: Added.
8:01 AM Changeset in webkit [215411] by commit-queue@webkit.org
  • 10 edits
    2 adds in trunk/Source

Add an external libwebrtc encoder factory in WebCore
https://bugs.webkit.org/show_bug.cgi?id=170883

Patch by Youenn Fablet <youenn@apple.com> on 2017-04-17
Reviewed by Alex Christensen.

Source/ThirdParty/libwebrtc:

Exporting some symbols.
Allowing to customize the creation of the H264 encoder.

  • Source/webrtc/media/base/codec.h:
  • Source/webrtc/media/engine/webrtcvideoencoderfactory.h
  • Source/webrtc/sdk/objc/Framework/Classes/videotoolboxvideocodecfactory.cc:
  • Source/webrtc/sdk/objc/Framework/Classes/videotoolboxvideocodecfactory.h:
  • Source/webrtc/video_decoder.h
  • Source/webrtc/video_encoder.h

Source/WebCore:

No change of behavior, WebCore factory instantiating the default libwebrtc H264 encoder.

  • WebCore.xcodeproj/project.pbxproj:
  • platform/mediastream/libwebrtc/LibWebRTCProvider.cpp:

(WebCore::staticFactoryAndThreads):

  • platform/mediastream/libwebrtc/VideoToolBoxEncoderFactory.cpp: Added.

(WebCore::VideoToolboxVideoEncoderFactory::CreateVideoEncoder):
(WebCore::VideoToolboxVideoEncoderFactory::DestroyVideoEncoder):

  • platform/mediastream/libwebrtc/VideoToolBoxEncoderFactory.h: Added.
8:00 AM Changeset in webkit [215410] by antti@apple.com
  • 7 edits in trunk/Source/WebCore

GraphicsLayerCA::recursiveCommitChanges should not descend into subtrees without changes
https://bugs.webkit.org/show_bug.cgi?id=170851

Reviewed by Simon Fraser.

With lots of layers this can be very slow as it always traverses the entire layer tree.
For example GIF animations on tumblr.com trigger expensive commits where almost nothing changes.

This patch adds m_hasDescendantsWithUncommittedChanges bit to GraphicsLayerCA. With this
we can avoid descending to branches without changes when committing.

This patch enabled the optimization on Mac.

  • platform/graphics/ca/GraphicsLayerCA.cpp:

(WebCore::GraphicsLayerCA::GraphicsLayerCA::syncPosition):

Set PositionChanged flag when syncing layer position. This flag does nothing except makes
next commit to update the coverage rect (so tiling gets updated).

(WebCore::GraphicsLayerCA::setVisibleAndCoverageRects):

Do all setting of m_uncommittedChanges bits via addUncommittedChanges function.

(WebCore::GraphicsLayerCA::recursiveCommitChanges):

Bail out if neither the current layer nor any of its descendants have any uncommited changes
and none of the ancestors had changes.

(WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
(WebCore::GraphicsLayerCA::ensureStructuralLayer):
(WebCore::GraphicsLayerCA::changeLayerTypeTo):
(WebCore::GraphicsLayerCA::addUncommittedChanges):

Set m_hasDescendantsWithUncommittedChanges bit in ancestors when mutating m_uncommittedChanges.

(WebCore::GraphicsLayerCA::noteLayerPropertyChanged):

  • platform/graphics/ca/GraphicsLayerCA.h:

(WebCore::RenderLayerCompositor::frameViewDidScroll):

Tell the scrolling layer that it needs to recompute coverage.
This also schedules a layer flush so no need to do that separately.

7:47 AM Changeset in webkit [215409] by commit-queue@webkit.org
  • 2 edits in trunk/Tools

[GTK] Update the Fedora dependencies for WebKitGTK+
https://bugs.webkit.org/show_bug.cgi?id=170590

Patch by Xan Lopez <xan@igalia.com> on 2017-04-17
Reviewed by Carlos Alberto Lopez Perez.

  • gtk/install-dependencies: add a bunch of modules necessary to

get a proper set of GStreamer codecs for WebRTC.

6:51 AM Changeset in webkit [215408] by Yusuke Suzuki
  • 7 edits in trunk

[JSCOnly] Fix build failures in macOS
https://bugs.webkit.org/show_bug.cgi?id=170887

Reviewed by Alex Christensen.

.:

Align ICU header configuration to MacCMake port.

  • Source/cmake/OptionsJSCOnly.cmake:

Source/JavaScriptCore:

Align ICU header configuration to MacCMake port.

  • PlatformJSCOnly.cmake:

Source/WTF:

JSCOnly port does not use mac/MainThread.cpp.
We change the ifdef gurard to use generic implementaion in JSCOnly on macOS.

  • wtf/MainThread.cpp:
  • wtf/PlatformJSCOnly.cmake:
1:24 AM Changeset in webkit [215407] by jfbastien@apple.com
  • 20 edits in trunk/Source

B3: don't allow unsigned offsets in Value
https://bugs.webkit.org/show_bug.cgi?id=170692

Reviewed by Filip Pizlo.

Source/JavaScriptCore:

MemoryValue and similar B3 opcode classes always expects a signed
offset. Giving it an out-of-bounds unsigned offset causes
implementation-defined behavior, which can cause badness as I just
fixed in WebAssembly. This patch makes it impossible to create a
Value opcodes with an unsigned value, or with an overly-large
value.

  • b3/B3AtomicValue.cpp:

(JSC::B3::AtomicValue::AtomicValue):

  • b3/B3AtomicValue.h:
  • b3/B3Common.h:

(JSC::B3::isRepresentableAs):

  • b3/B3EliminateCommonSubexpressions.cpp:
  • b3/B3LowerToAir.cpp:

(JSC::B3::Air::LowerToAir::scaleForShl):
(JSC::B3::Air::LowerToAir::effectiveAddr):
(JSC::B3::Air::LowerToAir::addr):
(JSC::B3::Air::LowerToAir::tryAppendLea):

  • b3/B3MemoryValue.cpp:

(JSC::B3::MemoryValue::isLegalOffsetImpl):
(JSC::B3::MemoryValue::MemoryValue):

  • b3/B3MemoryValue.h:
  • b3/B3MemoryValueInlines.h:

(JSC::B3::MemoryValue::isLegalOffsetImpl):

  • b3/B3MoveConstants.cpp:
  • b3/B3ReduceStrength.cpp:
  • b3/B3StackmapSpecial.cpp:

(JSC::B3::StackmapSpecial::repForArg):

  • b3/B3Value.h:
  • b3/air/AirArg.cpp:

(JSC::B3::Air::Arg::stackAddrImpl):

  • b3/air/AirArg.h:

(JSC::B3::Air::Arg::addr):
(JSC::B3::Air::Arg::stack):
(JSC::B3::Air::Arg::callArg):
(JSC::B3::Air::Arg::stackAddr):
(JSC::B3::Air::Arg::index):
(JSC::B3::Air::Arg::offset):
(JSC::B3::Air::Arg::isValidAddrForm):
(JSC::B3::Air::Arg::isValidIndexForm):
(JSC::B3::Air::Arg::asTrustedImm32):
(JSC::B3::Air::Arg::asAddress):
(JSC::B3::Air::Arg::asBaseIndex):

  • b3/air/AirLowerStackArgs.cpp:

(JSC::B3::Air::lowerStackArgs):

  • b3/testb3.cpp:

(JSC::B3::testMulArgStore):
(JSC::B3::testStore32):
(JSC::B3::testStoreConstant):
(JSC::B3::testStoreConstantPtr):
(JSC::B3::testStoreAddLoad32):
(JSC::B3::testStoreAddLoadImm32):
(JSC::B3::testStoreAddLoad8):
(JSC::B3::testStoreAddLoadImm8):
(JSC::B3::testStoreAddLoad16):
(JSC::B3::testStoreAddLoadImm16):
(JSC::B3::testStoreAddLoad64):
(JSC::B3::testStoreAddLoadImm64):
(JSC::B3::testStoreAddLoad32Index):
(JSC::B3::testStoreAddLoadImm32Index):
(JSC::B3::testStoreAddLoad64Index):
(JSC::B3::testStoreAddLoadImm64Index):
(JSC::B3::testStoreSubLoad):
(JSC::B3::testStoreAddLoadInterference):
(JSC::B3::testStoreAddAndLoad):
(JSC::B3::testStoreNegLoad32):
(JSC::B3::testStoreNegLoadPtr):
(JSC::B3::testLoadOffset):
(JSC::B3::testLoadOffsetNotConstant):
(JSC::B3::testLoadOffsetUsingAdd):
(JSC::B3::testLoadOffsetUsingAddInterference):
(JSC::B3::testLoadOffsetUsingAddNotConstant):
(JSC::B3::testStoreLoadStackSlot):
(JSC::B3::testLoad):
(JSC::B3::testInterpreter):
(JSC::B3::testTrappingStore):
(JSC::B3::testTrappingLoadAddStore):
(JSC::B3::testWasmAddress):

  • wasm/WasmB3IRGenerator.cpp:

(JSC::Wasm::B3IRGenerator::fixupPointerPlusOffset):
(JSC::Wasm::B3IRGenerator::emitCheckAndPreparePointer):
(JSC::Wasm::B3IRGenerator::emitLoadOp):
(JSC::Wasm::B3IRGenerator::emitStoreOp):

Source/WTF:

Add C++17's std::conjunction type trait, except for Microsoft VS
2015 update 2 and later because it adds the logical operator type
traits, event when C++ is pre-2017:
https://blogs.msdn.microsoft.com/vcblog/2016/01/22/vs-2015-update-2s-stl-is-c17-so-far-feature-complete/

  • wtf/StdLibExtras.h:
Note: See TracTimeline for information about the timeline view.