Use normal loading path for ping loads
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2019-04-26  Youenn Fablet  <youenn@apple.com>
2
3         Use normal loading path for ping loads
4         https://bugs.webkit.org/show_bug.cgi?id=196807
5
6         Reviewed by Alex Christensen.
7
8         Make use of regular code path for ping loads and beacon.
9         This is done conditionally on KeepAlive flag.
10         The benefits are a single loading code path and service worker interception.
11
12         For that purpose, introduce a LoaderStrategy switch based on KeepAlive runtime flag.
13         This switch is used to use ping loads when keepAlive is set or regular loads.
14         In case of regular loads, the keepAlive flag should be used to extend the lifetime of the load.
15
16         Migrate ping loads to use CachedResourceLoader instead of PingLoad.
17         For that purpose, introduce a new Ping CachedResource type.
18
19         Covered by existing tests.
20
21         * Modules/beacon/NavigatorBeacon.cpp:
22         (WebCore::NavigatorBeacon::sendBeacon):
23         * inspector/agents/InspectorPageAgent.cpp:
24         (WebCore::InspectorPageAgent::inspectorResourceType):
25         * loader/LinkLoader.cpp:
26         (WebCore::createLinkPreloadResourceClient):
27         * loader/LoaderStrategy.h:
28         * loader/PingLoader.cpp:
29         (WebCore::PingLoader::loadImage):
30         (WebCore::PingLoader::sendPing):
31         (WebCore::PingLoader::sendViolationReport):
32         (WebCore::PingLoader::startPingLoad):
33         * loader/PingLoader.h:
34         * loader/ResourceLoadInfo.cpp:
35         (WebCore::toResourceType):
36         * loader/SubresourceLoader.cpp:
37         (WebCore::logResourceLoaded):
38         * loader/cache/CachedResource.cpp:
39         (WebCore::CachedResource::defaultPriorityForResourceType):
40         (WebCore::CachedResource::load):
41         (WebCore::CachedResource::cancelLoad):
42         * loader/cache/CachedResource.h:
43         (WebCore::CachedResource::shouldUsePingLoad):
44         (WebCore::CachedResource::isMainOrMediaOrIconOrRawResource const):
45         * loader/cache/CachedResourceLoader.cpp:
46         (WebCore::createResource):
47         (WebCore::CachedResourceLoader::requestPingResource):
48         (WebCore::contentTypeFromResourceType):
49         (WebCore::CachedResourceLoader::checkInsecureContent const):
50         (WebCore::CachedResourceLoader::allowedByContentSecurityPolicy const):
51         (WebCore::CachedResourceLoader::canRequest):
52         (WebCore::isResourceSuitableForDirectReuse):
53         (WebCore::destinationForType):
54         * loader/cache/CachedResourceLoader.h:
55
56 2019-04-26  Alex Christensen  <achristensen@webkit.org>
57
58         Fix Windows build after r244695
59        ​https://bugs.webkit.org/show_bug.cgi?id=197165
60
61         * loader/PingLoader.cpp:
62
63 2019-04-26  Alex Christensen  <achristensen@webkit.org>
64
65         Fix internal High Sierra build after r244653
66         https://bugs.webkit.org/show_bug.cgi?id=197131
67
68         * DerivedSources.make:
69         -std=gnu++17 didn't exist yet.  -std=gnu++1z did.
70
71 2019-04-26  Alex Christensen  <achristensen@webkit.org>
72
73         Add ENABLE(CONTENT_EXTENSIONS) and namespace ContentExtensions to ResourceLoadInfo.h
74         https://bugs.webkit.org/show_bug.cgi?id=197165
75
76         Reviewed by Youenn Fablet.
77
78         No change in behavior.  This will just make it harder for people working on the loader to mistake
79         these ContentExtension specific structures for other structures general to loading.
80         One such mistake was made in r244248.
81
82         * Modules/websockets/WebSocketChannel.cpp:
83         (WebCore::WebSocketChannel::connect):
84         * contentextensions/ContentExtensionsBackend.h:
85         * css/StyleSheetContents.cpp:
86         (WebCore::StyleSheetContents::subresourcesAllowReuse const):
87         * html/HTMLMediaElement.cpp:
88         (WebCore::HTMLMediaElement::loadResource):
89         * loader/FrameLoader.cpp:
90         (WebCore::FrameLoader::loadResourceSynchronously):
91         * loader/NetscapePlugInStreamLoader.cpp:
92         (WebCore::NetscapePlugInStreamLoader::NetscapePlugInStreamLoader):
93         * loader/PingLoader.cpp:
94         (WebCore::processContentRuleListsForLoad):
95         (WebCore::PingLoader::loadImage):
96         (WebCore::PingLoader::sendPing):
97         (WebCore::PingLoader::sendViolationReport):
98         * loader/ResourceLoadInfo.cpp:
99         (WebCore::toResourceType): Deleted.
100         (WebCore::readResourceType): Deleted.
101         (WebCore::readLoadType): Deleted.
102         (WebCore::ResourceLoadInfo::isThirdParty const): Deleted.
103         (WebCore::ResourceLoadInfo::getResourceFlags const): Deleted.
104         * loader/ResourceLoadInfo.h:
105         * loader/ResourceLoader.cpp:
106         (WebCore::ResourceLoader::willSendRequestInternal):
107         * loader/ResourceLoader.h:
108         * loader/SubresourceLoader.cpp:
109         (WebCore::SubresourceLoader::SubresourceLoader):
110         * loader/cache/CachedResourceLoader.cpp:
111         (WebCore::CachedResourceLoader::requestResource):
112         * page/DOMWindow.cpp:
113         (WebCore::DOMWindow::open):
114         * page/UserContentProvider.cpp:
115         (WebCore::UserContentProvider::processContentRuleListsForLoad):
116         (WebCore::UserContentProvider::actionsForResourceLoad):
117         * page/UserContentProvider.h:
118
119 2019-04-26  Alex Christensen  <achristensen@webkit.org>
120
121         Fix an internal High Sierra build after r244653
122        ​https://bugs.webkit.org/show_bug.cgi?id=197131
123
124         * DerivedSources.make:
125         Apparently we can't use gnu++17 when preprocessing Platform.h in the makefile.
126
127 2019-04-26  Chris Fleizach  <cfleizach@apple.com>
128
129         AX: Provide iOS method for setting focus
130         https://bugs.webkit.org/show_bug.cgi?id=197200
131         <rdar://problem/50131679>
132
133         Reviewed by Alex Christensen.
134
135         Put the focus setting code in a place that iOS and macOS can access.
136         Override a platform level method for setting focus on iOS.
137
138         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
139         (-[WebAccessibilityObjectWrapper _accessibilitySetFocus:]):
140         * accessibility/mac/WebAccessibilityObjectWrapperBase.h:
141         * accessibility/mac/WebAccessibilityObjectWrapperBase.mm:
142         (-[WebAccessibilityObjectWrapperBase baseAccessibilitySetFocus:]):
143         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
144         (-[WebAccessibilityObjectWrapper _accessibilitySetValue:forAttribute:]):
145
146 2019-04-26  Said Abou-Hallawa  <sabouhallawa@apple.com>
147
148         propertyRegistry() was not overridden for SVGFEFloodElement and SVGFEMergeElement
149         https://bugs.webkit.org/show_bug.cgi?id=197303
150
151         Reviewed by Alex Christensen.
152
153         Therefore SVGElement::propertyRegistry() was called instead. This means
154         these two elements will not have access to the properties of the base
155         class SVGFilterPrimitiveStandardAttributes.
156
157         Tests: svg/dom/SVGFEFloodElement-filter-standard-attributes.svg
158
159         * svg/SVGElement.cpp:
160         (WebCore::SVGElement::commitPropertyChange):
161         * svg/SVGFEFloodElement.h:
162         * svg/SVGFEMergeElement.h:
163
164 2019-04-26  Youenn Fablet  <youenn@apple.com>
165
166         [Mac WK2 iOS Sim] Layout Test imported/w3c/web-platform-tests/webrtc/RTCRtpReceiver-getSynchronizationSources.https.html is a flaky failure
167         https://bugs.webkit.org/show_bug.cgi?id=196633
168         <rdar://problem/49627667>
169
170         Reviewed by Alex Christensen.
171
172         Use formula defined in https://w3c.github.io/webrtc-stats/#dom-rtcrtpcontributingsourcestats-audiolevel
173         to compute the audio level from the RTP header information.
174         Covered by rebased test.
175
176         * Modules/mediastream/libwebrtc/LibWebRTCRtpReceiverBackend.cpp:
177         (WebCore::fillRTCRtpContributingSource):
178
179 2019-04-26  Sihui Liu  <sihui_liu@apple.com>
180
181         Stop IDB transactions to release locked database files when network process is ready to suspend
182         https://bugs.webkit.org/show_bug.cgi?id=196372
183         <rdar://problem/48930116>
184
185         Reviewed by Brady Eidson.
186
187         Suspend IDB database thread and finish ongoing IDB transactions on the main thread before suspending network 
188         process.
189
190         API test: IndexedDB.IndexedDBSuspendImminently
191
192         * Modules/indexeddb/server/IDBBackingStore.h:
193         * Modules/indexeddb/server/IDBServer.cpp:
194         (WebCore::IDBServer::IDBServer::tryStop):
195         (WebCore::IDBServer::IDBServer::resume):
196         * Modules/indexeddb/server/IDBServer.h:
197         * Modules/indexeddb/server/MemoryIDBBackingStore.h:
198         * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp: Remove some error log messages, because now we may try
199         performing database operations without an active transaction if the transaction is finished on the main thread.
200         (WebCore::IDBServer::SQLiteIDBBackingStore::createObjectStore):
201         (WebCore::IDBServer::SQLiteIDBBackingStore::deleteObjectStore):
202         (WebCore::IDBServer::SQLiteIDBBackingStore::renameObjectStore):
203         (WebCore::IDBServer::SQLiteIDBBackingStore::clearObjectStore):
204         (WebCore::IDBServer::SQLiteIDBBackingStore::createIndex):
205         (WebCore::IDBServer::SQLiteIDBBackingStore::deleteIndex):
206         (WebCore::IDBServer::SQLiteIDBBackingStore::renameIndex):
207         (WebCore::IDBServer::SQLiteIDBBackingStore::keyExistsInObjectStore):
208         (WebCore::IDBServer::SQLiteIDBBackingStore::deleteRange):
209         (WebCore::IDBServer::SQLiteIDBBackingStore::addRecord):
210         (WebCore::IDBServer::SQLiteIDBBackingStore::getRecord):
211         (WebCore::IDBServer::SQLiteIDBBackingStore::getAllObjectStoreRecords):
212         (WebCore::IDBServer::SQLiteIDBBackingStore::getAllIndexRecords):
213         (WebCore::IDBServer::SQLiteIDBBackingStore::getIndexRecord):
214         (WebCore::IDBServer::SQLiteIDBBackingStore::getCount):
215         (WebCore::IDBServer::SQLiteIDBBackingStore::generateKeyNumber):
216         (WebCore::IDBServer::SQLiteIDBBackingStore::revertGeneratedKeyNumber):
217         (WebCore::IDBServer::SQLiteIDBBackingStore::maybeUpdateKeyGeneratorNumber):
218         (WebCore::IDBServer::SQLiteIDBBackingStore::openCursor):
219         (WebCore::IDBServer::SQLiteIDBBackingStore::iterateCursor):
220         (WebCore::IDBServer::SQLiteIDBBackingStore::hasTransaction const):
221         * Modules/indexeddb/server/SQLiteIDBBackingStore.h:
222         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
223         (WebCore::IDBServer::UniqueIDBDatabase::prepareToFinishTransaction):
224         (WebCore::IDBServer::UniqueIDBDatabase::commitTransactionAfterQuotaCheck):
225         (WebCore::IDBServer::UniqueIDBDatabase::didPerformCommitTransaction):
226         (WebCore::IDBServer::UniqueIDBDatabase::abortTransaction):
227         (WebCore::IDBServer::UniqueIDBDatabase::didPerformAbortTransaction):
228         (WebCore::IDBServer::UniqueIDBDatabase::abortTransactionOnMainThread):
229         (WebCore::IDBServer::UniqueIDBDatabase::commitTransactionOnMainThread):
230         (WebCore::IDBServer::UniqueIDBDatabase::finishActiveTransactions):
231         * Modules/indexeddb/server/UniqueIDBDatabase.h:
232         * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.h:
233         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::setState):
234         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::state const):
235         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::setResult):
236         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::result const):
237         * platform/sql/SQLiteDatabaseTracker.cpp:
238         (WebCore::SQLiteDatabaseTracker::hasTransactionInProgress):
239         * platform/sql/SQLiteDatabaseTracker.h:
240
241 2019-04-26  Takashi Komori  <Takashi.Komori@sony.com>
242
243         [Curl] Fix Curl Request Scheduler not to release wrong Curl handle when request is cancelled.
244         https://bugs.webkit.org/show_bug.cgi?id=191650
245
246         Reviewed by Fujii Hironori.
247
248         Test: http/tests/misc/repeat-open-cancel.html
249
250         * platform/network/curl/CurlRequest.cpp:
251         (WebCore::CurlRequest::cancel):
252         (WebCore::CurlRequest::isCancelled):
253         (WebCore::CurlRequest::isCompletedOrCancelled):
254         (WebCore::CurlRequest::didCompleteTransfer):
255         (WebCore::CurlRequest::completeDidReceiveResponse):
256         (WebCore::CurlRequest::pausedStatusChanged):
257         * platform/network/curl/CurlRequest.h:
258         (WebCore::CurlRequest::isCompleted const): Deleted.
259         (WebCore::CurlRequest::isCancelled const): Deleted.
260         (WebCore::CurlRequest::isCompletedOrCancelled const): Deleted.
261         * platform/network/curl/CurlRequestScheduler.cpp:
262         (WebCore::CurlRequestScheduler::cancel):
263         (WebCore::CurlRequestScheduler::callOnWorkerThread):
264         (WebCore::CurlRequestScheduler::startThreadIfNeeded):
265         (WebCore::CurlRequestScheduler::stopThreadIfNoMoreJobRunning):
266         (WebCore::CurlRequestScheduler::stopThread):
267         (WebCore::CurlRequestScheduler::executeTasks):
268         (WebCore::CurlRequestScheduler::workerThread):
269         (WebCore::CurlRequestScheduler::startTransfer):
270         (WebCore::CurlRequestScheduler::completeTransfer):
271         (WebCore::CurlRequestScheduler::cancelTransfer):
272         (WebCore::CurlRequestScheduler::finalizeTransfer):
273         * platform/network/curl/CurlRequestScheduler.h:
274
275 2019-04-25  Myles C. Maxfield  <mmaxfield@apple.com>
276
277         [iOS] Add internal setting to force -webkit-text-size-adjust to "auto"
278         https://bugs.webkit.org/show_bug.cgi?id=197275
279         <rdar://problem/50211019>
280
281         Reviewed by Simon Fraser.
282
283         This setting makes it easier to investigate the autosizing work we've been doing
284         in https://bugs.webkit.org/show_bug.cgi?id=197250.
285
286         * page/Settings.yaml:
287         * rendering/RenderBlockFlow.cpp:
288         (WebCore::RenderBlockFlow::adjustComputedFontSizes):
289         * rendering/TextAutoSizing.cpp:
290         (WebCore::TextAutoSizingValue::adjustTextNodeSizes):
291
292 2019-04-25  Myles C. Maxfield  <mmaxfield@apple.com>
293
294         [iOS] Implement idempotent mode for text autosizing
295         https://bugs.webkit.org/show_bug.cgi?id=197250
296         <rdar://problem/50211034>
297
298         Reviewed by Jon Lee.
299
300         Our text autosizing code has this interesting behavior where it is sensitive to the width of the text's container
301         and the number of lines of text inside the element. Not only is it sensitive to those things, but as those things
302         change, their values are stored inside the RenderObject itself and then never recomputed. This means that the text
303         autosizing parameters are sensitive to the entire history of an element. So, a newly created element with the same
304         style as an existing element can have dramatically different results.
305
306         This patch adds a new mode for text autosizing, which isn't sensitive to either of those things, and therefore
307         maintains the invariant that a newly created element will behave the same as an existing element with the same style.
308         Instead of using container size, it instead uses the viewport's initial scale. As the viewport's initial scale
309         changes, new layouts will be triggered, which will cause the autosizing code to use the new value.
310
311         Tests: fast/text-autosizing/ios/idempotentmode/idempotent-autosizing-identity.html
312                fast/text-autosizing/ios/idempotentmode/idempotent-autosizing.html
313
314         * page/FrameViewLayoutContext.cpp:
315         (WebCore::FrameViewLayoutContext::applyTextSizingIfNeeded):
316         * page/Page.cpp:
317         (WebCore::Page::setInitialScale): WebKit will push the initial scale down into the page.
318         * page/Page.h:
319         (WebCore::Page::initialScale const):
320         * page/SettingsBase.h:
321         * page/cocoa/SettingsBaseCocoa.mm:
322         (WebCore::SettingsBase::textAutosizingUsesIdempotentMode):
323         (WebCore::SettingsBase::defaultTextAutosizingEnabled):
324         * rendering/RenderBlockFlow.cpp:
325         (WebCore::idempotentTextSize): Describe a piecewise-linear curve for the text size to follow. The curve scales
326         depending on the viewport's initial scale.
327         (WebCore::RenderBlockFlow::adjustComputedFontSizes):
328         * rendering/RenderBlockFlow.h:
329         * rendering/RenderElement.cpp:
330         (WebCore::includeNonFixedHeight): This new mode should consider max-height as well as height when determining if
331         content overflows.
332         (WebCore::RenderElement::adjustComputedFontSizesOnBlocks):
333         (WebCore::RenderElement::resetTextAutosizing):
334         * rendering/RenderElement.h:
335         * rendering/RenderObject.h:
336
337 2019-04-25  Simon Fraser  <simon.fraser@apple.com>
338
339         REGRESSION (r234330): 3 legacy-animation-engine/compositing tests are flaky failures
340         https://bugs.webkit.org/show_bug.cgi?id=188357
341         <rdar://problem/42986633>
342
343         Reviewed by Dean Jackson.
344
345         DumpRenderTree had no code that set page.setCompositingPolicyOverride() to Normal, so some
346         tests would fall into low memory mode and have different behavior.
347         
348         Fix by moving the code that calls setCompositingPolicyOverride(Normal) from the WK2 layer
349         to Internals, so it's shared by DRT and WTR.
350         
351         We no longer need the WK2 C SPI glue.
352
353         * testing/Internals.cpp:
354         (WebCore::Internals::resetToConsistentState):
355
356 2019-04-25  Sihui Liu  <sihui_liu@apple.com>
357
358         [ iOS Sim ] REGRESSION (r242986) Layout Test storage/indexeddb/modern/idbtransaction-objectstore-failures-private.html is a flaky failure
359         https://bugs.webkit.org/show_bug.cgi?id=196357
360         <rdar://problem/49386836>
361
362         Reviewed by Geoffrey Garen.
363
364         Dispatch IDBRequest event to IDBTransaction if event of IDBTransaction has not been dispatched.
365
366         Covered by existing tests.
367
368         * Modules/indexeddb/IDBRequest.cpp:
369         (WebCore::IDBRequest::dispatchEvent):
370         * Modules/indexeddb/IDBTransaction.cpp:
371         (WebCore::IDBTransaction::dispatchEvent):
372         * Modules/indexeddb/IDBTransaction.h:
373
374 2019-04-25  Chris Dumez  <cdumez@apple.com>
375
376         ASSERT(scriptExecutionContext()) in Performance::resourceTimingBufferFullTimerFired()
377         https://bugs.webkit.org/show_bug.cgi?id=197300
378         <rdar://problem/49965990>
379
380         Reviewed by Youenn Fablet.
381
382         We crash because the scriptExecutionContext has been destroyed by the time the m_resourceTimingBufferFullTimer
383         timer fires. However, r241598 already makes sure that we stop the timer when the script execution context
384         is destroyed. This makes me think that somebody restarts the timer *after* the script execution context has
385         been destroyed. The thing is that we only start the timer in Performance::addResourceTiming() and there are
386         only 2 call sites for this method. Both call sites get the Performance object from the Window object, which
387         they get from the Document object. As a result, I would believe that the Window's document is alive, even
388         though the Performance object's scriptExecutionContext is not. This could indicate that the Performance
389         object's scriptExecutionContext gets out of sync with its Window's document. I have found one place where
390         it could happen in theory (DOMWindow::didSecureTransitionTo()). I have not been able to write a test
391         confirming my theory though so this is a speculative fix. I have also added a few assertions to help us
392         track down the issue if my speculative fix turns out to be ineffective.
393
394         No new tests, we do not know how to reproduce.
395
396         * page/DOMWindow.cpp:
397         (WebCore::DOMWindow::didSecureTransitionTo):
398         This is a speculative fix for the crash. When a DOMWindow transitions from one document to
399         another, reset its data members which store the DOMWindow's document to make sure that they
400         do not get out of sync.
401
402         (WebCore::DOMWindow::crypto const):
403         (WebCore::DOMWindow::navigator):
404         (WebCore::DOMWindow::performance const):
405         Add assertions to make sure that the member's scriptExecutionContext is in sync with
406         the window's.
407
408         * page/Performance.cpp:
409         (WebCore::Performance::addResourceTiming):
410         Add assertion to make sure that the scriptExecutionContext() is non-null when calling this
411         as this may start the m_resourceTimingBufferFullTimer timer. If my speculative fix above
412         does not work, we should hit this and this should tell us which call site is causing this.
413
414 2019-04-25  Timothy Hatcher  <timothy@apple.com>
415
416         Disable ContentChangeObserver on iOSMac.
417         https://bugs.webkit.org/show_bug.cgi?id=197292
418         rdar://problem/49039957
419
420         Reviewed by Zalan Bujtas.
421
422         We don’t need to run any of ContentChangeObserver, because we have hover events on iOSMac.
423         Disabling it skips the synthetic mouse move events and speeds up clicks.
424
425         * page/SettingsBase.cpp:
426         (WebCore::SettingsBase::defaultContentChangeObserverEnabled): Return false for PLATFORM(IOSMAC).
427
428 2019-04-25  Timothy Hatcher  <timothy@apple.com>
429
430         Disable date and time inputs on iOSMac.
431         https://bugs.webkit.org/show_bug.cgi?id=197287
432         rdar://problem/46794376
433
434         Reviewed by Wenson Hsieh.
435
436         * Configurations/FeatureDefines.xcconfig:
437         * platform/text/mac/LocaleMac.h:
438         * platform/text/mac/LocaleMac.mm:
439         (WebCore::LocaleMac::formatDateTime):
440
441 2019-04-25  Alex Christensen  <achristensen@webkit.org>
442
443         Fix more Windows builds after r244653
444         https://bugs.webkit.org/show_bug.cgi?id=197131
445
446         * svg/properties/SVGAnimatedPropertyList.h:
447         * svg/properties/SVGProperty.h:
448         * svg/properties/SVGPropertyList.h:
449
450 2019-04-25  Alex Christensen  <achristensen@webkit.org>
451
452         Fix more builds after r244653
453         https://bugs.webkit.org/show_bug.cgi?id=197131
454
455         * svg/properties/SVGValuePropertyList.h:
456         Something is preventing MSVC from seeing protected constructors from subclasses.
457
458 2019-04-25  Per Arne Vollan  <pvollan@apple.com>
459
460         -[WKWebsiteDataStore fetchDataRecordsOfTypes:completionHandler:] never returns _WKWebsiteDataTypeCredentials
461         https://bugs.webkit.org/show_bug.cgi?id=196991
462         <rdar://problem/45507423>
463
464         Reviewed by Alex Christensen.
465
466         Add method to get all origins with persistent credentials from credential storage.
467
468         API tests: WKWebsiteDataStore.FetchNonPersistentCredentials
469                    WKWebsiteDataStore.FetchPersistentCredentials
470
471         * platform/network/CredentialStorage.h:
472         * platform/network/mac/CredentialStorageMac.mm:
473         (WebCore::CredentialStorage::originsWithPersistentCredentials):
474
475 2019-04-25  Alex Christensen  <achristensen@webkit.org>
476
477         Fix MSVC build after r244653
478         https://bugs.webkit.org/show_bug.cgi?id=197131
479
480         * svg/properties/SVGValueProperty.h:
481         MSVC doesn't think it can access these protected constructors from subclasses.
482         Make the build work and investigate this later.
483
484 2019-04-25  Alex Christensen  <achristensen@webkit.org>
485
486         Start using C++17
487         https://bugs.webkit.org/show_bug.cgi?id=197131
488
489         Reviewed by Darin Adler.
490
491         * Configurations/Base.xcconfig:
492         * DerivedSources.make:
493
494 2019-04-25  Commit Queue  <commit-queue@webkit.org>
495
496         Unreviewed, rolling out r244627.
497         https://bugs.webkit.org/show_bug.cgi?id=197282
498
499         Causing internal build failures (Requested by ShawnRoberts on
500         #webkit).
501
502         Reverted changeset:
503
504         "Create AVFoundationSoftLink.{h,mm} to reduce duplicate code"
505         https://bugs.webkit.org/show_bug.cgi?id=197171
506         https://trac.webkit.org/changeset/244627
507
508 2019-04-25  Antti Koivisto  <antti@apple.com>
509
510         redefinition of enumerator 'NSAttachmentCharacter' with Apple internal build
511         https://bugs.webkit.org/show_bug.cgi?id=197279
512
513         Reviewed by Antoine Quint.
514
515         Try to fix the build.
516
517         * platform/mac/WebNSAttributedStringExtras.mm:
518
519 2019-04-25  Antti Koivisto  <antti@apple.com>
520
521         Visited link hash should be computed only once
522         https://bugs.webkit.org/show_bug.cgi?id=197229
523         <rdar://problem/48438924>
524
525         Reviewed by Alex Christensen.
526
527         Test: fast/history/visited-href-mutation.html
528
529         Visited link style is now based on the first target URL of the link element. Further href mutations don't affect styling.
530
531         * dom/Document.cpp:
532         (WebCore::Document::updateBaseURL):
533         * dom/VisitedLinkState.cpp:
534         (WebCore::linkAttribute):
535         (WebCore::linkHashForElement):
536
537         Visited link support is now limited to HTML and SVG <a> elements.
538
539         (WebCore::VisitedLinkState::invalidateStyleForLink):
540         (WebCore::VisitedLinkState::determineLinkStateSlowCase):
541         * html/HTMLAnchorElement.cpp:
542         (WebCore::HTMLAnchorElement::HTMLAnchorElement):
543         (WebCore::HTMLAnchorElement::parseAttribute):
544         * html/HTMLAnchorElement.h:
545         (WebCore::HTMLAnchorElement::visitedLinkHash const):
546         (WebCore::HTMLAnchorElement::invalidateCachedVisitedLinkHash): Deleted.
547         * svg/SVGAElement.cpp:
548         (WebCore::SVGAElement::visitedLinkHash const):
549         * svg/SVGAElement.h:
550
551 2019-04-25  Philippe Normand  <pnormand@igalia.com>
552
553         [GStreamer] gst_element_get_state: assertion 'GST_IS_ELEMENT (element)' failed in WebCore::MediaPlayerPrivateGStreamer::paused
554         https://bugs.webkit.org/show_bug.cgi?id=196691
555
556         Reviewed by Eric Carlson.
557
558         For gif assets, fail media loading early and notify the
559         MediaPlayer by setting both network and ready states, so that the
560         MediaPlayer will try with with the next media engine or pass the
561         error to HTMLMediaElement if there are none.
562
563         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
564         (WebCore::MediaPlayerPrivateGStreamer::loadFull):
565         (WebCore::MediaPlayerPrivateGStreamer::loadingFailed):
566         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
567
568 2019-04-25  Philippe Normand  <pnormand@igalia.com>
569
570         [REGRESSION(r243197)][GStreamer] http/tests/media/clearkey/collect-webkit-media-session.html hits an ASSERT
571         https://bugs.webkit.org/show_bug.cgi?id=197230
572
573         Reviewed by Xabier Rodriguez-Calvar.
574
575         Perform the resource loader disposal and destruction from the main
576         thread. Also ensure there's no circular reference between the
577         CachedResourceStreamingClient and WebKitWebSrc when disposing of
578         the private WebKitWebSrc storage.
579
580         * platform/graphics/gstreamer/MainThreadNotifier.h:
581         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
582         (_WebKitWebSrcPrivate::~_WebKitWebSrcPrivate):
583         (webkit_web_src_class_init):
584         (webKitWebSrcDispose):
585         (webKitWebSrcCloseSession):
586         (webKitWebSrcFinalize): Deleted.
587
588 2019-04-24  Carlos Garcia Campos  <cgarcia@igalia.com>
589
590         [GTK] Hardcoded text color in input fields
591         https://bugs.webkit.org/show_bug.cgi?id=126907
592
593         Reviewed by Michael Catanzaro.
594
595         Enable HAVE_OS_DARK_MODE_SUPPORT for GTK port to ensure that dark mode is used when Page::useDarkAppearance()
596         returns true. This patch reverts r232913, I'll reopen the bug, I think we need to find a better solution for
597         that.
598
599         * CMakeLists.txt: Add HAVE_OS_DARK_MODE_SUPPORT to FEATURE_DEFINES_WITH_SPACE_SEPARATOR if enabled.
600         * css/CSSDefaultStyleSheets.cpp: Ensure html{color:text} is used in simple style sheet when
601         HAVE_OS_DARK_MODE_SUPPORT is enabled.
602         * page/FrameView.cpp:
603         (WebCore::FrameView::updateBackgroundRecursively): Use CSSValueWindowframe to get the frame view background
604         color when HAVE_OS_DARK_MODE_SUPPORT is enabled for non-mac ports.
605         * platform/gtk/RenderThemeWidget.cpp:
606         (WebCore::RenderThemeWidget::getOrCreate): Create window widget.
607         (WebCore::RenderThemeWindow::RenderThemeWindow): Add window widget.
608         * platform/gtk/RenderThemeWidget.h:
609         * rendering/RenderThemeGtk.cpp:
610         (WebCore::RenderThemeGtk::disabledTextColor const): Always use the color from the theme for consistency with
611         other form controls.
612         (WebCore::RenderThemeGtk::systemColor const): Get the color from the theme for CSSValueText, CSSValueGraytext
613         and CSSValueWindowframe.
614         * rendering/RenderThemeGtk.h:
615
616 2019-04-24  Zalan Bujtas  <zalan@apple.com>
617
618         Regression (r244291): Broken API Test AutoLayoutRenderingProgressRelativeOrdering
619         https://bugs.webkit.org/show_bug.cgi?id=196948
620         <rdar://problem/49927131>
621
622         Reviewed by Tim Horton.
623
624         Covered by existing tests.
625
626         * loader/EmptyClients.h:
627         * page/ChromeClient.h:
628         * page/FrameView.cpp:
629         (WebCore::FrameView::autoSizeIfEnabled):
630         (WebCore::FrameView::enableAutoSizeMode):
631         * page/FrameView.h:
632
633 2019-04-24  Youenn Fablet  <youenn@apple.com>
634
635         Do not restart WebRTC stats timer if backend is stopped
636         https://bugs.webkit.org/show_bug.cgi?id=197257
637         <rdar://problem/50095879>
638
639         Reviewed by Eric Carlson.
640
641         We used to stop and reschedule the stat gathering timer in case the
642         gathering delay is changing. Timer should not be rescheduled if the backend is stopped.
643
644         * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:
645         (WebCore::LibWebRTCMediaEndpoint::OnStatsDelivered):
646
647 2019-04-24  Andres Gonzalez  <andresg_22@apple.com>
648
649         Flaky crash under WebCore::AXObjectCache::stopCachingComputedObjectAttributes()
650         https://bugs.webkit.org/show_bug.cgi?id=187391
651         <rdar://problem/40681396
652
653         Check for null value returned by AccessibilityObject::axObjectCache.
654
655         Reviewed by Chris Fleizach.
656
657         No need for new test since existing tests caught this problem.
658
659         * accessibility/AccessibilityNodeObject.cpp:
660         (WebCore::AccessibilityNodeObject::firstChild const):
661         (WebCore::AccessibilityNodeObject::lastChild const):
662         (WebCore::AccessibilityNodeObject::previousSibling const):
663         (WebCore::AccessibilityNodeObject::nextSibling const):
664         (WebCore::AccessibilityNodeObject::addChildren):
665         (WebCore::AccessibilityNodeObject::anchorElement const):
666         (WebCore::AccessibilityNodeObject::changeValueByStep):
667         (WebCore::AccessibilityNodeObject::changeValueByPercent):
668         (WebCore::AccessibilityNodeObject::textForLabelElement const):
669         (WebCore::AccessibilityNodeObject::titleElementText const):
670         (WebCore::AccessibilityNodeObject::alternativeText const):
671         (WebCore::AccessibilityNodeObject::ariaLabeledByText const):
672         (WebCore::AccessibilityNodeObject::helpText const):
673
674 2019-04-24  Simon Fraser  <simon.fraser@apple.com>
675
676         REGRESSION (r242132): Nested position:sticky elements move incorrectly
677         https://bugs.webkit.org/show_bug.cgi?id=197255
678         rdar://problem/50137744
679
680         Reviewed by Zalan Bujtas.
681         
682         Revert to the behavior of the code before r242132, where we looked at the direct parent
683         scrolling tree node instead of walking up the ancestor chain to find an enclosing scrolling node.
684         This fixes nested sticky behavior.
685
686         Test: scrollingcoordinator/mac/nested-sticky.html
687
688         * page/scrolling/cocoa/ScrollingTreeStickyNode.mm:
689         (WebCore::ScrollingTreeStickyNode::applyLayerPositions):
690
691 2019-04-24  Eric Carlson  <eric.carlson@apple.com>
692
693         Create AVFoundationSoftLink.{h,mm} to reduce duplicate code
694         https://bugs.webkit.org/show_bug.cgi?id=197171
695         <rdar://problem/47454979>
696
697         Reviewed by Youenn Fablet.
698
699         Tests: TestWebKitAPI/Tests/WebCore/cocoa/AVFoundationSoftLinkTest.mm
700
701         * Modules/plugins/QuickTimePluginReplacement.mm:
702         (WebCore::jsValueWithValueInContext):
703         (WebCore::jsValueWithAVMetadataItemInContext):
704         * WebCore.xcodeproj/project.pbxproj:
705         * platform/audio/ios/AudioSessionIOS.mm:
706         (WebCore::AudioSession::setCategory):
707         (WebCore::AudioSession::category const):
708         (WebCore::AudioSession::routeSharingPolicy const):
709         (WebCore::AudioSession::routingContextUID const):
710         (WebCore::AudioSession::sampleRate const):
711         (WebCore::AudioSession::bufferSize const):
712         (WebCore::AudioSession::numberOfOutputChannels const):
713         (WebCore::AudioSession::tryToSetActiveInternal):
714         (WebCore::AudioSession::preferredBufferSize const):
715         (WebCore::AudioSession::setPreferredBufferSize):
716         * platform/audio/ios/MediaSessionManagerIOS.mm:
717         (-[WebMediaSessionHelper initWithCallback:]):
718         (-[WebMediaSessionHelper startMonitoringAirPlayRoutes]):
719         * platform/graphics/avfoundation/AVTrackPrivateAVFObjCImpl.mm:
720         (WebCore::AVTrackPrivateAVFObjCImpl::audioKind const):
721         (WebCore::AVTrackPrivateAVFObjCImpl::videoKind const):
722         (WebCore::AVTrackPrivateAVFObjCImpl::label const):
723         * platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm:
724         (WebCore::AudioSourceProviderAVFObjC::createMix):
725         * platform/graphics/avfoundation/MediaPlaybackTargetMac.mm:
726         * platform/graphics/avfoundation/MediaSelectionGroupAVFObjC.mm:
727         (WebCore::MediaSelectionGroupAVFObjC::updateOptions):
728         * platform/graphics/avfoundation/objc/AVFoundationMIMETypeCache.mm:
729         (WebCore::AVFoundationMIMETypeCache::canDecodeType):
730         (WebCore::AVFoundationMIMETypeCache::loadMIMETypes):
731         * platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.mm:
732         (WebCore::CDMInstanceFairPlayStreamingAVFObjC::supportsPersistableState):
733         (WebCore::CDMInstanceFairPlayStreamingAVFObjC::supportsPersistentKeys):
734         (WebCore::CDMInstanceFairPlayStreamingAVFObjC::supportsMediaCapability):
735         (WebCore::CDMInstanceFairPlayStreamingAVFObjC::initializeWithConfiguration):
736         (WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::updateLicense):
737         (WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::loadSession):
738         (WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::removeSessionData):
739         (WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::ensureSession):
740         * platform/graphics/avfoundation/objc/CDMSessionAVContentKeySession.mm:
741         (WebCore::CDMSessionAVContentKeySession::isAvailable):
742         (WebCore::CDMSessionAVContentKeySession::releaseKeys):
743         (WebCore::CDMSessionAVContentKeySession::update):
744         (WebCore::CDMSessionAVContentKeySession::generateKeyReleaseMessage):
745         (WebCore::CDMSessionAVContentKeySession::contentKeySession):
746         * platform/graphics/avfoundation/objc/CDMSessionAVFoundationObjC.mm:
747         * platform/graphics/avfoundation/objc/CDMSessionAVStreamSession.mm:
748         (WebCore::CDMSessionAVStreamSession::releaseKeys):
749         (WebCore::CDMSessionAVStreamSession::update):
750         (WebCore::CDMSessionAVStreamSession::setStreamSession):
751         (WebCore::CDMSessionAVStreamSession::generateKeyReleaseMessage):
752         * platform/graphics/avfoundation/objc/ImageDecoderAVFObjC.mm:
753         (WebCore::imageDecoderAssetOptions):
754         (WebCore::ImageDecoderAVFObjC::ImageDecoderAVFObjC):
755         (WebCore::ImageDecoderAVFObjC::firstEnabledTrack):
756         (WebCore::ImageDecoderAVFObjC::readSamples):
757         (SOFT_LINK_CONSTANT_MAY_FAIL): Deleted.
758         * platform/graphics/avfoundation/objc/InbandTextTrackPrivateAVFObjC.mm:
759         (WebCore::InbandTextTrackPrivateAVFObjC::label const):
760         * platform/graphics/avfoundation/objc/InbandTextTrackPrivateLegacyAVFObjC.mm:
761         (WebCore::InbandTextTrackPrivateLegacyAVFObjC::label const):
762         * platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm:
763         (WebCore::MediaPlaybackTargetPickerMac::devicePicker):
764         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
765         (WebCore::assetCacheForPath):
766         (WebCore::MediaPlayerPrivateAVFoundationObjC::clearMediaCache):
767         (WebCore::MediaPlayerPrivateAVFoundationObjC::clearMediaCacheForOrigins):
768         (WebCore::MediaPlayerPrivateAVFoundationObjC::cancelLoad):
769         (WebCore::MediaPlayerPrivateAVFoundationObjC::createImageGenerator):
770         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerLayer):
771         (WebCore::MediaPlayerPrivateAVFoundationObjC::synchronizeTextTrackState):
772         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL):
773         (WebCore::MediaPlayerPrivateAVFoundationObjC::setAVPlayerItem):
774         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer):
775         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerItem):
776         (WebCore::MediaPlayerPrivateAVFoundationObjC::supportsType):
777         (WebCore::MediaPlayerPrivateAVFoundationObjC::isAvailable):
778         (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged):
779         (WebCore::determineChangedTracksFromNewTracksAndOldItems):
780         (WebCore::MediaPlayerPrivateAVFoundationObjC::updateAudioTracks):
781         (WebCore::MediaPlayerPrivateAVFoundationObjC::updateVideoTracks):
782         (WebCore::MediaPlayerPrivateAVFoundationObjC::createVideoOutput):
783         (WebCore::MediaPlayerPrivateAVFoundationObjC::outputMediaDataWillChange):
784         (WebCore::MediaPlayerPrivateAVFoundationObjC::safeMediaSelectionGroupForLegibleMedia):
785         (WebCore::MediaPlayerPrivateAVFoundationObjC::safeMediaSelectionGroupForAudibleMedia):
786         (WebCore::MediaPlayerPrivateAVFoundationObjC::safeMediaSelectionGroupForVisualMedia):
787         (WebCore::MediaPlayerPrivateAVFoundationObjC::processMediaSelectionOptions):
788         (WebCore::MediaPlayerPrivateAVFoundationObjC::setCurrentTextTrack):
789         (WebCore::MediaPlayerPrivateAVFoundationObjC::languageOfPrimaryAudioTrack const):
790         (WebCore::MediaPlayerPrivateAVFoundationObjC::wirelessPlaybackTargetType const):
791         (WebCore::exernalDeviceDisplayNameForPlayer):
792         (WebCore::metadataType):
793         (WebCore::MediaPlayerPrivateAVFoundationObjC::metadataDidArrive):
794         (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]):
795         (-[WebCoreAVFPullDelegate outputMediaDataWillChange:]):
796         (-[WebCoreAVFPullDelegate outputSequenceWasFlushed:]):
797         (WebCore::MediaPlayerPrivateAVFoundationObjC::processLegacyClosedCaptionsTracks): Deleted.
798         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
799         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::MediaPlayerPrivateMediaSourceAVFObjC):
800         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::isAvailable):
801         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::supportsType):
802         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::ensureLayer):
803         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::streamSession):
804         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
805         (-[WebAVSampleBufferStatusChangeListener observeValueForKeyPath:ofObject:change:context:]):
806         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::isAvailable):
807         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::ensureLayers):
808         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
809         (-[WebAVSampleBufferErrorListener observeValueForKeyPath:ofObject:change:context:]):
810         (WebCore::SourceBufferPrivateAVFObjC::SourceBufferPrivateAVFObjC):
811         (WebCore::SourceBufferPrivateAVFObjC::~SourceBufferPrivateAVFObjC):
812         (WebCore::SourceBufferPrivateAVFObjC::trackDidChangeEnabled):
813         (WebCore::SourceBufferPrivateAVFObjC::enqueueSample):
814         * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
815         (WebCore::PlatformCALayerCocoa::layerTypeForPlatformLayer):
816         (WebCore::PlatformCALayerCocoa::PlatformCALayerCocoa):
817         (WebCore::PlatformCALayerCocoa::clone const):
818         (WebCore::PlatformCALayerCocoa::avPlayerLayer const):
819         * platform/graphics/cocoa/HEVCUtilitiesCocoa.mm:
820         (WebCore::validateHEVCParameters):
821         * platform/ios/PlatformSpeechSynthesizerIOS.mm:
822         (getAVSpeechUtteranceDefaultSpeechRate):
823         (getAVSpeechUtteranceMaximumSpeechRate):
824         (-[WebSpeechSynthesisWrapper speakUtterance:]):
825         (WebCore::PlatformSpeechSynthesizer::initializeVoiceList):
826         (SOFT_LINK_CONSTANT): Deleted.
827         * platform/ios/VideoFullscreenInterfaceAVKit.mm:
828         (-[WebAVPlayerLayer init]):
829         (-[WebAVPlayerLayer layoutSublayers]):
830         (-[WebAVPlayerLayer setVideoGravity:]):
831         (-[WebAVPlayerLayer videoRect]):
832         (WebAVPlayerLayerView_startRoutingVideoToPictureInPicturePlayerLayerView):
833         * platform/mac/SerializedPlatformRepresentationMac.mm:
834         (WebCore::jsValueWithValueInContext):
835         (WebCore::jsValueWithAVMetadataItemInContext):
836         * platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.mm:
837         (WebCore::getAVFormatIDKeyWithFallback):
838         (WebCore::getAVNumberOfChannelsKeyWithFallback):
839         (WebCore::getAVSampleRateKeyWithFallback):
840         (WebCore::getAVEncoderBitRateKeyWithFallback):
841         (WebCore::MediaRecorderPrivateWriter::create):
842         (WebCore::MediaRecorderPrivateWriter::setVideoInput):
843         (WebCore::MediaRecorderPrivateWriter::setAudioInput):
844         * platform/mediastream/RealtimeVideoSource.h:
845         * platform/mediastream/VideoPreset.h:
846         * platform/mediastream/ios/AVAudioSessionCaptureDeviceManager.mm:
847         (WebCore::AVAudioSessionCaptureDeviceManager::refreshAudioCaptureDevices):
848         * platform/mediastream/ios/CoreAudioCaptureSourceIOS.mm:
849         (-[WebCoreAudioCaptureSourceIOSListener initWithCallback:]):
850         (-[WebCoreAudioCaptureSourceIOSListener handleInterruption:]):
851         * platform/mediastream/mac/AVCaptureDeviceManager.mm:
852         (WebCore::deviceIsAvailable):
853         (WebCore::AVCaptureDeviceManager::updateCachedAVCaptureDevices):
854         (WebCore::AVCaptureDeviceManager::refreshCaptureDevices):
855         (WebCore::AVCaptureDeviceManager::isAvailable):
856         (WebCore::AVCaptureDeviceManager::~AVCaptureDeviceManager):
857         * platform/mediastream/mac/AVVideoCaptureSource.mm:
858         (WebCore::AVVideoPreset::create):
859         (WebCore::AVVideoPreset::AVVideoPreset):
860         (WebCore::AVVideoCaptureSource::create):
861         (WebCore::AVVideoCaptureSource::AVVideoCaptureSource):
862         (WebCore::AVVideoCaptureSource::capabilities):
863         (WebCore::sensorOrientationFromVideoOutput):
864         (WebCore::AVVideoCaptureSource::setupSession):
865         (WebCore::AVVideoCaptureSource::frameDurationForFrameRate):
866         (WebCore::AVVideoCaptureSource::setupCaptureSession):
867         (WebCore::AVVideoCaptureSource::captureOutputDidOutputSampleBufferFromConnection):
868         (WebCore::AVVideoCaptureSource::generatePresets):
869         (-[WebCoreAVVideoCaptureSourceObserver addNotificationObservers]):
870         (-[WebCoreAVVideoCaptureSourceObserver captureOutput:didOutputSampleBuffer:fromConnection:]):
871
872 2019-04-24  Brady Eidson  <beidson@apple.com>
873
874         XMLHTTPRequest POSTs to a custom WKURLSchemeHandler protocol are missing the HTTP body.
875         https://bugs.webkit.org/show_bug.cgi?id=191362
876
877         Reviewed by Alex Christensen.
878
879         Covered by new API tests.
880
881         In 2008 some refactoring added an HTTP(S)-only restriction to copying the form body for
882         XHRs that POST, and it added that restriction with no explanation.
883
884         We definitely want to allow that.
885
886         Blobs are broken at this time (covered by bug 197237)
887
888         * xml/XMLHttpRequest.cpp:
889         (WebCore::XMLHttpRequest::send):
890         (WebCore::XMLHttpRequest::sendBytesData):
891
892 2019-04-24  John Wilander  <wilander@apple.com>
893
894         Age out unconverted Ad Click Attributions after one week.
895         https://bugs.webkit.org/show_bug.cgi?id=197238
896         <rdar://problem/50177349>
897
898         Reviewed by Chris Dumez.
899
900         This patch adds the two functions AdClickAttribution::markAsExpired()
901         and AdClickAttribution::hasExpired() which make use of the existing
902         m_timeOfAdClick member.
903
904         Test: http/tests/adClickAttribution/expired-attributions-removed.html
905
906         * loader/AdClickAttribution.cpp:
907         (WebCore::AdClickAttribution::markAsExpired):
908         (WebCore::AdClickAttribution::hasExpired const):
909         * loader/AdClickAttribution.h:
910
911 2019-04-24  Simon Fraser  <simon.fraser@apple.com>
912
913         REGRESSION (iOS 12.2): CSS perspective property value can only be set correctly once
914         https://bugs.webkit.org/show_bug.cgi?id=197105
915         rdar://problem/50068230
916
917         Reviewed by Zalan Bujtas.
918
919         Make sure we trigger a geometry update when style properties change that
920         result in a StyleDifference::RecompositeLayer, and which are updated on layers
921         via RenderLayerBacking::updateGeometry().
922
923         Tests: compositing/style-change/backface-visibility-change.html
924                compositing/style-change/perspective-change.html
925                compositing/style-change/perspective-origin-change.html
926                compositing/style-change/transform-origin-change.html
927                compositing/style-change/transform-style-change.html
928
929         * rendering/RenderLayerCompositor.cpp:
930         (WebCore::recompositeChangeRequiresGeometryUpdate):
931         (WebCore::RenderLayerCompositor::layerStyleChanged):
932
933 2019-04-24  Simon Fraser  <simon.fraser@apple.com>
934
935         Make it possible to control the renderTreeAsText output by setting options on testRunner
936         https://bugs.webkit.org/show_bug.cgi?id=197133
937
938         Reviewed by Sam Weinig.
939
940         Add testRunner.setRenderTreeDumpOptions() and expose the subset of RenderAsTextFlag flags
941         that make sense in testing (those that don't dump unstable data like addresses), and plumb
942         these flags through the various framework layers.
943
944         Convert RenderAsTextBehavior to an OptionSet<RenderAsTextFlag>.
945
946         Fix code generation in WebKitTestRunner to generate bindings for IDL const values,
947         and hand-code DumpRenderTree bindings.
948
949         Some cleanup of the TestRunners, using member initializers.
950
951         Test: fast/harness/render-tree-as-text-options.html
952
953         * rendering/RenderLayer.cpp:
954         (WebCore::showLayerTree):
955         * rendering/RenderTreeAsText.cpp:
956         (WebCore::RenderTreeAsText::writeRenderObject):
957         (WebCore::writeDebugInfo):
958         (WebCore::write):
959         (WebCore::writeLayer):
960         (WebCore::writeLayerRenderers):
961         (WebCore::writeLayers):
962         (WebCore::externalRepresentation):
963         * rendering/RenderTreeAsText.h:
964         (WebCore::externalRepresentation):
965         (WebCore::write):
966         (WebCore::writeDebugInfo):
967         (): Deleted.
968         * rendering/svg/SVGRenderTreeAsText.cpp:
969         (WebCore::writePositionAndStyle):
970         (WebCore::writeStandardPrefix):
971         (WebCore::writeChildren):
972         (WebCore::writeSVGResourceContainer):
973         (WebCore::writeSVGContainer):
974         (WebCore::write):
975         (WebCore::writeSVGText):
976         (WebCore::writeSVGInlineText):
977         (WebCore::writeSVGImage):
978         (WebCore::writeSVGGradientStop):
979         (WebCore::writeResources):
980         * rendering/svg/SVGRenderTreeAsText.h:
981
982 2019-04-24  Antoine Quint  <graouts@apple.com>
983
984         [iOS] Calling preventDefault() when handling a pointerdown event should not prevent panning, zooming or click event dispatch
985         https://bugs.webkit.org/show_bug.cgi?id=195839
986         <rdar://problem/48946154>
987
988         Reviewed by Brent Fulgham.
989
990         Tests: pointerevents/ios/pointer-events-prevent-default-allows-click-event.html
991                pointerevents/ios/pointer-events-prevent-default-allows-scrolling.html
992
993         The Pointer Events specification defines that the default action of any and all pointer events MUST NOT
994         be a manipulation of the viewport (e.g. panning or zooming). In practice, this means that calling
995         preventDefault() while handling a Pointer Event has no effect on the inner workings of the user agent,
996         so we change the method signature of PointerCaptureController::dispatchEventForTouchAtIndex() to return
997         void since we don't need to know whether preventDefault() was called.
998
999         https://www.w3.org/TR/pointerevents/#declaring-candidate-regions-for-default-touch-behaviors
1000
1001         * page/PointerCaptureController.cpp:
1002         (WebCore::PointerCaptureController::dispatchEventForTouchAtIndex):
1003         * page/PointerCaptureController.h:
1004
1005 2019-04-24  Frederic Wang  <fwang@igalia.com>
1006
1007         With async scrolling enabled, this MathML test asserts
1008         https://bugs.webkit.org/show_bug.cgi?id=196123
1009
1010         This patch ensures that updateScrollInfoAfterLayout() is called during MathML layout. This
1011         fixes assertions when async scrolling is enabled and MathML elements have non-visible overflow.
1012
1013         Reviewed by Rob Buis.
1014
1015         Test: mathml/mathml-overflow-crash.html
1016
1017         * rendering/mathml/RenderMathMLBlock.cpp:
1018         (WebCore::RenderMathMLBlock::layoutBlock):
1019         (WebCore::RenderMathMLBlock::layoutInvalidMarkup):
1020         * rendering/mathml/RenderMathMLFraction.cpp:
1021         (WebCore::RenderMathMLFraction::layoutBlock):
1022         * rendering/mathml/RenderMathMLMath.cpp:
1023         (WebCore::RenderMathMLMath::layoutBlock):
1024         * rendering/mathml/RenderMathMLMenclose.cpp:
1025         (WebCore::RenderMathMLMenclose::layoutBlock):
1026         * rendering/mathml/RenderMathMLOperator.cpp:
1027         (WebCore::RenderMathMLOperator::layoutBlock):
1028         * rendering/mathml/RenderMathMLPadded.cpp:
1029         (WebCore::RenderMathMLPadded::layoutBlock):
1030         * rendering/mathml/RenderMathMLRoot.cpp:
1031         (WebCore::RenderMathMLRoot::layoutBlock):
1032         * rendering/mathml/RenderMathMLRow.cpp:
1033         (WebCore::RenderMathMLRow::layoutBlock):
1034         * rendering/mathml/RenderMathMLScripts.cpp:
1035         (WebCore::RenderMathMLScripts::layoutBlock):
1036         * rendering/mathml/RenderMathMLSpace.cpp:
1037         (WebCore::RenderMathMLSpace::layoutBlock):
1038         * rendering/mathml/RenderMathMLToken.cpp:
1039         (WebCore::RenderMathMLToken::layoutBlock):
1040         * rendering/mathml/RenderMathMLUnderOver.cpp:
1041         (WebCore::RenderMathMLUnderOver::layoutBlock):
1042
1043 2019-04-24  Greg V  <greg@unrelenting.technology>
1044
1045         Fix -Wc++11-narrowing on unsigned char platforms like FreeBSD/aarch64
1046         https://bugs.webkit.org/show_bug.cgi?id=197148
1047
1048         Reviewed by Alex Christensen.
1049
1050         * contentextensions/DFACombiner.cpp:
1051         * contentextensions/NFAToDFA.cpp:
1052
1053 2019-04-24  Chris Dumez  <cdumez@apple.com>
1054
1055         X-Frame-Options header should be ignored when frame-ancestors CSP directive is present
1056         https://bugs.webkit.org/show_bug.cgi?id=197226
1057         <rdar://problem/50155649>
1058
1059         Reviewed by Alex Christensen.
1060
1061         X-Frame-Options header should be ignored when frame-ancestors CSP directive is present:
1062         - https://www.w3.org/TR/CSP3/#frame-ancestors-and-frame-options
1063
1064         Specification says:
1065         """
1066         In order to allow backwards-compatible deployment, the frame-ancestors directive _obsoletes_ the
1067         X-Frame-Options header. If a resource is delivered with an policy that includes a directive named
1068         frame-ancestors and whose disposition is "enforce", then the X-Frame-Options header MUST be ignored.
1069         """
1070
1071         Gecko and Blink follow the specification, WebKit does not. As a result, page [1] is broken with
1072         WebKit-only on Schwab.com. The page height is wrong and you cannot see all the ETFs as a result.
1073
1074         [1] https://www.schwab.com/public/schwab/investing/investment_help/investment_research/etf_research/etfs.html?&path=/Prospect/Research/etfs/overview/oneSourceETFs.asp
1075
1076         Test: http/tests/security/contentSecurityPolicy/1.1/frame-ancestors/frame-ancestors-overrides-X-Frames-Options.html
1077
1078         * loader/DocumentLoader.cpp:
1079         (WebCore::DocumentLoader::responseReceived):
1080         * page/csp/ContentSecurityPolicy.cpp:
1081         (WebCore::ContentSecurityPolicy::overridesXFrameOptions const):
1082         * page/csp/ContentSecurityPolicy.h:
1083         * page/csp/ContentSecurityPolicyDirectiveList.h:
1084         (WebCore::ContentSecurityPolicyDirectiveList::hasFrameAncestorsDirective const):
1085
1086 2019-04-24  Zalan Bujtas  <zalan@apple.com>
1087
1088         [ContentChangeObserver] Do not use the global _WKContentChange in WebKitLegacy
1089         https://bugs.webkit.org/show_bug.cgi?id=196286
1090         <rdar://problem/49364417>
1091
1092         Reviewed by Simon Fraser.
1093
1094         By reporting WKContentIndeterminateChange in sendMouseMoveEvent enables us to remove the global _WKContentChange state.
1095         Using _WKContentChange is fine as long as only the observed frame reports content change during the synthetic click event.
1096         In case of multiple frames, we should really consult the local state instead.
1097         Unfortunately sendMouseMoveEvent has no access to the observed Document object so we can't really identify the observed content change.
1098         WKContentIndeterminateChange triggers asynchronous decision making at the callsite and in the callback we have access
1099         to the active Document/ContentChangeObverver object and can report the correct state.
1100         This is inline with current WebKit(WK2) behaviour.
1101
1102         Manually tested with a WebKitLegacy test app.
1103
1104         * SourcesCocoa.txt:
1105         * WebCore.xcodeproj/project.pbxproj:
1106         * page/ios/ContentChangeObserver.h:
1107         (WebCore::ContentChangeObserver::setHasNoChangeState):
1108         (WebCore::ContentChangeObserver::setHasIndeterminateState):
1109         (WebCore::ContentChangeObserver::setHasVisibleChangeState):
1110         (WebCore::ContentChangeObserver::setObservedContentState): Deleted.
1111         * page/ios/EventHandlerIOS.mm:
1112         (WebCore::EventHandler::mouseMoved):
1113         * platform/ios/wak/WAKWindow.mm:
1114         (-[WAKWindow sendMouseMoveEvent:contentChange:]):
1115         * platform/ios/wak/WKContentObservation.cpp: Removed.
1116         * platform/ios/wak/WKContentObservation.h:
1117
1118 2019-04-24  Philippe Normand  <pnormand@igalia.com>
1119
1120         [GTK][GStreamer] Flaky ASSERTION FAILED: m_lock.isHeld() in TextureMapperPlatformLayerProxy
1121         https://bugs.webkit.org/show_bug.cgi?id=196739
1122
1123         Reviewed by Xabier Rodriguez-Calvar.
1124
1125         The crash was triggered because m_videoDecoderPlatform not being
1126         explicitely set, its value would be inferred as one of the enum
1127         class values. Making it Optional avoids this issue.
1128
1129         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
1130
1131 2019-04-24  Philippe Normand  <pnormand@igalia.com>
1132
1133         [GStreamer] Crash in AudioTrackPrivate with playbin3 enabled
1134         https://bugs.webkit.org/show_bug.cgi?id=196913
1135
1136         Reviewed by Xabier Rodriguez-Calvar.
1137
1138         The crash was due to a playbin3 code path being triggered during
1139         MSE playback, which is not supposed to work in playbin3 anyway.
1140         The problem is that setting the USE_PLAYBIN3 environment variable
1141         to "1" makes the GStreamer playback plugin register the playbin3
1142         element under the playbin name. So that leads to playbin3 being
1143         used everywhere in WebKit where we assume the playbin element is
1144         used. So the proposed solution is to:
1145
1146         - use a WebKit-specific environment variable instead of the
1147         GStreamer USE_PLAYBIN3 variable.
1148         - emit a warning if the USE_PLAYBIN3 environment variable is
1149         detected. We can't unset it ourselves for security reasons.
1150
1151         The patch also includes a code cleanup of the player method
1152         handling the pipeline creation. The previous code had a bug
1153         leading to playbin3 being used for MSE.
1154
1155         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1156         (WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin):
1157
1158 2019-04-24  chris fleizach  <cfleizach@apple.com>
1159
1160         AX: Remove deprecated Accessibility Object Model events
1161         https://bugs.webkit.org/show_bug.cgi?id=197073
1162         <rdar://problem/50027819>
1163
1164         Reviewed by Ryosuke Niwa.
1165
1166         Test: accessibility/mac/replace-text-with-range.html
1167
1168         * DerivedSources.make:
1169         * Sources.txt:
1170         * WebCore.xcodeproj/project.pbxproj:
1171         * accessibility/AccessibilityListBoxOption.cpp:
1172         (WebCore::AccessibilityListBoxOption::setSelected):
1173         * accessibility/AccessibilityMediaObject.cpp:
1174         (WebCore::AccessibilityMediaObject::increment):
1175         (WebCore::AccessibilityMediaObject::decrement):
1176         * accessibility/AccessibilityMenuListOption.cpp:
1177         (WebCore::AccessibilityMenuListOption::setSelected):
1178         * accessibility/AccessibilityNodeObject.cpp:
1179         (WebCore::AccessibilityNodeObject::increment):
1180         (WebCore::AccessibilityNodeObject::decrement):
1181         * accessibility/AccessibilityObject.cpp:
1182         (WebCore::AccessibilityObject::press):
1183         (WebCore::AccessibilityObject::replaceTextInRange):
1184         (WebCore::AccessibilityObject::scrollToMakeVisible const):
1185         (WebCore::AccessibilityObject::shouldDispatchAccessibilityEvent const): Deleted.
1186         (WebCore::AccessibilityObject::dispatchAccessibilityEvent const): Deleted.
1187         (WebCore::AccessibilityObject::dispatchAccessibilityEventWithType const): Deleted.
1188         (WebCore::AccessibilityObject::dispatchAccessibleSetValueEvent const): Deleted.
1189         * accessibility/AccessibilityObject.h:
1190         * accessibility/AccessibilityRenderObject.cpp:
1191         (WebCore::AccessibilityRenderObject::setFocused):
1192         (WebCore::AccessibilityRenderObject::setValue):
1193         * accessibility/AccessibilityScrollbar.cpp:
1194         (WebCore::AccessibilityScrollbar::setValue):
1195         * accessibility/AccessibilitySlider.cpp:
1196         (WebCore::AccessibilitySlider::setValue):
1197         * accessibility/ios/AccessibilityObjectIOS.mm:
1198         (WebCore::AccessibilityObject::accessibilityPlatformIncludesObject const):
1199         (WebCore::AccessibilityObject::hasAccessibleDismissEventListener const): Deleted.
1200         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
1201         (-[WebAccessibilityObjectWrapper accessibilityPerformEscape]): Deleted.
1202         (-[WebAccessibilityObjectWrapper accessibilityElementDidBecomeFocused]): Deleted.
1203         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
1204         (-[WebAccessibilityObjectWrapper accessibilityPerformShowMenuAction]):
1205         * dom/Element.idl:
1206         * dom/EventNames.h:
1207         * dom/EventNames.in:
1208         * html/HTMLAttributeNames.in:
1209         * html/HTMLElement.cpp:
1210         (WebCore::HTMLElement::createEventHandlerNameMap):
1211         * page/Settings.yaml:
1212         * testing/InternalSettings.cpp:
1213         (WebCore::InternalSettings::Backup::Backup):
1214         (WebCore::InternalSettings::Backup::restoreTo):
1215         (WebCore::InternalSettings::setAccessibilityEventsEnabled): Deleted.
1216         * testing/InternalSettings.h:
1217         * testing/InternalSettings.idl:
1218
1219 2019-04-23  Andy Estes  <aestes@apple.com>
1220
1221         [iOS] QuickLook documents loaded from file: URLs should be allowed to perform same-document navigations
1222         https://bugs.webkit.org/show_bug.cgi?id=196749
1223         <rdar://problem/35773454>
1224
1225         Reviewed by Daniel Bates.
1226
1227         QuickLook previews are in a non-local origin defined by a unique x-apple-ql-id: URL, which
1228         isolates the origin that hosted the document from the document preview itself. When a
1229         QuickLook document is loaded as a file: URL, SecurityOrigin's protections against loading
1230         local resources from non-local origins prevented navigations like location.reload() and
1231         fragment navigations.
1232
1233         To allow reloads and same-document navigations in QuickLook documents loaded from file: URLs,
1234         we should grant the QuickLook document's SecurityOrigin access to the file path that loaded
1235         the preview.
1236
1237         Added a new API test.
1238
1239         * dom/Document.cpp:
1240         (WebCore::Document::applyQuickLookSandbox):
1241         * page/SecurityOrigin.cpp:
1242         (WebCore::SecurityOrigin::createNonLocalWithAllowedFilePath):
1243         (WebCore::SecurityOrigin::canDisplay const):
1244         * page/SecurityOrigin.h:
1245
1246 2019-04-23  Devin Rousso  <drousso@apple.com>
1247
1248         Web Inspector: Debugger: remove ASSERT_NOT_REACHED where it's possible to reach
1249         https://bugs.webkit.org/show_bug.cgi?id=197210
1250         <rdar://problem/48462912>
1251
1252         Reviewed by Joseph Pecoraro.
1253
1254         * inspector/agents/page/PageDebuggerAgent.cpp:
1255         (WebCore::PageDebuggerAgent::didAddEventListener):
1256         (WebCore::PageDebuggerAgent::didPostMessage):
1257
1258         * inspector/InspectorInstrumentation.cpp:
1259         (WebCore::InspectorInstrumentation::consoleAgentEnabled):
1260         (WebCore::InspectorInstrumentation::timelineAgentEnabled):
1261         Drive-by: add additional `FAST_RETURN_IF_NO_FRONTENDS`.
1262
1263 2019-04-23  Commit Queue  <commit-queue@webkit.org>
1264
1265         Unreviewed, rolling out r244556.
1266         https://bugs.webkit.org/show_bug.cgi?id=197212
1267
1268         Causing build failures on multiple builders (Requested by
1269         ShawnRoberts on #webkit).
1270
1271         Reverted changeset:
1272
1273         "Create AVFoundationSoftLink.{h,mm} to reduce duplicate code"
1274         https://bugs.webkit.org/show_bug.cgi?id=197171
1275         https://trac.webkit.org/changeset/244556
1276
1277 2019-04-23  Devin Rousso  <drousso@apple.com>
1278
1279         Web Inspector: Uncaught Exception: null is not an object (evaluating 'this.ownerDocument.frameIdentifier')
1280         https://bugs.webkit.org/show_bug.cgi?id=196420
1281         <rdar://problem/49444205>
1282
1283         Reviewed by Timothy Hatcher.
1284
1285         Modify the existing `frameId` to represent the owner frame of the node, rather than the
1286         frame it holds (in the case of an `<iframe>`).
1287
1288         * inspector/agents/InspectorDOMAgent.cpp:
1289         (WebCore::InspectorDOMAgent::buildObjectForNode):
1290
1291 2019-04-23  Devin Rousso  <drousso@apple.com>
1292
1293         ContentSecurityPolicy::logToConsole should include line/column number and source location
1294         https://bugs.webkit.org/show_bug.cgi?id=114317
1295         <rdar://problem/13614617>
1296
1297         Reviewed by Timothy Hatcher.
1298
1299         No change in functionality.
1300
1301         * page/csp/ContentSecurityPolicy.h:
1302         * page/csp/ContentSecurityPolicy.cpp:
1303         (WebCore::ContentSecurityPolicy::reportViolation const):
1304         (WebCore::ContentSecurityPolicy::logToConsole const):
1305
1306 2019-04-23  Devin Rousso  <drousso@apple.com>
1307
1308         Web Inspector: Canvas: support recording TypedOMCSSImageValue
1309         https://bugs.webkit.org/show_bug.cgi?id=192609
1310
1311         Reviewed by Timothy Hatcher.
1312
1313         * inspector/InspectorCanvas.h:
1314         * inspector/InspectorCanvas.cpp:
1315         (WebCore::InspectorCanvas::indexForData):
1316         (WebCore::InspectorCanvas::buildAction):
1317
1318 2019-04-23  Andres Gonzalez  <andresg_22@apple.com>
1319
1320         Accessibility text search and selection API enhancements.
1321         https://bugs.webkit.org/show_bug.cgi?id=197095
1322         <rdar://problem/48181791>
1323
1324         Reviewed by Chris Fleizach.
1325
1326         - Split the existing SelectTextWithCriteria API into two: search text API (SearchTextWithCriteria) and a text operation API (TextOperation: select, replace, capitalize...).
1327         - This allows for more flexibility and extensibility.
1328         - Added the ability to retrieve text markers for multiple search hits.
1329         - Various code clean up and consolidation.
1330         - Added LayoutTest for search API.
1331         - Previous API is marked with "To be deprecated", and is implemented with new implementation. May be removed in a future change.
1332
1333         Test: accessibility/mac/search-text/search-text.html
1334
1335         * accessibility/AccessibilityObject.cpp:
1336         (WebCore::rangeClosestToRange):
1337         (WebCore::AccessibilityObject::rangeOfStringClosestToRangeInDirection const):
1338         (WebCore::AccessibilityObject::findTextRange const):
1339         (WebCore::AccessibilityObject::findTextRanges const):
1340         (WebCore::AccessibilityObject::performTextOperation):
1341         (WebCore::AccessibilityObject::frame const):
1342         (WebCore::AccessibilityObject::selectText): Deleted.
1343         * accessibility/AccessibilityObject.h:
1344         (WebCore::AccessibilitySearchTextCriteria::AccessibilitySearchTextCriteria):
1345         (WebCore::AccessibilityTextOperation::AccessibilityTextOperation):
1346         (WebCore::AccessibilitySelectTextCriteria::AccessibilitySelectTextCriteria): Deleted.
1347         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
1348         (accessibilityTextCriteriaForParameterizedAttribute):
1349         (accessibilitySearchTextCriteriaForParameterizedAttribute):
1350         (accessibilityTextOperationForParameterizedAttribute):
1351         (-[WebAccessibilityObjectWrapper IGNORE_WARNINGS_END]):
1352         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):
1353         (accessibilitySelectTextCriteriaForCriteriaParameterizedAttribute): Deleted.
1354
1355 2019-04-23  Guy Lewin  <guy@lewin.co.il>
1356
1357         Multiple File Input Icon Set Regardless of File List
1358         https://bugs.webkit.org/show_bug.cgi?id=195537
1359
1360         Reviewed by Alexey Proskuryakov.
1361
1362         File input elements display icon with an empty file list after
1363         resetting the file list in 'change' event handler - on iOS
1364
1365         Test: fast/forms/file/file-reset-in-change-using-open-panel-with-icon.html
1366
1367         * html/FileInputType.cpp:
1368         (WebCore::FileInputType::filesChosen):
1369
1370 2019-04-23  Eric Carlson  <eric.carlson@apple.com>
1371
1372         Create AVFoundationSoftLink.{h,mm} to reduce duplicate code
1373         https://bugs.webkit.org/show_bug.cgi?id=197171
1374         <rdar://problem/47454979>
1375
1376         Reviewed by Youenn Fablet.
1377
1378         Tests: TestWebKitAPI/Tests/WebCore/cocoa/AVFoundationSoftLinkTest.mm
1379
1380         * Modules/plugins/QuickTimePluginReplacement.mm:
1381         (WebCore::jsValueWithValueInContext):
1382         (WebCore::jsValueWithAVMetadataItemInContext):
1383         * WebCore.xcodeproj/project.pbxproj:
1384         * platform/audio/ios/AudioSessionIOS.mm:
1385         (WebCore::AudioSession::setCategory):
1386         (WebCore::AudioSession::category const):
1387         (WebCore::AudioSession::routeSharingPolicy const):
1388         (WebCore::AudioSession::routingContextUID const):
1389         (WebCore::AudioSession::sampleRate const):
1390         (WebCore::AudioSession::bufferSize const):
1391         (WebCore::AudioSession::numberOfOutputChannels const):
1392         (WebCore::AudioSession::tryToSetActiveInternal):
1393         (WebCore::AudioSession::preferredBufferSize const):
1394         (WebCore::AudioSession::setPreferredBufferSize):
1395         * platform/audio/ios/MediaSessionManagerIOS.mm:
1396         (-[WebMediaSessionHelper initWithCallback:]):
1397         (-[WebMediaSessionHelper startMonitoringAirPlayRoutes]):
1398         * platform/graphics/avfoundation/AVTrackPrivateAVFObjCImpl.mm:
1399         (WebCore::AVTrackPrivateAVFObjCImpl::audioKind const):
1400         (WebCore::AVTrackPrivateAVFObjCImpl::videoKind const):
1401         (WebCore::AVTrackPrivateAVFObjCImpl::label const):
1402         * platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm:
1403         (WebCore::AudioSourceProviderAVFObjC::createMix):
1404         * platform/graphics/avfoundation/MediaPlaybackTargetMac.mm:
1405         * platform/graphics/avfoundation/MediaSelectionGroupAVFObjC.mm:
1406         (WebCore::MediaSelectionGroupAVFObjC::updateOptions):
1407         * platform/graphics/avfoundation/objc/AVFoundationMIMETypeCache.mm:
1408         (WebCore::AVFoundationMIMETypeCache::canDecodeType):
1409         (WebCore::AVFoundationMIMETypeCache::loadMIMETypes):
1410         * platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.mm:
1411         (WebCore::CDMInstanceFairPlayStreamingAVFObjC::supportsPersistableState):
1412         (WebCore::CDMInstanceFairPlayStreamingAVFObjC::supportsPersistentKeys):
1413         (WebCore::CDMInstanceFairPlayStreamingAVFObjC::supportsMediaCapability):
1414         (WebCore::CDMInstanceFairPlayStreamingAVFObjC::initializeWithConfiguration):
1415         (WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::updateLicense):
1416         (WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::loadSession):
1417         (WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::removeSessionData):
1418         (WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::ensureSession):
1419         * platform/graphics/avfoundation/objc/CDMSessionAVContentKeySession.mm:
1420         (WebCore::CDMSessionAVContentKeySession::isAvailable):
1421         (WebCore::CDMSessionAVContentKeySession::releaseKeys):
1422         (WebCore::CDMSessionAVContentKeySession::update):
1423         (WebCore::CDMSessionAVContentKeySession::generateKeyReleaseMessage):
1424         (WebCore::CDMSessionAVContentKeySession::contentKeySession):
1425         * platform/graphics/avfoundation/objc/CDMSessionAVFoundationObjC.mm:
1426         * platform/graphics/avfoundation/objc/CDMSessionAVStreamSession.mm:
1427         (WebCore::CDMSessionAVStreamSession::releaseKeys):
1428         (WebCore::CDMSessionAVStreamSession::update):
1429         (WebCore::CDMSessionAVStreamSession::setStreamSession):
1430         (WebCore::CDMSessionAVStreamSession::generateKeyReleaseMessage):
1431         * platform/graphics/avfoundation/objc/ImageDecoderAVFObjC.mm:
1432         (WebCore::imageDecoderAssetOptions):
1433         (WebCore::ImageDecoderAVFObjC::ImageDecoderAVFObjC):
1434         (WebCore::ImageDecoderAVFObjC::firstEnabledTrack):
1435         (WebCore::ImageDecoderAVFObjC::readSamples):
1436         (SOFT_LINK_CONSTANT_MAY_FAIL): Deleted.
1437         * platform/graphics/avfoundation/objc/InbandTextTrackPrivateAVFObjC.mm:
1438         (WebCore::InbandTextTrackPrivateAVFObjC::label const):
1439         * platform/graphics/avfoundation/objc/InbandTextTrackPrivateLegacyAVFObjC.mm:
1440         (WebCore::InbandTextTrackPrivateLegacyAVFObjC::label const):
1441         * platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm:
1442         (WebCore::MediaPlaybackTargetPickerMac::devicePicker):
1443         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1444         (WebCore::assetCacheForPath):
1445         (WebCore::MediaPlayerPrivateAVFoundationObjC::clearMediaCache):
1446         (WebCore::MediaPlayerPrivateAVFoundationObjC::clearMediaCacheForOrigins):
1447         (WebCore::MediaPlayerPrivateAVFoundationObjC::cancelLoad):
1448         (WebCore::MediaPlayerPrivateAVFoundationObjC::createImageGenerator):
1449         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerLayer):
1450         (WebCore::MediaPlayerPrivateAVFoundationObjC::synchronizeTextTrackState):
1451         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL):
1452         (WebCore::MediaPlayerPrivateAVFoundationObjC::setAVPlayerItem):
1453         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer):
1454         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerItem):
1455         (WebCore::MediaPlayerPrivateAVFoundationObjC::supportsType):
1456         (WebCore::MediaPlayerPrivateAVFoundationObjC::isAvailable):
1457         (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged):
1458         (WebCore::determineChangedTracksFromNewTracksAndOldItems):
1459         (WebCore::MediaPlayerPrivateAVFoundationObjC::updateAudioTracks):
1460         (WebCore::MediaPlayerPrivateAVFoundationObjC::updateVideoTracks):
1461         (WebCore::MediaPlayerPrivateAVFoundationObjC::createVideoOutput):
1462         (WebCore::MediaPlayerPrivateAVFoundationObjC::outputMediaDataWillChange):
1463         (WebCore::MediaPlayerPrivateAVFoundationObjC::safeMediaSelectionGroupForLegibleMedia):
1464         (WebCore::MediaPlayerPrivateAVFoundationObjC::safeMediaSelectionGroupForAudibleMedia):
1465         (WebCore::MediaPlayerPrivateAVFoundationObjC::safeMediaSelectionGroupForVisualMedia):
1466         (WebCore::MediaPlayerPrivateAVFoundationObjC::processMediaSelectionOptions):
1467         (WebCore::MediaPlayerPrivateAVFoundationObjC::setCurrentTextTrack):
1468         (WebCore::MediaPlayerPrivateAVFoundationObjC::languageOfPrimaryAudioTrack const):
1469         (WebCore::MediaPlayerPrivateAVFoundationObjC::wirelessPlaybackTargetType const):
1470         (WebCore::exernalDeviceDisplayNameForPlayer):
1471         (WebCore::metadataType):
1472         (WebCore::MediaPlayerPrivateAVFoundationObjC::metadataDidArrive):
1473         (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]):
1474         (-[WebCoreAVFPullDelegate outputMediaDataWillChange:]):
1475         (-[WebCoreAVFPullDelegate outputSequenceWasFlushed:]):
1476         (WebCore::MediaPlayerPrivateAVFoundationObjC::processLegacyClosedCaptionsTracks): Deleted.
1477         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
1478         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::MediaPlayerPrivateMediaSourceAVFObjC):
1479         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::isAvailable):
1480         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::supportsType):
1481         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::ensureLayer):
1482         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::streamSession):
1483         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
1484         (-[WebAVSampleBufferStatusChangeListener observeValueForKeyPath:ofObject:change:context:]):
1485         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::isAvailable):
1486         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::ensureLayers):
1487         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
1488         (-[WebAVSampleBufferErrorListener observeValueForKeyPath:ofObject:change:context:]):
1489         (WebCore::SourceBufferPrivateAVFObjC::SourceBufferPrivateAVFObjC):
1490         (WebCore::SourceBufferPrivateAVFObjC::~SourceBufferPrivateAVFObjC):
1491         (WebCore::SourceBufferPrivateAVFObjC::trackDidChangeEnabled):
1492         (WebCore::SourceBufferPrivateAVFObjC::enqueueSample):
1493         * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
1494         (WebCore::PlatformCALayerCocoa::layerTypeForPlatformLayer):
1495         (WebCore::PlatformCALayerCocoa::PlatformCALayerCocoa):
1496         (WebCore::PlatformCALayerCocoa::clone const):
1497         (WebCore::PlatformCALayerCocoa::avPlayerLayer const):
1498         * platform/graphics/cocoa/HEVCUtilitiesCocoa.mm:
1499         (WebCore::validateHEVCParameters):
1500         * platform/ios/PlatformSpeechSynthesizerIOS.mm:
1501         (getAVSpeechUtteranceDefaultSpeechRate):
1502         (getAVSpeechUtteranceMaximumSpeechRate):
1503         (-[WebSpeechSynthesisWrapper speakUtterance:]):
1504         (WebCore::PlatformSpeechSynthesizer::initializeVoiceList):
1505         (SOFT_LINK_CONSTANT): Deleted.
1506         * platform/ios/VideoFullscreenInterfaceAVKit.mm:
1507         (-[WebAVPlayerLayer init]):
1508         (-[WebAVPlayerLayer layoutSublayers]):
1509         (-[WebAVPlayerLayer setVideoGravity:]):
1510         (-[WebAVPlayerLayer videoRect]):
1511         (WebAVPlayerLayerView_startRoutingVideoToPictureInPicturePlayerLayerView):
1512         * platform/mac/SerializedPlatformRepresentationMac.mm:
1513         (WebCore::jsValueWithValueInContext):
1514         (WebCore::jsValueWithAVMetadataItemInContext):
1515         * platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.mm:
1516         (WebCore::getAVFormatIDKeyWithFallback):
1517         (WebCore::getAVNumberOfChannelsKeyWithFallback):
1518         (WebCore::getAVSampleRateKeyWithFallback):
1519         (WebCore::getAVEncoderBitRateKeyWithFallback):
1520         (WebCore::MediaRecorderPrivateWriter::create):
1521         (WebCore::MediaRecorderPrivateWriter::setVideoInput):
1522         (WebCore::MediaRecorderPrivateWriter::setAudioInput):
1523         * platform/mediastream/RealtimeVideoSource.h:
1524         * platform/mediastream/VideoPreset.h:
1525         * platform/mediastream/ios/AVAudioSessionCaptureDeviceManager.mm:
1526         (WebCore::AVAudioSessionCaptureDeviceManager::refreshAudioCaptureDevices):
1527         * platform/mediastream/ios/CoreAudioCaptureSourceIOS.mm:
1528         (-[WebCoreAudioCaptureSourceIOSListener initWithCallback:]):
1529         (-[WebCoreAudioCaptureSourceIOSListener handleInterruption:]):
1530         * platform/mediastream/mac/AVCaptureDeviceManager.mm:
1531         (WebCore::deviceIsAvailable):
1532         (WebCore::AVCaptureDeviceManager::updateCachedAVCaptureDevices):
1533         (WebCore::AVCaptureDeviceManager::refreshCaptureDevices):
1534         (WebCore::AVCaptureDeviceManager::isAvailable):
1535         (WebCore::AVCaptureDeviceManager::~AVCaptureDeviceManager):
1536         * platform/mediastream/mac/AVVideoCaptureSource.mm:
1537         (WebCore::AVVideoPreset::create):
1538         (WebCore::AVVideoPreset::AVVideoPreset):
1539         (WebCore::AVVideoCaptureSource::create):
1540         (WebCore::AVVideoCaptureSource::AVVideoCaptureSource):
1541         (WebCore::AVVideoCaptureSource::capabilities):
1542         (WebCore::sensorOrientationFromVideoOutput):
1543         (WebCore::AVVideoCaptureSource::setupSession):
1544         (WebCore::AVVideoCaptureSource::frameDurationForFrameRate):
1545         (WebCore::AVVideoCaptureSource::setupCaptureSession):
1546         (WebCore::AVVideoCaptureSource::captureOutputDidOutputSampleBufferFromConnection):
1547         (WebCore::AVVideoCaptureSource::generatePresets):
1548         (-[WebCoreAVVideoCaptureSourceObserver addNotificationObservers]):
1549         (-[WebCoreAVVideoCaptureSourceObserver captureOutput:didOutputSampleBuffer:fromConnection:]):
1550
1551 2019-04-23  Timothy Hatcher  <timothy@apple.com>
1552
1553         Speed up RenderTheme::systemColor on Speedometer2.
1554         https://bugs.webkit.org/show_bug.cgi?id=197203
1555         rdar://problem/50056756
1556
1557         Reviewed by Tim Horton.
1558
1559         * rendering/RenderThemeIOS.mm:
1560         (WebCore::RenderThemeIOS::systemColor const): Remove some unused code. And fetch the cache after an early return.
1561         * rendering/RenderThemeMac.mm:
1562         (WebCore::RenderThemeMac::systemColor const): Avoid some allocations in LocalDefaultSystemAppearance
1563         when a CSS color is in the system color cache.
1564
1565 2019-04-23  Ryosuke Niwa  <rniwa@webkit.org>
1566
1567         [iOS] element.focus() sometimes fails to reveal the focused element when it becomes editable dynamically
1568         https://bugs.webkit.org/show_bug.cgi?id=197188
1569
1570         Reviewed by Wenson Hsieh.
1571
1572         The bug was caused by the scroll-to-reveal code triggered by Element::updateFocusAppearance updating
1573         the scroll position via scrolling tree update in a layer tree commit which happens after
1574         _zoomToRevealFocusedElement in WKContentView had already scrolled the frame view.
1575
1576         To fix this problem, we need to defer the editor state update until the layer commit (see r244494),
1577         and update the scrolling tree before invoking WebPageProxy::editorStateChanged which brings up
1578         the keyboard and scroll-to-reveal the caret in the UI process side.
1579
1580         We also avoid revealing the focus for the second time via Document::scheduleScrollToFocusedElement
1581         in Element::updateFocusAppearance as this timer based scrolling also happens after we had already
1582         revealed the caret in _zoomToRevealFocusedElement. This is a bit hacky but works for most cases since
1583         we wouldn't bring up a keyboard if the focused element was not editable anyway.
1584
1585         Test: editing/selection/ios/scrolling-to-focused-element-inside-iframe.html
1586
1587         * dom/Element.cpp:
1588         (WebCore::Element::updateFocusAppearance): Avoid scheduling a timer based reavel of the focused element
1589         when we're already revealing the element via selection change.
1590
1591 2019-04-23  Remy Demarest  <rdemarest@apple.com>
1592
1593         Fix layout issues occuring when entering full screen mode.
1594         https://bugs.webkit.org/show_bug.cgi?id=197086
1595         <rdar://problem/47733671>.
1596
1597         Reviewed by Darin Adler.
1598
1599         This issue is the result of changing the style mask of the window after entering
1600         full screen mode. Safari adds an invisible toolbar to display the URL of the page
1601         which ends up breaking the layout. Having that window use a style that includes a
1602         titlebar fixes the bug.
1603
1604         * platform/mac/WebCoreFullScreenWindow.mm:
1605         (-[WebCoreFullScreenWindow constrainFrameRect:toScreen:]): Ensure that the window
1606         can fill the entire screen including the underlapping the menu bar, so that the
1607         window does not resize when the animation is done.
1608         (-[WebCoreFullScreenWindow canBecomeMainWindow]): Borderless windows cannot become
1609         main by default, adding the titlebar allows it to become main, prevent this from
1610         happening at all to preserve the existing behavior.
1611
1612 2019-04-23  Chris Dumez  <cdumez@apple.com>
1613
1614         [Process-Swap-On-Navigation] WebKit hangs when going back to a form submission's page due to Process-Swap-On-Navigation on iOS 12.2 and higher
1615         https://bugs.webkit.org/show_bug.cgi?id=197097
1616         <rdar://problem/50048318>
1617
1618         Reviewed by Alex Christensen.
1619
1620         * loader/EmptyFrameLoaderClient.h:
1621         * loader/FrameLoader.cpp:
1622         (WebCore::FrameLoader::checkLoadCompleteForThisFrame):
1623         If we still have a provisional item (new load has been started or we did not clear it because we're about to retry),
1624         then let the client know the load will continue by passing an extra flag with the didFailProvisionalLoad.
1625
1626         * loader/FrameLoaderClient.h:
1627         * loader/FrameLoaderTypes.h:
1628
1629 2019-04-23  Carlos Garcia Campos  <cgarcia@igalia.com>
1630
1631         [ATK] Implement AtkComponentIface scroll_to methods
1632         https://bugs.webkit.org/show_bug.cgi?id=196856
1633
1634         Reviewed by Michael Catanzaro.
1635
1636         Implement scroll_to and scroll_to_point when ATK >= 2.30.
1637
1638         Fixes: accessibility/scroll-to-global-point-iframe-nested.html
1639                accessibility/scroll-to-global-point-iframe.html
1640                accessibility/scroll-to-global-point-main-window.html
1641                accessibility/scroll-to-global-point-nested.html
1642                accessibility/scroll-to-make-visible-div-overflow.html
1643                accessibility/scroll-to-make-visible-iframe.html
1644                accessibility/scroll-to-make-visible-nested-2.html
1645                accessibility/scroll-to-make-visible-nested.html
1646
1647         * accessibility/AccessibilityObject.cpp:
1648         (WebCore::AccessibilityObject::scrollToMakeVisible const): Add new method receiving the
1649         ScrollRectToVisibleOptions since ATK interface has a parameter to decide how to scroll.
1650         * accessibility/AccessibilityObject.h:
1651         * accessibility/atk/WebKitAccessibleInterfaceComponent.cpp:
1652         (atkToContents):
1653         (webkitAccessibleComponentRefAccessibleAtPoint):
1654         (webkitAccessibleComponentGetExtents):
1655         (webkitAccessibleComponentGrabFocus):
1656         (webkitAccessibleComponentScrollTo):
1657         (webkitAccessibleComponentScrollToPoint):
1658         (webkitAccessibleComponentInterfaceInit):
1659         (core): Deleted.
1660
1661 2019-04-22  Youenn Fablet  <youenn@apple.com>
1662
1663         Update libwebrtc logging when WebCore WebRTC logging is updated
1664         https://bugs.webkit.org/show_bug.cgi?id=197166
1665         <rdar://problem/50107696>
1666
1667         Unreviewed.
1668
1669         Build fix after https://trac.webkit.org/changeset/244511.
1670
1671         * page/Page.cpp:
1672         (WebCore::Page::configureLoggingChannel):
1673
1674 2019-04-22  Youenn Fablet  <youenn@apple.com>
1675
1676         Cache API should return Abort error in case of putting an aborted fetch
1677         https://bugs.webkit.org/show_bug.cgi?id=196757
1678
1679         Reviewed by Darin Adler.
1680
1681         In case of an aborted fetch, call consume callback with an AbortError.
1682         Update the code that handles load cancelling as the loader callback is called.
1683         Covered by rebased tests.
1684
1685         * Modules/fetch/FetchResponse.cpp:
1686         (WebCore::FetchResponse::addAbortSteps):
1687         (WebCore::FetchResponse::BodyLoader::didFail):
1688         (WebCore::FetchResponse::BodyLoader::BodyLoader):
1689         (WebCore::FetchResponse::BodyLoader::~BodyLoader):
1690         (WebCore::FetchResponse::stop):
1691         * Modules/fetch/FetchResponse.h:
1692
1693 2019-04-22  Youenn Fablet  <youenn@apple.com>
1694
1695         Update libwebrtc logging when WebCore WebRTC logging is updated
1696         https://bugs.webkit.org/show_bug.cgi?id=197166
1697
1698         Reviewed by Eric Carlson.
1699
1700         When updating WebRTC logging from Web Inspector, update libwebrtc logging so that no page reload is required.
1701         Manually tested.
1702
1703         * page/Page.cpp:
1704         (WebCore::Page::configureLoggingChannel):
1705
1706 2019-04-22  Simon Fraser  <simon.fraser@apple.com>
1707
1708         Introduce the concept of "opportunistic" stacking contexts
1709         https://bugs.webkit.org/show_bug.cgi?id=197077
1710
1711         Reviewed by Zalan Bujtas.
1712
1713         Bring back a variant of some code removed in r236424, which allows a RenderLayer
1714         to be stacking context for painting, without actually being on in terms of CSS.
1715         
1716         Internally, RenderLayer will call setIsOpportunisticStackingContext() to make a layer
1717         into a stacking context for painting. External callers deal with isStackingContext()
1718         or isCSSStackingContext().
1719
1720         Sadly we can't make m_forcedStackingContext (set on media element layers) trigger a
1721         non-CSS stacking context; media controls use mix-blend-mode, and rely on the fake-stacking
1722         media layer to be the "isolateBlending" ancestor.
1723
1724         No code uses this yet.
1725
1726         * rendering/RenderLayer.cpp:
1727         (WebCore::RenderLayer::RenderLayer):
1728         (WebCore::RenderLayer::shouldBeCSSStackingContext const):
1729         (WebCore::RenderLayer::isStackingContextChanged):
1730         (WebCore::RenderLayer::setIsOpportunisticStackingContext):
1731         (WebCore::RenderLayer::setIsCSSStackingContext):
1732         (WebCore::RenderLayer::updateAncestorChainHasBlendingDescendants):
1733         (WebCore::RenderLayer::dirtyAncestorChainHasBlendingDescendants):
1734         (WebCore::RenderLayer::beginTransparencyLayers):
1735         (WebCore::RenderLayer::calculateClipRects const):
1736         (WebCore::outputPaintOrderTreeLegend):
1737         (WebCore::outputPaintOrderTreeRecursive):
1738         (WebCore::RenderLayer::shouldBeStackingContext const): Deleted.
1739         (WebCore::RenderLayer::setIsStackingContext): Deleted.
1740         * rendering/RenderLayer.h:
1741         * rendering/RenderLayerBacking.cpp:
1742         (WebCore::RenderLayerBacking::compositingOpacity const):
1743
1744 2019-04-22  Justin Fan  <justin_fan@apple.com>
1745
1746         [WebGPU] Move swap chain methods from GPUDevice to GPUCanvasContext
1747         https://bugs.webkit.org/show_bug.cgi?id=197126
1748
1749         Reviewed by Dean Jackson.
1750
1751         GPUSwapChains are now configured via GPUCanvasContext instead of GPUDevice. Covers WebGPU API 
1752         pull request #262.
1753
1754         Existing WebGPU tests updated to match.
1755
1756         * Modules/webgpu/GPUCanvasContext.cpp:
1757         (WebCore::GPUCanvasContext::configureSwapChain):
1758         (WebCore::GPUCanvasContext::replaceSwapChain): Deleted.
1759         * Modules/webgpu/GPUCanvasContext.h:
1760         * Modules/webgpu/GPUCanvasContext.idl:
1761         * Modules/webgpu/WebGPUDevice.cpp:
1762         (WebCore::WebGPUDevice::createSwapChain const): Deleted.
1763         * Modules/webgpu/WebGPUDevice.h:
1764         (WebCore::WebGPUDevice::device):
1765         * Modules/webgpu/WebGPUDevice.idl:
1766         * Modules/webgpu/WebGPUSwapChainDescriptor.cpp: Copied from Source/WebCore/Modules/webgpu/WebGPUSwapChainDescriptor.h.
1767         (WebCore::WebGPUSwapChainDescriptor::asGPUSwapChainDescriptor const):
1768         * Modules/webgpu/WebGPUSwapChainDescriptor.h:
1769         * Sources.txt:
1770         * WebCore.xcodeproj/project.pbxproj:
1771         * platform/graphics/gpu/GPUDevice.cpp:
1772         (WebCore::GPUDevice::setSwapChain):
1773         (WebCore::GPUDevice::tryCreateSwapChain const): Deleted.
1774         * platform/graphics/gpu/GPUDevice.h:
1775         * platform/graphics/gpu/GPUSwapChain.h:
1776         * platform/graphics/gpu/GPUSwapChainDescriptor.h:
1777         (WebCore::GPUSwapChainDescriptor::GPUSwapChainDescriptor):
1778         * platform/graphics/gpu/cocoa/GPUSwapChainMetal.mm:
1779         (WebCore::GPUSwapChain::tryCreate):
1780
1781 2019-04-22  Said Abou-Hallawa  <said@apple.com>
1782
1783         Mark SVGStringList properties '[SameObject]' in the IDL files
1784         Followup to https://bugs.webkit.org/show_bug.cgi?id=197137
1785
1786         Reviewed by Darin Adler.
1787
1788         The SVG elements do not create tear-off wrappers for SVGStrigList DOM
1789         objects anymore. Instead they return Ref pointers to the same RefCounted
1790         objects. So they should be marked '[SameObject]' in their IDL files.
1791
1792         * svg/SVGTests.idl:
1793         * svg/SVGViewElement.idl:
1794
1795 2019-04-22  Commit Queue  <commit-queue@webkit.org>
1796
1797         Unreviewed, rolling out r244495.
1798         https://bugs.webkit.org/show_bug.cgi?id=197159
1799
1800         Causing build failures on OpenSource and Internal bots
1801         (Requested by ShawnRoberts on #webkit).
1802
1803         Reverted changeset:
1804
1805         "WHLSLPrepare.cpp always recompiles, even if nothing was
1806         changed"
1807         https://bugs.webkit.org/show_bug.cgi?id=197151
1808         https://trac.webkit.org/changeset/244495
1809
1810 2019-04-22  Carlos Garcia Campos  <cgarcia@igalia.com>
1811
1812         REGRESSION(r241289): [GTK] accessibility/removed-continuation-element-causes-crash.html and accessibility/removed-anonymous-block-child-causes-crash.html crashes
1813         https://bugs.webkit.org/show_bug.cgi?id=194630
1814
1815         Reviewed by Michael Catanzaro.
1816
1817         Do not assume core object always has a wrapper in webkitAccessibleRefChild().
1818
1819         Fixes: accessibility/removed-continuation-element-causes-crash.html
1820                accessibility/removed-anonymous-block-child-causes-crash.html
1821
1822         * accessibility/atk/WebKitAccessible.cpp:
1823         (webkitAccessibleRefChild): Return early if wrapper is nullptr.
1824
1825 2019-04-21  Darin Adler  <darin@apple.com>
1826
1827         WHLSLPrepare.cpp always recompiles, even if nothing was changed
1828         https://bugs.webkit.org/show_bug.cgi?id=197151
1829
1830         Reviewed by Dan Bernstein.
1831
1832         * DerivedSources-input.xcfilelist: Script updated this automatically after
1833         DerivedSources.make was corrected.
1834         * DerivedSources-output.xcfilelist: Ditto, although I had to manually remove
1835         one bogus leftover reference to WHLSLStandardLibrary.cpp.
1836
1837         * DerivedSources.make: Updated the rule that builds WHSLStandardLibrary.h to
1838         no longer refer to nonexistent WHLSLStandardLibrary.cpp. Because the dependency
1839         was on a file that was never created, the rule to regenerate WHSLStandardLibrary.h
1840         was running on every build, instead of only when one of the dependencies changed.
1841
1842 2019-04-20  Said Abou-Hallawa  <said@apple.com>
1843
1844         REGRESSION (r243137): SVGViewElement.viewTarget should not return a new object
1845         https://bugs.webkit.org/show_bug.cgi?id=197137
1846
1847         Reviewed by Darin Adler.
1848
1849         All the DOM objects accessing the viewTarget of the same SVGViewElement 
1850         should hold a Ref pointer to the same SVGStringList property.
1851
1852         Test: svg/dom/SVGViewElement-viewTarget.html
1853
1854         * svg/SVGViewElement.idl:
1855
1856 2019-04-20  Jer Noble  <jer.noble@apple.com>
1857
1858         REGRESSION(r243958): Unnecessary deactivation of AudioSession (PLT Regression)
1859         https://bugs.webkit.org/show_bug.cgi?id=197123
1860         <rdar://problem/49783264>
1861
1862         Reviewed by Per Arne Vollan.
1863
1864         Only set m_becameActive if we actually activated the AudioSession before starting playback. This
1865         avoids unnecessarily deactivating the AudioSession in processWillSuspend().
1866
1867         * platform/audio/PlatformMediaSessionManager.cpp:
1868         (WebCore::PlatformMediaSessionManager::sessionWillBeginPlayback):
1869
1870 2019-04-19  Devin Rousso  <drousso@apple.com>
1871
1872         Web Inspector: Timelines: CPU: ensure that tracking stops when disconnecting Web Inspector
1873         https://bugs.webkit.org/show_bug.cgi?id=197115
1874         <rdar://problem/49877875>
1875
1876         Reviewed by Joseph Pecoraro.
1877
1878         * inspector/agents/InspectorCPUProfilerAgent.cpp:
1879         (WebCore::InspectorCPUProfilerAgent::willDestroyFrontendAndBackend):
1880
1881 2019-04-19  Devin Rousso  <drousso@apple.com>
1882
1883         Web Inspector: REGRESSION: Elements: "Inspect Element" context menu often doesn't select that element
1884         https://bugs.webkit.org/show_bug.cgi?id=197091
1885         <rdar://problem/49953728>
1886
1887         Reviewed by Joseph Pecoraro.
1888
1889         Delay the `inspect` event fron firing with the focued node until the frontend has had a
1890         chance to request the document. Otherwise, requesting the document clears the mapping of
1891         node-to-id, so the focused node's id would no longer be valid.
1892
1893         * inspector/agents/InspectorDOMAgent.cpp:
1894         (WebCore::InspectorDOMAgent::didCreateFrontendAndBackend):
1895         (WebCore::InspectorDOMAgent::willDestroyFrontendAndBackend):
1896         (WebCore::InspectorDOMAgent::getDocument):
1897         (WebCore::InspectorDOMAgent::focusNode):
1898         (WebCore::InspectorDOMAgent::didCommitLoad):
1899
1900 2019-04-19  John Wilander  <wilander@apple.com>
1901
1902         Disable Ad Click Attribution in ephemeral sessions and make sure conversion requests use an ephemeral, stateless session
1903         https://bugs.webkit.org/show_bug.cgi?id=197108
1904         <rdar://problem/49918702>
1905
1906         Reviewed by Alex Christensen.
1907
1908         Tests: http/tests/adClickAttribution/conversion-disabled-in-ephemeral-session.html
1909                http/tests/adClickAttribution/store-disabled-in-ephemeral-session.html
1910
1911         * html/HTMLAnchorElement.cpp:
1912         (WebCore::HTMLAnchorElement::parseAdClickAttribution const):
1913             Early return for ephemeral sessions.
1914         * loader/ResourceLoader.cpp:
1915         (WebCore::ResourceLoader::shouldUseCredentialStorage):
1916             Now returns false for StoredCredentialsPolicy:EphemeralStatelessCookieless.
1917         * platform/network/StoredCredentialsPolicy.h:
1918             Added enum value EphemeralStatelessCookieless.
1919
1920 2019-04-19  Timothy Hatcher  <timothy@apple.com>
1921
1922         Standardize the <meta name="color-scheme"> separator.
1923         https://bugs.webkit.org/show_bug.cgi?id=193931
1924         rdar://problem/49995929
1925
1926         Reviewed by Darin Adler.
1927
1928         Tests: css-dark-mode/color-scheme-meta.html
1929
1930         * dom/Document.cpp:
1931         (WebCore::processColorSchemeString): Use isHTMLSpace insead of isColorSchemeSeparator and isASCIISpace.
1932         (WebCore::isColorSchemeSeparator): Deleted.
1933
1934 2019-04-19  Wenson Hsieh  <wenson_hsieh@apple.com>
1935
1936         [iOS] Add quirks to disable autocorrection and autocapitalization in hidden editable areas on some websites
1937         https://bugs.webkit.org/show_bug.cgi?id=197102
1938         <rdar://problem/49864669>
1939
1940         Reviewed by Ryosuke Niwa.
1941
1942         Add a quirk to disable autocorrection and autocapitalization in hidden editable areas.
1943
1944         * page/Quirks.cpp:
1945         (WebCore::shouldSuppressAutocorrectionAndAutocaptializationInHiddenEditableAreasForHost):
1946         (WebCore::Quirks::shouldSuppressAutocorrectionAndAutocaptializationInHiddenEditableAreas const):
1947         * page/Quirks.h:
1948
1949 2019-04-18  Fujii Hironori  <Hironori.Fujii@sony.com>
1950
1951         Implement KeyedDecoderGeneric and KeyedEncoderGeneric
1952         https://bugs.webkit.org/show_bug.cgi?id=186410
1953
1954         Reviewed by Don Olmstead.
1955
1956         Implemented KeyedDecoderGeneric and KeyedEncoderGeneric by using
1957         WTF::Persistence::Decoder and WTF::Persistence::Encoder.
1958
1959         No new tests. Covered by existing tests.
1960
1961         * PlatformWin.cmake: Added KeyedDecoderGeneric.cpp and
1962         KeyedEncoderGeneric.cpp, and removed KeyedDecoderCF.cpp and
1963         KeyedEncoderCF.cpp for WinCairo port.
1964         * platform/generic/KeyedDecoderGeneric.cpp:
1965         * platform/generic/KeyedDecoderGeneric.h:
1966         * platform/generic/KeyedEncoderGeneric.cpp:
1967         * platform/generic/KeyedEncoderGeneric.h:
1968
1969 2019-04-18  Ross Kirsling  <ross.kirsling@sony.com>
1970
1971         [WinCairo] Non-unified build fails to link Tools
1972         https://bugs.webkit.org/show_bug.cgi?id=196866
1973
1974         Reviewed by Fujii Hironori.
1975
1976         * CMakeLists.txt:
1977         Drive-by fix -- don't disable string pooling when building WebCoreTestSupport.
1978         (This should have been part of r235203.)
1979
1980 2019-04-18  Commit Queue  <commit-queue@webkit.org>
1981
1982         Unreviewed, rolling out r244434.
1983         https://bugs.webkit.org/show_bug.cgi?id=197089
1984
1985         caused 1 API test failure (Requested by zalan on #webkit).
1986
1987         Reverted changeset:
1988
1989         "Regression (r244291): Broken API Test
1990         AutoLayoutRenderingProgressRelativeOrdering"
1991         https://bugs.webkit.org/show_bug.cgi?id=196948
1992         https://trac.webkit.org/changeset/244434
1993
1994 2019-04-18  Don Olmstead  <don.olmstead@sony.com>
1995
1996         [CMake] Make WebCore headers copies
1997         https://bugs.webkit.org/show_bug.cgi?id=182512
1998         <rdar://problem/37510435>
1999
2000         Unreviewed build fix.
2001
2002         Add new header from r244440.
2003
2004         * Headers.cmake:
2005
2006 2019-04-18  Don Olmstead  <don.olmstead@sony.com>
2007
2008         [CMake] Make WebCore headers copies
2009         https://bugs.webkit.org/show_bug.cgi?id=182512
2010         <rdar://problem/37510435>
2011
2012         Reviewed by Alex Christensen.
2013
2014         The header copying is moved to a target WebCorePrivateFrameworkHeaders. This target was
2015         originally Windows only but now this is enabled for all CMake based ports.
2016
2017         Enumerated all headers within WebCore that are used for WebKit(Legacy), tools and
2018         tests. Shared headers are within Headers.cmake while port and platform specific headers
2019         are in their respective CMake files. Listing out all headers is preferred because globbing
2020         will break the build whenever a file is added.
2021
2022         All include directories within the WebCore source tree are now PRIVATE. They were
2023         modified to use WebCore_PRIVATE_INCLUDE_DIRECTORIES. They will not propagate to other targets
2024         which will prevent erroneous includes in targets dependent on WebCore.
2025
2026         * CMakeLists.txt:
2027         * Headers.cmake: Added.
2028         * PlatformAppleWin.cmake:
2029         * PlatformGTK.cmake:
2030         * PlatformMac.cmake:
2031         * PlatformPlayStation.cmake:
2032         * PlatformWPE.cmake:
2033         * PlatformWin.cmake:
2034         * PlatformWinCairo.cmake:
2035         * platform/Cairo.cmake:
2036         * platform/Curl.cmake:
2037         * platform/FreeType.cmake:
2038         * platform/GStreamer.cmake:
2039         * platform/HolePunch.cmake:
2040         * platform/ImageDecoders.cmake:
2041         * platform/Soup.cmake: Added.
2042         * platform/TextureMapper.cmake:
2043
2044 2019-04-18  Justin Fan  <justin_fan@apple.com>
2045
2046         [Web GPU] Implement API default values
2047         https://bugs.webkit.org/show_bug.cgi?id=197032
2048
2049         Reviewed by Myles C. Maxfield.
2050
2051         Add default values and 'required' qualifiers recently merged to the WebGPU API.
2052
2053         WebGPU tests specifying these default values have been updated to rely on them for functionality.
2054
2055         * Modules/webgpu/GPUBindGroupLayoutBinding.idl:
2056         * Modules/webgpu/GPUBindGroupLayoutDescriptor.idl:
2057         * Modules/webgpu/GPUBlendDescriptor.idl:
2058         * Modules/webgpu/GPUBufferDescriptor.idl:
2059         * Modules/webgpu/GPUColor.idl:
2060         * Modules/webgpu/GPUColorStateDescriptor.idl:
2061         * Modules/webgpu/GPUDepthStencilStateDescriptor.idl:
2062         * Modules/webgpu/GPUExtent3D.idl:
2063         * Modules/webgpu/GPUInputStateDescriptor.idl:
2064         * Modules/webgpu/GPUOrigin3D.h:
2065         * Modules/webgpu/GPUOrigin3D.idl:
2066         * Modules/webgpu/GPURequestAdapterOptions.idl:
2067         * Modules/webgpu/GPUTextureDescriptor.idl:
2068         * Modules/webgpu/GPUVertexAttributeDescriptor.idl:
2069         * Modules/webgpu/GPUVertexInputDescriptor.idl:
2070         * Modules/webgpu/WebGPUBindGroupBinding.idl:
2071         * Modules/webgpu/WebGPUBindGroupDescriptor.idl:
2072         * Modules/webgpu/WebGPUBufferBinding.h:
2073         * Modules/webgpu/WebGPUBufferBinding.idl:
2074         * Modules/webgpu/WebGPUCommandEncoder.idl:
2075         * Modules/webgpu/WebGPUPipelineDescriptorBase.idl:
2076         * Modules/webgpu/WebGPUPipelineLayoutDescriptor.idl:
2077         * Modules/webgpu/WebGPUPipelineStageDescriptor.idl:
2078         * Modules/webgpu/WebGPURenderPassDescriptor.idl:
2079         * Modules/webgpu/WebGPURenderPipelineDescriptor.cpp:
2080         (WebCore::WebGPURenderPipelineDescriptor::tryCreateGPURenderPipelineDescriptor const):
2081         * Modules/webgpu/WebGPURenderPipelineDescriptor.h:
2082         * Modules/webgpu/WebGPURenderPipelineDescriptor.idl:
2083         * Modules/webgpu/WebGPUShaderModuleDescriptor.idl:
2084         * platform/graphics/gpu/GPUBlendDescriptor.h:
2085         * platform/graphics/gpu/GPUColorStateDescriptor.h:
2086         * platform/graphics/gpu/GPUCommandBuffer.h:
2087         * platform/graphics/gpu/GPUDepthStencilStateDescriptor.h:
2088         * platform/graphics/gpu/GPURenderPassDescriptor.h:
2089         * platform/graphics/gpu/GPURenderPipelineDescriptor.h:
2090         (WebCore::GPURenderPipelineDescriptor::GPURenderPipelineDescriptor):
2091         * platform/graphics/gpu/GPURequestAdapterOptions.h:
2092         * platform/graphics/gpu/GPUTextureDescriptor.h:
2093         * platform/graphics/gpu/GPUVertexAttributeDescriptor.h:
2094         * platform/graphics/gpu/GPUVertexInputDescriptor.h:
2095         * platform/graphics/gpu/cocoa/GPURenderPipelineMetal.mm:
2096         (WebCore::convertRenderPipelineDescriptor):
2097         (WebCore::trySetFunctionsForPipelineDescriptor):
2098
2099 2019-04-18  Jer Noble  <jer.noble@apple.com>
2100
2101         Refactoring: Pull all fullscreen code out of Document and into its own helper class
2102         https://bugs.webkit.org/show_bug.cgi?id=197017
2103
2104         Reviewed by Eric Carlson.
2105
2106         * CMakeLists.txt:
2107         * DerivedSources-input.xcfilelist:
2108         * DerivedSources-output.xcfilelist:
2109         * DerivedSources.make:
2110         * Sources.txt:
2111         * WebCore.xcodeproj/project.pbxproj:
2112         * css/CSSDefaultStyleSheets.cpp:
2113         (WebCore::CSSDefaultStyleSheets::ensureDefaultStyleSheetsForElement):
2114         * css/SelectorCheckerTestFunctions.h:
2115         (WebCore::matchesFullScreenPseudoClass):
2116         (WebCore::matchesFullScreenAnimatingFullScreenTransitionPseudoClass):
2117         (WebCore::matchesFullScreenDocumentPseudoClass):
2118         (WebCore::matchesFullScreenControlsHiddenPseudoClass):
2119         * dom/Document.cpp:
2120         (WebCore::Document::removedLastRef):
2121         (WebCore::Document::prepareForDestruction):
2122         (WebCore::Document::nodeChildrenWillBeRemoved):
2123         (WebCore::Document::nodeWillBeRemoved):
2124         (WebCore::isAttributeOnAllOwners): Deleted.
2125         (WebCore::Document::fullScreenIsAllowedForElement const): Deleted.
2126         (WebCore::Document::requestFullScreenForElement): Deleted.
2127         (WebCore::Document::webkitCancelFullScreen): Deleted.
2128         (WebCore::Document::webkitExitFullscreen): Deleted.
2129         (WebCore::Document::webkitFullscreenEnabled const): Deleted.
2130         (WebCore::unwrapFullScreenRenderer): Deleted.
2131         (WebCore::Document::webkitWillEnterFullScreen): Deleted.
2132         (WebCore::Document::webkitDidEnterFullScreen): Deleted.
2133         (WebCore::Document::webkitWillExitFullScreen): Deleted.
2134         (WebCore::Document::webkitDidExitFullScreen): Deleted.
2135         (WebCore::Document::setFullScreenRenderer): Deleted.
2136         (WebCore::Document::dispatchFullScreenChangeEvents): Deleted.
2137         (WebCore::Document::dispatchFullScreenChangeOrErrorEvent): Deleted.
2138         (WebCore::Document::fullScreenElementRemoved): Deleted.
2139         (WebCore::Document::adjustFullScreenElementOnNodeRemoval): Deleted.
2140         (WebCore::Document::isAnimatingFullScreen const): Deleted.
2141         (WebCore::Document::setAnimatingFullScreen): Deleted.
2142         (WebCore::Document::areFullscreenControlsHidden const): Deleted.
2143         (WebCore::Document::setFullscreenControlsHidden): Deleted.
2144         (WebCore::Document::clearFullscreenElementStack): Deleted.
2145         (WebCore::Document::popFullscreenElementStack): Deleted.
2146         (WebCore::Document::pushFullscreenElementStack): Deleted.
2147         (WebCore::Document::addDocumentToFullScreenChangeEventQueue): Deleted.
2148         * dom/Document.h:
2149         (WebCore::Document::fullscreenManager):
2150         (WebCore::Document::webkitIsFullScreen const): Deleted.
2151         (WebCore::Document::webkitFullScreenKeyboardInputAllowed const): Deleted.
2152         (WebCore::Document::webkitCurrentFullScreenElement const): Deleted.
2153         (WebCore::Document::webkitCurrentFullScreenElementForBindings const): Deleted.
2154         (WebCore::Document::fullScreenRenderer const): Deleted.
2155         (WebCore::Document::webkitFullscreenElement const): Deleted.
2156         (WebCore::Document::webkitFullscreenElementForBindings const): Deleted.
2157         * dom/Document.idl:
2158         * dom/DocumentFullscreen.h:
2159         (WebCore::DocumentFullscreen::webkitFullscreenEnabled):
2160         (WebCore::DocumentFullscreen::webkitFullscreenElement):
2161         (WebCore::DocumentFullscreen::webkitExitFullscreen):
2162         (WebCore::DocumentFullscreen::webkitIsFullScreen):
2163         (WebCore::DocumentFullscreen::webkitFullScreenKeyboardInputAllowed):
2164         (WebCore::DocumentFullscreen::webkitCurrentFullScreenElement):
2165         (WebCore::DocumentFullscreen::webkitCancelFullScreen):
2166         * dom/DocumentFullscreen.idl:
2167         * dom/Element.cpp:
2168         (WebCore::Element::webkitRequestFullscreen):
2169         * dom/EventPath.cpp:
2170         (WebCore::shouldEventCrossShadowBoundary):
2171         * dom/FullscreenManager.cpp: Added.
2172         (WebCore::isAttributeOnAllOwners):
2173         (WebCore::FullscreenManager::FullscreenManager):
2174         (WebCore::FullscreenManager::fullscreenIsAllowedForElement const):
2175         (WebCore::FullscreenManager::requestFullscreenForElement):
2176         (WebCore::FullscreenManager::cancelFullscreen):
2177         (WebCore::FullscreenManager::requestExitFullscreen):
2178         (WebCore::FullscreenManager::exitFullscreen):
2179         (WebCore::FullscreenManager::isFullscreenEnabled const):
2180         (WebCore::unwrapFullscreenRenderer):
2181         (WebCore::FullscreenManager::willEnterFullscreen):
2182         (WebCore::FullscreenManager::didEnterFullscreen):
2183         (WebCore::FullscreenManager::willExitFullscreen):
2184         (WebCore::FullscreenManager::didExitFullscreen):
2185         (WebCore::FullscreenManager::setFullscreenRenderer):
2186         (WebCore::FullscreenManager::dispatchFullscreenChangeEvents):
2187         (WebCore::FullscreenManager::dispatchFullscreenChangeOrErrorEvent):
2188         (WebCore::FullscreenManager::fullscreenElementRemoved):
2189         (WebCore::FullscreenManager::adjustFullscreenElementOnNodeRemoval):
2190         (WebCore::FullscreenManager::isAnimatingFullscreen const):
2191         (WebCore::FullscreenManager::setAnimatingFullscreen):
2192         (WebCore::FullscreenManager::areFullscreenControlsHidden const):
2193         (WebCore::FullscreenManager::setFullscreenControlsHidden):
2194         (WebCore::FullscreenManager::clear):
2195         (WebCore::FullscreenManager::emptyEventQueue):
2196         (WebCore::FullscreenManager::clearFullscreenElementStack):
2197         (WebCore::FullscreenManager::popFullscreenElementStack):
2198         (WebCore::FullscreenManager::pushFullscreenElementStack):
2199         (WebCore::FullscreenManager::addDocumentToFullscreenChangeEventQueue):
2200         * dom/FullscreenManager.h: Added.
2201         (WebCore::FullscreenManager::document):
2202         (WebCore::FullscreenManager::document const):
2203         (WebCore::FullscreenManager::topDocument const):
2204         (WebCore::FullscreenManager::page const):
2205         (WebCore::FullscreenManager::frame const):
2206         (WebCore::FullscreenManager::documentElement const):
2207         (WebCore::FullscreenManager::hasLivingRenderTree const):
2208         (WebCore::FullscreenManager::pageCacheState const):
2209         (WebCore::FullscreenManager::scheduleFullStyleRebuild):
2210         (WebCore::FullscreenManager::fullscreenElement const):
2211         (WebCore::FullscreenManager::isFullscreen const):
2212         (WebCore::FullscreenManager::isFullscreenKeyboardInputAllowed const):
2213         (WebCore::FullscreenManager::currentFullscreenElement const):
2214         (WebCore::FullscreenManager::fullscreenRenderer const):
2215         * html/HTMLMediaElement.cpp:
2216         (WebCore::HTMLMediaElement::isFullscreen const):
2217         (WebCore::HTMLMediaElement::isStandardFullscreen const):
2218         (WebCore::HTMLMediaElement::enterFullscreen):
2219         (WebCore::HTMLMediaElement::exitFullscreen):
2220         * html/MediaElementSession.cpp:
2221         (WebCore::MediaElementSession::canShowControlsManager const):
2222         * html/shadow/MediaControlElements.cpp:
2223         (WebCore::MediaControlFullscreenButtonElement::defaultEventHandler):
2224         * inspector/agents/InspectorDOMAgent.cpp:
2225         * page/EventHandler.cpp:
2226         (WebCore::EventHandler::isKeyEventAllowedInFullScreen const):
2227         (WebCore::EventHandler::internalKeyEvent):
2228         * page/Page.cpp:
2229         (WebCore::Page::setFullscreenControlsHidden):
2230         * rendering/RenderFullScreen.cpp:
2231         (WebCore::RenderFullScreen::wrapNewRenderer):
2232         (WebCore::RenderFullScreen::wrapExistingRenderer):
2233         * rendering/RenderLayerCompositor.cpp:
2234         (WebCore::isDescendantOfFullScreenLayer):
2235         * rendering/updating/RenderTreeBuilder.h:
2236         * rendering/updating/RenderTreeBuilderInline.cpp:
2237         (WebCore::RenderTreeBuilder::Inline::splitInlines):
2238         * rendering/updating/RenderTreeUpdater.cpp:
2239         (WebCore::RenderTreeUpdater::createRenderer):
2240         * style/StyleSharingResolver.cpp:
2241         (WebCore::Style::SharingResolver::canShareStyleWithElement const):
2242         * testing/Internals.cpp:
2243         (WebCore::Internals::webkitWillEnterFullScreenForElement):
2244         (WebCore::Internals::webkitDidEnterFullScreenForElement):
2245         (WebCore::Internals::webkitWillExitFullScreenForElement):
2246         (WebCore::Internals::webkitDidExitFullScreenForElement):
2247         (WebCore::Internals::isAnimatingFullScreen const):
2248
2249 2019-04-18  Jer Noble  <jer.noble@apple.com>
2250
2251         Add support for parsing FairPlayStreaming PSSH boxes.
2252         https://bugs.webkit.org/show_bug.cgi?id=197064
2253
2254         Reviewed by Eric Carlson.
2255
2256         API Tests: ISO.ISOFairPlayStreamingPsshBox
2257
2258         Add a new set of ISOBox classes for parsing the contents of a FairPlayStreaming PSSH box,
2259         and add support for this new box to CDMFairPlayStreaming.
2260
2261         Drive-by fix: add an explicit include for MainThread.h to LibWebRTCProviderCocoa.cpp.
2262
2263         * SourcesCocoa.txt:
2264         * WebCore.xcodeproj/project.pbxproj:
2265         * platform/graphics/FourCC.h:
2266         * platform/graphics/avfoundation/CDMFairPlayStreaming.cpp:
2267         (WebCore::CDMPrivateFairPlayStreaming::cencName):
2268         (WebCore::fairPlaySystemID):
2269         (WebCore::extractSchemeAndKeyIdFromCenc):
2270         (WebCore::CDMPrivateFairPlayStreaming::extractKeyIDsCenc):
2271         (WebCore::CDMPrivateFairPlayStreaming::sanitizeCenc):
2272         (WebCore::validInitDataTypes):
2273         (WebCore::CDMFactory::platformRegisterFactories):
2274         * platform/graphics/avfoundation/CDMFairPlayStreaming.h:
2275         * platform/graphics/avfoundation/ISOFairPlayStreamingPsshBox.cpp: Added.
2276         (WebCore::ISOFairPlayStreamingPsshBox::fairPlaySystemID):
2277         (WebCore::ISOFairPlayStreamingInfoBox::parse):
2278         (WebCore::ISOFairPlayStreamingKeyRequestInfoBox::parse):
2279         (WebCore::ISOFairPlayStreamingKeyAssetIdBox::parse):
2280         (WebCore::ISOFairPlayStreamingKeyContextBox::parse):
2281         (WebCore::ISOFairPlayStreamingKeyVersionListBox::parse):
2282         (WebCore::ISOFairPlayStreamingKeyRequestBox::parse):
2283         (WebCore::ISOFairPlayStreamingInitDataBox::parse):
2284         (WebCore::ISOFairPlayStreamingPsshBox::parse):
2285         * platform/graphics/avfoundation/ISOFairPlayStreamingPsshBox.h: Added.
2286         * platform/mediastream/libwebrtc/LibWebRTCProviderCocoa.cpp:
2287
2288 2019-04-18  Sihui Liu  <sihui_liu@apple.com>
2289
2290         Blob type cannot be stored correctly in IDB when IDBObjectStore has autoIncrement and keyPath options
2291         https://bugs.webkit.org/show_bug.cgi?id=196128
2292         <rdar://problem/49562115>
2293
2294         Reviewed by Geoffrey Garen.
2295
2296         If a key is auto-generated, it should become a property of the value object. Network process would perform the 
2297         key injection by deserializing IDBValue into script value, setting the property, serializing the result and 
2298         storing it in a database record. But network process does not have a JSDOMGlobalObject, so it would fail to 
2299         deserialize types including Blob and File.
2300
2301         To solve this issue, we move the key injection to web process and let network process store the original value 
2302         it gets. In this case, when web process asks for some value, network process should return key, value and key 
2303         path so that web process can decide whether it should perform a key injection before returning the result. Note
2304         that the auto-generated key would always be stored as the key in a ObjectStore record.
2305
2306         Test: storage/indexeddb/modern/objectstore-autoincrement-types.html
2307
2308         * Modules/indexeddb/IDBCursor.cpp:
2309         (WebCore::IDBCursor::setGetResult):
2310         * Modules/indexeddb/IDBCursor.h:
2311         (WebCore::IDBCursor::primaryKeyPath):
2312         * Modules/indexeddb/IDBGetAllResult.cpp:
2313         (WebCore::IDBGetAllResult::isolatedCopy):
2314         (WebCore::IDBGetAllResult::addKey):
2315         (WebCore::IDBGetAllResult::addValue):
2316         (WebCore::IDBGetAllResult::keys const):
2317         (WebCore::IDBGetAllResult::values const):
2318         (WebCore::IDBGetAllResult::allBlobFilePaths const):
2319         (WebCore::isolatedCopyOfVariant): Deleted.
2320
2321         * Modules/indexeddb/IDBGetAllResult.h: Introduce an IDBKeyPath parameter. Also replace Variant with two Vectors,
2322         because we only needed to store either key or value before, and now the stored value could be incomplete.
2323         (WebCore::IDBGetAllResult::IDBGetAllResult):
2324         (WebCore::IDBGetAllResult::keyPath const):
2325         (WebCore::IDBGetAllResult::encode const):
2326         (WebCore::IDBGetAllResult::decode):
2327
2328         * Modules/indexeddb/IDBGetResult.cpp:
2329         (WebCore::IDBGetResult::setValue):
2330         * Modules/indexeddb/IDBGetResult.h:
2331         (WebCore::IDBGetResult::IDBGetResult):
2332         (WebCore::IDBGetResult::keyPath const):
2333         * Modules/indexeddb/IDBRequest.cpp:
2334         (WebCore::IDBRequest::setResult):
2335         (WebCore::IDBRequest::setResultToStructuredClone):
2336         * Modules/indexeddb/IDBRequest.h:
2337         * Modules/indexeddb/IDBTransaction.cpp:
2338         (WebCore::IDBTransaction::didGetAllRecordsOnServer):
2339         (WebCore::IDBTransaction::didGetRecordOnServer):
2340         * Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
2341         (WebCore::IDBServer::MemoryIDBBackingStore::getRecord):
2342         * Modules/indexeddb/server/MemoryIndex.cpp:
2343         (WebCore::IDBServer::MemoryIndex::getResultForKeyRange const):
2344         (WebCore::IDBServer::MemoryIndex::getAllRecords const):
2345         * Modules/indexeddb/server/MemoryIndexCursor.cpp:
2346         (WebCore::IDBServer::MemoryIndexCursor::currentData):
2347         * Modules/indexeddb/server/MemoryObjectStore.cpp:
2348         (WebCore::IDBServer::MemoryObjectStore::updateIndexesForPutRecord):
2349         (WebCore::IDBServer::MemoryObjectStore::populateIndexWithExistingRecords):
2350         (WebCore::IDBServer::MemoryObjectStore::getAllRecords const):
2351         * Modules/indexeddb/server/MemoryObjectStoreCursor.cpp:
2352         (WebCore::IDBServer::MemoryObjectStoreCursor::currentData):
2353         * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
2354         (WebCore::IDBServer::SQLiteIDBBackingStore::updateOneIndexForAddRecord):
2355         (WebCore::IDBServer::SQLiteIDBBackingStore::updateAllIndexesForAddRecord):
2356         (WebCore::IDBServer::SQLiteIDBBackingStore::getRecord):
2357         (WebCore::IDBServer::SQLiteIDBBackingStore::cachedStatementForGetAllObjectStoreRecords):
2358         (WebCore::IDBServer::SQLiteIDBBackingStore::getAllObjectStoreRecords):
2359         (WebCore::IDBServer::SQLiteIDBBackingStore::getAllIndexRecords):
2360         (WebCore::IDBServer::SQLiteIDBBackingStore::getIndexRecord):
2361         (WebCore::IDBServer::SQLiteIDBBackingStore::uncheckedGetIndexRecordForOneKey):
2362         (WebCore::IDBServer::SQLiteIDBBackingStore::openCursor):
2363         (WebCore::IDBServer::SQLiteIDBBackingStore::iterateCursor):
2364         * Modules/indexeddb/server/SQLiteIDBCursor.cpp:
2365         (WebCore::IDBServer::SQLiteIDBCursor::currentData):
2366         * Modules/indexeddb/server/SQLiteIDBCursor.h:
2367         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
2368
2369         (WebCore::IDBServer::UniqueIDBDatabase::performPutOrAdd): Remove the key injection from network process. 
2370         UniqueIDBDatabase stores any value it gets from IDBClient.
2371
2372         * Modules/indexeddb/shared/IDBResultData.cpp:
2373         (WebCore::IDBResultData::getResultRef):
2374         * Modules/indexeddb/shared/IDBResultData.h:
2375
2376         * bindings/js/IDBBindingUtilities.cpp:
2377         (WebCore::injectIDBKeyIntoScriptValue): If property is read-only, set would fail and injectKeyIntoResult would
2378         return null, but we expect it to return result as long as the property value is the same as target. Therefore, 
2379         we can add an early return here.
2380
2381         (WebCore::createKeyPathArray):
2382         (WebCore::generateIndexKeyForValue): We used to generate IndexKey from value stored in database but now the
2383         value gets stored does not include auto-generated key, as we remove the key injection from network process. In 
2384         this case if the IDBIndex has the same key path as the auto-generated key, IndexKey would be failed to create
2385         for it cannot extract auto-generated key from value. Since the auto-generated key would always be the key in 
2386         database record, we could use value of that key when we find a match in key path.
2387
2388         (WebCore::deserializeIDBValueWithKeyInjection): If the key path in the result is single entry, the key is 
2389         probably auto-generated, so we could inject the result key into the result value unconditionally.
2390
2391         * bindings/js/IDBBindingUtilities.h:
2392         * bindings/js/JSIDBCursorWithValueCustom.cpp:
2393         (WebCore::JSIDBCursorWithValue::value const):
2394         * bindings/js/JSIDBRequestCustom.cpp:
2395         (WebCore::JSIDBRequest::result const):
2396
2397 2019-04-18  Zalan Bujtas  <zalan@apple.com>
2398
2399         Regression (r244291): Broken API Test AutoLayoutRenderingProgressRelativeOrdering
2400         https://bugs.webkit.org/show_bug.cgi?id=196948
2401         <rdar://problem/49927131>
2402
2403         Reviewed by Tim Horton.
2404
2405         * page/FrameView.cpp:
2406         (WebCore::FrameView::setContentsSize):
2407         (WebCore::FrameView::autoSizeIfEnabled):
2408         * page/FrameView.h:
2409
2410 2019-04-18  Shawn Roberts  <sroberts@apple.com>
2411
2412         Unreviewed manual rollout of r244248 and r244409
2413         Causing assertion failures on Mac WK2 Debug builds
2414         https://bugs.webkit.org/show_bug.cgi?id=195623
2415
2416         * loader/LinkLoader.cpp:
2417         (WebCore::LinkLoader::prefetchIfNeeded):
2418         * loader/ResourceLoadInfo.cpp:
2419         (WebCore::toResourceType):
2420         * loader/ResourceLoadInfo.h:
2421         * loader/ResourceLoader.cpp:
2422         (WebCore::ResourceLoader::willSendRequestInternal):
2423         * loader/cache/CachedResourceLoader.cpp:
2424         (WebCore::CachedResourceLoader::requestResource):
2425
2426 2019-04-18  Antti Koivisto  <antti@apple.com>
2427
2428         Tile update problems in iframe after scrolling page too soon after load
2429         https://bugs.webkit.org/show_bug.cgi?id=197057
2430         <rdar://problem/49913663>
2431
2432         Reviewed by Simon Fraser.
2433
2434         We end up destroying FrameHosting scrolling node when we shouldn't.
2435
2436         No test, despite attempts I couldn't get this state to stick. The problem is that in
2437         most cases the destroying scrolling node gets immediately recreated and connected again.
2438         Getting into testably buggy state requires some very specific layer tree configuration update.
2439
2440         * rendering/RenderLayerBacking.cpp:
2441         (WebCore::RenderLayerBacking::detachFromScrollingCoordinator):
2442
2443         Test the right thing.
2444
2445 2019-04-18  Antoine Quint  <graouts@apple.com>
2446
2447         [Pointer Events WPT] Unskip imported/w3c/web-platform-tests/pointerevents/pointerevent_lostpointercapture_for_disconnected_node.html
2448         https://bugs.webkit.org/show_bug.cgi?id=197004
2449
2450         Reviewed by Antti Koivisto.
2451
2452         We need to release pointer capture when an element that has pointer capture is disconnected from the DOM.
2453
2454         * dom/Element.cpp:
2455         (WebCore::Element::removedFromAncestor): Notify the PointerCaptureController that an element was disconnected.
2456         * dom/PointerEvent.cpp:
2457         (WebCore::PointerEvent::create): Broaden createPointerCancelEvent() to take in an event type so that we may use it to create a
2458         lostpointercapture event as well.
2459         (WebCore::PointerEvent::createPointerCancelEvent): Deleted.
2460         * dom/PointerEvent.h:
2461         * page/PointerCaptureController.cpp:
2462         (WebCore::PointerCaptureController::elementWasRemoved): Check whether the provided element matches one of the target overrides recorded
2463         in the map of captured pointer IDs.
2464         (WebCore::PointerCaptureController::pointerEventWasDispatched): This block of code was actually useless in this location, the new code
2465         added in elementWasRemoved() performs the actions that the spec text mandates.
2466         (WebCore::PointerCaptureController::cancelPointer): Replace the call to createPointerCancelEvent() with one to create().
2467         * page/PointerCaptureController.h:
2468
2469 2019-04-17  Antoine Quint  <graouts@apple.com>
2470
2471         [Pointer Events WPT] Unskip imported/w3c/web-platform-tests/pointerevents/pointerevent_on_event_handlers.html
2472         https://bugs.webkit.org/show_bug.cgi?id=197006
2473
2474         Reviewed by Antti Koivisto.
2475
2476         Add support for on* HTML attributes and JS properties for pointer events.
2477
2478         * dom/GlobalEventHandlers.idl:
2479         * html/HTMLAttributeNames.in:
2480         * html/HTMLElement.cpp:
2481         (WebCore::HTMLElement::createEventHandlerNameMap):
2482
2483 2019-04-17  Timothy Hatcher  <timothy@apple.com>
2484
2485         Standardize the `<meta name="color-scheme">` separator.
2486         https://bugs.webkit.org/show_bug.cgi?id=193931
2487
2488         Reviewed by Simon Fraser.
2489
2490         Drop support for comma as a valid seperator in <meta name="color-scheme"> to
2491         match the proposal being tracked by: https://github.com/whatwg/html/issues/4504
2492
2493         Tests: css-dark-mode/color-scheme-meta.html
2494                css-dark-mode/older-syntax/supported-color-schemes-meta.html
2495
2496         * dom/Document.cpp:
2497         (WebCore::isColorSchemeSeparator): Drop support for comma.
2498
2499 2019-04-17  Timothy Hatcher  <timothy@apple.com>
2500
2501         Rename `supported-color-schemes` to `color-scheme`.
2502         https://bugs.webkit.org/show_bug.cgi?id=197016
2503         rdar://problem/49980259
2504
2505         Reviewed by Simon Fraser.
2506
2507         Changed `supported-color-schemes` to `color-scheme` to follow the spec changes
2508         being tracked by: https://github.com/w3c/csswg-drafts/issues/3807
2509
2510         The old `supported-color-schemes` is now an alias of `color-scheme` for compatibility.
2511
2512         Tests: css-dark-mode/color-scheme-css-parse.html
2513                css-dark-mode/color-scheme-css.html
2514                css-dark-mode/color-scheme-meta.html
2515                css-dark-mode/color-scheme-priority.html
2516                css-dark-mode/color-scheme-scrollbar.html
2517                css-dark-mode/older-syntax/supported-color-schemes-css.html
2518                css-dark-mode/older-syntax/supported-color-schemes-meta.html
2519                css-dark-mode/older-systems/color-scheme-css.html
2520                css-dark-mode/older-systems/color-scheme-meta.html
2521
2522         * WebCore.xcodeproj/project.pbxproj:
2523         * css/CSSComputedStyleDeclaration.cpp:
2524         (WebCore::ComputedStyleExtractor::valueForPropertyinStyle):
2525         * css/CSSProperties.json:
2526         * css/CSSValueKeywords.in:
2527         * css/StyleBuilderConverter.h:
2528         (WebCore::StyleBuilderConverter::updateColorScheme):
2529         (WebCore::StyleBuilderConverter::convertColorScheme):
2530         (WebCore::StyleBuilderConverter::updateSupportedColorSchemes): Deleted.
2531         (WebCore::StyleBuilderConverter::convertSupportedColorSchemes): Deleted.
2532         * css/StyleBuilderCustom.h:
2533         (WebCore::StyleBuilderCustom::applyValueColorScheme):
2534         (WebCore::StyleBuilderCustom::applyValueSupportedColorSchemes): Deleted.
2535         * css/StyleResolver.cpp:
2536         (WebCore::StyleResolver::applyMatchedProperties):
2537         * css/parser/CSSPropertyParser.cpp:
2538         (WebCore::consumeColorScheme):
2539         (WebCore::CSSPropertyParser::parseSingleValue):
2540         (WebCore::consumeSupportedColorSchemes): Deleted.
2541         * dom/Document.cpp:
2542         (WebCore::processColorSchemeString):
2543         (WebCore::Document::processColorScheme):
2544         (WebCore::Document::useDarkAppearance const):
2545         (WebCore::processColorSchemes): Deleted.
2546         (WebCore::Document::processSupportedColorSchemes): Deleted.
2547         * dom/Document.h:
2548         * html/HTMLMetaElement.cpp:
2549         (WebCore::HTMLMetaElement::process):
2550         * page/FrameView.cpp:
2551         (WebCore::FrameView::rendererForColorScheme const):
2552         (WebCore::FrameView::useDarkAppearance const):
2553         (WebCore::FrameView::styleColorOptions const):
2554         (WebCore::FrameView::rendererForSupportedColorSchemes const): Deleted.
2555         * page/FrameView.h:
2556         * rendering/style/RenderStyle.cpp:
2557         (WebCore::rareInheritedDataChangeRequiresRepaint):
2558         * rendering/style/RenderStyle.h:
2559         (WebCore::RenderStyle::colorScheme const):
2560         (WebCore::RenderStyle::setHasExplicitlySetColorScheme):
2561         (WebCore::RenderStyle::hasExplicitlySetColorScheme const):
2562         (WebCore::RenderStyle::setColorScheme):
2563         (WebCore::RenderStyle::initialColorScheme):
2564         (WebCore::RenderStyle::NonInheritedFlags::operator== const):
2565         (WebCore::RenderStyle::supportedColorSchemes const): Deleted.
2566         (WebCore::RenderStyle::setHasExplicitlySetSupportedColorSchemes): Deleted.
2567         (WebCore::RenderStyle::hasExplicitlySetSupportedColorSchemes const): Deleted.
2568         (WebCore::RenderStyle::setSupportedColorSchemes): Deleted.
2569         (WebCore::RenderStyle::initialSupportedColorSchemes): Deleted.
2570         * rendering/style/RenderStyleConstants.h:
2571         * rendering/style/StyleColorScheme.h: Renamed from Source/WebCore/rendering/style/StyleSupportedColorSchemes.h.
2572         (WebCore::StyleColorScheme::StyleColorScheme):
2573         (WebCore::StyleColorScheme::operator== const):
2574         (WebCore::StyleColorScheme::operator!= const):
2575         (WebCore::StyleColorScheme::isAuto const):
2576         (WebCore::StyleColorScheme::isOnly const):
2577         (WebCore::StyleColorScheme::colorScheme const):
2578         (WebCore::StyleColorScheme::add):
2579         (WebCore::StyleColorScheme::contains const):
2580         (WebCore::StyleColorScheme::setAllowsTransformations):
2581         (WebCore::StyleColorScheme::allowsTransformations const):
2582         * rendering/style/StyleRareInheritedData.cpp:
2583         (WebCore::StyleRareInheritedData::StyleRareInheritedData):
2584         (WebCore::StyleRareInheritedData::operator== const):
2585         * rendering/style/StyleRareInheritedData.h:
2586
2587 2019-04-17  Justin Fan  <justin_fan@apple.com>
2588
2589         [Web GPU] GPUComputePassEncoder::dispatch number of thread groups, not grid size
2590         https://bugs.webkit.org/show_bug.cgi?id=196984
2591
2592         Reviewed by Myles C. Maxfield.
2593
2594         Test: Updated compute-squares.html.
2595
2596         * platform/graphics/gpu/cocoa/GPUComputePassEncoderMetal.mm:
2597         (WebCore::GPUComputePassEncoder::dispatch):
2598
2599 2019-04-17  Andy Estes  <aestes@apple.com>
2600
2601         [iOS] Support multiple file selection in UIDocumentPickerViewController
2602         https://bugs.webkit.org/show_bug.cgi?id=197014
2603         <rdar://problem/49963514>
2604
2605         Reviewed by Tim Horton.
2606
2607         * platform/LocalizedStrings.h:
2608         Exported multipleFileUploadText().
2609
2610 2019-04-17  John Wilander  <wilander@apple.com>
2611
2612         Add prioritization of ad click conversions and cleaning of sent ad click conversions
2613         https://bugs.webkit.org/show_bug.cgi?id=196934
2614         <rdar://problem/49917773>
2615
2616         Reviewed by Chris Dumez.
2617
2618         Tests: http/tests/adClickAttribution/second-attribution-converted-with-higher-priority.html
2619                http/tests/adClickAttribution/second-attribution-converted-with-lower-priority.html
2620                http/tests/adClickAttribution/second-conversion-with-higher-priority.html
2621                http/tests/adClickAttribution/second-conversion-with-lower-priority.html
2622
2623         * loader/AdClickAttribution.cpp:
2624         (WebCore::AdClickAttribution::hasHigherPriorityThan const):
2625             Added to facilitate priority comparison between two attributions.
2626         * loader/AdClickAttribution.h:
2627         (WebCore::AdClickAttribution::Destination::Destination):
2628             Added a WTF::HashTableDeletedValueType constructor and changed the copy constructor to
2629             a move constructor.
2630         (WebCore::AdClickAttribution::isEmpty const):
2631
2632 2019-04-17  Devin Rousso  <drousso@apple.com>
2633
2634         AX: AccessibilityObject::parentObject() doesn't need to be pure virtual
2635         https://bugs.webkit.org/show_bug.cgi?id=197026
2636         <rdar://problem/49448209>
2637
2638         Reviewed by Timothy Hatcher.
2639
2640         * accessibility/AccessibilityObject.h:
2641         (WebCore::AccessibilityObject::parentObject const):
2642
2643 2019-04-17  Zalan Bujtas  <zalan@apple.com>
2644
2645         [ContentChangeObserver] Use aria role as a hint whether a tap should result in a synthetic click
2646         https://bugs.webkit.org/show_bug.cgi?id=196988
2647         <rdar://problem/49955328>
2648
2649         Reviewed by Simon Fraser.
2650
2651         Test: fast/events/touch/ios/content-observation/tap-on-input-looking-div-with-role.html
2652
2653         * accessibility/AccessibilityObject.h:
2654
2655 2019-04-17  Alex Christensen  <achristensen@webkit.org>
2656
2657         WebSocketHandshake should not know about a Document
2658         https://bugs.webkit.org/show_bug.cgi?id=196468
2659
2660         Reviewed by Tim Horton.
2661
2662         I'll need to move WebSocketHandshake to the NetworkProcess for rdar://problem/46287028
2663         It currently uses the Document pointer for 3 things:
2664         1. To get the user agent, which we can pass in as a creation parameter.
2665         2. To get the origin, which we can also pass in as a creation parameter.
2666         3. To get cookies for the web inspector.  We can pass in a functor instead and have the inspector provide cookies itself.
2667
2668         * Modules/websockets/WebSocketChannel.cpp:
2669         (WebCore::WebSocketChannel::connect):
2670         (WebCore::WebSocketChannel::disconnect):
2671         (WebCore::WebSocketChannel::didOpenSocketStream):
2672         (WebCore::WebSocketChannel::clientHandshakeRequest):
2673         * Modules/websockets/WebSocketChannel.h:
2674         (WebCore::WebSocketChannel::document):
2675         * Modules/websockets/WebSocketHandshake.cpp:
2676         (WebCore::WebSocketHandshake::WebSocketHandshake):
2677         (WebCore::WebSocketHandshake::clientHandshakeMessage const):
2678         (WebCore::WebSocketHandshake::clientHandshakeRequest const):
2679         (WebCore::WebSocketHandshake::clientOrigin const): Deleted.
2680         (WebCore::WebSocketHandshake::clientHandshakeCookieRequestHeaderFieldProxy const): Deleted.
2681         (WebCore::WebSocketHandshake::clearDocument): Deleted.
2682         * Modules/websockets/WebSocketHandshake.h:
2683         * inspector/agents/InspectorNetworkAgent.cpp:
2684         (WebCore::InspectorNetworkAgent::enable):
2685
2686 2019-04-17  Timothy Hatcher  <timothy@apple.com>
2687
2688         Unreviewed build fix for iOSMac after r244223.
2689
2690         * platform/audio/ios/AudioSessionIOS.mm:
2691         (WebCore::AudioSession::routeSharingPolicy const): Add ALLOW_DEPRECATED_DECLARATIONS_BEGIN/END
2692         around AVAudioSessionRouteSharingPolicyLongForm use.
2693
2694 2019-04-17  Chris Dumez  <cdumez@apple.com>
2695
2696         Remember device orientation permission for the duration of the browsing session
2697         https://bugs.webkit.org/show_bug.cgi?id=196992
2698         <rdar://problem/49946067>
2699
2700         Reviewed by Alex Christensen.
2701
2702         Use DeviceOrientationOrMotionPermissionState type more consistently in the code base
2703         instead of bool or Optional<bool>. Added "Prompt" value to this enumeration which is the
2704         default state and which indicates we should ask the client.
2705
2706         * WebCore.xcodeproj/project.pbxproj:
2707         * dom/DeviceOrientationAndMotionAccessController.cpp:
2708         (WebCore::DeviceOrientationAndMotionAccessController::DeviceOrientationAndMotionAccessController):
2709         (WebCore::DeviceOrientationAndMotionAccessController::shouldAllowAccess):
2710         * dom/DeviceOrientationAndMotionAccessController.h:
2711         (WebCore::DeviceOrientationAndMotionAccessController::accessState const):
2712         * dom/DeviceOrientationOrMotionEvent.cpp:
2713         (WebCore::DeviceOrientationOrMotionEvent::requestPermission):
2714         * dom/DeviceOrientationOrMotionPermissionState.h:
2715         * loader/DocumentLoader.h:
2716         (WebCore::DocumentLoader::deviceOrientationAndMotionAccessState const):
2717         (WebCore::DocumentLoader::setDeviceOrientationAndMotionAccessState):
2718         * page/ChromeClient.h:
2719         * page/DOMWindow.cpp:
2720         (WebCore::DOMWindow::isAllowedToAddDeviceMotionOrientationListener const):
2721
2722 2019-04-17  Rob Buis  <rbuis@igalia.com>
2723
2724         XMLHttpRequest has the wrong fallback encoding
2725         https://bugs.webkit.org/show_bug.cgi?id=191741
2726
2727         Reviewed by Alex Christensen.
2728
2729         Allow overriding the response charset as specified here:
2730         https://xhr.spec.whatwg.org/#final-charset
2731
2732         Behavior matches Firefox and Chrome.
2733
2734         Tests: imported/w3c/web-platform-tests/encoding/replacement-encodings.any.html
2735                imported/w3c/web-platform-tests/encoding/replacement-encodings.any.worker.html
2736                imported/w3c/web-platform-tests/encoding/unsupported-encodings.any.html
2737                imported/w3c/web-platform-tests/encoding/unsupported-encodings.any.worker.html
2738
2739         * xml/XMLHttpRequest.cpp:
2740         (WebCore::XMLHttpRequest::finalResponseCharset const):
2741         (WebCore::XMLHttpRequest::createDecoder const):
2742         * xml/XMLHttpRequest.h:
2743
2744 2019-04-16  Antoine Quint  <graouts@apple.com>
2745
2746         Opt Google Maps into simulated mouse events dispatch quirk
2747         https://bugs.webkit.org/show_bug.cgi?id=196965
2748         <rdar://problem/49934766>
2749
2750         Reviewed by Dean Jackson.
2751
2752         Use the correct Google Maps path.
2753
2754         * page/Quirks.cpp:
2755         (WebCore::Quirks::shouldDispatchSimulatedMouseEvents const):
2756
2757 2019-04-16  Antoine Quint  <graouts@apple.com>
2758
2759         Opt flipkart.com into simulated mouse events dispatch quirk
2760         https://bugs.webkit.org/show_bug.cgi?id=196961
2761         <rdar://problem/49648520>
2762
2763         Reviewed by Dean Jackson.
2764
2765         * page/Quirks.cpp:
2766         (WebCore::Quirks::shouldDispatchSimulatedMouseEvents const):
2767
2768 2019-04-16  Antoine Quint  <graouts@apple.com>
2769
2770         Opt MSN.com into simulated mouse events dispatch quirk
2771         https://bugs.webkit.org/show_bug.cgi?id=196960
2772         <rdar://problem/49403260>
2773
2774         Reviewed by Dean Jackson.
2775
2776         * page/Quirks.cpp:
2777         (WebCore::Quirks::shouldDispatchSimulatedMouseEvents const):
2778
2779 2019-04-16  Zan Dobersek  <zdobersek@igalia.com>
2780
2781         ScalableImageDecoder: don't forcefully decode image data when querying frame completeness, duration
2782         https://bugs.webkit.org/show_bug.cgi?id=191354
2783         <rdar://problem/46123406>
2784
2785         Reviewed by Michael Catanzaro.
2786
2787         ScalableImageDecoder::frameIsCompleteAtIndex() should only check the
2788         index validity and, if the index is valid, check for completeness of the
2789         corresponding frame. ScalableImageDecoder::frameDurationAtIndex() should
2790         also only retrieve duration for already-complete frames, or expand the
2791         default 0-second value according to the flashing-protection rule when
2792         the target frame is not yet complete.
2793
2794         Both methods avoid calling ScalableImageDecoder::frameBufferAtIndex()
2795         as that method goes on and decodes image data to determine specific
2796         information. The ImageSource class that's querying this information
2797         doesn't anticipate this, and doesn't handle the increased memory
2798         consumption of the decoded data, leaving MemoryCache in the blind about
2799         the image resource's actual amount of consumed memory. ImageSource can
2800         instead gracefully handle any incomplete frame by marking the decoding
2801         status for this frame as only partial.
2802
2803         * platform/image-decoders/ScalableImageDecoder.cpp:
2804         (WebCore::ScalableImageDecoder::frameIsCompleteAtIndex const):
2805         (WebCore::ScalableImageDecoder::frameHasAlphaAtIndex const):
2806         (WebCore::ScalableImageDecoder::frameDurationAtIndex const):
2807
2808 2019-04-16  Ross Kirsling  <ross.kirsling@sony.com>
2809
2810         Unreviewed non-unified build fix after r244307.
2811
2812         * page/DiagnosticLoggingClient.h:
2813
2814 2019-04-16  Chris Dumez  <cdumez@apple.com>
2815
2816         URL set by document.open() is not communicated to the UIProcess
2817         https://bugs.webkit.org/show_bug.cgi?id=196941
2818         <rdar://problem/49237544>
2819
2820         Reviewed by Geoff Garen.
2821
2822         Notify the FrameLoaderClient whenever an explicit open was done and provide it with
2823         the latest document URL.
2824
2825         * loader/FrameLoader.cpp:
2826         (WebCore::FrameLoader::didExplicitOpen):
2827         * loader/FrameLoaderClient.h:
2828
2829 2019-04-16  Timothy Hatcher  <timothy@apple.com>
2830
2831         FrameView base background color always starts white.
2832         https://bugs.webkit.org/show_bug.cgi?id=196976
2833
2834         Reviewed by Beth Dakin.
2835
2836         * page/FrameView.cpp:
2837         (WebCore::FrameView::setBaseBackgroundColor): Bail early if the base background
2838         color did not change.
2839
2840 2019-04-16  Devin Rousso  <drousso@apple.com>
2841
2842         Unprefix -webkit-sticky
2843         https://bugs.webkit.org/show_bug.cgi?id=196962
2844         <rdar://problem/40903458>
2845
2846         Reviewed by Simon Fraser.
2847
2848         Updated existing tests.
2849
2850         This change doesn't modify functionality, only exposing a new unprefixed CSS value.
2851
2852         * css/CSSProperties.json:
2853         * css/CSSValueKeywords.in:
2854
2855         * css/CSSPrimitiveValueMappings.h:
2856         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
2857         (WebCore::CSSPrimitiveValue::operator PositionType const):
2858
2859         * css/parser/CSSParserFastPaths.cpp:
2860         (WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
2861
2862         * editing/EditingStyle.cpp:
2863         (WebCore::EditingStyle::convertPositionStyle):
2864
2865 2019-04-16  Commit Queue  <commit-queue@webkit.org>
2866
2867         Unreviewed, rolling out r244321.
2868         https://bugs.webkit.org/show_bug.cgi?id=196968
2869
2870         Causing all WK2 Debug builds to exit early after Assertion
2871         failures. (Requested by ShawnRoberts on #webkit).
2872
2873         Reverted changeset:
2874
2875         "URL set by document.open() is not communicated to the
2876         UIProcess"
2877         https://bugs.webkit.org/show_bug.cgi?id=196941
2878         https://trac.webkit.org/changeset/244321
2879
2880 2019-04-16  Caitlin Potter  <caitp@igalia.com>
2881
2882         [JSC] Filter DontEnum properties in ProxyObject::getOwnPropertyNames()
2883         https://bugs.webkit.org/show_bug.cgi?id=176810
2884
2885         Reviewed by Saam Barati.
2886
2887         Previously, there was a comment here indicating uncertainty of whether it
2888         was necessary to filter DontEnum properties explicitly or not. It turns
2889         out that it was necessary in the case of JSC ProxyObjects.
2890
2891         This patch adds DontEnum filtering for ProxyObjects, however we continue
2892         to explicitly filter them in JSDOMConvertRecord, which needs to use the
2893         property descriptor after filtering. This change prevents observably
2894         fetching the property descriptor twice per property.
2895
2896         * bindings/js/JSDOMConvertRecord.h:
2897
2898 2019-04-15  Antoine Quint  <graouts@apple.com>
2899
2900         [iOS] Redundant pointer events causes material design buttons to flush twice
2901         https://bugs.webkit.org/show_bug.cgi?id=196914
2902         <rdar://problem/49571860>
2903
2904         Reviewed by Dean Jackson.
2905
2906         Test: pointerevents/ios/pointer-event-order.html
2907
2908         Do not dispatch pointer events for mouse events on iOS since we're already dispatching them when processing touch events.
2909
2910         * dom/Element.cpp:
2911         (WebCore::Element::dispatchMouseEvent):
2912
2913 2019-04-15  John Wilander  <wilander@apple.com>
2914
2915         Add a query string nonce to LayoutTests/http/tests/adClickAttribution/send-attribution-conversion-request.html to address flakiness
2916         https://bugs.webkit.org/show_bug.cgi?id=196955
2917
2918         Unreviewed test gardening. The WebCore change is only in a dedicated
2919         test function.
2920
2921         No new tests. Existing test updated.
2922
2923         * loader/AdClickAttribution.cpp:
2924         (WebCore::AdClickAttribution::urlForTesting const):
2925             Now preserves the query string in the test URL.
2926
2927 2019-04-15  Chris Dumez  <cdumez@apple.com>
2928
2929         URL set by document.open() is not communicated to the UIProcess
2930         https://bugs.webkit.org/show_bug.cgi?id=196941
2931         <rdar://problem/49237544>
2932
2933         Reviewed by Geoffrey Garen.
2934
2935         Notify the FrameLoaderClient whenever an explicit open was done and provide it with
2936         the latest document URL.
2937
2938         * loader/FrameLoader.cpp:
2939         (WebCore::FrameLoader::didExplicitOpen):
2940         * loader/FrameLoaderClient.h:
2941
2942 2019-04-15  Eike Rathke  <erack@redhat.com>
2943
2944         Fix logic flow for error log
2945         https://bugs.webkit.org/show_bug.cgi?id=196933
2946
2947         Reviewed by Alexey Proskuryakov.
2948
2949         Missing block braces logged an error always, not just
2950         if (actionIfInvalid == Complain).
2951
2952         * html/HTMLMediaElement.cpp:
2953         (WebCore::HTMLMediaElement::isSafeToLoadURL):
2954
2955 2019-04-15  Myles C. Maxfield  <mmaxfield@apple.com>
2956
2957         [Cocoa] FontPlatformData objects aren't cached at all when using font-family:system-ui
2958         https://bugs.webkit.org/show_bug.cgi?id=196846
2959         <rdar://problem/49499971>
2960
2961         Reviewed by Simon Fraser and Darin Adler.
2962
2963         When adding the special codepath for system-ui to behave as an entire list of fonts rather than a single item,
2964         I never added a cache for the FontPlatformData objects that codepath creates. The non-system-ui codepath already
2965         has a cache in fontPlatformDataCache() in FontCache.cpp.
2966
2967         This patch causes a 16.8x performance improvement on the attached benchmark.
2968
2969         Test: PerformanceTests/Layout/system-ui-rebuild-emoji.html
2970
2971         * page/cocoa/MemoryReleaseCocoa.mm:
2972         (WebCore::platformReleaseMemory):
2973         * platform/graphics/cocoa/FontCacheCoreText.cpp:
2974         (WebCore::invalidateFontCache):
2975         * platform/graphics/cocoa/FontFamilySpecificationCoreText.cpp:
2976         (WebCore::FontFamilySpecificationKey::FontFamilySpecificationKey):
2977         (WebCore::FontFamilySpecificationKey::operator== const):
2978         (WebCore::FontFamilySpecificationKey::operator!= const):
2979         (WebCore::FontFamilySpecificationKey::isHashTableDeletedValue const):
2980         (WebCore::FontFamilySpecificationKey::computeHash const):
2981         (WebCore::FontFamilySpecificationKeyHash::hash):
2982         (WebCore::FontFamilySpecificationKeyHash::equal):
2983         (WebCore::fontMap):
2984         (WebCore::clearFontFamilySpecificationCoreTextCache):
2985         (WebCore::FontFamilySpecificationCoreText::fontRanges const):
2986         * platform/graphics/cocoa/FontFamilySpecificationCoreText.h:
2987         * platform/graphics/mac/ComplexTextControllerCoreText.mm:
2988         (WebCore::ComplexTextController::collectComplexTextRunsForCharacters):
2989         (WebCore::safeCFEqual): Deleted.
2990
2991 2019-04-15  Devin Rousso  <drousso@apple.com>
2992
2993         Web Inspector: fake value descriptors for promises add a catch handler, preventing "rejectionhandled" events from being fired
2994         https://bugs.webkit.org/show_bug.cgi?id=196484
2995         <rdar://problem/49114725>
2996
2997         Reviewed by Joseph Pecoraro.
2998
2999         Test: inspector/runtime/promise-native-getter.html
3000
3001         Mark errors created from getters as being `isNativeGetterTypeError`.
3002
3003         * bindings/js/JSDOMExceptionHandling.cpp:
3004         (WebCore::throwGetterTypeError):
3005         (WebCore::rejectPromiseWithGetterTypeError):
3006         (WebCore::rejectPromiseWithThisTypeError):
3007
3008         * bindings/js/JSDOMGlobalObject.cpp:
3009         (WebCore::makeGetterTypeErrorForBuiltins):
3010
3011         * bindings/js/JSDOMPromiseDeferred.h:
3012         * bindings/js/JSDOMPromiseDeferred.cpp:
3013         (WebCore::createRejectedPromiseWithTypeError):
3014
3015         * Modules/streams/WritableStream.js:
3016         (getter.closed):
3017         (getter.ready):
3018
3019 2019-04-15  Jer Noble  <jer.noble@apple.com>
3020
3021         Add a DiagnosticLogging method taking an arbitrary dictionary of values.
3022         https://bugs.webkit.org/show_bug.cgi?id=196773
3023
3024         Reviewed by Alex Christensen.
3025
3026         * page/DiagnosticLoggingClient.h:
3027
3028 2019-04-15  Justin Fan  <justin_fan@apple.com>
3029
3030         Let WTF::convertSafely deduce types from arguments.
3031
3032         Reviewer's (Darin Adler) follow-up to https://bugs.webkit.org/show_bug.cgi?id=196793.
3033
3034         * platform/graphics/gpu/cocoa/GPUBufferMetal.mm:
3035         (WebCore::GPUBuffer::tryCreate):
3036         * platform/graphics/gpu/cocoa/GPUCommandBufferMetal.mm:
3037         (WebCore::GPUCommandBuffer::copyBufferToTexture):
3038         (WebCore::GPUCommandBuffer::copyTextureToBuffer):
3039         * platform/graphics/gpu/cocoa/GPURenderPipelineMetal.mm:
3040         (WebCore::trySetInputStateForPipelineDescriptor):
3041
3042 2019-04-12  Ryosuke Niwa  <rniwa@webkit.org>
3043
3044         Throw TypeError when custom element constructor returns a wrong element or tries to create itself
3045         https://bugs.webkit.org/show_bug.cgi?id=196892
3046
3047         Reviewed by Dean Jackson.
3048
3049         Throw TypeError instead of InvalidStateError for consistency. This updates WebKit's custom elements
3050         implementation for https://github.com/whatwg/html/pull/4525.
3051
3052         Tests: imported/w3c/web-platform-tests/custom-elements/upgrading/Node-cloneNode.html
3053                imported/w3c/web-platform-tests/custom-elements/upgrading/upgrading-parser-created-element.html
3054
3055         * bindings/js/JSCustomElementInterface.cpp:
3056         (WebCore::JSCustomElementInterface::upgradeElement):
3057         * bindings/js/JSHTMLElementCustom.cpp:
3058         (WebCore::constructJSHTMLElement):
3059
3060 2019-04-15  Don Olmstead  <don.olmstead@sony.com>
3061
3062         [CMake] WebCore derived sources should only be referenced inside WebCore
3063         https://bugs.webkit.org/show_bug.cgi?id=196904
3064
3065         Reviewed by Konstantin Tokarev.
3066
3067         Use WebCore_DERIVED_SOURCES_DIR instead of DERIVED_SOURCES_WEBCORE_DIR.
3068
3069         * CMakeLists.txt:
3070         * PlatformGTK.cmake:
3071         * PlatformWin.cmake:
3072         * WebCoreMacros.cmake:
3073
3074 2019-04-15  John Wilander  <wilander@apple.com>
3075
3076         Send delayed Ad Click Attribution conversion requests to the click source
3077         https://bugs.webkit.org/show_bug.cgi?id=196838
3078         <rdar://problem/47650157>
3079
3080         Reviewed by Chris Dumez and Youenn Fablet.
3081
3082         WebCore::AdClickAttribution now:
3083         - Sets m_earliestTimeToSend correctly based on WallTime::now().
3084         - Allows for a test override of the base URL for conversions.
3085         - Holds state for whether or not a conversion request has been sent.
3086         - Outputs m_earliestTimeToSend and m_conversion->hasBeenSent in toString().
3087         - Returns m_earliestTimeToSend as a result of a call to
3088         convertAndGetEarliestTimeToSend() which used to be called setConversion().
3089
3090         Test: http/tests/adClickAttribution/send-attribution-conversion-request.html
3091
3092         * loader/AdClickAttribution.cpp:
3093         (WebCore::AdClickAttribution::convertAndGetEarliestTimeToSend):
3094         (WebCore::AdClickAttribution::url const):
3095         (WebCore::AdClickAttribution::urlForTesting const):
3096         (WebCore::AdClickAttribution::markConversionAsSent):
3097         (WebCore::AdClickAttribution::wasConversionSent const):
3098         (WebCore::AdClickAttribution::toString const):
3099         (WebCore::AdClickAttribution::setConversion): Deleted.
3100             Renamed convertAndGetEarliestTimeToSend().
3101         * loader/AdClickAttribution.h:
3102         (WebCore::AdClickAttribution::Conversion::Conversion):
3103         (WebCore::AdClickAttribution::Conversion::encode const):
3104         (WebCore::AdClickAttribution::Conversion::decode):
3105         * platform/Timer.h:
3106             Now exports nextFireInterval.
3107
3108 2019-04-15  Chris Dumez  <cdumez@apple.com>
3109
3110         Regression(r237903) Speedometer 2 is 1-2% regressed on iOS
3111         https://bugs.webkit.org/show_bug.cgi?id=196841
3112         <rdar://problem/45957016>
3113
3114         Reviewed by Myles C. Maxfield.
3115
3116         Speedometer 2 content does not use the text-underline-offset and text-decoration-thickness
3117         features that were added in r237903 so I looked for behavior changes in the context of
3118         Speedometer from r237903. I found that RenderStyle::changeAffectsVisualOverflow() started
3119         returning true a lot more often after r237903. The reason is that r237903 dropped the
3120         visualOverflowForDecorations() checks in this method and started returning true a lot
3121         more as a result.
3122
3123         To restore previous behavior, this patch adds back the visualOverflowForDecorations() checks
3124         that were dropped in r237903. I have verified that with this patch,
3125         RenderStyle::changeAffectsVisualOverflow() returns true as many times as it used to before
3126         r237903.
3127
3128         * rendering/style/RenderStyle.cpp:
3129         (WebCore::RenderStyle::changeAffectsVisualOverflow const):
3130
3131 2019-04-15  Said Abou-Hallawa  <said@apple.com>
3132
3133         ASSERT fires when removing a disallowed clone from the shadow tree without reseting its corresponding element
3134         https://bugs.webkit.org/show_bug.cgi?id=196895
3135
3136         Reviewed by Darin Adler.
3137
3138         When cloning elements to the shadow tree of an SVGUseElement, the
3139         corresponding element links are set from the clones to the originals.
3140         Later some of the elements may be disallowed to exist in the shadow tree.
3141         For example the SVGPatternElement is disallowed and has to be removed 
3142         even after cloning. The problem is the corresponding elements are not
3143         reset to null. Usually this is not a problem because the removed elements
3144         will be deleted and the destructor of SVGElement will reset the corresponding
3145         element links. However in some cases, the cloned element is referenced
3146         from another SVGElement, for example the target of a SVGTRefElement. In
3147         this case the clone won't be deleted but it will be linked to the original
3148         and the event listeners won't be copied from the original. When the
3149         original is deleted, its event listeners have to be removed. The event
3150         listeners of the clones also ave to be removed. But because the event
3151         listeners of the original were not copied when cloning, the assertion in
3152         SVGElement::removeEventListener() fires.
3153
3154         Test: svg/custom/use-disallowed-element-clear-corresponding-element.html
3155
3156         * svg/SVGUseElement.cpp:
3157         (WebCore::disassociateAndRemoveClones):
3158
3159 2019-04-15  Devin Rousso  <drousso@apple.com>
3160
3161         Web Inspector: DOMDebugger: "Attribute Modified" breakpoints pause after the modification occurs for the style attribute
3162         https://bugs.webkit.org/show_bug.cgi?id=196556
3163         <rdar://problem/49570681>
3164
3165         Reviewed by Timothy Hatcher.
3166
3167         Test: inspector/dom-debugger/attribute-modified-style.html
3168
3169         * css/PropertySetCSSStyleDeclaration.h:
3170         * css/PropertySetCSSStyleDeclaration.cpp:
3171         (WebCore::StyleAttributeMutationScope::~StyleAttributeMutationScope):
3172         (WebCore::InlineCSSStyleDeclaration::willMutate): Added.
3173
3174         * dom/StyledElement.cpp:
3175         (WebCore::StyledElement::styleAttributeChanged):
3176         (WebCore::StyledElement::inlineStyleChanged):
3177
3178         * inspector/InspectorInstrumentation.h:
3179         (WebCore::InspectorInstrumentation::willInvalidateStyleAttr): Added.
3180         (WebCore::InspectorInstrumentation::didInvalidateStyleAttr):
3181         * inspector/InspectorInstrumentation.cpp:
3182         (WebCore::InspectorInstrumentation::willInvalidateStyleAttrImpl): Added.
3183         (WebCore::InspectorInstrumentation::didInvalidateStyleAttrImpl):
3184
3185         * inspector/agents/InspectorDOMAgent.h:
3186         * inspector/agents/InspectorDOMAgent.cpp:
3187         (WebCore::InspectorDOMAgent::didInvalidateStyleAttr):
3188
3189         * inspector/agents/InspectorDOMDebuggerAgent.h:
3190         * inspector/agents/InspectorDOMDebuggerAgent.cpp:
3191         (WebCore::InspectorDOMDebuggerAgent::willInvalidateStyleAttr): Added.
3192         (WebCore::InspectorDOMDebuggerAgent::didInvalidateStyleAttr): Deleted.
3193
3194 2019-04-15  Devin Rousso  <drousso@apple.com>
3195
3196         Web Inspector: Elements: event listener change events should only be fired for the selected node and it's ancestors
3197         https://bugs.webkit.org/show_bug.cgi?id=196887
3198         <rdar://problem/49870627>
3199
3200         Reviewed by Timothy Hatcher.
3201
3202         Test: inspector/dom/event-listener-add-remove.html
3203               inspector/dom/event-listener-inspected-node.html
3204
3205         * inspector/agents/InspectorDOMAgent.h:
3206         * inspector/agents/InspectorDOMAgent.cpp:
3207         (WebCore::InspectorDOMAgent::getEventListenersForNode):
3208         (WebCore::InspectorDOMAgent::setInspectedNode):
3209         (WebCore::InspectorDOMAgent::didAddEventListener):
3210         (WebCore::InspectorDOMAgent::willRemoveEventListener):
3211
3212 2019-04-15  Antoine Quint  <graouts@apple.com>
3213
3214         Ensure iOS layout traits are used for media controls in modern compatibility mode
3215         https://bugs.webkit.org/show_bug.cgi?id=196812
3216         <rdar://problem/47460637>
3217
3218         Unreviewed. Speculative fix for test regressions on open-source bots.
3219
3220         * Modules/modern-media-controls/media/media-controller.js:
3221         (MediaController.prototype.get layoutTraits):
3222
3223 2019-04-11  Antoine Quint  <graouts@apple.com>
3224
3225         Ensure iOS layout traits are used for media controls in modern compatibility mode
3226         https://bugs.webkit.org/show_bug.cgi?id=196812
3227         <rdar://problem/47460637>
3228
3229         Reviewed by Dean Jackson.
3230
3231         Test: media/modern-media-controls/media-controller/ios/media-controller-ios-layout-traits-modern-compatibility-mode.html
3232
3233         Instead of looking at the UA string, check whether we support touches which is the correct indicator of whether we should
3234         be using the iOS layout traits for media controls.
3235
3236         * Modules/modern-media-controls/media/media-controller.js:
3237         (MediaController.prototype.get layoutTraits):
3238
3239 2019-04-14  Rob Buis  <rbuis@igalia.com>
3240
3241         Link prefetch not useful for top-level navigation
3242         https://bugs.webkit.org/show_bug.cgi?id=195623
3243
3244         Reviewed by Youenn Fablet.
3245
3246         Cache cross-domain top-level prefetches in a dedicated cache and not in the
3247         memory cache. Ignore prefetches for content extension checks.
3248
3249         Tests: http/tests/cache/link-prefetch-main-resource-iframe.html
3250                http/tests/cache/link-prefetch-main-resource.html
3251
3252         * loader/LinkLoader.cpp:
3253         (WebCore::LinkLoader::prefetchIfNeeded):
3254         * loader/ResourceLoadInfo.cpp:
3255         (WebCore::toResourceType):
3256         * loader/ResourceLoadInfo.h:
3257         * loader/ResourceLoader.cpp:
3258         (WebCore::ResourceLoader::willSendRequestInternal):
3259         * loader/cache/CachedResourceLoader.cpp:
3260         (WebCore::CachedResourceLoader::requestResource):
3261
3262 2019-04-14  Dean Jackson  <dino@apple.com>
3263
3264         Extract UTI mapping and allow for additions
3265         https://bugs.webkit.org/show_bug.cgi?id=196822
3266         <rdar://problem/49822339>
3267
3268         Reviewed by Darin Adler
3269
3270         Post landing feedback on minimizing String constructors.
3271
3272         * platform/network/mac/UTIUtilities.mm:
3273         (WebCore::MIMETypeFromUTITree):
3274         (WebCore::UTIFromMIMETypeCachePolicy::createValueForKey):
3275
3276 2019-04-14  Don Olmstead  <don.olmstead@sony.com>
3277
3278         [CMake] JavaScriptCore derived sources should only be referenced inside JavaScriptCore
3279         https://bugs.webkit.org/show_bug.cgi?id=196742
3280
3281         Reviewed by Konstantin Tokarev.
3282
3283         Don't set JavaScriptCore_SCRIPTS_DIR now that it is set within WebKitFS.
3284
3285         * CMakeLists.txt:
3286
3287 2019-04-12  Antoine Quint  <graouts@apple.com>
3288
3289         Provide a quirk to disable Pointer Events
3290         https://bugs.webkit.org/show_bug.cgi?id=196877
3291         <rdar://problem/49863470>
3292
3293         Reviewed by Dean Jackson.
3294
3295         Add a quirk to disable Pointer Events. We also opt a website that has compatibility issues with Pointer Events into this new quirk.
3296
3297         * dom/PointerEvent.idl:
3298         * page/Quirks.cpp:
3299         (WebCore::Quirks::shouldDisablePointerEventsQuirk const):
3300         * page/Quirks.h:
3301         * page/scrolling/ScrollingCoordinator.cpp:
3302         (WebCore::ScrollingCoordinator::absoluteEventTrackingRegionsForFrame const):
3303         * style/StyleTreeResolver.cpp:
3304         (WebCore::Style::TreeResolver::resolveElement):
3305
3306 2019-04-12  Wenson Hsieh  <wenson_hsieh@apple.com>
3307
3308         Enable modern compatibility mode by default in WKWebView on some devices
3309         https://bugs.webkit.org/show_bug.cgi?id=196883
3310         <rdar://problem/49864527>
3311
3312         Reviewed by Tim Horton.
3313
3314         Add a new helper function to determine whether an app is pre-installed on iOS, for the purposes of ensuring
3315         compatibility with existing Apple apps that are not affected by linked-on-or-after. This involves all apps with
3316         a bundle ID that begins with "com.apple.".
3317
3318         * platform/RuntimeApplicationChecks.h:
3319         * platform/cocoa/RuntimeApplicationChecksCocoa.mm:
3320         (WebCore::setApplicationBundleIdentifier):
3321         (WebCore::applicationBundleStartsWith):
3322         (WebCore::IOSApplication::isAppleApplication):
3323
3324 2019-04-12  Justin Fan  <justin_fan@apple.com>
3325
3326         [Web GPU] Prevent narrowing conversions during Metal function calls on 32-bit platforms
3327         https://bugs.webkit.org/show_bug.cgi?id=196793
3328
3329         Reviewed by Darin Adler.
3330
3331         On 32-bit platforms, NSUInteger is 32-bit, which limits certain Web GPU parameters. 
3332         Ensure that valid parameters are properly converted to NSUInteger for Metal calls, regardless of platform.
3333
3334         * platform/graphics/gpu/GPUBuffer.h:
3335         (WebCore::GPUBuffer::byteLength const):
3336         * platform/graphics/gpu/cocoa/GPUBindGroupMetal.mm:
3337         (WebCore::tryGetResourceAsBufferBinding):
3338         (WebCore::setBufferOnEncoder):
3339         * platform/graphics/gpu/cocoa/GPUBufferMetal.mm:
3340         (WebCore::GPUBuffer::validateBufferUsage):
3341         (WebCore::GPUBuffer::tryCreate):
3342         (WebCore::GPUBuffer::GPUBuffer):
3343         (WebCore::GPUBuffer::setSubData):
3344         * platform/graphics/gpu/cocoa/GPUCommandBufferMetal.mm:
3345         (WebCore::GPUCommandBuffer::copyBufferToBuffer):
3346         (WebCore::GPUCommandBuffer::copyBufferToTexture):
3347         (WebCore::GPUCommandBuffer::copyTextureToBuffer):
3348         * platform/graphics/gpu/cocoa/GPURenderPassEncoderMetal.mm:
3349         (WebCore::GPURenderPassEncoder::drawIndexed):
3350         * platform/graphics/gpu/cocoa/GPURenderPipelineMetal.mm:
3351         (WebCore::trySetInputStateForPipelineDescriptor):
3352
3353 2019-04-12  Ross Kirsling  <ross.kirsling@sony.com>
3354
3355         Unreviewed fix for non-unified build.
3356
3357         * dom/ScriptedAnimationController.h:
3358         Add missing include from r244182.
3359
3360 2019-04-11  Ryosuke Niwa  <rniwa@webkit.org>
3361
3362         WebThread should run at a higher priority than user initiated
3363         https://bugs.webkit.org/show_bug.cgi?id=196849
3364         <rdar://problem/46851062>
3365
3366         Reviewed by Geoffrey Garen.
3367
3368         Use QOS_CLASS_USER_INTERACTIVE on WebThread with -10 relative priority so that WebThread
3369         won't wait for other threads with priority 30-37 but does not content with the main thread.
3370
3371         Also removed the call to pthread_attr_setschedparam which disables QoS.
3372
3373         This improves the blocked time in StartWebThread from 2~3ms to 250μs while cold launching
3374         iBooks to an opened book.
3375
3376         * platform/ios/wak/WebCoreThread.mm:
3377         (StartWebThread): Replaced 200 * 4096 by 800 * KB for a better readability.
3378
3379 2019-04-12  Ryosuke Niwa  <rniwa@webkit.org>
3380
3381         Add CSS Shadow Parts as a feature under consideration
3382         https://bugs.webkit.org/show_bug.cgi?id=196835
3383
3384         Reviewed by Antti Koivisto.
3385
3386         This feature is under consideration.
3387
3388         * features.json:
3389
3390 2019-04-12  Ross Kirsling  <ross.kirsling@sony.com>
3391
3392         WebKit should build successfully even with -DENABLE_UNIFIED_BUILDS=OFF
3393         https://bugs.webkit.org/show_bug.cgi?id=196845
3394
3395         Reviewed by Ryosuke Niwa.
3396
3397         * html/canvas/CanvasRenderingContext2DBase.cpp:
3398         (WebCore::CanvasRenderingContext2DBase::FontProxy::initialize):
3399         (WebCore::CanvasRenderingContext2DBase::FontProxy::fontMetrics const):
3400         (WebCore::CanvasRenderingContext2DBase::FontProxy::fontDescription const):
3401         (WebCore::CanvasRenderingContext2DBase::FontProxy::width const):
3402         (WebCore::CanvasRenderingContext2DBase::FontProxy::drawBidiText const):
3403         (WebCore::CanvasRenderingContext2DBase::beginCompositeLayer):
3404         (WebCore::CanvasRenderingContext2DBase::endCompositeLayer):
3405         Remove inline specifier to address linking errors (regardless of CMake platform).
3406         Doing this in a .cpp file interferes with symbol creation.
3407
3408         * Modules/mediastream/MediaStreamTrack.cpp:
3409         * Modules/webvr/VREyeParameters.cpp:
3410         * Modules/webvr/VRFrameData.cpp:
3411         * Modules/webvr/VRPose.cpp:
3412         * accessibility/AccessibilityList.cpp:
3413         * accessibility/isolatedtree/AXIsolatedTree.cpp:
3414         * accessibility/isolatedtree/AXIsolatedTreeNode.cpp:
3415         * bindings/js/JSDOMConvertWebGL.cpp:
3416         * bindings/js/JSHistoryCustom.cpp:
3417         * bindings/js/JSIDBCursorWithValueCustom.cpp:
3418         * bindings/js/JSPerformanceObserverCustom.cpp:
3419         * bindings/js/WindowProxy.cpp:
3420         * platform/ColorData.gperf:
3421         * platform/mediastream/RealtimeMediaSourceSettings.cpp:
3422         * platform/network/DNSResolveQueue.cpp:
3423         * workers/service/ServiceWorkerClientQueryOptions.h:
3424         * workers/service/ServiceWorkerContainer.cpp:
3425         Add missing includes to address compiler errors on GTK.
3426
3427 2019-04-12  Zalan Bujtas  <zalan@apple.com>
3428
3429         REGRESSION (r244098): [ Mac WK1 ] Layout Test fast/dynamic/paused-event-dispatch.html is Timing out
3430         https://bugs.webkit.org/show_bug.cgi?id=196789
3431         <rdar://problem/49855255>
3432
3433         Reviewed by Tim Horton.
3434
3435         Disable auto-sizing mode at the start of each test.