[iOS] outlook.live.com: Compose email frame not fully visible and not scrollable
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2019-05-03  Zalan Bujtas  <zalan@apple.com>
2
3         [iOS] outlook.live.com: Compose email frame not fully visible and not scrollable
4         https://bugs.webkit.org/show_bug.cgi?id=197573
5         <rdar://problem/48008441>
6
7         Reviewed by Wenson Hsieh.
8
9         The outlook mail view's flex column setup produces a somewhat unfortunate layout at certain viewport widths.
10         This patch addresses the issue by ensuring that we never fall into that range.
11
12         * page/Quirks.cpp:
13         (WebCore::Quirks::shouldIgnoreShrinkToFitContent const):
14         (WebCore::Quirks::overriddenViewportLayoutWidth const):
15         * page/Quirks.h:
16
17 2019-05-02  Jiewen Tan  <jiewen_tan@apple.com>
18
19         [WebAuthN] A focused document should be required
20         https://bugs.webkit.org/show_bug.cgi?id=197543
21         <rdar://problem/50430989>
22
23         Reviewed by Brent Fulgham.
24
25         This patch adds a check to see if the invoking document is focused before
26         calling into WebAuthN. This patch also removes some out-to-dated comments.
27
28         Test: http/wpt/webauthn/public-key-credential-unfocused-document.https.html
29
30         * Modules/credentialmanagement/CredentialsContainer.cpp:
31         (WebCore::CredentialsContainer::get):
32         (WebCore::CredentialsContainer::isCreate):
33         * Modules/webauthn/AuthenticatorCoordinator.cpp:
34         (WebCore::AuthenticatorCoordinator::create const):
35         (WebCore::AuthenticatorCoordinator::discoverFromExternalSource const):
36
37 2019-05-03  Devin Rousso  <drousso@apple.com>
38
39         Web Inspector: DOM: rename "low power" to "display composited"
40         https://bugs.webkit.org/show_bug.cgi?id=197296
41
42         Reviewed by Joseph Pecoraro.
43
44         Removed specific ChangeLog entries since it is almost entirely mechanical changes.
45
46         * inspector/agents/InspectorDOMAgent.h:
47         * inspector/agents/InspectorDOMAgent.cpp:
48
49 2019-05-03  Daniel Bates  <dabates@apple.com>
50
51         Pass KeyboardEvent by reference in more places
52         https://bugs.webkit.org/show_bug.cgi?id=197480
53
54         Reviewed by Wenson Hsieh.
55
56         * editing/Editor.cpp:
57         (WebCore::Editor::handleKeyboardEvent):
58         (WebCore::Editor::handleInputMethodKeydown):
59         * loader/EmptyClients.cpp:
60         * page/EditorClient.h:
61
62 2019-05-03  Chris Dumez  <cdumez@apple.com>
63
64         [iOS Sim Debug] ASSERTION FAILED The atomic string comes from an other thread! Layout Test imported/w3c/web-platform-tests/workers/WorkerNavigator_appName.htm is a flaky crash
65         https://bugs.webkit.org/show_bug.cgi?id=197530
66         <rdar://problem/50448285>
67
68         Reviewed by Geoffrey Garen.
69
70         The issue is that NavigatorBase::platform() was not thread safe but was called by both Navigator on
71         the main thread and WorkerNavigator on worker threads.
72
73         No new tests, covered by existing tests.
74
75         * page/Navigator.cpp:
76         (WebCore::Navigator::platform const):
77         * page/Navigator.h:
78
79         * page/NavigatorBase.cpp:
80         (WebCore::NavigatorBase::platform const):
81         * page/NavigatorBase.h:
82         Make NavigatorBase::platform() thread safe.
83
84         * platform/ios/Device.cpp:
85         (WebCore::deviceName):
86         * platform/ios/Device.h:
87         Make WebCore::deviceName() thread safe.
88
89         * platform/ios/UserAgentIOS.mm:
90         (WebCore::deviceNameForUserAgent):
91         Cache value returned by WebCore::deviceName() for performance.
92
93 2019-05-03  Chris Dumez  <cdumez@apple.com>
94
95         Use WeakPtr for JSLazyEventListener::m_originalNode for safety
96         https://bugs.webkit.org/show_bug.cgi?id=197576
97         <rdar://problem/24314027>
98
99         Reviewed by Alex Christensen.
100
101         * bindings/js/JSLazyEventListener.cpp:
102         (WebCore::JSLazyEventListener::JSLazyEventListener):
103         (WebCore::JSLazyEventListener::create):
104         * bindings/js/JSLazyEventListener.h:
105
106 2019-05-03  Eric Carlson  <eric.carlson@apple.com>
107
108         AVFoundation framework isn't always installed
109         https://bugs.webkit.org/show_bug.cgi?id=197577
110         <rdar://problem/50447841>
111
112         Reviewed by Jer Noble.
113         
114         Use PAL::isAVFoundationFrameworkAvailable() to check to see if AVFoundation is
115         installed, not PAL::AVFoundationLibrary().
116
117         * platform/graphics/avfoundation/objc/AVFoundationMIMETypeCache.mm:
118         (WebCore::AVFoundationMIMETypeCache::isAvailable const):
119         (WebCore::AVFoundationMIMETypeCache::loadMIMETypes):
120         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
121         (WebCore::MediaPlayerPrivateAVFoundationObjC::isAvailable):
122         (WebCore::MediaPlayerPrivateAVFoundationObjC::wirelessPlaybackTargetType const):
123         (WebCore::exernalDeviceDisplayNameForPlayer):
124         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
125         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::isAvailable):
126         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
127         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::isAvailable):
128         * platform/graphics/cocoa/HEVCUtilitiesCocoa.mm:
129         (WebCore::validateHEVCParameters):
130         * platform/mediastream/mac/AVCaptureDeviceManager.mm:
131         (WebCore::AVCaptureDeviceManager::isAvailable):
132
133 2019-05-03  Sihui Liu  <sihui_liu@apple.com>
134
135         Add assertion to check whether shm files have maximum FileProtection of CompleteUnlessOpen
136         https://bugs.webkit.org/show_bug.cgi?id=197390
137         <rdar://problem/42685773>
138
139         Reviewed by Geoffrey Garen.
140
141         We have seen crashes about accessing database files after device is locked. We are suspecting this is because 
142         shm files have wrong data protection class, but shm files should not have Complete class protection when it 
143         is created. It is likely the protection class is changed later. Add an assertion to verify our guess. If the 
144         crash signature changes after this patch, we probably need to change database implementation. If it is not, we
145         have other problem than data protection.
146
147         * platform/sql/SQLiteDatabase.cpp:
148         (WebCore::SQLiteDatabase::open):
149
150 2019-05-03  Youenn Fablet  <youenn@apple.com>
151
152         Cache.add and Cache.addAll should compute a correct response body size
153         https://bugs.webkit.org/show_bug.cgi?id=197464
154
155         Reviewed by Chris Dumez.
156
157         Compute the response body size as we do for regular Cache.put
158
159         Test: http/wpt/cache-storage/cache-quota-add.any.html
160
161         * Modules/cache/CacheStorageConnection.cpp:
162         (WebCore::CacheStorageConnection::computeRecordBodySize):
163         * Modules/cache/CacheStorageConnection.h:
164         * Modules/cache/DOMCache.cpp:
165         (WebCore::FetchTasksHandler::addResponseBody):
166         (WebCore::DOMCache::addAll):
167         Compute the response body size requires getting access to the connection.
168         'this' is added to the lambda which is fine since taskHandler keeps a
169         Ref to 'this' in its completion handler.
170         (WebCore::DOMCache::toConnectionRecord):
171         * Modules/fetch/FetchResponse.h:
172
173 2019-05-03  Tomoki Imai  <Tomoki.Imai@sony.com>
174
175         [Cairo] Improve ShadowBlur performance using tiling optimization
176         https://bugs.webkit.org/show_bug.cgi?id=197308
177         Reviewed by Žan Doberšek.
178
179         Enable tiling tiling-based optimization for drawRectShadow() and drawInsetShadow().
180         Since r228776, cairo ports doesn't have tiling-based optimization.
181
182         For AppleWin, this patch refactors code and it shares almost same code as cairo port.
183         Only the difference is that AppleWin uses ScratchBuffer, but cairo ports doesn't.
184         This should avoid a performance regression for AppleWin.
185
186         No new tests, covered by existing tests.
187
188         * platform/graphics/ShadowBlur.cpp:
189         (WebCore::calculateLobes):
190         Fix stylecheck errors
191
192         (WebCore::ShadowBlur::blurLayerImage):
193         Fix stylecheck errors
194
195         (WebCore::ShadowBlur::calculateLayerBoundingRect):
196         We don't use position of m_sourceRect, so change the type to FloatSize.
197
198         (WebCore::ShadowBlur::drawShadowBuffer):
199         Use m_layerSize instead of m_shadowedResultSize to fillRect, as m_layerSize is always smaller than m_shadowedResultSize.
200         It's because in m_layerSize is equal to m_shadowedResultSize if it's not clipped.
201         Clipping doesn't increase size of m_layerSize, so m_layerSize is always smaller than or equal to m_shadowedResultSize.
202
203         (WebCore::ShadowBlur::templateSize const):
204         Fix stylecheck errors
205
206         (WebCore::ShadowBlur::drawRectShadow):
207         (WebCore::ShadowBlur::drawInsetShadow):
208         (WebCore::ShadowBlur::drawRectShadowWithoutTiling):
209         (WebCore::ShadowBlur::drawInsetShadowWithoutTiling):
210         (WebCore::ShadowBlur::drawRectShadowWithTiling):
211         (WebCore::ShadowBlur::drawInsetShadowWithTiling):
212         Incorporate tile-based drawing.
213         To accomplish it, this patch abstracts GraphicsContext::drawImageBuffer to ShadowBlur::DrawImageCallback,
214         GraphicsContext::fillRect to ShadowBlur::FillRectCallback, drawing rect with hole to  ShadowBlur::FillRectWithHoleCallback.
215
216         Variants which takes GraphicsContext as parameter now just calls another drawRectShadow.
217
218         (WebCore::ShadowBlur::drawLayerPieces):
219         Instead of graphicsContext.drawImageBuffer, call corresponding callback.
220
221         (WebCore::ShadowBlur::drawLayerPiecesAndFillCenter):
222         This function calls drawLayerPieces and fill center for outer shadow.
223         Drawing outer shadow requires another callback for graphicsContext.fillRect.
224
225         (WebCore::ShadowBlur::drawShadowLayer):
226         Use m_layerSize instead of m_shadowedResultSize to fillRect,
227         as m_layerSize is always smaller than m_shadowedResultSize.
228
229         * platform/graphics/ShadowBlur.h:
230         Rename m_sourceRect to m_shadowedResultSize, and change it to FloatSize from FloatRect.
231         Remove GraphicsContext usage as much as possible and replace them by corresponding callbacks.
232
233         * platform/graphics/cairo/CairoOperations.cpp:
234         (WebCore::Cairo::drawShadowImage):
235         This function corresponds to ShadowBlur::DrawImageCallback.
236
237         (WebCore::Cairo::fillShadowBuffer):
238         Erase sourceRect, as it's always bigger than layerSize.
239
240         (WebCore::Cairo::drawPathShadow):
241         (WebCore::Cairo::drawGlyphsShadow):
242         Erase unused parameter.
243
244         (WebCore::Cairo::fillRect):
245         (WebCore::Cairo::fillRoundedRect):
246         (WebCore::Cairo::fillRectWithRoundedHole):
247         For tile-based optimization, add extra arguments to drawRectShadow.
248
249         (WebCore::Cairo::drawSurface):
250         Erase unused parameter.
251
252 2019-05-03  Antti Koivisto  <antti@apple.com>
253
254         Add a quirk to make youtube navigation bar scrollable without mouse hover on iOS
255         https://bugs.webkit.org/show_bug.cgi?id=197555
256         <rdar://problem/49582231>
257
258         Reviewed by Brent Fulgham.
259
260         * css/StyleResolver.cpp:
261         (WebCore::StyleResolver::adjustRenderStyleForSiteSpecificQuirks):
262
263         Turn 'overflow:hidden' into 'overflow:auto' on element with id="guide-inner-content".
264
265         * page/Quirks.cpp:
266         (WebCore::Quirks::needsYouTubeOverflowScrollQuirk const):
267         * page/Quirks.h:
268
269 2019-05-03  Devin Rousso  <drousso@apple.com>
270
271         Web Inspector: Record actions performed on WebGL2RenderingContext
272         https://bugs.webkit.org/show_bug.cgi?id=176008
273         <rdar://problem/34213884>
274
275         Reviewed by Joseph Pecoraro.
276
277         Tests: inspector/canvas/recording-webgl2.html
278                inspector/canvas/recording-webgl2-snapshots.html
279
280         * html/canvas/WebGL2RenderingContext.idl:
281
282         * bindings/js/CallTracerTypes.h:
283         * inspector/RecordingSwizzleTypes.h:
284
285         * inspector/InspectorCanvas.h:
286         * inspector/InspectorCanvas.cpp:
287         (WebCore::InspectorCanvas::canvasChanged): Added.
288         (WebCore::InspectorCanvas::resetRecordingData):
289         (WebCore::shouldSnapshotWebGL2Action): Added.
290         (WebCore::InspectorCanvas::recordAction):
291         (WebCore::InspectorCanvas::releaseObjectForRecording):
292         (WebCore::InspectorCanvas::appendActionSnapshotIfNeeded):
293         (WebCore::InspectorCanvas::buildAction):
294         * inspector/agents/InspectorCanvasAgent.h:
295         * inspector/agents/InspectorCanvasAgent.cpp:
296         (WebCore::InspectorCanvasAgent::canvasChanged): Added.
297         (WebCore::InspectorCanvasAgent::startRecording):
298         Provide an actual implementation of `CanvasObserver::canvasChanged` since it can be used to
299         determine whether or not an action needs a snapshot.
300
301         * page/PageConsoleClient.cpp:
302         (WebCore::canvasRenderingContext):
303
304 2019-05-03  Commit Queue  <commit-queue@webkit.org>
305
306         Unreviewed, rolling out r244881.
307         https://bugs.webkit.org/show_bug.cgi?id=197559
308
309         Breaks compilation of jsconly on linux, breaking compilation
310         for jsc-i386-ews, jsc-mips-ews and jsc-armv7-ews (Requested by
311         guijemont on #webkit).
312
313         Reverted changeset:
314
315         "[CMake] Refactor WEBKIT_MAKE_FORWARDING_HEADERS into
316         WEBKIT_COPY_FILES"
317         https://bugs.webkit.org/show_bug.cgi?id=197174
318         https://trac.webkit.org/changeset/244881
319
320 2019-05-03  Joonghun Park  <jh718.park@samsung.com>
321
322         Resolve the percentage values of inset properties against proper box.
323         https://bugs.webkit.org/show_bug.cgi?id=189549
324
325         Reviewed by Antti Koivisto.
326
327         Before this CL, sticky element's layout was executed relative to
328         a box's overflow container,
329         but the value returned by getComputedStyle was resolved against
330         its containing block.
331
332         So, the computed value and the actual value used in layout
333         was different before this change.
334
335         Tests: imported/w3c/web-platform-tests/css/cssom/getComputedStyle-insets-sticky-container-for-abspos.html
336                imported/w3c/web-platform-tests/css/cssom/getComputedStyle-sticky-pos-percent.html
337
338         * css/CSSComputedStyleDeclaration.cpp:
339         (WebCore::positionOffsetValue):
340         * rendering/RenderBox.cpp:
341         (WebCore::RenderBox::enclosingScrollportBox const):
342         * rendering/RenderBox.h:
343
344 2019-05-02  Antti Koivisto  <antti@apple.com>
345
346         Add a quirk to make gmail navigation bar scrollable without mouse hover on iOS
347         https://bugs.webkit.org/show_bug.cgi?id=197529
348         <rdar://problem/49403416>
349
350         Reviewed by Simon Fraser.
351
352         * css/StyleResolver.cpp:
353         (WebCore::StyleResolver::adjustRenderStyle):
354         (WebCore::StyleResolver::adjustRenderStyleForSiteSpecificQuirks):
355
356         Turn 'overflow:hidden' to 'overflow:auto' on element with role="navigation".
357         This should be both reasonably targeted and robust.
358
359         * css/StyleResolver.h:
360         * page/Quirks.cpp:
361         (WebCore::Quirks::needsGMailOverflowScrollQuirk const):
362         * page/Quirks.h:
363
364 2019-05-02  Simon Fraser  <simon.fraser@apple.com>
365
366         Add logging for RenderLayer clip rects
367         https://bugs.webkit.org/show_bug.cgi?id=197547
368
369         Reviewed by Zalan Bujtas.
370
371         Add a ClipRects log channel, and stream output for ClipRect and ClipRects.
372
373         * platform/Logging.h:
374         * rendering/ClipRect.cpp:
375         (WebCore::operator<<):
376         * rendering/ClipRect.h:
377         * rendering/RenderLayer.cpp:
378         (WebCore::operator<<):
379         (WebCore::RenderLayer::calculateClipRects const):
380         * rendering/RenderLayer.h:
381
382 2019-05-02  Youenn Fablet  <youenn@apple.com>
383
384         Make AudioContext::scriptExecutionContext() private
385         https://bugs.webkit.org/show_bug.cgi?id=197512
386
387         Reviewed by Eric Carlson.
388
389         Refactor code to make audio nodes not rely on AudioContext::scriptExecutionContext.
390         Instead, let AudioContext provide the necessary API for its nodes.
391         Covered by existing tests.
392
393         * Modules/webaudio/AudioBufferSourceNode.cpp:
394         (WebCore::AudioBufferSourceNode::looping):
395         (WebCore::AudioBufferSourceNode::setLooping):
396         * Modules/webaudio/AudioContext.cpp:
397         (WebCore::AudioContext::postTask):
398         (WebCore::AudioContext::origin const):
399         (WebCore::AudioContext::addConsoleMessage):
400         * Modules/webaudio/AudioContext.h:
401         (WebCore::AudioContext::isStopped const):
402         * Modules/webaudio/AudioNode.cpp:
403         (WebCore::AudioNode::scriptExecutionContext const):
404         * Modules/webaudio/AudioNode.h:
405         * Modules/webaudio/AudioScheduledSourceNode.cpp:
406         (WebCore::AudioScheduledSourceNode::finish):
407         * Modules/webaudio/DefaultAudioDestinationNode.cpp:
408         (WebCore::DefaultAudioDestinationNode::resume):
409         (WebCore::DefaultAudioDestinationNode::suspend):
410         (WebCore::DefaultAudioDestinationNode::close):
411         * Modules/webaudio/MediaElementAudioSourceNode.cpp:
412         (WebCore::MediaElementAudioSourceNode::wouldTaintOrigin):
413         * Modules/webaudio/MediaStreamAudioDestinationNode.cpp:
414         (WebCore::MediaStreamAudioDestinationNode::MediaStreamAudioDestinationNode):
415         * Modules/webaudio/ScriptProcessorNode.cpp:
416         (WebCore::ScriptProcessorNode::fireProcessEvent):
417
418 2019-05-02  Ryosuke Niwa  <rniwa@webkit.org>
419
420         Disable software keyboard for a math field textarea on desmos.com
421         https://bugs.webkit.org/show_bug.cgi?id=197488
422
423         Reviewed by Wenson Hsieh.
424
425         Treat a textarea inside a math field span as if it had inputmode content attribute set to none to suppress
426         the software keyboard on desmos.com as it interferes with website's own UI.
427
428         * html/HTMLElement.cpp:
429         (WebCore::HTMLElement::canonicalInputMode const):
430         * page/Quirks.cpp:
431         (WebCore::Quirks::needsInputModeNoneImplicitly const):
432         * page/Quirks.h:
433
434 2019-05-02  Timothy Hatcher  <timothy@apple.com>
435
436         NSAttributedString conversion in a loop returns nil and WKUnknownError every other time.
437         https://bugs.webkit.org/show_bug.cgi?id=197523
438
439         Reviewed by Darin Adler.
440
441         * editing/cocoa/HTMLConverter.mm:
442         (HTMLConverter::convert): Don't return early if m_dataSource is nil. This is already null
443         checked later and only needed in specific cases, it shouldn't fail the whole conversion.
444
445 2019-05-02  Chris Dumez  <cdumez@apple.com>
446
447         Setting a frame's src to a javascript URL should not run it synchronously
448         https://bugs.webkit.org/show_bug.cgi?id=197466
449
450         Reviewed by Darin Adler.
451
452         When an iframe's src attribute is set to a javascript URL, whether when parsing
453         or later on via JS, we now execute the URL's JavaScript asynchronously. We used
454         to execute it synchronously, which was a source of bugs and also did not match
455         other browsers.
456
457         I have verified that our new behavior is aligned with both Firefox and Chrome.
458
459         Note that for backward-compatibility and interoperability with Blink
460         (https://bugs.chromium.org/p/chromium/issues/detail?id=923585), the
461         "javascript:''" URL will still run synchronously. We should consider dropping
462         this quirk at some point.
463
464         Test: fast/dom/frame-src-javascript-url-async.html
465
466         * loader/NavigationScheduler.cpp:
467         (WebCore::ScheduledLocationChange::ScheduledLocationChange):
468         (WebCore::ScheduledLocationChange::~ScheduledLocationChange):
469         (WebCore::NavigationScheduler::scheduleLocationChange):
470         * loader/NavigationScheduler.h:
471         (WebCore::NavigationScheduler::scheduleLocationChange):
472         * loader/SubframeLoader.cpp:
473         (WebCore::SubframeLoader::requestFrame):
474
475 2019-05-02  Gary Katsevman  <git@gkatsev.com>
476
477         WebVTT: fix vertical cue alignment.
478         https://bugs.webkit.org/show_bug.cgi?id=136627.
479         <rdar://problem/49725538>
480
481         Reviewed by Eric Carlson.
482
483         Updated existing test results.
484
485         * html/track/VTTCue.cpp:
486         (WebCore::VTTCueBox::applyCSSProperties):
487
488 2019-05-02  Don Olmstead  <don.olmstead@sony.com>
489
490         [CMake] Refactor WEBKIT_MAKE_FORWARDING_HEADERS into WEBKIT_COPY_FILES
491         https://bugs.webkit.org/show_bug.cgi?id=197174
492
493         Reviewed by Alex Christensen.
494
495         Replace WEBKIT_MAKE_FORWARDING_HEADERS with WEBKIT_COPY_FILES and make dependencies
496         for framework headers explicit.
497
498         * CMakeLists.txt:
499
500 2019-05-02  Jiewen Tan  <jiewen_tan@apple.com>
501
502         [WebAuthN] Add a quirk for google.com when processing AppID extension
503         https://bugs.webkit.org/show_bug.cgi?id=196046
504         <rdar://problem/49088479>
505
506         Reviewed by Brent Fulgham.
507
508         Relaxing the same site restriction on AppID while in google.com and any
509         of its subdomains to allow two www.gstatic.com AppIDs to slip in.
510
511         Covered by manual tests on Google.com.
512
513         * Modules/webauthn/AuthenticatorCoordinator.cpp:
514         (WebCore::AuthenticatorCoordinatorInternal::needsAppIdQuirks):
515         (WebCore::AuthenticatorCoordinatorInternal::processAppIdExtension):
516
517 2019-05-02  Ross Kirsling  <ross.kirsling@sony.com>
518
519         Unreviewed fix for non-unified build after r244853.
520
521         * page/SecurityOrigin.cpp:
522
523 2019-05-02  Frederic Wang  <fwang@igalia.com>
524
525         [GTK][WPE] Disable "thin", "thick", "medium" values of mfrac@linethickness at runtime
526         https://bugs.webkit.org/show_bug.cgi?id=196142
527
528         This patch introduces some experimental runtime flag to let users
529         disable MathML features that are removed from MathML Core [1]. For now,
530         these features are only disabled on GTK and WPE ports. This patch also
531         adds a condition to disable "thin", "thick", "medium" values of
532         mfrac@linethickness at runtime as agreed in [2].
533
534         [1] https://mathml-refresh.github.io/mathml-core/
535         [2] https://github.com/mathml-refresh/mathml/issues/4
536
537         Reviewed by Rob Buis.
538
539         No new tests, covered by frac-linethickness-0001.html
540
541         * mathml/MathMLFractionElement.cpp:
542         (WebCore::MathMLFractionElement::lineThickness): Just do standard
543         parsing for MathML lengths when non-core MathML features are disabled.
544         * page/Settings.yaml: Add WebCore setting.
545
546 2019-05-01  Jiewen Tan  <jiewen_tan@apple.com>
547
548         [WebAuthN] Adopt SecurityOrigin::isMatchingRegistrableDomainSuffix()
549         https://bugs.webkit.org/show_bug.cgi?id=197481
550
551         Reviewed by Brent Fulgham.
552
553         This patch implements Step 6-7 from:
554         https://www.w3.org/TR/webauthn/#createCredential,
555         https://www.w3.org/TR/webauthn/#discover-from-external-source.
556
557         Test: http/wpt/webauthn/public-key-credential-ip-address.html
558
559         * Modules/webauthn/AuthenticatorCoordinator.cpp:
560         (WebCore::AuthenticatorCoordinator::create const):
561         (WebCore::AuthenticatorCoordinator::discoverFromExternalSource const):
562
563 2019-05-01  Youenn Fablet  <youenn@apple.com>
564
565         Add back hasNullReferences() assert in Document::updateIsPlayingMedia
566         https://bugs.webkit.org/show_bug.cgi?id=197477
567
568         Reviewed by Eric Carlson.
569
570         AudioContext had a special scriptExecutionContext() getter
571         that was returning nullptr when AudioContext is stopped.
572         Instead, make this getter behave as all other scriptExecutionContext() getters
573         and make sure existing call sites of the getter are fine with the change.
574
575         Covered by existing tests.
576
577         * Modules/webaudio/AudioContext.cpp:
578         (WebCore::AudioContext::AudioContext):
579         No need to check whether offline since this constructor is for non offline AudioContext.
580         (WebCore::AudioContext::scriptExecutionContext const):
581         (WebCore::AudioContext::fireCompletionEvent):
582         * dom/Document.cpp:
583         (WebCore::Document::updateIsPlayingMedia):
584
585 2019-05-01  Justin Fan  <justin_fan@apple.com>
586
587         Update WebGPU class names based on sketch.idl
588         https://bugs.webkit.org/show_bug.cgi?id=194260
589
590         Reviewed by Dean Jackson.
591
592         Update all exposed Web GPU interface names to GPU* prefix.
593
594         Existing Web GPU tests updated to expect new names.
595
596         * Modules/webgpu/WebGPU.idl:
597         * Modules/webgpu/WebGPUAdapter.idl:
598         * Modules/webgpu/WebGPUBindGroup.idl:
599         * Modules/webgpu/WebGPUBindGroupLayout.idl:
600         * Modules/webgpu/WebGPUBuffer.idl:
601         * Modules/webgpu/WebGPUDevice.idl:
602         * Modules/webgpu/WebGPUInputStepMode.h: Removed.
603         * Modules/webgpu/WebGPUPipelineLayout.idl:
604         * Modules/webgpu/WebGPUProgrammablePassEncoder.idl:
605         * Modules/webgpu/WebGPUQueue.idl:
606         * Modules/webgpu/WebGPURenderPassEncoder.idl:
607         * Modules/webgpu/WebGPURenderPipeline.idl:
608         * Modules/webgpu/WebGPUSampler.idl:
609         * Modules/webgpu/WebGPUTexture.idl:
610         * Modules/webgpu/WebGPUTextureView.idl:
611         * WebCore.xcodeproj/project.pbxproj:
612         * bindings/js/WebCoreBuiltinNames.h:
613
614 2019-05-01  Jiewen Tan  <jiewen_tan@apple.com>
615
616         Move Document::domainIsRegisterable to SecurityOrigin::isMatchingRegistrableDomainSuffix
617         https://bugs.webkit.org/show_bug.cgi?id=181950
618         <rdar://problem/43357371>
619
620         Reviewed by Brent Fulgham.
621
622         This patch moves Document::domainIsRegisterable to SecurityOrigin::isMatchingRegistrableDomainSuffix
623         to be more aligned with the HTML standard:
624         https://html.spec.whatwg.org/multipage/origin.html#is-a-registrable-domain-suffix-of-or-is-equal-to.
625         Besides that, it also removes redundant codes within the original method that is also done in
626         OriginAccessEntry::matchesOrigin.
627
628         Covered by new API tests.
629
630         * dom/Document.cpp:
631         (WebCore::Document::setDomain):
632         (WebCore::Document::domainIsRegisterable const): Deleted.
633         * dom/Document.h:
634         * page/SecurityOrigin.cpp:
635         (WebCore::SecurityOrigin::isMatchingRegistrableDomainSuffix const):
636         * page/SecurityOrigin.h:
637
638 2019-05-01  Ryosuke Niwa  <rniwa@webkit.org>
639
640         [iOS] Element::focus and Element::scrollIntoView do not clamp scroll positions
641         https://bugs.webkit.org/show_bug.cgi?id=197211
642
643         Reviewed by Simon Fraser.
644
645         Fixed the bug that Element::focus and Element::scrollIntoView were not clamping scroll offsets,
646         which causes scrollTop etc... to return a bogus negative scrolling offset.
647
648         Unfortunately, we can't just use FrameView's ScrollableArea::constrainScrollPosition since
649         scrollRectToVisible relies on the visible rect being expanded by the content insets in order to scroll to
650         a position within the content insets of UIScrollView; e.g. revealing the top of the page as the center.
651         We manually expand minimumScrollPosition() and maximumScrollPosition() by the content insets instead.
652
653         Tests: fast/scrolling/ios/programmatic-scroll-via-focus-should-clamp-top.html
654                fast/scrolling/ios/programmatic-scroll-via-scrollIntoView-inside-iframe-should-clamp-top.html
655                fast/scrolling/ios/programmatic-scroll-via-scrollIntoView-should-clamp-top.html
656
657         * rendering/RenderLayer.cpp:
658         (WebCore::RenderLayer::scrollRectToVisible):
659
660 2019-05-01  Wenson Hsieh  <wenson_hsieh@apple.com>
661
662         [iOS] Add a version of viewport shrink-to-fit heuristics that preserves page layout
663         https://bugs.webkit.org/show_bug.cgi?id=197342
664         <rdar://problem/50063091>
665
666         Reviewed by Tim Horton.
667
668         Adds support for a new shrink-to-fit heuristic that attempts to lay out the contents of the page at a larger
669         width in order to shrink content to fit the viewport. See WebKit ChangeLog for more details.
670
671         Tests: fast/viewport/ios/shrink-to-fit-content-constant-width.html
672                fast/viewport/ios/shrink-to-fit-content-large-width-breakpoint.html
673                fast/viewport/ios/shrink-to-fit-content-no-viewport.html
674                fast/viewport/ios/shrink-to-fit-content-responsive-viewport-with-horizontal-overflow.html
675                fast/viewport/ios/shrink-to-fit-content-temporary-overflow.html
676
677         * page/ViewportConfiguration.cpp:
678         (WebCore::ViewportConfiguration::setMinimumEffectiveDeviceWidth):
679         (WebCore::ViewportConfiguration::setIsKnownToLayOutWiderThanViewport):
680         (WebCore::ViewportConfiguration::description const):
681         * page/ViewportConfiguration.h:
682         (WebCore::ViewportConfiguration::canIgnoreScalingConstraints const):
683         (WebCore::ViewportConfiguration::minimumEffectiveDeviceWidth const):
684
685         Add several new getters and setters in ViewportConfiguration.
686
687         (WebCore::ViewportConfiguration::isKnownToLayOutWiderThanViewport const):
688         (WebCore::ViewportConfiguration::shouldIgnoreMinimumEffectiveDeviceWidth const):
689
690         Importantly, only allow ignoring the minimum effective device width in webpages with responsive viewports, if
691         they also have *not* laid out wider than the viewport.
692
693         (WebCore::ViewportConfiguration::setForceAlwaysUserScalable):
694
695 2019-05-01  Zalan Bujtas  <zalan@apple.com>
696
697         [iOS] Star rating is covered with a black circle when writing a review on Yelp
698         https://bugs.webkit.org/show_bug.cgi?id=197469
699         <rdar://problem/48094446>
700
701         Reviewed by Dean Jackson.
702
703         This patch moves the background painting of the radio/checkbox form controls in checked state to RenderTheme.
704         It enables content authors to disable default appearance using -webkit-appearance: none (it is also inline with what we do on macOS).
705
706         Test: fast/forms/radio-and-checkbox-checked-with-no-appearance.html
707
708         * css/html.css:
709         (input:matches([type="checkbox"], [type="radio"]):checked):
710         * rendering/RenderThemeIOS.mm:
711         (WebCore::RenderThemeIOS::paintCheckboxDecorations):
712         (WebCore::RenderThemeIOS::paintRadioDecorations):
713
714 2019-05-01  Said Abou-Hallawa  <sabouhallawa@apple.com>
715
716         REGRESSION (r244182): RenderingUpdate should not be scheduled for invisible pages
717         https://bugs.webkit.org/show_bug.cgi?id=197451
718
719         Reviewed by Simon Fraser.
720
721         Before r244182, some web pages never need to schedule a RenderingUpdate.
722         Only pages with rAF callbacks, web animations, intersection and resize 
723         observers needed to do so. After r244182, all pages have to schedule a
724         RenderingUpdate when a page rendering update is required.
725
726         When Safari opens, it create a 'blank' web page. The blank page will not
727         be visible unless the user selects to show the 'Empty page' in the new
728         tab. Although the blank page is not visible, the loader needs to resolveStyle()
729         which requires to scheduleLayerFlushNow(). 
730
731         We need to optimize this case: calling scheduleLayerFlushNow() for invisible
732         pages. We do that by checking if the page is visible before scheduling
733         the RenderingUpdate.
734
735         Also we need to change or get rid of scheduleLayerFlushNow() since its name
736         has become confusing. It suggests that it is going to schedule flushing
737         the layer 'now'. But after r244182, it does scheduleRenderingUpdate() first.
738         And when it fires, scheduleCompositingLayerFlush() will be called.
739
740         * page/RenderingUpdateScheduler.cpp:
741         (WebCore::RenderingUpdateScheduler::scheduleRenderingUpdate):
742         * rendering/RenderLayerCompositor.cpp:
743         (WebCore::RenderLayerCompositor::scheduleLayerFlush):
744         (WebCore::RenderLayerCompositor::didChangeVisibleRect):
745         (WebCore::RenderLayerCompositor::frameViewDidScroll):
746         (WebCore::RenderLayerCompositor::attachRootLayer):
747         (WebCore::RenderLayerCompositor::setLayerFlushThrottlingEnabled):
748         (WebCore::RenderLayerCompositor::layerFlushTimerFired):
749         (WebCore::RenderLayerCompositor::scheduleLayerFlushNow): Deleted.
750         * rendering/RenderLayerCompositor.h:
751
752 2019-05-01  Darin Adler  <darin@apple.com>
753
754         WebKit has too much of its own UTF-8 code and should rely more on ICU's UTF-8 support
755         https://bugs.webkit.org/show_bug.cgi?id=195535
756
757         Reviewed by Alexey Proskuryakov.
758
759         * platform/SharedBuffer.cpp:
760         (WebCore::utf8Buffer): Removed unnecessary "strict" argument to convertUTF16ToUTF8 since
761         that is the default behavior. Also updated for changes to return values.
762
763         * xml/XSLTProcessorLibxslt.cpp:
764         (WebCore::writeToStringBuilder): Removed unnecessary use of StringBuffer for a temporary
765         buffer for characters. Rewrote to use U8_NEXT and U16_APPEND directly.
766
767         * xml/parser/XMLDocumentParserLibxml2.cpp:
768         (WebCore::convertUTF16EntityToUTF8): Updated for changes to CompletionResult.
769
770 2019-05-01  Shawn Roberts  <sroberts@apple.com>
771
772         Unreviewed, rolling out r244821.
773
774         Causing
775
776         Reverted changeset:
777
778         "WebKit has too much of its own UTF-8 code and should rely
779         more on ICU's UTF-8 support"
780         https://bugs.webkit.org/show_bug.cgi?id=195535
781         https://trac.webkit.org/changeset/244821
782
783 2019-05-01  Shawn Roberts  <sroberts@apple.com>
784
785         Unreviewed, rolling out r244822.
786
787         Causing
788
789         Reverted changeset:
790
791         https://trac.webkit.org/changeset/244822
792
793 2019-05-01  Youenn Fablet  <youenn@apple.com>
794
795         Reject/throw when calling AudioContext methods on a stopped AudioContext
796         https://bugs.webkit.org/show_bug.cgi?id=197391
797
798         Reviewed by Eric Carlson.
799
800         Return InvalidStateError in that case.
801         ASSERT that we do not call lazyInitialize after being stopped
802         since this would mean we are doing unneeded processing.
803
804         Test: http/wpt/webaudio/audiocontext-stopped.html
805
806         * Modules/webaudio/AudioContext.cpp:
807         (WebCore::AudioContext::lazyInitialize):
808         (WebCore::AudioContext::createBufferSource):
809         (WebCore::AudioContext::createMediaElementSource):
810         (WebCore::AudioContext::createMediaStreamSource):
811         (WebCore::AudioContext::createMediaStreamDestination):
812         (WebCore::AudioContext::createScriptProcessor):
813         (WebCore::AudioContext::createBiquadFilter):
814         (WebCore::AudioContext::createWaveShaper):
815         (WebCore::AudioContext::createPanner):
816         (WebCore::AudioContext::createConvolver):
817         (WebCore::AudioContext::createDynamicsCompressor):
818         (WebCore::AudioContext::createAnalyser):
819         (WebCore::AudioContext::createGain):
820         (WebCore::AudioContext::createDelay):
821         (WebCore::AudioContext::createChannelSplitter):
822         (WebCore::AudioContext::createChannelMerger):
823         (WebCore::AudioContext::createOscillator):
824         (WebCore::AudioContext::createPeriodicWave):
825         (WebCore::AudioContext::startRendering):
826         (WebCore::AudioContext::suspend):
827         (WebCore::AudioContext::resume):
828         (WebCore::AudioContext::close):
829         * Modules/webaudio/AudioContext.h:
830         * Modules/webaudio/AudioContext.idl:
831
832 2019-05-01  Eric Carlson  <eric.carlson@apple.com>
833
834         XMLHttpRequest should propagate user gestures for media playback
835         https://bugs.webkit.org/show_bug.cgi?id=197428
836         <rdar://problem/46677392>
837
838         Reviewed by Jer Noble.
839
840         A user gesture the would allow media state change in effect when XMLHttpRequest.send is 
841         called should be active when the event handlers fire after the transaction completes successfully.
842
843         Test: http/tests/media/user-gesture-preserved-across-xmlhttprequest.html
844
845         * dom/UserGestureIndicator.cpp:
846         (WebCore::UserGestureIndicator::UserGestureIndicator): Add a 'scope' parameter to potentially
847         limit the scope of the gesture to just media.
848         (WebCore::UserGestureIndicator::~UserGestureIndicator): Clear the scope.
849         * dom/UserGestureIndicator.h:
850         (WebCore::UserGestureToken::processingUserGesture const):
851         (WebCore::UserGestureToken::setScope):
852         (WebCore::UserGestureToken::resetScope):
853         (WebCore::UserGestureToken::hasExpired const):
854
855         * page/DOMTimer.cpp:
856         (WebCore::DOMTimerFireState::DOMTimerFireState): Don't need to store the nested timer interval,
857         UserGestureIndicator knows when it started.
858         (WebCore::DOMTimer::DOMTimer): Ditto.
859         (WebCore::DOMTimer::fired): Ditto.
860         (WebCore::DOMTimerFireState::nestedTimerInterval const): Deleted.
861         (WebCore::shouldForwardUserGesture): Deleted.
862         (WebCore::userGestureTokenToForward): Deleted.
863         (WebCore::currentNestedTimerInterval): Deleted.
864         * page/DOMTimer.h:
865
866         * testing/Internals.cpp:
867         (WebCore::Internals::setXHRMaximumIntervalForUserGestureForwarding): Override the maximum
868         user gesture interval for testing.
869         * testing/Internals.h:
870         * testing/Internals.idl:
871
872         * xml/XMLHttpRequest.cpp:
873         (WebCore::XMLHttpRequest::XMLHttpRequest): 
874         (WebCore::XMLHttpRequest::send): Stash the user gesture token.
875         (WebCore::XMLHttpRequest::dispatchEvent): Clear user gesture token if it has expired. If still
876         valid, activate it.
877         * xml/XMLHttpRequest.h:
878
879 2019-04-29  Darin Adler  <darin@apple.com>
880
881         WebKit has too much of its own UTF-8 code and should rely more on ICU's UTF-8 support
882         https://bugs.webkit.org/show_bug.cgi?id=195535
883
884         Reviewed by Alexey Proskuryakov.
885
886         * platform/SharedBuffer.cpp:
887         (WebCore::utf8Buffer): Removed unnecessary "strict" argument to convertUTF16ToUTF8 since
888         that is the default behavior. Also updated for changes to return values.
889
890         * xml/XSLTProcessorLibxslt.cpp:
891         (WebCore::writeToStringBuilder): Removed unnecessary use of StringBuffer for a temporary
892         buffer for characters. Rewrote to use U8_NEXT and U16_APPEND directly.
893
894         * xml/parser/XMLDocumentParserLibxml2.cpp:
895         (WebCore::convertUTF16EntityToUTF8): Updated for changes to CompletionResult.
896
897 2019-04-30  John Wilander  <wilander@apple.com>
898
899         Add logging of Ad Click Attribution errors and events to a dedicated channel
900         https://bugs.webkit.org/show_bug.cgi?id=197332
901         <rdar://problem/49918800>
902
903         Reviewed by Youenn Fablet.
904
905         This patch adds an experimental Ad Click Attribution debug mode which
906         logs information.
907
908         No new tests.
909
910         * loader/AdClickAttribution.cpp:
911         (WebCore::AdClickAttribution::parseConversionRequest):
912         (WebCore::AdClickAttribution::debugModeEnabled):
913         * loader/AdClickAttribution.h:
914         * page/RuntimeEnabledFeatures.h:
915         (WebCore::RuntimeEnabledFeatures::adClickAttributionDebugModeEnabled const):
916         (WebCore::RuntimeEnabledFeatures::setAdClickAttributionDebugModeEnabled):
917         * platform/Logging.h:
918
919 2019-04-30  Myles C. Maxfield  <mmaxfield@apple.com>
920
921         font-weight: 1000 is not parsed successfully
922         https://bugs.webkit.org/show_bug.cgi?id=197427
923
924         Reviewed by Dean Jackson.
925
926         The spec says:
927         "Only values greater than or equal to 1, and less than or equal to 1000, are valid"
928
929         This change brings us in-line with all the other browsers.
930
931         Test: fast/text/font-weight-1-1000.html
932
933         * css/parser/CSSPropertyParserHelpers.cpp:
934         (WebCore::CSSPropertyParserHelpers::consumeFontWeightNumber):
935
936 2019-04-30  Youenn Fablet  <youenn@apple.com>
937
938         Make Document audio producers use WeakPtr
939         https://bugs.webkit.org/show_bug.cgi?id=197382
940
941         Reviewed by Eric Carlson.
942
943         Move from a hash set of raw pointers to a hash set of weak pointers.
944         This helps make the code cleaner.
945         No observable change of behavior.
946
947         * Modules/mediastream/MediaStreamTrack.h:
948         * dom/Document.cpp:
949         (WebCore::Document::addAudioProducer):
950         (WebCore::Document::removeAudioProducer):
951         (WebCore::Document::updateIsPlayingMedia):
952         (WebCore::Document::pageMutedStateDidChange):
953         * dom/Document.h:
954         * html/HTMLMediaElement.cpp:
955         (WebCore::HTMLMediaElement::updateActiveTextTrackCues):
956         * html/HTMLMediaElement.h:
957         * page/MediaProducer.h:
958
959 2019-04-30  Youenn Fablet  <youenn@apple.com>
960
961         [macOS WK1] ASSERTION FAILED: formData in WebCore::ResourceRequest::doUpdateResourceHTTPBody()
962         https://bugs.webkit.org/show_bug.cgi?id=196864
963         <rdar://problem/49854497>
964
965         Reviewed by Alex Christensen.
966
967         In case of redirection, it is sometimes not possible to retrieve the form data
968         from its NSInputStream in case of redirections.
969         To handle this case, reuse the first request form data if the new request has a body.
970         We also clear the HTTP content type in such a case if the original request has no content type.
971
972         Covered by re-enabled tests.
973
974         * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm:
975         (-[WebCoreResourceHandleAsOperationQueueDelegate connection:willSendRequest:redirectResponse:]):
976
977 2019-04-30  Commit Queue  <commit-queue@webkit.org>
978
979         Unreviewed, rolling out r244773.
980         https://bugs.webkit.org/show_bug.cgi?id=197436
981
982         Causing assertion failures on debug queues (Requested by
983         ShawnRoberts on #webkit).
984
985         Reverted changeset:
986
987         "Make Document audio producers use WeakPtr"
988         https://bugs.webkit.org/show_bug.cgi?id=197382
989         https://trac.webkit.org/changeset/244773
990
991 2019-04-30  Commit Queue  <commit-queue@webkit.org>
992
993         Unreviewed, rolling out r244774.
994         https://bugs.webkit.org/show_bug.cgi?id=197431
995
996         Causing assertion failures on debug queues (Requested by
997         ShawnRoberts on #webkit).
998
999         Reverted changeset:
1000
1001         "Reject/throw when calling AudioContext methods on a stopped
1002         AudioContext"
1003         https://bugs.webkit.org/show_bug.cgi?id=197391
1004         https://trac.webkit.org/changeset/244774
1005
1006 2019-04-30  Alex Christensen  <achristensen@webkit.org>
1007
1008         Add WKContentRuleList ping resource-type
1009         https://bugs.webkit.org/show_bug.cgi?id=197325
1010         <rdar://problem/49841404>
1011
1012         Reviewed by Geoff Garen.
1013
1014         Tests: http/tests/contentextensions/block-ping-resource-type-ping.html and http/tests/contentextensions/block-ping-resource-type-raw.html
1015
1016         * contentextensions/ContentExtensionsBackend.cpp:
1017         (WebCore::ContentExtensions::ContentExtensionsBackend::processContentRuleListsForLoad):
1018         * contentextensions/ContentExtensionsBackend.h:
1019         * loader/PingLoader.cpp:
1020         (WebCore::processContentRuleListsForLoad):
1021         (WebCore::PingLoader::sendPing):
1022         * loader/ResourceLoadInfo.cpp:
1023         (WebCore::ContentExtensions::readResourceType):
1024         (WebCore::ContentExtensions::ResourceLoadInfo::getResourceFlags const):
1025         * loader/ResourceLoadInfo.h:
1026         * page/UserContentProvider.cpp:
1027         (WebCore::UserContentProvider::processContentRuleListsForLoad):
1028         * page/UserContentProvider.h:
1029
1030 2019-04-30  Justin Fan  <justin_fan@apple.com>
1031
1032         [WebGPU] Move 'gpu' API entry point from DOMWindow to Navigator
1033         https://bugs.webkit.org/show_bug.cgi?id=197348
1034
1035         Reviewed by Myles C. Maxfield.
1036
1037         Latest API provides 'gpu' through Navigator instead of DOMWindow. Replace DOMWindowWebGPU with NavigatorGPU.
1038
1039         Existing tests updated to match. Add test: webgpu-enabled-in-worker.html to ensure workers can access WebGPU.
1040
1041         * CMakeLists.txt:
1042         * DerivedSources.make:
1043         * Modules/webgpu/NavigatorGPU.cpp:
1044         (WebCore::NavigatorGPU::from):
1045         (WebCore::NavigatorGPU::supplementName):
1046         (WebCore::NavigatorGPU::gpu):
1047         (WebCore::NavigatorGPU::gpu const):
1048         * Modules/webgpu/NavigatorGPU.h:
1049         * Modules/webgpu/NavigatorGPU.idl:
1050         * Modules/webgpu/WorkerNavigatorGPU.cpp:
1051         (WebCore::WorkerNavigatorGPU::from):
1052         (WebCore::WorkerNavigatorGPU::supplementName):
1053         (WebCore::WorkerNavigatorGPU::gpu):
1054         (WebCore::WorkerNavigatorGPU::gpu const):
1055         * Modules/webgpu/WorkerNavigatorGPU.h:
1056         * Modules/webgpu/WorkerNavigatorGPU.idl:
1057         * Sources.txt:
1058         * WebCore.xcodeproj/project.pbxproj:
1059
1060 2019-04-30  Zalan Bujtas  <zalan@apple.com>
1061
1062         Double-tapping a post to like doesn't work on Instagram.com (needs 'dblclick' event)
1063         https://bugs.webkit.org/show_bug.cgi?id=197347
1064         <rdar://problem/49393423>
1065
1066         Reviewed by Wenson Hsieh.
1067
1068         Tests: fast/events/touch/ios/double-tap-for-double-click1.html
1069                fast/events/touch/ios/double-tap-for-double-click2.html
1070
1071         * page/Frame.h:
1072         * page/ios/FrameIOS.mm:
1073         (WebCore::Frame::nodeRespondingToDoubleClickEvent):
1074
1075 2019-04-30  Youenn Fablet  <youenn@apple.com>
1076
1077         Reject/throw when calling AudioContext methods on a stopped AudioContext
1078         https://bugs.webkit.org/show_bug.cgi?id=197391
1079
1080         Reviewed by Eric Carlson.
1081
1082         Return InvalidStateError in that case.
1083         ASSERT that we do not call lazyInitialize after being stopped
1084         since this would mean we are doing unneeded processing.
1085
1086         Test: http/wpt/webaudio/audiocontext-stopped.html
1087
1088         * Modules/webaudio/AudioContext.cpp:
1089         (WebCore::AudioContext::lazyInitialize):
1090         (WebCore::AudioContext::createBufferSource):
1091         (WebCore::AudioContext::createMediaElementSource):
1092         (WebCore::AudioContext::createMediaStreamSource):
1093         (WebCore::AudioContext::createMediaStreamDestination):
1094         (WebCore::AudioContext::createScriptProcessor):
1095         (WebCore::AudioContext::createBiquadFilter):
1096         (WebCore::AudioContext::createWaveShaper):
1097         (WebCore::AudioContext::createPanner):
1098         (WebCore::AudioContext::createConvolver):
1099         (WebCore::AudioContext::createDynamicsCompressor):
1100         (WebCore::AudioContext::createAnalyser):
1101         (WebCore::AudioContext::createGain):
1102         (WebCore::AudioContext::createDelay):
1103         (WebCore::AudioContext::createChannelSplitter):
1104         (WebCore::AudioContext::createChannelMerger):
1105         (WebCore::AudioContext::createOscillator):
1106         (WebCore::AudioContext::createPeriodicWave):
1107         (WebCore::AudioContext::startRendering):
1108         (WebCore::AudioContext::suspend):
1109         (WebCore::AudioContext::resume):
1110         (WebCore::AudioContext::close):
1111         * Modules/webaudio/AudioContext.h:
1112         * Modules/webaudio/AudioContext.idl:
1113
1114 2019-04-30  Youenn Fablet  <youenn@apple.com>
1115
1116         Make Document audio producers use WeakPtr
1117         https://bugs.webkit.org/show_bug.cgi?id=197382
1118
1119         Reviewed by Eric Carlson.
1120
1121         Move from a hash set of raw pointers to a hash set of weak pointers.
1122         This helps make the code cleaner.
1123         No observable change of behavior.
1124
1125         * Modules/mediastream/MediaStreamTrack.h:
1126         * dom/Document.cpp:
1127         (WebCore::Document::addAudioProducer):
1128         (WebCore::Document::removeAudioProducer):
1129         (WebCore::Document::updateIsPlayingMedia):
1130         (WebCore::Document::pageMutedStateDidChange):
1131         * dom/Document.h:
1132         * html/HTMLMediaElement.cpp:
1133         (WebCore::HTMLMediaElement::updateActiveTextTrackCues):
1134         * html/HTMLMediaElement.h:
1135         * page/MediaProducer.h:
1136
1137 2019-04-30  Antti Koivisto  <antti@apple.com>
1138
1139         Tighten type of ScrollingTree:rootNode() to ScrollingTreeFrameScrollingNode
1140         https://bugs.webkit.org/show_bug.cgi?id=197414
1141
1142         Reviewed by Frédéric Wang.
1143
1144         * page/scrolling/ScrollingTree.cpp:
1145         (WebCore::ScrollingTree::shouldHandleWheelEventSynchronously):
1146         (WebCore::ScrollingTree::handleWheelEvent):
1147         (WebCore::ScrollingTree::mainFrameViewportChangedViaDelegatedScrolling):
1148         (WebCore::ScrollingTree::updateTreeFromStateNode):
1149         * page/scrolling/ScrollingTree.h:
1150         (WebCore::ScrollingTree::rootNode const):
1151
1152 2019-04-30  Youenn Fablet  <youenn@apple.com>
1153
1154         Refactor AudioContext to register/unregister itself at construction/destruction time
1155         https://bugs.webkit.org/show_bug.cgi?id=197383
1156
1157         Reviewed by Eric Carlson.
1158
1159         Registering/Unregistering is cheap.
1160         Instead of registering/unregistering in initialize/uninitialize,
1161         move this code to constructor/destructor.
1162         No observable change of behavior.
1163
1164         * Modules/webaudio/AudioContext.cpp:
1165         (WebCore::AudioContext::AudioContext):
1166         (WebCore::AudioContext::~AudioContext):
1167         (WebCore::AudioContext::lazyInitialize):
1168         (WebCore::AudioContext::uninitialize):
1169         (WebCore::AudioContext::visibilityStateChanged):
1170
1171 2019-04-30  Michael Catanzaro  <mcatanzaro@igalia.com>
1172
1173         WebCore::StyleColorScheme should not have explicitly-declared copy constructor
1174         https://bugs.webkit.org/show_bug.cgi?id=197412
1175
1176         Reviewed by Don Olmstead.
1177
1178         Either we need to explicitly declare a copy assignment operator here, or the copy
1179         constructor needs to be removed. Having one without the other causes a huge warning spam
1180         with GCC 9. In this case, the copy constructor is redundant because it's identical to an
1181         implicitly-declared copy constructor, so let's just remove it.
1182
1183         * rendering/style/StyleColorScheme.h:
1184
1185 2019-04-30  Carlos Garcia Campos  <cgarcia@igalia.com>
1186
1187         [GTK] Support prefers-color-scheme media query
1188         https://bugs.webkit.org/show_bug.cgi?id=196685
1189
1190         Reviewed by Michael Catanzaro.
1191
1192         Change the gtk-application-prefer-dark-theme setting when tests change the useDarkModeAppearance setting.
1193
1194         * PlatformGTK.cmake:
1195         * testing/InternalSettings.cpp:
1196         (WebCore::InternalSettings::resetToConsistentState):
1197         (WebCore::InternalSettings::setUseDarkAppearanceInternal):
1198         (WebCore::InternalSettings::setUseDarkAppearance):
1199         * testing/InternalSettings.h:
1200
1201 2019-04-29  Truitt Savell  <tsavell@apple.com>
1202
1203         Unreviewed, rolling out r244755.
1204
1205         Casued several test failures on iOS
1206
1207         Reverted changeset:
1208
1209         "Double-tapping a post to like doesn't work on Instagram.com
1210         (needs 'dblclick' event)"
1211         https://bugs.webkit.org/show_bug.cgi?id=197347
1212         https://trac.webkit.org/changeset/244755
1213
1214 2019-04-29  Alex Christensen  <achristensen@webkit.org>
1215
1216         <rdar://problem/50299396> Fix internal High Sierra build
1217         https://bugs.webkit.org/show_bug.cgi?id=197388
1218
1219         * Configurations/Base.xcconfig:
1220
1221 2019-04-29  Zalan Bujtas  <zalan@apple.com>
1222
1223         Double-tapping a post to like doesn't work on Instagram.com (needs 'dblclick' event)
1224         https://bugs.webkit.org/show_bug.cgi?id=197347
1225         <rdar://problem/49393423>
1226
1227         Reviewed by Wenson Hsieh.
1228
1229         Tests: fast/events/touch/ios/double-tap-for-double-click1.html
1230                fast/events/touch/ios/double-tap-for-double-click2.html
1231
1232         * page/Frame.h:
1233         * page/ios/FrameIOS.mm:
1234         (WebCore::Frame::nodeRespondingToDoubleClickEvent):
1235
1236 2019-04-30  Simon Fraser  <simon.fraser@apple.com>
1237
1238         Transform is sometimes left in a bad state after an animation
1239         https://bugs.webkit.org/show_bug.cgi?id=197401
1240         rdar://problem/48179186
1241
1242         Reviewed by Dean Jackson.
1243         
1244         In some more complex compositing scenarios, at the end of an animation we'd
1245         fail to push a new transform onto a layer, because updateGeometry() would
1246         think there's an animation running (which there is, but in the "Ending" state).
1247
1248         It's simpler in this code to just always push transform and opacity to the layer;
1249         they will get overridden by the animation while it's running. The current code
1250         dates from the first landing of the file, and the reason for the if (!isRunningAcceleratedTransformAnimation)
1251         check is lost in the sands of time.
1252
1253         I was not able to get a reliable ref or layer tree test for this, because the next compositing update
1254         fixes it, and WTR seems to trigger one.  But the added test does show the bug
1255         in Safari, and is a good test to have.
1256
1257         Test: compositing/animation/transform-after-animation.html
1258
1259         * rendering/RenderLayerBacking.cpp:
1260         (WebCore::RenderLayerBacking::updateGeometry):
1261
1262 2019-04-29  Youenn Fablet  <youenn@apple.com>
1263
1264         getDisplayMedia should be called on user gesture
1265         https://bugs.webkit.org/show_bug.cgi?id=197356
1266
1267         Reviewed by Eric Carlson.
1268
1269         Allow getDisplayMedia on user gesture only.
1270         Otherwise reject the promise.
1271         Minor refactoring to align getDisplayMedia, getUserMedia and
1272         enumerateDevices when called with no document.
1273
1274         Test: fast/mediastream/screencapture-user-gesture.html
1275
1276         * Modules/mediastream/MediaDevices.cpp:
1277         (WebCore::MediaDevices::getUserMedia const):
1278         * Modules/mediastream/MediaDevices.h:
1279         * Modules/mediastream/NavigatorMediaDevices.h:
1280         * page/DOMWindow.h:
1281         * testing/Internals.cpp:
1282         (WebCore::Internals::setDisableGetDisplayMediaUserGestureConstraint):
1283         * testing/Internals.h:
1284         * testing/Internals.idl:
1285
1286 2019-04-29  Javier Fernandez  <jfernandez@igalia.com>
1287
1288         line should not be broken before the first space after a word
1289         https://bugs.webkit.org/show_bug.cgi?id=197278
1290
1291         Reviewed by Myles C. Maxfield.
1292
1293         The 'white-space: break-spaces' only adds breaking opportunities after
1294         a white space character. However, it's possible to break before the
1295         first space after a word when the feature is used in combination with
1296         other properties, like overflow-wrap.
1297
1298         However, breaking before the first space should not be allowed if
1299         there are previous opportunities. We wrongly assumed that we had to
1300         consider these previous breaking opportunities if the proper combination
1301         of line breaking properties is being used, so that breaking before the
1302         first space after a word is allowed.
1303
1304         This wrong assumption caused several issues, like the one described in
1305         the bug, that lead to incorrectly break before the first space even
1306         though there are previous opportunities, either white spaces or between
1307         letters.
1308
1309         Theses issues have been analyzed [1] by the CSS WG and finally agreed on a
1310         expected behavior, represented in the Web Platform tests added in this
1311         patch.
1312
1313         For the later case, of considering previous opportunities between
1314         letters, we have a seperated issue #952254, so the tests covering such
1315         cases will be added to the TestExpecations as Failure entries.
1316
1317         [1] https://github.com/w3c/csswg-drafts/issues/3701
1318
1319         Tests: imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-001.html
1320                imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-002.html
1321                imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-003.html
1322                imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-004.html
1323                imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-005.html
1324                imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-006.html
1325                imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-007.html
1326                imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-008.html
1327                imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-009.html
1328                imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-010.html
1329                imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-011.html
1330                imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-012.html
1331                imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-013.html
1332
1333         * rendering/line/BreakingContext.h:
1334         (WebCore::BreakingContext::handleText):
1335         (WebCore::BreakingContext::trailingSpacesHang):
1336
1337 2019-04-29  Simon Fraser  <simon.fraser@apple.com>
1338
1339         REGRESSION (r238090): animation on https://www.robotodyssey.online gets stuck; site broken
1340         https://bugs.webkit.org/show_bug.cgi?id=197381
1341
1342         Reviewed by Zalan Bujtas.
1343
1344         When -webkit-clip-path changes on a composited layer, we need to trigger a backing geometry update
1345         to push the changes to GraphicsLayers.
1346
1347         Test: compositing/style-change/clip-path-change.html
1348
1349         * rendering/RenderLayerCompositor.cpp:
1350         (WebCore::recompositeChangeRequiresGeometryUpdate):
1351
1352 2019-04-29  Chris Dumez  <cdumez@apple.com>
1353
1354         User-facing strings should use curly quotes instead of straight
1355         https://bugs.webkit.org/show_bug.cgi?id=197370
1356
1357         Reviewed by Geoffrey Garen.
1358
1359         Update localizable strings.
1360
1361         * en.lproj/Localizable.strings:
1362
1363 2019-04-29  Ross Kirsling  <ross.kirsling@sony.com>
1364
1365         Unreviewed fix for non-unified build after r244687.
1366
1367         * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.h:
1368
1369 2019-04-29  Youenn Fablet  <youenn@apple.com>
1370
1371         RTCTrackEvent should be delayed until the whole remote description is set
1372         https://bugs.webkit.org/show_bug.cgi?id=196808
1373         <rdar://problem/49802649>
1374
1375         Reviewed by Eric Carlson.
1376
1377         As per https://w3c.github.io/webrtc-pc/#set-description,
1378         fire events just before resolving the setRemoteDescription promise.
1379         This ensures that the exposed stream has all necessary tracks from the beginning.
1380         Pending track events are created in LibWebRTCMediaEndpoint and stored in PeerConnectionBackend.
1381
1382         Covered by updated test.
1383
1384         * Modules/mediastream/PeerConnectionBackend.cpp:
1385         (WebCore::PeerConnectionBackend::setRemoteDescriptionSucceeded):
1386         (WebCore::PeerConnectionBackend::setRemoteDescriptionFailed):
1387         (WebCore::PeerConnectionBackend::addPendingTrackEvent):
1388         (WebCore::PeerConnectionBackend::stop):
1389         * Modules/mediastream/PeerConnectionBackend.h:
1390         * Modules/mediastream/RTCPeerConnection.cpp:
1391         * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:
1392         (WebCore::LibWebRTCMediaEndpoint::addRemoteTrack):
1393         (WebCore::LibWebRTCMediaEndpoint::addPendingTrackEvent):
1394         (WebCore::LibWebRTCMediaEndpoint::newTransceiver):
1395         * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h:
1396
1397 2019-04-25  Carlos Garcia Campos  <cgarcia@igalia.com>
1398
1399         REGRESSION(r244635): [GTK] Wrong background color used in non-dark mode
1400         https://bugs.webkit.org/show_bug.cgi?id=197276
1401
1402         Reviewed by Michael Catanzaro.
1403
1404         Since r244635, we are now getting the frame view background color from the theme. That's correct for dark mode,
1405         but in non-dark mode we still want to use white backgrounds by default. This made a lot of tests to fail.
1406
1407         * css/CSSValueKeywords.in: Add -webkit-control-background when HAVE(OS_DARK_MODE_SUPPORT).
1408         * css/html.css: Use -webkit-control-background instead of -apple-system-control-background.
1409         * page/FrameView.cpp:
1410         (WebCore::FrameView::updateBackgroundRecursively): Use CSSValueWindow instead of CSSValueWindowframe.
1411         * rendering/RenderThemeGtk.cpp:
1412         (WebCore::RenderThemeGtk::systemColor const): Only get the window background from the theme in dark mode. Handle
1413         also CSSValueWebkitControlBackground.
1414         * rendering/RenderThemeMac.mm:
1415         (WebCore::RenderThemeMac::systemColor const): Handle CSSValueWebkitControlBackground when HAVE(OS_DARK_MODE_SUPPORT).
1416
1417 2019-04-28  Andy Estes  <aestes@apple.com>
1418
1419         [Apple Pay] Increment the API version from 6 to 7
1420         https://bugs.webkit.org/show_bug.cgi?id=197041
1421         <rdar://problem/49986625>
1422
1423         Reviewed by Geoffrey Garen.
1424
1425         * Modules/applepay/PaymentCoordinatorClient.cpp:
1426         (WebCore::PaymentCoordinatorClient::supportsVersion):
1427
1428 2019-04-28  Andy Estes  <aestes@apple.com>
1429
1430         Fix the watchOS engineering build.
1431
1432         * Modules/webgpu/WebGPUComputePassEncoder.cpp: Included Logging.h.
1433
1434 2019-04-28  Youenn Fablet  <youenn@apple.com>
1435
1436         Remove no longer needed mDNS ICE candidate resolution code
1437         https://bugs.webkit.org/show_bug.cgi?id=197315
1438
1439         Reviewed by Eric Carlson.
1440
1441         No change of behavior.
1442         Removed code is no longer exercised as mDNS resolution happens inside libwebrtc
1443         using the same resolution mechanism as for TURN/STUN server names.
1444
1445         * Modules/mediastream/PeerConnectionBackend.cpp:
1446         (WebCore::PeerConnectionBackend::addIceCandidateSucceeded):
1447         (WebCore::PeerConnectionBackend::addIceCandidateFailed):
1448         * Modules/mediastream/PeerConnectionBackend.h:
1449
1450 2019-04-27  Simon Fraser  <simon.fraser@apple.com>
1451
1452         Move some Compositing logging to the Layers log channel
1453         https://bugs.webkit.org/show_bug.cgi?id=197345
1454
1455         Reviewed by Sam Weinig.
1456
1457         Make Compositing logging a bit less verbose by moving the GraphicsLayer tree dump
1458         to the Layers log channel. Also log GraphicsLayers after flushing, when we'll have
1459         accurate visible rects. 
1460
1461         * platform/graphics/ca/GraphicsLayerCA.cpp:
1462         (WebCore::GraphicsLayerCA::updateCoverage):
1463         * rendering/RenderLayerCompositor.cpp:
1464         (WebCore::layersLogEnabled):
1465         (WebCore::RenderLayerCompositor::flushPendingLayerChanges):
1466         (WebCore::RenderLayerCompositor::updateCompositingLayers):
1467
1468 2019-04-27  Megan Gardner  <megan_gardner@apple.com>
1469
1470         Lookup only looking up the first word in selection
1471         https://bugs.webkit.org/show_bug.cgi?id=197341
1472         <rdar://problem/48221414>
1473
1474         Reviewed by Wenson Hsieh.
1475
1476         Lookup is not testable.
1477
1478         Reveal needs the full range in order to correctly create the item for the popover.
1479
1480         * editing/cocoa/DictionaryLookup.mm:
1481         (WebCore::showPopupOrCreateAnimationController):
1482
1483 2019-04-26  Jer Noble  <jer.noble@apple.com>
1484
1485         Reduce the number of copies made during SourceBufferPrivateAVFObjC::append() using SharedBuffer
1486         https://bugs.webkit.org/show_bug.cgi?id=197335
1487         <rdar://problem/49175604>
1488
1489         Rubber-stamped by Alex Christensen.
1490
1491         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
1492         (WebCore::SourceBufferPrivateAVFObjC::append):
1493
1494 2019-04-26  Jessie Berlin  <jberlin@webkit.org>
1495
1496         Add new mac target numbers
1497         https://bugs.webkit.org/show_bug.cgi?id=197313
1498
1499         Reviewed by Alex Christensen.
1500
1501         * Configurations/Version.xcconfig:
1502         * Configurations/WebKitTargetConditionals.xcconfig:
1503
1504 2019-04-26  Commit Queue  <commit-queue@webkit.org>
1505
1506         Unreviewed, rolling out r244708.
1507         https://bugs.webkit.org/show_bug.cgi?id=197334
1508
1509         "Broke the debug build" (Requested by rmorisset on #webkit).
1510
1511         Reverted changeset:
1512
1513         "All prototypes should call didBecomePrototype()"
1514         https://bugs.webkit.org/show_bug.cgi?id=196315
1515         https://trac.webkit.org/changeset/244708
1516
1517 2019-04-26  Robin Morisset  <rmorisset@apple.com>
1518
1519         All prototypes should call didBecomePrototype()
1520         https://bugs.webkit.org/show_bug.cgi?id=196315
1521
1522         Reviewed by Saam Barati.
1523
1524         It was found by existing tests, with the new assert in JSC::Structure
1525
1526         * bindings/js/JSWindowProxy.cpp:
1527         (WebCore::JSWindowProxy::setWindow):
1528         * bindings/scripts/CodeGeneratorJS.pm:
1529         (GeneratePrototypeDeclaration):
1530         (GenerateConstructorHelperMethods):
1531
1532 2019-04-26  Eric Carlson  <eric.carlson@apple.com>
1533
1534         Create AVFoundationSoftLink.{h,mm} to reduce duplicate code
1535         https://bugs.webkit.org/show_bug.cgi?id=197171
1536         <rdar://problem/47454979>
1537
1538         Reviewed by Youenn Fablet.
1539
1540         Tests: TestWebKitAPI/Tests/WebCore/cocoa/AVFoundationSoftLinkTest.mm
1541
1542         * Modules/plugins/QuickTimePluginReplacement.mm:
1543         (WebCore::jsValueWithValueInContext):
1544         (WebCore::jsValueWithAVMetadataItemInContext):
1545         * WebCore.xcodeproj/project.pbxproj:
1546         * platform/audio/ios/AudioSessionIOS.mm:
1547         (WebCore::AudioSession::setCategory):
1548         (WebCore::AudioSession::category const):
1549         (WebCore::AudioSession::routeSharingPolicy const):
1550         (WebCore::AudioSession::routingContextUID const):
1551         (WebCore::AudioSession::sampleRate const):
1552         (WebCore::AudioSession::bufferSize const):
1553         (WebCore::AudioSession::numberOfOutputChannels const):
1554         (WebCore::AudioSession::tryToSetActiveInternal):
1555         (WebCore::AudioSession::preferredBufferSize const):
1556         (WebCore::AudioSession::setPreferredBufferSize):
1557         * platform/audio/ios/MediaSessionManagerIOS.mm:
1558         (-[WebMediaSessionHelper initWithCallback:]):
1559         (-[WebMediaSessionHelper startMonitoringAirPlayRoutes]):
1560         * platform/graphics/avfoundation/AVTrackPrivateAVFObjCImpl.mm:
1561         (WebCore::AVTrackPrivateAVFObjCImpl::audioKind const):
1562         (WebCore::AVTrackPrivateAVFObjCImpl::videoKind const):
1563         (WebCore::AVTrackPrivateAVFObjCImpl::label const):
1564         * platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm:
1565         (WebCore::AudioSourceProviderAVFObjC::createMix):
1566         * platform/graphics/avfoundation/MediaPlaybackTargetMac.mm:
1567         * platform/graphics/avfoundation/MediaSelectionGroupAVFObjC.mm:
1568         (WebCore::MediaSelectionGroupAVFObjC::updateOptions):
1569         * platform/graphics/avfoundation/objc/AVFoundationMIMETypeCache.mm:
1570         (WebCore::AVFoundationMIMETypeCache::canDecodeType):
1571         (WebCore::AVFoundationMIMETypeCache::loadMIMETypes):
1572         * platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.mm:
1573         (WebCore::CDMInstanceFairPlayStreamingAVFObjC::supportsPersistableState):
1574         (WebCore::CDMInstanceFairPlayStreamingAVFObjC::supportsPersistentKeys):
1575         (WebCore::CDMInstanceFairPlayStreamingAVFObjC::supportsMediaCapability):
1576         (WebCore::CDMInstanceFairPlayStreamingAVFObjC::initializeWithConfiguration):
1577         (WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::updateLicense):
1578         (WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::loadSession):
1579         (WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::removeSessionData):
1580         (WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::ensureSession):
1581         * platform/graphics/avfoundation/objc/CDMSessionAVContentKeySession.mm:
1582         (WebCore::CDMSessionAVContentKeySession::isAvailable):
1583         (WebCore::CDMSessionAVContentKeySession::releaseKeys):
1584         (WebCore::CDMSessionAVContentKeySession::update):
1585         (WebCore::CDMSessionAVContentKeySession::generateKeyReleaseMessage):
1586         (WebCore::CDMSessionAVContentKeySession::contentKeySession):
1587         * platform/graphics/avfoundation/objc/CDMSessionAVFoundationObjC.mm:
1588         * platform/graphics/avfoundation/objc/CDMSessionAVStreamSession.mm:
1589         (WebCore::CDMSessionAVStreamSession::releaseKeys):
1590         (WebCore::CDMSessionAVStreamSession::update):
1591         (WebCore::CDMSessionAVStreamSession::setStreamSession):
1592         (WebCore::CDMSessionAVStreamSession::generateKeyReleaseMessage):
1593         * platform/graphics/avfoundation/objc/ImageDecoderAVFObjC.mm:
1594         (WebCore::imageDecoderAssetOptions):
1595         (WebCore::ImageDecoderAVFObjC::ImageDecoderAVFObjC):
1596         (WebCore::ImageDecoderAVFObjC::firstEnabledTrack):
1597         (WebCore::ImageDecoderAVFObjC::readSamples):
1598         (SOFT_LINK_CONSTANT_MAY_FAIL): Deleted.
1599         * platform/graphics/avfoundation/objc/InbandTextTrackPrivateAVFObjC.mm:
1600         (WebCore::InbandTextTrackPrivateAVFObjC::label const):
1601         * platform/graphics/avfoundation/objc/InbandTextTrackPrivateLegacyAVFObjC.mm:
1602         (WebCore::InbandTextTrackPrivateLegacyAVFObjC::label const):
1603         * platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm:
1604         (WebCore::MediaPlaybackTargetPickerMac::devicePicker):
1605         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1606         (WebCore::assetCacheForPath):
1607         (WebCore::MediaPlayerPrivateAVFoundationObjC::clearMediaCache):
1608         (WebCore::MediaPlayerPrivateAVFoundationObjC::clearMediaCacheForOrigins):
1609         (WebCore::MediaPlayerPrivateAVFoundationObjC::cancelLoad):
1610         (WebCore::MediaPlayerPrivateAVFoundationObjC::createImageGenerator):
1611         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerLayer):
1612         (WebCore::MediaPlayerPrivateAVFoundationObjC::synchronizeTextTrackState):
1613         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL):
1614         (WebCore::MediaPlayerPrivateAVFoundationObjC::setAVPlayerItem):
1615         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer):
1616         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerItem):
1617         (WebCore::MediaPlayerPrivateAVFoundationObjC::supportsType):
1618         (WebCore::MediaPlayerPrivateAVFoundationObjC::isAvailable):
1619         (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged):
1620         (WebCore::determineChangedTracksFromNewTracksAndOldItems):
1621         (WebCore::MediaPlayerPrivateAVFoundationObjC::updateAudioTracks):
1622         (WebCore::MediaPlayerPrivateAVFoundationObjC::updateVideoTracks):
1623         (WebCore::MediaPlayerPrivateAVFoundationObjC::createVideoOutput):
1624         (WebCore::MediaPlayerPrivateAVFoundationObjC::outputMediaDataWillChange):
1625         (WebCore::MediaPlayerPrivateAVFoundationObjC::safeMediaSelectionGroupForLegibleMedia):
1626         (WebCore::MediaPlayerPrivateAVFoundationObjC::safeMediaSelectionGroupForAudibleMedia):
1627         (WebCore::MediaPlayerPrivateAVFoundationObjC::safeMediaSelectionGroupForVisualMedia):
1628         (WebCore::MediaPlayerPrivateAVFoundationObjC::processMediaSelectionOptions):
1629         (WebCore::MediaPlayerPrivateAVFoundationObjC::setCurrentTextTrack):
1630         (WebCore::MediaPlayerPrivateAVFoundationObjC::languageOfPrimaryAudioTrack const):
1631         (WebCore::MediaPlayerPrivateAVFoundationObjC::wirelessPlaybackTargetType const):
1632         (WebCore::exernalDeviceDisplayNameForPlayer):
1633         (WebCore::metadataType):
1634         (WebCore::MediaPlayerPrivateAVFoundationObjC::metadataDidArrive):
1635         (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]):
1636         (-[WebCoreAVFPullDelegate outputMediaDataWillChange:]):
1637         (-[WebCoreAVFPullDelegate outputSequenceWasFlushed:]):
1638         (WebCore::MediaPlayerPrivateAVFoundationObjC::processLegacyClosedCaptionsTracks): Deleted.
1639         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
1640         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::MediaPlayerPrivateMediaSourceAVFObjC):
1641         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::isAvailable):
1642         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::supportsType):
1643         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::ensureLayer):
1644         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::streamSession):
1645         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
1646         (-[WebAVSampleBufferStatusChangeListener observeValueForKeyPath:ofObject:change:context:]):
1647         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::isAvailable):
1648         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::ensureLayers):
1649         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
1650         (-[WebAVSampleBufferErrorListener observeValueForKeyPath:ofObject:change:context:]):
1651         (WebCore::SourceBufferPrivateAVFObjC::SourceBufferPrivateAVFObjC):
1652         (WebCore::SourceBufferPrivateAVFObjC::~SourceBufferPrivateAVFObjC):
1653         (WebCore::SourceBufferPrivateAVFObjC::trackDidChangeEnabled):
1654         (WebCore::SourceBufferPrivateAVFObjC::enqueueSample):
1655         * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
1656         (WebCore::PlatformCALayerCocoa::layerTypeForPlatformLayer):
1657         (WebCore::PlatformCALayerCocoa::PlatformCALayerCocoa):
1658         (WebCore::PlatformCALayerCocoa::clone const):
1659         (WebCore::PlatformCALayerCocoa::avPlayerLayer const):
1660         * platform/graphics/cocoa/HEVCUtilitiesCocoa.mm:
1661         (WebCore::validateHEVCParameters):
1662         * platform/ios/PlatformSpeechSynthesizerIOS.mm:
1663         (getAVSpeechUtteranceDefaultSpeechRate):
1664         (getAVSpeechUtteranceMaximumSpeechRate):
1665         (-[WebSpeechSynthesisWrapper speakUtterance:]):
1666         (WebCore::PlatformSpeechSynthesizer::initializeVoiceList):
1667         (SOFT_LINK_CONSTANT): Deleted.
1668         * platform/ios/VideoFullscreenInterfaceAVKit.mm:
1669         (-[WebAVPlayerLayer init]):
1670         (-[WebAVPlayerLayer layoutSublayers]):
1671         (-[WebAVPlayerLayer setVideoGravity:]):
1672         (-[WebAVPlayerLayer videoRect]):
1673         (WebAVPlayerLayerView_startRoutingVideoToPictureInPicturePlayerLayerView):
1674         * platform/mac/SerializedPlatformRepresentationMac.mm:
1675         (WebCore::jsValueWithValueInContext):
1676         (WebCore::jsValueWithAVMetadataItemInContext):
1677         * platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.mm:
1678         (WebCore::getAVFormatIDKeyWithFallback):
1679         (WebCore::getAVNumberOfChannelsKeyWithFallback):
1680         (WebCore::getAVSampleRateKeyWithFallback):
1681         (WebCore::getAVEncoderBitRateKeyWithFallback):
1682         (WebCore::MediaRecorderPrivateWriter::create):
1683         (WebCore::MediaRecorderPrivateWriter::setVideoInput):
1684         (WebCore::MediaRecorderPrivateWriter::setAudioInput):
1685         * platform/mediastream/RealtimeVideoSource.h:
1686         * platform/mediastream/VideoPreset.h:
1687         * platform/mediastream/ios/AVAudioSessionCaptureDeviceManager.mm:
1688         (WebCore::AVAudioSessionCaptureDeviceManager::refreshAudioCaptureDevices):
1689         * platform/mediastream/ios/CoreAudioCaptureSourceIOS.mm:
1690         (-[WebCoreAudioCaptureSourceIOSListener initWithCallback:]):
1691         (-[WebCoreAudioCaptureSourceIOSListener handleInterruption:]):
1692         * platform/mediastream/mac/AVCaptureDeviceManager.mm:
1693         (WebCore::deviceIsAvailable):
1694         (WebCore::AVCaptureDeviceManager::updateCachedAVCaptureDevices):
1695         (WebCore::AVCaptureDeviceManager::refreshCaptureDevices):
1696         (WebCore::AVCaptureDeviceManager::isAvailable):
1697         (WebCore::AVCaptureDeviceManager::~AVCaptureDeviceManager):
1698         * platform/mediastream/mac/AVVideoCaptureSource.mm:
1699         (WebCore::AVVideoPreset::create):
1700         (WebCore::AVVideoPreset::AVVideoPreset):
1701         (WebCore::AVVideoCaptureSource::create):
1702         (WebCore::AVVideoCaptureSource::AVVideoCaptureSource):
1703         (WebCore::AVVideoCaptureSource::capabilities):
1704         (WebCore::sensorOrientationFromVideoOutput):
1705         (WebCore::AVVideoCaptureSource::setupSession):
1706         (WebCore::AVVideoCaptureSource::frameDurationForFrameRate):
1707         (WebCore::AVVideoCaptureSource::setupCaptureSession):
1708         (WebCore::AVVideoCaptureSource::captureOutputDidOutputSampleBufferFromConnection):
1709         (WebCore::AVVideoCaptureSource::generatePresets):
1710         (-[WebCoreAVVideoCaptureSourceObserver addNotificationObservers]):
1711         (-[WebCoreAVVideoCaptureSourceObserver captureOutput:didOutputSampleBuffer:fromConnection:]):
1712
1713 2019-04-26  Commit Queue  <commit-queue@webkit.org>
1714
1715         Unreviewed, rolling out r244683.
1716         https://bugs.webkit.org/show_bug.cgi?id=197320
1717
1718         Causing crash on iOS Simulator and EWS failures (Requested by
1719         sroberts on #webkit).
1720
1721         Reverted changeset:
1722
1723         "[iOS] Add internal setting to force -webkit-text-size-adjust
1724         to "auto""
1725         https://bugs.webkit.org/show_bug.cgi?id=197275
1726         https://trac.webkit.org/changeset/244683
1727
1728 2019-04-26  Youenn Fablet  <youenn@apple.com>
1729
1730         Use normal loading path for ping loads
1731         https://bugs.webkit.org/show_bug.cgi?id=196807
1732
1733         Reviewed by Alex Christensen.
1734
1735         Make use of regular code path for ping loads and beacon.
1736         This is done conditionally on KeepAlive flag.
1737         The benefits are a single loading code path and service worker interception.
1738
1739         For that purpose, introduce a LoaderStrategy switch based on KeepAlive runtime flag.
1740         This switch is used to use ping loads when keepAlive is set or regular loads.
1741         In case of regular loads, the keepAlive flag should be used to extend the lifetime of the load.
1742
1743         Migrate ping loads to use CachedResourceLoader instead of PingLoad.
1744         For that purpose, introduce a new Ping CachedResource type.
1745
1746         Covered by existing tests.
1747
1748         * Modules/beacon/NavigatorBeacon.cpp:
1749         (WebCore::NavigatorBeacon::sendBeacon):
1750         * inspector/agents/InspectorPageAgent.cpp:
1751         (WebCore::InspectorPageAgent::inspectorResourceType):
1752         * loader/LinkLoader.cpp:
1753         (WebCore::createLinkPreloadResourceClient):
1754         * loader/LoaderStrategy.h:
1755         * loader/PingLoader.cpp:
1756         (WebCore::PingLoader::loadImage):
1757         (WebCore::PingLoader::sendPing):
1758         (WebCore::PingLoader::sendViolationReport):
1759         (WebCore::PingLoader::startPingLoad):
1760         * loader/PingLoader.h:
1761         * loader/ResourceLoadInfo.cpp:
1762         (WebCore::toResourceType):
1763         * loader/SubresourceLoader.cpp:
1764         (WebCore::logResourceLoaded):
1765         * loader/cache/CachedResource.cpp:
1766         (WebCore::CachedResource::defaultPriorityForResourceType):
1767         (WebCore::CachedResource::load):
1768         (WebCore::CachedResource::cancelLoad):
1769         * loader/cache/CachedResource.h:
1770         (WebCore::CachedResource::shouldUsePingLoad):
1771         (WebCore::CachedResource::isMainOrMediaOrIconOrRawResource const):
1772         * loader/cache/CachedResourceLoader.cpp:
1773         (WebCore::createResource):
1774         (WebCore::CachedResourceLoader::requestPingResource):
1775         (WebCore::contentTypeFromResourceType):
1776         (WebCore::CachedResourceLoader::checkInsecureContent const):
1777         (WebCore::CachedResourceLoader::allowedByContentSecurityPolicy const):
1778         (WebCore::CachedResourceLoader::canRequest):
1779         (WebCore::isResourceSuitableForDirectReuse):
1780         (WebCore::destinationForType):
1781         * loader/cache/CachedResourceLoader.h:
1782
1783 2019-04-26  Alex Christensen  <achristensen@webkit.org>
1784
1785         Fix Windows build after r244695
1786        ​https://bugs.webkit.org/show_bug.cgi?id=197165
1787
1788         * loader/PingLoader.cpp:
1789
1790 2019-04-26  Alex Christensen  <achristensen@webkit.org>
1791
1792         Fix internal High Sierra build after r244653
1793         https://bugs.webkit.org/show_bug.cgi?id=197131
1794
1795         * DerivedSources.make:
1796         -std=gnu++17 didn't exist yet.  -std=gnu++1z did.
1797
1798 2019-04-26  Alex Christensen  <achristensen@webkit.org>
1799
1800         Add ENABLE(CONTENT_EXTENSIONS) and namespace ContentExtensions to ResourceLoadInfo.h
1801         https://bugs.webkit.org/show_bug.cgi?id=197165
1802
1803         Reviewed by Youenn Fablet.
1804
1805         No change in behavior.  This will just make it harder for people working on the loader to mistake
1806         these ContentExtension specific structures for other structures general to loading.
1807         One such mistake was made in r244248.
1808
1809         * Modules/websockets/WebSocketChannel.cpp:
1810         (WebCore::WebSocketChannel::connect):
1811         * contentextensions/ContentExtensionsBackend.h:
1812         * css/StyleSheetContents.cpp:
1813         (WebCore::StyleSheetContents::subresourcesAllowReuse const):
1814         * html/HTMLMediaElement.cpp:
1815         (WebCore::HTMLMediaElement::loadResource):
1816         * loader/FrameLoader.cpp:
1817         (WebCore::FrameLoader::loadResourceSynchronously):
1818         * loader/NetscapePlugInStreamLoader.cpp:
1819         (WebCore::NetscapePlugInStreamLoader::NetscapePlugInStreamLoader):
1820         * loader/PingLoader.cpp:
1821         (WebCore::processContentRuleListsForLoad):
1822         (WebCore::PingLoader::loadImage):
1823         (WebCore::PingLoader::sendPing):
1824         (WebCore::PingLoader::sendViolationReport):
1825         * loader/ResourceLoadInfo.cpp:
1826         (WebCore::toResourceType): Deleted.
1827         (WebCore::readResourceType): Deleted.
1828         (WebCore::readLoadType): Deleted.
1829         (WebCore::ResourceLoadInfo::isThirdParty const): Deleted.
1830         (WebCore::ResourceLoadInfo::getResourceFlags const): Deleted.
1831         * loader/ResourceLoadInfo.h:
1832         * loader/ResourceLoader.cpp:
1833         (WebCore::ResourceLoader::willSendRequestInternal):
1834         * loader/ResourceLoader.h:
1835         * loader/SubresourceLoader.cpp:
1836         (WebCore::SubresourceLoader::SubresourceLoader):
1837         * loader/cache/CachedResourceLoader.cpp:
1838         (WebCore::CachedResourceLoader::requestResource):
1839         * page/DOMWindow.cpp:
1840         (WebCore::DOMWindow::open):
1841         * page/UserContentProvider.cpp:
1842         (WebCore::UserContentProvider::processContentRuleListsForLoad):
1843         (WebCore::UserContentProvider::actionsForResourceLoad):
1844         * page/UserContentProvider.h:
1845
1846 2019-04-26  Alex Christensen  <achristensen@webkit.org>
1847
1848         Fix an internal High Sierra build after r244653
1849        ​https://bugs.webkit.org/show_bug.cgi?id=197131
1850
1851         * DerivedSources.make:
1852         Apparently we can't use gnu++17 when preprocessing Platform.h in the makefile.
1853
1854 2019-04-26  Chris Fleizach  <cfleizach@apple.com>
1855
1856         AX: Provide iOS method for setting focus
1857         https://bugs.webkit.org/show_bug.cgi?id=197200
1858         <rdar://problem/50131679>
1859
1860         Reviewed by Alex Christensen.
1861
1862         Put the focus setting code in a place that iOS and macOS can access.
1863         Override a platform level method for setting focus on iOS.
1864
1865         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
1866         (-[WebAccessibilityObjectWrapper _accessibilitySetFocus:]):
1867         * accessibility/mac/WebAccessibilityObjectWrapperBase.h:
1868         * accessibility/mac/WebAccessibilityObjectWrapperBase.mm:
1869         (-[WebAccessibilityObjectWrapperBase baseAccessibilitySetFocus:]):
1870         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
1871         (-[WebAccessibilityObjectWrapper _accessibilitySetValue:forAttribute:]):
1872
1873 2019-04-26  Said Abou-Hallawa  <sabouhallawa@apple.com>
1874
1875         propertyRegistry() was not overridden for SVGFEFloodElement and SVGFEMergeElement
1876         https://bugs.webkit.org/show_bug.cgi?id=197303
1877
1878         Reviewed by Alex Christensen.
1879
1880         Therefore SVGElement::propertyRegistry() was called instead. This means
1881         these two elements will not have access to the properties of the base
1882         class SVGFilterPrimitiveStandardAttributes.
1883
1884         Tests: svg/dom/SVGFEFloodElement-filter-standard-attributes.svg
1885
1886         * svg/SVGElement.cpp:
1887         (WebCore::SVGElement::commitPropertyChange):
1888         * svg/SVGFEFloodElement.h:
1889         * svg/SVGFEMergeElement.h:
1890
1891 2019-04-26  Youenn Fablet  <youenn@apple.com>
1892
1893         [Mac WK2 iOS Sim] Layout Test imported/w3c/web-platform-tests/webrtc/RTCRtpReceiver-getSynchronizationSources.https.html is a flaky failure
1894         https://bugs.webkit.org/show_bug.cgi?id=196633
1895         <rdar://problem/49627667>
1896
1897         Reviewed by Alex Christensen.
1898
1899         Use formula defined in https://w3c.github.io/webrtc-stats/#dom-rtcrtpcontributingsourcestats-audiolevel
1900         to compute the audio level from the RTP header information.
1901         Covered by rebased test.
1902
1903         * Modules/mediastream/libwebrtc/LibWebRTCRtpReceiverBackend.cpp:
1904         (WebCore::fillRTCRtpContributingSource):
1905
1906 2019-04-26  Sihui Liu  <sihui_liu@apple.com>
1907
1908         Stop IDB transactions to release locked database files when network process is ready to suspend
1909         https://bugs.webkit.org/show_bug.cgi?id=196372
1910         <rdar://problem/48930116>
1911
1912         Reviewed by Brady Eidson.
1913
1914         Suspend IDB database thread and finish ongoing IDB transactions on the main thread before suspending network 
1915         process.
1916
1917         API test: IndexedDB.IndexedDBSuspendImminently
1918
1919         * Modules/indexeddb/server/IDBBackingStore.h:
1920         * Modules/indexeddb/server/IDBServer.cpp:
1921         (WebCore::IDBServer::IDBServer::tryStop):
1922         (WebCore::IDBServer::IDBServer::resume):
1923         * Modules/indexeddb/server/IDBServer.h:
1924         * Modules/indexeddb/server/MemoryIDBBackingStore.h:
1925         * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp: Remove some error log messages, because now we may try
1926         performing database operations without an active transaction if the transaction is finished on the main thread.
1927         (WebCore::IDBServer::SQLiteIDBBackingStore::createObjectStore):
1928         (WebCore::IDBServer::SQLiteIDBBackingStore::deleteObjectStore):
1929         (WebCore::IDBServer::SQLiteIDBBackingStore::renameObjectStore):
1930         (WebCore::IDBServer::SQLiteIDBBackingStore::clearObjectStore):
1931         (WebCore::IDBServer::SQLiteIDBBackingStore::createIndex):
1932         (WebCore::IDBServer::SQLiteIDBBackingStore::deleteIndex):
1933         (WebCore::IDBServer::SQLiteIDBBackingStore::renameIndex):
1934         (WebCore::IDBServer::SQLiteIDBBackingStore::keyExistsInObjectStore):
1935         (WebCore::IDBServer::SQLiteIDBBackingStore::deleteRange):
1936         (WebCore::IDBServer::SQLiteIDBBackingStore::addRecord):
1937         (WebCore::IDBServer::SQLiteIDBBackingStore::getRecord):
1938         (WebCore::IDBServer::SQLiteIDBBackingStore::getAllObjectStoreRecords):
1939         (WebCore::IDBServer::SQLiteIDBBackingStore::getAllIndexRecords):
1940         (WebCore::IDBServer::SQLiteIDBBackingStore::getIndexRecord):
1941         (WebCore::IDBServer::SQLiteIDBBackingStore::getCount):
1942         (WebCore::IDBServer::SQLiteIDBBackingStore::generateKeyNumber):
1943         (WebCore::IDBServer::SQLiteIDBBackingStore::revertGeneratedKeyNumber):
1944         (WebCore::IDBServer::SQLiteIDBBackingStore::maybeUpdateKeyGeneratorNumber):
1945         (WebCore::IDBServer::SQLiteIDBBackingStore::openCursor):
1946         (WebCore::IDBServer::SQLiteIDBBackingStore::iterateCursor):
1947         (WebCore::IDBServer::SQLiteIDBBackingStore::hasTransaction const):
1948         * Modules/indexeddb/server/SQLiteIDBBackingStore.h:
1949         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
1950         (WebCore::IDBServer::UniqueIDBDatabase::prepareToFinishTransaction):
1951         (WebCore::IDBServer::UniqueIDBDatabase::commitTransactionAfterQuotaCheck):
1952         (WebCore::IDBServer::UniqueIDBDatabase::didPerformCommitTransaction):
1953         (WebCore::IDBServer::UniqueIDBDatabase::abortTransaction):
1954         (WebCore::IDBServer::UniqueIDBDatabase::didPerformAbortTransaction):
1955         (WebCore::IDBServer::UniqueIDBDatabase::abortTransactionOnMainThread):
1956         (WebCore::IDBServer::UniqueIDBDatabase::commitTransactionOnMainThread):
1957         (WebCore::IDBServer::UniqueIDBDatabase::finishActiveTransactions):
1958         * Modules/indexeddb/server/UniqueIDBDatabase.h:
1959         * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.h:
1960         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::setState):
1961         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::state const):
1962         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::setResult):
1963         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::result const):
1964         * platform/sql/SQLiteDatabaseTracker.cpp:
1965         (WebCore::SQLiteDatabaseTracker::hasTransactionInProgress):
1966         * platform/sql/SQLiteDatabaseTracker.h:
1967
1968 2019-04-26  Takashi Komori  <Takashi.Komori@sony.com>
1969
1970         [Curl] Fix Curl Request Scheduler not to release wrong Curl handle when request is cancelled.
1971         https://bugs.webkit.org/show_bug.cgi?id=191650
1972
1973         Reviewed by Fujii Hironori.
1974
1975         Test: http/tests/misc/repeat-open-cancel.html
1976
1977         * platform/network/curl/CurlRequest.cpp:
1978         (WebCore::CurlRequest::cancel):
1979         (WebCore::CurlRequest::isCancelled):
1980         (WebCore::CurlRequest::isCompletedOrCancelled):
1981         (WebCore::CurlRequest::didCompleteTransfer):
1982         (WebCore::CurlRequest::completeDidReceiveResponse):
1983         (WebCore::CurlRequest::pausedStatusChanged):
1984         * platform/network/curl/CurlRequest.h:
1985         (WebCore::CurlRequest::isCompleted const): Deleted.
1986         (WebCore::CurlRequest::isCancelled const): Deleted.
1987         (WebCore::CurlRequest::isCompletedOrCancelled const): Deleted.
1988         * platform/network/curl/CurlRequestScheduler.cpp:
1989         (WebCore::CurlRequestScheduler::cancel):
1990         (WebCore::CurlRequestScheduler::callOnWorkerThread):
1991         (WebCore::CurlRequestScheduler::startThreadIfNeeded):
1992         (WebCore::CurlRequestScheduler::stopThreadIfNoMoreJobRunning):
1993         (WebCore::CurlRequestScheduler::stopThread):
1994         (WebCore::CurlRequestScheduler::executeTasks):
1995         (WebCore::CurlRequestScheduler::workerThread):
1996         (WebCore::CurlRequestScheduler::startTransfer):
1997         (WebCore::CurlRequestScheduler::completeTransfer):
1998         (WebCore::CurlRequestScheduler::cancelTransfer):
1999         (WebCore::CurlRequestScheduler::finalizeTransfer):
2000         * platform/network/curl/CurlRequestScheduler.h:
2001
2002 2019-04-25  Myles C. Maxfield  <mmaxfield@apple.com>
2003
2004         [iOS] Add internal setting to force -webkit-text-size-adjust to "auto"
2005         https://bugs.webkit.org/show_bug.cgi?id=197275
2006         <rdar://problem/50211019>
2007
2008         Reviewed by Simon Fraser.
2009
2010         This setting makes it easier to investigate the autosizing work we've been doing
2011         in https://bugs.webkit.org/show_bug.cgi?id=197250.
2012
2013         * page/Settings.yaml:
2014         * rendering/RenderBlockFlow.cpp:
2015         (WebCore::RenderBlockFlow::adjustComputedFontSizes):
2016         * rendering/TextAutoSizing.cpp:
2017         (WebCore::TextAutoSizingValue::adjustTextNodeSizes):
2018
2019 2019-04-25  Myles C. Maxfield  <mmaxfield@apple.com>
2020
2021         [iOS] Implement idempotent mode for text autosizing
2022         https://bugs.webkit.org/show_bug.cgi?id=197250
2023         <rdar://problem/50211034>
2024
2025         Reviewed by Jon Lee.
2026
2027         Our text autosizing code has this interesting behavior where it is sensitive to the width of the text's container
2028         and the number of lines of text inside the element. Not only is it sensitive to those things, but as those things
2029         change, their values are stored inside the RenderObject itself and then never recomputed. This means that the text
2030         autosizing parameters are sensitive to the entire history of an element. So, a newly created element with the same
2031         style as an existing element can have dramatically different results.
2032
2033         This patch adds a new mode for text autosizing, which isn't sensitive to either of those things, and therefore
2034         maintains the invariant that a newly created element will behave the same as an existing element with the same style.
2035         Instead of using container size, it instead uses the viewport's initial scale. As the viewport's initial scale
2036         changes, new layouts will be triggered, which will cause the autosizing code to use the new value.
2037
2038         Tests: fast/text-autosizing/ios/idempotentmode/idempotent-autosizing-identity.html
2039                fast/text-autosizing/ios/idempotentmode/idempotent-autosizing.html
2040
2041         * page/FrameViewLayoutContext.cpp:
2042         (WebCore::FrameViewLayoutContext::applyTextSizingIfNeeded):
2043         * page/Page.cpp:
2044         (WebCore::Page::setInitialScale): WebKit will push the initial scale down into the page.
2045         * page/Page.h:
2046         (WebCore::Page::initialScale const):
2047         * page/SettingsBase.h:
2048         * page/cocoa/SettingsBaseCocoa.mm:
2049         (WebCore::SettingsBase::textAutosizingUsesIdempotentMode):
2050         (WebCore::SettingsBase::defaultTextAutosizingEnabled):
2051         * rendering/RenderBlockFlow.cpp:
2052         (WebCore::idempotentTextSize): Describe a piecewise-linear curve for the text size to follow. The curve scales
2053         depending on the viewport's initial scale.
2054         (WebCore::RenderBlockFlow::adjustComputedFontSizes):
2055         * rendering/RenderBlockFlow.h:
2056         * rendering/RenderElement.cpp:
2057         (WebCore::includeNonFixedHeight): This new mode should consider max-height as well as height when determining if
2058         content overflows.
2059         (WebCore::RenderElement::adjustComputedFontSizesOnBlocks):
2060         (WebCore::RenderElement::resetTextAutosizing):
2061         * rendering/RenderElement.h:
2062         * rendering/RenderObject.h:
2063
2064 2019-04-25  Simon Fraser  <simon.fraser@apple.com>
2065
2066         REGRESSION (r234330): 3 legacy-animation-engine/compositing tests are flaky failures
2067         https://bugs.webkit.org/show_bug.cgi?id=188357
2068         <rdar://problem/42986633>
2069
2070         Reviewed by Dean Jackson.
2071
2072         DumpRenderTree had no code that set page.setCompositingPolicyOverride() to Normal, so some
2073         tests would fall into low memory mode and have different behavior.
2074         
2075         Fix by moving the code that calls setCompositingPolicyOverride(Normal) from the WK2 layer
2076         to Internals, so it's shared by DRT and WTR.
2077         
2078         We no longer need the WK2 C SPI glue.
2079
2080         * testing/Internals.cpp:
2081         (WebCore::Internals::resetToConsistentState):
2082
2083 2019-04-25  Sihui Liu  <sihui_liu@apple.com>
2084
2085         [ iOS Sim ] REGRESSION (r242986) Layout Test storage/indexeddb/modern/idbtransaction-objectstore-failures-private.html is a flaky failure
2086         https://bugs.webkit.org/show_bug.cgi?id=196357
2087         <rdar://problem/49386836>
2088
2089         Reviewed by Geoffrey Garen.
2090
2091         Dispatch IDBRequest event to IDBTransaction if event of IDBTransaction has not been dispatched.
2092
2093         Covered by existing tests.
2094
2095         * Modules/indexeddb/IDBRequest.cpp:
2096         (WebCore::IDBRequest::dispatchEvent):
2097         * Modules/indexeddb/IDBTransaction.cpp:
2098         (WebCore::IDBTransaction::dispatchEvent):
2099         * Modules/indexeddb/IDBTransaction.h:
2100
2101 2019-04-25  Chris Dumez  <cdumez@apple.com>
2102
2103         ASSERT(scriptExecutionContext()) in Performance::resourceTimingBufferFullTimerFired()
2104         https://bugs.webkit.org/show_bug.cgi?id=197300
2105         <rdar://problem/49965990>
2106
2107         Reviewed by Youenn Fablet.
2108
2109         We crash because the scriptExecutionContext has been destroyed by the time the m_resourceTimingBufferFullTimer
2110         timer fires. However, r241598 already makes sure that we stop the timer when the script execution context
2111         is destroyed. This makes me think that somebody restarts the timer *after* the script execution context has
2112         been destroyed. The thing is that we only start the timer in Performance::addResourceTiming() and there are
2113         only 2 call sites for this method. Both call sites get the Performance object from the Window object, which
2114         they get from the Document object. As a result, I would believe that the Window's document is alive, even
2115         though the Performance object's scriptExecutionContext is not. This could indicate that the Performance
2116         object's scriptExecutionContext gets out of sync with its Window's document. I have found one place where
2117         it could happen in theory (DOMWindow::didSecureTransitionTo()). I have not been able to write a test
2118         confirming my theory though so this is a speculative fix. I have also added a few assertions to help us
2119         track down the issue if my speculative fix turns out to be ineffective.
2120
2121         No new tests, we do not know how to reproduce.
2122
2123         * page/DOMWindow.cpp:
2124         (WebCore::DOMWindow::didSecureTransitionTo):
2125         This is a speculative fix for the crash. When a DOMWindow transitions from one document to
2126         another, reset its data members which store the DOMWindow's document to make sure that they
2127         do not get out of sync.
2128
2129         (WebCore::DOMWindow::crypto const):
2130         (WebCore::DOMWindow::navigator):
2131         (WebCore::DOMWindow::performance const):
2132         Add assertions to make sure that the member's scriptExecutionContext is in sync with
2133         the window's.
2134
2135         * page/Performance.cpp:
2136         (WebCore::Performance::addResourceTiming):
2137         Add assertion to make sure that the scriptExecutionContext() is non-null when calling this
2138         as this may start the m_resourceTimingBufferFullTimer timer. If my speculative fix above
2139         does not work, we should hit this and this should tell us which call site is causing this.
2140
2141 2019-04-25  Timothy Hatcher  <timothy@apple.com>
2142
2143         Disable ContentChangeObserver on iOSMac.
2144         https://bugs.webkit.org/show_bug.cgi?id=197292
2145         rdar://problem/49039957
2146
2147         Reviewed by Zalan Bujtas.
2148
2149         We don’t need to run any of ContentChangeObserver, because we have hover events on iOSMac.
2150         Disabling it skips the synthetic mouse move events and speeds up clicks.
2151
2152         * page/SettingsBase.cpp:
2153         (WebCore::SettingsBase::defaultContentChangeObserverEnabled): Return false for PLATFORM(IOSMAC).
2154
2155 2019-04-25  Timothy Hatcher  <timothy@apple.com>
2156
2157         Disable date and time inputs on iOSMac.
2158         https://bugs.webkit.org/show_bug.cgi?id=197287
2159         rdar://problem/46794376
2160
2161         Reviewed by Wenson Hsieh.
2162
2163         * Configurations/FeatureDefines.xcconfig:
2164         * platform/text/mac/LocaleMac.h:
2165         * platform/text/mac/LocaleMac.mm:
2166         (WebCore::LocaleMac::formatDateTime):
2167
2168 2019-04-25  Alex Christensen  <achristensen@webkit.org>
2169
2170         Fix more Windows builds after r244653
2171         https://bugs.webkit.org/show_bug.cgi?id=197131
2172
2173         * svg/properties/SVGAnimatedPropertyList.h:
2174         * svg/properties/SVGProperty.h:
2175         * svg/properties/SVGPropertyList.h:
2176
2177 2019-04-25  Alex Christensen  <achristensen@webkit.org>
2178
2179         Fix more builds after r244653
2180         https://bugs.webkit.org/show_bug.cgi?id=197131
2181
2182         * svg/properties/SVGValuePropertyList.h:
2183         Something is preventing MSVC from seeing protected constructors from subclasses.
2184
2185 2019-04-25  Per Arne Vollan  <pvollan@apple.com>
2186
2187         -[WKWebsiteDataStore fetchDataRecordsOfTypes:completionHandler:] never returns _WKWebsiteDataTypeCredentials
2188         https://bugs.webkit.org/show_bug.cgi?id=196991
2189         <rdar://problem/45507423>
2190
2191         Reviewed by Alex Christensen.
2192
2193         Add method to get all origins with persistent credentials from credential storage.
2194
2195         API tests: WKWebsiteDataStore.FetchNonPersistentCredentials
2196                    WKWebsiteDataStore.FetchPersistentCredentials
2197
2198         * platform/network/CredentialStorage.h:
2199         * platform/network/mac/CredentialStorageMac.mm:
2200         (WebCore::CredentialStorage::originsWithPersistentCredentials):
2201
2202 2019-04-25  Alex Christensen  <achristensen@webkit.org>
2203
2204         Fix MSVC build after r244653
2205         https://bugs.webkit.org/show_bug.cgi?id=197131
2206
2207         * svg/properties/SVGValueProperty.h:
2208         MSVC doesn't think it can access these protected constructors from subclasses.
2209         Make the build work and investigate this later.
2210
2211 2019-04-25  Alex Christensen  <achristensen@webkit.org>
2212
2213         Start using C++17
2214         https://bugs.webkit.org/show_bug.cgi?id=197131
2215
2216         Reviewed by Darin Adler.
2217
2218         * Configurations/Base.xcconfig:
2219         * DerivedSources.make:
2220
2221 2019-04-25  Commit Queue  <commit-queue@webkit.org>
2222
2223         Unreviewed, rolling out r244627.
2224         https://bugs.webkit.org/show_bug.cgi?id=197282
2225
2226         Causing internal build failures (Requested by ShawnRoberts on
2227         #webkit).
2228
2229         Reverted changeset:
2230
2231         "Create AVFoundationSoftLink.{h,mm} to reduce duplicate code"
2232         https://bugs.webkit.org/show_bug.cgi?id=197171
2233         https://trac.webkit.org/changeset/244627
2234
2235 2019-04-25  Antti Koivisto  <antti@apple.com>
2236
2237         redefinition of enumerator 'NSAttachmentCharacter' with Apple internal build
2238         https://bugs.webkit.org/show_bug.cgi?id=197279
2239
2240         Reviewed by Antoine Quint.
2241
2242         Try to fix the build.
2243
2244         * platform/mac/WebNSAttributedStringExtras.mm:
2245
2246 2019-04-25  Antti Koivisto  <antti@apple.com>
2247
2248         Visited link hash should be computed only once
2249         https://bugs.webkit.org/show_bug.cgi?id=197229
2250         <rdar://problem/48438924>
2251
2252         Reviewed by Alex Christensen.
2253
2254         Test: fast/history/visited-href-mutation.html
2255
2256         Visited link style is now based on the first target URL of the link element. Further href mutations don't affect styling.
2257
2258         * dom/Document.cpp:
2259         (WebCore::Document::updateBaseURL):
2260         * dom/VisitedLinkState.cpp:
2261         (WebCore::linkAttribute):
2262         (WebCore::linkHashForElement):
2263
2264         Visited link support is now limited to HTML and SVG <a> elements.
2265
2266         (WebCore::VisitedLinkState::invalidateStyleForLink):
2267         (WebCore::VisitedLinkState::determineLinkStateSlowCase):
2268         * html/HTMLAnchorElement.cpp:
2269         (WebCore::HTMLAnchorElement::HTMLAnchorElement):
2270         (WebCore::HTMLAnchorElement::parseAttribute):
2271         * html/HTMLAnchorElement.h:
2272         (WebCore::HTMLAnchorElement::visitedLinkHash const):
2273         (WebCore::HTMLAnchorElement::invalidateCachedVisitedLinkHash): Deleted.
2274         * svg/SVGAElement.cpp:
2275         (WebCore::SVGAElement::visitedLinkHash const):
2276         * svg/SVGAElement.h:
2277
2278 2019-04-25  Philippe Normand  <pnormand@igalia.com>
2279
2280         [GStreamer] gst_element_get_state: assertion 'GST_IS_ELEMENT (element)' failed in WebCore::MediaPlayerPrivateGStreamer::paused
2281         https://bugs.webkit.org/show_bug.cgi?id=196691
2282
2283         Reviewed by Eric Carlson.
2284
2285         For gif assets, fail media loading early and notify the
2286         MediaPlayer by setting both network and ready states, so that the
2287         MediaPlayer will try with with the next media engine or pass the
2288         error to HTMLMediaElement if there are none.
2289
2290         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
2291         (WebCore::MediaPlayerPrivateGStreamer::loadFull):
2292         (WebCore::MediaPlayerPrivateGStreamer::loadingFailed):
2293         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
2294
2295 2019-04-25  Philippe Normand  <pnormand@igalia.com>
2296
2297         [REGRESSION(r243197)][GStreamer] http/tests/media/clearkey/collect-webkit-media-session.html hits an ASSERT
2298         https://bugs.webkit.org/show_bug.cgi?id=197230
2299
2300         Reviewed by Xabier Rodriguez-Calvar.
2301
2302         Perform the resource loader disposal and destruction from the main
2303         thread. Also ensure there's no circular reference between the
2304         CachedResourceStreamingClient and WebKitWebSrc when disposing of
2305         the private WebKitWebSrc storage.
2306
2307         * platform/graphics/gstreamer/MainThreadNotifier.h:
2308         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
2309         (_WebKitWebSrcPrivate::~_WebKitWebSrcPrivate):
2310         (webkit_web_src_class_init):
2311         (webKitWebSrcDispose):
2312         (webKitWebSrcCloseSession):
2313         (webKitWebSrcFinalize): Deleted.
2314
2315 2019-04-24  Carlos Garcia Campos  <cgarcia@igalia.com>
2316
2317         [GTK] Hardcoded text color in input fields
2318         https://bugs.webkit.org/show_bug.cgi?id=126907
2319
2320         Reviewed by Michael Catanzaro.
2321
2322         Enable HAVE_OS_DARK_MODE_SUPPORT for GTK port to ensure that dark mode is used when Page::useDarkAppearance()
2323         returns true. This patch reverts r232913, I'll reopen the bug, I think we need to find a better solution for
2324         that.
2325
2326         * CMakeLists.txt: Add HAVE_OS_DARK_MODE_SUPPORT to FEATURE_DEFINES_WITH_SPACE_SEPARATOR if enabled.
2327         * css/CSSDefaultStyleSheets.cpp: Ensure html{color:text} is used in simple style sheet when
2328         HAVE_OS_DARK_MODE_SUPPORT is enabled.
2329         * page/FrameView.cpp:
2330         (WebCore::FrameView::updateBackgroundRecursively): Use CSSValueWindowframe to get the frame view background
2331         color when HAVE_OS_DARK_MODE_SUPPORT is enabled for non-mac ports.
2332         * platform/gtk/RenderThemeWidget.cpp:
2333         (WebCore::RenderThemeWidget::getOrCreate): Create window widget.
2334         (WebCore::RenderThemeWindow::RenderThemeWindow): Add window widget.
2335         * platform/gtk/RenderThemeWidget.h:
2336         * rendering/RenderThemeGtk.cpp:
2337         (WebCore::RenderThemeGtk::disabledTextColor const): Always use the color from the theme for consistency with
2338         other form controls.
2339         (WebCore::RenderThemeGtk::systemColor const): Get the color from the theme for CSSValueText, CSSValueGraytext
2340         and CSSValueWindowframe.
2341         * rendering/RenderThemeGtk.h:
2342
2343 2019-04-24  Zalan Bujtas  <zalan@apple.com>
2344
2345         Regression (r244291): Broken API Test AutoLayoutRenderingProgressRelativeOrdering
2346         https://bugs.webkit.org/show_bug.cgi?id=196948
2347         <rdar://problem/49927131>
2348
2349         Reviewed by Tim Horton.
2350
2351         Covered by existing tests.
2352
2353         * loader/EmptyClients.h:
2354         * page/ChromeClient.h:
2355         * page/FrameView.cpp:
2356         (WebCore::FrameView::autoSizeIfEnabled):
2357         (WebCore::FrameView::enableAutoSizeMode):
2358         * page/FrameView.h:
2359
2360 2019-04-24  Youenn Fablet  <youenn@apple.com>
2361
2362         Do not restart WebRTC stats timer if backend is stopped
2363         https://bugs.webkit.org/show_bug.cgi?id=197257
2364         <rdar://problem/50095879>
2365
2366         Reviewed by Eric Carlson.
2367
2368         We used to stop and reschedule the stat gathering timer in case the
2369         gathering delay is changing. Timer should not be rescheduled if the backend is stopped.
2370
2371         * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:
2372         (WebCore::LibWebRTCMediaEndpoint::OnStatsDelivered):
2373
2374 2019-04-24  Andres Gonzalez  <andresg_22@apple.com>
2375
2376         Flaky crash under WebCore::AXObjectCache::stopCachingComputedObjectAttributes()
2377         https://bugs.webkit.org/show_bug.cgi?id=187391
2378         <rdar://problem/40681396
2379
2380         Check for null value returned by AccessibilityObject::axObjectCache.
2381
2382         Reviewed by Chris Fleizach.
2383
2384         No need for new test since existing tests caught this problem.
2385
2386         * accessibility/AccessibilityNodeObject.cpp:
2387         (WebCore::AccessibilityNodeObject::firstChild const):
2388         (WebCore::AccessibilityNodeObject::lastChild const):
2389         (WebCore::AccessibilityNodeObject::previousSibling const):
2390         (WebCore::AccessibilityNodeObject::nextSibling const):
2391         (WebCore::AccessibilityNodeObject::addChildren):
2392         (WebCore::AccessibilityNodeObject::anchorElement const):
2393         (WebCore::AccessibilityNodeObject::changeValueByStep):
2394         (WebCore::AccessibilityNodeObject::changeValueByPercent):
2395         (WebCore::AccessibilityNodeObject::textForLabelElement const):
2396         (WebCore::AccessibilityNodeObject::titleElementText const):
2397         (WebCore::AccessibilityNodeObject::alternativeText const):
2398         (WebCore::AccessibilityNodeObject::ariaLabeledByText const):
2399         (WebCore::AccessibilityNodeObject::helpText const):
2400
2401 2019-04-24  Simon Fraser  <simon.fraser@apple.com>
2402
2403         REGRESSION (r242132): Nested position:sticky elements move incorrectly
2404         https://bugs.webkit.org/show_bug.cgi?id=197255
2405         rdar://problem/50137744
2406
2407         Reviewed by Zalan Bujtas.
2408         
2409         Revert to the behavior of the code before r242132, where we looked at the direct parent
2410         scrolling tree node instead of walking up the ancestor chain to find an enclosing scrolling node.
2411         This fixes nested sticky behavior.
2412
2413         Test: scrollingcoordinator/mac/nested-sticky.html
2414
2415         * page/scrolling/cocoa/ScrollingTreeStickyNode.mm:
2416         (WebCore::ScrollingTreeStickyNode::applyLayerPositions):
2417
2418 2019-04-24  Eric Carlson  <eric.carlson@apple.com>
2419
2420         Create AVFoundationSoftLink.{h,mm} to reduce duplicate code
2421         https://bugs.webkit.org/show_bug.cgi?id=197171
2422         <rdar://problem/47454979>
2423
2424         Reviewed by Youenn Fablet.
2425
2426         Tests: TestWebKitAPI/Tests/WebCore/cocoa/AVFoundationSoftLinkTest.mm
2427
2428         * Modules/plugins/QuickTimePluginReplacement.mm:
2429         (WebCore::jsValueWithValueInContext):
2430         (WebCore::jsValueWithAVMetadataItemInContext):
2431         * WebCore.xcodeproj/project.pbxproj:
2432         * platform/audio/ios/AudioSessionIOS.mm:
2433         (WebCore::AudioSession::setCategory):
2434         (WebCore::AudioSession::category const):
2435         (WebCore::AudioSession::routeSharingPolicy const):
2436         (WebCore::AudioSession::routingContextUID const):
2437         (WebCore::AudioSession::sampleRate const):
2438         (WebCore::AudioSession::bufferSize const):
2439         (WebCore::AudioSession::numberOfOutputChannels const):
2440         (WebCore::AudioSession::tryToSetActiveInternal):
2441         (WebCore::AudioSession::preferredBufferSize const):
2442         (WebCore::AudioSession::setPreferredBufferSize):
2443         * platform/audio/ios/MediaSessionManagerIOS.mm:
2444         (-[WebMediaSessionHelper initWithCallback:]):
2445         (-[WebMediaSessionHelper startMonitoringAirPlayRoutes]):
2446         * platform/graphics/avfoundation/AVTrackPrivateAVFObjCImpl.mm:
2447         (WebCore::AVTrackPrivateAVFObjCImpl::audioKind const):
2448         (WebCore::AVTrackPrivateAVFObjCImpl::videoKind const):
2449         (WebCore::AVTrackPrivateAVFObjCImpl::label const):
2450         * platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm:
2451         (WebCore::AudioSourceProviderAVFObjC::createMix):
2452         * platform/graphics/avfoundation/MediaPlaybackTargetMac.mm:
2453         * platform/graphics/avfoundation/MediaSelectionGroupAVFObjC.mm:
2454         (WebCore::MediaSelectionGroupAVFObjC::updateOptions):
2455         * platform/graphics/avfoundation/objc/AVFoundationMIMETypeCache.mm:
2456         (WebCore::AVFoundationMIMETypeCache::canDecodeType):
2457         (WebCore::AVFoundationMIMETypeCache::loadMIMETypes):
2458         * platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.mm:
2459         (WebCore::CDMInstanceFairPlayStreamingAVFObjC::supportsPersistableState):
2460         (WebCore::CDMInstanceFairPlayStreamingAVFObjC::supportsPersistentKeys):
2461         (WebCore::CDMInstanceFairPlayStreamingAVFObjC::supportsMediaCapability):
2462         (WebCore::CDMInstanceFairPlayStreamingAVFObjC::initializeWithConfiguration):
2463         (WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::updateLicense):
2464         (WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::loadSession):
2465         (WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::removeSessionData):
2466         (WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::ensureSession):
2467         * platform/graphics/avfoundation/objc/CDMSessionAVContentKeySession.mm:
2468         (WebCore::CDMSessionAVContentKeySession::isAvailable):
2469         (WebCore::CDMSessionAVContentKeySession::releaseKeys):
2470         (WebCore::CDMSessionAVContentKeySession::update):
2471         (WebCore::CDMSessionAVContentKeySession::generateKeyReleaseMessage):
2472         (WebCore::CDMSessionAVContentKeySession::contentKeySession):
2473         * platform/graphics/avfoundation/objc/CDMSessionAVFoundationObjC.mm:
2474         * platform/graphics/avfoundation/objc/CDMSessionAVStreamSession.mm:
2475         (WebCore::CDMSessionAVStreamSession::releaseKeys):
2476         (WebCore::CDMSessionAVStreamSession::update):
2477         (WebCore::CDMSessionAVStreamSession::setStreamSession):
2478         (WebCore::CDMSessionAVStreamSession::generateKeyReleaseMessage):
2479         * platform/graphics/avfoundation/objc/ImageDecoderAVFObjC.mm:
2480         (WebCore::imageDecoderAssetOptions):
2481         (WebCore::ImageDecoderAVFObjC::ImageDecoderAVFObjC):
2482         (WebCore::ImageDecoderAVFObjC::firstEnabledTrack):
2483         (WebCore::ImageDecoderAVFObjC::readSamples):
2484         (SOFT_LINK_CONSTANT_MAY_FAIL): Deleted.
2485         * platform/graphics/avfoundation/objc/InbandTextTrackPrivateAVFObjC.mm:
2486         (WebCore::InbandTextTrackPrivateAVFObjC::label const):
2487         * platform/graphics/avfoundation/objc/InbandTextTrackPrivateLegacyAVFObjC.mm:
2488         (WebCore::InbandTextTrackPrivateLegacyAVFObjC::label const):
2489         * platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm:
2490         (WebCore::MediaPlaybackTargetPickerMac::devicePicker):
2491         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2492         (WebCore::assetCacheForPath):
2493         (WebCore::MediaPlayerPrivateAVFoundationObjC::clearMediaCache):
2494         (WebCore::MediaPlayerPrivateAVFoundationObjC::clearMediaCacheForOrigins):
2495         (WebCore::MediaPlayerPrivateAVFoundationObjC::cancelLoad):
2496         (WebCore::MediaPlayerPrivateAVFoundationObjC::createImageGenerator):
2497         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerLayer):
2498         (WebCore::MediaPlayerPrivateAVFoundationObjC::synchronizeTextTrackState):
2499         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL):
2500         (WebCore::MediaPlayerPrivateAVFoundationObjC::setAVPlayerItem):
2501         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer):
2502         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerItem):
2503         (WebCore::MediaPlayerPrivateAVFoundationObjC::supportsType):
2504         (WebCore::MediaPlayerPrivateAVFoundationObjC::isAvailable):
2505         (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged):
2506         (WebCore::determineChangedTracksFromNewTracksAndOldItems):
2507         (WebCore::MediaPlayerPrivateAVFoundationObjC::updateAudioTracks):
2508         (WebCore::MediaPlayerPrivateAVFoundationObjC::updateVideoTracks):
2509         (WebCore::MediaPlayerPrivateAVFoundationObjC::createVideoOutput):
2510         (WebCore::MediaPlayerPrivateAVFoundationObjC::outputMediaDataWillChange):
2511         (WebCore::MediaPlayerPrivateAVFoundationObjC::safeMediaSelectionGroupForLegibleMedia):
2512         (WebCore::MediaPlayerPrivateAVFoundationObjC::safeMediaSelectionGroupForAudibleMedia):
2513         (WebCore::MediaPlayerPrivateAVFoundationObjC::safeMediaSelectionGroupForVisualMedia):
2514         (WebCore::MediaPlayerPrivateAVFoundationObjC::processMediaSelectionOptions):
2515         (WebCore::MediaPlayerPrivateAVFoundationObjC::setCurrentTextTrack):
2516         (WebCore::MediaPlayerPrivateAVFoundationObjC::languageOfPrimaryAudioTrack const):
2517         (WebCore::MediaPlayerPrivateAVFoundationObjC::wirelessPlaybackTargetType const):
2518         (WebCore::exernalDeviceDisplayNameForPlayer):
2519         (WebCore::metadataType):
2520         (WebCore::MediaPlayerPrivateAVFoundationObjC::metadataDidArrive):
2521         (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]):
2522         (-[WebCoreAVFPullDelegate outputMediaDataWillChange:]):
2523         (-[WebCoreAVFPullDelegate outputSequenceWasFlushed:]):
2524         (WebCore::MediaPlayerPrivateAVFoundationObjC::processLegacyClosedCaptionsTracks): Deleted.
2525         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
2526         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::MediaPlayerPrivateMediaSourceAVFObjC):
2527         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::isAvailable):
2528         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::supportsType):
2529         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::ensureLayer):
2530         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::streamSession):
2531         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
2532         (-[WebAVSampleBufferStatusChangeListener observeValueForKeyPath:ofObject:change:context:]):
2533         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::isAvailable):
2534         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::ensureLayers):
2535         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
2536         (-[WebAVSampleBufferErrorListener observeValueForKeyPath:ofObject:change:context:]):
2537         (WebCore::SourceBufferPrivateAVFObjC::SourceBufferPrivateAVFObjC):
2538         (WebCore::SourceBufferPrivateAVFObjC::~SourceBufferPrivateAVFObjC):
2539         (WebCore::SourceBufferPrivateAVFObjC::trackDidChangeEnabled):
2540         (WebCore::SourceBufferPrivateAVFObjC::enqueueSample):
2541         * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
2542         (WebCore::PlatformCALayerCocoa::layerTypeForPlatformLayer):
2543         (WebCore::PlatformCALayerCocoa::PlatformCALayerCocoa):
2544         (WebCore::PlatformCALayerCocoa::clone const):
2545         (WebCore::PlatformCALayerCocoa::avPlayerLayer const):
2546         * platform/graphics/cocoa/HEVCUtilitiesCocoa.mm:
2547         (WebCore::validateHEVCParameters):
2548         * platform/ios/PlatformSpeechSynthesizerIOS.mm:
2549         (getAVSpeechUtteranceDefaultSpeechRate):
2550         (getAVSpeechUtteranceMaximumSpeechRate):
2551         (-[WebSpeechSynthesisWrapper speakUtterance:]):
2552         (WebCore::PlatformSpeechSynthesizer::initializeVoiceList):
2553         (SOFT_LINK_CONSTANT): Deleted.
2554         * platform/ios/VideoFullscreenInterfaceAVKit.mm:
2555         (-[WebAVPlayerLayer init]):
2556         (-[WebAVPlayerLayer layoutSublayers]):
2557         (-[WebAVPlayerLayer setVideoGravity:]):
2558         (-[WebAVPlayerLayer videoRect]):
2559         (WebAVPlayerLayerView_startRoutingVideoToPictureInPicturePlayerLayerView):
2560         * platform/mac/SerializedPlatformRepresentationMac.mm:
2561         (WebCore::jsValueWithValueInContext):
2562         (WebCore::jsValueWithAVMetadataItemInContext):
2563         * platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.mm:
2564         (WebCore::getAVFormatIDKeyWithFallback):
2565         (WebCore::getAVNumberOfChannelsKeyWithFallback):
2566         (WebCore::getAVSampleRateKeyWithFallback):
2567         (WebCore::getAVEncoderBitRateKeyWithFallback):
2568         (WebCore::MediaRecorderPrivateWriter::create):
2569         (WebCore::MediaRecorderPrivateWriter::setVideoInput):
2570         (WebCore::MediaRecorderPrivateWriter::setAudioInput):
2571         * platform/mediastream/RealtimeVideoSource.h:
2572         * platform/mediastream/VideoPreset.h:
2573         * platform/mediastream/ios/AVAudioSessionCaptureDeviceManager.mm:
2574         (WebCore::AVAudioSessionCaptureDeviceManager::refreshAudioCaptureDevices):
2575         * platform/mediastream/ios/CoreAudioCaptureSourceIOS.mm:
2576         (-[WebCoreAudioCaptureSourceIOSListener initWithCallback:]):
2577         (-[WebCoreAudioCaptureSourceIOSListener handleInterruption:]):
2578         * platform/mediastream/mac/AVCaptureDeviceManager.mm:
2579         (WebCore::deviceIsAvailable):
2580         (WebCore::AVCaptureDeviceManager::updateCachedAVCaptureDevices):
2581         (WebCore::AVCaptureDeviceManager::refreshCaptureDevices):
2582         (WebCore::AVCaptureDeviceManager::isAvailable):
2583         (WebCore::AVCaptureDeviceManager::~AVCaptureDeviceManager):
2584         * platform/mediastream/mac/AVVideoCaptureSource.mm:
2585         (WebCore::AVVideoPreset::create):
2586         (WebCore::AVVideoPreset::AVVideoPreset):
2587         (WebCore::AVVideoCaptureSource::create):
2588         (WebCore::AVVideoCaptureSource::AVVideoCaptureSource):
2589         (WebCore::AVVideoCaptureSource::capabilities):
2590         (WebCore::sensorOrientationFromVideoOutput):
2591         (WebCore::AVVideoCaptureSource::setupSession):
2592         (WebCore::AVVideoCaptureSource::frameDurationForFrameRate):
2593         (WebCore::AVVideoCaptureSource::setupCaptureSession):
2594         (WebCore::AVVideoCaptureSource::captureOutputDidOutputSampleBufferFromConnection):
2595         (WebCore::AVVideoCaptureSource::generatePresets):
2596         (-[WebCoreAVVideoCaptureSourceObserver addNotificationObservers]):
2597         (-[WebCoreAVVideoCaptureSourceObserver captureOutput:didOutputSampleBuffer:fromConnection:]):
2598
2599 2019-04-24  Brady Eidson  <beidson@apple.com>
2600
2601         XMLHTTPRequest POSTs to a custom WKURLSchemeHandler protocol are missing the HTTP body.
2602         https://bugs.webkit.org/show_bug.cgi?id=191362
2603
2604         Reviewed by Alex Christensen.
2605
2606         Covered by new API tests.
2607
2608         In 2008 some refactoring added an HTTP(S)-only restriction to copying the form body for
2609         XHRs that POST, and it added that restriction with no explanation.
2610
2611         We definitely want to allow that.
2612
2613         Blobs are broken at this time (covered by bug 197237)
2614
2615         * xml/XMLHttpRequest.cpp:
2616         (WebCore::XMLHttpRequest::send):
2617         (WebCore::XMLHttpRequest::sendBytesData):
2618
2619 2019-04-24  John Wilander  <wilander@apple.com>
2620
2621         Age out unconverted Ad Click Attributions after one week.
2622         https://bugs.webkit.org/show_bug.cgi?id=197238
2623         <rdar://problem/50177349>
2624
2625         Reviewed by Chris Dumez.
2626
2627         This patch adds the two functions AdClickAttribution::markAsExpired()
2628         and AdClickAttribution::hasExpired() which make use of the existing
2629         m_timeOfAdClick member.
2630
2631         Test: http/tests/adClickAttribution/expired-attributions-removed.html
2632
2633         * loader/AdClickAttribution.cpp:
2634         (WebCore::AdClickAttribution::markAsExpired):
2635         (WebCore::AdClickAttribution::hasExpired const):
2636         * loader/AdClickAttribution.h:
2637
2638 2019-04-24  Simon Fraser  <simon.fraser@apple.com>
2639
2640         REGRESSION (iOS 12.2): CSS perspective property value can only be set correctly once
2641         https://bugs.webkit.org/show_bug.cgi?id=197105
2642         rdar://problem/50068230
2643
2644         Reviewed by Zalan Bujtas.
2645
2646         Make sure we trigger a geometry update when style properties change that
2647         result in a StyleDifference::RecompositeLayer, and which are updated on layers
2648         via RenderLayerBacking::updateGeometry().
2649
2650         Tests: compositing/style-change/backface-visibility-change.html
2651                compositing/style-change/perspective-change.html
2652                compositing/style-change/perspective-origin-change.html
2653                compositing/style-change/transform-origin-change.html
2654                compositing/style-change/transform-style-change.html
2655
2656         * rendering/RenderLayerCompositor.cpp:
2657         (WebCore::recompositeChangeRequiresGeometryUpdate):
2658         (WebCore::RenderLayerCompositor::layerStyleChanged):
2659
2660 2019-04-24  Simon Fraser  <simon.fraser@apple.com>
2661
2662         Make it possible to control the renderTreeAsText output by setting options on testRunner
2663         https://bugs.webkit.org/show_bug.cgi?id=197133
2664
2665         Reviewed by Sam Weinig.
2666
2667         Add testRunner.setRenderTreeDumpOptions() and expose the subset of RenderAsTextFlag flags
2668         that make sense in testing (those that don't dump unstable data like addresses), and plumb
2669         these flags through the various framework layers.
2670
2671         Convert RenderAsTextBehavior to an OptionSet<RenderAsTextFlag>.
2672
2673         Fix code generation in WebKitTestRunner to generate bindings for IDL const values,
2674         and hand-code DumpRenderTree bindings.
2675
2676         Some cleanup of the TestRunners, using member initializers.
2677
2678         Test: fast/harness/render-tree-as-text-options.html
2679
2680         * rendering/RenderLayer.cpp:
2681         (WebCore::showLayerTree):
2682         * rendering/RenderTreeAsText.cpp:
2683         (WebCore::RenderTreeAsText::writeRenderObject):
2684         (WebCore::writeDebugInfo):
2685         (WebCore::write):
2686         (WebCore::writeLayer):
2687         (WebCore::writeLayerRenderers):
2688         (WebCore::writeLayers):
2689         (WebCore::externalRepresentation):
2690         * rendering/RenderTreeAsText.h:
2691         (WebCore::externalRepresentation):
2692         (WebCore::write):
2693         (WebCore::writeDebugInfo):
2694         (): Deleted.
2695         * rendering/svg/SVGRenderTreeAsText.cpp:
2696         (WebCore::writePositionAndStyle):
2697         (WebCore::writeStandardPrefix):
2698         (WebCore::writeChildren):
2699         (WebCore::writeSVGResourceContainer):
2700         (WebCore::writeSVGContainer):
2701         (WebCore::write):
2702         (WebCore::writeSVGText):
2703         (WebCore::writeSVGInlineText):
2704         (WebCore::writeSVGImage):
2705         (WebCore::writeSVGGradientStop):
2706         (WebCore::writeResources):
2707         * rendering/svg/SVGRenderTreeAsText.h:
2708
2709 2019-04-24  Antoine Quint  <graouts@apple.com>
2710
2711         [iOS] Calling preventDefault() when handling a pointerdown event should not prevent panning, zooming or click event dispatch
2712         https://bugs.webkit.org/show_bug.cgi?id=195839
2713         <rdar://problem/48946154>
2714
2715         Reviewed by Brent Fulgham.
2716
2717         Tests: pointerevents/ios/pointer-events-prevent-default-allows-click-event.html
2718                pointerevents/ios/pointer-events-prevent-default-allows-scrolling.html
2719
2720         The Pointer Events specification defines that the default action of any and all pointer events MUST NOT
2721         be a manipulation of the viewport (e.g. panning or zooming). In practice, this means that calling
2722         preventDefault() while handling a Pointer Event has no effect on the inner workings of the user agent,
2723         so we change the method signature of PointerCaptureController::dispatchEventForTouchAtIndex() to return
2724         void since we don't need to know whether preventDefault() was called.
2725
2726         https://www.w3.org/TR/pointerevents/#declaring-candidate-regions-for-default-touch-behaviors
2727
2728         * page/PointerCaptureController.cpp:
2729         (WebCore::PointerCaptureController::dispatchEventForTouchAtIndex):
2730         * page/PointerCaptureController.h:
2731
2732 2019-04-24  Frederic Wang  <fwang@igalia.com>
2733
2734         With async scrolling enabled, this MathML test asserts
2735         https://bugs.webkit.org/show_bug.cgi?id=196123
2736
2737         This patch ensures that updateScrollInfoAfterLayout() is called during MathML layout. This
2738         fixes assertions when async scrolling is enabled and MathML elements have non-visible overflow.
2739
2740         Reviewed by Rob Buis.
2741
2742         Test: mathml/mathml-overflow-crash.html
2743
2744         * rendering/mathml/RenderMathMLBlock.cpp:
2745         (WebCore::RenderMathMLBlock::layoutBlock):
2746         (WebCore::RenderMathMLBlock::layoutInvalidMarkup):
2747         * rendering/mathml/RenderMathMLFraction.cpp:
2748         (WebCore::RenderMathMLFraction::layoutBlock):
2749         * rendering/mathml/RenderMathMLMath.cpp:
2750         (WebCore::RenderMathMLMath::layoutBlock):
2751         * rendering/mathml/RenderMathMLMenclose.cpp:
2752         (WebCore::RenderMathMLMenclose::layoutBlock):
2753         * rendering/mathml/RenderMathMLOperator.cpp:
2754         (WebCore::RenderMathMLOperator::layoutBlock):
2755         * rendering/mathml/RenderMathMLPadded.cpp:
2756         (WebCore::RenderMathMLPadded::layoutBlock):
2757         * rendering/mathml/RenderMathMLRoot.cpp:
2758         (WebCore::RenderMathMLRoot::layoutBlock):
2759         * rendering/mathml/RenderMathMLRow.cpp:
2760         (WebCore::RenderMathMLRow::layoutBlock):
2761         * rendering/mathml/RenderMathMLScripts.cpp:
2762         (WebCore::RenderMathMLScripts::layoutBlock):
2763         * rendering/mathml/RenderMathMLSpace.cpp:
2764         (WebCore::RenderMathMLSpace::layoutBlock):
2765         * rendering/mathml/RenderMathMLToken.cpp:
2766         (WebCore::RenderMathMLToken::layoutBlock):
2767         * rendering/mathml/RenderMathMLUnderOver.cpp:
2768         (WebCore::RenderMathMLUnderOver::layoutBlock):
2769
2770 2019-04-24  Greg V  <greg@unrelenting.technology>
2771
2772         Fix -Wc++11-narrowing on unsigned char platforms like FreeBSD/aarch64
2773         https://bugs.webkit.org/show_bug.cgi?id=197148
2774
2775         Reviewed by Alex Christensen.
2776
2777         * contentextensions/DFACombiner.cpp:
2778         * contentextensions/NFAToDFA.cpp:
2779
2780 2019-04-24  Chris Dumez  <cdumez@apple.com>
2781
2782         X-Frame-Options header should be ignored when frame-ancestors CSP directive is present
2783         https://bugs.webkit.org/show_bug.cgi?id=197226
2784         <rdar://problem/50155649>
2785
2786         Reviewed by Alex Christensen.
2787
2788         X-Frame-Options header should be ignored when frame-ancestors CSP directive is present:
2789         - https://www.w3.org/TR/CSP3/#frame-ancestors-and-frame-options
2790
2791         Specification says:
2792         """
2793         In order to allow backwards-compatible deployment, the frame-ancestors directive _obsoletes_ the
2794         X-Frame-Options header. If a resource is delivered with an policy that includes a directive named
2795         frame-ancestors and whose disposition is "enforce", then the X-Frame-Options header MUST be ignored.
2796         """
2797
2798         Gecko and Blink follow the specification, WebKit does not. As a result, page [1] is broken with
2799         WebKit-only on Schwab.com. The page height is wrong and you cannot see all the ETFs as a result.
2800
2801         [1] https://www.schwab.com/public/schwab/investing/investment_help/investment_research/etf_research/etfs.html?&path=/Prospect/Research/etfs/overview/oneSourceETFs.asp
2802
2803         Test: http/tests/security/contentSecurityPolicy/1.1/frame-ancestors/frame-ancestors-overrides-X-Frames-Options.html
2804
2805         * loader/DocumentLoader.cpp:
2806         (WebCore::DocumentLoader::responseReceived):
2807         * page/csp/ContentSecurityPolicy.cpp:
2808         (WebCore::ContentSecurityPolicy::overridesXFrameOptions const):
2809         * page/csp/ContentSecurityPolicy.h:
2810         * page/csp/ContentSecurityPolicyDirectiveList.h:
2811         (WebCore::ContentSecurityPolicyDirectiveList::hasFrameAncestorsDirective const):
2812
2813 2019-04-24  Zalan Bujtas  <zalan@apple.com>
2814
2815         [ContentChangeObserver] Do not use the global _WKContentChange in WebKitLegacy
2816         https://bugs.webkit.org/show_bug.cgi?id=196286
2817         <rdar://problem/49364417>
2818
2819         Reviewed by Simon Fraser.
2820
2821         By reporting WKContentIndeterminateChange in sendMouseMoveEvent enables us to remove the global _WKContentChange state.
2822         Using _WKContentChange is fine as long as only the observed frame reports content change during the synthetic click event.
2823         In case of multiple frames, we should really consult the local state instead.
2824         Unfortunately sendMouseMoveEvent has no access to the observed Document object so we can't really identify the observed content change.
2825         WKContentIndeterminateChange triggers asynchronous decision making at the callsite and in the callback we have access
2826         to the active Document/ContentChangeObverver object and can report the correct state.
2827         This is inline with current WebKit(WK2) behaviour.
2828
2829         Manually tested with a WebKitLegacy test app.
2830
2831         * SourcesCocoa.txt:
2832         * WebCore.xcodeproj/project.pbxproj:
2833         * page/ios/ContentChangeObserver.h:
2834         (WebCore::ContentChangeObserver::setHasNoChangeState):
2835         (WebCore::ContentChangeObserver::setHasIndeterminateState):
2836         (WebCore::ContentChangeObserver::setHasVisibleChangeState):
2837         (WebCore::ContentChangeObserver::setObservedContentState): Deleted.
2838         * page/ios/EventHandlerIOS.mm:
2839         (WebCore::EventHandler::mouseMoved):
2840         * platform/ios/wak/WAKWindow.mm:
2841         (-[WAKWindow sendMouseMoveEvent:contentChange:]):
2842         * platform/ios/wak/WKContentObservation.cpp: Removed.
2843         * platform/ios/wak/WKContentObservation.h:
2844
2845 2019-04-24  Philippe Normand  <pnormand@igalia.com>
2846
2847         [GTK][GStreamer] Flaky ASSERTION FAILED: m_lock.isHeld() in TextureMapperPlatformLayerProxy
2848         https://bugs.webkit.org/show_bug.cgi?id=196739
2849
2850         Reviewed by Xabier Rodriguez-Calvar.
2851
2852         The crash was triggered because m_videoDecoderPlatform not being
2853         explicitely set, its value would be inferred as one of the enum
2854         class values. Making it Optional avoids this issue.
2855
2856         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
2857
2858 2019-04-24  Philippe Normand  <pnormand@igalia.com>
2859
2860         [GStreamer] Crash in AudioTrackPrivate with playbin3 enabled
2861         https://bugs.webkit.org/show_bug.cgi?id=196913
2862
2863         Reviewed by Xabier Rodriguez-Calvar.
2864
2865         The crash was due to a playbin3 code path being triggered during
2866         MSE playback, which is not supposed to work in playbin3 anyway.
2867         The problem is that setting the USE_PLAYBIN3 environment variable
2868         to "1" makes the GStreamer playback plugin register the playbin3
2869         element under the playbin name. So that leads to playbin3 being
2870         used everywhere in WebKit where we assume the playbin element is
2871         used. So the proposed solution is to:
2872
2873         - use a WebKit-specific environment variable instead of the
2874         GStreamer USE_PLAYBIN3 variable.
2875         - emit a warning if the USE_PLAYBIN3 environment variable is
2876         detected. We can't unset it ourselves for security reasons.
2877
2878         The patch also includes a code cleanup of the player method
2879         handling the pipeline creation. The previous code had a bug
2880         leading to playbin3 being used for MSE.
2881
2882         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
2883         (WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin):
2884
2885 2019-04-24  chris fleizach  <cfleizach@apple.com>
2886
2887         AX: Remove deprecated Accessibility Object Model events
2888         https://bugs.webkit.org/show_bug.cgi?id=197073
2889         <rdar://problem/50027819>
2890
2891         Reviewed by Ryosuke Niwa.
2892
2893         Test: accessibility/mac/replace-text-with-range.html
2894
2895         * DerivedSources.make:
2896         * Sources.txt:
2897         * WebCore.xcodeproj/project.pbxproj:
2898         * accessibility/AccessibilityListBoxOption.cpp:
2899         (WebCore::AccessibilityListBoxOption::setSelected):
2900         * accessibility/AccessibilityMediaObject.cpp:
2901         (WebCore::AccessibilityMediaObject::increment):
2902         (WebCore::AccessibilityMediaObject::decrement):
2903         * accessibility/AccessibilityMenuListOption.cpp:
2904         (WebCore::AccessibilityMenuListOption::setSelected):
2905         * accessibility/AccessibilityNodeObject.cpp:
2906         (WebCore::AccessibilityNodeObject::increment):
2907         (WebCore::AccessibilityNodeObject::decrement):
2908         * accessibility/AccessibilityObject.cpp:
2909         (WebCore::AccessibilityObject::press):
2910         (WebCore::AccessibilityObject::replaceTextInRange):
2911         (WebCore::AccessibilityObject::scrollToMakeVisible const):
2912         (WebCore::AccessibilityObject::shouldDispatchAccessibilityEvent const): Deleted.
2913         (WebCore::AccessibilityObject::dispatchAccessibilityEvent const): Deleted.
2914         (WebCore::AccessibilityObject::dispatchAccessibilityEventWithType const): Deleted.
2915         (WebCore::AccessibilityObject::dispatchAccessibleSetValueEvent const): Deleted.
2916         * accessibility/AccessibilityObject.h:
2917         * accessibility/AccessibilityRenderObject.cpp:
2918         (WebCore::AccessibilityRenderObject::setFocused):
2919         (WebCore::AccessibilityRenderObject::setValue):
2920         * accessibility/AccessibilityScrollbar.cpp:
2921         (WebCore::AccessibilityScrollbar::setValue):
2922         * accessibility/AccessibilitySlider.cpp:
2923         (WebCore::AccessibilitySlider::setValue):
2924         * accessibility/ios/AccessibilityObjectIOS.mm:
2925         (WebCore::AccessibilityObject::accessibilityPlatformIncludesObject const):
2926         (WebCore::AccessibilityObject::hasAccessibleDismissEventListener const): Deleted.
2927         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
2928         (-[WebAccessibilityObjectWrapper accessibilityPerformEscape]): Deleted.
2929         (-[WebAccessibilityObjectWrapper accessibilityElementDidBecomeFocused]): Deleted.
2930         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
2931         (-[WebAccessibilityObjectWrapper accessibilityPerformShowMenuAction]):
2932         * dom/Element.idl:
2933         * dom/EventNames.h:
2934         * dom/EventNames.in:
2935         * html/HTMLAttributeNames.in:
2936         * html/HTMLElement.cpp:
2937         (WebCore::HTMLElement::createEventHandlerNameMap):
2938         * page/Settings.yaml:
2939         * testing/InternalSettings.cpp:
2940         (WebCore::InternalSettings::Backup::Backup):
2941         (WebCore::InternalSettings::Backup::restoreTo):
2942         (WebCore::InternalSettings::setAccessibilityEventsEnabled): Deleted.
2943         * testing/InternalSettings.h:
2944         * testing/InternalSettings.idl:
2945
2946 2019-04-23  Andy Estes  <aestes@apple.com>
2947
2948         [iOS] QuickLook documents loaded from file: URLs should be allowed to perform same-document navigations
2949         https://bugs.webkit.org/show_bug.cgi?id=196749
2950         <rdar://problem/35773454>
2951
2952         Reviewed by Daniel Bates.
2953
2954         QuickLook previews are in a non-local origin defined by a unique x-apple-ql-id: URL, which
2955         isolates the origin that hosted the document from the document preview itself. When a
2956         QuickLook document is loaded as a file: URL, SecurityOrigin's protections against loading
2957         local resources from non-local origins prevented navigations like location.reload() and
2958         fragment navigations.
2959
2960         To allow reloads and same-document navigations in QuickLook documents loaded from file: URLs,
2961         we should grant the QuickLook document's SecurityOrigin access to the file path that loaded
2962         the preview.
2963
2964         Added a new API test.
2965
2966         * dom/Document.cpp:
2967         (WebCore::Document::applyQuickLookSandbox):
2968         * page/SecurityOrigin.cpp:
2969         (WebCore::SecurityOrigin::createNonLocalWithAllowedFilePath):
2970         (WebCore::SecurityOrigin::canDisplay const):
2971         * page/SecurityOrigin.h:
2972
2973 2019-04-23  Devin Rousso  <drousso@apple.com>
2974
2975         Web Inspector: Debugger: remove ASSERT_NOT_REACHED where it's possible to reach
2976         https://bugs.webkit.org/show_bug.cgi?id=197210
2977         <rdar://problem/48462912>
2978
2979         Reviewed by Joseph Pecoraro.
2980
2981         * inspector/agents/page/PageDebuggerAgent.cpp:
2982         (WebCore::PageDebuggerAgent::didAddEventListener):
2983         (WebCore::PageDebuggerAgent::didPostMessage):
2984
2985         * inspector/InspectorInstrumentation.cpp:
2986         (WebCore::InspectorInstrumentation::consoleAgentEnabled):
2987         (WebCore::InspectorInstrumentation::timelineAgentEnabled):
2988         Drive-by: add additional `FAST_RETURN_IF_NO_FRONTENDS`.
2989
2990 2019-04-23  Commit Queue  <commit-queue@webkit.org>
2991
2992         Unreviewed, rolling out r244556.
2993         https://bugs.webkit.org/show_bug.cgi?id=197212
2994
2995         Causing build failures on multiple builders (Requested by
2996         ShawnRoberts on #webkit).
2997
2998         Reverted changeset:
2999
3000         "Create AVFoundationSoftLink.{h,mm} to reduce duplicate code"
3001         https://bugs.webkit.org/show_bug.cgi?id=197171
3002         https://trac.webkit.org/changeset/244556
3003
3004 2019-04-23  Devin Rousso  <drousso@apple.com>
3005
3006         Web Inspector: Uncaught Exception: null is not an object (evaluating 'this.ownerDocument.frameIdentifier')
3007         https://bugs.webkit.org/show_bug.cgi?id=196420
3008         <rdar://problem/49444205>
3009
3010         Reviewed by Timothy Hatcher.
3011
3012         Modify the existing `frameId` to represent the owner frame of the node, rather than the
3013         frame it holds (in the case of an `<iframe>`).
3014
3015         * inspector/agents/InspectorDOMAgent.cpp:
3016         (WebCore::InspectorDOMAgent::buildObjectForNode):
3017
3018 2019-04-23  Devin Rousso  <drousso@apple.com>
3019
3020         ContentSecurityPolicy::logToConsole should include line/column number and source location
3021         https://bugs.webkit.org/show_bug.cgi?id=114317
3022         <rdar://problem/13614617>
3023
3024         Reviewed by Timothy Hatcher.
3025
3026         No change in functionality.
3027
3028         * page/csp/ContentSecurityPolicy.h:
3029         * page/csp/ContentSecurityPolicy.cpp:
3030         (WebCore::ContentSecurityPolicy::reportViolation const):
3031         (WebCore::ContentSecurityPolicy::logToConsole const):
3032
3033 2019-04-23  Devin Rousso  <drousso@apple.com>
3034
3035         Web Inspector: Canvas: support recording TypedOMCSSImageValue
3036         https://bugs.webkit.org/show_bug.cgi?id=192609
3037
3038         Reviewed by Timothy Hatcher.
3039
3040         * inspector/InspectorCanvas.h:
3041         * inspector/InspectorCanvas.cpp:
3042         (WebCore::InspectorCanvas::indexForData):
3043         (WebCore::InspectorCanvas::buildAction):
3044
3045 2019-04-23  Andres Gonzalez  <andresg_22@apple.com>
3046
3047         Accessibility text search and selection API enhancements.
3048         https://bugs.webkit.org/show_bug.cgi?id=197095
3049         <rdar://problem/48181791>
3050
3051         Reviewed by Chris Fleizach.
3052
3053         - Split the existing SelectTextWithCriteria API into two: search text API (SearchTextWithCriteria) and a text operation API (TextOperation: select, replace, capitalize...).
3054         - This allows for more flexibility and extensibility.
3055         - Added the ability to retrieve text markers for multiple search hits.
3056         - Various code clean up and consolidation.
3057         - Added LayoutTest for search API.
3058         - Previous API is marked with "To be deprecated", and is implemented with new implementation. May be removed in a future change.
3059
3060         Test: accessibility/mac/search-text/search-text.html
3061
3062         * accessibility/AccessibilityObject.cpp:
3063         (WebCore::rangeClosestToRange):
3064         (WebCore::AccessibilityObject::rangeOfStringClosestToRangeInDirection const):
3065         (WebCore::AccessibilityObject::findTextRange const):
3066         (WebCore::AccessibilityObject::findTextRanges const):
3067         (WebCore::AccessibilityObject::performTextOperation):
3068         (WebCore::AccessibilityObject::frame const):
3069         (WebCore::AccessibilityObject::selectText): Deleted.
3070         * accessibility/AccessibilityObject.h:
3071         (WebCore::AccessibilitySearchTextCriteria::AccessibilitySearchTextCriteria):
3072         (WebCore::AccessibilityTextOperation::AccessibilityTextOperation):
3073         (WebCore::AccessibilitySelectTextCriteria::AccessibilitySelectTextCriteria): Deleted.
3074         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
3075         (accessibilityTextCriteriaForParameterizedAttribute):
3076         (accessibilitySearchTextCriteriaForParameterizedAttribute):
3077         (accessibilityTextOperationForParameterizedAttribute):
3078         (-[WebAccessibilityObjectWrapper IGNORE_WARNINGS_END]):
3079         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):
3080         (accessibilitySelectTextCriteriaForCriteriaParameterizedAttribute): Deleted.
3081
3082 2019-04-23  Guy Lewin  <guy@lewin.co.il>
3083
3084         Multiple File Input Icon Set Regardless of File List
3085         https://bugs.webkit.org/show_bug.cgi?id=195537
3086
3087         Reviewed by Alexey Proskuryakov.
3088
3089         File input elements display icon with an empty file list after
3090         resetting the file list in 'change' event handler - on iOS
3091
3092         Test: fast/forms/file/file-reset-in-change-using-open-panel-with-icon.html
3093
3094         * html/FileInputType.cpp:
3095         (WebCore::FileInputType::filesChosen):
3096
3097 2019-04-23  Eric Carlson  <eric.carlson@apple.com>
3098
3099         Create AVFoundationSoftLink.{h,mm} to reduce duplicate code
3100         https://bugs.webkit.org/show_bug.cgi?id=197171
3101         <rdar://problem/47454979>
3102
3103         Reviewed by Youenn Fablet.
3104
3105         Tests: TestWebKitAPI/Tests/WebCore/cocoa/AVFoundationSoftLinkTest.mm
3106
3107         * Modules/plugins/QuickTimePluginReplacement.mm:
3108         (WebCore::jsValueWithValueInContext):
3109         (WebCore::jsValueWithAVMetadataItemInContext):
3110         * WebCore.xcodeproj/project.pbxproj:
3111         * platform/audio/ios/AudioSessionIOS.mm:
3112         (WebCore::AudioSession::setCategory):
3113         (WebCore::AudioSession::category const):
3114         (WebCore::AudioSession::routeSharingPolicy const):
3115         (WebCore::AudioSession::routingContextUID const):
3116         (WebCore::AudioSession::sampleRate const):
3117         (WebCore::AudioSession::bufferSize const):
3118         (WebCore::AudioSession::numberOfOutputChannels const):
3119         (WebCore::AudioSession::tryToSetActiveInternal):
3120         (WebCore::AudioSession::preferredBufferSize const):
3121         (WebCore::AudioSession::setPreferredBufferSize):
3122         * platform/audio/ios/MediaSessionManagerIOS.mm:
3123         (-[WebMediaSessionHelper initWithCallback:]):
3124         (-[WebMediaSessionHelper startMonitoringAirPlayRoutes]):
3125         * platform/graphics/avfoundation/AVTrackPrivateAVFObjCImpl.mm:
3126         (WebCore::AVTrackPrivateAVFObjCImpl::audioKind const):
3127         (WebCore::AVTrackPrivateAVFObjCImpl::videoKind const):
3128         (WebCore::AVTrackPrivateAVFObjCImpl::label const):
3129         * platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm:
3130         (WebCore::AudioSourceProviderAVFObjC::createMix):
3131         * platform/graphics/avfoundation/MediaPlaybackTargetMac.mm:
3132         * platform/graphics/avfoundation/MediaSelectionGroupAVFObjC.mm:
3133         (WebCore::MediaSelectionGroupAVFObjC::updateOptions):
3134         * platform/graphics/avfoundation/objc/AVFoundationMIMETypeCache.mm:
3135         (WebCore::AVFoundationMIMETypeCache::canDecodeType):
3136         (WebCore::AVFoundationMIMETypeCache::loadMIMETypes):
3137         * platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.mm:
3138         (WebCore::CDMInstanceFairPlayStreamingAVFObjC::supportsPersistableState):
3139         (WebCore::CDMInstanceFairPlayStreamingAVFObjC::supportsPersistentKeys):
3140         (WebCore::CDMInstanceFairPlayStreamingAVFObjC::supportsMediaCapability):
3141         (WebCore::CDMInstanceFairPlayStreamingAVFObjC::initializeWithConfiguration):
3142         (WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::updateLicense):
3143         (WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::loadSession):
3144         (WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::removeSessionData):
3145         (WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::ensureSession):
3146         * platform/graphics/avfoundation/objc/CDMSessionAVContentKeySession.mm:
3147         (WebCore::CDMSessionAVContentKeySession::isAvailable):
3148         (WebCore::CDMSessionAVContentKeySession::releaseKeys):
3149         (WebCore::CDMSessionAVContentKeySession::update):
3150         (WebCore::CDMSessionAVContentKeySession::generateKeyReleaseMessage):
3151         (WebCore::CDMSessionAVContentKeySession::contentKeySession):
3152         * platform/graphics/avfoundation/objc/CDMSessionAVFoundationObjC.mm:
3153         * platform/graphics/avfoundation/objc/CDMSessionAVStreamSession.mm:
3154         (WebCore::CDMSessionAVStreamSession::releaseKeys):
3155         (WebCore::CDMSessionAVStreamSession::update):
3156         (WebCore::CDMSessionAVStreamSession::setStreamSession):
3157         (WebCore::CDMSessionAVStreamSession::generateKeyReleaseMessage):
3158         * platform/graphics/avfoundation/objc/ImageDecoderAVFObjC.mm:
3159         (WebCore::imageDecoderAssetOptions):
3160         (WebCore::ImageDecoderAVFObjC::ImageDecoderAVFObjC):
3161         (WebCore::ImageDecoderAVFObjC::firstEnabledTrack):
3162         (WebCore::ImageDecoderAVFObjC::readSamples):
3163         (SOFT_LINK_CONSTANT_MAY_FAIL): Deleted.
3164         * platform/graphics/avfoundation/objc/InbandTextTrackPrivateAVFObjC.mm:
3165         (WebCore::InbandTextTrackPrivateAVFObjC::label const):
3166         * platform/graphics/avfoundation/objc/InbandTextTrackPrivateLegacyAVFObjC.mm:
3167         (WebCore::InbandTextTrackPrivateLegacyAVFObjC::label const):
3168         * platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm:
3169         (WebCore::MediaPlaybackTargetPickerMac::devicePicker):
3170         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
3171         (WebCore::assetCacheForPath):
3172         (WebCore::MediaPlayerPrivateAVFoundationObjC::clearMediaCache):
3173         (WebCore::MediaPlayerPrivateAVFoundationObjC::clearMediaCacheForOrigins):
3174         (WebCore::MediaPlayerPrivateAVFoundationObjC::cancelLoad):
3175         (WebCore::MediaPlayerPrivateAVFoundationObjC::createImageGenerator):
3176         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerLayer):
3177         (WebCore::MediaPlayerPrivateAVFoundationObjC::synchronizeTextTrackState):
3178         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL):
3179         (WebCore::MediaPlayerPrivateAVFoundationObjC::setAVPlayerItem):
3180         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer):
3181         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerItem):
3182         (WebCore::MediaPlayerPrivateAVFoundationObjC::supportsType):
3183         (WebCore::MediaPlayerPrivateAVFoundationObjC::isAvailable):
3184         (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged):
3185         (WebCore::determineChangedTracksFromNewTracksAndOldItems):
3186         (WebCore::MediaPlayerPrivateAVFoundationObjC::updateAudioTracks):
3187         (WebCore::MediaPlayerPrivateAVFoundationObjC::updateVideoTracks):
3188         (WebCore::MediaPlayerPrivateAVFoundationObjC::createVideoOutput):
3189         (WebCore::MediaPlayerPrivateAVFoundationObjC::outputMediaDataWillChange):
3190         (WebCore::MediaPlayerPrivateAVFoundationObjC::safeMediaSelectionGroupForLegibleMedia):
3191         (WebCore::MediaPlayerPrivateAVFoundationObjC::safeMediaSelectionGroupForAudibleMedia):
3192         (WebCore::MediaPlayerPrivateAVFoundationObjC::safeMediaSelectionGroupForVisualMedia):
3193         (WebCore::MediaPlayerPrivateAVFoundationObjC::processMediaSelectionOptions):
3194         (WebCore::MediaPlayerPrivateAVFoundationObjC::setCurrentTextTrack):
3195         (WebCore::MediaPlayerPrivateAVFoundationObjC::languageOfPrimaryAudioTrack const):
3196         (WebCore::MediaPlayerPrivateAVFoundationObjC::wirelessPlaybackTargetType const):
3197         (WebCore::exernalDeviceDisplayNameForPlayer):
3198         (WebCore::metadataType):
3199         (WebCore::MediaPlayerPrivateAVFoundationObjC::metadataDidArrive):
3200         (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]):
3201         (-[WebCoreAVFPullDelegate outputMediaDataWillChange:]):
3202         (-[WebCoreAVFPullDelegate outputSequenceWasFlushed:]):
3203         (WebCore::MediaPlayerPrivateAVFoundationObjC::processLegacyClosedCaptionsTracks): Deleted.
3204         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
3205         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::MediaPlayerPrivateMediaSourceAVFObjC):
3206         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::isAvailable):
3207         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::supportsType):
3208         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::ensureLayer):
3209         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::streamSession):
3210         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
3211         (-[WebAVSampleBufferStatusChangeListener observeValueForKeyPath:ofObject:change:context:]):
3212         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::isAvailable):
3213         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::ensureLayers):
3214         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
3215         (-[WebAVSampleBufferErrorListener observeValueForKeyPath:ofObject:change:context:]):
3216         (WebCore::SourceBufferPrivateAVFObjC::SourceBufferPrivateAVFObjC):
3217         (WebCore::SourceBufferPrivateAVFObjC::~SourceBufferPrivateAVFObjC):
3218         (WebCore::SourceBufferPrivateAVFObjC::trackDidChangeEnabled):
3219         (WebCore::SourceBufferPrivateAVFObjC::enqueueSample):
3220         * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
3221         (WebCore::PlatformCALayerCocoa::layerTypeForPlatformLayer):
3222         (WebCore::PlatformCALayerCocoa::PlatformCALayerCocoa):
3223         (WebCore::PlatformCALayerCocoa::clone const):
3224         (WebCore::PlatformCALayerCocoa::avPlayerLayer const):
3225         * platform/graphics/cocoa/HEVCUtilitiesCocoa.mm:
3226         (WebCore::validateHEVCParameters):
3227         * platform/ios/PlatformSpeechSynthesizerIOS.mm:
3228         (getAVSpeechUtteranceDefaultSpeechRate):
3229         (getAVSpeechUtteranceMaximumSpeechRate):
3230         (-[WebSpeechSynthesisWrapper speakUtterance:]):
3231         (WebCore::PlatformSpeechSynthesizer::initializeVoiceList):
3232         (SOFT_LINK_CONSTANT): Deleted.
3233         * platform/ios/VideoFullscreenInterfaceAVKit.mm:
3234         (-[WebAVPlayerLayer init]):
3235         (-[WebAVPlayerLayer layoutSublayers]):
3236         (-[WebAVPlayerLayer setVideoGravity:]):
3237         (-[WebAVPlayerLayer videoRect]):
3238         (WebAVPlayerLayerView_startRoutingVideoToPictureInPicturePlayerLayerView):
3239         * platform/mac/SerializedPlatformRepresentationMac.mm:
3240         (WebCore::jsValueWithValueInContext):
3241         (WebCore::jsValueWithAVMetadataItemInContext):
3242         * platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.mm:
3243         (WebCore::getAVFormatIDKeyWithFallback):
3244         (WebCore::getAVNumberOfChannelsKeyWithFallback):
3245         (WebCore::getAVSampleRateKeyWithFallback):
3246         (WebCore::getAVEncoderBitRateKeyWithFallback):
3247         (WebCore::MediaRecorderPrivateWriter::create):
3248         (WebCore::MediaRecorderPrivateWriter::setVideoInput):
3249         (WebCore::MediaRecorderPrivateWriter::setAudioInput):
3250         * platform/mediastream/RealtimeVideoSource.h:
3251         * platform/mediastream/VideoPreset.h:
3252         * platform/mediastream/ios/AVAudioSessionCaptureDeviceManager.mm:
3253         (WebCore::AVAudioSessionCaptureDeviceManager::refreshAudioCaptureDevices):
3254         * platform/mediastream/ios/CoreAudioCaptureSourceIOS.mm:
3255         (-[WebCoreAudioCaptureSourceIOSListener initWithCallback:]):
3256         (-[WebCoreAudioCaptureSourceIOSListener handleInterruption:]):
3257         * platform/mediastream/mac/AVCaptureDeviceManager.mm:
3258         (WebCore::deviceIsAvailable):
3259         (WebCore::AVCaptureDeviceManager::updateCachedAVCaptureDevices):
3260         (WebCore::AVCaptureDeviceManager::refreshCaptureDevices):
3261         (WebCore::AVCaptureDeviceManager::isAvailable):
3262         (WebCore::AVCaptureDeviceManager::~AVCaptureDeviceManager):
3263         * platform/mediastream/mac/AVVideoCaptureSource.mm:
3264         (WebCore::AVVideoPreset::create):
3265         (WebCore::AVVideoPreset::AVVideoPreset):
3266         (WebCore::AVVideoCaptureSource::create):
3267         (WebCore::AVVideoCaptureSource::AVVideoCaptureSource):
3268         (WebCore::AVVideoCaptureSource::capabilities):
3269         (WebCore::sensorOrientationFromVideoOutput):
3270         (WebCore::AVVideoCaptureSource::setupSession):
3271         (WebCore::AVVideoCaptureSource::frameDurationForFrameRate):
3272         (WebCore::AVVideoCaptureSource::setupCaptureSession):
3273         (WebCore::AVVideoCaptureSource::captureOutputDidOutputSampleBufferFromConnection):
3274         (WebCore::AVVideoCaptureSource::generatePresets):
3275         (-[WebCoreAVVideoCaptureSourceObserver addNotificationObservers]):
3276         (-[WebCoreAVVideoCaptureSourceObserver captureOutput:didOutputSampleBuffer:fromConnection:]):
3277
3278 2019-04-23  Timothy Hatcher  <timothy@apple.com>
3279
3280         Speed up RenderTheme::systemColor on Speedometer2.
3281         https://bugs.webkit.org/show_bug.cgi?id=197203
3282         rdar://problem/50056756
3283
3284         Reviewed by Tim Horton.
3285
3286         * rendering/RenderThemeIOS.mm:
3287         (WebCore::RenderThemeIOS::systemColor const): Remove some unused code. And fetch the cache after an early return.
3288         * rendering/RenderThemeMac.mm:
3289         (WebCore::RenderThemeMac::systemColor const): Avoid some allocations in LocalDefaultSystemAppearance
3290         when a CSS color is in the system color cache.
3291
3292 2019-04-23  Ryosuke Niwa  <rniwa@webkit.org>
3293
3294         [iOS] element.focus() sometimes fails to reveal the focused element when it becomes editable dynamically
3295         https://bugs.webkit.org/show_bug.cgi?id=197188
3296
3297         Reviewed by Wenson Hsieh.
3298
3299         The bug was caused by the scroll-to-reveal code triggered by Element::updateFocusAppearance updating
3300         the scroll position via scrolling tree update in a layer tree commit which happens after
3301         _zoomToRevealFocusedElement in WKContentView had already scrolled the frame view.
3302
3303         To fix this problem, we need to defer the editor state update until the layer commit (see r244494),
3304         and update the scrolling tree before invoking WebPageProxy::editorStateChanged which brings up
3305         the keyboard and scroll-to-reveal the caret in the UI process side.
3306
3307         We also avoid revealing the focus for the second time via Document::scheduleScrollToFocusedElement
3308         in Element::updateFocusAppearance as this timer based scrolling also happens after we had already
3309         revealed the caret in _zoomToRevealFocusedElement. This is a bit hacky but works for most cases since
3310         we wouldn't bring up a keyboard if the focused element was not editable anyway.
3311
3312         Test: editing/selection/ios/scrolling-to-focused-element-inside-iframe.html
3313
3314         * dom/Element.cpp:
3315         (WebCore::Element::updateFocusAppearance): Avoid scheduling a timer based reavel of the focused element
3316         when we're already revealing the element via selection change.
3317
3318 2019-04-23  Remy Demarest  <rdemarest@apple.com>
3319
3320         Fix layout issues occuring when entering full screen mode.
3321         https://bugs.webkit.org/show_bug.cgi?id=197086
3322         <rdar://problem/47733671>.
3323
3324         Reviewed by Darin Adler.
3325
3326         This issue is the result of changing the style mask of the window after entering
3327         full screen mode. Safari adds an invisible toolbar to display the URL of the page
3328         which ends up breaking the layout. Having that window use a style that includes a
3329         titlebar fixes the bug.
3330
3331         * platform/mac/WebCoreFullScreenWindow.mm:
3332         (-[WebCoreFullScreenWindow constrainFrameRect:toScreen:]): Ensure that the window
3333         can fill the entire screen including the underlapping the menu bar, so that the
3334         window does not resize when the animation is done.
3335         (-[WebCoreFullScreenWindow canBecomeMainWindow]): Borderless windows cannot become
3336         main by default, adding the titlebar allows it to become main, prevent this from
3337         happening at all to preserve the existing behavior.
3338
3339 2019-04-23  Chris Dumez  <cdumez@apple.com>
3340
3341         [Process-Swap-On-Navigation] WebKit hangs when going back to a form submission's page due to Process-Swap-On-Navigation on iOS 12.2 and higher
3342         https://bugs.webkit.org/show_bug.cgi?id=197097
3343         <rdar://problem/50048318>
3344
3345         Reviewed by Alex Christensen.
3346
3347         * loader/EmptyFrameLoaderClient.h:
3348         * loader/FrameLoader.cpp:
3349         (WebCore::FrameLoader::checkLoadCompleteForThisFrame):
3350         If we still have a provisional item (new load has been started or we did not clear it because we're about to retry),
3351         then let the client know the load will continue by passing an extra flag with the didFailProvisionalLoad.
3352
3353         * loader/FrameLoaderClient.h:
3354         * loader/FrameLoaderTypes.h:
3355
3356 2019-04-23  Carlos Garcia Campos  <cgarcia@igalia.com>
3357
3358         [ATK] Implement AtkComponentIface scroll_to methods
3359         https://bugs.webkit.org/show_bug.cgi?id=196856
3360
3361         Reviewed by Michael Catanzaro.
3362
3363         Implement scroll_to and scroll_to_point when ATK >= 2.30.
3364
3365         Fixes: accessibility/scroll-to-global-point-iframe-nested.html
3366                accessibility/scroll-to-global-point-iframe.html
3367                accessibility/scroll-to-global-point-main-window.html
3368                accessibility/scroll-to-global-point-nested.html
3369                accessibility/scroll-to-make-visible-div-overflow.html
3370                accessibility/scroll-to-make-visible-iframe.html
3371                accessibility/scroll-to-make-visible-nested-2.html
3372                accessibility/scroll-to-make-visible-nested.html
3373
3374         * accessibility/AccessibilityObject.cpp:
3375         (WebCore::AccessibilityObject::scrollToMakeVisible const): Add new method receiving the
3376         ScrollRectToVisibleOptions since ATK interface has a parameter to decide how to scroll.
3377         * accessibility/AccessibilityObject.h:
3378         * accessibility/atk/WebKitAccessibleInterfaceComponent.cpp:
3379         (atkToContents):
3380         (webkitAccessibleComponentRefAccessibleAtPoint):
3381         (webkitAccessibleComponentGetExtents):
3382         (webkitAccessibleComponentGrabFocus):
3383         (webkitAccessibleComponentScrollTo):
3384         (webkitAccessibleComponentScrollToPoint):
3385         (webkitAccessibleComponentInterfaceInit):
3386         (core): Deleted.
3387
3388 2019-04-22  Youenn Fablet  <youenn@apple.com>
3389
3390         Update libwebrtc logging when WebCore WebRTC logging is updated
3391         https://bugs.webkit.org/show_bug.cgi?id=197166
3392         <rdar://problem/50107696>
3393
3394         Unreviewed.
3395
3396         Build fix after https://trac.webkit.org/changeset/244511.
3397
3398         * page/Page.cpp:
3399         (WebCore::Page::configureLoggingChannel):
3400
3401 2019-04-22  Youenn Fablet  <youenn@apple.com>
3402
3403         Cache API should return Abort error in case of putting an aborted fetch
3404         https://bugs.webkit.org/show_bug.cgi?id=196757
3405
3406         Reviewed by Darin Adler.
3407
3408         In case of an aborted fetch, call consume callback with an AbortError.
3409         Update the code that handles load cancelling as the loader callback is called.
3410         Covered by rebased tests.
3411
3412         * Modules/fetch/FetchResponse.cpp:
3413         (WebCore::FetchResponse::addAbortSteps):
3414         (WebCore::FetchResponse::BodyLoader::didFail):
3415         (WebCore::FetchResponse::BodyLoader::BodyLoader):
3416         (WebCore::FetchResponse::BodyLoader::~BodyLoader):
3417         (WebCore::FetchResponse::stop):
3418         * Modules/fetch/FetchResponse.h:
3419
3420 2019-04-22  Youenn Fablet  <youenn@apple.com>
3421
3422         Update libwebrtc logging when WebCore WebRTC logging is updated
3423         https://bugs.webkit.org/show_bug.cgi?id=197166
3424
3425         Reviewed by Eric Carlson.
3426
3427         When updating WebRTC logging from Web Inspector, update libwebrtc logging so that no page reload is required.
3428         Manually tested.
3429
3430         * page/Page.cpp:
3431         (WebCore::Page::configureLoggingChannel):
3432
3433 2019-04-22  Simon Fraser  <simon.fraser@apple.com>
3434
3435         Introduce the concept of "opportunistic" stacking contexts
3436         https://bugs.webkit.org/show_bug.cgi?id=197077
3437
3438         Reviewed by Zalan Bujtas.
3439
3440         Bring back a variant of some code removed in r236424, which allows a RenderLayer
3441         to be stacking context for painting, without actually being on in terms of CSS.
3442         
3443         Internally, RenderLayer will call setIsOpportunisticStackingContext() to make a layer
3444         into a stacking context for painting. External callers deal with isStackingContext()
3445         or isCSSStackingContext().
3446
3447         Sadly we can't make m_forcedStackingContext (set on media element layers) trigger a
3448         non-CSS stacking context; media controls use mix-blend-mode, and rely on the fake-stacking
3449         media layer to be the "isolateBlending" ancestor.
3450
3451         No code uses this yet.
3452
3453         * rendering/RenderLayer.cpp:
3454         (WebCore::RenderLayer::RenderLayer):
3455         (WebCore::RenderLayer::shouldBeCSSStackingContext const):
3456         (WebCore::RenderLayer::isStackingContextChanged):
3457         (WebCore::RenderLayer::setIsOpportunisticStackingContext):
3458         (WebCore::RenderLayer::setIsCSSStackingContext):
3459         (WebCore::RenderLayer::updateAncestorChainHasBlendingDescendants):
3460         (WebCore::RenderLayer::dirtyAncestorChainHasBlendingDescendants):
3461         (WebCore::RenderLayer::beginTransparencyLayers):
3462         (WebCore::RenderLayer::calculateClipRects const):
3463         (WebCore::outputPaintOrderTreeLegend):
3464         (WebCore::outputPaintOrderTreeRecursive):
3465         (WebCore::RenderLayer::shouldBeStackingContext const): Deleted.
3466         (WebCore::RenderLayer::setIsStackingContext): Deleted.
3467         * rendering/RenderLayer.h:
3468         * rendering/RenderLayerBacking.cpp:
3469         (WebCore::RenderLayerBacking::compositingOpacity const):
3470
3471 2019-04-22  Justin Fan  <justin_fan@apple.com>
3472
3473         [WebGPU] Move swap chain methods from GPUDevice to GPUCanvasContext
3474         https://bugs.webkit.org/show_bug.cgi?id=197126
3475
3476         Reviewed by Dean Jackson.
3477
3478         GPUSwapChains are now configured via GPUCanvasContext instead of GPUDevice. Covers WebGPU API 
3479         pull request #262.
3480
3481         Existing WebGPU tests updated to match.
3482
3483         * Modules/webgpu/GPUCanvasContext.cpp:
3484         (WebCore::GPUCanvasContext::configureSwapChain):
3485         (WebCore::GPUCanvasContext::replaceSwapChain): Deleted.
3486         * Modules/webgpu/GPUCanvasContext.h:
3487         * Modules/webgpu/GPUCanvasContext.idl:
3488         * Modules/webgpu/WebGPUDevice.cpp:
3489         (WebCore::WebGPUDevice::createSwapChain const): Deleted.
3490         * Modules/webgpu/WebGPUDevice.h:
3491         (WebCore::WebGPUDevice::device):
3492         * Modules/webgpu/WebGPUDevice.idl:
3493         * Modules/webgpu/WebGPUSwapChainDescriptor.cpp: Copied from Source/WebCore/Modules/webgpu/WebGPUSwapChainDescriptor.h.
3494         (WebCore::WebGPUSwapChainDescriptor::asGPUSwapChainDescriptor const):
3495         * Modules/webgpu/WebGPUSwapChainDescriptor.h:
3496         * Sources.txt:
3497         * WebCore.xcodeproj/project.pbxproj:
3498         * platform/graphics/gpu/GPUDevice.cpp:
3499         (WebCore::GPUDevice::setSwapChain):
3500         (WebCore::GPUDevice::tryCreateSwapChain const): Deleted.
3501         * platform/graphics/gpu/GPUDevice.h:
3502         * platform/graphics/gpu/GPUSwapChain.h:
3503         * platform/graphics/gpu/GPUSwapChainDescriptor.h:
3504         (WebCore::GPUSwapChainDescriptor::GPUSwapChainDescriptor):
3505         * platform/graphics/gpu/cocoa/GPUSwapChainMetal.mm:
3506         (WebCore::GPUSwapChain::tryCreate):
3507
3508 2019-04-22  Said Abou-Hallawa  <said@apple.com>
3509
3510         Mark SVGStringList properties '[SameObject]' in the IDL files
3511         Followup to https://bugs.webkit.org/show_bug.cgi?id=197137
3512
3513         Reviewed by Darin Adler.
3514
3515         The SVG elements do not create tear-off wrappers for SVGStrigList DOM
3516         objects anymore. Instead they return Ref pointers to the same RefCounted
3517         objects. So they should be marked '[SameObject]' in their IDL files.
3518
3519         * svg/SVGTests.idl:
3520         * svg/SVGViewElement.idl:
3521
3522 2019-04-22  Commit Queue  <commit-queue@webkit.org>
3523
3524         Unreviewed, rolling out r244495.
3525         https://bugs.webkit.org/show_bug.cgi?id=197159
3526
3527         Causing build failures on OpenSource and Internal bots
3528         (Requested by ShawnRoberts on #webkit).
3529
3530         Reverted changeset:
3531
3532         "WHLSLPrepare.cpp always recompiles, even if nothing was
3533         changed"
3534         https://bugs.webkit.org/show_bug.cgi?id=197151
3535         https://trac.webkit.org/changeset/244495
3536
3537 2019-04-22  Carlos Garcia Campos  <cgarcia@igalia.com>
3538
3539         REGRESSION(r241289): [GTK] accessibility/removed-continuation-element-causes-crash.html and accessibility/removed-anonymous-block-child-causes-crash.html crashes
3540         https://bugs.webkit.org/show_bug.cgi?id=194630
3541
3542         Reviewed by Michael Catanzaro.
3543
3544         Do not assume core object always has a wrapper in webkitAccessibleRefChild().
3545
3546         Fixes: accessibility/removed-continuation-element-causes-crash.html
3547                accessibility/removed-anonymous-block-child-causes-crash.html
3548
3549         * accessibility/atk/WebKitAccessible.cpp:
3550         (webkitAccessibleRefChild): Return early if wrapper is nullptr.
3551
3552 2019-04-21  Darin Adler  <darin@apple.com>
3553
3554         WHLSLPrepare.cpp always recompiles, even if nothing was changed
3555         https://bugs.webkit.org/show_bug.cgi?id=197151
3556
3557         Reviewed by Dan Bernstein.
3558
3559         * DerivedSources-input.xcfilelist: Script updated this automatically after
3560         DerivedSources.make was corrected.
3561         * DerivedSources-output.xcfilelist: Ditto, although I had to manually remove
3562         one bogus leftover reference to WHLSLStandardLibrary.cpp.
3563
3564         * DerivedSources.make: Updated the rule that builds WHSLStandardLibrary.h to
3565         no longer refer to nonexistent WHLSLStandardLibrary.cpp. Because the dependency
3566         was on a file that was never created, the rule to regenerate WHSLStandardLibrary.h
3567         was running on every build, instead of only when one of the dependencies changed.
3568
3569 2019-04-20  Said Abou-Hallawa  <said@apple.com>
3570
3571         REGRESSION (r243137): SVGViewElement.viewTarget should not return a new object
3572         https://bugs.webkit.org/show_bug.cgi?id=197137
3573
3574         Reviewed by Darin Adler.
3575
3576         All the DOM objects accessing the viewTarget of the same SVGViewElement 
3577         should hold a Ref pointer to the same SVGStringList property.
3578
3579         Test: svg/dom/SVGViewElement-viewTarget.html
3580
3581         * svg/SVGViewElement.idl:
3582
3583 2019-04-20  Jer Noble  <jer.noble@apple.com>
3584
3585         REGRESSION(r243958): Unnecessary deactivation of AudioSession (PLT Regression)
3586         https://bugs.webkit.org/show_bug.cgi?id=197123
3587         <rdar://problem/49783264>
3588
3589         Reviewed by Per Arne Vollan.
3590
3591         Only set m_becameActive if we actually activated the AudioSession before starting playback. This
3592         avoids unnecessarily deactivating the AudioSession in processWillSuspend().
3593
3594         * platform/audio/PlatformMediaSessionManager.cpp:
3595         (WebCore::PlatformMediaSessionManager::sessionWillBeginPlayback):
3596
3597 2019-04-19  Devin Rousso  <drousso@apple.com>
3598
3599         Web Inspector: Timelines: CPU: ensure that tracking stops when disconnecting Web Inspector
3600         https://bugs.webkit.org/show_bug.cgi?id=197115
3601         <rdar://problem/49877875>
3602
3603         Reviewed by Joseph Pecoraro.
3604
3605         * inspector/agents/InspectorCPUProfilerAgent.cpp:
3606         (WebCore::InspectorCPUProfilerAgent::willDestroyFrontendAndBackend):
3607
3608 2019-04-19  Devin Rousso  <drousso@apple.com>
3609
3610         Web Inspector: REGRESSION: Elements: "Inspect Element" context menu often doesn't select that element
3611         https://bugs.webkit.org/show_bug.cgi?id=197091
3612         <rdar://problem/49953728>
3613
3614         Reviewed by Joseph Pecoraro.
3615
3616         Delay the `inspect` event fron firing with the focued node until the frontend has had a
3617         chance to request the document. Otherwise, requesting the document clears the mapping of
3618         node-to-id, so the focused node's id would no longer be valid.
3619
3620         * inspector/agents/InspectorDOMAgent.cpp:
3621         (WebCore::InspectorDOMAgent::didCreateFrontendAndBackend):
3622         (WebCore::InspectorDOMAgent::willDestroyFrontendAndBackend):
3623         (WebCore::InspectorDOMAgent::getDocument):
3624         (WebCore::InspectorDOMAgent::focusNode):
3625         (WebCore::InspectorDOMAgent::didCommitLoad):
3626
3627 2019-04-19  John Wilander  <wilander@apple.com>
3628
3629         Disable Ad Click Attribution in ephemeral sessions and make sure conversion requests use an ephemeral, stateless session
3630         https://bugs.webkit.org/show_bug.cgi?id=197108
3631         <rdar://problem/49918702>
3632
3633         Reviewed by Alex Christensen.
3634
3635         Tests: http/tests/adClickAttribution/conversion-disabled-in-ephemeral-session.html
3636                http/tests/adClickAttribution/store-disabled-in-ephemeral-session.html
3637
3638         * html/HTMLAnchorElement.cpp:
3639         (WebCore::HTMLAnchorElement::parseAdClickAttribution const):
3640             Early return for ephemeral sessions.
3641         * loader/ResourceLoader.cpp:
3642         (WebCore::ResourceLoader::shouldUseCredentialStorage):
3643             Now returns false for StoredCredentialsPolicy:EphemeralStatelessCookieless.
3644         * platform/network/StoredCredentialsPolicy.h:
3645             Added enum value EphemeralStatelessCookieless.
3646
3647 2019-04-19  Timothy Hatcher  <timothy@apple.com>
3648
3649         Standardize the <meta name="color-scheme"> separator.
3650         https://bugs.webkit.org/show_bug.cgi?id=193931
3651         rdar://problem/49995929
3652
3653         Reviewed by Darin Adler.
3654
3655         Tests: css-dark-mode/color-scheme-meta.html
3656
3657         * dom/Document.cpp:
3658         (WebCore::processColorSchemeString): Use isHTMLSpace insead of isColorSchemeSeparator and isASCIISpace.
3659         (WebCore::isColorSchemeSeparator): Deleted.
3660
3661 2019-04-19  Wenson Hsieh  <wenson_hsieh@apple.com>
3662
3663         [iOS] Add quirks to disable autocorrection and autocapitalization in hidden editable areas on some websites
3664         https://bugs.webkit.org/show_bug.cgi?id=197102
3665         <rdar://problem/49864669>
3666
3667         Reviewed by Ryosuke Niwa.
3668
3669         Add a quirk to disable autocorrection and autocapitalization in hidden editable areas.
3670
3671         * page/Quirks.cpp:
3672         (WebCore::shouldSuppressAutocorrectionAndAutocaptializationInHiddenEditableAreasForHost):
3673         (WebCore::Quirks::shouldSuppressAutocorrectionAndAutocaptializationInHiddenEditableAreas const):
3674         * page/Quirks.h:
3675
3676 2019-04-18  Fujii Hironori  <Hironori.Fujii@sony.com>
3677
3678         Implement KeyedDecoderGeneric and KeyedEncoderGeneric
3679         https://bugs.webkit.org/show_bug.cgi?id=186410
3680
3681         Reviewed by Don Olmstead.
3682
3683         Implemented KeyedDecoderGeneric and KeyedEncoderGeneric by using
3684         WTF::Persistence::Decoder and WTF::Persistence::Encoder.
3685
3686         No new tests. Covered by existing tests.
3687
3688         * PlatformWin.cmake: Added KeyedDecoderGeneric.cpp and
3689         KeyedEncoderGeneric.cpp, and removed KeyedDecoderCF.cpp and
3690         KeyedEncoderCF.cpp for WinCairo port.
3691         * platform/generic/KeyedDecoderGeneric.cpp:
3692         * platform/generic/KeyedDecoderGeneric.h:
3693         * platform/generic/KeyedEncoderGeneric.cpp:
3694         * platform/generic/KeyedEncoderGeneric.h:
3695
3696 2019-04-18  Ross Kirsling  <ross.kirsling@sony.com>
3697
3698         [WinCairo] Non-unified build fails to link Tools
3699         https://bugs.webkit.org/show_bug.cgi?id=196866
3700
3701         Reviewed by Fujii Hironori.
3702
3703         * CMakeLists.txt:
3704         Drive-by fix -- don't disable string pooling when building WebCoreTestSupport.
3705         (This should have been part of r235203.)
3706
3707 2019-04-18  Commit Queue  <commit-queue@webkit.org>
3708
3709         Unreviewed, rolling out r244434.
3710         https://bugs.webkit.org/show_bug.cgi?id=197089
3711
3712         caused 1 API test failure (Requested by zalan on #webkit).
3713
3714         Reverted changeset:
3715
3716         "Regression (r244291): Broken API Test
3717         AutoLayoutRenderingProgressRelativeOrdering"
3718         https://bugs.webkit.org/show_bug.cgi?id=196948
3719         https://trac.webkit.org/changeset/244434
3720
3721 2019-04-18  Don Olmstead  <don.olmstead@sony.com>
3722
3723         [CMake] Make WebCore headers copies
3724         https://bugs.webkit.org/show_bug.cgi?id=182512
3725         <rdar://problem/37510435>
3726
3727         Unreviewed build fix.
3728
3729         Add new header from r244440.
3730
3731         * Headers.cmake:
3732
3733 2019-04-18  Don Olmstead  <don.olmstead@sony.com>
3734
3735         [CMake] Make WebCore headers copies
3736         https://bugs.webkit.org/show_bug.cgi?id=182512
3737         <rdar://problem/37510435>
3738
3739         Reviewed by Alex Christensen.
3740
3741         The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was
3742         originally Windows only but now this is enabled for all CMake based ports.
3743
3744         Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and
3745         tests. Shared headers are within Headers.cmake while port and platform specific headers
3746         are in their respective CMake files. Listing out all headers is preferred because globbing
3747         will break the build whenever a file is added.
3748
3749         All include directories within the WebCore source tree are now PRIVATE. They were
3750         modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets
3751         which will prevent erroneous includes in targets dependent on WebCore.
3752
3753         * CMakeLists.txt:
3754         * Headers.cmake: Added.
3755         * PlatformAppleWin.cmake:
3756         * PlatformGTK.cmake:
3757         * PlatformMac.cmake:
3758         * PlatformPlayStation.cmake:
3759         * PlatformWPE.cmake:
3760         * PlatformWin.cmake:
3761         * PlatformWinCairo.cmake:
3762         * platform/Cairo.cmake:
3763         * platform/Curl.cmake:
3764         * platform/FreeType.cmake:
3765         * platform/GStreamer.cmake:
3766         * platform/HolePunch.cmake:
3767         * platform/ImageDecoders.cmake:
3768         * platform/Soup.cmake: Added.
3769         * platform/TextureMapper.cmake:
3770
3771 2019-04-18  Justin Fan  <justin_fan@apple.com>
3772
3773         [Web GPU] Implement API default values
3774         https://bugs.webkit.org/show_bug.cgi?id=197032
3775
3776         Reviewed by Myles C. Maxfield.
3777
3778         Add default values and 'required' qualifiers recently merged to the WebGPU API.
3779
3780         WebGPU tests specifying these default values have been updated to rely on them for functionality.
3781
3782         * Modules/webgpu/GPUBindGroupLayoutBinding.idl:
3783         * Modules/webgpu/GPUBindGroupLayoutDescriptor.idl:
3784         * Modules/webgpu/GPUBlendDescriptor.idl:
3785         * Modules/webgpu/GPUBufferDescriptor.idl:
3786         * Modules/webgpu/GPUColor.idl:
3787         * Modules/webgpu/GPUColorStateDescriptor.idl:
3788         * Modules/webgpu/GPUDepthStencilStateDescriptor.idl:
3789         * Modules/webgpu/GPUExtent3D.idl:
3790         * Modules/webgpu/GPUInputStateDescriptor.idl:
3791         * Modules/webgpu/GPUOrigin3D.h:
3792         * Modules/webgpu/GPUOrigin3D.idl:
3793         * Modules/webgpu/GPURequestAdapterOptions.idl:
3794         * Modules/webgpu/GPUTextureDescriptor.idl:
3795         * Modules/webgpu/GPUVertexAttributeDescriptor.idl:
3796         * Modules/webgpu/GPUVertexInputDescriptor.idl:
3797         * Modules/webgpu/WebGPUBindGroupBinding.idl:
3798         * Modules/webgpu/WebGPUBindGroupDescriptor.idl:
3799         * Modules/webgpu/WebGPUBufferBinding.h:
3800         * Modules/webgpu/WebGPUBufferBinding.idl:
3801         * Modules/webgpu/WebGPUCommandEncoder.idl:
3802         * Modules/webgpu/WebGPUPipelineDescriptorBase.idl:
3803         * Modules/webgpu/WebGPUPipelineLayoutDescriptor.idl:
3804         * Modules/webgpu/WebGPUPipelineStageDescriptor.idl:
3805         * Modules/webgpu/WebGPURenderPassDescriptor.idl:
3806         * Modules/webgpu/WebGPURenderPipelineDescriptor.cpp:
3807         (WebCore::WebGPURenderPipelineDescriptor::tryCreateGPURenderPipelineDescriptor const):
3808         * Modules/webgpu/WebGPURenderPipelineDescriptor.h:
3809         * Modules/webgpu/WebGPURenderPipelineDescriptor.idl:
3810         * Modules/webgpu/WebGPUShaderModuleDescriptor.idl:
3811         * platform/graphics/gpu/GPUBlendDescriptor.h:
3812         * platform/graphics/gpu/GPUColorStateDescriptor.h:
3813         * platform/graphics/gpu/GPUCommandBuffer.h:
3814         * platform/graphics/gpu/GPUDepthStencilStateDescriptor.h:
3815         * platform/graphics/gpu/GPURenderPassDescriptor.h:
3816         * platform/graphics/gpu/GPURenderPipelineDescriptor.h:
3817         (WebCore::GPURenderPipelineDescriptor::GPURenderPipelineDescriptor):
3818         * platform/graphics/gpu/GPURequestAdapterOptions.h:
3819         * platform/graphics/gpu/GPUTextureDescriptor.h:
3820         * platform/graphics/gpu/GPUVertexAttributeDescriptor.h:
3821         * platform/graphics/gpu/GPUVertexInputDescriptor.h:
3822         * platform/graphics/gpu/cocoa/GPURenderPipelineMetal.mm:
3823         (WebCore::convertRenderPipelineDescriptor):
3824         (WebCore::trySetFunctionsForPipelineDescriptor):
3825
3826 2019-04-18  Jer Noble  <jer.noble@apple.com>
3827
3828         Refactoring: Pull all fullscreen code out of Document and into its own helper class
3829         https://bugs.webkit.org/show_bug.cgi?id=197017
3830
3831         Reviewed by Eric Carlson.
3832
3833         * CMakeLists.txt:
3834         * DerivedSources-input.xcfilelist:
3835         * DerivedSources-output.xcfilelist:
3836         * DerivedSources.make:
3837         * Sources.txt:
3838         * WebCore.xcodeproj/project.pbxproj:
3839         * css/CSSDefaultStyleSheets.cpp:
3840         (WebCore::CSSDefaultStyleSheets::ensureDefaultStyleSheetsForElement):
3841         * css/SelectorCheckerTestFunctions.h:
3842         (WebCore::matchesFullScreenPseudoClass):
3843         (WebCore::matchesFullScreenAnimatingFullScreenTransitionPseudoClass):
3844         (WebCore::matchesFullScreenDocumentPseudoClass):
3845         (WebCore::matchesFullScreenControlsHiddenPseudoClass):
3846         * dom/Document.cpp:
3847         (WebCore::Document::removedLastRef):
3848         (WebCore::Document::prepareForDestruction):
3849         (WebCore::Document::nodeChildrenWillBeRemoved):
3850         (WebCore::Document::nodeWillBeRemoved):
3851         (WebCore::isAttributeOnAllOwners): Deleted.
3852         (WebCore::Document::fullScreenIsAllowedForElement const): Deleted.
3853         (WebCore::Document::requestFullScreenForElement): Deleted.
3854         (WebCore::Document::webkitCancelFullScreen): Deleted.
3855         (WebCore::Document::webkitExitFullscreen): Deleted.
3856         (WebCore::Document::webkitFullscreenEnabled const): Deleted.
3857         (WebCore::unwrapFullScreenRenderer): Deleted.
3858         (WebCore::Document::webkitWillEnterFullScreen): Deleted.
3859         (WebCore::Document::webkitDidEnterFullScreen): Deleted.
3860         (WebCore::Document::webkitWillExitFullScreen): Deleted.
3861         (WebCore::Document::webkitDidExitFullScreen): Deleted.
3862         (WebCore::Document::setFullScreenRenderer): Deleted.
3863         (WebCore::Document::dispatchFullScreenChangeEvents): Deleted.
3864         (WebCore::Document::dispatchFullScreenChangeOrErrorEvent): Deleted.
3865         (WebCore::Document::fullScreenElementRemoved): Deleted.
3866         (WebCore::Document::adjustFullScreenElementOnNodeRemoval): Deleted.
3867         (WebCore::Document::isAnimatingFullScreen const): Deleted.
3868         (WebCore::Document::setAnimatingFullScreen): Deleted.
3869         (WebCore::Document::areFullscreenControlsHidden const): Deleted.
3870         (WebCore::Document::setFullscreenControlsHidden): Deleted.
3871         (WebCore::Document::clearFullscreenElementStack): Deleted.
3872         (WebCore::Document::popFullscreenElementStack): Deleted.
3873         (WebCore::Document::pushFullscreenElementStack): Deleted.
3874         (WebCore::Document::addDocumentToFullScreenChangeEventQueue): Deleted.
3875         * dom/Document.h:
3876         (WebCore::Document::fullscreenManager):
3877         (WebCore::Document::webkitIsFullScreen const): Deleted.
3878         (WebCore::Document::webkitFullScreenKeyboardInputAllowed const): Deleted.
3879         (WebCore::Document::webkitCurrentFullScreenElement const): Deleted.
3880         (WebCore::Document::webkitCurrentFullScreenElementForBindings const): Deleted.
3881         (WebCore::Document::fullScreenRenderer const): Deleted.
3882         (WebCore::Document::webkitFullscreenElement const): Deleted.
3883         (WebCore::Document::webkitFullscreenElementForBindings const): Deleted.
3884         * dom/Document.idl:
3885         * dom/DocumentFullscreen.h:
3886         (WebCore::DocumentFullscreen::webkitFullscreenEnabled):
3887         (WebCore::DocumentFullscreen::webkitFullscreenElement):
3888         (WebCore::DocumentFullscreen::webkitExitFullscreen):
3889         (WebCore::DocumentFullscreen::webkitIsFullScreen):
3890         (WebCore::DocumentFullscreen::webkitFullScreenKeyboardInputAllowed):
3891         (WebCore::DocumentFullscreen::webkitCurrentFullScreenElement):
3892         (WebCore::DocumentFullscreen::webkitCancelFullScreen):
3893         * dom/DocumentFullscreen.idl:
3894         * dom/Element.cpp:
3895         (WebCore::Element::webkitRequestFullscreen):
3896         * dom/EventPath.cpp:
3897         (WebCore::shouldEventCrossShadowBoundary):
3898         * dom/FullscreenManager.cpp: Added.
3899         (WebCore::isAttributeOnAllOwners):
3900         (WebCore::FullscreenManager::FullscreenManager):
3901         (WebCore::FullscreenManager::fullscreenIsAllowedForElement const):
3902         (WebCore::FullscreenManager::requestFullscreenForElement):
3903         (WebCore::FullscreenManager::cancelFullscreen):
3904         (WebCore::FullscreenManager::requestExitFullscreen):
3905         (WebCore::FullscreenManager::exitFullscreen):
3906         (WebCore::FullscreenManager::isFullscreenEnabled const):
3907         (WebCore::unwrapFullscreenRenderer):
3908         (WebCore::FullscreenManager::willEnterFullscreen):
3909         (WebCore::FullscreenManager::didEnterFullscreen):
3910         (WebCore::FullscreenManager::willExitFullscreen):
3911         (WebCore::FullscreenManager::didExitFullscreen):
3912         (WebCore::FullscreenManager::setFullscreenRenderer):
3913         (WebCore::FullscreenManager::dispatchFullscreenChangeEvents):
3914         (WebCore::FullscreenManager::dispatchFullscreenChangeOrErrorEvent):
3915         (WebCore::FullscreenManager::fullscreenElementRemoved):
3916         (WebCore::FullscreenManager::adjustFullscreenElementOnNodeRemoval):
3917         (WebCore::FullscreenManager::isAnimatingFullscreen const):
3918         (WebCore::FullscreenManager::setAnimatingFullscreen):
3919         (WebCore::FullscreenManager::areFullscreenControlsHidden const):
3920         (WebCore::FullscreenManager::setFullscreenControlsHidden):
3921         (WebCore::FullscreenManager::clear):
3922         (WebCore::FullscreenManager::emptyEventQueue):
3923         (WebCore::FullscreenManager::clearFullscreenElementStack):
3924         (WebCore::FullscreenManager::popFullscreenElementStack):
3925         (WebCore::FullscreenManager::pushFullscreenElementStack):
3926         (WebCore::FullscreenManager::addDocumentToFullscreenChangeEventQueue):
3927         * dom/FullscreenManager.h: Added.
3928         (WebCore::FullscreenManager::document):
3929         (WebCore::FullscreenManager::document const):
3930         (WebCore::FullscreenManager::topDocument const):
3931         (WebCore::FullscreenManager::page const):
3932         (WebCore::FullscreenManager::frame const):
3933         (WebCore::FullscreenManager::documentElement const):
3934         (WebCore::FullscreenManager::hasLivingRenderTree const):
3935         (WebCore::FullscreenManager::pageCacheState const):
3936         (WebCore::FullscreenManager::scheduleFullStyleRebuild):
3937         (WebCore::FullscreenManager::fullscreenElement const):
3938         (WebCore::FullscreenManager::isFullscreen const):
3939         (WebCore::FullscreenManager::isFullscreenKeyboardInputAllowed const):
3940         (WebCore::FullscreenManager::currentFullscreenElement const):
3941         (WebCore::FullscreenManager::fullscreenRenderer const):
3942         * html/HTMLMediaElement.cpp:
3943         (WebCore::HTMLMediaElement::isFullscreen const):
3944         (WebCore::HTMLMediaElement::isStandardFullscreen const):
3945         (WebCore::HTMLMediaElement::enterFullscreen):
3946         (WebCore::HTMLMediaElement::exitFullscreen):
3947         * html/MediaElementSession.cpp:
3948         (WebCore::MediaElementSession::canShowControlsManager const):
3949         * html/shadow/MediaControlElements.cpp:
3950         (WebCore::MediaControlFullscreenButtonElement::defaultEventHandler):
3951         * inspector/agents/InspectorDOMAgent.cpp:
3952         * page/EventHandler.cpp:
3953         (WebCore::EventHandler::isKeyEventAllowedInFullScreen const):
3954         (WebCore::EventHandler::internalKeyEvent):
3955         * page/Page.cpp:
3956         (WebCore::Page::setFullscreenControlsHidden):
3957         * rendering/RenderFullScreen.cpp:
3958         (WebCore::RenderFullScreen::wrapNewRenderer):
3959         (WebCore::RenderFullScreen::wrapExistingRenderer):
3960         * rendering/RenderLayerCompositor.cpp:
3961         (WebCore::isDescendantOfFullScreenLayer):
3962         * rendering/updating/RenderTreeBuilder.h:
3963         * rendering/updating/RenderTreeBuilderInline.cpp:
3964         (WebCore::RenderTreeBuilder::Inline::splitInlines):
3965         * rendering/updating/RenderTreeUpdater.cpp:
3966         (WebCore::RenderTreeUpdater::createRenderer):
3967         * style/StyleSharingResolver.cpp:
3968         (WebCore::Style::SharingResolver::canShareStyleWithElement const):
3969         * testing/Internals.cpp:
3970         (WebCore::Internals::webkitWillEnterFullScreenForElement):
3971         (WebCore::Internals::webkitDidEnterFullScreenForElement):
3972         (WebCore::Internals::webkitWillExitFullScreenForElement):
3973         (WebCore::Internals::webkitDidExitFullScreenForElement):
3974         (WebCore::Internals::isAnimatingFullScreen const):
3975
3976 2019-04-18  Jer Noble  <jer.noble@apple.com>
3977
3978         Add support for parsing FairPlayStreaming PSSH boxes.
3979         https://bugs.webkit.org/show_bug.cgi?id=197064
3980
3981         Reviewed by Eric Carlson.
3982
3983         API Tests: ISO.ISOFairPlayStreamingPsshBox
3984
3985         Add a new set of ISOBox classes for parsing the contents of a FairPlayStreaming PSSH box,
3986         and add support for this new box to CDMFairPlayStreaming.
3987
3988         Drive-by fix: add an explicit include for MainThread.h to LibWebRTCProviderCocoa.cpp.
3989
3990         * SourcesCocoa.txt:
3991         * WebCore.xcodeproj/project.pbxproj:
3992         * platform/graphics/FourCC.h:
3993         * platform/graphics/avfoundation/CDMFairPlayStreaming.cpp:
3994         (WebCore::CDMPrivateFairPlayStreaming::cencName):
3995         (WebCore::fairPlaySystemID):
3996         (WebCore::extractSchemeAndKeyIdFromCenc):
3997         (WebCore::CDMPrivateFairPlayStreaming::extractKeyIDsCenc):
3998         (WebCore::CDMPrivateFairPlayStreaming::sanitizeCenc):
3999         (WebCore::validInitDataTypes):
4000         (WebCore::CDMFactory::platformRegisterFactories):
4001         * platform/graphics/avfoundation/CDMFairPlayStreaming.h:
4002         * platform/graphics/avfoundation/ISOFairPlayStreamingPsshBox.cpp: Added.
4003         (WebCore::ISOFairPlayStreamingPsshBox::fairPlaySystemID):
4004         (WebCore::ISOFairPlayStreamingInfoBox::parse):
4005         (WebCore::ISOFairPlayStreamingKeyRequestInfoBox::parse):
4006         (WebCore::ISOFairPlayStreamingKeyAssetIdBox::parse):
4007         (WebCore::ISOFairPlayStreamingKeyContextBox::parse):
4008         (WebCore::ISOFairPlayStreamingKeyVersionListBox::parse):
4009         (WebCore::ISOFairPlayStreamingKeyRequestBox::parse):
4010         (WebCore::ISOFairPlayStreamingInitDataBox::parse):
4011         (WebCore::ISOFairPlayStreamingPsshBox::parse):
4012         * platform/graphics/avfoundation/ISOFairPlayStreamingPsshBox.h: Added.
4013         * platform/mediastream/libwebrtc/LibWebRTCProviderCocoa.cpp:
4014
4015 2019-04-18  Sihui Liu  <sihui_liu@apple.com>
4016
4017         Blob type cannot be stored correctly in IDB when IDBObjectSt