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