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