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