Timeline



Jan 20, 2021:

10:50 PM Changeset in webkit [271687] by Jonathan Bedard
  • 4 edits in trunk/Tools

[webkitscmpy] Gracefully handle missing keyring backend
https://bugs.webkit.org/show_bug.cgi?id=220784

Reviewed by Yusuke Suzuki.

  • Scripts/libraries/webkitscmpy/setup.py: Bump version.
  • Scripts/libraries/webkitscmpy/webkitscmpy/init.py: Ditto.
  • Scripts/libraries/webkitscmpy/webkitscmpy/remote/git_hub.py:

(GitHub.credentials): Handle RuntimeErrors from keyring.

10:32 PM Changeset in webkit [271686] by ysuzuki@apple.com
  • 8 edits in trunk/Source/WebCore

Further propagate ChildChange::Source to optimize HTMLInputElement creation
https://bugs.webkit.org/show_bug.cgi?id=220785

Reviewed by Ryosuke Niwa.

This patch further propagates ChildChange::Source to optimize HTMLInputElement creation.
We add appendChild method taking ChildChange::Source to transparently pick the efficient
one based on the parameter.

  • dom/ContainerNode.cpp:

(WebCore::ContainerNode::appendChild):

  • dom/ContainerNode.h:
  • html/BaseDateAndTimeInputType.cpp:

(WebCore::BaseDateAndTimeInputType::createShadowSubtreeAndUpdateInnerTextElementEditability):

  • html/ColorInputType.cpp:

(WebCore::ColorInputType::createShadowSubtreeAndUpdateInnerTextElementEditability):

  • html/FileInputType.cpp:

(WebCore::FileInputType::createShadowSubtreeAndUpdateInnerTextElementEditability):

  • html/RangeInputType.cpp:

(WebCore::RangeInputType::createShadowSubtreeAndUpdateInnerTextElementEditability):

  • html/TextFieldInputType.cpp:

(WebCore::TextFieldInputType::createShadowSubtreeAndUpdateInnerTextElementEditability):

7:29 PM Changeset in webkit [271685] by Wenson Hsieh
  • 15 edits in trunk

[macOS] Include an origin identifier when writing promised image data to the drag pasteboard
https://bugs.webkit.org/show_bug.cgi?id=220782

Reviewed by Megan Gardner.

Source/WebKit:

Add plumbing in WebKit to serialize and write the pasteboard origin identifier via custom data when dragging an
image with promised data on macOS. In the case where we're dragging an image into a contenteditable area in a
document with the *same* pasteboard origin, this allows us to avoid sanitizing the web archive data upon
handling the drop.

Test: DragAndDropTests.ProvideImageDataForMultiplePasteboards

  • UIProcess/Cocoa/WebPageProxyCocoa.mm:

(WebKit::WebPageProxy::setPromisedDataForImage):

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

(WebKit::WebViewImpl::setPromisedDataForImage):

If specified, write the origin to the drag pasteboard by creating a new PasteboardCustomData object, setting
its origin, and then serializing the custom data object into an NSData.

  • UIProcess/PageClient.h:
  • UIProcess/WebPageProxy.h:
  • UIProcess/WebPageProxy.messages.in:
  • UIProcess/mac/PageClientImplMac.h:
  • UIProcess/mac/PageClientImplMac.mm:

(WebKit::PageClientImpl::setPromisedDataForImage):

  • UIProcess/mac/WebPageProxyMac.mm:

(WebKit::WebPageProxy::setPromisedDataForImage):

  • WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:

(WebKit::WebDragClient::declareAndWriteDragImage):

Source/WebKitLegacy/mac:

See WebKit ChangeLog for more details.

  • Misc/WebNSPasteboardExtras.mm:

(-[NSPasteboard _web_declareAndWriteDragImageForElement:URL:title:archive:source:]):

Tools:

Make a slight adjustment to an existing API test, to verify that custom pasteboard data is serialized when
dragging an image element.

  • TestWebKitAPI/Tests/mac/DragAndDropTestsMac.mm:
6:53 PM Changeset in webkit [271684] by Alan Coon
  • 1 copy in tags/Safari-611.1.10.0.3

Tag Safari-611.1.10.0.3.

6:51 PM Changeset in webkit [271683] by Jonathan Bedard
  • 3 edits
    2 adds in trunk/Tools

[webkitcorepy] Add TaskPool
https://bugs.webkit.org/show_bug.cgi?id=220547
<rdar://problem/73043887>

Reviewed by Dewei Zhu.

The TaskPool object is a Python 3.8 compatible multiprocessing tool. Notable features are forwarding stdout,
stderr and logging to the parent process, exception propagation between processes, and graceful clean-up when
exceptions in the parent process are encountered

  • Scripts/libraries/webkitcorepy/webkitcorepy/init.py: Bump version, add tblib.
  • Scripts/libraries/webkitcorepy/webkitcorepy/task_pool.py: Added.

(Message): Base class for message passed between processes.
(Task): Message including function and arguments to that function.
(Result): Return value of a task passed to the parent process.
(Log): Pass log message from child process to parent process.
(Print): Pass stdout or stderr line from child process to parent process.
(State): Notify parent process that the child process has changed state.
(ChildException): Pass exception and stack trace from
(BiDirectionalQueue): Pair for multiprocess queues allowing for messages to be passed between processes.
(Process): Scoping class managing child-process logic.
(Process.LogHandler): Logging handler that passes log lines from the child process to it's parent.
(Process.Stream): Writable stream which passes content from the child process to the standard out or error
of that process's parent.
(Process.handler): SIGTERM should prevent future processing but allow currently in-flight tasks to complete.
(Process.main): Entry-point to child process.
(TaskPool): Managing allocation of tasks to child processes and clean up those child processes.
(TaskPool.Exception): Exception owned by TaskPool object.
(TaskPool.init):
(TaskPool.enter):
(TaskPool.do): Pass task to child processes.
(TaskPool.wait): Wait until all processes are completed.
(TaskPool.exit): Teardown all child processes.

  • Scripts/libraries/webkitcorepy/webkitcorepy/tests/task_pool_unittest.py: Added.

(setup):
(teardown):
(action):
(log):
(wait):
(exception):
(TaskPoolUnittest):
(TaskPoolUnittest.test_single):
(TaskPoolUnittest.test_multiple):
(TaskPoolUnittest.test_callback):
(TaskPoolUnittest.test_exception):
(TaskPoolUnittest.test_setup):
(TaskPoolUnittest.test_teardown):
(TaskPoolUnittest.test_invalid_shutdown):

6:50 PM Changeset in webkit [271682] by Alan Coon
  • 8 edits in branches/safari-611.1.10.0-branch/Source

Versioning.

WebKit-7611.1.10.0.3

6:45 PM Changeset in webkit [271681] by Alan Coon
  • 1 copy in tags/Safari-611.1.10.0.2

Tag Safari-611.1.10.0.2.

6:35 PM Changeset in webkit [271680] by Alan Coon
  • 1 delete in tags/Safari-611.1.10.0.2

Delete tag.

5:42 PM Changeset in webkit [271679] by commit-queue@webkit.org
  • 26 edits
    6 adds in trunk

Support WEBGL_multi_draw extension
https://bugs.webkit.org/show_bug.cgi?id=219139

Patch by Kenneth Russell <kbr@chromium.org> on 2021-01-20
Reviewed by Dean Jackson.

Source/WebCore:

Support the WEBGL_multi_draw extension in WebKit, delegating to
ANGLE's underlying implementation.

This extension significantly reduces draw-call overhead in certain
scenarios, and is requested by CAD/CAM web apps using WebGL.

Test: webgl/conformance/extensions/webgl-multi-draw.html

  • CMakeLists.txt:
  • DerivedSources-input.xcfilelist:
  • DerivedSources-output.xcfilelist:
  • DerivedSources.make:
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/JSDOMConvertWebGL.cpp:

(WebCore::convertToJSValue):

  • html/canvas/WebGL2RenderingContext.cpp:

(WebCore::WebGL2RenderingContext::getExtension):
(WebCore::WebGL2RenderingContext::getSupportedExtensions):

  • html/canvas/WebGLExtension.h:
  • html/canvas/WebGLMultiDraw.cpp: Added.

(WebCore::makeSpanWithOffset):
(WebCore::WebGLMultiDraw::WebGLMultiDraw):
(WebCore::WebGLMultiDraw::getName const):
(WebCore::WebGLMultiDraw::supported):
(WebCore::WebGLMultiDraw::multiDrawArraysWEBGL):
(WebCore::WebGLMultiDraw::multiDrawArraysInstancedWEBGL):
(WebCore::WebGLMultiDraw::multiDrawElementsWEBGL):
(WebCore::WebGLMultiDraw::multiDrawElementsInstancedWEBGL):
(WebCore::WebGLMultiDraw::validateDrawcount):
(WebCore::WebGLMultiDraw::validateOffset):

  • html/canvas/WebGLMultiDraw.h: Added.
  • html/canvas/WebGLMultiDraw.idl: Added.
  • html/canvas/WebGLRenderingContext.cpp:

(WebCore::WebGLRenderingContext::getExtension):
(WebCore::WebGLRenderingContext::getSupportedExtensions):

  • html/canvas/WebGLRenderingContextBase.cpp:

(WebCore::WebGLRenderingContextBase::extensionIsEnabled):

  • html/canvas/WebGLRenderingContextBase.h:
  • platform/graphics/GraphicsContextGL.h:
  • platform/graphics/angle/GraphicsContextGLANGLE.cpp:

(WebCore::GraphicsContextGLOpenGL::multiDrawArraysANGLE):
(WebCore::GraphicsContextGLOpenGL::multiDrawArraysInstancedANGLE):
(WebCore::GraphicsContextGLOpenGL::multiDrawElementsANGLE):
(WebCore::GraphicsContextGLOpenGL::multiDrawElementsInstancedANGLE):

  • platform/graphics/opengl/GraphicsContextGLOpenGL.h:
  • platform/graphics/opengl/GraphicsContextGLOpenGLCommon.cpp:

(WebCore::GraphicsContextGLOpenGL::multiDrawArraysANGLE):
(WebCore::GraphicsContextGLOpenGL::multiDrawArraysInstancedANGLE):
(WebCore::GraphicsContextGLOpenGL::multiDrawElementsANGLE):
(WebCore::GraphicsContextGLOpenGL::multiDrawElementsInstancedANGLE):

Source/WebInspectorUI:

Tell the Inspector about the method signatures in the
WEBGL_multi_draw extension.

  • UserInterface/Models/NativeFunctionParameters.js:

Source/WebKit:

Add automatically-generated stubs for supporting the multi-draw
extension in the GPU process.

  • GPUProcess/graphics/RemoteGraphicsContextGL.messages.in:
  • GPUProcess/graphics/RemoteGraphicsContextGLFunctionsGenerated.h:

(multiDrawArraysANGLE):
(multiDrawArraysInstancedANGLE):
(multiDrawElementsANGLE):
(multiDrawElementsInstancedANGLE):

  • WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.h:
  • WebProcess/GPU/graphics/RemoteGraphicsContextGLProxyFunctionsGenerated.cpp:

(WebKit::RemoteGraphicsContextGLProxy::multiDrawArraysANGLE):
(WebKit::RemoteGraphicsContextGLProxy::multiDrawArraysInstancedANGLE):
(WebKit::RemoteGraphicsContextGLProxy::multiDrawElementsANGLE):
(WebKit::RemoteGraphicsContextGLProxy::multiDrawElementsInstancedANGLE):

LayoutTests:

Add conformance test for the multi-draw extension, which is
expected to pass. Temporarily suppress the test due to failures on
Intel GPUs on macOS caused by recently-discovered OpenGL driver
bugs, which are currently being investigated.

  • TestExpectations:
  • webgl/conformance/extensions/webgl-multi-draw-expected.txt: Added.
  • webgl/conformance/extensions/webgl-multi-draw.html: Added.
  • webgl/resources/webgl_test_files/conformance/extensions/webgl-multi-draw.html: Added.
5:33 PM Changeset in webkit [271678] by ysuzuki@apple.com
  • 2 edits in trunk

Unreviewed, ANGLE should not be built in JSCOnly port

ANGLE is not a part of JSC. Do not build it.

  • Source/cmake/OptionsJSCOnly.cmake:
4:53 PM Changeset in webkit [271677] by Alan Coon
  • 1 copy in tags/Safari-611.1.10.1.1

Tag Safari-611.1.10.1.1.

4:53 PM Changeset in webkit [271676] by Alan Coon
  • 1 copy in tags/Safari-611.1.10.0.2

Tag Safari-611.1.10.0.2.

3:06 PM Changeset in webkit [271675] by aakash_jain@apple.com
  • 5 edits in trunk/Tools

EWS should display commit identifier in builds
https://bugs.webkit.org/show_bug.cgi?id=220769

Reviewed by Jonathan Bedard.

  • CISupport/ews-build/factories.py:

(Factory.init): Added ShowIdentifier build step.
(StyleFactory.init):
(WatchListFactory.init):
(CommitQueueFactory.init):

  • CISupport/ews-build/steps.py:

(ShowIdentifier): build-step to show commit identifier.
(ShowIdentifier.start):
(ShowIdentifier.evaluateCommand):
(ShowIdentifier.getLastBuildStepByName):
(ShowIdentifier.url_for_identifier):
(ShowIdentifier.getResultSummary): Display custom failure message.
(ShowIdentifier.hideStepIf): Hide this step if successful.

  • CISupport/ews-build/steps_unittest.py: Added unit-tests.
  • CISupport/ews-build/factories_unittest.py:
2:38 PM Changeset in webkit [271674] by mmaxfield@apple.com
  • 3 edits
    4 copies
    6 adds in trunk/LayoutTests

[ Big Sur ] platform/mac/fast/text/international/bidi-fallback-font-weight.html is failing
https://bugs.webkit.org/show_bug.cgi?id=220756
<rdar://problem/73048055>

Unreviewed test gardening.

  • platform/mac-catalina/fast/text/international/bidi-fallback-font-weight-expected.txt: Copied from LayoutTests/platform/mac/fast/text/international/bidi-fallback-font-weight-expected.txt.
  • platform/mac-catalina/platform/mac/fast/text/international/bidi-fallback-font-weight-expected.txt: Copied from LayoutTests/platform/mac/fast/text/international/bidi-fallback-font-weight-expected.txt.
  • platform/mac-mojave/fast/text/international/bidi-fallback-font-weight-expected.txt: Copied from LayoutTests/platform/mac/fast/text/international/bidi-fallback-font-weight-expected.txt.
  • platform/mac-mojave/platform/mac/fast/text/international/bidi-fallback-font-weight-expected.txt: Copied from LayoutTests/platform/mac/fast/text/international/bidi-fallback-font-weight-expected.txt.
  • platform/mac/TestExpectations:
  • platform/mac/fast/text/international/bidi-fallback-font-weight-expected.txt:
2:07 PM Changeset in webkit [271673] by Chris Dumez
  • 6 edits in trunk/Source

[GPUProcess] Mark IOSurface backing for RemoteGraphicsContextGL's displayBuffer as owned by the WebProcess
https://bugs.webkit.org/show_bug.cgi?id=220770

Reviewed by Geoffrey Garen.

Mark IOSurface backing for RemoteGraphicsContextGL's displayBuffer as owned by the WebProcess. This is so
that Jetsam knows which process to terminate to reclaim memory.

Source/WebCore:

  • platform/graphics/cocoa/IOSurface.h:
  • platform/graphics/cocoa/IOSurface.mm:

(WebCore::IOSurface::setOwnership):

Source/WebKit:

  • WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.cpp:

(WebKit::RemoteGraphicsContextGLProxy::prepareForDisplay):

  • WebProcess/GPU/graphics/cocoa/ImageBufferShareableMappedIOSurfaceBackend.cpp:

(WebKit::ImageBufferShareableMappedIOSurfaceBackend::create):

1:54 PM Changeset in webkit [271672] by ysuzuki@apple.com
  • 47 edits in trunk/Source/WebCore

Accelerate HTMLInputElement creation
https://bugs.webkit.org/show_bug.cgi?id=220758

Reviewed by Simon Fraser.

HTMLInputElement creation is too slow.

  1. InputType is excessively using virtual dispatching, which is too slow for hot path.
  2. HTMLInputElement creates internal elements as a shadow DOM and its creation is too generic.
  3. We are setting inner text element's editability in a very generic way. This allocates ElementData for each elements while attributes are almost the same.

In this patch,

  1. We add m_type field in InputType, and for the hot path, we attempt to devirtualize things due to performance problem.
  2. We pass "parsing phase" information to shadow DOM creation to make them fast.
  3. We initialize editibility when creating TextControlInnerTextElement. And we use parserSetAttributes to set shared ElementData. This is faster and less memory.
  4. We also shrink sizeof(Style::Scope) to reduce size of allocation when using shadow DOM.

This change offers 1% progression in Speedometer2/jQuery.

  • html/BaseButtonInputType.h:

(WebCore::BaseButtonInputType::BaseButtonInputType):

  • html/BaseCheckableInputType.h:

(WebCore::BaseCheckableInputType::BaseCheckableInputType):

  • html/BaseClickableWithKeyInputType.h:

(WebCore::BaseClickableWithKeyInputType::BaseClickableWithKeyInputType):

  • html/BaseDateAndTimeInputType.cpp:

(WebCore::BaseDateAndTimeInputType::isSteppableSlow const):
(WebCore::BaseDateAndTimeInputType::createShadowSubtreeAndUpdateInnerTextElementEditability):
(WebCore::BaseDateAndTimeInputType::isSteppable const): Deleted.
(WebCore::BaseDateAndTimeInputType::createShadowSubtree): Deleted.

  • html/BaseDateAndTimeInputType.h:

(WebCore::BaseDateAndTimeInputType::BaseDateAndTimeInputType):

  • html/BaseTextInputType.h:

(WebCore::BaseTextInputType::BaseTextInputType):

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

(WebCore::ColorInputType::createShadowSubtreeAndUpdateInnerTextElementEditability):
(WebCore::ColorInputType::createShadowSubtree): Deleted.

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

(WebCore::DateInputType::DateInputType):

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

(WebCore::FileInputType::FileInputType):
(WebCore::FileInputType::createShadowSubtreeAndUpdateInnerTextElementEditability):
(WebCore::FileInputType::createShadowSubtree): Deleted.

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

(WebCore::HTMLInputElement::didAddUserAgentShadowRoot):
(WebCore::HTMLInputElement::isValid const):
(WebCore::HTMLInputElement::updateType):

  • html/HTMLTextAreaElement.cpp:

(WebCore::HTMLTextAreaElement::didAddUserAgentShadowRoot):

  • html/HTMLTextFormControlElement.cpp:

(WebCore::HTMLTextFormControlElement::updateInnerTextElementEditability):

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

(WebCore::ImageInputType::ImageInputType):

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

(WebCore::InputType::isInvalid const):
(WebCore::InputType::createShadowSubtreeAndUpdateInnerTextElementEditability):
(WebCore::InputType::isSteppable const):
(WebCore::InputType::createShadowSubtree): Deleted.

  • html/InputType.h:

(WebCore::InputType::InputType):
(WebCore::InputType::isSteppableSlow const):
(WebCore::isInvalidInputType):

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

(WebCore::NumberInputType::isSteppableSlow const):
(WebCore::NumberInputType::isSteppable const): Deleted.

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

(WebCore::RangeInputType::RangeInputType):
(WebCore::RangeInputType::isSteppableSlow const):
(WebCore::RangeInputType::createShadowSubtreeAndUpdateInnerTextElementEditability):
(WebCore::RangeInputType::isSteppable const): Deleted.
(WebCore::RangeInputType::createShadowSubtree): Deleted.

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

(WebCore::SearchInputType::SearchInputType):
(WebCore::SearchInputType::createShadowSubtreeAndUpdateInnerTextElementEditability):
(WebCore::SearchInputType::createShadowSubtree): Deleted.

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

(WebCore::TextFieldInputType::TextFieldInputType):
(WebCore::TextFieldInputType::createShadowSubtreeAndUpdateInnerTextElementEditability):
(WebCore::TextFieldInputType::createShadowSubtree): Deleted.

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

(WebCore::TimeInputType::TimeInputType):

  • html/TimeInputType.h:
  • html/URLInputType.h:
  • html/WeekInputType.h:
  • html/shadow/TextControlInnerElements.cpp:

(WebCore::TextControlInnerTextElement::create):
(WebCore::TextControlInnerTextElement::updateInnerTextElementEditabilityImpl):

  • html/shadow/TextControlInnerElements.h:
  • style/StyleScope.h:
1:41 PM Changeset in webkit [271671] by Manuel Rego Casasnovas
  • 4 edits in trunk

[WPE] focus-visible-003.html and focus-visible-004.html are timing out in input tags
https://bugs.webkit.org/show_bug.cgi?id=220578

Reviewed by Javier Fernandez.

Source/WebCore:

Dispatch "focus" event for form controls when they are focused via mouse click.
This was already done in GTK+ but was not yet in WPE.

This works different on Mac ports as it's a particularity of how focus works on Mac platforms
(see https://webkit.org/b/22261 for details).

  • html/HTMLFormControlElement.cpp:

(WebCore::HTMLFormControlElement::isMouseFocusable const): Add PLATFORM(WPE).

LayoutTests:

  • platform/wpe/TestExpectations: Unskip tests that are not failing anymore.
1:27 PM Changeset in webkit [271670] by youenn@apple.com
  • 6 edits
    1 add in trunk

Two pages in the same process should not be able to play media stream backed video elements at the same time
https://bugs.webkit.org/show_bug.cgi?id=220504

Reviewed by Eric Carlson.

Source/WebCore:

In case of ConcurrentPlaybackNotPermitted restrictions, we now make sure that media elements from different pages do not play concurrently.
We also make sure that a VideoAudio and Audio sessions can also pause each other so we update the check for same media session type accordingly.

Covered by API test.

  • platform/audio/PlatformMediaSession.cpp:

(WebCore::isPlayingAudio):
(WebCore::PlatformMediaSession::canPlayConcurrently const):

  • platform/audio/PlatformMediaSessionManager.cpp:

(WebCore::PlatformMediaSessionManager::sessionWillBeginPlayback):

Tools:

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKit/GetUserMedia.mm:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKit/getUserMedia2.html: Added.
1:09 PM Changeset in webkit [271669] by commit-queue@webkit.org
  • 5 edits
    2 adds in trunk

Fix nullptr dereference introduced in r268228
https://bugs.webkit.org/show_bug.cgi?id=220776

Patch by Alex Christensen <achristensen@webkit.org> on 2021-01-20
Reviewed by Chris Dumez.

Source/WebCore:

Instead of taking data from the FileReaderLoader, which it assumes it still has later,
only give the bytes to JavaScript that have been received since last time we called didReceiveData.
This makes blob.stream correct and not crash.

Test: fast/files/blob-stream-crash-2.html

  • fileapi/Blob.cpp:

(WebCore::Blob::stream):

  • fileapi/FileReaderLoader.cpp:

(WebCore::FileReaderLoader::takeRawData): Deleted.

  • fileapi/FileReaderLoader.h:

(WebCore::FileReaderLoader::totalBytes const):

LayoutTests:

  • fast/files/blob-stream-crash-2-expected.txt: Added.
  • fast/files/blob-stream-crash-2.html: Added.
12:55 PM Changeset in webkit [271668] by youenn@apple.com
  • 3 edits in trunk/Source/WebCore
REGRESSION (r271488): ASSERTION FAILED: m_private->type() != RealtimeMediaSource::Type::Audio
!PlatformMediaSessionManager::sharedManager().hasAudioCaptureSource(*this)

https://bugs.webkit.org/show_bug.cgi?id=220752
<rdar://problem/73377854>

Reviewed by Eric Carlson.

Make sure to remove audio capture source in destructor if it was not done so before.
Covered by existing tests.

  • Modules/mediastream/MediaStreamTrack.cpp:

(WebCore::MediaStreamTrack::~MediaStreamTrack):

  • platform/audio/PlatformMediaSessionManager.cpp:

(WebCore::PlatformMediaSessionManager::removeAudioCaptureSource):

12:51 PM Changeset in webkit [271667] by youenn@apple.com
  • 4 edits in trunk/Source/WebCore

Extend getUserMedia quirk to warbyparker.com
https://bugs.webkit.org/show_bug.cgi?id=220704
<rdar://problem/72839707>

Reviewed by Eric Carlson.

Update IDL to require SecureContext instead of checking this in quirk.
Buffer the shouldEnableLegacyGetUserMediaQuirk in an optional to compute it once per document.
Use Document origin directly instead of Document URL.
Add warbyparker.com to the allowed list.

Manually tested.

  • Modules/mediastream/Navigator+MediaDevices.idl:
  • page/Quirks.cpp:

(WebCore::Quirks::shouldEnableLegacyGetUserMediaQuirk const):

  • page/Quirks.h:
12:09 PM Changeset in webkit [271666] by Alan Coon
  • 2 edits in branches/safari-611.1.10.0-branch/Source/JavaScriptCore

Cherry-pick r271544. rdar://problem/73412535

[JSC] Clean up DFGPreciseLocalClobberize to avoid duplicate code
https://bugs.webkit.org/show_bug.cgi?id=220670

Reviewed by Filip Pizlo.

This patch cleans up DFGPreciseLocalClobberize by extracting code to lambda to remove duplicate code.

  • dfg/DFGPreciseLocalClobberize.h: (JSC::DFG::PreciseLocalClobberizeAdaptor::readTop):

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

12:02 PM Changeset in webkit [271665] by Alan Coon
  • 8 edits in branches/safari-611.1.10.0-branch/Source

Versioning.

WebKit-7611.1.10.0.2

11:55 AM Changeset in webkit [271664] by Alan Coon
  • 2 edits in branches/safari-611.1.10.1-branch/Source/JavaScriptCore

Cherry-pick r271544. rdar://problem/73412647

[JSC] Clean up DFGPreciseLocalClobberize to avoid duplicate code
https://bugs.webkit.org/show_bug.cgi?id=220670

Reviewed by Filip Pizlo.

This patch cleans up DFGPreciseLocalClobberize by extracting code to lambda to remove duplicate code.

  • dfg/DFGPreciseLocalClobberize.h: (JSC::DFG::PreciseLocalClobberizeAdaptor::readTop):

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

11:53 AM Changeset in webkit [271663] by Alan Coon
  • 8 edits in branches/safari-611.1.10.1-branch/Source

Versioning.

WebKit-7611.1.10.1.1

11:42 AM Changeset in webkit [271662] by Alan Coon
  • 1 copy in branches/safari-611.1.10.0-branch

New branch.

11:29 AM Changeset in webkit [271661] by Alan Coon
  • 1 copy in branches/safari-611.1.10.1-branch

New branch.

11:28 AM Changeset in webkit [271660] by Wenson Hsieh
  • 9 edits
    2 adds in trunk

[iOS] "touchend" events should be dispatched and handled asynchronously
https://bugs.webkit.org/show_bug.cgi?id=220256
<rdar://problem/64912551>

Reviewed by Tim Horton.

Source/WebKit:

Allow active "touchend" event listeners to send asynchronous (non-blocking) IPC messages to the web process by
augmenting the content view's deferring gesture recognizers. See below for more details.

Test: fast/events/touch/ios/click-event-after-touchend.html

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

(WebKit::WebPageProxy::handlePreventableTouchEvent):

Send both "touchstart" and "touchend" events asynchronously.

  • UIProcess/WebPageProxy.h:

(WebKit::WebPageProxy::isHandlingPreventableTouchEnd const):

In a similar way to how we defer "touchstart", add a counter to keep track of when we're handling an active
(preventable) touchend, such that we can defer all native gestures that can be prevented by touchend until after
the page is done handling the event.

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

(WebKit::PageClientImpl::doneDeferringTouchEnd):

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

(-[WKContentView setUpInteraction]):

Add a new set of deferring gesture recognizers that can be used to defer all tap gestures on the content view,
due to active "touchend" event listeners. This works because currently, the only default gestures in WebKit
that can be prevented by calling preventDefault() on "touchend" events are tap gestures.

(-[WKContentView cleanUpInteraction]):
(-[WKContentView _removeDefaultGestureRecognizers]):
(-[WKContentView _addDefaultGestureRecognizers]):
(-[WKContentView _webTouchEventsRecognized:]):
(-[WKContentView _deferringGestures]):
(-[WKContentView _touchEndDeferringGestures]):
(-[WKContentView _doneDeferringTouchEnd:]):

Add a hook to "lift" the gesture gate upon touchend, which allows all deferred tap gestures to either fail (in
the case where the page prevented default), or recognize (in the case where the page did not prevent default).

(-[WKContentView gestureRecognizer:shouldRecognizeSimultaneouslyWithGestureRecognizer:]):

Replace _touchStartDeferringGestures with _deferringGestures in several call sites that need to iterate over
all deferring gestures on the content view.

(-[WKContentView _singleTapDidReset:]):

When resetting the single tap gesture, ensure that the tap highlight view is removed by calling
-_finishInteraction; this is because an active touchend event handler may now defer -_singleTapRecognized:
until after the ending the touch, which causes -_showTapHighlight to be called without a matching call to
remove the highlight. Since we know that the synthetic tap gesture must eventually be reset after recognition,
this is a more suitable catch-all for removing the tap highlight.

(-[WKContentView deferringGestureRecognizer:shouldDeferOtherGestureRecognizer:]):

For the "touchend" deferring gesture recognizers, partition all tap gestures on the content view into three
subgraphs that mirror the extant gesture subgraphs currently used for the "touchstart" deferring gestures. This
ensures that synthetic clicks always remain fast when the blocking double tap gesture is disabled, and that
other tap gestures (such as the text interaction multi-tap gesture) are still immediately reset.

LayoutTests:

Add a layout test to verify that calling preventDefault() in an active touchend event listener prevents a
click event from being dispatched, and that a click event is dispatched when there is an active touchend event
listener which does not prevent default.

  • fast/events/touch/ios/click-event-after-touchend-expected.txt: Added.
  • fast/events/touch/ios/click-event-after-touchend.html: Added.
11:18 AM Changeset in webkit [271659] by Alan Coon
  • 1 copy in tags/Safari-611.1.10.1

Tag Safari-611.1.10.1.

11:12 AM Changeset in webkit [271658] by commit-queue@webkit.org
  • 10 edits in trunk/Source/WebCore

Use ScrollSnapOffsetsInfo in ScrollSnapAnimatorState
https://bugs.webkit.org/show_bug.cgi?id=220765

Patch by Martin Robinson <mrobinson@igalia.com> on 2021-01-20
Reviewed by Simon Fraser.

Refactor ScrollSnapAnimatorState to use ScrollSnapOffsetsInfo.

  • page/scrolling/AsyncScrollingCoordinator.cpp: No longer use getters for vertical

and horizontal snap information and use the ScrollSnapOffsetsInfo getter on ScrollableArea.
(WebCore::setStateScrollingNodeSnapOffsetsAsFloat):
(WebCore::AsyncScrollingCoordinator::setScrollingNodeScrollableAreaGeometry):
(WebCore::AsyncScrollingCoordinator::updateScrollSnapPropertiesWithFrameView):

  • page/scrolling/ScrollSnapOffsetsInfo.h:

(WebCore::ScrollSnapOffsetsInfo::isEmpty const): Added this helper method.
(WebCore::ScrollSnapOffsetsInfo::offsetsForAxis const): Ditto.
(WebCore::ScrollSnapOffsetsInfo::offsetRangesForAxis const): Ditto.

  • platform/ScrollableArea.cpp:

(WebCore::ScrollableArea::snapOffsetInfo const): Added this getter.
(WebCore::ScrollableArea::nearestActiveSnapPoint): No longer use deleted getters.
(WebCore::ScrollableArea::horizontalSnapOffsets const): Deleted.
(WebCore::ScrollableArea::horizontalSnapOffsetRanges const): Deleted.
(WebCore::ScrollableArea::verticalSnapOffsetRanges const): Deleted.
(WebCore::ScrollableArea::verticalSnapOffsets const): Deleted.

  • platform/ScrollableArea.h:
  • platform/cocoa/ScrollController.mm:

(WebCore::ScrollController::updateScrollSnapState): Modified this method to update
all scroll snap information at once.

  • platform/cocoa/ScrollSnapAnimatorState.h:

(WebCore::ScrollSnapAnimatorState::snapOffsetsForAxis const): Modified to use new ScrollSnapOffsetsInfo member.
(WebCore::ScrollSnapAnimatorState::snapOffsetRangesForAxis const): Ditto.
(WebCore::ScrollSnapAnimatorState::setSnapOffsetInfo): Ditto.
(WebCore::ScrollSnapAnimatorState::setSnapOffsetsAndPositionRangesForAxis): Ditto.

  • platform/cocoa/ScrollSnapAnimatorState.mm:

(WebCore::ScrollSnapAnimatorState::setupAnimationForState): Ditto.

  • platform/mac/ScrollAnimatorMac.mm:

(WebCore::gestureShouldBeginSnap): Use new ScrollSnapOffsetsInfo getter.
(WebCore::ScrollAnimatorMac::allowsVerticalStretching const): Ditto.
(WebCore::ScrollAnimatorMac::allowsHorizontalStretching const): Ditto.

  • testing/Internals.cpp:

(WebCore::Internals::scrollSnapOffsets): Ditto.

11:03 AM Changeset in webkit [271657] by Alan Coon
  • 8 edits in branches/safari-611.1.10-branch/Source

Versioning.

WebKit-7611.1.10.1

11:01 AM Changeset in webkit [271656] by jer.noble@apple.com
  • 3 edits
    1 add in trunk

[Mac] Netflix controls do not fade out after entering fullscreen
https://bugs.webkit.org/show_bug.cgi?id=220472
<rdar://70602577>

Reviewed by Eric Carlson.

Test: TestWebKitAPI/Tests/mac/FullscreenPointerLeave.mm

Netflix uses a "pointerleave" event over their playback controls to trigger setting their "fade out controls"
timer, but a "pointerleave" event isn't fired when the element moves out from under the pointer (either due to
style changes, or the window screen location moving due to entering fullscreen).

