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