f2211112d2aa88133e17ea2753d345a295fcadf6
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2018-10-19  Zalan Bujtas  <zalan@apple.com>
2
3         [LFC][IFC] Add inline runs to showLayoutTree
4         https://bugs.webkit.org/show_bug.cgi?id=190718
5
6         Reviewed by Antti Koivisto.
7
8         * layout/layouttree/LayoutTreeBuilder.cpp:
9         (WebCore::Layout::outputInlineRuns):
10         (WebCore::Layout::outputLayoutBox):
11         (WebCore::Layout::outputLayoutTree):
12
13 2018-10-19  Zalan Bujtas  <zalan@apple.com>
14
15         [LFC][IFC] Remove the previous version of inline content handling.
16         https://bugs.webkit.org/show_bug.cgi?id=190716
17
18         Reviewed by Antti Koivisto.
19
20         * Sources.txt:
21         * WebCore.xcodeproj/project.pbxproj:
22         * layout/Verification.cpp:
23         (WebCore::Layout::areEssentiallyEqual):
24         (WebCore::Layout::outputMismatchingSimpleLineInformationIfNeeded):
25         (WebCore::Layout::outputMismatchingComplexLineInformationIfNeeded):
26         * layout/inlineformatting/InlineFormattingState.h:
27         (WebCore::Layout::InlineFormattingState::inlineContent):
28         (WebCore::Layout::InlineFormattingState::addLayoutRuns): Deleted.
29         (WebCore::Layout::InlineFormattingState::layoutRuns const): Deleted.
30         * layout/inlineformatting/text/TextUtil.cpp: Renamed from Source/WebCore/layout/inlineformatting/textlayout/TextUtil.cpp.
31         (WebCore::Layout::TextUtil::TextUtil):
32         (WebCore::Layout::TextUtil::width const):
33         (WebCore::Layout::TextUtil::hyphenPositionBefore const):
34         (WebCore::Layout::TextUtil::textWidth const):
35         (WebCore::Layout::TextUtil::fixedPitchWidth const):
36         * layout/inlineformatting/text/TextUtil.h: Renamed from Source/WebCore/layout/inlineformatting/textlayout/TextUtil.h.
37         * layout/inlineformatting/textlayout/Runs.h: Removed.
38         * layout/inlineformatting/textlayout/TextContentProvider.cpp: Removed.
39         * layout/inlineformatting/textlayout/TextContentProvider.h: Removed.
40         * layout/inlineformatting/textlayout/simple/SimpleLineBreaker.cpp: Removed.
41         * layout/inlineformatting/textlayout/simple/SimpleLineBreaker.h: Removed.
42         * layout/inlineformatting/textlayout/simple/SimpleTextRunGenerator.cpp: Removed.
43         * layout/inlineformatting/textlayout/simple/SimpleTextRunGenerator.h: Removed.
44
45 2018-10-19  Zalan Bujtas  <zalan@apple.com>
46
47         [LFC][IFC] Add generic inline content handling.
48         https://bugs.webkit.org/show_bug.cgi?id=190713
49
50         Reviewed by Antti Koivisto.
51
52         layoutInlineContent turns InlineLineBreaker::Run objects into final inline runs by
53         resolving heading/trailing whitespace, aligment, expansion opportunities etc.
54         These inline runs are input to the display tree construction.
55
56         * Sources.txt:
57         * WebCore.xcodeproj/project.pbxproj:
58         * layout/displaytree/DisplayBox.h:
59         * layout/inlineformatting/InlineFormattingContext.cpp:
60         (WebCore::Layout::InlineFormattingContext::layout const):
61         (WebCore::Layout::trimLeadingRun):
62         (WebCore::Layout::InlineFormattingContext::layoutInlineContent const):
63         (WebCore::Layout::InlineFormattingContext::computeWidthAndHeight const):
64         * layout/inlineformatting/InlineFormattingContext.h:
65         (WebCore::Layout::InlineFormattingContext::Line::hasContent const):
66         (WebCore::Layout::InlineFormattingContext::Line::contentLogicalLeft const):
67         (WebCore::Layout::InlineFormattingContext::Line::availableWidth const):
68         * layout/inlineformatting/InlineFormattingState.h:
69         (WebCore::Layout::InlineFormattingState::inlineRuns):
70         (WebCore::Layout::InlineFormattingState::appendInlineRun):
71         * layout/inlineformatting/InlineLineBreaker.cpp:
72         (WebCore::Layout::InlineLineBreaker::nextRun):
73         (WebCore::Layout::InlineLineBreaker::nextLayoutRun): Deleted.
74         * layout/inlineformatting/InlineLineBreaker.h:
75         * layout/inlineformatting/InlineRun.h: Added.
76         (WebCore::Layout::InlineRun::logicalLeft const):
77         (WebCore::Layout::InlineRun::logicalRight const):
78         (WebCore::Layout::InlineRun::width const):
79         (WebCore::Layout::InlineRun::setWidth):
80         (WebCore::Layout::InlineRun::setLogicalRight):
81         (WebCore::Layout::InlineRun::TextContext::position const):
82         (WebCore::Layout::InlineRun::TextContext::length const):
83         (WebCore::Layout::InlineRun::TextContext::setLength):
84         (WebCore::Layout::InlineRun::textContext):
85         (WebCore::Layout::InlineRun::inlineItem const):
86         (WebCore::Layout::InlineRun::InlineRun):
87         (WebCore::Layout::InlineRun::TextContext::TextContext):
88         * layout/inlineformatting/Line.cpp: Added.
89         (WebCore::Layout::InlineFormattingContext::Line::Line):
90         (WebCore::Layout::InlineFormattingContext::Line::setConstraints):
91         (WebCore::Layout::isNonCollapsedText):
92         (WebCore::Layout::isTrimmableContent):
93         (WebCore::Layout::InlineFormattingContext::Line::appendContent):
94         (WebCore::Layout::InlineFormattingContext::Line::close):
95
96 2018-10-19  Zalan Bujtas  <zalan@apple.com>
97
98         [LFC][IFC] Add generic inline line breaker
99         https://bugs.webkit.org/show_bug.cgi?id=190698
100
101         Reviewed by Antti Koivisto.
102
103         InlineLineBreaker takes the inline runs and applies the appropriate line breaking rules on them.
104         InlineRunProvider::Run objects ->
105
106             <foobar><image box><hello>< ><world>
107
108         InlineLineBreaker::Run ->
109
110             <foobar><image box><hello world>
111
112         InlineLineBreaker::Run also contains information whether the run is at the beginning or at the end of the line.
113
114         * Sources.txt:
115         * WebCore.xcodeproj/project.pbxproj:
116         * layout/LayoutContext.h:
117         (WebCore::Layout::LayoutContext::hasDisplayBox const):
118         * layout/inlineformatting/InlineLineBreaker.cpp: Added.
119         (WebCore::Layout::InlineLineBreaker::InlineLineBreaker):
120         (WebCore::Layout::InlineLineBreaker::nextLayoutRun):
121         (WebCore::Layout::InlineLineBreaker::isAtContentEnd const):
122         (WebCore::Layout::InlineLineBreaker::lineBreakingBehavior):
123         (WebCore::Layout::InlineLineBreaker::runWidth const):
124         (WebCore::Layout::InlineLineBreaker::splitRun):
125         (WebCore::Layout::InlineLineBreaker::adjustSplitPositionWithHyphenation const):
126         * layout/inlineformatting/InlineLineBreaker.h: Added.
127         * layout/inlineformatting/textlayout/TextUtil.cpp: Added.
128         (WebCore::Layout::TextUtil::TextUtil):
129         (WebCore::Layout::TextUtil::width const):
130         (WebCore::Layout::TextUtil::hyphenPositionBefore const):
131         (WebCore::Layout::TextUtil::textWidth const):
132         (WebCore::Layout::TextUtil::fixedPitchWidth const):
133         * layout/inlineformatting/textlayout/TextUtil.h: Added.
134         * layout/layouttree/LayoutBox.cpp:
135
136 2018-10-19  Zalan Bujtas  <zalan@apple.com>
137
138         [LFC][IFC] Add generic inline run generator.
139         https://bugs.webkit.org/show_bug.cgi?id=190696
140
141         Reviewed by Antti Koivisto.
142
143         InlineRunProvider turns the following inline content ->
144
145             <span>foo<span>bar</span></span>
146             <img src="broken.jpg"><span>hello world</span>
147
148         into a set of runs ->
149
150             <foobar><image box><hello>< ><world>
151
152         Note that a text run can overlap multiple inline elements. InlineRunProvider::Run only stores a reference to
153         the first inline element (continuous content can be accessed by iterating through the InlineContent ListHashSet).
154         These runs are the input to the line breaking algoritm.
155
156         * Sources.txt:
157         * WebCore.xcodeproj/project.pbxproj:
158         * layout/inlineformatting/InlineFormattingContext.cpp:
159         (WebCore::Layout::InlineFormattingContext::layout const):
160         * layout/inlineformatting/InlineFormattingState.h:
161         (WebCore::Layout::InlineFormattingState::inlineContent):
162         * layout/inlineformatting/InlineItem.h: Added.
163         (WebCore::Layout::InlineItem::layoutBox const):
164         (WebCore::Layout::InlineItem::style const):
165         (WebCore::Layout::InlineItemHashFunctions::hash):
166         (WebCore::Layout::InlineItemHashFunctions::equal):
167         (WebCore::Layout::InlineItemHashTranslator::hash):
168         (WebCore::Layout::InlineItemHashTranslator::equal):
169         (WebCore::Layout::InlineItem::InlineItem):
170         (WebCore::Layout::InlineItem::type const):
171         (WebCore::Layout::InlineItem::textContent const):
172         * layout/inlineformatting/InlineRunProvider.cpp: Added.
173         (WebCore::Layout::InlineRunProvider::InlineRunProvider):
174         (WebCore::Layout::InlineRunProvider::append):
175         (WebCore::Layout::InlineRunProvider::insertBefore):
176         (WebCore::Layout::InlineRunProvider::remove):
177         (WebCore::Layout::isWhitespace):
178         (WebCore::Layout::isSoftLineBreak):
179         (WebCore::Layout::InlineRunProvider::isContinousContent):
180         (WebCore::Layout::InlineRunProvider::processInlineTextItem):
181         (WebCore::Layout::InlineRunProvider::moveToNextNonWhitespacePosition):
182         (WebCore::Layout::InlineRunProvider::moveToNextBreakablePosition):
183         * layout/inlineformatting/InlineRunProvider.h: Added.
184         (WebCore::Layout::InlineRunProvider::Run::type const):
185         (WebCore::Layout::InlineRunProvider::Run::isText const):
186         (WebCore::Layout::InlineRunProvider::Run::isWhitespace const):
187         (WebCore::Layout::InlineRunProvider::Run::isNonWhitespace const):
188         (WebCore::Layout::InlineRunProvider::Run::isLineBreak const):
189         (WebCore::Layout::InlineRunProvider::Run::isBox const):
190         (WebCore::Layout::InlineRunProvider::Run::isFloat const):
191         (WebCore::Layout::InlineRunProvider::Run::TextContext::start const):
192         (WebCore::Layout::InlineRunProvider::Run::TextContext::length const):
193         (WebCore::Layout::InlineRunProvider::Run::TextContext::isCollapsed const):
194         (WebCore::Layout::InlineRunProvider::Run::TextContext::setStart):
195         (WebCore::Layout::InlineRunProvider::Run::TextContext::setLength):
196         (WebCore::Layout::InlineRunProvider::Run::textContext const):
197         (WebCore::Layout::InlineRunProvider::Run::style const):
198         (WebCore::Layout::InlineRunProvider::Run::inlineItem const):
199         (WebCore::Layout::InlineRunProvider::runs const):
200         (WebCore::Layout::InlineRunProvider::Run::createBoxRun):
201         (WebCore::Layout::InlineRunProvider::Run::createFloatRun):
202         (WebCore::Layout::InlineRunProvider::Run::createSoftLineBreakRun):
203         (WebCore::Layout::InlineRunProvider::Run::createHardLineBreakRun):
204         (WebCore::Layout::InlineRunProvider::Run::createWhitespaceRun):
205         (WebCore::Layout::InlineRunProvider::Run::createNonWhitespaceRun):
206         (WebCore::Layout::InlineRunProvider::Run::Run):
207         (WebCore::Layout::InlineRunProvider::Run::TextContext::TextContext):
208         * layout/layouttree/LayoutBox.h:
209         (WebCore::Layout::Box::isLineBreakBox const):
210         * layout/layouttree/LayoutInlineBox.cpp:
211         (WebCore::Layout::InlineBox::InlineBox):
212         * layout/layouttree/LayoutInlineBox.h:
213         (WebCore::Layout::InlineBox::hasTextContent const):
214         (WebCore::Layout::InlineBox::textContent const):
215         * layout/layouttree/LayoutLineBreakBox.cpp: Copied from Source/WebCore/layout/layouttree/LayoutInlineBox.cpp.
216         (WebCore::Layout::LineBreakBox::LineBreakBox):
217         * layout/layouttree/LayoutLineBreakBox.h: Copied from Source/WebCore/layout/layouttree/LayoutInlineBox.cpp.
218
219 2018-10-19  Ali Juma  <ajuma@chromium.org>
220
221         [IntersectionObserver] Handle zero-area intersections
222         https://bugs.webkit.org/show_bug.cgi?id=189624
223
224         Reviewed by Simon Fraser.
225
226         Use edge-inclusive intersection when applying clips and intersecting with the
227         root, so that two rects that touch each other are considered intersecting even
228         if the area of their intersection is 0.
229
230         Covered by rebased tests in imported/w3c/web-platform-tests/intersection-observer.
231
232         * dom/Document.cpp:
233         (WebCore::computeIntersectionState):
234         (WebCore::Document::updateIntersectionObservations):
235         (WebCore::computeIntersectionRects): Deleted.
236
237 2018-10-18  Eric Carlson  <eric.carlson@apple.com>
238
239         [MediaStream] Allow ports to optionally do screen capture in the UI process
240         https://bugs.webkit.org/show_bug.cgi?id=190728
241         <rdar://problem/45376824>
242
243         Reviewed by Jer Noble and Tim Horton.
244
245         No new tests, covered by existing tests.
246
247         * Sources.txt: Add RemoteVideoSample.cpp.
248         * WebCore.xcodeproj/project.pbxproj: Ditto.
249
250         * platform/MediaSample.h:
251         (WebCore::MediaSample::videoPixelFormat const):
252
253         * platform/graphics/RemoteVideoSample.cpp: Added.
254         (WebCore::RemoteVideoSample::~RemoteVideoSample):
255         (WebCore::RemoteVideoSample::create):
256         (WebCore::RemoteVideoSample::RemoteVideoSample):
257         (WebCore::RemoteVideoSample::surface):
258         * platform/graphics/RemoteVideoSample.h: Added.
259         (WebCore::RemoteVideoSample::time const):
260         (WebCore::RemoteVideoSample::videoFormat const):
261         (WebCore::RemoteVideoSample::size const):
262         (WebCore::RemoteVideoSample::encode const):
263         (WebCore::RemoteVideoSample::decode):
264         * platform/graphics/avfoundation/objc/MediaSampleAVFObjC.h:
265         * platform/graphics/cv/ImageTransferSessionVT.h:
266
267         * platform/mediastream/RealtimeMediaSource.cpp:
268         (WebCore::RealtimeMediaSource::remoteVideoSampleAvailable): Call observers.
269         * platform/mediastream/RealtimeMediaSource.h:
270
271         * platform/mediastream/RealtimeVideoSource.cpp:
272         (WebCore::RealtimeVideoSource::dispatchMediaSampleToObservers): Dispatch remote samples without
273         resizing, resize local samples if necessary.
274         * platform/mediastream/RealtimeVideoSource.h:
275
276         * platform/mediastream/mac/AVVideoCaptureSource.mm:
277         (WebCore::AVVideoCaptureSource::captureOutputDidOutputSampleBufferFromConnection): Don't resize
278         samples, it will be done in the base class if necessary.
279
280         * platform/mediastream/mac/DisplayCaptureSourceCocoa.cpp:
281         (WebCore::DisplayCaptureSourceCocoa::emitFrame): Don't resize samples when running in the UI
282         process, it will be done in the web process.
283
284         * platform/mediastream/mac/RealtimeOutgoingVideoSourceCocoa.cpp: Remove unneeded include.
285
286 2018-10-18  Said Abou-Hallawa  <sabouhallawa@apple.com>
287
288         [CG] Adopt CG SPI for non-even cornered rounded rects
289         https://bugs.webkit.org/show_bug.cgi?id=190155
290
291         Reviewed by Simon Fraser.
292
293         Instead of creating bezier curves for the non-even corners of the rounded
294         rects, we should use the optimized SPI provided by CG.
295
296         * platform/graphics/cg/PathCG.cpp:
297         (WebCore::Path::platformAddPathForRoundedRect):
298
299 2018-10-18  Justin Michaud  <justin_michaud@apple.com>
300
301         Add new image type for CSS painting API
302         https://bugs.webkit.org/show_bug.cgi?id=190697
303
304         Reviewed by Dean Jackson.
305
306         Add a new image type for the CSS painting API, and hook it up so it can be drawn.
307         For now, it uses a WebGL rendering context from OfflineCanvas because that was
308         easy to hook up. The spec actually calls for a RenderingContext2D, which can be
309         handled in another patch.
310
311         * Sources.txt:
312         * WebCore.xcodeproj/project.pbxproj:
313         * css/CSSImageGeneratorValue.cpp:
314         (WebCore::CSSImageGeneratorValue::image):
315         (WebCore::CSSImageGeneratorValue::isFixedSize const):
316         (WebCore::CSSImageGeneratorValue::fixedSize):
317         (WebCore::CSSImageGeneratorValue::isPending const):
318         (WebCore::CSSImageGeneratorValue::knownToBeOpaque const):
319         (WebCore::CSSImageGeneratorValue::loadSubimages):
320         * css/CSSPaintCallback.h:
321         * css/CSSPaintCallback.idl:
322         * css/CSSPaintImageValue.cpp:
323         (WebCore::CSSPaintImageValue::image):
324         * css/CSSPaintImageValue.h:
325         * platform/graphics/CustomPaintImage.cpp: Added.
326         (WebCore::CustomPaintImage::CustomPaintImage):
327         (WebCore::CustomPaintImage::doCustomPaint):
328         (WebCore::CustomPaintImage::draw):
329         (WebCore::CustomPaintImage::drawPattern):
330         * platform/graphics/CustomPaintImage.h: Copied from Source/WebCore/css/CSSPaintCallback.h.
331         * platform/graphics/Image.h:
332         (WebCore::Image::isCustomPaintImage const):
333         * platform/graphics/ImageBuffer.h:
334         * platform/graphics/cairo/CairoOperations.cpp:
335
336 2018-10-18  Truitt Savell  <tsavell@apple.com>
337
338         Unreviewed, rolling out r237272.
339
340         Broke on device iOS builds and Windows builds
341
342         Reverted changeset:
343
344         "[MediaStream] Allow ports to optionally do screen capture in
345         the UI process"
346         https://bugs.webkit.org/show_bug.cgi?id=190728
347         https://trac.webkit.org/changeset/237272
348
349 2018-10-18  Jer Noble  <jer.noble@apple.com>
350
351         [MSE] timestampOffset can introduce floating-point rounding errors to incoming samples
352         https://bugs.webkit.org/show_bug.cgi?id=190590
353         <rdar://problem/45275626>
354
355         Reviewed by Eric Carlson.
356
357         Test: media/media-source/media-source-timestampoffset-rounding-error.html
358
359         SourceBuffer.timestampOffset is a double property, which, when added to a MediaTime will
360         result in a double-backed MediaTime as PTS & DTS. This can introduce rounding errors when
361         these samples are appended as overlapping existing samples. Rather than converting a MediaTime
362         to double-backed when adding the timestampOffset, convert the offset to a multiple of the
363         sample's timeBase.
364
365         * Modules/mediasource/SourceBuffer.cpp:
366         (WebCore::SourceBuffer::setTimestampOffset):
367         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample):
368
369 2018-10-18  Eric Carlson  <eric.carlson@apple.com>
370
371         [MediaStream] Allow ports to optionally do screen capture in the UI process
372         https://bugs.webkit.org/show_bug.cgi?id=190728
373         <rdar://problem/45376824>
374
375         Reviewed by Jer Noble and Tim Horton.
376
377         No new tests, covered by existing tests.
378
379         * Sources.txt: Add RemoteVideoSample.cpp.
380         * WebCore.xcodeproj/project.pbxproj: Ditto.
381
382         * platform/MediaSample.h:
383         (WebCore::MediaSample::videoPixelFormat const):
384
385         * platform/graphics/RemoteVideoSample.cpp: Added.
386         (WebCore::RemoteVideoSample::~RemoteVideoSample):
387         (WebCore::RemoteVideoSample::create):
388         (WebCore::RemoteVideoSample::RemoteVideoSample):
389         (WebCore::RemoteVideoSample::surface):
390         * platform/graphics/RemoteVideoSample.h: Added.
391         (WebCore::RemoteVideoSample::time const):
392         (WebCore::RemoteVideoSample::videoFormat const):
393         (WebCore::RemoteVideoSample::size const):
394         (WebCore::RemoteVideoSample::encode const):
395         (WebCore::RemoteVideoSample::decode):
396         * platform/graphics/avfoundation/objc/MediaSampleAVFObjC.h:
397         * platform/graphics/cv/ImageTransferSessionVT.h:
398
399         * platform/mediastream/RealtimeMediaSource.cpp:
400         (WebCore::RealtimeMediaSource::remoteVideoSampleAvailable): Call observers.
401         * platform/mediastream/RealtimeMediaSource.h:
402
403         * platform/mediastream/RealtimeVideoSource.cpp:
404         (WebCore::RealtimeVideoSource::dispatchMediaSampleToObservers): Dispatch remote samples without
405         resizing, resize local samples if necessary.
406         * platform/mediastream/RealtimeVideoSource.h:
407
408         * platform/mediastream/mac/AVVideoCaptureSource.mm:
409         (WebCore::AVVideoCaptureSource::captureOutputDidOutputSampleBufferFromConnection): Don't resize
410         samples, it will be done in the base class if necessary.
411
412         * platform/mediastream/mac/DisplayCaptureSourceCocoa.cpp:
413         (WebCore::DisplayCaptureSourceCocoa::emitFrame): Don't resize samples when running in the UI
414         process, it will be done in the web process.
415
416         * platform/mediastream/mac/RealtimeOutgoingVideoSourceCocoa.cpp: Remove unneeded include.
417
418 2018-10-18  Jer Noble  <jer.noble@apple.com>
419
420         Safari is not able to adapt between H264 streams with EditList and without EditList
421         https://bugs.webkit.org/show_bug.cgi?id=190638
422         <rdar://problem/45342208>
423
424         Reviewed by Eric Carlson.
425
426         Test: media/media-source/media-source-append-overlapping-dts.html
427
428         The MSE frame replacement algorithm does not take decode timestamps into account; this can
429         lead to situations where the replacement algorithm may leave in place frames where the 
430         presentationTimestamp is less than the replacement frame, but whose decodeTimestamp is
431         after the replacement frame. When re-enqueuing these frames, they may cause a decode error
432         if they break the group-of-pictures sequence of the replaced range.
433
434         * Modules/mediasource/SampleMap.cpp:
435         (WebCore::DecodeOrderSampleMap::findSamplesBetweenDecodeKeys):
436         * Modules/mediasource/SampleMap.h:
437         * Modules/mediasource/SourceBuffer.cpp:
438         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample):
439
440 2018-10-18  Per Arne Vollan  <pvollan@apple.com>
441
442         [WebVTT] Region parameter and value should be separated by ':'
443         https://bugs.webkit.org/show_bug.cgi?id=190735
444
445         Reviewed by Eric Carlson.
446
447         This is specified in https://w3c.github.io/webvtt/#region-settings.
448
449         No new tests. Modified existing tests.
450
451         * html/track/VTTRegion.cpp:
452         (WebCore::VTTRegion::setRegionSettings):
453
454 2018-10-18  Jer Noble  <jer.noble@apple.com>
455
456         Add support for MediaKeyEncryptionScheme
457         https://bugs.webkit.org/show_bug.cgi?id=190173
458
459         Reviewed by Eric Carlson.
460
461         Added sub-tests to: media/encrypted-media/mock-navigator-requestMediaKeySystemAccess.html
462
463         Add support for the MediaKeyEncryptionScheme extension to EME, as detailed here:
464         <https://github.com/WICG/encrypted-media-encryption-scheme/blob/master/explainer.md>
465
466         As the strings "cenc" and "cbcs" are explicitly lower-case, add support to the bindings generator to keep
467         those strings as lower-case when converting from IDL.
468
469         * CMakeLists.txt:
470         * DerivedSources.make:
471         * Modules/encryptedmedia/MediaKeyEncryptionScheme.h:
472         * Modules/encryptedmedia/MediaKeyEncryptionScheme.idl:
473         * Modules/encryptedmedia/MediaKeySystemMediaCapability.h:
474         * Modules/encryptedmedia/MediaKeySystemMediaCapability.idl:
475         * Sources.txt:
476         * WebCore.xcodeproj/project.pbxproj:
477         * bindings/scripts/CodeGenerator.pm:
478         (WK_ucfirst):
479         * platform/encryptedmedia/CDMEncryptionScheme.h: Copied from Source/WebCore/testing/MockCDMFactory.idl.
480         * platform/encryptedmedia/CDMMediaCapability.h:
481         * platform/graphics/avfoundation/CDMFairPlayStreaming.cpp:
482         (WebCore::CDMPrivateFairPlayStreaming::supportsConfiguration const):
483         * platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.h:
484         * platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.mm:
485         (WebCore::CDMInstanceFairPlayStreamingAVFObjC::supportsMediaCapability):
486         (WebCore::CDMInstanceFairPlayStreamingAVFObjC::initializeWithConfiguration):
487         * testing/MockCDMFactory.cpp:
488         (WebCore::m_supportedEncryptionSchemes):
489         (WebCore::MockCDM::supportsConfiguration const):
490         * testing/MockCDMFactory.h:
491         (WebCore::MockCDMFactory::supportedEncryptionSchemes const):
492         (WebCore::MockCDMFactory::setSupportedEncryptionSchemes):
493         * testing/MockCDMFactory.idl:
494
495 2018-10-18  Alexey Proskuryakov  <ap@apple.com>
496
497         Switch from PLATFORM(IOS) to PLATFORM(IOS_FAMILY)
498         https://bugs.webkit.org/show_bug.cgi?id=190729
499
500         Reviewed by Tim Horton.
501
502         * DerivedSources.make:
503         * Modules/applepay/cocoa/PaymentContactCocoa.mm:
504         (WebCore::subLocality):
505         (WebCore::setSubLocality):
506         (WebCore::subAdministrativeArea):
507         (WebCore::setSubAdministrativeArea):
508         * Modules/encryptedmedia/legacy/LegacyCDMPrivateMediaPlayer.cpp:
509         * Modules/geolocation/Geolocation.cpp:
510         (WebCore::isRequestFromIBooks):
511         * Modules/geolocation/GeolocationPosition.h:
512         * Modules/geolocation/NavigatorGeolocation.cpp:
513         * Modules/geolocation/NavigatorGeolocation.h:
514         * Modules/geolocation/ios/GeolocationPositionIOS.mm:
515         * Modules/mediasession/WebMediaSessionManager.cpp:
516         * Modules/mediasession/WebMediaSessionManager.h:
517         * Modules/mediastream/MediaDevicesRequest.cpp:
518         (WebCore::MediaDevicesRequest::filterDeviceList):
519         * Modules/plugins/QuickTimePluginReplacement.mm:
520         (WebCore::JSQuickTimePluginReplacement::timedMetaData const):
521         (WebCore::JSQuickTimePluginReplacement::accessLog const):
522         (WebCore::JSQuickTimePluginReplacement::errorLog const):
523         * Modules/speech/SpeechSynthesis.cpp:
524         (WebCore::SpeechSynthesis::SpeechSynthesis):
525         (WebCore::SpeechSynthesis::speak):
526         * Modules/speech/SpeechSynthesis.h:
527         * Modules/webaudio/AudioContext.cpp:
528         * Modules/webaudio/AudioScheduledSourceNode.cpp:
529         * Modules/webdatabase/Database.cpp:
530         (WebCore::Database::performOpenAndVerify):
531         * Modules/webdatabase/DatabaseContext.h:
532         * Modules/webdatabase/DatabaseManagerClient.h:
533         * Modules/webdatabase/DatabaseTracker.cpp:
534         (WebCore::DatabaseTracker::deleteDatabaseFile):
535         * Modules/webdatabase/DatabaseTracker.h:
536         * WebCorePrefix.h:
537         * accessibility/AXObjectCache.cpp:
538         (WebCore::createFromRenderer):
539         * accessibility/AccessibilityMediaObject.cpp:
540         * accessibility/AccessibilityMediaObject.h:
541         * accessibility/AccessibilityMenuList.cpp:
542         (WebCore::AccessibilityMenuList::press):
543         (WebCore::AccessibilityMenuList::isCollapsed const):
544         * accessibility/AccessibilityObject.cpp:
545         (WebCore::AccessibilityObject::isAccessibilityObjectSearchMatchAtIndex):
546         (WebCore::AccessibilityObject::press):
547         (WebCore::AccessibilityObject::actionVerb const):
548         * accessibility/AccessibilityObject.h:
549         * accessibility/AccessibilityRenderObject.cpp:
550         (WebCore::AccessibilityRenderObject::stringValue const):
551         (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
552         (WebCore::AccessibilityRenderObject::actionVerb const):
553         * accessibility/AccessibilityTableColumn.cpp:
554         (WebCore::AccessibilityTableColumn::computeAccessibilityIsIgnored const):
555         * accessibility/AccessibilityTableHeaderContainer.cpp:
556         (WebCore::AccessibilityTableHeaderContainer::computeAccessibilityIsIgnored const):
557         * accessibility/ios/AXObjectCacheIOS.mm:
558         * accessibility/ios/AccessibilityObjectIOS.mm:
559         * accessibility/ios/WebAccessibilityObjectWrapperIOS.h:
560         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
561         * bindings/js/CommonVM.cpp:
562         (WebCore::commonVMSlow):
563         * bindings/js/JSCallbackData.h:
564         (WebCore::JSCallbackData::~JSCallbackData):
565         * bindings/js/JSDOMWindowBase.cpp:
566         (WebCore::JSDOMWindowBase::shouldInterruptScriptBeforeTimeout):
567         * bindings/js/ScriptController.cpp:
568         (WebCore::ScriptController::initializeThreading):
569         * bridge/objc/objc_class.mm:
570         (JSC::Bindings::ObjcClass::fieldNamed const):
571         * crypto/CommonCryptoUtilities.h:
572         * crypto/mac/CryptoKeyRSAMac.cpp:
573         * crypto/mac/SerializedCryptoKeyWrapMac.mm:
574         (WebCore::masterKeyAccountNameForCurrentApplication):
575         (WebCore::createAndStoreMasterKey):
576         * css/CSSComputedStyleDeclaration.cpp:
577         (WebCore::ComputedStyleExtractor::valueForPropertyinStyle):
578         * css/CSSProperties.json:
579         * css/CSSStyleDeclaration.cpp:
580         * css/CSSValueKeywords.in:
581         * css/MediaQueryEvaluator.cpp:
582         (WebCore::prefersReducedMotionEvaluate):
583         * css/StyleBuilderConverter.h:
584         * css/html.css:
585         (video):
586         (input, textarea, keygen, select, button):
587         (#if defined(WTF_PLATFORM_IOS_FAMILY) && WTF_PLATFORM_IOS_FAMILY):
588         (#if defined(ENABLE_INPUT_TYPE_DATE) && ENABLE_INPUT_TYPE_DATE):
589         (#endif):
590         (#if defined(ENABLE_DATALIST_ELEMENT) && ENABLE_DATALIST_ELEMENT):
591         (textarea):
592         (input:matches([type="radio"], [type="checkbox"])):
593         (input:matches([type="button"], [type="submit"], [type="reset"]), input[type="file"]::-webkit-file-upload-button, button):
594         (input[type="range"]::-webkit-slider-thumb, input[type="range"]::-webkit-media-slider-thumb):
595         (#if !(defined(WTF_PLATFORM_IOS_FAMILY) && WTF_PLATFORM_IOS_FAMILY)):
596         (input[type="checkbox"]):
597         (#endif // defined(ENABLE_INPUT_TYPE_COLOR) && ENABLE_INPUT_TYPE_COLOR):
598         (#if defined(WTF_PLATFORM_IOS) && WTF_PLATFORM_IOS): Deleted.
599         (#if !(defined(WTF_PLATFORM_IOS) && WTF_PLATFORM_IOS)): Deleted.
600         * css/parser/CSSParserContext.cpp:
601         (WebCore::CSSParserContext::CSSParserContext):
602         * css/parser/CSSParserFastPaths.cpp:
603         (WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
604         (WebCore::CSSParserFastPaths::isKeywordPropertyID):
605         * css/parser/CSSPropertyParser.cpp:
606         (WebCore::cssPropertyID):
607         (WebCore::CSSPropertyParser::parseSingleValue):
608         * css/parser/CSSPropertyParser.h:
609         * css/svg.css:
610         (#if defined(WTF_PLATFORM_IOS_FAMILY) && WTF_PLATFORM_IOS_FAMILY):
611         (#if defined(WTF_PLATFORM_IOS) && WTF_PLATFORM_IOS): Deleted.
612         * dom/DeviceMotionController.cpp:
613         * dom/DeviceMotionController.h:
614         * dom/DeviceOrientationController.cpp:
615         (WebCore::DeviceOrientationController::DeviceOrientationController):
616         * dom/DeviceOrientationController.h:
617         * dom/DeviceOrientationData.cpp:
618         * dom/DeviceOrientationData.h:
619         * dom/DeviceOrientationEvent.cpp:
620         * dom/DeviceOrientationEvent.h:
621         * dom/DeviceOrientationEvent.idl:
622         * dom/Document.cpp:
623         (WebCore::Document::~Document):
624         (WebCore::Document::suspendDeviceMotionAndOrientationUpdates):
625         (WebCore::Document::resumeDeviceMotionAndOrientationUpdates):
626         (WebCore::Document::platformSuspendOrStopActiveDOMObjects):
627         * dom/Document.h:
628         * dom/DocumentMarker.h:
629         (WebCore::DocumentMarker::allMarkers):
630         * dom/DocumentMarkerController.cpp:
631         (WebCore::shouldInsertAsSeparateMarker):
632         (WebCore::DocumentMarkerController::shiftMarkers):
633         * dom/DocumentMarkerController.h:
634         * dom/Element.cpp:
635         (WebCore::Element::focus):
636         * dom/Node.cpp:
637         (WebCore::Node::~Node):
638         (WebCore::Node::willBeDeletedFrom):
639         (WebCore::Node::moveNodeToNewDocument):
640         (WebCore::tryAddEventListener):
641         (WebCore::tryRemoveEventListener):
642         (WebCore::Node::defaultEventHandler):
643         (WebCore::Node::willRespondToMouseMoveEvents):
644         (WebCore::Node::willRespondToMouseClickEvents):
645         * dom/Range.cpp:
646         * dom/Range.h:
647         * dom/TreeScope.cpp:
648         (WebCore::absolutePointIfNotClipped):
649         * dom/ViewportArguments.cpp:
650         (WebCore::setViewportFeature):
651         * dom/ViewportArguments.h:
652         * editing/CompositeEditCommand.cpp:
653         (WebCore::EditCommandComposition::unapply):
654         (WebCore::CompositeEditCommand::replaceTextInNodePreservingMarkers):
655         (WebCore::CompositeEditCommand::moveParagraphs):
656         * editing/Editor.cpp:
657         (WebCore::TemporarySelectionChange::TemporarySelectionChange):
658         (WebCore::TemporarySelectionChange::~TemporarySelectionChange):
659         (WebCore::Editor::handleTextEvent):
660         (WebCore::Editor::Editor):
661         (WebCore::Editor::clear):
662         (WebCore::Editor::insertTextWithoutSendingTextEvent):
663         (WebCore::Editor::setBaseWritingDirection):
664         (WebCore::Editor::setComposition):
665         (WebCore::Editor::showSpellingGuessPanel):
666         (WebCore::Editor::markMisspellingsAfterTypingToWord):
667         (WebCore::Editor::markMisspellingsOrBadGrammar):
668         (WebCore::Editor::changeBackToReplacedString):
669         (WebCore::Editor::updateMarkersForWordsAffectedByEditing):
670         (WebCore::Editor::revealSelectionAfterEditingOperation):
671         (WebCore::Editor::setIgnoreSelectionChanges):
672         (WebCore::Editor::changeSelectionAfterCommand):
673         (WebCore::Editor::shouldChangeSelection const):
674         (WebCore::Editor::respondToChangedSelection):
675         (WebCore::Editor::editorUIUpdateTimerFired):
676         (WebCore::Editor::resolveTextCheckingTypeMask):
677         * editing/Editor.h:
678         * editing/FontAttributes.h:
679         * editing/FrameSelection.cpp:
680         (WebCore::FrameSelection::FrameSelection):
681         (WebCore::FrameSelection::updateDataDetectorsForSelection):
682         (WebCore::FrameSelection::setSelectedRange):
683         (WebCore::FrameSelection::updateAppearance):
684         (WebCore::FrameSelection::shouldDeleteSelection const):
685         (WebCore::FrameSelection::revealSelection):
686         (WebCore::FrameSelection::setSelectionFromNone):
687         (WebCore::FrameSelection::shouldChangeSelection const):
688         * editing/FrameSelection.h:
689         * editing/InsertIntoTextNodeCommand.cpp:
690         * editing/InsertIntoTextNodeCommand.h:
691         * editing/TypingCommand.cpp:
692         (WebCore::TypingCommand::markMisspellingsAfterTyping):
693         (WebCore::TypingCommand::deleteKeyPressed):
694         (WebCore::TypingCommand::forwardDeleteKeyPressed):
695         * editing/TypingCommand.h:
696         * editing/cocoa/DataDetection.h:
697         * editing/cocoa/DataDetection.mm:
698         * editing/cocoa/FontAttributesCocoa.mm:
699         * editing/cocoa/FontShadowCocoa.mm:
700         (WebCore::FontShadow::createShadow const):
701         * editing/cocoa/HTMLConverter.h:
702         * editing/cocoa/HTMLConverter.mm:
703         (_fontForNameAndSize):
704         (_shadowForShadowStyle):
705         (HTMLConverter::computedAttributesForElement):
706         (HTMLConverter::_addAttachmentForElement):
707         (HTMLConverter::_processMetaElementWithName):
708         (HTMLConverter::_processElement):
709         * editing/cocoa/WebContentReaderCocoa.mm:
710         (WebCore::attributesForAttributedStringConversion):
711         (WebCore::WebContentReader::readURL):
712         * editing/ios/DictationCommandIOS.cpp:
713         * editing/ios/DictationCommandIOS.h:
714         * editing/ios/EditorIOS.mm:
715         * editing/mac/FrameSelectionMac.mm:
716         (WebCore::FrameSelection::notifyAccessibilityForSelectionChange):
717         * fileapi/FileCocoa.mm:
718         * history/CachedFrame.cpp:
719         (WebCore::CachedFrameBase::restore):
720         (WebCore::CachedFrame::CachedFrame):
721         * history/CachedPage.cpp:
722         (WebCore::CachedPage::restore):
723         * history/HistoryItem.cpp:
724         (WebCore::HistoryItem::HistoryItem):
725         * history/HistoryItem.h:
726         * history/PageCache.cpp:
727         (WebCore::canCachePage):
728         * html/BaseDateAndTimeInputType.cpp:
729         * html/BaseDateAndTimeInputType.h:
730         * html/ColorInputType.cpp:
731         (WebCore::ColorInputType::isKeyboardFocusable const):
732         * html/HTMLAppletElement.cpp:
733         (WebCore::HTMLAppletElement::updateWidget):
734         * html/HTMLAttachmentElement.h:
735         * html/HTMLCanvasElement.cpp:
736         (WebCore::maxActivePixelMemory):
737         * html/HTMLElement.cpp:
738         (WebCore::HTMLElement::collectStyleForPresentationAttribute):
739         * html/HTMLIFrameElement.h:
740         * html/HTMLImageElement.cpp:
741         * html/HTMLImageElement.h:
742         * html/HTMLInputElement.cpp:
743         * html/HTMLInputElement.h:
744         * html/HTMLMediaElement.cpp:
745         (WebCore::HTMLMediaElement::finishInitialization):
746         (WebCore::HTMLMediaElement::registerWithDocument):
747         (WebCore::HTMLMediaElement::unregisterWithDocument):
748         (WebCore::HTMLMediaElement::setVolume):
749         (WebCore::HTMLMediaElement::nextScanRate):
750         (WebCore::HTMLMediaElement::sourceWasAdded):
751         (WebCore::HTMLMediaElement::mediaEngineWasUpdated):
752         (WebCore::HTMLMediaElement::updateVolume):
753         (WebCore::HTMLMediaElement::userCancelledLoad):
754         (WebCore::HTMLMediaElement::mediaSessionTitle const):
755         (WebCore::HTMLMediaElement::purgeBufferedDataIfPossible):
756         * html/HTMLMediaElement.h:
757         * html/HTMLMetaElement.cpp:
758         (WebCore::HTMLMetaElement::process):
759         * html/HTMLObjectElement.cpp:
760         * html/HTMLPlugInElement.h:
761         * html/HTMLSelectElement.cpp:
762         (WebCore::HTMLSelectElement::usesMenuList const):
763         (WebCore::HTMLSelectElement::createElementRenderer):
764         (WebCore::HTMLSelectElement::childShouldCreateRenderer const):
765         (WebCore::HTMLSelectElement::willRespondToMouseClickEvents):
766         (WebCore::HTMLSelectElement::updateListBoxSelection):
767         (WebCore::HTMLSelectElement::scrollToSelection):
768         (WebCore::HTMLSelectElement::setOptionsChangedOnRenderer):
769         (WebCore::HTMLSelectElement::menuListDefaultEventHandler):
770         (WebCore::HTMLSelectElement::defaultEventHandler):
771         * html/HTMLTextAreaElement.cpp:
772         (WebCore::HTMLTextAreaElement::createInnerTextStyle):
773         * html/HTMLTextFormControlElement.cpp:
774         (WebCore::HTMLTextFormControlElement::select):
775         (WebCore::HTMLTextFormControlElement::adjustInnerTextStyle const):
776         * html/HTMLTextFormControlElement.h:
777         * html/HTMLVideoElement.cpp:
778         (WebCore::HTMLVideoElement::parseAttribute):
779         (WebCore::HTMLVideoElement::supportsFullscreen const):
780         * html/HTMLVideoElement.h:
781         * html/ImageDocument.cpp:
782         (WebCore::ImageDocument::ImageDocument):
783         (WebCore::ImageDocument::createDocumentStructure):
784         (WebCore::ImageDocument::imageUpdated):
785         * html/ImageDocument.h:
786         * html/InputType.cpp:
787         * html/InputType.h:
788         * html/MediaDocument.cpp:
789         (WebCore::MediaDocumentParser::createDocumentStructure):
790         * html/MediaElementSession.cpp:
791         (WebCore::MediaElementSession::clientDataBufferingTimerFired):
792         (WebCore::MediaElementSession::showPlaybackTargetPicker):
793         (WebCore::MediaElementSession::wirelessVideoPlaybackDisabled const):
794         (WebCore::MediaElementSession::setHasPlaybackTargetAvailabilityListeners):
795         (WebCore::MediaElementSession::isPlayingToWirelessPlaybackTarget const):
796         (WebCore::MediaElementSession::requiresFullscreenForVideoPlayback const):
797         * html/MediaElementSession.h:
798         * html/PluginDocument.cpp:
799         (WebCore::PluginDocumentParser::createDocumentStructure):
800         * html/RangeInputType.cpp:
801         (WebCore::RangeInputType::handleTouchEvent):
802         * html/RangeInputType.h:
803         * html/SearchInputType.cpp:
804         (WebCore::SearchInputType::addSearchResult):
805         * html/TextFieldInputType.cpp:
806         (WebCore::TextFieldInputType::isKeyboardFocusable const):
807         (WebCore::TextFieldInputType::handleFocusEvent):
808         (WebCore::TextFieldInputType::handleBlurEvent):
809         (WebCore::TextFieldInputType::didSetValueByUserEdit):
810         (WebCore::TextFieldInputType::listAttributeTargetChanged):
811         * html/parser/HTMLParserScheduler.h:
812         (WebCore::HTMLParserScheduler::shouldYieldBeforeToken):
813         * html/parser/HTMLTreeBuilder.cpp:
814         (WebCore::HTMLTreeBuilder::processCharacterBufferForInBody):
815         * html/parser/HTMLTreeBuilder.h:
816         * html/shadow/MediaControlElements.cpp:
817         * html/shadow/MediaControlElements.h:
818         * html/shadow/MediaControls.h:
819         * html/shadow/SliderThumbElement.cpp:
820         (WebCore::SliderThumbElement::dragFrom):
821         * html/shadow/SliderThumbElement.h:
822         * html/shadow/TextControlInnerElements.cpp:
823         (WebCore::SearchFieldResultsButtonElement::defaultEventHandler):
824         (WebCore::SearchFieldCancelButtonElement::SearchFieldCancelButtonElement):
825         * html/shadow/TextControlInnerElements.h:
826         * inspector/InspectorController.cpp:
827         (WebCore::InspectorController::setIndicating):
828         * inspector/InspectorFrontendHost.cpp:
829         (WebCore::InspectorFrontendHost::platform):
830         * inspector/PageScriptDebugServer.cpp:
831         (WebCore::PageScriptDebugServer::runEventLoopWhilePaused):
832         * inspector/agents/InspectorTimelineAgent.cpp:
833         (WebCore::currentRunLoop):
834         * loader/DocumentLoader.cpp:
835         * loader/DocumentLoader.h:
836         * loader/DocumentThreadableLoader.cpp:
837         (WebCore::DocumentThreadableLoader::makeCrossOriginAccessRequest):
838         * loader/DocumentWriter.cpp:
839         (WebCore::DocumentWriter::createDocument):
840         * loader/EmptyClients.cpp:
841         * loader/EmptyClients.h:
842         * loader/EmptyFrameLoaderClient.h:
843         * loader/FrameLoader.cpp:
844         (WebCore::FrameLoader::checkCompleted):
845         (WebCore::FrameLoader::willLoadMediaElementURL):
846         (WebCore::FrameLoader::stopForUserCancel):
847         (WebCore::FrameLoader::commitProvisionalLoad):
848         (WebCore::FrameLoader::didFirstLayout):
849         (WebCore::createWindow):
850         * loader/FrameLoader.h:
851         * loader/FrameLoaderClient.h:
852         * loader/HistoryController.cpp:
853         (WebCore::HistoryController::saveScrollPositionAndViewStateToItem):
854         (WebCore::HistoryController::restoreScrollPositionAndViewState):
855         * loader/ResourceLoader.cpp:
856         (WebCore::ResourceLoader::init):
857         (WebCore::ResourceLoader::willSendRequestInternal):
858         * loader/ResourceLoader.h:
859         * loader/SubframeLoader.cpp:
860         (WebCore::SubframeLoader::loadPlugin):
861         * loader/SubresourceLoader.cpp:
862         (WebCore::SubresourceLoader::create):
863         (WebCore::SubresourceLoader::willCancel):
864         (WebCore::SubresourceLoader::notifyDone):
865         (WebCore::SubresourceLoader::releaseResources):
866         * loader/SubresourceLoader.h:
867         * loader/cache/CachedImage.cpp:
868         * page/CaptionUserPreferencesMediaAF.cpp:
869         (WebCore::userCaptionPreferencesChangedNotificationCallback):
870         * page/Chrome.cpp:
871         (WebCore::Chrome::createColorChooser):
872         (WebCore::Chrome::dispatchViewportPropertiesDidChange const):
873         (WebCore::Chrome::didReceiveDocType):
874         * page/Chrome.h:
875         * page/ChromeClient.h:
876         * page/DOMTimer.cpp:
877         (WebCore::DOMTimer::install):
878         (WebCore::DOMTimer::fired):
879         * page/DOMWindow.cpp:
880         (WebCore::DOMWindow::outerHeight const):
881         (WebCore::DOMWindow::outerWidth const):
882         (WebCore::DOMWindow::clearTimeout):
883         (WebCore::DOMWindow::addEventListener):
884         (WebCore::DOMWindow::resetAllGeolocationPermission):
885         (WebCore::DOMWindow::removeEventListener):
886         (WebCore::DOMWindow::removeAllEventListeners):
887         * page/DOMWindow.h:
888         * page/DeprecatedGlobalSettings.cpp:
889         (WebCore::DeprecatedGlobalSettings::globalConstRedeclarationShouldThrow):
890         * page/DeprecatedGlobalSettings.h:
891         * page/DragController.cpp:
892         * page/EditorClient.h:
893         * page/EventHandler.cpp:
894         (WebCore::EventHandler::handleMousePressEventSingleClick):
895         (WebCore::EventHandler::handleMouseReleaseEvent):
896         (WebCore::EventHandler::startPanScrolling):
897         (WebCore::EventHandler::handleMouseMoveEvent):
898         * page/EventHandler.h:
899         * page/Frame.cpp:
900         (WebCore::Frame::Frame):
901         (WebCore::Frame::willDetachPage):
902         * page/Frame.h:
903         * page/FrameView.cpp:
904         (WebCore::FrameView::FrameView):
905         (WebCore::FrameView::clear):
906         (WebCore::FrameView::effectiveFrameFlattening const):
907         (WebCore::FrameView::flushCompositingStateForThisFrame):
908         (WebCore::FrameView::scrollPositionRespectingCustomFixedPosition const):
909         (WebCore::FrameView::viewportConstrainedVisibleContentRect const):
910         (WebCore::FrameView::updateContentsSize):
911         (WebCore::FrameView::computeScrollability const):
912         (WebCore::FrameView::adjustTiledBackingCoverage):
913         (WebCore::FrameView::calculateExtendedBackgroundMode const):
914         (WebCore::FrameView::performPostLayoutTasks):
915         (WebCore::FrameView::sizeForResizeEvent const):
916         (WebCore::FrameView::sendResizeEventIfNeeded):
917         * page/FrameView.h:
918         * page/FrameViewLayoutContext.cpp:
919         (WebCore::FrameViewLayoutContext::layout):
920         * page/MemoryRelease.cpp:
921         (WebCore::releaseCriticalMemory):
922         (WebCore::releaseMemory):
923         * page/Navigator.cpp:
924         * page/Navigator.h:
925         * page/NavigatorBase.cpp:
926         * page/Page.cpp:
927         (WebCore::Page::setIsVisibleInternal):
928         (WebCore::Page::showPlaybackTargetPicker):
929         * page/Page.h:
930         * page/PerformanceMonitor.cpp:
931         (WebCore::PerformanceMonitor::measurePostLoadMemoryUsage):
932         * page/ResourceUsageOverlay.cpp:
933         (WebCore::ResourceUsageOverlay::initialize):
934         * page/SecurityOrigin.cpp:
935         (WebCore::SecurityOrigin::canDisplay const):
936         * page/SettingsBase.cpp:
937         * page/SettingsBase.h:
938         * page/SettingsDefaultValues.h:
939         (WebCore::editingBehaviorTypeForPlatform):
940         * page/TextIndicator.cpp:
941         (WebCore::TextIndicator::createWithRange):
942         (WebCore::initializeIndicator):
943         * page/ViewportConfiguration.cpp:
944         (WebCore::ViewportConfiguration::textDocumentParameters):
945         * page/cocoa/MemoryReleaseCocoa.mm:
946         (WebCore::platformReleaseMemory):
947         (WebCore::jettisonExpensiveObjectsOnTopLevelNavigation):
948         * page/cocoa/ResourceUsageOverlayCocoa.mm:
949         (WebCore::showText):
950         * page/cocoa/ResourceUsageThreadCocoa.mm:
951         (WebCore::vmPageSize):
952         * page/cocoa/SettingsBaseCocoa.mm:
953         * page/ios/EventHandlerIOS.mm:
954         * page/ios/FrameIOS.mm:
955         * page/mac/ChromeMac.mm:
956         * page/mac/PageMac.mm:
957         (WebCore::Page::platformInitialize):
958         * page/mac/WebCoreFrameView.h:
959         * page/scrolling/AsyncScrollingCoordinator.cpp:
960         (WebCore::AsyncScrollingCoordinator::reconcileScrollingState):
961         * page/scrolling/ScrollingTree.h:
962         * page/scrolling/ScrollingTreeScrollingNode.h:
963         * page/scrolling/ScrollingTreeScrollingNodeDelegate.cpp:
964         * page/scrolling/ScrollingTreeScrollingNodeDelegate.h:
965         * page/scrolling/ios/ScrollingCoordinatorIOS.h:
966         * page/scrolling/ios/ScrollingCoordinatorIOS.mm:
967         * page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.h:
968         * page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.mm:
969         * page/scrolling/ios/ScrollingTreeIOS.cpp:
970         * page/scrolling/ios/ScrollingTreeIOS.h:
971         * platform/ContentFilterUnblockHandler.h:
972         * platform/Cursor.cpp:
973         * platform/Cursor.h:
974         * platform/DragImage.cpp:
975         * platform/DragImage.h:
976         * platform/FileChooser.cpp:
977         * platform/FileChooser.h:
978         * platform/HostWindow.h:
979         * platform/LocalizedStrings.cpp:
980         * platform/LocalizedStrings.h:
981         * platform/LowPowerModeNotifier.cpp:
982         * platform/LowPowerModeNotifier.h:
983         * platform/MIMETypeRegistry.cpp:
984         (WebCore::initializeSupportedImageMIMETypes):
985         (WebCore::initializeSupportedNonImageMimeTypes):
986         (WebCore::initializeUnsupportedTextMIMETypes):
987         * platform/Pasteboard.h:
988         * platform/PasteboardStrategy.h:
989         * platform/PlatformKeyboardEvent.h:
990         * platform/PlatformPasteboard.h:
991         * platform/PlatformScreen.h:
992         * platform/RemoteCommandListener.cpp:
993         * platform/RuntimeApplicationChecks.h:
994         * platform/ScrollAnimator.cpp:
995         * platform/ScrollView.cpp:
996         (WebCore::ScrollView::contentsScrollPosition const):
997         (WebCore::ScrollView::setContentsScrollPosition):
998         (WebCore::ScrollView::visibleContentRectInternal const):
999         * platform/ScrollView.h:
1000         * platform/ScrollableArea.cpp:
1001         * platform/ScrollableArea.h:
1002         * platform/Scrollbar.cpp:
1003         * platform/Scrollbar.h:
1004         * platform/ThreadTimers.cpp:
1005         * platform/Timer.cpp:
1006         (WebCore::shouldSuppressThreadSafetyCheck):
1007         * platform/Timer.h:
1008         (WebCore::TimerBase::isActive const):
1009         * platform/ValidationBubble.h:
1010         * platform/Widget.h:
1011         * platform/audio/AudioHardwareListener.cpp:
1012         (WebCore::AudioHardwareListener::AudioHardwareListener):
1013         * platform/audio/PlatformMediaSession.h:
1014         * platform/audio/PlatformMediaSessionManager.h:
1015         * platform/audio/ios/AudioDestinationIOS.cpp:
1016         * platform/audio/ios/AudioDestinationIOS.h:
1017         * platform/audio/ios/AudioFileReaderIOS.cpp:
1018         * platform/audio/ios/AudioFileReaderIOS.h:
1019         * platform/audio/ios/AudioSessionIOS.mm:
1020         (WebCore::AudioSession::setCategory):
1021         (WebCore::AudioSession::routingContextUID const):
1022         * platform/audio/ios/MediaSessionManagerIOS.h:
1023         * platform/audio/ios/MediaSessionManagerIOS.mm:
1024         * platform/cf/MainThreadSharedTimerCF.cpp:
1025         (WebCore::setupPowerObserver):
1026         (WebCore::MainThreadSharedTimer::setFireInterval):
1027         * platform/cf/URLCF.cpp:
1028         * platform/cocoa/ContentFilterUnblockHandlerCocoa.mm:
1029         (WebCore::ContentFilterUnblockHandler::wrapWithDecisionHandler):
1030         (WebCore::ContentFilterUnblockHandler::needsUIProcess const):
1031         (WebCore::ContentFilterUnblockHandler::encode const):
1032         (WebCore::ContentFilterUnblockHandler::decode):
1033         (WebCore::ContentFilterUnblockHandler::canHandleRequest const):
1034         (WebCore::dispatchToMainThread):
1035         (WebCore::ContentFilterUnblockHandler::requestUnblockAsync const):
1036         * platform/cocoa/DataDetectorsCoreSoftLink.h:
1037         * platform/cocoa/DataDetectorsCoreSoftLink.mm:
1038         * platform/cocoa/KeyEventCocoa.mm:
1039         * platform/cocoa/LocalizedStringsCocoa.mm:
1040         (WebCore::localizedNSString):
1041         * platform/cocoa/NetworkExtensionContentFilter.mm:
1042         (WebCore::NetworkExtensionContentFilter::initialize):
1043         * platform/cocoa/ParentalControlsContentFilter.mm:
1044         (WebCore::ParentalControlsContentFilter::unblockHandler const):
1045         * platform/cocoa/PasteboardCocoa.mm:
1046         (WebCore::Pasteboard::fileContentState):
1047         * platform/cocoa/PlatformView.h:
1048         * platform/cocoa/PlaybackSessionInterface.h:
1049         * platform/cocoa/PlaybackSessionModel.h:
1050         * platform/cocoa/PlaybackSessionModelMediaElement.h:
1051         * platform/cocoa/PlaybackSessionModelMediaElement.mm:
1052         * platform/cocoa/RuntimeApplicationChecksCocoa.mm:
1053         * platform/cocoa/SystemVersion.mm:
1054         (WebCore::createSystemMarketingVersion):
1055         * platform/cocoa/VideoFullscreenChangeObserver.h:
1056         * platform/cocoa/VideoFullscreenModel.h:
1057         * platform/cocoa/VideoFullscreenModelVideoElement.h:
1058         * platform/cocoa/VideoFullscreenModelVideoElement.mm:
1059         * platform/gamepad/cocoa/GameControllerGamepad.h:
1060         * platform/gamepad/cocoa/GameControllerGamepad.mm:
1061         * platform/gamepad/cocoa/GameControllerGamepadProvider.h:
1062         * platform/gamepad/cocoa/GameControllerGamepadProvider.mm:
1063         * platform/graphics/BitmapImage.h:
1064         * platform/graphics/Color.h:
1065         * platform/graphics/ComplexTextController.cpp:
1066         * platform/graphics/DisplayRefreshMonitor.cpp:
1067         (WebCore::DisplayRefreshMonitor::createDefaultDisplayRefreshMonitor):
1068         * platform/graphics/FloatSize.h:
1069         * platform/graphics/Font.cpp:
1070         (WebCore::Font::Font):
1071         (WebCore::createAndFillGlyphPage):
1072         * platform/graphics/Font.h:
1073         * platform/graphics/FontCache.cpp:
1074         (WebCore::FontCache::getCachedFontPlatformData):
1075         (WebCore::FontCache::fontForPlatformData):
1076         (WebCore::FontCache::purgeInactiveFontData):
1077         (WebCore::FontCache::inactiveFontCount):
1078         * platform/graphics/FontCascade.cpp:
1079         (WebCore::FontCascade::FontCascade):
1080         * platform/graphics/FontCascadeFonts.h:
1081         * platform/graphics/FontDescription.h:
1082         * platform/graphics/FontPlatformData.h:
1083         (WebCore::FontPlatformData::isEmoji const):
1084         * platform/graphics/GraphicsContext.cpp:
1085         (WebCore::GraphicsContext::drawImage):
1086         * platform/graphics/GraphicsContext3D.h:
1087         * platform/graphics/GraphicsLayer.h:
1088         * platform/graphics/Icon.h:
1089         * platform/graphics/Image.cpp:
1090         (WebCore::Image::drawTiled):
1091         (WebCore::Image::computeIntrinsicDimensions):
1092         * platform/graphics/Image.h:
1093         * platform/graphics/IntPoint.h:
1094         * platform/graphics/IntRect.h:
1095         * platform/graphics/IntSize.h:
1096         * platform/graphics/MediaPlayer.cpp:
1097         (WebCore::MediaPlayer::isAvailable):
1098         (WebCore::MediaPlayer::volumeChanged):
1099         * platform/graphics/MediaPlayer.h:
1100         * platform/graphics/MediaPlayerPrivate.h:
1101         * platform/graphics/NamedImageGeneratedImage.cpp:
1102         (WebCore::NamedImageGeneratedImage::draw):
1103         * platform/graphics/StringTruncator.cpp:
1104         (WebCore::centerTruncateToBuffer):
1105         (WebCore::rightTruncateToBuffer):
1106         (WebCore::rightClipToWordBuffer):
1107         * platform/graphics/TextTrackRepresentation.cpp:
1108         * platform/graphics/avfoundation/InbandMetadataTextTrackPrivateAVF.cpp:
1109         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
1110         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.h:
1111         * platform/graphics/avfoundation/MediaPlaybackTargetMac.mm:
1112         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
1113         (WebCore::MediaPlayerPrivateAVFoundation::supportsFullscreen const):
1114         (WebCore::MediaPlayerPrivateAVFoundation::rateChanged):
1115         * platform/graphics/avfoundation/WebMediaSessionManagerMac.cpp:
1116         * platform/graphics/avfoundation/WebMediaSessionManagerMac.h:
1117         * platform/graphics/avfoundation/cf/InbandTextTrackPrivateLegacyAVCF.cpp:
1118         * platform/graphics/avfoundation/cf/InbandTextTrackPrivateLegacyAVCF.h:
1119         * platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.mm:
1120         (WebCore::CDMInstanceFairPlayStreamingAVFObjC::supportsPersistentKeys):
1121         * platform/graphics/avfoundation/objc/InbandTextTrackPrivateLegacyAVFObjC.h:
1122         * platform/graphics/avfoundation/objc/InbandTextTrackPrivateLegacyAVFObjC.mm:
1123         * platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.h:
1124         * platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm:
1125         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
1126         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1127         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerLayer):
1128         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL):
1129         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer):
1130         (WebCore::MediaPlayerPrivateAVFoundationObjC::setVideoFullscreenMode):
1131         (WebCore::MediaPlayerPrivateAVFoundationObjC::setVolume):
1132         (WebCore::MediaPlayerPrivateAVFoundationObjC::seekableTimeRangesLastModifiedTime const):
1133         (WebCore::MediaPlayerPrivateAVFoundationObjC::liveUpdateInterval const):
1134         (WebCore::MediaPlayerPrivateAVFoundationObjC::maximumDurationToCacheMediaTime const):
1135         (WebCore::MediaPlayerPrivateAVFoundationObjC::didPassCORSAccessCheck const):
1136         (WebCore::MediaPlayerPrivateAVFoundationObjC::wouldTaintOrigin const):
1137         (WebCore::MediaPlayerPrivateAVFoundationObjC::isCurrentPlaybackTargetWireless const):
1138         (WebCore::MediaPlayerPrivateAVFoundationObjC::wirelessPlaybackTargetType const):
1139         (WebCore::MediaPlayerPrivateAVFoundationObjC::wirelessPlaybackTargetName const):
1140         (WebCore::MediaPlayerPrivateAVFoundationObjC::updateDisableExternalPlayback):
1141         (WebCore::MediaPlayerPrivateAVFoundationObjC::setShouldDisableSleep):
1142         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
1143         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::supportsPictureInPicture const):
1144         * platform/graphics/avfoundation/objc/OutOfBandTextTrackPrivateAVF.h:
1145         * platform/graphics/ca/GraphicsLayerCA.cpp:
1146         (WebCore::GraphicsLayerCA::flushCompositingState):
1147         (WebCore::GraphicsLayerCA::computeVisibleAndCoverageRect const):
1148         (WebCore::GraphicsLayerCA::createTransformAnimationsFromKeyframes):
1149         * platform/graphics/ca/GraphicsLayerCA.h:
1150         * platform/graphics/ca/PlatformCALayer.h:
1151         * platform/graphics/ca/TileController.cpp:
1152         (WebCore::TileController::~TileController):
1153         (WebCore::TileController::adjustTileCoverageRect const):
1154         * platform/graphics/ca/TileController.h:
1155         * platform/graphics/ca/TileGrid.cpp:
1156         (WebCore::TileGrid::startedNewCohort):
1157         (WebCore::TileGrid::platformCALayerPaintContents):
1158         * platform/graphics/ca/TileGrid.h:
1159         * platform/graphics/ca/cocoa/LayerFlushSchedulerMac.cpp:
1160         (WebCore::currentRunLoop):
1161         * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
1162         (-[WebAnimationDelegate animationDidStart:]):
1163         (-[WebAnimationDelegate animationDidStop:finished:]):
1164         (WebCore::PlatformCALayerCocoa::setContentsScale):
1165         (WebCore::layerContentsFormat):
1166         (WebCore::PlatformCALayer::drawLayerContents):
1167         (WebCore::PlatformCALayerCocoa::backingStoreBytesPerPixel const):
1168         * platform/graphics/cg/GradientCG.cpp:
1169         (WebCore::Gradient::paint):
1170         * platform/graphics/cg/GraphicsContextCG.cpp:
1171         (WebCore::displayP3ColorSpaceRef):
1172         (WebCore::GraphicsContext::drawNativeImage):
1173         (WebCore::drawPatternCallback):
1174         (WebCore::GraphicsContext::drawPattern):
1175         (WebCore::GraphicsContext::drawLine):
1176         (WebCore::applyShadowOffsetWorkaroundIfNeeded):
1177         (WebCore::GraphicsContext::setURLForRect):
1178         * platform/graphics/cg/ImageBufferCG.cpp:
1179         (WebCore::jpegUTI):
1180         * platform/graphics/cg/ImageBufferDataCG.cpp:
1181         * platform/graphics/cg/ImageDecoderCG.cpp:
1182         (WebCore::ImageDecoderCG::createFrameImageAtIndex):
1183         * platform/graphics/cg/ImageSourceCGMac.mm:
1184         * platform/graphics/cg/PDFDocumentImage.cpp:
1185         * platform/graphics/cocoa/ColorCocoa.h:
1186         * platform/graphics/cocoa/ColorCocoa.mm:
1187         * platform/graphics/cocoa/FontCacheCoreText.cpp:
1188         (WebCore::FontCache::similarFont):
1189         (WebCore::computeNecessarySynthesis):
1190         (WebCore::FontDatabase::fontForPostScriptName):
1191         (WebCore::variationCapabilitiesForFontDescriptor):
1192         (WebCore::lookupFallbackFont):
1193         (WebCore::FontCache::systemFallbackForCharacters):
1194         (WebCore::FontCache::lastResortFallbackFont):
1195         * platform/graphics/cocoa/FontCascadeCocoa.mm:
1196         (WebCore::FontCascade::drawGlyphs):
1197         (WebCore::FontCascade::fontForCombiningCharacterSequence const):
1198         * platform/graphics/cocoa/FontCocoa.mm:
1199         (WebCore::Font::platformInit):
1200         (WebCore::Font::variantCapsSupportsCharacterForSynthesis const):
1201         (WebCore::Font::determinePitch):
1202         * platform/graphics/cocoa/FontDescriptionCocoa.cpp:
1203         (WebCore::FontCascadeDescription::effectiveFamilyCount const):
1204         (WebCore::FontCascadeDescription::effectiveFamilyAt const):
1205         * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
1206         (WebCore::FontPlatformData::FontPlatformData):
1207         (WebCore::cascadeToLastResortAndVariationsFontDescriptor):
1208         * platform/graphics/cocoa/GraphicsContext3DCocoa.mm:
1209         (WebCore::GraphicsContext3D::GraphicsContext3D):
1210         (WebCore::GraphicsContext3D::texImageIOSurface2D):
1211         * platform/graphics/cocoa/GraphicsContextCocoa.mm:
1212         * platform/graphics/cocoa/IOSurface.mm:
1213         (WebCore::optionsForBiplanarSurface):
1214         (WebCore::optionsFor32BitSurface):
1215         (WebCore::IOSurface::maximumSize):
1216         (WebCore::IOSurface::surfaceID const):
1217         * platform/graphics/cocoa/SystemFontDatabaseCoreText.cpp:
1218         (WebCore::SystemFontDatabaseCoreText::cascadeList):
1219         * platform/graphics/cocoa/TextTrackRepresentationCocoa.h:
1220         * platform/graphics/cocoa/TextTrackRepresentationCocoa.mm:
1221         (-[WebCoreTextTrackRepresentationCocoaHelper observeValueForKeyPath:ofObject:change:context:]):
1222         * platform/graphics/cocoa/WebMetalLayer.h:
1223         * platform/graphics/cv/ImageTransferSessionVT.mm:
1224         (WebCore::cvPixelFormatOpenGLKey):
1225         (WebCore::ImageTransferSessionVT::ImageTransferSessionVT):
1226         * platform/graphics/cv/VideoTextureCopierCV.h:
1227         * platform/graphics/ios/DisplayRefreshMonitorIOS.h:
1228         * platform/graphics/ios/DisplayRefreshMonitorIOS.mm:
1229         * platform/graphics/ios/FontAntialiasingStateSaver.h:
1230         (WebCore::FontAntialiasingStateSaver::FontAntialiasingStateSaver):
1231         (WebCore::FontAntialiasingStateSaver::setup):
1232         (WebCore::FontAntialiasingStateSaver::restore):
1233         * platform/graphics/ios/FontCacheIOS.mm:
1234         * platform/graphics/ios/IconIOS.mm:
1235         * platform/graphics/mac/ComplexTextControllerCoreText.mm:
1236         (WebCore::ComplexTextController::collectComplexTextRunsForCharacters):
1237         * platform/graphics/mac/FloatPointMac.mm:
1238         * platform/graphics/mac/FloatRectMac.mm:
1239         * platform/graphics/mac/FloatSizeMac.mm:
1240         * platform/graphics/mac/FontCustomPlatformData.cpp:
1241         (WebCore::createFontCustomPlatformData):
1242         * platform/graphics/mac/ImageMac.mm:
1243         * platform/graphics/mac/IntPointMac.mm:
1244         * platform/graphics/mac/IntRectMac.mm:
1245         * platform/graphics/mac/IntSizeMac.mm:
1246         * platform/graphics/mac/WebKitNSImageExtras.h:
1247         * platform/graphics/mac/WebKitNSImageExtras.mm:
1248         * platform/graphics/mac/WebLayer.mm:
1249         (-[WebSimpleLayer display]):
1250         (-[WebSimpleLayer drawInContext:]):
1251         * platform/graphics/opengl/Extensions3DOpenGL.cpp:
1252         (WebCore::Extensions3DOpenGL::supportsExtension):
1253         * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
1254         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
1255         * platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp:
1256         * platform/graphics/transforms/TransformationMatrix.cpp:
1257         (WebCore::TransformationMatrix::multiply):
1258         * platform/graphics/transforms/TransformationMatrix.h:
1259         * platform/ios/CursorIOS.cpp:
1260         * platform/ios/Device.cpp:
1261         * platform/ios/Device.h:
1262         * platform/ios/DeviceMotionClientIOS.h:
1263         * platform/ios/DeviceMotionClientIOS.mm:
1264         (WebCore::DeviceMotionClientIOS::motionChanged):
1265         * platform/ios/DeviceOrientationClientIOS.h:
1266         * platform/ios/DeviceOrientationClientIOS.mm:
1267         (WebCore::DeviceOrientationClientIOS::orientationChanged):
1268         * platform/ios/DragImageIOS.mm:
1269         * platform/ios/EventLoopIOS.mm:
1270         * platform/ios/KeyEventIOS.mm:
1271         * platform/ios/LegacyTileCache.h:
1272         * platform/ios/LegacyTileCache.mm:
1273         * platform/ios/LegacyTileGrid.h:
1274         * platform/ios/LegacyTileGrid.mm:
1275         * platform/ios/LegacyTileGridTile.h:
1276         * platform/ios/LegacyTileGridTile.mm:
1277         * platform/ios/LegacyTileLayer.h:
1278         * platform/ios/LegacyTileLayer.mm:
1279         * platform/ios/LegacyTileLayerPool.h:
1280         * platform/ios/LegacyTileLayerPool.mm:
1281         * platform/ios/LowPowerModeNotifierIOS.mm:
1282         * platform/ios/PasteboardIOS.mm:
1283         * platform/ios/PlatformEventFactoryIOS.h:
1284         * platform/ios/PlatformEventFactoryIOS.mm:
1285         * platform/ios/PlatformPasteboardIOS.mm:
1286         * platform/ios/PlatformScreenIOS.mm:
1287         * platform/ios/PlatformSpeechSynthesizerIOS.mm:
1288         * platform/ios/PlaybackSessionInterfaceAVKit.h:
1289         * platform/ios/PlaybackSessionInterfaceAVKit.mm:
1290         * platform/ios/RemoteCommandListenerIOS.h:
1291         * platform/ios/RemoteCommandListenerIOS.mm:
1292         * platform/ios/SSLKeyGeneratorIOS.cpp:
1293         * platform/ios/ScrollAnimatorIOS.h:
1294         * platform/ios/ScrollAnimatorIOS.mm:
1295         * platform/ios/ScrollViewIOS.mm:
1296         (WebCore::ScrollView::platformSetContentsSize):
1297         * platform/ios/ScrollbarThemeIOS.h:
1298         * platform/ios/ScrollbarThemeIOS.mm:
1299         * platform/ios/SystemMemoryIOS.cpp:
1300         (WebCore::systemMemoryLevel):
1301         * platform/ios/ThemeIOS.h:
1302         * platform/ios/ThemeIOS.mm:
1303         * platform/ios/TileControllerMemoryHandlerIOS.cpp:
1304         * platform/ios/TileControllerMemoryHandlerIOS.h:
1305         * platform/ios/UserAgentIOS.mm:
1306         (WebCore::deviceNameForUserAgent):
1307         * platform/ios/ValidationBubbleIOS.mm:
1308         * platform/ios/VideoFullscreenInterfaceAVKit.h:
1309         * platform/ios/VideoFullscreenInterfaceAVKit.mm:
1310         (WebCore::supportsPictureInPicture):
1311         * platform/ios/WebAVPlayerController.h:
1312         * platform/ios/WebAVPlayerController.mm:
1313         * platform/ios/WebBackgroundTaskController.h:
1314         * platform/ios/WebBackgroundTaskController.mm:
1315         * platform/ios/WebCoreMotionManager.h:
1316         * platform/ios/WebCoreMotionManager.mm:
1317         * platform/ios/WebEvent.h:
1318         * platform/ios/WebEvent.mm:
1319         * platform/ios/WebSQLiteDatabaseTrackerClient.h:
1320         * platform/ios/WebSQLiteDatabaseTrackerClient.mm:
1321         * platform/ios/WebVideoFullscreenControllerAVKit.h:
1322         * platform/ios/WebVideoFullscreenControllerAVKit.mm:
1323         (VideoFullscreenControllerContext::requestUpdateInlineRect):
1324         (VideoFullscreenControllerContext::requestVideoContentLayer):
1325         (VideoFullscreenControllerContext::returnVideoContentLayer):
1326         (VideoFullscreenControllerContext::didSetupFullscreen):
1327         (VideoFullscreenControllerContext::didExitFullscreen):
1328         * platform/ios/WidgetIOS.mm:
1329         * platform/ios/wak/FloatingPointEnvironment.cpp:
1330         * platform/ios/wak/FloatingPointEnvironment.h:
1331         * platform/ios/wak/WAKAppKitStubs.m:
1332         * platform/ios/wak/WAKClipView.m:
1333         * platform/ios/wak/WAKResponder.m:
1334         * platform/ios/wak/WAKScrollView.mm:
1335         * platform/ios/wak/WAKView.mm:
1336         * platform/ios/wak/WAKWindow.mm:
1337         * platform/ios/wak/WKContentObservation.cpp:
1338         * platform/ios/wak/WKGraphics.mm:
1339         * platform/ios/wak/WKUtilities.c:
1340         * platform/ios/wak/WKView.mm:
1341         * platform/ios/wak/WebCoreThread.mm:
1342         * platform/ios/wak/WebCoreThreadRun.cpp:
1343         * platform/ios/wak/WebCoreThreadSystemInterface.cpp:
1344         * platform/mac/DragDataMac.mm:
1345         (WebCore::rtfPasteboardType):
1346         (WebCore::rtfdPasteboardType):
1347         (WebCore::stringPasteboardType):
1348         (WebCore::urlPasteboardType):
1349         (WebCore::htmlPasteboardType):
1350         (WebCore::colorPasteboardType):
1351         (WebCore::pdfPasteboardType):
1352         (WebCore::tiffPasteboardType):
1353         (WebCore::DragData::containsURL const):
1354         * platform/mac/MediaRemoteSoftLink.cpp:
1355         * platform/mac/MediaRemoteSoftLink.h:
1356         * platform/mac/SuddenTermination.mm:
1357         * platform/mac/WebCoreFullScreenPlaceholderView.mm:
1358         * platform/mac/WebCoreFullScreenWarningView.h:
1359         * platform/mac/WebCoreFullScreenWarningView.mm:
1360         * platform/mac/WebCoreFullScreenWindow.h:
1361         * platform/mac/WebCoreFullScreenWindow.mm:
1362         * platform/mac/WebNSAttributedStringExtras.mm:
1363         * platform/mediastream/RealtimeMediaSourceFactory.h:
1364         * platform/mediastream/RealtimeVideoSource.cpp:
1365         (WebCore::RealtimeVideoSource::~RealtimeVideoSource):
1366         (WebCore::RealtimeVideoSource::prepareToProduceData):
1367         * platform/mediastream/ios/AVAudioSessionCaptureDevice.h:
1368         * platform/mediastream/ios/AVAudioSessionCaptureDevice.mm:
1369         * platform/mediastream/ios/AVAudioSessionCaptureDeviceManager.h:
1370         * platform/mediastream/ios/AVAudioSessionCaptureDeviceManager.mm:
1371         * platform/mediastream/ios/CoreAudioCaptureSourceIOS.h:
1372         * platform/mediastream/ios/CoreAudioCaptureSourceIOS.mm:
1373         * platform/mediastream/libwebrtc/LibWebRTCMacros.h:
1374         * platform/mediastream/mac/AVCaptureDeviceManager.mm:
1375         (WebCore::deviceIsAvailable):
1376         * platform/mediastream/mac/AVMediaCaptureSource.mm:
1377         (WebCore::AVMediaCaptureSource::AVMediaCaptureSource):
1378         (WebCore::AVMediaCaptureSource::stopProducingData):
1379         (-[WebCoreAVMediaCaptureSourceObserver addNotificationObservers]):
1380         (-[WebCoreAVMediaCaptureSourceObserver removeNotificationObservers]):
1381         * platform/mediastream/mac/AVVideoCaptureSource.mm:
1382         (WebCore::AVVideoCaptureSource::AVVideoCaptureSource):
1383         (WebCore::AVVideoCaptureSource::~AVVideoCaptureSource):
1384         (WebCore::AVVideoCaptureSource::stopProducingData):
1385         (WebCore::AVVideoCaptureSource::prefersPreset):
1386         (WebCore::sensorOrientation):
1387         (WebCore::AVVideoCaptureSource::setupCaptureSession):
1388         (WebCore::AVVideoCaptureSource::monitorOrientation):
1389         (-[WebCoreAVVideoCaptureSourceObserver addNotificationObservers]):
1390         (-[WebCoreAVVideoCaptureSourceObserver removeNotificationObservers]):
1391         * platform/mediastream/mac/AudioTrackPrivateMediaStreamCocoa.cpp:
1392         (WebCore::AudioTrackPrivateMediaStreamCocoa::createAudioUnit):
1393         * platform/mediastream/mac/CoreAudioCaptureSource.cpp:
1394         (WebCore::CoreAudioSharedUnit::setupAudioUnit):
1395         (WebCore::CoreAudioCaptureSource::create):
1396         (WebCore::CoreAudioCaptureSource::CoreAudioCaptureSource):
1397         (WebCore::CoreAudioCaptureSource::~CoreAudioCaptureSource):
1398         (WebCore::CoreAudioCaptureSource::startProducingData):
1399         * platform/mediastream/mac/CoreAudioCaptureSource.h:
1400         * platform/mediastream/mac/DisplayCaptureSourceCocoa.cpp:
1401         (WebCore::DisplayCaptureSourceCocoa::~DisplayCaptureSourceCocoa):
1402         (WebCore::DisplayCaptureSourceCocoa::startProducingData):
1403         * platform/mediastream/mac/RealtimeIncomingVideoSourceCocoa.mm:
1404         (WebCore::RealtimeIncomingVideoSourceCocoa::pixelBufferPool):
1405         * platform/mediastream/mac/RealtimeMediaSourceCenterMac.cpp:
1406         * platform/mock/MediaPlaybackTargetMock.cpp:
1407         * platform/mock/MediaPlaybackTargetMock.h:
1408         * platform/mock/MediaPlaybackTargetPickerMock.cpp:
1409         * platform/mock/MediaPlaybackTargetPickerMock.h:
1410         * platform/mock/MockRealtimeAudioSource.cpp:
1411         (WebCore::MockRealtimeAudioSource::~MockRealtimeAudioSource):
1412         (WebCore::MockRealtimeAudioSource::startProducingData):
1413         * platform/mock/MockRealtimeMediaSourceCenter.cpp:
1414         * platform/mock/MockRealtimeVideoSource.cpp:
1415         * platform/network/CredentialStorage.cpp:
1416         * platform/network/NetworkStateNotifier.h:
1417         * platform/network/ResourceHandle.cpp:
1418         (WebCore::builtinResourceHandleConstructorMap):
1419         * platform/network/ResourceHandle.h:
1420         * platform/network/ResourceHandleClient.h:
1421         * platform/network/ResourceRequestBase.cpp:
1422         * platform/network/ResourceRequestBase.h:
1423         * platform/network/cf/DNSResolveQueueCFNet.cpp:
1424         * platform/network/cf/ProxyServerCFNet.cpp:
1425         * platform/network/cf/ResourceHandleCFNet.cpp:
1426         (WebCore::ResourceHandle::createCFURLConnection):
1427         * platform/network/cf/ResourceRequest.h:
1428         (WebCore::ResourceRequest::resourcePrioritiesEnabled):
1429         * platform/network/cf/ResourceRequestCFNet.cpp:
1430         (WebCore::ResourceRequest::doUpdatePlatformRequest):
1431         (WebCore::ResourceRequest::doUpdateResourceRequest):
1432         * platform/network/cf/SocketStreamHandleImplCFNet.cpp:
1433         (WebCore::callbacksRunLoop):
1434         (WebCore::copyCONNECTProxyResponse):
1435         * platform/network/cocoa/CookieCocoa.mm:
1436         (WebCore::Cookie::operator NSHTTPCookie * _Nullable  const):
1437         * platform/network/cocoa/NetworkStorageSessionCocoa.mm:
1438         (WebCore::cookiesForURL):
1439         (WebCore::setHTTPCookiesForURL):
1440         * platform/network/cocoa/ResourceRequestCocoa.mm:
1441         (WebCore::ResourceRequest::doUpdateResourceRequest):
1442         (WebCore::ResourceRequest::doUpdatePlatformRequest):
1443         * platform/network/ios/NetworkStateNotifierIOS.mm:
1444         * platform/network/ios/WebCoreURLResponseIOS.h:
1445         * platform/network/ios/WebCoreURLResponseIOS.mm:
1446         * platform/network/mac/ResourceErrorMac.mm:
1447         * platform/network/mac/ResourceHandleMac.mm:
1448         (WebCore::ResourceHandle::createNSURLConnection):
1449         (WebCore::ResourceHandle::start):
1450         (WebCore::ResourceHandle::platformLoadResourceSynchronously):
1451         (WebCore::ResourceHandle::didReceiveAuthenticationChallenge):
1452         * platform/network/mac/UTIUtilities.mm:
1453         * platform/sql/SQLiteDatabase.h:
1454         (WebCore::SQLiteDatabase::sqlite3Handle const):
1455         * platform/sql/SQLiteFileSystem.cpp:
1456         * platform/sql/SQLiteFileSystem.h:
1457         * platform/sql/SQLiteTransaction.cpp:
1458         (WebCore::SQLiteTransaction::begin):
1459         (WebCore::SQLiteTransaction::commit):
1460         (WebCore::SQLiteTransaction::rollback):
1461         (WebCore::SQLiteTransaction::stop):
1462         * platform/text/PlatformLocale.cpp:
1463         * platform/text/PlatformLocale.h:
1464         * platform/text/ios/LocalizedDateCache.h:
1465         * platform/text/ios/LocalizedDateCache.mm:
1466         * platform/text/ios/TextEncodingRegistryIOS.mm:
1467         * platform/text/mac/LocaleMac.h:
1468         * platform/text/mac/LocaleMac.mm:
1469         * plugins/PluginViewBase.h:
1470         * rendering/InlineTextBox.cpp:
1471         (WebCore::InlineTextBox::paintPlatformDocumentMarker):
1472         (WebCore::InlineTextBox::resolveStyleForMarkedText):
1473         (WebCore::InlineTextBox::collectMarkedTextsForDocumentMarkers):
1474         * rendering/MarkedText.h:
1475         * rendering/RenderBlock.cpp:
1476         (WebCore::RenderBlock::paint):
1477         * rendering/RenderBox.cpp:
1478         (WebCore::RenderBox::paintBoxDecorations):
1479         (WebCore::allowMinMaxPercentagesInAutoHeightBlocksQuirk):
1480         * rendering/RenderBoxModelObject.cpp:
1481         (WebCore::RenderBoxModelObject::decodingModeForImageDraw const):
1482         * rendering/RenderButton.cpp:
1483         * rendering/RenderButton.h:
1484         * rendering/RenderElement.cpp:
1485         (WebCore::RenderElement::styleWillChange):
1486         (WebCore::RenderElement::styleDidChange):
1487         * rendering/RenderEmbeddedObject.cpp:
1488         (WebCore::RenderEmbeddedObject::allowsAcceleratedCompositing const):
1489         (WebCore::RenderEmbeddedObject::setPluginUnavailabilityReason):
1490         (WebCore::RenderEmbeddedObject::setPluginUnavailabilityReasonWithDescription):
1491         * rendering/RenderFileUploadControl.cpp:
1492         (WebCore::RenderFileUploadControl::maxFilenameWidth const):
1493         (WebCore::RenderFileUploadControl::paintObject):
1494         * rendering/RenderFrameSet.cpp:
1495         (WebCore::RenderFrameSet::positionFrames):
1496         * rendering/RenderIFrame.h:
1497         * rendering/RenderImage.cpp:
1498         (WebCore::RenderImage::paintAreaElementFocusRing):
1499         * rendering/RenderImage.h:
1500         * rendering/RenderInline.cpp:
1501         * rendering/RenderInline.h:
1502         * rendering/RenderLayer.cpp:
1503         (WebCore::RenderLayer::RenderLayer):
1504         (WebCore::canCreateStackingContext):
1505         (WebCore::RenderLayer::canUseAcceleratedTouchScrolling const):
1506         (WebCore::RenderLayer::scrollTo):
1507         (WebCore::RenderLayer::scrollRectToVisible):
1508         (WebCore::RenderLayer::updateScrollInfoAfterLayout):
1509         (WebCore::RenderLayer::showsOverflowControls const):
1510         (WebCore::RenderLayer::calculateClipRects const):
1511         * rendering/RenderLayer.h:
1512         * rendering/RenderLayerBacking.cpp:
1513         (WebCore::RenderLayerBacking::createPrimaryGraphicsLayer):
1514         (WebCore::RenderLayerBacking::shouldClipCompositedBounds const):
1515         (WebCore::RenderLayerBacking::updateConfiguration):
1516         (WebCore::RenderLayerBacking::computeParentGraphicsLayerRect const):
1517         (WebCore::RenderLayerBacking::updateGeometry):
1518         (WebCore::RenderLayerBacking::paintsIntoWindow const):
1519         (WebCore::RenderLayerBacking::setContentsNeedDisplayInRect):
1520         (WebCore::RenderLayerBacking::paintIntoLayer):
1521         * rendering/RenderLayerBacking.h:
1522         * rendering/RenderLayerCompositor.cpp:
1523         (WebCore::RenderLayerCompositor::visibleRectForLayerFlushing const):
1524         (WebCore::RenderLayerCompositor::flushPendingLayerChanges):
1525         (WebCore::RenderLayerCompositor::updateCustomLayersAfterFlush):
1526         (WebCore::RenderLayerCompositor::didFlushChangesForLayer):
1527         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
1528         (WebCore::RenderLayerCompositor::setIsInWindow):
1529         (WebCore::RenderLayerCompositor::requiresCompositingForScrollableFrame const):
1530         (WebCore::RenderLayerCompositor::isAsyncScrollableStickyLayer const):
1531         (WebCore::RenderLayerCompositor::requiresCompositingForOverflowScrolling const):
1532         (WebCore::RenderLayerCompositor::contentsScaleMultiplierForNewTiles const):
1533         (WebCore::RenderLayerCompositor::ensureRootLayer):
1534         (WebCore::RenderLayerCompositor::computeStickyViewportConstraints const):
1535         (WebCore::RenderLayerCompositor::willRemoveScrollingLayerWithBacking):
1536         (WebCore::RenderLayerCompositor::didAddScrollingLayer):
1537         * rendering/RenderLayerCompositor.h:
1538         * rendering/RenderLayerModelObject.cpp:
1539         (WebCore::RenderLayerModelObject::shouldPlaceBlockDirectionScrollbarOnLeft const):
1540         * rendering/RenderLineBreak.cpp:
1541         * rendering/RenderLineBreak.h:
1542         * rendering/RenderMenuList.cpp:
1543         (WebCore::RenderMenuList::RenderMenuList):
1544         (WebCore::RenderMenuList::willBeDestroyed):
1545         (WebCore::RenderMenuList::adjustInnerStyle):
1546         (RenderMenuList::updateFromElement):
1547         (RenderMenuList::setTextFromOption):
1548         (RenderMenuList::hidePopup):
1549         (RenderMenuList::popupDidHide):
1550         * rendering/RenderMenuList.h:
1551         * rendering/RenderObject.cpp:
1552         (WebCore::RenderObject::shouldApplyCompositedContainerScrollsForRepaint):
1553         (WebCore::RenderObject::destroy):
1554         * rendering/RenderObject.h:
1555         * rendering/RenderSearchField.cpp:
1556         (WebCore::RenderSearchField::itemText const):
1557         * rendering/RenderText.cpp:
1558         (WebCore::RenderText::setRenderedText):
1559         * rendering/RenderText.h:
1560         * rendering/RenderTextControl.cpp:
1561         * rendering/RenderTextControl.h:
1562         * rendering/RenderTextControlMultiLine.cpp:
1563         (WebCore::RenderTextControlMultiLine::getAverageCharWidth):
1564         * rendering/RenderTextControlSingleLine.cpp:
1565         (WebCore::RenderTextControlSingleLine::layout):
1566         (WebCore::RenderTextControlSingleLine::getAverageCharWidth):
1567         (WebCore::RenderTextControlSingleLine::preferredContentLogicalWidth const):
1568         * rendering/RenderTextLineBoxes.cpp:
1569         (WebCore::lineDirectionPointFitsInBox):
1570         (WebCore::RenderTextLineBoxes::positionForPoint const):
1571         * rendering/RenderTheme.cpp:
1572         (WebCore::RenderTheme::paintBorderOnly):
1573         * rendering/RenderThemeIOS.h:
1574         * rendering/RenderThemeIOS.mm:
1575         (WebCore::arKitBundle):
1576         * rendering/RenderView.cpp:
1577         (WebCore::RenderView::availableLogicalHeight const):
1578         (WebCore::RenderView::clientLogicalWidthForFixedPosition const):
1579         (WebCore::RenderView::clientLogicalHeightForFixedPosition const):
1580         (WebCore::RenderView::repaintViewRectangle const):
1581         * rendering/RenderWidget.cpp:
1582         (WebCore::RenderWidget::willBeDestroyed):
1583         * rendering/RootInlineBox.cpp:
1584         (WebCore::RootInlineBox::selectionTop const):
1585         (WebCore::RootInlineBox::selectionBottom const):
1586         * rendering/style/RenderStyle.h:
1587         * rendering/style/StyleRareInheritedData.cpp:
1588         (WebCore::StyleRareInheritedData::StyleRareInheritedData):
1589         (WebCore::StyleRareInheritedData::operator== const):
1590         * rendering/style/StyleRareInheritedData.h:
1591         * rendering/updating/RenderTreeUpdater.cpp:
1592         (WebCore::RenderTreeUpdater::updateElementRenderer):
1593         * style/StyleResolveForDocument.cpp:
1594         (WebCore::Style::resolveForDocument):
1595         * testing/Internals.cpp:
1596         (WebCore::Internals::getCurrentCursorInfo):
1597         (WebCore::Internals::isSelectPopupVisible):
1598         (WebCore::Internals::setQuickLookPassword):
1599         * testing/Internals.mm:
1600         (WebCore::Internals::userPrefersReducedMotion const):
1601         * testing/js/WebCoreTestSupportPrefix.h:
1602         * workers/WorkerThread.cpp:
1603         (WebCore::WorkerThread::workerThread):
1604
1605 2018-10-18  Per Arne Vollan  <pvollan@apple.com>
1606
1607         [WebVTT] The TextTrackLoader parameter in TextTrackLoaderClient virtual methods should be a reference
1608         https://bugs.webkit.org/show_bug.cgi?id=190730
1609
1610         Reviewed by Chris Dumez.
1611
1612         No new tests. No change in behavior.
1613
1614         * html/track/LoadableTextTrack.cpp:
1615         (WebCore::LoadableTextTrack::newCuesAvailable):
1616         (WebCore::LoadableTextTrack::cueLoadingCompleted):
1617         (WebCore::LoadableTextTrack::newRegionsAvailable):
1618         * html/track/LoadableTextTrack.h:
1619         * loader/TextTrackLoader.cpp:
1620         (WebCore::TextTrackLoader::cueLoadTimerFired):
1621         (WebCore::TextTrackLoader::newRegionsParsed):
1622         * loader/TextTrackLoader.h:
1623
1624 2018-10-18  Alex Christensen  <achristensen@webkit.org>
1625
1626         Clean up FrameLoader two-state enums
1627         https://bugs.webkit.org/show_bug.cgi?id=190731
1628
1629         Reviewed by Chris Dumez.
1630
1631         This patch does three things:
1632         1. Add an overload to EnumTraits so we do not need to list out the valid values of boolean enum classes.
1633         The valid values are always 0 and 1.  This is used when decoding from IPC.
1634         2. Add a 2-state enum class for NewLoadInProgress instad of a bool so we can understand the code better.
1635         3. Begin passing LockBackForwardList to the UIProcess.  We will need it soon for PSON.
1636
1637         * history/CachedFrame.h:
1638         * loader/EmptyFrameLoaderClient.h:
1639         * loader/FrameLoader.cpp:
1640         (WebCore::FrameLoader::provisionalLoadStarted):
1641         (WebCore::FrameLoader::loadWithDocumentLoader):
1642         (WebCore::FrameLoader::commitProvisionalLoad):
1643         (WebCore::FrameLoader::clientRedirectCancelledOrFinished):
1644         (WebCore::FrameLoader::clientRedirected):
1645         (WebCore::FrameLoader::receivedMainResourceError):
1646         (WebCore::FrameLoader::continueLoadAfterNavigationPolicy):
1647         * loader/FrameLoader.h:
1648         * loader/FrameLoaderClient.h:
1649         * loader/FrameLoaderTypes.h:
1650         * loader/NavigationScheduler.cpp:
1651         (WebCore::ScheduledNavigation::didStopTimer):
1652         (WebCore::NavigationScheduler::cancel):
1653         * loader/NavigationScheduler.h:
1654         * platform/network/StoredCredentialsPolicy.h:
1655
1656 2018-10-18  Wenson Hsieh  <wenson_hsieh@apple.com>
1657
1658         [GTK] fast/css/pseudo-visited-background-color-on-input.html is failing since r237425
1659         https://bugs.webkit.org/show_bug.cgi?id=190712
1660
1661         Reviewed by Tim Horton.
1662
1663         Ensure that color inputs are enabled by default on GTK, and that color inputs have a `-webkit-appearance` of
1664         `color-well` by default. Fixes fast/css/pseudo-visited-background-color-on-input.html on GTK.
1665
1666         * page/RuntimeEnabledFeatures.cpp:
1667         (WebCore::RuntimeEnabledFeatures::RuntimeEnabledFeatures):
1668         * rendering/RenderTheme.cpp:
1669         (WebCore::RenderTheme::colorInputStyleSheet const):
1670         * rendering/RenderTheme.h:
1671         (WebCore::RenderTheme::platformUsesColorWellAppearance const):
1672         (WebCore::RenderTheme::platformColorInputStyleSheet const): Deleted.
1673
1674         Replace this with a platform hook that determines whether we want to use `-webkit-appearance: color-well;` by
1675         default for inputs of type color. For now, only iOS overrides this to return false; in the future, we should
1676         support `-webkit-appearance: color-well;` on iOS, and remove this platform hook entirely.
1677
1678         * rendering/RenderThemeIOS.h:
1679         * rendering/RenderThemeMac.h:
1680         * rendering/RenderThemeMac.mm:
1681         (WebCore::RenderThemeMac::platformColorInputStyleSheet const): Deleted.
1682
1683 2018-10-18  Youenn Fablet  <youenn@apple.com>
1684
1685         Handle MDNS resolution of candidates through libwebrtc directly
1686         https://bugs.webkit.org/show_bug.cgi?id=190681
1687
1688         Reviewed by Eric Carlson.
1689
1690         Remove the previous MDNS resolution mechanism.
1691         Instead, add support for the AsyncResolver mechanism added to libwebrtc.
1692         Covered by current mdns webrtc test that is unflaked.
1693
1694         * Modules/mediastream/PeerConnectionBackend.cpp:
1695         (WebCore::PeerConnectionBackend::addIceCandidate):
1696         * platform/mediastream/libwebrtc/LibWebRTCProvider.cpp:
1697         (WebCore::LibWebRTCProvider::createPeerConnection):
1698         * platform/mediastream/libwebrtc/LibWebRTCProvider.h:
1699         * testing/MockLibWebRTCPeerConnection.cpp:
1700         (WebCore::MockLibWebRTCPeerConnectionFactory::CreatePeerConnection):
1701         * testing/MockLibWebRTCPeerConnection.h:
1702
1703 2018-10-18  Ali Juma  <ajuma@chromium.org>
1704
1705         [IntersectionObserver] Factor out rect mapping and clipping logic from computeRectForRepaint
1706         https://bugs.webkit.org/show_bug.cgi?id=189833
1707
1708         Reviewed by Simon Fraser.
1709
1710         Factor out the rect mapping and clipping logic from computeRectForRepaint to a new
1711         computeVisibleRectInContainer method that computeRectForRepaint now calls. Make
1712         computeVisibleRectInContainer take a VisibleRectContext with options to use
1713         edge-inclusive intersection and to apply all clips and scrolls rather than only
1714         the clips and scrolls that are currently applied by the repaint logic. These
1715         options will be used by IntersectionObserver in a future patch.
1716
1717         No new tests, no change in behavior.
1718
1719         * platform/graphics/FloatRect.cpp:
1720         (WebCore::FloatRect::edgeInclusiveIntersect):
1721         * platform/graphics/FloatRect.h:
1722         * platform/graphics/LayoutRect.cpp:
1723         (WebCore::LayoutRect::edgeInclusiveIntersect):
1724         * platform/graphics/LayoutRect.h:
1725         * rendering/RenderBox.cpp:
1726         (WebCore::RenderBox::applyCachedClipAndScrollPosition const):
1727         (WebCore::RenderBox::computeVisibleRectUsingPaintOffset const):
1728         (WebCore::RenderBox::computeVisibleRectInContainer const):
1729         (WebCore::RenderBox::applyCachedClipAndScrollPositionForRepaint const): Deleted.
1730         (WebCore::RenderBox::shouldApplyClipAndScrollPositionForRepaint const): Deleted.
1731         The iOS-specific logic in this method has moved to RenderObject::shouldApplyCompositedContainerScrollsForRepaint.
1732         (WebCore::RenderBox::computeRectForRepaint const): Deleted.
1733         * rendering/RenderBox.h:
1734         (WebCore::RenderBox::computeRectForRepaint): Deleted.
1735         * rendering/RenderInline.cpp:
1736         (WebCore::RenderInline::clippedOverflowRectForRepaint const):
1737         (WebCore::RenderInline::computeVisibleRectUsingPaintOffset const):
1738         (WebCore::RenderInline::computeVisibleRectInContainer const):
1739         (WebCore::RenderInline::computeRectForRepaint const): Deleted.
1740         * rendering/RenderInline.h:
1741         (WebCore::RenderInline::computeRectForRepaint): Deleted.
1742         * rendering/RenderObject.cpp:
1743         (WebCore::RenderObject::shouldApplyCompositedContainerScrollsForRepaint):
1744         (WebCore::RenderObject::visibleRectContextForRepaint):
1745         (WebCore::RenderObject::computeRectForRepaint const):
1746         (WebCore::RenderObject::computeFloatRectForRepaint const):
1747         (WebCore::RenderObject::computeVisibleRectInContainer const):
1748         (WebCore::RenderObject::computeFloatVisibleRectInContainer const):
1749         * rendering/RenderObject.h:
1750         (WebCore::RenderObject::computeAbsoluteRepaintRect const):
1751         (WebCore::RenderObject::VisibleRectContext::VisibleRectContext):
1752         (WebCore::RenderObject::RepaintContext::RepaintContext): Deleted.
1753         (WebCore::RenderObject::computeRectForRepaint): Deleted.
1754         * rendering/RenderTableCell.cpp:
1755         (WebCore::RenderTableCell::computeVisibleRectInContainer const):
1756         (WebCore::RenderTableCell::computeRectForRepaint const): Deleted.
1757         * rendering/RenderTableCell.h:
1758         * rendering/RenderView.cpp:
1759         (WebCore::RenderView::computeVisibleRectInContainer const):
1760         (WebCore::RenderView::computeRectForRepaint const): Deleted.
1761         * rendering/RenderView.h:
1762         * rendering/svg/RenderSVGForeignObject.cpp:
1763         (WebCore::RenderSVGForeignObject::computeFloatVisibleRectInContainer const):
1764         (WebCore::RenderSVGForeignObject::computeVisibleRectInContainer const):
1765         (WebCore::RenderSVGForeignObject::computeFloatRectForRepaint const): Deleted.
1766         (WebCore::RenderSVGForeignObject::computeRectForRepaint const): Deleted.
1767         * rendering/svg/RenderSVGForeignObject.h:
1768         * rendering/svg/RenderSVGInline.cpp:
1769         (WebCore::RenderSVGInline::computeFloatVisibleRectInContainer const):
1770         (WebCore::RenderSVGInline::computeFloatRectForRepaint const): Deleted.
1771         * rendering/svg/RenderSVGInline.h:
1772         * rendering/svg/RenderSVGModelObject.cpp:
1773         (WebCore::RenderSVGModelObject::computeFloatVisibleRectInContainer const):
1774         (WebCore::RenderSVGModelObject::computeFloatRectForRepaint const): Deleted.
1775         * rendering/svg/RenderSVGModelObject.h:
1776         * rendering/svg/RenderSVGRoot.cpp:
1777         (WebCore::RenderSVGRoot::computeFloatVisibleRectInContainer const):
1778         (WebCore::RenderSVGRoot::computeFloatRectForRepaint const): Deleted.
1779         * rendering/svg/RenderSVGRoot.h:
1780         * rendering/svg/RenderSVGText.cpp:
1781         (WebCore::RenderSVGText::computeVisibleRectInContainer const):
1782         (WebCore::RenderSVGText::computeFloatVisibleRectInContainer const):
1783         (WebCore::RenderSVGText::computeRectForRepaint const): Deleted.
1784         (WebCore::RenderSVGText::computeFloatRectForRepaint const): Deleted.
1785         * rendering/svg/RenderSVGText.h:
1786         * rendering/svg/SVGRenderSupport.cpp:
1787         (WebCore::SVGRenderSupport::clippedOverflowRectForRepaint):
1788         (WebCore::SVGRenderSupport::computeFloatVisibleRectInContainer):
1789         (WebCore::SVGRenderSupport::computeFloatRectForRepaint): Deleted.
1790         * rendering/svg/SVGRenderSupport.h:
1791
1792 2018-10-17  Wenson Hsieh  <wenson_hsieh@apple.com>
1793
1794         Enable the datalist element by default on iOS and macOS
1795         https://bugs.webkit.org/show_bug.cgi?id=190594
1796         <rdar://problem/45281159>
1797
1798         Reviewed by Ryosuke Niwa and Tim Horton.
1799
1800         Rebaselined existing layout tests.
1801
1802         * Configurations/FeatureDefines.xcconfig:
1803         * bindings/js/WebCoreBuiltinNames.h:
1804         * css/CSSDefaultStyleSheets.cpp:
1805         (WebCore::CSSDefaultStyleSheets::ensureDefaultStyleSheetsForElement):
1806         * css/CSSDefaultStyleSheets.h:
1807         * css/InspectorCSSOMWrappers.cpp:
1808         (WebCore::InspectorCSSOMWrappers::collectDocumentWrappers):
1809         * css/html.css:
1810
1811         Remove color input and datalist style rules from the default UA stylesheet.
1812
1813         (input[type="color"]::-webkit-color-swatch-wrapper): Deleted.
1814         * html/HTMLDataListElement.idl:
1815
1816         Make HTMLDataListElement runtime-enabled.
1817
1818         * html/HTMLTagNames.in:
1819         * html/RangeInputType.cpp:
1820
1821         Make a slight adjustment here so that inputs of type range respect the list attribute. Fixes a few layout tests
1822         that add a datalist to an input of type range. See <https://bugs.webkit.org/show_bug.cgi?id=190613> for more
1823         details.
1824
1825         (WebCore::RangeInputType::shouldRespectListAttribute):
1826         * html/TextFieldInputType.cpp:
1827         (WebCore::TextFieldInputType::shouldRespectListAttribute):
1828         * page/RuntimeEnabledFeatures.h:
1829
1830         Add a runtime-enabled feature for the datalist element. Additionally, make the runtime-enabled feature for input
1831         type color false by default, so that it's off in WebKitLegacy.
1832
1833         (WebCore::RuntimeEnabledFeatures::dataListElementEnabled const):
1834         (WebCore::RuntimeEnabledFeatures::setDataListElementEnabled):
1835         * rendering/RenderTheme.cpp:
1836         (WebCore::RenderTheme::colorInputStyleSheet const):
1837
1838         Add new style-sheet hooks for datalist and input type color, so that style rules for color inputs and datalists
1839         can be added at runtime only if the feature is enabled. This ensures that in WebKitLegacy (or other ports where
1840         either or both elements are disabled), we don't still apply rules for datalist and input[type="color"]. Notably,
1841         this allows fallback content inside datalist elements to still work in WebKitLegacy (which would otherwise be
1842         hidden when using the default stylesheet since `display: none` is applied to datalist by default). This also
1843         prevents inputs of type color from having a smaller size, no outline, and the appearance of a color well on
1844         macOS.
1845
1846         (WebCore::RenderTheme::dataListStyleSheet const):
1847         * rendering/RenderTheme.h:
1848         (WebCore::RenderTheme::platformColorInputStyleSheet const):
1849         * rendering/RenderThemeMac.h:
1850         * rendering/RenderThemeMac.mm:
1851         (WebCore::RenderThemeMac::platformColorInputStyleSheet const):
1852
1853 2018-10-17  Justin Michaud  <justin_michaud@apple.com>
1854
1855         Parse paint() and store paint callbacks for CSS Painting API
1856         https://bugs.webkit.org/show_bug.cgi?id=190657
1857
1858         Reviewed by Dean Jackson.
1859
1860         Implement support for parsing paint() images in css, and store CSS paint callback objects in the paint definition map.
1861
1862         * Sources.txt:
1863         * WebCore.xcodeproj/project.pbxproj:
1864         * bindings/js/JSCSSPaintWorkletGlobalScopeCustom.cpp:
1865         (WebCore::JSCSSPaintWorkletGlobalScope::visitAdditionalChildren):
1866         (WebCore::JSCSSPaintWorkletGlobalScope::registerPaint):
1867         * css/CSSImageGeneratorValue.cpp:
1868         (WebCore::CSSImageGeneratorValue::image):
1869         (WebCore::CSSImageGeneratorValue::isFixedSize const):
1870         (WebCore::CSSImageGeneratorValue::fixedSize):
1871         (WebCore::CSSImageGeneratorValue::isPending const):
1872         (WebCore::CSSImageGeneratorValue::knownToBeOpaque const):
1873         (WebCore::CSSImageGeneratorValue::loadSubimages):
1874         * css/CSSPaintImageValue.cpp: Added.
1875         (WebCore::CSSPaintImageValue::customCSSText const):
1876         * css/CSSPaintImageValue.h: Added.
1877         * css/CSSPaintWorkletGlobalScope.h:
1878         * css/CSSPaintWorkletGlobalScope.idl:
1879         * css/CSSValue.cpp:
1880         (WebCore::CSSValue::equals const):
1881         (WebCore::CSSValue::cssText const):
1882         (WebCore::CSSValue::destroy):
1883         * css/CSSValue.h:
1884         (WebCore::CSSValue::isPaintImageValue const):
1885         * css/CSSValueKeywords.in:
1886         * css/parser/CSSPropertyParserHelpers.cpp:
1887         (WebCore::CSSPropertyParserHelpers::consumeCustomPaint):
1888         (WebCore::CSSPropertyParserHelpers::consumeGeneratedImage):
1889         (WebCore::CSSPropertyParserHelpers::isGeneratedImage):
1890         * platform/mediastream/mac/RealtimeVideoUtilities.h:
1891
1892 2018-10-17  Eric Carlson  <eric.carlson@apple.com>
1893
1894         [MediaStream] Consolidate all image conversion and resizing into one class
1895         https://bugs.webkit.org/show_bug.cgi?id=190519
1896         <rdar://problem/45224307>
1897
1898         Try to fix the iOSMac build after r237236.
1899
1900         * platform/graphics/cv/ImageTransferSessionVT.h:
1901         * platform/graphics/cv/ImageTransferSessionVT.mm:
1902
1903 2018-10-17  Justin Fan  <justin_fan@apple.com>
1904
1905         [WebGPU] Implement WebGPU bindings up through WebGPUDevice creation
1906         https://bugs.webkit.org/show_bug.cgi?id=190653
1907
1908         Reviewed by Dean Jackson.
1909
1910         Test: webgpu/webgpu-enabled.html
1911
1912         Add WebGPU Sketch bindings for window.webgpu, WebGPUAdapter, WebGPUAdapterDescriptor,
1913         and WebGPUDevice creation. Based off IDL commit version b6c61ee. 
1914         https://github.com/gpuweb/gpuweb/blob/master/design/sketch.webidl
1915
1916         * CMakeLists.txt:
1917         * DerivedSources.make:
1918         * Modules/webgpu/DOMWindowWebGPU.cpp: Added.
1919         (WebCore::DOMWindowWebGPU::DOMWindowWebGPU):
1920         (WebCore::DOMWindowWebGPU::supplementName):
1921         (WebCore::DOMWindowWebGPU::from):
1922         (WebCore::DOMWindowWebGPU::webgpu):
1923         (WebCore::DOMWindowWebGPU::webgpu const):
1924         * Modules/webgpu/DOMWindowWebGPU.h: Added.
1925         * Modules/webgpu/DOMWindowWebGPU.idl: Added.
1926         * Modules/webgpu/WebGPU.cpp: Added.
1927         (WebCore::WebGPU::create):
1928         (WebCore::WebGPU::requestAdapter const):
1929         * Modules/webgpu/WebGPU.h: Added.
1930         * Modules/webgpu/WebGPU.idl: Added.
1931         * Modules/webgpu/WebGPUAdapter.cpp: Added.
1932         (WebCore::WebGPUAdapter::create):
1933         (WebCore::WebGPUAdapter::WebGPUAdapter):
1934         (WebCore::WebGPUAdapter::createDevice):
1935         * Modules/webgpu/WebGPUAdapter.h: Added.
1936         * Modules/webgpu/WebGPUAdapter.idl: Added.
1937         * Modules/webgpu/WebGPUAdapterDescriptor.h: Added.
1938         * Modules/webgpu/WebGPUAdapterDescriptor.idl: Added.
1939         * Modules/webgpu/WebGPUDevice.cpp: Added.
1940         (WebCore::WebGPUDevice::create):
1941         (WebCore::WebGPUDevice::WebGPUDevice):
1942         * Modules/webgpu/WebGPUDevice.h: Added.
1943         (WebCore::WebGPUDevice::adapter const):
1944         * Modules/webgpu/WebGPUDevice.idl: Added.
1945         * Sources.txt:
1946         * WebCore.xcodeproj/project.pbxproj:
1947         * bindings/js/WebCoreBuiltinNames.h:
1948
1949 2018-10-17  Andy Estes  <aestes@apple.com>
1950
1951         [Apple Pay] Increment the API version to 5
1952         https://bugs.webkit.org/show_bug.cgi?id=190686
1953         <rdar://problem/45348523>
1954
1955         Reviewed by Simon Fraser.
1956
1957         Test: http/tests/ssl/applepay/ApplePaySessionV5.html
1958
1959         * testing/MockPaymentCoordinator.cpp:
1960         (WebCore::MockPaymentCoordinator::supportsVersion):
1961
1962 2018-10-17  Eric Carlson  <eric.carlson@apple.com>
1963
1964         [MediaStream] Consolidate all image conversion and resizing into one class
1965         https://bugs.webkit.org/show_bug.cgi?id=190519
1966         <rdar://problem/45224307>
1967
1968         Reviewed by Youenn Fablet.
1969
1970         No new tests, no functional change.
1971
1972         * SourcesCocoa.txt: Add ImageTransferSessionVT.
1973         * WebCore.xcodeproj/project.pbxproj: Ditto.
1974
1975         * platform/MediaSample.h:
1976         (WebCore::MediaSample::videoPixelFormat const): New.
1977
1978         * platform/cocoa/VideoToolboxSoftLink.cpp: Add new kVTPixelTransferProperty keys.
1979         * platform/cocoa/VideoToolboxSoftLink.h:
1980
1981         * platform/graphics/avfoundation/objc/MediaSampleAVFObjC.h:
1982         (WebCore::MediaSampleAVFObjC::create): Remove unimplemented variant.
1983         * platform/graphics/avfoundation/objc/MediaSampleAVFObjC.mm:
1984         (WebCore::MediaSampleAVFObjC::videoPixelFormat const): New.
1985
1986         * platform/graphics/cv/ImageTransferSessionVT.h: Added.
1987         (WebCore::ImageTransferSessionVT::create):
1988         * platform/graphics/cv/ImageTransferSessionVT.mm: Added.
1989         (WebCore::ImageTransferSessionVT::ImageTransferSessionVT):
1990         (WebCore::ImageTransferSessionVT::~ImageTransferSessionVT):
1991         (WebCore::ImageTransferSessionVT::setSize):
1992         (WebCore::ImageTransferSessionVT::createPixelBuffer):
1993         (WebCore::ImageTransferSessionVT::createCMSampleBuffer):
1994         (WebCore::roundUpToMacroblockMultiple):
1995         (WebCore::ImageTransferSessionVT::ioSurfacePixelBufferCreationOptions):
1996         (WebCore::ImageTransferSessionVT::createMediaSample):
1997
1998         * platform/graphics/cv/PixelBufferResizer.h: Removed.
1999         * platform/graphics/cv/PixelBufferResizer.mm: Removed.
2000
2001         * platform/mediastream/mac/AVVideoCaptureSource.h:
2002         * platform/mediastream/mac/AVVideoCaptureSource.mm:
2003         (WebCore::AVVideoCaptureSource::prefersPreset):
2004         (WebCore::AVVideoCaptureSource::captureOutputDidOutputSampleBufferFromConnection): Remove
2005         the resizing logic, it is handled by the base class.
2006
2007         * platform/mediastream/mac/DisplayCaptureSourceCocoa.cpp:
2008         (WebCore::DisplayCaptureSourceCocoa::capabilities):
2009         (WebCore::DisplayCaptureSourceCocoa::settingsDidChange):
2010         (WebCore::DisplayCaptureSourceCocoa::setIntrinsicSize):
2011         (WebCore::DisplayCaptureSourceCocoa::emitFrame): Remove resizing logic, just use a transfer
2012         session to create an image from the capture source native output format.
2013         (WebCore::DisplayCaptureSourceCocoa::sampleBufferFromPixelBuffer): Deleted.
2014         (WebCore::roundUpToMacroblockMultiple): Deleted.
2015         (WebCore::DisplayCaptureSourceCocoa::pixelBufferFromIOSurface): Deleted.
2016         * platform/mediastream/mac/DisplayCaptureSourceCocoa.h:
2017
2018         * platform/mediastream/mac/MockRealtimeVideoSourceMac.h:
2019         * platform/mediastream/mac/MockRealtimeVideoSourceMac.mm:
2020         (WebCore::MockRealtimeVideoSourceMac::updateSampleBuffer): Use image transfer session.
2021         (WebCore::MockRealtimeVideoSourceMac::CMSampleBufferFromPixelBuffer): Deleted.
2022         (WebCore::MockRealtimeVideoSourceMac::pixelBufferFromCGImage const): Deleted.
2023         (WebCore::MockRealtimeVideoSourceMac::setSizeAndFrameRateWithPreset): Deleted.
2024
2025         * platform/mediastream/mac/ScreenDisplayCaptureSourceMac.h:
2026         * platform/mediastream/mac/ScreenDisplayCaptureSourceMac.mm:
2027         (WebCore::ScreenDisplayCaptureSourceMac::createDisplayStream):
2028         (WebCore::ScreenDisplayCaptureSourceMac::generateFrame): Return the IOSurface directly.
2029
2030         * platform/mediastream/mac/WindowDisplayCaptureSourceMac.h:
2031         * platform/mediastream/mac/WindowDisplayCaptureSourceMac.mm:
2032         (WebCore::WindowDisplayCaptureSourceMac::generateFrame): Return the CGImage directly.
2033         (WebCore::WindowDisplayCaptureSourceMac::pixelBufferFromCGImage): Deleted.
2034
2035         * platform/mock/MockRealtimeVideoSource.cpp:
2036         (WebCore::MockRealtimeVideoSource::capabilities): Only the camera supports device ID.
2037         (WebCore::MockRealtimeVideoSource::settings): Ditto.
2038
2039 2018-10-17  Eric Carlson  <eric.carlson@apple.com>
2040
2041         [MediaStream] Clean up capture source factory management
2042         https://bugs.webkit.org/show_bug.cgi?id=190502
2043         <rdar://problem/45212447>
2044
2045         Reviewed by Youenn Fablet.
2046
2047         No new tests, no functional change.
2048
2049         * platform/mediastream/RealtimeMediaSourceCenter.cpp:
2050         (WebCore::RealtimeMediaSourceCenter::setAudioFactory):
2051         (WebCore::RealtimeMediaSourceCenter::unsetAudioFactory):
2052         (WebCore::RealtimeMediaSourceCenter::audioFactory):
2053         (WebCore::RealtimeMediaSourceCenter::setVideoFactory):
2054         (WebCore::RealtimeMediaSourceCenter::unsetVideoFactory):
2055         (WebCore::RealtimeMediaSourceCenter::videoFactory):
2056         (WebCore::RealtimeMediaSourceCenter::setDisplayCaptureFactory):
2057         (WebCore::RealtimeMediaSourceCenter::unsetDisplayCaptureFactory):
2058         (WebCore::RealtimeMediaSourceCenter::displayCaptureFactory):
2059         * platform/mediastream/RealtimeMediaSourceCenter.h:
2060         (WebCore::RealtimeMediaSourceCenter::setAudioFactory): Deleted.
2061         (WebCore::RealtimeMediaSourceCenter::unsetAudioFactory): Deleted.
2062         (): Deleted.
2063         * platform/mediastream/gstreamer/RealtimeMediaSourceCenterLibWebRTC.cpp:
2064         (WebCore::RealtimeMediaSourceCenterLibWebRTC::audioFactoryPrivate):
2065         (WebCore::RealtimeMediaSourceCenterLibWebRTC::videoFactoryPrivate):
2066         (WebCore::RealtimeMediaSourceCenterLibWebRTC::displayCaptureFactoryPrivate):
2067         (WebCore::RealtimeMediaSourceCenterLibWebRTC::audioCaptureSourceFactory): Deleted.
2068         (WebCore::RealtimeMediaSourceCenterLibWebRTC::audioFactory): Deleted.
2069         (WebCore::RealtimeMediaSourceCenterLibWebRTC::videoFactory): Deleted.
2070         (WebCore::RealtimeMediaSourceCenterLibWebRTC::displayCaptureFactory): Deleted.
2071         * platform/mediastream/gstreamer/RealtimeMediaSourceCenterLibWebRTC.h:
2072         * platform/mediastream/mac/RealtimeMediaSourceCenterMac.cpp:
2073         (WebCore::RealtimeMediaSourceCenterMac::audioFactoryPrivate):
2074         (WebCore::RealtimeMediaSourceCenterMac::videoFactoryPrivate):
2075         (WebCore::RealtimeMediaSourceCenterMac::displayCaptureFactoryPrivate):
2076         (WebCore::RealtimeMediaSourceCenterMac::videoCaptureSourceFactory): Deleted.
2077         (WebCore::RealtimeMediaSourceCenterMac::displayCaptureSourceFactory): Deleted.
2078         (WebCore::RealtimeMediaSourceCenterMac::audioCaptureSourceFactory): Deleted.
2079         (WebCore::RealtimeMediaSourceCenterMac::audioFactory): Deleted.
2080         (WebCore::RealtimeMediaSourceCenterMac::videoFactory): Deleted.
2081         (WebCore::RealtimeMediaSourceCenterMac::displayCaptureFactory): Deleted.
2082         * platform/mediastream/mac/RealtimeMediaSourceCenterMac.h:
2083         * platform/mock/MockRealtimeMediaSourceCenter.cpp:
2084         (WebCore::MockRealtimeMediaSourceCenter::audioFactoryPrivate):
2085         (WebCore::MockRealtimeMediaSourceCenter::videoFactoryPrivate):
2086         (WebCore::MockRealtimeMediaSourceCenter::displayCaptureFactoryPrivate):
2087         (WebCore::MockRealtimeMediaSourceCenter::audioFactory): Deleted.
2088         (WebCore::MockRealtimeMediaSourceCenter::videoFactory): Deleted.
2089         (WebCore::MockRealtimeMediaSourceCenter::displayCaptureFactory): Deleted.
2090         * platform/mock/MockRealtimeMediaSourceCenter.h:
2091
2092 2018-10-17  Alex Christensen  <achristensen@webkit.org>
2093
2094         BackForwardClient needs to be able to support UIProcess-only back/forward lists
2095         https://bugs.webkit.org/show_bug.cgi?id=190675
2096
2097         Reviewed by Chris Dumez.
2098
2099         Return a RefPtr<HistoryItem> instead of a HistoryItem so that we will be able to return a
2100         HistoryItem that has been created instead of a pointer to a HistoryItem that is owned by something else.
2101         Also use unsigned for the back and forward list counts because they can never be negative.
2102
2103         * history/BackForwardClient.h:
2104         * history/BackForwardController.cpp:
2105         (WebCore::BackForwardController::backItem):
2106         (WebCore::BackForwardController::currentItem):
2107         (WebCore::BackForwardController::forwardItem):
2108         (WebCore::BackForwardController::canGoBackOrForward const):
2109         (WebCore::BackForwardController::goBackOrForward):
2110         (WebCore::BackForwardController::goBack):
2111         (WebCore::BackForwardController::goForward):
2112         (WebCore::BackForwardController::count const):
2113         (WebCore::BackForwardController::backCount const):
2114         (WebCore::BackForwardController::forwardCount const):
2115         (WebCore::BackForwardController::itemAtIndex):
2116         * history/BackForwardController.h:
2117         (WebCore::BackForwardController::backItem): Deleted.
2118         (WebCore::BackForwardController::currentItem): Deleted.
2119         (WebCore::BackForwardController::forwardItem): Deleted.
2120         * loader/EmptyClients.cpp:
2121         * loader/NavigationScheduler.cpp:
2122         (WebCore::NavigationScheduler::scheduleHistoryNavigation):
2123
2124 2018-10-17  Antoine Quint  <graouts@apple.com>
2125
2126         [Web Animations] Do not create a DocumentTimeline to suspend or resume animations
2127         https://bugs.webkit.org/show_bug.cgi?id=190660
2128
2129         Reviewed by Dean Jackson.
2130
2131         We check that there is an existing timeline before trying to suspend or resume its animations, otherwise
2132         we're creating a DocumentTimeline when nothing requires for it to exist. We also have to check that we
2133         suspend animations when a DocumentTimeline is created while the page is not visible.
2134
2135         No new tests as there is no change in behavior here.
2136
2137         * animation/DocumentTimeline.cpp:
2138         (WebCore::DocumentTimeline::DocumentTimeline):
2139         * dom/Document.cpp:
2140         (WebCore::Document::didBecomeCurrentDocumentInFrame):
2141         (WebCore::Document::resume):
2142         * page/Frame.cpp:
2143         (WebCore::Frame::clearTimers):
2144         * page/Page.cpp:
2145         (WebCore::Page::setIsVisibleInternal):
2146         (WebCore::Page::hiddenPageCSSAnimationSuspensionStateChanged):
2147
2148 2018-10-17  Antti Koivisto  <antti@apple.com>
2149
2150         Tiling CSS gradients is slow
2151         https://bugs.webkit.org/show_bug.cgi?id=190615
2152
2153         Reviewed by Tim Horton.
2154
2155         Painting blocks the main thread on CG rendering queue to make a copy of the backing store.
2156
2157         * platform/graphics/BitmapImage.cpp:
2158         (WebCore::BitmapImage::drawPattern):
2159
2160         Also use sinkIntoImage for bitmap image pattern drawing.
2161
2162         * platform/graphics/GradientImage.cpp:
2163         (WebCore::GradientImage::drawPattern):
2164
2165         Sink the gradient into an Image after generating it. Unlike ImageBuffer, painting it doesn't involve inefficient copies.
2166         Previous isCompatibleWithContext test is replaced with an equivalent scale factor test.
2167
2168         * platform/graphics/GradientImage.h:
2169
2170 2018-10-17  Chris Dumez  <cdumez@apple.com>
2171
2172         Update more DOMWindow getters to return references instead of raw pointers
2173         https://bugs.webkit.org/show_bug.cgi?id=190654
2174
2175         Reviewed by Youenn Fablet.
2176
2177         Update more DOMWindow getters to return references instead of raw pointers, since they
2178         can no longer return null after recent refactoring.
2179
2180         * Modules/gamepad/GamepadManager.cpp:
2181         (WebCore::navigatorGamepadFromDOMWindow):
2182         * bindings/js/JSDOMWindowCustom.cpp:
2183         (WebCore::JSDOMWindow::heapSnapshot):
2184         * dom/Document.cpp:
2185         (WebCore::Document::location const):
2186         (WebCore::Document::dispatchPopstateEvent):
2187         * dom/Event.cpp:
2188         (WebCore::Event::timeStampForBindings const):
2189         * loader/DocumentThreadableLoader.cpp:
2190         (WebCore::DocumentThreadableLoader::loadRequest):
2191         * loader/ResourceTimingInformation.cpp:
2192         (WebCore::ResourceTimingInformation::addResourceTiming):
2193         * page/DOMWindow.cpp:
2194         (WebCore::DOMWindow::screen):
2195         (WebCore::DOMWindow::history):
2196         (WebCore::DOMWindow::crypto const):
2197         (WebCore::DOMWindow::locationbar):
2198         (WebCore::DOMWindow::menubar):
2199         (WebCore::DOMWindow::personalbar):
2200         (WebCore::DOMWindow::scrollbars):
2201         (WebCore::DOMWindow::statusbar):
2202         (WebCore::DOMWindow::toolbar):
2203         (WebCore::DOMWindow::applicationCache):
2204         (WebCore::DOMWindow::navigator):
2205         (WebCore::DOMWindow::performance const):
2206         (WebCore::DOMWindow::nowTimestamp const):
2207         (WebCore::DOMWindow::location):
2208         (WebCore::DOMWindow::visualViewport):
2209         (WebCore::DOMWindow::styleMedia):
2210         * page/DOMWindow.h:
2211         * page/FrameView.cpp:
2212         (WebCore::FrameView::updateLayoutViewport):
2213         * page/History.cpp:
2214         (WebCore::History::stateObjectAdded):
2215         * page/IntersectionObserver.cpp:
2216         (WebCore::IntersectionObserver::createTimestamp const):
2217         * page/PerformanceObserver.cpp:
2218         (WebCore::PerformanceObserver::PerformanceObserver):
2219         * platform/cocoa/VideoFullscreenModelVideoElement.mm:
2220         (WebCore::VideoFullscreenModelVideoElement::requestFullscreenMode):
2221
2222 2018-10-17  Chris Fleizach  <cfleizach@apple.com>
2223
2224         AX: Certain tags should identify their context to iOS API
2225         https://bugs.webkit.org/show_bug.cgi?id=190622
2226         <rdar://problem/45308194>
2227
2228         Reviewed by Zalan Bujtas.
2229
2230         Convey the semantic meaning of <code> tag to the iOS API so VoiceOver can make use of it.
2231
2232         Tests: accessibility/ios-simulator/text-context-attributes.html
2233
2234         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
2235         (-[WebAccessibilityObjectWrapper accessibilityTextualContext]):
2236         (AXAttributeStringSetStyle):
2237
2238 2018-10-17  Youenn Fablet  <youenn@apple.com>
2239
2240         Remove unused code from RealtimeOutgoingVideoSourceCocoa
2241         https://bugs.webkit.org/show_bug.cgi?id=190666
2242
2243         Reviewed by Eric Carlson.
2244
2245         No change of behavior, removed no longer used code.
2246
2247         * platform/mediastream/mac/RealtimeOutgoingVideoSourceCocoa.cpp:
2248         (): Deleted.
2249
2250 2018-10-17  Ali Juma  <ajuma@chromium.org>
2251
2252         Flaky IntersectionObserver web platform tests involving style updates
2253         https://bugs.webkit.org/show_bug.cgi?id=189091
2254
2255         Reviewed by Simon Fraser.
2256
2257         Update intersection observations when flushing layers from the WebProcess
2258         to the UIProcess to make the timing of these updates more predictable, and
2259         more consistent with the IntersectionObserver spec, since the spec expects
2260         these updates to happen as part of the "Update the rendering" step in the
2261         HTML EventLoop.
2262
2263         Getting a similar approach to work with WK1 seems to add more complexity than it's
2264         worth, since flushes don't happen for scrolls handled by platform widgets, and
2265         flushes for other invalidations only happen when in compositing mode.
2266
2267         The only remaining timer-driven intersection observation update is for handling
2268         the initial observation on a newly added target, which needs to happen even if
2269         there are no changes triggering a flush.
2270
2271         Tested by the following tests no longer being flaky:
2272             imported/w3c/web-platform-tests/intersection-observer/bounding-box.html
2273             imported/w3c/web-platform-tests/intersection-observer/display-none.html
2274             imported/w3c/web-platform-tests/intersection-observer/containing-block.html
2275
2276         * dom/Document.cpp:
2277         (WebCore::Document::resolveStyle):
2278         (WebCore::Document::updateIntersectionObservations):
2279         (WebCore::Document::scheduleForcedIntersectionObservationUpdate):
2280         (WebCore::Document::scheduleIntersectionObservationUpdate): Deleted.
2281         * dom/Document.h:
2282         * page/FrameView.cpp:
2283         (WebCore::FrameView::flushCompositingStateForThisFrame):
2284         (WebCore::FrameView::viewportContentsChanged):
2285         * page/IntersectionObserver.cpp:
2286         (WebCore::IntersectionObserver::observe):
2287         * page/Page.cpp:
2288         (WebCore::Page::Page):
2289         (WebCore::Page::willDisplayPage):
2290         (WebCore::Page::addDocumentNeedingIntersectionObservationUpdate):
2291         (WebCore::Page::updateIntersectionObservations):
2292         (WebCore::Page::scheduleForcedIntersectionObservationUpdate):
2293         * page/Page.h:
2294
2295 2018-10-17  Charlie Turner  <cturner@igalia.com>
2296
2297         [EME] Sanity check key ID length in the keyids init data format
2298         https://bugs.webkit.org/show_bug.cgi?id=190629
2299
2300         Reviewed by Xabier Rodriguez-Calvar.
2301
2302         Covered by web-platform-tests/encrypted-media/clearkey-generate-request-disallowed-input.https.html
2303
2304         * Modules/encryptedmedia/InitDataRegistry.cpp:
2305         (WebCore::extractKeyIDsKeyids): Ensure the decoded key id length
2306         is at least 1 byte and no more than 512 bytes.
2307
2308 2018-10-16  Chris Dumez  <cdumez@apple.com>
2309
2310         Regression(r236795) Check boxes are sometimes checked when they should not be
2311         https://bugs.webkit.org/show_bug.cgi?id=190651
2312         <rdar://problem/45319934>
2313
2314         Reviewed by Ryosuke Niwa.
2315
2316         r236795 mistakenly dropped the statement resetting m_reflectsCheckedAttribute to true
2317         in HTMLInputElement::parseAttribute() because it looked like a no-op given that we
2318         made sure it was true a couple of line above. However, I overlooked that calling
2319         HTMLInputElement::setChecked() sets m_reflectsCheckedAttribute to false.
2320
2321         This patch thus re-introduces the statement. It also renames m_reflectsCheckedAttribute
2322         to m_dirtyCheckednessFlag and reverses its value in order to match the specification
2323         more closely:
2324         - https://html.spec.whatwg.org/#concept-input-checked-dirty-flag
2325
2326         Test: fast/dom/HTMLInputElement/checkbox-dirty-checkedness-flag.html
2327
2328         * html/HTMLInputElement.cpp:
2329         (WebCore::HTMLInputElement::HTMLInputElement):
2330         (WebCore::HTMLInputElement::parseAttribute):
2331         (WebCore::HTMLInputElement::finishParsingChildren):
2332         (WebCore::HTMLInputElement::reset):
2333         (WebCore::HTMLInputElement::setChecked):
2334         (WebCore::HTMLInputElement::copyNonAttributePropertiesFromElement):
2335         * html/HTMLInputElement.h:
2336
2337 2018-10-16  Sihui Liu  <sihui_liu@apple.com>
2338
2339         Add a switch for Web SQL
2340         https://bugs.webkit.org/show_bug.cgi?id=190271
2341
2342         Reviewed by Ryosuke Niwa.
2343
2344         Web SQL is still enabled by default.
2345
2346         * Modules/webdatabase/DOMWindowWebDatabase.idl:
2347         * Modules/webdatabase/Database.idl:
2348         * Modules/webdatabase/SQLError.idl:
2349         * Modules/webdatabase/SQLResultSet.idl:
2350         * Modules/webdatabase/SQLResultSetRowList.idl:
2351         * bindings/js/WebCoreBuiltinNames.h:
2352         * page/RuntimeEnabledFeatures.h:
2353         (WebCore::RuntimeEnabledFeatures::setWebSQLDisabled):
2354         (WebCore::RuntimeEnabledFeatures::webSQLEnabled const):
2355
2356 2018-10-16  Chris Dumez  <cdumez@apple.com>
2357
2358         window.performance should not become null after the window loses its browsing context
2359         https://bugs.webkit.org/show_bug.cgi?id=190636
2360
2361         Reviewed by Ryosuke Niwa.
2362
2363         window.performance should not become null after the window loses its browsing context. This
2364         WebKit behavior does not match the HTML specification nor the behavior of other browsers.
2365
2366         Also note that the attribute is not nullable in the specification:
2367         - https://www.w3.org/TR/navigation-timing/#sec-window.performance-attribute
2368
2369         No new tests, updated existing test.
2370
2371         * page/DOMWindow.cpp:
2372         (WebCore::DOMWindow::performance const):
2373         * page/Performance.cpp:
2374         (WebCore::Performance::Performance):
2375         * page/Performance.h:
2376         * platform/GenericTaskQueue.h:
2377         (WebCore::TaskDispatcher::TaskDispatcher):
2378         (WebCore::TaskDispatcher::postTask):
2379         (WebCore::GenericTaskQueue::GenericTaskQueue):
2380         (WebCore::GenericTaskQueue::isClosed const):
2381         * workers/WorkerGlobalScope.cpp:
2382         (WebCore::WorkerGlobalScope::WorkerGlobalScope):
2383
2384 2018-10-16  Jer Noble  <jer.noble@apple.com>
2385
2386         Refactoring: Convert HTMLMediaElement::scheduleDelayedAction() to individually schedulable & cancelable tasks
2387         https://bugs.webkit.org/show_bug.cgi?id=188208
2388
2389         Reviewed by Eric Carlson.
2390
2391         Rather than have a single, monolithic, zero-duration-timer based dispatch for
2392         a bunch of methods to be performed in a future run-loop, convert them all to
2393         use a DeferrableTask, which in turn is a kind of GenericTaskQueue which can
2394         enqueue only a single task at a time. Convert some other zero-duration-timer
2395         and GenericTaskQueue dispatches to this new DeferrableTask.
2396
2397         * WebCore.xcodeproj/project.pbxproj:
2398         * html/HTMLMediaElement.cpp:
2399         (WebCore::HTMLMediaElement::HTMLMediaElement):
2400         (WebCore::HTMLMediaElement::finishParsingChildren):
2401         (WebCore::HTMLMediaElement::scheduleCheckPlaybackTargetCompatability):
2402         (WebCore::HTMLMediaElement::checkPlaybackTargetCompatablity):
2403         (WebCore::HTMLMediaElement::prepareForLoad):
2404         (WebCore::HTMLMediaElement::setReadyState):
2405         (WebCore::HTMLMediaElement::seekWithTolerance):
2406         (WebCore::HTMLMediaElement::setMuted):
2407         (WebCore::HTMLMediaElement::mediaPlayerDidAddTextTrack):
2408         (WebCore::HTMLMediaElement::didAddTextTrack):
2409         (WebCore::HTMLMediaElement::scheduleConfigureTextTracks):
2410         (WebCore::HTMLMediaElement::mediaPlayerTimeChanged):
2411         (WebCore::HTMLMediaElement::scheduleMediaEngineWasUpdated):
2412         (WebCore::HTMLMediaElement::mediaEngineWasUpdated):
2413         (WebCore::HTMLMediaElement::mediaPlayerEngineUpdated):
2414         (WebCore::HTMLMediaElement::scheduleUpdatePlayState):
2415         (WebCore::HTMLMediaElement::updatePlayState):
2416         (WebCore::HTMLMediaElement::setPlaying):
2417         (WebCore::HTMLMediaElement::setPausedInternal):
2418         (WebCore::HTMLMediaElement::cancelPendingTasks):
2419         (WebCore::HTMLMediaElement::userCancelledLoad):
2420         (WebCore::HTMLMediaElement::clearMediaPlayer):
2421         (WebCore::HTMLMediaElement::contextDestroyed):
2422         (WebCore::HTMLMediaElement::stop):
2423         (WebCore::HTMLMediaElement::suspend):
2424         (WebCore::HTMLMediaElement::resume):
2425         (WebCore::HTMLMediaElement::mediaPlayerCurrentPlaybackTargetIsWirelessChanged):
2426         (WebCore::HTMLMediaElement::dispatchEvent):
2427         (WebCore::HTMLMediaElement::removeEventListener):
2428         (WebCore::HTMLMediaElement::enqueuePlaybackTargetAvailabilityChangedEvent):
2429         (WebCore::HTMLMediaElement::didBecomeFullscreenElement):
2430         (WebCore::HTMLMediaElement::markCaptionAndSubtitleTracksAsUnconfigured):
2431         (WebCore::HTMLMediaElement::scheduleUpdateMediaState):
2432         (WebCore::HTMLMediaElement::updateMediaState):
2433         (WebCore::HTMLMediaElement::playbackControlsManagerBehaviorRestrictionsTimerFired):
2434         (WebCore::setFlags): Deleted.
2435         (WebCore::clearFlags): Deleted.
2436         (WebCore::actionName): Deleted.
2437         (WebCore::HTMLMediaElement::scheduleDelayedAction): Deleted.
2438         (WebCore::HTMLMediaElement::pendingActionTimerFired): Deleted.
2439         * html/HTMLMediaElement.h:
2440         * html/HTMLMediaElementEnums.h:
2441         * platform/DeferrableTask.h: Added.
2442         (WebCore::DeferrableTask::DeferrableTask):
2443         (WebCore::DeferrableTask::scheduleTask):
2444         (WebCore::DeferrableTask::close):
2445         (WebCore::DeferrableTask::cancelTask):
2446         (WebCore::DeferrableTask::hasPendingTask const):
2447
2448 2018-10-16  Timothy Hatcher  <timothy@apple.com>
2449
2450         Add <meta name="supported-color-schemes"> to control what color schemes the page supports
2451         https://bugs.webkit.org/show_bug.cgi?id=190526
2452         rdar://problem/45230140
2453
2454         Reviewed by Dean Jackson.
2455
2456         Test: css-dark-mode/supported-color-schemes.html
2457
2458         * dom/Document.cpp:
2459         (WebCore::isColorSchemeSeparator): Added.
2460         (WebCore::processColorSchemes): Added.
2461         (WebCore::Document::processSupportedColorSchemes): Added.
2462         (WebCore::Document::useDarkAppearance const): Take system appearance and document's
2463         suppoerted color shcemes into account.
2464         * dom/Document.h:
2465         * editing/cocoa/WebContentReaderCocoa.mm:
2466         (WebCore::createFragment): Update use of LocalDefaultSystemAppearance.
2467         * html/HTMLMetaElement.cpp:
2468         (WebCore::HTMLMetaElement::process): Added supported-color-schemes behind runtime feature check.
2469         * inspector/InspectorOverlay.cpp:
2470         (WebCore::InspectorOverlay::paint): Update use of LocalDefaultSystemAppearance.
2471         * platform/mac/DragImageMac.mm:
2472         (WebCore::createDragImageForLink): Update use of LocalDefaultSystemAppearance.
2473         * platform/mac/LocalDefaultSystemAppearance.h:
2474         * platform/mac/LocalDefaultSystemAppearance.mm:
2475         (WebCore::LocalDefaultSystemAppearance::LocalDefaultSystemAppearance):
2476         Drop the need for useSystemAppearance. This is accounted for in Document::useDarkAppearance.
2477         * platform/mac/ThemeMac.mm:
2478         (WebCore::ThemeMac::paint): Update use of LocalDefaultSystemAppearance.
2479         * rendering/RenderLayerBacking.cpp:
2480         (WebCore::RenderLayerBacking::paintContents): Update use of LocalDefaultSystemAppearance.
2481         * rendering/RenderLayerCompositor.cpp:
2482         (WebCore::RenderLayerCompositor::paintContents): Update use of LocalDefaultSystemAppearance.
2483         * rendering/RenderTheme.cpp:
2484         (WebCore::RenderTheme::paint): Use document instead of page.
2485         * rendering/RenderThemeCocoa.mm:
2486         (WebCore::RenderThemeCocoa::drawLineForDocumentMarker): Update use of LocalDefaultSystemAppearance.
2487         * rendering/RenderThemeMac.mm:
2488         (WebCore::RenderThemeMac::documentViewFor const): Update use of LocalDefaultSystemAppearance.
2489         (WebCore::RenderThemeMac::platformActiveSelectionBackgroundColor const): Ditto.
2490         (WebCore::RenderThemeMac::platformInactiveSelectionBackgroundColor const): Ditto.
2491         (WebCore::RenderThemeMac::transformSelectionBackgroundColor const): Ditto.
2492         (WebCore::RenderThemeMac::supportsSelectionForegroundColors const): Ditto.
2493         (WebCore::RenderThemeMac::platformActiveSelectionForegroundColor const): Ditto.
2494         (WebCore::RenderThemeMac::platformInactiveSelectionForegroundColor const): Ditto.
2495         (WebCore::RenderThemeMac::platformActiveListBoxSelectionBackgroundColor const): Ditto.
2496         (WebCore::RenderThemeMac::platformInactiveListBoxSelectionBackgroundColor const): Ditto.
2497         (WebCore::RenderThemeMac::platformActiveListBoxSelectionForegroundColor const): Ditto.
2498         (WebCore::RenderThemeMac::platformInactiveListBoxSelectionForegroundColor const): Ditto.
2499         (WebCore::RenderThemeMac::platformActiveTextSearchHighlightColor const): Ditto.
2500         (WebCore::RenderThemeMac::colorCache const): Ditto.
2501         (WebCore::RenderThemeMac::systemColor const): Ditto.
2502         (WebCore::RenderThemeMac::paintCellAndSetFocusedElementNeedsRepaintIfNecessary): Ditto.
2503         (WebCore::RenderThemeMac::paintSliderThumb): Ditto.
2504         (WebCore::RenderThemeMac::usingDarkAppearance const): No need to limit to macOS here.
2505         * svg/graphics/SVGImage.cpp:
2506         (WebCore::SVGImage::draw): Update use of LocalDefaultSystemAppearance.
2507
2508 2018-10-16  Rob Buis  <rbuis@igalia.com>
2509
2510         Remove superfluous VIDEO build guard
2511         https://bugs.webkit.org/show_bug.cgi?id=190624
2512
2513         Reviewed by Michael Catanzaro.
2514
2515         Remove some instances where the VIDEO build guard is included within another VIDEO build guard.
2516
2517         No new tests. No change in behavior.
2518
2519         * platform/graphics/MediaPlayer.cpp:
2520         (WebCore::buildMediaEnginesVector):
2521         * platform/graphics/MediaPlayer.h:
2522         * platform/graphics/MediaPlayerPrivate.h:
2523
2524 2018-10-16  Youenn Fablet  <youenn@apple.com>
2525
2526         Support RTCConfiguration.certificates
2527         https://bugs.webkit.org/show_bug.cgi?id=190603
2528
2529         Reviewed by Eric Carlson.
2530
2531         Update RTCConfiguration to have a certificates member.
2532         Add the conversion from RTCCertificate to libwebrtc certificates.
2533         Add check to ensure that certificates are not expired.
2534         Add check to ensure that certificates passed to setConfiguration were
2535         the same as the ones passed to RTCPeerConnection constructor.
2536         Once these checks are done, we reuse the certificates created at
2537         RCPeerConnection creation time when setting the configuration again.
2538
2539         Covered by rebased WPT test.
2540
2541         * Modules/mediastream/RTCConfiguration.h:
2542         * Modules/mediastream/RTCConfiguration.idl:
2543         * Modules/mediastream/RTCPeerConnection.cpp:
2544         (WebCore::certificatesFromConfiguration):
2545         (WebCore::RTCPeerConnection::initializeConfiguration):
2546         (WebCore::RTCPeerConnection::setConfiguration):
2547         * Modules/mediastream/RTCPeerConnection.h:
2548         * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:
2549         (WebCore::LibWebRTCMediaEndpoint::setConfiguration):
2550         * Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp:
2551         (WebCore::configurationFromMediaEndpointConfiguration):
2552         * platform/mediastream/MediaEndpointConfiguration.cpp:
2553         (WebCore::MediaEndpointConfiguration::MediaEndpointConfiguration):
2554         * platform/mediastream/MediaEndpointConfiguration.h:
2555
2556 2018-10-16  Ryan Haddad  <ryanhaddad@apple.com>
2557
2558         Unreviewed, rolling out r237163.
2559
2560         Introduced layout test failures on iOS Simulator.
2561
2562         Reverted changeset:
2563
2564         "[CG] Adopt CG SPI for non-even cornered rounded rects"
2565         https://bugs.webkit.org/show_bug.cgi?id=190155
2566         https://trac.webkit.org/changeset/237163
2567
2568 2018-10-16  Devin Rousso  <drousso@apple.com>
2569
2570         Web Inspector: Canvas: capture previously saved states and add them to the recording payload
2571         https://bugs.webkit.org/show_bug.cgi?id=190473
2572
2573         Reviewed by Joseph Pecoraro.
2574
2575         Updated existing tests: inspector/canvas/recording-2d.html
2576                                 inspector/model/recording.html
2577
2578         Instead of sending a single object of the current state of the context, send an array of
2579         objects, one for each restore point.
2580
2581         * html/canvas/CanvasRenderingContext2DBase.h:
2582         * html/canvas/CanvasRenderingContext2DBase.cpp:
2583         (WebCore::CanvasRenderingContext2DBase::stateStack): Added.
2584
2585         * inspector/InspectorCanvas.h:
2586         * inspector/InspectorCanvas.cpp:
2587         (WebCore::InspectorCanvas::stringIndexForKey): Added.
2588         (WebCore::InspectorCanvas::buildInitialState):
2589
2590 2018-10-16  Justin Michaud  <justin_michaud@apple.com>
2591
2592         Implement feature flag and bindings for CSS Painting API
2593         https://bugs.webkit.org/show_bug.cgi?id=190237
2594
2595         Reviewed by Ryosuke Niwa.
2596
2597         Add feature flag and bindings for CSS Painting API. This adds a new property,
2598         CSS.paintWorkletGlobalScope, which will be a temporary way to access the paint
2599         worklet global scope untill CSS.paintWorklet is implemented.
2600
2601         There are a few small changes, mostly adding headers and "using" declarations,
2602         that were required to get this to build. This is probably related to unified sources.
2603
2604         Tests: fast/css-custom-paint/basic.html
2605                fast/css-custom-paint/registerPaintBindings.html
2606
2607         * CMakeLists.txt:
2608         * Configurations/FeatureDefines.xcconfig:
2609         * DerivedSources.make:
2610         * Sources.txt:
2611         * WebCore.xcodeproj/project.pbxproj:
2612         * bindings/js/JSCSSPaintWorkletGlobalScopeCustom.cpp: Added.
2613         (WebCore::throwInvalidModificationError):
2614         (WebCore::JSCSSPaintWorkletGlobalScope::registerPaint):
2615         * bindings/js/JSEventListener.cpp:
2616         * bindings/js/JSRemoteDOMWindowCustom.cpp:
2617         * bindings/js/JSWebMetalRenderPassAttachmentDescriptorCustom.cpp:
2618         * bindings/js/WebCoreBuiltinNames.h:
2619         * css/CSSPaintCallback.h: Copied from Source/WebCore/css/MediaQueryParserContext.cpp.
2620         (WebCore::CSSPaintCallback::~CSSPaintCallback):
2621         * css/CSSPaintCallback.idl: Added.
2622         * css/CSSPaintWorkletGlobalScope.cpp: Copied from Source/WebCore/css/MediaQueryParserContext.cpp.
2623         (WebCore::CSSPaintWorkletGlobalScope::create):
2624         (WebCore::CSSPaintWorkletGlobalScope::CSSPaintWorkletGlobalScope):
2625         (WebCore::CSSPaintWorkletGlobalScope::devicePixelRatio):
2626         (WebCore::CSSPaintWorkletGlobalScope::addRegisteredPaint):
2627         * css/CSSPaintWorkletGlobalScope.h: Copied from Source/WebCore/css/MediaQueryParserContext.cpp.
2628         (WebCore::CSSPaintWorkletGlobalScope::paintDefinitionMap):
2629         * css/CSSPaintWorkletGlobalScope.idl: Added.
2630         * css/DOMCSSPaintWorklet.cpp: Copied from Source/WebCore/css/MediaQueryParserContext.cpp.
2631         (WebCore::DOMCSSPaintWorklet::ensurePaintWorkletGlobalScope):
2632         (WebCore::DOMCSSPaintWorklet::from):
2633         (WebCore::DOMCSSPaintWorklet::supplementName):
2634         * css/DOMCSSPaintWorklet.h: Copied from Source/WebCore/css/MediaQueryParserContext.cpp.
2635         * css/DOMCSSPaintWorklet.idl: Added.
2636         * css/MediaQueryParserContext.cpp:
2637         * css/StyleBuilder.h:
2638         * dom/Document.cpp:
2639         (WebCore::Document::ensureCSSPaintWorkletGlobalScope):
2640         * dom/Document.h:
2641         * features.json:
2642         * page/RuntimeEnabledFeatures.h:
2643         (WebCore::RuntimeEnabledFeatures::setCSSPaintingAPIEnabled):
2644         (WebCore::RuntimeEnabledFeatures::cssPaintingAPIEnabled const):
2645
2646 2018-10-16  Per Arne Vollan  <pvollan@apple.com>
2647
2648         [WebVTT] Support inline WebVTT styles
2649         https://bugs.webkit.org/show_bug.cgi?id=190369
2650
2651         Reviewed by Eric Carlson.
2652
2653         Add support for inline WebVTT styles, see https://w3c.github.io/webvtt/#styling. The parsed
2654         style strings from the VTT file are added to an optional vector of style strings in the
2655         TextTrack class. These styles are then added as HTMLStyleElement children to the parent of
2656         the cue span element.
2657
2658         Test: media/track/track-cue-css.html
2659
2660         * html/track/InbandGenericTextTrack.cpp:
2661         (WebCore::InbandGenericTextTrack::newStyleSheetsParsed):
2662         * html/track/InbandGenericTextTrack.h:
2663         * html/track/InbandWebVTTTextTrack.cpp:
2664         (WebCore::InbandWebVTTTextTrack::newStyleSheetsParsed):
2665         * html/track/InbandWebVTTTextTrack.h:
2666         * html/track/LoadableTextTrack.cpp:
2667         (WebCore::LoadableTextTrack::newStyleSheetsAvailable):
2668         * html/track/LoadableTextTrack.h:
2669         * html/track/TextTrack.h:
2670         (WebCore::TextTrack::styleSheets const):
2671         * html/track/VTTCue.cpp:
2672         (WebCore::VTTCue::getDisplayTree):
2673         * html/track/WebVTTParser.cpp:
2674         (WebCore::WebVTTParser::getNewCues):
2675         (WebCore::WebVTTParser::getStyleSheets):
2676         (WebCore::WebVTTParser::parse):
2677         (WebCore::WebVTTParser::collectWebVTTBlock):
2678         (WebCore::WebVTTParser::collectStyleSheet):
2679         (WebCore::WebVTTParser::checkStyleSheet):
2680         (WebCore::WebVTTParser::checkAndStoreStyleSheet):
2681         * html/track/WebVTTParser.h:
2682         * loader/TextTrackLoader.cpp:
2683         (WebCore::TextTrackLoader::newStyleSheetsParsed):
2684         (WebCore::TextTrackLoader::getNewStyleSheets):
2685         * loader/TextTrackLoader.h:
2686
2687 2018-10-16  Chris Dumez  <cdumez@apple.com>
2688
2689         window.navigator should not become null after the window loses its browsing context
2690         https://bugs.webkit.org/show_bug.cgi?id=190595
2691
2692         Reviewed by Ryosuke Niwa.
2693
2694         window.navigator should not become null after the window loses its browsing context.
2695         This does not match the HTML specification or the behavior of other browsers.
2696
2697         No new tests, updated existing tests.
2698
2699         * Modules/geolocation/NavigatorGeolocation.cpp:
2700         (WebCore::NavigatorGeolocation::geolocation const):
2701         * page/DOMWindow.cpp:
2702         (WebCore::DOMWindow::navigator):
2703         * page/Navigator.cpp:
2704         (WebCore::Navigator::Navigator):
2705         * page/Navigator.h:
2706         * page/NavigatorBase.cpp:
2707         (WebCore::NavigatorBase::NavigatorBase):
2708         * page/NavigatorBase.h:
2709         * page/WorkerNavigator.cpp:
2710         (WebCore::WorkerNavigator::WorkerNavigator):
2711         * workers/service/ServiceWorkerContainer.cpp:
2712         (WebCore::ServiceWorkerContainer::ServiceWorkerContainer):
2713         * workers/service/ServiceWorkerContainer.h:
2714
2715 2018-10-16  Alex Christensen  <achristensen@webkit.org>
2716
2717         Replace HistoryItem* with HistoryItem& where possible
2718         https://bugs.webkit.org/show_bug.cgi?id=190617
2719
2720         Reviewed by Chris Dumez.
2721
2722         * history/BackForwardClient.h:
2723         * history/BackForwardController.cpp:
2724         (WebCore::BackForwardController::setCurrentItem):
2725         * history/BackForwardController.h:
2726         * history/HistoryItem.cpp:
2727         (WebCore::defaultNotifyHistoryItemChanged):
2728         (WebCore::HistoryItem::setAlternateTitle):
2729         (WebCore::HistoryItem::setURLString):
2730         (WebCore::HistoryItem::setOriginalURLString):
2731         (WebCore::HistoryItem::setReferrer):
2732         (WebCore::HistoryItem::setTitle):
2733         (WebCore::HistoryItem::setTarget):
2734         (WebCore::HistoryItem::setShouldRestoreScrollPosition):
2735         (WebCore::HistoryItem::setStateObject):
2736         (WebCore::HistoryItem::notifyChanged):
2737         * history/HistoryItem.h:
2738         * loader/EmptyClients.cpp:
2739         * loader/FrameLoader.cpp:
2740         (WebCore::FrameLoader::checkLoadCompleteForThisFrame):
2741         (WebCore::FrameLoader::continueLoadAfterNavigationPolicy):
2742         (WebCore::FrameLoader::loadSameDocumentItem):
2743         * loader/HistoryController.cpp:
2744         (WebCore::HistoryController::goToItem):
2745         (WebCore::HistoryController::updateForCommit):
2746         (WebCore::HistoryController::recursiveUpdateForCommit):
2747         (WebCore::HistoryController::recursiveUpdateForSameDocumentNavigation):
2748         (WebCore::HistoryController::setCurrentItem):
2749         (WebCore::HistoryController::createItem):
2750         (WebCore::HistoryController::itemsAreClones const):
2751         (WebCore::HistoryController::currentFramesMatchItem const):
2752         * loader/HistoryController.h:
2753
2754 2018-10-16  Alex Christensen  <achristensen@webkit.org>
2755
2756         Remove unused WebHistoryItem._transientPropertyForKey
2757         https://bugs.webkit.org/show_bug.cgi?id=190606
2758
2759         Reviewed by Chris Dumez.
2760
2761         This is unnecessary complexity in HistoryItem.
2762
2763         * history/HistoryItem.h:
2764         * history/mac/HistoryItemMac.mm:
2765         (WebCore::HistoryItem::getTransientProperty const): Deleted.
2766         (WebCore::HistoryItem::setTransientProperty): Deleted.
2767
2768 2018-10-16  Basuke Suzuki  <Basuke.Suzuki@sony.com>
2769
2770         [Curl] Separate SSL Class for platform dependent way of setup.
2771         https://bugs.webkit.org/show_bug.cgi?id=190597
2772
2773         Reviewed by Alex Christensen.
2774
2775         SSL setup is very platform dependent. This patch separate the class to allow
2776         platform-dependent setup at the SSL handle instantiation.
2777
2778         No new tests because there's no behaviro changes.
2779
2780         * PlatformWinCairo.cmake:
2781         * platform/network/curl/CurlSSLHandle.cpp:
2782         (WebCore::CurlSSLHandle::CurlSSLHandle):
2783         (WebCore::CurlSSLHandle::getCACertPathEnv): Moved.
2784         * platform/network/curl/CurlSSLHandle.h:
2785         * platform/network/win/CurlSSLHandleWin.cpp:
2786         (WebCore::getCACertPathEnv):
2787         (WebCore::CurlSSLHandle::platformInitialize):
2788
2789 2018-10-15  Keith Miller  <keith_miller@apple.com>
2790
2791         Support arm64 CPUs with a 32-bit address space
2792         https://bugs.webkit.org/show_bug.cgi?id=190273
2793
2794         Reviewed by Michael Saboff.
2795
2796         Fix missing namespace annotation.
2797
2798         * cssjit/SelectorCompiler.cpp:
2799         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateAddStyleRelation):
2800
2801 2018-10-15  Justin Fan  <justin_fan@apple.com>
2802
2803         Add WebGPU 2018 feature flag and experimental feature flag
2804         https://bugs.webkit.org/show_bug.cgi?id=190509
2805
2806         Reviewed by Dean Jackson.
2807
2808         Re-add ENABLE_WEBGPU, an experimental feature flag, and a RuntimeEnabledFeature
2809         for the 2018 WebGPU prototype.
2810
2811         * Configurations/FeatureDefines.xcconfig:
2812         * page/RuntimeEnabledFeatures.h:
2813         (WebCore::RuntimeEnabledFeatures::setWebGPUEnabled):
2814         (WebCore::RuntimeEnabledFeatures::webGPUEnabled const):
2815
2816 2018-10-15  Commit Queue  <commit-queue@webkit.org>
2817
2818         Unreviewed, rolling out r237162.
2819         https://bugs.webkit.org/show_bug.cgi?id=190612
2820
2821         Broke Windows build (Requested by dolmstead on #webkit).
2822
2823         Reverted changeset:
2824
2825         "Add stub implementation for accessibility objects"
2826         https://bugs.webkit.org/show_bug.cgi?id=190608
2827         https://trac.webkit.org/changeset/237162
2828
2829 2018-10-15  Said Abou-Hallawa  <sabouhallawa@apple.com>
2830
2831         [CG] Adopt CG SPI for non-even cornered rounded rects
2832         https://bugs.webkit.org/show_bug.cgi?id=190155
2833
2834         Reviewed by Simon Fraser.
2835
2836         Instead of creating bezier curves for the non-even corners of the rounded
2837         rects, we should use the optimized SPI provided by CG.
2838
2839         * platform/graphics/cg/PathCG.cpp:
2840         (WebCore::Path::platformAddPathForRoundedRect):
2841
2842 2018-10-15  Don Olmstead  <don.olmstead@sony.com>
2843
2844         Add stub implementation for accessibility objects
2845         https://bugs.webkit.org/show_bug.cgi?id=190608
2846
2847         Reviewed by Michael Catanzaro.
2848
2849         No new tests. No change in behavior.
2850
2851         Add default implementation to associated cpp file. Removes the WPE
2852         specific stubs.
2853
2854         * SourcesWPE.txt:
2855         * accessibility/AXObjectCache.cpp:
2856         (WebCore::AXObjectCache::detachWrapper):
2857         (WebCore::AXObjectCache::attachWrapper):
2858         (WebCore::AXObjectCache::postPlatformNotification):
2859         (WebCore::AXObjectCache::nodeTextChangePlatformNotification):
2860         (WebCore::AXObjectCache::frameLoadingEventPlatformNotification):
2861         (WebCore::AXObjectCache::platformHandleFocusedUIElementChanged):
2862         (WebCore::AXObjectCache::handleScrolledToAnchor):
2863         * accessibility/AccessibilityObject.cpp:
2864         (WebCore::AccessibilityObject::accessibilityIgnoreAttachment const):
2865         (WebCore::AccessibilityObject::accessibilityPlatformIncludesObject const):
2866         * accessibility/AccessibilityObject.h:
2867         * accessibility/wpe/AXObjectCacheWPE.cpp: Removed.
2868         * accessibility/wpe/AccessibilityObjectWPE.cpp: Removed.
2869
2870 2018-10-15  Alex Christensen  <achristensen@webkit.org>
2871
2872         Modernize BackForwardClient.h
2873         https://bugs.webkit.org/show_bug.cgi?id=190610
2874
2875         Reviewed by Chris Dumez.
2876
2877         * editing/markup.cpp:
2878         (WebCore::createPageForSanitizingWebContent):
2879         * history/BackForwardClient.h:
2880         * history/BackForwardController.h:
2881         (WebCore::BackForwardController::client):
2882         (WebCore::BackForwardController::client const):
2883         * inspector/InspectorOverlay.cpp:
2884         (WebCore::InspectorOverlay::overlayPage):
2885         * loader/EmptyClients.cpp:
2886         (WebCore::pageConfigurationWithEmptyClients):
2887         (WebCore::createEmptyFrameNetworkingContext): Deleted.
2888         (WebCore::fillWithEmptyClients): Deleted.
2889         (WebCore::createEmptyEditorClient): Deleted.
2890         * loader/EmptyClients.h:
2891         * page/Page.cpp:
2892         (WebCore::Page::Page):
2893         * page/PageConfiguration.cpp:
2894         (WebCore::PageConfiguration::PageConfiguration):
2895         * page/PageConfiguration.h:
2896         * svg/graphics/SVGImage.cpp:
2897         (WebCore::SVGImage::dataChanged):
2898
2899 2018-10-15  Timothy Hatcher  <timothy@apple.com>
2900
2901         Add support for prefers-color-scheme media query
2902         https://bugs.webkit.org/show_bug.cgi?id=190499
2903         rdar://problem/45212025
2904
2905         Reviewed by Dean Jackson.
2906
2907         Test: css-dark-mode/prefers-color-scheme.html
2908
2909         * Configurations/FeatureDefines.xcconfig: Added ENABLE_DARK_MODE_CSS.
2910         * css/CSSValueKeywords.in: Added light and dark.
2911         * css/MediaFeatureNames.h: Added prefers-color-scheme.
2912         * css/MediaQueryEvaluator.cpp:
2913         (WebCore::prefersColorSchemeEvaluate): Added.
2914         * css/MediaQueryExpression.cpp:
2915         (WebCore::featureWithValidIdent): Added prefers-color-scheme.
2916         * page/RuntimeEnabledFeatures.h:
2917         (WebCore::RuntimeEnabledFeatures::setDarkModeCSSEnabled): Added.
2918         (WebCore::RuntimeEnabledFeatures::darkModeCSSEnabled const): Added.
2919         * testing/InternalSettings.cpp:
2920         (WebCore::InternalSettings::resetToConsistentState): Reset setUseDarkAppearance.
2921         (WebCore::InternalSettings::setUseDarkAppearance): Added.
2922         * testing/InternalSettings.h: Added setUseDarkAppearance.
2923         * testing/InternalSettings.idl: Ditto.
2924
2925 2018-10-15  Alex Christensen  <achristensen@webkit.org>
2926
2927         Remove unused WebView._globalHistoryItem
2928         https://bugs.webkit.org/show_bug.cgi?id=190601
2929
2930         Reviewed by Chris Dumez.
2931
2932         This was a hack to give the client a more reliable current back/forward item, but it hasn't been used for years
2933         and it's adding unnecessary complexity to the history code.
2934
2935         * loader/EmptyFrameLoaderClient.h:
2936         * loader/FrameLoader.cpp:
2937         (WebCore::FrameLoader::checkLoadCompleteForThisFrame):
2938         (WebCore::FrameLoader::continueLoadAfterNavigationPolicy):
2939         * loader/FrameLoaderClient.h:
2940         * loader/HistoryController.cpp:
2941         (WebCore::HistoryController::goToItem):
2942         (WebCore::HistoryController::updateForStandardLoad):
2943         (WebCore::HistoryController::updateForRedirectWithLockedBackForwardList):
2944
2945 2018-10-15  Chris Dumez  <cdumez@apple.com>
2946
2947         Experiment: target=_blank on anchors should imply rel=noopener
2948         https://bugs.webkit.org/show_bug.cgi?id=190481
2949
2950         Reviewed by Alex Christensen.
2951
2952         As an experiment, try and make it so that target=_blank on anchors implies `rel=noopener` for improved security.
2953         WebContent can then request an opener relationship by using `rel=opener` instead.
2954
2955         This change was discussed at:
2956         - https://github.com/whatwg/html/issues/4078
2957
2958         We want to attempt this change is STP to see if it is Web-compatible. Preliminary testing seems to indicate
2959         that OAuth workflows still work.
2960
2961         * html/HTMLAnchorElement.cpp:
2962         (WebCore::HTMLAnchorElement::parseAttribute):
2963         (WebCore::HTMLAnchorElement::handleClick):
2964         (WebCore::HTMLAnchorElement::effectiveTarget const):
2965         * html/HTMLAnchorElement.h:
2966         * page/RuntimeEnabledFeatures.h:
2967         (WebCore::RuntimeEnabledFeatures::setBlankAnchorTargetImpliesNoOpenerEnabled):
2968         (WebCore::RuntimeEnabledFeatures::blankAnchorTargetImpliesNoOpenerEnabled const):
2969
2970 2018-10-15  Andy Estes  <aestes@apple.com>
2971
2972         [Apple Pay] New shipping methods are ignored when updating after the shippingaddresschange event
2973         https://bugs.webkit.org/show_bug.cgi?id=190560
2974         <rdar://problem/44559075>
2975
2976         Reviewed by Youenn Fablet.
2977
2978         When a PaymentDetailsUpdate with shipping options was specified to updateWith() after the
2979         shippingaddresschange event fires, ApplePayPaymentHandler needs to convert the shipping
2980         options to ShippingMethods and add them to the ShippingContactUpdate so that the Apple Pay
2981         UI renders the new options.
2982
2983         Added test cases to http/tests/ssl/applepay/ApplePayShippingAddressChangeEventErrors.https.html.
2984
2985         * Modules/applepay/ApplePayShippingMethod.idl:
2986         * Modules/applepay/paymentrequest/ApplePayPaymentHandler.cpp:
2987         (WebCore::ApplePayPaymentHandler::computeShippingMethods):
2988         (WebCore::ApplePayPaymentHandler::shippingAddressUpdated):
2989         * Modules/applepay/paymentrequest/ApplePayPaymentHandler.h:
2990         * testing/MockPaymentCoordinator.cpp:
2991         (WebCore::convert):
2992         (WebCore::MockPaymentCoordinator::showPaymentUI):
2993         (WebCore::MockPaymentCoordinator::completeShippingContactSelection):
2994         * testing/MockPaymentCoordinator.h:
2995         * testing/MockPaymentCoordinator.idl:
2996
2997 2018-10-15  Youenn Fablet  <youenn@apple.com>
2998
2999         RTCPeerConnection.generateCertificate is not a function
3000         https://bugs.webkit.org/show_bug.cgi?id=173541
3001         <rdar://problem/32638029>
3002
3003         Reviewed by Eric Carlson.
3004
3005         Add support for RTCCertificate generation through libwebrtc certificate generator.
3006         Make generation in the webrtc network thread.
3007         Support is as per spec (ECDSA and RSASSA_PKCS).
3008
3009         Partially covered by WPT tests.
3010
3011         * css/StyleBuilder.h: Fixing build.
3012         * CMakeLists.txt:
3013         * DerivedSources.make:
3014         * Modules/webauthn/PublicKeyCredential.cpp: Fixing build.
3015         * Modules/mediastream/PeerConnectionBackend.cpp:
3016         (WebCore::PeerConnectionBackend::generateCertificate):
3017         * Modules/mediastream/PeerConnectionBackend.h:
3018         (WebCore::PeerConnectionBackend::CertificateInformation::RSASSA_PKCS1_v1_5):
3019         (WebCore::PeerConnectionBackend::CertificateInformation::ECDSA_P256):
3020         (WebCore::PeerConnectionBackend::CertificateInformation::CertificateInformation):
3021         * Modules/mediastream/RTCCertificate.cpp: Added.
3022         (WebCore::RTCCertificate::create):
3023         (WebCore::RTCCertificate::RTCCertificate):
3024         * Modules/mediastream/RTCCertificate.h: Added.
3025         (WebCore::RTCCertificate::expires const):
3026         (WebCore::RTCCertificate::getFingerprints const):
3027         * Modules/mediastream/RTCCertificate.idl: Added.
3028         * Modules/mediastream/RTCPeerConnection.cpp:
3029         (WebCore::certificateTypeFromAlgorithmIdentifier):
3030         (WebCore::RTCPeerConnection::generateCertificate):
3031         * Modules/mediastream/RTCPeerConnection.h:
3032         * Modules/mediastream/RTCPeerConnection.idl:
3033         * Modules/mediastream/libwebrtc/LibWebRTCCertificateGenerator.cpp: Added.
3034         (WebCore::LibWebRTCCertificateGenerator::RTCCertificateGeneratorCallback::RTCCertificateGeneratorCallback):
3035         (WebCore::LibWebRTCCertificateGenerator::RTCCertificateGeneratorCallback::~RTCCertificateGeneratorCallback):
3036         (WebCore::LibWebRTCCertificateGenerator::keyParamsFromCertificateType):
3037         (WebCore::LibWebRTCCertificateGenerator::generateCertificate):
3038         * Modules/mediastream/libwebrtc/LibWebRTCCertificateGenerator.h: Added.
3039         * Sources.txt:
3040         * WebCore.xcodeproj/project.pbxproj:
3041         * bindings/js/WebCoreBuiltinNames.h:
3042         * platform/mediastream/libwebrtc/LibWebRTCProvider.cpp:
3043         (WebCore::LibWebRTCProvider::certificateGenerator):
3044         * platform/mediastream/libwebrtc/LibWebRTCProvider.h:
3045
3046 2018-10-15  Simon Fraser  <simon.fraser@apple.com>
3047
3048         Add compact logging for the paint-order RenderLayer tree
3049         https://bugs.webkit.org/show_bug.cgi?id=190592
3050
3051         Reviewed by Zalan Bujtas.
3052
3053         Add a way to dump the RenderLayer tree in paint order, which will be extended in future
3054         to show more dirty bit state.
3055
3056         * rendering/RenderLayer.cpp:
3057         (WebCore::outputPaintOrderTreeLegend):
3058         (WebCore::outputIdent):
3059         (WebCore::outputPaintOrderTreeRecursive):
3060         (WebCore::showPaintOrderTree):
3061         * rendering/RenderLayer.h:
3062
3063 2018-10-15  Alex Christensen  <achristensen@webkit.org>
3064
3065         Remove unused parameters from FrameLoaderClient::createFrame
3066         https://bugs.webkit.org/show_bug.cgi?id=190587
3067
3068         Reviewed by Chris Dumez.
3069
3070         * loader/EmptyClients.cpp:
3071         (WebCore::EmptyFrameLoaderClient::createFrame):
3072         * loader/EmptyFrameLoaderClient.h:
3073         * loader/FrameLoaderClient.h:
3074         * loader/SubframeLoader.cpp:
3075         (WebCore::SubframeLoader::loadSubframe):
3076
3077 2018-10-15  Andy Estes  <aestes@apple.com>
3078
3079         [Apple Pay] Payment authorization results with ApplePayErrors should never be considered final
3080         https://bugs.webkit.org/show_bug.cgi?id=190559
3081         <rdar://problem/37250908>
3082
3083         Reviewed by Anders Carlsson.
3084
3085         When PaymentCoordinator thinks a payment authorization result is final it releases the
3086         active ApplePaySession. The Apple Pay UI is dismissed after a receiving a final result.
3087
3088         However, WebCore::isFinalStateResult had the wrong idea about what was a final state,
3089         in some cases causing PaymentCoordinator to release the active session even when the UI is
3090         still presented. If the user authorizes payment again, the website will not receive another
3091         paymentauthorized event, and the Apple Pay UI will eventually time out waiting for a result.
3092
3093         Specifically, isFinalStateResult thought that:
3094
3095         (1) results with STATUS_SUCCESS were always final, even if they had errors
3096         (2) errors with code "unknown" were final
3097
3098         Both of these assumptions are wrong. PassKit considers any result with errors to be
3099         non-final, even if an error has code "unknown."
3100
3101         Fixed WebCore::isFinalStateResult to agree with what PassKit considers to be final results.
3102
3103         Test: http/tests/ssl/applepay/ApplePaySessionFinalState.https.html
3104
3105         * Modules/applepay/ApplePaySessionPaymentRequest.cpp:
3106         (WebCore::isFinalStateResult):
3107         * testing/MockPaymentCoordinator.cpp:
3108         (WebCore::MockPaymentCoordinator::completePaymentSession):
3109
3110 2018-10-15  Andy Estes  <aestes@apple.com>
3111
3112         [Payment Request] PaymentResponse should be a ContextDestructionObserver
3113         https://bugs.webkit.org/show_bug.cgi?id=190558
3114
3115         Reviewed by Alex Christensen.
3116
3117         Make PaymentResponse a ContextDestructionObserver so it has a ScriptExecutionContext to
3118         return for its override of EventTarget::scriptExecutionContext(). Do this instead of
3119         downcasting m_request to an ActiveDOMObject to ask for its context.
3120
3121         * Modules/paymentrequest/PaymentRequest.cpp:
3122         (WebCore::PaymentRequest::accept):
3123         * Modules/paymentrequest/PaymentResponse.cpp:
3124         (WebCore::PaymentResponse::PaymentResponse):
3125         (WebCore::PaymentResponse::scriptExecutionContext const): Deleted.
3126         * Modules/paymentrequest/PaymentResponse.h:
3127
3128 2018-10-15  Andy Estes  <aestes@apple.com>
3129
3130         [Payment Request] Use a PendingActivity token rather than calling (un)setPendingActivity
3131         https://bugs.webkit.org/show_bug.cgi?id=190557
3132
3133         Reviewed by Alex Christensen.
3134
3135         PaymentRequest has pending activity whenever there is an active payment handler, since
3136         user-initiated events can occur whenever the payment UI is displayed.
3137
3138         Rather than manually track the pending activity with setPendingActivity() and
3139         unsetPendingActivity(), use a PendingActivity token tied to the lifetime of the active
3140         payment handler. Also, rewrite canSuspendForDocumentSuspension() in terms of
3141         hasPendingActivity().
3142
3143         * Modules/paymentrequest/PaymentRequest.cpp:
3144         (WebCore::PaymentRequest::show):
3145         (WebCore::PaymentRequest::abortWithException):
3146         (WebCore::PaymentRequest::canSuspendForDocumentSuspension const):
3147         (WebCore::PaymentRequest::paymentMethodChanged):
3148         (WebCore::PaymentRequest::completeMerchantValidation):
3149         (WebCore::PaymentRequest::settleDetailsPromise):
3150         (WebCore::PaymentRequest::complete):
3151         (WebCore::PaymentRequest::cancel):
3152         * Modules/paymentrequest/PaymentRequest.h:
3153
3154 2018-10-15  Wenson Hsieh  <wenson_hsieh@apple.com>
3155
3156         Changing view scale should zoom to initial scale if the page is already at initial scale
3157         https://bugs.webkit.org/show_bug.cgi?id=190570
3158         <rdar://problem/45261877>
3159
3160         Reviewed by Tim Horton.
3161
3162         Add a getter for ViewportConfiguration's layout size scale factor.
3163         See Source/WebKit/ChangeLog for more details.
3164
3165         * page/ViewportConfiguration.h:
3166         (WebCore::ViewportConfiguration::layoutSizeScaleFactor const):
3167
3168 2018-10-15  Charlie Turner  <cturner@igalia.com>
3169
3170         Fix build error with !LOG_DISABLED in Release mode
3171         https://bugs.webkit.org/show_bug.cgi?id=190465
3172
3173         Reviewed by Michael Catanzaro.
3174
3175         No tests due to no new functionality.
3176
3177         * workers/service/ServiceWorkerRegistrationKey.cpp:
3178         * workers/service/ServiceWorkerRegistrationKey.h:
3179
3180 2018-10-15  Simon Fraser  <simon.fraser@apple.com>
3181
3182         LayerListMutationDetector should take a reference
3183         https://bugs.webkit.org/show_bug.cgi?id=190586
3184
3185         Reviewed by Zalan Bujtas.
3186         
3187         Change LayerListMutationDetector to take a RenderLayer&.
3188
3189         * rendering/RenderLayer.cpp:
3190         (WebCore::RenderLayer::paintList):
3191         (WebCore::RenderLayer::hitTestLayer):
3192         (WebCore::RenderLayer::calculateClipRects const):
3193         * rendering/RenderLayer.h:
3194         (WebCore::LayerListMutationDetector::LayerListMutationDetector):
3195         (WebCore::LayerListMutationDetector::~LayerListMutationDetector):
3196         * rendering/RenderLayerBacking.cpp:
3197         (WebCore::traverseVisibleNonCompositedDescendantLayers):
3198         * rendering/RenderLayerCompositor.cpp:
3199         (WebCore::RenderLayerCompositor::addToOverlapMapRecursive):
3200         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
3201         (WebCore::RenderLayerCompositor::rebuildCompositingLayerTree):
3202         (WebCore::RenderLayerCompositor::updateLayerTreeGeometry):
3203         (WebCore::RenderLayerCompositor::updateCompositingDescendantGeometry):
3204         (WebCore::RenderLayerCompositor::recursiveRepaintLayer):
3205         (WebCore::RenderLayerCompositor::layerHas3DContent const):
3206
3207 2018-10-15  Simon Fraser  <simon.fraser@apple.com>
3208
3209         Share some code to dirty z-order and normal flow lists when child layers are added or removed
3210         https://bugs.webkit.org/show_bug.cgi?id=190585
3211
3212         Reviewed by Zalan Bujtas.
3213
3214         Factor code which dirties the normal flow list and child stacking context z-order lists
3215         when a layer is added or removed.
3216
3217         * rendering/RenderLayer.cpp:
3218         (WebCore::RenderLayer::addChild):
3219         (WebCore::RenderLayer::removeChild):
3220         (WebCore::RenderLayer::dirtyPaintOrderListsOnChildChange):
3221         * rendering/RenderLayer.h:
3222
3223 2018-10-15  Simon Fraser  <simon.fraser@apple.com>
3224
3225         Make a helper function to check for reflection layers
3226         https://bugs.webkit.org/show_bug.cgi?id=190584
3227
3228         Reviewed by Zalan Bujtas.
3229
3230         Add RenderLayer::isReflectionLayer() which returns true if the passed layer
3231         is the layer of this layer's reflection. It's used in z-order list building.
3232
3233         * rendering/RenderLayer.cpp:
3234         (WebCore::RenderLayer::updateNormalFlowList):
3235         (WebCore::RenderLayer::rebuildZOrderLists):
3236         (WebCore::RenderLayer::collectLayers):
3237         (WebCore::expandClipRectForDescendantsAndReflection):
3238         (WebCore::RenderLayer::calculateClipRects const):
3239         * rendering/RenderLayer.h:
3240
3241 2018-10-15  Simon Fraser  <simon.fraser@apple.com>
3242
3243         RenderLayer::addChild() and removeChild() should take references
3244         https://bugs.webkit.org/show_bug.cgi?id=190582
3245
3246         Reviewed by Zalan Bujtas.
3247
3248         Pass the layer to be added or removed as a reference; it's never null.
3249
3250         * rendering/RenderElement.cpp:
3251         (WebCore::addLayers):
3252         (WebCore::RenderElement::removeLayers):
3253         (WebCore::RenderElement::moveLayers):
3254         * rendering/RenderLayer.cpp:
3255         (WebCore::RenderLayer::addChild):
3256         (WebCore::RenderLayer::removeChild):
3257         (WebCore::RenderLayer::insertOnlyThisLayer):
3258         (WebCore::RenderLayer::removeOnlyThisLayer):
3259         * rendering/RenderLayer.h:
3260
3261 2018-10-15  Yoshiaki Jitsukawa  <yoshiaki.jitsukawa@sony.com>
3262
3263         [Cairo] Incorrect rendering for 135-deg skews
3264         https://bugs.webkit.org/show_bug.cgi?id=190513
3265
3266         Compensation value to zero the the translation components
3267         of the transformation matrix is incorrect if the matrix
3268         has a shear factor.
3269
3270         Reviewed by Žan Doberšek.
3271
3272         Tests: fast/transforms/skew-x-135deg-with-gradient.html
3273                fast/transforms/skew-y-135deg-with-gradient.html
3274
3275         * platform/graphics/cairo/CairoUtilities.cpp:
3276         (WebCore::drawPatternToCairoContext):
3277
3278 2018-10-15  Christopher Reid  <chris.reid@sony.com>
3279
3280         [Curl][WinCairo] Add Public Suffix support to WinCairo
3281         https://bugs.webkit.org/show_bug.cgi?id=183060
3282
3283         Reviewed by Alex Christensen.
3284
3285         Add Public Suffix support to WinCairo using LibPSL.
3286         LibPSL has been added to WinCairoRequirements in v2018.10.09.
3287
3288         * platform/Curl.cmake:
3289         * platform/network/curl/CookieJarDB.cpp:
3290         (WebCore::CookieJarDB::searchCookies): Search for cookies using the topPrivatelyControlledDomain
3291         (WebCore::CookieJarDB::setCookie): Prevent cookies from being added under TLDs
3292         * platform/network/curl/PublicSuffixCurl.cpp: Added.
3293         (WebCore::isPublicSuffix):
3294         (WebCore::topPrivatelyControlledDomainInternal):
3295         (WebCore::topPrivatelyControlledDomain):
3296
3297 2018-10-15  Simon Fraser  <simon.fraser@apple.com>
3298
3299         RenderLayer tree-related cleanup
3300         https://bugs.webkit.org/show_bug.cgi?id=190572
3301
3302         Reviewed by Zalan Bujtas.
3303
3304         Move code around so that functions related to parent/child and z-order tree structure
3305         are near the top of RenderLayer.cpp, since this is one of the primary functions of layers.
3306         
3307         Attempts to use inheritance or composition to separate out tree structure resulted in
3308         unwieldy code and/or performance regressions.
3309         
3310         The only behavior change is to store a bit for m_isStackingContext so that we don't have
3311         to consult the old style to know if it changed.
3312
3313         * rendering/RenderLayer.cpp:
3314         (WebCore::RenderLayer::RenderLayer):
3315         (WebCore::RenderLayer::addChild):
3316         (WebCore::RenderLayer::removeChild):
3317         (WebCore::RenderLayer::insertOnlyThisLayer):
3318         (WebCore::RenderLayer::removeOnlyThisLayer):
3319         (WebCore::canCreateStackingContext):
3320         (WebCore::RenderLayer::shouldBeNormalFlowOnly const):
3321         (WebCore::RenderLayer::shouldBeStackingContext const):
3322         (WebCore::RenderLayer::setIsNormalFlowOnly):
3323         (WebCore::RenderLayer::setIsStackingContext):
3324         (WebCore::RenderLayer::setParent):
3325         (WebCore::RenderLayer::dirtyZOrderLists):
3326         (WebCore::RenderLayer::dirtyStackingContextZOrderLists):
3327         (WebCore::RenderLayer::dirtyNormalFlowList):
3328         (WebCore::RenderLayer::updateNormalFlowList):
3329         (WebCore::RenderLayer::rebuildZOrderLists):
3330         (WebCore::RenderLayer::collectLayers):
3331         (WebCore::RenderLayer::updateLayerListsIfNeeded):
3332         (WebCore::RenderLayer::beginTransparencyLayers):
3333         (WebCore::RenderLayer::willBeDestroyed):
3334         (WebCore::RenderLayer::isDescendantOf const):
3335         (WebCore::RenderLayer::calculateClipRects const):
3336         (WebCore::compareZIndex): Deleted.
3337         * rendering/RenderLayer.h:
3338
3339 2018-10-15  Antti Koivisto  <antti@apple.com>
3340
3341         [PSON] Prewarm system fallback fonts
3342         https://bugs.webkit.org/show_bug.cgi?id=190517
3343
3344         Reviewed by Ryosuke Niwa.
3345
3346         This seems to be ~2% progression in PSON PLT4 with large (40ms+) improvements on some pages
3347         after process swaps.
3348
3349         * page/PrewarmInformation.h:
3350         (WebCore::PrewarmInformation::encode const):
3351         (WebCore::PrewarmInformation::decode):
3352         * page/ProcessWarming.cpp:
3353         (WebCore::ProcessWarming::collectPrewarmInformation):
3354         (WebCore::ProcessWarming::prewarmWithInformation):
3355         * platform/graphics/FontCache.cpp:
3356         (WebCore::FontCache::collectPrewarmInformation const):
3357         (WebCore::FontCache::prewarm):
3358         * platform/graphics/FontCache.h:
3359         (WebCore::FontCache::PrewarmInformation::isolatedCopy const):
3360         (WebCore::FontCache::PrewarmInformation::encode const):
3361         (WebCore::FontCache::PrewarmInformation::decode):
3362
3363         Make font cache prewarm information a struct with encode/decode support and move it into FontCache scope.
3364
3365         * platform/graphics/cocoa/FontCacheCoreText.cpp:
3366         (WebCore::FontDatabase::collectionForFamily):
3367         (WebCore::FontCache::systemFallbackForCharacters):
3368
3369         Collect the names of fonts that end up needing character specific system fallbacks.
3370
3371         (WebCore::FontCache::collectPrewarmInformation const):
3372
3373         Include them into prewarm information.
3374
3375         (WebCore::FontCache::prewarm):
3376
3377         Invoking CTFontCreateForCharactersWithLanguage for the correct named font seems sufficient to fully
3378         prewarm it for fallbacks (independent of size, locale or other characteristics).
3379         Any future calls to systemFallbackForCharacters are fast.
3380
3381 2018-10-15  Chris Dumez  <cdumez@apple.com>
3382
3383         Restrict browsing context lookup by name to frames that are related to one another
3384         https://bugs.webkit.org/show_bug.cgi?id=190475
3385
3386         Reviewed by Alex Christensen.
3387
3388         Update our frame lookup by name logic to take in the active / requesting frame and
3389         only a return a frame that is related to it. By related to it, I mean:
3390         - Ancestor <-> Descendant relationship
3391         - Opener <-> Openee relationship
3392
3393         Being able to look up unrelated frames makes process swapping difficult so we need
3394         to be stricter.
3395
3396         This change is being discussed at:
3397         - https://github.com/whatwg/html/issues/313
3398
3399         Tests: http/tests/dom/new-window-can-target-opener.html
3400                http/tests/dom/noopener-window-cannot-target-opener.html
3401                http/tests/dom/noopener-window-not-targetable.html
3402                http/tests/dom/noopener-window-not-targetable2.html
3403                http/tests/dom/noreferrer-window-not-targetable.html
3404                http/tests/dom/opened-window-not-targetable-after-disowning-opener.html
3405
3406         * loader/FrameLoader.cpp:
3407         (WebCore::FrameLoader::findFrameForNavigation):
3408         * page/FrameTree.cpp:
3409         (WebCore::isFrameFamiliarWith):
3410         (WebCore::FrameTree::find const):
3411         * page/FrameTree.h:
3412         * rendering/HitTestResult.cpp:
3413         (WebCore::HitTestResult::targetFrame const):
3414
3415 2018-10-15  Alex Christensen  <achristensen@webkit.org>
3416
3417         Shrink more enum classes
3418         https://bugs.webkit.org/show_bug.cgi?id=190540
3419
3420         Reviewed by Chris Dumez.
3421
3422         * Modules/notifications/NotificationDirection.h:
3423         * dom/Document.h:
3424         * loader/FrameLoader.h:
3425         * loader/FrameLoaderClient.h:
3426         * loader/HistoryController.h:
3427         * loader/ShouldSkipSafeBrowsingCheck.h:
3428         * loader/ShouldTreatAsContinuingLoad.h:
3429         * page/AutoplayEvent.h:
3430         * page/ChromeClient.h:
3431         * page/DiagnosticLoggingClient.h:
3432         * page/Page.h:
3433         * platform/CookiesStrategy.h:
3434         * platform/audio/AudioSession.h:
3435         * platform/network/NetworkStorageSession.h:
3436         * platform/network/StoredCredentialsPolicy.h:
3437         * workers/service/SWClientConnection.h:
3438         * workers/service/ServiceWorkerContainer.h:
3439         * workers/service/ServiceWorkerRegistrationData.h:
3440         * workers/service/ServiceWorkerRegistrationOptions.h:
3441         * workers/service/ServiceWorkerTypes.h:
3442         * workers/service/ServiceWorkerUpdateViaCache.h:
3443         * workers/service/server/SWServer.h:
3444         * workers/service/server/SWServerRegistration.h:
3445
3446 2018-10-15  Patrick Griffis  <pgriffis@igalia.com>
3447
3448         [GTK][WPE] Implement subprocess sandboxing
3449         https://bugs.webkit.org/show_bug.cgi?id=188568
3450
3451         Reviewed by Michael Catanzaro.
3452
3453         Link against libseccomp.
3454
3455         * PlatformGTK.cmake:
3456
3457 2018-10-15  YUHAN WU  <yuhan_wu@apple.com>
3458
3459         Implement error handler of MediaRecorder
3460         https://bugs.webkit.org/show_bug.cgi?id=190438
3461
3462         Reviewed by Youenn Fablet.
3463
3464         Test: imported/w3c/web-platform-tests/mediacapture-record/MediaRecorder-error.html
3465
3466         Implement error event handler (onerror) for MediaRecorder and basic architecture of start() function.
3467
3468         * CMakeLists.txt:
3469         * DerivedSources.make:
3470         * Modules/mediarecorder/MediaRecorder.cpp:
3471         (WebCore::MediaRecorder::MediaRecorder):
3472         (WebCore::MediaRecorder::~MediaRecorder):
3473         (WebCore::MediaRecorder::stop):
3474         (WebCore::MediaRecorder::start):
3475         (WebCore::MediaRecorder::setNewRecordingState):
3476         (WebCore::MediaRecorder::scheduleDeferredTask):
3477         (WebCore::MediaRecorder::didAddOrRemoveTrack):
3478         * Modules/mediarecorder/MediaRecorder.h:
3479         * Modules/mediarecorder/MediaRecorder.idl:
3480         * Modules/mediarecorder/MediaRecorderErrorEvent.cpp: Added.
3481         (WebCore::MediaRecorderErrorEvent::create):
3482         (WebCore::MediaRecorderErrorEvent::MediaRecorderErrorEvent):
3483         (WebCore::MediaRecorderErrorEvent::eventInterface const):
3484         * Modules/mediarecorder/MediaRecorderErrorEvent.h: Added.
3485         * Modules/mediarecorder/MediaRecorderErrorEvent.idl: Added.
3486         * Sources.txt:
3487         * WebCore.xcodeproj/project.pbxproj:
3488         * bindings/js/WebCoreBuiltinNames.h:
3489         * dom/EventNames.in:
3490         * dom/EventTargetFactory.in:
3491
3492 2018-10-15  Chris Dumez  <cdumez@apple.com>
3493
3494         Window's properties such as 'location' should not become null when it loses its browsing context
3495         https://bugs.webkit.org/show_bug.cgi?id=190539
3496
3497         Reviewed by Alex Christensen.
3498
3499         Window's properties such as 'location' should not become null when it loses its browsing context.
3500         This Webkit behavior is not standard and does not match other browsers so this patch makes it so
3501         that those properties persist.
3502
3503         Tests: http/tests/dom/cross-origin-detached-window-properties.html
3504                http/tests/dom/same-origin-detached-window-properties.html
3505
3506         * bindings/js/JSDOMBindingSecurity.cpp:
3507         (WebCore::BindingSecurity::shouldAllowAccessToDOMWindow):
3508         * bindings/js/JSDOMBindingSecurity.h:
3509         * bindings/js/JSDOMWindowProperties.cpp:
3510         (WebCore::jsDOMWindowPropertiesGetOwnPropertySlotNamedItemGetter):
3511         (WebCore::JSDOMWindowProperties::getOwnPropertySlot):
3512         * bindings/js/JSLocationCustom.cpp:
3513         (WebCore::getOwnPropertySlotCommon):
3514         (WebCore::putCommon):
3515         (WebCore::JSLocation::deleteProperty):
3516         (WebCore::JSLocation::deletePropertyByIndex):
3517         (WebCore::JSLocation::getOwnPropertyNames):
3518         (WebCore::JSLocation::defineOwnProperty):
3519         (WebCore::JSLocation::getPrototype):
3520         (WebCore::JSLocation::toStringName):
3521         * bindings/scripts/CodeGeneratorJS.pm:
3522         (GenerateAttributeGetterBodyDefinition):
3523         (GenerateAttributeSetterBodyDefinition):
3524         (GenerateOperationBodyDefinition):
3525         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
3526         (WebCore::jsTestActiveDOMObjectExcitingAttrGetter):
3527         (WebCore::jsTestActiveDOMObjectPrototypeFunctionExcitingFunctionBody):
3528         * crypto/SubtleCrypto.cpp:
3529         (WebCore::SubtleCrypto::SubtleCrypto):
3530         * crypto/SubtleCrypto.h:
3531         (WebCore::SubtleCrypto::create):
3532         * dom/Document.cpp:
3533         (WebCore::Document::~Document):
3534         * page/Crypto.cpp:
3535         (WebCore::Crypto::Crypto):
3536         * page/Crypto.h:
3537         (WebCore::Crypto::create):
3538         * page/DOMWindow.cpp:
3539         (WebCore::DOMWindow::~DOMWindow):
3540         (WebCore::DOMWindow::frameDestroyed):
3541         (WebCore::DOMWindow::screen):
3542         (WebCore::DOMWindow::history):
3543         (WebCore::DOMWindow::crypto):
3544         (WebCore::DOMWindow::locationbar):
3545         (WebCore::DOMWindow::menubar):
3546         (WebCore::DOMWindow::personalbar):
3547         (WebCore::DOMWindow::scrollbars):
3548         (WebCore::DOMWindow::statusbar):
3549         (WebCore::DOMWindow::toolbar):
3550         (WebCore::DOMWindow::console const):
3551         (WebCore::DOMWindow::applicationCache):
3552         (WebCore::DOMWindow::navigator):
3553         (WebCore::DOMWindow::performance const):
3554         (WebCore::DOMWindow::location):
3555         (WebCore::DOMWindow::visualViewport):
3556         (WebCore::DOMWindow::styleMedia):
3557         * page/DOMWindow.h:
3558         * page/DOMWindow.idl:
3559         * workers/WorkerGlobalScope.cpp:
3560         (WebCore::WorkerGlobalScope::crypto):
3561
3562 2018-10-15  Alex Christensen  <achristensen@webkit.org>
3563
3564         Include EnumTraits.h less
3565         https://bugs.webkit.org/show_bug.cgi?id=190535
3566
3567         Reviewed by Chris Dumez.
3568
3569         * Modules/applepay/ApplePaySessionPaymentRequest.h:
3570         * Modules/applepay/PaymentAuthorizationStatus.h:
3571         * Modules/applicationmanifest/ApplicationManifest.h:
3572         * Modules/fetch/FetchHeaders.h:
3573         * Modules/webauthn/AuthenticatorTransport.h:
3574         * Modules/webauthn/PublicKeyCredentialType.h:
3575         * loader/ShouldSkipSafeBrowsingCheck.h:
3576         * loader/ShouldTreatAsContinuingLoad.h:
3577         * platform/Cookie.h:
3578         * platform/audio/AudioSession.h:
3579         * platform/mediastream/CaptureDevice.h:
3580         * platform/mediastream/MediaStreamRequest.h:
3581         * platform/mediastream/RealtimeMediaSourceSettings.h:
3582         * platform/mediastream/libwebrtc/LibWebRTCProvider.h:
3583         * platform/network/NetworkLoadInformation.h:
3584         * workers/service/ServiceWorkerClientType.h:
3585         * workers/service/ServiceWorkerTypes.h:
3586         * workers/service/ServiceWorkerUpdateViaCache.h:
3587
3588 2018-10-15  Alex Christensen  <achristensen@webkit.org>
3589
3590         Remove InjectedBundle processing of back/forward lists
3591         https://bugs.webkit.org/show_bug.cgi?id=190459
3592
3593         Reviewed by Chris Dumez.
3594
3595         The uses of these functions are dead code I removed in rdar://problem/45180545
3596         Removing these functions is a step towards fixing the PSON history bugs.
3597
3598         * loader/EmptyFrameLoaderClient.h:
3599         * loader/FrameLoaderClient.h:
3600         * loader/HistoryController.cpp:
3601         (WebCore::HistoryController::goToItem):
3602
3603 2018-10-14  Yusuke Suzuki  <yusukesuzuki@slowstart.org>
3604
3605         [JSC] Remove Option::useAsyncIterator
3606         https://bugs.webkit.org/show_bug.cgi?id=190567
3607
3608         Reviewed by Saam Barati.
3609
3610         * Configurations/FeatureDefines.xcconfig:
3611
3612 2018-10-15  Philippe Normand  <pnormand@igalia.com>
3613
3614         [GStreamer] Fix EME build for GStreamer 1.14.x
3615         https://bugs.webkit.org/show_bug.cgi?id=190471
3616
3617         Reviewed by Xabier Rodriguez-Calvar.
3618
3619         * platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.cpp:
3620         (webkitMediaCommonEncryptionDecryptTransformCaps): The
3621         GST_PROTECTION_UNSPECIFIED_SYSTEM_ID #define won't be shipped
3622         until the GStreamer 1.16.0 release, so its use needs to be wrapped
3623         between a version check.
3624         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
3625         (WebCore::MediaPlayerPrivateGStreamerBase::initializationDataEncountered): Ditto.
3626
3627 2018-10-12  Wenson Hsieh  <wenson_hsieh@apple.com>
3628
3629         [iOS] Allow SPI clients to lay out at arbitrarily scaled sizes and scale to fit the view
3630         https://bugs.webkit.org/show_bug.cgi?id=190504
3631         <rdar://problem/45117760>
3632
3633         Reviewed by Tim Horton.
3634
3635         Add support in ViewportConfiguration for applying a layout size scale factor to the viewport. See below for
3636         more details.
3637
3638         Tests: fast/viewport/ios/constant-width-viewport-after-changing-view-scale.html
3639                fast/viewport/ios/device-width-viewport-after-changing-view-scale.html
3640
3641         * page/ViewportConfiguration.cpp:
3642         (WebCore::ViewportConfiguration::setViewLayoutSize):
3643
3644         The viewport's layout size may now be changed alongside the layout size scale factor. If either of these two
3645         variables change, we recompute our minimum layout size and viewport configuration parameters.
3646
3647         (WebCore::ViewportConfiguration::shouldIgnoreHorizontalScalingConstraints const):
3648         (WebCore::ViewportConfiguration::nativeWebpageParameters):
3649         (WebCore::ViewportConfiguration::testingParameters):
3650         (WebCore::ViewportConfiguration::updateConfiguration):
3651
3652         Multiply the minimum scale, initial scale, and maximum scale by the layout size scale factor. This allows us to
3653         keep the document well-proportioned within the viewport, while still laying out at a different layout size.
3654
3655         (WebCore::ViewportConfiguration::updateMinimumLayoutSize):
3656
3657         Compute the minimum layout size by scaling the default layout size derived from our view's size.
3658
3659         (WebCore::ViewportConfiguration::layoutWidth const):
3660         (WebCore::ViewportConfiguration::layoutHeight const):
3661         * page/ViewportConfiguration.h:
3662
3663         Maintain the original initial scale, unaffected by the layout size scale factor. This is used when computing
3664         layout width and height to prevent scaling by the layout size scale factor twice when computing layout sizes.
3665
3666         (WebCore::ViewportConfiguration::description const):
3667
3668         Include the layout size scale factor in ViewportConfiguration's description string.
3669
3670         (WebCore::ViewportConfiguration::Parameters::operator== const):
3671         (WebCore::operator<<):
3672
3673 2018-10-12  Youenn Fablet  <youenn@apple.com>
3674
3675         Use downcast for use of RealtimeMediaSource in LibWebRTCMediaEndpoint
3676         https://bugs.webkit.org/show_bug.cgi?id=190533
3677
3678         Reviewed by Chris Dumez.
3679
3680         Clean-up work.
3681         No change of behavior.
3682
3683         * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:
3684         (WebCore::setExistingReceiverSourceTrack):
3685         * platform/mediastream/RealtimeIncomingAudioSource.h:
3686         (isType):
3687         * platform/mediastream/RealtimeIncomingVideoSource.h:
3688         (isType):
3689         * platform/mediastream/RealtimeMediaSource.h:
3690
3691 2018-10-12  Jer Noble  <jer.noble@apple.com>
3692
3693         WebAVSampleBufferErrorListener's parent should be a WeakPtr.
3694         https://bugs.webkit.org/show_bug.cgi?id=190524
3695         <rdar://problem/44359307>
3696
3697         Reviewed by Eric Carlson.
3698
3699         Once WebAVSampleBufferErrorListener's parent is a WeakPtr, we no longer need to pass
3700         protectedSelf into the callOnMainThread lambdas; we can pass in the parent itself.
3701
3702         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
3703         (-[WebAVSampleBufferErrorListener initWithParent:]):
3704         (-[WebAVSampleBufferErrorListener observeValueForKeyPath:ofObject:change:context:]):
3705         (-[WebAVSampleBufferErrorListener layerFailedToDecode:]):
3706         (WebCore::SourceBufferPrivateAVFObjC::SourceBufferPrivateAVFObjC):
3707         (WebCore::SourceBufferPrivateAVFObjC::destroyRenderers):
3708
3709 2018-10-12  Ryosuke Niwa  <rniwa@webkit.org>
3710
3711         Address the review comment which was meant to be addressed in r237025.
3712
3713         * editing/MarkupAccumulator.cpp:
3714         (WebCore::elementCannotHaveEndTag):
3715
3716 2018-10-12  Youenn Fablet  <youenn@apple.com> and Alejandro G. Castro  <alex@igalia.com>
3717
3718         Refresh libwebrtc up to 343f4144be
3719         https://bugs.webkit.org/show_bug.cgi?id=190361
3720
3721         Reviewed by Chris Dumez.
3722
3723         This refresh should not change behavior but will allow us to implement better
3724         mdns candidate support and simulcast activation surfacing through addTransceiver.
3725         Covered by existing tests.
3726
3727         * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:
3728         (WebCore::LibWebRTCMediaEndpoint::doCreateAnswer):
3729         * testing/MockLibWebRTCPeerConnection.cpp:
3730         (WebCore::MockLibWebRTCPeerConnection::CreateAnswer):
3731         * testing/MockLibWebRTCPeerConnection.h:
3732         (WebCore::MockRtpSender::GetParameters): Deleted.
3733         (WebCore::MockRtpSender::SetParameters): Deleted.
3734         (WebCore::MockRtpSender::GetDtmfSender const): Deleted.
3735
3736 2018-10-12  Alex Christensen  <achristensen@webkit.org>
3737
3738         Allow encoding of small enum classes
3739         https://bugs.webkit.org/show_bug.cgi?id=190531
3740
3741         Reviewed by Tim Horton.
3742
3743         * Modules/webauthn/PublicKeyCredentialCreationOptions.h:
3744         * dom/Document.h:
3745         * editing/FontAttributeChanges.h:
3746         * history/CachedFrame.h:
3747         * loader/FrameLoaderTypes.h:
3748         * platform/CookiesStrategy.h:
3749         * platform/PasteboardItemInfo.h:
3750         * platform/ReferrerPolicy.h:
3751
3752 2018-10-12  Rob Buis  <rbuis@igalia.com>
3753
3754         Solve the confusion around blankURL() and isBlankURL() in URL
3755         https://bugs.webkit.org/show_bug.cgi?id=158988
3756
3757         Reviewed by Alex Christensen.
3758
3759         The name isBlankURL is not accurate as the function tests the
3760         protocol, not the full URL. Choose protocolIsAbout to align with
3761         exisiting protocolIsData, protocolIsBlob etc.
3762
3763         No tests as no change in functionality.
3764
3765         * WebCore.order:
3766         * loader/DocumentLoader.cpp:
3767         (WebCore::DocumentLoader::loadApplicationManifest):
3768         (WebCore::DocumentLoader::startIconLoading):
3769         * loader/NavigationAction.cpp:
3770         (WebCore::shouldTreatAsSameOriginNavigation):
3771         * loader/PolicyChecker.cpp:
3772         (WebCore::PolicyChecker::checkNavigationPolicy):
3773         * loader/ResourceLoadObserver.cpp:
3774         (WebCore::ResourceLoadObserver::logUserInteractionWithReducedTimeResolution):
3775         * page/PageSerializer.cpp:
3776         (WebCore::PageSerializer::SerializerMarkupAccumulator::appendCustomAttributes):
3777         (WebCore::PageSerializer::serializeFrame):
3778         * page/csp/ContentSecurityPolicyDirectiveList.cpp:
3779         (WebCore::ContentSecurityPolicyDirectiveList::violatedDirectiveForFrame const):
3780         (WebCore::ContentSecurityPolicyDirectiveList::violatedDirectiveForObjectSource const):
3781         * platform/URL.cpp:
3782         (WebCore::URL::protocolIsAbout const):
3783         (WebCore::URL::isBlankURL const): Deleted.
3784         * platform/URL.h:
3785         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
3786         (WebCore::MediaPlayerPrivateGStreamer::loadFull):
3787
3788 2018-10-12  Youenn Fablet  <youenn@apple.com>
3789
3790         DOMCache should dereference itself as soon as stopped
3791         https://bugs.webkit.org/show_bug.cgi?id=190441
3792
3793         Reviewed by Chris Dumez.
3794
3795         Dereference the DOMCache as soon as its context is stopped instead of waiting for garbage collection.
3796         This allows freeing resources sooner in the network process.
3797         No observable change of behavior since the DOMCache becomes no-op when its context is stopped.
3798
3799         * Modules/cache/DOMCache.cpp:
3800         (WebCore::DOMCache::~DOMCache):
3801         (WebCore::DOMCache::stop):
3802
3803 2018-10-12  Jer Noble  <jer.noble@apple.com>
3804
3805         CRASH in WebCore::MediaPlayerPrivateAVFoundation::setPreload
3806         https://bugs.webkit.org/show_bug.cgi?id=190485
3807         <rdar://problem/34613350>
3808
3809         Reviewed by Eric Carlson.
3810
3811         Crash analytics show that a pure-virtual function is called by MediaPlayerPrivateAVFoundation::setPreload(), and
3812         the likely cause of that pure-virtual function call is that the MediaPlayerPrivateAVFoundation object itself has
3813         been destroyed, likely as a side effect of calling MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL().
3814         The usual suspect for this kind of crash is due to calling into JS (e.g., from a callback passed up to
3815         HTMLMediaElement). Code inspection hasn't yielded any good hints about why this might be occurring, so we will
3816         add a ScriptDisallowedScope assertion inside HTMLMediaElement::prepareToPlay(), to generate a good crashlog
3817         showing exactly what callback is resulting in a JS call. But just in case the deallocation is not due to JS,
3818         also add an explicit strong-ref inside MediaPlayer::prepareToPlay.
3819
3820         * html/HTMLMediaElement.cpp:
3821         (WebCore::HTMLMediaElement::prepareToPlay):
3822         * platform/graphics/MediaPlayer.cpp:
3823         (WebCore::MediaPlayer::prepareToPlay):
3824
3825 2018-10-12  Jer Noble  <jer.noble@apple.com>
3826
3827         Null-dereference in SourceBufferPrivateAVFObjC::outputObscuredDueToInsufficientExternalProtectionChanged
3828         https://bugs.webkit.org/show_bug.cgi?id=190490
3829         <rdar://problem/42213807>
3830
3831         Reviewed by Eric Carlson.
3832
3833         Crash analytics show a null dereference occurring, likely because m_mediaSource is null.
3834
3835         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
3836         (WebCore::SourceBufferPrivateAVFObjC::outputObscuredDueToInsufficientExternalProtectionChanged):
3837
3838 2018-10-11  Don Olmstead  <don.olmstead@sony.com>
3839
3840         Add Houdini specs to features.json
3841         https://bugs.webkit.org/show_bug.cgi?id=190494
3842         <rdar://problem/45211879>
3843
3844         Unreviewed fix.
3845
3846         Specifications should not reference other specifications. Also
3847         move Worklet into the specifications section.
3848
3849         * features.json:
3850
3851 2018-10-11  Youenn Fablet  <youenn@apple.com>
3852
3853         IOS 12 - Service worker cache not shared when added to homescreen
3854         https://bugs.webkit.org/show_bug.cgi?id=190269
3855         <rdar://problem/45009961>
3856
3857         Reviewed by Alex Christensen.
3858
3859         Expose Cache Storage API when Service Worker API is exposed.
3860         This is used for API tests.
3861
3862         * dom/ScriptExecutionContext.h: Make hasServiceWorkerScheme
3863         available outside SERVICE_WORKER compilation flag since used by DOMWindowCaches.
3864         * dom/ScriptExecutionContext.cpp: Ditto.
3865         * Modules/cache/DOMWindowCaches.idl:
3866
3867 2018-10-10  Simon Fraser  <simon.fraser@apple.com>
3868
3869         Hide RenderLayer z-order and normal flow lists behind iterators
3870         https://bugs.webkit.org/show_bug.cgi?id=190457
3871
3872         Reviewed by Zalan Bujtas.
3873
3874         Expose the positive z-order, negative z-order and normal flow lists
3875         from RenderLayer as iterators rather than vectors of raw pointers.
3876         
3877         This hides the fact that the vectors can be null, and allows for easier casting in future.
3878
3879         * rendering/RenderLayer.cpp:
3880         (WebCore::RenderLayer::update3DTransformedDescendantStatus):
3881         (WebCore::RenderLayer::paintLayerContents):
3882         (WebCore::RenderLayer::paintList):
3883         (WebCore::RenderLayer::hitTestLayer):
3884         (WebCore::RenderLayer::hitTestList):
3885         (WebCore::RenderLayer::calculateClipRects const):
3886         * rendering/RenderLayer.h:
3887         * rendering/RenderLayerBacking.cpp:
3888         (WebCore::traverseVisibleNonCompositedDescendantLayers):
3889         * rendering/RenderLayerCompositor.cpp:
3890         (WebCore::RenderLayerCompositor::addToOverlapMapRecursive):
3891         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
3892         (WebCore::RenderLayerCompositor::rebuildCompositingLayerTree):
3893         (WebCore::RenderLayerCompositor::updateLayerTreeGeometry):
3894         (WebCore::RenderLayerCompositor::updateCompositingDescendantGeometry):
3895         (WebCore::RenderLayerCompositor::recursiveRepaintLayer):
3896         (WebCore::RenderLayerCompositor::needsContentsCompositingLayer const):
3897         (WebCore::RenderLayerCompositor::layerHas3DContent const):
3898         * rendering/RenderTreeAsText.cpp:
3899         (WebCore::writeLayers):
3900
3901 2018-10-11  Don Olmstead  <don.olmstead@sony.com>
3902
3903         Add Houdini specs to features.json
3904         https://bugs.webkit.org/show_bug.cgi?id=190494
3905
3906         Reviewed by Simon Fraser.
3907
3908         Add CSS Typed OM Level 1, CSS Layout API Level 1, CSS Animation
3909         Worklet, and group them under a Houdini feature set.
3910
3911         * features.json:
3912
3913 2018-10-11  Ross Kirsling  <ross.kirsling@sony.com>
3914
3915         [WTF] Semaphore.h conflicts with POSIX header
3916         https://bugs.webkit.org/show_bug.cgi?id=190486
3917
3918         Reviewed by Yusuke Suzuki.
3919
3920         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
3921
3922 2018-10-11  Thibault Saunier  <tsaunier@igalia.com>
3923
3924         [GStreamer] Support arbitrary video resolution in getUserMedia API
3925         https://bugs.webkit.org/show_bug.cgi?id=189734
3926
3927         Reviewed by Xabier Rodriguez-Calvar.
3928
3929         Implement arbitrary video resolution for the getUserMedia API in GStreamer.
3930
3931         Fix the MockRealtimeMediaSource device list to make devices properties match
3932         test expectations.
3933
3934         Reactivate tests that were failling because of that.
3935
3936         * platform/mediastream/RealtimeVideoSource.cpp:
3937         (WebCore::RealtimeVideoSource::standardVideoSizes):
3938         (WebCore::standardVideoSizes): Deleted.
3939         * platform/mediastream/RealtimeVideoSource.h:
3940         * platform/mediastream/VideoPreset.h:
3941         * platform/mediastream/gstreamer/GStreamerVideoCaptureSource.cpp:
3942         (WebCore::GStreamerVideoPreset::create):
3943         (WebCore::GStreamerVideoPreset::GStreamerVideoPreset):
3944         (WebCore::GStreamerVideoCaptureSource::GStreamerVideoCaptureSource):
3945         (WebCore::GStreamerVideoCaptureSource::capabilities):
3946         (WebCore::GStreamerVideoCaptureSource::generatePresets):
3947         * platform/mediastream/gstreamer/GStreamerVideoCaptureSource.h:
3948         * platform/mock/MockRealtimeMediaSourceCenter.cpp:
3949         (WebCore::defaultDevices):
3950
3951 2018-10-11  Keith Rollin  <krollin@apple.com>
3952
3953         CURRENT_ARCH should not be used in Run Script phase.
3954         https://bugs.webkit.org/show_bug.cgi?id=190407
3955         <rdar://problem/45133556>
3956
3957         Reviewed by Alexey Proskuryakov.
3958
3959         CURRENT_ARCH is used in a number of Xcode Run Script phases. However,
3960         CURRENT_ARCH is not well-defined during this phase (and may even have
3961         the value "undefined") since this phase is run just once per build
3962         rather than once per supported architecture. Migrate away from
3963         CURRENT_ARCH in favor of ARCHS, either by iterating over ARCHS and
3964         performing an operation for each value, or by picking the first entry
3965         in ARCHS and using that as a representative value.
3966
3967         No new tests -- no functional changes.
3968
3969         * DerivedSources.make: When forming TARGET_TRIPLE_FLAGS, grab the
3970         first entry in ARCHS rather than use CURRENT_ARCH.
3971
3972 2018-10-11  Daniel Bates  <dabates@apple.com>
3973
3974         Support building WebKit for macOS Mojave using a newer SDK
3975         https://bugs.webkit.org/show_bug.cgi?id=190431
3976
3977         Reviewed by Andy Estes.
3978
3979         * platform/network/cocoa/CookieCocoa.mm:
3980         (WebCore::coreSameSitePolicy):
3981         (WebCore::nsSameSitePolicy):
3982
3983 2018-10-11  Daniel Bates  <dabates@apple.com>
3984
3985         [iOS] Add typedef for WebEvent keyboard flags
3986         https://bugs.webkit.org/show_bug.cgi?id=190435
3987
3988         Reviewed by Wenson Hsieh.
3989
3990         Currently WebEvent and UIKit SPI are intertwined when it comes to keyboard flags. It seems sufficient
3991         to have WebEvent defined its own keyboard flags so that callers do not need to be aware of UIKit SPI.
3992
3993         No functionality changed. So, no new tests.
3994
3995         * platform/ios/WebEvent.h:
3996         * platform/ios/WebEvent.mm:
3997         (-[WebEvent keyboardFlags]):
3998
3999 2018-10-11  Antti Koivisto  <antti@apple.com>
4000
4001         Use finer grained locking in FontDatabase
4002         https://bugs.webkit.org/show_bug.cgi?id=190467
4003
4004         Reviewed by Alex Christensen.
4005
4006         * platform/graphics/FontCache.h:
4007
4008         Also use ListHashSet for prewarming info so we can prewarm in the same order the fonts were
4009         seen last time.
4010
4011         * platform/graphics/cocoa/FontCacheCoreText.cpp:
4012         (WebCore::FontDatabase::collectionForFamily):
4013
4014         Only hold the lock when accessing the hashmap. There is no need to hold it during font construction
4015         which can take a long time.
4016
4017         (WebCore::FontDatabase::fontForPostScriptName):
4018
4019         This is currently not prewarmed from a thread&