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