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