Work around this behavior by sending a synthetic mouse event after entering fullscreen, which causes the
"pointerleave" event to be fired if, indeed, the pointer is no longer over the element in question.

  • UIProcess/mac/WKFullScreenWindowController.mm:

(-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]):

10:42 AM Changeset in webkit [271655] by Alan Coon
  • 1 delete in branches/safari-610.1.10-branch/Safari-611.1.10

Undo copy.

10:38 AM Changeset in webkit [271654] by Alan Coon
  • 1 copy in branches/safari-611.1.10-branch

New branch.

10:37 AM Changeset in webkit [271653] by Alan Coon
  • 1 copy in branches/safari-610.1.10-branch/Safari-611.1.10

New branch.

10:36 AM Changeset in webkit [271652] by commit-queue@webkit.org
  • 3 edits
    1 add in trunk/LayoutTests

REGRESSION (Big Sur): Some tests in http/tests/security/http-0.9 flakily fail
https://bugs.webkit.org/show_bug.cgi?id=220188
<rdar://problem/72709565>

Patch by Alex Christensen <achristensen@webkit.org> on 2021-01-20
Reviewed by Alexey Proskuryakov.

A change to CFNetwork was made in rdar://problem/69534004 that made these two tests flaky when operating near the limit of TCP connection count.
In an attempt to make them more reliable in our test environment, close existing TCP connections before making HTTP 0.9 connections.
I have been unable to reproduce the test failure, but I have verified that the test expectations of these tests is unaffected in normal conditions.

  • http/tests/security/http-0.9/default-port-plugin-blocked.html:
  • http/tests/security/http-0.9/default-port-script-blocked.html:
  • http/tests/security/http-0.9/resources/close-connection.php: Added.
10:34 AM Changeset in webkit [271651] by Simon Fraser
  • 3 edits
    9 adds in trunk

REGRESSION (Big Sur): position:absolute elements inside nested overflow:scroll don't track scrolling
https://bugs.webkit.org/show_bug.cgi?id=220761
<rdar://problem/69075263>

Reviewed by Antti Koivisto.
Source/WebCore:

When a position:absolute element is inside nested overflow scroll, and its containing block is the outer
scroller, then we failed to make a positioning scrolling tree node for it, so it would fail
to track during async scrolling.

The bug was that RenderLayerCompositor::layerScrollBehahaviorRelativeToCompositedAncestor() failed
to deal with nested scrollers. The correct question to ask when determining if we need a "Moves" node
is "is there an overflow scroll layer between this layer and its composited ancestor". Previously,
we would just find the enclosing scroller (with the same scrolling scope) and assume we didn't need
a node.

We can also simplify the "Stationary" code path to just ask about scrolling scopes.

Tests: scrollingcoordinator/ios/absolute-in-nested-overflow-scroll-intermediate-stacking-2.html

scrollingcoordinator/ios/absolute-in-nested-overflow-scroll-intermediate-stacking.html
scrollingcoordinator/ios/absolute-in-nested-overflow-scroll.html
scrollingcoordinator/scrolling-tree/absolute-in-nested-overflow-scroll.html

  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::layerScrollBehahaviorRelativeToCompositedAncestor):
(WebCore::isScrolledByOverflowScrollLayer): Deleted.
(WebCore::enclosingCompositedScrollingLayer): Deleted.

LayoutTests:

Add a scrolling tree dump test, and three iOS interactive tests, since testing scrolling-tree-only
behaviors is easier on iOS than macOS. absolute-in-nested-overflow-scroll.html is the basic test.
The two "stacking" variants have an opacity layer below and above the inner scroller to test some
more layer configurations.

  • platform/ios-wk2/scrollingcoordinator/scrolling-tree/absolute-in-nested-overflow-scroll-expected.txt: Added.
  • scrollingcoordinator/ios/absolute-in-nested-overflow-scroll-expected.html: Added.
  • scrollingcoordinator/ios/absolute-in-nested-overflow-scroll-intermediate-stacking-2-expected.html: Added.
  • scrollingcoordinator/ios/absolute-in-nested-overflow-scroll-intermediate-stacking-2.html: Added.
  • scrollingcoordinator/ios/absolute-in-nested-overflow-scroll-intermediate-stacking-expected.html: Added.
  • scrollingcoordinator/ios/absolute-in-nested-overflow-scroll-intermediate-stacking.html: Added.
  • scrollingcoordinator/ios/absolute-in-nested-overflow-scroll.html: Added.
  • scrollingcoordinator/scrolling-tree/absolute-in-nested-overflow-scroll-expected.txt: Added.
  • scrollingcoordinator/scrolling-tree/absolute-in-nested-overflow-scroll.html: Added.
9:44 AM Changeset in webkit [271650] by Kate Cheney
  • 12 edits in trunk

Safari says "Blocked Plug-in" instead showing a PDF
https://bugs.webkit.org/show_bug.cgi?id=220665
<rdar://problem/64372944>

Reviewed by Darin Adler.

Source/WebCore:

WebKit's PDFPlugin is a browser implementation detail and should
bypass the ContentSecurityPolicy::allowObjectFromSource() check
in order to not be blocked along with other plugins.

  • html/HTMLPlugInImageElement.cpp:

(WebCore::HTMLPlugInImageElement::shouldBypassCSPForPDFPlugin const):
The check for whether to use PDFPlugin happens in
WebPage::createPlugin(). Some information there like isUnsupported,
isBlockedPlugin and pluginProcessToken are sent from the UIProcess
after the CSP check so they are unavailable here, but we know that PDFPlugin
will always be used when plugins are disabled and can use that information
to know whether to bypass CSP here in many cases. This will not relax
CSP or change behavior in other cases.

It would be ideal to check for an alternative PDF plugin in the case
where plugins are not disabled, but this information currently lives
in the UIProcess and is not sent to the WebProcess until after this
check. This patch will definitely fix Safari, where plugins are always disabled.

(WebCore::HTMLPlugInImageElement::canLoadPlugInContent const):

  • html/HTMLPlugInImageElement.h:
  • loader/FrameLoaderClient.h:

Source/WebKit:

  • WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:

(WebKit::WebFrameLoaderClient::shouldUsePDFPlugin const):

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

(WebKit::WebPage::createPlugin):

  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/mac/WebPageMac.mm:

(WebKit::WebPage::shouldUsePDFPlugin const):

Tools:

API test coverage.

  • TestWebKitAPI/Tests/WebKitCocoa/WKPDFView.mm:

(TEST):

8:02 AM Changeset in webkit [271649] by Jonathan Bedard
  • 2 edits in trunk/Tools

[webkitcorepy] Support alternative default pypi url on macOS (Follow-up fix)
https://bugs.webkit.org/show_bug.cgi?id=220744
<rdar://problem/73369338>

Unreviewed follow-up fix.

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

(_default_pypi_index): Ensure that "simple" is excluded from the pypi url.

8:02 AM Changeset in webkit [271648] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

Support transferred min/max block size for aspect-ratio
https://bugs.webkit.org/show_bug.cgi?id=220224

Patch by Rob Buis <rbuis@igalia.com> on 2021-01-20
Reviewed by Darin Adler.

Use std::clamp for clarity. Also use structured bindings where possible.

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::constrainLogicalWidthInFragmentByMinMax const):

7:59 AM Changeset in webkit [271647] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit

[WPE][GTK] Ensure URI scheme handler is not registered multiple times
https://bugs.webkit.org/show_bug.cgi?id=220363

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

  • UIProcess/API/glib/WebKitWebContext.cpp:

(webkit_web_context_register_uri_scheme):

6:42 AM WebKitGTK/2.30.x edited by zandobersek@gmail.com
(diff)
5:55 AM Changeset in webkit [271646] by weinig@apple.com
  • 7 edits in trunk

Source/WebCore:
"Remove remaining non-standard CMYKA support from Canvas"
https://bugs.webkit.org/show_bug.cgi?id=220760

Reviewed by Darin Adler and Wenson Hsieh.

In r267645, most of the non-standard CMYKA taking functions on CanvasRenderingContext2D
were removed, leaving only the setShadow overload left. This finishes that removal and
cleans up some dead declarations that were left behind. As with the overloads removed in
r267645, we are quite confident no one is using these.

  • html/canvas/CanvasRenderingContext2D.idl:
  • html/canvas/CanvasRenderingContext2DBase.cpp:
  • html/canvas/CanvasRenderingContext2DBase.h:
  • html/canvas/CanvasStyle.h:

LayoutTests:
Remove remaining non-standard CMYKA support from canvas
https://bugs.webkit.org/show_bug.cgi?id=220760

Reviewed by Darin Adler and Wenson Hsieh.

  • inspector/canvas/recording-2d-full-expected.txt:

Update test results for removal.

5:10 AM Changeset in webkit [271645] by Diego Pino Garcia
  • 2 edits in trunk/LayoutTests

[WPE] Unreviewed gardening. Add removed WebXR tests in r270745.

These tests need actually to be marked as Pass in order to run, since
the general TestExpectations is skipping WPT WebXR tests.

  • platform/wpe/TestExpectations:
2:59 AM Changeset in webkit [271644] by svillar@igalia.com
  • 4 edits
    2 adds in trunk

[css-multicol] OOM with 1px height columns
https://bugs.webkit.org/show_bug.cgi?id=220490

Reviewed by Ryosuke Niwa.

Source/WebCore:

Test: fast/multicol/newmulticol/zero-height-columns-oom-crash.html

Multicol sometimes computes <= 0 heights for the columns. For all those cases the code was adjusting them to 1px
values apparently to avoid creating an "infinite" amount of columns. However that adjustment was precisely causing
OOM situations in those cases where there was a relatively large amount of free space. In those cases the code was
creating dozens of thousands of 1px height columns (with all their associated structures) until we run out of memory.

Using zero heights in those cases seem sane because it's already being properly handled in the current code.

  • rendering/RenderMultiColumnSet.cpp:

(WebCore::RenderMultiColumnSet::heightAdjustedForSetOffset const): cap negative heights to 0.

LayoutTests:

  • fast/multicol/newmulticol/zero-height-columns-oom-crash-expected.txt: Added.
  • fast/multicol/newmulticol/zero-height-columns-oom-crash.html: Added.
  • imported/blink/fast/pagination/first-letter-inherit-all-crash-expected.txt: Updated expectations.
2:43 AM Changeset in webkit [271643] by youenn@apple.com
  • 14 edits
    1 add in trunk/Source/WebCore

Introduce a MediaSessionGroupIdentifier
https://bugs.webkit.org/show_bug.cgi?id=220706

Reviewed by Eric Carlson.

Instead of going from page to document to media session, introduce a MediaSessionGroupIdentifier which groups sessions by page.
We can then directly go from page to media session to suspend/resume play back.
Update PlatformMediaSessionClient to implement mediaSessionGroupIdentifier instead of hostingDocumentIdentifier.

We remove pausing playback from Document::~Document, as related audio producers (AudioContext, HTMLMediaElement)
should be paused in their ActiveDOMObject stop method.

Covered by existing tests, this is a refactoring.

  • Modules/webaudio/AudioContext.cpp:

(WebCore::AudioContext::mediaSessionGroupIdentifier const):
(WebCore::AudioContext::hostingDocumentIdentifier const): Deleted.

  • Modules/webaudio/AudioContext.h:
  • WebCore.xcodeproj/project.pbxproj:
  • dom/Document.cpp:

(WebCore::Document::~Document):
(WebCore::Document::mediaPlaybackExists): Deleted.
(WebCore::Document::mediaPlaybackIsPaused): Deleted.
(WebCore::Document::pauseAllMediaPlayback): Deleted.
(WebCore::Document::suspendAllMediaPlayback): Deleted.
(WebCore::Document::resumeAllMediaPlayback): Deleted.
(WebCore::Document::suspendAllMediaBuffering): Deleted.
(WebCore::Document::resumeAllMediaBuffering): Deleted.

  • dom/Document.h:
  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::mediaSessionGroupIdentifier const):

  • html/HTMLMediaElement.h:
  • page/Page.cpp:

(WebCore::Page::mediaPlaybackExists):
(WebCore::Page::mediaPlaybackIsPaused):
(WebCore::Page::pauseAllMediaPlayback):
(WebCore::Page::suspendAllMediaPlayback):
(WebCore::Page::mediaSessionGroupIdentifier const):
(WebCore::Page::resumeAllMediaPlayback):
(WebCore::Page::suspendAllMediaBuffering):
(WebCore::Page::resumeAllMediaBuffering):

  • page/Page.h:
  • platform/MediaSessionGroupIdentifier.h: Added.
  • platform/audio/PlatformMediaSession.h:
  • platform/audio/PlatformMediaSessionManager.cpp:

(WebCore::PlatformMediaSessionManager::pauseAllMediaPlaybackForGroup):
(WebCore::PlatformMediaSessionManager::mediaPlaybackIsPaused):
(WebCore::PlatformMediaSessionManager::suspendAllMediaPlaybackForGroup):
(WebCore::PlatformMediaSessionManager::resumeAllMediaPlaybackForGroup):
(WebCore::PlatformMediaSessionManager::suspendAllMediaBufferingForGroup):
(WebCore::PlatformMediaSessionManager::resumeAllMediaBufferingForGroup):
(WebCore::PlatformMediaSessionManager::forEachSessionInGroup):
(WebCore::PlatformMediaSessionManager::pauseAllMediaPlaybackForDocument): Deleted.
(WebCore::PlatformMediaSessionManager::suspendAllMediaPlaybackForDocument): Deleted.
(WebCore::PlatformMediaSessionManager::resumeAllMediaPlaybackForDocument): Deleted.
(WebCore::PlatformMediaSessionManager::suspendAllMediaBufferingForDocument): Deleted.
(WebCore::PlatformMediaSessionManager::resumeAllMediaBufferingForDocument): Deleted.
(WebCore::PlatformMediaSessionManager::forEachDocumentSession): Deleted.

  • platform/audio/PlatformMediaSessionManager.h:
2:41 AM Changeset in webkit [271642] by youenn@apple.com
  • 7 edits in trunk

A DOMWindow should not be reused if its JSDOMWindow has been created
https://bugs.webkit.org/show_bug.cgi?id=220658
<rdar://problem/70335075>

Reviewed by Geoffrey Garen.

Source/WebCore:

When a JSDOMWindow is created from a DOMWindow, its document is used to decide whether to expose some properties,
based on SecureContext or quirks.
It is important to ensure that the document has the correct information at that time.

Add a boolean to DOMWindow to identify whether it was wrapped without its document being properly initialized.
Use that boolean in DocumentWriter to forbidd reusing the DOMWindow if it was created this way.

Covered by API test.

  • bindings/js/JSWindowProxy.cpp:

(WebCore::JSWindowProxy::setWindow):

  • dom/SecurityContext.h:

(WebCore::SecurityContext::haveInitializedSecurityOrigin const):
(WebCore::SecurityContext::didFailToInitializeSecurityOrigin):

  • loader/DocumentWriter.cpp:

(WebCore::DocumentWriter::begin):

  • page/DOMWindow.h:

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/WKWebViewEvaluateJavaScript.mm:
1:01 AM Changeset in webkit [271641] by youenn@apple.com
  • 2 edits in trunk/Source/WTF

Enable WebRTC VP9 profile 0 by default
https://bugs.webkit.org/show_bug.cgi?id=219390

Reviewed by Geoffrey Garen.

  • Scripts/Preferences/WebPreferencesExperimental.yaml:
12:57 AM Changeset in webkit [271640] by youenn@apple.com
  • 5 edits in trunk

On page close, make sure to notify of capture state immediately
https://bugs.webkit.org/show_bug.cgi?id=220588

Reviewed by Geoffrey Garen.

Source/WebKit:

If page is getting closed or reset (for instance in case of process swap), we immediately notify the client of the capture state,
instead of waiting for 3 seconds if capture just started.

Covered by API test.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::isPlayingMediaDidChange):
(WebKit::WebPageProxy::updatePlayingMediaDidChange):
(WebKit::WebPageProxy::updateReportedMediaCaptureState):

  • UIProcess/WebPageProxy.h:

Tools:

  • TestWebKitAPI/Tests/WebKit/GetUserMedia.mm:

(TestWebKitAPI::TEST):

12:31 AM Changeset in webkit [271639] by Dewei Zhu
  • 6 edits in trunk/Websites/perf.webkit.org

BuildbotTriggerable should not update build requests from another triggerable.
https://bugs.webkit.org/show_bug.cgi?id=220762

Reviewed by Ryosuke Niwa.

