Web Inspector: Timelines: can't reliably stop/start a recording
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2019-04-11  Devin Rousso  <drousso@apple.com>
2
3         Web Inspector: Timelines: can't reliably stop/start a recording
4         https://bugs.webkit.org/show_bug.cgi?id=196778
5         <rdar://problem/47606798>
6
7         Reviewed by Timothy Hatcher.
8
9         * inspector/agents/InspectorTimelineAgent.cpp:
10         (WebCore::InspectorTimelineAgent::startProgrammaticCapture):
11         (WebCore::InspectorTimelineAgent::stopProgrammaticCapture):
12         It is possible to determine when programmatic capturing starts/stops in the frontend based
13         on the state when the backend causes the state to change, such as if the state is "inactive"
14         when the frontend is told that the backend has started capturing.
15
16         * inspector/agents/InspectorCPUProfilerAgent.cpp:
17         (WebCore::InspectorCPUProfilerAgent::stopTracking):
18         * inspector/agents/InspectorMemoryAgent.cpp:
19         (WebCore::InspectorMemoryAgent::stopTracking):
20         Send an end timestamp to match other instruments.
21
22 2019-04-11  Truitt Savell  <tsavell@apple.com>
23
24         Unreviewed, rolling out r244158.
25
26         Casued 8 inspector/timeline/ test failures.
27
28         Reverted changeset:
29
30         "Web Inspector: Timelines: can't reliably stop/start a
31         recording"
32         https://bugs.webkit.org/show_bug.cgi?id=196778
33         https://trac.webkit.org/changeset/244158
34
35 2019-04-11  Pablo Saavedra  <psaavedra@igalia.com>
36
37         [WPE] Build error with ENABLE_VIDEO=OFF after r244078
38         https://bugs.webkit.org/show_bug.cgi?id=196811
39
40         createGenericCue() is only defined when VIDEO_TRACK is enabled.
41
42         Reviewed by Eric Carlson.
43
44         * testing/Internals.cpp:
45         (WebCore::Internals::createGenericCue):
46         * testing/Internals.h:
47
48 2019-04-11  Carlos Garcia Campos  <cgarcia@igalia.com>
49
50         [GTK] Layout test accessibility/aria-hidden-false-works-in-subtrees.html fails after r184890
51         https://bugs.webkit.org/show_bug.cgi?id=146718
52         <rdar://problem/21722487>
53
54         Reviewed by Joanmarie Diggs.
55
56         Allow to get the text under element for nodes hidden in DOM but explicitly exposed to accessibility with
57         aria-hidden="false".
58
59         Fixes: accessibility/aria-hidden-false-works-in-subtrees.html
60
61         * accessibility/AccessibilityNodeObject.cpp:
62         (WebCore::AccessibilityNodeObject::textUnderElement const):
63         * accessibility/atk/WebKitAccessible.cpp:
64         (roleIsTextType): Also consider ApplicationGroup role as text elements, so that <div>text</div> is equivalent to
65         <div role="roup">test</div>.
66
67 2019-04-10  Said Abou-Hallawa  <sabouhallawa@apple.com>
68
69         requestAnimationFrame should execute before the next frame
70         https://bugs.webkit.org/show_bug.cgi?id=177484
71
72         Reviewed by Simon Fraser.
73
74         This change fixes these issues with animation timing:
75
76         1. Calling the requestAnimationFrame callbacks would have happened when
77            the DisplayLink fires. This may have happened even if the frame is
78            missed and no display is committed.
79
80         2. Style changes and layout triggered by script could trigger painting
81            at more than 60fps. CoreAnimation commits could happen at more than
82            60fps, although WindowServer will throttle those, and only some will
83            be shown on the screen.
84
85         This change introduces a new paint scheduling model where painting is
86         driven by a "RenderingUpdateScheduler", which only triggers paints once
87         per 16.7ms frame.
88
89         Code that previously scheduled a compositing layer flush now schedules a
90         "RenderingUpdate", and that update is driven by a DisplayRefreshMonitor
91         callback. When the render happens, we service requestAnimationFrame callbacks,
92         Web Animations, intersection observations and resize observations per the
93         "Update the rendering" step of the HTML Event Loop specification:
94         <https://html.spec.whatwg.org/multipage/webappapis.html#update-the-rendering>.
95
96         In the future, more rendering steps will be added to this code.
97
98         * Sources.txt:
99         * WebCore.xcodeproj/project.pbxproj:
100         * accessibility/mac/AXObjectCacheMac.mm:
101         (WebCore::AXObjectCache::platformHandleFocusedUIElementChanged):
102         Fix layout tests by adding null check.
103
104         * animation/DocumentAnimationScheduler.cpp: Removed.
105         * animation/DocumentAnimationScheduler.h: Removed.
106         * animation/DocumentTimeline.cpp:
107         (WebCore::DocumentTimeline::DocumentTimeline):
108         (WebCore::DocumentTimeline::updateThrottlingState):
109         (WebCore::DocumentTimeline::suspendAnimations):
110         (WebCore::DocumentTimeline::resumeAnimations):
111         (WebCore::DocumentTimeline::liveCurrentTime const):
112         (WebCore::DocumentTimeline::currentTime):
113         (WebCore::DocumentTimeline::cacheCurrentTime):
114         (WebCore::DocumentTimeline::animationTimingDidChange):
115         (WebCore::DocumentTimeline::scheduleAnimationResolution):
116         (WebCore::DocumentTimeline::unscheduleAnimationResolution):
117         (WebCore::DocumentTimeline::updateAnimationsAndSendEvents):
118         (WebCore::DocumentTimeline::internalUpdateAnimationsAndSendEvents):
119         (WebCore::DocumentTimeline::scheduleNextTick):
120         (WebCore::DocumentTimeline::updateListOfElementsWithRunningAcceleratedAnimationsForElement):
121         Simplify this function by handling the case of no-animations separately.
122
123         (WebCore::DocumentTimeline::resolveAnimationsForElement):
124         Simplify the loop and delete hasPendingAcceleratedAnimations because it
125         is initialized to true and is not changed inside the loop.
126
127         (WebCore::DocumentTimeline::scheduleAnimationResolutionIfNeeded): Deleted.
128         (WebCore::DocumentTimeline::animationResolutionTimerFired): Deleted.
129         * animation/DocumentTimeline.h:
130         * dom/Document.cpp:
131         (WebCore::Document::resolveStyle):
132         There is no need to force update in resolveStyle(). notifyFlushRequired()
133         will be called eventually which will scheduleRenderingUpdate().
134
135         (WebCore::Document::prepareForDestruction):
136         (WebCore::Document::updateAnimationsAndSendEvents):
137         (WebCore::Document::serviceRequestAnimationFrameCallbacks):
138         (WebCore::Document::windowScreenDidChange):
139         (WebCore::Document::scheduleRenderingUpdate):
140         (WebCore::Document::updateIntersectionObservations):
141         (WebCore::Document::addResizeObserver):
142         (WebCore::Document::updateResizeObservations):
143         (WebCore::Document::scheduleForcedIntersectionObservationUpdate): Deleted.
144         (WebCore::Document::scheduleResizeObservations): Deleted.
145         (WebCore::Document::animationScheduler): Deleted.
146         No need to schedule web-animations, intersection observations and resize
147         observations updates separately. All of them will be updated through the
148         "Update the rendering" step, i.e. Page::updateRendering().        
149
150         * dom/Document.h:
151         (WebCore::Document::numberOfIntersectionObservers const):
152         * dom/ScriptedAnimationController.cpp:
153         (WebCore::ScriptedAnimationController::serviceRequestAnimationFrameCallbacks):
154         (WebCore::ScriptedAnimationController::scheduleAnimation):
155         (WebCore::ScriptedAnimationController::animationTimerFired):
156         (WebCore::ScriptedAnimationController::serviceScriptedAnimations): Deleted.
157         (WebCore::ScriptedAnimationController::documentAnimationSchedulerDidFire): Deleted.
158         * dom/ScriptedAnimationController.h:
159         * page/FrameView.cpp:
160         (WebCore::FrameView::didLayout):
161         (WebCore::FrameView::viewportContentsChanged):
162         * page/FrameViewLayoutContext.cpp:
163         (WebCore::FrameViewLayoutContext::layoutTimerFired):
164         * page/IntersectionObserver.cpp:
165         (WebCore::IntersectionObserver::observe):
166         * page/Page.cpp:
167         (WebCore::Page::Page):
168         (WebCore::Page::layoutIfNeeded):
169         (WebCore::Page::updateRendering):
170         (WebCore::Page::renderingUpdateScheduler):
171         (WebCore::Page::willDisplayPage): Deleted.
172         (WebCore::Page::addDocumentNeedingIntersectionObservationUpdate): Deleted.
173         (WebCore::Page::updateIntersectionObservations): Deleted.
174         (WebCore::Page::scheduleForcedIntersectionObservationUpdate): Deleted.
175         (WebCore::Page::hasResizeObservers const): Deleted.
176         (WebCore::Page::gatherDocumentsNeedingResizeObservationCheck): Deleted.
177         (WebCore::Page::checkResizeObservations): Deleted.
178         (WebCore::Page::scheduleResizeObservations): Deleted.
179         (WebCore::Page::notifyResizeObservers): Deleted.
180         * page/Page.h:
181         (WebCore::Page::setNeedsCheckResizeObservations): Deleted.
182         (WebCore::Page::needsCheckResizeObservations const): Deleted.
183         The IntersectionObserver and the ResizeObserver do not need to schedule
184         their own timers. The RenderingUpdateScheduler will schedule the "Update
185         the rendering" step in which these obverses will be served.
186
187         * page/PageOverlayController.cpp:
188         (WebCore::PageOverlayController::didChangeViewExposedRect):
189         (WebCore::PageOverlayController::notifyFlushRequired):
190         Force committing the layers to be 60 fps at maximum.
191
192         * page/RenderingUpdateScheduler.cpp: Added.
193         (WebCore::RenderingUpdateScheduler::RenderingUpdateScheduler):
194         (WebCore::RenderingUpdateScheduler::scheduleRenderingUpdate):
195         (WebCore::RenderingUpdateScheduler::isScheduled const):
196         (WebCore::RenderingUpdateScheduler::startTimer):
197         (WebCore::RenderingUpdateScheduler::clearScheduled):
198         (WebCore::RenderingUpdateScheduler::createDisplayRefreshMonitor const):
199         (WebCore::RenderingUpdateScheduler::windowScreenDidChange):
200         (WebCore::RenderingUpdateScheduler::displayRefreshFired):
201         (WebCore::RenderingUpdateScheduler::scheduleCompositingLayerFlush):
202         * page/RenderingUpdateScheduler.h: Added.
203         (WebCore::RenderingUpdateScheduler::create):
204         * page/ResizeObserver.cpp:
205         (WebCore::ResizeObserver::observe):
206         (WebCore::ResizeObserver::scheduleObservations): Deleted.
207         * page/ResizeObserver.h:
208         (WebCore::ResizeObserver::hasActiveObservations const):
209         * page/ios/ContentChangeObserver.h:
210         * page/mac/ServicesOverlayController.mm:
211         (WebCore::ServicesOverlayController::Highlight::notifyFlushRequired):
212         * page/scrolling/ScrollingStateTree.cpp:
213         * rendering/RenderLayerCompositor.cpp:
214         (WebCore::RenderLayerCompositor::scheduleLayerFlushNow):
215         (WebCore::RenderLayerCompositor::layerTreeAsText):
216
217 2019-04-10  Ryosuke Niwa  <rniwa@webkit.org>
218
219         Nullptr crash in CompositeEditCommand::moveParagraphs when root editable element goes away
220         https://bugs.webkit.org/show_bug.cgi?id=193027
221
222         Reviewed by Wenson Hsieh.
223
224         Added an early exit when the root editable element (editing host in HTML5 spec terminology) is null
225         during CompositeEditCommand::moveParagraphs. This could happen when the website does something crazy
226         like removing contenteditable content attribute during DOM mutations or when the destination becomes
227         disconnected (orphaned) from the document due to bugs elsewhere in the codebase.
228
229         Test: editing/deleting/merge-paragraphs-null-root-editable-element-crash.html
230
231         * editing/CompositeEditCommand.cpp:
232         (WebCore::CompositeEditCommand::moveParagraphs): Added an early exit.
233
234 2019-04-10  Devin Rousso  <drousso@apple.com>
235
236         Web Inspector: save sheet should be anchored underneath the tab bar when detached
237         https://bugs.webkit.org/show_bug.cgi?id=196722
238         <rdar://problem/49613280>
239
240         Reviewed by Timothy Hatcher.
241
242         No web observable change.
243
244         * inspector/InspectorFrontendClient.h:
245         (WebCore::InspectorFrontendClient::changeSheetRect): Added.
246
247         * inspector/InspectorFrontendClientLocal.h:
248         * inspector/InspectorFrontendClientLocal.cpp:
249         (WebCore::InspectorFrontendClientLocal::changeSheetRect): Added.
250
251         * inspector/InspectorFrontendHost.idl:
252         * inspector/InspectorFrontendHost.h:
253         * inspector/InspectorFrontendHost.cpp:
254         (WebCore::InspectorFrontendHost::setSheetRect): Added.
255
256         * testing/Internals.cpp:
257         (WebCore::InspectorStubFrontend::setSheetRect): Added.
258
259 2019-04-10  Devin Rousso  <drousso@apple.com>
260
261         Web Inspector: Inspector: lazily create the agent
262         https://bugs.webkit.org/show_bug.cgi?id=195971
263         <rdar://problem/49039645>
264
265         Reviewed by Joseph Pecoraro.
266
267         No change in functionality.
268
269         * inspector/InspectorController.h:
270         * inspector/InspectorController.cpp:
271         (WebCore::InspectorController::InspectorController):
272         (WebCore::InspectorController::createLazyAgents):
273         (WebCore::InspectorController::evaluateForTestInFrontend):
274         (WebCore::InspectorController::ensureInspectorAgent):
275
276 2019-04-10  Megan Gardner  <megan_gardner@apple.com>
277
278         Remove unneeded extern C
279         https://bugs.webkit.org/show_bug.cgi?id=196786
280
281         Reviewed by Tim Horton.
282
283         No tests needed, just needs to compile.
284
285         Removing staging hack for Reveal framework.
286
287         * editing/cocoa/DictionaryLookup.mm:
288
289 2019-04-10  Devin Rousso  <drousso@apple.com>
290
291         Web Inspector: REGRESSION: lazy agents used outside of frontend/instrumentation can be accessed before being created
292         https://bugs.webkit.org/show_bug.cgi?id=196725
293         <rdar://problem/49669810>
294
295         Reviewed by Timothy Hatcher.
296
297         Move the logic for creating the `InspectorPageAgent` and `InspectorDOMAgent` into separate
298         functions so that callers into `InspectorController` can be guaranteed to have a valid
299         instance of the agent.
300
301         This doesn't interfere with the `Page.enable` command, as it doesn't clear any saved state.
302         There is no `DOM.enable` command, so there's no issue there either.
303
304         * inspector/InspectorController.h:
305         (WebCore::InspectorController::pageAgent): Deleted.
306         * inspector/InspectorController.cpp:
307         (WebCore::InspectorController::createLazyAgents):
308         (WebCore::InspectorController::inspect):
309         (WebCore::InspectorController::hideHighlight):
310         (WebCore::InspectorController::ensureDOMAgent): Added.
311         (WebCore::InspectorController::ensurePageAgent): Added.
312
313         * inspector/InspectorFrontendClientLocal.cpp:
314         (WebCore::InspectorFrontendClientLocal::showMainResourceForFrame):
315
316 2019-04-10  Alex Christensen  <achristensen@webkit.org>
317
318         Add SPI WKNavigationResponse._downloadAttribute
319         https://bugs.webkit.org/show_bug.cgi?id=196755
320         <rdar://49587365>
321
322         Reviewed by Brady Eidson.
323
324         Covered by an API test that validates the attribute is correctly sent through the FrameLoader to the API.
325         When a user clicks on a link with a download attribute, the download attribute should be used as the suggested filename sometimes.
326         The application needs this information after it has received the response in order to make fully informed decisions about downloads.
327         In order to get this attribute to the decidePolicyForNavigationResponse, we need to store the attribute on the DocumentLoader
328         from the FrameLoadRequest then send it from the DocumentLoader when the response is received.
329
330         * loader/DocumentLoader.h:
331         (WebCore::DocumentLoader::setDownloadAttribute):
332         (WebCore::DocumentLoader::downloadAttribute const):
333         * loader/EmptyFrameLoaderClient.h:
334         * loader/FrameLoader.cpp:
335         (WebCore::FrameLoader::checkContentPolicy):
336         (WebCore::FrameLoader::loadURL):
337         (WebCore::FrameLoader::loadWithNavigationAction):
338         (WebCore::FrameLoader::loadPostRequest):
339         * loader/FrameLoader.h:
340         (WebCore::FrameLoader::loadWithNavigationAction):
341         * loader/FrameLoaderClient.h:
342
343 2019-04-10  Youenn Fablet  <youenn@apple.com>
344
345         SWClientConnection should not double hop to fire some events
346         https://bugs.webkit.org/show_bug.cgi?id=196735
347
348         Reviewed by Alex Christensen.
349
350         Some events, like postMessage in service workers is hopping from main thread to service worker thread to dispatch events.
351         Some other events, like service worker state update, are hopping from main thread to service worker thread, then posting a task to dispatch events.
352         This may create ordering problems.
353
354         To fix the issue, we now hop to the service worker thread and dispatch the events.
355         In addition, for documents, we post a task and do the whole service worker processing in it.
356         This ensures that some tests, like whether there is a service worker container,
357         or creation of a service worker are done consistently.
358
359         Covered by unflaked test.
360
361         * workers/service/SWClientConnection.cpp:
362         (WebCore::SWClientConnection::updateRegistrationState):
363         (WebCore::SWClientConnection::updateWorkerState):
364         (WebCore::SWClientConnection::fireUpdateFoundEvent):
365         (WebCore::SWClientConnection::notifyClientsOfControllerChange):
366         * workers/service/ServiceWorker.cpp:
367         (WebCore::ServiceWorker::updateState):
368         * workers/service/ServiceWorker.h:
369         * workers/service/ServiceWorkerContainer.cpp:
370         (WebCore::ServiceWorkerContainer::updateRegistrationState):
371         (WebCore::ServiceWorkerContainer::fireUpdateFoundEvent):
372         (WebCore::ServiceWorkerContainer::fireControllerChangeEvent):
373         * workers/service/ServiceWorkerContainer.h:
374         * workers/service/ServiceWorkerJob.cpp:
375         (WebCore::ServiceWorkerJob::notifyFinished):
376         Notify of the script URL in the error message.
377         This will help diagnose flakiness issues.
378         * workers/service/ServiceWorkerRegistration.cpp:
379         (WebCore::ServiceWorkerRegistration::fireUpdateFoundEvent):
380         * workers/service/ServiceWorkerRegistration.h:
381
382 2019-04-10  Devin Rousso  <drousso@apple.com>
383
384         Web Inspector: Timelines: can't reliably stop/start a recording
385         https://bugs.webkit.org/show_bug.cgi?id=196778
386         <rdar://problem/47606798>
387
388         Reviewed by Timothy Hatcher.
389
390         * inspector/agents/InspectorTimelineAgent.cpp:
391         (WebCore::InspectorTimelineAgent::startProgrammaticCapture):
392         (WebCore::InspectorTimelineAgent::stopProgrammaticCapture):
393         It is possible to determine when programmatic capturing starts/stops in the frontend based
394         on the state when the backend causes the state to change, such as if the state is "inactive"
395         when the frontend is told that the backend has started capturing.
396
397         * inspector/agents/InspectorCPUProfilerAgent.cpp:
398         (WebCore::InspectorCPUProfilerAgent::stopTracking):
399         * inspector/agents/InspectorMemoryAgent.cpp:
400         (WebCore::InspectorMemoryAgent::stopTracking):
401         Send an end timestamp to match other instruments.
402
403 2019-04-10  Tim Horton  <timothy_horton@apple.com>
404
405         Add modern API for overriding the page's specified viewport configuration
406         https://bugs.webkit.org/show_bug.cgi?id=167734
407         <rdar://problem/30331795>
408
409         Reviewed by Simon Fraser.
410
411         New API test: WebKit.OverrideViewportArguments
412
413         * dom/Document.cpp:
414         (WebCore::Document::updateViewportArguments):
415         * dom/Document.h:
416         (WebCore::Document::viewportArguments const):
417         Make the viewportArguments() getter respect the overridden arguments.
418
419         * dom/ViewportArguments.cpp:
420         (WebCore::numericPrefix):
421         (WebCore::findSizeValue):
422         (WebCore::findScaleValue):
423         (WebCore::findBooleanValue):
424         (WebCore::parseViewportFitValue):
425         (WebCore::viewportErrorMessage):
426         (WebCore::reportViewportWarning):
427         (WebCore::setViewportFeature):
428         * dom/ViewportArguments.h:
429         Make it possible to parse ViewportArguments without a Document, so
430         that it can be used in the UI process. We only used the Document for
431         two things: error reporting, and getting the state of one setting.
432         Refactor error handling to use a passed-arund function, and add a
433         variant of setViewportFeature() that doesn't take a Document.
434
435 2019-04-10  Justin Fan  <justin_fan@apple.com>
436
437         [Web GPU] Indexed drawing and GPUCommandEncoder crash prevention
438         https://bugs.webkit.org/show_bug.cgi?id=196758
439
440         Reviewed by Dean Jackson.
441
442         Test: webgpu/draw-indexed-triangles.html
443
444         Implement GPURenderPassEncoder::setIndexBuffer and GPURenderPassEncoder::drawIndexed to enable indexed drawing.
445         Disable GPUCommandEncoders with active pass encoders from being submitted or encoding blits. 
446
447         Prevent active GPUCommandEncoders from being submitted or encoding blit commands:
448         * Modules/webgpu/WebGPUCommandEncoder.cpp:
449         (WebCore::WebGPUCommandEncoder::finish):
450         * platform/graphics/gpu/cocoa/GPUCommandBufferMetal.mm:
451         (WebCore::GPUCommandBuffer::copyBufferToBuffer):
452         (WebCore::GPUCommandBuffer::copyBufferToTexture):
453         (WebCore::GPUCommandBuffer::copyTextureToBuffer):
454         (WebCore::GPUCommandBuffer::copyTextureToTexture):
455
456         Implement GPURenderPassEncoder::setIndexBuffer and GPURenderPassEncoder::drawIndexed:
457         * Modules/webgpu/WebGPURenderPassEncoder.cpp:
458         (WebCore::WebGPURenderPassEncoder::setIndexBuffer):
459         (WebCore::WebGPURenderPassEncoder::setVertexBuffers): Remove unnecessary move operations.
460         (WebCore::WebGPURenderPassEncoder::drawIndexed): Added.
461         * Modules/webgpu/WebGPURenderPassEncoder.h:
462         * Modules/webgpu/WebGPURenderPassEncoder.idl:
463         * platform/graphics/gpu/GPUBuffer.h:
464         (WebCore::GPUBuffer::isIndex const):
465         * platform/graphics/gpu/GPUInputStateDescriptor.h:
466         * platform/graphics/gpu/GPURenderPassEncoder.h: Cache the index buffer, as Metal does not set the index buffer separate from the draw call.
467         * platform/graphics/gpu/GPURenderPipeline.h:
468         (WebCore::GPURenderPipeline::indexFormat const):
469         * platform/graphics/gpu/cocoa/GPURenderPassEncoderMetal.mm:
470         (WebCore::GPURenderPassEncoder::setIndexBuffer):
471         (WebCore::GPURenderPassEncoder::setVertexBuffers):
472         (WebCore::mtlPrimitiveTypeForGPUPrimitiveTopology):
473         (WebCore::GPURenderPassEncoder::draw):
474         (WebCore::mtlIndexTypeForGPUIndexFormat): Added.
475         (WebCore::GPURenderPassEncoder::drawIndexed): Added.
476         (WebCore::primitiveTypeForGPUPrimitiveTopology): Deleted.
477         * platform/graphics/gpu/cocoa/GPURenderPipelineMetal.mm:
478         (WebCore::GPURenderPipeline::tryCreate):
479         (WebCore::GPURenderPipeline::GPURenderPipeline):
480
481 2019-04-09  Ryosuke Niwa  <rniwa@webkit.org>
482
483         OfflineAudioDestinationNode::startRendering leaks OfflineAudioDestinationNode if offlineRender exists early
484         https://bugs.webkit.org/show_bug.cgi?id=196759
485
486         Reviewed by Eric Carlson.
487
488         OfflineAudioDestinationNode::startRendering unconditionally ref's itself before invoking offlineRender() in a new thread.
489         But offlineRender can early exit without ever calling deref() in the main thread, leading to the leak of
490         OfflineAudioDestinationNode. Fixed the leak by always calling deref in the main thread after calling offlineRender().
491
492         Also removed the debug assertion in offlineRender which always hits when we run the relevant test.
493
494         Test: imported/w3c/web-platform-tests/webaudio/the-audio-api/the-offlineaudiocontext-interface/current-time-block-size.html
495
496         * Modules/webaudio/OfflineAudioDestinationNode.cpp:
497         (WebCore::OfflineAudioDestinationNode::startRendering):
498         (WebCore::OfflineAudioDestinationNode::offlineRender):
499         (WebCore::OfflineAudioDestinationNode::notifyComplete): Merged into startRendering.
500         * Modules/webaudio/OfflineAudioDestinationNode.h:
501
502 2019-04-10  Megan Gardner  <megan_gardner@apple.com>
503
504         Fix text autoscrolling when typing in modern webkit
505         https://bugs.webkit.org/show_bug.cgi?id=196718
506         <rdar://problem/49225507>
507
508         Reviewed by Tim Horton.
509
510         Tests: fast/events/autoscroll-when-input-is-offscreen.html
511                fast/events/autoscroll-with-software-keyboard.html
512
513         We have been relying on UIKit to scroll editable text, but
514         since we cannot give them enough information for them to always
515         do the right thing, we should just do all the work in WebKit.
516         This has the added benifit of fixing some tricky autoscrolling
517         bugs that have cropped up recently.
518
519         * editing/Editor.cpp:
520         (WebCore::Editor::insertTextWithoutSendingTextEvent):
521         (WebCore::Editor::revealSelectionAfterEditingOperation):
522         We should be scrolling the main frame in WebKit. We have been relying on UIKit,
523         but we cannot give them enough information to guarantee a correct scroll, so just
524         do all the work in WebKit.
525         * page/FrameView.cpp:
526         (WebCore::FrameView::unobscuredContentRectExpandedByContentInsets const):
527         Update to use the rect that is actually visible, accounting for the software keyboard.
528
529 2019-04-10  Ross Kirsling  <ross.kirsling@sony.com>
530
531         WebCore should build successfully even with -DENABLE_UNIFIED_BUILDS=OFF
532         https://bugs.webkit.org/show_bug.cgi?id=196762
533
534         Reviewed by Ryosuke Niwa.
535
536         * Modules/indexeddb/IDBCursor.h:
537         * Modules/indexeddb/client/IDBConnectionToServer.cpp:
538         * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.h:
539         * Modules/websockets/WebSocketFrame.cpp:
540         * accessibility/AccessibilityARIAGridRow.cpp:
541         (WebCore::AccessibilityARIAGridRow::parentTable const):
542         * accessibility/AccessibilityObject.cpp:
543         * accessibility/AccessibilityRenderObject.cpp:
544         * animation/CSSAnimation.cpp:
545         * animation/DeclarativeAnimation.cpp:
546         * bindings/js/DOMGCOutputConstraint.h:
547         * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
548         (WebCore::root):
549         (WebCore::JSCanvasRenderingContext2DOwner::isReachableFromOpaqueRoots):
550         (WebCore::JSCanvasRenderingContext2D::visitAdditionalChildren):
551         * bindings/js/JSDOMConvertNumbers.cpp:
552         * bindings/js/JSDOMWindowCustom.cpp:
553         * bindings/js/JSExtendableMessageEventCustom.cpp:
554         * bindings/js/SerializedScriptValue.cpp:
555         * css/CSSFontFaceSource.cpp:
556         * css/CSSFontFaceSource.h:
557         * css/MediaQueryMatcher.h:
558         * css/parser/CSSPropertyParserHelpers.cpp:
559         * dom/DocumentParser.cpp:
560         * dom/EventPath.cpp:
561         * dom/MouseEvent.h:
562         * dom/SpectreGadget.cpp:
563         * dom/SpectreGadget.h:
564         * editing/ChangeListTypeCommand.cpp:
565         * editing/EditAction.cpp:
566         * editing/ReplaceSelectionCommand.cpp:
567         * editing/TextGranularity.h:
568         * html/HTMLFormControlsCollection.cpp:
569         * html/HTMLImageElement.cpp:
570         * html/canvas/CanvasRenderingContext2DBase.cpp:
571         * inspector/InspectorController.cpp:
572         * inspector/agents/InspectorApplicationCacheAgent.cpp:
573         * inspector/agents/InspectorCanvasAgent.cpp:
574         * inspector/agents/WebHeapAgent.cpp:
575         * inspector/agents/page/PageAuditAgent.cpp:
576         * inspector/agents/page/PageConsoleAgent.cpp:
577         * inspector/agents/page/PageNetworkAgent.cpp:
578         * inspector/agents/worker/WorkerAuditAgent.cpp:
579         * loader/CrossOriginAccessControl.h:
580         * loader/CrossOriginPreflightResultCache.h:
581         * loader/NavigationAction.cpp:
582         * loader/ResourceLoadObserver.cpp:
583         * page/FrameTree.cpp:
584         * page/IntersectionObserver.cpp:
585         * page/PageConfiguration.cpp:
586         * page/PerformanceResourceTiming.cpp:
587         * page/ResizeObservation.cpp:
588         * page/UndoManager.cpp:
589         * plugins/PluginData.cpp:
590         * rendering/Grid.h:
591         * rendering/GridBaselineAlignment.cpp:
592         * rendering/GridBaselineAlignment.h:
593         * rendering/GridLayoutFunctions.cpp:
594         * rendering/GridLayoutFunctions.h:
595         * rendering/GridTrackSizingAlgorithm.h:
596         * rendering/RenderDeprecatedFlexibleBox.cpp:
597         * rendering/RenderFlexibleBox.cpp:
598         * rendering/RenderIFrame.cpp:
599         * rendering/RenderLayerFilters.cpp:
600         * rendering/TextDecorationPainter.cpp:
601         * rendering/TextDecorationPainter.h:
602         * rendering/TextPainter.cpp:
603         * rendering/TextPainter.h:
604         * rendering/style/StyleRareNonInheritedData.cpp:
605         * rendering/style/StyleRareNonInheritedData.h:
606         * rendering/svg/SVGRenderSupport.h:
607         * rendering/updating/RenderTreeBuilder.cpp:
608         * rendering/updating/RenderTreeBuilderSVG.cpp:
609         * style/InlineTextBoxStyle.cpp:
610         * style/InlineTextBoxStyle.h:
611         * style/StylePendingResources.cpp:
612         * svg/SVGMatrix.h:
613         * svg/SVGViewSpec.h:
614         * svg/SVGZoomAndPan.h:
615         * workers/WorkerScriptLoader.cpp:
616         * workers/WorkerScriptLoader.h:
617         * workers/service/ServiceWorker.cpp:
618         * workers/service/ServiceWorkerClientData.cpp:
619         * workers/service/ServiceWorkerClients.cpp:
620         * workers/service/ServiceWorkerClients.h:
621         * workers/service/ServiceWorkerGlobalScope.cpp:
622         * workers/service/ServiceWorkerJob.cpp:
623         * workers/service/ServiceWorkerProvider.cpp:
624         * workers/service/context/ServiceWorkerFetch.cpp:
625         * workers/service/context/ServiceWorkerInspectorProxy.h:
626         * workers/service/context/ServiceWorkerThread.cpp:
627         * workers/service/context/ServiceWorkerThreadProxy.cpp:
628         * workers/service/server/SWServerJobQueue.cpp:
629         * workers/service/server/SWServerToContextConnection.cpp:
630         * workers/service/server/SWServerWorker.cpp:
631         * workers/service/server/SWServerWorker.h:
632         * worklets/Worklet.h:
633
634 2019-04-10  Antoine Quint  <graouts@apple.com>
635
636         Enable Pointer Events on watchOS
637         https://bugs.webkit.org/show_bug.cgi?id=196771
638         <rdar://problem/49040909>
639
640         Reviewed by Dean Jackson.
641
642         * Configurations/FeatureDefines.xcconfig:
643
644 2019-04-10  Youenn Fablet  <youenn@apple.com>
645
646         Delay initialization of quota users until the first quota request
647         https://bugs.webkit.org/show_bug.cgi?id=196467
648
649         Reviewed by Chris Dumez.
650
651         Instead of triggering initialization of each user when being added,
652         delay initialization until the first call to requestSpace with a non zero task size.
653         This will make sure we do not load Cache API information in memory or check for
654         IDB space until actually necessary.
655
656         To implement that, move from a HashSet of being initialized users to a HashMap where the key is user and
657         the value is the user initialization state.
658
659         When removing a user, delay the call to processPendingRequest so that a synchronous call to addUser
660         can be taken into consideration.
661
662         This unflakes some Cache API tests as these tests do clear the Cache API and check for the clearing result.
663         Clearing the caches triggers a removeUser/addUser dance which then triggers initialization of the Caches structure.
664
665         Covered by existing tests.
666
667         * storage/StorageQuotaManager.cpp:
668         (WebCore::StorageQuotaManager::initializeUsersIfNeeded):
669         (WebCore::StorageQuotaManager::askUserToInitialize):
670         (WebCore::StorageQuotaManager::addUser):
671         (WebCore::StorageQuotaManager::requestSpace):
672         * storage/StorageQuotaManager.h:
673
674 2019-04-10  Philippe Normand  <pnormand@igalia.com>
675
676         there is no vp8 support in youtube.com/html5 page with libwebkit2gtk 2.24 (MSE enabled)
677         https://bugs.webkit.org/show_bug.cgi?id=196615
678
679         Reviewed by Xabier Rodriguez-Calvar.
680
681         Add vp8.0 and vp9.0 in supported mime-types if the corresponding video decoders are found.
682
683         No new tests, existing web-platform-tests cover this change.
684
685         * platform/graphics/gstreamer/GStreamerRegistryScanner.cpp:
686         (WebCore::GStreamerRegistryScanner::initialize):
687
688 2019-04-10  Philippe Normand  <pnormand@igalia.com>
689
690         [GStreamer] Adaptive streaming playback broken with GStreamer < 1.12
691         https://bugs.webkit.org/show_bug.cgi?id=196765
692
693         Reviewed by Xabier Rodriguez-Calvar.
694
695         Without the following patch in gst-plugins-bad, the uridownloader
696         doesn't relay need-context messages to its parent, so in our case
697         the player can't share its context with secondary webkitwebsrc
698         elements and a RELEASE_ASSERT is hit in the WebProcess.
699
700         So the workaround is to use again webkit+ protocol prefixes for
701         GStreamer versions older than 1.12.
702
703         https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/commit/8cf858fb27919e1d631223375f81b98055623733
704
705         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
706         (WebCore::convertToInternalProtocol):
707         (WebCore::MediaPlayerPrivateGStreamer::setPlaybinURL):
708         (WebCore::MediaPlayerPrivateGStreamer::loadFull):
709         (WebCore::MediaPlayerPrivateGStreamer::handleMessage):
710         (WebCore::MediaPlayerPrivateGStreamer::wouldTaintOrigin const):
711         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
712         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
713         (webKitWebSrcStart):
714         (webKitWebSrcGetProtocols):
715         (convertPlaybinURI):
716         (webKitWebSrcSetUri):
717         (CachedResourceStreamingClient::responseReceived):
718         (webKitSrcWouldTaintOrigin):
719         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.h:
720
721 2019-04-10  Carlos Garcia Campos  <cgarcia@igalia.com>
722
723         [ATK] Defer the emision of AtkObject::children-changed signal after layout is done
724         https://bugs.webkit.org/show_bug.cgi?id=187948
725
726         Reviewed by Michael Catanzaro.
727
728         The signal AtkObject::children-changed is emitted from AXObjectCache::attachWrapper() and
729         AXObjectCache::detachWrapper(). Both can be called in the middle of a layout, so we need to defer the emission
730         of the signal after the layout is done, to avoid other atk entry points from being called at that point, since
731         most of them update the backing store at the beginning.
732
733         Fixes: accessibility/children-changed-sends-notification.html
734
735         * accessibility/AXObjectCache.cpp:
736         (WebCore::AXObjectCache::performDeferredCacheUpdate): Call platformPerformDeferredCacheUpdate().
737         * accessibility/AXObjectCache.h:
738         * accessibility/atk/AXObjectCacheAtk.cpp:
739         (WebCore::wrapperParent): Helper to get the AtkObject parent of a given WebKitAccessible.
740         (WebCore::AXObjectCache::detachWrapper): Add wrapper to m_deferredDetachedWrapperList.
741         (WebCore::AXObjectCache::attachWrapper): Add object to m_deferredAttachedWrapperObjectList.
742         (WebCore::AXObjectCache::platformPerformDeferredCacheUpdate): Emit AtkObject::children-changed::add for objects
743         in m_deferredAttachedWrapperObjectList and AtkObject::children-changed::remove for wrappers in m_deferredDetachedWrapperList.
744         * accessibility/ios/AXObjectCacheIOS.mm:
745         (WebCore::AXObjectCache::platformPerformDeferredCacheUpdate):
746         * accessibility/mac/AXObjectCacheMac.mm:
747         (WebCore::AXObjectCache::platformPerformDeferredCacheUpdate):
748         * accessibility/win/AXObjectCacheWin.cpp:
749         (WebCore::AXObjectCache::platformPerformDeferredCacheUpdate):
750         * accessibility/wpe/AXObjectCacheWPE.cpp:
751         (WebCore::AXObjectCache::platformPerformDeferredCacheUpdate):
752
753 2019-04-10  Carlos Garcia Campos  <cgarcia@igalia.com>
754
755         [ATK] Test accessibility/insert-children-assert.html is crashing since added in r216980
756         https://bugs.webkit.org/show_bug.cgi?id=172281
757         <rdar://problem/37030990>
758
759         Reviewed by Joanmarie Diggs.
760
761         The crash happens because at some point the test tries to get the anonymous block text, getting the RenderText as
762         first child and RenderFullScreen as last child and the latter doesn't have a node. This is because in atk we do
763         things differently, we don't include the static text elements individually, but parent element uses
764         textUnderElement() to get all the pieces together. We can just turn the asserts into actual nullptr checks.
765
766         Fixes: accessibility/insert-children-assert.html
767
768         * accessibility/AccessibilityRenderObject.cpp:
769         (WebCore::AccessibilityRenderObject::textUnderElement const):
770
771 2019-04-09  Keith Rollin  <krollin@apple.com>
772
773         Unreviewed build maintenance -- update .xcfilelists.
774
775         * DerivedSources-input.xcfilelist:
776         * DerivedSources-output.xcfilelist:
777
778 2019-04-09  Zalan Bujtas  <zalan@apple.com>
779
780         [AutoSizing] Avoid making text paragraphs scroll horizontally when there is a wide table
781         https://bugs.webkit.org/show_bug.cgi?id=196743
782         <rdar://problem/43897551>
783
784         Reviewed by Tim Horton.
785
786         This patch changes the auto size behavior by using fixed constraint (instead of a min/max pair) to compute the content height.
787         Now with the initial containing block width is firmly set to auto-sizing width, the overflow content will not stretch the ICB. Instead it overflows the ICB
788         and triggers scrolling the same way the non-auto-sizing mode does.
789
790         * page/FrameView.cpp:
791         (WebCore::FrameView::autoSizeIfEnabled):
792         (WebCore::FrameView::enableAutoSizeMode):
793         * page/FrameView.h:
794         * testing/Internals.cpp:
795         (WebCore::Internals::enableAutoSizeMode):
796         * testing/Internals.h:
797         * testing/Internals.idl:
798
799 2019-04-09  Youenn Fablet  <youenn@apple.com>
800
801         Close service worker database on network process suspension
802         https://bugs.webkit.org/show_bug.cgi?id=196623
803         <rdar://problem/48930869>
804
805         Reviewed by Alex Christensen.
806
807         Add suspend/resume support to SWServer.
808         On suspend, close the service worker database and stop pushing for changes.
809         On resume, push changes if needed.
810
811         * workers/service/server/RegistrationDatabase.cpp:
812         (WebCore::RegistrationDatabase::close):
813         * workers/service/server/RegistrationDatabase.h:
814         (WebCore::RegistrationDatabase::isClosed const): Deleted.
815         * workers/service/server/RegistrationStore.cpp:
816         (WebCore::RegistrationStore::closeDatabase):
817         * workers/service/server/RegistrationStore.cpp:
818         (WebCore::RegistrationStore::pushChangesToDatabase):
819         (WebCore::RegistrationStore::clearAll):
820         (WebCore::RegistrationStore::startSuspension):
821         (WebCore::RegistrationStore::endSuspension):
822         * workers/service/server/RegistrationStore.h:
823         * workers/service/server/SWServer.cpp:
824         (WebCore::SWServer::startSuspension):
825         (WebCore::SWServer::endSuspension):
826         * workers/service/server/SWServer.h:
827
828 2019-04-09  Justin Fan  <justin_fan@apple.com>
829
830         [Web GPU] GPURenderPassEncoder updates: setBlendColor, setViewport, setScissorRect
831         https://bugs.webkit.org/show_bug.cgi?id=196719
832
833         Reviewed by Myles C. Maxfield.
834
835         Implement setBlendColor, setViewport, and setScissorRect for GPURenderPassEncoder.
836
837         Tests: webgpu/viewport-scissor-rect-triangle-strip.html, webgpu/blend-color-triangle-strip.html
838
839         * Modules/webgpu/WebGPURenderPassEncoder.cpp:
840         (WebCore::WebGPURenderPassEncoder::setBlendColor):
841         (WebCore::WebGPURenderPassEncoder::setViewport):
842         (WebCore::WebGPURenderPassEncoder::setScissorRect):
843         * Modules/webgpu/WebGPURenderPassEncoder.h:
844         * Modules/webgpu/WebGPURenderPassEncoder.idl:
845         * platform/graphics/gpu/GPURenderPassEncoder.h:
846         * platform/graphics/gpu/cocoa/GPURenderPassEncoderMetal.mm:
847         (WebCore::GPURenderPassEncoder::setBlendColor):
848         (WebCore::GPURenderPassEncoder::setViewport):
849         (WebCore::GPURenderPassEncoder::setScissorRect):
850
851 2019-04-09  Andy Estes  <aestes@apple.com>
852
853         [Apple Pay] Add release logging to PaymentCoordinator
854         https://bugs.webkit.org/show_bug.cgi?id=196738
855
856         Reviewed by Alex Christensen.
857
858         When allowed, log interactions with PaymentCoordinator to os_log to help diagnose Apple Pay bugs.
859
860         The following information might be logged: names of functions called, merchant API versions,
861         boolean results of canMakePayments(), boolean results of beginPaymentSession(), whether
862         completePaymentSession() was called with a final state result, boolean results of
863         shouldAllowApplePay(), whether a document has evaluated user agent scripts or is running
864         user scripts, and whether a client supports unrestricted Apple Pay.
865
866         * Modules/applepay/PaymentCoordinator.cpp:
867         (WebCore::PaymentCoordinator::supportsVersion const):
868         (WebCore::PaymentCoordinator::canMakePayments):
869         (WebCore::PaymentCoordinator::canMakePaymentsWithActiveCard):
870         (WebCore::PaymentCoordinator::openPaymentSetup):
871         (WebCore::PaymentCoordinator::beginPaymentSession):
872         (WebCore::PaymentCoordinator::completeMerchantValidation):
873         (WebCore::PaymentCoordinator::completeShippingMethodSelection):
874         (WebCore::PaymentCoordinator::completeShippingContactSelection):
875         (WebCore::PaymentCoordinator::completePaymentMethodSelection):
876         (WebCore::PaymentCoordinator::completePaymentSession):
877         (WebCore::PaymentCoordinator::abortPaymentSession):
878         (WebCore::PaymentCoordinator::cancelPaymentSession):
879         (WebCore::PaymentCoordinator::validateMerchant):
880         (WebCore::PaymentCoordinator::didAuthorizePayment):
881         (WebCore::PaymentCoordinator::didSelectPaymentMethod):
882         (WebCore::PaymentCoordinator::didSelectShippingMethod):
883         (WebCore::PaymentCoordinator::didSelectShippingContact):
884         (WebCore::PaymentCoordinator::didCancelPaymentSession):
885         (WebCore::PaymentCoordinator::shouldAllowApplePay const):
886         (WebCore::PaymentCoordinator::shouldAllowUserAgentScripts const):
887         * Modules/applepay/PaymentCoordinatorClient.h:
888         (WebCore::PaymentCoordinatorClient::isAlwaysOnLoggingAllowed const):
889         * platform/Logging.h:
890         * testing/MockPaymentCoordinator.h:
891
892 2019-04-09  John Wilander  <wilander@apple.com>
893
894         Pick up Ad Click Attribution conversions in NetworkResourceLoader::willSendRedirectedRequest()
895         https://bugs.webkit.org/show_bug.cgi?id=196558
896         <rdar://problem/47650245>
897
898         Reviewed by Youenn Fablet.
899
900         Tests: http/tests/adClickAttribution/attribution-conversion-through-cross-site-image-redirect.html
901                http/tests/adClickAttribution/attribution-conversion-through-image-redirect-with-priority.html
902                http/tests/adClickAttribution/attribution-conversion-through-image-redirect-without-priority.html
903
904         The existing API tests were expanded too.
905
906         * html/HTMLAnchorElement.cpp:
907         (WebCore::HTMLAnchorElement::parseAdClickAttribution const):
908            Enhanced the use of AdClickAttribution::MaxEntropy.
909         * loader/AdClickAttribution.cpp:
910         (WebCore::AdClickAttribution::parseConversionRequest):
911             New function to parse and validate URLs with a path starting with
912             /.well-known/ad-click-attribution/.
913         (WebCore::AdClickAttribution::toString const):
914             Added output for the conversion priority for testing purposes.
915         * loader/AdClickAttribution.h:
916         (WebCore::AdClickAttribution::Campaign::isValid const):
917         (WebCore::AdClickAttribution::Conversion::isValid const):
918            Enhanced the use of AdClickAttribution::MaxEntropy.
919
920 2019-04-09  Don Olmstead  <don.olmstead@sony.com>
921
922         [CMake] Apple builds should use ICU_INCLUDE_DIRS
923         https://bugs.webkit.org/show_bug.cgi?id=196720
924
925         Reviewed by Konstantin Tokarev.
926
927         * PlatformMac.cmake:
928
929 2019-04-09  Jer Noble  <jer.noble@apple.com>
930
931         Test for: 196095 Inband Text Track cues interspersed with Data cues can display out of order.
932         https://bugs.webkit.org/show_bug.cgi?id=196097
933
934         Reviewed by Eric Carlson.
935
936         Test: media/track/track-in-band-metadata-display-order.html
937
938         Add a method in Internals to create a TextTrackCueGeneric (which can normally only be created
939         by parsing an in-band media track). This requires adding IDL for TextTrackCueGeneric, and exporting
940         TextTrackCueGeneric for testing.
941
942         Drive-by fixes:
943
944         Add runtime logging to MediaControlTextTrackContainerElement. This necessitates modifying the
945         parentMediaElement() method to take a const Node*, and const_cast that constness away in order to return
946         a HTMLMediaElement*
947
948         TextTrackCue, VTTCue, TextTrackCueGeneric, and DataCue should all use the WTF TypeCasts macros to
949         enable use of is<> and downcast<>.
950
951         * Source/WebCore/CMakeLists.txt:
952         * DerivedSources-input.xcfilelist:
953         * DerivedSources-output.xcfilelist:
954         * DerivedSources.make:
955         * WebCore.xcodeproj/project.pbxproj:
956         * Sources.txt:
957         * html/shadow/MediaControlElementTypes.cpp:
958         (WebCore::parentMediaElement):
959         * html/shadow/MediaControlElementTypes.h:
960         * html/shadow/MediaControlElements.cpp:
961         (WebCore::MediaControlTextTrackContainerElement::updateDisplay):
962         (WebCore::MediaControlTextTrackContainerElement::logger const):
963         (WebCore::MediaControlTextTrackContainerElement::logIdentifier const):
964         (WebCore::MediaControlTextTrackContainerElement::logChannel const):
965         * html/shadow/MediaControlElements.h:
966         * html/track/DataCue.h:
967         (isType):
968         * html/track/TextTrackCueGeneric.h:
969         (isType):
970         * html/track/TextTrackCueGeneric.idl: Added.
971         * html/track/VTTCue.h:
972         (isType):
973         * testing/Internals.cpp:
974         (WebCore::Internals::createGenericCue):
975         * testing/Internals.h:
976         * testing/Internals.idl:
977
978 2019-04-09  Sihui Liu  <sihui_liu@apple.com>
979
980         Remove unnecessary network process assertion for IDB close
981         https://bugs.webkit.org/show_bug.cgi?id=196693
982
983         Reviewed by Geoffrey Garen.
984
985         We already took assertion at WebCore::SQLiteDatabase::close.
986
987         * Modules/indexeddb/server/IDBServer.cpp:
988         (WebCore::IDBServer::IDBServer::create):
989         (WebCore::IDBServer::IDBServer::IDBServer):
990         (WebCore::IDBServer::m_quotaManagerGetter): Deleted.
991         (WebCore::IDBServer::IDBServer::closeDatabase): Deleted.
992         (WebCore::IDBServer::IDBServer::didCloseDatabase): Deleted.
993         * Modules/indexeddb/server/IDBServer.h:
994         (WebCore::IDBServer::IDBServer::create): Deleted.
995         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
996         (WebCore::IDBServer::UniqueIDBDatabase::performCurrentDeleteOperation):
997         (WebCore::IDBServer::UniqueIDBDatabase::scheduleShutdownForClose):
998         (WebCore::IDBServer::UniqueIDBDatabase::didShutdownForClose):
999         (WebCore::IDBServer::UniqueIDBDatabase::didDeleteBackingStore):
1000         (WebCore::IDBServer::UniqueIDBDatabase::immediateCloseForUserDelete):
1001         (WebCore::IDBServer::UniqueIDBDatabase::notifyServerAboutClose): Deleted.
1002         * Modules/indexeddb/server/UniqueIDBDatabase.h:
1003
1004 2019-04-09  Eike Rathke  <erack@redhat.com>
1005
1006         Initialize trackTypeAsString for call to GST_INFO_OBJECT() in TrackType::Text
1007         https://bugs.webkit.org/show_bug.cgi?id=196350
1008
1009         Reviewed by Xabier Rodriguez-Calvar.
1010
1011         trackTypeAsString was uninitialized in the
1012         TrackPrivateBaseGStreamer::TrackType::Text case when calling
1013         GST_INFO_OBJECT().
1014
1015         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1016         (WebCore::MediaPlayerPrivateGStreamer::enableTrack):
1017
1018 2019-04-09  Carlos Garcia Campos  <cgarcia@igalia.com>
1019
1020         [ATK] Cleanup WebKitAccessibleHyperlink
1021         https://bugs.webkit.org/show_bug.cgi?id=196602
1022
1023         Reviewed by Michael Catanzaro.
1024
1025         Cleanups:
1026
1027          - Rename webkitAccessibleHyperlinkNew() as webkitAccessibleHyperlinkGetOrCreate() and move the code to get/set
1028            the object data here.
1029          - Use WEBKIT_DEFINE_TYPE instead of custom type registration. This ensures that all CStrings used in private
1030            struct are no longer leaked.
1031          - Remove all confusing core() functions and simply use webkitAccessibleGetAccessibilityObject().
1032          - Use nullptr instead of 0 and other coding style issues.
1033
1034         * accessibility/atk/WebKitAccessibleHyperlink.cpp:
1035         (webkitAccessibleHyperlinkActionDoAction):
1036         (webkitAccessibleHyperlinkActionGetNActions):
1037         (webkitAccessibleHyperlinkActionGetDescription):
1038         (webkitAccessibleHyperlinkActionGetKeybinding):
1039         (webkitAccessibleHyperlinkActionGetName):
1040         (atk_action_interface_init):
1041         (webkitAccessibleHyperlinkGetURI):
1042         (webkitAccessibleHyperlinkGetObject):
1043         (rangeLengthForObject):
1044         (webkitAccessibleHyperlinkGetStartIndex):
1045         (webkitAccessibleHyperlinkGetEndIndex):
1046         (webkitAccessibleHyperlinkIsValid):
1047         (webkitAccessibleHyperlinkGetNAnchors):
1048         (webkitAccessibleHyperlinkIsSelectedLink):
1049         (webkitAccessibleHyperlinkGetProperty):
1050         (webkitAccessibleHyperlinkSetProperty):
1051         (webkit_accessible_hyperlink_class_init):
1052         (webkitAccessibleHyperlinkGetOrCreate):
1053         (core): Deleted.
1054         (atkActionInterfaceInit): Deleted.
1055         (getRangeLengthForObject): Deleted.
1056         (webkitAccessibleHyperlinkFinalize): Deleted.
1057         (webkitAccessibleHyperlinkClassInit): Deleted.
1058         (webkitAccessibleHyperlinkInit): Deleted.
1059         (webkitAccessibleHyperlinkGetType): Deleted.
1060         (webkitAccessibleHyperlinkNew): Deleted.
1061         (webkitAccessibleHyperlinkGetAccessibilityObject): Deleted.
1062         * accessibility/atk/WebKitAccessibleHyperlink.h:
1063         * accessibility/atk/WebKitAccessibleInterfaceHyperlinkImpl.cpp:
1064         (webkitAccessibleHyperlinkImplGetHyperlink):
1065         (webkitAccessibleHyperlinkImplInterfaceInit):
1066
1067 2019-04-08  Simon Fraser  <simon.fraser@apple.com>
1068
1069         Remove some iOS #ifdefs around sticky-related code
1070         https://bugs.webkit.org/show_bug.cgi?id=196726
1071
1072         Reviewed by Zalan Bujtas.
1073
1074         Now that async overflow scrolling can be enabled on macOS, RenderLayerCompositor::isAsyncScrollableStickyLayer()
1075         should not have iOS-only code.
1076
1077         The answer to the FIXME in RenderLayerCompositor::computeStickyViewportConstraints is obvious: composited
1078         overflow:scroll can be the container for sticky. The assertion can be removed.
1079
1080         * rendering/RenderLayer.cpp: Fix spacing in some logging.
1081         (WebCore::outputPaintOrderTreeRecursive):
1082         * rendering/RenderLayerCompositor.cpp:
1083         (WebCore::RenderLayerCompositor::isAsyncScrollableStickyLayer const):
1084         (WebCore::RenderLayerCompositor::computeStickyViewportConstraints const):
1085
1086 2019-04-08  Don Olmstead  <don.olmstead@sony.com>
1087
1088         [CMake][WinCairo] Separate copied headers into different directories
1089         https://bugs.webkit.org/show_bug.cgi?id=196655
1090
1091         Reviewed by Michael Catanzaro.
1092
1093         * CMakeLists.txt:
1094         * PlatformWin.cmake:
1095
1096 2019-04-08  Chris Fleizach  <cfleizach@apple.com>
1097
1098         AX: Automatically compute accessibility labels for Apple Pay buttons
1099         https://bugs.webkit.org/show_bug.cgi?id=196661
1100
1101         Reviewed by Joanmarie Diggs.
1102
1103         Detect Apple Pay buttons and return a standard role and label for them based on their type.
1104
1105         Test: accessibility/mac/apple-pay-labels.html
1106               accessibility/mac/apple-pay-session-v4.html
1107
1108         * accessibility/AccessibilityNodeObject.cpp:
1109         (WebCore::AccessibilityNodeObject::isControl const):
1110         * accessibility/AccessibilityNodeObject.h:
1111         * accessibility/AccessibilityRenderObject.cpp:
1112         (WebCore::AccessibilityRenderObject::applePayButtonDescription const):
1113         (WebCore::AccessibilityRenderObject::titleElementText const):
1114         (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
1115         (WebCore::AccessibilityRenderObject::isApplePayButton const):
1116         (WebCore::AccessibilityRenderObject::applePayButtonType const):
1117         * accessibility/AccessibilityRenderObject.h:
1118         * en.lproj/Localizable.strings:
1119         * platform/LocalizedStrings.cpp:
1120         (WebCore::AXApplePayPlainLabel):
1121         (WebCore::AXApplePayBuyLabel):
1122         (WebCore::AXApplePaySetupLabel):
1123         (WebCore::AXApplePayDonateLabel):
1124         (WebCore::AXApplePayCheckOutLabel):
1125         (WebCore::AXApplePayBookLabel):
1126         (WebCore::AXApplePaySubscribeLabel):
1127         * platform/LocalizedStrings.h:
1128
1129 2019-04-08  Chris Fleizach  <cfleizach@apple.com>
1130
1131         AX: Support API: accessibilityReplaceRange:withText
1132         https://bugs.webkit.org/show_bug.cgi?id=196636
1133
1134         Reviewed by Daniel Bates.
1135
1136         Support this platform API on mac to provide a way to replace a range of editable text.
1137
1138         Test: accessibility/mac/replace-text-with-range.html
1139
1140         * accessibility/AccessibilityObject.cpp:
1141         (WebCore::AccessibilityObject::replaceTextInRange):
1142         * accessibility/AccessibilityObject.h:
1143         * accessibility/mac/AccessibilityObjectBase.mm:
1144         (WebCore::PlainTextRange::PlainTextRange):
1145         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
1146         (-[WebAccessibilityObjectWrapper accessibilityReplaceRange:withText:]):
1147
1148 2019-04-08  Wenson Hsieh  <wenson_hsieh@apple.com>
1149
1150         [iOS] Do not allow starting selection drags when selection views are not visible
1151         https://bugs.webkit.org/show_bug.cgi?id=196686
1152         <rdar://problem/49399192>
1153
1154         Reviewed by Tim Horton.
1155
1156         See WebKit ChangeLog for more details.
1157
1158         Tests:  DragAndDropTests.CanDragImageWhenNotFirstResponder
1159                 DragAndDropTests.DoNotPerformSelectionDragWhenNotFirstResponder
1160
1161         * page/DragController.cpp:
1162         (WebCore::DragController::draggableElement const):
1163
1164         Make this respect the case where m_dragSourceAction does not include DragSourceActionSelection. All the other
1165         drag source types are currently consulted in this method, with the exception of DragSourceActionSelection.
1166
1167 2019-04-08  Youenn Fablet  <youenn@apple.com>
1168
1169         Add a test to check for the service worker process name
1170         https://bugs.webkit.org/show_bug.cgi?id=196621
1171
1172         Reviewed by Chris Dumez.
1173
1174         Add a service worker internal API to get process name.
1175         Covered by updated test.
1176
1177         * WebCore.xcodeproj/project.pbxproj:
1178         * testing/ServiceWorkerInternals.cpp:
1179         (WebCore::ServiceWorkerInternals::processName const):
1180         * testing/ServiceWorkerInternals.h:
1181         * testing/ServiceWorkerInternals.idl:
1182         * testing/ServiceWorkerInternals.mm: Added.
1183
1184 2019-04-08  Yusuke Suzuki  <ysuzuki@apple.com>
1185
1186         Unreviewed, speculative fix for build failure in old macOS after r243887
1187         https://bugs.webkit.org/show_bug.cgi?id=196475
1188
1189         * dom/NodeList.h:
1190
1191 2019-04-08  Justin Fan  <justin_fan@apple.com>
1192
1193         [Web GPU] Fix Web GPU experimental feature on iOS
1194         https://bugs.webkit.org/show_bug.cgi?id=196632
1195
1196         Reviewed by Myles C. Maxfield.
1197
1198         Add feature conditionals for iOS 11.
1199         Properly make Web GPU available on iOS 11+.
1200
1201         * Configurations/FeatureDefines.xcconfig:
1202         * Configurations/WebKitTargetConditionals.xcconfig:
1203
1204 2019-04-08  Timothy Hatcher  <timothy@apple.com>
1205
1206         Unreviewed build fix for iOSMac after r243893.
1207         https://bugs.webkit.org/show_bug.cgi?id=196707
1208
1209         * dom/Element.cpp:
1210         (WebCore::parentCrossingFrameBoundaries): Remove ENABLE(POINTER_EVENTS) since computedTouchActions()
1211         no longer uses parentCrossingFrameBoundaries().
1212
1213 2019-04-08  Youenn Fablet  <youenn@apple.com>
1214
1215         Lazily construct Navigator serviceWorker
1216         https://bugs.webkit.org/show_bug.cgi?id=196692
1217
1218         Reviewed by Chris Dumez.
1219
1220         Make NavigatorBase a ContextDestructionObserver.
1221         This allows to get the navigator script execution context.
1222         Use it when creating the navigator ServiceWorkerContainer object.
1223         For GC, introduce serviceWorkerIfAny which returns the container if created.
1224         No JS observable change of behavior.
1225         Covered by existing tests.
1226
1227         * bindings/js/JSNavigatorCustom.cpp:
1228         (WebCore::JSNavigator::visitAdditionalChildren):
1229         * bindings/js/JSWorkerNavigatorCustom.cpp:
1230         (WebCore::JSWorkerNavigator::visitAdditionalChildren):
1231         * page/NavigatorBase.cpp:
1232         (WebCore::NavigatorBase::NavigatorBase):
1233         (WebCore::NavigatorBase::serviceWorkerIfAny):
1234         (WebCore::NavigatorBase::serviceWorker):
1235         * page/NavigatorBase.h:
1236
1237 2019-04-08  Antti Koivisto  <antti@apple.com>
1238
1239         Update touch-action region on property changes
1240         https://bugs.webkit.org/show_bug.cgi?id=196608
1241
1242         Reviewed by Simon Fraser.
1243
1244         Test: pointerevents/ios/touch-action-region-dynamic.html
1245
1246         * rendering/EventRegion.cpp:
1247         (WebCore::EventRegion::touchActionsForPoint const):
1248
1249         Correctly return 'auto' when nothing is found from the regions (this code is not used yet).
1250
1251         * rendering/RenderElement.cpp:
1252         (WebCore::RenderElement::styleWillChange):
1253
1254         React to 'touch-action' property changes, similarly to 'pointer-events'.
1255
1256         * rendering/RenderLayer.cpp:
1257         (WebCore::RenderLayer::invalidateEventRegion):
1258
1259         Test if need to invalidate.
1260
1261         * rendering/RenderLayerBacking.cpp:
1262         (WebCore::RenderLayerBacking::setContentsNeedDisplay):
1263         (WebCore::RenderLayerBacking::setContentsNeedDisplayInRect):
1264
1265         Call invalidateEventRegion explicitly instead of relying on compositing update. This ensures
1266         that we update the top level event region correctly when we have touch-actions.
1267
1268 2019-04-08  Javier Fernandez  <jfernandez@igalia.com>
1269
1270         Implement white-space:break-spaces value
1271         https://bugs.webkit.org/show_bug.cgi?id=177327
1272
1273         Reviewed by Myles Maxfield and Zalan Bujtas.
1274
1275         Finally the CSS WG decided [1] to move back the 'break-spaces' value to
1276         the 'white-space' property. This makes the parsing logic easier than
1277         the previous approach of using the 'overflow-wrap' property.
1278
1279         This new value prevents the white-space sequence to collapse and gives
1280         breaking opportunities after every preserved white-space.
1281
1282         https://drafts.csswg.org/css-text-3/#valdef-white-space-break-spaces
1283
1284         Additionally, unlike 'pre-wrap', non-collapsible spaces or tabs at the
1285         end of a line cannot be hung or visually collapsed, since we want them
1286         to be preserved and broken.
1287
1288         [1] https://github.com/w3c/csswg-drafts/pull/2841
1289
1290         Tests: imported/w3c/web-platform-tests/css/css-text/overflow-wrap/overflow-wrap-break-word-008.html
1291                imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-003.html
1292                imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-009.html
1293
1294         * css/CSSPrimitiveValueMappings.h:
1295         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): New mapping for CSSVaueBreakSpaces.
1296         (WebCore::CSSPrimitiveValue::operator WhiteSpace const): New value BreakSpaces for the Whitespace enum.
1297         * css/CSSProperties.json: new 'break-spaces' value for the 'white-space' property.
1298         * css/CSSValueKeywords.in: new break-spaces keyword
1299         * css/parser/CSSParserFastPaths.cpp:
1300         (WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
1301         * rendering/SimpleLineLayout.cpp:  The SimpleLineLayut codepath must handle properly the new behavior of preserved whitespaces.
1302         (WebCore::SimpleLineLayout::LineState::hasTrailingWhitespace const): Require that m_trailingWhitespaceWidth being greater than zero.
1303         (WebCore::SimpleLineLayout::LineState::hasWhitespaceFragments const): New function to detect former whitespae fragments that could be breaking opportunities.
1304         (WebCore::SimpleLineLayout::removeTrailingWhitespace): The 'break-spaces' feature forbids to remove any trailing whitespace.
1305         (WebCore::SimpleLineLayout::firstFragment): We have now leading whitespace sequences comming from the previous line.
1306         (WebCore::SimpleLineLayout::createLineRuns): We should revert some breaking opportunities if others were formerly found in the line.
1307         * rendering/SimpleLineLayoutTextFragmentIterator.cpp:
1308         (WebCore::SimpleLineLayout::TextFragmentIterator::Style::Style): New style fields to determine whether the break-space feature is being used. Also split out the break-all and breal-all values.
1309         * rendering/SimpleLineLayoutTextFragmentIterator.h:
1310         * rendering/line/BreakingContext.h: Different codepath but similar changes to properly handle the new behavior of preserved whitespace.
1311         (WebCore::BreakingContext::BreakingContext): New class field to determine whether there are some whitespace that may prevent the word ot be broken.
1312         (WebCore::BreakingContext::handleText): New line-breaking logic to implement the break-spaces behavior.
1313         (WebCore::BreakingContext::trailingSpacesHang): Cases where the preserved breakspaces should hand or overflow.
1314         * rendering/style/RenderStyle.h:
1315         (WebCore::RenderStyle::collapseWhiteSpace): With break-spaces collapsing whitespaces is not allowed.
1316         (WebCore::RenderStyle::breakOnlyAfterWhiteSpace const): Add the WhiteSpace::BreakSpaces to this group.
1317         * rendering/style/RenderStyleConstants.h: A new constan added.
1318
1319 2019-04-08  Youenn Fablet  <youenn@apple.com>
1320
1321         LibWebRTCMediaEndpoint does not need to hop to the signaling thread to gather stats
1322         https://bugs.webkit.org/show_bug.cgi?id=196697
1323         <rdar://problem/47477113>
1324
1325         Reviewed by Eric Carlson.
1326
1327         It is not thread safe to use m_backend in another thread than the main thread.
1328         It is not useful anymore to hop to the signaling thread to gather stats.
1329         No change of behavior.
1330
1331         * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:
1332         (WebCore::LibWebRTCMediaEndpoint::getStats):
1333         (WebCore::LibWebRTCMediaEndpoint::gatherStatsForLogging):
1334
1335 2019-04-08  Antoine Quint  <graouts@apple.com>
1336
1337         [ Mac WK2 iOS Debug ] REGRESSION(r233667) Layout Test imported/w3c/web-platform-tests/web-animations/interfaces/DocumentTimeline/constructor.html is a flaky failure
1338         https://bugs.webkit.org/show_bug.cgi?id=195233
1339         <rdar://problem/48527231>
1340
1341         Reviewed by Dean Jackson.
1342
1343         We need to create the "main" document timeline (document.timeline) if it doesn't already exist and use its current time as a basis for any other DocumentTimeline instance.
1344
1345         * animation/DocumentTimeline.cpp:
1346         (WebCore::DocumentTimeline::currentTime):
1347
1348 2019-04-08  Antoine Quint  <graouts@apple.com>
1349
1350         [Web Animations] JS wrapper may be deleted while animation is yet to dispatch its finish event
1351         https://bugs.webkit.org/show_bug.cgi?id=196118
1352         <rdar://problem/46614137>
1353
1354         Reviewed by Chris Dumez.
1355
1356         Test: webanimations/js-wrapper-kept-alive.html
1357
1358         We need to teach WebAnimation to keep its JS wrapper alive if it's relevant or could become relevant again by virtue of having a timeline.
1359         We also need to ensure that the new implementation of hasPendingActivity() does not interfere with the ability of pages to enter the page
1360         cache when running animations.
1361
1362         * animation/WebAnimation.cpp:
1363         (WebCore::WebAnimation::canSuspendForDocumentSuspension const):
1364         (WebCore::WebAnimation::stop):
1365         (WebCore::WebAnimation::hasPendingActivity const):
1366         * animation/WebAnimation.h:
1367
1368 2019-04-08  Eric Liang  <ericliang@apple.com>
1369
1370         AX: <svg> elements with labels and no accessible contents are exposed as empty AXGroups
1371         https://bugs.webkit.org/show_bug.cgi?id=156774
1372
1373         Reviewed by Chris Fleizach.
1374
1375         Labelled SVGs without accessible descendants are exposed as AXImage rather than groups.
1376
1377         Unlabelled equivalents are not exposed. Otherwise, SVGs with accessible descendants are exposed as AXGroup. 
1378         Also added back functionalities from last patch of determining whether a SVG element should be ignored.
1379         
1380         Test: accessibility/svg-shape-labelled.html
1381
1382         * accessibility/AccessibilityRenderObject.cpp:
1383         (WebCore::AccessibilityRenderObject::updateRoleAfterChildrenCreation):
1384         * accessibility/AccessibilitySVGElement.cpp:
1385         (WebCore::AccessibilitySVGElement::computeAccessibilityIsIgnored const):
1386
1387 2019-04-08  Youenn Fablet  <youenn@apple.com>
1388
1389         Make sure UniqueIDBDatabaseConnection unregisters itself even if its database is gone
1390         https://bugs.webkit.org/show_bug.cgi?id=196651
1391
1392         Reviewed by Brady Eidson.
1393
1394         In UniqueIDBDatabase methods, many operations are refing the transaction
1395         so that it stays alive until a quota check decision is made.
1396         This extends the lifetime of the transaction which may be lasting
1397         longer than its database that may be cleared without waiting for the quota check decisions.
1398
1399         We therefore need to make sure that the transaction is cleaning itself correctly at destruction time.
1400
1401         Make sure that the transaction is unregistering itself from its IDBServer.
1402         To do so, the transaction keeps a weak ref to the IDBServer.
1403
1404         This is timing sensitive hence difficult to test.
1405
1406         * Modules/indexeddb/server/IDBServer.h:
1407         * Modules/indexeddb/server/UniqueIDBDatabaseConnection.cpp:
1408         (WebCore::IDBServer::UniqueIDBDatabaseConnection::didAbortTransaction):
1409         Like done below for UniqueIDBDatabaseConnection::didCommitTransaction,
1410         add a check to ensure that either the database is we are in an error case.
1411         * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp:
1412         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::UniqueIDBDatabaseTransaction):
1413         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::~UniqueIDBDatabaseTransaction):
1414         * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.h:
1415
1416 2019-04-08  Christopher Reid  <chris.reid@sony.com>
1417
1418         Undefined Behavior: m_experimentalImageMenuEnabled isn't initialized in HTMLImageElement when SERVICE_CONTROLS is disabled
1419         https://bugs.webkit.org/show_bug.cgi?id=196664
1420
1421         Reviewed by Ross Kirsling.
1422
1423         No observable change in behavior.
1424
1425         Initialize m_experimentalImageMenuEnabled regardless of ENABLE(SERVICE_CONTROLS)
1426
1427         * html/HTMLImageElement.cpp:
1428
1429 2019-04-08  Ryan Haddad  <ryanhaddad@apple.com>
1430
1431         Unreviewed, rolling out r243943.
1432
1433         Caused test262 failures.
1434
1435         Reverted changeset:
1436
1437         "[JSC] Filter DontEnum properties in
1438         ProxyObject::getOwnPropertyNames()"
1439         https://bugs.webkit.org/show_bug.cgi?id=176810
1440         https://trac.webkit.org/changeset/243943
1441
1442 2019-04-05  Sergio Villar Senin  <svillar@igalia.com>
1443
1444         [GTK][WPE] outlook.live.com displays old-fashioned UI
1445         https://bugs.webkit.org/show_bug.cgi?id=196642
1446
1447         Reviewed by Carlos Garcia Campos.
1448
1449         The new good looking UI is shown as long as pretend we're a Mac in the UA.
1450
1451         * platform/UserAgentQuirks.cpp:
1452         (WebCore::urlRequiresChromeBrowser):
1453
1454 2019-04-08  Carlos Garcia Campos  <cgarcia@igalia.com>
1455
1456         [ATK] Cleanup accessible wrapper base class
1457         https://bugs.webkit.org/show_bug.cgi?id=196601
1458
1459         Reviewed by Mario Sanchez Prada.
1460
1461         Cleanups:
1462
1463          - Rename WebKitAccessibleWrapperAtk cpp and header as WebKitAccessible for consistency with the class name.
1464          - Use WEBKIT_DEFINE_TYPE instead of custom type registration. This ensures that all CStrings used in private
1465            struct are no longer leaked.
1466          - Move core object pointer to the private struct.
1467          - Remove confusing core() function and simply get the core object from the private struct.
1468          - Use nullptr instead of 0 and other coding style issues.
1469          - Rename cacheAndReturnAtkProperty as webkitAccessibleCacheAndReturnAtkProperty and use WebKitAccessible as
1470            instance parameter.
1471          - Make webkitAccessibleGetAccessibilityObject() return a reference, since we use a fallback object on detach it
1472            never returns nullptr.
1473          - Move objectFocusedAndCaretOffsetUnignored() to WebKitAccessibleUtil.
1474
1475         * SourcesGTK.txt:
1476         * accessibility/atk/AXObjectCacheAtk.cpp:
1477         * accessibility/atk/WebKitAccessible.cpp: Renamed from Source/WebCore/accessibility/atk/WebKitAccessibleWrapperAtk.cpp.
1478         (webkitAccessibleGetName):
1479         (webkitAccessibleGetDescription):
1480         (setAtkRelationSetFromCoreObject):
1481         (isRootObject):
1482         (webkitAccessibleGetParent):
1483         (webkitAccessibleGetNChildren):
1484         (webkitAccessibleRefChild):
1485         (webkitAccessibleGetIndexInParent):
1486         (webkitAccessibleGetAttributes):
1487         (atkRole):
1488         (webkitAccessibleGetRole):
1489         (webkitAccessibleRefStateSet):
1490         (webkitAccessibleRefRelationSet):
1491         (webkitAccessibleInit):
1492         (webkitAccessibleGetObjectLocale):
1493         (webkit_accessible_class_init):
1494         (interfaceMaskFromObject):
1495         (uniqueAccessibilityTypeName):
1496         (accessibilityTypeFromObject):
1497         (webkitAccessibleNew):
1498         (webkitAccessibleGetAccessibilityObject):
1499         (webkitAccessibleDetach):
1500         (webkitAccessibleIsDetached):
1501         (webkitAccessibleCacheAndReturnAtkProperty):
1502         * accessibility/atk/WebKitAccessible.h: Renamed from Source/WebCore/accessibility/atk/WebKitAccessibleWrapperAtk.h.
1503         * accessibility/atk/WebKitAccessibleHyperlink.cpp:
1504         (core):
1505         * accessibility/atk/WebKitAccessibleInterfaceAction.cpp:
1506         (core):
1507         (webkitAccessibleActionGetKeybinding):
1508         (webkitAccessibleActionGetName):
1509         * accessibility/atk/WebKitAccessibleInterfaceComponent.cpp:
1510         (core):
1511         * accessibility/atk/WebKitAccessibleInterfaceDocument.cpp:
1512         (core):
1513         (documentAttributeValue):
1514         * accessibility/atk/WebKitAccessibleInterfaceEditableText.cpp:
1515         (core):
1516         * accessibility/atk/WebKitAccessibleInterfaceHypertext.cpp:
1517         (core):
1518         * accessibility/atk/WebKitAccessibleInterfaceImage.cpp:
1519         (core):
1520         (webkitAccessibleImageGetImageDescription):
1521         * accessibility/atk/WebKitAccessibleInterfaceSelection.cpp:
1522         (core):
1523         * accessibility/atk/WebKitAccessibleInterfaceTable.cpp:
1524         (core):
1525         * accessibility/atk/WebKitAccessibleInterfaceTableCell.cpp:
1526         (core):
1527         * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
1528         (core):
1529         * accessibility/atk/WebKitAccessibleInterfaceValue.cpp:
1530         (core):
1531         * accessibility/atk/WebKitAccessibleUtil.cpp:
1532         (objectFocusedAndCaretOffsetUnignored):
1533         * accessibility/atk/WebKitAccessibleUtil.h:
1534         * editing/atk/FrameSelectionAtk.cpp:
1535
1536 2019-04-06  Antti Koivisto  <antti@apple.com>
1537
1538         Combine event and touch action regions into a single class
1539         https://bugs.webkit.org/show_bug.cgi?id=196644
1540         <rdar://problem/49643614>
1541
1542         Reviewed by Darin Adler.
1543
1544         This patch replaces the existing TouchActionRegion class with the more general EventRegion class.
1545         It collects both the overall event region and the touch action regions. This avoids duplication
1546         and simplifies the code.
1547
1548         The patch also adds serialization support for EventRegion, so touch-action regions gets passed
1549         to the UI process too.
1550
1551         * Sources.txt:
1552         * WebCore.xcodeproj/project.pbxproj:
1553         * platform/graphics/GraphicsLayer.cpp:
1554         (WebCore::GraphicsLayer::setEventRegion):
1555         (WebCore::GraphicsLayer::dumpProperties const):
1556         (WebCore::GraphicsLayer::setTouchActionRegion): Deleted.
1557         * platform/graphics/GraphicsLayer.h:
1558         (WebCore::GraphicsLayer::eventRegion const):
1559         (WebCore::GraphicsLayer::touchActionRegion const): Deleted.
1560         * platform/graphics/Region.cpp:
1561         (WebCore::operator<<):
1562         * platform/graphics/ca/GraphicsLayerCA.cpp:
1563         (WebCore::GraphicsLayerCA::setEventRegion):
1564         (WebCore::GraphicsLayerCA::setTouchActionRegion): Deleted.
1565         * platform/graphics/ca/GraphicsLayerCA.h:
1566         * platform/graphics/ca/PlatformCALayer.h:
1567         * platform/graphics/ca/cocoa/PlatformCALayerCocoa.h:
1568         * rendering/EventRegion.cpp: Copied from Source/WebCore/rendering/TouchActionRegion.cpp.
1569         (WebCore::EventRegion::operator== const):
1570         (WebCore::EventRegion::unite):
1571         (WebCore::EventRegion::translate):
1572         (WebCore::EventRegion::uniteTouchActions):
1573         (WebCore::EventRegion::touchActionsForPoint const):
1574         (WebCore::operator<<):
1575         (WebCore::TouchActionRegion::unite): Deleted.
1576         (WebCore::TouchActionRegion::actionsForPoint const): Deleted.
1577         (WebCore::TouchActionRegion::translate): Deleted.
1578         * rendering/EventRegion.h: Copied from Source/WebCore/rendering/TouchActionRegion.h.
1579         (WebCore::EventRegion::isEmpty const):
1580         (WebCore::EventRegion::contains const):
1581         (WebCore::EventRegion::hasTouchActions const):
1582         (WebCore::EventRegion::encode const):
1583         (WebCore::EventRegion::decode):
1584         (WebCore::TouchActionRegion::isEmpty const): Deleted.
1585         (WebCore::TouchActionRegion::operator== const): Deleted.
1586         * rendering/InlineTextBox.cpp:
1587         (WebCore::InlineTextBox::paint):
1588         * rendering/PaintInfo.h:
1589         * rendering/RenderBlock.cpp:
1590         (WebCore::RenderBlock::paintObject):
1591         * rendering/RenderLayer.cpp:
1592         (WebCore::RenderLayer::collectEventRegionForFragments):
1593         * rendering/RenderLayer.h:
1594         * rendering/RenderLayerBacking.cpp:
1595         (WebCore::RenderLayerBacking::updateEventRegion):
1596         * rendering/RenderLayerModelObject.cpp:
1597         * rendering/SimpleLineLayoutFunctions.cpp:
1598         (WebCore::SimpleLineLayout::paintFlow):
1599         * rendering/TouchActionRegion.cpp: Removed.
1600         * rendering/TouchActionRegion.h: Removed.
1601
1602 2019-04-05  Yongjun Zhang  <yongjun_zhang@apple.com>
1603
1604         We should pass minimumEffectiveDeviceWidth to web process on new page creation.
1605         https://bugs.webkit.org/show_bug.cgi?id=196077
1606         <rdar://problem/49108202>
1607
1608         Reviewed by Chris Dumez.
1609
1610         If the page doesn't specify it requires to use the device width in viewport tag, we should try to scale down
1611         the page to fit the window width.
1612
1613         Test: fast/viewport/ios/shrink-to-fit-for-page-without-viewport-meta.html
1614
1615         * page/ViewportConfiguration.cpp:
1616         (WebCore::ViewportConfiguration::updateDefaultConfiguration): Also update the minimum layout size
1617             when the default configuration is changed.
1618         (WebCore::ViewportConfiguration::nativeWebpageParametersWithShrinkToFit): Make sure we fit the content
1619             to window width.
1620
1621 2019-04-05  Jer Noble  <jer.noble@apple.com>
1622
1623         [Cocoa] Deactivate the audio session before the WebProcess suspends.
1624         https://bugs.webkit.org/show_bug.cgi?id=196658
1625
1626         Reviewed by Eric Carlson.
1627
1628         Test: platform/mac/media/audio-session-deactivated-when-suspended.html
1629
1630         Deactivate the audio session when we are notified that the session will suspend.
1631
1632         Drive-by fix: don't try to begin playback when the process is suspended.
1633
1634         * platform/audio/PlatformMediaSessionManager.cpp:
1635         (WebCore::PlatformMediaSessionManager::sessionWillBeginPlayback):
1636         (WebCore::PlatformMediaSessionManager::processWillSuspend):
1637         (WebCore::PlatformMediaSessionManager::processDidResume):
1638         * platform/audio/PlatformMediaSessionManager.h:
1639         (WebCore::PlatformMediaSessionManager::processIsSuspended const):
1640         * testing/InternalSettings.cpp:
1641         (WebCore::InternalSettings::Backup::Backup):
1642         (WebCore::InternalSettings::Backup::restoreTo):
1643         (WebCore::InternalSettings::setShouldDeactivateAudioSession):
1644         * testing/InternalSettings.h:
1645         * testing/InternalSettings.idl:
1646         * testing/Internals.cpp:
1647         (WebCore::Internals::processWillSuspend):
1648         (WebCore::Internals::processDidResume):
1649         * testing/Internals.h:
1650         * testing/Internals.idl:
1651
1652 2019-04-05  Sihui Liu  <sihui_liu@apple.com>
1653
1654         [iOS] Web process gets suspended while holding locked database files
1655         https://bugs.webkit.org/show_bug.cgi?id=196519
1656         <rdar://problem/49531797>
1657
1658         Reviewed by Chris Dumez.
1659
1660         Don't use DatabaseTracker singleton before it is initialized.
1661
1662         * Modules/webdatabase/DatabaseTracker.cpp:
1663         (WebCore::DatabaseTracker::isInitialized):
1664         * Modules/webdatabase/DatabaseTracker.h:
1665
1666 2019-04-05  Ryosuke Niwa  <rniwa@webkit.org>
1667
1668         Make WeakPtr<Element> possible and deploy it in form associated elements code
1669         https://bugs.webkit.org/show_bug.cgi?id=196626
1670
1671         Reviewed by Antti Koivisto.
1672
1673         Make Element inherit from CanMakeWeakPtr and deploy WeakPtr<*Element> in FormAssociatedElement and HTMLFormElement.
1674
1675         No new tests sine there should be no behavioral change.
1676
1677         * dom/Element.h:
1678         * html/FormAssociatedElement.cpp:
1679         (WebCore::FormAssociatedElement::FormAssociatedElement):
1680         (WebCore::FormAssociatedElement::insertedIntoAncestor):
1681         (WebCore::FormAssociatedElement::setForm):
1682         (WebCore::FormAssociatedElement::resetFormOwner):
1683         (WebCore::FormAssociatedElement::formAttributeChanged):
1684         * html/FormAssociatedElement.h:
1685         (WebCore::FormAssociatedElement::form const):
1686         * html/HTMLElement.cpp:
1687         (WebCore::HTMLElement::asFormNamedItem):
1688         (WebCore::HTMLElement::asFormAssociatedElement):
1689         * html/HTMLElement.h:
1690         (WebCore::HTMLElement::asFormNamedItem): Deleted.
1691         * html/HTMLFormControlElement.h:
1692         * html/HTMLFormControlsCollection.cpp:
1693         (WebCore::HTMLFormControlsCollection::formImageElements const): Inlined into updateNamedElementCache.
1694         (WebCore::HTMLFormControlsCollection::updateNamedElementCache const):
1695         * html/HTMLFormControlsCollection.h:
1696         * html/HTMLFormElement.cpp:
1697         (WebCore::HTMLFormElement::registerInvalidAssociatedFormControl):
1698         (WebCore::HTMLFormElement::removeInvalidAssociatedFormControlIfNeeded):
1699         (WebCore::HTMLFormElement::registerImgElement):
1700         (WebCore::HTMLFormElement::defaultButton const):
1701         (WebCore::HTMLFormElement::resetDefaultButton):
1702         (WebCore::HTMLFormElement::matchesValidPseudoClass const):
1703         (WebCore::HTMLFormElement::matchesInvalidPseudoClass const):
1704         * html/HTMLFormElement.h:
1705         * html/HTMLImageElement.cpp:
1706         (WebCore::HTMLImageElement::HTMLImageElement):
1707         (WebCore::HTMLImageElement::insertedIntoAncestor):
1708         * html/HTMLImageElement.h:
1709         * html/HTMLInputElement.h:
1710         * html/HTMLMediaElement.h:
1711         * html/HTMLObjectElement.h:
1712         * html/HTMLPictureElement.h:
1713         * html/HTMLSlotElement.h:
1714         * svg/SVGElement.h:
1715
1716 2019-04-05  Caitlin Potter  <caitp@igalia.com>
1717
1718         [JSC] Filter DontEnum properties in ProxyObject::getOwnPropertyNames()
1719         https://bugs.webkit.org/show_bug.cgi?id=176810
1720
1721         Reviewed by Saam Barati.
1722
1723         Previously, there was a comment here indicating uncertainty of whether it
1724         was necessary to filter DontEnum properties explicitly or not. It turns
1725         out that it was necessary in the case of JSC ProxyObjects.
1726
1727         This patch adds DontEnum filtering for ProxyObjects, however we continue
1728         to explicitly filter them in JSDOMConvertRecord, which needs to use the
1729         property descriptor after filtering. This change prevents observably
1730         fetching the property descriptor twice per property.
1731
1732         * bindings/js/JSDOMConvertRecord.h:
1733
1734 2019-04-05  Michael Catanzaro  <mcatanzaro@igalia.com>
1735
1736         Unreviewed manual rollout of r243929
1737         https://bugs.webkit.org/show_bug.cgi?id=196626
1738
1739         * dom/Element.h:
1740         * html/FormAssociatedElement.cpp:
1741         (WebCore::FormAssociatedElement::FormAssociatedElement):
1742         (WebCore::FormAssociatedElement::insertedIntoAncestor):
1743         (WebCore::FormAssociatedElement::setForm):
1744         (WebCore::FormAssociatedElement::resetFormOwner):
1745         (WebCore::FormAssociatedElement::formAttributeChanged):
1746         * html/FormAssociatedElement.h:
1747         (WebCore::FormAssociatedElement::form const):
1748         * html/HTMLElement.cpp:
1749         (WebCore::HTMLElement::asFormNamedItem): Deleted.
1750         (WebCore::HTMLElement::asFormAssociatedElement): Deleted.
1751         * html/HTMLElement.h:
1752         (WebCore::HTMLElement::asFormNamedItem):
1753         * html/HTMLFormControlElement.h:
1754         * html/HTMLFormControlsCollection.cpp:
1755         (WebCore:: const):
1756         (WebCore::HTMLFormControlsCollection::updateNamedElementCache const):
1757         * html/HTMLFormControlsCollection.h:
1758         * html/HTMLFormElement.cpp:
1759         (WebCore::HTMLFormElement::registerInvalidAssociatedFormControl):
1760         (WebCore::HTMLFormElement::removeInvalidAssociatedFormControlIfNeeded):
1761         (WebCore::HTMLFormElement::registerImgElement):
1762         (WebCore::HTMLFormElement::defaultButton const):
1763         (WebCore::HTMLFormElement::resetDefaultButton):
1764         (WebCore::HTMLFormElement::matchesValidPseudoClass const):
1765         (WebCore::HTMLFormElement::matchesInvalidPseudoClass const):
1766         * html/HTMLFormElement.h:
1767         * html/HTMLImageElement.cpp:
1768         (WebCore::HTMLImageElement::HTMLImageElement):
1769         (WebCore::HTMLImageElement::insertedIntoAncestor):
1770         * html/HTMLImageElement.h:
1771         * html/HTMLInputElement.h:
1772         * html/HTMLMediaElement.h:
1773         * html/HTMLObjectElement.h:
1774         * html/HTMLPictureElement.h:
1775         * html/HTMLSlotElement.h:
1776         * svg/SVGElement.h:
1777
1778 2019-04-05  Sihui Liu  <sihui_liu@apple.com>
1779
1780         [iOS] Web process gets suspended while holding locked database files
1781         https://bugs.webkit.org/show_bug.cgi?id=196519
1782         <rdar://problem/49531797>
1783
1784         Reviewed by Chris Dumez.
1785
1786         We should close all databases and make sure not open new databases when web process is ready to suspend.
1787
1788         * platform/sql/SQLiteDatabase.cpp:
1789         (WebCore::SQLiteDatabase::setIsDatabaseOpeningForbidden):
1790         (WebCore::SQLiteDatabase::open):
1791         * platform/sql/SQLiteDatabase.h:
1792         * platform/sql/SQLiteDatabaseTracker.cpp:
1793         (WebCore::SQLiteDatabaseTracker::setClient):
1794         (WebCore::SQLiteDatabaseTracker::incrementTransactionInProgressCount):
1795         (WebCore::SQLiteDatabaseTracker::decrementTransactionInProgressCount):
1796         (WebCore::SQLiteDatabaseTracker::hasTransactionInProgress):
1797
1798 2019-04-05  Commit Queue  <commit-queue@webkit.org>
1799
1800         Unreviewed, rolling out r243833.
1801         https://bugs.webkit.org/show_bug.cgi?id=196645
1802
1803         This change breaks build of WPE and GTK ports (Requested by
1804         annulen on #webkit).
1805
1806         Reverted changeset:
1807
1808         "[CMake][WTF] Mirror XCode header directories"
1809         https://bugs.webkit.org/show_bug.cgi?id=191662
1810         https://trac.webkit.org/changeset/243833
1811
1812 2019-04-05  David Kilzer  <ddkilzer@apple.com>
1813
1814         REGRESSION(r243887): Try to fix Windows builds by including <wtf/IsoMalloc.h>
1815
1816         Caused by:
1817             [WebCore] Put most of derived classes of ScriptWrappable into IsoHeap
1818             https://bugs.webkit.org/show_bug.cgi?id=196475
1819
1820         * css/CSSComputedStyleDeclaration.h:
1821         * dom/DOMRectReadOnly.h:
1822         * dom/LiveNodeList.h:
1823         * dom/NodeIterator.h:
1824         * dom/TreeWalker.h:
1825         * fileapi/Blob.h:
1826         * fileapi/File.h:
1827         * fileapi/FileList.h:
1828         * html/CachedHTMLCollection.h:
1829         * html/HTMLFormElement.h:
1830         * html/HTMLNameCollection.h:
1831         * html/canvas/GPUBasedCanvasRenderingContext.h:
1832         * page/RemoteDOMWindow.h:
1833
1834 2019-04-05  Ryosuke Niwa  <rniwa@webkit.org>
1835
1836         Make WeakPtr<Element> possible and deploy it in form associated elements code
1837         https://bugs.webkit.org/show_bug.cgi?id=196626
1838
1839         Reviewed by Antti Koivisto.
1840
1841         Make Element inherit from CanMakeWeakPtr and deploy WeakPtr<*Element> in FormAssociatedElement and HTMLFormElement.
1842
1843         No new tests sine there should be no behavioral change.
1844
1845         * dom/Element.h:
1846         * html/FormAssociatedElement.cpp:
1847         (WebCore::FormAssociatedElement::FormAssociatedElement):
1848         (WebCore::FormAssociatedElement::insertedIntoAncestor):
1849         (WebCore::FormAssociatedElement::setForm):
1850         (WebCore::FormAssociatedElement::resetFormOwner):
1851         (WebCore::FormAssociatedElement::formAttributeChanged):
1852         * html/FormAssociatedElement.h:
1853         (WebCore::FormAssociatedElement::form const):
1854         * html/HTMLElement.cpp:
1855         (WebCore::HTMLElement::asFormNamedItem):
1856         (WebCore::HTMLElement::asFormAssociatedElement):
1857         * html/HTMLElement.h:
1858         (WebCore::HTMLElement::asFormNamedItem): Deleted.
1859         * html/HTMLFormControlElement.h:
1860         * html/HTMLFormControlsCollection.cpp:
1861         (WebCore::HTMLFormControlsCollection::formImageElements const): Inlined into updateNamedElementCache.
1862         (WebCore::HTMLFormControlsCollection::updateNamedElementCache const):
1863         * html/HTMLFormControlsCollection.h:
1864         * html/HTMLFormElement.cpp:
1865         (WebCore::HTMLFormElement::registerInvalidAssociatedFormControl):
1866         (WebCore::HTMLFormElement::removeInvalidAssociatedFormControlIfNeeded):
1867         (WebCore::HTMLFormElement::registerImgElement):
1868         (WebCore::HTMLFormElement::defaultButton const):
1869         (WebCore::HTMLFormElement::resetDefaultButton):
1870         (WebCore::HTMLFormElement::matchesValidPseudoClass const):
1871         (WebCore::HTMLFormElement::matchesInvalidPseudoClass const):
1872         * html/HTMLFormElement.h:
1873         * html/HTMLImageElement.cpp:
1874         (WebCore::HTMLImageElement::HTMLImageElement):
1875         (WebCore::HTMLImageElement::insertedIntoAncestor):
1876         * html/HTMLImageElement.h:
1877         * html/HTMLInputElement.h:
1878         * html/HTMLMediaElement.h:
1879         * html/HTMLObjectElement.h:
1880         * html/HTMLPictureElement.h:
1881         * html/HTMLSlotElement.h:
1882         * svg/SVGElement.h:
1883
1884 2019-04-05  Carlos Garcia Campos  <cgarcia@igalia.com>
1885
1886         [ATK] Use a smart pointer for AccessibilityObject wrapper and remove GTK specific code
1887         https://bugs.webkit.org/show_bug.cgi?id=196593
1888         <rdar://problem/49599153>
1889
1890         Reviewed by Michael Catanzaro.
1891
1892         We have specific code for GTK to get/set the wrapper only because we don't use smart pointers. Also use
1893         WebKitAccessible as AccessibilityObjectWrapper instead of generic AtkObject, to enforce wrappers to be
1894         WebKitAccessible instances. This requires a few casts to AtkObject.
1895
1896         * accessibility/AccessibilityObject.h:
1897         (WebCore::AccessibilityObject::setWrapper):
1898         * accessibility/AccessibilityObjectInterface.h:
1899         * accessibility/atk/AXObjectCacheAtk.cpp:
1900         (WebCore::AXObjectCache::detachWrapper):
1901         (WebCore::AXObjectCache::attachWrapper):
1902         (WebCore::notifyChildrenSelectionChange):
1903         (WebCore::AXObjectCache::postPlatformNotification):
1904         (WebCore::AXObjectCache::nodeTextChangePlatformNotification):
1905         (WebCore::AXObjectCache::frameLoadingEventPlatformNotification):
1906         (WebCore::AXObjectCache::platformHandleFocusedUIElementChanged):
1907         * accessibility/atk/AccessibilityObjectAtk.cpp:
1908         * accessibility/atk/WebKitAccessibleInterfaceComponent.cpp:
1909         (webkitAccessibleComponentRefAccessibleAtPoint):
1910         * accessibility/atk/WebKitAccessibleInterfaceHypertext.cpp:
1911         (webkitAccessibleHypertextGetLink):
1912         (webkitAccessibleHypertextGetNLinks):
1913         * accessibility/atk/WebKitAccessibleInterfaceSelection.cpp:
1914         (webkitAccessibleSelectionRefSelection):
1915         * accessibility/atk/WebKitAccessibleInterfaceTable.cpp:
1916         (webkitAccessibleTableRefAt):
1917         (webkitAccessibleTableGetColumnHeader):
1918         (webkitAccessibleTableGetRowHeader):
1919         (webkitAccessibleTableGetCaption):
1920         * accessibility/atk/WebKitAccessibleInterfaceTableCell.cpp:
1921         (convertToGPtrArray):
1922         (webkitAccessibleTableCellGetTable):
1923         * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
1924         (accessibilityObjectLength):
1925         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
1926         (setAtkRelationSetFromCoreObject):
1927         (atkParentOfRootObject):
1928         (webkitAccessibleGetParent):
1929         (webkitAccessibleRefChild):
1930         (isTextWithCaret):
1931         * editing/atk/FrameSelectionAtk.cpp:
1932         (WebCore::emitTextSelectionChange):
1933         (WebCore::maybeEmitTextFocusChange):
1934
1935 2019-04-04  Simon Fraser  <simon.fraser@apple.com>
1936
1937         [iOS WK2] REGRESSION (r242687): Programmatic scroll of overflow scroll results in bad rendering
1938         https://bugs.webkit.org/show_bug.cgi?id=195584
1939
1940         Reviewed by Zalan Bujtas.
1941
1942         Push data to the scrolling tree about whether an overflow:scroll scroll was programmatic, by having
1943         RenderLayer::scrollToOffset() call into AsyncScrollingCoordinator::requestScrollPositionUpdate(),
1944         just as we do for frames.
1945
1946         AsyncScrollingCoordinator::requestScrollPositionUpdate() is generalized to take any ScrollableArea.
1947
1948         Fix an assumption in the ScrollingTree that we only care about programmatic scrolls on the root node.
1949         ScrollingTree::commitTreeState() no longer sets isHandlingProgrammaticScroll; instead,
1950         callers of ScrollingTreeScrollingNode::scrollTo() pass a ScrollType. Commit functions pass
1951         ScrollType::Programmatic when handling RequestedScrollPosition changes as necessary.
1952
1953         Programmatic scrolls need to get to the scrolling tree in the UI process so that we update
1954         the tree's notion of scroll position, and trigger actual UIScrollView scrolls (layers may have
1955         already been put in the right locations, but the UI process needs to know that a scroll happened).
1956         However, we need to prevent notifications from programmatic scrolls getting back to the
1957         web process, because this causes jumpiness. This is done via an early return in
1958         RemoteScrollingCoordinatorProxy::scrollingTreeNodeDidScroll().
1959
1960         Tests: scrollingcoordinator/ios/programmatic-overflow-scroll.html
1961                scrollingcoordinator/ios/programmatic-page-scroll.html
1962
1963         * page/scrolling/AsyncScrollingCoordinator.cpp:
1964         (WebCore::AsyncScrollingCoordinator::requestScrollPositionUpdate):
1965         * page/scrolling/AsyncScrollingCoordinator.h:
1966         * page/scrolling/ScrollingCoordinator.h:
1967         (WebCore::ScrollingCoordinator::requestScrollPositionUpdate):
1968         * page/scrolling/ScrollingTree.cpp:
1969         (WebCore::ScrollingTree::commitTreeState):
1970         (WebCore::ScrollingTree::isHandlingProgrammaticScroll): Deleted.
1971         * page/scrolling/ScrollingTree.h:
1972         (WebCore::ScrollingTree::isHandlingProgrammaticScroll const):
1973         (WebCore::ScrollingTree::setIsHandlingProgrammaticScroll):
1974         * page/scrolling/ScrollingTreeScrollingNode.cpp:
1975         (WebCore::ScrollingTreeScrollingNode::scrollBy):
1976         (WebCore::ScrollingTreeScrollingNode::scrollTo):
1977         * page/scrolling/ScrollingTreeScrollingNode.h:
1978         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
1979         (WebCore::ScrollingTreeFrameScrollingNodeMac::commitStateAfterChildren):
1980         * rendering/RenderLayer.cpp:
1981         (WebCore::RenderLayer::scrollToOffset):
1982         (WebCore::RenderLayer::scrollingNodeID const):
1983         * rendering/RenderLayer.h:
1984         * rendering/RenderMarquee.cpp:
1985         (WebCore::RenderMarquee::timerFired):
1986
1987 2019-04-04  Yusuke Suzuki  <ysuzuki@apple.com>
1988
1989         Unreviewed, speculative fix for build failure
1990         https://bugs.webkit.org/show_bug.cgi?id=196475
1991
1992         * Modules/webgpu/WHLSL/Metal/WHLSLNativeFunctionWriter.h:
1993
1994 2019-04-04  Ryosuke Niwa  <rniwa@webkit.org>
1995
1996         Element::isFocusable() debug asserts too frequently
1997         https://bugs.webkit.org/show_bug.cgi?id=196634
1998
1999         Reviewed by Geoffrey Garen.
2000
2001         Remove the debug assertion for now.
2002
2003         * dom/Element.cpp:
2004         (WebCore::Element::isFocusable const):
2005
2006 2019-04-04  Simon Fraser  <simon.fraser@apple.com>
2007
2008         Have ScrollableArea store a ScrollType for the current scroll
2009         https://bugs.webkit.org/show_bug.cgi?id=196627
2010
2011         Reviewed by Zalan Bujtas.
2012
2013         RenderLayer had isInUserScroll() which is the opposite of ScrollableArea::inProgrammaticScroll(),
2014         so just have ScrollableArea store a ScrollType.
2015
2016         RenderLayer's scrolling bottleneck, scrollToOffset(), now takes a ScrollType, and pushes
2017         it onto the base class.
2018
2019         AsyncScrollingCoordinator::requestScrollPositionUpdate() can use the incoming scrollType (currently
2020         incorrect for iOS WK2 overflow) rather than deducing a user scroll from ScrollingLayerPositionAction.
2021
2022         No behavior change.
2023
2024         * page/FrameView.cpp:
2025         (WebCore::FrameView::setFrameRect):
2026         (WebCore::FrameView::topContentInsetDidChange):
2027         (WebCore::FrameView::updateLayoutViewport):
2028         (WebCore::FrameView::setScrollPosition):
2029         (WebCore::FrameView::shouldUpdateCompositingLayersAfterScrolling const):
2030         (WebCore::FrameView::setWasScrolledByUser):
2031         * page/FrameViewLayoutContext.cpp:
2032         (WebCore::LayoutScope::LayoutScope):
2033         (WebCore::LayoutScope::~LayoutScope):
2034         * page/ios/FrameIOS.mm:
2035         (WebCore::Frame::overflowScrollPositionChangedForNode):
2036         * page/scrolling/AsyncScrollingCoordinator.cpp:
2037         (WebCore::AsyncScrollingCoordinator::requestScrollPositionUpdate):
2038         (WebCore::AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScroll):
2039         (WebCore::AsyncScrollingCoordinator::reconcileScrollingState):
2040         * platform/ScrollView.cpp:
2041         (WebCore::ScrollView::setScrollPosition):
2042         * platform/ScrollableArea.cpp:
2043         (WebCore::ScrollableArea::ScrollableArea):
2044         * platform/ScrollableArea.h:
2045         (WebCore::ScrollableArea::currentScrollType const):
2046         (WebCore::ScrollableArea::setCurrentScrollType):
2047         (WebCore::ScrollableArea::setIsUserScroll): Deleted.
2048         (WebCore::ScrollableArea::inProgrammaticScroll const): Deleted.
2049         (WebCore::ScrollableArea::setInProgrammaticScroll): Deleted.
2050         * rendering/RenderLayer.cpp:
2051         (WebCore::RenderLayer::RenderLayer):
2052         (WebCore::RenderLayer::scrollToXPosition):
2053         (WebCore::RenderLayer::scrollToYPosition):
2054         (WebCore::RenderLayer::scrollToOffset):
2055         (WebCore::RenderLayer::scrollTo):
2056         * rendering/RenderLayer.h:
2057         * rendering/RenderLayerBacking.cpp:
2058         (WebCore::RenderLayerBacking::updateScrollOffset):
2059         * rendering/RenderMarquee.cpp:
2060         (WebCore::RenderMarquee::start):
2061
2062 2019-04-04  Shawn Roberts  <sroberts@apple.com>
2063
2064         Unreviewed, rolling out r243868.
2065
2066         Causing timeouts failures on several queues
2067
2068         Reverted changeset:
2069
2070         "[Web Animations] JS wrapper may be deleted while animation is
2071         yet to dispatch its finish event"
2072         https://bugs.webkit.org/show_bug.cgi?id=196118
2073         https://trac.webkit.org/changeset/243868
2074
2075 2019-04-04  Youenn Fablet  <youenn@apple.com>
2076
2077         Pass storage quota parameters from UIProcess to NetworkProcess as part of WebsiteDataStore parameters
2078         https://bugs.webkit.org/show_bug.cgi?id=196543
2079
2080         Reviewed by Alex Christensen.
2081
2082         Add a default routine to compute a third party quota from a per origin quota.
2083         No change of behavior.
2084
2085         * storage/StorageQuotaManager.h:
2086         (WebCore::StorageQuotaManager::defaultThirdPartyQuotaFromPerOriginQuota):
2087         (WebCore::StorageQuotaManager::defaultThirdPartyQuota):
2088
2089 2019-04-04  Commit Queue  <commit-queue@webkit.org>
2090
2091         Unreviewed, rolling out r243807 and r243824.
2092         https://bugs.webkit.org/show_bug.cgi?id=196611
2093
2094         Test added is a flaky timeout on iOS Simulator, 3 tests
2095         unskipped are flaky failures (Requested by ShawnRoberts on
2096         #webkit).
2097
2098         Reverted changesets:
2099
2100         "Blob type cannot be stored correctly in IDB when
2101         IDBObjectStore has autoIncrement and keyPath options"
2102         https://bugs.webkit.org/show_bug.cgi?id=196128
2103         https://trac.webkit.org/changeset/243807
2104
2105         "Follow up fix for r243807: Use MarkedArgumentBuffer instead
2106         of Vector for JSValue"
2107         https://bugs.webkit.org/show_bug.cgi?id=196547
2108         https://trac.webkit.org/changeset/243824
2109
2110 2019-04-04  Simon Fraser  <simon.fraser@apple.com>
2111
2112         Fix rare crash under collectRelatedCoordinatedScrollingNodes()
2113         https://bugs.webkit.org/show_bug.cgi?id=196610
2114         rdar://problem/49595426
2115
2116         Reviewed by Zalan Bujtas.
2117
2118         hasCompositedScrollableOverflow() doesn't check whether a layer is composited (it has
2119         to report the right status before layers have been created), so collectRelatedCoordinatedScrollingNodes()
2120         needs to check whether there's backing.
2121
2122         * rendering/RenderLayerCompositor.cpp:
2123         (WebCore::collectRelatedCoordinatedScrollingNodes):
2124
2125 2019-04-04  Simon Fraser  <simon.fraser@apple.com>
2126
2127         Move "inProgrammaticScroll" down to ScrollableArea
2128         https://bugs.webkit.org/show_bug.cgi?id=196614
2129
2130         Reviewed by Zalan Bujtas.
2131
2132         A future patch will need to update "inProgrammaticScroll" on RenderLayers, so push
2133         inProgrammaticScroll() down to ScrollableArea.
2134
2135         ScrollableArea already has "isScrolledProgrammatically", which I rename to "scrollShouldClearLatchedState"
2136         to reduce confusion. It might be possible to remove this in future with some refactoring.
2137
2138         Sadly we can no longer use SetForScope<> in FrameView after this change so add some manual save/restore code.
2139
2140         * dom/Element.cpp:
2141         (WebCore::Element::setScrollLeft):
2142         (WebCore::Element::setScrollTop):
2143         * page/EventHandler.cpp:
2144         (WebCore::EventHandler::completeWidgetWheelEvent):
2145         (WebCore::EventHandler::handleWheelEvent):
2146         * page/FrameView.cpp:
2147         (WebCore::FrameView::setFrameRect):
2148         (WebCore::FrameView::topContentInsetDidChange):
2149         (WebCore::FrameView::updateLayoutViewport):
2150         (WebCore::FrameView::setScrollPosition):
2151         (WebCore::FrameView::setWasScrolledByUser):
2152         * page/FrameView.h:
2153         * platform/ScrollView.h:
2154         (WebCore::ScrollView::inProgrammaticScroll const): Deleted.
2155         * platform/ScrollableArea.cpp:
2156         (WebCore::ScrollableArea::ScrollableArea):
2157         * platform/ScrollableArea.h:
2158         (WebCore::ScrollableArea::inProgrammaticScroll const):
2159         (WebCore::ScrollableArea::setInProgrammaticScroll):
2160         (WebCore::ScrollableArea::scrollShouldClearLatchedState const):
2161         (WebCore::ScrollableArea::setScrollShouldClearLatchedState):
2162         (WebCore::ScrollableArea::isScrolledProgrammatically const): Deleted.
2163         (WebCore::ScrollableArea::setScrolledProgrammatically): Deleted.
2164
2165 2019-04-04  Sihui Liu  <sihui_liu@apple.com>
2166
2167         Leak of UniqueIDBDatabase in network process running layout tests
2168         https://bugs.webkit.org/show_bug.cgi?id=196565
2169         <rdar://problem/49346139>
2170
2171         Reviewed by Geoffrey Garen.
2172
2173         UniqueIDBDatabase will null itself after it receives confirmation about connecton close from its clients, but it
2174         is possible that the web process to network process connection closes before servers gets the 
2175         confirmDidCloseFromServer. Therefore, we should let UniqueIDBDatabase forget connection when it receives a 
2176         conenctionClosedFromClient.
2177
2178         No new test because this bug is caused by race between network receiving conenctionClosedFromClient and 
2179         receiving confirmDidCloseFromServer. This is testable by running some existing layout tests in a row with leak 
2180         option.
2181
2182         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
2183         (WebCore::IDBServer::UniqueIDBDatabase::connectionClosedFromClient):
2184         (WebCore::IDBServer::UniqueIDBDatabase::confirmDidCloseFromServer):
2185
2186 2019-04-04  Chris Dumez  <cdumez@apple.com>
2187
2188         Unreviewed, fix iOS build with recent SDKs.
2189
2190         * platform/gamepad/cocoa/GameControllerGamepad.mm:
2191         (WebCore::GameControllerGamepad::GameControllerGamepad):
2192
2193 2019-04-04  Eric Carlson  <eric.carlson@apple.com>
2194
2195         [MediaStream] Host should be able to mute screen capture and camera/microphone independently
2196         https://bugs.webkit.org/show_bug.cgi?id=196555
2197         <rdar://problem/47303865>
2198
2199         Reviewed by Youenn Fablet.
2200
2201         Test: fast/mediastream/media-stream-page-muted.html
2202
2203         * Modules/mediastream/MediaStream.cpp:
2204         (WebCore::MediaStream::MediaStream): Call setCaptureTracksMuted to pass page muted 
2205         state to tracks.
2206         (WebCore::MediaStream::startProducingData): Ditto.
2207         (WebCore::MediaStream::setCaptureTracksMuted): New.
2208         * Modules/mediastream/MediaStream.h:
2209
2210         * Modules/mediastream/MediaStreamTrack.cpp:
2211         (WebCore::MediaStreamTrack::MediaStreamTrack): Call setMuted with page muted state.
2212         (WebCore::MediaStreamTrack::setMuted): Set muted according to page state and source type.
2213         (WebCore::MediaStreamTrack::pageMutedStateDidChange): Call setMuted.
2214         (WebCore::MediaStreamTrack::mediaState const): Update for new page state.
2215         * Modules/mediastream/MediaStreamTrack.h:
2216
2217         * page/MediaProducer.h: Split capture muted state into two: camera/microphone and screen.
2218
2219         * page/Page.h:
2220         (WebCore::Page::isMediaCaptureMuted const): Update for state changes.
2221
2222         * platform/mediastream/MediaStreamPrivate.cpp:
2223         (WebCore::MediaStreamPrivate::setCaptureTracksMuted): Deleted.
2224         (WebCore::MediaStreamPrivate::hasCaptureVideoSource const): Deleted.
2225         * platform/mediastream/MediaStreamPrivate.h:
2226
2227         * platform/mediastream/RealtimeMediaSource.cpp:
2228         (WebCore::RealtimeMediaSource::setMuted): Log state.
2229         (WebCore::RealtimeMediaSource::notifyMutedChange): Call notifyMutedObservers on the
2230         next runloop so events aren't dispatched synchronously.
2231
2232         * testing/Internals.cpp:
2233         (WebCore::Internals::setPageMuted): Add new state.
2234
2235 2019-04-04  Chris Dumez  <cdumez@apple.com>
2236
2237         Unreviewed, update r243884 to use macros in Compiler.h instead.
2238
2239         * platform/ios/LegacyTileGrid.mm:
2240         (WebCore::LegacyTileGrid::dropDistantTiles):
2241
2242 2019-04-04  Chris Fleizach  <cfleizach@apple.com>
2243
2244         AX: Crash under WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored()
2245         https://bugs.webkit.org/show_bug.cgi?id=196600
2246         <rdar://problem/49572996>
2247
2248         Reviewed by Joanmarie Diggs.
2249
2250         Audit AX code to not dereference renderer before checking if it's null.
2251         Not clear how to reproduce at this time.
2252
2253         * accessibility/AccessibilityRenderObject.cpp:
2254         (WebCore::webAreaIsPresentational):
2255         (WebCore::AccessibilityRenderObject::layoutCount const):
2256         (WebCore::AccessibilityRenderObject::widget const):
2257
2258 2019-04-04  Antti Koivisto  <antti@apple.com>
2259
2260         Compute accurate regions for touch-action
2261         https://bugs.webkit.org/show_bug.cgi?id=196536
2262         <rdar://problem/49516022>
2263
2264         Reviewed by Simon Fraser.
2265
2266         Tests: pointerevents/ios/touch-action-region-basic.html
2267                pointerevents/ios/touch-action-region-layers.html
2268                pointerevents/ios/touch-action-region-pan-x-y.html
2269
2270         - Use style system to compute effective touch-action without additional tree walks.
2271         - Compute touch-action region in a fake paint, at the same time with the event region.
2272
2273         This patch doesn't yet use the computed region for anything except test output.
2274
2275         * Sources.txt:
2276         * WebCore.xcodeproj/project.pbxproj:
2277         * css/StyleResolver.cpp:
2278         (WebCore::computeEffectiveTouchActions):
2279         (WebCore::StyleResolver::adjustRenderStyle):
2280
2281         Update RenderStyle::effectiveTouchAction.
2282
2283         * dom/Element.cpp:
2284         (WebCore::Element::computedTouchActions const):
2285
2286         Just get it from the style.
2287
2288         * platform/graphics/GraphicsLayer.cpp:
2289         (WebCore::GraphicsLayer::setEventRegion):
2290         (WebCore::GraphicsLayer::setTouchActionRegion):
2291         (WebCore::GraphicsLayer::dumpProperties const):
2292         * platform/graphics/GraphicsLayer.h:
2293         (WebCore::GraphicsLayer::touchActionRegion const):
2294         * platform/graphics/ca/GraphicsLayerCA.cpp:
2295         (WebCore::GraphicsLayerCA::setTouchActionRegion):
2296         * platform/graphics/ca/GraphicsLayerCA.h:
2297         * rendering/PaintInfo.h:
2298         * rendering/RenderBlock.cpp:
2299         (WebCore::RenderBlock::paintObject):
2300         * rendering/RenderLayer.cpp:
2301         (WebCore::RenderLayer::collectEventRegionForFragments):
2302         * rendering/RenderLayer.h:
2303         * rendering/RenderLayerBacking.cpp:
2304         (WebCore::RenderLayerBacking::updateConfiguration):
2305
2306         Need to do this for the top compositing layer too.
2307
2308         (WebCore::RenderLayerBacking::updateEventRegion):
2309
2310         Compute touch-action region too.
2311         As a basic optimization avoid doing any extra work if there are no elements with non-default touch-action property.
2312
2313         * rendering/TouchActionRegion.cpp: Added.
2314         (WebCore::toIndex):
2315         (WebCore::toTouchAction):
2316         (WebCore::toString):
2317         (WebCore::TouchActionRegion::unite):
2318         (WebCore::TouchActionRegion::actionsForPoint const):
2319         (WebCore::TouchActionRegion::translate):
2320         (WebCore::operator<<):
2321         * rendering/TouchActionRegion.h: Added.
2322
2323         Class for collecting and maintaining touch-action region.
2324
2325         (WebCore::TouchActionRegion::isEmpty const):
2326         (WebCore::TouchActionRegion::operator== const):
2327         * rendering/style/RenderStyle.h:
2328         (WebCore::RenderStyle::effectiveTouchActions const):
2329         (WebCore::RenderStyle::setEffectiveTouchActions):
2330
2331         Implement as inherited property for efficiency (touch-action itself is non-inherited).
2332
2333         * rendering/style/StyleRareInheritedData.cpp:
2334         (WebCore::StyleRareInheritedData::StyleRareInheritedData):
2335         (WebCore::StyleRareInheritedData::operator== const):
2336         * rendering/style/StyleRareInheritedData.h:
2337
2338 2019-04-04  Yusuke Suzuki  <ysuzuki@apple.com>
2339
2340         Unreviewed, fix linking error because the build of RTCIceTransport.cpp is handled in Xcode project side accidentally
2341         https://bugs.webkit.org/show_bug.cgi?id=196475
2342
2343         We did not have RTCIceTransport.cpp in Sources.txt.
2344
2345         * WebCore.xcodeproj/project.pbxproj:
2346
2347 2019-04-04  Yusuke Suzuki  <ysuzuki@apple.com>
2348
2349         [WebCore] Put most of derived classes of ScriptWrappable into IsoHeap
2350         https://bugs.webkit.org/show_bug.cgi?id=196475
2351
2352         Reviewed by Saam Barati.
2353
2354         This patch puts most of derived classes of ScriptWrappable into IsoHeap. We do not include derived classes of Event simply
2355         because Internal repository code also inherits it. After watching the result of this patch, we will try Event and its derived
2356         classes into IsoHeap too.
2357
2358         This patch makes the following things IsoHeap-allocated. These classes are listed by using lldb python script.
2359
2360             1. DOM collections (HTMLCollection etc.)
2361             2. WebAudio nodes
2362             3. IDB classes
2363             4. FileSystem API classes
2364             5. Canvas contexts
2365             6. WebRTC classses
2366             7. XMLHttpRequest related classes
2367             8. WebSocket related classes
2368             9. Worker and Worklet related classes
2369             10. Other misc classes
2370
2371         * Modules/applepay/ApplePaySession.cpp:
2372         * Modules/applepay/ApplePaySession.h:
2373         * Modules/encryptedmedia/MediaKeySession.cpp:
2374         * Modules/encryptedmedia/MediaKeySession.h:
2375         * Modules/encryptedmedia/legacy/WebKitMediaKeySession.cpp:
2376         * Modules/encryptedmedia/legacy/WebKitMediaKeySession.h:
2377         * Modules/entriesapi/DOMFileSystem.cpp:
2378         * Modules/entriesapi/DOMFileSystem.h:
2379         (WebCore::DOMFileSystem::createEntryForFile): Deleted.
2380         (WebCore::DOMFileSystem::name const): Deleted.
2381         * Modules/entriesapi/FileSystemDirectoryEntry.h:
2382         * Modules/entriesapi/FileSystemDirectoryReader.cpp:
2383         * Modules/entriesapi/FileSystemDirectoryReader.h:
2384         * Modules/entriesapi/FileSystemEntry.cpp:
2385         * Modules/entriesapi/FileSystemEntry.h:
2386         * Modules/entriesapi/FileSystemFileEntry.h:
2387         * Modules/geolocation/Geolocation.cpp:
2388         * Modules/geolocation/Geolocation.h:
2389         (WebCore::Geolocation::document const): Deleted.
2390         (WebCore::Geolocation::frame const): Deleted.
2391         (WebCore::Geolocation::resetIsAllowed): Deleted.
2392         (WebCore::Geolocation::isAllowed const): Deleted.
2393         (WebCore::Geolocation::isDenied const): Deleted.
2394         (WebCore::Geolocation::hasListeners const): Deleted.
2395         * Modules/indexeddb/IDBCursor.cpp:
2396         * Modules/indexeddb/IDBCursor.h:
2397         * Modules/indexeddb/IDBCursorWithValue.cpp:
2398         * Modules/indexeddb/IDBCursorWithValue.h:
2399         * Modules/indexeddb/IDBDatabase.cpp:
2400         * Modules/indexeddb/IDBDatabase.h:
2401         (WebCore::IDBDatabase::info const): Deleted.
2402         (WebCore::IDBDatabase::databaseConnectionIdentifier const): Deleted.
2403         (WebCore::IDBDatabase::connectionProxy): Deleted.
2404         (WebCore::IDBDatabase::isClosingOrClosed const): Deleted.
2405         * Modules/indexeddb/IDBKeyRange.cpp:
2406         * Modules/indexeddb/IDBKeyRange.h:
2407         (WebCore::IDBKeyRange::lower const): Deleted.
2408         (WebCore::IDBKeyRange::upper const): Deleted.
2409         (WebCore::IDBKeyRange::lowerOpen const): Deleted.
2410         (WebCore::IDBKeyRange::upperOpen const): Deleted.
2411         * Modules/indexeddb/IDBOpenDBRequest.cpp:
2412         * Modules/indexeddb/IDBOpenDBRequest.h:
2413         * Modules/indexeddb/IDBRequest.cpp:
2414         * Modules/indexeddb/IDBRequest.h:
2415         * Modules/indexeddb/IDBTransaction.cpp:
2416         * Modules/indexeddb/IDBTransaction.h:
2417         (WebCore::IDBTransaction::mode const): Deleted.
2418         (WebCore::IDBTransaction::info const): Deleted.
2419         (WebCore::IDBTransaction::database): Deleted.
2420         (WebCore::IDBTransaction::database const): Deleted.
2421         (WebCore::IDBTransaction::originalDatabaseInfo const): Deleted.
2422         (WebCore::IDBTransaction::isVersionChange const): Deleted.
2423         (WebCore::IDBTransaction::isReadOnly const): Deleted.
2424         (WebCore::IDBTransaction::isFinished const): Deleted.
2425         * Modules/mediarecorder/MediaRecorder.cpp:
2426         * Modules/mediarecorder/MediaRecorder.h:
2427         * Modules/mediasession/MediaRemoteControls.cpp:
2428         * Modules/mediasession/MediaRemoteControls.h:
2429         (WebCore::MediaRemoteControls::create): Deleted.
2430         (WebCore::MediaRemoteControls::previousTrackEnabled const): Deleted.
2431         (WebCore::MediaRemoteControls::nextTrackEnabled const): Deleted.
2432         * Modules/mediasource/MediaSource.cpp:
2433         * Modules/mediasource/MediaSource.h:
2434         * Modules/mediasource/SourceBuffer.cpp:
2435         * Modules/mediasource/SourceBuffer.h:
2436         * Modules/mediasource/SourceBufferList.cpp:
2437         * Modules/mediasource/SourceBufferList.h:
2438         * Modules/mediastream/CanvasCaptureMediaStreamTrack.cpp:
2439         * Modules/mediastream/CanvasCaptureMediaStreamTrack.h:
2440         * Modules/mediastream/MediaDeviceInfo.cpp:
2441         * Modules/mediastream/MediaDeviceInfo.h:
2442         (WebCore::MediaDeviceInfo::label const): Deleted.
2443         (WebCore::MediaDeviceInfo::deviceId const): Deleted.
2444         (WebCore::MediaDeviceInfo::groupId const): Deleted.
2445         (WebCore::MediaDeviceInfo::kind const): Deleted.
2446         * Modules/mediastream/MediaDevices.cpp:
2447         * Modules/mediastream/MediaDevices.h:
2448         * Modules/mediastream/MediaStream.cpp:
2449         * Modules/mediastream/MediaStream.h:
2450         * Modules/mediastream/MediaStreamTrack.cpp:
2451         * Modules/mediastream/MediaStreamTrack.h:
2452         * Modules/mediastream/RTCDTMFSender.cpp:
2453         * Modules/mediastream/RTCDTMFSender.h:
2454         * Modules/mediastream/RTCDataChannel.cpp:
2455         * Modules/mediastream/RTCDataChannel.h:
2456         * Modules/mediastream/RTCIceCandidate.cpp:
2457         * Modules/mediastream/RTCIceCandidate.h:
2458         (WebCore::RTCIceCandidate::candidate const): Deleted.
2459         (WebCore::RTCIceCandidate::sdpMid const): Deleted.
2460         (WebCore::RTCIceCandidate::sdpMLineIndex const): Deleted.
2461         (WebCore::RTCIceCandidate::setCandidate): Deleted.
2462         * Modules/mediastream/RTCIceTransport.cpp:
2463         * Modules/mediastream/RTCIceTransport.h:
2464         (WebCore::RTCIceTransport::create): Deleted.
2465         (WebCore::RTCIceTransport::state const): Deleted.
2466         (WebCore::RTCIceTransport::setState): Deleted.
2467         (WebCore::RTCIceTransport::gatheringState const): Deleted.
2468         (WebCore::RTCIceTransport::setGatheringState): Deleted.
2469         (WebCore::RTCIceTransport::RTCIceTransport): Deleted.
2470         * Modules/mediastream/RTCPeerConnection.cpp:
2471         * Modules/mediastream/RTCPeerConnection.h:
2472         * Modules/mediastream/RTCRtpReceiver.cpp:
2473         * Modules/mediastream/RTCRtpReceiver.h:
2474         (WebCore::RTCRtpReceiver::create): Deleted.
2475         (WebCore::RTCRtpReceiver::setBackend): Deleted.
2476         (WebCore::RTCRtpReceiver::getParameters): Deleted.
2477         (WebCore::RTCRtpReceiver::getContributingSources const): Deleted.
2478         (WebCore::RTCRtpReceiver::getSynchronizationSources const): Deleted.
2479         (WebCore::RTCRtpReceiver::track): Deleted.
2480         (WebCore::RTCRtpReceiver::backend): Deleted.
2481         * Modules/mediastream/RTCRtpSender.cpp:
2482         * Modules/mediastream/RTCRtpSender.h:
2483         (WebCore::RTCRtpSender::track): Deleted.
2484         (WebCore::RTCRtpSender::trackId const): Deleted.
2485         (WebCore::RTCRtpSender::trackKind const): Deleted.
2486         (WebCore::RTCRtpSender::mediaStreamIds const): Deleted.
2487         (WebCore::RTCRtpSender::setMediaStreamIds): Deleted.
2488         (WebCore::RTCRtpSender::isStopped const): Deleted.
2489         (WebCore::RTCRtpSender::backend): Deleted.
2490         * Modules/mediastream/RTCRtpTransceiver.cpp:
2491         * Modules/mediastream/RTCRtpTransceiver.h:
2492         (WebCore::RTCRtpTransceiver::create): Deleted.
2493         (WebCore::RTCRtpTransceiver::sender): Deleted.
2494         (WebCore::RTCRtpTransceiver::receiver): Deleted.
2495         (WebCore::RTCRtpTransceiver::iceTransport): Deleted.
2496         (WebCore::RTCRtpTransceiver::backend): Deleted.
2497         * Modules/mediastream/RTCSessionDescription.cpp:
2498         * Modules/mediastream/RTCSessionDescription.h:
2499         (WebCore::RTCSessionDescription::type const): Deleted.
2500         (WebCore::RTCSessionDescription::sdp const): Deleted.
2501         (WebCore::RTCSessionDescription::setSdp): Deleted.
2502         * Modules/notifications/Notification.cpp:
2503         * Modules/notifications/Notification.h:
2504         * Modules/paymentrequest/PaymentRequest.cpp:
2505         * Modules/paymentrequest/PaymentRequest.h:
2506         * Modules/paymentrequest/PaymentResponse.cpp:
2507         * Modules/paymentrequest/PaymentResponse.h:
2508         * Modules/speech/SpeechSynthesisUtterance.cpp:
2509         * Modules/speech/SpeechSynthesisUtterance.h:
2510         * Modules/webaudio/AnalyserNode.cpp:
2511         * Modules/webaudio/AnalyserNode.h:
2512         * Modules/webaudio/AudioBasicInspectorNode.cpp:
2513         * Modules/webaudio/AudioBasicInspectorNode.h:
2514         * Modules/webaudio/AudioBasicProcessorNode.cpp:
2515         * Modules/webaudio/AudioBasicProcessorNode.h:
2516         * Modules/webaudio/AudioBufferSourceNode.cpp:
2517         * Modules/webaudio/AudioBufferSourceNode.h:
2518         * Modules/webaudio/AudioContext.cpp:
2519         * Modules/webaudio/AudioContext.h:
2520         * Modules/webaudio/AudioDestinationNode.cpp:
2521         * Modules/webaudio/AudioDestinationNode.h:
2522         * Modules/webaudio/AudioNode.cpp:
2523         * Modules/webaudio/AudioNode.h:
2524         * Modules/webaudio/AudioScheduledSourceNode.cpp:
2525         * Modules/webaudio/AudioScheduledSourceNode.h:
2526         * Modules/webaudio/BiquadFilterNode.cpp:
2527         * Modules/webaudio/BiquadFilterNode.h:
2528         * Modules/webaudio/ChannelMergerNode.cpp:
2529         * Modules/webaudio/ChannelMergerNode.h:
2530         * Modules/webaudio/ChannelSplitterNode.cpp:
2531         * Modules/webaudio/ChannelSplitterNode.h:
2532         * Modules/webaudio/ConvolverNode.cpp:
2533         * Modules/webaudio/ConvolverNode.h:
2534         * Modules/webaudio/DefaultAudioDestinationNode.cpp:
2535         * Modules/webaudio/DefaultAudioDestinationNode.h:
2536         * Modules/webaudio/DelayNode.cpp:
2537         * Modules/webaudio/DelayNode.h:
2538         * Modules/webaudio/DynamicsCompressorNode.cpp:
2539         * Modules/webaudio/DynamicsCompressorNode.h:
2540         * Modules/webaudio/GainNode.cpp:
2541         * Modules/webaudio/GainNode.h:
2542         * Modules/webaudio/MediaElementAudioSourceNode.cpp:
2543         * Modules/webaudio/MediaElementAudioSourceNode.h:
2544         * Modules/webaudio/MediaStreamAudioDestinationNode.cpp:
2545         * Modules/webaudio/MediaStreamAudioDestinationNode.h:
2546         * Modules/webaudio/MediaStreamAudioSourceNode.cpp:
2547         * Modules/webaudio/MediaStreamAudioSourceNode.h:
2548         * Modules/webaudio/OfflineAudioContext.cpp:
2549         * Modules/webaudio/OfflineAudioContext.h:
2550         * Modules/webaudio/OfflineAudioDestinationNode.cpp:
2551         * Modules/webaudio/OfflineAudioDestinationNode.h:
2552         * Modules/webaudio/OscillatorNode.cpp:
2553         * Modules/webaudio/OscillatorNode.h:
2554         * Modules/webaudio/PannerNode.cpp:
2555         * Modules/webaudio/PannerNode.h:
2556         * Modules/webaudio/ScriptProcessorNode.cpp:
2557         * Modules/webaudio/ScriptProcessorNode.h:
2558         * Modules/webaudio/WaveShaperNode.cpp:
2559         * Modules/webaudio/WaveShaperNode.h:
2560         * Modules/webgpu/GPUCanvasContext.cpp:
2561         * Modules/webgpu/GPUCanvasContext.h:
2562         * Modules/websockets/WebSocket.cpp:
2563         * Modules/websockets/WebSocket.h:
2564         * Modules/webvr/VRDisplay.cpp:
2565         * Modules/webvr/VRDisplay.h:
2566         (WebCore::VRDisplay::isPresenting const): Deleted.
2567         (WebCore::VRDisplay::displayName const): Deleted.
2568         (WebCore::VRDisplay::displayId const): Deleted.
2569         (WebCore::VRDisplay::depthNear const): Deleted.
2570         (WebCore::VRDisplay::setDepthNear): Deleted.
2571         (WebCore::VRDisplay::depthFar const): Deleted.
2572         (WebCore::VRDisplay::setDepthFar): Deleted.
2573         (WebCore::VRDisplay::document): Deleted.
2574         * Sources.txt:
2575         * WebCore.xcodeproj/project.pbxproj:
2576         * animation/CSSAnimation.cpp:
2577         * animation/CSSAnimation.h:
2578         * animation/CSSTransition.cpp:
2579         * animation/CSSTransition.h:
2580         * animation/DeclarativeAnimation.cpp:
2581         * animation/DeclarativeAnimation.h:
2582         * animation/WebAnimation.cpp:
2583         * animation/WebAnimation.h:
2584         * bindings/js/ScriptWrappable.h:
2585         * css/CSSComputedStyleDeclaration.cpp:
2586         * css/CSSComputedStyleDeclaration.h:
2587         * css/CSSStyleDeclaration.cpp:
2588         (): Deleted.
2589         * css/CSSStyleDeclaration.h:
2590         * css/DOMMatrix.h:
2591         * css/DOMMatrixReadOnly.cpp:
2592         * css/DOMMatrixReadOnly.h:
2593         * css/FontFaceSet.cpp:
2594         * css/FontFaceSet.h:
2595         * css/PropertySetCSSStyleDeclaration.cpp:
2596         * css/PropertySetCSSStyleDeclaration.h:
2597         * css/WebKitCSSMatrix.cpp:
2598         * css/WebKitCSSMatrix.h:
2599         * css/typedom/TypedOMCSSImageValue.cpp: Added.
2600         * css/typedom/TypedOMCSSImageValue.h:
2601         * css/typedom/TypedOMCSSNumericValue.cpp: Added.
2602         * css/typedom/TypedOMCSSNumericValue.h:
2603         * css/typedom/TypedOMCSSStyleValue.cpp: Added.
2604         * css/typedom/TypedOMCSSStyleValue.h:
2605         * css/typedom/TypedOMCSSUnitValue.cpp: Added.
2606         * css/typedom/TypedOMCSSUnitValue.h:
2607         * css/typedom/TypedOMCSSUnparsedValue.cpp: Added.
2608         * css/typedom/TypedOMCSSUnparsedValue.h:
2609         * dom/AbortController.cpp:
2610         * dom/AbortController.h:
2611         * dom/AbortSignal.cpp:
2612         * dom/AbortSignal.h:
2613         * dom/AllDescendantsCollection.cpp: Copied from Source/WebCore/xml/XMLHttpRequestEventTarget.h.
2614         * dom/AllDescendantsCollection.h:
2615         * dom/ChildNodeList.cpp:
2616         * dom/ChildNodeList.h:
2617         * dom/ClassCollection.cpp:
2618         * dom/ClassCollection.h:
2619         * dom/DOMImplementation.cpp:
2620         * dom/DOMImplementation.h:
2621         (WebCore::DOMImplementation::ref): Deleted.
2622         (WebCore::DOMImplementation::deref): Deleted.
2623         (WebCore::DOMImplementation::document): Deleted.
2624         (WebCore::DOMImplementation::hasFeature): Deleted.
2625         * dom/DOMPoint.h:
2626         * dom/DOMPointReadOnly.cpp:
2627         * dom/DOMPointReadOnly.h:
2628         * dom/DOMQuad.cpp:
2629         * dom/DOMQuad.h:
2630         * dom/DOMRect.h:
2631         * dom/DOMRectReadOnly.cpp: Copied from Source/WebCore/dom/DOMPointReadOnly.cpp.
2632         * dom/DOMRectReadOnly.h:
2633         * dom/DataTransferItemList.cpp:
2634         * dom/DataTransferItemList.h:
2635         (WebCore::DataTransferItemList::ref): Deleted.
2636         (WebCore::DataTransferItemList::deref): Deleted.
2637         (WebCore::DataTransferItemList::dataTransfer): Deleted.
2638         (WebCore::DataTransferItemList::hasItems const): Deleted.
2639         (WebCore::DataTransferItemList::items const): Deleted.
2640         * dom/DatasetDOMStringMap.cpp:
2641         * dom/DatasetDOMStringMap.h:
2642         * dom/DocumentParser.h:
2643         * dom/EventTarget.cpp:
2644         * dom/EventTarget.h:
2645         * dom/LiveNodeList.cpp:
2646         * dom/LiveNodeList.h:
2647         * dom/MessageChannel.cpp:
2648         * dom/MessagePort.cpp:
2649         * dom/MessagePort.h:
2650         * dom/NameNodeList.cpp:
2651         * dom/NameNodeList.h:
2652         * dom/NamedNodeMap.cpp:
2653         * dom/NamedNodeMap.h:
2654         (WebCore::NamedNodeMap::NamedNodeMap): Deleted.
2655         (WebCore::NamedNodeMap::element): Deleted.
2656         * dom/NodeIterator.cpp:
2657         * dom/NodeIterator.h:
2658         (WebCore::NodeIterator::detach): Deleted.
2659         (WebCore::NodeIterator::referenceNode const): Deleted.
2660         (WebCore::NodeIterator::pointerBeforeReferenceNode const): Deleted.
2661         * dom/NodeList.cpp: Copied from Source/WebCore/xml/XMLHttpRequestEventTarget.h.
2662         * dom/NodeList.h:
2663         * dom/NodeRareData.cpp:
2664         * dom/ScriptExecutionContext.cpp:
2665         * dom/SimulatedClick.cpp:
2666         * dom/StaticNodeList.cpp:
2667         * dom/StaticNodeList.h:
2668         * dom/TagCollection.cpp:
2669         * dom/TagCollection.h:
2670         * dom/TreeWalker.cpp:
2671         * dom/TreeWalker.h:
2672         (WebCore::TreeWalker::create): Deleted.
2673         (WebCore::TreeWalker::currentNode): Deleted.
2674         (WebCore::TreeWalker::currentNode const): Deleted.
2675         * fileapi/Blob.cpp:
2676         * fileapi/Blob.h:
2677         * fileapi/File.cpp:
2678         * fileapi/File.h:
2679         * fileapi/FileList.cpp:
2680         * fileapi/FileList.h:
2681         (WebCore::FileList::create): Deleted.
2682         (WebCore::FileList::length const): Deleted.
2683         (WebCore::FileList::isEmpty const): Deleted.
2684         (WebCore::FileList::files const): Deleted.
2685         (WebCore::FileList::file const): Deleted.
2686         (WebCore::FileList::FileList): Deleted.
2687         (WebCore::FileList::append): Deleted.
2688         (WebCore::FileList::clear): Deleted.
2689         * fileapi/FileReader.cpp:
2690         * fileapi/FileReader.h:
2691         * html/CachedHTMLCollection.h:
2692         * html/GenericCachedHTMLCollection.cpp:
2693         * html/GenericCachedHTMLCollection.h:
2694         * html/HTMLAllCollection.cpp:
2695         * html/HTMLAllCollection.h:
2696         * html/HTMLCollection.cpp:
2697         * html/HTMLCollection.h:
2698         * html/HTMLFormControlsCollection.cpp:
2699         * html/HTMLFormControlsCollection.h:
2700         * html/HTMLNameCollection.cpp:
2701         * html/HTMLNameCollection.h:
2702         * html/HTMLOptionsCollection.cpp:
2703         * html/HTMLOptionsCollection.h:
2704         * html/HTMLTableRowsCollection.cpp:
2705         * html/HTMLTableRowsCollection.h:
2706         * html/ImageBitmap.cpp:
2707         * html/ImageBitmap.h:
2708         (WebCore::ImageBitmap::isDetached const): Deleted.
2709         (WebCore::ImageBitmap::buffer): Deleted.
2710         (WebCore::ImageBitmap::originClean const): Deleted.
2711         * html/LabelsNodeList.cpp:
2712         * html/LabelsNodeList.h:
2713         * html/MediaController.cpp:
2714         * html/MediaController.h:
2715         * html/OffscreenCanvas.cpp:
2716         * html/OffscreenCanvas.h:
2717         * html/RadioNodeList.cpp:
2718         * html/RadioNodeList.h:
2719         * html/canvas/CanvasRenderingContext.cpp:
2720         * html/canvas/CanvasRenderingContext.h:
2721         * html/canvas/CanvasRenderingContext2D.cpp:
2722         * html/canvas/CanvasRenderingContext2D.h:
2723         * html/canvas/CanvasRenderingContext2DBase.cpp:
2724         * html/canvas/CanvasRenderingContext2DBase.h:
2725         * html/canvas/GPUBasedCanvasRenderingContext.h:
2726         * html/canvas/ImageBitmapRenderingContext.cpp:
2727         * html/canvas/ImageBitmapRenderingContext.h:
2728         * html/canvas/OffscreenCanvasRenderingContext2D.cpp:
2729         * html/canvas/OffscreenCanvasRenderingContext2D.h:
2730         * html/canvas/PaintRenderingContext2D.cpp:
2731         * html/canvas/PaintRenderingContext2D.h:
2732         * html/canvas/PlaceholderRenderingContext.cpp:
2733         * html/canvas/PlaceholderRenderingContext.h:
2734         * html/canvas/WebGL2RenderingContext.cpp:
2735         * html/canvas/WebGL2RenderingContext.h:
2736         * html/canvas/WebGLRenderingContext.cpp:
2737         * html/canvas/WebGLRenderingContext.h:
2738         * html/canvas/WebGLRenderingContextBase.cpp:
2739         * html/canvas/WebGLRenderingContextBase.h:
2740         * html/track/AudioTrackList.h:
2741         * html/track/DataCue.cpp:
2742         * html/track/DataCue.h:
2743         * html/track/InbandDataTextTrack.cpp:
2744         * html/track/InbandDataTextTrack.h:
2745         * html/track/InbandGenericTextTrack.cpp:
2746         * html/track/InbandGenericTextTrack.h:
2747         * html/track/InbandTextTrack.cpp:
2748         * html/track/InbandTextTrack.h:
2749         * html/track/InbandWebVTTTextTrack.cpp:
2750         * html/track/InbandWebVTTTextTrack.h:
2751         * html/track/LoadableTextTrack.cpp:
2752         * html/track/LoadableTextTrack.h:
2753         * html/track/TextTrack.cpp:
2754         * html/track/TextTrack.h:
2755         * html/track/TextTrackCue.cpp:
2756         * html/track/TextTrackCue.h:
2757         * html/track/TextTrackCueGeneric.cpp:
2758         * html/track/TextTrackCueGeneric.h:
2759         * html/track/TextTrackList.cpp:
2760         * html/track/TextTrackList.h:
2761         * html/track/TrackListBase.cpp:
2762         * html/track/TrackListBase.h:
2763         * html/track/VTTCue.cpp:
2764         * html/track/VTTCue.h:
2765         * html/track/VideoTrackList.h:
2766         * loader/appcache/DOMApplicationCache.cpp:
2767         * loader/appcache/DOMApplicationCache.h:
2768         * page/AbstractDOMWindow.cpp:
2769         * page/AbstractDOMWindow.h:
2770         * page/BarProp.cpp:
2771         * page/BarProp.h:
2772         (WebCore::BarProp::create): Deleted.
2773         * page/DOMWindow.cpp:
2774         * page/DOMWindow.h:
2775         * page/EventSource.cpp:
2776         * page/EventSource.h:
2777         * page/History.cpp:
2778         * page/History.h:
2779         * page/Location.cpp:
2780         * page/Location.h:
2781         (WebCore::Location::create): Deleted.
2782         (WebCore::Location::toString const): Deleted.
2783         * page/Navigator.cpp:
2784         * page/Navigator.h:
2785         * page/Performance.cpp:
2786         * page/Performance.h:
2787         * page/RemoteDOMWindow.cpp:
2788         * page/RemoteDOMWindow.h:
2789         * page/Screen.cpp:
2790         * page/Screen.h:
2791         * page/VisualViewport.cpp:
2792         * page/VisualViewport.h:
2793         * plugins/DOMMimeTypeArray.cpp:
2794         * plugins/DOMMimeTypeArray.h:
2795         (WebCore::DOMMimeTypeArray::create): Deleted.
2796         * plugins/DOMPlugin.cpp:
2797         * plugins/DOMPlugin.h:
2798         (WebCore::DOMPlugin::create): Deleted.
2799         * plugins/DOMPluginArray.cpp:
2800         * plugins/DOMPluginArray.h:
2801         (WebCore::DOMPluginArray::create): Deleted.
2802         * storage/Storage.cpp:
2803         * storage/Storage.h:
2804         (WebCore::Storage::area const): Deleted.
2805         * workers/AbstractWorker.cpp:
2806         * workers/AbstractWorker.h:
2807         * workers/DedicatedWorkerGlobalScope.cpp:
2808         * workers/DedicatedWorkerGlobalScope.h:
2809         * workers/Worker.cpp:
2810         * workers/Worker.h:
2811         * workers/WorkerGlobalScope.cpp:
2812         * workers/WorkerGlobalScope.h:
2813         * workers/service/ServiceWorker.cpp:
2814         * workers/service/ServiceWorker.h:
2815         * workers/service/ServiceWorkerContainer.cpp:
2816         * workers/service/ServiceWorkerContainer.h:
2817         * workers/service/ServiceWorkerGlobalScope.cpp:
2818         * workers/service/ServiceWorkerGlobalScope.h:
2819         * workers/service/ServiceWorkerRegistration.cpp:
2820         * workers/service/ServiceWorkerRegistration.h:
2821         * worklets/PaintWorkletGlobalScope.cpp:
2822         * worklets/PaintWorkletGlobalScope.h:
2823         * worklets/Worklet.cpp:
2824         * worklets/Worklet.h:
2825         * worklets/WorkletGlobalScope.cpp:
2826         * worklets/WorkletGlobalScope.h:
2827         * xml/XMLHttpRequest.cpp:
2828         * xml/XMLHttpRequest.h:
2829         * xml/XMLHttpRequestEventTarget.h:
2830         * xml/XMLHttpRequestUpload.cpp:
2831         * xml/XMLHttpRequestUpload.h:
2832         * xml/XPathParser.cpp:
2833
2834 2019-04-04  Chris Dumez  <cdumez@apple.com>
2835
2836         Unreviewed, fix iOS build with recent SDKs.
2837
2838         std::ptr_fun() is deprecated.
2839
2840         * platform/ios/LegacyTileGrid.mm:
2841         (WebCore::LegacyTileGrid::dropDistantTiles):
2842
2843 2019-04-04  Antoine Quint  <graouts@apple.com>
2844
2845         [Web Animations] JS wrapper may be deleted while animation is yet to dispatch its finish event
2846         https://bugs.webkit.org/show_bug.cgi?id=196118
2847         <rdar://problem/46614137>
2848
2849         Reviewed by Ryosuke Niwa.
2850
2851         Test: webanimations/js-wrapper-kept-alive.html
2852
2853         We need to teach WebAnimation to keep its JS wrapper alive if it's relevant or could become relevant again by virtue of having a timeline.
2854
2855         * animation/WebAnimation.cpp:
2856         (WebCore::WebAnimation::stop): Drive-by fix for the missing superclass method call.
2857         (WebCore::WebAnimation::hasPendingActivity const):
2858         * animation/WebAnimation.h:
2859
2860 2019-04-04  Miguel Gomez  <magomez@igalia.com>
2861
2862         [GTK][WPE] Use a timer to request the creation of pending tiles
2863         https://bugs.webkit.org/show_bug.cgi?id=196594
2864
2865         Reviewed by Žan Doberšek.
2866
2867         Use a timer to request pending tile creation, as calls to notifyFlushRequired() are discarded
2868         while inside a layer flush.
2869
2870         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
2871         (WebCore::CoordinatedGraphicsLayer::CoordinatedGraphicsLayer):
2872         (WebCore::CoordinatedGraphicsLayer::flushCompositingStateForThisLayerOnly):
2873         (WebCore::CoordinatedGraphicsLayer::updateContentBuffers):
2874         (WebCore::CoordinatedGraphicsLayer::requestPendingTileCreationTimerFired):
2875         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
2876
2877 2019-04-03  Carlos Garcia Campos  <cgarcia@igalia.com>
2878
2879         [ATK] Wrong index passed to AtkObject::children-changed::add signal in AXObjectCache::attachWrapper()
2880         https://bugs.webkit.org/show_bug.cgi?id=196538
2881
2882         Reviewed by Michael Catanzaro.
2883
2884         In most of the cases the parent is not found, probably because the child is not a direct descendant of the
2885         parent returned by parentObjectUnignored(). We need to handle the case of find() returning notFound.
2886
2887         * accessibility/atk/AXObjectCacheAtk.cpp:
2888         (WebCore::AXObjectCache::attachWrapper): Use -1 as the index when find() returns notFound.
2889
2890 2019-04-03  Timothy Hatcher  <timothy@apple.com>
2891
2892         Update AutoFill field icons to be SVG instead of PNG images.
2893         https://bugs.webkit.org/show_bug.cgi?id=196557
2894         rdar://problem/48292514
2895
2896         Reviewed by Tim Horton.
2897
2898         * css/html.css:
2899         (input::-webkit-credentials-auto-fill-button):
2900         (input::-webkit-contacts-auto-fill-button):
2901         (input::-webkit-credit-card-auto-fill-button):
2902
2903 2019-04-03  Simon Fraser  <simon.fraser@apple.com>
2904
2905         Simplify some "programmaticScroll" code paths
2906         https://bugs.webkit.org/show_bug.cgi?id=196589
2907
2908         Reviewed by Zalan Bujtas.
2909
2910         AsyncScrollingCoordinator::scheduleUpdateScrollPositionAfterAsyncScroll() just returned early if programmaticScroll
2911         was true, so instead, just never call it. This means we can remove the "programmaticScroll" argument from 
2912         scheduleUpdateScrollPositionAfterAsyncScroll(). Also change some callers to use the ScrollType enum
2913         instead of a bool.
2914
2915         Now, ThreadedScrollingTree::scrollingTreeNodeDidScroll() just returns early. Programmatic scrolls
2916         update state on the main thread before updating the scrolling tree, so this makes sense.
2917
2918         * page/scrolling/AsyncScrollingCoordinator.cpp:
2919         (WebCore::AsyncScrollingCoordinator::requestScrollPositionUpdate):
2920         (WebCore::AsyncScrollingCoordinator::scheduleUpdateScrollPositionAfterAsyncScroll):
2921         (WebCore::AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScrollTimerFired):
2922         (WebCore::AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScroll):
2923         (WebCore::AsyncScrollingCoordinator::reconcileScrollingState):
2924         * page/scrolling/AsyncScrollingCoordinator.h:
2925         (WebCore::AsyncScrollingCoordinator::ScheduledScrollUpdate::ScheduledScrollUpdate):
2926         (WebCore::AsyncScrollingCoordinator::ScheduledScrollUpdate::matchesUpdateType const):
2927         * page/scrolling/ScrollingCoordinator.cpp:
2928         (WebCore::operator<<):
2929         * page/scrolling/ScrollingCoordinator.h:
2930         (WebCore::ScrollingCoordinator::reconcileScrollingState):
2931         * page/scrolling/ThreadedScrollingTree.cpp:
2932         (WebCore::ThreadedScrollingTree::scrollingTreeNodeDidScroll):
2933
2934 2019-04-03  Youenn Fablet  <youenn@apple.com>
2935
2936         Add logging and ASSERTs to investigate issue with VPModuleInitialize
2937         https://bugs.webkit.org/show_bug.cgi?id=196573
2938
2939         Reviewed by Eric Carlson.
2940
2941         Add some ASSERTs.
2942         No change of behavior.
2943
2944         * platform/mediastream/libwebrtc/LibWebRTCProviderCocoa.cpp:
2945         (WebCore::LibWebRTCProviderCocoa::createDecoderFactory):
2946         (WebCore::LibWebRTCProviderCocoa::createEncoderFactory):
2947
2948 2019-04-03  Simon Fraser  <simon.fraser@apple.com>
2949
2950         Remove some redundant memebers from ScrollingStateFrameScrollingNode
2951         https://bugs.webkit.org/show_bug.cgi?id=196571
2952
2953         Reviewed by Zalan Bujtas.
2954
2955         m_requestedScrollPosition and m_requestedScrollPositionRepresentsProgrammaticScroll were
2956         duplicated on ScrollingStateFrameScrollingNode and ScrollingStateScrollingNode, so
2957         remove them from the derived class.
2958
2959         * page/scrolling/ScrollingStateFrameScrollingNode.cpp:
2960         (WebCore::ScrollingStateFrameScrollingNode::ScrollingStateFrameScrollingNode):
2961         (WebCore::ScrollingStateFrameScrollingNode::dumpProperties const):
2962         * page/scrolling/ScrollingStateFrameScrollingNode.h:
2963
2964 2019-04-03  Said Abou-Hallawa  <sabouhallawa@apple.com>
2965
2966         REGRESSION (r220717): Assertion fires when animating an SVG rounded corner rect till it collapses
2967         https://bugs.webkit.org/show_bug.cgi?id=196518
2968
2969         Reviewed by Simon Fraser.
2970
2971         r220717 made RenderSVGRect clear its m_path in updateShapeFromElement().
2972
2973         RenderSVGRect tries to optimize its layout and drawing if the rectangle
2974         is not rounded. So it uses the flag m_usePathFallback to know whether to
2975         use m_path or m_innerStrokeRect and m_outerStrokeRect. If the rectangle
2976         is rounded but its boundingSize is empty, m_path will be cleared,
2977         m_innerStrokeRect and m_outerStrokeRect will be recalculated but
2978         m_usePathFallback will not be reset to false. Therefore when calling 
2979         RenderSVGRect::isEmpty(), it will call RenderSVGShape::isEmpty() which
2980         will assert since m_path is null.
2981
2982         Test: svg/animations/animate-rounded-corner-rect-zero-height.svg
2983
2984         * rendering/svg/RenderSVGRect.cpp:
2985         (WebCore::RenderSVGRect::updateShapeFromElement):
2986         Reset m_usePathFallback to false once clearPath() is called.
2987
2988 2019-04-03  Ryosuke Niwa  <rniwa@webkit.org>
2989
2990         Nullptr crash in InlineTextBox::selectionState via TextIndicator::createWithRange
2991         https://bugs.webkit.org/show_bug.cgi?id=196579
2992
2993         Reviewed by Simon Fraser.
2994
2995         Avoid crashing accessing the unengated optional's value in relese builds for now.
2996
2997         Unfortunately, fixing the underlying cause of the selection states of RenderView & RenderObject
2998         getting out out of sync would require a significant re-architecturing of the whole selection
2999         repainting / state managing mechanism.
3000
3001         * rendering/SelectionRangeData.h:
3002         (WebCore::SelectionRangeData::startPosition const):
3003         (WebCore::SelectionRangeData::endPosition const):
3004
3005 2019-04-03  Myles C. Maxfield  <mmaxfield@apple.com>
3006
3007         -apple-trailing-word is needed for browser detection
3008         https://bugs.webkit.org/show_bug.cgi?id=196575
3009
3010         Unreviewed.
3011
3012         This is an unreviewed partial revert of r243819. Turns out there are some websites
3013         which use this property to do browser detection. So, we need to continue to parse
3014         the property, but we don't need the property to do anything.
3015
3016         Test: fast/text/trailing-word-detection.html
3017
3018         * Configurations/FeatureDefines.xcconfig:
3019         * css/CSSComputedStyleDeclaration.cpp:
3020         (WebCore::ComputedStyleExtractor::valueForPropertyinStyle):
3021         * css/CSSPrimitiveValueMappings.h:
3022         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
3023         (WebCore::CSSPrimitiveValue::operator TrailingWord const):
3024         * css/CSSProperties.json:
3025         * css/CSSValueKeywords.in:
3026         * css/parser/CSSParserFastPaths.cpp:
3027         (WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
3028         (WebCore::CSSParserFastPaths::isKeywordPropertyID):
3029         * rendering/style/RenderStyle.h:
3030         (WebCore::RenderStyle::trailingWord const):
3031         (WebCore::RenderStyle::setTrailingWord):
3032         (WebCore::RenderStyle::initialTrailingWord):
3033         * rendering/style/RenderStyleConstants.h:
3034
3035 2019-04-03  Don Olmstead  <don.olmstead@sony.com>
3036
3037         [CMake][WTF] Mirror XCode header directories
3038         https://bugs.webkit.org/show_bug.cgi?id=191662
3039
3040         Reviewed by Konstantin Tokarev.
3041
3042         Use WTFFramework as a dependency and include frameworks/WTF.cmake for AppleWin internal
3043         builds.
3044
3045         * CMakeLists.txt:
3046         * PlatformWin.cmake:
3047
3048 2019-04-03  Said Abou-Hallawa  <sabouhallawa@apple.com>
3049
3050         Remove SVG properties tear-off objects
3051         https://bugs.webkit.org/show_bug.cgi?id=191237
3052
3053         Reviewed by Simon Fraser.
3054
3055         This patch cleans the code from unused SVG sources and get rid off the
3056         remaining SVG properties tear-off objects. Here are more details:
3057
3058         -- Remove the SVGAttributeAnimationController and move its code to the
3059            SVGAnimateElementBase. SVGAttributeAnimationController was introduced
3060            to allow animating the SVG properties whether they are backed by tear
3061            off objects or not. Since there will be no tear off objects anymore,
3062            one animation controller will be needed. But in this case, it will be
3063            better if we make SVGAnimateElementBase is the animation controller
3064            and make it manage the animator directly.
3065
3066         -- Remove SVGAttributeRegistry, SVGAttributeOwnerProxy and the virtual
3067            function SVGElement::attributeOwnerProxy(). Remove also all the
3068            overriding functions attributeOwnerProxy() from all the SVGElements.
3069
3070         -- Remove isKnownAttribute() from all the SVG header files except from 
3071            four classes: SVGURIReference, SVGFitToViewBox, SVGLangSpace
3072            and SVGExternalResourcesRequired.
3073
3074         -- Remove all the SVG animated properties classifying functions from
3075            SVGElement. This is now handled by SVGPropertyRegistry.
3076
3077         -- There is no need for the enum AnimatedPropertyType anymore. The SVG
3078            property accessor knows its type, knows how to access it and know what
3079            animator it should be created for it.
3080
3081         * Sources.txt:
3082         * WebCore.xcodeproj/project.pbxproj:
3083         * dom/Element.cpp:
3084         (WebCore::Element::synchronizeAllAttributes const):
3085         (WebCore::Element::synchronizeAttribute const):
3086         (WebCore::Element::fastAttributeLookupAllowed const):
3087         These functions are surprisingly marked 'const'. They were calling 'const'
3088         functions in SVGElement and SVGElement was casting 'this' as non 'const'
3089         before calling the non 'const' functions through the non 'const' 'this'
3090         pointer. Change this by moving the casting to the Element functions.
3091
3092         * rendering/svg/RenderSVGResourceGradient.cpp:
3093         (WebCore::RenderSVGResourceGradient::applyResource):
3094         * rendering/svg/RenderSVGResourcePattern.cpp:
3095         (WebCore::RenderSVGResourcePattern::applyResource):
3096         * svg/SVGAElement.h:
3097         * svg/SVGAltGlyphElement.h:
3098         * svg/SVGAnimateElementBase.cpp:
3099         (WebCore::SVGAnimateElementBase::SVGAnimateElementBase):
3100         (WebCore::SVGAnimateElementBase::animator const):
3101         (WebCore::SVGAnimateElementBase::hasInvalidCSSAttributeType const):
3102         (WebCore::SVGAnimateElementBase::isDiscreteAnimator const):
3103         (WebCore::SVGAnimateElementBase::setTargetElement):
3104         (WebCore::SVGAnimateElementBase::setAttributeName):
3105         (WebCore::SVGAnimateElementBase::resetAnimation):
3106         (WebCore::SVGAnimateElementBase::calculateFromAndToValues):
3107         (WebCore::SVGAnimateElementBase::calculateFromAndByValues):
3108         (WebCore::SVGAnimateElementBase::calculateToAtEndOfDurationValue):
3109         (WebCore::SVGAnimateElementBase::resetAnimatedType):
3110         (WebCore::SVGAnimateElementBase::calculateAnimatedValue):
3111         (WebCore::SVGAnimateElementBase::applyResultsToTarget):
3112         (WebCore::SVGAnimateElementBase::clearAnimatedType):
3113         (WebCore::SVGAnimateElementBase::calculateDistance):
3114         (WebCore::SVGAnimateElementBase::attributeAnimationController): Deleted.
3115         (WebCore::SVGAnimateElementBase::determineAnimatedPropertyType const): Deleted.
3116         (WebCore::SVGAnimateElementBase::isAdditive const): Deleted.
3117         * svg/SVGAnimateElementBase.h:
3118         (WebCore::SVGAnimateElementBase::animatorIfExists const):
3119         (WebCore::SVGAnimateElementBase::attributeAnimationControllerIfExists const): Deleted.
3120         The order of the functions was changed to resemble the order of running
3121         the animation:
3122           -- Setting the animation range
3123           -- Starting the animation
3124           -- Progressing the animation
3125           -- Applying the the progressed animaVal() to the target element
3126           -- Stopping the animation
3127
3128         * svg/SVGAnimateMotionElement.cpp:
3129         (WebCore::SVGAnimateMotionElement::calculateDistance):
3130         * svg/SVGAnimateMotionElement.h:
3131         * svg/SVGAnimationElement.cpp:
3132         (WebCore::SVGAnimationElement::calculateKeyTimesForCalcModePaced):
3133         (WebCore::SVGAnimationElement::shouldApplyAnimation): Deleted.
3134         * svg/SVGAnimationElement.h:
3135         (WebCore::SVGAnimationElement::attributeRegistry): Deleted.
3136         (WebCore::SVGAnimationElement::calculateDistance): Deleted.
3137         * svg/SVGAttributeAnimationController.cpp: Removed.
3138         * svg/SVGAttributeAnimationController.h: Removed.
3139         * svg/SVGAttributeAnimationControllerBase.cpp: Removed.
3140         * svg/SVGAttributeAnimationControllerBase.h: Removed.
3141         * svg/SVGCircleElement.h:
3142         * svg/SVGClipPathElement.h:
3143         * svg/SVGComponentTransferFunctionElement.h:
3144         * svg/SVGCursorElement.h:
3145         * svg/SVGDefsElement.h:
3146         * svg/SVGElement.cpp:
3147         (WebCore::SVGElement::synchronizeAttribute):
3148         (WebCore::SVGElement::synchronizeAllAttributes):
3149         (WebCore::SVGElement::synchronizeAllAnimatedSVGAttribute):
3150         (WebCore::createAttributeNameToAnimatedPropertyTypeMap): Deleted.
3151         (WebCore::attributeNameToAnimatedPropertyTypeMap): Deleted.
3152         (WebCore::createCSSPropertyWithSVGDOMNameToAnimatedPropertyTypeMap): Deleted.
3153         (WebCore::cssPropertyWithSVGDOMNameToAnimatedPropertyTypeMap): Deleted.
3154         (WebCore::SVGElement::animatedPropertyTypesForAttribute): Deleted.
3155         (WebCore::SVGElement::synchronizeAnimatedSVGAttribute const): Deleted.
3156         (WebCore::SVGElement::isAnimatableCSSProperty): Deleted.
3157         (WebCore::SVGElement::isPresentationAttributeWithSVGDOM): Deleted.
3158         * svg/SVGElement.h:
3159         (WebCore::SVGElement::attributeOwnerProxy const): Deleted.
3160         (WebCore::SVGElement::attributeRegistry): Deleted.
3161         (WebCore::SVGElement::synchronizeAttribute): Deleted.
3162         (WebCore::SVGElement::synchronizeAttributes): Deleted.
3163         (WebCore::SVGElement::animatedTypes const): Deleted.
3164         (WebCore::SVGElement::lookupAnimatedProperty const): Deleted.
3165         (WebCore::SVGElement::lookupOrCreateAnimatedProperty): Deleted.
3166         (WebCore::SVGElement::lookupOrCreateAnimatedProperties): Deleted.
3167         (WebCore::SVGElement::isKnownAttribute): Deleted.
3168         * svg/SVGEllipseElement.h:
3169         * svg/SVGExternalResourcesRequired.h:
3170         (WebCore::SVGExternalResourcesRequired::attributeRegistry): Deleted.
3171         (WebCore::SVGExternalResourcesRequired::attributeOwnerProxy): Deleted.
3172         * svg/SVGFEBlendElement.h:
3173         * svg/SVGFEColorMatrixElement.h:
3174         * svg/SVGFEComponentTransferElement.h:
3175         * svg/SVGFECompositeElement.h:
3176         * svg/SVGFEConvolveMatrixElement.h:
3177         * svg/SVGFEDiffuseLightingElement.h:
3178         * svg/SVGFEDisplacementMapElement.h:
3179         * svg/SVGFEDropShadowElement.h:
3180         * svg/SVGFEGaussianBlurElement.h:
3181         * svg/SVGFEImageElement.h:
3182         * svg/SVGFELightElement.h:
3183         * svg/SVGFEMergeNodeElement.h:
3184         * svg/SVGFEMorphologyElement.h:
3185         * svg/SVGFEOffsetElement.h:
3186         * svg/SVGFESpecularLightingElement.h:
3187         * svg/SVGFETileElement.h:
3188         * svg/SVGFETurbulenceElement.h:
3189         * svg/SVGFilterElement.h:
3190         * svg/SVGFilterPrimitiveStandardAttributes.h:
3191         (WebCore::SVGFilterPrimitiveStandardAttributes::attributeRegistry): Deleted.
3192         * svg/SVGFitToViewBox.h:
3193         (WebCore::SVGFitToViewBox::attributeRegistry): Deleted.
3194         * svg/SVGFontElement.h:
3195         * svg/SVGForeignObjectElement.h:
3196         * svg/SVGGElement.h:
3197         * svg/SVGGeometryElement.h:
3198         * svg/SVGGlyphRefElement.h:
3199         * svg/SVGGradientElement.cpp:
3200         (WebCore::SVGGradientElement::svgAttributeChanged):
3201         * svg/SVGGradientElement.h:
3202         (WebCore::SVGGradientElement::attributeRegistry): Deleted.
3203         (WebCore::SVGGradientElement::isKnownAttribute): Deleted.
3204         * svg/SVGGraphicsElement.h:
3205         (WebCore::SVGGraphicsElement::attributeRegistry): Deleted.
3206         * svg/SVGImageElement.h:
3207         * svg/SVGLineElement.h:
3208         * svg/SVGLinearGradientElement.h:
3209         * svg/SVGMPathElement.h:
3210         * svg/SVGMarkerElement.cpp:
3211         * svg/SVGMarkerElement.h:
3212         * svg/SVGMaskElement.h:
3213         * svg/SVGPathElement.h:
3214         * svg/SVGPatternElement.h:
3215         * svg/SVGPolyElement.h:
3216         * svg/SVGRadialGradientElement.h:
3217         * svg/SVGRectElement.h:
3218         * svg/SVGSVGElement.h:
3219         * svg/SVGScriptElement.h:
3220         * svg/SVGStopElement.h:
3221         * svg/SVGSwitchElement.h:
3222         * svg/SVGSymbolElement.h:
3223         * svg/SVGTRefElement.h:
3224         * svg/SVGTests.cpp:
3225         (WebCore::SVGTests::svgAttributeChanged):
3226         (WebCore::SVGTests::attributeRegistry): Deleted.
3227         (WebCore::SVGTests::isKnownAttribute): Deleted.
3228         * svg/SVGTests.h:
3229         * svg/SVGTextContentElement.cpp:
3230         * svg/SVGTextContentElement.h:
3231         (WebCore::SVGTextContentElement::attributeRegistry): Deleted.
3232         * svg/SVGTextPathElement.h:
3233         * svg/SVGTextPositioningElement.h:
3234         (WebCore::SVGTextPositioningElement::attributeRegistry): Deleted.
3235         * svg/SVGURIReference.cpp:
3236         (WebCore::SVGURIReference::SVGURIReference):
3237         (WebCore::SVGURIReference::attributeRegistry): Deleted.
3238         * svg/SVGURIReference.h:
3239         * svg/SVGUseElement.h:
3240         * svg/SVGViewElement.h:
3241         * svg/SVGViewSpec.cpp:
3242         (WebCore::SVGViewSpec::SVGViewSpec):
3243         * svg/SVGViewSpec.h:
3244         * svg/SVGZoomAndPanType.h:
3245         * svg/properties/SVGAnimatedListPropertyTearOff.h: Removed.
3246         * svg/properties/SVGAnimatedPropertyAnimator.h:
3247         * svg/properties/SVGAnimatedPropertyAnimatorImpl.h:
3248         * svg/properties/SVGAnimatedPropertyPairAnimator.h:
3249         * svg/properties/SVGAnimatedPropertyPairAnimatorImpl.h:
3250         * svg/properties/SVGAnimatedPropertyTearOff.h: Removed.
3251         * svg/properties/SVGAnimatedPropertyType.h: Removed.
3252
3253         * svg/properties/SVGAnimationAdditiveFunction.h:
3254         (WebCore::SVGAnimationAdditiveFunction::animate):
3255         (WebCore::SVGAnimationAdditiveFunction::progress): Deleted.
3256         * svg/properties/SVGAnimationAdditiveListFunctionImpl.h:
3257         (WebCore::SVGAnimationLengthListFunction::animate):
3258         (WebCore::SVGAnimationNumberListFunction::animate):
3259         (WebCore::SVGAnimationPointListFunction::animate):
3260         (WebCore::SVGAnimationTransformListFunction::animate):
3261         (WebCore::SVGAnimationLengthListFunction::progress): Deleted.
3262         (WebCore::SVGAnimationNumberListFunction::progress): Deleted.
3263         (WebCore::SVGAnimationPointListFunction::progress): Deleted.
3264         (WebCore::SVGAnimationTransformListFunction::progress): Deleted.
3265         * svg/properties/SVGAnimationAdditiveValueFunctionImpl.h:
3266         (WebCore::SVGAnimationAngleFunction::animate):
3267         (WebCore::SVGAnimationColorFunction::animate):
3268         (WebCore::SVGAnimationIntegerFunction::animate):
3269         (WebCore::SVGAnimationLengthFunction::animate):
3270         (WebCore::SVGAnimationNumberFunction::animate):
3271         (WebCore::SVGAnimationPathSegListFunction::animate):
3272         (WebCore::SVGAnimationRectFunction::animate):
3273         (WebCore::SVGAnimationAngleFunction::progress): Deleted.
3274         (WebCore::SVGAnimationColorFunction::progress): Deleted.
3275         (WebCore::SVGAnimationIntegerFunction::progress): Deleted.
3276         (WebCore::SVGAnimationLengthFunction::progress): Deleted.
3277         (WebCore::SVGAnimationNumberFunction::progress): Deleted.
3278         (WebCore::SVGAnimationPathSegListFunction::progress): Deleted.
3279         (WebCore::SVGAnimationRectFunction::progress): Deleted.
3280         * svg/properties/SVGAnimationDiscreteFunction.h:
3281         (WebCore::SVGAnimationDiscreteFunction::animate):
3282         (WebCore::SVGAnimationDiscreteFunction::progress): Deleted.
3283         * svg/properties/SVGAnimationFunction.h:
3284         (WebCore::SVGAnimationFunction::calculateDistance const):
3285         -- Rename the 'progress()' functions of SVGAttributeAnimator and SVGAnimationFunction
3286            to 'animate()'.
3287         -- Rename the argument 'percentage' of these function to 'progress'
3288         -- Make calculateDistance return Optional<float> so it does not have to
3289            return -1 in case of error.
3290
3291         * svg/properties/SVGAttribute.h: Removed.
3292         * svg/properties/SVGAttributeAccessor.h: Removed.
3293         * svg/properties/SVGAttributeAnimator.h:
3294         (WebCore::SVGAttributeAnimator::calculateDistance const):
3295         * svg/properties/SVGAttributeOwnerProxy.cpp: Removed.
3296         * svg/properties/SVGAttributeOwnerProxy.h: Removed.
3297         * svg/properties/SVGAttributeOwnerProxyImpl.h: Removed.
3298         * svg/properties/SVGAttributeRegistry.h: Removed.
3299         * svg/properties/SVGLegacyAnimatedProperty.cpp: Removed.
3300         * svg/properties/SVGLegacyAnimatedProperty.h: Removed.
3301         * svg/properties/SVGLegacyProperty.h: Removed.
3302         * svg/properties/SVGListProperty.h: Removed.
3303         * svg/properties/SVGListPropertyTearOff.h: Removed.
3304         * svg/properties/SVGPrimitivePropertyAnimator.h:
3305         * svg/properties/SVGProperty.h:
3306         * svg/properties/SVGPropertyAnimator.h:
3307         * svg/properties/SVGPropertyTearOff.h: Removed.
3308         * svg/properties/SVGValuePropertyAnimator.h:
3309         * svg/properties/SVGValuePropertyListAnimator.h:
3310
3311 2019-04-03  Myles C. Maxfield  <mmaxfield@apple.com>
3312
3313         Documents can be destroyed before their CSSFontFaceSet is destroyed
3314         https://bugs.webkit.org/show_bug.cgi?id=195830
3315
3316         Reviewed by Darin Adler.
3317
3318         CSSFontFaceSet has a raw pointer to its owning document. JS can keep the CSSFontFaceSet alive (by using FontFaceSet)
3319         and can destroy the document at any time. When the document is destroyed, the link between the two objects needs to
3320         be severed.
3321
3322         Test: fast/text/font-face-set-destroy-document.html
3323
3324         * css/CSSFontFace.cpp:
3325         (WebCore::CSSFontFace::CSSFontFace):
3326         * css/CSSFontFace.h:
3327         * css/CSSFontFaceSet.cpp:
3328         (WebCore::CSSFontFaceSet::CSSFontFaceSet):
3329         (WebCore::CSSFontFaceSet::ensureLocalFontFacesForFamilyRegistered):
3330         * css/CSSFontFaceSet.h:
3331         * css/CSSFontSelector.cpp:
3332         (WebCore::CSSFontSelector::CSSFontSelector):
3333         (WebCore::CSSFontSelector::addFontFaceRule):
3334         * css/CSSFontSelector.h:
3335         * css/FontFace.cpp:
3336         (WebCore::FontFace::FontFace):
3337
3338 2019-04-03  Sihui Liu  <sihui_liu@apple.com>
3339
3340         Follow up fix for r243807: Use MarkedArgumentBuffer instead of Vector for JSValue
3341         https://bugs.webkit.org/show_bug.cgi?id=196547
3342
3343         Reviewed by Geoffrey Garen.
3344
3345         JSValue in Vector could be garbage collected because GC doesn't know Vector memory on C++ heap.
3346
3347         * bindings/js/JSIDBRequestCustom.cpp:
3348         (WebCore::JSIDBRequest::result const):
3349
3350 2019-04-03  Chris Dumez  <cdumez@apple.com>
3351
3352         HTML fragment serialization should not strip whitespace from URL attribute values
3353         https://bugs.webkit.org/show_bug.cgi?id=196551
3354
3355         Reviewed by Ryosuke Niwa.
3356
3357         HTML fragment serialization should not strip whitespace from URL attribute values as per:
3358         - https://html.spec.whatwg.org/multipage/parsing.html#html-fragment-serialisation-algorithm
3359
3360         WebKit was stripping such whitespace, Gecko and Blink are not. Align WebKit with other
3361         browser engines and the specification.
3362
3363         No new tests, rebaselined existing test.
3364
3365         * editing/MarkupAccumulator.cpp:
3366         (WebCore::MarkupAccumulator::appendQuotedURLAttributeValue):
3367
3368 2019-04-02  Ryosuke Niwa  <rniwa@webkit.org>
3369
3370         Crash in HTMLCanvasElement::createContext2d after the element got adopted to a new document
3371         https://bugs.webkit.org/show_bug.cgi?id=196527
3372
3373         Reviewed by Antti Koivisto.
3374
3375         We need to update CanvasBase::m_scriptExecutionContext when HTMLCanvasElement moves from
3376         one document to another. Fixed the bug by making CanvasBase::scriptExecutionContext make
3377         a virtual function call instead of directly storing a raw pointer. In HTMLCanvasElement,
3378         we use Node::scriptExecutionContext(). Use ContextDestructionObserver in CustomPaintCanvas
3379         and OffscreenCanvas instead of a raw pointer.
3380
3381         Unfortunately, no new tests since there is no reproducible test case.
3382
3383         * html/CanvasBase.cpp:
3384         (WebCore::CanvasBase::CanvasBase):
3385         * html/CanvasBase.h:
3386         (WebCore::CanvasBase::scriptExecutionContext const):
3387         * html/CustomPaintCanvas.cpp:
3388         (WebCore::CustomPaintCanvas::CustomPaintCanvas):
3389         * html/CustomPaintCanvas.h:
3390         * html/HTMLCanvasElement.cpp:
3391         (WebCore::HTMLCanvasElement::HTMLCanvasElement):
3392         * html/HTMLCanvasElement.h:
3393         * html/OffscreenCanvas.cpp:
3394         (WebCore::OffscreenCanvas::OffscreenCanvas):
3395         * html/OffscreenCanvas.h:
3396
3397 2019-04-03  Myles C. Maxfield  <mmaxfield@apple.com>
3398
3399         Remove support for -apple-trailing-word
3400         https://bugs.webkit.org/show_bug.cgi?id=196525
3401
3402         Reviewed by Zalan Bujtas.
3403
3404         This CSS property is nonstandard and not used.
3405
3406         * Configurations/FeatureDefines.xcconfig:
3407         * css/CSSComputedStyleDeclaration.cpp:
3408         (WebCore::ComputedStyleExtractor::valueForPropertyinStyle):
3409         * css/CSSPrimitiveValueMappings.h:
3410         (WebCore::CSSPrimitiveValue::operator TrailingWord const): Deleted.
3411         * css/CSSProperties.json:
3412         * css/CSSValueKeywords.in:
3413         * css/parser/CSSParserFastPaths.cpp:
3414         (WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
3415         (WebCore::CSSParserFastPaths::isKeywordPropertyID):
3416         * rendering/SimpleLineLayout.cpp:
3417         (WebCore::SimpleLineLayout::canUseForStyle):
3418         * rendering/SimpleLineLayoutCoverage.cpp:
3419         (WebCore::SimpleLineLayout::printReason):
3420         * rendering/SimpleLineLayoutCoverage.h:
3421         * rendering/line/BreakingContext.h:
3422         (WebCore::BreakingContext::BreakingContext):
3423         (WebCore::BreakingContext::lineBreak):
3424         (WebCore::BreakingContext::clearLineBreakIfFitsOnLine):
3425         (WebCore::BreakingContext::commitLineBreakClear):
3426         (WebCore::BreakingContext::commitLineBreakAtCurrentWidth):
3427         (WebCore::BreakingContext::handleBR):
3428         (WebCore::BreakingContext::handleFloat):
3429         (WebCore::BreakingContext::handleText):
3430         (WebCore::BreakingContext::handleEndOfLine):