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