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