Timeline



Feb 1, 2021:

11:54 PM Changeset in webkit [272192] by mark.lam@apple.com
  • 2 edits in trunk/Source/WTF

ConcurrentPtrHashSet::contains() should be const.
https://bugs.webkit.org/show_bug.cgi?id=221241

Reviewed by Yusuke Suzuki.

  • wtf/ConcurrentPtrHashSet.h:
11:46 PM Changeset in webkit [272191] by sbarati@apple.com
  • 8 edits in trunk/Source/JavaScriptCore

Sign m_offset in AssemblerLabel
https://bugs.webkit.org/show_bug.cgi?id=221237

Reviewed by Mark Lam.

  • assembler/ARM64Assembler.h:

(JSC::ARM64Assembler::labelForWatchpoint):
(JSC::ARM64Assembler::label):
(JSC::ARM64Assembler::getRelocatedAddress):
(JSC::ARM64Assembler::getDifferenceBetweenLabels):
(JSC::ARM64Assembler::getCallReturnOffset):
(JSC::ARM64Assembler::linkJump):
(JSC::ARM64Assembler::addressOf):

  • assembler/ARMv7Assembler.h:

(JSC::ARMv7Assembler::labelForWatchpoint):
(JSC::ARMv7Assembler::label):
(JSC::ARMv7Assembler::getRelocatedAddress):
(JSC::ARMv7Assembler::getDifferenceBetweenLabels):
(JSC::ARMv7Assembler::getCallReturnOffset):
(JSC::ARMv7Assembler::linkJump):
(JSC::ARMv7Assembler::linkCall):
(JSC::ARMv7Assembler::linkPointer):

  • assembler/AbstractMacroAssembler.h:

(JSC::AbstractMacroAssembler::Jump::link const):
(JSC::AbstractMacroAssembler::Jump::linkTo const):

  • assembler/AssemblerBuffer.h:

(JSC::AssemblerLabel::AssemblerLabel):
(JSC::AssemblerLabel::operator=):
(JSC::AssemblerLabel::isSet const):
(JSC::AssemblerLabel::labelAtOffset const):
(JSC::AssemblerLabel::operator== const):
(JSC::AssemblerLabel::offset const):
(JSC::AssemblerLabel::setOffset):

  • assembler/LinkBuffer.h:

(JSC::LinkBuffer::offsetOf):
(JSC::LinkBuffer::applyOffset):

  • assembler/MIPSAssembler.h:

(JSC::MIPSAssembler::labelForWatchpoint):
(JSC::MIPSAssembler::label):
(JSC::MIPSAssembler::getRelocatedAddress):
(JSC::MIPSAssembler::getDifferenceBetweenLabels):
(JSC::MIPSAssembler::getCallReturnOffset):
(JSC::MIPSAssembler::linkJump):
(JSC::MIPSAssembler::linkCall):
(JSC::MIPSAssembler::linkPointer):

  • assembler/X86Assembler.h:

(JSC::X86Assembler::labelForWatchpoint):
(JSC::X86Assembler::label):
(JSC::X86Assembler::linkJump):
(JSC::X86Assembler::linkCall):
(JSC::X86Assembler::linkPointer):
(JSC::X86Assembler::getCallReturnOffset):
(JSC::X86Assembler::getRelocatedAddress):
(JSC::X86Assembler::getDifferenceBetweenLabels):

9:18 PM Changeset in webkit [272190] by Peng Liu
  • 3 edits in trunk/Source/WebCore

REGRESSION: Fullscreen HTML5 video subtitles/captions are shown twice
https://bugs.webkit.org/show_bug.cgi?id=214634

Reviewed by Eric Carlson.

When we need to hide a text track representation, we can hide it directly. But, when we
need to show(set "hidden" to false) a text track representation, we have to render it first.
Otherwise, the previously rendered content will flash for a short period of time.

Covered by manual test.

  • html/shadow/MediaControlTextTrackContainerElement.cpp:

(WebCore::MediaControlTextTrackContainerElement::updateDisplay):
(WebCore::MediaControlTextTrackContainerElement::updateTextTrackRepresentationImageIfNeeded):
(WebCore::MediaControlTextTrackContainerElement::updateTextTrackRepresentationIfNeeded):

8:47 PM Changeset in webkit [272189] by Ryan Haddad
  • 4 edits in trunk/Tools

Update Test262 bot to Big Sur
https://bugs.webkit.org/show_bug.cgi?id=218844

Reviewed by Yusuke Suzuki.

  • CISupport/build-webkit-org/config.json:
  • CISupport/build-webkit-org/public_html/dashboard/Scripts/WebKitBuildbot.js:

(WebKitBuildbot):

  • CISupport/build-webkit-org/steps_unittest_old.py:
7:23 PM Changeset in webkit [272188] by jer.noble@apple.com
  • 6 edits in trunk/Source

[Cocoa] Disable interstitial events on AVPlayerItem.
https://bugs.webkit.org/show_bug.cgi?id=221215

Reviewed by Eric Carlson.

Source/WebCore:

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

(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerItem):

Source/WebCore/PAL:

  • pal/spi/cocoa/AVFoundationSPI.h:

Source/WTF:

  • wtf/PlatformHave.h:
7:22 PM Changeset in webkit [272187] by ysuzuki@apple.com
  • 12 edits
    2 adds in trunk

[JSC] TypedArray#fill should be implemented in C++
https://bugs.webkit.org/show_bug.cgi?id=221182

Reviewed by Ross Kirsling.

JSTests:

  • stress/bigint-typed-array-fill.js: Added.

(shouldBe):

  • stress/typed-array-fill.js: Added.

(shouldBe):

Source/JavaScriptCore:

Since TypedArray#fill does not invoke callbacks, implementing it in C++ is better.
This removes several utility functions exposed in JS for TypedArray#fill implementation,
and makes TypedArray#fill simple.

  • builtins/BuiltinNames.h:
  • builtins/TypedArrayPrototype.js:

(globalPrivate.typedArrayClampArgumentToStartOrEnd): Deleted.
(fill): Deleted.

  • bytecode/LinkTimeConstant.h:
  • runtime/JSArrayBufferView.cpp:

(JSC::validateTypedArray):

  • runtime/JSGenericTypedArrayViewPrototypeFunctions.h:

(JSC::genericTypedArrayViewProtoFuncFill):

  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::init):

  • runtime/JSGlobalObjectFunctions.cpp:
  • runtime/JSGlobalObjectFunctions.h:
  • runtime/JSTypedArrayViewPrototype.cpp:

(JSC::JSC_DEFINE_HOST_FUNCTION):
(JSC::JSTypedArrayViewPrototype::finishCreation):

  • runtime/JSTypedArrayViewPrototype.h:
7:11 PM Changeset in webkit [272186] by Lauro Moura
  • 4 edits in trunk/LayoutTests

[GLIB] Gardening crashes common to both glib ports

Unreviewed test gardening.

  • platform/glib/TestExpectations:
  • platform/gtk/TestExpectations:
  • platform/wpe/TestExpectations:
6:55 PM Changeset in webkit [272185] by jer.noble@apple.com
  • 2 edits in trunk/Source/WebCore

REGRESSION (iOS 14.2): Can't play html audio with muted attribute
https://bugs.webkit.org/show_bug.cgi?id=219295
<rdar://problem/71863148>

Reviewed by Eric Carlson.

In r266844, we added a power-saving feature that would disable the audio decoder for initially
muted media elements. However, this caused an issue for .mp3 files, where the duration of the
track is computed by the decoder, and not the parser. Since the goal of the power-saving feature
was to reduce the CPU cost for decoding a muted audio track on a <video> element, partially
revert this change by making it apply only to <video> elements and not <audio> ones.

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

(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer):

6:49 PM Changeset in webkit [272184] by jiewen_tan@apple.com
  • 21 edits in trunk

[WebAuthn] Optimize _WKWebAuthenticationPanelDelegate for native API
https://bugs.webkit.org/show_bug.cgi?id=221125
<rdar://problem/71509141>

Reviewed by Brent Fulgham.

Source/WebKit:

This patch mainly does the following few things:

  1. It connects the new SPI with the existing mock testing infrastructure such that we can mock test it.
  2. It adds a new mode in AuthenticatorManager to connect it to the new _WKWebAuthenticationPanelDelegate object.
  3. It adss a new SPI to _WKWebAuthenticationPanelDelegate: -[panel:requestLAContextForUserVerificationWithCompletionHandler:],

and adds a new method within _WKWebAuthenticationAssertionResponse to accept an LAContext from the caller to unlock
the keychain.

  1. It enables -[_WKWebAuthenticationPanel cancel] to use the new cancel method.

Covered by API tests.

  • UIProcess/API/APIWebAuthenticationAssertionResponse.h:

Accepts a LAContext object.

  • UIProcess/API/APIWebAuthenticationPanel.cpp:

(API::WebAuthenticationPanel::WebAuthenticationPanel):
(API::WebAuthenticationPanel::handleRequest):
(API::WebAuthenticationPanel::cancel const):
(API::WebAuthenticationPanel::setMockConfiguration):

  • UIProcess/API/APIWebAuthenticationPanel.h:
  • UIProcess/API/APIWebAuthenticationPanelClient.h:

(API::WebAuthenticationPanelClient::requestLAContextForUserVerification const):
Adds new SPI and mocking.

  • UIProcess/API/Cocoa/_WKWebAuthenticationAssertionResponse.h:
  • UIProcess/API/Cocoa/_WKWebAuthenticationAssertionResponse.mm:

(-[_WKWebAuthenticationAssertionResponse setLAContext:]):
Accepts a LAContext object.

  • UIProcess/API/Cocoa/_WKWebAuthenticationPanel.h:
  • UIProcess/API/Cocoa/_WKWebAuthenticationPanel.mm:

(-[_WKWebAuthenticationPanel setMockConfiguration:]):

  • UIProcess/API/Cocoa/_WKWebAuthenticationPanelForTesting.h:

Adds new SPI and mocking.

  • UIProcess/WebAuthentication/AuthenticatorManager.cpp:

(WebKit::AuthenticatorManager::handleRequest):
(WebKit::AuthenticatorManager::enableModernWebAuthentication):
(WebKit::AuthenticatorManager::enableNativeSupport):
(WebKit::AuthenticatorManager::authenticatorAdded):
(WebKit::AuthenticatorManager::requestLAContextForUserVerification):
(WebKit::AuthenticatorManager::runPresenter):
(WebKit::AuthenticatorManager::dispatchPanelClientCall const):

  • UIProcess/WebAuthentication/AuthenticatorManager.h:

Adds a new mode to power the native API.

  • UIProcess/WebAuthentication/Cocoa/WebAuthenticationPanelClient.h:
  • UIProcess/WebAuthentication/Cocoa/WebAuthenticationPanelClient.mm:

(WebKit::WebAuthenticationPanelClient::WebAuthenticationPanelClient):
(WebKit::WebAuthenticationPanelClient::requestLAContextForUserVerification const):
Accepts a LAContext object.

  • UIProcess/WebAuthentication/Mock/MockLocalConnection.h:
  • UIProcess/WebAuthentication/Mock/MockLocalConnection.mm:

(WebKit::MockLocalConnection::verifyUser):
Adds new mocking functions.

  • UIProcess/WebAuthentication/WebAuthenticationRequestData.h:

Adds the new weak panel.

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/_WKWebAuthenticationPanel.mm:

(-[TestWebAuthenticationPanelDelegate panel:selectAssertionResponse:source:completionHandler:]):
(-[TestWebAuthenticationPanelDelegate panel:requestLAContextForUserVerificationWithCompletionHandler:]):
(TestWebKitAPI::WebCore::reset):
(TestWebKitAPI::TEST):

6:14 PM Changeset in webkit [272183] by Patrick Angle
  • 2 edits in trunk/Source/WebInspectorUI

REGRESSION(r270637): Web Inspector: Filtering field no longer shows in Computed panel
https://bugs.webkit.org/show_bug.cgi?id=221001

Reviewed by Devin Rousso.

The filter bar keeps separate filters for the Rules and Computed panes. It is therefor incorrect to hide the
entire filter bar when showing multiple sidebars, instead hide the controls that have a common state between the
two panels (the Classes list).

  • UserInterface/Views/GeneralStyleDetailsSidebarPanel.css:

(.multi-sidebar.showing-multiple > .sidebar > .panel.details:not(.style-rules) > .content > .pseudo-classes,):

6:10 PM Changeset in webkit [272182] by Nikita Vasilyev
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: add Box Model into Layout panel
https://bugs.webkit.org/show_bug.cgi?id=220987

Reviewed by BJ Burg.

Add Box Model section to the experimental Layout panel.

  • UserInterface/Views/LayoutDetailsSidebarPanel.js:

(WI.LayoutDetailsSidebarPanel):
(WI.LayoutDetailsSidebarPanel.prototype.get minimumWidth):
(WI.LayoutDetailsSidebarPanel.prototype.inspect):
(WI.LayoutDetailsSidebarPanel.prototype.initialLayout):
(WI.LayoutDetailsSidebarPanel.prototype.layout):
(WI.LayoutDetailsSidebarPanel.prototype._nodeStylesRefreshed):
(WI.LayoutDetailsSidebarPanel.prototype._nodeStylesNeedsRefreshed):

5:03 PM Changeset in webkit [272181] by Truitt Savell
  • 2 edits in trunk/LayoutTests

[BigSur wk1] imported/w3c/web-platform-tests/media-source/mediasource-invalid-codec.html is consistently failing
https://bugs.webkit.org/show_bug.cgi?id=221146

Unreviewed test gardening.

Patch by Amir Mark Jr <Amir Mark Jr.> on 2021-02-01

  • platform/mac-wk1/TestExpectations:
4:14 PM Changeset in webkit [272180] by Simon Fraser
  • 11 edits in trunk/Source/WebCore

Devirtualize InputType::supportsValidation()
https://bugs.webkit.org/show_bug.cgi?id=221216

Reviewed by Yusuke Suzuki.

InputType::supportsValidation() can just check the type. Use an OptionSet<> of exclusions
for clarity.

  • html/ButtonInputType.cpp:

(WebCore::ButtonInputType::supportsValidation const): Deleted.

  • html/ButtonInputType.h:
  • html/HiddenInputType.cpp:

(WebCore::HiddenInputType::supportsValidation const): Deleted.

  • html/HiddenInputType.h:
  • html/ImageInputType.cpp:

(WebCore::ImageInputType::supportsValidation const): Deleted.

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

(WebCore::InputType::supportsValidation const): Deleted.

  • html/InputType.h:

(WebCore::InputType::supportsValidation const):

  • html/ResetInputType.cpp:

(WebCore::ResetInputType::supportsValidation const): Deleted.

  • html/ResetInputType.h:
4:09 PM Changeset in webkit [272179] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit

[WPE][GTK] flatpak-spawn subsandbox clears environment variables, breaks EphyPermissionsManager
https://bugs.webkit.org/show_bug.cgi?id=219325

Patch by Michael Catanzaro <Michael Catanzaro> on 2021-02-01
Reviewed by Adrian Perez de Castro.

Manually forward all environment variables from the web process to the UI process.
EphyPermissionsManager is breaking because XDG directories are not set in the web process,
because flatpak-spawn launches subprocesses with the environment of the host system rather
than the environment of the parent process. But also, we really need to forward the entire
environment, because otherwise basic expected features like GST_DEBUG, G_MESSAGES_DEBUG, and
such will be broken.

  • UIProcess/Launcher/glib/FlatpakLauncher.cpp:

(WebKit::flatpakSpawn):

2:56 PM Changeset in webkit [272178] by graouts@webkit.org
  • 11 edits in trunk/Source

Allow support for CAAnimationGroup
https://bugs.webkit.org/show_bug.cgi?id=221209

Reviewed by Dean Jackson, Sam Weinig and Simon Fraser.

In order to fix bug 219894, we need to use Core Animation's CAAnimationGroup and its
Source/WebCore:

setAnimations() method. This patch adds a new "Group" type to PlatformCAAnimation and
platform-specific integration for Windows and Cocoa ports.

  • platform/graphics/ca/PlatformCAAnimation.cpp:

(WebCore::operator<<):

  • platform/graphics/ca/PlatformCAAnimation.h:
  • platform/graphics/ca/cocoa/PlatformCAAnimationCocoa.h:
  • platform/graphics/ca/cocoa/PlatformCAAnimationCocoa.mm:

(WebCore::PlatformCAAnimationCocoa::PlatformCAAnimationCocoa):
(WebCore::PlatformCAAnimationCocoa::keyPath const):
(WebCore::PlatformCAAnimationCocoa::setTimingFunction):
(WebCore::PlatformCAAnimationCocoa::isAdditive const):
(WebCore::PlatformCAAnimationCocoa::setAdditive):
(WebCore::PlatformCAAnimationCocoa::valueFunction const):
(WebCore::PlatformCAAnimationCocoa::setValueFunction):
(WebCore::PlatformCAAnimationCocoa::setFromValue):
(WebCore::PlatformCAAnimationCocoa::copyFromValueFrom):
(WebCore::PlatformCAAnimationCocoa::setToValue):
(WebCore::PlatformCAAnimationCocoa::copyToValueFrom):
(WebCore::PlatformCAAnimationCocoa::setValues):
(WebCore::PlatformCAAnimationCocoa::copyValuesFrom):
(WebCore::PlatformCAAnimationCocoa::setKeyTimes):
(WebCore::PlatformCAAnimationCocoa::copyKeyTimesFrom):
(WebCore::PlatformCAAnimationCocoa::setTimingFunctions):
(WebCore::PlatformCAAnimationCocoa::copyTimingFunctionsFrom):
(WebCore::PlatformCAAnimationCocoa::setAnimations):
(WebCore::PlatformCAAnimationCocoa::copyAnimationsFrom):

  • platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:

(WebCore::PlatformCALayerCocoa::addAnimationForKey):
(WebCore::PlatformCALayerCocoa::animationForKey):

  • platform/graphics/ca/win/PlatformCAAnimationWin.cpp:

(PlatformCAAnimationWin::PlatformCAAnimationWin):
(PlatformCAAnimationWin::setAnimations):
(PlatformCAAnimationWin::copyAnimationsFrom):

  • platform/graphics/ca/win/PlatformCAAnimationWin.h:

Source/WebKit:

setAnimations() method. Add support for the new "Group" PlatformCAAnimation type for
the remote animations.

  • WebProcess/WebPage/RemoteLayerTree/PlatformCAAnimationRemote.h:
  • WebProcess/WebPage/RemoteLayerTree/PlatformCAAnimationRemote.mm:

(WebKit::PlatformCAAnimationRemote::Properties::encode const):
(WebKit::PlatformCAAnimationRemote::Properties::decode):
(WebKit::PlatformCAAnimationRemote::copy const):
(WebKit::PlatformCAAnimationRemote::setAnimations):
(WebKit::PlatformCAAnimationRemote::copyAnimationsFrom):
(WebKit::createAnimation):
(WebKit::addAnimationToLayer):
(WebKit::operator<<):

2:02 PM Changeset in webkit [272177] by Alan Coon
  • 8 edits in branches/safari-612.1.2-branch/Source

Versioning.

WebKit-7612.1.2

1:53 PM Changeset in webkit [272176] by Alan Coon
  • 1 copy in branches/safari-612.1.2-branch

New branch.

1:42 PM Changeset in webkit [272175] by Wenson Hsieh
  • 4 edits in trunk/Source/WebKit

Add a cross-platform helper method to generate shareable bitmaps from rendered images
https://bugs.webkit.org/show_bug.cgi?id=221217

Reviewed by Tim Horton.

Pull what is currently iOS-specific logic in imagePositionInformation out into a private, cross-platform
helper method on WebPage. No change in behavior.

  • WebProcess/WebPage/WebPage.cpp:
  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::imagePositionInformation):

1:40 PM Changeset in webkit [272174] by sbarati@apple.com
  • 9 edits
    4 adds in trunk

Lazily create m_windowCloseWatchpoints so we don't mistakenly think we have a frame when re-associating a document to a given cached frame
https://bugs.webkit.org/show_bug.cgi?id=221098
<rdar://72894454>

Reviewed by Ryosuke Niwa and Mark Lam.

.:

  • ManualTests/dont-create-invalid-watchpoint-when-going-back.html: Added.
  • ManualTests/resources/empty-text.txt: Added.
  • ManualTests/resources/full_results.json: Added.
  • ManualTests/resources/test-results-page.html: Added.

Source/JavaScriptCore:

  • bytecode/AccessCase.cpp:

(JSC::AccessCase::commit):

  • bytecode/Watchpoint.h:

(JSC::WatchpointSet::isStillValidOnJSThread const):

  • runtime/PropertySlot.h:

(JSC::PropertySlot::setWatchpointSet):

Source/WebCore:

There's a scenario when we go back while using the back forward cache, and
we re-associate a cached frame with a document, that we were creating an
already invalidated "frame cleared" watchpoint.
There were a few things we were doing wrong:

  1. In JSDOMWindowBase's constructor, we thought that we didn't have a frame,

even though we did. It was because we hadn't finished the bookkeeping in
FrameLoader::open(CachedFrameBase& cachedFrame) that associates a document with a
frame. And DOMWindow relies on its document to get its frame.

  1. When the watchpoint was invalidated, we were still telling the PropertySlot

about it. This was breaking JSC's invariant that these had to be valid
watchpoints.

This patch resolves:

  1. We now lazily create the watchpoint when we first need it. By that time, we

would've already been associated with a frame in the above example.

  1. We check if the watchpoint is still valid before telling the PropertySlot

about it, instead of always assuming it's valid.

I wasn't able to get this test to fail in WKTR/DRT, because it seems to be
we're crashing when running some JS code from Safari's injected bundle. I've
added a manual test instead.

  • bindings/js/JSDOMWindowBase.cpp:

(WebCore::JSDOMWindowBase::JSDOMWindowBase):

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

(WebCore::JSDOMWindow::getOwnPropertySlot):

1:27 PM Changeset in webkit [272173] by stephan.szabo@sony.com
  • 2 edits in trunk/Source/WebKit

[PlayStation] Build fix after r272058
https://bugs.webkit.org/show_bug.cgi?id=221141

Unreviewed build fix.

  • Platform/unix/SharedMemoryUnix.cpp: Include ArgumentCoders.h on PlayStation
1:24 PM Changeset in webkit [272172] by don.olmstead@sony.com
  • 6 edits in trunk/Tools

[webkitscmpy] Use shutil to find scm executable paths
https://bugs.webkit.org/show_bug.cgi?id=221220

Reviewed by Jonathan Bedard.

Using /usr/bin/which is not a cross platform way to determine the path to an executable.
In Python 3 shutil gailed a which function which provides the same functionality as the
which executable and works on Windows.

Added the whichcraft library which is a backport of shutil.which to Python 2.7. If
Python 3 is available it just uses shutil directly. The library can be dropped once Python
2.7 support is jettisoned.

  • Scripts/libraries/webkitscmpy/setup.py:
  • Scripts/libraries/webkitscmpy/webkitscmpy/init.py:
  • Scripts/libraries/webkitscmpy/webkitscmpy/local/scm.py:

(Scm.executable):

  • Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/git.py:
  • Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/svn.py:
1:18 PM Changeset in webkit [272171] by don.olmstead@sony.com
  • 4 edits in trunk

[Curl] Enable FTP protocol only when ENABLE_FTPDIR is on
https://bugs.webkit.org/show_bug.cgi?id=220941

Reviewed by Fujii Hironori.

.:

Turn off ENABLE_FTPDIR for WinCairo. The version of cURL used has FTP support explicitly
disabled.

  • Source/cmake/OptionsWin.cmake:

Source/WebCore:

cURL supports a large number of protocols but only HTTP(S) and FILE should be enabled by
default. Make the FTP(S) protocols dependent on whether ENABLE(FTPDIR) is enabled or not.

  • platform/network/curl/CurlContext.cpp:

(WebCore::CurlHandle::enableAllowedProtocols):

12:56 PM Changeset in webkit [272170] by ysuzuki@apple.com
  • 64 edits
    2 copies
    12 adds in trunk

[JSC] Implement BigInt64Array and BigUint64Array
https://bugs.webkit.org/show_bug.cgi?id=190800

Reviewed by Ross Kirsling.

JSTests:

Through this patch, we encounter two test262 failures and found that these tests have issues.

  • stress/bigint-typed-array-array-modes-profile.js: Added.

(foo):

  • stress/bigint-typed-array-byte-offset.js: Added.

(foo):

  • stress/bigint-typed-array-canonical-numeric-index-string.js: Added.

(makeTest.assert):
(makeTest):
(const.testInvalidIndices.makeTest.set assert):
(const.testInvalidIndices.makeTest):
(const.testValidIndices.makeTest.set assert):
(const.testValidIndices.makeTest):

  • stress/bigint-typed-array-constructor-undefined.js: Added.
  • stress/bigint-typed-array-get-by-val-profiling.js: Added.

(testArray.testCode):
(testArray):

  • stress/bigint-typed-array-lastIndexOf-exception-check.js: Added.
  • stress/bigint-typed-array-put-by-val-profiling.js: Added.

(testArray.testCode):
(testArray):

  • stress/bigint-typedarray-getownproperty.js: Added.

(assert):
(foo):

  • stress/bigint64array-bytelength.js: Added.

(test1):
(test2):
(shouldBe):

  • stress/bigint64array-get-by-val.js: Added.

(shouldBe):
(test1):
(test2):

  • stress/bigint64array-put-by-val.js: Added.

(shouldBe):
(test11):
(test12):
(test21):
(test22):

  • test262/config.yaml:
  • test262/expectations.yaml:

Source/JavaScriptCore:

This patch implements BigInt64Array and BigUint64Array.

  1. In this patch, we do not support BigInt64Array/BigUint64Array + Atomics yet.
  2. We make canGetIndexQuickly false for BigInt64Array and BigUint64Array. And we use generic path for getting values from BigInt64Array and BigUint64Array. We will optimize it in [1] and [2]. But possibly, this does not have super large impact on performance since getting value from BigInt64Array and BigUint64Array are already costly since we always need to allocate BigInt for results.
  3. DFG / FTL GetByVal etc. are using Array::Generic for BigInt64Array and BigUint64Array.
  4. But GetArrayLength, CheckArray, byteLength getter etc. are using Array::BigInt64Array / Array::BigUint64Array for optimization.
  5. Extend ArrayProfile's ArrayMode for BigInt64Array and BigUint64Array so that ArrayProfile can record BigInt64Array and BigUint64Array information.
  6. Implement DataView#{setBigInt64,setBigUint64,getBigInt64,getBigUint64}.
  7. Extend JSC APIs to support BigInt64Array and BigUint64Array.

[1]: https://bugs.webkit.org/show_bug.cgi?id=221181
[2]: https://bugs.webkit.org/show_bug.cgi?id=221183

  • API/JSTypedArray.cpp:

(toJSTypedArrayType):
(toTypedArrayType):
(createTypedArray):

  • API/JSValueRef.h:
  • API/tests/TypedArrayCTest.cpp:

(forEachTypedArrayType):

  • CMakeLists.txt:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • builtins/BuiltinNames.h:
  • builtins/TypedArrayPrototype.js:

(fill):
(map):
(filter):

  • bytecode/ArrayProfile.cpp:

(JSC::dumpArrayModes):

  • bytecode/ArrayProfile.h:
  • bytecode/ByValInfo.h:

(JSC::jitArrayModeForClassInfo):
(JSC::jitArrayModePermitsPut):
(JSC::typedArrayTypeForJITArrayMode):

  • bytecode/LinkTimeConstant.h:
  • bytecode/SpeculatedType.cpp:

(JSC::dumpSpeculation):
(JSC::speculationToAbbreviatedString):
(JSC::speculationFromTypedArrayType):
(JSC::typedArrayTypeFromSpeculation):
(JSC::speculationFromString):

  • bytecode/SpeculatedType.h:

(JSC::isBigInt64ArraySpeculation):
(JSC::isBigUint64ArraySpeculation):
(JSC::isDirectArgumentsSpeculation):
(JSC::isScopedArgumentsSpeculation):
(JSC::isActionableIntMutableArraySpeculation): Deleted.
(JSC::isActionableFloatMutableArraySpeculation): Deleted.
(JSC::isActionableTypedMutableArraySpeculation): Deleted.
(JSC::isActionableMutableArraySpeculation): Deleted.
(JSC::isActionableArraySpeculation): Deleted.

  • dfg/DFGAbstractInterpreterInlines.h:

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

  • dfg/DFGArrayMode.cpp:

(JSC::DFG::ArrayMode::fromObserved):
(JSC::DFG::ArrayMode::refine const):
(JSC::DFG::ArrayMode::alreadyChecked const):
(JSC::DFG::arrayTypeToString):
(JSC::DFG::toTypedArrayType):
(JSC::DFG::toArrayType):
(JSC::DFG::permitsBoundsCheckLowering):

  • dfg/DFGArrayMode.h:

(JSC::DFG::ArrayMode::supportsSelfLength const):
(JSC::DFG::ArrayMode::arrayModesThatPassFiltering const):

  • dfg/DFGClobberize.h:

(JSC::DFG::clobberize):

  • dfg/DFGFixupPhase.cpp:

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

  • dfg/DFGOperations.cpp:

(JSC::DFG::JSC_DEFINE_JIT_OPERATION):

  • dfg/DFGOperations.h:

(JSC::DFG::operationNewTypedArrayWithSizeForType):
(JSC::DFG::operationNewTypedArrayWithOneArgumentForType):

  • dfg/DFGPredictionPropagationPhase.cpp:
  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileHasIndexedProperty):

  • dfg/DFGSpeculativeJIT64.cpp:

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

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileGetByVal):
(JSC::FTL::DFG::LowerDFGToB3::compilePutByVal):

  • inspector/JSInjectedScriptHost.cpp:

(Inspector::JSInjectedScriptHost::subtype):

  • jit/JITPropertyAccess.cpp:

(JSC::JIT::privateCompilePutByVal):

  • jit/Repatch.cpp:

(JSC::tryCacheArrayGetByVal):

  • llint/LowLevelInterpreter.asm:
  • runtime/AtomicsObject.cpp:
  • runtime/AtomicsObject.h:
  • runtime/BigInt64Array.h: Copied from Source/JavaScriptCore/runtime/JSTypedArrayConstructors.cpp.
  • runtime/BigUint64Array.h: Copied from Source/JavaScriptCore/runtime/JSTypedArrayConstructors.cpp.
  • runtime/JSArrayBufferView.cpp:

(JSC::elementSize):
(JSC::validateTypedArray):

  • runtime/JSArrayBufferView.h:
  • runtime/JSBigInt.h:
  • runtime/JSCell.h:
  • runtime/JSDataView.h:
  • runtime/JSDataViewPrototype.cpp:

(JSC::getData):
(JSC::JSC_DEFINE_HOST_FUNCTION):

  • runtime/JSGenericTypedArrayView.h:
  • runtime/JSGenericTypedArrayViewConstructor.h:
  • runtime/JSGenericTypedArrayViewConstructorInlines.h:

(JSC::constructGenericTypedArrayViewWithArguments):

  • runtime/JSGenericTypedArrayViewInlines.h:

(JSC::JSGenericTypedArrayView<Adaptor>::setWithSpecificType):
(JSC::JSGenericTypedArrayView<Adaptor>::set):
(JSC::JSGenericTypedArrayView<Adaptor>::getOwnPropertySlotByIndex):

  • runtime/JSGenericTypedArrayViewPrototypeFunctions.h:

(JSC::genericTypedArrayViewProtoFuncJoin):
(JSC::genericTypedArrayViewProtoFuncSlice):
(JSC::genericTypedArrayViewPrivateFuncSubarrayCreate):

  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::init):

  • runtime/JSGlobalObjectFunctions.cpp:

(JSC::JSC_DEFINE_HOST_FUNCTION):

  • runtime/JSGlobalObjectFunctions.h:
  • runtime/JSType.cpp:

(WTF::printInternal):

  • runtime/JSType.h:
  • runtime/JSTypedArrayConstructors.cpp:
  • runtime/JSTypedArrayConstructors.h:
  • runtime/JSTypedArrayPrototypes.cpp:
  • runtime/JSTypedArrayPrototypes.h:
  • runtime/JSTypedArrayViewPrototype.cpp:

(JSC::JSC_DEFINE_HOST_FUNCTION):

  • runtime/JSTypedArrayViewPrototype.h:
  • runtime/JSTypedArrays.cpp:
  • runtime/JSTypedArrays.h:
  • runtime/ToNativeFromValue.h:

(JSC::toNativeFromValue):
(JSC::toNativeFromValueWithoutCoercion):

  • runtime/TypedArrayAdaptors.h:

(JSC::IntegralTypedArrayAdaptor::toJSValue):
(JSC::FloatTypedArrayAdaptor::toJSValue):
(JSC::BigIntTypedArrayAdaptor::toJSValue):
(JSC::BigIntTypedArrayAdaptor::toNativeFromInt32):
(JSC::BigIntTypedArrayAdaptor::toNativeFromUint32):
(JSC::BigIntTypedArrayAdaptor::toNativeFromDouble):
(JSC::BigIntTypedArrayAdaptor::convertTo):
(JSC::Uint8ClampedAdaptor::toJSValue):
(JSC::IntegralTypedArrayAdaptor::toDouble): Deleted.
(JSC::FloatTypedArrayAdaptor::toDouble): Deleted.
(JSC::Uint8ClampedAdaptor::toDouble): Deleted.

  • runtime/TypedArrayType.cpp:

(JSC::constructorClassInfoForType):
(WTF::printInternal):

  • runtime/TypedArrayType.h:

(JSC::isBigIntTypedView):
(JSC::logElementSize):
(JSC::isBigInt):
(JSC::isSigned):
(JSC::contentType):

  • runtime/TypedArrays.h:
  • runtime/VM.cpp:
  • runtime/VM.h:
12:56 PM Changeset in webkit [272169] by Jonathan Bedard
  • 7 edits in trunk/Tools

[webkitcorepy] Support machines without Unix signal handling
https://bugs.webkit.org/show_bug.cgi?id=221150
<rdar://problem/73769605>

Rubber-stamped by Aakash Jain.

  • Scripts/libraries/webkitcorepy/setup.py: Bump version.
  • Scripts/libraries/webkitcorepy/webkitcorepy/init.py: Ditto.
  • Scripts/libraries/webkitcorepy/webkitcorepy/mocks/popen.py:

(PopenBase):
(PopenBase.send_signal): Handle undefined signal variables.
(PopenBase.terminate):
(PopenBase.kill):

  • Scripts/libraries/webkitcorepy/webkitcorepy/task_pool.py:

(Process.handler): Handle undefined signal variable.
(Process.main): Ditto.

  • Scripts/libraries/webkitcorepy/webkitcorepy/timeout.py:

(Timeout): Timeout class should own SIGALRM.
(Timeout.DisableAlarm.enter): Do not disable alarm if alarm is not available.
(Timeout.check): Pass SIGALRM owned by Timeout object.
(Timeout.bind): Do not disable alarm if alarm is not available, use SIGALRM owned by the Timeout object.
(Timeout.bind.handler): Ditto.
(Timeout.sleep): Use SIGALRM owned by the Timeout object.

12:51 PM Changeset in webkit [272168] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC][IFC] "Find the trailing index" logic repeated in InlineContentBreaker::processOverflowingTextContent
https://bugs.webkit.org/show_bug.cgi?id=221204

Reviewed by Antti Koivisto.

Refactor InlineContentBreaker::processOverflowingTextContent as described below

  1. find the overflowing run first
  2. test if the overflowing run is breakable and try breaking it. If so, return the trailing content.
  3. test if any run on the left side is breakable and try breaking it. If so, return the trailing content.
  4. test if any run on the right side is breakable and try breaking it. If so, return the trailing content.
  5. this content is not breakable

The "return the trailing content" code checks if we are at an inline box boundary and adjust the tailing index accordingly.
This was implemented for both #2 and #4. This logic now lives in findTrailingRunIndex.

  • layout/inlineformatting/InlineContentBreaker.cpp:

(WebCore::Layout::InlineContentBreaker::processOverflowingTextContent const):

12:37 PM Changeset in webkit [272167] by aboya@igalia.com
  • 2 edits in trunk/Tools

autoinstall.py: Don't use an XML parser to parse HTML
https://bugs.webkit.org/show_bug.cgi?id=221162

Reviewed by Jonathan Bedard.

Very recently autoinstall.py started failing becagse the page returned
by https://pypi.org/simple/fasteners/ now contains a <meta> tag, which
is not parseable as XML without the trailing slash.

Despite what an initial fix in r272041 stated, this is not caused by
invalid HTML: <meta> tags are not required to have an ending slash to
be standards compliant in any version of HTML.

This patch replaces that code to use an HTML parser instead of an XML
parser, making it more robust.

  • Scripts/libraries/webkitcorepy/webkitcorepy/autoinstall.py:

(SimplyPypiIndexPageParser):
(SimplyPypiIndexPageParser.init):
(SimplyPypiIndexPageParser.handle_starttag):
(SimplyPypiIndexPageParser.handle_data):
(SimplyPypiIndexPageParser.handle_endtag):
(SimplyPypiIndexPageParser.parse):
(Package.archives):

12:36 PM Changeset in webkit [272166] by youenn@apple.com
  • 5 edits
    3 adds in trunk

ReadableStream C++ methods should check for exception
https://bugs.webkit.org/show_bug.cgi?id=215376
<rdar://problem/66816192>

Reviewed by Alex Christensen.

Source/WebCore:

Refactor code to catch and handle exceptions in case of ReadableStream methods.
Exceptions can happen in case of worker being abruptly terminated, which can only be tested flakily.

In case of tee, if an exception happens, we return a WTF::nullopt.

Test: streams/readable-stream-tee-worker.html

  • Modules/fetch/FetchBody.cpp:

(WebCore::FetchBody::clone):

  • bindings/js/ReadableStream.cpp:

(WebCore::invokeReadableStreamFunction):
(WebCore::ReadableStream::pipeTo):
(WebCore::ReadableStream::tee):
(WebCore::ReadableStream::lock):
(WebCore::checkReadableStream):

  • bindings/js/ReadableStream.h:

LayoutTests:

  • streams/readable-stream-tee-worker-expected.txt: Added.
  • streams/readable-stream-tee-worker.html: Added.
  • streams/readable-stream-tee.js: Added.

(teeRepetitively):
(test):

12:30 PM Changeset in webkit [272165] by commit-queue@webkit.org
  • 28 edits in trunk

Use user media permission prompt for speech recognition
https://bugs.webkit.org/show_bug.cgi?id=221082
rdar://problem/73372499

Patch by Sihui Liu <sihui_liu@appe.com> on 2021-02-01
Reviewed by Youenn Fablet.

Source/WebCore:

Add frame identifier to SpeechRecognitionRequest as it is needed for checking user media permission.

Updated existing tests for changed behavior.

  • Modules/speech/SpeechRecognition.cpp:

(WebCore::SpeechRecognition::startRecognition):

  • Modules/speech/SpeechRecognitionConnection.h:
  • Modules/speech/SpeechRecognitionRequest.h:

(WebCore::SpeechRecognitionRequest::frameIdentifier const):

  • Modules/speech/SpeechRecognitionRequestInfo.h:

(WebCore::SpeechRecognitionRequestInfo::encode const):
(WebCore::SpeechRecognitionRequestInfo::decode):

  • page/DummySpeechRecognitionProvider.h:

Source/WebKit:

Make SpeechRecognitionPermissionManager ask UserMediaPermissionRequestManagerProxy for user permission on
microphone.

  • UIProcess/SpeechRecognitionPermissionManager.cpp:

(WebKit::SpeechRecognitionPermissionManager::request):
(WebKit::SpeechRecognitionPermissionManager::startProcessingRequest):
(WebKit::SpeechRecognitionPermissionManager::requestUserPermission):

  • UIProcess/SpeechRecognitionPermissionManager.h:
  • UIProcess/SpeechRecognitionPermissionRequest.h:

(WebKit::SpeechRecognitionPermissionRequest::create):
(WebKit::SpeechRecognitionPermissionRequest::frameIdentifier const):
(WebKit::SpeechRecognitionPermissionRequest::SpeechRecognitionPermissionRequest):

  • UIProcess/SpeechRecognitionServer.cpp:

(WebKit::SpeechRecognitionServer::start):
(WebKit::SpeechRecognitionServer::requestPermissionForRequest):

  • UIProcess/SpeechRecognitionServer.h:
  • UIProcess/SpeechRecognitionServer.messages.in:
  • UIProcess/UserMediaPermissionRequestManagerProxy.cpp:

(WebKit::UserMediaPermissionRequestManagerProxy::denyRequest):
(WebKit::UserMediaPermissionRequestManagerProxy::grantRequest):
(WebKit::UserMediaPermissionRequestManagerProxy::checkUserMediaPermissionForSpeechRecognition):

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

(WebKit::UserMediaPermissionRequestProxy::UserMediaPermissionRequestProxy):

  • UIProcess/UserMediaPermissionRequestProxy.h:

(WebKit::UserMediaPermissionRequestProxy::create):
(WebKit::UserMediaPermissionRequestProxy::decisionCompletionHandler):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::requestSpeechRecognitionPermission):
(WebKit::WebPageProxy::requestUserMediaPermissionForSpeechRecognition):

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

(WebKit::WebProcessProxy::createSpeechRecognitionServer):

  • WebProcess/WebCoreSupport/WebSpeechRecognitionConnection.cpp:

(WebKit::WebSpeechRecognitionConnection::start):

  • WebProcess/WebCoreSupport/WebSpeechRecognitionConnection.h:

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/SpeechRecognition.mm:

(-[SpeechRecognitionUIDelegate _webView:requestMediaCaptureAuthorization:decisionHandler:]):

LayoutTests:

  • fast/speechrecognition/permission-error.html:
  • fast/speechrecognition/start-recognition-in-removed-iframe-expected.txt:
  • fast/speechrecognition/start-recognition-in-removed-iframe.html:
12:22 PM Changeset in webkit [272164] by Wenson Hsieh
  • 6 edits
    1 add in trunk/Source

Add some new data structures to represent image extraction results
https://bugs.webkit.org/show_bug.cgi?id=221214

Reviewed by Sam Weinig.

Source/WebCore:

Introduce ImageExtractionResult, which will only contain a list of ImageExtractionTextData structures for
now; each ImageExtractionTextData is composed of a piece of text, as well as a normalized quad representing
the location of the text relative to the extracted image.

  • platform/ImageExtractionResult.h: Added.

(WebCore::ImageExtractionTextData::encode const):
(WebCore::ImageExtractionTextData::decode):
(WebCore::ImageExtractionResult::isEmpty const):
(WebCore::ImageExtractionResult::encode const):
(WebCore::ImageExtractionResult::decode):

  • platform/graphics/FloatQuad.h:

(WebCore::FloatQuad::encode const):
(WebCore::FloatQuad::decode):

Add generic encoding and decoding support for WebCore::FloatQuad, and remove iOS-specific WebKit2 argument
coder logic for serializing FloatQuad (see WebKit2 changes).

Source/WebKit:

See WebCore ChangeLog for more details.

  • Shared/WebCoreArgumentCoders.cpp:
  • Shared/WebCoreArgumentCoders.h:
12:12 PM Changeset in webkit [272163] by Alan Coon
  • 5 edits
    2 adds in branches/safari-611-branch

Cherry-pick r271933. rdar://problem/73838863

REGRESSION (r268947) Some table elements become blank when scroll-bar is toggled
https://bugs.webkit.org/show_bug.cgi?id=221016
<rdar://72881404>

Reviewed by Zalan Bujtas.
Source/WebCore:

FloatingObject aliased the state of layer->isSelfPainting() in its m_shouldPaint,
so when compositing code changed isSelfPaintingLayer() for a layer that is also
a float post-layout, FloatingObject was left in a state where it didn't paint.

Fix by dissociating FloatingObject's shouldPaint from the state of the layer.
Rename shouldPaint() to paintsFloat() for clarity (multiple FloatingObjects in
different block flows can represent the same float, and only one paints the float).

Test: compositing/scrolling/async-overflow-scrolling/self-painting-layer-float.html

  • rendering/FloatingObjects.cpp: (WebCore::FloatingObject::FloatingObject): (WebCore::FloatingObject::create): (WebCore::FloatingObject::cloneForNewParent const): (WebCore::FloatingObject::shouldPaint const): (WebCore::operator<<):
  • rendering/FloatingObjects.h: (WebCore::FloatingObject::paintsFloat const): (WebCore::FloatingObject::setPaintsFloat): (WebCore::FloatingObject::shouldPaint const): Deleted. (WebCore::FloatingObject::setShouldPaint): Deleted.
  • rendering/RenderBlockFlow.cpp: (WebCore::RenderBlockFlow::repaintOverhangingFloats): (WebCore::RenderBlockFlow::paintFloats): (WebCore::RenderBlockFlow::insertFloatingObject): (WebCore::RenderBlockFlow::addOverhangingFloats): (WebCore::RenderBlockFlow::hitTestFloats): (WebCore::RenderBlockFlow::adjustForBorderFit const):

LayoutTests:

  • compositing/scrolling/async-overflow-scrolling/self-painting-layer-float-expected.html: Added.
  • compositing/scrolling/async-overflow-scrolling/self-painting-layer-float.html: Added.

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

12:11 PM Changeset in webkit [272162] by Alan Coon
  • 7 edits in branches/safari-611-branch/Source/WebCore

Cherry-pick r271906. rdar://problem/73838863

Make showRenderTree() dump FloatingObjects
https://bugs.webkit.org/show_bug.cgi?id=220991

Reviewed by Zalan Bujtas.

It's useful to see which RenderBlockFlows have floating object sets and which
floating objects they contain, so dump that in render tree dumps.

Other minor logging/initializer cleanup.

  • rendering/FloatingObjects.cpp: (WebCore::operator<<): (WebCore::FloatingObjects::FloatingObjects):
  • rendering/FloatingObjects.h:
  • rendering/RenderBlockFlow.cpp: (WebCore::RenderBlockFlow::outputFloatingObjects const):
  • rendering/RenderBlockFlow.h:
  • rendering/RenderObject.cpp: (WebCore::RenderObject::outputRenderSubTreeAndMark const):
  • rendering/RenderView.cpp:

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

12:11 PM Changeset in webkit [272161] by Alan Coon
  • 3 edits
    2 adds in branches/safari-611-branch

Cherry-pick r272059. rdar://problem/73838832

REGRESSION(r262893): feComponentTransfer is not rendered correctly on Retina display
https://bugs.webkit.org/show_bug.cgi?id=220576

Reviewed by Simon Fraser.

Source/WebCore:

convertImageDataToColorSpace() creates a temporary ImageBuffer with the
size of m_premultipliedImageResult. This ImageBuffer has to be scaled
with the filterScale(). But the size of m_premultipliedImageResult is
scaled with the filterScale(). This means, convertImageDataToColorSpace()
applies the filterScale() twice to the temporary ImageBuffer.

The fix is to create the temporary ImageBuffer with the unscaled size of
the input ImageData and scale it with the filterScale().

Test: fast/hidpi/filters-component-transfer.html

  • platform/graphics/filters/FilterEffect.cpp: (WebCore::FilterEffect::convertImageDataToColorSpace): (WebCore::FilterEffect::copyPremultipliedResult):

LayoutTests:

  • fast/hidpi/filters-component-transfer-expected.html: Added.
  • fast/hidpi/filters-component-transfer.html: Added.

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

12:11 PM Changeset in webkit [272160] by Alan Coon
  • 4 edits
    2 adds in branches/safari-611-branch

Cherry-pick r272054. rdar://problem/73838900

[css-flexbox] REGRESSION(r266695): content inside a <button> inside a flex container has a height of 0 without a declared min-height
https://bugs.webkit.org/show_bug.cgi?id=220946

Reviewed by Zalan Bujtas.

Source/WebCore:

Test: css3/flexbox/percentage-descendants-of-skipped-flex-item.html

r252620 added an optimization which saves layouts for flexbox containers' descendants with percentage heights.
That optimization relies on a hash map of percentage height descendants that is filled in with calls to
addPercentHeightDescendant().

FlexibleBoxImpl's like RenderButton might wrap their children in anonymous blocks. Those anonymous blocks are
skipped for percentage height calculations in RenderBox::computePercentageLogicalHeight() and thus
addPercentHeightDescendant() is never called for them. This means that hasPercentageHeightDescendants() would
always wrongly return false for a child of a <button> with a percentage height.

  • rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::childHasPercentHeightDescendants const): Renamed from hasPercentHeightDescendants in order not to clash with RenderBlock method. It now also checks whether flex items skipped from percentage height calculations are the containing blocks of any percentage height descendant of the flex container (WebCore::RenderFlexibleBox::layoutAndPlaceChildren): (WebCore::RenderFlexibleBox::hasPercentHeightDescendants const): Deleted.
  • rendering/RenderFlexibleBox.h:

LayoutTests:

  • css3/flexbox/percentage-descendants-of-skipped-flex-item-expected.html: Added.
  • css3/flexbox/percentage-descendants-of-skipped-flex-item.html: Added.

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

12:11 PM Changeset in webkit [272159] by Alan Coon
  • 3 edits in branches/safari-611-branch

Cherry-pick r272043. rdar://problem/73838798

[ Big Sur ] media/media-source/media-source-webm-init-inside-segment.html is failing
https://bugs.webkit.org/show_bug.cgi?id=220552
<rdar://problem/73048070>

Patch by Jean-Yves Avenard <Jean-Yves Avenard> on 2021-01-28
Reviewed by Jer Noble.

Source/WebCore:

No new tests - fixes an existing test.

  • platform/graphics/cocoa/SourceBufferParserWebM.cpp: (WebCore::SourceBufferParserWebM::supportedAudioCodecs): Don't make the webm supported codec conditional. This change makes the webm audio support consistent with video support. supportedAudioCodecs is used by the libwebm parser to determine which codec IDs are to be rejected outright. If a codec id that isn't supported is encountered a parsing error will be thrown, which ultimately causes a HTML audio or video error.

If webkit is compiled without opus or vorbis support, in this particular case we do not want
an error to be produced but instead ignore the track.

LayoutTests:

  • platform/mac/TestExpectations: unskip test

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

12:11 PM Changeset in webkit [272158] by Alan Coon
  • 11 edits
    3 adds in branches/safari-611-branch

Cherry-pick r271939. rdar://problem/73838846

[Mac] MediaSampleCursor::stepInOrderedMap can hang when stepping to the end of a track that hasn't been fully parsed
https://bugs.webkit.org/show_bug.cgi?id=220555
<rdar://problem/72910000>

Reviewed by Eric Carlson.

Source/WebCore:

Test: http/tests/media/video-canplaythrough-webm.html

  • platform/graphics/FloatSize.h: Exported toJSONObject.

Source/WebKit:

When a container has multiple tracks, CoreMedia determines the overall duration by creating
a cursor at a presentation time of +infinity then asking for its timing info, the expectation
being that the cursor will clamp itself to the track duration and report that in
MediaSampleCursor::getSampleTiming.

Previously, this could result in a hang for tracks that had not yet finished parsing, as
MediaSampleCursor was designed to wait for samples outside the playable range. With this
change, MediaSampleCursor no longer waits for samples outside the playable range but
rather reports clamped timing info without waiting for a sample. If CoreMedia asks for
information that requires a sample (e.g., sample location), MediaSampleCursor will respond
with kMTPluginSampleCursorError_LocationNotAvailable. So that CoreMedia can determine
the range of playable samples, this patch implements MediaSampleCursor::getPlayableHorizon.

To simplify this implementation, MediaSampleCursor now assumes that decode time equals
presentation time (for video tracks) or is invalid (for audio tracks). While here, also
added media logging that helped debug this issue.

Test: http/tests/media/video-canplaythrough-webm.html

  • Shared/mac/MediaFormatReader/MediaSampleByteRange.cpp: (WebKit::MediaSampleByteRange::MediaSampleByteRange): Asserted our assmpution about the relationship between presentation time and decode time.
  • Shared/mac/MediaFormatReader/MediaSampleCursor.cpp: (WebKit::assumedDecodeTime): Added to compute decode time from presentation time and a nominal sample. (WebKit::upperBound): Changed to compute the decode key based on assumed decode time. (WebKit::stepIterator): Removed the MediaTime specialization. (WebKit::stepTime): Added to step a MediaTime rather than an iterator. (WebKit::MediaSampleCursor::MediaSampleCursor): Initialized logging. (WebKit::MediaSampleCursor::locateIterator const): Changed to find an iterator based on presentation time and assumed decode time. (WebKit::MediaSampleCursor::locateMediaSample const): Ditto. (WebKit::MediaSampleCursor::locateTiming const): Added to locate timing info even if no sample is available. (WebKit::MediaSampleCursor::stepInOrderedMap): Changed to call getSampleMap, and removed the MediaTime specialization. (WebKit::MediaSampleCursor::stepInPresentationTime): Added to replace the MediaTime specialization of stepInOrderedMap. (WebKit::MediaSampleCursor::getSampleMap const): Added to call MediaTrackReader::waitForSample and return as soon as at least one sample is available. Returns kMTPluginSampleCursorError_NoSamples if the track finishes parsing with no samples. (WebKit::MediaSampleCursor::getMediaSample const): Changed to call getSampleMap. (WebKit::MediaSampleCursor::getTiming const): Added to get timing info. (WebKit::MediaSampleCursor::copyProperty): Added logging. (WebKit::MediaSampleCursor::stepInDecodeOrderAndReportStepsTaken): Changed to call the new version of stepInOrderedMap. (WebKit::MediaSampleCursor::stepInPresentationOrderAndReportStepsTaken): Ditto. (WebKit::MediaSampleCursor::stepByDecodeTime): Changed to call stepInPresentationTime. (WebKit::MediaSampleCursor::stepByPresentationTime): Ditto. (WebKit::MediaSampleCursor::compareInDecodeOrder const): Changed to call getTiming. (WebKit::MediaSampleCursor::getSampleTiming const): Ditto. (WebKit::MediaSampleCursor::getPlayableHorizon const): Implemented by taking the difference between the last sample's end time and the cursor's presentation time. (WebKit::MediaSampleCursor::logChannel const): Added. (WebKit::makeIterator): Deleted. (WebKit::makeTime): Deleted. (WebKit::MediaSampleCursor::createAtDecodedSample): Deleted.
  • Shared/mac/MediaFormatReader/MediaSampleCursor.h: (WebKit::MediaSampleCursor::logger const): Configured logging. (WebKit::MediaSampleCursor::logClassName const): Ditto. (WebKit::MediaSampleCursor::logIdentifier const): Ditto.
  • Shared/mac/MediaFormatReader/MediaTrackReader.cpp: (WebKit::MediaTrackReader::mediaTypeString const): Ditto. (WebKit::MediaTrackReader::nextSampleCursorLogIdentifier const): Ditto.
  • Shared/mac/MediaFormatReader/MediaTrackReader.h:

LayoutTests:

  • http/conf/mime.types: Added an entry for video/webm.
  • http/tests/media/resources/long-test-vp9-vorbis.webm: Added.
  • http/tests/media/video-canplaythrough-webm-expected.txt: Added.
  • http/tests/media/video-canplaythrough-webm.html: Added.

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

12:11 PM Changeset in webkit [272157] by Alan Coon
  • 2 edits in branches/safari-611-branch/LayoutTests

Cherry-pick r271736. rdar://problem/73838912

