Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Webkit: Merge from Webkit-master 2020/10/15 to HEAD #36

Closed
wants to merge 2,083 commits into from
Closed

Webkit: Merge from Webkit-master 2020/10/15 to HEAD #36

wants to merge 2,083 commits into from

Conversation

kenmays
Copy link

@kenmays kenmays commented Oct 7, 2020

Merge from Webkit-master to HEAD
2020/10/15

@kenmays kenmays changed the title Merge to Webkit-master 2020/10/06 Merge to Webkit-master 2020/10/09 Oct 10, 2020
commit-queue@webkit.org and others added 29 commits October 12, 2020 17:39
https://bugs.webkit.org/show_bug.cgi?id=217583

Using unsigned literals where required.

Patch by Michael Catanzaro <mcatanzaro@gnome.org> on 2020-10-12
Reviewed by Darin Adler.

* wtf/URL.cpp:
(WTF::URL::pathStart const):
* wtf/URLParser.cpp:
(WTF::URLParser::needsNonSpecialDotSlash const):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@268362 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=217383

Reviewed by Eric Carlson.

LayoutTests/imported/w3c:

* web-platform-tests/mediacapture-record/MediaRecorder-bitrate.https-expected.txt:
* web-platform-tests/mediacapture-record/idlharness.window-expected.txt:

Source/WebCore:

Do a first computation of bitrates when creating the recorder as per spec.
Update bit rates when starting the recording.

Covered by rebased tests.

* Modules/mediarecorder/MediaRecorder.cpp:
(WebCore::MediaRecorder::startRecording):
* Modules/mediarecorder/MediaRecorder.h:
* Modules/mediarecorder/MediaRecorder.idl:
* platform/mediarecorder/MediaRecorderPrivate.cpp:
(WebCore::MediaRecorderPrivate::updateOptions):
* platform/mediarecorder/MediaRecorderPrivate.h:
(WebCore::MediaRecorderPrivate::startRecording):
* platform/mediarecorder/MediaRecorderPrivateAVFImpl.cpp:
(WebCore::MediaRecorderPrivateAVFImpl::startRecording):
* platform/mediarecorder/MediaRecorderPrivateAVFImpl.h:
* platform/mediarecorder/cocoa/AudioSampleBufferCompressor.h:
* platform/mediarecorder/cocoa/AudioSampleBufferCompressor.mm:
(WebCore::AudioSampleBufferCompressor::bitRate const):
* platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.h:
* platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.mm:
(WebCore::MediaRecorderPrivateWriter::audioBitRate const):
(WebCore::MediaRecorderPrivateWriter::videoBitRate const):
(WebCore::MediaRecorderPrivate::updateOptions):
* platform/mediarecorder/cocoa/VideoSampleBufferCompressor.h:
* platform/mediarecorder/cocoa/VideoSampleBufferCompressor.mm:
(WebCore::VideoSampleBufferCompressor::bitRate const):

Source/WebKit:

Pipe up bit rates through IPC

