9066243e3ea5e764c1434fb33593023b50a8ecae
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2019-01-05  David Kilzer  <ddkilzer@apple.com>
2
3         Leak of two CCRSACryptorRef (4.0 Kbytes/1 page each) in com.apple.WebKit.WebContent running WebKit layout tests
4         <https://webkit.org/b/193154>
5         <rdar://problem/47052993>
6
7         Reviewed by Brent Fulgham.
8
9         Broadly:
10         - Fix leaks by switching from using raw pointers to using
11           std::unique_ptr<>.
12         - Introduce PlatformRSAKeyContainer type to handle different
13           std::unique_ptr<> on each platform.
14         - Get rid of custom CryptoKeyRSA destructors since the
15           std::unique_ptr<> handles that with a Deleter.
16         - Initialize stack variables to nullptr.
17
18         * crypto/gcrypt/CryptoKeyRSAGCrypt.cpp:
19         (WebCore::CryptoKeyRSA::create):
20         (WebCore::CryptoKeyRSA::CryptoKeyRSA):
21         (WebCore::CryptoKeyRSA::keySizeInBits const):
22         (WebCore::CryptoKeyRSA::generatePair):
23         (WebCore::CryptoKeyRSA::importSpki):
24         (WebCore::CryptoKeyRSA::importPkcs8):
25         (WebCore::CryptoKeyRSA::exportSpki const):
26         (WebCore::CryptoKeyRSA::exportPkcs8 const):
27         (WebCore::CryptoKeyRSA::algorithm const):
28         (WebCore::CryptoKeyRSA::exportData const):
29         (WebCore::CryptoKeyRSA::~CryptoKeyRSA): Deleted.
30         * crypto/keys/CryptoKeyRSA.h:
31         (WebCore::CCRSACryptorRefDeleter::operator() const):
32         * crypto/mac/CryptoKeyRSAMac.cpp:
33         (WebCore::getPublicKeyComponents):
34         (WebCore::getPrivateKeyComponents):
35         (WebCore::CryptoKeyRSA::CryptoKeyRSA):
36         (WebCore::CryptoKeyRSA::create):
37         (WebCore::CryptoKeyRSA::exportData const):
38         (WebCore::CryptoKeyRSA::generatePair):
39         (WebCore::CryptoKeyRSA::importSpki):
40         (WebCore::CryptoKeyRSA::importPkcs8):
41         (WebCore::CryptoKeyRSA::~CryptoKeyRSA): Deleted.
42
43 2019-01-05  Zalan Bujtas  <zalan@apple.com>
44
45         Incorrect clipping across compositing boundary.
46         https://bugs.webkit.org/show_bug.cgi?id=193172
47         <rdar://problem/44693008>
48
49         Reviewed by Simon Fraser.
50
51         Use temporary cliprect type when crossing compositing boundary to prevent cliprect caching.
52
53         The issue here is that RenderLayer::backgroundClipRect() could cross compositing boundary by calling parentClipRects() which triggers
54         clip rect update using the wrong painting root. This happens when the layer hierarchy and the compositing context do not match.
55         For clip rect computation, we need to climb up on the layer hierarchy (calling parent layer's cliprect functions)
56         but we also need to make sure that the computed cliprects on any given layer are cached only when the painting root is correct.
57         It ensures that when we paint a layer (with the painting root as entry point), the cached cliprects are always based on its onw painting root. 
58
59         Test: compositing/clipping/cached-cliprect-with-compositing-boundary.html
60
61         * rendering/RenderLayer.cpp:
62         (WebCore::RenderLayer::calculateClipRects const):
63
64 2019-01-05  Youenn Fablet  <youenn@apple.com>
65
66         Service Worker fetch should obey its referrer policy
67         https://bugs.webkit.org/show_bug.cgi?id=193152
68
69         Reviewed by Chris Dumez.
70
71         Pass referrer policy retrieved when fetching the service worker script to the SWServer.
72         The SWServer then stores it persistently and sends it to the manager creating service workers.
73         This manager will then set the referrer policy on the dummy Document of the corresponding service worker.
74
75         Covered by rebased test.
76
77         * workers/WorkerScriptLoader.cpp:
78         (WebCore::WorkerScriptLoader::didReceiveResponse):
79         * workers/WorkerScriptLoader.h:
80         (WebCore::WorkerScriptLoader::referrerPolicy const):
81         * workers/service/SWClientConnection.cpp:
82         (WebCore::SWClientConnection::failedFetchingScript):
83         * workers/service/ServiceWorkerContainer.cpp:
84         (WebCore::ServiceWorkerContainer::jobFinishedLoadingScript):
85         * workers/service/ServiceWorkerContainer.h:
86         * workers/service/ServiceWorkerContextData.cpp:
87         (WebCore::ServiceWorkerContextData::isolatedCopy const):
88         * workers/service/ServiceWorkerContextData.h:
89         (WebCore::ServiceWorkerContextData::encode const):
90         (WebCore::ServiceWorkerContextData::decode):
91         * workers/service/ServiceWorkerFetchResult.h:
92         (WebCore::ServiceWorkerFetchResult::encode const):
93         (WebCore::ServiceWorkerFetchResult::decode):
94         * workers/service/ServiceWorkerJob.cpp:
95         (WebCore::ServiceWorkerJob::notifyFinished):
96         * workers/service/ServiceWorkerJobClient.h:
97         * workers/service/context/ServiceWorkerThreadProxy.cpp:
98         (WebCore::createPageForServiceWorker):
99         * workers/service/server/RegistrationDatabase.cpp:
100         (WebCore::recordsTableSchema):
101         (WebCore::RegistrationDatabase::doPushChanges):
102         (WebCore::RegistrationDatabase::importRecords):
103         * workers/service/server/SWServer.cpp:
104         (WebCore::SWServer::addRegistrationFromStore):
105         (WebCore::SWServer::updateWorker):
106         (WebCore::SWServer::installContextData):
107         * workers/service/server/SWServer.h:
108         * workers/service/server/SWServerJobQueue.cpp:
109         (WebCore::SWServerJobQueue::scriptFetchFinished):
110         * workers/service/server/SWServerWorker.cpp:
111         (WebCore::SWServerWorker::SWServerWorker):
112         (WebCore::SWServerWorker::contextData const):
113         * workers/service/server/SWServerWorker.h:
114
115 2019-01-04  Simon Fraser  <simon.fraser@apple.com>
116
117         Factor legacy WK1 code for fixed and scrolling layers into their own helper class
118         https://bugs.webkit.org/show_bug.cgi?id=193165
119
120         Reviewed by Frédéric Wang.
121
122         RenderLayerCompositor has some code to handle registration of viewport-constrained
123         and scrolling layers which is specific to iOS WK1. To reduce pollution, move this
124         into its own helper class called LegacyWebKitScrollingLayerCoordinator, which is only
125         allocated for iOS WK1.
126         
127         iOS WK1 never has a ScrollingCoordinator, so rather than the check for scrollingCoordinator(),
128         we know that we only made a LegacyWebKitScrollingLayerCoordinator when there's a platform widget
129         (i.e. WK1).
130         
131         * page/ChromeClient.h:
132         * rendering/RenderLayerCompositor.cpp:
133         (WebCore::RenderLayerCompositor::RenderLayerCompositor):
134         (WebCore::RenderLayerCompositor::updateCustomLayersAfterFlush):
135         (WebCore::RenderLayerCompositor::didFlushChangesForLayer):
136         (WebCore::RenderLayerCompositor::setIsInWindow):
137         (WebCore::RenderLayerCompositor::willRemoveScrollingLayerWithBacking): No longer check the page cache state; now we
138         destroy the render tree of pages in the page cache, so we should never hit this code path.
139         (WebCore::RenderLayerCompositor::didAddScrollingLayer):
140         (WebCore::LegacyWebKitScrollingLayerCoordinator::registerAllViewportConstrainedLayers):
141         (WebCore::LegacyWebKitScrollingLayerCoordinator::unregisterAllViewportConstrainedLayers):
142         (WebCore::scrollbarHasDisplayNone):
143         (WebCore::LegacyWebKitScrollingLayerCoordinator::updateScrollingLayer):
144         (WebCore::LegacyWebKitScrollingLayerCoordinator::registerAllScrollingLayers):
145         (WebCore::LegacyWebKitScrollingLayerCoordinator::registerScrollingLayersNeedingUpdate):
146         (WebCore::LegacyWebKitScrollingLayerCoordinator::unregisterAllScrollingLayers):
147         (WebCore::LegacyWebKitScrollingLayerCoordinator::addScrollingLayer):
148         (WebCore::LegacyWebKitScrollingLayerCoordinator::removeScrollingLayer):
149         (WebCore::LegacyWebKitScrollingLayerCoordinator::didFlushChangesForLayer):
150         (WebCore::updateScrollingLayerWithClient): Deleted.
151         (WebCore::RenderLayerCompositor::registerAllViewportConstrainedLayers): Deleted.
152         (WebCore::RenderLayerCompositor::unregisterAllViewportConstrainedLayers): Deleted.
153         (WebCore::RenderLayerCompositor::registerAllScrollingLayers): Deleted.
154         (WebCore::RenderLayerCompositor::unregisterAllScrollingLayers): Deleted.
155         * rendering/RenderLayerCompositor.h:
156         (WebCore::LegacyWebKitScrollingLayerCoordinator::LegacyWebKitScrollingLayerCoordinator):
157         * workers/service/ServiceWorkerContainer.cpp:
158         (WebCore::ServiceWorkerContainer::~ServiceWorkerContainer):
159
160 2019-01-05  Zalan Bujtas  <zalan@apple.com>
161
162         [LFC] VerticalMargin should only have the used values.
163         https://bugs.webkit.org/show_bug.cgi?id=193168
164
165         Reviewed by Antti Koivisto.
166
167         Split VerticalMargin into ComputedVerticalMargin and UsedVerticalMargin.
168         ComputedVerticalMargin holds the computed (optional) values while UsedVerticalMargin holds both the
169         collapsed (optional) and the non-collapsed values.
170
171         * layout/FormattingContext.cpp:
172         (WebCore::Layout::FormattingContext::computeOutOfFlowVerticalGeometry const):
173         * layout/FormattingContext.h:
174         * layout/FormattingContextGeometry.cpp:
175         (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedVerticalGeometry):
176         (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedVerticalGeometry):
177         (WebCore::Layout::FormattingContext::Geometry::complicatedCases):
178         (WebCore::Layout::FormattingContext::Geometry::inlineReplacedHeightAndMargin):
179         (WebCore::Layout::FormattingContext::Geometry::inlineReplacedWidthAndMargin):
180         (WebCore::Layout::FormattingContext::Geometry::computedVerticalMargin):
181         (WebCore::Layout::FormattingContext::Geometry::computedNonCollapsedVerticalMarginValue): Deleted.
182         * layout/FormattingContextQuirks.cpp:
183         (WebCore::Layout::FormattingContext::Quirks::heightValueOfNearestContainingBlockWithFixedHeight):
184         * layout/LayoutUnits.h:
185         * layout/MarginTypes.h:
186         (WebCore::Layout::UsedVerticalMargin::before const):
187         (WebCore::Layout::UsedVerticalMargin::after const):
188         (WebCore::Layout::UsedVerticalMargin::nonCollapsedValues const):
189         (WebCore::Layout::UsedVerticalMargin::collapsedValues const):
190         (WebCore::Layout::UsedVerticalMargin::hasCollapsedValues const):
191         (WebCore::Layout::UsedVerticalMargin::setCollapsedValues):
192         (WebCore::Layout::UsedVerticalMargin::UsedVerticalMargin):
193         (WebCore::Layout::VerticalMargin::nonCollapsedValues const): Deleted.
194         (WebCore::Layout::VerticalMargin::collapsedValues const): Deleted.
195         (WebCore::Layout::VerticalMargin::setCollapsedValues): Deleted.
196         (WebCore::Layout::VerticalMargin::VerticalMargin): Deleted.
197         (WebCore::Layout::VerticalMargin::usedValues const): Deleted.
198         * layout/blockformatting/BlockFormattingContext.cpp:
199         (WebCore::Layout::BlockFormattingContext::computeHeightAndMargin const):
200         * layout/blockformatting/BlockFormattingContextGeometry.cpp:
201         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedHeightAndMargin):
202         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowHeightAndMargin):
203         * layout/blockformatting/BlockFormattingContextQuirks.cpp:
204         (WebCore::Layout::BlockFormattingContext::Quirks::stretchedHeight):
205         * layout/blockformatting/BlockMarginCollapse.cpp:
206         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::computedNonCollapsedMarginBefore):
207         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::computedNonCollapsedMarginAfter):
208         * layout/displaytree/DisplayBox.h:
209         (WebCore::Display::Box::setVerticalMargin):
210         (WebCore::Display::Box::verticalMargin const):
211         (WebCore::Display::Box::marginBefore const):
212         (WebCore::Display::Box::marginAfter const):
213         * layout/floats/FloatingContext.cpp:
214         (WebCore::Layout::FloatingContext::verticalPositionWithClearance const):
215         * layout/inlineformatting/InlineFormattingContext.cpp:
216         (WebCore::Layout::InlineFormattingContext::computeHeightAndMargin const):
217
218 2019-01-04  Daniel Bates  <dabates@apple.com>
219
220         REGRESSION (r238522): Erratic scrolling on Google flights search result page and vrbo.com
221         https://bugs.webkit.org/show_bug.cgi?id=192996
222         <rdar://problem/46573552>
223
224         Reviewed by Simon Fraser.
225
226         Only scroll a text field if its inner text size changes and it is the currently active and
227         focused element on the page.
228
229         Test: fast/scrolling/page-should-not-scroll-on-unfocused-text-field-layout.html
230
231         * rendering/RenderTextControlSingleLine.cpp:
232         (WebCore::RenderTextControlSingleLine::layout):
233
234 2019-01-04  Alex Christensen  <achristensen@webkit.org>
235
236         Progress towards fixing Mac CMake build
237         https://bugs.webkit.org/show_bug.cgi?id=193105
238
239         Reviewed by Don Olmstead.
240
241         * PlatformMac.cmake:
242         * Sources.txt:
243         * SourcesCocoa.txt:
244         * WebCore.xcodeproj/project.pbxproj:
245         * platform/graphics/gpu/GPURenderPassEncoder.h:
246
247 2019-01-04  Zalan Bujtas  <zalan@apple.com>
248
249         [iOS] ERROR: post-layout: dirty renderer(s) in WebCore::RenderTreeNeedsLayoutChecker::~RenderTreeNeedsLayoutChecker()
250         https://bugs.webkit.org/show_bug.cgi?id=189608
251         <rdar://problem/44473299>
252
253         Reviewed by Simon Fraser.
254
255         When a frameset/iframe is hidden and we skip layout, clear the dirty flag on its subtree as well.
256
257         Covered by fast/frames/invalid-frameset.html.
258
259         * rendering/RenderFrameSet.cpp:
260         (WebCore::clearSiblingSubtrees):
261         (WebCore::RenderFrameSet::positionFrames):
262         (WebCore::RenderFrameSet::positionFramesWithFlattening):
263
264 2019-01-04  Youenn Fablet  <youenn@apple.com>
265
266         [Fetch API] Implement abortable fetch
267         https://bugs.webkit.org/show_bug.cgi?id=174980
268         <rdar://problem/46861402>
269
270         Reviewed by Chris Dumez.
271
272         Add an AbortSignal to FetchRequest.
273
274         Add support for AbortSignal algorithm.
275         The fetch request signal is added an algorithm to abort the fetch.
276         Update clone algorithm to let signal of the cloned request be following the origin request.
277
278         Update ReadableStream error handling to return an exception instead of a string.
279         This allows passing an AbortError instead of a TypeError as previously done.
280
281         Update FetchBodyOwner to store a loading error either as an exception or as a resource error.
282         The latter is used for passing the error from service worker back to the page.
283         The former is used to pass it to ReadableStream or body accessors.
284
285         Covered by enabled tests.
286
287         * Modules/cache/DOMCache.cpp:
288         (WebCore::DOMCache::put):
289         * Modules/fetch/FetchBody.cpp:
290         (WebCore::FetchBody::consumeAsStream):
291         (WebCore::FetchBody::loadingFailed):
292         * Modules/fetch/FetchBody.h:
293         * Modules/fetch/FetchBodyConsumer.cpp:
294         (WebCore::FetchBodyConsumer::loadingFailed):
295         * Modules/fetch/FetchBodyConsumer.h:
296         * Modules/fetch/FetchBodyOwner.cpp:
297         (WebCore::FetchBodyOwner::arrayBuffer):
298         (WebCore::FetchBodyOwner::blob):
299         (WebCore::FetchBodyOwner::cloneBody):
300         (WebCore::FetchBodyOwner::formData):
301         (WebCore::FetchBodyOwner::json):
302         (WebCore::FetchBodyOwner::text):
303         (WebCore::FetchBodyOwner::loadBlob):
304         (WebCore::FetchBodyOwner::blobLoadingFailed):
305         (WebCore::FetchBodyOwner::consumeBodyAsStream):
306         (WebCore::FetchBodyOwner::setLoadingError):
307         * Modules/fetch/FetchBodyOwner.h:
308         (WebCore::FetchBodyOwner::loadingError const):
309         (WebCore::FetchBodyOwner::loadingException const):
310         * Modules/fetch/FetchBodySource.cpp:
311         (WebCore::FetchBodySource::error):
312         * Modules/fetch/FetchBodySource.h:
313         * Modules/fetch/FetchRequest.cpp:
314         (WebCore::FetchRequest::initializeWith):
315         (WebCore::FetchRequest::clone):
316         * Modules/fetch/FetchRequest.h:
317         (WebCore::FetchRequest::FetchRequest):
318         * Modules/fetch/FetchRequest.idl:
319         * Modules/fetch/FetchRequestInit.h:
320         (WebCore::FetchRequestInit::hasMembers const):
321         * Modules/fetch/FetchRequestInit.idl:
322         * Modules/fetch/FetchResponse.cpp:
323         (WebCore::FetchResponse::clone):
324         (WebCore::FetchResponse::fetch):
325         (WebCore::FetchResponse::BodyLoader::didFail):
326         * Modules/fetch/FetchResponse.h:
327         * bindings/js/ReadableStreamDefaultController.h:
328         (WebCore::ReadableStreamDefaultController::error):
329         * dom/AbortSignal.cpp:
330         (WebCore::AbortSignal::abort):
331         (WebCore::AbortSignal::follow):
332         * dom/AbortSignal.h:
333
334 2019-01-04  Brent Fulgham  <bfulgham@apple.com>
335
336         Parsed protocol of javascript URLs with embedded newlines and carriage returns do not match parsed protocol in Chrome and Firefox
337         https://bugs.webkit.org/show_bug.cgi?id=193155
338         <rdar://problem/40230982>
339
340         Reviewed by Chris Dumez.
341
342         Test: fast/loader/comment-only-javascript-url.html
343
344         Make a special case for URLs beginning with 'javascript:'. We should always
345         treat these as JS URLs, even if the content contained within the URL
346         string might match other parts of the URL parsing spec.
347
348         * html/URLUtils.h:
349         (WebCore::URLUtils<T>::protocol const):
350
351 2019-01-04  Jer Noble  <jer.noble@apple.com>
352
353         [WebKitLegacy] Media playback pauses on scroll
354         https://bugs.webkit.org/show_bug.cgi?id=192829
355
356         Reviewed by Eric Carlson.
357
358         New API tests:
359             WebKitLegacy.ScrollingDoesNotPauseMedia
360             WKWebView.StopAllMediaPlayback
361             WKWebView.SuspendResumeAllMediaPlayback
362
363         Do not use suspendActiveDOMObjects(ReasonForSuspension::PageWillBeSuspended) to pause
364         video. Roll back the changes to HTMLMediaElement, and introduce a new set of Page calls
365         suspendAllMediaPlayback() & resumeAllMediaPlayback() which replaces the removed bahavior.
366
367         * dom/Document.cpp:
368         (WebCore::Document::~Document):
369         (WebCore::Document::stopAllMediaPlayback):
370         (WebCore::Document::suspendAllMediaPlayback):
371         (WebCore::Document::resumeAllMediaPlayback):
372         * dom/Document.h:
373         * html/HTMLMediaElement.cpp:
374         (WebCore::HTMLMediaElement::HTMLMediaElement):
375         (WebCore::HTMLMediaElement::parseAttribute):
376         (WebCore::HTMLMediaElement::didFinishInsertingNode):
377         (WebCore::HTMLMediaElement::setSrcObject):
378         (WebCore::HTMLMediaElement::updateActiveTextTrackCues):
379         (WebCore::HTMLMediaElement::suspend):
380         (WebCore::HTMLMediaElement::resume):
381         (WebCore::HTMLMediaElement::webkitCurrentPlaybackTargetIsWireless const):
382         * html/HTMLMediaElement.h:
383         (WebCore::HTMLMediaElement::webkitCurrentPlaybackTargetIsWireless const): Deleted.
384         * html/MediaElementSession.cpp:
385         (WebCore::MediaElementSession::playbackPermitted const):
386         * page/Page.cpp:
387         (WebCore::Page::stopAllMediaPlayback):
388         (WebCore::Page::suspendAllMediaPlayback):
389         (WebCore::Page::resumeAllMediaPlayback):
390         * page/Page.h:
391         (WebCore::Page::mediaPlaybackIsSuspended):
392         * platform/audio/PlatformMediaSession.h:
393         * platform/audio/PlatformMediaSessionManager.cpp:
394         (WebCore::PlatformMediaSessionManager::suspendAllMediaPlaybackForDocument):
395         (WebCore::PlatformMediaSessionManager::resumeAllMediaPlaybackForDocument):
396         * platform/audio/PlatformMediaSessionManager.h:
397
398 2019-01-04  Chris Dumez  <cdumez@apple.com>
399
400         Add support for toggling device orientation API support per site
401         https://bugs.webkit.org/show_bug.cgi?id=193143
402         <rdar://problem/46605724>
403
404         Reviewed by Alex Christensen.
405
406         Add support for toggling device orientation API support per site via _WKWebsitePolicies.
407
408         * dom/Document.cpp:
409         (WebCore::Document::simulateDeviceOrientationChange):
410         * dom/Document.h:
411         * loader/DocumentLoader.h:
412         (WebCore::DocumentLoader::deviceOrientationEventEnabled const):
413         (WebCore::DocumentLoader::setDeviceOrientationEventEnabled):
414         * page/DOMWindow.cpp:
415         (WebCore::DOMWindow::addEventListener):
416
417 2019-01-04  Jer Noble  <jer.noble@apple.com>
418
419         Web Content process main thread blocked beneath ImageDecoderAVFObjC::readSamples for many seconds on imgur.com
420         https://bugs.webkit.org/show_bug.cgi?id=191806
421         <rdar://problem/46151477>
422
423         Reviewed by Dean Jackson.
424
425         Test: http/tests/images/mp4-partial-load.html
426
427         Rather than use an AVAssetReaderTrackOutput, which will load both sample metadata and sample data
428         synchronously when a sample is requested, use AVAssetReaderSampleReferenceOutput, which only loads
429         sample metadata, including the byte offset and byte length of the sample data. By waiting until the
430         AVAsset signals that it's own metadata is loaded, we can safely parse all the sample metadata without
431         blocking on network loads. Once enough data is loaded, we can replace the byte reference and offset
432         attachements in the sample with actual data, and mark the sample as "complete".
433
434         Because the existing ImageSource assumes that image data parsing will occur synchronously, and that
435         synchronous parsing could cause a hang if the metadata is not loaded, add a new callback method which
436         allows the ImageSource to be notified when the encodedDataStatus changes. The ImageSource notifies the
437         CacheImage, which notifies the RenderImage, and thus the asynchronous parsing will kick off the
438         renderer's animation loop.
439
440         * loader/cache/CachedImage.cpp:
441         (WebCore::CachedImage::CachedImageObserver::encodedDataStatusChanged):
442         (WebCore::CachedImage::encodedDataStatusChanged):
443         * loader/cache/CachedImage.h:
444         * platform/graphics/ImageDecoder.h:
445         (WebCore::ImageDecoder::setEncodedDataStatusChangeCallback):
446         * platform/graphics/ImageObserver.h:
447         (WebCore::ImageObserver::encodedDataStatusChanged):
448         * platform/graphics/ImageSource.cpp:
449         (WebCore::ImageSource::ensureDecoderAvailable):
450         (WebCore::ImageSource::encodedDataStatusChanged):
451         (WebCore::ImageSource::frameDecodingStatusAtIndex):
452         * platform/graphics/ImageSource.h:
453         * platform/graphics/avfoundation/objc/ImageDecoderAVFObjC.h:
454         * platform/graphics/avfoundation/objc/ImageDecoderAVFObjC.mm:
455         (-[WebCoreSharedBufferResourceLoaderDelegate data]):
456         (WebCore::ImageDecoderAVFObjCSample::byteRange const):
457         (WebCore::ImageDecoderAVFObjC::readSamples):
458         (WebCore::ImageDecoderAVFObjC::setEncodedDataStatusChangeCallback):
459         (WebCore::ImageDecoderAVFObjC::encodedDataStatus const):
460         (WebCore::ImageDecoderAVFObjC::frameIsCompleteAtIndex const):
461         (WebCore::ImageDecoderAVFObjC::createFrameImageAtIndex):
462         (WebCore::ImageDecoderAVFObjC::sampleIsComplete const):
463
464 2019-01-04  Youenn Fablet  <youenn@apple.com>
465
466         CSP violation reports should bypass CSP checks
467         https://bugs.webkit.org/show_bug.cgi?id=192857
468         <rdar://problem/46887236>
469
470         Reviewed by Chris Dumez.
471
472         For ping loads, pass the option to do CSP checks from PingLoader to LoaderStrategy.
473         This new option is unused by WebKit Legacy.
474         It is used by WebKit loader strategy to only send any CSP response header to network process
475         in case CSP checks should be done.
476
477         This option is used to disable CSP checks for Ping Loads that report CSP violations.
478
479         Test: http/wpt/fetch/csp-reports-bypass-csp-checks.html
480
481         * loader/LoaderStrategy.h:
482         * loader/PingLoader.cpp:
483         (WebCore::PingLoader::loadImage):
484         (WebCore::PingLoader::sendPing):
485         (WebCore::PingLoader::sendViolationReport):
486         (WebCore::PingLoader::startPingLoad):
487         * loader/PingLoader.h:
488         * loader/cache/CachedResource.cpp:
489         (WebCore::CachedResource::load):
490
491 2019-01-04  Wenson Hsieh  <wenson_hsieh@apple.com>
492
493         [Cocoa] Merge WebEditCommandProxy::nameForEditAction and undoNameForEditAction into a single function
494         https://bugs.webkit.org/show_bug.cgi?id=193129
495
496         Reviewed by Tim Horton.
497
498         Adds a new helper function that returns the undo/redo name for a given EditAction. No change in behavior.
499
500         * Sources.txt:
501         * WebCore.xcodeproj/project.pbxproj:
502         * editing/EditAction.cpp: Copied from Source/WebKit/UIProcess/WebEditCommandProxy.cpp.
503         (WebCore::nameForUndoRedo):
504         * editing/EditAction.h:
505         * editing/Editor.cpp:
506
507 2019-01-03  Matt Rajca  <mrajca@apple.com>
508
509         Make DidPlayMediaPreventedFromPlaying autoplay event more generic.
510         https://bugs.webkit.org/show_bug.cgi?id=193128
511         rdar://34554231
512
513         Reviewed by Jer Noble.
514
515         Today, the "DidPlayMediaPreventedFromPlaying" autoplay event is only sent for
516         media prevented from autoplaying. It could be generalized to a "DidPlayMediaWithUserGesture"
517         event along with a flag that indicates whether or not autoplay was actually prevented.
518         Moreover, we can include a flag that indicates whether the media element in question
519         is main content. Clients will then know in more cases when media was played with a user
520         gesture, whether or not it has audio, as well as its main content status. While the main
521         content heuristics may not be perfect, they covered the top 20 video-centric websites that
522         this was tested with and are meant to be used by clients for data evaluation purposes.
523
524         As part of this, the PlaybackWithoutUserGesture enum was renamed to AutoplayEventPlaybackState
525         since it now also applies to cases where there is a user gesture. The
526         `m_playbackWithoutUserGestureStartedTime` member variable was also removed in favor of
527         `playbackStartedTime` which also covers all the cases we care about.
528
529         Tests: existing API tests were updated to reflect the new names. New API tests
530         were added for the new case in which the "DidPlayMediaWithUserGesture" event is sent.
531
532         * html/HTMLMediaElement.cpp:
533         (WebCore::convertEnumerationToString): Update to new enum cases.
534         (WebCore::HTMLMediaElement::setReadyState): Ditto.
535         (WebCore::HTMLMediaElement::play): Ditto.
536         (WebCore::HTMLMediaElement::playInternal): Also cover the case where
537          playback was not prevented but there was a user gesture.
538         (WebCore::HTMLMediaElement::pauseInternal): Use new name.
539         (WebCore::HTMLMediaElement::setVolume): Use new name.
540         (WebCore::HTMLMediaElement::playbackProgressTimerFired): Dispatch the
541          DidPlayMediaWithUserGesture event when playback was started with a user
542          gesture as well.
543         (WebCore::HTMLMediaElement::mediaPlayerDidAddAudioTrack): Use new name.
544         (WebCore::HTMLMediaElement::mediaPlayerTimeChanged): Ditto.
545         (WebCore::HTMLMediaElement::mediaPlayerCharacteristicChanged): Ditto.
546         (WebCore::HTMLMediaElement::stopWithoutDestroyingMediaPlayer): Ditto.
547         (WebCore::HTMLMediaElement::handleAutoplayEvent): Pass along new media state.
548         (WebCore::HTMLMediaElement::userDidInterfereWithAutoplay): Use new name.
549         (WebCore::HTMLMediaElement::setAutoplayEventPlaybackState): Stop setting
550          m_playbackWithoutUserGestureStartedTime in favor of using playbackStartedTime.
551         (WebCore::HTMLMediaElement::updateShouldPlay): Use new name.
552         (WebCore::HTMLMediaElement::setPlaybackWithoutUserGesture): Renamed.
553         * html/HTMLMediaElement.h:
554         (WTF::LogArgument<WebCore::HTMLMediaElement::AutoplayEventPlaybackState>::toString): Renamed from...
555         (WTF::LogArgument<WebCore::HTMLMediaElement::PlaybackWithoutUserGesture>::toString):
556         * html/MediaElementSession.cpp:
557         (WebCore::MediaElementSession::isMainContentForPurposesOfAutoplayEvents const): Don't
558          do the hit testing check for the purposes of autoplay events. It seems to fail on the
559          basic Vimeo player due to overlapping divs.
560         (WebCore::isElementMainContentForPurposesOfAutoplay):
561         (WebCore::MediaElementSession::updateIsMainContent const): Keep the existing behavior
562          here of hit testing.
563         (WebCore::isMainContentForPurposesOfAutoplay): Renamed.
564         * html/MediaElementSession.h:
565         * page/AutoplayEvent.h:
566
567 2019-01-04  Youenn Fablet  <youenn@apple.com>
568
569         Crash in WebCore::ServiceWorkerGlobalScope
570         https://bugs.webkit.org/show_bug.cgi?id=192513
571         <rdar://problem/46563880>
572
573         Reviewed by Alex Christensen.
574
575         Store the identifier in its own variable to make sure we do not use workerThread after being moved.
576
577         * workers/service/ServiceWorkerGlobalScope.cpp:
578         (WebCore::ServiceWorkerGlobalScope::skipWaiting):
579
580 2019-01-04  Chris Fleizach  <cfleizach@apple.com>
581
582         AX: String check: "Rule" does not reflect the meaning of the <hr> html tag
583         https://bugs.webkit.org/show_bug.cgi?id=193041
584         <rdar://problem/46954090>
585
586         Reviewed by Zalan Bujtas.
587
588         * en.lproj/Localizable.strings:
589         * platform/cocoa/LocalizedStringsCocoa.mm:
590         (WebCore::AXHorizontalRuleDescriptionText):
591
592 2019-01-04  Zalan Bujtas  <zalan@apple.com>
593
594         [LFC] ComputedHorizontalMargin should have optional members
595         https://bugs.webkit.org/show_bug.cgi?id=193131
596
597         Reviewed by Antti Koivisto.
598
599         Split HorizontalMargin into UsedHorizontalMargin and ComputedHorizontalMargin. ComputedHorizontalMargin's members are optional.
600         (see computed vs used values)
601
602         * layout/FormattingContext.h:
603         * layout/FormattingContextGeometry.cpp:
604         (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedHorizontalGeometry):
605         (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedHorizontalGeometry):
606         (WebCore::Layout::FormattingContext::Geometry::floatingNonReplacedWidthAndMargin):
607         (WebCore::Layout::FormattingContext::Geometry::floatingReplacedWidthAndMargin):
608         (WebCore::Layout::FormattingContext::Geometry::inlineReplacedWidthAndMargin):
609         (WebCore::Layout::FormattingContext::Geometry::computedHorizontalMargin):
610         (WebCore::Layout::FormattingContext::Geometry::computedNonCollapsedHorizontalMarginValue): Deleted.
611         * layout/LayoutUnits.h:
612         * layout/MarginTypes.h:
613         * layout/Verification.cpp:
614         (WebCore::Layout::outputMismatchingBlockBoxInformationIfNeeded):
615         * layout/blockformatting/BlockFormattingContextGeometry.cpp:
616         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedWidthAndMargin):
617         * layout/displaytree/DisplayBox.h:
618         (WebCore::Display::Box::setHorizontalMargin):
619         (WebCore::Display::Box::setHorizontalComputedMargin):
620         (WebCore::Display::Box::computedMarginStart const):
621         (WebCore::Display::Box::computedMarginEnd const):
622         * layout/floats/FloatAvoider.h:
623         (WebCore::Layout::FloatAvoider::marginStart const):
624         (WebCore::Layout::FloatAvoider::marginEnd const):
625         * layout/inlineformatting/InlineFormattingContext.cpp:
626         (WebCore::Layout::InlineFormattingContext::collectInlineContentForSubtree const):
627         * layout/inlineformatting/InlineFormattingContextGeometry.cpp:
628         (WebCore::Layout::InlineFormattingContext::Geometry::inlineBlockWidthAndMargin):
629
630 2019-01-04  Zalan Bujtas  <zalan@apple.com>
631
632         [LFC][BFC] Use computedValue and usedValue consistently
633         https://bugs.webkit.org/show_bug.cgi?id=193059
634
635         Reviewed by Antti Koivisto.
636
637         https://www.w3.org/TR/CSS22/cascade.html#value-stages
638
639         6.1.2 Computed values
640         Specified values are resolved to computed values during the cascade; for example URIs are made absolute and 'em' and 'ex' units
641         are computed to pixel or absolute lengths. Computing a value never requires the user agent to render the document...
642
643         6.1.3 Used values
644         Computed values are processed as far as possible without formatting the document. Some values, however, can only be determined when the document
645         is being laid out. For example, if the width of an element is set to be a certain percentage of its containing block, the width cannot be determined
646         until the width of the containing block has been determined. The used value is the result of taking the computed value and resolving any remaining
647         dependencies into an absolute value.
648
649         * layout/FormattingContext.cpp:
650         (WebCore::Layout::FormattingContext::computeOutOfFlowHorizontalGeometry const):
651         * layout/FormattingContextGeometry.cpp:
652         (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedHorizontalGeometry):
653         (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedVerticalGeometry):
654         (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedHorizontalGeometry):
655         (WebCore::Layout::FormattingContext::Geometry::complicatedCases):
656         (WebCore::Layout::FormattingContext::Geometry::inlineReplacedWidthAndMargin):
657         * layout/LayoutState.cpp:
658         (WebCore::Layout::LayoutState::LayoutState):
659         * layout/LayoutUnits.h:
660         * layout/Verification.cpp:
661         (WebCore::Layout::outputMismatchingBlockBoxInformationIfNeeded):
662         * layout/blockformatting/BlockFormattingContext.cpp:
663         (WebCore::Layout::BlockFormattingContext::computeWidthAndMargin const):
664         * layout/blockformatting/BlockFormattingContextGeometry.cpp:
665         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedWidthAndMargin):
666         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowReplacedWidthAndMargin):
667         * layout/displaytree/DisplayBox.cpp:
668         (WebCore::Display::Box::Box):
669         * layout/displaytree/DisplayBox.h:
670         (WebCore::Display::Box::setHasValidHorizontalComputedMargin):
671         (WebCore::Display::Box::setHorizontalComputedMargin):
672         (WebCore::Display::Box::computedMarginStart const):
673         (WebCore::Display::Box::computedMarginEnd const):
674         (WebCore::Display::Box::setHasValidHorizontalNonComputedMargin): Deleted.
675         (WebCore::Display::Box::setHorizontalNonComputedMargin): Deleted.
676         (WebCore::Display::Box::nonComputedMarginStart const): Deleted.
677         (WebCore::Display::Box::nonComputedMarginEnd const): Deleted.
678         * layout/floats/FloatAvoider.h:
679         (WebCore::Layout::FloatAvoider::marginStart const):
680         (WebCore::Layout::FloatAvoider::marginEnd const):
681         * layout/inlineformatting/InlineFormattingContext.cpp:
682         (WebCore::Layout::InlineFormattingContext::computeWidthAndMargin const):
683
684 2019-01-03  Zalan Bujtas  <zalan@apple.com>
685
686         REGRESSION: -webkit-appearance test case crashes
687         https://bugs.webkit.org/show_bug.cgi?id=189302
688         <rdar://problem/44143049>
689
690         Reviewed by Wenson Hsieh.
691
692         The painting and the layout positions of the cancel button need to match in order to be able to interact with it.
693         This patch removes the previous position inlining attempts.
694
695         Test: fast/forms/webkit-appearance-searchfield-cancel-button-crash.html
696
697         * rendering/RenderThemeMac.mm:
698         (WebCore::RenderThemeMac::paintSearchFieldCancelButton):
699
700 2019-01-03  David Kilzer  <ddkilzer@apple.com>
701
702         Leak of WebCore::LibWebRTCCertificateGenerator::RTCCertificateGeneratorCallback (48 bytes) in com.apple.WebKit.WebContent running WebKit layout tests
703         <https://webkit.org/b/193122>
704         <rdar://problem/47022987>
705
706         Reviewed by Youenn Fablet.
707
708         * Modules/mediastream/libwebrtc/LibWebRTCCertificateGenerator.cpp:
709         (WebCore::LibWebRTCCertificateGenerator::RTCCertificateGeneratorCallback::AddRef const):
710         (WebCore::LibWebRTCCertificateGenerator::RTCCertificateGeneratorCallback::Release const):
711         - Remove `final` keyword so that
712           `new rtc::RefCountedObject<RTCCertificateGeneratorCallback>()`
713           can be called.
714         (WebCore::LibWebRTCCertificateGenerator::generateCertificate):
715         - To fix the leak call
716           `new rtc::RefCountedObject<RTCCertificateGeneratorCallback>()`
717           to create the object.
718
719 2019-01-03  Simon Fraser  <simon.fraser@apple.com>
720
721         REGRESSION (r238090): After showing the Find banner or tab bar, hit tests are vertically offset (or painting is not offset)
722         https://bugs.webkit.org/show_bug.cgi?id=193124
723         rdar://problem/46755409
724
725         Reviewed by Tim Horton.
726
727         Top content inset feeds into scrolling tree geometry, so when it changes we need to trigger
728         an update of the root scrolling node, which happens via RenderLayerBacking::updateGeometry().
729         So set a dirty bit on the root layer in frameViewDidChangeSize(), which is called from the code
730         path that runs when top content inset changes.
731
732         Find banner behavior is not easily testable. platform/mac/fast/events/content-inset-hit-testing.html did not detect the regression.
733
734         * rendering/RenderLayerCompositor.cpp:
735         (WebCore::RenderLayerCompositor::frameViewDidChangeSize):
736
737 2019-01-03  Chris Dumez  <cdumez@apple.com>
738
739         Potential infinite recursion in isFrameFamiliarWith(Frame&, Frame&)
740         https://bugs.webkit.org/show_bug.cgi?id=192997
741         <rdar://problem/46217271>
742
743         Reviewed by Antti Koivisto.
744
745         isFrameFamiliarWith(Frame&, Frame&) was called recursively using the passed frames' openers.
746         The issue is that a Frame can be its opener. There could also be a cycle in the opener chain.
747
748         To address the issue, simplify isFrameFamiliarWith() so that it is no longer recursive. We now
749         only check if the frames belong to the same pages or if their openers do. We no longer check
750         openers' opener and up.
751
752         Note that this function is used to check if a frame is allowed to target another. In practice,
753         it is unlikely to be useful to navigate an opener's opener and an openee's openee.
754
755         Tests: fast/dom/Window/window-open-opener-cycle.html
756                fast/dom/Window/window-open-self-as-opener.html
757
758         * page/FrameTree.cpp:
759         (WebCore::isFrameFamiliarWith):
760
761 2019-01-02  Simon Fraser  <simon.fraser@apple.com>
762
763         REGRESSION (r239306): Don't disable font smoothing in transparent layers on macOS Mojave and later
764         https://bugs.webkit.org/show_bug.cgi?id=193095
765         <rdar://problem/47014944>
766
767         Reviewed by Zalan Bujtas.
768         
769         In r239306 we stopped making CALayers for font-smoothed text when not necessary on macOS Mojave
770         and later. However, we still turned off smoothing for non-opaque layers (setShouldSmoothFonts(false)),
771         which continues to affect the appearance of text.
772         
773         Fix by only calling setShouldSmoothFonts(false) when the OS supports font smoothing.
774
775         Test: compositing/contents-format/subpixel-antialiased-text.html
776
777         * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
778         (WebCore::PlatformCALayer::drawLayerContents):
779
780 2019-01-02  David Kilzer  <ddkilzer@apple.com>
781
782         Leak of CMSampleBuffer (752 bytes) in com.apple.WebKit.WebContent running WebKit layout tests
783         <https://webkit.org/b/193016>
784         <rdar://problem/46925703>
785
786         Reviewed by Simon Fraser.
787
788         * platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.mm:
789         (WebCore::copySampleBufferWithCurrentTimeStamp):
790         - Change to return RetainPtr<CMSampleBufferRef>.
791         - Check return value of CMSampleBufferCreateCopyWithNewTiming().
792         (WebCore::MediaRecorderPrivateWriter::appendVideoSampleBuffer):
793         - Check return value of copySampleBufferWithCurrentTimeStamp().
794         - Fix leak by using RetainPtr<CMSampleBufferRef> returned from
795           copySampleBufferWithCurrentTimeStamp() instead of leaking
796           `bufferWithCurrentTime` by using retainPtr().
797         (WebCore::createAudioFormatDescription):
798         - Extract method from appendAudioSampleBuffer() to return
799           RetainPtr<CMFormatDescriptionRef> after calling
800           CMAudioFormatDescriptionCreate().
801         - Check return value of CMAudioFormatDescriptionCreate().
802         (WebCore::createAudioSampleBufferWithPacketDescriptions):
803         - Extract method from appendAudioSampleBuffer() to return
804           RetainPtr<CMSampleBufferRef> after calling
805           CMAudioSampleBufferCreateWithPacketDescriptions().
806         (WebCore::MediaRecorderPrivateWriter::appendAudioSampleBuffer):
807         - Check return values of createAudioFormatDescription() and
808           createAudioSampleBufferWithPacketDescriptions().
809         - Fix leaks by extracting code into helper methods that return
810           RetainPtr<> objects instead of leaking CMFormatDescriptionRef
811           directly or leaking `sampleBuffer` by using retainPtr().
812
813 2019-01-02  Wenson Hsieh  <wenson_hsieh@apple.com>
814
815         Add support for using the current text selection as the find string on iOS
816         https://bugs.webkit.org/show_bug.cgi?id=193034
817         <rdar://problem/45138739>
818
819         Reviewed by Tim Horton.
820
821         Add support for "TakeFindStringFromSelection" on iOS. Unlike macOS, iOS does not have a notion of a "find
822         pasteboard" like macOS; instead, we handle this editing command by sending the selection string to the UI
823         process, where it is exposed via WebKit SPI so that clients that present find-in-page UI (i.e. MobileSafari) are
824         able to trigger find-in-page with this string.
825
826         Test: WebKit.UseSelectionAsFindString
827
828         * editing/Editor.cpp:
829         (WebCore::Editor::canCopyExcludingStandaloneImages const):
830
831         Make this helper function cross-platform.
832
833         * editing/Editor.h:
834         * editing/EditorCommand.cpp:
835         (WebCore::createCommandMap):
836         * editing/cocoa/EditorCocoa.mm:
837         (WebCore::Editor::takeFindStringFromSelection):
838
839         Move this from EditorMac to EditorCocoa, and implement it on iOS by calling into the editor client to update the
840         find string (see WebKit/ChangeLog for more details).
841
842         * editing/mac/EditorMac.mm:
843         (WebCore::Editor::canCopyExcludingStandaloneImages): Deleted.
844         (WebCore::Editor::takeFindStringFromSelection): Deleted.
845         * loader/EmptyClients.cpp:
846         * page/EditorClient.h:
847
848         Add a new editor client method to send the string for find-in-page to the UI process.
849
850 2019-01-02  Devin Rousso  <webkit@devinrousso.com>
851
852         Web Inspector: Implement `queryObjects` Command Line API
853         https://bugs.webkit.org/show_bug.cgi?id=176766
854         <rdar://problem/34890689>
855
856         Reviewed by Joseph Pecoraro.
857
858         Test: inspector/console/queryObjects.html
859
860         * inspector/CommandLineAPIModuleSource.js:
861         (CommandLineAPI):
862         (CommandLineAPIImpl.prototype.queryObjects): Added.
863
864 2019-01-02  Charles Vazac  <cvazac@gmail.com>
865
866         Fix resourcetimingbufferfull bubbles attribute
867         https://bugs.webkit.org/show_bug.cgi?id=193087
868
869         Reviewed by Chris Dumez.
870
871         This change is covered by web-platform-tests [1].
872
873         [1] https://github.com/web-platform-tests/wpt/blob/master/resource-timing/buffer-full-when-populate-entries.html#L20
874
875         * page/Performance.cpp:
876         (WebCore::Performance::resourceTimingBufferFullTimerFired):
877
878 2019-01-02  Simon Fraser  <simon.fraser@apple.com>
879
880         Rename LayerScrollCoordinationRole to ScrollCoordinationRole and make an enum class
881         https://bugs.webkit.org/show_bug.cgi?id=193010
882
883         Reviewed by Zalan Bujtas.
884
885         Move the enum LayerScrollCoordinationRole from RenderLayer.h to RenderLayerCompositor.h,
886         and make it an enum class.
887
888         * page/FrameView.cpp:
889         (WebCore::FrameView::scrollLayerID const):
890         * rendering/RenderLayer.h:
891         * rendering/RenderLayerBacking.cpp:
892         (WebCore::RenderLayerBacking::~RenderLayerBacking):
893         (WebCore::RenderLayerBacking::detachFromScrollingCoordinator):
894         (WebCore::operator<<):
895         * rendering/RenderLayerBacking.h:
896         * rendering/RenderLayerCompositor.cpp:
897         (WebCore::RenderLayerCompositor::updateScrollCoordinatedStatus):
898         (WebCore::RenderLayerCompositor::removeFromScrollCoordinatedLayers):
899         (WebCore::scrollCoordinationRoleForNodeType):
900         (WebCore::RenderLayerCompositor::attachScrollingNode):
901         (WebCore::RenderLayerCompositor::detachScrollCoordinatedLayer):
902         (WebCore::RenderLayerCompositor::updateScrollCoordinatedLayer):
903         (WebCore::RenderLayerCompositor::willRemoveScrollingLayerWithBacking):
904         * rendering/RenderLayerCompositor.h:
905
906 2019-01-02  Simon Fraser  <simon.fraser@apple.com>
907
908         Don't spin up a CalcParser if the current token is not a function token
909         https://bugs.webkit.org/show_bug.cgi?id=193067
910
911         Reviewed by Zalan Bujtas.
912
913         Various functions in CSSPropertyParserHelpers fall back to trying to parse
914         a calc expression if the normal parsing fails. Don't do this unless the
915         current token is a function token, which should be slightly more efficient.
916
917         * css/parser/CSSPropertyParserHelpers.cpp:
918         (WebCore::CSSPropertyParserHelpers::consumeInteger):
919         (WebCore::CSSPropertyParserHelpers::consumePositiveIntegerRaw):
920         (WebCore::CSSPropertyParserHelpers::consumeNumberRaw):
921         (WebCore::CSSPropertyParserHelpers::consumeNumber):
922         (WebCore::CSSPropertyParserHelpers::consumeFontWeightNumber):
923         (WebCore::CSSPropertyParserHelpers::consumeLength):
924         (WebCore::CSSPropertyParserHelpers::consumePercent):
925         (WebCore::CSSPropertyParserHelpers::consumeLengthOrPercent):
926         (WebCore::CSSPropertyParserHelpers::consumeAngle):
927         (WebCore::CSSPropertyParserHelpers::consumeAngleOrPercent):
928         (WebCore::CSSPropertyParserHelpers::consumeTime):
929
930 2019-01-02  Simon Fraser  <simon.fraser@apple.com>
931
932         Support css-color-4 rgb functions
933         https://bugs.webkit.org/show_bug.cgi?id=192321
934
935         Reviewed by Zalan Bujtas.
936         
937         Support the new rgb()/rgba() syntax described in https://drafts.csswg.org/css-color/#rgb-functions.
938         The differences are:
939         1. There is a new comma-free syntax, where the optional alpha is separated by a slash:
940             rgb(128 34 56)
941             rgb(128 34 56 / 50%)
942         2. Floating point values are allowed, and rounded:
943             rgb(128.5 34.2 56.5) becomes rgb(129 34 57)
944         3. rgba() is a pure alias for rgb(), so these are equivalent:
945             rgb(128 34 56 / 50%)
946             rgba(128 34 56 / 50%)
947             
948         hsl()/hsla() parsing was already updated to this new syntax in r230861.
949
950         Tested by tests in imported/w3c/web-platform-tests/css/css-color/
951
952         * css/parser/CSSPropertyParserHelpers.cpp:
953         (WebCore::CSSPropertyParserHelpers::clampRGBComponent):
954         (WebCore::CSSPropertyParserHelpers::parseRGBParameters):
955         (WebCore::CSSPropertyParserHelpers::parseColorFunction):
956
957 2019-01-02  Simon Fraser  <simon.fraser@apple.com>
958
959         Handle calc() expressions in gradient color stops
960         https://bugs.webkit.org/show_bug.cgi?id=193066
961         rdar://problem/46961985
962
963         Reviewed by Sam Weinig.
964         
965         Fix two issues that prevented calc() expressions from working in conic-gradient color stops,
966         for the angle or percent value. First, consumeAngleOrPercent() needs to look for CalculationCategory::Percent
967         calc values as well as angle ones.
968
969         Second, CSSPrimitiveValue::isAngle() needs to use primitiveType() (which takes calc into account),
970         just as isPx() etc do.
971
972         Test: fast/gradients/conic-calc-stop-position.html
973
974         * css/CSSPrimitiveValue.h:
975         (WebCore::CSSPrimitiveValue::isAngle const):
976         * css/parser/CSSPropertyParserHelpers.cpp:
977         (WebCore::CSSPropertyParserHelpers::consumeAngleOrPercent):
978         (WebCore::CSSPropertyParserHelpers::consumeGradientColorStops):
979
980 2018-12-31  Keith Miller  <keith_miller@apple.com>
981
982         SourceProviders should use an actual URL instead of a string
983         https://bugs.webkit.org/show_bug.cgi?id=192734
984
985         Reviewed by Yusuke Suzuki.
986
987         Remove ScriptSourceCode's URL member and make the url() method
988         reference the URL on the SourceProvider. Also, avoid some
989         ref count churn.
990
991         Additionally, this patch fixes an existing bug in
992         WorkletGlobalScope() that would use a ScriptSourceCode after
993         WTFMoving it.
994
995         * bindings/js/CachedScriptSourceProvider.h:
996         (WebCore::CachedScriptSourceProvider::CachedScriptSourceProvider):
997         * bindings/js/ScheduledAction.cpp:
998         (WebCore::ScheduledAction::execute):
999         * bindings/js/ScriptController.cpp:
1000         (WebCore::ScriptController::executeScriptInWorld):
1001         (WebCore::ScriptController::executeScript):
1002         * bindings/js/ScriptSourceCode.h:
1003         (WebCore::ScriptSourceCode::ScriptSourceCode):
1004         (WebCore::ScriptSourceCode::m_code):
1005         (WebCore::ScriptSourceCode::url const):
1006         (WebCore::ScriptSourceCode::m_url): Deleted.
1007         * dom/ScriptElement.cpp:
1008         (WebCore::ScriptElement::prepareScript):
1009         (WebCore::ScriptElement::requestModuleScript):
1010         (WebCore::ScriptElement::executePendingScript):
1011         * html/HTMLMediaElement.cpp:
1012         (WebCore::HTMLMediaElement::ensureMediaControlsInjectedScript):
1013         * page/Frame.cpp:
1014         (WebCore::Frame::injectUserScriptImmediately):
1015         * workers/WorkerGlobalScope.cpp:
1016         (WebCore::WorkerGlobalScope::importScripts):
1017         * workers/WorkerThread.cpp:
1018         (WebCore::WorkerThread::workerThread):
1019         * worklets/WorkletGlobalScope.cpp:
1020         (WebCore::WorkletGlobalScope::WorkletGlobalScope):
1021         * xml/parser/XMLDocumentParserLibxml2.cpp:
1022         (WebCore::XMLDocumentParser::endElementNs):
1023
1024 2019-01-01  Jeff Miller  <jeffm@apple.com>
1025
1026         Update user-visible copyright strings to include 2019
1027         https://bugs.webkit.org/show_bug.cgi?id=192811
1028
1029         Reviewed by Mark Lam.
1030
1031         * Info.plist:
1032
1033 2018-12-30  David Kilzer  <ddkilzer@apple.com>
1034
1035         clang-tidy: Save 8 padding bytes on WebCore::BorderEdge
1036         <https://webkit.org/b/193058>
1037         <rdar://problem/46979275>
1038
1039         Reviewed by Yusuke Suzuki.
1040
1041         * rendering/BorderEdge.cpp:
1042         (WebCore::BorderEdge::BorderEdge): Reorder initialization to
1043         match new instance variable order.
1044         * rendering/BorderEdge.h: Reorder instance variables to save
1045         8 padding bytes.
1046
1047 2018-12-28  Yusuke Suzuki  <yusukesuzuki@slowstart.org>
1048
1049         [JSC] Remove one indirection in JSObject::toStringName
1050         https://bugs.webkit.org/show_bug.cgi?id=193037
1051
1052         Reviewed by Keith Miller.
1053
1054         Use old JSObject::toStringName function here.
1055
1056         * bindings/js/JSDOMConstructorBase.cpp:
1057         (WebCore::JSDOMConstructorBase::className):
1058         (WebCore::JSDOMConstructorBase::toStringName):
1059         * bindings/js/JSDOMConstructorBase.h:
1060         (WebCore::JSDOMConstructorBase::className): Deleted.
1061
1062 2018-12-27  Alex Christensen  <achristensen@webkit.org>
1063
1064         Resurrect Mac CMake build
1065         https://bugs.webkit.org/show_bug.cgi?id=192658
1066
1067         Reviewed by Yusuke Suzuki.
1068
1069         This makes it so JSC and most of WebCore builds.
1070         WebCore's use of ARC seems inconsistent, so I'll fix that later.
1071
1072         * PlatformMac.cmake:
1073         * config.h:
1074
1075 2018-12-26  Jim Mason  <jmason@ibinx.com>
1076
1077         [FreeType] Restore conditional compilation logic for recent HarfBuzz refactoring
1078         https://bugs.webkit.org/show_bug.cgi?id=193036
1079
1080         Reviewed by Michael Catanzaro.
1081
1082         * platform/graphics/FontPlatformData.h:
1083         * platform/graphics/freetype/FontPlatformDataFreeType.cpp:
1084
1085 2018-12-24  Fujii Hironori  <Hironori.Fujii@sony.com>
1086
1087         Remove "using namespace std;"
1088         https://bugs.webkit.org/show_bug.cgi?id=192973
1089         <rdar://problem/46937309>
1090
1091         Unreviewed Windows port Debug builds fix.
1092
1093         No new tests since no behavior changes.
1094
1095         * accessibility/win/AXObjectCacheWin.cpp:
1096         (WebCore::AXObjectCache::postPlatformNotification): Add "std::" prefix to numeric_limits in ASSERT macro.
1097
1098 2018-12-24  Fujii Hironori  <Hironori.Fujii@sony.com>
1099
1100         Remove "using namespace std;"
1101         https://bugs.webkit.org/show_bug.cgi?id=192973
1102
1103         Reviewed by Alex Christensen.
1104
1105         Removed "using namespace std" statement, and use std:: prefix.
1106
1107         No new tests since no behavior changes.
1108
1109         * accessibility/win/AXObjectCacheWin.cpp:
1110         * platform/graphics/GraphicsContext3DPrivate.cpp:
1111         * platform/graphics/cairo/ImageBufferCairo.cpp:
1112         * platform/graphics/win/FontPlatformDataCairoWin.cpp:
1113         * platform/graphics/win/FontWin.cpp:
1114         (WebCore::FontCascade::floatWidthForComplexText const):
1115         * platform/graphics/win/GraphicsContextCGWin.cpp:
1116         * platform/graphics/win/GraphicsContextCairoWin.cpp:
1117         * platform/graphics/win/GraphicsContextDirect2D.cpp:
1118         * platform/graphics/win/GraphicsContextWin.cpp:
1119         * platform/graphics/win/SimpleFontDataCGWin.cpp:
1120         * platform/graphics/win/UniscribeController.cpp:
1121         (WebCore::UniscribeController::UniscribeController):
1122         (WebCore::UniscribeController::shapeAndPlaceItem):
1123         * platform/image-decoders/ScalableImageDecoder.cpp:
1124         * platform/text/LocaleICU.cpp:
1125         * platform/text/win/LocaleWin.cpp:
1126         * platform/win/ScrollbarThemeWin.cpp:
1127         * rendering/RenderRubyRun.cpp:
1128         (WebCore::RenderRubyRun::layoutBlock):
1129         * rendering/RenderThemeWin.cpp:
1130         (WebCore::RenderThemeWin::adjustMenuListButtonStyle const):
1131         (WebCore::RenderThemeWin::paintSearchFieldCancelButton):
1132         (WebCore::RenderThemeWin::adjustSearchFieldCancelButtonStyle const):
1133         (WebCore::RenderThemeWin::adjustSearchFieldResultsDecorationPartStyle const):
1134         (WebCore::RenderThemeWin::paintSearchFieldResultsDecorationPart):
1135         (WebCore::RenderThemeWin::adjustSearchFieldResultsButtonStyle const):
1136         (WebCore::RenderThemeWin::paintSearchFieldResultsButton):
1137
1138 2018-12-24  Simon Fraser  <simon.fraser@apple.com>
1139
1140         Change ScrollingNodeType to an enum class
1141         https://bugs.webkit.org/show_bug.cgi?id=193009
1142
1143         Reviewed by Zalan Bujtas.
1144
1145         Change the ScrollingNodeType enum to an enum class.
1146         
1147         No behavior change.
1148
1149         * page/scrolling/AsyncScrollingCoordinator.cpp:
1150         (WebCore::AsyncScrollingCoordinator::ensureRootStateNodeForFrameView):
1151         * page/scrolling/ScrollingCoordinator.cpp:
1152         (WebCore::operator<<):
1153         * page/scrolling/ScrollingCoordinator.h:
1154         * page/scrolling/ScrollingStateFixedNode.cpp:
1155         (WebCore::ScrollingStateFixedNode::ScrollingStateFixedNode):
1156         * page/scrolling/ScrollingStateNode.h:
1157         (WebCore::ScrollingStateNode::isFixedNode const):
1158         (WebCore::ScrollingStateNode::isStickyNode const):
1159         (WebCore::ScrollingStateNode::isFrameScrollingNode const):
1160         (WebCore::ScrollingStateNode::isOverflowScrollingNode const):
1161         * page/scrolling/ScrollingStateOverflowScrollingNode.cpp:
1162         (WebCore::ScrollingStateOverflowScrollingNode::ScrollingStateOverflowScrollingNode):
1163         * page/scrolling/ScrollingStateStickyNode.cpp:
1164         (WebCore::ScrollingStateStickyNode::ScrollingStateStickyNode):
1165         * page/scrolling/ScrollingStateTree.cpp:
1166         (WebCore::ScrollingStateTree::createNode):
1167         (WebCore::ScrollingStateTree::attachNode):
1168         * page/scrolling/ScrollingTreeNode.h:
1169         (WebCore::ScrollingTreeNode::isFixedNode const):
1170         (WebCore::ScrollingTreeNode::isStickyNode const):
1171         (WebCore::ScrollingTreeNode::isFrameScrollingNode const):
1172         (WebCore::ScrollingTreeNode::isOverflowScrollingNode const):
1173         * page/scrolling/ScrollingTreeOverflowScrollingNode.cpp:
1174         (WebCore::ScrollingTreeOverflowScrollingNode::ScrollingTreeOverflowScrollingNode):
1175         * page/scrolling/ios/ScrollingTreeIOS.cpp:
1176         (WebCore::ScrollingTreeIOS::createScrollingTreeNode):
1177         * page/scrolling/mac/ScrollingTreeFixedNode.mm:
1178         (WebCore::ScrollingTreeFixedNode::ScrollingTreeFixedNode):
1179         * page/scrolling/mac/ScrollingTreeMac.cpp:
1180         (ScrollingTreeMac::createScrollingTreeNode):
1181         * page/scrolling/mac/ScrollingTreeStickyNode.mm:
1182         (WebCore::ScrollingTreeStickyNode::ScrollingTreeStickyNode):
1183         * platform/graphics/GraphicsLayerClient.h:
1184         * rendering/RenderLayerCompositor.cpp:
1185         (WebCore::RenderLayerCompositor::reattachSubframeScrollLayers):
1186         (WebCore::scrollCoordinationRoleForNodeType):
1187         (WebCore::RenderLayerCompositor::updateScrollCoordinationForThisFrame):
1188         (WebCore::RenderLayerCompositor::updateScrollCoordinatedLayer):
1189
1190 2018-12-22  Carlos Garcia Campos  <cgarcia@igalia.com>
1191
1192         [HarfBuzz] Width not correctly reported as 0 for zero font size
1193         https://bugs.webkit.org/show_bug.cgi?id=192986
1194
1195         Reviewed by Michael Catanzaro.
1196
1197         Fixes test fast/text/font-size-zero.html
1198
1199         * platform/graphics/harfbuzz/ComplexTextControllerHarfBuzz.cpp:
1200         (WebCore::ComplexTextController::ComplexTextRun::ComplexTextRun): Use empty advances for glyphs when the font
1201         size is zero.
1202
1203 2018-12-20  Yusuke Suzuki  <yusukesuzuki@slowstart.org>
1204
1205         Use Ref<> as much as possible
1206         https://bugs.webkit.org/show_bug.cgi?id=192808
1207
1208         Reviewed by Alex Christensen.
1209
1210         * Modules/encryptedmedia/NavigatorEME.cpp:
1211         (WebCore::NavigatorEME::requestMediaKeySystemAccess):
1212         * Modules/fetch/FetchBody.cpp:
1213         (WebCore::FetchBody::bodyAsFormData const):
1214         * Modules/geolocation/Geolocation.cpp:
1215         (WebCore::Geolocation::getCurrentPosition):
1216         (WebCore::Geolocation::watchPosition):
1217         * Modules/indexeddb/IDBDatabase.cpp:
1218         (WebCore::IDBDatabase::objectStoreNames const):
1219         * Modules/indexeddb/IDBDatabase.h:
1220         * Modules/indexeddb/IDBObjectStore.cpp:
1221         (WebCore::IDBObjectStore::indexNames const):
1222         * Modules/indexeddb/IDBObjectStore.h:
1223         * Modules/indexeddb/IDBTransaction.cpp:
1224         (WebCore::IDBTransaction::scheduleOperation):
1225         * Modules/indexeddb/IDBTransaction.h:
1226         * Modules/indexeddb/client/TransactionOperation.h:
1227         (WebCore::IDBClient::createTransactionOperation):
1228         * Modules/mediastream/MediaDevices.cpp:
1229         (WebCore::MediaDevices::getUserMedia const):
1230         (WebCore::MediaDevices::getDisplayMedia const):
1231         * Modules/mediastream/UserMediaRequest.cpp:
1232         (WebCore::UserMediaRequest::create):
1233         * Modules/mediastream/UserMediaRequest.h:
1234         * Modules/webaudio/AudioParam.cpp:
1235         (WebCore::AudioParam::calculateFinalValues):
1236         * Modules/webaudio/ScriptProcessorNode.cpp:
1237         (WebCore::ScriptProcessorNode::initialize):
1238         * Modules/webdatabase/SQLStatement.cpp:
1239         (WebCore::SQLStatement::execute):
1240         * Modules/webgpu/WebGPU.cpp:
1241         (WebCore::WebGPU::requestAdapter const):
1242         * Modules/webgpu/WebGPUAdapter.cpp:
1243         (WebCore::WebGPUAdapter::create):
1244         * Modules/webgpu/WebGPUAdapter.h:
1245         * Modules/webgpu/WebGPUBuffer.cpp:
1246         (WebCore::WebGPUBuffer::create):
1247         * Modules/webgpu/WebGPUBuffer.h:
1248         * Modules/webgpu/WebGPUCommandBuffer.cpp:
1249         (WebCore::WebGPUCommandBuffer::create):
1250         (WebCore::WebGPUCommandBuffer::beginRenderPass):
1251         * Modules/webgpu/WebGPUCommandBuffer.h:
1252         * Modules/webgpu/WebGPUDevice.cpp:
1253         (WebCore::WebGPUDevice::create):
1254         (WebCore::WebGPUDevice::createBuffer const):
1255         (WebCore::WebGPUDevice::createShaderModule const):
1256         (WebCore::WebGPUDevice::createRenderPipeline const):
1257         (WebCore::WebGPUDevice::createCommandBuffer const):
1258         * Modules/webgpu/WebGPURenderPassEncoder.cpp:
1259         (WebCore::WebGPURenderPassEncoder::create):
1260         * Modules/webgpu/WebGPURenderPassEncoder.h:
1261         * Modules/webgpu/WebGPURenderPipeline.cpp:
1262         (WebCore::WebGPURenderPipeline::create):
1263         * Modules/webgpu/WebGPURenderPipeline.h:
1264         * Modules/webgpu/WebGPUShaderModule.cpp:
1265         (WebCore::WebGPUShaderModule::create):
1266         * Modules/webgpu/WebGPUShaderModule.h:
1267         * Modules/webgpu/WebGPUTexture.cpp:
1268         (WebCore::WebGPUTexture::createDefaultTextureView):
1269         * Modules/webgpu/WebGPUTextureView.cpp:
1270         (WebCore::WebGPUTextureView::create):
1271         * Modules/webgpu/WebGPUTextureView.h:
1272         * accessibility/AXObjectCache.cpp:
1273         (WebCore::AXObjectCache::rangeMatchesTextNearRange):
1274         * accessibility/atk/AXObjectCacheAtk.cpp:
1275         (WebCore::AXObjectCache::nodeTextChangePlatformNotification):
1276         * accessibility/atk/WebKitAccessibleHyperlink.cpp:
1277         (webkitAccessibleHyperlinkGetStartIndex):
1278         (webkitAccessibleHyperlinkGetEndIndex):
1279         * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
1280         (getSelectionOffsetsForObject):
1281         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
1282         (-[WebAccessibilityObjectWrapper _convertToNSRange:]):
1283         * bindings/js/JSDOMGlobalObjectTask.cpp:
1284         * bindings/js/JSDOMWindowBase.cpp:
1285         (WebCore::JSDOMWindowBase::queueTaskToEventLoop):
1286         * bindings/js/JSWorkerGlobalScopeBase.cpp:
1287         (WebCore::JSWorkerGlobalScopeBase::queueTaskToEventLoop):
1288         * bindings/js/ScriptControllerMac.mm:
1289         (WebCore::ScriptController::createScriptInstanceForWidget):
1290         * bindings/js/SerializedScriptValue.cpp:
1291         (WebCore::CloneDeserializer::readTerminal):
1292         (WebCore::SerializedScriptValue::create):
1293         * bridge/objc/objc_instance.h:
1294         * bridge/objc/objc_instance.mm:
1295         (ObjcInstance::create):
1296         * css/CSSComputedStyleDeclaration.cpp:
1297         (WebCore::ComputedStyleExtractor::currentColorOrValidColor const):
1298         (WebCore::ComputedStyleExtractor::getCSSPropertyValuesForShorthandProperties):
1299         (WebCore::ComputedStyleExtractor::getCSSPropertyValuesForGridShorthand):
1300         (WebCore::ComputedStyleExtractor::getBackgroundShorthandValue):
1301         * css/CSSComputedStyleDeclaration.h:
1302         * css/CSSFontFaceSource.cpp:
1303         (WebCore::CSSFontFaceSource::load):
1304         * css/CSSStyleSheet.cpp:
1305         (WebCore::CSSStyleSheet::rules):
1306         * css/FontFace.cpp:
1307         (WebCore::FontFace::unicodeRange const):
1308         (WebCore::FontFace::featureSettings const):
1309         * css/InspectorCSSOMWrappers.cpp:
1310         (WebCore::InspectorCSSOMWrappers::collectFromStyleSheetContents):
1311         * css/SVGCSSComputedStyleDeclaration.cpp:
1312         (WebCore::strokeDashArrayToCSSValueList):
1313         (WebCore::ComputedStyleExtractor::adjustSVGPaintForCurrentColor const):
1314         * css/StyleResolver.cpp:
1315         (WebCore::StyleResolver::createFilterOperations):
1316         * css/StyleRule.cpp:
1317         (WebCore::StyleRuleBase::createCSSOMWrapper const):
1318         * css/StyleRule.h:
1319         * dom/ChildListMutationScope.cpp:
1320         (WebCore::ChildListMutationAccumulator::getOrCreate):
1321         * dom/ChildListMutationScope.h:
1322         * dom/DocumentMarkerController.cpp:
1323         (WebCore::updateRenderedRectsForMarker):
1324         * dom/InlineStyleSheetOwner.cpp:
1325         (WebCore::InlineStyleSheetOwner::createSheet):
1326         * dom/PointerEvent.h:
1327         * dom/UserGestureIndicator.h:
1328         (WebCore::UserGestureToken::create):
1329         * editing/AlternativeTextController.cpp:
1330         (WebCore::AlternativeTextController::applyAlternativeTextToRange):
1331         (WebCore::AlternativeTextController::respondToUnappliedSpellCorrection):
1332         (WebCore::AlternativeTextController::respondToUnappliedEditing):
1333         (WebCore::AlternativeTextController::markPrecedingWhitespaceForDeletedAutocorrectionAfterCommand):
1334         (WebCore::AlternativeTextController::respondToMarkerAtEndOfWord):
1335         * editing/ApplyStyleCommand.cpp:
1336         (WebCore::ApplyStyleCommand::applyBlockStyle):
1337         (WebCore::ApplyStyleCommand::pushDownInlineStyleAroundNode):
1338         * editing/CompositeEditCommand.cpp:
1339         (WebCore::CompositeEditCommand::targetRanges const):
1340         (WebCore::CompositeEditCommand::replaceTextInNodePreservingMarkers):
1341         (WebCore::CompositeEditCommand::moveParagraphs):
1342         * editing/DeleteSelectionCommand.cpp:
1343         (WebCore::DeleteSelectionCommand::mergeParagraphs):
1344         * editing/Editing.cpp:
1345         (WebCore::visiblePositionForIndexUsingCharacterIterator):
1346         * editing/EditingStyle.cpp:
1347         (WebCore::EditingStyle::removeStyleConflictingWithStyleOfNode):
1348         (WebCore::EditingStyle::conflictsWithInlineStyleOfElement const):
1349         (WebCore::EditingStyle::prepareToApplyAt):
1350         (WebCore::EditingStyle::mergeInlineAndImplicitStyleOfElement):
1351         (WebCore::EditingStyle::mergeStyleFromRulesForSerialization):
1352         (WebCore::EditingStyle::removeStyleFromRulesAndContext):
1353         (WebCore::extractPropertiesNotIn):
1354         * editing/Editor.cpp:
1355         (WebCore::Editor::setBaseWritingDirection):
1356         (WebCore::Editor::setComposition):
1357         * editing/EditorCommand.cpp:
1358         (WebCore::executeApplyParagraphStyle):
1359         (WebCore::executeMakeTextWritingDirectionLeftToRight):
1360         (WebCore::executeMakeTextWritingDirectionNatural):
1361         (WebCore::executeMakeTextWritingDirectionRightToLeft):
1362         * editing/FormatBlockCommand.cpp:
1363         (WebCore::FormatBlockCommand::formatRange):
1364         * editing/RemoveFormatCommand.cpp:
1365         (WebCore::RemoveFormatCommand::doApply):
1366         * editing/ReplaceRangeWithTextCommand.cpp:
1367         (WebCore::ReplaceRangeWithTextCommand::targetRanges const):
1368         * editing/ReplaceSelectionCommand.cpp:
1369         (WebCore::ReplaceSelectionCommand::removeRedundantStylesAndKeepStyleSpanInline):
1370         (WebCore::handleStyleSpansBeforeInsertion):
1371         (WebCore::ReplaceSelectionCommand::handleStyleSpans):
1372         * editing/SpellingCorrectionCommand.cpp:
1373         (WebCore::SpellingCorrectionCommand::targetRanges const):
1374         * editing/TextCheckingHelper.cpp:
1375         (WebCore::TextCheckingHelper::findFirstMisspellingOrBadGrammar):
1376         * editing/TypingCommand.cpp:
1377         (WebCore::TypingCommand::insertText):
1378         (WebCore::TypingCommand::willAddTypingToOpenCommand):
1379         * editing/VisibleUnits.cpp:
1380         (WebCore::distanceBetweenPositions):
1381         * editing/cocoa/EditorCocoa.mm:
1382         (WebCore::Editor::selectionInWebArchiveFormat):
1383         * editing/ios/DictationCommandIOS.cpp:
1384         (WebCore::DictationCommandIOS::doApply):
1385         * editing/ios/EditorIOS.mm:
1386         (WebCore::Editor::setTextAlignmentForChangedBaseWritingDirection):
1387         (WebCore::Editor::removeUnchangeableStyles):
1388         (WebCore::Editor::writeImageToPasteboard):
1389         * editing/mac/EditorMac.mm:
1390         (WebCore::Editor::replaceNodeFromPasteboard):
1391         (WebCore::Editor::imageInWebArchiveFormat):
1392         * editing/markup.cpp:
1393         (WebCore::styleFromMatchedRulesAndInlineDecl):
1394         (WebCore::createFragmentForTransformToFragment):
1395         * fileapi/FileReaderLoader.cpp:
1396         (WebCore::FileReaderLoader::didFinishLoading):
1397         * html/FTPDirectoryDocument.cpp:
1398         (WebCore::createTemplateDocumentData):
1399         * html/HTMLMediaElement.cpp:
1400         (WebCore::HTMLMediaElement::scheduleEvent):
1401         (WebCore::HTMLMediaElement::createMediaControls):
1402         * html/HTMLTableElement.cpp:
1403         (WebCore::HTMLTableElement::createSharedCellStyle):
1404         * html/HTMLTableElement.h:
1405         * html/URLUtils.h:
1406         (WebCore::URLUtils<T>::origin const):
1407         * html/parser/HTMLConstructionSite.cpp:
1408         (WebCore::HTMLConstructionSite::createHTMLElementOrFindCustomElementInterface):
1409         * html/shadow/TextControlInnerElements.cpp:
1410         (WebCore::TextControlInnerElement::resolveCustomStyle):
1411         * html/track/WebVTTParser.cpp:
1412         (WebCore::WebVTTParser::createNewCue):
1413         * inspector/DOMPatchSupport.cpp:
1414         * inspector/InspectorCanvas.cpp:
1415         (WebCore::InspectorCanvas::buildInitialState):
1416         (WebCore::InspectorCanvas::buildAction):
1417         * inspector/InspectorFrontendClientLocal.cpp:
1418         (WebCore::InspectorFrontendClientLocal::openInNewTab):
1419         * inspector/InspectorStyleSheet.cpp:
1420         (WebCore::asCSSRuleList):
1421         (WebCore::InspectorStyle::styleWithProperties const):
1422         (WebCore::InspectorStyleSheet::ensureSourceData):
1423         * inspector/agents/InspectorCanvasAgent.cpp:
1424         (WebCore::InspectorCanvasAgent::didCreateCanvasRenderingContext):
1425         * inspector/agents/InspectorIndexedDBAgent.cpp:
1426         (WebCore::Inspector::keyPathFromIDBKeyPath):
1427         * inspector/agents/InspectorPageAgent.cpp:
1428         (WebCore::InspectorPageAgent::archive):
1429         * loader/EmptyClients.cpp:
1430         (WebCore::EmptyStorageNamespaceProvider::createSessionStorageNamespace):
1431         (WebCore::EmptyStorageNamespaceProvider::createLocalStorageNamespace):
1432         (WebCore::EmptyStorageNamespaceProvider::createEphemeralLocalStorageNamespace):
1433         (WebCore::EmptyStorageNamespaceProvider::createTransientLocalStorageNamespace):
1434         * loader/FrameLoader.cpp:
1435         (WebCore::FrameLoader::loadURL):
1436         (WebCore::FrameLoader::shouldInterruptLoadForXFrameOptions):
1437         (WebCore::FrameLoader::loadDifferentDocumentItem):
1438         * loader/WorkerThreadableLoader.cpp:
1439         (WebCore::WorkerThreadableLoader::loadResourceSynchronously):
1440         * loader/archive/mhtml/MHTMLParser.cpp:
1441         (WebCore::MHTMLParser::addResourceToArchive):
1442         (WebCore::MHTMLParser::parseNextPart):
1443         * loader/cache/MemoryCache.cpp:
1444         (WebCore::MemoryCache::addImageToCache):
1445         (WebCore::MemoryCache::removeResourcesWithOrigin):
1446         * page/DOMWindow.cpp:
1447         (WebCore::DOMWindow::getMatchedCSSRules const):
1448         (WebCore::DOMWindow::createWindow):
1449         * page/EventHandler.cpp:
1450         (WebCore::textDistance):
1451         * page/Page.cpp:
1452         (WebCore::Page::userStyleSheet const):
1453         * page/animation/CSSPropertyAnimation.cpp:
1454         (WebCore::blendFilterOperations):
1455         * page/ios/FrameIOS.mm:
1456         (WebCore::Frame::initWithSimpleHTMLDocument):
1457         (WebCore::Frame::interpretationsForCurrentRoot const):
1458         * page/mac/ServicesOverlayController.mm:
1459         (WebCore::ServicesOverlayController::Highlight::fadeIn):
1460         (WebCore::ServicesOverlayController::Highlight::fadeOut):
1461         * platform/SharedBuffer.cpp:
1462         (WebCore::SharedBuffer::tryCreateArrayBuffer const):
1463         * platform/audio/HRTFElevation.cpp:
1464         (WebCore::HRTFElevation::calculateKernelsForAzimuthElevation):
1465         * platform/audio/SincResampler.cpp:
1466         (WebCore::SincResampler::consumeSource):
1467         * platform/audio/gstreamer/AudioFileReaderGStreamer.cpp:
1468         (WebCore::AudioFileReader::createBus):
1469         * platform/audio/mac/AudioFileReaderMac.cpp:
1470         (WebCore::AudioFileReader::createBus):
1471         * platform/graphics/Icon.h:
1472         (WebCore::Icon::create):
1473         * platform/graphics/InbandTextTrackPrivate.h:
1474         (WebCore::InbandTextTrackPrivate::create):
1475         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
1476         (WebCore::AVFWrapper::shouldWaitForLoadingOfResource):
1477         * platform/graphics/avfoundation/objc/AudioTrackPrivateMediaSourceAVFObjC.h:
1478         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1479         (WebCore::fulfillRequestWithKeyData):
1480         (WebCore::MediaPlayerPrivateAVFoundationObjC::shouldWaitForLoadingOfResource):
1481         * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.h:
1482         * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.mm:
1483         (WebCore::MediaSourcePrivateAVFObjC::create):
1484         (WebCore::MediaSourcePrivateAVFObjC::addSourceBuffer):
1485         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h:
1486         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
1487         (WebCore::SourceBufferPrivateAVFObjC::create):
1488         (WebCore::SourceBufferPrivateAVFObjC::didParseStreamDataAsAsset):
1489         * platform/graphics/avfoundation/objc/VideoTrackPrivateMediaSourceAVFObjC.h:
1490         * platform/graphics/ca/TileController.cpp:
1491         (WebCore::TileController::createTileLayer):
1492         * platform/graphics/ca/TileController.h:
1493         * platform/graphics/ca/win/CACFLayerTreeHost.cpp:
1494         (WebCore::CACFLayerTreeHost::acceleratedCompositingAvailable):
1495         (WebCore::CACFLayerTreeHost::create):
1496         * platform/graphics/gpu/cocoa/GPUBufferMetal.mm:
1497         (WebCore::GPUBuffer::create):
1498         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1499         (WebCore::MediaPlayerPrivateGStreamer::updateTracks):
1500         (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfVideo):
1501         (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfAudio):
1502         (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfText):
1503         (WebCore::MediaPlayerPrivateGStreamer::handleMessage):
1504         (WebCore::MediaPlayerPrivateGStreamer::processMpegTsSection):
1505         (WebCore::MediaPlayerPrivateGStreamer::loadNextLocation):
1506         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
1507         (WebCore::MediaPlayerPrivateGStreamerBase::paint):
1508         * platform/graphics/gstreamer/mse/AppendPipeline.cpp:
1509         (WebCore::AppendPipeline::appsinkNewSample):
1510         * platform/graphics/iso/ISOProtectionSystemSpecificHeaderBox.cpp:
1511         (WebCore::ISOProtectionSystemSpecificHeaderBox::parse):
1512         * platform/graphics/iso/ISOTrackEncryptionBox.cpp:
1513         (WebCore::ISOTrackEncryptionBox::parse):
1514         * platform/graphics/texmap/TextureMapperAnimation.cpp:
1515         (WebCore::applyFilterAnimation):
1516         * platform/graphics/texmap/TextureMapperPlatformLayerBuffer.cpp:
1517         (WebCore::TextureMapperPlatformLayerBuffer::clone):
1518         * platform/graphics/transforms/TransformOperations.cpp:
1519         (WebCore::TransformOperations::blendByMatchingOperations const):
1520         * platform/image-decoders/ico/ICOImageDecoder.cpp:
1521         (WebCore::ICOImageDecoder::setDataForPNGDecoderAtIndex):
1522         * platform/mock/mediasource/MockBox.cpp:
1523         (WebCore::MockInitializationBox::MockInitializationBox):
1524         * platform/mock/mediasource/MockSourceBufferPrivate.cpp:
1525         (WebCore::MockSourceBufferPrivate::create):
1526         (WebCore::MockSourceBufferPrivate::append):
1527         * platform/mock/mediasource/MockSourceBufferPrivate.h:
1528         * platform/mock/mediasource/MockTracks.h:
1529         (WebCore::MockTextTrackPrivate::create):
1530         (WebCore::MockVideoTrackPrivate::create):
1531         * platform/network/FormData.h:
1532         (WebCore::FormData::decode):
1533         * platform/network/cocoa/CookieStorageObserver.h:
1534         * platform/network/cocoa/CookieStorageObserver.mm:
1535         (WebCore::CookieStorageObserver::create):
1536         * platform/network/soup/ResourceRequestSoup.cpp:
1537         (WebCore::appendEncodedBlobItemToSoupMessageBody):
1538         (WebCore::ResourceRequest::updateSoupMessageBody const):
1539         * platform/text/hyphen/HyphenationLibHyphen.cpp:
1540         (WebCore::HyphenationDictionary::createNull):
1541         (WebCore::HyphenationDictionary::create):
1542         * platform/win/SearchPopupMenuWin.cpp:
1543         (WebCore::SearchPopupMenuWin::SearchPopupMenuWin):
1544         (WebCore::SearchPopupMenuWin::popupMenu):
1545         * platform/win/SearchPopupMenuWin.h:
1546         * rendering/RenderThemeIOS.mm:
1547         (WebCore::applyCommonButtonPaddingToStyle):
1548         (WebCore::RenderThemeIOS::paintProgressBar):
1549         (WebCore::RenderThemeIOS::adjustButtonStyle const):
1550         (WebCore::paintAttachmentIcon):
1551         * rendering/svg/SVGRenderTreeAsText.cpp:
1552         (WebCore::writeSVGResourceContainer):
1553         * storage/Storage.cpp:
1554         (WebCore::Storage::create):
1555         (WebCore::Storage::Storage):
1556         * storage/Storage.h:
1557         (WebCore::Storage::area const):
1558         * storage/StorageNamespace.h:
1559         * storage/StorageNamespaceProvider.cpp:
1560         (WebCore::StorageNamespaceProvider::localStorageArea):
1561         * storage/StorageNamespaceProvider.h:
1562         * svg/SVGElement.cpp:
1563         (WebCore::SVGElement::getPresentationAttribute):
1564         * svg/SVGFEBlendElement.cpp:
1565         (WebCore::SVGFEBlendElement::build):
1566         * svg/SVGFEColorMatrixElement.cpp:
1567         (WebCore::SVGFEColorMatrixElement::build):
1568         * svg/SVGFEComponentTransferElement.cpp:
1569         (WebCore::SVGFEComponentTransferElement::build):
1570         * svg/SVGFECompositeElement.cpp:
1571         (WebCore::SVGFECompositeElement::build):
1572         * svg/SVGFEDiffuseLightingElement.cpp:
1573         (WebCore::SVGFEDiffuseLightingElement::build):
1574         * svg/SVGFEDisplacementMapElement.cpp:
1575         (WebCore::SVGFEDisplacementMapElement::build):
1576         * svg/SVGFEDropShadowElement.cpp:
1577         (WebCore::SVGFEDropShadowElement::build):
1578         * svg/SVGFEGaussianBlurElement.cpp:
1579         (WebCore::SVGFEGaussianBlurElement::build):
1580         * svg/SVGFEMergeElement.cpp:
1581         (WebCore::SVGFEMergeElement::build):
1582         * svg/SVGFEMorphologyElement.cpp:
1583         (WebCore::SVGFEMorphologyElement::build):
1584         * svg/SVGFEOffsetElement.cpp:
1585         (WebCore::SVGFEOffsetElement::build):
1586         * svg/SVGFESpecularLightingElement.cpp:
1587         (WebCore::SVGFESpecularLightingElement::build):
1588         * svg/SVGFETileElement.cpp:
1589         (WebCore::SVGFETileElement::build):
1590         * testing/GCObservation.h:
1591         * xml/XSLTProcessor.cpp:
1592         (WebCore::XSLTProcessor::createDocumentFromSource):
1593         * xml/parser/XMLDocumentParser.cpp:
1594         (WebCore::XMLDocumentParser::parseDocumentFragment):
1595
1596 2018-12-21  Chris Dumez  <cdumez@apple.com>
1597
1598         navigator.userAgent in service workers does not reflect customUserAgent set by client
1599         https://bugs.webkit.org/show_bug.cgi?id=192951
1600
1601         Reviewed by Youenn Fablet.
1602
1603         Whenever a service worker client registers itself, also pass its effective user agent.
1604         In the network process, for each origin, we store the latest client's user agent and
1605         use it when starting the service worker.
1606
1607         * dom/Document.cpp:
1608         (WebCore::Document::setServiceWorkerConnection):
1609         * loader/DocumentLoader.cpp:
1610         (WebCore::DocumentLoader::registerTemporaryServiceWorkerClient):
1611         * workers/service/SWClientConnection.h:
1612         * workers/service/server/SWServer.cpp:
1613         (WebCore::SWServer::serviceWorkerClientUserAgent const):
1614         (WebCore::SWServer::installContextData):
1615         (WebCore::SWServer::runServiceWorker):
1616         (WebCore::SWServer::registerServiceWorkerClient):
1617         * workers/service/server/SWServer.h:
1618         * workers/service/server/SWServerToContextConnection.h:
1619         * workers/service/server/SWServerWorker.cpp:
1620         (WebCore::SWServerWorker::userAgent const):
1621         * workers/service/server/SWServerWorker.h:
1622
1623 2018-12-21  Youenn Fablet  <youenn@apple.com>
1624
1625         RTCRtpSender.setParameters() does set active parameter
1626         https://bugs.webkit.org/show_bug.cgi?id=192848
1627
1628         Reviewed by Eric Carlson.
1629
1630         Covered by updated test.
1631
1632         * Modules/mediastream/libwebrtc/LibWebRTCUtils.cpp:
1633         (WebCore::updateRTCRtpSendParameters):
1634         The routine was updating the local value, not the out parameter.
1635
1636 2018-12-21  Eric Carlson  <eric.carlson@apple.com>
1637
1638         'ended' Event doesn't fire on MediaStreamTrack when a USB camera is unplugged
1639         https://bugs.webkit.org/show_bug.cgi?id=187896
1640         <rdar://problem/42681445>
1641
1642         Reviewed by Jer Noble.
1643
1644         No new tests, tested manually.
1645
1646         * platform/mediastream/mac/AVVideoCaptureSource.h:
1647         * platform/mediastream/mac/AVVideoCaptureSource.mm:
1648         (WebCore::AVVideoCaptureSource::deviceDisconnected):
1649         (-[WebCoreAVVideoCaptureSourceObserver addNotificationObservers]):
1650         (-[WebCoreAVVideoCaptureSourceObserver removeNotificationObservers]):
1651         (-[WebCoreAVVideoCaptureSourceObserver deviceConnectedDidChange:]):
1652         * platform/mediastream/mac/CoreAudioCaptureDeviceManager.cpp:
1653         (WebCore::deviceHasInputStreams):
1654         (WebCore::isValidCaptureDevice):
1655         (WebCore::CoreAudioCaptureDeviceManager::coreAudioCaptureDevices):
1656         (WebCore::CoreAudioCaptureDeviceManager::refreshAudioCaptureDevices):
1657         (WebCore::CoreAudioCaptureDeviceManager::devicesChanged): Deleted.
1658         * platform/mediastream/mac/CoreAudioCaptureDeviceManager.h:
1659         * platform/mediastream/mac/CoreAudioCaptureSource.cpp:
1660         (WebCore::CoreAudioSharedUnit::setCaptureDevice):
1661         (WebCore::CoreAudioSharedUnit::devicesChanged):
1662         (WebCore::CoreAudioSharedUnit::startProducingData):
1663         (WebCore::CoreAudioSharedUnit::startInternal):
1664         (WebCore::CoreAudioSharedUnit::verifyIsCapturing):
1665         (WebCore::CoreAudioSharedUnit::captureFailed):
1666         (WebCore::CoreAudioCaptureSourceFactory::devicesChanged):
1667         (WebCore::CoreAudioCaptureSource::CoreAudioCaptureSource):
1668         (WebCore::CoreAudioSharedUnit::setCaptureDeviceID): Deleted.
1669         * platform/mediastream/mac/CoreAudioCaptureSource.h:
1670
1671 2018-12-20  Ryosuke Niwa  <rniwa@webkit.org>
1672
1673         REGRESSION(r239353): iOS WK1 Assertion failure in notifyChildNodeRemoved while running
1674         TestWebKitAPI.QuickLook.LegacyQuickLookContent
1675         https://bugs.webkit.org/show_bug.cgi?id=192859
1676         <rdar://problem/46887237>
1677
1678         Reviewed by Antti Koivisto.
1679
1680         After r239353, ScriptDisallowedScope::InMainThread::isScriptAllowed() may return false when the web thread
1681         is inside a delegate callback even when there is a ScriptDisallowedScope defined.
1682
1683         Replace the existign debug assertions which assert !ScriptDisallowedScope::InMainThread::isScriptAllowed()
1684         by a newly added ScriptDisallowedScope::InMainThread::hasDisallowedScope to avoid hitting this assertion.
1685
1686         Tests: TestWebKitAPI.QuickLook.LegacyQuickLookContent
1687
1688         * dom/ContainerNodeAlgorithms.cpp:
1689         (WebCore::notifyChildNodeInserted):
1690         (WebCore::notifyChildNodeRemoved):
1691         * dom/Document.cpp:
1692         (WebCore::Document::nodeChildrenWillBeRemoved):
1693         (WebCore::Document::nodeWillBeRemoved):
1694         * dom/ScriptDisallowedScope.h:
1695         (WebCore::ScriptDisallowedScope::InMainThread::hasDisallowedScope):
1696         * html/HTMLFormElement.cpp:
1697         (WebCore:: const):
1698
1699 2018-12-21  Joseph Pecoraro  <pecoraro@apple.com>
1700
1701         Update status of some WebCore features in features.json
1702         https://bugs.webkit.org/show_bug.cgi?id=192998
1703
1704         Reviewed by Tim Horton.
1705
1706         * features.json:
1707         - Variation Fonts: Supported
1708         - Conic Gradients: Supported in Preview
1709         - Web Share: Supported in Preview
1710         - <datalist>: Supported in Preview
1711         - Intersection Observers: Supported in Preview
1712
1713 2018-12-21  Zalan Bujtas  <zalan@apple.com>
1714
1715         [iOS] Using file upload can trigger a crash under RenderThemeIOS::paintFileUploadIconDecorations()
1716         https://bugs.webkit.org/show_bug.cgi?id=192357
1717         <rdar://problem/42852260>
1718
1719         Reviewed by Simon Fraser.
1720
1721         Do not try to paint the file picker when painting is disabled.
1722
1723         * rendering/RenderFileUploadControl.cpp:
1724         (WebCore::RenderFileUploadControl::paintObject):
1725
1726 2018-12-21  Jiewen Tan  <jiewen_tan@apple.com>
1727
1728         [WebAuthN] userPresence should always be true
1729         https://bugs.webkit.org/show_bug.cgi?id=192835
1730         <rdar://problem/46538788>
1731
1732         Reviewed by Brent Fulgham.
1733
1734         In the current spec as of 7 August 2018, userPresence is suggested to set to the inverse of userVerification.
1735         This doesn't comply with the CTAP spec. Details in: https://github.com/w3c/webauthn/issues/1123.
1736         After discussing with other members of the working group, we decided to make userPresence always default to true.
1737
1738         Covered by exisiting tests.
1739
1740         * Modules/webauthn/fido/DeviceRequestConverter.cpp:
1741         (fido::encodeGetAssertionRequestAsCBOR):
1742
1743 2018-12-21  Jiewen Tan  <jiewen_tan@apple.com>
1744
1745         [WebAuthN] Import an APDU coder from Chromium
1746         https://bugs.webkit.org/show_bug.cgi?id=192949
1747         <rdar://problem/46879933>
1748
1749         Reviewed by Brent Fulgham.
1750
1751         This patch imports an APDU coder from Chromium. Here is the documentation:
1752         https://fidoalliance.org/specs/fido-u2f-v1.2-ps-20170411/fido-u2f-raw-message-formats-v1.2-ps-20170411.html#u2f-message-framing
1753         APDU is a binary format to frame any U2F requests/responses into binaries. It is equivalent to CBOR in CTAP2.
1754
1755         Here is a list of files that are imported from Chromium:
1756         https://cs.chromium.org/chromium/src/components/apdu/apdu_command.cc?rcl=a2f290c10d132f53518e7f99d5635ee814ff8090
1757         https://cs.chromium.org/chromium/src/components/apdu/apdu_command.h?rcl=867b103481f6f4ccc79a69bba16c11eefac3cdb6
1758         https://cs.chromium.org/chromium/src/components/apdu/apdu_response.cc?rcl=867b103481f6f4ccc79a69bba16c11eefac3cdb6
1759         https://cs.chromium.org/chromium/src/components/apdu/apdu_response.h?rcl=867b103481f6f4ccc79a69bba16c11eefac3cdb6
1760         https://cs.chromium.org/chromium/src/components/apdu/apdu_unittest.cc?rcl=867b103481f6f4ccc79a69bba16c11eefac3cdb6
1761
1762         Covered by API tests.
1763
1764         * Modules/webauthn/apdu/ApduCommand.cpp: Added.
1765         (apdu::ApduCommand::createFromMessage):
1766         (apdu::ApduCommand::ApduCommand):
1767         (apdu::ApduCommand::getEncodedCommand const):
1768         * Modules/webauthn/apdu/ApduCommand.h: Added.
1769         * Modules/webauthn/apdu/ApduResponse.cpp: Added.
1770         (apdu::ApduResponse::createFromMessage):
1771         (apdu::ApduResponse::ApduResponse):
1772         (apdu::ApduResponse::getEncodedResponse const):
1773         * Modules/webauthn/apdu/ApduResponse.h: Added.
1774         * Sources.txt:
1775         * WebCore.xcodeproj/project.pbxproj:
1776
1777 2018-12-21  Jer Noble  <jer.noble@apple.com>
1778
1779         Convert raw CDMSessionMediaSourceAVFObjC pointer in MediaPlayerPrivateMediaSourceAVFObjC
1780         https://bugs.webkit.org/show_bug.cgi?id=192985
1781         <rdar://problem/46750743>
1782
1783         Reviewed by Eric Carlson.
1784
1785         Make m_session a RefPtr; drive-by fix: make m_mediaElement in WebKitMediaKeys a WeakPtr.
1786
1787         * Modules/encryptedmedia/legacy/WebKitMediaKeys.cpp:
1788         (WebCore::WebKitMediaKeys::setMediaElement):
1789         * Modules/encryptedmedia/legacy/WebKitMediaKeys.h:
1790         * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h:
1791         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
1792         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
1793         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::MediaPlayerPrivateMediaSourceAVFObjC):
1794         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setCDMSession):
1795
1796 2018-12-21  Justin Michaud  <justin_michaud@apple.com>
1797
1798         CSS variables don't work for colors in "border" property
1799         https://bugs.webkit.org/show_bug.cgi?id=192922
1800
1801         Reviewed by Simon Fraser.
1802
1803         ParseColorFunction no longer consumes anything if the color was not valid.
1804
1805         Test: css-custom-properties-api/border-variable-parsing.html
1806
1807         * css/parser/CSSPropertyParserHelpers.cpp:
1808         (WebCore::CSSPropertyParserHelpers::parseColorFunction):
1809
1810 2018-12-21  Justin Fan  <justin_fan@apple.com>
1811
1812         [WebGPU] GPUBindGroupLayout refactoring: no HashMap, and failure logging
1813         https://bugs.webkit.org/show_bug.cgi?id=192990
1814
1815         Reviewed by Myles C. Maxfield.
1816
1817         Refactor away the unnecessary HashMaps when creating MTLArgumentEncoders in GPUBindGroupLayout creation.
1818         Also update GPUBindGroupLayout::create -> tryCreate, in order to better handle Objective-C exceptions.
1819
1820         No new tests; no change in behavior.
1821
1822         * Modules/webgpu/WebGPUBindGroupLayout.cpp:
1823         (WebCore::WebGPUBindGroupLayout::create):
1824         (WebCore::WebGPUBindGroupLayout::WebGPUBindGroupLayout):
1825         * Modules/webgpu/WebGPUBindGroupLayout.h:
1826         (WebCore::WebGPUBindGroupLayout::bindGroupLayout const):
1827         * Modules/webgpu/WebGPUDevice.cpp:
1828         (WebCore::WebGPUDevice::createBindGroupLayout const):
1829         * platform/graphics/gpu/GPUBindGroupLayout.h:
1830         * platform/graphics/gpu/GPUDevice.cpp:
1831         (WebCore::GPUDevice::tryCreateBindGroupLayout const): Renamed from ::create*. Now returning a RefPtr. 
1832         (WebCore::GPUDevice::createBindGroupLayout const): Deleted.
1833         * platform/graphics/gpu/GPUDevice.h:
1834         * platform/graphics/gpu/cocoa/GPUBindGroupLayoutMetal.mm:
1835         (WebCore::appendArgumentToArray):
1836         (WebCore::newEncoder):
1837         (WebCore::GPUBindGroupLayout::tryCreate): Renamed from ::create. Now returning a RefPtr.
1838         (WebCore::GPUBindGroupLayout::GPUBindGroupLayout):
1839         (WebCore::appendArgumentToArrayInMap): Deleted.
1840         (WebCore::GPUBindGroupLayout::create): Deleted.
1841
1842         Deleted unneeded GPUBindGroupLayout.cpp:
1843         * Sources.txt:
1844         * WebCore.xcodeproj/project.pbxproj:
1845         * platform/graphics/gpu/GPUBindGroupLayout.cpp: Removed.
1846
1847 2018-12-21  Alejandro G. Castro  <alex@igalia.com>
1848
1849         [GTK][WPE] Add DeviceIdHashSaltStorage disk persistence
1850         https://bugs.webkit.org/show_bug.cgi?id=190466
1851
1852         Reviewed by Youenn Fablet.
1853
1854         Added persistency to the DeviceIdHashSaltStorage.
1855
1856         * platform/glib/FileSystemGlib.cpp:
1857         (WebCore::FileSystem::getFileSize): Implemented this function to
1858         allow sharing code with the statistics storage class.
1859         * platform/glib/KeyedDecoderGlib.cpp:
1860         (WebCore::KeyedDecoderGlib::dictionaryFromGVariant): Added a
1861         condition to control situations where the key is empty, it can
1862         happen if the user modifies the file in the disk.
1863         * Modules/indexeddb/shared/IDBResourceIdentifier.cpp: Add include
1864         to make work compilation with debug, unified builds.
1865
1866 2018-12-21  Zalan Bujtas  <zalan@apple.com>
1867
1868         Synchronous media query evaluation could destroy current Frame/FrameView.
1869         https://bugs.webkit.org/show_bug.cgi?id=192781
1870         <rdar://problem/34416793>
1871
1872         Reviewed by Chris Dumez.
1873
1874         Protect Frame and FrameView when coming back from printing and check if the current Frame/FrameView/FrameLoader objects are still valid.
1875
1876         Test: printing/print-with-media-query-destory.html
1877
1878         * loader/DocumentLoader.cpp:
1879         (WebCore::DocumentLoader::finishedLoading):
1880         * page/Frame.cpp:
1881         (WebCore::Frame::setPrinting):
1882         * page/FrameView.cpp:
1883         (WebCore::FrameView::forceLayoutForPagination):
1884         * page/PrintContext.cpp:
1885         (WebCore::PrintContext::PrintContext):
1886         (WebCore::PrintContext::computePageRects):
1887         (WebCore::PrintContext::computePageRectsWithPageSizeInternal):
1888         (WebCore::PrintContext::begin):
1889         (WebCore::PrintContext::computeAutomaticScaleFactor):
1890         (WebCore::PrintContext::spoolPage):
1891         (WebCore::PrintContext::spoolRect):
1892         (WebCore::PrintContext::end):
1893         * page/PrintContext.h:
1894         (WebCore::PrintContext::frame const): Deleted.
1895
1896 2018-12-21  Wenson Hsieh  <wenson_hsieh@apple.com>
1897
1898         Setting the file wrapper and content type of an attachment to a PDF should update its image
1899         https://bugs.webkit.org/show_bug.cgi?id=192984
1900         <rdar://problem/46798028>
1901
1902         Reviewed by Tim Horton.
1903
1904         Allow PDF data to be used to update enclosing image elements when setting the file wrapper for an attachment.
1905         Covered by a new API test: WKAttachmentTests.SetFileWrapperForPDFImageAttachment.
1906
1907         * html/HTMLAttachmentElement.cpp:
1908         (WebCore::mimeTypeIsSuitableForInlineImageAttachment):
1909         (WebCore::HTMLAttachmentElement::updateEnclosingImageWithData):
1910
1911 2018-12-21  Justin Michaud  <justin_michaud@apple.com>
1912
1913         Repeated background images with zero size should display the background color
1914         https://bugs.webkit.org/show_bug.cgi?id=192962
1915
1916         Reviewed by Antti Koivisto.
1917
1918         Test: fast/backgrounds/background-repeat-with-zero-size.html
1919
1920         * platform/LengthSize.h:
1921         (WebCore::LengthSize::isEmpty const):
1922         * rendering/RenderBoxModelObject.cpp:
1923         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
1924         * rendering/style/FillLayer.h:
1925         (WebCore::FillLayer::isEmpty const):
1926
1927 2018-12-21  Manuel Rego Casasnovas  <rego@igalia.com>
1928
1929         [css-grid] Fix percentages in relative offsets for grid items
1930         https://bugs.webkit.org/show_bug.cgi?id=190492
1931
1932         Reviewed by Sergio Villar Senin.
1933
1934         The method RenderBoxModelObject::relativePositionOffset() was not considering the case of grid items,
1935         where the containing block is the grid area.
1936         The patch modifies the method so the new code uses overrideContainingBlockContentWidth|Height when required.
1937
1938         Test: imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-items-relative-offsets-002.html
1939
1940         * rendering/RenderBox.cpp: Implement the physical versions of the already existent methods.
1941         (WebCore::RenderBox::overrideContainingBlockContentWidth const):
1942         (WebCore::RenderBox::overrideContainingBlockContentHeight const):
1943         (WebCore::RenderBox::hasOverrideContainingBlockContentWidth const):
1944         (WebCore::RenderBox::hasOverrideContainingBlockContentHeight const):
1945         * rendering/RenderBox.h:
1946         * rendering/RenderBoxModelObject.cpp:
1947         (WebCore::RenderBoxModelObject::relativePositionOffset const): Modified method
1948         to take into account overrideContainingBlockContentWidth|Height for grid items.
1949         * rendering/RenderBoxModelObject.h: Added new headers for physical virtual methods
1950         that will be overridden in RenderBox.
1951         (WebCore::RenderBoxModelObject::overrideContainingBlockContentWidth const):
1952         (WebCore::RenderBoxModelObject::overrideContainingBlockContentHeight const):
1953         (WebCore::RenderBoxModelObject::hasOverrideContainingBlockContentWidth const):
1954         (WebCore::RenderBoxModelObject::hasOverrideContainingBlockContentHeight const):
1955
1956 2018-12-20  Justin Fan  <justin_fan@apple.com>
1957
1958         [WebGPU] Convert WebGPUBindGroups into MTLArgumentEncoders
1959         https://bugs.webkit.org/show_bug.cgi?id=192956
1960
1961         Reviewed by Myles Maxfield.
1962
1963         No testable behavior change. Existing tests cover possible crashing.
1964
1965         Add GPUBindGroupLayoutMetal.mm:
1966         * SourcesCocoa.txt:
1967         * WebCore.xcodeproj/project.pbxproj:
1968
1969         Flesh out GPUBindGroupLayout::create:
1970         * platform/graphics/gpu/GPUBindGroupLayout.cpp:
1971         * platform/graphics/gpu/GPUBindGroupLayout.h:
1972         * platform/graphics/gpu/GPUDevice.cpp:
1973         (WebCore::GPUDevice::createBindGroupLayout const):
1974         * platform/graphics/gpu/cocoa/GPUBindGroupLayoutMetal.mm: Added.
1975         (WebCore::appendArgumentToArrayInMap): Added.
1976         (WebCore::GPUBindGroupLayout::create):
1977         (WebCore::GPUBindGroupLayout::GPUBindGroupLayout):
1978         (WebCore::MTLDataTypeForBindingType): Added.
1979
1980 2018-12-20  Michael Catanzaro  <mcatanzaro@igalia.com>
1981
1982         Unreviewed, remove stray #pragma once added to .cpp file
1983
1984         * svg/properties/SVGAttributeOwnerProxy.cpp:
1985
1986 2018-12-20  Justin Michaud  <justin_michaud@apple.com>
1987
1988         Adding runtime-enabled attribute to Element prevents inlining property access
1989         https://bugs.webkit.org/show_bug.cgi?id=192901
1990
1991         Add a call to flattenDictionaryObject after disabling runtime-enabled attributes.
1992
1993         Reviewed by Ryosuke Niwa.
1994
1995         * bindings/scripts/CodeGeneratorJS.pm:
1996         (GenerateImplementation):
1997         * bindings/scripts/test/JS/JSTestEnabledBySetting.cpp:
1998         (WebCore::JSTestEnabledBySettingPrototype::finishCreation):
1999         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
2000         (WebCore::JSTestGenerateIsReachablePrototype::finishCreation):
2001         * bindings/scripts/test/JS/JSTestNode.cpp:
2002         (WebCore::JSTestNodePrototype::finishCreation):
2003         * bindings/scripts/test/JS/JSTestObj.cpp:
2004         (WebCore::JSTestObjPrototype::finishCreation):
2005
2006 2018-12-20  Chris Dumez  <cdumez@apple.com>
2007
2008         Use Optional::hasValue() instead of Optional::has_value()
2009         https://bugs.webkit.org/show_bug.cgi?id=192948
2010
2011         Reviewed by Tim Horton.
2012
2013         * bindings/js/DOMPromiseProxy.h:
2014         (WebCore::DOMPromiseProxy<IDLType>::isFulfilled const):
2015         (WebCore::DOMPromiseProxy<IDLVoid>::isFulfilled const):
2016         (WebCore::DOMPromiseProxyWithResolveCallback<IDLType>::isFulfilled const):
2017         * dom/DataTransferItemList.h:
2018         (WebCore::DataTransferItemList::hasItems const):
2019         * dom/EventTarget.cpp:
2020         (WebCore::EventTarget::addEventListener):
2021         * html/HTMLMediaElement.cpp:
2022         (WebCore::HTMLMediaElement::captionDisplayMode):
2023         * platform/graphics/MediaPlayer.cpp:
2024         (WebCore::MediaPlayer::wouldTaintOrigin const):
2025         * platform/graphics/gstreamer/mse/AppendPipeline.cpp:
2026         (WebCore::AppendPipeline::parseDemuxerSrcPadCaps):
2027         * platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp:
2028         (WebCore::MediaPlayerPrivateGStreamerMSE::trackDetected):
2029         * platform/graphics/gstreamer/mse/WebKitMediaSourceGStreamer.cpp:
2030         (webKitMediaSrcUpdatePresentationSize):
2031         * platform/mac/NSScrollerImpDetails.mm:
2032         (WebCore::ScrollerStyle::recommendedScrollerStyle):
2033         * rendering/RenderListItem.cpp:
2034         (WebCore::RenderListItem::setExplicitValue):
2035
2036 2018-12-20  Chris Dumez  <cdumez@apple.com>
2037
2038         Move HTTPS_UPGRADE code behind a runtime flag, off by default
2039         https://bugs.webkit.org/show_bug.cgi?id=192937
2040
2041         Reviewed by Youenn Fablet.
2042
2043         Move HTTPS_UPGRADE code behind a runtime flag, off by default and drop the build time flag.
2044
2045         * page/Settings.yaml:
2046
2047 2018-12-20  Youenn Fablet  <youenn@apple.com>
2048
2049         Remove custom constructors of ReadableStreamDefaultReader and ReadableStreamBYOBReader
2050         https://bugs.webkit.org/show_bug.cgi?id=192838
2051
2052         Reviewed by Chris Dumez.
2053
2054         Generate constructor code in case of a Private but not Public constructor.
2055         Make sure this is correctly exposed in global objects.
2056         Add JS built-in constructor implementations for those two objects.
2057
2058         Also add JS built-in constructors for controller and byob request.
2059         To keep existing behavior, JS built-ins calling these constructors need to pass
2060         an additional parameter that allows making the difference between a JS builtin caller or a JS caller.
2061         In the latter case, the constructor will throw.
2062
2063         Covered by existing tests, no observable change of behavior.
2064
2065         * Modules/streams/ReadableByteStreamController.idl:
2066         * Modules/streams/ReadableByteStreamController.js:
2067         (initializeReadableByteStreamController):
2068         (getter.byobRequest):
2069         * Modules/streams/ReadableByteStreamInternals.js:
2070         (privateInitializeReadableByteStreamController): Deleted.
2071         (privateInitializeReadableStreamBYOBRequest): Deleted.
2072         * Modules/streams/ReadableStream.js:
2073         (initializeReadableStream):
2074         * Modules/streams/ReadableStreamBYOBReader.js:
2075         (initializeReadableStreamBYOBReader):
2076         * Modules/streams/ReadableStreamBYOBRequest.idl:
2077         * Modules/streams/ReadableStreamBYOBRequest.js:
2078         (initializeReadableStreamBYOBRequest):
2079         * Modules/streams/ReadableStreamDefaultController.idl:
2080         * Modules/streams/ReadableStreamDefaultController.js:
2081         (initializeReadableStreamDefaultController):
2082         (enqueue):
2083         * Modules/streams/ReadableStreamDefaultReader.js:
2084         (initializeReadableStreamDefaultReader):
2085         * Modules/streams/ReadableStreamInternals.js:
2086         (readableStreamDefaultControllerError): Deleted.
2087         * Sources.txt:
2088         * UnifiedSources-input.xcfilelist:
2089         * WebCore.xcodeproj/project.pbxproj:
2090         * bindings/js/JSDOMBuiltinConstructor.h:
2091         * bindings/js/JSDOMGlobalObject.cpp:
2092         (WebCore::JSDOMGlobalObject::addBuiltinGlobals):
2093         * bindings/js/JSReadableStreamPrivateConstructors.cpp: Removed.
2094         * bindings/js/JSReadableStreamPrivateConstructors.h: Removed.
2095         * bindings/scripts/CodeGeneratorJS.pm:
2096         (GeneratePropertiesHashTable):
2097         * bindings/scripts/preprocess-idls.pl:
2098         (shouldExposeInterface):
2099
2100 2018-12-20  Jiewen Tan  <jiewen_tan@apple.com>
2101
2102         [WebAuthN] Remove hash from Client Data
2103         https://bugs.webkit.org/show_bug.cgi?id=192727
2104         <rdar://problem/46746673>
2105
2106         Reviewed by Brent Fulgham.
2107
2108         The hash algorithm for hashing the client data is enforced to SHA_256 in the latest spec:
2109         https://www.w3.org/TR/webauthn/#sec-client-data. Therefore, we should remove it.
2110
2111         Covered by existing tests.
2112
2113         * Modules/webauthn/AuthenticatorCoordinator.cpp:
2114         (WebCore::AuthenticatorCoordinatorInternal::produceClientDataJson):
2115
2116 2018-12-20  Jiewen Tan  <jiewen_tan@apple.com>
2117
2118         [WebAuthN] Add a runtime flag for local authenticator
2119         https://bugs.webkit.org/show_bug.cgi?id=192792
2120         <rdar://problem/46798738>
2121
2122         Reviewed by Brent Fulgham.
2123
2124         No tests.
2125
2126         This patch adds a runtime flag for local authenticator and removes ways to
2127         set the runtime flag for web authentication in LegacyWebKit.
2128
2129         * page/RuntimeEnabledFeatures.h:
2130         (WebCore::RuntimeEnabledFeatures::setWebAuthenticationLocalAuthenticatorEnabled):
2131         (WebCore::RuntimeEnabledFeatures::webAuthenticationLocalAuthenticatorEnabled const):
2132
2133 2018-12-20  Jeremy Jones  <jeremyj@apple.com>
2134
2135         Pointer lock causes abandoned documents
2136         https://bugs.webkit.org/show_bug.cgi?id=188727
2137         rdar://problem/44248197
2138         
2139         Reviewed by Simon Fraser.
2140
2141         Fixes --world-leaks in these tests:
2142
2143         pointer-lock/locked-element-removed-from-dom.html
2144         pointer-lock/mouse-event-delivery.html
2145         fast/shadow-dom/pointerlockelement-in-slot.html
2146
2147         PointerLockController now uses WeakPtr instead of RefPtr because it has no need to extend the lifetime of a document.
2148
2149         * page/PointerLockController.cpp:
2150         (WebCore::PointerLockController::elementRemoved):
2151         (WebCore::PointerLockController::documentDetached):
2152         (WebCore::PointerLockController::didAcquirePointerLock):
2153         * page/PointerLockController.h:
2154
2155 2018-12-20  Chris Dumez  <cdumez@apple.com>
2156
2157         Use Optional::valueOr() instead of Optional::value_or()
2158         https://bugs.webkit.org/show_bug.cgi?id=192933
2159
2160         Reviewed by Geoffrey Garen.
2161
2162         * Modules/applepay/paymentrequest/ApplePayPaymentHandler.cpp:
2163         (WebCore::convert):
2164         (WebCore::ApplePayPaymentHandler::didAuthorizePayment):
2165         * Modules/encryptedmedia/MediaKeySession.cpp:
2166         (WebCore::MediaKeySession::load):
2167         * Modules/indexeddb/IDBDatabaseIdentifier.h:
2168         (WebCore::IDBDatabaseIdentifier::hash const):
2169         * Modules/indexeddb/IDBFactory.cpp:
2170         (WebCore::IDBFactory::open):
2171         * Modules/mediastream/MediaStreamTrack.cpp:
2172         (WebCore::MediaStreamTrack::applyConstraints):
2173         * Modules/mediastream/RTCDTMFSender.cpp:
2174         (WebCore::RTCDTMFSender::insertDTMF):
2175         * Modules/webdatabase/SQLTransaction.cpp:
2176         (WebCore::SQLTransaction::executeSql):
2177         * Modules/webvr/VRFrameData.cpp:
2178         (WebCore::VRFrameData::update):
2179         * animation/AnimationTimeline.cpp:
2180         (WebCore::AnimationTimeline::updateCSSTransitionsForElement):
2181         * animation/DeclarativeAnimation.cpp:
2182         (WebCore::DeclarativeAnimation::cancel):
2183         (WebCore::DeclarativeAnimation::invalidateDOMEvents):
2184         * animation/KeyframeEffect.cpp:
2185         (WebCore::computeMissingKeyframeOffsets):
2186         (WebCore::KeyframeEffect::applyPendingAcceleratedActions):
2187         * animation/WebAnimation.cpp:
2188         (WebCore::WebAnimation::runPendingPlayTask):
2189         (WebCore::WebAnimation::runPendingPauseTask):
2190         * bindings/js/SerializedScriptValue.cpp:
2191         (WebCore::CloneSerializer::write):
2192         * crypto/algorithms/CryptoAlgorithmHMAC.cpp:
2193         (WebCore::CryptoAlgorithmHMAC::generateKey):
2194         (WebCore::CryptoAlgorithmHMAC::importKey):
2195         * crypto/gcrypt/CryptoAlgorithmAES_GCMGCrypt.cpp:
2196         (WebCore::CryptoAlgorithmAES_GCM::platformEncrypt):
2197         (WebCore::CryptoAlgorithmAES_GCM::platformDecrypt):
2198         * crypto/gcrypt/CryptoKeyRSAGCrypt.cpp:
2199         (WebCore::CryptoKeyRSA::importSpki):
2200         (WebCore::CryptoKeyRSA::importPkcs8):
2201         * crypto/keys/CryptoKeyRSA.cpp:
2202         (WebCore::CryptoKeyRSA::importJwk):
2203         * crypto/mac/CryptoAlgorithmAES_GCMMac.cpp:
2204         (WebCore::CryptoAlgorithmAES_GCM::platformEncrypt):
2205         (WebCore::CryptoAlgorithmAES_GCM::platformDecrypt):
2206         * crypto/mac/CryptoKeyRSAMac.cpp:
2207         (WebCore::CryptoKeyRSA::importSpki):
2208         (WebCore::CryptoKeyRSA::importPkcs8):
2209         * css/CSSComputedStyleDeclaration.cpp:
2210         (WebCore::counterToCSSValue):
2211         * css/CSSFontFace.cpp:
2212         (WebCore::calculateItalicRange):
2213         * css/CSSPrimitiveValue.cpp:
2214         (WebCore::CSSPrimitiveValue::doubleValue const):
2215         * css/CSSStyleSheet.cpp:
2216         (WebCore::CSSStyleSheet::addRule):
2217         * css/DOMMatrix.cpp:
2218         (WebCore::DOMMatrix::rotateSelf):
2219         * css/DOMMatrixReadOnly.cpp:
2220         (WebCore::DOMMatrixReadOnly::validateAndFixup):
2221         * css/StyleBuilderCustom.h:
2222         (WebCore::StyleBuilderCustom::applyValueCounter):
2223         * css/parser/MediaQueryParser.cpp:
2224         (WebCore::MediaQueryParser::commitMediaQuery):
2225         * dom/Document.h:
2226         (WebCore::Document::referrerPolicy const):
2227         * dom/Element.cpp:
2228         (WebCore::toScrollAlignment):
2229         * dom/EventTarget.cpp:
2230         (WebCore::EventTarget::addEventListener):
2231         * dom/MutationObserver.cpp:
2232         (WebCore::MutationObserver::observe):
2233         * editing/cocoa/FontAttributeChangesCocoa.mm:
2234         (WebCore::FontChanges::platformFontFamilyNameForCSS const):
2235         * fileapi/File.cpp:
2236         (WebCore::File::File):
2237         * html/DOMTokenList.cpp:
2238         (WebCore::DOMTokenList::toggle):
2239         * html/HTMLOListElement.h:
2240         * html/ImageBitmap.cpp:
2241         (WebCore::croppedSourceRectangleWithFormatting):
2242         * html/canvas/CanvasPattern.cpp:
2243         (WebCore::CanvasPattern::setTransform):
2244         * html/canvas/CanvasRenderingContext2DBase.cpp:
2245         (WebCore::CanvasRenderingContext2DBase::setTransform):
2246         (WebCore::CanvasRenderingContext2DBase::isPointInPathInternal):
2247         (WebCore::CanvasRenderingContext2DBase::isPointInStrokeInternal):
2248         * html/canvas/Path2D.cpp:
2249         (WebCore::Path2D::addPath):
2250         * inspector/InspectorCanvas.cpp:
2251         (WebCore::InspectorCanvas::buildAction):
2252         * inspector/InspectorFrontendHost.cpp:
2253         (WebCore::populateContextMenu):
2254         * layout/FormattingContext.cpp:
2255         (WebCore::Layout::FormattingContext::validateGeometryConstraintsAfterLayout const):
2256         * layout/FormattingContextGeometry.cpp:
2257         (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedVerticalGeometry):
2258         (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedHorizontalGeometry):
2259         (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedVerticalGeometry):
2260         (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedHorizontalGeometry):
2261         (WebCore::Layout::FormattingContext::Geometry::complicatedCases):
2262         (WebCore::Layout::FormattingContext::Geometry::inlineReplacedWidthAndMargin):
2263         (WebCore::Layout::FormattingContext::Geometry::inFlowPositionedPositionOffset):
2264         (WebCore::Layout::FormattingContext::Geometry::computedNonCollapsedHorizontalMarginValue):
2265         (WebCore::Layout::FormattingContext::Geometry::computedNonCollapsedVerticalMarginValue):
2266         * layout/FormattingContextQuirks.cpp:
2267         (WebCore::Layout::FormattingContext::Quirks::heightValueOfNearestContainingBlockWithFixedHeight):
2268         * layout/MarginTypes.h:
2269         (WebCore::Layout::VerticalMargin::usedValues const):
2270         * layout/blockformatting/BlockFormattingContextGeometry.cpp:
2271         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedHeightAndMargin):
2272         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedWidthAndMargin):
2273         (WebCore::Layout::BlockFormattingContext::Geometry::instrinsicWidthConstraints):
2274         * layout/blockformatting/BlockFormattingContextQuirks.cpp:
2275         (WebCore::Layout::BlockFormattingContext::Quirks::stretchedHeight):
2276         * layout/displaytree/DisplayBox.h:
2277         (WebCore::Display::Box::width const):
2278         (WebCore::Display::Box::height const):
2279         (WebCore::Display::Box::contentBoxTop const):
2280         (WebCore::Display::Box::contentBoxLeft const):
2281         * layout/floats/FloatingContext.cpp:
2282         (WebCore::Layout::Iterator::set):
2283         * layout/inlineformatting/InlineFormattingContext.cpp:
2284         (WebCore::Layout::InlineFormattingContext::appendContentToLine const):
2285         (WebCore::Layout::InlineFormattingContext::placeInFlowPositionedChildren const):
2286         * loader/FrameLoader.cpp:
2287         (WebCore::FrameLoader::urlSelected):
2288         * loader/NavigationAction.cpp:
2289         * page/FrameView.cpp:
2290         (WebCore::FrameView::setLayoutViewportOverrideRect):
2291         (WebCore::FrameView::documentToAbsoluteScaleFactor const):
2292         (WebCore::FrameView::viewportSizeForCSSViewportUnits const):
2293         * page/Page.cpp:
2294         (WebCore::Page::setLowPowerModeEnabledOverrideForTesting):
2295         * page/SecurityOriginData.cpp:
2296         (WebCore::SecurityOriginData::databaseIdentifier const):
2297         * page/SecurityOriginData.h:
2298         (WebCore::SecurityOriginDataHash::hash):
2299         * page/SecurityOriginHash.h:
2300         (WebCore::SecurityOriginHash::hash):
2301         * page/ViewportConfiguration.cpp:
2302         (WebCore::ViewportConfiguration::setViewLayoutSize):
2303         * page/WindowFeatures.cpp:
2304         (WebCore::parseDialogFeatures):
2305         * page/animation/AnimationBase.cpp:
2306         (WebCore::AnimationBase::updateStateMachine):
2307         (WebCore::AnimationBase::fireAnimationEventsIfNeeded):
2308         (WebCore::AnimationBase::getTimeToNextEvent const):
2309         (WebCore::AnimationBase::freezeAtTime):
2310         (WebCore::AnimationBase::getElapsedTime const):
2311         * page/animation/CSSAnimationController.cpp:
2312         (WebCore::CSSAnimationControllerPrivate::updateAnimationTimer):
2313         * page/cocoa/ResourceUsageThreadCocoa.mm:
2314         (WebCore::ResourceUsageThread::platformThreadBody):
2315         * page/linux/ResourceUsageThreadLinux.cpp:
2316         (WebCore::ResourceUsageThread::platformThreadBody):
2317         * platform/graphics/ComplexTextController.cpp:
2318         (WebCore::ComplexTextController::offsetForPosition):
2319         * platform/graphics/FontCache.h:
2320         (WebCore::FontDescriptionKey::computeHash const):
2321         * platform/graphics/FontCascade.cpp:
2322         (WebCore::FontCascade::drawText const):
2323         (WebCore::FontCascade::drawEmphasisMarks const):
2324         (WebCore::FontCascade::displayListForTextRun const):
2325         (WebCore::FontCascade::adjustSelectionRectForText const):
2326         (WebCore::FontCascade::codePath const):
2327         * platform/graphics/FontSelectionAlgorithm.cpp:
2328         (WebCore::FontSelectionAlgorithm::styleDistance const):
2329         * platform/graphics/FontSelectionAlgorithm.h:
2330         (WebCore::operator<<):
2331         (WebCore::FontSelectionSpecifiedCapabilities::computeWeight const):
2332         (WebCore::FontSelectionSpecifiedCapabilities::computeWidth const):
2333         (WebCore::FontSelectionSpecifiedCapabilities::computeSlope const):
2334         * platform/graphics/ShadowBlur.cpp:
2335         (WebCore::ShadowBlur::calculateLayerBoundingRect):
2336         * platform/graphics/avfoundation/cf/WebCoreAVCFResourceLoader.cpp:
2337         (WebCore::WebCoreAVCFResourceLoader::startLoading):
2338         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2339         (WebCore::MediaPlayerPrivateAVFoundationObjC::paintWithVideoOutput):
2340         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
2341         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::paintCurrentFrameInContext):
2342         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
2343         (WebCore::SourceBufferPrivateAVFObjC::naturalSize):
2344         * platform/graphics/ca/GraphicsLayerCA.cpp:
2345         (WebCore::GraphicsLayerCA::setVisibleAndCoverageRects):
2346         * platform/graphics/cocoa/FontCacheCoreText.cpp:
2347         (WebCore::preparePlatformFont):
2348         * platform/graphics/filters/FETurbulence.cpp:
2349         (WebCore::FETurbulence::fillRegion const):
2350         * platform/graphics/gstreamer/GStreamerCommon.cpp:
2351         (WebCore::initializeGStreamer):
2352         * platform/graphics/texmap/TextureMapperLayer.cpp:
2353         (WebCore::TextureMapperLayer::paintSelfAndChildrenWithReplica):
2354         (WebCore::TextureMapperLayer::replicaTransform):
2355         (WebCore::TextureMapperLayer::syncAnimations):
2356         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
2357         (WebCore::CoordinatedGraphicsLayer::transformedVisibleRect):
2358         (WebCore::CoordinatedGraphicsLayer::computeTransformedVisibleRect):
2359         * platform/graphics/transforms/TransformState.cpp:
2360         (WebCore::TransformState::mappedPoint const):
2361         (WebCore::TransformState::mapQuad const):
2362         (WebCore::TransformState::flattenWithTransform):
2363         * platform/network/CacheValidation.cpp:
2364         (WebCore::computeCurrentAge):
2365         (WebCore::computeFreshnessLifetimeForHTTPFamily):
2366         * platform/network/NetworkStateNotifier.cpp:
2367         (WebCore::NetworkStateNotifier::onLine):
2368         * rendering/FloatingObjects.cpp:
2369         (WebCore::FindNextFloatLogicalBottomAdapter::nextLogicalBottom const):
2370         (WebCore::FindNextFloatLogicalBottomAdapter::nextShapeLogicalBottom const):
2371         * rendering/GridBaselineAlignment.cpp:
2372         (WebCore::GridBaselineAlignment::ascentForChild const):
2373         * rendering/GridTrackSizingAlgorithm.cpp:
2374         (WebCore::GridTrack::setGrowthLimit):
2375         (WebCore::GridTrackSizingAlgorithm::initialBaseSize const):
2376         (WebCore::GridTrackSizingAlgorithm::initialGrowthLimit const):
2377         (WebCore::GridTrackSizingAlgorithm::sizeTrackToFitNonSpanningItem):
2378         (WebCore::sortByGridTrackGrowthPotential):
2379         (WebCore::GridTrackSizingAlgorithm::estimatedGridAreaBreadthForChild const):
2380         (WebCore::GridTrackSizingAlgorithmStrategy::minSizeForChild const):
2381         (WebCore::GridTrackSizingAlgorithm::initializeTrackSizes):
2382         * rendering/PaintInfo.h:
2383         (WebCore::PaintInfo::applyTransform):
2384         * rendering/RenderBox.cpp:
2385         (WebCore::RenderBox::computeLogicalHeight const):
2386         * rendering/RenderCounter.cpp:
2387         (WebCore::planCounter):
2388         * rendering/RenderDeprecatedFlexibleBox.cpp:
2389         (WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
2390         * rendering/RenderFlexibleBox.cpp:
2391         (WebCore::RenderFlexibleBox::baselinePosition const):
2392         (WebCore::RenderFlexibleBox::marginBoxAscentForChild):
2393         (WebCore::RenderFlexibleBox::adjustChildSizeForMinAndMax):
2394         * rendering/RenderGrid.cpp:
2395         (WebCore::RenderGrid::gridGap const):
2396         (WebCore::RenderGrid::baselinePosition const):
2397         * rendering/RenderLayer.cpp:
2398         (WebCore::RenderLayer::paintLayerByApplyingTransform):
2399         * rendering/RenderListBox.cpp:
2400         (WebCore::RenderListBox::paintItem):
2401         (WebCore::RenderListBox::listIndexIsVisible):
2402         * rendering/RenderMultiColumnSet.cpp:
2403         (WebCore::RenderMultiColumnSet::calculateMaxColumnHeight const):
2404         * rendering/RenderTable.cpp:
2405         (WebCore::RenderTable::convertStyleLogicalHeightToComputedHeight):
2406         * rendering/RenderTableCell.cpp:
2407         (WebCore::RenderTableCell::cellBaselinePosition const):
2408         * rendering/RenderTableSection.cpp:
2409         (WebCore::RenderTableSection::firstLineBaseline const):
2410         * rendering/RenderText.cpp:
2411         (WebCore::RenderText::computePreferredLogicalWidths):
2412         (WebCore::RenderText::previousOffset const):
2413         (WebCore::RenderText::previousOffsetForBackwardDeletion const):
2414         (WebCore::RenderText::nextOffset const):
2415         (WebCore::RenderText::stringView const):
2416         * rendering/RenderView.cpp:
2417         (WebCore::RenderView::layout):
2418         * rendering/mathml/RenderMathMLBlock.cpp:
2419         (WebCore::RenderMathMLBlock::baselinePosition const):
2420         * rendering/mathml/RenderMathMLBlock.h:
2421         (WebCore::RenderMathMLBlock::ascentForChild):
2422         * rendering/style/GridPosition.cpp:
2423         (WebCore::GridPosition::max):
2424         * rendering/style/TextUnderlineOffset.h:
2425         (WebCore::TextUnderlineOffset::lengthOr const):
2426         * rendering/svg/RenderSVGContainer.cpp:
2427         (WebCore::RenderSVGContainer::nodeAtFloatPoint):
2428         * rendering/svg/RenderSVGForeignObject.cpp:
2429         (WebCore::RenderSVGForeignObject::nodeAtFloatPoint):
2430         * rendering/svg/RenderSVGImage.cpp:
2431         (WebCore::RenderSVGImage::nodeAtFloatPoint):
2432         * rendering/svg/RenderSVGResourceClipper.cpp:
2433         (WebCore::RenderSVGResourceClipper::hitTestClipContent):
2434         * rendering/svg/RenderSVGResourceFilter.cpp:
2435         (WebCore::RenderSVGResourceFilter::postApplyResource):
2436         * rendering/svg/RenderSVGRoot.cpp:
2437         (WebCore::RenderSVGRoot::nodeAtPoint):
2438         * rendering/svg/RenderSVGShape.cpp:
2439         (WebCore::RenderSVGShape::nodeAtFloatPoint):
2440         * rendering/svg/RenderSVGText.cpp:
2441         (WebCore::RenderSVGText::nodeAtFloatPoint):
2442         * rendering/svg/SVGRenderingContext.cpp:
2443         (WebCore::SVGRenderingContext::clipToImageBuffer):
2444         * svg/SVGToOTFFontConversion.cpp:
2445         (WebCore::SVGToOTFFontConverter::processGlyphElement):
2446         (WebCore::SVGToOTFFontConverter::SVGToOTFFontConverter):
2447
2448 2018-12-20  Jer Noble  <jer.noble@apple.com>
2449
2450         REGRESSION (r239419): heap-use-after-free in AudioSourceProviderAVFObjC::finalizeCallback()
2451         https://bugs.webkit.org/show_bug.cgi?id=192941
2452         <rdar://problem/46874096>
2453
2454         Reviewed by Brent Fulgham.
2455
2456         Don't delete the locked lock before unlocking the lock. 
2457
2458         * platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm:
2459         (WebCore::AudioSourceProviderAVFObjC::finalizeCallback):
2460
2461 2018-12-20  Keith Rollin  <krollin@apple.com>
2462
2463         Improve release-level page-load logging
2464         https://bugs.webkit.org/show_bug.cgi?id=192872
2465         <rdar://problem/46850309>
2466
2467         Reviewed by Chris Dumez.
2468
2469         There are a number of reported bugs that are difficult or impossible
2470         to track down with our current level of logging. Additionally, some
2471         software groups lower in the page-loading stack have requested logging
2472         sufficient for tracking a user-visible error message down to the
2473         requested resource that caused the message. Add more-comprehensive
2474         logging to address these issues/requests.
2475
2476         No new tests -- no changed functionality.
2477
2478         * loader/DocumentLoader.cpp:
2479         (WebCore::DocumentLoader::setMainDocumentError):
2480         (WebCore::DocumentLoader::mainReceivedError):
2481         (WebCore::DocumentLoader::stopLoading):
2482         (WebCore::DocumentLoader::notifyFinished):
2483         (WebCore::DocumentLoader::willSendRequest):
2484         (WebCore::DocumentLoader::continueAfterContentPolicy):
2485         (WebCore::DocumentLoader::startLoadingMainResource):
2486         (WebCore::DocumentLoader::loadMainResource):
2487         (WebCore::DocumentLoader::cancelMainResourceLoad):
2488         * loader/FrameLoader.cpp:
2489         (WebCore::FrameLoader::urlSelected):
2490         (WebCore::FrameLoader::loadURLIntoChildFrame):
2491         (WebCore::FrameLoader::loadArchive):
2492         (WebCore::FrameLoader::loadInSameDocument):
2493         (WebCore::FrameLoader::loadFrameRequest):
2494         (WebCore::FrameLoader::loadURL):
2495         (WebCore::FrameLoader::load):
2496         (WebCore::FrameLoader::loadWithNavigationAction):
2497         (WebCore::FrameLoader::loadWithDocumentLoader):
2498         (WebCore::FrameLoader::reloadWithOverrideEncoding):
2499         (WebCore::FrameLoader::reload):
2500         (WebCore::FrameLoader::setState):
2501         (WebCore::FrameLoader::checkLoadCompleteForThisFrame):
2502         (WebCore::FrameLoader::loadPostRequest):
2503         (WebCore::FrameLoader::continueLoadAfterNavigationPolicy):
2504         (WebCore::FrameLoader::loadDifferentDocumentItem):
2505         * loader/ProgressTracker.cpp:
2506         (WebCore::ProgressItem::ProgressItem):
2507         (WebCore::ProgressTracker::reset):
2508         (WebCore::ProgressTracker::progressStarted):
2509         (WebCore::ProgressTracker::progressCompleted):
2510         (WebCore::ProgressTracker::finalProgressComplete):
2511         (WebCore::ProgressTracker::incrementProgress):
2512         (WebCore::ProgressTracker::completeProgress):
2513         (WebCore::ProgressTracker::isAlwaysOnLoggingAllowed const):
2514         * loader/ProgressTracker.h:
2515         * loader/ResourceLoader.cpp:
2516         (WebCore::ResourceLoader::loadDataURL):
2517         (WebCore::ResourceLoader::willSendRequestInternal):
2518         (WebCore::ResourceLoader::didFinishLoading):
2519         (WebCore::ResourceLoader::didFail):
2520         (WebCore::ResourceLoader::willSendRequestAsync):
2521         (WebCore::ResourceLoader::wasBlocked):
2522         (WebCore::ResourceLoader::cannotShowURL):
2523         * loader/SubresourceLoader.cpp:
2524         (WebCore::SubresourceLoader::willSendRequestInternal):
2525         (WebCore::=):
2526         (WebCore::SubresourceLoader::didReceiveResponse):
2527         (WebCore::SubresourceLoader::didFinishLoading):
2528         (WebCore::SubresourceLoader::didFail):
2529         (WebCore::SubresourceLoader::willCancel):
2530         * loader/cache/CachedResource.cpp:
2531         (WebCore::CachedResource::load):
2532
2533 2018-12-20  Jeremy Jones  <jeremyj@apple.com>
2534
2535         Switch tabs before retuning PiP video to inline.
2536         https://bugs.webkit.org/show_bug.cgi?id=192767
2537         rdar://problem/46006046
2538
2539         Reviewed by Jer Noble.
2540
2541         No new tests because this code path only happens with a user action on system UI.
2542
2543         When exiting PiP, notify the fullscreen change observer so it can restore client UI state before exiting.
2544
2545         * platform/mac/VideoFullscreenInterfaceMac.mm:
2546         (-[WebVideoFullscreenInterfaceMacObjC pipShouldClose:]):
2547
2548 2018-12-19  Michael Catanzaro  <mcatanzaro@igalia.com>
2549
2550         Unreviewed, fix GTK build after r239410
2551
2552         It added a new file to the build, breaking the unified sources magic that obscured a bug in
2553         URLSoup.h. It forward-declares URL, but this never worked unless the URL.h header was
2554         included via another source file in the unified source bundle.
2555
2556         * platform/network/soup/URLSoup.h:
2557
2558 2018-12-19  Chris Dumez  <cdumez@apple.com>
2559
2560         wtf/Optional.h: move-constructor and move-assignment operator should disengage the value being moved from
2561         https://bugs.webkit.org/show_bug.cgi?id=192728
2562         <rdar://problem/46746779>
2563
2564         Reviewed by Geoff Garen.
2565
2566         * Modules/*:
2567         * animation/*:
2568         * bindings/*:
2569         * crypto/*:
2570         * css/*:
2571         * dom/*:
2572         * editing/*:
2573         * fileapi/*:
2574         * html/*:
2575         * inspector/*:
2576         * layout/*:
2577         * loader/*:
2578         * mathml/*:
2579         * page/*:
2580         * platform/*:
2581         * plugins/*:
2582         * rendering/*:
2583         * testing/*:
2584         * workers/*:
2585         * xml/*:
2586
2587 2018-12-19  Jer Noble  <jer.noble@apple.com>
2588
2589         Leak of MTAudioProcessingTap (304 bytes) in com.apple.WebKit.WebContent running WebKit layout tests
2590         https://bugs.webkit.org/show_bug.cgi?id=192896
2591         <rdar://46732186>
2592
2593         Reviewed by Eric Carlson.
2594
2595         * platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm:
2596         (WebCore::AudioSourceProviderAVFObjC::initCallback):
2597
2598 2018-12-19  Timothy Hatcher  <timothy@apple.com>
2599
2600         REGRESSION (r232991): Switching to dark mode in Mail does not update the message view to be transparent
2601         https://bugs.webkit.org/show_bug.cgi?id=188891
2602         rdar://problem/42344352
2603
2604         Reviewed by Simon Fraser.
2605
2606         * rendering/RenderLayerCompositor.cpp:
2607         (WebCore::RenderLayerCompositor::rootBackgroundColorOrTransparencyChanged):
2608         Don't return early when m_layerForOverhangAreas is null to avoid skipping
2609         setRootLayerConfigurationNeedsUpdate() and scheduleCompositingLayerUpdate().
2610
2611 2018-12-19  Justin Fan  <justin_fan@apple.com>
2612
2613         [WebGPU] Add stubs for WebGPUPipelineLayout/Descriptor and device::createPipelineLayout
2614         https://bugs.webkit.org/show_bug.cgi?id=192843
2615         <rdar://problem/46820395>
2616
2617         Reviewed by Myles Maxfield.
2618
2619         Test: webgpu/pipeline-layouts.html
2620
2621         Implement the emtpy WebGPUPipelineLayout interface, and enable creation via WebGPUDevice::createPipelineLayout:
2622         * Modules/webgpu/WebGPUBindGroupLayout.cpp:
2623         (WebCore::WebGPUBindGroupLayout::WebGPUBindGroupLayout):
2624         * Modules/webgpu/WebGPUBindGroupLayout.h:
2625         (WebCore::WebGPUBindGroupLayout::bindGroupLayout const): Added getter.
2626         * Modules/webgpu/WebGPUDevice.cpp:
2627         (WebCore::WebGPUDevice::createPipelineLayout const): Added.
2628         * Modules/webgpu/WebGPUDevice.h:
2629         * Modules/webgpu/WebGPUDevice.idl: Enable createPipelineLayout.
2630         * Modules/webgpu/WebGPUPipelineLayout.cpp: Added.
2631         (WebCore::WebGPUPipelineLayout::create):
2632         (WebCore::WebGPUPipelineLayout::WebGPUPipelineLayout):
2633         * Modules/webgpu/WebGPUPipelineLayout.h: Added.
2634         * Modules/webgpu/WebGPUPipelineLayout.idl: Added.
2635         * Modules/webgpu/WebGPUPipelineLayoutDescriptor.h: Added.
2636         * Modules/webgpu/WebGPUPipelineLayoutDescriptor.idl: Added.
2637         * platform/graphics/gpu/GPUDevice.cpp:
2638         (WebCore::GPUDevice::createPipelineLayout const): Added.
2639         * platform/graphics/gpu/GPUDevice.h:
2640         * platform/graphics/gpu/GPUPipelineLayout.cpp: Added.
2641         (WebCore::GPUPipelineLayout::create):
2642         (WebCore::GPUPipelineLayout::GPUPipelineLayout):
2643         * platform/graphics/gpu/GPUPipelineLayout.h: Added.
2644         * platform/graphics/gpu/GPUPipelineLayoutDescriptor.h: Added.
2645
2646         Add files and symbols to project:
2647         * CMakeLists.txt:
2648         * DerivedSources.make:
2649         * Sources.txt:
2650         * WebCore.xcodeproj/project.pbxproj:
2651         * bindings/js/WebCoreBuiltinNames.h:
2652
2653         Add missing include:
2654         * Modules/webgpu/WebGPUQueue.h:
2655
2656 2018-12-18  Ryosuke Niwa  <rniwa@webkit.org>
2657
2658         SVGUseElement::findTarget should return nullptr when there is a cycle
2659         https://bugs.webkit.org/show_bug.cgi?id=192840
2660
2661         Reviewed by Tim Horton.
2662
2663         r233366 added an early return to updateShadowTree() when there is a cycle between an use element and its target.
2664         Consolidate this cycle detection code with the one in SVGUseElement::findTarget which detected cycles when
2665         the SVG use element itself had a corresponding element.
2666
2667         No new tests since there should be no behavioral change.
2668
2669         * svg/SVGUseElement.cpp:
2670         (WebCore::SVGUseElement::updateShadowTree):
2671         (WebCore::SVGUseElement::findTarget const):
2672
2673 2018-12-19  Myles C. Maxfield  <mmaxfield@apple.com>
2674
2675         [WHLSL] Add a handwritten lexer
2676         https://bugs.webkit.org/show_bug.cgi?id=192294
2677
2678         Reviewed by Jon Lee.
2679
2680         This is infrastructure necessary for https://bugs.webkit.org/show_bug.cgi?id=192355. The
2681         implementation matches the lexing rules in the spec (specifically, the rules that start
2682         with an uppercase letter). The spec is at
2683         https://github.com/gpuweb/WHLSL/blob/master/Spec/WHLSL.g4.
2684
2685         This patch also modifies the lexer according to https://github.com/gpuweb/WHLSL/pull/283.
2686
2687         No new tests because the lexer isn't hooked up yet; there are tests in the parser,
2688         once that gets committed.
2689
2690         * Modules/webgpu/WHLSL/WHLSLLexer.cpp: Added.
2691         (WebCore::WHLSL::Lexer::Token::typeName):
2692         (WebCore::WHLSL::Lexer::recognizeKeyword):
2693         (WebCore::WHLSL::Lexer::consumeTokenFromStream):
2694         (WebCore::WHLSL::Lexer::skipWhitespaceAndComments):
2695         (WebCore::WHLSL::isWhitespace):
2696         (WebCore::WHLSL::isNewline):
2697         (WebCore::WHLSL::Lexer::skipWhitespace):
2698         (WebCore::WHLSL::Lexer::skipLineComment):
2699         (WebCore::WHLSL::Lexer::skipLongComment):
2700         (WebCore::WHLSL::Lexer::coreDecimalIntLiteral const):
2701         (WebCore::WHLSL::Lexer::decimalIntLiteral const):
2702         (WebCore::WHLSL::Lexer::decimalUintLiteral const):
2703         (WebCore::WHLSL::isHexadecimalCharacter):
2704         (WebCore::WHLSL::Lexer::coreHexadecimalIntLiteral const):
2705         (WebCore::WHLSL::Lexer::hexadecimalIntLiteral const):
2706         (WebCore::WHLSL::Lexer::hexadecimalUintLiteral const):
2707         (WebCore::WHLSL::Lexer::intLiteral const):
2708         (WebCore::WHLSL::Lexer::uintLiteral const):
2709         (WebCore::WHLSL::Lexer::digit const):
2710         (WebCore::WHLSL::Lexer::digitStar const):
2711         (WebCore::WHLSL::Lexer::character const):
2712         (WebCore::WHLSL::Lexer::coreFloatLiteralType1 const):
2713         (WebCore::WHLSL::Lexer::coreFloatLiteral const):
2714         (WebCore::WHLSL::Lexer::floatLiteral const):
2715         (WebCore::WHLSL::Lexer::validIdentifier const):
2716         (WebCore::WHLSL::Lexer::identifier const):
2717         (WebCore::WHLSL::Lexer::operatorName const):
2718         * Modules/webgpu/WHLSL/WHLSLLexer.h: Added.
2719         (WebCore::WHLSL::Lexer::Lexer):
2720         (WebCore::WHLSL::Lexer::consumeToken):
2721         (WebCore::WHLSL::Lexer::unconsumeToken):
2722         (WebCore::WHLSL::Lexer::state const):
2723         (WebCore::WHLSL::Lexer::setState):
2724         (WebCore::WHLSL::Lexer::isFullyConsumed const):
2725         (WebCore::WHLSL::Lexer::errorString):
2726         (WebCore::WHLSL::Lexer::string const):
2727         (WebCore::WHLSL::Lexer::anyCharacter const):
2728         * Sources.txt:
2729         * WebCore.xcodeproj/project.pbxproj:
2730
2731 2018-12-18  Simon Fraser  <simon.fraser@apple.com>
2732
2733         Web Inspector: Timelines: correctly label Intersection Observer callbacks
2734         https://bugs.webkit.org/show_bug.cgi?id=192669
2735         <rdar://problem/46702490>
2736
2737         Reviewed by Joseph Pecoraro.
2738
2739         Add InspectorInstrumentation::willFireObserverCallback() and use it to wrap calls
2740         to Intersection Observer, Performance Observer and Mutation Observer callbacks so 
2741         that they get correctly labeled in the Inspector timeline.
2742
2743         * dom/MutationObserver.cpp:
2744         (WebCore::MutationObserver::deliver):
2745         * en.lproj/Localizable.strings:
2746         * inspector/InspectorInstrumentation.cpp:
2747         (WebCore::InspectorInstrumentation::willFireObserverCallbackImpl):
2748         (WebCore::InspectorInstrumentation::didFireObserverCallbackImpl):
2749         * inspector/InspectorInstrumentation.h:
2750         (WebCore::InspectorInstrumentation::willFireObserverCallback):
2751         (WebCore::InspectorInstrumentation::didFireObserverCallback):
2752         * inspector/TimelineRecordFactory.cpp:
2753         (WebCore::TimelineRecordFactory::createObserverCallbackData):
2754         * inspector/TimelineRecordFactory.h:
2755         * inspector/agents/InspectorTimelineAgent.cpp:
2756         (WebCore::InspectorTimelineAgent::willFireObserverCallback):
2757         (WebCore::InspectorTimelineAgent::didFireObserverCallback):
2758         (WebCore::toProtocol):
2759         * inspector/agents/InspectorTimelineAgent.h:
2760         * page/IntersectionObserver.cpp:
2761         (WebCore::IntersectionObserver::notify):
2762         * page/PerformanceObserver.cpp:
2763         (WebCore::PerformanceObserver::deliver):
2764
2765 2018-12-19  Claudio Saavedra  <csaavedra@igalia.com>
2766
2767         ContentExtensions: DFANode.cpp:66:44: error: narrowing conversion of '-1' from 'int' to 'char' inside { }
2768         https://bugs.webkit.org/show_bug.cgi?id=192854
2769
2770         Reviewed by Alex Christensen.
2771
2772         * contentextensions/DFANode.h: Define CharRange's chars as signed
2773
2774 2018-12-19  Youenn Fablet  <youenn@apple.com>
2775
2776         Remove RTCRtpTransceiver.setDirection
2777         https://bugs.webkit.org/show_bug.cgi?id=192869
2778
2779         Reviewed by Alex Christensen.
2780
2781         Covered by rebased test.
2782
2783         * Modules/mediastream/RTCRtpTransceiver.idl:
2784
2785 2018-12-19  Jer Noble  <jer.noble@apple.com>
2786
2787         Force synchronous decode in WebCoreDecompressionSession::decodeSampleSync()
2788         https://bugs.webkit.org/show_bug.cgi?id=192856
2789         <rdar://problem/46843245>
2790
2791         Reviewed by Alex Christensen.
2792
2793         Some decoders exposed through VideoToolbox will decode asynchronously even when 
2794         kVTDecodeInfo_Asynchronous is not set. Force synchronous behavior with a Semaphore.
2795
2796         * platform/graphics/cocoa/WebCoreDecompressionSession.mm:
2797         (WebCore::WebCoreDecompressionSession::decodeSampleSync):
2798
2799 2018-12-19  Megan Gardner  <megan_gardner@apple.com>
2800
2801         Allow clients to set the navigator platform
2802         https://bugs.webkit.org/show_bug.cgi?id=192735
2803
2804         Reviewed by Tim Horton.
2805
2806         Expanded TestWebKitAPI/Tests/WebKitCocoa/WebsitePolicies.mm.
2807
2808         Lots of piping to allow the setting of a custom navigator platform.
2809
2810         * loader/DocumentLoader.h:
2811         (WebCore::DocumentLoader::setCustomNavigatorPlatform):
2812         (WebCore::DocumentLoader::customNavigatorPlatform const):
2813         * loader/FrameLoader.cpp:
2814         (WebCore::FrameLoader::navigatorPlatform const):
2815         * loader/FrameLoader.h:
2816         * page/Navigator.cpp:
2817         (WebCore::Navigator::platform const):
2818         * page/Navigator.h:
2819         * page/NavigatorBase.cpp:
2820         (WebCore::NavigatorBase::platform const):
2821         (WebCore::NavigatorBase::platform): Deleted.
2822         * page/NavigatorBase.h:
2823
2824 2018-12-19  Ryan Haddad  <ryanhaddad@apple.com>
2825
2826         Unreviewed, rolling out r239347.
2827
2828         Caused the leaks bot to hit an exception and the new test
2829         crashes on certain configurations.
2830
2831         Reverted changeset:
2832
2833         "Synchronous media query evaluation could destroy current
2834         Frame/FrameView."
2835         https://bugs.webkit.org/show_bug.cgi?id=192781
2836         https://trac.webkit.org/changeset/239347
2837
2838 2018-12-19  Truitt Savell  <tsavell@apple.com>
2839
2840         Unreviewed, rolling out r239358.
2841
2842         Revision caused imported/w3c/web-platform-tests/IndexedDB/ to
2843         crash on Debug bots
2844
2845         Reverted changeset:
2846
2847         "Clean up IndexedDB files between tests"
2848         https://bugs.webkit.org/show_bug.cgi?id=192796
2849         https://trac.webkit.org/changeset/239358
2850
2851 2018-12-19  Don Olmstead  <don.olmstead@sony.com>
2852
2853         Sync some include directories in WebCore
2854         https://bugs.webkit.org/show_bug.cgi?id=192819
2855
2856         Reviewed by Michael Catanzaro.
2857
2858         Added missing include directories around features that have only been enabled on
2859         Apple ports. Removes obsolete directories from list and moves harfbuzz directories
2860         into the freetype cmake file.
2861
2862         * CMakeLists.txt:
2863         * platform/FreeType.cmake:
2864
2865 2018-12-19  Alicia Boya García  <aboya@igalia.com>
2866
2867         [MSE] Remove unused method: stopAskingForMoreSamples()
2868         https://bugs.webkit.org/show_bug.cgi?id=192754
2869
2870         Reviewed by Xabier Rodriguez-Calvar.
2871
2872         The stopAskingForMoreSamples() method from SourceBufferPrivate is not
2873         being used by anyone. SourceBuffer is not calling it and no
2874         SourceBufferPrivate is implementing it. Let's remove that noise.
2875
2876         * platform/graphics/SourceBufferPrivate.h:
2877         (WebCore::SourceBufferPrivate::setActive):
2878         (WebCore::SourceBufferPrivate::stopAskingForMoreSamples): Deleted.
2879         * platform/graphics/gstreamer/mse/SourceBufferPrivateGStreamer.cpp:
2880         (WebCore::SourceBufferPrivateGStreamer::stopAskingForMoreSamples): Deleted.
2881         * platform/graphics/gstreamer/mse/SourceBufferPrivateGStreamer.h:
2882
2883 2018-12-19  Alicia Boya García  <aboya@igalia.com>
2884
2885         [MSE] Remove dead code: sourceBufferPrivateSeekToTime()
2886         https://bugs.webkit.org/show_bug.cgi?id=192827
2887
2888         Reviewed by Xabier Rodriguez-Calvar.
2889
2890         This patch makes two dead code removal changes in
2891         SourceBufferPrivateClient:
2892
2893         First, sourceBufferPrivateFastSeekTimeForMediaTime() is made pure
2894         virtual in SourceBufferPrivateClient. Since SourceBufferPrivateClient
2895         is only inherited by SourceBuffer, it makes no sense to have default
2896         implementations there (they will never be used), moreso it being a
2897         client interface.
2898
2899         Second, sourceBufferPrivateSeekToTime() is removed entirely. It used
2900         to had an empty implementation, which SourceBuffer did not overwrite,
2901         therefore making any calls to it useless.
2902
2903         All calls to sourceBufferPrivateSeekToTime() have been removed:
2904
2905         SourceBufferPrivateAVFObjC::seekToTime(), which was also dead code
2906         itself, used to call this method. This patch deletes it completely.
2907
2908         MockSourceBufferPrivate::seekToTime(), which only called this empty
2909         method, has also been removed along with its only usage in
2910         MockMediaSourcePrivate::seekToTime().
2911
2912         * platform/graphics/SourceBufferPrivateClient.h:
2913         (WebCore::SourceBufferPrivateClient::sourceBufferPrivateFastSeekTimeForMediaTime): Deleted.
2914         (WebCore::SourceBufferPrivateClient::sourceBufferPrivateSeekToTime): Deleted.
2915         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h:
2916         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
2917         (WebCore::SourceBufferPrivateAVFObjC::seekToTime): Deleted.
2918         * platform/mock/mediasource/MockMediaSourcePrivate.cpp:
2919         (WebCore::MockMediaSourcePrivate::seekToTime):
2920         * platform/mock/mediasource/MockSourceBufferPrivate.cpp:
2921         (WebCore::MockSourceBufferPrivate::seekToTime): Deleted.
2922         * platform/mock/mediasource/MockSourceBufferPrivate.h:
2923
2924 2018-12-19  Xabier Rodriguez Calvar  <calvaris@igalia.com>
2925
2926         [EME] MediaKeySystemConfiguration distinctiveIdentifier and persistentState should default to optional
2927         https://bugs.webkit.org/show_bug.cgi?id=192815
2928
2929         Reviewed by Jer Noble.
2930
2931         https://www.w3.org/TR/encrypted-media/#dom-mediakeysystemconfiguration
2932         says that distinctiveIdentifier and persistentState default to
2933         optional. Our implementation does not define a default leaving it
2934         to the first option of the enum, which currently is Required.
2935
2936         * platform/encryptedmedia/CDMKeySystemConfiguration.h:
2937
2938 2018-12-19  Rob Buis  <rbuis@igalia.com>
2939
2940         Merge parseAccessControlExposeHeadersAllowList into parseAccessControlAllowList
2941         https://bugs.webkit.org/show_bug.cgi?id=192288
2942
2943         Reviewed by Frédéric Wang.
2944
2945         Prefer return value to out parameter for parseAccessControlAllowList.
2946
2947         * loader/CrossOriginPreflightResultCache.cpp:
2948         (WebCore::CrossOriginPreflightResultCacheItem::parse):
2949         * platform/network/HTTPParsers.h:
2950         (WebCore::parseAccessControlAllowList):
2951         * platform/network/ResourceResponseBase.cpp:
2952         (WebCore::ResourceResponseBase::filter):
2953         (WebCore::ResourceResponseBase::sanitizeHTTPHeaderFieldsAccordingToTainting):
2954
2955 2018-12-18  Zan Dobersek  <zdobersek@igalia.com>
2956
2957         REGRESSION(r235165): [GTK][WPE] Garbled rendering on GitLab
2958         https://bugs.webkit.org/show_bug.cgi?id=192230
2959
2960         Reviewed by Carlos Garcia Campos.
2961
2962         Single tile can after r235165 be assigned multiple content updates
2963         without a commit occurring between each update, whereas before these
2964         commits were done for each update.
2965
2966         To avoid repeating updates for a single tile purging information about
2967         the previous update, these updates are now accumulated inside a Vector
2968         and then iterated over during the commit phase.
2969
2970         * platform/graphics/texmap/coordinated/CoordinatedBackingStore.cpp:
2971         (WebCore::CoordinatedBackingStoreTile::addUpdate):
2972         (WebCore::CoordinatedBackingStoreTile::swapBuffers):
2973         (WebCore::CoordinatedBackingStore::updateTile):
2974         (WebCore::CoordinatedBackingStoreTile::setBackBuffer): Deleted.
2975         * platform/graphics/texmap/coordinated/CoordinatedBackingStore.h:
2976         (WebCore::CoordinatedBackingStoreTile::scale const):
2977
2978 2018-12-18  Wenson Hsieh  <wenson_hsieh@apple.com>
2979
2980         [iOS] A copied text selection is pasted as a web archive attachment in the entry view in Messages
2981         https://bugs.webkit.org/show_bug.cgi?id=192842
2982         <rdar://problem/46823586>
2983
2984         Reviewed by Tim Horton.
2985
2986         Temporarily revert a behavior change introduced by r238661, where we now add "com.apple.webarchive" as a
2987         registered UTI when dragging or copying a text selection. This broke the Messages app on iOS, which currently
2988         inserts a copied or dragged text selection from WebKit-based views as a web archive file attachment. A fix for
2989         this is internally tracked in <rdar://problem/46830277>.
2990
2991         * platform/ios/PlatformPasteboardIOS.mm:
2992         (WebCore::PlatformPasteboard::write):
2993
2994 2018-12-18  Michael Catanzaro  <mcatanzaro@igalia.com>
2995
2996         Unreviewed, add a missing UNUSED_PARAM()
2997
2998         * Modules/mediarecorder/MediaRecorder.cpp:
2999         (WebCore::MediaRecorder::getPrivateImpl):
3000
3001 2018-12-18  Justin Michaud  <justin_michaud@apple.com>
3002
3003         Update CSS Properties and Values API to use new cycle fallback behaviour
3004         https://bugs.webkit.org/show_bug.cgi?id=192800
3005
3006         Reviewed by Antti Koivisto.
3007
3008         Make CSS variables that are registered and involved in a cycle be treated as invalid. This also fixes a crash in the
3009         wpt tests where relative units and calc() in a registered property's initial value would break things instead of failing. 
3010
3011         * css/CSSCustomPropertyValue.h:
3012         * css/CSSVariableReferenceValue.cpp:
3013         (WebCore::resolveVariableReference):
3014         * css/DOMCSSRegisterCustomProperty.cpp:
3015         (WebCore::DOMCSSRegisterCustomProperty::registerProperty):
3016         * css/StyleResolver.cpp:
3017         (WebCore::StyleResolver::applyCascadedCustomProperty):
3018         * css/parser/CSSPropertyParser.cpp:
3019         (WebCore::CSSPropertyParser::parseTypedCustomPropertyValue):
3020
3021 2018-12-18  Daniel Bates  <dabates@apple.com>
3022
3023         Wrong value for key property in keydown and keyup events generated holding Control key
3024         https://bugs.webkit.org/show_bug.cgi?id=192788
3025         <rdar://problem/46795214>
3026
3027         Reviewed by Wenson Hsieh.
3028
3029         Similar to what we do on Mac, compute the DOM key property from the characters ignoring
3030         modifier keys input string when the Control key is held down.
3031
3032         * platform/ios/PlatformEventFactoryIOS.mm:
3033         (WebCore::keyForKeyEvent):
3034         * platform/mac/PlatformEventFactoryMac.mm:
3035         (WebCore::keyForKeyEvent):
3036
3037 2018-12-18  Sihui Liu  <sihui_liu@apple.com>
3038
3039         Clean up IndexedDB files between tests
3040         https://bugs.webkit.org/show_bug.cgi?id=192796
3041
3042         Reviewed by Geoffrey Garen.
3043
3044         We should clean up the IndexedDB files between tests to make sure each test is independent of others.
3045
3046         This patch also fixes some issues in IDB.
3047
3048         Covered by existing tests.
3049
3050         * Modules/indexeddb/server/IDBServer.cpp:
3051         (WebCore::IDBServer::IDBServer::closeAndDeleteDatabasesModifiedSince):
3052         We should shut down all open databases instead of databases from open database connections before deleting 
3053         files, because database starts accessing files before connection to database is established.
3054
3055         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
3056         (WebCore::IDBServer::UniqueIDBDatabase::shutdownForClose):
3057         We should shutdown database after tasks in queue are completed, because tasks have pointer of UniqueIDBDatabase 
3058         and UniqueIDBDatabase can be destructed after shutdown.
3059
3060         (WebCore::IDBServer::UniqueIDBDatabase::didDeleteBackingStore):
3061         didDeleteBackingStore can be posted to main thread after immediateCloseForUserDelete, and timer should not be 
3062         invoked during the hard close.
3063
3064         (WebCore::IDBServer::UniqueIDBDatabase::handleDatabaseOperations):
3065         Tasks like didOpenBackingStore could be posted from database thread to main thread after 
3066         immediateCloseForUserDelete, but we know the backing store will be deleted soon, so no need to handle any 
3067         database operation. 
3068
3069         (WebCore::IDBServer::UniqueIDBDatabase::performPrefetchCursor):
3070         performPrefetchCursor needs to be aware of whether UniqueIDBDatabase is being closed, so that it will not access 
3071         m_backingStore when m_backingStore may already be deleted. 
3072
3073         (WebCore::IDBServer::UniqueIDBDatabase::immediateCloseForUserDelete):
3074         immediateCloseForUserDelete does not handle transactions that are in the process of commit or abort. 
3075         m_objectStoreTransactionCounts and m_objectStoreWriteTransactions may be used by those transactions in 
3076         transactionCompleted, so they do not need to be cleared here.
3077
3078 2018-12-18  Myles C. Maxfield  <mmaxfield@apple.com>
3079
3080         Thick overlines and line-throughs grow in the wrong direction
3081         https://bugs.webkit.org/show_bug.cgi?id=192264
3082
3083         Reviewed by Dean Jackson.
3084
3085         Overlines should grow upward, and line-throughs should stay centered.
3086
3087         Test: fast/css3-text/css3-text-decoration/text-decoration-thicknes-overline-grow-direction.html
3088
3089         * rendering/TextDecorationPainter.cpp:
3090         (WebCore::TextDecorationPainter::paintTextDecoration):
3091         * style/InlineTextBoxStyle.cpp:
3092         (WebCore::visualOverflowForDecorations):
3093
3094 2018-12-18  Ryosuke Niwa  <rniwa@webkit.org>
3095
3096         Some iOS app crash in FrameLoader::checkCompleted
3097         https://bugs.webkit.org/show_bug.cgi?id=192804
3098         <rdar://problem/44240573>
3099
3100         Reviewed by Tim Horton.
3101
3102         It's possible for the main thread to call into WebCore / UIWebView selectors while Web thread
3103         is trying to send a delegate message. Disable the release assertion while this is happening
3104         so that iOS app would not crash.
3105
3106         Unfortunately no new test as there is no way to easily test UIWebView in iOS,
3107         and this requires a race between the web thread & the main thread.
3108
3109         * dom/ScriptDisallowedScope.h:
3110         (WebCore::ScriptDisallowedScope::InMainThread::isScriptAllowed):
3111         * platform/ios/wak/WebCoreThread.h:
3112         * platform/ios/wak/WebCoreThread.mm:
3113         (WebThreadDelegateMessageScope::WebThreadDelegateMessageScope):
3114         (WebThreadDelegateMessageScope::~WebThreadDelegateMessageScope):
3115         (SendDelegateMessage):
3116
3117 2018-12-18  David Kilzer  <ddkilzer@apple.com>
3118
3119         clang-tidy: Use const reference for MediaTime parameter to prevent object copy
3120         <https://webkit.org/b/192814>
3121
3122         Reviewed by Mark Lam.
3123
3124         * bindings/js/JSDOMConvertNumbers.h:
3125         (WebCore::JSConverter<IDLUnrestrictedDouble>::convert):
3126
3127 2018-12-18  Justin Fan  <justin_fan@apple.com>
3128
3129         [WebGPU] BindGroupLayout and Device::createBindGroupLayout
3130         https://bugs.webkit.org/show_bug.cgi?id=192817
3131
3132         Reviewed by Dean Jackson.
3133
3134         Update bind-group-layouts to test new functionality.
3135
3136         Implement the emtpy WebGPUBindGroupLayout interface, and enable creation via WebGPUDevice::createBindGroupLayout:
3137         * Modules/webgpu/WebGPUBindGroupLayout.cpp: Added.
3138         (WebCore::WebGPUBindGroupLayout::create):
3139         (WebCore::WebGPUBindGroupLayout::WebGPUBindGroupLayout):
3140         * Modules/webgpu/WebGPUBindGroupLayout.h: Added.
3141         * Modules/webgpu/WebGPUBindGroupLayout.idl: Added. Empty interface for now.
3142         * Modules/webgpu/WebGPUDevice.cpp:
3143         (WebCore::WebGPUDevice::createBindGroupLayout const): Added.
3144         * Modules/webgpu/WebGPUDevice.h:
3145         * Modules/webgpu/WebGPUDevice.idl:
3146         * platform/graphics/gpu/GPUBindGroupLayout.cpp: Added.
3147         (WebCore::GPUBindGroupLayout::tryCreate):
3148         (WebCore::GPUBindGroupLayout::GPUBindGroupLayout):
3149         * platform/graphics/gpu/GPUBindGroupLayout.h: Added.
3150         * platform/graphics/gpu/GPUDevice.cpp:
3151         (WebCore::GPUDevice::tryCreateBindGroupLayout const): Added.
3152         * platform/graphics/gpu/GPUDevice.h:
3153
3154         Add files and symbols to project:
3155         * CMakeLists.txt:
3156         * DerivedSources.make:
3157         * Sources.txt:
3158         * WebCore.xcodeproj/project.pbxproj:
3159         * bindings/js/WebCoreBuiltinNames.h:
3160
3161         Missing includes that were previously provided via UnifiedSources:
3162         * platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.h:
3163         * platform/sql/SQLiteFileSystem.h:
3164
3165 2018-12-18  Youenn Fablet  <youenn@apple.com>
3166
3167         Make ReadableStreamXX constructs use PrivateIdentifier
3168         https://bugs.webkit.org/show_bug.cgi?id=192771
3169
3170         Reviewed by Chris Dumez.
3171
3172         PrivateIdentifier is a better name for making sure a given construct does not show up in the global scope.
3173         Covered by existing binding tests.
3174
3175         * Modules/streams/ReadableByteStreamController.idl:
3176         * Modules/streams/ReadableStreamBYOBReader.idl:
3177         * Modules/streams/ReadableStreamBYOBRequest.idl:
3178         * Modules/streams/ReadableStreamDefaultController.idl:
3179         * Modules/streams/ReadableStreamDefaultReader.idl:
3180         * bindings/scripts/CodeGeneratorJS.pm:
3181         (NeedsConstructorProperty):
3182         * bindings/scripts/preprocess-idls.pl:
3183         (shouldExposeInterface):
3184         * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp: Removed.
3185         * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.h: Removed.
3186         * bindings/scripts/test/TestCustomConstructor.idl: Removed.
3187
3188 2018-12-18  Zalan Bujtas  <zalan@apple.com>
3189
3190         Synchronous media query evaluation could destroy current Frame/FrameView.
3191         https://bugs.webkit.org/show_bug.cgi?id=192781
3192         <rdar://problem/34416793>
3193
3194         Reviewed by Chris Dumez.
3195
3196         Protect Frame and FrameView when coming back from printing and check if the current Frame/FrameView/FrameLoader objects are still valid.
3197
3198         Test: printing/print-with-media-query-destory.html
3199
3200         * loader/DocumentLoader.cpp:
3201         (WebCore::DocumentLoader::finishedLoading):
3202         * page/Frame.cpp:
3203         (WebCore::Frame::setPrinting):
3204         * page/FrameView.cpp:
3205         (WebCore::FrameView::forceLayoutForPagination):
3206
3207 2018-12-18  Joseph Pecoraro  <pecoraro@apple.com>
3208
3209         Web Inspector: m3u8 content not shown, it should be text
3210         https://bugs.webkit.org/show_bug.cgi?id=192731
3211         <rdar://problem/46747728>
3212
3213         Reviewed by Devin Rousso.
3214
3215         * inspector/NetworkResourcesData.cpp:
3216         (WebCore::NetworkResourcesData::setResourceContent):
3217         Don't clobber data if setting empty content on a resource that has content.
3218
3219         * inspector/agents/InspectorNetworkAgent.cpp:
3220         (WebCore::InspectorNetworkAgent::shouldTreatAsText):
3221         Additional non-"text/" mime types that can be treated as text.
3222
3223         * platform/MIMETypeRegistry.cpp:
3224         (WebCore::MIMETypeRegistry::isTextMediaPlaylistMIMEType):
3225         * platform/MIMETypeRegistry.h:
3226         Detect media playlist mime types that are text (m3u8/m3u).
3227
3228 2018-12-18  Daniel Bates  <dabates@apple.com>
3229
3230         Remove <meta http-equiv=set-cookie> support
3231         https://bugs.webkit.org/show_bug.cgi?id=185077
3232         <rdar://problem/41791397>
3233
3234         Reviewed by Brent Fulgham.
3235
3236         Remove support for the HTTP-equiv. pragma Set-Cookie to set a cookie. In <https://github.com/whatwg/html/pull/3649>
3237         the HTML living standard was ammended to define this pragma as no-op. Chrome and Edge have also
3238         removed support for this pragma and Firefox has an open bug to remove it.
3239
3240         * dom/Document.cpp:
3241         (WebCore::Document::processHttpEquiv): Emit a message that the Set-Cookie pragma is obsolete and
3242         was ignored instead of setting the cookie.
3243         * html/parser/XSSAuditor.cpp:
3244         (WebCore::isDangerousHTTPEquiv): We no longer need to consider the Set-Cookie pragma
3245         as dangerous and erase attribute http-equiv when we find it because we no longer honor
3246         this pragma.
3247
3248 2018-12-18  Justin Michaud  <justin_michaud@apple.com>
3249
3250         CSS Typed OM should expose attributeStyleMap
3251         https://bugs.webkit.org/show_bug.cgi?id=192671
3252
3253         Reviewed by Ryosuke Niwa.
3254
3255         Exposes element.attributeStyleMap, adds a stub for the StylePropertyMap class, and updates the existing
3256         TypedOMCSSImageValue to not require a RenderObject so that it can still work inside attributeStyleMap.
3257
3258         Test: css-typedom/attributeStyleMap.html
3259
3260         * CMakeLists.txt:
3261         * DerivedSources.make:
3262         * Sources.txt:
3263         * WebCore.xcodeproj/project.pbxproj:
3264         * bindings/js/WebCoreBuiltinNames.h:
3265         * css/ElementCSSInlineStyle.idl:
3266         * css/typedom/StylePropertyMap.h: Copied from Source/WebCore/css/typedom/StylePropertyMapReadOnly.h.
3267         * css/typedom/StylePropertyMap.idl: Copied from Source/WebCore/css/typedom/StylePropertyMapReadOnly.idl.
3268         * css/typedom/StylePropertyMapReadOnly.cpp: Added.
3269         (WebCore::StylePropertyMapReadOnly::reifyValue):
3270         (WebCore::StylePropertyMapReadOnly::customPropertyValueOrDefault):
3271         * css/typedom/StylePropertyMapReadOnly.h:
3272         (WebCore::StylePropertyMapReadOnly::create): Deleted.
3273         (WebCore::StylePropertyMapReadOnly::get const): Deleted.
3274         (WebCore::StylePropertyMapReadOnly::StylePropertyMapReadOnly): Deleted.
3275         * css/typedom/StylePropertyMapReadOnly.idl:
3276         * css/typedom/TypedOMCSSImageValue.h:
3277         * dom/Element.cpp:
3278         (WebCore::Element::attributeStyleMap):
3279         (WebCore::Element::setAttributeStyleMap):
3280         * dom/Element.h:
3281         * dom/ElementRareData.cpp:
3282         * dom/ElementRareData.h:
3283         (WebCore::ElementRareData::attributeStyleMap):
3284         (WebCore::ElementRareData::setAttributeStyleMap):
3285         * dom/StyledElement.cpp:
3286         (WebCore::StyledElement::ensureAttributeStyleMap):
3287         * dom/StyledElement.h:
3288         * html/canvas/CanvasRenderingContext2DBase.cpp:
3289         (WebCore::size):
3290         (WebCore::CanvasRenderingContext2DBase::drawImage):
3291         * platform/graphics/CustomPaintImage.cpp:
3292         (WebCore::extractComputedProperty):
3293         (WebCore::CustomPaintImage::doCustomPaint):
3294
3295 2018-12-18  Wenson Hsieh  <wenson_hsieh@apple.com>
3296
3297         Calling setValue() while typing should invoke -textDidChangeInTextField in the injected bundle
3298         https://bugs.webkit.org/show_bug.cgi?id=192785
3299         <rdar://problem/45321184>
3300
3301         Reviewed by Tim Horton.
3302
3303         Makes a minor adjustment in `TextFieldInputType::setValue` to consider value changes as "user editing", if we're
3304         currently processing a keystroke from the user. This is useful for certain private clients, such as Safari, that
3305         need to know when the user is typing in a text form control, but the page is preventing default text insertion
3306         behavior and instead updating values programmatically.
3307
3308         Test: fast/forms/call-text-did-change-in-text-field-when-typing.html
3309
3310         * html/TextFieldInputType.cpp:
3311         (WebCore::TextFieldInputType::setValue):
3312
3313 2018-12-18  Zalan Bujtas  <zalan@apple.com>
3314
3315         [LFC][BFC][MarginCollapsing] Implement marginBeforeCollapsesWithParentMarginAfter
3316         https://bugs.webkit.org/show_bug.cgi?id=192801
3317
3318         Reviewed by Antti Koivisto.
3319
3320         * layout/blockformatting/BlockFormattingContext.h:
3321         * layout/blockformatting/BlockFormattingContextGeometry.cpp:
3322         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedHeightAndMargin):
3323         * layout/blockformatting/BlockMarginCollapse.cpp:
3324         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginBeforeCollapsesWithParentMarginAfter):
3325
3326 2018-12-18  Zalan Bujtas  <zalan@apple.com>
3327
3328         [LFC][BFC][MarginCollapsing] Implement marginAfterCollapsesWithSiblingMarginBeforeWithClearance
3329         https://bugs.webkit.org/show_bug.cgi?id=192799
3330
3331         Reviewed by Antti Koivisto.
3332
3333         * layout/blockformatting/BlockFormattingContext.h:
3334         * layout/blockformatting/BlockMarginCollapse.cpp:
3335         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginAfterCollapsesWithSiblingMarginBeforeWithClearance):
3336         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginAfterCollapsesWithParentMarginAfter):
3337
3338 2018-12-18  Zalan Bujtas  <zalan@apple.com>
3339
3340         [LFC][BFC][MarginCollapsing] Implement marginAfterCollapsesWithParentMarginBefore
3341         https://bugs.webkit.org/show_bug.cgi?id=192798
3342
3343         Reviewed by Antti Koivisto.
3344
3345         * layout/blockformatting/BlockFormattingContext.h:
3346         * layout/blockformatting/BlockFormattingContextGeometry.cpp:
3347         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedHeightAndMargin):
3348         * layout/blockformatting/BlockMarginCollapse.cpp:
3349         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::collapsedMarginAfterFromLastChild):
3350         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginAfterCollapsesWithParentMarginBefore):
3351         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginAfterCollapsesWithParentMarginAfter):
3352         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginAfter):
3353
3354 2018-12-18  Zalan Bujtas  <zalan@apple.com>
3355
3356         [LFC][BFC][MarginCollapsing] Expand marginsCollapseThrough collapsing logic
3357         https://bugs.webkit.org/show_bug.cgi?id=192794
3358
3359         Reviewed by Antti Koivisto.
3360
3361         * layout/blockformatting/BlockFormattingContext.h:
3362         * layout/blockformatting/BlockMarginCollapse.cpp:
3363         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginsCollapseThrough):
3364         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginBefore):
3365         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginAfter):
3366
3367 2018-12-18  Zalan Bujtas  <zalan@apple.com>
3368
3369         [LFC][BFC][MarginCollapsing] Expand marginAfterCollapsesWithNextSibling and marginBeforeCollapsesWithPreviousSibling collapsing logic
3370         https://bugs.webkit.org/show_bug.cgi?id=192791
3371
3372         Reviewed by Antti Koivisto.
3373
3374         * layout/blockformatting/BlockMarginCollapse.cpp:
3375         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginBeforeCollapsesWithPreviousSibling):
3376         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginAfterCollapsesWithNextSibling):
3377
3378 2018-12-18  Zalan Bujtas  <zalan@apple.com>
3379
3380         [LFC][BFC][MarginCollapsing] Expand marginAfterCollapsesWithParentMarginAfter and marginBeforeCollapsesWithParentMarginBefore collapsing logic
3381         https://bugs.webkit.org/show_bug.cgi?id=192787
3382
3383         Reviewed by Antti Koivisto.
3384
3385         * layout/blockformatting/BlockFormattingContext.h:
3386         * layout/blockformatting/BlockMarginCollapse.cpp:
3387         (WebCore::Layout::hasClearance):
3388         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginBeforeCollapsesWithParentMarginBefore):
3389         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginAfterCollapsesWithSiblingMarginBeforeWithClearance):
3390         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginAfterCollapsesWithParentMarginBefore):
3391         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginAfterCollapsesWithParentMarginAfter):
3392
3393 2018-12-17  Fujii Hironori  <Hironori.Fujii@sony.com>
3394
3395         [Win][Clang] Fix compilation warnings WebCore/platform/graphics directory
3396         https://bugs.webkit.org/show_bug.cgi?id=192752
3397
3398         Reviewed by Don Olmstead.
3399
3400         No new tests, no behavior changes.
3401
3402         * platform/graphics/win/DIBPixelData.cpp:
3403         Enclosed bitmapType and bitmapPixelsPerMeter with #ifndef NDEBUG.
3404         * platform/graphics/win/FontPlatformDataWin.cpp:
3405         (WebCore::FontPlatformData::openTypeTable const): Use ASSERT_UNUSED instead of ASSERT.
3406         * platform/graphics/win/GraphicsContextWin.cpp: Removed unused variable 'deg2rad'.
3407         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
3408         Removed unused soft links MFCreateSampleGrabberSinkActivate, MFCreateMemoryBuffer and MFCreateSample.
3409         (WebCore::MediaPlayerPrivateMediaFoundation::MediaPlayerPrivateMediaFoundation):
3410         Reorder the initializer list.
3411         (WebCore::MediaPlayerPrivateMediaFoundation::seek): Use ASSERT_UNUSED instead of ASSERT.
3412         (WebCore::MediaPlayerPrivateMediaFoundation::setAllChannelVolumes): Ditto.
3413         (WebCore::MediaPlayerPrivateMediaFoundation::createSession): Ditto.
3414         (WebCore::MediaPlayerPrivateMediaFoundation::endSession): Ditto.
3415         (WebCore::MediaPlayerPrivateMediaFoundation::onCreatedMediaSource): Ditto.
3416         (WebCore::MediaPlayerPrivateMediaFoundation::Direct3DPresenter::paintCurrentFrame): Added default case.
3417         * platform/graphics/win/SimpleFontDataCairoWin.cpp:
3418         (WebCore::Font::platformBoundsForGlyph const): Use inner braces to initialize subobjects of MAT2.
3419         * platform/graphics/win/SimpleFontDataWin.cpp: Removed unused 'cSmallCapsFontSizeMultiplier'.
3420         (WebCore::Font::initGDIFont): Use inner braces to initialize subobjects of MAT2.
3421         (WebCore::Font::boundsForGDIGlyph const): Ditto.
3422         (WebCore::Font::widthForGDIGlyph const): Ditto.
3423         * platform/graphics/win/UniscribeController.cpp:
3424         (WebCore::UniscribeController::UniscribeController):
3425         Reorder the initializer list.
3426         (WebCore::UniscribeController::offsetForPosition): Use parentheses to combine && and ||.
3427         (WebCore::UniscribeController::shapeAndPlaceItem): Removed unused 'glyphCount'.
3428
3429 2018-12-17  Eric Carlson  <eric.carlson@apple.com>
3430
3431         [MediaStream] A stream's first video frame should be rendered
3432         https://bugs.webkit.org/show_bug.cgi?id=192629
3433         <rdar://problem/46664353>
3434
3435         Reviewed by Youenn Fablet.
3436
3437         Test: fast/mediastream/media-stream-renders-first-frame.html
3438
3439         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h:
3440         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
3441         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::enqueueVideoSample):
3442         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::ensureLayers):
3443         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::currentDisplayMode const):
3444         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::updateDisplayMode):
3445         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::play):
3446         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::currentReadyState):
3447         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::characteristicsChanged):
3448         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::checkSelectedVideoTrack):
3449         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::paintCurrentFrameInContext):
3450         * platform/mediastream/RealtimeMediaSource.cpp:
3451         (WebCore::RealtimeMediaSource::size const):
3452         * platform/mediastream/mac/AVVideoCaptureSource.mm:
3453         (WebCore::AVVideoCaptureSource::processNewFrame):
3454         * platform/mediastream/mac/RealtimeIncomingVideoSourceCocoa.mm:
3455         (WebCore::RealtimeIncomingVideoSourceCocoa::processNewSample):
3456
3457 2018-12-17  Justin Michaud  <justin_michaud@apple.com>
3458
3459         Bindings generator should support Conditional= along with CachedAttribute
3460         https://bugs.webkit.org/show_bug.cgi?id=192721
3461
3462         Reviewed by Ryosuke Niwa.
3463
3464         Fix a bug where specifying both attributes causes compilation errors because the compile-time
3465         condition is not included in the derived code.
3466
3467         * bindings/scripts/CodeGeneratorJS.pm:
3468         (GenerateImplementation):
3469         * bindings/scripts/test/JS/JSTestObj.cpp:
3470         (WebCore::jsTestObjCachedAttribute3Getter):
3471         (WebCore::jsTestObjCachedAttribute3):
3472         (WebCore::JSTestObj::visitChildren):
3473         * bindings/scripts/test/JS/JSTestObj.h:
3474         * bindings/scripts/test/TestObj.idl:
3475
3476 2018-12-17  David Kilzer  <ddkilzer@apple.com>
3477
3478         clang-tidy: Fix unnecessary object copy in CPUMonitor::setCPULimit()
3479         <https://webkit.org/b/192707>
3480         <rdar://problem/46734926>
3481
3482         Reviewed by Daniel Bates.
3483
3484         * platform/CPUMonitor.cpp:
3485         (WebCore::CPUMonitor::setCPULimit):
3486         * platform/CPUMonitor.h:
3487         (WebCore::CPUMonitor::setCPULimit):
3488         - Change parameter to const reference to fix unnecessary copies.
3489
3490 2018-12-17  Ryosuke Niwa  <rniwa@webkit.org>
3491
3492         offsetLeft and offsetParent should adjust across shadow boundaries
3493         https://bugs.webkit.org/show_bug.cgi?id=157437
3494         <rdar://problem/26154021>
3495
3496         Reviewed by Simon Fraser.
3497
3498         Update the WebKit's treatment of shadow boundaries in offsetLeft, offsetTop, and offsetParent to match
3499         the latest discussion in CSS WG. See https://github.com/w3c/webcomponents/issues/497
3500         and https://github.com/w3c/webcomponents/issues/763
3501
3502         The latest consensus is to use the retargeting algorithm (https://dom.spec.whatwg.org/#retarget).
3503         In practice, this would mean that we need to keep walking up the offset parent ancestors until we find
3504         the one which is in the same tree as a shadow-inclusive ancestor of the context object.
3505
3506         For example, if a node (the context object of offsetTop, offsetLeft, offsetParent) was assigned to a slot
3507         inside a shadow tree and its offset parent was in the shadow tree, we need to walk up to its offset parent,
3508         then its offset parent, etc... until we find the offset parent in the same tree as the context object.
3509
3510         Note it's possible that the context object is inside a shadow tree which does not have its own offset parent.
3511         (e.g. all elements have position: static) For this reason, we need to consider not just offset parent in
3512         the same tree as the context object but as well as any offset parent which is in its ancestor trees.
3513
3514         Test: fast/shadow-dom/offsetParent-across-shadow-boundaries.html
3515
3516         * dom/Element.cpp:
3517         (WebCore::adjustOffsetForZoomAndSubpixelLayout): Extracted to share code between offsetLeft and offsetTop.
3518         (WebCore::collectAncestorTreeScopeAsHashSet): Added.
3519         (WebCore::Element::offsetLeftForBindings): Added. Sums up offsetLeft's until it finds the first offset parent
3520         which is a shadow-including ancestor (https://dom.spec.whatwg.org/#concept-shadow-including-ancestor).
3521         (WebCore::Element::offsetLeft): Now uses adjustOffsetForZoomAndSubpixelLayout.
3522         (WebCore::Element::offsetTopForBindings): Added. Like offsetLeftForBindings, this function sums up offsetTop's
3523         until it finds the first offset parent which is a shadow-including ancestor.
3524         (WebCore::Element::offsetTop): Now uses adjustOffsetForZoomAndSubpixelLayout.
3525         (WebCore::Element::offsetParentForBindings): Renamed from bindingsOffsetParent to be consistent with other
3526         functions meant to be used for bindings code.
3527         * dom/Element.h:
3528         * html/HTMLElement.idl:
3529
3530 2018-12-17  Simon Fraser  <simon.fraser@apple.com>
3531
3532         Don't use more expensive layer backing store formats when subpixel text antialiasing is not enabled
3533         https://bugs.webkit.org/show_bug.cgi?id=192780
3534         rdar://problem/43394387
3535
3536         Reviewed by Tim Horton.
3537         
3538         macOS Mojave disabled text subpixel antialiasing by default, so we no longer need to use the
3539         memory-hungry "linear glyph mask" CALayer backing store formats for non-opaque with text in them.
3540         
3541         Add FontCascade::isSubpixelAntialiasingAvailable() which reports whether subpixel antialiasing is available,
3542         and consult it when making decisions that affect layer backing store format.
3543
3544         Tested by new results for existing tests.
3545
3546         * platform/graphics/FontCascade.cpp:
3547         (WebCore::FontCascade::isSubpixelAntialiasingAvailable):
3548         * platform/graphics/FontCascade.h:
3549         * platform/graphics/cocoa/FontCascadeCocoa.mm:
3550         (WebCore::FontCascade::isSubpixelAntialiasingAvailable): CGFontRenderingGetFontSmoothingDisabled() isn't super cheap, so fetch
3551         it once.
3552         * rendering/RenderLayerBacking.cpp:
3553         (WebCore::RenderLayerBacking::updateAfterDescendants):
3554         * testing/Internals.cpp:
3555         (WebCore::Internals::setFontSmoothingEnabled): Remove a WebCore::
3556
3557 2018-12-17  Daniel Bates  <dabates@apple.com>
3558
3559         Make DocumentMarker::allMarkers() constexpr
3560         https://bugs.webkit.org/show_bug.cgi?id=192634
3561
3562         Reviewed by Simon Fraser.
3563
3564         The result of DocumentMarker::allMarkers() can be computed at compile time. We should annotate
3565         it constexpr to do just that.
3566
3567         * dom/DocumentMarker.h:
3568         (WebCore::DocumentMarker::allMarkers):
3569
3570 2018-12-17  Justin Fan  <justin_fan@apple.com>
3571
3572         [WebGPU] Implement WebGPUBindGroupLayoutDescriptor and its supporting dictionaries
3573         https://bugs.webkit.org/show_bug.cgi?id=192726
3574
3575         Reviewed by Myles C. Maxfield.
3576
3577         Test: webgpu/bind-group-layouts.html
3578         Implement the WebGPUBindGroupLayoutDescriptor struct and its sub-structs:
3579         * Modules/streams/WebGPUBindGroupLayoutDescriptor.h: Added.
3580         * Modules/streams/WebGPUBindGroupLayoutDescriptor.idl: Added.
3581         * Modules/webgpu/WebGPUBindGroupLayoutBinding.h: Added.
3582         * Modules/webgpu/WebGPUBindGroupLayoutBinding.idl: Added.
3583         * Modules/webgpu/WebGPUShaderStageBit.h: Added.
3584         * Modules/webgpu/WebGPUShaderStageBit.idl: Added.
3585         * platform/graphics/gpu/GPUBindGroupLayoutBinding.h: Added.
3586         * platform/graphics/gpu/GPUBindGroupLayoutDescriptor.h: Added.
3587
3588         Add the new symbols and files to the project:
3589         * CMakeLists.txt:
3590         * DerivedSources.make:
3591         * Sources.txt:
3592         * WebCore.xcodeproj/project.pbxproj:
3593         * bindings/js/WebCoreBuiltinNames.h:
3594
3595         Small FIXME update for later:
3596         * platform/graphics/gpu/cocoa/GPURenderPassEncoderMetal.mm:
3597         (WebCore::GPURenderPassEncoder::setVertexBuffers):
3598
3599 2018-12-17  Zalan Bujtas  <zalan@apple.com>
3600
3601         Unreviewed build fix.
3602
3603         * page/ios/FrameIOS.mm:
3604         (WebCore::Frame::interpretationsForCurrentRoot const):
3605
3606 2018-12-17  Zalan Bujtas  <zalan@apple.com>
3607
3608         Reproducible ASSERTion failure when toggling layer borders with find-in-page up
3609         https://bugs.webkit.org/show_bug.cgi?id=192762
3610         <rdar://problem/46676873>
3611
3612         Reviewed by Simon Fraser.
3613
3614         DocumentMarkerController::markersFor() should take a reference instead of a Node*.
3615
3616         Test: editing/document-marker-null-check.html
3617
3618         * dom/DocumentMarkerController.cpp:
3619         (DocumentMarkerController::hasMarkers):
3620         * dom/DocumentMarkerController.h:
3621         * editing/AlternativeTextController.cpp:
3622         (WebCore::AlternativeTextController::respondToChangedSelection):
3623         * editing/Editor.cpp:
3624         (WebCore::Editor::selectionStartHasMarkerFor const):
3625         * rendering/InlineTextBox.cpp:
3626         (WebCore::InlineTextBox::collectMarkedTextsForDocumentMarkers const):
3627         * rendering/RenderReplaced.cpp:
3628         (WebCore::RenderReplaced::paint):
3629         * rendering/RenderText.cpp:
3630         (WebCore::RenderText::draggedContentRangesBetweenOffsets const):
3631         * rendering/SimpleLineLayout.cpp:
3632         (WebCore::SimpleLineLayout::canUseForWithReason):
3633         * testing/Internals.cpp:
3634         (WebCore::Internals::markerCountForNode):
3635
3636 2018-12-17  Commit Queue  <commit-queue@webkit.org>
3637
3638         Unreviewed, rolling out r239265 and r239274.
3639         https://bugs.webkit.org/show_bug.cgi?id=192765
3640
3641         unorm_normalize is deprecated, and broke an internal build
3642         (Requested by Truitt on #webkit).
3643
3644         Reverted changesets:
3645
3646         "[GTK][WPE] Need a function to convert internal URI to display
3647         ("pretty") URI"
3648         https://bugs.webkit.org/show_bug.cgi?id=174816
3649         https://trac.webkit.org/changeset/239265
3650
3651         "Fix the Apple Internal Mac build with a newer SDK"
3652         https://trac.webkit.org/changeset/239274
3653
3654 2018-12-17  Daniel Bates  <dabates@apple.com>
3655
3656         [iOS] Remove -[WebEvent initWithKeyEventType:...:characterSet:]
3657         https://bugs.webkit.org/show_bug.cgi?id=192633
3658
3659         Reviewed by Wenson Hsieh.
3660
3661         UIKit has long adopted the newer -[WebEvent initWithKeyEventType:] initializer that takes an
3662         input manager hint. We no longer need to keep the variant -[WebEvent initWithKeyEventType:...:characterSet:]
3663         for binary compatibility.
3664
3665         * platform/ios/WebEvent.h:
3666         * platform/ios/WebEvent.mm:
3667         (-[WebEvent initWithKeyEventType:timeStamp:characters:charactersIgnoringModifiers:modifiers:isRepeating:withFlags:keyCode:isTabKey:characterSet:]): Deleted.
3668
3669 2018-12-17  Matt Lewis  <jlewis3@apple.com>
3670
3671         Unreviewed, rolling out r239254.
3672
3673         This broke the Windows 10 Debug build
3674
3675         Reverted changeset:
3676
3677         "Replace many uses of String::format with more type-safe
3678         alternatives"
3679         https://bugs.webkit.org/show_bug.cgi?id=192742
3680         https://trac.webkit.org/changeset/239254
3681
3682 2018-12-17  Antoine Quint  <graouts@apple.com>
3683
3684         [Web Animations] Remove the redundant m_scheduledMicrotask from WebAnimation
3685         https://bugs.webkit.org/show_bug.cgi?id=192758
3686
3687         Reviewed by Dean Jackson.
3688
3689         We tracked whether we had a pending microtask twice so we remove the m_scheduledMicrotask flag as m_finishNotificationStepsMicrotaskPending
3690         gives us enough information as it is. Additionally, we remove the scheduleMicrotaskIfNeeded() and performMicrotask() functions since there is
3691         less bookkeeping to perform.
3692
3693         No new test since there is no user-observable change.
3694
3695         * animation/WebAnimation.cpp:
3696         (WebCore::WebAnimation::updateFinishedState):
3697         (WebCore::WebAnimation::scheduleMicrotaskIfNeeded): Deleted.
3698         (WebCore::WebAnimation::performMicrotask): Deleted.
3699         * animation/WebAnimation.h:
3700
3701 2018-12-17  Antoine Quint  <graouts@apple.com>
3702
3703         [Web Animations] Ensure we don't update an animation's finished state twice when updating animations
3704         https://bugs.webkit.org/show_bug.cgi?id=192757
3705
3706         Reviewed by Dean Jackson.
3707
3708         When animations are udpated and DocumentTimeline::updateAnimationsAndSendEvents() is called, we used to update an animation's finished state
3709         twice since we'd do it once when calling tick() and once again when calling resolve() in the ensuing style invalidation. We now keep track of
3710         whether we've already updated an animation's finished state during animation update in the call to tick() and avoid updating in the immediate
3711         next call to resolve(), unless any of the timing properties have changed in the meantime.
3712
3713         No new test since there is no user-observable change.
3714
3715         * animation/WebAnimation.cpp:
3716         (WebCore::WebAnimation::timingDidChange):
3717         (WebCore::WebAnimation::tick):
3718         (WebCore::WebAnimation::resolve):
3719         * animation/WebAnimation.h:
3720
3721 2018-12-17  Simon Fraser  <simon.fraser@apple.com>
3722
3723         REGRESSION (r233268): Elements animated in from offscreen sometimes don't display
3724         https://bugs.webkit.org/show_bug.cgi?id=192725
3725         rdar://problem/46011418
3726
3727         Reviewed by Antoine Quint.
3728
3729         There were two problems with backing store attachment and animation.
3730         
3731         First, animations are an input into the "backing store attached" logic, so when they change
3732         we should set the CoverageRectChanged bit on GraphicsLayerCA.
3733         
3734         Secondly, when an ancestor has unknown animation extent, all its descendants need to
3735         get backing store, so we need to set childCommitState.ancestorWithTransformAnimationIntersectsCoverageRect when
3736         the current layer has no animation extent.
3737
3738         Tests: compositing/backing/animate-into-view-with-descendant.html
3739                compositing/backing/animate-into-view.html
3740
3741         * platform/graphics/ca/GraphicsLayerCA.cpp:
3742         (WebCore::GraphicsLayerCA::addAnimation):
3743         (WebCore::GraphicsLayerCA::removeAnimation):
3744         (WebCore::GraphicsLayerCA::recursiveCommitChanges):
3745
3746 2018-12-17  Zalan Bujtas  <zalan@apple.com>
3747
3748         [LFC][BFC][MarginCollapsing] Unify margin collapse function naming
3749         https://bugs.webkit.org/show_bug.cgi?id=192747
3750
3751         Reviewed by Antti Koivisto.
3752
3753         Rename some margin collapse getters.
3754
3755         * layout/blockformatting/BlockFormattingContext.h:
3756         * layout/blockformatting/BlockFormattingContextGeometry.cpp:
3757         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedHeightAndMargin):
3758         * layout/blockformatting/BlockMarginCollapse.cpp:
3759         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::computedNonCollapsedMarginBefore):
3760         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::computedNonCollapsedMarginAfter):
3761         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::nonCollapsedMarginBefore):
3762         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::nonCollapsedMarginAfter):
3763         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::collapsedMarginBeforeFromFirstChild):
3764         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::collapsedMarginAfterFromLastChild):
3765         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginBeforeCollapsesWithParentMarginAfter):
3766         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginBeforeCollapsesWithParentMarginBefore):
3767         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginAfterCollapsesWithParentMarginAfter):
3768         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginBeforeCollapsesWithPreviousSibling):
3769         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginAfterCollapsesWithNextSibling):
3770         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginsCollapseThrough):
3771         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginBefore):
3772         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginAfter):
3773         (WebCore::Layout::isMarginBeforeCollapsedWithSibling): Deleted.
3774         (WebCore::Layout::isMarginAfterCollapsedWithSibling): Deleted.
3775         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::isMarginBeforeCollapsedWithParent): Deleted.
3776         (WebCore::Layout::isMarginAfterCollapsedThrough): Deleted.
3777         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::isMarginAfterCollapsedWithParent): Deleted.
3778         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::isMarginBeforeCollapsedWithParentMarginAfter): Deleted.
3779
3780 2018-12-17  David Kilzer  <ddkilzer@apple.com>
3781
3782         clang-tidy: loop variable is copied but only used as const reference in WebCore, WebKit, Tools
3783         <https://webkit.org/b/192751>
3784         <rdar://problem/46771623>
3785
3786         Reviewed by Daniel Bates.
3787
3788         Change loop variables to const references to avoid unnecessary
3789         copies.
3790
3791         * Modules/indexeddb/server/MemoryBackingStoreTransaction.cpp:
3792         (WebCore::IDBServer::MemoryBackingStoreTransaction::abort):
3793         * Modules/indexeddb/server/MemoryObjectStore.cpp:
3794         (WebCore::IDBServer::MemoryObjectStore::populateIndexWithExistingRecords):
3795         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
3796         (WebCore::IDBServer::UniqueIDBDatabase::maybeNotifyConnectionsOfVersionChange):
3797         * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp:
3798         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::objectStoreIdentifiers):
3799         * Modules/indexeddb/shared/IDBDatabaseInfo.cpp:
3800         (WebCore::IDBDatabaseInfo::IDBDatabaseInfo):
3801         (WebCore::IDBDatabaseInfo::loggingString const):
3802         * Modules/mediasource/SourceBuffer.cpp:
3803         (WebCore::removeSamplesFromTrackBuffer):
3804         * accessibility/AccessibilityRenderObject.cpp:
3805         (WebCore::AccessibilityRenderObject::targetElementForActiveDescendant const):
3806         * accessibility/AccessibilityTableRow.cpp:
3807         (WebCore::AccessibilityTableRow::headerObject):
3808         * animation/KeyframeEffect.cpp:
3809         (WebCore::KeyframeEffect::computedNeedsForcedLayout):
3810         * crypto/keys/CryptoKeyRSA.cpp:
3811         (WebCore::CryptoKeyRSA::importJwk):
3812         (WebCore::CryptoKeyRSA::exportJwk const):
3813         * css/CSSComputedStyleDeclaration.cpp:
3814         (WebCore::OrderedNamedLinesCollector::appendLines const):
3815         * dom/DataTransfer.cpp:
3816         (WebCore::readURLsFromPasteboardAsString):
3817         * dom/TreeScope.cpp:
3818         (WebCore::TreeScope::elementsFromPoint):
3819         * html/track/WebVTTParser.cpp:
3820         (WebCore::WebVTTParser::checkAndStoreRegion):
3821         * inspector/agents/InspectorTimelineAgent.cpp:
3822         (WebCore::InspectorTimelineAgent::setInstruments):
3823         * page/Page.cpp:
3824         (WebCore::Page::updateIntersectionObservations):
3825         * page/TextIndicator.cpp:
3826         (WebCore::estimatedBackgroundColorForRange):
3827         * page/animation/KeyframeAnimation.cpp:
3828         (WebCore::KeyframeAnimation::computeLayoutDependency):
3829         * platform/graphics/DisplayRefreshMonitorManager.cpp:
3830         (WebCore::DisplayRefreshMonitorManager::displayWasUpdated):
3831         * platform/graphics/ca/GraphicsLayerCA.cpp:
3832         (WebCore::GraphicsLayerCA::moveOrCopyAnimations):
3833         (WebCore::GraphicsLayerCA::updateAnimations):
3834         (WebCore::GraphicsLayerCA::isRunningTransformAnimation const):
3835         * platform/graphics/mac/ImageMac.mm:
3836         (WebCore::BitmapImage::tiffRepresentation):
3837         * rendering/HitTestResult.cpp:
3838         (WebCore::HitTestResult::append):
3839         * testing/Internals.cpp:
3840         (WebCore::Internals::acceleratedAnimationsForElement):
3841
3842 2018-12-17  Ms2ger  <Ms2ger@igalia.com>
3843
3844         [GTK][WPE] Need a function to convert internal URI to display ("pretty") URI
3845         https://bugs.webkit.org/show_bug.cgi?id=174816
3846
3847         Reviewed by Michael Catanzaro.
3848
3849         Tests: enabled fast/url/user-visible/.
3850
3851         * testing/Internals.cpp:
3852         (WebCore::Internals::userVisibleString): Enable method on all platforms.
3853
3854 2018-12-15  Yusuke Suzuki  <yusukesuzuki@slowstart.org>
3855
3856         Null pointer dereference in JSC::WriteBarrierBase()
3857         https://bugs.webkit.org/show_bug.cgi?id=191252
3858
3859         Reviewed by Keith Miller.
3860
3861         * bindings/js/JSCustomElementRegistryCustom.cpp:
3862         (WebCore::JSCustomElementRegistry::whenDefined):
3863         * bindings/js/JSDOMPromiseDeferred.cpp:
3864         (WebCore::createDeferredPromise):
3865         * bindings/js/JSDOMPromiseDeferred.h:
3866         (WebCore::DeferredPromise::create):
3867         (WebCore::callPromiseFunction):
3868         * bindings/js/JSDOMWindowBase.cpp:
3869         (WebCore::JSDOMWindowBase::moduleLoaderFetch):
3870         (WebCore::JSDOMWindowBase::moduleLoaderImportModule):
3871         * bindings/js/ScriptModuleLoader.cpp:
3872         (WebCore::ScriptModuleLoader::fetch):
3873         (WebCore::rejectPromise):
3874
3875 2018-12-15  Darin Adler  <darin@apple.com>
3876
3877         Use warning-ignoring macros more consistently and simply
3878         https://bugs.webkit.org/show_bug.cgi?id=192743
3879
3880         Reviewed by Mark Lam.
3881
3882         * bridge/objc/WebScriptObject.mm: Use IGNORE_WARNINGS_BEGIN rather than
3883         IGNORE_CLANG_WARNINGS_BEGIN here. There is no need to compile Objective-C++
3884         files like this one with non-clang compilers, and no need to worry about
3885         them when choosing the macro.
3886
3887         * crypto/mac/CryptoKeyRSAMac.cpp:
3888         (WebCore::getPublicKeyComponents): Use ALLOW_DEPRECATED_DECLARATIONS_BEGIN/END.
3889
3890         * css/makeprop.pl: Use IGNORE_WARNINGS_BEGIN/END, obviating the need for
3891         the "unknown-pragmas" trick, which the macro should take care of.
3892         * css/makevalues.pl: Ditto.
3893         * platform/ColorData.gperf: Ditto.
3894
3895         * platform/graphics/avfoundation/objc/CDMSessionAVStreamSession.mm:
3896         (WebCore::CDMSessionAVStreamSession::update): Use IGNORE_WARNINGS_BEGIN/END
3897         (see rationale above for Objective-C++).
3898
3899         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
3900         (WebCore::MediaPlayerPrivateAVFoundationObjC::videoPlaybackQualityMetrics): Use
3901         ALLOW_NEW_API_WITHOUT_GUARDS_BEGIN/END.
3902         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
3903         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::videoPlaybackQualityMetrics): Ditto.
3904
3905         * platform/ios/DragImageIOS.mm: Use IGNORE_WARNINGS_BEGIN/END
3906         (see rationale above for Objective-C++).
3907
3908         * platform/ios/VideoFullscreenInterfaceAVKit.mm:
3909         (-[WebAVPlayerViewController setWebKitOverrideRouteSharingPolicy:routingContextUID:]):
3910         Use ALLOW_NEW_API_WITHOUT_GUARDS_BEGIN/END.
3911
3912         * platform/mac/WebPlaybackControlsManager.mm: Use IGNORE_WARNINGS_BEGIN/END
3913         (see rationale above for Objective-C++).
3914
3915         * platform/network/cocoa/ResourceResponseCocoa.mm:
3916         (WebCore::ResourceResponse::platformCertificateInfo const): Use
3917         ALLOW_DEPRECATED_DECLARATIONS_BEGIN/END.
3918
3919 2018-12-15  Darin Adler  <darin@apple.com>
3920
3921         Replace many uses of String::format with more type-safe alternatives
3922         https://bugs.webkit.org/show_bug.cgi?id=192742
3923
3924         Reviewed by Mark Lam.
3925
3926         A while back, String::format was more efficient than string concatenation,
3927         but that is no longer true, and we should prefer String::number, makeString,
3928         or concatenation with the "+" operator to String::format for new code.
3929
3930         This is not as good for programmers who are fond of printf formatting
3931         style, and in some cases it's a little harder to read the strings
3932         interspersed with variables rather than a format string, but it's better
3933         in a few ways:
3934
3935         - more efficient (I didn't measure the difference, but it's definitely
3936           slower to use String::Format which calls vsnprintf twice than to use
3937           the WTF code)
3938         - works in a type-safe way without a need to use a format specifier such
3939           as "%" PRIu64 or "%tu" making it much easier to avoid problems due to
3940           subtle differences between platforms
3941         - allows us to use StringView in some cases to sidestep the need to
3942           allocate temporary WTF::String objects
3943         - does not require converting each WTF::String to a C string, allowing
3944           us to remove many cases of ".utf8().data()" and similar expressions,
3945           eliminating the allocation of temporary WTF::CString objects
3946
3947         This patch covers a batch of easiest-to-convert call sites.
3948         Later patches will allow us to deprecate or remove String::format.
3949
3950         * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
3951         (WebCore::IDBServer::SQLiteIDBBackingStore::addRecord): Use makeString.
3952         * Modules/indexeddb/shared/IDBCursorInfo.cpp:
3953         (WebCore::IDBCursorInfo::loggingString const): Ditto.
3954         * Modules/indexeddb/shared/IDBGetAllRecordsData.cpp:
3955         (WebCore::IDBGetAllRecordsData::loggingString const): Ditto.
3956         * Modules/indexeddb/shared/IDBGetRecordData.cpp:
3957         (WebCore::IDBGetRecordData::loggingString const): Ditto.
3958         * Modules/indexeddb/shared/IDBIndexInfo.cpp:
3959         (WebCore::IDBIndexInfo::loggingString const): Ditto.
3960         (WebCore::IDBIndexInfo::condensedLoggingString const): Ditto.
3961         * Modules/indexeddb/shared/IDBIterateCursorData.cpp:
3962         (WebCore::IDBIterateCursorData::loggingString const): Ditto.
3963         * Modules/indexeddb/shared/IDBObjectStoreInfo.cpp:
3964         (WebCore::IDBObjectStoreInfo::condensedLoggingString const): Ditto.
3965         * Modules/indexeddb/shared/IDBResourceIdentifier.cpp:
3966         (WebCore::IDBResourceIdentifier::loggingString const): Ditto.
3967         * Modules/webdatabase/Database.cpp:
3968         (WebCore::formatErrorMessage): Ditto.
3969         * Modules/webdatabase/SQLError.h:
3970         (WebCore::SQLError::create): Ditto.
3971
3972         * bindings/scripts/CodeGeneratorJS.pm:
3973         (GenerateImplementation): Use makeString.
3974
3975         * bindings/scripts/test/JS/JSInterfaceName.cpp:
3976         * bindings/scripts/test/JS/JSMapLike.cpp:
3977         * bindings/scripts/test/JS/JSReadOnlyMapLike.cpp:
3978         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
3979         * bindings/scripts/test/JS/JSTestCEReactions.cpp:
3980         * bindings/scripts/test/JS/JSTestCEReactionsStringifier.cpp:
3981         * bindings/scripts/test/JS/JSTestCallTracer.cpp:
3982         * bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp:
3983         * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp:
3984         * bindings/scripts/test/JS/JSTestDOMJIT.cpp:
3985         * bindings/scripts/test/JS/JSTestEnabledBySetting.cpp:
3986         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
3987         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
3988         * bindings/scripts/test/JS/JSTestException.cpp:
3989         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
3990         * bindings/scripts/test/JS/JSTestGlobalObject.cpp:
3991         * bindings/scripts/test/JS/JSTestIndexedSetterNoIdentifier.cpp:
3992         * bindings/scripts/test/JS/JSTestIndexedSetterThrowingException.cpp:
3993         * bindings/scripts/test/JS/JSTestIndexedSetterWithIdentifier.cpp:
3994         * bindings/scripts/test/JS/JSTestInterface.cpp:
3995         * bindings/scripts/test/JS/JSTestInterfaceLeadingUnderscore.cpp:
3996         * bindings/scripts/test/JS/JSTestIterable.cpp:
3997         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
3998         * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterNoIdentifier.cpp:
3999         * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterThrowingException.cpp:
4000         * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterWithIdentifier.cpp:
4001         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
4002         * bindings/scripts/test/JS/JSTestNamedDeleterNoIdentifier.cpp:
4003         * bindings/scripts/test/JS/JSTestNamedDeleterThrowingException.cpp:
4004         * bindings/scripts/test/JS/JSTestNamedDeleterWithIdentifier.cpp:
4005         * bindings/scripts/test/JS/JSTestNamedDeleterWithIndexedGetter.cpp:
4006         * bindings/scripts/test/JS/JSTestNamedGetterCallWith.cpp:
4007         * bindings/scripts