Timeline



May 3, 2017:

11:58 PM Changeset in webkit [216175] by Carlos Garcia Campos
  • 3 edits
    2 adds in releases/WebKitGTK/webkit-2.16

Merge r214915 - Do not assert when CharacterData representing an Attr fires events
https://bugs.webkit.org/show_bug.cgi?id=170454
<rdar://problem/30979320>

Reviewed by Ryosuke Niwa.

Source/WebCore:

Make the NoEventDispatchAssertion in CharacterData::notifyParentAfterChange conditional
since Attr elements should be allowed to fire events.

Tests: fast/dom/no-assert-for-malformed-js-url-attribute.html

  • dom/CharacterData.cpp:

(WebCore::CharacterData::notifyParentAfterChange):

LayoutTests:

  • fast/dom/no-assert-for-malformed-js-url-attribute-expected.txt: Added.
  • fast/dom/no-assert-for-malformed-js-url-attribute.html: Added.
11:14 PM Changeset in webkit [216174] by Carlos Garcia Campos
  • 3 edits in trunk/Source/WebCore

REGRESSION(r215686): Incremental reads from SharedBuffer are wrong after r215686
https://bugs.webkit.org/show_bug.cgi?id=171602

Reviewed by Michael Catanzaro.

In TextTrackLoader::processNewCueData() and PNGImageReader::decode() we changed the patter to read data from a
SharedBuffer at a given offset. The new pattern is not correct, because it assumes the whole segment is always
read, and the new offset is not correct when that's not the case. This has broken the rendering of png images in
the GTK+ port, only the first bytes are correctly decoded and drawn, but not the rest of the image.

Fixes: editing/pasteboard/paste-image-using-image-data.html

  • loader/TextTrackLoader.cpp:

(WebCore::TextTrackLoader::processNewCueData):

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

(WebCore::PNGImageReader::decode):

10:50 PM Changeset in webkit [216173] by sbarati@apple.com
  • 9 edits in trunk

How we build polymorphic cases is wrong when making a call from Wasm
https://bugs.webkit.org/show_bug.cgi?id=171527

Reviewed by JF Bastien.

Source/JavaScriptCore:

This patches fixes a bug when we emit a polymorphic call IC from
Wasm. We were incorrectly assuming that if we made a call *from wasm*,
then the thing we are *calling to* does not have a CodeBlock. This
is obviously wrong. This patch fixes the incorrect assumption.

This patch also does two more things:

  1. Add a new option that makes us make calls to JS using a

slow path instead of using a call IC.

  1. Fixes a potential GC bug where we didn't populate JSWebAssemblyCodeBlock's

JSWebAssemblyModule pointer.

  • jit/Repatch.cpp:

(JSC::linkPolymorphicCall):

  • runtime/Options.h:
  • wasm/WasmBinding.cpp:

(JSC::Wasm::wasmToJs):

  • wasm/js/JSWebAssemblyCodeBlock.cpp:

(JSC::JSWebAssemblyCodeBlock::create):
(JSC::JSWebAssemblyCodeBlock::finishCreation):

  • wasm/js/JSWebAssemblyCodeBlock.h:
  • wasm/js/JSWebAssemblyInstance.cpp:

(JSC::JSWebAssemblyInstance::finalizeCreation):

Tools:

  • Scripts/run-jsc-stress-tests:
9:48 PM Changeset in webkit [216172] by eric.carlson@apple.com
  • 33 edits
    2 adds in trunk

[MediaStream] Allow host application to enable/disable media capture
https://bugs.webkit.org/show_bug.cgi?id=171292
<rdar://problem/31821492>

Reviewed by Jer Noble.

Source/WebCore:

No new layout tests, added an API test instead.

  • Modules/mediastream/MediaStream.cpp:

(WebCore::MediaStream::endStream): New, stop all tracks.

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

(WebCore::MediaStreamRegistry::unregisterStream): Minor cleanup.
(WebCore::MediaStreamRegistry::forEach): New, call the lambda with each stream.
(WebCore::MediaStreamRegistry::MediaStreamRegistry): Deleted, unused.

  • Modules/mediastream/MediaStreamRegistry.h:
  • Modules/mediastream/MediaStreamTrack.cpp:

(WebCore::MediaStreamTrack::stopTrack): Add parameter so caller can specify if an 'ended'
event should be sent or not.
(WebCore::MediaStreamTrack::trackMutedChanged): Don't post an event if the track has ended.

  • Modules/mediastream/MediaStreamTrack.h:
  • dom/Document.cpp:

(WebCore::Document::stopMediaCapture): Stop all streams in the document.

  • dom/Document.h:
  • page/Page.cpp:

(WebCore::Page::stopMediaCapture): Stop all streams.

  • page/Page.h:
  • platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:

(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::currentDisplayMode): Display a black frame
when the stream ends.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::activeStatusChanged): Signal a characteristics
change to HTMLMediaElement refresh state.

  • platform/mediastream/MediaStreamPrivate.h:
  • platform/mediastream/mac/AVMediaCaptureSource.mm:

(WebCore::AVMediaCaptureSource::stopProducingData): Don't return early if the session isn't
running, we always need to clear m_session on iOS.

Source/WebKit2:

  • UIProcess/API/C/WKPage.cpp:

(WKPageSetMediaCaptureEnabled): New.
(WKPageGetMediaCaptureEnabled): New.

  • UIProcess/API/C/WKPagePrivate.h:
  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _setMediaCaptureEnabled:]): New.
(-[WKWebView _mediaCaptureEnabled]): New.

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

(WebKit::UIDelegate::setDelegate): Initialize webViewRequestUserMediaAuthorizationForDevicesURLMainFrameURLDecisionHandler
and webViewCheckUserMediaPermissionForURLMainFrameURLFrameIdentifierDecisionHandler on macOS
and iOS.

  • UIProcess/UserMediaPermissionRequestManagerProxy.cpp:

(WebKit::UserMediaPermissionRequestManagerProxy::UserMediaPermissionRequestManagerProxy):
Initialize the rejection timer.
(WebKit::UserMediaPermissionRequestManagerProxy::~UserMediaPermissionRequestManagerProxy):
Call invalidatePendingRequests.
(WebKit::UserMediaPermissionRequestManagerProxy::invalidatePendingRequests): Invalidate all
pending requests.
(WebKit::UserMediaPermissionRequestManagerProxy::stopCapture): New.
(WebKit::UserMediaPermissionRequestManagerProxy::rejectionTimerFired): Reject a promise and
schedule the timer if there are any others pending.
(WebKit::UserMediaPermissionRequestManagerProxy::scheduleNextRejection):
(WebKit::UserMediaPermissionRequestManagerProxy::requestUserMediaPermissionForFrame): Don't
prompt the user if capture is disabled.
(WebKit::UserMediaPermissionRequestManagerProxy::invalidateRequests): Deleted.
(WebKit::UserMediaPermissionRequestManagerProxy::clearCachedState): Deleted.

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

(WebKit::UserMediaProcessManager::willEnableMediaStreamInPage): Stop capture in the current
page on iOS.
(WebKit::UserMediaProcessManager::setCaptureEnabled):

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

(WebKit::WebPageProxy::setMediaCaptureEnabled):

  • UIProcess/WebPageProxy.h:

(WebKit::WebPageProxy::mediaCaptureEnabled):

  • WebProcess/MediaStream/UserMediaPermissionRequestManager.cpp:

(WebKit::UserMediaPermissionRequestManager::cancelPendingRequests): New, cancel all pending
requests.
(WebKit::UserMediaPermissionRequestManager::cancelUserMediaRequest): Deny the request.
(WebKit::UserMediaPermissionRequestManager::cancelMediaDevicesEnumeration):

  • WebProcess/MediaStream/UserMediaPermissionRequestManager.h:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::stopMediaCapture):

  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/WebPage.messages.in:

Tools:

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

(-[UserMediaMessageHandler userContentController:didReceiveScriptMessage:]):
(-[UserMediaUIDelegate _webView:requestUserMediaAuthorizationForDevices:url:mainFrameURL:decisionHandler:]):
(-[UserMediaUIDelegate _webView:checkUserMediaPermissionForURL:mainFrameURL:frameIdentifier:decisionHandler:]):
(MediaCaptureDisabledTest::SetUp):
(MediaCaptureDisabledTest::loadTestAndWaitForMessage):
(TEST_F):

  • TestWebKitAPI/Tests/WebKit2Cocoa/disableGetUserMedia.html: Added.
9:16 PM Changeset in webkit [216171] by wilander@apple.com
  • 15 edits
    2 adds in trunk

Resource Load Statistics: Remove all statistics for modifiedSince website data removals
https://bugs.webkit.org/show_bug.cgi?id=171584
<rdar://problem/24702576>

Reviewed by Brent Fulgham.

Source/WebCore:

Test: http/tests/loading/resourceLoadStatistics/clear-in-memory-and-persistent-store-one-hour.html

  • loader/ResourceLoadObserver.cpp:

(WebCore::ResourceLoadObserver::clearInMemoryAndPersistentStore):

Now clears all regardless of the modifiedSince parameter's value.

Source/WebKit2:

These are all test infrastructure changes.

  • UIProcess/API/C/WKResourceLoadStatisticsManager.cpp:

(WKResourceLoadStatisticsManagerClearInMemoryAndPersistentStoreModifiedSinceHours):

  • UIProcess/API/C/WKResourceLoadStatisticsManager.h:
  • UIProcess/WebResourceLoadStatisticsManager.cpp:

(WebKit::WebResourceLoadStatisticsManager::clearInMemoryAndPersistentStoreModifiedSinceHours):

  • UIProcess/WebResourceLoadStatisticsManager.h:

Tools:

New function to call the clear function that takes a modifiedSince parameter.

  • WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
  • WebKitTestRunner/InjectedBundle/TestRunner.cpp:

(WTR::TestRunner::statisticsClearInMemoryAndPersistentStoreModifiedSinceHours):

  • WebKitTestRunner/InjectedBundle/TestRunner.h:
  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::statisticsClearInMemoryAndPersistentStoreModifiedSinceHours):

  • WebKitTestRunner/TestController.h:
  • WebKitTestRunner/TestInvocation.cpp:

(WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):

LayoutTests:

  • http/tests/loading/resourceLoadStatistics/clear-in-memory-and-persistent-store-one-hour-expected.txt: Added.
  • http/tests/loading/resourceLoadStatistics/clear-in-memory-and-persistent-store-one-hour.html: Added.
8:08 PM Changeset in webkit [216170] by aestes@apple.com
  • 2 edits in trunk/Source/WebCore

Try to fix the macOS Public SDK build
https://bugs.webkit.org/show_bug.cgi?id=171635
<rdar://problem/31812751>

Unreviewed because the commit queue told me to say this.

  • platform/spi/cocoa/AVKitSPI.h:
7:16 PM Changeset in webkit [216169] by keith_miller@apple.com
  • 5 edits
    1 add in trunk

Array.prototype.sort should also allow a null comparator
https://bugs.webkit.org/show_bug.cgi?id=171621
JSTests:

Reviewed by Michael Saboff.

Add test to make it less likely we revert to the incompatable behavior.
Also, fix now incorrect tests.

  • ChakraCore/test/Array/array_sort.baseline-jsc:
  • stress/array-sort-bad-comparator.js:

(test):

  • stress/sort-null-comparator.js: Added.

(assertEq):

Source/JavaScriptCore:

<rdar://problem/30757933>

Reviewed by Michael Saboff.

It looks like sort not accepting a null comparator
causes some pages to stop working. Those pages work in
Chrome/Firefox so we should try to match them.

  • builtins/ArrayPrototype.js:

(sort):

7:02 PM Changeset in webkit [216168] by timothy_horton@apple.com
  • 4 edits in trunk/Source/WebKit2

Maintain interaction information imageURL as a URL, not a string
https://bugs.webkit.org/show_bug.cgi?id=171639

Reviewed by Sam Weinig.

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

(-[WKContentView _dataForPreviewItemController:atPosition:type:]):
(-[WKContentView _previewItemController:commitPreview:]):

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::getPositionInformation):

6:40 PM Changeset in webkit [216167] by jdiggs@igalia.com
  • 4 edits
    2 adds in trunk

AX: aria-rowspan value should be ignored if td/th rowspan value is provided
https://bugs.webkit.org/show_bug.cgi?id=171214

Reviewed by Chris Fleizach.

Source/WebCore:

Return -1 in AccessibilityTableCell::ariaColumnSpan() and ariaRowSpan() if the
cell element has an explicit value for the native host language's span attribute.
Add checks to AccessibilityTableCell::columnIndexRange() and rowIndexRange() so
that we prefer an author-provided ARIA span value over an implicit host-language
span value. Similarly, add checks to AccessibilityARIAGridCell::columnIndexRange()
and rowIndexRange() so that we fall back on implicit host-language span values
when there is no author-provided ARIA span value and the ARIA cell is associated
with a cell element.

Test: accessibility/aria-cellspans-with-native-cellspans.html

  • accessibility/AccessibilityARIAGridCell.cpp:

(WebCore::AccessibilityARIAGridCell::ariaRowSpanWithRowIndex):
(WebCore::AccessibilityARIAGridCell::columnIndexRange):

  • accessibility/AccessibilityTableCell.cpp:

(WebCore::AccessibilityTableCell::rowIndexRange):
(WebCore::AccessibilityTableCell::columnIndexRange):
(WebCore::AccessibilityTableCell::ariaColumnSpan):
(WebCore::AccessibilityTableCell::ariaRowSpan):

LayoutTests:

  • accessibility/aria-cellspans-with-native-cellspans-expected.txt: Added.
  • accessibility/aria-cellspans-with-native-cellspans.html: Added.
6:39 PM Changeset in webkit [216166] by webkit@devinrousso.com
  • 2 edits in trunk/Source/WebInspectorUI

REGRESSION (r215630): Web Inspector: Option-Click on URL in Styles sidebar does not work
https://bugs.webkit.org/show_bug.cgi?id=171569

Reviewed by Joseph Pecoraro.

  • UserInterface/Views/CSSStyleDeclarationTextEditor.js:

(WebInspector.SourceCodeTextEditor.prototype.tokenTrackingControllerHighlightedRangeWasClicked):
Add missing frame parameter to WebInspector.openURL.

6:37 PM Changeset in webkit [216165] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit/mac

[Cocoa] Stop exporting symbols for ivars that were made private
https://bugs.webkit.org/show_bug.cgi?id=171631

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2017-05-03
Reviewed by Dan Bernstein.

  • WebKit.exp:
6:20 PM Changeset in webkit [216164] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Mark http/tests/xmlhttprequest/methods.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=171638

Unreviewed test gardening.

Patch by Matt Lewis <Matt Lewis> on 2017-05-03

  • platform/ios-wk2/TestExpectations:
6:17 PM Changeset in webkit [216163] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Mark scrollingcoordinator/ios/nested-fixed-layer-positions.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=171628

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
6:00 PM Changeset in webkit [216162] by Ryan Haddad
  • 33 edits
    2 deletes in trunk

Unreviewed, rolling out r216160 and r216161.
https://bugs.webkit.org/show_bug.cgi?id=171640

These changes broke the iOS build. (Requested by mlewis13 on
#webkit).

Reverted changesets:

"[MediaStream] Allow host application to enable/disable media
capture"
https://bugs.webkit.org/show_bug.cgi?id=171292
http://trac.webkit.org/changeset/216160

"[MediaStream] Allow host application to enable/disable media
capture"
https://bugs.webkit.org/show_bug.cgi?id=171292
http://trac.webkit.org/changeset/216161

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

5:27 PM Changeset in webkit [216161] by eric.carlson@apple.com
  • 5 edits in trunk/Source/WebKit2

[MediaStream] Allow host application to enable/disable media capture
https://bugs.webkit.org/show_bug.cgi?id=171292
<rdar://problem/31821492>

Unreviewed build fix.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::clearUserMediaState):

  • UIProcess/WebPageProxy.h:
5:03 PM Changeset in webkit [216160] by eric.carlson@apple.com
  • 33 edits
    2 adds in trunk

[MediaStream] Allow host application to enable/disable media capture
https://bugs.webkit.org/show_bug.cgi?id=171292
<rdar://problem/31821492>

Reviewed by Jer Noble.

Source/WebCore:

No new layout tests, added an API test instead.

  • Modules/mediastream/MediaStream.cpp:

(WebCore::MediaStream::endStream): New, stop all tracks.

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

(WebCore::MediaStreamRegistry::unregisterStream): Minor cleanup.
(WebCore::MediaStreamRegistry::forEach): New, call the lambda with each stream.
(WebCore::MediaStreamRegistry::MediaStreamRegistry): Deleted, unused.

  • Modules/mediastream/MediaStreamRegistry.h:
  • Modules/mediastream/MediaStreamTrack.cpp:

(WebCore::MediaStreamTrack::stopTrack): Add parameter so caller can specify if an 'ended'
event should be sent or not.
(WebCore::MediaStreamTrack::trackMutedChanged): Don't post an event if the track has ended.

  • Modules/mediastream/MediaStreamTrack.h:
  • dom/Document.cpp:

(WebCore::Document::stopMediaCapture): Stop all streams in the document.

  • dom/Document.h:
  • page/Page.cpp:

(WebCore::Page::stopMediaCapture): Stop all streams.

  • page/Page.h:
  • platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:

(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::currentDisplayMode): Display a black frame
when the stream ends.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::activeStatusChanged): Signal a characteristics
change to HTMLMediaElement refresh state.

  • platform/mediastream/MediaStreamPrivate.h:
  • platform/mediastream/mac/AVMediaCaptureSource.mm:

(WebCore::AVMediaCaptureSource::stopProducingData): Don't return early if the session isn't
running, we always need to clear m_session on iOS.

Source/WebKit2:

  • UIProcess/API/C/WKPage.cpp:

(WKPageSetMediaCaptureEnabled): New.
(WKPageGetMediaCaptureEnabled): New.
(WKPageClearUserMediaState): Deleted, unused.

  • UIProcess/API/C/WKPagePrivate.h:
  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _setMediaCaptureEnabled:]): New.
(-[WKWebView _mediaCaptureEnabled]): New.

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

(WebKit::UIDelegate::setDelegate): Initialize webViewRequestUserMediaAuthorizationForDevicesURLMainFrameURLDecisionHandler
and webViewCheckUserMediaPermissionForURLMainFrameURLFrameIdentifierDecisionHandler on macOS
and iOS.

  • UIProcess/UserMediaPermissionRequestManagerProxy.cpp:

(WebKit::UserMediaPermissionRequestManagerProxy::UserMediaPermissionRequestManagerProxy):
Initialize the rejection timer.
(WebKit::UserMediaPermissionRequestManagerProxy::~UserMediaPermissionRequestManagerProxy):
Call invalidatePendingRequests.
(WebKit::UserMediaPermissionRequestManagerProxy::invalidatePendingRequests): Invalidate all
pending requests.
(WebKit::UserMediaPermissionRequestManagerProxy::stopCapture): New.
(WebKit::UserMediaPermissionRequestManagerProxy::rejectionTimerFired): Reject a promise and
schedule the timer if there are any others pending.
(WebKit::UserMediaPermissionRequestManagerProxy::scheduleNextRejection):
(WebKit::UserMediaPermissionRequestManagerProxy::requestUserMediaPermissionForFrame): Don't
prompt the user if capture is disabled.
(WebKit::UserMediaPermissionRequestManagerProxy::invalidateRequests): Deleted.
(WebKit::UserMediaPermissionRequestManagerProxy::clearCachedState): Deleted.

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

(WebKit::UserMediaProcessManager::willEnableMediaStreamInPage): Stop capture in the current
page on iOS.
(WebKit::UserMediaProcessManager::setCaptureEnabled):

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

(WebKit::WebPageProxy::setMediaCaptureEnabled):
(WebKit::WebPageProxy::clearUserMediaState): Deleted.

  • UIProcess/WebPageProxy.h:

(WebKit::WebPageProxy::mediaCaptureEnabled):

  • WebProcess/MediaStream/UserMediaPermissionRequestManager.cpp:

(WebKit::UserMediaPermissionRequestManager::cancelPendingRequests): New, cancel all pending
requests.
(WebKit::UserMediaPermissionRequestManager::cancelUserMediaRequest): Deny the request.
(WebKit::UserMediaPermissionRequestManager::cancelMediaDevicesEnumeration):

  • WebProcess/MediaStream/UserMediaPermissionRequestManager.h:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::stopMediaCapture):

  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/WebPage.messages.in:

Tools:

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

(-[UserMediaMessageHandler userContentController:didReceiveScriptMessage:]):
(-[UserMediaUIDelegate _webView:requestUserMediaAuthorizationForDevices:url:mainFrameURL:decisionHandler:]):
(-[UserMediaUIDelegate _webView:checkUserMediaPermissionForURL:mainFrameURL:frameIdentifier:decisionHandler:]):
(MediaCaptureDisabledTest::SetUp):
(MediaCaptureDisabledTest::loadTestAndWaitForMessage):
(TEST_F):

  • TestWebKitAPI/Tests/WebKit2Cocoa/disableGetUserMedia.html: Added.
4:57 PM Changeset in webkit [216159] by Alan Bujtas
  • 3 edits
    2 adds in trunk

SearchInputType could end up with a mismatched renderer.
https://bugs.webkit.org/show_bug.cgi?id=171547
<rdar://problem/31935047>

Reviewed by Antti Koivisto.

Source/WebCore:

Normally we've got the correct renderer by the time we call into SearchInputType.
However, since HTMLInputElement::updateType() eagerly updates the type while the associated renderers are done lazily
(so we don't get them updated until after the next tree update), we could actually end up
with a mismatched renderer (e.g. through form submission).

Test: fast/forms/change-input-type-and-submit-form-crash.html

  • html/SearchInputType.cpp:

(WebCore::SearchInputType::addSearchResult):
(WebCore::SearchInputType::didSetValueByUserEdit):

LayoutTests:

  • fast/forms/change-input-type-and-submit-form-crash-expected.txt: Added.
  • fast/forms/change-input-type-and-submit-form-crash.html: Added.
4:52 PM Changeset in webkit [216158] by Ryan Haddad
  • 8 edits in branches/safari-603-branch/LayoutTests

Unreviewed test gardening.

  • platform/ios-simulator-wk2/imported/w3c/web-platform-tests/dom/events/EventTarget-dispatchEvent-expected.txt:
  • platform/ios-simulator-wk2/imported/w3c/web-platform-tests/html/dom/reflection-text-expected.txt:
  • platform/ios-simulator/TestExpectations:
  • platform/ios-simulator/compositing/geometry/fixed-in-composited-expected.txt:
  • platform/mac-wk1/TestExpectations:
  • platform/mac/TestExpectations:
  • scrollingcoordinator/ios/sync-layer-positions-after-scroll-expected.txt:
4:50 PM Changeset in webkit [216157] by jiewen_tan@apple.com
  • 2 edits
    2 adds in trunk/Tools

[WebCrypto] Add an api test for testing wrapping/unwrapping serialized crypto keys
https://bugs.webkit.org/show_bug.cgi?id=171350
<rdar://problem/28600836>

Patched by Brady Eidson.

Reviewed by Brent Fulgham.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKit2/NavigationClientDefaultCrypto.cpp: Added.

(TestWebKitAPI::runJavaScriptAlert):
(TestWebKitAPI::decidePolicyForNavigationAction):
(TestWebKitAPI::decidePolicyForNavigationResponse):
(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKit2/navigation-client-default-crypto.html: Added.
4:50 PM Changeset in webkit [216156] by jer.noble@apple.com
  • 4 edits in trunk/Source/WebCore

Make the VPIO audio unit a singleton, shared between multiple CaptureSources
https://bugs.webkit.org/show_bug.cgi?id=171622

Reviewed by Eric Carlson.

Move the implemnetation of CoreAudioCaptureSource into a shared singleton class, CoreAudioSharedUnit,
which will send audio to each of it's client CoreAudioCaptureSources. The first registered client will
define the settings used by the shared unit.

Drive-by fixes: Fix up setUseAVFoundationAudioCapture() to always accept the first value set.

  • platform/mediastream/mac/CoreAudioCaptureSource.cpp:

(WebCore::CoreAudioSharedUnit::isProducingData):
(WebCore::CoreAudioSharedUnit::microphoneFormat):
(WebCore::CoreAudioSharedUnit::singleton):
(WebCore::CoreAudioSharedUnit::addClient):
(WebCore::CoreAudioSharedUnit::removeClient):
(WebCore::CoreAudioSharedUnit::addEchoCancellationSource):
(WebCore::CoreAudioSharedUnit::removeEchoCancellationSource):
(WebCore::CoreAudioSharedUnit::preferredIOBufferSize):
(WebCore::CoreAudioSharedUnit::setupAudioUnits):
(WebCore::CoreAudioSharedUnit::configureMicrophoneProc):
(WebCore::CoreAudioSharedUnit::configureSpeakerProc):
(WebCore::CoreAudioSharedUnit::checkTimestamps):
(WebCore::CoreAudioSharedUnit::provideSpeakerData):
(WebCore::CoreAudioSharedUnit::speakerCallback):
(WebCore::CoreAudioSharedUnit::processMicrophoneSamples):
(WebCore::CoreAudioSharedUnit::microphoneCallback):
(WebCore::CoreAudioSharedUnit::cleanupAudioUnits):
(WebCore::CoreAudioSharedUnit::startProducingData):
(WebCore::CoreAudioSharedUnit::stopProducingData):
(WebCore::CoreAudioSharedUnit::suspend):
(WebCore::CoreAudioSharedUnit::defaultInputDevice):
(WebCore::CoreAudioCaptureSource::create):
(WebCore::CoreAudioCaptureSource::factory):
(WebCore::CoreAudioCaptureSource::CoreAudioCaptureSource):
(WebCore::CoreAudioCaptureSource::~CoreAudioCaptureSource):
(WebCore::CoreAudioCaptureSource::addEchoCancellationSource):
(WebCore::CoreAudioCaptureSource::removeEchoCancellationSource):
(WebCore::CoreAudioCaptureSource::startProducingData):
(WebCore::CoreAudioCaptureSource::stopProducingData):
(WebCore::CoreAudioCaptureSource::audioSourceProvider):
(WebCore::CoreAudioCaptureSource::preferredSampleRate): Deleted.
(WebCore::CoreAudioCaptureSource::preferredIOBufferSize): Deleted.
(WebCore::CoreAudioCaptureSource::configureMicrophoneProc): Deleted.
(WebCore::CoreAudioCaptureSource::configureSpeakerProc): Deleted.
(WebCore::CoreAudioCaptureSource::checkTimestamps): Deleted.
(WebCore::CoreAudioCaptureSource::provideSpeakerData): Deleted.
(WebCore::CoreAudioCaptureSource::speakerCallback): Deleted.
(WebCore::CoreAudioCaptureSource::processMicrophoneSamples): Deleted.
(WebCore::CoreAudioCaptureSource::microphoneCallback): Deleted.
(WebCore::CoreAudioCaptureSource::cleanupAudioUnits): Deleted.
(WebCore::CoreAudioCaptureSource::defaultInputDevice): Deleted.
(WebCore::CoreAudioCaptureSource::setupAudioUnits): Deleted.
(WebCore::CoreAudioCaptureSource::suspend): Deleted.
(WebCore::CoreAudioCaptureSource::resume): Deleted.

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

(WebCore::RealtimeMediaSourceCenterMac::setUseAVFoundationAudioCapture):

4:48 PM Changeset in webkit [216155] by jer.noble@apple.com
  • 3 edits in trunk/Source/WebCore

getUserMedia() fails because devices list is empty / inactive
https://bugs.webkit.org/show_bug.cgi?id=171626

Reviewed by Eric Carlson.

When creating a AVAudioSessionCaptureDevice, set the device's enabled state to true if the port description
has any items in its dataSources property (which is the best analogue to "isActive" we have in AVAudioSession).

Also, when creating the generic list of CaptureDevices, use the copy constructor to ensure the enabled state
gets copied to the new generic device.

  • platform/mediastream/ios/AVAudioSessionCaptureDevice.mm:

(WebCore::AVAudioSessionCaptureDevice::create):

  • platform/mediastream/ios/AVAudioSessionCaptureDeviceManager.mm:

(WebCore::AVAudioSessionCaptureDeviceManager::refreshAudioCaptureDevices):

4:21 PM Changeset in webkit [216154] by commit-queue@webkit.org
  • 5 edits in trunk/Source/WebCore

Implement the imageready event to reliably test the async image decoding
https://bugs.webkit.org/show_bug.cgi?id=171016

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2017-05-03
Reviewed by Simon Fraser.

The event will be fired for each client of the image. Firing the event
will happen after finishing the decoding and repainting the client.

Existing tests will be modified in a separate patch to use this event.

  • dom/Element.cpp:

(WebCore::Element::dispatchWebKitImageReadyEventForTesting):

  • dom/Element.h:
  • page/Settings.in:
  • rendering/RenderElement.cpp:

(WebCore::RenderElement::imageFrameAvailable):

4:07 PM Changeset in webkit [216153] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Mark media/modern-media-controls/slider/slider-styles.html as flaky on mac-wk1.
https://bugs.webkit.org/show_bug.cgi?id=171629

Unreviewed test gardening.

  • platform/mac-wk1/TestExpectations:
4:00 PM Changeset in webkit [216152] by timothy_horton@apple.com
  • 7 edits in trunk/Source

Maintain interaction information URL as a URL, not a string
https://bugs.webkit.org/show_bug.cgi?id=171623

Reviewed by Simon Fraser.

No new tests, not a behavior change.

  • platform/URL.h:
  • Shared/ios/InteractionInformationAtPosition.h:
  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView _showAttachmentSheet]):
(-[WKContentView _interactionShouldBeginFromPreviewItemController:forPosition:]):
(-[WKContentView _dataForPreviewItemController:atPosition:type:]):

  • UIProcess/ios/WKPDFView.mm:

(-[WKPDFView annotation:isBeingPressedAtPoint:controller:]):
(-[WKPDFView actionSheetAssistant:performAction:]):

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::getPositionInformation):

3:36 PM Changeset in webkit [216151] by mark.lam@apple.com
  • 5 edits in trunk/Source

Use the CLoop for CPU(ARM64E).
https://bugs.webkit.org/show_bug.cgi?id=171620
<rdar://problem/31973027>

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

  • llint/LLIntOfflineAsmConfig.h:
  • tools/SigillCrashAnalyzer.cpp:

(JSC::SigillCrashAnalyzer::dumpCodeBlock):

Source/WTF:

  • wtf/Platform.h:
3:30 PM Changeset in webkit [216150] by commit-queue@webkit.org
  • 4 edits in trunk/LayoutTests

LayoutTest http/tests/inspector/network/fetch-network-data.html is a flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=166038
<rdar://problem/29488489>

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2017-05-03
Reviewed by Matt Baker.

  • platform/mac/TestExpectations:
  • http/tests/inspector/network/fetch-network-data.html:
  • http/tests/inspector/network/xhr-request-data-encoded-correctly.html:

Use singleFireEventListener instead of awaitEvent so that the follow-up event handlers
can be added synchronously instead of in a microtask. When the microtask happened later
than other incoming events then the follow-up handlers would have been added too late.

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

Mark imported/w3c/web-platform-tests/html/webappapis/timers/negative-settimeout.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=170699.

Unreviewed test gardening.

Patch by Matt Lewis <Matt Lewis> on 2017-05-03

  • platform/ios-wk2/TestExpectations:
3:15 PM Changeset in webkit [216148] by caitp@igalia.com
  • 3 edits
    1 delete in trunk/JSTests

[JSC] remove unneeded asyncFunctionTests.yaml
https://bugs.webkit.org/show_bug.cgi?id=171611

Reviewed by Yusuke Suzuki.

Async functions have shipped, and those tests are run as part of
JSTests/stress and JSTests/test262.yaml. The file is no longer needed.

  • asyncFunctionTests.yaml: Removed.
  • stress/async-await-long-loop.js:
  • stress/async-await-throw-loop.js:
3:13 PM Changeset in webkit [216147] by Nikita Vasilyev
  • 7 edits
    2 copies in trunk/Source/WebInspectorUI

Uncaught Exception: Can't make a ContentView for an unknown representedObject of type: IndexedDatabase
https://bugs.webkit.org/show_bug.cgi?id=167473
<rdar://problem/30249715>

Reviewed by Matt Baker.

When an indexed database is selected in the Storage navigation sidebar, show its host, security origin, and version.

Previously, selecting an indexed database didn't change the content view. It could lead to a misleading state
when an indexed database is selected in the sidebar, but the content view showed previously selected item such as
Cookies or Local Storage.

  • UserInterface/Main.html:
  • UserInterface/Views/ContentView.css:

(.content-view .details-section):
(.content-view .details-section > .content):
(.content-view .details-section > .content > .group > .row.simple > .label):
(.content-view .details-section:last-child):

  • UserInterface/Views/ContentView.js:

(WebInspector.ContentView.createFromRepresentedObject):
(WebInspector.ContentView.isViewable):

  • UserInterface/Views/IndexedDatabaseContentView.css: Added.

(.indexed-database.content-view):
(.indexed-database.content-view .indexed-database-details):
(.indexed-database.content-view .details-section > .header):

  • UserInterface/Views/IndexedDatabaseContentView.js: Added.

(WebInspector.IndexedDatabaseContentView):

  • UserInterface/Views/IndexedDatabaseDetailsSidebarPanel.js:

(WebInspector.IndexedDatabaseDetailsSidebarPanel.prototype.inspect):
Don't show the details sidebar for IndexedDB top level item since it has the same content as the content view.

  • UserInterface/Views/StorageSidebarPanel.js:

(WebInspector.StorageSidebarPanel._treeSelectionDidChange):

  • UserInterface/Views/StorageTabContentView.js:

(WebInspector.StorageTabContentView.prototype.canShowRepresentedObject):
(WebInspector.StorageTabContentView):

3:06 PM Changeset in webkit [216146] by jmarcell@apple.com
  • 5 edits in branches/safari-603-branch/Source

Versioning.

3:04 PM Changeset in webkit [216145] by Simon Fraser
  • 8 edits in trunk

Have WKWebView call _updateVisibleContentRects for the current transaction if possible, rather than always delaying
https://bugs.webkit.org/show_bug.cgi?id=171619
Source/WebKit2:

Also fixes webkit.org/b/170153 and webkit.org/b/170195

Reviewed by Tim Horton.

In r214391 we started adding the pre-commit handler in a dispatch_async() to ensure that
the handler would always run, since we couldn't reliably test the phase of the current
transaction. Now that problem has been solved (rdar://problem/31253952) we can go back to
checking the transaction phase on newer iOS versions. If we're too late for the current transaction
we still need to dispatch_async() to get into the next one.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _addUpdateVisibleContentRectPreCommitHandler]):
(-[WKWebView _scheduleVisibleContentRectUpdateAfterScrollInView:]):

Tools:

https://bugs.webkit.org/show_bug.cgi?id=170195

Reviewed by Tim Horton.

Re-enable WebKit2.ResizeWithHiddenContentDoesNotHang.

  • TestWebKitAPI/Tests/WebKit2Cocoa/AnimatedResize.mm:

(TEST):

LayoutTests:

https://bugs.webkit.org/show_bug.cgi?id=170153

Reviewed by Tim Horton.

These tests need to wait a bit for the scrolling state of the document to be updated.

  • fast/scrolling/ios/touch-scroll-pointer-events-none.html:
  • fast/scrolling/ios/touch-scroll-visibility-hidden.html:
  • platform/ios-wk2/TestExpectations:
2:56 PM Changeset in webkit [216144] by Chris Dumez
  • 2 edits in trunk/Source/WebKit2

REGRESSION (r216129): ASSERTION FAILED: m_process->state() == WebProcessProxy::State::Terminated
https://bugs.webkit.org/show_bug.cgi?id=171616

Reviewed by Brady Eidson.

Stop calling resetStateAfterProcessExited() in WebPageProxy::terminateProcess() as the call to
WebProcessProxy::requestTermination() already causes WebPageProxy::processDidCrash() to be called
after r216129. WebPageProxy::processDidCrash() already takes care of calling
resetStateAfterProcessExited().

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::terminateProcess):

2:55 PM Changeset in webkit [216143] by yoav@yoav.ws
  • 4 edits
    2 adds in trunk

Link preload HTMLPreloadScanner support
https://bugs.webkit.org/show_bug.cgi?id=170747

Reviewed by Youenn Fablet.

Source/WebCore:

Test: http/tests/preload/preloadscanner_download_resources.html

  • html/parser/HTMLPreloadScanner.cpp:

(WebCore::TokenPreloadScanner::StartTagScanner::StartTagScanner): Initialize link preload flag.
(WebCore::TokenPreloadScanner::StartTagScanner::createPreloadRequest): Create a request only if the type is known (so ignore
preloads with unknown type).
(WebCore::TokenPreloadScanner::StartTagScanner::processAttribute): Add handling for link preload and the as attribute.
(WebCore::TokenPreloadScanner::StartTagScanner::relAttributeIsStyleSheet): Get LinkRelAttribute as input.
(WebCore::TokenPreloadScanner::StartTagScanner::resourceType): Return an std::optional, in case the preload type is unknown.
(WebCore::TokenPreloadScanner::StartTagScanner::shouldPreload): Return true for the link preload case.

  • loader/cache/CachedResourceLoader.cpp:

(WebCore::CachedResourceLoader::preload): Return the resource rather than a nullptr if it's already in m_preloads.

LayoutTests:

  • http/tests/preload/preloadscanner_download_resources-expected.txt: Added.
  • http/tests/preload/preloadscanner_download_resources.html: Added.
2:36 PM Changeset in webkit [216142] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Mark http/tests/preload/single_download_preload.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=171331

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
2:20 PM Changeset in webkit [216141] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Mark perf/object-keys.html as flaky
https://bugs.webkit.org/show_bug.cgi?id=171617

Unreviewed test gardening.

Patch by Matt Lewis <Matt Lewis> on 2017-05-03

  • platform/ios-wk2/TestExpectations:
2:01 PM Changeset in webkit [216140] by mitz@apple.com
  • 8 copies
    1 add in releases/Apple/Safari Technology Preview 29

Added a tag for Safari Technology Preview release 29.

1:51 PM Changeset in webkit [216139] by Michael Catanzaro
  • 4 edits in trunk

YouTube user agent quirk breaks new YouTube
https://bugs.webkit.org/show_bug.cgi?id=171603

Reviewed by Carlos Garcia Campos.

Source/WebCore:

Our user agent quirk to make YouTube 360 work breaks the new YouTube UI, causing it to
attempt to use the obsolete custom elements v0 API. WebKit only supports the v1 API. We
have to remove this quirk.

Note this does not affect Safari as Apple ports don't use our user agent quirks.

  • platform/UserAgentQuirks.cpp:

(WebCore::urlRequiresChromeBrowser):

Tools:

Remove the YouTube quirk test.

  • TestWebKitAPI/Tests/WebCore/UserAgentQuirks.cpp:

(TestWebKitAPI::TEST):

1:36 PM Changeset in webkit [216138] by commit-queue@webkit.org
  • 10 edits in trunk/Source

Web Inspector: 404 Image Load does not appear as a failure in Web Inspector
https://bugs.webkit.org/show_bug.cgi?id=171587
<rdar://problem/13222846>

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2017-05-03
Reviewed by Matt Baker.

Source/WebCore:

  • inspector/InspectorPageAgent.h:
  • inspector/InspectorPageAgent.cpp:

(WebCore::InspectorPageAgent::cachedResourceContent):
(WebCore::prepareCachedResourceBuffer): Deleted.
Inline the function to make this less confusing.

(WebCore::InspectorPageAgent::buildObjectForFrameTree):
Treat a DecodeError as a failure.

Source/WebInspectorUI:

  • UserInterface/Models/Resource.js:

(WebInspector.Resource.prototype.createObjectURL):
This may return null if the data is not a Blob. This can happen if we
loaded non-base64Encoded text content for an Image. Such as a 404 response.

(WebInspector.Resource.prototype.hadLoadingError):
Consistent way to check for any kind of loading error.

(WebInspector.Resource.prototype.getImageSize):
Handle failure to create an object URL.

  • UserInterface/Views/FontResourceContentView.js:

(WebInspector.FontResourceContentView.prototype.contentAvailable):

  • UserInterface/Views/ImageResourceContentView.js:

(WebInspector.ImageResourceContentView.prototype.contentAvailable):
Handle failure to create an object URL.

1:33 PM Changeset in webkit [216137] by keith_miller@apple.com
  • 5 edits
    1 add in trunk

Different behaviour with the .sort(callback) method (unlike Firefox & Chrome)
https://bugs.webkit.org/show_bug.cgi?id=47825

Reviewed by Saam Barati.

JSTests:

  • stress/sorting-boolean-result-comparator.js: Added.

(checkArray):

Source/JavaScriptCore:

This patch makes our sort function match the behavior of Firefox
and Chrome when the result of the comparison function is a
boolean. When we first switched to using merge sort, it regressed
JQuery sorting of DOM nodes by 30%. The regression was do to the
fact that JQuery was using compareDocumentPosition to compare the
locations of objects. Since one of the benchmarks would pass a
reverse sorted list to the sort function we would end up walking
the entire DOM to do comparisons. The solution to this was to
merge based on comparison(right, left) rather than
comparison(left, right). Although, in practice this does nothing
since sort could just as easily receive an already sorted list and
we're back in the same spot.

The downside of sorting with comparison(right, left) is that to
maintain stability when sorting, you only want to merge from right
when the comparison function returns a negative value. This is
where the problem with booleans comes in. Since booleans toNumber
false to 0 and true to 1 both values are "equal". This patch fixes
this by special casing boolean return values.

  • builtins/ArrayPrototype.js:

(sort.merge):

LayoutTests:

Fix broken test.

  • http/tests/inspector/worker/blob-script-with-cross-domain-imported-scripts-expected.txt:
1:28 PM Changeset in webkit [216136] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Mark http/tests/xmlhttprequest/supported-xml-content-types.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=171613

Unreviewed test gardening.

Patch by Matt Lewis <Matt Lewis> on 2017-05-03

  • platform/ios-wk2/TestExpectations:
12:43 PM Changeset in webkit [216135] by commit-queue@webkit.org
  • 6 edits
    1 add in trunk

Async image decoding should be disabled for snapshots, printing and preview
https://bugs.webkit.org/show_bug.cgi?id=171467
Source/WebCore:

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2017-05-03
Reviewed by Simon Fraser.

Asynchronous image decoding should only be used for window display where
RenderElements can be repainted and painted. For cases where there is only
one chance to draw the image, synchronous decoding should be used.

  • rendering/RenderBoxModelObject.cpp:

(WebCore::RenderBoxModelObject::paintFillLayerExtended):

  • rendering/RenderImage.cpp:

(WebCore::RenderImage::paintIntoRect):

Tools:

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2017-05-03
Reviewed by Simon Fraser.

Add a API test for snapshotting with large images. Ensure the images are
drawn correctly which implies they should have been synchronously decoded.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKit2/large-red-square-image.html: Added.
  • TestWebKitAPI/Tests/WebKit2Cocoa/WKWebViewSnapshot.mm:

(TEST):

12:33 PM Changeset in webkit [216134] by n_wang@apple.com
  • 3 edits
    2 adds in trunk

AX: VO skips cells after cell with aria-colspan
https://bugs.webkit.org/show_bug.cgi?id=171579

Reviewed by Chris Fleizach.

Source/WebCore:

We should consider the previous cells' column span value when
calculating the column index.

Test: accessibility/mac/aria-grid-column-span.html

  • accessibility/AccessibilityARIAGridCell.cpp:

(WebCore::AccessibilityARIAGridCell::columnIndexRange):

LayoutTests:

  • accessibility/mac/aria-grid-column-span-expected.txt: Added.
  • accessibility/mac/aria-grid-column-span.html: Added.
12:27 PM Changeset in webkit [216133] by jiewen_tan@apple.com
  • 2 edits in trunk/Source/WebCore

ASSERTION FAILED: m_scriptExecutionContext->isContextThread() seen with LayoutTest crypto/workers/crypto-random-values-limits-worker.html
https://bugs.webkit.org/show_bug.cgi?id=171462
<rdar://problem/31906859>

Reviewed by Brent Fulgham.

Covered by existing tests.

  • workers/WorkerGlobalScope.cpp:

(WebCore::WorkerGlobalScope::~WorkerGlobalScope):
Clear Crypto early in destruction since its ContextDestructionObserver
destruction makes checks about the WorkerThread.

12:27 PM Changeset in webkit [216132] by beidson@apple.com
  • 2 edits in trunk/Source/WebKit2

Handle KVO updating of the "hasOnlySecureContent" before a page results in an HTTP auth challenge.
https://bugs.webkit.org/show_bug.cgi?id=171607

Reviewed by Andy Estes.

To test this fix we'd need the combination of an HTTPD inside API tests, so no test for now.

  • UIProcess/PageLoadState.cpp:

(WebKit::PageLoadState::hasOnlySecureContent): If the state is provisional, check the provisional URL instead.

12:17 PM Changeset in webkit [216131] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

RenderSearchField should not use isTextField() in SPECIALIZE_TYPE_TRAITS_RENDER_OBJECT
https://bugs.webkit.org/show_bug.cgi?id=171608

Reviewed by Simon Fraser.

isTextField() is true for any generic single line text control.

  • rendering/RenderObject.h:

(WebCore::RenderObject::isSearchField):

  • rendering/RenderSearchField.h:
12:02 PM Changeset in webkit [216130] by commit-queue@webkit.org
  • 9 edits in trunk/Source/WebCore

Remove ScrollingCoordinator::supportsFixedPositionLayers()
https://bugs.webkit.org/show_bug.cgi?id=171557

Patch by Frederic Wang <fwang@igalia.com> on 2017-05-03
Reviewed by Simon Fraser.

No new tests, behavior is not changed.

  • page/FrameView.cpp:

(WebCore::FrameView::shouldUpdateCompositingLayersAfterScrolling):

  • page/scrolling/AsyncScrollingCoordinator.cpp:

(WebCore::AsyncScrollingCoordinator::updateViewportConstrainedNode):

  • page/scrolling/AsyncScrollingCoordinator.h:
  • page/scrolling/ScrollingCoordinator.cpp:

(WebCore::ScrollingCoordinator::synchronousScrollingReasons):

  • page/scrolling/ScrollingCoordinator.h:

(WebCore::ScrollingCoordinator::supportsFixedPositionLayers): Deleted.

  • page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.cpp:

(WebCore::ScrollingCoordinatorCoordinatedGraphics::updateViewportConstrainedNode):

  • page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.h:

(): Deleted.

  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::updateScrollCoordinatedLayer):

11:54 AM Changeset in webkit [216129] by Chris Dumez
  • 14 edits
    3 adds in trunk

[WK2] Extend processDidCrash delegate to let the client know the reason for the crash
https://bugs.webkit.org/show_bug.cgi?id=171565
<rdar://problem/31204417>

Reviewed by Sam Weinig.

Source/WebKit2:

Extend processDidCrash delegate to let the client know the reason for the crash. This
is needed by some clients to distinguish actual crashes from terminations due to
resource limits.

  • Shared/ProcessCrashReason.h: Added.
  • UIProcess/API/APINavigationClient.h:

(API::NavigationClient::processDidCrash):

  • UIProcess/API/C/WKAPICast.h:

(WebKit::toAPI):

  • UIProcess/API/C/WKPage.cpp:

(WKPageSetPageNavigationClient):

  • UIProcess/API/C/WKPageNavigationClient.h:
  • UIProcess/API/C/WKProcessCrashReason.h: Added.
  • UIProcess/Cocoa/NavigationState.h:
  • UIProcess/Cocoa/NavigationState.mm:

(WebKit::NavigationState::NavigationClient::processDidCrash):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::processDidCrash):

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

(WebKit::WebProcessProxy::didClose):
(WebKit::WebProcessProxy::requestTermination):
(WebKit::diagnosticLoggingKeyForTerminationReason):
(WebKit::toProcessCrashReason):
(WebKit::WebProcessProxy::terminateProcessDueToResourceLimits):
(WebKit::WebProcessProxy::didExceedActiveMemoryLimit):
(WebKit::WebProcessProxy::didExceedInactiveMemoryLimit):
(WebKit::WebProcessProxy::didExceedBackgroundCPULimit):

  • UIProcess/WebProcessProxy.h:
  • WebKit2.xcodeproj/project.pbxproj:

Tools:

Add API test coverage.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKit2/ProcessDidCrashWithReason.cpp: Added.

(TestWebKitAPI::didFinishNavigation):
(TestWebKitAPI::didCrashWithReason):
(TestWebKitAPI::TEST):

11:41 AM Changeset in webkit [216128] by Chris Dumez
  • 25 edits
    2 deletes in trunk/Source/WebCore

Use PassRefPtr less in CompositeEditCommand
https://bugs.webkit.org/show_bug.cgi?id=171590

Reviewed by Sam Weinig.

Use PassRefPtr less in CompositeEditCommand.

  • CMakeLists.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • editing/ApplyStyleCommand.cpp:

(WebCore::hasNoAttributeOrOnlyStyleAttribute):
(WebCore::isStyleSpanOrSpanWithOnlyStyleAttribute):
(WebCore::isSpanWithoutAttributesOrUnstyledStyleSpan):
(WebCore::isEmptyFontTag):
(WebCore::ApplyStyleCommand::doApply):
(WebCore::ApplyStyleCommand::applyBlockStyle):
(WebCore::ApplyStyleCommand::applyRelativeFontStyleChange):
(WebCore::dummySpanAncestorForNode):
(WebCore::ApplyStyleCommand::cleanupUnstyledAppleStyleSpans):
(WebCore::ApplyStyleCommand::removeEmbeddingUpToEnclosingBlock):
(WebCore::ApplyStyleCommand::applyInlineStyle):
(WebCore::ApplyStyleCommand::fixRangeAndApplyInlineStyle):
(WebCore::ApplyStyleCommand::applyInlineStyleToNodeRange):
(WebCore::ApplyStyleCommand::shouldApplyInlineStyleToRun):
(WebCore::ApplyStyleCommand::removeConflictingInlineStyleFromRun):
(WebCore::ApplyStyleCommand::removeInlineStyleFromElement):
(WebCore::ApplyStyleCommand::replaceWithSpanOrRemoveIfWithoutAttributes):
(WebCore::ApplyStyleCommand::removeImplicitlyStyledElement):
(WebCore::ApplyStyleCommand::removeCSSStyle):
(WebCore::ApplyStyleCommand::highestAncestorWithConflictingInlineStyle):
(WebCore::ApplyStyleCommand::pushDownInlineStyleAroundNode):
(WebCore::ApplyStyleCommand::removeInlineStyle):
(WebCore::ApplyStyleCommand::shouldSplitTextElement):
(WebCore::ApplyStyleCommand::mergeStartWithPreviousIfIdentical):
(WebCore::ApplyStyleCommand::mergeEndWithNextIfIdentical):
(WebCore::ApplyStyleCommand::surroundNodeRangeWithElement):
(WebCore::ApplyStyleCommand::addBlockStyle):
(WebCore::ApplyStyleCommand::joinChildTextNodes):

  • editing/ApplyStyleCommand.h:

(WebCore::ApplyStyleCommand::shouldRemoveInlineStyleFromElement):

  • editing/CompositeEditCommand.cpp:

(WebCore::CompositeEditCommand::removeChildrenInRange):
(WebCore::CompositeEditCommand::mergeIdenticalElements):
(WebCore::CompositeEditCommand::insertTextIntoNode):
(WebCore::CompositeEditCommand::deleteTextFromNode):
(WebCore::CompositeEditCommand::replaceTextInNode):
(WebCore::CompositeEditCommand::replaceSelectedTextInNode):
(WebCore::CompositeEditCommand::replaceTextInNodePreservingMarkers):
(WebCore::CompositeEditCommand::removeNodeAttribute):
(WebCore::CompositeEditCommand::rebalanceWhitespaceAt):
(WebCore::CompositeEditCommand::rebalanceWhitespaceOnTextSubstring):
(WebCore::CompositeEditCommand::prepareWhitespaceAtPositionForSplit):
(WebCore::CompositeEditCommand::deleteInsignificantText):
(WebCore::CompositeEditCommand::removePlaceholderAt):
(WebCore::CompositeEditCommand::cleanupAfterDeletion):
(WebCore::CompositeEditCommand::moveParagraphs):

  • editing/CompositeEditCommand.h:
  • editing/DeleteFromTextNodeCommand.cpp:

(WebCore::DeleteFromTextNodeCommand::DeleteFromTextNodeCommand):
(WebCore::DeleteFromTextNodeCommand::doApply):
(WebCore::DeleteFromTextNodeCommand::doUnapply):
(WebCore::DeleteFromTextNodeCommand::getNodesInCommand):

  • editing/DeleteFromTextNodeCommand.h:

(WebCore::DeleteFromTextNodeCommand::create):

  • editing/DeleteSelectionCommand.cpp:

(WebCore::DeleteSelectionCommand::deleteTextFromNode):
(WebCore::DeleteSelectionCommand::handleGeneralDelete):
(WebCore::DeleteSelectionCommand::fixupWhitespace):

  • editing/DeleteSelectionCommand.h:
  • editing/EditingAllInOne.cpp:
  • editing/EditingStyle.cpp:

(WebCore::EditingStyle::removeStyleConflictingWithStyleOfNode):
(WebCore::elementMatchesAndPropertyIsNotInInlineStyleDecl):
(WebCore::EditingStyle::mergeInlineAndImplicitStyleOfElement):
(WebCore::EditingStyle::wrappingStyleForSerialization):
(WebCore::styleFromMatchedRulesForElement):
(WebCore::EditingStyle::mergeStyleFromRules):
(WebCore::EditingStyle::mergeStyleFromRulesForSerialization):
(WebCore::EditingStyle::removeStyleFromRulesAndContext):
(WebCore::EditingStyle::removePropertiesInElementDefaultStyle):

  • editing/EditingStyle.h:
  • editing/IndentOutdentCommand.cpp:

(WebCore::IndentOutdentCommand::tryIndentingAsListItem):

  • editing/InsertIntoTextNodeCommand.cpp:

(WebCore::InsertIntoTextNodeCommand::InsertIntoTextNodeCommand):
(WebCore::InsertIntoTextNodeCommand::getNodesInCommand):

  • editing/InsertIntoTextNodeCommand.h:

(WebCore::InsertIntoTextNodeCommand::create):

  • editing/InsertLineBreakCommand.cpp:

(WebCore::InsertLineBreakCommand::doApply):

  • editing/InsertListCommand.cpp:

(WebCore::InsertListCommand::mergeWithNeighboringLists):
(WebCore::InsertListCommand::listifyParagraph):

  • editing/InsertParagraphSeparatorCommand.cpp:

(WebCore::InsertParagraphSeparatorCommand::doApply):

  • editing/InsertTextCommand.cpp:

(WebCore::InsertTextCommand::performOverwrite):
(WebCore::InsertTextCommand::doApply):
(WebCore::InsertTextCommand::insertTab):

  • editing/MergeIdenticalElementsCommand.cpp:

(WebCore::MergeIdenticalElementsCommand::MergeIdenticalElementsCommand):
(WebCore::MergeIdenticalElementsCommand::doApply):
(WebCore::MergeIdenticalElementsCommand::doUnapply):
(WebCore::MergeIdenticalElementsCommand::getNodesInCommand):

  • editing/MergeIdenticalElementsCommand.h:

(WebCore::MergeIdenticalElementsCommand::create):

  • editing/RemoveCSSPropertyCommand.cpp: Removed.
  • editing/RemoveCSSPropertyCommand.h: Removed.
  • editing/ReplaceSelectionCommand.cpp:

(WebCore::ReplaceSelectionCommand::removeRedundantStylesAndKeepStyleSpanInline):
(WebCore::ReplaceSelectionCommand::doApply):
(WebCore::ReplaceSelectionCommand::addSpacesForSmartReplace):
(WebCore::ReplaceSelectionCommand::mergeTextNodesAroundPosition):

  • editing/markup.cpp:

(WebCore::StyledMarkupAccumulator::appendElement):
(WebCore::styleFromMatchedRulesAndInlineDecl):
(WebCore::createMarkupInternal):

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

Mark http/tests/websocket/tests/hybi/inspector/binary.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=171553

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
10:52 AM Changeset in webkit [216126] by dbates@webkit.org
  • 7 edits
    8 adds in trunk/LayoutTests

Detach frame from document when entering page cache
https://bugs.webkit.org/show_bug.cgi?id=166774
<rdar://problem/29904368>

Reviewed by Chris Dumez.

  • TestExpectations: Unskip tests.
  • fast/history/page-cache-after-window-open-expected.txt: Update expected result.
  • fast/history/page-cache-after-window-open.html: Ditto.
  • fast/history/page-cache-with-opener-expected.txt: Ditto.
  • fast/history/page-cache-with-opener.html: Update test given its new expected behavior.
  • fast/history/resources/page-cache-window-with-opener.html: Ditto.
  • http/tests/security/xss-DENIED-click-and-form-submission-from-inactive-domwindow-expected.txt: Added.
  • http/tests/security/xss-DENIED-click-and-form-submission-from-inactive-domwindow.html: Added.
  • http/tests/security/xss-DENIED-script-inject-into-inactive-window-expected.txt: Added.
  • http/tests/security/xss-DENIED-script-inject-into-inactive-window.html: Added.
  • http/tests/security/xss-DENIED-script-inject-into-inactive-window2-expected.txt: Added.
  • http/tests/security/xss-DENIED-script-inject-into-inactive-window2.html: Added.
  • http/tests/security/xss-DENIED-script-inject-into-inactive-window3-expected.txt: Added.
  • http/tests/security/xss-DENIED-script-inject-into-inactive-window3.html: Added.
10:51 AM Changeset in webkit [216125] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Marking three imported/w3c/web-platform-tests/webrtc test as flaky failures.
https://bugs.webkit.org/show_bug.cgi?id=171605

Unreviewed test gardening.

Patch by Matt Lewis <Matt Lewis> on 2017-05-03

  • platform/mac-wk2/TestExpectations:
10:47 AM Changeset in webkit [216124] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Marked test http/tests/local/blob/send-sliced-data-blob.html as flaky failure and timeout.
https://bugs.webkit.org/show_bug.cgi?id=171564

Unreviewed test gardening.

Patch by Matt Lewis <Matt Lewis> on 2017-05-03

  • platform/ios-wk2/TestExpectations:
10:18 AM Changeset in webkit [216123] by jdiggs@igalia.com
  • 3 edits
    3 adds in trunk

AX: Treat cells with ARIA table cell properties as cells
https://bugs.webkit.org/show_bug.cgi?id=171178

Reviewed by Chris Fleizach.

Source/WebCore:

Add the following checks to heuristics in AccessibilityTable::isDataTable():

  1. If the author has provided a valid aria-rowcount or aria-colcount value on the table element, expose it as a data table.
  2. If the author has provided a valid aria-colindex or aria-rowindex on the cell element, expose it as a data table.
  3. If the author has provided a valid aria-rowindex on the row element, expose it as a data table.
  4. If the author has provided a value for aria-colspan or aria-rowspan on a cell, expose it as a data table (even though we are supposed to ignore the value for the purpose of exposing the span via platform accessibility APIs)

Remove the heuristic that a table with only one cell is "not a good AXTable candidate."
It prevents us from ever doing the above checks.

Test: accessibility/minimal-table-with-aria-is-data-table.html

  • accessibility/AccessibilityTable.cpp:

(WebCore::AccessibilityTable::isDataTable):

LayoutTests:

  • accessibility/minimal-table-with-aria-is-data-table-expected.txt: Added.
  • accessibility/minimal-table-with-aria-is-data-table.html: Added.
  • platform/gtk/accessibility/minimal-table-with-aria-is-data-table-expected.txt: Added.
10:17 AM Changeset in webkit [216122] by commit-queue@webkit.org
  • 5 edits in trunk

[INTL] Support dashed values in unicode locale extensions
https://bugs.webkit.org/show_bug.cgi?id=171480

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

Source/JavaScriptCore:

Implements the UnicodeExtensionSubtags operation and updates the ResolveLocale operation to use it.
This fixes locale extensions with values that include '-'. The following calendars work now:
ethiopic-amete-alem
islamic-umalqura
islamic-tbla
islamic-civil
islamic-rgsa

While updating IntlObject, the comments containing spec text were replaced with a single url at the
top of each function pointing to the relevant part of ECMA-402.

  • runtime/IntlObject.cpp:

(JSC::unicodeExtensionSubTags): Added.
(JSC::resolveLocale): Updated to latest standard.

LayoutTests:

Added tests for calendar locale extensions that contain '-'.

  • js/intl-datetimeformat-expected.txt:
  • js/script-tests/intl-datetimeformat.js:
10:06 AM Changeset in webkit [216121] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebCore

[Cairo] Handle extended colors in gradients
https://bugs.webkit.org/show_bug.cgi?id=171596

Reviewed by Michael Catanzaro.

Check if every gradient color step is an extended color and use asExtended() instead of getRGBA() in such case.

Fixes: css3/color/gradients.html

  • platform/graphics/cairo/GradientCairo.cpp:

(WebCore::Gradient::platformGradient):

9:58 AM Changeset in webkit [216120] by dbates@webkit.org
  • 3 edits
    2 adds in trunk

Abandon the current load once the provisional loader detaches from the frame
https://bugs.webkit.org/show_bug.cgi?id=171577
<rdar://problem/31581227>

Source/WebCore:

Reviewed by Brent Fulgham and Brady Eidson.

We detach all child frames as part of setting our document loader to the provisional
document loader when committing a load for a frame. Detaching child frames invokes
the unload event handler on the child frames that can run arbitrary JavaScript script.
Among other things, such script can initiate a new load in the frame whose current
load is being committed. We should stop processing the current load as soon as we
detect that updating our document loader has started a new provisional load.

Test: fast/loader/inner-iframe-loads-data-url-into-parent-on-unload-crash.html

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::transitionToCommitted):

LayoutTests:

Reviewed by Brent Fulgham.

  • fast/loader/inner-iframe-loads-data-url-into-parent-on-unload-crash-expected.txt: Added.
  • fast/loader/inner-iframe-loads-data-url-into-parent-on-unload-crash.html: Added.
9:52 AM Changeset in webkit [216119] by dbates@webkit.org
  • 2 edits in trunk/Source/WebCore

Cleanup: Remove out-of-date comment and null check from DocumentLoader::detachFromFrame()
https://bugs.webkit.org/show_bug.cgi?id=171604

Reviewed by Brady Eidson.

We no longer want to passively allow DocumentLoader::detachFromFrame() to be called twice.
It does not make sense to be called twice and should never be called twice. A release assert
in DocumentLoader::cancelPolicyCheckIfNeeded() (added in r187558) called by DocumentLoader::detachFromFrame()
enforces this invariant. Therefore we can remove the null check of DocumentLoader::m_frame
and the comment that explains the purpose of this null check from DocumentLoader::detachFromFrame().

  • loader/DocumentLoader.cpp:

(WebCore::DocumentLoader::detachFromFrame):

9:28 AM Changeset in webkit [216118] by Ryan Haddad
  • 2 edits in trunk/Source/WebCore

Unreviewed attempt to fix the Windows build after r216117.
https://bugs.webkit.org/show_bug.cgi?id=171601

  • css/CSSAllInOne.cpp:
7:04 AM Changeset in webkit [216117] by Antti Koivisto
  • 7 edits
    2 moves in trunk/Source/WebCore

Rename StyleInvalidationAnalysis to Style::Invalidator
https://bugs.webkit.org/show_bug.cgi?id=171601

Reviewed by Žan Doberšek.

Also move it to the 'style' directory.

  • CMakeLists.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • css/StyleInvalidationAnalysis.cpp: Removed.
  • css/StyleInvalidationAnalysis.h: Removed.
  • dom/ExtensionStyleSheets.cpp:
  • style/AttributeChangeInvalidation.cpp:

(WebCore::Style::AttributeChangeInvalidation::invalidateDescendants):

  • style/ClassChangeInvalidation.cpp:

(WebCore::Style::ClassChangeInvalidation::invalidateDescendantStyle):

  • style/StyleInvalidator.cpp: Copied from Source/WebCore/css/StyleInvalidationAnalysis.cpp.

(WebCore::Style::Invalidator::Invalidator):
(WebCore::Style::Invalidator::invalidateIfNeeded):
(WebCore::Style::Invalidator::invalidateStyleForTree):
(WebCore::Style::Invalidator::invalidateStyle):
(WebCore::shouldDirtyAllStyle): Deleted.
(WebCore::StyleInvalidationAnalysis::StyleInvalidationAnalysis): Deleted.
(WebCore::StyleInvalidationAnalysis::invalidateIfNeeded): Deleted.
(WebCore::StyleInvalidationAnalysis::invalidateStyleForTree): Deleted.
(WebCore::StyleInvalidationAnalysis::invalidateStyle): Deleted.

  • style/StyleInvalidator.h: Copied from Source/WebCore/css/StyleInvalidationAnalysis.h.

(WebCore::StyleInvalidationAnalysis::dirtiesAllStyle): Deleted.
(WebCore::StyleInvalidationAnalysis::hasShadowPseudoElementRulesInAuthorSheet): Deleted.

  • style/StyleScope.cpp:

(WebCore::Style::Scope::resolver):
(WebCore::Style::Scope::analyzeStyleSheetChange):

5:47 AM Changeset in webkit [216116] by Carlos Garcia Campos
  • 2 edits in trunk/LayoutTests

Unreviewed GTK+ gardening. Update expectations of several tests.

  • platform/gtk/TestExpectations:
3:18 AM Changeset in webkit [216115] by Carlos Garcia Campos
  • 1 edit
    2 adds in trunk/LayoutTests

Unreviewed GTK+ gardening. Rebaseline inspector resource size tests.

Libsoup doesn't provide the required information to fill all those size metrics.

  • platform/gtk/http/tests/inspector/network/resource-sizes-memory-cache-expected.txt: Added.
  • platform/gtk/http/tests/inspector/network/resource-sizes-network-expected.txt: Added.
1:55 AM Changeset in webkit [216114] by Carlos Garcia Campos
  • 5 edits
    2 adds in trunk/Source/WebKit2

[GTK] Add GTK+ implementation of WebAutomationSession
https://bugs.webkit.org/show_bug.cgi?id=171431

Reviewed by Michael Catanzaro.

Add platform dependent methods for GTK+ to synthesize events.

  • PlatformGTK.cmake:
  • UIProcess/API/gtk/WebKitUIClient.cpp: Always resize the window for web views controlled by automation.
  • UIProcess/Automation/WebAutomationSession.cpp:

(WebKit::WebAutomationSession::resizeWindowOfBrowsingContext):
(WebKit::WebAutomationSession::moveWindowOfBrowsingContext):
(WebKit::WebAutomationSession::performMouseInteraction):
(WebKit::WebAutomationSession::performKeyboardInteractions):

  • UIProcess/Automation/WebAutomationSession.h:
  • UIProcess/Automation/gtk/WebAutomationSessionGtk.cpp: Added.

(WebKit::modifiersToEventState):
(WebKit::mouseButtonToGdkButton):
(WebKit::doMouseEvent):
(WebKit::doMotionEvent):
(WebKit::WebAutomationSession::platformSimulateMouseInteraction):
(WebKit::doKeyStrokeEvent):
(WebKit::keyCodeForVirtualKey):
(WebKit::WebAutomationSession::platformSimulateKeyStroke):
(WebKit::WebAutomationSession::platformSimulateKeySequence):
(WebKit::WebAutomationSession::platformGetBase64EncodedPNGData):

1:32 AM Changeset in webkit [216113] by Carlos Garcia Campos
  • 1 copy in releases/WebKitGTK/webkit-2.17.1

WebKitGTK+ 2.17.1

1:30 AM Changeset in webkit [216112] by Carlos Garcia Campos
  • 4 edits in trunk

Unreviewed. Update OptionsGTK.cmake and NEWS for 2.17.1 release.

.:

  • Source/cmake/OptionsGTK.cmake: Bump version numbers.

Source/WebKit2:

  • gtk/NEWS: Add release notes for 2.17.1.
12:15 AM Changeset in webkit [216111] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebKit2

[Soup] Add request headers to network load metrics
https://bugs.webkit.org/show_bug.cgi?id=171545

Reviewed by Sergio Villar Senin.

This will make the headers to appear in the web inspector.

Fixes: http/tests/inspector/network/resource-request-headers.html

  • NetworkProcess/soup/NetworkDataTaskSoup.cpp:

(WebKit::NetworkDataTaskSoup::didGetHeaders):

May 2, 2017:

8:59 PM Changeset in webkit [216110] by ddkilzer@apple.com
  • 3 edits
    1 add in trunk/Tools

check-webkit-style should also keep js-test-post[-async].js in sync
<https://webkit.org/b/171568>

Reviewed by Joseph Pecoraro.

  • Scripts/webkitpy/style/checker.py:

(_NEVER_SKIPPED_JS_FILES): Add new list that just contains
JavaScript files not to be skipped.
(_NEVER_SKIPPED_FILES): Update to use _NEVER_SKIPPED_JS_FILES.
(CheckerDispatcher._create_checker): Update to use
_NEVER_SKIPPED_JS_FILES.

  • Scripts/webkitpy/style/checkers/jstest.py:

(ALL_JS_TEST_FUNCTION_FILES): Rename from ALL_JS_TEST_FILES.
This is the list of files containing functions that need to be
kept in sync.
(KEEP_JS_TEST_FILES_IN_SYNC): Change to list-of-lists format so
we can keep more sets of files in sync between
LayoutTests/resources and LayoutTests/http/tests/resources.
(JSTestChecker.check): Update to use KEEP_JS_TEST_FILES_IN_SYNC
as list of lists. Update for ALL_JS_TEST_FUNCTION_FILES rename.
(JSTestChecker.check_js_test_files): Add 'file_group' argument
for list of files to check instead of using
KEEP_JS_TEST_FILES_IN_SYNC.
(JSTestChecker.check_js_test_functions): Update for
ALL_JS_TEST_FUNCTION_FILES rename.

  • Scripts/webkitpy/style/checkers/jstest_unittest.py:

(JSTestCheckerTestCase):
(JSTestCheckerTestCase.test_map_functions_to_dict):

  • Add test case for map_functions_to_dict() in jstest.py.
7:48 PM Changeset in webkit [216109] by commit-queue@webkit.org
  • 2 edits in trunk/Source/JavaScriptCore

Build fix after r216078
https://bugs.webkit.org/show_bug.cgi?id=171554

Patch by Don Olmstead <don.olmstead@am.sony.com> on 2017-05-02
Reviewed by Saam Barati.

  • API/tests/testapi.c:
7:48 PM Changeset in webkit [216108] by aakash_jain@apple.com
  • 2 edits in trunk/Tools

ews should indicate in logs when it fails to fetch the attachment
https://bugs.webkit.org/show_bug.cgi?id=171583

Reviewed by Alexey Proskuryakov.

  • Scripts/webkitpy/common/net/bugzilla/bugzilla.py:

(Bugzilla.fetch_attachment): Added log statement.

5:11 PM Changeset in webkit [216107] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

Typo in AVAudioSessionCaptureDeviceManager.mm
https://bugs.webkit.org/show_bug.cgi?id=171572

Patch by Andrew Gold <agold@apple.com> on 2017-05-02
Reviewed by Jer Noble.

We attempt to call +[AVAudioSession sharedSession], but the actual method is
called +[AVAudioSession sharedInstance].

  • platform/mediastream/ios/AVAudioSessionCaptureDeviceManager.mm:

(WebCore::AVAudioSessionCaptureDeviceManager::refreshAudioCaptureDevices):

4:15 PM Changeset in webkit [216106] by dbates@webkit.org
  • 2 edits in trunk/Source

Source/WebCore:
Improve scrolling tree logging
https://bugs.webkit.org/show_bug.cgi?id=171574

Patch by Simon Fraser <Simon Fraser> on 2017-05-02
Reviewed by Tim Horton.

Make a call to showScrollingStateTree() print debugging-related information like node and layer IDs.
Required fixing scrolling state tree nodes to respect ScrollingStateTreeAsTextBehavior, and fixing
fixed and sticky nodes to call super.

Also enhance compositing logging to show layer IDs, and to log for layer scrolling tree registration.

  • page/scrolling/AsyncScrollingCoordinator.cpp:

(WebCore::AsyncScrollingCoordinator::scrollingStateTreeAsText):

  • page/scrolling/AsyncScrollingCoordinator.h:
  • page/scrolling/ScrollingCoordinator.cpp:

(WebCore::ScrollingCoordinator::scrollingStateTreeAsText):

  • page/scrolling/ScrollingCoordinator.h:
  • page/scrolling/ScrollingStateFixedNode.cpp:

(WebCore::ScrollingStateFixedNode::dumpProperties):

  • page/scrolling/ScrollingStateNode.cpp:

(WebCore::ScrollingStateNode::dumpProperties):
(WebCore::ScrollingStateNode::scrollingStateTreeAsText):

  • page/scrolling/ScrollingStateNode.h:
  • page/scrolling/ScrollingStateScrollingNode.cpp:

(WebCore::ScrollingStateScrollingNode::dumpProperties):

  • page/scrolling/ScrollingStateStickyNode.cpp:

(WebCore::ScrollingStateStickyNode::dumpProperties):

  • page/scrolling/ScrollingStateTree.cpp:

(showScrollingStateTree):

  • page/scrolling/mac/ScrollingCoordinatorMac.mm:

(WebCore::ScrollingCoordinatorMac::commitTreeState):

  • rendering/RenderLayerBacking.cpp:

(WebCore::RenderLayerBacking::detachFromScrollingCoordinator):

  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::logLayerInfo):
(WebCore::RenderLayerCompositor::updateScrollCoordinatedLayer):

Source/WTF:
Fix the build after <https://trac.webkit.org/changeset/216102>
(https://bugs.webkit.org/show_bug.cgi?id=170925)

Export into global scope ASCIICaseInsensitiveStringViewHashTranslator.

Also fix indentation of member functions of ASCIICaseInsensitiveStringViewHashTranslator.

  • wtf/text/StringHash.h:
4:07 PM Changeset in webkit [216105] by dbates@webkit.org
  • 2 edits in trunk/Source/WTF

Fix the build after <https://trac.webkit.org/changeset/216102>
(https://bugs.webkit.org/show_bug.cgi?id=170925)

Export into global scope ASCIICaseInsensitiveStringViewHashTranslator.

Also fix indentation of member functions of ASCIICaseInsensitiveStringViewHashTranslator.

  • wtf/text/StringHash.h:
4:06 PM Changeset in webkit [216104] by Simon Fraser
  • 3 edits
    2 adds in trunk

Dynamically added position:fixed element is in the wrong place
https://bugs.webkit.org/show_bug.cgi?id=170280
rdar://problem/31374008

Reviewed by Tim Horton.

Source/WebKit2:

Layers for position:fixed elements have their positions reconciled after scrolls
via AsyncScrollingCoordinator::reconcileViewportConstrainedLayerPositions() and GraphicsLayerCA::syncPosition(),
which updates the GraphicsLayer's position, but does not push it to the PlatformCALayer.

This bug was a case where a position:fixed element gained a fixed ancestor, so had a GraphicsLayerCA whose
position had been updated via syncPosition() in the past. A subsequent layout updated the GraphicsLayerCA position,
but to a value that was the same as its pre-sync position, so the PlatformCALayerRemote's position didn't change,
but there was no signal to the UI process to restore the layer's pre-scrolled position.

Fix by avoiding the early return in PlatformCALayerRemote::setPosition(), to ensure that GraphicsLayerCA
geometry updates in the web process always send new positions to the UI process.

  • WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:

(WebKit::PlatformCALayerRemote::setPosition):

LayoutTests:

  • scrollingcoordinator/ios/nested-fixed-layer-positions-expected.html: Added.
  • scrollingcoordinator/ios/nested-fixed-layer-positions.html: Added.
4:06 PM Changeset in webkit [216103] by Simon Fraser
  • 14 edits in trunk/Source/WebCore

Improve scrolling tree logging
https://bugs.webkit.org/show_bug.cgi?id=171574

Reviewed by Tim Horton.

Make a call to showScrollingStateTree() print debugging-related information like node and layer IDs.
Required fixing scrolling state tree nodes to respect ScrollingStateTreeAsTextBehavior, and fixing
fixed and sticky nodes to call super.

Also enhance compositing logging to show layer IDs, and to log for layer scrolling tree registration.

  • page/scrolling/AsyncScrollingCoordinator.cpp:

(WebCore::AsyncScrollingCoordinator::scrollingStateTreeAsText):

  • page/scrolling/AsyncScrollingCoordinator.h:
  • page/scrolling/ScrollingCoordinator.cpp:

(WebCore::ScrollingCoordinator::scrollingStateTreeAsText):

  • page/scrolling/ScrollingCoordinator.h:
  • page/scrolling/ScrollingStateFixedNode.cpp:

(WebCore::ScrollingStateFixedNode::dumpProperties):

  • page/scrolling/ScrollingStateNode.cpp:

(WebCore::ScrollingStateNode::dumpProperties):
(WebCore::ScrollingStateNode::scrollingStateTreeAsText):

  • page/scrolling/ScrollingStateNode.h:
  • page/scrolling/ScrollingStateScrollingNode.cpp:

(WebCore::ScrollingStateScrollingNode::dumpProperties):

  • page/scrolling/ScrollingStateStickyNode.cpp:

(WebCore::ScrollingStateStickyNode::dumpProperties):

  • page/scrolling/ScrollingStateTree.cpp:

(showScrollingStateTree):

  • page/scrolling/mac/ScrollingCoordinatorMac.mm:

(WebCore::ScrollingCoordinatorMac::commitTreeState):

  • rendering/RenderLayerBacking.cpp:

(WebCore::RenderLayerBacking::detachFromScrollingCoordinator):

  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::logLayerInfo):
(WebCore::RenderLayerCompositor::updateScrollCoordinatedLayer):

3:51 PM Changeset in webkit [216102] by dbates@webkit.org
  • 15 edits in trunk/Source

Using StringView.split() instead of String.split() in some places
https://bugs.webkit.org/show_bug.cgi?id=170925

Reviewed by Darin Adler.

Source/WebCore:

Replace some uses of String.split() with StringView.split() (added in r211087) as the latter
avoids the need to allocate an intermediary Vector of substrings. Instead StringView.split()
returns an iterator for traversing the substrings.

No functionality changed. So, no new tests.

  • accessibility/AccessibilityObject.cpp: Convert some typedefs to modern C++ using declarations.

(WebCore::ASCIICaseInsensitiveStringViewHashTranslator::hash): Added.
(WebCore::ASCIICaseInsensitiveStringViewHashTranslator::equal): Added.
(WebCore::AccessibilityObject::ariaRoleToWebCoreRole): Modified code to use StringView.split().
(WebCore::AccessibilityObject::elementsFromAttribute): Ditto.

  • dom/TreeScope.cpp:

(WebCore::TreeScope::getElementById): Added.

  • dom/TreeScope.h:
  • html/LinkRelAttribute.cpp:

(WebCore::LinkRelAttribute::LinkRelAttribute): Modified code to use StringView.split().

  • html/parser/XSSAuditor.cpp:

(WebCore::semicolonSeparatedValueContainsJavaScriptURL): Ditto.

  • platform/graphics/avfoundation/CDMPrivateMediaSourceAVFObjC.mm:

(WebCore::CDMPrivateMediaSourceAVFObjC::createSession): Ditto.

  • platform/network/CacheValidation.cpp:

(WebCore::collectVaryingRequestHeaders): Simplify code by using the String.split(UChar, Vector<String>&) overload.

  • svg/SVGAnimationElement.cpp:

(WebCore::parseKeyTimes): Modified code to use StringView.split().

  • svg/SVGToOTFFontConversion.cpp:

(WebCore::SVGToOTFFontConverter::SVGToOTFFontConverter): Ditto.

  • testing/Internals.cpp:

(WebCore::Internals::setMediaSessionRestrictions): Ditto.
(WebCore::Internals::setMediaElementRestrictions): Ditto.
(WebCore::Internals::setAudioContextRestrictions): Ditto.
(WebCore::Internals::setPageMuted): Ditto.

  • testing/Internals.h:

Source/WTF:

Add HashMap::get() overload that takes a HashTranslator.

  • wtf/HashMap.h:
3:50 PM Changeset in webkit [216101] by yoon@igalia.com
  • 13 edits in trunk/Source

[GTK] Drop coordinated surfaces from the compositing thread as soon as possible
https://bugs.webkit.org/show_bug.cgi?id=171544

Reviewed by Žan Doberšek.

Source/WebCore:

  • platform/graphics/texmap/coordinated/CoordinatedGraphicsState.h:

Remove atlasesToRemove from the GraphicsState. It is not a commit
state anymore.

Source/WebKit2:

Released coordinated surface from the main thread didn't be freed until
next commit message because the deletion of coordinated surfaces is
considered as a part of scene state. We need to release corresponding
surfaces whenever the compositing coordinator drops update atlases to
reduce memory usages.

No new tests, only an optimization.

  • Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:

Remove atlasesToRemove from the GraphicsState. it is not a commit
state anymore.

  • Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:

(WebKit::CoordinatedGraphicsScene::syncUpdateAtlases):
(WebKit::CoordinatedGraphicsScene::releaseUpdateAtlases):

  • Shared/CoordinatedGraphics/CoordinatedGraphicsScene.h:
  • Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:

(WebKit::CompositingCoordinator::releaseAtlases): Pass the list of
released update atlases to the compositing thread right after cleaning
up deactivated update atlases.

  • Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h:
  • WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp:

(WebKit::CompositingCoordinator::clearPendingStateChanges):
(WebKit::CompositingCoordinator::removeUpdateAtlas):
(WebKit::CompositingCoordinator::releaseAtlases):

  • WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.h:
  • WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
  • WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.cpp:

(WebKit::ThreadedCoordinatedLayerTreeHost::releaseUpdateAtlases):

  • WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.h:
3:24 PM Changeset in webkit [216100] by Ryan Haddad
  • 3 edits in trunk/LayoutTests

Move flaky expectation for svg/animations/getCurrentTime-pause-unpause.html ios-wk1 to ios TestExpectations file.

Unreviewed test gardening.

  • platform/ios-wk1/TestExpectations:
  • platform/ios/TestExpectations:
3:24 PM Changeset in webkit [216099] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

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

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
3:17 PM Changeset in webkit [216098] by timothy_horton@apple.com
  • 5 edits in trunk/Source/WebKit2

Inform clients when viewport-fit state changes, so they can recompute insets
https://bugs.webkit.org/show_bug.cgi?id=171573
<rdar://problem/31947614>

Reviewed by Simon Fraser.

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

(-[WKWebView _didChangeAvoidsUnsafeArea]):

  • UIProcess/API/Cocoa/WKWebViewInternal.h:
  • UIProcess/ios/PageClientImplIOS.mm:

(WebKit::PageClientImpl::didChangeAvoidsUnsafeArea):
For clients who use setObscuredInsets/setUnobscuredSafeAreaInsets
themselves, we need to let them know when the current state of
viewport-fit changes so that they can recompute the insets.

3:15 PM Changeset in webkit [216097] by yoon@igalia.com
  • 9 edits in trunk/Source

[GTK] Recycle textures while handling tiles
https://bugs.webkit.org/show_bug.cgi?id=171541

Reviewed by Žan Doberšek.

Source/WebCore:

  • platform/graphics/texmap/TextureMapperTile.h:

Modified m_texture as a protected member to avoid unnessary
refcountings from the CoordinatedBackingStore.

  • platform/graphics/texmap/coordinated/CoordinatedSurface.h:

Use reference instead of RefPtr to pass BitmapTexture

No new tests since there should be no change in behavior.

Source/WebKit2:

  • Shared/CoordinatedGraphics/CoordinatedBackingStore.cpp:

(WebKit::CoordinatedBackingStoreTile::swapBuffers):
Whenever we create new tiles or delete tiles, CoordGfx creates and
deletes textures accordingly. We should avoid this kind of heavy
operations whenever possible. This patch modifies to use the texture
pool to reduce texture allocations. Also this patch reduces number of
resetting textures, which is also expensive operation.

  • Shared/CoordinatedGraphics/WebCoordinatedSurface.cpp:

(WebKit::WebCoordinatedSurface::copyToTexture):
Modified to pass BitmapTexture as a reference.

  • Shared/CoordinatedGraphics/threadedcompositor/ThreadSafeCoordinatedSurface.cpp:

(WebKit::ThreadSafeCoordinatedSurface::copyToTexture): Ditto.

2:29 PM Changeset in webkit [216096] by Alan Bujtas
  • 6 edits
    2 adds in trunk

Defer AX cache update when text content changes until after layout is finished.
https://bugs.webkit.org/show_bug.cgi?id=171429
<rdar://problem/31885984>

Reviewed by Simon Fraser.

Source/WebCore:

When the content of the RenderText changes (even as the result of a text-transform change)
instead of updating the AX cache eagerly (and trigger layout on a half-backed render tree)
we should just defer it until after the subsequent layout is done.

Test: accessibility/crash-while-adding-text-child-with-transform.html

  • accessibility/AXObjectCache.cpp:

(WebCore::AXObjectCache::remove):
(WebCore::AXObjectCache::performDeferredCacheUpdate):
(WebCore::AXObjectCache::recomputeDeferredIsIgnored):
(WebCore::AXObjectCache::deferTextChanged):
(WebCore::AXObjectCache::performDeferredIsIgnoredChange): Deleted.

  • accessibility/AXObjectCache.h:

(WebCore::AXObjectCache::deferTextChanged):
(WebCore::AXObjectCache::performDeferredCacheUpdate):
(WebCore::AXObjectCache::performDeferredIsIgnoredChange): Deleted.

  • page/FrameView.cpp:

(WebCore::FrameView::performPostLayoutTasks):

  • rendering/RenderText.cpp:

(WebCore::RenderText::setText):

LayoutTests:

  • accessibility/crash-while-adding-text-child-with-transform-expected.txt: Added.
  • accessibility/crash-while-adding-text-child-with-transform.html: Added.
2:24 PM Changeset in webkit [216095] by ddkilzer@apple.com
  • 2 edits in trunk/Source/WebKit2

Stop using strcpy() in WebProcess::registerWithStateDumper() in WebProcessCocoa.mm
<https://webkit.org/b/171520>

Reviewed by Chris Dumez.

  • WebProcess/cocoa/WebProcessCocoa.mm:

(WebKit::WebProcess::registerWithStateDumper): Switch from
strcpy() to strlcpy(), removing comment in the process.

2:13 PM Changeset in webkit [216094] by Wenson Hsieh
  • 2 edits in trunk/Source/WebCore

Remove an extraneous call to dispatch_group_async in WebItemProviderPasteboard.mm
https://bugs.webkit.org/show_bug.cgi?id=171561

Reviewed by Tim Horton.

In -[WebItemProviderPasteboard doAfterLoadingProvidedContentIntoFileURLs:], the lifetime of the dispatch group
fileLoadingGroup is already guarded by dispatch_group_enter/leave calls when beginning and concluding an
item provider load, respectively. As such, the call to dispatch_group_async serves no purpose and should be removed.

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

  • platform/ios/WebItemProviderPasteboard.mm:

(-[WebItemProviderPasteboard doAfterLoadingProvidedContentIntoFileURLs:]):

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

MediaDevices is not enabled for MobileSafari
https://bugs.webkit.org/show_bug.cgi?id=171433
<rdar://problem/31923178>

Patch by Andrew Gold <agold@apple.com> on 2017-05-02
Reviewed by Youenn Fablet.

Added the Cocoa API for toggling this feature and removed API for toggling
MediaStreamEnabled since it will always be on.

  • UIProcess/API/Cocoa/WKPreferences.mm:

(-[WKPreferences _mediaDevicesEnabled]):
(-[WKPreferences _setMediaDevicesEnabled:]):
(-[WKPreferences _mediaStreamEnabled]): Deleted.
(-[WKPreferences _setMediaStreamEnabled:]): Deleted.

  • UIProcess/API/Cocoa/WKPreferencesPrivate.h:
1:30 PM Changeset in webkit [216092] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

[LibWebRTC] Set explicitly logging level in debug mode
https://bugs.webkit.org/show_bug.cgi?id=171562

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

No change of behavior.

  • platform/mediastream/libwebrtc/LibWebRTCProvider.cpp:

(WebCore::initializePeerConnectionFactoryAndThreads): Setting explictly LibWebRTC logging to Info level for
debug builds if WebRTC channel is on.

1:28 PM Changeset in webkit [216091] by ddkilzer@apple.com
  • 1 edit
    1 delete in trunk/Tools

Rolling out jstest_unittest.py so it can be reviewed

Follow-up fix for:
check-webkit-style should keep JavaScript test functions in sync
<https://webkit.org/b/171424>

  • Scripts/webkitpy/style/checkers/jstest_unittest.py: Remove.
1:10 PM Changeset in webkit [216090] by ddkilzer@apple.com
  • 9 edits
    2 adds in trunk

check-webkit-style should keep JavaScript test functions in sync
<https://webkit.org/b/171424>

Reviewed by Joseph Pecoraro.

JSTests:

This change makes shouldBe(), shouldNotBe(), shouldNotThrow()
and shouldThrow() in sync with other copies of these methods.

  • stress/resources/standalone-pre.js:

(shouldBe): Fix whitespace. Prefix 'exception' and 'quiet'
variables with underscore.
(shouldThrow): Fix whitespace.

Tools:

Add a new JSTestChecker for check-webkit-style that keeps these
two files in sync:

LayoutTests/http/tests/resources/js-test-pre.js
LayoutTests/resources/js-test-pre.js

And keeps implementations of shouldBe(), shouldNotBe(),
shouldNotThrow(), and shouldThrow() in sync across multiple
files (with the ability to add more functions later):

JSTests/stress/resources/standalone-pre.js
LayoutTests/http/tests/resources/js-test-pre.js
LayoutTests/resources/js-test-pre.js
LayoutTests/resources/js-test.js
LayoutTests/resources/standalone-pre.js

  • Scripts/webkitpy/style/checker.py: Remove unused import. Add

import for JSTestChecker.
(_NEVER_SKIPPED_FILES): Add array of file names that are never
skipped regardless of other rules.
(_all_categories): Add JSTestChecker categories.
(CheckerDispatcher.should_skip_without_warning): Use
_NEVER_SKIPPED_FILES.
(CheckerDispatcher._create_checker): Return JSTestChecker for
the files to check.

  • Scripts/webkitpy/style/checkers/jstest.py: Add.

(map_functions_to_dict): Parse JavaScript source by splitting on
/function\s+/ regex. This is good enough for the sanity checks
to keep function implementations in sync.
(strip_blank_lines_and_comments): Strips blank lines and lines
with comments from the end of a chunk of text representing a
function.
(JSTestChecker): New checker.
(JSTestChecker.init):
(JSTestChecker.check):
(JSTestChecker.check_js_test_files): Keeps whole files in sync.
(JSTestChecker.check_js_test_functions): Keeps individual
functions in sync.

  • Scripts/webkitpy/style/checkers/jstest_unittest.py: Add test

case.
(JSTestTestCase):
(JSTestTestCase.test_map_functions_to_dict):

LayoutTests:

This change attempts to fix all whitespace issues in these two
files (which are now identical and will be kept in sync by
check-webkit-style):

LayoutTests/http/tests/resources/js-test-pre.js
LayoutTests/resources/js-test-pre.js

It also syncs the implementation of shouldBe(), shouldNotBe(),
shouldNotThrow() and shouldThrow() across the following files:

JSTests/stress/resources/standalone-pre.js
LayoutTests/http/tests/resources/js-test-pre.js
LayoutTests/resources/js-test-pre.js
LayoutTests/resources/js-test.js
LayoutTests/resources/standalone-pre.js

Only interesting (non-whitespace) changes are listed below.

  • http/tests/resources/js-test-pre.js: Copy from resources/js-test-pre.js.

(shouldBe): Prefix 'exception' and 'quiet' variables with
underscore.
(shouldNotBe): Ditto.

  • resources/js-test-pre.js:

(shouldBe): Prefix 'exception' and 'quiet' variables with
underscore.
(shouldNotBe): Ditto.

  • resources/js-test.js:

(shouldBe): Prefix 'quiet' variable with underscore. Use
stringify() when printing '_bv' value.

  • resources/standalone-pre.js:

(shouldBe): Prefix 'exception' and 'quiet' variables with
underscore.
(shouldNotBe): Ditto.

1:07 PM Changeset in webkit [216089] by jdiggs@igalia.com
  • 9 edits
    2 moves in trunk

AX: Update implementation of aria-orientation
https://bugs.webkit.org/show_bug.cgi?id=171166

Reviewed by Chris Fleizach.

Source/WebCore:

Update AccessibilityRenderObject::orientation() to be consistent with what is
in the ARIA 1.1 spec. Also add an isTreeGrid() convenience method to be consistent
with what we do for other roles.

Test: accessibility/aria-orientation.html

  • accessibility/AccessibilityARIAGridRow.cpp:

(WebCore::AccessibilityARIAGridRow::isARIATreeGridRow):

  • accessibility/AccessibilityObject.h:

(WebCore::AccessibilityObject::isTreeGrid):

  • accessibility/AccessibilityRenderObject.cpp:

(WebCore::AccessibilityRenderObject::orientation):

Tools:

Return "AXUnknownOrientation" when ATK_STATE_VERTICAL and ATK_STATE_HORIZONTAL
are both absent from the state set. Before we were returning an empty string
which was not consistent with what the Mac port does, thus making shared tests
harder.

  • WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:

(WTR::AccessibilityUIElement::orientation):

LayoutTests:

Moved the mac aria-orientation.html test to the shared tests and add several
new test cases to it. Update the orientation-related assertion in two tests
to reflect the ARIA 1.1 behavior.

  • accessibility/aria-orientation-expected.txt: Renamed from LayoutTests/accessibility/mac/aria-orientation-expected.txt.
  • accessibility/aria-orientation.html: Renamed from LayoutTests/accessibility/mac/aria-orientation.html.
  • accessibility/mac/slider-supports-actions.html: Updated.
  • accessibility/gtk/combobox-descendants-orientation-crash-expected.txt: Updated.
12:35 PM Changeset in webkit [216088] by mmaxfield@apple.com
  • 4 edits
    2 adds in trunk

REGRESSION (r211382): Partial right-to-left text runs are painted at an offset (breaks Find indicators, Look Up, and custom ::selection style)
https://bugs.webkit.org/show_bug.cgi?id=169517
<rdar://problem/30652443>

Reviewed by Dean Jackson.

Source/WebCore:

FontCascade::getGlyphsAndAdvancesForComplexText() is tasked with calculating paint advances for a
subrange of RTL text. It does this by creating a ComplexTextController, telling it to iterate to
the beginning of the subrange (outputting to a GlyphBuffer), then telling it to iterate to the end
of the subrange (outputting to another GlyphBuffer). Because the text is RTL, the sum of the
advances gathered so far is the distance from the right edge of the text to the left edge of the
subrange (because we advance in logical order). Therefore, the x-coordinate we are at now is the
total width minus the sum of both of the GlyphBuffers. For some reason, when I wrote this code I
forgot to add in the contribution from the first GlyphBuffer. Unfortunately, this particular
codepath is rarely hit in practice and completely untested, which made me miss it when I wrote it.

Test: fast/text/complex-text-selection.html

  • platform/graphics/cocoa/FontCascadeCocoa.mm:

(WebCore::FontCascade::getGlyphsAndAdvancesForComplexText):

LayoutTests:

  • fast/text/complex-text-selection-expected.html: Added.
  • fast/text/complex-text-selection.html: Added.
  • platform/ios/TestExpectations:
12:22 PM Changeset in webkit [216087] by Joseph Pecoraro
  • 2 edits in trunk/LayoutTests

[Mac] WK1: http/tests/inspector/network/resource-sizes tests are failing

Unreviewed test gardening.

  • platform/mac-wk1/TestExpectations:

Skip these tests on WebKit1. They depend on the NSURLSession
loading path which is not used in WebKit1.

12:14 PM Changeset in webkit [216086] by fpizlo@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed, fix pedantic C compilers.

  • API/tests/testapi.c:

(markingConstraint):
(testMarkingConstraints):

12:13 PM Changeset in webkit [216085] by fpizlo@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed, fix cmake build.

  • CMakeLists.txt:
12:03 PM Changeset in webkit [216084] by Chris Dumez
  • 9 edits in trunk

[macOS] Flaky Crash under EventTarget::fireEventListeners on imported/blink/paint/deprecatedpaintlayer/non-self-painting-layer-overrides-visibility.html
https://bugs.webkit.org/show_bug.cgi?id=171406
<rdar://problem/30945281>

Reviewed by Eric Carlson.

Source/WebCore:

I was unfortunately unable to reproduce the flaky crash locally. However, the crash trace
indicates that one of the EventTarget::scriptExecutionContext() overrides is returning a
stale ScriptExecutionContext pointer. Since a GenericEventQueue is involved, the EventTarget
is likely a media-related object. I therefore audited media classes that override
EventTarget::scriptExecutionContext() and found several that look unsafe. I am fixing those
by having them override ContextDestructionObserver, instead of having a raw
ScriptExecutionContext pointer member. This makes sure the pointer gets nulled out whenever
the scriptexecutioncontext gets destroyed, ensuring that those classes's
EventTarget::scriptExecutionContext() overrides can never return a stale pointer.

  • Modules/mediasource/SourceBufferList.cpp:

(WebCore::SourceBufferList::SourceBufferList):

  • Modules/mediasource/SourceBufferList.h:
  • html/track/TextTrack.cpp:

(WebCore::TextTrack::TextTrack):

  • html/track/TextTrack.h:
  • html/track/TrackListBase.cpp:

(TrackListBase::TrackListBase):

  • html/track/TrackListBase.h:

LayoutTests:

Unskip test.

  • platform/mac/TestExpectations:
12:02 PM Changeset in webkit [216083] by Antti Koivisto
  • 5 edits in trunk/Source/WebCore

Document style resolvers should share user rulesets
https://bugs.webkit.org/show_bug.cgi?id=171549

Reviewed by Andreas Kling.

Large user stylesheets (like those used by ad blockers) can end up using lots of memory if
a document uses large number of shadow trees. User style is inherently per-document and
the resulting rulesets can be shared between the document and the shadow trees.

  • css/DocumentRuleSets.cpp:

(WebCore::DocumentRuleSets::DocumentRuleSets):
(WebCore::DocumentRuleSets::userStyle):

Return per-document user style for shadow trees.

(WebCore::DocumentRuleSets::collectFeatures):

  • css/DocumentRuleSets.h:

(WebCore::DocumentRuleSets::setUsesSharedUserStyle):
(WebCore::DocumentRuleSets::userStyle): Deleted.

  • css/StyleResolver.cpp:

(WebCore::StyleResolver::StyleResolver):
(WebCore::StyleResolver::initializeUserStyle):

Separate user style initialization from construction.

  • css/StyleResolver.h:
  • style/StyleScope.cpp:

(WebCore::Style::Scope::resolver):

Don't initialize user style for user agents shadow trees.

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

Marked test svg/animations/animated-svg-image-removed-from-document-paused.html as flaky failure.
https://bugs.webkit.org/show_bug.cgi?id=171559

Unreviewed test gardening.

Patch by Matt Lewis <Matt Lewis> on 2017-05-02

  • platform/ios-wk2/TestExpectations:
11:45 AM Changeset in webkit [216081] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Marked test imported/w3c/web-platform-tests/webrtc/rtcpeerconnection/setRemoteDescription.html as flaky failure.
https://bugs.webkit.org/show_bug.cgi?id=170818

Unreviewed test gardening.

Patch by Matt Lewis <Matt Lewis> on 2017-05-02

  • platform/mac-wk2/TestExpectations:
11:43 AM Changeset in webkit [216080] by aestes@apple.com
  • 2 edits in trunk/Source/WebKit2

REGRESSION (r213036): Crash in -[WKContentView _webTouchEventsRecognized:] when a touch event arrives after a WebPageProxy has been invalidated
https://bugs.webkit.org/show_bug.cgi?id=171539
<rdar://problem/31614982>

Reviewed by Tim Horton.

Prior to r213036, the layer tree transaction at last touch start was tracked by
WebPageProxy::handleTouchEventSynchronously(), which would ask the drawing area proxy for
its most recent transaction ID after ensuring that the WebPageProxy was valid.

r213036 moved the tracking up to -[WKContentView _webTouchEventsRecognized:], but failed to
check if _page was valid before asking for its drawing area proxy's last transaction ID; the
drawing area proxy is set to null on WebPageProxy invalidation.

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView _webTouchEventsRecognized:]): Added an early return if _page isn't valid.

11:02 AM Changeset in webkit [216079] by mmaxfield@apple.com
  • 7 edits
    2 adds in trunk

Font Loading API specifies font is loaded but sizing of font after load reports inconsistent values
https://bugs.webkit.org/show_bug.cgi?id=168533

Reviewed by Zalan Bujtas.

Source/WebCore:

Previously, we were marking all local() fonts as immediately successful,
regardless of whether or not they were present on the system. Instead, we
should use the load() function to make this determination and mark the font
as failed if it doesn't exist. (This is, after all, the whole point of the
load() function). This brings us in-line with Firefox's and Chrome's
behavior.

Test: fast/text/font-loading-local.html

  • css/CSSFontFace.cpp:

(WebCore::CSSFontFace::pump): Remote loading requires the FontSelector,
but it isn't available for local fonts. Now that load() is called for both
local and remote fonts, the ASSERT() should be lowered into the load()
function and scoped to just the case where we have a remote font.
(WebCore::CSSFontFace::font): Ditto.

  • css/CSSFontFaceSource.cpp:

(WebCore::CSSFontFaceSource::CSSFontFaceSource): Don't immediatley set
the success/failure state for local fonts.
(WebCore::CSSFontFaceSource::load): Move loading logic from font() to
load(). None of this code is new; it just is moved.
(WebCore::CSSFontFaceSource::font): Delete code moved to load().

  • css/CSSFontFaceSource.h:
  • css/FontFace.cpp:

(WebCore::FontFace::create):

LayoutTests:

  • fast/text/font-loading-local-expected.txt: Added.
  • fast/text/font-loading-local.html: Added.
  • fast/text/web-font-load-fallback-during-loading.html:
11:00 AM Changeset in webkit [216078] by fpizlo@apple.com
  • 5 edits
    4 adds in trunk/Source/JavaScriptCore

JSC C API should expose GC marking constraints and weak references
https://bugs.webkit.org/show_bug.cgi?id=171554

Reviewed by Geoffrey Garen.

This exposes an API that lets you participate in the GC's fixpoint. You can ask the GC
what is marked and you can tell the GC to mark things. The constraint callback cannot
do a whole lot, but it can query marking state and it can dereference weak references.

Additionally, this exposes a very simple weak reference API in C.

  • API/JSMarkingConstraintPrivate.cpp: Added.

(JSC::isMarked):
(JSC::mark):
(JSContextGroupRegisterMarkingConstraint):

  • API/JSMarkingConstraintPrivate.h: Added.
  • API/JSWeakPrivate.cpp: Added.

(OpaqueJSWeak::OpaqueJSWeak):
(JSWeakCreate):
(JSWeakRetain):
(JSWeakRelease):
(JSWeakGetObject):

  • API/JSWeakPrivate.h: Added.
  • API/tests/testapi.c:

(markingConstraint):
(testMarkingConstraints):
(main):

  • JavaScriptCore.xcodeproj/project.pbxproj:
  • heap/SlotVisitor.h:
  • heap/SlotVisitorInlines.h:

(JSC::SlotVisitor::appendHiddenUnbarriered):
(JSC::SlotVisitor::appendHidden):

11:00 AM Changeset in webkit [216077] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore/PAL

Make "PAL/pal" and "PAL/pal/crypto" directories private
https://bugs.webkit.org/show_bug.cgi?id=171524

Patch by Yoshiaki Jitsukawa <Yoshiaki.Jitsukawa@sony.com> on 2017-05-02
Reviewed by Myles C. Maxfield.

Make the "PAL/pal" and "PAL/pal/crypto" directories private to force WebCore sources
to include PAL headers in "#include <pal/*.h>" style.

  • pal/CMakeLists.txt:
10:55 AM Changeset in webkit [216076] by mark.lam@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

JSFixedArray::allocationSize() should not allow for allocation failure.
https://bugs.webkit.org/show_bug.cgi?id=171516

Reviewed by Geoffrey Garen.

Since JSFixedArray::createFromArray() now handles allocation failures by throwing
OutOfMemoryErrors, its helper function allocationSize() (which computes the buffer
size to allocate) should also allow for allocation failure on overflow.

This issue is covered by the stress/js-fixed-array-out-of-memory.js test when
run on 32-bit builds.

  • runtime/JSFixedArray.h:

(JSC::JSFixedArray::tryCreate):
(JSC::JSFixedArray::allocationSize):

10:49 AM Changeset in webkit [216075] by commit-queue@webkit.org
  • 3 edits
    3 adds in trunk

Source/WebCore:
Allow media stream based videos with sound to autoplay if the page is already playing sound
https://bugs.webkit.org/show_bug.cgi?id=171447

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

Test: http/tests/media/autoplay-if-audio-is-playing.html for ensuring non-mediastream based video will not autoplay.
Manual testing for the autoplay of media stream based videos since such a test should happen without using getUserMedia.

  • html/MediaElementSession.cpp:

(WebCore::MediaElementSession::playbackPermitted):

LayoutTests:
Allow media stream based videos with sound autoplay if the page is already playing sound
https://bugs.webkit.org/show_bug.cgi?id=171447

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

  • http/tests/media/autoplay-if-audio-is-playing-expected.txt: Added.
  • http/tests/media/autoplay-if-audio-is-playing.html: Added.
  • http/tests/media/resources/test-25fps.mp4: Added.
10:41 AM Changeset in webkit [216074] by Chris Dumez
  • 24 edits in trunk/Source/WebCore

Use PassRefPtr less in editing code
https://bugs.webkit.org/show_bug.cgi?id=171534

Reviewed by Geoffrey Garen.

Use PassRefPtr less in editing code.

  • editing/AppendNodeCommand.cpp:

(WebCore::AppendNodeCommand::AppendNodeCommand):
(WebCore::AppendNodeCommand::getNodesInCommand):

  • editing/AppendNodeCommand.h:

(WebCore::AppendNodeCommand::create):

  • editing/ApplyStyleCommand.cpp:

(WebCore::ApplyStyleCommand::surroundNodeRangeWithElement):
(WebCore::ApplyStyleCommand::positionToComputeInlineStyleChange):

  • editing/BreakBlockquoteCommand.cpp:

(WebCore::BreakBlockquoteCommand::doApply):

  • editing/CompositeEditCommand.cpp:

(WebCore::CompositeEditCommand::insertNodeBefore):
(WebCore::CompositeEditCommand::insertNodeAfter):
(WebCore::CompositeEditCommand::insertNodeAt):
(WebCore::CompositeEditCommand::appendNode):
(WebCore::CompositeEditCommand::moveRemainingSiblingsToNewParent):
(WebCore::CompositeEditCommand::mergeIdenticalElements):
(WebCore::CompositeEditCommand::insertNodeAtTabSpanPosition):
(WebCore::CompositeEditCommand::appendBlockPlaceholder):
(WebCore::CompositeEditCommand::insertBlockPlaceholder):
(WebCore::CompositeEditCommand::addBlockPlaceholderIfNeeded):
(WebCore::CompositeEditCommand::insertNewDefaultParagraphElementAt):
(WebCore::CompositeEditCommand::cloneParagraphUnderNewElement):
(WebCore::CompositeEditCommand::moveParagraphs):

  • editing/CompositeEditCommand.h:
  • editing/CreateLinkCommand.cpp:

(WebCore::CreateLinkCommand::doApply):

  • editing/DeleteSelectionCommand.cpp:

(WebCore::DeleteSelectionCommand::makeStylingElementsDirectChildrenOfEditableRootToPreventStyleLoss):
(WebCore::DeleteSelectionCommand::mergeParagraphs):

  • editing/FormatBlockCommand.cpp:

(WebCore::FormatBlockCommand::formatRange):

  • editing/IndentOutdentCommand.cpp:

(WebCore::IndentOutdentCommand::tryIndentingAsListItem):
(WebCore::IndentOutdentCommand::indentIntoBlockquote):
(WebCore::IndentOutdentCommand::outdentParagraph):

  • editing/InsertLineBreakCommand.cpp:

(WebCore::InsertLineBreakCommand::doApply):

  • editing/InsertLineBreakCommand.h:
  • editing/InsertListCommand.cpp:

(WebCore::InsertListCommand::fixOrphanedListChild):
(WebCore::InsertListCommand::doApplyForSingleParagraph):
(WebCore::InsertListCommand::unlistifyParagraph):
(WebCore::InsertListCommand::listifyParagraph):

  • editing/InsertListCommand.h:
  • editing/InsertNodeBeforeCommand.cpp:

(WebCore::InsertNodeBeforeCommand::InsertNodeBeforeCommand):
(WebCore::InsertNodeBeforeCommand::doApply):
(WebCore::InsertNodeBeforeCommand::doUnapply):
(WebCore::InsertNodeBeforeCommand::getNodesInCommand):

  • editing/InsertNodeBeforeCommand.h:

(WebCore::InsertNodeBeforeCommand::create):

  • editing/InsertParagraphSeparatorCommand.cpp:

(WebCore::InsertParagraphSeparatorCommand::cloneHierarchyUnderNewBlock):
(WebCore::InsertParagraphSeparatorCommand::doApply):

  • editing/InsertParagraphSeparatorCommand.h:
  • editing/InsertTextCommand.cpp:

(WebCore::InsertTextCommand::positionInsideTextNode):
(WebCore::InsertTextCommand::insertTab):

  • editing/ModifySelectionListLevel.cpp:

(WebCore::ModifySelectionListLevelCommand::insertSiblingNodeRangeBefore):
(WebCore::ModifySelectionListLevelCommand::insertSiblingNodeRangeAfter):
(WebCore::ModifySelectionListLevelCommand::appendSiblingNodeRange):
(WebCore::IncreaseSelectionListLevelCommand::doApply):

  • editing/RemoveNodePreservingChildrenCommand.cpp:

(WebCore::RemoveNodePreservingChildrenCommand::doApply):

  • editing/ReplaceSelectionCommand.cpp:

(WebCore::ReplaceSelectionCommand::moveNodeOutOfAncestor):
(WebCore::ReplaceSelectionCommand::mergeEndIfNeeded):
(WebCore::ReplaceSelectionCommand::doApply):
(WebCore::ReplaceSelectionCommand::addSpacesForSmartReplace):
(WebCore::ReplaceSelectionCommand::insertAsListItems):

  • editing/SimplifyMarkupCommand.cpp:

(WebCore::SimplifyMarkupCommand::pruneSubsequentAncestorsToRemove):

9:58 AM Changeset in webkit [216073] by commit-queue@webkit.org
  • 4 edits in trunk

Set Response.blob() type correctly when body is a ReadableStream.
https://bugs.webkit.org/show_bug.cgi?id=171489

Patch by Ben Kelly <ben@wanderview.com> on 2017-05-02
Reviewed by Youenn Fablet

LayoutTests/imported/w3c:

  • web-platform-tests/fetch/api/response/response-consume-expected.txt:

Source/WebCore:

The Fetch API specification requires setting the blob contentType
using the Content-Type header value, if present. Currently WebKit
only sets the type on the FetchBodyConsumer when FetchBody::blob()
is called. Unfortunately, this is never called if the body is
actually a ReadableStream.

This change allows WebKit to pass the "Consume response's body: from
stream to blob" case in the WPT response-consume.html test.

Test: http://w3c-test.org/fetch/api/response/response-consume.html

  • Modules/fetch/FetchResponse.cpp:

(WebCore::FetchResponse::startConsumingStream): Modified to call
FetchBodyConsumer::setContentType() before processing the stream.

9:52 AM Changeset in webkit [216072] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Marked test http/tests/xmlhttprequest/methods-async.html as flaky timeout.
https://bugs.webkit.org/show_bug.cgi?id=171530

Unreviewed test gardening.

Patch by Matt Lewis <Matt Lewis> on 2017-05-02

  • platform/ios-wk2/TestExpectations:
9:22 AM Changeset in webkit [216071] by Ryan Haddad
  • 6 edits in trunk/Source/WebCore

Unreviewed, rolling out r216069.

This change broke the build.

Reverted changeset:

"Document style resolvers should share user rulesets"
https://bugs.webkit.org/show_bug.cgi?id=171549
http://trac.webkit.org/changeset/216069

7:33 AM Changeset in webkit [216070] by commit-queue@webkit.org
  • 5 edits in trunk/Source/WebKit2

Web Automation: generate resizeWindowOfBrowsingContext and moveWindowOfBrowsingContext for all platforms
https://bugs.webkit.org/show_bug.cgi?id=171107

Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2017-05-02
Reviewed by Brian Burg.

The implementation is actually cross-platform, so it could be moved from WebAutomationSessionMac.mm to
WebAutomationSession.cpp and simply return a NotImplemented error for iOS. This will allow to use these methods
in other platforms.

  • UIProcess/Automation/Automation.json:
  • UIProcess/Automation/WebAutomationSession.cpp:

(WebKit::WebAutomationSession::resizeWindowOfBrowsingContext):
(WebKit::WebAutomationSession::moveWindowOfBrowsingContext):

  • UIProcess/Automation/WebAutomationSession.h:
  • UIProcess/Automation/mac/WebAutomationSessionMac.mm:

(WebKit::WebAutomationSession::resizeWindowOfBrowsingContext): Deleted.
(WebKit::WebAutomationSession::moveWindowOfBrowsingContext): Deleted.

7:30 AM Changeset in webkit [216069] by Antti Koivisto
  • 6 edits in trunk/Source/WebCore

Document style resolvers should share user rulesets
https://bugs.webkit.org/show_bug.cgi?id=171549

Reviewed by Andreas Kling.

Large user stylesheets (like those used by ad blockers) can end up using lots of memory if
a document uses large number of shadow trees. User style is inherently per-document and
the resulting rulesets can be shared between the document and the shadow trees.

  • css/DocumentRuleSets.cpp:

(WebCore::DocumentRuleSets::DocumentRuleSets):
(WebCore::DocumentRuleSets::userStyle):

Return per-document user style for shadow trees.

(WebCore::DocumentRuleSets::collectFeatures):

  • css/DocumentRuleSets.h:

(WebCore::DocumentRuleSets::setUsesSharedUserStyle):
(WebCore::DocumentRuleSets::userStyle): Deleted.

  • css/StyleResolver.cpp:

(WebCore::StyleResolver::StyleResolver):
(WebCore::StyleResolver::initializeUserStyle):

Separate user style initialization from construction.

  • css/StyleResolver.h:
  • style/StyleScope.cpp:

(WebCore::Style::Scope::resolver):

Don't initialize user style for user agents shadow trees.

3:52 AM Changeset in webkit [216068] by yoon@igalia.com
  • 2 edits in trunk/Source/WebCore

[GTK] Remove undefined nativeImage method from the ImageBuffer's header
https://bugs.webkit.org/show_bug.cgi?id=171502

Unreviewed, remove a dead code accidentally committed in r194630.

  • platform/graphics/ImageBuffer.h: Remove nativeImage method.

It is accidentally added during a refectorying at r194630, and there is
no definition for this method.

3:05 AM Changeset in webkit [216067] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebCore

[GStreamer] Dailymotion live stream videos don't play
https://bugs.webkit.org/show_bug.cgi?id=170767

Reviewed by Sergio Villar Senin.

The video shows a message saying that an error occurred and nothing is played. There are actually several
problems with dailymotion. The main issue is that URLs are redirected by the server, and GStreamer needs to
know the redirected URL. Once GStreamer knows the redirected URL the error message no longer appears, the video
starts but it always stops after a few seconds. This is because the source receives an early EOS while still
downloading the fragments. The reason of the early EOS is because dailymotion sends a wrong Content-Length header,
something that is expected to happen and we correctly handle that case when receiving the data, by updating the
size accordingly if the bytes received are longer than the expected content length. This particular case
doesn't work well with GStreamer automatic EOS handling, which is the default. At some point, GStreamer detects
that the bytes received are at least the expected ones and emits a GST_EVENT_EOS that the GstUriDownloader
handles finishing the download early. We should always disable automatic EOS, since we know when EOS actually
happens and we already call gst_app_src_end_of_stream(). This patch also emits a GST_EVENT_CUSTOM_DOWNSTREAM_STICKY
event to let GStreamer know about the HTTP headers sent and received.

  • platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:

(webkit_web_src_init): Disable automatic EOS.
(webKitWebSrcGetProperty): Return the redirected URL in case of redirection.
(webKitWebSrcStart): Pass the ResourceRequest to the stream clients.
(webKitWebSrcQueryWithParent): Set the redirected URL in the query in case of redirection.
(webKitWebSrcSetUri): Clear also the redirected URL when setting a new URI.
(StreamingClient::StreamingClient): Use GRefPtr for the source and initialize the request too.
(StreamingClient::~StreamingClient): Remove explicit unref.
(StreamingClient::createReadBuffer):
(StreamingClient::handleResponseReceived): Initialize the redirected URL in case of redirection. Create and push
the HTTP headers event.
(StreamingClient::handleDataReceived):
(StreamingClient::handleNotifyFinished):
(CachedResourceStreamingClient::CachedResourceStreamingClient):
(CachedResourceStreamingClient::responseReceived):
(CachedResourceStreamingClient::accessControlCheckFailed):
(CachedResourceStreamingClient::loadFailed):
(ResourceHandleStreamingClient::ResourceHandleStreamingClient):
(ResourceHandleStreamingClient::didFail):
(ResourceHandleStreamingClient::wasBlocked):
(ResourceHandleStreamingClient::cannotShowURL):

1:55 AM Changeset in webkit [216066] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebCore

Adding logging to RTCPeerConnection to allow WebRTC application debugging
https://bugs.webkit.org/show_bug.cgi?id=171531

Patch by Youenn Fablet <youenn@apple.com> on 2017-05-02
Reviewed by Jon Lee.

No change of behavior.
This allows easier debugging of webrtc-enabled web pages.

  • Modules/mediastream/PeerConnectionBackend.cpp:

(WebCore::PeerConnectionBackend::createOfferSucceeded):
(WebCore::PeerConnectionBackend::createOfferFailed):
(WebCore::PeerConnectionBackend::createAnswerSucceeded):
(WebCore::PeerConnectionBackend::createAnswerFailed):
(WebCore::PeerConnectionBackend::setLocalDescriptionSucceeded):
(WebCore::PeerConnectionBackend::setLocalDescriptionFailed):
(WebCore::PeerConnectionBackend::setRemoteDescriptionSucceeded):
(WebCore::PeerConnectionBackend::setRemoteDescriptionFailed):
(WebCore::PeerConnectionBackend::addIceCandidateSucceeded):
(WebCore::PeerConnectionBackend::addIceCandidateFailed):
(WebCore::PeerConnectionBackend::newICECandidate):
(WebCore::PeerConnectionBackend::doneGatheringCandidates):

  • Modules/mediastream/RTCPeerConnection.cpp:

(WebCore::RTCPeerConnection::queuedCreateOffer):
(WebCore::RTCPeerConnection::queuedCreateAnswer):
(WebCore::RTCPeerConnection::queuedSetLocalDescription):
(WebCore::RTCPeerConnection::queuedSetRemoteDescription):
(WebCore::RTCPeerConnection::queuedAddIceCandidate):

1:48 AM Changeset in webkit [216065] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebCore

[GTK] Crash at WebCore::ResourceHandle::clearClient() when streaming live video from dailymotion
https://bugs.webkit.org/show_bug.cgi?id=169725

Reviewed by Michael Catanzaro.

Make ResourceHandleStreamingClient refcounted and add an invalidate method to do the cleanup in the networking
thread while keeping a reference.

  • platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:

(webKitWebSrcStop): Call invalidate before reseting client pointer.
(webKitWebSrcStart): Ditto.
(ResourceHandleStreamingClient::ResourceHandleStreamingClient): Remove all cleanup code after the run loop run call.
(ResourceHandleStreamingClient::~ResourceHandleStreamingClient): Just detach the thread.
(ResourceHandleStreamingClient::invalidate): Schedule a task on the networking thread to clean up and fiish the
run loop, protecting this.
(ResourceHandleStreamingClient::setDefersLoading): Protect this.
(ResourceHandleStreamingClient::didReceiveResponse): Do nothing if client was invalidated.
(ResourceHandleStreamingClient::didReceiveBuffer): Ditto.
(ResourceHandleStreamingClient::didFinishLoading): Ditto.

1:39 AM Changeset in webkit [216064] by commit-queue@webkit.org
  • 1 edit
    1 delete in trunk/Source/WebInspectorUI

[GTK] Web Inspector: Remove GTK+ icon FontVariantSmallCaps.svg
https://bugs.webkit.org/show_bug.cgi?id=171542

Patch by Fujii Hironori <Fujii Hironori> on 2017-05-02
Reviewed by Carlos Garcia Campos.

This image is not used and Apple's one was removed in Bug 148720.

  • UserInterface/Images/gtk/FontVariantSmallCaps.svg: Removed.
1:27 AM Changeset in webkit [216063] by commit-queue@webkit.org
  • 1 edit
    2 deletes in trunk/Source/WebInspectorUI

[GTK] Web Inspector: Remove GTK+ icons AnimationPlayStatePaused.svg and AnimationPlayStateRunning.svg
https://bugs.webkit.org/show_bug.cgi?id=171540

Patch by Fujii Hironori <Fujii Hironori> on 2017-05-02
Reviewed by Carlos Garcia Campos.

These images aren't used since r204152 (Bug 160566). Instead,
Plus13.svg and Minus.svg are used.

  • UserInterface/Images/gtk/BreakpointActionAdd.svg: Removed.
  • UserInterface/Images/gtk/BreakpointActionRemove.svg: Removed.

May 1, 2017:

11:49 PM Changeset in webkit [216062] by zandobersek@gmail.com
  • 4 edits in trunk

[GCrypt] ECDSA signing and verification support
https://bugs.webkit.org/show_bug.cgi?id=171103

Reviewed by Carlos Garcia Campos.

Source/WebCore:

Implement WebCrypto ECDSA support for configurations that
are using libgcrypt.

For signing, the provided data is first hashed with the specified
digest algorithm and embedded into a data s-expression. It's then
passed to gcry_pk_sign() along with the private key, returning a
sig-val s-expression. The r and s parameters are then retrieved from
that sig-val and their data extracted and concatenated in the output
Vector<>.

For verification, the data is again hashed and embedded into a data
s-expression. The r and s parameters are extracted from the passed-in
signature Vector<> and embedded into a sig-val s-expression. The data
and sig-val s-expressions are then passed to gcry_pk_verify() along
with the public key. The verification succeeds if no error is returned
and fails if the returned error code is GPG_ERR_BAD_SIGNATURE.

  • crypto/gcrypt/CryptoAlgorithmECDSAGCrypt.cpp:

(WebCore::hashCryptoDigestAlgorithm):
(WebCore::hashAlgorithmName):
(WebCore::mpiData):
(WebCore::gcryptSign):
(WebCore::gcryptVerify):
(WebCore::CryptoAlgorithmECDSA::platformSign):
(WebCore::CryptoAlgorithmECDSA::platformVerify):

LayoutTests:

  • platform/gtk/TestExpectations: Enable the passing ECDSA tests under

crypto/subtle/. The ECDSA tests that utilize PKCS #8 and SPKI remain
skipped since support for that hasn't landed yet.

11:37 PM Changeset in webkit [216061] by zandobersek@gmail.com
  • 4 edits
    2 adds in trunk

[GCrypt] HKDF bit derivation support
https://bugs.webkit.org/show_bug.cgi?id=171074

Reviewed by Michael Catanzaro.

Source/WebCore:

Implement bit derivation support for the HKDF algorithm for configurations
that use libgcrypt.

libgcrypt doesn't provide HKDF support out of the box, so we have to
implement the two steps manually. In the first one, we retrieve the
pseudo-random key by using the specified MAC algorithm with the salt data
as the key and the key data as the input keying material.

In the expand step, we do the required amount of iterations to derive
a sufficient amount of data, using the same MAC algorithm with the
pseudo-random key from the previous step on the data we compose from the
previous block data, the info data, and the current iteration value. The
resulting blocks are appended together until they can be clipped to the
desired output length.

  • crypto/gcrypt/CryptoAlgorithmHKDFGCrypt.cpp:

(WebCore::macAlgorithmForHashFunction):
(WebCore::gcryptDeriveBits):
(WebCore::CryptoAlgorithmHKDF::platformDeriveBits):

LayoutTests:

The crypto/subtle/hkdf-derive-bits-length-limits.html test is added, testing the
corner-case length values for which the bit derivation operation must succeed or
fail for any specified SHA hash algorithm. With HashLen as the algorithm's output
length, the operation should reject for lengths of 0 or above 255 * HashLen * 8.
The operation should resolve for lengths between the two limits, with testing
performed on lengths of 8 (the minimum output length), HashLen * 8 (matching the
output length of the hash algorithm), and 255 * HashLen * 8 (the maximum
derivation output length).

  • crypto/subtle/hkdf-derive-bits-length-limits-expected.txt: Added.
  • crypto/subtle/hkdf-derive-bits-length-limits.html: Added.
  • platform/gtk/TestExpectations: Enable the HKDF tests under crypto/subtle/.
11:34 PM Changeset in webkit [216060] by zandobersek@gmail.com
  • 6 edits
    2 adds in trunk

[GCrypt] ECDH bit derivation support
https://bugs.webkit.org/show_bug.cgi?id=171070

Reviewed by Michael Catanzaro.

Source/WebCore:

Implement bit derivation support for the ECDH algorithm for configurations
that use libgcrypt.

This is done by retrieving the private key data and wrapping it in a new
data s-expression. That's then encrypted with the public key, and the
returned s-expression contains the shared point data. That data is then
decoded into an EC point, from which the x-coordinate is retrieved. This
coordinate data is finally our bit derivation result.

  • crypto/gcrypt/CryptoAlgorithmECDHGCrypt.cpp:

(WebCore::gcryptDerive):
(WebCore::CryptoAlgorithmECDH::platformDeriveBits):

Source/WebCore/PAL:

Add PAL::GCrypt::HandleDeleter specialization for the
gcry_mpi_point_t type.

  • pal/crypto/gcrypt/Handle.h:

(PAL::GCrypt::HandleDeleter<gcry_mpi_point_t>::operator()):

LayoutTests:

The crypto/subtle/ecdh-derive-bits-length-limits.html test is added, testing the
corner-case length values for which the bit derivation operation must succeed or
fail. When specifying 0 as the length, the returned result must match the EC key
size in length. 8, tested as the minimum non-zero value, and the key size for
each key must also correctly resolve and return a resulting ArrayBuffer whose
length in bytes must match the requested length. Derivations for byte-aligned
values should start rejecting immediately for length values that are bigger than
the EC key's length.

  • crypto/subtle/ecdh-derive-bits-length-limits-expected.txt: Added.
  • crypto/subtle/ecdh-derive-bits-length-limits.html: Added.
  • platform/gtk/TestExpectations: Enable Web Crypto ECDH tests under crypto/subtle/

that are passing now that the proper implementation has been added. The remaining
failing ECDH tests use PKCS #8 and SPKI key import/export formats, which are not
supported yet.

10:30 PM Changeset in webkit [216059] by mitz@apple.com
  • 2 edits in trunk/Source/WTF

[Xcode] It’s easy to accidentally install a WTF header outside /usr/local/include/wtf
https://bugs.webkit.org/show_bug.cgi?id=171533

Reviewed by Andy Estes.

  • WTF.xcodeproj/project.pbxproj: Removed the WTF target’s Headers build phase. Its existence was making it easy to accidentally add a header to the target and make it Private, which would have Xcode install a copy of it right under /usr/local/include, in addition to the copy installed under /usr/local/include/wtf by the Copy WTF Headers target. Also got rid of INSTALL_PATH_PREFIX in the script build phase in the Copy WTF Headers target, because it is being never set anymore.
9:32 PM Changeset in webkit [216058] by zandobersek@gmail.com
  • 3 edits in trunk/Source/JavaScriptCore

[aarch64][Linux] m_allowScratchRegister assert hit in MacroAssemblerARM64 under B3::Air::CCallSpecial::generate()
https://bugs.webkit.org/show_bug.cgi?id=170672

Reviewed by Filip Pizlo.

In Air::CCallSpecial::admitsStack() we reject admitting the callee argument on
the stack for ARM64 because that can lead to disallowed usage of the scratch
register in MacroAssemblerARM64 when generating a call with an address Arg
in Air::CCallSpecial::generate().

The testLinearScanWithCalleeOnStack test is added to testb3. It reproduces the
original issue by force-spilling everything on the stack and enforcing the use
of the linear scan register allocation by using an optimization level of 1.

  • b3/air/AirCCallSpecial.cpp:

(JSC::B3::Air::CCallSpecial::admitsStack):

  • b3/testb3.cpp:

(JSC::B3::testLinearScanWithCalleeOnStack):
(JSC::B3::run):

8:14 PM Changeset in webkit [216057] by mitz@apple.com
  • 2 edits in trunk/Source/WTF

WTF installs an extra copy of a header outside /usr/local/include/wtf

  • WTF.xcodeproj/project.pbxproj: Demoted CPUTime.h from Private to Project.
7:04 PM Changeset in webkit [216056] by sbarati@apple.com
  • 4 edits in trunk/LayoutTests

REGRESSION: LayoutTest workers/wasm-hashset-many.html is a flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=171449

Unreviewed.

  • platform/win/TestExpectations: Skip Wasm tests on Windows.
  • workers/wasm-hashset-many-expected.txt:
  • workers/wasm-hashset/many-test.js: Make wasm-hashset-many run fewer workers.
6:47 PM Changeset in webkit [216055] by Chris Dumez
  • 2 edits in trunk/Source/WebKit2

Use RELEASE_LOG_ERROR() to do process termination logging
https://bugs.webkit.org/show_bug.cgi?id=171521

Reviewed by Andreas Kling.

Use RELEASE_LOG_ERROR() to do process termination logging instead of RELEASE_LOG().
This makes the issue more visible in Console.

  • UIProcess/WebProcessProxy.cpp:

(WebKit::WebProcessProxy::didExceedActiveMemoryLimit):
(WebKit::WebProcessProxy::didExceedInactiveMemoryLimit):
(WebKit::WebProcessProxy::didExceedBackgroundCPULimit):

6:33 PM Changeset in webkit [216054] by commit-queue@webkit.org
  • 6 edits in trunk

Ensure RealtimeOutgoingVideoSource sends a black frame when its related source is muted
https://bugs.webkit.org/show_bug.cgi?id=171497

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

Source/WebCore:

Covered by updated test.

When the track is being muted or disabled, send a black frame explicitly.
VideoToolBox sometimes does not output a frame until it receives the other.
That is why we end up sending two frames, the second asynchronously so that libwebrtc will not skip it.
Also storing the rotation so that we keep the same rotation for black frames.
Storing width and height for consistency as well.

  • platform/mediastream/mac/RealtimeOutgoingVideoSource.cpp:

(WebCore::RealtimeOutgoingVideoSource::RealtimeOutgoingVideoSource):
(WebCore::RealtimeOutgoingVideoSource::setSource):
(WebCore::RealtimeOutgoingVideoSource::stop):
(WebCore::RealtimeOutgoingVideoSource::sourceMutedChanged):
(WebCore::RealtimeOutgoingVideoSource::sourceEnabledChanged):
(WebCore::RealtimeOutgoingVideoSource::setSizeFromSource):
(WebCore::RealtimeOutgoingVideoSource::sendBlackFrame):
(WebCore::RealtimeOutgoingVideoSource::sendFrame):
(WebCore::RealtimeOutgoingVideoSource::videoSampleAvailable):

  • platform/mediastream/mac/RealtimeOutgoingVideoSource.h:

LayoutTests:

  • webrtc/video-mute.html: Updating the test to make debugging clearer.
6:28 PM Changeset in webkit [216053] by beidson@apple.com
  • 2 edits in trunk/Source/WebKit2

Only try to get sandbox extension handle for IndexedDB directory if it is set.
rdar://problem/31925828 and https://bugs.webkit.org/show_bug.cgi?id=171522

Reviewed by Andy Estes.

  • UIProcess/WebsiteData/WebsiteDataStore.cpp:

(WebKit::WebsiteDataStore::resolveDirectoriesIfNecessary):

6:24 PM Changeset in webkit [216052] by commit-queue@webkit.org
  • 26 edits
    1 move in trunk/LayoutTests/imported/w3c

Eliminate ?pipe=sub from Resource Timing Tests
https://bugs.webkit.org/show_bug.cgi?id=171525

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2017-05-01
Reviewed by Youenn Fablet.

  • web-platform-tests/resource-timing/resources/rt-utilities.sub.js: Renamed from LayoutTests/imported/w3c/web-platform-tests/resource-timing/resources/rt-utilities.js.

Rename with ".sub.js" to automatically get substitutions.

  • web-platform-tests/resource-timing/resources/rt-iframe-1.html:
  • web-platform-tests/resource-timing/resources/rt-iframe-2.html:
  • web-platform-tests/resource-timing/resources/rt-worker-resources.js:
  • web-platform-tests/resource-timing/rt-cors.html:
  • web-platform-tests/resource-timing/rt-cors.worker.js:
  • web-platform-tests/resource-timing/rt-initiatorType-css.html:
  • web-platform-tests/resource-timing/rt-initiatorType-element.html:
  • web-platform-tests/resource-timing/rt-initiatorType-fetch.html:
  • web-platform-tests/resource-timing/rt-initiatorType-media.html:
  • web-platform-tests/resource-timing/rt-initiatorType-other.html:
  • web-platform-tests/resource-timing/rt-initiatorType-script-module.html:
  • web-platform-tests/resource-timing/rt-initiatorType-xmlhttprequest.html:
  • web-platform-tests/resource-timing/rt-initiatorType.worker.js:
  • web-platform-tests/resource-timing/rt-nextHopProtocol.html:
  • web-platform-tests/resource-timing/rt-nextHopProtocol.worker.js:
  • web-platform-tests/resource-timing/rt-performance-extensions.html:
  • web-platform-tests/resource-timing/rt-performance-extensions.worker.js:
  • web-platform-tests/resource-timing/rt-resource-errors.html:
  • web-platform-tests/resource-timing/rt-resource-ignored.html:
  • web-platform-tests/resource-timing/rt-resources-per-frame.html:
  • web-platform-tests/resource-timing/rt-resources-per-worker.html:
  • web-platform-tests/resource-timing/rt-revalidate-requests.html:
  • web-platform-tests/resource-timing/rt-serialization.html:
  • web-platform-tests/resource-timing/rt-shared-resource-in-frames.html:
  • web-platform-tests/resource-timing/rt-shared-resource-in-workers.html:

Update include of rt-utilities.

6:16 PM Changeset in webkit [216051] by commit-queue@webkit.org
  • 4 edits in trunk/Source/WebCore

Simplify Resource Timing handling of cached resource
https://bugs.webkit.org/show_bug.cgi?id=171526

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2017-05-01
Reviewed by Youenn Fablet.

  • loader/DocumentThreadableLoader.cpp:

(WebCore::DocumentThreadableLoader::loadRequest):

  • loader/SubresourceLoader.cpp:

(WebCore::SubresourceLoader::init):
(WebCore::SubresourceLoader::reportResourceTiming):
Use auto in ResourceTiming construction.
Eliminate an outdated comment.

  • loader/cache/CachedResourceLoader.cpp:

(WebCore::CachedResourceLoader::requestResource):
We can avoid the checks around the request.origin. It should already
be the cases we were checking and asserting because of login in
CachedResourceLoader::prepareFetch.

6:07 PM Changeset in webkit [216050] by Ryan Haddad
  • 7 edits
    1 move in trunk/Source/WebCore

Unreviewed, rolling out r216024.

This change caused ios-simulator LayoutTests to exit early
with assertion failures.

Reverted changeset:

"Add audio device change notifications to AudioSession."
https://bugs.webkit.org/show_bug.cgi?id=171403
http://trac.webkit.org/changeset/216024

6:00 PM Changeset in webkit [216049] by ddkilzer@apple.com
  • 4 edits in trunk

Stop using sprintf() in JavaScriptCore debugger
<https://webkit.org/b/171512>

Reviewed by Keith Miller.

Source/JavaScriptCore:

  • disassembler/udis86/udis86.c:

(ud_insn_hex): Switch from sprintf() to snprintf().

Tools:

  • Scripts/webkitpy/style/checker.py:

(_PATH_RULES_SPECIFIER): Ignore some formatting checkers since
Source/JavaScriptCore/disassembler/udis86/ is generated code.

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

Marked LayoutTest/http/tests/preload/not_delaying_window_onload_before_discovery.html as flaky failure.
https://bugs.webkit.org/show_bug.cgi?id=171528

Unreviewed test Gardening.

Patch by Matt Lewis <Matt Lewis> on 2017-05-01

  • platform/ios-wk2/TestExpectations:
5:08 PM Changeset in webkit [216047] by timothy_horton@apple.com
  • 53 edits
    6 adds
    4 deletes in trunk

Expose viewport-fit instead of clip-to-safe-area
https://bugs.webkit.org/show_bug.cgi?id=171503
<rdar://problem/31918249>

Reviewed by Simon Fraser.

Tests: fast/viewport/ios/viewport-fit-auto.html

fast/viewport/ios/viewport-fit-contain.html
fast/viewport/ios/viewport-fit-cover.html

  • dom/ConstantPropertyMap.cpp:

(WebCore::ConstantPropertyMap::buildValues):
(WebCore::ConstantPropertyMap::updateConstantsForUnobscuredSafeAreaInsets):
(WebCore::ConstantPropertyMap::didChangeSafeAreaInsets):
(WebCore::ConstantPropertyMap::updateConstantsForObscuredInsets): Deleted.
(WebCore::ConstantPropertyMap::didChangeObscuredInsets): Deleted.

  • dom/ConstantPropertyMap.h:

Retrieve the safe area insets from page, instead of assuming that we should
just expose the entire obscured inset. Also, do some renames.

  • dom/ViewportArguments.cpp:

(WebCore::ViewportArguments::resolve):
(WebCore::parseViewportFitValue):
(WebCore::setViewportFeature):

  • dom/ViewportArguments.h:

(WebCore::ViewportArguments::operator==):

  • page/ChromeClient.h:
  • page/FrameView.cpp:

(WebCore::FrameView::enableSpeculativeTilingIfNeeded):
(WebCore::FrameView::calculateExtendedBackgroundMode):
(WebCore::FrameView::setClipToSafeArea): Deleted.

  • page/FrameView.h:
  • page/ViewportConfiguration.cpp:

(WebCore::ViewportConfiguration::updateConfiguration):
(WebCore::operator<<):
(WebCore::ViewportConfiguration::description):
(WebCore::ViewportConfiguration::dump):

  • page/ViewportConfiguration.h:

(WebCore::ViewportConfiguration::avoidsUnsafeArea):
(WebCore::ViewportConfiguration::Parameters::Parameters):
(WebCore::ViewportConfiguration::clipToSafeArea): Deleted.

  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::updateRootContentLayerClipping):

  • rendering/RenderObject.cpp:

(WebCore::RenderObject::repaintUsingContainer):
Un-do changes to support clip-to-safe-area, and instead implement
a new viewport-fit argument in the viewport meta tag, which takes
"auto", "contain", and "cover". "auto" and "contain" cause web content
to lay out excluding the safe area inset from the layout size, while
"cover" causes web content to expand into the unsafe area.

  • page/Page.cpp:

(WebCore::Page::setUnobscuredSafeAreaInsets):
(WebCore::Page::setObscuredInsets): Deleted.

  • page/Page.h:

(WebCore::Page::setObscuredInsets):
(WebCore::Page::unobscuredSafeAreaInsets):
Keep safe area and obscured insets separately.

  • Shared/VisibleContentRectUpdateInfo.cpp:

(WebKit::VisibleContentRectUpdateInfo::encode):
(WebKit::VisibleContentRectUpdateInfo::decode):
(WebKit::operator<<):

  • Shared/VisibleContentRectUpdateInfo.h:

(WebKit::VisibleContentRectUpdateInfo::VisibleContentRectUpdateInfo):
(WebKit::VisibleContentRectUpdateInfo::unobscuredSafeAreaInsets):
(WebKit::operator==):
Plumb the safe area insets down from the UI process to the Web Content
process inside the visible content rect update, alongside the obscured
insets.

  • Shared/mac/RemoteLayerTreeTransaction.h:

(WebKit::RemoteLayerTreeTransaction::avoidsUnsafeArea):
(WebKit::RemoteLayerTreeTransaction::setAvoidsUnsafeArea):

  • Shared/mac/RemoteLayerTreeTransaction.mm:

(WebKit::RemoteLayerTreeTransaction::encode):
(WebKit::RemoteLayerTreeTransaction::decode):
(WebKit::RemoteLayerTreeTransaction::description):

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

(WebKit::PageClientImpl::didChangeAvoidsUnsafeArea):
(WebKit::PageClientImpl::didChangeClipToSafeArea): Deleted.

  • UIProcess/ios/WebPageProxyIOS.mm:

(WebKit::WebPageProxy::didCommitLayerTree):

  • UIProcess/mac/PageClientImpl.h:
  • WebProcess/WebCoreSupport/WebChromeClient.cpp:

(WebKit::WebChromeClient::didChangeClipToSafeArea): Deleted.

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

(WebKit::WebPage::willCommitLayerTree):

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::viewportConfigurationChanged):
(WebKit::WebPage::updateVisibleContentRects):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::resetState):
(WebKit::WebPageProxy::setAvoidsUnsafeArea):
(WebKit::WebPageProxy::setClipToSafeArea): Deleted.

  • UIProcess/WebPageProxy.h:

(WebKit::WebPageProxy::avoidsUnsafeArea):
(WebKit::WebPageProxy::clipToSafeArea): Deleted.

  • UIProcess/WebPageProxy.messages.in:

Plumb the effective value of viewport-fit (whether or not to avoid
the safe area for layout purposes) from the Web Content process
to the UI process inside the layer tree transaction.
Also, remove clip-to-safe-area plumbing.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _initializeWithConfiguration:]):
(-[WKWebView _computedContentInset]):
(-[WKWebView _computedUnobscuredSafeAreaInset]):
(-[WKWebView _updateVisibleContentRects]):
(-[WKWebView _updateScrollViewInsetAdjustmentBehavior]):
(-[WKWebView _safeAreaShouldAffectObscuredInsets]):
(-[WKWebView _unobscuredSafeAreaInsets]):
(-[WKWebView _setUnobscuredSafeAreaInsets:]):
(-[WKWebView _contentMayDrawInObscuredInsets]): Deleted.

  • UIProcess/API/Cocoa/WKWebViewInternal.h:
  • UIProcess/API/Cocoa/WKWebViewPrivate.h:

Make use of the effective value of viewport-fit to decide whether to
take the safe area into account when computing the obscured insets,
and expose this to clients (in the case that they need to know
because they push their own obscured insets down). Also expose a
safe area inset setter for that case as well.

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

(-[WKContentView updateFixedClippingView:]):
(-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:obscuredInsets:unobscuredSafeAreaInsets:inputViewBounds:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:enclosedInScrollableAncestorView:]):
Remove a piece of the clip-to-safe-area implementation, and plumb
safe area insets into the visible content rect update info.

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

(-[WKScrollView initWithFrame:]):
(-[WKScrollView _contentInsetAdjustmentBehaviorWasExternallyOverridden]):
(-[WKScrollView _setContentInsetAdjustmentBehavior:]):
(-[WKScrollView _setContentInsetAdjustmentBehaviorInternal:]):
Keep track of whether the client has ever touched the content inset adjustment
behavior; if they have, we won't manage it ourselves.

  • DumpRenderTree/ios/UIScriptControllerIOS.mm:

(WTR::UIScriptController::setSafeAreaInsets):
(WTR::UIScriptController::setObscuredInsets): Deleted.

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

(WTR::UIScriptController::setSafeAreaInsets):
(WTR::UIScriptController::setObscuredInsets): Deleted.

  • TestRunnerShared/UIScriptContext/UIScriptController.h:
  • WebKitTestRunner/cocoa/TestRunnerWKWebView.h:
  • WebKitTestRunner/cocoa/TestRunnerWKWebView.mm:

(-[TestRunnerWKWebView setOverrideSafeAreaInsets:]):
(-[TestRunnerWKWebView _safeAreaInsetsForFrame:inSuperview:]):

  • WebKitTestRunner/ios/TestControllerIOS.mm:

(WTR::TestController::platformResetStateToConsistentValues):

  • WebKitTestRunner/ios/UIKitSPI.h:
  • WebKitTestRunner/ios/UIScriptControllerIOS.mm:

(WTR::UIScriptController::setSafeAreaInsets):
(WTR::UIScriptController::setObscuredInsets): Deleted.
Expose a safe area inset setter instead of obscured insets.

  • TestExpectations:
  • fast/css/variables/constants/ios/safe-area-inset-set-expected.html:
  • fast/css/variables/constants/ios/safe-area-inset-set.html:
  • fast/viewport/ios/viewport-fit-auto-expected.txt: Added.
  • fast/viewport/ios/viewport-fit-auto.html: Added.
  • fast/viewport/ios/viewport-fit-contain-expected.txt: Added.
  • fast/viewport/ios/viewport-fit-contain.html: Added.
  • fast/viewport/ios/viewport-fit-cover-expected.txt: Added.
  • fast/viewport/ios/viewport-fit-cover.html: Added.
  • tiled-drawing/ios/viewport-clip-to-safe-area-no-gets-margin-tiles-expected.txt: Removed.
  • tiled-drawing/ios/viewport-clip-to-safe-area-no-gets-margin-tiles.html: Removed.
  • tiled-drawing/ios/viewport-clip-to-safe-area-yes-gets-no-margin-tiles-expected.txt: Removed.
  • tiled-drawing/ios/viewport-clip-to-safe-area-yes-gets-no-margin-tiles.html: Removed.

Remove clip-to-safe-area tests and add some viewport-fit tests. Also, adjust
safe-area-inset-set to use the new UIScriptController setSafeAreaInset method.

5:02 PM Changeset in webkit [216046] by Chris Dumez
  • 6 edits
    2 adds in trunk

Documents created using DOMParser.parseFromString should inherit their context document's origin / URL
https://bugs.webkit.org/show_bug.cgi?id=171499

Reviewed by Sam Weinig.

LayoutTests/imported/w3c:

Rebaseline web-platform-tests now that more checks are passing.

  • web-platform-tests/domparsing/DOMParser-parseFromString-html-expected.txt:
  • web-platform-tests/domparsing/DOMParser-parseFromString-xml-expected.txt:

Source/WebCore:

Documents created using DOMParser.parseFromString should inherit their context document's
origin / URL:

Test: fast/dom/domparser-parsefromstring-origin.html

  • xml/DOMParser.cpp:

(WebCore::DOMParser::parseFromString):

LayoutTests:

Add layout test coverage. I have verified that this test passes in both Firefox and Chrome.

  • fast/dom/domparser-parsefromstring-origin-expected.txt: Added.
  • fast/dom/domparser-parsefromstring-origin.html: Added.
5:01 PM Changeset in webkit [216045] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Mark inspector/debugger/tail-recursion.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=168387

Unreviewed test gardening.

  • platform/mac/TestExpectations:
5:01 PM Changeset in webkit [216044] by Ryan Haddad
  • 3 edits in trunk/LayoutTests

Rebaseline two fast/visual-viewport tests for iOS.

Unreviewed test gardening.

  • platform/ios/fast/visual-viewport/zoomed-fixed-expected.txt:
  • platform/ios/fast/visual-viewport/zoomed-fixed-header-and-footer-expected.txt:
4:54 PM Changeset in webkit [216043] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

Web Inspector: ASSERT(!m_startedComposite) fails when recording on non-Cocoa Timeline
https://bugs.webkit.org/show_bug.cgi?id=171363

Patch by Ross Kirsling <Ross Kirsling> on 2017-05-01
Reviewed by Matt Baker.

  • page/FrameView.cpp:

(WebCore::FrameView::flushCompositingStateIncludingSubframes): Add PLATFORM(COCOA) guard.

4:18 PM Changeset in webkit [216042] by Wenson Hsieh
  • 2 edits in trunk/Tools

Unreviewed, fix the build on a new internal SDK

Replace usages of NSItemProviderRepresentationVisibilityAll with
UIItemProviderRepresentationOptionsVisibilityAll.

  • TestWebKitAPI/Tests/ios/DataInteractionTests.mm:

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

4:00 PM Changeset in webkit [216041] by ddkilzer@apple.com
  • 3 edits in trunk/Tools

[Cocoa] Replace uses of [get…Class() alloc] in TestWebKitAPI
<https://webkit.org/b/171493>

Reviewed by Dan Bernstein.

  • TestWebKitAPI/Tests/WebKit/ios/AudioSessionCategoryIOS.mm:

Remove UIKit soft-link since TestWebKitAPI links to
UIKit.framework.
(TestWebKitAPI::WebKit1_AudioSessionCategoryIOS_Test): Use
UIWindow and UIWebView classes directly.

  • TestWebKitAPI/Tests/WebKit2Cocoa/RequiresUserActionForPlayback.mm:

Remove UIKit soft-link since TestWebKitAPI links to
UIKit.framework.
(RequiresUserActionForPlaybackTest::createWebView): Use UIWindow
class directly.

3:55 PM Changeset in webkit [216040] by ddkilzer@apple.com
  • 2 edits in trunk/Source/WebCore

Stop using strcpy() in fullyQualifiedInfoTableName() from Database.cpp
<https://webkit.org/b/171517>

Reviewed by Brady Eidson.

  • Modules/webdatabase/Database.cpp:

(WebCore::fullyQualifiedInfoTableName): Switch from strcpy() to
snprintf().

3:54 PM Changeset in webkit [216039] by Joseph Pecoraro
  • 4 edits in trunk/LayoutTests

[GTK] Two test started to fail after due to unhandled promise rejection reported after r215916
https://bugs.webkit.org/show_bug.cgi?id=171491

Unreviewed test gardening.

  • js/promises-tests/promises-tests-2-3-3.html:

Silence unhandled expectation messages for this test.

  • media/video-fullscreen-restriction-removed-expected.txt:

Rebaseline expected results with unhandled expectation message.

  • platform/gtk/TestExpectations:
3:52 PM Changeset in webkit [216038] by Chris Fleizach
  • 11 edits
    3 adds in trunk

AX: Support time@datetime for verbosity clarification of dates, times, and durations
https://bugs.webkit.org/show_bug.cgi?id=171498
<rdar://problem/12985540>

Reviewed by Joanmarie Diggs.

Source/WebCore:

Expose the datetime attribute value.

Test: accessibility/datetime-attribute.html

  • accessibility/AccessibilityObject.cpp:

(WebCore::AccessibilityObject::datetimeAttributeValue):

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

(WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
(WebCore::AccessibilityRenderObject::determineAccessibilityRole):

  • accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:

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

  • accessibility/mac/WebAccessibilityObjectWrapperMac.mm:

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

LayoutTests:

  • accessibility/datetime-attribute.html: Added.
  • accessibility/roles-computedRoleString-expected.txt:
  • platform/gtk/accessibility/datetime-attribute-expected.txt: Added.
  • platform/gtk/accessibility/roles-exposed-expected.txt:
  • platform/mac/accessibility/datetime-attribute-expected.txt: Added.
  • platform/mac/accessibility/roles-computedRoleString-expected.txt:
  • platform/mac/accessibility/roles-exposed-expected.txt:
3:41 PM Changeset in webkit [216037] by beidson@apple.com
  • 22 edits
    9 moves in trunk

Update names in WKURLSchemeHandler/WKURLSchemeHandlerTask APIs.
<rdar://problem/31824838> and https://bugs.webkit.org/show_bug.cgi?id=171508

Reviewed by Andy Estes.

Source/WebKit2:

This patch:

  • Renames WKURLSchemeHandlerTask to WKURLSchemeTask
  • Renames the method "startTask" to "startURLSchemeTask"
  • Renames the method "stopTask" to "stopURLSchemeTask"

To those effects it's basically a global replace.

  • Shared/API/APIObject.h:
  • Shared/Cocoa/APIObject.mm:

(API::Object::newObject):

  • UIProcess/API/APIURLSchemeTask.cpp: Renamed from Source/WebKit2/UIProcess/API/APIURLSchemeHandlerTask.cpp.

(API::URLSchemeTask::create):
(API::URLSchemeTask::URLSchemeTask):

  • UIProcess/API/APIURLSchemeTask.h: Renamed from Source/WebKit2/UIProcess/API/APIURLSchemeHandlerTask.h.
  • UIProcess/API/Cocoa/WKURLSchemeHandler.h:
  • UIProcess/API/Cocoa/WKURLSchemeTask.h: Renamed from Source/WebKit2/UIProcess/API/Cocoa/WKURLSchemeHandlerTask.h.
  • UIProcess/API/Cocoa/WKURLSchemeTask.mm: Renamed from Source/WebKit2/UIProcess/API/Cocoa/WKURLSchemeHandlerTask.mm.

(raiseExceptionIfNecessary):
(-[WKURLSchemeTaskImpl request]):
(-[WKURLSchemeTaskImpl didReceiveResponse:]):
(-[WKURLSchemeTaskImpl didReceiveData:]):
(-[WKURLSchemeTaskImpl didFinish]):
(-[WKURLSchemeTaskImpl didFailWithError:]):
(-[WKURLSchemeTaskImpl _apiObject]):

  • UIProcess/API/Cocoa/WKURLSchemeTaskInternal.h: Renamed from Source/WebKit2/UIProcess/API/Cocoa/WKURLSchemeHandlerTaskInternal.h.

(WebKit::wrapper):

  • UIProcess/Cocoa/WebURLSchemeHandlerCocoa.h:
  • UIProcess/Cocoa/WebURLSchemeHandlerCocoa.mm:

(WebKit::WebURLSchemeHandlerCocoa::platformStartTask):
(WebKit::WebURLSchemeHandlerCocoa::platformStopTask):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::startURLSchemeTask):
(WebKit::WebPageProxy::stopURLSchemeTask):
(WebKit::WebPageProxy::startURLSchemeHandlerTask): Deleted.
(WebKit::WebPageProxy::stopURLSchemeHandlerTask): Deleted.

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

(WebKit::WebURLSchemeHandler::startTask):

  • UIProcess/WebURLSchemeHandler.h:
  • UIProcess/WebURLSchemeTask.cpp: Renamed from Source/WebKit2/UIProcess/WebURLSchemeHandlerTask.cpp.

(WebKit::WebURLSchemeTask::create):
(WebKit::WebURLSchemeTask::WebURLSchemeTask):
(WebKit::WebURLSchemeTask::didReceiveResponse):
(WebKit::WebURLSchemeTask::didReceiveData):
(WebKit::WebURLSchemeTask::didComplete):
(WebKit::WebURLSchemeTask::pageDestroyed):
(WebKit::WebURLSchemeTask::stop):

  • UIProcess/WebURLSchemeTask.h: Renamed from Source/WebKit2/UIProcess/WebURLSchemeHandlerTask.h.

(WebKit::WebURLSchemeTask::identifier):
(WebKit::WebURLSchemeTask::request):

  • WebKit2.xcodeproj/project.pbxproj:
  • WebProcess/Network/WebLoaderStrategy.cpp:

(WebKit::WebLoaderStrategy::addURLSchemeTaskProxy):
(WebKit::WebLoaderStrategy::removeURLSchemeTaskProxy):
(WebKit::WebLoaderStrategy::remove):
(WebKit::WebLoaderStrategy::addURLSchemeHandlerTaskProxy): Deleted.
(WebKit::WebLoaderStrategy::removeURLSchemeHandlerTaskProxy): Deleted.

  • WebProcess/Network/WebLoaderStrategy.h:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::urlSchemeTaskDidReceiveResponse):
(WebKit::WebPage::urlSchemeTaskDidReceiveData):
(WebKit::WebPage::urlSchemeTaskDidComplete):
(WebKit::WebPage::urlSchemeHandlerTaskDidReceiveResponse): Deleted.
(WebKit::WebPage::urlSchemeHandlerTaskDidReceiveData): Deleted.
(WebKit::WebPage::urlSchemeHandlerTaskDidComplete): Deleted.

  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/WebPage.messages.in:
  • WebProcess/WebPage/WebURLSchemeHandlerProxy.cpp:

(WebKit::WebURLSchemeHandlerProxy::startNewTask):
(WebKit::WebURLSchemeHandlerProxy::taskDidComplete):
(WebKit::WebURLSchemeHandlerProxy::taskDidStopLoading):

  • WebProcess/WebPage/WebURLSchemeHandlerProxy.h:
  • WebProcess/WebPage/WebURLSchemeTaskProxy.cpp: Renamed from Source/WebKit2/WebProcess/WebPage/WebURLSchemeHandlerTaskProxy.cpp.

(WebKit::WebURLSchemeTaskProxy::WebURLSchemeTaskProxy):
(WebKit::WebURLSchemeTaskProxy::startLoading):
(WebKit::WebURLSchemeTaskProxy::stopLoading):
(WebKit::WebURLSchemeTaskProxy::didReceiveResponse):
(WebKit::WebURLSchemeTaskProxy::didReceiveData):
(WebKit::WebURLSchemeTaskProxy::didComplete):
(WebKit::WebURLSchemeTaskProxy::hasLoader):

  • WebProcess/WebPage/WebURLSchemeTaskProxy.h: Renamed from Source/WebKit2/WebProcess/WebPage/WebURLSchemeHandlerTaskProxy.h.

(WebKit::WebURLSchemeTaskProxy::request):
(WebKit::WebURLSchemeTaskProxy::identifier):

Tools:

  • TestWebKitAPI/Tests/WebKit2Cocoa/WKURLSchemeHandler-1.mm:

(-[SchemeHandler webView:startURLSchemeTask:]):
(-[SchemeHandler webView:stopURLSchemeTask:]):
(-[SchemeHandler webView:startTask:]): Deleted.
(-[SchemeHandler webView:stopTask:]): Deleted.

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

Marked fast/mediastream/getUserMedia-webaudio.html as flaky timeout.
https://bugs.webkit.org/show_bug.cgi?id=170960

Unreviewed test gardening.

Patch by Matt Lewis <Matt Lewis> on 2017-05-01

  • platform/mac-wk2/TestExpectations:
3:24 PM Changeset in webkit [216035] by Joseph Pecoraro
  • 29 edits
    3 adds in trunk

RejectedPromiseTracker should produce better callstacks and avoid capturing callstacks unless there is a debugger/inspector
https://bugs.webkit.org/show_bug.cgi?id=171416
<rdar://problem/31899425>

Reviewed by Saam Barati and Brian Burg.

LayoutTests/imported/w3c:

  • web-platform-tests/WebCryptoAPI/derive_bits_keys/test_ecdh_bits-expected.txt:
  • web-platform-tests/WebCryptoAPI/derive_bits_keys/test_ecdh_keys-expected.txt:
  • web-platform-tests/html/semantics/embedded-content/media-elements/event_pause_noautoplay-expected.txt:
  • web-platform-tests/html/semantics/embedded-content/media-elements/event_play_noautoplay-expected.txt:
  • web-platform-tests/html/semantics/embedded-content/media-elements/paused_true_during_pause-expected.txt:
  • web-platform-tests/streams/piping/close-propagation-forward-expected.txt:
  • web-platform-tests/streams/piping/error-propagation-backward-expected.txt:
  • web-platform-tests/streams/piping/error-propagation-forward-expected.txt:
  • web-platform-tests/streams/piping/flow-control-expected.txt:
  • web-platform-tests/streams/piping/general-expected.txt:

Rebaseline results. Better stack trace for errors includes correct line numbers.
Explicit rejections with a value do not include backtraces without a debugger.

Source/WebCore:

Test: inspector/console/message-stack-trace.html

  • dom/RejectedPromiseTracker.cpp:

(WebCore::UnhandledPromise::UnhandledPromise):
(WebCore::UnhandledPromise::callStack):
Switch to RefPtr to allow not capturing the stack.

(WebCore::createScriptCallStackFromReason):
Use the VM's lastException if the value in the exception is the
rejected promise value. Using the Exception call stack is important
because uncaught exceptions in promise rejections trigger a built-in
try/catch and re-enter JavaScript before passing the Error through
to the RejectionTracker. When possible, we don't want to capture the
new stack originating from the try/catch. Instead, we want the stack
from before the try/catch when the error was created.

  • dom/ScriptExecutionContext.h:
  • dom/ScriptExecutionContext.cpp:

(WebCore::ScriptExecutionContext::reportUnhandledPromiseRejection):
Switch to a pointer since the stack could be empty.

LayoutTests:

  • inspector/console/message-stack-trace-expected.txt: Added.
  • inspector/console/message-stack-trace.html: Added.

Test console stack traces from various places where console messages
are generated and the stacks are important.

  • inspector/console/resources/log-console-stack-trace.js: Added.

(TestPage.registerInitializer.logCallFrame):
(TestPage.registerInitializer.window.logConsoleMessageStackTrace):
Like the logger for Debugger StackTrace but for Console StackTrace.

  • inspector/debugger/break-on-exception-throw-in-promise-expected.txt:
  • inspector/debugger/break-on-uncaught-exception-throw-in-promise-expected.txt:
  • fast/mediastream/MediaStream-MediaElement-setObject-null-expected.txt:
  • http/tests/security/video-cross-origin-caching-expected.txt:
  • js/dom/unhandled-promise-rejection-bindings-type-error-expected.txt:
  • js/dom/unhandled-promise-rejection-console-report-expected.txt:
  • js/promises-tests/promises-tests-2-2-6-expected.txt:
  • streams/reference-implementation/pipe-to-options-expected.txt:
  • streams/reference-implementation/readable-stream-templated-expected.txt:
  • streams/reference-implementation/writable-stream-abort-expected.txt:
  • streams/reference-implementation/writable-stream-expected.txt:
  • webrtc/libwebrtc/release-while-creating-offer-expected.txt:
  • webrtc/libwebrtc/release-while-setting-local-description-expected.txt:

Rebaseline results. Better stack trace for errors includes correct line numbers.
Explicit rejections with a value do not include backtraces without a debugger.

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

Unreviewed build fix after r216033.

  • platform/mediastream/mac/CoreAudioCaptureSource.cpp:

(WebCore::CoreAudioCaptureSource::create):

2:53 PM Changeset in webkit [216033] by Joseph Pecoraro
  • 2 edits in trunk/LayoutTests

LayoutTest/imported/w3c/web-platform-tests/resource-timing/rt-revalidate-requests.html is a flaky failure.
https://bugs.webkit.org/show_bug.cgi?id=171511

Unreviewed test gardening.

2:53 PM Changeset in webkit [216032] by jmarcell@apple.com
  • 2 edits in trunk/Tools

Add a new function for getting the Git hash for a pure git directory.
https://bugs.webkit.org/show_bug.cgi?id=171450

Reviewed by David Kilzer.

  • Scripts/VCSUtils.pm:

(gitHashForDirectory):

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

Update TestExpectations for http/tests/fetch/fetch-in-worker-crash.html.

Unreviewed test gardening.

2:49 PM Changeset in webkit [216030] by aakash_jain@apple.com
  • 11 edits in trunk

fix check-webkit-style errors in webkitpy about two blank lines before class definitions
https://bugs.webkit.org/show_bug.cgi?id=171509

Reviewed by Alexey Proskuryakov.

  • Scripts/webkitpy/common/config/committers.py: Added two blank lines before class definition.
  • Scripts/webkitpy/layout_tests/models/test_run_results.py: Ditto.
  • Scripts/webkitpy/layout_tests/run_webkit_tests.py: Ditto.
  • Scripts/webkitpy/port/base_unittest.py: Ditto.
  • Scripts/webkitpy/port/device.py: Ditto.
  • Scripts/webkitpy/port/linux_get_crash_log.py: Ditto.
  • Scripts/webkitpy/style/checkers/featuredefines.py: Ditto.
  • Scripts/webkitpy/style/checkers/jsonchecker.py: Ditto.
  • Scripts/webkitpy/tool/bot/patchanalysistask.py: Ditto.
  • Scripts/webkitpy/layout_tests/controllers/manager_unittest.py: Ditto.

(ManagerTest.test_uses_custom_device.MockCustomDevicePort): Added blank line before method.
(ManagerTest.test_uses_custom_device): Removed extra blank line at end of file.

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

Use AVAudioSession to enumerate audio capture devices on iOS
https://bugs.webkit.org/show_bug.cgi?id=170861
<rdar://problem/31653658>

Reviewed by Eric Carlson.

Hook up the new AVAudioSessionCaptureDeviceManager class to CoreAudioCaptureSource and to the (increasingly ill-named)
RealtimeMediaSourceCenterMac.

  • platform/mediastream/mac/CoreAudioCaptureSource.cpp:

(WebCore::CoreAudioCaptureSource::create):

  • platform/mediastream/mac/RealtimeMediaSourceCenterMac.cpp:

(WebCore::RealtimeMediaSourceCenterMac::setUseAVFoundationAudioCapture):

2:19 PM Changeset in webkit [216028] by jdiggs@igalia.com
  • 9 edits in trunk

[ATK] Expose values of aria-rowcount, aria-colcount, aria-rowindex, aria-colindex, aria-rowspan, and aria-colspan as object attributes
https://bugs.webkit.org/show_bug.cgi?id=171496

Reviewed by Chris Fleizach.

Source/WebCore:

Expose valid, author-provided values as an object attribute. In order to distinguish
author-provided values from the default returned by WebCore Accessibility (1), change
the default return value to -1. We cannot return 0 because the ARIA spec states that
0 is a valid value for authors to provide to indicate that the cell spans the remaining
rows in the row group.

Also removed some legacy code. The "layout-guess" attribute was needed and expected
as a way for AT-SPI2-based assistive technologies to identify layout tables. WebCore
Accessibility does not expose tables which are purely for layout as accessible tables,
and WebKitGtk uses that implementation, thus this attribute is no longer relevant.

No new tests. Unskipped existing test which is now passing.

  • accessibility/AccessibilityARIAGridCell.cpp:

(WebCore::AccessibilityARIAGridCell::ariaRowSpanWithRowIndex):
(WebCore::AccessibilityARIAGridCell::columnIndexRange):

  • accessibility/AccessibilityTableCell.cpp:

(WebCore::AccessibilityTableCell::ariaColumnSpan):
(WebCore::AccessibilityTableCell::ariaRowSpan):

  • accessibility/AccessibilityTableCell.h:
  • accessibility/atk/WebKitAccessibleWrapperAtk.cpp:

(webkitAccessibleGetAttributes):

Tools:

Add new attribute names so that the values of the object attributes can be tested.

  • WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:

(WTR::AccessibilityUIElement::numberAttributeValue):

LayoutTests:

  • platform/gtk/TestExpectations: Unskip accessibility/aria-table-attributes.html
2:17 PM Changeset in webkit [216027] by fpizlo@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Air::fixObviousSpills should remove totally redundant instructions
https://bugs.webkit.org/show_bug.cgi?id=171131

Reviewed by Saam Barati.

This is a modest compile-time-neutral improvement to fixObviousSpills. That phase
builds up a classic alias analysis data structure over spills and registers and then
uses it to remove the most common spill pathologies we encounter. For example, if you
use a spill but the spill is aliased to a register or constant, then we can replace the
use of the spill with a use of the register or constant.

But that phase was missing perhaps one of the most obvious fixups that its analysis
allows us to do: if any instruction creates an alias we already know about, then the
instruction is redundant. This turned out to be super important for
https://bugs.webkit.org/show_bug.cgi?id=171075. That patch didn't work out, but this
kind of optimization might be a good clean-up for many other kinds of optimizations.

  • b3/air/AirFixObviousSpills.cpp:
2:15 PM Changeset in webkit [216026] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Rebaseline fast/visual-viewport/rtl-zoomed-rects.html for mac-wk1.
https://bugs.webkit.org/show_bug.cgi?id=171500

Unreviewed test gardening.

  • platform/mac-wk1/fast/visual-viewport/rtl-zoomed-rects-expected.txt:
2:13 PM Changeset in webkit [216025] by Ryan Haddad
  • 8 edits in trunk/LayoutTests

Rebaselined fast/visual-viewport/ tests.
https://bugs.webkit.org/show_bug.cgi?id=171500

Unreviewed test gardening.

Patch by Matt Lewis <Matt Lewis> on 2017-05-01

  • platform/ios-wk2/fast/visual-viewport/nonzoomed-rects-expected.txt:
  • platform/ios-wk2/fast/visual-viewport/rtl-nonzoomed-rects-expected.txt:
  • platform/ios-wk2/fast/visual-viewport/rtl-zoomed-rects-expected.txt:
  • platform/ios-wk2/fast/visual-viewport/rubberbanding-viewport-rects-expected.txt:
  • platform/ios-wk2/fast/visual-viewport/rubberbanding-viewport-rects-extended-background-expected.txt:
  • platform/ios-wk2/fast/visual-viewport/rubberbanding-viewport-rects-header-footer-expected.txt:
  • platform/ios-wk2/fast/visual-viewport/zoomed-fixed-expected.txt: Added.
  • platform/ios-wk2/fast/visual-viewport/zoomed-fixed-header-and-footer-expected.txt: Added.
  • platform/ios-wk2/fast/visual-viewport/zoomed-rects-expected.txt:
2:06 PM Changeset in webkit [216024] by jer.noble@apple.com
  • 7 edits
    1 move in trunk/Source/WebCore

Add audio device change notifications to AudioSession.
https://bugs.webkit.org/show_bug.cgi?id=171403

Reviewed by Eric Carlson.

Add notifications to AudioSession which fire when the current input and output audio devices
change. Also add a notification when audio services are lost (which will only fire on iOS).
Take this opportunity to make the existing hardwareMutedStateDidChange() notification be
platform agnostic, to move the outputDeviceSupportsLowPowerMode() code from AudioHardwareListener,
and to do a few more clean-ups of the AudioSession code.

  • WebCore.xcodeproj/project.pbxproj:
  • html/HTMLMediaElement.cpp:

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

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

(WebCore::AudioSession::AudioSession):

  • platform/audio/AudioSession.h:

(WebCore::AudioSession::Observer::hardwareMutedStateDidChange):
(WebCore::AudioSession::Observer::audioInputDeviceChanged):
(WebCore::AudioSession::Observer::audioOutputDeviceChanged):
(WebCore::AudioSession::Observer::audioServicesLost):
(WebCore::AudioSession::Observer::audioServicesReset):
(WebCore::AudioSession::MutedStateObserver::~MutedStateObserver): Deleted.

  • platform/audio/ios/AudioSessionIOS.mm:

(WebCore::AudioSessionPrivate::AudioSessionPrivate):
(WebCore::AudioSession::AudioSession):
(WebCore::AudioSession::setCategoryOverride):
(WebCore::AudioSession::categoryOverride):
(WebCore::AudioSession::isMuted):
(WebCore::AudioSession::outputDeviceSupportsLowPowerMode):
(WebCore::AudioSession::addObserver):
(WebCore::AudioSession::removeObserver):

  • platform/audio/mac/AudioSessionMac.mm: Renamed from Source/WebCore/platform/audio/mac/AudioSessionMac.cpp.

(WebCore::defaultDevice):
(WebCore::AudioSessionPrivate::AudioSessionPrivate):
(WebCore::AudioSession::AudioSession):
(WebCore::AudioSession::~AudioSession):
(WebCore::AudioSession::category):
(WebCore::AudioSession::setCategory):
(WebCore::AudioSession::categoryOverride):
(WebCore::AudioSession::setCategoryOverride):
(WebCore::AudioSession::sampleRate):
(WebCore::AudioSession::bufferSize):
(WebCore::AudioSession::numberOfOutputChannels):
(WebCore::AudioSession::tryToSetActive):
(WebCore::AudioSession::preferredBufferSize):
(WebCore::AudioSession::setPreferredBufferSize):
(WebCore::AudioSession::isMuted):
(WebCore::currentDeviceSupportsLowPowerBufferSize):
(WebCore::AudioSession::outputDeviceSupportsLowPowerMode):
(WebCore::AudioSession::addObserver):
(WebCore::AudioSession::removeObserver):

1:40 PM Changeset in webkit [216023] by Chris Dumez
  • 3 edits
    2 adds in trunk

Do not dispatch SVG load event in frameless documents
https://bugs.webkit.org/show_bug.cgi?id=171505
<rdar://problem/31799776>

Reviewed by Andreas Kling.

Source/WebCore:

We should not dispatch SVG load events in frameless documents. <https://trac.webkit.org/changeset/173028/webkit>
took care of most load events but forgot the SVG load event.

Test: fast/dom/domparser-parsefromstring-svg-load-event.html

  • dom/Document.cpp:

(WebCore::Document::implicitClose):

LayoutTests:

Add layout test coverage. I have verified that this test passes on both Firefox and Chrome.

  • fast/dom/domparser-parsefromstring-svg-load-event-expected.txt: Added.
  • fast/dom/domparser-parsefromstring-svg-load-event.html: Added.
11:50 AM Changeset in webkit [216022] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Skip editing/execCommand/show-modal-dialog-during-execCommand.html on mac-wk1.
https://bugs.webkit.org/show_bug.cgi?id=171501

Unreviewed test gardening.

  • platform/mac-wk1/TestExpectations:
11:45 AM Changeset in webkit [216021] by Ryan Haddad
  • 4 edits in trunk/LayoutTests

Rebaseline js/dom/global-constructors-attributes.html after r215956.

Unreviewed test gardening.

  • platform/mac-elcapitan/js/dom/global-constructors-attributes-expected.txt:
  • platform/mac-wk1/js/dom/global-constructors-attributes-expected.txt:
  • platform/mac/js/dom/global-constructors-attributes-expected.txt:
11:09 AM Changeset in webkit [216020] by Chris Dumez
  • 2 edits in trunk/Source/WebKit2

Tweak how long we allow a process to go over its background CPU limit
https://bugs.webkit.org/show_bug.cgi?id=170460
<rdar://problem/31433141>

Reviewed by Geoffrey Garen.

Tweak how long we allow a process to go over its background CPU limit. We now use 8 minutes
intervals (instead of previously 15). This is less conservative and aligned with our memory
kills.

  • WebProcess/cocoa/WebProcessCocoa.mm:
11:08 AM Changeset in webkit [216019] by Chris Dumez
  • 31 edits in trunk/Source

Remove some usage of PassRefPtr in editing code
https://bugs.webkit.org/show_bug.cgi?id=171490

Reviewed by Darin Adler.

Source/WebCore:

Remove some usage of PassRefPtr in editing code.

  • dom/DocumentMarkerController.cpp:

(WebCore::DocumentMarkerController::markersInRange):
(DocumentMarkerController::hasMarkers):
(DocumentMarkerController::clearDescriptionOnMarkersIntersectingRange):

  • dom/DocumentMarkerController.h:
  • editing/AlternativeTextController.cpp:

(WebCore::AlternativeTextController::isSpellingMarkerAllowed):
(WebCore::AlternativeTextController::show):
(WebCore::AlternativeTextController::applyAlternativeTextToRange):
(WebCore::AlternativeTextController::timerFired):
(WebCore::AlternativeTextController::handleAlternativeTextUIResult):
(WebCore::AlternativeTextController::recordAutocorrectionResponse):
(WebCore::AlternativeTextController::markReversed):
(WebCore::AlternativeTextController::markCorrection):
(WebCore::AlternativeTextController::recordSpellcheckerResponseForModifiedCorrection):
(WebCore::AlternativeTextController::processMarkersOnTextToBeReplacedByResult):
(WebCore::AlternativeTextController::applyDictationAlternative):

  • editing/AlternativeTextController.h:

(WebCore::AlternativeTextController::UNLESS_ENABLED):

  • editing/ApplyStyleCommand.cpp:

(WebCore::createFontElement):
(WebCore::createStyleSpanElement):
(WebCore::ApplyStyleCommand::ApplyStyleCommand):
(WebCore::copyStyleOrCreateEmpty):
(WebCore::ApplyStyleCommand::applyRelativeFontStyleChange):
(WebCore::ApplyStyleCommand::applyInlineStyleToNodeRange):
(WebCore::ApplyStyleCommand::removeConflictingInlineStyleFromRun):
(WebCore::ApplyStyleCommand::removeInlineStyleFromElement):
(WebCore::ApplyStyleCommand::highestAncestorWithConflictingInlineStyle):
(WebCore::ApplyStyleCommand::applyInlineStyleToPushDown):
(WebCore::ApplyStyleCommand::pushDownInlineStyleAroundNode):
(WebCore::ApplyStyleCommand::removeInlineStyle):
(WebCore::ApplyStyleCommand::shouldSplitTextElement):
(WebCore::ApplyStyleCommand::surroundNodeRangeWithElement):
(WebCore::ApplyStyleCommand::addInlineStyleIfNeeded):
(WebCore::ApplyStyleCommand::positionToComputeInlineStyleChange):
(WebCore::ApplyStyleCommand::applyInlineStyleChange):

  • editing/ApplyStyleCommand.h:

(WebCore::ApplyStyleCommand::create):
(WebCore::ApplyStyleCommand::shouldRemoveInlineStyleFromElement):

  • editing/CompositeEditCommand.cpp:

(WebCore::CompositeEditCommand::applyCommandToComposite):
(WebCore::CompositeEditCommand::applyStyledElement):
(WebCore::CompositeEditCommand::removeStyledElement):
(WebCore::CompositeEditCommand::replaceElementWithSpanPreservingChildrenAndAttributes):
(WebCore::CompositeEditCommand::inputText):
(WebCore::CompositeEditCommand::replaceTextInNodePreservingMarkers):
(WebCore::CompositeEditCommand::pushAnchorElementDown):

  • editing/CompositeEditCommand.h:
  • editing/DeleteSelectionCommand.cpp:

(WebCore::DeleteSelectionCommand::originalStringForAutocorrectionAtBeginningOfSelection):

  • editing/DictationCommand.cpp:

(WebCore::DictationCommand::insertTextRunWithoutNewlines):

  • editing/EditingStyle.cpp:

(WebCore::copyEditingProperties):
(WebCore::copyPropertiesFromComputedStyle):
(WebCore::extractPropertyValue):
(WebCore::HTMLAttributeEquivalent::attributeValueAsCSSValue):
(WebCore::HTMLFontSizeEquivalent::attributeValueAsCSSValue):
(WebCore::EditingStyle::setStyle):
(WebCore::EditingStyle::copy):
(WebCore::EditingStyle::extractAndRemoveBlockProperties):
(WebCore::EditingStyle::extractAndRemoveTextDirection):
(WebCore::EditingStyle::mergeInlineStyleOfElement):
(WebCore::extractEditingProperties):
(WebCore::EditingStyle::styleAtSelectionStart):
(WebCore::getPropertiesNotIn):

  • editing/EditingStyle.h:
  • editing/Editor.cpp:

(WebCore::Editor::handleTextEvent):
(WebCore::Editor::replaceSelectionWithFragment):
(WebCore::Editor::insertOrderedList):
(WebCore::Editor::insertUnorderedList):
(WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges):
(WebCore::correctSpellcheckingPreservingTextCheckingParagraph):
(WebCore::Editor::markAndReplaceFor):
(WebCore::Editor::changeBackToReplacedString):
(WebCore::Editor::updateMarkersForWordsAffectedByEditing):
(WebCore::Editor::rangeForPoint):

  • editing/Editor.h:
  • editing/ModifySelectionListLevel.cpp:

(WebCore::IncreaseSelectionListLevelCommand::increaseSelectionListLevel):
(WebCore::IncreaseSelectionListLevelCommand::increaseSelectionListLevelOrdered):
(WebCore::IncreaseSelectionListLevelCommand::increaseSelectionListLevelUnordered):

  • editing/ModifySelectionListLevel.h:
  • editing/SpellChecker.cpp:

(WebCore::SpellChecker::requestCheckingFor):
(WebCore::SpellChecker::didCheckSucceed):

  • editing/SpellChecker.h:

(WebCore::SpellCheckRequest::checkingRange):
(WebCore::SpellCheckRequest::paragraphRange):
(WebCore::SpellCheckRequest::rootEditableElement):

  • editing/SpellingCorrectionCommand.cpp:

(WebCore::SpellingCorrectionCommand::SpellingCorrectionCommand):
(WebCore::SpellingCorrectionCommand::willApplyCommand):
(WebCore::SpellingCorrectionCommand::doApply):
(WebCore::SpellingCorrectionCommand::targetRanges):

  • editing/SpellingCorrectionCommand.h:

(WebCore::SpellingCorrectionCommand::create):

  • editing/SurroundingText.h:
  • editing/TextCheckingHelper.cpp:

(WebCore::TextCheckingParagraph::expandRangeToNextEnd):
(WebCore::TextCheckingParagraph::rangeLength):
(WebCore::TextCheckingParagraph::paragraphRange):
(WebCore::TextCheckingParagraph::subrange):
(WebCore::TextCheckingParagraph::offsetTo):
(WebCore::TextCheckingParagraph::offsetAsRange):
(WebCore::TextCheckingParagraph::text):
(WebCore::TextCheckingParagraph::checkingStart):

  • editing/TextCheckingHelper.h:
  • editing/TypingCommand.cpp:

(WebCore::TypingCommand::insertTextRunWithoutNewlines):

  • editing/cocoa/HTMLConverter.mm:

(HTMLConverterCaches::computedStylePropertyForElement):
(HTMLConverterCaches::inlineStylePropertyForElement):

  • page/ios/FrameIOS.mm:

(WebCore::Frame::interpretationsForCurrentRoot):

Source/WebKit/ios:

  • WebCoreSupport/WebFrameIOS.mm:

(-[WebFrame previousUnperturbedDictationResultBoundaryFromPosition:]):
(-[WebFrame nextUnperturbedDictationResultBoundaryFromPosition:]):

Source/WebKit/mac:

  • WebView/WebFrame.mm:

(-[WebFrame dictationResultMetadataForRange:]):
(-[WebFrame _replaceSelectionWithFragment:selectReplacement:smartReplace:matchStyle:]):

10:36 AM Changeset in webkit [216018] by Beth Dakin
  • 8 edits in trunk

On-screen panel for candidate bar is in the wrong place when the caret is at the
start of a paragraph
https://bugs.webkit.org/show_bug.cgi?id=171453
-and corresponding-
rdar://problem/29779764

Reviewed by Tim Horton.

Source/WebKit/mac:

This bug only happens when the caret is at the beginning of the paragraph, and it
is because Range::absoluteTextQuads() returns no quads in this case. I think it
might be correct that absoluteTextQuads() returns no quads in this case, so this
patch fixes the bug at the call site by using absoluteCaretBounds() in this case.

  • WebCoreSupport/WebEditorClient.mm:

(WebEditorClient::handleRequestedCandidates):

Source/WebKit2:

This bug only happens when the caret is at the beginning of the paragraph, and it
is because Range::absoluteTextQuads() returns no quads in this case. I think it
might be correct that absoluteTextQuads() returns no quads in this case, so this
patch fixes the bug at the call site by using absoluteCaretBounds() in this case.

SPI for testing.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _candidateRect]):

  • UIProcess/API/Cocoa/WKWebViewPrivate.h:

Bug fix.

  • WebProcess/WebPage/mac/WebPageMac.mm:

(WebKit::WebPage::platformEditorState):

Tools:

This test hard-codes the y-coordinate for the expected candidateRect.

  • TestWebKitAPI/Tests/WebKit2Cocoa/WKWebViewCandidateTests.mm:

(TEST):

10:06 AM Changeset in webkit [216017] by ddkilzer@apple.com
  • 3 edits in trunk/Tools

check-webkit-style: Enable sprintf(), strcat(), strcpy() and printf() format checks
<https://webkit.org/b/171494>

Reviewed by Brent Fulgham.

  • Scripts/webkitpy/style/checkers/cpp.py:

(check_language): Change categories for certain checkers from
'runtime/printf' to 'security/printf' so they are no longer
filtered.
(CppChecker.categories): Add 'security/printf'.

  • Scripts/webkitpy/style/checkers/cpp_unittest.py:

(CppStyleTest.test_insecure_string_operations): Add new test for
sprintf(), strcat() and strcpy().
(CppStyleTest.test_format_strings): Update test results for new
'security/printf' category use.

10:06 AM Changeset in webkit [216016] by jer.noble@apple.com
  • 6 edits
    5 adds in trunk/Source/WebCore

Add notifications from CaptureDeviceManager (and subclasses) when device lists change
https://bugs.webkit.org/show_bug.cgi?id=171442

Reviewed by Youenn Fablet.

Add a new callback-based notification to CaptureDeviceManager which fires when the underlying list
of devices changes. Add support for enumerating AVAudioSession capture devices.

  • WebCore.xcodeproj/project.pbxproj:
  • platform/mediastream/CaptureDeviceManager.cpp:

(nextObserverToken):
(CaptureDeviceManager::addCaptureDeviceChangedObserver):
(CaptureDeviceManager::removeCaptureDeviceChangedObserver):

  • platform/mediastream/CaptureDeviceManager.h:
  • platform/mediastream/ios/AVAudioSessionCaptureDevice.h: Added.
  • platform/mediastream/ios/AVAudioSessionCaptureDevice.mm: Added.

(WebCore::AVAudioSessionCaptureDevice::create):
(WebCore::AVAudioSessionCaptureDevice::AVAudioSessionCaptureDevice):

  • platform/mediastream/ios/AVAudioSessionCaptureDeviceManager.h: Added.
  • platform/mediastream/ios/AVAudioSessionCaptureDeviceManager.mm: Added.

(-[WebAVAudioSessionAvailableInputsListener initWithCallback:]):
(-[WebAVAudioSessionAvailableInputsListener invalidate]):
(-[WebAVAudioSessionAvailableInputsListener observeValueForKeyPath:ofObject:change:context:]):
(WebCore::AVAudioSessionCaptureDeviceManager::singleton):
(WebCore::AVAudioSessionCaptureDeviceManager::captureDevices):
(WebCore::AVAudioSessionCaptureDeviceManager::audioSessionCaptureDevices):
(WebCore::AVAudioSessionCaptureDeviceManager::audioSessionDeviceWithUID):
(WebCore::AVAudioSessionCaptureDeviceManager::refreshAudioCaptureDevices):

  • platform/mediastream/mac/AVCaptureDeviceManager.mm:

(WebCore::AVCaptureDeviceManager::deviceConnected):
(WebCore::AVCaptureDeviceManager::deviceDisconnected):

  • platform/mediastream/mac/CoreAudioCaptureDeviceManager.cpp:

(WebCore::CoreAudioCaptureDeviceManager::refreshAudioCaptureDevices):
(WebCore::CoreAudioCaptureDeviceManager::devicesChanged):

9:58 AM Changeset in webkit [216015] by jdiggs@igalia.com
  • 4 edits in trunk

AX: [GTK] Add support to query for aria-current
https://bugs.webkit.org/show_bug.cgi?id=149016

Reviewed by Chris Fleizach.

Tools:

Implement support for "AXARIACurrent" string attribute value.

  • WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:

LayoutTests:

  • platform/gtk/TestExpectations: Unskip now-passing test.
9:11 AM Changeset in webkit [216014] by dbates@webkit.org
  • 2 edits in trunk/Source/WTF

Cleanup: Change ASCIICaseInsensitiveHash from a class to a struct
https://bugs.webkit.org/show_bug.cgi?id=171460

Reviewed by Sam Weinig.

All of the members of ASCIICaseInsensitiveHash have public visibility.
We are underutilizing the purpose of a class - defaults to private
visibility of members. We should change ASCIICaseInsensitiveHash from
a class to a struct, which by definition defaults to public visibility
for members.

  • wtf/text/StringHash.h:
6:10 AM Changeset in webkit [216013] by ddkilzer@apple.com
  • 2 edits in trunk/Tools

REGRESSION (r216000): test-webkitpy fails after adding new soft-linked class checker

Unreviewed.

Follow-up fix for:
[Cocoa] Have check-webkit-style advise against use of [get…Class() alloc]
https://bugs.webkit.org/show_bug.cgi?id=171486

  • Scripts/webkitpy/style/checkers/cpp.py:

(check_soft_link_class_alloc): Use (\w+) instead of ([\s]+) to
match and capture the function name. The latter also mistakenly
matches C-preprocessor directives.
(CppChecker.categories): Add 'runtime/soft-linked-alloc', which
is a requirement for the CppChecker class.

1:41 AM Changeset in webkit [216012] by Carlos Garcia Campos
  • 3 edits in trunk/LayoutTests

Unreviewed GTK+ gardening. Rebaseline giantRowspan tests after r215914.

  • platform/gtk/fast/table/giantRowspan-expected.txt:
  • platform/gtk/fast/table/giantRowspan2-expected.txt:
1:39 AM Changeset in webkit [216011] by Carlos Garcia Campos
  • 2 edits in trunk/LayoutTests

Unreviewed GTK+ gardening. Update expectations of several test.

  • platform/gtk/TestExpectations:
1:07 AM Changeset in webkit [216010] by Carlos Garcia Campos
  • 1 edit
    10 adds in trunk/LayoutTests

Unreviewed GTK+ gardening. Rebaseline several WPT fetch API tests.

  • platform/gtk/imported/w3c/web-platform-tests/fetch/api/basic/request-headers.any-expected.txt: Added.
  • platform/gtk/imported/w3c/web-platform-tests/fetch/api/basic/request-headers.any.worker-expected.txt: Added.
  • platform/gtk/imported/w3c/web-platform-tests/fetch/api/basic/scheme-about.any-expected.txt: Added.
  • platform/gtk/imported/w3c/web-platform-tests/fetch/api/cors/cors-basic.any-expected.txt: Added.
  • platform/gtk/imported/w3c/web-platform-tests/fetch/api/cors/cors-basic.any.worker-expected.txt: Added.
  • platform/gtk/imported/w3c/web-platform-tests/fetch/api/cors/cors-no-preflight.any-expected.txt: Added.
  • platform/gtk/imported/w3c/web-platform-tests/fetch/api/cors/cors-no-preflight.any.worker-expected.txt: Added.
  • platform/gtk/imported/w3c/web-platform-tests/fetch/api/cors/cors-origin.any-expected.txt: Added.
  • platform/gtk/imported/w3c/web-platform-tests/fetch/api/cors/cors-origin.any.worker-expected.txt: Added.
12:56 AM Changeset in webkit [216009] by jdiggs@igalia.com
  • 5 edits in trunk

AX: AccessibilityTable::ariaRowCount() and ariaColumnCount() should not return -1 unless that is the author-provided value
https://bugs.webkit.org/show_bug.cgi?id=171475

Reviewed by Chris Fleizach.

Source/WebCore:

If the author has provided a valid value, return it. Otherwise, return 0.

No new tests needed. Update existing test expectations to reflect the change.

  • accessibility/AccessibilityTable.cpp:

(WebCore::AccessibilityTable::ariaColumnCount):
(WebCore::AccessibilityTable::ariaRowCount):

LayoutTests:

  • accessibility/table-detection-expected.txt: Updated.
  • accessibility/table-with-rules-expected.txt: Updated.
12:53 AM Changeset in webkit [216008] by Carlos Garcia Campos
  • 2 edits in trunk/LayoutTests

Unreviewed GTK+ gardening. Update expectations of several test.

  • platform/gtk/TestExpectations:
12:49 AM Changeset in webkit [216007] by jdiggs@igalia.com
  • 19 edits in trunk

AX: Implement support for ARIA "figure" and "term" roles; update AXRoleDescription mapping for "feed" role
https://bugs.webkit.org/show_bug.cgi?id=171183

Reviewed by Chris Fleizach.

Source/WebCore:

Create FeedRole, FigureRole, and TermRole and map them on the Mac and Gtk
ports. Also rename AccessibilityObject::isFigure() to isFigureElement()
for clarity as this method is specific to the HTML element and not the role.

No new tests needed: We have existing tests that cover mappings. Add new test cases
to roles-exposed.html, xml-roles-exposed.html, and roles-computedRoleString.html.

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

(WebCore::AccessibilityNodeObject::captionForFigure):
(WebCore::AccessibilityNodeObject::alternativeText):

  • accessibility/AccessibilityObject.cpp:

(WebCore::initializeRoleMap):
(WebCore::AccessibilityObject::isFigureElement): Added.
(WebCore::AccessibilityObject::isFigure): Deleted.

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

(WebCore::AccessibilityRenderObject::exposesTitleUIElement):
(WebCore::AccessibilityRenderObject::titleUIElement):
(WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
(WebCore::AccessibilityRenderObject::determineAccessibilityRole):

  • accessibility/atk/WebKitAccessibleWrapperAtk.cpp:

(atkRole):

  • accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:

(-[WebAccessibilityObjectWrapper determineIsAccessibilityElement]):

  • accessibility/mac/WebAccessibilityObjectWrapperMac.mm:

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

  • platform/LocalizedStrings.cpp:

(WebCore::AXFeedText):

  • platform/LocalizedStrings.h:

LayoutTests:

New test cases added and expectations updated.

  • accessibility/gtk/xml-roles-exposed-expected.txt:
  • accessibility/gtk/xml-roles-exposed.html:
  • accessibility/roles-computedRoleString.html:
  • accessibility/roles-exposed.html:
  • platform/gtk/accessibility/roles-exposed-expected.txt:
  • platform/mac/accessibility/roles-computedRoleString-expected.txt:
  • platform/mac/accessibility/roles-exposed-expected.txt:
12:03 AM Changeset in webkit [216006] by Carlos Garcia Campos
  • 17 edits
    4 adds in trunk

[GTK] Add automation session API
https://bugs.webkit.org/show_bug.cgi?id=171428

Reviewed by Carlos Alberto Lopez Perez.

Source/WebCore/platform/gtk/po:

  • POTFILES.in: Add WebKitAutomationSession.cpp.

Source/WebKit2:

Add new API to allow WebKitGTK+ to be controlled by automation. By default it's disabled, applications have to
explicitly call webkit_web_context_set_automation_allowed() to enabled it. When a new automation session is
requested, the signal WebKitWebContext::automation-started is emitted with a newly created
WebKitAutomationSession, similar to how WebKitWebContext::download-started works. The user should connect to it
have access to the WebKitAutomationSession and connect it its signals. When a new web view is requested to be
created in a WebKitAutomationSession, the signal WebKitAutomationSession::create-web-view is emitted. The user
should connect to it and return a WebKitWebView. The web views used for automation are special ones and need to
be created with the new WebKitWebView:is-controlled-by-automation construct property enabled, otherwise we will
refuse to create the requested browsing context.

  • PlatformGTK.cmake:
  • UIProcess/API/gtk/WebKitAutomationSession.cpp: Added.

(webkitAutomationSessionSetProperty):
(webkitAutomationSessionConstructed):
(webkit_automation_session_class_init):
(webkitAutomationSessionCreate):
(webkitAutomationSessionGetSession):
(webkit_automation_session_get_id):

  • UIProcess/API/gtk/WebKitAutomationSession.h: Added.
  • UIProcess/API/gtk/WebKitAutomationSessionPrivate.h: Added.
  • UIProcess/API/gtk/WebKitWebContext.cpp:

(webkitWebContextConstructed):
(webkit_web_context_class_init):
(webkit_web_context_is_automation_allowed):
(webkit_web_context_set_automation_allowed):
(webkitWebContextCreatePageForWebView):

  • UIProcess/API/gtk/WebKitWebContext.h:
  • UIProcess/API/gtk/WebKitWebView.cpp:

(webkitWebViewConstructed):
(webkitWebViewSetProperty):
(webkitWebViewGetProperty):
(webkit_web_view_class_init):
(webkit_web_view_is_controlled_by_automation):

  • UIProcess/API/gtk/WebKitWebView.h:
  • UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt:
  • UIProcess/API/gtk/docs/webkit2gtk-4.0.types:
  • UIProcess/API/gtk/docs/webkit2gtk-docs.sgml:
  • UIProcess/API/gtk/webkit2.h:

Tools:

Add an automation mode to MiniBrowser using the new API and add a unit test too.

  • MiniBrowser/gtk/BrowserWindow.c:

(webViewTitleChanged):
(webViewDecidePolicy):
(newTabCallback):
(openPrivateWindow):
(browserWindowFinalize):
(browser_window_init):
(browser_window_get_or_create_web_view_for_automation):

  • MiniBrowser/gtk/BrowserWindow.h:
  • MiniBrowser/gtk/main.c:

(createBrowserTab):
(createWebViewForAutomationCallback):
(automationStartedCallback):
(main):

  • TestWebKitAPI/Tests/WebKit2Gtk/CMakeLists.txt:
  • TestWebKitAPI/Tests/WebKit2Gtk/TestAutomationSession.cpp: Added.

(testAutomationSessionRequestSession):
(beforeAll):
(afterAll):

12:02 AM Changeset in webkit [216005] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebKit2

Unreviewed. Fix GTK+ debug build after r216002.

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMClientRectList.cpp:

(WebKit::wrapClientRectList):

Apr 30, 2017:

10:02 PM Changeset in webkit [216004] by jmarcell@apple.com
  • 7 edits in trunk/Source

Versioning.

9:58 PM Changeset in webkit [216003] by jmarcell@apple.com
  • 1 copy in tags/Safari-604.1.20

Tag Safari-604.1.20.

5:44 PM Changeset in webkit [216002] by Chris Dumez
  • 18 edits
    6 deletes in trunk/Source

Drop support for legacy ClientRect / ClientRectList
https://bugs.webkit.org/show_bug.cgi?id=171418

Reviewed by Sam Weinig.

Source/WebCore:

Drop support for legacy ClientRect / ClientRectList types now we use
DOMRect everywhere.

  • CMakeLists.txt:
  • DerivedSources.cpp:
  • DerivedSources.make:
  • WebCore.xcodeproj/project.pbxproj:
  • dom/ClientRect.cpp: Removed.
  • dom/ClientRect.h: Removed.
  • dom/ClientRect.idl: Removed.
  • dom/ClientRectList.cpp: Removed.
  • dom/ClientRectList.h: Removed.
  • dom/ClientRectList.idl: Removed.
  • dom/DOMAllInOne.cpp:
  • dom/Element.cpp:
  • html/HTMLMediaElement.cpp:
  • html/track/VTTRegion.cpp:
  • page/DragController.cpp:

Source/WebInspectorUI:

Drop ClientRectList-related code.

  • UserInterface/Models/NativeFunctionParameters.js:

Source/WebKit2:

GTK build fix.

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMClientRect.cpp:

(WebKit::kit):
(WebKit::core):
(WebKit::wrapClientRect):
(webkit_dom_client_rect_constructed):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMClientRectList.cpp:

(ClientRectList::create):
(ClientRectList::items):
(ClientRectList::ClientRectList):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMClientRectListPrivate.h:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMClientRectPrivate.h:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMElement.cpp:

(webkit_dom_element_get_bounding_client_rect):
(webkit_dom_element_get_client_rects):

5:15 PM Changeset in webkit [216001] by Alan Bujtas
  • 5 edits
    2 adds in trunk

Initialize a new layout state while bailing out of simple line layout only when needed.
https://bugs.webkit.org/show_bug.cgi?id=171481
<rdar://problem/31906382>

Source/WebCore:

'-webkit-border-fit: lines' requires inline box tree.
We normally bail out of simple line layout early when we see this property.
When this property is dynamically set and we already have a simple line layout context,
RenderBlockFlow::ensureLineBoxes() takes care of the switch by calling layoutLineBoxes().
This patch makes sure that we create the layout state for this (forced)line layout only when
we don't yet have one.

Reviewed by Antti Koivisto.

Test: fast/multicol/simple-line-layout-switch-to-normal-layout-while-inside-layout.html

  • rendering/RenderBlockFlow.cpp:

(WebCore::PaginatedLayoutStateMaintainer::PaginatedLayoutStateMaintainer):
(WebCore::PaginatedLayoutStateMaintainer::~PaginatedLayoutStateMaintainer):
(WebCore::RenderBlockFlow::ensureLineBoxes):

  • rendering/RenderView.cpp:

(WebCore::RenderView::pushLayoutStateForPaginationIfNeeded):
(WebCore::RenderView::pushLayoutStateForPagination): Deleted.

  • rendering/RenderView.h:

LayoutTests:

Reviewed by Antti Koivisto.

  • fast/multicol/simple-line-layout-switch-to-normal-layout-while-inside-layout-expected.txt: Added.
  • fast/multicol/simple-line-layout-switch-to-normal-layout-while-inside-layout.html: Added.
4:39 PM Changeset in webkit [216000] by mitz@apple.com
  • 2 edits in trunk/Tools

[Cocoa] Have check-webkit-style advise against use of [get…Class() alloc]
https://bugs.webkit.org/show_bug.cgi?id=171486

Reviewed by Sam Weinig.

  • Scripts/webkitpy/style/checkers/cpp.py:

(check_soft_link_class_alloc): Added. Looks for [get…Class() alloc] and suggests

alloc…Instance() instead.

(check_style): Invoke new check.

2:24 PM Changeset in webkit [215999] by jmarcell@apple.com
  • 2 edits in tags/Safari-604.1.19.1/Source/WebCore

Cherry-pick r215990. rdar://problem/31906525

2:23 PM Changeset in webkit [215998] by jmarcell@apple.com
  • 7 edits in tags/Safari-604.1.19.1/Source

Versioning.

2:19 PM Changeset in webkit [215997] by beidson@apple.com
  • 4 edits in trunk

More fixing after r215991
https://bugs.webkit.org/show_bug.cgi?id=171483

Source/WebKit2:

  • NetworkProcess/cocoa/NetworkProcessCocoa.mm:

(WebKit::NetworkProcess::syncAllCookies):

Tools:

  • TestWebKitAPI/Tests/WebKit2Cocoa/WebsiteDataStoreCustomPaths.mm:

(TEST):

2:14 PM Changeset in webkit [215996] by jmarcell@apple.com
  • 1 copy in tags/Safari-604.1.19.1

New tag.

2:04 PM Changeset in webkit [215995] by mitz@apple.com
  • 2 edits in trunk/Source/WebCore

Tried to fix the iOS build after r215992

  • platform/ios/WebVideoFullscreenControllerAVKit.mm:
1:55 PM Changeset in webkit [215994] by beidson@apple.com
  • 4 edits in trunk/Source

Fix r215991
https://bugs.webkit.org/show_bug.cgi?id=171483

Unreviewed.

Source/WebCore:

  • platform/spi/cf/CFNetworkSPI.h:

Source/WebKit2:

  • NetworkProcess/cocoa/NetworkProcessCocoa.mm:

(WebKit::NetworkProcess::syncAllCookies):

1:53 PM Changeset in webkit [215993] by mitz@apple.com
  • 2 edits in trunk/Source/WebCore

Tried to fix the iOS build after r215992

  • platform/ios/WebVideoFullscreenInterfaceAVKit.mm:

(WebAVPlayerLayerView_pictureInPicturePlayerLayerView):
(WebVideoFullscreenInterfaceAVKit::setupFullscreen):

1:47 PM Changeset in webkit [215992] by mitz@apple.com
  • 13 edits in trunk/Source

[Cocoa] Replaces uses of [get…() alloc] with alloc…Instance()
https://bugs.webkit.org/show_bug.cgi?id=171485

Reviewed by Geoffrey Garen.

Source/WebCore:

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

(WebCore::CDMSessionAVContentKeySession::contentKeySession):

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

(WebCore::MediaPlaybackTargetPickerMac::devicePicker):

  • platform/ios/ValidationBubbleIOS.mm:

(-[WebValidationBubbleTapRecognizer initWithPopoverController:]):
(WebCore::ValidationBubble::ValidationBubble):

  • platform/ios/WebVideoFullscreenControllerAVKit.mm:

(WebVideoFullscreenControllerContext::setUpFullscreen):

  • platform/ios/WebVideoFullscreenInterfaceAVKit.mm:

(WebAVPlayerLayerView_pictureInPicturePlayerLayerView):
(WebVideoFullscreenInterfaceAVKit::setupFullscreen):

  • platform/mac/WebVideoFullscreenInterfaceMac.mm:

(-[WebVideoFullscreenInterfaceMacObjC setUpPIPForVideoView:withFrame:inWindow:]):

  • platform/network/ios/PreviewConverter.mm:

(WebCore::PreviewConverter::PreviewConverter):

  • rendering/RenderThemeIOS.mm:

(WebCore::iconForAttachment):

Source/WebKit/mac:

  • WebView/WebView.mm:

(-[WebUITextIndicatorData initWithImage:textIndicatorData:scale:]):
(-[WebUITextIndicatorData initWithImage:scale:]):

Source/WebKit2:

  • Platform/mac/MenuUtilities.mm:

(WebKit::menuItemForTelephoneNumber):
(WebKit::menuForTelephoneNumber):

1:24 PM Changeset in webkit [215991] by beidson@apple.com
  • 23 edits in trunk

Updates to _WKWebsiteDataStoreConfiguration cookie storage location SPI.
<rdar://problem/31906397> and https://bugs.webkit.org/show_bug.cgi?id=171483

Reviewed by Geoff Garen (and kind of Andy Estes).
Source/WebCore:

No new tests (Covered by API test).

  • platform/spi/cf/CFNetworkSPI.h:

Source/WebKit2:

Updates include:
-Taking a file path as the config argument instead of a directory.
-Proper sandbox extension handling.
-Proper and thorough API test.

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::syncAllCookies):

  • NetworkProcess/NetworkProcess.h:
  • NetworkProcess/NetworkProcess.messages.in:
  • NetworkProcess/cocoa/NetworkProcessCocoa.mm:

(WebKit::NetworkProcess::syncAllCookies):

  • NetworkProcess/mac/RemoteNetworkingContext.mm:

(WebKit::RemoteNetworkingContext::ensureWebsiteDataStoreSession):

  • Shared/WebsiteDataStoreParameters.cpp:

(WebKit::WebsiteDataStoreParameters::encode):
(WebKit::WebsiteDataStoreParameters::decode):

  • Shared/WebsiteDataStoreParameters.h:
  • UIProcess/API/Cocoa/WKProcessPool.mm:

(-[WKProcessPool _syncNetworkProcessCookies]):

  • UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
  • UIProcess/API/Cocoa/WKWebsiteDataStore.mm:

(-[WKWebsiteDataStore _initWithConfiguration:]):

  • UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.h:
  • UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.mm:

(-[_WKWebsiteDataStoreConfiguration _cookieStoragePath]):
(-[_WKWebsiteDataStoreConfiguration _setCookieStoragePath:]):
(-[_WKWebsiteDataStoreConfiguration _cookieStorageDirectory]): Deleted.
(-[_WKWebsiteDataStoreConfiguration _setCookieStorageDirectory:]): Deleted.

  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::syncNetworkProcessCookies):

  • UIProcess/WebProcessPool.h:
  • UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:

(WebKit::WebsiteDataStore::parameters):

  • UIProcess/WebsiteData/WebsiteDataStore.cpp:

(WebKit::WebsiteDataStore::resolveDirectoriesIfNecessary):

  • UIProcess/WebsiteData/WebsiteDataStore.h:

(WebKit::WebsiteDataStore::resolvedCookieStoragePath):
(WebKit::WebsiteDataStore::resolvedCookieStorageDirectory): Deleted.

Tools:

  • TestWebKitAPI/Tests/WebKit2Cocoa/WebsiteDataStoreCustomPaths.mm:

(TEST):

12:52 PM Changeset in webkit [215990] by mitz@apple.com
  • 2 edits in trunk/Source/WebCore

<rdar://problem/31906525> WebCore-7604.1.19 has failed to build

  • platform/ios/WebItemProviderPasteboard.mm:

(-[WebItemProviderPasteboard setItemsUsingRegistrationInfoLists:]): Resolved type ambiguity

by using allocUIItemProviderInstance() instead of [getUIItemProviderClass() alloc].

11:12 AM Changeset in webkit [215989] by jdiggs@igalia.com
  • 8 edits
    2 adds in trunk

[ATK] Implement support for aria-autocomplete
https://bugs.webkit.org/show_bug.cgi?id=171167

Reviewed by Chris Fleizach.

Source/WebCore:

Expose ATK_STATE_SUPPORTS_AUTOCOMPLETION in the state set, and the value
of aria-autocomplete as an object attribute, for elements which indicate
they support autocompletion.

Test: accessibility/gtk/aria-autocomplete.html

  • accessibility/AccessibilityObject.cpp:

(WebCore::AccessibilityObject::supportsARIAAutoComplete):
(WebCore::AccessibilityObject::ariaAutoCompleteValue):

  • accessibility/AccessibilityObject.h:
  • accessibility/atk/WebKitAccessibleWrapperAtk.cpp:

(webkitAccessibleGetAttributes):
(setAtkStateSetFromCoreObject):

  • html/HTMLAttributeNames.in:

Tools:

Add "AXSupportsAutoCompletion" attribute so the presence of
ATK_STATE_SUPPORTS_AUTOCOMPLETION can be tested.

  • WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:

(WTR::AccessibilityUIElement::boolAttributeValue):

LayoutTests:

  • accessibility/gtk/aria-autocomplete-expected.txt: Added.
  • accessibility/gtk/aria-autocomplete.html: Added.
11:11 AM Changeset in webkit [215988] by jdiggs@igalia.com
  • 14 edits
    2 adds in trunk

[ATK] ARIA treegrid role should be exposed as ATK_ROLE_TREE_TABLE; not ATK_ROLE_TABLE
https://bugs.webkit.org/show_bug.cgi?id=171170

Reviewed by Chris Fleizach.

Source/WebCore:

AccessibilityTable::roleValue() was returning GridRole for both grid and treegrid.
Change this so that GridRole is returned for grid and TreeGridRole is returned for
treegrid. Add TreeGridRole to, or call isTable() in, methods where the behavior
should be the same as GridRole.

Test: accessibility/gtk/interface-table.html

  • accessibility/AccessibilityRenderObject.cpp:

(WebCore::AccessibilityRenderObject::selectedChildren):

  • accessibility/AccessibilityTable.cpp:

(WebCore::AccessibilityTable::roleValue):

  • accessibility/atk/WebKitAccessibleWrapperAtk.cpp:

(atkRole):
(getInterfaceMaskFromObject):

  • accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:

(-[WebAccessibilityObjectWrapper _accessibilityTableAncestor]):
(-[WebAccessibilityObjectWrapper _accessibilityTraitsFromAncestors]):

  • accessibility/mac/WebAccessibilityObjectWrapperMac.mm:

(createAccessibilityRoleMap):

Tools:

Add "AXInterfaceTable" attribute to test which elements implement AtkTable.

  • WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:

(WTR::AccessibilityUIElement::boolAttributeValue):

LayoutTests:

Add interface-table.html to verify that all roles which have tabular functionality
implement AtkTable. Update other tests to reflect that the ARIA treegrid role maps
to our internal TreeGridRole AccessibilityRole.

  • accessibility/gtk/interface-table-cell-expected.txt: Updated.
  • accessibility/gtk/interface-table-expected.txt: Added.
  • accessibility/gtk/interface-table.html: Added.
  • accessibility/roles-computedRoleString.html: Updated.
  • platform/gtk/accessibility/aria-selected-expected.txt: Updated.
  • platform/gtk/accessibility/roles-exposed-expected.txt: Updated.
  • platform/mac/accessibility/roles-computedRoleString-expected.txt: Updated.
11:11 AM Changeset in webkit [215987] by rniwa@webkit.org
  • 28 edits in trunk/Websites/perf.webkit.org

Add the support for scheduling a A/B testing with a patch.
https://bugs.webkit.org/show_bug.cgi?id=171209

Reviewed by Chris Dumez.

Added the support for creating a custom test group with a patch applied.

First, each repository in a repository group has a boolean indicating whether a given repository can have
a patch applied or not. When any configuration in a test group contains a patch, we create build requests
without a test specified in order to "build" those patches. These build requests have negative order numbers
to differentiate them from regular build requests. We can't simply build ones with patches since there could
be differences in SDK, build options, etc... when patches are applied.

The JSON format for commit sets returned by /api/build-requests have been changed from using an array of
commit IDs to an array of dictionaries indicate commit and acceptsPatch boolean. /api/update-triggerable now
uses a dictionary with two keys: repository and acceptsPatch to specify a set of repositories associated with
a repository group, and /privileged-api-create-test-group uses a dictionary with two keys: revision and patch
instead of a revision string to specify commit sets.

Furthermore, the syncing script's configuration have been updated to use a dictionary of repository names to
an options dictionary instead of an array of repositories names. For now, the only supported option is
acceptsPatch but will be extended when we add the support for rolling back system components.
e.g. {"WebKit": {acceptsPatch: true}, "macOS": {}} instead of ["WebKit", "macOS"]

On the UI side, InstantFileUploader has been changed to accept only one file by default, and added a new method
allowMultipleFiles() to allow multiple files to be selected for custom roots. Also replaced the input element
with type=file by a button with a custom label to show labels such as "Apply a patch" or "Add a new root"
instead of the generic label like "choose a file".

  • init-database.sql: Added trigrepo_accepts_patch to triggerable_repositories to indicate whether a given

repository can have a patch applied or not. Made request_test optional in build_requests for when a build
request is created to build patches. Such a build request have a negative request_order. Updated the related
constraints accordingly.

  • public/admin/triggerables.php: Added the support for updating whether a given repository can have a patch

applied in each repository group. Only show the repositories in the repository group for this purpose since
there is no way to accept a patch on a repository without it being a part of the group.
(generate_repository_form): Now takes the markup for checkboxes instead of generating one itself.
(generate_repository_checkboxes): Now takes an array of repositories to generate checkboxes. The checkbox is
shown when the repository ID exists as a key in this array, and is checked when its value is true. The new
capability to skip repositories not in the array is used to hide repositories not associated with the group
in the list of checkboxes to indicate a repository accepts a patch.

  • public/api/update-triggerable.php:

(main): Now updates the description and acceptsRoots states of each repository group, and sets acceptsPatch
boolean for each repository in the group if set in the update.
(validate_repository_groups): Use a reference to $repository_groups in order to set repository_id_list, which
contains an array of repository IDs to find the existing repository group that matches the set via
RepositoryGroupFinder's find_by_repositories. Also added a various validations for acceptsRoots, a dictionary
specifying repository and acceptsPatch.

  • public/include/build-requests-fetcher.php:

(BuildRequestsFetcher::fetch_commits_for_set_if_needed): Instead of returning an array of commit IDs as
"commits", it now returns an array of dictionaries with "commit" and "patch" keys specifying the commit ID
and the patch file's ID respectively as "revisionItems".
(BuildRequestsFetcher::add_uploaded_file): Added. Extracted from fetch_commits_for_set_if_needed. Used to
add either a patch file or a custom root file in the list of uploaded files in the result.

  • public/include/manifest-generator.php:

(fetch_triggerables): Each element in repository group's "repositories" field is now an array of dictionaries
with "repository" and "acceptsPatch" as keys.

  • public/include/repository-group-finder.php:

(RepositoryGroupFinder::construct): Added a map for boolean indicating whether a given repository group
allows a patch on a repository. Used in /privileged-api/create-test-group.
(RepositoryGroupFinder::accepts_patch): Added.
(RepositoryGroupFinder::populate_map): Build up the map for acceptsPatch boolean per repository per group.

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

(main): Fixed a bug that we were not explicitly checking for a duplicate test group name (with a test). Create
build requests to "build" patches if there is any patch file specified.
(commit_sets_from_revision_sets): Updated to take a dictionary with "revision" and "patch" as keys to specify
a revision and a patch if any instead of just a revision string for each repository. Also validate that each
repository is allowed to have a patch once the repository group has been found for the set of repositories.
(ensure_commit_sets):

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

(CustomAnalysisTaskConfigurator): Added _patchUploaders as an instance variable, which is a dictionary of
configuration names to a map of InstantFileUploader's used to upload a patch. Also renamed _fileUploaders to
_customRootUploaders for clarity.
(CustomAnalysisTaskConfigurator.prototype.setCommitSets):
(CustomAnalysisTaskConfigurator.prototype.didConstructShadowTree.createRootUploader): Added.
(CustomAnalysisTaskConfigurator.prototype.didConstructShadowTree):
(CustomAnalysisTaskConfigurator.prototype._ensurePatchUploader): Added. Creates an instant file uploader for
patches. We only allow a single patch per repository.
(CustomAnalysisTaskConfigurator.prototype._computeCommitSet): Include a patch in the commit set as needed.
(CustomAnalysisTaskConfigurator.prototype._buildRevisionTable): Show the patch file uploader for repositories
which can have patches in the current repository group.
(CustomAnalysisTaskConfigurator.cssTemplate): Show borders between every rows instead of just between tbody's
now that each row can have a patch file uploader.

  • public/v3/components/instant-file-uploader.js:

(InstantFileUploader): Added _fileInput and _allowMultipleFiles as instance variables. We now show a button
in the UI instead of an input with type=file. _fileInput is a hidden input with type=file used inside a click
event of the button to let the user pick a file.
(InstantFileUploader.prototype.allowMultipleFiles): Added. Allows this instance to accept multiple files.
(InstantFileUploader.prototype.didConstructShadowTree): Synthetically click on the hidden input element when
the newly added button element is clicked to open the browser's file picker.
(InstantFileUploader.prototype.render): Hide the button to add a file if this instance can only select one file
and there is already some file being uploaded in this instance.
(InstantFileUploader.htmlTemplate): Replaced the input element with type=file with a button. Its label comes
from the default slot content.

  • public/v3/models/build-request.js:

(BuildRequest): Made the test optional.
(BuildRequest.prototype.isBuild): Returns true if this is a build request for building a patch.
(BuildRequest.prototype.isTest): Returns true if this is a build request for running tests.
(BuildRequest.constructBuildRequestsFromData): Create each commit log here instead of relying on CommitSet's
constructor to construct its commit logs. Also updated per the replacement of an array of commit IDs by
an array of dictionaries with commit and patch properties.

  • public/v3/models/commit-set.js:

(CommitSet): Made _repositoryToCommitMap a real Map object. Also added _repositoryToPatchMap. Also got rid of
the code to instantiate commit logs since that's now done in BuildRequest.constructBuildRequestsFromData.
(CommitSet.prototype.commitForRepository):
(CommitSet.prototype.revisionForRepository):
(CommitSet.prototype.patchForRepository): Added.
(CommitSet.prototype.latestCommitTime): Modernized the code.
(CommitSet.prototype.equals): Modernized the code. Also added the check for patches.
(MeasurementCommitSet): Updated per the change to make _repositoryToCommitMap a real Map.
(CustomCommitSet.prototype.setRevisionForRepository):
(CustomCommitSet.prototype.equals): Added the check for patches.
(CustomCommitSet.prototype.revisionForRepository):
(CustomCommitSet.prototype.patchForRepository): Added.

  • public/v3/models/manifest.js:

(Manifest._didFetchManifest): Updated per the replacement of an array of commit IDs by an array of dictionaries
with commit and patch properties.

  • public/v3/models/repository.js:

(Repository.prototype.ownerId): Renamed from owner for clarity.

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

(TestGroup): Modernized the code by using LazilyEvaluatedFunction. Removed _requestsAreInOrder since it's not
necessary anymore with LazilyEvaluatedFunction.
(TestGroup.prototype.addBuildRequest):
(TestGroup.prototype.test): Use the last build request's test since the first few requests could be requests to
build patches.
(TestGroup.prototype.platform): Ditto.
(TestGroup.prototype._lastRequest): Added.
(TestGroup.prototype._orderedBuildRequests): Added.
(TestGroup.prototype.repetitionCount): Only count the build requests for testing (skipping any requests to
build patches).
(TestGroup.prototype.requestedCommitSets): Simply call _computeRequestedCommitSetsLazily.
(TestGroup.prototype._computeRequestedCommitSets): Extracted from requestedCommitSets.
(TestGroup.prototype.requestsForCommitSet):
(TestGroup.prototype.labelForCommitSet): Rewritten. Just compute the label here instead of relying on
_commitSetToLabel since requestedSets is always of the length two at the moment.
(TestGroup._revisionSetsFromCommitSets): Specify both the revision and the patch in the revision set.

  • public/v3/models/triggerable.js:

(TriggerableRepositoryGroup): Added _patchAcceptingSet as an instance variable. Use
sortByNamePreferringOnesWithURL to sort repositories instead of simple sortByName.
(TriggerableRepositoryGroup.prototype.accepts): Added checks for the custom roots and patches.
(TriggerableRepositoryGroup.prototype.acceptsPatchForRepository): Added.

  • server-tests/api-build-requests-tests.js: Updated the test cases per the replacement of an array of commit

IDs by an array of dictionaries with commit and patch properties.

  • server-tests/api-manifest-tests.js: Updated the test case per the name of Repository's owner to ownerId.
  • server-tests/api-update-triggerable.js: Updated the test case per the name of Repository's owner to ownerId,

and added a test case for updating whether a given repository group allows custom roots as well as patches
on repositories via /api/update-triggerable.
(.updateWithOSXRepositoryGroup): Updated the sample syncing script configuration per the format change.
(.refetchManifest): Added.

  • server-tests/privileged-api-create-test-group-tests.js: Updated per the syncing script configuration format

change. Also added a test for creating a test group with a duplicate name, which is expected to fail with
DuplicateTestGroupName, and creating a test group with a patch both when it's allowed and when it's not allowed
in the matching repository group.
(.addTriggerableAndCreateTask): Updated per the format change.

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

(MockData.addEmptyTriggerable): Added a metric and its configuration to make it appear in the manifest file.
The new test case in api-update-triggerable.js requires this.
(MockData.mockTestSyncConfigWithSingleBuilder): Updated per the syncing script configuration format change.
(MockData.mockTestSyncConfigWithTwoBuilders): Ditto.

  • server-tests/tools-buildbot-triggerable-tests.js: Removed the useless assertions about test configurations,

and added assertions about custom roots and patches in the test case for updateTriggerables.

  • tools/js/buildbot-syncer.js:

(BuildbotSyncer._parseRepositoryGroup): Made each assertion explicitly refer to the specific repository group
to make it more user friendly. Now each repository group uses a dictionary of repository names to its options
in the syncing script configurations. When parsed, we insert it as an array of dictionaries with repository ID
and acceptsPatch boolean specified separately since this is the format /api/update-triggerable expects.

  • tools/js/buildbot-triggerable.js:

(BuildbotTriggerable.prototype.updateTriggerable):

  • unit-tests/build-request-tests.js:

(sampleBuildRequestData): Updated per the commit sets format change in /api/build-requests.

  • unit-tests/buildbot-syncer-tests.js: Updated the existing tests per various format changes and added a couple

of new test cases for the syncing script's configuration validation.
(sampleiOSConfig):
(smallConfiguration):
(createSampleBuildRequest):

  • unit-tests/resources/mock-v3-models.js:

(MockModels.inject): Updated per the repository group format change.

  • unit-tests/test-groups-tests.js:

(sampleTestGroup): Updated per the commit sets format change in /api/build-requests.

7:51 AM Changeset in webkit [215986] by gskachkov@gmail.com
  • 5 edits
    1 add in trunk

Initialize functions too early in an eval
https://bugs.webkit.org/show_bug.cgi?id=161099

Reviewed by Saam Barati.

JSTests:

  • stress/eval-func-decl-with-let-const-class.js: Added.

Source/JavaScriptCore:

Current patch allow to fix problem with scope in function that is
declared within eval. Before scope was set inside Interpretator.cpp and it
was scope where eval is executed, but in this case function would not
see let/const variables and classes declated in eval.
This patch devide declaration and binding in two operation, first just declare
variable with function name, and second bind variable to function with correct
scope

  • bytecompiler/BytecodeGenerator.cpp:

(JSC::BytecodeGenerator::generate):
(JSC::BytecodeGenerator::BytecodeGenerator):

  • bytecompiler/BytecodeGenerator.h:
  • interpreter/Interpreter.cpp:

(JSC::Interpreter::execute):

2:56 AM Changeset in webkit [215985] by jdiggs@igalia.com
  • 6 edits
    2 adds in trunk

[ATK] Emit object:state-changed:busy event when aria-busy value changes
https://bugs.webkit.org/show_bug.cgi?id=171181

Reviewed by Chris Fleizach.

Source/WebCore:

Emit object:state-changed:busy for AXElementBusyChanged notifications.

Test: accessibility/gtk/aria-busy-changed-notification.html

  • accessibility/atk/AXObjectCacheAtk.cpp:

(WebCore::AXObjectCache::postPlatformNotification):

Tools:

Add handler for AXElementBusyChanged notifications.

  • WebKitTestRunner/InjectedBundle/atk/AccessibilityNotificationHandlerAtk.cpp:

LayoutTests:

New test. Also update the expectations for menu-list-unfocused-notifications.html
because the addition of the handler for AXElementBusyChanged results in that
notification being output in the test results.

  • accessibility/gtk/aria-busy-changed-notification-expected.txt: Added.
  • accessibility/gtk/aria-busy-changed-notification.html: Added.
  • accessibility/gtk/menu-list-unfocused-notifications-expected.txt: Updated.
1:06 AM Changeset in webkit [215984] 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:21 AM Changeset in webkit [215983] by beidson@apple.com
  • 4 edits in trunk/Source/WebKit2

Regression (r215941) Unexpected logging causes perf tests to fail.
<rdar://problem/31907269> and https://bugs.webkit.org/show_bug.cgi?id=171482

Reviewed by Alexey Proskuryakov.

  • Shared/mac/SandboxExtensionMac.mm:

(WebKit::resolveAndCreateReadWriteDirectoryForSandboxExtension):

  • UIProcess/Cocoa/WebProcessPoolCocoa.mm:

(WebKit::WebProcessPool::networkingCachesDirectory):
(WebKit::WebProcessPool::webContentCachesDirectory):

  • UIProcess/WebsiteData/WebsiteDataStore.cpp:

(WebKit::WebsiteDataStore::resolveDirectoriesIfNecessary): Only resolve the cookie storage directory

if a custom one has been set.

Apr 29, 2017:

10:02 PM Changeset in webkit [215982] by aakash_jain@apple.com
  • 8 edits in trunk/Tools

Use PEP8 style guide for raising exceptions in webkitpy.
https://bugs.webkit.org/show_bug.cgi?id=171439

Reviewed by Daniel Bates.

As per https://www.python.org/dev/peps/pep-0008/
"When raising an exception in Python 2, use raise ValueError('message')
instead of the older form raise ValueError, 'message'"

  • Scripts/webkitpy/common/net/irc/ircbot.py: Using new style for raising exceptions.
  • Scripts/webkitpy/common/thread/messagepump.py: Same.
  • Scripts/webkitpy/tool/bot/queueengine.py: Same.
  • Scripts/webkitpy/tool/commands/queues.py: Same.
  • Scripts/webkitpy/tool/commands/stepsequence.py: Same.
  • Scripts/webkitpy/tool/multicommandtool.py: Same.
  • Scripts/webkitpy/tool/steps/abstractstep.py: Same.
8:32 PM Changeset in webkit [215981] by commit-queue@webkit.org
  • 9 edits
    3 adds in trunk

Zero out PerformanceResourceTiming properties for cached cross-origin responses without Timing-Allow-Origin
https://bugs.webkit.org/show_bug.cgi?id=171394

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2017-04-29
Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

WebKit doesn't create multiple PerformanceResourceTiming entries for
loads that use the same CachedResource. However for revalidation
requests, which may happen for cached entries, we will send new
network requests. These tests cover whether revalidation requests
include timing data or not.

  • web-platform-tests/resource-timing/resources/rt-revalidation-response.py: Added.
  • web-platform-tests/resource-timing/rt-cors-expected.txt:
  • web-platform-tests/resource-timing/rt-cors.js:
  • web-platform-tests/resource-timing/rt-cors.worker-expected.txt:
  • web-platform-tests/resource-timing/rt-revalidate-requests-expected.txt: Added.
  • web-platform-tests/resource-timing/rt-revalidate-requests.html: Added.

Source/WebCore:

  • loader/ResourceTiming.cpp:

(WebCore::ResourceTiming::fromCache):
(WebCore::ResourceTiming::ResourceTiming):

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

(WebCore::CachedResourceLoader::requestResource):
Include the timing-allow-origin check for cached responses.
Also, avoid including an extra entry for an ongoing cached resource
load, since when that load completes it should be reported.

8:30 PM Changeset in webkit [215980] by commit-queue@webkit.org
  • 6 edits in trunk/Source

Readd assertion removed accidentally in r215955
https://bugs.webkit.org/show_bug.cgi?id=171466

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

Source/WebCore:

Unreviewed.

  • platform/mediastream/mac/MockRealtimeVideoSourceMac.mm:

(WebCore::MockRealtimeVideoSourceMac::orientationChanged): Improved FIXME after review.

Source/WebKit2:

  • WebProcess/WebPage/WebBackForwardListProxy.cpp:

(WebKit::WebBackForwardListProxy::addItemFromUIProcess):

8:28 PM Changeset in webkit [215979] by aestes@apple.com
  • 7 edits in trunk/Source

[macOS] Picture-in-picture should be disabled in WebPlaybackControlsManager during external media playback
https://bugs.webkit.org/show_bug.cgi?id=171468
<rdar://problem/31900349>

Reviewed by Eric Carlson.

Source/WebCore:

  • platform/mac/WebPlaybackControlsManager.h: Declared canTogglePictureInPicture as a

readwrite property.

  • platform/mac/WebPlaybackControlsManager.mm: Synthesize canTogglePictureInPicture.

(-[WebPlaybackControlsManager canTogglePictureInPicture]): Deleted.

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

(WebCore::WebPlaybackSessionInterfaceMac::externalPlaybackChanged): Called
-[WebPlaybackControlsManager setCanTogglePictureInPicture:].

Source/WebKit2:

  • UIProcess/Cocoa/WebViewImpl.mm:

(WebKit::WebViewImpl::updateMediaTouchBar): Set canTogglePictureInPicture to YES by default
on WebPlaybackControlsManager.

8:06 PM Changeset in webkit [215978] by Simon Fraser
  • 2 edits in trunk/Source/WebCore

Fix tests broken by r215964.

Fix copy-paste error that caused the wrong paint phase to get passed to the fire writeLayerRenderers()
call, causing extra renderer dumping.

Also remove unused default arguments.

  • rendering/RenderTreeAsText.cpp:

(WebCore::writeLayerRenderers):
(WebCore::writeLayers):

2:25 PM Changeset in webkit [215977] by gskachkov@gmail.com
  • 5 edits in trunk

Deep nesting is leading to ReferenceError for hoisted function
https://bugs.webkit.org/show_bug.cgi?id=171456

Reviewed by Yusuke Suzuki.

Current patch fix error that appears during hoisting of the function
in block scope. Error happens only when exist some deep scope that lead
to increase scope stack, after which list of the hosted candidates do not
copied to updated scope stack.

Source/JavaScriptCore:

  • parser/Parser.h:

(JSC::Scope::Scope):

LayoutTests:

  • js/function-declaration-statement-expected.txt:
  • js/script-tests/function-declaration-statement.js:

(deepNesting.foo):
(deepNesting):
(deepNestingForFunctionDeclaration.foo):
(deepNestingForFunctionDeclaration):
(eval.deepNestingInEval.foo):
(eval.deepNestingInEval):
(eval.deepNestingForFunctionDeclarationInEval.foo):
(eval.deepNestingForFunctionDeclarationInEval):

2:16 PM Changeset in webkit [215976] by Alan Bujtas
  • 3 edits
    2 adds in trunk

iBooks text can overlap, sometimes columns are shifted splitting words.
https://bugs.webkit.org/show_bug.cgi?id=171472
<rdar://problem/31096037>

Reviewed by Antti Koivisto.

Source/WebCore:

Instead of just checking if the glyph is taller than the line, we need to ensure that both the
ascent and the descent have enough space (this is for -webkit-line-box-contain: glyph).

Test: fast/text/simple-line-layout-glyph-overflows-line.html

  • rendering/SimpleLineLayout.cpp:

(WebCore::SimpleLineLayout::canUseForText): compute the available space for the ascent/descent
and check them against the ceil-ed(see FontCascade::floatWidthForSimpleText) glyph min/max y.

LayoutTests:

  • fast/text/simple-line-layout-glyph-overflows-line-expected.html: Added.
  • fast/text/simple-line-layout-glyph-overflows-line.html: Added.
11:55 AM Changeset in webkit [215975] by n_wang@apple.com
  • 7 edits in trunk/Source/WebCore

AX: Improve performance of addChildren()/childrenChanged()
https://bugs.webkit.org/show_bug.cgi?id=171443

Reviewed by Chris Fleizach.

There's a lot of unnecessary work happening when childrenChanged() is being called.
Some of the improvements here:

  1. When childrenChanged() is being called on some element, we are marking its parent chain dirty. However, in the addChild() method we are then clearing each child of that 'dirty' parent, eventually making the entire tree dirty. Added a m_subTreeDirty flag and using the needsToUpdateChildren() check to make sure we are only clearing the right chain without updating the unchanged siblings.
  2. In the addChild() method we are calling accessibilityIsIgnored() on each child and that might lead to going up the parent chain again to get necessary information. Since we are already traversing the tree from top to bottom to add children, added a struct to store the information and pass it to the child so to avoid unnecessary traversal.
  3. Reduced the amount work of ARIA text controls perform when updating its parents in childrenChanged() so that we don't update a big portion of the tree while typing.

No new tests since this didn't change any functionality.

  • accessibility/AccessibilityNodeObject.cpp:

(WebCore::AccessibilityNodeObject::AccessibilityNodeObject):
(WebCore::AccessibilityNodeObject::childrenChanged):
(WebCore::AccessibilityNodeObject::insertChild):
(WebCore::AccessibilityNodeObject::addChildren):
(WebCore::AccessibilityNodeObject::isDescendantOfBarrenParent):

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

(WebCore::AccessibilityObject::AccessibilityObject):
(WebCore::AccessibilityObject::defaultObjectInclusion):
(WebCore::AccessibilityObject::setIsIgnoredFromParentDataForChild):

  • accessibility/AccessibilityObject.h:

(WebCore::AccessibilityIsIgnoredFromParentData::AccessibilityIsIgnoredFromParentData):
(WebCore::AccessibilityIsIgnoredFromParentData::isNull):
(WebCore::AccessibilityObject::setNeedsToUpdateSubTree):
(WebCore::AccessibilityObject::needsToUpdateChildren):
(WebCore::AccessibilityObject::setIsIgnoredFromParentData):

  • accessibility/AccessibilityRenderObject.cpp:

(WebCore::AccessibilityRenderObject::updateChildrenIfNecessary):
(WebCore::AccessibilityRenderObject::addChildren):

  • accessibility/AccessibilityRenderObject.h:

(WebCore::AccessibilityRenderObject::setRenderObject):
(WebCore::AccessibilityRenderObject::needsToUpdateChildren): Deleted.

11:33 AM Changeset in webkit [215974] by mitz@apple.com
  • 2 edits in trunk/Source/ThirdParty/libwebrtc

[Xcode] libwebrtc SRCROOT includes examples
https://bugs.webkit.org/show_bug.cgi?id=171478

Reviewed by Tim Horton.

  • Configurations/Base.xcconfig: Exclude the Source/webrtc/examples subdirectory from installsrc. Its contents are not used for building any of the targets in the project.
11:03 AM Changeset in webkit [215973] by Yusuke Suzuki
  • 25 edits
    1 copy
    3 moves
    2 adds in trunk/Source

Move WebCore CPUTime to WTF and implement it in all the platforms
https://bugs.webkit.org/show_bug.cgi?id=171477

Reviewed by Chris Dumez.

Source/WebCore:

Move CPUTime to WTF. And rename getCPUTime to CPUTime::get().

  • CMakeLists.txt:
  • PlatformMac.cmake:
  • WebCore.xcodeproj/project.pbxproj:
  • page/ChromeClient.h:
  • page/PerformanceMonitor.cpp:

(WebCore::PerformanceMonitor::PerformanceMonitor):
(WebCore::PerformanceMonitor::measurePostLoadCPUUsage):
(WebCore::PerformanceMonitor::measurePostBackgroundingCPUUsage):
(WebCore::PerformanceMonitor::measureCPUUsageInActivityState):

  • page/PerformanceMonitor.h:
  • platform/CPUMonitor.cpp:

(WebCore::CPUMonitor::setCPULimit):
(WebCore::CPUMonitor::timerFired):

  • platform/CPUMonitor.h:

Source/WebKit2:

We now hold Seconds in CPUTime instead of int64_t. It finally sends
Seconds through WebKit2 IPC. We do not need to specialize ArgumentCoder
for Seconds since Seconds just holds double.

  • UIProcess/PerActivityStateCPUUsageSampler.cpp:

(WebKit::PerActivityStateCPUUsageSampler::PerActivityStateCPUUsageSampler):
(WebKit::PerActivityStateCPUUsageSampler::reportWebContentCPUTime):
(WebKit::PerActivityStateCPUUsageSampler::loggingTimerFired):

  • UIProcess/PerActivityStateCPUUsageSampler.h:
  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::reportWebContentCPUTime):

  • UIProcess/WebProcessPool.h:
  • UIProcess/WebProcessPool.messages.in:
  • WebProcess/WebCoreSupport/WebChromeClient.cpp:

(WebKit::WebChromeClient::reportProcessCPUTime):

  • WebProcess/WebCoreSupport/WebChromeClient.h:

Source/WTF:

We move WebCore::CPUTime to WTF::CPUTime since it is useful even in JSC
and it does not depend on any external libraries.
And we additionally implement WTF::CPUTime in all the platforms: Windows and Unix.

In CPUTime, instead of holding int64_t, we hold MonotonicTime and Seconds.

  • WTF.xcodeproj/project.pbxproj:
  • wtf/CMakeLists.txt:
  • wtf/CPUTime.cpp: Copied from Source/WebCore/platform/CPUTime.cpp.

(WTF::CPUTime::percentageCPUUsageSince):

  • wtf/CPUTime.h: Renamed from Source/WebCore/platform/CPUTime.h.
  • wtf/PlatformEfl.cmake:
  • wtf/PlatformGTK.cmake:
  • wtf/PlatformJSCOnly.cmake:
  • wtf/PlatformMac.cmake:
  • wtf/PlatformWin.cmake:
  • wtf/cocoa/CPUTimeCocoa.mm: Renamed from Source/WebCore/platform/cocoa/CPUTimeCocoa.mm.

(WTF::timeValueToMicroseconds):
(WTF::CPUTime::get):

  • wtf/unix/CPUTimeUnix.cpp: Renamed from Source/WebCore/platform/CPUTime.cpp.

(WTF::timevalToSeconds):
(WTF::CPUTime::get):

  • wtf/win/CPUTimeWin.cpp: Added.

(WTF::fileTimeToSeconds):
(WTF::CPUTime::get):

9:32 AM Changeset in webkit [215972] by Yusuke Suzuki
  • 5 edits in trunk/Source/JavaScriptCore

[JSC] LabelScopePtr is not necessary
https://bugs.webkit.org/show_bug.cgi?id=171474

Reviewed by Geoffrey Garen.

Originally, LabelScopePtr is introduced because LabelScopes uses Vector<> instead of SegmentedVector<>.
LabelScopePtr holds the pointer to the vector owner and index instead of the pointer to LabelScope directly
since Vector<> can relocate LocalScopes inside it.
The reason why LabelScopes use Vector instead is that there is code copying this vector. SegmentedVector<>
prohibits copying since it is so costly. So, we used Vector<> here instead of SegmentedVector<>.

But the latest code does not have copying code for LabelScopes. Thus, we can take the same design to Label and
RegisterID. Just use SegmentedVector<> and Ref<>/RefPtr<>. This patch removes LabelScopePtr since it is no
longer necessary. And use SegmentedVector for LabelScopes.

  • bytecompiler/BytecodeGenerator.cpp:

(JSC::reclaim):
(JSC::BytecodeGenerator::reclaimFreeRegisters):
(JSC::BytecodeGenerator::newLabelScope):
(JSC::BytecodeGenerator::newLabel):
(JSC::BytecodeGenerator::pushFinallyControlFlowScope):
(JSC::BytecodeGenerator::breakTarget):
(JSC::BytecodeGenerator::continueTarget):
(JSC::BytecodeGenerator::emitEnumeration):

  • bytecompiler/BytecodeGenerator.h:
  • bytecompiler/LabelScope.h:

(JSC::LabelScope::LabelScope):
(JSC::LabelScope::breakTarget):
(JSC::LabelScope::continueTarget):
(JSC::LabelScope::type):
(JSC::LabelScope::name):
(JSC::LabelScope::scopeDepth):
(JSC::LabelScope::ref):
(JSC::LabelScope::deref):
(JSC::LabelScope::refCount):
(JSC::LabelScopePtr::LabelScopePtr): Deleted.
(JSC::LabelScopePtr::operator=): Deleted.
(JSC::LabelScopePtr::~LabelScopePtr): Deleted.
(JSC::LabelScopePtr::operator!): Deleted.
(JSC::LabelScopePtr::operator*): Deleted.
(JSC::LabelScopePtr::operator->): Deleted.
(JSC::LabelScopePtr::null): Deleted.

  • bytecompiler/NodesCodegen.cpp:

(JSC::DoWhileNode::emitBytecode):
(JSC::WhileNode::emitBytecode):
(JSC::ForNode::emitBytecode):
(JSC::ForInNode::emitBytecode):
(JSC::ContinueNode::trivialTarget):
(JSC::ContinueNode::emitBytecode):
(JSC::BreakNode::trivialTarget):
(JSC::BreakNode::emitBytecode):
(JSC::SwitchNode::emitBytecode):
(JSC::LabelNode::emitBytecode):

Note: See TracTimeline for information about the timeline view.