BuildbotTriggerable._pullBuildbotOnAllSyncers assumes 'BuildRequest.all()' returns all build requests under current triggerable.
However, this assumption got broken when root reuse change was introduced because build requests under same analysis task are
fetched. Thus, 'BuildRequest.all()' may contain build requests those are not under current triggerable. And those build requests
will be updated to 'failedIfNotCompleted'.
Update 'api/build-requests' so that 'url' and 'status_description' fields are not cleared if update does not specify them.

  • public/api/build-requests.php: Added logic to avoid updating 'url' and 'status_description' if they are not specified.
  • server-tests/api-build-requests-tests.js: Added an unit test.
  • server-tests/resources/mock-data.js:

(MockData.async set addMockBuildRequestsForTwoTriggerablesUnderOneAnalysisTask):

  • server-tests/tools-buildbot-triggerable-tests.js: Added an unit test.
  • tools/js/buildbot-triggerable.js:

(BuildbotTriggerable.prototype.async syncOnce): Fixed a typo.
(BuildbotTriggerable._pullBuildbotOnAllSyncers): Instead of iterating over 'BuildRequest.all()', only set 'failedIfNotCompleted'
for build requests those are under current triggerable and satisfy the condition.

12:07 AM Changeset in webkit [271638] by Antti Koivisto
  • 12 edits in trunk/Source/WebCore

Implement efficient way to collect images that are likely visible in the viewport
https://bugs.webkit.org/show_bug.cgi?id=220727

Reviewed by Geoffrey Garen.

To implement visibility based resource load scheduling we need to know what is visible.

This patch expands the exisiting visibility test mechanism to support collecting all visible, loading resources in a document.
The code is not used yet.

  • loader/ImageLoader.cpp:

(WebCore::ImageLoader::imageVisibleInViewport const):

  • loader/ImageLoader.h:
  • loader/cache/CachedImage.cpp:

(WebCore::CachedImage::isVisibleInViewport const):

  • loader/cache/CachedImage.h:
  • loader/cache/CachedImageClient.h:

(WebCore::CachedImageClient::imageVisibleInViewport const):

Add a virtual interface. It is implemented by ImageLoader (for regular images) and RenderElement (for CSS images like backgrounds).

  • loader/cache/CachedResourceLoader.cpp:

(WebCore::CachedResourceLoader::CachedResourceLoader):

  • loader/cache/CachedResourceLoader.h:
  • rendering/RenderElement.cpp:

(WebCore::RenderElement::isVisibleIgnoringGeometry const):

Factor geometry-independent test to a function.

(WebCore::RenderElement::isVisibleInDocumentRect const):
(WebCore::RenderElement::imageVisibleInViewport const):

  • rendering/RenderElement.h:
  • rendering/RenderReplaced.cpp:

(WebCore::RenderReplaced::isContentLikelyVisibleInViewport):

This also allows intrisically sized images that currently have zero size.

  • rendering/RenderReplaced.h:

Jan 19, 2021:

9:23 PM Changeset in webkit [271637] by Simon Fraser
  • 2 edits in trunk/Source/WebCore

REGRESSION (r271508) Scrolling is no longer smooth
https://bugs.webkit.org/show_bug.cgi?id=220759

Reviewed by Sam Weinig.

r271508 has a logic error that resulted in no scrolling thread layer commits, which meant that
scrolling on pages with a busy main thread only updated layers at main thread cadence.

  • page/scrolling/ThreadedScrollingTree.cpp:

(WebCore::ThreadedScrollingTree::canUpdateLayersOnScrollingThread const):

8:33 PM Changeset in webkit [271636] by commit-queue@webkit.org
  • 12 edits in trunk

Update media state for active speech recognition as it uses audio capture
https://bugs.webkit.org/show_bug.cgi?id=220667

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

Source/WebCore:

To make sure the media capture state is correctly sent to client.

API test: WebKit2.SpeechRecognitionMediaCaptureStateChange

  • Modules/speech/SpeechRecognition.cpp:

(WebCore::SpeechRecognition::startRecognition):
(WebCore::SpeechRecognition::stop):
(WebCore::SpeechRecognition::didStartCapturingAudio):
(WebCore::SpeechRecognition::didStopCapturingAudio):

  • Modules/speech/SpeechRecognition.h:
  • Modules/speech/SpeechRecognitionConnection.h:
  • dom/Document.cpp:

(WebCore::Document::setActiveSpeechRecognition):
(WebCore::Document::updateIsPlayingMedia):

  • dom/Document.h:
  • page/DummySpeechRecognitionProvider.h:

Source/WebKit:

  • WebProcess/WebCoreSupport/WebSpeechRecognitionConnection.cpp:

(WebKit::WebSpeechRecognitionConnection::unregisterClient):

  • WebProcess/WebCoreSupport/WebSpeechRecognitionConnection.h:

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/SpeechRecognition.mm:

(-[SpeechRecognitionUIDelegate _webView:mediaCaptureStateDidChange:]):
(TestWebKitAPI::TEST):
(-[SpeechRecognitionPermissionUIDelegate _webView:requestSpeechRecognitionPermissionForOrigin:decisionHandler:]): Deleted.
(-[SpeechRecognitionPermissionUIDelegate _webView:requestMediaCaptureAuthorization:decisionHandler:]): Deleted.
(-[SpeechRecognitionPermissionUIDelegate _webView:checkUserMediaPermissionForURL:mainFrameURL:frameIdentifier:decisionHandler:]): Deleted.
(-[SpeechRecognitionPermissionUIDelegate webView:createWebViewWithConfiguration:forNavigationAction:windowFeatures:]): Deleted.

6:00 PM Changeset in webkit [271635] by Megan Gardner
  • 6 edits
    2 adds in trunk

Elements in a table are incorrectly selected in JavaScript.
https://bugs.webkit.org/show_bug.cgi?id=220607

Reviewed by Wenson Hsieh.

Source/WebCore:

After the fix for https://bugs.webkit.org/show_bug.cgi?id=130844 in https://trac.webkit.org/changeset/260207/webkit a regression was found for
table cell selections through JavaScript. The previous fix was for an issue in the difference between how PositionIterator and Position calculated
if it was canonical (::isCandidate) in the cases where the renderer was a BR. Instead of only converging isCandidate for BR, this function in PositionIterator
was completely subsumed by just calling the implementation for Position. While there are many similarities, there are important differences, especially in the
table code, therefore PositionIterator::isCandidate is being reinstated, but with the convergence in the BR case only.
Also, moved the check added in http://webkit.org/b/211864 so it will cover cases that were missed due to this code being wrong while that fix was added.

Test: editing/selection/editable-table-cell-selection.html

  • dom/PositionIterator.cpp:

(WebCore::PositionIterator::isCandidate const):

  • editing/InsertParagraphSeparatorCommand.cpp:

(WebCore::InsertParagraphSeparatorCommand::doApply):

LayoutTests:

  • editing/execCommand/null_calc_primitive_value_for_css_property.html:

Added ending tag that was missing and does not affect the issue the test was verifying.

  • editing/inserting/insert-list-in-table-cell-07-expected.txt:

Restored expected text file to original output.

  • editing/selection/editable-table-cell-selection-expected.txt: Added.
  • editing/selection/editable-table-cell-selection.html: Added.
5:47 PM Changeset in webkit [271634] by commit-queue@webkit.org
  • 2 edits in trunk/Tools

REGRESSION(r271506): webkit-patch keyring integration is broken on Linux
https://bugs.webkit.org/show_bug.cgi?id=220736

Patch by Michael Catanzaro <Michael Catanzaro> on 2021-01-19
Reviewed by Jonathan Bedard.

r271506 updated python-keyring to the last version to support python2, but unfortunately
this version seems to be somehow incompatible with python-secretstorage, which is required
for system keyring support on Linux. This bug is fixed in newer versions of python-keyring
that do not support python2, but we still support python2, so we cannot upgrade. I've tested
several versions of python-keyring and found that version 11.1.0 is the most recent version
that supports python2 and works properly on Linux, so let's stick with that until we are
ready to give up on python2.

  • Scripts/libraries/webkitscmpy/webkitscmpy/init.py:
5:37 PM Changeset in webkit [271633] by ysuzuki@apple.com
  • 5 edits in trunk/Source/WTF

[WTF] StringImpl::removeCharacters should be inlined
https://bugs.webkit.org/show_bug.cgi?id=220742

Reviewed by Saam Barati.

removeCharacters is used in WebCore's HTMLInputElement's critical path. And since String relatively has many elements (characters),
non-inlined StringImpl::removeCharacters causes significant number of indirect function calls of findMatch argument since it is
passed function pointer. We should make them templatized function to allow inlining of findMatch function to avoid repeated indirect calls.

  • wtf/text/StringImpl.cpp:

(WTF::StringImpl::removeCharacters): Deleted.

  • wtf/text/StringImpl.h:

(WTF::StringImpl::removeCharactersImpl):
(WTF::StringImpl::removeCharacters):

  • wtf/text/WTFString.cpp:

(WTF::String::removeCharacters const): Deleted.

  • wtf/text/WTFString.h:

(WTF::String::removeCharacters const):

4:49 PM Changeset in webkit [271632] by Alan Coon
  • 1 copy in tags/Safari-611.1.12.1

Tag Safari-611.1.12.1.

4:36 PM Changeset in webkit [271631] by Chris Dumez
  • 2 edits in trunk/Source/WebKit

[Hardening] Protect against overflows in ArgumentCoder<ArrayReference<T, arrayReferenceDynamicExtent>>::decode()
https://bugs.webkit.org/show_bug.cgi?id=220748
<rdar://73323644>

Reviewed by Geoff Garen.

Make sure size and size * sizeof(T) do not overflow.

  • Platform/IPC/ArgumentCoders.h:
4:34 PM Changeset in webkit [271630] by Jonathan Bedard
  • 4 edits in trunk/Tools

[webkitcorepy] Support alternative default pypi url on macOS
https://bugs.webkit.org/show_bug.cgi?id=220744
<rdar://problem/73369338>

Reviewed by Aakash Jain.

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

(_default_pypi_index): Pull default pypi index from pip.conf, if available.
(AutoInstall): Set index based on result of _default_pypi_index.

4:29 PM Changeset in webkit [271629] by Alan Coon
  • 8 edits in branches/safari-611.1.12-branch/Source

Versioning.

WebKit-7611.1.12.1

4:19 PM Changeset in webkit [271628] by Alan Coon
  • 1 copy in branches/safari-611.1.12-branch

New branch.

4:07 PM Changeset in webkit [271627] by Chris Dumez
  • 5 edits in trunk/Source

Source/WebCore/PAL:
[GPUProcess] Claim ownership of IOSurface backing for ImageBufferBackends in the WebProcess
https://bugs.webkit.org/show_bug.cgi?id=220663

Reviewed by Geoffrey Garen.

Declare new IOSurface SPI.

  • pal/spi/cocoa/IOSurfaceSPI.h:

Source/WebKit:
[GPUProcess] Claim ownership of Canvas IOSurface backing in the WebProcess
https://bugs.webkit.org/show_bug.cgi?id=220663

Reviewed by Geoffrey Garen.

Claim ownership of Canvas IOSurface backing in the WebProcess. If we don't do this, all
IOSurface memory gets attributed to the GPUProcess, making it a prime candidate for jetsam.
We need to attribute memory usage to the WebProcesses being served by the GPUProcess as much
as possible and this is a step in this direction.

Note that this patch currently only impacts Canvas IOSurface backing when "DOM Rendering in
GPUProcess" is disabled. When "DOM Rendering in GPUProcess" is enabled, we are not supposed
to use the IOSurface API in the WebProcess at all.

  • WebProcess/GPU/graphics/cocoa/ImageBufferShareableMappedIOSurfaceBackend.cpp:

(WebKit::ImageBufferShareableMappedIOSurfaceBackend::create):

4:04 PM WebKitGTK/2.30.x edited by Michael Catanzaro
(diff)
3:50 PM Changeset in webkit [271626] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebKit

Syscall param sendmsg(msg.msg_iov[1]) points to uninitialised byte(s) in IPC::Connection::sendOutgoingMessage
https://bugs.webkit.org/show_bug.cgi?id=220668

Patch by Michael Catanzaro <Michael Catanzaro> on 2021-01-19
Reviewed by Darin Adler.

We previously discovered that we need to either (a) manually zero the MessageInfo struct
with memcpy (accepted solution), or b) use attribute((packed)) to omit struct packing.
This seemed to fix our valgrind warnings when bmalloc was in use, but not when bmalloc is
disabled, as is good practice when valgrinding.

Turns out we need to zero (or pack) the AttachmentInfo struct as well. Let's go with zeroing
it, since all its members are trivially copyable, so that's safe to do.

For good measure, we'll implement a copy constructor and do so there as well. Do this for
MessageInfo too, to round out the original fix to MessageInfo.

Since AttachmentInfo and MessageInfo are no longer trivially-copyable, we now need to cast
them to void* when using memcpy in order to avoid -Wclass-memaccess warnings from GCC.

  • Platform/IPC/unix/ConnectionUnix.cpp:

(IPC::AttachmentInfo::AttachmentInfo):
(): Deleted.

  • Platform/IPC/unix/UnixMessage.h:

(IPC::MessageInfo::MessageInfo):
(IPC::UnixMessage::UnixMessage):

3:38 PM Changeset in webkit [271625] by Russell Epstein
  • 1 delete in branches/safari-612.1-branch

Delete branch.

3:27 PM Changeset in webkit [271624] by ysuzuki@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed, fix GCC warnings
https://bugs.webkit.org/show_bug.cgi?id=220718

  • dfg/DFGOperations.cpp:

(JSC::DFG::tierUpCommon):

3:23 PM Changeset in webkit [271623] by Russell Epstein
  • 8 edits in branches/safari-612.1-branch/Source

Versioning.

WebKit-7612.1.1

3:21 PM Changeset in webkit [271622] by Russell Epstein
  • 1 copy in branches/safari-612.1-branch

New branch.

3:07 PM Changeset in webkit [271621] by Russell Epstein
  • 8 edits in branches/safari-611-branch/Source

Revert "Versioning."

This reverts commit r271556.

2:55 PM Changeset in webkit [271620] by Patrick Angle
  • 5 edits in trunk/Source

Web Inspector: Font Details sidebar - Fractional variation axis ranges/default values are rounded.
https://bugs.webkit.org/show_bug.cgi?id=220474

Reviewed by BJ Burg.

Source/WebCore:

Use float instead of int for variation axis range and defaults, as these values can be fractional.

  • platform/graphics/FontPlatformData.h:

(WebCore::FontPlatformData::FontVariationAxis::FontVariationAxis):
(WebCore::FontPlatformData::FontVariationAxis::defaultValue const):
(WebCore::FontPlatformData::FontVariationAxis::minimumValue const):
(WebCore::FontPlatformData::FontVariationAxis::maximumValue const):

Source/WebInspectorUI:

Fixes Font Details sidebar display of variation axis values, ranges, and defaults to show fractional precision
when such precision is present.

  • Localizations/en.lproj/localizedStrings.js:
  • UserInterface/Views/FontDetailsPanel.js:

(WI.FontDetailsPanel.prototype.refresh):
(WI.FontDetailsPanel.prototype._formatSimpleSingleValue):
(WI.FontDetailsPanel.prototype._formatVariationValue):
(WI.FontDetailsPanel.prototype._createVariationValueElement):
(WI.FontDetailsPanel.prototype._formatAxisValueAsString):

  • Show fractional values with between 0 and 2 decimal places.
2:40 PM Changeset in webkit [271619] by commit-queue@webkit.org
  • 5 edits in trunk/Source

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:
2:15 PM Changeset in webkit [271618] by svillar@igalia.com
  • 3 edits
    2 adds in trunk

REGRESSION(r266695) Range control with custom track width sized incorrectly
https://bugs.webkit.org/show_bug.cgi?id=220608

Reviewed by Zalan Bujtas.

Source/WebCore:

Test: fast/forms/range/input-range-sizing-fixed-size.html

In r266695 we modified the way min-{width|height}: auto was computed for flexbox elements. That broke the sizing
of input range controls that were working under the assumption that min-{width|height} was 0. We have to force it
in the UA CSS in order to keep the same behaviour.

  • css/html.css:

(input[type="range"]::-webkit-slider-container, input[type="range"]::-webkit-media-slider-container): force
min-width: 0.

LayoutTests:

New test case to verify that input range controls are sized correctly with specified widths.

  • fast/forms/range/input-range-sizing-fixed-size-expected.html: Added.
  • fast/forms/range/input-range-sizing-fixed-size.html: Added.
2:11 PM Changeset in webkit [271617] by Jonathan Bedard
  • 2 edits in trunk/Tools

[commit-queue] Cache credentials for https instead of http
https://bugs.webkit.org/show_bug.cgi?id=220746
<rdar://problem/73369984>

Reviewed by Aakash Jain.

  • EWSTools/configure-svn-auth.sh:
1:48 PM Changeset in webkit [271616] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC][RenderTreeDump] Match empty RenderInline geometry
https://bugs.webkit.org/show_bug.cgi?id=220721

