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