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