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