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