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