Unreviewed, silence a -Wreturn-type warning
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2018-10-25  Michael Catanzaro  <mcatanzaro@igalia.com>
2
3         Unreviewed, silence a -Wreturn-type warning
4
5         When every return is supposed to be covered by a switch statement, a release assert or CRASH
6         is required by GCC.
7
8         * Modules/mediastream/libwebrtc/LibWebRTCCertificateGenerator.cpp:
9         (WebCore::LibWebRTCCertificateGenerator::keyParamsFromCertificateType):
10
11 2018-10-25  Antoine Quint  <graouts@apple.com>
12
13         [Web Animations] Turn Web Animations CSS Integration off by default
14         https://bugs.webkit.org/show_bug.cgi?id=190901
15
16         Reviewed by Dean Jackson.
17
18         * page/RuntimeEnabledFeatures.h:
19
20 2018-10-25  Jon Davis  <jond@apple.com>
21
22         Changed "Under Development" status to use "In Development" instead
23         https://bugs.webkit.org/show_bug.cgi?id=187615
24
25         Reviewed by Joseph Pecoraro.
26
27         * features.json: Updated CSS Painting API Level 1 and CSS Properties and Values API Level 1.
28
29 2018-10-25  Chris Dumez  <cdumez@apple.com>
30
31         REGRESSION (236779) scandinaviandesigns.com product pages auto redirect to product image
32         https://bugs.webkit.org/show_bug.cgi?id=190891
33         <rdar://problem/45296796>
34
35         Reviewed by Antti Koivisto.
36
37         When a radio element gets clicked, we should only fire the 'input' and 'change' if the checked state
38         of the radio element has changed.
39
40         Test: fast/dom/HTMLInputElement/radio-element-fires-change-event-only-when-checked-state-changes.html
41
42         * html/RadioInputType.cpp:
43         (WebCore::RadioInputType::didDispatchClick):
44
45 2018-10-25  Joseph Pecoraro  <pecoraro@apple.com>
46
47         InspectorCanvas is not getting cleared properly for OffscreenCanvas
48         https://bugs.webkit.org/show_bug.cgi?id=190894
49         <rdar://problem/45498435>
50
51         Reviewed by Simon Fraser.
52
53         Covered by existing tests not crashing with guard malloc.
54
55         InspectorCanvasAgents tracks all CanvasRenderingContexts and needs to
56         remove its reference when the containing CanvasBase goes away. It does
57         this by registering as a notification observer, but if it can't map
58         from the CanvasBase back to the rendering context we were failing to
59         remove our reference. Enforce CanvasBase classes to notify observers
60         of destruction while they still have their CanvasRenderingContext.
61
62         * html/CanvasBase.cpp:
63         (WebCore::CanvasBase::~CanvasBase):
64         (WebCore::CanvasBase::notifyObserversCanvasDestroyed):
65         * html/CanvasBase.h:
66         Assert that subclasses notify observers of the canvas being destroyed,
67         since they will need to do this before m_context is cleared.
68
69         * html/CustomPaintCanvas.cpp:
70         (WebCore::CustomPaintCanvas::~CustomPaintCanvas):
71         * html/OffscreenCanvas.cpp:
72         (WebCore::OffscreenCanvas::~OffscreenCanvas):
73         Follow the new expected pattern of notifying observers before clearing
74         the context. HTMLCanvasElement already followed this pattern.
75
76         * inspector/agents/InspectorCanvasAgent.cpp:
77         (WebCore::InspectorCanvasAgent::canvasDestroyed):
78         Add an assertion that would catch this earlier.
79
80 2018-10-24  Alexey Proskuryakov  <ap@apple.com>
81
82         Clean up some obsolete macOS version guards
83         https://bugs.webkit.org/show_bug.cgi?id=190887
84
85         Reviewed by Dan Bernstein.
86
87         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
88         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL):
89         (WebCore::MediaPlayerPrivateAVFoundationObjC::maximumDurationToCacheMediaTime const):
90         (WebCore::MediaPlayerPrivateAVFoundationObjC::didPassCORSAccessCheck const):
91         (WebCore::MediaPlayerPrivateAVFoundationObjC::wouldTaintOrigin const):
92
93 2018-10-24  Tim Horton  <timothy_horton@apple.com>
94
95         Attachment filenames with RTL characters should format similar to Finder
96         https://bugs.webkit.org/show_bug.cgi?id=190736
97         <rdar://problem/44735946>
98
99         Reviewed by Dan Bernstein.
100
101         Test: fast/attachment/attachment-title-with-rtl.html
102
103         * html/HTMLAttachmentElement.cpp:
104         (WebCore::HTMLAttachmentElement::attachmentTitleForDisplay const):
105         * html/HTMLAttachmentElement.h:
106         Add attachmentTitleForDisplay(), which wraps the non-extension part of
107         attachmentTitle in BiDi isolates, matching Finder's behavior.
108
109         * rendering/RenderThemeIOS.mm:
110         (WebCore::RenderAttachmentInfo::buildWrappedLines):
111         (WebCore::RenderAttachmentInfo::RenderAttachmentInfo):
112         * rendering/RenderThemeMac.mm:
113         (WebCore::AttachmentLayout::layOutTitle):
114         Adopt attachmentTitleForDisplay, and ask CoreText to use a subrange of
115         the original string for the last line, instead of splitting the string
116         ourselves. This ensures that BiDi control characters are respected
117         even in the last line of the string.
118
119 2018-10-24  Megan Gardner  <megan_gardner@apple.com>
120
121         Turn on Conic Gradients
122         https://bugs.webkit.org/show_bug.cgi?id=190810
123
124         Reviewed by Tim Horton.
125
126         Added tests previously, only switching feature from experimental to always avaiable.
127
128         * Configurations/FeatureDefines.xcconfig:
129         * css/parser/CSSParserContext.cpp:
130         (WebCore::CSSParserContext::CSSParserContext):
131         (WebCore::operator==):
132         * css/parser/CSSParserContext.h:
133         (WebCore::CSSParserContextHash::hash):
134         * css/parser/CSSPropertyParserHelpers.cpp:
135         (WebCore::CSSPropertyParserHelpers::consumeConicGradient):
136         * page/Settings.yaml:
137
138 2018-10-11  Jiewen Tan  <jiewen_tan@apple.com>
139
140         Only report resource timing to parent frame for the first iframe load
141         https://bugs.webkit.org/show_bug.cgi?id=190498
142         <rdar://problem/44347398>
143
144         Reviewed by Youenn Fablet.
145
146         Only the first iframe navigation or the first iframe navigation after about:blank should be reported.
147         https://www.w3.org/TR/resource-timing-2/#resources-included-in-the-performanceresourcetiming-interface
148
149         Test: http/tests/misc/resource-timing-navigation-in-restored-iframe.html
150
151         * loader/FrameLoader.cpp:
152         (WebCore::FrameLoader::loadWithDocumentLoader):
153         * loader/FrameLoader.h:
154         (WebCore::FrameLoader::shouldReportResourceTimingToParentFrame):
155         (WebCore::FrameLoader::setShouldReportResourceTimingToParentFrame): Deleted.
156         * loader/ResourceTimingInformation.cpp:
157         (WebCore::ResourceTimingInformation::addResourceTiming):
158
159 2018-10-24  Brent Fulgham  <bfulgham@apple.com>
160
161         Cure Windows Direct2D Backend of a nasty case of bitrot
162         https://bugs.webkit.org/show_bug.cgi?id=190875
163         <rdar://problem/45523268>
164         
165         Reviewed by Zalan Bujtas.
166
167         The Direct2D backend has drifted out of date with the rest of WebKit.
168         This patch updates things so we can get a runnable build.
169         
170         * platform/graphics/FontPlatformData.h:
171         * platform/graphics/ImageBuffer.cpp:
172         (WebCore::ImageBuffer::create):
173         * platform/graphics/ImageBuffer.h:
174         * platform/graphics/ImageDecoder.h:
175         * platform/graphics/ImageSource.cpp:
176         (WebCore::ImageSource::setTargetContext):
177         * platform/graphics/opentype/OpenTypeMathData.cpp:
178         (WebCore::OpenTypeMathData::OpenTypeMathData): Need non-default constructor to make Visual
179         Studio happy.
180         * platform/graphics/win/GradientDirect2D.cpp:
181         (WebCore::Gradient::generateGradient):
182         * platform/graphics/win/GraphicsContextDirect2D.cpp: Update for new display list implementation.
183         (WebCore::GraphicsContextPlatformPrivate::setAlpha):
184         (WebCore::GraphicsContext::savePlatformState):
185         (WebCore::GraphicsContext::restorePlatformState):
186         (WebCore::GraphicsContext::drawNativeImage):
187         (WebCore::GraphicsContext::drawPattern):
188         (WebCore::GraphicsContext::drawRect):
189         (WebCore::GraphicsContext::drawLine):
190         (WebCore::GraphicsContext::drawEllipse):
191         (WebCore::GraphicsContext::drawPath):
192         (WebCore::GraphicsContext::fillPath):
193         (WebCore::GraphicsContext::strokePath):
194         (WebCore::GraphicsContext::fillRect):
195         (WebCore::GraphicsContext::platformFillRoundedRect):
196         (WebCore::GraphicsContext::fillRectWithRoundedHole):
197         (WebCore::GraphicsContext::clip):
198         (WebCore::GraphicsContext::clipOut):
199         (WebCore::GraphicsContext::clipPath):
200         (WebCore::GraphicsContext::clipBounds const):
201         (WebCore::GraphicsContext::beginPlatformTransparencyLayer):
202         (WebCore::GraphicsContext::endPlatformTransparencyLayer):
203         (WebCore::GraphicsContext::setMiterLimit):
204         (WebCore::GraphicsContext::clearRect):
205         (WebCore::GraphicsContext::strokeRect):
206         (WebCore::GraphicsContext::setLineCap):
207         (WebCore::GraphicsContext::setLineDash):
208         (WebCore::GraphicsContext::setLineJoin):
209         (WebCore::GraphicsContext::scale):
210         (WebCore::GraphicsContext::rotate):
211         (WebCore::GraphicsContext::translate):
212         (WebCore::GraphicsContext::concatCTM):
213         (WebCore::GraphicsContext::setCTM):
214         (WebCore::GraphicsContext::getCTM const):
215         (WebCore::GraphicsContext::roundToDevicePixels):
216         (WebCore::GraphicsContext::drawLinesForText):
217         (WebCore::GraphicsContext::setURLForRect):
218         (WebCore::GraphicsContext::setIsCALayerContext):
219         (WebCore::GraphicsContext::isCALayerContext const):
220         (WebCore::GraphicsContext::setIsAcceleratedContext):
221         (WebCore::GraphicsContext::isAcceleratedContext const):
222         (WebCore::GraphicsContext::setPlatformShouldAntialias):
223         (WebCore::GraphicsContext::setPlatformShouldSmoothFonts):
224         (WebCore::GraphicsContext::setPlatformCompositeOperation):
225         (WebCore::GraphicsContext::platformFillEllipse):
226         (WebCore::GraphicsContext::platformStrokeEllipse):
227         * platform/graphics/win/GraphicsLayerDirect2D.cpp:
228         (WebCore::GraphicsLayer::create):
229         (): Deleted.
230         * platform/graphics/win/ImageBufferDataDirect2D.cpp:
231         (WebCore::ImageBufferData::putData):
232         * platform/graphics/win/ImageBufferDataDirect2D.h:
233         * platform/graphics/win/ImageBufferDirect2D.cpp:
234         (WebCore::ImageBuffer::createCompatibleBuffer):
235         (WebCore::ImageBuffer::ImageBuffer):
236         * platform/graphics/win/ImageDecoderDirect2D.cpp:
237         (WebCore::ImageDecoderDirect2D::bytesDecodedToDetermineProperties const):
238         (WebCore::ImageDecoderDirect2D::encodedDataStatus const):
239         (WebCore::ImageDecoderDirect2D::repetitionCount const):
240         (WebCore::ImageDecoderDirect2D::frameOrientationAtIndex const):
241         (WebCore::ImageDecoderDirect2D::frameDurationAtIndex const):
242         (WebCore::ImageDecoderDirect2D::frameAllowSubsamplingAtIndex const):
243         (WebCore::ImageDecoderDirect2D::frameHasAlphaAtIndex const):
244         (WebCore::ImageDecoderDirect2D::createFrameImageAtIndex):
245         (WebCore::ImageDecoderDirect2D::setData):
246         (WebCore::ImageDecoderDirect2D::bytesDecodedToDetermineProperties): Deleted.
247         (WebCore::ImageDecoderDirect2D::createFrameImageAtIndex const): Deleted.
248         * platform/graphics/win/ImageDecoderDirect2D.h:
249         * platform/graphics/win/ImageDirect2D.cpp:
250         (WebCore::BitmapImage::drawFrameMatchingSourceSize):
251         * platform/graphics/win/PatternDirect2D.cpp:
252         (WebCore::Pattern::createPlatformPattern const):
253
254 2018-10-24  Said Abou-Hallawa  <sabouhallawa@apple.com>
255
256         Cleanup: MIMETypeRegistry functions
257         https://bugs.webkit.org/show_bug.cgi?id=190838
258
259         Reviewed by Simon Fraser.
260
261         Modernize the initialization of the lists in MIMETypeRegistry. Make the
262         functions that return these list be self-contained. Use NeverDestroy<> to
263         allocate the local static variable. Use std::initializer_list() and
264         makeNeverDestroyed() to initialize NeverDestroy<> variables only once.
265
266         supportedImageResourceMIMETypes will be deleted and all the calls to it 
267         will be replaced by supportedImageMIMETypes because they are identical.
268
269         * loader/archive/ArchiveFactory.cpp:
270         (WebCore::ArchiveFactory::registerKnownArchiveMIMETypes): This function
271         is called while initializing the supportedNonImageMIMETypes(). So it
272         should not have a direct call to it. Instead, supportedNonImageMIMETypes
273         is passed to it.
274         * loader/archive/ArchiveFactory.h:
275         * platform/MIMETypeRegistry.cpp:
276         (WebCore::MIMETypeRegistry::supportedImageMIMETypes):
277         (WebCore::supportedImageMIMETypesForEncoding):
278         (WebCore::supportedJavaScriptMIMETypes):
279         (WebCore::MIMETypeRegistry::supportedNonImageMIMETypes):
280         (WebCore::MIMETypeRegistry::supportedMediaMIMETypes):
281         (WebCore::pdfMIMETypes):
282         (WebCore::MIMETypeRegistry::unsupportedTextMIMETypes):
283         (WebCore::MIMETypeRegistry::isSupportedImageMIMEType):
284         (WebCore::MIMETypeRegistry::isSupportedImageMIMETypeForEncoding):
285         (WebCore::MIMETypeRegistry::isSupportedJavaScriptMIMEType):
286         (WebCore::MIMETypeRegistry::isSupportedNonImageMIMEType):
287         (WebCore::MIMETypeRegistry::isSupportedMediaMIMEType):
288         (WebCore::MIMETypeRegistry::isUnsupportedTextMIMEType):
289         (WebCore::MIMETypeRegistry::isPDFMIMEType):
290         (WebCore::MIMETypeRegistry::systemPreviewMIMETypes):
291         (WebCore::MIMETypeRegistry::isSystemPreviewMIMEType):
292         (WebCore::initializeSupportedImageMIMETypes): Deleted.
293         (WebCore::initializeSupportedImageMIMETypesForEncoding): Deleted.
294         (WebCore::initializeSupportedJavaScriptMIMETypes): Deleted.
295         (WebCore::initializePDFMIMETypes): Deleted.
296         (WebCore::initializeSupportedNonImageMimeTypes): Deleted.
297         (WebCore::initializeSupportedMediaMIMETypes): Deleted.
298         (WebCore::initializeUnsupportedTextMIMETypes): Deleted.
299         (WebCore::MIMETypeRegistry::isSupportedImageResourceMIMEType): Deleted.
300         (WebCore::MIMETypeRegistry::getSupportedImageMIMETypes): Deleted.
301         (WebCore::MIMETypeRegistry::getSupportedImageResourceMIMETypes): Deleted.
302         (WebCore::MIMETypeRegistry::getSupportedNonImageMIMETypes): Deleted.
303         (WebCore::MIMETypeRegistry::getSupportedMediaMIMETypes): Deleted.
304         (WebCore::MIMETypeRegistry::getPDFMIMETypes): Deleted.
305         (WebCore::MIMETypeRegistry::getUnsupportedTextMIMETypes): Deleted.
306         (WebCore::MIMETypeRegistry::getSystemPreviewMIMETypes): Deleted.
307         * platform/MIMETypeRegistry.h:
308         * platform/graphics/Image.cpp:
309         (WebCore::Image::supportsType):
310         * platform/graphics/cg/ImageDecoderCG.cpp:
311         (WebCore::ImageDecoderCG::encodedDataStatus const):
312         * platform/graphics/cg/UTIRegistry.cpp:
313         (WebCore::supportedDefaultImageSourceTypes):
314         (WebCore::isSupportImageSourceType):
315         (WebCore::allowedImageUTIs): Deleted.
316         (WebCore::isAllowedImageUTI): Deleted.
317         * platform/graphics/cg/UTIRegistry.h:
318         * platform/mac/PasteboardMac.mm:
319         (WebCore::Pasteboard::write):
320
321 2018-10-24  Chris Dumez  <cdumez@apple.com>
322
323         [PSON] When navigating back and forth, 'about:blank' shows up in the back/forward list
324         https://bugs.webkit.org/show_bug.cgi?id=190846
325         <rdar://problem/45058938>
326
327         Reviewed by Antti Koivisto.
328
329         When a page gets suspended after a process-swap, we navigate it to about:blank from inside the navigation
330         policy handler, by overriding the request URL. This normally works fine because we usually process-swap
331         on standard navigation. However, when we would process-swap on a back/forward navigation, we would end
332         up using the back/forward navigation load type to do the about:blank load. This would have repercussions
333         because history navigations update the current history item with the new URL (in this case 'about:blank').
334         To avoid the issue, switch to a standard load type whenever the client asks us to suspend and we load
335         'about:blank' as a result.
336
337         * loader/FrameLoader.cpp:
338         (WebCore::FrameLoader::continueLoadAfterNavigationPolicy):
339
340 2018-10-24  Andy Estes  <aestes@apple.com>
341
342         [macOS Debug WK2] Layout Test http/tests/ssl/applepay/ApplePayShippingAddressChangeEventErrorsV3.https.html is a flaky failure
343         https://bugs.webkit.org/show_bug.cgi?id=190650
344         <rdar://problem/45341914>
345
346         Reviewed by Alex Christensen.
347
348         In computeErrors, we intend to ignore errors when computing paymentMethodErrors. But we
349         weren't clearing exceptions generated from calling convert(), so they would end up being
350         logged as unhandled promise rejections.
351
352         Changed ApplePayPaymentHandler::computeErrors() to use a CatchScope to clear exceptions when
353         decoding paymentMethodErrors.
354
355         Also changed ApplePayShippingAddressChangeEventErrorsV3.https.html to catch promise
356         rejections from calling PaymentRequest.abort().
357
358         Covered by existing test.
359
360         * Modules/applepay/paymentrequest/ApplePayPaymentHandler.cpp:
361         (WebCore::ApplePayPaymentHandler::computeErrors const):
362
363 2018-10-22  Antti Koivisto  <antti@apple.com>
364
365         topPrivatelyControlledDomain is slow
366         https://bugs.webkit.org/show_bug.cgi?id=190792
367
368         Reviewed by Alex Christensen and Chris Dumez.
369
370         It calls into some slowish CFNetwork code and ends up showing up in profiles.
371
372         * platform/mac/PublicSuffixMac.mm:
373         (WebCore::topPrivatelyControlledDomain):
374
375         Add a cache that avoids calls into frameworks.
376
377 2018-10-22  Jer Noble  <jer.noble@apple.com>
378
379         Use WeakPtr and GenericTaskQueue within ObjC classes used by MediaPlayerPrivateAVFoundationObjC
380         https://bugs.webkit.org/show_bug.cgi?id=190790
381
382         Reviewed by Alex Christensen.
383
384         Move towards using WeakPtr callbacks instead of raw pointers within the utility objects used by
385         MediaPlayerPrivateAVFoundationObjC. Additionally, accessing WeakPtr off the thread which created
386         the pointer is not allowed, so use a GenericTaskQueue to schedule callbacks instead. Make 
387         GenericTaskQueue<Timer> thread-safe by locking around access to m_pendingTasks, and by making 
388         incrementing the pending task count atomic.
389
390         * platform/GenericTaskQueue.cpp:
391         (WebCore::TaskDispatcher<Timer>::postTask):
392         (WebCore::TaskDispatcher<Timer>::sharedLock):
393         (WebCore::TaskDispatcher<Timer>::sharedTimerFired):
394         (WebCore::TaskDispatcher<Timer>::dispatchOneTask):
395         (WebCore::TaskDispatcher<Timer>::pendingDispatchers):
396         * platform/GenericTaskQueue.h:
397         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
398         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
399         (WebCore::MediaPlayerPrivateAVFoundationObjC::MediaPlayerPrivateAVFoundationObjC):
400         (WebCore::MediaPlayerPrivateAVFoundationObjC::~MediaPlayerPrivateAVFoundationObjC):
401         (-[WebCoreAVFMovieObserver initWithPlayer:]):
402         (-[WebCoreAVFMovieObserver disconnect]):
403         (-[WebCoreAVFMovieObserver metadataLoaded]):
404         (-[WebCoreAVFMovieObserver didEnd:]):
405         (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]):
406         (-[WebCoreAVFMovieObserver legibleOutput:didOutputAttributedStrings:nativeSampleBuffers:forItemTime:]):
407         (-[WebCoreAVFMovieObserver outputSequenceWasFlushed:]):
408         (-[WebCoreAVFLoaderDelegate initWithPlayer:]):
409         (-[WebCoreAVFLoaderDelegate resourceLoader:shouldWaitForLoadingOfRequestedResource:]):
410         (-[WebCoreAVFLoaderDelegate resourceLoader:didCancelLoadingRequest:]):
411         (-[WebCoreAVFPullDelegate initWithPlayer:]):
412         (-[WebCoreAVFPullDelegate outputMediaDataWillChange:]):
413         (-[WebCoreAVFMovieObserver initWithCallback:]): Deleted.
414         (-[WebCoreAVFLoaderDelegate initWithCallback:]): Deleted.
415         (-[WebCoreAVFLoaderDelegate setCallback:]): Deleted.
416         (-[WebCoreAVFPullDelegate initWithCallback:]): Deleted.
417         (-[WebCoreAVFPullDelegate setCallback:]): Deleted.
418
419 2018-10-23  Jer Noble  <jer.noble@apple.com>
420
421         TextTrack cues should be updated more often than every 250ms.
422         https://bugs.webkit.org/show_bug.cgi?id=190827
423
424         Reviewed by Eric Carlson.
425
426         Test: media/track/track-cue-timing.html
427
428         TextTracks cues are recalculated on the playback timer, which fires at least every 250ms.
429         In addition to this timer, add a method to MediaPlayer to provide a task which will be
430         performed at a particular media time, and use this new method to request cues be updated
431         at the next interesting media time. The next interesting time would be either when the
432         soonest current cue will end, or when the next non-current cue will start, whichever is
433         earlier.
434
435         (Determining the "next non-current cue" requires new API on PODIntervalTree, as that class
436         does not have iterators per-se.)
437
438         * html/HTMLMediaElement.cpp:
439         (WebCore::compareCueIntervalEndTime):
440         (WebCore::HTMLMediaElement::updateActiveTextTrackCues):
441         * platform/PODIntervalTree.h:
442         * platform/graphics/MediaPlayer.cpp:
443         (WebCore::MediaPlayer::performTaskAtMediaTime):
444         * platform/graphics/MediaPlayer.h:
445         * platform/graphics/MediaPlayerPrivate.h:
446         (WebCore::MediaPlayerPrivateInterface::performTaskAtMediaTime):
447         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
448         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
449         (WebCore::MediaPlayerPrivateAVFoundationObjC::performTaskAtMediaTime):
450         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
451         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
452         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::performTaskAtMediaTime):
453
454 2018-10-23  Fujii Hironori  <Hironori.Fujii@sony.com>
455
456         [Win] Assertion fails while destructing local static AtomicString of FontCache::lastResortFallbackFont
457         https://bugs.webkit.org/show_bug.cgi?id=190748
458
459         Reviewed by Myles C. Maxfield.
460
461         FontCache::lastResortFallbackFont had local static AtomicString
462         variables which are not capsuled by NeverDestroyed. Hence, those
463         variables are destructed on IPC thread when WebProcess exits.
464
465         Changed those AtomicString to NeverDestroyed<AtomicString> not to
466         be destructed on exit.
467
468         This change can't be tested automatically because WebKitTestRunner
469         doesn't support Windows port yet.
470
471         * platform/graphics/win/FontCacheWin.cpp:
472         (WebCore::FontCache::lastResortFallbackFont): Changed
473         fallbackFonts's type from AtomicString array to
474         NeverDestroyed<AtomicString> array.
475
476 2018-10-23  Justin Fan  <justin_fan@apple.com>
477
478         [WebGPU] Rename old GPU* implementation files to GPULegacy* for WebMetal
479         https://bugs.webkit.org/show_bug.cgi?id=190817
480
481         Reviewed by Dean Jackson.
482
483         No new tests. No change in behavior.
484
485         * [Large list of refactored classes and renamed files]: GPU* is now GPULegacy*
486
487 2018-10-23  Ryan Haddad  <ryanhaddad@apple.com>
488
489         Unreviewed, rolling out r237261.
490
491         The layout test for this change crashes under GuardMalloc.
492
493         Reverted changeset:
494
495         "Handle MDNS resolution of candidates through libwebrtc
496         directly"
497         https://bugs.webkit.org/show_bug.cgi?id=190681
498         https://trac.webkit.org/changeset/237261
499
500 2018-10-23  Truitt Savell  <tsavell@apple.com>
501
502         Unreviewed, rolling out r237357.
503
504         API test is now failing on all platforms.
505
506         Reverted changeset:
507
508         "topPrivatelyControlledDomain is slow"
509         https://bugs.webkit.org/show_bug.cgi?id=190792
510         https://trac.webkit.org/changeset/237357
511
512 2018-10-23  Truitt Savell  <tsavell@apple.com>
513
514         Unreviewed, rolling out r237350.
515
516         Caused several Crashes cross multiple tests and platforms.
517
518         Reverted changeset:
519
520         "Use WeakPtr and GenericTaskQueue within ObjC classes used by
521         MediaPlayerPrivateAVFoundationObjC"
522         https://bugs.webkit.org/show_bug.cgi?id=190790
523         https://trac.webkit.org/changeset/237350
524
525 2018-10-23  Ryan Haddad  <ryanhaddad@apple.com>
526
527         Unreviewed, rolling out r237280.
528
529         Causes fast/box-shadow/box-shadow-with-zero-radius.html to
530         fail on iOS Simulator.
531
532         Reverted changeset:
533
534         "[CG] Adopt CG SPI for non-even cornered rounded rects"
535         https://bugs.webkit.org/show_bug.cgi?id=190155
536         https://trac.webkit.org/changeset/237280
537
538 2018-10-23  Antti Koivisto  <antti@apple.com>
539
540         topPrivatelyControlledDomain is slow
541         https://bugs.webkit.org/show_bug.cgi?id=190792
542
543         Reviewed by Alex Christensen.
544
545         It calls into some slowish CFNetwork code and ends up showing up in profiles.
546
547         * platform/mac/PublicSuffixMac.mm:
548         (WebCore::topPrivatelyControlledDomain):
549
550         Add a cache that avoids calls into frameworks.
551
552 2018-10-23  Chris Dumez  <cdumez@apple.com>
553
554         [PSON] Add support for cross-site client-side redirects
555         https://bugs.webkit.org/show_bug.cgi?id=190806
556         <rdar://problem/45047344>
557
558         Reviewed by Geoffrey Garen.
559
560         Add support for cross-site client-side redirects so that it swaps process and so that the back
561         forward list looks as expected. To support this, the following changes had to be done:
562         - The NavigationAction now provides additional information so that the WebProcess can communicate
563           things about the client-side redirect to the UIProcess: lockHistory / lockBackForwardList and
564           clientRedirectSourceForHistory.
565         - If the UIProcess decides to process-swap on a client-side redirect, we pass the client-side
566           redirect information to the new WebContent process via LoadRequest struct. WebCore then takes
567           care of setting things up using this information so that it recognizes that it is continuing
568           a load that is a client side redirect.
569         - We also need to pass the current BackForwardListItem / HistoryItem to the new WebContent
570           process so that the new process can truly lock history and keep updating the *current*
571           HistoryItem, instead of creating a new HistoryItem.
572         - After a process swap, when we re-construct the WebFrameProxy for the main frame in the new
573           process, we now set the frame's URL in the UIProcess to the URL it had before we swapped.
574           Clients such as Safari, rely on the main frame's URL being the expected value (the last
575           committed load URL) until the next load is committed when receiving didPerformRedirect
576           calls. Because we are destroying the main frame on process-swapping, we were losing the
577           last committed URL and Safari would hit assertions.
578
579         With this model, the willPerformClientRedirect IPC is still sent from the previous WebProcess
580         and the didPerformClientRedirect IPC is now sent by the new WebProcess. No change should be
581         observable from the client's point of view.
582
583         * loader/FrameLoadRequest.h:
584         (WebCore::FrameLoadRequest::setLockHistory):
585         (WebCore::FrameLoadRequest::setlockBackForwardList):
586         (WebCore::FrameLoadRequest::clientRedirectSourceForHistory const):
587         (WebCore::FrameLoadRequest::setClientRedirectSourceForHistory):
588         * loader/FrameLoader.cpp:
589         (WebCore::FrameLoader::loadURL):
590         (WebCore::FrameLoader::load):
591         * loader/HistoryController.cpp:
592         (WebCore::HistoryController::updateForRedirectWithLockedBackForwardList):
593         * loader/HistoryController.h:
594         * loader/NavigationAction.h:
595         (WebCore::NavigationAction::lockHistory const):
596         (WebCore::NavigationAction::setLockHistory):
597         (WebCore::NavigationAction::lockBackForwardList const):
598         (WebCore::NavigationAction::setLockBackForwardList):
599
600 2018-10-23  Jer Noble  <jer.noble@apple.com>
601
602         Use WeakPtr and GenericTaskQueue within ObjC classes used by MediaPlayerPrivateAVFoundationObjC
603         https://bugs.webkit.org/show_bug.cgi?id=190790
604
605         Reviewed by Alex Christensen.
606
607         Move towards using WeakPtr callbacks instead of raw pointers within the utility objects used by
608         MediaPlayerPrivateAVFoundationObjC. Additionally, accessing WeakPtr off the thread which created
609         the pointer is not allowed, so use a GenericTaskQueue to schedule callbacks instead. Make 
610         GenericTaskQueue<Timer> thread-safe by locking around access to m_pendingTasks, and by making 
611         incrementing the pending task count atomic.
612
613         * platform/GenericTaskQueue.cpp:
614         (WebCore::TaskDispatcher<Timer>::postTask):
615         (WebCore::TaskDispatcher<Timer>::sharedLock):
616         (WebCore::TaskDispatcher<Timer>::sharedTimerFired):
617         (WebCore::TaskDispatcher<Timer>::dispatchOneTask):
618         (WebCore::TaskDispatcher<Timer>::pendingDispatchers):
619         * platform/GenericTaskQueue.h:
620         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
621         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
622         (WebCore::MediaPlayerPrivateAVFoundationObjC::MediaPlayerPrivateAVFoundationObjC):
623         (WebCore::MediaPlayerPrivateAVFoundationObjC::~MediaPlayerPrivateAVFoundationObjC):
624         (-[WebCoreAVFMovieObserver initWithPlayer:]):
625         (-[WebCoreAVFMovieObserver disconnect]):
626         (-[WebCoreAVFMovieObserver metadataLoaded]):
627         (-[WebCoreAVFMovieObserver didEnd:]):
628         (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]):
629         (-[WebCoreAVFMovieObserver legibleOutput:didOutputAttributedStrings:nativeSampleBuffers:forItemTime:]):
630         (-[WebCoreAVFMovieObserver outputSequenceWasFlushed:]):
631         (-[WebCoreAVFLoaderDelegate initWithPlayer:]):
632         (-[WebCoreAVFLoaderDelegate resourceLoader:shouldWaitForLoadingOfRequestedResource:]):
633         (-[WebCoreAVFLoaderDelegate resourceLoader:didCancelLoadingRequest:]):
634         (-[WebCoreAVFPullDelegate initWithPlayer:]):
635         (-[WebCoreAVFPullDelegate outputMediaDataWillChange:]):
636         (-[WebCoreAVFMovieObserver initWithCallback:]): Deleted.
637         (-[WebCoreAVFLoaderDelegate initWithCallback:]): Deleted.
638         (-[WebCoreAVFLoaderDelegate setCallback:]): Deleted.
639         (-[WebCoreAVFPullDelegate initWithCallback:]): Deleted.
640         (-[WebCoreAVFPullDelegate setCallback:]): Deleted.
641
642 2018-10-22  Justin Michaud  <justin_michaud@apple.com>
643
644         Registered custom properties should support syntax parameter for <length> and *
645         https://bugs.webkit.org/show_bug.cgi?id=190039
646
647         Reviewed by Antti Koivisto.
648
649         Refactor code so that:
650         - All properties applied in StyleResolver::applyMatchedProperties are only applied once. 
651         - Custom properties are only resolved once, in StyleResolver, when they are applied to the RenderStyle. They were previously resolved
652           every time they were referenced, and again in RenderStyle.
653         - The font-size property is applied after its variable references, but before custom properties that depend on it.
654         - Cycles are detected at the same time as resolution.
655         - MutableStyleProperties' custom properties cannot be set from Javascript or WebKitLegacy if they do not parse for the property's type.
656           If they contain var(--...) references, however, then they can be set because we cannot check if the references are valid from setProperty.
657           This behaviour matches chrome, but is not documented in the spec. 
658         - Custom property values have more explicit resolved/unresolved state.
659         - RenderStyle only ever holds resolved custom properties, and StyleResolver::CascadedProperties only holds unresolved properties.
660
661         Tests: css-custom-properties-api/crash.html
662                css-custom-properties-api/cycles.html
663                css-custom-properties-api/inline.html
664
665         * css/CSSComputedStyleDeclaration.cpp:
666         (WebCore::ComputedStyleExtractor::customPropertyValue):
667         * css/CSSCustomPropertyValue.cpp:
668         (WebCore::CSSCustomPropertyValue::equals const):
669         (WebCore::CSSCustomPropertyValue::customCSSText const):
670         (WebCore::CSSCustomPropertyValue::tokens const):
671         (WebCore::CSSCustomPropertyValue::checkVariablesForCycles const): Deleted.
672         (WebCore::CSSCustomPropertyValue::resolveVariableReferences const): Deleted.
673         (WebCore::CSSCustomPropertyValue::setResolvedTypedValue): Deleted.
674         * css/CSSCustomPropertyValue.h:
675         * css/CSSRegisteredCustomProperty.cpp:
676         (WebCore::CSSRegisteredCustomProperty::CSSRegisteredCustomProperty):
677         * css/CSSRegisteredCustomProperty.h:
678         * css/CSSStyleSheet.h:
679         * css/CSSVariableData.cpp:
680         (WebCore::CSSVariableData::CSSVariableData):
681         (WebCore::CSSVariableData::consumeAndUpdateTokens): Deleted.
682         (WebCore::CSSVariableData::checkVariablesForCycles const): Deleted.
683         (WebCore::CSSVariableData::checkVariablesForCyclesWithRange const): Deleted.
684         (WebCore::CSSVariableData::resolveVariableFallback const): Deleted.
685         (WebCore::CSSVariableData::resolveVariableReference const): Deleted.
686         (WebCore::CSSVariableData::resolveVariableReferences const): Deleted.
687         (WebCore::CSSVariableData::resolveTokenRange const): Deleted.
688         * css/CSSVariableData.h:
689         (WebCore::CSSVariableData::create):
690         (WebCore::CSSVariableData::createResolved): Deleted.
691         (WebCore::CSSVariableData::needsVariableResolution const): Deleted.
692         (WebCore::CSSVariableData::CSSVariableData): Deleted.
693         * css/CSSVariableReferenceValue.cpp:
694         (WebCore::resolveVariableFallback):
695         (WebCore::resolveVariableReference):
696         (WebCore::resolveTokenRange):
697         (WebCore::CSSVariableReferenceValue::resolveVariableReferences const):
698         (WebCore::CSSVariableReferenceValue::checkVariablesForCycles const): Deleted.
699         * css/CSSVariableReferenceValue.h:
700         (WebCore::CSSVariableReferenceValue::create):
701         (WebCore::CSSVariableReferenceValue::equals const):
702         (WebCore::CSSVariableReferenceValue::variableDataValue const): Deleted.
703         * css/DOMCSSRegisterCustomProperty.cpp:
704         (WebCore::DOMCSSRegisterCustomProperty::registerProperty):
705         * css/PropertySetCSSStyleDeclaration.cpp:
706         (WebCore::PropertySetCSSStyleDeclaration::setProperty):
707         * css/StyleBuilderCustom.h:
708         (WebCore::StyleBuilderCustom::applyInitialCustomProperty):
709         (WebCore::StyleBuilderCustom::applyValueCustomProperty):
710         * css/StyleProperties.cpp:
711         (WebCore::MutableStyleProperties::setCustomProperty):
712         * css/StyleProperties.h:
713         * css/StyleResolver.cpp:
714         (WebCore::StyleResolver::State::setStyle):
715         (WebCore::StyleResolver::styleForKeyframe):
716         (WebCore::StyleResolver::styleForPage):
717         (WebCore::StyleResolver::applyMatchedProperties):
718         (WebCore::StyleResolver::applyPropertyToCurrentStyle):
719         (WebCore::StyleResolver::applyProperty):
720         (WebCore::StyleResolver::resolvedVariableValue const):
721         (WebCore::StyleResolver::CascadedProperties::applyDeferredProperties):
722         (WebCore::StyleResolver::CascadedProperties::Property::apply):
723         (WebCore::StyleResolver::applyCascadedCustomProperty):
724         (WebCore::StyleResolver::applyCascadedProperties):
725         * css/StyleResolver.h:
726         * css/parser/CSSParser.cpp:
727         (WebCore::CSSParser::parseValueWithVariableReferences):
728         * css/parser/CSSParser.h:
729         * css/parser/CSSPropertyParser.cpp:
730         (WebCore::CSSPropertyParser::CSSPropertyParser):
731         (WebCore::CSSPropertyParser::canParseTypedCustomPropertyValue):
732         (WebCore::CSSPropertyParser::parseTypedCustomPropertyValue):
733         (WebCore::CSSPropertyParser::collectParsedCustomPropertyValueDependencies):
734         (WebCore::CSSPropertyParser::parseValueStart):
735         (WebCore::CSSPropertyParser::parseSingleValue):
736         * css/parser/CSSPropertyParser.h:
737         * css/parser/CSSVariableParser.cpp:
738         (WebCore::CSSVariableParser::parseDeclarationValue):
739         * dom/ConstantPropertyMap.cpp:
740         (WebCore::ConstantPropertyMap::setValueForProperty):
741         (WebCore::variableDataForPositivePixelLength):
742         (WebCore::variableDataForPositiveDuration):
743         * rendering/style/RenderStyle.cpp:
744         (WebCore::RenderStyle::checkVariablesInCustomProperties): Deleted.
745         * rendering/style/RenderStyle.h:
746         (WebCore::RenderStyle::setInheritedCustomPropertyValue):
747         (WebCore::RenderStyle::setNonInheritedCustomPropertyValue):
748         * rendering/style/StyleCustomPropertyData.h:
749         (WebCore::StyleCustomPropertyData::operator== const):
750         (WebCore::StyleCustomPropertyData::setCustomPropertyValue):
751         (WebCore::StyleCustomPropertyData::StyleCustomPropertyData):
752         (): Deleted.
753
754 2018-10-22  Justin Michaud  <justin_michaud@apple.com>
755
756         CSS Paint API should give a 2d rendering context
757         https://bugs.webkit.org/show_bug.cgi?id=190762
758
759         Reviewed by Dean Jackson.
760
761         Add a new type of canvas and 2d rendering context to support the CSS Painting API.
762         Make many of the methods from HTMLCanvasElement virtual functions on CanvasBase, and
763         remove many of the downcasts in CanvasRenderingContext2DBase as a result.
764
765         * CMakeLists.txt:
766         * DerivedSources.make:
767         * Sources.txt:
768         * WebCore.xcodeproj/project.pbxproj:
769         * bindings/js/JSPaintRenderingContext2DCustom.cpp: Copied from Source/WebCore/css/CSSPaintCallback.h.
770         (WebCore::root):
771         (WebCore::JSPaintRenderingContext2DOwner::isReachableFromOpaqueRoots):
772         (WebCore::JSPaintRenderingContext2D::visitAdditionalChildren):
773         * bindings/js/WebCoreBuiltinNames.h:
774         * css/CSSPaintCallback.h:
775         * css/CSSPaintCallback.idl:
776         * html/CanvasBase.cpp:
777         (WebCore::CanvasBase::~CanvasBase):
778         * html/CanvasBase.h:
779         (WebCore::CanvasBase::isCustomPaintCanvas const):
780         * html/CustomPaintCanvas.cpp: Added.
781         (WebCore::CustomPaintCanvas::create):
782         (WebCore::CustomPaintCanvas::CustomPaintCanvas):
783         (WebCore::CustomPaintCanvas::~CustomPaintCanvas):
784         (WebCore::CustomPaintCanvas::width const):
785         (WebCore::CustomPaintCanvas::setWidth):
786         (WebCore::CustomPaintCanvas::height const):
787         (WebCore::CustomPaintCanvas::setHeight):
788         (WebCore::CustomPaintCanvas::size const):
789         (WebCore::CustomPaintCanvas::setSize):
790         (WebCore::CustomPaintCanvas::getContext):
791         (WebCore::CustomPaintCanvas::copiedImage const):
792         (WebCore::CustomPaintCanvas::drawingContext const):
793         (WebCore::CustomPaintCanvas::existingDrawingContext const):
794         (WebCore::CustomPaintCanvas::makeRenderingResultsAvailable):
795         * html/CustomPaintCanvas.h: Copied from Source/WebCore/html/OffscreenCanvas.h.
796         * html/HTMLCanvasElement.h:
797         * html/OffscreenCanvas.h:
798         * html/canvas/CanvasRenderingContext.cpp:
799         (WebCore::CanvasRenderingContext::wouldTaintOrigin):
800         * html/canvas/CanvasRenderingContext.h:
801         (WebCore::CanvasRenderingContext::isPaint const):
802         * html/canvas/CanvasRenderingContext2DBase.cpp:
803         (WebCore::DisplayListDrawingContext::DisplayListDrawingContext):
804         (WebCore::CanvasRenderingContext2DBase::unwindStateStack):
805         (WebCore::CanvasRenderingContext2DBase::isAccelerated const):
806         (WebCore::CanvasRenderingContext2DBase::setStrokeStyle):
807         (WebCore::CanvasRenderingContext2DBase::setFillStyle):
808         (WebCore::CanvasRenderingContext2DBase::resetTransform):
809         (WebCore::CanvasRenderingContext2DBase::clearCanvas):
810         (WebCore::CanvasRenderingContext2DBase::transformAreaToDevice const):
811         (WebCore::CanvasRenderingContext2DBase::rectContainsCanvas const):
812         (WebCore::CanvasRenderingContext2DBase::calculateCompositingBufferRect):
813         (WebCore::CanvasRenderingContext2DBase::compositeBuffer):
814         (WebCore::CanvasRenderingContext2DBase::createPattern):
815         (WebCore::CanvasRenderingContext2DBase::didDrawEntireCanvas):
816         (WebCore::CanvasRenderingContext2DBase::didDraw):
817         (WebCore::CanvasRenderingContext2DBase::paintRenderingResultsToCanvas):
818         (WebCore::CanvasRenderingContext2DBase::drawingContext const):
819         * html/canvas/CanvasRenderingContext2DBase.h:
820         * html/canvas/PaintRenderingContext2D.cpp: Copied from Source/WebCore/css/CSSPaintCallback.h.
821         (WebCore::PaintRenderingContext2D::create):
822         (WebCore::PaintRenderingContext2D::PaintRenderingContext2D):
823         * html/canvas/PaintRenderingContext2D.h: Copied from Source/WebCore/css/CSSPaintCallback.h.
824         * html/canvas/PaintRenderingContext2D.idl: Copied from Source/WebCore/css/CSSPaintCallback.idl.
825         * html/canvas/WebMetalRenderPassAttachmentDescriptor.h:
826         * platform/graphics/CustomPaintImage.cpp:
827         (WebCore::CustomPaintImage::doCustomPaint):
828
829 2018-10-22  Keith Rollin  <krollin@apple.com>
830
831         Use Location = "Relative to Build Products" rather than "Relative to Group"
832         https://bugs.webkit.org/show_bug.cgi?id=190781
833
834         Reviewed by Alexey Proskuryakov.
835
836         Almost all Derived Files are included in Xcode projects with the
837         Location attribute set to "Relative to Group". While this currently
838         works, the Derived Files can no longer be found when enabling XCBuild
839         (which has stricter requirements). Fix this by setting the Location
840         attribute to "Relative to Build Products".
841
842         No new tests -- no changed functionality.
843
844         * WebCore.xcodeproj/project.pbxproj:
845
846 2018-10-22  Zalan Bujtas  <zalan@apple.com>
847
848         [LFC][IFC] Add justify text-align support.
849         https://bugs.webkit.org/show_bug.cgi?id=190779
850
851         Reviewed by Antti Koivisto.
852
853         Collect expansion opportunities and adjust runs accordingly.
854
855         * layout/inlineformatting/InlineFormattingContext.cpp:
856         (WebCore::Layout::InlineFormattingContext::layoutInlineContent const):
857         * layout/inlineformatting/InlineFormattingContext.h:
858         * layout/inlineformatting/InlineRun.h:
859         (WebCore::Layout::InlineRun::expansionOpportunity):
860         (WebCore::Layout::InlineRun::TextContext::setStart):
861         (WebCore::Layout::InlineRun::TextContext::setLength):
862         (WebCore::Layout::InlineRun::setTextContext):
863         (WebCore::Layout::InlineRun::createRun): Deleted.
864         (WebCore::Layout::InlineRun::createTextRun): Deleted.
865         * layout/inlineformatting/Line.cpp:
866         (WebCore::Layout::InlineFormattingContext::Line::Line):
867         (WebCore::Layout::InlineFormattingContext::Line::init):
868         (WebCore::Layout::InlineFormattingContext::Line::computeExpansionOpportunities):
869         (WebCore::Layout::InlineFormattingContext::Line::appendContent):
870         (WebCore::Layout::InlineFormattingContext::Line::justifyRuns):
871         (WebCore::Layout::InlineFormattingContext::Line::close):
872         (WebCore::Layout::isNonCollapsedText): Deleted.
873
874 2018-10-22  Zalan Bujtas  <zalan@apple.com>
875
876         [LFC][IFC] Add (right, center)text-align support.
877         https://bugs.webkit.org/show_bug.cgi?id=190745
878
879         Reviewed by Antti Koivisto.
880
881         Adjust the logical left of each run while closing the line.
882
883         * layout/Verification.cpp:
884         (WebCore::Layout::outputMismatchingSimpleLineInformationIfNeeded):
885         (WebCore::Layout::outputMismatchingComplexLineInformationIfNeeded):
886         * layout/inlineformatting/InlineFormattingContext.cpp:
887         (WebCore::Layout::trimLeadingRun):
888         (WebCore::Layout::InlineFormattingContext::layoutInlineContent const):
889         * layout/inlineformatting/InlineFormattingContext.h:
890         (WebCore::Layout::InlineFormattingContext::Line::hasContent const):
891         (WebCore::Layout::InlineFormattingContext::Line::contentLogicalLeft const): Deleted.
892         * layout/inlineformatting/InlineLineBreaker.cpp:
893         (WebCore::Layout::InlineLineBreaker::nextRun):
894         (WebCore::Layout::InlineLineBreaker::splitRun):
895         * layout/inlineformatting/InlineLineBreaker.h:
896         * layout/inlineformatting/InlineRun.h:
897         (WebCore::Layout::InlineRun::setLogicalLeft):
898         (WebCore::Layout::InlineRun::TextContext::start const):
899         (WebCore::Layout::InlineRun::createRun):
900         (WebCore::Layout::InlineRun::createTextRun):
901         (WebCore::Layout::InlineRun::InlineRun):
902         (WebCore::Layout::InlineRun::TextContext::TextContext):
903         (WebCore::Layout::InlineRun::TextContext::position const): Deleted.
904         * layout/inlineformatting/Line.cpp:
905         (WebCore::Layout::InlineFormattingContext::Line::Line):
906         (WebCore::Layout::InlineFormattingContext::Line::init):
907         (WebCore::Layout::adjustedLineLogicalLeft):
908         (WebCore::Layout::InlineFormattingContext::Line::contentLogicalRight):
909         (WebCore::Layout::InlineFormattingContext::Line::appendContent):
910         (WebCore::Layout::InlineFormattingContext::Line::close):
911         (WebCore::Layout::InlineFormattingContext::Line::setConstraints): Deleted.
912         * layout/layouttree/LayoutTreeBuilder.cpp:
913         (WebCore::Layout::outputInlineRuns):
914
915 2018-10-22  Zalan Bujtas  <zalan@apple.com>
916
917         [LFC][IFC] Implement Replaced helper class.
918         https://bugs.webkit.org/show_bug.cgi?id=190719
919
920         Reviewed by Antti Koivisto.
921
922         * layout/layouttree/LayoutBox.cpp:
923         (WebCore::Layout::Box::Box):
924         * layout/layouttree/LayoutBox.h:
925         (WebCore::Layout::Box::replaced const):
926         * layout/layouttree/LayoutReplaced.cpp:
927         (WebCore::Layout::Replaced::Replaced):
928         (WebCore::Layout::Replaced::hasIntrinsicWidth const):
929         (WebCore::Layout::Replaced::hasIntrinsicHeight const):
930         (WebCore::Layout::Replaced::hasIntrinsicRatio const):
931         (WebCore::Layout::Replaced::intrinsicWidth const):
932         (WebCore::Layout::Replaced::intrinsicHeight const):
933         (WebCore::Layout::Replaced::intrinsicRatio const):
934         * layout/layouttree/LayoutReplaced.h:
935         (WebCore::Layout::Replaced::hasIntrinsicWidth const): Deleted.
936         (WebCore::Layout::Replaced::hasIntrinsicHeight const): Deleted.
937         (WebCore::Layout::Replaced::hasIntrinsicRatio const): Deleted.
938         (WebCore::Layout::Replaced::intrinsicWidth const): Deleted.
939         (WebCore::Layout::Replaced::intrinsicHeight const): Deleted.
940         (WebCore::Layout::Replaced::intrinsicRatio const): Deleted.
941         * layout/layouttree/LayoutTreeBuilder.cpp:
942         (WebCore::Layout::TreeBuilder::createSubTree):
943
944 2018-10-22  Zalan Bujtas  <zalan@apple.com>
945
946         [LFC][IFC] Block formatting context roots avoid floats.
947         https://bugs.webkit.org/show_bug.cgi?id=190723
948
949         Reviewed by Antti Koivisto.
950
951         Inline formatting context roots don't avoid floats (unless they also establish block formatting context).
952
953         * layout/blockformatting/BlockFormattingContext.cpp:
954         (WebCore::Layout::BlockFormattingContext::layoutFormattingContextRoot const):
955
956 2018-10-20  YUHAN WU  <yuhan_wu@apple.com>
957
958         MediaRecorder should fire a stop event when all tracks are ended
959         https://bugs.webkit.org/show_bug.cgi?id=190642
960
961         Reviewed by Youenn Fablet.
962
963         This patch only implements to fire the stop event when all tracks are ended.
964         We will need to fire a dataavailable event when all tracks are ended.
965
966         Test: imported/w3c/web-platform-tests/mediacapture-record/MediaRecorder-stop.html
967
968         * Modules/mediarecorder/MediaRecorder.cpp:
969         (WebCore::MediaRecorder::MediaRecorder):
970         (WebCore::MediaRecorder::~MediaRecorder):
971         (WebCore::MediaRecorder::trackEnded):
972         * Modules/mediarecorder/MediaRecorder.h:
973         * Modules/mediarecorder/MediaRecorder.idl:
974         * WebCore.xcodeproj/project.pbxproj:
975         * dom/EventNames.h:
976
977 2018-10-19  Stephan Szabo  <stephan.szabo@sony.com>
978
979         [WinCairo] Search terms are not saved for <input type="search">
980         https://bugs.webkit.org/show_bug.cgi?id=188174
981
982         Reviewed by Fujii Hironori.
983
984         No new tests, should be covered by existing tests of search 
985         inputs.
986
987         Add support for saving the search terms for <input
988         type="search"> to a SQLite database, replacing the
989         CF-based implementation for Windows and adding support
990         for non-legacy WebKit.
991
992         * PlatformWin.cmake:
993         * platform/win/SearchPopupMenuDB.cpp: Added.
994         (WebCore::SearchPopupMenuDB::singleton):
995         (WebCore::SearchPopupMenuDB::SearchPopupMenuDB):
996         (WebCore::SearchPopupMenuDB::~SearchPopupMenuDB):
997         (WebCore::SearchPopupMenuDB::saveRecentSearches):
998         (WebCore::SearchPopupMenuDB::loadRecentSearches):
999         (WebCore::SearchPopupMenuDB::checkDatabaseValidity): Use
1000         quick_check pragma to test database status.
1001         (WebCore::SearchPopupMenuDB::deleteAllDatabaseFiles):
1002         (WebCore::SearchPopupMenuDB::openDatabase):
1003         (WebCore::SearchPopupMenuDB::closeDatabase):
1004         (WebCore::SearchPopupMenuDB::verifySchemaVersion): Check
1005         schema version and update for schema changes.
1006         (WebCore::SearchPopupMenuDB::checkSQLiteReturnCode): Check
1007         for error codes that indicate database errors and remove and
1008         recreate the database.
1009         (WebCore::SearchPopupMenuDB::executeSimpleSql):
1010         (WebCore::SearchPopupMenuDB::createPreparedStatement):
1011         * platform/win/SearchPopupMenuDB.h: Added.
1012         * platform/win/SearchPopupMenuWin.cpp:
1013         (WebCore::SearchPopupMenuWin::enabled): Always enable support
1014         for search term popup
1015         (WebCore::SearchPopupMenuWin::saveRecentSearches): Switch from
1016         CF implementation to SQLite database implementation
1017         (WebCore::SearchPopupMenuWin::loadRecentSearches): Switch from
1018         CF implementation to SQLite database implementation
1019         (WebCore::autosaveKey): Deleted.
1020
1021 2018-10-19  Justin Fan  <justin_fan@apple.com>
1022
1023         [WebGPU] Add stubs for WebGPUSwapChain and WebGPURenderingContext
1024         https://bugs.webkit.org/show_bug.cgi?id=190742
1025
1026         Reviewed by Dean Jackson.
1027
1028         Test: updated webgpu-enabled.html to check for WebGPURenderingContext.
1029
1030         Implement support for creating a "webgpu" context from an HTML canvas.
1031
1032         * CMakeLists.txt:
1033         * DerivedSources.make:
1034         * Modules/webgpu/WebGPURenderingContext.cpp: Added.
1035         (WebCore::WebGPURenderingContext::create):
1036         (WebCore::WebGPURenderingContext::WebGPURenderingContext):
1037         * Modules/webgpu/WebGPURenderingContext.h: Added.
1038         * Modules/webgpu/WebGPURenderingContext.idl: Added.
1039         * Modules/webgpu/WebGPUSwapChain.cpp: Added.
1040         (WebCore::WebGPUSwapChain::configure):
1041         (WebCore::WebGPUSwapChain::present):
1042         (WebCore::WebGPUSwapChain::reshape):
1043         (WebCore::WebGPUSwapChain::markLayerComposited):
1044         * Modules/webgpu/WebGPUSwapChain.h: Added.
1045         (WebCore::WebGPUSwapChain::WebGPUSwapChain):
1046         * Modules/webgpu/WebGPUSwapChain.idl: Added.
1047         * Modules/webgpu/WebGPUSwapChainDescriptor.h: Added.
1048         * Modules/webgpu/WebGPUSwapChainDescriptor.idl: Added.
1049         * Sources.txt:
1050         * WebCore.xcodeproj/project.pbxproj:
1051         * bindings/js/WebCoreBuiltinNames.h:
1052         * dom/Document.cpp:
1053         (WebCore::Document::getCSSCanvasContext):
1054         * dom/Document.h:
1055         * dom/Document.idl:
1056         * html/HTMLCanvasElement.cpp:
1057         (WebCore::HTMLCanvasElement::getContext):
1058         (WebCore::HTMLCanvasElement::isWebGPUType):
1059         (WebCore::HTMLCanvasElement::createContextWebGPU):
1060         (WebCore::HTMLCanvasElement::getContextWebGPU):
1061         * html/HTMLCanvasElement.h:
1062         * html/HTMLCanvasElement.idl:
1063         * html/canvas/CanvasRenderingContext.h:
1064         (WebCore::CanvasRenderingContext::isWebGPU const):
1065
1066 2018-10-19  John Wilander  <wilander@apple.com>
1067
1068         Only cap lifetime of persistent cookies created client-side through document.cookie when resource load statistics is enabled
1069         https://bugs.webkit.org/show_bug.cgi?id=190687
1070         <rdar://problem/45349024>
1071
1072         Reviewed by Alex Christensen.
1073
1074         Test: http/tests/resourceLoadStatistics/capped-lifetime-for-cookie-set-in-js.html
1075
1076         NetworkStorageSession::setCookiesFromDOM() now consults the new
1077         m_shouldCapLifetimeForClientSideCookies member variable before
1078         capping the lifetime of cookies.
1079
1080         * loader/ResourceLoadStatistics.cpp:
1081         (WebCore::ResourceLoadStatistics::toString const):
1082         (WebCore::ResourceLoadStatistics::merge):
1083             Removal of the isMarkedForCookieBlocking member.
1084         * loader/ResourceLoadStatistics.h:
1085             Removal of the isMarkedForCookieBlocking member.
1086         * platform/network/NetworkStorageSession.h:
1087         * platform/network/cf/NetworkStorageSessionCFNet.cpp:
1088         (WebCore::NetworkStorageSession::setShouldCapLifetimeForClientSideCookies):
1089         (WebCore::NetworkStorageSession::setPrevalentDomainsToBlockCookiesFor):
1090             No longer takes the boolean clearFirst parameter and now always clears first.
1091         * platform/network/cocoa/NetworkStorageSessionCocoa.mm:
1092         (WebCore::filterCookies):
1093         (WebCore::NetworkStorageSession::setCookiesFromDOM const):
1094
1095 2018-10-19  Zalan Bujtas  <zalan@apple.com>
1096
1097         [LFC][IFC] RenderReplaced renderer should create InlineBox
1098         https://bugs.webkit.org/show_bug.cgi?id=190720
1099
1100         Reviewed by Antti Koivisto.
1101
1102         * layout/layouttree/LayoutTreeBuilder.cpp:
1103         (WebCore::Layout::TreeBuilder::createSubTree):
1104
1105 2018-10-19  Zalan Bujtas  <zalan@apple.com>
1106
1107         [LFC][IFC] Inline replaced width should default to 300px only if width is auto.
1108         https://bugs.webkit.org/show_bug.cgi?id=190722
1109
1110         Reviewed by Antti Koivisto.
1111
1112         See #5
1113
1114         // 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.
1115
1116         * layout/FormattingContextGeometry.cpp:
1117         (WebCore::Layout::FormattingContext::Geometry::inlineReplacedWidthAndMargin):
1118
1119 2018-10-19  Zalan Bujtas  <zalan@apple.com>
1120
1121         [LFC][IFC] Add inline runs to showLayoutTree
1122         https://bugs.webkit.org/show_bug.cgi?id=190718
1123
1124         Reviewed by Antti Koivisto.
1125
1126         * layout/layouttree/LayoutTreeBuilder.cpp:
1127         (WebCore::Layout::outputInlineRuns):
1128         (WebCore::Layout::outputLayoutBox):
1129         (WebCore::Layout::outputLayoutTree):
1130
1131 2018-10-19  Zalan Bujtas  <zalan@apple.com>
1132
1133         [LFC][IFC] Remove the previous version of inline content handling.
1134         https://bugs.webkit.org/show_bug.cgi?id=190716
1135
1136         Reviewed by Antti Koivisto.
1137
1138         * Sources.txt:
1139         * WebCore.xcodeproj/project.pbxproj:
1140         * layout/Verification.cpp:
1141         (WebCore::Layout::areEssentiallyEqual):
1142         (WebCore::Layout::outputMismatchingSimpleLineInformationIfNeeded):
1143         (WebCore::Layout::outputMismatchingComplexLineInformationIfNeeded):
1144         * layout/inlineformatting/InlineFormattingState.h:
1145         (WebCore::Layout::InlineFormattingState::inlineContent):
1146         (WebCore::Layout::InlineFormattingState::addLayoutRuns): Deleted.
1147         (WebCore::Layout::InlineFormattingState::layoutRuns const): Deleted.
1148         * layout/inlineformatting/text/TextUtil.cpp: Renamed from Source/WebCore/layout/inlineformatting/textlayout/TextUtil.cpp.
1149         (WebCore::Layout::TextUtil::TextUtil):
1150         (WebCore::Layout::TextUtil::width const):
1151         (WebCore::Layout::TextUtil::hyphenPositionBefore const):
1152         (WebCore::Layout::TextUtil::textWidth const):
1153         (WebCore::Layout::TextUtil::fixedPitchWidth const):
1154         * layout/inlineformatting/text/TextUtil.h: Renamed from Source/WebCore/layout/inlineformatting/textlayout/TextUtil.h.
1155         * layout/inlineformatting/textlayout/Runs.h: Removed.
1156         * layout/inlineformatting/textlayout/TextContentProvider.cpp: Removed.
1157         * layout/inlineformatting/textlayout/TextContentProvider.h: Removed.
1158         * layout/inlineformatting/textlayout/simple/SimpleLineBreaker.cpp: Removed.
1159         * layout/inlineformatting/textlayout/simple/SimpleLineBreaker.h: Removed.
1160         * layout/inlineformatting/textlayout/simple/SimpleTextRunGenerator.cpp: Removed.
1161         * layout/inlineformatting/textlayout/simple/SimpleTextRunGenerator.h: Removed.
1162
1163 2018-10-19  Zalan Bujtas  <zalan@apple.com>
1164
1165         [LFC][IFC] Add generic inline content handling.
1166         https://bugs.webkit.org/show_bug.cgi?id=190713
1167
1168         Reviewed by Antti Koivisto.
1169
1170         layoutInlineContent turns InlineLineBreaker::Run objects into final inline runs by
1171         resolving heading/trailing whitespace, aligment, expansion opportunities etc.
1172         These inline runs are input to the display tree construction.
1173
1174         * Sources.txt:
1175         * WebCore.xcodeproj/project.pbxproj:
1176         * layout/displaytree/DisplayBox.h:
1177         * layout/inlineformatting/InlineFormattingContext.cpp:
1178         (WebCore::Layout::InlineFormattingContext::layout const):
1179         (WebCore::Layout::trimLeadingRun):
1180         (WebCore::Layout::InlineFormattingContext::layoutInlineContent const):
1181         (WebCore::Layout::InlineFormattingContext::computeWidthAndHeight const):
1182         * layout/inlineformatting/InlineFormattingContext.h:
1183         (WebCore::Layout::InlineFormattingContext::Line::hasContent const):
1184         (WebCore::Layout::InlineFormattingContext::Line::contentLogicalLeft const):
1185         (WebCore::Layout::InlineFormattingContext::Line::availableWidth const):
1186         * layout/inlineformatting/InlineFormattingState.h:
1187         (WebCore::Layout::InlineFormattingState::inlineRuns):
1188         (WebCore::Layout::InlineFormattingState::appendInlineRun):
1189         * layout/inlineformatting/InlineLineBreaker.cpp:
1190         (WebCore::Layout::InlineLineBreaker::nextRun):
1191         (WebCore::Layout::InlineLineBreaker::nextLayoutRun): Deleted.
1192         * layout/inlineformatting/InlineLineBreaker.h:
1193         * layout/inlineformatting/InlineRun.h: Added.
1194         (WebCore::Layout::InlineRun::logicalLeft const):
1195         (WebCore::Layout::InlineRun::logicalRight const):
1196         (WebCore::Layout::InlineRun::width const):
1197         (WebCore::Layout::InlineRun::setWidth):
1198         (WebCore::Layout::InlineRun::setLogicalRight):
1199         (WebCore::Layout::InlineRun::TextContext::position const):
1200         (WebCore::Layout::InlineRun::TextContext::length const):
1201         (WebCore::Layout::InlineRun::TextContext::setLength):
1202         (WebCore::Layout::InlineRun::textContext):
1203         (WebCore::Layout::InlineRun::inlineItem const):
1204         (WebCore::Layout::InlineRun::InlineRun):
1205         (WebCore::Layout::InlineRun::TextContext::TextContext):
1206         * layout/inlineformatting/Line.cpp: Added.
1207         (WebCore::Layout::InlineFormattingContext::Line::Line):
1208         (WebCore::Layout::InlineFormattingContext::Line::setConstraints):
1209         (WebCore::Layout::isNonCollapsedText):
1210         (WebCore::Layout::isTrimmableContent):
1211         (WebCore::Layout::InlineFormattingContext::Line::appendContent):
1212         (WebCore::Layout::InlineFormattingContext::Line::close):
1213
1214 2018-10-19  Zalan Bujtas  <zalan@apple.com>
1215
1216         [LFC][IFC] Add generic inline line breaker
1217         https://bugs.webkit.org/show_bug.cgi?id=190698
1218
1219         Reviewed by Antti Koivisto.
1220
1221         InlineLineBreaker takes the inline runs and applies the appropriate line breaking rules on them.
1222         InlineRunProvider::Run objects ->
1223
1224             <foobar><image box><hello>< ><world>
1225
1226         InlineLineBreaker::Run ->
1227
1228             <foobar><image box><hello world>
1229
1230         InlineLineBreaker::Run also contains information whether the run is at the beginning or at the end of the line.
1231
1232         * Sources.txt:
1233         * WebCore.xcodeproj/project.pbxproj:
1234         * layout/LayoutContext.h:
1235         (WebCore::Layout::LayoutContext::hasDisplayBox const):
1236         * layout/inlineformatting/InlineLineBreaker.cpp: Added.
1237         (WebCore::Layout::InlineLineBreaker::InlineLineBreaker):
1238         (WebCore::Layout::InlineLineBreaker::nextLayoutRun):
1239         (WebCore::Layout::InlineLineBreaker::isAtContentEnd const):
1240         (WebCore::Layout::InlineLineBreaker::lineBreakingBehavior):
1241         (WebCore::Layout::InlineLineBreaker::runWidth const):
1242         (WebCore::Layout::InlineLineBreaker::splitRun):
1243         (WebCore::Layout::InlineLineBreaker::adjustSplitPositionWithHyphenation const):
1244         * layout/inlineformatting/InlineLineBreaker.h: Added.
1245         * layout/inlineformatting/textlayout/TextUtil.cpp: Added.
1246         (WebCore::Layout::TextUtil::TextUtil):
1247         (WebCore::Layout::TextUtil::width const):
1248         (WebCore::Layout::TextUtil::hyphenPositionBefore const):
1249         (WebCore::Layout::TextUtil::textWidth const):
1250         (WebCore::Layout::TextUtil::fixedPitchWidth const):
1251         * layout/inlineformatting/textlayout/TextUtil.h: Added.
1252         * layout/layouttree/LayoutBox.cpp:
1253
1254 2018-10-19  Zalan Bujtas  <zalan@apple.com>
1255
1256         [LFC][IFC] Add generic inline run generator.
1257         https://bugs.webkit.org/show_bug.cgi?id=190696
1258
1259         Reviewed by Antti Koivisto.
1260
1261         InlineRunProvider turns the following inline content ->
1262
1263             <span>foo<span>bar</span></span>
1264             <img src="broken.jpg"><span>hello world</span>
1265
1266         into a set of runs ->
1267
1268             <foobar><image box><hello>< ><world>
1269
1270         Note that a text run can overlap multiple inline elements. InlineRunProvider::Run only stores a reference to
1271         the first inline element (continuous content can be accessed by iterating through the InlineContent ListHashSet).
1272         These runs are the input to the line breaking algoritm.
1273
1274         * Sources.txt:
1275         * WebCore.xcodeproj/project.pbxproj:
1276         * layout/inlineformatting/InlineFormattingContext.cpp:
1277         (WebCore::Layout::InlineFormattingContext::layout const):
1278         * layout/inlineformatting/InlineFormattingState.h:
1279         (WebCore::Layout::InlineFormattingState::inlineContent):
1280         * layout/inlineformatting/InlineItem.h: Added.
1281         (WebCore::Layout::InlineItem::layoutBox const):
1282         (WebCore::Layout::InlineItem::style const):
1283         (WebCore::Layout::InlineItemHashFunctions::hash):
1284         (WebCore::Layout::InlineItemHashFunctions::equal):
1285         (WebCore::Layout::InlineItemHashTranslator::hash):
1286         (WebCore::Layout::InlineItemHashTranslator::equal):
1287         (WebCore::Layout::InlineItem::InlineItem):
1288         (WebCore::Layout::InlineItem::type const):
1289         (WebCore::Layout::InlineItem::textContent const):
1290         * layout/inlineformatting/InlineRunProvider.cpp: Added.
1291         (WebCore::Layout::InlineRunProvider::InlineRunProvider):
1292         (WebCore::Layout::InlineRunProvider::append):
1293         (WebCore::Layout::InlineRunProvider::insertBefore):
1294         (WebCore::Layout::InlineRunProvider::remove):
1295         (WebCore::Layout::isWhitespace):
1296         (WebCore::Layout::isSoftLineBreak):
1297         (WebCore::Layout::InlineRunProvider::isContinousContent):
1298         (WebCore::Layout::InlineRunProvider::processInlineTextItem):
1299         (WebCore::Layout::InlineRunProvider::moveToNextNonWhitespacePosition):
1300         (WebCore::Layout::InlineRunProvider::moveToNextBreakablePosition):
1301         * layout/inlineformatting/InlineRunProvider.h: Added.
1302         (WebCore::Layout::InlineRunProvider::Run::type const):
1303         (WebCore::Layout::InlineRunProvider::Run::isText const):
1304         (WebCore::Layout::InlineRunProvider::Run::isWhitespace const):
1305         (WebCore::Layout::InlineRunProvider::Run::isNonWhitespace const):
1306         (WebCore::Layout::InlineRunProvider::Run::isLineBreak const):
1307         (WebCore::Layout::InlineRunProvider::Run::isBox const):
1308         (WebCore::Layout::InlineRunProvider::Run::isFloat const):
1309         (WebCore::Layout::InlineRunProvider::Run::TextContext::start const):
1310         (WebCore::Layout::InlineRunProvider::Run::TextContext::length const):
1311         (WebCore::Layout::InlineRunProvider::Run::TextContext::isCollapsed const):
1312         (WebCore::Layout::InlineRunProvider::Run::TextContext::setStart):
1313         (WebCore::Layout::InlineRunProvider::Run::TextContext::setLength):
1314         (WebCore::Layout::InlineRunProvider::Run::textContext const):
1315         (WebCore::Layout::InlineRunProvider::Run::style const):
1316         (WebCore::Layout::InlineRunProvider::Run::inlineItem const):
1317         (WebCore::Layout::InlineRunProvider::runs const):
1318         (WebCore::Layout::InlineRunProvider::Run::createBoxRun):
1319         (WebCore::Layout::InlineRunProvider::Run::createFloatRun):
1320         (WebCore::Layout::InlineRunProvider::Run::createSoftLineBreakRun):
1321         (WebCore::Layout::InlineRunProvider::Run::createHardLineBreakRun):
1322         (WebCore::Layout::InlineRunProvider::Run::createWhitespaceRun):
1323         (WebCore::Layout::InlineRunProvider::Run::createNonWhitespaceRun):
1324         (WebCore::Layout::InlineRunProvider::Run::Run):
1325         (WebCore::Layout::InlineRunProvider::Run::TextContext::TextContext):
1326         * layout/layouttree/LayoutBox.h:
1327         (WebCore::Layout::Box::isLineBreakBox const):
1328         * layout/layouttree/LayoutInlineBox.cpp:
1329         (WebCore::Layout::InlineBox::InlineBox):
1330         * layout/layouttree/LayoutInlineBox.h:
1331         (WebCore::Layout::InlineBox::hasTextContent const):
1332         (WebCore::Layout::InlineBox::textContent const):
1333         * layout/layouttree/LayoutLineBreakBox.cpp: Copied from Source/WebCore/layout/layouttree/LayoutInlineBox.cpp.
1334         (WebCore::Layout::LineBreakBox::LineBreakBox):
1335         * layout/layouttree/LayoutLineBreakBox.h: Copied from Source/WebCore/layout/layouttree/LayoutInlineBox.cpp.
1336
1337 2018-10-19  Ali Juma  <ajuma@chromium.org>
1338
1339         [IntersectionObserver] Handle zero-area intersections
1340         https://bugs.webkit.org/show_bug.cgi?id=189624
1341
1342         Reviewed by Simon Fraser.
1343
1344         Use edge-inclusive intersection when applying clips and intersecting with the
1345         root, so that two rects that touch each other are considered intersecting even
1346         if the area of their intersection is 0.
1347
1348         Covered by rebased tests in imported/w3c/web-platform-tests/intersection-observer.
1349
1350         * dom/Document.cpp:
1351         (WebCore::computeIntersectionState):
1352         (WebCore::Document::updateIntersectionObservations):
1353         (WebCore::computeIntersectionRects): Deleted.
1354
1355 2018-10-18  Eric Carlson  <eric.carlson@apple.com>
1356
1357         [MediaStream] Allow ports to optionally do screen capture in the UI process
1358         https://bugs.webkit.org/show_bug.cgi?id=190728
1359         <rdar://problem/45376824>
1360
1361         Reviewed by Jer Noble and Tim Horton.
1362
1363         No new tests, covered by existing tests.
1364
1365         * Sources.txt: Add RemoteVideoSample.cpp.
1366         * WebCore.xcodeproj/project.pbxproj: Ditto.
1367
1368         * platform/MediaSample.h:
1369         (WebCore::MediaSample::videoPixelFormat const):
1370
1371         * platform/graphics/RemoteVideoSample.cpp: Added.
1372         (WebCore::RemoteVideoSample::~RemoteVideoSample):
1373         (WebCore::RemoteVideoSample::create):
1374         (WebCore::RemoteVideoSample::RemoteVideoSample):
1375         (WebCore::RemoteVideoSample::surface):
1376         * platform/graphics/RemoteVideoSample.h: Added.
1377         (WebCore::RemoteVideoSample::time const):
1378         (WebCore::RemoteVideoSample::videoFormat const):
1379         (WebCore::RemoteVideoSample::size const):
1380         (WebCore::RemoteVideoSample::encode const):
1381         (WebCore::RemoteVideoSample::decode):
1382         * platform/graphics/avfoundation/objc/MediaSampleAVFObjC.h:
1383         * platform/graphics/cv/ImageTransferSessionVT.h:
1384
1385         * platform/mediastream/RealtimeMediaSource.cpp:
1386         (WebCore::RealtimeMediaSource::remoteVideoSampleAvailable): Call observers.
1387         * platform/mediastream/RealtimeMediaSource.h:
1388
1389         * platform/mediastream/RealtimeVideoSource.cpp:
1390         (WebCore::RealtimeVideoSource::dispatchMediaSampleToObservers): Dispatch remote samples without
1391         resizing, resize local samples if necessary.
1392         * platform/mediastream/RealtimeVideoSource.h:
1393
1394         * platform/mediastream/mac/AVVideoCaptureSource.mm:
1395         (WebCore::AVVideoCaptureSource::captureOutputDidOutputSampleBufferFromConnection): Don't resize
1396         samples, it will be done in the base class if necessary.
1397
1398         * platform/mediastream/mac/DisplayCaptureSourceCocoa.cpp:
1399         (WebCore::DisplayCaptureSourceCocoa::emitFrame): Don't resize samples when running in the UI
1400         process, it will be done in the web process.
1401
1402         * platform/mediastream/mac/RealtimeOutgoingVideoSourceCocoa.cpp: Remove unneeded include.
1403
1404 2018-10-18  Said Abou-Hallawa  <sabouhallawa@apple.com>
1405
1406         [CG] Adopt CG SPI for non-even cornered rounded rects
1407         https://bugs.webkit.org/show_bug.cgi?id=190155
1408
1409         Reviewed by Simon Fraser.
1410
1411         Instead of creating bezier curves for the non-even corners of the rounded
1412         rects, we should use the optimized SPI provided by CG.
1413
1414         * platform/graphics/cg/PathCG.cpp:
1415         (WebCore::Path::platformAddPathForRoundedRect):
1416
1417 2018-10-18  Justin Michaud  <justin_michaud@apple.com>
1418
1419         Add new image type for CSS painting API
1420         https://bugs.webkit.org/show_bug.cgi?id=190697
1421
1422         Reviewed by Dean Jackson.
1423
1424         Add a new image type for the CSS painting API, and hook it up so it can be drawn.
1425         For now, it uses a WebGL rendering context from OfflineCanvas because that was
1426         easy to hook up. The spec actually calls for a RenderingContext2D, which can be
1427         handled in another patch.
1428
1429         * Sources.txt:
1430         * WebCore.xcodeproj/project.pbxproj:
1431         * css/CSSImageGeneratorValue.cpp:
1432         (WebCore::CSSImageGeneratorValue::image):
1433         (WebCore::CSSImageGeneratorValue::isFixedSize const):
1434         (WebCore::CSSImageGeneratorValue::fixedSize):
1435         (WebCore::CSSImageGeneratorValue::isPending const):
1436         (WebCore::CSSImageGeneratorValue::knownToBeOpaque const):
1437         (WebCore::CSSImageGeneratorValue::loadSubimages):
1438         * css/CSSPaintCallback.h:
1439         * css/CSSPaintCallback.idl:
1440         * css/CSSPaintImageValue.cpp:
1441         (WebCore::CSSPaintImageValue::image):
1442         * css/CSSPaintImageValue.h:
1443         * platform/graphics/CustomPaintImage.cpp: Added.
1444         (WebCore::CustomPaintImage::CustomPaintImage):
1445         (WebCore::CustomPaintImage::doCustomPaint):
1446         (WebCore::CustomPaintImage::draw):
1447         (WebCore::CustomPaintImage::drawPattern):
1448         * platform/graphics/CustomPaintImage.h: Copied from Source/WebCore/css/CSSPaintCallback.h.
1449         * platform/graphics/Image.h:
1450         (WebCore::Image::isCustomPaintImage const):
1451         * platform/graphics/ImageBuffer.h:
1452         * platform/graphics/cairo/CairoOperations.cpp:
1453
1454 2018-10-18  Truitt Savell  <tsavell@apple.com>
1455
1456         Unreviewed, rolling out r237272.
1457
1458         Broke on device iOS builds and Windows builds
1459
1460         Reverted changeset:
1461
1462         "[MediaStream] Allow ports to optionally do screen capture in
1463         the UI process"
1464         https://bugs.webkit.org/show_bug.cgi?id=190728
1465         https://trac.webkit.org/changeset/237272
1466
1467 2018-10-18  Jer Noble  <jer.noble@apple.com>
1468
1469         [MSE] timestampOffset can introduce floating-point rounding errors to incoming samples
1470         https://bugs.webkit.org/show_bug.cgi?id=190590
1471         <rdar://problem/45275626>
1472
1473         Reviewed by Eric Carlson.
1474
1475         Test: media/media-source/media-source-timestampoffset-rounding-error.html
1476
1477         SourceBuffer.timestampOffset is a double property, which, when added to a MediaTime will
1478         result in a double-backed MediaTime as PTS & DTS. This can introduce rounding errors when
1479         these samples are appended as overlapping existing samples. Rather than converting a MediaTime
1480         to double-backed when adding the timestampOffset, convert the offset to a multiple of the
1481         sample's timeBase.
1482
1483         * Modules/mediasource/SourceBuffer.cpp:
1484         (WebCore::SourceBuffer::setTimestampOffset):
1485         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample):
1486
1487 2018-10-18  Eric Carlson  <eric.carlson@apple.com>
1488
1489         [MediaStream] Allow ports to optionally do screen capture in the UI process
1490         https://bugs.webkit.org/show_bug.cgi?id=190728
1491         <rdar://problem/45376824>
1492
1493         Reviewed by Jer Noble and Tim Horton.
1494
1495         No new tests, covered by existing tests.
1496
1497         * Sources.txt: Add RemoteVideoSample.cpp.
1498         * WebCore.xcodeproj/project.pbxproj: Ditto.
1499
1500         * platform/MediaSample.h:
1501         (WebCore::MediaSample::videoPixelFormat const):
1502
1503         * platform/graphics/RemoteVideoSample.cpp: Added.
1504         (WebCore::RemoteVideoSample::~RemoteVideoSample):
1505         (WebCore::RemoteVideoSample::create):
1506         (WebCore::RemoteVideoSample::RemoteVideoSample):
1507         (WebCore::RemoteVideoSample::surface):
1508         * platform/graphics/RemoteVideoSample.h: Added.
1509         (WebCore::RemoteVideoSample::time const):
1510         (WebCore::RemoteVideoSample::videoFormat const):
1511         (WebCore::RemoteVideoSample::size const):
1512         (WebCore::RemoteVideoSample::encode const):
1513         (WebCore::RemoteVideoSample::decode):
1514         * platform/graphics/avfoundation/objc/MediaSampleAVFObjC.h:
1515         * platform/graphics/cv/ImageTransferSessionVT.h:
1516
1517         * platform/mediastream/RealtimeMediaSource.cpp:
1518         (WebCore::RealtimeMediaSource::remoteVideoSampleAvailable): Call observers.
1519         * platform/mediastream/RealtimeMediaSource.h:
1520
1521         * platform/mediastream/RealtimeVideoSource.cpp:
1522         (WebCore::RealtimeVideoSource::dispatchMediaSampleToObservers): Dispatch remote samples without
1523         resizing, resize local samples if necessary.
1524         * platform/mediastream/RealtimeVideoSource.h:
1525
1526         * platform/mediastream/mac/AVVideoCaptureSource.mm:
1527         (WebCore::AVVideoCaptureSource::captureOutputDidOutputSampleBufferFromConnection): Don't resize
1528         samples, it will be done in the base class if necessary.
1529
1530         * platform/mediastream/mac/DisplayCaptureSourceCocoa.cpp:
1531         (WebCore::DisplayCaptureSourceCocoa::emitFrame): Don't resize samples when running in the UI
1532         process, it will be done in the web process.
1533
1534         * platform/mediastream/mac/RealtimeOutgoingVideoSourceCocoa.cpp: Remove unneeded include.
1535
1536 2018-10-18  Jer Noble  <jer.noble@apple.com>
1537
1538         Safari is not able to adapt between H264 streams with EditList and without EditList
1539         https://bugs.webkit.org/show_bug.cgi?id=190638
1540         <rdar://problem/45342208>
1541
1542         Reviewed by Eric Carlson.
1543
1544         Test: media/media-source/media-source-append-overlapping-dts.html
1545
1546         The MSE frame replacement algorithm does not take decode timestamps into account; this can
1547         lead to situations where the replacement algorithm may leave in place frames where the 
1548         presentationTimestamp is less than the replacement frame, but whose decodeTimestamp is
1549         after the replacement frame. When re-enqueuing these frames, they may cause a decode error
1550         if they break the group-of-pictures sequence of the replaced range.
1551
1552         * Modules/mediasource/SampleMap.cpp:
1553         (WebCore::DecodeOrderSampleMap::findSamplesBetweenDecodeKeys):
1554         * Modules/mediasource/SampleMap.h:
1555         * Modules/mediasource/SourceBuffer.cpp:
1556         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample):
1557
1558 2018-10-18  Per Arne Vollan  <pvollan@apple.com>
1559
1560         [WebVTT] Region parameter and value should be separated by ':'
1561         https://bugs.webkit.org/show_bug.cgi?id=190735
1562
1563         Reviewed by Eric Carlson.
1564
1565         This is specified in https://w3c.github.io/webvtt/#region-settings.
1566
1567         No new tests. Modified existing tests.
1568
1569         * html/track/VTTRegion.cpp:
1570         (WebCore::VTTRegion::setRegionSettings):
1571
1572 2018-10-18  Jer Noble  <jer.noble@apple.com>
1573
1574         Add support for MediaKeyEncryptionScheme
1575         https://bugs.webkit.org/show_bug.cgi?id=190173
1576
1577         Reviewed by Eric Carlson.
1578
1579         Added sub-tests to: media/encrypted-media/mock-navigator-requestMediaKeySystemAccess.html
1580
1581         Add support for the MediaKeyEncryptionScheme extension to EME, as detailed here:
1582         <https://github.com/WICG/encrypted-media-encryption-scheme/blob/master/explainer.md>
1583
1584         As the strings "cenc" and "cbcs" are explicitly lower-case, add support to the bindings generator to keep
1585         those strings as lower-case when converting from IDL.
1586
1587         * CMakeLists.txt:
1588         * DerivedSources.make:
1589         * Modules/encryptedmedia/MediaKeyEncryptionScheme.h:
1590         * Modules/encryptedmedia/MediaKeyEncryptionScheme.idl:
1591         * Modules/encryptedmedia/MediaKeySystemMediaCapability.h:
1592         * Modules/encryptedmedia/MediaKeySystemMediaCapability.idl:
1593         * Sources.txt:
1594         * WebCore.xcodeproj/project.pbxproj:
1595         * bindings/scripts/CodeGenerator.pm:
1596         (WK_ucfirst):
1597         * platform/encryptedmedia/CDMEncryptionScheme.h: Copied from Source/WebCore/testing/MockCDMFactory.idl.
1598         * platform/encryptedmedia/CDMMediaCapability.h:
1599         * platform/graphics/avfoundation/CDMFairPlayStreaming.cpp:
1600         (WebCore::CDMPrivateFairPlayStreaming::supportsConfiguration const):
1601         * platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.h:
1602         * platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.mm:
1603         (WebCore::CDMInstanceFairPlayStreamingAVFObjC::supportsMediaCapability):
1604         (WebCore::CDMInstanceFairPlayStreamingAVFObjC::initializeWithConfiguration):
1605         * testing/MockCDMFactory.cpp:
1606         (WebCore::m_supportedEncryptionSchemes):
1607         (WebCore::MockCDM::supportsConfiguration const):
1608         * testing/MockCDMFactory.h:
1609         (WebCore::MockCDMFactory::supportedEncryptionSchemes const):
1610         (WebCore::MockCDMFactory::setSupportedEncryptionSchemes):
1611         * testing/MockCDMFactory.idl:
1612
1613 2018-10-18  Alexey Proskuryakov  <ap@apple.com>
1614
1615         Switch from PLATFORM(IOS) to PLATFORM(IOS_FAMILY)
1616         https://bugs.webkit.org/show_bug.cgi?id=190729
1617
1618         Reviewed by Tim Horton.
1619
1620         * DerivedSources.make:
1621         * Modules/applepay/cocoa/PaymentContactCocoa.mm:
1622         (WebCore::subLocality):
1623         (WebCore::setSubLocality):
1624         (WebCore::subAdministrativeArea):
1625         (WebCore::setSubAdministrativeArea):
1626         * Modules/encryptedmedia/legacy/LegacyCDMPrivateMediaPlayer.cpp:
1627         * Modules/geolocation/Geolocation.cpp:
1628         (WebCore::isRequestFromIBooks):
1629         * Modules/geolocation/GeolocationPosition.h:
1630         * Modules/geolocation/NavigatorGeolocation.cpp:
1631         * Modules/geolocation/NavigatorGeolocation.h:
1632         * Modules/geolocation/ios/GeolocationPositionIOS.mm:
1633         * Modules/mediasession/WebMediaSessionManager.cpp:
1634         * Modules/mediasession/WebMediaSessionManager.h:
1635         * Modules/mediastream/MediaDevicesRequest.cpp:
1636         (WebCore::MediaDevicesRequest::filterDeviceList):
1637         * Modules/plugins/QuickTimePluginReplacement.mm:
1638         (WebCore::JSQuickTimePluginReplacement::timedMetaData const):
1639         (WebCore::JSQuickTimePluginReplacement::accessLog const):
1640         (WebCore::JSQuickTimePluginReplacement::errorLog const):
1641         * Modules/speech/SpeechSynthesis.cpp:
1642         (WebCore::SpeechSynthesis::SpeechSynthesis):
1643         (WebCore::SpeechSynthesis::speak):
1644         * Modules/speech/SpeechSynthesis.h:
1645         * Modules/webaudio/AudioContext.cpp:
1646         * Modules/webaudio/AudioScheduledSourceNode.cpp:
1647         * Modules/webdatabase/Database.cpp:
1648         (WebCore::Database::performOpenAndVerify):
1649         * Modules/webdatabase/DatabaseContext.h:
1650         * Modules/webdatabase/DatabaseManagerClient.h:
1651         * Modules/webdatabase/DatabaseTracker.cpp:
1652         (WebCore::DatabaseTracker::deleteDatabaseFile):
1653         * Modules/webdatabase/DatabaseTracker.h:
1654         * WebCorePrefix.h:
1655         * accessibility/AXObjectCache.cpp:
1656         (WebCore::createFromRenderer):
1657         * accessibility/AccessibilityMediaObject.cpp:
1658         * accessibility/AccessibilityMediaObject.h:
1659         * accessibility/AccessibilityMenuList.cpp:
1660         (WebCore::AccessibilityMenuList::press):
1661         (WebCore::AccessibilityMenuList::isCollapsed const):
1662         * accessibility/AccessibilityObject.cpp:
1663         (WebCore::AccessibilityObject::isAccessibilityObjectSearchMatchAtIndex):
1664         (WebCore::AccessibilityObject::press):
1665         (WebCore::AccessibilityObject::actionVerb const):
1666         * accessibility/AccessibilityObject.h:
1667         * accessibility/AccessibilityRenderObject.cpp:
1668         (WebCore::AccessibilityRenderObject::stringValue const):
1669         (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
1670         (WebCore::AccessibilityRenderObject::actionVerb const):
1671         * accessibility/AccessibilityTableColumn.cpp:
1672         (WebCore::AccessibilityTableColumn::computeAccessibilityIsIgnored const):
1673         * accessibility/AccessibilityTableHeaderContainer.cpp:
1674         (WebCore::AccessibilityTableHeaderContainer::computeAccessibilityIsIgnored const):
1675         * accessibility/ios/AXObjectCacheIOS.mm:
1676         * accessibility/ios/AccessibilityObjectIOS.mm:
1677         * accessibility/ios/WebAccessibilityObjectWrapperIOS.h:
1678         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
1679         * bindings/js/CommonVM.cpp:
1680         (WebCore::commonVMSlow):
1681         * bindings/js/JSCallbackData.h:
1682         (WebCore::JSCallbackData::~JSCallbackData):
1683         * bindings/js/JSDOMWindowBase.cpp:
1684         (WebCore::JSDOMWindowBase::shouldInterruptScriptBeforeTimeout):
1685         * bindings/js/ScriptController.cpp:
1686         (WebCore::ScriptController::initializeThreading):
1687         * bridge/objc/objc_class.mm:
1688         (JSC::Bindings::ObjcClass::fieldNamed const):
1689         * crypto/CommonCryptoUtilities.h:
1690         * crypto/mac/CryptoKeyRSAMac.cpp:
1691         * crypto/mac/SerializedCryptoKeyWrapMac.mm:
1692         (WebCore::masterKeyAccountNameForCurrentApplication):
1693         (WebCore::createAndStoreMasterKey):
1694         * css/CSSComputedStyleDeclaration.cpp:
1695         (WebCore::ComputedStyleExtractor::valueForPropertyinStyle):
1696         * css/CSSProperties.json:
1697         * css/CSSStyleDeclaration.cpp:
1698         * css/CSSValueKeywords.in:
1699         * css/MediaQueryEvaluator.cpp:
1700         (WebCore::prefersReducedMotionEvaluate):
1701         * css/StyleBuilderConverter.h:
1702         * css/html.css:
1703         (video):
1704         (input, textarea, keygen, select, button):
1705         (#if defined(WTF_PLATFORM_IOS_FAMILY) && WTF_PLATFORM_IOS_FAMILY):
1706         (#if defined(ENABLE_INPUT_TYPE_DATE) && ENABLE_INPUT_TYPE_DATE):
1707         (#endif):
1708         (#if defined(ENABLE_DATALIST_ELEMENT) && ENABLE_DATALIST_ELEMENT):
1709         (textarea):
1710         (input:matches([type="radio"], [type="checkbox"])):
1711         (input:matches([type="button"], [type="submit"], [type="reset"]), input[type="file"]::-webkit-file-upload-button, button):
1712         (input[type="range"]::-webkit-slider-thumb, input[type="range"]::-webkit-media-slider-thumb):
1713         (#if !(defined(WTF_PLATFORM_IOS_FAMILY) && WTF_PLATFORM_IOS_FAMILY)):
1714         (input[type="checkbox"]):
1715         (#endif // defined(ENABLE_INPUT_TYPE_COLOR) && ENABLE_INPUT_TYPE_COLOR):
1716         (#if defined(WTF_PLATFORM_IOS) && WTF_PLATFORM_IOS): Deleted.
1717         (#if !(defined(WTF_PLATFORM_IOS) && WTF_PLATFORM_IOS)): Deleted.
1718         * css/parser/CSSParserContext.cpp:
1719         (WebCore::CSSParserContext::CSSParserContext):
1720         * css/parser/CSSParserFastPaths.cpp:
1721         (WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
1722         (WebCore::CSSParserFastPaths::isKeywordPropertyID):
1723         * css/parser/CSSPropertyParser.cpp:
1724         (WebCore::cssPropertyID):
1725         (WebCore::CSSPropertyParser::parseSingleValue):
1726         * css/parser/CSSPropertyParser.h:
1727         * css/svg.css:
1728         (#if defined(WTF_PLATFORM_IOS_FAMILY) && WTF_PLATFORM_IOS_FAMILY):
1729         (#if defined(WTF_PLATFORM_IOS) && WTF_PLATFORM_IOS): Deleted.
1730         * dom/DeviceMotionController.cpp:
1731         * dom/DeviceMotionController.h:
1732         * dom/DeviceOrientationController.cpp:
1733         (WebCore::DeviceOrientationController::DeviceOrientationController):
1734         * dom/DeviceOrientationController.h:
1735         * dom/DeviceOrientationData.cpp:
1736         * dom/DeviceOrientationData.h:
1737         * dom/DeviceOrientationEvent.cpp:
1738         * dom/DeviceOrientationEvent.h:
1739         * dom/DeviceOrientationEvent.idl:
1740         * dom/Document.cpp:
1741         (WebCore::Document::~Document):
1742         (WebCore::Document::suspendDeviceMotionAndOrientationUpdates):
1743         (WebCore::Document::resumeDeviceMotionAndOrientationUpdates):
1744         (WebCore::Document::platformSuspendOrStopActiveDOMObjects):
1745         * dom/Document.h:
1746         * dom/DocumentMarker.h:
1747         (WebCore::DocumentMarker::allMarkers):
1748         * dom/DocumentMarkerController.cpp:
1749         (WebCore::shouldInsertAsSeparateMarker):
1750         (WebCore::DocumentMarkerController::shiftMarkers):
1751         * dom/DocumentMarkerController.h:
1752         * dom/Element.cpp:
1753         (WebCore::Element::focus):
1754         * dom/Node.cpp:
1755         (WebCore::Node::~Node):
1756         (WebCore::Node::willBeDeletedFrom):
1757         (WebCore::Node::moveNodeToNewDocument):
1758         (WebCore::tryAddEventListener):
1759         (WebCore::tryRemoveEventListener):
1760         (WebCore::Node::defaultEventHandler):
1761         (WebCore::Node::willRespondToMouseMoveEvents):
1762         (WebCore::Node::willRespondToMouseClickEvents):
1763         * dom/Range.cpp:
1764         * dom/Range.h:
1765         * dom/TreeScope.cpp:
1766         (WebCore::absolutePointIfNotClipped):
1767         * dom/ViewportArguments.cpp:
1768         (WebCore::setViewportFeature):
1769         * dom/ViewportArguments.h:
1770         * editing/CompositeEditCommand.cpp:
1771         (WebCore::EditCommandComposition::unapply):
1772         (WebCore::CompositeEditCommand::replaceTextInNodePreservingMarkers):
1773         (WebCore::CompositeEditCommand::moveParagraphs):
1774         * editing/Editor.cpp:
1775         (WebCore::TemporarySelectionChange::TemporarySelectionChange):
1776         (WebCore::TemporarySelectionChange::~TemporarySelectionChange):
1777         (WebCore::Editor::handleTextEvent):
1778         (WebCore::Editor::Editor):
1779         (WebCore::Editor::clear):
1780         (WebCore::Editor::insertTextWithoutSendingTextEvent):
1781         (WebCore::Editor::setBaseWritingDirection):
1782         (WebCore::Editor::setComposition):
1783         (WebCore::Editor::showSpellingGuessPanel):
1784         (WebCore::Editor::markMisspellingsAfterTypingToWord):
1785         (WebCore::Editor::markMisspellingsOrBadGrammar):
1786         (WebCore::Editor::changeBackToReplacedString):
1787         (WebCore::Editor::updateMarkersForWordsAffectedByEditing):
1788         (WebCore::Editor::revealSelectionAfterEditingOperation):
1789         (WebCore::Editor::setIgnoreSelectionChanges):
1790         (WebCore::Editor::changeSelectionAfterCommand):
1791         (WebCore::Editor::shouldChangeSelection const):
1792         (WebCore::Editor::respondToChangedSelection):
1793         (WebCore::Editor::editorUIUpdateTimerFired):
1794         (WebCore::Editor::resolveTextCheckingTypeMask):
1795         * editing/Editor.h:
1796         * editing/FontAttributes.h:
1797         * editing/FrameSelection.cpp:
1798         (WebCore::FrameSelection::FrameSelection):
1799         (WebCore::FrameSelection::updateDataDetectorsForSelection):
1800         (WebCore::FrameSelection::setSelectedRange):
1801         (WebCore::FrameSelection::updateAppearance):
1802         (WebCore::FrameSelection::shouldDeleteSelection const):
1803         (WebCore::FrameSelection::revealSelection):
1804         (WebCore::FrameSelection::setSelectionFromNone):
1805         (WebCore::FrameSelection::shouldChangeSelection const):
1806         * editing/FrameSelection.h:
1807         * editing/InsertIntoTextNodeCommand.cpp:
1808         * editing/InsertIntoTextNodeCommand.h:
1809         * editing/TypingCommand.cpp:
1810         (WebCore::TypingCommand::markMisspellingsAfterTyping):
1811         (WebCore::TypingCommand::deleteKeyPressed):
1812         (WebCore::TypingCommand::forwardDeleteKeyPressed):
1813         * editing/TypingCommand.h:
1814         * editing/cocoa/DataDetection.h:
1815         * editing/cocoa/DataDetection.mm:
1816         * editing/cocoa/FontAttributesCocoa.mm:
1817         * editing/cocoa/FontShadowCocoa.mm:
1818         (WebCore::FontShadow::createShadow const):
1819         * editing/cocoa/HTMLConverter.h:
1820         * editing/cocoa/HTMLConverter.mm:
1821         (_fontForNameAndSize):
1822         (_shadowForShadowStyle):
1823         (HTMLConverter::computedAttributesForElement):
1824         (HTMLConverter::_addAttachmentForElement):
1825         (HTMLConverter::_processMetaElementWithName):
1826         (HTMLConverter::_processElement):
1827         * editing/cocoa/WebContentReaderCocoa.mm:
1828         (WebCore::attributesForAttributedStringConversion):
1829         (WebCore::WebContentReader::readURL):
1830         * editing/ios/DictationCommandIOS.cpp:
1831         * editing/ios/DictationCommandIOS.h:
1832         * editing/ios/EditorIOS.mm:
1833         * editing/mac/FrameSelectionMac.mm:
1834         (WebCore::FrameSelection::notifyAccessibilityForSelectionChange):
1835         * fileapi/FileCocoa.mm:
1836         * history/CachedFrame.cpp:
1837         (WebCore::CachedFrameBase::restore):
1838         (WebCore::CachedFrame::CachedFrame):
1839         * history/CachedPage.cpp:
1840         (WebCore::CachedPage::restore):
1841         * history/HistoryItem.cpp:
1842         (WebCore::HistoryItem::HistoryItem):
1843         * history/HistoryItem.h:
1844         * history/PageCache.cpp:
1845         (WebCore::canCachePage):
1846         * html/BaseDateAndTimeInputType.cpp:
1847         * html/BaseDateAndTimeInputType.h:
1848         * html/ColorInputType.cpp:
1849         (WebCore::ColorInputType::isKeyboardFocusable const):
1850         * html/HTMLAppletElement.cpp:
1851         (WebCore::HTMLAppletElement::updateWidget):
1852         * html/HTMLAttachmentElement.h:
1853         * html/HTMLCanvasElement.cpp:
1854         (WebCore::maxActivePixelMemory):
1855         * html/HTMLElement.cpp:
1856         (WebCore::HTMLElement::collectStyleForPresentationAttribute):
1857         * html/HTMLIFrameElement.h:
1858         * html/HTMLImageElement.cpp:
1859         * html/HTMLImageElement.h:
1860         * html/HTMLInputElement.cpp:
1861         * html/HTMLInputElement.h:
1862         * html/HTMLMediaElement.cpp:
1863         (WebCore::HTMLMediaElement::finishInitialization):
1864         (WebCore::HTMLMediaElement::registerWithDocument):
1865         (WebCore::HTMLMediaElement::unregisterWithDocument):
1866         (WebCore::HTMLMediaElement::setVolume):
1867         (WebCore::HTMLMediaElement::nextScanRate):
1868         (WebCore::HTMLMediaElement::sourceWasAdded):
1869         (WebCore::HTMLMediaElement::mediaEngineWasUpdated):
1870         (WebCore::HTMLMediaElement::updateVolume):
1871         (WebCore::HTMLMediaElement::userCancelledLoad):
1872         (WebCore::HTMLMediaElement::mediaSessionTitle const):
1873         (WebCore::HTMLMediaElement::purgeBufferedDataIfPossible):
1874         * html/HTMLMediaElement.h:
1875         * html/HTMLMetaElement.cpp:
1876         (WebCore::HTMLMetaElement::process):
1877         * html/HTMLObjectElement.cpp:
1878         * html/HTMLPlugInElement.h:
1879         * html/HTMLSelectElement.cpp:
1880         (WebCore::HTMLSelectElement::usesMenuList const):
1881         (WebCore::HTMLSelectElement::createElementRenderer):
1882         (WebCore::HTMLSelectElement::childShouldCreateRenderer const):
1883         (WebCore::HTMLSelectElement::willRespondToMouseClickEvents):
1884         (WebCore::HTMLSelectElement::updateListBoxSelection):
1885         (WebCore::HTMLSelectElement::scrollToSelection):
1886         (WebCore::HTMLSelectElement::setOptionsChangedOnRenderer):
1887         (WebCore::HTMLSelectElement::menuListDefaultEventHandler):
1888         (WebCore::HTMLSelectElement::defaultEventHandler):
1889         * html/HTMLTextAreaElement.cpp:
1890         (WebCore::HTMLTextAreaElement::createInnerTextStyle):
1891         * html/HTMLTextFormControlElement.cpp:
1892         (WebCore::HTMLTextFormControlElement::select):
1893         (WebCore::HTMLTextFormControlElement::adjustInnerTextStyle const):
1894         * html/HTMLTextFormControlElement.h:
1895         * html/HTMLVideoElement.cpp:
1896         (WebCore::HTMLVideoElement::parseAttribute):
1897         (WebCore::HTMLVideoElement::supportsFullscreen const):
1898         * html/HTMLVideoElement.h:
1899         * html/ImageDocument.cpp:
1900         (WebCore::ImageDocument::ImageDocument):
1901         (WebCore::ImageDocument::createDocumentStructure):
1902         (WebCore::ImageDocument::imageUpdated):
1903         * html/ImageDocument.h:
1904         * html/InputType.cpp:
1905         * html/InputType.h:
1906         * html/MediaDocument.cpp:
1907         (WebCore::MediaDocumentParser::createDocumentStructure):
1908         * html/MediaElementSession.cpp:
1909         (WebCore::MediaElementSession::clientDataBufferingTimerFired):
1910         (WebCore::MediaElementSession::showPlaybackTargetPicker):
1911         (WebCore::MediaElementSession::wirelessVideoPlaybackDisabled const):
1912         (WebCore::MediaElementSession::setHasPlaybackTargetAvailabilityListeners):
1913         (WebCore::MediaElementSession::isPlayingToWirelessPlaybackTarget const):
1914         (WebCore::MediaElementSession::requiresFullscreenForVideoPlayback const):
1915         * html/MediaElementSession.h:
1916         * html/PluginDocument.cpp:
1917         (WebCore::PluginDocumentParser::createDocumentStructure):
1918         * html/RangeInputType.cpp:
1919         (WebCore::RangeInputType::handleTouchEvent):
1920         * html/RangeInputType.h:
1921         * html/SearchInputType.cpp:
1922         (WebCore::SearchInputType::addSearchResult):
1923         * html/TextFieldInputType.cpp:
1924         (WebCore::TextFieldInputType::isKeyboardFocusable const):
1925         (WebCore::TextFieldInputType::handleFocusEvent):
1926         (WebCore::TextFieldInputType::handleBlurEvent):
1927         (WebCore::TextFieldInputType::didSetValueByUserEdit):
1928         (WebCore::TextFieldInputType::listAttributeTargetChanged):
1929         * html/parser/HTMLParserScheduler.h:
1930         (WebCore::HTMLParserScheduler::shouldYieldBeforeToken):
1931         * html/parser/HTMLTreeBuilder.cpp:
1932         (WebCore::HTMLTreeBuilder::processCharacterBufferForInBody):
1933         * html/parser/HTMLTreeBuilder.h:
1934         * html/shadow/MediaControlElements.cpp:
1935         * html/shadow/MediaControlElements.h:
1936         * html/shadow/MediaControls.h:
1937         * html/shadow/SliderThumbElement.cpp:
1938         (WebCore::SliderThumbElement::dragFrom):
1939         * html/shadow/SliderThumbElement.h:
1940         * html/shadow/TextControlInnerElements.cpp:
1941         (WebCore::SearchFieldResultsButtonElement::defaultEventHandler):
1942         (WebCore::SearchFieldCancelButtonElement::SearchFieldCancelButtonElement):
1943         * html/shadow/TextControlInnerElements.h:
1944         * inspector/InspectorController.cpp:
1945         (WebCore::InspectorController::setIndicating):
1946         * inspector/InspectorFrontendHost.cpp:
1947         (WebCore::InspectorFrontendHost::platform):
1948         * inspector/PageScriptDebugServer.cpp:
1949         (WebCore::PageScriptDebugServer::runEventLoopWhilePaused):
1950         * inspector/agents/InspectorTimelineAgent.cpp:
1951         (WebCore::currentRunLoop):
1952         * loader/DocumentLoader.cpp:
1953         * loader/DocumentLoader.h:
1954         * loader/DocumentThreadableLoader.cpp:
1955         (WebCore::DocumentThreadableLoader::makeCrossOriginAccessRequest):
1956         * loader/DocumentWriter.cpp:
1957         (WebCore::DocumentWriter::createDocument):
1958         * loader/EmptyClients.cpp:
1959         * loader/EmptyClients.h:
1960         * loader/EmptyFrameLoaderClient.h:
1961         * loader/FrameLoader.cpp:
1962         (WebCore::FrameLoader::checkCompleted):
1963         (WebCore::FrameLoader::willLoadMediaElementURL):
1964         (WebCore::FrameLoader::stopForUserCancel):
1965         (WebCore::FrameLoader::commitProvisionalLoad):
1966         (WebCore::FrameLoader::didFirstLayout):
1967         (WebCore::createWindow):
1968         * loader/FrameLoader.h:
1969         * loader/FrameLoaderClient.h:
1970         * loader/HistoryController.cpp:
1971         (WebCore::HistoryController::saveScrollPositionAndViewStateToItem):
1972         (WebCore::HistoryController::restoreScrollPositionAndViewState):
1973         * loader/ResourceLoader.cpp:
1974         (WebCore::ResourceLoader::init):
1975         (WebCore::ResourceLoader::willSendRequestInternal):
1976         * loader/ResourceLoader.h:
1977         * loader/SubframeLoader.cpp:
1978         (WebCore::SubframeLoader::loadPlugin):
1979         * loader/SubresourceLoader.cpp:
1980         (WebCore::SubresourceLoader::create):
1981         (WebCore::SubresourceLoader::willCancel):
1982         (WebCore::SubresourceLoader::notifyDone):
1983         (WebCore::SubresourceLoader::releaseResources):
1984         * loader/SubresourceLoader.h:
1985         * loader/cache/CachedImage.cpp:
1986         * page/CaptionUserPreferencesMediaAF.cpp:
1987         (WebCore::userCaptionPreferencesChangedNotificationCallback):
1988         * page/Chrome.cpp:
1989         (WebCore::Chrome::createColorChooser):
1990         (WebCore::Chrome::dispatchViewportPropertiesDidChange const):
1991         (WebCore::Chrome::didReceiveDocType):
1992         * page/Chrome.h:
1993         * page/ChromeClient.h:
1994         * page/DOMTimer.cpp:
1995         (WebCore::DOMTimer::install):
1996         (WebCore::DOMTimer::fired):
1997         * page/DOMWindow.cpp:
1998         (WebCore::DOMWindow::outerHeight const):
1999         (WebCore::DOMWindow::outerWidth const):
2000         (WebCore::DOMWindow::clearTimeout):
2001         (WebCore::DOMWindow::addEventListener):
2002         (WebCore::DOMWindow::resetAllGeolocationPermission):
2003         (WebCore::DOMWindow::removeEventListener):
2004         (WebCore::DOMWindow::removeAllEventListeners):
2005         * page/DOMWindow.h:
2006         * page/DeprecatedGlobalSettings.cpp:
2007         (WebCore::DeprecatedGlobalSettings::globalConstRedeclarationShouldThrow):
2008         * page/DeprecatedGlobalSettings.h:
2009         * page/DragController.cpp:
2010         * page/EditorClient.h:
2011         * page/EventHandler.cpp:
2012         (WebCore::EventHandler::handleMousePressEventSingleClick):
2013         (WebCore::EventHandler::handleMouseReleaseEvent):
2014         (WebCore::EventHandler::startPanScrolling):
2015         (WebCore::EventHandler::handleMouseMoveEvent):
2016         * page/EventHandler.h:
2017         * page/Frame.cpp:
2018         (WebCore::Frame::Frame):
2019         (WebCore::Frame::willDetachPage):
2020         * page/Frame.h:
2021         * page/FrameView.cpp:
2022         (WebCore::FrameView::FrameView):
2023         (WebCore::FrameView::clear):
2024         (WebCore::FrameView::effectiveFrameFlattening const):
2025         (WebCore::FrameView::flushCompositingStateForThisFrame):
2026         (WebCore::FrameView::scrollPositionRespectingCustomFixedPosition const):
2027         (WebCore::FrameView::viewportConstrainedVisibleContentRect const):
2028         (WebCore::FrameView::updateContentsSize):
2029         (WebCore::FrameView::computeScrollability const):
2030         (WebCore::FrameView::adjustTiledBackingCoverage):
2031         (WebCore::FrameView::calculateExtendedBackgroundMode const):
2032         (WebCore::FrameView::performPostLayoutTasks):
2033         (WebCore::FrameView::sizeForResizeEvent const):
2034         (WebCore::FrameView::sendResizeEventIfNeeded):
2035         * page/FrameView.h:
2036         * page/FrameViewLayoutContext.cpp:
2037         (WebCore::FrameViewLayoutContext::layout):
2038         * page/MemoryRelease.cpp:
2039         (WebCore::releaseCriticalMemory):
2040         (WebCore::releaseMemory):
2041         * page/Navigator.cpp:
2042         * page/Navigator.h:
2043         * page/NavigatorBase.cpp:
2044         * page/Page.cpp:
2045         (WebCore::Page::setIsVisibleInternal):
2046         (WebCore::Page::showPlaybackTargetPicker):
2047         * page/Page.h:
2048         * page/PerformanceMonitor.cpp:
2049         (WebCore::PerformanceMonitor::measurePostLoadMemoryUsage):
2050         * page/ResourceUsageOverlay.cpp:
2051         (WebCore::ResourceUsageOverlay::initialize):
2052         * page/SecurityOrigin.cpp:
2053         (WebCore::SecurityOrigin::canDisplay const):
2054         * page/SettingsBase.cpp:
2055         * page/SettingsBase.h:
2056         * page/SettingsDefaultValues.h:
2057         (WebCore::editingBehaviorTypeForPlatform):
2058         * page/TextIndicator.cpp:
2059         (WebCore::TextIndicator::createWithRange):
2060         (WebCore::initializeIndicator):
2061         * page/ViewportConfiguration.cpp:
2062         (WebCore::ViewportConfiguration::textDocumentParameters):
2063         * page/cocoa/MemoryReleaseCocoa.mm:
2064         (WebCore::platformReleaseMemory):
2065         (WebCore::jettisonExpensiveObjectsOnTopLevelNavigation):
2066         * page/cocoa/ResourceUsageOverlayCocoa.mm:
2067         (WebCore::showText):
2068         * page/cocoa/ResourceUsageThreadCocoa.mm:
2069         (WebCore::vmPageSize):
2070         * page/cocoa/SettingsBaseCocoa.mm:
2071         * page/ios/EventHandlerIOS.mm:
2072         * page/ios/FrameIOS.mm:
2073         * page/mac/ChromeMac.mm:
2074         * page/mac/PageMac.mm:
2075         (WebCore::Page::platformInitialize):
2076         * page/mac/WebCoreFrameView.h:
2077         * page/scrolling/AsyncScrollingCoordinator.cpp:
2078         (WebCore::AsyncScrollingCoordinator::reconcileScrollingState):
2079         * page/scrolling/ScrollingTree.h:
2080         * page/scrolling/ScrollingTreeScrollingNode.h:
2081         * page/scrolling/ScrollingTreeScrollingNodeDelegate.cpp:
2082         * page/scrolling/ScrollingTreeScrollingNodeDelegate.h:
2083         * page/scrolling/ios/ScrollingCoordinatorIOS.h:
2084         * page/scrolling/ios/ScrollingCoordinatorIOS.mm:
2085         * page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.h:
2086         * page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.mm:
2087         * page/scrolling/ios/ScrollingTreeIOS.cpp:
2088         * page/scrolling/ios/ScrollingTreeIOS.h:
2089         * platform/ContentFilterUnblockHandler.h:
2090         * platform/Cursor.cpp:
2091         * platform/Cursor.h:
2092         * platform/DragImage.cpp:
2093         * platform/DragImage.h:
2094         * platform/FileChooser.cpp:
2095         * platform/FileChooser.h:
2096         * platform/HostWindow.h:
2097         * platform/LocalizedStrings.cpp:
2098         * platform/LocalizedStrings.h:
2099         * platform/LowPowerModeNotifier.cpp:
2100         * platform/LowPowerModeNotifier.h:
2101         * platform/MIMETypeRegistry.cpp:
2102         (WebCore::initializeSupportedImageMIMETypes):
2103         (WebCore::initializeSupportedNonImageMimeTypes):
2104         (WebCore::initializeUnsupportedTextMIMETypes):
2105         * platform/Pasteboard.h:
2106         * platform/PasteboardStrategy.h:
2107         * platform/PlatformKeyboardEvent.h:
2108         * platform/PlatformPasteboard.h:
2109         * platform/PlatformScreen.h:
2110         * platform/RemoteCommandListener.cpp:
2111         * platform/RuntimeApplicationChecks.h:
2112         * platform/ScrollAnimator.cpp:
2113         * platform/ScrollView.cpp:
2114         (WebCore::ScrollView::contentsScrollPosition const):
2115         (WebCore::ScrollView::setContentsScrollPosition):
2116         (WebCore::ScrollView::visibleContentRectInternal const):
2117         * platform/ScrollView.h:
2118         * platform/ScrollableArea.cpp:
2119         * platform/ScrollableArea.h:
2120         * platform/Scrollbar.cpp:
2121         * platform/Scrollbar.h:
2122         * platform/ThreadTimers.cpp:
2123         * platform/Timer.cpp:
2124         (WebCore::shouldSuppressThreadSafetyCheck):
2125         * platform/Timer.h:
2126         (WebCore::TimerBase::isActive const):
2127         * platform/ValidationBubble.h:
2128         * platform/Widget.h:
2129         * platform/audio/AudioHardwareListener.cpp:
2130         (WebCore::AudioHardwareListener::AudioHardwareListener):
2131         * platform/audio/PlatformMediaSession.h:
2132         * platform/audio/PlatformMediaSessionManager.h:
2133         * platform/audio/ios/AudioDestinationIOS.cpp:
2134         * platform/audio/ios/AudioDestinationIOS.h:
2135         * platform/audio/ios/AudioFileReaderIOS.cpp:
2136         * platform/audio/ios/AudioFileReaderIOS.h:
2137         * platform/audio/ios/AudioSessionIOS.mm:
2138         (WebCore::AudioSession::setCategory):
2139         (WebCore::AudioSession::routingContextUID const):
2140         * platform/audio/ios/MediaSessionManagerIOS.h:
2141         * platform/audio/ios/MediaSessionManagerIOS.mm:
2142         * platform/cf/MainThreadSharedTimerCF.cpp:
2143         (WebCore::setupPowerObserver):
2144         (WebCore::MainThreadSharedTimer::setFireInterval):
2145         * platform/cf/URLCF.cpp:
2146         * platform/cocoa/ContentFilterUnblockHandlerCocoa.mm:
2147         (WebCore::ContentFilterUnblockHandler::wrapWithDecisionHandler):
2148         (WebCore::ContentFilterUnblockHandler::needsUIProcess const):
2149         (WebCore::ContentFilterUnblockHandler::encode const):
2150         (WebCore::ContentFilterUnblockHandler::decode):
2151         (WebCore::ContentFilterUnblockHandler::canHandleRequest const):
2152         (WebCore::dispatchToMainThread):
2153         (WebCore::ContentFilterUnblockHandler::requestUnblockAsync const):
2154         * platform/cocoa/DataDetectorsCoreSoftLink.h:
2155         * platform/cocoa/DataDetectorsCoreSoftLink.mm:
2156         * platform/cocoa/KeyEventCocoa.mm:
2157         * platform/cocoa/LocalizedStringsCocoa.mm:
2158         (WebCore::localizedNSString):
2159         * platform/cocoa/NetworkExtensionContentFilter.mm:
2160         (WebCore::NetworkExtensionContentFilter::initialize):
2161         * platform/cocoa/ParentalControlsContentFilter.mm:
2162         (WebCore::ParentalControlsContentFilter::unblockHandler const):
2163         * platform/cocoa/PasteboardCocoa.mm:
2164         (WebCore::Pasteboard::fileContentState):
2165         * platform/cocoa/PlatformView.h:
2166         * platform/cocoa/PlaybackSessionInterface.h:
2167         * platform/cocoa/PlaybackSessionModel.h:
2168         * platform/cocoa/PlaybackSessionModelMediaElement.h:
2169         * platform/cocoa/PlaybackSessionModelMediaElement.mm:
2170         * platform/cocoa/RuntimeApplicationChecksCocoa.mm:
2171         * platform/cocoa/SystemVersion.mm:
2172         (WebCore::createSystemMarketingVersion):
2173         * platform/cocoa/VideoFullscreenChangeObserver.h:
2174         * platform/cocoa/VideoFullscreenModel.h:
2175         * platform/cocoa/VideoFullscreenModelVideoElement.h:
2176         * platform/cocoa/VideoFullscreenModelVideoElement.mm:
2177         * platform/gamepad/cocoa/GameControllerGamepad.h:
2178         * platform/gamepad/cocoa/GameControllerGamepad.mm:
2179         * platform/gamepad/cocoa/GameControllerGamepadProvider.h:
2180         * platform/gamepad/cocoa/GameControllerGamepadProvider.mm:
2181         * platform/graphics/BitmapImage.h:
2182         * platform/graphics/Color.h:
2183         * platform/graphics/ComplexTextController.cpp:
2184         * platform/graphics/DisplayRefreshMonitor.cpp:
2185         (WebCore::DisplayRefreshMonitor::createDefaultDisplayRefreshMonitor):
2186         * platform/graphics/FloatSize.h:
2187         * platform/graphics/Font.cpp:
2188         (WebCore::Font::Font):
2189         (WebCore::createAndFillGlyphPage):
2190         * platform/graphics/Font.h:
2191         * platform/graphics/FontCache.cpp:
2192         (WebCore::FontCache::getCachedFontPlatformData):
2193         (WebCore::FontCache::fontForPlatformData):
2194         (WebCore::FontCache::purgeInactiveFontData):
2195         (WebCore::FontCache::inactiveFontCount):
2196         * platform/graphics/FontCascade.cpp:
2197         (WebCore::FontCascade::FontCascade):
2198         * platform/graphics/FontCascadeFonts.h:
2199         * platform/graphics/FontDescription.h:
2200         * platform/graphics/FontPlatformData.h:
2201         (WebCore::FontPlatformData::isEmoji const):
2202         * platform/graphics/GraphicsContext.cpp:
2203         (WebCore::GraphicsContext::drawImage):
2204         * platform/graphics/GraphicsContext3D.h:
2205         * platform/graphics/GraphicsLayer.h:
2206         * platform/graphics/Icon.h:
2207         * platform/graphics/Image.cpp:
2208         (WebCore::Image::drawTiled):
2209         (WebCore::Image::computeIntrinsicDimensions):
2210         * platform/graphics/Image.h:
2211         * platform/graphics/IntPoint.h:
2212         * platform/graphics/IntRect.h:
2213         * platform/graphics/IntSize.h:
2214         * platform/graphics/MediaPlayer.cpp:
2215         (WebCore::MediaPlayer::isAvailable):
2216         (WebCore::MediaPlayer::volumeChanged):
2217         * platform/graphics/MediaPlayer.h:
2218         * platform/graphics/MediaPlayerPrivate.h:
2219         * platform/graphics/NamedImageGeneratedImage.cpp:
2220         (WebCore::NamedImageGeneratedImage::draw):
2221         * platform/graphics/StringTruncator.cpp:
2222         (WebCore::centerTruncateToBuffer):
2223         (WebCore::rightTruncateToBuffer):
2224         (WebCore::rightClipToWordBuffer):
2225         * platform/graphics/TextTrackRepresentation.cpp:
2226         * platform/graphics/avfoundation/InbandMetadataTextTrackPrivateAVF.cpp:
2227         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
2228         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.h:
2229         * platform/graphics/avfoundation/MediaPlaybackTargetMac.mm:
2230         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
2231         (WebCore::MediaPlayerPrivateAVFoundation::supportsFullscreen const):
2232         (WebCore::MediaPlayerPrivateAVFoundation::rateChanged):
2233         * platform/graphics/avfoundation/WebMediaSessionManagerMac.cpp:
2234         * platform/graphics/avfoundation/WebMediaSessionManagerMac.h:
2235         * platform/graphics/avfoundation/cf/InbandTextTrackPrivateLegacyAVCF.cpp:
2236         * platform/graphics/avfoundation/cf/InbandTextTrackPrivateLegacyAVCF.h:
2237         * platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.mm:
2238         (WebCore::CDMInstanceFairPlayStreamingAVFObjC::supportsPersistentKeys):
2239         * platform/graphics/avfoundation/objc/InbandTextTrackPrivateLegacyAVFObjC.h:
2240         * platform/graphics/avfoundation/objc/InbandTextTrackPrivateLegacyAVFObjC.mm:
2241         * platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.h:
2242         * platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm:
2243         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
2244         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2245         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerLayer):
2246         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL):
2247         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer):
2248         (WebCore::MediaPlayerPrivateAVFoundationObjC::setVideoFullscreenMode):
2249         (WebCore::MediaPlayerPrivateAVFoundationObjC::setVolume):
2250         (WebCore::MediaPlayerPrivateAVFoundationObjC::seekableTimeRangesLastModifiedTime const):
2251         (WebCore::MediaPlayerPrivateAVFoundationObjC::liveUpdateInterval const):
2252         (WebCore::MediaPlayerPrivateAVFoundationObjC::maximumDurationToCacheMediaTime const):
2253         (WebCore::MediaPlayerPrivateAVFoundationObjC::didPassCORSAccessCheck const):
2254         (WebCore::MediaPlayerPrivateAVFoundationObjC::wouldTaintOrigin const):
2255         (WebCore::MediaPlayerPrivateAVFoundationObjC::isCurrentPlaybackTargetWireless const):
2256         (WebCore::MediaPlayerPrivateAVFoundationObjC::wirelessPlaybackTargetType const):
2257         (WebCore::MediaPlayerPrivateAVFoundationObjC::wirelessPlaybackTargetName const):
2258         (WebCore::MediaPlayerPrivateAVFoundationObjC::updateDisableExternalPlayback):
2259         (WebCore::MediaPlayerPrivateAVFoundationObjC::setShouldDisableSleep):
2260         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
2261         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::supportsPictureInPicture const):
2262         * platform/graphics/avfoundation/objc/OutOfBandTextTrackPrivateAVF.h:
2263         * platform/graphics/ca/GraphicsLayerCA.cpp:
2264         (WebCore::GraphicsLayerCA::flushCompositingState):
2265         (WebCore::GraphicsLayerCA::computeVisibleAndCoverageRect const):
2266         (WebCore::GraphicsLayerCA::createTransformAnimationsFromKeyframes):
2267         * platform/graphics/ca/GraphicsLayerCA.h:
2268         * platform/graphics/ca/PlatformCALayer.h:
2269         * platform/graphics/ca/TileController.cpp:
2270         (WebCore::TileController::~TileController):
2271         (WebCore::TileController::adjustTileCoverageRect const):
2272         * platform/graphics/ca/TileController.h:
2273         * platform/graphics/ca/TileGrid.cpp:
2274         (WebCore::TileGrid::startedNewCohort):
2275         (WebCore::TileGrid::platformCALayerPaintContents):
2276         * platform/graphics/ca/TileGrid.h:
2277         * platform/graphics/ca/cocoa/LayerFlushSchedulerMac.cpp:
2278         (WebCore::currentRunLoop):
2279         * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
2280         (-[WebAnimationDelegate animationDidStart:]):
2281         (-[WebAnimationDelegate animationDidStop:finished:]):
2282         (WebCore::PlatformCALayerCocoa::setContentsScale):
2283         (WebCore::layerContentsFormat):
2284         (WebCore::PlatformCALayer::drawLayerContents):
2285         (WebCore::PlatformCALayerCocoa::backingStoreBytesPerPixel const):
2286         * platform/graphics/cg/GradientCG.cpp:
2287         (WebCore::Gradient::paint):
2288         * platform/graphics/cg/GraphicsContextCG.cpp:
2289         (WebCore::displayP3ColorSpaceRef):
2290         (WebCore::GraphicsContext::drawNativeImage):
2291         (WebCore::drawPatternCallback):
2292         (WebCore::GraphicsContext::drawPattern):
2293         (WebCore::GraphicsContext::drawLine):
2294         (WebCore::applyShadowOffsetWorkaroundIfNeeded):
2295         (WebCore::GraphicsContext::setURLForRect):
2296         * platform/graphics/cg/ImageBufferCG.cpp:
2297         (WebCore::jpegUTI):
2298         * platform/graphics/cg/ImageBufferDataCG.cpp:
2299         * platform/graphics/cg/ImageDecoderCG.cpp:
2300         (WebCore::ImageDecoderCG::createFrameImageAtIndex):
2301         * platform/graphics/cg/ImageSourceCGMac.mm:
2302         * platform/graphics/cg/PDFDocumentImage.cpp:
2303         * platform/graphics/cocoa/ColorCocoa.h:
2304         * platform/graphics/cocoa/ColorCocoa.mm:
2305         * platform/graphics/cocoa/FontCacheCoreText.cpp:
2306         (WebCore::FontCache::similarFont):
2307         (WebCore::computeNecessarySynthesis):
2308         (WebCore::FontDatabase::fontForPostScriptName):
2309         (WebCore::variationCapabilitiesForFontDescriptor):
2310         (WebCore::lookupFallbackFont):
2311         (WebCore::FontCache::systemFallbackForCharacters):
2312         (WebCore::FontCache::lastResortFallbackFont):
2313         * platform/graphics/cocoa/FontCascadeCocoa.mm:
2314         (WebCore::FontCascade::drawGlyphs):
2315         (WebCore::FontCascade::fontForCombiningCharacterSequence const):
2316         * platform/graphics/cocoa/FontCocoa.mm:
2317         (WebCore::Font::platformInit):
2318         (WebCore::Font::variantCapsSupportsCharacterForSynthesis const):
2319         (WebCore::Font::determinePitch):
2320         * platform/graphics/cocoa/FontDescriptionCocoa.cpp:
2321         (WebCore::FontCascadeDescription::effectiveFamilyCount const):
2322         (WebCore::FontCascadeDescription::effectiveFamilyAt const):
2323         * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
2324         (WebCore::FontPlatformData::FontPlatformData):
2325         (WebCore::cascadeToLastResortAndVariationsFontDescriptor):
2326         * platform/graphics/cocoa/GraphicsContext3DCocoa.mm:
2327         (WebCore::GraphicsContext3D::GraphicsContext3D):
2328         (WebCore::GraphicsContext3D::texImageIOSurface2D):
2329         * platform/graphics/cocoa/GraphicsContextCocoa.mm:
2330         * platform/graphics/cocoa/IOSurface.mm:
2331         (WebCore::optionsForBiplanarSurface):
2332         (WebCore::optionsFor32BitSurface):
2333         (WebCore::IOSurface::maximumSize):
2334         (WebCore::IOSurface::surfaceID const):
2335         * platform/graphics/cocoa/SystemFontDatabaseCoreText.cpp:
2336         (WebCore::SystemFontDatabaseCoreText::cascadeList):
2337         * platform/graphics/cocoa/TextTrackRepresentationCocoa.h:
2338         * platform/graphics/cocoa/TextTrackRepresentationCocoa.mm:
2339         (-[WebCoreTextTrackRepresentationCocoaHelper observeValueForKeyPath:ofObject:change:context:]):
2340         * platform/graphics/cocoa/WebMetalLayer.h:
2341         * platform/graphics/cv/ImageTransferSessionVT.mm:
2342         (WebCore::cvPixelFormatOpenGLKey):
2343         (WebCore::ImageTransferSessionVT::ImageTransferSessionVT):
2344         * platform/graphics/cv/VideoTextureCopierCV.h:
2345         * platform/graphics/ios/DisplayRefreshMonitorIOS.h:
2346         * platform/graphics/ios/DisplayRefreshMonitorIOS.mm:
2347         * platform/graphics/ios/FontAntialiasingStateSaver.h:
2348         (WebCore::FontAntialiasingStateSaver::FontAntialiasingStateSaver):
2349         (WebCore::FontAntialiasingStateSaver::setup):
2350         (WebCore::FontAntialiasingStateSaver::restore):
2351         * platform/graphics/ios/FontCacheIOS.mm:
2352         * platform/graphics/ios/IconIOS.mm:
2353         * platform/graphics/mac/ComplexTextControllerCoreText.mm:
2354         (WebCore::ComplexTextController::collectComplexTextRunsForCharacters):
2355         * platform/graphics/mac/FloatPointMac.mm:
2356         * platform/graphics/mac/FloatRectMac.mm:
2357         * platform/graphics/mac/FloatSizeMac.mm:
2358         * platform/graphics/mac/FontCustomPlatformData.cpp:
2359         (WebCore::createFontCustomPlatformData):
2360         * platform/graphics/mac/ImageMac.mm:
2361         * platform/graphics/mac/IntPointMac.mm:
2362         * platform/graphics/mac/IntRectMac.mm:
2363         * platform/graphics/mac/IntSizeMac.mm:
2364         * platform/graphics/mac/WebKitNSImageExtras.h:
2365         * platform/graphics/mac/WebKitNSImageExtras.mm:
2366         * platform/graphics/mac/WebLayer.mm:
2367         (-[WebSimpleLayer display]):
2368         (-[WebSimpleLayer drawInContext:]):
2369         * platform/graphics/opengl/Extensions3DOpenGL.cpp:
2370         (WebCore::Extensions3DOpenGL::supportsExtension):
2371         * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
2372         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
2373         * platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp:
2374         * platform/graphics/transforms/TransformationMatrix.cpp:
2375         (WebCore::TransformationMatrix::multiply):
2376         * platform/graphics/transforms/TransformationMatrix.h:
2377         * platform/ios/CursorIOS.cpp:
2378         * platform/ios/Device.cpp:
2379         * platform/ios/Device.h:
2380         * platform/ios/DeviceMotionClientIOS.h:
2381         * platform/ios/DeviceMotionClientIOS.mm:
2382         (WebCore::DeviceMotionClientIOS::motionChanged):
2383         * platform/ios/DeviceOrientationClientIOS.h:
2384         * platform/ios/DeviceOrientationClientIOS.mm:
2385         (WebCore::DeviceOrientationClientIOS::orientationChanged):
2386         * platform/ios/DragImageIOS.mm:
2387         * platform/ios/EventLoopIOS.mm:
2388         * platform/ios/KeyEventIOS.mm:
2389         * platform/ios/LegacyTileCache.h:
2390         * platform/ios/LegacyTileCache.mm:
2391         * platform/ios/LegacyTileGrid.h:
2392         * platform/ios/LegacyTileGrid.mm:
2393         * platform/ios/LegacyTileGridTile.h:
2394         * platform/ios/LegacyTileGridTile.mm:
2395         * platform/ios/LegacyTileLayer.h:
2396         * platform/ios/LegacyTileLayer.mm:
2397         * platform/ios/LegacyTileLayerPool.h:
2398         * platform/ios/LegacyTileLayerPool.mm:
2399         * platform/ios/LowPowerModeNotifierIOS.mm:
2400         * platform/ios/PasteboardIOS.mm:
2401         * platform/ios/PlatformEventFactoryIOS.h:
2402         * platform/ios/PlatformEventFactoryIOS.mm:
2403         * platform/ios/PlatformPasteboardIOS.mm:
2404         * platform/ios/PlatformScreenIOS.mm:
2405         * platform/ios/PlatformSpeechSynthesizerIOS.mm:
2406         * platform/ios/PlaybackSessionInterfaceAVKit.h:
2407         * platform/ios/PlaybackSessionInterfaceAVKit.mm:
2408         * platform/ios/RemoteCommandListenerIOS.h:
2409         * platform/ios/RemoteCommandListenerIOS.mm:
2410         * platform/ios/SSLKeyGeneratorIOS.cpp:
2411         * platform/ios/ScrollAnimatorIOS.h:
2412         * platform/ios/ScrollAnimatorIOS.mm:
2413         * platform/ios/ScrollViewIOS.mm:
2414         (WebCore::ScrollView::platformSetContentsSize):
2415         * platform/ios/ScrollbarThemeIOS.h:
2416         * platform/ios/ScrollbarThemeIOS.mm:
2417         * platform/ios/SystemMemoryIOS.cpp:
2418         (WebCore::systemMemoryLevel):
2419         * platform/ios/ThemeIOS.h:
2420         * platform/ios/ThemeIOS.mm:
2421         * platform/ios/TileControllerMemoryHandlerIOS.cpp:
2422         * platform/ios/TileControllerMemoryHandlerIOS.h:
2423         * platform/ios/UserAgentIOS.mm:
2424         (WebCore::deviceNameForUserAgent):
2425         * platform/ios/ValidationBubbleIOS.mm:
2426         * platform/ios/VideoFullscreenInterfaceAVKit.h:
2427         * platform/ios/VideoFullscreenInterfaceAVKit.mm:
2428         (WebCore::supportsPictureInPicture):
2429         * platform/ios/WebAVPlayerController.h:
2430         * platform/ios/WebAVPlayerController.mm:
2431         * platform/ios/WebBackgroundTaskController.h:
2432         * platform/ios/WebBackgroundTaskController.mm:
2433         * platform/ios/WebCoreMotionManager.h:
2434         * platform/ios/WebCoreMotionManager.mm:
2435         * platform/ios/WebEvent.h:
2436         * platform/ios/WebEvent.mm:
2437         * platform/ios/WebSQLiteDatabaseTrackerClient.h:
2438         * platform/ios/WebSQLiteDatabaseTrackerClient.mm:
2439         * platform/ios/WebVideoFullscreenControllerAVKit.h:
2440         * platform/ios/WebVideoFullscreenControllerAVKit.mm:
2441         (VideoFullscreenControllerContext::requestUpdateInlineRect):
2442         (VideoFullscreenControllerContext::requestVideoContentLayer):
2443         (VideoFullscreenControllerContext::returnVideoContentLayer):
2444         (VideoFullscreenControllerContext::didSetupFullscreen):
2445         (VideoFullscreenControllerContext::didExitFullscreen):
2446         * platform/ios/WidgetIOS.mm:
2447         * platform/ios/wak/FloatingPointEnvironment.cpp:
2448         * platform/ios/wak/FloatingPointEnvironment.h:
2449         * platform/ios/wak/WAKAppKitStubs.m:
2450         * platform/ios/wak/WAKClipView.m:
2451         * platform/ios/wak/WAKResponder.m:
2452         * platform/ios/wak/WAKScrollView.mm:
2453         * platform/ios/wak/WAKView.mm:
2454         * platform/ios/wak/WAKWindow.mm:
2455         * platform/ios/wak/WKContentObservation.cpp:
2456         * platform/ios/wak/WKGraphics.mm:
2457         * platform/ios/wak/WKUtilities.c:
2458         * platform/ios/wak/WKView.mm:
2459         * platform/ios/wak/WebCoreThread.mm:
2460         * platform/ios/wak/WebCoreThreadRun.cpp:
2461         * platform/ios/wak/WebCoreThreadSystemInterface.cpp:
2462         * platform/mac/DragDataMac.mm:
2463         (WebCore::rtfPasteboardType):
2464         (WebCore::rtfdPasteboardType):
2465         (WebCore::stringPasteboardType):
2466         (WebCore::urlPasteboardType):
2467         (WebCore::htmlPasteboardType):
2468         (WebCore::colorPasteboardType):
2469         (WebCore::pdfPasteboardType):
2470         (WebCore::tiffPasteboardType):
2471         (WebCore::DragData::containsURL const):
2472         * platform/mac/MediaRemoteSoftLink.cpp:
2473         * platform/mac/MediaRemoteSoftLink.h:
2474         * platform/mac/SuddenTermination.mm:
2475         * platform/mac/WebCoreFullScreenPlaceholderView.mm:
2476         * platform/mac/WebCoreFullScreenWarningView.h:
2477         * platform/mac/WebCoreFullScreenWarningView.mm:
2478         * platform/mac/WebCoreFullScreenWindow.h:
2479         * platform/mac/WebCoreFullScreenWindow.mm:
2480         * platform/mac/WebNSAttributedStringExtras.mm:
2481         * platform/mediastream/RealtimeMediaSourceFactory.h:
2482         * platform/mediastream/RealtimeVideoSource.cpp:
2483         (WebCore::RealtimeVideoSource::~RealtimeVideoSource):
2484         (WebCore::RealtimeVideoSource::prepareToProduceData):
2485         * platform/mediastream/ios/AVAudioSessionCaptureDevice.h:
2486         * platform/mediastream/ios/AVAudioSessionCaptureDevice.mm:
2487         * platform/mediastream/ios/AVAudioSessionCaptureDeviceManager.h:
2488         * platform/mediastream/ios/AVAudioSessionCaptureDeviceManager.mm:
2489         * platform/mediastream/ios/CoreAudioCaptureSourceIOS.h:
2490         * platform/mediastream/ios/CoreAudioCaptureSourceIOS.mm:
2491         * platform/mediastream/libwebrtc/LibWebRTCMacros.h:
2492         * platform/mediastream/mac/AVCaptureDeviceManager.mm:
2493         (WebCore::deviceIsAvailable):
2494         * platform/mediastream/mac/AVMediaCaptureSource.mm:
2495         (WebCore::AVMediaCaptureSource::AVMediaCaptureSource):
2496         (WebCore::AVMediaCaptureSource::stopProducingData):
2497         (-[WebCoreAVMediaCaptureSourceObserver addNotificationObservers]):
2498         (-[WebCoreAVMediaCaptureSourceObserver removeNotificationObservers]):
2499         * platform/mediastream/mac/AVVideoCaptureSource.mm:
2500         (WebCore::AVVideoCaptureSource::AVVideoCaptureSource):
2501         (WebCore::AVVideoCaptureSource::~AVVideoCaptureSource):
2502         (WebCore::AVVideoCaptureSource::stopProducingData):
2503         (WebCore::AVVideoCaptureSource::prefersPreset):
2504         (WebCore::sensorOrientation):
2505         (WebCore::AVVideoCaptureSource::setupCaptureSession):
2506         (WebCore::AVVideoCaptureSource::monitorOrientation):
2507         (-[WebCoreAVVideoCaptureSourceObserver addNotificationObservers]):
2508         (-[WebCoreAVVideoCaptureSourceObserver removeNotificationObservers]):
2509         * platform/mediastream/mac/AudioTrackPrivateMediaStreamCocoa.cpp:
2510         (WebCore::AudioTrackPrivateMediaStreamCocoa::createAudioUnit):
2511         * platform/mediastream/mac/CoreAudioCaptureSource.cpp:
2512         (WebCore::CoreAudioSharedUnit::setupAudioUnit):
2513         (WebCore::CoreAudioCaptureSource::create):
2514         (WebCore::CoreAudioCaptureSource::CoreAudioCaptureSource):
2515         (WebCore::CoreAudioCaptureSource::~CoreAudioCaptureSource):
2516         (WebCore::CoreAudioCaptureSource::startProducingData):
2517         * platform/mediastream/mac/CoreAudioCaptureSource.h:
2518         * platform/mediastream/mac/DisplayCaptureSourceCocoa.cpp:
2519         (WebCore::DisplayCaptureSourceCocoa::~DisplayCaptureSourceCocoa):
2520         (WebCore::DisplayCaptureSourceCocoa::startProducingData):
2521         * platform/mediastream/mac/RealtimeIncomingVideoSourceCocoa.mm:
2522         (WebCore::RealtimeIncomingVideoSourceCocoa::pixelBufferPool):
2523         * platform/mediastream/mac/RealtimeMediaSourceCenterMac.cpp:
2524         * platform/mock/MediaPlaybackTargetMock.cpp:
2525         * platform/mock/MediaPlaybackTargetMock.h:
2526         * platform/mock/MediaPlaybackTargetPickerMock.cpp:
2527         * platform/mock/MediaPlaybackTargetPickerMock.h:
2528         * platform/mock/MockRealtimeAudioSource.cpp:
2529         (WebCore::MockRealtimeAudioSource::~MockRealtimeAudioSource):
2530         (WebCore::MockRealtimeAudioSource::startProducingData):
2531         * platform/mock/MockRealtimeMediaSourceCenter.cpp:
2532         * platform/mock/MockRealtimeVideoSource.cpp:
2533         * platform/network/CredentialStorage.cpp:
2534         * platform/network/NetworkStateNotifier.h:
2535         * platform/network/ResourceHandle.cpp:
2536         (WebCore::builtinResourceHandleConstructorMap):
2537         * platform/network/ResourceHandle.h:
2538         * platform/network/ResourceHandleClient.h:
2539         * platform/network/ResourceRequestBase.cpp:
2540         * platform/network/ResourceRequestBase.h:
2541         * platform/network/cf/DNSResolveQueueCFNet.cpp:
2542         * platform/network/cf/ProxyServerCFNet.cpp:
2543         * platform/network/cf/ResourceHandleCFNet.cpp:
2544         (WebCore::ResourceHandle::createCFURLConnection):
2545         * platform/network/cf/ResourceRequest.h:
2546         (WebCore::ResourceRequest::resourcePrioritiesEnabled):
2547         * platform/network/cf/ResourceRequestCFNet.cpp:
2548         (WebCore::ResourceRequest::doUpdatePlatformRequest):
2549         (WebCore::ResourceRequest::doUpdateResourceRequest):
2550         * platform/network/cf/SocketStreamHandleImplCFNet.cpp:
2551         (WebCore::callbacksRunLoop):
2552         (WebCore::copyCONNECTProxyResponse):
2553         * platform/network/cocoa/CookieCocoa.mm:
2554         (WebCore::Cookie::operator NSHTTPCookie * _Nullable  const):
2555         * platform/network/cocoa/NetworkStorageSessionCocoa.mm:
2556         (WebCore::cookiesForURL):
2557         (WebCore::setHTTPCookiesForURL):
2558         * platform/network/cocoa/ResourceRequestCocoa.mm:
2559         (WebCore::ResourceRequest::doUpdateResourceRequest):
2560         (WebCore::ResourceRequest::doUpdatePlatformRequest):
2561         * platform/network/ios/NetworkStateNotifierIOS.mm:
2562         * platform/network/ios/WebCoreURLResponseIOS.h:
2563         * platform/network/ios/WebCoreURLResponseIOS.mm:
2564         * platform/network/mac/ResourceErrorMac.mm:
2565         * platform/network/mac/ResourceHandleMac.mm:
2566         (WebCore::ResourceHandle::createNSURLConnection):
2567         (WebCore::ResourceHandle::start):
2568         (WebCore::ResourceHandle::platformLoadResourceSynchronously):
2569         (WebCore::ResourceHandle::didReceiveAuthenticationChallenge):
2570         * platform/network/mac/UTIUtilities.mm:
2571         * platform/sql/SQLiteDatabase.h:
2572         (WebCore::SQLiteDatabase::sqlite3Handle const):
2573         * platform/sql/SQLiteFileSystem.cpp:
2574         * platform/sql/SQLiteFileSystem.h:
2575         * platform/sql/SQLiteTransaction.cpp:
2576         (WebCore::SQLiteTransaction::begin):
2577         (WebCore::SQLiteTransaction::commit):
2578         (WebCore::SQLiteTransaction::rollback):
2579         (WebCore::SQLiteTransaction::stop):
2580         * platform/text/PlatformLocale.cpp:
2581         * platform/text/PlatformLocale.h:
2582         * platform/text/ios/LocalizedDateCache.h:
2583         * platform/text/ios/LocalizedDateCache.mm:
2584         * platform/text/ios/TextEncodingRegistryIOS.mm:
2585         * platform/text/mac/LocaleMac.h:
2586         * platform/text/mac/LocaleMac.mm:
2587         * plugins/PluginViewBase.h:
2588         * rendering/InlineTextBox.cpp:
2589         (WebCore::InlineTextBox::paintPlatformDocumentMarker):
2590         (WebCore::InlineTextBox::resolveStyleForMarkedText):
2591         (WebCore::InlineTextBox::collectMarkedTextsForDocumentMarkers):
2592         * rendering/MarkedText.h:
2593         * rendering/RenderBlock.cpp:
2594         (WebCore::RenderBlock::paint):
2595         * rendering/RenderBox.cpp:
2596         (WebCore::RenderBox::paintBoxDecorations):
2597         (WebCore::allowMinMaxPercentagesInAutoHeightBlocksQuirk):
2598         * rendering/RenderBoxModelObject.cpp:
2599         (WebCore::RenderBoxModelObject::decodingModeForImageDraw const):
2600         * rendering/RenderButton.cpp:
2601         * rendering/RenderButton.h:
2602         * rendering/RenderElement.cpp:
2603         (WebCore::RenderElement::styleWillChange):
2604         (WebCore::RenderElement::styleDidChange):
2605         * rendering/RenderEmbeddedObject.cpp:
2606         (WebCore::RenderEmbeddedObject::allowsAcceleratedCompositing const):
2607         (WebCore::RenderEmbeddedObject::setPluginUnavailabilityReason):
2608         (WebCore::RenderEmbeddedObject::setPluginUnavailabilityReasonWithDescription):
2609         * rendering/RenderFileUploadControl.cpp:
2610         (WebCore::RenderFileUploadControl::maxFilenameWidth const):
2611         (WebCore::RenderFileUploadControl::paintObject):
2612         * rendering/RenderFrameSet.cpp:
2613         (WebCore::RenderFrameSet::positionFrames):
2614         * rendering/RenderIFrame.h:
2615         * rendering/RenderImage.cpp:
2616         (WebCore::RenderImage::paintAreaElementFocusRing):
2617         * rendering/RenderImage.h:
2618         * rendering/RenderInline.cpp:
2619         * rendering/RenderInline.h:
2620         * rendering/RenderLayer.cpp:
2621         (WebCore::RenderLayer::RenderLayer):
2622         (WebCore::canCreateStackingContext):
2623         (WebCore::RenderLayer::canUseAcceleratedTouchScrolling const):
2624         (WebCore::RenderLayer::scrollTo):
2625         (WebCore::RenderLayer::scrollRectToVisible):
2626         (WebCore::RenderLayer::updateScrollInfoAfterLayout):
2627         (WebCore::RenderLayer::showsOverflowControls const):
2628         (WebCore::RenderLayer::calculateClipRects const):
2629         * rendering/RenderLayer.h:
2630         * rendering/RenderLayerBacking.cpp:
2631         (WebCore::RenderLayerBacking::createPrimaryGraphicsLayer):
2632         (WebCore::RenderLayerBacking::shouldClipCompositedBounds const):
2633         (WebCore::RenderLayerBacking::updateConfiguration):
2634         (WebCore::RenderLayerBacking::computeParentGraphicsLayerRect const):
2635         (WebCore::RenderLayerBacking::updateGeometry):
2636         (WebCore::RenderLayerBacking::paintsIntoWindow const):
2637         (WebCore::RenderLayerBacking::setContentsNeedDisplayInRect):
2638         (WebCore::RenderLayerBacking::paintIntoLayer):
2639         * rendering/RenderLayerBacking.h:
2640         * rendering/RenderLayerCompositor.cpp:
2641         (WebCore::RenderLayerCompositor::visibleRectForLayerFlushing const):
2642         (WebCore::RenderLayerCompositor::flushPendingLayerChanges):
2643         (WebCore::RenderLayerCompositor::updateCustomLayersAfterFlush):
2644         (WebCore::RenderLayerCompositor::didFlushChangesForLayer):
2645         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
2646         (WebCore::RenderLayerCompositor::setIsInWindow):
2647         (WebCore::RenderLayerCompositor::requiresCompositingForScrollableFrame const):
2648         (WebCore::RenderLayerCompositor::isAsyncScrollableStickyLayer const):
2649         (WebCore::RenderLayerCompositor::requiresCompositingForOverflowScrolling const):
2650         (WebCore::RenderLayerCompositor::contentsScaleMultiplierForNewTiles const):
2651         (WebCore::RenderLayerCompositor::ensureRootLayer):
2652         (WebCore::RenderLayerCompositor::computeStickyViewportConstraints const):
2653         (WebCore::RenderLayerCompositor::willRemoveScrollingLayerWithBacking):
2654         (WebCore::RenderLayerCompositor::didAddScrollingLayer):
2655         * rendering/RenderLayerCompositor.h:
2656         * rendering/RenderLayerModelObject.cpp:
2657         (WebCore::RenderLayerModelObject::shouldPlaceBlockDirectionScrollbarOnLeft const):
2658         * rendering/RenderLineBreak.cpp:
2659         * rendering/RenderLineBreak.h:
2660         * rendering/RenderMenuList.cpp:
2661         (WebCore::RenderMenuList::RenderMenuList):
2662         (WebCore::RenderMenuList::willBeDestroyed):
2663         (WebCore::RenderMenuList::adjustInnerStyle):
2664         (RenderMenuList::updateFromElement):
2665         (RenderMenuList::setTextFromOption):
2666         (RenderMenuList::hidePopup):
2667         (RenderMenuList::popupDidHide):
2668         * rendering/RenderMenuList.h:
2669         * rendering/RenderObject.cpp:
2670         (WebCore::RenderObject::shouldApplyCompositedContainerScrollsForRepaint):
2671         (WebCore::RenderObject::destroy):
2672         * rendering/RenderObject.h:
2673         * rendering/RenderSearchField.cpp:
2674         (WebCore::RenderSearchField::itemText const):
2675         * rendering/RenderText.cpp:
2676         (WebCore::RenderText::setRenderedText):
2677         * rendering/RenderText.h:
2678         * rendering/RenderTextControl.cpp:
2679         * rendering/RenderTextControl.h:
2680         * rendering/RenderTextControlMultiLine.cpp:
2681         (WebCore::RenderTextControlMultiLine::getAverageCharWidth):
2682         * rendering/RenderTextControlSingleLine.cpp:
2683         (WebCore::RenderTextControlSingleLine::layout):
2684         (WebCore::RenderTextControlSingleLine::getAverageCharWidth):
2685         (WebCore::RenderTextControlSingleLine::preferredContentLogicalWidth const):
2686         * rendering/RenderTextLineBoxes.cpp:
2687         (WebCore::lineDirectionPointFitsInBox):
2688         (WebCore::RenderTextLineBoxes::positionForPoint const):
2689         * rendering/RenderTheme.cpp:
2690         (WebCore::RenderTheme::paintBorderOnly):
2691         * rendering/RenderThemeIOS.h:
2692         * rendering/RenderThemeIOS.mm:
2693         (WebCore::arKitBundle):
2694         * rendering/RenderView.cpp:
2695         (WebCore::RenderView::availableLogicalHeight const):
2696         (WebCore::RenderView::clientLogicalWidthForFixedPosition const):
2697         (WebCore::RenderView::clientLogicalHeightForFixedPosition const):
2698         (WebCore::RenderView::repaintViewRectangle const):
2699         * rendering/RenderWidget.cpp:
2700         (WebCore::RenderWidget::willBeDestroyed):
2701         * rendering/RootInlineBox.cpp:
2702         (WebCore::RootInlineBox::selectionTop const):
2703         (WebCore::RootInlineBox::selectionBottom const):
2704         * rendering/style/RenderStyle.h:
2705         * rendering/style/StyleRareInheritedData.cpp:
2706         (WebCore::StyleRareInheritedData::StyleRareInheritedData):
2707         (WebCore::StyleRareInheritedData::operator== const):
2708         * rendering/style/StyleRareInheritedData.h:
2709         * rendering/updating/RenderTreeUpdater.cpp:
2710         (WebCore::RenderTreeUpdater::updateElementRenderer):
2711         * style/StyleResolveForDocument.cpp:
2712         (WebCore::Style::resolveForDocument):
2713         * testing/Internals.cpp:
2714         (WebCore::Internals::getCurrentCursorInfo):
2715         (WebCore::Internals::isSelectPopupVisible):
2716         (WebCore::Internals::setQuickLookPassword):
2717         * testing/Internals.mm:
2718         (WebCore::Internals::userPrefersReducedMotion const):
2719         * testing/js/WebCoreTestSupportPrefix.h:
2720         * workers/WorkerThread.cpp:
2721         (WebCore::WorkerThread::workerThread):
2722
2723 2018-10-18  Per Arne Vollan  <pvollan@apple.com>
2724
2725         [WebVTT] The TextTrackLoader parameter in TextTrackLoaderClient virtual methods should be a reference
2726         https://bugs.webkit.org/show_bug.cgi?id=190730
2727
2728         Reviewed by Chris Dumez.
2729
2730         No new tests. No change in behavior.
2731
2732         * html/track/LoadableTextTrack.cpp:
2733         (WebCore::LoadableTextTrack::newCuesAvailable):
2734         (WebCore::LoadableTextTrack::cueLoadingCompleted):
2735         (WebCore::LoadableTextTrack::newRegionsAvailable):
2736         * html/track/LoadableTextTrack.h:
2737         * loader/TextTrackLoader.cpp:
2738         (WebCore::TextTrackLoader::cueLoadTimerFired):
2739         (WebCore::TextTrackLoader::newRegionsParsed):
2740         * loader/TextTrackLoader.h:
2741
2742 2018-10-18  Alex Christensen  <achristensen@webkit.org>
2743
2744         Clean up FrameLoader two-state enums
2745         https://bugs.webkit.org/show_bug.cgi?id=190731
2746
2747         Reviewed by Chris Dumez.
2748
2749         This patch does three things:
2750         1. Add an overload to EnumTraits so we do not need to list out the valid values of boolean enum classes.
2751         The valid values are always 0 and 1.  This is used when decoding from IPC.
2752         2. Add a 2-state enum class for NewLoadInProgress instad of a bool so we can understand the code better.
2753         3. Begin passing LockBackForwardList to the UIProcess.  We will need it soon for PSON.
2754
2755         * history/CachedFrame.h:
2756         * loader/EmptyFrameLoaderClient.h:
2757         * loader/FrameLoader.cpp:
2758         (WebCore::FrameLoader::provisionalLoadStarted):
2759         (WebCore::FrameLoader::loadWithDocumentLoader):
2760         (WebCore::FrameLoader::commitProvisionalLoad):
2761         (WebCore::FrameLoader::clientRedirectCancelledOrFinished):
2762         (WebCore::FrameLoader::clientRedirected):
2763         (WebCore::FrameLoader::receivedMainResourceError):
2764         (WebCore::FrameLoader::continueLoadAfterNavigationPolicy):
2765         * loader/FrameLoader.h:
2766         * loader/FrameLoaderClient.h:
2767         * loader/FrameLoaderTypes.h:
2768         * loader/NavigationScheduler.cpp:
2769         (WebCore::ScheduledNavigation::didStopTimer):
2770         (WebCore::NavigationScheduler::cancel):
2771         * loader/NavigationScheduler.h:
2772         * platform/network/StoredCredentialsPolicy.h:
2773
2774 2018-10-18  Wenson Hsieh  <wenson_hsieh@apple.com>
2775
2776         [GTK] fast/css/pseudo-visited-background-color-on-input.html is failing since r237425
2777         https://bugs.webkit.org/show_bug.cgi?id=190712
2778
2779         Reviewed by Tim Horton.
2780
2781         Ensure that color inputs are enabled by default on GTK, and that color inputs have a `-webkit-appearance` of
2782         `color-well` by default. Fixes fast/css/pseudo-visited-background-color-on-input.html on GTK.
2783
2784         * page/RuntimeEnabledFeatures.cpp:
2785         (WebCore::RuntimeEnabledFeatures::RuntimeEnabledFeatures):
2786         * rendering/RenderTheme.cpp:
2787         (WebCore::RenderTheme::colorInputStyleSheet const):
2788         * rendering/RenderTheme.h:
2789         (WebCore::RenderTheme::platformUsesColorWellAppearance const):
2790         (WebCore::RenderTheme::platformColorInputStyleSheet const): Deleted.
2791
2792         Replace this with a platform hook that determines whether we want to use `-webkit-appearance: color-well;` by
2793         default for inputs of type color. For now, only iOS overrides this to return false; in the future, we should
2794         support `-webkit-appearance: color-well;` on iOS, and remove this platform hook entirely.
2795
2796         * rendering/RenderThemeIOS.h:
2797         * rendering/RenderThemeMac.h:
2798         * rendering/RenderThemeMac.mm:
2799         (WebCore::RenderThemeMac::platformColorInputStyleSheet const): Deleted.
2800
2801 2018-10-18  Youenn Fablet  <youenn@apple.com>
2802
2803         Handle MDNS resolution of candidates through libwebrtc directly
2804         https://bugs.webkit.org/show_bug.cgi?id=190681
2805
2806         Reviewed by Eric Carlson.
2807
2808         Remove the previous MDNS resolution mechanism.
2809         Instead, add support for the AsyncResolver mechanism added to libwebrtc.
2810         Covered by current mdns webrtc test that is unflaked.
2811
2812         * Modules/mediastream/PeerConnectionBackend.cpp:
2813         (WebCore::PeerConnectionBackend::addIceCandidate):
2814         * platform/mediastream/libwebrtc/LibWebRTCProvider.cpp:
2815         (WebCore::LibWebRTCProvider::createPeerConnection):
2816         * platform/mediastream/libwebrtc/LibWebRTCProvider.h:
2817         * testing/MockLibWebRTCPeerConnection.cpp:
2818         (WebCore::MockLibWebRTCPeerConnectionFactory::CreatePeerConnection):
2819         * testing/MockLibWebRTCPeerConnection.h:
2820
2821 2018-10-18  Ali Juma  <ajuma@chromium.org>
2822
2823         [IntersectionObserver] Factor out rect mapping and clipping logic from computeRectForRepaint
2824         https://bugs.webkit.org/show_bug.cgi?id=189833
2825
2826         Reviewed by Simon Fraser.
2827
2828         Factor out the rect mapping and clipping logic from computeRectForRepaint to a new
2829         computeVisibleRectInContainer method that computeRectForRepaint now calls. Make
2830         computeVisibleRectInContainer take a VisibleRectContext with options to use
2831         edge-inclusive intersection and to apply all clips and scrolls rather than only
2832         the clips and scrolls that are currently applied by the repaint logic. These
2833         options will be used by IntersectionObserver in a future patch.
2834
2835         No new tests, no change in behavior.
2836
2837         * platform/graphics/FloatRect.cpp:
2838         (WebCore::FloatRect::edgeInclusiveIntersect):
2839         * platform/graphics/FloatRect.h:
2840         * platform/graphics/LayoutRect.cpp:
2841         (WebCore::LayoutRect::edgeInclusiveIntersect):
2842         * platform/graphics/LayoutRect.h:
2843         * rendering/RenderBox.cpp:
2844         (WebCore::RenderBox::applyCachedClipAndScrollPosition const):
2845         (WebCore::RenderBox::computeVisibleRectUsingPaintOffset const):
2846         (WebCore::RenderBox::computeVisibleRectInContainer const):
2847         (WebCore::RenderBox::applyCachedClipAndScrollPositionForRepaint const): Deleted.
2848         (WebCore::RenderBox::shouldApplyClipAndScrollPositionForRepaint const): Deleted.
2849         The iOS-specific logic in this method has moved to RenderObject::shouldApplyCompositedContainerScrollsForRepaint.
2850         (WebCore::RenderBox::computeRectForRepaint const): Deleted.
2851         * rendering/RenderBox.h:
2852         (WebCore::RenderBox::computeRectForRepaint): Deleted.
2853         * rendering/RenderInline.cpp:
2854         (WebCore::RenderInline::clippedOverflowRectForRepaint const):
2855         (WebCore::RenderInline::computeVisibleRectUsingPaintOffset const):
2856         (WebCore::RenderInline::computeVisibleRectInContainer const):
2857         (WebCore::RenderInline::computeRectForRepaint const): Deleted.
2858         * rendering/RenderInline.h:
2859         (WebCore::RenderInline::computeRectForRepaint): Deleted.
2860         * rendering/RenderObject.cpp:
2861         (WebCore::RenderObject::shouldApplyCompositedContainerScrollsForRepaint):
2862         (WebCore::RenderObject::visibleRectContextForRepaint):
2863         (WebCore::RenderObject::computeRectForRepaint const):
2864         (WebCore::RenderObject::computeFloatRectForRepaint const):
2865         (WebCore::RenderObject::computeVisibleRectInContainer const):
2866         (WebCore::RenderObject::computeFloatVisibleRectInContainer const):
2867         * rendering/RenderObject.h:
2868         (WebCore::RenderObject::computeAbsoluteRepaintRect const):
2869         (WebCore::RenderObject::VisibleRectContext::VisibleRectContext):
2870         (WebCore::RenderObject::RepaintContext::RepaintContext): Deleted.
2871         (WebCore::RenderObject::computeRectForRepaint): Deleted.
2872         * rendering/RenderTableCell.cpp:
2873         (WebCore::RenderTableCell::computeVisibleRectInContainer const):
2874         (WebCore::RenderTableCell::computeRectForRepaint const): Deleted.
2875         * rendering/RenderTableCell.h:
2876         * rendering/RenderView.cpp:
2877         (WebCore::RenderView::computeVisibleRectInContainer const):
2878         (WebCore::RenderView::computeRectForRepaint const): Deleted.
2879         * rendering/RenderView.h:
2880         * rendering/svg/RenderSVGForeignObject.cpp:
2881         (WebCore::RenderSVGForeignObject::computeFloatVisibleRectInContainer const):
2882         (WebCore::RenderSVGForeignObject::computeVisibleRectInContainer const):
2883         (WebCore::RenderSVGForeignObject::computeFloatRectForRepaint const): Deleted.
2884         (WebCore::RenderSVGForeignObject::computeRectForRepaint const): Deleted.
2885         * rendering/svg/RenderSVGForeignObject.h:
2886         * rendering/svg/RenderSVGInline.cpp:
2887         (WebCore::RenderSVGInline::computeFloatVisibleRectInContainer const):
2888         (WebCore::RenderSVGInline::computeFloatRectForRepaint const): Deleted.
2889         * rendering/svg/RenderSVGInline.h:
2890         * rendering/svg/RenderSVGModelObject.cpp:
2891         (WebCore::RenderSVGModelObject::computeFloatVisibleRectInContainer const):
2892         (WebCore::RenderSVGModelObject::computeFloatRectForRepaint const): Deleted.
2893         * rendering/svg/RenderSVGModelObject.h:
2894         * rendering/svg/RenderSVGRoot.cpp:
2895         (WebCore::RenderSVGRoot::computeFloatVisibleRectInContainer const):
2896         (WebCore::RenderSVGRoot::computeFloatRectForRepaint const): Deleted.
2897         * rendering/svg/RenderSVGRoot.h:
2898         * rendering/svg/RenderSVGText.cpp:
2899         (WebCore::RenderSVGText::computeVisibleRectInContainer const):
2900         (WebCore::RenderSVGText::computeFloatVisibleRectInContainer const):
2901         (WebCore::RenderSVGText::computeRectForRepaint const): Deleted.
2902         (WebCore::RenderSVGText::computeFloatRectForRepaint const): Deleted.
2903         * rendering/svg/RenderSVGText.h:
2904         * rendering/svg/SVGRenderSupport.cpp:
2905         (WebCore::SVGRenderSupport::clippedOverflowRectForRepaint):
2906         (WebCore::SVGRenderSupport::computeFloatVisibleRectInContainer):
2907         (WebCore::SVGRenderSupport::computeFloatRectForRepaint): Deleted.
2908         * rendering/svg/SVGRenderSupport.h:
2909
2910 2018-10-17  Wenson Hsieh  <wenson_hsieh@apple.com>
2911
2912         Enable the datalist element by default on iOS and macOS
2913         https://bugs.webkit.org/show_bug.cgi?id=190594
2914         <rdar://problem/45281159>
2915
2916         Reviewed by Ryosuke Niwa and Tim Horton.
2917
2918         Rebaselined existing layout tests.
2919
2920         * Configurations/FeatureDefines.xcconfig:
2921         * bindings/js/WebCoreBuiltinNames.h:
2922         * css/CSSDefaultStyleSheets.cpp:
2923         (WebCore::CSSDefaultStyleSheets::ensureDefaultStyleSheetsForElement):
2924         * css/CSSDefaultStyleSheets.h:
2925         * css/InspectorCSSOMWrappers.cpp:
2926         (WebCore::InspectorCSSOMWrappers::collectDocumentWrappers):
2927         * css/html.css:
2928
2929         Remove color input and datalist style rules from the default UA stylesheet.
2930
2931         (input[type="color"]::-webkit-color-swatch-wrapper): Deleted.
2932         * html/HTMLDataListElement.idl:
2933
2934         Make HTMLDataListElement runtime-enabled.
2935
2936         * html/HTMLTagNames.in:
2937         * html/RangeInputType.cpp:
2938
2939         Make a slight adjustment here so that inputs of type range respect the list attribute. Fixes a few layout tests
2940         that add a datalist to an input of type range. See <https://bugs.webkit.org/show_bug.cgi?id=190613> for more
2941         details.
2942
2943         (WebCore::RangeInputType::shouldRespectListAttribute):
2944         * html/TextFieldInputType.cpp:
2945         (WebCore::TextFieldInputType::shouldRespectListAttribute):
2946         * page/RuntimeEnabledFeatures.h:
2947
2948         Add a runtime-enabled feature for the datalist element. Additionally, make the runtime-enabled feature for input
2949         type color false by default, so that it's off in WebKitLegacy.
2950
2951         (WebCore::RuntimeEnabledFeatures::dataListElementEnabled const):
2952         (WebCore::RuntimeEnabledFeatures::setDataListElementEnabled):
2953         * rendering/RenderTheme.cpp:
2954         (WebCore::RenderTheme::colorInputStyleSheet const):
2955
2956         Add new style-sheet hooks for datalist and input type color, so that style rules for color inputs and datalists
2957         can be added at runtime only if the feature is enabled. This ensures that in WebKitLegacy (or other ports where
2958         either or both elements are disabled), we don't still apply rules for datalist and input[type="color"]. Notably,
2959         this allows fallback content inside datalist elements to still work in WebKitLegacy (which would otherwise be
2960         hidden when using the default stylesheet since `display: none` is applied to datalist by default). This also
2961         prevents inputs of type color from having a smaller size, no outline, and the appearance of a color well on
2962         macOS.
2963
2964         (WebCore::RenderTheme::dataListStyleSheet const):
2965         * rendering/RenderTheme.h:
2966         (WebCore::RenderTheme::platformColorInputStyleSheet const):
2967         * rendering/RenderThemeMac.h:
2968         * rendering/RenderThemeMac.mm:
2969         (WebCore::RenderThemeMac::platformColorInputStyleSheet const):
2970
2971 2018-10-17  Justin Michaud  <justin_michaud@apple.com>
2972
2973         Parse paint() and store paint callbacks for CSS Painting API
2974         https://bugs.webkit.org/show_bug.cgi?id=190657
2975
2976         Reviewed by Dean Jackson.
2977
2978         Implement support for parsing paint() images in css, and store CSS paint callback objects in the paint definition map.
2979
2980         * Sources.txt:
2981         * WebCore.xcodeproj/project.pbxproj:
2982         * bindings/js/JSCSSPaintWorkletGlobalScopeCustom.cpp:
2983         (WebCore::JSCSSPaintWorkletGlobalScope::visitAdditionalChildren):
2984         (WebCore::JSCSSPaintWorkletGlobalScope::registerPaint):
2985         * css/CSSImageGeneratorValue.cpp:
2986         (WebCore::CSSImageGeneratorValue::image):
2987         (WebCore::CSSImageGeneratorValue::isFixedSize const):
2988         (WebCore::CSSImageGeneratorValue::fixedSize):
2989         (WebCore::CSSImageGeneratorValue::isPending const):
2990         (WebCore::CSSImageGeneratorValue::knownToBeOpaque const):
2991         (WebCore::CSSImageGeneratorValue::loadSubimages):
2992         * css/CSSPaintImageValue.cpp: Added.
2993         (WebCore::CSSPaintImageValue::customCSSText const):
2994         * css/CSSPaintImageValue.h: Added.
2995         * css/CSSPaintWorkletGlobalScope.h:
2996         * css/CSSPaintWorkletGlobalScope.idl:
2997         * css/CSSValue.cpp:
2998         (WebCore::CSSValue::equals const):
2999         (WebCore::CSSValue::cssText const):
3000         (WebCore::CSSValue::destroy):
3001         * css/CSSValue.h:
3002         (WebCore::CSSValue::isPaintImageValue const):
3003         * css/CSSValueKeywords.in:
3004         * css/parser/CSSPropertyParserHelpers.cpp:
3005         (WebCore::CSSPropertyParserHelpers::consumeCustomPaint):
3006         (WebCore::CSSPropertyParserHelpers::consumeGeneratedImage):
3007         (WebCore::CSSPropertyParserHelpers::isGeneratedImage):
3008         * platform/mediastream/mac/RealtimeVideoUtilities.h:
3009
3010 2018-10-17  Eric Carlson  <eric.carlson@apple.com>
3011
3012         [MediaStream] Consolidate all image conversion and resizing into one class
3013         https://bugs.webkit.org/show_bug.cgi?id=190519
3014         <rdar://problem/45224307>
3015
3016         Try to fix the iOSMac build after r237236.
3017
3018         * platform/graphics/cv/ImageTransferSessionVT.h:
3019         * platform/graphics/cv/ImageTransferSessionVT.mm:
3020
3021 2018-10-17  Justin Fan  <justin_fan@apple.com>
3022
3023         [WebGPU] Implement WebGPU bindings up through WebGPUDevice creation
3024         https://bugs.webkit.org/show_bug.cgi?id=190653
3025
3026         Reviewed by Dean Jackson.
3027
3028         Test: webgpu/webgpu-enabled.html
3029
3030         Add WebGPU Sketch bindings for window.webgpu, WebGPUAdapter, WebGPUAdapterDescriptor,
3031         and WebGPUDevice creation. Based off IDL commit version b6c61ee. 
3032         https://github.com/gpuweb/gpuweb/blob/master/design/sketch.webidl
3033
3034         * CMakeLists.txt:
3035         * DerivedSources.make:
3036         * Modules/webgpu/DOMWindowWebGPU.cpp: Added.
3037         (WebCore::DOMWindowWebGPU::DOMWindowWebGPU):
3038         (WebCore::DOMWindowWebGPU::supplementName):
3039         (WebCore::DOMWindowWebGPU::from):
3040         (WebCore::DOMWindowWebGPU::webgpu):
3041         (WebCore::DOMWindowWebGPU::webgpu const):
3042         * Modules/webgpu/DOMWindowWebGPU.h: Added.
3043         * Modules/webgpu/DOMWindowWebGPU.idl: Added.
3044         * Modules/webgpu/WebGPU.cpp: Added.
3045         (WebCore::WebGPU::create):
3046         (WebCore::WebGPU::requestAdapter const):
3047         * Modules/webgpu/WebGPU.h: Added.
3048         * Modules/webgpu/WebGPU.idl: Added.
3049         * Modules/webgpu/WebGPUAdapter.cpp: Added.
3050         (WebCore::WebGPUAdapter::create):
3051         (WebCore::WebGPUAdapter::WebGPUAdapter):
3052         (WebCore::WebGPUAdapter::createDevice):
3053         * Modules/webgpu/WebGPUAdapter.h: Added.
3054         * Modules/webgpu/WebGPUAdapter.idl: Added.
3055         * Modules/webgpu/WebGPUAdapterDescriptor.h: Added.
3056         * Modules/webgpu/WebGPUAdapterDescriptor.idl: Added.
3057         * Modules/webgpu/WebGPUDevice.cpp: Added.
3058         (WebCore::WebGPUDevice::create):
3059         (WebCore::WebGPUDevice::WebGPUDevice):
3060         * Modules/webgpu/WebGPUDevice.h: Added.
3061         (WebCore::WebGPUDevice::adapter const):
3062         * Modules/webgpu/WebGPUDevice.idl: Added.
3063         * Sources.txt:
3064         * WebCore.xcodeproj/project.pbxproj:
3065         * bindings/js/WebCoreBuiltinNames.h:
3066
3067 2018-10-17  Andy Estes  <aestes@apple.com>
3068
3069         [Apple Pay] Increment the API version to 5
3070         https://bugs.webkit.org/show_bug.cgi?id=190686
3071         <rdar://problem/45348523>
3072
3073         Reviewed by Simon Fraser.
3074
3075         Test: http/tests/ssl/applepay/ApplePaySessionV5.html
3076
3077         * testing/MockPaymentCoordinator.cpp:
3078         (WebCore::MockPaymentCoordinator::supportsVersion):
3079
3080 2018-10-17  Eric Carlson  <eric.carlson@apple.com>
3081
3082         [MediaStream] Consolidate all image conversion and resizing into one class
3083         https://bugs.webkit.org/show_bug.cgi?id=190519
3084         <rdar://problem/45224307>
3085
3086         Reviewed by Youenn Fablet.
3087
3088         No new tests, no functional change.
3089
3090         * SourcesCocoa.txt: Add ImageTransferSessionVT.
3091         * WebCore.xcodeproj/project.pbxproj: Ditto.
3092
3093         * platform/MediaSample.h:
3094         (WebCore::MediaSample::videoPixelFormat const): New.
3095
3096         * platform/cocoa/VideoToolboxSoftLink.cpp: Add new kVTPixelTransferProperty keys.
3097         * platform/cocoa/VideoToolboxSoftLink.h:
3098
3099         * platform/graphics/avfoundation/objc/MediaSampleAVFObjC.h:
3100         (WebCore::MediaSampleAVFObjC::create): Remove unimplemented variant.
3101         * platform/graphics/avfoundation/objc/MediaSampleAVFObjC.mm:
3102         (WebCore::MediaSampleAVFObjC::videoPixelFormat const): New.
3103
3104         * platform/graphics/cv/ImageTransferSessionVT.h: Added.
3105         (WebCore::ImageTransferSessionVT::create):
3106         * platform/graphics/cv/ImageTransferSessionVT.mm: Added.
3107         (WebCore::ImageTransferSessionVT::ImageTransferSessionVT):
3108         (WebCore::ImageTransferSessionVT::~ImageTransferSessionVT):
3109         (WebCore::ImageTransferSessionVT::setSize):
3110         (WebCore::ImageTransferSessionVT::createPixelBuffer):
3111         (WebCore::ImageTransferSessionVT::createCMSampleBuffer):
3112         (WebCore::roundUpToMacroblockMultiple):
3113         (WebCore::ImageTransferSessionVT::ioSurfacePixelBufferCreationOptions):
3114         (WebCore::ImageTransferSessionVT::createMediaSample):
3115
3116         * platform/graphics/cv/PixelBufferResizer.h: Removed.
3117         * platform/graphics/cv/PixelBufferResizer.mm: Removed.
3118
3119         * platform/mediastream/mac/AVVideoCaptureSource.h:
3120         * platform/mediastream/mac/AVVideoCaptureSource.mm:
3121         (WebCore::AVVideoCaptureSource::prefersPreset):
3122         (WebCore::AVVideoCaptureSource::captureOutputDidOutputSampleBufferFromConnection): Remove
3123         the resizing logic, it is handled by the base class.
3124
3125         * platform/mediastream/mac/DisplayCaptureSourceCocoa.cpp:
3126         (WebCore::DisplayCaptureSourceCocoa::capabilities):
3127         (WebCore::DisplayCaptureSourceCocoa::settingsDidChange):
3128         (WebCore::DisplayCaptureSourceCocoa::setIntrinsicSize):
3129         (WebCore::DisplayCaptureSourceCocoa::emitFrame): Remove resizing logic, just use a transfer
3130         session to create an image from the capture source native output format.
3131         (WebCore::DisplayCaptureSourceCocoa::sampleBufferFromPixelBuffer): Deleted.
3132         (WebCore::roundUpToMacroblockMultiple): Deleted.
3133         (WebCore::DisplayCaptureSourceCocoa::pixelBufferFromIOSurface): Deleted.
3134         * platform/mediastream/mac/DisplayCaptureSourceCocoa.h:
3135
3136         * platform/mediastream/mac/MockRealtimeVideoSourceMac.h:
3137         * platform/mediastream/mac/MockRealtimeVideoSourceMac.mm:
3138         (WebCore::MockRealtimeVideoSourceMac::updateSampleBuffer): Use image transfer session.
3139         (WebCore::MockRealtimeVideoSourceMac::CMSampleBufferFromPixelBuffer): Deleted.
3140         (WebCore::MockRealtimeVideoSourceMac::pixelBufferFromCGImage const): Deleted.
3141         (WebCore::MockRealtimeVideoSourceMac::setSizeAndFrameRateWithPreset): Deleted.
3142
3143         * platform/mediastream/mac/ScreenDisplayCaptureSourceMac.h:
3144         * platform/mediastream/mac/ScreenDisplayCaptureSourceMac.mm:
3145         (WebCore::ScreenDisplayCaptureSourceMac::createDisplayStream):
3146         (WebCore::ScreenDisplayCaptureSourceMac::generateFrame): Return the IOSurface directly.
3147
3148         * platform/mediastream/mac/WindowDisplayCaptureSourceMac.h:
3149         * platform/mediastream/mac/WindowDisplayCaptureSourceMac.mm:
3150         (WebCore::WindowDisplayCaptureSourceMac::generateFrame): Return the CGImage directly.
3151         (WebCore::WindowDisplayCaptureSourceMac::pixelBufferFromCGImage): Deleted.
3152
3153         * platform/mock/MockRealtimeVideoSource.cpp:
3154         (WebCore::MockRealtimeVideoSource::capabilities): Only the camera supports device ID.
3155         (WebCore::MockRealtimeVideoSource::settings): Ditto.
3156
3157 2018-10-17  Eric Carlson  <eric.carlson@apple.com>
3158
3159         [MediaStream] Clean up capture source factory management
3160         https://bugs.webkit.org/show_bug.cgi?id=190502
3161         <rdar://problem/45212447>
3162
3163         Reviewed by Youenn Fablet.
3164
3165         No new tests, no functional change.
3166
3167         * platform/mediastream/RealtimeMediaSourceCenter.cpp:
3168         (WebCore::RealtimeMediaSourceCenter::setAudioFactory):
3169         (WebCore::RealtimeMediaSourceCenter::unsetAudioFactory):
3170         (WebCore::RealtimeMediaSourceCenter::audioFactory):
3171         (WebCore::RealtimeMediaSourceCenter::setVideoFactory):
3172         (WebCore::RealtimeMediaSourceCenter::unsetVideoFactory):
3173         (WebCore::RealtimeMediaSourceCenter::videoFactory):
3174         (WebCore::RealtimeMediaSourceCenter::setDisplayCaptureFactory):
3175         (WebCore::RealtimeMediaSourceCenter::unsetDisplayCaptureFactory):
3176         (WebCore::RealtimeMediaSourceCenter::displayCaptureFactory):
3177         * platform/mediastream/RealtimeMediaSourceCenter.h:
3178         (WebCore::RealtimeMediaSourceCenter::setAudioFactory): Deleted.
3179         (WebCore::RealtimeMediaSourceCenter::unsetAudioFactory): Deleted.
3180         (): Deleted.
3181         * platform/mediastream/gstreamer/RealtimeMediaSourceCenterLibWebRTC.cpp:
3182         (WebCore::RealtimeMediaSourceCenterLibWebRTC::audioFactoryPrivate):
3183         (WebCore::RealtimeMediaSourceCenterLibWebRTC::videoFactoryPrivate):
3184         (WebCore::RealtimeMediaSourceCenterLibWebRTC::displayCaptureFactoryPrivate):
3185         (WebCore::RealtimeMediaSourceCenterLibWebRTC::audioCaptureSourceFactory): Deleted.
3186         (WebCore::RealtimeMediaSourceCenterLibWebRTC::audioFactory): Deleted.
3187         (WebCore::RealtimeMediaSourceCenterLibWebRTC::videoFactory): Deleted.
3188         (WebCore::RealtimeMediaSourceCenterLibWebRTC::displayCaptureFactory): Deleted.
3189         * platform/mediastream/gstreamer/RealtimeMediaSourceCenterLibWebRTC.h:
3190         * platform/mediastream/mac/RealtimeMediaSourceCenterMac.cpp:
3191         (WebCore::RealtimeMediaSourceCenterMac::audioFactoryPrivate):
3192         (WebCore::RealtimeMediaSourceCenterMac::videoFactoryPrivate):
3193         (WebCore::RealtimeMediaSourceCenterMac::displayCaptureFactoryPrivate):
3194         (WebCore::RealtimeMediaSourceCenterMac::videoCaptureSourceFactory): Deleted.
3195         (WebCore::RealtimeMediaSourceCenterMac::displayCaptureSourceFactory): Deleted.
3196         (WebCore::RealtimeMediaSourceCenterMac::audioCaptureSourceFactory): Deleted.
3197         (WebCore::RealtimeMediaSourceCenterMac::audioFactory): Deleted.
3198         (WebCore::RealtimeMediaSourceCenterMac::videoFactory): Deleted.
3199         (WebCore::RealtimeMediaSourceCenterMac::displayCaptureFactory): Deleted.
3200         * platform/mediastream/mac/RealtimeMediaSourceCenterMac.h:
3201         * platform/mock/MockRealtimeMediaSourceCenter.cpp:
3202         (WebCore::MockRealtimeMediaSourceCenter::audioFactoryPrivate):
3203         (WebCore::MockRealtimeMediaSourceCenter::videoFactoryPrivate):
3204         (WebCore::MockRealtimeMediaSourceCenter::displayCaptureFactoryPrivate):
3205         (WebCore::MockRealtimeMediaSourceCenter::audioFactory): Deleted.
3206         (WebCore::MockRealtimeMediaSourceCenter::videoFactory): Deleted.
3207         (WebCore::MockRealtimeMediaSourceCenter::displayCaptureFactory): Deleted.
3208         * platform/mock/MockRealtimeMediaSourceCenter.h:
3209
3210 2018-10-17  Alex Christensen  <achristensen@webkit.org>
3211
3212         BackForwardClient needs to be able to support UIProcess-only back/forward lists
3213         https://bugs.webkit.org/show_bug.cgi?id=190675
3214
3215         Reviewed by Chris Dumez.
3216
3217         Return a RefPtr<HistoryItem> instead of a HistoryItem so that we will be able to return a
3218         HistoryItem that has been created instead of a pointer to a HistoryItem that is owned by something else.
3219         Also use unsigned for the back and forward list counts because they can never be negative.
3220
3221         * history/BackForwardClient.h:
3222         * history/BackForwardController.cpp:
3223         (WebCore::BackForwardController::backItem):
3224         (WebCore::BackForwardController::currentItem):
3225         (WebCore::BackForwardController::forwardItem):
3226         (WebCore::BackForwardController::canGoBackOrForward const):
3227         (WebCore::BackForwardController::goBackOrForward):
3228         (WebCore::BackForwardController::goBack):
3229         (WebCore::BackForwardController::goForward):
3230         (WebCore::BackForwardController::count const):
3231         (WebCore::BackForwardController::backCount const):
3232         (WebCore::BackForwardController::forwardCount const):
3233         (WebCore::BackForwardController::itemAtIndex):
3234         * history/BackForwardController.h:
3235         (WebCore::BackForwardController::backItem): Deleted.
3236         (WebCore::BackForwardController::currentItem): Deleted.
3237         (WebCore::BackForwardController::forwardItem): Deleted.
3238         * loader/EmptyClients.cpp:
3239         * loader/NavigationScheduler.cpp:
3240         (WebCore::NavigationScheduler::scheduleHistoryNavigation):
3241
3242 2018-10-17  Antoine Quint  <graouts@apple.com>
3243
3244         [Web Animations] Do not create a DocumentTimeline to suspend or resume animations
3245         https://bugs.webkit.org/show_bug.cgi?id=190660
3246
3247         Reviewed by Dean Jackson.
3248
3249         We check that there is an existing timeline before trying to suspend or resume its animations, otherwise
3250         we're creating a DocumentTimeline when nothing requires for it to exist. We also have to check that we
3251         suspend animations when a DocumentTimeline is created while the page is not visible.
3252
3253         No new tests as there is no change in behavior here.
3254
3255         * animation/DocumentTimeline.cpp:
3256         (WebCore::DocumentTimeline::DocumentTimeline):
3257         * dom/Document.cpp:
3258         (WebCore::Document::didBecomeCurrentDocumentInFrame):
3259         (WebCore::Document::resume):
3260         * page/Frame.cpp:
3261         (WebCore::Frame::clearTimers):
3262         * page/Page.cpp:
3263         (WebCore::Page::setIsVisibleInternal):
3264         (WebCore::Page::hiddenPageCSSAnimationSuspensionStateChanged):
3265
3266 2018-10-17  Antti Koivisto  <antti@apple.com>
3267
3268         Tiling CSS gradients is slow
3269         https://bugs.webkit.org/show_bug.cgi?id=190615
3270
3271         Reviewed by Tim Horton.
3272
3273         Painting blocks the main thread on CG rendering queue to make a copy of the backing store.
3274
3275         * platform/graphics/BitmapImage.cpp:
3276         (WebCore::BitmapImage::drawPattern):
3277
3278         Also use sinkIntoImage for bitmap image pattern drawing.
3279
3280         * platform/graphics/GradientImage.cpp:
3281         (WebCore::GradientImage::drawPattern):
3282
3283         Sink the gradient into an Image after generating it. Unlike ImageBuffer, painting it doesn't involve inefficient copies.
3284         Previous isCompatibleWithContext test is replaced with an equivalent scale factor test.
3285
3286         * platform/graphics/GradientImage.h:
3287
3288 2018-10-17  Chris Dumez  <cdumez@apple.com>
3289
3290         Update more DOMWindow getters to return references instead of raw pointers
3291         https://bugs.webkit.org/show_bug.cgi?id=190654
3292
3293         Reviewed by Youenn Fablet.
3294
3295         Update more DOMWindow getters to return references instead of raw pointers, since they
3296         can no longer return null after recent refactoring.
3297
3298         * Modules/gamepad/GamepadManager.cpp:
3299         (WebCore::navigatorGamepadFromDOMWindow):
3300         * bindings/js/JSDOMWindowCustom.cpp:
3301         (WebCore::JSDOMWindow::heapSnapshot):
3302         * dom/Document.cpp:
3303         (WebCore::Document::location const):
3304         (WebCore::Document::dispatchPopstateEvent):
3305         * dom/Event.cpp:
3306         (WebCore::Event::timeStampForBindings const):
3307         * loader/DocumentThreadableLoader.cpp:
3308         (WebCore::DocumentThreadableLoader::loadRequest):
3309         * loader/ResourceTimingInformation.cpp:
3310         (WebCore::ResourceTimingInformation::addResourceTiming):
3311         * page/DOMWindow.cpp:
3312         (WebCore::DOMWindow::screen):
3313         (WebCore::DOMWindow::history):
3314         (WebCore::DOMWindow::crypto const):
3315         (WebCore::DOMWindow::locationbar):
3316         (WebCore::DOMWindow::menubar):
3317         (WebCore::DOMWindow::personalbar):
3318         (WebCore::DOMWindow::scrollbars):
3319         (WebCore::DOMWindow::statusbar):
3320         (WebCore::DOMWindow::toolbar):
3321         (WebCore::DOMWindow::applicationCache):
3322         (WebCore::DOMWindow::navigator):
3323         (WebCore::DOMWindow::performance const):
3324         (WebCore::DOMWindow::nowTimestamp const):
3325         (WebCore::DOMWindow::location):
3326         (WebCore::DOMWindow::visualViewport):
3327         (WebCore::DOMWindow::styleMedia):
3328         * page/DOMWindow.h:
3329         * page/FrameView.cpp:
3330         (WebCore::FrameView::updateLayoutViewport):
3331         * page/History.cpp:
3332         (WebCore::History::stateObjectAdded):
3333         * page/IntersectionObserver.cpp:
3334         (WebCore::IntersectionObserver::createTimestamp const):
3335         * page/PerformanceObserver.cpp:
3336         (WebCore::PerformanceObserver::PerformanceObserver):
3337         * platform/cocoa/VideoFullscreenModelVideoElement.mm:
3338         (WebCore::VideoFullscreenModelVideoElement::requestFullscreenMode):
3339
3340 2018-10-17  Chris Fleizach  <cfleizach@apple.com>
3341
3342         AX: Certain tags should identify their context to iOS API
3343         https://bugs.webkit.org/show_bug.cgi?id=190622
3344         <rdar://problem/45308194>
3345
3346         Reviewed by Zalan Bujtas.
3347
3348         Convey the semantic meaning of <code> tag to the iOS API so VoiceOver can make use of it.
3349
3350         Tests: accessibility/ios-simulator/text-context-attributes.html
3351
3352         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
3353         (-[WebAccessibilityObjectWrapper accessibilityTextualContext]):
3354         (AXAttributeStringSetStyle):
3355
3356 2018-10-17  Youenn Fablet  <youenn@apple.com>
3357
3358         Remove unused code from RealtimeOutgoingVideoSourceCocoa
3359         https://bugs.webkit.org/show_bug.cgi?id=190666
3360
3361         Reviewed by Eric Carlson.
3362
3363         No change of behavior, removed no longer used code.
3364
3365         * platform/mediastream/mac/RealtimeOutgoingVideoSourceCocoa.cpp:
3366         (): Deleted.
3367
3368 2018-10-17  Ali Juma  <ajuma@chromium.org>
3369
3370         Flaky IntersectionObserver web platform tests involving style updates
3371         https://bugs.webkit.org/show_bug.cgi?id=189091
3372
3373         Reviewed by Simon Fraser.
3374
3375         Update intersection observations when flushing layers from the WebProcess
3376         to the UIProcess to make the timing of these updates more predictable, and
3377         more consistent with the IntersectionObserver spec, since the spec expects
3378         these updates to happen as part of the "Update the rendering" step in the
3379         HTML EventLoop.
3380
3381         Getting a similar approach to work with WK1 seems to add more complexity than it's
3382         worth, since flushes don't happen for scrolls handled by platform widgets, and
3383         flushes for other invalidations only happen when in compositing mode.
3384
3385         The only remaining timer-driven intersection observation update is for handling
3386         the initial observation on a newly added target, which needs to happen even if
3387         there are no changes triggering a flush.
3388
3389         Tested by the following tests no longer being flaky:
3390             imported/w3c/web-platform-tests/intersection-observer/bounding-box.html
3391             imported/w3c/web-platform-tests/intersection-observer/display-none.html
3392             imported/w3c/web-platform-tests/intersection-observer/containing-block.html
3393
3394         * dom/Document.cpp: