WebKit-https.git
2 months agoImplementation for AXIsolatedObject::nextSibling and previousSibling.
andresg_22@apple.com [Sat, 19 Sep 2020 18:52:36 +0000 (18:52 +0000)]
Implementation for AXIsolatedObject::nextSibling and previousSibling.
https://bugs.webkit.org/show_bug.cgi?id=216710

Reviewed by Chris Fleizach.

Implementation for AXIsolatedObject::previousSibling and nextSibling which
are invoked by VoiceOver in Safari Reader mode.

* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::previousSibling const):
- Fixed crash caused by dereferencing m_renderer->parent() which can be null.
- Added check for the AXObjectCache that can become null.
(WebCore::AccessibilityRenderObject::nextSibling const):
- Code style cleanup.
* accessibility/isolatedtree/AXIsolatedObject.cpp:
(WebCore::AXIsolatedObject::initializeAttributeData):
- Added caching of next/previousSiblling objects.
(WebCore::AXIsolatedObject::previousSibling const): Inlined in header..
(WebCore::AXIsolatedObject::nextSibling const): Inlined in header.
* accessibility/isolatedtree/AXIsolatedObject.h:
* accessibility/isolatedtree/AXIsolatedTree.h:

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

2 months agoPerformance and PerformanceNavigation interfaces are missing toJSON operations
weinig@apple.com [Sat, 19 Sep 2020 17:07:06 +0000 (17:07 +0000)]
Performance and PerformanceNavigation interfaces are missing toJSON operations
https://bugs.webkit.org/show_bug.cgi?id=216728

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Update results now that we pass more subtests.

* web-platform-tests/hr-time/idlharness.any-expected.txt:
* web-platform-tests/hr-time/idlharness.any.worker-expected.txt:
* web-platform-tests/hr-time/performance-tojson-expected.txt:

Source/WebCore:

Add missing toJSON operations to Performance and PerformanceNavigation and update
comments in related IDLs.

Updates results for existing tests, more of which now pass.

* page/Performance.idl:
* page/PerformanceMark.idl:
* page/PerformanceMeasure.idl:
* page/PerformanceNavigation.idl:
* page/PerformanceTiming.idl:

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

2 months ago[LFC][IFC] InlineFormattingContext::computeGeometryForLineContent should not construc...
zalan@apple.com [Sat, 19 Sep 2020 16:46:56 +0000 (16:46 +0000)]
[LFC][IFC] InlineFormattingContext::computeGeometryForLineContent should not construct Display::Lines
https://bugs.webkit.org/show_bug.cgi?id=216723

Reviewed by Antti Koivisto.

Display::Lines construction should live in the display builder. However currently we don't yet have a real builder, so let's
just use the integration layer.
This is also in preparation for removing all the Display::InlineContent code from the Layout namespace.

* layout/displaytree/DisplayPainter.cpp:
(WebCore::Display::paintInlineContent):
* layout/inlineformatting/InlineFormattingContext.cpp:
(WebCore::Layout::InlineFormattingContext::computeGeometryForLineContent):
* layout/integration/LayoutIntegrationLineLayout.cpp:
(WebCore::LayoutIntegration::LineLayout::layout):
(WebCore::LayoutIntegration::LineLayout::constructDisplayContent):
* layout/integration/LayoutIntegrationLineLayout.h:

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

2 months agoResync web-platform-tests/hr-time from upstream
weinig@apple.com [Sat, 19 Sep 2020 15:05:55 +0000 (15:05 +0000)]
Resync web-platform-tests/hr-time from upstream
https://bugs.webkit.org/show_bug.cgi?id=216724

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Resync web-platform-tests/hr-time from upstream.

* web-platform-tests/hr-time/META.yml: Added.
* web-platform-tests/hr-time/OWNERS: Removed.
* web-platform-tests/hr-time/idlharness-expected.txt: Removed.
* web-platform-tests/hr-time/idlharness.any-expected.txt: Added.
* web-platform-tests/hr-time/idlharness.any.html: Added.
* web-platform-tests/hr-time/idlharness.any.js: Added.
* web-platform-tests/hr-time/idlharness.any.worker-expected.txt: Added.
* web-platform-tests/hr-time/idlharness.any.worker.html: Added.
* web-platform-tests/hr-time/idlharness.html: Removed.
* web-platform-tests/hr-time/monotonic-clock.any.js:
* web-platform-tests/hr-time/performance-tojson-expected.txt: Added.
* web-platform-tests/hr-time/performance-tojson.html: Added.
* web-platform-tests/hr-time/resources/unload-a.html: Added.
* web-platform-tests/hr-time/resources/unload-b.html: Added.
* web-platform-tests/hr-time/resources/unload-c.html: Added.
* web-platform-tests/hr-time/resources/unload.js: Added.
* web-platform-tests/hr-time/resources/w3c-import.log:
* web-platform-tests/hr-time/timeOrigin-expected.txt:
* web-platform-tests/hr-time/w3c-import.log:
* web-platform-tests/hr-time/window-worker-timeOrigin.window-expected.txt: Added.
* web-platform-tests/hr-time/window-worker-timeOrigin.window.html: Added.

LayoutTests:

* platform/ios/TestExpectations:
* platform/mac/TestExpectations:
Update paths in expectations.

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

2 months agoSelection API: Extend lifetime of selection live range to preserve expando properties
darin@apple.com [Sat, 19 Sep 2020 14:48:06 +0000 (14:48 +0000)]
Selection API: Extend lifetime of selection live range to preserve expando properties
https://bugs.webkit.org/show_bug.cgi?id=216721

Reviewed by Ryosuke Niwa.

Source/WebCore:

Test: editing/selection/expando.html

* dom/Range.cpp:
(WebCore::Range::window): Added. Returns window if range is associated with selection.
* dom/Range.h: Added window.
* dom/Range.idl: Added GenerateIsReachable=ReachableFromDOMWindow.

* editing/FrameSelection.cpp:
(WebCore::FrameSelection::disassociateLiveRange): Removed a FIXME comment about the
need for this fix.
(WebCore::FrameSelection::updateAssociatedLiveRange): Added a comment explaining
why an associated live range might not be contained in the document.

LayoutTests:

* editing/selection/expando-expected.txt: Added.
* editing/selection/expando.html: Added.

* TestExpectations: Skip the new test since DumpRenderTree doesn't support enabling
internal properties.
* platform/wk2/TestExpectations: Unskip the new test since WebKitTestRunner does.

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

2 months agoAdd support for Settings equivilent of RuntimeConditionallyReadWrite
weinig@apple.com [Sat, 19 Sep 2020 14:22:11 +0000 (14:22 +0000)]
Add support for Settings equivilent of RuntimeConditionallyReadWrite
https://bugs.webkit.org/show_bug.cgi?id=216697

Reviewed by Darin Adler.

Adds a new extended attribute, [SettingsConditionallyReadWrite] to allow users of
[RuntimeConditionallyReadWrite] to convert from RuntimeEnabledFeatures to Settings.

* bindings/scripts/CodeGeneratorJS.pm:
(NeedsRuntimeReadWriteCheck):
(GeneratePropertiesHashTable):
(GenerateRuntimeEnableConditionalString):
(GenerateImplementation):
* bindings/scripts/IDLAttributes.json:
Adds new extended attribute.

* bindings/scripts/test/DOMWindowConstructors.idl:
* bindings/scripts/test/JS/JSDOMWindow.cpp:
* bindings/scripts/test/JS/JSTestConditionallyReadWrite.cpp: Added.
* bindings/scripts/test/JS/JSTestConditionallyReadWrite.h: Added.
* bindings/scripts/test/JS/JSTestObj.cpp:
* bindings/scripts/test/SupplementalDependencies.dep:
* bindings/scripts/test/TestConditionallyReadWrite.idl: Added.
* bindings/scripts/test/TestObj.idl:
Move conditionally read-write tests to a new test, TestConditionallyReadWrite.idl and
update results.

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

2 months agoRemove runtime setting for enabling/disabling the CrossOriginResourcePolicy API
weinig@apple.com [Sat, 19 Sep 2020 14:20:18 +0000 (14:20 +0000)]
Remove runtime setting for enabling/disabling the CrossOriginResourcePolicy API
https://bugs.webkit.org/show_bug.cgi?id=216561

Reviewed by Darin Adler.

Remove runtime setting for enabling/disabling CrossOriginResourcePolicy. It has been
enabled by default for a while and there are no known reasons one would need to
disable it.

Source/WebCore:

* page/RuntimeEnabledFeatures.h:
(WebCore::RuntimeEnabledFeatures::setCrossOriginResourcePolicyEnabled): Deleted.
(WebCore::RuntimeEnabledFeatures::crossOriginResourcePolicyEnabled const): Deleted.

Source/WebKit:

* Shared/WebPreferences.yaml:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetCrossOriginResourcePolicyEnabled):
(WKPreferencesGetCrossOriginResourcePolicyEnabled):
* UIProcess/API/C/WKPreferencesRef.h:
* WebProcess/Network/WebLoaderStrategy.cpp:
(WebKit::WebLoaderStrategy::scheduleLoadFromNetworkProcess):

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

2 months agoASSERTION FAILED: &formattingContextRoot == m_rootContainer.get() in WebCore::Layout...
simon.fraser@apple.com [Sat, 19 Sep 2020 12:54:52 +0000 (12:54 +0000)]
ASSERTION FAILED: &formattingContextRoot == m_rootContainer.get() in WebCore::Layout::LayoutState::establishedInlineFormattingState
https://bugs.webkit.org/show_bug.cgi?id=216668

Reviewed by Zalan Bujtas.

Display::View didn't unparent the GraphicsLayers when Document::documentWillBecomeInactive() was called,
so a layer pointing to an old LayoutState would try to paint.

Fix by plumbing setIsInWindow() through to Display::View and using it to detach the root layer.

* dom/Document.cpp:
(WebCore::Document::documentWillBecomeInactive): The ASSERT_IMPLIES() is there to ensure that this isn't
a behavior change; we used to go to RenderView directly, and now go via FrameView.
* layout/display/DisplayLayerController.cpp:
(WebCore::Display::LayerController::detachRootLayer):
(WebCore::Display::LayerController::setIsInWindow):
* layout/display/DisplayLayerController.h:
* layout/display/DisplayView.cpp:
(WebCore::Display::View::setIsInWindow):
* layout/display/DisplayView.h:
* page/FrameView.cpp:
(WebCore::FrameView::setIsInWindow):

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

2 months ago[GTK] API test /webkit/WebKitWebView/usermedia-enumeratedevices-permission-check...
dpino@igalia.com [Sat, 19 Sep 2020 06:42:17 +0000 (06:42 +0000)]
[GTK] API test /webkit/WebKitWebView/usermedia-enumeratedevices-permission-check is crashing

* TestWebKitAPI/glib/TestExpectations.json:

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

2 months ago[LFC][IFC] Do not use Display::Line geometry in layout
zalan@apple.com [Sat, 19 Sep 2020 02:52:49 +0000 (02:52 +0000)]
[LFC][IFC] Do not use Display::Line geometry in layout
https://bugs.webkit.org/show_bug.cgi?id=216711

Reviewed by Simon Fraser.

This patch introduces Layout::LineGeometry.
LineGeometry is used to hold the logical geometry of line and it is input to subsequent layouts.
This patch is also in preparation for moving out the "displayInlineItem" construction from Layout::InlineFormattingContext.

* WebCore.xcodeproj/project.pbxproj:
* layout/FormattingContextGeometry.cpp:
(WebCore::Layout::FormattingContext::Geometry::contentHeightForFormattingContextRoot const):
* layout/Verification.cpp:
(WebCore::Layout::outputMismatchingComplexLineInformationIfNeeded):
* layout/blockformatting/BlockFormattingContextGeometry.cpp:
(WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedHeightAndMargin):
* layout/blockformatting/BlockMarginCollapse.cpp:
(WebCore::Layout::BlockFormattingContext::MarginCollapse::marginsCollapseThrough const):
* layout/displaytree/DisplayLine.h:
(WebCore::Display::Line::rect const):
(WebCore::Display::Line::scrollableOverflow const):
(WebCore::Display::Line::inkOverflow const):
(WebCore::Display::Line::baseline const):
(WebCore::Display::Line::Line):
(WebCore::Display::Line::left const): Deleted.
(WebCore::Display::Line::right const): Deleted.
(WebCore::Display::Line::top const): Deleted.
(WebCore::Display::Line::bottom const): Deleted.
(WebCore::Display::Line::width const): Deleted.
(WebCore::Display::Line::height const): Deleted.
(WebCore::Display::Line::moveVertically): Deleted.
* layout/displaytree/DisplayPainter.cpp:
(WebCore::Display::paintInlineContent):
* layout/inlineformatting/InlineFormattingContext.cpp:
(WebCore::Layout::InlineFormattingContext::lineLayout):
(WebCore::Layout::InlineFormattingContext::computeGeometryForLineContent):
(WebCore::Layout::InlineFormattingContext::invalidateFormattingState):
* layout/inlineformatting/InlineFormattingContextGeometry.cpp:
(WebCore::Layout::LineBoxBuilder::constructInlineBoxes):
* layout/inlineformatting/InlineFormattingState.h:
(WebCore::Layout::InlineFormattingState::lines const):
(WebCore::Layout::InlineFormattingState::lines):
(WebCore::Layout::InlineFormattingState::addLine):
(WebCore::Layout::InlineFormattingState::clearLineAndRuns):
(WebCore::Layout::InlineFormattingState::shrinkDisplayInlineContent):
(WebCore::Layout::InlineFormattingState::clearDisplayInlineContent): Deleted.
* layout/inlineformatting/InlineLineBuilder.cpp:
* layout/inlineformatting/InlineLineBuilder.h:
* layout/inlineformatting/InlineLineGeometry.h: Added.
(WebCore::Layout::InlineLineGeometry::logicalLeft const):
(WebCore::Layout::InlineLineGeometry::logicalRight const):
(WebCore::Layout::InlineLineGeometry::logicalTop const):
(WebCore::Layout::InlineLineGeometry::logicalBottom const):
(WebCore::Layout::InlineLineGeometry::logicalWidth const):
(WebCore::Layout::InlineLineGeometry::logicalHeight const):
(WebCore::Layout::InlineLineGeometry::logicalRect const):
(WebCore::Layout::InlineLineGeometry::lineBoxLogicalRect const):
(WebCore::Layout::InlineLineGeometry::baseline const):
(WebCore::Layout::InlineLineGeometry::moveVertically):
(WebCore::Layout::InlineLineGeometry::InlineLineGeometry):
* layout/inlineformatting/InlineTextItem.h:
* layout/integration/LayoutIntegrationLineLayout.cpp:
(WebCore::LayoutIntegration::LineLayout::contentLogicalHeight const):
(WebCore::LayoutIntegration::LineLayout::lineCount const):
(WebCore::LayoutIntegration::LineLayout::firstLineBaseline const):
(WebCore::LayoutIntegration::LineLayout::lastLineBaseline const):
(WebCore::LayoutIntegration::LineLayout::paint):
* layout/layouttree/LayoutTreeBuilder.cpp:
(WebCore::Layout::outputInlineRuns):
* layout/tableformatting/TableFormattingContext.cpp:
(WebCore::Layout::TableFormattingContext::setUsedGeometryForCells):
* layout/tableformatting/TableFormattingContextGeometry.cpp:
(WebCore::Layout::TableFormattingContext::Geometry::usedBaselineForCell):

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

2 months agoImport remaining webaudio layout tests from Blink
cdumez@apple.com [Sat, 19 Sep 2020 02:20:51 +0000 (02:20 +0000)]
Import remaining webaudio layout tests from Blink
https://bugs.webkit.org/show_bug.cgi?id=216719

Reviewed by Darin Adler.

Import remaining webaudio tests from Blink that we had not imported yet.

* TestExpectations:
* webaudio/BiquadFilter/biquad-829349-expected.txt: Added.
* webaudio/BiquadFilter/biquad-829349.html: Added.
* webaudio/BiquadFilter/tail-time-allpass-expected.txt: Added.
* webaudio/BiquadFilter/tail-time-allpass.html: Added.
* webaudio/BiquadFilter/tail-time-bandpass-expected.txt: Added.
* webaudio/BiquadFilter/tail-time-bandpass.html: Added.
* webaudio/BiquadFilter/tail-time-highpass-expected.txt: Added.
* webaudio/BiquadFilter/tail-time-highpass.html: Added.
* webaudio/BiquadFilter/tail-time-highshelf-expected.txt: Added.
* webaudio/BiquadFilter/tail-time-highshelf.html: Added.
* webaudio/BiquadFilter/tail-time-lowpass-expected.txt: Added.
* webaudio/BiquadFilter/tail-time-lowpass.html: Added.
* webaudio/BiquadFilter/tail-time-lowshelf-expected.txt: Added.
* webaudio/BiquadFilter/tail-time-lowshelf.html: Added.
* webaudio/BiquadFilter/tail-time-notch-expected.txt: Added.
* webaudio/BiquadFilter/tail-time-notch.html: Added.
* webaudio/BiquadFilter/tail-time-peaking-expected.txt: Added.
* webaudio/BiquadFilter/tail-time-peaking.html: Added.
* webaudio/BiquadFilter/test-tail-time.js: Added.
(testTailTime):
* webaudio/BiquadFilter/unstable-filter-warning-expected.txt: Added.
* webaudio/BiquadFilter/unstable-filter-warning.html: Added.
* webaudio/ChannelMerger/audiochannelmerger-cycle-expected.txt: Added.
* webaudio/ChannelMerger/audiochannelmerger-cycle.html: Added.
* webaudio/Convolver/unmmodified-buffer-expected.txt: Copied from LayoutTests/webaudio/convolvernode-unmodified-buffer-expected.txt.
* webaudio/Convolver/unmmodified-buffer.html: Renamed from LayoutTests/webaudio/convolvernode-unmodified-buffer.html.
* webaudio/DynamicsCompressor/dynamicscompressor-clear-internal-state-expected.txt: Added.
* webaudio/DynamicsCompressor/dynamicscompressor-clear-internal-state.html: Added.
* webaudio/DynamicsCompressor/dynamicscompressor-simple-expected.txt: Added.
* webaudio/DynamicsCompressor/dynamicscompressor-simple.html: Added.
* webaudio/IIRFilter/iir-tail-time-expected.txt: Added.
* webaudio/IIRFilter/iir-tail-time.html: Added.
* webaudio/IIRFilter/iir-unstable-expected.txt: Added.
* webaudio/IIRFilter/iir-unstable.html: Added.
* webaudio/IIRFilter/unstable-filter-warning-expected.txt: Added.
* webaudio/IIRFilter/unstable-filter-warning.html: Added.
* webaudio/MediaElementAudioSource/mediaelementaudiosourcenode-expected.txt: Added.
* webaudio/MediaElementAudioSource/mediaelementaudiosourcenode.html: Added.
* webaudio/MediaElementAudioSource/resampling-crash-expected.txt: Added.
* webaudio/MediaElementAudioSource/resampling-crash.html: Added.
* webaudio/MediaStreamAudioDestination/create-in-destroyed-context-expected.txt: Added.
* webaudio/MediaStreamAudioDestination/create-in-destroyed-context.html: Added.
* webaudio/MediaStreamAudioDestination/mediastreamaudiodestinationnode-expected.txt: Added.
* webaudio/MediaStreamAudioDestination/mediastreamaudiodestinationnode.html: Added.
* webaudio/MediaStreamAudioSource/ctor-mediastreamaudiosource-expected.txt: Added.
* webaudio/MediaStreamAudioSource/ctor-mediastreamaudiosource.html: Added.
* webaudio/MediaStreamAudioSource/mediastreamaudiosourcenode-expected.txt: Added.
* webaudio/MediaStreamAudioSource/mediastreamaudiosourcenode.html: Added.
* webaudio/OfflineAudioContext/offlineaudiocontext-constructor-expected.txt: Added.
* webaudio/OfflineAudioContext/offlineaudiocontext-constructor.html: Added.
* webaudio/OfflineAudioContext/offlineaudiocontext-event-listener-gc-expected.txt: Added.
* webaudio/OfflineAudioContext/offlineaudiocontext-event-listener-gc.html: Added.
* webaudio/OfflineAudioContext/offlineaudiocontext-promise-basic-expected.txt: Added.
* webaudio/OfflineAudioContext/offlineaudiocontext-promise-basic.html: Added.
* webaudio/OfflineAudioContext/offlineaudiocontext-promise-expected.txt: Copied from LayoutTests/webaudio/convolvernode-unmodified-buffer-expected.txt.
* webaudio/OfflineAudioContext/offlineaudiocontext-promise.html: Added.
* webaudio/OfflineAudioContext/offlineaudiocontext-suspend-resume-basic-expected.txt: Renamed from LayoutTests/webaudio/offlineaudiocontext-suspend-resume-basic-expected.txt.
* webaudio/OfflineAudioContext/offlineaudiocontext-suspend-resume-basic.html: Renamed from LayoutTests/webaudio/offlineaudiocontext-suspend-resume-basic.html.
* webaudio/OfflineAudioContext/offlineaudiocontext-suspend-resume-eventhandler-expected.txt: Renamed from LayoutTests/webaudio/offlineaudiocontext-suspend-resume-eventhandler-expected.txt.
* webaudio/OfflineAudioContext/offlineaudiocontext-suspend-resume-eventhandler.html: Renamed from LayoutTests/webaudio/offlineaudiocontext-suspend-resume-eventhandler.html.
* webaudio/OfflineAudioContext/offlineaudiocontext-suspend-resume-graph-manipulation-expected.txt: Renamed from LayoutTests/webaudio/offlineaudiocontext-suspend-resume-graph-manipulation-expected.txt.
* webaudio/OfflineAudioContext/offlineaudiocontext-suspend-resume-graph-manipulation.html: Renamed from LayoutTests/webaudio/offlineaudiocontext-suspend-resume-graph-manipulation.html.
* webaudio/OfflineAudioContext/offlineaudiocontext-suspend-resume-promise-expected.txt: Renamed from LayoutTests/webaudio/offlineaudiocontext-suspend-resume-promise-expected.txt.
* webaudio/OfflineAudioContext/offlineaudiocontext-suspend-resume-promise.html: Renamed from LayoutTests/webaudio/offlineaudiocontext-suspend-resume-promise.html.
* webaudio/OfflineAudioContext/offlineaudiocontext-suspend-resume-sequence-expected.txt: Renamed from LayoutTests/webaudio/offlineaudiocontext-suspend-resume-sequence-expected.txt.
* webaudio/OfflineAudioContext/offlineaudiocontext-suspend-resume-sequence.html: Renamed from LayoutTests/webaudio/offlineaudiocontext-suspend-resume-sequence.html.
* webaudio/OfflineAudioContext/offlineaudiocontext-thread-smoke-test-expected.txt: Added.
* webaudio/OfflineAudioContext/offlineaudiocontext-thread-smoke-test.html: Added.
* webaudio/OfflineAudioContext/onstatechange-expected.txt: Added.
* webaudio/OfflineAudioContext/onstatechange.html: Added.
* webaudio/Panner/hrtf-database-expected.txt: Added.
* webaudio/Panner/hrtf-database.html: Added.
* webaudio/Panner/panner-loop-expected.txt: Copied from LayoutTests/webaudio/convolvernode-unmodified-buffer-expected.txt.
* webaudio/Panner/panner-loop.html: Added.
* webaudio/Panner/panner-set-position-expected.txt: Added.
* webaudio/Panner/panner-set-position.html: Added.
* webaudio/PeriodicWave/ctor-periodicwave-expected.txt: Added.
* webaudio/PeriodicWave/ctor-periodicwave.html: Added.
* webaudio/PeriodicWave/periodicwave-contexts-expected.txt: Added.
* webaudio/PeriodicWave/periodicwave-contexts.html: Added.
* webaudio/PeriodicWave/periodicwave-exceptions-expected.txt: Added.
* webaudio/PeriodicWave/periodicwave-exceptions.html: Added.
* webaudio/PeriodicWave/periodicwave-lengths-expected.txt: Added.
* webaudio/PeriodicWave/periodicwave-lengths.html: Added.
* webaudio/PeriodicWave/periodicwave-normalization-expected.txt: Added.
* webaudio/PeriodicWave/periodicwave-normalization.html: Added.
* webaudio/ScriptProcessor/scriptprocessor-offlineaudiocontext-expected.txt: Added.
* webaudio/ScriptProcessor/scriptprocessor-offlineaudiocontext.html: Added.
* webaudio/ScriptProcessor/scriptprocessornode-0-output-channels-expected.txt: Added.
* webaudio/ScriptProcessor/scriptprocessornode-0-output-channels.html: Added.
* webaudio/ScriptProcessor/scriptprocessornode-downmix8-2channel-input-expected.txt: Added.
* webaudio/ScriptProcessor/scriptprocessornode-downmix8-2channel-input.html: Added.
* webaudio/ScriptProcessor/scriptprocessornode-expected.txt: Added.
* webaudio/ScriptProcessor/scriptprocessornode-upmix2-8channel-input-expected.txt: Added.
* webaudio/ScriptProcessor/scriptprocessornode-upmix2-8channel-input.html: Added.
* webaudio/ScriptProcessor/scriptprocessornode-zero-input-channels-expected.txt: Added.
* webaudio/ScriptProcessor/scriptprocessornode-zero-input-channels.html: Added.
* webaudio/ScriptProcessor/scriptprocessornode.html: Added.
* webaudio/WaveShaper/waveshaper-364379-expected.txt: Added.
* webaudio/WaveShaper/waveshaper-364379.html: Added.
* webaudio/WaveShaper/waveshaper-oversample-2x-expected.txt: Copied from LayoutTests/webaudio/convolvernode-unmodified-buffer-expected.txt.
* webaudio/WaveShaper/waveshaper-oversample-2x.html: Added.
* webaudio/WaveShaper/waveshaper-oversample-4x-expected.txt: Renamed from LayoutTests/webaudio/convolvernode-unmodified-buffer-expected.txt.
* webaudio/WaveShaper/waveshaper-oversample-4x.html: Added.
* webaudio/audio-scheduled-source-basic-expected.txt: Added.
* webaudio/audio-scheduled-source-basic.html: Added.
* webaudio/javascriptaudionode-downmix8-2channel-input-expected.txt: Removed.
* webaudio/javascriptaudionode-downmix8-2channel-input.html: Removed.
* webaudio/javascriptaudionode-expected.txt: Removed.
* webaudio/javascriptaudionode-upmix2-8channel-input-expected.txt: Removed.
* webaudio/javascriptaudionode-upmix2-8channel-input.html: Removed.
* webaudio/javascriptaudionode-zero-input-channels-expected.txt: Removed.
* webaudio/javascriptaudionode-zero-input-channels.html: Removed.
* webaudio/javascriptaudionode.html: Removed.
* webaudio/mediastreamaudiodestinationnode-expected.txt: Removed.
* webaudio/mediastreamaudiodestinationnode.html: Removed.
* webaudio/mediastreamaudiosourcenode-expected.txt: Removed.
* webaudio/mediastreamaudiosourcenode.html: Removed.
* webaudio/offlineaudiocontext-constructor-expected.txt: Removed.
* webaudio/offlineaudiocontext-constructor.html: Removed.
* webaudio/panner-loop-expected.txt: Removed.
* webaudio/panner-loop.html: Removed.
* webaudio/periodicwave-lengths-expected.txt: Removed.
* webaudio/periodicwave-lengths.html: Removed.
* webaudio/resources/audionodeoptions.js: Added.
(testAudioNodeOptions):
(initializeContext):
(testInvalidConstructor):
(testDefaultConstructor):
(testDefaultAttributes):
* webaudio/resources/biquad-filters.js: Added.
(createLowpassFilter):
(createHighpassFilter):
(normalizeFilterCoefficients):
(createBandpassFilter):
(createLowShelfFilter):
(createHighShelfFilter):
(createPeakingFilter):
(createNotchFilter):
(createAllpassFilter):
(filterData):
(createFilter):
* webaudio/resources/hrtf/Composite.flac: Added.
* webaudio/resources/hrtf/Composite.wav: Added.
* webaudio/resources/hrtf/README: Added.
* webaudio/resources/scriptprocessornode-testing-audit.js: Added.
(createBuffer):
(processAudioData):
(fillData):
(checkStereoOnlyData):
(runJSNodeTest):
* webaudio/resources/scriptprocessornode-testing.js: Added.
(createBuffer):
(processAudioData):
(fillData):
(checkStereoOnlyData):
(runJSNodeTest):
* webaudio/resources/waveshaper-testing.js:
(T0):
(T1):
(T2):
(T3):
(T4):
(generateWaveShapingCurve):
(checkShapedCurve):
(createImpulseBuffer):
(runWaveShaperOversamplingTest):
* webaudio/waveshaper-oversample-2x-expected.txt: Removed.
* webaudio/waveshaper-oversample-2x.html: Removed.
* webaudio/waveshaper-oversample-4x-expected.txt: Removed.
* webaudio/waveshaper-oversample-4x.html: Removed.

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

2 months ago[JSC] Generator declaration should not be allowed in single statement context
ysuzuki@apple.com [Sat, 19 Sep 2020 02:19:49 +0000 (02:19 +0000)]
[JSC] Generator declaration should not be allowed in single statement context
https://bugs.webkit.org/show_bug.cgi?id=216720

Reviewed by Ross Kirsling.

JSTests:

* stress/generator-syntax.js:
(testSyntaxError.gen):
* test262/expectations.yaml:

Source/JavaScriptCore:

Generator declaration in single statement context (like the following code) should be syntax error.
We already made async function / async generator function syntax error. We should apply the same rule
to generator declaration too.

    if (false)
        function * gen() { }

* parser/Parser.cpp:
(JSC::Parser<LexerType>::parseSingleFunction):
(JSC::Parser<LexerType>::parseStatement):
(JSC::Parser<LexerType>::parseFunctionDeclarationStatement):
(JSC::Parser<LexerType>::parseFunctionDeclaration):
(JSC::Parser<LexerType>::parseExportDeclaration):
* parser/Parser.h:

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

2 months ago[macOS] REGRESSION (r265702): System Services receive 0 bytes when extracting selecte...
wenson_hsieh@apple.com [Sat, 19 Sep 2020 01:34:43 +0000 (01:34 +0000)]
[macOS] REGRESSION (r265702): System Services receive 0 bytes when extracting selected content as rich text data
https://bugs.webkit.org/show_bug.cgi?id=216718
<rdar://problem/69150358>

Reviewed by Tim Horton.

Source/WebKit:

Test: CopyHTML.WriteRichTextSelectionToPasteboard

* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::dataSelectionForPasteboard):

After r265702, the `IPCHandle` received in the UI process was always being converted into a buffer of size 0,
due to using the `size` local variable (which is no longer set as an outparam of the sync IPC message). Instead,
use `ipcHandle.dataSize`.

Tools:

Add a new API test to verify that we get non-empty web archive data when using
`-writeSelectionToPasteboard:types:` to grab selected content as rich text data.

* TestWebKitAPI/Tests/WebKitCocoa/CopyHTML.mm:

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

2 months ago[JSC] PreciseAllocation's isNewlyAllocated flag should be propagated from isMarked...
ysuzuki@apple.com [Sat, 19 Sep 2020 01:22:42 +0000 (01:22 +0000)]
[JSC] PreciseAllocation's isNewlyAllocated flag should be propagated from isMarked at GC begin phase to make isLive correct
https://bugs.webkit.org/show_bug.cgi?id=216717

Reviewed by Mark Lam.

When starting full GC, at beginMarking, PreciseAllocation's mark bit is cleared to be usable for upcoming marking.
However, this means that HeapCell::isLive will see this object as dead until it is marked.
Let's consider that this object is not newly allocated one. Then, its isNewlyAllocated is false. And now mark bit
is also cleared. Since PreciseAllocation::isLive is isNewlyAllocated || isMarked, then it looks dead, while it is live.
This confuses HeapCell:isLive function and makes some of watchpoints perform wrong decisions (e.g. this condition is
no longer valid, let's just discard it).
At the beginning of full collection, we should propagate the old mark bit to isNewlyAllocated so that it looks live
during marking. This is similar trick to MarkedBlock::aboutToMark.

* heap/PreciseAllocation.cpp:
(JSC::PreciseAllocation::flip):

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

2 months ago[LFC][FFC] Add flex box/item to showLayoutTree
zalan@apple.com [Sat, 19 Sep 2020 00:40:39 +0000 (00:40 +0000)]
[LFC][FFC] Add flex box/item to showLayoutTree
https://bugs.webkit.org/show_bug.cgi?id=216694

Reviewed by Sam Weinig.

* layout/layouttree/LayoutTreeBuilder.cpp:
(WebCore::Layout::outputLayoutBox): 'Table principal' -> 'Table wrapper box' for consistency sake.

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

2 months agoconsole APIs shouldn't crash making a string that's too long for a console warning...
sbarati@apple.com [Sat, 19 Sep 2020 00:27:05 +0000 (00:27 +0000)]
console APIs shouldn't crash making a string that's too long for a console warning when using user provided labels
https://bugs.webkit.org/show_bug.cgi?id=216709
<rdar://problem/68275357>

Reviewed by Mark Lam and Devin Rousso.

Source/JavaScriptCore:

Various console APIs send warnings when a label can't be found. These warnings
include the label itself. If this label has a long enough length, when we make
these warning strings, we can crash, because we exceed max string length.
This patch fixes this by truncating the label everywhere it's used if it
exceeds a length of 10000.

* inspector/JSGlobalObjectConsoleClient.cpp:
(Inspector::JSGlobalObjectConsoleClient::profile):
* inspector/ScriptArguments.h:
* inspector/agents/InspectorConsoleAgent.cpp:
(Inspector::InspectorConsoleAgent::startTiming):
(Inspector::InspectorConsoleAgent::logTiming):
(Inspector::InspectorConsoleAgent::stopTiming):
(Inspector::InspectorConsoleAgent::count):
(Inspector::InspectorConsoleAgent::countReset):

Source/WebCore:

Test: inspector/console/console-oom.html

* inspector/agents/InspectorTimelineAgent.cpp:
(WebCore::InspectorTimelineAgent::startFromConsole):
(WebCore::InspectorTimelineAgent::stopFromConsole):
* inspector/agents/WebConsoleAgent.cpp:
(WebCore::WebConsoleAgent::didReceiveResponse):

LayoutTests:

* TestExpectations:
* inspector/console/console-oom-expected.txt: Added.
* inspector/console/console-oom.html: Added.

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

2 months agoRemove unneeded respondsToSelector staging for keyboard.
megan_gardner@apple.com [Fri, 18 Sep 2020 23:20:14 +0000 (23:20 +0000)]
Remove unneeded respondsToSelector staging for keyboard.
https://bugs.webkit.org/show_bug.cgi?id=216421

Staging needed for dual work in UIKit in 2019, no longer needed.

Reviewed by Tim Horton.

No behavior change, covered by existing tests.

* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView insertText:]):
(-[WKContentView handleKeyWebEvent:withCompletionHandler:]):
(-[WKContentView _interpretKeyEvent:isCharEvent:]):

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

2 months ago[WebGPU] Add ENABLE(WHLSL_COMPILER) guard
don.olmstead@sony.com [Fri, 18 Sep 2020 22:54:26 +0000 (22:54 +0000)]
[WebGPU] Add ENABLE(WHLSL_COMPILER) guard
https://bugs.webkit.org/show_bug.cgi?id=216713

Reviewed by Myles C. Maxfield.

Source/WebCore:

Replaces the ENABLE(WEBGPU) guards in the Modules/webgpu/WHLSL with ENABLE(WHLSL_COMPILER)
since not all ports need a WHLSL compiler to support WebGPU.

* Modules/webgpu/WHLSL/AST/WHLSLAST.h:
* Modules/webgpu/WHLSL/AST/WHLSLAddressEscapeMode.h:
* Modules/webgpu/WHLSL/AST/WHLSLAddressSpace.h:
* Modules/webgpu/WHLSL/AST/WHLSLArrayReferenceType.h:
* Modules/webgpu/WHLSL/AST/WHLSLArrayType.h:
* Modules/webgpu/WHLSL/AST/WHLSLAssignmentExpression.h:
* Modules/webgpu/WHLSL/AST/WHLSLBaseFunctionAttribute.h:
* Modules/webgpu/WHLSL/AST/WHLSLBaseSemantic.h:
* Modules/webgpu/WHLSL/AST/WHLSLBlock.h:
* Modules/webgpu/WHLSL/AST/WHLSLBooleanLiteral.h:
* Modules/webgpu/WHLSL/AST/WHLSLBreak.h:
* Modules/webgpu/WHLSL/AST/WHLSLBuiltInSemantic.cpp:
* Modules/webgpu/WHLSL/AST/WHLSLBuiltInSemantic.h:
* Modules/webgpu/WHLSL/AST/WHLSLCallExpression.h:
* Modules/webgpu/WHLSL/AST/WHLSLCommaExpression.h:
* Modules/webgpu/WHLSL/AST/WHLSLConstantExpression.h:
* Modules/webgpu/WHLSL/AST/WHLSLContinue.h:
* Modules/webgpu/WHLSL/AST/WHLSLDefaultDelete.h:
* Modules/webgpu/WHLSL/AST/WHLSLDereferenceExpression.h:
* Modules/webgpu/WHLSL/AST/WHLSLDoWhileLoop.h:
* Modules/webgpu/WHLSL/AST/WHLSLDotExpression.h:
* Modules/webgpu/WHLSL/AST/WHLSLEffectfulExpressionStatement.h:
* Modules/webgpu/WHLSL/AST/WHLSLEntryPointType.h:
* Modules/webgpu/WHLSL/AST/WHLSLEnumerationDefinition.h:
* Modules/webgpu/WHLSL/AST/WHLSLEnumerationMember.h:
* Modules/webgpu/WHLSL/AST/WHLSLEnumerationMemberLiteral.h:
* Modules/webgpu/WHLSL/AST/WHLSLExpression.cpp:
* Modules/webgpu/WHLSL/AST/WHLSLExpression.h:
* Modules/webgpu/WHLSL/AST/WHLSLFallthrough.h:
* Modules/webgpu/WHLSL/AST/WHLSLFloatLiteral.h:
* Modules/webgpu/WHLSL/AST/WHLSLFloatLiteralType.cpp:
* Modules/webgpu/WHLSL/AST/WHLSLFloatLiteralType.h:
* Modules/webgpu/WHLSL/AST/WHLSLForLoop.h:
* Modules/webgpu/WHLSL/AST/WHLSLFunctionAttribute.h:
* Modules/webgpu/WHLSL/AST/WHLSLFunctionDeclaration.h:
* Modules/webgpu/WHLSL/AST/WHLSLFunctionDefinition.h:
* Modules/webgpu/WHLSL/AST/WHLSLGlobalVariableReference.h:
* Modules/webgpu/WHLSL/AST/WHLSLIfStatement.h:
* Modules/webgpu/WHLSL/AST/WHLSLIndexExpression.h:
* Modules/webgpu/WHLSL/AST/WHLSLIntegerLiteral.cpp:
* Modules/webgpu/WHLSL/AST/WHLSLIntegerLiteral.h:
* Modules/webgpu/WHLSL/AST/WHLSLIntegerLiteralType.cpp:
* Modules/webgpu/WHLSL/AST/WHLSLIntegerLiteralType.h:
* Modules/webgpu/WHLSL/AST/WHLSLLogicalExpression.h:
* Modules/webgpu/WHLSL/AST/WHLSLLogicalNotExpression.h:
* Modules/webgpu/WHLSL/AST/WHLSLMakeArrayReferenceExpression.h:
* Modules/webgpu/WHLSL/AST/WHLSLMakePointerExpression.h:
* Modules/webgpu/WHLSL/AST/WHLSLNameSpace.h:
* Modules/webgpu/WHLSL/AST/WHLSLNamedType.h:
* Modules/webgpu/WHLSL/AST/WHLSLNativeFunctionDeclaration.h:
* Modules/webgpu/WHLSL/AST/WHLSLNativeTypeDeclaration.h:
* Modules/webgpu/WHLSL/AST/WHLSLNumThreadsFunctionAttribute.h:
* Modules/webgpu/WHLSL/AST/WHLSLPointerType.h:
* Modules/webgpu/WHLSL/AST/WHLSLPropertyAccessExpression.h:
* Modules/webgpu/WHLSL/AST/WHLSLQualifier.h:
* Modules/webgpu/WHLSL/AST/WHLSLReadModifyWriteExpression.h:
* Modules/webgpu/WHLSL/AST/WHLSLReferenceType.h:
* Modules/webgpu/WHLSL/AST/WHLSLReplaceWith.h:
* Modules/webgpu/WHLSL/AST/WHLSLResolvableType.h:
* Modules/webgpu/WHLSL/AST/WHLSLResourceSemantic.cpp:
* Modules/webgpu/WHLSL/AST/WHLSLResourceSemantic.h:
* Modules/webgpu/WHLSL/AST/WHLSLReturn.h:
* Modules/webgpu/WHLSL/AST/WHLSLSemantic.h:
* Modules/webgpu/WHLSL/AST/WHLSLSpecializationConstantSemantic.cpp:
* Modules/webgpu/WHLSL/AST/WHLSLSpecializationConstantSemantic.h:
* Modules/webgpu/WHLSL/AST/WHLSLStageInOutSemantic.cpp:
* Modules/webgpu/WHLSL/AST/WHLSLStageInOutSemantic.h:
* Modules/webgpu/WHLSL/AST/WHLSLStatement.cpp:
* Modules/webgpu/WHLSL/AST/WHLSLStatement.h:
* Modules/webgpu/WHLSL/AST/WHLSLStatementList.h:
* Modules/webgpu/WHLSL/AST/WHLSLStructureDefinition.h:
* Modules/webgpu/WHLSL/AST/WHLSLStructureElement.h:
* Modules/webgpu/WHLSL/AST/WHLSLSwitchCase.h:
* Modules/webgpu/WHLSL/AST/WHLSLSwitchStatement.h:
* Modules/webgpu/WHLSL/AST/WHLSLTernaryExpression.h:
* Modules/webgpu/WHLSL/AST/WHLSLType.cpp:
* Modules/webgpu/WHLSL/AST/WHLSLType.h:
* Modules/webgpu/WHLSL/AST/WHLSLTypeArgument.cpp:
* Modules/webgpu/WHLSL/AST/WHLSLTypeArgument.h:
* Modules/webgpu/WHLSL/AST/WHLSLTypeDefinition.h:
* Modules/webgpu/WHLSL/AST/WHLSLTypeReference.cpp:
* Modules/webgpu/WHLSL/AST/WHLSLTypeReference.h:
* Modules/webgpu/WHLSL/AST/WHLSLUnnamedType.cpp:
* Modules/webgpu/WHLSL/AST/WHLSLUnnamedType.h:
* Modules/webgpu/WHLSL/AST/WHLSLUnnamedTypeHash.h:
* Modules/webgpu/WHLSL/AST/WHLSLUnsignedIntegerLiteral.cpp:
* Modules/webgpu/WHLSL/AST/WHLSLUnsignedIntegerLiteral.h:
* Modules/webgpu/WHLSL/AST/WHLSLUnsignedIntegerLiteralType.cpp:
* Modules/webgpu/WHLSL/AST/WHLSLUnsignedIntegerLiteralType.h:
* Modules/webgpu/WHLSL/AST/WHLSLVariableDeclaration.h:
* Modules/webgpu/WHLSL/AST/WHLSLVariableDeclarationsStatement.h:
* Modules/webgpu/WHLSL/AST/WHLSLVariableReference.h:
* Modules/webgpu/WHLSL/AST/WHLSLWhileLoop.h:
* Modules/webgpu/WHLSL/Metal/WHLSLEntryPointScaffolding.cpp:
* Modules/webgpu/WHLSL/Metal/WHLSLEntryPointScaffolding.h:
* Modules/webgpu/WHLSL/Metal/WHLSLFunctionWriter.cpp:
* Modules/webgpu/WHLSL/Metal/WHLSLFunctionWriter.h:
* Modules/webgpu/WHLSL/Metal/WHLSLMangledNames.h:
* Modules/webgpu/WHLSL/Metal/WHLSLMetalCodeGenerator.cpp:
* Modules/webgpu/WHLSL/Metal/WHLSLMetalCodeGenerator.h:
* Modules/webgpu/WHLSL/Metal/WHLSLNativeFunctionWriter.cpp:
* Modules/webgpu/WHLSL/Metal/WHLSLNativeFunctionWriter.h:
* Modules/webgpu/WHLSL/Metal/WHLSLNativeTypeWriter.cpp:
* Modules/webgpu/WHLSL/Metal/WHLSLNativeTypeWriter.h:
* Modules/webgpu/WHLSL/Metal/WHLSLTypeNamer.cpp:
* Modules/webgpu/WHLSL/Metal/WHLSLTypeNamer.h:
* Modules/webgpu/WHLSL/Metal/WHLSLVertexBufferIndexCalculator.cpp:
* Modules/webgpu/WHLSL/Metal/WHLSLVertexBufferIndexCalculator.h:
* Modules/webgpu/WHLSL/WHLSLASTDumper.cpp:
* Modules/webgpu/WHLSL/WHLSLASTDumper.h:
* Modules/webgpu/WHLSL/WHLSLBuildStandardLibraryFunctionMap.py:
* Modules/webgpu/WHLSL/WHLSLCheckDuplicateFunctions.cpp:
* Modules/webgpu/WHLSL/WHLSLCheckDuplicateFunctions.h:
* Modules/webgpu/WHLSL/WHLSLCheckReferenceTypes.cpp:
* Modules/webgpu/WHLSL/WHLSLCheckReferenceTypes.h:
* Modules/webgpu/WHLSL/WHLSLCheckTextureReferences.cpp:
* Modules/webgpu/WHLSL/WHLSLCheckTextureReferences.h:
* Modules/webgpu/WHLSL/WHLSLChecker.cpp:
* Modules/webgpu/WHLSL/WHLSLChecker.h:
* Modules/webgpu/WHLSL/WHLSLCodeLocation.h:
* Modules/webgpu/WHLSL/WHLSLComputeDimensions.cpp:
* Modules/webgpu/WHLSL/WHLSLComputeDimensions.h:
* Modules/webgpu/WHLSL/WHLSLError.h:
* Modules/webgpu/WHLSL/WHLSLFunctionStageChecker.cpp:
* Modules/webgpu/WHLSL/WHLSLFunctionStageChecker.h:
* Modules/webgpu/WHLSL/WHLSLGatherEntryPointItems.cpp:
* Modules/webgpu/WHLSL/WHLSLGatherEntryPointItems.h:
* Modules/webgpu/WHLSL/WHLSLHighZombieFinder.cpp:
* Modules/webgpu/WHLSL/WHLSLHighZombieFinder.h:
* Modules/webgpu/WHLSL/WHLSLInferTypes.cpp:
* Modules/webgpu/WHLSL/WHLSLInferTypes.h:
* Modules/webgpu/WHLSL/WHLSLIntrinsics.cpp:
* Modules/webgpu/WHLSL/WHLSLIntrinsics.h:
* Modules/webgpu/WHLSL/WHLSLLexer.cpp:
* Modules/webgpu/WHLSL/WHLSLLexer.h:
* Modules/webgpu/WHLSL/WHLSLLiteralTypeChecker.cpp:
* Modules/webgpu/WHLSL/WHLSLLiteralTypeChecker.h:
* Modules/webgpu/WHLSL/WHLSLNameContext.cpp:
* Modules/webgpu/WHLSL/WHLSLNameContext.h:
* Modules/webgpu/WHLSL/WHLSLNameResolver.cpp:
* Modules/webgpu/WHLSL/WHLSLNameResolver.h:
* Modules/webgpu/WHLSL/WHLSLParser.cpp:
* Modules/webgpu/WHLSL/WHLSLParser.h:
* Modules/webgpu/WHLSL/WHLSLParsingMode.h:
* Modules/webgpu/WHLSL/WHLSLPipelineDescriptor.h:
* Modules/webgpu/WHLSL/WHLSLPrepare.cpp:
* Modules/webgpu/WHLSL/WHLSLPrepare.h:
* Modules/webgpu/WHLSL/WHLSLPreserveVariableLifetimes.cpp:
* Modules/webgpu/WHLSL/WHLSLPreserveVariableLifetimes.h:
* Modules/webgpu/WHLSL/WHLSLProgram.cpp:
* Modules/webgpu/WHLSL/WHLSLProgram.h:
* Modules/webgpu/WHLSL/WHLSLPropertyResolver.cpp:
* Modules/webgpu/WHLSL/WHLSLPropertyResolver.h:
* Modules/webgpu/WHLSL/WHLSLPruneUnreachableStandardLibraryFunctions.cpp:
* Modules/webgpu/WHLSL/WHLSLPruneUnreachableStandardLibraryFunctions.h:
* Modules/webgpu/WHLSL/WHLSLRecursionChecker.cpp:
* Modules/webgpu/WHLSL/WHLSLRecursionChecker.h:
* Modules/webgpu/WHLSL/WHLSLRecursiveTypeChecker.cpp:
* Modules/webgpu/WHLSL/WHLSLRecursiveTypeChecker.h:
* Modules/webgpu/WHLSL/WHLSLResolveOverloadImpl.cpp:
* Modules/webgpu/WHLSL/WHLSLResolveOverloadImpl.h:
* Modules/webgpu/WHLSL/WHLSLResolvingType.h:
* Modules/webgpu/WHLSL/WHLSLScopedSetAdder.h:
* Modules/webgpu/WHLSL/WHLSLSemanticMatcher.cpp:
* Modules/webgpu/WHLSL/WHLSLSemanticMatcher.h:
* Modules/webgpu/WHLSL/WHLSLStandardLibraryFunctionMap.h:
* Modules/webgpu/WHLSL/WHLSLStandardLibraryUtilities.cpp:
* Modules/webgpu/WHLSL/WHLSLStandardLibraryUtilities.h:
* Modules/webgpu/WHLSL/WHLSLStatementBehaviorChecker.cpp:
* Modules/webgpu/WHLSL/WHLSLStatementBehaviorChecker.h:
* Modules/webgpu/WHLSL/WHLSLSynthesizeConstructors.cpp:
* Modules/webgpu/WHLSL/WHLSLSynthesizeConstructors.h:
* Modules/webgpu/WHLSL/WHLSLSynthesizeEnumerationFunctions.cpp:
* Modules/webgpu/WHLSL/WHLSLSynthesizeEnumerationFunctions.h:
* Modules/webgpu/WHLSL/WHLSLVisitor.cpp:
* Modules/webgpu/WHLSL/WHLSLVisitor.h:

