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