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