Reviewed by Antti Koivisto.

Let's match legacy line layout's RenderInline behavior and report 0 height when the inline box is "empty".
It helps to reduce noise for enabling LFC's inline-box support (see webkit.org/b/220148).
(Note that this is no-op on trunk at this point.)

  • rendering/RenderTreeAsText.cpp:

(WebCore::RenderTreeAsText::writeRenderObject):

1:43 PM Changeset in webkit [271615] by Devin Rousso
  • 4 edits
    2 adds in trunk

Payment Request API - PaymentDetailsUpdate requires "total"
https://bugs.webkit.org/show_bug.cgi?id=220561
<rdar://problem/73204405>

Reviewed by Andy Estes.

Source/WebCore:

Test: http/tests/paymentrequest/updateWith-error.https.html

  • Modules/paymentrequest/PaymentDetailsUpdate.h:
  • Modules/paymentrequest/PaymentRequest.cpp:

(WebCore::PaymentRequest::settleDetailsPromise):
Use Optional for total so that it's possible to know when it's provided or not.
Only attempt to parse the total when it's provided.

LayoutTests:

  • http/tests/paymentrequest/updateWith-error.https.html: Added.
  • http/tests/paymentrequest/updateWith-error.https-expected.txt: Added.
1:38 PM Changeset in webkit [271614] by commit-queue@webkit.org
  • 2 edits in trunk/Tools

Unreviewed, reverting r271606.
https://bugs.webkit.org/show_bug.cgi?id=220747

Didn't work properly

Reverted changeset:

"[update-webkit] Do not automatically use git svn rebase"
https://bugs.webkit.org/show_bug.cgi?id=220739
https://trac.webkit.org/changeset/271606

1:27 PM Changeset in webkit [271613] by jiewen_tan@apple.com
  • 5 edits in trunk/Source/WebKit

[WebAuthn] Polish the new WebAuthn UI
https://bugs.webkit.org/show_bug.cgi?id=220617
<rdar://problem/73185470>

Reviewed by Brent Fulgham.

This patch does the following few things:

  1. It updates the way how the PIN error for security keys is handled.
  2. It uses the credential name to identify a credential that passed to the UI instead of the login choice object

as it turns out that the UI won't return the same object at all.

  1. It delays to show the UI if the platform authenticator is involved given the platform authenticator might not contain

the requested credentials. If not, we should either show an error or just requesting the security key ones.

Covered by manual tests.

  • Platform/spi/Cocoa/AuthenticationServicesCoreSPI.h:

(NS_ERROR_ENUM):

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

(WebKit::AuthenticatorPresenterCoordinator::AuthenticatorPresenterCoordinator):
(WebKit::AuthenticatorPresenterCoordinator::updatePresenter):
(WebKit::AuthenticatorPresenterCoordinator::selectAssertionResponse):
(WebKit::AuthenticatorPresenterCoordinator::didSelectAssertionResponse):

  • UIProcess/WebAuthentication/Cocoa/WKASCAuthorizationPresenterDelegate.mm:

(-[WKASCAuthorizationPresenterDelegate authorizationPresenter:credentialRequestedForLoginChoice:authenticatedContext:completionHandler:]):

1:26 PM Changeset in webkit [271612] by Patrick Angle
  • 3 edits in trunk/Source/WebInspectorUI

Web Inspector: Historical Figures string should be Alternate Glyphs
https://bugs.webkit.org/show_bug.cgi?id=220731

Reviewed by BJ Burg.

Changed title for CSS property font-variant-alternates to be Alternate Glyphs.

  • Localizations/en.lproj/localizedStrings.js:
  • UserInterface/Views/FontDetailsPanel.js:

(WI.FontDetailsPanel.prototype.initialLayout):

1:25 PM Changeset in webkit [271611] by youenn@apple.com
  • 2 edits in trunk/LayoutTests/imported/w3c

[ 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):

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

[WPE][GTK] Remove unnecessary child setup function from process launcher
https://bugs.webkit.org/show_bug.cgi?id=220090

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

The process launcher currently uses a child setup function to close the server end of its
IPC socket. But this is totally unnecessary because this socket always uses CLOEXEC. So the
child setup function is redundant.

This is step one towards making Eclipse not crash when its UI process JVM is using a huge
amount of memory. In such conditions, fork() will fail due to OOM, but posix_spawn() will
still succeed. A child setup function forces GLib to use fork() instead of posix_spawn().
However, this commit is not sufficient to fix Eclipse, because GSubprocess itself sets its
own child setup function.

  • UIProcess/Launcher/glib/ProcessLauncherGLib.cpp:

(WebKit::ProcessLauncher::launchProcess):
(WebKit::childSetupFunction): Deleted.

1:18 PM Changeset in webkit [271609] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebCore

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):

1:12 PM Changeset in webkit [271608] by Lauro Moura
  • 6 edits in trunk

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.
1:09 PM Changeset in webkit [271607] by Keith Rollin
  • 10 edits
    1 copy
    5 adds in trunk/Source

Modularize WebKitLegacy.framework
https://bugs.webkit.org/show_bug.cgi?id=220026
<rdar://57173237>

Reviewed by Darin Adler.

Add .modulemap files to WebKitLegacy to help speed up client builds.

Source/WebKit:

For MigrateHeadersFromWebKitLegacy.make, remove the newly-created
umbrella header files from WEBKIT_LEGACY_PRIVATE_HEADERS in order to
avoid some processing that the non-umbrella headers receive.

  • mac/MigrateHeadersFromWebKitLegacy.make:

Source/WebKitLegacy:

  • Modules/WebKitLegacy_iOS.private.modulemap: Added.
  • Modules/WebKitLegacy_macOS.private.modulemap: Added.
  • WebKitLegacy.xcodeproj/project.pbxproj:

Source/WebKitLegacy/ios:

For WebUIKitDelegate.h, ensure that ENABLE_ORIENTATION_EVENTS is
defined before checking its value, thereby avoiding a compiler
warning-turned-error that an uninitialized symbol is being used.

  • WebView/WebUIKitDelegate.h:

Source/WebKitLegacy/mac:

In WebKitLegacy.xcconfig, enable module creation for macOS and iOS.
Add the associated umbrella header files, and enable the validation of
the module files.

For WebHTMLViewPrivate.h, ensure that ENABLE_NETSCAPE_PLUGIN_API is
defined before checking its value, thereby avoiding a compiler
warning-turned-error that an uninitialized symbol is being used.

For WebBackForwardListPrivate.h, make the parameter name in a function
comment match the actual parameter name, thereby avoiding a
warning-turned-error from the tool that processes headers into built
modules.

  • Configurations/WebKitLegacy.xcconfig:
  • History/WebBackForwardListPrivate.h:
  • Misc/WebKitLegacy_Private.h: Added.
  • Misc/WebKitLegacy_iOS_Private.h: Added.
  • Misc/WebKitLegacy_macOS_Private.h: Copied from Source/WebKitLegacy/mac/History/WebBackForwardListPrivate.h.
  • WebView/WebHTMLViewPrivate.h:
11:44 AM Changeset in webkit [271606] by Jonathan Bedard
  • 2 edits in trunk/Tools

[update-webkit] Do not automatically use git svn rebase
https://bugs.webkit.org/show_bug.cgi?id=220739
<rdar://problem/73365632>

Rubber-stamped by Aakash Jain.

git svn rebase is an expensive operation, it is also usually the wrong operation
when your git checkout is already being automatically populated from Subversion

  • Scripts/webkitdirs.pm:

(runGitUpdate): Replace git svn rebase with git svn fetch.

11:43 AM Changeset in webkit [271605] by Russell Epstein
  • 1 copy in tags/Safari-611.1.11.1

Tag Safari-611.1.11.1.

11:35 AM Changeset in webkit [271604] by Russell Epstein
  • 8 edits in branches/safari-611.1.11-branch/Source

Versioning.

WebKit-7611.1.11.1

11:10 AM Changeset in webkit [271603] by Russell Epstein
  • 1 copy in branches/safari-611.1.11-branch

New branch.

10:46 AM Changeset in webkit [271602] by Jonathan Bedard
  • 2 edits in trunk/Tools

[webkitpy] Support generating patch with main as the default branch
https://bugs.webkit.org/show_bug.cgi?id=220737
<rdar://problem/73362104>

Reviewed by Dewei Zhu.

  • Scripts/webkitpy/common/checkout/scm/git.py:

(Git.remote_branch_ref): Support

9:11 AM Changeset in webkit [271601] by Chris Dumez
  • 2 edits in trunk/Source/WebKit

Unreviewed, drop remaining main-thread assertion in ShareableBitmap that I missed in r271533.

This assertion is hitting on the debug GPUProcess bot. SharedBitmap subclasses ThreadSafeRefCounted
as of r271533 and it is expected that it is used from non-main threads.

  • Shared/cg/ShareableBitmapCG.cpp:

(WebKit::ShareableBitmap::createGraphicsContext):

6:35 AM Changeset in webkit [271600] by Jonathan Bedard
  • 2 edits in trunk/Tools

[GitHub] Use github.com as the source of truth for EWS
https://bugs.webkit.org/show_bug.cgi?id=220479
<rdar://problem/72941463>

Reviewed by Aakash Jain.

  • CISupport/ews-build/steps.py:

(CheckOutSource.init): Use GitHub.com instead of git.webkit.org.

3:38 AM Changeset in webkit [271599] by Adrian Perez de Castro
  • 7 edits in trunk/Source

Non-unified build fixes, mid January 2021 edition
https://bugs.webkit.org/show_bug.cgi?id=220725

Unreviewed non-unified build fixes.

Source/JavaScriptCore:

  • runtime/JSObject.cpp:

(JSC::JSObject::getNonReifiedStaticPropertyNames): Remove inline function from here,
as it is used in JSPropertyNameEnumerator.cpp and the compiler needs to see the function
body to be able to inline it, otherwise linking fails.

  • runtime/JSObjectInlines.h:

(JSC::JSObject::getNonReifiedStaticPropertyNames): Moved inline function here.

  • wasm/WasmInstance.cpp: Add missing JSWebAssemblyHelpers.h header.
  • wasm/js/WebAssemblyModuleRecord.cpp: Add missing ObjectConstructor.h header.

Source/WebCore:

No new tests needed.

  • rendering/RenderLayerScrollableArea.cpp: Add missing header includes.
3:02 AM Changeset in webkit [271598] by Nikolas Zimmermann
  • 11 edits in trunk/Source

Continue removing glue code from RenderLayer that was recently added in r271559
https://bugs.webkit.org/show_bug.cgi?id=220715

Reviewed by Adrian Perez de Castro.

Follow-up on patch adressing the removal of the glue code that
forwards calls from RenderLayer to RenderLayerScrollableArea (see
webkit.org/b/60305).

Covered by existing tests.

Source/WebCore:

  • page/SpatialNavigation.cpp:

(WebCore::scrollInDirection):

  • rendering/RenderBox.cpp:

(WebCore::setupWheelEventMonitor):
(WebCore::RenderBox::setScrollLeft):
(WebCore::RenderBox::setScrollTop):
(WebCore::RenderBox::setScrollPosition):

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::currentScrollType const): Deleted.
(WebCore::RenderLayer::scrollAnimator const): Deleted.
(WebCore::RenderLayer::scrollToXPosition): Deleted.
(WebCore::RenderLayer::scrollToYPosition): Deleted.
(WebCore::RenderLayer::setScrollPosition): Deleted.
(WebCore::RenderLayer::scrollByRecursively): Deleted.
(WebCore::RenderLayer::setRequiresScrollPositionReconciliation): Deleted.
(WebCore::RenderLayer::hasScrollableOrRubberbandableAncestor): Deleted.
(WebCore::RenderLayer::reachableTotalContentsSize const): Deleted.
(WebCore::RenderLayer::horizontalScrollbarHiddenByStyle const): Deleted.
(WebCore::RenderLayer::verticalScrollbarHiddenByStyle const): Deleted.

  • rendering/RenderLayer.h:
  • rendering/RenderLayerBacking.cpp:

(WebCore::RenderLayerBacking::updateScrollOffset):

  • rendering/RenderLayerCompositor.cpp:

(WebCore::LegacyWebKitScrollingLayerCoordinator::updateScrollingLayer):

  • rendering/RenderLayerScrollableArea.cpp:

(WebCore::RenderLayerScrollableArea::scrollByRecursively):

  • rendering/RenderListBox.cpp:

(WebCore::RenderListBox::hasScrollableOrRubberbandableAncestor):

Source/WebKitLegacy/win:

  • WebView.cpp:

(WebView::gesture):

1:07 AM Changeset in webkit [271597] by commit-queue@webkit.org
  • 3 edits
    3 adds in trunk

Null check ResourceRequest IPC decode
https://bugs.webkit.org/show_bug.cgi?id=220400

Patch by Rob Buis <rbuis@igalia.com> on 2021-01-19
Reviewed by Youenn Fablet.

Source/WebKit:

Null check ResourceRequest IPC decode since
the IPC::decode call can succeed yet but set
the dictionary to null.

Test: ipc/web-authenticator-get-assertion.html

  • Shared/mac/WebCoreArgumentCodersMac.mm:

(IPC::ArgumentCoder<WebCore::ResourceRequest>::decodePlatformData):

LayoutTests:

Add test for this.

  • ipc/web-authenticator-get-assertion-expected.txt: Added.
  • ipc/web-authenticator-get-assertion.html: Added.

Jan 18, 2021:

8:59 PM Changeset in webkit [271596] by ysuzuki@apple.com
  • 3 edits
    1 add in trunk

[JSC] FTL::prepareOSREntry can clear OSR entry CodeBlock if it is already invalidated
https://bugs.webkit.org/show_bug.cgi?id=220718
<rdar://problem/70527068>

Reviewed by Mark Lam.

JSTests:

  • stress/ftl-osr-failure-clear-twice.js: Added.

(foo):

Source/JavaScriptCore:

FTL::prepareOSREntry can clear OSR entry CodeBlock if it is already invalidated. However, the caller is not assuming that,
and it calls clearOSREntryBlockAndResetThresholds again. And clearOSREntryBlockAndResetThresholds's assertion hit.
This patch correctly handles the invalidated case.

  • dfg/DFGOperations.cpp:

(JSC::DFG::tierUpCommon):

8:28 PM Changeset in webkit [271595] by Lauro Moura
  • 4 edits in trunk/LayoutTests

[GLIB] Gardening some failures and crashes

Unreviewed test gardening.

  • platform/glib/TestExpectations:
  • platform/gtk/TestExpectations:
  • platform/wpe/TestExpectations:
4:24 PM Changeset in webkit [271594] by commit-queue@webkit.org
  • 28 edits
    5 moves in trunk/Source/JavaScriptCore

[JSC] Implement a B3::Compilation replacement for wasm-llint
https://bugs.webkit.org/show_bug.cgi?id=220585

Patch by Xan López <Xan Lopez> on 2021-01-18
Reviewed by Yusuke Suzuki.

Move B3Compilation, B3OpaqueByproducts and B3OpaqueByproduct to
jit/. They are used by non-B3 code and they are not really B3
specific. Also rename B3CompilationPtrTag to JITCompilationPtrTag.

  • CMakeLists.txt: add new source files.
  • JavaScriptCore.xcodeproj/project.pbxproj: ditto.
  • Sources.txt: ditto.
  • b3/B3Compile.cpp:

(JSC::B3::compile): use JITCompilationPtrTag.

  • b3/B3Compile.h: change includes.
  • b3/B3DataSection.h: ditto.
  • b3/B3Procedure.cpp: ditto.
  • b3/B3Procedure.h: ditto.
  • b3/air/testair.cpp: use JITCompilationPtrTag.
  • b3/testb3.h: change includes.

(invoke):

  • b3/testb3_6.cpp:

(testInterpreter): use JITCompilationPtrTag.
(testEntrySwitchSimple): ditto.
(testEntrySwitchNoEntrySwitch): ditto.
(testEntrySwitchWithCommonPaths): ditto.
(testEntrySwitchWithCommonPathsAndNonTrivialEntrypoint): ditto.
(testEntrySwitchLoop): ditto.

  • ftl/FTLJITCode.h: use JSC::OpaqueByproducts.
  • ftl/FTLOutput.h: change includes.
  • jit/JITCompilation.cpp: Renamed from Source/JavaScriptCore/b3/B3Compilation.cpp.

(JSC::Compilation::Compilation):

  • jit/JITCompilation.h: Renamed from Source/JavaScriptCore/b3/B3Compilation.h.

(JSC::Compilation::code const):
(JSC::Compilation::codeRef const):

  • jit/JITOpaqueByproduct.h: Renamed from Source/JavaScriptCore/b3/B3OpaqueByproduct.h.
  • jit/JITOpaqueByproducts.cpp: Renamed from Source/JavaScriptCore/b3/B3OpaqueByproducts.cpp.
  • jit/JITOpaqueByproducts.h: Renamed from Source/JavaScriptCore/b3/B3OpaqueByproducts.h.
  • runtime/JSCPtrTag.h: rename B3CompilationPtrTag to JITCompilationPtrTag.
  • wasm/WasmB3IRGenerator.h: use JSC::OpaqueByproducts.
  • wasm/WasmBBQPlan.cpp: use JSC::Compilation.

