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