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