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