REGRESSION (r271472): [ Mac WK2 ] intersection-observer/target-deleted.html is timing out
https://bugs.webkit.org/show_bug.cgi?id=220637
<rdar://problem/73220571>

Reviewed by Simon Fraser.

  • intersection-observer/target-deleted.html: For some reason, on some configurations, this test recently stopped seeing its intersection observer get garbage collected when it expects. The regression point is likely irrelevant, though multiple bots agree.

Doing a full rendering update by using rAF instead of just a setInterval
seems to be enough to get the object to actually be collected promptly.

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

12:11 PM Changeset in webkit [272156] by Alan Coon
  • 2 edits in branches/safari-611-branch/LayoutTests/imported/w3c

Cherry-pick r271611. rdar://problem/73838923

[ BigSur ] imported/w3c/web-platform-tests/fetch/nosniff/parsing-nosniff.window.html is flaky failing
https://bugs.webkit.org/show_bug.cgi?id=220631
<rdar://problem/73212492>

Reviewed by Alex Christensen.

I reproduced locally the error and saw a -1005 error, 'The network connection was lost'.
When running tests sequentially instead of in parallel, I do not see this anymore.

  • web-platform-tests/fetch/nosniff/parsing-nosniff.window.js: (runTests):

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

12:11 PM Changeset in webkit [272155] by Alan Coon
  • 3 edits in branches/safari-611-branch/Source/WebCore

Cherry-pick r271609. rdar://problem/73838888

REGRESSION (r270964): Hovering cursor over Earth animation causes flashing red distortion on GitHub.com
https://bugs.webkit.org/show_bug.cgi?id=220612
<rdar://problem/73175210>

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2021-01-19
Reviewed by Dean Jackson.

When reading the display buffer for WebKit snapshots, use READ_FRAMEBUFFER on WebGL2 and
FRAMEBUFFER on WebGL1. Fixes the case where WebGL2 contexts would get broken because
taking a snapshot would overwrite the framebuffer attachment.

No new tests, snapshots are not tested at the moment.

  • platform/graphics/angle/GraphicsContextGLANGLEUtilities.h: (WebCore::ScopedRestoreReadFramebufferBinding::framebufferTarget const):
  • platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm: (WebCore::GraphicsContextGLOpenGL::readCompositedResults):

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

12:06 PM Changeset in webkit [272154] by pvollan@apple.com
  • 7 edits in trunk/Source/WebKit

[macOS] Observe color preference changes in the UI process
https://bugs.webkit.org/show_bug.cgi?id=221096
<rdar://problem/73721275>

Reviewed by Brent Fulgham.

As a step towards blocking the distributed notifications daemon in the WebContent process, color preference changes should be observed in the UI process.
The UI process should notify the WebContent process about color preference changes. In order to be able to notify the AppKit observer in the WebContent
process about changes with a local notification, a specific key/value needs to added to the Info.plist of the WebContent process.

  • UIProcess/Cocoa/WebProcessPoolCocoa.mm:

(WebKit::WebProcessPool::colorPreferencesDidChangeCallback):
(WebKit::WebProcessPool::registerNotificationObservers):
(WebKit::WebProcessPool::unregisterNotificationObservers):

  • UIProcess/WebProcessPool.h:
  • WebProcess/EntryPoint/Cocoa/XPCService/WebContentService/Info-OSX.plist:
  • WebProcess/WebProcess.h:
  • WebProcess/WebProcess.messages.in:
  • WebProcess/cocoa/WebProcessCocoa.mm:

(WebKit::WebProcess::colorPreferencesDidChange):

11:43 AM Changeset in webkit [272153] by commit-queue@webkit.org
  • 2 edits in trunk/LayoutTests

[GPU Process] Layout tests TestExpectation file rewriting
https://bugs.webkit.org/show_bug.cgi?id=221101

Populate TestExpectations from clean state, remove all skipped dirs, add back failing tests.
Patch by Rini Patel <rini_patel@apple.com> on 2021-02-01
Reviewed by Simon Fraser.

  • gpu-process/TestExpectations:
11:26 AM Changeset in webkit [272152] by Antti Koivisto
  • 2 edits in trunk/Source/WebCore

[LFC][Integration] Fix editing/execCommand/primitive-value-cleanup-minimal.htm
https://bugs.webkit.org/show_bug.cgi?id=221212

Reviewed by Zalan Bujtas.

  • layout/integration/LayoutIntegrationLineLayout.cpp:

(WebCore::LayoutIntegration::LineLayout::enclosingBorderBoxRectFor const):

To match legacy make RenderInline height return zero when there are no runs.

11:25 AM Changeset in webkit [272151] by Alan Coon
  • 2 edits in branches/safari-611-branch/Source/WebKit

Cherry-pick r271916. rdar://problem/73834276

IPC::Decoder constructor should mark the Decoder as invalid if header decoding fails
https://bugs.webkit.org/show_bug.cgi?id=220990
<rdar://problem/64984186>

Reviewed by Darin Adler.

Mark the decoder as invalid if any of the decode operations fail, not just the first one.

  • Platform/IPC/Decoder.cpp:

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

11:18 AM Changeset in webkit [272150] by Truitt Savell
  • 2 edits in trunk/LayoutTests

[MacOS] imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/audioworkletnode-automatic-pull.https.html is flaky failure
https://bugs.webkit.org/show_bug.cgi?id=221152

Unreviewed test gardening.

Patch by Amir Mark Jr <Amir Mark Jr.> on 2021-02-01

  • platform/mac/TestExpectations:
10:11 AM Changeset in webkit [272149] by pvollan@apple.com
  • 2 edits in trunk/Source/WebKit

[macOS] Remove write access to some IOKit properties
https://bugs.webkit.org/show_bug.cgi?id=221137
<rdar://problem/73473658>

Reviewed by Brent Fulgham.

Remove write access to some IOKit properties in the WebContent process' sandbox.

  • WebProcess/com.apple.WebProcess.sb.in:
10:08 AM Changeset in webkit [272148] by pvollan@apple.com
  • 2 edits in trunk/Source/WebKit

[macOS] Add reporting to mach-register sandbox rule
https://bugs.webkit.org/show_bug.cgi?id=221139
<rdar://problem/70350150>

Reviewed by Brent Fulgham.

Add reporting to mach-register rule in the WebContent process' sandbox.

  • WebProcess/com.apple.WebProcess.sb.in:
9:54 AM Changeset in webkit [272147] by Alan Coon
  • 1 copy in tags/Safari-612.1.1.1

Tag Safari-612.1.1.1.

9:50 AM Changeset in webkit [272146] by weinig@apple.com
  • 4 edits in trunk/Source/WebCore

Avoid unnecessary chromatic adaptation when converting between colors with the same white point
https://bugs.webkit.org/show_bug.cgi?id=221193

Reviewed by Simon Fraser.

Delay chromatic adapation, which is implemented as the conversion from a color in the XYZ color
space with one white point to a color in the XYZ color space with another white point, until
it is actually needed, rather than eagerly converting colors that use a D50 white point (just
Lab, LCH and ProPhotoRGB at the moment) to D65 for every conversion.

To do this, we introduce a new template parameter for the XYZA color to explicitly annotate
what white point it has, and further annotate all color types with which XYZ color matches
their defined white point. Then, in the generic color conversion functions, we apply chromatic
adaptation if needed by comparing the input and output white points of the types (at compile
time) and doing the conversion only when necessary.

This allows us to remove the explicit chromatic adapatations in the LinearProPhotoRGB matrix
conversions as well as the Lab conversions.

  • platform/graphics/ColorConversion.cpp:
  • platform/graphics/ColorConversion.h:
  • platform/graphics/ColorTypes.h:
9:24 AM Changeset in webkit [272145] by Alan Coon
  • 8 edits in branches/safari-612.1.1-branch/Source

Versioning.

WebKit-7612.1.1.1

9:07 AM Changeset in webkit [272144] by aakash_jain@apple.com
  • 2 edits in trunk/Tools

[build.webkit.org] is_test_mode_enabled should default to True
https://bugs.webkit.org/show_bug.cgi?id=221208

Reviewed by Jonathan Bedard.

  • CISupport/build-webkit-org/master_buildbot2.cfg:
8:45 AM Changeset in webkit [272143] by Antti Koivisto
  • 2 edits in trunk/Source/WebCore

[LFC][Integration] Fix editing/execCommand/primitive-value.html
https://bugs.webkit.org/show_bug.cgi?id=221207

Reviewed by Zalan Bujtas.

  • editing/ReplaceSelectionCommand.cpp:

(WebCore::ReplaceSelectionCommand::removeUnrenderedTextNodesAtEnds):

This needs to update the layout after node removal as that can invalidate the existing one.

7:11 AM Changeset in webkit [272142] by Antti Koivisto
  • 2 edits in trunk/Source/WebCore

[LFC][Integration] RenderInline::offsetLeft needs to call ensureLineBoxes
https://bugs.webkit.org/show_bug.cgi?id=221196

Reviewed by Zalan Bujtas.

Use ensureLineBoxes for rare API calls before we implement them fully in LFC integration.

  • layout/integration/LayoutIntegrationCoverage.cpp:
  • rendering/RenderInline.cpp:

(WebCore::RenderInline::absoluteQuadsForSelection const):
(WebCore::RenderInline::offsetLeft const):
(WebCore::RenderInline::offsetTop const):
(WebCore::RenderInline::nodeAtPoint):

5:33 AM Changeset in webkit [272141] by magomez@igalia.com
  • 2 edits in trunk/Source/WebCore

[CoordGraphics] Avoid painting backing stores for zero-opacity layers
https://bugs.webkit.org/show_bug.cgi?id=184143

Reviewed by Carlos Garcia Campos.

Don't create BackingStores for layers that are invisible: they have their CSS opacity property
to 0 or they have an opacity filter with value 0.

  • platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:

(WebCore::CoordinatedGraphicsLayer::shouldHaveBackingStore const):

4:43 AM Changeset in webkit [272140] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WTF

clang Linux build cannot link because of builtin_mul_overflow
https://bugs.webkit.org/show_bug.cgi?id=190208

Since r183319, builtin_mul_overflow is used with gcc or clang in WTF/wtf/CheckedArithmetic.h

This leads to a link failure when WebKit is built on Linux with clang and the libgcc runtime,
because of an undefined reference to the mulodi4 symbol.

This is because clang generates code using the mulodi4 symbol for builtin_mul_overflow.
But this symbol is available only in compiler-rt, and not in the libgcc runtime used by most
Linux distributions of clang.

See also this upstream clang bug: https://bugs.llvm.org/show_bug.cgi?id=28629

Patch by Olivier Blin <Olivier Blin> on 2021-02-01
Reviewed by Mark Lam.

  • wtf/CheckedArithmetic.h: Do not use builtin_mul_overflow with clang on Linux for ARM
3:04 AM Changeset in webkit [272139] by ysuzuki@apple.com
  • 24 edits
    1 add in trunk

[JSC] Add @ in Error.stack if URL exists
https://bugs.webkit.org/show_bug.cgi?id=221184

Reviewed by Keith Miller.

JSTests:

  • ChakraCore/test/Error/NativeErrors_v4.baseline-jsc:
  • ChakraCore/test/Error/validate_line_column.baseline-jsc:
  • ChakraCore/test/StackTrace/FunctionName.js.baseline-jsc:
  • ChakraCore/test/fieldopts/fieldhoist6.baseline-jsc:
  • ChakraCore/test/fieldopts/fieldhoist6b.baseline-jsc:
  • ChakraCore/test/fieldopts/fieldhoist7.baseline-jsc:
  • ChakraCore/test/fieldopts/fieldhoist_negzero.baseline-jsc:
  • ChakraCore/test/fieldopts/fieldhoist_undefined_global.baseline-jsc:
  • ChakraCore/test/fieldopts/fieldhoist_unreachable.baseline-jsc:
  • stress/error-stack-at.js: Added.

(shouldBe):
(catch):
(try.eval):

Source/JavaScriptCore:

Append '@' if URL exists even if function name does not exist to make the
format simple for parsing in JS (splitting with '@' to extract URL and function name).

  • runtime/StackFrame.cpp:

(JSC::StackFrame::toString const):

Source/WebInspectorUI:

  • UserInterface/Models/StackTrace.js:

(WI.StackTrace.isLikelyStackTrace):

Tools:

  • TestWebKitAPI/Tests/JavaScriptCore/glib/TestJSC.cpp:

(testJSCExceptions):

LayoutTests:

  • inspector/model/remote-object/error-expected.txt:
  • inspector/unit-tests/globals-unhandled-rejection-in-timer-callback-expected.txt:
  • js/dom/line-column-numbers-expected.txt:
  • js/dom/script-tests/stack-trace.js:

(catch):

  • js/dom/stack-trace-expected.txt:
  • js/script-tests/stack-trace.js:

(catch):

  • js/stack-trace-expected.txt:
2:29 AM Changeset in webkit [272138] by Carlos Garcia Campos
  • 3 edits in trunk/Source/WebKit

[SOUP] Add support for data URLs in the network process
https://bugs.webkit.org/show_bug.cgi?id=221127

Reviewed by Adrian Perez de Castro.

In r271879 I removed the support for data URLs in the network process for soup, assuming data URLs were always
loaded from the web process, but that's not the case for downloads. I think we should not go to the network
process for downloads either, but for now it's easier to fix this regression by supporting data URLs in the
network process again. Fixes http/tests/security/anchor-download-allow-data.html.

  • NetworkProcess/soup/NetworkDataTaskSoup.cpp:

(WebKit::NetworkDataTaskSoup::createRequest): Return early if it's a data URL.
(WebKit::NetworkDataTaskSoup::clearRequest): Clear the pending data URL result.
(WebKit::NetworkDataTaskSoup::resume): Start a data URL decode task if it's a new data URL request, or complete
the pending one.
(WebKit::NetworkDataTaskSoup::didReadDataURL): Complete the data URL request.

  • NetworkProcess/soup/NetworkDataTaskSoup.h:
2:28 AM Changeset in webkit [272137] by calvaris@igalia.com
  • 2 edits in trunk/Source/WebCore

[GStreamer][EME][Thunder] Add video/x-vp9 as supported for cenc and cbcs
https://bugs.webkit.org/show_bug.cgi?id=221134

Reviewed by Philippe Normand.

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

Added video/x-vp9 in cenc (and therefore cbcs as well).

2:22 AM WebKitGTK/2.30.x edited by Carlos Garcia Campos
(diff)
2:20 AM Changeset in webkit [272136] by Carlos Garcia Campos
  • 6 edits in releases/WebKitGTK/webkit-2.30

Merge r270168 - [WPE][GTK] Use Internet Explorer quirk for Google Docs
https://bugs.webkit.org/show_bug.cgi?id=219278

Patch by Michael Catanzaro <Michael Catanzaro> on 2020-11-26
Reviewed by Carlos Garcia Campos.

Source/WebCore:

Since r266584, we've suffered from an annoying unsupported browser warning when using Google
Docs. We don't have many options to avoid it. I'm afraid that Firefox or Chrome quirks are
too risky, since these seem to tempt Google into using web platform features that WebKit
does not support. The safest quirk is the macOS platform quirk, but that doesn't work well
here because it breaks various keyboard shortcuts like Ctrl+A and Ctrl+Z. So an Internet
Explorer quirk is really the last card we have left.

I think this is the safest Google quirk we've ever had, in that it's pretty unlikely that
Google will try to send Internet Explorer anything that doesn't work in WebKit. However, it
will break eventually, whenever Google decides that Internet Explorer is no longer
supported. I guess that date is probably at least five years away, so we can only hope that
Google drops this anticompetitive nonsense before then.

P.S. Let's also switch Google Drive to this new quirk. The unsupported browser warning on
Google Drive seems to be completely independent, but the IE quirk seems safer that the
existing Firefox quirk, so why not?

  • platform/UserAgentQuirks.cpp:

(WebCore::isGoogle):
(WebCore::urlRequiresInternetExplorerBrowser):
(WebCore::urlRequiresWindowsPlatform):
(WebCore::urlRequiresLinuxDesktopPlatform):
(WebCore::UserAgentQuirks::quirksForURL):
(WebCore::UserAgentQuirks::stringForQuirk):

  • platform/UserAgentQuirks.h:
  • platform/glib/UserAgentGLib.cpp:

(WebCore::buildUserAgentString):

Tools:

  • TestWebKitAPI/Tests/WebCore/UserAgentQuirks.cpp:

(TestWebKitAPI::assertUserAgentForURLHasChromeBrowserQuirk):
(TestWebKitAPI::assertUserAgentForURLHasFirefoxBrowserQuirk):
(TestWebKitAPI::assertUserAgentForURLHasInternetExplorerBrowserQuirk):
(TestWebKitAPI::assertUserAgentForURLHasWindowsPlatformQuirk):
(TestWebKitAPI::TEST):

2:20 AM Changeset in webkit [272135] by Carlos Garcia Campos
  • 8 edits in releases/WebKitGTK/webkit-2.30/Source

Merge r270377 - aarch64 llint does not build with JIT disabled
https://bugs.webkit.org/show_bug.cgi?id=219288
<rdar://problem/71855960>

Source/JavaScriptCore:

Patch by Michael Catanzaro <Michael Catanzaro> on 2020-12-02
Reviewed by Darin Adler.

  • assembler/ARM64Assembler.h: Rename USE(JUMP_ISLANDS) to ENABLE(JUMP_ISLANDS).

(JSC::ARM64Assembler::replaceWithJump):
(JSC::ARM64Assembler::linkJumpOrCall):

  • assembler/AbstractMacroAssembler.h: Rename USE(JUMP_ISLANDS) to ENABLE(JUMP_ISLANDS).

(JSC::AbstractMacroAssembler::prepareForAtomicRepatchNearCallConcurrently):

  • assembler/LinkBuffer.cpp:

(JSC::LinkBuffer::copyCompactAndLinkCode): Guard JIT-specific code with ENABLE(JIT).

  • jit/ExecutableAllocator.cpp: Rename USE(JUMP_ISLANDS) to ENABLE(JUMP_ISLANDS).

(JSC::initializeJITPageReservation):

  • jit/ExecutableAllocator.h: Rename USE(JUMP_ISLANDS) to ENABLE(JUMP_ISLANDS).

Source/WTF:

Rename USE(JUMP_ISLANDS) to ENABLE(JUMP_ISLANDS), and make it depend on ENABLE(JIT). We need
it to depend on ENABLE(JIT) to fix the build, but this is awkward to do otherwise, because
USE macros are defined in PlatformUse.h before ENABLE macros in PlatformEnable.h. But it
makes sense, since USE macros should be used for "a particular third-party library or
optional OS service," and jump islands are neither, so ENABLE is more suitable anyway.

Patch by Michael Catanzaro <Michael Catanzaro> on 2020-12-02
Reviewed by Darin Adler.

  • wtf/PlatformEnable.h:
  • wtf/PlatformUse.h:
2:20 AM Changeset in webkit [272134] by Carlos Garcia Campos
  • 6 edits in releases/WebKitGTK/webkit-2.30

Merge r271608 - REGRESSION(r271580) [GTK] LTS/Debian build failure due to unsupported g-ir-scanner parameter
https://bugs.webkit.org/show_bug.cgi?id=220730

Reviewed by Philippe Normand.

.:

  • Source/cmake/FindGObjectIntrospection.cmake: Expose variable about the

presence of --sources-top-dirs.

Source/JavaScriptCore:

No new behavior. No new tests.

  • PlatformGTK.cmake: Expose --sources-top-dirs only if available.

Source/WebKit:

No new behavior. No new tests.

  • PlatformGTK.cmake: Expose --sources-top-dirs only if available.
2:20 AM Changeset in webkit [272133] by Carlos Garcia Campos
  • 4 edits in releases/WebKitGTK/webkit-2.30/Source

Merge r271580 - [GTK] Multilib conflicts in gir files
https://bugs.webkit.org/show_bug.cgi?id=220636

Patch by Michael Catanzaro <Michael Catanzaro> on 2021-01-18
Reviewed by Carlos Garcia Campos.

Source/JavaScriptCore:

  • PlatformGTK.cmake:

Source/WebKit:

By passing --sources-top-dirs to g-ir-scanner, we ensure all paths in the generated gir
files are relative to the toplevel builddir. This avoids multilib conflicts when the
builddir contains the target architecture.

  • PlatformGTK.cmake:
2:20 AM Changeset in webkit [272132] by Carlos Garcia Campos
  • 5 edits in releases/WebKitGTK/webkit-2.30

Merge r270496 - [GLib] Leaked RunLoop objects on worker threads
https://bugs.webkit.org/show_bug.cgi?id=219232
<rdar://problem/71772277>

Patch by Zan Dobersek <zdobersek@igalia.com> on 2020-12-07
Reviewed by Geoffrey Garen.

Source/WTF:

During the thread-local RunLoop::Holder destruction, explicitly clear out
the iteration Deque objects on the held RunLoop, destroying any Function
objects that never got to execute on this thread. Generally, this allows
for any RunLoop reference stored in these objects to be released.

Specifically, this would allow for destruction of the RunLoop::Timer
object that's queued up in the JSRunLoopTimer::Manager::PerVMData
destructor but never gets dispatched because the thread (a JS worker) is
shut down before that happens. Destruction of the timer will release the
reference of the RunLoop that's held by the RunLoop::Holder, finally
enabling the RunLoop object itself be destroyed once the RunLoop::Holder
reference is let go.

  • wtf/RunLoop.cpp:

(WTF::RunLoop::Holder::~Holder):
(WTF::RunLoop::threadWillExit):

  • wtf/RunLoop.h:

Tools:

Add a unit test covering proper RunLoop teardown upon thread destruction
even if RunLoop references are stored in the dispatch queues.

  • TestWebKitAPI/Tests/WTF/RunLoop.cpp:

(TestWebKitAPI::TEST):

2:19 AM Changeset in webkit [272131] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.30/Source/WebKit

[GTK] WebKitPluginProcess is built but not installed
https://bugs.webkit.org/show_bug.cgi?id=220154

Patch by Jim Mason <jmason@ibinx.com> on 2020-12-27
Reviewed by Carlos Garcia Campos.

  • CMakeLists.txt:
2:11 AM Changeset in webkit [272130] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

Remove unused SlotAssignment::enqueueSlotChangeEvent()
https://bugs.webkit.org/show_bug.cgi?id=220906

Patch by Tetsuharu Ohzeki <Tetsuharu Ohzeki> on 2021-02-01
Reviewed by Yusuke Suzuki.

  • dom/SlotAssignment.h:

Jan 31, 2021:

11:17 PM Changeset in webkit [272129] by calvaris@igalia.com
  • 5 edits in trunk/Source/WebCore

[GStreamer][EME] Add basic cbcs support
https://bugs.webkit.org/show_bug.cgi?id=221133

Reviewed by Philippe Normand.

Add cbcs as supported encryption scheme.

  • platform/graphics/gstreamer/GStreamerCommon.cpp:

(WebCore::capsMediaType):

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

(WebCore::CDMPrivateThunder::supportedInitDataTypes const):

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

(transformInPlace):

  • platform/graphics/gstreamer/eme/WebKitThunderDecryptorGStreamer.cpp:
4:45 PM Changeset in webkit [272128] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC][IFC] InlineContentBreaker::processOverflowingTextContent should find breaking positions even after the overflowing run
https://bugs.webkit.org/show_bug.cgi?id=221189

Reviewed by Antti Koivisto.

When the content has multiple (continous)runs, and we find the overflowing one

  1. first start searching backwards to see if we can find something that's breakable (this is already implemented)
  2. start searching forward to see if we can find something that's breakable -though in this case it's surely overflowing.

This patch implements #2.

  • layout/inlineformatting/InlineContentBreaker.cpp:

(WebCore::Layout::InlineContentBreaker::processOverflowingTextContent const):

12:48 PM Changeset in webkit [272127] by ysuzuki@apple.com
  • 4 edits
    1 add in trunk

Date.parse returns non-integral time value
https://bugs.webkit.org/show_bug.cgi?id=220687

Reviewed by Ross Kirsling.

JSTests:

  • complex.yaml:
  • complex/date-parse-milliseconds.js: Added.

(shouldBe):

Source/WTF:

Use milliseconds instead of seconds as a base unit to avoid floating point rounding for milliseconds.

  • wtf/DateMath.cpp:

(WTF::ymdhmsToMilliseconds):
(WTF::parseES5TimePortion):
(WTF::parseES5DateFromNullTerminatedCharacters):
(WTF::parseDateFromNullTerminatedCharacters):
(WTF::ymdhmsToSeconds): Deleted.

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

[LFC][IFC] Do not use a max value to indicate infinite available space in InlineContentBreaker::tryBreakingTextRun
https://bugs.webkit.org/show_bug.cgi?id=221188

Reviewed by Antti Koivisto.

  • layout/inlineformatting/InlineContentBreaker.cpp:

(WebCore::Layout::InlineContentBreaker::processOverflowingTextContent const):
(WebCore::Layout::InlineContentBreaker::tryBreakingTextRun const): add fast paths for cases when the available space is zero.
Note that there's a difference between returning nullopt and an empty value.

  • layout/inlineformatting/InlineContentBreaker.h:
12:24 PM Changeset in webkit [272125] by weinig@apple.com
  • 18 edits
    8 adds in trunk

Add support for color(prophoto-rgb ...) as part of CSS Color 4
https://bugs.webkit.org/show_bug.cgi?id=221116

Reviewed by Antti Koivisto.

LayoutTests/imported/w3c:

Add some new WPT tests for color(prophoto-rgb ) that will be upstreamed shortly.
(see https://github.com/web-platform-tests/wpt/pull/27416).

  • web-platform-tests/css/css-color/prophoto-rgb-001-expected.html: Added.
  • web-platform-tests/css/css-color/prophoto-rgb-001.html: Added.
  • web-platform-tests/css/css-color/prophoto-rgb-002-expected.html: Added.
  • web-platform-tests/css/css-color/prophoto-rgb-002.html: Added.
  • web-platform-tests/css/css-color/prophoto-rgb-003-expected.html: Added.
  • web-platform-tests/css/css-color/prophoto-rgb-003.html: Added.
  • web-platform-tests/css/css-color/prophoto-rgb-004-expected.html: Added.
  • web-platform-tests/css/css-color/prophoto-rgb-004.html: Added.

Source/WebCore:

Tests: imported/w3c/web-platform-tests/css/css-color/prophoto-rgb-001.html

imported/w3c/web-platform-tests/css/css-color/prophoto-rgb-002.html
imported/w3c/web-platform-tests/css/css-color/prophoto-rgb-003.html
imported/w3c/web-platform-tests/css/css-color/prophoto-rgb-004.html

  • css/CSSValueKeywords.in:

Add prophoto-rgb keyword.

  • css/parser/CSSPropertyParserHelpers.cpp:

(WebCore::CSSPropertyParserHelpers::parseColorFunctionForRGBTypes):
(WebCore::CSSPropertyParserHelpers::parseColorFunctionParameters):
Parse color(prophoto-rgb ) using the existing generic rgb type color function
parsing function.

  • platform/graphics/ColorConversion.cpp:

(WebCore::convertFromD50WhitePointToD65WhitePoint):
(WebCore::convertFromD65WhitePointToD50WhitePoint):
Move these chromatic adaptation conversions up in the file so they can be reused by
toLinearProPhotoRGB(copnst XYZA&) and toXYZA(const LinearProPhotoRGB).

(WebCore::toLinearProPhotoRGB):
(WebCore::toProPhotoRGB):
(WebCore::toXYZA):

  • platform/graphics/ColorConversion.h:

(WebCore::toLinearRec2020):
(WebCore::toProPhotoRGB):
(WebCore::toLinearProPhotoRGB):
(WebCore::callWithColorType):
Add conversion support for ProPhotoRGB, utilizing the ProPhotoRGBTransferFunction
for gamma correction.

  • platform/graphics/ColorSerialization.cpp:

(WebCore::serialization):
(WebCore::serializationForCSS):
(WebCore::serializationForHTML):
(WebCore::serializationForRenderTreeAsText):

  • platform/graphics/ColorSerialization.h:

Add serialization support, matching other rgb color() function
types.

  • platform/graphics/ColorSpace.cpp:

(WebCore::operator<<):

  • platform/graphics/ColorSpace.h:

Add ProPhotoRGB as a new ColorSpace.

  • platform/graphics/ColorTransferFunctions.h:

(WebCore::mode>::toGammaEncoded):
(WebCore::mode>::toLinear):
Add transfer function for ProPhotoRGB. Both clamped and unclamped
are implemented, though for now, only the clamped variant is
being used. Also fix small bug in unclamped Rec2020TransferFunction
that I meant to land before where the sign wasn't getting applied
to the whole computation.

  • platform/graphics/ColorTypes.h:

Add ProPhotoRGB and LinearProPhotoRGB types. Fix typo in forward
declaration of the XYZA type.

  • platform/graphics/cg/ColorSpaceCG.cpp:

(WebCore::proPhotoRGBColorSpaceRef):

  • platform/graphics/cg/ColorSpaceCG.h:

(WebCore::cachedCGColorSpace):
Add support for the ProPhotoRGB as a CoreGraphics color space, where
it is known as kCGColorSpaceROMMRGB (ROMM stands for Reference Output
Medium Metric, another name for ProPhoto).

LayoutTests:

Remove now passing prophoto-rgb tests.

  • fast/css/parsing-color-function-expected.txt:
  • fast/css/parsing-color-function.html:

Add prophoto-rgb as an rgb type so it gets tested with the
others.

9:16 AM Changeset in webkit [272124] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC][IFC] TrailingTextContent should be able to tell if even the first run in the set does not fit
https://bugs.webkit.org/show_bug.cgi?id=221185