Source/WTF:

Adds a default for ENABLE_WHLSL_COMPILER on Cocoa platforms.

* wtf/PlatformEnable.h:
* wtf/PlatformEnableCocoa.h:

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

2 months agoCrash under WebCore::shouldResetFocusNavigationStartingNode()
cdumez@apple.com [Fri, 18 Sep 2020 22:50:34 +0000 (22:50 +0000)]
Crash under WebCore::shouldResetFocusNavigationStartingNode()
https://bugs.webkit.org/show_bug.cgi?id=216714
<rdar://problem/68132047>

Reviewed by Darin Adler.

Protect anchorElement in FrameView::scrollToFragmentInternal() to make sure
it stays alive until the time we pass it to setFocusNavigationStartingNode().

* page/FrameView.cpp:
(WebCore::FrameView::scrollToFragmentInternal):

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

2 months agoREGRESSION (r266634): fast/selectors/text-field-selection-stroke-color.html and fast...
sihui_liu@apple.com [Fri, 18 Sep 2020 22:25:44 +0000 (22:25 +0000)]
REGRESSION (r266634): fast/selectors/text-field-selection-stroke-color.html and fast/selectors/text-field-selection-window-inactive-stroke-color.html are flaky failures with pixel noise
https://bugs.webkit.org/show_bug.cgi?id=216394
<rdar://problem/68679551>

Reviewed by Tim Horton.

Source/WebKit:

In WebKitTestRunner, we reset the states and load about:blank page between tests. The resetting may cause some
activity state changes of web page, like WindowIsActive. Before r266634, these changes will be dispatched
quickly enough (before runloop waits or when runloop exits) to web process, so web process can do rendering with
updated activity state. After r266634, dispatch of the changes may be delayed (until CATransaction commits).
Page activity state can affect scrollability (in FrameView::computeScrollability()) and scrollability can affect
tiling size (in TileController::computeTileSize()). Different tilings may cause the tiny pixel difference we see
in the test results.

To fix this, create an SPI for sending out activity state updates in next runloop cycle and adopt it in WTR.

* UIProcess/API/C/WKPage.cpp:
(WKPageDispatchActivityStateUpdateForTesting):
* UIProcess/API/C/WKPagePrivate.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::dispatchActivityStateUpdateForTesting):
* UIProcess/WebPageProxy.h:

Tools:

Make sure activity state changes for window updates in resetStateToConsistentValues are dispatched in time.

* WebKitTestRunner/TestController.cpp:
(WTR::TestController::resetStateToConsistentValues):

LayoutTests:

Update test expectations as tests should be passing.

* platform/mac-wk2/TestExpectations:

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

2 months agoDate/time inputs should not use user-specified formats
akeerthi@apple.com [Fri, 18 Sep 2020 21:18:13 +0000 (21:18 +0000)]
Date/time inputs should not use user-specified formats
https://bugs.webkit.org/show_bug.cgi?id=216484
<rdar://problem/68864815>

Reviewed by Wenson Hsieh.

Source/WebCore:

On macOS, users can specify custom date and time formats through System
Preferences. These formats can be different from the default for the
user’s current locale. Using these formats when rendering date and time
inputs is a potential fingerprinting vector, as sites can apply CSS to
components of the input, and measure the size of the input.

To fix, we create a new NSLocale even if the identifier matches
[NSLocale currentLocale]. This ensures that m_locale does not contain
the user's changes to the locale.

* platform/text/cocoa/LocaleCocoa.h:
* platform/text/cocoa/LocaleCocoa.mm:
(WebCore::Locale::create):
(WebCore::LocaleCocoa::LocaleCocoa):

Tools:

Added a test which sets a custom date format using "defaults write"
and verifies that the width is indistinguishable from the default
format.

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/mac/DateInputTests.mm: Added.
(createWebViewForTest):
(DateInputsTests.IgnoresUserEditsToLocale):

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

2 months agoUnreviewed, rebaseline test after r266816 changed wptserve output.
lmoura@igalia.com [Fri, 18 Sep 2020 20:50:34 +0000 (20:50 +0000)]
Unreviewed, rebaseline test after r266816 changed wptserve output.

* web-platform-tests/html/semantics/document-metadata/the-meta-element/pragma-directives/attr-meta-http-equiv-refresh/parsing-expected.txt:

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

2 months ago[macOS] Date/time inputs should focus the next editable component when entering a...
akeerthi@apple.com [Fri, 18 Sep 2020 20:34:36 +0000 (20:34 +0000)]
[macOS] Date/time inputs should focus the next editable component when entering a separator key
https://bugs.webkit.org/show_bug.cgi?id=216661
<rdar://problem/69091856>

Reviewed by Wenson Hsieh.

Source/WebCore:

NSDatePicker focuses the next editable field when entering a separator
key. We should match this behavior to be consistent with the rest of
the system.

* html/shadow/DateTimeFieldElement.cpp:
(WebCore::DateTimeFieldElement::defaultKeyboardEventHandler):

Tools:

* WebKitTestRunner/mac/EventSenderProxy.mm:
(WTR::EventSenderProxy::keyDown):

Add support for colon, semicolon, and comma keys. The keycode values are
taken from the virtual keycode values in HIToolbox/Events.h.

Note that the keycode for colon and semicolon is the same, as there is
no distinct value for colon. This is safe as it matches the Javascript
behavior.

LayoutTests:

Added new test cases to the existing set of keyboard tests for date/time inputs.

* fast/forms/date/date-editable-components/date-editable-components-keyboard-events-expected.txt:
* fast/forms/date/date-editable-components/date-editable-components-keyboard-events.html:
* fast/forms/datetimelocal/datetimelocal-editable-components/datetimelocal-editable-components-keyboard-events-expected.txt:
* fast/forms/datetimelocal/datetimelocal-editable-components/datetimelocal-editable-components-keyboard-events.html:
* fast/forms/time/time-editable-components/time-editable-components-keyboard-events-expected.txt:
* fast/forms/time/time-editable-components/time-editable-components-keyboard-events.html:

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

2 months ago[ARMv7][MIPS] Test gaderning September version
ticaiolima@gmail.com [Fri, 18 Sep 2020 20:28:55 +0000 (20:28 +0000)]
[ARMv7][MIPS] Test gaderning September version
https://bugs.webkit.org/show_bug.cgi?id=216699

Unreviewed test gardening.

* stress/array-species-create-should-handle-masquerader.js:
* stress/compare-eq-should-use-known-other-use.js:
* stress/ftl-reflect-get-prototype-of.js:
* stress/typedarray-access-neutered.js:

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

2 months agoWKWebView._tryClose should return whether it succeeded or not
commit-queue@webkit.org [Fri, 18 Sep 2020 20:17:10 +0000 (20:17 +0000)]
WKWebView._tryClose should return whether it succeeded or not
https://bugs.webkit.org/show_bug.cgi?id=216660

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

Source/WebKit:

The return value of WKPageTryClose is used by Safari.
In order to migrate to WKWebView _tryClose, we need to expose this return value.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _tryClose]):
* UIProcess/API/Cocoa/WKWebViewPrivate.h:

Tools:

* TestWebKitAPI/Tests/WebKitCocoa/OpenAndCloseWindow.mm:
(TEST):

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

2 months agoMake TLSVersion.NetworkSession API test more robust
commit-queue@webkit.org [Fri, 18 Sep 2020 20:15:50 +0000 (20:15 +0000)]
Make TLSVersion.NetworkSession API test more robust
https://bugs.webkit.org/show_bug.cgi?id=216704
<rdar://problem/68643674>

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

r265573 made preconnect attempts to legacy TLS servers fail.
This caused the TLSVersion.NetworkSession to assert because the first connection attempt would fail
(and the second would succeed if it was supposed to succeed with the conditions in the test).
The test calls waitForDidFailProvisionalNavigation in cases where it is supposed to fail and
waitForDidFinishNavigation in cases where it supposed to succeed.
Like I did in r266100 with another test, use HTTPServer which allows a variable number of connection attempts.

* TestWebKitAPI/Tests/WebKitCocoa/TLSDeprecation.mm:
(TestWebKitAPI::TEST):

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

2 months agoMake ews-app robust against config.json issues
aakash_jain@apple.com [Fri, 18 Sep 2020 19:46:33 +0000 (19:46 +0000)]
Make ews-app robust against config.json issues
https://bugs.webkit.org/show_bug.cgi?id=216705

Reviewed by Jonathan Bedard.

* BuildSlaveSupport/ews-app/ews/common/buildbot.py:
(Buildbot.fetch_config):
(Buildbot.update_icons_for_queues_mapping):

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

2 months agoDFG should ensure there are PhantomLocals for the taken block of op_jneq_ptr
keith_miller@apple.com [Fri, 18 Sep 2020 19:34:21 +0000 (19:34 +0000)]
DFG should ensure there are PhantomLocals for the taken block of op_jneq_ptr
https://bugs.webkit.org/show_bug.cgi?id=216669

Reviewed by Saam Barati.

JSTests:

* stress/jneq-ptr-opcode-variable-only-live-on-taken-branch.js: Added.
(bar):
(foo):

Source/JavaScriptCore:

Right now, if there is a local that is live on the taken branch but dead on
not-taken branch then nothing will preserve it for OSR exit. This patch simply
adds a PhantomLocal for each live operand for the first bytecode of the taken block.

* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::parseBlock):

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

2 months agoREGRESSION(r267137): PaintFrequencyTracker needs to track all the painting
commit-queue@webkit.org [Fri, 18 Sep 2020 19:30:06 +0000 (19:30 +0000)]
REGRESSION(r267137): PaintFrequencyTracker needs to track all the painting
https://bugs.webkit.org/show_bug.cgi?id=216677

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

r267137 removed all the optimizations which the Design test got from
r230544 because it resets the renderingUpdateTimestamp to zero when it
exists. This makes RenderLayer always retrieves this timestamp with value
equal to zero. There is no direct call from Page::updateRendering() to
RenderLayer::paintLayerContents(). Painting has to be scheduled to the
next run-loop. Because SinglePaintFrequencyTracking tracks only the painting
whose timestamp is not zero, SinglePaintFrequencyTracking has not been
tracking any painting.

The solution is to track all the painting. When renderingUpdateTimestamp()
is zero, SinglePaintFrequencyTracking will use MonotonicTime::now() instead.
This will happen in cases like calling updateControlTints() before calling
Page::updateRendering().

* page/Page.cpp:
(WebCore::Page::updateRendering):
* page/Page.h:
(WebCore::Page::lastRenderingUpdateTimestamp const):
(WebCore::Page::renderingUpdateTimestamp const): Deleted.
* rendering/PaintFrequencyTracker.h:
(WebCore::SinglePaintFrequencyTracking::SinglePaintFrequencyTracking):
(WebCore::SinglePaintFrequencyTracking::~SinglePaintFrequencyTracking):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::paintLayerContents):
(WebCore::RenderLayer::calculateClipRects const):

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

2 months agoImport AudioContext / AudioListener / AudioNode / AudioParam layout tests from Blink
cdumez@apple.com [Fri, 18 Sep 2020 19:18:42 +0000 (19:18 +0000)]
Import AudioContext / AudioListener / AudioNode / AudioParam layout tests from Blink
https://bugs.webkit.org/show_bug.cgi?id=216706

Reviewed by Eric Carlson.

Import AudioContext / AudioListener / AudioNode / AudioParam layout tests from Blink.

* webaudio/AudioContext/audiocontext-close-basic-expected.txt: Added.
* webaudio/AudioContext/audiocontext-close-basic.html: Added.
* webaudio/AudioContext/audiocontext-listener-should-not-crash-expected.txt: Added.
* webaudio/AudioContext/audiocontext-listener-should-not-crash.html: Added.
* webaudio/AudioListener/audiolistener-automation-position-expected.txt: Added.
* webaudio/AudioListener/audiolistener-automation-position.html: Added.
* webaudio/AudioListener/audiolistener-set-position-expected.txt: Added.
* webaudio/AudioListener/audiolistener-set-position.html: Added.
* webaudio/AudioNode/tail-connections-expected.txt: Added.
* webaudio/AudioNode/tail-connections.html: Added.
* webaudio/AudioNode/tail-processing-expected.txt: Added.
* webaudio/AudioNode/tail-processing.html: Added.
* webaudio/AudioParam/audioparam-automation-clamping-expected.txt: Added.
* webaudio/AudioParam/audioparam-automation-clamping.html: Added.
* webaudio/AudioParam/audioparam-cancel-and-hold-expected.txt: Renamed from LayoutTests/webaudio/audioparam-cancel-and-hold-expected.txt.
* webaudio/AudioParam/audioparam-cancel-and-hold.html: Renamed from LayoutTests/webaudio/audioparam-cancel-and-hold.html.
* webaudio/AudioParam/audioparam-clamp-time-to-current-time-expected.txt: Added.
* webaudio/AudioParam/audioparam-clamp-time-to-current-time.html: Added.
* webaudio/AudioParam/audioparam-initial-event-expected.txt: Added.
* webaudio/AudioParam/audioparam-initial-event.html: Added.
* webaudio/AudioParam/audioparam-k-rate-expected.txt: Added.
* webaudio/AudioParam/audioparam-k-rate.html: Added.
* webaudio/AudioParam/audioparam-linearRamp-value-attribute-expected.txt: Added.
* webaudio/AudioParam/audioparam-linearRamp-value-attribute.html: Added.
* webaudio/AudioParam/audioparam-negative-exponentialRamp-expected.txt: Added.
* webaudio/AudioParam/audioparam-negative-exponentialRamp.html: Added.
* webaudio/AudioParam/audioparam-nominal-range-expected.txt: Renamed from LayoutTests/webaudio/audioparam-nominal-range-expected.txt.
* webaudio/AudioParam/audioparam-nominal-range.html: Renamed from LayoutTests/webaudio/audioparam-nominal-range.html.
* webaudio/AudioParam/audioparam-processing-expected.txt: Added.
* webaudio/AudioParam/audioparam-processing.html: Added.
* webaudio/AudioParam/audioparam-sampling-expected.txt: Added.
* webaudio/AudioParam/audioparam-sampling.html: Added.
* webaudio/AudioParam/audioparam-setTarget-timeConstant-0-expected.txt: Added.
* webaudio/AudioParam/audioparam-setTarget-timeConstant-0.html: Added.
* webaudio/AudioParam/audioparam-setTargetAtTime-continuous-expected.txt: Added.
* webaudio/AudioParam/audioparam-setTargetAtTime-continuous.html: Added.
* webaudio/AudioParam/audioparam-setTargetAtTime-limit-expected.txt: Added.
* webaudio/AudioParam/audioparam-setTargetAtTime-limit.html: Added.
* webaudio/AudioParam/audioparam-setTargetAtTime-sampling-expected.txt: Added.
* webaudio/AudioParam/audioparam-setTargetAtTime-sampling.html: Added.
* webaudio/AudioParam/audioparam-setValueCurve-copy-expected.txt: Added.
* webaudio/AudioParam/audioparam-setValueCurve-copy.html: Added.
* webaudio/AudioParam/audioparam-setValueCurve-duration-expected.txt: Added.
* webaudio/AudioParam/audioparam-setValueCurve-duration.html: Added.
* webaudio/AudioParam/audioparam-setValueCurve-end-expected.txt: Added.
* webaudio/AudioParam/audioparam-setValueCurve-end.html: Added.
* webaudio/AudioParam/audioparam-setValueCurve-exceptions-expected.txt: Added.
* webaudio/AudioParam/audioparam-setValueCurveAtTime-interpolation-expected.txt: Added.
* webaudio/AudioParam/audioparam-setValueCurveAtTime-interpolation.html: Added.
* webaudio/AudioParam/audioparam-update-value-attribute-expected.txt: Added.
* webaudio/AudioParam/audioparam-update-value-attribute.html: Added.
* webaudio/AudioParam/audioparam-value-setter-error-expected.txt: Added.
* webaudio/AudioParam/audioparam-value-setter-error.html: Added.
* webaudio/AudioParam/cancel-values-crash-913217-expected.txt: Added.
* webaudio/AudioParam/cancel-values-crash-913217.html: Added.
* webaudio/AudioParam/value-setter-warnings-expected.txt: Added.
* webaudio/AudioParam/value-setter-warnings.html: Added.
* webaudio/AudioParam/worklet-warnings-expected.txt: Added.
* webaudio/AudioParam/worklet-warnings.html: Added.
* webaudio/audioparam-exponentialRampToValueAtTime.html:
* webaudio/audioparam-linearRampToValueAtTime.html:
* webaudio/audioparam-setValueAtTime.html:
* webaudio/resources/audioparam-testing-legacy.js: Copied from LayoutTests/webaudio/resources/audioparam-testing.js.
(renderLength):
(createConstantBuffer):
(createConstantArray):
(createLinearRampArray):
(createExponentialRampArray):
(discreteTimeConstantForSampleRate):
(createExponentialApproachArray):
(createSineWaveArray):
(endValueDelta):
(valueUpdate):
(comparePartialSignals):
(verifyDiscontinuities):
(compareSignals):
(checkResultFunction):
(doAutomation):
(createAudioGraphAndTest):
* webaudio/resources/audioparam-testing.js:
(renderLength):
(createConstantArray):
(getStartEndFrames):
(createLinearRampArray):
(createExponentialRampArray):
(discreteTimeConstantForSampleRate):
(createExponentialApproachArray):
(createReferenceSineArray):
(createSineWaveArray):
(endValueDelta):
(relativeErrorMetric):
(differenceErrorMetric):
(valueUpdate):
(comparePartialSignals):
(verifyDiscontinuities):
(compareSignals):
(checkResultFunction):
(doAutomation):
(createAudioGraphAndTest):
* webaudio/resources/set-position-vs-curve-test.js: Added.
(testPositionSetterVsCurve):

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

2 months agowebaudio/Analyser/handle-silent-inputs.html test is failing
cdumez@apple.com [Fri, 18 Sep 2020 18:55:05 +0000 (18:55 +0000)]
webaudio/Analyser/handle-silent-inputs.html test is failing
https://bugs.webkit.org/show_bug.cgi?id=216708

Reviewed by Geoffrey Garen.

Source/WebCore:

Merge the following fix to AnalyserNode from Blink so that webaudio/Analyser/handle-silent-inputs.html
layout test starts passing:
- https://codereview.chromium.org/2666063003

No new tests, rebaselined existing test.

* Modules/webaudio/AnalyserNode.cpp:
(WebCore::AnalyserNode::process):
(WebCore::AnalyserNode::updatePullStatus):
(WebCore::AnalyserNode::tailTime const):
* Modules/webaudio/AnalyserNode.h:
* Modules/webaudio/AudioBasicInspectorNode.h:

LayoutTests:

Rebaseline test that is now passing.

* webaudio/Analyser/handle-silent-inputs-expected.txt:

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

2 months agoResync web-platform-tests/webaudio from upstream
cdumez@apple.com [Fri, 18 Sep 2020 17:53:00 +0000 (17:53 +0000)]
Resync web-platform-tests/webaudio from upstream
https://bugs.webkit.org/show_bug.cgi?id=216700

Reviewed by Sam Weinig.

Resync web-platform-tests/webaudio from upstream 175a1086e0061c75d1.

* web-platform-tests/webaudio/the-audio-api/the-audiocontext-interface/audiocontext-not-fully-active-expected.txt: Added.
* web-platform-tests/webaudio/the-audio-api/the-audiocontext-interface/audiocontext-not-fully-active.html: Added.
* web-platform-tests/webaudio/the-audio-api/the-audiocontext-interface/resources/not-fully-active-helper.sub.html: Added.
* web-platform-tests/webaudio/the-audio-api/the-audiocontext-interface/resources/w3c-import.log: Added.
* web-platform-tests/webaudio/the-audio-api/the-audiocontext-interface/w3c-import.log:
* web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/extended-audioworkletnode-with-parameters.https-expected.txt: Added.
* web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/extended-audioworkletnode-with-parameters.https.html: Added.
* web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/w3c-import.log:
* web-platform-tests/webaudio/the-audio-api/the-convolvernode-interface/realtime-conv-expected.txt:
* web-platform-tests/webaudio/the-audio-api/the-convolvernode-interface/realtime-conv.html:
* web-platform-tests/webaudio/the-audio-api/the-delaynode-interface/delay-test-expected.txt: Added.
* web-platform-tests/webaudio/the-audio-api/the-delaynode-interface/delay-test.html: Added.
* web-platform-tests/webaudio/the-audio-api/the-delaynode-interface/w3c-import.log:

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

2 months agoWebpages flash when getting closed
sihui_liu@apple.com [Fri, 18 Sep 2020 17:52:59 +0000 (17:52 +0000)]
Webpages flash when getting closed
https://bugs.webkit.org/show_bug.cgi?id=216131
<rdar://problem/62264106>

Reviewed by Chris Dumez.

Closing a page in web process will detach root CA layer and clears content in view immediately. If this happens
in web process before transaction, which contains view hierachy change or layer change, is committed in UI
process, we would see a white flash. To try fixing this issue, we explicitly delay sending the close message
to next runloop cycle.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::close):
(WebKit::WebPageProxy::receivedNavigationPolicyDecision):
* UIProcess/WebProcessProxy.cpp:
(WebKit::m_shutdownPreventingScopeCounter):
(WebKit::WebProcessProxy::canTerminateAuxiliaryProcess):
* UIProcess/WebProcessProxy.h: remove class ScopePreventingShutdown and use RefCounter to prevent process
shutdown.
(WebKit::WebProcessProxy::shutdownPreventingScope):
(WebKit::WebProcessProxy::ScopePreventingShutdown::ScopePreventingShutdown): Deleted.
(WebKit::WebProcessProxy::ScopePreventingShutdown::~ScopePreventingShutdown): Deleted.
(WebKit::WebProcessProxy::makeScopePreventingShutdown): Deleted.

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

2 months agoAdd internal flag to enable/disable H264 hardware encoder
youenn@apple.com [Fri, 18 Sep 2020 17:26:24 +0000 (17:26 +0000)]
Add internal flag to enable/disable H264 hardware encoder
https://bugs.webkit.org/show_bug.cgi?id=216534

Reviewed by Eric Carlson.

Source/WebCore:

Update process-wide hardware H264 boolean flag based on internal feature flag.
No change of behavior.

* platform/mediastream/libwebrtc/LibWebRTCProvider.cpp:
(WebCore::LibWebRTCProvider::setH264HardwareEncoderAllowed):
* platform/mediastream/libwebrtc/LibWebRTCProvider.h:
* platform/mediastream/libwebrtc/LibWebRTCProviderCocoa.cpp:
(WebCore::LibWebRTCProvider::setH264HardwareEncoderAllowed):
(WebCore::LibWebRTCProviderCocoa::~LibWebRTCProviderCocoa):
(WebCore::LibWebRTCProviderCocoa::setH264HardwareEncoderAllowed): Deleted.
* platform/mediastream/libwebrtc/LibWebRTCProviderCocoa.h:
* testing/Internals.cpp:
(WebCore::Internals::resetToConsistentState):
(WebCore::Internals::setH264HardwareEncoderAllowed):

Source/WebKit:

* Shared/WebPreferencesInternal.yaml:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):

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

2 months agoHash deviceIds in WebProcess instead of UIProcess to allow audio output device IDs...
youenn@apple.com [Fri, 18 Sep 2020 17:15:17 +0000 (17:15 +0000)]
Hash deviceIds in WebProcess instead of UIProcess to allow audio output device IDs in WebProcess
https://bugs.webkit.org/show_bug.cgi?id=216693

Reviewed by Eric Carlson.

LayoutTests/imported/w3c:

* web-platform-tests/mediacapture-streams/MediaDevices-enumerateDevices-returned-objects.https-expected.txt:

Source/WebCore:

Make sure to create new MediaDeviceInfo objects everytime enumerateDevices is called.
Covered by updated tests.

* Modules/mediastream/MediaDevices.cpp:
(WebCore::MediaDevices::MediaDevices):
(WebCore::MediaDevices::stop):
(WebCore::MediaDevices::computeDevices):
(WebCore::MediaDevices::enumerateDevices):
(WebCore::MediaDevices::refreshDevices): Deleted.
* Modules/mediastream/MediaDevices.h:

Source/WebKit:

* UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
(WebKit::UserMediaPermissionRequestManagerProxy::computeFilteredDeviceList):
(WebKit::UserMediaPermissionRequestManagerProxy::enumerateMediaDevicesForFrame):
* UIProcess/UserMediaPermissionRequestManagerProxy.h:

LayoutTests:

* fast/mediastream/device-change-event-2.html:

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

2 months agoImport Analyser / AudioBuffer / AudioBufferSource layout tests from Blink
cdumez@apple.com [Fri, 18 Sep 2020 17:13:09 +0000 (17:13 +0000)]
Import Analyser / AudioBuffer / AudioBufferSource layout tests from Blink
https://bugs.webkit.org/show_bug.cgi?id=216649

Reviewed by Eric Carlson.

Import Analyser / AudioBuffer / AudioBufferSource layout tests from Blink to extend
webaudio test coverage.

* webaudio/Analyser/automatic-pull-node-expected.txt: Added.
* webaudio/Analyser/automatic-pull-node.html: Added.
* webaudio/Analyser/handle-silent-inputs-expected.txt: Added.
* webaudio/Analyser/handle-silent-inputs.html: Added.
* webaudio/Analyser/realtimeanalyser-byte-data-expected.txt: Added.
* webaudio/Analyser/realtimeanalyser-byte-data.html: Added.
* webaudio/Analyser/realtimeanalyser-downmix-expected.txt: Added.
* webaudio/Analyser/realtimeanalyser-downmix.html: Added.
* webaudio/Analyser/realtimeanalyser-fftsize-reset-expected.txt: Added.
* webaudio/Analyser/realtimeanalyser-fftsize-reset.html: Added.
* webaudio/Analyser/realtimeanalyser-float-data-expected.txt: Added.
* webaudio/Analyser/realtimeanalyser-float-data.html: Added.
* webaudio/Analyser/realtimeanalyser-freq-data-expected.txt: Added.
* webaudio/Analyser/realtimeanalyser-freq-data-smoothing-expected.txt: Added.
* webaudio/Analyser/realtimeanalyser-freq-data-smoothing.html: Added.
* webaudio/Analyser/realtimeanalyser-freq-data.html: Added.
* webaudio/Analyser/realtimeanalyser-multiple-calls-expected.txt: Added.
* webaudio/Analyser/realtimeanalyser-multiple-calls.html: Added.
* webaudio/Analyser/realtimeanalyser-zero-expected.txt: Added.
* webaudio/Analyser/realtimeanalyser-zero.html: Added.
* webaudio/AudioBuffer/audiobuffer-resample-expected.txt: Added.
* webaudio/AudioBuffer/audiobuffer-resample.html: Added.
* webaudio/AudioBuffer/huge-buffer-expected.txt: Added.
* webaudio/AudioBuffer/huge-buffer.html: Added.
* webaudio/AudioBufferSource/audiobuffersource-detune-modulated-impulse-expected.txt: Added.
* webaudio/AudioBufferSource/audiobuffersource-detune-modulated-impulse.html: Added.
* webaudio/AudioBufferSource/audiobuffersource-detune-modulation-expected.txt: Added.
* webaudio/AudioBufferSource/audiobuffersource-detune-modulation.html: Added.
* webaudio/AudioBufferSource/audiobuffersource-late-start-expected.txt: Added.
* webaudio/AudioBufferSource/audiobuffersource-late-start.html: Added.
* webaudio/AudioBufferSource/audiobuffersource-loop-comprehensive-expected.txt: Added.
* webaudio/AudioBufferSource/audiobuffersource-loop-comprehensive.html: Added.
* webaudio/AudioBufferSource/audiobuffersource-loop-grain-no-duration-expected.txt: Added.
* webaudio/AudioBufferSource/audiobuffersource-loop-grain-no-duration.html: Added.
* webaudio/AudioBufferSource/audiobuffersource-loop-points-expected.txt: Added.
* webaudio/AudioBufferSource/audiobuffersource-loop-points.html: Added.
* webaudio/AudioBufferSource/audiobuffersource-playbackrate-expected.txt: Added.
* webaudio/AudioBufferSource/audiobuffersource-playbackrate-modulated-impulse-expected.txt: Added.
* webaudio/AudioBufferSource/audiobuffersource-playbackrate-modulated-impulse.html: Added.
* webaudio/AudioBufferSource/audiobuffersource-playbackrate-modulation-expected.txt: Added.
* webaudio/AudioBufferSource/audiobuffersource-playbackrate-modulation.html: Added.
* webaudio/AudioBufferSource/audiobuffersource-playbackrate.html: Added.
* webaudio/AudioBufferSource/audiobuffersource-premature-loop-stop-expected.txt: Added.
* webaudio/AudioBufferSource/audiobuffersource-premature-loop-stop.html: Added.
* webaudio/AudioBufferSource/resources/audiobuffersource-detune-modulation-expected.wav: Added.
* webaudio/AudioBufferSource/resources/audiobuffersource-loop-points-expected.wav: Added.
* webaudio/AudioBufferSource/resources/audiobuffersource-playbackrate-modulation-expected.wav: Added.
* webaudio/audiobuffersource-loop-comprehensive-expected.txt: Removed.
* webaudio/audiobuffersource-loop-comprehensive.html: Removed.
* webaudio/audiobuffersource-loop-points-expected.wav: Removed.
* webaudio/audiobuffersource-loop-points.html: Removed.
* webaudio/audiobuffersource-negative-playbackrate-interpolated-loop.html:
* webaudio/audiobuffersource-negative-playbackrate-interpolated.html:
* webaudio/audiobuffersource-negative-playbackrate-loop.html:
* webaudio/audiobuffersource-negative-playbackrate.html:
* webaudio/audiobuffersource-playbackrate-expected.wav: Removed.
* webaudio/audiobuffersource-start.html:
* webaudio/resources/audiobuffersource-testing-legacy.js: Copied from LayoutTests/webaudio/resources/audiobuffersource-testing.js.
(createTestBuffer):
(createRamp):
(checkSingleTest):
(checkAllTests):
* webaudio/resources/audiobuffersource-testing.js:
(createTestBuffer):
(checkSingleTest):
(checkAllTests):
(createSawtoothWithModulation):
* webaudio/resources/buffer-loader.js:
(BufferLoader):
(request.onload):
(request.onerror):
(BufferLoader.prototype.loadBuffer):
(BufferLoader.prototype.load):
* webaudio/resources/fft.js: Added.
(FFT):
(this.toString):
(FFT.prototype.FFTException):
(FFT.prototype.FFTRadix2Core):
(FFT.prototype.fft):
(FFT.prototype.iFFTRadix2Core):
(FFT.prototype.ifft):
(FFT.prototype.ifftScale):
(FFT.prototype.RFFTRadix2CoreStage1):
(FFT.prototype.rfft):
* webaudio/resources/realtimeanalyser-testing.js: Added.
(createGraph):
(applyWindow):
(computeFFTMagnitude):
(dbToLinear):
(linearToDb):
(clipMagnitude):
(compareFloatFreq):
(smoothFFT):
(convertFloatToByte):

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

2 months agoREGRESSION(r254031): Captions fail to load on jw.org
jer.noble@apple.com [Fri, 18 Sep 2020 17:03:52 +0000 (17:03 +0000)]
REGRESSION(r254031): Captions fail to load on jw.org
https://bugs.webkit.org/show_bug.cgi?id=216672
<rdar://problem/69016059>

Reviewed by Eric Carlson.

LayoutTests/imported/w3c:

* web-platform-tests/html/semantics/embedded-content/media-elements/track/track-element/cloneNode-expected.txt:
* web-platform-tests/html/semantics/embedded-content/media-elements/track/track-element/track-data-url-expected.txt:
* web-platform-tests/service-workers/service-worker/webvtt-cross-origin.https-expected.txt:

Source/WebCore:

Revert r254031.

* loader/TextTrackLoader.cpp:
(WebCore::TextTrackLoader::load):

LayoutTests:

* http/tests/security/contentSecurityPolicy/resources/track.php: Removed.
* http/tests/security/contentSecurityPolicy/track-redirect-allowed.html:
* http/tests/security/contentSecurityPolicy/track-redirect-allowed2.html:
* http/tests/security/contentSecurityPolicy/track-redirect-blocked.html:
* http/tests/security/text-track-crossorigin-expected.txt:
* http/tests/security/text-track-crossorigin.html:

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

2 months ago[macOS Big Sur] ASSERTION FAILED: !m_gamepadMap.get(device)./platform/gamepad/mac...
cdumez@apple.com [Fri, 18 Sep 2020 16:43:40 +0000 (16:43 +0000)]
[macOS Big Sur] ASSERTION FAILED: !m_gamepadMap.get(device)./platform/gamepad/mac/HIDGamepadProvider.mm(233) under WebCore::HIDGamepadProvider::deviceAdded
https://bugs.webkit.org/show_bug.cgi?id=216665
<rdar://problem/68641574>

Reviewed by Alex Christensen.

On macOS Big Sur, it appears we get notified multiple times that the Shenzhen Longshengwei Technology Gamepad
is getting added during Gamepad.GCFVersusHID API test. This was causing an assertion to be hit under
HIDGamepadProvider::deviceAdded() where we expected the device not not already be in the map. In this patch,
we work around this HID quirk on Big Sur by ignoring the notification if we already know about the device.

No new tests, fixes existing API test.

* platform/gamepad/mac/HIDGamepadProvider.mm:
(WebCore::HIDGamepadProvider::deviceAdded):

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

2 months agoVectorize SetTargetAtTime processing in AudioParamTimeline
cdumez@apple.com [Fri, 18 Sep 2020 16:43:27 +0000 (16:43 +0000)]
Vectorize SetTargetAtTime processing in AudioParamTimeline
https://bugs.webkit.org/show_bug.cgi?id=216673
<rdar://problem/69111432>

Reviewed by Sam Weinig.

Fix the SSE implementation of VectorMath::vsadd() to properly deal with source
and destination alignment, similarly to what is done in other VectorMath functions.

No new tests, fixes existing crash on GTK bots.

* platform/audio/VectorMath.cpp:
(WebCore::VectorMath::vsadd):

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

2 months agoUnified build fixes from ARMv7 build failures
pmatos@igalia.com [Fri, 18 Sep 2020 16:32:45 +0000 (16:32 +0000)]
Unified build fixes from ARMv7 build failures
https://bugs.webkit.org/show_bug.cgi?id=216698

Reviewed by Adrian Perez de Castro.

* llint/LLIntThunks.cpp:
* runtime/FileBasedFuzzerAgent.cpp:
* runtime/FunctionExecutableDump.cpp:
* runtime/NativeExecutable.cpp:
* runtime/WeakMapImpl.cpp:

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

2 months agoUnreviewed, rebaseline imported/w3c/web-platform-tests/webaudio/the-audio-api/the...
cdumez@apple.com [Fri, 18 Sep 2020 15:24:41 +0000 (15:24 +0000)]
Unreviewed, rebaseline imported/w3c/web-platform-tests/webaudio/the-audio-api/the-mediaelementaudiosourcenode-interface/mediaElementAudioSourceToScriptProcessorTest.html.

* web-platform-tests/webaudio/the-audio-api/the-mediaelementaudiosourcenode-interface/mediaElementAudioSourceToScriptProcessorTest-expected.txt:

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

2 months agoUnified build fixes in media code
youenn@apple.com [Fri, 18 Sep 2020 15:13:34 +0000 (15:13 +0000)]
Unified build fixes in media code
https://bugs.webkit.org/show_bug.cgi?id=216691

Reviewed by Sam Weinig.

Add missing includes and/or missing undef.
No change of behavior.

* GPUProcess/webrtc/RemoteAudioMediaStreamTrackRenderer.cpp:
* GPUProcess/webrtc/RemoteMediaRecorder.cpp:
* WebProcess/WebPage/WebPageOverlay.h:
* WebProcess/cocoa/RemoteRealtimeMediaSource.cpp:
* WebProcess/cocoa/RemoteRealtimeMediaSource.h:

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

2 months ago[LFC][IFC] Move computedLineLogicalRect to InlineFormattingContext::Geometry
zalan@apple.com [Fri, 18 Sep 2020 12:15:06 +0000 (12:15 +0000)]
[LFC][IFC] Move computedLineLogicalRect to InlineFormattingContext::Geometry
https://bugs.webkit.org/show_bug.cgi?id=216680

Reviewed by Simon Fraser.

This function computes line geometry. It belongs in InlineFormattingContext::Geometry.

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

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

2 months agoEnable paint timing by default
noam@webkit.org [Fri, 18 Sep 2020 11:23:31 +0000 (11:23 +0000)]
Enable paint timing by default
https://bugs.webkit.org/show_bug.cgi?id=211736

Reviewed by Simon Fraser.

* Shared/WebPreferencesExperimental.yaml:
        PaintTimingEnabled default to true.

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

2 months ago[LFC][IFC] Move inline box constructing and alignment logic to LineBoxBuilder
zalan@apple.com [Fri, 18 Sep 2020 11:16:35 +0000 (11:16 +0000)]
[LFC][IFC] Move inline box constructing and alignment logic to LineBoxBuilder
https://bugs.webkit.org/show_bug.cgi?id=216678

Reviewed by Simon Fraser.

Move the LineBox related logic out of the LineBox class to InlineFormattingContext::Geometry::LineBoxBuilder.
This makes the LineBox class a light, box like class that we can cache in the InlineFormattingState.

* layout/inlineformatting/InlineFormattingContext.cpp:
(WebCore::Layout::InlineFormattingContext::computedLineLogicalRect const):
(WebCore::Layout::InlineFormattingContext::computeGeometryForLineContent):
* layout/inlineformatting/InlineFormattingContext.h:
* layout/inlineformatting/InlineFormattingContextGeometry.cpp:
(WebCore::Layout::LineBoxBuilder::formattingContext const):
(WebCore::Layout::LineBoxBuilder::root const):
(WebCore::Layout::LineBoxBuilder::layoutState const):
(WebCore::Layout::HangingContent::width const):
(WebCore::Layout::HangingContent::isConditional const):
(WebCore::Layout::HangingContent::setIsConditional):
(WebCore::Layout::HangingContent::expand):
(WebCore::Layout::HangingContent::reset):
(WebCore::Layout::collectHangingContent):
(WebCore::Layout::horizontalAlignmentOffset):
(WebCore::Layout::LineBoxBuilder::LineBoxBuilder):
(WebCore::Layout::LineBoxBuilder::build):
(WebCore::Layout::LineBoxBuilder::constructInlineBoxes):
(WebCore::Layout::LineBoxBuilder::computeInlineBoxesLogicalHeight):
(WebCore::Layout::LineBoxBuilder::alignInlineBoxesVerticallyAndComputeLineBoxHeight):
(WebCore::Layout::InlineFormattingContext::Geometry::lineBoxForLineContent):
* layout/inlineformatting/InlineLine.cpp:
* layout/inlineformatting/InlineLineBox.cpp:
(WebCore::Layout::LineBox::InlineBox::InlineBox):
(WebCore::Layout::LineBox::LineBox):
(WebCore::Layout::m_isLineVisuallyEmpty):
(WebCore::Layout::LineBox::addRootInlineBox):
(WebCore::Layout::LineBox::addInlineBox):
(WebCore::Layout::HangingContent::width const): Deleted.
(WebCore::Layout::HangingContent::isConditional const): Deleted.
(WebCore::Layout::HangingContent::setIsConditional): Deleted.
(WebCore::Layout::HangingContent::expand): Deleted.
(WebCore::Layout::HangingContent::reset): Deleted.
(WebCore::Layout::collectHangingContent): Deleted.
(WebCore::Layout::horizontalAlignmentOffset): Deleted.
(WebCore::Layout::m_inlineFormattingContext): Deleted.
(WebCore::Layout::LineBox::constructInlineBoxes): Deleted.
(WebCore::Layout::LineBox::computeInlineBoxesLogicalHeight): Deleted.
(WebCore::Layout::LineBox::alignInlineBoxesVerticallyAndComputeLineBoxHeight): Deleted.
(WebCore::Layout::LineBox::formattingContext const): Deleted.
(WebCore::Layout::LineBox::root const): Deleted.
(WebCore::Layout::LineBox::layoutState const): Deleted.
* layout/inlineformatting/InlineLineBox.h:
(WebCore::Layout::LineBox::alignmentBaseline const):
(WebCore::Layout::LineBox::setLogicalHeight):
(WebCore::Layout::LineBox::setHorizontalAlignmentOffset):
(WebCore::Layout::LineBox::rootInlineBox):
(WebCore::Layout::LineBox::nonRootInlineBoxes const):
(WebCore::Layout::LineBox::inlineBoxForLayoutBox):
* layout/inlineformatting/InlineLineBuilder.cpp:
(WebCore::Layout::LineBuilder::layoutInlineContent):
* layout/inlineformatting/InlineLineBuilder.h:

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

2 months ago[WPE] Unreviewed test gardening. Mark several fast/layoutformattingcontext as failure...
dpino@igalia.com [Fri, 18 Sep 2020 11:10:30 +0000 (11:10 +0000)]
[WPE] Unreviewed test gardening. Mark several fast/layoutformattingcontext as failure after r267024.

* platform/wpe/TestExpectations:

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

2 months ago[ews] Set only one worker for JSC ARMv7 builder and tester queues
dpino@igalia.com [Fri, 18 Sep 2020 08:20:26 +0000 (08:20 +0000)]
[ews] Set only one worker for JSC ARMv7 builder and tester queues
https://bugs.webkit.org/show_bug.cgi?id=216476

Reviewed by Aakash Jain.

Currently many builds are failing in EWS JSC ARMv7 tester queue due to
a linking error in libicu.  The problem lies on the boards that are
used to run the tests which have different system libraries.

Temporarily use one single builder and tester producing binaries compatible
with the boards.

* BuildSlaveSupport/ews-build/config.json:

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

2 months ago[l10n] [pt_BR] Updated Brazilian Portuguese translation
carlosgc@webkit.org [Fri, 18 Sep 2020 08:19:39 +0000 (08:19 +0000)]
[l10n] [pt_BR] Updated Brazilian Portuguese translation
https://bugs.webkit.org/show_bug.cgi?id=216436

Patch by Rafael Fontenelle <rafaelff@gnome.org> on 2020-09-18
Rubber-stamped by Carlos Garcia Campos.

* pt_BR.po:

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

2 months agoXHR.timeout is affected by long tasks
youenn@apple.com [Fri, 18 Sep 2020 08:15:32 +0000 (08:15 +0000)]
XHR.timeout is affected by long tasks
https://bugs.webkit.org/show_bug.cgi?id=216266
<rdar://problem/68908150>

Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

* web-platform-tests/xhr/xhr-timeout-longtask.any-expected.txt: Added.
* web-platform-tests/xhr/xhr-timeout-longtask.any.html: Added.
* web-platform-tests/xhr/xhr-timeout-longtask.any.js: Added.
* web-platform-tests/xhr/xhr-timeout-longtask.any.worker-expected.txt: Added.
* web-platform-tests/xhr/xhr-timeout-longtask.any.worker.html: Added.

Source/WebCore:

Long tasks may block the main thread, which may block IPC processing of load messages.
In that case, even though the load is finished, WebProcess did not know that yet and will cancel the load.
To prevent that, in case of XHR timeout, do an explicit check to compute the done flag.
https://fetch.spec.whatwg.org/#done-flag

Tests: imported/w3c/web-platform-tests/xhr/xhr-timeout-longtask.any.html
       imported/w3c/web-platform-tests/xhr/xhr-timeout-longtask.any.worker.html

* loader/DocumentThreadableLoader.cpp:
(WebCore::DocumentThreadableLoader::computeIsDone):
* loader/DocumentThreadableLoader.h:
* loader/LoaderStrategy.h:
* loader/ThreadableLoader.h:
* loader/ThreadableLoaderClient.h:
(WebCore::ThreadableLoaderClient::notifyIsDone):
* loader/ThreadableLoaderClientWrapper.h:
(WebCore::ThreadableLoaderClientWrapper::notifyIsDone):
* loader/WorkerThreadableLoader.cpp:
(WebCore::WorkerThreadableLoader::computeIsDone):
(WebCore::WorkerThreadableLoader::MainThreadBridge::computeIsDone):
(WebCore::WorkerThreadableLoader::MainThreadBridge::notifyIsDone):
* loader/WorkerThreadableLoader.h:
(WebCore::WorkerThreadableLoader::MainThreadBridge::loaderProxy):
* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::didReachTimeout):
(WebCore::XMLHttpRequest::notifyIsDone):
* xml/XMLHttpRequest.h:

Source/WebKit:

Go to network process to know whether a load is finished or not.

* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::isResourceLoadFinished):
* NetworkProcess/NetworkConnectionToWebProcess.h:
* NetworkProcess/NetworkConnectionToWebProcess.messages.in:
* WebProcess/Network/WebLoaderStrategy.cpp:
(WebKit::WebLoaderStrategy::isResourceLoadFinished):
* WebProcess/Network/WebLoaderStrategy.h:

Source/WebKitLegacy:

* WebCoreSupport/WebResourceLoadScheduler.cpp:
(WebResourceLoadScheduler::isResourceLoadFinished):
* WebCoreSupport/WebResourceLoadScheduler.h:

LayoutTests:

platform/mac-wk1/TestExpectations: Skip WK1 test.

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

2 months ago[GTK] Epiphany does not make connections in Incognito Mode after clearing .cache
carlosgc@webkit.org [Fri, 18 Sep 2020 08:14:50 +0000 (08:14 +0000)]
[GTK] Epiphany does not make connections in Incognito Mode after clearing .cache
https://bugs.webkit.org/show_bug.cgi?id=216430

Reviewed by Adrian Perez de Castro.

Source/WebKit:

The problem is that when using an ephemeral context, the download is started before the ephemeral session has
been registered in the network process, so it's just ignored.

* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::createDownloadProxy): Pass the given WebsiteDataStore to ensureNetworkProcess().

Tools:

Add unit test to check we can start downloads in ephemeral sessions before a web view is created.

* TestWebKitAPI/Tests/WebKitGLib/TestDownloads.cpp:
(testDownloadEphemeralContext):
(beforeAll):

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

2 months agoEnable MediaRecorder by default on MacOS
youenn@apple.com [Fri, 18 Sep 2020 07:38:15 +0000 (07:38 +0000)]
Enable MediaRecorder by default on MacOS
https://bugs.webkit.org/show_bug.cgi?id=216663

Reviewed by Eric Carlson.

* Shared/WebPreferencesDefaultValues.cpp:
(WebKit::defaultMediaRecorderEnabled):
* Shared/WebPreferencesDefaultValues.h:
* Shared/WebPreferencesExperimental.yaml:

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

2 months agoUnreviewed test gardening for rdar://57029120.
ryanhaddad@apple.com [Fri, 18 Sep 2020 04:54:57 +0000 (04:54 +0000)]
Unreviewed test gardening for rdar://57029120.

* TestWebKitAPI/Tests/WebKitCocoa/IndexedDBStructuredCloneBackwardCompatibility.mm:

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

2 months agoRemove runtime setting for enabling/disabling the UserTiming and ResourceTiming APIs
weinig@apple.com [Fri, 18 Sep 2020 02:08:20 +0000 (02:08 +0000)]
Remove runtime setting for enabling/disabling the UserTiming and ResourceTiming APIs
https://bugs.webkit.org/show_bug.cgi?id=216556

Reviewed by Darin Adler.

Remove runtime setting for enabling/disabling UserTiming and ResourceTiming
APIs. They have both been on for a while in WebKit2 and there aren't any
known uses cases for disabling them. In addition to removing the setting,
they are now enabled in LegacyWebKit as well.

Source/WebCore:

In addition to removing UserTiming and ResourceTiming, we can also remove the
checks for PerformanceTimelineEnabled, as that was defined entirely in terms
of the former.

* loader/CrossOriginPreflightChecker.cpp:
(WebCore::CrossOriginPreflightChecker::startPreflight):
* loader/DocumentThreadableLoader.cpp:
(WebCore::DocumentThreadableLoader::loadRequest):
* loader/ResourceTimingInformation.cpp:
(WebCore::ResourceTimingInformation::addResourceTiming):
(WebCore::ResourceTimingInformation::storeResourceTimingInitiatorInformation):
* loader/SubresourceLoader.cpp:
(WebCore::SubresourceLoader::reportResourceTiming):
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::requestResource):
(WebCore::CachedResourceLoader::revalidateResource):
(WebCore::CachedResourceLoader::loadResource):
* page/Performance.idl:
* page/PerformanceEntry.cpp:
(WebCore::PerformanceEntry::parseEntryTypeString):
* page/PerformanceEntry.idl:
* page/PerformanceObserver.idl:
* page/PerformanceObserverEntryList.idl:
* page/PerformanceResourceTiming.idl:
* page/RuntimeEnabledFeatures.h:
(WebCore::RuntimeEnabledFeatures::setResourceTimingEnabled): Deleted.
(WebCore::RuntimeEnabledFeatures::resourceTimingEnabled const): Deleted.
(WebCore::RuntimeEnabledFeatures::setUserTimingEnabled): Deleted.
(WebCore::RuntimeEnabledFeatures::userTimingEnabled const): Deleted.
(WebCore::RuntimeEnabledFeatures::performanceTimelineEnabled const): Deleted.

Source/WebKit:

* Shared/WebPreferences.yaml:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetUserTimingEnabled):
(WKPreferencesGetUserTimingEnabled):
(WKPreferencesSetResourceTimingEnabled):
(WKPreferencesGetResourceTimingEnabled):
* UIProcess/API/C/WKPreferencesRefPrivate.h:

Source/WebKitLegacy/mac:

* WebView/WebPreferences.mm:
(+[WebPreferences initialize]):
(-[WebPreferences setUserTimingEnabled:]):
(-[WebPreferences userTimingEnabled]):
(-[WebPreferences setResourceTimingEnabled:]):
(-[WebPreferences resourceTimingEnabled]):
* WebView/WebPreferencesPrivate.h:
* WebView/WebView.mm:
(-[WebView _preferencesChanged:]):

Source/WebKitLegacy/win:

* WebPreferences.cpp:
(WebPreferences::initializeDefaultSettings):
(WebPreferences::setUserTimingEnabled):
(WebPreferences::userTimingEnabled):
(WebPreferences::setResourceTimingEnabled):
(WebPreferences::resourceTimingEnabled):
* WebView.cpp:
(WebView::notifyPreferencesChanged):

Tools:

* DumpRenderTree/mac/DumpRenderTree.mm:
(resetWebPreferencesToConsistentValues):
* DumpRenderTree/win/DumpRenderTree.cpp:
(resetWebPreferencesToConsistentValues):
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::resetPreferencesToConsistentValues):

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

2 months agoUse OS_CONSTANT(EFFECTIVE_ADDRESS_WIDTH) in speculationFromCell()'s isSanePointer().
mark.lam@apple.com [Fri, 18 Sep 2020 02:06:41 +0000 (02:06 +0000)]
Use OS_CONSTANT(EFFECTIVE_ADDRESS_WIDTH) in speculationFromCell()'s isSanePointer().
https://bugs.webkit.org/show_bug.cgi?id=216638

Reviewed by Saam Barati.

We should be using OS_CONSTANT(EFFECTIVE_ADDRESS_WIDTH) instead of assuming the
width of the pointer address bits.

* bytecode/SpeculatedType.cpp:
(JSC::isSanePointer):

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

2 months agoSelection API: Introduce LiveRangeSelectionEnabled, off by default
darin@apple.com [Fri, 18 Sep 2020 01:45:00 +0000 (01:45 +0000)]
Selection API: Introduce LiveRangeSelectionEnabled, off by default
https://bugs.webkit.org/show_bug.cgi?id=216656

Reviewed by Sam Weinig.

Source/WebCore:

For interoperability, the Selection API requires behavior that is quite different
from how our Selection object has behaves historically. Specifically, the range
returned is a live range that update as the selection updates and the selection,
in turn, is updated if the returned range is modified.

This significant change will have compatibility impact on websites and other
content that assumes the legacy  WebKit behavior, so we are developing it behind
a feature flag, LiveRangeSelectionEnabled.

This patch introduces the live range selection behind the flag, but leaves one
significant area unresolved, changing selection to keep track of the original
endpoints rather than only canonicalized endpoints, and a couple of loose ends,
lifetime of ride-along properties on the live range object, and updating test
expectations for the new behavior.

* dom/CharacterData.cpp:
(WebCore::CharacterData::setData): Fixed timing of call to Document::textRemoved
by letting setDataAndUpdate do it; otherwise it can be called after the selection
has been updated, and the range gets updated twice.
(WebCore::CharacterData::appendData): Pass UpdateLiveRanges::No to setDataAndUpdate,
to preserve the existing "don't update ranges" behavior for now at least.
(WebCore::CharacterData::insertData): Fixed timing of call to Document::textInserted
by letting setDataAndUpdate do it, for the same reason as above.
(WebCore::CharacterData::deleteData): Ditto, for textRemoved.
(WebCore::CharacterData::replaceData): Ditto, for textRemoved and textInserted.
(WebCore::CharacterData::setDataAndUpdate): Added UpdateLiveRanges argument and
calls to textRemoved and textInserted, after setting data, but before other updates.

* dom/CharacterData.h: Made setDataAndUpdate protected and added UpdateLiveRanges.

* dom/Document.h: Added optimized version of the Node::contains function. When the
node in question is the document we can just check treeScope and isConnected
rather than walking up the tree.

* dom/Node.cpp:
(WebCore::Node::isDescendantOf const): Moved special case for document to the top
of the function; seems a more important special case than disconnected nodes and
nodes with no children.
(WebCore::Node::isDescendantOrShadowDescendantOf const): Reworded the FIXME for clarity.
(WebCore::Node::contains const): Changed this to toke a reference instead of a pointer.
The pointer flavor is now inlined in the header.

* dom/Node.h: Added an overload of contains that takes a reference, analogous to what
we already have for isDescendantOf.

* dom/Position.cpp:
(WebCore::Position::Position): Removed too-strict assertions. When we start using
positions to represent arbitrary DOM positions for things outside editing we won't
want these assertions any more, and we hit them when we use Position in a more
straightforward way, like some cases in this patch.
(WebCore::Position::primaryDirection const): Added a missing null check. This case
is hit in some test cases in the new mode.

* dom/Range.cpp: Removed some, but probably not all, of the unneeded headers.
(WebCore::Range::~Range): Added an assertion.
(WebCore::Range::updateAssociatedSelection): Added. Tells FrameSelection to update
the selection when this is the live range associated with the selection.
(WebCore::Range::updateDocument): Added an assertion.
(WebCore::Range::setStart): Call updateAssociatedSelection.
(WebCore::Range::setEnd): Ditto.
(WebCore::Range::collapse): Ditto.
(WebCore::Range::processContents): Call collapse here to share slightly more
code so we don't have to call updateAssociatedSelection here.
(WebCore::Range::checkNodeOffsetPair): Made this a static function so it can
be used outside the Range class. Also fixed indentation of the switch statement.
(WebCore::Range::selectNodeContents): Call updateAssociatedSelection and
updateDocument.
(WebCore::setBothEndpoints): Added.
(WebCore::Range::updateFromSelection): Added. Uses setBothEndpoints.
(WebCore::createLiveRange): Refactored to call setBothEndpoints.

* dom/Range.h: Added didAssociateWithSelection, didDisassociateFromSelection,
updateFromSelection, updateAssociatedSelection, and m_isAssociatedWithSelection.
Also made checkNodeOffsetPair a public static member function instead of a
private non-static member function.

* dom/Text.cpp:
(WebCore::Text::setDataAndUpdate): Update to pass along UpdateLiveRanges argument.
* dom/Text.h: Ditto. Also made the override of setDataAndUpdate private.

* editing/FrameSelection.cpp:
(WebCore::FrameSelection::setSelectionWithoutUpdatingAppearance): Call
updateAssociatedLiveRange after updating the selection.
(WebCore::containsEndpoints): Added. Used to check if a live range still has the
document as its root node so it can remain associated this with the selection.
(WebCore::FrameSelection::associatedLiveRange): Added.
(WebCore::FrameSelection::disassociateLiveRange): Added.
(WebCore::FrameSelection::associateLiveRange): Added.
(WebCore::FrameSelection::updateFromAssociatedLiveRange): Added.
(WebCore::FrameSelection::updateAssociatedLiveRange): Added.

* editing/FrameSelection.h: Added associatedLiveRange, associateLiveRange,
disassociateLiveRange, updateFromAssociatedLiveRange, updateAssociatedLiveRange,
and m_associatedLiveRange. Also change m_document to a WeakPtr and do some
tidying up.

* page/DOMSelection.cpp:
(WebCore::selectionShadowAncestor): Assert the live range setting is false,
since this code is not used in that case. Changed the return type to RefPtr.
Address the FIXME here by getting the document in a simpler way.
(WebCore::DOMSelection::create): Moved here from the header.
(WebCore::DOMSelection::frame const): Added. Returns a RefPtr. This gets rid
of the need for various instances of the "protector" pattern in this file.
(WebCore::DOMSelection::range const): Added. Returns the selected range, but
checks for the shadow tree case and returns null in that case.
(WebCore::DOMSelection::anchorPosition const): Redid as a member function.
(WebCore::DOMSelection::focusPosition const): Ditto.
(WebCore::DOMSelection::basePosition const): Ditto.
(WebCore::DOMSelection::extentPosition const): Ditto.
(WebCore::DOMSelection::anchorNode const): Rewrote to be simpler using the
functions above.
(WebCore::DOMSelection::anchorOffset const): Ditto.
(WebCore::DOMSelection::focusNode const): Ditto.
(WebCore::DOMSelection::focusOffset const): Ditto.
(WebCore::DOMSelection::baseNode const): Ditto.
(WebCore::DOMSelection::baseOffset const): Ditto.
(WebCore::DOMSelection::extentNode const): Ditto.
(WebCore::DOMSelection::extentOffset const): Ditto.
(WebCore::DOMSelection::isCollapsed const): Rewrote using DOMSelection::range
and SimpleRange::collapsed.
(WebCore::DOMSelection::type const): Updated since frame returns RefPtr.
(WebCore::DOMSelection::rangeCount const): Ditto.
(WebCore::DOMSelection::collapse): Added new corrected checking for special
cases, guarded by the setting.
(WebCore::DOMSelection::collapseToEnd): Updated since frame returns RefPtr.
way to do protection. Added a call to disassociateLiveRange. No need to put
under a setting guard since it does nothing if feature is not enabled.
(WebCore::DOMSelection::collapseToStart): Ditto.
(WebCore::DOMSelection::empty): Call removeAllRanges so we don't have two
copies of the same function to maintain.
(WebCore::DOMSelection::setBaseAndExtent): Use makeRefPtr, added corrected
checking for special cases guarded by the setting.
(WebCore::DOMSelection::setPosition): Call collapse so we don't have two
copies of the same function to maintain.
(WebCore::DOMSelection::modify): Updated since frame returns RefPtr.
(WebCore::DOMSelection::extend): Ditto. Also added corrected checking for
special cases guarded by the setting.
(WebCore::DOMSelection::getRangeAt): Added a version of this function that
simply returns the associated live range, creating one if needed, guarded
by the setting.
(WebCore::DOMSelection::removeAllRanges): Updated since frame returns RefPtr.
(WebCore::DOMSelection::addRange): Added a version of this function that
matches the specification, guarded by the setting.
(WebCore::DOMSelection::removeRange): Added.
(WebCore::DOMSelection::deleteFromDocument): Added a version of this
function that simply calls deleteContents on the associated live range,
guarded by the setting.
(WebCore::DOMSelection::containsNode const): Put the text node workaround
inside a setting check. I also figured out why workaround was added: it
works around unwanted range canonicalization in various tests, but also
introduces incorrect behavior. Also rewrote to use DOMSelection::range.
(WebCore::DOMSelection::toString): Use DOMSelection::range, guarded by
the setting, so we return empty string when selection is in the shadow tree.
(WebCore::DOMSelection::shadowAdjustedNode const): When the live range
setting is enabled, adjust by changing the node to nullptr, not finding an
ancestor in the document.
(WebCore::DOMSelection::shadowAdjustedOffset const): Ditto, but offset 0.
(WebCore::DOMSelection::isValidForPosition const): Assert that the live range
selection setting is disabled, because this incorrect check should only be
used to preserve legacy behavior until we are ready to turn it on.

* page/DOMSelection.h: Updated since setBaseAndExtent, setPosition, and
collapse can raise exceptions, although they only do so when the live range
selection setting is on. Added removeRange. Moved the create function
out of the class definition into the .cpp file. Made return values of
baseNode, extentNode, anchorNode, focusNode, and shadowAdjustedNode RefPtr.
Made toString const. Added frame, range, anchorPosition, focusPosition,
basePosition, and extentPosition private functions. Removed visibleSelection.

* page/DOMSelection.idl: Updated file to match a recent draft of the
Selection standard, reordering things to match the order they appear there.
Added removeRange, guarded by the setting. Also got rid of the
unncecessary "undefined" string defaults for the arguments to the modify
method since they have no effect on observed behavior anyway.

* page/Settings.yaml: Added liveRangeSelectionEnabled.

Source/WebKit:

* Shared/WebPreferencesInternal.yaml: Added LiveRangeSelectionEnabled.

LayoutTests:

* editing/selection/move-to-line-boundary-clear-selection.html: Fix test that accidentally
relied on our non-standard behavior of clamping a too-high offset to a valid value. This
was not what we were trying to test. Without this change, the test fails in the new mode.
The offset was "5", which seems to be a character count, rather than "1", meaning "after
the text node".
* editing/selection/toString-1.html: Ditto. The offset here was 3, but the HTML element
has only 2 children, the head and the body.
* editing/selection/user-select-all-selection.html: Ditto. The code was passing the wrong
container by acccident, the parent of the text node rather than the text node.

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

2 months agoWeb Inspector: REGRESSION(r266885): fix open source build
drousso@apple.com [Fri, 18 Sep 2020 01:44:09 +0000 (01:44 +0000)]
Web Inspector: REGRESSION(r266885): fix open source build
https://bugs.webkit.org/show_bug.cgi?id=216675

Reviewed by Timothy Hatcher.

Add back methods used by `WebInspector.framework`.

Source/JavaScriptCore:

* inspector/InspectorBackendDispatcher.cpp:
(Inspector::BackendDispatcher::getInteger): Added.
(Inspector::BackendDispatcher::getDouble): Added.
(Inspector::BackendDispatcher::getString): Added.

Source/WTF:

* wtf/JSONValues.h:
* wtf/JSONValues.cpp:
(WTF::JSONImpl::Value::asDouble const): Added.
(WTF::JSONImpl::Value::asInteger const): Added.
(WTF::JSONImpl::Value::asString const): Added.
(WTF::JSONImpl::ObjectBase::getBoolean const): Added.
(WTF::JSONImpl::ObjectBase::getString const): Added.
(WTF::JSONImpl::ObjectBase::getObject const): Added.
(WTF::JSONImpl::ObjectBase::getArray const): Added.
(WTF::JSONImpl::ObjectBase::getValue const): Added.

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

2 months agoVectorize SetTargetAtTime processing in AudioParamTimeline
cdumez@apple.com [Fri, 18 Sep 2020 01:33:07 +0000 (01:33 +0000)]
Vectorize SetTargetAtTime processing in AudioParamTimeline
https://bugs.webkit.org/show_bug.cgi?id=216673

Reviewed by Sam Weinig.

LayoutTests/imported/w3c:

Rebaseline WPT tests now that more checks are passing.

* web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/audioparam-setTargetAtTime-expected.txt:
* web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/event-insertion-expected.txt:
* web-platform-tests/webaudio/the-audio-api/the-constantsourcenode-interface/test-constantsourcenode-expected.txt:

Source/WebCore:

Vectorize SetTargetAtTime processing in AudioParamTimeline.

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

I have however added the USE(ACCELERATE) and HAVE(ARM_NEON_INTRINSICS) implementations
for DARWIN and non-SSE platforms.

This allows us to pass some more tests that we were failing merely due to precision
issues. Now that our implemention matches Blink's, our results are consistent
with Blink.

No new tests, rebaselined existing tests.

* Modules/webaudio/AudioParamTimeline.cpp:
(WebCore::AudioParamTimeline::valuesForTimeRangeImpl):
(WebCore::AudioParamTimeline::processSetTarget):
* Modules/webaudio/AudioParamTimeline.h:
* platform/audio/VectorMath.cpp:
(WebCore::VectorMath::vsadd):
(WebCore::VectorMath::vsmul):
* platform/audio/VectorMath.h:

LayoutTests:

* webaudio/audioparam-cancel-and-hold-expected.txt:
Rebaseline test now that one more subtest is passing.

* webaudio/audioparam-setTargetAtTime-expected.txt: Removed.
* webaudio/audioparam-setTargetAtTime.html: Removed.
Remove outdated test now that it was upstreamed to WPT. The updated
copy resides at:
imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/audioparam-setTargetAtTime.html

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

2 months agoInconsistent loop exit assertion in B3ReduceLoopStrength
tzagallo@apple.com [Fri, 18 Sep 2020 01:17:35 +0000 (01:17 +0000)]
Inconsistent loop exit assertion in B3ReduceLoopStrength
https://bugs.webkit.org/show_bug.cgi?id=216274
<rdar://problem/68513573>

Reviewed by Keith Miller.

JSTests:

* stress/reduce-loop-strength-multiple-exits.js: Added.
(build_array):
(main):

Source/JavaScriptCore:

On B3ReduceLoopStrength, we first calculate where the loop exits to, and ensure there's only
one exit target. Later on, we compute how many places within the loop exit to that single exit
target. Currently, we assume that having a single target implies that we'll only ever have one
exit point, which is incorrect. To fix it, instead of asserting there should only be one exit
point, we just bail if we find more than one.

* b3/B3ReduceLoopStrength.cpp:
(JSC::B3::ReduceLoopStrength::reduceByteCopyLoopsToMemcpy):

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

2 months agoPer-app accent color overrides are broken
timothy_horton@apple.com [Fri, 18 Sep 2020 00:50:17 +0000 (00:50 +0000)]
Per-app accent color overrides are broken
https://bugs.webkit.org/show_bug.cgi?id=216674
<rdar://problem/67745464>

Reviewed by Wenson Hsieh.

Source/WebCore/PAL:

* pal/spi/mac/NSApplicationSPI.h:

Source/WebKit:

No new tests; I've no idea how to write a test that would have caught this;
any test I can imagine would have also written to _accentColor and worked fine.

* UIProcess/mac/PageClientImplMac.mm:
(WebKit::PageClientImpl::accentColor):
AppKit changed the meaning of the IPI. Use the correct version.
We still write to _accentColor; it is now purely an override.

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

2 months ago[Cocoa] canPlayType('audio/mpeg; codecs="mp3"') returns ""
eric.carlson@apple.com [Thu, 17 Sep 2020 22:36:32 +0000 (22:36 +0000)]
[Cocoa] canPlayType('audio/mpeg; codecs="mp3"') returns ""
https://bugs.webkit.org/show_bug.cgi?id=147309

Reviewed by Darin Adler.
Source/WebCore:

'audio/mpeg; codecs="mp3"' is not an RFC 3003 compliant MIME type but some big
web sites use it. AVFoundation says the type is not supported, but MediaPlayerPrivateMediaSourceAVFObjC
previously returned "maybe" for all extended types where the container type is
supported. This bug was fixed when we moved the MIME type logic from MediaPlayerPrivateMediaSourceAVFObjC
to MIMETypeCache, so add a mechanism to override extended types and use it to
support 'audio/mpeg; codecs="mp3"'.

Test: media/media-can-play-mp3.html

* platform/graphics/MIMETypeCache.cpp:
(WebCore::MIMETypeCache::canDecodeType):
(WebCore::MIMETypeCache::overrideExtendedType):
* platform/graphics/MIMETypeCache.h:

LayoutTests:

* media/media-can-play-mp3-expected.txt: Added.
* media/media-can-play-mp3.html: Added.

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

2 months agoEnable ITP in WKWebViews for apps with the full browser entitlement who are not linke...
katherine_cheney@apple.com [Thu, 17 Sep 2020 20:42:52 +0000 (20:42 +0000)]
Enable ITP in WKWebViews for apps with the full browser entitlement who are not linked to iOS 14.0
https://bugs.webkit.org/show_bug.cgi?id=216655
<rdar://problem/69081227>

Reviewed by Brent Fulgham.

Apps with the full browser entitlement who are not linked to iOS 14.0
should have ITP enabled in WKWebViews by default.

No new tests, no way currently to test apps with different iOS
versions. Tested manually.

* Shared/Cocoa/DefaultWebBrowserChecks.mm:
(WebKit::determineITPStateInternal):
Ignore the early return for the linked-on-or-after check if the
app has the default browser entitlement so we still enable ITP based
on the user's preference.

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

2 months agoWebKit::XPCServiceEventHandler block should call exit() on the main thread
ddkilzer@apple.com [Thu, 17 Sep 2020 20:21:33 +0000 (20:21 +0000)]
WebKit::XPCServiceEventHandler block should call exit() on the main thread
<https://webkit.org/b/216594>
<rdar://problem/68053217>

Reviewed by Chris Dumez.

* Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceMain.mm:
(WebKit::XPCServiceEventHandler):
- Call exit() on the main thread. I chose dispatch_sync() here
  so that if other crashes occur on the main thread, we will
  know if this background thread is waiting to call exit() at
  the same time. Also, if a different background thread calls
  exit() in the future with this block running on the main
  thread, we'll know where the block came from since the XPC
  handler thread will be waiting for the dispatch_sync() to
  return (instead of having a mysterious block calling exit() on
  the main thread and not knowing where it came from).
- Add logging (including simulated crash logs) when either of
  these exit() code paths is taken.

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

2 months agoSegfault in WebCore::IDBKey::createBinary
msaboff@apple.com [Thu, 17 Sep 2020 19:52:44 +0000 (19:52 +0000)]
Segfault in WebCore::IDBKey::createBinary
https://bugs.webkit.org/show_bug.cgi?id=216501

Reviewed by Youenn Fablet.

Source/WebCore:

If we can't get a copy of the JSBufferView, return an invalid IDBKey.
This can happen if we are low on memory.  The existing calling code already
handles the case where we might produce an invalid IDBKey.

Test: storage/indexeddb/IDBKey-create-array-buffer-view-oom.html

* Modules/indexeddb/IDBKey.cpp:
(WebCore::IDBKey::createBinary):

LayoutTests:

New test.  Since this test is looking for the out of memory condition, the test is written
to avoid false failures in the case we can't achieve out of memory.  That is when the
expected exception is not thrown.

* storage/indexeddb/IDBKey-create-array-buffer-view-oom-expected.txt: Added.
* storage/indexeddb/IDBKey-create-array-buffer-view-oom.html: Added.

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

2 months agoRemove AnimationTimeline::animationsForElement() and the CSS Transitions and CSS...
graouts@webkit.org [Thu, 17 Sep 2020 19:28:43 +0000 (19:28 +0000)]
Remove AnimationTimeline::animationsForElement() and the CSS Transitions and CSS Animations accessors on ElementAnimationRareData
https://bugs.webkit.org/show_bug.cgi?id=216654

Reviewed by Simon Fraser.

Before we implemented the correct way to sort animations using KeyframeEffectStack, we relied on distinct animation collections
for CSS Transtions and CSS Animations and remaining Web Animations on ElementAnimationRareData. We don't need those anymore and
we can use a single collection which we can now name animations() for all animations.

Additionally, the AnimationTimeline::animationsForElement() method where these collections were used when requesting unsorted
animations was unnecessary and an incorrect design. Animations do not belong to a given timeline, so we now use the accessors
on ElementAnimationRareData directly to get the sorted list of effects or the single animations collection.

* animation/AnimationTimeline.cpp:
(WebCore::AnimationTimeline::animationWasAddedToElement):
(WebCore::AnimationTimeline::animationWasRemovedFromElement):
(WebCore::AnimationTimeline::willChangeRendererForElement):
(WebCore::AnimationTimeline::cancelDeclarativeAnimationsForElement):
(WebCore::AnimationTimeline::animationsForElement const): Deleted.
* animation/AnimationTimeline.h:
* animation/DocumentTimeline.cpp:
(WebCore::DocumentTimeline::animationCanBeRemoved):
(WebCore::DocumentTimeline::computeExtentOfAnimation const):
(WebCore::DocumentTimeline::isRunningAnimationOnRenderer const):
(WebCore::DocumentTimeline::isRunningAcceleratedAnimationOnRenderer const):
(WebCore::DocumentTimeline::animatedStyleForRenderer):
(WebCore::DocumentTimeline::updateListOfElementsWithRunningAcceleratedAnimationsForElement):
* animation/ElementAnimationRareData.h:
(WebCore::ElementAnimationRareData::animations):
(WebCore::ElementAnimationRareData::webAnimations): Deleted.
(WebCore::ElementAnimationRareData::cssAnimations): Deleted.
(WebCore::ElementAnimationRareData::transitions): Deleted.
* dom/Element.cpp:
(WebCore::Element::animations const):
(WebCore::Element::ensureAnimations):
(WebCore::Element::getAnimations):
(WebCore::Element::webAnimations const): Deleted.
(WebCore::Element::cssAnimations const): Deleted.
(WebCore::Element::transitions const): Deleted.
(WebCore::Element::ensureWebAnimations): Deleted.
(WebCore::Element::ensureCSSAnimations): Deleted.
(WebCore::Element::ensureTransitions): Deleted.
* dom/Element.h:

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

2 months agoRename ShouldAllowExternalSchemes to ShouldAllowExternalSchemesButNotAppLinks to...
commit-queue@webkit.org [Thu, 17 Sep 2020 18:54:04 +0000 (18:54 +0000)]
Rename ShouldAllowExternalSchemes to ShouldAllowExternalSchemesButNotAppLinks to clarify what this enum value is for.
https://bugs.webkit.org/show_bug.cgi?id=216651

Patch by Hoa Dinh <dvh@apple.com> on 2020-09-17
Reviewed by Alex Christensen.

Rename ShouldAllowExternalSchemes to ShouldAllowExternalSchemesButNotAppLinks and reflects the change where it's used.

Source/WebCore:

Source/WebCore:
* loader/FrameLoaderTypes.h:
* page/ContextMenuController.cpp:
(WebCore::ContextMenuController::contextMenuItemSelected):

Source/WebKit:

Source/WebKit:
* Shared/SessionState.cpp:
(WebKit::isValidEnum):
* UIProcess/API/APINavigationAction.h:
* UIProcess/API/glib/WebKitWebViewSessionState.cpp:
(toExternalURLsPolicy):
(toWebCoreExternalURLsPolicy):
* UIProcess/WebPageProxy.h:
* UIProcess/mac/LegacySessionStateCoding.cpp:
(WebKit::decodeSessionHistoryEntry):
* WebProcess/InjectedBundle/InjectedBundleNavigationAction.cpp:
(WebKit::InjectedBundleNavigationAction::InjectedBundleNavigationAction):

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

2 months agoAnalyserNode.getFloatFrequencyData() should fill array with -Infinity when input...
cdumez@apple.com [Thu, 17 Sep 2020 18:39:24 +0000 (18:39 +0000)]
AnalyserNode.getFloatFrequencyData() should fill array with -Infinity when input is silent
https://bugs.webkit.org/show_bug.cgi?id=216629

Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

Rebaseline WPT test that is now passing.

* web-platform-tests/webaudio/the-audio-api/the-analysernode-interface/test-analyser-minimum-expected.txt:

Source/WebCore:

AnalyserNode.getFloatFrequencyData() should fill array with -Infinity when input is silent.
This behavior is consistent with Gecko and Blink. Previously, we'd use AnalyserNode.minDecibels
instead.

No new tests, rebaselined existing test.

* Modules/webaudio/RealtimeAnalyser.cpp:
(WebCore::RealtimeAnalyser::getFloatFrequencyData):
* platform/audio/AudioUtilities.cpp:
(WebCore::AudioUtilities::linearToDecibels):

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

2 months agoRegression(r267144) 4 webaudio/oscillator tests are broken
cdumez@apple.com [Thu, 17 Sep 2020 18:10:34 +0000 (18:10 +0000)]
Regression(r267144) 4 webaudio/oscillator tests are broken
https://bugs.webkit.org/show_bug.cgi?id=216625
<rdar://problem/69024624>

Reviewed by Darin Adler.

* webaudio/oscillator-custom.html:
* webaudio/oscillator-sawtooth.html:
* webaudio/oscillator-sine.html:
* webaudio/oscillator-square.html:
* webaudio/oscillator-triangle.html:
Update tests to use oscillator-testing-legacy.js since they are not compatible
with the newer oscillator-testing.js that was resync'd from Blink.

* webaudio/oscillator-triangle-expected.wav:
Rebaseline test that has different output due to the fix in r267153.

* webaudio/resources/oscillator-testing-legacy.js: Added.
Restore old copy of oscillator-testing.js and rename it to oscillator-testing-legacy.js.

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

2 months ago[Flatpak SDK] bwrap: add pipewire socket as bind mount
commit-queue@webkit.org [Thu, 17 Sep 2020 18:07:45 +0000 (18:07 +0000)]
[Flatpak SDK] bwrap: add pipewire socket as bind mount
https://bugs.webkit.org/show_bug.cgi?id=216606

Patch by Víctor Manuel Jáquez Leal <vjaquez@igalia.com> on 2020-09-17
Reviewed by Philippe Normand.

Add pipewire socket to bwrap as a try binding mount.

* flatpak/webkit-bwrap:

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

2 months ago[JSC] Async generator default-export is not handled
ysuzuki@apple.com [Thu, 17 Sep 2020 17:54:23 +0000 (17:54 +0000)]
[JSC] Async generator default-export is not handled
https://bugs.webkit.org/show_bug.cgi?id=216643

Reviewed by Ross Kirsling.

JSTests:

* modules/async-generator-default.js: Added.
(from.string_appeared_here.import.test.from.string_appeared_here.async test2):
* modules/async-generator-default/module.js: Added.
(export.default.async test):
* test262/expectations.yaml:

Source/JavaScriptCore:

`export default async function * test() { }` syntax should be correctly handled.
This patch adds the code retrieving "test" name from the above declaration correctly.

* parser/Parser.cpp:
(JSC::Parser<LexerType>::parseExportDeclaration):

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

2 months ago[iOS] YouTube does not route video to AirPlay the first time
jer.noble@apple.com [Thu, 17 Sep 2020 17:47:28 +0000 (17:47 +0000)]
[iOS] YouTube does not route video to AirPlay the first time
https://bugs.webkit.org/show_bug.cgi?id=216626
<rdar://problem/62222846>

Reviewed by Eric Carlson.

Difficult to test this, since it requires an live AppleTV device.

During a refactor, the order of a couple calls changed. A MediaPlaybackTarget needs to be in place before the MediaPlayer can
be told to start playing to that target. Once the target is in-place, subsequent requests to start playing to that target succeed,
which explains the "only initial AirPlay fails" behavior.

* platform/audio/ios/MediaSessionManagerIOS.mm:
(WebCore::MediaSessionManageriOS::activeVideoRouteDidChange):

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

2 months ago[ews] Re-enable api-gtk queue
dpino@igalia.com [Thu, 17 Sep 2020 17:45:39 +0000 (17:45 +0000)]
[ews] Re-enable api-gtk queue
https://bugs.webkit.org/show_bug.cgi?id=216647

Reviewed by Aakash Jain.

The queue was disabled temporarily in r266956.

* BuildSlaveSupport/ews-app/ews/views/statusbubble.py:
(StatusBubble):
* BuildSlaveSupport/ews-build/config.json:

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

2 months ago[JSC] Update JSModuleNamespaceObject::defineOwnProperty
ysuzuki@apple.com [Thu, 17 Sep 2020 17:17:04 +0000 (17:17 +0000)]
[JSC] Update JSModuleNamespaceObject::defineOwnProperty
https://bugs.webkit.org/show_bug.cgi?id=216640

Reviewed by Ross Kirsling.

JSTests:

* modules/module-namespace-object-define-own-property.js: Added.
(from.string_appeared_here.import.as.ns.from.string_appeared_here.shouldThrow):
(shouldThrow):
(shouldThrow.):
(get TypeError):
* modules/module-namespace-object-define-own-property/module.js: Added.
* test262/expectations.yaml:

Source/JavaScriptCore:

This patch implements spec update of JSModuleNamespaceObject::defineOwnProperty.
We implement https://tc39.es/ecma262/#sec-module-namespace-exotic-objects-defineownproperty-p-desc precisely.

* runtime/JSModuleNamespaceObject.cpp:
(JSC::JSModuleNamespaceObject::getOwnPropertySlotCommon):
(JSC::JSModuleNamespaceObject::deleteProperty):
(JSC::JSModuleNamespaceObject::getOwnPropertyNames):
(JSC::JSModuleNamespaceObject::defineOwnProperty):

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

2 months ago[WPE] Unreviewed gardening. Several fast/events/mouse-* tests are flaky after r264117.
dpino@igalia.com [Thu, 17 Sep 2020 17:08:21 +0000 (17:08 +0000)]
[WPE] Unreviewed gardening. Several fast/events/mouse-* tests are flaky after r264117.

The test started failing somewhere between r264103-r264117.

* platform/wpe/TestExpectations:

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

2 months agoWe shouldn't need to specify a category for preferences now that they are split into...
weinig@apple.com [Thu, 17 Sep 2020 16:17:40 +0000 (16:17 +0000)]
We shouldn't need to specify a category for preferences now that they are split into separate files
https://bugs.webkit.org/show_bug.cgi?id=216648

Reviewed by Tim Horton.

Remove need / ability to specify a category in the yaml, rather, infer the category
from which file it is in.

* Scripts/GeneratePreferences.rb:
* Shared/WebPreferencesDebug.yaml:
* Shared/WebPreferencesExperimental.yaml:
* Shared/WebPreferencesInternal.yaml:

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

2 months ago[WPE] Unreviewed gardening. Update baselines after r20056.
dpino@igalia.com [Thu, 17 Sep 2020 15:59:51 +0000 (15:59 +0000)]
[WPE] Unreviewed gardening. Update baselines after r20056.

* platform/glib/imported/w3c/web-platform-tests/selection/selection-select-all-move-input-crash-expected.txt:
* platform/wpe/css2.1/t0905-c5525-fltwidth-00-c-g-expected.txt: Updated after r266510.
* platform/wpe/imported/w3c/web-platform-tests/html/browsers/history/the-location-interface/location_hash-expected.txt: Updated after r266399.

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

2 months agoAdd some pointer sanity checks to speculationFromCell().
mark.lam@apple.com [Thu, 17 Sep 2020 15:43:19 +0000 (15:43 +0000)]
Add some pointer sanity checks to speculationFromCell().
https://bugs.webkit.org/show_bug.cgi?id=216638
rdar://23226333

Reviewed by Yusuke Suzuki.

Add some sanity checks to mitigate against some potential pointer corruptions
from profiling data.  The goal here is not to exhaustively filter out all possible
bad pointers, but simply to filter out as many as possible to reduce crashes from
such bad pointers, and to do so with the least possible performance impact.

It is OK to do such filtering here because we're only trying to compute a
SpeculatedType from the pointer.  If the pointer is bad, we can just return
SpecNone indicating that we don't have any info to speculate on.

* bytecode/SpeculatedType.cpp:
(JSC::isSanePointer):
(JSC::speculationFromCell):
* runtime/StructureIDTable.h:
(JSC::StructureIDTable::tryGet):
* runtime/VM.h:
(JSC::VM::tryGetStructure):

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

2 months agoStyle::Change should be enum class
antti@apple.com [Thu, 17 Sep 2020 15:07:24 +0000 (15:07 +0000)]
Style::Change should be enum class
https://bugs.webkit.org/show_bug.cgi?id=216644

Reviewed by Sam Weinig.

Also improve the names of the values.

* dom/Document.cpp:
(WebCore::Document::resolveStyle):
* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::willRecalcStyle):
* rendering/updating/RenderTreeBuilderFirstLetter.cpp:
(WebCore::RenderTreeBuilder::FirstLetter::updateStyle):
* rendering/updating/RenderTreeUpdater.cpp:
(WebCore::RenderTreeUpdater::updateRenderTree):
(WebCore::RenderTreeUpdater::updateAfterDescendants):
(WebCore::RenderTreeUpdater::updateElementRenderer):
* rendering/updating/RenderTreeUpdaterGeneratedContent.cpp:
(WebCore::RenderTreeUpdater::GeneratedContent::updatePseudoElement):
* style/StyleChange.cpp:
(WebCore::Style::determineChange):
* style/StyleChange.h:
(): Deleted.
* style/StyleTreeResolver.cpp:
(WebCore::Style::computeDescendantsToResolve):
(WebCore::Style::TreeResolver::resolveElement):
(WebCore::Style::TreeResolver::createAnimatedElementUpdate):
(WebCore::Style::TreeResolver::resolveComposedTree):
* style/StyleTreeResolver.h:
* style/StyleUpdate.h:
* svg/SVGElement.cpp:
(WebCore::SVGElement::willRecalcStyle):

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

2 months ago[GTK] Unreviewed gardening. API test WebKitWebInspectorServer/test-page-list is flaky.
dpino@igalia.com [Thu, 17 Sep 2020 14:44:19 +0000 (14:44 +0000)]
[GTK] Unreviewed gardening. API test WebKitWebInspectorServer/test-page-list is flaky.

* TestWebKitAPI/glib/TestExpectations.json:

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

2 months ago[GLIB] Unreviewwed test gardening. Update baselines after WPT update in r267167.
dpino@igalia.com [Thu, 17 Sep 2020 14:11:26 +0000 (14:11 +0000)]
[GLIB] Unreviewwed test gardening. Update baselines after WPT update in r267167.

* platform/glib/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/k-rate-panner-connections-expected.txt:
* platform/glib/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/k-rate-panner-expected.txt:
* platform/glib/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-biquadfilternode-interface/biquad-automation-expected.txt:

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

2 months agoRemove the legacy animation code
graouts@webkit.org [Thu, 17 Sep 2020 12:39:28 +0000 (12:39 +0000)]
Remove the legacy animation code
https://bugs.webkit.org/show_bug.cgi?id=216608

Reviewed by Dean Jackson.

Source/WebCore:

We remove the legacy animation code found in Source/WebCore/page/animation/, save for CSSPropertyAnimation which
is also used by the new Web Animations engine and now moved to Source/WebCore/animation/. Since we now have a single
animation engine, the runtime flags to optionally enable the Web Animations engine are not needed anymore and removed
as well.

We also remove some testing utilities and some RenderLayerBacking methods specific to accelerated transitions which
the new animation engine does not use.

* CMakeLists.txt:
* Headers.cmake:
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* animation/Animatable.idl:
* animation/AnimationEffect.idl:
* animation/AnimationPlaybackEvent.idl:
* animation/AnimationPlaybackEventInit.idl:
* animation/AnimationTimeline.idl:
* animation/CSSAnimation.idl:
* animation/CSSPropertyAnimation.cpp: Renamed from Source/WebCore/page/animation/CSSPropertyAnimation.cpp.
(WebCore::PropertyWrapperVisitedAffectedColor::PropertyWrapperVisitedAffectedColor):
* animation/CSSPropertyAnimation.h: Renamed from Source/WebCore/page/animation/CSSPropertyAnimation.h.
* animation/CSSTransition.idl:
* animation/DocumentAnimations.idl:
* animation/DocumentOrShadowRootAnimations.idl:
* animation/DocumentTimeline.idl:
* animation/KeyframeEffect.idl:
* animation/WebAnimation.idl:
* animation/WebAnimationTypes.h:
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::computeRenderStyleForProperty):
* dom/Document.cpp:
(WebCore::Document::resolveStyle):
(WebCore::Document::didBecomeCurrentDocumentInFrame):
(WebCore::Document::willBeRemovedFromFrame):
(WebCore::Document::implicitClose):
(WebCore::Document::resume):
* dom/Element.cpp:
(WebCore::Element::removedFromAncestor):
* dom/PseudoElement.cpp:
(WebCore::PseudoElement::clearHostElement):
* history/CachedFrame.cpp:
(WebCore::CachedFrame::destroy):
* page/Frame.cpp:
(WebCore::Frame::Frame):
(WebCore::Frame::clearTimers):
(WebCore::Frame::resumeActiveDOMObjectsAndAnimations):
* page/Frame.h:
* page/FrameView.cpp:
(WebCore::FrameView::didDestroyRenderTree):
(WebCore::FrameView::updateLayoutAndStyleIfNeededRecursive):
* page/FrameViewLayoutContext.cpp:
(WebCore::FrameViewLayoutContext::layout):
* page/Page.cpp:
(WebCore::Page::handleLowModePowerChange):
(WebCore::Page::setIsVisibleInternal):
(WebCore::Page::hiddenPageCSSAnimationSuspensionStateChanged):
* page/RuntimeEnabledFeatures.h:
(WebCore::RuntimeEnabledFeatures::setWebAnimationsEnabled): Deleted.
(WebCore::RuntimeEnabledFeatures::webAnimationsEnabled const): Deleted.
(WebCore::RuntimeEnabledFeatures::setWebAnimationsCSSIntegrationEnabled): Deleted.
(WebCore::RuntimeEnabledFeatures::webAnimationsCSSIntegrationEnabled const): Deleted.
* page/animation/AnimationBase.cpp: Removed.
* page/animation/AnimationBase.h: Removed.
* page/animation/CSSAnimationController.cpp: Removed.
* page/animation/CSSAnimationController.h: Removed.
* page/animation/CSSAnimationControllerPrivate.h: Removed.
* page/animation/CompositeAnimation.cpp: Removed.
* page/animation/CompositeAnimation.h: Removed.
* page/animation/ImplicitAnimation.cpp: Removed.
* page/animation/ImplicitAnimation.h: Removed.
* page/animation/KeyframeAnimation.cpp: Removed.
* page/animation/KeyframeAnimation.h: Removed.
* platform/graphics/GraphicsLayer.h:
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::isKeyframe):
(WebCore::GraphicsLayerCA::createTransformAnimationsFromKeyframes):
* rendering/RenderElement.cpp:
(WebCore::RenderElement::animatedStyle):
* rendering/RenderElement.h:
(WebCore::RenderElement::startTransition): Deleted.
(WebCore::RenderElement::transitionPaused): Deleted.
(WebCore::RenderElement::transitionFinished): Deleted.
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::currentTransform const):
(WebCore::RenderLayer::calculateClipRects const):
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateGeometry):
(WebCore::RenderLayerBacking::notifyAnimationStarted):
(WebCore::RenderLayerBacking::startTransition): Deleted.
(WebCore::RenderLayerBacking::transitionPaused): Deleted.
(WebCore::RenderLayerBacking::transitionFinished): Deleted.
* rendering/RenderLayerBacking.h:
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::flushPendingLayerChanges):
(WebCore::RenderLayerCompositor::updateCompositingLayers):
(WebCore::RenderLayerCompositor::requiresCompositingForAnimation const):
(WebCore::RenderLayerCompositor::isRunningTransformAnimation const):
* rendering/RenderLayerModelObject.cpp:
(WebCore::RenderLayerModelObject::startTransition): Deleted.
(WebCore::RenderLayerModelObject::transitionPaused): Deleted.
(WebCore::RenderLayerModelObject::transitionFinished): Deleted.
* rendering/RenderLayerModelObject.h:
* rendering/RenderObject.h:
(WebCore::RenderObject::legacyAnimation const): Deleted.
* rendering/updating/RenderTreeUpdater.cpp:
(WebCore::RenderTreeUpdater::tearDownRenderers):
* style/StyleAdjuster.cpp:
* style/StyleTreeResolver.cpp:
(WebCore::Style::TreeResolver::createAnimatedElementUpdate):
* testing/InternalSettings.cpp:
(WebCore::InternalSettings::webAnimationsCSSIntegrationEnabled): Deleted.
* testing/InternalSettings.h:
* testing/InternalSettings.idl:
* testing/Internals.cpp:
(WebCore::Internals::numberOfActiveAnimations const):
(WebCore::Internals::animationsAreSuspended const):
(WebCore::Internals::animationsInterval const):
(WebCore::Internals::suspendAnimations const):
(WebCore::Internals::resumeAnimations const):
(WebCore::Internals::acceleratedAnimationsForElement):
(WebCore::Internals::numberOfAnimationTimelineInvalidations const):
(WebCore::Internals::pauseAnimationAtTimeOnElement): Deleted.
(WebCore::Internals::pauseAnimationAtTimeOnPseudoElement): Deleted.
(WebCore::Internals::pauseTransitionAtTimeOnElement): Deleted.
(WebCore::Internals::pauseTransitionAtTimeOnPseudoElement): Deleted.
* testing/Internals.h:
* testing/Internals.idl:

Source/WebKit:

Since we now have a single animation engine, the runtime flags to optionally enable the Web Animations engine are
not needed anymore and are now removed.

* Shared/WebPreferencesExperimental.yaml:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetWebAnimationsEnabled): Deleted.
(WKPreferencesGetWebAnimationsEnabled): Deleted.
(WKPreferencesSetWebAnimationsCSSIntegrationEnabled): Deleted.
(WKPreferencesGetWebAnimationsCSSIntegrationEnabled): Deleted.
* UIProcess/API/C/WKPreferencesRefPrivate.h:
* UIProcess/API/Cocoa/WKPreferences.mm:
(-[WKPreferences _setWebAnimationsCSSIntegrationEnabled:]): Deleted.
(-[WKPreferences _webAnimationsCSSIntegrationEnabled]): Deleted.
* UIProcess/API/Cocoa/WKPreferencesPrivate.h:
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
(WebKit::InjectedBundle::setWebAnimationsEnabled): Deleted.
(WebKit::InjectedBundle::setWebAnimationsCSSIntegrationEnabled): Deleted.
* WebProcess/InjectedBundle/InjectedBundle.h:

Source/WebKitLegacy/mac:

Since we now have a single animation engine, the runtime flags to optionally enable the Web Animations engine are
not needed anymore and are now removed.

* WebView/WebPreferenceKeysPrivate.h:
* WebView/WebPreferences.mm:
(+[WebPreferences initialize]):
(-[WebPreferences webAnimationsEnabled]): Deleted.
(-[WebPreferences setWebAnimationsEnabled:]): Deleted.
(-[WebPreferences webAnimationsCSSIntegrationEnabled]): Deleted.
(-[WebPreferences setWebAnimationsCSSIntegrationEnabled:]): Deleted.
* WebView/WebPreferencesPrivate.h:
* WebView/WebView.mm:
(-[WebView _preferencesChanged:]):

Source/WebKitLegacy/win:

Since we now have a single animation engine, the runtime flags to optionally enable the Web Animations engine are
not needed anymore and are now removed.

* Interfaces/IWebFramePrivate.idl:
* Interfaces/IWebPreferencesPrivate.idl:
* WebFrame.cpp:
(WebFrame::resumeAnimations): Deleted.
(WebFrame::suspendAnimations): Deleted.
(WebFrame::pauseAnimation): Deleted.
(WebFrame::pauseTransition): Deleted.
(WebFrame::numberOfActiveAnimations): Deleted.
* WebFrame.h:
* WebPreferenceKeysPrivate.h:
* WebPreferences.cpp:
(WebPreferences::initializeDefaultSettings):
(WebPreferences::webAnimationsCSSIntegrationEnabled): Deleted.
(WebPreferences::setWebAnimationsCSSIntegrationEnabled): Deleted.
(WebPreferences::setWebAnimationsEnabled): Deleted.
(WebPreferences::webAnimationsEnabled): Deleted.
* WebPreferences.h:
* WebView.cpp:
(WebView::notifyPreferencesChanged):

Tools:

Since we now have a single animation engine, the runtime flags to optionally enable the Web Animations engine are
not needed anymore and are now removed.

* DumpRenderTree/TestOptions.cpp:
(TestOptions::TestOptions):
(TestOptions::webViewIsCompatibleWithOptions const):
* DumpRenderTree/TestOptions.h:
* DumpRenderTree/mac/DumpRenderTree.mm:
(enableExperimentalFeatures):
(setWebPreferencesForTestOptions):
* DumpRenderTree/win/DumpRenderTree.cpp:
(enableExperimentalFeatures):
(setWebPreferencesForTestOptions):

LayoutTests:

Remove any use of now-removed testing methods and some runtime flags from layout tests.

* animations/legacy-encoding-timing-function.html:
* animations/resources/animation-test-helpers.js:
(pauseAnimationAtTimeOnElement):
* http/tests/contentextensions/css-display-none-keyframe.html:
* imported/blink/transitions/resources/opacity-transform-transitions-inside-iframe-inner.html: Removed.
* transitions/background-position-transitions.html:
* transitions/background-transitions.html:
* transitions/blendmode-transitions.html:
* transitions/border-radius-transition.html:
* transitions/clip-path-path-transitions.html:
* transitions/clip-path-transitions.html:
* transitions/clip-transition.html:
* transitions/color-transition-all.html:
* transitions/color-transition-premultiplied.html:
* transitions/color-transition-rounding.html:
* transitions/cross-fade-background-image.html:
* transitions/cross-fade-border-image.html:
* transitions/cubic-bezier-overflow-color.html:
* transitions/cubic-bezier-overflow-length.html:
* transitions/cubic-bezier-overflow-shadow.html:
* transitions/cubic-bezier-overflow-svg-length.html:
* transitions/cubic-bezier-overflow-transform.html:
* transitions/default-timing-function.html:
* transitions/delay.html:
* transitions/flex-transitions.html:
* transitions/font-family-during-transition.html:
* transitions/frames-timing-function.html:
* transitions/interrupted-all-transition.html:
* transitions/longhand-vs-shorthand-initial.html:
* transitions/mask-transitions.html:
* transitions/min-max-width-height-transitions.html:
* transitions/mismatched-shadow-styles.html:
* transitions/mismatched-shadow-transitions.html:
* transitions/mixed-type.html:
* transitions/move-after-transition.html:
* transitions/multiple-background-size-transitions.html:
* transitions/multiple-background-transitions.html:
* transitions/multiple-mask-transitions.html:
* transitions/multiple-shadow-transitions.html:
* transitions/negative-delay.html:
* transitions/opacity-transition-zindex.html:
* transitions/resources/transition-test-helpers.js:
* transitions/shape-outside-transitions.html:
* transitions/shorthand-border-transitions.html:
* transitions/shorthand-transitions.html:
* transitions/steps-timing-function.html:
* transitions/svg-layout-transition.html:
* transitions/svg-text-shadow-transition.html:
* transitions/svg-transitions.html:
* transitions/text-indent-transition.html:
* transitions/transform-op-list-match.html:
* transitions/transform-op-list-no-match.html:
* transitions/transition-end-event-rendering.html:
* transitions/transition-hit-test-transform.html:
* transitions/transition-hit-test.html:
* transitions/transition-in-delay-phase.html:
* transitions/transition-on-element-with-content.html:
* transitions/transition-shorthand-delay.html:
* transitions/transition-timing-function.html:
* transitions/transition-to-from-auto.html:
* transitions/transition-to-from-undefined.html:
* transitions/visited-link-color.html:
* transitions/zero-duration-in-list.html:
* transitions/zero-duration-with-non-zero-delay-start.html:
* webanimations/accelerated-animation-interruption-display-none.html:
* webanimations/accelerated-animation-removal-upon-transition-completion.html:
* webanimations/accelerated-animation-suspension.html:
* webanimations/accelerated-transition-by-removing-property.html:
* webanimations/accessing-current-time-after-clearing-css-animation-effect.html:
* webanimations/accessing-current-time-after-finished-css-animation-target-removal.html:
* webanimations/css-animation-effect-target-change-and-animation-removal-crash.html:
* webanimations/css-animation-effect-target-change-and-get-keyframes-crash.html:
* webanimations/css-animations.html:
* webanimations/css-transition-in-flight-reversal-accelerated.html:
* webanimations/empty-keyframes-crash.html:
* webanimations/partly-accelerated-transition-by-removing-property.html:
* webanimations/setting-css-animation-none-after-clearing-effect.html:
* webanimations/setting-css-animation-timing-property-via-style-after-clearing-effect.html:

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

2 months agoClean up lazy frame loading
commit-queue@webkit.org [Thu, 17 Sep 2020 12:12:18 +0000 (12:12 +0000)]
Clean up lazy frame loading
https://bugs.webkit.org/show_bug.cgi?id=216560

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

Source/WebKit:

Allow web preference to be consistent with lazy image loading.

* Shared/WebPreferencesExperimental.yaml:

LayoutTests:

Remove WPT specific custom code to set the
lazy frame loading setting, not needed since
experimental features will be enabled for WPT
runs and that will set this setting.

* resources/testharnessreport.js:

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

2 months agoSupport export namespace `export * as ns`
ysuzuki@apple.com [Thu, 17 Sep 2020 10:30:19 +0000 (10:30 +0000)]
Support export namespace `export * as ns`
https://bugs.webkit.org/show_bug.cgi?id=214379

Reviewed by Ross Kirsling.

JSTests:

* stress/modules-syntax-error.js:
* stress/modules-syntax.js:
* test262/expectations.yaml:

Source/JavaScriptCore:

This patch supports `export * as ns from "module"` syntax. If it is used, we expose "module"'s namespace object as "ns".
For each module environment, we create *namespace* (starNamespace) private symbol scope variable. And we fill it later
with module namespace object. This way allows us to use module namespace object IC and super fast imported module binding
lookup though environment variable lookup mechanism.

* builtins/BuiltinNames.h:
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::BytecodeGenerator):
* parser/NodesAnalyzeModule.cpp:
(JSC::ExportNamedDeclarationNode::analyzeModule):
* parser/Parser.cpp:
(JSC::Parser<LexerType>::parseExportDeclaration):
* runtime/AbstractModuleRecord.cpp:
(JSC::AbstractModuleRecord::ExportEntry::createNamespace):
(JSC::AbstractModuleRecord::resolveExportImpl):
(JSC::AbstractModuleRecord::getModuleNamespace):
(JSC::AbstractModuleRecord::setModuleEnvironment):
(JSC::AbstractModuleRecord::dump):
* runtime/AbstractModuleRecord.h:
* runtime/CommonIdentifiers.h:
* runtime/JSFunction.cpp:
(JSC::JSFunction::name):
(JSC::JSFunction::reifyName):
* runtime/JSModuleNamespaceObject.cpp:
(JSC::JSModuleNamespaceObject::getOwnPropertySlotCommon):
* runtime/JSModuleRecord.cpp:
(JSC::JSModuleRecord::instantiateDeclarations):
(JSC::JSModuleRecord::evaluate):
* wasm/js/JSWebAssemblyModule.cpp:
(JSC::JSWebAssemblyModule::finishCreation):
* wasm/js/WebAssemblyModuleRecord.cpp:
(JSC::WebAssemblyModuleRecord::link):

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

2 months agoUnified build fix for "redefinition of 'kCMVideoCodecType_VP9"
jer.noble@apple.com [Thu, 17 Sep 2020 09:19:11 +0000 (09:19 +0000)]
Unified build fix for "redefinition of 'kCMVideoCodecType_VP9"
https://bugs.webkit.org/show_bug.cgi?id=216205

Reviewed by Youenn Fablet.

Source/WebCore:

kCMVideoCodecType_VP9 is present in the macOS Big Sur SDK, so the redeclaration can
be removed. To protect builds using prior OS SDKs, wrap the entire VP9 implementation
in ENABLE(VP9) checks.

* platform/graphics/VP9Utilities.cpp:
* platform/graphics/VP9Utilities.h:
* platform/graphics/cocoa/MediaEngineConfigurationFactoryCocoa.cpp:
(WebCore::videoCodecTypeFromRFC4281Type):
(WebCore::createMediaPlayerDecodingConfigurationCocoa):
(): Deleted.
* platform/graphics/cocoa/SourceBufferParserWebM.cpp:
(WebCore::SourceBufferParserWebM::isContentTypeSupported):
* platform/graphics/cocoa/VP9UtilitiesCocoa.h:
* platform/graphics/cocoa/VP9UtilitiesCocoa.mm:
* testing/Internals.cpp:
(WebCore::Internals::Internals):
(WebCore::Internals::parseVPCodecParameters):
(WebCore::Internals::setHardwareVP9DecoderDisabledForTesting):
(WebCore::Internals::setVP9ScreenSizeAndScaleForTesting):

Source/WebKit:

Wrap calls to WebCore VP9 functions in ENABLE(VP9) checks.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::creationParameters):
* WebProcess/WebProcess.cpp:
* WebProcess/WebProcess.h:

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

2 months ago[JSC] Optimize Promise#finally by avoiding creating multiple environments
ysuzuki@apple.com [Thu, 17 Sep 2020 08:05:59 +0000 (08:05 +0000)]
[JSC] Optimize Promise#finally by avoiding creating multiple environments
https://bugs.webkit.org/show_bug.cgi?id=216637

Reviewed by Ross Kirsling.

Let's just create functions inside Promise#finally. This avoids creating
multiple lexical environments that are captured by each function.

* builtins/PromisePrototype.js:
(finally):
(globalPrivate.getThenFinally): Deleted.
(globalPrivate.getCatchFinally): Deleted.

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

2 months ago[css-flex] Remove flexbox's specific computePreferredLogicalWidths()
svillar@igalia.com [Thu, 17 Sep 2020 08:01:07 +0000 (08:01 +0000)]
[css-flex] Remove flexbox's specific computePreferredLogicalWidths()
https://bugs.webkit.org/show_bug.cgi?id=216577

Reviewed by Darin Adler.

Source/WebCore:

Remove the flexbox override of computePreferredLogicalWidths() because it's essentially the same as RenderBlock's
but worst because it was missing some cases that were properly handled in the superclass.

* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::computePreferredLogicalWidths): Deleted.
* rendering/RenderFlexibleBox.h: Ditto.

LayoutTests:

* TestExpectations: Removed flexbox_stf-table-singleline.html and flexbox_stf-table-singleline-2.html that are now passing.

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

2 months ago[LFC][IFC] Move InlineRect from Display to Layout namespace
zalan@apple.com [Thu, 17 Sep 2020 04:40:20 +0000 (04:40 +0000)]
[LFC][IFC] Move InlineRect from Display to Layout namespace
https://bugs.webkit.org/show_bug.cgi?id=216633

Reviewed by Simon Fraser.

Let's move the Display type over to Layout namespace. Display tree needs a different set of data types.

* WebCore.xcodeproj/project.pbxproj:
* layout/displaytree/DisplayLine.h:
(WebCore::Display::Line::rect const):
(WebCore::Display::Line::scrollableOverflow const):
(WebCore::Display::Line::inkOverflow const):
(WebCore::Display::Line::Line):
* layout/displaytree/DisplayRun.h:
(WebCore::Display::Run::rect const):
(WebCore::Display::Run::inkOverflow const):
(WebCore::Display::Run::Run):
* layout/flexformatting/FlexFormattingContext.cpp:
(WebCore::Layout::FlexFormattingContext::sizeAndPlaceFlexItems):
* layout/inlineformatting/InlineFormattingContext.cpp:
(WebCore::Layout::InlineFormattingContext::computedLineLogicalRect const):
(WebCore::Layout::InlineFormattingContext::computeGeometryForLineContent):
* layout/inlineformatting/InlineFormattingContext.h:
* layout/inlineformatting/InlineLineBox.cpp:
(WebCore::Layout::LineBox::InlineBox::InlineBox):
(WebCore::Layout::LineBox::logicalRectForTextRun const):
(WebCore::Layout::LineBox::constructInlineBoxes):
* layout/inlineformatting/InlineLineBox.h:
(WebCore::Layout::LineBox::InlineBox::logicalRect const):
* layout/inlineformatting/InlineRect.h: Renamed from Source/WebCore/layout/displaytree/DisplayInlineRect.h.
(WebCore::Layout::InlineRect::expandHorizontally):
(WebCore::Layout::InlineRect::expandVertically):
(WebCore::Layout::InlineRect::invalidateTop):
(WebCore::Layout::InlineRect::invalidateLeft):
(WebCore::Layout::InlineRect::invalidateWidth):
(WebCore::Layout::InlineRect::invalidateHeight):
(WebCore::Layout::InlineRect::hasValidPosition const):
(WebCore::Layout::InlineRect::hasValidSize const):
(WebCore::Layout::InlineRect::hasValidGeometry const):
(WebCore::Layout::InlineRect::InlineRect):
(WebCore::Layout::InlineRect::invalidatePosition):
(WebCore::Layout::InlineRect::setHasValidPosition):
(WebCore::Layout::InlineRect::setHasValidSize):
(WebCore::Layout::InlineRect::top const):
(WebCore::Layout::InlineRect::left const):
(WebCore::Layout::InlineRect::bottom const):
(WebCore::Layout::InlineRect::right const):
(WebCore::Layout::InlineRect::topLeft const):
(WebCore::Layout::InlineRect::size const):
(WebCore::Layout::InlineRect::width const):
(WebCore::Layout::InlineRect::height const):
(WebCore::Layout::InlineRect::setTopLeft):
(WebCore::Layout::InlineRect::setTop):
(WebCore::Layout::InlineRect::setBottom):
(WebCore::Layout::InlineRect::setLeft):
(WebCore::Layout::InlineRect::setWidth):
(WebCore::Layout::InlineRect::setHeight):
(WebCore::Layout::InlineRect::moveHorizontally):
(WebCore::Layout::InlineRect::moveVertically):
(WebCore::Layout::InlineRect::moveBy):
(WebCore::Layout::InlineRect::expand):
(WebCore::Layout::InlineRect::expandToContain):
(WebCore::Layout::InlineRect::expandVerticallyToContain):
(WebCore::Layout::InlineRect::inflate):
(WebCore::Layout::InlineRect::operator InlineLayoutRect const):

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

2 months agoWebPreferences.yaml is overwhelming, what if we split it up a bit
weinig@apple.com [Thu, 17 Sep 2020 03:58:23 +0000 (03:58 +0000)]
WebPreferences.yaml is overwhelming, what if we split it up a bit
https://bugs.webkit.org/show_bug.cgi?id=216627

Reviewed by Tim Horton.

Split out experimental, internal and debug preferences into their own
yaml files to add a bit of order.

* CMakeLists.txt:
* DerivedSources.make:
* Shared/WebPreferences.yaml:
* Shared/WebPreferencesDebug.yaml: Copied from Source/WebKit/Shared/WebPreferences.yaml.
* Shared/WebPreferencesExperimental.yaml: Copied from Source/WebKit/Shared/WebPreferences.yaml.
* Shared/WebPreferencesInternal.yaml: Copied from Source/WebKit/Shared/WebPreferences.yaml.
* WebKit.xcodeproj/project.pbxproj:

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

2 months ago[LFC] Remove partial invalidation
zalan@apple.com [Thu, 17 Sep 2020 02:59:56 +0000 (02:59 +0000)]
[LFC] Remove partial invalidation
https://bugs.webkit.org/show_bug.cgi?id=216631

Reviewed by Simon Fraser.

Invalidation fails when the LayoutTree does not match the RenderTree structures (e.g. table wrapper box).
Since incremental layouts are not supported yet, it has a very little value. Let's remove it for now.

* layout/display/DisplayView.h:
* layout/integration/LayoutIntegrationLineLayout.h:
* layout/layouttree/LayoutTreeBuilder.cpp:
(WebCore::Layout::LayoutTree::LayoutTree):
(WebCore::Layout::TreeBuilder::buildLayoutTree):
(WebCore::Layout::TreeBuilder::TreeBuilder):
(WebCore::Layout::TreeBuilder::createReplacedBox):
(WebCore::Layout::TreeBuilder::createTextBox):
(WebCore::Layout::TreeBuilder::createLineBreakBox):
(WebCore::Layout::TreeBuilder::createContainer):
(WebCore::Layout::TreeBuilder::createLayoutBox):
(WebCore::Layout::printLayoutTreeForLiveDocuments):
(WebCore::Layout::LayoutTreeContent::LayoutTreeContent): Deleted.
(WebCore::Layout::LayoutTreeContent::addLayoutBoxForRenderer): Deleted.
(WebCore::Layout::TreeBuilder::buildTree): Deleted.
* layout/layouttree/LayoutTreeBuilder.h:
(WebCore::Layout::LayoutTree::root const):
(WebCore::Layout::LayoutTree::append):
(WebCore::Layout::LayoutTreeContent::rootLayoutBox const): Deleted.
(WebCore::Layout::LayoutTreeContent::rootLayoutBox): Deleted.
(WebCore::Layout::LayoutTreeContent::rootRenderer const): Deleted.
(WebCore::Layout::LayoutTreeContent::addBox): Deleted.
(WebCore::Layout::LayoutTreeContent::addContainer): Deleted.
(WebCore::Layout::LayoutTreeContent::layoutBoxForRenderer): Deleted.
(WebCore::Layout::LayoutTreeContent::layoutBoxForRenderer const): Deleted.
(WebCore::Layout::LayoutTreeContent::rendererForLayoutBox const): Deleted.
* page/FrameViewLayoutContext.cpp:
(WebCore::FrameViewLayoutContext::layoutUsingFormattingContext):
(WebCore::FrameViewLayoutContext::invalidateLayoutTreeContent): Deleted.
(WebCore::FrameViewLayoutContext::invalidateLayoutState): Deleted.
* page/FrameViewLayoutContext.h:
(WebCore::FrameViewLayoutContext::layoutFormattingState const):
(WebCore::FrameViewLayoutContext::layoutTreeContent const): Deleted.
* rendering/RenderImage.cpp:
(WebCore::RenderImage::imageChanged):
* rendering/updating/RenderTreeBuilder.cpp:
(WebCore::RenderTreeBuilder::attachToRenderElementInternal):
(WebCore::RenderTreeBuilder::detachFromRenderElement):
* rendering/updating/RenderTreeUpdater.cpp:
(WebCore::RenderTreeUpdater::updateRendererStyle):

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

2 months ago[ macOS wk2 ] imported/w3c/web-platform-tests/service-workers/service-worker/fetch...
hector_i_lopez@apple.com [Thu, 17 Sep 2020 02:58:36 +0000 (02:58 +0000)]
[ macOS wk2 ] imported/w3c/web-platform-tests/service-workers/service-worker/fetch-waits-for-activate.https.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=216634

Unreviewed test gardening.

* platform/mac-wk2/TestExpectations:

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

2 months agoAdded fast/selectors/selection-window-inactive-stroke-color.html to bug and changed...
hector_i_lopez@apple.com [Thu, 17 Sep 2020 02:23:30 +0000 (02:23 +0000)]
Added fast/selectors/selection-window-inactive-stroke-color.html to bug and changed expectations
https://bugs.webkit.org/show_bug.cgi?id=216394

Unreviewed test gardening.

* platform/mac-wk2/TestExpectations:

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

2 months ago[CMake] Add a new library target TestRunnerShared
Hironori.Fujii@sony.com [Thu, 17 Sep 2020 02:05:47 +0000 (02:05 +0000)]
[CMake] Add a new library target TestRunnerShared
https://bugs.webkit.org/show_bug.cgi?id=216465

.:

WinCairo port is using both DRT and WTR. However, it has a problem
for precompiled header builds to compile the source of
TestRunnerShared twice for DRT and WTR.

Add a new library target TestRunnerShared. Re-enable precompiled
header for DRT and WTR for WinCairo.

Reviewed by Don Olmstead.

* Source/cmake/OptionsWinCairo.cmake:
* Source/cmake/WebKitFS.cmake:

Tools:

Reviewed by Don Olmstead.

* DumpRenderTree/CMakeLists.txt:
* DumpRenderTree/PlatformWin.cmake:
* PlatformFTW.cmake:
* PlatformGTK.cmake:
* PlatformMac.cmake:
* PlatformWPE.cmake:
* PlatformWin.cmake:
* TestRunnerShared/CMakeLists.txt: Added.
* TestRunnerShared/config/config.h: Added.
* WebKitTestRunner/CMakeLists.txt:
* WebKitTestRunner/PlatformFTW.cmake:
* WebKitTestRunner/PlatformWin.cmake:

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

2 months agoRevert _setIgnoresAppBoundDomains SPI to compile for macOS
katherine_cheney@apple.com [Thu, 17 Sep 2020 01:57:48 +0000 (01:57 +0000)]
Revert _setIgnoresAppBoundDomains SPI to compile for macOS
https://bugs.webkit.org/show_bug.cgi?id=216628
<rdar://problem/69025655>

Reviewed by Tim Horton.

We need to give users of the _setIgnoresAppBoundDomains SPI time to
convert uses to iOS only, so in the meantime we should still compile
the SPI for macOS so we don't break anything.

* UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
(-[WKWebViewConfiguration _ignoresAppBoundDomains]):
(-[WKWebViewConfiguration _setIgnoresAppBoundDomains:]):
* UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:

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

2 months agoMutationObserverRegistration should be ref counted
rniwa@webkit.org [Thu, 17 Sep 2020 01:53:21 +0000 (01:53 +0000)]
MutationObserverRegistration should be ref counted
https://bugs.webkit.org/show_bug.cgi?id=216528

Reviewed by Darin Adler.

This patch makes MutationObserverRegistration ref counted so that the transient registry can store
Ref<MutationObserverRegistration> instead of a raw pointer. It also merges NodeMutationObserverData
into NodeRareData now that NodeRareData is actually rare after r266714 and r266769.

Before this patch, MutationObserverRegistration had to be kept alive by the originally observed node
using m_nodeKeptAlive whenever a transient observation occurs (i.e. observation of a node which used
to be a part of the subtree of the observed node). With this patch, this complexity is eliminated.

No new tests since there should be no behavioral difference.

* dom/MutationObserver.cpp:
(WebCore::MutationObserver::disconnect): Skip any node for which the observed node had been deleted.
This means that the registration is alive for transient nodes (i.e. a node which used to be a part of
the subtree of the observed node).
(WebCore::MutationObserver::observationStarted): Converted debug assert to a release assert.
(WebCore::MutationObserver::observationEnded): Ditto.
(WebCore::MutationObserver::deliver): Simplified logic a bit using WTF::map.
* dom/MutationObserverRegistration.cpp:
(WebCore::MutationObserverRegistration::create): Added.
(WebCore::MutationObserverRegistration::MutationObserverRegistration): Create a WeakPtr for m_node.
(WebCore::MutationObserverRegistration::observedSubtreeNodeWillDetach): Deleted the code for
m_nodeKeptAlive since the observed node is no longer responsible for keeping this
MutationObserverRegistration alive while transient observarion takes place.
(WebCore::MutationObserverRegistration::takeTransientRegistrations): Ditto.
(WebCore::MutationObserverRegistration::shouldReceiveMutationFrom const):
(WebCore::MutationObserverRegistration::addRegistrationNodesToSet const): Skip m_node if it has been
deleted. This is possible during transient observations.
* dom/MutationObserverRegistration.h:
(WebCore::MutationObserverRegistration): This class is now ref counted. Also made m_node WeakPtr.
(WebCore::MutationObserverRegistration::node):
* dom/Node.cpp:
(WebCore::Node::clearRareData):
(WebCore::Node::moveNodeToNewDocument):
(WebCore::Node::mutationObserverRegistry): Deleted.
(WebCore::Node::transientMutationObserverRegistry): Deleted.
(WebCore::collectMatchingObserversForMutation): Now takes a reference to registry.
(WebCore::Node::registeredMutationObservers):
(WebCore::Node::registerMutationObserver):
(WebCore::Node::unregisterMutationObserver): Converted debug assertions to release assertions. With
script execution forbidden during tree mutations, this should never happen now.
(WebCore::Node::registerTransientMutationObserver):
(WebCore::Node::unregisterTransientMutationObserver): Ditto.
(WebCore::Node::notifyMutationObserversNodeWillDetach):
* dom/Node.h:
* dom/NodeRareData.cpp:
* dom/NodeRareData.h:
(WebCore::NodeMutationObserverData): Merged into NodeRareData.
(WebCore::NodeRareData::mutationObserverData): Deleted.
(WebCore::NodeRareData::ensureMutationObserverData): Deleted.
(WebCore::NodeRareData::mutationObserverRegistry): Added.
(WebCore::NodeRareData::mutationObserverRegistryIfExists): Added.
(WebCore::NodeRareData::transientMutationObserverRegistry): Added.
(WebCore::NodeRareData::useTypes const):

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

2 months agoUnreviewed, reverting r267171.
ryanhaddad@apple.com [Wed, 16 Sep 2020 23:58:07 +0000 (23:58 +0000)]
Unreviewed, reverting r267171.

The tests need to be fixed

Reverted changeset:

"4 webaudio/oscillator tests missing expected results"
https://bugs.webkit.org/show_bug.cgi?id=216625
https://trac.webkit.org/changeset/267171

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

2 months agoRemove runtime setting for enabling/disabling CSS shadow parts
weinig@apple.com [Wed, 16 Sep 2020 23:56:04 +0000 (23:56 +0000)]
Remove runtime setting for enabling/disabling CSS shadow parts
https://bugs.webkit.org/show_bug.cgi?id=216567

Reviewed by Tim Horton.

Remove runtime setting for enabling/disabling CSS shadow parts. It is
on by default and there is no known reason one would need to disable it.

Source/WebCore:

* css/CSSSelector.cpp:
(WebCore::CSSSelector::parsePseudoElementType):
* dom/Element.cpp:
(WebCore::Element::partAttributeChanged):
* dom/Element.idl:
* dom/ShadowRoot.cpp:
(WebCore::parsePartMappingsList):
* page/RuntimeEnabledFeatures.h:
(WebCore::RuntimeEnabledFeatures::setCSSShadowPartsEnabled): Deleted.
(WebCore::RuntimeEnabledFeatures::cssShadowPartsEnabled const): Deleted.
* style/StyleInvalidator.cpp:
(WebCore::Style::Invalidator::invalidateShadowParts):

Source/WebKit:

* Shared/WebPreferences.yaml:

Source/WebKitLegacy/mac:

* WebView/WebPreferenceKeysPrivate.h:
* WebView/WebPreferences.mm:
(+[WebPreferences initialize]):
(-[WebPreferences setCSSShadowPartsEnabled:]):
(-[WebPreferences cssShadowPartsEnabled]):
* WebView/WebPreferencesPrivate.h:
* WebView/WebView.mm:
(-[WebView _preferencesChanged:]):

Tools:

* DumpRenderTree/mac/DumpRenderTree.mm:
(enableExperimentalFeatures):

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

2 months ago4 webaudio/oscillator tests missing expected results
ryanhaddad@apple.com [Wed, 16 Sep 2020 23:54:34 +0000 (23:54 +0000)]
4 webaudio/oscillator tests missing expected results
https://bugs.webkit.org/show_bug.cgi?id=216625

Unreviewed test gardening.

* webaudio/oscillator-custom-expected.txt: Added.
* webaudio/oscillator-sawtooth-expected.txt: Added.
* webaudio/oscillator-square-expected.txt: Added.
* webaudio/oscillator-triangle-expected.txt: Added.

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

2 months agoAudioBufferSourceNode.start() ignores 'when' parameter when pitch rate is 0
cdumez@apple.com [Wed, 16 Sep 2020 23:26:09 +0000 (23:26 +0000)]
AudioBufferSourceNode.start() ignores 'when' parameter when pitch rate is 0
https://bugs.webkit.org/show_bug.cgi?id=216623

Reviewed by Eric Carlson.

LayoutTests/imported/w3c:

Rebaseline WPT test that is now passing.

* web-platform-tests/webaudio/the-audio-api/the-audiobuffersourcenode-interface/audiobuffersource-playbackrate-zero-expected.txt:

Source/WebCore:

AudioBufferSourceNode::renderFromBuffer() has special logic when pitch rate is 0 since
the output value is constant. However, that logic was wrongly always writing to the
begining of the destination buffer, ignoring the computed writeIndex. As a result,
instead of having silence at the beginning of the destination buffer, we would have
it at the end.

No new tests, rebaselined existing test.

* Modules/webaudio/AudioBufferSourceNode.cpp:
(WebCore::AudioBufferSourceNode::renderFromBuffer):

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

2 months agoAudioBufferSourceNode.start() behavior is incorrect when offset is past the end of...
cdumez@apple.com [Wed, 16 Sep 2020 22:43:15 +0000 (22:43 +0000)]
AudioBufferSourceNode.start() behavior is incorrect when offset is past the end of the buffer
https://bugs.webkit.org/show_bug.cgi?id=216622

Reviewed by Geoffrey Garen.

LayoutTests/imported/w3c:

Rebaseline test that is now passing.

* web-platform-tests/webaudio/the-audio-api/the-audiobuffersourcenode-interface/audiobuffersource-start-expected.txt:

Source/WebCore:

AudioBufferSourceNode.start() behavior is incorrect when offset is past the end of the buffer. We
are supposed to output silence. However, in order implementation, we were just resetting the offset
to 0, playing the buffer from the beginning.

To address the issue, I have dropped the logic that would reset the read offset if past the end of
the buffer.

No new tests, rebaselined existing test.

* Modules/webaudio/AudioBufferSourceNode.cpp:
(WebCore::AudioBufferSourceNode::renderFromBuffer):

(WebCore::AudioBufferSourceNode::startPlaying):
Drop dead code since m_isGrain is always true in this function.

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

2 months ago[ macOS iOS Debug ] imported/w3c/web-platform-tests/selection/*: 4 tests marked as...
hector_i_lopez@apple.com [Wed, 16 Sep 2020 22:40:14 +0000 (22:40 +0000)]
[ macOS iOS Debug ] imported/w3c/web-platform-tests/selection/*: 4 tests marked as slow
https://bugs.webkit.org/show_bug.cgi?id=216492

Unreviewed test gardening.

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

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

2 months agoUpdate WPT test harness so that webaudio tests output results that are consistent...
cdumez@apple.com [Wed, 16 Sep 2020 22:31:44 +0000 (22:31 +0000)]
Update WPT test harness so that webaudio tests output results that are consistent across different machines
https://bugs.webkit.org/show_bug.cgi?id=216332

Reviewed by Geoffrey Garen.

LayoutTests/imported/w3c:

Rebaseline tests.

* web-platform-tests/webaudio/the-audio-api/the-audiobuffersourcenode-interface/audiobuffersource-multi-channels-expected.txt:
* web-platform-tests/webaudio/the-audio-api/the-audiobuffersourcenode-interface/sub-sample-buffer-stitching-expected.txt:
* web-platform-tests/webaudio/the-audio-api/the-audiobuffersourcenode-interface/sub-sample-scheduling-expected.txt:
* web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/k-rate-audiobuffersource-connections-expected.txt:
* web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/k-rate-biquad-connection-expected.txt:
* web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/k-rate-biquad-expected.txt:
* web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/k-rate-constant-source-expected.txt:
* web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/k-rate-delay-connections-expected.txt:
* web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/k-rate-delay-expected.txt:
* web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/k-rate-gain-expected.txt:
* web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/k-rate-oscillator-connections-expected.txt:
* web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/k-rate-panner-connections-expected.txt:
* web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/k-rate-panner-expected.txt:
* web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/k-rate-stereo-panner-expected.txt:
* web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/retrospective-exponentialRampToValueAtTime-expected.txt:
* web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/retrospective-linearRampToValueAtTime-expected.txt:
* web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/retrospective-setTargetAtTime-expected.txt:
* web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/retrospective-setValueAtTime-expected.txt:
* web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/retrospective-setValueCurveAtTime-expected.txt:
* web-platform-tests/webaudio/the-audio-api/the-biquadfilternode-interface/biquad-automation-expected.txt:
* web-platform-tests/webaudio/the-audio-api/the-biquadfilternode-interface/no-dezippering-expected.txt:
* web-platform-tests/webaudio/the-audio-api/the-constantsourcenode-interface/constant-source-output-expected.txt:
* web-platform-tests/webaudio/the-audio-api/the-convolvernode-interface/convolver-response-1-chan-expected.txt:
* web-platform-tests/webaudio/the-audio-api/the-convolvernode-interface/convolver-response-2-chan-expected.txt:
* web-platform-tests/webaudio/the-audio-api/the-convolvernode-interface/convolver-response-4-chan-expected.txt:
* web-platform-tests/webaudio/the-audio-api/the-delaynode-interface/no-dezippering-expected.txt:
* web-platform-tests/webaudio/the-audio-api/the-gainnode-interface/gain-expected.txt:
* web-platform-tests/webaudio/the-audio-api/the-gainnode-interface/no-dezippering-expected.txt:
* web-platform-tests/webaudio/the-audio-api/the-iirfilternode-interface/ctor-iirfilter-expected.txt:
* web-platform-tests/webaudio/the-audio-api/the-iirfilternode-interface/iirfilter-expected.txt:
* web-platform-tests/webaudio/the-audio-api/the-iirfilternode-interface/iirfilter-getFrequencyResponse-expected.txt:
* web-platform-tests/webaudio/the-audio-api/the-oscillatornode-interface/osc-basic-waveform-expected.txt:
* web-platform-tests/webaudio/the-audio-api/the-pannernode-interface/automation-changes-expected.txt:
* web-platform-tests/webaudio/the-audio-api/the-pannernode-interface/panner-automation-position-expected.txt:
* web-platform-tests/webaudio/the-audio-api/the-pannernode-interface/panner-distance-clamping-expected.txt:
* web-platform-tests/webaudio/the-audio-api/the-pannernode-interface/panner-equalpower-expected.txt:
* web-platform-tests/webaudio/the-audio-api/the-pannernode-interface/panner-rolloff-clamping-expected.txt:
* web-platform-tests/webaudio/the-audio-api/the-scriptprocessornode-interface/simple-input-output-expected.txt:
* web-platform-tests/webaudio/the-audio-api/the-stereopanner-interface/no-dezippering-expected.txt:
* web-platform-tests/webaudio/the-audio-api/the-waveshapernode-interface/waveshaper-copy-curve-expected.txt:

LayoutTests:

Unskip tests that should now pass on all platforms.

* TestExpectations:
* resources/testharnessreport.js:
(self.testRunner.add_completion_callback):
Our webaudio implementation uses single precision for floating point audio values. However, the tests were
printing out those values with 16 digits, even when the checks were passing. We had to skip those tests
because digits after the 6th one may differ across machines and we were getting TEXT diffs. To address the
issue we now strip arrays from PASS lines in webaudio tests output and replace them with the string
'[expected array]'. As long as the check is passing, the actual value in the array does not really matter.

* webaudio/Oscillator/no-dezippering-expected.txt:
* webaudio/Oscillator/osc-440hz-expected.txt:
* webaudio/Oscillator/osc-negative-freq-expected.txt:
* webaudio/Oscillator/start-sampling-expected.txt:
* webaudio/audioparam-cancel-and-hold-expected.txt:
* webaudio/convolvernode-unmodified-buffer-expected.txt:
Rebaseline tests.

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