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