Reviewed by Antti Koivisto.

There are 3 distinct cases here that we should be able to encode with the return value of processOverflowingTextContent.

  1. We did not find any breakable run in the set -> return value is nullopt
  2. We did find a breakable run but even the first run does not fit at all -> TrailingTextContent::runIndex is nullopt
  3. We did find a breakable run and we can fit the first run (either fully or partially) -> TrailingTextContent::runIndex is 0.

Make TrailingTextContent::runIndex optional so that we can tell the difference between #2 and #3.

  • layout/inlineformatting/InlineContentBreaker.cpp:

(WebCore::Layout::InlineContentBreaker::processOverflowingContent const):
(WebCore::Layout::InlineContentBreaker::processOverflowingTextContent const):

Jan 30, 2021:

11:52 PM Changeset in webkit [272123] by weinig@apple.com
  • 19 edits
    10 adds
    2 deletes in trunk

Add support for color(rec2020 ...) as part of CSS Color 4
https://bugs.webkit.org/show_bug.cgi?id=221114

Reviewed by Antti Koivisto.

LayoutTests/imported/w3c:

Add some new WPT tests for color(rec2020 ) that will be upstreamed shortly.

  • web-platform-tests/css/css-color/rec2020-001-expected.html: Added.
  • web-platform-tests/css/css-color/rec2020-001.html: Added.
  • web-platform-tests/css/css-color/rec2020-002-expected.html: Added.
  • web-platform-tests/css/css-color/rec2020-002.html: Added.
  • web-platform-tests/css/css-color/rec2020-003-expected.html: Added.
  • web-platform-tests/css/css-color/rec2020-003.html: Added.
  • web-platform-tests/css/css-color/rec2020-004-expected.html: Added.
  • web-platform-tests/css/css-color/rec2020-004.html: Added.

Source/WebCore:

  • css/CSSValueKeywords.in:

Add comment to indicate rec2020 is support color function type.

  • css/parser/CSSPropertyParserHelpers.cpp:

(WebCore::CSSPropertyParserHelpers::parseColorFunctionForRGBTypes):
(WebCore::CSSPropertyParserHelpers::parseColorFunctionParameters):
Parse color(rec2020 ) using the existing generic rgb type color function
parsing function.

  • platform/graphics/Color.h:

Remove overly specific comment that listed all the color types that Color
could hold, replacing it with a more generic statement about the functionaly
of ExtendedColor. This avoids needing to update this not very useful comment
everytime we add a new supported color type.

  • platform/graphics/ColorConversion.cpp:

(WebCore::toLinearRec2020):
(WebCore::toRec2020):
(WebCore::toXYZA):

  • platform/graphics/ColorConversion.h:

(WebCore::toLinearRec2020):
(WebCore::toRec2020):
(WebCore::toLinearDisplayP3):
(WebCore::callWithColorType):
Add conversion support for Rec2020, utilizing the Rec2020TransferFunction
for gamma correction. Fix incorrect sorting of toLinearDisplayP3.

  • platform/graphics/ColorSerialization.cpp:

(WebCore::serialization):
(WebCore::serializationForCSS):
(WebCore::serializationForHTML):
(WebCore::serializationForRenderTreeAsText):

  • platform/graphics/ColorSerialization.h:

Add serialization support, matching other rgb color() function
types.

  • platform/graphics/ColorSpace.cpp:

(WebCore::operator<<):

  • platform/graphics/ColorSpace.h:

Add Rec2020 as a new ColorSpace.

  • platform/graphics/ColorTransferFunctions.h:

(WebCore::Rec2020TransferFunction::toGammaEncoded):
(WebCore::Rec2020TransferFunction::toLinear):
Add transfer function for Rec2020. Both clamped and unclamped
are implemented, though for now, only the clamped variant is
being used.

  • platform/graphics/ColorTypes.h:

Add Rec2020 and LinearRec2020 types.

  • platform/graphics/cg/ColorSpaceCG.cpp:

(WebCore::rec2020ColorSpaceRef):

  • platform/graphics/cg/ColorSpaceCG.h:

(WebCore::cachedCGColorSpace):
Add support for the rec2020 as a CoreGraphics color space, where
it is known as kCGColorSpaceITUR_2020.

LayoutTests:

Remove now passing rec2020 tests.

  • fast/css/parsing-a98rgb-colors-expected.txt: Removed.
  • fast/css/parsing-a98rgb-colors.html: Removed.
  • fast/css/parsing-color-function-expected.txt: Added.
  • fast/css/parsing-color-function.html: Added.

Re-write parsing-a98rgb-colors.html to test all rgb types in the color() function as
they all have the same parsing requirements. Color(lab ) must still be parsed separately
as it has a different grammar.

3:35 PM Changeset in webkit [272122] by Darin Adler
  • 13 edits in trunk/Source

Check activeDocumentLoader() for null consistently everywhere
https://bugs.webkit.org/show_bug.cgi?id=221167

Reviewed by Anders Carlsson.

Source/WebCore:

Audited all activeDocumentLoader() calls to see if they check
for null. Many were missing a null check and only a very few had
a good solid reason they don't need one (newly-created frames, basically).

  • dom/Document.cpp:

(WebCore::createCachedResourceLoader): Added.
(WebCore::Document::Document): Use createCachedResourceLoader, which
adds a null check for the active document loader.

  • html/PluginDocument.cpp:

(WebCore::PluginDocumentParser::appendBytes): Added a null check before
calling setMainResourceDataBufferingPolicy. Also tweaked style a bit.
(WebCore::PluginDocument::cancelManualPluginLoad): Added a null check
before calling cancelMainResourceLoad.

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::initialRequest const): Deleted.
(WebCore::FrameLoader::originalRequest const): Deleted.

  • loader/FrameLoader.h: Deleted the initialRequest and originalRequest

functions. Both were using activeDocumentLoader() without null checks,
but both also were unused.

  • loader/PolicyChecker.cpp:

(WebCore::FrameLoader::PolicyChecker::checkNavigationPolicy):
Added null check before calling continueAfterSubstituteDataRequest.

  • loader/ResourceLoader.cpp:

(WebCore::ResourceLoader::start): Added null check before calling
scheduleArchiveLoad and null check before callling
applicationCacheHost().maybeLoadResource().
(WebCore::ResourceLoader::willSwitchToSubstituteResource): Added
null check inside an assertion.
(WebCore::ResourceLoader::willSendRequestInternal): Added null check
before calling previewConverter and isCommitted.

  • loader/appcache/ApplicationCacheGroup.cpp:

(WebCore::ApplicationCacheGroup::selectCache): Added null check before
calling request.

  • page/DOMWindow.cpp:

(WebCore::DOMWindow::print): Added null check before calling isLoading.
(WebCore::DOMWindow::finishedLoading): Added null check before calling
mainDocumentError.

Source/WebKit:

  • WebProcess/Plugins/PluginView.cpp:

(WebKit::PluginView::cancelManualStreamLoad): Added null check before calling
isLoadingMainResource.

Source/WebKitLegacy/mac:

  • Plugins/WebNetscapePluginStream.mm:

(WebNetscapePluginStream::cancelLoadWithError): Added null check before calling
isLoadingMainResource.

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

Additional cleanup of CSSPropertyParserHelpers
https://bugs.webkit.org/show_bug.cgi?id=221174

Reviewed by Simon Fraser.

  • Added "raw" versions of consumeInteger and consumePositiveInteger.
  • Converted consumePosition and consumeOneOrTwoValuedPosition to use an Optional return value rather than out parameters, using a new PositionCoordinates helper struct.
  • Added consumeNumberOrPercentDividedBy100Raw helper for common patter of supporting eiter a number, or a percentage normalized by dividing it by 100.
  • css/MediaQueryExpression.cpp:
  • css/parser/CSSPropertyParser.cpp:
  • css/parser/CSSPropertyParserHelpers.cpp:
  • css/parser/CSSPropertyParserHelpers.h:
1:27 PM Changeset in webkit [272120] by Antti Koivisto
  • 2 edits in trunk/Source/WTF

Enable visibility aware resource load scheduling
https://bugs.webkit.org/show_bug.cgi?id=221032

Reviewed by Zalan Bujtas.

Performance testing indicates this is a significant speedup in competetive PLT.

  • Scripts/Preferences/WebPreferencesInternal.yaml:
11:51 AM Changeset in webkit [272119] by ysuzuki@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed, fix after r272071
https://bugs.webkit.org/show_bug.cgi?id=220914

Since WebAssembly.Global can be "immutable", we cannot use Wasm::Global::set when setting an initial value.

  • wasm/js/WebAssemblyGlobalConstructor.cpp:

(JSC::JSC_DEFINE_HOST_FUNCTION):

11:34 AM Changeset in webkit [272118] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC][IFC] Line gap metric should apply to all inline boxes
https://bugs.webkit.org/show_bug.cgi?id=221179

Reviewed by Antti Koivisto.

According to the CSS spec (https://www.w3.org/TR/css-inline-3/#inline-height)
when the line-height computes to normal (RenderStyle::lineHeight().isNegative()) and
either text-edge is leading (property is not supported yet, initial value is leading) or
this is the root inline box, the font’s line gap should be taken into account when computing
layout bounds.

  • layout/inlineformatting/InlineFormattingContextGeometry.cpp:

(WebCore::Layout::LineBoxBuilder::setVerticalGeometryForInlineBox const):

10:47 AM Changeset in webkit [272117] by Wenson Hsieh
  • 39 edits
    10 deletes in trunk

[macOS] Remove support for image controls
https://bugs.webkit.org/show_bug.cgi?id=221156

Reviewed by Tim Horton.

LayoutTests/imported/w3c:

Rebaseline an imported layout test.

  • web-platform-tests/css/css-ui/appearance-cssom-001-expected.txt:

Source/WebCore:

Remove support for the macOS-only "image controls" codepath. This SPI was intended to be used by Mail years ago,
but was superseded by a custom implementation in Mail; this WebKit functionality has since been unused.

In a subsequent patch, a small subset of the infrastructure for laying out and rendering image controls will
return under a different name, in support of the image extraction accessibility feature.

  • DerivedSources-input.xcfilelist:
  • DerivedSources.make:
  • SourcesCocoa.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • css/CSSPrimitiveValueMappings.h:

(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):

  • css/CSSProperties.json:
  • css/CSSValueKeywords.in:
  • dom/Node.h:

(WebCore::Node::isPluginElement const):
(WebCore::Node::isImageControlsRootElement const): Deleted.
(WebCore::Node::isImageControlsButtonElement const): Deleted.

  • html/HTMLAttributeNames.in:
  • html/HTMLImageElement.cpp:

(WebCore::HTMLImageElement::HTMLImageElement):
(WebCore::HTMLImageElement::parseAttribute):

Additionally remove support for the webkitimagemenu DOM attribute, which was only respected if the (now-
removed) SPI preference was set.

(WebCore::HTMLImageElement::didAttachRenderers):
(WebCore::HTMLImageElement::updateImageControls): Deleted.
(WebCore::HTMLImageElement::tryCreateImageControls): Deleted.
(WebCore::HTMLImageElement::destroyImageControls): Deleted.
(WebCore::HTMLImageElement::hasImageControls const): Deleted.
(WebCore::HTMLImageElement::childShouldCreateRenderer const): Deleted.

  • html/HTMLImageElement.h:

Additionally remove m_experimentalImageMenuEnabled and the associated helper method hasShadowControls() on
HTMLImageElement.

(WebCore::HTMLImageElement::hasShadowControls const): Deleted.

  • html/shadow/ImageControlsRootElement.cpp: Removed.
  • html/shadow/ImageControlsRootElement.h: Removed.
  • html/shadow/mac/ImageControlsButtonElementMac.cpp: Removed.
  • html/shadow/mac/ImageControlsButtonElementMac.h: Removed.
  • html/shadow/mac/ImageControlsRootElementMac.cpp: Removed.
  • html/shadow/mac/ImageControlsRootElementMac.h: Removed.
  • html/shadow/mac/imageControlsMac.css: Removed.
  • page/ContextMenuController.cpp:

(WebCore::ContextMenuController::maybeCreateContextMenu):
(WebCore::imageFromImageElementNode): Deleted.
(WebCore::ContextMenuController::showImageControlsMenu): Deleted.

  • page/ContextMenuController.h:
  • platform/ThemeTypes.cpp:

(WebCore::operator<<):

  • platform/ThemeTypes.h:
  • rendering/RenderImage.cpp:

(WebCore::RenderImage::RenderImage):

  • rendering/RenderTheme.cpp:

(WebCore::RenderTheme::adjustStyle):
(WebCore::RenderTheme::paint):
(WebCore::RenderTheme::paintBorderOnly):
(WebCore::RenderTheme::paintDecorations):

  • rendering/RenderTheme.h:

(WebCore::RenderTheme::imageControlsStyleSheet const): Deleted.
(WebCore::RenderTheme::imageControlsButtonSize const): Deleted.
(WebCore::RenderTheme::imageControlsButtonPositionOffset const): Deleted.
(WebCore::RenderTheme::paintImageControlsButton): Deleted.

  • rendering/RenderThemeMac.h:
  • rendering/RenderThemeMac.mm:

(WebCore::RenderThemeMac::imageControlsStyleSheet const): Deleted.
(WebCore::RenderThemeMac::servicesRolloverButtonCell const): Deleted.
(WebCore::RenderThemeMac::paintImageControlsButton): Deleted.
(WebCore::RenderThemeMac::imageControlsButtonSize const): Deleted.
(WebCore::RenderThemeMac::imageControlsButtonPositionOffset const): Deleted.

Remove these two methods, which were only used to render the now-removed image controls button.

  • style/UserAgentStyle.cpp:

(WebCore::Style::UserAgentStyle::ensureDefaultStyleSheetsForElement):

  • style/UserAgentStyle.h:

Source/WebKit:

Leave the existing SPI implemented for binary compatability, but make them empty stubs and additionally mark
the property on WKWebViewConfiguration as deprecated.

  • UIProcess/API/C/WKPreferences.cpp:

(WKPreferencesSetImageControlsEnabled):
(WKPreferencesGetImageControlsEnabled):

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _setupPageConfiguration:]):

  • UIProcess/API/Cocoa/WKWebViewConfiguration.mm:

(-[WKWebViewConfiguration init]):
(-[WKWebViewConfiguration copyWithZone:]):
(-[WKWebViewConfiguration _imageControlsEnabled]):
(-[WKWebViewConfiguration _setImageControlsEnabled:]):

  • UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:

Source/WebKitLegacy/mac:

Turn these legacy WebKit SPI methods into empty stubs.

  • WebView/WebPreferenceKeysPrivate.h:
  • WebView/WebPreferences.mm:

(-[WebPreferences imageControlsEnabled]):
(-[WebPreferences setImageControlsEnabled:]):

Source/WTF:

Remove this unused WebKit setting.

  • Scripts/Preferences/WebPreferences.yaml:

LayoutTests:

Remove the only layout test for image controls, along with all associated test expectations.

  • fast/images/image-controls-basic.html: Removed.
  • platform/glib/fast/images/image-controls-basic-expected.txt: Removed.
  • platform/gtk/fast/images/images/image-controls-basic-expected.txt: Removed.
  • platform/ios/fast/images/image-controls-basic-expected.txt: Removed.
  • platform/mac-mojave/fast/images/image-controls-basic-expected.txt: Removed.
  • platform/mac/TestExpectations:
  • platform/mac/fast/images/image-controls-basic-expected.txt: Removed.
  • platform/win/TestExpectations:
  • platform/wincairo/fast/images/image-controls-basic-expected.txt: Removed.
4:57 AM Changeset in webkit [272116] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

[LFC][IFC] Adjust the line box stretching (quirky) <br> behavior
https://bugs.webkit.org/show_bug.cgi?id=221173

Reviewed by Antti Koivisto.

In quirks mode when the <br> is nested in an inline box (e.g. <span><br></span>) and it's taller than the root inline box, it
may stretch the line box. See InlineFormattingContext::Quirks::inlineLevelBoxAffectsLineBox for details.

  • layout/inlineformatting/InlineFormattingContextQuirks.cpp:

(WebCore::Layout::InlineFormattingContext::Quirks::inlineLevelBoxAffectsLineBox const):

  • layout/inlineformatting/InlineLineBox.h:

(WebCore::Layout::LineBox::hasAtomicInlineLevelBox const):

4:44 AM Changeset in webkit [272115] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC][IFC] Remove redundant LineBoxBuilder::isRootLayoutBox function
https://bugs.webkit.org/show_bug.cgi?id=221170

Reviewed by Antti Koivisto.

  • layout/inlineformatting/InlineFormattingContextGeometry.cpp:

(WebCore::Layout::LineBoxBuilder::isRootLayoutBox const): Change the name to include "layoutBox" to not confuse it with inline boxes.
(WebCore::Layout::LineBoxBuilder::setVerticalGeometryForInlineBox const):
(WebCore::Layout::LineBoxBuilder::constructInlineLevelBoxes):
(WebCore::Layout::LineBoxBuilder::isRootInlineBox const): Deleted.
(WebCore::Layout::LineBoxBuilder::isRootBox const): Deleted.

12:53 AM Changeset in webkit [272114] by rniwa@webkit.org
  • 7 edits
    3 adds in trunk

StaticRange should keep its start and end containers alive
https://bugs.webkit.org/show_bug.cgi?id=221175

Reviewed by Wenson Hsieh.

Source/WebCore:

Fixed the bug that the root nodes of StaticRange's start and end containers were not kept alive by GC.
To do that, we add them as opaque roots during the marking phase in visitAdditionalChildren.

Test: fast/dom/static-range-gc.html

  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/JSStaticRangeCustom.cpp:

(WebCore::JSStaticRange::visitAdditionalChildren):

  • dom/StaticRange.cpp:

(WebCore::StaticRange::visitNodesConcurrently const):

  • dom/StaticRange.h:
  • dom/StaticRange.idl:

LayoutTests:

Added a regression test.

  • fast/dom/static-range-gc-expected.txt: Added.
  • fast/dom/static-range-gc.html: Added.

Jan 29, 2021:

9:41 PM Changeset in webkit [272113] by Alan Coon
  • 2 edits in branches/safari-611-branch/Source/WebCore

Cherry-pick r271551. rdar://problem/73473686

Scroll position is lost when homing out and resuming Safari on iOS
https://bugs.webkit.org/show_bug.cgi?id=220676

Reviewed by Tim Horton.

When homing out on iOS, UIKit snapshotting causes multiple web view resizes, which runs
the dynamicViewportSizeUpdate() logic. This can trigger programmatic scrolls via
FrameView::setContentsSize(), which get stored in the scrolling state tree. When
that tree is committed on resume, we then erroneously apply the programmatic
scrolls.

Fix by ignoring requested scroll positions updates when snapshotting, as we do when
we're in the page cache.

  • page/scrolling/AsyncScrollingCoordinator.cpp: (WebCore::AsyncScrollingCoordinator::requestScrollPositionUpdate):

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

9:41 PM Changeset in webkit [272112] by Alan Coon
  • 2 edits in branches/safari-611-branch/Source/WebCore

Cherry-pick r271515. rdar://problem/73473627

REGRESSION(r269813): PLT5 regressed by 0.5%
https://bugs.webkit.org/show_bug.cgi?id=220652
<rdar://problem/71517335>

Reviewed by Antti Koivisto.

In r269813 we added support for animating more pseudo-elements besides ::after and ::before. However, the only other
pseudo-element we realistically should be supporting animations for at this juncture is ::marker. So instead of
calling Style::TreeResolver::resolvePseudoStyle() for all public pseudo-elements, we call it for ::after, ::before
and ::marker alone.

  • style/StyleTreeResolver.cpp: (WebCore::Style::TreeResolver::resolveElement):

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

9:41 PM Changeset in webkit [272111] by Alan Coon
  • 9 edits
    2 adds in branches/safari-611-branch

Cherry-pick r271507. rdar://problem/73473467

[Cocoa] Strip DataDetectors links when copying content to the pasteboard
https://bugs.webkit.org/show_bug.cgi?id=220526
<rdar://problem/71045590>

Reviewed by Ryosuke Niwa.

Source/WebCore:

Currently, when DataDetectors links are written to the pasteboard when
copied. This is problematic, since clicking on a DataDetector link
outside of a valid context results in an attempt to open an invalid
URL. Instead, DataDetectors links should be stripped when copied.

To remove the link, while preserving any custom styles, the <a> element
created by Data Detection is replaced with a <span> element. Any
attributes and styles added by WebKit are removed as a part of this
transformation.

Tests: editing/pasteboard/copy-paste-data-detected-links.html

CopyRTF.StripsDataDetectedLinks
PasteWebArchive.StripsDataDetectedLinks

  • editing/cocoa/DataDetection.h:
  • editing/cocoa/DataDetection.mm: (WebCore::DataDetection::isDataDetectorElement):

Add a helper to check if an element was created through Data Detection.

  • editing/cocoa/HTMLConverter.mm: (HTMLConverter::_addLinkForElement):

Do not add NSLinkAttributeName for DataDetectors links.

(HTMLConverter::_exitElement):

Factor out link creation logic.

  • editing/markup.cpp: (WebCore::StyledMarkupAccumulator::spanReplacementForElement):

Centralize the logic that determines whether or not an element should
be replaced by a <span>. Previously, this only applied to <slot>
elements. Now, it applies to <slot> and DataDetectors links.

(WebCore::StyledMarkupAccumulator::appendStartTag):

If the element was created through DataDetection, append a <span>
rather than an <a>, to drop the link. The DataDetectors and href
attributes are also dropped from the markup string. Finally, remove
the text decoration style that was added by WebKit to style the
DataDetectors link.

(WebCore::StyledMarkupAccumulator::appendEndTag):

Consult shouldReplaceElementWithSpan when appending the end tag.

Tools:

Added API tests to verify DataDetectors links are not preserved when
copying/pasting WebArchives and rich text.

  • TestWebKitAPI/Tests/WebKitCocoa/CopyRTF.mm: (StripsDataDetectorsLinks):
  • TestWebKitAPI/Tests/WebKitCocoa/PasteWebArchive.mm: (StripsDataDetectorsLinks):

LayoutTests:

Added a test which copies content containing two data detected links
and verifies that the links are removed.

  • editing/pasteboard/copy-paste-data-detected-links-expected.txt: Added.
  • editing/pasteboard/copy-paste-data-detected-links.html: Added.

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

9:41 PM Changeset in webkit [272110] by Alan Coon
  • 18 edits in branches/safari-611-branch/Source

Cherry-pick r271503. rdar://problem/73473503

Add a quirk to disable "return to element fullscreen from picture-in-picture" for some sites
https://bugs.webkit.org/show_bug.cgi?id=220606

Reviewed by Eric Carlson.

Source/WebCore:

For iPads, we add the support of "return to element fullscreen from picture-in-picture" in r265562.
Unfortunately, some sites do not set element's styles properly when a video returns to fullscreen
from picture-in-picture. This patch adds a quirk to disable the feature for those sites for now.

  • page/Quirks.cpp: (WebCore::Quirks::blocksReturnToFullscreenFromPictureInPictureQuirk const):
  • page/Quirks.h:
  • platform/ios/VideoFullscreenInterfaceAVKit.h:
  • platform/ios/VideoFullscreenInterfaceAVKit.mm: (VideoFullscreenInterfaceAVKit::setupFullscreen): (VideoFullscreenInterfaceAVKit::didStartPictureInPicture):
  • platform/ios/WebVideoFullscreenControllerAVKit.mm: (VideoFullscreenControllerContext::setUpFullscreen):

Source/WebKit:

  • UIProcess/Cocoa/VideoFullscreenManagerProxy.h:
  • UIProcess/Cocoa/VideoFullscreenManagerProxy.messages.in:
  • UIProcess/Cocoa/VideoFullscreenManagerProxy.mm: (WebKit::VideoFullscreenManagerProxy::setupFullscreenWithID):
  • UIProcess/WebFullScreenManagerProxy.cpp: (WebKit::WebFullScreenManagerProxy::blocksReturnToFullscreenFromPictureInPicture const): (WebKit::WebFullScreenManagerProxy::enterFullScreen):
  • UIProcess/WebFullScreenManagerProxy.h:
  • UIProcess/WebFullScreenManagerProxy.messages.in:
  • UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm: (-[WKFullScreenWindowController enterFullScreen]): (-[WKFullScreenWindowController didEnterPictureInPicture]):
  • WebProcess/FullScreen/WebFullScreenManager.cpp: (WebKit::WebFullScreenManager::enterFullScreenForElement):
  • WebProcess/InjectedBundle/InjectedBundlePageFullScreenClient.cpp: (WebKit::InjectedBundlePageFullScreenClient::enterFullScreenForElement):
  • WebProcess/InjectedBundle/InjectedBundlePageFullScreenClient.h:
  • WebProcess/cocoa/VideoFullscreenManager.mm: (WebKit::VideoFullscreenManager::enterVideoFullscreenForVideoElement):

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

9:41 PM Changeset in webkit [272109] by Alan Coon
  • 16 edits
    3 adds in branches/safari-611-branch

Cherry-pick r271459. rdar://problem/73473665

[macOS] "Correct Spelling Automatically" menu items are inconsistent when autocorrect="off"
https://bugs.webkit.org/show_bug.cgi?id=220598
<rdar://problem/71713611>

Reviewed by Tim Horton.

Source/WebCore:

Disable the context menu item to toggle automatic spelling correction, as well as the menu bar item to toggle
automatic spelling correction, in the case where the autocorrect attribute is set to "off". See below for more
details.

Tests: editing/mac/spelling/disable-automatic-spelling-correction-context-menu-item.html

DisableAutomaticSpellingCorrection.AutocorrectAttribute

  • editing/AlternativeTextController.cpp: (WebCore::AlternativeTextController::canEnableAutomaticSpellingCorrection const):

Factor out logic for checking the autocorrect attribute into a separate helper function; this is used to
determine whether or not we should enable both the context menu item and menu item in the menu bar.

(WebCore::AlternativeTextController::isAutomaticSpellingCorrectionEnabled):

  • editing/AlternativeTextController.h: (WebCore::AlternativeTextController::UNLESS_ENABLED):
  • editing/Editor.cpp: (WebCore::Editor::canEnableAutomaticSpellingCorrection const):
  • editing/Editor.h:
  • page/ContextMenuController.cpp: (WebCore::ContextMenuController::checkOrEnableIfNeeded const):

Source/WebKit:

Plumb the new canEnableAutomaticSpellingCorrection flag through EditorState to the UI process, where we can
consult it when validating user interface items (namely, the "Correct Spelling Automatically" menu item, which
corresponds to the -toggleAutomaticSpellingCorrection: selector).

  • Shared/EditorState.cpp: (WebKit::EditorState::PostLayoutData::encode const): (WebKit::EditorState::PostLayoutData::decode): (WebKit::operator<<):
  • Shared/EditorState.h:
  • UIProcess/Cocoa/WebViewImpl.mm: (WebKit::WebViewImpl::validateUserInterfaceItem):
  • WebProcess/WebPage/mac/WebPageMac.mm: (WebKit::WebPage::getPlatformEditorState const):

Tools:

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/mac/DisableAutomaticSpellingCorrection.mm: Added.

Add a new API test to verify that the NSMenuItem for toggling automatic spelling correction is invalid when
editing inside a form control with autocorrect="off".

  • WebKitTestRunner/InjectedBundle/EventSendingController.cpp: (WTR::getMenuItemEnabledCallback):

Add the readonly enabled JS property on context menu items. See the new layout test,
editing/mac/spelling/disable-automatic-spelling-correction-context-menu-item.html, for more information.

LayoutTests:

Add a new API test to verify that the context menu item to toggle "Correct Spelling Automatically" is disabled
when autocorrect="off".

  • editing/mac/spelling/disable-automatic-spelling-correction-context-menu-item-expected.txt: Added.
  • editing/mac/spelling/disable-automatic-spelling-correction-context-menu-item.html: Added.
  • platform/mac-wk1/TestExpectations:

Disable the test in DumpRenderTree, due to lack of support for context menu testing in WebKit1.

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

9:41 PM Changeset in webkit [272108] by Alan Coon
  • 2 edits in branches/safari-611-branch/Source/WebInspectorUI

Cherry-pick r271458. rdar://problem/73477098

Web Inspector: RTL content inside elements is reversed and unreadable
https://bugs.webkit.org/show_bug.cgi?id=220241

Patch by Ebrahim Byagowi <ebrahim@gnu.org> on 2021-01-13
Reviewed by BJ Burg.

Use appropiate unicode-bidi value so that it won't reverse RTL text
inside elements.

  • UserInterface/Views/DOMTreeOutline.css: (.tree-outline.dom li > span > .html-text-node):

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

9:41 PM Changeset in webkit [272107] by Alan Coon
  • 8 edits
    2 adds in branches/safari-611-branch

Cherry-pick r271414. rdar://problem/73473727

REGRESSION (r265044): [macOS] Safari autocorrects text when typing in login field on amazon.com
https://bugs.webkit.org/show_bug.cgi?id=220556
<rdar://problem/71602937>

Reviewed by Darin Adler.

Source/WebCore:

Add an internal testing hook to ask an input element whether it has disabled spellchecking (except for text
replacement).

  • testing/Internals.cpp: (WebCore::Internals::isSpellcheckDisabledExceptTextReplacement const):
  • testing/Internals.h:
  • testing/Internals.idl:

Source/WebKit:

Restores the implementation of WKBundleNodeHandleSetHTMLInputElementSpellcheckEnabled, which was removed in
r265044, with the reasoning that the code was unused. However, Safari still uses this SPI on macOS to prevent
automatic spelling correction from triggering when editing form fields that are AutoFillable.

Test: WebKit.DisableSpellcheck

  • WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp: (WKBundleNodeHandleSetHTMLInputElementSpellcheckEnabled):

Tools:

Add an API test that uses WebKit C API (WKBundleNodeHandleSetHTMLInputElementSpellcheckEnabled) to disable or
enable spellchecking on input elements.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKitCocoa/DisableSpellcheck.mm: Added.
  • TestWebKitAPI/Tests/WebKitCocoa/DisableSpellcheckPlugIn.mm: Added. (-[DisableSpellcheckPlugIn webProcessPlugIn:didCreateBrowserContextController:]): (-[DisableSpellcheckPlugIn webProcessPlugInBrowserContextController:didClearWindowObjectForFrame:inScriptWorld:]): (-[DisableSpellcheckPlugIn webProcessPlugInBrowserContextController:didFinishLoadForFrame:]):

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

9:41 PM Changeset in webkit [272106] by Alan Coon
  • 3 edits
    3 adds in branches/safari-611-branch

Cherry-pick r271388. rdar://problem/73473676

Safari 14 on 2x display renders NYS DMV page as blurry
https://bugs.webkit.org/show_bug.cgi?id=220528
<rdar://problem/71440246>

Reviewed by Tim Horton.

Source/WebCore:

Certain combinations of nested perspective and transform cause Core Animation to
rasterize at unit scale, which makes layers blurry on Retina displays.

Enable code that was already used on iOS to set layer rasterization scale.

Test: compositing/contents-scale/hidpi-tests/rasterization-scale.html

  • platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm: (WebCore::PlatformCALayerCocoa::setContentsScale):

LayoutTests:

  • compositing/contents-scale/hidpi-tests/rasterization-scale-expected.html: Added.
  • compositing/contents-scale/hidpi-tests/rasterization-scale.html: Added.

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

9:41 PM Changeset in webkit [272105] by Alan Coon
  • 3 edits in branches/safari-611-branch/Source/WebKit

Cherry-pick r271384. rdar://problem/73473494

Crash in pageDidComputePageRects()
https://bugs.webkit.org/show_bug.cgi?id=220518
<rdar://problem/71065870>

Reviewed by Ryosuke Niwa.

Make _printOperation a weak pointer and check it before use.
Since WKPrintingView is ref counted, a reference could still exist
even if _printOperation is nil. Remove the comment as it is not a
justification for a raw pointer.

  • UIProcess/mac/WKPrintingView.h:
  • UIProcess/mac/WKPrintingView.mm: (-[WKPrintingView _adjustPrintingMarginsForHeaderAndFooter]): (-[WKPrintingView _firstPrintedPageNumber]): (-[WKPrintingView _lastPrintedPageNumber]): (-[WKPrintingView _preparePDFDataForPrintingOnSecondaryThread]): (pageDidComputePageRects): (-[WKPrintingView _askPageToComputePageRects]): (-[WKPrintingView knowsPageRange:]): (-[WKPrintingView _drawPreview:]): (-[WKPrintingView drawRect:]): (-[WKPrintingView _drawPageBorderWithSizeOnMainThread:]): (-[WKPrintingView drawPageBorderWithSize:]): (-[WKPrintingView rectForPage:]): (-[WKPrintingView locationOfPrintRect:]): (-[WKPrintingView beginDocument]): (-[WKPrintingView endDocument]):

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

9:41 PM Changeset in webkit [272104] by Alan Coon
  • 6 edits in branches/safari-611-branch

Cherry-pick r271379. rdar://problem/73473604

Keep newly created IDBObjectStores in deleted map when IDBTransaction is aborted
https://bugs.webkit.org/show_bug.cgi?id=220483
<rdar://problem/71934293>

Patch by Sihui Liu <sihui_liu@appe.com> on 2021-01-11
Reviewed by Darin Adler.

Source/WebCore:

When an upgrade transaction is aborted, we move objects from m_deletedObjectStores to m_referencedObjectStores
to revert the deletion operation. When updating m_referencedObjectStores, we did not check whether key already
exists (this can happen when an object store gets deleted and a new object store with the same name is
created; see updated layout test). Therefore, some object store in m_referencedObjectStores would be replaced
and destroyed (since m_referencedObjectStores holds unique pointers) when the object store is referenced by JS
object.

Test: storage/indexeddb/modern/abort-objectstore-info.html

  • Modules/indexeddb/IDBTransaction.cpp: (WebCore::IDBTransaction::internalAbort):

LayoutTests:

  • storage/indexeddb/modern/abort-objectstore-info-expected.txt:
  • storage/indexeddb/modern/abort-objectstore-info-private-expected.txt:
  • storage/indexeddb/modern/resources/abort-objectstore-info.js: (prepareDatabase): (secondUpgradeNeeded): (checkState):

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

9:40 PM Changeset in webkit [272103] by Alan Coon
  • 2 edits in branches/safari-611-branch/Source/WebKit

Cherry-pick r271374. rdar://problem/73477142

Web Inspector: add nullptr check for WebInspectorProxy::m_extensionsController
https://bugs.webkit.org/show_bug.cgi?id=220485
<rdar://72496401>

Reviewed by Devin Rousso.

  • UIProcess/Inspector/WebInspectorProxy.cpp: (WebKit::WebInspectorProxy::frontendLoaded):

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

9:40 PM Changeset in webkit [272102] by Alan Coon
  • 5 edits in branches/safari-611-branch

Cherry-pick r271369. rdar://problem/73473654

WebProcessPool::establishWorkerContextConnectionToNetworkProcess should make sure to remove the selected process from the cache
https://bugs.webkit.org/show_bug.cgi?id=220503

Reviewed by Darin Adler.

Source/WebKit:

In case we reuse an existing web process, make sure to remove it from web process cache.
Covered by API test.

  • UIProcess/WebProcessCache.cpp: (WebKit::WebProcessCache::addProcessIfPossible): (WebKit::WebProcessCache::addProcess):
  • UIProcess/WebProcessPool.cpp: (WebKit::WebProcessPool::establishWorkerContextConnectionToNetworkProcess):

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm:

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

9:40 PM Changeset in webkit [272101] by Alan Coon
  • 3 edits
    5 adds in branches/safari-611-branch

Cherry-pick r271368. rdar://problem/73473690

Keep newly created IDBIndex objects in deleted map when IDBTransaction is aborted
https://bugs.webkit.org/show_bug.cgi?id=220489
<rdar://problem/70498831>

Patch by Sihui Liu <sihui_liu@appe.com> on 2021-01-11
Reviewed by Youenn Fablet.

Source/WebCore:

When an upgrade transaction is aborted, we move objects from m_deletedIndexes to m_referencedIndexes to revert
the index deletion operation. When updating m_referencedIndexes, we did not check whether key already exists.
Therefore, some indexes in m_referencedIndexes would be replaced and destroyed (since m_referencedIndexes holds
unique pointers) when the index is still referenced by JS.

Tests: storage/indexeddb/modern/abort-index-info-private.html

storage/indexeddb/modern/abort-index-info.html

  • Modules/indexeddb/IDBObjectStore.cpp: (WebCore::IDBObjectStore::rollbackForVersionChangeAbort):

LayoutTests:

  • storage/indexeddb/modern/abort-index-info-expected.txt: Added.
  • storage/indexeddb/modern/abort-index-info-private-expected.txt: Added.
  • storage/indexeddb/modern/abort-index-info-private.html: Added.
  • storage/indexeddb/modern/abort-index-info.html: Added.
  • storage/indexeddb/modern/resources/abort-index-info.js: Added. (prepareDatabase): (versionChangeSuccessCallback.secondRequest.onerror): (versionChangeSuccessCallback): (secondUpgradeNeeded): (checkState):

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

9:35 PM Changeset in webkit [272100] by Alan Bujtas
  • 20 edits in trunk

[LFC][RenderTreeAsText] Apply the "adjustForTableCells" quirk to line break runs
https://bugs.webkit.org/show_bug.cgi?id=221142

Reviewed by Antti Koivisto.

Source/WebCore:

When the table rows get stretched vertically as individual cells grow, the cell content
gets "aligned" vertically (not to confuse it with the align property) by offsetting each line.
However this offset is removed in the render tree dump for historical reasons.
This patch ensures that the modern line layout runs that we create for line breaks (<br>)
produce the same vertical position as the legacy layout runs.

  • rendering/RenderTreeAsText.cpp:

(WebCore::RenderTreeAsText::writeRenderObject):

LayoutTests:

  • platform/ios/fast/table/005-expected.txt:
  • platform/ios/tables/mozilla/bugs/bug106795-expected.txt:
  • platform/ios/tables/mozilla/bugs/bug1224-expected.txt:
  • platform/ios/tables/mozilla/bugs/bug16252-expected.txt:
  • platform/ios/tables/mozilla/bugs/bug20579-expected.txt:
  • platform/ios/tables/mozilla/bugs/bug32205-3-expected.txt:
  • platform/ios/tables/mozilla/bugs/bug82946-2-expected.txt:
  • platform/ios/tables/mozilla/other/wa_table_thtd_rowspan-expected.txt:
  • platform/mac-catalina/tables/mozilla/other/wa_table_thtd_rowspan-expected.txt:
  • platform/mac/fast/table/005-expected.txt:
  • platform/mac/tables/mozilla/bugs/bug106795-expected.txt:
  • platform/mac/tables/mozilla/bugs/bug1224-expected.txt:
  • platform/mac/tables/mozilla/bugs/bug16252-expected.txt:
  • platform/mac/tables/mozilla/bugs/bug20579-expected.txt:
  • platform/mac/tables/mozilla/bugs/bug32205-3-expected.txt:
  • platform/mac/tables/mozilla/bugs/bug82946-2-expected.txt:
  • platform/mac/tables/mozilla/other/wa_table_thtd_rowspan-expected.txt:
8:57 PM Changeset in webkit [272099] by ysuzuki@apple.com
  • 3 edits
    1 add in trunk

[JSC] Adjust property order of host JSFunction
https://bugs.webkit.org/show_bug.cgi?id=221168

Reviewed by Darin Adler.

JSTests:

  • stress/host-function-property-order.js: Added.

(shouldBe):

Source/JavaScriptCore:

We should first define "length" before "name".
This will be included in upcoming test262 update[1].

[1]: https://github.com/tc39/test262/pull/2921

  • runtime/JSFunction.cpp:

(JSC::JSFunction::finishCreation):

7:17 PM Changeset in webkit [272098] by Alan Coon
  • 8 edits in branches/safari-611-branch/Source

Versioning.

WebKit-7611.1.14

7:10 PM Changeset in webkit [272097] by Simon Fraser
  • 56 edits in trunk/Source/WebCore

Devirtualize some functions on InputType
https://bugs.webkit.org/show_bug.cgi?id=221121

Reviewed by Yusuke Suzuki .

Virtual functions on InputType show up in Speedometer profiles. We can make
many of these virtual functions non-virtual by just switching on the input type.

  • dom/Element.cpp:
  • html/BaseCheckableInputType.cpp:

(WebCore::BaseCheckableInputType::isCheckable): Deleted.

  • html/BaseCheckableInputType.h:
  • html/BaseTextInputType.cpp:

(WebCore::BaseTextInputType::isTextType const): Deleted.

  • html/BaseTextInputType.h:
  • html/ButtonInputType.cpp:

(WebCore::ButtonInputType::isTextButton const): Deleted.

  • html/ButtonInputType.h:
  • html/CheckboxInputType.cpp:

(WebCore::CheckboxInputType::isCheckbox const): Deleted.

  • html/CheckboxInputType.h:
  • html/ColorInputType.cpp:

(WebCore::ColorInputType::isColorControl const): Deleted.

  • html/ColorInputType.h:
  • html/DateInputType.cpp:

(WebCore::DateInputType::isDateField const): Deleted.

  • html/DateInputType.h:
  • html/DateTimeLocalInputType.cpp:

(WebCore::DateTimeLocalInputType::isDateTimeLocalField const): Deleted.

  • html/DateTimeLocalInputType.h:
  • html/EmailInputType.cpp:

(WebCore::EmailInputType::isEmailField const): Deleted.

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

(WebCore::FileInputType::isFileUpload const): Deleted.

  • html/FileInputType.h:
  • html/FormAssociatedElement.h:
  • html/HTMLFormControlElement.h:
  • html/HiddenInputType.cpp:

(WebCore::HiddenInputType::isHiddenType const): Deleted.

  • html/HiddenInputType.h:
  • html/ImageInputType.cpp:

(WebCore::ImageInputType::isImageButton const): Deleted.
(WebCore::ImageInputType::isEnumeratable): Deleted.

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

(WebCore::InputType::isTextType const):
(WebCore::InputType::isTextField const):
(WebCore::InputType::isTextButton const):
(WebCore::InputType::isInteractiveContent const):
(WebCore::InputType::supportLabels const):
(WebCore::InputType::isEnumeratable):
(WebCore::InputType::isCheckable):
(WebCore::InputType::isRangeControl const): Deleted.
(WebCore::InputType::isRadioButton const): Deleted.
(WebCore::InputType::isSearchField const): Deleted.
(WebCore::InputType::isHiddenType const): Deleted.
(WebCore::InputType::isPasswordField const): Deleted.
(WebCore::InputType::isCheckbox const): Deleted.
(WebCore::InputType::isEmailField const): Deleted.
(WebCore::InputType::isFileUpload const): Deleted.
(WebCore::InputType::isImageButton const): Deleted.
(WebCore::InputType::isNumberField const): Deleted.
(WebCore::InputType::isSubmitButton const): Deleted.
(WebCore::InputType::isTelephoneField const): Deleted.
(WebCore::InputType::isURLField const): Deleted.
(WebCore::InputType::isDateField const): Deleted.
(WebCore::InputType::isDateTimeField const): Deleted.
(WebCore::InputType::isDateTimeLocalField const): Deleted.
(WebCore::InputType::isMonthField const): Deleted.
(WebCore::InputType::isTimeField const): Deleted.
(WebCore::InputType::isWeekField const): Deleted.
(WebCore::InputType::isColorControl const): Deleted.

  • html/InputType.h:

(WebCore::InputType::isCheckbox const):
(WebCore::InputType::isColorControl const):
(WebCore::InputType::isDateField const):
(WebCore::InputType::isDateTimeField const):
(WebCore::InputType::isDateTimeLocalField const):
(WebCore::InputType::isEmailField const):
(WebCore::InputType::isFileUpload const):
(WebCore::InputType::isHiddenType const):
(WebCore::InputType::isImageButton const):
(WebCore::InputType::isMonthField const):
(WebCore::InputType::isNumberField const):
(WebCore::InputType::isPasswordField const):
(WebCore::InputType::isRadioButton const):
(WebCore::InputType::isRangeControl const):
(WebCore::InputType::isSearchField const):
(WebCore::InputType::isSubmitButton const):
(WebCore::InputType::isTelephoneField const):
(WebCore::InputType::isTimeField const):
(WebCore::InputType::isURLField const):
(WebCore::InputType::isWeekField const):

  • html/MonthInputType.cpp:

(WebCore::MonthInputType::isMonthField const): Deleted.

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

(WebCore::NumberInputType::isNumberField const): Deleted.

  • html/NumberInputType.h:
  • html/PasswordInputType.cpp:

(WebCore::PasswordInputType::isPasswordField const): Deleted.

  • html/PasswordInputType.h:
  • html/RadioInputType.cpp:

(WebCore::RadioInputType::isRadioButton const): Deleted.

  • html/RadioInputType.h:
  • html/RangeInputType.cpp:

(WebCore::RangeInputType::isRangeControl const): Deleted.

  • html/RangeInputType.h:
  • html/ResetInputType.cpp:

(WebCore::ResetInputType::isTextButton const): Deleted.

  • html/ResetInputType.h:
  • html/SearchInputType.cpp:

(WebCore::SearchInputType::isSearchField const): Deleted.

  • html/SearchInputType.h:
  • html/SubmitInputType.cpp:

(WebCore::SubmitInputType::isSubmitButton const): Deleted.
(WebCore::SubmitInputType::isTextButton const): Deleted.

  • html/SubmitInputType.h:
  • html/TelephoneInputType.cpp:

(WebCore::TelephoneInputType::isTelephoneField const): Deleted.

  • html/TelephoneInputType.h:
  • html/TextFieldInputType.cpp:

(WebCore::TextFieldInputType::isTextField const): Deleted.

  • html/TextFieldInputType.h:
  • html/TimeInputType.cpp:

(WebCore::TimeInputType::isTimeField const): Deleted.

  • html/TimeInputType.h:
  • html/URLInputType.cpp:

(WebCore::URLInputType::isURLField const): Deleted.

  • html/URLInputType.h:
  • html/WeekInputType.cpp:

(WebCore::WeekInputType::isWeekField const): Deleted.

  • html/WeekInputType.h:
6:39 PM Changeset in webkit [272096] by Megan Gardner
  • 11 edits in trunk/Source

Add plumbing to allow AppHighlights to be restored.
https://bugs.webkit.org/show_bug.cgi?id=221123

Reviewed by Wenson Hsieh.

Source/WebCore:

  • Modules/highlight/AppHighlightStorage.cpp:

(WebCore::AppHighlightStorage::restoreAppHighlights):

  • Modules/highlight/AppHighlightStorage.h:

Source/WebKit:

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _restoreAppHighlights:]):

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

(WebKit::WebPageProxy::restoreAppHighlights):

  • UIProcess/WebPageProxy.h:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::restoreAppHighlights):

  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/WebPage.messages.in:
6:16 PM Changeset in webkit [272095] by Tadeu Zagallo
  • 5 edits in trunk/Source/WTF

Make check for full HashTables opt-in
https://bugs.webkit.org/show_bug.cgi?id=221166
<rdar://problem/70902458>

Reviewed by Saam Barati and Yusuke Suzuki.

Having the check always on was a regression on Speedometer2, so we only keep it for
the HashMaps in the MetaAllocator.

  • wtf/HashTable.h:

(WTF::KeyTraits>::inlineLookup):
(WTF::KeyTraits>::lookupForWriting):
(WTF::KeyTraits>::fullLookupForWriting):
(WTF::KeyTraits>::addUniqueForInitialization):
(WTF::KeyTraits>::add):

  • wtf/HashTraits.h:
  • wtf/MetaAllocator.cpp:

(WTF::MetaAllocator::addFreeSpace):

  • wtf/MetaAllocator.h:
6:13 PM Changeset in webkit [272094] by weinig@apple.com
  • 4 edits in trunk/Source/WebCore

Update consumeNumberRaw() to return an Optional<double> rather than using a bool/out parameter pattern
https://bugs.webkit.org/show_bug.cgi?id=221164

Reviewed by Darin Adler.

Match modern convention and the other raw consumers by returning a Optional<double>
rather than using the older bool / out parameter pattern.

  • css/parser/CSSPropertyParser.cpp:

(WebCore::consumeFontVariationTag):
(WebCore::consumeCubicBezier):
(WebCore::consumeSpringFunction):
(WebCore::consumePerspective):
(WebCore::consumeCursor):
(WebCore::CSSPropertyParser::consumeFlex):

  • css/parser/CSSPropertyParserHelpers.cpp:

(WebCore::CSSPropertyParserHelpers::CalcParser::consumeNumberRaw):
(WebCore::CSSPropertyParserHelpers::consumeNumberRaw):
(WebCore::CSSPropertyParserHelpers::consumeNumber):
(WebCore::CSSPropertyParserHelpers::consumeFontWeightNumberRaw):
(WebCore::CSSPropertyParserHelpers::parseRGBParameters):
(WebCore::CSSPropertyParserHelpers::parseHSLParameters):
(WebCore::CSSPropertyParserHelpers::parseOptionalAlpha):
(WebCore::CSSPropertyParserHelpers::parseLabParameters):
(WebCore::CSSPropertyParserHelpers::parseLCHParameters):
(WebCore::CSSPropertyParserHelpers::parseColorFunctionForRGBTypes):
(WebCore::CSSPropertyParserHelpers::parseColorFunctionForLabParameters):
(WebCore::CSSPropertyParserHelpers::parseColorFunction):
(WebCore::CSSPropertyParserHelpers::consumeColorWorkerSafe):
(WebCore::CSSPropertyParserHelpers::consumeDeprecatedGradientColorStop):
(WebCore::CSSPropertyParserHelpers::consumeLineHeightRaw):

  • css/parser/CSSPropertyParserHelpers.h:
5:52 PM Changeset in webkit [272093] by don.olmstead@sony.com
  • 2 edits in trunk/Tools

[webkitpy] Thread.isAlive was renamed to Thread.is_alive
https://bugs.webkit.org/show_bug.cgi?id=221160

Reviewed by Jonathan Bedard.

Python 2.6 added threading.Thread.is_alive which aliased isAlive. In Python 3.x only
threading.Thread.is_alive is available so use that instead.

  • Scripts/webkitpy/layout_tests/controllers/layout_test_runner.py:

(Worker._run_test_in_another_thread):

5:25 PM Changeset in webkit [272092] by Alan Coon
  • 1 copy in tags/Safari-611.1.13

Tag Safari-611.1.13.

5:25 PM Changeset in webkit [272091] by Alan Coon
  • 1 delete in tags/Safari-611.1.13

Delete tag.

5:19 PM Changeset in webkit [272090] by Alan Coon
  • 5 edits in branches/safari-611-branch/Source

Cherry-pick r271619. rdar://problem/73461349

REGRESSION(r269865) Mail's context menu when right clicking on a link does not contain correct entries
https://bugs.webkit.org/show_bug.cgi?id=220745

Patch by Alex Christensen <achristensen@webkit.org> on 2021-01-19
Reviewed by Tim Horton.

Source/WebCore:

r269865 broke binary compatibility by changing the values of many WebCore::ContextMenuAction values and many WKContextMenuItemTag values,
and not in the same way. In WebContextMenuProxyMac::getContextMenuItem we call NSMenuItem setTag: with the value from WebCore::ContextMenuAction
and mail compares those values with values from WKContextMenuItemTag in our C API. This isn't ideal, but we need to retain binary compatibility.

  • platform/ContextMenuItem.h:

Source/WebKit:

  • Shared/API/c/WKContextMenuItem.cpp: Add a bunch of static_asserts to verify that our binary values correspond to each other and don't change.
  • Shared/API/c/WKContextMenuItemTypes.h:

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

5:16 PM Changeset in webkit [272089] by Beth Dakin
  • 2 edits in trunk/Websites/webkit.org

Remove non-inclusive language from webkit.org/blog-files/css-jit-introduction/html5-single-page-microbenchmark.html
https://bugs.webkit.org/show_bug.cgi?id=221154

Reviewed by Geoffrey Garen.

  • blog-files/css-jit-introduction/html5-single-page-microbenchmark.html:
4:51 PM Changeset in webkit [272088] by Alan Coon
  • 1 copy in tags/Safari-611.1.13

Tag Safari-611.1.13.

4:51 PM Changeset in webkit [272087] by Alan Coon
  • 1 delete in tags/Safari-611.1.13

Delete tag.

4:36 PM Changeset in webkit [272086] by keith_miller@apple.com
  • 3 edits in trunk/Source/JavaScriptCore

SourceParseMode should be a member of the JSC::Parser
https://bugs.webkit.org/show_bug.cgi?id=221149

Reviewed by Ross Kirsling.

Right now we pass the SourceParseMode as a argument to many of the
functions in the parser. This patch move it into a member on the
class. This will make it available deeper in the parser, which is
important for implementing top level await.

  • parser/Parser.cpp:

(JSC::Parser<LexerType>::Parser):
(JSC::Parser<LexerType>::parseInner):
(JSC::Parser<LexerType>::parseModuleSourceElements):
(JSC::Parser<LexerType>::parseAsyncFunctionSourceElements):
(JSC::Parser<LexerType>::parseAsyncGeneratorFunctionSourceElements):
(JSC::Parser<LexerType>::parseFunctionBody):
(JSC::Parser<LexerType>::parseFunctionParameters):
(JSC::Parser<LexerType>::parseFunctionInfo):
(JSC::Parser<LexerType>::parseFunctionDeclaration):
(JSC::Parser<LexerType>::parseAsyncFunctionDeclaration):
(JSC::Parser<LexerType>::parseClass):
(JSC::Parser<LexerType>::parseProperty):
(JSC::Parser<LexerType>::parsePropertyMethod):
(JSC::Parser<LexerType>::parseGetterSetter):
(JSC::Parser<LexerType>::parseFunctionExpression):
(JSC::Parser<LexerType>::parseAsyncFunctionExpression):
(JSC::Parser<LexerType>::parseArrowFunctionExpression):

  • parser/Parser.h:

(JSC::Parser::sourceParseMode const):
(JSC::Parser<LexerType>::parse):
(JSC::parse):
(JSC::parseFunctionForFunctionConstructor):

4:30 PM Changeset in webkit [272085] by ysuzuki@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed, internal build fix after r272082
https://bugs.webkit.org/show_bug.cgi?id=221147

  • runtime/Options.cpp:

(JSC::canUseJITCage):

4:18 PM Changeset in webkit [272084] by mmaxfield@apple.com
  • 3 edits
    2 adds in trunk

WebKit doesn't automatically right-align Adlam
https://bugs.webkit.org/show_bug.cgi?id=220885

Reviewed by Alex Christensen.

Source/WTF:

If we want to iterate across code points, we have to actually
iterate across code points instead of iterating across code units.

Test: fast/text/adlam-dir-auto.html

  • wtf/text/StringImpl.cpp:

(WTF::StringImpl::defaultWritingDirection):

LayoutTests:

  • fast/text/adlam-dir-auto-expected.html: Added.
  • fast/text/adlam-dir-auto.html: Added.
3:32 PM Changeset in webkit [272083] by mmaxfield@apple.com
  • 2 edits in trunk/Tools

Upgrade motionmark1.1.plan to r272044
https://bugs.webkit.org/show_bug.cgi?id=221148

Reviewed by Said Abou-Hallawa.

r272044 is attempting to address extreme variance in the test.

  • Scripts/webkitpy/benchmark_runner/data/plans/motionmark1.1.plan:
3:31 PM Changeset in webkit [272082] by ysuzuki@apple.com
  • 5 edits in trunk/Source

[JSC] Add com.apple.private.securejit entitlement for JITCage
https://bugs.webkit.org/show_bug.cgi?id=221147

Reviewed by Keith Miller.

Source/JavaScriptCore:

Add com.apple.private.securejit only for iOS, used for JITCage.

  • entitlements.plist:
  • runtime/Options.cpp:

(JSC::canUseJITCage):

Source/WebKit:

Add com.apple.private.securejit only for iOS.

  • Scripts/process-entitlements.sh:
3:07 PM Changeset in webkit [272081] by ysuzuki@apple.com
  • 7 edits
    1 add in trunk

[JSC] Fix WebAssembly.Global's error message and support "funcref"
https://bugs.webkit.org/show_bug.cgi?id=221157

Reviewed by Keith Miller.

JSTests:

  • wasm/stress/global-wrong-type.js: Added.

(assert.throws):

LayoutTests/imported/w3c:

We also update test expect files failing after r272074.

  • web-platform-tests/wasm/jsapi/global/type.tentative.any-expected.txt:
  • web-platform-tests/wasm/jsapi/global/type.tentative.any.worker-expected.txt:

Source/JavaScriptCore:

Since it accepts "anyfunc" and "externref", we should update the error message.
And we should support "funcref" too.

  • wasm/js/WebAssemblyGlobalConstructor.cpp:

(JSC::JSC_DEFINE_HOST_FUNCTION):

  • wasm/js/WebAssemblyTableConstructor.cpp:

(JSC::JSC_DEFINE_HOST_FUNCTION):

2:55 PM Changeset in webkit [272080] by ysuzuki@apple.com
  • 8 edits in branches/safari-611-branch/Source/JavaScriptCore

[JSC] Avoid using DirectCall when executable is wasm function
https://bugs.webkit.org/show_bug.cgi?id=221055

Reviewed by Keith Miller.

This is a partial patch from https://bugs.webkit.org/show_bug.cgi?id=220339, which is reverted because of Facebook crash.
For now, we just avoid using DirectCall to wasm functions so that normal Call will be used, and it is efficient. This
patch avoids JetStream2 regression.

  • dfg/DFGOperations.cpp:

(JSC::DFG::JSC_DEFINE_JIT_OPERATION):

  • dfg/DFGStrengthReductionPhase.cpp:

(JSC::DFG::StrengthReductionPhase::handleNode):

  • jit/JITOperations.cpp:

(JSC::virtualForWithFunction):

  • llint/LLIntSlowPaths.cpp:

(JSC::LLInt::setUpCall):

  • runtime/Intrinsic.cpp:

(JSC::intrinsicName):

  • runtime/Intrinsic.h:
  • wasm/js/WebAssemblyFunction.cpp:

(JSC::WebAssemblyFunction::create):

Canonical link: https://commits.webkit.org/233420@main

2:55 PM Changeset in webkit [272079] by ysuzuki@apple.com
  • 12 edits in branches/safari-611-branch

Revert "[JSC] DFG/FTL DirectCall need to respect Wasm IC"

This reverts commit a125d083477069e9cb6bebbe6426eea7919499e4.

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

Unreviewed, reverting r272065.
https://bugs.webkit.org/show_bug.cgi?id=221155

Introduced crash

Reverted changeset:

"[macOS] Add reporting for some syscalls"
https://bugs.webkit.org/show_bug.cgi?id=221135
https://trac.webkit.org/changeset/272065

1:42 PM Changeset in webkit [272077] by Alan Coon
  • 1 copy in tags/Safari-610.4.3.1.6

Tag Safari-610.4.3.1.6.

1:37 PM Changeset in webkit [272076] by Alan Coon
  • 8 edits in branches/safari-610.4.3.1-branch/Source

Versioning.

WebKit-7610.4.3.1.6

1:26 PM Changeset in webkit [272075] by Fujii Hironori
  • 15 edits in trunk/Source/WebCore

Remove unused GraphicsContextGL::Destination enum class
https://bugs.webkit.org/show_bug.cgi?id=221122

Reviewed by Kenneth Russell.

It was used by Chromium port.

  • platform/graphics/GraphicsContextGL.h:

(WebCore::GraphicsContextGL::destination const): Deleted.

  • platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm:

(WebCore::GraphicsContextGLOpenGL::create):
(WebCore::GraphicsContextGLOpenGL::GraphicsContextGLOpenGL):

  • platform/graphics/nicosia/texmap/NicosiaGCGLANGLELayer.cpp:

(Nicosia::GCGLANGLELayer::GCGLANGLELayer):

  • platform/graphics/nicosia/texmap/NicosiaGCGLANGLELayer.h:
  • platform/graphics/nicosia/texmap/NicosiaGCGLLayer.cpp:

(Nicosia::GCGLLayer::GCGLLayer):

  • platform/graphics/nicosia/texmap/NicosiaGCGLLayer.h:
  • platform/graphics/opengl/GraphicsContextGLOpenGL.h:
  • platform/graphics/opengl/GraphicsContextGLOpenGLES.cpp:

(WebCore::GraphicsContextGLOpenGL::create):
(WebCore::GraphicsContextGLOpenGL::GraphicsContextGLOpenGL):

  • platform/graphics/opengl/GraphicsContextGLOpenGLPrivate.cpp:

(WebCore::GraphicsContextGLOpenGLPrivate::GraphicsContextGLOpenGLPrivate):

  • platform/graphics/opengl/GraphicsContextGLOpenGLPrivate.h:
  • platform/graphics/texmap/GraphicsContextGLTextureMapper.cpp:

(WebCore::GraphicsContextGLOpenGL::create):
(WebCore::GraphicsContextGLOpenGL::GraphicsContextGLOpenGL): Fix a compilation error by renaming texureType to textureTarget.

  • platform/graphics/texmap/TextureMapperGCGLPlatformLayer.cpp:

(WebCore::TextureMapperGCGLPlatformLayer::TextureMapperGCGLPlatformLayer):

  • platform/graphics/texmap/TextureMapperGCGLPlatformLayer.h:
12:59 PM Changeset in webkit [272074] by commit-queue@webkit.org
  • 11 edits in trunk

[WASM-References] Enable reference types by default
https://bugs.webkit.org/show_bug.cgi?id=220890

Patch by Dmitry Bezhetskov <dbezhetskov> on 2021-01-29
Reviewed by Yusuke Suzuki.

Enable wasm reference types by default.

Source/JavaScriptCore:

  • runtime/OptionsList.h:

Tools:

  • Scripts/run-jsc-stress-tests:
12:19 PM Changeset in webkit [272073] by mmaxfield@apple.com
  • 11 edits
    18 adds in trunk

font-stretch is not applied to system-ui
https://bugs.webkit.org/show_bug.cgi?id=221103
<rdar://problem/73719139>

Reviewed by Darin Adler.

Source/WebCore:

We just never hooked it up.

Tests: fast/text/system-font-width-2.html

fast/text/system-font-width-3.html
fast/text/system-font-width-4.html
fast/text/system-font-width-5.html
fast/text/system-font-width-6.html
fast/text/system-font-width-7.html
fast/text/system-font-width-8.html
fast/text/system-font-width-9.html
fast/text/system-font-width.html

  • platform/graphics/cocoa/SystemFontDatabaseCoreText.cpp:

(WebCore::SystemFontDatabaseCoreText::createSystemUIFont):
(WebCore::SystemFontDatabaseCoreText::createSystemDesignFont):
(WebCore::SystemFontDatabaseCoreText::createTextStyleFont):
(WebCore::SystemFontDatabaseCoreText::createFontByApplyingWeightWidthItalicsAndFallbackBehavior):
(WebCore::mapWeight):
(WebCore::mapWidth):
(WebCore::SystemFontDatabaseCoreText::systemFontParameters):
(WebCore::SystemFontDatabaseCoreText::createFontByApplyingWeightItalicsAndFallbackBehavior): Deleted.

  • platform/graphics/cocoa/SystemFontDatabaseCoreText.h:

(WebCore::SystemFontDatabaseCoreText::CascadeListParameters::operator== const):
(WebCore::SystemFontDatabaseCoreText::CascadeListParameters::hash const):

Source/WebCore/PAL:

  • pal/spi/cocoa/CoreTextSPI.h:

Source/WTF:

  • wtf/PlatformHave.h:

LayoutTests:

  • fast/text/system-font-width-2-expected-mismatch.html: Added.
  • fast/text/system-font-width-2.html: Added.
  • fast/text/system-font-width-3-expected-mismatch.html: Added.
  • fast/text/system-font-width-3.html: Added.
  • fast/text/system-font-width-4-expected-mismatch.html: Added.
  • fast/text/system-font-width-4.html: Added.
  • fast/text/system-font-width-5-expected.html: Added.
  • fast/text/system-font-width-5.html: Added.
  • fast/text/system-font-width-6-expected-mismatch.html: Added.
  • fast/text/system-font-width-6.html: Added.
  • fast/text/system-font-width-7-expected-mismatch.html: Added.
  • fast/text/system-font-width-7.html: Added.
  • fast/text/system-font-width-8-expected-mismatch.html: Added.
  • fast/text/system-font-width-8.html: Added.
  • fast/text/system-font-width-9-expected-mismatch.html: Added.
  • fast/text/system-font-width-9.html: Added.
  • fast/text/system-font-width-expected-mismatch.html: Added.
  • fast/text/system-font-width.html: Added.
  • platform/ios/TestExpectations:
  • platform/mac/TestExpectations:
  • platform/win/TestExpectations:
11:31 AM Changeset in webkit [272072] by pvollan@apple.com
  • 2 edits in trunk/Source/WebKit

[iOS] Stop observing changes in one preference domain
https://bugs.webkit.org/show_bug.cgi?id=221130
<rdar://problem/70729182>

Reviewed by Brent Fulgham.

It has been determined that there is no need to observe preference changes in the domain 'com.apple.Preferences'.

  • UIProcess/Cocoa/PreferenceObserver.mm:

(-[WKPreferenceObserver init]):

11:26 AM Changeset in webkit [272071] by commit-queue@webkit.org
  • 8 edits
    1 add in trunk

[JSC] WebAssembly.Global should support Funcref and Externref
https://bugs.webkit.org/show_bug.cgi?id=220914

Patch by Dmitry Bezhetskov <dbezhetskov> on 2021-01-29
Reviewed by Yusuke Suzuki.

JSTests:

Add tests for WebAssembly.Global ctors with
new reference types:
https://webassembly.github.io/reference-types/js-api/index.html#dom-global-global.

  • wasm/references/globals.js: Added.

(Pelmen):
(testGlobalConstructorForExternref):
(async testGlobalConstructorForFuncref):

Source/JavaScriptCore:

Allow using reference types in ctor of WebAssembly.Global
according to the spec
https://webassembly.github.io/reference-types/js-api/index.html#dom-global-global.

  • wasm/js/WebAssemblyGlobalConstructor.cpp:

(JSC::JSC_DEFINE_HOST_FUNCTION):

11:25 AM Changeset in webkit [272070] by pvollan@apple.com
  • 2 edits in trunk/Source/WebKit

[macOS] Add audio related shm write reporting
https://bugs.webkit.org/show_bug.cgi?id=221136
<rdar://problem/73510094>

Reviewed by Brent Fulgham.

Add audio related shm write reporting in the WebContent process' sandbox.

  • WebProcess/com.apple.WebProcess.sb.in:
11:22 AM Changeset in webkit [272069] by pvollan@apple.com
  • 3 edits in trunk/Source/WebKit

[macOS] Remove access to IOSurfaceSendRight
https://bugs.webkit.org/show_bug.cgi?id=221131
<rdar://problem/70496356>

Reviewed by Brent Fulgham.

Remove access to IOSurfaceSendRight in the WebContent process on macOS, since there are no reports of this being used.

  • UIProcess/WebPageProxy.cpp:

(WebKit::gpuIOKitClasses):

  • WebProcess/com.apple.WebProcess.sb.in:
11:14 AM Changeset in webkit [272068] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit

Unreviewed, reverting r272020 and r272034.
https://bugs.webkit.org/show_bug.cgi?id=221144

Revert potentially related change while investigating crash

Reverted changesets:

"[macOS] WebProcess::updateProcessName should initiate network
process connection if none exists"
https://bugs.webkit.org/show_bug.cgi?id=221094
https://trac.webkit.org/changeset/272020

"Unreviewed macOS build fix after r272020."
https://trac.webkit.org/changeset/272034

11:07 AM Changeset in webkit [272067] by Andres Gonzalez
  • 22 edits
    2 adds in trunk

Support for aria-current state changed notifications.
https://bugs.webkit.org/show_bug.cgi?id=221074

Reviewed by Chris Fleizach.

Source/WebCore:

Test: accessibility/aria-current-state-changed-notification.html

Added handling of the AXCurrentStateChanged notification for Mac and iOS
ports. This notification is fired when the aria-current attribute
changes.
Handling of this notification is required to properly update the
accessibility properties of the target object and convey them to
assistive technology clients.

  • accessibility/AXLogger.cpp:

(WebCore::operator<<): Renamed notification anumerand.

  • accessibility/AXObjectCache.cpp:

(WebCore::AXObjectCache::handleAttributeChange):

  • accessibility/AXObjectCache.h:
  • accessibility/atk/AXObjectCacheAtk.cpp:

(WebCore::AXObjectCache::postPlatformNotification):

  • accessibility/ios/AXObjectCacheIOS.mm:

(WebCore::AXObjectCache::postPlatformNotification):

  • accessibility/ios/WebAccessibilityObjectWrapperIOS.h:
  • accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:

(-[WebAccessibilityObjectWrapper accessibilityDOMIdentifier]):
(-[WebAccessibilityObjectWrapper postCurrentStateChangedNotification]):
(-[WebAccessibilityObjectWrapper accessibilityCurrentState]):
(-[WebAccessibilityObjectWrapper accessibilityARIACurrentStatus]): Renamed to accessibilityCurrentState.

  • accessibility/mac/AXObjectCacheMac.mm:

(WebCore::AXObjectCache::postPlatformNotification):

Tools:

Added AccessibilityUIElement::domIdentifier and currentStateValue used
in LayoutTests/accessibility/aria-current-state-changed-notification.html.

  • WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp:

(WTR::AccessibilityUIElement::domIdentifier const): Non-Cocoa implementation.
(WTR::AccessibilityUIElement::currentStateValue const): Non-Cocoa implementation.

  • WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
  • WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl:
  • WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm:

(WTR::AccessibilityUIElement::domIdentifier const):
(WTR::AccessibilityUIElement::stringAttributeValue):
(WTR::AccessibilityUIElement::currentStateValue const):

  • WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:

(WTR::AccessibilityUIElement::domIdentifier const):
(WTR::AccessibilityUIElement::currentStateValue const):

LayoutTests:

  • accessibility/aria-current-state-changed-notification-expected.txt: Added.
  • accessibility/aria-current-state-changed-notification.html: Added.
  • accessibility/aria-current.html:

Use AccessibilityUIElement::currentStateValue for consistency and to
match closely how actual clients will invoke this functionality.

  • platform/gtk/TestExpectations:
  • platform/ios-wk1/TestExpectations:
  • platform/ios/TestExpectations:
  • platform/mac-wk1/TestExpectations:
  • platform/win/TestExpectations:
10:48 AM Changeset in webkit [272066] by weinig@apple.com
  • 7 edits
    2 adds in trunk/Source/WebCore

Extract color model and transfer functions into their own files
https://bugs.webkit.org/show_bug.cgi?id=221105

Reviewed by Tim Horton.

Things are getting a bit cramped in ColorTypes.h and ColorConversions.
This extracts the color models into ColorModels.h and gamma transfer
functions into ColorTransferFunctions.h and generalized the transfer
functions a bit to reduce the code size.

  • Headers.cmake:
  • WebCore.xcodeproj/project.pbxproj:
  • platform/graphics/ColorModels.h: Added.
  • platform/graphics/ColorTransferFunctions.h: Added.
  • platform/graphics/ColorConversion.cpp:
  • platform/graphics/ColorConversion.h:
  • platform/graphics/ColorTypes.h:

Move code to new files.

10:40 AM Changeset in webkit [272065] by pvollan@apple.com
  • 2 edits in trunk/Source/WebKit

[macOS] Add reporting for some syscalls
https://bugs.webkit.org/show_bug.cgi?id=221135
<rdar://problem/73513138>

Reviewed by Brent Fulgham.

Add reporting for some syscalls in the WebContent process on macOS in order to determine if they are being used.

  • WebProcess/com.apple.WebProcess.sb.in:
10:11 AM Changeset in webkit [272064] by ddkilzer@apple.com
  • 6 edits in trunk

check-webkit-style: warn about WTF::BlockPtr use in JavaScriptCore until ARC is enabled
<https://webkit.org/b/221108>
<rdar://problem/73726640>

Reviewed by Joseph Pecoraro.

Source/JavaScriptCore:

  • API/JSVirtualMachine.mm:
  • inspector/remote/RemoteConnectionToTarget.h:
  • Remove or replace unused <wtf/BlockPtr.h> headers.

Tools:

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

(_is_javascriptcore_file): Add.

  • Extract code to reuse from check_identifier_name_in_declaration().

(check_include_line):
(check_language):

  • Add check for use of WTF::BlockPtr.

(check_identifier_name_in_declaration):

  • Use _is_javascriptcore_file().

(CppChecker):

  • Add 'security/javascriptcore_wtf_blockptr' to list of checkers.
  • Scripts/webkitpy/style/checkers/cpp_unittest.py:

(CppStyleTestBase.perform_language_rules_check):

  • Add 'security/javascriptcore_wtf_blockptr' to list of checkers for testing header includes.

(OrderOfIncludesTest.test_check_wtf_blockptr_usage_in_javascriptcore):

9:34 AM Changeset in webkit [272063] by Truitt Savell
  • 2 edits in trunk/LayoutTests

REGRESSION: [BigSur wk1] media/mediacapabilities/vp9.html is consistently failing
https://bugs.webkit.org/show_bug.cgi?id=221095

Unreviewed test gardening.

Patch by Amir Mark Jr <Amir Mark Jr.> on 2021-01-29

  • platform/mac-wk1/TestExpectations:
9:20 AM Changeset in webkit [272062] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC][Integration] Switch over to legacy line layout when inline tree is required
https://bugs.webkit.org/show_bug.cgi?id=221118

Reviewed by Antti Koivisto.

These functions still require inline tree.

  • rendering/RenderInline.cpp:

(WebCore::RenderInline::generateLineBoxRects const):
(WebCore::RenderInline::absoluteRects const):
(WebCore::RenderInline::absoluteQuads const):
(WebCore::RenderInline::absoluteQuadsIgnoringContinuation const):
(WebCore::RenderInline::addFocusRingRects):

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

Two 'tests' are running with out expectation files that are not real tests.
https://bugs.webkit.org/show_bug.cgi?id=208477

Unreviewed test gardening.

  • platform/mac-wk1/TestExpectations:
7:11 AM Changeset in webkit [272060] by commit-queue@webkit.org
  • 14 edits
    2 adds in trunk

Unreviewed, reverting r272052.
https://bugs.webkit.org/show_bug.cgi?id=221132

WPT mediacapture-record/MediaRecorder-stop.html is broken

Reverted changeset:

"Use WebRTC GPU process flag for MediaRecorder"
https://bugs.webkit.org/show_bug.cgi?id=220967
https://trac.webkit.org/changeset/272052

6:53 AM Changeset in webkit [272059] by Said Abou-Hallawa
  • 3 edits
    2 adds in trunk

REGRESSION(r262893): feComponentTransfer is not rendered correctly on Retina display
https://bugs.webkit.org/show_bug.cgi?id=220576

Reviewed by Simon Fraser.

Source/WebCore:

convertImageDataToColorSpace() creates a temporary ImageBuffer with the
size of m_premultipliedImageResult. This ImageBuffer has to be scaled
with the filterScale(). But the size of m_premultipliedImageResult is
scaled with the filterScale(). This means, convertImageDataToColorSpace()
applies the filterScale() twice to the temporary ImageBuffer.

The fix is to create the temporary ImageBuffer with the unscaled size of
the input ImageData and scale it with the filterScale().

Test: fast/hidpi/filters-component-transfer.html

  • platform/graphics/filters/FilterEffect.cpp:

(WebCore::FilterEffect::convertImageDataToColorSpace):
(WebCore::FilterEffect::copyPremultipliedResult):

LayoutTests:

  • fast/hidpi/filters-component-transfer-expected.html: Added.
  • fast/hidpi/filters-component-transfer.html: Added.
5:03 AM Changeset in webkit [272058] by commit-queue@webkit.org
  • 17 edits in trunk/Source/WebKit

Some type serialization encoders are implemented in Encoder class
https://bugs.webkit.org/show_bug.cgi?id=220519

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2021-01-29
Reviewed by Chris Dumez.

Move arithmetic type and enum type serialization from Encoder to
ArgumentCoder. This makes it a bit simpler to implement multiple
Encoder types, as the serialization code is consistently separate
from the Encoder. WebGL SHM IPC stream extensions would eventually
need a similar but slightly different Encoder.

Since Encoder is intentionally coupled with the Decoder, do the
corresponding modification to Decoder class for consistency.

Reimplement Has{Legacy,Modern}Decoder for ease of forward declaration
and (perhaps?) in a bit simpler terms.

Encoder::operator<<() and Encoder::encode() were the same function.
Remove Encoder::encode().

No new tests, a refactor.

  • NetworkProcess/NetworkSocketChannel.h:
  • Platform/IPC/ArgumentCoder.h:

(IPC::Detail::TestLegacyDecoder):
(IPC::Detail::TestModernDecoder):
(IPC::ArgumentCoder::encode):
(IPC::ArgumentCoder::decode):

  • Platform/IPC/ArgumentCoders.h:
  • Platform/IPC/Connection.h:

(IPC::Connection::send):
(IPC::Connection::sendWithAsyncReply):
(IPC::Connection::sendSync):

  • Platform/IPC/Decoder.h:

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

  • Platform/IPC/Encoder.h:
  • Platform/IPC/MessageSender.h:
  • Platform/IPC/cocoa/ConnectionCocoa.mm:

(IPC::Connection::open):

  • Platform/cocoa/SharedMemoryCocoa.cpp:
  • Shared/RemoteLayerTree/RemoteLayerTreeTransaction.mm:

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

  • Shared/RemoteLayerTree/RemoteScrollingUIState.cpp:

(WebKit::RemoteScrollingUIState::encode const):

  • UIProcess/AuxiliaryProcessProxy.h:

(WebKit::AuxiliaryProcessProxy::send):
(WebKit::AuxiliaryProcessProxy::sendWithAsyncReply):

  • WebProcess/WebPage/IPCTestingAPI.cpp:

(WebKit::IPCTestingAPI::JSIPC::sendMessage):

  • WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.mm:

(WebKit::RemoteLayerTreeDrawingArea::updateRendering):

3:01 AM Changeset in webkit [272057] by commit-queue@webkit.org
  • 4 edits in trunk/Source

[GTK] return-type-c-linkage warnings
https://bugs.webkit.org/show_bug.cgi?id=221047

Patch by Philippe Normand <pnormand@igalia.com> on 2021-01-29
Reviewed by Carlos Garcia Campos.

Remove extern "C" braces, un-needed for private C++ objects.

Source/WebCore:

  • platform/network/soup/WebKitFormDataInputStream.h:

Source/WebKit:

  • NetworkProcess/soup/WebKitDirectoryInputStream.h:
2:46 AM Changeset in webkit [272056] by commit-queue@webkit.org
  • 4 edits in trunk/Tools

[JSC] Implement --artifact-exec-wrapper
https://bugs.webkit.org/show_bug.cgi?id=220924

Patch by Angelos Oikonomopoulos <Angelos Oikonomopoulos> on 2021-01-29
Reviewed by Carlos Alberto Lopez Perez.

Add an option to specify a wrapper for executing the built
artifacts for JSC (i.e. jsc, testmasm, ...). This is useful when
crossbuilding, to be able to specify the ELF interpreter and
LD_LIBRARY_PATH for the built executables (and only those; the
scripts may well execute native binaries that shouldn't be
wrapped). It's not needed when running the tests on the remotes
(as generate-bundle will take care of all that), but helps
e.g. when running 32-bit ARM binaries on a 64-bit host and not
using the system compiler/libraries.

This patch also simplifies the bytecode cache helper by switching
the argument order and changes a couple of uses of pathToVM to
vmCommand for consistency. It should be noted that
--artifact-exec-wrapper is not compatible with
--force-architecture. That shouldn't be a problem as (a) the use
cases of the two flags don't seem to overlap and (b) the exec
wrapper can subsume the functionality of --force-architecture.

  • Scripts/jsc-stress-test-helpers/bytecode-cache-test-helper.sh:
  • Scripts/run-javascriptcore-tests:

(runTest):
(runJSCStressTests):

  • Scripts/run-jsc-stress-tests:
2:36 AM Changeset in webkit [272055] by Philippe Normand
  • 9 edits in trunk

[GStreamer][Playbin3] Support for CEA-608 closed captioned media
https://bugs.webkit.org/show_bug.cgi?id=220654

Reviewed by Xabier Rodriguez-Calvar.

Source/WebCore:

Playbin2 currently doesn't support closed-caption formats such as CEA-608 and CEA-708.
However playbin3's decodebin3 will expose a source pad for these, so our text combiner can
handle this format, by adding a custom encoder that converts CEA-608 to WebVTT.

No new tests, although media/media-captions.html and media/track/track-in-band-style.html
will now pass when this env var is set WEBKIT_GST_USE_PLAYBIN3=1.

  • Modules/mediacontrols/mediaControlsAdwaita.css: Synchronize text-track-container and cue

CSS with mediaControlsBase.css.
(video::-webkit-media-text-track-container,):
(video::-webkit-media-text-track-container):
(video::cue):
(video::cue(:future)):

  • platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.cpp: Set track kind according

