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