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