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