Add stub implementation for accessibility objects
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2018-10-15  Don Olmstead  <don.olmstead@sony.com>
2
3         Add stub implementation for accessibility objects
4         https://bugs.webkit.org/show_bug.cgi?id=190608
5
6         Reviewed by Michael Catanzaro.
7
8         No new tests. No change in behavior.
9
10         Add default implementation to associated cpp file. Removes the WPE
11         specific stubs.
12
13         * SourcesWPE.txt:
14         * accessibility/AXObjectCache.cpp:
15         (WebCore::AXObjectCache::detachWrapper):
16         (WebCore::AXObjectCache::attachWrapper):
17         (WebCore::AXObjectCache::postPlatformNotification):
18         (WebCore::AXObjectCache::nodeTextChangePlatformNotification):
19         (WebCore::AXObjectCache::frameLoadingEventPlatformNotification):
20         (WebCore::AXObjectCache::platformHandleFocusedUIElementChanged):
21         (WebCore::AXObjectCache::handleScrolledToAnchor):
22         * accessibility/AccessibilityObject.cpp:
23         (WebCore::AccessibilityObject::accessibilityIgnoreAttachment const):
24         (WebCore::AccessibilityObject::accessibilityPlatformIncludesObject const):
25         * accessibility/AccessibilityObject.h:
26         * accessibility/wpe/AXObjectCacheWPE.cpp: Removed.
27         * accessibility/wpe/AccessibilityObjectWPE.cpp: Removed.
28
29 2018-10-15  Alex Christensen  <achristensen@webkit.org>
30
31         Modernize BackForwardClient.h
32         https://bugs.webkit.org/show_bug.cgi?id=190610
33
34         Reviewed by Chris Dumez.
35
36         * editing/markup.cpp:
37         (WebCore::createPageForSanitizingWebContent):
38         * history/BackForwardClient.h:
39         * history/BackForwardController.h:
40         (WebCore::BackForwardController::client):
41         (WebCore::BackForwardController::client const):
42         * inspector/InspectorOverlay.cpp:
43         (WebCore::InspectorOverlay::overlayPage):
44         * loader/EmptyClients.cpp:
45         (WebCore::pageConfigurationWithEmptyClients):
46         (WebCore::createEmptyFrameNetworkingContext): Deleted.
47         (WebCore::fillWithEmptyClients): Deleted.
48         (WebCore::createEmptyEditorClient): Deleted.
49         * loader/EmptyClients.h:
50         * page/Page.cpp:
51         (WebCore::Page::Page):
52         * page/PageConfiguration.cpp:
53         (WebCore::PageConfiguration::PageConfiguration):
54         * page/PageConfiguration.h:
55         * svg/graphics/SVGImage.cpp:
56         (WebCore::SVGImage::dataChanged):
57
58 2018-10-15  Timothy Hatcher  <timothy@apple.com>
59
60         Add support for prefers-color-scheme media query
61         https://bugs.webkit.org/show_bug.cgi?id=190499
62         rdar://problem/45212025
63
64         Reviewed by Dean Jackson.
65
66         Test: css-dark-mode/prefers-color-scheme.html
67
68         * Configurations/FeatureDefines.xcconfig: Added ENABLE_DARK_MODE_CSS.
69         * css/CSSValueKeywords.in: Added light and dark.
70         * css/MediaFeatureNames.h: Added prefers-color-scheme.
71         * css/MediaQueryEvaluator.cpp:
72         (WebCore::prefersColorSchemeEvaluate): Added.
73         * css/MediaQueryExpression.cpp:
74         (WebCore::featureWithValidIdent): Added prefers-color-scheme.
75         * page/RuntimeEnabledFeatures.h:
76         (WebCore::RuntimeEnabledFeatures::setDarkModeCSSEnabled): Added.
77         (WebCore::RuntimeEnabledFeatures::darkModeCSSEnabled const): Added.
78         * testing/InternalSettings.cpp:
79         (WebCore::InternalSettings::resetToConsistentState): Reset setUseDarkAppearance.
80         (WebCore::InternalSettings::setUseDarkAppearance): Added.
81         * testing/InternalSettings.h: Added setUseDarkAppearance.
82         * testing/InternalSettings.idl: Ditto.
83
84 2018-10-15  Alex Christensen  <achristensen@webkit.org>
85
86         Remove unused WebView._globalHistoryItem
87         https://bugs.webkit.org/show_bug.cgi?id=190601
88
89         Reviewed by Chris Dumez.
90
91         This was a hack to give the client a more reliable current back/forward item, but it hasn't been used for years
92         and it's adding unnecessary complexity to the history code.
93
94         * loader/EmptyFrameLoaderClient.h:
95         * loader/FrameLoader.cpp:
96         (WebCore::FrameLoader::checkLoadCompleteForThisFrame):
97         (WebCore::FrameLoader::continueLoadAfterNavigationPolicy):
98         * loader/FrameLoaderClient.h:
99         * loader/HistoryController.cpp:
100         (WebCore::HistoryController::goToItem):
101         (WebCore::HistoryController::updateForStandardLoad):
102         (WebCore::HistoryController::updateForRedirectWithLockedBackForwardList):
103
104 2018-10-15  Chris Dumez  <cdumez@apple.com>
105
106         Experiment: target=_blank on anchors should imply rel=noopener
107         https://bugs.webkit.org/show_bug.cgi?id=190481
108
109         Reviewed by Alex Christensen.
110
111         As an experiment, try and make it so that target=_blank on anchors implies `rel=noopener` for improved security.
112         WebContent can then request an opener relationship by using `rel=opener` instead.
113
114         This change was discussed at:
115         - https://github.com/whatwg/html/issues/4078
116
117         We want to attempt this change is STP to see if it is Web-compatible. Preliminary testing seems to indicate
118         that OAuth workflows still work.
119
120         * html/HTMLAnchorElement.cpp:
121         (WebCore::HTMLAnchorElement::parseAttribute):
122         (WebCore::HTMLAnchorElement::handleClick):
123         (WebCore::HTMLAnchorElement::effectiveTarget const):
124         * html/HTMLAnchorElement.h:
125         * page/RuntimeEnabledFeatures.h:
126         (WebCore::RuntimeEnabledFeatures::setBlankAnchorTargetImpliesNoOpenerEnabled):
127         (WebCore::RuntimeEnabledFeatures::blankAnchorTargetImpliesNoOpenerEnabled const):
128
129 2018-10-15  Andy Estes  <aestes@apple.com>
130
131         [Apple Pay] New shipping methods are ignored when updating after the shippingaddresschange event
132         https://bugs.webkit.org/show_bug.cgi?id=190560
133         <rdar://problem/44559075>
134
135         Reviewed by Youenn Fablet.
136
137         When a PaymentDetailsUpdate with shipping options was specified to updateWith() after the
138         shippingaddresschange event fires, ApplePayPaymentHandler needs to convert the shipping
139         options to ShippingMethods and add them to the ShippingContactUpdate so that the Apple Pay
140         UI renders the new options.
141
142         Added test cases to http/tests/ssl/applepay/ApplePayShippingAddressChangeEventErrors.https.html.
143
144         * Modules/applepay/ApplePayShippingMethod.idl:
145         * Modules/applepay/paymentrequest/ApplePayPaymentHandler.cpp:
146         (WebCore::ApplePayPaymentHandler::computeShippingMethods):
147         (WebCore::ApplePayPaymentHandler::shippingAddressUpdated):
148         * Modules/applepay/paymentrequest/ApplePayPaymentHandler.h:
149         * testing/MockPaymentCoordinator.cpp:
150         (WebCore::convert):
151         (WebCore::MockPaymentCoordinator::showPaymentUI):
152         (WebCore::MockPaymentCoordinator::completeShippingContactSelection):
153         * testing/MockPaymentCoordinator.h:
154         * testing/MockPaymentCoordinator.idl:
155
156 2018-10-15  Youenn Fablet  <youenn@apple.com>
157
158         RTCPeerConnection.generateCertificate is not a function
159         https://bugs.webkit.org/show_bug.cgi?id=173541
160         <rdar://problem/32638029>
161
162         Reviewed by Eric Carlson.
163
164         Add support for RTCCertificate generation through libwebrtc certificate generator.
165         Make generation in the webrtc network thread.
166         Support is as per spec (ECDSA and RSASSA_PKCS).
167
168         Partially covered by WPT tests.
169
170         * css/StyleBuilder.h: Fixing build.
171         * CMakeLists.txt:
172         * DerivedSources.make:
173         * Modules/webauthn/PublicKeyCredential.cpp: Fixing build.
174         * Modules/mediastream/PeerConnectionBackend.cpp:
175         (WebCore::PeerConnectionBackend::generateCertificate):
176         * Modules/mediastream/PeerConnectionBackend.h:
177         (WebCore::PeerConnectionBackend::CertificateInformation::RSASSA_PKCS1_v1_5):
178         (WebCore::PeerConnectionBackend::CertificateInformation::ECDSA_P256):
179         (WebCore::PeerConnectionBackend::CertificateInformation::CertificateInformation):
180         * Modules/mediastream/RTCCertificate.cpp: Added.
181         (WebCore::RTCCertificate::create):
182         (WebCore::RTCCertificate::RTCCertificate):
183         * Modules/mediastream/RTCCertificate.h: Added.
184         (WebCore::RTCCertificate::expires const):
185         (WebCore::RTCCertificate::getFingerprints const):
186         * Modules/mediastream/RTCCertificate.idl: Added.
187         * Modules/mediastream/RTCPeerConnection.cpp:
188         (WebCore::certificateTypeFromAlgorithmIdentifier):
189         (WebCore::RTCPeerConnection::generateCertificate):
190         * Modules/mediastream/RTCPeerConnection.h:
191         * Modules/mediastream/RTCPeerConnection.idl:
192         * Modules/mediastream/libwebrtc/LibWebRTCCertificateGenerator.cpp: Added.
193         (WebCore::LibWebRTCCertificateGenerator::RTCCertificateGeneratorCallback::RTCCertificateGeneratorCallback):
194         (WebCore::LibWebRTCCertificateGenerator::RTCCertificateGeneratorCallback::~RTCCertificateGeneratorCallback):
195         (WebCore::LibWebRTCCertificateGenerator::keyParamsFromCertificateType):
196         (WebCore::LibWebRTCCertificateGenerator::generateCertificate):
197         * Modules/mediastream/libwebrtc/LibWebRTCCertificateGenerator.h: Added.
198         * Sources.txt:
199         * WebCore.xcodeproj/project.pbxproj:
200         * bindings/js/WebCoreBuiltinNames.h:
201         * platform/mediastream/libwebrtc/LibWebRTCProvider.cpp:
202         (WebCore::LibWebRTCProvider::certificateGenerator):
203         * platform/mediastream/libwebrtc/LibWebRTCProvider.h:
204
205 2018-10-15  Simon Fraser  <simon.fraser@apple.com>
206
207         Add compact logging for the paint-order RenderLayer tree
208         https://bugs.webkit.org/show_bug.cgi?id=190592
209
210         Reviewed by Zalan Bujtas.
211
212         Add a way to dump the RenderLayer tree in paint order, which will be extended in future
213         to show more dirty bit state.
214
215         * rendering/RenderLayer.cpp:
216         (WebCore::outputPaintOrderTreeLegend):
217         (WebCore::outputIdent):
218         (WebCore::outputPaintOrderTreeRecursive):
219         (WebCore::showPaintOrderTree):
220         * rendering/RenderLayer.h:
221
222 2018-10-15  Alex Christensen  <achristensen@webkit.org>
223
224         Remove unused parameters from FrameLoaderClient::createFrame
225         https://bugs.webkit.org/show_bug.cgi?id=190587
226
227         Reviewed by Chris Dumez.
228
229         * loader/EmptyClients.cpp:
230         (WebCore::EmptyFrameLoaderClient::createFrame):
231         * loader/EmptyFrameLoaderClient.h:
232         * loader/FrameLoaderClient.h:
233         * loader/SubframeLoader.cpp:
234         (WebCore::SubframeLoader::loadSubframe):
235
236 2018-10-15  Andy Estes  <aestes@apple.com>
237
238         [Apple Pay] Payment authorization results with ApplePayErrors should never be considered final
239         https://bugs.webkit.org/show_bug.cgi?id=190559
240         <rdar://problem/37250908>
241
242         Reviewed by Anders Carlsson.
243
244         When PaymentCoordinator thinks a payment authorization result is final it releases the
245         active ApplePaySession. The Apple Pay UI is dismissed after a receiving a final result.
246
247         However, WebCore::isFinalStateResult had the wrong idea about what was a final state,
248         in some cases causing PaymentCoordinator to release the active session even when the UI is
249         still presented. If the user authorizes payment again, the website will not receive another
250         paymentauthorized event, and the Apple Pay UI will eventually time out waiting for a result.
251
252         Specifically, isFinalStateResult thought that:
253
254         (1) results with STATUS_SUCCESS were always final, even if they had errors
255         (2) errors with code "unknown" were final
256
257         Both of these assumptions are wrong. PassKit considers any result with errors to be
258         non-final, even if an error has code "unknown."
259
260         Fixed WebCore::isFinalStateResult to agree with what PassKit considers to be final results.
261
262         Test: http/tests/ssl/applepay/ApplePaySessionFinalState.https.html
263
264         * Modules/applepay/ApplePaySessionPaymentRequest.cpp:
265         (WebCore::isFinalStateResult):
266         * testing/MockPaymentCoordinator.cpp:
267         (WebCore::MockPaymentCoordinator::completePaymentSession):
268
269 2018-10-15  Andy Estes  <aestes@apple.com>
270
271         [Payment Request] PaymentResponse should be a ContextDestructionObserver
272         https://bugs.webkit.org/show_bug.cgi?id=190558
273
274         Reviewed by Alex Christensen.
275
276         Make PaymentResponse a ContextDestructionObserver so it has a ScriptExecutionContext to
277         return for its override of EventTarget::scriptExecutionContext(). Do this instead of
278         downcasting m_request to an ActiveDOMObject to ask for its context.
279
280         * Modules/paymentrequest/PaymentRequest.cpp:
281         (WebCore::PaymentRequest::accept):
282         * Modules/paymentrequest/PaymentResponse.cpp:
283         (WebCore::PaymentResponse::PaymentResponse):
284         (WebCore::PaymentResponse::scriptExecutionContext const): Deleted.
285         * Modules/paymentrequest/PaymentResponse.h:
286
287 2018-10-15  Andy Estes  <aestes@apple.com>
288
289         [Payment Request] Use a PendingActivity token rather than calling (un)setPendingActivity
290         https://bugs.webkit.org/show_bug.cgi?id=190557
291
292         Reviewed by Alex Christensen.
293
294         PaymentRequest has pending activity whenever there is an active payment handler, since
295         user-initiated events can occur whenever the payment UI is displayed.
296
297         Rather than manually track the pending activity with setPendingActivity() and
298         unsetPendingActivity(), use a PendingActivity token tied to the lifetime of the active
299         payment handler. Also, rewrite canSuspendForDocumentSuspension() in terms of
300         hasPendingActivity().
301
302         * Modules/paymentrequest/PaymentRequest.cpp:
303         (WebCore::PaymentRequest::show):
304         (WebCore::PaymentRequest::abortWithException):
305         (WebCore::PaymentRequest::canSuspendForDocumentSuspension const):
306         (WebCore::PaymentRequest::paymentMethodChanged):
307         (WebCore::PaymentRequest::completeMerchantValidation):
308         (WebCore::PaymentRequest::settleDetailsPromise):
309         (WebCore::PaymentRequest::complete):
310         (WebCore::PaymentRequest::cancel):
311         * Modules/paymentrequest/PaymentRequest.h:
312
313 2018-10-15  Wenson Hsieh  <wenson_hsieh@apple.com>
314
315         Changing view scale should zoom to initial scale if the page is already at initial scale
316         https://bugs.webkit.org/show_bug.cgi?id=190570
317         <rdar://problem/45261877>
318
319         Reviewed by Tim Horton.
320
321         Add a getter for ViewportConfiguration's layout size scale factor.
322         See Source/WebKit/ChangeLog for more details.
323
324         * page/ViewportConfiguration.h:
325         (WebCore::ViewportConfiguration::layoutSizeScaleFactor const):
326
327 2018-10-15  Charlie Turner  <cturner@igalia.com>
328
329         Fix build error with !LOG_DISABLED in Release mode
330         https://bugs.webkit.org/show_bug.cgi?id=190465
331
332         Reviewed by Michael Catanzaro.
333
334         No tests due to no new functionality.
335
336         * workers/service/ServiceWorkerRegistrationKey.cpp:
337         * workers/service/ServiceWorkerRegistrationKey.h:
338
339 2018-10-15  Simon Fraser  <simon.fraser@apple.com>
340
341         LayerListMutationDetector should take a reference
342         https://bugs.webkit.org/show_bug.cgi?id=190586
343
344         Reviewed by Zalan Bujtas.
345         
346         Change LayerListMutationDetector to take a RenderLayer&.
347
348         * rendering/RenderLayer.cpp:
349         (WebCore::RenderLayer::paintList):
350         (WebCore::RenderLayer::hitTestLayer):
351         (WebCore::RenderLayer::calculateClipRects const):
352         * rendering/RenderLayer.h:
353         (WebCore::LayerListMutationDetector::LayerListMutationDetector):
354         (WebCore::LayerListMutationDetector::~LayerListMutationDetector):
355         * rendering/RenderLayerBacking.cpp:
356         (WebCore::traverseVisibleNonCompositedDescendantLayers):
357         * rendering/RenderLayerCompositor.cpp:
358         (WebCore::RenderLayerCompositor::addToOverlapMapRecursive):
359         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
360         (WebCore::RenderLayerCompositor::rebuildCompositingLayerTree):
361         (WebCore::RenderLayerCompositor::updateLayerTreeGeometry):
362         (WebCore::RenderLayerCompositor::updateCompositingDescendantGeometry):
363         (WebCore::RenderLayerCompositor::recursiveRepaintLayer):
364         (WebCore::RenderLayerCompositor::layerHas3DContent const):
365
366 2018-10-15  Simon Fraser  <simon.fraser@apple.com>
367
368         Share some code to dirty z-order and normal flow lists when child layers are added or removed
369         https://bugs.webkit.org/show_bug.cgi?id=190585
370
371         Reviewed by Zalan Bujtas.
372
373         Factor code which dirties the normal flow list and child stacking context z-order lists
374         when a layer is added or removed.
375
376         * rendering/RenderLayer.cpp:
377         (WebCore::RenderLayer::addChild):
378         (WebCore::RenderLayer::removeChild):
379         (WebCore::RenderLayer::dirtyPaintOrderListsOnChildChange):
380         * rendering/RenderLayer.h:
381
382 2018-10-15  Simon Fraser  <simon.fraser@apple.com>
383
384         Make a helper function to check for reflection layers
385         https://bugs.webkit.org/show_bug.cgi?id=190584
386
387         Reviewed by Zalan Bujtas.
388
389         Add RenderLayer::isReflectionLayer() which returns true if the passed layer
390         is the layer of this layer's reflection. It's used in z-order list building.
391
392         * rendering/RenderLayer.cpp:
393         (WebCore::RenderLayer::updateNormalFlowList):
394         (WebCore::RenderLayer::rebuildZOrderLists):
395         (WebCore::RenderLayer::collectLayers):
396         (WebCore::expandClipRectForDescendantsAndReflection):
397         (WebCore::RenderLayer::calculateClipRects const):
398         * rendering/RenderLayer.h:
399
400 2018-10-15  Simon Fraser  <simon.fraser@apple.com>
401
402         RenderLayer::addChild() and removeChild() should take references
403         https://bugs.webkit.org/show_bug.cgi?id=190582
404
405         Reviewed by Zalan Bujtas.
406
407         Pass the layer to be added or removed as a reference; it's never null.
408
409         * rendering/RenderElement.cpp:
410         (WebCore::addLayers):
411         (WebCore::RenderElement::removeLayers):
412         (WebCore::RenderElement::moveLayers):
413         * rendering/RenderLayer.cpp:
414         (WebCore::RenderLayer::addChild):
415         (WebCore::RenderLayer::removeChild):
416         (WebCore::RenderLayer::insertOnlyThisLayer):
417         (WebCore::RenderLayer::removeOnlyThisLayer):
418         * rendering/RenderLayer.h:
419
420 2018-10-15  Yoshiaki Jitsukawa  <yoshiaki.jitsukawa@sony.com>
421
422         [Cairo] Incorrect rendering for 135-deg skews
423         https://bugs.webkit.org/show_bug.cgi?id=190513
424
425         Compensation value to zero the the translation components
426         of the transformation matrix is incorrect if the matrix
427         has a shear factor.
428
429         Reviewed by Žan Doberšek.
430
431         Tests: fast/transforms/skew-x-135deg-with-gradient.html
432                fast/transforms/skew-y-135deg-with-gradient.html
433
434         * platform/graphics/cairo/CairoUtilities.cpp:
435         (WebCore::drawPatternToCairoContext):
436
437 2018-10-15  Christopher Reid  <chris.reid@sony.com>
438
439         [Curl][WinCairo] Add Public Suffix support to WinCairo
440         https://bugs.webkit.org/show_bug.cgi?id=183060
441
442         Reviewed by Alex Christensen.
443
444         Add Public Suffix support to WinCairo using LibPSL.
445         LibPSL has been added to WinCairoRequirements in v2018.10.09.
446
447         * platform/Curl.cmake:
448         * platform/network/curl/CookieJarDB.cpp:
449         (WebCore::CookieJarDB::searchCookies): Search for cookies using the topPrivatelyControlledDomain
450         (WebCore::CookieJarDB::setCookie): Prevent cookies from being added under TLDs
451         * platform/network/curl/PublicSuffixCurl.cpp: Added.
452         (WebCore::isPublicSuffix):
453         (WebCore::topPrivatelyControlledDomainInternal):
454         (WebCore::topPrivatelyControlledDomain):
455
456 2018-10-15  Simon Fraser  <simon.fraser@apple.com>
457
458         RenderLayer tree-related cleanup
459         https://bugs.webkit.org/show_bug.cgi?id=190572
460
461         Reviewed by Zalan Bujtas.
462
463         Move code around so that functions related to parent/child and z-order tree structure
464         are near the top of RenderLayer.cpp, since this is one of the primary functions of layers.
465         
466         Attempts to use inheritance or composition to separate out tree structure resulted in
467         unwieldy code and/or performance regressions.
468         
469         The only behavior change is to store a bit for m_isStackingContext so that we don't have
470         to consult the old style to know if it changed.
471
472         * rendering/RenderLayer.cpp:
473         (WebCore::RenderLayer::RenderLayer):
474         (WebCore::RenderLayer::addChild):
475         (WebCore::RenderLayer::removeChild):
476         (WebCore::RenderLayer::insertOnlyThisLayer):
477         (WebCore::RenderLayer::removeOnlyThisLayer):
478         (WebCore::canCreateStackingContext):
479         (WebCore::RenderLayer::shouldBeNormalFlowOnly const):
480         (WebCore::RenderLayer::shouldBeStackingContext const):
481         (WebCore::RenderLayer::setIsNormalFlowOnly):
482         (WebCore::RenderLayer::setIsStackingContext):
483         (WebCore::RenderLayer::setParent):
484         (WebCore::RenderLayer::dirtyZOrderLists):
485         (WebCore::RenderLayer::dirtyStackingContextZOrderLists):
486         (WebCore::RenderLayer::dirtyNormalFlowList):
487         (WebCore::RenderLayer::updateNormalFlowList):
488         (WebCore::RenderLayer::rebuildZOrderLists):
489         (WebCore::RenderLayer::collectLayers):
490         (WebCore::RenderLayer::updateLayerListsIfNeeded):
491         (WebCore::RenderLayer::beginTransparencyLayers):
492         (WebCore::RenderLayer::willBeDestroyed):
493         (WebCore::RenderLayer::isDescendantOf const):
494         (WebCore::RenderLayer::calculateClipRects const):
495         (WebCore::compareZIndex): Deleted.
496         * rendering/RenderLayer.h:
497
498 2018-10-15  Antti Koivisto  <antti@apple.com>
499
500         [PSON] Prewarm system fallback fonts
501         https://bugs.webkit.org/show_bug.cgi?id=190517
502
503         Reviewed by Ryosuke Niwa.
504
505         This seems to be ~2% progression in PSON PLT4 with large (40ms+) improvements on some pages
506         after process swaps.
507
508         * page/PrewarmInformation.h:
509         (WebCore::PrewarmInformation::encode const):
510         (WebCore::PrewarmInformation::decode):
511         * page/ProcessWarming.cpp:
512         (WebCore::ProcessWarming::collectPrewarmInformation):
513         (WebCore::ProcessWarming::prewarmWithInformation):
514         * platform/graphics/FontCache.cpp:
515         (WebCore::FontCache::collectPrewarmInformation const):
516         (WebCore::FontCache::prewarm):
517         * platform/graphics/FontCache.h:
518         (WebCore::FontCache::PrewarmInformation::isolatedCopy const):
519         (WebCore::FontCache::PrewarmInformation::encode const):
520         (WebCore::FontCache::PrewarmInformation::decode):
521
522         Make font cache prewarm information a struct with encode/decode support and move it into FontCache scope.
523
524         * platform/graphics/cocoa/FontCacheCoreText.cpp:
525         (WebCore::FontDatabase::collectionForFamily):
526         (WebCore::FontCache::systemFallbackForCharacters):
527
528         Collect the names of fonts that end up needing character specific system fallbacks.
529
530         (WebCore::FontCache::collectPrewarmInformation const):
531
532         Include them into prewarm information.
533
534         (WebCore::FontCache::prewarm):
535
536         Invoking CTFontCreateForCharactersWithLanguage for the correct named font seems sufficient to fully
537         prewarm it for fallbacks (independent of size, locale or other characteristics).
538         Any future calls to systemFallbackForCharacters are fast.
539
540 2018-10-15  Chris Dumez  <cdumez@apple.com>
541
542         Restrict browsing context lookup by name to frames that are related to one another
543         https://bugs.webkit.org/show_bug.cgi?id=190475
544
545         Reviewed by Alex Christensen.
546
547         Update our frame lookup by name logic to take in the active / requesting frame and
548         only a return a frame that is related to it. By related to it, I mean:
549         - Ancestor <-> Descendant relationship
550         - Opener <-> Openee relationship
551
552         Being able to look up unrelated frames makes process swapping difficult so we need
553         to be stricter.
554
555         This change is being discussed at:
556         - https://github.com/whatwg/html/issues/313
557
558         Tests: http/tests/dom/new-window-can-target-opener.html
559                http/tests/dom/noopener-window-cannot-target-opener.html
560                http/tests/dom/noopener-window-not-targetable.html
561                http/tests/dom/noopener-window-not-targetable2.html
562                http/tests/dom/noreferrer-window-not-targetable.html
563                http/tests/dom/opened-window-not-targetable-after-disowning-opener.html
564
565         * loader/FrameLoader.cpp:
566         (WebCore::FrameLoader::findFrameForNavigation):
567         * page/FrameTree.cpp:
568         (WebCore::isFrameFamiliarWith):
569         (WebCore::FrameTree::find const):
570         * page/FrameTree.h:
571         * rendering/HitTestResult.cpp:
572         (WebCore::HitTestResult::targetFrame const):
573
574 2018-10-15  Alex Christensen  <achristensen@webkit.org>
575
576         Shrink more enum classes
577         https://bugs.webkit.org/show_bug.cgi?id=190540
578
579         Reviewed by Chris Dumez.
580
581         * Modules/notifications/NotificationDirection.h:
582         * dom/Document.h:
583         * loader/FrameLoader.h:
584         * loader/FrameLoaderClient.h:
585         * loader/HistoryController.h:
586         * loader/ShouldSkipSafeBrowsingCheck.h:
587         * loader/ShouldTreatAsContinuingLoad.h:
588         * page/AutoplayEvent.h:
589         * page/ChromeClient.h:
590         * page/DiagnosticLoggingClient.h:
591         * page/Page.h:
592         * platform/CookiesStrategy.h:
593         * platform/audio/AudioSession.h:
594         * platform/network/NetworkStorageSession.h:
595         * platform/network/StoredCredentialsPolicy.h:
596         * workers/service/SWClientConnection.h:
597         * workers/service/ServiceWorkerContainer.h:
598         * workers/service/ServiceWorkerRegistrationData.h:
599         * workers/service/ServiceWorkerRegistrationOptions.h:
600         * workers/service/ServiceWorkerTypes.h:
601         * workers/service/ServiceWorkerUpdateViaCache.h:
602         * workers/service/server/SWServer.h:
603         * workers/service/server/SWServerRegistration.h:
604
605 2018-10-15  Patrick Griffis  <pgriffis@igalia.com>
606
607         [GTK][WPE] Implement subprocess sandboxing
608         https://bugs.webkit.org/show_bug.cgi?id=188568
609
610         Reviewed by Michael Catanzaro.
611
612         Link against libseccomp.
613
614         * PlatformGTK.cmake:
615
616 2018-10-15  YUHAN WU  <yuhan_wu@apple.com>
617
618         Implement error handler of MediaRecorder
619         https://bugs.webkit.org/show_bug.cgi?id=190438
620
621         Reviewed by Youenn Fablet.
622
623         Test: imported/w3c/web-platform-tests/mediacapture-record/MediaRecorder-error.html
624
625         Implement error event handler (onerror) for MediaRecorder and basic architecture of start() function.
626
627         * CMakeLists.txt:
628         * DerivedSources.make:
629         * Modules/mediarecorder/MediaRecorder.cpp:
630         (WebCore::MediaRecorder::MediaRecorder):
631         (WebCore::MediaRecorder::~MediaRecorder):
632         (WebCore::MediaRecorder::stop):
633         (WebCore::MediaRecorder::start):
634         (WebCore::MediaRecorder::setNewRecordingState):
635         (WebCore::MediaRecorder::scheduleDeferredTask):
636         (WebCore::MediaRecorder::didAddOrRemoveTrack):
637         * Modules/mediarecorder/MediaRecorder.h:
638         * Modules/mediarecorder/MediaRecorder.idl:
639         * Modules/mediarecorder/MediaRecorderErrorEvent.cpp: Added.
640         (WebCore::MediaRecorderErrorEvent::create):
641         (WebCore::MediaRecorderErrorEvent::MediaRecorderErrorEvent):
642         (WebCore::MediaRecorderErrorEvent::eventInterface const):
643         * Modules/mediarecorder/MediaRecorderErrorEvent.h: Added.
644         * Modules/mediarecorder/MediaRecorderErrorEvent.idl: Added.
645         * Sources.txt:
646         * WebCore.xcodeproj/project.pbxproj:
647         * bindings/js/WebCoreBuiltinNames.h:
648         * dom/EventNames.in:
649         * dom/EventTargetFactory.in:
650
651 2018-10-15  Chris Dumez  <cdumez@apple.com>
652
653         Window's properties such as 'location' should not become null when it loses its browsing context
654         https://bugs.webkit.org/show_bug.cgi?id=190539
655
656         Reviewed by Alex Christensen.
657
658         Window's properties such as 'location' should not become null when it loses its browsing context.
659         This Webkit behavior is not standard and does not match other browsers so this patch makes it so
660         that those properties persist.
661
662         Tests: http/tests/dom/cross-origin-detached-window-properties.html
663                http/tests/dom/same-origin-detached-window-properties.html
664
665         * bindings/js/JSDOMBindingSecurity.cpp:
666         (WebCore::BindingSecurity::shouldAllowAccessToDOMWindow):
667         * bindings/js/JSDOMBindingSecurity.h:
668         * bindings/js/JSDOMWindowProperties.cpp:
669         (WebCore::jsDOMWindowPropertiesGetOwnPropertySlotNamedItemGetter):
670         (WebCore::JSDOMWindowProperties::getOwnPropertySlot):
671         * bindings/js/JSLocationCustom.cpp:
672         (WebCore::getOwnPropertySlotCommon):
673         (WebCore::putCommon):
674         (WebCore::JSLocation::deleteProperty):
675         (WebCore::JSLocation::deletePropertyByIndex):
676         (WebCore::JSLocation::getOwnPropertyNames):
677         (WebCore::JSLocation::defineOwnProperty):
678         (WebCore::JSLocation::getPrototype):
679         (WebCore::JSLocation::toStringName):
680         * bindings/scripts/CodeGeneratorJS.pm:
681         (GenerateAttributeGetterBodyDefinition):
682         (GenerateAttributeSetterBodyDefinition):
683         (GenerateOperationBodyDefinition):
684         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
685         (WebCore::jsTestActiveDOMObjectExcitingAttrGetter):
686         (WebCore::jsTestActiveDOMObjectPrototypeFunctionExcitingFunctionBody):
687         * crypto/SubtleCrypto.cpp:
688         (WebCore::SubtleCrypto::SubtleCrypto):
689         * crypto/SubtleCrypto.h:
690         (WebCore::SubtleCrypto::create):
691         * dom/Document.cpp:
692         (WebCore::Document::~Document):
693         * page/Crypto.cpp:
694         (WebCore::Crypto::Crypto):
695         * page/Crypto.h:
696         (WebCore::Crypto::create):
697         * page/DOMWindow.cpp:
698         (WebCore::DOMWindow::~DOMWindow):
699         (WebCore::DOMWindow::frameDestroyed):
700         (WebCore::DOMWindow::screen):
701         (WebCore::DOMWindow::history):
702         (WebCore::DOMWindow::crypto):
703         (WebCore::DOMWindow::locationbar):
704         (WebCore::DOMWindow::menubar):
705         (WebCore::DOMWindow::personalbar):
706         (WebCore::DOMWindow::scrollbars):
707         (WebCore::DOMWindow::statusbar):
708         (WebCore::DOMWindow::toolbar):
709         (WebCore::DOMWindow::console const):
710         (WebCore::DOMWindow::applicationCache):
711         (WebCore::DOMWindow::navigator):
712         (WebCore::DOMWindow::performance const):
713         (WebCore::DOMWindow::location):
714         (WebCore::DOMWindow::visualViewport):
715         (WebCore::DOMWindow::styleMedia):
716         * page/DOMWindow.h:
717         * page/DOMWindow.idl:
718         * workers/WorkerGlobalScope.cpp:
719         (WebCore::WorkerGlobalScope::crypto):
720
721 2018-10-15  Alex Christensen  <achristensen@webkit.org>
722
723         Include EnumTraits.h less
724         https://bugs.webkit.org/show_bug.cgi?id=190535
725
726         Reviewed by Chris Dumez.
727
728         * Modules/applepay/ApplePaySessionPaymentRequest.h:
729         * Modules/applepay/PaymentAuthorizationStatus.h:
730         * Modules/applicationmanifest/ApplicationManifest.h:
731         * Modules/fetch/FetchHeaders.h:
732         * Modules/webauthn/AuthenticatorTransport.h:
733         * Modules/webauthn/PublicKeyCredentialType.h:
734         * loader/ShouldSkipSafeBrowsingCheck.h:
735         * loader/ShouldTreatAsContinuingLoad.h:
736         * platform/Cookie.h:
737         * platform/audio/AudioSession.h:
738         * platform/mediastream/CaptureDevice.h:
739         * platform/mediastream/MediaStreamRequest.h:
740         * platform/mediastream/RealtimeMediaSourceSettings.h:
741         * platform/mediastream/libwebrtc/LibWebRTCProvider.h:
742         * platform/network/NetworkLoadInformation.h:
743         * workers/service/ServiceWorkerClientType.h:
744         * workers/service/ServiceWorkerTypes.h:
745         * workers/service/ServiceWorkerUpdateViaCache.h:
746
747 2018-10-15  Alex Christensen  <achristensen@webkit.org>
748
749         Remove InjectedBundle processing of back/forward lists
750         https://bugs.webkit.org/show_bug.cgi?id=190459
751
752         Reviewed by Chris Dumez.
753
754         The uses of these functions are dead code I removed in rdar://problem/45180545
755         Removing these functions is a step towards fixing the PSON history bugs.
756
757         * loader/EmptyFrameLoaderClient.h:
758         * loader/FrameLoaderClient.h:
759         * loader/HistoryController.cpp:
760         (WebCore::HistoryController::goToItem):
761
762 2018-10-14  Yusuke Suzuki  <yusukesuzuki@slowstart.org>
763
764         [JSC] Remove Option::useAsyncIterator
765         https://bugs.webkit.org/show_bug.cgi?id=190567
766
767         Reviewed by Saam Barati.
768
769         * Configurations/FeatureDefines.xcconfig:
770
771 2018-10-15  Philippe Normand  <pnormand@igalia.com>
772
773         [GStreamer] Fix EME build for GStreamer 1.14.x
774         https://bugs.webkit.org/show_bug.cgi?id=190471
775
776         Reviewed by Xabier Rodriguez-Calvar.
777
778         * platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.cpp:
779         (webkitMediaCommonEncryptionDecryptTransformCaps): The
780         GST_PROTECTION_UNSPECIFIED_SYSTEM_ID #define won't be shipped
781         until the GStreamer 1.16.0 release, so its use needs to be wrapped
782         between a version check.
783         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
784         (WebCore::MediaPlayerPrivateGStreamerBase::initializationDataEncountered): Ditto.
785
786 2018-10-12  Wenson Hsieh  <wenson_hsieh@apple.com>
787
788         [iOS] Allow SPI clients to lay out at arbitrarily scaled sizes and scale to fit the view
789         https://bugs.webkit.org/show_bug.cgi?id=190504
790         <rdar://problem/45117760>
791
792         Reviewed by Tim Horton.
793
794         Add support in ViewportConfiguration for applying a layout size scale factor to the viewport. See below for
795         more details.
796
797         Tests: fast/viewport/ios/constant-width-viewport-after-changing-view-scale.html
798                fast/viewport/ios/device-width-viewport-after-changing-view-scale.html
799
800         * page/ViewportConfiguration.cpp:
801         (WebCore::ViewportConfiguration::setViewLayoutSize):
802
803         The viewport's layout size may now be changed alongside the layout size scale factor. If either of these two
804         variables change, we recompute our minimum layout size and viewport configuration parameters.
805
806         (WebCore::ViewportConfiguration::shouldIgnoreHorizontalScalingConstraints const):
807         (WebCore::ViewportConfiguration::nativeWebpageParameters):
808         (WebCore::ViewportConfiguration::testingParameters):
809         (WebCore::ViewportConfiguration::updateConfiguration):
810
811         Multiply the minimum scale, initial scale, and maximum scale by the layout size scale factor. This allows us to
812         keep the document well-proportioned within the viewport, while still laying out at a different layout size.
813
814         (WebCore::ViewportConfiguration::updateMinimumLayoutSize):
815
816         Compute the minimum layout size by scaling the default layout size derived from our view's size.
817
818         (WebCore::ViewportConfiguration::layoutWidth const):
819         (WebCore::ViewportConfiguration::layoutHeight const):
820         * page/ViewportConfiguration.h:
821
822         Maintain the original initial scale, unaffected by the layout size scale factor. This is used when computing
823         layout width and height to prevent scaling by the layout size scale factor twice when computing layout sizes.
824
825         (WebCore::ViewportConfiguration::description const):
826
827         Include the layout size scale factor in ViewportConfiguration's description string.
828
829         (WebCore::ViewportConfiguration::Parameters::operator== const):
830         (WebCore::operator<<):
831
832 2018-10-12  Youenn Fablet  <youenn@apple.com>
833
834         Use downcast for use of RealtimeMediaSource in LibWebRTCMediaEndpoint
835         https://bugs.webkit.org/show_bug.cgi?id=190533
836
837         Reviewed by Chris Dumez.
838
839         Clean-up work.
840         No change of behavior.
841
842         * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:
843         (WebCore::setExistingReceiverSourceTrack):
844         * platform/mediastream/RealtimeIncomingAudioSource.h:
845         (isType):
846         * platform/mediastream/RealtimeIncomingVideoSource.h:
847         (isType):
848         * platform/mediastream/RealtimeMediaSource.h:
849
850 2018-10-12  Jer Noble  <jer.noble@apple.com>
851
852         WebAVSampleBufferErrorListener's parent should be a WeakPtr.
853         https://bugs.webkit.org/show_bug.cgi?id=190524
854         <rdar://problem/44359307>
855
856         Reviewed by Eric Carlson.
857
858         Once WebAVSampleBufferErrorListener's parent is a WeakPtr, we no longer need to pass
859         protectedSelf into the callOnMainThread lambdas; we can pass in the parent itself.
860
861         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
862         (-[WebAVSampleBufferErrorListener initWithParent:]):
863         (-[WebAVSampleBufferErrorListener observeValueForKeyPath:ofObject:change:context:]):
864         (-[WebAVSampleBufferErrorListener layerFailedToDecode:]):
865         (WebCore::SourceBufferPrivateAVFObjC::SourceBufferPrivateAVFObjC):
866         (WebCore::SourceBufferPrivateAVFObjC::destroyRenderers):
867
868 2018-10-12  Ryosuke Niwa  <rniwa@webkit.org>
869
870         Address the review comment which was meant to be addressed in r237025.
871
872         * editing/MarkupAccumulator.cpp:
873         (WebCore::elementCannotHaveEndTag):
874
875 2018-10-12  Youenn Fablet  <youenn@apple.com> and Alejandro G. Castro  <alex@igalia.com>
876
877         Refresh libwebrtc up to 343f4144be
878         https://bugs.webkit.org/show_bug.cgi?id=190361
879
880         Reviewed by Chris Dumez.
881
882         This refresh should not change behavior but will allow us to implement better
883         mdns candidate support and simulcast activation surfacing through addTransceiver.
884         Covered by existing tests.
885
886         * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:
887         (WebCore::LibWebRTCMediaEndpoint::doCreateAnswer):
888         * testing/MockLibWebRTCPeerConnection.cpp:
889         (WebCore::MockLibWebRTCPeerConnection::CreateAnswer):
890         * testing/MockLibWebRTCPeerConnection.h:
891         (WebCore::MockRtpSender::GetParameters): Deleted.
892         (WebCore::MockRtpSender::SetParameters): Deleted.
893         (WebCore::MockRtpSender::GetDtmfSender const): Deleted.
894
895 2018-10-12  Alex Christensen  <achristensen@webkit.org>
896
897         Allow encoding of small enum classes
898         https://bugs.webkit.org/show_bug.cgi?id=190531
899
900         Reviewed by Tim Horton.
901
902         * Modules/webauthn/PublicKeyCredentialCreationOptions.h:
903         * dom/Document.h:
904         * editing/FontAttributeChanges.h:
905         * history/CachedFrame.h:
906         * loader/FrameLoaderTypes.h:
907         * platform/CookiesStrategy.h:
908         * platform/PasteboardItemInfo.h:
909         * platform/ReferrerPolicy.h:
910
911 2018-10-12  Rob Buis  <rbuis@igalia.com>
912
913         Solve the confusion around blankURL() and isBlankURL() in URL
914         https://bugs.webkit.org/show_bug.cgi?id=158988
915
916         Reviewed by Alex Christensen.
917
918         The name isBlankURL is not accurate as the function tests the
919         protocol, not the full URL. Choose protocolIsAbout to align with
920         exisiting protocolIsData, protocolIsBlob etc.
921
922         No tests as no change in functionality.
923
924         * WebCore.order:
925         * loader/DocumentLoader.cpp:
926         (WebCore::DocumentLoader::loadApplicationManifest):
927         (WebCore::DocumentLoader::startIconLoading):
928         * loader/NavigationAction.cpp:
929         (WebCore::shouldTreatAsSameOriginNavigation):
930         * loader/PolicyChecker.cpp:
931         (WebCore::PolicyChecker::checkNavigationPolicy):
932         * loader/ResourceLoadObserver.cpp:
933         (WebCore::ResourceLoadObserver::logUserInteractionWithReducedTimeResolution):
934         * page/PageSerializer.cpp:
935         (WebCore::PageSerializer::SerializerMarkupAccumulator::appendCustomAttributes):
936         (WebCore::PageSerializer::serializeFrame):
937         * page/csp/ContentSecurityPolicyDirectiveList.cpp:
938         (WebCore::ContentSecurityPolicyDirectiveList::violatedDirectiveForFrame const):
939         (WebCore::ContentSecurityPolicyDirectiveList::violatedDirectiveForObjectSource const):
940         * platform/URL.cpp:
941         (WebCore::URL::protocolIsAbout const):
942         (WebCore::URL::isBlankURL const): Deleted.
943         * platform/URL.h:
944         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
945         (WebCore::MediaPlayerPrivateGStreamer::loadFull):
946
947 2018-10-12  Youenn Fablet  <youenn@apple.com>
948
949         DOMCache should dereference itself as soon as stopped
950         https://bugs.webkit.org/show_bug.cgi?id=190441
951
952         Reviewed by Chris Dumez.
953
954         Dereference the DOMCache as soon as its context is stopped instead of waiting for garbage collection.
955         This allows freeing resources sooner in the network process.
956         No observable change of behavior since the DOMCache becomes no-op when its context is stopped.
957
958         * Modules/cache/DOMCache.cpp:
959         (WebCore::DOMCache::~DOMCache):
960         (WebCore::DOMCache::stop):
961
962 2018-10-12  Jer Noble  <jer.noble@apple.com>
963
964         CRASH in WebCore::MediaPlayerPrivateAVFoundation::setPreload
965         https://bugs.webkit.org/show_bug.cgi?id=190485
966         <rdar://problem/34613350>
967
968         Reviewed by Eric Carlson.
969
970         Crash analytics show that a pure-virtual function is called by MediaPlayerPrivateAVFoundation::setPreload(), and
971         the likely cause of that pure-virtual function call is that the MediaPlayerPrivateAVFoundation object itself has
972         been destroyed, likely as a side effect of calling MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL().
973         The usual suspect for this kind of crash is due to calling into JS (e.g., from a callback passed up to
974         HTMLMediaElement). Code inspection hasn't yielded any good hints about why this might be occurring, so we will
975         add a ScriptDisallowedScope assertion inside HTMLMediaElement::prepareToPlay(), to generate a good crashlog
976         showing exactly what callback is resulting in a JS call. But just in case the deallocation is not due to JS,
977         also add an explicit strong-ref inside MediaPlayer::prepareToPlay.
978
979         * html/HTMLMediaElement.cpp:
980         (WebCore::HTMLMediaElement::prepareToPlay):
981         * platform/graphics/MediaPlayer.cpp:
982         (WebCore::MediaPlayer::prepareToPlay):
983
984 2018-10-12  Jer Noble  <jer.noble@apple.com>
985
986         Null-dereference in SourceBufferPrivateAVFObjC::outputObscuredDueToInsufficientExternalProtectionChanged
987         https://bugs.webkit.org/show_bug.cgi?id=190490
988         <rdar://problem/42213807>
989
990         Reviewed by Eric Carlson.
991
992         Crash analytics show a null dereference occurring, likely because m_mediaSource is null.
993
994         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
995         (WebCore::SourceBufferPrivateAVFObjC::outputObscuredDueToInsufficientExternalProtectionChanged):
996
997 2018-10-11  Don Olmstead  <don.olmstead@sony.com>
998
999         Add Houdini specs to features.json
1000         https://bugs.webkit.org/show_bug.cgi?id=190494
1001         <rdar://problem/45211879>
1002
1003         Unreviewed fix.
1004
1005         Specifications should not reference other specifications. Also
1006         move Worklet into the specifications section.
1007
1008         * features.json:
1009
1010 2018-10-11  Youenn Fablet  <youenn@apple.com>
1011
1012         IOS 12 - Service worker cache not shared when added to homescreen
1013         https://bugs.webkit.org/show_bug.cgi?id=190269
1014         <rdar://problem/45009961>
1015
1016         Reviewed by Alex Christensen.
1017
1018         Expose Cache Storage API when Service Worker API is exposed.
1019         This is used for API tests.
1020
1021         * dom/ScriptExecutionContext.h: Make hasServiceWorkerScheme
1022         available outside SERVICE_WORKER compilation flag since used by DOMWindowCaches.
1023         * dom/ScriptExecutionContext.cpp: Ditto.
1024         * Modules/cache/DOMWindowCaches.idl:
1025
1026 2018-10-10  Simon Fraser  <simon.fraser@apple.com>
1027
1028         Hide RenderLayer z-order and normal flow lists behind iterators
1029         https://bugs.webkit.org/show_bug.cgi?id=190457
1030
1031         Reviewed by Zalan Bujtas.
1032
1033         Expose the positive z-order, negative z-order and normal flow lists
1034         from RenderLayer as iterators rather than vectors of raw pointers.
1035         
1036         This hides the fact that the vectors can be null, and allows for easier casting in future.
1037
1038         * rendering/RenderLayer.cpp:
1039         (WebCore::RenderLayer::update3DTransformedDescendantStatus):
1040         (WebCore::RenderLayer::paintLayerContents):
1041         (WebCore::RenderLayer::paintList):
1042         (WebCore::RenderLayer::hitTestLayer):
1043         (WebCore::RenderLayer::hitTestList):
1044         (WebCore::RenderLayer::calculateClipRects const):
1045         * rendering/RenderLayer.h:
1046         * rendering/RenderLayerBacking.cpp:
1047         (WebCore::traverseVisibleNonCompositedDescendantLayers):
1048         * rendering/RenderLayerCompositor.cpp:
1049         (WebCore::RenderLayerCompositor::addToOverlapMapRecursive):
1050         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
1051         (WebCore::RenderLayerCompositor::rebuildCompositingLayerTree):
1052         (WebCore::RenderLayerCompositor::updateLayerTreeGeometry):
1053         (WebCore::RenderLayerCompositor::updateCompositingDescendantGeometry):
1054         (WebCore::RenderLayerCompositor::recursiveRepaintLayer):
1055         (WebCore::RenderLayerCompositor::needsContentsCompositingLayer const):
1056         (WebCore::RenderLayerCompositor::layerHas3DContent const):
1057         * rendering/RenderTreeAsText.cpp:
1058         (WebCore::writeLayers):
1059
1060 2018-10-11  Don Olmstead  <don.olmstead@sony.com>
1061
1062         Add Houdini specs to features.json
1063         https://bugs.webkit.org/show_bug.cgi?id=190494
1064
1065         Reviewed by Simon Fraser.
1066
1067         Add CSS Typed OM Level 1, CSS Layout API Level 1, CSS Animation
1068         Worklet, and group them under a Houdini feature set.
1069
1070         * features.json:
1071
1072 2018-10-11  Ross Kirsling  <ross.kirsling@sony.com>
1073
1074         [WTF] Semaphore.h conflicts with POSIX header
1075         https://bugs.webkit.org/show_bug.cgi?id=190486
1076
1077         Reviewed by Yusuke Suzuki.
1078
1079         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
1080
1081 2018-10-11  Thibault Saunier  <tsaunier@igalia.com>
1082
1083         [GStreamer] Support arbitrary video resolution in getUserMedia API
1084         https://bugs.webkit.org/show_bug.cgi?id=189734
1085
1086         Reviewed by Xabier Rodriguez-Calvar.
1087
1088         Implement arbitrary video resolution for the getUserMedia API in GStreamer.
1089
1090         Fix the MockRealtimeMediaSource device list to make devices properties match
1091         test expectations.
1092
1093         Reactivate tests that were failling because of that.
1094
1095         * platform/mediastream/RealtimeVideoSource.cpp:
1096         (WebCore::RealtimeVideoSource::standardVideoSizes):
1097         (WebCore::standardVideoSizes): Deleted.
1098         * platform/mediastream/RealtimeVideoSource.h:
1099         * platform/mediastream/VideoPreset.h:
1100         * platform/mediastream/gstreamer/GStreamerVideoCaptureSource.cpp:
1101         (WebCore::GStreamerVideoPreset::create):
1102         (WebCore::GStreamerVideoPreset::GStreamerVideoPreset):
1103         (WebCore::GStreamerVideoCaptureSource::GStreamerVideoCaptureSource):
1104         (WebCore::GStreamerVideoCaptureSource::capabilities):
1105         (WebCore::GStreamerVideoCaptureSource::generatePresets):
1106         * platform/mediastream/gstreamer/GStreamerVideoCaptureSource.h:
1107         * platform/mock/MockRealtimeMediaSourceCenter.cpp:
1108         (WebCore::defaultDevices):
1109
1110 2018-10-11  Keith Rollin  <krollin@apple.com>
1111
1112         CURRENT_ARCH should not be used in Run Script phase.
1113         https://bugs.webkit.org/show_bug.cgi?id=190407
1114         <rdar://problem/45133556>
1115
1116         Reviewed by Alexey Proskuryakov.
1117
1118         CURRENT_ARCH is used in a number of Xcode Run Script phases. However,
1119         CURRENT_ARCH is not well-defined during this phase (and may even have
1120         the value "undefined") since this phase is run just once per build
1121         rather than once per supported architecture. Migrate away from
1122         CURRENT_ARCH in favor of ARCHS, either by iterating over ARCHS and
1123         performing an operation for each value, or by picking the first entry
1124         in ARCHS and using that as a representative value.
1125
1126         No new tests -- no functional changes.
1127
1128         * DerivedSources.make: When forming TARGET_TRIPLE_FLAGS, grab the
1129         first entry in ARCHS rather than use CURRENT_ARCH.
1130
1131 2018-10-11  Daniel Bates  <dabates@apple.com>
1132
1133         Support building WebKit for macOS Mojave using a newer SDK
1134         https://bugs.webkit.org/show_bug.cgi?id=190431
1135
1136         Reviewed by Andy Estes.
1137
1138         * platform/network/cocoa/CookieCocoa.mm:
1139         (WebCore::coreSameSitePolicy):
1140         (WebCore::nsSameSitePolicy):
1141
1142 2018-10-11  Daniel Bates  <dabates@apple.com>
1143
1144         [iOS] Add typedef for WebEvent keyboard flags
1145         https://bugs.webkit.org/show_bug.cgi?id=190435
1146
1147         Reviewed by Wenson Hsieh.
1148
1149         Currently WebEvent and UIKit SPI are intertwined when it comes to keyboard flags. It seems sufficient
1150         to have WebEvent defined its own keyboard flags so that callers do not need to be aware of UIKit SPI.
1151
1152         No functionality changed. So, no new tests.
1153
1154         * platform/ios/WebEvent.h:
1155         * platform/ios/WebEvent.mm:
1156         (-[WebEvent keyboardFlags]):
1157
1158 2018-10-11  Antti Koivisto  <antti@apple.com>
1159
1160         Use finer grained locking in FontDatabase
1161         https://bugs.webkit.org/show_bug.cgi?id=190467
1162
1163         Reviewed by Alex Christensen.
1164
1165         * platform/graphics/FontCache.h:
1166
1167         Also use ListHashSet for prewarming info so we can prewarm in the same order the fonts were
1168         seen last time.
1169
1170         * platform/graphics/cocoa/FontCacheCoreText.cpp:
1171         (WebCore::FontDatabase::collectionForFamily):
1172
1173         Only hold the lock when accessing the hashmap. There is no need to hold it during font construction
1174         which can take a long time.
1175
1176         (WebCore::FontDatabase::fontForPostScriptName):
1177
1178         This is currently not prewarmed from a thread so no need for locking.
1179
1180         (WebCore::FontDatabase::clear):
1181
1182 2018-10-11  Thibault Saunier  <tsaunier@igalia.com>
1183
1184         [GStreamer] Fix race condition in GStreamerVideoDecoder
1185         https://bugs.webkit.org/show_bug.cgi?id=190470
1186
1187         The GStreamerVideoDecoder.m_dtsPtsMap filed is accessed from
1188         the main thread and some GStreamer streaming thread, make sure
1189         to protect its access.
1190
1191         And use WTF::StdMap instead of std::map.
1192
1193         Reviewed by Philippe Normand.
1194
1195         Manually tested and a random crash is gone.
1196
1197         * platform/mediastream/libwebrtc/GStreamerVideoDecoderFactory.cpp:
1198         (WebCore::GStreamerVideoDecoder::newSampleCallback):
1199
1200 2018-10-11  Enrique Ocaña González  <eocanha@igalia.com>
1201
1202         [GStreamer][MSE] Fix height calculation for streams with source aspect ratio
1203         https://bugs.webkit.org/show_bug.cgi?id=190464
1204
1205         Reviewed by Xabier Rodriguez-Calvar.
1206
1207         This patch is authored by Nikola Veljkovic <Nikola.Veljkovic@zenterio.com>
1208
1209         * platform/graphics/gstreamer/GStreamerCommon.cpp:
1210         (WebCore::getVideoResolutionFromCaps): Reverse the SAR adjustment to "undo" it
1211         instead of applying it twice.
1212
1213 2018-10-11  Alejandro G. Castro  <alex@igalia.com>
1214
1215         [GTK][WPE] Add mediaDevices.enumerateDevices support
1216         https://bugs.webkit.org/show_bug.cgi?id=185761
1217
1218         Reviewed by Youenn Fablet.
1219
1220         We are adopting the same policy COCOA is using when returning the
1221         list of media devices if the user does not have persistent
1222         access. Namely, we just return the first media device for audio
1223         and video capture.
1224
1225         * Modules/mediastream/MediaDevicesRequest.cpp:
1226         (WebCore::MediaDevicesRequest::filterDeviceList): Add support for
1227         other platforms when filtering devices if there is no persistent
1228         access to the origin.
1229
1230 2018-10-10  Chris Dumez  <cdumez@apple.com>
1231
1232         Rename a couple of DOMWindowProperty virtual functions
1233         https://bugs.webkit.org/show_bug.cgi?id=190458
1234
1235         Reviewed by Geoffrey Garen.
1236
1237         Rename a couple of DOMWindowProperty virtual functions as the current naming no longer makes
1238         sense after recent refactoring.
1239
1240         disconnectFrameForDocumentSuspension() was renamed to suspendForPageCache(), and
1241         reconnectFrameFromDocumentSuspension(Frame*) was renamed to resumeFromPageCache().
1242         DOMWindowProperty objects no longer need to disconnect / reconnect from their
1243         frame since they now get their frame from their associated Window. However, some
1244         DOMWindowProperty subclasses do have some page cache suspension / resuming logic
1245         implemented of overrides of these functions.
1246
1247         Also drop the disconnectDOMWindowProperties() / reconnectDOMWindowProperties()
1248         methods in DOMWindow. The naming made little sense as it does not really
1249         disconnect those properties in any way. Instead, inline them in
1250         DOMWindow's suspendForPageCache() / resumeFromPageCache() since these are
1251         the only callers.
1252
1253         * Modules/indexeddb/DOMWindowIndexedDatabase.cpp:
1254         (WebCore::DOMWindowIndexedDatabase::suspendForPageCache):
1255         (WebCore::DOMWindowIndexedDatabase::resumeFromPageCache):
1256         (WebCore::DOMWindowIndexedDatabase::disconnectFrameForDocumentSuspension): Deleted.
1257         (WebCore::DOMWindowIndexedDatabase::reconnectFrameFromDocumentSuspension): Deleted.
1258         * Modules/indexeddb/DOMWindowIndexedDatabase.h:
1259         * history/CachedFrame.cpp:
1260         (WebCore::CachedFrame::CachedFrame):
1261         * loader/FrameLoader.cpp:
1262         (WebCore::FrameLoader::open):
1263         * loader/appcache/DOMApplicationCache.cpp:
1264         (WebCore::DOMApplicationCache::suspendForPageCache):
1265         (WebCore::DOMApplicationCache::resumeFromPageCache):
1266         (WebCore::DOMApplicationCache::disconnectFrameForDocumentSuspension): Deleted.
1267         (WebCore::DOMApplicationCache::reconnectFrameFromDocumentSuspension): Deleted.
1268         * loader/appcache/DOMApplicationCache.h:
1269         * page/DOMWindow.cpp:
1270         (WebCore::DOMWindow::suspendForPageCache):
1271         (WebCore::DOMWindow::resumeFromPageCache):
1272         (WebCore::DOMWindow::suspendForDocumentSuspension): Deleted.
1273         (WebCore::DOMWindow::resumeFromDocumentSuspension): Deleted.
1274         (WebCore::DOMWindow::disconnectDOMWindowProperties): Deleted.
1275         (WebCore::DOMWindow::reconnectDOMWindowProperties): Deleted.
1276         * page/DOMWindow.h:
1277         * page/DOMWindowExtension.cpp:
1278         (WebCore::DOMWindowExtension::suspendForPageCache):
1279         (WebCore::DOMWindowExtension::resumeFromPageCache):
1280         (WebCore::DOMWindowExtension::disconnectFrameForDocumentSuspension): Deleted.
1281         (WebCore::DOMWindowExtension::reconnectFrameFromDocumentSuspension): Deleted.
1282         * page/DOMWindowExtension.h:
1283         * page/DOMWindowProperty.cpp:
1284         (WebCore::DOMWindowProperty::suspendForPageCache):
1285         (WebCore::DOMWindowProperty::resumeFromPageCache):
1286         (WebCore::DOMWindowProperty::disconnectFrameForDocumentSuspension): Deleted.
1287         (WebCore::DOMWindowProperty::reconnectFrameFromDocumentSuspension): Deleted.
1288         * page/DOMWindowProperty.h:
1289
1290 2018-10-10  Devin Rousso  <drousso@apple.com>
1291
1292         Web Inspector: create special Network waterfall for media events
1293         https://bugs.webkit.org/show_bug.cgi?id=189773
1294         <rdar://problem/44626605>
1295
1296         Reviewed by Joseph Pecoraro.
1297
1298         Test: http/tests/inspector/dom/didFireEvent.html
1299
1300         * html/HTMLMediaElement.cpp:
1301         (WebCore::HTMLMediaElement::HTMLMediaElement):
1302
1303         * inspector/InspectorInstrumentation.h:
1304         (WebCore::InspectorInstrumentation::addEventListenersToNode): Added.
1305         * inspector/InspectorInstrumentation.cpp:
1306         (WebCore::InspectorInstrumentation::addEventListenersToNodeImpl): Added.
1307
1308         * inspector/agents/InspectorDOMAgent.h:
1309         * inspector/agents/InspectorDOMAgent.cpp:
1310         (WebCore::EventFiredCallback): Added.
1311         (WebCore::EventFiredCallback::create): Added.
1312         (WebCore::EventFiredCallback::operator==): Added.
1313         (WebCore::EventFiredCallback::handleEvent): Added.
1314         (WebCore::EventFiredCallback::EventFiredCallback): Added.
1315         (WebCore::InspectorDOMAgent::didCreateFrontendAndBackend):
1316         (WebCore::InspectorDOMAgent::addEventListenersToNode): Added.
1317
1318 2018-10-10  Daniel Bates  <dabates@apple.com>
1319
1320         [iOS] Cleanup -[WAKView _selfHandleEvent:] and -[WAKWindow sendEventSynchronously:]
1321         https://bugs.webkit.org/show_bug.cgi?id=190402
1322
1323         Reviewed by Anders Carlsson.
1324
1325         Unindent case statements. Remove use of default case statements with body ASSERT_NOT_REACHED()
1326         to catch the cases of a missing enumerator. By omitting the default case statement we turn
1327         such a scenario into a compile-time error instead of handling it as a runtime error.
1328
1329         * platform/ios/wak/WAKView.mm:
1330         (-[WAKView _selfHandleEvent:]):
1331         * platform/ios/wak/WAKWindow.mm:
1332         (-[WAKWindow sendEventSynchronously:]):
1333
1334 2018-10-05  Ryosuke Niwa  <rniwa@webkit.org>
1335
1336         Rename MarkupAccumulator::appendStartTag, appendElement, etc... for clarity
1337         https://bugs.webkit.org/show_bug.cgi?id=190308
1338
1339         Reviewed by Darin Adler.
1340
1341         Renamed appendStartTag and appendEndTag to startAppendingNode and endAppendingNode since serialize any node,
1342         not just elements which produce start and end tags.
1343
1344         Renamed appendElement and appendEndElement to appendStartTag and appendEndTag since that's what they do.
1345
1346         * editing/MarkupAccumulator.cpp:
1347         (WebCore::elementCannotHaveEndTag): Made this a static local function.
1348         (WebCore::shouldSelfClose): Ditto.
1349         (WebCore::MarkupAccumulator::serializeNodesWithNamespaces):
1350         (WebCore::MarkupAccumulator::startAppendingNode): Renamed from appendStartTag.
1351         (WebCore::MarkupAccumulator::endAppendingNode): Renamed from appendEndElement and merged appendEndMarkup here.
1352         (WebCore::MarkupAccumulator::appendTextSubstring): Deleted. This was only used by StyledMarkupAccumulator.
1353         (WebCore::MarkupAccumulator::appendStringView): Added.
1354         (WebCore::MarkupAccumulator::appendStartTag): Renamed from appendElement.
1355         (WebCore::MarkupAccumulator::appendCloseTag):
1356         (WebCore::MarkupAccumulator::appendNonElementNode): Renamed from appendStartMarkup. No longer serializes
1357         an element. StyledMarkupAccumulator had a check before calling this function already so this clarifies
1358         the purpose of this function.
1359         (WebCore::MarkupAccumulator::appendElement): Deleted.
1360         (WebCore::MarkupAccumulator::appendEndMarkup): Deleted. Merged into appendEndTag.
1361         * editing/MarkupAccumulator.h:
1362         (WebCore::MarkupAccumulator::appendNodeEnd): Renamed from appendEndTag.
1363         * editing/markup.cpp:
1364         (WebCore::StyledMarkupAccumulator::wrapWithNode):
1365         (WebCore::StyledMarkupAccumulator::appendStartTag): Renamed from appendElement.
1366         (WebCore::StyledMarkupAccumulator::appendEndTag): Renamed from appendEndElement.
1367         (WebCore::StyledMarkupAccumulator::traverseNodesForSerialization):
1368         (WebCore::StyledMarkupAccumulator::appendNodeToPreserveMSOList): Use String::substring directly instead of
1369         going through appendTextSubstring which has been deleted.
1370         * page/PageSerializer.cpp:
1371         (WebCore::PageSerializer::SerializerMarkupAccumulator::appendStartTag): Renamed from appendElement.
1372         (WebCore::PageSerializer::SerializerMarkupAccumulator::appendEndTag): Renamed from appendEndElement.
1373
1374 2018-10-10  Ryan Haddad  <ryanhaddad@apple.com>
1375
1376         Unreviewed, attempt to fix the build with current SDKs.
1377
1378         * crypto/mac/CryptoKeyRSAMac.cpp:
1379         (WebCore::getPublicKeyComponents):
1380
1381 2018-10-10  Brent Fulgham  <bfulgham@apple.com>
1382
1383         Only report the supported WebGL version
1384         https://bugs.webkit.org/show_bug.cgi?id=190434
1385         <rdar://problem/45024677>
1386
1387         Reviewed by Dean Jackson.
1388
1389         Tested by fast/canvas/webgl/gl-getstring.html
1390
1391         Revise getParameter(gl.VERSION) to only return the WebGL version without the hardware and
1392         driver-specific details available through the low-level OpenGL driver interface. These details
1393         are not needed for WebGL use and expose information about the user's system that we do not
1394         need to share.
1395
1396         * html/canvas/WebGL2RenderingContext.cpp:
1397         (WebCore::WebGL2RenderingContext::getParameter):
1398         * html/canvas/WebGLRenderingContext.cpp:
1399         (WebCore::WebGLRenderingContext::getParameter):
1400
1401 2018-10-10  Yusuke Suzuki  <yusukesuzuki@slowstart.org>
1402
1403         Unreviewed, add missing headers for inline functions
1404         https://bugs.webkit.org/show_bug.cgi?id=190429
1405
1406         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
1407
1408 2018-10-10  Tim Horton  <timothy_horton@apple.com>
1409
1410         Share more WKShareSheet code between macOS and iOS, and fix a few bugs
1411         https://bugs.webkit.org/show_bug.cgi?id=190420
1412
1413         Reviewed by Simon Fraser.
1414
1415         Test: fast/web-share/share-with-no-url.html
1416
1417         * page/Navigator.cpp:
1418         (WebCore::Navigator::share):
1419         * page/ShareData.h:
1420         Make 'url' an optional field on ShareDataWithParsedURL, and don't
1421         reject the share() promise if the URL is totally empty (as opposed to invalid).
1422
1423 2018-10-10  Devin Rousso  <drousso@apple.com>
1424
1425         Web Inspector: notify the frontend when a canvas has started recording via console.record
1426         https://bugs.webkit.org/show_bug.cgi?id=190306
1427
1428         Reviewed by Brian Burg.
1429
1430         Updated existing tests: LayoutTests/inspector/canvas/recording-2d.html
1431                                 LayoutTests/inspector/canvas/recording-bitmaprenderer.html
1432                                 LayoutTests/inspector/canvas/recording-webgl-snapshots.html
1433                                 LayoutTests/inspector/canvas/recording-webgl.html
1434
1435         * inspector/agents/InspectorCanvasAgent.cpp:
1436         (WebCore::InspectorCanvasAgent::startRecording):
1437         (WebCore::InspectorCanvasAgent::consoleStartRecordingCanvas):
1438
1439         * inspector/InspectorCanvas.h:
1440         Default `singleFrame` to false to better match the default behaviour of other `console`
1441         functions (`profile` doesn't stop until `profileEnd` is called, so the same should be true
1442         of `record` and `recordEnd`).
1443
1444 2018-10-10  Yusuke Suzuki  <yusukesuzuki@slowstart.org>
1445
1446         [JSC] Rename createXXX to tryCreateXXX if it can return RefPtr
1447         https://bugs.webkit.org/show_bug.cgi?id=190429
1448
1449         Reviewed by Saam Barati.
1450
1451         Use `tryCreate` or new `create`. If we use new `create`, we can use Ref<> and remove null check.
1452
1453         * Modules/encryptedmedia/legacy/LegacyCDMSessionClearKey.cpp:
1454         (WebCore::CDMSessionClearKey::cachedKeyForKeyID const):
1455         * Modules/plugins/QuickTimePluginReplacement.mm:
1456         (WebCore::jsValueWithDictionaryInContext):
1457         * Modules/webaudio/AudioBuffer.cpp:
1458         (WebCore::AudioBuffer::AudioBuffer):
1459         (WebCore::AudioBuffer::getChannelData):
1460         * Modules/webvr/VREyeParameters.cpp:
1461         (WebCore::VREyeParameters::offset const):
1462         * Modules/webvr/VRFrameData.cpp:
1463         (WebCore::matrixToArray):
1464         * Modules/webvr/VRPose.cpp:
1465         (WebCore::optionalFloat3ToJSCArray):
1466         (WebCore::VRPose::position const):
1467         (WebCore::VRPose::orientation const):
1468         * Modules/webvr/VRStageParameters.cpp:
1469         (WebCore::VRStageParameters::sittingToStandingTransform const):
1470         * bindings/js/ReadableStreamDefaultController.h:
1471         (WebCore::ReadableStreamDefaultController::enqueue):
1472         * bindings/js/SerializedScriptValue.cpp:
1473         (WebCore::CloneDeserializer::readArrayBufferView):
1474         * crypto/gcrypt/CryptoKeyRSAGCrypt.cpp:
1475         (WebCore::CryptoKeyRSA::algorithm const):
1476         * crypto/mac/CryptoKeyRSAMac.cpp:
1477         (WebCore::CryptoKeyRSA::algorithm const):
1478         * css/DOMMatrixReadOnly.cpp:
1479         (WebCore::DOMMatrixReadOnly::toFloat32Array const):
1480         (WebCore::DOMMatrixReadOnly::toFloat64Array const):
1481         * css/FontFace.cpp:
1482         (WebCore::FontFace::create):
1483         * dom/TextEncoder.cpp:
1484         (WebCore::TextEncoder::encode const):
1485         * html/ImageData.cpp:
1486         (WebCore::ImageData::ImageData):
1487         * html/ImageData.h:
1488         (WebCore::ImageData::data const):
1489         (): Deleted.
1490         * html/canvas/WebGL2RenderingContext.cpp:
1491         (WebCore::WebGL2RenderingContext::bufferData):
1492         (WebCore::WebGL2RenderingContext::bufferSubData):
1493         (WebCore::WebGL2RenderingContext::getInternalformatParameter):
1494         (WebCore::WebGL2RenderingContext::getParameter):
1495         * html/canvas/WebGLRenderingContext.cpp:
1496         (WebCore::WebGLRenderingContext::getParameter):
1497         * html/canvas/WebGLRenderingContextBase.cpp:
1498         (WebCore::WebGLRenderingContextBase::getUniform):
1499         (WebCore::WebGLRenderingContextBase::getVertexAttrib):
1500         (WebCore::WebGLRenderingContextBase::getWebGLFloatArrayParameter):
1501         (WebCore::WebGLRenderingContextBase::getWebGLIntArrayParameter):
1502         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
1503         (WebCore::MediaPlayerPrivateAVFoundation::extractKeyURIKeyIDAndCertificateFromInitData):
1504         * platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.cpp:
1505         (WebCore::CDMSessionAVFoundationCF::generateKeyRequest):
1506         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
1507         (WebCore::AVFWrapper::shouldWaitForLoadingOfResource):
1508         * platform/graphics/avfoundation/objc/CDMSessionAVContentKeySession.mm:
1509         (WebCore::CDMSessionAVContentKeySession::generateKeyRequest):
1510         (WebCore::CDMSessionAVContentKeySession::releaseKeys):
1511         (WebCore::CDMSessionAVContentKeySession::update):
1512         (WebCore::CDMSessionAVContentKeySession::generateKeyReleaseMessage):
1513         * platform/graphics/avfoundation/objc/CDMSessionAVFoundationObjC.mm:
1514         (WebCore::CDMSessionAVFoundationObjC::generateKeyRequest):
1515         * platform/graphics/avfoundation/objc/CDMSessionAVStreamSession.mm:
1516         (WebCore::CDMSessionAVStreamSession::generateKeyRequest):
1517         (WebCore::CDMSessionAVStreamSession::releaseKeys):
1518         (WebCore::CDMSessionAVStreamSession::generateKeyReleaseMessage):
1519         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1520         (WebCore::MediaPlayerPrivateAVFoundationObjC::shouldWaitForLoadingOfResource):
1521         * platform/graphics/avfoundation/objc/MediaSampleAVFObjC.mm:
1522         (WebCore::MediaSampleAVFObjC::getRGBAImageData const):
1523         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
1524         (WebCore::SourceBufferPrivateAVFObjC::didProvideContentKeyRequestInitializationDataForTrackID):
1525         * platform/graphics/cairo/ImageBufferCairo.cpp:
1526         (WebCore::getImageData):
1527         * platform/graphics/cg/ImageBufferDataCG.cpp:
1528         (WebCore::ImageBufferData::getData const):
1529         * platform/graphics/filters/FEGaussianBlur.cpp:
1530         (WebCore::FEGaussianBlur::platformApplySoftware):
1531         * platform/graphics/filters/FilterEffect.cpp:
1532         (WebCore::FilterEffect::unmultipliedResult):
1533         (WebCore::FilterEffect::premultipliedResult):
1534         (WebCore::FilterEffect::copyUnmultipliedResult):
1535         (WebCore::FilterEffect::copyPremultipliedResult):
1536         (WebCore::FilterEffect::createUnmultipliedImageResult):
1537         (WebCore::FilterEffect::createPremultipliedImageResult):
1538         * platform/graphics/win/ImageBufferDataDirect2D.cpp:
1539         (WebCore::ImageBufferData::getData const):
1540         * platform/mac/SerializedPlatformRepresentationMac.mm:
1541         (WebCore::jsValueWithDictionaryInContext):
1542         * platform/mock/mediasource/MockBox.cpp:
1543         (WebCore::MockBox::peekType):
1544         (WebCore::MockBox::peekLength):
1545         (WebCore::MockTrackBox::MockTrackBox):
1546         (WebCore::MockInitializationBox::MockInitializationBox):
1547         (WebCore::MockSampleBox::MockSampleBox):
1548         * rendering/shapes/Shape.cpp:
1549         (WebCore::Shape::createRasterShape):
1550         * testing/LegacyMockCDM.cpp:
1551         (WebCore::initDataPrefix):
1552         (WebCore::keyPrefix):
1553         (WebCore::keyRequest):
1554
1555 2018-10-10  Daniel Bates  <dabates@apple.com>
1556
1557         [iOS] Compare input string to UIKeyInput constants using string comparison instead of pointer comparison
1558         https://bugs.webkit.org/show_bug.cgi?id=190432
1559
1560         Reviewed by Tim Horton.
1561
1562         Pointer comparision is brittle. We should be more forgiving and perform string comparision
1563         of an input string to a UIKeyInput constant.
1564
1565         * platform/ios/WebEvent.mm:
1566         (normalizedStringWithAppKitCompatibilityMapping):
1567
1568 2018-10-10  Chris Dumez  <cdumez@apple.com>
1569
1570         Unreviewed, rolling out r236802.
1571
1572         Working on getting the HTML spec updated instead
1573         (https://github.com/whatwg/html/pull/4079)
1574
1575         Reverted changeset:
1576
1577         "Passing noopener=NOOPENER to window.open() should cause the
1578         new window to not have an opener"
1579         https://bugs.webkit.org/show_bug.cgi?id=190251
1580         https://trac.webkit.org/changeset/236802
1581
1582 2018-10-10  Yusuke Suzuki  <yusukesuzuki@slowstart.org>
1583
1584         XMLHttpRequest should use reportExtraMemoryAllocated/reportExtraMemoryVisited instead of deprecatedReportExtraMemory
1585         https://bugs.webkit.org/show_bug.cgi?id=190279
1586
1587         Reviewed by Ryosuke Niwa.
1588
1589         This patch switches deprecatedReportExtraMemory to reportExtraMemoryAllocated/reportExtraMemoryVisited
1590         in XMLHttpRequest. We report extra memory allocation when the readyState becomes DONE. And memoryCost
1591         function returns the memory cost which is based on the readyState and m_responseBuilder.
1592         We annotate XMLHttpRequest with ReportExtraMemoryCost to use reportExtraMemoryVisited automatically with
1593         memoryCost() function.
1594
1595         * xml/XMLHttpRequest.cpp:
1596         (WebCore::XMLHttpRequest::changeState):
1597         (WebCore::XMLHttpRequest::abort):
1598         (WebCore::XMLHttpRequest::internalAbort):
1599         (WebCore::XMLHttpRequest::networkErrorTimerFired):
1600         (WebCore::XMLHttpRequest::memoryCost const):
1601         (WebCore::XMLHttpRequest::didFinishLoading):
1602         (WebCore::XMLHttpRequest::didReachTimeout):
1603         (WebCore::XMLHttpRequest::dropProtection): Deleted.
1604         * xml/XMLHttpRequest.h:
1605         * xml/XMLHttpRequest.idl:
1606
1607 2018-10-09  Antoine Quint  <graouts@apple.com>
1608
1609         Remove the frames() timing function
1610         https://bugs.webkit.org/show_bug.cgi?id=190034
1611         <rdar://problem/44827544>
1612
1613         Reviewed by Dean Jackson.
1614
1615         * css/CSSComputedStyleDeclaration.cpp:
1616         (WebCore::createTimingFunctionValue):
1617         * css/CSSTimingFunctionValue.cpp:
1618         (WebCore::CSSFramesTimingFunctionValue::customCSSText const): Deleted.
1619         (WebCore::CSSFramesTimingFunctionValue::equals const): Deleted.
1620         * css/CSSTimingFunctionValue.h:
1621         * css/CSSToStyleMap.cpp:
1622         (WebCore::CSSToStyleMap::mapAnimationTimingFunction):
1623         * css/CSSValue.cpp:
1624         (WebCore::CSSValue::equals const):
1625         (WebCore::CSSValue::cssText const):
1626         (WebCore::CSSValue::destroy):
1627         * css/CSSValue.h:
1628         (WebCore::CSSValue::isStepsTimingFunctionValue const):
1629         (WebCore::CSSValue::isFramesTimingFunctionValue const): Deleted.
1630         * css/CSSValueKeywords.in:
1631         * css/parser/CSSPropertyParser.cpp:
1632         (WebCore::consumeAnimationTimingFunction):
1633         (WebCore::consumeFrames): Deleted.
1634         * platform/animation/TimingFunction.cpp:
1635         (WebCore::operator<<):
1636         (WebCore::TimingFunction::transformTime const):
1637         (WebCore::TimingFunction::createFromCSSValue):
1638         * platform/animation/TimingFunction.h:
1639         (WebCore::TimingFunction::isStepsTimingFunction const):
1640         (WebCore::TimingFunction::isFramesTimingFunction const): Deleted.
1641         * platform/graphics/ca/GraphicsLayerCA.cpp:
1642         (WebCore::GraphicsLayerCA::animationCanBeAccelerated const):
1643         (WebCore::animationHasFramesTimingFunction): Deleted.
1644
1645 2018-10-09  Devin Rousso  <drousso@apple.com>
1646
1647         Web Inspector: show redirect requests in Network and Timelines tabs
1648         https://bugs.webkit.org/show_bug.cgi?id=150005
1649         <rdar://problem/5378164>
1650
1651         Reviewed by Joseph Pecoraro.
1652
1653         Updated existing test http/tests/inspector/network/resource-timing.html.
1654
1655         * inspector/agents/InspectorNetworkAgent.cpp:
1656         (WebCore::InspectorNetworkAgent::buildObjectForTiming):
1657         (WebCore::InspectorNetworkAgent::didFinishLoading):
1658         Add missing fields for `Network.types.ResourceTiming`.
1659
1660 2018-10-09  Said Abou-Hallawa  <sabouhallawa@apple.com>
1661
1662         REGRESSION(r234620): SVGLangSpace::svgAttributeChanged() should invalidate the renderer of the SVGGeometryElement descendant only
1663         https://bugs.webkit.org/show_bug.cgi?id=190411
1664
1665         Reviewed by Simon Fraser.
1666
1667         Test: svg/dynamic-updates/SVGStopElement-dom-xml-lang-attrr.html
1668
1669         When changing the attributes of the SVGLangSpace, we should invalidate
1670         the renderer of the SVGGeometryElement descendant only. Renderer of other
1671         elements, like SVGStopElement, should not be invalidated because they do
1672         not have geometry and they can be used as resources for drawing another
1673         SVGGeometryElement.
1674
1675         * svg/SVGElement.h:
1676         (WebCore::SVGElement::isSVGGeometryElement const):
1677         * svg/SVGGeometryElement.h:
1678         (isType):
1679         * svg/SVGLangSpace.cpp:
1680         (WebCore::SVGLangSpace::svgAttributeChanged):
1681
1682 2018-10-09  Chris Dumez  <cdumez@apple.com>
1683
1684         Anchor target should be ignored on activation when the download attribute is set
1685         https://bugs.webkit.org/show_bug.cgi?id=190408
1686
1687         Reviewed by Geoffrey Garen.
1688
1689         Anchor target should be ignored on activation when the download attribute is set:
1690         - https://html.spec.whatwg.org/#the-a-element:downloading-hyperlinks-2
1691
1692         When the download attribute is set, we should use the "download the hyperlink" algorithm [1]
1693         instead of the "follow the hyperlink" [2] algorithm.
1694
1695         Note that the "download the hyperlink" triggers a download and ignores the target attribute
1696         entirely.
1697
1698         This is important as an anchor element with target=_blank and the download attribute set may
1699         fail because of Safari's popup blocker if we do not disregard the anchor target.
1700
1701         [1] https://html.spec.whatwg.org/#downloading-hyperlinks
1702         [2] https://html.spec.whatwg.org/#following-hyperlinks-2
1703
1704         Tests: fast/dom/HTMLAnchorElement/anchor-file-blob-download-blank-base-target-popup-not-allowed.html
1705                fast/dom/HTMLAnchorElement/anchor-file-blob-download-blank-target-popup-not-allowed.html
1706
1707         * loader/FrameLoader.cpp:
1708         (WebCore::FrameLoader::loadURL):
1709
1710 2018-10-09  Michael Catanzaro  <mcatanzaro@igalia.com>
1711
1712         [WPE][GTK] Complex text crashes with harfbuzz 1.8.8
1713         https://bugs.webkit.org/show_bug.cgi?id=190409
1714
1715         Reviewed by Žan Doberšek.
1716
1717         We discovered that harfbuzz 1.8.8 breaks WebKit by changing the ownership semantics of
1718         hb_icu_get_unicode_funcs() from (transfer full) to (transfer none). Our code was actually
1719         expecting (transfer none), so it's not immediately clear to me why it's crashing now, but
1720         doesn't matter as Behdad recommends removing this line of code because it hasn't been
1721         been needed for many years.
1722
1723         This should be covered by all our complex text tests if the bots were upgraded to the newer
1724         harfbuzz.
1725
1726         * platform/graphics/harfbuzz/ComplexTextControllerHarfBuzz.cpp:
1727         (WebCore::ComplexTextController::collectComplexTextRunsForCharacters):
1728
1729 2018-10-09  Daniel Bates  <dabates@apple.com>
1730
1731         [iOS] Cleanup EventHandler::passSubframeEventToSubframe()
1732         https://bugs.webkit.org/show_bug.cgi?id=190390
1733
1734         Reviewed by Wenson Hsieh.
1735
1736         Unindent case statements in switch block and use more auto.
1737
1738         * page/ios/EventHandlerIOS.mm:
1739         (WebCore::EventHandler::passSubframeEventToSubframe):
1740
1741 2018-10-09  Daniel Bates  <dabates@apple.com>
1742
1743         Cleanup WebEvent.mm
1744         https://bugs.webkit.org/show_bug.cgi?id=190391
1745
1746         Reviewed by Wenson Hsieh.
1747
1748         Unindent case statements in switch blocks.
1749
1750         * platform/ios/WebEvent.mm:
1751         (-[WebEvent _typeDescription]):
1752         (-[WebEvent _modiferFlagsDescription]):
1753         (-[WebEvent _touchPhaseDescription:]):
1754         (-[WebEvent _eventDescription]):
1755
1756 2018-10-09  Oriol Brufau  <obrufau@igalia.com>
1757
1758         Resolve inset properties to computed style when there is overconstraintment
1759         https://bugs.webkit.org/show_bug.cgi?id=188711
1760
1761         Reviewed by Manuel Rego Casasnovas.
1762
1763         This patch makes WebKit behave closer to Blink. Specifically,
1764          - In overconstrained relative or absolute positioning, inset properties resolve
1765            to the computed value (absolutizing percentages) instead of to the used value.
1766          - In fixed positioning, the resolved value of non-'auto' values is no longer
1767            increased by the border of the containg block.
1768
1769         This patch can slighlty alter the resolved value if it's a long decimal number.
1770
1771         Tests: imported/w3c/web-platform-tests/css/cssom/getComputedStyle-insets-absolute.html
1772                imported/w3c/web-platform-tests/css/cssom/getComputedStyle-insets-fixed.html
1773                imported/w3c/web-platform-tests/css/cssom/getComputedStyle-insets-nobox.html
1774                imported/w3c/web-platform-tests/css/cssom/getComputedStyle-insets-relative.html
1775                imported/w3c/web-platform-tests/css/cssom/getComputedStyle-insets-static.html
1776                imported/w3c/web-platform-tests/css/cssom/getComputedStyle-insets-sticky.html
1777
1778         * css/CSSComputedStyleDeclaration.cpp:
1779         (WebCore::positionOffsetValue):
1780         * rendering/RenderBox.h:
1781
1782 2018-10-09  Jiewen Tan  <jiewen_tan@apple.com>
1783
1784         [WebAuthN] Import CTAP HID message and packet structure from Chromium
1785         https://bugs.webkit.org/show_bug.cgi?id=189289
1786         <rdar://problem/44120310>
1787
1788         Reviewed by Brent Fulgham.
1789
1790         This patch imports CTAP HID message and packet structure:
1791         https://fidoalliance.org/specs/fido-v2.0-ps-20170927/fido-client-to-authenticator-protocol-v2.0-ps-20170927.html#message-and-packet-structure
1792         from Chromium. With this library, WebKit can now turn binaries into messages that CTAP devices could understand.
1793         This patch contains the following Chromium files and modifies them to fit into WebKit:
1794         https://cs.chromium.org/chromium/src/device/fido/fido_constants.cc?l=1&rcl=1efcfbeaf4e4cedf58716e1982b5702770571a75
1795         https://cs.chromium.org/chromium/src/device/fido/fido_constants.h?l=1&rcl=1efcfbeaf4e4cedf58716e1982b5702770571a75
1796         https://cs.chromium.org/chromium/src/device/fido/hid/fido_hid_message.cc?l=1&rcl=387f3725de2842e0e6b7175a9b2ed472b0cf781a
1797         https://cs.chromium.org/chromium/src/device/fido/hid/fido_hid_message.h?rcl=1efcfbeaf4e4cedf58716e1982b5702770571a75
1798         https://cs.chromium.org/chromium/src/device/fido/hid/fido_hid_packet.cc?rcl=1efcfbeaf4e4cedf58716e1982b5702770571a75
1799         https://cs.chromium.org/chromium/src/device/fido/hid/fido_hid_packet.h?rcl=1efcfbeaf4e4cedf58716e1982b5702770571a75
1800         https://cs.chromium.org/chromium/src/device/fido/hid/fido_hid_message_unittest.cc?rcl=1efcfbeaf4e4cedf58716e1982b5702770571a75
1801
1802         Covered by API tests.
1803
1804         * Modules/webauthn/fido/FidoConstants.cpp: Added.
1805         (fido::isFidoHidDeviceCommand):
1806         * Modules/webauthn/fido/FidoConstants.h: Added.
1807         * Modules/webauthn/fido/FidoHidMessage.cpp: Added.
1808         (fido::FidoHidMessage::create):
1809         (fido::FidoHidMessage::createFromSerializedData):
1810         (fido::FidoHidMessage::messageComplete const):
1811         (fido::FidoHidMessage::getMessagePayload const):
1812         (fido::FidoHidMessage::popNextPacket):
1813         (fido::FidoHidMessage::addContinuationPacket):
1814         (fido::FidoHidMessage::numPackets const):
1815         (fido::FidoHidMessage::FidoHidMessage):
1816         * Modules/webauthn/fido/FidoHidMessage.h: Added.
1817         * Modules/webauthn/fido/FidoHidPacket.cpp: Added.
1818         (fido::FidoHidPacket::FidoHidPacket):
1819         (fido::FidoHidInitPacket::createFromSerializedData):
1820         (fido::FidoHidInitPacket::FidoHidInitPacket):
1821         (fido::FidoHidInitPacket::getSerializedData const):
1822         (fido::FidoHidContinuationPacket::createFromSerializedData):
1823         (fido::FidoHidContinuationPacket::FidoHidContinuationPacket):
1824         (fido::FidoHidContinuationPacket::getSerializedData const):
1825         * Modules/webauthn/fido/FidoHidPacket.h: Added.
1826         * Modules/webauthn/fido/FidoParsingUtils.cpp: Added.
1827         (fido::getInitPacketData):
1828         (fido::getContinuationPacketData):
1829         * Modules/webauthn/fido/FidoParsingUtils.h: Added.
1830         * Sources.txt:
1831         * WebCore.xcodeproj/project.pbxproj:
1832
1833 2018-10-09  Carlos Eduardo Ramalho  <cadubentzen@gmail.com>
1834
1835         [CoordGraphics] Remove the 'previous backing store' logic
1836         https://bugs.webkit.org/show_bug.cgi?id=188838
1837
1838         Reviewed by Žan Doberšek.
1839
1840         Remove previousBackingStore from LayerState, since it's not needed anymore.
1841         When there is scale adjustment, we now simply discard mainBackingStore and
1842         recreate a new one.
1843
1844         No new tests required.
1845
1846         * platform/graphics/nicosia/texmap/NicosiaBackingStoreTextureMapperImpl.h:
1847         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
1848         (WebCore::CoordinatedGraphicsLayer::flushCompositingStateForThisLayerOnly):
1849         (WebCore::CoordinatedGraphicsLayer::updateContentBuffers):
1850         (WebCore::CoordinatedGraphicsLayer::purgeBackingStores):
1851
1852 2018-10-09  Antti Koivisto  <antti@apple.com>
1853
1854         [PSON] Prewarm system UI font
1855         https://bugs.webkit.org/show_bug.cgi?id=190397
1856
1857         Reviewed by Geoffrey Garen.
1858
1859         Cache system UI font fallbacks. Almost every web process needs these.
1860
1861         * page/ProcessWarming.cpp:
1862         (WebCore::ProcessWarming::prewarmGlobally):
1863
1864 2018-10-09  Chris Dumez  <cdumez@apple.com>
1865
1866         REGRESSION (Safari 12): Download of Blob URL fails
1867         https://bugs.webkit.org/show_bug.cgi?id=190351
1868         <rdar://problem/45091181>
1869
1870         Reviewed by Geoffrey Garen.
1871
1872         When using both the download attribute and target="_blank" on an anchor element, we would
1873         mistakenly drop the download attribute after the "new window" policy decision has been made.
1874         As a result, we would try to load the blob instead of downloading it.
1875
1876         Test: fast/dom/HTMLAnchorElement/anchor-file-blob-download-blank-target.html
1877
1878         * loader/FrameLoader.cpp:
1879         (WebCore::FrameLoader::continueLoadAfterNewWindowPolicy):
1880
1881 2018-10-09  Alicia Boya García  <aboya@igalia.com>
1882
1883         [MSE][GStreamer] r236735 has some dead ASSERTs that need to be moved
1884         https://bugs.webkit.org/show_bug.cgi?id=190394
1885
1886         Reviewed by Xabier Rodriguez-Calvar.
1887
1888         * platform/graphics/gstreamer/mse/AppendPipeline.cpp:
1889         (WebCore::createOptionalParserForFormat):
1890
1891 2018-10-09  Chris Dumez  <cdumez@apple.com>
1892
1893         Have DOMWindow get its frame from its document
1894         https://bugs.webkit.org/show_bug.cgi?id=190389
1895
1896         Reviewed by Geoff Garen.
1897
1898         Have DOMWindow get its frame from its document instead of having its own m_frame which can potentially
1899         be out-of-sync.
1900
1901         * dom/Document.cpp:
1902         (WebCore::Document::frameDestroyed):
1903         (WebCore::Document::willDetachPage):
1904         (WebCore::Document::attachToCachedFrame):
1905         * dom/Document.h:
1906         * page/DOMWindow.cpp:
1907         (WebCore::DOMWindow::allowPopUp):
1908         (WebCore::ContextDestructionObserver):
1909         (WebCore::DOMWindow::didSecureTransitionTo):
1910         (WebCore::DOMWindow::frameDestroyed):
1911         (WebCore::DOMWindow::willDetachDocumentFromFrame):
1912         (WebCore::DOMWindow::reconnectDOMWindowProperties):
1913         (WebCore::DOMWindow::isCurrentlyDisplayedInFrame const):
1914         (WebCore::DOMWindow::collectMatchingElementsInFlatTree):
1915         (WebCore::DOMWindow::matchingElementInFlatTree):
1916         (WebCore::DOMWindow::orientation const):
1917         (WebCore::DOMWindow::console const):
1918         (WebCore::DOMWindow::shouldHaveWebKitNamespaceForWorld):
1919         (WebCore::DOMWindow::webkitNamespace):
1920         (WebCore::DOMWindow::postMessage):
1921         (WebCore::DOMWindow::postMessageTimerFired):
1922         (WebCore::DOMWindow::frameElement const):
1923         (WebCore::DOMWindow::focus):
1924         (WebCore::DOMWindow::blur):
1925         (WebCore::DOMWindow::close):
1926         (WebCore::DOMWindow::print):
1927         (WebCore::DOMWindow::stop):
1928         (WebCore::DOMWindow::alert):
1929         (WebCore::DOMWindow::confirm):
1930         (WebCore::DOMWindow::prompt):
1931         (WebCore::DOMWindow::find const):
1932         (WebCore::DOMWindow::outerHeight const):
1933         (WebCore::DOMWindow::outerWidth const):
1934         (WebCore::DOMWindow::innerHeight const):
1935         (WebCore::DOMWindow::innerWidth const):
1936         (WebCore::DOMWindow::screenX const):
1937         (WebCore::DOMWindow::screenY const):
1938         (WebCore::DOMWindow::scrollX const):
1939         (WebCore::DOMWindow::scrollY const):
1940         (WebCore::DOMWindow::closed const):
1941         (WebCore::DOMWindow::length const):
1942         (WebCore::DOMWindow::name const):
1943         (WebCore::DOMWindow::setName):
1944         (WebCore::DOMWindow::setStatus):
1945         (WebCore::DOMWindow::setDefaultStatus):
1946         (WebCore::DOMWindow::self const):
1947         (WebCore::DOMWindow::opener const):
1948         (WebCore::DOMWindow::disownOpener):
1949         (WebCore::DOMWindow::parent const):
1950         (WebCore::DOMWindow::top const):
1951         (WebCore::DOMWindow::getMatchedCSSRules const):
1952         (WebCore::DOMWindow::devicePixelRatio const):
1953         (WebCore::DOMWindow::scrollBy const):
1954         (WebCore::DOMWindow::scrollTo const):
1955         (WebCore::DOMWindow::allowedToChangeWindowGeometry const):
1956         (WebCore::DOMWindow::moveBy const):
1957         (WebCore::DOMWindow::moveTo const):
1958         (WebCore::DOMWindow::resizeBy const):
1959         (WebCore::DOMWindow::resizeTo const):
1960         (WebCore::DOMWindow::clearTimeout):
1961         (WebCore::DOMWindow::isSameSecurityOriginAsMainFrame const):
1962         (WebCore::DOMWindow::finishedLoading):
1963         (WebCore::DOMWindow::setLocation):
1964         (WebCore::DOMWindow::open):
1965         (WebCore::DOMWindow::showModalDialog):
1966         (WebCore::DOMWindow::frame const):
1967         (WebCore::FrameDestructionObserver): Deleted.
1968         (WebCore::DOMWindow::willDetachPage): Deleted.
1969         (WebCore::DOMWindow::detachFromFrame): Deleted.
1970         (WebCore::DOMWindow::attachToFrame): Deleted.
1971         * page/DOMWindow.h:
1972
1973 2018-10-09  Jer Noble  <jer.noble@apple.com>
1974
1975         ISOTrackEncryptionBox returns incorrect defaultKeyID
1976         https://bugs.webkit.org/show_bug.cgi?id=190368
1977
1978         Reviewed by Eric Carlson.
1979
1980         Test: TestWebKitAPI.ISOBox.ISOProtectionSchemeInfoBox
1981
1982         ISOTrackEncryptionBox::parse() increments the data offset by an incorrect amount.
1983
1984         Drive-by fix: add EXPORT macros to all the ISO box classes so that tests can be written in TestWebKitAPI.
1985
1986         * WebCore.xcodeproj/project.pbxproj:
1987         * platform/graphics/iso/ISOBox.h:
1988         * platform/graphics/iso/ISOOriginalFormatBox.h:
1989         * platform/graphics/iso/ISOProtectionSchemeInfoBox.h:
1990         * platform/graphics/iso/ISOProtectionSystemSpecificHeaderBox.h:
1991         * platform/graphics/iso/ISOSchemeInformationBox.h:
1992         * platform/graphics/iso/ISOSchemeTypeBox.h:
1993         * platform/graphics/iso/ISOTrackEncryptionBox.cpp:
1994         (WebCore::ISOTrackEncryptionBox::parse):
1995         * platform/graphics/iso/ISOTrackEncryptionBox.h:
1996
1997 2018-10-09  Youenn Fablet  <youenn@apple.com>
1998
1999         Add support for IceCandidate stats
2000         https://bugs.webkit.org/show_bug.cgi?id=190329
2001
2002         Reviewed by Eric Carlson.
2003
2004         Convert IceCandidate stats gathered by libwebrtc.
2005         Since networkType might be sensitive information, we currently do not expose it.
2006         We do not expose address either if it is a host or prflx candidate.
2007
2008         Test: webrtc/candidate-stats.html
2009
2010         * Modules/mediastream/RTCStatsReport.h:
2011         * Modules/mediastream/RTCStatsReport.idl:
2012         * Modules/mediastream/libwebrtc/LibWebRTCStatsCollector.cpp:
2013         (WebCore::iceCandidateState):
2014         (WebCore::fillRTCIceCandidateStats):
2015         (WebCore::LibWebRTCStatsCollector::OnStatsDelivered):
2016
2017 2018-10-09  Philippe Normand  <pnormand@igalia.com>
2018
2019         [GStreamer] Stealing cross-origin video pixel with HLS
2020         https://bugs.webkit.org/show_bug.cgi?id=190003
2021
2022         Reviewed by Xabier Rodriguez-Calvar.
2023
2024         Report the SecurityOrigin of downloaded adaptivedemux (HLS, DASH,
2025         SmoothStreaming) fragments as tainted if their origin differs from
2026         the manifest SecurityOrigin. SecurityOrigins are stored in the
2027         CachedResourceStreamingClient implemented in the internal
2028         GStreamer HTTP(S) source element.
2029
2030         The implementation is not ideal yet because the fragments download
2031         is performed by the WebProcess, until bug 189967 is fixed. When
2032         this bug is fixed, the m_hasTaintedOrigin member variable should
2033         be removed and all checks be done unconditionally to the
2034         webkithttpsrc element which will manage the download of the
2035         manifests and fragments.
2036
2037         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
2038         (WebCore::MediaPlayerPrivateGStreamer::loadFull): Reset the m_hasTaintedOrigin value.
2039         (WebCore::MediaPlayerPrivateGStreamer::handleMessage): Get the
2040         fragment URL from the adaptivedemux stats message and check if its
2041         origin is tainted.
2042         (WebCore::MediaPlayerPrivateGStreamer::wouldTaintOrigin const):
2043         Initial implementation by checking the m_hasTaintedOrigin member
2044         variable value.
2045         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
2046         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
2047         (CachedResourceStreamingClient::responseReceived): Store the
2048         resource origin internally so it can be checked later on by
2049         webKitSrtcWouldTaintOrigin().
2050         (webKitSrcWouldTaintOrigin): Check given origin against cached
2051         origins. This implementation is similar to Cocoa's
2052         WebCoreNSURLSession implementation.
2053         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.h:
2054
2055 2018-10-09  Antti Koivisto  <antti@apple.com>
2056
2057         Prewarm FontDatabase on process swap
2058         https://bugs.webkit.org/show_bug.cgi?id=190312
2059
2060         Reviewed by Chris Dumez.
2061
2062         Implement basic prewarming of FontDatabase. When the domain of the first page load on
2063         a new process is known we pass the list of font families previous used by that domain to the
2064         process. This is used to prewarm CoreText font database. Initialization (which involves lots of
2065         blocking IPC) happens outside the main thread so the fonts are ready to use when needed.
2066
2067         * WebCore.xcodeproj/project.pbxproj:
2068         * page/PrewarmInformation.h: Added.
2069         (WebCore::PrewarmInformation::encode const):
2070         (WebCore::PrewarmInformation::decode):
2071
2072         Add data structure for prewarm information with encode/decode support.
2073
2074         * page/ProcessWarming.cpp:
2075         (WebCore::ProcessWarming::collectPrewarmInformation):
2076         (WebCore::ProcessWarming::prewarmWithInformation):
2077
2078         Prewarming interface to be used from WebKit.
2079
2080         * page/ProcessWarming.h:
2081         * platform/graphics/FontCache.cpp:
2082         (WebCore::FontCache::collectPrewarmInformation const):
2083         (WebCore::FontCache::prewarm):
2084         * platform/graphics/FontCache.h:
2085         * platform/graphics/cocoa/FontCacheCoreText.cpp:
2086         (WebCore::FontDatabase::collectionForFamily):
2087         (WebCore::FontDatabase::fontForPostScriptName):
2088         (WebCore::FontDatabase::clear):
2089
2090         Add mutex for thread safe access.
2091
2092         (WebCore::FontCache::createFontPlatformData):
2093         (WebCore::FontCache::collectPrewarmInformation const):
2094
2095         Collect font families seen by this process.
2096
2097         (WebCore::FontCache::prewarm):
2098
2099         Prewarm FontDatabase in a dispatch queue.
2100
2101 2018-10-08  Wenson Hsieh  <wenson_hsieh@apple.com>
2102
2103         [Cocoa] [WK2] Add support for text alignment and text lists in font attributes
2104         https://bugs.webkit.org/show_bug.cgi?id=190342
2105         <rdar://problem/44767118>
2106
2107         Reviewed by Tim Horton.
2108
2109         Adds support for computing and encoding information about text alignment and enclosing list elements in the font
2110         attributes dictionary, exposed to the UI delegate on Cocoa platforms. This is exposed through NSParagraphStyle,
2111         which contains properties for both `NSTextAlignment` and an array of enclosing `NSTextList` objects.
2112
2113         Test:   FontAttributes.NestedTextListsWithHorizontalAlignment
2114                 FontAttributes.FontAttributesAfterChangingSelection
2115
2116         * editing/Editor.cpp:
2117         (WebCore::editableTextListsAtPositionInDescendingOrder):
2118
2119         Add a helper function to ascend the DOM, starting at the given position, in search of enclosing list elements.
2120         For each enclosing list element we find within the scope of the editable root, we create a `TextList`
2121         representing the list element.
2122
2123         (WebCore::Editor::fontAttributesAtSelectionStart const):
2124
2125         Compute and set enclosing text lists and text alignment. For text alignment, we convert the initial text-align
2126         value, `start`, to NSTextAlignmentNatural (the default text alignment type on Cocoa platforms); other values
2127         then map to Left, Right, Center, and Justified as expected (taking direction into account).
2128
2129         * editing/FontAttributes.h:
2130         (WebCore::TextList::encode const):
2131         (WebCore::TextList::decode):
2132
2133         Introduce TextList, a platform-agnostic representation of an unordered or ordered list. On Cocoa, this can be
2134         used to construct a corresponding NSTextList.
2135
2136         * editing/cocoa/FontAttributesCocoa.mm:
2137         (WebCore::cocoaTextListMarkerName):
2138
2139         Attempt to map a WebCore list style type to a `NSTextListMarker*` constant. While most of the Cocoa marker
2140         formats have a corresponding web-exposed list style type, many web-exposed types have no Cocoa equivalent; as
2141         such, fall back to default marker formats: "{disc}" for unordered lists and "{decimal}" for ordered lists.
2142
2143         (WebCore::TextList::createTextList const):
2144         (WebCore::FontAttributes::createDictionary const):
2145
2146         Include an NSParagraphStyle in the dictionary of font attributes that includes information about text alignment
2147         and enclosing text lists (per Cocoa convention, in order from outermost list to innermost list).
2148
2149 2018-10-08  Justin Fan  <justin_fan@apple.com>
2150
2151         WebGPU: Rename old WebGPU prototype to WebMetal
2152         https://bugs.webkit.org/show_bug.cgi?id=190325
2153         <rdar://problem/44990443>
2154
2155         Reviewed by Dean Jackson.
2156
2157         Existing WebGPU tests also renamed to reflect WebGPU -> WebMetal change.
2158
2159         Rename WebGPU prototype files to WebMetal in preparation for implementing the new (Oct 2018) WebGPU interface.
2160
2161         * CMakeLists.txt:
2162         * Configurations/FeatureDefines.xcconfig:
2163         * DerivedSources.make:
2164         * Sources.txt:
2165         * SourcesCocoa.txt:
2166         * WebCore.xcodeproj/project.pbxproj:
2167         * bindings/js/JSWebMetalRenderPassAttachmentDescriptorCustom.cpp: Renamed from Source/WebCore/bindings/js/JSWebGPURenderPassAttachmentDescriptorCustom.cpp.
2168         (WebCore::toJSNewlyCreated):
2169         (WebCore::toJS):
2170         * bindings/js/JSWebMetalRenderingContextCustom.cpp: Renamed from Source/WebCore/bindings/js/JSWebGPURenderingContextCustom.cpp.
2171         (WebCore::JSWebMetalRenderingContext::visitAdditionalChildren):
2172         * bindings/js/WebCoreBuiltinNames.h:
2173         * dom/Document.cpp:
2174         (WebCore::Document::getCSSCanvasContext):
2175         * dom/Document.h:
2176         * dom/Document.idl:
2177         * html/HTMLCanvasElement.cpp:
2178         (WebCore::HTMLCanvasElement::getContext):
2179         (WebCore::HTMLCanvasElement::isWebMetalType):
2180         (WebCore::HTMLCanvasElement::createContextWebMetal):
2181         (WebCore::HTMLCanvasElement::getContextWebMetal):
2182         (WebCore::HTMLCanvasElement::isWebGPUType): Deleted.
2183         (WebCore::HTMLCanvasElement::createContextWebGPU): Deleted.
2184         (WebCore::HTMLCanvasElement::getContextWebGPU): Deleted.
2185         * html/HTMLCanvasElement.h:
2186         * html/HTMLCanvasElement.idl:
2187         * html/canvas/CanvasRenderingContext.h:
2188         (WebCore::CanvasRenderingContext::isWebMetal const):
2189         (WebCore::CanvasRenderingContext::isWebGPU const): Deleted.
2190         * html/canvas/WebGPURenderingContext.cpp: Removed.
2191         * html/canvas/WebMetalBuffer.cpp: Renamed from Source/WebCore/html/canvas/WebGPUBuffer.cpp.
2192         (WebCore::WebMetalBuffer::create):
2193         (WebCore::WebMetalBuffer::WebMetalBuffer):
2194         * html/canvas/WebMetalBuffer.h: Renamed from Source/WebCore/html/canvas/WebGPUBuffer.h.
2195         * html/canvas/WebMetalBuffer.idl: Renamed from Source/WebCore/html/canvas/WebGPUBuffer.idl.
2196         * html/canvas/WebMetalCommandBuffer.cpp: Renamed from Source/WebCore/html/canvas/WebGPUCommandBuffer.cpp.
2197         (WebCore::WebMetalCommandBuffer::create):
2198         (WebCore::WebMetalCommandBuffer::WebMetalCommandBuffer):
2199         (WebCore::WebMetalCommandBuffer::~WebMetalCommandBuffer):
2200         (WebCore::WebMetalCommandBuffer::commit):
2201         (WebCore::WebMetalCommandBuffer::presentDrawable):
2202         (WebCore::WebMetalCommandBuffer::createRenderCommandEncoderWithDescriptor):
2203         (WebCore::WebMetalCommandBuffer::createComputeCommandEncoder):
2204         (WebCore::WebMetalCommandBuffer::completed):
2205         * html/canvas/WebMetalCommandBuffer.h: Renamed from Source/WebCore/html/canvas/WebGPUCommandBuffer.h.
2206         * html/canvas/WebMetalCommandBuffer.idl: Renamed from Source/WebCore/html/canvas/WebGPUCommandBuffer.idl.
2207         * html/canvas/WebMetalCommandQueue.cpp: Renamed from Source/WebCore/html/canvas/WebGPUCommandQueue.cpp.
2208         (WebCore::WebMetalCommandQueue::create):
2209         (WebCore::WebMetalCommandQueue::WebMetalCommandQueue):
2210         (WebCore::WebMetalCommandQueue::createCommandBuffer):
2211         * html/canvas/WebMetalCommandQueue.h: Renamed from Source/WebCore/html/canvas/WebGPUCommandQueue.h.
2212         * html/canvas/WebMetalCommandQueue.idl: Renamed from Source/WebCore/html/canvas/WebGPUCommandQueue.idl.
2213         * html/canvas/WebMetalComputeCommandEncoder.cpp: Renamed from Source/WebCore/html/canvas/WebGPUComputeCommandEncoder.cpp.
2214         (WebCore::GPUSizeMake):
2215         (WebCore::WebMetalComputeCommandEncoder::create):
2216         (WebCore::WebMetalComputeCommandEncoder::WebMetalComputeCommandEncoder):
2217         (WebCore::WebMetalComputeCommandEncoder::setComputePipelineState):
2218         (WebCore::WebMetalComputeCommandEncoder::setBuffer):
2219         (WebCore::WebMetalComputeCommandEncoder::dispatch):
2220         (WebCore::WebMetalComputeCommandEncoder::endEncoding):
2221         * html/canvas/WebMetalComputeCommandEncoder.h: Renamed from Source/WebCore/html/canvas/WebGPUComputeCommandEncoder.h.
2222         * html/canvas/WebMetalComputeCommandEncoder.idl: Renamed from Source/WebCore/html/canvas/WebGPUComputeCommandEncoder.idl.
2223         * html/canvas/WebMetalComputePipelineState.cpp: Renamed from Source/WebCore/html/canvas/WebGPUComputePipelineState.cpp.
2224         (WebCore::WebMetalComputePipelineState::create):
2225         (WebCore::WebMetalComputePipelineState::WebMetalComputePipelineState):
2226         * html/canvas/WebMetalComputePipelineState.h: Renamed from Source/WebCore/html/canvas/WebGPUComputePipelineState.h.
2227         * html/canvas/WebMetalComputePipelineState.idl: Renamed from Source/WebCore/html/canvas/WebGPUComputePipelineState.idl.
2228         * html/canvas/WebMetalDepthStencilDescriptor.cpp: Renamed from Source/WebCore/html/canvas/WebGPUDepthStencilDescriptor.cpp.
2229         (WebCore::WebMetalDepthStencilDescriptor::create):
2230         (WebCore::WebMetalDepthStencilDescriptor::depthWriteEnabled const):
2231         (WebCore::WebMetalDepthStencilDescriptor::setDepthWriteEnabled):
2232         (WebCore::WebMetalDepthStencilDescriptor::depthCompareFunction const):
2233         (WebCore::WebMetalDepthStencilDescriptor::setDepthCompareFunction):
2234         * html/canvas/WebMetalDepthStencilDescriptor.h: Renamed from Source/WebCore/html/canvas/WebGPUDepthStencilDescriptor.h.
2235         * html/canvas/WebMetalDepthStencilDescriptor.idl: Renamed from Source/WebCore/html/canvas/WebGPUDepthStencilDescriptor.idl.
2236         * html/canvas/WebMetalDepthStencilState.cpp: Renamed from Source/WebCore/html/canvas/WebGPUDepthStencilState.cpp.
2237         (WebCore::WebMetalDepthStencilState::create):
2238         (WebCore::WebMetalDepthStencilState::WebMetalDepthStencilState):
2239         (WebCore::WebMetalDepthStencilState::label const):
2240         (WebCore::WebMetalDepthStencilState::setLabel):
2241         * html/canvas/WebMetalDepthStencilState.h: Renamed from Source/WebCore/html/canvas/WebGPUDepthStencilState.h.
2242         * html/canvas/WebMetalDepthStencilState.idl: Renamed from Source/WebCore/html/canvas/WebGPURenderPipelineState.idl.
2243         * html/canvas/WebMetalDrawable.cpp: Renamed from Source/WebCore/html/canvas/WebGPUDrawable.cpp.
2244         (WebCore::WebMetalDrawable::create):
2245         (WebCore::WebMetalDrawable::WebMetalDrawable):
2246         * html/canvas/WebMetalDrawable.h: Renamed from Source/WebCore/html/canvas/WebGPUDrawable.h.
2247         (WebCore::WebMetalDrawable::texture):
2248         * html/canvas/WebMetalDrawable.idl: Renamed from Source/WebCore/html/canvas/WebGPUDrawable.idl.
2249         * html/canvas/WebMetalEnums.cpp: Renamed from Source/WebCore/html/canvas/WebGPUEnums.cpp.
2250         (WebCore::toWebMetalCompareFunction):
2251         (WebCore::web3DCompareFunctionName):
2252         (WebCore::toGPUCompareFunction):
2253         * html/canvas/WebMetalEnums.h: Renamed from Source/WebCore/html/canvas/WebGPUEnums.h.
2254         * html/canvas/WebMetalEnums.idl: Renamed from Source/WebCore/html/canvas/WebGPUEnums.idl.
2255         * html/canvas/WebMetalFunction.cpp: Renamed from Source/WebCore/html/canvas/WebGPUFunction.cpp.
2256         (WebCore::WebMetalFunction::create):
2257         (WebCore::WebMetalFunction::WebMetalFunction):
2258         * html/canvas/WebMetalFunction.h: Renamed from Source/WebCore/html/canvas/WebGPUFunction.h.
2259         * html/canvas/WebMetalFunction.idl: Renamed from Source/WebCore/html/canvas/WebGPUFunction.idl.
2260         * html/canvas/WebMetalLibrary.cpp: Renamed from Source/WebCore/html/canvas/WebGPULibrary.cpp.
2261         (WebCore::WebMetalLibrary::create):
2262         (WebCore::WebMetalLibrary::WebMetalLibrary):
2263         (WebCore::WebMetalLibrary::functionNames const):
2264         (WebCore::WebMetalLibrary::functionWithName const):
2265         * html/canvas/WebMetalLibrary.h: Renamed from Source/WebCore/html/canvas/WebGPULibrary.h.
2266         * html/canvas/WebMetalLibrary.idl: Renamed from Source/WebCore/html/canvas/WebGPULibrary.idl.
2267         * html/canvas/WebMetalRenderCommandEncoder.cpp: Renamed from Source/WebCore/html/canvas/WebGPURenderCommandEncoder.cpp.
2268         (WebCore::WebMetalRenderCommandEncoder::create):
2269         (WebCore::WebMetalRenderCommandEncoder::WebMetalRenderCommandEncoder):
2270         (WebCore::WebMetalRenderCommandEncoder::setRenderPipelineState):
2271         (WebCore::WebMetalRenderCommandEncoder::setDepthStencilState):
2272         (WebCore::WebMetalRenderCommandEncoder::setVertexBuffer):
2273         (WebCore::WebMetalRenderCommandEncoder::setFragmentBuffer):
2274         (WebCore::WebMetalRenderCommandEncoder::drawPrimitives):
2275         (WebCore::WebMetalRenderCommandEncoder::endEncoding):
2276         * html/canvas/WebMetalRenderCommandEncoder.h: Renamed from Source/WebCore/html/canvas/WebGPURenderCommandEncoder.h.
2277         * html/canvas/WebMetalRenderCommandEncoder.idl: Renamed from Source/WebCore/html/canvas/WebGPURenderCommandEncoder.idl.
2278         * html/canvas/WebMetalRenderPassAttachmentDescriptor.cpp: Renamed from Source/WebCore/html/canvas/WebGPURenderPassAttachmentDescriptor.cpp.
2279         (WebCore::WebMetalRenderPassAttachmentDescriptor::WebMetalRenderPassAttachmentDescriptor):
2280         (WebCore::WebMetalRenderPassAttachmentDescriptor::loadAction const):
2281         (WebCore::WebMetalRenderPassAttachmentDescriptor::setLoadAction):
2282         (WebCore::WebMetalRenderPassAttachmentDescriptor::storeAction const):
2283         (WebCore::WebMetalRenderPassAttachmentDescriptor::setStoreAction):
2284         (WebCore::WebMetalRenderPassAttachmentDescriptor::texture const):
2285         (WebCore::WebMetalRenderPassAttachmentDescriptor::setTexture):
2286         * html/canvas/WebMetalRenderPassAttachmentDescriptor.h: Renamed from Source/WebCore/html/canvas/WebGPURenderPassAttachmentDescriptor.h.
2287         * html/canvas/WebMetalRenderPassAttachmentDescriptor.idl: Renamed from Source/WebCore/html/canvas/WebGPURenderPassAttachmentDescriptor.idl.
2288         * html/canvas/WebMetalRenderPassColorAttachmentDescriptor.cpp: Renamed from Source/WebCore/html/canvas/WebGPURenderPassColorAttachmentDescriptor.cpp.
2289         (WebCore::WebMetalRenderPassColorAttachmentDescriptor::create):
2290         (WebCore::WebMetalRenderPassColorAttachmentDescriptor::WebMetalRenderPassColorAttachmentDescriptor):
2291         (WebCore::WebMetalRenderPassColorAttachmentDescriptor::descriptor const):
2292         (WebCore::WebMetalRenderPassColorAttachmentDescriptor::clearColor const):
2293         (WebCore::WebMetalRenderPassColorAttachmentDescriptor::setClearColor):
2294         * html/canvas/WebMetalRenderPassColorAttachmentDescriptor.h: Renamed from Source/WebCore/html/canvas/WebGPURenderPassColorAttachmentDescriptor.h.
2295         * html/canvas/WebMetalRenderPassColorAttachmentDescriptor.idl: Renamed from Source/WebCore/html/canvas/WebGPURenderPassColorAttachmentDescriptor.idl.
2296         * html/canvas/WebMetalRenderPassDepthAttachmentDescriptor.cpp: Renamed from Source/WebCore/html/canvas/WebGPURenderPassDepthAttachmentDescriptor.cpp.
2297         (WebCore::WebMetalRenderPassDepthAttachmentDescriptor::create):
2298         (WebCore::WebMetalRenderPassDepthAttachmentDescriptor::WebMetalRenderPassDepthAttachmentDescriptor):
2299         (WebCore::WebMetalRenderPassDepthAttachmentDescriptor::clearDepth const):
2300         (WebCore::WebMetalRenderPassDepthAttachmentDescriptor::setClearDepth):
2301         (WebCore::WebMetalRenderPassDepthAttachmentDescriptor::descriptor const):
2302         * html/canvas/WebMetalRenderPassDepthAttachmentDescriptor.h: Renamed from Source/WebCore/html/canvas/WebGPURenderPassDepthAttachmentDescriptor.h.
2303         * html/canvas/WebMetalRenderPassDepthAttachmentDescriptor.idl: Renamed from Source/WebCore/html/canvas/WebGPURenderPassDepthAttachmentDescriptor.idl.
2304         * html/canvas/WebMetalRenderPassDescriptor.cpp: Renamed from Source/WebCore/html/canvas/WebGPURenderPassDescriptor.cpp.
2305         (WebCore::WebMetalRenderPassDescriptor::create):
2306         (WebCore::WebMetalRenderPassDescriptor::depthAttachment):
2307         (WebCore::WebMetalRenderPassDescriptor::colorAttachments):
2308         * html/canvas/WebMetalRenderPassDescriptor.h: Renamed from Source/WebCore/html/canvas/WebGPURenderPassDescriptor.h.
2309         * html/canvas/WebMetalRenderPassDescriptor.idl: Renamed from Source/WebCore/html/canvas/WebGPURenderPassDescriptor.idl.
2310         * html/canvas/WebMetalRenderPipelineColorAttachmentDescriptor.cpp: Renamed from Source/WebCore/html/canvas/WebGPURenderPipelineColorAttachmentDescriptor.cpp.
2311         (WebCore::WebMetalRenderPipelineColorAttachmentDescriptor::create):
2312         (WebCore::WebMetalRenderPipelineColorAttachmentDescriptor::WebMetalRenderPipelineColorAttachmentDescriptor):
2313         (WebCore::WebMetalRenderPipelineColorAttachmentDescriptor::pixelFormat const):
2314         (WebCore::WebMetalRenderPipelineColorAttachmentDescriptor::setPixelFormat):
2315         * html/canvas/WebMetalRenderPipelineColorAttachmentDescriptor.h: Renamed from Source/WebCore/html/canvas/WebGPURenderPipelineColorAttachmentDescriptor.h.
2316         * html/canvas/WebMetalRenderPipelineColorAttachmentDescriptor.idl: Renamed from Source/WebCore/html/canvas/WebGPURenderPipelineColorAttachmentDescriptor.idl.
2317         * html/canvas/WebMetalRenderPipelineDescriptor.cpp: Renamed from Source/WebCore/html/canvas/WebGPURenderPipelineDescriptor.cpp.
2318         (WebCore::WebMetalRenderPipelineDescriptor::create):
2319         (WebCore::WebMetalRenderPipelineDescriptor::vertexFunction const):
2320         (WebCore::WebMetalRenderPipelineDescriptor::setVertexFunction):
2321         (WebCore::WebMetalRenderPipelineDescriptor::fragmentFunction const):
2322         (WebCore::WebMetalRenderPipelineDescriptor::setFragmentFunction):
2323         (WebCore::WebMetalRenderPipelineDescriptor::colorAttachments):
2324         (WebCore::WebMetalRenderPipelineDescriptor::depthAttachmentPixelFormat const):
2325         (WebCore::WebMetalRenderPipelineDescriptor::setDepthAttachmentPixelFormat):
2326         (WebCore::WebMetalRenderPipelineDescriptor::reset):
2327         * html/canvas/WebMetalRenderPipelineDescriptor.h: Renamed from Source/WebCore/html/canvas/WebGPURenderPipelineDescriptor.h.
2328         * html/canvas/WebMetalRenderPipelineDescriptor.idl: Renamed from Source/WebCore/html/canvas/WebGPURenderPipelineDescriptor.idl.
2329         * html/canvas/WebMetalRenderPipelineState.cpp: Renamed from Source/WebCore/html/canvas/WebGPURenderPipelineState.cpp.
2330         (WebCore::WebMetalRenderPipelineState::create):
2331         (WebCore::WebMetalRenderPipelineState::WebMetalRenderPipelineState):
2332         (WebCore::WebMetalRenderPipelineState::label const):
2333         (WebCore::WebMetalRenderPipelineState::setLabel):
2334         * html/canvas/WebMetalRenderPipelineState.h: Renamed from Source/WebCore/html/canvas/WebGPURenderPipelineState.h.
2335         * html/canvas/WebMetalRenderPipelineState.idl: Renamed from Source/WebCore/html/canvas/WebGPUDepthStencilState.idl.
2336         * html/canvas/WebMetalRenderingContext.cpp: Added.
2337         (WebCore::WebMetalRenderingContext::create):
2338         (WebCore::WebMetalRenderingContext::WebMetalRenderingContext):
2339         (WebCore::WebMetalRenderingContext::canvas const):
2340         (WebCore::WebMetalRenderingContext::initializeNewContext):
2341         (WebCore::WebMetalRenderingContext::clampedCanvasSize const):
2342         (WebCore::WebMetalRenderingContext::hasPendingActivity const):
2343         (WebCore::WebMetalRenderingContext::stop):
2344         (WebCore::WebMetalRenderingContext::activeDOMObjectName const):
2345         (WebCore::WebMetalRenderingContext::canSuspendForDocumentSuspension const):
2346         (WebCore::WebMetalRenderingContext::platformLayer const):
2347         (WebCore::WebMetalRenderingContext::markLayerComposited):
2348         (WebCore::WebMetalRenderingContext::reshape):
2349         (WebCore::WebMetalRenderingContext::createLibrary):
2350         (WebCore::WebMetalRenderingContext::createRenderPipelineState):
2351         (WebCore::WebMetalRenderingContext::createDepthStencilState):
2352         (WebCore::WebMetalRenderingContext::createComputePipelineState):
2353         (WebCore::WebMetalRenderingContext::createCommandQueue):
2354         (WebCore::WebMetalRenderingContext::nextDrawable):
2355         (WebCore::WebMetalRenderingContext::createBuffer):
2356         (WebCore::WebMetalRenderingContext::createTexture):
2357         * html/canvas/WebMetalRenderingContext.h: Renamed from Source/WebCore/html/canvas/WebGPURenderingContext.h.
2358         * html/canvas/WebMetalRenderingContext.idl: Renamed from Source/WebCore/html/canvas/WebGPURenderingContext.idl.
2359         * html/canvas/WebMetalSize.h: Renamed from Source/WebCore/html/canvas/WebGPUSize.h.
2360         * html/canvas/WebMetalSize.idl: Renamed from Source/WebCore/html/canvas/WebGPUSize.idl.
2361         * html/canvas/WebMetalTexture.cpp: Renamed from Source/WebCore/html/canvas/WebGPUTexture.cpp.
2362         (WebCore::WebMetalTexture::create):
2363         (WebCore::WebMetalTexture::WebMetalTexture):
2364         * html/canvas/WebMetalTexture.h: Renamed from Source/WebCore/html/canvas/WebGPUTexture.h.
2365         * html/canvas/WebMetalTexture.idl: Renamed from Source/WebCore/html/canvas/WebGPUTexture.idl.
2366         * html/canvas/WebMetalTextureDescriptor.cpp: Renamed from Source/WebCore/html/canvas/WebGPUTextureDescriptor.cpp.
2367         (WebCore::WebMetalTextureDescriptor::create):
2368         (WebCore::WebMetalTextureDescriptor::WebMetalTextureDescriptor):
2369         (WebCore::WebMetalTextureDescriptor::width const):
2370         (WebCore::WebMetalTextureDescriptor::setWidth):
2371         (WebCore::WebMetalTextureDescriptor::height const):
2372         (WebCore::WebMetalTextureDescriptor::setHeight):
2373         (WebCore::WebMetalTextureDescriptor::sampleCount const):
2374         (WebCore::WebMetalTextureDescriptor::setSampleCount):
2375         (WebCore::WebMetalTextureDescriptor::textureType const):
2376         (WebCore::WebMetalTextureDescriptor::setTextureType):
2377         (WebCore::WebMetalTextureDescriptor::storageMode const):
2378         (WebCore::WebMetalTextureDescriptor::setStorageMode):
2379         (WebCore::WebMetalTextureDescriptor::usage const):
2380         (WebCore::WebMetalTextureDescriptor::setUsage):
2381         * html/canvas/WebMetalTextureDescriptor.h: Renamed from Source/WebCore/html/canvas/WebGPUTextureDescriptor.h.
2382         * html/canvas/WebMetalTextureDescriptor.idl: Renamed from Source/WebCore/html/canvas/WebGPUTextureDescriptor.idl.
2383         * inspector/InspectorCanvas.cpp:
2384         (WebCore::InspectorCanvas::buildObjectForCanvas):
2385         * inspector/agents/InspectorCanvasAgent.cpp:
2386         (WebCore::InspectorCanvasAgent::requestContent):
2387         (WebCore::contextAsScriptValue):
2388         * page/RuntimeEnabledFeatures.h:
2389         (WebCore::RuntimeEnabledFeatures::setWebMetalEnabled):
2390         (WebCore::RuntimeEnabledFeatures::webMetalEnabled const):
2391         (WebCore::RuntimeEnabledFeatures::setWebGPUEnabled): Deleted.
2392         (WebCore::RuntimeEnabledFeatures::webGPUEnabled const): Deleted.
2393         * platform/Logging.h:
2394         * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
2395         (WebCore::PlatformCALayerCocoa::layerTypeForPlatformLayer):
2396         (WebCore::PlatformCALayerCocoa::PlatformCALayerCocoa):
2397         * platform/graphics/cocoa/WebMetalLayer.h: Renamed from Source/WebCore/platform/graphics/cocoa/WebGPULayer.h.
2398         * platform/graphics/cocoa/WebMetalLayer.mm: Renamed from Source/WebCore/platform/graphics/cocoa/WebGPULayer.mm.
2399         (-[WebMetalLayer initWithGPUDevice:]):
2400         * platform/graphics/gpu/GPUBuffer.cpp:
2401         (WebCore::GPUBuffer::~GPUBuffer):
2402         * platform/graphics/gpu/GPUBuffer.h:
2403         * platform/graphics/gpu/GPUCommandBuffer.cpp:
2404         (WebCore::GPUCommandBuffer::~GPUCommandBuffer):
2405         * platform/graphics/gpu/GPUCommandBuffer.h:
2406         * platform/graphics/gpu/GPUCommandQueue.cpp:
2407         (WebCore::GPUCommandQueue::~GPUCommandQueue):
2408         * platform/graphics/gpu/GPUCommandQueue.h:
2409         * platform/graphics/gpu/GPUComputeCommandEncoder.cpp:
2410         (WebCore::GPUComputeCommandEncoder::~GPUComputeCommandEncoder):
2411         * platform/graphics/gpu/GPUComputeCommandEncoder.h:
2412         * platform/graphics/gpu/GPUComputePipelineState.cpp:
2413         (WebCore::GPUComputePipelineState::~GPUComputePipelineState):
2414         * platform/graphics/gpu/GPUComputePipelineState.h:
2415         * platform/graphics/gpu/GPUDepthStencilDescriptor.cpp:
2416         (WebCore::GPUDepthStencilDescriptor::~GPUDepthStencilDescriptor):
2417         * platform/graphics/gpu/GPUDepthStencilDescriptor.h:
2418         * platform/graphics/gpu/GPUDepthStencilState.cpp:
2419         (WebCore::GPUDepthStencilState::~GPUDepthStencilState):
2420         * platform/graphics/gpu/GPUDepthStencilState.h:
2421         * platform/graphics/gpu/GPUDevice.cpp:
2422         (WebCore::GPUDevice::~GPUDevice):
2423         * platform/graphics/gpu/GPUDevice.h:
2424         (WebCore::GPUDevice::layer const):
2425         * platform/graphics/gpu/GPUDrawable.cpp:
2426         (WebCore::GPUDrawable::~GPUDrawable):
2427         * platform/graphics/gpu/GPUDrawable.h:
2428         * platform/graphics/gpu/GPUEnums.h:
2429         * platform/graphics/gpu/GPUFunction.cpp:
2430         (WebCore::GPUFunction::~GPUFunction):
2431         * platform/graphics/gpu/GPUFunction.h:
2432         * platform/graphics/gpu/GPULibrary.cpp:
2433         (WebCore::GPULibrary::~GPULibrary):
2434         * platform/graphics/gpu/GPULibrary.h:
2435         * platform/graphics/gpu/GPURenderCommandEncoder.cpp:
2436         (WebCore::GPURenderCommandEncoder::~GPURenderCommandEncoder):
2437         * platform/graphics/gpu/GPURenderCommandEncoder.h:
2438         * platform/graphics/gpu/GPURenderPassAttachmentDescriptor.cpp:
2439         (WebCore::GPURenderPassAttachmentDescriptor::~GPURenderPassAttachmentDescriptor):
2440         * platform/graphics/gpu/GPURenderPassAttachmentDescriptor.h:
2441         * platform/graphics/gpu/GPURenderPassColorAttachmentDescriptor.cpp:
2442         (WebCore::GPURenderPassColorAttachmentDescriptor::~GPURenderPassColorAttachmentDescriptor):
2443         * platform/graphics/gpu/GPURenderPassColorAttachmentDescriptor.h:
2444         * platform/graphics/gpu/GPURenderPassDepthAttachmentDescriptor.cpp:
2445         (WebCore::GPURenderPassDepthAttachmentDescriptor::~GPURenderPassDepthAttachmentDescriptor):
2446         * platform/graphics/gpu/GPURenderPassDepthAttachmentDescriptor.h:
2447         * platform/graphics/gpu/GPURenderPassDescriptor.cpp:
2448         (WebCore::GPURenderPassDescriptor::~GPURenderPassDescriptor):
2449         * platform/graphics/gpu/GPURenderPassDescriptor.h:
2450         * platform/graphics/gpu/GPURenderPipelineColorAttachmentDescriptor.cpp:
2451         (WebCore::GPURenderPipelineColorAttachmentDescriptor::~GPURenderPipelineColorAttachmentDescriptor):
2452         * platform/graphics/gpu/GPURenderPipelineColorAttachmentDescriptor.h:
2453         * platform/graphics/gpu/GPURenderPipelineDescriptor.cpp:
2454         (WebCore::GPURenderPipelineDescriptor::~GPURenderPipelineDescriptor):
2455         * platform/graphics/gpu/GPURenderPipelineDescriptor.h:
2456         * platform/graphics/gpu/GPURenderPipelineState.cpp:
2457         (WebCore::GPURenderPipelineState::~GPURenderPipelineState):
2458         * platform/graphics/gpu/GPURenderPipelineState.h:
2459         * platform/graphics/gpu/GPUSize.h:
2460         * platform/graphics/gpu/GPUTexture.cpp:
2461         (WebCore::GPUTexture::~GPUTexture):
2462         * platform/graphics/gpu/GPUTexture.h:
2463         * platform/graphics/gpu/GPUTextureDescriptor.cpp:
2464         (WebCore::GPUTextureDescriptor::~GPUTextureDescriptor):
2465         * platform/graphics/gpu/GPUTextureDescriptor.h:
2466         * platform/graphics/metal/GPUBufferMetal.mm:
2467         (WebCore::GPUBuffer::GPUBuffer):
2468         * platform/graphics/metal/GPUCommandBufferMetal.mm:
2469         * platform/graphics/metal/GPUCommandQueueMetal.mm:
2470         * platform/graphics/metal/GPUComputeCommandEncoderMetal.mm:
2471         * platform/graphics/metal/GPUComputePipelineStateMetal.mm:
2472         (WebCore::GPUComputePipelineState::GPUComputePipelineState):
2473         * platform/graphics/metal/GPUDepthStencilDescriptorMetal.mm:
2474         * platform/graphics/metal/GPUDepthStencilStateMetal.mm:
2475         (WebCore::GPUDepthStencilState::setLabel const):
2476         * platform/graphics/metal/GPUDeviceMetal.mm:
2477         (WebCore::GPUDevice::reshape const):
2478         * platform/graphics/metal/GPUDrawableMetal.mm:
2479         (WebCore::GPUDrawable::release):
2480         * platform/graphics/metal/GPUFunctionMetal.mm:
2481         * platform/graphics/metal/GPULibraryMetal.mm:
2482         (WebCore::GPULibrary::GPULibrary):
2483         * platform/graphics/metal/GPURenderCommandEncoderMetal.mm:
2484         (WebCore::GPURenderCommandEncoder::GPURenderCommandEncoder):
2485         * platform/graphics/metal/GPURenderPassAttachmentDescriptorMetal.mm:
2486         * platform/graphics/metal/GPURenderPassColorAttachmentDescriptorMetal.mm:
2487         * platform/graphics/metal/GPURenderPassDepthAttachmentDescriptorMetal.mm:
2488         * platform/graphics/metal/GPURenderPassDescriptorMetal.mm:
2489         * platform/graphics/metal/GPURenderPipelineColorAttachmentDescriptorMetal.mm:
2490         * platform/graphics/metal/GPURenderPipelineDescriptorMetal.mm:
2491         * platform/graphics/metal/GPURenderPipelineStateMetal.mm:
2492         (WebCore::GPURenderPipelineState::setLabel const):
2493         * platform/graphics/metal/GPUTextureDescriptorMetal.mm:
2494         * platform/graphics/metal/GPUTextureMetal.mm:
2495         (WebCore::GPUTexture::GPUTexture):
2496         * testing/InternalSettings.cpp:
2497         (WebCore::InternalSettings::Backup::Backup):
2498         (WebCore::InternalSettings::Backup::restoreTo):
2499         (WebCore::InternalSettings::setWebMetalEnabled):
2500         (WebCore::InternalSettings::setWebGPUEnabled): Deleted.
2501         * testing/InternalSettings.h:
2502         * testing/InternalSettings.idl:
2503
2504 2018-10-08  Dean Jackson  <dino@apple.com>
2505
2506         CrashTracer: backboardd at Recursion :: QuartzCore: CA::Render::Updater::prepare_sublayer0
2507         https://bugs.webkit.org/show_bug.cgi?id=190376
2508         <rdar://problem/44986520>
2509
2510         Reviewed by Tim Horton.
2511
2512         Very deep CoreAnimation layer trees can cause problems. Reduce our maximum
2513         depth from 256 to 128.
2514
2515         Modified existing test: compositing/layer-creation/deep-tree.html
2516
2517         * platform/graphics/ca/GraphicsLayerCA.cpp: Cap the depth at 128.
2518
2519 2018-10-08  Commit Queue  <commit-queue@webkit.org>
2520
2521         Unreviewed, rolling out r236941.
2522         https://bugs.webkit.org/show_bug.cgi?id=190374
2523
2524         Causing API test failures in new test (Requested by jernoble
2525         on #webkit).
2526
2527         Reverted changeset:
2528
2529         "ISOTrackEncryptionBox returns incorrect defaultKeyID"
2530         https://bugs.webkit.org/show_bug.cgi?id=190368
2531         https://trac.webkit.org/changeset/236941
2532
2533 2018-10-08  Aditya Keerthi  <akeerthi@apple.com>
2534
2535         Make <input type=color> a runtime enabled (on-by-default) feature
2536         https://bugs.webkit.org/show_bug.cgi?id=189162
2537
2538         Reviewed by Wenson Hsieh and Tim Horton.
2539
2540         Enable the build-time flag INPUT_TYPE_COLOR by default and introduce a runtime-enabled feature for input type
2541         color, also on by default.
2542
2543         Covered by rebaselining existing layout tests.
2544
2545         * Configurations/FeatureDefines.xcconfig:
2546         * html/InputType.cpp:
2547         (WebCore::createInputTypeFactoryMap):
2548         * page/RuntimeEnabledFeatures.h:
2549         (WebCore::RuntimeEnabledFeatures::inputTypeColorEnabled const):
2550         (WebCore::RuntimeEnabledFeatures::setInputTypeColorEnabled):
2551
2552 2018-10-08  Jer Noble  <jer.noble@apple.com>
2553
2554         ISOTrackEncryptionBox returns incorrect defaultKeyID
2555         https://bugs.webkit.org/show_bug.cgi?id=190368
2556
2557         Reviewed by Eric Carlson.
2558
2559         Test: TestWebKitAPI.ISOBox.ISOProtectionSchemeInfoBox
2560
2561         ISOTrackEncryptionBox::parse() increments the data offset by an incorrect amount.
2562
2563         Drive-by fix: add EXPORT macros to all the ISO box classes so that tests can be written in TestWebKitAPI.
2564
2565         * WebCore.xcodeproj/project.pbxproj:
2566         * platform/graphics/iso/ISOBox.h:
2567         * platform/graphics/iso/ISOOriginalFormatBox.h:
2568         * platform/graphics/iso/ISOProtectionSchemeInfoBox.h:
2569         * platform/graphics/iso/ISOProtectionSystemSpecificHeaderBox.h:
2570         * platform/graphics/iso/ISOSchemeInformationBox.h:
2571         * platform/graphics/iso/ISOSchemeTypeBox.h:
2572         * platform/graphics/iso/ISOTrackEncryptionBox.cpp:
2573         (WebCore::ISOTrackEncryptionBox::parse):
2574         * platform/graphics/iso/ISOTrackEncryptionBox.h:
2575
2576 2018-10-08  Antti Koivisto  <antti@apple.com>
2577
2578         Move SystemFontDatabase to a file of its own
2579         https://bugs.webkit.org/show_bug.cgi?id=190347
2580
2581         Reviewed by Chris Dumez.
2582
2583         Also rename it to SystemFontDatabaseCoreText as it is CoreText specific.
2584
2585         * SourcesCocoa.txt:
2586         * WebCore.xcodeproj/project.pbxproj:
2587         * page/MemoryRelease.cpp:
2588         (WebCore::releaseNoncriticalMemory):
2589         * page/cocoa/MemoryReleaseCocoa.mm:
2590
2591         Release SystemFontDatabaseCoreText directly from platform specific cleanup code.
2592
2593         (WebCore::platformReleaseMemory):
2594         * platform/graphics/cocoa/FontDescriptionCocoa.cpp:
2595         (WebCore::FontDescription::invalidateCaches):
2596         (WebCore::systemFontCascadeList):
2597         (WebCore::FontCascadeDescription::effectiveFamilyCount const):
2598         (WebCore::FontCascadeDescription::effectiveFamilyAt const):
2599         (WebCore::SystemFontDatabase::CoreTextCascadeListParameters::CoreTextCascadeListParameters): Deleted.
2600         (WebCore::SystemFontDatabase::CoreTextCascadeListParameters::isHashTableDeletedValue const): Deleted.
2601         (WebCore::SystemFontDatabase::CoreTextCascadeListParameters::operator== const): Deleted.
2602         (WebCore::SystemFontDatabase::CoreTextCascadeListParameters::hash const): Deleted.
2603         (WebCore::SystemFontDatabase::CoreTextCascadeListParameters::CoreTextCascadeListParametersHash::hash): Deleted.
2604         (WebCore::SystemFontDatabase::CoreTextCascadeListParameters::CoreTextCascadeListParametersHash::equal): Deleted.
2605         (): Deleted.
2606         (WebCore::SystemFontDatabase::singleton): Deleted.
2607         (WebCore::SystemFontDatabase::systemFontCascadeList): Deleted.
2608         (WebCore::SystemFontDatabase::clear): Deleted.
2609         (WebCore::SystemFontDatabase::SystemFontDatabase): Deleted.
2610         (WebCore::SystemFontDatabase::applyWeightItalicsAndFallbackBehavior): Deleted.
2611         (WebCore::SystemFontDatabase::removeCascadeList): Deleted.
2612         (WebCore::SystemFontDatabase::computeCascadeList): Deleted.
2613         (WebCore::systemFontParameters): Deleted.
2614         * platform/graphics/cocoa/SystemFontDatabaseCoreText.cpp: Added.
2615         (WebCore::SystemFontDatabaseCoreText::singleton):
2616         (WebCore::SystemFontDatabaseCoreText::SystemFontDatabaseCoreText):
2617         (WebCore::SystemFontDatabaseCoreText::systemFontCascadeList):
2618         (WebCore::SystemFontDatabaseCoreText::clear):
2619         (WebCore::SystemFontDatabaseCoreText::applyWeightItalicsAndFallbackBehavior):
2620         (WebCore::SystemFontDatabaseCoreText::removeCascadeList):
2621         (WebCore::SystemFontDatabaseCoreText::computeCascadeList):
2622         (WebCore::SystemFontDatabaseCoreText::systemFontParameters):
2623         * platform/graphics/cocoa/SystemFontDatabaseCoreText.h: Added.
2624         (WebCore::SystemFontDatabaseCoreText::CascadeListParameters::CascadeListParameters):
2625         (WebCore::SystemFontDatabaseCoreText::CascadeListParameters::isHashTableDeletedValue const):
2626         (WebCore::SystemFontDatabaseCoreText::CascadeListParameters::operator== const):
2627         (WebCore::SystemFontDatabaseCoreText::CascadeListParameters::hash const):
2628         (WebCore::SystemFontDatabaseCoreText::CascadeListParameters::CascadeListParametersHash::hash):
2629         (WebCore::SystemFontDatabaseCoreText::CascadeListParameters::CascadeListParametersHash::equal):
2630         * platform/mediastream/mac/RealtimeMediaSourceCenterMac.cpp:
2631
2632 2018-10-08  Jeremy Jones  <jeremyj@apple.com>
2633
2634         Remove dead code: VideoFullscreenModel::isVisible()
2635         https://bugs.webkit.org/show_bug.cgi?id=190356
2636
2637         Reviewed by Jon Lee.
2638
2639         No new tests because there is no behavior change.
2640
2641         Remove isVisible() since it is no longer used.
2642
2643         * platform/cocoa/VideoFullscreenModel.h:
2644         * platform/cocoa/VideoFullscreenModelVideoElement.h:
2645         * platform/cocoa/VideoFullscreenModelVideoElement.mm:
2646         (WebCore::VideoFullscreenModelVideoElement::isVisible const): Deleted.
2647         * platform/ios/WebVideoFullscreenControllerAVKit.mm:
2648         (VideoFullscreenControllerContext::isVisible const): Deleted.
2649
2650 2018-10-08  Jeremy Jones  <jeremyj@apple.com>
2651
2652         Remove dead code: resetMediaState.
2653         https://bugs.webkit.org/show_bug.cgi?id=190355
2654
2655         Reviewed by Jon Lee.
2656
2657         No new tests because no behavior change.
2658
2659         Remove resetMediaState since it is no longer used.
2660
2661         * platform/cocoa/PlaybackSessionInterface.h:
2662         (WebCore::PlaybackSessionInterface::~PlaybackSessionInterface):
2663         * platform/ios/PlaybackSessionInterfaceAVKit.h:
2664         * platform/ios/PlaybackSessionInterfaceAVKit.mm:
2665         (WebCore::PlaybackSessionInterfaceAVKit::resetMediaState): Deleted.
2666         * platform/ios/WebAVPlayerController.h:
2667         * platform/ios/WebAVPlayerController.mm:
2668         (-[WebAVPlayerController resetMediaState]): Deleted.
2669         * platform/mac/PlaybackSessionInterfaceMac.h:
2670         * platform/mac/PlaybackSessionInterfaceMac.mm:
2671         (WebCore::PlaybackSessionInterfaceMac::resetMediaState): Deleted.
2672
2673 2018-10-08  Jeremy Jones  <jeremyj@apple.com>
2674
2675         Use MediaPlayerEnums::VideoGravity in VideoFullscreenModel.
2676         https://bugs.webkit.org/show_bug.cgi?id=190357
2677
2678         Reviewed by Jon Lee.
2679
2680         No new tests because no behavior change.
2681
2682         Use MediaPlayerEnums::VideoGravity instead of creating another identical enum in VideoFullscreenModel.
2683
2684         * platform/cocoa/VideoFullscreenModel.h:
2685         (): Deleted.
2686         * platform/cocoa/VideoFullscreenModelVideoElement.h:
2687         * platform/cocoa/VideoFullscreenModelVideoElement.mm:
2688         (WebCore::VideoFullscreenModelVideoElement::setVideoLayerGravity):
2689         * platform/ios/VideoFullscreenInterfaceAVKit.mm:
2690         (-[WebAVPlayerLayer setVideoGravity:]):
2691         * platform/ios/WebVideoFullscreenControllerAVKit.mm:
2692         (VideoFullscreenControllerContext::setVideoLayerGravity):
2693         * platform/mac/VideoFullscreenInterfaceMac.mm:
2694         (-[WebVideoFullscreenInterfaceMacObjC setUpPIPForVideoView:withFrame:inWindow:]):
2695         (-[WebVideoFullscreenInterfaceMacObjC pipDidClose:]):
2696
2697 2018-10-08  Devin Rousso  <drousso@apple.com>
2698
2699         Web Inspector: group media network entries by the node that triggered the request
2700         https://bugs.webkit.org/show_bug.cgi?id=189606
2701         <rdar://problem/44438527>
2702
2703         Reviewed by Brian Burg.
2704
2705         Test: http/tests/inspector/network/resource-initiatorNode.html
2706
2707         Add extra arguments to functions that create `ResourceRequest` objects for media resources so
2708         that `initiatorNodeIdentifier` can be set for WebInspector frontend to use for grouping.
2709
2710         * html/HTMLMediaElement.cpp:
2711         (WebCore::HTMLMediaElement::loadResource):
2712         * html/HTMLVideoElement.cpp:
2713         (WebCore::HTMLVideoElement::setDisplayMode):
2714         * loader/FrameLoader.h:
2715         * loader/FrameLoader.cpp:
2716         (WebCore::FrameLoader::willLoadMediaElementURL):
2717         Handles initial (e.g. DNT) resource requests.
2718
2719         * loader/ImageLoader.cpp:
2720         (ImageLoader::updateFromElement):
2721         Handles "poster" requests.
2722
2723         * loader/MediaResourceLoader.cpp:
2724         (MediaResourceLoader::requestResource):
2725         Handles byte-range requests.
2726
2727         * html/track/LoadableTextTrack.cpp:
2728         (WebCore::LoadableTextTrack::loadTimerFired):
2729         * loader/TextTrackLoader.h:
2730         * loader/TextTrackLoader.cpp:
2731         (WebCore::TextTrackLoader::load):
2732         * html/HTMLTrackElement.h:
2733         Handles <track> (e.g. subtitle) requests.
2734
2735         * inspector/agents/InspectorDOMAgent.cpp:
2736         (WebCore::InspectorDOMAgent::identifierForNode):
2737         * inspector/InspectorInstrumentation.h:
2738         (WebCore::InspectorInstrumentation::identifierForNode):
2739         * inspector/InspectorInstrumentation.cpp:
2740         (WebCore::InspectorInstrumentation::identifierForNodeImpl):
2741         Allows callers to get a `DOM.nodeId` for the given `Node`, which is (in this patch) attached
2742         to the `ResourceRequest` and later used by `InspectorNetworkAgent`.
2743
2744         * inspector/agents/InspectorNetworkAgent.h:
2745         * inspector/agents/InspectorNetworkAgent.cpp:
2746         (WebCore::InspectorNetworkAgent::willSendRequest):
2747         (WebCore::InspectorNetworkAgent::didLoadResourceFromMemoryCache):
2748         (WebCore::InspectorNetworkAgent::buildInitiatorObject):
2749
2750         * platform/network/ResourceRequestBase.h:
2751         (WebCore::ResourceRequestBase::initiatorNodeIdentifier const):
2752         (WebCore::ResourceRequestBase::setInitiatorNodeIdentifier):
2753         * platform/network/ResourceRequestBase.cpp:
2754         (WebCore::ResourceRequestBase::setAsIsolatedCopy):
2755         * platform/network/cf/ResourceRequestCFNet.cpp:
2756         (WebCore::ResourceRequest::updateFromDelegatePreservingOldProperties):
2757         * loader/cache/CachedResourceLoader.cpp:
2758         (WebCore::CachedResourceLoader::shouldContinueAfterNotifyingLoadedFromMemoryCache):
2759
2760         * inspector/InspectorCanvas.h:
2761         * inspector/InspectorCanvas.cpp:
2762         (WebCore::InspectorCanvas::buildObjectForCanvas):
2763         * inspector/agents/InspectorCanvasAgent.cpp:
2764         (WebCore::InspectorCanvasAgent::enable):
2765         (WebCore::InspectorCanvasAgent::didCreateCanvasRenderingContext):
2766         Don't try to push the canvas' node to the frontend, as this will create a dangling node in
2767         `InspectorDOMAgent` if the canvas' node is detached from the DOM.
2768
2769 2018-10-08  Andy Estes  <aestes@apple.com>
2770
2771         [Payment Request] Requests should be aborted after details settle when the user cancels
2772         https://bugs.webkit.org/show_bug.cgi?id=190333
2773
2774         Reviewed by Alex Christensen.
2775
2776         In Payment Request's "update a PaymentRequest's details" algorithm, user agents are expected
2777         to disable the payment UI when PaymentRequest details are being updated by the merchant.
2778         This is to prevent the user from accepting a payment before updated details are displayed.
2779
2780         Further, Payment Request's "user aborts the payment request" algorithm says that the
2781         algorithm should be terminated prior to throwing an AbortError if the request is currently
2782         being updated, and also that user agents SHOULD ensure this never occurs. This is based on
2783         the assumption that payment UIs are disabled during details updates.
2784
2785         For Apple Pay, while it is true that a payment cannot be accepted by the user while details
2786         are being updated by the merchant, the payment UI is not completely disabled. In particular,
2787         the user is allowed to abort the payment while details are being updated. We need to honor
2788         the user's request to abort without doing so in the middle of a details update.
2789
2790         This patch defers a user-initiated abort until after details are settled, at which point the
2791         promise returned by show() is rejected with an AbortError. This behaves as if the details
2792         update promise were rejected by the merchant.
2793
2794         Added a test case to http/tests/paymentrequest/payment-request-show-method.https.html.
2795
2796         * Modules/paymentrequest/PaymentRequest.cpp:
2797         (WebCore::PaymentRequest::settleDetailsPromise):
2798         (WebCore::PaymentRequest::whenDetailsSettled):
2799         (WebCore::PaymentRequest::cancel):
2800         * Modules/paymentrequest/PaymentRequest.h:
2801
2802 2018-10-08  Chris Dumez  <cdumez@apple.com>
2803
2804         Have DOMWindowProperty get is frame from its associated DOMWindow
2805         https://bugs.webkit.org/show_bug.cgi?id=190341
2806
2807         Reviewed by Alex Christensen.
2808
2809         Have DOMWindowProperty get is frame from its associated DOMWindow, instead of having its own
2810         m_frame that can potentially get out-of-sync.
2811
2812         * Modules/cache/DOMWindowCaches.cpp:
2813         (WebCore::DOMWindowCaches::DOMWindowCaches):
2814         * Modules/geolocation/NavigatorGeolocation.cpp:
2815         (WebCore::NavigatorGeolocation::NavigatorGeolocation):
2816         (WebCore::NavigatorGeolocation::from):
2817         * Modules/geolocation/NavigatorGeolocation.h:
2818         * Modules/indexeddb/DOMWindowIndexedDatabase.cpp:
2819         (WebCore::DOMWindowIndexedDatabase::DOMWindowIndexedDatabase):
2820         * Modules/mediastream/NavigatorMediaDevices.cpp:
2821         (WebCore::NavigatorMediaDevices::NavigatorMediaDevices):
2822         (WebCore::NavigatorMediaDevices::from):
2823         * Modules/mediastream/NavigatorMediaDevices.h:
2824         * Modules/quota/DOMWindowQuota.cpp:
2825         (WebCore::DOMWindowQuota::DOMWindowQuota):
2826         * Modules/quota/NavigatorStorageQuota.cpp:
2827         (WebCore::NavigatorStorageQuota::NavigatorStorageQuota):
2828         * Modules/quota/NavigatorStorageQuota.h:
2829         * Modules/speech/DOMWindowSpeechSynthesis.cpp:
2830         (WebCore::DOMWindowSpeechSynthesis::DOMWindowSpeechSynthesis):
2831         * css/StyleMedia.cpp:
2832         (WebCore::StyleMedia::StyleMedia):
2833         (WebCore::StyleMedia::type const):
2834         (WebCore::StyleMedia::matchMedium const):
2835         * css/StyleMedia.h:
2836         * loader/appcache/DOMApplicationCache.cpp:
2837         (WebCore::DOMApplicationCache::DOMApplicationCache):
2838         (WebCore::DOMApplicationCache::applicationCacheHost const):
2839         (WebCore::DOMApplicationCache::scriptExecutionContext const):
2840         * loader/appcache/DOMApplicationCache.h:
2841         * page/BarProp.cpp:
2842         (WebCore::BarProp::BarProp):
2843         (WebCore::BarProp::visible const):
2844         * page/BarProp.h:
2845         (WebCore::BarProp::create):
2846         * page/DOMSelection.cpp:
2847         (WebCore::DOMSelection::DOMSelection):
2848         (WebCore::DOMSelection::visibleSelection const):
2849         (WebCore::DOMSelection::anchorNode const):
2850         (WebCore::DOMSelection::anchorOffset const):
2851         (WebCore::DOMSelection::focusNode const):
2852         (WebCore::DOMSelection::focusOffset const):
2853         (WebCore::DOMSelection::baseNode const):
2854         (WebCore::DOMSelection::baseOffset const):
2855         (WebCore::DOMSelection::extentNode const):
2856         (WebCore::DOMSelection::extentOffset const):
2857         (WebCore::DOMSelection::isCollapsed const):
2858         (WebCore::DOMSelection::type const):
2859         (WebCore::DOMSelection::rangeCount const):
2860         (WebCore::DOMSelection::collapse):
2861         (WebCore::DOMSelection::collapseToEnd):
2862         (WebCore::DOMSelection::collapseToStart):
2863         (WebCore::DOMSelection::empty):
2864         (WebCore::DOMSelection::setBaseAndExtent):
2865         (WebCore::DOMSelection::setPosition):
2866         (WebCore::DOMSelection::modify):
2867         (WebCore::DOMSelection::extend):
2868         (WebCore::DOMSelection::getRangeAt):
2869         (WebCore::DOMSelection::removeAllRanges):
2870         (WebCore::DOMSelection::addRange):
2871         (WebCore::DOMSelection::deleteFromDocument):
2872         (WebCore::DOMSelection::containsNode const):
2873         (WebCore::DOMSelection::toString):
2874         (WebCore::DOMSelection::shadowAdjustedNode const):
2875         (WebCore::DOMSelection::shadowAdjustedOffset const):
2876         (WebCore::DOMSelection::isValidForPosition const):
2877         * page/DOMSelection.h:
2878         (WebCore::DOMSelection::create):
2879         * page/DOMWindow.cpp:
2880         (WebCore::DOMWindow::screen):
2881         (WebCore::DOMWindow::history):
2882         (WebCore::DOMWindow::locationbar):
2883         (WebCore::DOMWindow::menubar):
2884         (WebCore::DOMWindow::personalbar):
2885         (WebCore::DOMWindow::scrollbars):
2886         (WebCore::DOMWindow::statusbar):
2887         (WebCore::DOMWindow::toolbar):
2888         (WebCore::DOMWindow::applicationCache):
2889         (WebCore::DOMWindow::navigator):
2890         (WebCore::DOMWindow::location):
2891         (WebCore::DOMWindow::visualViewport):
2892         (WebCore::DOMWindow::webkitNamespace):
2893         (WebCore::DOMWindow::getSelection):
2894         (WebCore::DOMWindow::styleMedia):
2895         * page/DOMWindow.h:
2896         * page/DOMWindowExtension.cpp:
2897         (WebCore::DOMWindowExtension::DOMWindowExtension):
2898         * page/DOMWindowExtension.h:
2899         (WebCore::DOMWindowExtension::create):
2900         * page/DOMWindowProperty.cpp:
2901         (WebCore::DOMWindowProperty::DOMWindowProperty):
2902         (WebCore::DOMWindowProperty::~DOMWindowProperty):
2903         (WebCore::DOMWindowProperty::disconnectFrameForDocumentSuspension):
2904         (WebCore::DOMWindowProperty::reconnectFrameFromDocumentSuspension):
2905         (WebCore::DOMWindowProperty::willDestroyGlobalObjectInCachedFrame):
2906         (WebCore::DOMWindowProperty::willDestroyGlobalObjectInFrame):
2907         (WebCore::DOMWindowProperty::willDetachGlobalObjectFromFrame):
2908         (WebCore::DOMWindowProperty::frame const):
2909         * page/DOMWindowProperty.h:
2910         (WebCore::DOMWindowProperty::window const):
2911         * page/History.cpp:
2912         (WebCore::History::History):
2913         (WebCore::History::length const):
2914         (WebCore::History::scrollRestoration const):
2915         (WebCore::History::setScrollRestoration):
2916         (WebCore::History::stateInternal const):
2917         (WebCore::History::go):
2918         (WebCore::History::urlForState):
2919         (WebCore::History::stateObjectAdded):
2920         * page/History.h:
2921         * page/Location.cpp:
2922         (WebCore::Location::Location):
2923         (WebCore::Location::url const):
2924         (WebCore::Location::href const):
2925         (WebCore::Location::protocol const):
2926         (WebCore::Location::host const):
2927         (WebCore::Location::hostname const):
2928         (WebCore::Location::port const):
2929         (WebCore::Location::pathname const):
2930         (WebCore::Location::search const):
2931         (WebCore::Location::origin const):
2932         (WebCore::Location::ancestorOrigins const):
2933         (WebCore::Location::hash const):
2934         (WebCore::Location::setHref):
2935         (WebCore::Location::setProtocol):
2936         (WebCore::Location::setHost):
2937         (WebCore::Location::setHostname):
2938         (WebCore::Location::setPort):
2939         (WebCore::Location::setPathname):
2940         (WebCore::Location::setSearch):
2941         (WebCore::Location::setHash):
2942         (WebCore::Location::assign):
2943         (WebCore::Location::replace):
2944         (WebCore::Location::reload):
2945         (WebCore::Location::setLocation):
2946         * page/Location.h:
2947         (WebCore::Location::create):
2948         * page/Navigator.cpp:
2949         (WebCore::Navigator::Navigator):
2950         (WebCore::Navigator::appVersion const):
2951         (WebCore::Navigator::userAgent const):
2952         (WebCore::Navigator::share):
2953         (WebCore::Navigator::plugins):
2954         (WebCore::Navigator::mimeTypes):
2955         (WebCore::Navigator::cookieEnabled const):
2956         (WebCore::Navigator::javaEnabled const):
2957         (WebCore::Navigator::standalone const):
2958         * page/Navigator.h:
2959         * page/Performance.cpp:
2960         (WebCore::Performance::navigation):
2961         (WebCore::Performance::timing):
2962         * page/PerformanceNavigation.cpp:
2963         (WebCore::PerformanceNavigation::PerformanceNavigation):
2964         (WebCore::PerformanceNavigation::type const):
2965         (WebCore::PerformanceNavigation::redirectCount const):
2966         * page/PerformanceNavigation.h:
2967         (WebCore::PerformanceNavigation::create):
2968         * page/PerformanceTiming.cpp:
2969         (WebCore::PerformanceTiming::PerformanceTiming):
2970         (WebCore::PerformanceTiming::documentLoader const):
2971         (WebCore::PerformanceTiming::documentTiming const):
2972         * page/PerformanceTiming.h:
2973         (WebCore::PerformanceTiming::create):
2974         * page/Screen.cpp:
2975         (WebCore::Screen::Screen):
2976         (WebCore::Screen::height const):
2977         (WebCore::Screen::width const):
2978         (WebCore::Screen::colorDepth const):
2979         (WebCore::Screen::pixelDepth const):
2980         (WebCore::Screen::availLeft const):
2981         (WebCore::Screen::availTop const):
2982         (WebCore::Screen::availHeight const):
2983         (WebCore::Screen::availWidth const):
2984         * page/Screen.h:
2985         * page/VisualViewport.cpp:
2986         (WebCore::VisualViewport::VisualViewport):
2987         (WebCore::VisualViewport::scriptExecutionContext const):
2988         (WebCore::VisualViewport::addEventListener):
2989         (WebCore::VisualViewport::updateFrameLayout const):
2990         (WebCore::VisualViewport::offsetLeft const):
2991         (WebCore::VisualViewport::offsetTop const):
2992         (WebCore::VisualViewport::pageLeft const):
2993         (WebCore::VisualViewport::pageTop const):
2994         (WebCore::VisualViewport::width const):
2995         (WebCore::VisualViewport::height const):
2996         (WebCore::VisualViewport::scale const):
2997         (WebCore::VisualViewport::update):
2998         (WebCore::VisualViewport::enqueueResizeEvent):
2999         (WebCore::VisualViewport::enqueueScrollEvent):
3000         * page/VisualViewport.h:
3001         * page/WebKitNamespace.cpp:
3002         (WebCore::WebKitNamespace::WebKitNamespace):
3003         * page/WebKitNamespace.h:
3004         (WebCore::WebKitNamespace::create):
3005         * plugins/DOMMimeTypeArray.cpp:
3006         (WebCore::DOMMimeTypeArray::DOMMimeTypeArray):
3007         (WebCore::DOMMimeTypeArray::item):
3008         (WebCore::DOMMimeTypeArray::namedItem):
3009         (WebCore::DOMMimeTypeArray::getPluginData const):
3010         * plugins/DOMMimeTypeArray.h:
3011         (WebCore::DOMMimeTypeArray::create):
3012         * plugins/DOMPluginArray.cpp:
3013         (WebCore::DOMPluginArray::DOMPluginArray):
3014         (WebCore::DOMPluginArray::item):
3015         (WebCore::DOMPluginArray::namedItem):
3016         (WebCore::DOMPluginArray::refresh):
3017         (WebCore::DOMPluginArray::pluginData const):
3018         * plugins/DOMPluginArray.h:
3019         (WebCore::DOMPluginArray::create):
3020         * storage/Storage.cpp:
3021         (WebCore::Storage::create):
3022         (WebCore::Storage::Storage):
3023         (WebCore::Storage::setItem):
3024         (WebCore::Storage::removeItem):
3025         (WebCore::Storage::clear):
3026         * storage/Storage.h:
3027
3028 2018-10-08  Antti Koivisto  <antti@apple.com>
3029
3030         Move FontCascadeDescription to a file of its own
3031         https://bugs.webkit.org/show_bug.cgi?id=190348
3032
3033         Reviewed by Chris Dumez.
3034
3035         * Sources.txt:
3036         * WebCore.xcodeproj/project.pbxproj:
3037         * platform/graphics/FontCascade.h:
3038         * platform/graphics/FontCascadeDescription.cpp: Copied from Source/WebCore/platform/graphics/FontDescription.cpp.
3039         (WebCore::FontDescription::FontDescription): Deleted.
3040         (WebCore::m_shouldAllowUserInstalledFonts): Deleted.
3041         (WebCore::FontDescription::setLocale): Deleted.
3042         (WebCore::FontDescription::invalidateCaches): Deleted.
3043         * platform/graphics/FontCascadeDescription.h: Copied from Source/WebCore/platform/graphics/FontDescription.h.
3044         (WebCore::FontDescription::operator!= const): Deleted.
3045         (WebCore::FontDescription::computedSize const): Deleted.
3046         (WebCore::FontDescription::computedPixelSize const): Deleted.
3047         (WebCore::FontDescription::italic const): Deleted.
3048         (WebCore::FontDescription::stretch const): Deleted.
3049         (WebCore::FontDescription::weight const): Deleted.
3050         (WebCore::FontDescription::fontSelectionRequest const): Deleted.
3051         (WebCore::FontDescription::renderingMode const): Deleted.
3052         (WebCore::FontDescription::textRenderingMode const): Deleted.
3053         (WebCore::FontDescription::script const): Deleted.
3054         (WebCore::FontDescription::locale const): Deleted.
3055         (WebCore::FontDescription::orientation const): Deleted.
3056         (WebCore::FontDescription::nonCJKGlyphOrientation const): Deleted.
3057         (WebCore::FontDescription::widthVariant const): Deleted.
3058         (WebCore::FontDescription::featureSettings const): Deleted.
3059         (WebCore::FontDescription::variationSettings const): Deleted.
3060         (WebCore::FontDescription::fontSynthesis const): Deleted.
3061         (WebCore::FontDescription::variantCommonLigatures const): Deleted.
3062         (WebCore::FontDescription::variantDiscretionaryLigatures const): Deleted.
3063         (WebCore::FontDescription::variantHistoricalLigatures const): Deleted.
3064         (WebCore::FontDescription::variantContextualAlternates const): Deleted.
3065         (WebCore::FontDescription::variantPosition const): Deleted.
3066         (WebCore::FontDescription::variantCaps const): Deleted.
3067         (WebCore::FontDescription::variantNumericFigure const): Deleted.
3068         (WebCore::FontDescription::variantNumericSpacing const): Deleted.
3069         (WebCore::FontDescription::variantNumericFraction const): Deleted.
3070         (WebCore::FontDescription::variantNumericOrdinal const): Deleted.
3071         (WebCore::FontDescription::variantNumericSlashedZero const): Deleted.
3072         (WebCore::FontDescription::variantAlternates const): Deleted.
3073         (WebCore::FontDescription::variantEastAsianVariant const): Deleted.
3074         (WebCore::FontDescription::variantEastAsianWidth const): Deleted.
3075         (WebCore::FontDescription::variantEastAsianRuby const): Deleted.
3076         (WebCore::FontDescription::variantSettings const): Deleted.
3077         (WebCore::FontDescription::opticalSizing const): Deleted.
3078         (WebCore::FontDescription::fontStyleAxis const): Deleted.
3079         (WebCore::FontDescription::shouldAllowUserInstalledFonts const): Deleted.
3080         (WebCore::FontDescription::setComputedSize): Deleted.
3081         (WebCore::FontDescription::setItalic): Deleted.
3082         (WebCore::FontDescription::setStretch): Deleted.
3083         (WebCore::FontDescription::setIsItalic): Deleted.
3084         (WebCore::FontDescription::setWeight): Deleted.
3085         (WebCore::FontDescription::setRenderingMode): Deleted.
3086         (WebCore::FontDescription::setTextRenderingMode): Deleted.
3087         (WebCore::FontDescription::setOrientation): Deleted.
3088         (WebCore::FontDescription::setNonCJKGlyphOrientation): Deleted.
3089         (WebCore::FontDescription::setWidthVariant): Deleted.
3090         (WebCore::FontDescription::setFeatureSettings): Deleted.
3091         (WebCore::FontDescription::setVariationSettings): Deleted.
3092         (WebCore::FontDescription::setFontSynthesis): Deleted.
3093         (WebCore::FontDescription::setVariantCommonLigatures): Deleted.
3094         (WebCore::FontDescription::setVariantDiscretionaryLigatures): Deleted.
3095         (WebCore::FontDescription::setVariantHistoricalLigatures): Deleted.
3096         (WebCore::FontDescription::setVariantContextualAlternates): Deleted.
3097         (WebCore::FontDescription::setVariantPosition): Deleted.
3098         (WebCore::FontDescription::setVariantCaps): Deleted.
3099         (WebCore::FontDescription::setVariantNumericFigure): Deleted.
3100         (WebCore::FontDescription::setVariantNumericSpacing): Deleted.
3101         (WebCore::FontDescription::setVariantNumericFraction): Deleted.
3102         (WebCore::FontDescription::setVariantNumericOrdinal): Deleted.
3103         (WebCore::FontDescription::setVariantNumericSlashedZero): Deleted.
3104         (WebCore::FontDescription::setVariantAlternates): Deleted.
3105         (WebCore::FontDescription::setVariantEastAsianVariant): Deleted.
3106         (WebCore::FontDescription::setVariantEastAsianWidth): Deleted.
3107         (WebCore::FontDescription::setVariantEastAsianRuby): Deleted.
3108         (WebCore::FontDescription::setOpticalSizing): Deleted.
3109         (WebCore::FontDescription::setFontStyleAxis): Deleted.
3110         (WebCore::FontDescription::setShouldAllowUserInstalledFonts): Deleted.
3111         (WebCore::FontDescription::operator== const): Deleted.
3112         * platform/graphics/FontDescription.cpp:
3113         (WebCore::FontDescription::invalidateCaches):
3114         (WebCore::FontCascadeDescription::FontCascadeDescription): Deleted.
3115         (WebCore::FontCascadeDescription::effectiveFamilyCount const): Deleted.
3116         (WebCore::FontCascadeDescription::effectiveFamilyAt const): Deleted.
3117         (WebCore::FontCascadeDescription::lighterWeight): Deleted.
3118         (WebCore::FontCascadeDescription::bolderWeight): Deleted.
3119         (WebCore::FontCascadeDescription::familiesEqualForTextAutoSizing const): Deleted.
3120         (WebCore::FontCascadeDescription::familyNamesAreEqual): Deleted.
3121         (WebCore::FontCascadeDescription::familyNameHash): Deleted.
3122         (WebCore::FontCascadeDescription::foldedFamilyName): Deleted.
3123         * platform/graphics/FontDescription.h:
3124         (WebCore::FontCascadeDescription::operator!= const): Deleted.
3125         (WebCore::FontCascadeDescription::familyCount const): Deleted.
3126         (WebCore::FontCascadeDescription::firstFamily const): Deleted.
3127         (WebCore::FontCascadeDescription::familyAt const): Deleted.
3128         (WebCore::FontCascadeDescription::families const): Deleted.
3129         (WebCore::FontCascadeDescription::specifiedSize const): Deleted.
3130         (WebCore::FontCascadeDescription::isAbsoluteSize const): Deleted.
3131         (WebCore::FontCascadeDescription::lighterWeight const): Deleted.
3132         (WebCore::FontCascadeDescription::bolderWeight const): Deleted.
3133         (WebCore::FontCascadeDescription::useFixedDefaultSize const): Deleted.
3134         (WebCore::FontCascadeDescription::kerning const): Deleted.
3135         (WebCore::FontCascadeDescription::keywordSize const): Deleted.
3136         (WebCore::FontCascadeDescription::keywordSizeAsIdentifier const): Deleted.
3137         (WebCore::FontCascadeDescription::fontSmoothing const): Deleted.
3138         (WebCore::FontCascadeDescription::isSpecifiedFont const): Deleted.
3139         (WebCore::FontCascadeDescription::setOneFamily): Deleted.
3140         (WebCore::FontCascadeDescription::setFamilies): Deleted.
3141         (WebCore::FontCascadeDescription::setSpecifiedSize): Deleted.
3142         (WebCore::FontCascadeDescription::setIsAbsoluteSize): Deleted.
3143         (WebCore::FontCascadeDescription::setKerning): Deleted.
3144         (WebCore::FontCascadeDescription::setKeywordSize): Deleted.
3145         (WebCore::FontCascadeDescription::setKeywordSizeFromIdentifier): Deleted.
3146         (WebCore::FontCascadeDescription::setFontSmoothing): Deleted.
3147         (WebCore::FontCascadeDescription::setIsSpecifiedFont): Deleted.
3148         (WebCore::FontCascadeDescription::equalForTextAutoSizing const): Deleted.
3149         (WebCore::FontCascadeDescription::initialItalic): Deleted.
3150         (WebCore::FontCascadeDescription::initialFontStyleAxis): Deleted.
3151         (WebCore::FontCascadeDescription::initialWeight): Deleted.
3152         (WebCore::FontCascadeDescription::initialStretch): Deleted.
3153         (WebCore::FontCascadeDescription::initialSmallCaps): Deleted.
3154         (WebCore::FontCascadeDescription::initialKerning): Deleted.
3155         (WebCore::FontCascadeDescription::initialFontSmoothing): Deleted.
3156         (WebCore::FontCascadeDescription::initialTextRenderingMode): Deleted.
3157         (WebCore::FontCascadeDescription::initialFontSynthesis): Deleted.
3158         (WebCore::FontCascadeDescription::initialVariantPosition): Deleted.
3159         (WebCore::FontCascadeDescription::initialVariantCaps): Deleted.
3160         (WebCore::FontCascadeDescription::initialVariantAlternates): Deleted.
3161         (WebCore::FontCascadeDescription::initialOpticalSizing): Deleted.
3162         (WebCore::FontCascadeDescription::initialLocale): Deleted.
3163         (WebCore::FontCascadeDescription::operator== const): Deleted.
3164         * platform/mediastream/mac/RealtimeMediaSourceCenterMac.cpp:
3165         * rendering/style/RenderStyle.h:
3166
3167 2018-10-08  Yacine Bandou  <yacine.bandou_ext@softathome.com>
3168
3169         [EME][GStreamer] Add support for WebM encrypted caps "application/x-webm-enc"
3170         https://bugs.webkit.org/show_bug.cgi?id=189239
3171
3172         Reviewed by Xabier Rodriguez-Calvar.
3173
3174         Add the support of GStreamer caps "application/x-webm-enc" in GStreamerCommon.
3175
3176         The DRM system id field in the encrypted event is set to GST_PROTECTION_UNSPECIFIED_SYSTEM_ID
3177         in case of WebM, for details, see https://bugzilla.gnome.org/attachment.cgi?id=365211.
3178
3179         Tests: media/encrypted-media/clearKey/clearKey-encrypted-webm-eventmse.html
3180                media/encrypted-media/clearKey/clearKey-webm-video-playback-mse.html
3181
3182         * platform/graphics/gstreamer/GStreamerCommon.cpp:
3183         (WebCore::capsMediaType):
3184         (WebCore::areEncryptedCaps):
3185         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
3186         (WebCore::MediaPlayerPrivateGStreamerBase::initializationDataEncountered):
3187         * platform/graphics/gstreamer/eme/WebKitClearKeyDecryptorGStreamer.cpp:
3188         * platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.cpp:
3189         (webkitMediaCommonEncryptionDecryptTransformCaps):
3190
3191 2018-10-07  Dan Bernstein  <mitz@apple.com>
3192
3193         Fixed building with the latest macOS SDK
3194
3195         * platform/graphics/cocoa/IOSurface.mm:
3196         (WebCore::IOSurface::ensurePlatformContext): Suppressed deprecation warnings around use of
3197           CGIOSurfaceContextSetDisplayMask.
3198
3199 2018-10-06  Justin Michaud  <justin_michaud@apple.com>
3200
3201         Properly determine if css custom property values are computationally independent
3202         https://bugs.webkit.org/show_bug.cgi?id=190303
3203
3204         Reviewed by Antti Koivisto.
3205
3206         Add getDirectComputationalDependencies method to determine if a value is computationally
3207         dependent. Use this method in CSS.registerProperty to replace existing substring checks.
3208         No new tests are needed because the existing tests cover this behaviour.
3209
3210         * css/CSSCalculationValue.cpp:
3211         (WebCore::determineCategory):
3212         * css/CSSCalculationValue.h:
3213         (WebCore::CSSCalcValue::getDirectComputationalDependencies const):
3214         (WebCore::CSSCalcValue::getDirectRootComputationalDependencies const):
3215         * css/CSSCustomPropertyValue.cpp:
3216         (WebCore::CSSCustomPropertyValue::customCSSText const):
3217         (WebCore::CSSCustomPropertyValue::tokens const):
3218         (WebCore::CSSCustomPropertyValue::setResolvedTypedValue):
3219         * css/CSSCustomPropertyValue.h:
3220         * css/CSSPrimitiveValue.cpp:
3221         (WebCore::CSSPrimitiveValue::getDirectComputationalDependencies const):
3222         (WebCore::CSSPrimitiveValue::getDirectRootComputationalDependencies const):
3223         * css/CSSPrimitiveValue.h:
3224         * css/CSSValue.cpp:
3225         (WebCore::CSSValue::getDirectComputationalDependencies const):
3226         (WebCore::CSSValue::getDirectRootComputationalDependencies const):
3227         * css/CSSValue.h:
3228         * css/CSSVariableData.cpp:
3229         (WebCore::CSSVariableData::CSSVariableData):
3230         (WebCore::CSSVariableData::resolveVariableReference const):
3231         * css/DOMCSSRegisterCustomProperty.cpp:
3232         (WebCore::DOMCSSRegisterCustomProperty::registerProperty):
3233
3234 2018-10-05  Chris Dumez  <cdumez@apple.com>
3235
3236         Regression(r236862): Crash under DOMWindowExtension::willDetachGlobalObjectFromFrame()
3237         https://bugs.webkit.org/show_bug.cgi?id=190320
3238         <rdar://problem/45044814>
3239
3240         Reviewed by Geoffrey Garen.
3241
3242         r236862 caused DOMWindowProperty::willDetachGlobalObjectFromFrame() to get called several
3243         times. There was no effect for most DOMWindowProperty objects. However, it would cause
3244         crashes for DOMWindowExtension objects, which subclass DOMWindowProperty and override
3245         DOMWindowProperty::willDetachGlobalObjectFromFrame() because they dereference the frame
3246         without null checking it.
3247
3248         To address the issue, we now make sure DOMWindowProperty::willDetachGlobalObjectFromFrame()
3249         is not called several times.
3250
3251         * dom/Document.cpp:
3252         (WebCore::Document::detachFromFrame):
3253         Stop calling DOMWindow::willDetachDocumentFromFrame() here as most call sites already
3254         take care of calling DOMWindow::willDetachDocumentFromFrame() beforehand (e.g.
3255         Document::prepareForDestruction()).
3256         Also, return early if the Document is already detached from its frame.
3257
3258         (WebCore::Document::frameWasDisconnectedFromOwner):
3259         Add new utility function called when a Frame is disconnected from its owner which
3260         calls both Document::detachFromFrame() and DOMWindow::willDetachDocumentFromFrame().
3261
3262         * dom/Document.h:
3263         * page/DOMWindow.cpp:
3264         (WebCore::DOMWindow::willDetachDocumentFromFrame):
3265         Return early if the Window is already detached from its frame.
3266
3267         * page/Frame.cpp:
3268         (WebCore::Frame::disconnectOwnerElement):
3269
3270 2018-10-05  Jer Noble  <jer.noble@apple.com>
3271
3272         Further unreviewed watchOS build fix: videoPerformanceMetrics unavailable on watchOS.
3273
3274         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
3275         (WebCore::MediaPlayerPrivateAVFoundationObjC::videoPlaybackQualityMetrics):
3276
3277 2018-10-05  Jer Noble  <jer.noble@apple.com>
3278
3279        Unreviewed watchOS build fix: videoPerformanceMetrics unavailable on watchOS.
3280
3281         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
3282         (WebCore::MediaPlayerPrivateAVFoundationObjC::videoPlaybackQualityMetrics):
3283
3284 2018-10-05  Eric Carlson  <eric.carlson@apple.com>
3285
3286         [MediaStream] RealtimeMediaSource should be able to vend hashed IDs
3287         https://bugs.webkit.org/show_bug.cgi?id=190142
3288         <rdar://problem/44911109>
3289
3290         Reviewed by Youenn Fablet.
3291
3292         No new tests, covered by existing tests.
3293
3294         * Modules/mediastream/CanvasCaptureMediaStreamTrack.cpp:
3295         (WebCore::CanvasCaptureMediaStreamTrack::Source::Source): Update order of parameters passed
3296         to base class.
3297
3298         * Modules/mediastream/MediaDevicesRequest.cpp:
3299         (WebCore::MediaDevicesRequest::start): ASSERT if document.deviceIDHashSalt is not the same
3300         as passed salt.
3301
3302         * Modules/mediastream/MediaStreamTrack.cpp:
3303         (WebCore::MediaStreamTrack::getSettings const): Don't need to hash ID.
3304         (WebCore::MediaStreamTrack::getCapabilities const): Ditto.
3305         * Modules/mediastream/MediaStreamTrack.h:
3306         * Modules/mediastream/MediaStreamTrack.idl:
3307
3308         * Modules/mediastream/UserMediaRequest.cpp:
3309         (WebCore::UserMediaRequest::allow): Pass hash salt to createMediaStream.
3310
3311         * Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp:
3312         (WebCore::LibWebRTCPeerConnectionBackend::createReceiverForSource): Update order of parameters passed
3313         to base class.
3314
3315         * Modules/webaudio/MediaStreamAudioSource.cpp:
3316         (WebCore::MediaStreamAudioSource::MediaStreamAudioSource): Ditto.
3317         * platform/mediastream/MediaConstraints.h:
3318
3319         * platform/mediastream/RealtimeIncomingAudioSource.cpp:
3320         (WebCore::RealtimeIncomingAudioSource::RealtimeIncomingAudioSource): Ditto.
3321
3322         * platform/mediastream/RealtimeIncomingVideoSource.cpp:
3323         (WebCore::RealtimeIncomingVideoSource::RealtimeIncomingVideoSource): Ditto.
3324
3325         * platform/mediastream/RealtimeMediaSource.cpp:
3326         (WebCore::RealtimeMediaSource::RealtimeMediaSource): Calculate hashed ID.
3327         (WebCore::RealtimeMediaSource::selectSettings): Use m_hashedID.
3328         (WebCore::RealtimeMediaSource::hashedId const): New.
3329         (WebCore::RealtimeMediaSource::deviceIDHashSalt const): New.
3330         * platform/mediastream/RealtimeMediaSource.h:
3331
3332         * platform/mediastream/RealtimeMediaSourceCenter.cpp:
3333         (WebCore::RealtimeMediaSourceCenter::createMediaStream): Take hash salt, pass it when creating
3334         a source.
3335         (WebCore::RealtimeMediaSourceCenter::getUserMediaDevices): Ditto.
3336         (WebCore::RealtimeMediaSourceCenter::validateRequestConstraints): Ditto.
3337         * platform/mediastream/RealtimeMediaSourceCenter.h:
3338
3339         * platform/mediastream/RealtimeMediaSourceFactory.h:
3340         * platform/mediastream/RealtimeVideoSource.cpp:
3341         (WebCore::RealtimeVideoSource::RealtimeVideoSource): Update parameters.
3342         * platform/mediastream/RealtimeVideoSource.h:
3343
3344         * platform/mediastream/gstreamer/GStreamerAudioCaptureSource.cpp:
3345         (WebCore::GStreamerAudioCaptureSource::create): Ditto.
3346         (WebCore::GStreamerAudioCaptureSource::GStreamerAudioCaptureSource): Ditto.
3347         * platform/mediastream/gstreamer/GStreamerAudioCaptureSource.h:
3348
3349         * platform/mediastream/gstreamer/GStreamerVideoCaptureSource.cpp:
3350         (WebCore::GStreamerVideoCaptureSource::create): Ditto.
3351         (WebCore::GStreamerVideoCaptureSource::GStreamerVideoCaptureSource): Ditto.
3352         * platform/mediastream/gstreamer/GStreamerVideoCaptureSource.h:
3353
3354         * platform/mediastream/gstreamer/MockGStreamerAudioCaptureSource.cpp:
3355         (WebCore::WrappedMockRealtimeAudioSource::WrappedMockRealtimeAudioSource): Ditto.
3356         (WebCore::MockRealtimeAudioSource::create): Ditto.
3357         (WebCore::MockGStreamerAudioCaptureSource::MockGStreamerAudioCaptureSource): Ditto.
3358         * platform/mediastream/gstreamer/MockGStreamerAudioCaptureSource.h:
3359
3360         * platform/mediastream/gstreamer/MockGStreamerVideoCaptureSource.cpp:
3361         (WebCore::MockRealtimeVideoSource::create): Ditto.
3362         (WebCore::MockGStreamerVideoCaptureSource::MockGStreamerVideoCaptureSource): Ditto.
3363         * platform/mediastream/gstreamer/MockGStreamerVideoCaptureSource.h:
3364
3365         * platform/mediastream/mac/AVVideoCaptureSource.h:
3366         * platform/mediastream/mac/AVVideoCaptureSource.mm:
3367         (WebCore::AVVideoCaptureSource::create): Ditto.
3368         (WebCore::AVVideoCaptureSource::AVVideoCaptureSource): Ditto.
3369         (WebCore::AVVideoCaptureSource::settings): Use hashedId to set device ID.
3370         (WebCore::AVVideoCaptureSource::capabilities): Ditto.
3371
3372         * platform/mediastream/mac/CoreAudioCaptureSource.cpp:
3373         (WebCore::CoreAudioCaptureSource::create): Update parameters.
3374         (WebCore::CoreAudioCaptureSource::CoreAudioCaptureSource): Ditto.
3375         (WebCore::CoreAudioCaptureSource::capabilities): Use hashedId to set device ID.
3376         (WebCore::CoreAudioCaptureSource::settings): Ditto.
3377         * platform/mediastream/mac/CoreAudioCaptureSource.h:
3378
3379         * platform/mediastream/mac/DisplayCaptureSourceCocoa.cpp:
3380         (WebCore::DisplayCaptureSourceCocoa::DisplayCaptureSourceCocoa): Update parameters.
3381         * platform/mediastream/mac/DisplayCaptureSourceCocoa.h:
3382
3383         * platform/mediastream/mac/MockRealtimeAudioSourceMac.h:
3384         * platform/mediastream/mac/MockRealtimeAudioSourceMac.mm:
3385         (WebCore::MockRealtimeAudioSource::create): Ditto.
3386         (WebCore::MockRealtimeAudioSourceMac::MockRealtimeAudioSourceMac): Ditto.
3387
3388         * platform/mediastream/mac/MockRealtimeVideoSourceMac.h:
3389         * platform/mediastream/mac/MockRealtimeVideoSourceMac.mm:
3390         (WebCore::MockRealtimeVideoSource::create): Ditto.
3391         (WebCore::MockRealtimeVideoSourceMac::MockRealtimeVideoSourceMac): Ditto.
3392
3393         * platform/mediastream/mac/RealtimeMediaSourceCenterMac.cpp:
3394
3395         * platform/mediastream/mac/ScreenDisplayCaptureSourceMac.h:
3396         * platform/mediastream/mac/ScreenDisplayCaptureSourceMac.mm:
3397         (WebCore::ScreenDisplayCaptureSourceMac::create): Ditto.
3398         (WebCore::ScreenDisplayCaptureSourceMac::ScreenDisplayCaptureSourceMac): Ditto.
3399         (WebCore::ScreenDisplayCaptureSourceMac::createDisplayStream): Update logging.
3400         (WebCore::ScreenDisplayCaptureSourceMac::startDisplayStream): Ditto.
3401         (WebCore::ScreenDisplayCaptureSourceMac::frameAvailable): Ditto.
3402
3403         * platform/mediastream/mac/WindowDisplayCaptureSourceMac.h:
3404         * platform/mediastream/mac/WindowDisplayCaptureSourceMac.mm:
3405         (WebCore::WindowDisplayCaptureSourceMac::create): Update parameters.
3406
3407         * platform/mock/MockRealtimeAudioSource.cpp:
3408         (WebCore::MockRealtimeAudioSource::create): Ditto.
3409         (WebCore::MockRealtimeAudioSource::MockRealtimeAudioSource): Ditto.
3410         (WebCore::MockRealtimeAudioSource::settings): Use hashedId to set device ID.
3411         (WebCore::MockRealtimeAudioSource::capabilities): Ditto.
3412         * platform/mock/MockRealtimeAudioSource.h:
3413
3414         * platform/mock/MockRealtimeMediaSour