to the GstStream format this track represents.
(WebCore::InbandTextTrackPrivateGStreamer::InbandTextTrackPrivateGStreamer):

  • platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.h:
  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: Drive-by, check

WEBKIT_GST_USE_PLAYBIN3 contents and sprinkle a few more debug calls.
(WebCore::MediaPlayerPrivateGStreamer::doSeek):
(WebCore::MediaPlayerPrivateGStreamer::timeChanged):
(WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin):

  • platform/graphics/gstreamer/TextCombinerGStreamer.cpp: Plug custom encoder handling

conversion of CEA-608 to WebVTT.
(webKitTextCombinerHandleCapsEvent):
(webkitTextCombinerReleasePad):
(webKitTextCombinerConstructed):

LayoutTests:

  • media/track/track-in-band-style-expected.txt:
  • media/track/track-in-band-style.html:
2:01 AM Changeset in webkit [272054] by svillar@igalia.com
  • 4 edits
    2 adds in trunk

[css-flexbox] REGRESSION(r266695): content inside a <button> inside a flex container has a height of 0 without a declared min-height
https://bugs.webkit.org/show_bug.cgi?id=220946

Reviewed by Zalan Bujtas.

Source/WebCore:

Test: css3/flexbox/percentage-descendants-of-skipped-flex-item.html

r252620 added an optimization which saves layouts for flexbox containers' descendants with percentage heights.
That optimization relies on a hash map of percentage height descendants that is filled in with calls to
addPercentHeightDescendant().

FlexibleBoxImpl's like RenderButton might wrap their children in anonymous blocks. Those anonymous blocks are
skipped for percentage height calculations in RenderBox::computePercentageLogicalHeight() and thus
addPercentHeightDescendant() is never called for them. This means that hasPercentageHeightDescendants() would
always wrongly return false for a child of a <button> with a percentage height.

  • rendering/RenderFlexibleBox.cpp:

(WebCore::RenderFlexibleBox::childHasPercentHeightDescendants const): Renamed from hasPercentHeightDescendants in
order not to clash with RenderBlock method. It now also checks whether flex items skipped from percentage
height calculations are the containing blocks of any percentage height descendant of the flex container
(WebCore::RenderFlexibleBox::layoutAndPlaceChildren):
(WebCore::RenderFlexibleBox::hasPercentHeightDescendants const): Deleted.

  • rendering/RenderFlexibleBox.h:

LayoutTests:

  • css3/flexbox/percentage-descendants-of-skipped-flex-item-expected.html: Added.
  • css3/flexbox/percentage-descendants-of-skipped-flex-item.html: Added.
1:01 AM Changeset in webkit [272053] by youenn@apple.com
  • 6 edits in trunk

[MacOS] Enable WebKitTestRunner audio and video capture in GPUProcess
https://bugs.webkit.org/show_bug.cgi?id=221035

Reviewed by Eric Carlson.

Tools:

Remove the default TestOptions values and instead on MacOS rely on capture in GPUProcess.
On iOS, capture ill still happen inprocess for the time being.

  • WebKitTestRunner/TestOptions.cpp:

(WTR::TestOptions::defaults):

LayoutTests:

fast/mediastream/media-stream-track-interrupted.html needs to be run with mock audio capture in process
as interruption mock testing is only supported this way.
SpeechRecognition in GPUProcess is not yet working so we disable capture in GPU Process for these two tests
until SpeechRecognition in GPUProcess is supported.

  • fast/mediastream/media-stream-track-interrupted.html:
  • fast/speechrecognition/start-recognition-then-stop.html:
  • fast/speechrecognition/start-second-recognition.html:
12:53 AM Changeset in webkit [272052] by youenn@apple.com
  • 14 edits
    2 deletes in trunk

Use WebRTC GPU process flag for MediaRecorder
https://bugs.webkit.org/show_bug.cgi?id=220967

Reviewed by Eric Carlson.

Source/WebCore:

Remove Internals::setUseGPUProcessForWebRTC and rely on WebRTC codec feature flag.

  • Modules/mediarecorder/MediaRecorderProvider.h:
  • testing/Internals.cpp:

(WebCore::Internals::setUseGPUProcessForWebRTC): Deleted.

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

Source/WebKit:

  • WebProcess/GPU/webrtc/MediaRecorderProvider.cpp:

(WebKit::MediaRecorderProvider::createMediaRecorderPrivate):

LayoutTests:

Update test to use feature flag instead of internals API.
Removing webrtc/video-gpuProcess.html since it is now equivalent to webrtc/video.html.

  • http/wpt/mediarecorder/MediaRecorder-AV-audio-video-dataavailable-gpuprocess.html:
  • http/wpt/mediarecorder/MediaRecorder-AV-audio-video-dataavailable.html:
  • http/wpt/mediarecorder/MediaRecorder-requestData.html:
  • http/wpt/mediarecorder/mute-tracks.html:
  • http/wpt/mediarecorder/pause-recording.html:
  • platform/glib/TestExpectations:
  • webrtc/video-gpuProcess-expected.txt: Deleted.
  • webrtc/video-gpuProcess.html: Deleted.
12:49 AM Changeset in webkit [272051] by Carlos Garcia Campos
  • 7 edits
    2 adds in trunk

[SOUP] Use a GInputStream to set the request body in preparation for libsoup3
https://bugs.webkit.org/show_bug.cgi?id=221034

Reviewed by Adrian Perez de Castro.

Source/WebCore:

In libsoup3, the request body can be set using a stream. Add the stream now, that can still be used in libsoup2
to set the body data. This moves the FormData processing code to WebKitFormDataInputStream and also implements
the file seek and range length, which makes test http/tests/local/blob/send-hybrid-blob-using-open-panel.html pass.

  • platform/SourcesSoup.txt:
  • platform/network/soup/ResourceRequestSoup.cpp:

(WebCore::ResourceRequest::updateSoupMessageBody const):

  • platform/network/soup/WebKitFormDataInputStream.cpp: Added.

(webkitFormDataInputStreamCreateNextStream):
(webkitFormDataInputStreamRead):
(webkitFormDataInputStreamClose):
(webkit_form_data_input_stream_class_init):
(webkitFormDataInputStreamNew):
(webkitFormDataInputStreamReadAll):

  • platform/network/soup/WebKitFormDataInputStream.h: Added.

Tools:

Add WebKitFormDataInputStream as an exception for some style checker rules.

  • Scripts/webkitpy/style/checker.py:

LayoutTests:

Remove expectations of http/tests/local/blob/send-hybrid-blob-using-open-panel.html that is now passing.

  • platform/gtk/TestExpectations:
12:47 AM Changeset in webkit [272050] by youenn@apple.com
  • 10 edits in trunk

Recover audio and video capture from GPUProcess crash
https://bugs.webkit.org/show_bug.cgi?id=221086

Reviewed by Eric Carlson.

Make RemoteRealtimeMediaSource observe GPU process crash.
If RemoteRealtimeMediaSource is live and capturing in GPUProcess, restart capture from WebProcess.
If GPU process crashes, make sure to send back the necessary entitlements and information to GPUProcess
of which processes are allowed to capture.

Covered by API test.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::gpuProcessCrashed):

  • WebProcess/cocoa/RemoteCaptureSampleManager.cpp:

(WebKit::RemoteCaptureSampleManager::didUpdateSourceConnection):

  • WebProcess/cocoa/RemoteCaptureSampleManager.h:
  • WebProcess/cocoa/RemoteRealtimeMediaSource.cpp:

(WebKit::RemoteRealtimeMediaSource::create):
(WebKit::RemoteRealtimeMediaSource::createRemoteMediaSource):
(WebKit::RemoteRealtimeMediaSource::~RemoteRealtimeMediaSource):
(WebKit::RemoteRealtimeMediaSource::gpuProcessConnectionDidClose):

  • WebProcess/cocoa/RemoteRealtimeMediaSource.h:
  • WebProcess/cocoa/UserMediaCaptureManager.cpp:

(WebKit::UserMediaCaptureManager::AudioFactory::createAudioCaptureSource):
(WebKit::UserMediaCaptureManager::VideoFactory::createVideoCaptureSource):
(WebKit::UserMediaCaptureManager::DisplayFactory::createDisplayCaptureSource):
(WebKit::UserMediaCaptureManager::didUpdateSourceConnection):

  • WebProcess/cocoa/UserMediaCaptureManager.h:
12:04 AM Changeset in webkit [272049] by commit-queue@webkit.org
  • 4 edits in trunk

Fix logic error in shouldComputeLogicalHeightFromAspectRatio
https://bugs.webkit.org/show_bug.cgi?id=220965

Patch by Rob Buis <rbuis@igalia.com> on 2021-01-29
Reviewed by Darin Adler.

Source/WebCore:

Logical height that uses percentages should be computed through
aspect-ratio only if it is not resolvable.

Test: imported/w3c/web-platform-tests/css/css-sizing/aspect-ratio/percentage-resolution-005.html

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::shouldComputeLogicalHeightFromAspectRatio const):

LayoutTests:

percentage-resolution-005.html now passes.

Jan 28, 2021:

8:56 PM Changeset in webkit [272048] by Lauro Moura
  • 2 edits in trunk/Tools

[GLIB] Gardening API release passes and some debug crashes

Unreviewed test gardening.

Many debug crashes still to be listed.

  • TestWebKitAPI/glib/TestExpectations.json:
8:06 PM Changeset in webkit [272047] by mmaxfield@apple.com
  • 9 edits in trunk

Minor cleanup in CSSFontFaceSetClient
https://bugs.webkit.org/show_bug.cgi?id=221019

Reviewed by Ryosuke Niwa.

Source/WebCore:

Split up CSSFontFaceSetClient into two pieces:

  • CSSFontFaceSet::FontEventClient
  • CSSFontFaceSet::FontModifiedObserver

One is a Client because it's a struct with 3 callback methods that take different arguments.
The other is an observer because it's just a single callback method that takes no arguments
and has no return.

Both of these types are CanMakeWeakPtr, so lifetime is automatically managed.

Test: WTF_WeakPtr.MultipleInheritance

  • css/CSSFontFaceSet.cpp:

(WebCore::CSSFontFaceSet::addFontModifiedObserver):
(WebCore::CSSFontFaceSet::addFontEventClient):
(WebCore::CSSFontFaceSet::incrementActiveCount):
(WebCore::CSSFontFaceSet::decrementActiveCount):
(WebCore::CSSFontFaceSet::add):
(WebCore::CSSFontFaceSet::remove):
(WebCore::CSSFontFaceSet::fontStateChanged):
(WebCore::CSSFontFaceSet::fontPropertyChanged):
(WebCore::CSSFontFaceSet::addClient): Deleted.
(WebCore::CSSFontFaceSet::removeClient): Deleted.

  • css/CSSFontFaceSet.h:

(WebCore::CSSFontFaceSetClient::faceFinished): Deleted.
(WebCore::CSSFontFaceSetClient::fontModified): Deleted.
(WebCore::CSSFontFaceSetClient::startedLoading): Deleted.
(WebCore::CSSFontFaceSetClient::completedLoading): Deleted.

  • css/CSSFontSelector.cpp:

(WebCore::CSSFontSelector::CSSFontSelector):
(WebCore::m_version):
(WebCore::CSSFontSelector::~CSSFontSelector):

  • css/CSSFontSelector.h:
  • css/FontFaceSet.cpp:

(WebCore::FontFaceSet::FontFaceSet):
(WebCore::FontFaceSet::~FontFaceSet):
(WebCore::FontFaceSet::startedLoading):
(WebCore::FontFaceSet::documentDidFinishLoading):
(WebCore::FontFaceSet::completedLoading):

  • css/FontFaceSet.h:

Tools:

  • TestWebKitAPI/Tests/WTF/WeakPtr.cpp:

(TestWebKitAPI::MultipleInheritanceDerived::meowCalled const):
(TestWebKitAPI::MultipleInheritanceDerived::woofCalled const):
(TestWebKitAPI::TEST):

7:57 PM Changeset in webkit [272046] by Chris Dumez
  • 5 edits in trunk/Source

[macOS] Policy for warning about or killing processes using too much memory triggers too easily
https://bugs.webkit.org/show_bug.cgi?id=221104
<rdar://73625621>

Reviewed by Geoff Garen.

The policy for warning about or killing processes using too much memory was triggering too
easily. I made the following changes to the policy to address this:

  1. We no longer kill WebProcesses associated with a visible (parented) view under any circumstances. We used to kill active WebProcesses when they reached 4GB. We would also kill visible WebProcesses when they reached 2GB if there were visible but not active / focused.
  2. For background WebProcesses (associated with non visible / parented views), I have raised the kill limit from 2GB to 4GB.
  3. For foreground WebProcesses (associated with visible / parent views), I have also raised the limit to show the excessive memory usage banner from 2GB to 4GB.

Source/WebCore:

  • page/PerformanceMonitor.cpp:

(WebCore::PerformanceMonitor::activityStateChanged):

Source/WTF:

  • wtf/MemoryPressureHandler.cpp:

(WTF::thresholdForMemoryKillOfInactiveProcess):
(WTF::MemoryPressureHandler::thresholdForMemoryKill):
(WTF::MemoryPressureHandler::shrinkOrDie):
(WTF::MemoryPressureHandler::measurementTimerFired):

  • wtf/MemoryPressureHandler.h:
7:49 PM Changeset in webkit [272045] by mmaxfield@apple.com
  • 3 edits in trunk/Source/WebCore

Remove some uses of FontSelector from within CSSFontFace
https://bugs.webkit.org/show_bug.cgi?id=221064

Reviewed by Darin Adler.

This is one of the steps toward https://bugs.webkit.org/show_bug.cgi?id=208351 "CSSFontFace should
not need its m_fontSelector data member."

No new tests because there is no behavior change.

  • css/CSSFontFace.cpp:

(WebCore::CSSFontFace::CSSFontFace):
(WebCore::CSSFontFace::fontLoadTiming const):
(WebCore::CSSFontFace::allowUserInstalledFonts const): Deleted.
(WebCore::fontLoadTimingOverride): Deleted.
(WebCore::CSSFontFace::shouldIgnoreFontLoadCompletions const): Deleted.

  • css/CSSFontFace.h:
7:42 PM Changeset in webkit [272044] by mmaxfield@apple.com
  • 4 edits in trunk/PerformanceTests

MotionMark focus test can cause extreme variance in whichever test runs directly after it
https://bugs.webkit.org/show_bug.cgi?id=221075
<rdar://problem/72143661>

Reviewed by Said Abou-Hallawa.

The focus test loads up the window server with work, which runs asynchronously from WebKit's run loop.
This means that the window server can still be busy when the next test starts.

In r270959 we already tried to combat this, and it was mostly successful, but not as successful as we'd
like. This patch goes further by:

  1. Bumping up the warmup timeout to 2000ms from 1000ms
  2. Making the warmup render at least 30 frames. This means that a single extremely long frame can't fill up the entire warmup period.
  • MotionMark/developer.html:
  • MotionMark/resources/runner/motionmark.js:

(this.clear):

  • MotionMark/tests/resources/main.js:

(Benchmark.Utilities.createClass):
(_animateLoop):

6:54 PM Changeset in webkit [272043] by commit-queue@webkit.org
  • 4 edits in trunk

[ Big Sur ] media/media-source/media-source-webm-init-inside-segment.html is failing
https://bugs.webkit.org/show_bug.cgi?id=220552
<rdar://problem/73048070>

Patch by Jean-Yves Avenard <Jean-Yves Avenard> on 2021-01-28
Reviewed by Jer Noble.

Source/WebCore:

No new tests - fixes an existing test.

  • platform/graphics/cocoa/SourceBufferParserWebM.cpp:

(WebCore::SourceBufferParserWebM::supportedAudioCodecs): Don't make the webm supported codec
conditional.
This change makes the webm audio support consistent with video support. supportedAudioCodecs
is used by the libwebm parser to determine which codec IDs are to be rejected outright.
If a codec id that isn't supported is encountered a parsing error will be thrown, which
ultimately causes a HTML audio or video error.

If webkit is compiled without opus or vorbis support, in this particular case we do not want
an error to be produced but instead ignore the track.

LayoutTests:

  • platform/mac/TestExpectations: unskip test
6:21 PM Changeset in webkit [272042] by Megan Gardner
  • 28 edits
    1 copy in trunk/Source

Add plumbing to allow AppHighlights to be stored.
https://bugs.webkit.org/show_bug.cgi?id=221020

Reviewed by Devin Rousso.

Source/WebCore:

  • Modules/highlight/AppHighlightListData.cpp:

(WebCore::AppHighlightListData::toSharedBuffer const):
(WebCore::AppHighlightListData::toData const): Deleted.

  • Modules/highlight/AppHighlightListData.h:
  • Modules/highlight/AppHighlightStorage.cpp:

(WebCore::AppHighlightStorage::createAndSendAppHighlightsStorage):
(WebCore::AppHighlightStorage::createAppHighlightListData): Deleted.

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

(WebCore::Chrome::didCreateHighlightsStorageData const):

  • page/Chrome.h:
  • page/ChromeClient.h:

Source/WebKit:

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _didCreateHighlightsStorageData:]):
(-[WKWebView _appHighlightsStorageDelegate]):
(-[WKWebView _setAppHighlightsStorageDelegate:]):

  • UIProcess/API/Cocoa/WKWebViewInternal.h:
  • UIProcess/Cocoa/PageClientImplCocoa.mm:

(WebKit::PageClientImplCocoa::didCreateHighlightsStorageData):

  • UIProcess/Cocoa/WebPageProxyCocoa.mm:
  • UIProcess/PageClient.h:
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::didCreateHighlightsStorageData):

  • UIProcess/WebPageProxy.h:
  • UIProcess/WebPageProxy.messages.in:
  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/WebCoreSupport/WebChromeClient.cpp:

(WebKit::WebChromeClient::didCreateHighlightsStorageData):

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

(WebKit::WebPage::createAppHighlightInSelectedRange):

5:50 PM Changeset in webkit [272041] by Jonathan Bedard
  • 4 edits in trunk/Tools

[webkitcrepy] Handle case where pypi serves invalid html
https://bugs.webkit.org/show_bug.cgi?id=221111
<rdar://problem/73728580>

Reviewed by David Kilzer.

  • Scripts/libraries/webkitcorepy/setup.py: Bump version number.
  • Scripts/libraries/webkitcorepy/webkitcorepy/init.py: Ditto.
  • Scripts/libraries/webkitcorepy/webkitcorepy/autoinstall.py:

(Package.archives): Remove possibly invalid <meta> tag from html.

4:39 PM Changeset in webkit [272040] by jiewen_tan@apple.com
  • 3 edits in trunk/Source/WebKit

[WebAuthn] Adopt new SPI to show no credentials error for the platform authenticator
https://bugs.webkit.org/show_bug.cgi?id=220894
<rdar://problem/73538568>

Reviewed by Brent Fulgham.

Covered by manual tests.

  • Platform/spi/Cocoa/AuthenticationServicesCoreSPI.h:
  • UIProcess/WebAuthentication/Cocoa/AuthenticatorPresenterCoordinator.mm:

(WebKit::AuthenticatorPresenterCoordinator::updatePresenter):

4:19 PM Changeset in webkit [272039] by Peng Liu
  • 13 edits
    2 adds in trunk

[GPUP][MSE] A video element does not fire “canplaythrough” event if SourceBuffer.abort() is called
https://bugs.webkit.org/show_bug.cgi?id=220964

Reviewed by Jer Noble.

Source/WebCore:

This patch removes initializationSegmentIsHandledSemaphore from both SourceBufferParserAVFObjC
and SourceBufferParserWebM, and implements a media sample cache mechanism in SourceBufferPrivateAVFObjC
to ensure that "Coded Frame Processing" steps execute after SourceBufferPrivate has handled the
initialization segment and enabled video/audio tracks. Without the cache mechanism, some media
samples following the initialization segment may be dropped when we run SourceBufferPrivateAVFObjC
in the GPU process, and the media element won't fire "canplaythrough" event because it cannot change
its ready state to a value greater than HAVE_METADATA.

This patch also implements the mechanism to make sure SourceBufferPrivateAVFObjC::appendCompleted()
runs after all media samples have gone through the "Coded Frame Processing" steps, so that the source
buffer object will fire "update" and "updateend" event after the parser has completedly parsed the
appended buffer.

  • platform/graphics/avfoundation/objc/SourceBufferParserAVFObjC.h:
  • platform/graphics/avfoundation/objc/SourceBufferParserAVFObjC.mm:

(WebCore::SourceBufferParserAVFObjC::SourceBufferParserAVFObjC):
(WebCore::SourceBufferParserAVFObjC::~SourceBufferParserAVFObjC):
(WebCore::SourceBufferParserAVFObjC::appendData):
Add a parameter "CompletionHandler" to notify the caller that the parser has parsed the whole buffer.
(WebCore::SourceBufferParserAVFObjC::flushPendingMediaData):
(WebCore::SourceBufferParserAVFObjC::resetParserState):
(WebCore::SourceBufferParserAVFObjC::invalidate):
(WebCore::SourceBufferParserAVFObjC::didParseStreamDataAsAsset):

  • platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h:
  • platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:

(WebCore::SourceBufferPrivateAVFObjC::SourceBufferPrivateAVFObjC):
(WebCore::SourceBufferPrivateAVFObjC::~SourceBufferPrivateAVFObjC):
(WebCore::SourceBufferPrivateAVFObjC::didParseInitializationData):
After SourceBufferPrivateClient has done the configuration with the initialization segment, we need to
push the cached media samples (if any) to SourceBufferPrivate to run the "Coded Frame Processing" steps.
And we need to call "appendCompleted()" if there is a pending callback.
(WebCore::SourceBufferPrivateAVFObjC::didProvideMediaDataForTrackId):
SourceBufferPrivateAVFObjC needs to cache the media sample if the initialization segment has not been
processed by SourceBufferPrivateClient yet.
(WebCore::SourceBufferPrivateAVFObjC::append):
We need to postpone the "appendCompleted()" callback if there are cached media samples.
(WebCore::SourceBufferPrivateAVFObjC::appendCompleted):
(WebCore::SourceBufferPrivateAVFObjC::abort):
(WebCore::SourceBufferPrivateAVFObjC::setVideoLayer):
(WebCore::SourceBufferPrivateAVFObjC::didProvideMediaDataForTrackID): Deleted.

  • platform/graphics/cocoa/SourceBufferParser.h:
  • platform/graphics/cocoa/SourceBufferParserWebM.cpp:

(WebCore::SourceBufferParserWebM::SourceBufferParserWebM):
(WebCore::SourceBufferParserWebM::~SourceBufferParserWebM):
(WebCore::SourceBufferParserWebM::appendData):
(WebCore::SourceBufferParserWebM::flushPendingMediaData):
(WebCore::SourceBufferParserWebM::resetParserState):
(WebCore::SourceBufferParserWebM::invalidate):
(WebCore::SourceBufferParserWebM::OnClusterBegin):

  • platform/graphics/cocoa/SourceBufferParserWebM.h:

Source/WebKit:

  • Shared/mac/MediaFormatReader/MediaFormatReader.cpp:

(WebKit::MediaFormatReader::parseByteSource):

LayoutTests:

  • gpu-process/TestExpectations:
  • media/media-source/media-source-webm-append-buffer-after-abort-expected.txt: Added.
  • media/media-source/media-source-webm-append-buffer-after-abort.html: Added.
  • platform/mac/TestExpectations:
4:05 PM Changeset in webkit [272038] by Truitt Savell
  • 2 edits in trunk/LayoutTests

[BigSur Wk1] media/video-ended-event-negative-playback.html is flaky text failure.
https://bugs.webkit.org/show_bug.cgi?id=221106

Unreviewed test guardening.

Patch by Amir Mark Jr <Amir Mark Jr.> on 2021-01-28

  • platform/mac-wk1/TestExpectations:
3:49 PM Changeset in webkit [272037] by Alan Coon
  • 1 copy in tags/Safari-612.1.1

Tag Safari-612.1.1.

2:58 PM Changeset in webkit [272036] by Alan Coon
  • 10 edits in branches/safari-611-branch/Source

Cherry-pick r271873. rdar://problem/73722521

REGRESSION (r270874): Some React Native apps are reported broken on iOS
https://bugs.webkit.org/show_bug.cgi?id=220809

Reviewed by Saam Barati.

Source/JavaScriptCore:

r270874 fixed for/in shadowing issue by introducing an invariant: a property
returned by getOwn*PropertyNames() in DontEnumPropertiesMode::Exclude should be
reported as Enumerable? by getOwnPropertySlot(). Otherwise, for/in skips the
property, which causes RN apps to break.

Since there is no way to enforce this invariant for opaque API objects like
JSCallbackObject, this change skips Enumerable? check for them by introducing
GetOwnPropertySlotMayBeWrongAboutDontEnum out of line type info flag.

Also, this patch reverts JSCallbackObject::getOwnPropertySlot() changes of r270874
that are no longer necessary and observable (via Object.getOwnPropertyDescriptor).

  • API/JSCallbackObject.h:
  • API/JSCallbackObjectFunctions.h: (JSC::JSCallbackObject<Parent>::getOwnPropertySlot):
  • API/tests/testapiScripts/testapi.js:
  • runtime/JSObject.cpp: (JSC::JSObject::hasEnumerableProperty const):
  • runtime/JSTypeInfo.h: (JSC::TypeInfo::getOwnPropertySlotMayBeWrongAboutDontEnum const):

Source/WebCore:

  • bridge/runtime_object.h:

Source/WebKit:

  • WebProcess/Plugins/Netscape/JSNPObject.h:

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

2:24 PM Changeset in webkit [272035] by Martin Robinson
  • 32 edits in trunk

Add support for logical variants of 'scroll-padding' and 'scroll-margin'
https://bugs.webkit.org/show_bug.cgi?id=220766
<rdar://problem/73661278>

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Update test expectations for this change.

  • web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt:
  • web-platform-tests/css/css-scroll-snap/inheritance-expected.txt:
  • web-platform-tests/css/css-scroll-snap/parsing/scroll-margin-block-inline-computed-expected.txt:
  • web-platform-tests/css/css-scroll-snap/parsing/scroll-margin-block-inline-shorthand-expected.txt:
  • web-platform-tests/css/css-scroll-snap/parsing/scroll-margin-block-inline-valid-expected.txt:
  • web-platform-tests/css/css-scroll-snap/parsing/scroll-padding-block-inline-computed-expected.txt:
  • web-platform-tests/css/css-scroll-snap/parsing/scroll-padding-block-inline-shorthand-expected.txt:
  • web-platform-tests/css/css-scroll-snap/parsing/scroll-padding-block-inline-valid-expected.txt:
  • web-platform-tests/css/css-scroll-snap/parsing/scroll-padding-computed-expected.txt:
  • web-platform-tests/css/css-scroll-snap/parsing/scroll-padding-invalid-expected.txt:
  • web-platform-tests/css/css-scroll-snap/parsing/scroll-padding-shorthand-expected.txt:
  • web-platform-tests/css/css-scroll-snap/parsing/scroll-padding-valid-expected.txt:
  • web-platform-tests/css/cssom/cssstyledeclaration-csstext-expected.txt:

Source/WebCore:

Add support for logical scroll-margin and scroll-padding properties. Also
improve parsing of scroll-padding which should not accept negative values and
should accept "auto" values. The spec gives flexibility for how to interpret
"auto", but for us this should just be 0 currently.

  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::ComputedStyleExtractor::valueForPropertyInStyle): Add support for logical
margin and padding longhands and shortands.

  • css/CSSProperties.json: Ditto. Allow padding to accept "auto" as well.
  • css/CSSProperty.cpp:

(WebCore::CSSProperty::resolveDirectionAwareProperty): Ditto.
(WebCore::CSSProperty::isDirectionAwareProperty): Ditto.

  • css/StyleProperties.cpp:

(WebCore::StyleProperties::getPropertyValue const): Ditto.
(WebCore::StyleProperties::asText const): Ditto.

  • css/parser/CSSPropertyParser.cpp:

(WebCore::consumeScrollPadding): Added this helper that accepts a length, a percentage,
or auto.
(WebCore::CSSPropertyParser::parseSingleValue): Added support for logical longhands.
(WebCore::CSSPropertyParser::parseShorthand): Added support for logical shorthands.

  • page/scrolling/ScrollSnapOffsetsInfo.cpp:

(WebCore::computeScrollSnapPortOrAreaRect): Use minimumValueForLength here because
auto should resolve to 0px.

  • rendering/RenderBox.cpp:

(RenderBox::scrollPaddingForViewportRect): Ditto.

  • rendering/style/RenderStyle.h:

(WebCore::RenderStyle::initialScrollPadding): Initialize scroll-padding values to
auto as specified.

  • rendering/style/StyleRareNonInheritedData.h: Ditto.

LayoutTests:

Update test expectations.

  • css3/scroll-snap/scroll-snap-inherit-expected.txt:
  • css3/scroll-snap/scroll-snap-inherit.html:
  • css3/scroll-snap/scroll-snap-initial-expected.txt:
  • css3/scroll-snap/scroll-snap-initial.html:
  • css3/scroll-snap/scroll-snap-property-computed-style-expected.txt:
  • css3/scroll-snap/scroll-snap-property-computed-style.js:
  • platform/ios-wk2/imported/w3c/web-platform-tests/css/cssom/cssstyledeclaration-csstext-expected.txt:
1:58 PM Changeset in webkit [272034] by Chris Dumez
  • 2 edits in trunk/Source/WebKit

Unreviewed macOS build fix after r272020.

  • WebProcess/cocoa/WebProcessCocoa.mm:

(WebKit::WebProcess::updateProcessName):
(WebKit::WebProcess::updateActivePages):

12:50 PM Changeset in webkit [272033] by weinig@apple.com
  • 12 edits in trunk/Source/WebCore

Sort colors in ColorTypes.h alphabetically
https://bugs.webkit.org/show_bug.cgi?id=221073

Reviewed by Darin Adler.

  • css/CSSValueKeywords.in:
  • css/parser/CSSPropertyParserHelpers.cpp:
  • platform/graphics/ColorConversion.cpp:
  • platform/graphics/ColorConversion.h:
  • platform/graphics/ColorSerialization.cpp:
  • platform/graphics/ColorSerialization.h:
  • platform/graphics/ColorSpace.cpp:
  • platform/graphics/ColorSpace.h:
  • platform/graphics/ColorTypes.h:
  • platform/graphics/cg/ColorSpaceCG.cpp:
  • platform/graphics/cg/ColorSpaceCG.h:

Sort things a bit more alphabetically.

12:47 PM Changeset in webkit [272032] by aakash_jain@apple.com
  • 3 edits in trunk/Tools

[build.webkit.org] Remove dead code for TestWebKit1LeaksFactory
https://bugs.webkit.org/show_bug.cgi?id=221090

Reviewed by Jonathan Bedard.

  • CISupport/build-webkit-org/factories.py:

(BuildAndJSCTestsFactory.init):
(TestWebKit1LeaksFactory): Deleted.
(TestWebKit1LeaksFactory.init): Deleted.

  • CISupport/build-webkit-org/steps.py:

(ExtractTestResults.finished):
(ExtractTestResultsAndLeaks): Deleted.
(ExtractTestResultsAndLeaks.addCustomURLs): Deleted.

12:41 PM Changeset in webkit [272031] by ysuzuki@apple.com
  • 1 edit
    5 adds in trunk/JSTests

Unreviewed, recover removed tests
https://bugs.webkit.org/show_bug.cgi?id=220216

These tests are important since we need to ensure that we are not accidentally expose internal-only functions.

  • stress/function-caller-async-arrow-function-body.js:

(shouldBe):
(thingy.foo.async try): Deleted.
(thingy): Deleted.

  • stress/function-caller-async-function-body.js:

(shouldBe):
(thingy.async foo):
(thingy):

  • stress/function-caller-async-generator-body.js:

(shouldBe):
(thingy.async foo):
(thingy):

  • stress/function-caller-generator-body.js:

(shouldBe):
(thingy.foo):
(thingy):

  • stress/function-caller-generator-method-body.js:

(shouldBe):
(thingy.C.prototype.foo):
(thingy.C):
(thingy):

12:37 PM Changeset in webkit [272030] by Lauro Moura
  • 4 edits in trunk/LayoutTests

REGRESSION(r271119) Check for nullness of preamble.caller
https://bugs.webkit.org/show_bug.cgi?id=220610

Reviewed by Yusuke Suzuki.

r271119 changed some kinds of functions to return null when trying to
access its caller property.

This made the preamble helper from indexeddb tests to fail when used
in places like arrow functions, like in
storage/indexeddb/result-request-cycle.html.

This commit makes preamble default to an empty name if the caller is
null.

  • http/tests/IndexedDB/resources/shared.js:

(preamble):

  • imported/blink/storage/indexeddb/resources/shared.js:

(preamble):

  • storage/indexeddb/resources/shared.js:

(preamble):

12:27 PM Changeset in webkit [272029] by Matt Lewis
  • 4 edits in trunk/Tools

Move Mac EWS to macOS Catalina.
https://bugs.webkit.org/show_bug.cgi?id=220818

Reviewed by Aakash Jain.

  • CISupport/ews-build/config.json:
  • CISupport/ews-build/factories_unittest.py:

(TestBuildFactory.test_generic_build_factory):
(TestBuildFactory.test_macos_build_factory):
(TestCommitQueueFactory.test_commit_queue_factory):
(TestLayoutTestsFactory.test_macos_wk1_release_factory):
(TestLayoutTestsFactory.test_macos_wk1_debug_factory):
(TestLayoutTestsFactory.test_macos_wk2_factory):

  • CISupport/ews-build/steps_unittest.py:

(TestAnalyzeCompileWebKitResults.test_filter_logs_containing_error_with_no_error):

12:19 PM Changeset in webkit [272028] by Alan Coon
  • 2 edits in branches/safari-612.1.1-branch/Source/WebCore

Cherry-pick r271994. rdar://problem/73718489

Don't link IOSurfaceAccelerator on simulator builds
https://bugs.webkit.org/show_bug.cgi?id=221066
rdar://73681508

Reviewed by Tim Horton.

  • Configurations/WebCore.xcconfig: Don't link if the sdk matches "simulator".

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

12:12 PM Changeset in webkit [272027] by Fujii Hironori
  • 8 edits in trunk/Source

Remove the dead code of USE(WINGDI)
https://bugs.webkit.org/show_bug.cgi?id=221079

Reviewed by Don Olmstead.

Source/WebCore:

It was used by WinCE port.

  • platform/graphics/GlyphBufferMembers.h:
  • platform/graphics/GraphicsContext.h:
  • platform/graphics/Path.h:
  • platform/graphics/Pattern.h:
  • platform/graphics/PlatformImage.h:

Source/WebKitLegacy/win:

  • Plugins/PluginViewWin.cpp:

(WebCore::PluginView::paintWindowedPluginIntoContext):
(WebCore::PluginView::paint):
(WebCore::PluginView::snapshot):

12:04 PM Changeset in webkit [272026] by commit-queue@webkit.org
  • 2 edits in trunk/LayoutTests

REGRESSION (r271988): WebXR test failures on Big Sur
https://bugs.webkit.org/show_bug.cgi?id=221092

Patch by Ada Chan <ada.chan@apple.com> on 2021-01-28
Reviewed by Chris Dumez.

  • platform/mac/TestExpectations: Skip failing tests
12:01 PM Changeset in webkit [272025] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC][IFC] Line break (and word break opportunity) is not necessarily the last inline item on the line
https://bugs.webkit.org/show_bug.cgi?id=221091

Reviewed by Antti Koivisto.

While both <br> and <wbr> are valid wrap opportunities, the actual wrap position may be at a later position on the line.
e.g. <span style="border-right: 1px solid green">text<br></span> <- the green border should show up on the same line as the text even though it is "after" the forced line break.

  • layout/inlineformatting/InlineLineBuilder.cpp:

(WebCore::Layout::LineBuilder::placeInlineContent):
(WebCore::Layout::LineBuilder::candidateContentForLine):
(WebCore::Layout::LineBuilder::nextWrapOpportunity const):

11:55 AM Changeset in webkit [272024] by Chris Fleizach
  • 3 edits
    2 adds in trunk

AX: Long narrow tables should not be made in data tables unnecessarily
https://bugs.webkit.org/show_bug.cgi?id=221061
<rdar://problem/73681149>

Reviewed by Zalan Bujtas.

Source/WebCore:

Some web authors use long columns/rows of cells for layout purposes. We shouldn't
automatically turn these into data tables based on row count only.
Instead let's ensure there are at least two rows/cols of content before automatically
turning into a data table.

Test: accessibility/narrow-tables-ignored.html

  • accessibility/AccessibilityTable.cpp:

(WebCore::AccessibilityTable::isDataTable const):

LayoutTests:

  • accessibility/narrow-tables-ignored-expected.txt: Added.
  • accessibility/narrow-tables-ignored.html: Added.
11:52 AM Changeset in webkit [272023] by Kocsen Chung
  • 1 copy in tags/Safari-611.1.12.2

Tag Safari-611.1.12.2.

11:47 AM Changeset in webkit [272022] by Kocsen Chung
  • 2 edits in branches/safari-611.1.12-branch/Source/WebCore

Cherry-pick r271994. rdar://problem/73715829

Don't link IOSurfaceAccelerator on simulator builds
https://bugs.webkit.org/show_bug.cgi?id=221066
rdar://73681508

Reviewed by Tim Horton.

  • Configurations/WebCore.xcconfig: Don't link if the sdk matches "simulator".

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

11:45 AM Changeset in webkit [272021] by Kocsen Chung
  • 8 edits in branches/safari-611.1.12-branch/Source

Versioning.

WebKit-7611.1.12.2

11:41 AM Changeset in webkit [272020] by Chris Dumez
  • 2 edits in trunk/Source/WebKit

[macOS] WebProcess::updateProcessName should initiate network process connection if none exists
https://bugs.webkit.org/show_bug.cgi?id=221094
<rdar://73658122>

Reviewed by Per Arne Vollan.

WebProcess::updateProcessName should initiate network process connection if none exists, instead of giving up
and returning early in this case. Same policy applies to WebProcess::updateActivePages.

This is a follow-up to:
https://trac.webkit.org/changeset/271897/webkit

  • WebProcess/cocoa/WebProcessCocoa.mm:

(WebKit::WebProcess::updateProcessName):
(WebKit::WebProcess::updateActivePages):

10:32 AM Changeset in webkit [272019] by Martin Robinson
  • 9 edits in trunk/Source

Make closestSnapOffset a method on ScrollSnapOffsetsInfo
https://bugs.webkit.org/show_bug.cgi?id=221030

Reviewed by Simon Fraser.

Source/WebCore:

No new tests. This should not change behavior.

Make closestSnapOffset a method and change all call sites to use the new method.

  • page/scrolling/ScrollSnapOffsetsInfo.cpp:

(WebCore::ScrollSnapOffsetsInfo<LayoutUnit>::closestSnapOffset const):
(WebCore::ScrollSnapOffsetsInfo<float>::closestSnapOffset const):

  • page/scrolling/ScrollSnapOffsetsInfo.h:
  • platform/cocoa/ScrollController.mm:

(WebCore::ScrollController::setNearestScrollSnapIndexForAxisAndOffset):
(WebCore::ScrollController::adjustScrollDestination):

  • platform/cocoa/ScrollSnapAnimatorState.h:

(WebCore::ScrollSnapAnimatorState::snapOffsetInfo const):
(WebCore::ScrollSnapAnimatorState::setSnapOffsetInfo):

  • platform/cocoa/ScrollSnapAnimatorState.mm:

(WebCore::ScrollSnapAnimatorState::setupAnimationForState):
(WebCore::ScrollSnapAnimatorState::targetOffsetForStartOffset const):

Source/WebKit:

Make closestSnapOffset a method and change all call sites to use the new method.

  • UIProcess/RemoteLayerTree/ios/RemoteScrollingCoordinatorProxyIOS.mm:

(WebKit::RemoteScrollingCoordinatorProxy::closestSnapOffsetForMainFrameScrolling const):

  • UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.mm:

(-[WKScrollingNodeScrollViewDelegate scrollViewWillEndDragging:withVelocity:targetContentOffset:]):

10:26 AM Changeset in webkit [272018] by Lauro Moura
  • 2 edits in trunk/Tools

[Flatpak SDK] Flatpak environment JSON is prematurely deleted with flatpak-spawn calls
https://bugs.webkit.org/show_bug.cgi?id=221070

Reviewed by Philippe Normand.

To avoid nested webkit-flatpak calls overwriting/deleting whe
environment file, only create if there is no such file and only delete
in the same process that created it.

This approach has the drawback of limiting nested calls changing the
variable values and a file undeleted after a crash might avoid the
next normal invocation creating it.

  • flatpak/flatpakutils.py:

(WebkitFlatpak.run_in_sandbox):

10:01 AM Changeset in webkit [272017] by pvollan@apple.com
  • 6 edits in trunk/Source

[macOS] Crash when updating color preferences
https://bugs.webkit.org/show_bug.cgi?id=221088
<rdar://problem/73709142>

Reviewed by Brent Fulgham.

Source/WebCore:

Remove previous workaround in r271965 for preventing Launch Services connections, since this is covered
by the new approach in this patch.

  • platform/mac/ThemeMac.mm:

(-[WebCoreThemeWindow isKeyWindow]):
(-[WebCoreThemeWindow invalidateRestorableState]): Deleted.

Source/WebCore/PAL:

Declare NSApplication SPI for updating application information with Launch Services.

  • pal/spi/mac/NSApplicationSPI.h:

Source/WebKit:

After r271965, the WebContent process is no longer allowed to connect to the Launch Services daemon. This introduced a crash
in the WebContent process when color preferences were changed in System Preferences, since AppKit will then attempt to set
application information with Launch Services, which causes a crash when that fails. This patch addresses this issue by
overriding the AppKit method that updates the specific application information with Launch Services, since updating this
information should be required in the WebContent process.

  • WebProcess/cocoa/WebProcessCocoa.mm:

(WebKit::updateCanQuitQuietlyAndSafely):
(WebKit::WebProcess::platformInitializeWebProcess):

9:28 AM Changeset in webkit [272016] by Brent Fulgham
  • 6 edits in trunk/Source/WebKit

[macOS] Remove reference to deprecated SubmitDiagInfo.domains path
https://bugs.webkit.org/show_bug.cgi?id=221056
<rdar://problem/73474697>

Reviewed by Per Arne Vollan.

macOS does not use SubmitDiagInfo.domains anymore, and even when it did it failed safely.
There's no reason to have this access in any of our sandboxes, and we should remove it.

  • GPUProcess/mac/com.apple.WebKit.GPUProcess.sb.in:
  • NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
  • PluginProcess/mac/com.apple.WebKit.plugin-common.sb.in:
  • WebAuthnProcess/mac/com.apple.WebKit.WebAuthnProcess.sb.in:
  • WebProcess/com.apple.WebProcess.sb.in:
9:00 AM Changeset in webkit [272015] by pvollan@apple.com
  • 3 edits in trunk/Source/WebKit

[macOS] Remove access to com.apple.BluetoothServices
https://bugs.webkit.org/show_bug.cgi?id=221059
<rdar://problem/70509471>

Reviewed by Alex Christensen.

Remove access to com.apple.BluetoothServices in the WebContent sandbox on macOS, since there are no reports of this being used.

  • UIProcess/WebPageProxy.cpp:

(WebKit::mediaRelatedMachServices):

  • WebProcess/com.apple.WebProcess.sb.in:
8:32 AM Changeset in webkit [272014] by commit-queue@webkit.org
  • 4 edits in trunk

REGRESSION (r271988): XRSession.end() promise is not resolved if PlatformXR::Device::supportsSessionShutdownNotification() returns false
https://bugs.webkit.org/show_bug.cgi?id=221080

Patch by Ada Chan <ada.chan@apple.com> on 2021-01-28
Reviewed by Chris Dumez.

Source/WebCore:

m_endPromise needs to be set before WebXRSession::shutdown() is called
since that can call WebXRSession::didCompleteShutdown() which will
resolve m_endPromise.

This issue caused a timeout in the cleanup step for a test like
imported/w3c/web-platform-tests/webxr/xrSession_requestAnimationFrame_callback_calls.https.html.

  • Modules/webxr/WebXRSession.cpp:

(WebCore::WebXRSession::end):

LayoutTests:

Enable a test that was timing out, but now passes with the bug fix.

  • platform/mac/TestExpectations:
6:25 AM Changeset in webkit [272013] by aboya@igalia.com
  • 2 edits in trunk/Tools

[GTK] run-gtk-tests: Ensure correct count when subtests are specified
https://bugs.webkit.org/show_bug.cgi?id=221049

Reviewed by Adrian Perez de Castro.

Currently the code of run-gtk-tests adds the number of skipped tests
to the count of total tests. That computation failed to take into
account the case where specific subtests are run (by means of passing
the -p argument), instead of the full test suite.

This patch fixes that, only adding to "total tests" those skipped
subtests that were also specified with the -p argument when using that
mode.

  • glib/api_test_runner.py:

(TestRunner.run_tests):

6:01 AM Changeset in webkit [272012] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC][IFC] Incorrect soft opportunity position when the inline box starts with an atomic inline box
https://bugs.webkit.org/show_bug.cgi?id=221076

Reviewed by Antti Koivisto.

This patch fixes the following case:

"text_content<span><img></span>"

On trunk we find the soft wrap opportunity after the <span> which could result the following, incorrect line setup
line #1: text_content<span>
line #2 <img></span>
This makes the inline box (<span>) taller than it is supposed to be as it shows up on both the first and the second line.

  • layout/inlineformatting/InlineLineBuilder.cpp:

(WebCore::Layout::LineBuilder::nextWrapOpportunity const):

4:48 AM Changeset in webkit [272011] by Lauro Moura
  • 3 edits in trunk/Tools

[Flatpak SDK] Avoid "Invalid byte sequence in conversion input" errors and other encoding issues
https://bugs.webkit.org/show_bug.cgi?id=221068

Reviewed by Philippe Normand.

  • flatpak/flatpakutils.py:

(WebkitFlatpak.execute_command): Decode the arguments before printing.
(WebkitFlatpak.run_in_sandbox): Avoid iterating mutating dict and
export LANG.

  • flatpak/webkit-bwrap: Ignore LANG as it's exported by

flatpakutils.py.

4:42 AM Changeset in webkit [272010] by Carlos Garcia Campos
  • 10 edits in trunk/Source

[SOUP] Stop using SoupRequest API in preparation for libsoup3
https://bugs.webkit.org/show_bug.cgi?id=220764

Reviewed by Adrian Perez de Castro.

Source/WebCore:

  • platform/network/soup/ResourceError.h: Error constructors now receive the failing URL instead of a SoupRequest

that is only used to get its URL.

  • platform/network/soup/ResourceErrorSoup.cpp:

(WebCore::ResourceError::transportError):
(WebCore::ResourceError::httpError):
(WebCore::ResourceError::genericGError):

  • platform/network/soup/ResourceRequest.h: Remmove the constructor that receives a SoupRequest and the

initiating page ID since it's currently unsused.

  • platform/network/soup/ResourceRequestSoup.cpp:
  • platform/network/soup/SoupNetworkSession.h:

Source/WebKit:

It's gone in libsoup3, we can just use soup_session_send_async() instead, which is what SoupRequest does
internally.

  • NetworkProcess/soup/NetworkDataTaskSoup.cpp:

(WebKit::NetworkDataTaskSoup::createRequest): Manually create the SoupMessage. Also connect to content-sniffed
signal that it was handled by SoupRequest internally.
(WebKit::NetworkDataTaskSoup::clearRequest): Remove the SoupRequest reset and clear m_sniffedContentType.
(WebKit::NetworkDataTaskSoup::resume): Use soup_session_send_async(). We need to know the message for passed to
the function from the async ready callback, so we use a struct to pass both the task and the message. In case of
being suspended the struct was attached to the pending result.
(WebKit::NetworkDataTaskSoup::sendRequestCallback): Finish the soup_session_send_async() operation.
(WebKit::NetworkDataTaskSoup::didSendRequest): Set the sniffed content type from m_sniffedContentType.
(WebKit::NetworkDataTaskSoup::tlsConnectionAcceptCertificate): Use SoupMessage instead of SoupRequest to get the URI.
(WebKit::NetworkDataTaskSoup::didSniffContentCallback): Build the sniffed content type and call didSniffContent().
(WebKit::NetworkDataTaskSoup::didSniffContent): Save the passed content type.
(WebKit::NetworkDataTaskSoup::continueAuthenticate): Use m_currentRequest instead of the SoupRequest to build
the authentication error.
(WebKit::NetworkDataTaskSoup::skipInputStreamForRedirectionCallback): Pass the failing URL to the ResourceError constructor.
(WebKit::NetworkDataTaskSoup::continueHTTPRedirection): Ditto.
(WebKit::NetworkDataTaskSoup::readCallback): Ditto.
(WebKit::NetworkDataTaskSoup::requestNextPartCallback): Ditto.

  • NetworkProcess/soup/NetworkDataTaskSoup.h:
  • WebProcess/InjectedBundle/API/glib/WebKitWebPage.cpp: Stop setting the initiating page ID in the request because

it's unused.

4:40 AM Changeset in webkit [272009] by Carlos Garcia Campos
  • 15 edits in trunk

Load data URLs in the web process also for synchronous loads
https://bugs.webkit.org/show_bug.cgi?id=220981

Reviewed by Adrian Perez de Castro.

Source/WebCore:

Add synchronous API for DataURLDecoder. It now uses a Vector<char> for the data instead of SharedBuffer. That
way, ResourceLoader can create the SharedBuffer from the given data and loader strategy can simply move it.

  • Headers.cmake: Add DataURLDecoder.h.
  • WebCore.xcodeproj/project.pbxproj: Mark DataURLDecoder.h as private.
  • loader/ResourceLoader.cpp:

(WebCore::ResourceLoader::loadDataURL): Adapt to the DataURLDecoder API changes.

  • platform/network/DataURLDecoder.cpp:

(WebCore::DataURLDecoder::parseMediaType): Update the data initialization.
(WebCore::DataURLDecoder::decodeBase64): Return bool to indicate success or error and move the resulting vector
instead of creating a SharedBuffer.
(WebCore::DataURLDecoder::decodeEscaped): Move the resulting vector instead of creating a SharedBuffer.
(WebCore::DataURLDecoder::decodeSynchronously): Helper to do the actual decoding synchronously.
(WebCore::DataURLDecoder::decode): Use decodeSynchronously.
(WebCore::DataURLDecoder::decode): Synchronous implementation.

  • platform/network/DataURLDecoder.h:
  • platform/network/ResourceResponseBase.cpp:

(WebCore::ResourceResponseBase::dataURLResponse): Create a ResourceResponse for the given url and DataURLDecoder::Result.

  • platform/text/DecodeEscapeSequences.h:

(WebCore::decodeURLEscapeSequencesAsData): Use Vector<char> so that we can avoid data copies.

Source/WebKit:

In r271879 I removed the support for data URLs in the network process for soup, assuming data URLs were always
loaded from the web process, but that's not the case for synchronous loads.

  • NetworkProcess/soup/NetworkDataTaskSoup.cpp:

(WebKit::NetworkDataTaskSoup::createRequest): Schedule an error if URL is not file or HTTP family.

  • WebProcess/Network/WebLoaderStrategy.cpp:

(WebKit::WebLoaderStrategy::loadDataURLSynchronously): Helper to load a Data URL synchronously.
(WebKit::WebLoaderStrategy::loadResourceSynchronously): Call loadDataURLSynchronously for data URLs.

  • WebProcess/Network/WebLoaderStrategy.h:

LayoutTests:

Remove expectations for tests that are no longer crashing.

  • platform/glib/TestExpectations:
2:58 AM Changeset in webkit [272008] by commit-queue@webkit.org
  • 3 edits
    2 adds in trunk

Crash from CompositeEditCommand::moveParagraphs() using Position instead of VisiblePosition
https://bugs.webkit.org/show_bug.cgi?id=220955

Patch by Julian Gonzalez <julian_a_gonzalez@apple.com> on 2021-01-28
Reviewed by Ryosuke Niwa.

Source/WebCore:

If the start or end VisiblePositions inside InsertListCommand::moveParagraphs()
are null, then makeSimpleRange(start, end) will not return a usable SimpleRange.
Bail out early in this case, similar to bug 220630.

Test: editing/inserting/paragraph-outdent-animationframe-crash.html

  • editing/CompositeEditCommand.cpp:

(WebCore::CompositeEditCommand::moveParagraphs):

LayoutTests:

Add a test to verify that the crash here is resolved
using requestAnimationFrame(). Thanks to Ryosuke Niwa
for cleaning this up and making it reliable.

  • editing/inserting/paragraph-outdent-animationframe-crash-expected.txt: Added.
  • editing/inserting/paragraph-outdent-animationframe-crash.html: Added.
2:20 AM Changeset in webkit [272007] by Manuel Rego Casasnovas
  • 8 edits
    6 adds in trunk/LayoutTests

[selectors] Update :focus-visible tests from WPT
https://bugs.webkit.org/show_bug.cgi?id=221037

Reviewed by Javier Fernandez.

LayoutTests/imported/w3c:

  • web-platform-tests/css/selectors/focus-visible-007-expected.txt:
  • web-platform-tests/css/selectors/focus-visible-007.html:
  • web-platform-tests/css/selectors/focus-visible-011.html:
  • web-platform-tests/css/selectors/focus-visible-013-expected.txt: Added.
  • web-platform-tests/css/selectors/focus-visible-013.html: Added.
  • web-platform-tests/css/selectors/focus-visible-017-expected.txt: Added.
  • web-platform-tests/css/selectors/focus-visible-017.html: Added.
  • web-platform-tests/css/selectors/focus-visible-018-expected.txt: Added.
  • web-platform-tests/css/selectors/focus-visible-018.html: Added.
  • web-platform-tests/css/selectors/w3c-import.log:

LayoutTests:

  • TestExpectations: focus-visible-007.html has been fixed upstream and doesn't need to be skipped now.
  • platform/ios/TestExpectations: Skip focus-visible-013.html as it timeouts in iOS.
1:20 AM Changeset in webkit [272006] by ysuzuki@apple.com
  • 2 edits in trunk/Source/WTF

[JSC] Add JSC_SIGNAL_FOR_GC environment variable for Linux / FreeBSD
https://bugs.webkit.org/show_bug.cgi?id=221081

Reviewed by Mark Lam.

This patch adds JSC_SIGNAL_FOR_GC environment variable,
which changes signal number used for GC suspension.

  • wtf/posix/ThreadingPOSIX.cpp:

(WTF::Thread::initializePlatformThreading):

12:08 AM Changeset in webkit [272005] by ysuzuki@apple.com
  • 5 edits in trunk/Source/JavaScriptCore

[JSC] Add JSPromise::rejectedPromise
https://bugs.webkit.org/show_bug.cgi?id=221077

Reviewed by Mark Lam.

This patch adds JSPromise::rejectedPromise static function which can return newly created rejected promise.
The benefit of this function is that it avoids calling JS functions internally. It is efficient, fast, plus,
we can ensure that no JS related error happens (stack-overflow, terminated-execution errors).

  • builtins/PromiseOperations.js:
  • runtime/JSPromise.cpp:

(JSC::JSPromise::rejectedPromise):

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

(JSC::JSC_DEFINE_HOST_FUNCTION):

Note: See TracTimeline for information about the timeline view.