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