(JSC::Wasm::BBQPlan::work):
(JSC::Wasm::BBQPlan::didCompleteCompilation):

  • wasm/WasmBinding.h: change includes.
  • wasm/WasmCallee.h: ditto.
  • wasm/WasmFormat.h: use JSC::Compilation.
  • wasm/WasmLLIntPlan.cpp: ditto.

(JSC::Wasm::LLIntPlan::didCompleteCompilation):

  • wasm/WasmLLIntPlan.h: use JITCompilationPtrTag.
  • wasm/WasmModule.h: ditto.
  • wasm/WasmOMGForOSREntryPlan.cpp: use JSC::Compilation.

(JSC::Wasm::OMGForOSREntryPlan::work):

  • wasm/WasmOMGPlan.cpp: ditto.

(JSC::Wasm::OMGPlan::work):

  • wasm/WasmParser.h: change includes.
  • wasm/js/WasmToJS.h: ditto.
4:14 PM Changeset in webkit [271593] by Fujii Hironori
  • 5 edits in trunk

[Win][DumpRenderTree] ASSERT(!m_channel) failed in WebSocket::contextDestroyed
https://bugs.webkit.org/show_bug.cgi?id=220450

Reviewed by Per Arne Vollan.

Tools:

WebSocket::failAsynchronously() posts a deferred task calling
WebSocket::stop() by using callOnMainThread, but the task was not
executed soon because DumpRenderTree stopped running the run loop
after finishing the test.

DumpRenderTree's run loop should dispatch all deferred tasks
before finishing the current test. Deffer setting the variable
'done' by posting a application message.

  • DumpRenderTree/win/DumpRenderTree.cpp: Define a application message WM_DRT_TEST_DONE.

(DumpRenderTreeWndProc): Set 'done' in the case of WM_DRT_TEST_DONE.
(dump): Post WM_DRT_TEST_DONE.

LayoutTests:

  • platform/win/TestExpectations: Marked fast/events/currentTarget-gc-crash.html.
  • platform/wincairo-wk1/TestExpectations: Ditto.
4:07 PM Changeset in webkit [271592] by ysuzuki@apple.com
  • 4 edits
    2 adds in trunk

[JSC] earlyReturnFromInfiniteLoopsLimit should check all caller functions when emitting
https://bugs.webkit.org/show_bug.cgi?id=220700
<rdar://problem/71229150>

Reviewed by Mark Lam.

JSTests:

  • stress/early-return-from-builtin.js: Added.

(let.o.get value):
(let.iter.Symbol.iterator):

  • stress/early-return-from-builtin2.js: Added.

(foo):

Source/JavaScriptCore:

earlyReturnFromInfiniteLoopsLimit does not return when the function is builtin. But this does not consider about the case that
the caller is inlining and the caller is builtin. Since this returns from entire DFG / FTL functions, we should check any of
callers are not builtin functions too.

  • dfg/DFGSpeculativeJIT64.cpp:

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

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileLoopHint):

4:06 PM Changeset in webkit [271591] by ysuzuki@apple.com
  • 1 edit
    1 add in trunk/JSTests

[JSC] Add another tests for r271571 part 2
https://bugs.webkit.org/show_bug.cgi?id=220702
<rdar://problem/71365255>

Reviewed by Mark Lam.

This patch adds yet another test for r271571.

  • stress/ftl-osr-entry-order-reverse3.js: Added.

(foo.bar):
(foo):

4:04 PM Changeset in webkit [271590] by ysuzuki@apple.com
  • 1 edit
    1 add in trunk/JSTests

[JSC] Add another tests for r271571
https://bugs.webkit.org/show_bug.cgi?id=220701
<rdar://problem/72464341>

Reviewed by Mark Lam.

This patch adds another test for r271571 "[JSC] FTL OSR entry FlushFormat array is reversed".

  • stress/ftl-osr-entry-order-reverse2.js: Added.

(foo):

4:03 PM Changeset in webkit [271589] by Andres Gonzalez
  • 2 edits in trunk/Source/WebCore

Apple Mail AX, VoiceOver: When composing a new email message, moving VO focus to the message body field does not bring keyboard focus along.
https://bugs.webkit.org/show_bug.cgi?id=220672
<rdar://problem/73045466>

Reviewed by Darin Adler.

The call to AccessibilityObject::setFocused to set the focus to the
scroll view needs to happen before the check for canSetFocusAttribute.

  • accessibility/AccessibilityRenderObject.cpp:

(WebCore::AccessibilityRenderObject::setFocused):

4:00 PM Changeset in webkit [271588] by ysuzuki@apple.com
  • 1 edit
    1 add in trunk/JSTests

[JSC] Add another tests for r271571 part 3
https://bugs.webkit.org/show_bug.cgi?id=220703
<rdar://problem/71224976>

Reviewed by Mark Lam.

This patch adds yet another test for r271571.

  • stress/ftl-osr-entry-order-reverse4.js: Added.

(foo):

3:54 PM Changeset in webkit [271587] by Andres Gonzalez
  • 9 edits
    1 delete in trunk

Fix for LayoutTests/accessibility/canvas-fallback-content.html in isolated tree mode.
https://bugs.webkit.org/show_bug.cgi?id=220644

Reviewed by Chris Fleizach.

Source/WebCore:

Tests:
accessibility/canvas-fallback-content.html
accessibility/canvas-fallback-content-2.html

  • Updates the accessibility isolated tree when the ARIA role attribute

changes for a DOM element.

  • Modified tests to use Promises and retrieve accessible elements by IDs

so that they work in both isolated tree mode on and off.

  • accessibility/AXLogger.cpp:

(WebCore::operator<<): Added new value to the AXNotification enum.

  • accessibility/AXObjectCache.cpp:

(WebCore::AXObjectCache::handleAriaRoleChanged):
Updates the isolated tree when an ARIA role attribute changes.
(WebCore::AXObjectCache::updateIsolatedTree):
Handles the AXAriaRoleChanged notification.

  • accessibility/AXObjectCache.h:

LayoutTests:

  • accessibility/canvas-fallback-content-2-expected.txt:

Removed the checks for the document.activeElement since the goal here is
not to test this method.

  • accessibility/canvas-fallback-content-2.html:

Retrieved the accessibility Objects by ID directly from the accessibilityController.
This simplifies the code since it is not necessary to set focus to the
object via the document, to then retrieve the focused accessibility element.
This works for isolated tree mode on and off.

  • accessibility/canvas-fallback-content.html:

Kept the focus manipulations but used Promises to make it work in both
isolated mode on and off.

  • platform/win/accessibility/canvas-fallback-content-expected.txt: Deleted.
  • platform/win/TestExpectations: Skip since this test was already failing in win.
1:49 PM Changeset in webkit [271586] by mark.lam@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

[AppleWin 32bit] LLInt C Loop: LowLevelInterpreter.cpp(90,7): error C2653: 'WebConfig': is not a class or namespace name
https://bugs.webkit.org/show_bug.cgi?id=220405

Reviewed by Fujii Hironori.

Add a missing #if ENABLE(UNIFIED_AND_FREEZABLE_CONFIG_RECORD).

  • llint/LowLevelInterpreter.cpp:
1:11 PM Changeset in webkit [271585] by Nikolas Zimmermann
  • 9 edits in trunk/Source

Remove recently added glue code: RenderLayer::(setAdjustForIOSCaretWhenScrolling / setScrollShouldClearLatchedState / setConstrainsScrollingToContentEdge)
https://bugs.webkit.org/show_bug.cgi?id=220708

Reviewed by Adrian Perez de Castro.

Follow-up on patch adressing the removal of the glue code that
forwards calls from RenderLayer to RenderLayerScrollableArea (see
webkit.org/b/60305).

Covered by existing tests.

Source/WebCore:

  • dom/Element.cpp:

(WebCore::Element::setScrollLeft):
(WebCore::Element::setScrollTop):

  • editing/FrameSelection.cpp:

(WebCore::FrameSelection::revealSelection):

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::scroll):
(WebCore::RenderLayer::setAdjustForIOSCaretWhenScrolling): Deleted.
(WebCore::RenderLayer::setScrollShouldClearLatchedState): Deleted.
(WebCore::RenderLayer::setConstrainsScrollingToContentEdge): Deleted.

  • rendering/RenderLayer.h:
  • rendering/RenderMarquee.cpp:

(WebCore::RenderMarquee::RenderMarquee):

Source/WebKitLegacy/mac:

  • DOM/DOMHTML.mm:

(-[DOMHTMLElement setScrollXOffset:scrollYOffset:adjustForIOSCaret:]):

  • WebView/WebFrame.mm:

(-[WebFrame _scrollDOMRangeToVisible:]):
(-[WebFrame _scrollDOMRangeToVisible:withInset:]):

12:26 PM Changeset in webkit [271584] by Antti Koivisto
  • 12 edits in trunk/Source/WebCore

Optimize :hover/:active style invalidation for deep trees and descendant selectors
https://bugs.webkit.org/show_bug.cgi?id=220711

Reviewed by Zalan Bujtas.

Hover and active states are flipped for the entire ancestor chain. We compute invalidation for each flipped
element separately. If the selectors are of form ':active .descendant' then each of these invalidations needs
to traverse the whole subtree, leading to O(n2) behavior.

We really only need to traverse the descendants once, starting from the element closest to the root that changes state.

  • dom/Document.cpp:

(WebCore::Document::updateHoverActiveState):

Compute the change root and pass the information to setActive/Hover.
Reorganize the function a bit to allow this, and for general readability.

  • dom/Element.cpp:

(WebCore::Element::setActive):
(WebCore::Element::setHovered):

  • dom/Element.h:
  • html/HTMLAnchorElement.cpp:

(WebCore::HTMLAnchorElement::setActive):

  • html/HTMLAnchorElement.h:
  • html/HTMLLabelElement.cpp:

(WebCore::HTMLLabelElement::setActive):
(WebCore::HTMLLabelElement::setHovered):

  • html/HTMLLabelElement.h:
  • html/shadow/SpinButtonElement.cpp:

(WebCore::SpinButtonElement::setHovered):

  • html/shadow/SpinButtonElement.h:
  • style/PseudoClassChangeInvalidation.cpp:

(WebCore::Style::PseudoClassChangeInvalidation::computeInvalidation):

Only include descendant traversing rulesets for the change root.

  • style/PseudoClassChangeInvalidation.h:

(WebCore::Style::PseudoClassChangeInvalidation::PseudoClassChangeInvalidation):

12:13 PM Changeset in webkit [271583] by Fujii Hironori
  • 4 edits
    2 adds in trunk

createImageBitmap() causes null pointer dereference using Cairo lib
https://bugs.webkit.org/show_bug.cgi?id=220584

Reviewed by Carlos Garcia Campos.

Source/WebCore:

createImageBitmap(ImageData) creates an internal ImageBuffer with
the same size of the given ImageData. Cairo port has the
limitation to maximum width/height of ImageBuffer as 32768. It
fails to create the internal ImageBuffer if the ImageData size is
greater than 32768. Added a null-checking for the case.

Test: fast/images/createImageBitmap-with-ImageData.html

  • html/ImageBitmap.cpp:

(WebCore::ImageBitmap::createPromise): Added a null-checking for
tempBitmapData. Call resolveWithBlankImageBuffer in the case.

  • platform/graphics/cairo/ImageBufferCairoImageSurfaceBackend.cpp:

(WebCore::ImageBufferCairoImageSurfaceBackend::create): Check the
cairo_surface_status of 'surface' to avoid the assertion failure
in ImageBufferCairoImageSurfaceBackend ctor.

LayoutTests:

  • fast/images/createImageBitmap-with-ImageData-expected.txt: Added.
  • fast/images/createImageBitmap-with-ImageData.html: Added.
11:41 AM Changeset in webkit [271582] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC][Integration] Disable inline boxes with outline
https://bugs.webkit.org/show_bug.cgi?id=220698

Reviewed by Antti Koivisto.

  • layout/integration/LayoutIntegrationCoverage.cpp:

(WebCore::LayoutIntegration::canUseForChild):

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

[LFC][Integration] Disable inflow positioned inline boxes
https://bugs.webkit.org/show_bug.cgi?id=220696

Reviewed by Antti Koivisto.

  • layout/integration/LayoutIntegrationCoverage.cpp:

(WebCore::LayoutIntegration::canUseForChild):

8:09 AM WebKitGTK/2.30.x edited by Michael Catanzaro
(diff)
7:56 AM Changeset in webkit [271580] by commit-queue@webkit.org
  • 4 edits in trunk/Source

[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:
5:16 AM Changeset in webkit [271579] by youenn@apple.com
  • 2 edits in trunk/LayoutTests

[ Mac WK1 ] REGRESSION (r239145) Layout Test http/wpt/mediarecorder/MediaRecorder-dataavailable.html is flaky text diff failure
https://bugs.webkit.org/show_bug.cgi?id=194779
<rdar://problem/48166474>

Tests are no longer flaky no webkit bots.
Unreviewed.

  • platform/ios/TestExpectations:
3:24 AM Changeset in webkit [271578] by Lauro Moura
  • 5 edits in trunk/Tools

[WPE] Fix WPEQt tests after r271514
https://bugs.webkit.org/show_bug.cgi?id=220681

Reviewed by Carlos Garcia Campos.

Setting the title became async, so we must wait for it to be
processed.

  • TestWebKitAPI/Tests/WPEQt/TestLoad.cpp:

(TestLoad::main):

  • TestWebKitAPI/Tests/WPEQt/TestLoadHtml.cpp:

(TestLoadHtml::main):

  • TestWebKitAPI/Tests/WPEQt/TestLoadRequest.cpp:

(TestLoadRequest::main):

  • TestWebKitAPI/Tests/WPEQt/TestRunJavaScript.cpp:

(TestRunJavaScript::main):

2:29 AM Changeset in webkit [271577] by Nikolas Zimmermann
  • 7 edits in trunk/Source

Remove recently added glue code: RenderLayer::(scrollToOffset / scrollToXOffset / scrollToYOffset)
https://bugs.webkit.org/show_bug.cgi?id=220705

Reviewed by Adrian Perez de Castro.

Follow-up on patch adressing the removal of the glue code that
forwards calls from RenderLayer to RenderLayerScrollableArea (see
webkit.org/b/60305).

Covered by existing tests.

Source/WebCore:

  • accessibility/AccessibilityRenderObject.cpp:

(WebCore::AccessibilityRenderObject::scrollTo const):

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::scrollToOffset): Deleted.

  • rendering/RenderLayer.h:

(WebCore::RenderLayer::scrollToXOffset): Deleted.
(WebCore::RenderLayer::scrollToYOffset): Deleted.

  • rendering/RenderMarquee.cpp:

(WebCore::RenderMarquee::start):
(WebCore::RenderMarquee::timerFired):

Source/WebKitLegacy/mac:

  • DOM/DOMHTML.mm:

(-[DOMHTMLElement setScrollXOffset:scrollYOffset:adjustForIOSCaret:]):

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

[WPE][GTK] Mark that the AminatedBackingStoreClient has changed only when layer requires it
https://bugs.webkit.org/show_bug.cgi?id=220590

Reviewed by Philippe Normand.

Mark AnimatedBackingStoreClient instance as changed when it really has changed. When the layer
doesn't require a client, make it nullptr and don't modify it anymore.

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

(WebCore::CoordinatedGraphicsLayer::flushCompositingStateForThisLayerOnly):

12:40 AM Changeset in webkit [271575] by youenn@apple.com
  • 9 edits in trunk

WebRTC live Opus audio stream stutters
https://bugs.webkit.org/show_bug.cgi?id=220599
<rdar://problem/73190139>

Reviewed by Darin Adler.

Source/WebCore:

Before the patch, the MediaStreamTrack was owning its audio source provider.
Two MediaStreamAudioSourceNode reading the same track would read on the same provider buffer.
Instead, create a provider for each node.

Covered by updated test.

  • Modules/mediastream/MediaStreamTrack.cpp:

(WebCore::MediaStreamTrack::createAudioSourceProvider):

  • Modules/mediastream/MediaStreamTrack.h:
  • Modules/webaudio/MediaStreamAudioSourceNode.cpp:

(WebCore::MediaStreamAudioSourceNode::create):
(WebCore::MediaStreamAudioSourceNode::MediaStreamAudioSourceNode):
(WebCore::MediaStreamAudioSourceNode::~MediaStreamAudioSourceNode):
(WebCore::MediaStreamAudioSourceNode::provideInput):

  • Modules/webaudio/MediaStreamAudioSourceNode.h:
  • platform/mediastream/MediaStreamTrackPrivate.cpp:

(WebCore::MediaStreamTrackPrivate::createAudioSourceProvider):

  • platform/mediastream/MediaStreamTrackPrivate.h:

LayoutTests:

Add media stream source nodes to ensure that concurrent reading is not an issue anymore.

  • fast/mediastream/mock-media-source-webaudio.html:
12:40 AM Changeset in webkit [271574] by ysuzuki@apple.com
  • 3 edits
    1 add in trunk

[JSC] callerIsOMGCompiled should be robust
https://bugs.webkit.org/show_bug.cgi?id=220697

Reviewed by Mark Lam.

JSTests:

  • stress/callerIsOMGCompiled-should-be-robust.js: Added.

Source/JavaScriptCore:

This function did not work if this function is called from microtask / unhandled rejection since there is no caller frame.
This patch makes this function more robust against such usage.

  • jsc.cpp:

(JSC_DEFINE_HOST_FUNCTION):

Jan 17, 2021:

11:56 PM Changeset in webkit [271573] by ysuzuki@apple.com
  • 4 edits
    1 add in trunk

[JSC] DFG/FTL Atomics should not accept Float32/Float64 typed arrays
https://bugs.webkit.org/show_bug.cgi?id=220692
<rdar://problem/73238369>

Reviewed by Mark Lam.

JSTests:

  • stress/atomics-float-edge.js: Added.

(foo):

Source/JavaScriptCore:

We accidentally accept Float32/Float64 typed arrays. We should accept only integer TypedArrays (Int8, Uint8, ... etc.)
as specified in [1]. If the other types come, we just make it Array::Generic and call slow path which can handle them.

[1]: https://tc39.es/ecma262/#sec-validateintegertypedarray

  • dfg/DFGArrayMode.h:

(JSC::DFG::ArrayMode::isOneOfTypedArrayView const): Deleted.

  • dfg/DFGFixupPhase.cpp:

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

11:41 PM Changeset in webkit [271572] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebCore

GraphicsContextGLOpenGL::reshapeFBOs() ANGLE variant calls into makeContextCurrent()
https://bugs.webkit.org/show_bug.cgi?id=220460

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

The call is problematic if it is taken, since in some cases makeContextCurrent() fails
due to reshapeFBOs being in middle of a reshape. The problematic case is taken if
the reshape call happens before first getExtensions().

Fix by
1) Resolving the needed depth-stencil buffer format during validateDepthStencil.
2) Always enable the packed depth-stencil extension if it is present. Otherwise

depth-stencil bindings will not work for the context that does not have
default stencil buffer, since the enable call was not taken before
WebGLRenderingContextBase uses the "isEnabled" to enable DEPTH_STENCIL
features.

Tested by WebGL 1/2 conformance tests, but only reveals the bug after
applying the patch in the depending bug.

  • platform/graphics/angle/GraphicsContextGLANGLE.cpp:

(WebCore::GraphicsContextGLOpenGL::validateAttributes):
(WebCore::GraphicsContextGLOpenGL::reshapeFBOs):
(WebCore::GraphicsContextGLOpenGL::validateDepthStencil):

  • platform/graphics/opengl/GraphicsContextGLOpenGL.h:
11:16 PM Changeset in webkit [271571] by ysuzuki@apple.com
  • 3 edits
    1 add in trunk

[JSC] FTL OSR entry FlushFormat array is reversed
https://bugs.webkit.org/show_bug.cgi?id=220695
<rdar://problem/72930932>

Reviewed by Mark Lam.

JSTests:

  • stress/ftl-osr-entry-order-reverse.js: Added.

(shouldThrow):
(foo):

Source/JavaScriptCore:

After r268783, FlushFormat array is erroneously sorted in reversed order.
This patch fixes that.

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::lower):

10:36 PM Changeset in webkit [271570] by ysuzuki@apple.com
  • 3 edits
    1 add in trunk

[JSC] GenericArguments<Type>::defineOwnProperty's assumption about error is not correct
https://bugs.webkit.org/show_bug.cgi?id=220693
<rdar://problem/72929171>

Reviewed by Mark Lam.

JSTests:

  • stress/freeze-invokes-out-of-memory.js: Added.

(shouldThrow):

Source/JavaScriptCore:

Any function taking JSGlobalObject* can cause out-of-memory error potentially. And we have a way to invoke it.
But GenericArguments<Type>::defineOwnProperty didn't assume OutOfMemory error. This patch fixes it.

  • runtime/GenericArgumentsInlines.h:

(JSC::GenericArguments<Type>::defineOwnProperty):

10:25 PM Changeset in webkit [271569] by Jonathan Bedard
  • 2 edits in trunk/Tools

[webkitscmpy] Add GitHub credentials (Follow-up fix)
https://bugs.webkit.org/show_bug.cgi?id=220562
<rdar://problem/73063457>

Unreviewed follow-up fix.

  • Scripts/webkitpy/init.py: Ensure that webkitscmpy's dependencies are auto installed.
10:03 PM Changeset in webkit [271568] by ysuzuki@apple.com
  • 3 edits
    2 adds in trunk

[JSC] Add some more exception checks in globalFuncCopyDataProperties
https://bugs.webkit.org/show_bug.cgi?id=220691

Reviewed by Mark Lam.

JSTests:

  • stress/spread-object-check.js: Added.
  • stress/spread-object-check2.js: Added.

Source/JavaScriptCore:

This patch add some missing exception checks in globalFuncCopyDataProperties to fix tests attached in this patch.

  • runtime/JSGlobalObjectFunctions.cpp:

(JSC::JSC_DEFINE_HOST_FUNCTION):

8:09 PM Changeset in webkit [271567] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

[LFC][IFC] Extend simplified vertical alignment for cases when the line has only "empty" runs
https://bugs.webkit.org/show_bug.cgi?id=220689

Reviewed by Antti Koivisto.

Quirks::inlineLevelBoxAffectsLineBox now does not need to check for empty inline boxes as
those cases would always end up in the simplified vertical alignment path.

  • layout/inlineformatting/InlineFormattingContextGeometry.cpp:

(WebCore::Layout::LineBoxBuilder::constructInlineLevelBoxes):

  • layout/inlineformatting/InlineFormattingContextQuirks.cpp:

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

4:06 PM Changeset in webkit [271566] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC][IFC] Add the root inline collapsing case to simplified vertical alignment
https://bugs.webkit.org/show_bug.cgi?id=220685

Reviewed by Antti Koivisto.

Let's produce a 0 height line box when there are no runs on the line as part of the simplified vertical alignment optimization.

  • layout/inlineformatting/InlineFormattingContextGeometry.cpp:

(WebCore::Layout::LineBoxBuilder::constructInlineLevelBoxes):

3:51 PM Changeset in webkit [271565] by ysuzuki@apple.com
  • 6 edits
    1 delete in trunk/Source/WebKit

JITOperation does not exist in WebKit
https://bugs.webkit.org/show_bug.cgi?id=220686

Reviewed by Mark Lam.

Now, we do not register host functions as JIT operations. As a result, WebKit.framework does not have any JITOperations.
We should remove population of JITOperations code in WebKit.framework.

  • Shared/API/c/WKString.cpp:

(WKStringCopyJSString):

  • Shared/Cocoa/WebKit2InitializeCocoa.mm:

(WebKit::runInitializationCode):

  • Shared/WebKit2Initialize.cpp:

(WebKit::InitializeWebKit2):

  • Shared/WebKitJITOperations.cpp: Removed.
  • Sources.txt:
  • WebKit.xcodeproj/project.pbxproj:
1:06 PM Changeset in webkit [271564] by Wenson Hsieh
  • 3 edits in trunk/Source/WebCore

Unreviewed, fix the internal iOS build after r271559

Fix the build with IOS_TOUCH_EVENTS enabled.

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::handleTouchEvent): Deleted.
(WebCore::RenderLayer::registerAsTouchEventListenerForScrolling): Deleted.
(WebCore::RenderLayer::unregisterAsTouchEventListenerForScrolling): Deleted.

Remove a few undeclared method definitions. These methods were relocated to RenderLayerScrollableArea.

  • rendering/RenderLayerScrollableArea.cpp:

Remove several methods that have duplicate implementations.

11:55 AM Changeset in webkit [271563] by Fujii Hironori
  • 13 edits in trunk/Source/WebKit

[non-Cocoa] Add a new AuxiliaryProcessMainBase class for auxiliary processes without singleton()
https://bugs.webkit.org/show_bug.cgi?id=220615

Reviewed by Don Olmstead.

non-Cocoa ports auxiliary processes are using AuxiliaryProcessMain
as the entry points. AuxiliaryProcessMain supports both kinds of
auxiliary processes with and without singleton() method by using
initializeAuxiliaryProcess template function. However, all
initializeAuxiliaryProcess look similar code. They can share more
code.

Added a AuxiliaryProcessMainBaseNoSingleton template class for
auxiliary processes without singleton().

Moved the code that was in AuxiliaryProcessMain to
AuxiliaryProcessMainBase::run() to remove
takeInitializationParameters().

  • GPUProcess/gstreamer/GPUProcessMainGStreamer.cpp:

(WebKit::GPUProcessMain):
(WebKit::initializeAuxiliaryProcess<GPUProcess>): Deleted.

  • GPUProcess/playstation/GPUProcessMainPlayStation.cpp:

(WebKit::GPUProcessMain):
(WebKit::initializeAuxiliaryProcess<GPUProcess>): Deleted.

  • GPUProcess/win/GPUProcessMainWin.cpp:

(WebKit::GPUProcessMain):
(WebKit::initializeAuxiliaryProcess<GPUProcess>): Deleted.

  • NetworkProcess/curl/NetworkProcessMainCurl.cpp:

(WebKit::NetworkProcessMain):
(WebKit::initializeAuxiliaryProcess<NetworkProcess>): Deleted.

  • NetworkProcess/soup/NetworkProcessMainSoup.cpp:

(WebKit::NetworkProcessMain):
(WebKit::initializeAuxiliaryProcess<NetworkProcess>): Deleted.

  • Shared/AuxiliaryProcessMain.h:

(WebKit::AuxiliaryProcessMainBase::platformInitialize):
(WebKit::AuxiliaryProcessMainBase::platformFinalize):
(WebKit::AuxiliaryProcessMainBase::initializeAuxiliaryProcess):
(WebKit::AuxiliaryProcessMainBase::run):
(WebKit::AuxiliaryProcessMainBaseNoSingleton::process):
(WebKit::AuxiliaryProcessMain):
(WebKit::AuxiliaryProcessMainBase::initializationParameters): Deleted.
(WebKit::AuxiliaryProcessMainBase::takeInitializationParameters): Deleted.
(WebKit::initializeAuxiliaryProcess): Deleted.

  • Shared/unix/AuxiliaryProcessMain.cpp:

(WebKit::AuxiliaryProcessMainCommon::parseCommandLine):
(WebKit::AuxiliaryProcessMainBase::parseCommandLine): Deleted.

  • Shared/win/AuxiliaryProcessMainWin.cpp:

(WebKit::AuxiliaryProcessMainCommon::parseCommandLine):
(WebKit::AuxiliaryProcessMainBase::parseCommandLine): Deleted.

  • WebProcess/gtk/WebProcessMainGtk.cpp:

(WebKit::WebProcessMain):

  • WebProcess/playstation/WebProcessMainPlayStation.cpp:

(WebKit::WebProcessMain):

  • WebProcess/win/WebProcessMainWin.cpp:

(WebKit::WebProcessMain):

  • WebProcess/wpe/WebProcessMainWPE.cpp:

(WebKit::WebProcessMain):

6:44 AM Changeset in webkit [271562] by Alan Bujtas
  • 7 edits in trunk/Source/WebCore

[LFC][IFC] No need to maintain the "is considered empty" bit anymore.
https://bugs.webkit.org/show_bug.cgi?id=220228

Reviewed by Antti Koivisto.

Now that isConsideredEmpty() bit is only used as input to line breaking, let's change it to a more
focused check and remove the concept of "is considered empty" completely.

  • layout/inlineformatting/InlineContentBreaker.cpp:

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

  • layout/inlineformatting/InlineContentBreaker.h:
  • layout/inlineformatting/InlineLine.cpp:

(WebCore::Layout::Line::initialize):
(WebCore::Layout::Line::removeTrailingTrimmableContent):
(WebCore::Layout::Line::append):
(WebCore::Layout::Line::appendTextContent):

  • layout/inlineformatting/InlineLine.h:

(WebCore::Layout::Line::isConsideredEmpty const): Deleted.

  • layout/inlineformatting/InlineLineBuilder.cpp:

(WebCore::Layout::LineBuilder::close):
(WebCore::Layout::LineBuilder::handleInlineContent):

4:36 AM Changeset in webkit [271561] by youenn@apple.com
  • 2 edits in trunk/Source/WebKit

Add CoreMedia aavds entitlement to WebContent and GPU processes
https://bugs.webkit.org/show_bug.cgi?id=220238

Reviewed by Brent Fulgham.

Manually tested.

  • Scripts/process-entitlements.sh:
12:50 AM Changeset in webkit [271560] by ysuzuki@apple.com
  • 9 edits in trunk/Source

Add JSC API configuring GC signals in Linux
https://bugs.webkit.org/show_bug.cgi?id=220641

Reviewed by Mark Lam.

Source/JavaScriptCore:

Add JSConfigureSignalForGC function for Linux and FreeBSD (non Apple, non Windows platforms).

  • API/JSBase.cpp:

(JSConfigureSignalForGC):

  • API/JSBasePrivate.h:

Source/WTF:

In Linux and FreeBSD, we need to use signals to suspend and resume threads.
By default, we are using SIGUSR1, but it is possible that some embedders want to use
the other signals since they are using SIGUSR1 already. To work-around that, this
patch offers the way for embedders to configure signals.

  • wtf/Threading.h:
  • wtf/WTFConfig.h:
  • wtf/posix/ThreadingPOSIX.cpp:

(WTF::Thread::signalHandlerSuspendResume):
(WTF::Thread::initializePlatformThreading):
(WTF::Thread::initializeCurrentThreadEvenIfNonWTFCreated):
(WTF::Thread::initializeCurrentTLS):
(WTF::Thread::suspend):
(WTF::Thread::resume):

  • wtf/threads/Signals.cpp:

(WTF::addSignalHandler):

  • wtf/win/ThreadingWin.cpp:

(WTF::Thread::initializeCurrentTLS):

Jan 16, 2021:

4:26 PM Changeset in webkit [271559] by Nikolas Zimmermann
  • 21 edits in trunk/Source/WebCore

Separate scrolling code out of RenderLayer
https://bugs.webkit.org/show_bug.cgi?id=60305

Reviewed by Simon Fraser.

Move all scrolling/overflow handling out of RenderLayer, to
streamline its interface and make it re-usable for layer
types that do not need nor support scrolling/overflow.

Many variables tracking scrolling/overflow state were migrated to
RenderLayerScrollableArea, which is only created if the renderer
corresponding to the layer has a CSS 'resize' property != 'none',
has potentially scrollable overflow content or <marquee>.

For the common case (no scrollable overflow), the RenderLayer
overhead is reduced: less memory, less state tracking.

Covered by existing tests.

  • WebCore.xcodeproj/project.pbxproj: Make RenderLayerScrollableArea.h

include work in WebKit project.

  • accessibility/AccessibilityRenderObject.cpp: Adapt to the fact that

RenderLayer is no longer a ScrollableArea.
(WebCore::AccessibilityRenderObject::getScrollableAreaIfScrollable const):

  • html/TextFieldInputType.cpp: Adapt to the fact that RenderLayer is

no longer a ScrollableArea.
(WebCore::TextFieldInputType::elementDidBlur):

  • page/EventHandler.cpp: Ditto.

(WebCore::EventHandler::enclosingScrollableArea):
(WebCore::EventHandler::handleWheelEventInAppropriateEnclosingBox):

  • page/FrameView.cpp: Ditto.

(WebCore::FrameView::enclosingScrollableArea const):

  • page/ios/FrameIOS.mm: Ditto.

(WebCore::Frame::overflowScrollPositionChangedForNode):

  • page/mac/EventHandlerMac.mm:

(WebCore::scrollableAreaForBox):

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::requiresLayerWithScrollableArea const): Decides
whether a RenderLayer needs a RenderLayerScrollableArea. The presence
of resize/marquee/overflow triggers creation of a
RenderLayerScrollableArea object.

  • rendering/RenderBox.h:
  • rendering/RenderLayer.cpp: Move all overflow/resize/marquee/scroll

