⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Timeline



Jul 20, 2020:

10:16 PM Changeset in webkit [264643] by mark.lam@apple.com
  • 4 edits in trunk/Source/JavaScriptCore

TryGetById clobberize rules are wrong.
https://bugs.webkit.org/show_bug.cgi?id=163834
<rdar://problem/65625807>

Reviewed by Keith Miller.

Theoretically, TryGetById can do the same things GetById does i.e. reify lazy
properties, read the stack, etc. Hence, its clobberize rule should be clobberTop
just like GetById. However, in practice, we don't currently use @tryGetById to
access anything on the stack (and probably never will). But as a conservative
measure, we'll just treat TryGetById like it can. In clobberize terms, this
means we declare TryGetById as doing read(World) (just like GetById) instead of
read(Heap).

  • dfg/DFGAbstractInterpreterInlines.h:

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

  • dfg/DFGClobberize.h:

(JSC::DFG::clobberize):

  • dfg/DFGClobbersExitState.cpp:

(JSC::DFG::clobbersExitState):

5:53 PM Changeset in webkit [264642] by commit-queue@webkit.org
  • 3 edits
    3 adds in trunk

Revert r262776 for existing apps using UIWebView/WebView
https://bugs.webkit.org/show_bug.cgi?id=214528
<rdar://problem/65468982>

Patch by Alex Christensen <achristensen@webkit.org> on 2020-07-20
Reviewed by Tim Horton.

Source/WebCore:

r262776 removed Content-Type: application/x-www-form-urlencoded from POST requests with unspecified content type.
This matches the behavior of Chrome, Firefox, and WKWebView and is a change we want to make.
This doesn't match behavior of iOS 13 UIWebView, though, and given its state of being supported for compatibility until removed,
we are going to keep it behaving as it always has.

Updated WK1 test expectations.

  • platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm:

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

LayoutTests:

  • platform/mac-wk1/http/tests/xmlhttprequest/post-blob-content-type-async-expected.txt: Added.
  • platform/mac-wk1/http/tests/xmlhttprequest/post-blob-content-type-sync-expected.txt: Added.
  • platform/mac-wk1/imported/w3c/web-platform-tests/xhr/send-blob-with-no-mime-type-expected.txt: Added.
5:33 PM Changeset in webkit [264641] by Adrian Perez de Castro
  • 2 edits in trunk

[CMake] Do not use ${DEVELOPER_MODE} directly, as it may be undefined

Unreviewed build fix.

Instead of using ${DEVELOPER_MODE} directly, which might be undefined an cause errors, set
first ENABLE_DEVELOPER_MODE based on its value with SET_AND_EXPOSE_TO_BUILD(), and then use
the ${ENABLE_DEVELOPER_MODE} expansion in the rest of the file.

  • Source/cmake/OptionsWPE.cmake:
5:11 PM Changeset in webkit [264640] by ysuzuki@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed, fix duplicate forward declaration introduced by merge conflict
https://bugs.webkit.org/show_bug.cgi?id=209779

  • runtime/IntlRelativeTimeFormat.h:
5:04 PM Changeset in webkit [264639] by ysuzuki@apple.com
  • 23 edits
    1 copy
    7 adds in trunk

[ECMA-402] Implement Intl.DisplayNames
https://bugs.webkit.org/show_bug.cgi?id=209779

Reviewed by Ross Kirsling.

JSTests:

  • stress/intl-displaynames.js: Added.

(shouldBe):
(shouldThrow):
(vm.icuVersion):

  • stress/intl-parse-unicode-subtags.js: Added.

(shouldBe):
(shouldThrow):
(vm.icuVersion):

  • test262/config.yaml:

Source/JavaScriptCore:

This patch implements Intl.DisplayNames behind useIntlDisplayNames=1 flag.
Intl.DisplayNames can offer readable "display-name" for ICU language, script, region, currency codes.
For example, it can offer "United States" string for "US" region code.
We use ICU ULocaleDisplayNames to implement it, except for currency since ULocaleDisplayNames is not supporting
currency correctly: it ignores "long", "short", and "narrow" style configurations. We need to call ucurr_getName
directly.

This patch appropriately adds unicode-language-id parsing in IntlLocale.cpp so that we can validate language id
when it is passed to Intl.DisplayNames#of as defined in the spec.

  • CMakeLists.txt:
  • DerivedSources-input.xcfilelist:
  • DerivedSources-output.xcfilelist:
  • DerivedSources.make:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • Sources.txt:
  • runtime/CommonIdentifiers.h:
  • runtime/IntlDisplayNames.cpp: Added.

(JSC::IntlDisplayNames::create):
(JSC::IntlDisplayNames::createStructure):
(JSC::IntlDisplayNames::IntlDisplayNames):
(JSC::IntlDisplayNames::finishCreation):
(JSC::IntlDisplayNames::initializeDisplayNames):
(JSC::IntlDisplayNames::of const):
(JSC::IntlDisplayNames::resolvedOptions const):
(JSC::IntlDisplayNames::styleString):
(JSC::IntlDisplayNames::typeString):
(JSC::IntlDisplayNames::fallbackString):

  • runtime/IntlDisplayNames.h: Copied from Source/JavaScriptCore/runtime/IntlRelativeTimeFormat.h.
  • runtime/IntlDisplayNamesConstructor.cpp: Added.

(JSC::IntlDisplayNamesConstructor::create):
(JSC::IntlDisplayNamesConstructor::createStructure):
(JSC::IntlDisplayNamesConstructor::IntlDisplayNamesConstructor):
(JSC::IntlDisplayNamesConstructor::finishCreation):
(JSC::constructIntlDisplayNames):
(JSC::callIntlDisplayNames):
(JSC::IntlDisplayNamesConstructorSupportedLocalesOf):

  • runtime/IntlDisplayNamesConstructor.h: Added.
  • runtime/IntlDisplayNamesPrototype.cpp: Added.

(JSC::IntlDisplayNamesPrototype::create):
(JSC::IntlDisplayNamesPrototype::createStructure):
(JSC::IntlDisplayNamesPrototype::IntlDisplayNamesPrototype):
(JSC::IntlDisplayNamesPrototype::finishCreation):
(JSC::IntlDisplayNamesPrototypeFuncOf):
(JSC::IntlDisplayNamesPrototypeFuncResolvedOptions):

  • runtime/IntlDisplayNamesPrototype.h: Added.
  • runtime/IntlLocale.cpp:

(JSC::isUnicodeLanguageSubtag): Deleted.
(JSC::isUnicodeScriptSubtag): Deleted.
(JSC::isUnicodeRegionSubtag): Deleted.

  • runtime/IntlNumberFormat.cpp:

(JSC::IntlNumberFormat::initializeNumberFormat):

  • runtime/IntlObject.cpp:

(JSC::createDisplayNamesConstructor):
(JSC::IntlObject::finishCreation):
(JSC::isUnicodeLanguageSubtag):
(JSC::isUnicodeScriptSubtag):
(JSC::isUnicodeRegionSubtag):
(JSC::isUnicodeVariantSubtag):
(JSC::isUnicodeLanguageId):
(JSC::isWellFormedCurrencyCode):

  • runtime/IntlObject.h:

(JSC::intlDisplayNamesAvailableLocales):

  • runtime/IntlRelativeTimeFormat.h:
  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::init):
(JSC::JSGlobalObject::visitChildren):

  • runtime/JSGlobalObject.h:

(JSC::JSGlobalObject::displayNamesStructure):

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

(JSC::VM::VM):

  • runtime/VM.h:

Source/WTF:

  • wtf/text/StringView.h:
4:54 PM Changeset in webkit [264638] by Peng Liu
  • 4 edits in trunk/Source/WebCore

An airplaying video can enter picture-in-picture
https://bugs.webkit.org/show_bug.cgi?id=214556

Reviewed by Eric Carlson.

WebAVPlayerController replaces the AVPlayerController used by AVKit. Its property
"pictureInPicturePossible" will always be YES after VideoFullscreenInterfaceAVKit::doSetup()
sets it, even after the video enters picture-in-picture.

This patch fixes the issue by checking whether the video is airplaying (isExternalPlaybackActive)
in -[WebAVPlayerController isPictureInPicturePossible].

AVPlayerController has the logic to change the property "pictureInPicturePossible" to NO
after a video enters picture-in-picture, but we cannot use AVPlayerController's value of
"pictureInPicturePossible" as the property value of WebAVPlayerController. Because the value of
"-[AVPlayerController isPictureInPicturePossible]" depends on the value of
"[[AVAudioSession sharedInstance] isPiPAvailable]", which is always NO in the UI process.
(AVAudioSession related code is in the web process).

  • platform/ios/VideoFullscreenInterfaceAVKit.mm:

(VideoFullscreenInterfaceAVKit::doSetup):

  • platform/ios/WebAVPlayerController.h:
  • platform/ios/WebAVPlayerController.mm:

(-[WebAVPlayerController setAllowsPictureInPicture:]):
(-[WebAVPlayerController isPictureInPicturePossible]):

4:48 PM Changeset in webkit [264637] by Megan Gardner
  • 5 edits in trunk/Source

Add OK button to Date/Time form controls.
https://bugs.webkit.org/show_bug.cgi?id=214195
Source/WebCore:

Reviewed by Darin Adler.

  • en.lproj/Localizable.strings:

Source/WebKit:

<rdar://problem/65006000>

Reviewed by Darin Adler.

Add 'OK' button to add clarity to UI, and increase the default size of the control to
ensure space for both buttons. Also fixed a crash that happened when closing the control before
the animation completed.

  • UIProcess/ios/forms/WKDateTimeInputControl.mm:

(-[WKDateTimeContextMenuViewController preferredContentSize]):
(-[WKDateTimePicker contextMenuInteraction:configurationForMenuAtLocation:]):
(-[WKDateTimePicker contextMenuInteraction:willDisplayMenuForConfiguration:animator:]):
(-[WKDateTimePicker contextMenuInteraction:willEndForConfiguration:animator:]):
(-[WKDateTimePicker ok:]):

4:43 PM Changeset in webkit [264636] by Alan Coon
  • 8 edits in trunk/Source

Versioning.

WebKit-610.1.24

4:36 PM Changeset in webkit [264635] by ggaren@apple.com
  • 8 edits in trunk/Source

REGRESSION (r264242): [ macOS ] imported/w3c/web-platform-tests/wasm/jsapi/constructor/instantiate.any.html is a flaky crash
https://bugs.webkit.org/show_bug.cgi?id=214572

Unreviewed, reverting r264242.

Source/JavaScriptCore:

  • runtime/JSRunLoopTimer.cpp:

(JSC::epochTime):
(JSC::JSRunLoopTimer::Manager::timerDidFireCallback):
(JSC::JSRunLoopTimer::Manager::PerVMData::setRunLoop):
(JSC::JSRunLoopTimer::Manager::PerVMData::PerVMData):
(JSC::JSRunLoopTimer::Manager::PerVMData::~PerVMData):
(JSC::JSRunLoopTimer::Manager::timerDidFire):
(JSC::JSRunLoopTimer::Manager::registerVM):
(JSC::JSRunLoopTimer::Manager::scheduleTimer):
(JSC::JSRunLoopTimer::Manager::cancelTimer):
(JSC::JSRunLoopTimer::Manager::didChangeRunLoop):

  • runtime/JSRunLoopTimer.h:

(JSC::JSRunLoopTimer::Manager::PerVMData::PerVMData):

  • runtime/PromiseTimer.cpp:

