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