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