handling to RenderLayerScrollableArea and adapt the affected code.
(WebCore::RenderLayer::RenderLayer):
(WebCore::RenderLayer::~RenderLayer):
(WebCore::RenderLayer::currentScrollType const):
(WebCore::RenderLayer::scrollAnimator const):
(WebCore::RenderLayer::scrollOffset const):
(WebCore::RenderLayer::scrollToOffset):
(WebCore::RenderLayer::scrollToXPosition):
(WebCore::RenderLayer::scrollToYPosition):
(WebCore::RenderLayer::setScrollPosition):
(WebCore::RenderLayer::scrollByRecursively):
(WebCore::RenderLayer::setRequiresScrollPositionReconciliation):
(WebCore::RenderLayer::setAdjustForIOSCaretWhenScrolling):
(WebCore::RenderLayer::setScrollShouldClearLatchedState):
(WebCore::RenderLayer::shouldPlaceBlockDirectionScrollbarOnLeft const):
(WebCore::RenderLayer::containsDirtyOverlayScrollbars const):
(WebCore::RenderLayer::hasScrollableOrRubberbandableAncestor):
(WebCore::RenderLayer::marquee const):
(WebCore::RenderLayer::updateLayerPositionsAfterDocumentScroll):
(WebCore::RenderLayer::hitTestOverflowControls):
(WebCore::RenderLayer::paintOverflowControls):
(WebCore::RenderLayer::paintResizer):
(WebCore::RenderLayer::paintScrollCorner):
(WebCore::RenderLayer::paintOverlayScrollbars):
(WebCore::RenderLayer::reachableTotalContentsSize const):
(WebCore::RenderLayer::horizontalScrollbarHiddenByStyle const):
(WebCore::RenderLayer::verticalScrollbarHiddenByStyle const):
(WebCore::RenderLayer::setPostLayoutScrollPosition):
(WebCore::RenderLayer::panScrollFromPoint):
(WebCore::RenderLayer::scrollPosition const):
(WebCore::RenderLayer::layerForHorizontalScrollbar const):
(WebCore::RenderLayer::layerForVerticalScrollbar const):
(WebCore::RenderLayer::horizontalScrollbar const):
(WebCore::RenderLayer::verticalScrollbar const):
(WebCore::RenderLayer::scrollingMayRevealBackground const):
(WebCore::RenderLayer::hasScrollableHorizontalOverflow const):
(WebCore::RenderLayer::hasScrollableVerticalOverflow const):
(WebCore::RenderLayer::verticalScrollbarWidth const):
(WebCore::RenderLayer::horizontalScrollbarHeight const):
(WebCore::RenderLayer::scroll):
(WebCore::RenderLayer::setConstrainsScrollingToContentEdge):
(WebCore::RenderLayer::updateLayerPositions):
(WebCore::RenderLayer::updateLayerPositionsAfterScroll):
(WebCore::RenderLayer::updateLayerPosition):
(WebCore::RenderLayer::enclosingFrameRenderLayer const):
(WebCore::RenderLayer::enclosingContainingBlockLayer const):
(WebCore::RenderLayer::enclosingScrollableLayer const):
(WebCore::frameElementAndViewPermitScroll):
(WebCore::RenderLayer::allowsCurrentScroll const):
(WebCore::RenderLayer::scrollRectToVisible):
(WebCore::RenderLayer::resize):
(WebCore::RenderLayer::visibleSize const):
(WebCore::RenderLayer::overflowControlsRects const):
(WebCore::RenderLayer::debugDescription const):
(WebCore::RenderLayer::offsetFromResizeCorner const):
(WebCore::RenderLayer::scrollWidth const):
(WebCore::RenderLayer::scrollHeight const):
(WebCore::RenderLayer::updateScrollInfoAfterLayout):
(WebCore::RenderLayer::canUseCompositedScrolling const):
(WebCore::RenderLayer::hasCompositedScrollableOverflow const):
(WebCore::RenderLayer::hasOverlayScrollbars const):
(WebCore::RenderLayer::usesCompositedScrolling const):
(WebCore::RenderLayer::isPointInResizeControl const):
(WebCore::RenderLayer::paintLayerContents):
(WebCore::RenderLayer::paintOverflowControlsForFragments):
(WebCore::RenderLayer::hitTest):
(WebCore::RenderLayer::hitTestLayer):
(WebCore::RenderLayer::calculateClipRects const):

  • rendering/RenderLayer.h: Ditto.

(WebCore::RenderLayer::hasScrollbars const):
(WebCore::RenderLayer::hasHorizontalScrollbar const):
(WebCore::RenderLayer::hasVerticalScrollbar const):
(WebCore::RenderLayer::scrollToXOffset):
(WebCore::RenderLayer::scrollToYOffset):

  • rendering/RenderLayerBacking.cpp: Adapt to the fact that

RenderLayer is no longer a ScrollableArea.
(WebCore::RenderLayerBacking::updateOverflowControlsLayers):

  • rendering/RenderLayerCompositor.cpp: Adapt to the fact that

RenderLayer is no longer a ScrollableArea.
(WebCore::RenderLayerCompositor::parentRelativeScrollableRect const):
(WebCore::RenderLayerCompositor::updateScrollingNodeForScrollingRole):
(WebCore::RenderLayerCompositor::scrollableAreaForScrollingNodeID const):

  • rendering/RenderLayerModelObject.cpp: Adapt to the fact that

RenderLayer is no longer a ScrollableArea.
(WebCore::RenderLayerModelObject::styleDidChange):

  • rendering/RenderLayerScrollableArea.cpp: Mostly moved from

RenderLayer.
(WebCore::RenderLayerScrollableArea::RenderLayerScrollableArea):
(WebCore::RenderLayerScrollableArea::~RenderLayerScrollableArea):
(WebCore::RenderLayerScrollableArea::storeScrollPosition):
(WebCore::RenderLayerScrollableArea::handleTouchEvent):
(WebCore::RenderLayerScrollableArea::registerAsTouchEventListenerForScrolling):
(WebCore::RenderLayerScrollableArea::unregisterAsTouchEventListenerForScrolling):
(WebCore::RenderLayerScrollableArea::scrollableAreaBoundingBox const):
(WebCore::RenderLayerScrollableArea::isUserScrollInProgress const):
(WebCore::RenderLayerScrollableArea::isRubberBandInProgress const):
(WebCore::RenderLayerScrollableArea::forceUpdateScrollbarsOnMainThreadForPerformanceTesting const):
(WebCore::RenderLayerScrollableArea::usesAsyncScrolling const):
(WebCore::RenderLayerScrollableArea::setPostLayoutScrollPosition):
(WebCore::RenderLayerScrollableArea::applyPostLayoutScrollPositionIfNeeded):
(WebCore::RenderLayerScrollableArea::scrollToXPosition):
(WebCore::RenderLayerScrollableArea::scrollToYPosition):
(WebCore::RenderLayerScrollableArea::setScrollPosition):
(WebCore::RenderLayerScrollableArea::clampScrollOffset const):
(WebCore::RenderLayerScrollableArea::requestScrollPositionUpdate):
(WebCore::RenderLayerScrollableArea::scrollToOffset):
(WebCore::RenderLayerScrollableArea::scrollTo):
(WebCore::RenderLayerScrollableArea::updateCompositingLayersAfterScroll):
(WebCore::RenderLayerScrollableArea::scrollWidth const):
(WebCore::RenderLayerScrollableArea::scrollHeight const):
(WebCore::RenderLayerScrollableArea::updateMarqueePosition):
(WebCore::RenderLayerScrollableArea::createOrDestroyMarquee):
(WebCore::RenderLayerScrollableArea::scrollsOverflow const):
(WebCore::RenderLayerScrollableArea::canUseCompositedScrolling const):
(WebCore::RenderLayerScrollableArea::setScrollOffset):
(WebCore::RenderLayerScrollableArea::scrollingNodeID const):
(WebCore::RenderLayerScrollableArea::handleWheelEventForScrolling):
(WebCore::RenderLayerScrollableArea::visibleContentRectInternal const):
(WebCore::RenderLayerScrollableArea::overhangAmount const):
(WebCore::RenderLayerScrollableArea::scrollCornerRect const):
(WebCore::RenderLayerScrollableArea::isScrollCornerVisible const):
(WebCore::RenderLayerScrollableArea::convertFromScrollbarToContainingView const):
(WebCore::RenderLayerScrollableArea::convertFromContainingViewToScrollbar const):
(WebCore::RenderLayerScrollableArea::visibleSize const):
(WebCore::RenderLayerScrollableArea::contentsSize const):
(WebCore::RenderLayerScrollableArea::reachableTotalContentsSize const):
(WebCore::RenderLayerScrollableArea::availableContentSizeChanged):
(WebCore::RenderLayerScrollableArea::shouldSuspendScrollAnimations const):
(WebCore::RenderLayerScrollableArea::didStartScroll):
(WebCore::RenderLayerScrollableArea::didEndScroll):
(WebCore::RenderLayerScrollableArea::didUpdateScroll):
(WebCore::RenderLayerScrollableArea::overflowControlsRects const):
(WebCore::RenderLayerScrollableArea::scrollbarOffset const):
(WebCore::RenderLayerScrollableArea::invalidateScrollbarRect):
(WebCore::RenderLayerScrollableArea::invalidateScrollCornerRect):
(WebCore::scrollbarHiddenByStyle):
(WebCore::RenderLayerScrollableArea::horizontalScrollbarHiddenByStyle const):
(WebCore::RenderLayerScrollableArea::verticalScrollbarHiddenByStyle const):
(WebCore::rendererForScrollbar):
(WebCore::RenderLayerScrollableArea::createScrollbar):
(WebCore::RenderLayerScrollableArea::destroyScrollbar):
(WebCore::RenderLayerScrollableArea::setHasHorizontalScrollbar):
(WebCore::RenderLayerScrollableArea::setHasVerticalScrollbar):
(WebCore::RenderLayerScrollableArea::enclosingScrollableArea const):
(WebCore::RenderLayerScrollableArea::isScrollableOrRubberbandable):
(WebCore::RenderLayerScrollableArea::hasScrollableOrRubberbandableAncestor):
(WebCore::RenderLayerScrollableArea::verticalScrollbarWidth const):
(WebCore::RenderLayerScrollableArea::horizontalScrollbarHeight const):
(WebCore::RenderLayerScrollableArea::hasOverflowControls const):
(WebCore::RenderLayerScrollableArea::positionOverflowControls):
(WebCore::RenderLayerScrollableArea::overflowTop const):
(WebCore::RenderLayerScrollableArea::overflowBottom const):
(WebCore::RenderLayerScrollableArea::overflowLeft const):
(WebCore::RenderLayerScrollableArea::overflowRight const):
(WebCore::RenderLayerScrollableArea::computeScrollDimensions):
(WebCore::RenderLayerScrollableArea::computeHasCompositedScrollableOverflow):
(WebCore::RenderLayerScrollableArea::hasScrollableHorizontalOverflow const):
(WebCore::RenderLayerScrollableArea::hasScrollableVerticalOverflow const):
(WebCore::RenderLayerScrollableArea::hasHorizontalOverflow const):
(WebCore::RenderLayerScrollableArea::hasVerticalOverflow const):
(WebCore::styleRequiresScrollbar):
(WebCore::styleDefinesAutomaticScrollbar):
(WebCore::RenderLayerScrollableArea::updateScrollbarsAfterLayout):
(WebCore::RenderLayerScrollableArea::updateScrollInfoAfterLayout):
(WebCore::RenderLayerScrollableArea::overflowControlsIntersectRect const):
(WebCore::RenderLayerScrollableArea::showsOverflowControls const):
(WebCore::RenderLayerScrollableArea::paintOverflowControls):
(WebCore::RenderLayerScrollableArea::paintScrollCorner):
(WebCore::RenderLayerScrollableArea::drawPlatformResizerImage):
(WebCore::RenderLayerScrollableArea::paintResizer):
(WebCore::RenderLayerScrollableArea::hitTestOverflowControls):
(WebCore::RenderLayerScrollableArea::scroll):
(WebCore::RenderLayerScrollableArea::isActive const):
(WebCore::RenderLayerScrollableArea::lastKnownMousePositionInView const):
(WebCore::RenderLayerScrollableArea::isHandlingWheelEvent const):
(WebCore::RenderLayerScrollableArea::useDarkAppearance const):
(WebCore::RenderLayerScrollableArea::updateSnapOffsets):
(WebCore::RenderLayerScrollableArea::isScrollSnapInProgress const):
(WebCore::RenderLayerScrollableArea::paintOverlayScrollbars):
(WebCore::RenderLayerScrollableArea::hitTestResizerInFragments const):
(WebCore::RenderLayerScrollableArea::layerForHorizontalScrollbar const):
(WebCore::RenderLayerScrollableArea::layerForVerticalScrollbar const):
(WebCore::RenderLayerScrollableArea::layerForScrollCorner const):
(WebCore::RenderLayerScrollableArea::scrollingMayRevealBackground const):
(WebCore::RenderLayerScrollableArea::updateScrollbarsAfterStyleChange):
(WebCore::RenderLayerScrollableArea::updateScrollableAreaSet):
(WebCore::RenderLayerScrollableArea::updateScrollCornerStyle):
(WebCore::RenderLayerScrollableArea::clearScrollCorner):
(WebCore::RenderLayerScrollableArea::updateResizerStyle):
(WebCore::RenderLayerScrollableArea::clearResizer):
(WebCore::RenderLayerScrollableArea::updateAllScrollbarRelatedStyle):
(WebCore::RenderLayerScrollableArea::usesCompositedScrolling const):
(WebCore::adjustedScrollDelta):
(WebCore::RenderLayerScrollableArea::panScrollFromPoint):
(WebCore::RenderLayerScrollableArea::updateScrollPosition):
(WebCore::RenderLayerScrollableArea::scrollByRecursively):
(WebCore::RenderLayerScrollableArea::updateLayerPositionsAfterDocumentScroll):
(WebCore::RenderLayerScrollableArea::updateLayerPositionsAfterOverflowScroll):
(WebCore::RenderLayerScrollableArea::usesMockScrollAnimator const):
(WebCore::RenderLayerScrollableArea::logMockScrollAnimatorMessage const):
(WebCore::RenderLayerScrollableArea::debugDescription const):

  • rendering/RenderLayerScrollableArea.h:
  • rendering/RenderListBox.cpp: Adapt to the fact that

RenderLayer is no longer a ScrollableArea.
(WebCore::RenderListBox::enclosingScrollableArea const):

  • rendering/RenderObject.cpp: Add 'S' state in debug output,

indicating whether the RenderLayer has a RenderLayerScrollableArea.
(WebCore::outputRenderTreeLegend):
(WebCore::RenderObject::outputRenderObject const):

  • rendering/RenderObject.h: Add friendship with

RenderLayerScrollableArea.

  • testing/Internals.cpp: Adapt to the fact that

RenderLayer is no longer a ScrollableArea.
(WebCore::Internals::scrollBySimulatingWheelEvent):
(WebCore:: const):

12:20 PM Changeset in webkit [271558] by bshafiei@apple.com
  • 8 edits in tags/Safari-611.1.10.0.1/Source

Versioning.

WebKit-7611.1.10.0.1

12:09 PM Changeset in webkit [271557] by bshafiei@apple.com
  • 1 copy in tags/Safari-611.1.10.0.1

New tag.

12:05 PM Changeset in webkit [271556] by bshafiei@apple.com
  • 8 edits in branches/safari-611-branch/Source

Versioning.

WebKit-7611.1.14

6:28 AM Changeset in webkit [271555] by Alan Bujtas
  • 7 edits in trunk/Source/WebCore

[LFC][IFC] Do not use LineBox::isConsideredEmpty when checking if inline box stretches the line box.
https://bugs.webkit.org/show_bug.cgi?id=220259

Reviewed by Antti Koivisto.

  1. Inline box always have a strut in standards mode and it stretches the line box even when the inline box itself has no content.

<!DOCTYPE html><div>this is a ~100px tall line<span style="font-size: 100px;"></span></div>

  1. except when the line is completely empty (the inline box still has a strut but it does not affect the line box).

<!DOCTYPE html><div><span style="font-size: 100px;"></span><span style="font-size: 200px;"></span></div>

  1. but not empty like this:

<!DOCTYPE html><div><span style="font-size: 100px;"></span><br></div>

  1. or this:

<!DOCTYPE html><div><span style="font-size: 100px;"></span><img src="foo" style="width: 0px; height: 0px;"></div>

While #2 produces a 0px tall line box, #1, #3 and #4 produce ~100px tall lines.
This change also enables us to remove LineBox:isConsideredEmpty().

  • layout/inlineformatting/InlineFormattingContext.h:
  • layout/inlineformatting/InlineFormattingContextGeometry.cpp:

(WebCore::Layout::LineBoxBuilder::build):
(WebCore::Layout::LineBoxBuilder::computeLineBoxHeightAndAlignInlineLevelBoxesVertically):

  • layout/inlineformatting/InlineFormattingContextQuirks.cpp:

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

  • layout/inlineformatting/InlineLineBox.cpp:

(WebCore::Layout::LineBox::LineBox):
(WebCore::Layout::m_isConsideredEmpty): Deleted.

  • layout/inlineformatting/InlineLineBox.h:

(WebCore::Layout::LineBox::horizontalAlignmentOffset const):
(WebCore::Layout::LineBox::isConsideredEmpty const): Deleted.

  • layout/inlineformatting/InlineLineBuilder.cpp:

(WebCore::Layout::LineBuilder::layoutInlineContent):

  • layout/inlineformatting/InlineLineBuilder.h:
Note: See TracTimeline for information about the timeline view.