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