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