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