(JSC::PromiseTimer::doWork):
(JSC::PromiseTimer::runRunLoop):

  • runtime/VM.cpp:

(JSC::VM::VM):
(JSC::VM::create):
(JSC::VM::tryCreate):
(JSC::VM::setRunLoop):

  • runtime/VM.h:

(JSC::VM::runLoop const):

Source/WebCore:

  • bindings/js/CommonVM.cpp:

(WebCore::commonVMSlow):

4:32 PM Changeset in webkit [264634] by keith_miller@apple.com
  • 5 edits in trunk/LayoutTests

Reduce number of iterations for weakref tests
https://bugs.webkit.org/show_bug.cgi?id=214567

Reviewed by Mark Lam.

These tests seem to time out on the watch series 3 simulator. Let's reduce the number of
iterations and see if it impacts the flakiness of the test.

  • js/script-tests/weakref-async-is-collected.js:

(turnEventLoop):

  • js/script-tests/weakref-eventually-collects-values.js:

(turnEventLoop):

  • js/script-tests/weakref-microtasks-dont-collect.js:

(turnEventLoop):

  • js/script-tests/weakref-weakset-consistency.js:

(turnEventLoop):

4:28 PM Changeset in webkit [264633] by Ross Kirsling
  • 4 edits in trunk

[JSC] eval?.() should be indirect eval
https://bugs.webkit.org/show_bug.cgi?id=214568

Reviewed by Keith Miller.

JSTests:

  • test262/expectations.yaml:

Mark two test cases as passing.

Source/JavaScriptCore:

eval?.() is specified as indirect eval, but (virtually) all implementations assumed it should be direct eval.
I raised this topic in today's TC39 meeting and we've decided to keep the spec as it is.

  • parser/ASTBuilder.h:

(JSC::ASTBuilder::makeFunctionCallNode):
Don't use EvalFunctionCallNode for optional call of eval.

4:27 PM Changeset in webkit [264632] by Alan Coon
  • 8 edits in branches/safari-610.1.23-branch/Source

Versioning.

WebKit-610.1.23

4:24 PM Changeset in webkit [264631] by keith_miller@apple.com
  • 2 edits in trunk/JSTests

Turn on FinalizationRegistry test262 tests
https://bugs.webkit.org/show_bug.cgi?id=214576

Reviewed by Ross Kirsling.

  • test262/config.yaml:
4:18 PM Changeset in webkit [264630] by Adrian Perez de Castro
  • 14 edits
    1 add in trunk/Source

Non unified build fixes, midsummer 2020 edition
https://bugs.webkit.org/show_bug.cgi?id=213616

Unreviewed build fix.

Source/JavaScriptCore:

  • b3/air/AirTmpInlines.h:

(JSC::B3::Air::TmpWidth::widths): Moved from AirTmpWidth.h

  • b3/air/AirTmpWidth.cpp: Included AirTmpInlines.h
  • b3/air/AirTmpWidth.h: TmpWidth::widths() moved out from here.
  • runtime/ExceptionFuzz.cpp: Add missing inclusion of JSCJSValueInlines.h
  • runtime/StructureIDTable.cpp: Add missing inclusions of wtf/DataLog.h

and wtf/RawPointer.h

  • runtime/VMTraps.cpp: Ditto.

Source/WebCore:

No new tests needed.

  • inspector/InspectorInstrumentationWebKit.h: Forward-declare ResourceLoader class.

Source/WebKit:

  • NetworkProcess/soup/WebSocketTaskSoup.cpp: Add missing inclusion of NetworkProcess.h

Source/WTF:

  • wtf/text/StringParsingBuffer.h: Add missing inclusion of wtf/text/StringView.h,

and removed other now-unneeded header inclusions.

4:15 PM Changeset in webkit [264629] by Alan Coon
  • 1 copy in branches/safari-610.1.23-branch

New branch.

3:57 PM Changeset in webkit [264628] by commit-queue@webkit.org
  • 2 edits in trunk/LayoutTests

[ Release Mac wk2 ] svg/animations/smil-leak-list-property-instances.svg is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=214574

Unreviewed test gardening.

Patch by Hector Lopez <Hector Lopez> on 2020-07-20

  • platform/mac-wk2/TestExpectations:
3:53 PM Changeset in webkit [264627] by Wenson Hsieh
  • 10 edits
    2 adds in trunk

REGRESSION (r261874): Typing near the bottom of a scrollable document causes the scroll position to jump
https://bugs.webkit.org/show_bug.cgi?id=214426
<rdar://problem/65302701>

Reviewed by Simon Fraser.

Source/WebCore:

After the changes in r261874, any content size changes that trigger FrameView::adjustViewSize cause the scroll
position to be clamped to its minimum and maximum limits after the next layout pass. In the context of edit
commands, this means that the scroll position may jump erratically, since many edit commands can temporarily
leave the DOM in a state where the content size is unstable.

For example, in the test case below, deleting the only character in a div element on its own line first involves
emptying the text node underneath the div (causing it to have no height), before inserting a BR element in its
place (which restores a nonzero height). After the text node is emptied (but before we insert the BR element),
the content size of view changes due to a layout update while creating visible positions (under
VisiblePosition::canonicalPosition). If we happen to be scrolled all the way to the bottom of the main frame,
this means we'll scroll up, due to the maximum scroll position temporarily decreasing. A similar effect happens
when inserting the first character on a line, wherein the div is empty after BR element is removed but before it
is replaced with a text node.

To mitigate this, introduce a mechanism to temporarily avoid updating the scroll position, and use it when
executing edit commands. See below for more details.

Test: editing/execCommand/typing-should-not-trigger-scrolling-when-selection-is-visible.html

  • editing/CompositeEditCommand.cpp:

(WebCore::EditCommandComposition::unapply):
(WebCore::EditCommandComposition::reapply):
(WebCore::CompositeEditCommand::apply):

  • editing/Editor.cpp:

(WebCore::Editor::willApplyEditing const):
(WebCore::Editor::appliedEditing):

Add logic to specifically handle typing commands here, since we handle typing commands by adding them to the
latest "open" typing command, rather than go through the more standard codepaths in EditCommandComposition
above.

  • editing/Editor.h:
  • page/FrameView.cpp:

(WebCore::FrameView::reset):
(WebCore::FrameView::topContentDirectionDidChange):
(WebCore::FrameView::handleDeferredScrollbarsUpdate):
(WebCore::FrameView::handleDeferredPositionScrollbarLayers):

Split existing logic for handling deferred scrollbar updates and deferred calls to positionScrollbarLayers
into two separate methods, with separate boolean flags. topContentDirectionDidChange sets both of these flags
(which preserves existing behavior), while decrementProhibitsScrollingWhenChangingContentSizeCount just
requests a scrollbar update.

(WebCore::FrameView::didLayout):
(WebCore::FrameView::didFinishProhibitingScrollingWhenChangingContentSize):

After decrementing m_prohibitsScrollingWhenChangingContentSizeCount back to zero, ensure that the scroll
position ultimately remains clamped to the minimum and maximum values by either immediately calling
updateScrollbars with the current scroll position if layout and style are up to date, or by scheduling a
deferred scrollbar update if that is not the case.

(WebCore::FrameView::handleDeferredScrollbarsUpdateAfterDirectionChange): Deleted.

Rename this to just handleDeferredScrollbarsUpdate.

  • page/FrameView.h:
  • platform/ScrollView.cpp:

(WebCore::ScrollView::setContentsSize):
(WebCore::ScrollView::prohibitScrollingWhenChangingContentSizeForScope):
(WebCore::ScrollView::ProhibitScrollingWhenChangingContentSizeForScope::ProhibitScrollingWhenChangingContentSizeForScope):
(WebCore::ScrollView::ProhibitScrollingWhenChangingContentSizeForScope::~ProhibitScrollingWhenChangingContentSizeForScope):

Introduce a new token object, ProhibitScrollingWhenChangingContentSizeForScope, which increments a count on
ScrollView when created and decrements the count when destroyed. While this counter is greater than zero, we
will avoid scrolling as a result of changing content size.

  • platform/ScrollView.h:

(WebCore::ScrollView::incrementProhibitsScrollingWhenChangingContentSizeCount):
(WebCore::ScrollView::decrementProhibitsScrollingWhenChangingContentSizeCount):

LayoutTests:

Add a test to verify that the scroll position doesn't change when deleting and then reinserting the only
character on a line (i.e. div element) in a contenteditable element. This test also verifies that deleting
lines in a way that decreases the height of the document still clamps the scroll position by scrolling up.

  • editing/execCommand/typing-should-not-trigger-scrolling-when-selection-is-visible-expected.txt: Added.
  • editing/execCommand/typing-should-not-trigger-scrolling-when-selection-is-visible.html: Added.
  • platform/mac-wk1/TestExpectations:

Mark the test as failing in WebKit1 for now, which will require some additional work.

3:38 PM Changeset in webkit [264626] by aakash_jain@apple.com
  • 3 edits in trunk/Tools

[ews] Use -q while unzipping layout-test-results.zip
https://bugs.webkit.org/show_bug.cgi?id=214571

Reviewed by Jonathan Bedard.

  • BuildSlaveSupport/ews-build/steps.py:
  • BuildSlaveSupport/ews-build/steps_unittest.py:
3:34 PM Changeset in webkit [264625] by commit-queue@webkit.org
  • 2 edits in trunk/LayoutTests

[ iOS ] css3/blending/blend-mode-clip-accelerated-blending-canvas.html is passing and expectations need to be removed
https://bugs.webkit.org/show_bug.cgi?id=214570

Unreviewed test gardening.

Patch by Hector Lopez <Hector Lopez> on 2020-07-20

  • platform/ios/TestExpectations:
3:20 PM Changeset in webkit [264624] by BJ Burg
  • 2 edits in trunk/Source/WebKit

Web Inspector: developerExtrasEnabled should be respected when opening local Web Inspector
https://bugs.webkit.org/show_bug.cgi?id=214573
<rdar://problem/65848496>

Reviewed by David Kilzer.

Ensure that WKPreferences.developerExtrasEnabled is true prior to opening a Web Inspector
window. This matches the check in WebCore when deciding to show "Inspect Element" menu item.

  • UIProcess/Inspector/WebInspectorProxy.cpp:

(WebKit::WebInspectorProxy::connect):
(WebKit::WebInspectorProxy::openLocalInspectorFrontend):

3:16 PM Changeset in webkit [264623] by Adrian Perez de Castro
  • 2 edits in trunk/Source/WebKit

[WPE] WebPopupItem should always be forward declared as struct
https://bugs.webkit.org/show_bug.cgi?id=214569

Unreviewed build fix.

No new tests needed.

  • UIProcess/API/wpe/WebKitWebViewClient.h: Forward-declare WebPopupItem as a struct.
3:12 PM Changeset in webkit [264622] by commit-queue@webkit.org
  • 3 edits
    2 adds in trunk

CSS clip-path is applied to the <svg> root element in the view-box coordinates
https://bugs.webkit.org/show_bug.cgi?id=214418

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

Source/WebCore:

We need to transfer the bounding box of the SVG element renderer from the
SVG coordinates system to the CSS coordinates before calculating the clip
path. Then we need to transfer the clip path back to the SVG coordinates
before applying it to the GraphicsContext. The GraphicsContext is already
transformed by the localToPrentTransform.

Test: svg/in-html/svg-view-box-css-clip-path.html

  • rendering/svg/SVGRenderSupport.cpp:

(WebCore::SVGRenderSupport::clipContextToCSSClippingArea):

LayoutTests:

  • svg/in-html/svg-view-box-css-clip-path-expected.html: Added.
  • svg/in-html/svg-view-box-css-clip-path.html: Added.
3:01 PM Changeset in webkit [264621] by keith_miller@apple.com
  • 67 edits
    6 copies
    2 moves
    22 adds
    1 delete in trunk

[JSC] update test262 (July 2020 edition)
https://bugs.webkit.org/show_bug.cgi?id=214575

Reviewed by Ross Kirsling.

JSTests:

  • test262/expectations.yaml:
  • test262/harness/atomicsHelper.js:
  • test262/harness/testIntl.js:

(testWithIntlConstructors):

  • test262/latest-changes-summary.txt:
  • test262/test/built-ins/Array/prototype/concat/S15.4.4.4_A3_T2.js:
  • test262/test/built-ins/Array/prototype/concat/S15.4.4.4_A3_T3.js:
  • test262/test/built-ins/Atomics/exchange/nonshared-int-views.js:

(testWithTypedArrayConstructors): Deleted.

  • test262/test/built-ins/Atomics/waitAsync/bigint/negative-index-throws.js:
  • test262/test/built-ins/Atomics/waitAsync/bigint/out-of-range-index-throws.js:
  • test262/test/built-ins/Atomics/waitAsync/bigint/poisoned-object-for-timeout-throws-agent.js:

(262.agent.receiveBroadcast):
(1n.then.async agentCount):

  • test262/test/built-ins/Atomics/waitAsync/bigint/poisoned-object-for-timeout-throws.js:
  • test262/test/built-ins/Atomics/waitAsync/bigint/symbol-for-timeout-throws-agent.js:

(1n.then.async agentCount):

  • test262/test/built-ins/Atomics/waitAsync/negative-index-throws.js:
  • test262/test/built-ins/Atomics/waitAsync/null-for-timeout.js:
  • test262/test/built-ins/Atomics/waitAsync/out-of-range-index-throws.js:
  • test262/test/built-ins/Atomics/waitAsync/poisoned-object-for-timeout-throws-agent.js:

(262.agent.receiveBroadcast):
(1.then.async agentCount):

  • test262/test/built-ins/Atomics/waitAsync/poisoned-object-for-timeout-throws.js:
  • test262/test/built-ins/Atomics/waitAsync/returns-result-object-value-is-promise-resolves-to-ok.js:
  • test262/test/built-ins/Atomics/waitAsync/returns-result-object-value-is-promise-resolves-to-timed-out.js:
  • test262/test/built-ins/Atomics/waitAsync/returns-result-object-value-is-string-not-equal.js:
  • test262/test/built-ins/Atomics/waitAsync/returns-result-object-value-is-string-timed-out.js:
  • test262/test/built-ins/Atomics/waitAsync/symbol-for-index-throws.js:
  • test262/test/built-ins/Atomics/waitAsync/symbol-for-timeout-throws-agent.js:

(1.then.async agentCount):

  • test262/test/built-ins/Atomics/waitAsync/validate-arraytype-before-index-coercion.js:
  • test262/test/built-ins/Atomics/waitAsync/validate-arraytype-before-timeout-coercion.js:
  • test262/test/built-ins/Atomics/waitAsync/validate-arraytype-before-value-coercion.js:
  • test262/test/built-ins/JSON/stringify/replacer-array-proxy.js:
  • test262/test/built-ins/Promise/allSettled/resolve-from-same-thenable.js:
  • test262/test/built-ins/Promise/any/iter-returns-true-reject.js:
  • test262/test/built-ins/Promise/any/iter-returns-undefined-reject.js:
  • test262/test/built-ins/Promise/prototype/finally/resolved-observable-then-calls.js:

(then):

  • test262/test/built-ins/Promise/prototype/finally/species-constructor.js:

(then):

  • test262/test/built-ins/Promise/prototype/finally/species-symbol.js: Removed.
  • test262/test/built-ins/Promise/prototype/finally/subclass-reject-count.js:

(FooPromise.reject.finally):
(then.ERROR.catch): Deleted.

  • test262/test/built-ins/Promise/prototype/finally/subclass-resolve-count.js:

(then):

  • test262/test/intl402/DateTimeFormat/constructor-options-fractionalSecondDigits-valid.js:

(toString):
(valueOf): Deleted.

  • test262/test/intl402/DateTimeFormat/prototype/format/fractionalSecondDigits.js:
  • test262/test/intl402/DateTimeFormat/prototype/formatRange/date-undefined-throws.js:
  • test262/test/intl402/DateTimeFormat/prototype/formatRange/fractionalSecondDigits.js:
  • test262/test/intl402/DateTimeFormat/prototype/formatRangeToParts/date-undefined-throws.js:
  • test262/test/intl402/DateTimeFormat/prototype/formatRangeToParts/fractionalSecondDigits.js:
  • test262/test/intl402/DateTimeFormat/prototype/formatToParts/fractionalSecondDigits.js:
  • test262/test/intl402/DisplayNames/ctor-custom-prototype.js:
  • test262/test/intl402/DisplayNames/ctor-default-prototype.js:
  • test262/test/intl402/DisplayNames/instance-extensible.js:
  • test262/test/intl402/DisplayNames/locales-symbol-length.js:
  • test262/test/intl402/DisplayNames/options-fallback-abrupt-throws.js:
  • test262/test/intl402/DisplayNames/options-fallback-invalid-throws.js:
  • test262/test/intl402/DisplayNames/options-fallback-toString-abrupt-throws.js:

(fallback.toString):
(fallback.valueOf):
(fallback.Symbol.toPrimitive):
(options.fallback.toString): Deleted.
(options.fallback.valueOf): Deleted.
(options.fallback.Symbol.toPrimitive): Deleted.

  • test262/test/intl402/DisplayNames/options-fallback-valid.js:
  • test262/test/intl402/DisplayNames/options-localeMatcher-valid.js:
  • test262/test/intl402/DisplayNames/options-random-properties-unchecked.js:
  • test262/test/intl402/DisplayNames/options-style-valid.js:
  • test262/test/intl402/DisplayNames/options-type-invalid-throws.js:
  • test262/test/intl402/DisplayNames/options-type-valid.js:
  • test262/test/intl402/DisplayNames/proto-from-ctor-realm.js:
  • test262/test/intl402/DisplayNames/prototype/resolvedOptions/default-option-values.js:
  • test262/test/intl402/DisplayNames/prototype/resolvedOptions/option-fallback.js:
  • test262/test/intl402/DisplayNames/prototype/resolvedOptions/option-style.js:
  • test262/test/intl402/DisplayNames/prototype/resolvedOptions/return-object.js:
  • test262/test/language/computed-property-names/class/static/method-number.js:
  • test262/test/language/computed-property-names/class/static/method-string.js:
  • test262/test/language/computed-property-names/class/static/method-symbol.js:
  • test262/test/language/expressions/optional-chaining/early-errors-tail-position-template-string-esi.js: Removed.
  • test262/test/language/expressions/optional-chaining/early-errors-tail-position-template-string.js: Removed.
  • test262/test/language/expressions/optional-chaining/eval-optional-call.js:

(fn):

  • test262/test262-Revision.txt:

Tools:

test262 is now using 'main' as the default branch. Fix our import script to reflect that.

  • Scripts/test262/Import.pm:

(processCLI):

2:52 PM Changeset in webkit [264620] by commit-queue@webkit.org
  • 11 edits in trunk

Fixes to match BaseAudioContext.idl to spec
https://bugs.webkit.org/show_bug.cgi?id=214487

Patch by Clark Wang <clark_wang@apple.com> on 2020-07-20
Reviewed by Chris Dumez.

LayoutTests/imported/w3c:

Re-baselined existing tests that now pass.

  • web-platform-tests/webaudio/the-audio-api/the-delaynode-interface/delaynode-maxdelaylimit-expected.txt:
  • web-platform-tests/webaudio/the-audio-api/the-pannernode-interface/pannernode-basic-expected.txt:

Source/WebCore:

Removed unrestricted keyword from certain attributes and parameters in BaseAudioContext.
Changed createPanner to call new PannerNode constructor, removed old PannerNode constructor.

Re-baselined existing tests that now pass.

  • Modules/webaudio/BaseAudioContext.cpp:

(WebCore::BaseAudioContext::createPanner):

  • Modules/webaudio/BaseAudioContext.idl:
  • Modules/webaudio/PannerNode.cpp:
  • Modules/webaudio/PannerNode.h:

LayoutTests:

Changed test for default panningModel to equalpower to match spec, Chrome and Firefox.

  • webaudio/pannernode-basic-expected.txt:
  • webaudio/pannernode-basic.html:
2:32 PM Changeset in webkit [264619] by Ryan Haddad
  • 3 edits in trunk/LayoutTests

Unreviewed test gardening, skip flaky test webgl/2.0.0/conformance2/state/gl-object-get-calls.html.

  • platform/mac-wk1/TestExpectations:
  • platform/mac/TestExpectations:
2:24 PM Changeset in webkit [264618] by commit-queue@webkit.org
  • 2 edits in trunk/Tools

[jhbuild] GStreamer broken in minimal environment
https://bugs.webkit.org/show_bug.cgi?id=214552

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

  • jhbuild/jhbuildrc_common.py:

(init): Don't set GST_PLUGIN_SYSTEM_PATH when using the minimal moduleset, because in this
case we actually have to rely on the host GStreamer installation. GStreamer is not part of
the minimal moduleset.

2:03 PM Changeset in webkit [264617] by keith_miller@apple.com
  • 32 edits
    2 copies
    2 moves
    25 adds in trunk

Add support for FinalizationRegistries
https://bugs.webkit.org/show_bug.cgi?id=199888

Reviewed by Yusuke Suzuki.

JSTests:

Shamelessly copy v8's tests and refactor them to work with conservative GC.

  • stress/resources/v8-mjsunit.js: Added.

(MjsUnitAssertionError):
(MjsUnitAssertionError.prototype.toString):
(catch):
(classOf):
(ValueOf):
(prettyPrinted):
(prettyPrintedArrayElement):
(failWithMessage):
(formatFailureText):
(fail):
(deepObjectEquals):
(deepEquals):
(assertSame):
(assertNotSame):
(assertEquals):
(assertNotEquals):
(assertEqualsDelta):
(assertArrayEquals):
(assertPropertiesEqual):
(assertToStringEquals):
(assertTrue):
(assertFalse):
(assertNull):
(assertNotNull):
(executeCode):
(checkException):
(assertThrows):
(assertThrowsEquals):
(assertThrowsAsync):
(assertInstanceof):
(assertDoesNotThrow):
(assertUnreachable):
(assertContains):
(assertMatches):
(concatenateErrors):
(assertPromiseResult):
(OptimizationStatus):
(assertUnoptimized):
(assertOptimized):
(isNeverOptimizeLiteMode):
(isNeverOptimize):
(isAlwaysOptimize):
(isInterpreted):
(isOptimized):
(isTurboFanned):
(MjsUnitAssertionError.prepareStackTrace):

  • stress/v8-cleanup-from-different-realm.js: Added.

(let.timeout_func):

  • stress/v8-cleanup-proxy-from-different-realm.js: Added.

(let.timeout_func):

  • stress/v8-finalization-registry-basics.js: Added.

(TestConstructFinalizationRegistry):
(TestFinalizationRegistryConstructorCallAsFunction):
(TestConstructFinalizationRegistryCleanupNotCallable):
(TestConstructFinalizationRegistryWithNonCallableProxyAsCleanup):
(TestRegisterTargetAndHoldingsSameValue):
(TestRegisterWithoutFinalizationRegistry):
(TestUnregisterWithNonExistentKey):
(TestUnregisterWithNonFinalizationRegistry):
(TestWeakRefConstructorWithNonObject):
(TestWeakRefWithProxy):

  • stress/v8-finalizationregistry-and-weakref.js: Added.

(let.cleanup):
(setTimeout):

  • stress/v8-finalizationregistry-keeps-holdings-alive.js: Added.

(let.cleanup):
(let.timeout_func):

  • stress/v8-finalizationregistry-scheduled-for-cleanup-multiple-times.js: Added.

(let.cleanup0):
(let.cleanup1):
(let.timeout_func):

  • stress/v8-multiple-dirty-finalization-registries.js: Added.

(let.cleanup):
(let.timeout_func):

  • stress/v8-reentrant-gc-from-cleanup.js: Added.

(let.reentrant_gc):
(setTimeout):

  • stress/v8-stress-finalizationregistry-dirty-enqueue.js: Added.

(i.registries.push.new.FinalizationRegistry):
(registries.forEach):

  • stress/v8-undefined-holdings.js: Added.

(let.cleanup):
(let.timeout_func):

  • stress/v8-unregister-after-cleanup.js: Added.

(let.cleanup):
(let.timeout_func):

  • stress/v8-unregister-before-cleanup.js: Added.

(let.cleanup):
(let.timeout_func):

  • stress/v8-unregister-called-twice.js: Added.

(let.cleanup):
(let.timeout_func):

  • stress/v8-unregister-inside-cleanup2.js: Added.

(let.cleanup):
(let.timeout_func):

  • stress/v8-unregister-inside-cleanup3.js: Added.

(let.cleanup):
(let.timeout_func):

  • stress/v8-unregister-many.js: Added.

(let.cleanup):
(let.timeout_func):

  • stress/v8-weak-unregistertoken.js: Added.

(FR.new.FinalizationRegistry):
(tryAgain):

Source/JavaScriptCore:

This patch adds support for FinalizationRegistries. There are two
main parts to this patch, the first is refactoring PromiseTimer a
more general into DeferredWorkTimer. This allows us to finally
have a "real" setTimeout on the jsc command line. The second part
is adding all the new classes needed for FinalizationRegistries.

The refactoring is mostly a rename but does two main new
things. The first is that it now notifies the VM we have finished
a synchronuous JS execution, so that WeakRefs can be
collected. The second is that it now catches any exceptions and
forwards the to a new method on the global object method
table. For WebCore, this reports the exception to the console. For
API users, this calls their exceptionHandler block. For the CLI,
it exits with exit status 3 (our general exception exit
status). Unfortunately, there's not currently an ergonomic way to
pass the expected exception from the CLI arguments to this handler
so that's not supported here.

In order to support FinalizationRegistry this patch adds a "new"
class JSDestructibleInternalFieldObjectImpl, which allows us to
have a destructible object with internal fields. Since the order
of collection doesn't matter we currently use C++ HashTables on
the FinalizationRegistry. Since users can unregister objects while
the callback is pending we have a hash table for the live entries
and a second hash table for the dead ones. Lastly, because users
are not requred to provide a token for unregistration we have two
extra Vectors containing the live/dead objects that are not
unregisterible.

  • API/JSAPIGlobalObject.cpp:
  • API/JSAPIGlobalObject.mm:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • Sources.txt:
  • heap/Heap.cpp:

(JSC::Heap::finalizeUnconditionalFinalizers):

  • jsc.cpp:

(functionSetTimeout):
(functionFinalizationRegistryLiveCount):
(functionFinalizationRegistryDeadCount):
(main):
(checkUncaughtException):
(checkException):
(GlobalObject::reportUncaughtExceptionAtEventLoop):
(runJSC):

  • runtime/ArrayIteratorPrototype.cpp:
  • runtime/CommonIdentifiers.h:
  • runtime/DeferredWorkTimer.cpp: Renamed from Source/JavaScriptCore/runtime/PromiseTimer.cpp.

(JSC::DeferredWorkTimer::DeferredWorkTimer):
(JSC::DeferredWorkTimer::doWork):
(JSC::DeferredWorkTimer::runRunLoop):
(JSC::DeferredWorkTimer::addPendingWork):
(JSC::DeferredWorkTimer::hasPendingWork):
(JSC::DeferredWorkTimer::hasDependancyInPendingWork):
(JSC::DeferredWorkTimer::cancelPendingWork):
(JSC::DeferredWorkTimer::scheduleWorkSoon):

  • runtime/DeferredWorkTimer.h: Renamed from Source/JavaScriptCore/runtime/PromiseTimer.h.
  • runtime/FinalizationRegistryConstructor.cpp: Added.

(JSC::FinalizationRegistryConstructor::finishCreation):
(JSC::FinalizationRegistryConstructor::FinalizationRegistryConstructor):
(JSC::callFinalizationRegistry):
(JSC::constructFinalizationRegistry):

  • runtime/FinalizationRegistryConstructor.h: Copied from Source/JavaScriptCore/API/JSAPIGlobalObject.cpp.
  • runtime/FinalizationRegistryPrototype.cpp: Added.

(JSC::FinalizationRegistryPrototype::finishCreation):
(JSC::getFinalizationRegistry):
(JSC::protoFuncFinalizationRegistryRegister):
(JSC::protoFuncFinalizationRegistryUnregister):

  • runtime/FinalizationRegistryPrototype.h: Copied from Source/JavaScriptCore/API/JSAPIGlobalObject.cpp.
  • runtime/IdentifierInlines.h:

(JSC::Identifier::Identifier):

  • runtime/JSFinalizationRegistry.cpp: Added.

(JSC::JSFinalizationRegistry::createStructure):
(JSC::JSFinalizationRegistry::create):
(JSC::JSFinalizationRegistry::finishCreation):
(JSC::JSFinalizationRegistry::visitChildren):
(JSC::JSFinalizationRegistry::destroy):
(JSC::JSFinalizationRegistry::finalizeUnconditionally):
(JSC::JSFinalizationRegistry::runFinalizationCleanup):
(JSC::JSFinalizationRegistry::takeDeadHoldingsValue):
(JSC::JSFinalizationRegistry::registerTarget):
(JSC::JSFinalizationRegistry::unregister):
(JSC::JSFinalizationRegistry::liveCount):
(JSC::JSFinalizationRegistry::deadCount):
(JSC::JSFinalizationRegistry::toStringName):

  • runtime/JSFinalizationRegistry.h: Added.
  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::reportUncaughtExceptionAtEventLoop):

  • runtime/JSGlobalObject.h:

(JSC::JSGlobalObject::stackOverflowFrameCallee const):
(JSC::JSGlobalObject::arrayIteratorProtocolWatchpointSet):
(JSC::JSGlobalObject::mapIteratorProtocolWatchpointSet):
(JSC::JSGlobalObject::setIteratorProtocolWatchpointSet):
(JSC::JSGlobalObject::stringIteratorProtocolWatchpointSet):
(JSC::JSGlobalObject::mapSetWatchpointSet):
(JSC::JSGlobalObject::setAddWatchpointSet):
(JSC::JSGlobalObject::arraySpeciesWatchpointSet):
(JSC::JSGlobalObject::arrayJoinWatchpointSet):
(JSC::JSGlobalObject::numberToStringWatchpointSet):

  • runtime/JSInternalFieldObjectImpl.h:
  • runtime/JSInternalFieldObjectImplInlines.h:

(JSC::Base>::visitChildren):
(JSC::JSInternalFieldObjectImpl<passedNumberOfInternalFields>::visitChildren): Deleted.

  • runtime/JSPromise.cpp:

(JSC::JSPromise::resolve):
(JSC::JSPromise::reject):

  • runtime/StructureIDTable.cpp:

(JSC::StructureIDTable::allocateID):
(JSC::StructureIDTable::deallocateID):

  • runtime/VM.cpp:

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

  • runtime/VM.h:
  • wasm/js/JSWebAssembly.cpp:

(JSC::webAssemblyModuleValidateAsyncInternal):
(JSC::instantiate):
(JSC::compileAndInstantiate):
(JSC::webAssemblyModuleInstantinateAsyncInternal):
(JSC::webAssemblyCompileStreamingInternal):
(JSC::webAssemblyInstantiateStreamingInternal):

  • wasm/js/JSWebAssemblyCodeBlock.h:

Source/WebCore:

Refactor things for changing PromiseDeferredTimer to DeferredWorkTimer.

Also, add globalObject hook for reporting uncaught exceptions from JSC's
runloop callbacks.

  • bindings/js/JSDOMGlobalObject.cpp:

(WebCore::JSDOMGlobalObject::reportUncaughtExceptionAtEventLoop):

  • bindings/js/JSDOMGlobalObject.h:
  • bindings/js/JSDOMWindowBase.cpp:

(WebCore::JSDOMWindowBase::compileStreaming):
(WebCore::JSDOMWindowBase::instantiateStreaming):

  • bindings/js/JSWorkerGlobalScopeBase.cpp:
  • bindings/js/JSWorkletGlobalScopeBase.cpp:
  • bindings/js/WorkerScriptController.cpp:

(WebCore::WorkerScriptController::addTimerSetNotification):
(WebCore::WorkerScriptController::removeTimerSetNotification):

  • workers/WorkerRunLoop.cpp:
  • worklets/WorkletScriptController.cpp:

LayoutTests:

  • js/script-tests/weakref-finalizationregistry.js: Added.

(makeWeakRef):
(turnEventLoop):
(async test):

  • js/weakref-finalizationregistry-expected.txt: Added.
  • js/weakref-finalizationregistry.html: Added.
1:19 PM Changeset in webkit [264616] by commit-queue@webkit.org
  • 4 edits in trunk/Source/JavaScriptCore

JSC build scripts should be quiet by default
https://bugs.webkit.org/show_bug.cgi?id=214535

Patch by Michael Catanzaro <Michael Catanzaro> on 2020-07-20
Reviewed by Saam Barati.

There's no need for these scripts to print "Nothing changed" when they don't do anything.

  • offlineasm/asm.rb:
  • offlineasm/generate_offset_extractor.rb:
  • offlineasm/generate_settings_extractor.rb:
1:18 PM Changeset in webkit [264615] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebCore

[CG] Flushing ImageBuffer IOSurface cached image can happen when creating an image for encoding only
https://bugs.webkit.org/show_bug.cgi?id=214515
<rdar://problem/65735991>

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2020-07-20
Reviewed by Simon Fraser.

Drawing an empty rectangle after changing the bytes of the IOSurface was
a hack to force CG to regenerate the IOSurface cached image. This hack
was added to solve the bug in which we were getting stale data url from
the ImageBuffer after calling its putImageData() function.

Drawing the ImageBuffer to a GraphicsContext or getting its data url starts
by getting a native image from the IOSurface. The stale cached image problem
was seen only in getting the data url but when not drawing the ImageBuffer.

So to save the cost of flushing the cached image, we will delay doing the
empty rectangle hack till toCFData() is called. toCFData() is called for
all ImageBuffer data retrieval functions including toDataURL().

This gives a 15% progression to the Images test on MacBookPro15,2 because
the Images test does not call toDataURL() so it does not require flushing
the IOSurface cached image. It calls getImageData(), alter the image data
and then calls putImageData().

  • platform/graphics/cg/ImageBufferIOSurfaceBackend.cpp:

(WebCore::ImageBufferIOSurfaceBackend::toCFData const):
(WebCore::ImageBufferIOSurfaceBackend::putImageData):

  • platform/graphics/cg/ImageBufferIOSurfaceBackend.h:
1:16 PM Changeset in webkit [264614] by aakash_jain@apple.com
  • 4 edits in trunk/Tools

[build.webkit.org] Update reference to webkit-test-results in TestFailures
https://bugs.webkit.org/show_bug.cgi?id=214499

Reviewed by Jonathan Bedard.

  • BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/garden-o-matic.html:
  • BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/builders_unittests.js:
  • BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/ui/notifications_unittests.js:
1:12 PM Changeset in webkit [264613] by commit-queue@webkit.org
  • 5 edits in trunk/Source/WebKit

REGRESSION(r263551) Main thread often hangs while saving cookies
https://bugs.webkit.org/show_bug.cgi?id=214564
<rdar://problem/65779712>

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

I had assumed that CFNetwork wouldn't write cookies on the main thread, but I was wrong.
That change caused spins, so let's just do the work on the WebsiteDataStore's queue instead.

  • UIProcess/API/APIHTTPCookieStore.h:
  • UIProcess/API/Cocoa/APIHTTPCookieStoreCocoa.mm:

(API::HTTPCookieStore::flushDefaultUIProcessCookieStore):

  • UIProcess/WebsiteData/WebsiteDataStore.cpp:

(WebKit::WebsiteDataStore::dispatchOnQueue):

  • UIProcess/WebsiteData/WebsiteDataStore.h:
1:04 PM Changeset in webkit [264612] by aakash_jain@apple.com
  • 3 edits in trunk/Tools

Reduce logging in ews django app
https://bugs.webkit.org/show_bug.cgi?id=214562

Reviewed by Jonathan Bedard.

  • BuildSlaveSupport/ews-app/ews/models/build.py:

(Build.update_build):

  • BuildSlaveSupport/ews-app/ews/models/step.py:

(Step.save_step):
(Step.update_step):

12:58 PM Changeset in webkit [264611] by Darin Adler
  • 2 edits in trunk/Source/WebCore

Streamline URLDecomposition::setHash
https://bugs.webkit.org/show_bug.cgi?id=214561

Reviewed by Anders Carlsson.

  • html/URLDecomposition.cpp:

(WebCore::URLDecomposition::setHash): No need to cast to StringView since we
already have a StringView. Also don't need a local variable.

12:52 PM Changeset in webkit [264610] by Darin Adler
  • 2 edits in trunk/Source/WebCore

[Cocoa] MediaSampleAVFObjC::createImageSample depends on function argument evaluation order
https://bugs.webkit.org/show_bug.cgi?id=214560

Reviewed by Anders Carlsson.

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

(WebCore::deallocateVectorBuffer): Renamed from releaseUint8Vector.
(WebCore::MediaSampleAVFObjC::createImageSample): Rearranged code so that we don't call both
data() and releaseBuffer() on the same vector in the same function call; that isn't safe because
the order of argument evaluation is not guaranteed, and so data() could be called after the
buffer is released. Also added code to deallocate the buffer if CVPixelBufferCreateWithBytes
fails. The old code would have leaked it in that case. Also made some style tweaks to use
adoptCF more consistently to handle reference counting, and slightly optimized a loop to
only get the array count once.

12:47 PM Changeset in webkit [264609] by Kate Cheney
  • 33 edits in trunk

[ iOS macOS ] http/tests/resourceLoadStatistics/grandfathering-database.html is a rare flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=213553
<rdar://problem/64696432>

Reviewed by Darin Adler.

Tools:

Registering to receive an ITP statistics processing callback should be
synchronous, otherwise processing could happen before ITP has
registered that it should be reported to the test runner.

To avoid this mistake in the future, this patch removes the
async version of this call from TestInvocation.cpp, because it should
never be used.

  • WebKitTestRunner/InjectedBundle/TestRunner.cpp:

(WTR::TestRunner::installStatisticsDidModifyDataRecordsCallback):

Update this function to look like
installStatisticsDidScanDataRecordsCallback. It is simpler to let ITP
know to send the callback response when installing the callback
instead of requiring a separate function call.

(WTR::TestRunner::installStatisticsDidScanDataRecordsCallback):
Register for a callback synchronously.

  • WebKitTestRunner/TestInvocation.cpp:

(WTR::TestInvocation::didReceiveMessageFromInjectedBundle):

  • WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:

Remove setStatisticsNotifyPagesWhenDataRecordsWereScanned from the idl
file so it does not accidentally get called in a layout test in the
future.

LayoutTests:

Remove unnecessary calls to register for a statistics processing
callback, now that it is done synchronously as a part of the installing function.

  • http/tests/resourceLoadStatistics/count-third-party-script-import-in-worker-database.html:
  • http/tests/resourceLoadStatistics/count-third-party-script-import-in-worker.html:
  • http/tests/resourceLoadStatistics/count-third-party-script-loads-database.html:
  • http/tests/resourceLoadStatistics/count-third-party-script-loads.html:
  • http/tests/resourceLoadStatistics/do-not-capture-statistics-for-simple-top-navigations-database.html:
  • http/tests/resourceLoadStatistics/do-not-capture-statistics-for-simple-top-navigations.html:
  • http/tests/resourceLoadStatistics/dont-count-third-party-image-as-third-party-script-database.html:
  • http/tests/resourceLoadStatistics/dont-count-third-party-image-as-third-party-script.html:
  • http/tests/resourceLoadStatistics/many-inserts-only-insert-once.html:
  • http/tests/resourceLoadStatistics/prevalent-resource-handled-keydown-database.html:
  • http/tests/resourceLoadStatistics/prevalent-resource-handled-keydown.html:
  • http/tests/resourceLoadStatistics/prevalent-resource-unhandled-keydown-database.html:
  • http/tests/resourceLoadStatistics/prevalent-resource-unhandled-keydown.html:

The testing contents should be part of the callback for setEnableFeature
to ensure setup finishes before the test is run.

  • http/tests/resourceLoadStatistics/prevalent-resource-with-user-interaction-database.html:
  • http/tests/resourceLoadStatistics/prevalent-resource-with-user-interaction-timeout-database.html:
  • http/tests/resourceLoadStatistics/prevalent-resource-with-user-interaction-timeout.html:
  • http/tests/resourceLoadStatistics/prevalent-resource-with-user-interaction.html:
  • http/tests/resourceLoadStatistics/prevalent-resource-without-user-interaction-database.html:
  • http/tests/resourceLoadStatistics/prevalent-resource-without-user-interaction.html:
  • http/tests/resourceLoadStatistics/remove-website-data-for-origin-deletes-third-party-script-loads-database.html:
  • http/tests/resourceLoadStatistics/remove-website-data-for-origin-deletes-third-party-script-loads.html:
  • http/tests/resourceLoadStatistics/resources/util.js:

(setEnableFeature):
This call is unnecessary as the parameters are cleared in
WKWebsiteDataStoreStatisticsResetToConsistentState.

  • http/tests/webAPIStatistics/canvas-read-and-write-data-collection.html:
  • http/tests/webAPIStatistics/font-load-data-collection.html:
  • http/tests/webAPIStatistics/navigator-functions-accessed-data-collection.html:
  • http/tests/webAPIStatistics/screen-functions-accessed-data-collection.html:
  • http/tests/websocket/connection-refusal-in-frame-resource-load-statistics.html:
  • platform/ios-wk2/TestExpectations:
12:32 PM Changeset in webkit [264608] by dino@apple.com
  • 2 edits in trunk/Tools

Adding James Darpinian to contributors.

  • Scripts/webkitpy/common/config/contributors.json:
11:30 AM Changeset in webkit [264607] by commit-queue@webkit.org
  • 10 edits
    2 adds
    1 delete in trunk

[GStreamer] Add support for canvas captureStream, tests failing since they were added in r213598
https://bugs.webkit.org/show_bug.cgi?id=169811

Patch by Philippe Normand <pnormand@igalia.com> on 2020-07-20
Reviewed by Darin Adler.

Source/WebCore:

Hook captureStream support in GStreamer ports. The only missing bits were:

  1. create a MediaSample from a BGRA buffer
  2. convert a MediaSample to a RGBA buffer (used only for layout tests)
  3. set video width and height tags not only on video capture tracks (tracks created from captureStream are not GStreamer capture device tracks)
  • html/HTMLCanvasElement.cpp:

(WebCore::HTMLCanvasElement::toMediaSample):

  • platform/graphics/avfoundation/objc/MediaSampleAVFObjC.h: Refactor createImageSample to

use unsigned for dimensions.

  • platform/graphics/avfoundation/objc/MediaSampleAVFObjC.mm:
  • platform/graphics/gstreamer/MediaSampleGStreamer.cpp:

(WebCore::MediaSampleGStreamer::createImageSample):
(WebCore::MediaSampleGStreamer::getRGBAImageData const):

  • platform/graphics/gstreamer/MediaSampleGStreamer.h:
  • platform/mediastream/gstreamer/GStreamerMediaStreamSource.cpp:

(mediaStreamTrackPrivateGetTags):

LayoutTests:

Unflag passing tests and rebaseline one platform-specific WPT test expectation which differs
from the default by only one line.

  • platform/glib/imported/w3c/web-platform-tests/mediacapture-streams/MediaStream-MediaElement-srcObject.https-expected.txt: Added.
  • platform/gtk/TestExpectations:
  • platform/gtk/imported/w3c/web-platform-tests/mediacapture-streams/MediaStream-MediaElement-srcObject.https-expected.txt: Removed.
  • platform/wpe/TestExpectations:
11:28 AM Changeset in webkit [264606] by youenn@apple.com
  • 4 edits in trunk

Fix buggy assert in h265_vps_sps_pps_tracker.cc
https://bugs.webkit.org/show_bug.cgi?id=214545

Reviewed by Eric Carlson.

Source/ThirdParty/libwebrtc:

  • Source/webrtc/modules/video_coding/h265_vps_sps_pps_tracker.cc:

LayoutTests:

  • platform/mac-wk2/TestExpectations:
11:12 AM Changeset in webkit [264605] by Jonathan Bedard
  • 2 edits in trunk/Tools

[webkitpy] Build with arm64e when on Apple Internal
https://bugs.webkit.org/show_bug.cgi?id=214553
<rdar://problem/65745597>

Reviewed by Tim Horton.

  • Scripts/webkitpy/port/mac.py:

(MacPort._build_driver_flags): Use arm64e instead of arm64 for Internal builds.

9:58 AM Changeset in webkit [264604] by youenn@apple.com
  • 6 edits in trunk

GenerateCertificateAsync should be called on signaling thread
https://bugs.webkit.org/show_bug.cgi?id=214447

Reviewed by Geoffrey Garen.

Source/WebCore:

As per debug assert, GenerateCertificateAsync is expected to be called in the signaling thread.
Covered by unskipped test.

  • Modules/mediastream/libwebrtc/LibWebRTCCertificateGenerator.cpp:

(WebCore::LibWebRTCCertificateGenerator::generateCertificate):

  • platform/mediastream/libwebrtc/LibWebRTCProvider.cpp:

(WebCore::LibWebRTCProvider::prepareCertificateGenerator):
We can pass generator to a background thread as it is allocated once and does not get freed.

  • platform/mediastream/libwebrtc/LibWebRTCProvider.h:

LayoutTests:

  • platform/mac-wk2/TestExpectations:
9:26 AM Changeset in webkit [264603] by commit-queue@webkit.org
  • 5 edits in trunk/Tools

Add lock icon to MiniBrowser
https://bugs.webkit.org/show_bug.cgi?id=214438

Patch by Alex Christensen <achristensen@webkit.org> on 2020-07-20
Reviewed by Darin Adler.

  • MiniBrowser/MiniBrowser.xcodeproj/project.pbxproj:
  • MiniBrowser/mac/BrowserWindow.xib:
  • MiniBrowser/mac/BrowserWindowController.h:
  • MiniBrowser/mac/WK2BrowserWindowController.m:

(-[WK2BrowserWindowController awakeFromNib]):
(-[WK2BrowserWindowController dealloc]):
(-[WK2BrowserWindowController showCertificate:]):
(-[WK2BrowserWindowController observeValueForKeyPath:ofObject:change:context:]):
(-[WK2BrowserWindowController updateLockButtonIcon:]):

8:17 AM Changeset in webkit [264602] by ddkilzer@apple.com
  • 4 edits in trunk/Source/WebKit

WebPageProxyIdentifier parameter of WebPageProxy::CreateNewPage() should not be Optional
<https://webkit.org/b/214542>
<rdar://problem/65768644>

Reviewed by Darin Adler.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::createNewPage):

  • UIProcess/WebPageProxy.h:

(WebKit::WebPageProxy::createNewPage):

  • UIProcess/WebPageProxy.messages.in:
  • Remove Optional<> wrapper for WebPageProxyIdentifier parameter since the value is used unconditionally.
7:24 AM Changeset in webkit [264601] by commit-queue@webkit.org
  • 10 edits
    1 add
    1 delete in trunk

Unreviewed, reverting r264596.
https://bugs.webkit.org/show_bug.cgi?id=214551

hits Debug asserts

Reverted changeset:

"[GStreamer] Add support for canvas captureStream, tests
failing since they were added in r213598"
https://bugs.webkit.org/show_bug.cgi?id=169811
https://trac.webkit.org/changeset/264596

7:13 AM Changeset in webkit [264600] by commit-queue@webkit.org
  • 16 edits in trunk/Source/WebCore

Make AnyStepHandling an enum class
https://bugs.webkit.org/show_bug.cgi?id=214423

Patch by Rob Buis <rbuis@igalia.com> on 2020-07-20
Reviewed by Youenn Fablet.

Make AnyStepHandling an enum class since this is more readable
and allows us to have less includes in header files.

  • html/BaseDateAndTimeInputType.cpp:
  • html/DateInputType.cpp:
  • html/DateTimeLocalInputType.cpp:
  • html/HTMLInputElement.cpp:

(WebCore::HTMLInputElement::setupDateTimeChooserParameters):

  • html/HTMLInputElement.h:
  • html/InputType.cpp:

(WebCore::InputType::rangeUnderflow const):
(WebCore::InputType::rangeOverflow const):
(WebCore::InputType::minimum const):
(WebCore::InputType::maximum const):
(WebCore::InputType::isInRange const):
(WebCore::InputType::isOutOfRange const):
(WebCore::InputType::stepMismatch const):
(WebCore::InputType::validationMessage const):
(WebCore::InputType::getAllowedValueStep const):
(WebCore::InputType::stepUp):
(WebCore::InputType::stepUpFromRenderer):

  • html/InputType.h:
  • html/MonthInputType.cpp:
  • html/NumberInputType.cpp:
  • html/RangeInputType.cpp:

(WebCore::RangeInputType::handleKeydownEvent):
(WebCore::RangeInputType::fallbackValue const):
(WebCore::RangeInputType::sanitizeValue const):

  • html/StepRange.cpp:

(WebCore::StepRange::parseStep):

  • html/StepRange.h:
  • html/TimeInputType.cpp:
  • html/WeekInputType.cpp:
  • html/shadow/SliderThumbElement.cpp:

(WebCore::sliderPosition):
(WebCore::SliderThumbElement::setPositionFromPoint):

6:51 AM Changeset in webkit [264599] by commit-queue@webkit.org
  • 9 edits in trunk

LayoutTests/imported/w3c:
Setting URL.hash to '#' should preserve '#'
https://bugs.webkit.org/show_bug.cgi?id=214318

Patch by Rob Buis <rbuis@igalia.com> on 2020-07-20
Reviewed by Youenn Fablet.

Update improved test expectation.

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

Source/WebCore:
Setting URL.hash to '#' should set empty fragment
https://bugs.webkit.org/show_bug.cgi?id=214318

Patch by Rob Buis <rbuis@igalia.com> on 2020-07-20
Reviewed by Youenn Fablet.

Setting URL.hash to '#' should set empty fragment
identifier [1], unlike setting it to the empty string
which drops the fragment identifier.

Behavior matches Chrome and Firefox.

[1] https://html.spec.whatwg.org/#dom-hyperlink-hash

Test: imported/w3c/web-platform-tests/url/url-setters.html

  • html/URLDecomposition.cpp:

(WebCore::URLDecomposition::setHash):

LayoutTests:
Setting URL.hash to '#' should preserve '#'
https://bugs.webkit.org/show_bug.cgi?id=214318

Patch by Rob Buis <rbuis@igalia.com> on 2020-07-20
Reviewed by Youenn Fablet.

Update test expectations to new behavior.

  • fast/dom/DOMURL/set-href-attribute-hash-expected.txt:
  • fast/dom/DOMURL/set-href-attribute-hash.html:
  • fast/dom/HTMLAnchorElement/set-href-attribute-hash-expected.txt:
  • fast/dom/HTMLAnchorElement/set-href-attribute-hash.html:
6:41 AM Changeset in webkit [264598] by Adrian Perez de Castro
  • 3 edits in trunk/Source/WebKit

Some classes have final destructors but are non-final
https://bugs.webkit.org/show_bug.cgi?id=214549

Reviewed by Youenn Fablet.

No new tests needed.

  • NetworkProcess/ServiceWorker/WebSWServerConnection.h: Mark WebSWServerConnection

class as final.

  • WebProcess/WebCoreSupport/WebMessagePortChannelProvider.h: Ditto.
6:37 AM Changeset in webkit [264597] by commit-queue@webkit.org
  • 3 edits
    2 deletes in trunk/Tools

[Flatpak SDK] Update to FDO 19.08.12 release
https://bugs.webkit.org/show_bug.cgi?id=214184

Patch by Philippe Normand <pnormand@igalia.com> on 2020-07-20
Reviewed by Žan Doberšek.

Bump to the latest 19.08 release, which ships GCC 9.3.0. Hence we can remove the
corresponding downstream patch. And the Bluez patch which was left around but not longer
applied in the FDO junction. Also integrate a non-related WPEBackend-FDO git master ref bump.

  • buildstream/elements/freedesktop-sdk.bst:
  • buildstream/patches/fdo-0001-Update-gcc-to-9.3.0.patch: Removed.
  • buildstream/patches/fdo/0003-Add-Bluez.patch: Removed.
  • buildstream/elements/sdk/wpebackend-fdo.bst:
5:37 AM Changeset in webkit [264596] by commit-queue@webkit.org
  • 10 edits
    2 adds
    1 delete in trunk

[GStreamer] Add support for canvas captureStream, tests failing since they were added in r213598
https://bugs.webkit.org/show_bug.cgi?id=169811

Patch by Philippe Normand <pnormand@igalia.com> on 2020-07-20
Reviewed by Darin Adler.

Source/WebCore:

Hook captureStream support in GStreamer ports. The only missing bits were:

  1. create a MediaSample from a BGRA buffer
  2. convert a MediaSample to a RGBA buffer (used only for layout tests)
  3. set video width and height tags not only on video capture tracks (tracks created from captureStream are not GStreamer capture device tracks)
  • html/HTMLCanvasElement.cpp:

(WebCore::HTMLCanvasElement::toMediaSample):

  • platform/graphics/avfoundation/objc/MediaSampleAVFObjC.h: Refactor createImageSample to

use unsigned for dimensions.

  • platform/graphics/avfoundation/objc/MediaSampleAVFObjC.mm:
  • platform/graphics/gstreamer/MediaSampleGStreamer.cpp:

(WebCore::MediaSampleGStreamer::createImageSample):
(WebCore::MediaSampleGStreamer::getRGBAImageData const):

  • platform/graphics/gstreamer/MediaSampleGStreamer.h:
  • platform/mediastream/gstreamer/GStreamerMediaStreamSource.cpp:

(mediaStreamTrackPrivateGetTags):

LayoutTests:

Unflag passing tests and rebaseline one platform-specific WPT test expectation which differs
from the default by only one line.

  • platform/glib/imported/w3c/web-platform-tests/mediacapture-streams/MediaStream-MediaElement-srcObject.https-expected.txt: Added.
  • platform/gtk/TestExpectations:
  • platform/gtk/imported/w3c/web-platform-tests/mediacapture-streams/MediaStream-MediaElement-srcObject.https-expected.txt: Removed.
  • platform/wpe/TestExpectations:
3:26 AM Changeset in webkit [264595] by commit-queue@webkit.org
  • 5 edits in trunk

[GStreamer] ImageDecoder hits more Debug ASSERTs
https://bugs.webkit.org/show_bug.cgi?id=214191

Patch by Philippe Normand <pnormand@igalia.com> on 2020-07-20
Reviewed by Xabier Rodriguez-Calvar.

Source/WebCore:

Process decoded video samples from the decoder parent thread, in order to guarantee the
underlying RefPtrs stored in the ImageDecoderGStreamerSample keep a consistent owning
runloop.

  • platform/graphics/gstreamer/ImageDecoderGStreamer.cpp:

(WebCore::ImageDecoderGStreamer::InnerDecoder::connectDecoderPad):
(WebCore::ImageDecoderGStreamer::setHasEOS):
(WebCore::ImageDecoderGStreamer::notifySample):
(WebCore::ImageDecoderGStreamer::InnerDecoder::handleMessage):
(WebCore::ImageDecoderGStreamer::pushEncodedData):

  • platform/graphics/gstreamer/ImageDecoderGStreamer.h:

LayoutTests:

  • platform/glib/TestExpectations: Unflag no-longer-crashing tests.
2:40 AM Changeset in webkit [264594] by Philippe Normand
  • 2 edits in trunk/LayoutTests

Unreviewed, GTK gardening

  • platform/gtk/TestExpectations: Unflag now-stable webrtc tests, no longer flaky since r263836.
1:37 AM Changeset in webkit [264593] by Fujii Hironori
  • 3 edits in trunk/Source/WebCore

Use forward template declarations for ColorComponents instead of including ColorComponents.h
https://bugs.webkit.org/show_bug.cgi?id=214540

Reviewed by Darin Adler.

  • platform/graphics/ColorMatrix.h:
  • platform/graphics/ColorTypes.h:
1:24 AM Changeset in webkit [264592] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebKit

valgrind claims uninitialized memory when opening inspector (WebKit::InspectorBrowserAgent::enable(WTF::String&))
https://bugs.webkit.org/show_bug.cgi?id=209468

Reviewed by Michael Catanzaro.

Initialize m_targetAgent.

  • UIProcess/Inspector/WebPageInspectorController.h:

Jul 19, 2020:

8:31 PM Changeset in webkit [264591] by Lauro Moura
  • 2 edits in trunk/Source/WebCore

Unreviewed, fix GTK build in Debian/LTS

Like r264279, include functional to provide std::invoke.

  • platform/graphics/ColorUtilities.h:
8:24 PM Changeset in webkit [264590] by Lauro Moura
  • 3 edits
    6 deletes in trunk/LayoutTests

[GTK][WPE] Remove some deprecated expectation files and garden failures

Unreviewed test gardening.

  • platform/glib/TestExpectations:
  • platform/gtk/TestExpectations:
  • platform/gtk/imported/w3c/web-platform-tests/css/css-grid/parsing/grid-template-columns-computed-implicit-track-expected.txt: Removed.
  • platform/gtk/imported/w3c/web-platform-tests/css/css-grid/parsing/grid-template-rows-computed-implicit-track-expected.txt: Removed.
  • platform/gtk/imported/w3c/web-platform-tests/css/css-properties-values-api/typedom-expected.txt: Removed.
  • platform/gtk/imported/w3c/web-platform-tests/css/css-properties-values-api/unit-cycles-expected.txt: Removed.
  • platform/wpe/imported/w3c/web-platform-tests/css/css-grid/parsing/grid-template-columns-computed-implicit-track-expected.txt: Removed.
  • platform/wpe/imported/w3c/web-platform-tests/css/css-grid/parsing/grid-template-rows-computed-implicit-track-expected.txt: Removed.
  • platform/wpe/imported/w3c/web-platform-tests/css/css-properties-values-api/typedom-expected.txt: Removed.
  • platform/wpe/imported/w3c/web-platform-tests/css/css-properties-values-api/unit-cycles-expected.txt: Removed.
7:04 PM Changeset in webkit [264589] by Fujii Hironori
  • 5 edits in trunk/Source/WebCore

Unreviewed, reverting r264588.

It broke Mac port.

Reverted changeset:

"Use forward template declarations for ColorComponents instead
of including ColorComponents.h as much as possible"
https://bugs.webkit.org/show_bug.cgi?id=214204
https://trac.webkit.org/changeset/264588

6:51 PM Changeset in webkit [264588] by Fujii Hironori
  • 5 edits in trunk/Source/WebCore

Use forward template declarations for ColorComponents instead of including ColorComponents.h as much as possible
https://bugs.webkit.org/show_bug.cgi?id=214204
<rdar://problem/65414170>

Unreviewed follow-up for the review feedback of r264289.

  • platform/graphics/ColorConversion.cpp:
  • platform/graphics/ColorMatrix.h:
  • platform/graphics/ColorTypes.h:
  • platform/graphics/ColorUtilities.h:
6:42 PM Changeset in webkit [264587] by Fujii Hironori
  • 6 edits in trunk/Source

Unreviewed non-unified source build fix

Source/JavaScriptCore:

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

Source/WebCore:

  • html/canvas/WebGLSync.cpp:
  • html/canvas/WebGLSync.h:
6:21 PM Changeset in webkit [264586] by ggaren@apple.com
  • 17 edits
    2 deletes in trunk/Source

There should be only one RunLoop Timer class
https://bugs.webkit.org/show_bug.cgi?id=214340

Reviewed by Darin Adler.

RunLoop::Timer wins. RunLoopTimer loses.

Source/WebCore:

  • loader/DocumentLoader.cpp:

(WebCore::DocumentLoader::DocumentLoader):
(WebCore::DocumentLoader::tryLoadingSubstituteData):
(WebCore::DocumentLoader::cancelMainResourceLoad):
(WebCore::DocumentLoader::startDataLoadTimer): Deleted. Use
RunLoop::dispatch instead of a timer because we have no need to control
the time period or to fire more than once. Use an explicit token so that
we can still cancel.

  • loader/DocumentLoader.h:

(WebCore::DocumentLoader::DataLoadToken::clear): Added an explicit token
class to we can cancel a data load.

  • loader/ResourceLoader.cpp:

(WebCore::ResourceLoader::loadDataURL): page->scheduledRunLoopPairs()
is never null; and if it were null, data loads would always fail.

  • platform/network/DataURLDecoder.cpp:

(WebCore::DataURLDecoder::decode):
(WebCore::DataURLDecoder::DecodingResultDispatcher::dispatch): Deleted.
(WebCore::DataURLDecoder::DecodingResultDispatcher::DecodingResultDispatcher): Deleted.
(WebCore::DataURLDecoder::DecodingResultDispatcher::startTimer): Deleted.
(WebCore::DataURLDecoder::DecodingResultDispatcher::timerFired): Deleted.
No need for two code paths, now that we can just call RunLoop::dispatch.

  • platform/network/DataURLDecoder.h:

Source/WTF:

  • WTF.xcodeproj/project.pbxproj:
  • wtf/CMakeLists.txt:
  • wtf/PlatformHave.h:
  • wtf/PlatformMac.cmake: Remove RunLoopTimer.
  • wtf/RunLoop.cpp:

(WTF::RunLoop::dispatchAfter): While we're here. let's make dispatchAfter
available on all platforms. We had cross-platform code, but it was
factored to be needlessly platform-specific.

  • wtf/RunLoop.h: Added a version of dispatch() that accepts a

SchedulePairHashSet for Cocoa. Removed some indirection from timer
stuff, since it was confusing me. Consistently named all time intervals
"interval".

  • wtf/RunLoopTimer.h: Removed.
  • wtf/cf/RunLoopCF.cpp:

(WTF::createTimer): Factored out a helper function for dispatch() to use.
(WTF::RunLoop::dispatch): This function is the meat of the patch. It's
the only unique functionality that RunLoopTimer used to provide.
(WTF::RunLoop::TimerBase::start): Adopted helper function.
(WTF::RunLoop::runForDuration): Deleted.
(WTF::RunLoop::TimerBase::timerFired): Deleted.

  • wtf/cf/RunLoopTimerCF.cpp: Removed.
  • wtf/generic/RunLoopGeneric.cpp:

(WTF::RunLoop::dispatchAfter): Deleted. Now cross-platform.

  • wtf/glib/RunLoopGLib.cpp:

(WTF::RunLoop::TimerBase::updateReadyTime):
(WTF::RunLoop::TimerBase::start):
(WTF::RunLoop::TimerBase::stop):
(WTF::DispatchAfterContext::DispatchAfterContext): Deleted.
(WTF::DispatchAfterContext::dispatch): Deleted.
(WTF::RunLoop::dispatchAfter): Deleted. Now cross-platform.

  • wtf/win/RunLoopWin.cpp:

(WTF::RunLoop::TimerBase::start):
(WTF::RunLoop::dispatchAfter): Deleted. Now cross-platform.

3:39 PM Changeset in webkit [264585] by weinig@apple.com
  • 53 edits in trunk

Rename Color::transparent to Color::transparentBlack to more clearly state what it is
https://bugs.webkit.org/show_bug.cgi?id=214522

Reviewed by Darin Adler.

Source/WebCore:

  • accessibility/AccessibilityNodeObject.cpp:

(WebCore::AccessibilityNodeObject::colorValue const):

  • accessibility/AccessibilityObject.h:
  • css/CSSValuePool.cpp:

(WebCore::StaticCSSValuePool::StaticCSSValuePool):
(WebCore::CSSValuePool::createColorValue):

  • editing/EditingStyle.cpp:

(WebCore::cssValueToColor):

  • html/HTMLInputElement.cpp:

(WebCore::autoFillStrongPasswordMaskImage):

  • html/InputType.cpp:

(WebCore::InputType::valueAsColor const):

  • html/canvas/CanvasRenderingContext2DBase.cpp:

(WebCore::CanvasRenderingContext2DBase::State::State):
(WebCore::CanvasRenderingContext2DBase::clearRect):
(WebCore::CanvasRenderingContext2DBase::setShadow):
(WebCore::CanvasRenderingContext2DBase::clearShadow):
(WebCore::CanvasRenderingContext2DBase::applyShadow):

  • inspector/InspectorOverlay.cpp:

(WebCore::drawShapeHighlight):

  • inspector/agents/InspectorDOMAgent.cpp:

(WebCore::parseColor):

  • layout/displaytree/DisplayPainter.cpp:

(WebCore::Display::paintBoxDecoration):

  • page/CaptionUserPreferencesMediaAF.cpp:

(WebCore::CaptionUserPreferencesMediaAF::captionsWindowCSS const):

  • page/DebugPageOverlays.cpp:

(WebCore::drawRightAlignedText):

  • page/FrameSnapshotting.cpp:

(WebCore::snapshotNode):

  • page/FrameView.cpp:

(WebCore::FrameView::recalculateBaseBackgroundColor):

  • page/PageOverlay.h:
  • page/TextIndicator.cpp:

(WebCore::estimatedBackgroundColorForRange):

  • page/animation/CSSPropertyAnimation.cpp:

(WebCore::shadowForBlending):

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

(WebCore::GraphicsLayerCA::createTransformAnimationsFromKeyframes):

  • platform/graphics/cg/ColorCG.cpp:

(WebCore::cachedCGColor):

  • platform/graphics/cg/NativeImageCG.cpp:

(WebCore::nativeImageSinglePixelSolidColor):

  • platform/graphics/filters/FilterOperation.cpp:

(WebCore::DropShadowFilterOperation::blend):

  • platform/graphics/mac/ColorMac.mm:

(WebCore::nsColor):

  • platform/graphics/nicosia/NicosiaPaintingEngineBasic.cpp:

(Nicosia::PaintingEngineBasic::paint):

  • platform/graphics/nicosia/NicosiaPaintingEngineThreaded.cpp:

(Nicosia::paintLayer):

  • platform/graphics/texmap/TextureMapperPlatformLayerBuffer.cpp:

(WebCore::TextureMapperPlatformLayerBuffer::paintToTextureMapper):

  • platform/ios/WebVideoFullscreenControllerAVKit.mm:

(VideoFullscreenControllerContext::requestVideoContentLayer):
(VideoFullscreenControllerContext::returnVideoContentLayer):
(VideoFullscreenControllerContext::didSetupFullscreen):

  • rendering/RenderImage.cpp:

(WebCore::RenderImage::paintIncompleteImageOutline const):

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::paintResizer):

  • rendering/RenderListMarker.cpp:

(WebCore::RenderListMarker::paint):

  • rendering/RenderThemeIOS.mm:

(WebCore::RenderThemeIOS::platformActiveSelectionBackgroundColor const):
(WebCore::RenderThemeIOS::platformInactiveSelectionBackgroundColor const):

  • rendering/RenderTreeAsText.cpp:

(WebCore::RenderTreeAsText::writeRenderObject):

  • rendering/mathml/RenderMathMLMenclose.cpp:

(WebCore::RenderMathMLMenclose::paint):

  • rendering/style/RenderStyle.cpp:

(WebCore::RenderStyle::visitedDependentColor const):

  • rendering/style/RenderStyle.h:

(WebCore::RenderStyle::initialStrokeColor):
(WebCore::RenderStyle::initialBackgroundColor):

  • style/StyleBuilderCustom.h:

(WebCore::Style::BuilderCustom::applyTextOrBoxShadowValue):

  • style/StyleBuilderState.cpp:

(WebCore::Style::BuilderState::createFilterOperations):

  • svg/SVGStopElement.cpp:

(WebCore::SVGStopElement::stopColorIncludingOpacity const):

  • testing/Internals.cpp:

(WebCore::Internals::setViewIsTransparent):
(WebCore::Internals::setViewBaseBackgroundColor):
Color::transparent to Color::transparentBlack.

Source/WebKit:

  • Shared/RemoteLayerTree/RemoteLayerTreeTransaction.mm:

(WebKit::RemoteLayerTreeTransaction::LayerProperties::LayerProperties):

  • UIProcess/API/ios/WKWebViewIOS.mm:

(scrollViewBackgroundColor):
(-[WKWebView _setOpaqueInternal:]):

  • UIProcess/Cocoa/WebViewImpl.mm:

(WebKit::WebViewImpl::setDrawsBackground):

  • UIProcess/WebPageProxy.cpp:

(WebKit::m_transcodingQueue):

  • WebProcess/InjectedBundle/API/glib/WebKitWebPage.cpp:

(webkitWebPageDidReceiveMessage):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::snapshotNode):

  • WebProcess/cocoa/VideoFullscreenManager.mm:

(WebKit::VideoFullscreenManager::enterVideoFullscreenForVideoElement):
Color::transparent to Color::transparentBlack.

Source/WebKitLegacy/win:

  • WebCoreSupport/WebFrameLoaderClient.cpp:

(WebFrameLoaderClient::transitionToCommittedForNewPage):

  • WebFrame.cpp:

(WebFrame::updateBackground):
Color::transparent to Color::transparentBlack.

Tools:

  • TestWebKitAPI/cocoa/TestPDFDocument.mm:

(TestWebKitAPI::TestPDFPage::colorAtPoint const):
Update for rename from Color::transparent to Color::transparentBlack.

1:07 PM Changeset in webkit [264584] by weinig@apple.com
  • 33 edits
    1 delete in trunk/Source

Remove ColorBuilder
https://bugs.webkit.org/show_bug.cgi?id=214521

Reviewed by Darin Adler.

Source/WebCore:

ColorBuilder is unnecessary and just makes deduction contexts more complicated.
Instead, we can get the same behavior by having color types inherit from a shared
base class ColorType that uses the curiously recurring template pattern, which
exposes the colorWithAlphaByte function (renamed from colorWithAlpha for clarity
of the parameter).

  • Headers.cmake:
  • WebCore.xcodeproj/project.pbxproj:

Remove ColorBuilder.

  • platform/graphics/ColorBuilder.h: Removed.
  • platform/graphics/Color.cpp:

(WebCore::Color::lightened const):

  • platform/graphics/Color.h:

(WebCore::Color::alphaByte const):
(WebCore::Color::alpha const): Deleted.
Stop using ColorBuilder for color named color types and rename Color::alpha to Color:alphaByte()
for consistency with colorWithAlphaByte().

  • platform/graphics/ColorTypes.h:

(WebCore::ColorType::colorWithAlphaByte const):
(WebCore::LinearSRGBA::LinearSRGBA):
(WebCore::DisplayP3::DisplayP3):
(WebCore::LinearDisplayP3::LinearDisplayP3):
(WebCore::HSLA::HSLA):
(WebCore::CMYKA::CMYKA):
(WebCore::XYZA::XYZA):
Switch each color type to inheriting from new ColorWithAlphaHelper struct. Use the opertunity to
give each color type the same construction interface as well. Now that each type has constructors,
the deduction guides are no longer necessary.

  • platform/graphics/ColorBlending.cpp:

(WebCore::blendSourceOver):
Switch from !color.alpha() to !color.isVisible() to more clearly indicate the intent.

  • accessibility/AccessibilityTable.cpp:

(WebCore::AccessibilityTable::isDataTable const):
Update to call alphaByte() and add FIXME indicating that it is probably incorrect and filed
https://bugs.webkit.org/show_bug.cgi?id=214537 to track things further.

  • html/HTMLInputElement.cpp:

(WebCore::HTMLInputElement::createInnerTextStyle):

  • inspector/InspectorOverlay.cpp:

(WebCore::InspectorOverlay::drawPaintRects):
(WebCore::InspectorOverlay::drawBounds):
(WebCore::InspectorOverlay::drawRulers):

  • page/CaptionUserPreferencesMediaAF.cpp:

(WebCore::CaptionUserPreferencesMediaAF::captionsBackgroundCSS const):

  • page/DebugPageOverlays.cpp:

(WebCore::NonFastScrollableRegionOverlay::drawRect):

  • page/DragController.cpp:

(WebCore::DragController::insertDroppedImagePlaceholdersAtCaret):

  • page/linux/ResourceUsageOverlayLinux.cpp:

(WebCore::ResourceUsageOverlay::platformInitialize):

  • platform/graphics/BitmapImage.cpp:

(WebCore::BitmapImage::draw):

  • platform/graphics/GraphicsLayer.cpp:

(WebCore::GraphicsLayer::getDebugBorderInfo const):

  • platform/graphics/ca/GraphicsLayerCA.cpp:

(WebCore::GraphicsLayerCA::recursiveCommitChanges):

  • platform/graphics/ca/PlatformCALayer.cpp:

(WebCore::PlatformCALayer::drawRepaintIndicator):

  • platform/graphics/ca/TileCoverageMap.cpp:

(WebCore::TileCoverageMap::TileCoverageMap):

  • platform/mock/ScrollbarThemeMock.cpp:

(WebCore::ScrollbarThemeMock::paintTrackBackground):

  • platform/win/DragImageWin.cpp:

(WebCore::createDragImageForLink):

  • rendering/InlineTextBox.cpp:

(WebCore::InlineTextBox::resolveStyleForMarkedText):

  • rendering/RenderEmbeddedObject.cpp:
  • rendering/RenderLayerBacking.cpp:

(WebCore::patternForTouchAction):
(WebCore::patternForEventListenerRegionType):
(WebCore::RenderLayerBacking::paintDebugOverlays):

  • rendering/RenderTheme.cpp:

(WebCore::RenderTheme::platformTapHighlightColor const):

  • rendering/RenderThemeMac.mm:

(WebCore::RenderThemeMac::paintMenuListButtonDecorations):

  • rendering/SimpleLineLayoutFunctions.cpp:

(WebCore::SimpleLineLayout::paintFlow):

  • testing/cocoa/WebViewVisualIdentificationOverlay.mm:

(-[WebViewVisualIdentificationOverlay initWithWebView:kind:deprecated:]):
Update to call colorWithAlphaByte rather than colorWithAlpha.

  • rendering/RenderThemeIOS.mm:

(WebCore::RenderThemeIOS::addRoundedBorderClip):
(WebCore::RenderThemeIOS::paintCheckboxDecorations):
(WebCore::RenderThemeIOS::paintRadioDecorations):
(WebCore::RenderThemeIOS::paintMenuListButtonDecorations):
(WebCore::RenderThemeIOS::paintSystemPreviewBadge):
Update to use colorWithAlphaByte rather than colorWithAlpha and alphaByte rather than alpha.

Source/WebKit:

  • WebProcess/Inspector/WebInspectorClient.cpp:

(WebKit::WebInspectorClient::showPaintRect):

  • WebProcess/WebPage/FindController.cpp:

(WebKit::FindController::drawRect):
Update for rename from colorWithAlpha to colorWithAlphaByte.

12:57 PM Changeset in webkit [264583] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit

Enable cross-platform release logging in ResourceLoadStatisticsDatabaseStore.cpp
https://bugs.webkit.org/show_bug.cgi?id=214538

Patch by Michael Catanzaro <Michael Catanzaro> on 2020-07-19
Reviewed by Darin Adler.

  • NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp:
12:13 PM Changeset in webkit [264582] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebCore

Remove findCharsetInMediaType
https://bugs.webkit.org/show_bug.cgi?id=214523

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

Remove findCharsetInMediaType (by moving its code
into extractCharsetFromMediaType) since there are
no users for findCharsetInMediaType anymore.

  • platform/network/HTTPParsers.cpp:

(WebCore::extractCharsetFromMediaType):
(WebCore::findCharsetInMediaType): Deleted.

  • platform/network/HTTPParsers.h:
12:06 PM Changeset in webkit [264581] by commit-queue@webkit.org
  • 2 edits in trunk/Tools

cpp.py:3688: FutureWarning: Possible nested set at position 101
https://bugs.webkit.org/show_bug.cgi?id=214536

Patch by Michael Catanzaro <Michael Catanzaro> on 2020-07-19
Reviewed by Darin Adler.

The warning was added in https://bugs.python.org/issue30349. We need to escape [ when used
inside a set. That is, we have to change "[[" to "[\[".

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

(check_identifier_name_in_declaration):

12:05 PM Changeset in webkit [264580] by commit-queue@webkit.org
  • 5 edits in trunk/Tools

Fix -Wdeprecated-declarations under Tools
https://bugs.webkit.org/show_bug.cgi?id=214534

Patch by Michael Catanzaro <Michael Catanzaro> on 2020-07-19
Reviewed by Darin Adler.

  • TestWebKitAPI/Tests/WebKit/ReloadPageAfterCrash.cpp:

(TestWebKitAPI::didCrashCheckFrames):

  • TestWebKitAPI/Tests/WebKit/WKPreferences.cpp:

(TestWebKitAPI::TEST):

  • WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:

(WTR::InjectedBundle::didCreatePage):

  • WebKitTestRunner/InjectedBundle/TestRunner.cpp:
11:45 AM Changeset in webkit [264579] by commit-queue@webkit.org
  • 3 edits in trunk/Tools

pep8.py:110: FutureWarning: Possible nested set at position 1
https://bugs.webkit.org/show_bug.cgi?id=214531

Patch by Michael Catanzaro <Michael Catanzaro> on 2020-07-19
Reviewed by Darin Adler.

Update from pep8 to pycodestyle.

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

(PythonChecker.check):
(PythonChecker._check_pycodestyle):
(PythonChecker._check_pycodestyle._pycodestyle_handle_error):
(PythonChecker._check_pep8): Deleted.
(PythonChecker._check_pep8._pep8_handle_error): Deleted.

  • Scripts/webkitpy/thirdparty/init.py:

(AutoinstallImportHook.find_module):
(AutoinstallImportHook._install_keyring):
(AutoinstallImportHook._install_pep8): Deleted.

11:23 AM Changeset in webkit [264578] by commit-queue@webkit.org
  • 2 edits in trunk/Source/JavaScriptCore

-Warray-bounds warnings in testb3 and testair
https://bugs.webkit.org/show_bug.cgi?id=214533

Patch by Michael Catanzaro <Michael Catanzaro> on 2020-07-19
Reviewed by Darin Adler.

Suppress these warnings when building testb3 and testair.

  • shell/CMakeLists.txt:
10:59 AM Changeset in webkit [264577] by weinig@apple.com
  • 3 edits in trunk/Source/WebCore

Additional Color related cleanups
https://bugs.webkit.org/show_bug.cgi?id=214514

Reviewed by Darin Adler.

  • platform/graphics/ColorBuilder.h:

Remove redundant "public" and use decltype() rather than more wordy typename for static_assert.

  • platform/graphics/ColorUtilities.h:

(WebCore::clampToComponentByte):
(WebCore::clampToComponentFloat):
Templatize to support any input.

(WebCore::clampToComponentBytes):
(WebCore::clampToComponentFloats):
Templatize using variadic templates to support any input and prepare for color types with more
than four components.

(WebCore::colorByModifingEachNonAlphaComponent):
Use std::invoke to support more types of functors.

(WebCore::colorWithOverridenAlpha):
(WebCore::invertedColorWithOverridenAlpha):
Use auto more consistently.

(WebCore::invertComponent): Deleted.
Replace invertComponent functions with ComponentTraits::maxValue - value inline at callsite.

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

cpp_generator.py:134: SyntaxWarning: "is" with a literal. Did you mean "=="?
https://bugs.webkit.org/show_bug.cgi?id=214530

Patch by Michael Catanzaro <Michael Catanzaro> on 2020-07-19
Reviewed by Philippe Normand.

  • inspector/scripts/codegen/cpp_generator.py:

(CppGenerator.cpp_type_for_unchecked_formal_in_parameter):

Note: See TracTimeline for information about the timeline view.