Timeline



Jun 12, 2020:

11:22 PM Changeset in webkit [262997] by BJ Burg
  • 2 edits in trunk/Source/WebKit

Automation.computeElementLayout should return iframe-relative element rects (when coordinate system is 'Page')
https://bugs.webkit.org/show_bug.cgi?id=213139
<rdar://problem/55042445>

Reviewed by Devin Rousso.

Automation.computeElementLayout has two coordinate systems it can use, LayoutViewport (used for hit testing)
and Page (used for Get Element Rect). Since Get Element Rect expects coordinates relative to the current
browsing context, make the mode simpler by reporting the bounds from Element::boundingClientRect() which
are frame-relative.

Covered by existing WPT suite. The semantics of this command are under review, as
the remote end steps seem to describe a different result than what the non-normative text does.

  • WebProcess/Automation/WebAutomationSessionProxy.cpp:

(WebKit::WebAutomationSessionProxy::computeElementLayout):

11:13 PM Changeset in webkit [262996] by Simon Fraser
  • 11 edits
    2 adds in trunk

REGRESSION(r261985): Unable to respond to large comments on Bugzilla with always-on scrollbars
https://bugs.webkit.org/show_bug.cgi?id=213135
<rdar://problem/64302086>

Reviewed by Tim Horton.
Source/WebCore:

The combination of programmatic scrolls (e.g. anchor click, reveal selection) and user scrolling
could result in a mismatch between the main thread and scrolling thread scroll positions, resulting
in missing tiles and offset cursor handling.

This happened if a programmatic scroll occurred and 'scrolledSinceLastCommit' was true for
the equivalent scrolling node at the start of a rendering update. synchronizeStateFromScrollingTree()
would take the scrolling thread's notion of the scroll position, clobbering the position resulting
from the programmatic scroll.

To fix this, call commitTreeStateIfNeeded() before synchronizeStateFromScrollingTree() to ensure that
any programmatic scrolls have been pushed to the scrolling tree before we fetch its state.

Some infrastructure is needed for testing; getting into the state where a programmatic
scroll and 'scrolledSinceLastCommit' happened in the same event loop cycle required adding
internals.scrollBySimulatingWheelEvent(), which just pokes the scrolling tree directly
without the complexities of wheel events dispatched via the UI process.

Test: scrollingcoordinator/mac/reveal-selection-tile-coverage.html

  • page/scrolling/AsyncScrollingCoordinator.cpp:

(WebCore::AsyncScrollingCoordinator::scrollBySimulatingWheelEventForTesting):

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

(WebCore::ScrollingCoordinator::scrollBySimulatingWheelEventForTesting):

  • page/scrolling/ScrollingTree.cpp:

(WebCore::ScrollingTree::scrollBySimulatingWheelEventForTesting):

  • page/scrolling/ScrollingTree.h:
  • page/scrolling/mac/ScrollingCoordinatorMac.mm:

(WebCore::ScrollingCoordinatorMac::willStartRenderingUpdate):

  • testing/Internals.cpp:

(WebCore::Internals::scrollBySimulatingWheelEvent):

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

LayoutTests:

Test that does a fake user scroll then a programmatic scroll from a timer (i.e. outside
the rendering update), then dumps tile caches to check that coverage rects match the
right scroll position.

  • scrollingcoordinator/mac/reveal-selection-tile-coverage-expected.txt: Added.
  • scrollingcoordinator/mac/reveal-selection-tile-coverage.html: Added.
8:09 PM Changeset in webkit [262995] by rmorisset@apple.com
  • 4 edits
    1 add in trunk
The
operator (and similar ones) should produce valid bytecode even if the right side is a static error

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

Reviewed by Devin Rousso.

JSTests:

  • stress/bytecode-for-rmw-with-invalid-right-side.js: Added.

(catch):

Source/JavaScriptCore:

There were two minor issues here that interacted:

  • emitThrowReferenceError did not take an optional dst argument like everything else, and instead always returned a new temporary. As a result, the various functions that sometimes did "return emitThrowReferenceError(..);" could return a different RegisterID than the one provided to them through dst, breaking the invariant stated at the top of the file.
  • ShortCircuitReadModifyResolveNode::emitBytecode used the result of such a function, unnecessarily, and (correctly) relied on the invariant being upheld.

The combination of these led to the bytecode trying to do a move of a temporary that was only defined in one of the predecessors of the basic block it was on,
which was caught by validateBytecode.

I fixed both issues, and verified that either fix is enough to stop the bug.
I fixed the first because other code may depend on that invariant in more subtle ways.
I fixed the second because it was just unnecessary complexity and made the code misleading.

I also reworded the comment at the top of NodesCodegen.cpp based on Keith's explanation and Mark's advice to make it less cryptic.

  • bytecompiler/NodesCodegen.cpp:

(JSC::ThrowableExpressionData::emitThrowReferenceError):
(JSC::PostfixNode::emitBytecode):
(JSC::DeleteBracketNode::emitBytecode):
(JSC::DeleteDotNode::emitBytecode):
(JSC::PrefixNode::emitBytecode):
(JSC::ShortCircuitReadModifyResolveNode::emitBytecode):
(JSC::AssignErrorNode::emitBytecode):

  • parser/Nodes.h:
7:55 PM Changeset in webkit [262994] by ddkilzer@apple.com
  • 74 edits in trunk/Source

[IPC hardening] Check enum values in IPC::Decoder::decodeEnum() an IPC::Encoder::encodeEnum()
<https://webkit.org/b/211988>
<rdar://problem/63137695>

Reviewed by Darin Adler.

Replace decodeEnum() with decode() and encodeEnum() with
operator<<().

Source/ThirdParty/libwebrtc:

  • Source/webrtc/sdk/WebKit/WebKitEncoder.h:

(webrtc::WebKitEncodedFrameInfo::decode):
(webrtc::WebKitEncodedFrameInfo::encode const):

Source/WebCore:

  • Modules/applicationmanifest/ApplicationManifest.h:

(WebCore::ApplicationManifest::decode):

  • Modules/indexeddb/IDBKeyData.h:

(WebCore::IDBKeyData::encode const):
(WebCore::IDBKeyData::decode):

  • Modules/indexeddb/shared/IDBCursorInfo.h:

(WebCore::IDBCursorInfo::encode const):
(WebCore::IDBCursorInfo::decode):

  • Modules/indexeddb/shared/IDBError.h:

(WebCore::IDBError::encode const):
(WebCore::IDBError::decode):

  • Modules/indexeddb/shared/IDBGetAllRecordsData.h:

(WebCore::IDBGetAllRecordsData::encode const):
(WebCore::IDBGetAllRecordsData::decode):

  • Modules/indexeddb/shared/IDBGetRecordData.h:

(WebCore::IDBGetRecordData::encode const):
(WebCore::IDBGetRecordData::decode):

  • Modules/indexeddb/shared/IDBIterateCursorData.h:

(WebCore::IDBIterateCursorData::encode const):
(WebCore::IDBIterateCursorData::decode):

  • Modules/indexeddb/shared/IDBRequestData.h:

(WebCore::IDBRequestData::encode const):
(WebCore::IDBRequestData::decode):

  • Modules/indexeddb/shared/IDBResultData.h:

(WebCore::IDBResultData::encode const):
(WebCore::IDBResultData::decode):

  • Modules/indexeddb/shared/IDBTransactionInfo.h:

(WebCore::IDBTransactionInfo::encode const):
(WebCore::IDBTransactionInfo::decode):

  • Modules/webauthn/PublicKeyCredentialCreationOptions.h:

(WebCore::PublicKeyCredentialCreationOptions::Parameters::decode):
(WebCore::PublicKeyCredentialCreationOptions::AuthenticatorSelectionCriteria::decode):

  • Modules/webauthn/PublicKeyCredentialDescriptor.h:

(WebCore::PublicKeyCredentialDescriptor::decode):

  • dom/ExceptionData.h:

(WebCore::ExceptionData::encode const):
(WebCore::ExceptionData::decode):

  • html/DataListSuggestionInformation.h:

(WebCore::DataListSuggestionInformation::encode const):
(WebCore::DataListSuggestionInformation::decode):

  • page/SecurityOrigin.h:

(WebCore::SecurityOrigin::encode const):
(WebCore::SecurityOrigin::decode):

  • platform/ContextMenuItem.h:

(WTF::EnumTraits<WebCore::ContextMenuAction>):

  • Add missing ContextMenuItemTagPasteAsPlainText that was added in r261800.
  • platform/LinkIcon.h:

(WebCore::LinkIcon::encode const):
(WebCore::LinkIcon::decode):

  • platform/PasteboardItemInfo.h:

(WebCore::PasteboardItemInfo::encode const):
(WebCore::PasteboardItemInfo::decode):

  • platform/ScreenProperties.h:

(WebCore::ScreenData::encode const):
(WebCore::ScreenData::decode):

  • platform/graphics/InbandGenericCue.h:

(WebCore::GenericCueData::encode const):

  • platform/graphics/Path.h:

(WebCore::Path::encode const):
(WebCore::Path::decode):

  • platform/graphics/displaylists/DisplayListItems.h:

(WebCore::DisplayList::SetState::encode const):
(WebCore::DisplayList::SetState::decode):
(WebCore::DisplayList::DrawTiledScaledImage::encode const):
(WebCore::DisplayList::DrawTiledScaledImage::decode):

  • platform/mediastream/CaptureDevice.h:

(WebCore::CaptureDevice::encode const):

  • platform/mediastream/MediaConstraints.h:

(WebCore::MediaConstraint::encode const):
(WebCore::MediaConstraint::decode):

  • platform/mediastream/MediaStreamRequest.h:

(WebCore::MediaStreamRequest::encode const):
(WebCore::MediaStreamRequest::decode):

  • platform/mediastream/RealtimeMediaSourceCapabilities.h:

(WebCore::CapabilityValueOrRange::encode const):
(WebCore::CapabilityValueOrRange::decode):
(WebCore::RealtimeMediaSourceCapabilities::encode const):
(WebCore::RealtimeMediaSourceCapabilities::decode):

  • platform/mediastream/RealtimeMediaSourceSettings.h:

(WebCore::RealtimeMediaSourceSettings::encode const):
(WebCore::RealtimeMediaSourceSettings::decode):

  • platform/mock/MockMediaDevice.h:

(WebCore::MockDisplayProperties::encode const):

  • platform/network/HTTPHeaderMap.h:

(WebCore::HTTPHeaderMap::CommonHeader::encode const):
(WebCore::HTTPHeaderMap::CommonHeader::decode):

  • testing/MockWebAuthenticationConfiguration.h:

(WebCore::MockWebAuthenticationConfiguration::HidConfiguration::decode):
(WebCore::MockWebAuthenticationConfiguration::NfcConfiguration::decode):

  • workers/service/ServiceWorkerContextData.h:

(WebCore::ServiceWorkerContextData::decode):

  • workers/service/ServiceWorkerJobData.h:

(WebCore::ServiceWorkerJobData::encode const):
(WebCore::ServiceWorkerJobData::decode):

Source/WebKit:

  • GPUProcess/media/TextTrackPrivateRemoteConfiguration.h:

(WebKit::TextTrackPrivateRemoteConfiguration::encode const):

  • GPUProcess/media/TrackPrivateRemoteConfiguration.h:

(WebKit::TrackPrivateRemoteConfiguration::encode const):

  • NetworkProcess/NetworkProcessCreationParameters.cpp:

(WebKit::NetworkProcessCreationParameters::encode const):
(WebKit::NetworkProcessCreationParameters::decode):

  • NetworkProcess/NetworkResourceLoadParameters.cpp:

(WebKit::NetworkResourceLoadParameters::encode const):
(WebKit::NetworkResourceLoadParameters::decode):

  • Platform/IPC/Decoder.h:

(IPC::Decoder::decode):
(IPC::Decoder::operator>>):

  • Make use of std::underlying_type_t<>.

(IPC::Decoder::decodeEnum): Delete.

  • Replace with calls to decode().
  • Platform/IPC/Encoder.h:

(IPC::Encoder::operator<<):
(IPC::Encoder::encode):

  • Make use of WTF::enumToUnderlyingType<>.

(IPC::Encoder::encodeEnum): Delete.

  • Replace with calls to operator<<().
  • Shared/Cocoa/ArgumentCodersCocoa.mm:

(IPC::decodeObject):

  • Shared/Cocoa/WebCoreArgumentCodersCocoa.mm:

(IPC::ArgumentCoder<ApplePaySessionPaymentRequest>::encode):
(IPC::ArgumentCoder<ApplePaySessionPaymentRequest>::decode):
(IPC::ArgumentCoder<ApplePaySessionPaymentRequest::LineItem>::encode):
(IPC::ArgumentCoder<ApplePaySessionPaymentRequest::LineItem>::decode):

  • Shared/ContextMenuContextData.cpp:

(WebKit::ContextMenuContextData::encode const):
(WebKit::ContextMenuContextData::decode):

  • Shared/FocusedElementInformation.cpp:

(WebKit::FocusedElementInformation::encode const):
(WebKit::FocusedElementInformation::decode):

  • Shared/LoadParameters.cpp:

(WebKit::LoadParameters::encode const):
(WebKit::LoadParameters::decode):

  • Shared/NavigationActionData.cpp:

(WebKit::NavigationActionData::encode const):
(WebKit::NavigationActionData::decode):

  • Shared/PlatformPopupMenuData.cpp:

(WebKit::PlatformPopupMenuData::encode const):
(WebKit::PlatformPopupMenuData::decode):

  • Shared/Plugins/PluginProcessCreationParameters.cpp:

(WebKit::PluginProcessCreationParameters::encode const):
(WebKit::PluginProcessCreationParameters::decode):

  • Shared/PrintInfo.cpp:

(WebKit::PrintInfo::encode const):
(WebKit::PrintInfo::decode):

  • Shared/RTCPacketOptions.cpp:

(WebKit::RTCPacketOptions::encode const):
(WebKit::RTCPacketOptions::decode):

  • Shared/RemoteLayerTree/RemoteLayerTreeTransaction.mm:

(WebKit::RemoteLayerTreeTransaction::LayerCreationProperties::encode const):
(WebKit::RemoteLayerTreeTransaction::LayerCreationProperties::decode):
(WebKit::RemoteLayerTreeTransaction::LayerProperties::encode const):
(WebKit::RemoteLayerTreeTransaction::LayerProperties::decode):

  • Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp:

(ArgumentCoder<ScrollingStateNode>::encode):
(ArgumentCoder<RequestedScrollData>::encode):
(ArgumentCoder<RequestedScrollData>::decode):
(WebKit::RemoteScrollingCoordinatorTransaction::decode):

  • Shared/SessionState.cpp:

(WebKit::HTTPBody::Element::encode const):
(WebKit::HTTPBody::Element::decode):
(WebKit::PageState::encode const):
(WebKit::PageState::decode):

  • Shared/TouchBarMenuItemData.cpp:

(WebKit::TouchBarMenuItemData::encode const):
(WebKit::TouchBarMenuItemData::decode):

  • Shared/UserData.cpp:

(WebKit::UserData::encode):
(WebKit::UserData::decode):

  • Shared/WebContextMenuItemData.cpp:

(WebKit::WebContextMenuItemData::encode const):
(WebKit::WebContextMenuItemData::decode):

  • Shared/WebCoreArgumentCoders.cpp:

(IPC::ArgumentCoder<LinearTimingFunction>::encode):
(IPC::ArgumentCoder<CubicBezierTimingFunction>::encode):
(IPC::ArgumentCoder<CubicBezierTimingFunction>::decode):
(IPC::ArgumentCoder<StepsTimingFunction>::encode):
(IPC::ArgumentCoder<SpringTimingFunction>::encode):
(IPC::ArgumentCoder<PluginInfo>::encode):
(IPC::ArgumentCoder<PluginInfo>::decode):
(IPC::ArgumentCoder<ProtectionSpace>::encode):
(IPC::ArgumentCoder<ProtectionSpace>::decode):
(IPC::ArgumentCoder<Credential>::encode):
(IPC::ArgumentCoder<Credential>::decode):
(IPC::ArgumentCoder<Cursor>::encode):
(IPC::ArgumentCoder<Cursor>::decode):
(IPC::ArgumentCoder<ResourceError>::encode):
(IPC::ArgumentCoder<ResourceError>::decode):
(IPC::ArgumentCoder<DragData>::encode):
(IPC::ArgumentCoder<DragData>::decode):
(IPC::ArgumentCoder<CompositionUnderline>::encode):
(IPC::ArgumentCoder<CompositionUnderline>::decode):
(IPC::ArgumentCoder<FileChooserSettings>::encode):
(IPC::ArgumentCoder<FileChooserSettings>::decode):
(IPC::ArgumentCoder<TextCheckingRequestData>::encode):
(IPC::ArgumentCoder<TextCheckingRequestData>::decode):
(IPC::ArgumentCoder<TextCheckingResult>::encode):
(IPC::ArgumentCoder<TextCheckingResult>::decode):
(IPC::ArgumentCoder<UserStyleSheet>::encode):
(IPC::ArgumentCoder<UserStyleSheet>::decode):
(IPC::ArgumentCoder<ScrollableAreaParameters>::encode):
(IPC::ArgumentCoder<ScrollableAreaParameters>::decode):
(IPC::ArgumentCoder<FilterOperation>::encode):
(IPC::decodeFilterOperation):
(IPC::ArgumentCoder<FontAttributes>::encode):
(IPC::ArgumentCoder<FontAttributes>::decode):
(IPC::ArgumentCoder<WebCore::SerializedPlatformDataCueValue>::encode):
(IPC::ArgumentCoder<WebCore::SerializedPlatformDataCueValue>::decode):

  • Shared/WebPageCreationParameters.cpp:

(WebKit::WebPageCreationParameters::encode const):
(WebKit::WebPageCreationParameters::decode):

  • Shared/WebPopupItem.cpp:

(WebKit::WebPopupItem::encode const):
(WebKit::WebPopupItem::decode):

  • Shared/WebProcessCreationParameters.cpp:

(WebKit::WebProcessCreationParameters::encode const):
(WebKit::WebProcessCreationParameters::decode):

  • Shared/WebsiteData/WebsiteData.cpp:

(WebKit::WebsiteData::Entry::encode const):
(WebKit::WebsiteData::Entry::decode):

  • Shared/curl/WebCoreArgumentCodersCurl.cpp:

(IPC::ArgumentCoder<ResourceError>::encodePlatformData):
(IPC::ArgumentCoder<ResourceError>::decodePlatformData):
(IPC::ArgumentCoder<ProtectionSpace>::encodePlatformData):
(IPC::ArgumentCoder<ProtectionSpace>::decodePlatformData):

  • Shared/glib/InputMethodState.cpp:

(WebKit::InputMethodState::encode const):
(WebKit::InputMethodState::decode):

  • Shared/glib/UserMessage.cpp:

(WebKit::UserMessage::encode const):
(WebKit::UserMessage::decode):

  • Shared/mac/ColorSpaceData.mm:

(WebKit::ColorSpaceData::encode const):
(WebKit::ColorSpaceData::decode):

  • Shared/mac/SecItemRequestData.cpp:

(WebKit::SecItemRequestData::encode const):
(WebKit::SecItemRequestData::decode):

  • Shared/mac/WebCoreArgumentCodersMac.mm:

(IPC::ArgumentCoder<WebCore::ResourceRequest>::encodePlatformData):
(IPC::ArgumentCoder<WebCore::ResourceRequest>::decodePlatformData):
(IPC::ArgumentCoder<WebCore::CertificateInfo>::encode):
(IPC::ArgumentCoder<WebCore::CertificateInfo>::decode):

  • Shared/soup/WebCoreArgumentCodersSoup.cpp:

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

  • WebProcess/GPU/media/RemoteMediaPlayerState.h:

(WebKit::RemoteMediaPlayerState::encode const):
(WebKit::RemoteMediaPlayerState::decode):

  • WebProcess/Network/NetworkProcessConnectionInfo.h:

(WebKit::NetworkProcessConnectionInfo::decode):

  • WebProcess/Plugins/Plugin.cpp:

(WebKit::Plugin::Parameters::encode const):
(WebKit::Plugin::Parameters::decode):

  • WebProcess/WebPage/RemoteLayerTree/PlatformCAAnimationRemote.mm:

(WebKit::PlatformCAAnimationRemote::KeyframeValue::encode const):
(WebKit::PlatformCAAnimationRemote::KeyframeValue::decode):
(WebKit::PlatformCAAnimationRemote::Properties::encode const):
(WebKit::PlatformCAAnimationRemote::Properties::decode):

7:01 PM Changeset in webkit [262993] by Wenson Hsieh
  • 3 edits
    2 adds in trunk

[iPadOS] Focusing selects and color inputs should not bring up the software keyboard
https://bugs.webkit.org/show_bug.cgi?id=213149
<rdar://problem/64312450>

Reviewed by Darin Adler.

Source/WebKit:

After <trac.webkit.org/r261658>, we now opt into bringing up the software keyboard when focusing color inputs
and select elements. This is due to the changes in -_shouldShowAutomaticKeyboardUIIgnoringInputMode, which
were intended to make us return NO for date and time inputs, but also unintentionally makes us return YES
on iPadOS.

This patch fixes the bug by returning !WebKit::currentUserInterfaceIdiomIsPad() instead, and additionally
preserves the existing behavior of now showing a color picker for <input type="color" readonly> on iPhone.

Test: fast/forms/ios/ipad/select-should-not-bring-up-software-keyboard.html

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView becomeFirstResponderForWebView]):
(-[WKContentView resignFirstResponderForWebView]):
(-[WKContentView _shouldShowAutomaticKeyboardUIIgnoringInputMode]):
(-[WKContentView _elementDidFocus:userIsInteracting:blurPreviousNode:activityStateChanges:userObject:]):

LayoutTests:

Add a new layout test.

  • fast/forms/ios/ipad/select-should-not-bring-up-software-keyboard-expected.txt: Added.
  • fast/forms/ios/ipad/select-should-not-bring-up-software-keyboard.html: Added.
6:15 PM Changeset in webkit [262992] by ysuzuki@apple.com
  • 3 edits
    1 add in trunk

[JSC] el(Greek) characters' upper-case conversion is locale-sensitive
https://bugs.webkit.org/show_bug.cgi?id=213155
<rdar://problem/55018467>

Reviewed by Darin Adler.

JSTests:

  • stress/intl-el-case.js: Added.

(shouldBe):

Source/JavaScriptCore:

CLDR defines 4 locales which has language-sensitive case conversions. "az", "el", "lt", and "tr", where,

az = Azerbaijani
el = Greek
lt = Lithuanian
tr = Turkish

We can ensure it easily like this.

  1. Download CLDR data
  2. ls common/transforms/*Upper.xml

common/transforms/az-Upper.xml
common/transforms/el-Upper.xml
common/transforms/lt-Upper.xml
common/transforms/tr-Upper.xml

And ECMA-402 String.prototype.{toLocaleLowerCase,toLocaleUpperCase} requires these locales are listed as availableLocales.

  1. Let availableLocales be a List with language tags that includes the languages for which the Unicode Character Database contains language sensitive case mappings. Implementations may add additional language tags if they support case mapping for additional locales.

https://tc39.es/ecma402/#sup-string.prototype.tolocalelowercase

This patch adds "el" to our maintained availableLocales list. Previously we only had "az", "lt", and "tr".

  • runtime/StringPrototype.cpp:

(JSC::toLocaleCase):
(JSC::stringProtoFuncToLocaleUpperCase):

5:22 PM Changeset in webkit [262991] by keith_miller@apple.com
  • 17 edits
    1 delete in trunk

Tests expecting a crash should use a signal handler in the JSC CLI process
https://bugs.webkit.org/show_bug.cgi?id=212479

Reviewed by Yusuke Suzuki.

JSTests:

  • stress/ensure-crash.js:
  • stress/incorrect-put-could-generate-invalid-ic-but-still-not-causing-bad-behavior-bad-transition-debug.js:
  • stress/incorrect-put-could-generate-invalid-ic-but-still-not-causing-bad-behavior-bad-transition.js:
  • stress/incorrect-put-could-generate-invalid-ic-but-still-not-causing-bad-behavior-debug.js: Removed.
  • stress/incorrect-put-could-generate-invalid-ic-but-still-not-causing-bad-behavior.js:
  • stress/incorrect-put-could-generate-invalid-ic-involving-dictionary-flatten-debug.js:

Source/JavaScriptCore:

Have the -s option use WTF::Signals and make sure it adds breakpoint catching
as well.

  • jsc.cpp:

(printUsageStatement):
(CommandLine::parseArguments):

  • tools/SigillCrashAnalyzer.cpp:

(JSC::installCrashHandler):

Source/WTF:

Add signals for floating point exceptions and breakpoints. There's a
note for breakpoints that explains how using them in the same process
as lldb will cause badness. Fortunately, the only place I plan on using
the breakpoint handler is to check for tests where crashing is expected.

  • wtf/threads/Signals.cpp:

(WTF::fromMachException):
(WTF::toMachMask):

  • wtf/threads/Signals.h:

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

Tools:

Crashing tests should now exit with status zero.

  • Scripts/run-jsc-stress-tests:
  • Scripts/webkitruby/jsc-stress-test-writer-default.rb:
  • Scripts/webkitruby/jsc-stress-test-writer-playstation.rb:
  • Scripts/webkitruby/jsc-stress-test-writer-ruby.rb:
5:06 PM Changeset in webkit [262990] by Alan Coon
  • 5 edits in branches/safari-609-branch

Cherry-pick r262978. rdar://problem/64315997

Stop allowing pages served over HTTPS with "Cache-Control: no-store" into the back/forward cache
https://bugs.webkit.org/show_bug.cgi?id=213147
<rdar://problem/64249683>

Reviewed by Geoffrey Garen.

Source/WebCore:

Stop allowing pages served over HTTPS with "Cache-Control: no-store" into the back/forward cache.
This is a revert of r250437 due to push back from Web developers.

No new tests, updated existing tests.

  • history/BackForwardCache.cpp: (WebCore::canCacheFrame):

LayoutTests:

Update layout test coverage.

  • http/tests/navigation/https-in-page-cache-expected.txt:
  • http/tests/navigation/resources/https-in-page-cache-1.php:

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

5:06 PM Changeset in webkit [262989] by Alan Coon
  • 5 edits
    1 add in branches/safari-609-branch

Cherry-pick r262707. rdar://problem/64226888

File URLs with hostnames are misleading
https://bugs.webkit.org/show_bug.cgi?id=212739
<rdar://problem/63754917>

Reviewed by Alex Christensen.

Source/WebCore:

Showing a file URL like file://example.org/test is misleading to users.
To prevent this, we just do a redirection to the same file URL with an empty host.
Remove the port at the same time.
Covered by added API test.

  • loader/DocumentLoader.cpp: (WebCore::DocumentLoader::willSendRequest):

Tools:

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKit/open-window-with-file-url-with-host.html: Added.
  • TestWebKitAPI/Tests/WebKitCocoa/OpenAndCloseWindow.mm: (TEST):

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

5:06 PM Changeset in webkit [262988] by Alan Coon
  • 2 edits in branches/safari-609-branch/Source/WebKit

Cherry-pick r262508. rdar://problem/62977672

[iOS] Hide the PiP button in fullscreen mode if PiP is disabled in preferences
https://bugs.webkit.org/show_bug.cgi?id=212699
<rdar://problem/60391437>

Reviewed by Eric Carlson.

In r260474, we hid the PiP button in fullscreen when PiP was unsupported on the
current device; we must also hide the PiP button when clients have disabled PiP
via preferences.

  • UIProcess/ios/fullscreen/WKFullScreenViewController.mm: (-[WKFullScreenViewController videoControlsManagerDidChange]):

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

4:55 PM Changeset in webkit [262987] by Andres Gonzalez
  • 4 edits in trunk/LayoutTests

Re-write accessibility/form-control-value-settable.html so that it can pass in both isolated tree mode on and off.
https://bugs.webkit.org/show_bug.cgi?id=213150

Reviewed by Chris Fleizach.

In isolated tree mode, it is necessary to setTimeout after setting the
focus so that the isolated tree can be updated.

  • accessibility/form-control-value-settable.html:
  • platform/gtk/accessibility/form-control-value-settable-expected.txt:
  • platform/mac/accessibility/form-control-value-settable-expected.txt:
4:45 PM Changeset in webkit [262986] by Alan Coon
  • 8 edits in branches/safari-609-branch/Source

Versioning.

WebKit-609.3.4

4:32 PM Changeset in webkit [262985] by achristensen@apple.com
  • 12 edits in trunk

Make API tests tolerant of our relatively new use of WebPageProxy::preconnectTo
https://bugs.webkit.org/show_bug.cgi?id=213144

Reviewed by Geofferey Garen.

Source/WebKit:

  • NetworkProcess/cocoa/NetworkSessionCocoa.h:
  • NetworkProcess/cocoa/NetworkSessionCocoa.mm:

(-[WKNetworkSessionDelegate URLSession:task:willPerformHTTPRedirection:newRequest:completionHandler:]):
(-[WKNetworkSessionDelegate URLSession:task:didCompleteWithError:]):
(-[WKNetworkSessionDelegate URLSession:dataTask:didReceiveResponse:completionHandler:]):
(WebKit::NetworkSessionCocoa::taskServerConnectionSucceeded):
(WebKit::NetworkSessionCocoa::taskReceivedBytes): Deleted.
Fix our logic that remembers successful client certificate connections.
If a task completes with no error (like a preconnect task does), consider that a successful connection.

  • UIProcess/Network/NetworkProcessProxy.cpp:

(WebKit::NetworkProcessProxy::preconnectTo):
Remove the check to not preconnect to loopback addresses.
This was making our tests different than the real internet and prevented me from landing a perfectly good test
in https://bugs.webkit.org/show_bug.cgi?id=213109

Tools:

Most changes are straightforward moving to HTTPServer, which is more tolerant of different numbers of connections except these two:

The ResourceLoadDelegate.Challenge API test was checking the output of _WKResourceLoadDelegate.didReceiveChallenge
by using a server trust challenge. Now that preconnecting happens, the server trust evaluation would happen with a
PreconnectTask, not the main resource load. The WKNavigationDelegate still gets the challenge and there is no problem
here, but in order to continue to test _WKResourceLoadDelegate.didReceiveChallenge I use a basic authentication challenge
instead of a server trust evaluation.

The WebKit.FastServerTrust API test now has two failed attempts (one from the preconnect attempt, one from the main resource load attempt),
but only when _strictTrustEvaluate is not available.

  • TestWebKitAPI/TCPServer.cpp:

(TestWebKitAPI::TCPServer::TCPServer):

  • TestWebKitAPI/TCPServer.h:
  • TestWebKitAPI/Tests/WebKitCocoa/Challenge.mm:

(TEST):
(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKitCocoa/ResourceLoadDelegate.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm:
  • TestWebKitAPI/cocoa/HTTPServer.h:
  • TestWebKitAPI/cocoa/HTTPServer.mm:

(TestWebKitAPI::HTTPServer::respondWithChallengeThenOK):

3:38 PM Changeset in webkit [262984] by pvollan@apple.com
  • 2 edits in trunk/Source/WebKit

[iOS] Preferences are not being observed if the process pool is being created after activation
https://bugs.webkit.org/show_bug.cgi?id=213145

Reviewed by Brent Fulgham.

If the app is creating the Web process pool after being activated, preferences will not be observed until the app is being backgrounded
and then foregrounded again, since the preference observer is initialized when handling the app activation notification.

No new tests, since an API test would make sense in this case, but API tests aren't run on iOS.

  • UIProcess/Cocoa/WebProcessPoolCocoa.mm:

(WebKit::WebProcessPool::platformInitializeWebProcess):

3:22 PM Changeset in webkit [262983] by Alan Coon
  • 8 edits in branches/safari-610.1.15.51-branch/Source

Versioning 610.1.15.51.4.

3:17 PM Changeset in webkit [262982] by Alan Coon
  • 1 copy in tags/Safari-610.1.15.51.3

Tag Safari-610.1.15.51.3.

3:16 PM Changeset in webkit [262981] by Alan Coon
  • 8 edits in branches/safari-610.1.15.51-branch/Source

Versioning.

3:15 PM Changeset in webkit [262980] by Alan Coon
  • 1 copy in tags/Safari-610.1.15.50.4

Tag Safari-610.1.15.50.4.

3:13 PM Changeset in webkit [262979] by Alexey Shvayka
  • 7 edits in trunk

AsyncGenerator should await "return" completions
https://bugs.webkit.org/show_bug.cgi?id=212774

Reviewed by Ross Kirsling.

JSTests:

With this change, async generator stress tests now pass in Chrome and Firefox (tested manually).

  • stress/async-iteration-yield-star-interface.js:
  • stress/async-iteration-yield-star.js:
  • test262/expectations.yaml: Mark 8 test cases as passing.

Source/JavaScriptCore:

This patch fixes 2 spec discrepancies, observable with async generators if the
value of "return" completion is a Promise, aligning JSC with V8 and SpiderMonkey.

  • builtins/AsyncGeneratorPrototype.js:

(onFulfilled):
This change implements step 8 of AsyncGeneratorYield [1], that is executed after
step 15 of AsyncGeneratorResumeNext [2] (implemented as @doAsyncGeneratorBodyCall).
We are safe to rely on AsyncGeneratorState? being "suspendedYield" (set in
step 6 of AsyncGeneratorYield [1]) instead of adding extra field to AsyncGenerator:
AsyncGeneratorResumeNext [2] does not overwrite "suspendedYield" state.
This change fixes most of test262 cases.

[1]: https://tc39.es/ecma262/#sec-asyncgeneratoryield
[2]: https://tc39.es/ecma262/#sec-asyncgeneratorresumenext

  • bytecompiler/BytecodeGenerator.cpp:

(JSC::BytecodeGenerator::emitDelegateYield):
This change implements step 7.c.iii.1 of yield* runtime semantics [3], that is
observable only if Value? has userland "then" getter. Awaited result is discarded.
This change fixes async-generator/yield-star-return-then-getter-ticks.js test262 case.

[3]: https://tc39.es/ecma262/#sec-generator-function-definitions-runtime-semantics-evaluation

3:05 PM Changeset in webkit [262978] by Chris Dumez
  • 5 edits in trunk

Stop allowing pages served over HTTPS with "Cache-Control: no-store" into the back/forward cache
https://bugs.webkit.org/show_bug.cgi?id=213147
<rdar://problem/64249683>

Reviewed by Geoffrey Garen.

Source/WebCore:

Stop allowing pages served over HTTPS with "Cache-Control: no-store" into the back/forward cache.
This is a revert of r250437 due to push back from Web developers.

No new tests, updated existing tests.

  • history/BackForwardCache.cpp:

(WebCore::canCacheFrame):

LayoutTests:

Update layout test coverage.

  • http/tests/navigation/https-in-page-cache-expected.txt:
  • http/tests/navigation/resources/https-in-page-cache-1.php:
2:58 PM Changeset in webkit [262977] by Jason_Lawrence
  • 2 edits in trunk/Source/WTF

Unreviewed, reverting r262904.

This commit broke a test on Mac wk1 Debug.

Reverted changeset:

"[Cocoa] Build callOnMainThread on WTF::RunLoop rather than on
a timer"
https://bugs.webkit.org/show_bug.cgi?id=213063
https://trac.webkit.org/changeset/262904

2:03 PM Changeset in webkit [262976] by Jason_Lawrence
  • 2 edits in trunk/LayoutTests

REGRESSION: [ Mac wk1 Debug ] media/remoteplayback-target-availability.html is flaky failing.
https://bugs.webkit.org/show_bug.cgi?id=213146

Unreviewed test gardening.

  • platform/mac-wk1/TestExpectations:
2:02 PM Changeset in webkit [262975] by Diego Pino Garcia
  • 4 edits in trunk/Tools

[buildbot] [GTK][WPE] Move WebDriver test to own bot
https://bugs.webkit.org/show_bug.cgi?id=212527

Reviewed by Carlos Alberto Lopez Perez.

Move 'webdriver-test' step from GTK Release and GTK Debug test bots
to separated bots.

For bots that require a Wayland display (WPE and GTK Wayland),
'webdriver-test' step is run on the corresponding general test bot,
since it's not possible at the moment to run tests that require a
Wayland display in a bot set as a container.

  • BuildSlaveSupport/build.webkit.org-config/config.json:
  • BuildSlaveSupport/build.webkit.org-config/factories.py:

(TestFactory.init):
(TestWebDriverFactory):
(TestWebDriverFactory.init):

  • BuildSlaveSupport/build.webkit.org-config/steps_unittest.py:
1:56 PM Changeset in webkit [262974] by Ross Kirsling
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed, address Darin's feedback on r262890.

  • runtime/IntlObject.cpp:

(JSC::addScriptlessLocaleIfNeeded):
Use != instead of < for clarity.

1:52 PM Changeset in webkit [262973] by Adrian Perez de Castro
  • 8 edits in trunk

Build is broken with EVENT_LOOP_TYPE=GLib
https://bugs.webkit.org/show_bug.cgi?id=212987

Reviewed by Konstantin Tokarev.

.:

  • Source/cmake/OptionsJSCOnly.cmake: Add gio-unix as a required component of the GLib

package, as it is needed for the remote inspector support with EVENT_LOOP_TYPE=GLib.

Source/JavaScriptCore:

  • PlatformJSCOnly.cmake: Add sources needed to support the remote inspector to

JavaScriptCore_SOURCES.

Source/WTF:

  • wtf/CurrentTime.cpp: Make sure that <time.h> is included to get clock_gettime() and

friends defined when USE_GLIB is disabled.

  • wtf/PlatformJSCOnly.cmake: Use FileSystemGLib instead of FileSystemPOSIX when

EVENT_LOOP_TYPE=GLib is set, add missing sources needed when ENABLE_REMOTE_INSPECTOR
is set.

  • wtf/glib/RunLoopSourcePriority.h: Use the same list of priorities for WPE and JSCOnly.
1:36 PM Changeset in webkit [262972] by commit-queue@webkit.org
  • 5 edits in trunk/Source/WebCore

Stop to use ActiveDOMObject::setPendingActivity() for Modules/fetch
https://bugs.webkit.org/show_bug.cgi?id=213037

Patch by Tetsuharu Ohzeki <Tetsuharu Ohzeki> on 2020-06-12
Reviewed by Youenn Fablet.

By ActiveDOMObject's comments,
these methods should be replaced with using makePendingActivity().

JSFetchRequest/JSFetchResponse (as derived class of JSDOMWrapper) hold
FetchRequest/FetchResponse, and they have FetchBodyOwner
as a base class and keep alive it. We can replace
setPendingActivity() calling from FetchBodyOwner.

  • Modules/fetch/FetchBodyOwner.cpp:

(WebCore::FetchBodyOwner::loadBlob):
(WebCore::FetchBodyOwner::finishBlobLoading):
(WebCore::FetchBodyOwner::virtualHasPendingActivity const):

  • Modules/fetch/FetchBodyOwner.h:
  • Modules/fetch/FetchBodySource.cpp:

(WebCore::FetchBodySource::setActive):
(WebCore::FetchBodySource::setInactive):

  • Modules/fetch/FetchBodySource.h:
12:47 PM Changeset in webkit [262971] by commit-queue@webkit.org
  • 18 edits in trunk

[Curl] Implement functions to use ResourceLoadStatistics.
https://bugs.webkit.org/show_bug.cgi?id=207692

Patch by Takashi Komori <Takashi.Komori@sony.com> on 2020-06-12
Reviewed by Don Olmstead.

Implement functions which are required to implement ResourceLoadStatistics for Curl port.

Source/WebCore:

Tests: http/tests/resourceLoadStatistics/

  • CMakeLists.txt:
  • platform/network/curl/CookieJarDB.cpp:

(WebCore::CookieJarDB::openDatabase):
(WebCore::CookieJarDB::setCookie):
(WebCore::CookieJarDB::allDomains):
(WebCore::CookieJarDB::deleteCookiesForHostname):

  • platform/network/curl/CookieJarDB.h:
  • platform/network/curl/NetworkStorageSessionCurl.cpp:

(WebCore::NetworkStorageSession::setCookiesFromDOM const):
(WebCore::NetworkStorageSession::setCookies):
(WebCore::NetworkStorageSession::deleteCookiesForHostnames):
(WebCore::NetworkStorageSession::getHostnamesWithCookies):

Source/WebKit:

In NetworkDataTaskCurl.cpp we check if we should block cookies and block if needed.

Tests: http/tests/resourceLoadStatistics/

  • NetworkProcess/NetworkDataTask.cpp:

(WebKit::NetworkDataTask::create):

  • NetworkProcess/curl/NetworkDataTaskCurl.cpp:

(WebKit::NetworkDataTaskCurl::NetworkDataTaskCurl):
(WebKit::NetworkDataTaskCurl::createCurlRequest):
(WebKit::NetworkDataTaskCurl::willPerformHTTPRedirection):
(WebKit::NetworkDataTaskCurl::blockCookies):
(WebKit::NetworkDataTaskCurl::unblockCookies):
(WebKit::NetworkDataTaskCurl::shouldBlockCookies):
(WebKit::NetworkDataTaskCurl::isThirdPartyRequest):

  • NetworkProcess/curl/NetworkDataTaskCurl.h:
  • NetworkProcess/curl/NetworkSessionCurl.cpp:

(WebKit::NetworkSessionCurl::NetworkSessionCurl):

  • UIProcess/API/C/WKWebsiteDataStoreRef.cpp:

(WKWebsiteDataStoreGetAllStorageAccessEntries):

  • UIProcess/API/C/WKWebsiteDataStoreRef.h:
  • UIProcess/WebsiteData/WebsiteDataStore.cpp:

(WebKit::WebsiteDataStore::parameters):

Tools:

Tests: http/tests/resourceLoadStatistics/

  • WebKitTestRunner/TestController.cpp:

(WTR::GetAllStorageAccessEntriesCallbackContext::GetAllStorageAccessEntriesCallbackContext):
(WTR::getAllStorageAccessEntriesCallback):
(WTR::TestController::getAllStorageAccessEntries):

LayoutTests:

Tests: http/tests/resourceLoadStatistics/

  • platform/wincairo-wk1/TestExpectations:
  • platform/wincairo/TestExpectations:
12:38 PM Changeset in webkit [262970] by Russell Epstein
  • 1 copy in tags/Safari-609.3.3

Tag Safari-609.3.3.

12:36 PM Changeset in webkit [262969] by Russell Epstein
  • 1 delete in tags/Safari-609.3.3

Delete tag.

12:31 PM Changeset in webkit [262968] by Russell Epstein
  • 1 copy in tags/Safari-609.3.3

Tag Safari-609.3.3.

12:25 PM Changeset in webkit [262967] by Ryan Haddad
  • 2 edits in branches/safari-609-branch/Tools

Cherry-pick r261243. rdar://problem/61953702

REGRESSION (r260278): TestWebKitAPI.Fullscreen.Delegate is timing out on macOS bots
https://bugs.webkit.org/show_bug.cgi?id=210676

Unreviewed test gardening.

  • TestWebKitAPI/Tests/WebKitCocoa/FullscreenAlert.mm: (TestWebKitAPI::TEST): Skip the test to get the bots to green.

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

12:24 PM Changeset in webkit [262966] by Andres Gonzalez
  • 5 edits in trunk/Source/WebCore

In isolated tree mode 2, AXIsolatedObject::setChildrenIDs should be called only on secondary thread.
https://bugs.webkit.org/show_bug.cgi?id=213124

Reviewed by Chris Fleizach.

Covered by existing tests.

  • AXIsolatedTree::createSubtree was calling AXIsolatedObject::setChildrenIDs

which should be called only on the secondary thread. Now it is queueing
the children update under lock.

  • The unsigned int range for object IDs was being overrun for large

number of objects like in the case of the sample page in <rdar://problem/59331146>.
Increased the size of AXID to size_t.

  • Better handle the case of invalid object IDs, although this needs

more work, since we should never encounter this case.

  • accessibility/AccessibilityObjectInterface.h: AXID are now size_t instead of unsigned ints.
  • accessibility/isolatedtree/AXIsolatedObject.cpp:

(WebCore::AXIsolatedObject::AXIsolatedObject):
(WebCore::AXIsolatedObject::setChildrenIDs): Inlined in header.

  • accessibility/isolatedtree/AXIsolatedObject.h:
  • accessibility/isolatedtree/AXIsolatedTree.cpp:

(WebCore::AXIsolatedTree::createSubtree):

12:14 PM Changeset in webkit [262965] by Russell Epstein
  • 1 delete in tags/Safari-609.3.3

Delete tag.

12:13 PM Changeset in webkit [262964] by Russell Epstein
  • 1 copy in tags/Safari-609.3.3

Tag Safari-609.3.3.

11:53 AM Changeset in webkit [262963] by ysuzuki@apple.com
  • 3 edits in trunk/LayoutTests

[ Mojave wk2 Release ] js/dom/unhandled-promise-rejection-console-no-report.html is flaky failing.
https://bugs.webkit.org/show_bug.cgi?id=212851

Reviewed by Darin Adler.

This test is wrong since both onunhandledrejection and setTimeout are driven by macro-tasks.
There is no ordering between them so they have race condition, and this race condition makes this
the test flaky. We should fix the test. This patch removes the dependency to setTimeout.

  • js/dom/unhandled-promise-rejection-console-no-report-expected.txt:
  • js/dom/unhandled-promise-rejection-console-no-report.html:
11:40 AM Changeset in webkit [262962] by aestes@apple.com
  • 5 edits in trunk/Source/WebCore

FileInputType should use WeakPtr for FileListCreator lambdas
https://bugs.webkit.org/show_bug.cgi?id=213130
<rdar://problem/64276591>

Reviewed by David Kilzer.

FileInputType::filesChosen was passing a completion handler to FileListCreator::create that
captured |this|. If the FileListCreator instance still existed when |this| was destroyed,
FileInputType::~FileInputType would clear the captured |this| by calling
FileListCreator::clear. This can be simplified by having the FileListCreator completion
handler capture a WeakPtr to |this|.

Also, when FileInputType::allowsDirectories is false, m_fileListCreator would not be
properly cleared after creating the file list. The FileListCreator completion handler would
set m_fileListCreator to nullptr, but would be executed *before* FileListCreator::create
returned and set m_fileListCreator to the newly-created FileListCreator object. Fixed this
by having FileListCreator::create execute the completion handler immediately and return
nullptr in cases where a FileListCreator does not need to be created for directory
resolution.

Covered by existing tests.

  • html/FileInputType.cpp:

(WebCore::FileInputType::~FileInputType):
(WebCore::FileInputType::filesChosen):

  • html/FileInputType.h:
  • html/FileListCreator.cpp:

(WebCore::createFileList):
(WebCore::FileListCreator::create):
(WebCore::FileListCreator::FileListCreator):
(WebCore::FileListCreator::createFileList):

  • html/FileListCreator.h:

(WebCore::FileListCreator::create): Deleted.

11:24 AM Changeset in webkit [262961] by graouts@webkit.org
  • 3 edits in trunk/LayoutTests

Double tap to zoom out doesn't work after upgrading to iOS 13
https://bugs.webkit.org/show_bug.cgi?id=205158
<rdar://problem/205158>

Unreviewed. Make the test that was previously added into a test that can be run on iPad instead
of having to be skipped.

  • fast/events/ios/fast-click-double-tap-to-zoom-in-on-text-and-then-again-to-zoom-out.html:
  • platform/ipad/TestExpectations:
11:22 AM Changeset in webkit [262960] by Antti Koivisto
  • 3 edits
    2 adds in trunk

REGRESSION (r262618): Very slow typing in a github issue
https://bugs.webkit.org/show_bug.cgi?id=213137
<rdar://problem/64214117>

Reviewed by Darin Adler.

Source/WebCore:

Test: fast/media/media-query-keyframes-resolution-count.html

If a stylesheet had multiple media queries and one of them forced static resolution
(by containing @keyframes rule for example) we would end up reseting the style multiple
times and forcing unneeded style resolutions.

  • style/RuleSet.cpp:

(WebCore::Style::RuleSet::evaluteDynamicMediaQueryRules):

We can't bail out from the loop. Even though the result is known we still need to loop to
save the evaluation result for all media queries.

LayoutTests:

  • fast/media/media-query-keyframes-resolution-count-expected.txt: Added.
  • fast/media/media-query-keyframes-resolution-count.html: Added.
11:03 AM Changeset in webkit [262959] by graouts@webkit.org
  • 4 edits
    2 adds in trunk

Double tap to zoom out doesn't work after upgrading to iOS 13
https://bugs.webkit.org/show_bug.cgi?id=205158
<rdar://problem/205158>

Reviewed by Wenson Hsieh.

Source/WebKit:

Test: fast/events/ios/fast-click-double-tap-to-zoom-in-on-text-and-then-again-to-zoom-out.html

In order to determine whether a significant zoom to happen, we should use the current page scale
factor and not the initial page scale factor.

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView _handleSmartMagnificationInformationForPotentialTap:renderRect:fitEntireRect:viewportMinimumScale:viewportMaximumScale:nodeIsRootLevel:]):

LayoutTests:

Add a test that double taps to zoom in and then double taps to zoom out. This test would fail to zoom
out prior to this source change. This test is skipped on iPad since desktop-class browsing mode has
heuristics that would prevent the second double-tap to zoom out.

  • fast/events/ios/fast-click-double-tap-to-zoom-in-on-text-and-then-again-to-zoom-out-expected.txt: Added.
  • fast/events/ios/fast-click-double-tap-to-zoom-in-on-text-and-then-again-to-zoom-out.html: Added.
  • platform/ipad/TestExpectations:
10:40 AM Changeset in webkit [262958] by Jonathan Bedard
  • 6 edits in trunk/Tools

Support building test runners for watchOS and tvOS
https://bugs.webkit.org/show_bug.cgi?id=213128
<rdar://problem/64298006>

Reviewed by Tim Horton.

  • DumpRenderTree/mac/Configurations/Base.xcconfig: Link against framework stubs.
  • DumpRenderTree/mac/Configurations/DumpRenderTree.xcconfig: Apply iOS rules to all embedded sdks.
  • WebKitTestRunner/Configurations/Base.xcconfig: Link against framework stubs.
  • WebKitTestRunner/Configurations/WebKitTestRunner.xcconfig: Apply iOS rules to all embedded sdks.
  • WebKitTestRunner/Configurations/WebKitTestRunnerApp.xcconfig: Use watchOS entitlements for tvOS.
10:39 AM Changeset in webkit [262957] by Jonathan Bedard
  • 7 edits in trunk/Tools

TestWebKitAPI: Build for watchOS and tvOS
https://bugs.webkit.org/show_bug.cgi?id=213127
<rdar://problem/64297979>

Reviewed by Tim Horton.

  • TestWebKitAPI/Configurations/Base.xcconfig: Link against framework stubs.
  • TestWebKitAPI/Configurations/InjectedBundle.xcconfig: Apply iOS rules to all embedded sdks.
  • TestWebKitAPI/Configurations/TestWTF.xcconfig: Ditto.
  • TestWebKitAPI/Configurations/TestWebKitAPI.xcconfig: Link against framework stubs.
  • TestWebKitAPI/Configurations/WebProcessPlugIn.xcconfig: Apply iOS rules to all embedded sdks.
  • TestWebKitAPI/config.h: WatchOS uses SSL.
10:29 AM Changeset in webkit [262956] by Devin Rousso
  • 3 edits in trunk/Source/WebInspectorUI

Web Inspector: modify initial content localized string for Inspector Bootstrap Script
https://bugs.webkit.org/show_bug.cgi?id=213134

Reviewed by Timothy Hatcher.

  • UserInterface/Controllers/NetworkManager.js:

(WI.NetworkManager.prototype.async createBootstrapScript):

  • Localizations/en.lproj/localizedStrings.js:
9:30 AM Changeset in webkit [262955] by Jason_Lawrence
  • 2 edits in trunk/LayoutTests

REGRESSION: (r262397): [ Mac wk2 ] inspector/canvas/create-context-webgpu.html is flaky failing.
https://bugs.webkit.org/show_bug.cgi?id=213123

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
9:20 AM Changeset in webkit [262954] by Lauro Moura
  • 4 edits in trunk/LayoutTests

[GTK][WPE] Remove some duplicated entries and add missing bug info

Unreviewed test gardening

Unified the unsuported tests entries for GTK and WPE and added some
entries for the skipped top level tests.

  • platform/glib/TestExpectations:
  • platform/gtk/TestExpectations:
  • platform/wpe/TestExpectations:
9:14 AM Changeset in webkit [262953] by commit-queue@webkit.org
  • 23 edits
    1 delete in trunk

LayoutTests/imported/w3c:
Change FileReader.error to DOMException from obsoleted FileError
https://bugs.webkit.org/show_bug.cgi?id=213117

Patch by Tetsuharu Ohzeki <Tetsuharu Ohzeki> on 2020-06-12
Reviewed by Chris Dumez.

  • web-platform-tests/FileAPI/historical.https-expected.txt: FileError should not be exposed.

Source/WebCore:
FileReader.error should be DOMException now
https://bugs.webkit.org/show_bug.cgi?id=213117

Patch by Tetsuharu Ohzeki <Tetsuharu Ohzeki> on 2020-06-12
Reviewed by Chris Dumez.

By the [lastest spec](https://w3c.github.io/FileAPI/),
FileReader.error should return DOMException
and this remove obsoleted FileError from exposed interfaces.

Internally, our codebase still depends on fileapi/FileError.h
in everywhere. I'll plan to create a patch to refactor them.

  • CMakeLists.txt:
  • DerivedSources-input.xcfilelist:
  • DerivedSources-output.xcfilelist:
  • DerivedSources.make:
  • Sources.txt:
  • WebCore.order:
  • WebCore.xcodeproj/project.pbxproj:
  • fileapi/FileError.idl: Removed.
  • fileapi/FileReader.cpp:

(WebCore::FileReader::abort):
(WebCore::FileReader::didFail):

  • fileapi/FileReader.h:
  • fileapi/FileReader.idl:
  • fileapi/FileReaderSync.cpp:

(WebCore::FileReaderSync::errorCodeToException):

  • fileapi/FileReaderSync.h:

LayoutTests:
Change FileReader.error to DOMException from obsoleted FileError
https://bugs.webkit.org/show_bug.cgi?id=213117

Patch by Tetsuharu Ohzeki <Tetsuharu Ohzeki> on 2020-06-12
Reviewed by Chris Dumez.

By the [lastest spec](https://w3c.github.io/FileAPI/),
FileReader.error should return DOMException
and this change remove FileError from exposed interfaces.

  • fast/files/file-reader-abort-expected.txt:
  • fast/files/file-reader-abort-using-open-panel-expected.txt:
  • fast/files/read-blob-async-expected.txt:
  • fast/files/read-file-async-expected.txt:
  • fast/files/workers/worker-read-blob-async-expected.txt:
  • fast/files/workers/worker-read-file-async-expected.txt: Update to DOMException error code from FileError error code.
  • platform/mac-wk1/imported/w3c/web-platform-tests/FileAPI/historical.https-expected.txt: FileError should not be exposed.
9:09 AM Changeset in webkit [262952] by commit-queue@webkit.org
  • 3 edits
    2 deletes in trunk/Tools

Unreviewed, reverting r262942.
https://bugs.webkit.org/show_bug.cgi?id=213132

Broke gst-libav due to dav1d ABI bump

Reverted changeset:

"[Flatpak SDK] Add libavif"
https://bugs.webkit.org/show_bug.cgi?id=212964
https://trac.webkit.org/changeset/262942

8:55 AM Changeset in webkit [262951] by Alan Bujtas
  • 6 edits
    2 adds in trunk

[LFC][TFC] Add support for min/max-width
https://bugs.webkit.org/show_bug.cgi?id=213111

Reviewed by Antti Koivisto.

Source/WebCore:

Apply min/max-width to constrain the available width for the table content.

Test: fast/layoutformattingcontext/table-min-max-width-simple.html

  • layout/blockformatting/BlockFormattingContext.cpp:

(WebCore::Layout::BlockFormattingContext::computeWidthAndMargin):
(WebCore::Layout::BlockFormattingContext::computedWidthAndMargin):

  • layout/blockformatting/BlockFormattingContext.h:
  • layout/blockformatting/tablewrapper/TableWrapperBlockFormattingContext.cpp:

(WebCore::Layout::TableWrapperBlockFormattingContext::computeWidthAndMarginForTableBox):

LayoutTests:

  • fast/layoutformattingcontext/table-min-max-width-simple-expected.html: Added.
  • fast/layoutformattingcontext/table-min-max-width-simple.html: Added.
8:48 AM Changeset in webkit [262950] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebKit

Add WKUserScript initializer SPI with alternative names
https://bugs.webkit.org/show_bug.cgi?id=213096

Patch by Alex Christensen <achristensen@webkit.org> on 2020-06-12
Reviewed by Youenn Fablet.

And deprecate the existing ones so we can remove them soon.

  • UIProcess/API/Cocoa/WKUserScript.mm:

(-[WKUserScript _initWithSource:injectionTime:forMainFrameOnly:includeMatchPatternStrings:excludeMatchPatternStrings:associatedURL:contentWorld:deferRunningUntilNotification:]):

  • UIProcess/API/Cocoa/WKUserScriptPrivate.h:
8:45 AM Changeset in webkit [262949] by ysuzuki@apple.com
  • 1 edit
    1 add in trunk/JSTests

[JSC] Add sampling-profiler code-origin lookup test
https://bugs.webkit.org/show_bug.cgi?id=213108
<rdar://problem/52044072>

Reviewed by Saam Barati.

This is fixed by r262920. This patch just adds a test additionally.
We are keeping CallSiteIndex valid until corresponding JIT stub is destroyed.
This fixes SamplingProfiler too since SamplingProfiler also collects CallSiteIndex and gets corresponding CodeOrigin.
Since SamplingProfiler does this CallSiteIndex => CodeOrigin before running GC finalizer, validity of CallSiteIndex
should be kept correctly.

  • stress/sampling-profiler-code-origin.js: Added.

(let.oThrow.get f):
(foo):
(return.get f):
(f):

8:43 AM Changeset in webkit [262948] by Lauro Moura
  • 2 edits in trunk/WebDriverTests

[WebDriver][WPE] Add remaining WPE failures to expectations.

Unreviewed test gardening.

8:19 AM Changeset in webkit [262947] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebKit

Unreviewed. Fix GTK4 build

  • UIProcess/API/gtk/WebKitWebViewBase.cpp:

(webkitWebViewBaseSynthesizeKeyEvent):

7:40 AM Changeset in webkit [262946] by Antti Koivisto
  • 46 edits
    2 adds in trunk

Relative font size values (em) within CSS animations compound
https://bugs.webkit.org/show_bug.cgi?id=194749
<rdar://problem/48171898>

Reviewed by Antoine Quint.

Source/WebCore:

The em unit should be relative to the font size of the parent style when resolving 'font-size' property.
We weren't passing the parent style when resolving keyframes.

Test case by Scott Kellum.

Test: animations/keyframe-em-unit.html

  • style/StyleResolver.cpp:

(WebCore::Style::Resolver::styleForKeyframe):

  • style/StyleResolver.h:

(WebCore::Style::Resolver::overrideDocumentElementStyle const):
(WebCore::Style::Resolver::setOverrideDocumentElementStyle):
(WebCore::Style::Resolver::setParentElementStyleForKeyframes):

Add a way to pass the parent element style directly to the style resolver.
This should really be passed via the animation system like other context but that requires
lots of refactoring.

  • style/StyleTreeResolver.cpp:

(WebCore::Style::TreeResolver::createAnimatedElementUpdate):

Pass it.

LayoutTests:

  • animations/keyframe-em-unit-expected.html: Added.
  • animations/keyframe-em-unit.html: Added.
7:28 AM Changeset in webkit [262945] by weinig@apple.com
  • 15 edits in trunk

Document.currentScript does not work for SVGScriptElements
https://bugs.webkit.org/show_bug.cgi?id=213104

Reviewed by Yusuke Suzuki.

LayoutTests/imported/w3c:

  • web-platform-tests/html/dom/documents/dom-tree-accessors/Document.currentScript-expected.txt:

Update test results after making currentScript work with SVGScriptElements.

  • web-platform-tests/content-security-policy/nonce-hiding/svgscript-nonces-hidden-meta.tentative.sub-expected.txt:
  • web-platform-tests/content-security-policy/nonce-hiding/svgscript-nonces-hidden.tentative-expected.txt:

Update results. Not passing, but getting further.

Source/WebCore:

Updates results for existing tests.

  • WebCore.xcodeproj/project.pbxproj:

Add CurrentScriptIncrementer.h to the Xcode project as it was missing.

  • dom/CurrentScriptIncrementer.h:

(WebCore::CurrentScriptIncrementer::CurrentScriptIncrementer):
(WebCore::CurrentScriptIncrementer::~CurrentScriptIncrementer):
Re-work using ScriptElement, removing the HTMLScriptElement checks. Also changes
scriptType check to explicitly check that against classic scripts, as they are
the only supported type, and if any types other than modules are added in the
future, we would not want this to change behavior.

  • dom/Document.cpp:

(WebCore::Document::pushCurrentScript):

  • dom/Document.h:

(WebCore::Document::currentScript const):
Use an Element, rather than an HTMLScriptElement for currentScript/currentScriptStack
so that either an HTMLScriptElement or an SVGScriptElement can be stored. Using a
ScriptElement would be possible, but would complicate the implementation unnecessarily
by requiring currentScript to have an additional checks before extracting the Element.
Variant<RefPtr<HTMLScriptElement>, RefPtr<SVGScriptElement>> could also have been used
but also would unnecessarily complicated the interface and caused more memory to be used.

  • dom/Document.idl:

Update interface to use Element rather HTMLScriptElement with a comment explaining why we
are not using HTMLOrSVGScriptElement but retaining the same observable behavior.

  • dom/ScriptElement.cpp:

(WebCore::ScriptElement::executeClassicScript):
(WebCore::ScriptElement::executeModuleScript):
Pass *this directly to CurrentScriptIncrementer to simplify implementation.

Source/WebKit:

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentGtk.cpp:

(webkit_dom_document_get_current_script):
Update to account for change in Document::currentScript() now returning an
Element* that can be either an HTMLScriptElement or an SVGScriptElement. To
keep API compatibility, only return non-null for HTMLScriptElements.

Source/WebKitLegacy/mac:

  • DOM/DOMDocument.mm:

(-[DOMDocument currentScript]):
Update to account for change in Document::currentScript() now returning an
Element* that can be either an HTMLScriptElement or an SVGScriptElement. To
keep API compatibility, only return non-null for HTMLScriptElements.

6:21 AM Changeset in webkit [262944] by Carlos Garcia Campos
  • 2 edits in trunk/Tools

Unreviewed. Fix GTK WebDriver tests after r262938

Ensure a valid title for backforward items in MiniBrowser, using the URL when the title is empty.

  • MiniBrowser/gtk/BrowserWindow.c:

(browserWindowCreateBackForwardMenu):

2:54 AM Changeset in webkit [262943] by Philippe Normand
  • 2 edits in trunk/Tools

[Flatpak SDK] Update GTK4 to 3.98.5

Rubber-stamped by Carlos Alberto Lopez Perez.

  • buildstream/elements/sdk/gtk.bst:
2:24 AM Changeset in webkit [262942] by commit-queue@webkit.org
  • 3 edits
    2 adds in trunk/Tools

[Flatpak SDK] Add libavif
https://bugs.webkit.org/show_bug.cgi?id=212964

Patch by Philippe Normand <pnormand@igalia.com> on 2020-06-12
Reviewed by Carlos Alberto Lopez Perez.

  • buildstream/elements/freedesktop-sdk.bst:
  • buildstream/elements/sdk-platform.bst:
  • buildstream/elements/sdk/libavif.bst: Added.
  • buildstream/patches/fdo/0001-dav1d-Bump-to-0.7.0.patch: Added.
2:22 AM Changeset in webkit [262941] by commit-queue@webkit.org
  • 3 edits
    1 add in trunk/Tools

[Flatpak SDK] Add libkate
https://bugs.webkit.org/show_bug.cgi?id=212865

Patch by Philippe Normand <pnormand@igalia.com> on 2020-06-12
Reviewed by Carlos Alberto Lopez Perez.

The GStreamer kate decoder is required for some media/track tests being re-enabled in bug
120665.

  • buildstream/elements/sdk-platform.bst:
  • buildstream/elements/sdk/gst-plugins-bad.bst:
  • buildstream/elements/sdk/libkate.bst: Added.
1:49 AM Changeset in webkit [262940] by cturner@igalia.com
  • 2 edits
    1 add in trunk/Source/WebKit

[GTK] Add an internal API to run javascript without forced user gestures
https://bugs.webkit.org/show_bug.cgi?id=212969

Reviewed by Carlos Garcia Campos.

To be used by tests in a follow-up commit.

  • UIProcess/API/glib/WebKitWebView.cpp:

(webkitWebViewRunJavaScriptWithParams): Factor out the glue to run
JavaScript in the page.
(webkitWebViewRunJavascriptWithoutForcedUserGestures): Add a new
internal API for use by tests.
(webkit_web_view_run_javascript): Modified to use factored out
glue.

  • UIProcess/API/glib/WebKitWebViewInternal.h: Added. Place to keep

API test-specific internal APIs.

1:42 AM Changeset in webkit [262939] by Carlos Garcia Campos
  • 10 edits
    1 move
    1 add
    1 delete in trunk

[GTK4] Get MiniBrowser ready for GTK4
https://bugs.webkit.org/show_bug.cgi?id=210276

Reviewed by Adrian Perez de Castro.

.:

Bump GTK4 required version.

  • Source/cmake/OptionsGTK.cmake:

Tools:

Port MiniBrowser to GTK4. BrowserSearchBar has been renamed as BrowserSearchBox, because in GTK GtkSearchBar is
final class, so we derive from GtkBox and to be used as contents of a GtkSearchBar.

  • MiniBrowser/gtk/BrowserCellRendererVariant.c:

(browserCellRendererVariantCellRendererSnapshot):
(browser_cell_renderer_variant_class_init):

  • MiniBrowser/gtk/BrowserCellRendererVariant.h:
  • MiniBrowser/gtk/BrowserSearchBar.c: Removed.
  • MiniBrowser/gtk/BrowserSearchBox.c: Added.

(setFailedStyleForEntry):
(doSearch):
(searchNext):
(searchPrevious):
(searchEntryMenuIconPressedCallback):
(searchEntryClearIconReleasedCallback):
(searchEntryChangedCallback):
(searchEntryActivatedCallback):
(searchPreviousButtonCallback):
(searchNextButtonCallback):
(searchMenuCheckButtonToggledCallback):
(findControllerFailedToFindTextCallback):
(findControllerFoundTextCallback):
(browserSearchBoxFinalize):
(browserSearchBoxDispose):
(browserSearchBoxSizeAllocate):
(browser_search_box_class_init):
(browser_search_box_new):
(browser_search_box_get_entry):

  • MiniBrowser/gtk/BrowserSearchBox.h: Renamed from Tools/MiniBrowser/gtk/BrowserSearchBar.h.
  • MiniBrowser/gtk/BrowserSettingsDialog.c:

(browser_settings_dialog_init):
(browser_settings_dialog_new):

  • MiniBrowser/gtk/BrowserSettingsDialog.h:
  • MiniBrowser/gtk/BrowserTab.c:

(loadChanged):
(createInfoBarQuestionMessage):
(tlsErrorsDialogResponse):
(loadFailedWithTLSerrors):
(permissionRequestDialogResponse):
(decidePermissionRequest):
(colorChooserRequestFinished):
(runColorChooserCallback):
(tabCloseClicked):
(browserTabConstructed):
(browserTabIsSearchBarOpen):
(browser_tab_start_search):
(browser_tab_stop_search):
(browser_tab_enter_fullscreen):
(browser_tab_leave_fullscreen):

  • MiniBrowser/gtk/BrowserWindow.c:

(settingsCallback):
(resetEntryProgress):
(webViewLoadProgressChanged):
(browserWindowCreateBackForwardMenu):
(browserWindowUpdateNavigationMenu):
(navigationButtonPressed):
(navigationButtonPressCallback):
(scrollEventCallback):
(webViewIsLoadingChanged):
(searchCallback):
(insertImageDialogResponse):
(insertImageCommandCallback):
(insertLinkDialogResponse):
(insertLinkCommandCallback):
(typingAttributesChanged):
(browserWindowSaveSession):
(browserWindowFinalize):
(browserWindowDispose):
(addToolbarButton):
(browserWindowSwitchTab):
(browserWindowTabAddedOrRemoved):
(browserWindowBuildPopoverMenu):
(browserWindowCloseRequest):
(browserWindowDeleteEvent):
(browser_window_class_init):
(browser_window_append_view):
(browser_window_set_background_color):

  • MiniBrowser/gtk/CMakeLists.txt:
1:28 AM Changeset in webkit [262938] by Carlos Garcia Campos
  • 2 edits in trunk/Tools

[GTK] MiniBrowser: stop using GtkToolbar
https://bugs.webkit.org/show_bug.cgi?id=212898

Reviewed by Adrian Perez de Castro.

GtkToolbar iss no longer available in GTK4, use a GtkBox with buttons instead. Also use symbolic icons and move
some of the actions to a gear menu.

  • MiniBrowser/gtk/BrowserWindow.c:

(browserWindowHistoryItemActivated):
(browserWindowCreateBackForwardMenu):
(browserWindowUpdateNavigationMenu):
(navigationButtonPressCallback):
(browserWindowCanZoomDefault):
(browserWindowUpdateZoomActions):
(webViewIsLoadingChanged):
(addToolbarButton):
(browserWindowBuildPopoverMenu):
(resetStatusText): Deleted.
(browserWindowHistoryItemSelected): Deleted.
(browserWindowSetupEditorToolbarItem): Deleted.

1:25 AM Changeset in webkit [262937] by Carlos Garcia Campos
  • 4 edits in trunk/Tools

[GTK] MiniBrowser: stop using GtkToolbar for the search bar
https://bugs.webkit.org/show_bug.cgi?id=212817

Reviewed by Adrian Perez de Castro.

Use a GtkSearchBar instead, because GtkToolbar is no longer available in GTK4. Also use a GtkPopover for the
options menu instead of the GtkMenu.

  • MiniBrowser/gtk/BrowserSearchBar.c:

(setFailedStyleForEntry):
(doSearch):
(searchEntryMenuIconPressedCallback):
(searchEntryChangedCallback):
(searchMenuCheckButtonToggledCallback):
(browserSearchBarFinalize):
(browser_search_bar_new):
(browser_search_bar_open):
(browser_search_bar_close):
(browser_search_bar_is_open):
(searchCloseButtonClickedCallback): Deleted.
(searchEntryClearIconReleasedCallback): Deleted.

  • MiniBrowser/gtk/BrowserSearchBar.h:
  • MiniBrowser/gtk/BrowserTab.c:

(browser_tab_start_search):
(browser_tab_stop_search):

1:19 AM Changeset in webkit [262936] by Carlos Garcia Campos
  • 9 edits in trunk

[GTK4] Make WebDriver work
https://bugs.webkit.org/show_bug.cgi?id=212316

Reviewed by Adrian Perez de Castro.

Source/WebCore:

Add helper gtk definitions to avoid ifdefs and implement currentScreenMonitor() for GTK4.

  • platform/gtk/GtkVersioning.h:

(gtk_window_move):
(gtk_window_minimize):
(gtk_window_unminimize):

  • platform/gtk/PlatformScreenGtk.cpp:

(WebCore::currentScreenMonitor):
(WebCore::screenRect):
(WebCore::screenAvailableRect):
(WebCore::getCurrentScreenMonitor): Deleted.

Source/WebKit:

Fix UIClient::setWindowFrame to wait for surface size-changed signal after resizing the window and implement
maximize, minimize and restore windows for GTK4.

  • UIProcess/API/glib/WebKitUIClient.cpp:
  • UIProcess/API/gtk/WebKitWebViewGtk.cpp:

(surfaceStateChangedCallback):
(webkitWebViewMonitorWindowState):
(webkitWebViewMaximizeWindow):
(webkitWebViewMinimizeWindow):
(webkitWebViewRestoreWindow):

Tools:

Stop connecting to WebKitWebView::close signal twice for newaly created windows.

  • MiniBrowser/gtk/BrowserWindow.c:

(webViewCreate):

12:01 AM Changeset in webkit [262935] by Keith Rollin
  • 4 edits in trunk/Source/WebKitLegacy

Add dependencies for Migrate Headers and Generate Export Files build phases
https://bugs.webkit.org/show_bug.cgi?id=213072
<rdar://problem/64249345>

Reviewed by Tim Horton.

These build phases have incomplete specifications for the files they
consume and produce, which can lead to incorrect builds. Address this
by:

  • Adding the WebCore/PrivateHeaders directory (which contains the headers being migrated) as input to the Migrate Headers build phase
  • Touching a timestamp file when re-exporting any headers in the Migrate Headers build phase
  • Adding the timestamp file as an output of the Migrate Headers build phase
  • Adding the timestamp file as an input of the Generate Export Files build phase
  • Adding other files that Generate Export Files consumes to the list of input files

In this way, if any exported headers are changed, both Migrate Headers
and Generate Export Files will be run.

Source/WebKitLegacy:

  • WebKitLegacy.xcodeproj/project.pbxproj:

Source/WebKitLegacy/mac:

  • MigrateHeaders.make:

Jun 11, 2020:

11:17 PM Changeset in webkit [262934] by Diego Pino Garcia
  • 2 edits in trunk/LayoutTests

[GTK] Gardening, update test expectations after r262932
https://bugs.webkit.org/show_bug.cgi?id=213115

Unreviewed test gardening.

  • platform/glib/TestExpectations:
11:02 PM Changeset in webkit [262933] by ddkilzer@apple.com
  • 83 edits
    1 add in trunk/Source

[IPC] Add WTF::EnumTraits<> for every enum type used in IPC
<https://webkit.org/b/213093>

Reviewed by Darin Adler.

Summary:

  • Change underlying type of enum class to bool when there are only two values. In some cases, reorder the two values so the mapping to 0 and 1 makes more sense. Converting every enum to an enum class is not a goal of this patch, so some two-value enums stil have WTF::EnumTraits<> defined as noted below.
  • Add WTF::EnumTraits<> for the remaining enum types that are used by IPC::Encoder::encodeEnum() and IPC::Decoder::decodeEnum() so that WTF::isValidEnum<>() checks may be added next.
  • Add #include <WebCore/LibWebRTCEnumTraits.h> as needed.

Source/WebCore:

  • Headers.cmake:
  • WebCore.xcodeproj/project.pbxproj:
  • Add LibWebRTCEnumTraits.h to project. Keep these definitions separate from the libwebrtc project cut down on changes to re-merge after updating.
  • platform/mediastream/libwebrtc/LibWebRTCEnumTraits.h: Add.
  • Modules/applepay/ApplePaySessionPaymentRequest.h:
  • Modules/indexeddb/IDBTransactionMode.h:
  • Modules/indexeddb/IndexedDB.h:

(WTF::EnumTraits<WebCore::IndexedDB::IndexRecordType>):

  • Remove after changing enum class to bool.
  • Modules/indexeddb/shared/IDBGetRecordData.h:
  • Modules/indexeddb/shared/IDBResultData.h:
  • WebCore.xcodeproj/project.pbxproj:
  • dom/ExceptionCode.h:
  • editing/CompositionUnderline.h:
  • html/Autofill.h:
  • html/DataListSuggestionInformation.h:
  • html/EnterKeyHint.h:
  • html/LinkIconType.h:
  • loader/FrameLoaderTypes.h:
  • Alphabetize WTF::EnumTraits<> definitions.
  • loader/ResourceLoaderOptions.h:
  • page/SecurityOrigin.h:
  • page/UserStyleSheetTypes.h:

(WTF::EnumTraits<WebCore::UserStyleLevel>):

  • Define this since UserStyleLevel is not an enum class.
  • page/scrolling/ScrollingCoordinatorTypes.h:
  • platform/ContextMenuItem.h:
  • platform/Cursor.h:
  • platform/DragData.h:
  • platform/FileChooser.h:
  • platform/PopupMenuStyle.h:
  • platform/ScreenProperties.h:
  • platform/ScrollTypes.h:
  • platform/SerializedPlatformDataCueValue.h:

(WebCore::SerializedPlatformDataCueValue::PlatformType):

  • Convert from enum to enum class.
  • platform/UserInterfaceLayoutDirection.h:
  • platform/animation/TimingFunction.h:
  • platform/graphics/GraphicsContext.h:
  • platform/graphics/GraphicsLayer.h:
  • platform/graphics/GraphicsTypes.h:
  • Alphabetize WTF::EnumTraits<> definitions.
  • platform/graphics/Image.h:
  • platform/graphics/Path.h:
  • platform/graphics/ca/PlatformCAAnimation.h:
  • platform/graphics/ca/PlatformCALayer.h:
  • platform/graphics/filters/FilterOperation.h:
  • platform/mediastream/MediaConstraints.h:
  • platform/mediastream/MediaStreamRequest.h:

(WTF::EnumTraits<WebCore::MediaStreamRequest::Type>):

  • Fix EnumTraits definition (missing "::Type").
  • platform/mediastream/RealtimeMediaSourceCapabilities.h:
  • platform/mediastream/RealtimeMediaSourceSupportedConstraints.h:
  • platform/network/CredentialBase.h:
  • platform/network/ProtectionSpaceBase.h:
  • platform/network/ResourceErrorBase.h:
  • platform/network/soup/SoupNetworkProxySettings.h:
  • platform/text/TextChecking.h:

(WTF::EnumTraits<WebCore::TextCheckingProcessType):

  • Define this since TextCheckingProcessType is not an enum class.
  • platform/text/WritingMode.h:
  • rendering/Pagination.h:
  • workers/service/ServiceWorkerJobType.h:

Source/WebKit:

  • GPUProcess/GPUConnectionToWebProcess.h:
  • GPUProcess/GPUProcess.h:
  • NetworkProcess/NetworkLoadParameters.h:
  • Shared/API/APIObject.h:
  • Shared/ContextMenuContextData.h:
  • Shared/DrawingAreaInfo.h:
  • Shared/FocusedElementInformation.h:
  • Shared/PrintInfo.h:

(WTF::EnumTraits<WebKit::PrintInfo::PrintMode>):

  • Define this since PrintMode is not an enum class.
  • Shared/RTCPacketOptions.cpp:
  • Shared/SessionState.h:
  • Shared/TouchBarMenuItemData.h:
  • Shared/WebEvent.h:
  • Shared/WebPopupItem.cpp:

(WebKit::WebPopupItem::WebPopupItem):

  • Fix reference to WebPopupItem::Type enum.
  • Shared/WebPopupItem.h:

(WebKit::WebPopupItem::Type):

  • Convert from enum to enum class.
  • Shared/WebsiteData/WebsiteDataType.h:
  • Shared/glib/InputMethodState.h:
  • Shared/glib/UserMessage.h:
  • Shared/mac/ColorSpaceData.mm:
  • Shared/mac/SecItemRequestData.h:
  • UIProcess/mac/WebPopupMenuProxyMac.mm:

(WebKit::WebPopupMenuProxyMac::populate):

  • Fix reference to WebPopupItem::Type enum.
  • WebProcess/Plugins/Plugin.cpp:
  • WebProcess/WebCoreSupport/WebPopupMenu.cpp:

(WebKit::WebPopupMenu::populateItems):

  • Fix reference to WebPopupItem::Type enum.
  • WebProcess/WebPage/RemoteLayerTree/PlatformCAAnimationRemote.h:
5:29 PM Changeset in webkit [262932] by sbarati@apple.com
  • 4 edits in trunk/Source/JavaScriptCore

Linear Scan uses the wrong Interval for spills for tmps with roles of early def or late use
https://bugs.webkit.org/show_bug.cgi?id=213055
<rdar://problem/59874018>

Reviewed by Yusuke Suzuki.

There was a bug in linear scan when computing the live range interval for
spill tmps that had early defs or late uses. When linear scan spills a
tmp, it creates a new tmp that it loads to and stores from, and replaces the old tmp
with the new tmp, and emits stores/loads around pertinent instructions. The live
interval for such tmps is small by nature, it's contained in the interval for the
instruction itself. However, we'd build this interval purely based off the
original tmp's arg timing. So, for example, let's consider a program like this:

RandoInsn: LateUse:Tmp1, Use:Tmp2, [early = N, late = N+1]
Let's say that Tmp1's last use is RandoInsn, and it had a def before
RandoInsn, therefore, its live range will be something like:
[J where J < N, N+1]

and now imagine we spilled Tmp1 for some reason, and rewrote the
program to be:
Move Addr(spill for Tmp1), TmpSpill
RandoInsn: LateUse:TmpSpill, Use:Tmp2, [early = N, late = N+1]

We used to incorrectly mark the live range for TmpSpill to just be [N+1, N+2).
However, the bug here is that we neglected that TmpSpill actually had an earlier
def at [N, N+1). So, the live range for TmpSpill was wrong. This could incorrectly
lead us to allocate Tmp2 and TmpSpill to the same register, since their live
ranges may not intersect if Tmp2 dies at RandoInsn.

We also had the symmetric bug for EarlyDefs: we wouldn't account for the
store-spill that'd happen after something like RandoInsn.

The fix is to account for the loads/stores of spill tmps when assigning
them a live range.

This patch contains a standalone test in testair. It also fixes crashes we had when
running B3O1 tests using typed arrays on arm64e since we had patchpoints that utilized
LateUse for signing and auth.

  • b3/B3Procedure.h:
  • b3/air/AirAllocateRegistersAndStackByLinearScan.cpp:
  • b3/air/testair.cpp:
5:09 PM Changeset in webkit [262931] by sbarati@apple.com
  • 2 edits in trunk/Tools

Skip wasm-js2 test on memory limited devices
https://bugs.webkit.org/show_bug.cgi?id=213099

Reviewed by Yusuke Suzuki.

  • Scripts/run-jsc-stress-tests:
4:51 PM Changeset in webkit [262930] by commit-queue@webkit.org
  • 8 edits in trunk

Re-enable download resume tests
https://bugs.webkit.org/show_bug.cgi?id=213098
<rdar://problem/63512518>

Patch by Alex Christensen <achristensen@webkit.org> on 2020-06-11
Reviewed by Geoffrey Garen.

Source/WebCore/PAL:

  • pal/spi/cf/CFNetworkSPI.h:

Source/WebKit:

  • NetworkProcess/cocoa/NetworkSessionCocoa.mm:

(-[WKNetworkSessionDelegate URLSession:downloadTask:didResumeAtOffset:expectedTotalBytes:]):

Source/WTF:

Workaround is no longer needed because underlying bug has been fixed.

  • wtf/PlatformHave.h:

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/Download.mm:
4:43 PM Changeset in webkit [262929] by Beth Dakin
  • 2 edits in trunk/Source/WebCore

Fix comment after blocklist transition
https://bugs.webkit.org/show_bug.cgi?id=213100

Reviewed by Wenson Hsieh.

  • platform/mac/PasteboardMac.mm:

(WebCore::cocoaTypeFromHTMLClipboardType):

3:47 PM Changeset in webkit [262928] by sbarati@apple.com
  • 13 edits
    2 moves in trunk/Source/JavaScriptCore

Replace uses of black/white list with block/allow list
https://bugs.webkit.org/show_bug.cgi?id=213084

Reviewed by Keith Miller.

We should be using racially neutral names in our code. From Chromium style guide:

"Terms such as 'blacklist' and 'whitelist' reinforce the notion that
black==bad and white==good."

  • JavaScriptCore.xcodeproj/project.pbxproj:
  • Sources.txt:
  • b3/air/AirLowerAfterRegAlloc.cpp:

(JSC::B3::Air::lowerAfterRegAlloc):

  • dfg/DFGDriver.cpp:

(JSC::DFG::ensureGlobalDFGAllowlist):
(JSC::DFG::compileImpl):
(JSC::DFG::ensureGlobalDFGWhitelist): Deleted.

  • dfg/DFGTierUpCheckInjectionPhase.cpp:

(JSC::DFG::ensureGlobalFTLAllowlist):
(JSC::DFG::TierUpCheckInjectionPhase::run):
(JSC::DFG::ensureGlobalFTLWhitelist): Deleted.

  • heap/MachineStackMarker.cpp:
  • inspector/scripts/codegen/objc_generator.py:

(ObjCGenerator.should_generate_types_for_domain):
(ObjCGenerator.should_generate_commands_for_domain):
(ObjCGenerator.should_generate_events_for_domain):

  • llint/LLIntSlowPaths.cpp:

(JSC::LLInt::ensureGlobalJITAllowlist):
(JSC::LLInt::shouldJIT):
(JSC::LLInt::ensureGlobalJITWhitelist): Deleted.

  • runtime/OptionsList.h:
  • tools/FunctionAllowlist.cpp: Copied from Source/JavaScriptCore/tools/FunctionWhitelist.cpp.

(JSC::FunctionAllowlist::FunctionAllowlist):
(JSC::FunctionAllowlist::contains const):
(JSC::FunctionWhitelist::FunctionWhitelist): Deleted.
(JSC::FunctionWhitelist::contains const): Deleted.

  • tools/FunctionAllowlist.h: Copied from Source/JavaScriptCore/tools/FunctionWhitelist.h.
  • tools/FunctionWhitelist.cpp: Removed.
  • tools/FunctionWhitelist.h: Removed.
3:31 PM Changeset in webkit [262927] by commit-queue@webkit.org
  • 2 edits in trunk/Tools

Unreviewed, reverting r262696.
https://bugs.webkit.org/show_bug.cgi?id=213097

It broke running JSC tests on watchOS

Reverted changeset:

"Allow run-jsc-stress-tests still run if some of the remote
hosts are not available"
https://bugs.webkit.org/show_bug.cgi?id=201426
https://trac.webkit.org/changeset/262696

3:11 PM Changeset in webkit [262926] by sihui_liu@apple.com
  • 2 edits in trunk/Tools

REGRESSION (r262879): 3 TestWebKitAPI.TextManipulation tests are failing
https://bugs.webkit.org/show_bug.cgi?id=213079
<rdar://problem/64256870>

Reviewed by Wenson Hsieh.

Update a few tests after behavior change in r262879. From r262879, we no longer use visible positions of element
to calculate range to observe. Instead, we use the first and end position in the element to decide the range. In
previous implementation, the range can be extended to outside of the element, like some visible positon before
or after the element.

TextManipulation.StartTextManipulationFindNewlyDisplayedParagraph: Different elements would make separate ranges
because we create range with the boundaries of element. We can consider merging adjacent ranges later.
TextManipulation.StartTextManipulationFindSameParagraphWithNewContent: The newly observing range only includes
the newly inserted element now.
TextManipulation.InsertingContentIntoAlreadyManipulatedContentDoesNotCreateTextManipulationItem: The p element
is not manipulated as it is the common ancestor of manipulated elements. And we want to make sure the newly
inserted element is child of a manipulated element.

  • TestWebKitAPI/Tests/WebKitCocoa/TextManipulation.mm:

(TestWebKitAPI::TEST):

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

REGRESSION (r262776): Flaky crash under -[WebCoreResourceHandleAsOperationQueueDelegate connection:willSendRequest:redirectResponse:]
https://bugs.webkit.org/show_bug.cgi?id=213059

Patch by Rob Buis <rbuis@igalia.com> on 2020-06-11
Reviewed by Alex Christensen.

My r262776 patch did not null check m_handle and it can cause crashes
in some cases, so add the check.

  • platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm:

(-[WebCoreResourceHandleAsOperationQueueDelegate connection:willSendRequest:redirectResponse:]):

2:02 PM Changeset in webkit [262924] by Jonathan Bedard
  • 2 edits in trunk/Source/WTF

WebKit: Make UIGestureRecognizer build for watchOS and tvOS
https://bugs.webkit.org/show_bug.cgi?id=213038
<rdar://problem/64217654>

Reviewed by Tim Horton.

  • wtf/PlatformHave.h: Enable HAVE(UI_GESTURE_RECOGNIZER_MODIFIER_FLAGS) for watchOS and tvOS.
1:47 PM Changeset in webkit [262923] by Alan Coon
  • 6 edits in branches/safari-609-branch

Cherry-pick r261217. rdar://problem/62978240

Fix animation ordering to make imported/w3c/web-platform-tests/css/css-animations/Element-getAnimations.tentative.html pass
https://bugs.webkit.org/show_bug.cgi?id=211468
<rdar://problem/62732578>

Reviewed by David Kilzer.

LayoutTests/imported/w3c:

Mark the final two failures in imported/w3c/web-platform-tests/css/css-animations/Element-getAnimations.tentative.html as PASS.

  • web-platform-tests/css/css-animations/Element-getAnimations.tentative-expected.txt:

Source/WebCore:

The "Animation composite order" section of the CSS Animations Level 2 specification (https://drafts.csswg.org/css-animations-2/#animation-composite-order)
defines the relative composite order of animations. We bake this into compareAnimationsByCompositeOrder(), but this function would not yield consistent
results if it is called in a non-stable sort, because if both CSSAnimation objects passed to this function have the same backing Animation object, they
would not return the same value if passed in a different order. The Web Animations spec always ensures that procedures that sort using the composite
order are called as part of a stable sort. So we change all call sites to use std::stable_sort and add an assertion in case we have two CSSAnimation
objects with the same backing Animation objects to catch cases like this in the future.

Finally, since we already know only relevant animations can find their way into the output of Document::getAnimations(), we also ensure we iterate over
m_animations (which holds only relevant animations) rather than m_allAnimations (which may not).

  • animation/DocumentTimeline.cpp: (WebCore::DocumentTimeline::getAnimations const):
  • animation/KeyframeEffectStack.cpp: (WebCore::KeyframeEffectStack::ensureEffectsAreSorted):
  • animation/WebAnimationUtilities.cpp: (WebCore::compareAnimationsByCompositeOrder):

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

1:47 PM Changeset in webkit [262922] by Beth Dakin
  • 39 edits in trunk/Source

Replace instances of whitelist in WebCore with allowlist
https://bugs.webkit.org/show_bug.cgi?id=213068

Reviewed by Tim Horton.

Source/WebCore:

  • Modules/webdatabase/DatabaseAuthorizer.cpp:

(WebCore::DatabaseAuthorizer::DatabaseAuthorizer):
(WebCore::DatabaseAuthorizer::addAllowedFunctions):
(WebCore::DatabaseAuthorizer::allowFunction):
(WebCore::DatabaseAuthorizer::addWhitelistedFunctions): Deleted.

  • Modules/webdatabase/DatabaseAuthorizer.h:
  • dom/ExtensionStyleSheets.cpp:

(WebCore::ExtensionStyleSheets::updateInjectedStyleSheetCache const):

  • loader/CrossOriginAccessControl.cpp:

(WebCore::isOnAccessControlSimpleRequestMethodAllowlist):
(WebCore::isSimpleCrossOriginAccessRequest):
(WebCore::isOnAccessControlSimpleRequestMethodWhitelist): Deleted.

  • loader/CrossOriginAccessControl.h:
  • loader/CrossOriginPreflightResultCache.cpp:

(WebCore::CrossOriginPreflightResultCacheItem::allowsCrossOriginMethod const):

  • loader/appcache/ApplicationCache.cpp:

(WebCore::ApplicationCache::setOnlineAllowlist):
(WebCore::ApplicationCache::isURLInOnlineAllowlist):
(WebCore::ApplicationCache::setOnlineWhitelist): Deleted.
(WebCore::ApplicationCache::isURLInOnlineWhitelist): Deleted.

  • loader/appcache/ApplicationCache.h:

(WebCore::ApplicationCache::onlineAllowlist const):
(WebCore::ApplicationCache::onlineWhitelist const): Deleted.

  • loader/appcache/ApplicationCacheGroup.cpp:

(WebCore::ApplicationCacheGroup::didFinishLoadingManifest):

  • loader/appcache/ApplicationCacheHost.cpp:

(WebCore::ApplicationCacheHost::shouldLoadResourceFromApplicationCache):
(WebCore::ApplicationCacheHost::getApplicationCacheFallbackResource):

  • loader/appcache/ApplicationCacheStorage.cpp:

(WebCore::ApplicationCacheStorage::fallbackCacheGroupForURL):
(WebCore::ApplicationCacheStorage::openDatabase):
(WebCore::ApplicationCacheStorage::store):
(WebCore::ApplicationCacheStorage::loadCache):

  • loader/appcache/ManifestParser.cpp:

(WebCore::parseManifest):

  • loader/appcache/ManifestParser.h:
  • page/Frame.cpp:

(WebCore::Frame::injectUserScriptImmediately):

  • page/SecurityOrigin.cpp:

(WebCore::SecurityOrigin::canRequest const):
(WebCore::SecurityOrigin::canDisplay const):

  • page/SecurityPolicy.cpp:

(WebCore::SecurityPolicy::isAccessAllowed):
(WebCore::SecurityPolicy::addOriginAccessAllowlistEntry):
(WebCore::SecurityPolicy::removeOriginAccessAllowlistEntry):
(WebCore::SecurityPolicy::resetOriginAccessAllowlists):
(WebCore::SecurityPolicy::isAccessWhiteListed): Deleted.
(WebCore::SecurityPolicy::addOriginAccessWhitelistEntry): Deleted.
(WebCore::SecurityPolicy::removeOriginAccessWhitelistEntry): Deleted.
(WebCore::SecurityPolicy::resetOriginAccessWhitelists): Deleted.

  • page/SecurityPolicy.h:
  • page/UserContentURLPattern.cpp:

(WebCore::UserContentURLPattern::matchesPatterns):

  • page/UserContentURLPattern.h:
  • page/UserScript.h:

(WebCore::UserScript::UserScript):
(WebCore::UserScript::allowlist const):
(WebCore::UserScript::encode const):
(WebCore::UserScript::decode):
(WebCore::UserScript::whitelist const): Deleted.

  • page/UserStyleSheet.h:

(WebCore::UserStyleSheet::UserStyleSheet):
(WebCore::UserStyleSheet::allowlist const):
(WebCore::UserStyleSheet::whitelist const): Deleted.

  • platform/graphics/FontCache.h:
  • platform/graphics/cocoa/FontCacheCoreText.cpp:

(WebCore::fontAllowlist):
(WebCore::FontCache::setFontAllowlist):
(WebCore::platformFontLookupWithFamily):
(WebCore::fontWhitelist): Deleted.
(WebCore::FontCache::setFontWhitelist): Deleted.

  • platform/network/HTTPParsers.cpp:

(WebCore::isValidAcceptHeaderValue):

  • rendering/FloatingObjects.h:
  • style/ElementRuleCollector.cpp:

(WebCore::Style::ElementRuleCollector::transferMatchedRules):

  • style/ElementRuleCollector.h:
  • style/PropertyCascade.cpp:

(WebCore::Style::PropertyCascade::addMatch):

  • style/RuleData.cpp:

(WebCore::Style::determinePropertyAllowlistType):
(WebCore::Style::RuleData::RuleData):
(WebCore::Style::determinePropertyWhitelistType): Deleted.

  • style/RuleData.h:

(WebCore::Style::RuleData::propertyAllowlistType const):
(WebCore::Style::RuleData::propertyWhitelistType const): Deleted.

Source/WebKit:

  • NetworkProcess/NetworkConnectionToWebProcess.cpp:

(WebKit::NetworkConnectionToWebProcess::addOriginAccessWhitelistEntry):
(WebKit::NetworkConnectionToWebProcess::removeOriginAccessWhitelistEntry):
(WebKit::NetworkConnectionToWebProcess::resetOriginAccessWhitelists):

  • Shared/WebCoreArgumentCoders.cpp:

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

  • WebProcess/InjectedBundle/InjectedBundle.cpp:

(WebKit::InjectedBundle::addOriginAccessWhitelistEntry):
(WebKit::InjectedBundle::removeOriginAccessWhitelistEntry):
(WebKit::InjectedBundle::resetOriginAccessWhitelists):

  • WebProcess/cocoa/WebProcessCocoa.mm:

(WebKit::WebProcess::platformInitializeWebProcess):

Source/WebKitLegacy/mac:

  • WebView/WebView.mm:

(+[WebView _addOriginAccessWhitelistEntryWithSourceOrigin:destinationProtocol:destinationHost:allowDestinationSubdomains:]):
(+[WebView _removeOriginAccessWhitelistEntryWithSourceOrigin:destinationProtocol:destinationHost:allowDestinationSubdomains:]):
(+[WebView _resetOriginAccessWhitelists]):
(+[WebView _setFontWhitelist:]):

1:45 PM Changeset in webkit [262921] by Alan Coon
  • 1 copy in tags/Safari-610.1.15.51.2

Tag Safari-610.1.15.51.2.

1:11 PM Changeset in webkit [262920] by ysuzuki@apple.com
  • 15 edits
    3 adds in trunk

[JSC] Return DisposableCallSiteIndex when destroying GCAwareJITStubRoutineWithExceptionHandler
https://bugs.webkit.org/show_bug.cgi?id=213069
<rdar://problem/64205186>

Reviewed by Saam Barati.

JSTests:

  • stress/dont-dispose-callsiteindex-while-executing.js: Added.

(emptyFunction):
(foo.bar.set catch):
(foo.bar):
(foo):

Source/JavaScriptCore:

Inside GCAwareJITStubRoutineWithExceptionHandler::observeZeroRefCount, we are returning DisposableCallSiteIndex to freelist.
However, GCAwareJITStubRoutineWithExceptionHandler::observeZeroRefCount can be called even if the code of GCAwareJITStubRoutineWithExceptionHandler is
on the stack. Let's consider the following scenario.

  1. Execute GCAwareJITStubRoutineWithExceptionHandler's code. Set CallSiteIndex to the stack.
  2. Execute more code. (1)'s GCAwareJITStubRoutineWithExceptionHandler's code is on the stack.
  3. (1)'s GCAwareJITStubRoutineWithExceptionHandler's refcount becomes zero.
  4. CallSiteIndex of GCAwareJITStubRoutineWithExceptionHandler is returned.
  5. Execute StackVisitor to construct frames. But we cannot find CodeOrigin corresponding to CallSiteIndex stored in (1) since it is already returned.

DisposableCallSiteIndex should be returned after ensuring that GCAwareJITStubRoutineWithExceptionHandler's code is not on the stack. Detecting this is the functionality
what GCAwareJITStubRoutineWithExceptionHandler can offer. It is destroyed after ensuring that GCAwareJITStubRoutineWithExceptionHandler's code is not on the stack.

This patch delays DisposableCallSiteIndex returning until we destroy owner GCAwareJITStubRoutineWithExceptionHandler. But it is possible that CodeBlock* corresponding to
GCAwareJITStubRoutineWithExceptionHandler is already destroyed. To avoid this condition, we extract CodeOrigins vector as Ref<DFG::CodeOriginPool> and keep it alive from
GCAwareJITStubRoutineWithExceptionHandler too. And since CodeOrigin addition / removal happens only from the main thread after finishing the compilation, and
GCAwareJITStubRoutineWithExceptionHandler's destructor is called from the Heap's finalizer, which must be executed from the main thread, we can just modify it without a lock.

  • CMakeLists.txt:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • Sources.txt:
  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::newExceptionHandlingCallSiteIndex):
(JSC::CodeBlock::codeOrigins):

  • bytecode/CodeBlock.h:

(JSC::CodeBlock::codeOrigin):

  • dfg/DFGCodeOriginPool.cpp: Added.

(JSC::DFG::CodeOriginPool::addCodeOrigin):
(JSC::DFG::CodeOriginPool::addUniqueCallSiteIndex):
(JSC::DFG::CodeOriginPool::lastCallSite const):
(JSC::DFG::CodeOriginPool::addDisposableCallSiteIndex):
(JSC::DFG::CodeOriginPool::removeDisposableCallSiteIndex):
(JSC::DFG::CodeOriginPool::shrinkToFit):

  • dfg/DFGCodeOriginPool.h: Added.

(JSC::DFG::CodeOriginPool::create):
(JSC::DFG::CodeOriginPool::get):
(JSC::DFG::CodeOriginPool::size const):

  • dfg/DFGCommonData.cpp:

(JSC::DFG::CommonData::shrinkToFit):
(JSC::DFG::CommonData::addCodeOrigin): Deleted.
(JSC::DFG::CommonData::addUniqueCallSiteIndex): Deleted.
(JSC::DFG::CommonData::lastCallSite const): Deleted.
(JSC::DFG::CommonData::addDisposableCallSiteIndex): Deleted.
(JSC::DFG::CommonData::removeDisposableCallSiteIndex): Deleted.

  • dfg/DFGCommonData.h:

(JSC::DFG::CommonData::CommonData):

  • dfg/DFGJITCompiler.cpp:

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

  • dfg/DFGJITCompiler.h:

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

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compilePutById):
(JSC::FTL::DFG::LowerDFGToB3::compileGetByVal):
(JSC::FTL::DFG::LowerDFGToB3::compileDelBy):
(JSC::FTL::DFG::LowerDFGToB3::compileCallOrConstruct):
(JSC::FTL::DFG::LowerDFGToB3::compileDirectCallOrConstruct):
(JSC::FTL::DFG::LowerDFGToB3::compileTailCall):
(JSC::FTL::DFG::LowerDFGToB3::compileCallOrConstructVarargsSpread):
(JSC::FTL::DFG::LowerDFGToB3::compileCallOrConstructVarargs):
(JSC::FTL::DFG::LowerDFGToB3::compileCallEval):
(JSC::FTL::DFG::LowerDFGToB3::compileInById):
(JSC::FTL::DFG::LowerDFGToB3::compileInstanceOf):
(JSC::FTL::DFG::LowerDFGToB3::compileLogShadowChickenTail):
(JSC::FTL::DFG::LowerDFGToB3::getById):
(JSC::FTL::DFG::LowerDFGToB3::getByIdWithThis):
(JSC::FTL::DFG::LowerDFGToB3::lazySlowPath):
(JSC::FTL::DFG::LowerDFGToB3::callPreflight):

  • ftl/FTLSlowPathCall.cpp:

(JSC::FTL::callSiteIndexForCodeOrigin):

  • jit/GCAwareJITStubRoutine.cpp:

(JSC::GCAwareJITStubRoutineWithExceptionHandler::GCAwareJITStubRoutineWithExceptionHandler):
(JSC::GCAwareJITStubRoutineWithExceptionHandler::~GCAwareJITStubRoutineWithExceptionHandler):
(JSC::GCAwareJITStubRoutineWithExceptionHandler::aboutToDie):
(JSC::GCAwareJITStubRoutineWithExceptionHandler::observeZeroRefCount):

  • jit/GCAwareJITStubRoutine.h:
12:56 PM Changeset in webkit [262919] by Ryan Haddad
  • 1 edit
    2 deletes in trunk/LayoutTests

Unreviewed, reverting r262909.

This test causes macOS WK1 tests to intermittently exit early

Reverted changeset:

"Release Assert @
WebCore::RenderTreeBuilder::RenderTreeBuilder"
https://bugs.webkit.org/show_bug.cgi?id=212714
https://trac.webkit.org/changeset/262909

12:43 PM Changeset in webkit [262918] by aestes@apple.com
  • 9 edits
    6 adds in trunk

[iOS] nullptr deref in FileInputType::iconLoaded when the input's type attribute is modified by a change event listener
https://bugs.webkit.org/show_bug.cgi?id=208244
<rdar://problem/41855350>

Reviewed by Wenson Hsieh.

Source/WebCore:

When an <input> element's type attribute changes, its existing InputType is detached from
the HTMLInputElement by nulling InputType::m_element. When FileInputType::filesChosen is
called, it dispatches the input and change events, which can run arbitrary JavaScript that
might modify the element's type attribute. If this happens, FileInputType::m_element will be
null after returning from FileInputType::setFiles and if there is an icon will be
dereferenced by FileInputType::iconLoaded.

Fixed this by checking for a non-null m_element before calling iconLoaded. While here, also
fixed a bug where we sometimes checked the length of m_fileList before FileListCreator had
finished setting m_fileList. This bug resulted in missing file icons whenever an
<input type=file> had the webkitdirectory attribute.

Tests: fast/forms/file/file-input-type-detached-on-change.html

fast/forms/file/file-input-webkitdirectory-icon.html

  • html/FileInputType.cpp:

(WebCore::FileInputType::filesChosen):

Tools:

  • DumpRenderTree/TestRunner.cpp:

(SetOpenPanelFilesMediaIconCallback):
(TestRunner::staticFunctions):

  • WebKitTestRunner/InjectedBundle/TestRunner.cpp:

(WTR::TestRunner::setOpenPanelFilesMediaIcon):

LayoutTests:

  • fast/forms/file/file-input-type-detached-on-change-expected.txt: Added.
  • fast/forms/file/file-input-type-detached-on-change.html: Added.
  • fast/forms/file/file-input-webkitdirectory-icon-expected.html: Added.
  • fast/forms/file/file-input-webkitdirectory-icon.html: Added.
  • fast/forms/file/file-reset-in-change-using-open-panel-with-icon.html:
  • fast/forms/file/open-file-panel-crash.html:
  • fast/forms/file/resources/file-icon-bytes.js: Added.
12:41 PM Changeset in webkit [262917] by Jonathan Bedard
  • 3 edits in trunk/Source/WebKit

WebKit: Guard requestDocumentContext with HAVE(UI_WK_DOCUMENT_CONTEXT)
https://bugs.webkit.org/show_bug.cgi?id=213076
<rdar://problem/64254698>

Reviewed by Tim Horton.

No new tests, behavior unchanged.

  • Platform/spi/ios/UIKitSPI.h:
  • UIProcess/API/ios/WKWebViewTestingIOS.mm:

(-[WKWebView _requestDocumentContext:completionHandler:]): Guard requestDocumentContext with HAVE(UI_WK_DOCUMENT_CONTEXT).
(-[WKWebView _adjustSelectionWithDelta:completionHandler:]): Ditto.

12:23 PM Changeset in webkit [262916] by Alan Coon
  • 8 edits in branches/safari-610.1.15.50-branch/Source

Versioning.

11:58 AM Changeset in webkit [262915] by Jonathan Bedard
  • 2 edits in trunk/Source/WebKit

WebKit: Add UIKit SPI for watchOS and tvOS
https://bugs.webkit.org/show_bug.cgi?id=213077
<rdar://problem/64255131>

Reviewed by Tim Horton.

No new tests, behavior unchanged.

  • Platform/spi/ios/UIKitSPI.h:
11:55 AM Changeset in webkit [262914] by Beth Dakin
  • 2 edits in trunk/Source/WebCore

Remove references to "slave" in WebCore
https://bugs.webkit.org/show_bug.cgi?id=213085

Reviewed by Wenson Hsieh.

This feature is referred to as a mediagroup in html, so let's use that terminology here as
well.

  • html/MediaController.cpp:

(WebCore::MediaController::buffered const):
(WebCore::MediaController::seekable const):
(WebCore::MediaController::played):
(WebCore::MediaController::duration const):
(WebCore::MediaController::setCurrentTime):
(WebCore::MediaController::play):
(WebCore::MediaController::updateReadyState):
(WebCore::MediaController::updatePlaybackState):
(WebCore::MediaController::isBlocked const):
(WebCore::MediaController::hasEnded const):

11:54 AM Changeset in webkit [262913] by ddkilzer@apple.com
  • 32 edits in trunk/Source

[IPC] Adopt enum class for DragSourceAction
<https://webkit.org/b/212885>
<rdar://problem/64094134>

Reviewed by Darin Adler.

Source/WebCore:

Summary:

  • Convert DragSourceAction to enum class.
  • Remove DragSourceActionNone by using Optional<> and OptionSet<> (as dictated by how the code used the value).
  • Remove DragSourceActionAny and replace (as needed) with anyDragSourceAction(). (Some--but not all--uses were removed.)
  • Add both WTF::EnumTraits<> and WTF::OptionSetTraits<> for DragSourceAction since both Optional<> and OptionSet<> are used with IPC.
  • loader/EmptyClients.cpp:
  • page/DragActions.h:

(WebCore::DragSourceAction):

  • Convert to enum class.

(WebCore::anyDragSourceAction): Add.

  • Replaces WebCore::DragSourceActionAny.

(WTF::EnumTraits<WebCore::DragSourceAction>): Add.
(WTF::OptionSetTraits<WebCore::DragSourceAction>): Add.

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

(WebCore::DragController::delegateDragSourceAction):
(WebCore::DragController::draggableElement const):
(WebCore::DragController::prepareForDragStart const):
(WebCore::DragController::startDrag):
(WebCore::DragController::doSystemDrag):

  • Use OptionSet<>::toSingleValue() and add ASSERT() that it does not return WTF::nullopt.
  • page/DragController.h:

(WebCore::DragController::dragSourceAction const):

  • page/DragState.h:
  • page/EventHandler.cpp:

(WebCore::EventHandler::updateDragSourceActionsAllowed const):
(WebCore::EventHandler::dragHysteresisExceeded const):

  • Use OptionSet<>::toSingleValue() and add ASSERT() that it does not return WTF::nullopt.
  • Remove case statements for DragSourceActionNone and DragSourceActionAny, along with ASSERT_NOT_REACHED(). The ASSERT() for toSingleValue() replaces the DragSourceActionNone case.

(WebCore::EventHandler::didStartDrag):
(WebCore::ExactlyOneBitSet): Delete.

  • Move to WTF::OptionSet<>::hasExactlyOneBitSet().

(WebCore::EventHandler::handleDrag):

  • Add code to #ifndef NDEBUG/#endif instead of modifying dragState().type in-place since it seemed weird to modify it just to check an ASSERT(), even though it was overwritten immediately after that.
  • page/EventHandler.h:
  • platform/DragItem.h:

(WebCore::DragItem::encode const):
(WebCore::DragItem::decode):

  • Stop using decodeEnum()/encodeEnum() with Optional<DragSourceAction>.

Source/WebKit:

Summary:

  • Convert argument parameters from uint64_t to OptionSet<DragSourceAction>.
  • Convert DragSourceAction to OptionSet<DragSourceAction>.
  • Scripts/webkit/messages.py:
  • Map DragSourceAction enum to DragActions.h header.
  • UIProcess/WebPageProxy.h:
  • UIProcess/ios/DragDropInteractionState.h:
  • UIProcess/ios/DragDropInteractionState.mm:

(WebKit::shouldUseDragImageToCreatePreviewForDragSource):
(WebKit::shouldUseVisiblePathToCreatePreviewForDragSource):
(WebKit::shouldUseTextIndicatorToCreatePreviewForDragSource):
(WebKit::canUpdatePreviewForActiveDragSource):
(WebKit::DragDropInteractionState::anyActiveDragSourceIs const):
(WebKit::DragDropInteractionState::stageDragItem):
(WebKit::DragDropInteractionState::hasStagedDragSource const):
(WebKit::DragDropInteractionState::updatePreviewsForActiveDragSources):

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView _startDrag:item:]):
(-[WKContentView _allowedDragSourceActions]):
(-[WKContentView dragInteraction:willAnimateLiftWithAnimator:session:]):

  • UIProcess/ios/WebPageProxyIOS.mm:

(WebKit::WebPageProxy::requestDragStart):
(WebKit::WebPageProxy::requestAdditionalItemsForDragSession):

  • WebProcess/WebCoreSupport/WebDragClient.cpp:

(WebKit::WebDragClient::dragSourceActionMaskForPoint):

  • WebProcess/WebCoreSupport/WebDragClient.h:
  • WebProcess/WebPage/WebPage.h:

(WebKit::WebPage::allowedDragSourceActions const):

  • WebProcess/WebPage/WebPage.messages.in:
  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::requestDragStart):
(WebKit::WebPage::requestAdditionalItemsForDragSession):

Source/WebKitLegacy/mac:

Summary:

  • Add and use conversion functions between OptionSet<WebCore::DragSourceAction> and WebDragSourceAction.
  • Update method signatures.
  • WebCoreSupport/WebDragClient.h:
  • WebCoreSupport/WebDragClient.mm:

(coreDragSourceActionMask): Add.
(WebDragClient::dragSourceActionMaskForPoint):
(WebDragClient::willPerformDragSourceAction):
(WebDragClient::startDrag):

  • WebView/WebView.mm:

(kit): Add.

  • Convert from Optional<WebCore::DragSourceAction> to WebDragSourceAction.

(-[WebView _startDrag:]):

  • WebView/WebViewInternal.h:

(kit): Add declaration to reuse function in WebDragClient.mm.

Source/WebKitLegacy/win:

Summary:

  • Add and use conversion functions between OptionSet<WebCore::DragSourceAction> and WebDragSourceAction.
  • Update method signatures.
  • WebCoreSupport/WebDragClient.cpp:

(coreDragSourceActionMask): Add.
(kit): Add.

  • Convert from WebCore::DragSourceAction to WebDragSourceAction.

(WebDragClient::dragSourceActionMaskForPoint):
(WebDragClient::willPerformDragSourceAction):
(WebDragClient::startDrag):

  • WebCoreSupport/WebDragClient.h:

(WebDragClient::dragSourceActionMaskForPoint):

Source/WTF:

  • wtf/OptionSet.h:

(WTF::OptionSet::hasExactlyOneBitSet const): Add.

  • Move here from WebCore::ExactlyOneBitSet() in Source/WebCore/page/EventHandler.cpp.

(WTF::OptionSet::toSingleValue const): Add.

  • Use hasExactlyOneBitSet() to determine whether exactly one enum bitmask value can be returned.
11:47 AM Changeset in webkit [262912] by Jason_Lawrence
  • 2 edits in trunk/LayoutTests

REGRESSION: [ Mac ] inspector/page/setBootstrapScript-sub-frame.html is flaky failing.
https://bugs.webkit.org/show_bug.cgi?id=213087

Unreviewed test gardening.

  • platform/mac/TestExpectations:
11:01 AM Changeset in webkit [262911] by Alan Coon
  • 1 edit in branches/safari-609-branch/Source/WebCore/loader/FrameLoader.cpp

Unreviewed build fix. rdar://problem/64232759

Error: no member named 'protocolIsJavaScript' in 'WTF::URL'.

10:57 AM Changeset in webkit [262910] by Wenson Hsieh
  • 2 edits in trunk/LayoutTests

[iOS] editing/selection/ios/update-selection-after-overflow-scroll.html times out
https://bugs.webkit.org/show_bug.cgi?id=213082
<rdar://problem/64228007>

Reviewed by Megan Gardner.

This test makes a programmatic selection, and then scrolls an overflow area with accelerated scrolling by using
UIHelper.immediateScrollElementAtContentPointToOffset(). This helper method hit-tests for a subscrollable
region, and then uses platform API to change the content offset. However, after timing changes in the system,
this hit-testing now fails because it ends up finding the callout menu that shows up after making the text
selection, and so scrolling fails.

Fix this by using (40, 40) instead of (150, 100) when hit-testing the child scroll view when scrolling.

  • editing/selection/ios/update-selection-after-overflow-scroll.html:
10:51 AM Changeset in webkit [262909] by commit-queue@webkit.org
  • 1 edit
    2 adds in trunk/LayoutTests

Release Assert @ WebCore::RenderTreeBuilder::RenderTreeBuilder
https://bugs.webkit.org/show_bug.cgi?id=212714

Patch by Pinki Gyanchandani <pgyanchandani@apple.com> on 2020-06-11
Reviewed by Geoffrey Garen.

Added a regression test.

  • fast/rendering/widget-removal-in-render-tree-builder-crash-expected.txt: Added.
  • fast/rendering/widget-removal-in-render-tree-builder-crash.html: Added.
10:23 AM Changeset in webkit [262908] by Alexey Shvayka
  • 4 edits in trunk

RegExp.prototype getters should throw on cross-realm access
https://bugs.webkit.org/show_bug.cgi?id=213075

Reviewed by Saam Barati.

JSTests:

  • test262/expectations.yaml: Mark 14 test cases as passing.

Source/JavaScriptCore:

This patch makes RegExp.prototype getters throw TypeError when called on
RegExp.prototype object from another realm, aligning JSC with V8 and SpiderMonkey.

The spec [1] allows same-realm access to avoid breaking the web, while makes
RegExp.prototype an ordinary object (rather than RegExp instance) where possible.

[1]: https://tc39.es/ecma262/#sec-get-regexp.prototype.global (step 3.a)

  • runtime/RegExpPrototype.cpp:

(JSC::regExpProtoGetterGlobal):
(JSC::regExpProtoGetterIgnoreCase):
(JSC::regExpProtoGetterMultiline):
(JSC::regExpProtoGetterDotAll):
(JSC::regExpProtoGetterSticky):
(JSC::regExpProtoGetterUnicode):
(JSC::regExpProtoGetterSource):

10:16 AM Changeset in webkit [262907] by Alan Coon
  • 2 edits in branches/safari-610.1.15.51-branch/Source/WebKit

Cherry-pick r262159. rdar://problem/64257403

Fix the engineering build on internal SDKs

  • Shared/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm: (WebKit::WebPaymentCoordinatorProxy::platformPaymentRequest): Silenced a deprecation warning.

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

10:16 AM Changeset in webkit [262906] by Alan Coon
  • 2 edits in branches/safari-610.1.15.50-branch/Source/WebKit

Cherry-pick r262159. rdar://problem/64257403

Fix the engineering build on internal SDKs

  • Shared/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm: (WebKit::WebPaymentCoordinatorProxy::platformPaymentRequest): Silenced a deprecation warning.

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

10:14 AM Changeset in webkit [262905] by youenn@apple.com
  • 8 edits
    2 adds in trunk

End a remote MediaStreamTrack if its source is ended
https://bugs.webkit.org/show_bug.cgi?id=213074

Reviewed by Eric Carlson.

Source/WebCore:

Make remote audio/video source observers of their webrtc source.
In case the webrtc source ends, end the source, thus its related tracks as well.
This is covered by the above test.

Test: webrtc/receiver-track-should-stay-live-even-if-receiver-is-inactive.html

  • platform/mediastream/RealtimeIncomingAudioSource.cpp:

(WebCore::RealtimeIncomingAudioSource::RealtimeIncomingAudioSource):
(WebCore::RealtimeIncomingAudioSource::~RealtimeIncomingAudioSource):
(WebCore::RealtimeIncomingAudioSource::startProducingData):
(WebCore::RealtimeIncomingAudioSource::stopProducingData):
(WebCore::RealtimeIncomingAudioSource::OnChanged):

  • platform/mediastream/RealtimeIncomingAudioSource.h:
  • platform/mediastream/RealtimeIncomingVideoSource.cpp:

(WebCore::RealtimeIncomingVideoSource::RealtimeIncomingVideoSource):
(WebCore::RealtimeIncomingVideoSource::~RealtimeIncomingVideoSource):
(WebCore::RealtimeIncomingVideoSource::startProducingData):
(WebCore::RealtimeIncomingVideoSource::stopProducingData):
(WebCore::RealtimeIncomingVideoSource::OnChanged):

  • platform/mediastream/RealtimeIncomingVideoSource.h:
  • platform/mediastream/RealtimeMediaSource.cpp:

(WebCore::RealtimeMediaSource::requestToEnd):
(WebCore::RealtimeMediaSource::end):

  • platform/mediastream/RealtimeMediaSource.h:

LayoutTests:

  • webrtc/receiver-track-should-stay-live-even-if-receiver-is-inactive-expected.txt: Added.
  • webrtc/receiver-track-should-stay-live-even-if-receiver-is-inactive.html: Added.
9:28 AM Changeset in webkit [262904] by ggaren@apple.com
  • 2 edits in trunk/Source/WTF

[Cocoa] Build callOnMainThread on WTF::RunLoop rather than on a timer
https://bugs.webkit.org/show_bug.cgi?id=213063

Reviewed by Anders Carlsson.

Always use the RunLoop API for main thread tasks.

Previously, callOnMainThread sometimes scheduled a timer and sometimes
used the RunLoop. (Ironically, the timer behavior was added in r55816
with the intention to establish a single point of execution. Now, it has
the opposite effect.)

I picked the RunLoop API rather than the timer API because it moves us
closer to universally applying the RunLoop speedup in
https://bugs.webkit.org/show_bug.cgi?id=202874. Also, it avoids
allocating a timer, which can be expensive.

  • wtf/cocoa/MainThreadCocoa.mm:

(WTF::scheduleDispatchFunctionsOnMainThread): The webIfExists() check
is a superset of the isWebThread() check, so we can just remove the
isWebThread() check when scheduling tasks to the web thread.
(WTF::timerFired): Deleted.
(WTF::postTimer): Deleted.

8:18 AM Changeset in webkit [262903] by eric.carlson@apple.com
  • 2 edits in trunk/Source/WebKit

[Cocoa] MediaUsageManagerCocoa should use a different USVideoUsage initializer
https://bugs.webkit.org/show_bug.cgi?id=213058

Reviewed by Jer Noble.

No new tests, tested manually.

  • UIProcess/Media/cocoa/MediaUsageManagerCocoa.mm:

(WebKit::MediaUsageManagerCocoa::reset): Drive-by fix: don't call -stop unless the
element was playing.
(WebKit::MediaUsageManagerCocoa::updateMediaUsage): Use a different initializer so
we can pass in the state.

7:41 AM Changeset in webkit [262902] by Paulo Matos
  • 2 edits in trunk/Source/JavaScriptCore

Add missing include to JSONObject.cpp - non-unified build
https://bugs.webkit.org/show_bug.cgi?id=213073

Reviewed by Adrian Perez de Castro.

  • runtime/JSONObject.cpp:
5:47 AM Changeset in webkit [262901] by Oriol Brufau
  • 19 edits
    50 adds in trunk/LayoutTests

[css-grid] Reimport WPT tests removed in r262809
https://bugs.webkit.org/show_bug.cgi?id=213028

Reviewed by Manuel Rego Casasnovas.

LayoutTests/imported/w3c:

r261841 imported some WPT grid tests, but it was reverted in r262809.
This patch reimports these tests again.

  • resources/import-expectations.json:
  • web-platform-tests/css/css-grid/grid-items/grid-item-dynamic-min-contribution-001-expected.txt: Added.
  • web-platform-tests/css/css-grid/grid-items/grid-item-dynamic-min-contribution-001.html: Added.
  • web-platform-tests/css/css-grid/grid-items/grid-items-percentage-margins-001.html:
  • web-platform-tests/css/css-grid/grid-items/grid-items-percentage-margins-002.html:
  • web-platform-tests/css/css-grid/grid-items/grid-items-percentage-margins-003-expected.xht: Added.
  • web-platform-tests/css/css-grid/grid-items/grid-items-percentage-margins-003.html: Added.
  • web-platform-tests/css/css-grid/grid-items/grid-items-percentage-margins-004-expected.xht: Added.
  • web-platform-tests/css/css-grid/grid-items/grid-items-percentage-margins-004.html: Added.
  • web-platform-tests/css/css-grid/grid-items/grid-items-percentage-margins-005-expected.xht: Added.
  • web-platform-tests/css/css-grid/grid-items/grid-items-percentage-margins-005.html: Added.
  • web-platform-tests/css/css-grid/grid-items/grid-items-percentage-margins-006-expected.xht: Added.
  • web-platform-tests/css/css-grid/grid-items/grid-items-percentage-margins-006.html: Added.
  • web-platform-tests/css/css-grid/grid-items/grid-items-percentage-margins-007-expected.xht: Added.
  • web-platform-tests/css/css-grid/grid-items/grid-items-percentage-margins-007.html: Added.
  • web-platform-tests/css/css-grid/grid-items/grid-items-percentage-margins-008-expected.xht: Added.
  • web-platform-tests/css/css-grid/grid-items/grid-items-percentage-margins-008.html: Added.
  • web-platform-tests/css/css-grid/grid-items/grid-items-percentage-margins-009-expected.xht: Added.
  • web-platform-tests/css/css-grid/grid-items/grid-items-percentage-margins-009.html: Added.
  • web-platform-tests/css/css-grid/grid-items/grid-items-percentage-margins-010-expected.xht: Added.
  • web-platform-tests/css/css-grid/grid-items/grid-items-percentage-margins-010.html: Added.
  • web-platform-tests/css/css-grid/grid-items/grid-items-percentage-margins-011-expected.xht: Added.
  • web-platform-tests/css/css-grid/grid-items/grid-items-percentage-margins-011.html: Added.
  • web-platform-tests/css/css-grid/grid-items/grid-items-percentage-margins-012-expected.xht: Added.
  • web-platform-tests/css/css-grid/grid-items/grid-items-percentage-margins-012.html: Added.
  • web-platform-tests/css/css-grid/grid-items/grid-items-percentage-margins-013-expected.xht: Added.
  • web-platform-tests/css/css-grid/grid-items/grid-items-percentage-margins-013.html: Added.
  • web-platform-tests/css/css-grid/grid-items/grid-items-percentage-margins-014-expected.xht: Added.
  • web-platform-tests/css/css-grid/grid-items/grid-items-percentage-margins-014.html: Added.
  • web-platform-tests/css/css-grid/grid-items/grid-items-percentage-margins-vertical-lr-001.html:
  • web-platform-tests/css/css-grid/grid-items/grid-items-percentage-margins-vertical-lr-002.html:
  • web-platform-tests/css/css-grid/grid-items/grid-items-percentage-margins-vertical-rl-001.html:
  • web-platform-tests/css/css-grid/grid-items/grid-items-percentage-margins-vertical-rl-002.html:
  • web-platform-tests/css/css-grid/grid-items/grid-items-percentage-paddings-001.html:
  • web-platform-tests/css/css-grid/grid-items/grid-items-percentage-paddings-002.html:
  • web-platform-tests/css/css-grid/grid-items/grid-items-percentage-paddings-003-expected.xht: Added.
  • web-platform-tests/css/css-grid/grid-items/grid-items-percentage-paddings-003.html: Added.
  • web-platform-tests/css/css-grid/grid-items/grid-items-percentage-paddings-004-expected.xht: Added.
  • web-platform-tests/css/css-grid/grid-items/grid-items-percentage-paddings-004.html: Added.
  • web-platform-tests/css/css-grid/grid-items/grid-items-percentage-paddings-005-expected.xht: Added.
  • web-platform-tests/css/css-grid/grid-items/grid-items-percentage-paddings-005.html: Added.
  • web-platform-tests/css/css-grid/grid-items/grid-items-percentage-paddings-006-expected.xht: Added.
  • web-platform-tests/css/css-grid/grid-items/grid-items-percentage-paddings-006.html: Added.
  • web-platform-tests/css/css-grid/grid-items/grid-items-percentage-paddings-007-expected.xht: Added.
  • web-platform-tests/css/css-grid/grid-items/grid-items-percentage-paddings-007.html: Added.
  • web-platform-tests/css/css-grid/grid-items/grid-items-percentage-paddings-008-expected.xht: Added.
  • web-platform-tests/css/css-grid/grid-items/grid-items-percentage-paddings-008.html: Added.
  • web-platform-tests/css/css-grid/grid-items/grid-items-percentage-paddings-009-expected.xht: Added.
  • web-platform-tests/css/css-grid/grid-items/grid-items-percentage-paddings-009.html: Added.
  • web-platform-tests/css/css-grid/grid-items/grid-items-percentage-paddings-010-expected.xht: Added.
  • web-platform-tests/css/css-grid/grid-items/grid-items-percentage-paddings-010.html: Added.
  • web-platform-tests/css/css-grid/grid-items/grid-items-percentage-paddings-011-expected.xht: Added.
  • web-platform-tests/css/css-grid/grid-items/grid-items-percentage-paddings-011.html: Added.
  • web-platform-tests/css/css-grid/grid-items/grid-items-percentage-paddings-012-expected.xht: Added.
  • web-platform-tests/css/css-grid/grid-items/grid-items-percentage-paddings-012.html: Added.
  • web-platform-tests/css/css-grid/grid-items/grid-items-percentage-paddings-013-expected.xht: Added.
  • web-platform-tests/css/css-grid/grid-items/grid-items-percentage-paddings-013.html: Added.
  • web-platform-tests/css/css-grid/grid-items/grid-items-percentage-paddings-014-expected.xht: Added.
  • web-platform-tests/css/css-grid/grid-items/grid-items-percentage-paddings-014.html: Added.
  • web-platform-tests/css/css-grid/grid-items/grid-items-percentage-paddings-vertical-lr-001.html:
  • web-platform-tests/css/css-grid/grid-items/grid-items-percentage-paddings-vertical-lr-002-expected.txt:
  • web-platform-tests/css/css-grid/grid-items/grid-items-percentage-paddings-vertical-lr-002.html:
  • web-platform-tests/css/css-grid/grid-items/grid-items-percentage-paddings-vertical-rl-001.html:
  • web-platform-tests/css/css-grid/grid-items/grid-items-percentage-paddings-vertical-rl-002-expected.txt:
  • web-platform-tests/css/css-grid/grid-items/grid-items-percentage-paddings-vertical-rl-002.html:
  • web-platform-tests/css/css-grid/grid-items/w3c-import.log:

LayoutTests:

Add failure expectations of the new tests.

2:41 AM Changeset in webkit [262900] by commit-queue@webkit.org
  • 4 edits in trunk

Improve url-setters.html WPT test
https://bugs.webkit.org/show_bug.cgi?id=213046

Patch by Rob Buis <rbuis@igalia.com> on 2020-06-11
Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Update improved test expectation.

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

Source/WebCore:

Improve url-setters.html WPT test by testing for failure that can occur
when setting host or hostname [1].

[1] https://url.spec.whatwg.org/#host-state

  • html/URLDecomposition.cpp:

(WebCore::URLDecomposition::setHost):
(WebCore::URLDecomposition::setHostname):

1:58 AM Changeset in webkit [262899] by ChangSeok Oh
  • 10 edits in trunk/Source

[GTK] Implement button-press-event, button-release-event, and absolute-axis-event of GAMEPAD API.
https://bugs.webkit.org/show_bug.cgi?id=133850

Reviewed by Carlos Garcia Campos.

Source/WebCore:

This is a follow-up change after r261965, implementing the rest of missing GAMEPAD API
for the gtk port. Buttons and analog sticks of standard gamepads work with this change.

No new tests since existing tests can cover this change.

  • html/OffscreenCanvas.h:
  • platform/gamepad/manette/ManetteGamepad.cpp:

(WebCore::toStandardGamepadAxis):
(WebCore::onAbsoluteAxisEvent):
(WebCore::toStandardGamepadButton):
(WebCore::onButtonPressEvent):
(WebCore::onButtonReleaseEvent):
(WebCore::ManetteGamepad::ManetteGamepad):
(WebCore::ManetteGamepad::~ManetteGamepad):
(WebCore::ManetteGamepad::buttonPressedOrReleased):
(WebCore::ManetteGamepad::absoluteAxisChanged):

  • platform/gamepad/manette/ManetteGamepad.h:
  • platform/gamepad/manette/ManetteGamepadProvider.cpp:

(WebCore::ManetteGamepadProvider::ManetteGamepadProvider):
(WebCore::ManetteGamepadProvider::~ManetteGamepadProvider):
(WebCore::ManetteGamepadProvider::gamepadHadInput):
(WebCore::ManetteGamepadProvider::inputNotificationTimerFired):

  • platform/gamepad/manette/ManetteGamepadProvider.h:

Source/WebKit:

  • UIProcess/Gamepad/UIGamepadProvider.cpp: Add the OS(LINUX) guard.
  • UIProcess/Gamepad/gtk/UIGamepadProviderGtk.cpp:

(WebKit::getWebPageProxy): Build fix. WebKitWebViewBase is used, not WebKitWebViewPrivate.

  • UIProcess/Gamepad/manette/UIGamepadProviderManette.cpp: Add the OS(LINUX) guard.
1:09 AM Changeset in webkit [262898] by svillar@igalia.com
  • 4 edits in trunk/Source/WebCore

[WebXR] Pass an unsigned long to cancelAnimationCallback() as handle
https://bugs.webkit.org/show_bug.cgi?id=212529

Reviewed by Youenn Fablet.

The type of the handle returned by XRSession::requestAnimationFrame() was recently changed
to unsigned long from long as there was no point in using signed integers for that. However
we forgot to update the cancelAnimationFrame() in the specs as well as it receives the handle
returned by requestAnimationFrame().

We landed https://github.com/immersive-web/webxr/pull/1069 in the WebXR specs so we can now
safely also replace signed by unsigned integers in our implementation.

No new tests as there is no change in functionality.

Reland r262718.

  • Modules/webxr/WebXRSession.cpp:

(WebCore::WebXRSession::cancelAnimationFrame): Use unsigned ids.

  • Modules/webxr/WebXRSession.h: Ditto.
  • Modules/webxr/WebXRSession.idl: Ditto.
12:52 AM Changeset in webkit [262897] by graouts@webkit.org
  • 2 edits in trunk/Source/WebCore

[Web Animations] Setting the style at the last style change event to null should not create an ElementAnimationRareData object
https://bugs.webkit.org/show_bug.cgi?id=213070
<rdar://problem/63841893>

Reviewed by Tim Horton.

In r262154 we added code that records the pre-animation style for a given element in
Style::TreeResolver::createAnimatedElementUpdate(), which is in Web Animations spec
parlance the style at the last style change event. This style is set on the backing
ElementAnimationRareData object for the given Element. For any element that did not
actually have any animations, we would set this style to null, but the function on
Element acting as a go-between would always create the backing ElementAnimationRareData
even though it would set a null value. We now only creaste the ElementAnimationRareData
object if there is a value to be stored, which fixes a performance regression in the
Speedometer2 test.

  • dom/Element.cpp:

(WebCore::Element::setLastStyleChangeEventStyle):

12:50 AM Changeset in webkit [262896] by svillar@igalia.com
  • 2 edits in trunk/Tools

Unreviewed, updated libsoup dependency in jhbuild.

  • wpe/jhbuild.modules:

Jun 10, 2020:

11:31 PM Changeset in webkit [262895] by commit-queue@webkit.org
  • 7 edits in trunk

[macOS]: The File Picker of the <input> file element should show the selection filter
https://bugs.webkit.org/show_bug.cgi?id=212485

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2020-06-10
Reviewed by Darin Adler.

Source/WebCore/PAL:

Expose an SPI from CoreServcies to get all the UTIs known by the system.

  • pal/spi/cocoa/CoreServicesSPI.h:

Source/WebKit:

Add two private helpers to WKOpenPanelParameters.

  • UIProcess/API/Cocoa/WKOpenPanelParameters.mm:

(-[WKOpenPanelParameters _allowedFileExtensions]):
Returns an array of strings representing the allowed extensions.

(-[WKOpenPanelParameters _allowedFileExtensionsDescription]):
Returns a string representing a description for the allowed extensions.

  • UIProcess/API/Cocoa/WKOpenPanelParametersPrivate.h:

Tools:

Create a view with an NSPopupButton for the file extensions filter. Set
this view as the AccessoryView of the OpenPanel. Create a customized target
for the NSPopupButton to respond to changing its selection.

  • MiniBrowser/mac/WK2BrowserWindowController.m:

(-[FileExtensionsPopupTarget initWithOpenPanel:allowedFileExtensions:]):
(-[FileExtensionsPopupTarget popupAction:]):
(-[FileExtensionsPopupTarget dealloc]):
(-[WK2BrowserWindowController dealloc]):
(-[WK2BrowserWindowController createFilterView:popupTarget:]):
(-[WK2BrowserWindowController webView:runOpenPanelWithParameters:initiatedByFrame:completionHandler:webView:runOpenPanelWithParameters:initiatedByFrame:completionHandler:]):

9:23 PM Changeset in webkit [262894] by Beth Dakin
  • 12 edits in trunk/Source

Replace instances of blacklist in WebCore with blocklist
https://bugs.webkit.org/show_bug.cgi?id=213064

Reviewed by Tim Horton.

Source/WebCore:

  • dom/ExtensionStyleSheets.cpp:

(WebCore::ExtensionStyleSheets::updateInjectedStyleSheetCache const):

  • page/Frame.cpp:

(WebCore::Frame::injectUserScriptImmediately):

  • page/UserContentURLPattern.cpp:

(WebCore::UserContentURLPattern::matchesPatterns):

  • page/UserContentURLPattern.h:
  • page/UserScript.h:

(WebCore::UserScript::UserScript):
(WebCore::UserScript::blocklist const):
(WebCore::UserScript::encode const):
(WebCore::UserScript::decode):
(WebCore::UserScript::blacklist const): Deleted.

  • page/UserStyleSheet.h:

(WebCore::UserStyleSheet::UserStyleSheet):
(WebCore::UserStyleSheet::blocklist const):
(WebCore::UserStyleSheet::blacklist const): Deleted.

  • platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm:

(WebCore::GraphicsContextGLOpenGL::GraphicsContextGLOpenGL):
(WebCore::GraphicsContextGLOpenGL::checkGPUStatus):

  • platform/mac/PasteboardMac.mm:

(WebCore::cocoaTypeFromHTMLClipboardType):

  • platform/text/TextEncodingRegistry.cpp:

(WebCore::pruneBlocklistedCodecs):
(WebCore::extendTextCodecMaps):
(WebCore::pruneBlacklistedCodecs): Deleted.

Source/WebKit:

  • Shared/WebCoreArgumentCoders.cpp:

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

8:27 PM Changeset in webkit [262893] by commit-queue@webkit.org
  • 10 edits
    12 adds in trunk

Multiple SVG Filters Unexpectedly lightens image using linearRGB
https://bugs.webkit.org/show_bug.cgi?id=212649

Patch by Frank Yang <guowei_yang@apple.com> on 2020-06-10
Reviewed by Myles C. Maxfield, Simon Fraser, Darin Adler

Source/WebCore:

Added color space conversion of input FilterEffect ImageBuffer and ImageData
for filters that directly manipulates pixel values. The conversion
is missing only on CG platforms because on CG platforms,
FilterEffect::transformResultColorSpace doesn't perform any operations
Its author assumed all filters are using CG ImageBuffers, and that
CG will handle the conversion which is not the case. The following filters
operates on the raw pixels inside an ImageBuffer, and this requires an explicit
color space conversion of the pixel values when the ImageData are retrieved
by calling FilterEffect::copy{Pre/Un}multipliedData().

The filters affected are feComponentTransfer, feComposite, feConvolveMatrix
feGaussianBlur, FELighting, feMorphology. The conversion is done
by CG, by drawing the input ImageBuffer to a new ImageBuffer that
has the correct color space tag. The ImageData is then pulled from
this new ImageBuffer and used in platformApplySoftware()

Tests: svg/filters/feComponentTransfer-clipped-expected.svg

svg/filters/feComponentTransfer-clipped.svg
svg/filters/feComposite-clipped-expected.svg
svg/filters/feComposite-clipped.svg
svg/filters/feConvolveMatrix-clipped-expected.svg
svg/filters/feConvolveMatrix-clipped.svg
svg/filters/feGaussianBlur-clipped-expected.svg
svg/filters/feGaussianBlur-clipped.svg
svg/filters/feLighting-clipped-expected.svg
svg/filters/feLighting-clipped.svg
svg/filters/feMorphology-clipped-expected.svg
svg/filters/feMorphology-clipped.svg

  • platform/graphics/filters/FEComponentTransfer.cpp:

(WebCore::FEComponentTransfer::platformApplySoftware): Modified function call to

FilterEffect::premultipliedResult, color space conversion is required on CG
platforms, so operatingColorSpace is passed in and input will be converted to
that color space

  • platform/graphics/filters/FEComposite.cpp:

(WebCore::FEComposite::platformApplySoftware): Similarly, color space conversion

Required on CG color space conversion is required on CG
platforms, so operatingColorSpace is passed in and input will be converted to
that color space

  • platform/graphics/filters/FEConvolveMatrix.cpp:

(WebCore::FEConvolveMatrix::platformApplySoftware): converting to operating space

  • platform/graphics/filters/FEGaussianBlur.cpp:

(WebCore::FEGaussianBlur::platformApplySoftware): converting to operating space

  • platform/graphics/filters/FELighting.cpp:

(WebCore::FELighting::platformApplySoftware): converting to operating space

  • platform/graphics/filters/FEMorphology.cpp:

(WebCore::FEMorphology::platformApplyDegenerate): converting to operating space
(WebCore::FEMorphology::platformApplySoftware): converting to operating space

  • platform/graphics/filters/FilterEffect.cpp:

(WebCore::FilterEffect::unmultipliedResult): modified function signature so that

The Optional ColorSpace enum could be passed in to copyUnmultipliedResult()

(WebCore::FilterEffect::premultipliedResult): modified function signature so that

The Optional ColorSpace enum could be passed in to copyUnmultipliedResult()

(WebCore::FilterEffect::convertImageDataToColorSpace): helper function that takes an ImageData ptr

as input, put it into an ImageBuffer, and calls convertImageBufferToColorSpace to
perform color conversion, and returns the converted ImageData

(WebCore::FilterEffect::convertImageBufferToColorSpace): helper function that takes an ImageBuffer ptr

as input, create a new ImageBuffer with target color space, write input ImageBuffer to this new buffer
(CG backend handles the conversion) and returns the ImageData in the buffer.

(WebCore::FilterEffect::copyConvertedImageBufferToDestination): helper function that copies data from ImageBuffer

whose data is converted to the correct color space, to the destination array

(WebCore::FilterEffect::copyConvertedImageDataToDestination): helper function that copies data from ImageData

whose data is converted to the correct color space, to the destination array

(WebCore::FilterEffect::copyUnmultipliedResult): added an optional argument, colorSpace, which will be passed

into requiresAdditionalColorSpaceConversion, in order to determine if color space conversion is required
when obtaining the unmultiplied result. Then, added code to convert color space before writing to the
destination array

(WebCore::FilterEffect::copyPremultipliedResult): added an optional argument, colorSpace, which will be passed

into requiresAdditionalColorSpaceConversion, in order to determine if color space conversion is required
when obtaining the premultiplied result. Then, added code to convert color space before writing to the
destination array.

(WebCore::FilterEffect::requiresImageDataColorSpaceConversion): unction that only returns true

when 1) destination color space is non-null and is different than current color space AND

2) the code is running on CG platforms

This function will only be called inside copy{Un, Pre}multipliedResult, to address the issue
where color space is needed for filters that modifies raw pixels.

  • platform/graphics/filters/FilterEffect.h: Added function declarations

LayoutTests:

Added new tests that checks SVG render results for
feComponentTransfer, feComposite, feConvolveMatrix
feGaussianBlur, feMorphology and lighting

  • svg/filters/feComponentTransfer-clipped-expected.svg: Added.
  • svg/filters/feComponentTransfer-clipped.svg: Added.
  • svg/filters/feComposite-clipped-expected.svg: Added.
  • svg/filters/feComposite-clipped.svg: Added.
  • svg/filters/feConvolveMatrix-clipped-expected.svg: Added.
  • svg/filters/feConvolveMatrix-clipped.svg: Added.
  • svg/filters/feGaussianBlur-clipped-expected.svg: Added.
  • svg/filters/feGaussianBlur-clipped.svg: Added.
  • svg/filters/feLighting-clipped-expected.svg: Added.
  • svg/filters/feLighting-clipped.svg: Added.
  • svg/filters/feMorphology-clipped-expected.svg: Added.
  • svg/filters/feMorphology-clipped.svg: Added.
8:01 PM Changeset in webkit [262892] by Alan Bujtas
  • 4 edits
    2 adds in trunk

[Line clamp] Do not apply the special anchor handling when the anchor content is visible after clamping
https://bugs.webkit.org/show_bug.cgi?id=213052
<rdar://problem/59739131>

Reviewed by Simon Fraser.

Source/WebCore:

Line clamping tries to preserve the anchor text if it is at the bottom of the paragraph to support cases like "... Read more", where the "read more" is an actual link.
This patch makes sure that we only apply the special case handling if the anchor text get clamped.

Test: fast/flexbox/line-clamp-with-anchor-content-only.html

  • rendering/RenderDeprecatedFlexibleBox.cpp:

(WebCore::RenderDeprecatedFlexibleBox::applyLineClamp):

LayoutTests:

  • fast/flexbox/line-clamp-with-anchor-content-only-expected.html: Added.
  • fast/flexbox/line-clamp-with-anchor-content-only.html: Added.
7:40 PM Changeset in webkit [262891] by Wenson Hsieh
  • 3 edits in trunk/Source/WebKit

[iOS] editing/pasteboard/dom-paste tests consistently time out
https://bugs.webkit.org/show_bug.cgi?id=213061
<rdar://problem/64211161>

Reviewed by Darin Adler.

On recent versions of iOS, system changes have moved the timing of the call to
-requestAutocorrectionContextWithCompletionHandler: when focusing an editable element. This results in a
consistently reproducible deadlock between the UI process and web process if a page tries to request
programmatic clipboard access during the click event (importantly, in the same runloop as element focus).

What ends up happening is that the autocorrection context is requested by the UI process shortly after the
(unbounded) sync IPC message for the DOM paste arrives, so we end up waiting forever for the sync-IPC-blocked
web process to respond. Normally this just results in a 1 second hang, and the DOM paste proceeds as normal.
However these layout tests purposefully opt out of sync IPC timeouts (precisely so that we can catch bugs like
this). See below for more details.

  • UIProcess/ios/WKContentViewInteraction.h:

Keep track of the most recent autocorrection context that arrived in the UI process.

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView cleanUpInteraction]):

Clear out the autocorrection context, in case the web process crashes.

(-[WKContentView requestAutocorrectionContextWithCompletionHandler:]):

If the autocorrection context is requested while handling a DOM paste, we know that the latest autocorrection
context must be up to date, since the autocorrection context is computed and sent immediately before a DOM paste
request. Use this to immediately invoke the completion handler, without any sync IPC back to the web process.

(-[WKContentView _handleAutocorrectionContext:]):

7:20 PM Changeset in webkit [262890] by Ross Kirsling
  • 3 edits
    1 add in trunk

REGRESSION(r260697): [Intl] "missing script" locales like zh-TW are no longer mapped
https://bugs.webkit.org/show_bug.cgi?id=213007

Reviewed by Darin Adler.

JSTests:

  • stress/intl-missing-script-locales.js: Added.

Source/JavaScriptCore:

addMissingScriptLocales was removed from IntlObject when changing our locale resolution to depend more directly
on ICU, but apparently even latest ICU won't perform this legacy "region implies script" mapping for us.

ICU 65+ does have uloc_openAvailableByType which will do the trick, so perhaps we should use this in the future,
but it still doesn't seem to help us with Collator, which has its own separate set of "available locales".

The exact set of locales which should be mapped is currently under discussion here:
https://github.com/tc39/ecma402/issues/159
But the crux seems to be that we should ensure we have an xx-ZZ alias for all available xx-Yyyy-ZZ locales.

  • runtime/IntlObject.cpp:

(JSC::addScriptlessLocaleIfNeeded):
(JSC::intlAvailableLocales):
(JSC::intlCollatorAvailableLocales):

7:20 PM Changeset in webkit [262889] by commit-queue@webkit.org
  • 4 edits
    2 adds in trunk

[iOS] Option + Forward Delete should delete next word
https://bugs.webkit.org/show_bug.cgi?id=213062
rdar://64225458

Patch by Hiro (mzp) Mizuno <mzp@apple.com> on 2020-06-10
Reviewed by Daniel Bates.

Source/WebKit:

Implement support for pressing Option + Forward Delete to delete the next word. This makes text editing
in WebKit more closely match the platform conventions.

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView canPerformAction:withSender:]): Handle _deleteForwardByWord.
(-[WKContentView _deleteForwardByWord]): Added.

LayoutTests:

Add tests to ensure that Option + Forward Delete delete to the next word.
Skip the tests for now until we have the UIKit fix <rdar://problem/63253983>.

  • fast/events/ios/key-command-delete-next-word-expected.txt: Added.
  • fast/events/ios/key-command-delete-next-word.html: Added.
  • platform/ios/TestExpectations: Skip tests for now
6:05 PM Changeset in webkit [262888] by Alan Coon
  • 8 edits in branches/safari-610.1.15.51-branch/Source

Versioning.

6:05 PM Changeset in webkit [262887] by Alan Coon
  • 6 edits
    1 copy
    1 add in branches/safari-609-branch

Cherry-pick r262870. rdar://problem/64232759

Improve CSP compliance under PSON
https://bugs.webkit.org/show_bug.cgi?id=212995
<rdar://problem/62996186>

Reviewed by Chris Dumez.

LayoutTests/imported/w3c:

Rebaseline an existing test, since CSP is now checked before any navigations performed by a form action.

  • web-platform-tests/content-security-policy/form-action/form-action-src-blocked.sub-expected.txt:

Source/WebCore:

Tests: http/tests/security/contentSecurityPolicy/1.1/form-action-src-self-blocked.html

The form submission logic was only considering CSP if the form
action was a JavaScript URL. This is incorrect, as CSP might
apply to any URL.

This is also covered by the existing form-action CSP tests.

  • loader/FrameLoader.cpp: (WebCore::FrameLoader::submitForm): All URLs should be evaluted for compliance with CSP.

LayoutTests:

Add a new test to confirm that CSP rules are honored for form-action operations during process swap.
This also rebaselines an existing test, since CSP is now checked before any navigations performed by
a form action.

  • http/tests/security/contentSecurityPolicy/1.1/form-action-src-get-blocked-expected.txt: Rebaselined.
  • http/tests/security/contentSecurityPolicy/1.1/form-action-src-self-blocked-expected.txt: Copied from LayoutTests/http/tests/security/contentSecurityPolicy/1.1/form-action-src-get-blocked-expected.txt.
  • http/tests/security/contentSecurityPolicy/1.1/form-action-src-self-blocked.html: Added.

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

5:46 PM Changeset in webkit [262886] by Alan Coon
  • 1 copy in tags/Safari-610.1.15.51.1

Tag Safari-610.1.15.51.1.

5:46 PM Changeset in webkit [262885] by Jonathan Bedard
  • 3 edits in trunk/WebKitLibraries

Catalyst WebKit apps continue to play audio after quitting (Follow-up fix)
https://bugs.webkit.org/show_bug.cgi?id=212981
<rdar://problem/57089471>

Unreviewed build fix.

  • WebKitPrivateFrameworkStubs/appletvos/13/RunningBoardServices.framework/RunningBoardServices.tbd:
  • WebKitPrivateFrameworkStubs/watchos/6/RunningBoardServices.framework/RunningBoardServices.tbd:
5:41 PM Changeset in webkit [262884] by Jonathan Bedard
  • 2 edits
    1 delete in trunk/Tools

Generalize configure-xcode-for-ios-development (Part 2)
https://bugs.webkit.org/show_bug.cgi?id=207043
<rdar://problem/63946933>

Reviewed by Darin Adler.

  • EWSTools/start-queue-mac.sh: Use configure-xcode-for-embedded-development over configure-xcode-for-ios-development.
  • Scripts/configure-xcode-for-ios-development: Removed.
5:36 PM Changeset in webkit [262883] by Alan Coon
  • 2 edits in branches/safari-609-branch/Source/WebKit

Cherry-pick r262850. rdar://problem/64226899

[iOS] Add entitlement for PAC exceptions
https://bugs.webkit.org/show_bug.cgi?id=213027
<rdar://problem/63985737>

Reviewed by Brent Fulgham.

On iOS, add entitlement for PAC exceptions.

  • Scripts/process-entitlements.sh:

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

5:36 PM Changeset in webkit [262882] by Alan Coon
  • 7 edits
    2 adds in branches/safari-609-branch

Cherry-pick r262841. rdar://problem/64226920

REGRESSION(r262798): fast/mediastream/media-stream-track-interrupted.html is failing
https://bugs.webkit.org/show_bug.cgi?id=213011

Reviewed by Eric Carlson.

Source/WebCore:

Before the patch, a source that is muted and for which its observers get ended will not be ended.
This is a potential issue as the source can get unmuted, in which case, the audio shared unit might be asked to restart.
This is crashing in debug as we would not have the AudioSession correct category for audio capture.

Test: fast/mediastream/track-ended-while-muted.html
Also covered by fast/mediastream/media-stream-track-interrupted.html no longer flakily crashing in debug.

  • platform/mediastream/RealtimeMediaSource.cpp: (WebCore::RealtimeMediaSource::requestToEnd): End the source even if muted.
  • platform/mediastream/RealtimeMediaSource.h:
  • testing/Internals.cpp: (WebCore::Internals::isMediaStreamSourceEnded const):
  • testing/Internals.h:
  • testing/Internals.idl: Add necessary test infrastructure.

LayoutTests:

  • fast/mediastream/track-ended-while-muted-expected.txt: Added.
  • fast/mediastream/track-ended-while-muted.html: Added.

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

5:35 PM Changeset in webkit [262881] by Alan Coon
  • 14 edits in branches/safari-609-branch

Apply patch. rdar://problem/64226920

5:33 PM Changeset in webkit [262880] by jer.noble@apple.com
  • 2 edits in trunk/Source/WebCore

[Cocoa] CRASH: imported/w3c/web-platform-tests/remote-playback/watch-availability-initial-callback.html is flaky crashing
https://bugs.webkit.org/show_bug.cgi?id=213044
<rdar://problem/62317723>

Reviewed by Eric Carlson.

Add null-checks around previously non-null-checked derefs of WeakPtr<HTMLMediaElement>.

  • Modules/remoteplayback/RemotePlayback.cpp:

(WebCore::RemotePlayback::watchAvailability):
(WebCore::RemotePlayback::shouldPlayToRemoteTargetChanged):
(WebCore::RemotePlayback::playbackTargetPickerWasDismissed):

5:28 PM Changeset in webkit [262879] by sihui_liu@apple.com
  • 4 edits in trunk

Text manipulation does not observe inserted elements that are invisible
https://bugs.webkit.org/show_bug.cgi?id=213057
<rdar://problem/63768253>

Reviewed by Wenson Hsieh.

Source/WebCore:

TextManipulationController gets notification when renderer of an element is created and starts observing the
element. It currently sets the observing range to be the visible start position and visible end position of the
element. When the invisible content becomes visible later, TextManipulationController does not get notification
and will miss the content. Therefore, TextManipulationController should use the actual start and end positions
of the element for range.

Test: TextManipulation.StartTextManipulationFindsInsertedClippedText

  • editing/TextManipulationController.cpp:

(WebCore::makeHashablePositionRange):
(WebCore::TextManipulationController::scheduleObservationUpdate):

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/TextManipulation.mm:

(TestWebKitAPI::TEST):

5:15 PM Changeset in webkit [262878] by ggaren@apple.com
  • 45 edits in trunk

Some style improvements to main thread code
https://bugs.webkit.org/show_bug.cgi?id=213051

Reviewed by Darin Adler.

Source/WebCore:

Updated for rename.

  • WebCore.order:
  • platform/ios/wak/WebCoreThread.mm:

(StartWebThread):

Source/WebDriver:

Updated for rename.

  • WebDriverService.cpp:

(WebDriver::WebDriverService::run):

Source/WebKit:

Updated for rename.

  • Shared/Cocoa/WebKit2InitializeCocoa.mm:

(WebKit::runInitializationCode):
(WebKit::InitializeWebKit2):

  • Shared/WebKit2Initialize.cpp:

(WebKit::InitializeWebKit2):

Source/WebKitLegacy/mac:

Updated for rename.

  • History/WebBackForwardList.mm:

(+[WebBackForwardList initialize]):

  • History/WebHistoryItem.mm:

(+[WebHistoryItem initialize]):

  • Misc/WebCache.mm:

(+[WebCache initialize]):

  • Misc/WebElementDictionary.mm:

(+[WebElementDictionary initialize]):

  • Misc/WebIconDatabase.mm:
  • Plugins/Hosted/WebHostedNetscapePluginView.mm:

(+[WebHostedNetscapePluginView initialize]):

  • Plugins/WebBaseNetscapePluginView.mm:
  • Plugins/WebBasePluginPackage.mm:

(+[WebBasePluginPackage initialize]):

  • Plugins/WebNetscapePluginView.mm:

(+[WebNetscapePluginView initialize]):

  • WebCoreSupport/WebEditorClient.mm:

(+[WebUndoStep initialize]):

  • WebCoreSupport/WebFrameLoaderClient.mm:

(+[WebFramePolicyListener initialize]):

  • WebView/WebArchive.mm:

(+[WebArchivePrivate initialize]):

  • WebView/WebDataSource.mm:

(+[WebDataSource initialize]):

  • WebView/WebHTMLView.mm:

(+[WebHTMLViewPrivate initialize]):
(+[WebHTMLView initialize]):

  • WebView/WebPreferences.mm:

(+[WebPreferences initialize]):

  • WebView/WebResource.mm:

(+[WebResourcePrivate initialize]):

  • WebView/WebTextIterator.mm:

(+[WebTextIteratorPrivate initialize]):

  • WebView/WebView.mm:

(+[WebView initialize]):

  • WebView/WebViewData.mm:

(+[WebViewPrivate initialize]):

Source/WebKitLegacy/win:

Updated for rename.

  • WebView.cpp:

(WebView::WebView):

Source/WTF:

  • wtf/RunLoop.cpp:

(WTF::RunLoop::initializeMain): Renamed initializeMainRunLoop => initializeMain
to match the getter's name.
(WTF::RunLoop::initializeWeb): Samesies.
(WTF::RunLoop::webIfExists): Added an IfExists accessor for use in
scheduleDispatchFunctionsOnMainThread().
(WTF::RunLoop::initializeMainRunLoop): Deleted.
(WTF::RunLoop::initializeWebRunLoop): Deleted.

  • wtf/RunLoop.h:
  • wtf/cocoa/MainThreadCocoa.mm:

(WTF::scheduleDispatchFunctionsOnMainThread): Use RunLoop::webIfExists()
to check for the web thread run loop, since that's more explicit than
checking a pthread variable.

(WTF::isWebThread): Renamed mainThreadPthread => webThreadPthread because
it's the web thread. Changed style on globals to "s_" for consistency.
Removed mainThreadNSThread because it was unused.
(WTF::initializeApplicationUIThread):
(WTF::initializeWebThread):
(WTF::canCurrentThreadAccessThreadLocalData):

Tools:

Updated for rename.

  • TestWebKitAPI/Tests/WTF/RefPtr.cpp:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WTF/RunLoop.cpp:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebCore/ApplicationManifestParser.cpp:

(ApplicationManifestParserTest::SetUp):

  • TestWebKitAPI/Tests/WebCore/ComplexTextController.cpp:

(TestWebKitAPI::ComplexTextControllerTest::SetUp):

  • TestWebKitAPI/Tests/WebCore/ContentExtensions.cpp:

(TestWebKitAPI::ContentExtensionTest::SetUp):

  • TestWebKitAPI/Tests/WebCore/DNS.cpp:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebCore/FileMonitor.cpp:

(TestWebKitAPI::TEST_F):

  • TestWebKitAPI/Tests/WebKitCocoa/InAppBrowserPrivacy.mm:

(initializeInAppBrowserPrivacyTestSettings):

  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::initialize):

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

Release Assert @ WebCore::RenderTreeBuilder::RenderTreeBuilder
https://bugs.webkit.org/show_bug.cgi?id=212714

Patch by Pinki Gyanchandani <pgyanchandani@apple.com> on 2020-06-10
Reviewed by Geoffrey Garen.

Replaced call to WTFMove(widgetNewParentMap()) with std::exchange(widgetNewParentMap(), { }) in the
WidgetHierarchyUpdatesSuspensionScope::moveWidgets(), thereby making it explicit to set the source map empty.

Test would be added later.

  • rendering/RenderWidget.cpp:

(WebCore::WidgetHierarchyUpdatesSuspensionScope::moveWidgets):

5:07 PM Changeset in webkit [262876] by Jonathan Bedard
  • 3 edits
    1 copy in trunk/Tools

results.webkit.org: Health check should access redis and Cassandra
https://bugs.webkit.org/show_bug.cgi?id=212899
<rdar://problem/64118077>

Reviewed by Stephanie Lewis.

  • resultsdbpy/resultsdbpy/example/main.py:

(health): Check the health status of the model.

  • resultsdbpy/resultsdbpy/model/model.py:

(Model.HealthTable):
(Model.init): Construct a Cassandra table used to check the health of our Cassandra connection.
(Model.healthy): Make both a read and write connection to our two database dependencies so that if
our connection to those databases fails, an instance will be forced to restart.

  • resultsdbpy/resultsdbpy/model/model_unittest.py: Added.

(ModelTest):
(ModelTest.init_database):
(ModelTest.test_health):

5:00 PM Changeset in webkit [262875] by Jonathan Bedard
  • 3 edits in trunk/Source/WebKit

WebKit:Add PepperUICoreSPI.h (Follow-up fix 2)
https://bugs.webkit.org/show_bug.cgi?id=212996
<rdar://problem/64182627>

Unreviewed build fix.

  • UIProcess/ios/forms/WKNumberPadViewController.mm:

(-[WKNumberPadViewController addContentViewAnimations:]): Correct APPLE_INTERNAL_SDK macro.

  • UIProcess/ios/forms/WKQuickboardListViewController.mm:

(-[WKQuickboardListViewController initWithDelegate:]): Ditto.

4:58 PM Changeset in webkit [262874] by Fujii Hironori
  • 3 edits in trunk/LayoutTests

[WinCairo] Unreviewed test gardening

  • platform/wincairo/TestExpectations:
  • platform/wincairo/fast/text/justify-ideograph-leading-expansion-expected.txt:
4:38 PM Changeset in webkit [262873] by Alan Coon
  • 1 copy in tags/Safari-610.1.15.50.3

Tag Safari-610.1.15.50.3.

4:15 PM Changeset in webkit [262872] by ysuzuki@apple.com
  • 3 edits
    2 adds in trunk

[JSC] JSCallbackObject::deleteProperty should redirect to Parent::deletePropertyByIndex if propertyName is index
https://bugs.webkit.org/show_bug.cgi?id=213041
<rdar://problem/64204300>

Reviewed by Darin Adler.

Source/JavaScriptCore:

We have an infinite recursion here.

-> JSCallbackObject::deletePropertyByIndex

-> JSCell::deleteProperty

-> JSCallbackObject::deleteProperty

-> JSObject::deleteProperty

-> JSCallbackObject::deletePropertyByIndex

When propertyName in JSCallbackObject::deleteProperty is an index, we should go to JSObject::deletePropertyByIndex instead of JSObject::deleteProperty.

  • API/JSCallbackObjectFunctions.h:

(JSC::JSCallbackObject<Parent>::deleteProperty):

LayoutTests:

  • js/dom/callbackobject-delete-should-not-infinite-recursion-expected.txt: Added.
  • js/dom/callbackobject-delete-should-not-infinite-recursion.html: Added.
4:14 PM Changeset in webkit [262871] by Alan Bujtas
  • 2 edits in trunk/LayoutTests

[ Mac ] mathml/scripts-removeChild.html is flaky failing.
https://bugs.webkit.org/show_bug.cgi?id=208574
<rdar://problem/60041327>

Unreviewed test gardening.

Can't reproduce flakiness anymore.

  • platform/mac/TestExpectations:
4:11 PM Changeset in webkit [262870] by Brent Fulgham
  • 6 edits
    1 copy
    1 add in trunk

Improve CSP compliance under PSON
https://bugs.webkit.org/show_bug.cgi?id=212995
<rdar://problem/62996186>

Reviewed by Chris Dumez.

LayoutTests/imported/w3c:

Rebaseline an existing test, since CSP is now checked before any navigations performed by a form action.

  • web-platform-tests/content-security-policy/form-action/form-action-src-blocked.sub-expected.txt:

Source/WebCore:

Tests: http/tests/security/contentSecurityPolicy/1.1/form-action-src-self-blocked.html

The form submission logic was only considering CSP if the form
action was a JavaScript URL. This is incorrect, as CSP might
apply to any URL.

This is also covered by the existing form-action CSP tests.

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::submitForm): All URLs should be evaluted for
compliance with CSP.

LayoutTests:

Add a new test to confirm that CSP rules are honored for form-action operations during process swap.
This also rebaselines an existing test, since CSP is now checked before any navigations performed by
a form action.

  • http/tests/security/contentSecurityPolicy/1.1/form-action-src-get-blocked-expected.txt: Rebaselined.
  • http/tests/security/contentSecurityPolicy/1.1/form-action-src-self-blocked-expected.txt: Copied from LayoutTests/http/tests/security/contentSecurityPolicy/1.1/form-action-src-get-blocked-expected.txt.
  • http/tests/security/contentSecurityPolicy/1.1/form-action-src-self-blocked.html: Added.
4:11 PM Changeset in webkit [262869] by Russell Epstein
  • 2 edits in branches/safari-610.1.15.51-branch/Source/WebKit

Cherry-pick r262864. rdar://problem/64223970

Crash growing a CFData with incremental PDF loading.
<rdar://problem/63670403> and https://bugs.webkit.org/show_bug.cgi?id=213035

Reviewed by Alex Christensen.

No test - No reliable way to trigger.

  • WebProcess/Plugins/PDF/PDFPlugin.mm: (WebKit::PDFPlugin::ensureDataBufferLength): When you call CFDataCreateMutable with a size other than 0, your data object can never grow beyond that size. And, in fact, CFData will crash on purpose when this is attempted. So always create our mutable CFDatas with size 0 even if we immediately plan to grow them.

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

4:05 PM Changeset in webkit [262868] by Jonathan Bedard
  • 2 edits in trunk/Source/WebKit

WebKit:Add PepperUICoreSPI.h (Follow-up fix)
https://bugs.webkit.org/show_bug.cgi?id=212996
<rdar://problem/64182627>

Unreviewed build fix.

  • Platform/spi/watchos/PepperUICoreSPI.h: Add PUICPickerView headers.
4:04 PM Changeset in webkit [262867] by Alan Coon
  • 1 edit in branches/safari-609-branch/Source/WebKit/UIProcess/WebProcessProxy.h

Unreviewed build fix. rdar://problem/63902456

Undeclared identifier 'm_unexpectedActivityTimer'.

3:37 PM Changeset in webkit [262866] by ddkilzer@apple.com
  • 2 edits in trunk/Source/WebKit

REGRESSION (r262858): Fix macOS build when building EndowmentStateTracker.mm

  • UIProcess/EndowmentStateTracker.mm:
  • Move #if PLATFORM(IOS_FAMILY) to fix macOS build.
3:34 PM Changeset in webkit [262865] by pvollan@apple.com
  • 2 edits in trunk/Source/WebKit

[Cocoa] Return early from preference change notification handler if there is no observer
https://bugs.webkit.org/show_bug.cgi?id=213050

Reviewed by Darin Adler.

Currently, the observer member is checked inside the loop iterating over all the keys,
but this check should be moved outside of the loop.

No new tests, since this is not a change in behavior.

  • UIProcess/Cocoa/PreferenceObserver.mm:

(-[WKUserDefaults _notifyObserversOfChangeFromValuesForKeys:toValuesForKeys:]):

3:23 PM Changeset in webkit [262864] by beidson@apple.com
  • 2 edits in trunk/Source/WebKit

Crash growing a CFData with incremental PDF loading.
<rdar://problem/63670403> and https://bugs.webkit.org/show_bug.cgi?id=213035

Reviewed by Alex Christensen.

No test - No reliable way to trigger.

  • WebProcess/Plugins/PDF/PDFPlugin.mm:

(WebKit::PDFPlugin::ensureDataBufferLength): When you call CFDataCreateMutable with a size other than 0,

your data object can never grow beyond that size.
And, in fact, CFData will crash on purpose when this is attempted.
So always create our mutable CFDatas with size 0 even if we immediately plan to grow them.

3:03 PM Changeset in webkit [262863] by ggaren@apple.com
  • 4 edits in trunk/Source/WTF

[Cocoa] Build callOnMainThread on WTF::RunLoop rather than on NSObject methods
https://bugs.webkit.org/show_bug.cgi?id=213043

Reviewed by Simon Fraser.

Original patch by Sihui Liu.

From https://bugs.webkit.org/show_bug.cgi?id=202874, this is the subset
of Sihui's patch that unifies some of RunLoop and callOnMainThread.

My goal is to simplify the code, and shrink the diff when testing
CFRunLoopSource1 in the future.

  • wtf/RunLoop.cpp:

(WTF::RunLoop::initializeWebRunLoop):
(WTF::RunLoop::web):

  • wtf/RunLoop.h:
  • wtf/cocoa/MainThreadCocoa.mm:

(WTF::initializeMainThreadPlatform):
(WTF::scheduleDispatchFunctionsOnMainThread):
(WTF::initializeWebThread):
(-[JSWTFMainThreadCaller call]): Deleted.

2:47 PM Changeset in webkit [262862] by Jonathan Bedard
  • 3 edits
    1 add in trunk/Source/WebKit

WebKit: Add ClockKitSPI.h
https://bugs.webkit.org/show_bug.cgi?id=212994
<rdar://problem/64181092>

Reviewed by Wenson Hsieh.

No new tests, behavior unchanged.

  • Platform/spi/watchos: Added.
  • Platform/spi/watchos/ClockKitSPI.h: Added.
  • UIProcess/ios/forms/WKTimePickerViewController.mm: Import ClockKitSPI.h and UIKitSPI.h.
  • WebKit.xcodeproj/project.pbxproj: Include ClockKitSPI.
2:44 PM Changeset in webkit [262861] by BJ Burg
  • 6 edits in trunk/Source

WebDriver on non-iOS ports cannot perform ActionChain which has scrolling down to the element and click it
https://bugs.webkit.org/show_bug.cgi?id=208232
<rdar://problem/59859491>

Reviewed by Devin Rousso.

Source/WebCore:

  • platform/ScrollView.h:
  • platform/ScrollView.cpp:

(WebCore::ScrollView::rootViewToContents const):
Create a version of this function that works with FloatPoint.

Source/WebKit:

  • UIProcess/Automation/mac/WebAutomationSessionMac.mm:

(WebKit::WebAutomationSession::platformSimulateMouseInteraction):
The provided coordinates are in LayoutViewport coordinate system, which does
not take topContentInset into account. Add back in the topContentInset
when translating to flipped window coordinates.

  • WebProcess/Automation/WebAutomationSessionProxy.cpp:

(WebKit::WebAutomationSessionProxy::computeElementLayout):
The calculations of element bounds and IVCP have an incorrect handling of
root coordinates as contents/absolute coordinates. Add the missing conversion.

2:26 PM Changeset in webkit [262860] by Brent Fulgham
  • 4 edits in trunk/Source/WebKit

[iOS] Update sandbox rules for correct sanitizer paths in current OS releases
https://bugs.webkit.org/show_bug.cgi?id=213040
<rdar://problem/64187043>

Reviewed by Per Arne Vollan.

Update the sandbox rules on iOS platforms to allow access to the
new system locations for Asan libraries.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.GPU.sb:
  • Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:
  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
2:17 PM Changeset in webkit [262859] by keith_miller@apple.com
  • 2 edits in trunk/Tools

run-jsc-stress-tests should skip tests marked as slow in quick mode.
https://bugs.webkit.org/show_bug.cgi?id=213042

Reviewed by Yusuke Suzuki.

  • Scripts/run-jsc-stress-tests:
1:49 PM Changeset in webkit [262858] by jer.noble@apple.com
  • 13 edits
    2 adds in trunk

Catalyst WebKit apps continue to play audio after quitting
https://bugs.webkit.org/show_bug.cgi?id=212981
<rdar://problem/57089471>

Reviewed by Chris Dumez.

Source/WebKit:

RunningBoard will track whether a process (and it's associated child processes) are "user-visible" by
granting those processes an "endowment", similar to the existing endowment for application visibility.
Track changes to these endowments using a RBSProcessMonitor, and for Catalyst apps, react to losing the
"user-visible" endowment by suspending all media playback.

Move all the endowment-related code into a new class, EndowmentStateTracker, which is a singleton object
that can have mulitple WebPageProxy clients. Update references to the previously global static
isApplicationForeground() function to refer to EndowmentStateTracker instead.

Drive-by fix: move some iOS-only functions in WebPageProxy.cpp into WebPageProxyIOS.mm.

  • UIProcess/ApplicationStateTracker.h:
  • UIProcess/ApplicationStateTracker.mm:

(WebKit::ApplicationStateTracker::ApplicationStateTracker):
(WebKit::isApplicationForeground): Deleted.

  • UIProcess/EndowmentStateTracker.h: Added.

(WebKit::EndowmentStateTracker::isVisible const):
(WebKit::EndowmentStateTracker::isUserFacing const):

  • UIProcess/EndowmentStateTracker.mm: Added.

(WebKit::handleForPID):
(WebKit::EndowmentStateTracker::isApplicationForeground):
(WebKit::EndowmentStateTracker::isApplicationUserFacing):
(WebKit::EndowmentStateTracker::singleton):
(WebKit::EndowmentStateTracker::EndowmentStateTracker):
(WebKit::EndowmentStateTracker::addClient):
(WebKit::EndowmentStateTracker::removeClient):
(WebKit::EndowmentStateTracker::setIsUserFacing):
(WebKit::EndowmentStateTracker::setIsVisible):

  • UIProcess/WebPageProxy.cpp:

(WebKit::m_limitsNavigationsToAppBoundDomains):
(WebKit::WebPageProxy::~WebPageProxy):
(WebKit::WebPageProxy::processWillBecomeSuspended): Deleted.
(WebKit::WebPageProxy::processWillBecomeForeground): Deleted.

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

(WebKit::PageClientImpl::isApplicationVisible):

  • UIProcess/ios/WebPageProxyIOS.mm:

(WebKit::WebPageProxy::processWillBecomeSuspended):
(WebKit::WebPageProxy::processWillBecomeForeground):
(WebKit::WebPageProxy::isUserFacingChanged):
(WebKit::WebPageProxy::isVisibleChanged):

  • WebKit.xcodeproj/project.pbxproj:

Source/WTF:

Add the ability to call copyToVector() on a WeakHashSet. This requires two changes:

  • A template specialization that returns a Vector<WeakPtr<T>> from copyToVector()
  • A template specialization that calls calculateSize() rather than size() on the object being iterated upon.
  • wtf/WeakHashSet.h:

(WTF::copyToVector):

WebKitLibraries:

  • WebKitPrivateFrameworkStubs/iOS/13/RunningBoardServices.framework/RunningBoardServices.tbd:
1:49 PM Changeset in webkit [262857] by commit-queue@webkit.org
  • 5 edits in trunk/Source/WebCore

Unreviewed, reverting r262718.
https://bugs.webkit.org/show_bug.cgi?id=213047

Broke WPE Debug too

Reverted changeset:

"[WebXR] Pass an unsigned long to cancelAnimationCallback() as
handle"
https://bugs.webkit.org/show_bug.cgi?id=212529
https://trac.webkit.org/changeset/262718

1:37 PM Changeset in webkit [262856] by graouts@webkit.org
  • 6 edits in trunk

Subframes should not autosize independently
https://bugs.webkit.org/show_bug.cgi?id=212984
<rdar://problem/64175493>

Reviewed by Simon Fraser.

Source/WebCore:

  • page/FrameView.cpp:

(WebCore::FrameView::enableAutoSizeMode):

Source/WebKit:

Ensure we only call FrameView::enableSizeToContentAutoSizeMode() for the main frame.

  • WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:

(WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/AutoLayoutIntegration.mm:

(TEST): Added test for <object>.

1:36 PM Changeset in webkit [262855] by Philippe Normand
  • 2 edits in trunk/Source/WebCore

Unreviewed, WPE Debug build fix attempt after r262838.

Second attempt. :) Still broken because of r262718 though...

  • platform/xr/openxr/PlatformXROpenXR.cpp:
1:34 PM Changeset in webkit [262854] by Jonathan Bedard
  • 13 edits
    2 adds in trunk/Source/WebKit

WebKit:Add PepperUICoreSPI.h
https://bugs.webkit.org/show_bug.cgi?id=212996
<rdar://problem/64182627>

Reviewed by Tim Horton.

No new tests, behavior unchanged.

  • Platform/spi/watchos: Added.
  • Platform/spi/watchos/PepperUICoreSPI.h: Added.
  • UIProcess/Cocoa/WKSafeBrowsingWarning.mm: Include PepperUICoreSPI header.
  • UIProcess/ios/WKScrollView.mm: Ditto.
  • UIProcess/ios/forms/WKDatePickerViewController.mm: Remove headers duplicated in PepperUICoreSPI.h.
  • UIProcess/ios/forms/WKFocusedFormControlView.mm: Ditto.
  • UIProcess/ios/forms/WKNumberPadView.mm: Include PepperUICoreSPI header.
  • UIProcess/ios/forms/WKNumberPadViewController.h: Remove headers duplicated in PepperUICoreSPI.h.
  • UIProcess/ios/forms/WKNumberPadViewController.mm: Ditto.

(-[WKNumberPadViewController addContentViewAnimations:]): Limit addAnimation to Internal builds.

  • UIProcess/ios/forms/WKQuickboardListViewController.h: Include PepperUICoreSPI header.
  • UIProcess/ios/forms/WKQuickboardListViewController.mm: Remove headers duplicated in PepperUICoreSPI.h.

(-[WKQuickboardListViewController initWithDelegate:]):

  • UIProcess/ios/forms/WKSelectMenuListViewController.mm: Remove headers duplicated in PepperUICoreSPI.h.
  • UIProcess/ios/forms/WKTextInputListViewController.mm: Ditto.
  • WebKit.xcodeproj/project.pbxproj: Add PepperUICoreSPI.h.
1:31 PM Changeset in webkit [262853] by Philippe Normand
  • 2 edits in trunk/Source/WebCore

Unreviewed, WPE Debug build fix attempt after r262838.

Still broken because of r262718 though...

  • platform/xr/openxr/PlatformXROpenXR.cpp:
1:19 PM Changeset in webkit [262852] by Ryan Haddad
  • 2 edits in trunk/LayoutTests/imported/w3c

REGRESSION(r262809): [ macOS iOS ] imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-items-minimum-height-orthogonal-001.html is a constant failure
https://bugs.webkit.org/show_bug.cgi?id=213026

Unreviewed test gardening.

  • web-platform-tests/css/css-grid/grid-items/grid-items-minimum-height-orthogonal-001-expected.txt:

Check in a new baseline that accounts for the failing subtests to get the bots to green.

1:19 PM Changeset in webkit [262851] by Ryan Haddad
  • 2 edits in trunk/Tools

[Mojave] Flaky API Test: TestWebKitAPI.WebKitLegacy.CrossPartitionFileSchemeAccess
https://bugs.webkit.org/show_bug.cgi?id=206956

Unreviewed test gardening.

  • TestWebKitAPI/Tests/mac/CrossPartitionFileSchemeAccess.mm: Disable this test for Mojave.
12:31 PM Changeset in webkit [262850] by pvollan@apple.com
  • 2 edits in trunk/Source/WebKit

[iOS] Add entitlement for PAC exceptions
https://bugs.webkit.org/show_bug.cgi?id=213027
<rdar://problem/63985737>

Reviewed by Brent Fulgham.

On iOS, add entitlement for PAC exceptions.

  • Scripts/process-entitlements.sh:
12:26 PM Changeset in webkit [262849] by James Savage
  • 6 edits in trunk/Source/WebKit

Swift Overlay API refinements
https://bugs.webkit.org/show_bug.cgi?id=212939
<rdar://problem/64140013>

Reviewed by Darin Adler.

This patch cleans up some inconsistencies in the various Swift projections,
and modifies JavaScript evaluation callbacks to be optional to account for
scripts which may not evaluate to a useful result (such as ones that simply
modify the DOM without reporting a status). It also standardizes on using
completionHandler as an argument label to match the rest of WebKit API, and
the majority of the Swift API refinements.

It also fixes a module issue where the WebKit.h umbrella was missing an
import of WKScriptReplyWithMessageHandler.h, making the type unusable from
Swift source files/

  • Shared/API/Cocoa/WebKit.h: Add missing header.
  • UIProcess/API/Cocoa/WebKitSwiftOverlay.swift:

(callAsyncJavaScript(_:arguments:in:completionHandler:)): Rename completion

argument, and make optional. Note: Optional closures are implicitly
@escaping, making the annotation redundant and incompatible, so it must
be removed. In Swift, Optional.map()'s closure is invoked iff the Optional
contains some value, and the result of that transform is returned, else
nil is propagated. This allows us to apply the closure transform if the
client value is non-nil, without using intermediary variables or if/let.

(evaluateJavaScript(_:in:completionHandler:)): Ditto.

  • SwiftOverlay/Tests/WebKitTests.swift:

(WebKitTests.testAPI): Update names to reflect changes.

  • SwiftOverlay/WebKitSwiftOverlay.xcodeproj/xcshareddata/xcschemes/Everything (Catalyst).xcscheme:

Ensure that the unit test files get built as part of Build & Run, so that
any changes to names get flagged without even running the tests.

  • SwiftOverlay/WebKitSwiftOverlay.xcodeproj/xcshareddata/xcschemes/Everything.xcscheme:

Ditto.

12:20 PM Changeset in webkit [262848] by Devin Rousso
  • 8 edits in trunk/Source/WebInspectorUI

Web Inspector: text inputs should not spellcheck
https://bugs.webkit.org/show_bug.cgi?id=213032
<rdar://problem/64195429>

Reviewed by Brian Burg.

  • UserInterface/Base/Main.js:

(WI._handleDeviceSettingsTabBarButtonClicked.showUserAgentInput):

  • UserInterface/Views/BoxShadowEditor.js:

(WI.BoxShadowEditor):

  • UserInterface/Views/CookiePopover.js:

(WI.CookiePopover.prototype.show.createInputRow):

  • UserInterface/Views/EditableDataGridNode.js:

(WI.EditableDataGridNode.prototype.createCellContent):

  • UserInterface/Views/InputPopover.js:

(WI.InputPopover.prototype.show):

  • UserInterface/Views/ProbeSetDetailsSection.js:

(WI.ProbeSetDetailsSection.prototype._addProbeButtonClicked):

  • UserInterface/Views/SettingsTabContentView.js:

(WI.SettingsTabContentView.prototype._createConsoleSettingsView):

12:08 PM Changeset in webkit [262847] by caitp@igalia.com
  • 1 edit
    1 add in trunk/JSTests

[JSC] add stress test for op_get_private_name
https://bugs.webkit.org/show_bug.cgi?id=213024

Reviewed by Mark Lam.

  • stress/get-private-name.js: Added.
12:04 PM Changeset in webkit [262846] by Kate Cheney
  • 2 edits in trunk/Source/WebKit

ASSERTION FAILED: suspendedState == State::Running in WebKit::WebResourceLoadStatisticsStore::suspend
https://bugs.webkit.org/show_bug.cgi?id=213031
<rdar://problem/64131092>

Reviewed by Chris Dumez.

There is a race condition if two calls are made to
WebResourceLoadStatisticsStore::suspend() simultanously.
WebResourceLoadStatisticsStore::resume() notifies the background
thread to continue and releases a lock, then sometimes the second call
to suspend obtains the lock and updates the suspendedState variable
before the background thread resumes and checks the result. This patch allows the
suspendedState to be either State::Running or State::WillSuspend to
account for this.

No new tests, this should fix http/wpt/service-workers/service-worker-spinning-fetch.https.html.

  • NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp:

(WebKit::WebResourceLoadStatisticsStore::resourceLoadStatisticsUpdated):
(WebKit::WebResourceLoadStatisticsStore::suspend):

10:59 AM Changeset in webkit [262845] by achristensen@apple.com
  • 4 edits in trunk

Revert r259770
https://bugs.webkit.org/show_bug.cgi?id=210097
<rdar://problem/64175992>

Source/WebKit:

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::decidePolicyForNavigationAction):

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/SafeBrowsing.mm:

(TEST):

10:42 AM Changeset in webkit [262844] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit

Add some null checks in PDFPlugin::updatePageAndDeviceScaleFactors
https://bugs.webkit.org/show_bug.cgi?id=213009
<rdar://problem/63756100>

Patch by Alex Christensen <achristensen@webkit.org> on 2020-06-10
Reviewed by Chris Dumez.

  • WebProcess/Plugins/PDF/PDFPlugin.mm:

(WebKit::PDFPlugin::updatePageAndDeviceScaleFactors):

9:51 AM Changeset in webkit [262843] by youenn@apple.com
  • 2 edits in trunk/Source/WebCore

BaseAudioSharedUnit does not need to restart its audio unit at resume time.
https://bugs.webkit.org/show_bug.cgi?id=213021

Reviewed by Eric Carlson.

Removing a case that should not happen, and was guarded by ASSERT.
Keeping ASSERT to make sure we do not break this assumption.

  • platform/mediastream/mac/BaseAudioSharedUnit.cpp:

(WebCore::BaseAudioSharedUnit::resume):
(WebCore::BaseAudioSharedUnit::suspend):

9:20 AM Changeset in webkit [262842] by Devin Rousso
  • 3 edits
    2 adds in trunk

Web Inspector: XHR request with same URL as main resource will hide the main resource request
https://bugs.webkit.org/show_bug.cgi?id=212850
<rdar://problem/33072149>

Reviewed by Brian Burg.

Source/WebInspectorUI:

  • UserInterface/Controllers/NetworkManager.js:

(WI.NetworkManager.prototype._addNewResourceToFrameOrTarget):
When creating a new resource, don't re-use the frame's main resource if the URL matches.

LayoutTests:

  • inspector/network/request-main-url.html: Added.
  • inspector/network/request-main-url-expected.txt: Added.
9:02 AM Changeset in webkit [262841] by youenn@apple.com
  • 7 edits
    2 adds in trunk

REGRESSION(r262798): fast/mediastream/media-stream-track-interrupted.html is failing
https://bugs.webkit.org/show_bug.cgi?id=213011

Reviewed by Eric Carlson.

Source/WebCore:

Before the patch, a source that is muted and for which its observers get ended will not be ended.
This is a potential issue as the source can get unmuted, in which case, the audio shared unit might be asked to restart.
This is crashing in debug as we would not have the AudioSession correct category for audio capture.

Test: fast/mediastream/track-ended-while-muted.html
Also covered by fast/mediastream/media-stream-track-interrupted.html no longer flakily crashing in debug.

  • platform/mediastream/RealtimeMediaSource.cpp:

(WebCore::RealtimeMediaSource::requestToEnd):
End the source even if muted.

  • platform/mediastream/RealtimeMediaSource.h:
  • testing/Internals.cpp:

(WebCore::Internals::isMediaStreamSourceEnded const):

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

Add necessary test infrastructure.

LayoutTests:

  • fast/mediastream/track-ended-while-muted-expected.txt: Added.
  • fast/mediastream/track-ended-while-muted.html: Added.
8:35 AM Changeset in webkit [262840] by clopez@igalia.com
  • 28 edits
    8 adds
    12 deletes in trunk/LayoutTests

Layout tests outside of the WPT import should not use resources from it
https://bugs.webkit.org/show_bug.cgi?id=212661

Reviewed by Youenn Fablet.

Some layout tests were using resource files from the imported WPT tests.
This is an issue because updating the WPT tests may break this tests in the future.

To fix this the used resource files are copied inside the main folder of each test
and the tests modified to use them.

On top of that, some tests are de-duplicates (in favor of the WPT versions, which are the same).
This is the list of tests de-duplicated:
canvas/philip/tests/2d.drawImage.incomplete.emptysrc.html -> imported/w3c/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.incomplete.emptysrc.html
canvas/philip/tests/2d.drawImage.incomplete.nosrc.html -> imported/w3c/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.incomplete.nosrc.html
canvas/philip/tests/2d.drawImage.incomplete.removedsrc.html -> imported/w3c/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.incomplete.removedsrc.html
canvas/philip/tests/2d.pattern.image.incomplete.emptysrc.html -> imported/w3c/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.image.incomplete.emptysrc.html
canvas/philip/tests/2d.pattern.image.incomplete.removedsrc.html -> imported/w3c/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.image.incomplete.removedsrc.html
fast/shadow-dom/capturing-and-bubbling-event-listeners-across-shadow-trees.html -> imported/w3c/web-platform-tests/shadow-dom/capturing-and-bubbling-event-listeners-across-shadow-trees.html

  • canvas/philip/tests/2d.drawImage.incomplete.emptysrc-expected.txt: Removed.
  • canvas/philip/tests/2d.drawImage.incomplete.emptysrc.html: Removed.
  • canvas/philip/tests/2d.drawImage.incomplete.nosrc-expected.txt: Removed.
  • canvas/philip/tests/2d.drawImage.incomplete.nosrc.html: Removed.
  • canvas/philip/tests/2d.drawImage.incomplete.removedsrc-expected.txt: Removed.
  • canvas/philip/tests/2d.drawImage.incomplete.removedsrc.html: Removed.
  • canvas/philip/tests/2d.pattern.image.incomplete.emptysrc-expected.txt: Removed.
  • canvas/philip/tests/2d.pattern.image.incomplete.emptysrc.html: Removed.
  • canvas/philip/tests/2d.pattern.image.incomplete.removedsrc-expected.txt: Removed.
  • canvas/philip/tests/2d.pattern.image.incomplete.removedsrc.html: Removed.
  • fast/css/resources/shadow-helper.js: Added.

(getElementByShadowIds):
(ceClass.):
(installCustomElement):

  • fast/css/shadow-parts/exportparts-syntax.html:
  • fast/css/shadow-parts/invalidation-class-before-after.html:
  • fast/css/shadow-parts/invalidation-class-descendant-combinator-export.html:
  • fast/css/shadow-parts/invalidation-class-descendant-combinator.html:
  • fast/css/shadow-parts/invalidation-class-sibling-combinator-export.html:
  • fast/css/shadow-parts/invalidation-class-sibling-combinator.html:
  • fast/custom-elements/DOMImplementation-createDocument.html:
  • fast/custom-elements/adopting-from-frameless-document.html:
  • fast/custom-elements/disconnected-callback-in-detached-iframe.html:
  • fast/custom-elements/document-createElementNS.html:
  • fast/custom-elements/enqueue-custom-element-callback-reactions-inside-another-callback.html:
  • fast/custom-elements/perform-microtask-checkpoint-before-construction.html:
  • fast/custom-elements/reactions-for-webkit-extensions.html:
  • fast/custom-elements/resources/custom-elements-helpers.js: Added.

(create_window_in_test):
(test_with_window):
(prototype.attributeChangedCallback):
(prototype.connectedCallback):
(prototype.disconnectedCallback):
(prototype.adoptedCallback):
(return.takeLog):
(create_constructor_log):
(assert_constructor_log_entry):
(create_connected_callback_log):
(assert_connected_log_entry):
(create_disconnected_callback_log):
(assert_disconnected_log_entry):
(assert_adopted_log_entry):
(create_adopted_callback_log):
(create_attribute_changed_callback_log):
(assert_attribute_log_entry):
(define_new_custom_element.CustomElement):
(define_new_custom_element.CustomElement.prototype.attributeChangedCallback):
(define_new_custom_element.CustomElement.prototype.connectedCallback):
(define_new_custom_element.CustomElement.prototype.disconnectedCallback):
(define_new_custom_element.CustomElement.prototype.adoptedCallback):
(define_new_custom_element.return.takeLog):
(CustomElement):
(CustomElement.prototype.attributeChangedCallback):
(CustomElement.prototype.connectedCallback):
(CustomElement.prototype.disconnectedCallback):
(CustomElement.prototype.adoptedCallback):

  • fast/custom-elements/resources/reactions.js: Added.

(testNodeConnector):
(testNodeDisconnector):
(testInsertingMarkup):
(testParsingMarkup):
(prototype.test):
(testReflectBooleanAttribute):
(testAttributeAdder):

  • fast/custom-elements/throw-on-dynamic-markup-insertion-counter-construct.html:
  • fast/custom-elements/throw-on-dynamic-markup-insertion-counter-reactions.html:
  • fast/images/resources/green-256x256.png: Added.
  • fast/images/sizes-dynamic-001-expected.html:
  • fast/images/sizes-dynamic-001.html:
  • fast/images/sizes-dynamic-002-expected.html:
  • fast/images/sizes-dynamic-002.html:
  • fast/shadow-dom/capturing-and-bubbling-event-listeners-across-shadow-trees-expected.txt: Removed.
  • fast/shadow-dom/capturing-and-bubbling-event-listeners-across-shadow-trees.html: Removed.
  • mathml/non-core/frac-linethickness-001-expected.html:
  • mathml/non-core/frac-linethickness-001.html:
  • mathml/non-core/frac-linethickness-002-expected.html:
  • mathml/non-core/frac-linethickness-002.html:
  • mathml/non-core/lengths-1.html:
  • mathml/non-core/lengths-2.html:
  • mathml/non-core/lengths-3.html:
  • mathml/presentation/radical-bar-visibility.html:
  • mathml/resources/fraction-rulethickness10000.woff: Added.
  • mathml/resources/radical-degreebottomraisepercent25-rulethickness1000.woff: Added.
  • mathml/resources/xheight500.woff: Added.
7:30 AM Changeset in webkit [262839] by Wenson Hsieh
  • 2 edits in trunk/LayoutTests

[iPadOS] editing/selection/ios/toggle-callout-bar-after-tap-in-selected-non-editable-text.html times out
https://bugs.webkit.org/show_bug.cgi?id=213010
<rdar://problem/64182061>

Reviewed by Tim Horton.

This test times out because the second tap (which is intended to toggle callout bar visibility by tapping on the
text selection) misses completely, due to the fact that the midpoint of the selected paragraph element is
somewhere in the middle of the page.

Fix this by simply making the selection target inline-block, such that the element width doesn't expand to
the width of the page.

  • editing/selection/ios/toggle-callout-bar-after-tap-in-selected-non-editable-text.html:
6:20 AM WPTExportProcess edited by clopez@igalia.com
(diff)
6:17 AM Changeset in webkit [262838] by svillar@igalia.com
  • 5 edits
    2 adds
    2 deletes in trunk/Source/WebCore

[WebXR] Refactor OpenXR platform code
https://bugs.webkit.org/show_bug.cgi?id=212470

Reviewed by Youenn Fablet.

Refactored a bit the platform code because we want to extend the PlatformXR::Device for the OpenXR
library. Also we're removing all the device id code because there is no need to expose it.

The idea from now on is to only define interfaces in PlatformXR.h and then add all the OpenXR specifics
in the newly renamed PlatformXROpenXR.[ch] files. We're also renaming PlatformXR.cpp to
PlatformXROpenXR.cpp to clearly state that it's the OpenXR implementation and to differentiate it from
the implementation agnostic PlatformXR.h file.

No new tests as there is no change in functionality.

  • Sources.txt: Added renamed files. Removed PlatformXR.cpp.
  • WebCore.xcodeproj/project.pbxproj: Ditto.
  • platform/xr/PlatformXR.cpp: Removed.
  • platform/xr/PlatformXR.h:

(PlatformXR::Device::id const): Deleted.
(PlatformXR::Device::operator== const): Deleted.

  • platform/xr/openxr/PlatformXROpenXR.cpp: Renamed from Source/WebCore/platform/xr/openxr/PlatformXR.cpp.

(PlatformXR::Instance::Impl::~Impl): Call xrDestroyInstance() on m_instance.
(PlatformXR::Instance::Impl::collectSupportedSessionModes): Do not pass XrSystemId as argument
as it's stored in the OpenXRDevice object.
(PlatformXR::Instance::enumerateImmersiveXRDevices): Create an OpenXRDevice instead of a Device.

  • platform/xr/openxr/PlatformXROpenXR.h: Added.
4:18 AM Changeset in webkit [262837] by commit-queue@webkit.org
  • 2 edits in trunk/Tools

Unreviewed, reverting r262807.
https://bugs.webkit.org/show_bug.cgi?id=213019

It is breaking JSC queues (Requested by caiolima on #webkit).

Reverted changeset:

"Add a timeout monitor for JSC stress test"
https://bugs.webkit.org/show_bug.cgi?id=211978
https://trac.webkit.org/changeset/262807

12:34 AM Changeset in webkit [262836] by Diego Pino Garcia
  • 4 edits in trunk/LayoutTests

[GTK][WPE] Gardening, update expectations after r262834
https://bugs.webkit.org/show_bug.cgi?id=213014

Unreviewed gardening.

Garden latest failures from bots and adjust the actual result of
several flaky failures.

  • platform/glib/TestExpectations:
  • platform/gtk/TestExpectations:
  • platform/wpe/TestExpectations:

Jun 9, 2020:

9:16 PM Changeset in webkit [262835] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

Release Assert @ WebCore::RenderTreeBuilder::RenderTreeBuilder
https://bugs.webkit.org/show_bug.cgi?id=212714

Patch by Pinki Gyanchandani <pgyanchandani@apple.com> on 2020-06-09
Reviewed by Geoffrey Garen.

Made change in the WidgetHierarchyUpdatesSuspensionScope::moveWidgets() to handle all widgets scheduled to move,
including new widgets scheduled during moveWidgets().

Test would be added later.

  • rendering/RenderWidget.cpp:

(WebCore::WidgetHierarchyUpdatesSuspensionScope::moveWidgets):

9:10 PM Changeset in webkit [262834] by Fujii Hironori
  • 17 edits in trunk

Unreviewed, reverting r262791.

WinCairo WebKit1 is crashing.

Reverted changeset:

"[Curl] Implement functions to use ResourceLoadStatistics."
https://bugs.webkit.org/show_bug.cgi?id=207692
https://trac.webkit.org/changeset/262791

8:44 PM Changeset in webkit [262833] by Simon Fraser
  • 6 edits in trunk

Minor overflow layers cleanup
https://bugs.webkit.org/show_bug.cgi?id=213002

Reviewed by Zalan Bujtas.

Source/WebCore:

Now that we parent scrollbar and scroll corner layers into the overflowControlsContainer
layer, we no need to parent these layers in RenderLayerCompositor::updateBackingAndHierarchy().

Also rename overflowControlsHostLayerBox to overflowControlsHostLayerRect to avoid
ambiguity with RenderBox.

  • rendering/RenderLayerBacking.cpp:

(WebCore::RenderLayerBacking::updateDebugIndicators):
(WebCore::overflowControlsHostLayerRect):
(WebCore::RenderLayerBacking::updateGeometry):
(WebCore::overflowControlsHostLayerBox): Deleted.

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

(WebCore::RenderLayerCompositor::updateBackingAndHierarchy):

LayoutTests:

New results now now that the scrollbar layers aren't reparented.

  • compositing/overflow/overflow-scrollbar-layer-positions-expected.txt:
7:16 PM Changeset in webkit [262832] by timothy_horton@apple.com
  • 4 edits in trunk/Source

Stop using the wrong LaunchServices SPI for getting an app's localized name
https://bugs.webkit.org/show_bug.cgi?id=213003
<rdar://problem/64169000>

Reviewed by Sam Weinig.

Source/WebCore/PAL:

  • pal/spi/cocoa/LaunchServicesSPI.h:

Source/WebKit:

  • UIProcess/ios/WKActionSheetAssistant.mm:

(-[WKActionSheetAssistant _appendAppLinkOpenActionsForURL:actions:elementInfo:]):

7:04 PM Changeset in webkit [262831] by timothy_horton@apple.com
  • 3 edits
    1 add in trunk/Source/WTF

Use os_log instead of asl_log
https://bugs.webkit.org/show_bug.cgi?id=213001

Reviewed by Saam Barati.

  • WTF.xcodeproj/project.pbxproj:
  • wtf/Assertions.cpp:
7:04 PM Changeset in webkit [262830] by mark.lam@apple.com
  • 3 edits
    1 add in trunk

Stringifier::appendStringifiedValue() should not assume it is always safe to recurse.
https://bugs.webkit.org/show_bug.cgi?id=213006
<rdar://problem/64154840>

Reviewed by Keith Miller.

JSTests:

  • stress/json-stringify-executing-in-reserved-zone.js: Added.

Source/JavaScriptCore:

In r262727, I suggested that Alexey Shvayka add an assertion in
Stringifier::appendStringifiedValue() to assert that it is safe to recurse because
we don't expect it to recurse into itself. Turns out this is a bad idea because
a client may be doing the recursing before calling Stringifier::appendStringifiedValue().
As a result, Stringifier::appendStringifiedValue() ends up being executed with
the stack pointer already in the reserved zone. This is legal, and is what the
reserved zone is intended for as long as we don't recurse from here. However,
this also means that asserting vm.isSafeToRecurseSoft() here will surely fail
because we are already in the reserved zone area. The fix is simply to remove
this faulty assertion.

  • runtime/JSONObject.cpp:

(JSC::Stringifier::appendStringifiedValue):

6:57 PM Changeset in webkit [262829] by Russell Epstein
  • 8 edits in branches/safari-610.1.15.50-branch/Source

Versioning.

6:44 PM Changeset in webkit [262828] by jfernandez@igalia.com
  • 2 edits in trunk/LayoutTests

[GTK] Unreviewed test gardening
https://bugs.webkit.org/show_bug.cgi?id=212997

Unreviewed test gardening

  • platform/gtk/TestExpectations:
5:21 PM Changeset in webkit [262827] by mark.lam@apple.com
  • 64 edits
    1 add in trunk

Disambiguate the OverridesGetPropertyNames structure flag
https://bugs.webkit.org/show_bug.cgi?id=212909
<rdar://problem/63823557>

Reviewed by Saam Barati.

JSTests:

  • stress/unexpected-stack-overflow-below-JSObject-getPropertyNames.js: Added.

Source/JavaScriptCore:

Previously, the OverridesGetPropertyNames structure flag could mean 2 different
things:

  1. the getPropertyNames() method is overridden, or
  2. any of the forms of getPropertyName() is overridden: getPropertyName, getOwnPropertyNames, getOwnNonIndexPropertyNames

Some parts of the code expects one definition while other parts expect the other.
This patch disambiguates between the 2 by introducing OverridesAnyFormOfGetPropertyNames
for definition (2). OverridesGetPropertyNames now only means definition (1).

Note: we could have implemented overridesGetPropertyNames() by doing a comparison
of the getPropertyNames pointer in the MethodTable. This is a little slower than
checking a TypeInfo flag, but probably doesn't matter a lot in the code paths
where overridesGetPropertyNames() is called. However, we have bits in TypeInfo
left. So, we'll might as well use it.

This ambiguity resulted in JSObject::getPropertyNames() recursing infinitely
when it didn't think it could recurse. This is demonstrated in
JSTests/stress/unexpected-stack-overflow-below-JSObject-getPropertyNames.js as
follows:

  1. The test case invokes JSObject::getPropertyNames on a JSArray.
  1. In the while loop at the bottom of JSObject::getPropertynames(), we check if (prototype->structure(vm)->typeInfo().overridesGetPropertyNames()) {.
  1. The test overrides proto as follows: arg0.__proto__ = arr1 where both arg0 and arr1 are JArrays.
  1. In the old code, JSArray sets OverridesGetPropertyNames but does not override getPropertyNames(). It actually meant to set OverridesAnyFormOfGetPropertyNames (after we disambiguated it) because JSArray overrides getOwnNonIndexPropertyNames().
  1. When we get to the check at (2), we ask if the prototype overridesGetPropertyNames(). Since JSArray sets OverridesGetPropertyNames, the answer is yes / true.

JSObject::getPropertynames() then proceeds to invoke
prototype->methodTable(vm)->getPropertyNames(prototype, globalObject, propertyNames, mode);

But because JSArray does not actually overrides getPropertyNames(), we're
actually invoking JSObject::getPropertyNames() here. Viola! Infinite loop.

With this patch, JSArray is disambiguated to set OverridesAnyFormOfGetPropertyNames
instead of OverridesGetPropertyNames, and this infinite loop no longer exists.

This patch also made the following changes:

  1. Templatized TypeInfo::isSetOnFlags1() and TypeInfo::isSetOnFlags2() so that we can used static_asserts instead of a debug ASSERT to verify the integrity of the flag we're checking against.
  1. Added a Structure::validateFlags() called from the Structure constructor. validateFlags() will verify the following:
    1. OverridesGetOwnPropertySlot must be set in the flags if getOwnPropertySlot is overridden in the MethodTable.
    2. InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero must be set in the flags if getOwnPropertySlotByIndex is overridden in the MethodTable.
    3. HasPutPropertySecurityCheck must be set in the flags if doPutPropertySecurityCheck is overridden in the MethodTable.
    4. OverridesGetPropertyNames must be set in the flags if getPropertyNames is overridden in the MethodTable.
    5. OverridesAnyFormOfGetPropertyNames must be set in the flags if any of getPropertyNames, getOwnPropertyNames, or getOwnNonIndexPropertyNames are overridden in the MethodTable.

An alternate solution would be to automatically set these flags if we detect
their corresponding methods are overridden. However, this alternate solution
requires this laundry list to be checked every time a structure is constructed.
The current implementation of having the required flags already pre-determined
as a constant is more efficient in terms of performance and code space.

Also, it only takes one instantiation of the structure to verify that the flags
are valid. Since we only write JSCell / JSObject classes when we need them
and we always write tests to exercise new code (especially such classes), we're
guaranteed the flags validation will be exercised.

  1. Made JSObject::getOwnPropertySlot() and JSObject::doPutPropertySecurityCheck() not inlined when ASSERT_ENABLED. This is needed in order for Structure::validateFlags() to do its checks using function pointer comparisons. Otherwise, the inline functions can result in multiple instantiations of these functions. For example, WebCore can get its own copy of JSObject::getOwnPropertySlot() and the comparisons will think the function is overridden even when it's not.
  1. Structure::validateFlags() found the following problems which are now fixed:

GetterSetter was not using its StructureFlags. As a result, it was missing the
OverridesGetOwnPropertySlot flag.

JSDataView did not define its StructureFlags. It was missing the
OverridesGetOwnPropertySlot and OverridesAnyFormOfGetPropertyNames flags.

  1. Changed a TypeInfo constructor to not have a default argument for the flags value. Also grepped for all uses of this constructor to make sure that it is passed the StructureFlags field. This exercise found the following issue:

JSAPIValueWrapper was not using its StructureFlags when creating its structure.
Previously, it was just ignoring the StructureIsImmortal flag in StructureFlags.

  1. Hardened the assertions for hasReadOnlyOrGetterSetterPropertiesExcludingProto() and hasGetterSetterProperties() in the Structure constructor.

Previously, if the flag is set, it verifies that the ClassInfo has the
appropriate data expected by the flag. However, it does not assert the reverse
i.e. that if the ClassInfo data exists, then the flag must also be set.
The new assertions now checks both.

Moved the overridesGetCallData() assertion into Structure::validateFlags()
because it concerns the OverridesGetCallData flag. This assertion has also
ben hardened.

  • API/JSAPIValueWrapper.h:
  • API/JSCallbackObject.h:
  • debugger/DebuggerScope.h:
  • inspector/JSInjectedScriptHostPrototype.h:
  • inspector/JSJavaScriptCallFramePrototype.h:
  • runtime/ClonedArguments.h:
  • runtime/ErrorInstance.h:
  • runtime/GenericArguments.h:
  • runtime/GetterSetter.h:
  • runtime/JSArray.h:
  • runtime/JSDataView.h:
  • runtime/JSFunction.h:
  • runtime/JSGenericTypedArrayView.h:
  • runtime/JSGlobalObject.h:
  • runtime/JSLexicalEnvironment.h:
  • runtime/JSModuleEnvironment.h:
  • runtime/JSModuleNamespaceObject.h:
  • runtime/JSObject.cpp:

(JSC::JSObject::doPutPropertySecurityCheck):
(JSC::JSObject::getOwnPropertySlot):

  • runtime/JSObject.h:

(JSC::JSObject::getOwnPropertySlotImpl):
(JSC::JSObject::getOwnPropertySlot):

  • runtime/JSProxy.h:
  • runtime/JSString.h:
  • runtime/JSSymbolTableObject.h:
  • runtime/JSTypeInfo.h:

(JSC::TypeInfo::TypeInfo):
(JSC::TypeInfo::masqueradesAsUndefined const):
(JSC::TypeInfo::implementsHasInstance const):
(JSC::TypeInfo::implementsDefaultHasInstance const):
(JSC::TypeInfo::overridesGetCallData const):
(JSC::TypeInfo::overridesToThis const):
(JSC::TypeInfo::structureIsImmortal const):
(JSC::TypeInfo::overridesGetPropertyNames const):
(JSC::TypeInfo::overridesAnyFormOfGetPropertyNames const):
(JSC::TypeInfo::prohibitsPropertyCaching const):
(JSC::TypeInfo::getOwnPropertySlotIsImpure const):
(JSC::TypeInfo::getOwnPropertySlotIsImpureForPropertyAbsence const):
(JSC::TypeInfo::hasPutPropertySecurityCheck const):
(JSC::TypeInfo::newImpurePropertyFiresWatchpoints const):
(JSC::TypeInfo::isImmutablePrototypeExoticObject const):
(JSC::TypeInfo::interceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero const):
(JSC::TypeInfo::isSetOnFlags1 const):
(JSC::TypeInfo::isSetOnFlags2 const):

  • runtime/ObjectConstructor.cpp:

(JSC::objectConstructorAssign):

  • runtime/ProxyObject.h:
  • runtime/RegExpObject.h:
  • runtime/StringObject.h:
  • runtime/Structure.cpp:

(JSC::Structure::validateFlags):
(JSC::Structure::Structure):

  • runtime/Structure.h:
  • runtime/StructureInlines.h:

(JSC::Structure::canCacheOwnKeys const):

  • tools/JSDollarVM.cpp:

Source/WebCore:

  1. JSDOMWindowProperties was not defining its Base. As a result, its StructureFlags was inheriting from JSDOMObject's Base instead of from JSDOMObject as one would expect. This turns out to be harmless because JSDOMObject did not define any StructureFlags. Regardless, this is not fixed so that if JSDOMObject adds any StructureFlags, it will be inherited properly by JSDOMWindowProperties.
  1. Updated CodeGeneratorJS.pm and rebased the binding test results.
  • bindings/js/JSDOMWindowProperties.h:
  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateHeader):

  • bindings/scripts/test/JS/JSTestEventTarget.h:
  • bindings/scripts/test/JS/JSTestIndexedSetterNoIdentifier.h:
  • bindings/scripts/test/JS/JSTestIndexedSetterThrowingException.h:
  • bindings/scripts/test/JS/JSTestIndexedSetterWithIdentifier.h:
  • bindings/scripts/test/JS/JSTestNamedAndIndexedSetterNoIdentifier.h:
  • bindings/scripts/test/JS/JSTestNamedAndIndexedSetterThrowingException.h:
  • bindings/scripts/test/JS/JSTestNamedAndIndexedSetterWithIdentifier.h:
  • bindings/scripts/test/JS/JSTestNamedDeleterNoIdentifier.h:
  • bindings/scripts/test/JS/JSTestNamedDeleterThrowingException.h:
  • bindings/scripts/test/JS/JSTestNamedDeleterWithIdentifier.h:
  • bindings/scripts/test/JS/JSTestNamedDeleterWithIndexedGetter.h:
  • bindings/scripts/test/JS/JSTestNamedGetterCallWith.h:
  • bindings/scripts/test/JS/JSTestNamedGetterNoIdentifier.h:
  • bindings/scripts/test/JS/JSTestNamedGetterWithIdentifier.h:
  • bindings/scripts/test/JS/JSTestNamedSetterNoIdentifier.h:
  • bindings/scripts/test/JS/JSTestNamedSetterThrowingException.h:
  • bindings/scripts/test/JS/JSTestNamedSetterWithIdentifier.h:
  • bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetter.h:
  • bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetterAndSetter.h:
  • bindings/scripts/test/JS/JSTestNamedSetterWithOverrideBuiltins.h:
  • bindings/scripts/test/JS/JSTestNamedSetterWithUnforgableProperties.h:
  • bindings/scripts/test/JS/JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins.h:
  • bindings/scripts/test/JS/JSTestObj.h:
  • bindings/scripts/test/JS/JSTestOverrideBuiltins.h:
  • bridge/runtime_array.h:
  • bridge/runtime_object.h:

Source/WebKit:

  • WebProcess/Plugins/Netscape/JSNPObject.h:
5:05 PM Changeset in webkit [262826] by dino@apple.com
  • 9 edits
    6 moves in trunk/Source

Stop using discriminatory names for WebGL and Plugin blocking
https://bugs.webkit.org/show_bug.cgi?id=213000

Reviewed by Simon Fraser.

Source/WebCore:

  • SourcesCocoa.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • platform/mac/BlocklistUpdater.h: Renamed from Source/WebCore/platform/mac/BlacklistUpdater.h.

(WebCore::BlocklistUpdater::pluginBlocklist):
(WebCore::BlocklistUpdater::webGLBlocklist):

  • platform/mac/BlocklistUpdater.mm: Renamed from Source/WebCore/platform/mac/BlacklistUpdater.mm.

(WebCore::BlocklistUpdater::readBlocklistData):
(WebCore::BlocklistUpdater::reloadIfNecessary):
(WebCore::BlocklistUpdater::initializeQueue):

  • platform/mac/PluginBlocklist.h: Renamed from Source/WebCore/platform/mac/PluginBlacklist.h.
  • platform/mac/PluginBlocklist.mm: Renamed from Source/WebCore/platform/mac/PluginBlacklist.mm.

(WebCore::PluginBlocklist::loadPolicyForPluginVersion):
(WebCore::PluginBlocklist::isPluginUpdateAvailable):
(WebCore::PluginBlocklist::create):
(WebCore::PluginBlocklist::~PluginBlocklist):
(WebCore::PluginBlocklist::splitOSVersion):
(WebCore::PluginBlocklist::loadPolicyForPlugin const):
(WebCore::PluginBlocklist::isUpdateAvailable const):
(WebCore::PluginBlocklist::PluginBlocklist):

  • platform/mac/WebGLBlocklist.h: Renamed from Source/WebCore/platform/mac/WebGLBlacklist.h.
  • platform/mac/WebGLBlocklist.mm: Renamed from Source/WebCore/platform/mac/WebGLBlacklist.mm.

(WebCore::buildInfoFromOSBuildString):
(WebCore::WebGLBlocklist::shouldBlockWebGL):
(WebCore::WebGLBlocklist::shouldSuggestBlockingWebGL):
(WebCore::matchesBuildInfo):
(WebCore::WebGLBlocklist::create):
(WebCore::WebGLBlocklist::shouldBlock const):
(WebCore::WebGLBlocklist::shouldSuggestBlocking const):
(WebCore::WebGLBlocklist::WebGLBlocklist):
(WebCore::WebGLBlocklist::~WebGLBlocklist):

Source/WebKit:

  • Shared/Plugins/Netscape/mac/PluginInformationMac.mm:

(WebKit::getPlatformPluginModuleInformation):

  • UIProcess/API/C/mac/WKContextPrivateMac.mm:

(WKContextIsPlugInUpdateAvailable):
(WKContextShouldBlockWebGL):
(WKContextShouldSuggestBlockWebGL):

  • UIProcess/Plugins/mac/PluginInfoStoreMac.mm:

(WebKit::PluginInfoStore::defaultLoadPolicyForPlugin):

Source/WebKitLegacy/mac:

  • WebCoreSupport/WebFrameLoaderClient.mm:

(shouldBlockPlugin):
(shouldBlockWebGL):

4:32 PM Changeset in webkit [262825] by Simon Fraser
  • 3 edits in trunk/Source/WebCore

Logging and tree dumping crash fix
https://bugs.webkit.org/show_bug.cgi?id=212988

Reviewed by Zalan Bujtas.

Add scrolling logging to RenderLayer::requestScrollPositionUpdate().

Null-check the scrollerImp in ScrollbarThemeMac::isLayoutDirectionRTL, because this is
called from renderTreeAsText() which can be invoked from the debugger, and should not crash.

  • platform/mac/ScrollbarThemeMac.mm:

(WebCore::ScrollbarThemeMac::isLayoutDirectionRTL):

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::requestScrollPositionUpdate):

4:27 PM Changeset in webkit [262824] by aestes@apple.com
  • 2 edits in trunk/Source/WebCore

Unreviewed change for post-commit feedback after r262682.

  • DerivedSources.make: Replaced tabs with spaces.
4:16 PM Changeset in webkit [262823] by Russell Epstein
  • 1 copy in tags/Safari-610.1.15.50.2

Tag Safari-610.1.15.50.2.

4:11 PM Changeset in webkit [262822] by Diego Pino Garcia
  • 2 edits in trunk/LayoutTests

[GTK] Gardening, update results of flaky timeout failures
https://bugs.webkit.org/show_bug.cgi?id=212993

Unreviewed gardening.

For those flaky timeout failures, update expected results to the actual results obtained in the
last 4000 revisions for each test.

  • platform/gtk/TestExpectations:
4:10 PM Changeset in webkit [262821] by Russell Epstein
  • 8 edits in branches/safari-610.1.15.50-branch/Source

Versioning.

3:36 PM Changeset in webkit [262820] by Alan Coon
  • 1 copy in tags/Safari-610.1.16.3

Tag Safari-610.1.16.3.

3:33 PM Changeset in webkit [262819] by Alan Coon
  • 2 edits in branches/safari-610.1.16-branch/Source/WebCore

Cherry-pick r262687. rdar://problem/64044841

REGRESSION (r262364): Disney Plus crashes playing videos
https://bugs.webkit.org/show_bug.cgi?id=212862
<rdar://problem/64044841>

Reviewed by Eric Carlson.

In r262364, we specified an incorrect number size for CFNumberGetValue, which nevertheless
worked fine in debug builds, but overwrote stack data in release builds, leading to a crash when
the returned pointer was ref()d. The correct size for a FourCharCode is a
kCFNumberSInt32Type, not a kCFNumberLongType.

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

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

3:31 PM Changeset in webkit [262818] by Alan Coon
  • 8 edits in branches/safari-610.1.16-branch/Source

Versioning.

3:26 PM Changeset in webkit [262817] by Russell Epstein
  • 1 copy in tags/Safari-610.1.15.52.1

Tag Safari-610.1.15.52.1.

3:25 PM Changeset in webkit [262816] by Russell Epstein
  • 1 copy in tags/Safari-610.1.15.50.1

Tag Safari-610.1.15.50.1.

3:06 PM Changeset in webkit [262815] by BJ Burg
  • 2 edits in trunk/Source/WebKit

[Cocoa] Element Send Keys can hang when an automation window becomes unfocused
https://bugs.webkit.org/show_bug.cgi?id=212985
<rdar://problem/56354471>

Reviewed by Devin Rousso.

  • UIProcess/Automation/mac/WebAutomationSessionMac.mm:

(WebKit::WebAutomationSession::sendSynthesizedEventsToPage):
Make sure to focus the window and set first responder so sending keys doesn't hang.

3:04 PM Changeset in webkit [262814] by Chris Dumez
  • 2 edits in trunk/Source/WTF

Use bridge cast in String(NSString *) constructor
https://bugs.webkit.org/show_bug.cgi?id=212989

Reviewed by Darin Adler.

Use bridge cast in String(NSString *) constructor instead of a reinterpret_cast as this
is the preferred way of converting a NS Type to a CF one.

  • wtf/text/cocoa/StringCocoa.mm:

(WTF::String::String):

2:47 PM Changeset in webkit [262813] by commit-queue@webkit.org
  • 4 edits in trunk/Source/WebCore

WebKit Crashes when SVG Filter Logging is Turned On
https://bugs.webkit.org/show_bug.cgi?id=212415

Patch by Frank Yang <guowei_yang@apple.com> on 2020-06-09
Reviewed by Darin Adler.

No new tests are required because this is just
fixing a simple pointer access inside logging code

  • html/ImageData.cpp:

(WebCore::operator<<): Overloaded << operator to print the

address of pixel data it stores

  • html/ImageData.h: Declare overloaded << operator
  • platform/graphics/filters/FilterEffect.cpp:

(WebCore::FilterEffect::imageBufferResult): Modified logging code

so that it does a null check by calling ValueOrNull on
m_premultipliedImageResult and m_unmultipliedImageResult

(WebCore::FilterEffect::copyUnmultipliedResult): Modified logging code

so that it does a null check by calling ValueOrNull on
m_premultipliedImageResult and m_unmultipliedImageResult

(WebCore::FilterEffect::copyPremultipliedResult): Modified logging code

so that it does a null check by calling ValueOrNull on
m_premultipliedImageResult and m_unmultipliedImageResult

2:43 PM Changeset in webkit [262812] by Jonathan Bedard
  • 2 edits in trunk/Source/WebKit

WebKit: Import NSURLConnectionSPI.h instead of CFNSURLConnection.h
https://bugs.webkit.org/show_bug.cgi?id=212980
<rdar://problem/64172694>

Unreviewed build fix.

No new tests, behavior unchanged.

  • NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
2:19 PM Changeset in webkit [262811] by dino@apple.com
  • 6 edits in trunk/Source

REGRESSION: [Safari Mojave for High Sierra] Accessing some of the featured pages on apple.com causes the webpage to crash
https://bugs.webkit.org/show_bug.cgi?id=212940
Source/WebCore:

rdar://63839405

Reviewed by Tim Horton.

The code to use the singleton for a SwitchingGPUClient was assuming it
has always been set, which was not the case when
ENABLE(WEBPROCESS_WINDOWSERVER_BLOCKING) was not true.

  • platform/graphics/opengl/GraphicsContextGLOpenGLManager.cpp: Check the state of the

singleton before calling it.
(WebCore::GraphicsContextGLOpenGLManager::updateHighPerformanceState):
(WebCore::GraphicsContextGLOpenGLManager::disableHighPerformanceGPUTimerFired):

  • platform/graphics/mac/SwitchingGPUClient.h: Return a pointer to the singleton which

will allow the code to check for its existence.
(WebCore::SwitchingGPUClient::singletonIfExists):

Source/WebKit:

Reviewed by Tim Horton.

The code to use the singleton for a SwitchingGPUClient was assuming it
has always been set, which was not the case when
ENABLE(WEBPROCESS_WINDOWSERVER_BLOCKING) was not true.

  • WebProcess/cocoa/WebProcessCocoa.mm: Set the singleton unconditionally.

(WebKit::WebProcess::platformInitializeProcess):

2:05 PM Changeset in webkit [262810] by weinig@apple.com
  • 7 edits in trunk/Source/WebCore

Extended Color: Streamline SimpleColor premulitply/unpremultiply code
https://bugs.webkit.org/show_bug.cgi?id=212945

Reviewed by Darin Adler.

Simplify / streamline the premulitply/unpremultiply code by:

  • Removing the overloads that didn't take individual components, keeping only the ones taking a SimpleColor.
  • Replacing the "ceiling" bool in makePremultipliedSimpleColor and converting it into two functions.
  • Simplifying the names from makePremultipliedSimpleColor/makeUnpremultipliedSimpleColor to premultiplyFlooring/premultiplyCeiling/unpremultiply.
  • Where component order is important, use valueAsARGB() explicitly to show what the resulting value's format will be.
  • platform/graphics/Color.cpp:

(WebCore::blend):
Update to call premultiplyCeiling/unpremultiply.

  • platform/graphics/ImageBackingStore.h:

(WebCore::ImageBackingStore::blendPixel):
(WebCore::ImageBackingStore::pixelValue const):
Update to call premultiplyFlooring/unpremultiply and valueAsARGB().

  • platform/graphics/SimpleColor.h:
  • platform/graphics/SimpleColor.cpp:

(WebCore::premultiplyFlooring):
(WebCore::premultiplyCeiling):
(WebCore::unpremultiplyChannel):
(WebCore::unpremultiply):
(WebCore::premultipliedChannel): Deleted.
(WebCore::unpremultipliedChannel): Deleted.
(WebCore::makePremultipliedSimpleColor): Deleted.
(WebCore::makeUnpremultipliedSimpleColor): Deleted.
Simplify premulitply/unpremultiply interfaces. Use structured bindings to make
the code a bit easier to follow as well.

  • platform/graphics/cairo/ImageBufferCairoImageSurfaceBackend.cpp:

(WebCore::ImageBufferCairoImageSurfaceBackend::platformTransformColorSpace):
Update to call premultiplyFlooring/unpremultiply and valueAsARGB().

  • platform/graphics/cairo/NativeImageCairo.cpp:

(WebCore::nativeImageSinglePixelSolidColor):
Update to call premultiplyFlooring/unpremultiply and valueAsARGB(). Also removes
reinterpret cast to SimpleColor, instead following the model in ImageBufferCairoImageSurfaceBackend
and casting to unsigned, and building the SimpleColor from that. This will allow
SimpleColor to change its underlying representation in the future without breaking things.

2:04 PM Changeset in webkit [262809] by commit-queue@webkit.org
  • 18 edits
    50 deletes in trunk

Unreviewed, reverting r261841.
https://bugs.webkit.org/show_bug.cgi?id=212991

Caused spotify pages to scroll to the top
(<http://webkit.org/b/212983|webkit.org/b/212983>)

Reverted changeset:

"[css-grid] Clear the override width for computing percent
margins"
https://bugs.webkit.org/show_bug.cgi?id=209461
https://trac.webkit.org/changeset/261841

1:59 PM Changeset in webkit [262808] by Jonathan Bedard
  • 3 edits in trunk/Source/JavaScriptCore

JavaScriptCore: Support tvOS and watchOS builds with the public SDK
https://bugs.webkit.org/show_bug.cgi?id=212788
<rdar://problem/64000087>

Reviewed by Tim Horton.

  • Configurations/Base.xcconfig: Link to tvOS and watchOS framework stubs.
  • Configurations/JavaScriptCore.xcconfig: Use iOS flags for all embedded platforms.
1:52 PM Changeset in webkit [262807] by zhifei_fang@apple.com
  • 2 edits in trunk/Tools

Add a timeout monitor for JSC stress test
https://bugs.webkit.org/show_bug.cgi?id=211978

Reviewed by Jonathan Bedard.

  • Scripts/webkitruby/jsc-stress-test-writer-default.rb: Add timeout monitor inside the jsc stress test runner, it will kill the process in case of jsc timeout handler not working
1:44 PM Changeset in webkit [262806] by Devin Rousso
  • 20 edits in trunk

Web Inspector: allow multiple resources for a given URL
https://bugs.webkit.org/show_bug.cgi?id=212852

Reviewed by Brian Burg.

Source/WebInspectorUI:

Previously, when a new resource is added with a URL that matches an existing resource, any
resourceForURL call with that URL will return the new resource instead of the old one. Now
that there is a Multimap of URL to resource, it is possible to pick which resource is used
instead of always using the newest one.

  • UserInterface/Models/ResourceCollection.js:

(WI.ResourceCollection):
(WI.ResourceCollection.prototype.resourcesForURL): Added.
(WI.ResourceCollection.prototype._associateWithResource):
(WI.ResourceCollection.prototype._disassociateWithResource):
(WI.ResourceCollection.prototype._resourceURLDidChange):
(WI.ResourceCollection.prototype.resourceForURL): Deleted.

  • UserInterface/Models/Frame.js:

(WI.Frame.prototype.resourcesForURL): Added.
(WI.Frame.prototype.resourceForURL): Deleted.

  • UserInterface/Controllers/NetworkManager.js:

(WI.NetworkManager.prototype.resourcesForURL): Added.
(WI.NetworkManager.prototype.resourceRequestDidReceiveResponse):
(WI.NetworkManager.prototype._initiatorSourceCodeLocationFromPayload):
(WI.NetworkManager.prototype.resourceForURL): Deleted.

  • UserInterface/Models/Script.js:

(WI.Script.prototype._resolveResource):
(WI.Script.prototype._resolveResource.isScriptResource): Added.

  • UserInterface/Controllers/CSSManager.js:

(WI.CSSManager.prototype._updateResourceContent.fetchedStyleSheetContent):

  • UserInterface/Base/Utilities.js:

(Set.prototype.find): Added.
Add utility for finding an item in a Set to avoid having to Array.from.

  • UserInterface/Base/Main.js:

(WI.openURL):
(WI.sourceCodeForURL):

  • UserInterface/Controllers/TimelineManager.js:

(WI.TimelineManager.prototype._processRecord):

  • UserInterface/Models/CallFrame.js:

(WI.CallFrame.fromPayload):

  • UserInterface/Models/ConsoleMessage.js:

(WI.ConsoleMessage.prototype.get sourceCodeLocation):

  • UserInterface/Models/DOMNodeStyles.js:

(WI.DOMNodeStyles.prototype.createSourceCodeLocation):

  • UserInterface/Models/ScriptTimelineRecord.js:

(WI.ScriptTimelineRecord.prototype._initializeProfileFromPayload.profileNodeFromPayload):

  • UserInterface/Views/ContextMenuUtilities.js:

(WI.appendContextMenuItemsForURL):

  • UserInterface/Views/DOMDetailsSidebarPanel.js:

(WI.DOMDetailsSidebarPanel.prototype._mouseWasClicked):

  • UserInterface/Views/SearchSidebarPanel.js:

(WI.SearchSidebarPanel.prototype.performSearch):
Use the firstValue instead of the implicit lastValue to match existing nearby usage of
WI.DebuggerManager.prototype.scriptsForURL, which explicitly chooses the first script.

LayoutTests:

  • inspector/unit-tests/set-utilities.html:
  • inspector/unit-tests/set-utilities-expected.txt:

Add test for Set.prototype.find.

  • http/tests/websocket/tests/hybi/inspector/resolveWebSocket.html:

Update usage of resourceForURL to resourcesForURL with Set.prototype.firstValue.

12:57 PM Changeset in webkit [262805] by pvollan@apple.com
  • 2 edits in trunk/Source/WTF

All platforms should enable CFPrefs read only mode in the WebContent process
https://bugs.webkit.org/show_bug.cgi?id=212910

Reviewed by Tim Horton.

In https://bugs.webkit.org/show_bug.cgi?id=212411, CFPrefs read only mode was adopted, but not all platforms were included.

  • wtf/PlatformHave.h:
12:53 PM Changeset in webkit [262804] by Fujii Hironori
  • 2 edits in trunk/Source/WebCore

[Win] ComplexTextControllerUniscribe: Retry ScriptShape with SCRIPT_UNDEFINED if it failed as USP_E_SCRIPT_NOT_IN_FONT
https://bugs.webkit.org/show_bug.cgi?id=212947

Reviewed by Don Olmstead.

If the given font doesn't support the givin text, ScriptShape API
fails as USP_E_SCRIPT_NOT_IN_FONT. In the case, the complex run
was simply ignored and nothing was drawn for the text.

According to Uniscribe document, We should retry ScriptShape with
SCRIPT_UNDEFINED to get missing glyphs.
<https://docs.microsoft.com/en-us/windows/win32/intl/displaying-text-with-uniscribe>

  • platform/graphics/win/ComplexTextControllerUniscribe.cpp:

(WebCore::shapeByUniscribe):

12:39 PM Changeset in webkit [262803] by Fujii Hironori
  • 2 edits in trunk/Source/WebCore

ComplexTextController: Use std::sort to calculate m_runIndices
https://bugs.webkit.org/show_bug.cgi?id=212944

Reviewed by Myles C. Maxfield.

ComplexTextController was using O(n²) sort to lazily calculate
m_runIndices. And, exact matching stringBegin and stringEnd can
cause infinite loop (Bug 212670 and Bug 108877).

Use std::sort instead.

  • platform/graphics/ComplexTextController.cpp:

(WebCore::ComplexTextController::finishConstruction):
(WebCore::ComplexTextController::indexOfCurrentRun):

12:08 PM Changeset in webkit [262802] by Wenson Hsieh
  • 5 edits in trunk/Source

REGRESSION (r260820): [macCatalyst] Web process crashes when uploading a file
https://bugs.webkit.org/show_bug.cgi?id=212976
<rdar://problem/64033186>

Reviewed by Tim Horton.

Source/WebKit:

On Mac Catalyst, we attempt to take a sandbox extension for com.apple.frontboard.systemappservices when
uploading a file; this service does not exist in Catalyst, and we consequently encounter a release assertion
under WebPage::didChooseFilesForOpenPanelWithDisplayStringAndIcon.

Fix this by introducing HAVE(FRONTBOARD_SYSTEM_APP_SERVICES), and using it to guard codepaths that attempt to
grab a mach extension to this service. (As a followup, we should consider adopting this in other places that
currently reference com.apple.frontboard.systemappservices).

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::didChooseFilesForOpenPanelWithDisplayStringAndIcon):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::didChooseFilesForOpenPanelWithDisplayStringAndIcon):

Source/WTF:

Add HAVE(FRONTBOARD_SYSTEM_APP_SERVICES).

  • wtf/PlatformHave.h:
11:53 AM Changeset in webkit [262801] by Jonathan Bedard
  • 7 edits in trunk/Source/WebKit

WebKit: Support watchOS and tvOS in xcconfigs
https://bugs.webkit.org/show_bug.cgi?id=212977
<rdar://problem/64170532>

Reviewed by Tim Horton.

No new tests, behavior unchanged.

  • Configurations/Base.xcconfig: Add tvOS and watchOS major version macros.
  • Configurations/BaseTarget.xcconfig: Include tvOS and watchOS framework stubs.
  • Configurations/BaseXPCService.xcconfig: Generalize excluded files for all embedded platforms.
  • Configurations/GPUService.xcconfig: Generalize INFOPLIST for embedded platforms.
  • Configurations/NetworkService.xcconfig: Ditto.
  • Configurations/WebContentService.xcconfig: Ditto.
11:46 AM Changeset in webkit [262800] by timothy_horton@apple.com
  • 5 edits in trunk/Tools

WebKit.ShrinkToFit is failing on some bots
https://bugs.webkit.org/show_bug.cgi?id=212932
<rdar://problem/60972407>

Reviewed by Simon Fraser.

TestWebKitAPI was failing to stabilize the overlay scrollbar preference,
because the only stabilization attempt was in the injected bundle
initialization code, and most tests (including ShrinkToFit) do not have
an injected bundle.

Because this preference is manually propagated to the Web Content process,
we can set the default in the volatile domain in the UI process at startup.

We can't move other preferences yet, because they are not manually propagated,
and WebKit's NSUserDefault synchronization mechanism ignores defaults in the
volatile domain (and the initial preference load reads from disk, not
from the UI process, so it wouldn't find them anyway).

  • TestWebKitAPI/Tests/WebKitCocoa/ShrinkToFit.mm:

(TEST):
Explain why the final value of the test is different than the starting value.

  • TestWebKitAPI/mac/InjectedBundleControllerMac.mm:

(TestWebKitAPI::InjectedBundleController::platformInitialize):
Leave a FIXME for future generations.

  • TestWebKitAPI/mac/mainMac.mm:

(main):
Override overlay scrollbar preferences in the UI process, so it affects all tests.

  • TestWebKitAPI/Tests/WebKit/ResizeReversePaginatedWebView.cpp:

This test is also affected by using non-overlay scrollbars; we now have less space, so take up more pages.

11:38 AM Changeset in webkit [262799] by commit-queue@webkit.org
  • 6 edits in trunk/Source/WebKit

Expose PDF file URL in shouldAllowPDFToOpenFromFrame SPI
https://bugs.webkit.org/show_bug.cgi?id=212974

Patch by Alex Christensen <achristensen@webkit.org> on 2020-06-09
Reviewed by Tim Horton.

  • UIProcess/API/APIUIClient.h:

(API::UIClient::confirmPDFOpening):

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

(WebKit::UIDelegate::setDelegate):
(WebKit::UIDelegate::UIClient::confirmPDFOpening):

  • UIProcess/mac/WebPageProxyMac.mm:

(WebKit::WebPageProxy::savePDFToTemporaryFolderAndOpenWithNativeApplication):
(WebKit::WebPageProxy::openPDFFromTemporaryFolderWithNativeApplication):

11:16 AM Changeset in webkit [262798] by youenn@apple.com
  • 14 edits in trunk

BaseAudioSharedUnit should unmute its clients in case of suspension even if not having any audio unit
https://bugs.webkit.org/show_bug.cgi?id=212970

Reviewed by Eric Carlson.

Source/WebCore:

CoreAudioCaptureSource(s), when muted, are now calling stopProducingData.
This will, in turn, make the BaseAudioSharedUnit stop and no longer have any audio unit.
In that case, when resume is called on the BaseAudioSharedUnit, it will exit early as the audio unit is null.
This will prevent to unmute the CoreAudioCaptureSource(s).

Fix this by removing the audio unit check in BaseAudioSharedUnit::resume.
Add infrastructure testing to be able to write a test.

Covered by added test.

  • platform/mediastream/RealtimeMediaSource.h:
  • platform/mediastream/mac/BaseAudioSharedUnit.cpp:

(WebCore::BaseAudioSharedUnit::resume):

  • platform/mediastream/mac/CoreAudioCaptureSource.cpp:

(WebCore::CoreAudioCaptureSource::setInterruptedForTesting):

  • platform/mediastream/mac/CoreAudioCaptureSource.h:
  • testing/Internals.cpp:

(WebCore::Internals::isMediaStreamSourceInterrupted const):

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

Tools:

Add an option to capture in UI process so that the same test can run on both MacOS and iOS.
This eases the testing infra to be able to get audio capture unit state in WebProcess as is the case in iOS.

  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::resetPreferencesToConsistentValues):
(WTR::updateTestOptionsFromTestHeader):

  • WebKitTestRunner/TestOptions.h:

(WTR::TestOptions::hasSameInitializationOptions const):

LayoutTests:

  • fast/mediastream/media-stream-track-interrupted-expected.txt:
  • fast/mediastream/media-stream-track-interrupted.html:
11:15 AM Changeset in webkit [262797] by Diego Pino Garcia
  • 2 edits in trunk/LayoutTests

[GTK] Gardening, remove flaky timeout failures after r262789
https://bugs.webkit.org/show_bug.cgi?id=212979

Unreviewed gardening.

Removed flaky timeout failures that have been constantly passing in the last 4000 revisions.

  • platform/gtk/TestExpectations:
10:15 AM Changeset in webkit [262796] by mmaxfield@apple.com
  • 26 edits
    2 adds in trunk

lang=zh needs to defer to system preferences to know whether it should be simplified or traditional
https://bugs.webkit.org/show_bug.cgi?id=212626
<rdar://problem/60227623>

Reviewed by Darin Adler.

Source/WebCore:

If the content says lang="zh" font-family: sans-serif, we have no signal for whether
the content should be traditional or simplified. In this case, we should pick based
on system preferences to make it more likely that we get the right answer.

This is actually what some Cocoa platform text functions were doing, but not all of them.
We need to do it at our level in WebKit to make sure that all our calls to the platform
have consistent behavior. Also, we can cache the result at our level, which is more
performant than if the platform cached it at each platform entry point.

We already started consulting with system preferences to make this decision in r189038.
This patch extends that and fixes it to throughout WebKit.

This doesn't expose any new fingerprinting data, because this information was already
exposed (e.g. by drawing fallback fonts to the canvas and then reading back the pixels).

Tests: fast/text/locale-getComputedStyle.html

fast/text/international/generic-font-family-language-traditional.html

  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::ComputedStyleExtractor::valueForPropertyInStyle):

  • css/CSSFontSelector.cpp:

(WebCore::resolveGenericFamily):

  • css/CSSProperties.json:
  • layout/inlineformatting/InlineLineBreaker.cpp:

(WebCore::Layout::LineBreaker::wordBreakBehavior const):
(WebCore::Layout::LineBreaker::tryBreakingTextRun const):

  • platform/graphics/Font.cpp:

(WebCore::Font::systemFallbackFontForCharacter const):

  • platform/graphics/FontCache.h:

(WebCore::FontDescriptionKey::FontDescriptionKey):

  • platform/graphics/FontCascade.cpp:

(WebCore::FontCascade::widthForSimpleText const):

  • platform/graphics/FontCascadeDescription.cpp:
  • platform/graphics/FontCascadeDescription.h:

(WebCore::FontCascadeDescription::initialSpecifiedLocale):
(WebCore::FontCascadeDescription::initialLocale): Deleted.

  • platform/graphics/FontDescription.cpp:

(WebCore::computeSpecializedChineseLocale):
(WebCore::cachedSpecializedChineseLocale):
(WebCore::fontDescriptionLanguageChanged):
(WebCore::specializedChineseLocale):
(WebCore::FontDescription::setSpecifiedLocale):
(WebCore::FontDescription::setLocale): Deleted.

  • platform/graphics/FontDescription.h:

(WebCore::FontDescription::computedLocale const):
(WebCore::FontDescription::specifiedLocale const):
(WebCore::FontDescription::operator== const):
(WebCore::FontDescription::encode const):
(WebCore::FontDescription::decode):
(WebCore::FontDescription::locale const): Deleted.

  • platform/graphics/WidthIterator.cpp:

(WebCore::WidthIterator::applyFontTransforms):

  • platform/graphics/cocoa/FontCacheCoreText.cpp:

(WebCore::FontCache::systemFallbackForCharacters):

  • platform/graphics/cocoa/FontDescriptionCocoa.cpp:

(WebCore::FontDescription::platformResolveGenericFamily):
(WebCore::computeSpecializedChineseLocale): Deleted.
(WebCore::cachedSpecializedChineseLocale): Deleted.
(WebCore::languageChanged): Deleted.

  • platform/graphics/cocoa/SystemFontDatabaseCoreText.cpp:

(WebCore::SystemFontDatabaseCoreText::systemFontParameters):

  • platform/graphics/mac/ComplexTextControllerCoreText.mm:

(WebCore::ComplexTextController::collectComplexTextRunsForCharacters):

  • rendering/RenderQuote.cpp:

(WebCore::RenderQuote::computeText const):

  • rendering/RenderText.cpp:

(WebCore::maxWordFragmentWidth):
(WebCore::RenderText::computePreferredLogicalWidths):
(WebCore::applyTextTransform):

  • rendering/RenderThemeCocoa.mm:

(WebCore::RenderThemeCocoa::paintApplePayButton):

  • rendering/SimpleLineLayoutTextFragmentIterator.cpp:

(WebCore::SimpleLineLayout::TextFragmentIterator::Style::Style):
(WebCore::SimpleLineLayout::TextFragmentIterator::TextFragmentIterator):

  • rendering/line/BreakingContext.h:

(WebCore::BreakingContext::handleText):

  • rendering/style/RenderStyle.h:

(WebCore::RenderStyle::computedLocale const):
(WebCore::RenderStyle::specifiedLocale const):
(WebCore::RenderStyle::locale const): Deleted.

  • style/StyleBuilderCustom.h:

(WebCore::Style::BuilderCustom::applyValueWebkitLocale):

  • style/StyleResolveForDocument.cpp:

(WebCore::Style::resolveForDocument):

LayoutTests:

Make sure the new locale isn't exposed.

  • fast/text/locale-getComputedStyle-expected.txt: Added.
  • fast/text/locale-getComputedStyle.html: Added.
8:59 AM Changeset in webkit [262795] by Alan Bujtas
  • 5 edits
    2 adds in trunk

[LFC][TFC] Add support for empty table
https://bugs.webkit.org/show_bug.cgi?id=212971

Reviewed by Antti Koivisto.

Source/WebCore:

No need to run formatting context layout when the table box has no descendant.

Test: fast/layoutformattingcontext/empty-table-box.html

  • layout/blockformatting/tablewrapper/TableWrapperBlockFormattingContext.cpp:

(WebCore::Layout::TableWrapperBlockFormattingContext::layoutTableBox):
(WebCore::Layout::TableWrapperBlockFormattingContext::computeBorderAndPaddingForTableBox):
(WebCore::Layout::TableWrapperBlockFormattingContext::computeWidthAndMarginForTableBox):

  • layout/tableformatting/TableFormattingContext.cpp:

(WebCore::Layout::TableFormattingContext::ensureTableGrid):

  • layout/tableformatting/TableGrid.h:

(WebCore::Layout::TableGrid::isEmpty const):

LayoutTests:

  • fast/layoutformattingcontext/empty-table-box-expected.html: Added.
  • fast/layoutformattingcontext/empty-table-box.html: Added.
8:45 AM Changeset in webkit [262794] by youenn@apple.com
  • 3 edits in trunk/Source/WebCore

Forward declare MediaKeys/MediaKeySession in Internals.h
https://bugs.webkit.org/show_bug.cgi?id=212965

Reviewed by Xabier Rodriguez-Calvar.

No change of behavior.

  • testing/Internals.cpp:
  • testing/Internals.h:
8:35 AM Changeset in webkit [262793] by youenn@apple.com
  • 10 edits in trunk

Fix two MediaStream tests
https://bugs.webkit.org/show_bug.cgi?id=208926
<rdar://problem/60329008>

Reviewed by Eric Carlson.

Source/WebCore:

Previously, the mock capture sample rate was the one of the mock audio shared unit, which is the sample rate of the audio session by default.
This sample rate may change according the bots.
For that reason, explicitly set the mock shared unit sample rate to the default sample rate of the device, just before creating the source.
MediaConstraints may still apply after this step.

Fix an issue where we would use the real core audio unit in CoreAudioCaptureSource constructor.
We now pass the unit override if any in constructor.

Covered by unflaked tests.

  • platform/mediastream/mac/BaseAudioSharedUnit.cpp:

(WebCore::BaseAudioSharedUnit::BaseAudioSharedUnit):

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

(WebCore::initializeCoreAudioCaptureSource):
(WebCore::CoreAudioSharedUnit::CoreAudioSharedUnit):
(WebCore::CoreAudioCaptureSource::create):
(WebCore::CoreAudioCaptureSource::createForTesting):
(WebCore::CoreAudioCaptureSource::CoreAudioCaptureSource):

  • platform/mediastream/mac/CoreAudioCaptureSource.h:
  • platform/mediastream/mac/MockAudioSharedUnit.mm:

(WebCore::MockRealtimeAudioSource::create):
(WebCore::MockAudioSharedUnit::MockAudioSharedUnit):
Do not disable echo cancellation to mimick what the real unit is doing.

LayoutTests:

  • fast/mediastream/MediaStreamTrack-getSettings-expected.txt:
  • fast/mediastream/MediaStreamTrack-getSettings.html:
  • platform/mac-wk2/TestExpectations:

Unskip tests.

8:17 AM Changeset in webkit [262792] by Alan Bujtas
  • 6 edits
    2 adds in trunk

[LFC][Table][Floats] Multi-pass table layout needs clean floating state
https://bugs.webkit.org/show_bug.cgi?id=212889

Reviewed by Antti Koivisto.

Source/WebCore:

When laying out the cell content multiple times to accommodate flex table layout,
the float state needs be cleared to avoid having redundant float content.

Test: fast/layoutformattingcontext/float-inside-table-cell-simple.html

  • layout/floats/FloatingState.cpp:

(WebCore::Layout::FloatingState::append):

  • layout/floats/FloatingState.h:

(WebCore::Layout::FloatingState::FloatItem::floatBox const):

  • layout/layouttree/LayoutTreeBuilder.cpp:

(WebCore::Layout::TreeBuilder::createLayoutBox):

  • layout/tableformatting/TableFormattingContext.cpp:

(WebCore::Layout::TableFormattingContext::layoutCell):

LayoutTests:

  • fast/layoutformattingcontext/float-inside-table-cell-simple-expected.html: Added.
  • fast/layoutformattingcontext/float-inside-table-cell-simple.html: Added.
7:50 AM Changeset in webkit [262791] by commit-queue@webkit.org
  • 17 edits in trunk

[Curl] Implement functions to use ResourceLoadStatistics.
https://bugs.webkit.org/show_bug.cgi?id=207692

Source/WebCore:

Patch by Takashi Komori <Takashi.Komori@sony.com> on 2020-06-09
Reviewed by Don Olmstead.

Implement functions which are required to implement ResourceLoadStatistics for Curl port.

Tests: http/tests/resourceLoadStatistics/

  • CMakeLists.txt:
  • platform/network/curl/CookieJarDB.cpp:

(WebCore::CookieJarDB::openDatabase):
(WebCore::CookieJarDB::setCookie):
(WebCore::CookieJarDB::allDomains):
(WebCore::CookieJarDB::deleteCookiesForHostname):

  • platform/network/curl/CookieJarDB.h:
  • platform/network/curl/NetworkStorageSessionCurl.cpp:

(WebCore::NetworkStorageSession::setCookiesFromDOM const):
(WebCore::NetworkStorageSession::setCookies):
(WebCore::NetworkStorageSession::deleteCookiesForHostnames):
(WebCore::NetworkStorageSession::getHostnamesWithCookies):

Source/WebKit:

Patch by Takashi Komori <Takashi.Komori@sony.com> on 2020-06-09
Reviewed by Don Olmstead.

Implement functions which are required to implement ResourceLoadStatistics for Curl port.

In NetworkDataTaskCurl.cpp we check if we should block cookies and block if needed.

Tests: http/tests/resourceLoadStatistics/

  • NetworkProcess/NetworkDataTask.cpp:

(WebKit::NetworkDataTask::create):

  • NetworkProcess/curl/NetworkDataTaskCurl.cpp:

(WebKit::NetworkDataTaskCurl::NetworkDataTaskCurl):
(WebKit::NetworkDataTaskCurl::createCurlRequest):
(WebKit::NetworkDataTaskCurl::willPerformHTTPRedirection):
(WebKit::NetworkDataTaskCurl::blockCookies):
(WebKit::NetworkDataTaskCurl::unblockCookies):
(WebKit::NetworkDataTaskCurl::shouldBlockCookies):
(WebKit::NetworkDataTaskCurl::isThirdPartyRequest):

  • NetworkProcess/curl/NetworkDataTaskCurl.h:
  • NetworkProcess/curl/NetworkSessionCurl.cpp:

(WebKit::NetworkSessionCurl::NetworkSessionCurl):

  • UIProcess/API/C/WKWebsiteDataStoreRef.cpp:

(WKWebsiteDataStoreGetAllStorageAccessEntries):

  • UIProcess/API/C/WKWebsiteDataStoreRef.h:
  • UIProcess/WebsiteData/WebsiteDataStore.cpp:

(WebKit::WebsiteDataStore::parameters):

Tools:

Implement functions which are required to implement ResourceLoadStatistics for Curl port.

Tests: http/tests/resourceLoadStatistics/

Patch by Takashi Komori <Takashi.Komori@sony.com> on 2020-06-09
Reviewed by Don Olmstead.

  • WebKitTestRunner/TestController.cpp:

(WTR::GetAllStorageAccessEntriesCallbackContext::GetAllStorageAccessEntriesCallbackContext):
(WTR::getAllStorageAccessEntriesCallback):
(WTR::TestController::getAllStorageAccessEntries):

LayoutTests:

Patch by Takashi Komori <Takashi.Komori@sony.com> on 2020-06-09
Reviewed by Don Olmstead.

Implement functions which are required to implement ResourceLoadStatistics for Curl port.

Tests: http/tests/resourceLoadStatistics/

  • platform/wincairo/TestExpectations:
7:13 AM Changeset in webkit [262790] by weinig@apple.com
  • 5 edits in trunk/Source/WebCore

Extended Color: Switch ColorMac.mm's nsColor() function over to using TinyLRUCache
https://bugs.webkit.org/show_bug.cgi?id=212918

Reviewed by Darin Adler.

  • platform/graphics/Color.h:

(WebCore::Color::isExtended const):
Make asSimple() public, so nsColor() can use it. This also allows us to unfriend cachedCGColor().

  • platform/graphics/mac/ColorMac.mm:

(WTF::RetainPtr<NSColor>>::createValueForKey):
(WebCore::nsColor):
Mimic the structure of cachedCGColor() by switching over simpleColor values for common
colors and using a 32 value TinyLRUCache for the rest.

5:57 AM Changeset in webkit [262789] by Antti Koivisto
  • 3 edits in trunk/LayoutTests

scrollingcoordinator/ios/scroll-position-after-reattach.html is a flaky image failure
https://bugs.webkit.org/show_bug.cgi?id=212967
<rdar://problem/52961406>

Reviewed by Antoine Quint.

  • platform/ios-wk2/TestExpectations:
  • scrollingcoordinator/ios/scroll-position-after-reattach.html:

Ensure the element is re-added before test finishes.

5:11 AM Changeset in webkit [262788] by jfernandez@igalia.com
  • 5 edits
    12 adds in trunk/LayoutTests

[css-grid] Import some grid tests from WPT
https://bugs.webkit.org/show_bug.cgi?id=212920

Reviewed by Manuel Rego Casasnovas.

LayoutTests/imported/w3c:

Imported some grid related tests from WPT to check how baseline
alignment affects the grid's intrinsic size computation.

  • resources/import-expectations.json:
  • web-platform-tests/css/css-grid/layout-algorithm/baseline-alignment-affects-intrinsic-size-001-expected.txt: Added.
  • web-platform-tests/css/css-grid/layout-algorithm/baseline-alignment-affects-intrinsic-size-001.html: Added.
  • web-platform-tests/css/css-grid/layout-algorithm/baseline-alignment-affects-intrinsic-size-002-expected.txt: Added.
  • web-platform-tests/css/css-grid/layout-algorithm/baseline-alignment-affects-intrinsic-size-002.html: Added.
  • web-platform-tests/css/css-grid/layout-algorithm/baseline-alignment-affects-intrinsic-size-003-expected.txt: Added.
  • web-platform-tests/css/css-grid/layout-algorithm/baseline-alignment-affects-intrinsic-size-003.html: Added.
  • web-platform-tests/css/css-grid/layout-algorithm/baseline-alignment-affects-intrinsic-size-004-expected.txt: Added.
  • web-platform-tests/css/css-grid/layout-algorithm/baseline-alignment-affects-intrinsic-size-004.html: Added.
  • web-platform-tests/css/css-grid/layout-algorithm/baseline-alignment-affects-intrinsic-size-005-expected.txt: Added.
  • web-platform-tests/css/css-grid/layout-algorithm/baseline-alignment-affects-intrinsic-size-005.html: Added.
  • web-platform-tests/css/css-grid/layout-algorithm/baseline-alignment-affects-intrinsic-size-006-expected.txt: Added.
  • web-platform-tests/css/css-grid/layout-algorithm/baseline-alignment-affects-intrinsic-size-006.html: Added.
  • web-platform-tests/css/css-grid/layout-algorithm/w3c-import.log:

LayoutTests:

The imported tests fail only for WebKitGtk+ platform.

  • platform/gtk/TestExpectations: Added Failure entries,
4:54 AM Changeset in webkit [262787] by Diego Pino Garcia
  • 4 edits in trunk/LayoutTests

[GLIB] Gardening, clean up failures filed under bug 186638
https://bugs.webkit.org/show_bug.cgi?id=212968

Unreviewed gardening.

Most of the the failures were flaky but many tests have been
consistently passing, so they were removed from expectations. Adjust
other failure entries to their corresponding state inferred from the
latest test bot results.

  • platform/glib/TestExpectations:
  • platform/gtk/TestExpectations:
  • platform/wpe/TestExpectations:
2:20 AM Changeset in webkit [262786] by ysuzuki@apple.com
  • 9 edits in trunk/Source/JavaScriptCore

[JSC] Shrink DATA,(data,bss,common) more
https://bugs.webkit.org/show_bug.cgi?id=212863

Reviewed by Sam Weinig.

  1. Use unsigned instead of size_t in GC size-class array. We know that this number never exceeds largeCutoff, which must be much maller than UINT32_MAX.
  2. Add missing const to various variables to put them DATA,const instead of DATA,data etc.
  • heap/MarkedSpace.cpp:

(JSC::MarkedSpace::initializeSizeClassForStepSize):

  • heap/MarkedSpace.h:
  • heap/VisitRaceKey.cpp:
  • heap/VisitRaceKey.h:
  • inspector/agents/InspectorDebuggerAgent.cpp:
  • inspector/agents/InspectorDebuggerAgent.h:
  • runtime/PropertyDescriptor.cpp:
  • runtime/PropertyDescriptor.h:
2:13 AM Changeset in webkit [262785] by Diego Pino Garcia
  • 4 edits in trunk/LayoutTests

[WPE] Gardening, update test expectations after r262775
https://bugs.webkit.org/show_bug.cgi?id=212966

Unreviewed gardening.

Gardened several WPT flaky failures that were already gardening in
GTK. Moved common failures to GLIB.

  • platform/glib/TestExpectations:
  • platform/gtk/TestExpectations:
  • platform/wpe/TestExpectations:
1:51 AM Changeset in webkit [262784] by Diego Pino Garcia
  • 3 edits
    1 copy
    3 adds in trunk/LayoutTests

[GTK][WPE] Gardening, update baselines for mediaElementAudioSourceToScriptProcessorTest.html
https://bugs.webkit.org/show_bug.cgi?id=184777

Unreviewed gardening.

The expected result for GTK and WPE is the same as the general baseline, it only changes an expected value.
ios-wk2 also has its own baseline for the same reason.

  • platform/gtk/TestExpectations:
  • platform/gtk/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-mediaelementaudiosourcenode-interface/mediaElementAudioSourceToScriptProcessorTest-expected.txt: Added.
  • platform/wpe/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-mediaelementaudiosourcenode-interface/mediaElementAudioSourceToScriptProcessorTest-expected.txt:
1:50 AM Changeset in webkit [262783] by dino@apple.com
  • 5 edits in branches/safari-609-branch/Source

REGRESSION: [Safari Mojave for High Sierra] Accessing some of the featured pages on apple.com causes the webpage to crash
https://bugs.webkit.org/show_bug.cgi?id=212940

Reviewed by Tim Horton.

The code to use the singleton for a SwitchingGPUClient was assuming it
has always been set, which was not the case when
ENABLE(WEBPROCESS_WINDOWSERVER_BLOCKING) was not true.

Source/WebCore:

  • platform/graphics/GraphicsContext3DManager.cpp: Check the state of the

singleton before calling it.
(WebCore::GraphicsContext3DManager::updateHighPerformanceState):
(WebCore::GraphicsContext3DManager::disableHighPerformanceGPUTimerFired):

  • platform/graphics/mac/SwitchingGPUClient.h: Add a method to check if the

singleton has been set.
(WebCore::SwitchingGPUClient::hasSingleton):

Source/WebKit:

  • WebProcess/cocoa/WebProcessCocoa.mm: Set the singleton unconditionally.

(WebKit::WebProcess::platformInitializeProcess):

1:33 AM Changeset in webkit [262782] by commit-queue@webkit.org
  • 2 edits in trunk/Tools

[Flatpak][GStreamer] enhance GST_ environment variable passing
https://bugs.webkit.org/show_bug.cgi?id=212905

Patch by Víctor Manuel Jáquez Leal <vjaquez@igalia.com> on 2020-06-09
Reviewed by Philippe Normand.

Handle the passing of several GST environment variables,
particularly GST_DEBUG, which, when using * symbol, python adds
quotes, but they break the parsing in GStreamer.

Also the variables are handled by gst-env.py when using
GST_BUILD_PATH, so they are filtered out when it's exported,
avoiding duplication. But it GST_BUILD_PATH is not defined, the
variables are passed to flatpak.

  • flatpak/flatpakutils.py:

(WebkitFlatpak.setup_gstbuild):
(WebkitFlatpak.run_in_sandbox):

1:23 AM Changeset in webkit [262781] by calvaris@igalia.com
  • 13 edits
    2 adds in trunk

[EME] CDMProxyInstance should not keep CDMInstanceSessions hard referenced
https://bugs.webkit.org/show_bug.cgi?id=212689

Reviewed by Youenn Fablet.

Source/WebCore:

Sessions are now tracked as WeakPtr inside the CDMInstanceProxy
instead of RefPtr because this creates referencing issues as the
internal objects should be released when the backing JS object is
garbage collected.

Test: media/encrypted-media/clearKey/clearKey-session-life-cycle.html

  • Modules/encryptedmedia/MediaKeySession.h:
  • Modules/encryptedmedia/MediaKeySession.idl:
  • Modules/encryptedmedia/MediaKeys.h:
  • Modules/encryptedmedia/MediaKeys.idl:
  • platform/encryptedmedia/CDMProxy.cpp:

(WebCore::CDMInstanceProxy::trackSession):

  • platform/encryptedmedia/CDMProxy.h:

(WebCore::CDMInstanceProxy::trackSession):

  • platform/encryptedmedia/clearkey/CDMClearKey.cpp:

(WebCore::CDMInstanceClearKey::createSession):

  • platform/encryptedmedia/clearkey/CDMClearKey.h:
  • testing/Internals.cpp:

(WebCore::Internals::mediaKeysInternalInstanceObjectRefCount const):
(WebCore::Internals::mediaKeySessionInternalInstanceSessionObjectRefCount const):

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

LayoutTests:

  • media/encrypted-media/clearKey/clearKey-session-life-cycle-expected.txt: Added.
  • media/encrypted-media/clearKey/clearKey-session-life-cycle.html: Added.
12:11 AM Changeset in webkit [262780] by sihui_liu@apple.com
  • 4 edits in trunk

TextManipulationController range of paragraph may be wrong after r262601
https://bugs.webkit.org/show_bug.cgi?id=212874

Reviewed by Wenson Hsieh.

Source/WebCore:

Start and end position of item are not properly set in r262601.

Test: TextManipulation.CompleteTextManipulationSuccedsWhenContentOutOfParagraphIsAdded

  • editing/TextManipulationController.cpp:

(WebCore::TextManipulationController::addItemIfPossible):

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/TextManipulation.mm:

(TestWebKitAPI::TEST):

12:06 AM Changeset in webkit [262779] by Lauro Moura
  • 2 edits in trunk/Source/WebKit

[WebDriver][WPE] Follow up WPE fix after r262703
https://bugs.webkit.org/show_bug.cgi?id=212948

Reviewed by Carlos Garcia Campos.

Covered by existing tests.

  • UIProcess/Automation/wpe/WebAutomationSessionWPE.cpp:

(WebKit::WebAutomationSession::platformWebModifiersFromRaw):

Jun 8, 2020:

11:54 PM Changeset in webkit [262778] by sihui_liu@apple.com
  • 5 edits in trunk

TextManipulation should only convert text from Node's text content to tokens
https://bugs.webkit.org/show_bug.cgi?id=212928

Reviewed by Wenson Hsieh.

Source/WebCore:

TextIterator may emit text like line breaks between nodes. This kind of text is generated based on the range of
TextIterator and style of node. We need this text for splitting tokens or splitting paragraphs, but we should
not convert it to normal tokens. This is because tokens should be created from content of node and text
manipulation fails if content does not match. The change of this kind of text does not indicate change in
content and we may still be able to finish text manipulation.

Test: TextManipulation.CompleteTextManipulationReplaceTwoSimpleParagraphs

  • editing/TextManipulationController.cpp:

(WebCore::isInPrivateUseArea):
(WebCore::isTokenDelimiter):
(WebCore::ParagraphContentIterator::currentContent):
(WebCore::ParagraphContentIterator::appendToText):
(WebCore::ParagraphContentIterator::advanceIteratorNodeAndUpdateText):
(WebCore::TextManipulationController::createUnit):
(WebCore::TextManipulationController::parse):
(WebCore::TextManipulationController::observeParagraphs):
(WebCore::TextManipulationController::replace):

  • editing/TextManipulationController.h:

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/TextManipulation.mm:

(TestWebKitAPI::TEST):

11:50 PM Changeset in webkit [262777] by Diego Pino Garcia
  • 4 edits in trunk/LayoutTests

[WPE] Gardening, update test expectations after r262763
https://bugs.webkit.org/show_bug.cgi?id=212961

Unreviewed gardening.

  • platform/glib/TestExpectations: Moved several bugs that were also hapenning in WPE from GTK to GLIB.
  • platform/gtk/TestExpectations:
  • platform/wpe/TestExpectations: Removed test passing and filed a few new bugs.
11:44 PM Changeset in webkit [262776] by commit-queue@webkit.org
  • 6 edits
    2 deletes in trunk

XMLHTTPRequest.send should not send Content-Type headers when Blob has no type
https://bugs.webkit.org/show_bug.cgi?id=211999

Patch by Rob Buis <rbuis@igalia.com> on 2020-06-08
Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

Update improved test expectation.

  • web-platform-tests/xhr/send-blob-with-no-mime-type-expected.txt:

Source/WebCore:

XMLHTTPRequest.send should not send Content-Type headers when Blob has no type [1, 2].
This behavior overrides the behavior of the File API spec [3].

Behavior matches Firefox and Chrome.

Test: imported/w3c/web-platform-tests/xhr/send-blob-with-no-mime-type.html

[1] https://xhr.spec.whatwg.org/#dom-xmlhttprequest-send
[2] https://fetch.spec.whatwg.org/#concept-bodyinit-extract
[3] http://dev.w3.org/2006/webapi/FileAPI/#dfn-type

  • platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm:

(-[WebCoreResourceHandleAsOperationQueueDelegate connection:willSendRequest:redirectResponse:]):

  • xml/XMLHttpRequest.cpp:

(WebCore::XMLHttpRequest::send):

LayoutTests:

Remove unneeded expectations.

  • platform/ios/imported/w3c/web-platform-tests/xhr/send-blob-with-no-mime-type-expected.txt: Removed.
  • platform/mac/imported/w3c/web-platform-tests/xhr/send-blob-with-no-mime-type-expected.txt: Removed.
10:37 PM Changeset in webkit [262775] by Diego Pino Garcia
  • 3 edits in trunk/Tools

[webkitpy] Check 'bug-search' returns a non null result before parsing
https://bugs.webkit.org/show_bug.cgi?id=212906

Reviewed by Jonathan Bedard.

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

(BugzillaQueries._parse_result_count): Check quick-search query
response is non-null and a non-empty text.

10:29 PM Changeset in webkit [262774] by Simon Fraser
  • 4 edits
    3 adds in trunk

Horizontally scrolling elements are broken when revealed by toggling visibility
https://bugs.webkit.org/show_bug.cgi?id=212439
<rdar://problem/63739559>

Reviewed by Zalan Bujtas.

Source/WebCore:

When revealing an overflow:scroll by toggling the visibility property, make sure that
we use composited scrolling.

computeScrollDimensions() is only updated on layout, so we need to recompute m_hasCompositedScrollableOverflow
on style change as well.

Test: compositing/scrolling/async-overflow-scrolling/toggle-visibility-on-scroller.html

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::computeScrollDimensions):
(WebCore::RenderLayer::computeHasCompositedScrollableOverflow):
(WebCore::RenderLayer::calculateClipRects const):

  • rendering/RenderLayer.h:

LayoutTests:

  • compositing/scrolling/async-overflow-scrolling/toggle-visibility-on-scroller-expected.txt: Added.
  • compositing/scrolling/async-overflow-scrolling/toggle-visibility-on-scroller.html: Added.
  • platform/ios-wk2/compositing/scrolling/async-overflow-scrolling/toggle-visibility-on-scroller-expected.txt: Added.
10:21 PM Changeset in webkit [262773] by Russell Epstein
  • 8 edits in branches/safari-610.1.15.52-branch/Source

Versioning.

10:19 PM Changeset in webkit [262772] by Russell Epstein
  • 8 edits in branches/safari-610.1.15.51-branch/Source

Versioning.

10:18 PM Changeset in webkit [262771] by Russell Epstein
  • 8 edits in branches/safari-610.1.15.50-branch/Source

Versioning.

10:10 PM Changeset in webkit [262770] by Russell Epstein
  • 1 copy in branches/safari-610.1.15.52-branch

New branch.

10:10 PM Changeset in webkit [262769] by Russell Epstein
  • 1 copy in branches/safari-610.1.15.51-branch

New branch.

10:09 PM Changeset in webkit [262768] by Russell Epstein
  • 1 copy in branches/safari-610.1.15.50-branch

New branch.

9:58 PM Changeset in webkit [262767] by Diego Pino Garcia
  • 3 edits in trunk/LayoutTests

[GTK] Gardening, update test expectations after r262763
https://bugs.webkit.org/show_bug.cgi?id=212957

Unreviewed gardening.

  • platform/glib/TestExpectations: Mark one test as flaky.
  • platform/gtk/TestExpectations: Remove two tests passing after r262740.
9:48 PM Changeset in webkit [262766] by Lauro Moura
  • 2 edits in trunk/WebDriverTests

[WebDriver][WPE] Gardening most of the remaining WPE failures.

Unreviewed test gardening.

9:34 PM Changeset in webkit [262765] by Chris Fleizach
  • 2 edits in trunk/Source/WTF

HAVE(ACCESSIBILITY_BUNDLES_PATH) is defined in terms of PLATFORM(IOS_FAMILY) but only checks the version of IPHONE_OS_VERSION_MIN_REQUIRED
https://bugs.webkit.org/show_bug.cgi?id=212704
<rdar://problem/63931340>

Reviewed by Darin Adler.

Ensure that this works for all iOS familes.

  • wtf/PlatformHave.h:
8:24 PM Changeset in webkit [262764] by Jonathan Bedard
  • 2 edits in trunk/Source/WebKitLegacy/mac

WebKitLegacy: Exclude NSURLConnectionSPI.h from watchOS
https://bugs.webkit.org/show_bug.cgi?id=212942
<rdar://problem/64141877>

Reviewed by Alexey Proskuryakov.

  • Misc/WebDownload.h: Exclude NSURLConnectionSPI.h from watchOS, replace

CFNSURLConnection.h with NSURLConnectionSPI.h.

7:19 PM Changeset in webkit [262763] by Ross Kirsling
  • 8 edits in trunk/JSTests

[Intl] Update tests to support ICU 67
https://bugs.webkit.org/show_bug.cgi?id=212943

Reviewed by Yusuke Suzuki.

Our tests have been assuming ICU 60-64 results but WinCairo and PlayStation are now on ICU 67,
which includes fixes for variant alphabetization and non-explicit "-true" values in locale strings.

  • stress/intl-collator.js:

(explicitTrueBeforeICU67):
(shouldBe.testCollator.Intl.Collator):

  • stress/intl-datetimeformat.js:
  • stress/intl-locale.js:
  • stress/intl-numberformat.js:
  • stress/intl-object.js:
  • stress/intl-pluralrules.js:
  • stress/intl-relativetimeformat.js:
6:26 PM Changeset in webkit [262762] by ddkilzer@apple.com
  • 5 edits in trunk/Source/WebKit

[IPC] Adopt enum class for IPC::CFType
<https://webkit.org/b/212921>
<rdar://problem/64134506>

Reviewed by Darin Adler.

Summary:

  • Convert IPC::CFType to enum class.
  • Rule for new enum names is to remove "Ref" suffix from the actual type name.
  • Special enum CFType::Null renamed to CFType::Nullptr to differentiate from CFType::CFNull objects.
  • Shared/cf/ArgumentCodersCF.cpp:

(IPC::tokenNullTypeRef): Delete.
(IPC::tokenNullptrTypeRef): Add.

  • Rename tokenNullTypeRef() to tokenNullptrTypeRef().

(IPC::CFType):

  • Convert to enum class.

(IPC::typeFromCFTypeRef):
(IPC::encode):

  • Switch from encodeEnum() to operator<<().

(IPC::decode):

  • Switch from decodeEnum() to decode().

(WTF::EnumTraits<IPC::CFType>): Add.

  • Shared/cf/ArgumentCodersCF.h:

(IPC::tokenNullTypeRef): Delete.
(IPC::tokenNullptrTypeRef): Add.

  • Rename tokenNullTypeRef() to tokenNullptrTypeRef().
  • Shared/mac/WebCoreArgumentCodersMac.mm:

(IPC::ArgumentCoder<WebCore::ResourceRequest>::encodePlatformData):
(IPC::ArgumentCoder<WebCore::ResourceRequest>::decodePlatformData):

  • Switch to use tokenNullptrTypeRef().
  • mac/WebKit2.order:
  • Update symbol name after renaming tokenNullTypeRef().
6:11 PM Changeset in webkit [262761] by Russell Epstein
  • 2 edits in branches/safari-610.1.15.5.0-branch/Source/WebKit

Cherry-pick r262644. rdar://problem/64127898

[iOS] Remove message filtering telemetry for expected case
https://bugs.webkit.org/show_bug.cgi?id=212841
<rdar://problem/63893460>

Reviewed by Per Arne Vollan.

Remove unintentional telemetry being captured for expected behavior.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:

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

6:11 PM Changeset in webkit [262760] by Russell Epstein
  • 2 edits in branches/safari-610.1.15.5.0-branch/Source/WebKit

Cherry-pick r262636. rdar://problem/64136089

[iOS] Fix message filter sandbox violation
https://bugs.webkit.org/show_bug.cgi?id=212837
<rdar://problem/63830368>

Reviewed by Darin Adler.

Add required message to message filter in the iOS WebContent sandbox.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:

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

6:08 PM Changeset in webkit [262759] by Russell Epstein
  • 8 edits in branches/safari-610.1.15.5.0-branch/Source

Versioning.

5:59 PM Changeset in webkit [262758] by Russell Epstein
  • 2 edits in branches/safari-610.1.15.5.2-branch/Source/WebKit

Cherry-pick r262636. rdar://problem/64127485

[iOS] Fix message filter sandbox violation
https://bugs.webkit.org/show_bug.cgi?id=212837
<rdar://problem/63830368>

Reviewed by Darin Adler.

Add required message to message filter in the iOS WebContent sandbox.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:

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

5:49 PM Changeset in webkit [262757] by Russell Epstein
  • 8 edits in branches/safari-610.1.15.5.2-branch/Source

Versioning.

5:35 PM Changeset in webkit [262756] by Jonathan Bedard
  • 2 edits in trunk/Source/WebCore/PAL

WebCore: Guard _preconnect declaration with ENABLE(SERVER_PRECONNECT)
https://bugs.webkit.org/show_bug.cgi?id=212935
<rdar://problem/64139060>

Reviewed by Alexey Proskuryakov.

  • pal/spi/cf/CFNetworkSPI.h:
5:22 PM Changeset in webkit [262755] by Alan Coon
  • 1 copy in tags/Safari-610.1.16.2

Tag Safari-610.1.16.2.

5:16 PM Changeset in webkit [262754] by Alan Coon
  • 8 edits in branches/safari-610.1.16-branch/Source

Versioning.

5:10 PM Changeset in webkit [262753] by weinig@apple.com
  • 8 edits in trunk

Extended Color: Rename Color::lighten() and Color::darken() to Color::lightened() and Color::darkened()
https://bugs.webkit.org/show_bug.cgi?id=212917

Reviewed by Darin Adler.

Addresses feedback from Darin.

Source/WebCore:

  • platform/graphics/Color.cpp:

(WebCore::Color::lightened const):
(WebCore::Color::darkened const):
(WebCore::Color::lighten const): Deleted.
(WebCore::Color::darken const): Deleted.

  • platform/graphics/Color.h:
  • rendering/RenderObject.cpp:

(WebCore::RenderObject::calculateBorderStyleColor):

  • rendering/RenderTheme.cpp:

(WebCore::RenderTheme::disabledTextColor const):

  • rendering/TextPaintStyle.cpp:

(WebCore::adjustColorForVisibilityOnBackground):

Tools:

  • TestWebKitAPI/Tests/WebCore/ColorTests.cpp:

(TestWebKitAPI::TEST):

4:47 PM Changeset in webkit [262752] by Kate Cheney
  • 2 edits in trunk/Source/WebKit

ResourceLoadStatisticsDatabaseStore::domainIDFromString failed, error message: bad parameter or other API misuse
https://bugs.webkit.org/show_bug.cgi?id=212916
<rdar://problem/64127238>

Reviewed by Sihui Liu.

Make sure m_domainIDFromStringStatement is accessed in a separate
scope in ensureResourceStatisticsForRegistrableDomain() so it will be
reset before being used again.

  • NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp:

(WebKit::ResourceLoadStatisticsDatabaseStore::domainID const):
Add debug assert to ensure that tests catch this case.

(WebKit::ResourceLoadStatisticsDatabaseStore::ensureResourceStatisticsForRegistrableDomain const):

4:22 PM Changeset in webkit [262751] by Devin Rousso
  • 2 edits in trunk/Source/WebCore

Remove unnecessary variable in WindowProxy::createJSWindowProxy
https://bugs.webkit.org/show_bug.cgi?id=212929

Reviewed by Darin Adler.

  • bindings/js/WindowProxy.cpp:

(WebCore::WindowProxy::createJSWindowProxy):

4:03 PM Changeset in webkit [262750] by Alan Coon
  • 1 copy in branches/safari-610.1.15.5.2-branch

New branch.

4:03 PM Changeset in webkit [262749] by Alan Coon
  • 1 copy in branches/safari-610.1.15.5.1-branch

New branch.

4:02 PM Changeset in webkit [262748] by Alan Coon
  • 1 copy in branches/safari-610.1.15.5.0-branch

New branch.

3:48 PM Changeset in webkit [262747] by Chris Dumez
  • 2 edits in trunk/Source/WebKit

Turn some WebPageProxy logging into error logging
https://bugs.webkit.org/show_bug.cgi?id=212922
<rdar://problem/63894722>

Reviewed by Geoffrey Garen.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::didFailProvisionalLoadForFrameShared):
(WebKit::WebPageProxy::didFailLoadForFrame):
(WebKit::WebPageProxy::processDidTerminate):
(WebKit::WebPageProxy::dispatchProcessDidTerminate):
(WebKit::WebPageProxy::tryReloadAfterProcessTermination):
(WebKit::WebPageProxy::didExceedInactiveMemoryLimitWhileActive):
(WebKit::WebPageProxy::didExceedBackgroundCPULimitWhileInForeground):

3:46 PM Changeset in webkit [262746] by keith_miller@apple.com
  • 3 edits in trunk/Source/JavaScriptCore

Removed unneeded POINTER_WIDTH macro from b3
https://bugs.webkit.org/show_bug.cgi?id=212927

Reviewed by Yusuke Suzuki.

C++20 has real constexpr functions so we don't need the
POINTER_WIDTH macro anymore.

  • b3/B3Width.h:

(JSC::B3::pointerWidth):

  • b3/air/opcode_generator.rb:
3:38 PM Changeset in webkit [262745] by Diego Pino Garcia
  • 2 edits in trunk/LayoutTests

Gardening, remove tests passing after r262716
https://bugs.webkit.org/show_bug.cgi?id=212923

Unreviewed gardening.

Several css-grid tests marked as failure are passing in all platforms after r262716.

3:29 PM Changeset in webkit [262744] by Alan Coon
  • 1 copy in tags/Safari-610.1.15.5

Tag Safari-610.1.15.5.

3:14 PM Changeset in webkit [262743] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebCore

Release Assert @ WebCore::RenderTreeBuilder::RenderTreeBuilder
https://bugs.webkit.org/show_bug.cgi?id=212714

Patch by Pinki Gyanchandani <pgyanchandani@apple.com> on 2020-06-08
Reviewed by Geoffrey Garen.

Widget removal in the middle of building a Render Tree causes side effects, leading to Release Assert. Moved the scope for suspension of widgets
update to RenderTreeBuilder instead of having it in RenderTreeUpdater.

Test would be added later.

  • rendering/updating/RenderTreeBuilder.h:
  • rendering/updating/RenderTreeUpdater.cpp:

(WebCore::RenderTreeUpdater::tearDownRenderers):

3:03 PM Changeset in webkit [262742] by Diego Pino Garcia
  • 2 edits in trunk/LayoutTests

[GTK] Gardening, update expectations after 262724
https://bugs.webkit.org/show_bug.cgi?id=212926

Unreviewed gardening.

Add failure to test expectationd and remove failing test that is
passing since r262466.

  • platform/gtk/TestExpectations:
2:44 PM Changeset in webkit [262741] by Diego Pino Garcia
  • 3 edits in trunk/LayoutTests

[GTK][WPE] Remove test failures passing after r262707
https://bugs.webkit.org/show_bug.cgi?id=212924

Unreviewed gardening.

  • platform/gtk/TestExpectations:
  • platform/wpe/TestExpectations:
2:34 PM Changeset in webkit [262740] by weinig@apple.com
  • 2 edits in trunk/Tools

Fix test results after r262733.

  • TestWebKitAPI/Tests/WebCore/ColorTests.cpp:

(TestWebKitAPI::TEST):

2:07 PM Changeset in webkit [262739] by ysuzuki@apple.com
  • 4 edits in trunk/Source/WebCore

Use usual promise in readableStreamTee
https://bugs.webkit.org/show_bug.cgi?id=212715

Reviewed by Mark Lam.

The spec[1] is organized to be OK to use usual promises here. This patch uses usual promises instead of internal ones.

[1]: https://streams.spec.whatwg.org/#readable-stream-tee

  • Modules/streams/ReadableStreamInternals.js:

(readableStreamTee):

1:43 PM Changeset in webkit [262738] by keith_miller@apple.com
  • 9 edits in trunk/JSTests

Fix tests that time out on Series 4 Watch
https://bugs.webkit.org/show_bug.cgi?id=212911

Reviewed by Saam Barati.

Simplify some logic about when to skip microbenchmarks to $jitTests.
Also reduce iteration count for
dont-range-based-iterate-vector-that-is-mutated.js

Also, mark wasm tests as not run on watch.

  • microbenchmarks/bit-test-constant.js:
  • microbenchmarks/bit-test-nonconstant.js:
  • microbenchmarks/interpreter-wasm.js:
  • microbenchmarks/memcpy-typed-loop-large.js:
  • microbenchmarks/memcpy-typed-loop-small.js:
  • microbenchmarks/mul-immediate-sub.js:
  • stress/dont-range-based-iterate-vector-that-is-mutated.js:
  • stress/sampling-profiler-richards.js:
1:36 PM Changeset in webkit [262737] by achristensen@apple.com
  • 2 edits in branches/safari-609-branch/Tools

Fix branch build after r262552

  • TestWebKitAPI/Tests/WTF/cocoa/URLExtras.mm:

(TestWebKitAPI::TEST):
The branch WTF::URL has an operator NSURL * and an operator NSString *, so we need to specify which to use.

1:30 PM Changeset in webkit [262736] by Lauro Moura
  • 2 edits in trunk/WebDriverTests

[WebDriver][GTK][WPE] Fix overwritten expectations.

WPE's set_window_rect/set.py expectations were in a block after the
existing ones from other ports, overwriting them. This commit now
merges them to be in a single block.

Unreviewed test gardening.

1:07 PM Changeset in webkit [262735] by ddkilzer@apple.com
  • 22 edits in trunk

[IPC] Adopt enum class for DragOperation
<https://webkit.org/b/212870>
<rdar://problem/64069940>

Reviewed by Darin Adler.

Source/WebCore:

  • dom/DataTransfer.cpp:

(WebCore::dragOpFromIEOp):
(WebCore::IEOpFromDragOp):
(WebCore::DataTransfer::sourceOperationMask const):
(WebCore::DataTransfer::destinationOperationMask const):
(WebCore::DataTransfer::setSourceOperationMask):
(WebCore::DataTransfer::setDestinationOperationMask):
(WebCore::DataTransfer::setEffectAllowed):

  • page/DragActions.h:

(WebCore::DragOperation):

  • Convert to enum class.

(WebCore::anyDragOperation):

  • page/DragController.cpp:

(WebCore::DragController::platformGenericDragOperation):
(WebCore::DragController::dragEnteredOrUpdated):
(WebCore::DragController::tryDocumentDrag):
(WebCore::defaultOperationForDrag):
(WebCore::DragController::startDrag):

  • page/EventHandler.cpp:

(WebCore::convertDropZoneOperationToDragOperation):
(WebCore::convertDragOperationToDropZoneOperation):

  • page/gtk/DragControllerGtk.cpp:

(WebCore::DragController::dragOperation):

  • page/mac/DragControllerMac.mm:

(WebCore::DragController::dragOperation):
(WebCore::DragController::platformGenericDragOperation):

  • page/win/DragControllerWin.cpp:

(WebCore::DragController::dragOperation):

  • platform/gtk/GtkUtilities.cpp:

(WebCore::gdkDragActionToDragOperation):
(WebCore::dragOperationToGdkDragActions):
(WebCore::dragOperationToSingleGdkDragAction):

Source/WebKit:

  • Scripts/webkit/messages.py:
  • Remove FIXME now that it's not needed.
  • Shared/API/Cocoa/_WKDragActionsInternal.h:

(WebKit::coreDragOperationMask):

  • UIProcess/Cocoa/WebViewImpl.mm:

(WebKit::kit):

  • UIProcess/ios/WKContentViewInteraction.mm:

(dropOperationForWebCoreDragOperation):
(coreDragOperationForUIDropOperation):
(-[WKContentView dragDataForDropSession:dragDestinationAction:]):

Source/WebKitLegacy/mac:

  • WebView/WebHTMLView.mm:

(kit):

  • WebView/WebView.mm:

(coreDragOperationMask):
(kit):

Source/WebKitLegacy/win:

  • WebCoreSupport/WebDragClient.cpp:

(draggingSourceOperationMaskToDragCursors):
(WebDragClient::startDrag):

  • WebView.cpp:

(dragOperationToDragCursor):
(WebView::keyStateToDragOperation const):

Tools:

  • Scripts/do-webcore-rename:
  • Do DragOperation renames.
1:04 PM Changeset in webkit [262734] by commit-queue@webkit.org
  • 7 edits in trunk

Unreviewed, reverting r262685.
https://bugs.webkit.org/show_bug.cgi?id=212914

caused flakey crashes in an iOS test

Reverted changeset:

"Clear WebPageProxy event state between tests"
https://bugs.webkit.org/show_bug.cgi?id=212864
https://trac.webkit.org/changeset/262685

12:37 PM Changeset in webkit [262733] by weinig@apple.com
  • 27 edits in trunk

Extended Color: Unify rounding / clamping conversions between 0-1 float components and 0-255 byte components
https://bugs.webkit.org/show_bug.cgi?id=212871

Reviewed by Simon Fraser.
Source/WebCore:

Unify all conversions of 0.0f - 1.0f float based color components to 0-255 int based color components
to use the new convertToComponentByte() function which scales, rounds (using lroundf) and clamps the
value. For consistency, a convertToComponentFloat() function, which just scales down an int based value
to a float based value, is also added.

  • Removes *UsingAlternativeRounding variants (actually, we now only have this variant) for color functions which allowed callers to pick from truncation vs. rounding when overriding alpha.
  • Replaces all uses of scaleRoundAndClampColorChannel() with convertToComponentByte() (really just a rename).
  • Replaces uses of nextafter(256, 0) based conversions with convertToComponentByte().

Also:

  • Moves roundAndClampColorChannel() functions to SVGAnimationAdditiveValueFunctionImpl.h, which was the only places they were used.
  • Removes areEssentiallyEqual() overload taking ColorComponents<float>. It was ununsed.
  • Removes makeSimpleColorFromHSLA(...) and just inlines makeSimpleColor(hslToSRGB(...)) which now does the same thing.
  • css/parser/CSSPropertyParserHelpers.cpp:

(WebCore::CSSPropertyParserHelpers::clampRGBComponent):
Use convertPrescaledToComponentByte() to round and clamp the components.

(WebCore::CSSPropertyParserHelpers::parseRGBParameters):
Use uint8_t more consistently now that helpers ensure that is the return type
of conversion functions.

(WebCore::CSSPropertyParserHelpers::parseHSLParameters):
Switch to using makeSimpleColor(hslToSRGB(...)) directly.

  • editing/cocoa/DataDetection.mm:

(WebCore::DataDetection::detectContentInRange):
Switch to using makeSimpleColor(hslToSRGB(...)) directly.

  • html/HTMLElement.cpp:

(WebCore::parseLegacyColorValue):
Use uint8_t since that is what toASCIIHexValue() returns.

  • html/canvas/CanvasRenderingContext2DBase.cpp:

(WebCore::CanvasRenderingContext2DBase::setStrokeStyle):
(WebCore::CanvasRenderingContext2DBase::setFillStyle):
(WebCore::CanvasRenderingContext2DBase::setShadow):

  • html/canvas/CanvasStyle.cpp:

(WebCore::CanvasStyle::createFromStringWithOverrideAlpha):
Replaces uses of colorWithAlphaUsingAlternativeRounding() with colorWithAlpha().

  • inspector/agents/InspectorDOMAgent.cpp:

(WebCore::parseColor):
Use convertToComponentByte() rather than a simple truncating cast.

  • platform/graphics/Color.cpp:

(WebCore::Color::light const):
(WebCore::Color::dark const):
Use makeSimpleColorFromFloats() rather than nextafterf(256.0f, 0.0f) conversion.

(WebCore::Color::colorWithAlpha const):
(WebCore::Color::invertedColorWithAlpha const):
Use convertToComponentByte() for alpha conversion.

(WebCore::Color::toSRGBASimpleColorLossy const):
Call asExtended().toSRGBAComponentsLossy() directly to avoid unnecessary branch.

(WebCore::Color::colorWithAlphaMultipliedBy const): Deleted.
(WebCore::Color::colorWithAlphaMultipliedByUsingAlternativeRounding const): Deleted.
(WebCore::Color::colorWithAlphaUsingAlternativeRounding const): Deleted.
Remove UsingAlternativeRounding variants.

  • platform/graphics/Color.h:

(WebCore::Color::alpha const):
Use convertToComponentByte() for alpha conversion.

(WebCore::Color::invertedColorWithAlpha const):
Add an overload taking an Optional<float> for consistency.

(WebCore::Color::colorWithAlphaMultipliedBy const):
(WebCore::Color::colorWithAlpha const):
Simplify by inlining all variants except the main colorWithAlpha().

  • platform/graphics/ColorUtilities.cpp:

(WebCore::areEssentiallyEqual): Deleted.
Remove unused function.

  • platform/graphics/ColorUtilities.h:

(WebCore::convertPrescaledToComponentByte):
Added. Useful for callers who already have prescaled values but need rounding/clamping.

(WebCore::convertToComponentByte):
Added. Bottleneck for float to byte based color component conversions.
(WebCore::convertToComponentFloat):
Added. Bottleneck for byte to float based color component conversions.

  • platform/graphics/SimpleColor.cpp:

(WebCore::makeSimpleColorFromCMYKA):
Use makeSimpleColorFromFloats() rather than nextafterf(256.0f, 0.0f) conversion. Eventually,
when we probably want this to go away and store CMYKA colors as ExtendedColors with their own
color space.

(WebCore::makeSimpleColorFromFloats):
Moved to header.

  • platform/graphics/SimpleColor.h:

(WebCore::SimpleColor::alphaComponentAsFloat const):
Use convertToComponentFloat().

(WebCore::SimpleColor::asSRGBFloatComponents const):
Use convertToComponentFloat().

(WebCore::makeSimpleColor):
Avoid unncessary clamping of the alpha component by calling constructor directly.

(WebCore::makeSimpleColorFromFloats):
Inlined. Calls convertToComponentByte now rather than the older (identical) scaleRoundAndClampColorChannel().

  • platform/graphics/cairo/CairoOperations.cpp:

(WebCore::Cairo::prepareCairoContextSource):
Replaces use of colorWithAlphaMultipliedByUsingAlternativeRounding with colorWithAlphaMultipliedBy().

  • platform/graphics/cg/ColorCG.cpp:

(WebCore::makeSimpleColorFromCGColor):
Use makeSimpleColorFromFloats() rather than nextafter(256.0, 0.0) conversion.

  • platform/graphics/filters/FEFlood.cpp:

(WebCore::FEFlood::platformApplySoftware):
Replaces use of colorWithAlphaMultipliedByUsingAlternativeRounding with colorWithAlphaMultipliedBy().

  • platform/graphics/mac/ColorMac.mm:

(WebCore::makeSimpleColorFromNSColor):
Use makeSimpleColorFromFloats() rather than nextafter(256.0, 0.0) conversion.

  • platform/ios/ColorIOS.mm:

(WebCore::colorFromUIColor):
Use makeSimpleColorFromFloats() rather than nextafter(256.0, 0.0) conversion.

  • svg/SVGStopElement.cpp:

(WebCore::SVGStopElement::stopColorIncludingOpacity const):
Replaces use of colorWithAlphaMultipliedByUsingAlternativeRounding with colorWithAlphaMultipliedBy().

  • svg/properties/SVGAnimationAdditiveValueFunctionImpl.h:

(WebCore::SVGAnimationColorFunction::roundAndClampColorChannel):
Moved from ColorUtilities.h as this was the only use.

Source/WebKit:

  • UIProcess/API/ios/WKWebViewIOS.mm:

(scrollViewBackgroundColor):
Replaces uses of colorWithAlphaUsingAlternativeRounding() with colorWithAlpha().

Tools:

  • TestWebKitAPI/Tests/WebCore/ColorTests.cpp:

(TestWebKitAPI::TEST):
Switch to using makeSimpleColor(hslToSRGB(...)) directly.

LayoutTests:

  • fast/css/ios/system-color-for-css-value-expected.txt:
  • fast/css/ios/system-color-for-css-value.html:

Update test to account for slightly differnt rounding (alpha goes from 0.298 to 0.3).

12:09 PM Changeset in webkit [262732] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebKit

Links in NSAttributedString passed to -[WKWebView _showSafeBrowsingWarningWithURL:title:warning:details:completionHandler:] are ignored
https://bugs.webkit.org/show_bug.cgi?id=212801
<rdar://problem/63027631>

Patch by Richard Houle <rhoule@apple.com> on 2020-06-08
Reviewed by Alex Christensen.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _showSafeBrowsingWarningWithTitle:warning:details:completionHandler:]): Call the new detailsWithLinks
implementation, asserting if an URL is non nil.
(-[WKWebView _showSafeBrowsingWarningWithURL:title:warning:details:completionHandler:]): Ditto.
(-[WKWebView _showSafeBrowsingWarningWithURL:title:warning:detailsWithLinks:completionHandler:]): Pass the URL to
the completion handler when appropriate.

  • UIProcess/API/Cocoa/WKWebViewPrivate.h:
11:54 AM Changeset in webkit [262731] by Russell Epstein
  • 8 edits in branches/safari-610.1.15-branch/Source

Versioning.

11:44 AM Changeset in webkit [262730] by pvollan@apple.com
  • 4 edits in trunk/Source

[Cocoa] Adopt read-only mode for preferences in the WebContent process
https://bugs.webkit.org/show_bug.cgi?id=212411

Reviewed by Darin Adler.

Change name of HAVE define to match SPI name.

Source/WebKit:

  • Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceMain.mm:

(WebKit::XPCServiceMain):

Source/WTF:

  • wtf/PlatformHave.h:
11:38 AM Changeset in webkit [262729] by weinig@apple.com
  • 9 edits in trunk

Extended Color: Replace uses of differenceSquared() with luminance based computations
https://bugs.webkit.org/show_bug.cgi?id=212872

Reviewed by Darin Adler.

Source/WebCore:

Replace all uses of differenceSquared() with luminance based comparisons. This is
possible because all of the uses of differenceSquared() were about identifying a
distance from black or white to determine relative brightness. It is more accurate
to do this in terms of luminance, and has the added benefit of being something that
is expressible in all colorspaces (since luminance is defined as the Y-component
of the XYZ colorspace which all colorspaces are convertable to).

  • platform/graphics/Color.cpp:

(WebCore::Color::lighten const):
Renamed Color::light() to Color::lighten(), which makes more sense. The algorithm
used should be updated at some point to also use luminance, but is unchanged for
now.

(WebCore::Color::darken const):
Renamed Color::dark() to Color::darken(), which makes more sense. The algorithm
used should be updated at some point to also use luminance, but is unchanged for
now.

(WebCore::Color::luminance const):
Added. Converts to sRGB for now, but can be updated to work with other color spaces
when needed.

  • platform/graphics/Color.h:

Removed differenceSquared.

  • platform/graphics/ColorUtilities.cpp:

(WebCore::luminance):
Updated to use the standard conversion to linear-sRGB. While there are certainly
some places that specify a 0.03928 cutoff, the much more accepted value (and value
specified by the IEC) is 0.04045, which we use for all other gamma correction.
(See https://entropymine.com/imageworsener/srgbformula/ or https://en.wikipedia.org/wiki/SRGB#The_forward_transformation_(CIE_XYZ_to_sRGB)
for more information on this).

Also added a FIXME about how in the future we can avoid hardcoding the specific values
multiple times by extracting them from the linear-sRGB to XYZ matrix.

  • rendering/RenderObject.cpp:

(WebCore::RenderObject::calculateBorderStyleColor):
Use luminance, rather than distance as a better comparison for whether the color
is too dark or too light for modification.

  • rendering/RenderTheme.cpp:

(WebCore::RenderTheme::disabledTextColor const):
Use luminance, rather than distance as a better comparison for whether the color
is too dark or too light for modification. Also us the contrastRatio utility
function to determine illegibility issues due to contrast, picking a new minimum
that roughly matches the old one based fast/forms/input-disabled-color.html

  • rendering/TextPaintStyle.cpp:

(WebCore::adjustColorForVisibilityOnBackground):
Use luminance, rather than distance as a better comparison for whether the color
is too dark or too light for modification.

Tools:

  • TestWebKitAPI/Tests/WebCore/ColorTests.cpp:

(TestWebKitAPI::TEST):
Add basic tests for Color::luminance(), ensuring white == 1, black == 0, and
darken() and lighten() creat colors with less than / greater than luminance.

11:14 AM Changeset in webkit [262728] by youenn@apple.com
  • 7 edits in trunk

Missing WebRTC Metrics in iOS Safari
https://bugs.webkit.org/show_bug.cgi?id=212668
<rdar://problem/63902458>

Reviewed by Eric Carlson.

Source/WebCore:

Expose more transports related stats.
Covered by updated test.

  • Modules/mediastream/RTCStatsReport.h:
  • Modules/mediastream/RTCStatsReport.idl:
  • Modules/mediastream/libwebrtc/LibWebRTCStatsCollector.cpp:

(WebCore::fillRTCTransportStats):

LayoutTests:

  • webrtc/video-stats-expected.txt:
  • webrtc/video-stats.html:
11:11 AM Changeset in webkit [262727] by Alexey Shvayka
  • 4 edits
    1 add in trunk

JSON.stringify should throw stack overflow error
https://bugs.webkit.org/show_bug.cgi?id=143511

Reviewed by Ross Kirsling and Mark Lam.

JSTests:

  • stress/json-stringify-stack-overflow.js: Added.
  • stress/json-stringify-string-builder-overflow.js:

Source/JavaScriptCore:

This change adds m_holderStack.size() check, reusing the limit of JSON.parse,
and throws StackOverflowError if exceeded, aligning JSC with V8 and SpiderMonkey.
Even with all the cyclic structure checks in place, excess is possible due to
very deeply nested object, user-provided "toJSON" method or functional replacer.

While Stringifier::appendStringifiedValue() and Holder::appendNextProperty()
mutually call each other, recursion is avoided by !holderStackWasEmpty check and
do/while loop at the end of appendStringifiedValue(), as well as cyclic structure
check as per spec [1].

[1]: https://tc39.es/ecma262/#sec-serializejsonobject (step 1)

  • runtime/JSONObject.cpp:

(JSC::Stringifier::appendStringifiedValue):
(JSC::Walker::walk):

11:10 AM Changeset in webkit [262726] by youenn@apple.com
  • 10 edits in trunk

Add missed WebRTC media-source and remote-inbound-rtp stats
https://bugs.webkit.org/show_bug.cgi?id=206645
<rdar://problem/58833958>

Reviewed by Eric Carlson.

Source/ThirdParty/libwebrtc:

  • Configurations/libwebrtc.iOS.exp:
  • Configurations/libwebrtc.iOSsim.exp:
  • Configurations/libwebrtc.mac.exp:

Source/WebCore:

Update stats according latest spec and webrtc backend.
We still expose obsolete trackId for consistency with existing WPT tests.
Covered by existing and updated tests.

  • Modules/mediastream/RTCStatsReport.h:

(WebCore::RTCStatsReport::InboundRtpStreamStats::InboundRtpStreamStats):
(WebCore::RTCStatsReport::RemoteInboundRtpStreamStats::RemoteInboundRtpStreamStats):
(WebCore::RTCStatsReport::OutboundRtpStreamStats::OutboundRtpStreamStats):
(WebCore::RTCStatsReport::InboundRTPStreamStats::InboundRTPStreamStats): Deleted.
(WebCore::RTCStatsReport::OutboundRTPStreamStats::OutboundRTPStreamStats): Deleted.

  • Modules/mediastream/RTCStatsReport.idl:
  • Modules/mediastream/libwebrtc/LibWebRTCStatsCollector.cpp:

(WebCore::fillRtpStreamStats):
(WebCore::fillReceivedRtpStreamStats):
(WebCore::fillInboundRtpStreamStats):
(WebCore::fillRemoteInboundRtpStreamStats):
(WebCore::fillSentRtpStreamStats):
(WebCore::fillOutboundRtpStreamStats):
(WebCore::initializeRTCStatsReportBackingMap):
(WebCore::fillRTCRTPStreamStats): Deleted.
(WebCore::fillInboundRTPStreamStats): Deleted.
(WebCore::fillOutboundRTPStreamStats): Deleted.

LayoutTests:

  • webrtc/video-stats.html:

qpSum is no longer guaranteed to be there.
Also, we loop over stats to ensure we get all of them.

10:52 AM Changeset in webkit [262725] by Jonathan Bedard
  • 5 edits
    1 add in trunk/Source/WebCore

WebCore: Add tvOS and watchOS SPI headers
https://bugs.webkit.org/show_bug.cgi?id=212853
<rdar://problem/64048485>

Reviewed by Andy Estes.

Source/WebCore:

No new tests, no behavior changed.

  • platform/ios/WebCoreMotionManager.h: Forward-declare CMMotionManager.
  • platform/ios/WebCoreMotionManager.mm: Include CoreMotionSPI.h.

Source/WebCore/PAL:

  • PAL.xcodeproj/project.pbxproj: Add CoreMotionSPI.h.
  • pal/spi/cf/CFNetworkSPI.h: CFNetwork SPI should be available on watchOS and tvOS.
  • pal/spi/cocoa/CoreMotionSPI.h: Added.
10:40 AM Changeset in webkit [262724] by pvollan@apple.com
  • 5 edits in trunk

[Cocoa] CFPrefs synchronization does not always work for global preference changes
https://bugs.webkit.org/show_bug.cgi?id=212783

Reviewed by Tim Horton.

Source/WebKit:

In CFPrefs direct mode, synchronization of global preference changes from the UI process to the WebContent process does not always work.
This is caused by the KVO notification being sent to all or some of the NSUserDefault objects, which leads us to believe a non-global
preference was changed. Since a global preference change always leads to some NSUserDefaults object receiving the notification, we can
work around this by checking if the preference being changed really belongs to the domain of the NSUserDefaults object, or if it is a
global preference. Also, stop creating NSUserDefaults object for the global domain, since this is an error according to the docs.

API test: WebKit.GlobalPreferenceChangesUsingDefaultsWrite

  • UIProcess/Cocoa/PreferenceObserver.mm:

(-[WKUserDefaults _notifyObserversOfChangeFromValuesForKeys:toValuesForKeys:]):

  • WebProcess/cocoa/WebProcessCocoa.mm:

(WebKit::WebProcess::platformInitializeWebProcess):
(WebKit::WebProcess::notifyPreferencesChanged):

Tools:

Add API test, and add some synchronization to avoid flakiness.

  • TestWebKitAPI/Tests/WebKit/PreferenceChanges.mm:

(-[WKTestPreferenceObserver preferenceDidChange:key:encodedValue:]):
(TEST):
(sharedInstanceMethodOverride):

10:08 AM Changeset in webkit [262723] by Lauro Moura
  • 2 edits in trunk/WebDriverTests

[WebDriver][GTK] Update test expectations after modifier fix

Unreviewed test gardening.

9:55 AM Changeset in webkit [262722] by Alan Bujtas
  • 4 edits
    2 adds in trunk

[LFC][IFC] Add support for min/max-width/height
https://bugs.webkit.org/show_bug.cgi?id=212904

Reviewed by Antti Koivisto.

Source/WebCore:

Test: fast/layoutformattingcontext/inline-max-width-height-simple.html

  • layout/FormattingContextGeometry.cpp:

(WebCore::Layout::FormattingContext::Geometry::computedWidthValue): Adjust assert to check inline, non-replaced boxes only (inline-block is an
inline level element but not an inline element)

  • layout/inlineformatting/InlineFormattingContext.cpp:

(WebCore::Layout::InlineFormattingContext::computeWidthAndMargin):
(WebCore::Layout::InlineFormattingContext::computeHeightAndMargin):

LayoutTests:

  • fast/layoutformattingcontext/inline-max-width-height-simple-expected.html: Added.
  • fast/layoutformattingcontext/inline-max-width-height-simple.html: Added.
9:47 AM Changeset in webkit [262721] by Wenson Hsieh
  • 7 edits
    1 add in trunk

[iOS] Hit-testing on icloud.com is offset after closing a tab
https://bugs.webkit.org/show_bug.cgi?id=212890
<rdar://problem/58775297>

Reviewed by Simon Fraser.

Source/WebKit:

After tapping to create a new tab on the icloud.com settings page (with no other tabs open) and then closing the
new tab, all hit-testing on the page is offset by -33px until the page is reloaded. This bug appears to be a
corner case triggered by a combination of the following three changes:

We start on icloud.com's settings page. When closing the newly created tab, Safari hides the tab bar, causing
both the top content inset and top obscured inset to decrease by 33 points. When applying the top content inset
change, Safari (after <rdar://problem/53660458>) temporarily sets _automaticContentOffsetAdjustmentEnabled on
WKScrollView to NO, which means that the scroll view doesn't automatically adjust its content offset to -70;
instead, it remains at -103 (the content offset when the tab bar is shown).

Because of this, during the next remote layer tree commit where the content size changes,
-_setContentSizePreservingContentOffsetDuringRubberband: will believe that we're currently rubber-banding by
33px, and therefore try to adjust the content offset of the scroll view to be -103 instead of allowing it to be
adjusted back to -70 (see r170463 and -_restoreContentOffsetWithRubberbandAmount:).

This results in the scroll position on the page (document.scrollingElement.scrollTop) reporting -33, even
though the top of the page is flush with the bottom of Safari's browser chrome. Finally, because WKScrollView
is made unscrollable due to overflow: hidden; (r245006), we end up permanently stuck in this state until the
next page load, rather than the next remote layer tree commit that causes any scrolling.

To fix this, add an additional restriction on the rubberbanding offset restoration code in
-_setContentSizePreservingContentOffsetDuringRubberband:, such that we only try to preserve the current
rubberbanded offset if we're actually rubberbanding (that is, dragging or bouncing against the edge of the
scroll view). Note that when rubberbanding against the top of the scroll view on iPad using a trackpad, the
-isDragging property is also true, which matches behavior when panning via touch.

Test: ScrollViewInsetTests.ChangeInsetWithoutAutomaticAdjustmentWhileWebProcessIsUnresponsive

  • Platform/spi/ios/UIKitSPI.h:
  • UIProcess/ios/WKScrollView.mm:

(-[WKScrollView _setContentSizePreservingContentOffsetDuringRubberband:]):

Also, split out the CGSizeEqualToSize(currentContentSize, contentSize) case into a separate early return that
skips the call to -setContentSize: altogether.

Tools:

Add a new API test to verify that the scroll position doesn't get stuck at -30px after shifting both the top
content inset and top obscured inset by 30px. See WebKit ChangeLog for more details.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKitCocoa/overflow-hidden.html: Added.
  • TestWebKitAPI/Tests/ios/ScrollViewInsetTests.mm:

(-[ScrollViewDelegate scrollViewDidScroll:]):
(TestWebKitAPI::TEST):

  • TestWebKitAPI/ios/UIKitSPI.h:
9:17 AM Changeset in webkit [262720] by svillar@igalia.com
  • 11 edits
    2 copies
    3 adds in trunk

[WebXR] Add missing interfaces from the AR module
https://bugs.webkit.org/show_bug.cgi?id=212826

Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

Added expectations.

  • web-platform-tests/webxr/ar-module/idlharness.https.window-expected.txt: Added.
  • web-platform-tests/webxr/ar-module/xrDevice_isSessionSupported_immersive-ar.https-expected.txt: Added.
  • web-platform-tests/webxr/ar-module/xrDevice_requestSession_immersive-ar.https-expected.txt: Added.

Source/WebCore:

Added the XRInteractionMode partial interface from the WebXR AR module spec. This spec
https://immersive-web.github.io/webxr-ar-module/ expands the WebXR Device API with
functionality available in AR hardware.

Some WebXR wpt tests are now passing.

  • CMakeLists.txt: Added new files.
  • DerivedSources.make: Ditto.
  • Modules/webxr/WebXRSession.cpp:

(WebCore::WebXRSession::interactionMode const): Added.

  • Modules/webxr/WebXRSession.h: Added interactionMode attribute and getter;
  • Modules/webxr/WebXRSession.idl: Added interactionMode attribute;
  • Modules/webxr/XRInteractionMode.h: Added.
  • Modules/webxr/XRInteractionMode.idl: Added.
  • Sources.txt: Added new files.
  • WebCore.xcodeproj/project.pbxproj: Ditto.

LayoutTests:

  • platform/wpe/TestExpectations: Unskipped 3 tests which are passing now.
9:11 AM Changeset in webkit [262719] by Jonathan Bedard
  • 2 edits in trunk/Source/JavaScriptCore

JavaScriptCore: Fix PLATFORM(TVOS) macro
https://bugs.webkit.org/show_bug.cgi?id=212900
<rdar://problem/64118879>

Unreviewed build fix.

  • tools/JSDollarVM.cpp:

(JSC::functionIsMemoryLimited): PLATFORM(TVOS) should be PLATFORM(APPLETV).

8:59 AM Changeset in webkit [262718] by svillar@igalia.com
  • 5 edits in trunk/Source/WebCore

[WebXR] Pass an unsigned long to cancelAnimationCallback() as handle
https://bugs.webkit.org/show_bug.cgi?id=212529

Reviewed by Youenn Fablet.

The type of the handle returned by XRSession::requestAnimationFrame() was recently changed
to unsigned long from long as there was no point in using signed integers for that. However
we forgot to update the cancelAnimationFrame() in the specs as well as it receives the handle
returned by requestAnimationFrame().

We landed https://github.com/immersive-web/webxr/pull/1069 in the WebXR specs so we can now
safely also replace signed by unsigned integers in our implementation.

No new tests as there is no change in functionality.

  • Modules/webxr/WebXRSession.cpp:

(WebCore::WebXRSession::cancelAnimationFrame): Use unsigned ids.

  • Modules/webxr/WebXRSession.h: Ditto.
  • Modules/webxr/WebXRSession.idl: Ditto.
8:56 AM Changeset in webkit [262717] by commit-queue@webkit.org
  • 1 edit
    1 add in trunk/Tools

[Flatpak SDK] Add flatpak-run-nightly
https://bugs.webkit.org/show_bug.cgi?id=212882

Patch by Philippe Normand <pnormand@igalia.com> on 2020-06-08
Reviewed by Carlos Alberto Lopez Perez.

This new script is able to download WPE and GTK builds from the Igalia servers and run the
corresponding binaries (like MiniBrowser, jsc) within the Flatpak SDK.

Unzipped builds will be saved in /tmp and can be reused in further runs (by providing the
path with the -p argument).

Example:
$ webkit-flatpak-run-nightly --wpe MiniBrowser https://webkit.org
<SDK installs to ~/.cache/wk-nightly>
Downloading build release_r262699_b33885.zip from https://wpewebkit-release.igalia.com/built-products/
Extracting build to /tmp/wpewebkit-release-b33885
<MiniBrowser starts>

$ webkit-flatpak-run-nightly --wpe -p /tmp/wpewebkit-release-b33885 jsc
Looking for updates…
Nothing to do.

2+2

4

  • Scripts/webkit-flatpak-run-nightly: Added.
8:52 AM Changeset in webkit [262716] by svillar@igalia.com
  • 9 edits
    6 deletes in trunk

[css-flexbox] align-content should apply even when there's just a single line
https://bugs.webkit.org/show_bug.cgi?id=209871

Reviewed by Manuel Rego Casasnovas.

LayoutTests/imported/w3c:

Mark as PASSing 15 subtests that are now working as expected.

  • web-platform-tests/css/css-flexbox/align-content-wrap-001-expected.txt: Remove FAIL results.
  • web-platform-tests/css/css-flexbox/align-content-wrap-002-expected.txt: Ditto.
  • web-platform-tests/css/css-flexbox/align-content-wrap-003-expected.txt: Ditto.

Source/WebCore:

The 'align-content' property should have no effect on single line flex containers according to
the specs https://drafts.csswg.org/css-flexbox/#propdef-align-content. The current code was not
differentiating between single-line containers and multi-line containers with just 1 line.

Also in order not to introduce regressions and properly support replaced elements as flex items
we replaced the computation of child's width for 'flex-direction:column' by a direct call to
computeLogicalWidthForFragment() which already properly handles all the cases. It used to be
just the shrink-to-fit computation but that was not enough for replaced elements for example or
elements with min/max-size restrictions.

Several align-content-wrap-* subtests are working now. Updated expectations.

  • rendering/RenderFlexibleBox.cpp:

(WebCore::initialAlignContentOffset): Removed check for #lines <= 1, as it is incorrect because it
is true for multi-line containers with just 1 line.
(WebCore::RenderFlexibleBox::alignFlexLines): Use isMultiline() instead of "#lines == 1".
(WebCore::RenderFlexibleBox::childIntrinsicLogicalWidth const): Replace shrink-to-fit computation
by a call computeLogicalWidthForFragment().
(WebCore::RenderFlexibleBox::repositionLogicalHeightDependentFlexItems): Use the whole crossAxisExtent
for single line containers. Moved from alignFlexLines() as it fits much better here.

LayoutTests:

  • TestExpectations:
  • css3/flexbox/alignContent-applies-with-flexWrap-wrap-with-single-line-expected.txt: Removed.
  • css3/flexbox/alignContent-applies-with-flexWrap-wrap-with-single-line.html: Replaced by

WPT's align-content-wrap-001.html.

  • css3/flexbox/flexbox-wordwrap-expected.txt: Removed.
  • css3/flexbox/flexbox-wordwrap.html: Replaced by WPT's align-content-wrap-002.html.
  • css3/flexbox/multiline-align-content-expected.txt: Removed.
  • css3/flexbox/multiline-align-content.html: Replaced by WPT's align-content-wrap-003.html.
  • platform/ios/fast/forms/auto-fill-button/input-strong-password-auto-fill-button-expected.txt:

Updated expectations.

8:34 AM Changeset in webkit [262715] by aestes@apple.com
  • 4 edits in trunk/Source

[Apple Pay] Remove -respondsToSelector: check before calling -[PKPaymentRequest setBoundInterfaceIdentifier:]
https://bugs.webkit.org/show_bug.cgi?id=212884
<rdar://problem/64090963>

Reviewed by Youenn Fablet.

Source/WebKit:

  • Shared/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:

(WebKit::WebPaymentCoordinatorProxy::platformPaymentRequest): Relied on the definition of
HAVE_PASSKIT_BOUND_INTERFACE_IDENTIFIER to ensure that PKPaymentRequest will respond to
-setBoundInterfaceIdentifier:.

Source/WTF:

  • wtf/PlatformHave.h: On macOS, HAVE_PASSKIT_BOUND_INTERFACE_IDENTIFIER should be defined

starting in Catalina.

8:32 AM Changeset in webkit [262714] by aestes@apple.com
  • 37 edits in trunk/Source

[Apple Pay] Remove ENABLE_APPLE_PAY_SETUP, ENABLE_APPLE_PAY_SESSION_V7, and HAVE_PASSKIT_PAYMENT_SETUP
https://bugs.webkit.org/show_bug.cgi?id=212883
<rdar://problem/64090763>

Reviewed by Youenn Fablet.

These macros evaluate to true whenever ENABLE(APPLE_PAY) is true on platforms supported by
trunk WebKit, so we can either remove them or replace them with ENABLE(APPLE_PAY).

Source/WebCore:

  • Modules/applepay/ApplePaySetup.cpp:
  • Modules/applepay/ApplePaySetup.idl:
  • Modules/applepay/ApplePaySetupConfiguration.h:
  • Modules/applepay/ApplePaySetupConfiguration.idl:
  • Modules/applepay/ApplePaySetupFeature.idl:
  • Modules/applepay/ApplePaySetupFeature.mm:
  • Modules/applepay/ApplePaySetupFeatureState.h:
  • Modules/applepay/ApplePaySetupFeatureState.idl:
  • Modules/applepay/ApplePaySetupFeatureType.idl:
  • Modules/applepay/ApplePaySetupFeatureTypeWebCore.h:
  • Modules/applepay/ApplePaySetupFeatureWebCore.h:
  • Modules/applepay/ApplePaySetupWebCore.h:
  • Modules/applepay/PaymentCoordinator.cpp:
  • Modules/applepay/PaymentCoordinator.h:
  • Modules/applepay/PaymentCoordinatorClient.cpp:

(WebCore::PaymentCoordinatorClient::supportsVersion):

  • Modules/applepay/PaymentCoordinatorClient.h:

(WebCore::PaymentCoordinatorClient::endApplePaySetup):

  • testing/MockApplePaySetupFeature.cpp:
  • testing/MockApplePaySetupFeature.h:
  • testing/MockPaymentCoordinator.cpp:
  • testing/MockPaymentCoordinator.h:
  • testing/MockPaymentCoordinator.idl:

Source/WebCore/PAL:

  • pal/spi/cocoa/PassKitSPI.h:

Source/WebKit:

  • Shared/ApplePay/ApplePayPaymentSetupFeatures.mm:
  • Shared/ApplePay/ApplePayPaymentSetupFeaturesWebKit.h:
  • Shared/ApplePay/PaymentSetupConfiguration.mm:
  • Shared/ApplePay/PaymentSetupConfigurationWebKit.h:
  • Shared/ApplePay/WebPaymentCoordinatorProxy.h:
  • Shared/ApplePay/WebPaymentCoordinatorProxy.messages.in:
  • Shared/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:
  • WebProcess/ApplePay/WebPaymentCoordinator.cpp:
  • WebProcess/ApplePay/WebPaymentCoordinator.h:

Source/WTF:

  • wtf/PlatformEnableCocoa.h:
  • wtf/PlatformHave.h:
7:52 AM Changeset in webkit [262713] by Diego Pino Garcia
  • 2 edits
    1 copy
    2 deletes in trunk/LayoutTests

[WPE] Gardening, update test expectations after r262708
https://bugs.webkit.org/show_bug.cgi?id=212901

Unreviewed gardening.

  • Moved common baseline to glib.
  • Removed redudant WPE baseline.
  • Added flaky failure to test expectations.
  • platform/glib/imported/w3c/web-platform-tests/encoding/single-byte-decoder-expected.txt: Renamed from LayoutTests/platform/gtk/imported/w3c/web-platform-tests/encoding/single-byte-decoder-expected.txt.
  • platform/wpe/TestExpectations:
  • platform/wpe/imported/w3c/web-platform-tests/html/semantics/selectors/pseudo-classes/inrange-outofrange-expected.txt: Removed.
7:40 AM Changeset in webkit [262712] by Jason_Lawrence
  • 2 edits in trunk/LayoutTests

(r261056) [ Mac WK2 ] fast/scrolling/mac/scrollbars/overlay-scrollbar-reveal.html is a flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=212042

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
7:24 AM Changeset in webkit [262711] by Antti Koivisto
  • 3 edits
    2 adds in trunk

Pseudo-elements (::after) in shadow roots don't animate
https://bugs.webkit.org/show_bug.cgi?id=173027
<rdar://problem/42842994>

Reviewed by Antoine Quint.

Source/WebCore:

Test: animations/keyframe-pseudo-shadow.html

  • animation/AnimationTimeline.cpp:

(WebCore::shouldConsiderAnimation):

We should use the actual element instead of the PseudoElement when calling Style::Scope::forOrdinal.
The keyframe code that computes the style already does this correctly.

LayoutTests:

  • animations/keyframe-pseudo-shadow-expected.html: Added.
  • animations/keyframe-pseudo-shadow.html: Added.
7:00 AM Changeset in webkit [262710] by youenn@apple.com
  • 10 edits
    1 copy
    3 adds in trunk

Source/WebCore:
Use one audio unit for all tracks of a given process
https://bugs.webkit.org/show_bug.cgi?id=212406

Reviewed by Eric Carlson.

Before the patch, we were creating one audio unit per track to render.
This is potentially inefficient as this requires to IPC on iOS each audio data.
Instead, we could have one single remote unit that will receive the mixed content of all tracks.
For that purpose, introduce AudioMediaStreamTrackRendererUnit as a singleton.

AudioMediaStreamTrackRendererCocoa will just register/unregister sources to AudioMediaStreamTrackRendererUnit.
AudioMediaStreamTrackRendererUnit will then start/stop as needed and do the mixing.

This requires a change in AudioSampleDataSource to support mixing in case track volumes are different.
If we have to mix and with different volumes, we first pull the samples in a scratch buffer, apply volume and then mix it with the other tracks.

In the future, we might also do the audio rendering with the CoreAudioSharedUnit directly so as to improve as much as possible echo cancellation.

Interruption is handled by the fact that all tracks should stop playing, thus stop their renderer, thus unregister themselves from the renderer unit.
it might be more future proof to add the unit as an interruption observer as a follow-up.

Manually tested plus LayoutTests/webrtc/multi-audio.html

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

(WebCore::mixBuffers):
(WebCore::AudioSampleBufferList::mixFrom):

  • platform/audio/mac/AudioSampleBufferList.h:
  • platform/audio/mac/AudioSampleDataSource.mm:

(WebCore::AudioSampleDataSource::pullSamplesInternal):

  • platform/mediastream/mac/AudioMediaStreamTrackRendererCocoa.cpp:

(WebCore::AudioMediaStreamTrackRendererCocoa::start):
(WebCore::AudioMediaStreamTrackRendererCocoa::stop):
(WebCore::AudioMediaStreamTrackRendererCocoa::clear):
(WebCore::AudioMediaStreamTrackRendererCocoa::setVolume):
(WebCore::AudioMediaStreamTrackRendererCocoa::pushSamples):
(WebCore::AudioMediaStreamTrackRendererCocoa::createAudioUnit): Deleted.
(WebCore::AudioMediaStreamTrackRendererCocoa::render): Deleted.
(WebCore::AudioMediaStreamTrackRendererCocoa::inputProc): Deleted.

  • platform/mediastream/mac/AudioMediaStreamTrackRendererCocoa.h:

(): Deleted.

  • platform/mediastream/mac/AudioMediaStreamTrackRendererUnit.cpp: Added.

(WebCore::AudioMediaStreamTrackRendererUnit::singleton):
(WebCore::AudioMediaStreamTrackRendererUnit::~AudioMediaStreamTrackRendererUnit):
(WebCore::AudioMediaStreamTrackRendererUnit::addSource):
(WebCore::AudioMediaStreamTrackRendererUnit::removeSource):
(WebCore::AudioMediaStreamTrackRendererUnit::createAudioUnitIfNeeded):
(WebCore::AudioMediaStreamTrackRendererUnit::start):
(WebCore::AudioMediaStreamTrackRendererUnit::stop):
(WebCore::AudioMediaStreamTrackRendererUnit::formatDescription):
(WebCore::AudioMediaStreamTrackRendererUnit::createAudioUnit):
(WebCore::AudioMediaStreamTrackRendererUnit::render):
(WebCore::AudioMediaStreamTrackRendererUnit::inputProc):

  • platform/mediastream/mac/AudioMediaStreamTrackRendererUnit.h: Copied from Source/WebCore/platform/mediastream/mac/AudioMediaStreamTrackRendererCocoa.h.

LayoutTests:
Use one audio unit for all MediaStreamTracks of a given process
https://bugs.webkit.org/show_bug.cgi?id=212406

Reviewed by Eric Carlson.

  • webrtc/multi-audio-expected.txt: Added.
  • webrtc/multi-audio.html: Added.
5:58 AM Changeset in webkit [262709] by Diego Pino Garcia
  • 3 edits in trunk/Tools

[webkitpy] Make 'webkit-path rebaseline' to not update expectations file by default
https://bugs.webkit.org/show_bug.cgi?id=212835

Reviewed by Carlos Alberto Lopez Perez.

webkit-patch rebaseline let us add or update a test baseline
from a test bot. By default, the command also updates the
corresponding expectations file. This update is actually a brand-new
generation of an expectations file based on the results of the bot,
which in most cases messes up the current contents of the file.

This patch makes the default to not update the expectations file and
adds a new option '--update-expectations' to explicitly request an
update.

  • Scripts/webkitpy/tool/commands/rebaseline.py:

(AbstractRebaseliningCommand):
(RebaselineTest.init):
(RebaselineTest._rebaseline_tests):
(RebaselineTest.execute):
(AbstractParallelRebaselineCommand._rebaseline_commands):
(RebaselineExpectations.init):
(RebaselineExpectations.execute):
(Rebaseline.init):
(RebaselineTest._rebaseline_test_and_update_expectations): Deleted.

  • Scripts/webkitpy/tool/commands/rebaseline_unittest.py:

(TestRebaselineTest.setUp):

4:49 AM Changeset in webkit [262708] by youenn@apple.com
  • 33 edits
    1 copy
    7 adds in trunk

[Cocoa] Use AVAssetWriterDelegate to implement MediaRecorder
https://bugs.webkit.org/show_bug.cgi?id=206582
Source/WebCore:

<rdar://problem/58985368>

Reviewed by Eric Carlson.

AVAssetWriterDelegate allows to grab recorded data whenever wanted.
This delegate requires passing compressed samples to AVAssetWriter.
Implement video encoding and audio encoding in dedicated classes and use these classes before adding buffers to AVAssetWriter.
These classes are AudioSampleBufferCompressor and VideoSampleBufferCompressor.
They support AAC and H264 so far and should be further improved to support more encoding options.

Instantiate real writer only for platforms supporting AVAssetWriterDelegate, since it is not supported everywhere.
The writer, doing the pacakging, is receiving compressed buffer from the audio/video compressors.
It then sends data when being request to flush to its delegate, which will send data to the MediaRecorderPrivateWriter.
The MediaRecorderPrivateWriter stores the data in a SharedBuffer until MediaRecorder asks for data.

Note that, whenever we request data, we flush the writer and insert an end of video sample to make sure video data gets flushed.
Therefore data should not be requested too fast to get adequate video compression.

Covered by existing tests.

  • Modules/mediarecorder/MediaRecorderProvider.cpp:

(WebCore::MediaRecorderProvider::createMediaRecorderPrivate):

  • WebCore.xcodeproj/project.pbxproj:
  • platform/mediarecorder/MediaRecorderPrivateAVFImpl.cpp:

(WebCore::MediaRecorderPrivateAVFImpl::create):

  • platform/mediarecorder/MediaRecorderPrivateAVFImpl.h:
  • platform/mediarecorder/cocoa/AudioSampleBufferCompressor.h: Added.
  • platform/mediarecorder/cocoa/AudioSampleBufferCompressor.mm: Added.

(WebCore::AudioSampleBufferCompressor::create):
(WebCore::AudioSampleBufferCompressor::AudioSampleBufferCompressor):
(WebCore::AudioSampleBufferCompressor::~AudioSampleBufferCompressor):
(WebCore::AudioSampleBufferCompressor::initialize):
(WebCore::AudioSampleBufferCompressor::finish):
(WebCore::AudioSampleBufferCompressor::initAudioConverterForSourceFormatDescription):
(WebCore::AudioSampleBufferCompressor::computeBufferSizeForAudioFormat):
(WebCore::AudioSampleBufferCompressor::attachPrimingTrimsIfNeeded):
(WebCore::AudioSampleBufferCompressor::gradualDecoderRefreshCount):
(WebCore::AudioSampleBufferCompressor::sampleBufferWithNumPackets):
(WebCore::AudioSampleBufferCompressor::audioConverterComplexInputDataProc):
(WebCore::AudioSampleBufferCompressor::provideSourceDataNumOutputPackets):
(WebCore::AudioSampleBufferCompressor::processSampleBuffersUntilLowWaterTime):
(WebCore::AudioSampleBufferCompressor::processSampleBuffer):
(WebCore::AudioSampleBufferCompressor::addSampleBuffer):
(WebCore::AudioSampleBufferCompressor::getOutputSampleBuffer):
(WebCore::AudioSampleBufferCompressor::takeOutputSampleBuffer):

  • platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.h:
  • platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.mm:

(-[WebAVAssetWriterDelegate initWithWriter:]):
(-[WebAVAssetWriterDelegate assetWriter:didProduceFragmentedHeaderData:]):
(-[WebAVAssetWriterDelegate assetWriter:didProduceFragmentedMediaData:fragmentedMediaDataReport:]):
(-[WebAVAssetWriterDelegate close]):
(WebCore::MediaRecorderPrivateWriter::create):
(WebCore::MediaRecorderPrivateWriter::compressedVideoOutputBufferCallback):
(WebCore::MediaRecorderPrivateWriter::compressedAudioOutputBufferCallback):
(WebCore::MediaRecorderPrivateWriter::MediaRecorderPrivateWriter):
(WebCore::MediaRecorderPrivateWriter::~MediaRecorderPrivateWriter):
(WebCore::MediaRecorderPrivateWriter::initialize):
(WebCore::MediaRecorderPrivateWriter::processNewCompressedVideoSampleBuffers):
(WebCore::MediaRecorderPrivateWriter::processNewCompressedAudioSampleBuffers):
(WebCore::MediaRecorderPrivateWriter::startAssetWriter):
(WebCore::MediaRecorderPrivateWriter::appendCompressedAudioSampleBuffer):
(WebCore::MediaRecorderPrivateWriter::appendCompressedVideoSampleBuffer):
(WebCore::MediaRecorderPrivateWriter::appendCompressedSampleBuffers):
(WebCore::appendEndsPreviousSampleDurationMarker):
(WebCore::MediaRecorderPrivateWriter::appendEndOfVideoSampleDurationIfNeeded):
(WebCore::MediaRecorderPrivateWriter::flushCompressedSampleBuffers):
(WebCore::MediaRecorderPrivateWriter::clear):
(WebCore::copySampleBufferWithCurrentTimeStamp):
(WebCore::MediaRecorderPrivateWriter::appendVideoSampleBuffer):
(WebCore::createAudioFormatDescription):
(WebCore::createAudioSampleBuffer):
(WebCore::MediaRecorderPrivateWriter::appendAudioSampleBuffer):
(WebCore::MediaRecorderPrivateWriter::stopRecording):
(WebCore::MediaRecorderPrivateWriter::appendData):

  • platform/mediarecorder/cocoa/VideoSampleBufferCompressor.h: Copied from Source/WebCore/platform/mediarecorder/MediaRecorderPrivateAVFImpl.h.
  • platform/mediarecorder/cocoa/VideoSampleBufferCompressor.mm: Added.

(WebCore::VideoSampleBufferCompressor::create):
(WebCore::VideoSampleBufferCompressor::VideoSampleBufferCompressor):
(WebCore::VideoSampleBufferCompressor::~VideoSampleBufferCompressor):
(WebCore::VideoSampleBufferCompressor::initialize):
(WebCore::VideoSampleBufferCompressor::finish):
(WebCore::VideoSampleBufferCompressor::videoCompressionCallback):
(WebCore::VideoSampleBufferCompressor::initCompressionSession):
(WebCore::VideoSampleBufferCompressor::processSampleBuffer):
(WebCore::VideoSampleBufferCompressor::addSampleBuffer):
(WebCore::VideoSampleBufferCompressor::getOutputSampleBuffer):
(WebCore::VideoSampleBufferCompressor::takeOutputSampleBuffer):

Source/WebCore/PAL:

<rdar://problem/58985368>

Reviewed by Eric Carlson.

Add soft link macros for VideoToolbox and AudioToolbox.

  • PAL.xcodeproj/project.pbxproj:
  • pal/cf/AudioToolboxSoftLink.cpp: Added.
  • pal/cf/AudioToolboxSoftLink.h: Added.
  • pal/cf/CoreMediaSoftLink.cpp:
  • pal/cf/CoreMediaSoftLink.h:
  • pal/cf/VideoToolboxSoftLink.cpp: Added.
  • pal/cf/VideoToolboxSoftLink.h: Added.

Source/WebKit:

<rdar://problem/58985368>

Reviewed by Eric Carlson.

Enable RemoteMediaRecorder only for systems supporting AVAssetWriterDelegate.

  • GPUProcess/GPUConnectionToWebProcess.cpp:

(WebKit::GPUConnectionToWebProcess::didReceiveMessage):

  • GPUProcess/GPUConnectionToWebProcess.h:
  • GPUProcess/webrtc/RemoteMediaRecorder.cpp:
  • GPUProcess/webrtc/RemoteMediaRecorder.h:
  • GPUProcess/webrtc/RemoteMediaRecorder.messages.in:
  • GPUProcess/webrtc/RemoteMediaRecorderManager.cpp:
  • GPUProcess/webrtc/RemoteMediaRecorderManager.h:
  • GPUProcess/webrtc/RemoteMediaRecorderManager.messages.in:
  • GPUProcess/webrtc/RemoteSampleBufferDisplayLayerManager.h:
  • WebProcess/GPU/webrtc/MediaRecorderPrivate.cpp:
  • WebProcess/GPU/webrtc/MediaRecorderPrivate.h:
  • WebProcess/GPU/webrtc/MediaRecorderProvider.cpp:

(WebKit::MediaRecorderProvider::createMediaRecorderPrivate):

Source/WTF:

Reviewed by Eric Carlson.

  • wtf/PlatformHave.h:

LayoutTests:

Reviewed by Eric Carlson.

Disable tests on all platforms except the ones supporting AVAssetWriterDelegate.

  • TestExpectations:
  • http/wpt/mediarecorder/MediaRecorder-AV-audio-video-dataavailable-gpuprocess.html:

Remove web audio generation since there seems to be some unstability in web audio -> stream -> media recorder.
which should be fixed as follow-up specific patches.

  • platform/mac/TestExpectations:

Enable running tests.

4:33 AM Changeset in webkit [262707] by youenn@apple.com
  • 5 edits
    1 add in trunk

File URLs with hostnames are misleading
https://bugs.webkit.org/show_bug.cgi?id=212739
<rdar://problem/63754917>

Reviewed by Alex Christensen.

Source/WebCore:

Showing a file URL like file://example.org/test is misleading to users.
To prevent this, we just do a redirection to the same file URL with an empty host.
Remove the port at the same time.
Covered by added API test.

  • loader/DocumentLoader.cpp:

(WebCore::DocumentLoader::willSendRequest):

Tools:

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKit/open-window-with-file-url-with-host.html: Added.
  • TestWebKitAPI/Tests/WebKitCocoa/OpenAndCloseWindow.mm:

(TEST):

4:10 AM Changeset in webkit [262706] by Diego Pino Garcia
  • 1 edit
    1 move
    2 deletes in trunk/LayoutTests

[WPE] Gardening, remove redundant baselines
https://bugs.webkit.org/show_bug.cgi?id=212896

Unreviewed gardening.

  • platform/glib/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-multikey-sequential.https-expected.txt: Renamed from LayoutTests/platform/gtk/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-multikey-sequential.https-expected.txt.
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-clear-encrypted.https-expected.txt: Removed.
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-multikey-sequential.https-expected.txt: Removed.
2:19 AM Changeset in webkit [262705] by Diego Pino Garcia
  • 2 edits in trunk/LayoutTests

[GTK] Gardening, update test expectations after r262703
https://bugs.webkit.org/show_bug.cgi?id=212895

Unreviewed gardening.

Garden several flaky failures.

  • platform/gtk/TestExpectations:
2:04 AM Changeset in webkit [262704] by commit-queue@webkit.org
  • 5 edits in trunk/Source/WebCore

Simplify fallback content handling in FrameLoader
https://bugs.webkit.org/show_bug.cgi?id=212880

Patch by Rob Buis <rbuis@igalia.com> on 2020-06-08
Reviewed by Youenn Fablet.

Simplify fallback content handling in FrameLoader, this can be inlined
and some HTMLObjectElement checks can be combined.

  • loader/DocumentLoader.cpp:

(WebCore::DocumentLoader::continueAfterContentPolicy):

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::receivedMainResourceError):
(WebCore::FrameLoader::handleFallbackContent): Deleted.
(WebCore::FrameLoader::isHostedByObjectElement const): Deleted.

  • loader/FrameLoader.h:
  • loader/HistoryController.cpp:

(WebCore::FrameLoader::HistoryController::createItemTree):

Note: See TracTimeline for information about the timeline view.