* GPUProcess/webrtc/RemoteMediaRecorder.h:
(WebKit::RemoteMediaRecorder::audioBitRate const):
(WebKit::RemoteMediaRecorder::videoBitRate const):
* GPUProcess/webrtc/RemoteMediaRecorderManager.cpp:
(WebKit::RemoteMediaRecorderManager::createRecorder):
* GPUProcess/webrtc/RemoteMediaRecorderManager.h:
* GPUProcess/webrtc/RemoteMediaRecorderManager.messages.in:
* WebProcess/GPU/webrtc/MediaRecorderPrivate.cpp:
(WebKit::MediaRecorderPrivate::startRecording):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@268363 268f45cc-cd09-0410-ab3c-d52691b4dbfc
…ce-worker/* tests are flaky failures

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

Unreviewed test gardening.

* TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@268364 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=217531

Reviewed by Youenn Fablet and Saam Barati.

LayoutTests/imported/w3c:

Rebaseline WPT tests now that more checks are passing.

* web-platform-tests/webaudio/the-audio-api/the-audiobuffersourcenode-interface/active-processing.https-expected.txt:
* web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/audioworkletnode-automatic-pull.https-expected.txt:
* web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/audioworkletnode-disconnected-input.https-expected.txt:
* web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/audioworkletnode-onerror.https-expected.txt:
* web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/audioworkletnode-output-channel-count.https-expected.txt:
* web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/audioworkletprocessor-process-frozen-array.https-expected.txt:
* web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/audioworkletprocessor-process-zero-outputs.https-expected.txt:
* web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/audioworkletprocessor-promises.https-expected.txt:
* web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/process-getter.https-expected.txt:
* web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/processor-construction-port.https-expected.txt:
* web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/simple-input-output.https-expected.txt:
* web-platform-tests/webaudio/the-audio-api/the-channelmergernode-interface/active-processing.https-expected.txt:
* web-platform-tests/webaudio/the-audio-api/the-convolvernode-interface/active-processing.https-expected.txt:
* web-platform-tests/webaudio/the-audio-api/the-mediaelementaudiosourcenode-interface/cors-check.https-expected.txt:
* web-platform-tests/webaudio/the-audio-api/the-mediaelementaudiosourcenode-interface/no-cors.https-expected.txt:

Source/WebCore:

Use AudioWorkletProcessor to process audio:
- https://www.w3.org/TR/webaudio/#dom-audioworkletprocessor-process

The AudioWorkletNode logic is based on the Blink implementation at:
- https://github.com/chromium/chromium/blob/master/third_party/blink/renderer/modules/webaudio/audio_worklet_node.cc

This was the last piece of logic needed to make AudioWorklet functional.
I did not enable AudioWorklets by default in this patch though because
there are still some test failures that we should investigate first.
Most AudioWorklet tests are passing though.

No new tests, rebaselined existing tests.

* Modules/webaudio/AudioParam.h:
Return a const reference to avoid refcounting churn.

* Modules/webaudio/AudioWorkletGlobalScope.cpp:
(WebCore::AudioWorkletGlobalScope::createProcessor):
After the JSAudioWorkletProcessor, we construct a JSCallbackData from the
JSAudioWorkletProcessor and the global object and call a setter on the
AudioWorkletProcessor. The processor will use this when process() is called
to forward the call to process() in JavaScript.

* Modules/webaudio/AudioWorkletNode.cpp:
(WebCore::AudioWorkletNode::create):
- Move the logic dealing with AudioParam objects to its own initializeAudioParameters()
function.
- Call context.refNode(node) so that the node is kept alive by the audio context
  until playback is finished. The call to context().notifyNodeFinishedProcessing(this)
  in didFinishProcessingOnRenderingThread() is what notifies the context that we finished
  playback and allows the node to get destroyed. This is similar to what is done for
  AudioScheduledSourceNodes.
- Call updatePullStatus() so that the node gets added to the automatic pull list if it
  does not have any outputs. Otherwise, the node would not be used for rendering if it
  did not have any outputs.

(WebCore::AudioWorkletNode::AudioWorkletNode):
(WebCore::AudioWorkletNode::~AudioWorkletNode):

(WebCore::AudioWorkletNode::initializeAudioParameters):
This logic was mostly moved from the create() function. The part that's new is the
initialization of m_paramValuesMap to fill it with empty audio arrays. These arrays
are used in process() to store the samples from AudioParam objects.

(WebCore::AudioWorkletNode::setProcessor):
Fire a processor error if the processor gets set to nullptr, indicating that we failed
to construct the AudioWorkletProcessor object.

(WebCore::AudioWorkletNode::process):
Fill m_paramValuesMap with samples from associated AudioParam objects then call
AudioWorkletProcessor::process() with input & output AudioBus objects, as well
as m_paramValuesMap. If process() returns false or encountered an error, we finish
rendering.

(WebCore::AudioWorkletNode::didFinishProcessingOnRenderingThread):
This is called by process() whenever process() returns false or encountered an error.
If process() encountered an error, we make sure to fire a processorevent event to
let the script know. Then we null out the processor and finish rendering.

(WebCore::AudioWorkletNode::updatePullStatus):
If the node has no output, we need to make sure to add it to the automatic pull
list in the context so that it is used for rendering.

(WebCore::AudioWorkletNode::checkNumberOfChannelsForInput):
Use same logic as Blink here.

(WebCore::AudioWorkletNode::fireProcessorErrorOnMainThread):
Logic to fire a processorerror event on the main thread with a decent error message.

(WebCore::AudioWorkletNode::activeDOMObjectName const):
(WebCore::AudioWorkletNode::virtualHasPendingActivity const):
ActiveDOMObject overrides.

* Modules/webaudio/AudioWorkletNode.h:
Subclass AudioWorkletNode since we can fire processorerror events
at any point during rendering.

* Modules/webaudio/AudioWorkletNode.idl:
Make it an ActiveDOMObject.

* Modules/webaudio/AudioWorkletProcessor.cpp:
(WebCore::constructJSFloat32Array):
(WebCore::constructJSMap):
(WebCore::constructFrozenJSArray):
(WebCore::copyDataFromJSArrayToBuses):
A bunch of utility functions to convert WebCore types into the suitable
JavaScript types that are expected by the process() function.

(WebCore::AudioWorkletProcessor::process):
Provide implementation for process():
- https://www.w3.org/TR/webaudio/#dom-audioworkletprocessor-process
We convert the parameters into the JavaScript types that the JS process()
function expects, then call the process() function and finally return
the value returned by the JS process() function.

(WebCore::AudioWorkletProcessor::setProcessCallback):
This is called by the AudioWorkletGlobalScope right after the AudioWorkletProcessor
wrapper gets constructed to set the JSCallbackData object that is used
by process() to call the JS process() function.

* Modules/webaudio/AudioWorkletProcessor.h:

* bindings/js/JSCallbackData.h:
(WebCore::JSCallbackDataStrong::JSCallbackDataStrong):
Make JSCallbackData fast allocated. The bindings and my new code heap-allocate it.

* dom/ErrorEvent.cpp:
(WebCore::ErrorEvent::ErrorEvent):
* dom/ErrorEvent.h:
Add an eventType parameter since AudioWorkletNode now needs to dispatch an ErrorEvent
whose type is "processorerror", not the generic "error".

* dom/MessagePort.cpp:
(WebCore::MessagePort::virtualHasPendingActivity const):
Fix MessagePort garbase collection logic to properly deal with MessagePorts from
worklets. This addresses crashes found by the unskipped layout tests.

LayoutTests:

Unskip all AudioWorklet tests now that they are no longer timing out.

* TestExpectations:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@268365 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=217619

Reviewed by Antti Koivisto.

TWo changes related to wheel event region overlay painting.

First, the painted debug regions were misplaced inside overflow:scroll, because
RenderLayerBacking::paintDebugOverlays() used contentOffsetInCompositingLayer() rather than
graphicsLayer->offsetFromRenderer() - the scrolled contents layer can have a different
offsetFromRenderer to the other GraphicsLayers for a given RenderLayerBacking.

Second, with ENABLE(WHEEL_EVENT_REGIONS) we paint the wheel event regions in
RenderLayerBacking::paintDebugOverlays() so MouseWheelRegionOverlay should not also paint
the old ones.

* page/DebugPageOverlays.cpp:
(WebCore::MouseWheelRegionOverlay::updateRegion):
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::paintDebugOverlays):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@268366 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=217403
<rdar://problem/48217791>

Reviewed by Tim Horton.

Source/WebKit:

* Configurations/WebKit.xcconfig: Linked PDFKit.framework when building for the Catalyst
variant on Big Sur or later.

Source/WTF:

* wtf/PlatformEnableCocoa.h: Enabled WKPDFView when building for the Catalyst variant on
Big Sur or later.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@268367 268f45cc-cd09-0410-ab3c-d52691b4dbfc
…ld not be a no-op

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

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Rebaseline WPT test that is now passing.

* web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/process-parameters.https-expected.txt:

Source/WebCore:

We had an issue with our implementation of AudioContext's suspend() / resume(). Both functions
would update the AudioContext's state asynchronously (as per specification [1][2]) but would
check the state syncronously and return early if the state is already as expected (which is
not as per specification). This meant that calling suspend() then resume() right away would
leave the context suspended instead of running.

[1] https://www.w3.org/TR/webaudio/#dom-audiocontext-suspend
[2] https://www.w3.org/TR/webaudio/#dom-audiocontext-resume

No new tests, rebaselined existing test.

* Modules/webaudio/BaseAudioContext.cpp:
(WebCore::BaseAudioContext::setState):
(WebCore::BaseAudioContext::suspendRendering):
(WebCore::BaseAudioContext::resumeRendering):

LayoutTests:

* TestExpectations:
Unskip test that is no longer timing out.

* webaudio/audiocontext-promise-expected.txt:
* webaudio/audiocontext-promise.html:
Udpate existing layout test to reflect behavior change.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@268368 268f45cc-cd09-0410-ab3c-d52691b4dbfc
…ach rendering quantum

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

Reviewed by Geoffrey Garen.

LayoutTests/imported/w3c:

Rebaseline WPT test now that it is passing.

* web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/audioworkletprocessor-promises.https-expected.txt:

Source/WebCore:

AudioWorkletGlobalScope should perform a microtask checkpoint after each rendering quantum:
- https://www.w3.org/TR/webaudio/#rendering-loop (Step 4)

Because JSC drains its microtask queue when releasing the API lock, the AudioWorkletGlobalScope
grabs the API lock at the beginning of each render quantum, then the process() functions get
called for each AudioWorkletProcessor, and finally the AudioWorkletGlobalScope releases the
API lock at the end of the render quantum so that the microtask queue is drained then, as per
the specification.

No new tests, rebaselined existing tests.

* Modules/webaudio/AudioDestinationNode.cpp:
(WebCore::AudioDestinationNode::render):
* Modules/webaudio/AudioWorkletGlobalScope.cpp:
(WebCore::AudioWorkletGlobalScope::handlePreRenderTasks):
(WebCore::AudioWorkletGlobalScope::handlePostRenderTasks):
* Modules/webaudio/AudioWorkletGlobalScope.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@268369 268f45cc-cd09-0410-ab3c-d52691b4dbfc
…ree and WebKitTestRunner

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

Reviewed by Dean Jackson.

Move TestFeatures and TestCommand code from WebKitTestRunner to TestRunnerShared
and adopt shared code in both WebKitTestRunner and DumpRenderTree.

This allows us to remove duplicate argument and test header parsing code and
avoid updating both when we want want change things.

To support different sets of test header options, featureDefaultsFromTestHeaderForTest now
has a parameter for a key type map, rather than the old hardcoded set. This allows
WebKitTestRunner and DumpRenderTree, which currently have slightly different options
to continue to behave in the same way. Eventually, it will probably make sense to have these
mostly generated from the WebPreferences*.yaml configuration files.

Matching precedent, shared files use the WTR namespace.

* DumpRenderTree/CMakeLists.txt:
* DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
* TestRunnerShared/CMakeLists.txt:
* WebKitTestRunner/CMakeLists.txt:
* WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj:
Add new files.

* DumpRenderTree/DumpRenderTree.h:
Removes TestCommand and parseInputLine now that they come from shared TestCommand.h

* DumpRenderTree/DumpRenderTreeCommon.cpp: Removed.
Moved contents to shared TestCommand.cpp

* DumpRenderTree/TestOptions.cpp:
* DumpRenderTree/TestOptions.h:
Adopt model from WebKitTestRunner and use initialization from TestFeatures.

* DumpRenderTree/mac/DumpRenderTree.mm:
Adopt shared TestFeatures and TestCommand infrastructure. Construct TestOptions
in a similar manner to WebKitTestRunner by merging together hardcoded / path based
features and test header based features.

* DumpRenderTree/mac/UIDelegate.h:
* DumpRenderTree/mac/UIDelegate.mm:
Update for new namespace.

* TestRunnerShared/TestCommand.cpp: Added.
* TestRunnerShared/TestCommand.h: Added.
* TestRunnerShared/TestFeatures.cpp: Added.
* TestRunnerShared/TestFeatures.h: Added.
* WebKitTestRunner/TestController.cpp:
* WebKitTestRunner/TestController.h:
* WebKitTestRunner/TestOptions.cpp:
* WebKitTestRunner/TestOptions.h:
Moved from WebKitTestRunner. Generalized to TestFeatures to take a key type map,
rather than hard coding it. Replace use of WebKit types, like WKURLRef, with std::string
and std::filesystem::path.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@268370 268f45cc-cd09-0410-ab3c-d52691b4dbfc
…inor version when building

with Xcode 12 on macOS Big Sur SUs
https://bugs.webkit.org/show_bug.cgi?id=217602
rdar://70194453

Patch by Luming Yin <luming_yin@apple.com> on 2020-10-12
Reviewed by Darin Adler.

The previous workaround turns out to be ineffective because we can't set the value of
TARGET_MAC_OS_X_VERSION_MAJOR based on a previous value of itself. Introduce a new
variable TARGET_MAC_OS_X_VERSION_MAJOR to determine whether we need to explicitly
adjust MAC_OS_X_VERSION_MAJOR to 110000.

PerformanceTests:

* DecoderTest/Configurations/DebugRelease.xcconfig:
* MediaTime/Configurations/DebugRelease.xcconfig:

Source/bmalloc:

* Configurations/DebugRelease.xcconfig:

Source/JavaScriptCore:

* Configurations/DebugRelease.xcconfig:

Source/ThirdParty:

* gtest/xcode/Config/General.xcconfig:

Source/ThirdParty/ANGLE:

* Configurations/DebugRelease.xcconfig:

Source/ThirdParty/libwebrtc:

* Configurations/DebugRelease.xcconfig:

Source/WebCore:

* Configurations/DebugRelease.xcconfig:

Source/WebCore/PAL:

* Configurations/DebugRelease.xcconfig:

Source/WebInspectorUI:

* Configurations/DebugRelease.xcconfig:

Source/WebKit:

* Configurations/DebugRelease.xcconfig:

Source/WebKitLegacy/mac:

* Configurations/DebugRelease.xcconfig:

Source/WTF:

* Configurations/DebugRelease.xcconfig:

Tools:

* ContentExtensionTester/Configurations/DebugRelease.xcconfig:
* DumpRenderTree/mac/Configurations/DebugRelease.xcconfig:
* ImageDiff/cg/Configurations/DebugRelease.xcconfig:
* MiniBrowser/Configurations/DebugRelease.xcconfig:
* TestWebKitAPI/Configurations/DebugRelease.xcconfig:
* WebEditingTester/Configurations/DebugRelease.xcconfig:
* WebKitTestRunner/Configurations/DebugRelease.xcconfig:
* lldb/lldbWebKitTester/Configurations/DebugRelease.xcconfig:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@268371 268f45cc-cd09-0410-ab3c-d52691b4dbfc
…r named "RemoteResourceIdentifier"

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

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

Source/WebCore:

RemoteResourceIdentifier will be used in WebCore when recording drawing
a remote ImageBuffer to another remote ImageBuffer. Eventually it will
be used drawing a remote NativeImage to a remote ImageBuffer or DOM layer.

* Headers.cmake:
* WebCore.xcodeproj/project.pbxproj:
* platform/graphics/RemoteResourceIdentifier.h: Added.

Source/WebKit:

GPU Process needs a universal identifier for drawing cached resources and
drawing buffers and layers. The meaning of RemoteResourceIdentifier will
depend on the context it is used in.

* GPUProcess/graphics/RemoteImageBufferMessageHandlerProxy.cpp:
(WebKit::RemoteImageBufferMessageHandlerProxy::RemoteImageBufferMessageHandlerProxy):
(WebKit::RemoteImageBufferMessageHandlerProxy::createBackend):
(WebKit::RemoteImageBufferMessageHandlerProxy::commitFlushContext):
* GPUProcess/graphics/RemoteImageBufferMessageHandlerProxy.h:
* GPUProcess/graphics/RemoteImageBufferProxy.h:
(WebKit::RemoteImageBufferProxy::create):
(WebKit::RemoteImageBufferProxy::RemoteImageBufferProxy):
* GPUProcess/graphics/RemoteRenderingBackendProxy.cpp:
(WebKit::RemoteRenderingBackendProxy::createImageBuffer):
(WebKit::RemoteRenderingBackendProxy::releaseRemoteResource):
(WebKit::RemoteRenderingBackendProxy::getImageData):
(WebKit::RemoteRenderingBackendProxy::flushImageBufferDrawingContext):
(WebKit::RemoteRenderingBackendProxy::flushImageBufferDrawingContextAndCommit):
(WebKit::RemoteRenderingBackendProxy::releaseImageBuffer): Deleted.
* GPUProcess/graphics/RemoteRenderingBackendProxy.h:
* GPUProcess/graphics/RemoteRenderingBackendProxy.messages.in:
* Scripts/webkit/messages.py:
* WebKit.xcodeproj/project.pbxproj:
* WebProcess/GPU/graphics/RemoteImageBufferMessageHandler.cpp:
(WebKit::RemoteImageBufferMessageHandler::RemoteImageBufferMessageHandler):
(WebKit::RemoteImageBufferMessageHandler::~RemoteImageBufferMessageHandler):
(WebKit::RemoteImageBufferMessageHandler::getImageData const):
(WebKit::RemoteImageBufferMessageHandler::flushDrawingContext):
(WebKit::RemoteImageBufferMessageHandler::flushDrawingContextAndWaitCommit):
* WebProcess/GPU/graphics/RemoteImageBufferMessageHandler.h:
(WebKit::RemoteImageBufferMessageHandler::remoteResourceIdentifier const):
(WebKit::RemoteImageBufferMessageHandler::imageBufferIdentifier const): Deleted.
* WebProcess/GPU/graphics/RemoteRenderingBackend.cpp:
(WebKit::RemoteRenderingBackend::createImageBuffer):
(WebKit::RemoteRenderingBackend::releaseRemoteResource):
(WebKit::RemoteRenderingBackend::createImageBufferBackend):
(WebKit::RemoteRenderingBackend::commitImageBufferFlushContext):
(WebKit::RemoteRenderingBackend::releaseImageBuffer): Deleted.
* WebProcess/GPU/graphics/RemoteRenderingBackend.h:
* WebProcess/GPU/graphics/RemoteRenderingBackend.messages.in:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@268372 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=217632
<rdar://problem/70222803>

Reviewed by Dewei Zhu.

* Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py: Bump version.
* Scripts/libraries/webkitcorepy/webkitcorepy/subprocess_utils.py:
(run): Killed processes will sometimes not have stdout or stderr, while terminated processes often will.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@268373 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=217471

Reviewed by Saam Barati.

JSTests:

* stress/spread-to-property-key-constant.js: Added.

Source/JavaScriptCore:

propertyName register can be constant. We should create temporary register if it is necessary for the destination.

* bytecompiler/NodesCodegen.cpp:
(JSC::ObjectPatternNode::bindValue const):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@268374 268f45cc-cd09-0410-ab3c-d52691b4dbfc
… way that can lead to incorrect results with indexed properties on the prototype chain

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

Reviewed by Yusuke Suzuki.

JSTests:

* stress/sort-should-not-look-up-prototype-properties.js: Added.
(assert):

Source/JavaScriptCore:

Inside one of Array.prototype.sort's builtin helper methods, we are using an
array as an internal data structure to do some bookkeeping. However, we were
accessing it in such a way that it was reading properties from the prototype
chain. The code is written in a way such that it is only correct if it is
reading self properties (as the prototype chain can be user controlled). The
fix is to set this bookkeeping array's __proto__ to null, so we don't read
from the prototype chain.

* builtins/ArrayPrototype.js:
(globalPrivate.sortBucketSort):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@268375 268f45cc-cd09-0410-ab3c-d52691b4dbfc
…s specified

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

Reviewed by Simon Fraser.

* Platform/spi/mac/AppKitSPI.h:
* UIProcess/mac/PageClientImplMac.mm:
(WebKit::PageClientImpl::setCursor):
Adopt new AppKit SPI to actually hide the cursor when we set it to the "none" shape.
This hiding lives until the next time the app-global cursor shape is changed by any client.]
We'll re-set it the next time we set the "none" shape.

This is important, because on some platforms, hiding the cursor is a performance improvement
over simply making it transparent.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@268376 268f45cc-cd09-0410-ab3c-d52691b4dbfc
* Configurations/WebKit.xcconfig: Corrected the definition of
WK_PDFKIT_LDFLAGS_maccatalyst.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@268377 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=209073

Unreviewed test gardening.

* platform/mac-wk1/TestExpectations:
* platform/mac/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@268378 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=209073

Unreviewed test gardening.

* platform/mac/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@268379 268f45cc-cd09-0410-ab3c-d52691b4dbfc
….any.worker.html is a flaky failure

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

Unreviewed test gardening.

* platform/ios-wk2/TestExpectations:
* platform/mac/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@268380 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=217642
<rdar://problem/70224629>

Reviewed by Wenson Hsieh.

* UIProcess/ios/forms/WKDateTimeInputControl.mm:
(-[WKDateTimePicker initWithView:datePickerMode:]):
(-[WKDateTimePicker shouldPresentGregorianCalendar:]):
(-[WKDateTimePicker controlBeginEditing]):
(-[WKDateTimeInputControl initWithView:]):
An earlier unified source's `using namespace WebCore` inside `namespace WebKit`
and then WKDateTimeInputControl's `using namespace WebKit` in the global namespace
resulted in once-again conflicting definitions of `Rect` between CSS
code and MacTypes.h.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@268381 268f45cc-cd09-0410-ab3c-d52691b4dbfc
…insic-width.html is a constant image failure

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

Reviewed by Antti Koivisto.

Source/WebCore:

InlineTree snaps line boxes to integral values.

* layout/integration/LayoutIntegrationLineLayout.cpp:
(WebCore::LayoutIntegration::LineLayout::constructContent):

LayoutTests:

* platform/ios-simulator-wk2/TestExpectations:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@268382 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=217644

Reviewed by Tim Horton.

Source/WebKit:

* NetworkProcess/ServiceWorker/ServiceWorkerFetchTask.cpp:
* NetworkProcess/cocoa/WebSocketTaskCocoa.mm:
* WebProcess/Automation/WebAutomationSessionProxy.cpp:
Move "using namespace WebCore" inside WebKit namespace.

Source/WebKitLegacy/mac:

* Storage/WebStorageTrackerClient.h: Remove "using namespace WebCore".

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@268383 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=212580
<rdar://problem/63813283>

Reviewed by Wenson Hsieh.

Source/WebKit:

Use `+[UIScribbleInteraction isPencilInputExpected]` as a proxy for the presence of stylus
devices as there's no way of directly querying for connected stylus devices (especially if
there is no active connection). When the value is changed to `YES`, notify all WebProcess
immediately. When the value is changed to `NO`, use an `NSTimer` to delay notifying all
WebProcess for 10min in case the user starts using their stylus again.

For live-on/tweaking purposes this 10min timeout can be adjusted before the UIProcess is
created with the `WKStylusDeviceObserverChangeTimeInterval` key in `NSUserDefaults`.

* UIProcess/ios/WKStylusDeviceObserver.h: Added.
* UIProcess/ios/WKStylusDeviceObserver.mm: Added.
(+[WKStylusDeviceObserver sharedInstance]):
(-[WKStylusDeviceObserver init]):
(-[WKStylusDeviceObserver setHasStylusDevice:]):
(-[WKStylusDeviceObserver start]):
(-[WKStylusDeviceObserver stop]):
(-[WKStylusDeviceObserver observeValueForKeyPath:ofObject:change:context:]):
(-[WKStylusDeviceObserver startChangeTimer:]):
(-[WKStylusDeviceObserver changeTimerFired:]):
Use ObjC KVO to listen for changes to `+[UIScribbleInteraction isPencilInputExpected]`.

* UIProcess/WebProcessProxy.h:
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::notifyHasStylusDeviceChanged): Added.
* UIProcess/ios/WebProcessProxyIOS.mm:
(WebKit::WebProcessProxy::platformInitialize):
(WebKit::WebProcessProxy::platformDestroy):
Tell the shared `WKStylusDeviceObserver` to start listening when creating the WebProcess.

* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::platformInitializeWebProcess):
* Shared/WebProcessCreationParameters.h:
* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode const):
(WebKit::WebProcessCreationParameters::decode):
Use the current state of the shared `WKStylusDeviceObserver` when creating WebProcess
instead of sending a `SetHasStylusDevice` message immediately after the WebProcess is
created.

* WebProcess/WebProcess.messages.in:
* WebProcess/WebProcess.h:
(WebKit::WebProcess::hasStylusDevice const): Added.
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::setHasStylusDevice): Added.
(WebKit::WebProcess::initializeWebProcess):
Update style (including `any-pointer`) whenever stylus devices change.

* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::hasStylusDevice): Added.
(WebKit::WebPage::pointerCharacteristicsOfAllAvailablePointingDevices const):
Include `fine` when there is a stylus device.

* UIProcess/ios/WKMouseDeviceObserver.h:
* UIProcess/ios/WKMouseDeviceObserver.mm:
(-[WKMouseDeviceObserver start]):
(-[WKMouseDeviceObserver stop]):
(-[WKMouseDeviceObserver dealloc]): Removed.
Drive-by: use a count of `start`/`stop` instead of `WebProcessProxy::allProcesses` size.

* SourcesCocoa.txt:
* WebKit.xcodeproj/project.pbxproj:

Tools:

* TestWebKitAPI/Tests/WebKitCocoa/iOSStylusSupport.mm: Added.
(iOSStylusSupport.StylusInitiallyDisconnected):
(iOSStylusSupport.StylusInitiallyConnected):
(iOSStylusSupport.StylusLaterDisconnected):
(iOSStylusSupport.StylusLaterConnected):
(iOSStylusSupport.StylusDisconnectedTimeout):

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@268384 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=217636

Reviewed by Saam Barati.

Source/JavaScriptCore:

Since they are directly embedded by JIT code generator (not linked via linker), they do not need to be C linkage.

* dfg/DFGOperations.cpp:
* dfg/DFGOperations.h:
* ftl/FTLOSRExitCompiler.cpp:
* ftl/FTLOSRExitCompiler.h:
* ftl/FTLOperations.cpp:
* ftl/FTLOperations.h:
* jit/JITOperations.cpp:
* jit/JITOperations.h:

Source/WebCore:

* domjit/DOMJITHelpers.h:
* domjit/JSDocumentDOMJIT.cpp:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@268385 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=217212
<rdar://problem/69876022>

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2020-10-13
Reviewed by Dean Jackson.

Source/WebCore:

WebGLLayer was needlessly using GraphicsContextGLOpenGL.
This is problematic because WebGLLayer should work with
upcoming remote GraphicsContextGL implementation.

The prepare callgraph was:
    GCGLOpenGL -> WebGLLayer -> GCGLOpenGL
Refactor it to be:
    GCGLOpenGL -> WebGLLayer

Move the back buffer ownership to the GraphicsContextGLOpenGL.
Make the front buffer ownership explicit in WebGLLayer.
Move the EGL bindings ownerships of all buffers to
GraphicsContextGLOpenGL.

Make the WebGLLayer not use EGL or OpenGL, it does not
need and cannot use it as not all of its clients use OpenGL
(i.e. the above mentioned remote use-case).

Improves the memory usage by not allocating front buffers
unless needed. In case the canvas does not present, will
not allocate front buffers at all.

Improves error handling of the allocations and EGL bindings.

No new tests, a refactor.

* WebCore.xcodeproj/project.pbxproj:
* platform/graphics/angle/GraphicsContextGLANGLE.cpp:
(WebCore::GraphicsContextGLOpenGL::reshapeFBOs):
(WebCore::GraphicsContextGLOpenGL::prepareTexture):
(WebCore::GraphicsContextGLOpenGL::prepareTextureImpl):
* platform/graphics/angle/GraphicsContextGLANGLEUtilities.h: Added.
(WebCore::ScopedRestoreTextureBinding::ScopedRestoreTextureBinding):
(WebCore::ScopedRestoreTextureBinding::~ScopedRestoreTextureBinding):
* platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm:
(WebCore::GraphicsContextGLOpenGL::GraphicsContextGLOpenGL):
(WebCore::GraphicsContextGLOpenGL::~GraphicsContextGLOpenGL):
(WebCore::GraphicsContextGLOpenGL::makeContextCurrent):
(WebCore::GraphicsContextGLOpenGL::reshapeDisplayBufferBacking):
(WebCore::GraphicsContextGLOpenGL::bindDisplayBufferBacking):
(WebCore::GraphicsContextGLOpenGL::prepareForDisplay):
(WebCore::GraphicsContextGLOpenGL::didDisplay):
* platform/graphics/cocoa/WebGLLayer.h:
* platform/graphics/cocoa/WebGLLayer.mm:
(-[WebGLLayer initWithClient:devicePixelRatio:]):
(-[WebGLLayer copyImageSnapshotWithColorSpace:]):
(-[WebGLLayer recycleBuffer]):
(-[WebGLLayer prepareForDisplayWithContents:]):
(-[WebGLLayer display]):
(-[WebGLLayer detachClient]):
* platform/graphics/cocoa/WebGLLayerClient.h: Copied from Source/WebCore/platform/graphics/cocoa/WebGLLayer.h.
(WebCore::WebGLLayerClient::~WebGLLayerClient):
* platform/graphics/opengl/GraphicsContextGLOpenGL.h:
* platform/graphics/opengl/GraphicsContextGLOpenGLBase.cpp:
(WebCore::GraphicsContextGLOpenGL::reshapeFBOs):

Source/WebKit:

Removed unneeded inclusions of GraphicsContextGLOpenGL.h. The
file is now using non-public headers.

* WebProcess/WebPage/WebPage.cpp:
* WebProcess/WebPage/mac/WebPageMac.mm:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@268386 268f45cc-cd09-0410-ab3c-d52691b4dbfc
…g in EWS API-GTK.

* TestWebKitAPI/glib/TestExpectations.json:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@268387 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=217592

Patch by Michael Catanzaro <mcatanzaro@gnome.org> on 2020-10-13
Reviewed by Carlos Garcia Campos.

* Source/cmake/OptionsGTK.cmake:
* Source/cmake/OptionsWPE.cmake:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@268388 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=217493

Reviewed by Carlos Garcia Campos.

* Source/cmake/OptionsGTK.cmake: Make the default value of ENABLE_GAMEPAD
depend on ENABLE_EXPERIMENTAL_FEATURES.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@268389 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=217494

Reviewed by Carlos Garcia Campos.

Turns out this was mostly working already, with a small caveat: Sometimes there would
be a timing issue if m_inputNotificationTimer would be fired before having a chance
of setting the m_initialGamepadsConnected flag, and in that case the early return
would prevent dispatchPlatformGamepadInputActivity() from ever being called. This
re-arms the timer to be fired again in the next event loop iteration if the flag was
unset, so it will be checked again after it has been toggled. This same approach is
used by HIDGamepadProvider in the Mac port, for example.

* platform/gamepad/manette/ManetteGamepadProvider.cpp:
(WebCore::ManetteGamepadProvider::inputNotificationTimerFired): Re-arm timer if
m_initialGamepadsConnected was not yet set.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@268390 268f45cc-cd09-0410-ab3c-d52691b4dbfc
dino@apple.com and others added 14 commits October 17, 2020 02:10
https://bugs.webkit.org/show_bug.cgi?id=217842
<rdar://problem/70391914>

Unreviewed. Mark some tests as failing on Mojave.

* platform/mac/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@268627 268f45cc-cd09-0410-ab3c-d52691b4dbfc
…nabled

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

Reviewed by Brent Fulgham.

Source/WebKit:

* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetWebAuthenticationModernEnabled):
(WKPreferencesGetWebAuthenticationModernEnabled):
* UIProcess/API/C/WKPreferencesRefPrivate.h:

Source/WTF:

Add a new experimental feature flag to test the new WebAuthn process.

* Scripts/Preferences/WebPreferencesExperimental.yaml:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@268628 268f45cc-cd09-0410-ab3c-d52691b4dbfc
… don't hit after reload

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

Reviewed by Timothy Hatcher.

Source/JavaScriptCore:

* inspector/agents/InspectorDebuggerAgent.cpp:
(Inspector::InspectorDebuggerAgent::clearDebuggerBreakpointState):
Don't clear the list of protocol breakpoints when the global object changes. Protocol
breakpoints should only be cleared when individually removed or by `Debugger.disable`.

LayoutTests:

* inspector/debugger/resources/nested-calls.js: Added.
(inner):
(outer):

* inspector/debugger/breakpoint-resolve-when-script-added.html: Added.
* inspector/debugger/breakpoint-resolve-when-script-added-expected.txt: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@268629 268f45cc-cd09-0410-ab3c-d52691b4dbfc
…ASSERT ERROR

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

Reviewed by Timothy Hatcher.

r266885 changed `Console.getLoggingChannels` to return any `Console.ChannelSource` that
existed, rather than a hardcoded list. Remove the similarly hardcoded list in the frontend.

* UserInterface/Models/LoggingChannel.js:
(WI.LoggingChannel):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@268630 268f45cc-cd09-0410-ab3c-d52691b4dbfc
…:27: CONSOLE ASSERT ERROR

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

Reviewed by Timothy Hatcher.

Source/WebInspectorUI:

r266885 changed `Console.getLoggingChannels` to return any `Console.ChannelSource` that
existed, rather than a hardcoded list. Remove the similarly hardcoded list in the frontend.

* UserInterface/Controllers/ConsoleManager.js:
(WI.ConsoleManager):
(WI.ConsoleManager.prototype.initializeLogChannels):
(WI.ConsoleManager.prototype.get logChannelSources): Deleted.

* UserInterface/Views/LogContentView.js:
(WI.LogContentView.prototype._messageAdded):

LayoutTests:

* inspector/console/webcore-logging.html:
* inspector/console/webcore-logging-expected.txt:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@268631 268f45cc-cd09-0410-ab3c-d52691b4dbfc
…audio destination from a web process to the GPU Process

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

Reviewed by Jer Noble.

Source/WebCore:

Decouple the audio output unit management from AudioDestinationCocoa so that
we can run it remotely in other processes, like the GPU process.

No new tests, no behavior change.

* SourcesCocoa.txt:
* WebCore.xcodeproj/project.pbxproj:

* platform/audio/AudioDestination.h: Export hardwareSampleRate().

* platform/audio/cocoa/AudioDestinationCocoa.cpp:
(WebCore::AudioDestination::create): Remove an unnecessary function call.
(WebCore::AudioDestinationCocoa::AudioDestinationCocoa): Add a parameter
configureAudioOutputUnit so that we can disable the AudioOutputUnitAdaptor in
AudioDestinationCocoa when we need to run the AudioOutputUnitAdaptor in another process.
(WebCore::AudioDestinationCocoa::start):
(WebCore::AudioDestinationCocoa::stop):
(WebCore::AudioDestinationCocoa::getAudioStreamBasicDescription):
Rename setAudioStreamBasicDescription() to getAudioStreamBasicDescription() because
the function essentially queries the description.
(WebCore::AudioDestinationCocoa::hasEnoughFrames const): Add this function
so that a subclass can check whether the FIFO has enough audio samples to render.
(WebCore::AudioDestinationCocoa::render): Replace the AudioTimeStamp* parameter
because we only need two fields of AudioTimeStamp in this function.
(WebCore::AudioDestinationCocoa::~AudioDestinationCocoa): Deleted.
(WebCore::AudioDestinationCocoa::setAudioStreamBasicDescription): Deleted.
(WebCore::AudioDestinationCocoa::inputProc): Deleted. This function is moved to
AudioOutputUnitAdaptor.
* platform/audio/cocoa/AudioDestinationCocoa.h:
(WebCore::AudioDestinationCocoa::outputUnit): Deleted.

* platform/audio/cocoa/AudioOutputUnitAdaptor.cpp: Added.
(WebCore::AudioOutputUnitAdaptor::AudioOutputUnitAdaptor):
(WebCore::AudioOutputUnitAdaptor::~AudioOutputUnitAdaptor):
(WebCore::AudioOutputUnitAdaptor::start):
(WebCore::AudioOutputUnitAdaptor::stop):
(WebCore::AudioOutputUnitAdaptor::inputProc):
* platform/audio/cocoa/AudioOutputUnitAdaptor.h: Added.
* platform/audio/ios/AudioOutputUnitAdaptorIOS.cpp: Renamed from Source/WebCore/platform/audio/ios/AudioDestinationIOS.cpp.
(WebCore::AudioOutputUnitAdaptor::configure):
* platform/audio/mac/AudioOutputUnitAdaptorMac.cpp: Renamed from Source/WebCore/platform/audio/mac/AudioDestinationMac.cpp.
(WebCore::AudioOutputUnitAdaptor::configure):
* platform/mock/MockAudioDestinationCocoa.cpp:
(WebCore::MockAudioDestinationCocoa::tick):

Source/WebKit:

The current implementation of RemoteAudioDestination essentially runs the
AudioDestinationCocoa in the GPU process, which is not good because we are adding
AudioWorklet stuff into AudioDestinationCocoa, but the AudioWorklet stuff is
irrelevant to the GPU process.

What really needs to run in the GPU process (for Cocoa platforms at least) is the
audio output unit. This patch adds WebCore::AudioOutputUnitAdaptor and
WebCore::AudioUnitRenderer to implement that. With this patch, RemoteAudioDestination
in the GPU process is an AudioUnitRenderer and it embeds an AudioOutputUnitAdaptor
like AudioDestinationCocoa does in the Web process. Essentially, we run AudioOutputUnitAdaptor
remotely from the AudioDestinationCocoa's perspective.

Also, in the current implementation, the RemoteAudioDestinationProxy in a Web
process transfers audio data to the RemoteAudioDestination in the GPU process
with IPC messages (RemoteAudioBusData). This is not efficient because of the
large number of IPC messages for audio samples.

With this patch, RemoteAudioDestinationProxy (Web process) transfers audio samples
to RemoteAudioDestination(GPU process) with a CARingBuffer providing shared
buffers for the Web process and the GPU process.

* GPUProcess/media/RemoteAudioDestinationManager.cpp:
(WebKit::RemoteAudioDestination::create):
(WebKit::RemoteAudioDestination::~RemoteAudioDestination):
(WebKit::RemoteAudioDestination::audioSamplesStorageChanged):
(WebKit::RemoteAudioDestination::start):
(WebKit::RemoteAudioDestination::stop):
(WebKit::RemoteAudioDestination::isPlaying const):
(WebKit::RemoteAudioDestination::RemoteAudioDestination):
(WebKit::RemoteAudioDestination::storage):
(WebKit::RemoteAudioDestination::render):
(WebKit::RemoteAudioDestinationManager::createAudioDestination):
(WebKit::RemoteAudioDestinationManager::audioSamplesStorageChanged):
(WebKit::RemoteAudioDestination::isPlaying): Deleted.
(WebKit::RemoteAudioDestination::framesPerBuffer const): Deleted.
* GPUProcess/media/RemoteAudioDestinationManager.h:
(WebKit::RemoteAudioDestinationManager::didReceiveSyncMessageFromWebProcess):
* GPUProcess/media/RemoteAudioDestinationManager.messages.in:
Add a message AudioSamplesStorageChanged to support using CARingBuffer to
transmit audio samples to the GPU process.

* WebKit.xcodeproj/project.pbxproj:

* WebProcess/GPU/media/RemoteAudioBusData.h: Removed.

* WebProcess/GPU/media/RemoteAudioDestinationProxy.cpp:
(WebKit::RemoteAudioDestinationProxy::RemoteAudioDestinationProxy):
(WebKit::RemoteAudioDestinationProxy::start):
(WebKit::RemoteAudioDestinationProxy::stop):
(WebKit::RemoteAudioDestinationProxy::requestBuffer):
(WebKit::RemoteAudioDestinationProxy::renderOnRenderingThead):
(WebKit::RemoteAudioDestinationProxy::storageChanged):
(WebKit::RemoteAudioDestinationProxy::renderBuffer): Deleted.
(WebKit::RemoteAudioDestinationProxy::didChangeIsPlaying): Deleted.
* WebProcess/GPU/media/RemoteAudioDestinationProxy.h:
RemoteAudioDestinationProxy is a subclass of AudioDestinationCocoa. It pulls audio
samples from the WebAudio side and use a CARingBuffer to push audio samples to
the audio output unit (managed by RemoteAudioDestination) in the GPU process.
* WebProcess/GPU/media/RemoteAudioDestinationProxy.messages.in:
Add a message RequestBuffer, which can be used by RemoteAudioDestination to ask
for (pull) audio samples.

* WebProcess/GPU/webrtc/AudioMediaStreamTrackRenderer.cpp:
(WebKit::AudioMediaStreamTrackRenderer::pushSamples): A minor fix to get rid of
a type conversion.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@268632 268f45cc-cd09-0410-ab3c-d52691b4dbfc
…ply or not

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

Reviewed by Darin Adler.

Source/WebKit:

This patch adds IPC.messages.*.isSync to indicate whether a given IPC message has a sync reply or not.

Test: TestWebKitAPI.IPCTestingAPI.AlertIsSyncMessage

* Platform/IPC/MessageArgumentDescriptions.h:
* Scripts/webkit/messages.py:
(generate_js_value_conversion_function): Fixed a typo.
(generate_js_argument_descriptions): Ditto.
(generate_message_argument_description_implementation): Generate messageIsSync function.
* WebProcess/WebPage/IPCTestingAPI.cpp:
(WebKit::JSIPC::wrapperClass): Updated the class name to match the implementation.
(WebKit::IPCTestingAPI::JSIPC::messages): Added isSync as a boolean property on message description.

Tools:

Added a test for IPC.messages.*.isSync using RunJavaScriptAlert.

* TestWebKitAPI/Tests/WebKitCocoa/IPCTestingAPI.mm:
(createWebViewWithIPCTestingAPI): Extracted to share more code between tests.
(IPCTestingAPI.AlertIsSyncMessage): Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@268633 268f45cc-cd09-0410-ab3c-d52691b4dbfc
…ASSERT ERROR domNode should not change once set

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

Reviewed by Timothy Hatcher.

Source/WebInspectorUI:

* UserInterface/Models/DOMBreakpoint.js:
(WI.DOMBreakpoint.prototype.set domNode):
Adjust the assertion such that `null` is allowed if `_domNode` is already `null`.

* UserInterface/Base/Utilities.js:
(xor): Added.
Global utility function for doing a non-bitwise or that returns `false` if both values are
truthy/falsy and the truthy value if only one is truthy.

LayoutTests:

* inspector/unit-tests/utilities.html: Added.
* inspector/unit-tests/utilities-expected.txt: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@268634 268f45cc-cd09-0410-ab3c-d52691b4dbfc
…ghlight`

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

Reviewed by Megan Gardner.

No new tests as there is no behavior change since this is purely a rename.

Source/WebCore:

* inspector/InspectorOverlay.h:
(WebCore::InspectorOverlay::Highlight::setDataFromConfig): Added.
(WebCore::Highlight::Highlight): Deleted.
(WebCore::Highlight::setDataFromConfig): Deleted.
* inspector/InspectorOverlay.cpp:
(WebCore::buildRendererHighlight):
(WebCore::buildNodeHighlight):
(WebCore::buildQuadHighlight):
(WebCore::quadToPath):
(WebCore::drawOutlinedQuadWithClip):
(WebCore::drawOutlinedQuad):
(WebCore::drawFragmentHighlight):
(WebCore::drawShapeHighlight):
(WebCore::InspectorOverlay::getHighlight const):
(WebCore::InspectorOverlay::highlightNodeList):
(WebCore::InspectorOverlay::highlightNode):
(WebCore::InspectorOverlay::highlightQuad):
(WebCore::InspectorOverlay::drawQuadHighlight):
(WebCore::InspectorOverlay::drawBounds):
(WebCore::InspectorOverlay::drawElementTitle):

* inspector/agents/InspectorDOMAgent.h:
* inspector/agents/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::highlightConfigFromInspectorObject):
(WebCore::InspectorDOMAgent::innerHighlightQuad):
(WebCore::InspectorDOMAgent::highlightNode):
(WebCore::InspectorDOMAgent::highlightNodeList):
(WebCore::InspectorDOMAgent::highlightFrame):
* inspector/InspectorController.h:
* inspector/InspectorController.cpp:
(WebCore::InspectorController::getHighlight const):
* testing/Internals.cpp:
(WebCore::Internals::inspectorHighlightRects):

Source/WebKit:

* Scripts/webkit/messages.py:
* Shared/WebCoreArgumentCoders.h:
* Shared/WebCoreArgumentCoders.cpp:
(IPC::ArgumentCoder<InspectorOverlay::Highlight>::encode): Added.
(IPC::ArgumentCoder<InspectorOverlay::Highlight>::decode): Added.
(IPC::ArgumentCoder<Highlight>::encode): Deleted.
(IPC::ArgumentCoder<Highlight>::decode): Deleted.

* WebProcess/Inspector/WebInspectorClient.cpp:
(WebKit::WebInspectorClient::highlight):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::showInspectorHighlight):

* UIProcess/ios/WKContentView.h:
* UIProcess/ios/WKContentView.mm:
(-[WKContentView _showInspectorHighlight:]):
* UIProcess/WebPageProxy.messages.in:
* UIProcess/WebPageProxy.h:
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::showInspectorHighlight):
* UIProcess/PageClient.h:
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::showInspectorHighlight):
* UIProcess/Inspector/ios/WKInspectorHighlightView.h:
* UIProcess/Inspector/ios/WKInspectorHighlightView.mm:
(-[WKInspectorHighlightView _layoutForNodeHighlight:offset:]):
(-[WKInspectorHighlightView _layoutForNodeListHighlight:]):
(-[WKInspectorHighlightView _layoutForRectsHighlight:]):
(-[WKInspectorHighlightView update:]):

Source/WebKitLegacy/mac:

* WebInspector/WebNodeHighlightView.mm:
(-[WebNodeHighlightView _layoutForNodeHighlight:parent:]):
(-[WebNodeHighlightView _layoutForRectsHighlight:parent:]):
(-[WebNodeHighlightView layoutSublayers:]):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@268635 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=217853

Reviewed by Simon Fraser.

Source/WebKit:

Add trace points to capture drawing context flushes. This encapsulates time spent encoding display lists in
preparation for IPC.

* WebProcess/GPU/graphics/RemoteImageBufferMessageHandlerProxy.cpp:
(WebKit::RemoteImageBufferMessageHandlerProxy::flushDrawingContext):
(WebKit::RemoteImageBufferMessageHandlerProxy::flushDrawingContextAndWaitCommit):

Source/WTF:

See WebKit ChangeLog for more details.

* wtf/SystemTracing.h:

Tools:

See WebKit ChangeLog for more details.

* Tracing/SystemTracePoints.plist:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@268636 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GPU Process] Introduce RemoteResourceCache to manage the resources in the GPU Process
https://bugs.webkit.org/show_bug.cgi?id=217554

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

Add a new virtual method named ImageBuffer::flushDisplayList() which
applies a DisplayList to the ImageBuffer::context().

* platform/graphics/ImageBuffer.h:
(WebCore::ImageBuffer::flushDisplayList):

Source/WebKit:
[GPU Process] Introduce RemoteResourceCacheProxy to manage the resources in the GPU Process
https://bugs.webkit.org/show_bug.cgi?id=217554

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

RemoteResourceCache will be responsible for caching the remote resources.
RemoteRenderingBackend will delegate all the resource caching to its
RemoteResourceCache.

We can get rid of RemoteImageBufferMessageHandler because all it does is
is sending messages to WebProcess. Removing it will simplify the interface
of RemoteImageBuffer. Sending the messages will be moved to RemoteRenderingBackend.

Rename flushDrawingContext() to flushDisplayList() because the name is
confusing. This function flushes a DisplayList to the context. No
DrawingContext is involved here and there is another function with the
same name which does not take any argument.

Rename ImageBufferFlushIdentifier to DisplayListFlushIdentifier to make
more general name and be ready for GPU DOM rendering.

Rename the RemoteRenderingBackendProxy messages: CreateImageBufferBackend
and CommitImageBufferFlushContext to be ImageBufferBackendWasCreated and
FlushDisplayListWasCommitted. We need to include passive verbs in them to
reflect that the actions were taken place in the GPU Process. They are
sent only to inform the Web Process with the current state.

* GPUProcess/graphics/RemoteImageBuffer.h:
(WebKit::RemoteImageBuffer::RemoteImageBuffer):
(WebKit::RemoteImageBuffer::apply):
* GPUProcess/graphics/RemoteRenderingBackend.cpp:
(WebKit::RemoteRenderingBackend::gpuConnectionToWebProcess const):
(WebKit::RemoteRenderingBackend::imageBufferBackendWasCreated):
(WebKit::RemoteRenderingBackend::flushDisplayListWasCommitted):
(WebKit::RemoteRenderingBackend::createImageBuffer):
(WebKit::RemoteRenderingBackend::flushDisplayList):
(WebKit::RemoteRenderingBackend::flushDisplayListAndCommit):
(WebKit::RemoteRenderingBackend::getImageData):
We should call the completion handler even if the ImageBuffer was not found.

(WebKit::RemoteRenderingBackend::releaseRemoteResource):
(WebKit::RemoteRenderingBackend::flushImageBufferDrawingContext): Deleted.
(WebKit::RemoteRenderingBackend::flushImageBufferDrawingContextAndCommit): Deleted.
* GPUProcess/graphics/RemoteRenderingBackend.h:
(WebKit::RemoteRenderingBackend::renderingBackendIdentifier const): Deleted.
* GPUProcess/graphics/RemoteRenderingBackend.messages.in:
* GPUProcess/graphics/RemoteResourceCache.cpp: Renamed from Source/WebKit/GPUProcess/graphics/RemoteImageBufferMessageHandler.cpp.
(WebKit::RemoteResourceCache::cacheImageBuffer):
(WebKit::RemoteResourceCache::cachedImageBuffer):
(WebKit::RemoteResourceCache::releaseRemoteResource):
* GPUProcess/graphics/RemoteResourceCache.h: Renamed from Source/WebKit/GPUProcess/graphics/RemoteImageBufferMessageHandler.h.
* Scripts/webkit/messages.py:
* Sources.txt:
* WebKit.xcodeproj/project.pbxproj:
* WebProcess/GPU/graphics/DisplayListFlushIdentifier.h: Renamed from Source/WebKit/WebProcess/GPU/graphics/ImageBufferFlushIdentifier.h.
* WebProcess/GPU/graphics/RemoteImageBufferMessageHandlerProxy.cpp:
(WebKit::RemoteImageBufferMessageHandlerProxy::waitForImageBufferBackendWasCreated):
(WebKit::RemoteImageBufferMessageHandlerProxy::waitForFlushDisplayListWasCommitted):
(WebKit::RemoteImageBufferMessageHandlerProxy::flushDisplayList):
(WebKit::RemoteImageBufferMessageHandlerProxy::flushDisplayListAndWaitCommit):
(WebKit::RemoteImageBufferMessageHandlerProxy::commitFlushContext):
(WebKit::RemoteImageBufferMessageHandlerProxy::waitForCreateImageBufferBackend): Deleted.
(WebKit::RemoteImageBufferMessageHandlerProxy::waitForCommitImageBufferFlushContext): Deleted.
(WebKit::RemoteImageBufferMessageHandlerProxy::flushDrawingContext): Deleted.
(WebKit::RemoteImageBufferMessageHandlerProxy::flushDrawingContextAndWaitCommit): Deleted.
* WebProcess/GPU/graphics/RemoteImageBufferMessageHandlerProxy.h:
* WebProcess/GPU/graphics/RemoteImageBufferProxy.h:
* WebProcess/GPU/graphics/RemoteRenderingBackendProxy.cpp:
(WebKit::RemoteRenderingBackendProxy::waitForImageBufferBackendWasCreated):
(WebKit::RemoteRenderingBackendProxy::waitForFlushDisplayListWasCommitted):
(WebKit::RemoteRenderingBackendProxy::imageBufferBackendWasCreated):
(WebKit::RemoteRenderingBackendProxy::flushDisplayListWasCommitted):
(WebKit::RemoteRenderingBackendProxy::waitForCreateImageBufferBackend): Deleted.
(WebKit::RemoteRenderingBackendProxy::waitForCommitImageBufferFlushContext): Deleted.
(WebKit::RemoteRenderingBackendProxy::createImageBufferBackend): Deleted.
(WebKit::RemoteRenderingBackendProxy::commitImageBufferFlushContext): Deleted.
* WebProcess/GPU/graphics/RemoteRenderingBackendProxy.h:
* WebProcess/GPU/graphics/RemoteRenderingBackendProxy.messages.in:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@268637 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=217867
<rdar://problem/70400846>

Reviewed by Darin Adler.

Source/WebCore:

I made a typo.

Test: fast/text/synthetic-oblique.html

* platform/graphics/FontCascade.h:
(WebCore::FontCascade::syntheticObliqueAngle):
* platform/graphics/coretext/FontCascadeCoreText.cpp:
(WebCore::computeOverallTextMatrix):

LayoutTests:

* fast/text/synthetic-oblique-expected.html: Added.
* fast/text/synthetic-oblique.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@268638 268f45cc-cd09-0410-ab3c-d52691b4dbfc
…g with icecc and toolchains aren't generated yet

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

Patch by Philippe Normand <pnormand@igalia.com> on 2020-10-17
Reviewed by Fujii Hironori.

* flatpak/flatpakutils.py:
(WebkitFlatpak.run_in_sandbox): Gracefully exit with an error message when the icecc
configuration failed to complete.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@268639 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=217854

Reviewed by Yusuke Suzuki.

JSTests:

* stress/array-prototype-splice-making-typed-array.js:
* stress/array-species-config-array-constructor.js:
* stress/delete-property-dfg-inline.js:
* stress/float32array-out-of-bounds.js:
* stress/put-direct-index-broken-2.js:
* stress/typedarray-access-monomorphic-neutered.js:
* stress/typedarray-access-neutered.js:
* stress/typedarray-configure-index.js:
* stress/typedarray-functions-with-neutered.js:
* stress/typedarray-getownproperty.js: Renamed from JSTests/stress/typedarray-getownproperty-not-configurable.js.
* stress/typed-array-canonical-numeric-index-string.js:
Adjust tests.

* test262/expectations.yaml:
Address all test failures under built-ins/TypedArrayConstructors/internals.
Note that there are a slew of corrections needed for these test cases,
which were discovered in the course of working on this patch:
tc39/test262#2833 (comment)
Accordingly, these remaining lines should all disappear in the future.

Source/JavaScriptCore:

This patch addresses tc39/ecma262#2164,
which aligns detached buffer semantics in typed arrays with web reality.

In particular:
- [[HasProperty]] must not throw
- IntegerIndexedElementGet (i.e. [[GetOwnProperty]] and [[Get]]) must not throw
- IntegerIndexedElementSet (i.e. [[DefineOwnProperty]] and [[Set]]) must not throw
- Integer-indexed elements must be [[Configurable]] (to avoid breaking a [[HasProperty]] invariant)
- [[Delete]] must be overridden to return false for integer-indexed elements (which are *not* deletable)

This patch furthermore ensures that all of these essential internal methods have a spec-perfect implementation.

Note that there are a couple of interesting ripple effects here:
- The fill(), sort(), and set() methods should throw explicitly, but we'd been letting [[Get]] throw instead.
- Other callback-taking methods should *not* throw anymore; they only did so implicitly via [[Get]] and [[Set]].

* builtins/TypedArrayPrototype.js:
(fill):
(sort):
* runtime/JSGenericTypedArrayView.h:
* runtime/JSGenericTypedArrayViewInlines.h:
(JSC::JSGenericTypedArrayView<Adaptor>::set):
(JSC::JSGenericTypedArrayView<Adaptor>::getOwnPropertySlot):
(JSC::JSGenericTypedArrayView<Adaptor>::put):
(JSC::JSGenericTypedArrayView<Adaptor>::defineOwnProperty):
(JSC::JSGenericTypedArrayView<Adaptor>::deleteProperty):
(JSC::JSGenericTypedArrayView<Adaptor>::getOwnPropertySlotByIndex):
(JSC::JSGenericTypedArrayView<Adaptor>::deletePropertyByIndex):
* runtime/JSGlobalObjectFunctions.h:
* runtime/JSObjectInlines.h:
(JSC::JSObject::getPropertySlot):
(JSC::JSObject::getNonIndexPropertySlot):
* runtime/JSTypedArrays.cpp:

LayoutTests:

* fast/canvas/webgl/arraybuffer-transfer-of-control.html:
* js/dom/dfg-typed-array-neuter-expected.txt:
* js/dom/getOwnPropertyDescriptor-expected.txt:
* js/dom/script-tests/dfg-typed-array-neuter.js:
* js/resources/getOwnPropertyDescriptor.js:
Adjust tests.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@268640 268f45cc-cd09-0410-ab3c-d52691b4dbfc
@pulkomandy
Copy link
Member

This branch does not build for me. Is it a plan to waste the time of other developers again, or what?

antti@apple.com and others added 14 commits October 17, 2020 12:21
…ng code

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

Reviewed by Zalan Bujtas.

Fixes fast/images/exif-orientation-background.html and similar.

* layout/integration/LayoutIntegrationLineLayout.cpp:
(WebCore::LayoutIntegration::LineLayout::paint):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@268641 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=217832

Reviewed by Antti Koivisto.

This patch introduces the layout bounds concept on the inline boxes.
It help with implementing https://www.w3.org/TR/css-inline-3/#line-layout (2.2. Layout Within Line Boxes)
where layout bounds are used extensively (essentially the layout bound drives the inline box's aligned vertical
position within the line box -as opposed to its logical height. Though they may match in many cases.)

With this patch nested inline boxes are positioned relative to their parent inline boxes and
LineBox::logicalRectForInlineLevelBox/logicalRectForTextRun resolves them to be relative to the line box (which then used for
generating display inline runs with relative to the line coordinates).

* layout/inlineformatting/InlineFormattingContext.cpp:
(WebCore::Layout::InlineFormattingContext::computeGeometryForLineContent):
* layout/inlineformatting/InlineFormattingContextGeometry.cpp:
(WebCore::Layout::LineBoxBuilder::build):
(WebCore::Layout::LineBoxBuilder::setVerticalGeometryForInlineBox const):
(WebCore::Layout::LineBoxBuilder::constructInlineLevelBoxes):
(WebCore::Layout::LineBoxBuilder::alignInlineLevelBoxesVerticallyAndComputeLineBoxHeight):
(WebCore::Layout::InlineFormattingContext::Geometry::computedLineLogicalRect const):
(WebCore::Layout::LineBoxBuilder::adjustInlineBoxesLogicalHeight): Deleted.
* layout/inlineformatting/InlineLineBox.cpp:
(WebCore::Layout::LineBox::logicalRectForTextRun const):
(WebCore::Layout::LineBox::logicalRectForInlineLevelBox const):
* layout/inlineformatting/InlineLineBox.h:
(WebCore::Layout::LineBox::InlineLevelBox::LayoutBounds::height const):
(WebCore::Layout::LineBox::InlineLevelBox::setLayoutBounds):
(WebCore::Layout::LineBox::InlineLevelBox::layoutBounds const):
(WebCore::Layout::LineBox::InlineLevelBox::lineSpacing const): Deleted.
(WebCore::Layout::LineBox::InlineLevelBox::setLineSpacing): Deleted.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@268642 268f45cc-cd09-0410-ab3c-d52691b4dbfc
…ctAndLineBoxOffset

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

Reviewed by Antti Koivisto.

After webkit.org/b/217832, the line box offset is always 0 (line space offsetting has moved to the inline box alignment).

* layout/inlineformatting/InlineFormattingContext.cpp:
(WebCore::Layout::InlineFormattingContext::computeGeometryForLineContent):
* layout/inlineformatting/InlineFormattingContext.h:
* layout/inlineformatting/InlineFormattingContextGeometry.cpp:
(WebCore::Layout::InlineFormattingContext::Geometry::computedLineLogicalRect const):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@268643 268f45cc-cd09-0410-ab3c-d52691b4dbfc
…rtical margin

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

Reviewed by Antti Koivisto.

RenderBox::setLocation takes the border box location. Let's not include the margin before value.
(Atomic inline level box runs include the margin box per spec, see https://www.w3.org/TR/css-inline-3/#line-layout)

* layout/integration/LayoutIntegrationLineLayout.cpp:
(WebCore::LayoutIntegration::LineLayout::constructContent):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@268644 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=217875

Reviewed by Antti Koivisto.

While the generated runs have the correct geometry (they are painted at the correct position), the associated box
geometry is incorrect which results in broken render tree dumps and incorrect geometry related DOM values.
In this patch we use the correct LineBox API to get the InlineLevelBox's geometry (LineBox::InlineLevelBox::logicalRect is relative to the parent inline box and not relative to the line box).

* layout/inlineformatting/InlineFormattingContext.cpp:
(WebCore::Layout::InlineFormattingContext::computeGeometryForLineContent):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@268645 268f45cc-cd09-0410-ab3c-d52691b4dbfc
…x to make them more manageable

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

Reviewed by Simon Fraser.

* WebView/WebPreferencesPrivate.h:
Switch to using the @Property syntax. No behavior change intended, just a cleanup.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@268646 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Preferences] Add infrastructure for generating preferences for Windows WebKitLegacy
https://bugs.webkit.org/show_bug.cgi?id=217876

Reviewed by Simon Fraser.

* PlatformWin.cmake:
Add generation of WebPreferences.

Source/WebKitLegacy/win:
[Preferences] Add infrastructure for generating preferences for WWindows WebKitLegacy
https://bugs.webkit.org/show_bug.cgi?id=217876

Reviewed by Simon Fraser.

* Scripts: Added.
* Scripts/PreferencesTemplates: Added.
* Scripts/PreferencesTemplates/WebPreferencesDefinitions.h.erb: Added.
* Scripts/PreferencesTemplates/WebViewPreferencesChangedGenerated.cpp.erb: Added.
Adds mostly empty generated files to establish infrastructure for generation.

* WebPreferences.cpp:
(WebPreferences::initializeDefaultSettings):
* WebView.cpp:
(WebView::notifyPreferencesChanged):
* WebView.h:
Adopt generated files, which currently don't do anything.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@268647 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=217846

Reviewed by Ryosuke Niwa.

LayoutTests/imported/w3c:

* web-platform-tests/dom/idlharness.window-expected.txt:
Updated test result for progression.

Source/WebCore:

This makes us more accurately match the DOM specification, makes Range
and StaticRange objects slightly bigger since they now have a virtual
table pointer, and makes the AbstractRange methods a bit slower to call
from JavaScript since they are backed by C++ virtual functions.

* CMakeLists.txt: Added AbstractRange files.
* DerivedSources-input.xcfilelist: Ditto.
* DerivedSources-output.xcfilelist: Ditto.
* DerivedSources.make: Ditto.
* Headers.cmake: Ditto.
* Sources.txt: Ditto.
* WebCore.xcodeproj/project.pbxproj: Ditto.
Also removed reference to non-existent JSAudioNodeCustom.cpp and moved
JSStaticRange file from the Events group into the Ranges group.

* bindings/js/JSAbstractRangeCustom.cpp: Added.
(WebCore::toJS): Added. Just the default implementation. Would be
nice if we did not have to write this.
(WebCore::toJSNewlyCreated): Make either a StaticRange or Range
wrapper depending on whether this is a live range or not.

* bindings/js/JSEventCustom.cpp: Removed lots of unneeded includes.
(WebCore::toJS): Stopped using "using namespace JSC".

* bindings/js/WebCoreBuiltinNames.h: Added AbstractRange.

* dom/AbstractRange.cpp: Added.
(WebCore::makeSimpleRange): Added.
* dom/AbstractRange.h: Added.
* dom/AbstractRange.idl: Added.

* dom/Range.h: Changed to derive from AbstractRange instead of
from RefCounted. Also marked this final since it's now polymorphic.
Marked all the functions that override final as well, to check that
they correctly override the virtual functions in the base class.
Added private isLiveRange function override that returns true.
Added SPECIALIZE_TYPE_TRAITS_BEGIN/END so we can do is<Range>.

* dom/Range.idl: Removed ImplementationLacksVTable. Added
JSGenerateToNativeObject. Inherit from AbstractRange.
Removed the 5 attribute getters that are now inherited from AbstractRange.

* dom/StaticRange.h: Changed to derive from AbstractRange instead of
from RefCounted. Also marked this final since it's now polymorphic.
Added functions to override the ones from StaticRange, calling through
to the ones from SimpleRange (I thought there was a way to do this
with using, but I couldn't figure that out). Added private isLiveRange
function override that returns false. Added SPECIALIZE_TYPE_TRAITS_BEGIN/END
so we can do is<StaticRange>.

* dom/StaticRange.idl: Removed EnabledBySetting=InputEvents since
this should now always be included. I think we should probably remove the
InputEvents setting now entirely. Removed ImplementationLacksVTable.
Added JSGenerateToNativeObject. Inherit from AbstractRange.
Removed all 5 attribute getters, which are now inherited from AbstractRange.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@268648 268f45cc-cd09-0410-ab3c-d52691b4dbfc
…ource clang

<https://webkit.org/b/217882>

Reviewed by Tim Horton.

* UIProcess/Cocoa/WebViewImpl.mm:
(WebKit::WebViewImpl::accessibilityAttributeValue):
- Fix indentation of source to match what it is doing.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@268649 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=217883

It seems I made a late adjustment that test262 was unhappy with; this reverts just that line.

* runtime/JSGenericTypedArrayViewInlines.h:
(JSC::JSGenericTypedArrayView<Adaptor>::defineOwnProperty):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@268650 268f45cc-cd09-0410-ab3c-d52691b4dbfc
…rom SimpleRange

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

Reviewed by Sam Weinig.

Rysouke has suggested that we change Range so it can derive from SimpleRange.
Specifically, AbstractRange will derive from SimpleRange, and both StaticRange
and Range will continue to derive from that, and almost all functions will be
non-virtual. Doing this means we will lose the likely-unimportant "lazy offset"
that Range has today, where boundary point offsets are only computed on demand.
This patch removes that optimization without changing anything else, so we can
do performance tests and bisecting on just this part of the change.

* dom/RangeBoundaryPoint.h: Rename m_offset and m_childBefore and don't use
an Optional for the offset any more.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@268651 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Merge commit '1acd9d1facd68062739ddcefc60c5f2618c0a09c' to HEAD
@kenmays kenmays closed this Oct 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants