248d2547a92008e688210827b195542c9f91d26a
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2020-09-24  Zalan Bujtas  <zalan@apple.com>
2
3         [LFC][IFC] Add helper functions to create LineBox::InlineBox objects for inline level boxes.
4         https://bugs.webkit.org/show_bug.cgi?id=216957
5
6         Reviewed by Simon Fraser.
7
8         The overloaded LineBox::InlineBox constructors were representing different types of inline level boxes.
9         These new helper functions make it easier to figure out how to initiate LineBox::InlineBox objects depending on the type of
10         the inline level box.
11         This patch also removes an incorrect ASSERT on the inline box's height. It is okay to have a zero height inline box.  
12
13         * layout/inlineformatting/InlineFormattingContextGeometry.cpp:
14         (WebCore::Layout::LineBoxBuilder::constructInlineBoxes):
15         * layout/inlineformatting/InlineLineBox.cpp:
16         (WebCore::Layout::LineBox::InlineBox::InlineBox):
17         (WebCore::Layout::m_baseline):
18         * layout/inlineformatting/InlineLineBox.h:
19         (WebCore::Layout::LineBox::InlineBox::createBoxForRootInlineBox):
20         (WebCore::Layout::LineBox::InlineBox::createBoxForAtomicInlineLevelBox):
21         (WebCore::Layout::LineBox::InlineBox::createBoxForInlineBox):
22
23 2020-09-24  Keith Miller  <keith_miller@apple.com>
24
25         CSS angle unit conversions should consistently use the same associativity
26         https://bugs.webkit.org/show_bug.cgi?id=216906
27
28         Reviewed by Simon Fraser.
29
30         Right now we inconsistently associate our floating point math for
31         angle unit conversions. In particular,
32         conversionToCanonicalUnitsScaleFactor expects there to be a single
33         fixed constant we can multiply by to change units. However, the
34         various conversion functions in WTF are not associated in this
35         way. e.g.  rad2deg does ((radian * 180) / pi) rather than
36         (radian * (180 / pi)). Since FP math is NOT associative these
37         produce different results. For example, 1.57 radians is
38         89.954373835539258 degrees in the first case but
39         89.954373835539243 in the second.
40
41         This patch changes the WTF functions to operate on a single scale
42         factor when converting to/from the canonical unit. Conversions
43         between non-canonical units first convert to the canonical unit
44         (degree). Also, conversionToCanonicalUnitsScaleFactor now gets the
45         scale factor from WTF to ensure we get the same associativity
46         everywhere.
47
48         * css/CSSPrimitiveValue.cpp:
49         (WebCore::CSSPrimitiveValue::conversionToCanonicalUnitsScaleFactor):
50
51 2020-09-24  Fujii Hironori  <Hironori.Fujii@sony.com>
52
53         [SVG2] Remove color-profile tag
54         https://bugs.webkit.org/show_bug.cgi?id=216910
55
56         Reviewed by Darin Adler.
57
58         SVG2 removed color-profile element.
59
60         * dom/Document.cpp:
61         (WebCore::Document::validateCustomElementName):
62         * svg/svgtags.in:
63
64 2020-09-24  Chris Dumez  <cdumez@apple.com>
65
66         Use more inline initialization and constexpr in WebAudio code
67         https://bugs.webkit.org/show_bug.cgi?id=216939
68
69         Reviewed by Darin Adler.
70
71         Use more inline initialization and constexpr in WebAudio code.
72
73         * Modules/webaudio/AudioBufferSourceNode.cpp:
74         * Modules/webaudio/AudioDestinationNode.cpp:
75         (WebCore::AudioDestinationNode::AudioDestinationNode):
76         * Modules/webaudio/AudioDestinationNode.h:
77         * Modules/webaudio/AudioNodeOutput.cpp:
78         (WebCore::AudioNodeOutput::AudioNodeOutput):
79         * Modules/webaudio/AudioNodeOutput.h:
80         * Modules/webaudio/AudioParamTimeline.h:
81         * Modules/webaudio/AudioScheduledSourceNode.cpp:
82         (WebCore::AudioScheduledSourceNode::AudioScheduledSourceNode):
83         (WebCore::AudioScheduledSourceNode::updateSchedulingInfo):
84         * Modules/webaudio/AudioScheduledSourceNode.h:
85         * Modules/webaudio/AudioSummingJunction.cpp:
86         (WebCore::AudioSummingJunction::AudioSummingJunction):
87         * Modules/webaudio/AudioSummingJunction.h:
88         * Modules/webaudio/BiquadDSPKernel.cpp:
89         * Modules/webaudio/BiquadProcessor.cpp:
90         (WebCore::BiquadProcessor::BiquadProcessor):
91         * Modules/webaudio/BiquadProcessor.h:
92         * Modules/webaudio/ConvolverNode.cpp:
93         * Modules/webaudio/DefaultAudioDestinationNode.cpp:
94         * Modules/webaudio/DelayNode.cpp:
95         * Modules/webaudio/DynamicsCompressorNode.cpp:
96         * Modules/webaudio/MediaElementAudioSourceNode.cpp:
97         * Modules/webaudio/PeriodicWave.cpp:
98         (WebCore::PeriodicWave::PeriodicWave):
99         (WebCore::PeriodicWave::waveDataForFundamentalFrequency):
100         (WebCore::PeriodicWave::numberOfPartialsForRange const):
101         * Modules/webaudio/PeriodicWave.h:
102         * Modules/webaudio/RealtimeAnalyser.cpp:
103         (WebCore::RealtimeAnalyser::RealtimeAnalyser):
104         * Modules/webaudio/RealtimeAnalyser.h:
105         * Modules/webaudio/ScriptProcessorNode.cpp:
106         (WebCore::ScriptProcessorNode::ScriptProcessorNode):
107         * Modules/webaudio/ScriptProcessorNode.h:
108         * Modules/webaudio/WaveShaperProcessor.cpp:
109         (WebCore::WaveShaperProcessor::WaveShaperProcessor):
110         * Modules/webaudio/WaveShaperProcessor.h:
111         * Modules/webaudio/WebKitAudioContext.cpp:
112         * Modules/webaudio/WebKitAudioPannerNode.cpp:
113         (WebCore::WebKitAudioPannerNode::WebKitAudioPannerNode):
114         * Modules/webaudio/WebKitAudioPannerNode.h:
115         * platform/audio/AudioBus.cpp:
116         (WebCore::AudioBus::AudioBus):
117         * platform/audio/AudioBus.h:
118         * platform/audio/AudioChannel.h:
119         * platform/audio/AudioDSPKernelProcessor.cpp:
120         (WebCore::AudioDSPKernelProcessor::AudioDSPKernelProcessor):
121         * platform/audio/AudioDSPKernelProcessor.h:
122         * platform/audio/AudioHardwareListener.cpp:
123         (WebCore::AudioHardwareListener::AudioHardwareListener):
124         * platform/audio/AudioHardwareListener.h:
125         * platform/audio/AudioResampler.cpp:
126         (WebCore::AudioResampler::AudioResampler):
127         * platform/audio/AudioResampler.h:
128         * platform/audio/AudioResamplerKernel.cpp:
129         (WebCore::AudioResamplerKernel::AudioResamplerKernel):
130         * platform/audio/AudioResamplerKernel.h:
131         * platform/audio/Biquad.cpp:
132         * platform/audio/Cone.cpp:
133         * platform/audio/Cone.h:
134         * platform/audio/Distance.cpp:
135         * platform/audio/Distance.h:
136         * platform/audio/DownSampler.cpp:
137         (WebCore::DownSampler::DownSampler):
138         * platform/audio/DownSampler.h:
139         * platform/audio/DynamicsCompressorKernel.cpp:
140         (WebCore::DynamicsCompressorKernel::DynamicsCompressorKernel):
141         * platform/audio/DynamicsCompressorKernel.h:
142         * platform/audio/EqualPowerPanner.cpp:
143         (WebCore::EqualPowerPanner::EqualPowerPanner):
144         * platform/audio/EqualPowerPanner.h:
145         * platform/audio/FFTConvolver.cpp:
146         (WebCore::FFTConvolver::FFTConvolver):
147         * platform/audio/FFTConvolver.h:
148         * platform/audio/HRTFDatabase.cpp:
149         (WebCore::HRTFDatabase::HRTFDatabase):
150         * platform/audio/HRTFDatabase.h:
151         * platform/audio/HRTFElevation.cpp:
152         * platform/audio/HRTFElevation.h:
153         * platform/audio/HRTFKernel.cpp:
154         (WebCore::HRTFKernel::HRTFKernel):
155         * platform/audio/HRTFKernel.h:
156         * platform/audio/HRTFPanner.cpp:
157         (WebCore::HRTFPanner::HRTFPanner):
158         * platform/audio/HRTFPanner.h:
159         * platform/audio/PlatformMediaSession.cpp:
160         (WebCore::PlatformMediaSession::PlatformMediaSession):
161         * platform/audio/PlatformMediaSession.h:
162         * platform/audio/PushPullFIFO.cpp:
163         (WebCore::PushPullFIFO::PushPullFIFO):
164         * platform/audio/PushPullFIFO.h:
165         * platform/audio/Reverb.cpp:
166         * platform/audio/ReverbAccumulationBuffer.cpp:
167         (WebCore::ReverbAccumulationBuffer::ReverbAccumulationBuffer):
168         * platform/audio/ReverbAccumulationBuffer.h:
169         * platform/audio/ReverbConvolver.cpp:
170         * platform/audio/ReverbConvolverStage.cpp:
171         (WebCore::ReverbConvolverStage::ReverbConvolverStage):
172         * platform/audio/ReverbConvolverStage.h:
173         * platform/audio/ReverbInputBuffer.cpp:
174         (WebCore::ReverbInputBuffer::ReverbInputBuffer):
175         * platform/audio/ReverbInputBuffer.h:
176
177 2020-09-24  Chris Dumez  <cdumez@apple.com>
178
179         Simplify AudioNode::addInput() / addOutput() call sites
180         https://bugs.webkit.org/show_bug.cgi?id=216941
181
182         Reviewed by Darin Adler.
183
184         Simplify AudioNode::addInput() / addOutput() call sites by moving the input / output
185         node construction from the call site to the function implementation.
186
187         * Modules/webaudio/AnalyserNode.cpp:
188         (WebCore::AnalyserNode::AnalyserNode):
189         * Modules/webaudio/AudioBasicInspectorNode.cpp:
190         (WebCore::AudioBasicInspectorNode::AudioBasicInspectorNode):
191         * Modules/webaudio/AudioBasicProcessorNode.cpp:
192         (WebCore::AudioBasicProcessorNode::AudioBasicProcessorNode):
193         * Modules/webaudio/AudioBufferSourceNode.cpp:
194         (WebCore::AudioBufferSourceNode::AudioBufferSourceNode):
195         * Modules/webaudio/AudioDestinationNode.cpp:
196         (WebCore::AudioDestinationNode::AudioDestinationNode):
197         * Modules/webaudio/AudioNode.cpp:
198         (WebCore::AudioNode::addInput):
199         (WebCore::AudioNode::addOutput):
200         * Modules/webaudio/AudioNode.h:
201         * Modules/webaudio/ChannelMergerNode.cpp:
202         (WebCore::ChannelMergerNode::ChannelMergerNode):
203         * Modules/webaudio/ChannelSplitterNode.cpp:
204         (WebCore::ChannelSplitterNode::ChannelSplitterNode):
205         * Modules/webaudio/ConstantSourceNode.cpp:
206         (WebCore::ConstantSourceNode::ConstantSourceNode):
207         * Modules/webaudio/ConvolverNode.cpp:
208         (WebCore::ConvolverNode::ConvolverNode):
209         * Modules/webaudio/DynamicsCompressorNode.cpp:
210         (WebCore::DynamicsCompressorNode::DynamicsCompressorNode):
211         * Modules/webaudio/GainNode.cpp:
212         (WebCore::GainNode::GainNode):
213         * Modules/webaudio/MediaElementAudioSourceNode.cpp:
214         (WebCore::MediaElementAudioSourceNode::MediaElementAudioSourceNode):
215         * Modules/webaudio/MediaStreamAudioSourceNode.cpp:
216         (WebCore::MediaStreamAudioSourceNode::MediaStreamAudioSourceNode):
217         * Modules/webaudio/OscillatorNode.cpp:
218         (WebCore::OscillatorNode::OscillatorNode):
219         * Modules/webaudio/PannerNode.cpp:
220         (WebCore::PannerNode::PannerNode):
221         * Modules/webaudio/ScriptProcessorNode.cpp:
222         (WebCore::ScriptProcessorNode::ScriptProcessorNode):
223         * Modules/webaudio/StereoPannerNode.cpp:
224         (WebCore::StereoPannerNode::StereoPannerNode):
225         * Modules/webaudio/WebKitAudioPannerNode.cpp:
226         (WebCore::WebKitAudioPannerNode::WebKitAudioPannerNode):
227
228 2020-09-24  Chris Dumez  <cdumez@apple.com>
229
230         Declare render quantum size constant in AudioUtilities.h
231         https://bugs.webkit.org/show_bug.cgi?id=216935
232
233         Reviewed by Eric Carlson.
234
235         Declare render quantum size [1] constant in AudioUtilities.h so that it can be used in both
236         platform/ and Modules/webaudio/. Also update the code so that we have a single constant
237         instead of many.
238
239         [1] https://www.w3.org/TR/webaudio/#render-quantum-size
240
241         * Modules/webaudio/AudioListener.cpp:
242         (WebCore::AudioListener::AudioListener):
243         * Modules/webaudio/AudioNode.h:
244         * Modules/webaudio/AudioNodeInput.cpp:
245         (WebCore::AudioNodeInput::AudioNodeInput):
246         (WebCore::AudioNodeInput::updateInternalBus):
247         * Modules/webaudio/AudioNodeOutput.cpp:
248         (WebCore::AudioNodeOutput::AudioNodeOutput):
249         (WebCore::AudioNodeOutput::updateInternalBus):
250         * Modules/webaudio/AudioParam.cpp:
251         (WebCore::AudioParam::calculateFinalValues):
252         (WebCore::AudioParam::calculateTimelineValues):
253         * Modules/webaudio/AudioParamTimeline.cpp:
254         (WebCore::AudioParamTimeline::valueForContextTime):
255         * Modules/webaudio/AudioScheduledSourceNode.cpp:
256         (WebCore::AudioScheduledSourceNode::updateSchedulingInfo):
257         * Modules/webaudio/BiquadDSPKernel.cpp:
258         (WebCore::BiquadDSPKernel::updateCoefficientsIfNecessary):
259         * Modules/webaudio/BiquadProcessor.cpp:
260         (WebCore::BiquadProcessor::processOnlyAudioParams):
261         * Modules/webaudio/ConstantSourceNode.cpp:
262         (WebCore::ConstantSourceNode::ConstantSourceNode):
263         * Modules/webaudio/ConstantSourceNode.h:
264         * Modules/webaudio/ConvolverNode.cpp:
265         (WebCore::ConvolverNode::setBuffer):
266         * Modules/webaudio/DelayDSPKernel.cpp:
267         (WebCore::DelayDSPKernel::DelayDSPKernel):
268         (WebCore::DelayDSPKernel::processOnlyAudioParams):
269         * Modules/webaudio/DynamicsCompressorNode.cpp:
270         (WebCore::DynamicsCompressorNode::processOnlyAudioParams):
271         * Modules/webaudio/GainNode.cpp:
272         (WebCore::GainNode::GainNode):
273         (WebCore::GainNode::processOnlyAudioParams):
274         * Modules/webaudio/OfflineAudioContext.cpp:
275         (WebCore::OfflineAudioContext::suspendOfflineRendering):
276         * Modules/webaudio/OfflineAudioDestinationNode.cpp:
277         (WebCore::OfflineAudioDestinationNode::OfflineAudioDestinationNode):
278         (WebCore::OfflineAudioDestinationNode::offlineRender):
279         * Modules/webaudio/OfflineAudioDestinationNode.h:
280         * Modules/webaudio/OscillatorNode.cpp:
281         (WebCore::OscillatorNode::OscillatorNode):
282         * Modules/webaudio/OscillatorNode.h:
283         * Modules/webaudio/PannerNode.cpp:
284         (WebCore::PannerNode::processOnlyAudioParams):
285         (WebCore::PannerNode::processSampleAccurateValues):
286         * Modules/webaudio/RealtimeAnalyser.cpp:
287         (WebCore::RealtimeAnalyser::RealtimeAnalyser):
288         * Modules/webaudio/ScriptProcessorNode.cpp:
289         (WebCore::ScriptProcessorNode::ScriptProcessorNode):
290         * Modules/webaudio/StereoPannerNode.cpp:
291         (WebCore::StereoPannerNode::StereoPannerNode):
292         (WebCore::StereoPannerNode::processOnlyAudioParams):
293         * Modules/webaudio/StereoPannerNode.h:
294         * Modules/webaudio/WaveShaperDSPKernel.cpp:
295         (WebCore::WaveShaperDSPKernel::lazyInitializeOversampling):
296         (WebCore::WaveShaperDSPKernel::processCurve2x):
297         (WebCore::WaveShaperDSPKernel::processCurve4x):
298         * platform/audio/AudioResamplerKernel.cpp:
299         (WebCore::AudioResamplerKernel::AudioResamplerKernel):
300         (WebCore::AudioResamplerKernel::getSourcePointer):
301         (WebCore::AudioResamplerKernel::process):
302         * platform/audio/AudioResamplerKernel.h:
303         * platform/audio/AudioUtilities.h:
304         * platform/audio/Biquad.cpp:
305         (WebCore::Biquad::Biquad):
306         * platform/audio/Biquad.h:
307         * platform/audio/HRTFPanner.cpp:
308         (WebCore::HRTFPanner::HRTFPanner):
309         (WebCore::HRTFPanner::pan):
310         * platform/audio/IIRFilter.cpp:
311         (WebCore::IIRFilter::tailTime):
312         * platform/audio/cocoa/AudioDestinationCocoa.cpp:
313         (WebCore::AudioDestinationCocoa::AudioDestinationCocoa):
314         (WebCore::AudioDestinationCocoa::render):
315         (WebCore::AudioDestinationCocoa::provideInput):
316         * platform/audio/cocoa/MediaSessionManagerCocoa.mm:
317         (WebCore::MediaSessionManagerCocoa::updateSessionState):
318         * platform/audio/gstreamer/AudioDestinationGStreamer.cpp:
319         (WebCore::AudioDestinationGStreamer::AudioDestinationGStreamer):
320         (WebCore::AudioDestinationGStreamer::framesPerBuffer const):
321         * platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp:
322         (webkit_web_audio_src_class_init):
323
324 2020-09-24  Youenn Fablet  <youenn@apple.com>
325
326         Add libwebrtc.dylib version check
327         https://bugs.webkit.org/show_bug.cgi?id=216884
328         <rdar://problem/69441354>
329
330         Reviewed by Eric Carlson.
331
332         Use webrtc::isMatchingBundleVersion to check for libwebrtc.dylib presence and for version matching.
333         If version does not match, crash the web process.
334         No change of behavior.
335
336         * SourcesCocoa.txt:
337         * WebCore.xcodeproj/project.pbxproj:
338         * platform/mediastream/libwebrtc/LibWebRTCProviderCocoa.cpp:
339         (WebCore::LibWebRTCProvider::webRTCAvailable):
340         * platform/mediastream/libwebrtc/LibWebRTCProviderCocoa.h:
341         * platform/mediastream/libwebrtc/LibWebRTCProviderCocoa.mm:
342
343 2020-09-24  Chris Dumez  <cdumez@apple.com>
344
345         Drop AudioNode::reset() and all its overrides
346         https://bugs.webkit.org/show_bug.cgi?id=216932
347
348         Reviewed by Eric Carlson.
349
350         Drop AudioNode::reset() and all its overrides. This is dead code.
351
352         * Modules/webaudio/AnalyserNode.cpp:
353         * Modules/webaudio/AnalyserNode.h:
354         * Modules/webaudio/AudioBasicProcessorNode.cpp:
355         * Modules/webaudio/AudioBasicProcessorNode.h:
356         * Modules/webaudio/AudioBufferSourceNode.cpp:
357         * Modules/webaudio/AudioBufferSourceNode.h:
358         * Modules/webaudio/AudioDestinationNode.h:
359         * Modules/webaudio/AudioNode.h:
360         * Modules/webaudio/ChannelMergerNode.cpp:
361         * Modules/webaudio/ChannelMergerNode.h:
362         * Modules/webaudio/ChannelSplitterNode.cpp:
363         * Modules/webaudio/ChannelSplitterNode.h:
364         * Modules/webaudio/ConstantSourceNode.h:
365         * Modules/webaudio/ConvolverNode.cpp:
366         * Modules/webaudio/ConvolverNode.h:
367         * Modules/webaudio/DynamicsCompressorNode.cpp:
368         * Modules/webaudio/DynamicsCompressorNode.h:
369         * Modules/webaudio/GainNode.cpp:
370         * Modules/webaudio/GainNode.h:
371         * Modules/webaudio/MediaElementAudioSourceNode.cpp:
372         * Modules/webaudio/MediaElementAudioSourceNode.h:
373         * Modules/webaudio/MediaStreamAudioDestinationNode.cpp:
374         * Modules/webaudio/MediaStreamAudioDestinationNode.h:
375         * Modules/webaudio/MediaStreamAudioSourceNode.h:
376         * Modules/webaudio/OscillatorNode.cpp:
377         * Modules/webaudio/OscillatorNode.h:
378         * Modules/webaudio/PannerNode.cpp:
379         * Modules/webaudio/PannerNode.h:
380         * Modules/webaudio/RealtimeAnalyser.cpp:
381         * Modules/webaudio/RealtimeAnalyser.h:
382         * Modules/webaudio/ScriptProcessorNode.cpp:
383         * Modules/webaudio/ScriptProcessorNode.h:
384         * Modules/webaudio/StereoPannerNode.h:
385         * Modules/webaudio/WebKitAudioPannerNode.cpp:
386         * Modules/webaudio/WebKitAudioPannerNode.h:
387
388 2020-09-24  Carlos Garcia Campos  <cgarcia@igalia.com>
389
390         [GTK][WPE] Move proxy settings from WebKitContext to WebKitWebsiteDataManager
391         https://bugs.webkit.org/show_bug.cgi?id=216927
392
393         Reviewed by Alex Christensen.
394
395         Make proxySettings a member of SoupNetworkSession, instead of being global.
396
397         * platform/network/soup/SoupNetworkSession.cpp:
398         (WebCore::SoupNetworkSession::SoupNetworkSession):
399         (WebCore::SoupNetworkSession::setProxySettings):
400         (WebCore::proxySettings): Deleted.
401         (WebCore::SoupNetworkSession::setupProxy): Deleted.
402         * platform/network/soup/SoupNetworkSession.h:
403
404 2020-09-24  Chris Dumez  <cdumez@apple.com>
405
406         web audio api outputs silence for 302 redirected resource in safari
407         https://bugs.webkit.org/show_bug.cgi?id=214932
408         <rdar://problem/66300050>
409
410         Reviewed by Darin Adler.
411
412         If the resource is redirected to another origin, treat it as tainted only if the crossorigin attribute
413         is not set. This is done for consistency with Blink:
414         - https://github.com/chromium/chromium/blob/master/media/blink/webmediaplayer_impl.cc (see WouldTaintOrigin())
415
416         The new behavior also seems to match Firefox.
417
418         Tests: http/tests/security/webaudio-render-remote-audio-allowed-crossorigin-redirect.html
419                http/tests/security/webaudio-render-remote-audio-blocked-no-crossorigin-redirect.html
420
421         * Modules/webaudio/MediaElementAudioSourceNode.cpp:
422         (WebCore::MediaElementAudioSourceNode::wouldTaintOrigin):
423
424 2020-09-24  Youenn Fablet  <youenn@apple.com>
425
426         Regression(r265280) Web Audio sources malfunction when disconnected from the audio graph
427         https://bugs.webkit.org/show_bug.cgi?id=216703
428         <rdar://problem/69158436>
429
430         Reviewed by Eric Carlson.
431
432         In case of an audio source that stops producing data, but does not end or mute the track,
433         we would continuously try to read the data until getting to the end of the data.
434         When reaching the end of the data, we would return silence and go back in time a little bit
435         to restart playing with some margin. This allows to read just one chunk of audio until we are back to the end of data.
436
437         We fix this by storing the end of the data counter when reaching it.
438         When trying to pull some more data, we will go back in time a little bit only if some more data was added in the meantime.
439         Otherwise, we just output silence.
440
441         Covered by manual test.
442
443         * platform/audio/mac/AudioSampleDataSource.h:
444         * platform/audio/mac/AudioSampleDataSource.mm:
445         (WebCore::AudioSampleDataSource::pullSamplesInternal):
446
447 2020-09-24  Antti Koivisto  <antti@apple.com>
448
449         currentColor isn't recalculated when a text node doesn't exist
450         https://bugs.webkit.org/show_bug.cgi?id=216780
451         <rdar://problem/69320933>
452
453         Reviewed by Antoine Quint.
454
455         We fail to repaint with the new background color when 'background-color' property has value 'currentColor' and the current color changes.
456
457         Test case by Cory LaViska.
458
459         Test: fast/css/currentColor-background-paint.html
460
461         * rendering/style/RenderStyle.cpp:
462         (WebCore::RenderStyle::changeRequiresRepaint const):
463         * rendering/style/StyleBackgroundData.cpp:
464         (WebCore::StyleBackgroundData::isEquivalentForPainting const):
465         * rendering/style/StyleBackgroundData.h:
466
467 2020-09-24  Cathie Chen  <cathiechen@igalia.com>
468
469         Root node with stateless wheel event isn't always scrollable
470         https://bugs.webkit.org/show_bug.cgi?id=216875
471
472         Reviewed by Simon Fraser.
473
474         Root nodes are not always capable of handling wheel event. When it is a stateless wheel event which
475         does not trigger rubber-band, we should check the scroll content of the root node.
476
477         * page/scrolling/ScrollingTreeScrollingNode.cpp:
478         (WebCore::ScrollingTreeScrollingNode::canHandleWheelEvent const): Stateless wheel event
479         doesn't trigger rubber-band, should check the scroll content.
480
481 2020-09-24  Commit Queue  <commit-queue@webkit.org>
482
483         Unreviewed, reverting r267495 and r267512.
484         https://bugs.webkit.org/show_bug.cgi?id=216924
485
486         Broke transform-stream.html test
487
488         Reverted changesets:
489
490         "Missing scope release in JSDOMBuiltinConstructorBase"
491         https://bugs.webkit.org/show_bug.cgi?id=216851
492         https://trac.webkit.org/changeset/267495
493
494         "Unreviewed, we should put it under js/dom since it is not
495         usable in JSC shell"
496         https://bugs.webkit.org/show_bug.cgi?id=216851
497         https://trac.webkit.org/changeset/267512
498
499 2020-09-24  Commit Queue  <commit-queue@webkit.org>
500
501         Unreviewed, reverting r267507.
502         https://bugs.webkit.org/show_bug.cgi?id=216923
503
504         Broke two layout tests on windows
505
506         Reverted changeset:
507
508         "web audio api outputs silence for 302 redirected resource in
509         safari"
510         https://bugs.webkit.org/show_bug.cgi?id=214932
511         https://trac.webkit.org/changeset/267507
512
513 2020-09-24  Youenn Fablet  <youenn@apple.com>
514
515         REGRESSION (iOS/Safari 14): MediaRecorder produces invalid video files
516         https://bugs.webkit.org/show_bug.cgi?id=216832
517         <rdar://problem/69377550>
518
519         Reviewed by Eric Carlson.
520
521         Start the audio and video timestamps at zero.
522         Compute the audio timestamp based on the sample count and the video timestamp based
523         on the time at which the video sample is received.
524
525         Covered by manually testing Safari generated videos on VLC, Chrome and Firefox.
526
527         * platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.h:
528         * platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.mm:
529         (WebCore::MediaRecorderPrivateWriter::initialize):
530         (WebCore::MediaRecorderPrivateWriter::startAssetWriter):
531         (WebCore::copySampleBufferWithCurrentTimeStamp):
532         (WebCore::MediaRecorderPrivateWriter::appendVideoSampleBuffer):
533         (WebCore::createAudioSampleBuffer):
534         (WebCore::MediaRecorderPrivateWriter::appendAudioSampleBuffer):
535
536 2020-09-23  Peng Liu  <peng.liu6@apple.com>
537
538         Add feature flags for GPU Process features
539         https://bugs.webkit.org/show_bug.cgi?id=216901
540
541         Reviewed by Tim Horton.
542
543         Rename useGPUProcessForMedia to useGPUProcessForMediaEnabled.
544
545         No new tests since no functional changes.
546
547         * page/Settings.yaml:
548
549 2020-09-23  Zalan Bujtas  <zalan@apple.com>
550
551         [LFC][Integration] Line layout logic should consult LayoutState whether remove trailing letter spacing.
552         https://bugs.webkit.org/show_bug.cgi?id=216905
553
554         Reviewed by Sam Weinig.
555
556         This is in preparation for completely moving away from the RuntimeEnabledFeatures check. 
557
558         * layout/LayoutState.cpp:
559         (WebCore::Layout::LayoutState::shouldIgnoreTrailingLetterSpacing const):
560         * layout/LayoutState.h:
561         * layout/inlineformatting/InlineLine.cpp:
562         (WebCore::Layout::Line::Line):
563         (WebCore::Layout::Line::appendTextContent):
564         * layout/inlineformatting/InlineLine.h:
565         * layout/inlineformatting/InlineLineBuilder.cpp:
566         (WebCore::Layout::LineCandidate::InlineContent::appendInlineItem):
567
568 2020-09-20  Simon Fraser  <simon.fraser@apple.com>
569
570         [LFC Display] Add the beginnings of a CSS display box hierarchy and CSS painter
571         https://bugs.webkit.org/show_bug.cgi?id=216752
572
573         Reviewed by Zalan Bujtas.
574
575         Add some Display::Box subclasses to display/css, a Display::Tree class to own the
576         display tree, and a DisplayTreeBuilder. Also add css/DisplayCSSPainter which is
577         the beginnings of a class that knows how to paint a CSS stacking context.
578
579         This code other than DisplayCSSPainter is deliberately vague about how much is
580         CSS specific. It's likely that some box classes will be shared with SVG painting.
581
582         * CMakeLists.txt:
583         * Headers.cmake:
584         * Sources.txt:
585         * WebCore.xcodeproj/project.pbxproj:
586         * display/DisplayLayerController.cpp:
587         (WebCore::Display::LayerController::RootLayerClient::paintContents):
588         (WebCore::Display::LayerController::RootLayerClient::deviceScaleFactor const):
589         (WebCore::Display::LayerController::prepareForDisplay):
590         (WebCore::Display::LayerController::ensureRootLayer):
591         (WebCore::Display::LayerController::updateRootLayerGeometry):
592         * display/DisplayLayerController.h:
593         * display/DisplayTree.cpp: Copied from Source/WebCore/display/DisplayView.h.
594         (WebCore::Display::Tree::Tree):
595         * display/DisplayTree.h: Copied from Source/WebCore/display/DisplayView.h.
596         (WebCore::Display::Tree::rootBox const):
597         * display/DisplayTreeBuilder.cpp: Added.
598         (WebCore::Display::TreeBuilder::TreeBuilder):
599         (WebCore::Display::TreeBuilder::build const):
600         (WebCore::Display::TreeBuilder::recursiveBuildDisplayTree const):
601         (WebCore::Display::TreeBuilder::displayBoxForRootBox const):
602         (WebCore::Display::TreeBuilder::displayBoxForLayoutBox const):
603         (WebCore::Display::outputDisplayBox):
604         (WebCore::Display::outputDisplayTree):
605         (WebCore::Display::showDisplayTree):
606         * display/DisplayTreeBuilder.h: Copied from Source/WebCore/display/DisplayView.h.
607         * display/DisplayView.cpp:
608         (WebCore::Display::View::prepareForDisplay):
609         (WebCore::Display::View::deviceScaleFactor const):
610         * display/DisplayView.h:
611         * display/css/DisplayBox.cpp: Copied from Source/WebCore/display/DisplayView.h.
612         (WebCore::Display::Box::Box):
613         (WebCore::Display::Box::setNextSibling):
614         (WebCore::Display::Box::debugDescription const):
615         * display/css/DisplayBox.h: Copied from Source/WebCore/display/DisplayView.h.
616         (WebCore::Display::Box::Box):
617         (WebCore::Display::Box::style const):
618         (WebCore::Display::Box::borderBoxFrame const):
619         (WebCore::Display::Box::isContainerBox const):
620         (WebCore::Display::Box::isImageBox const):
621         (WebCore::Display::Box::isReplacedBox const):
622         (WebCore::Display::Box::nextSibling const):
623         * display/css/DisplayCSSPainter.cpp: Added.
624         (WebCore::Display::CSSPainter::paintBoxDecorations):
625         (WebCore::Display::CSSPainter::paintBoxContent):
626         (WebCore::Display::CSSPainter::paintBox):
627         (WebCore::Display::CSSPainter::recursivePaintDescendants):
628         (WebCore::Display::CSSPainter::paintStackingContext):
629         (WebCore::Display::CSSPainter::isStackingContextPaintingBoundary):
630         (WebCore::Display::CSSPainter::recursiveCollectLayers):
631         (WebCore::Display::CSSPainter::paintTree):
632         * display/css/DisplayCSSPainter.h: Copied from Source/WebCore/display/DisplayView.h.
633         * display/css/DisplayContainerBox.cpp: Copied from Source/WebCore/display/DisplayView.h.
634         (WebCore::Display::ContainerBox::ContainerBox):
635         (WebCore::Display::ContainerBox::setFirstChild):
636         (WebCore::Display::ContainerBox::debugDescription const):
637         * display/css/DisplayContainerBox.h: Copied from Source/WebCore/display/DisplayView.h.
638         (WebCore::Display::ContainerBox::firstChild const):
639         * display/css/DisplayImageBox.cpp: Copied from Source/WebCore/display/DisplayView.h.
640         (WebCore::Display::ImageBox::ImageBox):
641         (WebCore::Display::ImageBox::setImage):
642         (WebCore::Display::ImageBox::debugDescription const):
643         * display/css/DisplayImageBox.h: Copied from Source/WebCore/display/DisplayView.h.
644         (WebCore::Display::ImageBox::image const):
645         * display/css/DisplayReplacedBox.cpp: Copied from Source/WebCore/display/DisplayView.h.
646         (WebCore::Display::ReplacedBox::ReplacedBox):
647         * display/css/DisplayReplacedBox.h: Copied from Source/WebCore/display/DisplayView.h.
648         (WebCore::Display::ReplacedBox::replacedContentRect const):
649         * display/css/DisplayStyle.cpp: Copied from Source/WebCore/display/DisplayView.cpp.
650         (WebCore::Display::Style::Style):
651         (WebCore::Display::Style::hasBackground const):
652         (WebCore::Display::Style::hasVisibleBorder const):
653         * display/css/DisplayStyle.h: Added.
654         (WebCore::Display::Style::backgroundColor const):
655         (WebCore::Display::Style::hasBackgroundImage const):
656         (WebCore::Display::Style::borderLeft const):
657         (WebCore::Display::Style::borderRight const):
658         (WebCore::Display::Style::borderTop const):
659         (WebCore::Display::Style::borderBottom const):
660         (WebCore::Display::Style::zIndex const):
661         (WebCore::Display::Style::isStackingContext const):
662         (WebCore::Display::Style::isPositioned const):
663         (WebCore::Display::Style::isFloating const):
664         (WebCore::Display::Style::participatesInZOrderSorting const):
665         (WebCore::Display::Style::setIsPositioned):
666         (WebCore::Display::Style::setIsFloating):
667         * layout/displaytree/DisplayBox.cpp: Removed.
668         * layout/displaytree/DisplayBox.h: Removed.
669         * layout/layouttree/LayoutIterator.h: Unified sources build fix.
670
671 2020-09-23  Chris Dumez  <cdumez@apple.com>
672
673         web audio api outputs silence for 302 redirected resource in safari
674         https://bugs.webkit.org/show_bug.cgi?id=214932
675         <rdar://problem/66300050>
676
677         Reviewed by Darin Adler.
678
679         If the resource is redirected to another origin, treat it as tainted only if the crossorigin attribute
680         is not set. This is done for consistency with Blink:
681         - https://github.com/chromium/chromium/blob/master/media/blink/webmediaplayer_impl.cc (see WouldTaintOrigin())
682
683         The new behavior also seems to match Firefox.
684
685         Tests: http/tests/security/webaudio-render-remote-audio-allowed-crossorigin-redirect.html
686                http/tests/security/webaudio-render-remote-audio-blocked-no-crossorigin-redirect.html
687
688         * Modules/webaudio/MediaElementAudioSourceNode.cpp:
689         (WebCore::MediaElementAudioSourceNode::wouldTaintOrigin):
690
691 2020-09-23  Chris Dumez  <cdumez@apple.com>
692
693         Use less explicit ref() / deref() calls in WebAudio code
694         https://bugs.webkit.org/show_bug.cgi?id=216894
695
696         Reviewed by Darin Adler.
697
698         * Modules/webaudio/BaseAudioContext.cpp:
699         (WebCore::BaseAudioContext::clearPendingActivity):
700         (WebCore::BaseAudioContext::makePendingActivity):
701         * Modules/webaudio/MediaElementAudioSourceNode.cpp:
702         (WebCore::MediaElementAudioSourceNode::setFormat):
703         (WebCore::MediaElementAudioSourceNode::process):
704         * Modules/webaudio/MediaElementAudioSourceNode.h:
705         * Modules/webaudio/OfflineAudioDestinationNode.cpp:
706         (WebCore::OfflineAudioDestinationNode::startRendering):
707         * html/HTMLMediaElement.cpp:
708         (WebCore::HTMLMediaElement::mediaEngineWasUpdated):
709         (WebCore::HTMLMediaElement::createMediaPlayer):
710
711 2020-09-23  Chris Dumez  <cdumez@apple.com>
712
713         Turn off the legacy prefixed WebAudio API
714         https://bugs.webkit.org/show_bug.cgi?id=216886
715
716         Reviewed by Sam Weinig.
717
718         Turn off the legacy prefixed WebAudio API, now that the modern unprefixed API has been enabled
719         in r267488.
720
721         No new tests, rebaselined existing tests.
722
723         * Modules/webaudio/AudioBufferSourceNode.idl:
724         Make sure legacy constants get unexposed if the PrefixedWebAudio setting is disabled.
725
726         * bindings/scripts/CodeGeneratorJS.pm:
727         (GenerateImplementation):
728         (GetRuntimeEnabledStaticProperties):
729         * bindings/scripts/test/JS/JSTestConditionalIncludes.cpp:
730         (WebCore::JSTestConditionalIncludesConstructor::initializeProperties):
731         (WebCore::JSTestConditionalIncludesPrototype::finishCreation):
732         * bindings/scripts/test/JS/JSTestEnabledBySetting.cpp:
733         (WebCore::JSTestEnabledBySettingConstructor::prototypeForStructure):
734         (WebCore::JSTestEnabledBySettingConstructor::initializeProperties):
735         (WebCore::JSTestEnabledBySettingPrototype::finishCreation):
736         * bindings/scripts/test/TestEnabledBySetting.idl:
737         Add support for using [EnabledBySetting=X] on constants.
738
739 2020-09-23  obrufau@igalia.com  <obrufau@igalia.com>
740
741         [css-grid] Clear the override width for computing percent margins
742         https://bugs.webkit.org/show_bug.cgi?id=209461
743
744         Reviewed by Manuel Rego Casasnovas.
745
746         When calculating the min-content contribution of a grid item of an auto
747         sized grid track we must consider the grid item's margin. When the grid
748         item's area is indefinite, a percent margin is resolved to zero.
749         However, when performing a relayout, the percent margin may be solved
750         against the previously computed grid area, since the grid item has
751         already an OverrideContainingBlockLogicalWidth value.
752
753         In order to re-compute the percent margin properly, we need to clear
754         the previously override value. It's important to be careful of not
755         clearing the override value set during intrinsic size, since we need
756         it for the actual layout phase. Hence, we only reset the 'override'
757         value when we are executing a definite strategy.
758
759         This is a reland of r261841, which was reverted because it broke spotify.
760         This problem is now avoided thanks to bug 210089.
761
762         Tests: imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-minimum-contribution-with-percentages.html
763                imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-item-dynamic-min-contribution-001.html
764                imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-items-minimum-height-orthogonal-001.html
765                imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-items-percentage-margins-003.html
766                imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-items-percentage-margins-004.html
767                imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-items-percentage-margins-005.html
768                imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-items-percentage-margins-006.html
769                imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-items-percentage-margins-007.html
770                imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-items-percentage-margins-008.html
771                imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-items-percentage-margins-009.html
772                imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-items-percentage-margins-010.html
773                imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-items-percentage-paddings-005.html
774                imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-items-percentage-paddings-006.html
775                imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-items-percentage-paddings-009.html
776                imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-items-percentage-paddings-010.html
777                imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-items-percentage-paddings-vertical-lr-002.html
778                imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-items-percentage-paddings-vertical-rl-002.html
779
780         * rendering/GridTrackSizingAlgorithm.cpp:
781         (WebCore::hasRelativeMarginOrPaddingForChild):
782         (WebCore::hasRelativeOrIntrinsicSizeForChild):
783         (WebCore::shouldClearOverrideContainingBlockContentSizeForChild):
784         (WebCore::GridTrackSizingAlgorithmStrategy::minSizeForChild const):
785         (WebCore::GridTrackSizingAlgorithmStrategy::minLogicalSizeForChild const):
786         (WebCore::DefiniteSizeStrategy::minLogicalSizeForChild const):
787         (WebCore::DefiniteSizeStrategy::minContentForChild const):
788         * rendering/GridTrackSizingAlgorithm.h:
789
790 2020-09-23  Carlos Garcia Campos  <cgarcia@igalia.com>
791
792         [GTK][WPE] Move TLS errors API from WebKitContext to WebKitWebsiteDataManager
793         https://bugs.webkit.org/show_bug.cgi?id=216822
794
795         Reviewed by Alex Christensen.
796
797         Make ignoreTLSErrors a member of SoupNetworkSession, instead of being global.
798
799         * platform/network/soup/SoupNetworkSession.cpp:
800         (WebCore::SoupNetworkSession::setIgnoreTLSErrors):
801         (WebCore::SoupNetworkSession::checkTLSErrors):
802         (WebCore::SoupNetworkSession::setShouldIgnoreTLSErrors): Deleted.
803         * platform/network/soup/SoupNetworkSession.h:
804         * testing/InternalSettings.cpp:
805         (WebCore::InternalSettings::setAllowsAnySSLCertificate): Do not use SoupNetworkSession in the web process.
806
807 2020-09-23  Tim Horton  <timothy_horton@apple.com>
808
809         Fix some typo'd wheel event listener logging
810         https://bugs.webkit.org/show_bug.cgi?id=216892
811
812         Reviewed by Wenson Hsieh.
813
814         * rendering/EventRegion.cpp:
815         (WebCore::EventRegion::uniteEventListeners):
816         Wheel is passive, NonPassiveWheel is active.
817
818 2020-09-23  Fujii Hironori  <Hironori.Fujii@sony.com>
819
820         Remove ENABLE_SVG_FONTS macro
821         https://bugs.webkit.org/show_bug.cgi?id=216850
822
823         Reviewed by Don Olmstead.
824
825         * CMakeLists.txt:
826         * css/CSSFontFace.cpp:
827         (WebCore::CSSFontFace::appendSources):
828         (WebCore::CSSFontFace::hasSVGFontFaceSource const):
829         * css/CSSFontFace.h:
830         * css/CSSFontFaceSource.cpp:
831         (WebCore::CSSFontFaceSource::CSSFontFaceSource):
832         (WebCore::CSSFontFaceSource::load):
833         (WebCore::CSSFontFaceSource::font):
834         (WebCore::CSSFontFaceSource::isSVGFontFaceSource const):
835         * css/CSSFontFaceSource.h:
836         * css/CSSFontFaceSrcValue.cpp:
837         (WebCore::CSSFontFaceSrcValue::isSVGFontTarget const):
838         (WebCore::CSSFontFaceSrcValue::isSupportedFormat const):
839         * css/CSSFontFaceSrcValue.h:
840         * inspector/agents/InspectorPageAgent.cpp:
841         (WebCore::InspectorPageAgent::inspectorResourceType):
842         * loader/LinkLoader.cpp:
843         (WebCore::createLinkPreloadResourceClient):
844         * loader/ResourceLoadInfo.cpp:
845         (WebCore::ContentExtensions::toResourceType):
846         * loader/SubresourceLoader.cpp:
847         (WebCore::logResourceLoaded):
848         * loader/cache/CachedResource.cpp:
849         (WebCore::CachedResource::defaultPriorityForResourceType):
850         (WebCore::CachedResource::isCORSSameOrigin const):
851         * loader/cache/CachedResource.h:
852         * loader/cache/CachedResourceLoader.cpp:
853         (WebCore::createResource):
854         (WebCore::CachedResourceLoader::requestFont):
855         (WebCore::contentTypeFromResourceType):
856         (WebCore::CachedResourceLoader::checkInsecureContent const):
857         (WebCore::CachedResourceLoader::allowedByContentSecurityPolicy const):
858         (WebCore::CachedResourceLoader::shouldUpdateCachedResourceWithCurrentRequest):
859         (WebCore::destinationForType):
860         * loader/cache/CachedSVGFont.cpp:
861         * loader/cache/CachedSVGFont.h:
862         * loader/cache/MemoryCache.cpp:
863         (WebCore::MemoryCache::getStatistics):
864         * rendering/svg/SVGTextLayoutEngineSpacing.cpp:
865         * style/StyleResolver.cpp:
866         (WebCore::Style::Resolver::addCurrentSVGFontFaceRules):
867         * svg/SVGAltGlyphDefElement.cpp:
868         * svg/SVGAltGlyphDefElement.h:
869         * svg/SVGAltGlyphDefElement.idl:
870         * svg/SVGAltGlyphElement.cpp:
871         * svg/SVGAltGlyphElement.h:
872         * svg/SVGAltGlyphElement.idl:
873         * svg/SVGAltGlyphItemElement.cpp:
874         * svg/SVGAltGlyphItemElement.h:
875         * svg/SVGAltGlyphItemElement.idl:
876         * svg/SVGDocumentExtensions.cpp:
877         * svg/SVGDocumentExtensions.h:
878         * svg/SVGElement.cpp:
879         (WebCore::SVGElement::childShouldCreateRenderer const):
880         * svg/SVGFontElement.cpp:
881         * svg/SVGFontElement.h:
882         * svg/SVGFontElement.idl:
883         * svg/SVGFontFaceElement.cpp:
884         * svg/SVGFontFaceElement.h:
885         * svg/SVGFontFaceElement.idl:
886         * svg/SVGFontFaceFormatElement.cpp:
887         * svg/SVGFontFaceFormatElement.h:
888         * svg/SVGFontFaceFormatElement.idl:
889         * svg/SVGFontFaceNameElement.cpp:
890         * svg/SVGFontFaceNameElement.h:
891         * svg/SVGFontFaceNameElement.idl:
892         * svg/SVGFontFaceSrcElement.cpp:
893         * svg/SVGFontFaceSrcElement.h:
894         * svg/SVGFontFaceSrcElement.idl:
895         * svg/SVGFontFaceUriElement.cpp:
896         * svg/SVGFontFaceUriElement.h:
897         * svg/SVGFontFaceUriElement.idl:
898         * svg/SVGGlyphElement.cpp:
899         * svg/SVGGlyphElement.h:
900         * svg/SVGGlyphElement.idl:
901         * svg/SVGGlyphRefElement.cpp:
902         * svg/SVGGlyphRefElement.h:
903         * svg/SVGGlyphRefElement.idl:
904         * svg/SVGHKernElement.cpp:
905         * svg/SVGHKernElement.h:
906         * svg/SVGHKernElement.idl:
907         * svg/SVGMissingGlyphElement.cpp:
908         * svg/SVGMissingGlyphElement.h:
909         * svg/SVGMissingGlyphElement.idl:
910         * svg/SVGTRefElement.cpp:
911         (WebCore::SVGTRefElement::rendererIsNeeded):
912         * svg/SVGTSpanElement.cpp:
913         (WebCore::SVGTSpanElement::childShouldCreateRenderer const):
914         (WebCore::SVGTSpanElement::rendererIsNeeded):
915         * svg/SVGTests.cpp:
916         (WebCore::supportedSVGFeatures):
917         * svg/SVGTextElement.cpp:
918         (WebCore::SVGTextElement::childShouldCreateRenderer const):
919         * svg/SVGTextPositioningElement.cpp:
920         (WebCore::SVGTextPositioningElement::elementFromRenderer):
921         * svg/SVGToOTFFontConversion.cpp:
922         * svg/SVGVKernElement.cpp:
923         * svg/SVGVKernElement.h:
924         * svg/SVGVKernElement.idl:
925         * svg/svgtags.in:
926
927 2020-09-23  Tadeu Zagallo  <tzagallo@apple.com>
928
929         Missing scope release in JSDOMBuiltinConstructorBase
930         https://bugs.webkit.org/show_bug.cgi?id=216851
931         <rdar://problem/69144642>
932
933         Reviewed by Yusuke Suzuki.
934
935         In JSDOMBuiltinConstructorBase::callFunctionWithCurrentArguments, we should release the
936         ThrowScope before calling into JavaScript since we don't intend to handle the exception.
937
938         Test: js/transform-stream.html
939
940         * bindings/js/JSDOMBuiltinConstructorBase.cpp:
941         (WebCore::JSDOMBuiltinConstructorBase::callFunctionWithCurrentArguments):
942
943 2020-09-23  Zalan Bujtas  <zalan@apple.com>
944
945         [LFC][IFC] Precompute the collapsible trailing width for LineBreaker
946         https://bugs.webkit.org/show_bug.cgi?id=216881
947
948         Reviewed by Antti Koivisto.
949
950         Let's just compute the collapsible trailing width while adding inline content to LineCandidate instead of
951         reverse looping through the runs in LineBreaker.
952         This is also in preparation for reducing the number of RuntimeEnabledFeatures::layoutFormattingContextIntegrationEnabled calls.
953
954         * layout/inlineformatting/InlineLineBreaker.cpp:
955         (WebCore::Layout::ContinuousContent::hasTrailingCollapsibleContent const):
956         (WebCore::Layout::ContinuousContent::isFullyCollapsible const):
957         (WebCore::Layout::LineBreaker::shouldKeepEndOfLineWhitespace const):
958         (WebCore::Layout::LineBreaker::shouldWrapInlineContent):
959         (WebCore::Layout::LineBreaker::tryWrappingInlineContent const):
960         (WebCore::Layout::ContinuousContent::ContinuousContent):
961         (WebCore::Layout::ContinuousContent::nonCollapsibleLogicalWidth const):
962         (WebCore::Layout::ContinuousContent::isTrailingContentFullyCollapsible const): Deleted.
963         (WebCore::Layout::ContinuousContent::TrailingCollapsibleContent::reset): Deleted.
964         * layout/inlineformatting/InlineLineBreaker.h:
965         * layout/inlineformatting/InlineLineBuilder.cpp:
966         (WebCore::Layout::LineCandidate::InlineContent::collapsibleTrailingWidth const):
967         (WebCore::Layout::LineCandidate::InlineContent::appendInlineItem):
968         (WebCore::Layout::LineCandidate::InlineContent::reset):
969         (WebCore::Layout::LineBuilder::handleFloatsAndInlineContent):
970
971 2020-09-23  Peng Liu  <peng.liu6@apple.com>
972
973         [Media in GPU Process] Implement caption support in video fullscreen and PiP
974         https://bugs.webkit.org/show_bug.cgi?id=208752
975
976         Reviewed by Eric Carlson.
977
978         Export TextTrackRepresentation so that WebKit can use it. Also, update the
979         interface of VideoLayerManagerObjC related to text track representation to
980         use PlatformLayer* instead of TextTrackRepresentation*.
981
982         Manually tested.
983
984         * WebCore.xcodeproj/project.pbxproj:
985         Change target membership of TextTrackRepresentation.h.
986
987         * platform/graphics/avfoundation/objc/VideoLayerManagerObjC.h:
988         * platform/graphics/avfoundation/objc/VideoLayerManagerObjC.mm:
989         (WebCore::VideoLayerManagerObjC::setTextTrackRepresentationLayer):
990         (WebCore::VideoLayerManagerObjC::setTextTrackRepresentation): Deleted.
991         Replace setTextTrackRepresentation() with setTextTrackRepresentationLayer().
992
993         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
994         (WebCore::MediaPlayerPrivateAVFoundationObjC::setTextTrackRepresentation):
995         Use VideoLayerManagerObjC::setTextTrackRepresentationLayer() instead of
996         VideoLayerManagerObjC::setTextTrackRepresentation().
997
998         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
999         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setTextTrackRepresentation): Ditto.
1000
1001 2020-09-23  Chris Dumez  <cdumez@apple.com>
1002
1003         webaudio/AudioBufferSource/audiobuffersource-playbackrate.html is crashing
1004         https://bugs.webkit.org/show_bug.cgi?id=216827
1005
1006         Reviewed by Darin Adler.
1007
1008         AudioBufferSourceNode::renderSilenceAndFinishIfNotLooping() would hit an assertion inside
1009         finish() because finish() was already called earlier when calling updateSchedulingInfo().
1010         updateSchedulingInfo() already takes care of calling finish() when we're done playing.
1011         Address the issue by only calling finish() if hasFinished() returns false.
1012
1013         No new tests, unskipped existing test.
1014
1015         * Modules/webaudio/AudioBufferSourceNode.cpp:
1016         (WebCore::AudioBufferSourceNode::renderSilenceAndFinishIfNotLooping):
1017
1018 2020-09-23  Andres Gonzalez  <andresg_22@apple.com>
1019
1020         Fix for accessibility/aria-combobox-control-owns-elements.html in isolated tree mode.
1021         https://bugs.webkit.org/show_bug.cgi?id=216878
1022
1023         Reviewed by Chris Fleizach.
1024
1025         Test: accessibility/aria-combobox-control-owns-elements.html.
1026
1027         * accessibility/AXObjectCache.cpp:
1028         (WebCore::AXObjectCache::updateIsolatedTree): Update the isolated tree
1029         node for ActiveDescendant and SelectedChildren notifications.
1030         * accessibility/isolatedtree/AXIsolatedObject.cpp:
1031         (WebCore::AXIsolatedObject::initializeAttributeData): Only cache
1032         selectedChildren for those AXObjects that canHaveSelectedChildren.
1033
1034 2020-09-23  Philippe Normand  <pnormand@igalia.com>
1035
1036         media/can-play-av1.html is not spec compliant
1037         https://bugs.webkit.org/show_bug.cgi?id=216873
1038
1039         Reviewed by Eric Carlson.
1040
1041         * platform/graphics/gstreamer/GStreamerRegistryScanner.cpp:
1042         (WebCore::GStreamerRegistryScanner::initialize): Add the "av1" codec in the codecs mapping.
1043
1044 2020-09-23  Youenn Fablet  <youenn@apple.com>
1045
1046         Add support for HTMLMediaElement.setSinkId
1047         https://bugs.webkit.org/show_bug.cgi?id=216696
1048
1049         Reviewed by Eric Carlson.
1050
1051         Implement setSinkId and sinkId as per https://w3c.github.io/mediacapture-output/#htmlmediaelement-extensions.
1052         Introduce a setting to expose these methods and to enable/disable user gesture requirement.
1053         Add interfaces to change device output for specific media players.
1054         Add support for HLS, MSE and MediaStreamTrack renderers on MacOS.
1055         In case of setting the empty string, the default output device is used
1056
1057         Tests: http/wpt/audio-output/setSinkId.https.html
1058                imported/w3c/web-platform-tests/audio-output/idlharness.https.window.html
1059                imported/w3c/web-platform-tests/audio-output/setSinkId.https.html
1060
1061         * CMakeLists.txt:
1062         * DerivedSources.make:
1063         * Modules/mediastream/MediaDevices.cpp:
1064         (WebCore::MediaDevices::exposeDevices):
1065         * Modules/mediastream/MediaDevices.h:
1066         * WebCore.xcodeproj/project.pbxproj:
1067         * html/HTMLMediaElement.cpp:
1068         (WebCore::HTMLMediaElement::audioOutputDevice const):
1069         (WebCore::HTMLMediaElement::setAudioOutputDevice):
1070         (WebCore::HTMLMediaElement::audioOutputDeviceId const):
1071         * html/HTMLMediaElement.h:
1072         (WebCore::HTMLMediaElement::audioOutputHashedDeviceId const):
1073         * html/HTMLMediaElementAudioOutput.idl: Added.
1074         * page/Settings.yaml:
1075         * platform/graphics/MediaPlayer.cpp:
1076         (WebCore::MediaPlayer::audioOutputDeviceChanged):
1077         * platform/graphics/MediaPlayer.h:
1078         (WebCore::MediaPlayerClient::audioOutputDeviceId const):
1079         (WebCore::MediaPlayerClient::audioOutputDeviceIdOverride const):
1080         (WebCore::MediaPlayer::audioOutputDeviceId const):
1081         (WebCore::MediaPlayer::audioOutputDeviceIdOverride const):
1082         * platform/graphics/MediaPlayerPrivate.h:
1083         (WebCore::MediaPlayerPrivateInterface::audioOutputDeviceChanged):
1084         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
1085         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1086         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer):
1087         (WebCore::MediaPlayerPrivateAVFoundationObjC::audioOutputDeviceChanged):
1088         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
1089         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
1090         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::audioOutputDeviceChanged):
1091         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h:
1092         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
1093         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::updateTracks):
1094         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::audioOutputDeviceChanged):
1095         * platform/mediastream/AudioMediaStreamTrackRenderer.h:
1096         (WebCore::AudioMediaStreamTrackRenderer::setAudioOutputDevice):
1097         * platform/mediastream/AudioTrackPrivateMediaStream.cpp:
1098         (WebCore::AudioTrackPrivateMediaStream::setAudioOutputDevice):
1099         * platform/mediastream/AudioTrackPrivateMediaStream.h:
1100         * platform/mediastream/mac/AudioMediaStreamTrackRendererCocoa.cpp:
1101         (WebCore::AudioMediaStreamTrackRendererCocoa::setAudioOutputDevice):
1102         (WebCore::AudioMediaStreamTrackRendererCocoa::pushSamples):
1103         * platform/mediastream/mac/AudioMediaStreamTrackRendererCocoa.h:
1104         * platform/mediastream/mac/AudioMediaStreamTrackRendererUnit.cpp:
1105         (WebCore::AudioMediaStreamTrackRendererUnit::setAudioOutputDevice):
1106         (WebCore::AudioMediaStreamTrackRendererUnit::createAudioUnitIfNeeded):
1107         * platform/mediastream/mac/AudioMediaStreamTrackRendererUnit.h:
1108
1109 2020-09-23  Philippe Normand  <pnormand@igalia.com>
1110
1111         REGRESSION(r267383): fast/mediastream/getUserMedia-webaudio.html is failing
1112         https://bugs.webkit.org/show_bug.cgi?id=216813
1113
1114         Reviewed by Adrian Perez de Castro.
1115
1116         Revert r267428 and fixup the GStreamer FFT implementation which broke in r267383.
1117
1118         * platform/audio/FFTFrame.cpp:
1119         (WebCore::FFTFrame::multiply):
1120         * platform/audio/FFTFrameStub.cpp:
1121         (WebCore::FFTFrame::multiply): Deleted.
1122         * platform/audio/gstreamer/FFTFrameGStreamer.cpp:
1123         (WebCore::FFTFrame::doFFT): Update the real and imaginary arrays after applying the FFT.
1124         (WebCore::FFTFrame::multiply): Deleted.
1125         * platform/audio/mac/FFTFrameMac.cpp:
1126         (WebCore::FFTFrame::multiply): Deleted.
1127
1128 2020-09-23  Philippe Normand  <pnormand@igalia.com>
1129
1130         Unreviewed, prospective GTK build fix after r267449.
1131
1132         * svg/SVGPathBlender.cpp: Include <functional>, needed for std::invoke().
1133
1134 2020-09-23  Cathie Chen  <cathiechen@igalia.com>
1135
1136         Wheel event phases of FrameView are not handled correctly
1137         https://bugs.webkit.org/show_bug.cgi?id=216870
1138
1139         Reviewed by Simon Fraser.
1140
1141         In AsyncScrollingCoordinator::handleWheelEventPhase, the scrollAnimator of a FrameView should be from FrameView itself, not ScrollableArea.
1142         It doesn't call nodeDidHandleEvent to handle wheel event phases when !asyncFrameOrOverflowScrollingEnabled. Should call it after handleWheelEvent.
1143
1144         * page/scrolling/AsyncScrollingCoordinator.cpp:
1145         (WebCore::AsyncScrollingCoordinator::handleWheelEventPhase): When nodeID is FrameView, we should use the scrollAnimator of FrameView instead.
1146         * page/scrolling/ScrollingTree.cpp:
1147         (WebCore::ScrollingTree::handleWheelEvent): If wheelEvent is handled, we should call nodeDidHandleEvent to handle the phases.
1148
1149 2020-09-23  Antti Koivisto  <antti@apple.com>
1150
1151         [LFC][Integration] Add canUseFor functions
1152         https://bugs.webkit.org/show_bug.cgi?id=216869
1153
1154         Reviewed by Zalan Bujtas.
1155
1156         Copy the SLL canUseFor code.
1157
1158         * Sources.txt:
1159         * WebCore.xcodeproj/project.pbxproj:
1160         * layout/integration/LayoutIntegrationCoverage.cpp: Added.
1161         (WebCore::LayoutIntegration::canUseForCharacter):
1162         (WebCore::LayoutIntegration::canUseForText):
1163         (WebCore::LayoutIntegration::canUseForFontAndText):
1164         (WebCore::LayoutIntegration::canUseForStyle):
1165         (WebCore::LayoutIntegration::canUseForLineLayoutWithReason):
1166         (WebCore::LayoutIntegration::canUseForLineLayout):
1167         (WebCore::LayoutIntegration::canUseForLineLayoutAfterStyleChange):
1168         * layout/integration/LayoutIntegrationCoverage.h: Added.
1169
1170         Also switch to OptionSet.
1171
1172         * layout/integration/LayoutIntegrationLineLayout.cpp:
1173         (WebCore::LayoutIntegration::LineLayout::isEnabled):
1174         (WebCore::LayoutIntegration::LineLayout::canUseFor):
1175         (WebCore::LayoutIntegration::LineLayout::canUseForAfterStyleChange):
1176         * layout/integration/LayoutIntegrationLineLayout.h:
1177         (WebCore::LayoutIntegration::LineLayout::canUseFor): Deleted.
1178         * rendering/RenderBlockFlow.cpp:
1179         (WebCore::RenderBlockFlow::layoutInlineChildren):
1180
1181 2020-09-23  Zalan Bujtas  <zalan@apple.com>
1182
1183         [LFC][IFC] Remove redundant RuntimeEnabledFeatures::layoutFormattingContextIntegrationEnabled from Line::Run::hasTrailingLetterSpacing
1184         https://bugs.webkit.org/show_bug.cgi?id=216867
1185
1186         Reviewed by Simon Fraser.
1187
1188         This codepath is only triggered when Line::TrimmableTrailingContent has a partially trimmable run.
1189         However we don't add such runs unless m_shouldIgnoreTrailingLetterSpacing is false (which is already based on the RuntimeEnabledFeatures flag).
1190
1191         * layout/inlineformatting/InlineLine.cpp:
1192         (WebCore::Layout::Line::Run::hasTrailingLetterSpacing const):
1193         (WebCore::Layout::Line::Run::trailingLetterSpacing const):
1194
1195 2020-09-22  Patrick Angle  <pangle@apple.com>
1196
1197         Web Inspector: Change `InspectorAnimationAgent->startTracking` to not error on repeated calls
1198         https://bugs.webkit.org/show_bug.cgi?id=216385
1199
1200         Reviewed by Devin Rousso.
1201
1202         InpsectorAnimationAgent now mirrors the behavior of other timeline agents by no longer returning an error on a
1203         repeated invocation of `startTracking`.
1204
1205         * inspector/agents/InspectorAnimationAgent.cpp:
1206         (WebCore::InspectorAnimationAgent::startTracking):
1207
1208 2020-09-22  Antti Koivisto  <antti@apple.com>
1209
1210         [LFC][Integration] Basic pagination support
1211         https://bugs.webkit.org/show_bug.cgi?id=215451
1212         <rdar://problem/67482721>
1213
1214         Reviewed by Zalan Bujtas.
1215
1216         Port the Simple Line Layout pagination code to LFC integration layer.
1217         Pagination is the last remaining use of SLL so this patch turns it into dead code.
1218
1219         * Sources.txt:
1220         * WebCore.xcodeproj/project.pbxproj:
1221         * layout/displaytree/DisplayInlineContent.h:
1222         (WebCore::Display::InlineContent::create):
1223         * layout/integration/LayoutIntegrationLineLayout.cpp:
1224         (WebCore::LayoutIntegration::LineLayout::canUseFor):
1225
1226         This now the same as SLL test, covering all cases.
1227
1228         (WebCore::LayoutIntegration::LineLayout::contentLogicalHeight const):
1229         (WebCore::LayoutIntegration::LineLayout::adjustForPagination):
1230         (WebCore::LayoutIntegration::LineLayout::ensureDisplayInlineContent):
1231
1232         This is fairly direct copy of the SLL code. It is not future proof or otherwise great but it serves the job for now.
1233
1234         * layout/integration/LayoutIntegrationLineLayout.h:
1235         (WebCore::LayoutIntegration::LineLayout::isPaginated const):
1236         * layout/integration/LayoutIntegrationPagination.cpp: Added.
1237         (WebCore::LayoutIntegration::computeLineTopAndBottomWithOverflow):
1238         (WebCore::LayoutIntegration::computeLineBreakIndex):
1239         (WebCore::LayoutIntegration::computeOffsetAfterLineBreak):
1240         (WebCore::LayoutIntegration::setPageBreakForLine):
1241         (WebCore::LayoutIntegration::updateMinimumPageHeight):
1242         (WebCore::LayoutIntegration::makeAdjustedContent):
1243         (WebCore::LayoutIntegration::adjustLinePositionsForPagination):
1244         * layout/integration/LayoutIntegrationPagination.h: Copied from Source/WebCore/layout/displaytree/DisplayInlineContent.h.
1245         * rendering/RenderBlockFlow.cpp:
1246         (WebCore::RenderBlockFlow::layoutLFCLines):
1247         (WebCore::RenderBlockFlow::ensureLineBoxes):
1248
1249 2020-09-22  Zalan Bujtas  <zalan@apple.com>
1250
1251         [LFC][Integration] Move RuntimeEnabledFeatures::layoutFormattingContextIntegrationEnabled() check out from LineBuilder::constraintsForLine
1252         https://bugs.webkit.org/show_bug.cgi?id=216862
1253
1254         Reviewed by Simon Fraser.
1255
1256         * layout/LayoutState.cpp:
1257         (WebCore::Layout::LayoutState::setIsIntegratedRootBoxFirstChild):
1258         * layout/LayoutState.h:
1259         (WebCore::Layout::LayoutState::isIntegratedRootBoxFirstChild const):
1260         * layout/inlineformatting/InlineFormattingContext.cpp:
1261         (WebCore::Layout::InlineFormattingContext::computeGeometryForLineContent):
1262         * layout/inlineformatting/InlineLineBuilder.cpp:
1263         (WebCore::Layout::LineBuilder::constraintsForLine):
1264
1265 2020-09-22  Zalan Bujtas  <zalan@apple.com>
1266
1267         [LFC][Floats] Remove the redundant RuntimeEnabledFeatures::layoutFormattingContextIntegrationEnabled() check from FloatingState::append
1268         https://bugs.webkit.org/show_bug.cgi?id=216866
1269
1270         Reviewed by Simon Fraser.
1271
1272         The no-layout-box-for-the-FloatItem codepath is reserved for the IFC integration. This is temporary anyway.
1273
1274         * layout/floats/FloatingState.cpp:
1275         (WebCore::Layout::FloatingState::append):
1276
1277 2020-09-22  Lauro Moura  <lmoura@igalia.com>
1278
1279         [GTK] REGRESSION(r267329): imported/blink/editing/undo/crash-redo-with-iframes.html is crashing
1280         https://bugs.webkit.org/show_bug.cgi?id=216778
1281
1282         Reviewed by Darin Adler.
1283
1284         Covered by existing tests.
1285
1286         * editing/markup.cpp:
1287         (WebCore::serializePreservingVisualAppearanceInternal): Return early
1288         also for "negative" ranges to avoid hitting an assertion inside
1289         serializeNodes, as suggested by Darin.
1290
1291 2020-09-22  Chris Dumez  <cdumez@apple.com>
1292
1293         Slightly improve AudioBufferSourceNode resampling
1294         https://bugs.webkit.org/show_bug.cgi?id=216859
1295
1296         Reviewed by Eric Carlson.
1297
1298         Slightly improve AudioBufferSourceNode resampling. Use simple linear extrapolation
1299         to resample the data when we reach the end of the buffer. Previously, the last
1300         sample would just be repeated enough times.
1301
1302         This is a merge of the following Blink change by Raymond Toy:
1303         - https://chromium-review.googlesource.com/c/chromium/src/+/1211910/
1304
1305         No new tests, rebaselined existing tests.
1306
1307         * Modules/webaudio/AudioBufferSourceNode.cpp:
1308         (WebCore::AudioBufferSourceNode::renderFromBuffer):
1309
1310 2020-09-22  Sam Weinig  <weinig@apple.com>
1311
1312         [WebIDL] Switch to new file name convention for partial interfaces
1313         https://bugs.webkit.org/show_bug.cgi?id=216843
1314
1315         Reviewed by Tim Horton.
1316
1317         Updates all 'partial interface' IDLs to use the new naming convention adopted
1318         in https://webkit.org/b/216729, where they are name as the construction of the
1319         base interface '+' the supplementing spec. So, additions to Document from the
1320         Web Animations spec becomes Document+WebAnimations.idl.
1321         
1322         * accessibility/AccessibilityRenderObject.cpp:
1323         * bindings/js/JSDocumentCustom.cpp:
1324         * bindings/js/JSXMLDocumentCustom.cpp:
1325         * html/HTMLFrameOwnerElement.h:
1326         * loader/FrameLoader.cpp:
1327         * page/FrameView.cpp:
1328         * svg/DocumentSVG.cpp: Added.
1329         * svg/DocumentSVG.h: Added.
1330         * svg/SVGDocument.cpp:
1331         * svg/SVGDocument.h:
1332         * svg/SVGTRefElement.cpp:
1333         * svg/graphics/SVGImage.cpp:
1334         * style/StyleAdjuster.cpp:
1335         * svg/Document+SVG.idl: Added.
1336         * svg/SVGDocument.idl: Removed.
1337         Fix weirdness around SVGDocument. Previously, additions to the Document
1338         interface were in a class that was also a document subclass. Now the two
1339         are split, so the additions are in DocumentSVG.h/cpp, matching convention,
1340         and the subclass remains SVGDocument.h/cpp, also matching convention.
1341
1342         * CMakeLists.txt:
1343         * DerivedSources-input.xcfilelist:
1344         * DerivedSources-output.xcfilelist:
1345         * DerivedSources.make:
1346         * Sources.txt:
1347         * WebCore.xcodeproj/project.pbxproj:
1348         Update for renames.
1349
1350         * Modules/async-clipboard/Navigator+Clipboard.idl: Added.
1351         * Modules/async-clipboard/NavigatorClipboard.idl: Removed.
1352         * Modules/beacon/Navigator+Beacon.idl: Added.
1353         * Modules/beacon/NavigatorBeacon.idl: Removed.
1354         * Modules/cache/DOMWindow+Caches.idl: Added.
1355         * Modules/cache/DOMWindowCaches.idl: Removed.
1356         * Modules/cache/WorkerGlobalScope+Caches.idl: Added.
1357         * Modules/cache/WorkerGlobalScopeCaches.idl: Removed.
1358         * Modules/credentialmanagement/Navigator+Credentials.idl: Added.
1359         * Modules/credentialmanagement/NavigatorCredentials.idl: Removed.
1360         * Modules/encryptedmedia/Navigator+EME.idl: Added.
1361         * Modules/encryptedmedia/NavigatorEME.idl: Removed.
1362         * Modules/entriesapi/HTMLInputElement+EntriesAPI.idl: Added.
1363         * Modules/entriesapi/HTMLInputElementEntriesAPI.idl: Removed.
1364         * Modules/fetch/WindowOrWorkerGlobalScope+Fetch.idl: Added.
1365         * Modules/fetch/WindowOrWorkerGlobalScopeFetch.idl: Removed.
1366         * Modules/gamepad/Navigator+Gamepad.idl: Added.
1367         * Modules/gamepad/NavigatorGamepad.idl: Removed.
1368         * Modules/geolocation/Navigator+Geolocation.idl: Added.
1369         * Modules/geolocation/NavigatorGeolocation.idl: Removed.
1370         * Modules/indexeddb/DOMWindow+IndexedDatabase.idl: Added.
1371         * Modules/indexeddb/DOMWindowIndexedDatabase.idl: Removed.
1372         * Modules/indexeddb/WorkerGlobalScope+IndexedDatabase.idl: Added.
1373         * Modules/indexeddb/WorkerGlobalScopeIndexedDatabase.idl: Removed.
1374         * Modules/mediacapabilities/Navigator+MediaCapabilities.idl: Added.
1375         * Modules/mediacapabilities/NavigatorMediaCapabilities.idl: Removed.
1376         * Modules/mediasession/HTMLMediaElement+MediaSession.idl: Added.
1377         * Modules/mediasession/HTMLMediaElementMediaSession.idl: Removed.
1378         * Modules/mediasource/AudioTrack+MediaSource.idl: Added.
1379         * Modules/mediasource/AudioTrackMediaSource.idl: Removed.
1380         * Modules/mediasource/DOMURL+MediaSource.idl: Added.
1381         * Modules/mediasource/DOMURLMediaSource.idl: Removed.
1382         * Modules/mediasource/TextTrack+MediaSource.idl: Added.
1383         * Modules/mediasource/TextTrackMediaSource.idl: Removed.
1384         * Modules/mediasource/VideoTrack+MediaSource.idl: Added.
1385         * Modules/mediasource/VideoTrackMediaSource.idl: Removed.
1386         * Modules/mediastream/Navigator+MediaDevices.idl: Added.
1387         * Modules/mediastream/NavigatorMediaDevices.idl: Removed.
1388         * Modules/pictureinpicture/Document+PictureInPicture.idl: Added.
1389         * Modules/pictureinpicture/DocumentOrShadowRoot+PictureInPicture.idl: Added.
1390         * Modules/pictureinpicture/DocumentOrShadowRootPictureInPicture.idl: Removed.
1391         * Modules/pictureinpicture/DocumentPictureInPicture.idl: Removed.
1392         * Modules/pictureinpicture/HTMLVideoElement+PictureInPicture.idl: Added.
1393         * Modules/pictureinpicture/HTMLVideoElementPictureInPicture.idl: Removed.
1394         * Modules/quota/DOMWindow+Quota.idl: Added.
1395         * Modules/quota/DOMWindowQuota.idl: Removed.
1396         * Modules/quota/Navigator+StorageQuota.idl: Added.
1397         * Modules/quota/NavigatorStorageQuota.idl: Removed.
1398         * Modules/quota/WorkerNavigator+StorageQuota.idl: Added.
1399         * Modules/quota/WorkerNavigatorStorageQuota.idl: Removed.
1400         * Modules/remoteplayback/HTMLMediaElement+RemotePlayback.idl: Added.
1401         * Modules/remoteplayback/HTMLMediaElementRemotePlayback.idl: Removed.
1402         * Modules/speech/DOMWindow+SpeechSynthesis.idl: Added.
1403         * Modules/speech/DOMWindowSpeechSynthesis.idl: Removed.
1404         * Modules/webdatabase/DOMWindow+WebDatabase.idl: Added.
1405         * Modules/webdatabase/DOMWindowWebDatabase.idl: Removed.
1406         * Modules/webdriver/Navigator+WebDriver.idl: Added.
1407         * Modules/webdriver/NavigatorWebDriver.idl: Removed.
1408         * Modules/webgpu/Navigator+GPU.idl: Added.
1409         * Modules/webgpu/NavigatorGPU.idl: Removed.
1410         * Modules/webgpu/WorkerNavigator+GPU.idl: Added.
1411         * Modules/webgpu/WorkerNavigatorGPU.idl: Removed.
1412         * Modules/webxr/Navigator+WebXR.idl: Added.
1413         * Modules/webxr/NavigatorWebXR.idl: Removed.
1414         * animation/Document+WebAnimations.idl: Added.
1415         * animation/DocumentAnimations.idl: Removed.
1416         * animation/DocumentOrShadowRoot+WebAnimations.idl: Added.
1417         * animation/DocumentOrShadowRootAnimations.idl: Removed.
1418         * animation/GlobalEventHandlers+CSSAnimations.idl: Added.
1419         * animation/GlobalEventHandlers+CSSTransitions.idl: Added.
1420         * animation/GlobalEventHandlersCSSAnimations.idl: Removed.
1421         * animation/GlobalEventHandlersCSSTransitions.idl: Removed.
1422         * css/DOMCSSNamespace+CSSPainting.idl: Added.
1423         * css/DOMCSSNamespace+CSSPropertiesandValues.idl: Added.
1424         * css/DOMCSSPaintWorklet.idl: Removed.
1425         * css/DOMCSSRegisterCustomProperty.idl: Removed.
1426         * css/DocumentOrShadowRoot+CSSOM.idl: Added.
1427         * css/DocumentOrShadowRootStyleSheets.idl: Removed.
1428         * dom/Document+CSSOMView.idl: Added.
1429         * dom/Document+Fullscreen.idl: Added.
1430         * dom/Document+HTML.idl: Added.
1431         * dom/Document+HTMLObsolete.idl: Added.
1432         * dom/Document+PageVisibility.idl: Added.
1433         * dom/Document+PointerLock.idl: Added.
1434         * dom/Document+Selection.idl: Added.
1435         * dom/Document+StorageAccess.idl: Added.
1436         * dom/Document+Touch.idl: Added.
1437         * dom/Document+UndoMananger.idl: Added.
1438         * dom/DocumentFullscreen.idl: Removed.
1439         * dom/DocumentHTML.idl: Removed.
1440         * dom/DocumentHTMLObsolete.idl: Removed.
1441         * dom/DocumentOrShadowRoot+PointerLock.idl: Added.
1442         * dom/DocumentOrShadowRootPointerLock.idl: Removed.
1443         * dom/DocumentPageVisibility.idl: Removed.
1444         * dom/DocumentPointerLock.idl: Removed.
1445         * dom/DocumentScrolling.idl: Removed.
1446         * dom/DocumentSelection.idl: Removed.
1447         * dom/DocumentStorageAccess.idl: Removed.
1448         * dom/DocumentTouch.idl: Removed.
1449         * dom/DocumentUndoMananger.idl: Removed.
1450         * dom/Element+DOMParsing.idl: Added.
1451         * dom/ElementDOMParsing.idl: Removed.
1452         * dom/GlobalEventHandlers+PointerEvents.idl: Added.
1453         * dom/GlobalEventHandlersPointerEvents.idl: Removed.
1454         * page/Navigator+IsLoggedIn.idl: Added.
1455         * page/NavigatorIsLoggedIn.idl: Removed.
1456         Rename IDLs.
1457
1458 2020-09-22  Zalan Bujtas  <zalan@apple.com>
1459
1460         [LFC][IFC] Used geometry for inline level boxes should be in the coordinate system of the formatting context root
1461         https://bugs.webkit.org/show_bug.cgi?id=216854
1462
1463         Reviewed by Simon Fraser.
1464
1465         Convert inline level box geometry from relative to the line box to relative to the formatting context root.
1466
1467         * layout/inlineformatting/InlineFormattingContext.cpp:
1468         (WebCore::Layout::InlineFormattingContext::computeGeometryForLineContent):
1469
1470 2020-09-22  Chris Dumez  <cdumez@apple.com>
1471
1472         Fix BiquadFilterNode's lowpass & highpass filters
1473         https://bugs.webkit.org/show_bug.cgi?id=216852
1474
1475         Reviewed by Eric Carlson.
1476
1477         Fix BiquadFilterNode's lowpass & highpass filters. They incorrectly clamp the
1478         resonance to make it positive.
1479
1480         Formulas for the filters are specified here:
1481         - https://www.w3.org/TR/webaudio/#filters-characteristics
1482
1483         No new tests, rebaselined existing tests.
1484
1485         * platform/audio/Biquad.cpp:
1486         (WebCore::pow10):
1487         (WebCore::Biquad::setLowpassParams):
1488         (WebCore::Biquad::setHighpassParams):
1489
1490 2020-09-22  Chris Dumez  <cdumez@apple.com>
1491
1492         Merge AudioBufferSourceNode loop fixes from Blink
1493         https://bugs.webkit.org/show_bug.cgi?id=216849
1494
1495         Reviewed by Eric Carlson.
1496
1497         Merge AudioBufferSourceNode loop fixes from Blink, the following one in particular:
1498         - https://codereview.chromium.org/723823002
1499
1500         This allows us to pass all the checks in:
1501         webaudio/AudioBufferSource/audiobuffersource-loop-comprehensive.html.
1502
1503         No new tests, rebaselined existing test.
1504
1505         * Modules/webaudio/AudioBufferSourceNode.cpp:
1506         (WebCore::AudioBufferSourceNode::renderFromBuffer):
1507         (WebCore::AudioBufferSourceNode::adjustGrainParameters):
1508         Merge loop fixes from Blink.
1509
1510         * Modules/webaudio/AudioScheduledSourceNode.cpp:
1511         (WebCore::AudioScheduledSourceNode::stopLater):
1512         Stop throwing when m_endTime is already set. Our behavior did not match
1513         Chrome and Firefox here. This was causing some existing tests to start
1514         failing now that providing a grain duration when calling start() would
1515         set m_endTime if loop() returns true.
1516
1517 2020-09-22  Sihui Liu  <sihui_liu@apple.com>
1518
1519         REGRESSION(r266075): WebContent process crashes at TextManipulationController::getPath
1520         https://bugs.webkit.org/show_bug.cgi?id=216846
1521
1522         Reviewed by Wenson Hsieh.
1523
1524         TextIterator does not visit node that has no renderer, so if node has become hidden, TextManipulationController 
1525         will not find content node in paragraph range during replacement.
1526
1527         API Test: TextManipulation.CompleteTextManipulationParagraphBecomesHidden
1528
1529         * editing/TextManipulationController.cpp:
1530         (WebCore::TextManipulationController::replace):
1531
1532 2020-09-22  Zalan Bujtas  <zalan@apple.com>
1533
1534         [LFC][IFC] Atomic inline-level box with margin is mispositioned
1535         https://bugs.webkit.org/show_bug.cgi?id=216842
1536
1537         Reviewed by Antti Koivisto.
1538
1539         The inline box that an atomic inline-level box generates has the height of the margin box. Therefore the inline box's logical top position
1540         is the position of the top edge of the margin box.
1541         When converting the inline box geometry back to the layout box, we need to offset the top position (border box top edge)
1542         with the value of the used margin before.
1543
1544         * layout/inlineformatting/InlineFormattingContext.cpp:
1545         (WebCore::Layout::InlineFormattingContext::computeGeometryForLineContent):
1546
1547 2020-09-22  Chris Dumez  <cdumez@apple.com>
1548
1549         AudioParam.setValueCurveAtTime() should have an implicit call to setValueAtTime() at the end
1550         https://bugs.webkit.org/show_bug.cgi?id=216839
1551
1552         Reviewed by Eric Carlson.
1553
1554         AudioParam.setValueCurveAtTime() should have an implicit call to setValueAtTime() at the end,
1555         as specified here:
1556         - https://www.w3.org/TR/webaudio/#dom-audioparam-setvaluecurveattime
1557
1558         """
1559         An implicit call to setValueAtTime() is made at time π‘‡0+𝑇𝐷 with value π‘‰[π‘βˆ’1] so that
1560         following automations will start from the end of the setValueCurveAtTime() event.
1561         """
1562
1563         No new tests, rebaselined existing test.
1564
1565         * Modules/webaudio/AudioParamTimeline.cpp:
1566         (WebCore::AudioParamTimeline::setValueCurveAtTime):
1567
1568 2020-09-22  Zalan Bujtas  <zalan@apple.com>
1569
1570         [LFC][IFC] Add support for multiline inline box geometry.
1571         https://bugs.webkit.org/show_bug.cgi?id=216835
1572
1573         Reviewed by Antti Koivisto.
1574
1575         This patch computes the geometry for inline boxes spanning multiple lines (e.g. <span>first line<br>next line</span).
1576         However this is not the getBoundingClientRect() type of geometry where we provide geometry for each fragments. This is more like the
1577         element.offset* geometry where we compute the enclosing rectangle for all the fragments.
1578
1579         * layout/inlineformatting/InlineFormattingContext.cpp:
1580         (WebCore::Layout::InlineFormattingContext::layoutInFlowContent): Decouple the run construction and inline box geometry update logic,
1581         where we loop through the runs and create "line runs" when needed and then we loop through the inline boxes on the current line and
1582         update the box geometries.
1583  
1584         (WebCore::Layout::InlineFormattingContext::computeGeometryForLineContent):
1585         * layout/inlineformatting/InlineFormattingState.h:
1586         (WebCore::Layout::InlineFormattingState::lineBoxes const):
1587         (WebCore::Layout::InlineFormattingState::addLineBox):
1588         (WebCore::Layout::InlineFormattingState::clearLineAndRuns):
1589         (WebCore::Layout::InlineFormattingState::shrinkToFit):
1590         * layout/inlineformatting/InlineLineBox.h:
1591         (WebCore::Layout::LineBox::containsInlineLevelBox const):
1592
1593 2020-09-22  Chris Dumez  <cdumez@apple.com>
1594
1595         AudioParams with automations must process timelines
1596         https://bugs.webkit.org/show_bug.cgi?id=216837
1597
1598         Reviewed by Darin Adler.
1599
1600         Currently, if an AudioNode has no inputs connected, any automations
1601         (or connections) to an AudioParam of the node is not processed. Thus,
1602         time never advances on the AudioParam, and any upstream graph
1603         connected to the AudioParam never gets pulled for data.
1604
1605         AudioParam should get processed so that time progresses. Normal
1606         processing of the node causes AudioParams to be processed, so we were
1607         only missing the case where the node has silent inputs (silent or no
1608         inputs). Then we just need to update the AudioParams, without having
1609         to do the full processing associated with the node.
1610
1611         See https://webaudio.github.io/web-audio-api/#rendering-loop, step 8.1.1
1612         in particular that says any inputs connected to an AudioParam are 
1613         processed. There are no conditions on when this happens.
1614
1615         This is a merge of the following Blink change by Raymond Toy:
1616         - https://codereview.chromium.org/2420983002
1617
1618         No new tests, rebaselined existing test.
1619
1620         * Modules/webaudio/AudioBasicProcessorNode.cpp:
1621         (WebCore::AudioBasicProcessorNode::processOnlyAudioParams):
1622         * Modules/webaudio/AudioBasicProcessorNode.h:
1623         * Modules/webaudio/AudioListener.h:
1624         * Modules/webaudio/AudioNode.cpp:
1625         (WebCore::AudioNode::processIfNecessary):
1626         * Modules/webaudio/AudioNode.h:
1627         (WebCore::AudioNode::processOnlyAudioParams):
1628         * Modules/webaudio/BiquadFilterNode.cpp:
1629         (WebCore::BiquadFilterNode::BiquadFilterNode):
1630         * Modules/webaudio/BiquadProcessor.cpp:
1631         (WebCore::BiquadProcessor::processOnlyAudioParams):
1632         * Modules/webaudio/BiquadProcessor.h:
1633         * Modules/webaudio/DelayDSPKernel.cpp:
1634         (WebCore::DelayDSPKernel::processOnlyAudioParams):
1635         * Modules/webaudio/DelayDSPKernel.h:
1636         * Modules/webaudio/DelayNode.cpp:
1637         (WebCore::DelayNode::DelayNode):
1638         * Modules/webaudio/DynamicsCompressorNode.cpp:
1639         (WebCore::DynamicsCompressorNode::processOnlyAudioParams):
1640         * Modules/webaudio/DynamicsCompressorNode.h:
1641         * Modules/webaudio/GainNode.cpp:
1642         (WebCore::GainNode::processOnlyAudioParams):
1643         * Modules/webaudio/GainNode.h:
1644         * Modules/webaudio/PannerNode.cpp:
1645         (WebCore::PannerNode::processOnlyAudioParams):
1646         * Modules/webaudio/PannerNode.h:
1647         * Modules/webaudio/StereoPannerNode.cpp:
1648         (WebCore::StereoPannerNode::processOnlyAudioParams):
1649         * Modules/webaudio/StereoPannerNode.h:
1650         * platform/audio/AudioDSPKernel.h:
1651         (WebCore::AudioDSPKernel::processOnlyAudioParams):
1652         * platform/audio/AudioDSPKernelProcessor.cpp:
1653         (WebCore::AudioDSPKernelProcessor::processOnlyAudioParams):
1654         * platform/audio/AudioDSPKernelProcessor.h:
1655         * platform/audio/AudioProcessor.h:
1656         (WebCore::AudioProcessor::processOnlyAudioParams):
1657
1658 2020-09-22  Chris Dumez  <cdumez@apple.com>
1659
1660         Unreviewed, partial revert of r267383.
1661
1662         Restore GStreamer-specific implementation of FFTFrame::multiply() since it appears
1663         r267383 introduced test failures on GTK port.
1664
1665         * platform/audio/FFTFrame.cpp:
1666         (WebCore::FFTFrame::multiply): Deleted.
1667         * platform/audio/FFTFrameStub.cpp:
1668         (WebCore::FFTFrame::multiply):
1669         * platform/audio/gstreamer/FFTFrameGStreamer.cpp:
1670         (WebCore::FFTFrame::multiply):
1671         * platform/audio/mac/FFTFrameMac.cpp:
1672         (WebCore::FFTFrame::multiply):
1673
1674 2020-09-22  Zalan Bujtas  <zalan@apple.com>
1675
1676         [LFC] FormattingState should never be copied.
1677         https://bugs.webkit.org/show_bug.cgi?id=216833
1678
1679         Reviewed by Antti Koivisto.
1680
1681         Even when running a throw-away layout, we should not copy the state object but instead generate a new one for the subtree.
1682         These objects should never be copied in general.
1683
1684         * layout/FormattingState.h:
1685         * layout/LayoutState.h:
1686         * layout/tableformatting/TableFormattingContextGeometry.cpp:
1687         (WebCore::Layout::TableFormattingContext::Geometry::usedBaselineForCell):
1688
1689 2020-09-22  Youenn Fablet  <youenn@apple.com>
1690
1691         Implement a default prompt for getUserMedia
1692         https://bugs.webkit.org/show_bug.cgi?id=216821
1693
1694         Reviewed by Eric Carlson.
1695
1696         Manually tested by running Minibrowser.
1697
1698         * en.lproj/Localizable.strings:
1699
1700 2020-09-22  Chris Dumez  <cdumez@apple.com>
1701
1702         webaudio/AudioParam/audioparam-setTarget-timeConstant-0.html is crashing
1703         https://bugs.webkit.org/show_bug.cgi?id=216824
1704
1705         Reviewed by Darin Adler.
1706
1707         If the time constant pass to AudioParam.setTargetAtTime() is 0, then insert a SetValue event in
1708         the timeline instead of a SetTarget one, causing us to instantly jump to the target value. This
1709         matches the Blink behavior.
1710
1711         No new tests, unskipped existing test.
1712
1713         * Modules/webaudio/AudioParamTimeline.cpp:
1714         (WebCore::AudioParamTimeline::setTargetAtTime):
1715
1716 2020-09-22  Brian Burg  <bburg@apple.com>
1717
1718         [Cocoa] _WKInspectorDelegate should handle showing external resources
1719         https://bugs.webkit.org/show_bug.cgi?id=216334
1720
1721         Reviewed by Devin Rousso.
1722
1723         Adapt to the rename of InspectorFrontendHost.{openInNewTab => openURLExternally}.
1724
1725         * inspector/InspectorFrontendClient.h:
1726         * inspector/InspectorFrontendClientLocal.cpp:
1727         (WebCore::InspectorFrontendClientLocal::openURLExternally):
1728         (WebCore::InspectorFrontendClientLocal::openInNewTab): Deleted.
1729         * inspector/InspectorFrontendClientLocal.h:
1730         * inspector/InspectorFrontendHost.cpp:
1731         (WebCore::InspectorFrontendHost::openURLExternally):
1732         (WebCore::InspectorFrontendHost::openInNewTab): Deleted.
1733         * inspector/InspectorFrontendHost.h:
1734         * inspector/InspectorFrontendHost.idl:
1735
1736 2020-09-22  Sam Weinig  <weinig@apple.com>
1737
1738         [WebIDL] Split up Performance.idl into component partials
1739         https://bugs.webkit.org/show_bug.cgi?id=216729
1740
1741         Reviewed by Darin Adler.
1742
1743         Split additions to the Peformance interface from the Navagation Timing,
1744         Resource Timing, User Timing and Performance Timeline specs into their
1745         own IDL files. Trying something new with the naming (using Performance
1746         '+' name of the spec supplying the addition) for these partials to test
1747         the waters.
1748
1749         * CMakeLists.txt:
1750         * DerivedSources-input.xcfilelist:
1751         * DerivedSources-output.xcfilelist:
1752         * DerivedSources.make:
1753         * WebCore.xcodeproj/project.pbxproj:
1754         * page/Performance+NavigationTiming.idl: Added.
1755         * page/Performance+PerformanceTimeline.idl: Added.
1756         * page/Performance+ResourceTiming.idl: Added.
1757         * page/Performance+UserTiming.idl: Added.
1758         * page/Performance.idl:
1759
1760 2020-09-22  Zalan Bujtas  <zalan@apple.com>
1761
1762         [LFC][IFC] TextUtil::split needs logical left
1763         https://bugs.webkit.org/show_bug.cgi?id=216798
1764
1765         Reviewed by Antti Koivisto.
1766
1767         Measuring text content requires logical left offset (e.g. tab size depends on the logical position).
1768         Let's pass in the current logical left position to TextUtil::split.
1769
1770         * layout/inlineformatting/InlineLineBreaker.cpp:
1771         (WebCore::Layout::ContinuousContent::runs const):
1772         (WebCore::Layout::ContinuousContent::isEmpty const):
1773         (WebCore::Layout::ContinuousContent::logicalWidth const):
1774         (WebCore::Layout::ContinuousContent::logicalLeft const):
1775         (WebCore::Layout::ContinuousContent::nonCollapsibleLogicalWidth const):
1776         (WebCore::Layout::LineBreaker::isContentWrappingAllowed const):
1777         (WebCore::Layout::LineBreaker::shouldKeepEndOfLineWhitespace const):
1778         (WebCore::Layout::LineBreaker::shouldWrapInlineContent):
1779         (WebCore::Layout::LineBreaker::tryWrappingInlineContent const):
1780         (WebCore::Layout::LineBreaker::wrapTextContent const):
1781         (WebCore::Layout::LineBreaker::tryBreakingTextRun const):
1782         (WebCore::Layout::ContinuousContent::ContinuousContent):
1783         (WebCore::Layout::ContinuousContent::hasTextContentOnly const):
1784         (WebCore::Layout::ContinuousContent::isVisuallyEmptyWhitespaceContentOnly const):
1785         (WebCore::Layout::ContinuousContent::firstTextRunIndex const):
1786         (WebCore::Layout::ContinuousContent::lastContentRunIndex const):
1787         (WebCore::Layout::ContinuousContent::hasNonContentRunsOnly const):
1788         (WebCore::Layout::ContinuousContent::size const): Deleted.
1789         (WebCore::Layout::ContinuousContent::width const): Deleted.
1790         (WebCore::Layout::ContinuousContent::nonCollapsibleWidth const): Deleted.
1791         * layout/inlineformatting/InlineLineBreaker.h:
1792         * layout/inlineformatting/InlineLineBuilder.cpp:
1793         (WebCore::Layout::LineBuilder::handleFloatsAndInlineContent):
1794
1795 2020-09-22  Sam Weinig  <weinig@apple.com>
1796
1797         Update User Timing interfaces to User Timing Level 3
1798         https://bugs.webkit.org/show_bug.cgi?id=216787
1799
1800         Reviewed by Alex Christensen.
1801
1802         Adds support for User Timing Level 3 which adds more flexibility in how PerformanceMarks
1803         and PerformanceMeasures are created via synthetic start/end times and associate 'details'
1804         values serialized with events themselves.
1805
1806         Updates results to existing WPT and standalone tests.
1807
1808         * CMakeLists.txt:
1809         * DerivedSources-input.xcfilelist:
1810         * DerivedSources-output.xcfilelist:
1811         * DerivedSources.make:
1812         * Sources.txt:
1813         * WebCore.xcodeproj/project.pbxproj:
1814         Add new files.
1815
1816         * page/Performance.cpp:
1817         (WebCore::Performance::mark):
1818         (WebCore::Performance::clearMarks):
1819         (WebCore::Performance::measure):
1820         (WebCore::Performance::clearMeasures):
1821         * page/Performance.h:
1822         * page/Performance.idl:
1823         Update for new signatures for mark and measure, and rename of UserTiming to PerformanceUserTiming.
1824
1825         * page/PerformanceMark.cpp: Added.
1826         (WebCore::peformanceNow):
1827         (WebCore::PerformanceMark::create):
1828         (WebCore::PerformanceMark::PerformanceMark):
1829         (WebCore::PerformanceMark::detail):
1830         * page/PerformanceMark.h:
1831         * page/PerformanceMark.idl:
1832         Add support for PerformanceMark's constructor `detail` getter. While the spec says to
1833         serialize and the deserialize in the constructor, we only serialize, and delay deserialization
1834         until the first access, which is a non-observable difference. We also utilize [CachedAttribute]
1835         to only ever deserialize once per wrapper world (and also greatly simplify the GC shenanigans).
1836         
1837         * page/PerformanceMarkOptions.h: Added.
1838         * page/PerformanceMarkOptions.idl: Added.
1839         Import and bind PerformanceMarkOptions dictionary to a new struct.
1840         
1841         * page/PerformanceMeasure.cpp: Added.
1842         (WebCore::PerformanceMeasure::create):
1843         (WebCore::PerformanceMeasure::PerformanceMeasure):
1844         (WebCore::PerformanceMeasure::detail):
1845         * page/PerformanceMeasure.h:
1846         * page/PerformanceMeasure.idl:
1847         Like with PerformanceMark, but there is no constructor here, so we only need to handle adding
1848         support for the detail getter.
1849
1850         * page/PerformanceMeasureOptions.h: Added.
1851         * page/PerformanceMeasureOptions.idl: Added.
1852         Import and bind PerformanceMeasureOptions dictionary to a new struct.
1853         
1854         * page/PerformanceUserTiming.cpp:
1855         (WebCore::restrictedMarkNamesToNavigationTimingFunctionMap):
1856         (WebCore::restrictedMarkFunction):
1857         (WebCore::isRestrictedMarkNameNonMainThread):
1858         (WebCore::PerformanceUserTiming::isRestrictedMarkName):
1859         Split up existing map to enable accessing it safely from a worker using conservative
1860         callOnMainThreadAndWait approach, though since the map is immutable after initialization,
1861         we can probably optimize this to allow concurrent querying in the future.
1862
1863         (WebCore::addPerformanceEntry):
1864         Add helper, mirroring clearPerformanceEntries, to add entries.
1865
1866         (WebCore::PerformanceUserTiming::mark):
1867         Matching the spec language, utilize the new PerformanceMark constructor to create
1868         the mark.
1869
1870         (WebCore::PerformanceUserTiming::convertMarkToTimestamp const):
1871         (WebCore::isNonEmptyDictionary):
1872         (WebCore::PerformanceUserTiming::measure):
1873         Implement measure support by dispatching various combinations of arguments to
1874         overloads manually by inspecting the Variant.
1875
1876         * page/PerformanceUserTiming.h:
1877         Renames class from UserTiming to PerformanceUserTiming to match file names.
1878
1879 2020-09-22  Youenn Fablet  <youenn@apple.com>
1880
1881         toRTCIceProtocol should handle ssltcp candidates
1882         https://bugs.webkit.org/show_bug.cgi?id=216762
1883
1884         Reviewed by Darin Adler.
1885
1886         Covered by mock WebRTC backend pushing ssltcp candidates.
1887
1888         * Modules/mediastream/libwebrtc/LibWebRTCUtils.cpp:
1889         (WebCore::toRTCIceProtocol):
1890         * testing/MockLibWebRTCPeerConnection.cpp:
1891
1892 2020-09-21  Adrian Perez de Castro  <aperez@igalia.com>
1893
1894         [GTK] Bump cairo version to support HiDPI
1895         https://bugs.webkit.org/show_bug.cgi?id=133378
1896
1897         Reviewed by Carlos Garcia Campos.
1898
1899         Remove conditional compilation around cairo_{g,s}et_device_scale() as there is no need to
1900         support older versions of Cairo which lack the functions. The minimum version of Cairo
1901         being required by CMake is 1.14.0, which already includes them.
1902
1903         No new tests needed.
1904
1905         * platform/graphics/cairo/BackingStoreBackendCairoImpl.cpp:
1906         (WebCore::createCairoImageSurfaceWithFastMalloc): Use cairo_surface_set_device_scale()
1907         directly.
1908         (WebCore::BackingStoreBackendCairoImpl::scroll): Use cairo_surface_get_device_scale()
1909         directly.
1910         * platform/graphics/cairo/BackingStoreBackendCairoX11.cpp:
1911         (WebCore::BackingStoreBackendCairoX11::BackingStoreBackendCairoX11): Use
1912         cairo_surface_set_device_scale() directly.
1913         (WebCore::BackingStoreBackendCairoX11::scroll): Use cairo_surface_get_device_scale()
1914         directly.
1915         * platform/graphics/cairo/CairoUtilities.cpp: Remove helper functions
1916         cairoSurfaceSetDeviceScale() and cairoSurfaceGetDeviceScale().
1917         * platform/graphics/cairo/CairoUtilities.h: Ditto.
1918
1919 2020-09-21  Tim Horton  <timothy_horton@apple.com>
1920
1921         paper.io ad close buttons cannot be iteracted with via trackpad on iPad
1922         https://bugs.webkit.org/show_bug.cgi?id=216812
1923         <rdar://problem/68738585>
1924
1925         Reviewed by Wenson Hsieh.
1926
1927         * platform/RuntimeApplicationChecks.h:
1928         * platform/cocoa/RuntimeApplicationChecksCocoa.mm:
1929         (WebCore::IOSApplication::isPaperIO):
1930
1931 2020-09-21  Chris Dumez  <cdumez@apple.com>
1932
1933         Value returned by AudioParamTimeline::valuesForTimeRange() is sometimes incorrect for exponential ramps
1934         https://bugs.webkit.org/show_bug.cgi?id=216811
1935
1936         Reviewed by Darin Adler.
1937
1938         AudioParamTimeline::valuesForTimeRangeImpl() always need to return the *last* value since this is
1939         what will be used to update AudioParam::m_value to its latest value. We had a bug in our exponential
1940         ramp processing causing value to be multiplied one extra time.
1941
1942         No new tests, rebaselined existing test.
1943
1944         * Modules/webaudio/AudioParamTimeline.cpp:
1945         (WebCore::AudioParamTimeline::valuesForTimeRangeImpl):
1946
1947 2020-09-21  Chris Dumez  <cdumez@apple.com>
1948
1949         AudioBufferSourceNode should update grain parameters when buffer is set after rendering has started
1950         https://bugs.webkit.org/show_bug.cgi?id=216808
1951
1952         Reviewed by Eric Carlson.
1953
1954         AudioBufferSourceNode should update grain parameters when buffer is set after rendering has
1955         started. The grain parameters need to be adjusted so that they make sense given the buffer
1956         length. Previously, we would only update grain parameters in AudioBufferSourceNode::startPlaying(),
1957         when a buffer is set. We would fail to update those grain parameters when the buffer is set,
1958         in setBuffer(), if startPlaying() has already been called.
1959
1960         No new tests, rebaselined existing test.
1961
1962         * Modules/webaudio/AudioBufferSourceNode.cpp:
1963         (WebCore::AudioBufferSourceNode::setBuffer):
1964         (WebCore::AudioBufferSourceNode::startLater):
1965         (WebCore::AudioBufferSourceNode::startPlaying):
1966         (WebCore::AudioBufferSourceNode::updateGrainParameters):
1967         * Modules/webaudio/AudioBufferSourceNode.h:
1968
1969 2020-09-21  Chris Dumez  <cdumez@apple.com>
1970
1971         Values returned by FFTFrame::doFFT() are twice as large as they should be
1972         https://bugs.webkit.org/show_bug.cgi?id=216781
1973
1974         Reviewed by Darin Adler.
1975
1976         To provide the best possible execution speeds, the vDSP library's functions don't always adhere strictly
1977         to textbook formulas for Fourier transforms, and must be scaled accordingly [1].
1978
1979         In the case of a Real forward Transform like in FFTFrame::doFFT(): RFimp = RFmath * 2 so we need to
1980         divide the output by 2 to get the correct value. We were failing to do this scaling and this was causing
1981         AnalyserNode tests to fail.
1982
1983         [1] See https://developer.apple.com/library/archive/documentation/Performance/Conceptual/vDSP_Programming_Guide/UsingFourierTransforms/UsingFourierTransforms.html#//apple_ref/doc/uid/TP40005147-CH3-SW5
1984
1985         No new tests, rebaselined existing tests.
1986
1987         * Modules/webaudio/PeriodicWave.cpp:
1988         (WebCore::PeriodicWave::createBandLimitedTables):
1989         Update normalization factor now that FFTFrame::doInverseFFT() has been fixed. The new normalization factor
1990         matches the value used by blink at:
1991         - https://github.com/chromium/chromium/blob/master/third_party/blink/renderer/modules/webaudio/periodic_wave.cc
1992
1993         * platform/audio/FFTFrame.cpp:
1994         (WebCore::FFTFrame::multiply):
1995         We were applying a 0.5 scaling factor to the output of vDSP_zvmul(). However, the documentation for vDSP_zvmul()
1996         does not indicate that its output is twice as large as expected. Odds are that this was done because we used
1997         to have a bug in FFTFrame::doFFT() that was returning values twice as large as expected. SInce this function
1998         relies on VectorMath, there is no need for its implementation to be platform-specific.
1999
2000         * platform/audio/FFTFrameStub.cpp:
2001         * platform/audio/gstreamer/FFTFrameGStreamer.cpp:
2002         (WebCore::FFTFrame::doFFT):
2003         (WebCore::FFTFrame::doInverseFFT):
2004         Drop 2 factor in the GStreamer implementation that was added to try and be consistent with the incorrect Mac
2005         implementation.
2006
2007         * platform/audio/mac/FFTFrameMac.cpp:
2008         (WebCore::FFTFrame::doFFT):
2009         Fix issue where the values returned by doFFT() were twice as large as expected due to the odd behavior of
2010         vDSP_fft_zrip().
2011
2012         (WebCore::FFTFrame::doInverseFFT):
2013         Drop 2 factor in doInverseFFT that was added because the output of doFFT() was twice as large as expected
2014         and we wanted x == InverseFFT(FFT(x)).
2015
2016 2020-09-21  Wenson Hsieh  <wenson_hsieh@apple.com>
2017
2018         [GPU Process] Several tests in canvas/philip/tests are failing with text diffs
2019         https://bugs.webkit.org/show_bug.cgi?id=216800
2020
2021         Reviewed by Darin Adler.
2022
2023         When using the GPU process to render canvas elements, we currently fail the 7 tests in `canvas/philip/tests`
2024         below, due to gradient and pattern fill/stroke styles lingering on the 2D graphics context state after a fill or
2025         stroke color is set, respectively.
2026
2027         This happens when:
2028         1. The fill color is set to a color `C`.
2029         2. A fill pattern or gradient is applied.
2030         3. The fill color is set to the color `C` again.
2031
2032         In this case, after step (2), we propagate a graphics context state change indicating that the fill pattern has
2033         changed, but we leave the fill color unchanged (i.e., it remains equal to `C`). In step (3), we then set the
2034         fill color to `C` again, which doesn't propagate a state change to the GPU process, since the fill color is the
2035         same (`C`). As such, the state in the GPU process keeps its fill gradient, and we end up filling with this old
2036         gradient instead of the fill color `C`.
2037
2038         To fix this, we simply revert `fillColor` and `strokeColor` to the invalid color when setting a gradient or
2039         pattern in the same way that we currently clear out the fill/stroke gradient and pattern when setting a fill/
2040         stroke color, which ensures that a state change will be sent to the GPU process during step (3).
2041
2042         Fixes the following canvas-related layout tests when using the GPU process:
2043         - canvas/philip/tests/2d.gradient.radial.cone.shape2.html
2044         - canvas/philip/tests/2d.pattern.basic.nocontext.html
2045         - canvas/philip/tests/2d.pattern.paint.norepeat.coord3.html
2046         - canvas/philip/tests/2d.pattern.paint.repeatx.coord1.html
2047         - canvas/philip/tests/2d.pattern.paint.repeatx.outside.html
2048         - canvas/philip/tests/2d.pattern.paint.repeaty.coord1.html
2049         - canvas/philip/tests/2d.pattern.paint.repeaty.outside.html
2050
2051         The entire canvas/ directory is currently skipped when enabling the GPU process for canvas rendering, but once
2052         we're down to a smaller number of failures, I intend to unskip these directories for GPU process, and
2053         individually track any remaining test failures.
2054
2055         * platform/graphics/GraphicsContext.cpp:
2056         (WebCore::GraphicsContext::setStrokePattern):
2057         (WebCore::GraphicsContext::setFillPattern):
2058         (WebCore::GraphicsContext::setStrokeGradient):
2059         (WebCore::GraphicsContext::setFillGradient):
2060
2061 2020-09-21  Chris Dumez  <cdumez@apple.com>
2062
2063         Properly handle AudioParam.setTargetAtTime() followed by a ramp
2064         https://bugs.webkit.org/show_bug.cgi?id=216804
2065
2066         Reviewed by Darin Adler.
2067
2068         Properly handle AudioParam.setTargetAtTime() followed by a ramp:
2069         - https://www.w3.org/TR/webaudio/#dom-audioparam-settargetattime
2070         - https://www.w3.org/TR/webaudio/#dom-audioparam-linearramptovalueattime
2071         - https://www.w3.org/TR/webaudio/#dom-audioparam-exponentialramptovalueattime
2072
2073         This is a merge of the following Blink change:
2074         - https://codereview.chromium.org/1485003002
2075
2076         No new tests, rebaselined existing test.
2077
2078         * Modules/webaudio/AudioParamTimeline.cpp:
2079         (WebCore::AudioParamTimeline::valuesForTimeRangeImpl):
2080         (WebCore::AudioParamTimeline::processSetTargetFollowedByRamp):
2081         * Modules/webaudio/AudioParamTimeline.h:
2082
2083 2020-09-21  Antoine Quint  <graouts@webkit.org>
2084
2085         Remove unused NodeFlag::HasCSSAnimation
2086         https://bugs.webkit.org/show_bug.cgi?id=216785
2087
2088         Reviewed by Antti Koivisto.
2089
2090         * dom/Element.h:
2091         (WebCore::Element::hasCSSAnimation const): Deleted.
2092         (WebCore::Element::setHasCSSAnimation): Deleted.
2093         (WebCore::Element::clearHasCSSAnimation): Deleted.
2094         * dom/Node.h:
2095
2096 2020-09-21  Chris Dumez  <cdumez@apple.com>
2097
2098         Throw when AudioConnect::connect() is called for an output that has no channels
2099         https://bugs.webkit.org/show_bug.cgi?id=216802
2100
2101         Reviewed by Darin Adler.
2102
2103         Throw when AudioConnect::connect() is called for an output that has no channels, for consistency
2104         with Blink. The ScriptProcessorNode cannot have an output node that has zero channels.
2105
2106         No new tests, rebaselined existing tests.
2107
2108         * Modules/webaudio/AudioNode.cpp:
2109         (WebCore::AudioNode::connect):
2110
2111 2020-09-21  Yusuke Suzuki  <ysuzuki@apple.com>
2112
2113         [JSC] BigInt should work with Map / Set
2114         https://bugs.webkit.org/show_bug.cgi?id=216667
2115         <rdar://problem/69107221>
2116
2117         Reviewed by Robin Morisset.
2118
2119         Strongly ensure that BigInt32 is always selected since Map / Set could use it as a key.
2120
2121         * bindings/js/SerializedScriptValue.cpp:
2122         (WebCore::CloneDeserializer::readBigInt):
2123
2124 2020-09-21  Peng Liu  <peng.liu6@apple.com>
2125
2126         Tapping to zoom in and out causes video to become very small on some iPhone models
2127         https://bugs.webkit.org/show_bug.cgi?id=216635
2128
2129         Reviewed by Jer Noble.
2130
2131         * platform/ios/VideoFullscreenInterfaceAVKit.mm:
2132         (-[WebAVPlayerLayer resolveBounds]): On some iPhone models, AVKit does not
2133         change "bounds" of WebAVPlayerLayer after changing its video gravity. Therefore,
2134         in this function, "modelVideoLayerFrame" and "bounds" might be the same. But we
2135         still need to update the video layer frame in the Web process.
2136
2137         (-[WebAVPlayerLayer setVideoGravity:]): On some iPhone models, AVKit does
2138         not call -[WebAVPlayerLayer:layoutSublayers] immediately after changing
2139         the video gravity. Forcing a layout can fix that.
2140
2141 2020-09-21  Jiewen Tan  <jiewen_tan@apple.com>
2142
2143         [WebAuthn] Don't set the UV option if the authenticator doesn't support it
2144         https://bugs.webkit.org/show_bug.cgi?id=215836
2145         <rdar://problem/67817359>
2146
2147         Reviewed by Darin Adler.
2148
2149         Covered by new API tests.
2150
2151         UV in the the CTAP 2.0 spec only means internal UV:
2152         https://fidoalliance.org/specs/fido-v2.0-ps-20190130/fido-client-to-authenticator-protocol-v2.0-ps-20190130.html#authenticatorGetInfo
2153
2154         If an authenticator supports ClientPin, it can set the uv bit in the responses to true but it
2155         will not advertise itself supporting internal UV, which is the uv in the options.
2156         https://fidoalliance.org/specs/fido-v2.0-ps-20190130/fido-client-to-authenticator-protocol-v2.0-ps-20190130.html#authenticatorMakeCredential
2157
2158         Hence, setting it to true could result in error if the authenticator doesn't support internal UV even if it supports ClientPin.
2159         It's not a way to ask the authenticator to set the uv bit in the response.
2160
2161         * Modules/webauthn/fido/DeviceRequestConverter.cpp:
2162         (fido::encodeMakeCredenitalRequestAsCBOR):
2163         (fido::encodeGetAssertionRequestAsCBOR):
2164
2165 2020-09-21  Chris Dumez  <cdumez@apple.com>
2166
2167         AudioParam.exponentialRampToValueAtTime() does not properly deal with negative values
2168         https://bugs.webkit.org/show_bug.cgi?id=216790
2169
2170         Reviewed by Eric Carlson.
2171
2172         AudioParam.exponentialRampToValueAtTime() does not properly deal with negative values.
2173         The specification [1] says:
2174         "If V0 and V1 have opposite signs or if V0 is zero, then v(t) = V0 for T0 <= t < T1."
2175
2176         Our implementation did not match the specification and would just special-case if either
2177         V0 or V1 was negative.
2178
2179         [1] https://www.w3.org/TR/webaudio/#dom-audioparam-exponentialramptovalueattime
2180
2181         No new tests, rebaselined existing test.
2182
2183         * Modules/webaudio/AudioParamTimeline.cpp:
2184         (WebCore::AudioParamTimeline::valuesForTimeRangeImpl):
2185
2186 2020-09-21  Youenn Fablet  <youenn@apple.com>
2187
2188         [iOS] MediaRecorder incorrect screen orientation handling
2189         https://bugs.webkit.org/show_bug.cgi?id=198912
2190         <rdar://problem/51802521>
2191
2192         Reviewed by Eric Carlson.
2193
2194         Update MediaRecorderPrivateWriterCocoa to pass a MediaSample down to handle rotation.
2195         Set AVAssetWriterInput transform according the first MediaSample rotation value.
2196
2197         Test: http/wpt/mediarecorder/video-rotation.html
2198
2199         * platform/mediarecorder/MediaRecorderPrivateAVFImpl.cpp:
2200         (WebCore::MediaRecorderPrivateAVFImpl::videoSampleAvailable):
2201         * platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.h:
2202         * platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.mm:
2203         (WebCore::MediaRecorderPrivateWriter::appendVideoSampleBuffer):
2204
2205 2020-09-21  Keith Miller  <keith_miller@apple.com>
2206
2207         Functions should consistently enumerate length before name
2208         https://bugs.webkit.org/show_bug.cgi?id=216789
2209
2210         Reviewed by Yusuke Suzuki.
2211
2212         RuntimeMethod inherits from InternalFunction which now sets length by default.
2213         RuntimeMethod intercepts length in getOwnPropertySlot so the value we pick
2214         doesn't actually matter. Technically, this uses a little extra memory but
2215         that's not too big of a deal because RuntimeMethod's are rare (and I believe
2216         deprecated).
2217
2218         * bridge/runtime_method.cpp:
2219         (JSC::RuntimeMethod::finishCreation):
2220
2221 2020-09-20  Darin Adler  <darin@apple.com>
2222
2223         Next step towards eliminating deprecated legacy positions
2224         https://bugs.webkit.org/show_bug.cgi?id=216751
2225
2226         Reviewed by Sam Weinig.
2227
2228         Eliminating our old deprecated legacy editing positions is probably a relatively long
2229         road. This next step starts using the makeContainerOffsetPosition function in more
2230         places, requesting that we not use any of the deprecated legacy position logic. Also
2231         renames createLegacyEditingPosition to makeDeprecatedLegacyPosition. The hard part of
2232         this project will be removing code that is not inside Position that depends on the old
2233         style of position/offset pairs. For this patch, tried to stick to converting cases
2234         where it seems clear we don't depend on the legacy behavior. Flaw in that is that we
2235         might still depend on legacy behavior where it's unconditionally implemented, without
2236         checking the flag on the m_isLegacyEditingPosition Position class; that will be a
2237         problem long term, should not be in this patch.
2238
2239         * dom/Position.h:
2240         (WebCore::createLegacyEditingPosition): Deleted.
2241
2242         * accessibility/AXObjectCache.cpp:
2243         (WebCore::AXObjectCache::visiblePositionForTextMarkerData):
2244         (WebCore::AXObjectCache::rangeMatchesTextNearRange):
2245         (WebCore::AXObjectCache::visiblePositionFromCharacterOffset):
2246         (WebCore::AXObjectCache::localCaretRectForCharacterOffset):
2247         (WebCore::AXObjectCache::indexForCharacterOffset):
2248         * accessibility/AccessibilityObject.cpp:
2249         (WebCore::AccessibilityObject::stringForRange const):
2250         * accessibility/AccessibilityRenderObject.cpp:
2251         (WebCore::AccessibilityRenderObject::linkClickPoint):
2252         (WebCore::AccessibilityRenderObject::setSelectedTextRange):
2253         (WebCore::AccessibilityRenderObject::setSelectedVisiblePositionRange const):
2254         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
2255         (-[WebAccessibilityObjectWrapper arrayOfTextForTextMarkers:attributed:]):
2256         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
2257         (-[WebAccessibilityObjectWrapper doAXAttributedStringForTextMarkerRange:spellCheck:]):
2258         * dom/Position.cpp:
2259         (WebCore::Position::previous const):
2260         (WebCore::Position::next const):
2261         (WebCore::Position::downstream const):
2262         * dom/PositionIterator.cpp:
2263         (WebCore::PositionIterator::operator Position const):
2264         * dom/Range.cpp:
2265         (WebCore::Range::expand):
2266         * editing/AlternativeTextController.cpp:
2267         (WebCore::AlternativeTextController::applyAutocorrectionBeforeTypingIfAppropriate):
2268         (WebCore::AlternativeTextController::processMarkersOnTextToBeReplacedByResult):
2269         (WebCore::AlternativeTextController::applyAlternativeTextToRange):
2270         * editing/ApplyStyleCommand.cpp:
2271         (WebCore::ApplyStyleCommand::applyBlockStyle):
2272         * editing/CompositeEditCommand.cpp:
2273         (WebCore::CompositeEditCommand::moveParagraphs):
2274         * editing/DeleteSelectionCommand.cpp:
2275         (WebCore::DeleteSelectionCommand::handleGeneralDelete):
2276         * editing/Editing.cpp:
2277         (WebCore::visiblePositionForIndex):
2278         (WebCore::visiblePositionForIndexUsingCharacterIterator):
2279         (WebCore::isNodeVisiblyContainedWithin):
2280         * editing/Editor.cpp:
2281         (WebCore::Editor::canDeleteRange const):
2282         (WebCore::Editor::selectComposition):
2283         (WebCore::Editor::advanceToNextMisspelling):
2284         (WebCore::Editor::markAndReplaceFor):
2285         (WebCore::Editor::firstRectForRange const):
2286         (WebCore::extendSelection):
2287         (WebCore::Editor::adjustedSelectionRange):
2288         * editing/FrameSelection.cpp:
2289         (WebCore::FrameSelection::elementRangeContainingCaretSelection const):
2290         * editing/InsertListCommand.cpp:
2291         (WebCore::InsertListCommand::doApplyForSingleParagraph):
2292         * editing/RenderedPosition.cpp:
2293         (WebCore::RenderedPosition::positionAtLeftBoundaryOfBiDiRun const):
2294         (WebCore::RenderedPosition::positionAtRightBoundaryOfBiDiRun const):
2295         * editing/TextCheckingHelper.cpp:
2296         (WebCore::expandToParagraphBoundary):
2297         (WebCore::TextCheckingParagraph::expandRangeToNextEnd):
2298         (WebCore::TextCheckingHelper::findFirstMisspelledWordOrUngrammaticalPhrase const):
2299         * editing/TextIterator.cpp:
2300         (WebCore::resolveCharacterRange):
2301         * editing/VisiblePosition.cpp:
2302         (WebCore::VisiblePosition::leftVisuallyDistinctCandidate const):
2303         (WebCore::VisiblePosition::rightVisuallyDistinctCandidate const):
2304         * editing/VisibleSelection.cpp:
2305         (WebCore::VisibleSelection::appendTrailingWhitespace):
2306         * editing/VisibleUnits.cpp:
2307         (WebCore::previousRootInlineBoxCandidatePosition):
2308         (WebCore::nextRootInlineBoxCandidatePosition):
2309         (WebCore::previousBoundary):
2310         (WebCore::nextBoundary):
2311         (WebCore::startOfDocument):
2312         (WebCore::endOfDocument):
2313         (WebCore::closestWordBoundaryForPosition):
2314         (WebCore::wordBoundaryForPositionWithoutCrossingLine):
2315         * editing/cocoa/HTMLConverter.mm:
2316         (HTMLConverter::HTMLConverter):
2317         * editing/ios/EditorIOS.mm:
2318         (WebCore::Editor::setTextAsChildOfElement):
2319         * editing/markup.cpp:
2320         (WebCore::serializePreservingVisualAppearance):
2321         (WebCore::contextPreservesNewline):
2322         (WebCore::createFragmentFromText):
2323         * page/DragController.cpp:
2324         (WebCore::DragController::insertDroppedImagePlaceholdersAtCaret):
2325         * page/Page.cpp:
2326         (WebCore::Page::replaceRangesWithText):
2327         * page/ios/FrameIOS.mm:
2328         (WebCore::Frame::interpretationsForCurrentRoot const):
2329         * platform/DragImage.cpp:
2330         (WebCore::createDragImageForRange):
2331         * rendering/RenderBlockFlow.cpp:
2332         (WebCore::RenderBlockFlow::positionForBox const):
2333         * rendering/RenderObject.cpp:
2334         (WebCore::RenderObject::createVisiblePosition const):
2335         (WebCore::RenderObject::collectSelectionRectsInternal):
2336         * testing/Internals.cpp:
2337         (WebCore::Internals::setSelectionWithoutValidation):
2338         Replaced calls to createLegacyEditingPosition with calls to
2339         makeDeprecatedLegacyPosition or makeContainerOffsetPosition.
2340
2341 2020-09-20  Darin Adler  <darin@apple.com>
2342
2343         Selection API: A few more refinements to DOMSelection and VisibleSelection to pass all WPT tests
2344         https://bugs.webkit.org/show_bug.cgi?id=216756
2345
2346         Reviewed by Ryosuke Niwa.
2347
2348         After these changes, we pass all the tests in imported/w3c/web-platform-tests/selection
2349         with no failures except for one due to the rules about absorbing newlines at the start
2350         and end <style> and <script> elements.
2351
2352         However, that's with the live selection range feature enabled, and there are likely issues
2353         with other tests in that mode, so that testing still needs to be done. Then we also have to
2354         decide how we are going to deal with the compatibility risk of changing the behavior to
2355         match the standard.
2356
2357         * editing/VisibleSelection.cpp:
2358         (WebCore::VisibleSelection::VisibleSelection): Updated to rename m_baseIsFirst to
2359         m_anchorIsFirst. Not required for the fix, but helpful for clarity.
2360         (WebCore::VisibleSelection::uncanonicalizedStart const): Ditto.
2361         (WebCore::VisibleSelection::uncanonicalizedEnd const): Ditto.
2362         (WebCore::VisibleSelection::setBaseAndExtentToDeepEquivalents): Compute whether
2363         the anchor is first *before* canonicalization, otherwise we will reverse the two
2364         if their canonical values are equal. Canonicalization is not allowed to change
2365         the ordering other than making two values equal.
2366         (WebCore::VisibleSelection::validate): Updated for name.
2367         (WebCore::VisibleSelection::setWithoutValidation): Ditto, also tweaked other names in the
2368         function and removed an if statement.
2369         (WebCore::VisibleSelection::adjustSelectionToAvoidCrossingShadowBoundaries): Ditto.
2370         (WebCore::VisibleSelection::adjustSelectionToAvoidCrossingEditingBoundaries): Ditto.
2371
2372         * editing/VisibleSelection.h: Renamed m_baseIsFirst to m_anchorIsFirst and improved the
2373         comment about m_isDirectional.
2374
2375         * page/DOMSelection.cpp:
2376         (WebCore::DOMSelection::anchorPosition const): Removed use of parentAnchoredEquivalent.
2377         The name makes it sound like it would be useful, but really it just triggers some
2378         editing behaviors that don't belong in Position code.
2379         (WebCore::DOMSelection::focusPosition const): Ditto.
2380         (WebCore::DOMSelection::basePosition const): Ditto.
2381         (WebCore::DOMSelection::extentPosition const): Ditto.
2382         (WebCore::DOMSelection::collapse): Reversed the order of the document check and the
2383         check for invalid nodes and offsets. There are some inconsistencies between the
2384         specification and WPT but for now matching WPT seems like the way to go.
2385         (WebCore::DOMSelection::setBaseAndExtent): Ditto.
2386         (WebCore::DOMSelection::extend): Use VisibleSelection::setExtent, which does exactly
2387         what we want, rather than FrameSelection::setExtent, which does not. In the future
2388         we may want to cut down on the number of subtly-different selection functions,
2389         like these two, but for now this fixes this DOM method to work as specified.
2390
2391 2020-09-21  Chris Dumez  <cdumez@apple.com>
2392
2393         Remove emphasis/de-emphasis filters from DynamicsCompressor
2394         https://bugs.webkit.org/show_bug.cgi?id=216796
2395
2396         Reviewed by Darin Adler.
2397
2398         Remove emphasis/de-emphasis filters from DynamicsCompressor as these have been removed
2399         from the specification.
2400
2401         This is a merge of the following Blink change:
2402         - https://codereview.chromium.org/152333003 
2403
2404         No new tests, rebaselined existing tests.
2405
2406         * platform/audio/DynamicsCompressor.cpp:
2407         (WebCore::DynamicsCompressor::DynamicsCompressor):
2408         (WebCore::DynamicsCompressor::process):
2409         (WebCore::DynamicsCompressor::reset):
2410         (WebCore::DynamicsCompressor::setNumberOfChannels):
2411         * platform/audio/DynamicsCompressor.h:
2412         * platform/audio/DynamicsCompressorKernel.cpp:
2413         (WebCore::DynamicsCompressorKernel::process):
2414         (WebCore::DynamicsCompressorKernel::tailTime const):
2415         * platform/audio/DynamicsCompressorKernel.h:
2416
2417 2020-09-21  Chris Dumez  <cdumez@apple.com>
2418
2419         Vectorize linearRampToValueAtTime processing in AudioParamTimeline
2420         https://bugs.webkit.org/show_bug.cgi?id=216788
2421
2422         Reviewed by Darin Adler.
2423
2424         Vectorize linearRampToValueAtTime processing in AudioParamTimeline. This patch is based on
2425         the Blink implementation at [1] but updated to use VectorMath to work on more platforms.
2426
2427         We were failing some tests due to precision issues in our linearRampToValueAtTime implementation.
2428         Those tests are now passing since our implementation matches Blink's more closely.
2429
2430         [1] https://github.com/chromium/chromium/blob/master/third_party/blink/renderer/modules/webaudio/audio_param_timeline.cc
2431
2432         No new tests, rebaselined existing tests.
2433
2434         * Modules/webaudio/AudioParamTimeline.cpp:
2435         (WebCore::AudioParamTimeline::valuesForTimeRangeImpl):
2436         (WebCore::AudioParamTimeline::processLinearRamp):
2437         * Modules/webaudio/AudioParamTimeline.h:
2438
2439 2020-09-21  Chris Dumez  <cdumez@apple.com>
2440
2441         AnalyserNode's getByteFrequencyData() / getFloatFrequencyData() should only do FFT analysis once per render quantum
2442         https://bugs.webkit.org/show_bug.cgi?id=216735
2443
2444         Reviewed by Darin Adler.
2445
2446         AnalyserNode's getByteFrequencyData() / getFloatFrequencyData() should only do FFT analysis once per render quantum:
2447         - https://www.w3.org/TR/webaudio/#dom-analysernode-getbytefrequencydata
2448
2449         """
2450         If another call to getByteFrequencyData() or getFloatFrequencyData() occurs within the same render quantum as a
2451         previous call, the current frequency data is not updated with the same data. Instead, the previously computed data
2452         is returned.
2453         """
2454
2455         No new tests, rebaselined existing test.
2456
2457         * Modules/webaudio/RealtimeAnalyser.cpp:
2458         (WebCore::RealtimeAnalyser::writeInput):
2459         (WebCore::RealtimeAnalyser::doFFTAnalysisIfNecessary):
2460         (WebCore::RealtimeAnalyser::getFloatFrequencyData):
2461         (WebCore::RealtimeAnalyser::getByteFrequencyData):
2462         * Modules/webaudio/RealtimeAnalyser.h:
2463
2464 2020-09-21  Antoine Quint  <graouts@webkit.org>
2465
2466         Remove dedicated HashSet<Element*> for DocumentTimeline::runningAnimationsForElementAreAllAccelerated()
2467         https://bugs.webkit.org/show_bug.cgi?id=216775
2468
2469         Reviewed by Antti Koivisto.
2470
2471         * animation/AnimationTimeline.h:
2472         * animation/DocumentTimeline.cpp:
2473         (WebCore::DocumentTimeline::detachFromDocument):
2474         (WebCore::DocumentTimeline::animationAcceleratedRunningStateDidChange):
2475         (WebCore::DocumentTimeline::runningAnimationsForElementAreAllAccelerated const):
2476         (WebCore::DocumentTimeline::animationWasAddedToElement): Deleted.
2477         (WebCore::DocumentTimeline::animationWasRemovedFromElement): Deleted.
2478         (WebCore::DocumentTimeline::updateListOfElementsWithRunningAcceleratedAnimationsForElement): Deleted.
2479         * animation/DocumentTimeline.h:
2480
2481 2020-09-21  Chris Dumez  <cdumez@apple.com>
2482
2483         AnalyserNode should downmix input audio to mono
2484         https://bugs.webkit.org/show_bug.cgi?id=216736
2485
2486         Reviewed by Sam Weinig.
2487
2488         AnalyserNode should downmix input audio to mono:
2489         - https://www.w3.org/TR/webaudio/#current-time-domain-data
2490
2491         This patch is based on the following Blink change:
2492         - https://codereview.chromium.org/1803233002
2493
2494         No new tests, rebaselined existing test.
2495
2496         * Modules/webaudio/RealtimeAnalyser.cpp:
2497         (WebCore::RealtimeAnalyser::RealtimeAnalyser):
2498         (WebCore::RealtimeAnalyser::writeInput):
2499         * Modules/webaudio/RealtimeAnalyser.h:
2500
2501 2020-09-21  Wenson Hsieh  <wenson_hsieh@apple.com>
2502
2503         REGRESSION (r257839): Can't add a memo when transferring funds in First Tech Credit Union App
2504         https://bugs.webkit.org/show_bug.cgi?id=216754
2505         <rdar://problem/67045862>
2506
2507         Reviewed by Antti Koivisto.
2508
2509         After r257839, attempting to add a memo by tapping on a text box in the First Tech Credit Union app on iOS fails
2510         to cause the text box (a `textarea` element) to be focused. This is because the `textarea` is initially hidden
2511         away in a `display: none;` parent container, which becomes `display: block;` immediately before `focus()` is
2512         called from the page's script.
2513
2514         Augment the mechanism added in r266887, so that we avoid consulting stale computed styles when checking for
2515         hidden ancestors in `Element::isVisibleWithoutResolvingFullStyle()`. To do this, we pull logic to get or compute
2516         the `RenderStyle` for the current element or one of its composed ancestors (which respects
2517         `IsComputedStyleInvalidFlag`) into a lambda function, and use this lambda function below, when we walk up the
2518         ancestor chain in search of a hidden element.
2519
2520         Note that in Speedometer 2.0, this change does not have any significant impact on the number of partial (i.e.
2521         `RenderedOnly`) style resolutions we attempt to perform underneath `Element::resolveComputedStyle` (a little
2522         over 3000 before and after this change).
2523
2524         Test: fast/forms/programmatic-focus-after-displaying-parent.html
2525
2526         * dom/Element.cpp:
2527         (WebCore::Element::isVisibleWithoutResolvingFullStyle const):
2528
2529 2020-09-21  Zalan Bujtas  <zalan@apple.com>
2530
2531         [LFC][BFC] Move hasClearance out of BoxGeometry
2532         https://bugs.webkit.org/show_bug.cgi?id=216757
2533
2534         Reviewed by Antti Koivisto.
2535
2536         Do not cache the hasClearance state in BoxGeometry.
2537
2538         * layout/blockformatting/BlockFormattingContext.cpp:
2539         (WebCore::Layout::BlockFormattingContext::computeVerticalPositionForFloatClear):
2540         (WebCore::Layout::BlockFormattingContext::verticalPositionWithMargin const):
2541         * layout/blockformatting/BlockFormattingState.h:
2542         (WebCore::Layout::BlockFormattingState::setHasClearance):
2543         (WebCore::Layout::BlockFormattingState::clearClearance):
2544         (WebCore::Layout::BlockFormattingState::hasClearance const):
2545         * layout/blockformatting/BlockMarginCollapse.cpp:
2546         (WebCore::Layout::BlockFormattingContext::MarginCollapse::hasClearance const):
2547         * layout/layouttree/LayoutBoxGeometry.cpp:
2548         (WebCore::Layout::BoxGeometry::BoxGeometry):
2549         * layout/layouttree/LayoutBoxGeometry.h:
2550         (WebCore::Layout::BoxGeometry::hasClearance const): Deleted.
2551         (WebCore::Layout::BoxGeometry::setHasClearance): Deleted.
2552
2553 2020-09-21  Zalan Bujtas  <zalan@apple.com>
2554
2555         [LFC] Remove unused EscapeReason::StrokeOverflowNeedsViewportGeometry
2556         https://bugs.webkit.org/show_bug.cgi?id=216759
2557
2558         Reviewed by Antti Koivisto.
2559
2560         This escape reason was used to read ICB geometry to compute ink overflow (prior to r267325).
2561
2562         * layout/FormattingContext.cpp:
2563         (WebCore::Layout::FormattingContext::geometryForBox const):
2564         * layout/FormattingContext.h:
2565
2566 2020-09-21  Zalan Bujtas  <zalan@apple.com>
2567
2568         [LFC][MarginCollapse] The block level box passed in to MarginCollapse::positiveNegativeValues is in the current formatting context
2569         https://bugs.webkit.org/show_bug.cgi?id=216758
2570
2571         Reviewed by Antti Koivisto.
2572
2573         Let's use the current formatting state when grabbing vertical margin values.
2574
2575         * layout/blockformatting/BlockMarginCollapse.cpp:
2576         (WebCore::Layout::BlockFormattingContext::MarginCollapse::positiveNegativeValues const):
2577
2578 2020-09-21  Philippe Normand  <pnormand@igalia.com>
2579
2580         [GStreamer] media/media-can-play-mp3.html fails
2581         https://bugs.webkit.org/show_bug.cgi?id=216692
2582
2583         Reviewed by Darin Adler.
2584
2585         Add mp3 to supported codecs map when a valid decoder has been
2586         found by the GStreamer registry scanner.
2587
2588         * platform/graphics/gstreamer/GStreamerRegistryScanner.cpp:
2589         (WebCore::GStreamerRegistryScanner::initialize):
2590
2591 2020-09-20  Sam Weinig  <weinig@apple.com>
2592
2593         Performance.navigation and Performance.timing are incorrectly exposed to workers
2594         https://bugs.webkit.org/show_bug.cgi?id=216732
2595
2596         Reviewed by Simon Fraser.
2597
2598         * page/Performance.idl:
2599         Only expose Performance.navigation and Performance.timing to the Window.
2600
2601 2020-09-20  Sam Weinig  <weinig@apple.com>
2602
2603         Using [Exposed=Window] with [Default] object toJSON() doesn't work
2604         https://bugs.webkit.org/show_bug.cgi?id=216731
2605
2606         Reviewed by Simon Fraser.
2607
2608         Fixes filtering an attribute out of [Default] toJSON operation based
2609         on which which global objects it is exposed to by ensuring we always
2610         pass a global object pointer accessor function to 
2611         GenerateRuntimeEnableConditionalStringForExposed. For good measure,
2612         we now always pass the global object object pointer to 
2613         GenerateRuntimeEnableConditionalString as well so that it is always
2614         explicit.
2615         
2616         This is needed to support filtering out Performance.navigation and
2617         Performance.timing from the Performance interface's toJSON implementation
2618         which will be addressed in a separate change.
2619  
2620         * bindings/scripts/CodeGeneratorJS.pm:
2621         (GenerateRuntimeEnableConditionalStringForExposed):
2622         (GenerateRuntimeEnableConditionalString):
2623         Remove implicit global object accessor string construction by always
2624         requiring it to be passed.
2625
2626         * bindings/scripts/test/DOMWindowConstructors.idl:
2627         * bindings/scripts/test/JS/JSDOMWindow.cpp:
2628         * bindings/scripts/test/JS/JSTestDefaultToJSONFilteredByExposed.cpp: Added.
2629         * bindings/scripts/test/JS/JSTestDefaultToJSONFilteredByExposed.h: Added.
2630         * bindings/scripts/test/JS/JSWorkerGlobalScope.cpp:
2631         * bindings/scripts/test/SupplementalDependencies.dep:
2632         * bindings/scripts/test/TestDefaultToJSONFilteredByExposed.idl: Added.
2633         * bindings/scripts/test/WorkerGlobalScopeConstructors.idl:
2634         Add new test for updated behavior. I couldn't add it to the existing
2635         TestDefaultToJSON.idl test as that test requires the interface only be exposed
2636         to Window to support testing EnabledBySetting.
2637
2638 2020-09-20  Darin Adler  <darin@apple.com>
2639
2640         Selection API: Further improvements to VisibleSelection, FrameSelection, and DOMSelection to preserve anchor and focus
2641         https://bugs.webkit.org/show_bug.cgi?id=216739
2642
2643         Reviewed by Ryosuke Niwa.
2644
2645         If done correctly, these changes should have almost no effect unless live range selection
2646         is enabled. This adds a feature where VisibleSelection tracks the original points,
2647         before the VisiblePosition-style canonicalization. It also starts a transition from
2648         the base/extent terminology to the slightly-easier-to-understand anchor/focus terminology
2649         that is used in the selection specification. New functions name them anchor and focus,
2650         even though we still have some old ones that call them base and extent. In addition,
2651         made some other small related improvements to live range selection mode, without changing
2652         behavior when not in that mode. Have been testing these locally by turning on that mode
2653         and running various tests.
2654
2655         * editing/FrameSelection.cpp:
2656         (WebCore::FrameSelection::isInDocumentTree const): Added. Used by DOMSelection to
2657         correctly handle cases where the selection is in a shadow tree without requiring it
2658         actually create the associated live range just to query.
2659         (WebCore::FrameSelection::associatedLiveRange): Use the new VisibleSelection::range,
2660         which gives us non-canonicalized points, rather than the deprecated
2661         VisibleSelection::firstRange, which we will eventually be renaming or deleting.
2662         (WebCore::FrameSelection::updateFromAssociatedLiveRange): Use
2663         makeContainerOffsetPosition instead of implicitly using makeDeprecatedLegacyPosition.
2664         Also removed the FIXME about normalization of endpoints, which is what this patch
2665         mostly addresses; no need to track with a comment now.
2666         (WebCore::FrameSelection::updateAssociatedLiveRange): Use VisibleSelection::range
2667         for the same reason as above.
2668
2669         * editing/FrameSelection.h: Added isInDocumentTree.
2670
2671         * editing/VisibleSelection.cpp:
2672         (WebCore::VisibleSelection::VisibleSelection): Updated the primary constructor to set
2673         m_anchor/focus and let the validate function set m_base/extent/start/end/baseIsFirst.
2674         Changed most other constructors to call that primary one.
2675         (WebCore::VisibleSelection::anchor const): Added. This is a non-canonicalized position.
2676         (WebCore::VisibleSelection::focus const): Ditto.
2677         (WebCore::VisibleSelection::uncanonicalizedStart const): Added. This non-canonicalized
2678         version of start is used by new DOMSelection code, but eventually should be used
2679         elsewhere as well, and we may eventually eliminate the canonicalized version.
2680         (WebCore::VisibleSelection::uncanonicalizedEnd const): Ditto.
2681         (WebCore::VisibleSelection::range const): Added. This non-canonicalized version of
2682         firstRange has many of the same considerations as the other four functions above.
2683         (WebCore::VisibleSelection::setBase): Set m_anchor instead of m_base. Eventually we
2684         will want to rename this function, too, but there is no need to do that now.
2685         (WebCore::VisibleSelection::setExtent): Ditto.
2686         (WebCore::VisibleSelection::setBaseAndExtentToDeepEquivalents): Rewrote to take
2687         m_anchor and m_focus as inputs and now m_base and m_extent are pure outputs.
2688         May want to rename this later, because "deep equivalents" is a funny way to say
2689         that this function sets base and extent to canonicalized values.
2690         (WebCore::VisibleSelection::adjustSelectionRespectingGranularity): Renamed from
2691         setStartAndEndFromBaseAndExtentRespectingGranularity. This now takes m_start/end
2692         as input as well as output, because the validate function needs to check
2693         if the function changes m_start/end so it can update m_anchor/focus. Also did a tiny
2694         bit of refactoring to use std::swap.
2695         (WebCore::VisibleSelection::validate): Refined the code to handle canonicalization
2696         differently from expanding due to granularity. Canonicalization is done preserving
2697         the original m_anchor/focus as it mostly always has been. But expansion due to
2698         granularity now changes m_anchor/focus/base/extent rather than just m_start/end.
2699         This makes sense because granularity changes actually affect what is selected,
2700         while canonicalization just changes how the selection is expressed and tracked.
2701         (WebCore::VisibleSelection::setWithoutValidation): Set m_anchor/focus. In the future,
2702         we can probably get rid of this eventually, because the "validation" talked about
2703         here is the unwanted canonicalization. But that's a refinement for the future.
2704         (WebCore::VisibleSelection::adjustSelectionToAvoidCrossingShadowBoundaries):
2705         Update m_focus, not just m_extent, if we have to adjust. Also removed an unnnecessary
2706         null check from the start of the function.
2707         (WebCore::VisibleSelection::adjustSelectionToAvoidCrossingEditingBoundaries): Ditto.
2708         Also removed the assertions because these situations can indeed arise and it's not
2709         necessarily an indication of a bug in editing code.
2710
2711         * editing/VisibleSelection.h: Rearranged constructors to make it slightly more clear
2712         which is the main one and that the others are simply convenience shorthands. Might
2713         want to come back later and remove some unused ones. Added uncanonicalizedStart,
2714         uncanonicalizedEnd, anchor, focus, and range. Renamed the private function called
2715         setStartAndEndFromBaseAndExtentRespectingGranularity to the new name
2716         adjustSelectionRespectingGranularity. Added m_anchor and m_focus and refined the
2717         comments about the position data members. We should eventually be able to cut down
2718         on the number of these again, but it's fine to have two more for now.
2719
2720         * page/DOMSelection.cpp:
2721         (WebCore::DOMSelection::range const): Use range rather than firstRange when live
2722         range selection is enabled, for proper round-tripping of selection endpoints,
2723         unaffected by canonicalization. The other changes below are for the same reason.
2724         (WebCore::DOMSelection::anchorPosition const): Use anchor.
2725         (WebCore::DOMSelection::focusPosition const): Use focus.
2726         (WebCore::DOMSelection::basePosition const): Use anchor.
2727         (WebCore::DOMSelection::extentPosition const): Use focus.
2728         (WebCore::DOMSelection::type const): Use isInDocumentTree and range rather than
2729         isNone/isCaret/isRange when live range selection is enabled, because this needs
2730         to report "Caret" when the range is not collapsed, even if the canonicalized
2731         range is collapsed and "None" when the selection is in a shadow tree.
2732         (WebCore::DOMSelection::rangeCount const): Use isInDocumentTree to check if
2733         there is a selection rather than isNone to correctly handle the shadow tree case.
2734         (WebCore::DOMSelection::collapseToEnd): Use uncanonicalizedEnd.
2735         (WebCore::DOMSelection::collapseToStart): Use uncanonicalizedStart.
2736         (WebCore::DOMSelection::containsNode const): Updated the comment for clarity.
2737
2738 2020-09-20  Simon Fraser  <simon.fraser@apple.com>
2739
2740         [LFC Display] Move LFC Display infrastructure files into a new 'display' directory
2741         https://bugs.webkit.org/show_bug.cgi?id=216747
2742
2743         Reviewed by Zalan Bujtas.
2744
2745         WebCore/Source/display will become the home for all the LFC painting code; move
2746         DisplayView and DisplayLayerController into it.
2747         
2748         Also fix some unified build include issues.
2749
2750         * CMakeLists.txt:
2751         * Headers.cmake:
2752         * Sources.txt:
2753         * WebCore.xcodeproj/project.pbxproj:
2754         * display/DisplayLayerController.cpp: Renamed from Source/WebCore/layout/display/DisplayLayerController.cpp.
2755         * display/DisplayLayerController.h: Renamed from Source/WebCore/layout/display/DisplayLayerController.h.
2756         * display/DisplayView.cpp: Renamed from Source/WebCore/layout/display/DisplayView.cpp.
2757         * display/DisplayView.h: Renamed from Source/WebCore/layout/display/DisplayView.h.
2758         * layout/flexformatting/FlexFormattingContext.cpp:
2759         * layout/inlineformatting/InlineLineBox.cpp:
2760
2761 2020-09-20  Darin Adler  <darin@apple.com>
2762
2763         Selection API: Fix selectAllChilden to return InvalidNodeTypeError when passed a DocumentType node
2764         https://bugs.webkit.org/show_bug.cgi?id=216741
2765
2766         Reviewed by Ryosuke Niwa.
2767
2768         This is covered by tests, but the fix itself is only testable when live range
2769         selection is enabled. So for now the other tests are simply checking that no
2770         regression or behavior change was introduced by accident.
2771
2772         * page/DOMSelection.cpp:
2773         (WebCore::DOMSelection::selectAllChildren): Return the value returned by
2774         setBaseAndExtent so we don't discard any exception it might throw. In
2775         practice, that's only this one.
2776         * page/DOMSelection.h: Updated return type so we can throw an exception.
2777         * page/DOMSelection.idl: Added MayThrowException.
2778
2779 2020-09-20  Zalan Bujtas  <zalan@apple.com>
2780
2781         [LFC][IFC] InlineFormattingState should not store display lines and runs
2782         https://bugs.webkit.org/show_bug.cgi?id=216742
2783
2784         Reviewed by Antti Koivisto.
2785
2786         In this patch,
2787         1. Display related structures are completely moved out from Layout namespace
2788           - InlineFormattingContext does not generate display structures.
2789           - InlineFormattingState only stores layout data.
2790           - Layout tree verification works on layout geometry.
2791           - Layout structures do not embed Display types.
2792         2. LayoutIntegration creates and maintains the required Display structures for painting and hittesting.
2793         3. Display::Run does not use Layout types (InlineLayoutRect, InlineLayoutUnit).
2794
2795         FIXME: We need to start constructing display content for the Display::Painter.
2796
2797         * WebCore.xcodeproj/project.pbxproj:
2798         * layout/Verification.cpp:
2799         (WebCore::Layout::outputMismatchingSimpleLineInformationIfNeeded):
2800         (WebCore::Layout::checkForMatchingNonTextRuns):
2801         (WebCore::Layout::checkForMatchingTextRuns):
2802         (WebCore::Layout::outputMismatchingComplexLineInformationIfNeeded):
2803         (WebCore::Layout::LayoutContext::verifyAndOutputMismatchingLayoutTree):
2804         * layout/displaytree/DisplayInlineContent.h:
2805         (WebCore::Display::InlineContent::shrinkToFit):
2806         * layout/displaytree/DisplayLine.h:
2807         (WebCore::Display::Line::horizontalAlignmentOffset const):
2808         (WebCore::Display::Line::Line):
2809         * layout/displaytree/DisplayPainter.cpp:
2810         (WebCore::Display::paintInlineContent):
2811         * layout/displaytree/DisplayRun.h:
2812         (WebCore::Display::Run::TextContent::start const):
2813         (WebCore::Display::Run::TextContent::end const):
2814         (WebCore::Display::Run::TextContent::length const):
2815         (WebCore::Display::Run::TextContent::content const):
2816         (WebCore::Display::Run::TextContent::needsHyphen const):
2817         (WebCore::Display::Run::rect const):
2818         (WebCore::Display::Run::inkOverflow const):
2819         (WebCore::Display::Run::Run):
2820         (WebCore::Display::Run::TextContent::TextContent):
2821         (WebCore::Display::Run::TextContent::setNeedsHyphen): Deleted.
2822         (WebCore::Display::Run::TextContent::expand): Deleted.
2823         (WebCore::Display::Run::TextContent::shrink): Deleted.
2824         (WebCore::Display::Run::topLeft const): Deleted.
2825         (WebCore::Display::Run::left const): Deleted.
2826         (WebCore::Display::Run::right const): Deleted.
2827         (WebCore::Display::Run::top const): Deleted.
2828         (WebCore::Display::Run::bottom const): Deleted.
2829         (WebCore::Display::Run::width const): Deleted.
2830         (WebCore::Display::Run::height const): Deleted.
2831         (WebCore::Display::Run::moveVertically): Deleted.
2832         * layout/flexformatting/FlexFormattingContext.cpp:
2833         (WebCore::Layout::FlexFormattingContext::sizeAndPlaceFlexItems):
2834         * layout/inlineformatting/InlineFormattingContext.cpp:
2835         (WebCore::Layout::InlineFormattingContext::computeGeometryForLineContent):
2836         * layout/inlineformatting/InlineFormattingState.h:
2837         (WebCore::Layout::InlineFormattingState::lineRuns const):
2838         (WebCore::Layout::InlineFormattingState::lineRuns):
2839         (WebCore::Layout::InlineFormattingState::addLineRun):
2840         (WebCore::Layout::InlineFormattingState::clearLineAndRuns):
2841         (WebCore::Layout::InlineFormattingState::shrinkToFit):
2842         (WebCore::Layout::InlineFormattingState::displayInlineContent const): Deleted.
2843         (WebCore::Layout::InlineFormattingState::ensureDisplayInlineContent): Deleted.
2844         (WebCore::Layout::InlineFormattingState::shrinkDisplayInlineContent): Deleted.
2845         * layout/inlineformatting/InlineLine.h:
2846         (WebCore::Layout::Line::Run::textContent const):
2847         (WebCore::Layout::Line::Run::expansion const):
2848         * layout/inlineformatting/InlineLineGeometry.h:
2849         (WebCore::Layout::InlineLineGeometry::horizontalAlignmentOffset const):
2850         (WebCore::Layout::InlineLineGeometry::InlineLineGeometry):
2851         * layout/integration/LayoutIntegrationLineLayout.cpp:
2852         (WebCore::LayoutIntegration::LineLayout::layout):
2853         (WebCore::LayoutIntegration::LineLayout::constructDisplayContent):
2854         (WebCore::LayoutIntegration::LineLayout::ensureDisplayInlineContent):
2855         (WebCore::LayoutIntegration::LineLayout::paint):
2856         (WebCore::LayoutIntegration::LineLayout::displayInlineContent const): Deleted.
2857         * layout/integration/LayoutIntegrationLineLayout.h:
2858         (WebCore::LayoutIntegration::LineLayout::displayInlineContent const):
2859         * layout/layouttree/LayoutTreeBuilder.cpp:
2860         (WebCore::Layout::outputInlineRuns):
2861         * layout/tableformatting/TableFormattingContext.cpp:
2862         (WebCore::Layout::TableFormattingContext::setUsedGeometryForCells):
2863         * rendering/line/LineLayoutTraversalDisplayRunPath.h:
2864         (WebCore::LineLayoutTraversal::DisplayRunPath::rect const):
2865
2866 2020-09-19  Andres Gonzalez  <andresg_22@apple.com>
2867
2868         Implementation for AXIsolatedObject::nextSibling and previousSibling.
2869         https://bugs.webkit.org/show_bug.cgi?id=216710
2870
2871         Reviewed by Chris Fleizach.
2872
2873         Implementation for AXIsolatedObject::previousSibling and nextSibling which
2874         are invoked by VoiceOver in Safari Reader mode.
2875
2876         * accessibility/AccessibilityRenderObject.cpp:
2877         (WebCore::AccessibilityRenderObject::previousSibling const):
2878         - Fixed crash caused by dereferencing m_renderer->parent() which can be null.
2879         - Added check for the AXObjectCache that can become null.
2880         (WebCore::AccessibilityRenderObject::nextSibling const):
2881         - Code style cleanup.
2882         * accessibility/isolatedtree/AXIsolatedObject.cpp:
2883         (WebCore::AXIsolatedObject::initializeAttributeData):
2884         - Added caching of next/previousSiblling objects.
2885         (WebCore::AXIsolatedObject::previousSibling const): Inlined in header..
2886         (WebCore::AXIsolatedObject::nextSibling const): Inlined in header.
2887         * accessibility/isolatedtree/AXIsolatedObject.h:
2888         * accessibility/isolatedtree/AXIsolatedTree.h:
2889
2890 2020-09-19  Sam Weinig  <weinig@apple.com>
2891
2892         Performance and PerformanceNavigation interfaces are missing toJSON operations
2893         https://bugs.webkit.org/show_bug.cgi?id=216728
2894
2895         Reviewed by Darin Adler.
2896
2897         Add missing toJSON operations to Performance and PerformanceNavigation and update
2898         comments in related IDLs.
2899         
2900         Updates results for existing tests, more of which now pass.
2901
2902         * page/Performance.idl:
2903         * page/PerformanceMark.idl:
2904         * page/PerformanceMeasure.idl:
2905         * page/PerformanceNavigation.idl:
2906         * page/PerformanceTiming.idl:
2907
2908 2020-09-19  Zalan Bujtas  <zalan@apple.com>
2909
2910         [LFC][IFC] InlineFormattingContext::computeGeometryForLineContent should not construct Display::Lines
2911         https://bugs.webkit.org/show_bug.cgi?id=216723
2912
2913         Reviewed by Antti Koivisto.
2914
2915         Display::Lines construction should live in the display builder. However currently we don't yet have a real builder, so let's
2916         just use the integration layer.
2917         This is also in preparation for removing all the Display::InlineContent code from the Layout namespace.
2918
2919         * layout/displaytree/DisplayPainter.cpp:
2920         (WebCore::Display::paintInlineContent):
2921         * layout/inlineformatting/InlineFormattingContext.cpp:
2922         (WebCore::Layout::InlineFormattingContext::computeGeometryForLineContent):
2923         * layout/integration/LayoutIntegrationLineLayout.cpp:
2924         (WebCore::LayoutIntegration::LineLayout::layout):
2925         (WebCore::LayoutIntegration::LineLayout::constructDisplayContent):
2926         * layout/integration/LayoutIntegrationLineLayout.h:
2927
2928 2020-09-18  Darin Adler  <darin@apple.com>
2929
2930         Selection API: Extend lifetime of selection live range to preserve expando properties
2931         https://bugs.webkit.org/show_bug.cgi?id=216721
2932
2933         Reviewed by Ryosuke Niwa.
2934
2935         Test: editing/selection/expando.html
2936
2937         * dom/Range.cpp:
2938         (WebCore::Range::window): Added. Returns window if range is associated with selection.
2939         * dom/Range.h: Added window.
2940         * dom/Range.idl: Added GenerateIsReachable=ReachableFromDOMWindow.
2941
2942         * editing/FrameSelection.cpp:
2943         (WebCore::FrameSelection::disassociateLiveRange): Removed a FIXME comment about the
2944         need for this fix.
2945         (WebCore::FrameSelection::updateAssociatedLiveRange): Added a comment explaining
2946         why an associated live range might not be contained in the document.
2947
2948 2020-09-19  Sam Weinig  <weinig@apple.com>
2949
2950         Add support for Settings equivilent of RuntimeConditionallyReadWrite
2951         https://bugs.webkit.org/show_bug.cgi?id=216697
2952
2953         Reviewed by Darin Adler.
2954
2955         Adds a new extended attribute, [SettingsConditionallyReadWrite] to allow users of 
2956         [RuntimeConditionallyReadWrite] to convert from RuntimeEnabledFeatures to Settings.
2957
2958         * bindings/scripts/CodeGeneratorJS.pm:
2959         (NeedsRuntimeReadWriteCheck):
2960         (GeneratePropertiesHashTable):
2961         (GenerateRuntimeEnableConditionalString):
2962         (GenerateImplementation):
2963         * bindings/scripts/IDLAttributes.json:
2964         Adds new extended attribute.
2965         
2966         * bindings/scripts/test/DOMWindowConstructors.idl:
2967         * bindings/scripts/test/JS/JSDOMWindow.cpp:
2968         * bindings/scripts/test/JS/JSTestConditionallyReadWrite.cpp: Added.
2969         * bindings/scripts/test/JS/JSTestConditionallyReadWrite.h: Added.
2970         * bindings/scripts/test/JS/JSTestObj.cpp:
2971         * bindings/scripts/test/SupplementalDependencies.dep:
2972         * bindings/scripts/test/TestConditionallyReadWrite.idl: Added.
2973         * bindings/scripts/test/TestObj.idl:
2974         Move conditionally read-write tests to a new test, TestConditionallyReadWrite.idl and
2975         update results.
2976
2977 2020-09-19  Sam Weinig  <weinig@apple.com>
2978
2979         Remove runtime setting for enabling/disabling the CrossOriginResourcePolicy API
2980         https://bugs.webkit.org/show_bug.cgi?id=216561
2981
2982         Reviewed by Darin Adler.
2983
2984         Remove runtime setting for enabling/disabling CrossOriginResourcePolicy. It has been
2985         enabled by default for a while and there are no known reasons one would need to
2986         disable it.
2987
2988         * page/RuntimeEnabledFeatures.h:
2989         (WebCore::RuntimeEnabledFeatures::setCrossOriginResourcePolicyEnabled): Deleted.
2990         (WebCore::RuntimeEnabledFeatures::crossOriginResourcePolicyEnabled const): Deleted.
2991
2992 2020-09-19  Simon Fraser  <simon.fraser@apple.com>
2993
2994         ASSERTION FAILED: &formattingContextRoot == m_rootContainer.get() in WebCore::Layout::LayoutState::establishedInlineFormattingState
2995         https://bugs.webkit.org/show_bug.cgi?id=216668
2996
2997         Reviewed by Zalan Bujtas.
2998
2999         Display::View didn't unparent the GraphicsLayers when Document::documentWillBecomeInactive() was called,
3000         so a layer pointing to an old LayoutState would try to paint.
3001
3002         Fix by plumbing setIsInWindow() through to Display::View and using it to detach the root layer.
3003
3004         * dom/Document.cpp:
3005         (WebCore::Document::documentWillBecomeInactive): The ASSERT_IMPLIES() is there to ensure that this isn't
3006         a behavior change; we used to go to RenderView directly, and now go via FrameView.
3007         * layout/display/DisplayLayerController.cpp:
3008         (WebCore::Display::LayerController::detachRootLayer):
3009         (WebCore::Display::LayerController::setIsInWindow):
3010         * layout/display/DisplayLayerController.h:
3011         * layout/display/DisplayView.cpp:
3012         (WebCore::Display::View::setIsInWindow):
3013         * layout/display/DisplayView.h:
3014         * page/FrameView.cpp:
3015         (WebCore::FrameView::setIsInWindow):
3016
3017 2020-09-18  Zalan Bujtas  <zalan@apple.com>
3018
3019         [LFC][IFC] Do not use Display::Line geometry in layout
3020         https://bugs.webkit.org/show_bug.cgi?id=216711
3021
3022         Reviewed by Simon Fraser.
3023
3024         This patch introduces Layout::LineGeometry.
3025         LineGeometry is used to hold the logical geometry of line and it is input to subsequent layouts.
3026         This patch is also in preparation for moving out the "displayInlineItem" construction from Layout::InlineFormattingContext.
3027
3028         * WebCore.xcodeproj/project.pbxproj:
3029         * layout/FormattingContextGeometry.cpp:
3030         (WebCore::Layout::FormattingContext::Geometry::contentHeightForFormattingContextRoot const):
3031         * layout/Verification.cpp:
3032         (WebCore::Layout::outputMismatchingComplexLineInformationIfNeeded):
3033         * layout/blockformatting/BlockFormattingContextGeometry.cpp:
3034         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedHeightAndMargin):
3035         * layout/blockformatting/BlockMarginCollapse.cpp:
3036         (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginsCollapseThrough const):
3037         * layout/displaytree/DisplayLine.h:
3038         (WebCore::Display::Line::rect const):
3039         (WebCore::Display::Line::scrollableOverflow const):
3040         (WebCore::Display::Line::inkOverflow const):
3041         (WebCore::Display::Line::baseline const):
3042         (WebCore::Display::Line::Line):
3043         (WebCore::Display::Line::left const): Deleted.
3044         (WebCore::Display::Line::right const): Deleted.
3045         (WebCore::Display::Line::top const): Deleted.
3046         (WebCore::Display::Line::bottom const): Deleted.
3047         (WebCore::Display::Line::width const): Deleted.
3048         (WebCore::Display::Line::height const): Deleted.
3049         (WebCore::Display::Line::moveVertically): Deleted.
3050         * layout/displaytree/DisplayPainter.cpp:
3051         (WebCore::Display::paintInlineContent):
3052         * layout/inlineformatting/InlineFormattingContext.cpp:
3053         (WebCore::Layout::InlineFormattingContext::lineLayout):
3054         (WebCore::Layout::InlineFormattingContext::computeGeometryForLineContent):
3055         (WebCore::Layout::InlineFormattingContext::invalidateFormattingState):
3056         * layout/inlineformatting/InlineFormattingContextGeometry.cpp:
3057         (WebCore::Layout::LineBoxBuilder::constructInlineBoxes):
3058         * layout/inlineformatting/InlineFormattingState.h:
3059         (WebCore::Layout::InlineFormattingState::lines const):
3060         (WebCore::Layout::InlineFormattingState::lines):
3061         (WebCore::Layout::InlineFormattingState::addLine):
3062         (WebCore::Layout::InlineFormattingState::clearLineAndRuns):
3063         (WebCore::Layout::InlineFormattingState::shrinkDisplayInlineContent):
3064         (WebCore::Layout::InlineFormattingState::clearDisplayInlineContent): Deleted.
3065         * layout/inlineformatting/InlineLineBuilder.cpp:
3066         * layout/inlineformatting/InlineLineBuilder.h:
3067         * layout/inlineformatting/InlineLineGeometry.h: Added.
3068         (WebCore::Layout::InlineLineGeometry::logicalLeft const):
3069         (WebCore::Layout::InlineLineGeometry::logicalRight const):
3070         (WebCore::Layout::InlineLineGeometry::logicalTop const):
3071         (WebCore::Layout::InlineLineGeometry::logicalBottom const):
3072         (WebCore::Layout::InlineLineGeometry::logicalWidth const):
3073         (WebCore::Layout::InlineLineGeometry::logicalHeight const):
3074         (WebCore::Layout::InlineLineGeometry::logicalRect const):
3075         (WebCore::Layout::InlineLineGeometry::lineBoxLogicalRect const):
3076         (WebCore::Layout::InlineLineGeometry::baseline const):
3077         (WebCore::Layout::InlineLineGeometry::moveVertically):
3078         (WebCore::Layout::InlineLineGeometry::InlineLineGeometry):
3079         * layout/inlineformatting/InlineTextItem.h:
3080         * layout/integration/LayoutIntegrationLineLayout.cpp:
3081         (WebCore::LayoutIntegration::LineLayout::contentLogicalHeight const):
3082         (WebCore::LayoutIntegration::LineLayout::lineCount const):
3083         (WebCore::LayoutIntegration::LineLayout::firstLineBaseline const):
3084         (WebCore::LayoutIntegration::LineLayout::lastLineBaseline const):
3085         (WebCore::LayoutIntegration::LineLayout::paint):
3086         * layout/layouttree/LayoutTreeBuilder.cpp:
3087         (WebCore::Layout::outputInlineRuns):
3088         * layout/tableformatting/TableFormattingContext.cpp:
3089         (WebCore::Layout::TableFormattingContext::setUsedGeometryForCells):
3090         * layout/tableformatting/TableFormattingContextGeometry.cpp:
3091         (WebCore::Layout::TableFormattingContext::Geometry::usedBaselineForCell):
3092
3093 2020-09-18  Zalan Bujtas  <zalan@apple.com>
3094
3095         [LFC][FFC] Add flex box/item to showLayoutTree
3096         https://bugs.webkit.org/show_bug.cgi?id=216694
3097
3098         Reviewed by Sam Weinig.
3099
3100         * layout/layouttree/LayoutTreeBuilder.cpp:
3101         (WebCore::Layout::outputLayoutBox): 'Table principal' -> 'Table wrapper box' for consistency sake.
3102
3103 2020-09-18  Saam Barati  <sbarati@apple.com>
3104
3105         console APIs shouldn't crash making a string that's too long for a console warning when using user provided labels
3106         https://bugs.webkit.org/show_bug.cgi?id=216709
3107         <rdar://problem/68275357>
3108
3109         Reviewed by Mark Lam and Devin Rousso.
3110
3111         Test: inspector/console/console-oom.html
3112
3113         * inspector/agents/InspectorTimelineAgent.cpp:
3114         (WebCore::InspectorTimelineAgent::startFromConsole):
3115         (WebCore::InspectorTimelineAgent::stopFromConsole):
3116         * inspector/agents/WebConsoleAgent.cpp:
3117         (WebCore::WebConsoleAgent::didReceiveResponse):
3118
3119 2020-09-18  Don Olmstead  <don.olmstead@sony.com>
3120
3121         [WebGPU] Add ENABLE(WHLSL_COMPILER) guard
3122         https://bugs.webkit.org/show_bug.cgi?id=216713
3123
3124         Reviewed by Myles C. Maxfield.
3125
3126         Replaces the ENABLE(WEBGPU) guards in the Modules/webgpu/WHLSL with ENABLE(WHLSL_COMPILER)
3127         since not all ports need a WHLSL compiler to support WebGPU.
3128
3129         * Modules/webgpu/WHLSL/AST/WHLSLAST.h:
3130         * Modules/webgpu/WHLSL/AST/WHLSLAddressEscapeMode.h:
3131         * Modules/webgpu/WHLSL/AST/WHLSLAddressSpace.h:
3132         * Modules/webgpu/WHLSL/AST/WHLSLArrayReferenceType.h:
3133         * Modules/webgpu/WHLSL/AST/WHLSLArrayType.h:
3134         * Modules/webgpu/WHLSL/AST/WHLSLAssignmentExpression.h:
3135         * Modules/webgpu/WHLSL/AST/WHLSLBaseFunctionAttribute.h:
3136         * Modules/webgpu/WHLSL/AST/WHLSLBaseSemantic.h:
3137         * Modules/webgpu/WHLSL/AST/WHLSLBlock.h:
3138         * Modules/webgpu/WHLSL/AST/WHLSLBooleanLiteral.h:
3139         * Modules/webgpu/WHLSL/AST/WHLSLBreak.h:
3140         * Modules/webgpu/WHLSL/AST/WHLSLBuiltInSemantic.cpp:
3141         * Modules/webgpu/WHLSL/AST/WHLSLBuiltInSemantic.h:
3142         * Modules/webgpu/WHLSL/AST/WHLSLCallExpression.h:
3143         * Modules/webgpu/WHLSL/AST/WHLSLCommaExpression.h:
3144         * Modules/webgpu/WHLSL/AST/WHLSLConstantExpression.h:
3145         * Modules/webgpu/WHLSL/AST/WHLSLContinue.h:
3146         * Modules/webgpu/WHLSL/AST/WHLSLDefaultDelete.h:
3147         * Modules/webgpu/WHLSL/AST/WHLSLDereferenceExpression.h:
3148         * Modules/webgpu/WHLSL/AST/WHLSLDoWhileLoop.h:
3149         * Modules/webgpu/WHLSL/AST/WHLSLDotExpression.h:
3150         * Modules/webgpu/WHLSL/AST/WHLSLEffectfulExpressionStatement.h:
3151         * Modules/webgpu/WHLSL/AST/WHLSLEntryPointType.h:
3152         * Modules/webgpu/WHLSL/AST/WHLSLEnumerationDefinition.h:
3153         * Modules/webgpu/WHLSL/AST/WHLSLEnumerationMember.h:
3154         * Modules/webgpu/WHLSL/AST/WHLSLEnumerationMemberLiteral.h:
3155         * Modules/webgpu/WHLSL/AST/WHLSLExpression.cpp:
3156         * Modules/webgpu/WHLSL/AST/WHLSLExpression.h:
3157         * Modules/webgpu/WHLSL/AST/WHLSLFallthrough.h:
3158         * Modules/webgpu/WHLSL/AST/WHLSLFloatLiteral.h:
3159         * Modules/webgpu/WHLSL/AST/WHLSLFloatLiteralType.cpp:
3160         * Modules/webgpu/WHLSL/AST/WHLSLFloatLiteralType.h:
3161         * Modules/webgpu/WHLSL/AST/WHLSLForLoop.h:
3162         * Modules/webgpu/WHLSL/AST/WHLSLFunctionAttribute.h:
3163         * Modules/webgpu/WHLSL/AST/WHLSLFunctionDeclaration.h:
3164         * Modules/webgpu/WHLSL/AST/WHLSLFunctionDefinition.h:
3165         * Modules/webgpu/WHLSL/AST/WHLSLGlobalVariableReference.h:
3166         * Modules/webgpu/WHLSL/AST/WHLSLIfStatement.h:
3167         * Modules/webgpu/WHLSL/AST/WHLSLIndexExpression.h:
3168         * Modules/webgpu/WHLSL/AST/WHLSLIntegerLiteral.cpp:
3169         * Modules/webgpu/WHLSL/AST/WHLSLIntegerLiteral.h:
3170         * Modules/webgpu/WHLSL/AST/WHLSLIntegerLiteralType.cpp:
3171         * Modules/webgpu/WHLSL/AST/WHLSLIntegerLiteralType.h:
3172         * Modules/webgpu/WHLSL/AST/WHLSLLogicalExpression.h:
3173         * Modules/webgpu/WHLSL/AST/WHLSLLogicalNotExpression.h:
3174         * Modules/webgpu/WHLSL/AST/WHLSLMakeArrayReferenceExpression.h:
3175         * Modules/webgpu/WHLSL/AST/WHLSLMakePointerExpression.h:
3176         * Modules/webgpu/WHLSL/AST/WHLSLNameSpace.h:
3177         * Modules/webgpu/WHLSL/AST/WHLSLNamedType.h:
3178         * Modules/webgpu/WHLSL/AST/WHLSLNativeFunctionDeclaration.h:
3179         * Modules/webgpu/WHLSL/AST/WHLSLNativeTypeDeclaration.h:
3180         * Modules/webgpu/WHLSL/AST/WHLSLNumThreadsFunctionAttribute.h:
3181         * Modules/webgpu/WHLSL/AST/WHLSLPointerType.h:
3182         * Modules/webgpu/WHLSL/AST/WHLSLPropertyAccessExpression.h:
3183         * Modules/webgpu/WHLSL/AST/WHLSLQualifier.h:
3184         * Modules/webgpu/WHLSL/AST/WHLSLReadModifyWriteExpression.h:
3185         * Modules/webgpu/WHLSL/AST/WHLSLReferenceType.h:
3186         * Modules/webgpu/WHLSL/AST/WHLSLReplaceWith.h:
3187         * Modules/webgpu/WHLSL/AST/WHLSLResolvableType.h:
3188         * Modules/webgpu/WHLSL/AST/WHLSLResourceSemantic.cpp:
3189         * Modules/webgpu/WHLSL/AST/WHLSLResourceSemantic.h:
3190         * Modules/webgpu/WHLSL/AST/WHLSLReturn.h:
3191         * Modules/webgpu/WHLSL/AST/WHLSLSemantic.h:
3192         * Modules/webgpu/WHLSL/AST/WHLSLSpecializationConstantSemantic.cpp:
3193         * Modules/webgpu/WHLSL/AST/WHLSLSpecializationConstantSemantic.h:
3194         * Modules/webgpu/WHLSL/AST/WHLSLStageInOutSemantic.cpp:
3195         * Modules/webgpu/WHLSL/AST/WHLSLStageInOutSemantic.h:
3196         * Modules/webgpu/WHLSL/AST/WHLSLStatement.cpp:
3197         * Modules/webgpu/WHLSL/AST/WHLSLStatement.h:
3198         * Modules/webgpu/WHLSL/AST/WHLSLStatementList.h:
3199         * Modules/webgpu/WHLSL/AST/WHLSLStructureDefinition.h:
3200         * Modules/webgpu/WHLSL/AST/WHLSLStructureElement.h:
3201         * Modules/webgpu/WHLSL/AST/WHLSLSwitchCase.h:
3202         * Modules/webgpu/WHLSL/AST/WHLSLSwitchStatement.h:
3203         * Modules/webgpu/WHLSL/AST/WHLSLTernaryExpression.h:
3204         * Modules/webgpu/WHLSL/AST/WHLSLType.cpp:
3205         * Modules/webgpu/WHLSL/AST/WHLSLType.h:
3206         * Modules/webgpu/WHLSL/AST/WHLSLTypeArgument.cpp:
3207         * Modules/webgpu/WHLSL/AST/WHLSLTypeArgument.h:
3208         * Modules/webgpu/WHLSL/AST/WHLSLTypeDefinition.h:
3209         * Modules/webgpu/WHLSL/AST/WHLSLTypeReference.cpp:
3210         * Modules/webgpu/WHLSL/AST/WHLSLTypeReference.h:
3211         * Modules/webgpu/WHLSL/AST/WHLSLUnnamedType.cpp:
3212         * Modules/webgpu/WHLSL/AST/WHLSLUnnamedType.h:
3213         * Modules/webgpu/WHLSL/AST/WHLSLUnnamedTypeHash.h:
3214         * Modules/webgpu/WHLSL/AST/WHLSLUnsignedIntegerLiteral.cpp:
3215         * Modules/webgpu/WHLSL/AST/WHLSLUnsignedIntegerLiteral.h:
3216         * Modules/webgpu/WHLSL/AST/WHLSLUnsignedIntegerLiteralType.cpp:
3217         * Modules/webgpu/WHLSL/AST/WHLSLUnsignedIntegerLiteralType.h:
3218         * Modules/webgpu/WHLSL/AST/WHLSLVariableDeclaration.h:
3219         * Modules/webgpu/WHLSL/AST/WHLSLVariableDeclarationsStatement.h:
3220         * Modules/webgpu/WHLSL/AST/WHLSLVariableReference.h:
3221         * Modules/webgpu/WHLSL/AST/WHLSLWhileLoop.h:
3222         * Modules/webgpu/WHLSL/Metal/WHLSLEntryPointScaffolding.cpp:
3223         * Modules/webgpu/WHLSL/Metal/WHLSLEntryPointScaffolding.h:
3224         * Modules/webgpu/WHLSL/Metal/WHLSLFunctionWriter.cpp:
3225         * Modules/webgpu/WHLSL/Metal/WHLSLFunctionWriter.h:
3226         * Modules/webgpu/WHLSL/Metal/WHLSLMangledNames.h:
3227         * Modules/webgpu/WHLSL/Metal/WHLSLMetalCodeGenerator.cpp:
3228         * Modules/webgpu/WHLSL/Metal/WHLSLMetalCodeGenerator.h:
3229         * Modules/webgpu/WHLSL/Metal/WHLSLNativeFunctionWriter.cpp:
3230         * Modules/webgpu/WHLSL/Metal/WHLSLNativeFunctionWriter.h:
3231         * Modules/webgpu/WHLSL/Metal/WHLSLNativeTypeWriter.cpp:
3232         * Modules/webgpu/WHLSL/Metal/WHLSLNativeTypeWriter.h:
3233         * Modules/webgpu/WHLSL/Metal/WHLSLTypeNamer.cpp:
3234         * Modules/webgpu/WHLSL/Metal/WHLSLTypeNamer.h:
3235         * Modules/webgpu/WHLSL/Metal/WHLSLVertexBufferIndexCalculator.cpp:
3236         * Modules/webgpu/WHLSL/Metal/WHLSLVertexBufferIndexCalculator.h:
3237         * Modules/webgpu/WHLSL/WHLSLASTDumper.cpp:
3238         * Modules/webgpu/WHLSL/WHLSLASTDumper.h:
3239         * Modules/webgpu/WHLSL/WHLSLBuildStandardLibraryFunctionMap.py:
3240         * Modules/webgpu/WHLSL/WHLSLCheckDuplicateFunctions.cpp:
3241         * Modules/webgpu/WHLSL/WHLSLCheckDuplicateFunctions.h:
3242         * Modules/webgpu/WHLSL/WHLSLCheckReferenceTypes.cpp:
3243         * Modules/webgpu/WHLSL/WHLSLCheckReferenceTypes.h:
3244         * Modules/webgpu/WHLSL/WHLSLCheckTextureReferences.cpp:
3245         * Modules/webgpu/WHLSL/WHLSLCheckTextureReferences.h:
3246         * Modules/webgpu/WHLSL/WHLSLChecker.cpp:
3247         * Modules/webgpu/WHLSL/WHLSLChecker.h:
3248         * Modules/webgpu/WHLSL/WHLSLCodeLocation.h:
3249         * Modules/webgpu/WHLSL/WHLSLComputeDimensions.cpp:
3250         * Modules/webgpu/WHLSL/WHLSLComputeDimensions.h:
3251         * Modules/webgpu/WHLSL/WHLSLError.h:
3252         * Modules/webgpu/WHLSL/WHLSLFunctionStageChecker.cpp:
3253         * Modules/webgpu/WHLSL/WHLSLFunctionStageChecker.h:
3254         * Modules/webgpu/WHLSL/WHLSLGatherEntryPointItems.cpp:
3255         * Modules/webgpu/WHLSL/WHLSLGatherEntryPointItems.h:
3256         * Modules/webgpu/WHLSL/WHLSLHighZombieFinder.cpp:
3257         * Modules/webgpu/WHLSL/WHLSLHighZombieFinder.h:
3258         * Modules/webgpu/WHLSL/WHLSLInferTypes.cpp:
3259         * Modules/webgpu/WHLSL/WHLSLInferTypes.h:
3260         * Modules/webgpu/WHLSL/WHLSLIntrinsics.cpp:
3261         * Modules/webgpu/WHLSL/WHLSLIntrinsics.h:
3262         * Modules/webgpu/WHLSL/WHLSLLexer.cpp:
3263         * Modules/webgpu/WHLSL/WHLSLLexer.h:
3264         * Modules/webgpu/WHLSL/WHLSLLiteralTypeChecker.cpp:
3265         * Modules/webgpu/WHLSL/WHLSLLiteralTypeChecker.h:
3266         * Modules/webgpu/WHLSL/WHLSLNameContext.cpp:
3267         * Modules/webgpu/WHLSL/WHLSLNameContext.h:
3268         * Modules/webgpu/WHLSL/WHLSLNameResolver.cpp:
3269         * Modules/webgpu/WHLSL/WHLSLNameResolver.h:
3270         * Modules/webgpu/WHLSL/WHLSLParser.cpp:
3271         * Modules/webgpu/WHLSL/WHLSLParser.h:
3272         * Modules/webgpu/WHLSL/WHLSLParsingMode.h:
3273         * Modules/webgpu/WHLSL/WHLSLPipelineDescriptor.h:
3274         * Modules/webgpu/WHLSL/WHLSLPrepare.cpp:
3275         * Modules/webgpu/WHLSL/WHLSLPrepare.h:
3276         * Modules/webgpu/WHLSL/WHLSLPreserveVariableLifetimes.cpp:
3277         * Modules/webgpu/WHLSL/WHLSLPreserveVariableLifetimes.h:
3278         * Modules/webgpu/WHLSL/WHLSLProgram.cpp:
3279         * Modules/webgpu/WHLSL/WHLSLProgram.h:
3280         * Modules/webgpu/WHLSL/WHLSLPropertyResolver.cpp:
3281         * Modules/webgpu/WHLSL/WHLSLPropertyResolver.h:
3282         * Modules/webgpu/WHLSL/WHLSLPruneUnreachableStandardLibraryFunctions.cpp:
3283         * Modules/webgpu/WHLSL/WHLSLPruneUnreachableStandardLibraryFunctions.h:
3284         * Modules/webgpu/WHLSL/WHLSLRecursionChecker.cpp:
3285         * Modules/webgpu/WHLSL/WHLSLRecursionChecker.h:
3286         * Modules/webgpu/WHLSL/WHLSLRecursiveTypeChecker.cpp:
3287         * Modules/webgpu/WHLSL/WHLSLRecursiveTypeChecker.h:
3288         * Modules/webgpu/WHLSL/WHLSLResolveOverloadImpl.cpp:
3289         * Modules/webgpu/WHLSL/WHLSLResolveOverloadImpl.h:
3290         * Modules/webgpu/WHLSL/WHLSLResolvingType.h:
3291         * Modules/webgpu/WHLSL/WHLSLScopedSetAdder.h:
3292         * Modules/webgpu/WHLSL/WHLSLSemanticMatcher.cpp:
3293         * Modules/webgpu/WHLSL/WHLSLSemanticMatcher.h:
3294         * Modules/webgpu/WHLSL/WHLSLStandardLibraryFunctionMap.h:
3295         * Modules/webgpu/WHLSL/WHLSLStandardLibraryUtilities.cpp:
3296         * Modules/webgpu/WHLSL/WHLSLStandardLibraryUtilities.h:
3297         * Modules/webgpu/WHLSL/WHLSLStatementBehaviorChecker.cpp:
3298         * Modules/webgpu/WHLSL/WHLSLStatementBehaviorChecker.h:
3299         * Modules/webgpu/WHLSL/WHLSLSynthesizeConstructors.cpp:
3300         * Modules/webgpu/WHLSL/WHLSLSynthesizeConstructors.h:
3301         * Modules/webgpu/WHLSL/WHLSLSynthesizeEnumerationFunctions.cpp:
3302         * Modules/webgpu/WHLSL/WHLSLSynthesizeEnumerationFunctions.h:
3303         * Modules/webgpu/WHLSL/WHLSLVisitor.cpp:
3304         * Modules/webgpu/WHLSL/WHLSLVisitor.h:
3305
3306 2020-09-18  Chris Dumez  <cdumez@apple.com>
3307
3308         Crash under WebCore::shouldResetFocusNavigationStartingNode()
3309         https://bugs.webkit.org/show_bug.cgi?id=216714
3310         <rdar://problem/68132047>
3311
3312         Reviewed by Darin Adler.
3313
3314         Protect anchorElement in FrameView::scrollToFragmentInternal() to make sure
3315         it stays alive until the time we pass it to setFocusNavigationStartingNode().
3316
3317         * page/FrameView.cpp:
3318         (WebCore::FrameView::scrollToFragmentInternal):
3319
3320 2020-09-18  Aditya Keerthi  <akeerthi@apple.com>
3321
3322         Date/time inputs should not use user-specified formats
3323         https://bugs.webkit.org/show_bug.cgi?id=216484
3324         <rdar://problem/68864815>
3325
3326         Reviewed by Wenson Hsieh.
3327
3328         On macOS, users can specify custom date and time formats through System
3329         Preferences. These formats can be different from the default for the
3330         user’s current locale. Using these formats when rendering date and time
3331         inputs is a potential fingerprinting vector, as sites can apply CSS to
3332         components of the input, and measure the size of the input.
3333
3334         To fix, we create a new NSLocale even if the identifier matches
3335         [NSLocale currentLocale]. This ensures that m_locale does not contain
3336         the user's changes to the locale.
3337
3338         * platform/text/cocoa/LocaleCocoa.h:
3339         * platform/text/cocoa/LocaleCocoa.mm:
3340         (WebCore::Locale::create):
3341         (WebCore::LocaleCocoa::LocaleCocoa):
3342
3343 2020-09-18  Aditya Keerthi  <akeerthi@apple.com>
3344
3345         [macOS] Date/time inputs should focus the next editable component when entering a separator key
3346         https://bugs.webkit.org/show_bug.cgi?id=216661
3347         <rdar://problem/69091856>
3348
3349         Reviewed by Wenson Hsieh.
3350
3351         NSDatePicker focuses the next editable field when entering a separator
3352         key. We should match this behavior to be consistent with the rest of
3353         the system.
3354
3355         * html/shadow/DateTimeFieldElement.cpp:
3356         (WebCore::DateTimeFieldElement::defaultKeyboardEventHandler):
3357
3358 2020-09-18  Said Abou-Hallawa  <sabouhallawa@apple.com>
3359
3360         REGRESSION(r267137): PaintFrequencyTracker needs to track all the painting
3361         https://bugs.webkit.org/show_bug.cgi?id=216677
3362
3363         Reviewed by Simon Fraser.
3364
3365         r267137 removed all the optimizations which the Design test got from
3366         r230544 because it resets the renderingUpdateTimestamp to zero when it
3367         exists. This makes RenderLayer always retrieves this timestamp with value
3368         equal to zero. There is no direct call from Page::updateRendering() to
3369         RenderLayer::paintLayerContents(). Painting has to be scheduled to the
3370         next run-loop. Because SinglePaintFrequencyTracking tracks only the painting
3371         whose timestamp is not zero, SinglePaintFrequencyTracking has not been
3372         tracking any painting.
3373
3374         The solution is to track all the painting. When renderingUpdateTimestamp()
3375         is zero, SinglePaintFrequencyTracking will use MonotonicTime::now() instead.
3376         This will happen in cases like calling updateControlTints() before calling
3377         Page::updateRendering().
3378
3379         * page/Page.cpp:
3380         (WebCore::Page::updateRendering):
3381         * page/Page.h:
3382         (WebCore::Page::lastRenderingUpdateTimestamp const):
3383         (WebCore::Page::renderingUpdateTimestamp const): Deleted.
3384         * rendering/PaintFrequencyTracker.h:
3385         (WebCore::SinglePaintFrequencyTracking::SinglePaintFrequencyTracking):
3386         (WebCore::SinglePaintFrequencyTracking::~SinglePaintFrequencyTracking):
3387         * rendering/RenderLayer.cpp:
3388         (WebCore::RenderLayer::paintLayerContents):
3389         (WebCore::RenderLayer::calculateClipRects const):
3390
3391 2020-09-18  Chris Dumez  <cdumez@apple.com>
3392
3393         webaudio/Analyser/handle-silent-inputs.html test is failing
3394         https://bugs.webkit.org/show_bug.cgi?id=216708
3395
3396         Reviewed by Geoffrey Garen.
3397
3398         Merge the following fix to AnalyserNode from Blink so that webaudio/Analyser/handle-silent-inputs.html
3399         layout test starts passing:
3400         - https://codereview.chromium.org/2666063003
3401
3402         No new tests, rebaselined existing test.
3403
3404         * Modules/webaudio/AnalyserNode.cpp:
3405         (WebCore::AnalyserNode::process):
3406         (WebCore::AnalyserNode::updatePullStatus):
3407         (WebCore::AnalyserNode::tailTime const):
3408         * Modules/webaudio/AnalyserNode.h:
3409         * Modules/webaudio/AudioBasicInspectorNode.h:
3410
3411 2020-09-18  Youenn Fablet  <youenn@apple.com>
3412
3413         Add internal flag to enable/disable H264 hardware encoder
3414         https://bugs.webkit.org/show_bug.cgi?id=216534
3415
3416         Reviewed by Eric Carlson.
3417
3418         Update process-wide hardware H264 boolean flag based on internal feature flag.
3419         No change of behavior.
3420
3421         * platform/mediastream/libwebrtc/LibWebRTCProvider.cpp:
3422         (WebCore::LibWebRTCProvider::setH264HardwareEncoderAllowed):
3423         * platform/mediastream/libwebrtc/LibWebRTCProvider.h:
3424         * platform/mediastream/libwebrtc/LibWebRTCProviderCocoa.cpp:
3425         (WebCore::LibWebRTCProvider::setH264HardwareEncoderAllowed):
3426         (WebCore::LibWebRTCProviderCocoa::~LibWebRTCProviderCocoa):
3427         (WebCore::LibWebRTCProviderCocoa::setH264HardwareEncoderAllowed): Deleted.
3428         * platform/mediastream/libwebrtc/LibWebRTCProviderCocoa.h:
3429         * testing/Internals.cpp:
3430         (WebCore::Internals::resetToConsistentState):
3431         (WebCore::Internals::setH264HardwareEncoderAllowed):
3432
3433 2020-09-18  Youenn Fablet  <youenn@apple.com>
3434
3435         Hash deviceIds in WebProcess instead of UIProcess to allow audio output device IDs in WebProcess
3436         https://bugs.webkit.org/show_bug.cgi?id=216693
3437
3438         Reviewed by Eric Carlson.
3439
3440         Make sure to create new MediaDeviceInfo objects everytime enumerateDevices is called.
3441         Covered by updated tests.
3442
3443         * Modules/mediastream/MediaDevices.cpp:
3444         (WebCore::MediaDevices::MediaDevices):
3445         (WebCore::MediaDevices::stop):
3446         (WebCore::MediaDevices::computeDevices):
3447         (WebCore::MediaDevices::enumerateDevices):
3448         (WebCore::MediaDevices::refreshDevices): Deleted.
3449         * Modules/mediastream/MediaDevices.h:
3450
3451 2020-09-18  Jer Noble  <jer.noble@apple.com>
3452
3453         REGRESSION(r254031): Captions fail to load on jw.org
3454         https://bugs.webkit.org/show_bug.cgi?id=216672
3455         <rdar://problem/69016059>
3456
3457         Reviewed by Eric Carlson.
3458
3459         Revert r254031.
3460
3461         * loader/TextTrackLoader.cpp:
3462         (WebCore::TextTrackLoader::load):
3463
3464 2020-09-18  Chris Dumez  <cdumez@apple.com>
3465
3466         [macOS Big Sur] ASSERTION FAILED: !m_gamepadMap.get(device)./platform/gamepad/mac/HIDGamepadProvider.mm(233) under WebCore::HIDGamepadProvider::deviceAdded
3467         https://bugs.webkit.org/show_bug.cgi?id=216665
3468         <rdar://problem/68641574>
3469
3470         Reviewed by Alex Christensen.
3471
3472         On macOS Big Sur, it appears we get notified multiple times that the Shenzhen Longshengwei Technology Gamepad
3473         is getting added during Gamepad.GCFVersusHID API test. This was causing an assertion to be hit under
3474         HIDGamepadProvider::deviceAdded() where we expected the device not not already be in the map. In this patch,
3475         we work around this HID quirk on Big Sur by ignoring the notification if we already know about the device.
3476
3477         No new tests, fixes existing API test.
3478
3479         * platform/gamepad/mac/HIDGamepadProvider.mm:
3480         (WebCore::HIDGamepadProvider::deviceAdded):
3481
3482 2020-09-18  Chris Dumez  <cdumez@apple.com>
3483
3484         Vectorize SetTargetAtTime processing in AudioParamTimeline
3485         https://bugs.webkit.org/show_bug.cgi?id=216673
3486         <rdar://problem/69111432>
3487
3488         Reviewed by Sam Weinig.
3489
3490         Fix the SSE implementation of VectorMath::vsadd() to properly deal with source
3491         and destination alignment, similarly to what is done in other VectorMath functions.
3492
3493         No new tests, fixes existing crash on GTK bots.
3494
3495         * platform/audio/VectorMath.cpp:
3496         (WebCore::VectorMath::vsadd):
3497
3498 2020-09-18  Zalan Bujtas  <zalan@apple.com>
3499
3500         [LFC][IFC] Move computedLineLogicalRect to InlineFormattingContext::Geometry
3501         https://bugs.webkit.org/show_bug.cgi?id=216680
3502
3503         Reviewed by Simon Fraser.
3504
3505         This function computes line geometry. It belongs in InlineFormattingContext::Geometry. 
3506
3507         * layout/inlineformatting/InlineFormattingContext.cpp:
3508         (WebCore::Layout::InlineFormattingContext::computeGeometryForLineContent):
3509         (WebCore::Layout::InlineFormattingContext::computedLineLogicalRect const): Deleted.
3510         * layout/inlineformatting/InlineFormattingContext.h:
3511         * layout/inlineformatting/InlineFormattingContextGeometry.cpp:
3512         (WebCore::Layout::InlineFormattingContext::Geometry::computedLineLogicalRect const):
3513
3514 2020-09-18  Zalan Bujtas  <zalan@apple.com>
3515
3516         [LFC][IFC] Move inline box constructing and alignment logic to LineBoxBuilder
3517         https://bugs.webkit.org/show_bug.cgi?id=216678
3518
3519         Reviewed by Simon Fraser.
3520
3521         Move the LineBox related logic out of the LineBox class to InlineFormattingContext::Geometry::LineBoxBuilder.
3522         This makes the LineBox class a light, box like class that we can cache in the InlineFormattingState.
3523
3524         * layout/inlineformatting/InlineFormattingContext.cpp:
3525         (WebCore::Layout::InlineFormattingContext::computedLineLogicalRect const):
3526         (WebCore::Layout::InlineFormattingContext::computeGeometryForLineContent):
3527         * layout/inlineformatting/InlineFormattingContext.h:
3528         * layout/inlineformatting/InlineFormattingContextGeometry.cpp:
3529         (WebCore::Layout::LineBoxBuilder::formattingContext const):
3530         (WebCore::Layout::LineBoxBuilder::root const):
3531         (WebCore::Layout::LineBoxBuilder::layoutState const):
3532         (WebCore::Layout::HangingContent::width const):
3533         (WebCore::Layout::HangingContent::isConditional const):
3534         (WebCore::Layout::HangingContent::setIsConditional):
3535         (WebCore::Layout::HangingContent::expand):
3536         (WebCore::Layout::HangingContent::reset):
3537         (WebCore::Layout::collectHangingContent):
3538         (WebCore::Layout::horizontalAlignmentOffset):
3539         (WebCore::Layout::LineBoxBuilder::LineBoxBuilder):
3540         (WebCore::Layout::LineBoxBuilder::build):
3541         (WebCore::Layout::LineBoxBuilder::constructInlineBoxes):
3542         (WebCore::Layout::LineBoxBuilder::computeInlineBoxesLogicalHeight):
3543         (WebCore::Layout::LineBoxBuilder::alignInlineBoxesVerticallyAndComputeLineBoxHeight):
3544         (WebCore::Layout::InlineFormattingContext::Geometry::lineBoxForLineContent):
3545         * layout/inlineformatting/InlineLine.cpp:
3546         * layout/inlineformatting/InlineLineBox.cpp:
3547         (WebCore::Layout::LineBox::InlineBox::InlineBox):
3548         (WebCore::Layout::LineBox::LineBox):
3549         (WebCore::Layout::m_isLineVisuallyEmpty):
3550         (WebCore::Layout::LineBox::addRootInlineBox):
3551         (WebCore::Layout::LineBox::addInlineBox):
3552         (WebCore::Layout::HangingContent::width const): Deleted.
3553         (WebCore::Layout::HangingContent::isConditional const): Deleted.
3554         (WebCore::Layout::HangingContent::setIsConditional): Deleted.
3555         (WebCore::Layout::HangingContent::expand): Deleted.
3556         (WebCore::Layout::HangingContent::reset): Deleted.
3557         (WebCore::Layout::collectHangingContent): Deleted.
3558         (WebCore::Layout::horizontalAlignmentOffset): Deleted.
3559         (WebCore::Layout::m_inlineFormattingContext): Deleted.
3560         (WebCore::Layout::LineBox::constructInlineBoxes): Deleted.
3561         (WebCore::Layout::LineBox::computeInlineBoxesLogicalHeight): Deleted.
3562         (WebCore::Layout::LineBox::alignInlineBoxesVerticallyAndComputeLineBoxHeight): Deleted.
3563         (WebCore::Layout::LineBox::formattingContext const): Deleted.
3564         (WebCore::Layout::LineBox::root const): Deleted.
3565         (WebCore::Layout::LineBox::layoutState const): Deleted.
3566         * layout/inlineformatting/InlineLineBox.h:
3567         (WebCore::Layout::LineBox::alignmentBaseline const):
3568         (WebCore::Layout::LineBox::setLogicalHeight):
3569         (WebCore::Layout::LineBox::setHorizontalAlignmentOffset):
3570         (WebCore::Layout::LineBox::rootInlineBox):
3571         (WebCore::Layout::LineBox::nonRootInlineBoxes const):
3572         (WebCore::Layout::LineBox::inlineBoxForLayoutBox):
3573         * layout/inlineformatting/InlineLineBuilder.cpp:
3574         (WebCore::Layout::LineBuilder::layoutInlineContent):
3575         * layout/inlineformatting/InlineLineBuilder.h:
3576
3577 2020-09-18  Youenn Fablet  <youenn@apple.com>
3578
3579         XHR.timeout is affected by long tasks
3580         https://bugs.webkit.org/show_bug.cgi?id=216266
3581         <rdar://problem/68908150>
3582
3583         Reviewed by Alex Christensen.
3584
3585         Long tasks may block the main thread, which may block IPC processing of load messages.
3586         In that case, even though the load is finished, WebProcess did not know that yet and will cancel the load.
3587         To prevent that, in case of XHR timeout, do an explicit check to compute the done flag.
3588         https://fetch.spec.whatwg.org/#done-flag
3589
3590         Tests: imported/w3c/web-platform-tests/xhr/xhr-timeout-longtask.any.html
3591                imported/w3c/web-platform-tests/xhr/xhr-timeout-longtask.any.worker.html
3592
3593         * loader/DocumentThreadableLoader.cpp:
3594         (WebCore::DocumentThreadableLoader::computeIsDone):
3595         * loader/DocumentThreadableLoader.h:
3596         * loader/LoaderStrategy.h:
3597         * loader/ThreadableLoader.h:
3598         * loader/ThreadableLoaderClient.h:
3599         (WebCore::ThreadableLoaderClient::notifyIsDone):
3600         * loader/ThreadableLoaderClientWrapper.h:
3601         (WebCore::ThreadableLoaderClientWrapper::notifyIsDone):
3602         * loader/WorkerThreadableLoader.cpp:
3603         (WebCore::WorkerThreadableLoader::computeIsDone):
3604         (WebCore::WorkerThreadableLoader::MainThreadBridge::computeIsDone):
3605         (WebCore::WorkerThreadableLoader::MainThreadBridge::notifyIsDone):
3606         * loader/WorkerThreadableLoader.h:
3607         (WebCore::WorkerThreadableLoader::MainThreadBridge::loaderProxy):
3608         * xml/XMLHttpRequest.cpp:
3609         (WebCore::XMLHttpRequest::didReachTimeout):
3610         (WebCore::XMLHttpRequest::notifyIsDone):
3611         * xml/XMLHttpRequest.h:
3612
3613 2020-09-17  Sam Weinig  <weinig@apple.com>
3614
3615         Remove runtime setting for enabling/disabling the UserTiming and ResourceTiming APIs
3616         https://bugs.webkit.org/show_bug.cgi?id=216556
3617
3618         Reviewed by Darin Adler.
3619
3620         Remove runtime setting for enabling/disabling UserTiming and ResourceTiming 
3621         APIs. They have both been on for a while in WebKit2 and there aren't any
3622         known uses cases for disabling them. In addition to removing the setting, 
3623         they are now enabled in LegacyWebKit as well.
3624
3625         In addition to removing UserTiming and ResourceTiming, we can also remove the
3626         checks for PerformanceTimelineEnabled, as that was defined entirely in terms
3627         of the former.
3628
3629         * loader/CrossOriginPreflightChecker.cpp:
3630         (WebCore::CrossOriginPreflightChecker::startPreflight):
3631         * loader/DocumentThreadableLoader.cpp:
3632         (WebCore::DocumentThreadableLoader::loadRequest):
3633         * loader/ResourceTimingInformation.cpp:
3634         (WebCore::ResourceTimingInformation::addResourceTiming):
3635         (WebCore::ResourceTimingInformation::storeResourceTimingInitiatorInformation):
3636         * loader/SubresourceLoader.cpp:
3637         (WebCore::SubresourceLoader::reportResourceTiming):
3638         * loader/cache/CachedResourceLoader.cpp:
3639         (WebCore::CachedResourceLoader::requestResource):
3640         (WebCore::CachedResourceLoader::revalidateResource):
3641         (WebCore::CachedResourceLoader::loadResource):
3642         * page/Performance.idl:
3643         * page/PerformanceEntry.cpp:
3644         (WebCore::PerformanceEntry::parseEntryTypeString):
3645         * page/PerformanceEntry.idl:
3646         * page/PerformanceObserver.idl:
3647         * page/PerformanceObserverEntryList.idl:
3648         * page/PerformanceResourceTiming.idl:
3649         * page/RuntimeEnabledFeatures.h:
3650         (WebCore::RuntimeEnabledFeatures::setResourceTimingEnabled): Deleted.
3651         (WebCore::RuntimeEnabledFeatures::resourceTimingEnabled const): Deleted.
3652         (WebCore::RuntimeEnabledFeatures::setUserTimingEnabled): Deleted.
3653         (WebCore::RuntimeEnabledFeatures::userTimingEnabled const): Deleted.
3654         (WebCore::RuntimeEnabledFeatures::performanceTimelineEnabled const): Deleted.
3655
3656 2020-09-16  Darin Adler  <darin@apple.com>
3657
3658         Selection API: Introduce LiveRangeSelectionEnabled, off by default
3659         https://bugs.webkit.org/show_bug.cgi?id=216656
3660
3661         Reviewed by Sam Weinig.
3662
3663         For interoperability, the Selection API requires behavior that is quite different
3664         from how our Selection object has behaves historically. Specifically, the range
3665         returned is a live range that update as the selection updates and the selection,
3666         in turn, is updated if the returned range is modified.
3667
3668         This significant change will have compatibility impact on websites and other
3669         content that assumes the legacy  WebKit behavior, so we are developing it behind
3670         a feature flag, LiveRangeSelectionEnabled.
3671
3672         This patch introduces the live range selection behind the flag, but leaves one
3673         significant area unresolved, changing selection to keep track of the original
3674         endpoints rather than only canonicalized endpoints, and a couple of loose ends,
3675         lifetime of ride-along properties on the live range object, and updating test
3676         expectations for the new behavior.
3677
3678         * dom/CharacterData.cpp:
3679         (WebCore::CharacterData::setData): Fixed timing of call to Document::textRemoved
3680         by letting setDataAndUpdate do it; otherwise it can be called after the selection
3681         has been updated, and the range gets updated twice.
3682         (WebCore::CharacterData::appendData): Pass UpdateLiveRanges::No to setDataAndUpdate,
3683         to preserve the existing "don't update ranges" behavior for now at least.
3684         (WebCore::CharacterData::insertData): Fixed timing of call to Document::textInserted
3685         by letting setDataAndUpdate do it, for the same reason as above.
3686         (WebCore::CharacterData::deleteData): Ditto, for textRemoved.
3687         (WebCore::CharacterData::replaceData): Ditto, for textRemoved and textInserted.
3688         (WebCore::CharacterData::setDataAndUpdate): Added UpdateLiveRanges argument and
3689         calls to textRemoved and textInserted, after setting data, but before other updates.
3690
3691         * dom/CharacterData.h: Made setDataAndUpdate protected and added UpdateLiveRanges.
3692
3693         * dom/Document.h: Added optimized version of the Node::contains function. When the
3694         node in question is the document we can just check treeScope and isConnected
3695         rather than walking up the tree.
3696
3697         * dom/Node.cpp:
3698         (WebCore::Node::isDescendantOf const): Moved special case for document to the top
3699         of the function; seems a more important special case than disconnected nodes and
3700         nodes with no children.
3701         (WebCore::Node::isDescendantOrShadowDescendantOf const): Reworded the FIXME for clarity.
3702         (WebCore::Node::contains const): Changed this to toke a reference instead of a pointer.
3703         The pointer flavor is now inlined in the header.
3704
3705         * dom/Node.h: Added an overload of contains that takes a reference, analogous to what
3706         we already have for isDescendantOf.
3707
3708         * dom/Position.cpp:
3709         (WebCore::Position::Position): Removed too-strict assertions. When we start using
3710         positions to represent arbitrary DOM positions for things outside editing we won't
3711         want these assertions any more, and we hit them when we use Position in a more
3712         straightforward way, like some cases in this patch.
3713         (WebCore::Position::primaryDirection const): Added a missing null check. This case
3714         is hit in some test cases in the new mode.
3715
3716         * dom/Range.cpp: Removed some, but probably not all, of the unneeded headers.
3717         (WebCore::Range::~Range): Added an assertion.
3718         (WebCore::Range::updateAssociatedSelection): Added. Tells FrameSelection to update
3719         the selection when this is the live range associated with the selection.
3720         (WebCore::Range::updateDocument): Added an assertion.
3721         (WebCore::Range::setStart): Call updateAssociatedSelection.
3722         (WebCore::Range::setEnd): Ditto.
3723         (WebCore::Range::collapse): Ditto.
3724         (WebCore::Range::processContents): Call collapse here to share slightly more
3725         code so we don't have to call updateAssociatedSelection here.
3726         (WebCore::Range::checkNodeOffsetPair): Made this a static function so it can
3727         be used outside the Range class. Also fixed indentation of the switch statement.
3728         (WebCore::Range::selectNodeContents): Call updateAssociatedSelection and
3729         updateDocument.
3730         (WebCore::setBothEndpoints): Added.
3731         (WebCore::Range::updateFromSelection): Added. Uses setBothEndpoints.
3732         (WebCore::createLiveRange): Refactored to call setBothEndpoints.
3733
3734         * dom/Range.h: Added didAssociateWithSelection, didDisassociateFromSelection,
3735         updateFromSelection, updateAssociatedSelection, and m_isAssociatedWithSelection.
3736         Also made checkNodeOffsetPair a public static member function instead of a
3737         private non-static member function.
3738
3739         * dom/Text.cpp:
3740         (WebCore::Text::setDataAndUpdate): Update to pass along UpdateLiveRanges argument.
3741         * dom/Text.h: Ditto. Also made the override of setDataAndUpdate private.
3742
3743         * editing/FrameSelection.cpp:
3744         (WebCore::FrameSelection::setSelectionWithoutUpdatingAppearance): Call
3745         updateAssociatedLiveRange after updating the selection.
3746         (WebCore::containsEndpoints): Added. Used to check if a live range still has the
3747         document as its root node so it can remain associated this with the selection.
3748         (WebCore::FrameSelection::associatedLiveRange): Added.
3749         (WebCore::FrameSelection::disassociateLiveRange): Added.
3750         (WebCore::FrameSelection::associateLiveRange): Added.
3751         (WebCore::FrameSelection::updateFromAssociatedLiveRange): Added.
3752         (WebCore::FrameSelection::updateAssociatedLiveRange): Added.
3753
3754         * editing/FrameSelection.h: Added associatedLiveRange, associateLiveRange,
3755         disassociateLiveRange, updateFromAssociatedLiveRange, updateAssociatedLiveRange,
3756         and m_associatedLiveRange. Also change m_document to a WeakPtr and do some
3757         tidying up.
3758
3759         * page/DOMSelection.cpp:
3760         (WebCore::selectionShadowAncestor): Assert the live range setting is false,
3761         since this code is not used in that case. Changed the return type to RefPtr.
3762         Address the FIXME here by getting the document in a simpler way.
3763         (WebCore::DOMSelection::create): Moved here from the header.
3764         (WebCore::DOMSelection::frame const): Added. Returns a RefPtr. This gets rid
3765         of the need for various instances of the "protector" pattern in this file.
3766         (WebCore::DOMSelection::range const): Added. Returns the selected range, but
3767         checks for the shadow tree case and returns null in that case.
3768         (WebCore::DOMSelection::anchorPosition const): Redid as a member function.
3769         (WebCore::DOMSelection::focusPosition const): Ditto.
3770         (WebCore::DOMSelection::basePosition const): Ditto.
3771         (WebCore::DOMSelection::extentPosition const): Ditto.
3772         (WebCore::DOMSelection::anchorNode const): Rewrote to be simpler using the
3773         functions above.
3774         (WebCore::DOMSelection::anchorOffset const): Ditto.
3775         (WebCore::DOMSelection::focusNode const): Ditto.
3776         (WebCore::DOMSelection::focusOffset const): Ditto.
3777         (WebCore::DOMSelection::baseNode const): Ditto.
3778         (WebCore::DOMSelection::baseOffset const): Ditto.
3779         (WebCore::DOMSelection::extentNode const): Ditto.
3780         (WebCore::DOMSelection::extentOffset const): Ditto.
3781         (WebCore::DOMSelection::isCollapsed const): Rewrote using DOMSelection::range
3782         and SimpleRange::collapsed.
3783         (WebCore::DOMSelection::type const): Updated since frame returns RefPtr.
3784         (WebCore::DOMSelection::rangeCount const): Ditto.
3785         (WebCore::DOMSelection::collapse): Added new corrected checking for special
3786         cases, guarded by the setting.
3787         (WebCore::DOMSelection::collapseToEnd): Updated since frame returns RefPtr.
3788         way to do protection. Added a call to disassociateLiveRange. No need to put
3789         under a setting guard since it does nothing if feature is not enabled.
3790         (WebCore::DOMSelection::collapseToStart): Ditto.
3791         (WebCore::DOMSelection::empty): Call removeAllRanges so we don't have two
3792         copies of the same function to maintain.
3793         (WebCore::DOMSelection::setBaseAndExtent): Use makeRefPtr, added corrected
3794         checking for special cases guarded by the setting.
3795         (WebCore::DOMSelection::setPosition): Call collapse so we don't have two
3796         copies of the same function to maintain.
3797         (WebCore::DOMSelection::modify): Updated since frame returns RefPtr.
3798         (WebCore::DOMSelection::extend): Ditto. Also added corrected checking for
3799         special cases guarded by the setting.
3800         (WebCore::DOMSelection::getRangeAt): Added a version of this function that
3801         simply returns the associated live range, creating one if needed, guarded
3802         by the setting.
3803         (WebCore::DOMSelection::removeAllRanges): Updated since frame returns RefPtr.
3804         (WebCore::DOMSelection::addRange): Added a version of this function that
3805         matches the specification, guarded by the setting.
3806         (WebCore::DOMSelection::removeRange): Added.
3807         (WebCore::DOMSelection::deleteFromDocument): Added a version of this
3808         function that simply calls deleteContents on the associated live range,
3809         guarded by the setting.
3810         (WebCore::DOMSelection::containsNode const): Put the text node workaround
3811         inside a setting check. I also figured out why workaround was added: it
3812         works around unwanted range canonicalization in various tests, but also
3813         introduces incorrect behavior. Also rewrote to use DOMSelection::range.
3814         (WebCore::DOMSelection::toString): Use DOMSelection::range, guarded by
3815         the setting, so we return empty string when selection is in the shadow tree.
3816         (WebCore::DOMSelection::shadowAdjustedNode const): When the live range
3817         setting is enabled, adjust by changing the node to nullptr, not finding an
3818         ancestor in the document.
3819         (WebCore::DOMSelection::shadowAdjustedOffset const): Ditto, but offset 0.
3820         (WebCore::DOMSelection::isValidForPosition const): Assert that the live range
3821         selection setting is disabled, because this incorrect check should only be
3822         used to preserve legacy behavior until we are ready to turn it on.
3823
3824         * page/DOMSelection.h: Updated since setBaseAndExtent, setPosition, and
3825         collapse can raise exceptions, although they only do so when the live range
3826         selection setting is on. Added removeRange. Moved the create function
3827         out of the class definition into the .cpp file. Made return values of
3828         baseNode, extentNode, anchorNode, focusNode, and shadowAdjustedNode RefPtr.
3829         Made toString const. Added frame, range, anchorPosition, focusPosition,
3830         basePosition, and extentPosition private functions. Removed visibleSelection.
3831
3832         * page/DOMSelection.idl: Updated file to match a recent draft of the
3833         Selection standard, reordering things to match the order they appear there.
3834         Added removeRange, guarded by the setting. Also got rid of the
3835         unncecessary "undefined" string defaults for the arguments to the modify
3836         method since they have no effect on observed behavior anyway.
3837
3838         * page/Settings.yaml: Added liveRangeSelectionEnabled.
3839
3840 2020-09-17  Chris Dumez  <cdumez@apple.com>
3841
3842         Vectorize SetTargetAtTime processing in AudioParamTimeline
3843         https://bugs.webkit.org/show_bug.cgi?id=216673
3844
3845         Reviewed by Sam Weinig.
3846
3847         Vectorize SetTargetAtTime processing in AudioParamTimeline.
3848
3849         The patch is based on the Blink implementation at:
3850         - https://github.com/chromium/chromium/blob/master/third_party/blink/renderer/modules/webaudio/audio_param_timeline.cc
3851
3852         I have however added the USE(ACCELERATE) and HAVE(ARM_NEON_INTRINSICS) implementations
3853         for DARWIN and non-SSE platforms.
3854
3855         This allows us to pass some more tests that we were failing merely due to precision
3856         issues. Now that our implemention matches Blink's, our results are consistent
3857         with Blink.
3858
3859         No new tests, rebaselined existing tests.
3860
3861         * Modules/webaudio/AudioParamTimeline.cpp:
3862         (WebCore::AudioParamTimeline::valuesForTimeRangeImpl):
3863         (WebCore::AudioParamTimeline::processSetTarget):
3864         * Modules/webaudio/AudioParamTimeline.h:
3865         * platform/audio/VectorMath.cpp:
3866         (WebCore::VectorMath::vsadd):
3867         (WebCore::VectorMath::vsmul):
3868         * platform/audio/VectorMath.h:
3869
3870 2020-09-17  Eric Carlson  <eric.carlson@apple.com>
3871
3872         [Cocoa] canPlayType('audio/mpeg; codecs="mp3"') returns ""
3873         https://bugs.webkit.org/show_bug.cgi?id=147309
3874
3875         Reviewed by Darin Adler.
3876         
3877         'audio/mpeg; codecs="mp3"' is not an RFC 3003 compliant MIME type but some big
3878         web sites use it. AVFoundation says the type is not supported, but MediaPlayerPrivateMediaSourceAVFObjC
3879         previously returned "maybe" for all extended types where the container type is
3880         supported. This bug was fixed when we moved the MIME type logic from MediaPlayerPrivateMediaSourceAVFObjC
3881         to MIMETypeCache, so add a mechanism to override extended types and use it to
3882         support 'audio/mpeg; codecs="mp3"'.
3883
3884         Test: media/media-can-play-mp3.html
3885
3886         * platform/graphics/MIMETypeCache.cpp:
3887         (WebCore::MIMETypeCache::canDecodeType):
3888         (WebCore::MIMETypeCache::overrideExtendedType):
3889         * platform/graphics/MIMETypeCache.h:
3890
3891 2020-09-17  Michael Saboff  <msaboff@apple.com>
3892
3893         Segfault in WebCore::IDBKey::createBinary
3894         https://bugs.webkit.org/show_bug.cgi?id=216501
3895
3896         Reviewed by Youenn Fablet.
3897
3898         If we can't get a copy of the JSBufferView, return an invalid IDBKey.
3899         This can happen if we are low on memory.  The existing calling code already
3900         handles the case where we might produce an invalid IDBKey.
3901
3902         Test: storage/indexeddb/IDBKey-create-array-buffer-view-oom.html
3903
3904         * Modules/indexeddb/IDBKey.cpp:
3905         (WebCore::IDBKey::createBinary):
3906
3907 2020-09-17  Antoine Quint  <graouts@webkit.org>
3908
3909         Remove AnimationTimeline::animationsForElement() and the CSS Transitions and CSS Animations accessors on ElementAnimationRareData
3910         https://bugs.webkit.org/show_bug.cgi?id=216654
3911
3912         Reviewed by Simon Fraser.
3913
3914         Before we implemented the correct way to sort animations using KeyframeEffectStack, we relied on distinct animation collections
3915         for CSS Transtions and CSS Animations and remaining Web Animations on ElementAnimationRareData. We don't need those anymore and
3916         we can use a single collection which we can now name animations() for all animations.
3917
3918         Additionally, the AnimationTimeline::animationsForElement() method where these collections were used when requesting unsorted
3919         animations was unnecessary and an incorrect design. Animations do not belong to a given timeline, so we now use the accessors
3920         on ElementAnimationRareData directly to get the sorted list of effects or the single animations collection.
3921
3922         * animation/AnimationTimeline.cpp:
3923         (WebCore::AnimationTimeline::animationWasAddedToElement):
3924         (WebCore::AnimationTimeline::animationWasRemovedFromElement):
3925         (WebCore::AnimationTimeline::willChangeRendererForElement):
3926         (WebCore::AnimationTimeline::cancelDeclarativeAnimationsForElement):
3927         (WebCore::AnimationTimeline::animationsForElement const): Deleted.
3928         * animation/AnimationTimeline.h:
3929         * animation/DocumentTimeline.cpp: