bd5d8d31e8c79e3ad5d81c2e9ae69268da01419c
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2019-10-02  Zan Dobersek  <zdobersek@igalia.com>
2
3         Unreviewed build fix in Nicosia's ScrollingTreePositionedNode class.
4
5         * page/scrolling/nicosia/ScrollingTreePositionedNode.cpp:
6         (WebCore::ScrollingTreePositionedNode::applyLayerPositions):
7         Fix the name of the variable included in the log call.
8
9 2019-10-02  youenn fablet  <youenn@apple.com>
10
11         Use strongly typed identifiers for webrtc sockets
12         https://bugs.webkit.org/show_bug.cgi?id=202400
13
14         Reviewed by Chris Dumez.
15
16         No observable change of behavior.
17
18         * Headers.cmake:
19         * WebCore.xcodeproj/project.pbxproj:
20         * platform/mediastream/libwebrtc/LibWebRTCSocketIdentifier.h: Copied from Source/WebKit/NetworkProcess/webrtc/NetworkRTCSocket.h.
21
22 2019-10-02  Carlos Garcia Campos  <cgarcia@igalia.com>
23
24         [GTK][WPE] Stop using legacy custom protocol implementation
25         https://bugs.webkit.org/show_bug.cgi?id=202407
26
27         Reviewed by Žan Doberšek.
28
29         Remove the code to setup custom protocols in soup session.
30
31         * platform/network/soup/SoupNetworkSession.cpp:
32         (WebCore::SoupNetworkSession::SoupNetworkSession):
33         * platform/network/soup/SoupNetworkSession.h:
34
35 2019-10-02  Zan Dobersek  <zdobersek@igalia.com>
36
37         [Nicosia] Enable async scrolling at build-time for Nicosia-using ports
38         https://bugs.webkit.org/show_bug.cgi?id=202397
39
40         Reviewed by Carlos Garcia Campos.
41
42         * PlatformPlayStation.cmake: Add missing build targets.
43         * SourcesGTK.txt: Ditto.
44
45 2019-10-01  Tim Horton  <timothy_horton@apple.com>
46
47         Clean up some includes to make the build a bit faster
48         https://bugs.webkit.org/show_bug.cgi?id=202444
49
50         Reviewed by Geoff Garen.
51
52         No new tests, just reorganizing.
53
54         Apply some profile-guided optimizations to our headers.
55
56         * bindings/js/CallTracerTypes.h:
57         * css/typedom/TypedOMCSSImageValue.h:
58         * html/canvas/WebGLObject.h:
59         * html/canvas/WebGLVertexArrayObjectBase.h:
60         * inspector/InspectorInstrumentation.cpp:
61         (WebCore::InspectorInstrumentation::instrumentingAgentsForWebGPUDevice):
62         (WebCore::InspectorInstrumentation::instrumentingAgentsForWorkerGlobalScope):
63         (WebCore::InspectorInstrumentation::instrumentingAgentsForPage):
64         (WebCore::InspectorInstrumentation::instrumentingAgentsForContext):
65         * inspector/InspectorInstrumentation.h:
66         (WebCore::InspectorInstrumentation::didCreateWebGPUDevice):
67         (WebCore::InspectorInstrumentation::willDestroyWebGPUDevice):
68         (WebCore::InspectorInstrumentation::didCreateWebGPUPipeline):
69         * platform/graphics/BitmapImage.cpp:
70         * platform/graphics/Font.h:
71         * platform/graphics/cg/GraphicsContextCG.cpp:
72         (WebCore::getUserToBaseCTM):
73         * platform/graphics/cg/GraphicsContextCG.h:
74         (WebCore::getUserToBaseCTM): Deleted.
75         * platform/graphics/cg/ImageBufferCG.cpp:
76         * platform/graphics/cocoa/IOSurface.h:
77         * platform/graphics/mac/PDFDocumentImageMac.mm:
78         InspectorInstrumentation.h is one of the most expensive headers in the entire project.
79         While not included in many places (70), it is fairly straightforward to reduce
80         its per-inclusion cost by rougly 80%.
81
82 2019-10-01  Alex Christensen  <achristensen@webkit.org>
83
84         Progress towards a functioning CMake build on Mac
85         https://bugs.webkit.org/show_bug.cgi?id=202443
86
87         Rubber-stamped by Tim Horton.
88
89         * testing/Internals.mm:
90
91 2019-10-01  John Wilander  <wilander@apple.com>
92
93         Storage Access API: document.hasStorageAccess() should return true when the cookie policy allows access
94         https://bugs.webkit.org/show_bug.cgi?id=202435
95         <rdar://problem/55718526>
96
97         Reviewed by Brent Fulgham.
98
99         WebKit's Storage Access API implementation has so far only looked at whether ITP is
100         blocking cookie access or not. However, the default cookie policy is still in
101         effect underneath ITP. document.hasStorageAccess() should return true if the
102         third-party:
103         a) is not classified by ITP, and
104         b) has cookies which implies it can use cookies as third-party according to the
105         default cookie policy.
106
107         Tests: http/tests/storageAccess/has-storage-access-false-by-default-ephemeral.html
108                http/tests/storageAccess/has-storage-access-true-if-third-party-has-cookies-ephemeral.html
109                http/tests/storageAccess/has-storage-access-true-if-third-party-has-cookies.html
110
111         * platform/network/NetworkStorageSession.h:
112         * platform/network/cocoa/NetworkStorageSessionCocoa.mm:
113         (WebCore::NetworkStorageSession::hasCookies const):
114         * platform/network/curl/NetworkStorageSessionCurl.cpp:
115         (WebCore::NetworkStorageSession::hasCookies const):
116             Not yet implemented. Always says false.
117         * platform/network/soup/NetworkStorageSessionSoup.cpp:
118         (WebCore::NetworkStorageSession::hasCookies const):
119             Not yet implemented. Always says false.
120
121 2019-10-01  Tim Horton  <timothy_horton@apple.com>
122
123         Clean up some includes to make the build a bit faster
124         https://bugs.webkit.org/show_bug.cgi?id=202437
125
126         Reviewed by Jer Noble.
127
128         * Modules/webaudio/PannerNode.h:
129         * Modules/webaudio/RealtimeAnalyser.h:
130         * platform/audio/HRTFPanner.h:
131         FFTFrame includes Accelerate.h, which is quite expensive.
132
133 2019-10-01  Antti Koivisto  <antti@apple.com>
134
135         [CSS Shadow Parts] Parse 'part' attribute
136         https://bugs.webkit.org/show_bug.cgi?id=202409
137
138         Reviewed by Ryosuke Niwa.
139
140         Add parsing for Element 'part' attribute and the IDL interface.
141         Also add a feature flag for CSS Shadow Parts.
142
143         * dom/Element.cpp:
144         (WebCore::Element::attributeChanged):
145         (WebCore::isNonEmptyTokenList):
146         (WebCore::Element::classAttributeChanged):
147         (WebCore::Element::partAttributeChanged):
148         (WebCore::Element::partNames const):
149         (WebCore::Element::part):
150         (WebCore::classStringHasClassName): Deleted.
151         * dom/Element.h:
152         * dom/Element.idl:
153         * dom/ElementRareData.cpp:
154         * dom/ElementRareData.h:
155         (WebCore::ElementRareData::partList const):
156         (WebCore::ElementRareData::setPartList):
157         (WebCore::ElementRareData::partNames const):
158         (WebCore::ElementRareData::setPartNames):
159         * html/HTMLAttributeNames.in:
160         * page/RuntimeEnabledFeatures.h:
161         (WebCore::RuntimeEnabledFeatures::setCSSShadowPartsEnabled):
162         (WebCore::RuntimeEnabledFeatures::cssShadowPartsEnabled const):
163
164 2019-10-01  Yusuke Suzuki  <ysuzuki@apple.com>
165
166         [JSC] Place VM* in TLS
167         https://bugs.webkit.org/show_bug.cgi?id=202391
168
169         Reviewed by Mark Lam.
170
171         Use JSLockHolder instead. It automatically puts VM* in TLS.
172
173         * bindings/js/IDBBindingUtilities.cpp:
174         (WebCore::toJS):
175         (WebCore::deserializeIDBValueToJSValue):
176
177 2019-10-01  youenn fablet  <youenn@apple.com>
178
179         Queue events and promise resolution in RTCPeerConnection when suspended for page cache
180         https://bugs.webkit.org/show_bug.cgi?id=202396
181
182         Reviewed by Chris Dumez.
183
184         This patch prepares RTCPeerConnection to be suspendable to enter page cache.
185         For that purpose, we queue events and promise resolution/rejection tasks if the RTCPeerConnection m_shouldDelayTasks is set to true.
186         This queueing is enabled when RTCPeerConnection is asked to suspend itself.
187         The queued tasks are then executed at resume time.
188         Renamed fireEvent to dispatchEventWhenFeasible.
189         No change of behavior for now.
190
191         * Modules/mediastream/PeerConnectionBackend.cpp:
192         (WebCore::PeerConnectionBackend::createOfferSucceeded):
193         (WebCore::PeerConnectionBackend::createOfferFailed):
194         (WebCore::PeerConnectionBackend::createAnswerSucceeded):
195         (WebCore::PeerConnectionBackend::createAnswerFailed):
196         (WebCore::PeerConnectionBackend::setLocalDescriptionSucceeded):
197         (WebCore::PeerConnectionBackend::setLocalDescriptionFailed):
198         (WebCore::PeerConnectionBackend::setRemoteDescriptionSucceeded):
199         (WebCore::PeerConnectionBackend::setRemoteDescriptionFailed):
200         (WebCore::PeerConnectionBackend::addIceCandidateSucceeded):
201         (WebCore::PeerConnectionBackend::addIceCandidateFailed):
202         * Modules/mediastream/RTCPeerConnection.cpp:
203         (WebCore::RTCPeerConnection::doClose):
204         (WebCore::RTCPeerConnection::suspend):
205         (WebCore::RTCPeerConnection::resume):
206         (WebCore::RTCPeerConnection::updateIceGatheringState):
207         (WebCore::RTCPeerConnection::updateIceConnectionState):
208         (WebCore::RTCPeerConnection::updateConnectionState):
209         (WebCore::RTCPeerConnection::scheduleNegotiationNeededEvent):
210         (WebCore::RTCPeerConnection::doTask):
211         (WebCore::RTCPeerConnection::fireEvent):
212         * Modules/mediastream/RTCPeerConnection.h:
213
214 2019-10-01  Brent Fulgham  <bfulgham@apple.com>
215
216         [FTW] Correct additional canvas test failures
217         https://bugs.webkit.org/show_bug.cgi?id=202388
218
219         Reviewed by Fujii Hironori.
220
221         This patch corrects a handful of errors in Direct2D's drawing code.
222
223         * platform/graphics/win/Direct2DOperations.cpp:
224         (WebCore::Direct2D::clearRect): Use the transformed dimensions of
225         rects to determine whether they intersect with the render target.
226         * platform/graphics/win/ImageBufferDataDirect2D.cpp:
227         (WebCore::ImageBufferData::copyRectFromData const):
228         (WebCore::ImageBufferData::loadDataToBitmapIfNeeded): It is not
229         necessary (or correct) to 'endDraw' when loading image data to the
230         Bitmap target.
231         * platform/graphics/win/PathDirect2D.cpp:
232         (WebCore::Path::strokeBoundingRect const): Provide an implementation.
233
234 2019-10-01  Alex Christensen  <achristensen@webkit.org>
235
236         Progress towards successful CMake build on Mac
237         https://bugs.webkit.org/show_bug.cgi?id=202426
238
239         Rubber-stamped by Tim Horton.
240
241         * PlatformMac.cmake:
242
243 2019-10-01  Tim Horton  <timothy_horton@apple.com>
244
245         Clean up some includes to make the build a bit faster
246         https://bugs.webkit.org/show_bug.cgi?id=202417
247
248         Reviewed by Jer Noble.
249
250         No new tests, just reorganizing.
251
252         Apply some profile-guided optimizations to our headers.
253
254         * Modules/mediasource/SourceBuffer.cpp:
255         * WebCorePrefix.h:
256         Add HashMap, which ends up included in all source files.
257
258         * html/HTMLImageElement.cpp:
259         (WebCore::HTMLImageElement::HTMLImageElement):
260         (WebCore::HTMLImageElement::selectImageSource):
261         (WebCore::HTMLImageElement::didAttachRenderers):
262         (WebCore::HTMLImageElement::insertedIntoAncestor):
263         (WebCore::HTMLImageElement::width):
264         (WebCore::HTMLImageElement::height):
265         (WebCore::HTMLImageElement::naturalWidth const):
266         (WebCore::HTMLImageElement::naturalHeight const):
267         (WebCore::HTMLImageElement::complete const):
268         (WebCore::HTMLImageElement::decode):
269         (WebCore::HTMLImageElement::didMoveToNewDocument):
270         (WebCore::HTMLImageElement::cachedImage const):
271         (WebCore::HTMLImageElement::setLoadManually):
272         (WebCore::HTMLImageElement::hasPendingActivity const):
273         (WebCore::HTMLImageElement::pendingDecodePromisesCountForTesting const):
274         * html/HTMLImageElement.h:
275         (WebCore::HTMLImageElement::cachedImage const): Deleted.
276         (WebCore::HTMLImageElement::setLoadManually): Deleted.
277         (WebCore::HTMLImageElement::hasPendingActivity const): Deleted.
278         (WebCore::HTMLImageElement::pendingDecodePromisesCountForTesting const): Deleted.
279         HTMLImageLoader brings in JSDOMPromiseDeferred, which is known to be horribly expensive.
280         Out-of-line m_imageLoader.
281
282         * platform/graphics/GraphicsLayer.h:
283         Swap Animation for TimingFunction, which is much smaller.
284
285         * platform/graphics/MediaPlayer.h:
286         InbandTextTrackPrivate brings in SerializedPlatformRepresentation.h,
287         which is very expensive. MediaPlayer.h is included in many places.
288         Break the link.
289
290         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
291
292 2019-10-01  youenn fablet  <youenn@apple.com>
293
294         RTCDataChannel should not prevent entering page cache except if in open state
295         https://bugs.webkit.org/show_bug.cgi?id=202395
296
297         Reviewed by Chris Dumez.
298
299         Only prevent entering page cache in open state.
300         Enqueue message through the document event queue to handle suspension properly.
301
302         We cannot yet write page cache tests as a data channel requires a peer connection which
303         currently forbids entering page cache.
304
305         * Modules/mediastream/RTCDataChannel.cpp:
306         (WebCore::RTCDataChannel::RTCDataChannel):
307         (WebCore::RTCDataChannel::didReceiveStringData):
308         (WebCore::RTCDataChannel::didReceiveRawData):
309         (WebCore::RTCDataChannel::didDetectError):
310         (WebCore::RTCDataChannel::bufferedAmountIsDecreasing):
311         (WebCore::RTCDataChannel::scheduleDispatchEvent):
312         (WebCore::RTCDataChannel::scheduledEventTimerFired): Deleted.
313         * Modules/mediastream/RTCDataChannel.h:
314
315 2019-10-01  Rob Buis  <rbuis@igalia.com>
316
317         [Mac] Layout Test imported/w3c/web-platform-tests/fetch/api/redirect/redirect-location.any.html fails
318         https://bugs.webkit.org/show_bug.cgi?id=202350
319
320         Reviewed by Alex Christensen.
321
322         In some cases didReceiveResponse will deliver redirects (normally willSendRequestInternal will be used for redirects).
323         When this is done in manual redirect mode make sure the response type is opaque redirect.
324
325         Test: imported/w3c/web-platform-tests/fetch/api/redirect/redirect-location.any.html
326
327         * loader/SubresourceLoader.cpp:
328         (WebCore::SubresourceLoader::didReceiveResponse):
329
330 2019-10-01  Keith Rollin  <krollin@apple.com>
331
332         Remove some support for < iOS 13
333         https://bugs.webkit.org/show_bug.cgi?id=202386
334         <rdar://problem/55863017>
335
336         Reviewed by Eric Carlson.
337
338         Remove some support for iOS versions less than 13.0.
339
340         Update conditionals that reference __IPHONE_OS_VERSION_MIN_REQUIRED
341         and __IPHONE_OS_VERSION_MAX_ALLOWED, assuming that they both have
342         values >= 130000. This means that expressions like
343         "__IPHONE_OS_VERSION_MIN_REQUIRED < 101300" are always False and
344         "__IPHONE_OS_VERSION_MIN_REQUIRED >= 101300" are always True.
345
346         This removal is part of a series of patches effecting the removal of
347         dead code for old versions of iOS. This particular pass involves
348         changes in which Jer Noble was involved. These changes are isolated
349         from other similar changes in order to facilitate the reviewing
350         process.
351
352         No new tests -- no new or changed functionality.
353
354         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
355         (WebCore::MediaPlayerPrivateAVFoundationObjC::seekableTimeRangesLastModifiedTime const):
356         (WebCore::MediaPlayerPrivateAVFoundationObjC::liveUpdateInterval const):
357
358 2019-10-01  Chris Dumez  <cdumez@apple.com>
359
360         Unreviewed attempt to fix Windows build after r250527.
361
362         * dom/GenericEventQueue.cpp:
363         (WebCore::TaskQueueConstructor::construct):
364         (WebCore::TaskQueueConstructor<Timer>::construct):
365         (WebCore::GenericEventQueueBase<T>::enqueueEvent):
366         (WebCore::GenericEventQueueBase<T>::close):
367         (WebCore::GenericEventQueueBase<T>::cancelAllEvents):
368         (WebCore::GenericEventQueueBase<T>::setPaused):
369         (WebCore::GenericEventQueueBase<T>::suspend):
370         (WebCore::GenericEventQueueBase<T>::rescheduleAllEventsIfNeeded):
371         * dom/GenericEventQueue.h:
372         * platform/GenericTaskQueue.h:
373
374 2019-10-01  Alex Christensen  <achristensen@webkit.org>
375
376         Fix internal build after r250549
377         https://bugs.webkit.org/show_bug.cgi?id=202390
378
379         There is an internal #define confirm on some systems, so rename DOMWindow::confirm to DOMWindow::confirmForBindings.
380
381         * page/DOMWindow.cpp:
382         (WebCore::DOMWindow::confirmForBindings):
383         (WebCore::DOMWindow::confirm): Deleted.
384         * page/DOMWindow.h:
385         * page/DOMWindow.idl:
386
387 2019-10-01  Chris Dumez  <cdumez@apple.com>
388
389         Unreviewed attempt to fix Windows build after r250527.
390
391         * platform/GenericTaskQueue.h:
392
393 2019-10-01  Zan Dobersek  <zdobersek@igalia.com>
394
395         [CoordGraphics] Implement sync methods for position, bounds origin
396         https://bugs.webkit.org/show_bug.cgi?id=202398
397
398         Reviewed by Carlos Garcia Campos.
399
400         Add the CoordinatedGraphicsLayer::syncPosition() and
401         CoordinatedGraphicsLayer::syncBoundsOrigin() method overrides, both
402         performing a synchronization of the given GraphicsLayer attribute.
403
404         These methods are used by the scrolling code to reflect changes in these
405         attributes without causing a layer flush (which is not necessary since
406         the changes have already been applied in an equivalent way).
407
408         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
409         (WebCore::CoordinatedGraphicsLayer::didChangeGeometry):
410         (WebCore::CoordinatedGraphicsLayer::syncPosition):
411         (WebCore::CoordinatedGraphicsLayer::syncBoundsOrigin):
412         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
413
414 2019-10-01  Joonghun Park  <jh718.park@samsung.com>
415
416         Make table's clientWidth/Height include its border sizes.
417         https://bugs.webkit.org/show_bug.cgi?id=200974
418
419         WebKit doesn't have table wrapper box currently
420         while Gecko has it,
421         so this CL tries to mimic the behavior that
422         clientWidth/Height refers to table wrapper box
423         which doesn't have borders applied to itself
424         and table grid box has the borders.
425
426         This CL adds table's border sizes
427         to clientWidth/Height
428         at |LayoutBox::PixelSnappedClientWidth/Height|.
429
430         As a result of this CL, table's clientWidth/Height
431         and offsetWidth/Height are equal now, respectively.
432
433         The corresponding csswg discussion is
434         https://github.com/w3c/csswg-drafts/issues/4245.
435
436         Reviewed by Antti Koivisto.
437
438         Tests: fast/table/border-collapsing/bug236727.html
439                imported/w3c/web-platform-tests/css/cssom-view/table-border-collapse-client-width-height.html
440                imported/w3c/web-platform-tests/css/cssom-view/table-border-separate-client-width-height.html
441                imported/w3c/web-platform-tests/css/cssom-view/table-with-border-client-width-height.html
442
443         * dom/Element.cpp:
444         (WebCore::Element::clientWidth):
445         (WebCore::Element::clientHeight):
446
447 2019-10-01  youenn fablet  <youenn@apple.com>
448
449         Remove races condition when validating capture sandbox extension revocation
450         https://bugs.webkit.org/show_bug.cgi?id=202133
451         <rdar://problem/55660905>
452
453         Reviewed by Eric Carlson.
454
455         Covered by existing tests.
456
457         * Modules/mediastream/MediaStreamTrack.cpp:
458         (WebCore::MediaStreamTrack::endCapture):
459         Synchronously update document media state when capture is ended.
460         This allows to validate the fact that no document is capturing while we revoke sandbox extensions.
461
462 2019-10-01  youenn fablet  <youenn@apple.com>
463
464         MediaDevices should be SecureContext
465         https://bugs.webkit.org/show_bug.cgi?id=202267
466
467         Reviewed by Eric Carlson.
468
469         Manually tested since 127.0.0.1/localhost are secure contexts.
470
471         * Modules/mediastream/MediaDevices.idl:
472         * bindings/js/WebCoreBuiltinNames.h:
473
474 2019-09-30  Alex Christensen  <achristensen@webkit.org>
475
476         Resurrect Mac CMake build
477         https://bugs.webkit.org/show_bug.cgi?id=202384
478
479         Rubber-stamped by Tim Horton.
480
481         * PlatformMac.cmake:
482
483 2019-09-30  Chris Dumez  <cdumez@apple.com>
484
485         Make GenericEventQueue an ActiveDOMObject
486         https://bugs.webkit.org/show_bug.cgi?id=202373
487
488         Reviewed by Eric Carlson.
489
490         Make GenericEventQueue an ActiveDOMObject so that it is guaranteed to never fire any events while
491         suspended without requiring the client to explicitly suspend/resume the event queue.
492
493         * Modules/encryptedmedia/MediaKeySession.cpp:
494         (WebCore::MediaKeySession::MediaKeySession):
495         (WebCore::MediaKeySession::enqueueMessage):
496         (WebCore::MediaKeySession::updateKeyStatuses):
497         * Modules/encryptedmedia/MediaKeySession.h:
498         * Modules/encryptedmedia/legacy/WebKitMediaKeySession.cpp:
499         (WebCore::WebKitMediaKeySession::WebKitMediaKeySession):
500         (WebCore::WebKitMediaKeySession::~WebKitMediaKeySession):
501         (WebCore::WebKitMediaKeySession::addKeyTimerFired):
502         (WebCore::WebKitMediaKeySession::sendMessage):
503         (WebCore::WebKitMediaKeySession::sendError):
504         (WebCore::WebKitMediaKeySession::hasPendingActivity const):
505         (WebCore::WebKitMediaKeySession::stop):
506         * Modules/encryptedmedia/legacy/WebKitMediaKeySession.h:
507         * Modules/mediasource/MediaSource.cpp:
508         (WebCore::MediaSource::MediaSource):
509         (WebCore::MediaSource::hasPendingActivity const):
510         (WebCore::MediaSource::stop):
511         (WebCore::MediaSource::canSuspendForDocumentSuspension const):
512         (WebCore::MediaSource::scheduleEvent):
513         * Modules/mediasource/MediaSource.h:
514         * Modules/mediasource/SourceBuffer.cpp:
515         (WebCore::SourceBuffer::SourceBuffer):
516         (WebCore::SourceBuffer::hasPendingActivity const):
517         (WebCore::SourceBuffer::stop):
518         (WebCore::SourceBuffer::scheduleEvent):
519         * Modules/mediasource/SourceBuffer.h:
520         * Modules/mediasource/SourceBufferList.cpp:
521         (WebCore::SourceBufferList::SourceBufferList):
522         (WebCore::SourceBufferList::scheduleEvent):
523         (WebCore::SourceBufferList::canSuspendForDocumentSuspension const):
524         * Modules/mediasource/SourceBufferList.h:
525         * Modules/webaudio/AudioContext.cpp:
526         (WebCore::AudioContext::AudioContext):
527         (WebCore::AudioContext::stop):
528         * Modules/webaudio/AudioContext.h:
529         * animation/DeclarativeAnimation.cpp:
530         (WebCore::DeclarativeAnimation::DeclarativeAnimation):
531         (WebCore::DeclarativeAnimation::tick):
532         (WebCore::DeclarativeAnimation::needsTick const):
533         (WebCore::DeclarativeAnimation::remove):
534         (WebCore::DeclarativeAnimation::enqueueDOMEvent):
535         (WebCore::DeclarativeAnimation::stop):
536         (WebCore::DeclarativeAnimation::suspend):
537         (WebCore::DeclarativeAnimation::resume):
538         * animation/DeclarativeAnimation.h:
539         * dom/GenericEventQueue.cpp:
540         (WebCore::GenericEventQueueBase<T>::GenericEventQueueBase):
541         (WebCore::GenericEventQueueBase<T>::setPaused):
542         (WebCore::GenericEventQueueBase<T>::canSuspendForDocumentSuspension const):
543         (WebCore::GenericEventQueueBase<T>::suspend):
544         (WebCore::GenericEventQueueBase<T>::resume):
545         (WebCore::GenericEventQueueBase<T>::rescheduleAllEventsIfNeeded):
546         (WebCore::GenericEventQueueBase<T>::stop):
547         (WebCore::GenericEventQueueBase<T>::activeDOMObjectName const):
548         (WebCore::GenericEventQueue::create):
549         (WebCore::MainThreadGenericEventQueue::create):
550         * dom/GenericEventQueue.h:
551         * dom/MessagePort.cpp:
552         (WebCore::MessagePort::MessagePort):
553         (WebCore::MessagePort::close):
554         (WebCore::MessagePort::dispatchMessages):
555         * dom/MessagePort.h:
556         * html/HTMLMediaElement.cpp:
557         (WebCore::HTMLMediaElement::HTMLMediaElement):
558         (WebCore::HTMLMediaElement::~HTMLMediaElement):
559         (WebCore::HTMLMediaElement::scheduleEvent):
560         (WebCore::HTMLMediaElement::updateActiveTextTrackCues):
561         (WebCore::HTMLMediaElement::cancelPendingEventsAndCallbacks):
562         (WebCore::HTMLMediaElement::mediaPlayerKeyNeeded):
563         (WebCore::HTMLMediaElement::mediaPlayerInitializationDataEncountered):
564         (WebCore::HTMLMediaElement::closeTaskQueues):
565         (WebCore::HTMLMediaElement::suspend):
566         (WebCore::HTMLMediaElement::resume):
567         (WebCore::HTMLMediaElement::hasPendingActivity const):
568         (WebCore::HTMLMediaElement::enqueuePlaybackTargetAvailabilityChangedEvent):
569         * html/HTMLMediaElement.h:
570         * html/track/TrackListBase.cpp:
571         (WebCore::TrackListBase::TrackListBase):
572         (WebCore::TrackListBase::scheduleTrackEvent):
573         (WebCore::TrackListBase::scheduleChangeEvent):
574         (WebCore::TrackListBase::isChangeEventScheduled const):
575         (WebCore::TrackListBase::canSuspendForDocumentSuspension const):
576         * html/track/TrackListBase.h:
577         * workers/Worker.cpp:
578         (WebCore::Worker::Worker):
579         (WebCore::Worker::terminate):
580         (WebCore::Worker::stop):
581         (WebCore::Worker::hasPendingActivity const):
582         (WebCore::Worker::enqueueEvent):
583         (WebCore::Worker::dispatchEvent):
584         * workers/Worker.h:
585         * workers/service/ServiceWorkerContainer.cpp:
586         (WebCore::ServiceWorkerContainer::ServiceWorkerContainer):
587         (WebCore::ServiceWorkerContainer::startMessages):
588         (WebCore::ServiceWorkerContainer::postMessage):
589         (WebCore::ServiceWorkerContainer::stop):
590         * workers/service/ServiceWorkerContainer.h:
591
592 2019-09-30  Chris Dumez  <cdumez@apple.com>
593
594         IDBTransaction / IDBObjectStore should not prevent a page from entering the back / forward cache
595         https://bugs.webkit.org/show_bug.cgi?id=202291
596         <rdar://problem/55760106>
597
598         Reviewed by Geoffrey Garen.
599
600         IDBObjectStore does not fire any events and should therefore not cause any problem while in PageCache.
601         IDBTransaction can only fire abort/complete/error events, all of which are being enqueued to the
602         DocumentEventQueue. The DocumentEventQueue subclasses SuspendableTimer which will correctly suspend
603         while the document is in page cache. IDBTransaction will therefore not cause events to fire (and JS
604         to run) while in page cache.
605
606         Test: storage/indexeddb/IDBTransaction-page-cache.html
607
608         * Modules/indexeddb/IDBObjectStore.cpp:
609         (WebCore::IDBObjectStore::canSuspendForDocumentSuspension const):
610         * Modules/indexeddb/IDBTransaction.cpp:
611         (WebCore::IDBTransaction::canSuspendForDocumentSuspension const):
612
613 2019-09-30  Chris Dumez  <cdumez@apple.com>
614
615         Refine restrictions for X-Temp-Tablet HTTP header experiment
616         https://bugs.webkit.org/show_bug.cgi?id=202367
617         <rdar://problem/55849139>
618
619         Reviewed by Geoffrey Garen.
620
621         Refine restrictions for X-Temp-Tablet HTTP header experiment:
622         1. Only send the header if the embedding application is MobileSafari.
623         2. Only send the header if the first party is google.com
624         3. Only send the header if the current date is before 2/1/2020
625         4. Send the header even if using an ephemeral session
626
627         * loader/cache/CachedResourceLoader.cpp:
628         (WebCore::isXTempTabletHeaderExperimentOver):
629         (WebCore::CachedResourceLoader::CachedResourceLoader):
630         (WebCore::isGoogleSearch):
631         (WebCore::CachedResourceLoader::shouldSendXTempTabletHeader const):
632         (WebCore::CachedResourceLoader::requestResource):
633         * loader/cache/CachedResourceLoader.h:
634
635 2019-09-30  Chris Dumez  <cdumez@apple.com>
636
637         Pages with Web Workers cannot enter the back / forward cache
638         https://bugs.webkit.org/show_bug.cgi?id=202296
639         <rdar://problem/55764073>
640
641         Reviewed by Jer Noble.
642
643         Allow pages that use Web Workers to enter the back / forward cache.
644         This involves adding an EventQueue for all event firing on Woker
645         objects and suspending this EventQueue while in the page cache.
646
647         This was preventing some of the pages on weather.com to enter the
648         back / forward cache.
649
650         Test: fast/workers/worker-page-cache.html
651
652         * Modules/encryptedmedia/MediaKeySession.h:
653         * Modules/encryptedmedia/legacy/WebKitMediaKeySession.h:
654         * Modules/mediasource/MediaSource.h:
655         * Modules/mediasource/SourceBuffer.h:
656         * Modules/mediasource/SourceBufferList.h:
657         * Modules/webaudio/AudioContext.cpp:
658         (WebCore::AudioContext::AudioContext):
659         * Modules/webaudio/AudioContext.h:
660         * animation/DeclarativeAnimation.h:
661
662         * dom/GenericEventQueue.cpp:
663         (WebCore::TaskQueueConstructor::construct):
664         (WebCore::TaskQueueConstructor<Timer>::construct):
665         (WebCore::GenericEventQueueBase<T>::GenericEventQueueBase):
666         (WebCore::GenericEventQueueBase<T>::enqueueEvent):
667         (WebCore::GenericEventQueueBase<T>::dispatchOneEvent):
668         (WebCore::GenericEventQueueBase<T>::close):
669         (WebCore::GenericEventQueueBase<T>::cancelAllEvents):
670         (WebCore::GenericEventQueueBase<T>::hasPendingEvents const):
671         (WebCore::GenericEventQueueBase<T>::hasPendingEventsOfType const):
672         (WebCore::GenericEventQueueBase<T>::suspend):
673         (WebCore::GenericEventQueueBase<T>::resume):
674         * dom/GenericEventQueue.h:
675         (WebCore::GenericEventQueueBase::isSuspended const):
676         (WebCore::MainThreadGenericEventQueue::MainThreadGenericEventQueue):
677         (WebCore::GenericEventQueue::GenericEventQueue):
678         Rename GenericEventQueue to MainThreadGenericEventQueue since its implementation relies
679         on a global shared Timer to fire events. Introduce a new GenericEventQueue which can
680         actually be used from any thread. This is useful for MessagePort, which is used both
681         on the main thread and on worker threads.
682
683         * dom/MessagePort.cpp:
684         (WebCore::MessagePort::MessagePort):
685         (WebCore::MessagePort::close):
686         (WebCore::MessagePort::suspend):
687         (WebCore::MessagePort::resume):
688         (WebCore::MessagePort::dispatchMessages):
689         * dom/MessagePort.h:
690         Use an GenericEventQueue in MessagePort for consistency with Worker.
691         MessagePort is an ActiveDOMobject which returns true in canSuspend(),
692         we therefore need to make sure it suspends event firing while
693         suspended.
694
695         * html/HTMLMediaElement.h:
696         * html/track/TrackListBase.h:
697         * workers/Worker.cpp:
698         (WebCore::Worker::Worker):
699         (WebCore::Worker::terminate):
700         (WebCore::Worker::canSuspendForDocumentSuspension const):
701         (WebCore::Worker::suspend):
702         (WebCore::Worker::resume):
703         (WebCore::Worker::stop):
704         (WebCore::Worker::hasPendingActivity const):
705         (WebCore::Worker::notifyFinished):
706         (WebCore::Worker::enqueueEvent):
707         (WebCore::Worker::dispatchEvent):
708         * workers/Worker.h:
709         * workers/WorkerMessagingProxy.cpp:
710         (WebCore::WorkerMessagingProxy::postMessageToWorkerObject):
711         (WebCore::WorkerMessagingProxy::postExceptionToWorkerObject):
712
713 2019-09-27  Keith Rollin  <krollin@apple.com>
714
715         Coalesce or remove PLATFORM(MAC) || PLATFORM(IOS_FAMILY)
716         https://bugs.webkit.org/show_bug.cgi?id=202119
717         <rdar://problem/55638792>
718
719         Unreviewed, address post landing review comments for r248533 from
720         Darin Adler.
721
722         No new tests -- no new or changed functionality.
723
724         * Modules/applepay/cocoa/PaymentContactCocoa.mm:
725         (WebCore::convert):
726         (WebCore::subLocality): Deleted.
727         (WebCore::setSubLocality): Deleted.
728         (WebCore::subAdministrativeArea): Deleted.
729         (WebCore::setSubAdministrativeArea): Deleted.
730
731 2019-09-30  Antti Koivisto  <antti@apple.com>
732
733         RenderLineBreak should use LineLayoutTraversal
734         https://bugs.webkit.org/show_bug.cgi?id=202316
735
736         Reviewed by Zalan Bujtas.
737
738         Replace more path specific code with LineLayoutTraversal.
739
740         * Headers.cmake:
741         * rendering/RenderLineBreak.cpp:
742         (WebCore::RenderLineBreak::linesBoundingBox const):
743         (WebCore::RenderLineBreak::absoluteRects const):
744         (WebCore::RenderLineBreak::absoluteQuads const):
745         (WebCore::simpleLineLayout): Deleted.
746         * rendering/RenderTreeAsText.cpp:
747         (WebCore::RenderTreeAsText::writeRenderObject):
748         (WebCore::writeTextBox):
749         * rendering/SimpleLineLayoutFunctions.cpp:
750         (WebCore::SimpleLineLayout::computeBoundingBox): Deleted.
751         (WebCore::SimpleLineLayout::collectAbsoluteRects): Deleted.
752         (WebCore::SimpleLineLayout::rendererForPosition): Deleted.
753         * rendering/SimpleLineLayoutFunctions.h:
754         * rendering/line/LineLayoutTraversal.cpp:
755         (WebCore::LineLayoutTraversal::ElementBoxIterator::ElementBoxIterator):
756         (WebCore::LineLayoutTraversal::ElementBoxIterator::atEnd const):
757         (WebCore::LineLayoutTraversal::elementBoxFor):
758         (WebCore::LineLayoutTraversal::TextBox::rect const): Deleted.
759         (WebCore::LineLayoutTraversal::TextBox::logicalRect const): Deleted.
760         (WebCore::LineLayoutTraversal::TextBox::hasHyphen const): Deleted.
761         (WebCore::LineLayoutTraversal::TextBox::isLeftToRightDirection const): Deleted.
762         (WebCore::LineLayoutTraversal::TextBox::dirOverride const): Deleted.
763         (WebCore::LineLayoutTraversal::TextBox::text const): Deleted.
764         (WebCore::LineLayoutTraversal::TextBox::isLineBreak const): Deleted.
765         (WebCore::LineLayoutTraversal::TextBox::localStartOffset const): Deleted.
766         (WebCore::LineLayoutTraversal::TextBox::localEndOffset const): Deleted.
767         (WebCore::LineLayoutTraversal::TextBox::length const): Deleted.
768         (WebCore::LineLayoutTraversal::TextBox::isLastOnLine const): Deleted.
769         (WebCore::LineLayoutTraversal::TextBox::isLast const): Deleted.
770         (WebCore::LineLayoutTraversal::TextBox::iterator const): Deleted.
771
772         Move to header as templates.
773
774         * rendering/line/LineLayoutTraversal.h:
775         (WebCore::LineLayoutTraversal::ElementBoxIterator::ElementBoxIterator):
776         (WebCore::LineLayoutTraversal::ElementBoxIterator::operator bool const):
777         (WebCore::LineLayoutTraversal::ElementBoxIterator::operator* const):
778         (WebCore::LineLayoutTraversal::ElementBoxIterator::operator-> const):
779
780         Add a new iterator type for element boxes.
781         It doesn't currently really iterate, is just allows testing for end.
782
783         (WebCore::LineLayoutTraversal::Box<Iterator>::rect const):
784         (WebCore::LineLayoutTraversal::Box<Iterator>::logicalRect const):
785         (WebCore::LineLayoutTraversal::Box<Iterator>::isLeftToRightDirection const):
786         (WebCore::LineLayoutTraversal::Box<Iterator>::dirOverride const):
787         (WebCore::LineLayoutTraversal::Box<Iterator>::isLineBreak const):
788         (WebCore::LineLayoutTraversal::Box<Iterator>::iterator const):
789
790         Split properties that all inline boxes have out from TextBox.
791         Make it a template class.
792
793         (WebCore::LineLayoutTraversal::TextBox<Iterator>::hasHyphen const):
794         (WebCore::LineLayoutTraversal::TextBox<Iterator>::text const):
795         (WebCore::LineLayoutTraversal::TextBox<Iterator>::localStartOffset const):
796         (WebCore::LineLayoutTraversal::TextBox<Iterator>::localEndOffset const):
797         (WebCore::LineLayoutTraversal::TextBox<Iterator>::length const):
798         (WebCore::LineLayoutTraversal::TextBox<Iterator>::isLastOnLine const):
799         (WebCore::LineLayoutTraversal::TextBox<Iterator>::isLast const):
800
801         Make a template class.
802
803         (WebCore::LineLayoutTraversal::hasTextBoxes): Deleted.
804
805 2019-09-30  Rob Buis  <rbuis@igalia.com>
806
807         No-Cors check should take into account same-origin
808         https://bugs.webkit.org/show_bug.cgi?id=202353
809
810         Reviewed by Youenn Fablet.
811
812         No-Cors check should take into account same-origin, in that case the
813         check should bail out, since same-origin is already handled in
814         the first step of [1].
815
816         Test: imported/web-platform-tests/fetch/api/redirect/redirect-mode.any.html
817
818         [1] https://fetch.spec.whatwg.org/#main-fetch Step 5
819
820         * loader/cache/CachedResourceLoader.cpp:
821         (WebCore::CachedResourceLoader::canRequest):
822
823 2019-09-30  Zan Dobersek  <zdobersek@igalia.com>
824
825         [Nicosia] Complete ScrollingTreeNicosia::createScrollingTreeNode()
826         https://bugs.webkit.org/show_bug.cgi?id=202358
827
828         Reviewed by Carlos Garcia Campos.
829
830         * page/scrolling/nicosia/ScrollingTreeNicosia.cpp:
831         (WebCore::ScrollingTreeNicosia::createScrollingTreeNode):
832         Return appropriate objects for the remaining node types.
833
834 2019-09-30  Zan Dobersek  <zdobersek@igalia.com>
835
836         [Nicosia] Add missing conversion casts for LayerRepresentation objects
837         https://bugs.webkit.org/show_bug.cgi?id=202357
838
839         Reviewed by Carlos Garcia Campos.
840
841         After r250491, we have to request explicit conversion of
842         LayerRepresentation objects to Nicosia::PlatformLayer pointers.
843
844         * page/scrolling/nicosia/ScrollingTreeFixedNode.cpp:
845         (WebCore::ScrollingTreeFixedNode::commitStateBeforeChildren):
846         * page/scrolling/nicosia/ScrollingTreeFrameScrollingNodeNicosia.cpp:
847         (WebCore::ScrollingTreeFrameScrollingNodeNicosia::commitStateBeforeChildren):
848         (WebCore::ScrollingTreeFrameScrollingNodeNicosia::handleWheelEvent):
849         (WebCore::ScrollingTreeFrameScrollingNodeNicosia::repositionScrollingLayers):
850         * page/scrolling/nicosia/ScrollingTreeOverflowScrollProxyNode.cpp:
851         (WebCore::ScrollingTreeOverflowScrollProxyNode::commitStateBeforeChildren):
852         * page/scrolling/nicosia/ScrollingTreeOverflowScrollingNodeNicosia.cpp:
853         (WebCore::ScrollingTreeOverflowScrollingNodeNicosia::repositionScrollingLayers):
854         (WebCore::ScrollingTreeOverflowScrollingNodeNicosia::handleWheelEvent):
855         * page/scrolling/nicosia/ScrollingTreePositionedNode.cpp:
856         (WebCore::ScrollingTreePositionedNode::commitStateBeforeChildren):
857         * page/scrolling/nicosia/ScrollingTreeStickyNode.cpp:
858         (WebCore::ScrollingTreeStickyNode::commitStateBeforeChildren):
859
860 2019-09-29  Zan Dobersek  <zdobersek@igalia.com>
861
862         ScrollingTreeScrollingNode: use LayerRepresentation for scroll container, scrolled contents layers
863         https://bugs.webkit.org/show_bug.cgi?id=202256
864         <rdar://problem/55772092>
865
866         Reviewed by Simon Fraser.
867
868         Make the scroll container and scrolled contents layer holders
869         platform-independent by using the LayerRepresentation as the underlying
870         type for the two member variables in ScrollingTreeScrollingNode.
871
872         * page/scrolling/ScrollingTreeScrollingNode.cpp:
873         (WebCore::ScrollingTreeScrollingNode::commitStateBeforeChildren):
874         * page/scrolling/ScrollingTreeScrollingNode.h:
875         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
876         (WebCore::ScrollingTreeFrameScrollingNodeMac::repositionScrollingLayers):
877         * page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.mm:
878         (WebCore::ScrollingTreeOverflowScrollingNodeMac::repositionScrollingLayers):
879
880 2019-09-28  Brent Fulgham  <bfulgham@apple.com>
881
882         [FTW] Correct compositing, shadow, and radial gradient implementations
883         https://bugs.webkit.org/show_bug.cgi?id=202177
884
885         Reviewed by Fujii Hironori.
886
887         This patch corrects a number of implementation errors in basic Canvas
888         drawing operations.
889
890         Tested by canvas/philip/tests 
891
892         * platform/graphics/win/Direct2DOperations.cpp:
893         (WebCore::Direct2D::State::setCompositeOperation): Initialize blend and
894         composite modes to correct defaults.
895         (WebCore::Direct2D::drawWithShadowHelper): Correct value used for blur
896         standard deviation to more closely match other browser output.
897         * platform/graphics/win/Direct2DUtilities.cpp:
898         (WebCore::Direct2D::createBitmapCopyFromContext): Added helper function.
899         * platform/graphics/win/Direct2DUtilities.h:
900         * platform/graphics/win/GradientDirect2D.cpp:
901         (WebCore::Gradient::generateGradient): Properly handle the case of a non-zero
902         initial gradient radius. Properly compute the final radius.
903         * platform/graphics/win/ImageBufferDataDirect2D.cpp:
904         (WebCore::ImageBufferData::readDataFromBitmapIfNeeded const): Update to use ID2D1DeviceContext
905         from platformContext, rather than searching for it each time.
906         (WebCore::ImageBufferData::compatibleBitmap): Ditto.
907         * platform/graphics/win/PlatformContextDirect2D.cpp:
908         (WebCore::PlatformContextDirect2D::PlatformContextDirect2D): Grab the ID2D1DeviceContext for
909         the RenderTarget at construction time.
910         (WebCore::PlatformContextDirect2D::setRenderTarget): Ditto.
911         (WebCore::PlatformContextDirect2D::endDraw): Perform compositing operations when needed.
912         (WebCore::PlatformContextDirect2D::compositeIfNeeded): Added.
913         (WebCore::PlatformContextDirect2D::setBlendAndCompositeMode): Update to properly set the
914         blend and compositing mode (depending on global value set for the canvas.)
915         * platform/graphics/win/PlatformContextDirect2D.h:
916         (WebCore::PlatformContextDirect2D::deviceContext):
917         (WebCore::PlatformContextDirect2D::setRenderTarget): Deleted.
918         (WebCore::PlatformContextDirect2D::setBlendMode): Deleted.
919         (WebCore::PlatformContextDirect2D::setCompositeMode): Deleted.
920
921 2019-09-29  Zan Dobersek  <zdobersek@igalia.com>
922
923         Tighten up LayerRepresentation operators
924         https://bugs.webkit.org/show_bug.cgi?id=202344
925
926         Reviewed by Simon Fraser.
927
928         Make the operators on the LayerRepresentation class explicit.
929         Additionally, the bool operator is added to the class, allowing objects
930         of this class to be safely used in boolean contexts like null checks.
931         Before, use in such contexts fell back to using the
932         GraphicsLayer::PlatformLayerID operator which caused asserts when the
933         internal representation was of different type.
934
935         While the explicit operators prevent misuse, they do require additional
936         conversion casts to retrieve the internal LayerRepresentation value.
937
938         * page/scrolling/ScrollingStateNode.h:
939         (WebCore::LayerRepresentation::operator GraphicsLayer* const):
940         (WebCore::LayerRepresentation::operator PlatformLayer* const):
941         (WebCore::LayerRepresentation::operator GraphicsLayer::PlatformLayerID const):
942         (WebCore::LayerRepresentation::operator bool const):
943         (WebCore::LayerRepresentation::toRepresentation const):
944         Add a missing ASSERT_NOT_REACHED() invocation.
945         * page/scrolling/ScrollingTreeScrollingNode.cpp:
946         (WebCore::ScrollingTreeScrollingNode::commitStateBeforeChildren):
947         * page/scrolling/cocoa/ScrollingTreeFixedNode.mm:
948         (WebCore::ScrollingTreeFixedNode::commitStateBeforeChildren):
949         * page/scrolling/cocoa/ScrollingTreeOverflowScrollProxyNode.mm:
950         (WebCore::ScrollingTreeOverflowScrollProxyNode::commitStateBeforeChildren):
951         * page/scrolling/cocoa/ScrollingTreePositionedNode.mm:
952         (WebCore::ScrollingTreePositionedNode::commitStateBeforeChildren):
953         * page/scrolling/cocoa/ScrollingTreeStickyNode.mm:
954         (WebCore::ScrollingTreeStickyNode::commitStateBeforeChildren):
955         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
956         (WebCore::ScrollingTreeFrameScrollingNodeMac::commitStateBeforeChildren):
957
958 2019-09-29  Zalan Bujtas  <zalan@apple.com>
959
960         [LFC][IFC] Remove InlineLayout abstraction layer
961         https://bugs.webkit.org/show_bug.cgi?id=202352
962         <rdar://problem/55811532>
963
964         Reviewed by Antti Koivisto.
965
966         Move InlineLayout functions to InlineFormattingContext. Now inline layout has
967         1. InlineFormattingContext -high level layout and preferred width computation, collecting inline content, constructing display boxes
968         2. LineLayout -responsible for placing inline content on the current line (partial inline content handling, line breaking etc)
969         3. Line -represents an actual line, turns inline content into runs.
970
971         * Sources.txt:
972         * WebCore.xcodeproj/project.pbxproj:
973         * layout/inlineformatting/InlineFormattingContext.cpp:
974         (WebCore::Layout::InlineFormattingContext::layoutInFlowContent):
975         (WebCore::Layout::InlineFormattingContext::lineLayout):
976         (WebCore::Layout::InlineFormattingContext::computedIntrinsicWidthConstraints):
977         (WebCore::Layout::InlineFormattingContext::computedIntrinsicWidthForConstraint const):
978         (WebCore::Layout::InlineFormattingContext::initialConstraintsForLine):
979         (WebCore::Layout::InlineFormattingContext::setDisplayBoxesForLine):
980         * layout/inlineformatting/InlineFormattingContext.h:
981         (WebCore::Layout::InlineFormattingContext::InlineLayout::layoutState const): Deleted.
982         (WebCore::Layout::InlineFormattingContext::InlineLayout::formattingContext const): Deleted.
983         (WebCore::Layout::InlineFormattingContext::InlineLayout::formattingRoot const): Deleted.
984         (WebCore::Layout::InlineFormattingContext::InlineLayout::formattingState): Deleted.
985         (WebCore::Layout::InlineFormattingContext::InlineLayout::widthConstraint const): Deleted.
986         * layout/inlineformatting/InlineFormattingContextLineLayout.cpp: Removed.
987         * layout/inlineformatting/InlineFormattingState.h:
988         (WebCore::Layout::InlineFormattingState::inlineItems const):
989         * layout/inlineformatting/InlineLineLayout.cpp: Added.
990         (WebCore::Layout::inlineItemWidth):
991         (WebCore::Layout::LineLayout::LineInput::LineInput):
992         (WebCore::Layout::LineLayout::UncommittedContent::add):
993         (WebCore::Layout::LineLayout::UncommittedContent::reset):
994         (WebCore::Layout::LineLayout::LineLayout):
995         (WebCore::Layout::LineLayout::commitPendingContent):
996         (WebCore::Layout::LineLayout::close):
997         (WebCore::Layout::LineLayout::placeInlineItem):
998         (WebCore::Layout::LineLayout::layout):
999         * layout/inlineformatting/InlineLineLayout.h: Added.
1000         (WebCore::Layout::LineLayout::formattingContext const):
1001         (WebCore::Layout::LineLayout::UncommittedContent::runs):
1002         (WebCore::Layout::LineLayout::UncommittedContent::isEmpty const):
1003         (WebCore::Layout::LineLayout::UncommittedContent::size const):
1004         (WebCore::Layout::LineLayout::UncommittedContent::width const):
1005
1006 2019-09-29  Zan Dobersek  <zdobersek@igalia.com>
1007
1008         [Nicosia] Add overflow, overflow proxy node implementations
1009         https://bugs.webkit.org/show_bug.cgi?id=202306
1010
1011         Reviewed by Carlos Garcia Campos.
1012
1013         Add the ScrollingTreeOverflowScrollProxyNode and
1014         ScrollingTreeOverflowScrollingNodeNicosia classes, implementing the
1015         missing overlfow node types. Both implementations are based on the
1016         corresponsing classes for Cocoa/Mac platforms and should ideally
1017         share most of the platform-agnostic logic.
1018
1019         * SourcesWPE.txt:
1020         * page/scrolling/nicosia/ScrollingTreeOverflowScrollProxyNode.cpp: Added.
1021         (WebCore::ScrollingTreeOverflowScrollProxyNode::create):
1022         (WebCore::ScrollingTreeOverflowScrollProxyNode::ScrollingTreeOverflowScrollProxyNode):
1023         (WebCore::ScrollingTreeOverflowScrollProxyNode::commitStateBeforeChildren):
1024         (WebCore::ScrollingTreeOverflowScrollProxyNode::applyLayerPositions):
1025         (WebCore::ScrollingTreeOverflowScrollProxyNode::dumpProperties const):
1026         * page/scrolling/nicosia/ScrollingTreeOverflowScrollProxyNode.h: Added.
1027         * page/scrolling/nicosia/ScrollingTreeOverflowScrollingNodeNicosia.cpp: Added.
1028         (WebCore::ScrollingTreeOverflowScrollingNodeNicosia::create):
1029         (WebCore::ScrollingTreeOverflowScrollingNodeNicosia::ScrollingTreeOverflowScrollingNodeNicosia):
1030         (WebCore::ScrollingTreeOverflowScrollingNodeNicosia::commitStateAfterChildren):
1031         (WebCore::ScrollingTreeOverflowScrollingNodeNicosia::adjustedScrollPosition const):
1032         (WebCore::ScrollingTreeOverflowScrollingNodeNicosia::repositionScrollingLayers):
1033         (WebCore::ScrollingTreeOverflowScrollingNodeNicosia::handleWheelEvent):
1034         * page/scrolling/nicosia/ScrollingTreeOverflowScrollingNodeNicosia.h: Added.
1035
1036 2019-09-28  Said Abou-Hallawa  <sabouhallawa@apple.com>
1037
1038         Crash when removing the target element while animating its attributes
1039         https://bugs.webkit.org/show_bug.cgi?id=202247
1040
1041         Reviewed by Darin Adler.
1042
1043         If SMIL is animating a CSS attribute, there is a chance the animation is
1044         ended while it is being started or progressed. For that reason, the member
1045         SVGAnimateElementBase::m_animator has to be made RefPtr and it has to be
1046         be protected in resetAnimatedType() and calculateAnimatedValue().
1047
1048         While SMILTimeContainer::updateAnimations() is calling progress() for the
1049         scheduled animation elements, SMILTimeContainer::unschedule() might get
1050         called if processing an animation causes events to be dispatched. For that
1051         reason we need to copy the scheduled animations Vector before processing
1052         them so we avoid changing the Vector while looping through its items.
1053
1054         Remove the guard SMILTimeContainer::m_preventScheduledAnimationsChanges
1055         which was added in r129670 for debugging purposes. In some situations, 
1056         the scheduled animations map could be modified out from under some of the
1057         functions of SMILTimeContainer.
1058
1059         Test: svg/animations/animate-and-remove-target-element.html
1060
1061         * svg/SVGAnimateElementBase.cpp:
1062         (WebCore::SVGAnimateElementBase::resetAnimatedType):
1063         (WebCore::SVGAnimateElementBase::calculateAnimatedValue):
1064         * svg/SVGAnimateElementBase.h:
1065         * svg/SVGElement.cpp:
1066         (WebCore::SVGElement::createAnimator):
1067         * svg/SVGElement.h:
1068         * svg/animation/SMILTimeContainer.cpp:
1069         (WebCore::SMILTimeContainer::schedule):
1070         (WebCore::SMILTimeContainer::unschedule):
1071         (WebCore::SMILTimeContainer::setElapsed):
1072         (WebCore::SMILTimeContainer::sortByPriority):
1073         (WebCore::SMILTimeContainer::processAnimations):
1074         (WebCore::SMILTimeContainer::processScheduledAnimations):
1075         (WebCore::SMILTimeContainer::updateAnimations):
1076         (WebCore::SMILTimeContainer::~SMILTimeContainer): Deleted.
1077         * svg/animation/SMILTimeContainer.h:
1078         * svg/animation/SVGSMILElement.cpp:
1079         (WebCore::SVGSMILElement::calculateNextProgressTime const):
1080         * svg/properties/SVGAnimatedPropertyAccessorImpl.h:
1081         * svg/properties/SVGAnimatedPropertyAnimatorImpl.h:
1082         * svg/properties/SVGAnimatedPropertyPairAccessorImpl.h:
1083         * svg/properties/SVGAnimatedPropertyPairAnimator.h:
1084         * svg/properties/SVGAnimatedPropertyPairAnimatorImpl.h:
1085         * svg/properties/SVGAttributeAnimator.h:
1086         * svg/properties/SVGMemberAccessor.h:
1087         (WebCore::SVGMemberAccessor::createAnimator const):
1088         * svg/properties/SVGPrimitivePropertyAnimator.h:
1089         (WebCore::SVGPrimitivePropertyAnimator::create):
1090         * svg/properties/SVGPropertyAnimatorFactory.h:
1091         (WebCore::SVGPropertyAnimatorFactory::createAnimator):
1092         * svg/properties/SVGPropertyOwnerRegistry.h:
1093         * svg/properties/SVGPropertyRegistry.h:
1094         * svg/properties/SVGValuePropertyAnimatorImpl.h:
1095         * svg/properties/SVGValuePropertyListAnimatorImpl.h:
1096
1097 2019-09-28  Zalan Bujtas  <zalan@apple.com>
1098
1099         [LFC][IFC] Move horizontal alignment to Line
1100         https://bugs.webkit.org/show_bug.cgi?id=202351
1101         <rdar://problem/55810139>
1102
1103         Reviewed by Antti Koivisto.
1104
1105         Line should be able to finalize the run placement including horizontal alignment.
1106
1107         * layout/Verification.cpp:
1108         (WebCore::Layout::outputMismatchingSimpleLineInformationIfNeeded):
1109         * layout/inlineformatting/InlineFormattingContextLineLayout.cpp:
1110         (WebCore::Layout::LineInput::LineInput):
1111         (WebCore::Layout::LineLayout::LineLayout):
1112         (WebCore::Layout::InlineFormattingContext::InlineLayout::layout):
1113         (WebCore::Layout::InlineFormattingContext::InlineLayout::computedIntrinsicWidth const):
1114         * layout/inlineformatting/InlineLine.cpp:
1115         (WebCore::Layout::Line::Line):
1116         (WebCore::Layout::Line::isVisuallyEmpty const):
1117         (WebCore::Layout::Line::close):
1118         (WebCore::Layout::Line::verticalAlignContent):
1119         (WebCore::Layout::Line::horizontalAlignContent):
1120         (WebCore::Layout::Line::appendInlineContainerStart):
1121         (WebCore::Layout::Line::appendTextContent):
1122         (WebCore::Layout::Line::appendNonReplacedInlineBox):
1123         (WebCore::Layout::Line::appendHardLineBreak):
1124         (WebCore::Layout::Line::inlineItemContentHeight const):
1125         * layout/inlineformatting/InlineLine.h:
1126
1127 2019-09-28  Wenson Hsieh  <wenson_hsieh@apple.com>
1128
1129         [IDL] Support record<DOMString, *Callback> in bindings
1130         https://bugs.webkit.org/show_bug.cgi?id=202326
1131
1132         Reviewed by Sam Weinig.
1133
1134         Currently, IDLRecord's converter assumes that the value type (template argument V) can be converted by passing
1135         in only an ExecState and the JSValue, since it calls `auto typedValue = Converter<V>::convert(state, subValue)`.
1136         However, IDLCallbackFunctions additionally require the JSDOMGlobalObject (see JSDOMConverterCallbacks.h). This
1137         results in a compilation error in generated code, when attempting to convert the record.
1138
1139         To fix this, teach Converter<IDLRecord<K, V>> to accept three arguments (the ExecState, value, and global
1140         object) in the case where V requires the global object. Additionally, let the bindings generator know that
1141         JSValue to native object conversion requires the global object, by returning whether or not the value type of
1142         the IDL record requires the global object, in the case where the given type is a record.
1143
1144         * bindings/js/JSDOMConvertRecord.h:
1145         * bindings/scripts/CodeGeneratorJS.pm:
1146         (JSValueToNativeDOMConvertNeedsGlobalObject):
1147         * bindings/scripts/test/JS/JSTestObj.cpp:
1148
1149         Test this scenario by augmenting TestObj.idl with record<DOMString, VoidCallback>.
1150
1151         (WebCore::jsTestObjStringVoidCallbackRecordAttrGetter):
1152         (WebCore::jsTestObjStringVoidCallbackRecordAttr):
1153         (WebCore::setJSTestObjStringVoidCallbackRecordAttrSetter):
1154         (WebCore::setJSTestObjStringVoidCallbackRecordAttr):
1155         * bindings/scripts/test/TestObj.idl:
1156
1157 2019-09-28  Zalan Bujtas  <zalan@apple.com>
1158
1159         [LFC][IFC] Line::InitialConstraints's heightAndBaseline should be optional
1160         https://bugs.webkit.org/show_bug.cgi?id=202348
1161
1162         Reviewed by Antti Koivisto.
1163
1164         Vertical properties are undefined while computing the preferred width.
1165
1166         * layout/inlineformatting/InlineFormattingContextLineLayout.cpp:
1167         (WebCore::Layout::LineInput::LineInput):
1168         (WebCore::Layout::InlineFormattingContext::InlineLayout::computedIntrinsicWidth const):
1169         * layout/inlineformatting/InlineLine.cpp:
1170         (WebCore::Layout::Line::Line):
1171         * layout/inlineformatting/InlineLine.h:
1172
1173 2019-09-28  Chris Dumez  <cdumez@apple.com>
1174
1175         [Experiment][iOS] Add temporary HTTP header to distinguish iPads for requests to Google
1176         https://bugs.webkit.org/show_bug.cgi?id=202335
1177         <rdar://problem/55790994>
1178
1179         Reviewed by Maciej Stachowiak.
1180
1181         * loader/cache/CachedResourceLoader.cpp:
1182         (WebCore::CachedResourceLoader::requestResource):
1183         * platform/network/HTTPHeaderNames.in:
1184
1185 2019-09-28  Zalan Bujtas  <zalan@apple.com>
1186
1187         [LFC][IFC] Line::Box should have a const public interface
1188         https://bugs.webkit.org/show_bug.cgi?id=202336
1189         <rdar://problem/55798628>
1190
1191         Reviewed by Antti Koivisto.
1192
1193         Clean up Line::Box interface.
1194
1195         * layout/inlineformatting/InlineLine.cpp:
1196         (WebCore::Layout::Line::close):
1197         * layout/inlineformatting/InlineLine.h:
1198         (WebCore::Layout::Line::Run::displayRun const):
1199         (WebCore::Layout::Line::Run::isVisuallyEmpty const):
1200         (WebCore::Layout::Line::Run::expand):
1201         (WebCore::Layout::Line::Run::displayRun): Deleted.
1202
1203 2019-09-27  Chris Dumez  <cdumez@apple.com>
1204
1205         Pages using WebGLRenderingContext fail to enter the back/forward cache
1206         https://bugs.webkit.org/show_bug.cgi?id=202318
1207         <rdar://problem/55783612>
1208
1209         Reviewed by Tim Horton.
1210
1211         Allow pages with a WebGLRenderingContext to enter the back/forward cache by updating the
1212         implementation to use SuspendableTimers to fire JS events. This guarantees that no events
1213         will be fired (and thus no JS will run) while in the page cache.
1214
1215         This was preventing some of the pages on weather.com and facebook.com from entering the
1216         back/forward cache.
1217
1218         Test: fast/canvas/webgl/canvas-webgl-page-cache.html
1219
1220         * dom/DocumentEventQueue.cpp:
1221         * html/canvas/WebGLRenderingContextBase.cpp:
1222         (WebCore::WebGLRenderingContextBase::WebGLRenderingContextBase):
1223         (WebCore::WebGLRenderingContextBase::canSuspendForDocumentSuspension const):
1224         (WebCore::WebGLRenderingContextBase::suspend):
1225         (WebCore::WebGLRenderingContextBase::resume):
1226         (WebCore::WebGLRenderingContextBase::dispatchContextLostEvent):
1227         (WebCore::WebGLRenderingContextBase::maybeRestoreContext):
1228         (WebCore::WebGLRenderingContextBase::dispatchContextChangedNotification):
1229         (WebCore::WebGLRenderingContextBase::dispatchContextChangedEvent):
1230         * html/canvas/WebGLRenderingContextBase.h:
1231         * page/DOMTimer.cpp:
1232         (WebCore::DOMTimer::DOMTimer):
1233         * page/DOMTimer.h:
1234         * page/SuspendableTimer.cpp:
1235         (WebCore::SuspendableTimerBase::SuspendableTimerBase):
1236         (WebCore::SuspendableTimerBase::hasPendingActivity const):
1237         (WebCore::SuspendableTimerBase::stop):
1238         (WebCore::SuspendableTimerBase::suspend):
1239         (WebCore::SuspendableTimerBase::resume):
1240         (WebCore::SuspendableTimerBase::canSuspendForDocumentSuspension const):
1241         (WebCore::SuspendableTimerBase::didStop):
1242         (WebCore::SuspendableTimerBase::cancel):
1243         (WebCore::SuspendableTimerBase::startRepeating):
1244         (WebCore::SuspendableTimerBase::startOneShot):
1245         (WebCore::SuspendableTimerBase::repeatInterval const):
1246         (WebCore::SuspendableTimerBase::augmentFireInterval):
1247         (WebCore::SuspendableTimerBase::augmentRepeatInterval):
1248         (WebCore::SuspendableTimer::activeDOMObjectName const):
1249         * page/SuspendableTimer.h:
1250
1251 2019-09-27  Adrian Perez de Castro  <aperez@igalia.com>
1252
1253         [GTK][WPE] Fixes for non-unified builds after r249714
1254         https://bugs.webkit.org/show_bug.cgi?id=202304
1255
1256         Reviewed by Youenn Fablet.
1257
1258         No new tests needed.
1259
1260         * Modules/websockets/WorkerThreadableWebSocketChannel.cpp: Add missing inclusion of Frame.h
1261         to make the compiler stop complaining about Frame being used without being defined.
1262         * inspector/InspectorShaderProgram.h: Add missing inclusion of wtf/Variant.h, where
1263         WTF::Monostate is defined; and prefixed the usage with its namespace.
1264
1265 2019-09-27  Andres Gonzalez  <andresg_22@apple.com>
1266
1267         Support accessibility for <figure> element on iOS.
1268         https://bugs.webkit.org/show_bug.cgi?id=202272
1269         <rdar://problem/54789907>
1270
1271         Reviewed by Chris Fleizach.
1272
1273         Test: accessibility/ios-simulator/figure-element.html
1274
1275         Added a role description for the <figure> element.
1276         * accessibility/AccessibilityObject.cpp:
1277         (WebCore::AccessibilityObject::roleDescription const):
1278
1279 2019-09-27  Zalan Bujtas  <zalan@apple.com>
1280
1281         [iPadOS] Can’t use RalphLauren.com on iPad because hover menus don’t stay up
1282         https://bugs.webkit.org/show_bug.cgi?id=202331
1283         <rdar://problem/55629493>
1284
1285         Reviewed by Tim Horton.
1286
1287         Unfortunately the top level menu items now are ARIA labelled as 'buttons' and that triggers the fast path on content observation.
1288         This patch introduces a quirk on ralphLauren.com to ignore the ARIA labels when checking whether the target node should always click through.
1289
1290         * page/Quirks.cpp:
1291         (WebCore::Quirks::shouldIgnoreAriaForFastPathContentObservationCheck const):
1292         * page/Quirks.h:
1293
1294 2019-09-27  Per Arne Vollan  <pvollan@apple.com>
1295
1296         [Win] Crash under FontCache::lastResortFallbackFont
1297         https://bugs.webkit.org/show_bug.cgi?id=202325
1298         <rdar://problem/47856730>
1299
1300         Reviewed by Brent Fulgham.
1301
1302         As demonstrated by crash reports, there seems to be cases where we are not able to create a last resort fallback font  
1303         on Windows. If all attempts to create a fallback font fail, create a font from the default UI font.
1304  
1305         No new tests. I have not been able to reproduce this issue. 
1306
1307         * platform/graphics/win/FontCacheWin.cpp:
1308         (WebCore::FontCache::lastResortFallbackFont):
1309
1310 2019-09-27  Jiewen Tan  <jiewen_tan@apple.com>
1311
1312         Unreviewed, rolling out r250397.
1313
1314         caused failure on iOS 13
1315
1316         Reverted changeset:
1317
1318         "REGRESSION: [ Catalina WK2 ] http/wpt/webauthn/public-key-
1319         credential-create-success-u2f.https.html is failing"
1320         https://bugs.webkit.org/show_bug.cgi?id=201620
1321         https://trac.webkit.org/changeset/250397
1322
1323 2019-09-27  Jer Noble  <jer.noble@apple.com>
1324
1325         [iOS] Vimeo fails to AirPlay in desktop mode
1326         https://bugs.webkit.org/show_bug.cgi?id=202322
1327
1328         Reviewed by Eric Carlson.
1329
1330         Add a Quirk which opts Vimeo out of the preload=auto restriction, and allows their
1331         second video element containing a HLS stream to correctly start AirPlaying when the
1332         system route changes.
1333
1334         * html/HTMLMediaElement.cpp:
1335         (WebCore::HTMLMediaElement::finishInitialization):
1336         * page/Quirks.cpp:
1337         (WebCore::Quirks::needsPreloadAutoQuirk const):
1338         * page/Quirks.h:
1339
1340 2019-09-27  Zalan Bujtas  <zalan@apple.com>
1341
1342         [LFC][IFC] Line::close should merge the text runs.
1343         https://bugs.webkit.org/show_bug.cgi?id=202319
1344         <rdar://problem/55785949>
1345
1346         Reviewed by Antti Koivisto.
1347
1348         Now Line::close returns the final Display::Run list.
1349
1350         * layout/displaytree/DisplayRect.h:
1351         (WebCore::Display::Rect::expandHorizontally):
1352         (WebCore::Display::Rect::expandVertically):
1353         (WebCore::Display::Rect::expand):
1354         * layout/displaytree/DisplayRun.h:
1355         (WebCore::Display::Run::expandVertically):
1356         (WebCore::Display::Run::expandHorizontally):
1357         * layout/inlineformatting/InlineFormattingContextLineLayout.cpp:
1358         (WebCore::Layout::InlineFormattingContext::InlineLayout::createDisplayRuns):
1359         * layout/inlineformatting/InlineLine.cpp:
1360         (WebCore::Layout::Line::close):
1361         * layout/inlineformatting/InlineLine.h:
1362         (WebCore::Layout::Line::Run::displayRun):
1363
1364 2019-09-27  Chris Dumez  <cdumez@apple.com>
1365
1366         Allow pages served over HTTPS with `Cache-Control: no-store` header to enter the back/forward cache
1367         https://bugs.webkit.org/show_bug.cgi?id=202314
1368         <rdar://problem/55783482>
1369
1370         Reviewed by Alex Christensen.
1371
1372         Allow pages served over HTTPS with `Cache-Control: no-store` header to enter the back/forward cache.
1373         This was preventing all pages on Facebook.com to enter the back/forward cache.
1374
1375         No new tests, updated existing test.
1376
1377         * history/PageCache.cpp:
1378         (WebCore::canCacheFrame):
1379
1380 2019-09-27  Devin Rousso  <drousso@apple.com>
1381
1382         Flaky Test: inspector/canvas/updateShader.html
1383         https://bugs.webkit.org/show_bug.cgi?id=202186
1384         <rdar://problem/55716053>
1385
1386         Reviewed by Joseph Pecoraro.
1387
1388         If the `WebGLProgram` outlives it's `WebGLRenderingContext`, the `ScriptExecutionContext*`
1389         that was provided in the constructor won't be invalidated leading to the bad access crash.
1390
1391         Rather than pass the `ScriptExecutionContext*` directly, have `WebGLProgram` inherit from
1392         `ContextDestructionObserver` so that it can propertly invalidate (and notify Web Inspector)
1393         when the related context is about to be destroyed.
1394
1395         Test: inspector/canvas/updateShader.html
1396
1397         * html/canvas/WebGLProgram.h:
1398         (WebCore::WebGLProgram::scriptExecutionContext const): Deleted.
1399         * html/canvas/WebGLProgram.cpp:
1400         (WebCore::WebGLProgram::WebGLProgram):
1401         (WebCore::WebGLProgram::contextDestroyed): Added.
1402
1403 2019-09-27  Zalan Bujtas  <zalan@apple.com>
1404
1405         [LFC][IFC] Replace Line::Run's logicalRect/textContext with Display::Run
1406         https://bugs.webkit.org/show_bug.cgi?id=202313
1407         <rdar://problem/55782430>
1408
1409         Reviewed by Antti Koivisto.
1410
1411         Display::Run is a container for logical rect and text context. Let's replace Line::Run's logical rect/text context with Display::Run.
1412
1413         * layout/Verification.cpp:
1414         (WebCore::Layout::outputMismatchingSimpleLineInformationIfNeeded):
1415         (WebCore::Layout::outputMismatchingComplexLineInformationIfNeeded):
1416         * layout/displaytree/DisplayRun.h:
1417         (WebCore::Display::Run::logicalRect const):
1418         * layout/inlineformatting/InlineFormattingContextLineLayout.cpp:
1419         (WebCore::Layout::InlineFormattingContext::InlineLayout::createDisplayRuns):
1420         (WebCore::Layout::InlineFormattingContext::InlineLayout::alignRuns const):
1421         * layout/inlineformatting/InlineFormattingContextQuirks.cpp:
1422         (WebCore::Layout::InlineFormattingContext::Quirks::lineDescentNeedsCollapsing const):
1423         * layout/inlineformatting/InlineFormattingState.h:
1424         (WebCore::Layout::InlineFormattingState::addInlineRun):
1425         * layout/inlineformatting/InlineLine.cpp:
1426         (WebCore::Layout::Line::Run::Run):
1427         (WebCore::Layout::Line::isVisuallyEmpty const):
1428         (WebCore::Layout::Line::appendNonBreakableSpace):
1429         (WebCore::Layout::Line::appendTextContent):
1430         (WebCore::Layout::Line::appendNonReplacedInlineBox):
1431         (WebCore::Layout::Line::appendHardLineBreak):
1432         * layout/inlineformatting/InlineLine.h:
1433         (WebCore::Layout::Line::Run::displayRun const):
1434         (WebCore::Layout::Line::Run::logicalRect const):
1435         (WebCore::Layout::Line::Run::adjustLogicalTop):
1436         (WebCore::Layout::Line::Run::moveVertically):
1437         (WebCore::Layout::Line::Run::moveHorizontally):
1438         (WebCore::Layout::Line::Run::textContext const): Deleted.
1439         * layout/layouttree/LayoutTreeBuilder.cpp:
1440         (WebCore::Layout::outputInlineRuns):
1441
1442 2019-09-27  Truitt Savell  <tsavell@apple.com>
1443
1444         Unreviewed, rolling out r250415.
1445
1446         Broke iOS debug testing with 50 crashes and 850 API failure
1447
1448         Reverted changeset:
1449
1450         "ScrollingTreeScrollingNode: use LayerRepresentation for
1451         scroll container, scrolled contents layers"
1452         https://bugs.webkit.org/show_bug.cgi?id=202256
1453         https://trac.webkit.org/changeset/250415
1454
1455 2019-09-27  Alex Christensen  <achristensen@webkit.org>
1456
1457         Move service worker process termination delay disabling from process pool to website data store
1458         https://bugs.webkit.org/show_bug.cgi?id=202308
1459
1460         Reviewed by Chris Dumez.
1461
1462         * workers/service/server/SWServer.cpp:
1463         (WebCore::SWServer::SWServer):
1464         (WebCore::SWServer::unregisterServiceWorkerClient):
1465         * workers/service/server/SWServer.h:
1466         (WebCore::SWServer::disableServiceWorkerProcessTerminationDelay): Deleted.
1467
1468 2019-09-27  Chris Dumez  <cdumez@apple.com>
1469
1470         IDBRequest should not prevent a page from entering the back/forward cache
1471         https://bugs.webkit.org/show_bug.cgi?id=202270
1472         <rdar://problem/55744717>
1473
1474         Reviewed by Youenn Fablet.
1475
1476         Update IDBRequest::canSuspendForDocumentSuspension() to return true instead of
1477         false. IDBRequest can only fire 2 events (error / success) and for both its
1478         merely enqueues the Event to the DocumentEventQueue. The DocumentEventQueue
1479         uses a SuspendableTimer (which will be suspended while the document is in the
1480         page cache) so there is no risk of firing the events (and thus running script)
1481         while in the page cache.
1482
1483         Test: storage/indexeddb/IDBRequest-page-cache.html
1484
1485         * Modules/indexeddb/IDBRequest.cpp:
1486         (WebCore::IDBRequest::canSuspendForDocumentSuspension const):
1487
1488 2019-09-27  Zalan Bujtas  <zalan@apple.com>
1489
1490         [LFC][IFC] Remove redundant Line::TextContext member variables
1491         https://bugs.webkit.org/show_bug.cgi?id=202300
1492         <rdar://problem/55769916>
1493
1494         Reviewed by Antti Koivisto.
1495
1496         This is in preparation for using Display::Run in Line::Run instead of Display::Rect + TextContext.
1497
1498         * layout/inlineformatting/InlineFormattingContextLineLayout.cpp:
1499         (WebCore::Layout::InlineFormattingContext::InlineLayout::createDisplayRuns):
1500         * layout/inlineformatting/InlineFormattingContextQuirks.cpp:
1501         (WebCore::Layout::InlineFormattingContext::Quirks::lineDescentNeedsCollapsing const):
1502         * layout/inlineformatting/InlineLine.cpp:
1503         (WebCore::Layout::Line::Run::isWhitespace const):
1504         (WebCore::Layout::Line::Run::canBeExtended const):
1505         (WebCore::Layout::Line::isVisuallyEmpty const):
1506         (WebCore::Layout::Line::removeTrailingTrimmableContent):
1507         (WebCore::Layout::Line::trailingTrimmableWidth const):
1508         (WebCore::Layout::Line::appendTextContent):
1509         * layout/inlineformatting/InlineLine.h:
1510         (WebCore::Layout::Line::Run::isVisuallyEmpty const):
1511         (WebCore::Layout::Line::Run::setVisuallyIsEmpty):
1512         (WebCore::Layout::Line::Run::setTextIsCollapsed): Deleted.
1513
1514 2019-09-27  Zan Dobersek  <zdobersek@igalia.com>
1515
1516         [Nicosia] Implement frame scrolling functionality
1517         https://bugs.webkit.org/show_bug.cgi?id=202201
1518
1519         Reviewed by Carlos Garcia Campos.
1520
1521         Implement logic in the ScrollingTreeFrameScrollingNodeNicosia class,
1522         largely following the Mac port's implementation but skipping areas we
1523         don't support or can keep simple, like CSS scroll snap, frame pinning
1524         and more complex wheel event handling through the platform-specific
1525         delegate behavior.
1526
1527         * page/scrolling/nicosia/ScrollingTreeFrameScrollingNodeNicosia.cpp:
1528         (WebCore::ScrollingTreeFrameScrollingNodeNicosia::commitStateBeforeChildren):
1529         (WebCore::ScrollingTreeFrameScrollingNodeNicosia::commitStateAfterChildren):
1530         (WebCore::ScrollingTreeFrameScrollingNodeNicosia::handleWheelEvent):
1531         (WebCore::ScrollingTreeFrameScrollingNodeNicosia::adjustedScrollPosition const):
1532         (WebCore::ScrollingTreeFrameScrollingNodeNicosia::currentScrollPositionChanged):
1533         (WebCore::ScrollingTreeFrameScrollingNodeNicosia::repositionScrollingLayers):
1534         (WebCore::ScrollingTreeFrameScrollingNodeNicosia::repositionRelatedLayers):
1535         * page/scrolling/nicosia/ScrollingTreeFrameScrollingNodeNicosia.h:
1536
1537 2019-09-27  Zan Dobersek  <zdobersek@igalia.com>
1538
1539         [Nicosia] ScrollingCoordinatorNicosia should handle wheel events coming from the main thread
1540         https://bugs.webkit.org/show_bug.cgi?id=202275
1541
1542         Reviewed by Carlos Garcia Campos.
1543
1544         * page/scrolling/nicosia/ScrollingCoordinatorNicosia.cpp:
1545         (WebCore::ScrollingCoordinatorNicosia::handleWheelEvent):
1546         Handle wheel events that get rerouted through the main thread,
1547         dispatching them back to the scrolling thread so that they end up
1548         performing the desired scroll if possible.
1549
1550 2019-09-27  Zan Dobersek  <zdobersek@igalia.com>
1551
1552         [CoordinatedGraphics] support bounds origin
1553         https://bugs.webkit.org/show_bug.cgi?id=198998
1554
1555         Reviewed by Carlos Garcia Campos.
1556
1557         Add bounds-origin support to the CoordinatedGraphics stack. Currently we
1558         take the short-cut implementation of just combining the bounds origin
1559         and the position value and incorporating them into the layer transform
1560         we calculate in TextureMapperLayer.
1561
1562         Additional boilerplate code is added, as required, to relay the
1563         WebCore::GraphicsLayer change of bounds origin to the rendering system.
1564
1565         * platform/graphics/nicosia/NicosiaPlatformLayer.h:
1566         (Nicosia::CompositionLayer::flushState):
1567         * platform/graphics/texmap/TextureMapperLayer.cpp:
1568         (WebCore::TextureMapperLayer::computeTransformsRecursive):
1569         (WebCore::TextureMapperLayer::setBoundsOrigin):
1570         * platform/graphics/texmap/TextureMapperLayer.h:
1571         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
1572         (WebCore::CoordinatedGraphicsLayer::setBoundsOrigin):
1573         (WebCore::CoordinatedGraphicsLayer::computePositionRelativeToBase):
1574         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
1575
1576 2019-09-26  Zan Dobersek  <zdobersek@igalia.com>
1577
1578         ScrollingTreeScrollingNode: use LayerRepresentation for scroll container, scrolled contents layers
1579         https://bugs.webkit.org/show_bug.cgi?id=202256
1580
1581         Reviewed by Simon Fraser.
1582
1583         Make the scroll container and scrolled contents layer holders
1584         platform-independent by using the LayerRepresentation as the underlying
1585         type for the two member variables in ScrollingTreeScrollingNode.
1586
1587         * page/scrolling/ScrollingTreeScrollingNode.cpp:
1588         (WebCore::ScrollingTreeScrollingNode::commitStateBeforeChildren):
1589         * page/scrolling/ScrollingTreeScrollingNode.h:
1590         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
1591         (WebCore::ScrollingTreeFrameScrollingNodeMac::repositionScrollingLayers):
1592         * page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.mm:
1593         (WebCore::ScrollingTreeOverflowScrollingNodeMac::repositionScrollingLayers):
1594
1595 2019-09-26  Chris Dumez  <cdumez@apple.com>
1596
1597         Pages frequently fails to enter the back/forward cache due to pending loads
1598         https://bugs.webkit.org/show_bug.cgi?id=202289
1599         <rdar://problem/55758506>
1600
1601         Reviewed by Geoffrey Garen.
1602
1603         Allow pages to enter the back / forward cache, even if they have pending loads.
1604         Note that these pending loads get cancelled. Also note that we won't enter page
1605         cache unless the 'load' event has been fired in the main frame, since a
1606         HistoryItem would not get created otherwise. This was causing frequent transient
1607         failures to enter the back / forward cache while browsing (e.g. on weather.com).
1608
1609         Test: http/tests/navigation/page-cache-pending-load.html
1610
1611         * history/PageCache.cpp:
1612         (WebCore::canCacheFrame):
1613         * loader/CrossOriginPreflightChecker.cpp:
1614         * loader/CrossOriginPreflightChecker.h:
1615         * loader/DocumentLoader.cpp:
1616         (WebCore::DocumentLoader::setMainDocumentError):
1617         (WebCore::DocumentLoader::stopLoading):
1618         * loader/DocumentLoader.h:
1619         * loader/DocumentThreadableLoader.cpp:
1620         * loader/DocumentThreadableLoader.h:
1621         * loader/cache/CachedResource.cpp:
1622         * loader/cache/CachedResource.h:
1623         * loader/cache/CachedResourceClient.h:
1624         (WebCore::CachedResourceClient::deprecatedDidReceiveCachedResource):
1625         * page/DiagnosticLoggingKeys.cpp:
1626         (WebCore::DiagnosticLoggingKeys::mainFrameHasNotFinishedLoadingKey):
1627         * page/DiagnosticLoggingKeys.h:
1628
1629 2019-09-26  Zalan Bujtas  <zalan@apple.com>
1630
1631         [LFC][IFC] Line::Run should have a reference to the associated InlineItem
1632         https://bugs.webkit.org/show_bug.cgi?id=202288
1633         <rdar://problem/55758112>
1634
1635         Reviewed by Antti Koivisto.
1636
1637         It makes it clearer where the type and the layout box come from.
1638
1639         * layout/inlineformatting/InlineFormattingContextQuirks.cpp:
1640         (WebCore::Layout::InlineFormattingContext::Quirks::lineDescentNeedsCollapsing const):
1641         * layout/inlineformatting/InlineLine.cpp:
1642         (WebCore::Layout::Line::Run::Run):
1643         * layout/inlineformatting/InlineLine.h:
1644         (WebCore::Layout::Line::Run::layoutBox const):
1645         (WebCore::Layout::Line::Run::textContext const):
1646         (WebCore::Layout::Line::Run::isText const):
1647         (WebCore::Layout::Line::Run::isBox const):
1648         (WebCore::Layout::Line::Run::isLineBreak const):
1649         (WebCore::Layout::Line::Run::isContainerStart const):
1650         (WebCore::Layout::Line::Run::isContainerEnd const):
1651         (WebCore::Layout::Line::Run::type const): Deleted.
1652
1653 2019-09-26  Zalan Bujtas  <zalan@apple.com>
1654
1655         [LFC][IFC] Remove redundant Line::Content
1656         https://bugs.webkit.org/show_bug.cgi?id=202284
1657         <rdar://problem/55757187>
1658
1659         Reviewed by Antti Koivisto.
1660
1661         Line::Content is really just a list or runs at this point.
1662
1663         * layout/inlineformatting/InlineFormattingContext.h:
1664         * layout/inlineformatting/InlineFormattingContextLineLayout.cpp:
1665         (WebCore::Layout::InlineFormattingContext::InlineLayout::createDisplayRuns):
1666         * layout/inlineformatting/InlineFormattingContextQuirks.cpp:
1667         (WebCore::Layout::InlineFormattingContext::Quirks::lineDescentNeedsCollapsing const):
1668         * layout/inlineformatting/InlineLine.cpp:
1669         (WebCore::Layout::Line::Run::Run):
1670         (WebCore::Layout::Line::Line):
1671         (WebCore::Layout::Line::isVisuallyEmpty const):
1672         (WebCore::Layout::Line::close):
1673         (WebCore::Layout::Line::appendNonBreakableSpace):
1674         (WebCore::Layout::Line::appendTextContent):
1675         (WebCore::Layout::Line::appendNonReplacedInlineBox):
1676         (WebCore::Layout::Line::appendHardLineBreak):
1677         (WebCore::Layout::Line::Content::Run::Run): Deleted.
1678         * layout/inlineformatting/InlineLine.h:
1679         (WebCore::Layout::Line::Run::layoutBox const):
1680         (WebCore::Layout::Line::Run::logicalRect const):
1681         (WebCore::Layout::Line::Run::textContext const):
1682         (WebCore::Layout::Line::Run::type const):
1683         (WebCore::Layout::Line::Run::isText const):
1684         (WebCore::Layout::Line::Run::isBox const):
1685         (WebCore::Layout::Line::Run::isLineBreak const):
1686         (WebCore::Layout::Line::Run::isContainerStart const):
1687         (WebCore::Layout::Line::Run::isContainerEnd const):
1688         (WebCore::Layout::Line::Run::adjustLogicalTop):
1689         (WebCore::Layout::Line::Run::moveVertically):
1690         (WebCore::Layout::Line::Run::moveHorizontally):
1691         (WebCore::Layout::Line::Run::setTextIsCollapsed):
1692         (WebCore::Layout::Line::Content::Run::layoutBox const): Deleted.
1693         (WebCore::Layout::Line::Content::Run::logicalRect const): Deleted.
1694         (WebCore::Layout::Line::Content::Run::textContext const): Deleted.
1695         (WebCore::Layout::Line::Content::Run::type const): Deleted.
1696         (WebCore::Layout::Line::Content::Run::isText const): Deleted.
1697         (WebCore::Layout::Line::Content::Run::isBox const): Deleted.
1698         (WebCore::Layout::Line::Content::Run::isLineBreak const): Deleted.
1699         (WebCore::Layout::Line::Content::Run::isContainerStart const): Deleted.
1700         (WebCore::Layout::Line::Content::Run::isContainerEnd const): Deleted.
1701         (WebCore::Layout::Line::Content::Run::adjustLogicalTop): Deleted.
1702         (WebCore::Layout::Line::Content::Run::moveVertically): Deleted.
1703         (WebCore::Layout::Line::Content::Run::moveHorizontally): Deleted.
1704         (WebCore::Layout::Line::Content::Run::setTextIsCollapsed): Deleted.
1705         (WebCore::Layout::Line::Content::runs const): Deleted.
1706         (WebCore::Layout::Line::Content::runs): Deleted.
1707
1708 2019-09-26  Zalan Bujtas  <zalan@apple.com>
1709
1710         [LFC][IFC] Move Line::Content::m_lineBox to Line.
1711         https://bugs.webkit.org/show_bug.cgi?id=202280
1712         <rdar://problem/55755798>
1713
1714         Reviewed by Antti Koivisto.
1715
1716         This is in preparation for Line producing Display::Runs instead of Line::Runs.
1717
1718         * layout/inlineformatting/InlineFormattingContext.h:
1719         * layout/inlineformatting/InlineFormattingContextLineLayout.cpp:
1720         (WebCore::Layout::LineLayout::close):
1721         (WebCore::Layout::LineLayout::placeInlineItem):
1722         (WebCore::Layout::InlineFormattingContext::InlineLayout::layout):
1723         (WebCore::Layout::InlineFormattingContext::InlineLayout::computedIntrinsicWidth const):
1724         (WebCore::Layout::InlineFormattingContext::InlineLayout::createDisplayRuns):
1725         * layout/inlineformatting/InlineLine.cpp:
1726         (WebCore::Layout::Line::Line):
1727         (WebCore::Layout::Line::close):
1728         (WebCore::Layout::Line::removeTrailingTrimmableContent):
1729         (WebCore::Layout::Line::moveLogicalLeft):
1730         (WebCore::Layout::Line::appendNonBreakableSpace):
1731         (WebCore::Layout::Line::appendTextContent):
1732         (WebCore::Layout::Line::appendNonReplacedInlineBox):
1733         (WebCore::Layout::Line::adjustBaselineAndLineHeight):
1734         * layout/inlineformatting/InlineLine.h:
1735         (WebCore::Layout::Line::Content::runs const):
1736         (WebCore::Layout::Line::availableWidth const):
1737         (WebCore::Layout::Line::lineBox const):
1738         (WebCore::Layout::Line::logicalTop const):
1739         (WebCore::Layout::Line::logicalBottom const):
1740         (WebCore::Layout::Line::logicalLeft const):
1741         (WebCore::Layout::Line::logicalHeight const):
1742         (WebCore::Layout::Line::contentLogicalWidth const):
1743         (WebCore::Layout::Line::contentLogicalRight const):
1744         (WebCore::Layout::Line::baselineOffset const):
1745         (WebCore::Layout::Line::Content::lineBox const): Deleted.
1746         (WebCore::Layout::Line::Content::lineBox): Deleted.
1747         (WebCore::Layout::Line::Content::setLineBox): Deleted.
1748
1749 2019-09-26  Jiewen Tan  <jiewen_tan@apple.com>
1750
1751         REGRESSION: [ Catalina WK2 ] http/wpt/webauthn/public-key-credential-create-success-u2f.https.html is failing
1752         https://bugs.webkit.org/show_bug.cgi?id=201620
1753
1754         Unreviewed, roll back part of r249737 to confirm the cause.
1755
1756         * Modules/webauthn/fido/U2fResponseConverter.cpp:
1757         (fido::WebCore::createAttestedCredentialDataFromU2fRegisterResponse):
1758
1759 2019-09-26  Truitt Savell  <tsavell@apple.com>
1760
1761         Unreviewed, rolling out r250385.
1762
1763         Broke imported/w3c/web-platform-tests/svg/animations/syncbase-
1764         remove-add-while-running.html on all platforms. Which was
1765         caught by EWS
1766
1767         Reverted changeset:
1768
1769         "Non-callable "handleEvent" property is silently ignored"
1770         https://bugs.webkit.org/show_bug.cgi?id=200066
1771         https://trac.webkit.org/changeset/250385
1772
1773 2019-09-26  Kate Cheney  <katherine_cheney@apple.com>
1774
1775         Enable LayoutTests using ResourceLoadStatistics SQLite backend (195420)
1776         https://bugs.webkit.org/show_bug.cgi?id=195420
1777         <rdar://problem/54213551> 
1778
1779         Reviewed by Brent Fulgham.
1780
1781         Tests: http/tests/resourceLoadStatistics/add-blocking-to-redirect-database.html
1782                http/tests/resourceLoadStatistics/blocking-in-web-worker-script-import-database.html
1783                http/tests/resourceLoadStatistics/cap-cache-max-age-for-prevalent-resource-database.html
1784                http/tests/resourceLoadStatistics/capped-lifetime-for-cookie-set-in-js-database.html
1785                http/tests/resourceLoadStatistics/capped-lifetime-for-cookie-set-in-js-with-link-decoration-same-site-database.html
1786                http/tests/resourceLoadStatistics/capped-lifetime-for-cookie-set-in-js-with-link-fragment-from-prevalent-resource-database.html
1787                http/tests/resourceLoadStatistics/capped-lifetime-for-cookie-set-in-js-with-link-query-and-fragment-from-prevalent-resource-database.html
1788                http/tests/resourceLoadStatistics/capped-lifetime-for-cookie-set-in-js-with-link-query-from-prevalent-resource-database.html
1789                http/tests/resourceLoadStatistics/capped-lifetime-for-cookie-set-in-js-without-link-decoration-from-prevalent-resource-database.html
1790                http/tests/resourceLoadStatistics/classify-as-non-prevalent-based-on-mixed-statistics-database.html
1791                http/tests/resourceLoadStatistics/classify-as-non-prevalent-based-on-sub-frame-under-top-frame-origins-database.html
1792                http/tests/resourceLoadStatistics/classify-as-non-prevalent-based-on-subresource-under-top-frame-origins-database.html
1793                http/tests/resourceLoadStatistics/classify-as-non-prevalent-based-on-subresource-unique-redirects-to-database.html
1794                http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-mixed-statistics-database.html
1795                http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-sub-frame-under-top-frame-origins-database.html
1796                http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-subresource-redirect-collusion-database.html
1797                http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-subresource-redirect-to-prevalent-database.html
1798                http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-subresource-under-top-frame-origins-database.html
1799                http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-subresource-unique-redirects-to-database.html
1800                http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-top-frame-redirect-collusion-database.html
1801                http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-top-frame-redirect-to-prevalent-database.html
1802                http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-top-frame-unique-redirects-to-database.html
1803                http/tests/resourceLoadStatistics/classify-as-very-prevalent-based-on-mixed-statistics-database.html
1804                http/tests/resourceLoadStatistics/clear-in-memory-and-persistent-store-database.html
1805                http/tests/resourceLoadStatistics/clear-in-memory-and-persistent-store-one-hour-database.html
1806                http/tests/resourceLoadStatistics/cookie-deletion-database.html
1807                http/tests/resourceLoadStatistics/cookies-with-and-without-user-interaction-database.html
1808                http/tests/resourceLoadStatistics/delete-script-accessible-cookies-database.html
1809                http/tests/resourceLoadStatistics/do-not-block-top-level-navigation-redirect-database.html
1810                http/tests/resourceLoadStatistics/do-not-capture-statistics-for-simple-top-navigations-database.html
1811                http/tests/resourceLoadStatistics/do-not-remove-blocking-in-redirect-database.html
1812                http/tests/resourceLoadStatistics/do-not-switch-session-on-navigation-to-prevalent-without-interaction-database.html
1813                http/tests/resourceLoadStatistics/downgraded-referrer-for-navigation-with-link-query-from-prevalent-resource-database.html
1814                http/tests/resourceLoadStatistics/enable-debug-mode-database.html
1815                http/tests/resourceLoadStatistics/grandfathering-database.html
1816                http/tests/resourceLoadStatistics/non-prevalent-resource-with-user-interaction-database.html
1817                http/tests/resourceLoadStatistics/non-prevalent-resource-without-user-interaction-database.html
1818                http/tests/resourceLoadStatistics/non-prevalent-resources-can-access-cookies-in-a-third-party-context-database.html
1819                http/tests/resourceLoadStatistics/non-sandboxed-iframe-redirect-ip-to-localhost-to-ip-database.html
1820                http/tests/resourceLoadStatistics/non-sandboxed-iframe-redirect-localhost-to-ip-to-localhost-database.html
1821                http/tests/resourceLoadStatistics/non-sandboxed-nesting-iframe-with-non-sandboxed-iframe-redirect-ip-to-localhost-to-ip-database.html
1822                http/tests/resourceLoadStatistics/non-sandboxed-nesting-iframe-with-non-sandboxed-iframe-redirect-localhost-to-ip-to-localhost-database.html
1823                http/tests/resourceLoadStatistics/non-sandboxed-nesting-iframe-with-sandboxed-iframe-redirect-ip-to-localhost-to-ip-database.html
1824                http/tests/resourceLoadStatistics/non-sandboxed-nesting-iframe-with-sandboxed-iframe-redirect-localhost-to-ip-to-localhost-database.html
1825                http/tests/resourceLoadStatistics/ping-to-prevalent-resource-database.html
1826                http/tests/resourceLoadStatistics/prevalent-resource-handled-keydown-database.html
1827                http/tests/resourceLoadStatistics/prevalent-resource-unhandled-keydown-database.html
1828                http/tests/resourceLoadStatistics/prevalent-resource-with-user-interaction-database.html
1829                http/tests/resourceLoadStatistics/prevalent-resource-with-user-interaction-timeout-database.html
1830                http/tests/resourceLoadStatistics/prevalent-resource-without-user-interaction-database.html
1831                http/tests/resourceLoadStatistics/prune-statistics-database.html
1832                http/tests/resourceLoadStatistics/sandboxed-iframe-redirect-ip-to-localhost-to-ip-database.html
1833                http/tests/resourceLoadStatistics/sandboxed-iframe-redirect-localhost-to-ip-to-localhost-database.html
1834                http/tests/resourceLoadStatistics/sandboxed-nesting-iframe-with-non-sandboxed-iframe-redirect-ip-to-localhost-to-ip-database.html
1835                http/tests/resourceLoadStatistics/sandboxed-nesting-iframe-with-non-sandboxed-iframe-redirect-localhost-to-ip-to-localhost-database.html
1836                http/tests/resourceLoadStatistics/sandboxed-nesting-iframe-with-sandboxed-iframe-redirect-ip-to-localhost-to-ip-database.html
1837                http/tests/resourceLoadStatistics/sandboxed-nesting-iframe-with-sandboxed-iframe-redirect-localhost-to-ip-to-localhost-database.html
1838                http/tests/resourceLoadStatistics/set-custom-prevalent-resource-in-debug-mode-database.html
1839                http/tests/resourceLoadStatistics/strip-referrer-to-origin-for-prevalent-subresource-redirects-database.html
1840                http/tests/resourceLoadStatistics/strip-referrer-to-origin-for-prevalent-subresource-requests-database.html
1841                http/tests/resourceLoadStatistics/switch-session-on-navigation-to-prevalent-with-interaction-database.html
1842                http/tests/resourceLoadStatistics/user-interaction-in-cross-origin-sub-frame-database.html
1843                http/tests/resourceLoadStatistics/user-interaction-only-reported-once-within-short-period-of-time-database.html
1844                http/tests/resourceLoadStatistics/user-interaction-reported-after-website-data-removal-database.html
1845
1846         * platform/sql/SQLiteDatabase.h:
1847         Added WEBCORE_EXPORT prefix to 2 functions needed in the ITP Database 
1848         to clear out the database.
1849
1850 2019-09-26  Antti Koivisto  <antti@apple.com>
1851
1852         Use LineLayoutTraversal for RenderText functions
1853         https://bugs.webkit.org/show_bug.cgi?id=202266
1854
1855         Reviewed by Zalan Bujtas.
1856
1857         Replace a bunch of functions that have separate simple and complex line layout versions with
1858         shared functions that use LineLayoutTraversal.
1859
1860         * rendering/RenderText.cpp:
1861         (WebCore::RenderText::absoluteRects const):
1862         (WebCore::RenderText::firstRunLocation const):
1863         (WebCore::RenderText::linesBoundingBox const):
1864
1865         This is substantially simpler than RenderTextLineBoxes::boundingBox because it uses physical rects for all computations
1866         instead of using logical rects and flipping to physical at the end.
1867
1868         (WebCore::RenderText::caretMinOffset const):
1869         (WebCore::RenderText::caretMaxOffset const):
1870         (WebCore::RenderText::countRenderedCharacterOffsetsUntil const):
1871         (WebCore::containsOffset):
1872         (WebCore::RenderText::containsRenderedCharacterOffset const):
1873         (WebCore::RenderText::containsCaretOffset const):
1874         (WebCore::RenderText::hasRenderedText const):
1875         * rendering/RenderTextLineBoxes.cpp:
1876         (WebCore::RenderTextLineBoxes::boundingBox const): Deleted.
1877         (WebCore::RenderTextLineBoxes::firstRunLocation const): Deleted.
1878         (WebCore::RenderTextLineBoxes::hasRenderedText const): Deleted.
1879         (WebCore::RenderTextLineBoxes::caretMinOffset const): Deleted.
1880         (WebCore::RenderTextLineBoxes::caretMaxOffset const): Deleted.
1881         (WebCore::RenderTextLineBoxes::containsOffset const): Deleted.
1882         (WebCore::RenderTextLineBoxes::countCharacterOffsetsUntil const): Deleted.
1883         (WebCore::RenderTextLineBoxes::absoluteRects const): Deleted.
1884         * rendering/RenderTreeAsText.cpp:
1885         (WebCore::write):
1886         * rendering/SimpleLineLayout.cpp:
1887         (WebCore::SimpleLineLayout::LineState::appendFragmentAndCreateRunIfNeeded):
1888         * rendering/SimpleLineLayout.h:
1889         (WebCore::SimpleLineLayout::Run::Run):
1890         * rendering/SimpleLineLayoutFunctions.cpp:
1891         (WebCore::SimpleLineLayout::computeFirstRunLocation): Deleted.
1892         * rendering/SimpleLineLayoutFunctions.h:
1893         (WebCore::SimpleLineLayout::findCaretMinimumOffset): Deleted.
1894         (WebCore::SimpleLineLayout::findCaretMaximumOffset): Deleted.
1895         (WebCore::SimpleLineLayout::containsOffset): Deleted.
1896         (WebCore::SimpleLineLayout::isTextRendered): Deleted.
1897         * rendering/SimpleLineLayoutResolver.h:
1898         (WebCore::SimpleLineLayout::RunResolver::Run::isLineBreak const):
1899         * rendering/line/LineLayoutTraversal.cpp:
1900         (WebCore::LineLayoutTraversal::TextBox::isLineBreak const):
1901         (WebCore::LineLayoutTraversal::firstTextBoxFor):
1902         (WebCore::LineLayoutTraversal::firstTextBoxInTextOrderFor):
1903         (WebCore::LineLayoutTraversal::textBoxesFor):
1904         (WebCore::LineLayoutTraversal::firstTextBoxInVisualOrderFor): Deleted.
1905         (WebCore::LineLayoutTraversal::textBoxRangeFor): Deleted.
1906         * rendering/line/LineLayoutTraversal.h:
1907         (WebCore::LineLayoutTraversal::hasTextBoxes):
1908
1909 2019-09-26  Truitt Savell  <tsavell@apple.com>
1910
1911         Unreviewed, rolling out r250381.
1912
1913         broke multiple webgpu/ tests on Mojave WK2
1914
1915         Reverted changeset:
1916
1917         "Flaky Test: inspector/canvas/updateShader.html"
1918         https://bugs.webkit.org/show_bug.cgi?id=202186
1919         https://trac.webkit.org/changeset/250381
1920
1921 2019-09-26  Alexey Shvayka  <shvaikalesh@gmail.com>
1922
1923         Non-callable "handleEvent" property is silently ignored
1924         https://bugs.webkit.org/show_bug.cgi?id=200066
1925
1926         Reviewed by Darin Adler.
1927
1928         Tests: imported/w3c/web-platform-tests/IndexedDB/fire-error-event-exception.html
1929                imported/w3c/web-platform-tests/IndexedDB/fire-success-event-exception.html
1930                imported/w3c/web-platform-tests/IndexedDB/fire-upgradeneeded-event-exception.html
1931                imported/w3c/web-platform-tests/dom/events/EventListener-handleEvent.html
1932
1933         * bindings/js/JSEventListener.cpp:
1934         (WebCore::JSEventListener::handleEvent): Report TypeError if "handleEvent" is not callable.
1935
1936 2019-09-26  Zalan Bujtas  <zalan@apple.com>
1937
1938         [LFC][IFC] Decouple Display::Run and Display::Box initializations.
1939         https://bugs.webkit.org/show_bug.cgi?id=202255
1940         <rdar://problem/55731445>
1941
1942         Reviewed by Antti Koivisto.
1943
1944         This is in preparation for moving Display::Run initialization to Line class.
1945
1946         * layout/inlineformatting/InlineFormattingContextLineLayout.cpp:
1947         (WebCore::Layout::InlineFormattingContext::InlineLayout::createDisplayRuns):
1948
1949 2019-09-26  Devin Rousso  <drousso@apple.com>
1950
1951         Flaky Test: inspector/canvas/updateShader.html
1952         https://bugs.webkit.org/show_bug.cgi?id=202186
1953         <rdar://problem/55716053>
1954
1955         Reviewed by Joseph Pecoraro.
1956
1957         If the `WebGPUPipeline`/`WebGLProgram` outlives it's `WebGPUDevice`/`WebGLRenderingContext`,
1958         the `ScriptExecutionContext*` that was provided in the constructor won't be invalidated
1959         leading to the bad access crash.
1960
1961         Rather than pass the `ScriptExecutionContext*` directly, have `WebGPUPipeline`/`WebGLProgram`
1962         extend from `ContextDestructionObserver` so that it can propertly invalidate (and notify Web
1963         Inspector) when the related context is about to be destroyed.
1964
1965         Test: inspector/canvas/updateShader.html
1966
1967         * Modules/webgpu/WebGPUPipeline.h:
1968         (WebCore::WebGPUPipeline::scriptExecutionContext const): Deleted.
1969         * Modules/webgpu/WebGPUPipeline.cpp:
1970         (WebCore::WebGPUPipeline::WebGPUPipeline):
1971         (WebCore::WebGPUPipeline::contextDestroyed): Added.
1972
1973         * html/canvas/WebGLProgram.h:
1974         (WebCore::WebGLProgram::scriptExecutionContext const): Deleted.
1975         * html/canvas/WebGLProgram.cpp:
1976         (WebCore::WebGLProgram::WebGLProgram):
1977         (WebCore::WebGLProgram::contextDestroyed): Added.
1978
1979 2019-09-25  Chris Dumez  <cdumez@apple.com>
1980
1981         Add very basic PageCache support for RTCPeerConnection
1982         https://bugs.webkit.org/show_bug.cgi?id=202244
1983
1984         Reviewed by Geoffrey Garen.
1985
1986         RTCPeerConnection::canSuspendForDocumentSuspension() returns true if
1987         RTCPeerConnection::hasPendingActivity() return false. Previously, hasPendingActivity()
1988         would return true unless the JS has called close() on the RTCPeerConnection
1989         object.
1990
1991         On weather.com, an ad would construct an RTCPeerConnection just to do some feature
1992         checking and then let the variable go out of scope (without calling close()). Because
1993         of the previous implementation of RTCPeerConnection::hasPendingActivity(), this wrapper
1994         and its implementation object would stay alive forever AND prevent the page from
1995         entering PageCache on navigation.
1996
1997         To improve this, the implementation of hadPendingActivity() has been updated so that
1998         it keeps returning false if close() has been called, but will also return false if
1999         there are no pending Promises to be resolved and no event listeners.
2000
2001         Test: fast/mediastream/RTCPeerConnection-page-cache.html
2002
2003         * Modules/mediastream/RTCPeerConnection.cpp:
2004         WebCore::RTCPeerConnection::RTCPeerConnection:
2005         Stop taking a pending activity in the constructor, this would be NOT keep the wrapper
2006         alive since RTCPeerConnection::hasPendingActivity() was not checking
2007         ActiveDOMObject::hasPendingActivity().
2008
2009         (WebCore::RTCPeerConnection::canSuspendForDocumentSuspension const):
2010         (WebCore::RTCPeerConnection::hasPendingActivity const):
2011         
2012         * Modules/mediastream/RTCPeerConnection.h:
2013
2014         * bindings/js/JSDOMPromiseDeferred.h:
2015         (WebCore::DOMPromiseDeferredBase::whenSettled):
2016
2017 2019-09-25  Chris Dumez  <cdumez@apple.com>
2018
2019         Improve Service worker support for Page Caching
2020         https://bugs.webkit.org/show_bug.cgi?id=202221
2021
2022         Reviewed by Geoffrey Garen.
2023
2024         Allow pages using service workers to enter the back / forward cache.
2025         Update ServiceWorkerRegistration / ServiceWorker ActiveDOMObjects
2026         to properly suspend while in PageCache. Also, let documents controlled
2027         by a service worker to enter PageCache (we already unregistered it as
2028         a client of the service worker while suspended).
2029
2030         Test: http/tests/workers/service/page-caching.html
2031
2032         * dom/Document.cpp:
2033         (WebCore::Document::suspend):
2034         (WebCore::Document::resume):
2035         * history/PageCache.cpp:
2036         (WebCore::canCacheFrame):
2037         * workers/service/ServiceWorker.cpp:
2038         (WebCore::ServiceWorker::updateState):
2039         (WebCore::ServiceWorker::canSuspendForDocumentSuspension const):
2040         (WebCore::ServiceWorker::suspend):
2041         (WebCore::ServiceWorker::resume):
2042         * workers/service/ServiceWorker.h:
2043         * workers/service/ServiceWorkerRegistration.cpp:
2044         (WebCore::ServiceWorkerRegistration::fireUpdateFoundEvent):
2045         (WebCore::ServiceWorkerRegistration::canSuspendForDocumentSuspension const):
2046         (WebCore::ServiceWorkerRegistration::suspend):
2047         (WebCore::ServiceWorkerRegistration::resume):
2048         * workers/service/ServiceWorkerRegistration.h:
2049
2050 2019-09-25  Chris Dumez  <cdumez@apple.com>
2051
2052         [Cocoa] Regression(r212041) Safari adds a .dms extension automatically when downloading binaries with no extension
2053         https://bugs.webkit.org/show_bug.cgi?id=202147
2054         <rdar://problem/54886021>
2055
2056         Reviewed by Alexey Proskuryakov.
2057
2058         When getting a suggested filename without extension (either from Content-Disposition header or from the download
2059         attribute), we determine a suitable file extension based on the Content-Type header and append it. This is useful
2060         since a lot of operating systems (such as macOS) rely on the file extension to determine file type.
2061
2062         The issue is that if the Content-Type is not provided or when it is provided but is "application/octet-stream",
2063         we would append a .dms extension, which was unexpected. This patch makes it so that we no longer try to append
2064         an extension when the resolved content type is "application/octet-stream".
2065
2066         Tests: http/tests/download/anchor-download-attribute-content-disposition-no-extension-octet-stream.html
2067                http/tests/download/anchor-download-attribute-content-disposition-no-extension-text-plain.html
2068                http/tests/security/anchor-download-octet-stream-no-extension.html
2069
2070         * platform/MIMETypeRegistry.cpp:
2071         (WebCore::MIMETypeRegistry::appendFileExtensionIfNecessary):
2072
2073 2019-09-25  Megan Gardner  <megan_gardner@apple.com>
2074
2075         Update selections after scrolling for iframes and hide selections while iframes and overflow scrolls are scrolling.
2076         https://bugs.webkit.org/show_bug.cgi?id=202125
2077
2078         Reviewed by Tim Horton.
2079
2080         Test: editing/selection/ios/update-selection-after-iframe-scroll.html
2081
2082         When we end scrolling, make sure that iframes get a final update to ensure that the 
2083         selection is in the correct position. Pipe that to WebKit/UIProcess via
2084         frame specific plath.
2085
2086         * loader/EmptyClients.cpp:
2087         * page/EditorClient.h:
2088         * page/scrolling/AsyncScrollingCoordinator.cpp:
2089         (WebCore::AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScroll):
2090
2091 2019-09-25  Wenson Hsieh  <wenson_hsieh@apple.com>
2092
2093         Page temporarily jumps to an excessively small viewport scale while loading usatoday.com
2094         https://bugs.webkit.org/show_bug.cgi?id=202224
2095         <rdar://problem/52906640>
2096
2097         Reviewed by Tim Horton.
2098
2099         On some pages (e.g. usatoday.com), the content width of the page temporarily becomes very large during page
2100         load. This causes a couple of viewport scaling behaviors (notably, the existing shrink-to-fit heuristic in
2101         ViewportConfiguration::initialScaleFromSize, as well as the new iPad-specific content-aware shrink-to-fit
2102         heuristic in WebPage::immediatelyShrinkToFitContent) to cause the page to shrink down excessively in an attempt
2103         to fit all the content to the viewport. This causes a very ugly flash as the page appears zoomed out initially
2104         during page load, before zooming back in.
2105
2106         To fix this, we add some sanity checks to these viewport scaling heuristics. In ViewportConfiguration's
2107         initialScaleFromSize method, in the codepath where an initial scale is not specified, we always scale to fit the
2108         contents of the page; instead, detect the case where the content width is enormous (with a threshold arbitrarily
2109         chosen to be 1920) and fall back to the scaling to fit the viewport's width, if such a width has been explicitly
2110         set. This ensures that we avoid excessive shrinking in the case where content is extremely wide, but also that
2111         we do scale the viewport down to fit all the content in the case where the content isn't extremely wide (e.g. on
2112         daringfireball.com).
2113
2114         See WebKit ChangeLog for more detail.
2115
2116         Test: fast/viewport/ios/shrink-to-fit-large-content-width.html
2117
2118         * page/ViewportConfiguration.cpp:
2119         (WebCore::ViewportConfiguration::initialScaleFromSize const):
2120
2121 2019-09-25  Wenson Hsieh  <wenson_hsieh@apple.com>
2122
2123         [iPadOS] [DataActivation] Focus moves away after focusing input fields on www.att.com
2124         https://bugs.webkit.org/show_bug.cgi?id=202167
2125         <rdar://problem/55185021>
2126
2127         Reviewed by Tim Horton.
2128
2129         Adds a new site-specific quirk. See WebKit ChangeLog for more details.
2130
2131         * page/Quirks.cpp:
2132         (WebCore::Quirks::shouldUseLegacySelectPopoverDismissalBehaviorInDataActivation const):
2133         * page/Quirks.h:
2134         * platform/RuntimeApplicationChecks.h:
2135         * platform/cocoa/RuntimeApplicationChecksCocoa.mm:
2136         (WebCore::IOSApplication::isDataActivation):
2137
2138 2019-09-25  Jonathan Bedard  <jbedard@apple.com>
2139
2140         Unreviewed, rolling out r250324.
2141
2142         Broke many mac wk2 layout tests
2143
2144         Reverted changeset:
2145
2146         "Enable LayoutTests using ResourceLoadStatistics SQLite
2147         backend (195420)"
2148         https://bugs.webkit.org/show_bug.cgi?id=195420
2149         https://trac.webkit.org/changeset/250324
2150
2151 2019-09-25  Antti Koivisto  <antti@apple.com>
2152
2153         Rename LineLayoutInterface to LineLayoutTraversal
2154         https://bugs.webkit.org/show_bug.cgi?id=202202
2155
2156         Reviewed by Zalan Bujtas.
2157
2158         Use a bit more informative namespace name.
2159
2160         * Headers.cmake:
2161         * Sources.txt:
2162         * WebCore.xcodeproj/project.pbxproj:
2163         * dom/Position.cpp:
2164         (WebCore::Position::upstream const):
2165         (WebCore::Position::downstream const):
2166         * editing/TextIterator.cpp:
2167         (WebCore::TextIterator::handleTextNode):
2168         (WebCore::TextIterator::handleTextBox):
2169         (WebCore::TextIterator::handleTextNodeFirstLetter):
2170         * editing/TextIterator.h:
2171         * rendering/RenderTreeAsText.cpp:
2172         (WebCore::RenderTreeAsText::writeRenderObject):
2173         (WebCore::writeTextBox):
2174         (WebCore::write):
2175         * rendering/line/LineLayoutTraversal.cpp: Renamed from Source/WebCore/rendering/line/LineLayoutInterfaceTextBoxes.cpp.
2176         (WebCore::LineLayoutTraversal::TextBox::rect const):
2177         (WebCore::LineLayoutTraversal::TextBox::logicalRect const):
2178         (WebCore::LineLayoutTraversal::TextBox::hasHyphen const):
2179         (WebCore::LineLayoutTraversal::TextBox::isLeftToRightDirection const):
2180         (WebCore::LineLayoutTraversal::TextBox::dirOverride const):
2181         (WebCore::LineLayoutTraversal::TextBox::text const):
2182         (WebCore::LineLayoutTraversal::TextBox::localStartOffset const):
2183         (WebCore::LineLayoutTraversal::TextBox::localEndOffset const):
2184         (WebCore::LineLayoutTraversal::TextBox::length const):
2185         (WebCore::LineLayoutTraversal::TextBox::isLastOnLine const):
2186         (WebCore::LineLayoutTraversal::TextBox::isLast const):
2187         (WebCore::LineLayoutTraversal::TextBox::iterator const):
2188         (WebCore::LineLayoutTraversal::TextBoxIterator::TextBoxIterator):
2189         (WebCore::LineLayoutTraversal::TextBoxIterator::traverseNextInVisualOrder):
2190         (WebCore::LineLayoutTraversal::TextBoxIterator::ComplexPath::nextInlineTextBoxInTextOrder const):
2191         (WebCore::LineLayoutTraversal::TextBoxIterator::traverseNextInTextOrder):
2192         (WebCore::LineLayoutTraversal::TextBoxIterator::operator== const):
2193         (WebCore::LineLayoutTraversal::TextBoxIterator::atEnd const):
2194         (WebCore::LineLayoutTraversal::firstTextBoxInVisualOrderFor):
2195         (WebCore::LineLayoutTraversal::firstTextBoxInTextOrderFor):
2196         (WebCore::LineLayoutTraversal::textBoxRangeFor):
2197         * rendering/line/LineLayoutTraversal.h: Renamed from Source/WebCore/rendering/line/LineLayoutInterfaceTextBoxes.h.
2198         (WebCore::LineLayoutTraversal::TextBoxIterator::TextBoxIterator):
2199         (WebCore::LineLayoutTraversal::TextBoxIterator::operator++):
2200         (WebCore::LineLayoutTraversal::TextBoxIterator::operator bool const):
2201         (WebCore::LineLayoutTraversal::TextBoxIterator::operator!= const):
2202         (WebCore::LineLayoutTraversal::TextBoxIterator::operator== const):
2203         (WebCore::LineLayoutTraversal::TextBoxIterator::operator* const):
2204         (WebCore::LineLayoutTraversal::TextBoxIterator::operator-> const):
2205         (WebCore::LineLayoutTraversal::TextBoxRange::TextBoxRange):
2206         (WebCore::LineLayoutTraversal::TextBoxRange::begin const):
2207         (WebCore::LineLayoutTraversal::TextBoxRange::end const):
2208         (WebCore::LineLayoutTraversal::hasTextBoxes):
2209
2210 2019-09-25  Zalan Bujtas  <zalan@apple.com>
2211
2212         [LFC][IFC] Use existing Line::Content::LineBox to track the current line geometry
2213         https://bugs.webkit.org/show_bug.cgi?id=202182
2214
2215         Reviewed by Antti Koivisto.
2216
2217         This patch removes the redundant Line::m_logicalTopLeft, m_contentLogicalWidth, m_lineLogicalHeight, m_baseline, m_baselineTop members
2218         and switches over to Line::m_content's LineBox. 
2219
2220         * layout/displaytree/DisplayRect.h:
2221         (WebCore::Display::Rect::Rect):
2222         * layout/inlineformatting/InlineLine.cpp:
2223         (WebCore::Layout::Line::Line):
2224         (WebCore::Layout::Line::close):
2225         (WebCore::Layout::Line::removeTrailingTrimmableContent):
2226         (WebCore::Layout::Line::moveLogicalLeft):
2227         (WebCore::Layout::Line::appendNonBreakableSpace):
2228         (WebCore::Layout::Line::appendTextContent):
2229         (WebCore::Layout::Line::appendNonReplacedInlineBox):
2230         (WebCore::Layout::Line::adjustBaselineAndLineHeight):
2231         (WebCore::Layout::m_skipVerticalAligment): Deleted.
2232         * layout/inlineformatting/InlineLine.h:
2233         (WebCore::Layout::Line::Content::lineBox):
2234         (WebCore::Layout::Line::contentLogicalRight const):
2235         (WebCore::Layout::Line::logicalTop const):
2236         (WebCore::Layout::Line::logicalBottom const):
2237         (WebCore::Layout::Line::logicalLeft const):
2238         (WebCore::Layout::Line::logicalHeight const):
2239         (WebCore::Layout::Line::contentLogicalWidth const):
2240         (WebCore::Layout::Line::baselineOffset const):
2241         * layout/inlineformatting/InlineLineBox.h:
2242         (WebCore::Layout::LineBox::setLogicalTopLeft):
2243         (WebCore::Layout::LineBox::setLogicalHeight):
2244         (WebCore::Layout::LineBox::setLogicalWidth):
2245         (WebCore::Layout::LineBox::moveHorizontally):
2246         (WebCore::Layout::LineBox::expandHorizontally):
2247         (WebCore::Layout::LineBox::shrinkHorizontally):
2248         (WebCore::Layout::LineBox::expandVertically):
2249         (WebCore::Layout::LineBox::shrinkVertically):
2250         (WebCore::Layout::LineBox::LineBox):
2251         (WebCore::Layout::LineBox::setLogicalHeightIfGreater):
2252         (WebCore::Layout::LineBox::setBaseline):
2253         (WebCore::Layout::LineBox::baseline const):
2254         (WebCore::Layout::LineBox::baseline):
2255         (WebCore::Layout::LineBox::setBaselineOffset):
2256         (WebCore::Layout::LineBox::Baseline::setAscentIfGreater):
2257         (WebCore::Layout::LineBox::Baseline::setDescentIfGreater):
2258
2259 2019-09-25  Antti Koivisto  <antti@apple.com>
2260
2261         Rename InlineBox::nextLeafChild to nextLeafOnLine
2262         https://bugs.webkit.org/show_bug.cgi?id=202197
2263
2264         Reviewed by Zalan Bujtas.
2265
2266         The name is confusing as it never returns a child of the inline box it is called on.
2267         Rename it and other similar functions that traverse within a line.
2268
2269         * dom/Position.cpp:
2270         (WebCore::Position::getInlineBoxAndOffset const):
2271         * editing/RenderedPosition.cpp:
2272         (WebCore::RenderedPosition::RenderedPosition):
2273         (WebCore::RenderedPosition::previousLeafOnLine const):
2274         (WebCore::RenderedPosition::nextLeafOnLine const):
2275         (WebCore::RenderedPosition::isEquivalent const):
2276         (WebCore::RenderedPosition::bidiLevelOnLeft const):
2277         (WebCore::RenderedPosition::bidiLevelOnRight const):
2278         (WebCore::RenderedPosition::leftBoundaryOfBidiRun):
2279         (WebCore::RenderedPosition::rightBoundaryOfBidiRun):
2280         (WebCore::RenderedPosition::atLeftBoundaryOfBidiRun const):
2281         (WebCore::RenderedPosition::atRightBoundaryOfBidiRun const):
2282         (WebCore::RenderedPosition::positionAtLeftBoundaryOfBiDiRun const):
2283         (WebCore::RenderedPosition::positionAtRightBoundaryOfBiDiRun const):
2284         (WebCore::RenderedPosition::prevLeafChild const): Deleted.
2285         (WebCore::RenderedPosition::nextLeafChild const): Deleted.
2286         * editing/RenderedPosition.h:
2287         (WebCore::RenderedPosition::RenderedPosition):
2288         * editing/VisiblePosition.cpp:
2289         (WebCore::VisiblePosition::leftVisuallyDistinctCandidate const):
2290         (WebCore::VisiblePosition::rightVisuallyDistinctCandidate const):
2291         * editing/VisibleUnits.cpp:
2292         (WebCore::startPositionForLine):
2293         (WebCore::endPositionForLine):
2294         (WebCore::previousLinePosition):
2295         (WebCore::nextLinePosition):
2296         * layout/Verification.cpp:
2297         (WebCore::Layout::collectFlowBoxSubtree):
2298         * rendering/ComplexLineLayout.cpp:
2299         (WebCore::ComplexLineLayout::updateRubyForJustifiedText):
2300         (WebCore::expansionBehaviorForInlineTextBox):
2301         (WebCore::ComplexLineLayout::computeInlineDirectionPositionsForSegment):
2302         (WebCore::ComplexLineLayout::layoutRunsAndFloats):
2303         * rendering/InlineBox.cpp:
2304         (WebCore::InlineBox::previousOnLineExists const):
2305         (WebCore::InlineBox::nextLeafOnLine const):
2306         (WebCore::InlineBox::previousLeafOnLine const):
2307         (WebCore::InlineBox::nextLeafOnLineIgnoringLineBreak const):
2308         (WebCore::InlineBox::previousLeafOnLineIgnoringLineBreak const):
2309         (WebCore::InlineBox::nextLeafChild const): Deleted.
2310         (WebCore::InlineBox::prevLeafChild const): Deleted.
2311         (WebCore::InlineBox::nextLeafChildIgnoringLineBreak const): Deleted.
2312         (WebCore::InlineBox::prevLeafChildIgnoringLineBreak const): Deleted.
2313         * rendering/InlineBox.h:
2314         (WebCore::InlineBox::nextOnLine const):
2315         (WebCore::InlineBox::previousOnLine const):
2316         (WebCore::InlineBox::setNextOnLine):
2317         (WebCore::InlineBox::setPreviousOnLine):
2318         (WebCore::InlineBox::InlineBox):
2319         (WebCore::InlineBox::prevOnLine const): Deleted.
2320         (WebCore::InlineBox::setPrevOnLine): Deleted.
2321         * rendering/InlineFlowBox.cpp:
2322         (WebCore::InlineFlowBox::addToLine):
2323         (WebCore::InlineFlowBox::removeChild):
2324         (WebCore::InlineFlowBox::nodeAtPoint):
2325         (WebCore::InlineFlowBox::firstLeafDescendant const):
2326         (WebCore::InlineFlowBox::lastLeafDescendant const):
2327         (WebCore::InlineFlowBox::placeEllipsisBox):
2328         (WebCore::InlineFlowBox::collectLeafBoxesInLogicalOrder const):
2329         (WebCore::InlineFlowBox::checkConsistency const):
2330         (WebCore::InlineFlowBox::firstLeafChild const): Deleted.
2331         (WebCore::InlineFlowBox::lastLeafChild const): Deleted.
2332         * rendering/InlineFlowBox.h:
2333         * rendering/InlineTextBox.cpp:
2334         (WebCore::InlineTextBox::expansionBehavior const):
2335         * rendering/RenderBlockFlow.cpp:
2336         (WebCore::RenderBlockFlow::containsNonZeroBidiLevel const):
2337         (WebCore::RenderBlockFlow::positionForPointWithInlineChildren):
2338         * rendering/RenderCounter.cpp:
2339         (WebCore::RenderCounter::rendererRemovedFromTree):
2340         * rendering/RenderTextLineBoxes.cpp:
2341         (WebCore::lineDirectionPointFitsInBox):
2342         (WebCore::createVisiblePositionAfterAdjustingOffsetForBiDi):
2343         (WebCore::RenderTextLineBoxes::positionForPoint const):
2344         * rendering/RootInlineBox.cpp:
2345         (WebCore::RootInlineBox::isHyphenated const):
2346         (WebCore::RootInlineBox::lineSelectionGap):
2347         (WebCore::RootInlineBox::selectionState):
2348         (WebCore::RootInlineBox::firstSelectedBox):
2349         (WebCore::RootInlineBox::lastSelectedBox):
2350         (WebCore::RootInlineBox::closestLeafChildForLogicalLeftPosition):
2351         * rendering/svg/SVGRootInlineBox.cpp:
2352         (WebCore::SVGRootInlineBox::closestLeafChildForPosition):
2353         (WebCore::SVGRootInlineBox::nodeAtPoint):
2354
2355 2019-09-25  Zan Dobersek  <zdobersek@igalia.com>
2356
2357         [Nicosia] Add implementations for fixed, positioned, sticky ScrollingTreeNodes
2358         https://bugs.webkit.org/show_bug.cgi?id=202100
2359
2360         Reviewed by Carlos Garcia Campos.
2361
2362         Fill in the Nicosia implementations for the ScrollingTreeFixedNode,
2363         ScrollingTreePositionedNode and ScrollingTreeStickyNode classes.
2364
2365         The implementations in majority repeat what the Cocoa implementations
2366         do, with the main difference being the Nicosia-specific layer state
2367         application. Sharing more of this logic should be investigated in the
2368         future.
2369
2370         * PlatformPlayStation.cmake: Add ScrollingTreePositionedNode to build.
2371         * SourcesGTK.txt: Ditto.
2372         * SourcesWPE.txt: Ditto.
2373         * page/scrolling/nicosia/ScrollingTreeFixedNode.cpp:
2374         (WebCore::ScrollingTreeFixedNode::commitStateBeforeChildren):
2375         (WebCore::ScrollingTreeFixedNode::applyLayerPositions):
2376         (WebCore::ScrollingTreeFixedNode::dumpProperties const):
2377         * page/scrolling/nicosia/ScrollingTreeFixedNode.h:
2378         * page/scrolling/nicosia/ScrollingTreePositionedNode.cpp: Added.
2379         (WebCore::ScrollingTreePositionedNode::create):
2380         (WebCore::ScrollingTreePositionedNode::ScrollingTreePositionedNode):
2381         (WebCore::ScrollingTreePositionedNode::commitStateBeforeChildren):
2382         (WebCore::ScrollingTreePositionedNode::applyLayerPositions):
2383         (WebCore::ScrollingTreePositionedNode::dumpProperties const):
2384         * page/scrolling/nicosia/ScrollingTreePositionedNode.h: Added.
2385         (WebCore::ScrollingTreePositionedNode::relatedOverflowScrollingNodes const):
2386         * page/scrolling/nicosia/ScrollingTreeStickyNode.cpp:
2387         (WebCore::ScrollingTreeStickyNode::commitStateBeforeChildren):
2388         (WebCore::ScrollingTreeStickyNode::applyLayerPositions):
2389         (WebCore::ScrollingTreeStickyNode::dumpProperties const):
2390         (WebCore::ScrollingTreeStickyNode::computeLayerPosition const):
2391         * page/scrolling/nicosia/ScrollingTreeStickyNode.h:
2392
2393 2019-09-24  Antoine Quint  <graouts@apple.com>
2394
2395         [Web Animations] Removing an element should only cancel its declarative animations
2396         https://bugs.webkit.org/show_bug.cgi?id=202165
2397
2398         Reviewed by Dean Jackson.
2399
2400         When an element is removed, an Animation created using the JS API should not be canceled.
2401         Only declarative animations should be.
2402
2403         * animation/AnimationTimeline.cpp:
2404         (WebCore::AnimationTimeline::elementWasRemoved):
2405
2406 2019-09-24  Alex Christensen  <achristensen@webkit.org>
2407
2408         Remove SchemeRegistry's list of URL schemes allowing local storage in private browsing, which is unused
2409         https://bugs.webkit.org/show_bug.cgi?id=202181
2410
2411         Reviewed by Geoffrey Garen.
2412
2413         The last use of the WebView SPI to set it is being removed in rdar://problem/55685383
2414         but it already does not do anything.  Let's remove it.
2415
2416         * platform/SchemeRegistry.cpp:
2417         (WebCore::schemesAllowingLocalStorageAccessInPrivateBrowsing): Deleted.
2418         (WebCore::SchemeRegistry::registerURLSchemeAsAllowingLocalStorageAccessInPrivateBrowsing): Deleted.
2419         (WebCore::SchemeRegistry::allowsLocalStorageAccessInPrivateBrowsing): Deleted.
2420         * platform/SchemeRegistry.h:
2421
2422 2019-09-24  Wenson Hsieh  <wenson_hsieh@apple.com>
2423
2424         Remove a content change observation quirk on united.com
2425         https://bugs.webkit.org/show_bug.cgi?id=202175
2426
2427         Reviewed by Tim Horton.
2428
2429         Remove a site-specific quirk that is no longer necessary.
2430
2431         * page/Quirks.cpp:
2432         (WebCore::Quirks::shouldIgnoreContentChange const): Deleted.
2433         * page/Quirks.h:
2434         * page/ios/ContentChangeObserver.cpp:
2435         (WebCore::ContentChangeObserver::shouldObserveVisibilityChangeForElement):
2436
2437 2019-09-24  Kate Cheney  <katherine_cheney@apple.com>
2438
2439         Enable LayoutTests using ResourceLoadStatistics SQLite backend (195420)
2440         https://bugs.webkit.org/show_bug.cgi?id=195420
2441         <rdar://problem/54213551> 
2442
2443         Reviewed by Brent Fulgham.
2444
2445         Tests: http/tests/resourceLoadStatistics/add-blocking-to-redirect-database.html
2446                http/tests/resourceLoadStatistics/blocking-in-web-worker-script-import-database.html
2447                http/tests/resourceLoadStatistics/cap-cache-max-age-for-prevalent-resource-database.html
2448                http/tests/resourceLoadStatistics/capped-lifetime-for-cookie-set-in-js-database.html
2449                http/tests/resourceLoadStatistics/capped-lifetime-for-cookie-set-in-js-with-link-decoration-same-site-database.html
2450                http/tests/resourceLoadStatistics/capped-lifetime-for-cookie-set-in-js-with-link-fragment-from-prevalent-resource-database.html
2451                http/tests/resourceLoadStatistics/capped-lifetime-for-cookie-set-in-js-with-link-query-and-fragment-from-prevalent-resource-database.html
2452                http/tests/resourceLoadStatistics/capped-lifetime-for-cookie-set-in-js-with-link-query-from-prevalent-resource-database.html
2453                http/tests/resourceLoadStatistics/capped-lifetime-for-cookie-set-in-js-without-link-decoration-from-prevalent-resource-database.html
2454                http/tests/resourceLoadStatistics/classify-as-non-prevalent-based-on-mixed-statistics-database.html
2455                http/tests/resourceLoadStatistics/classify-as-non-prevalent-based-on-sub-frame-under-top-frame-origins-database.html
2456                http/tests/resourceLoadStatistics/classify-as-non-prevalent-based-on-subresource-under-top-frame-origins-database.html
2457                http/tests/resourceLoadStatistics/classify-as-non-prevalent-based-on-subresource-unique-redirects-to-database.html
2458                http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-mixed-statistics-database.html
2459                http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-sub-frame-under-top-frame-origins-database.html
2460                http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-subresource-redirect-collusion-database.html
2461                http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-subresource-redirect-to-prevalent-database.html
2462                http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-subresource-under-top-frame-origins-database.html
2463                http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-subresource-unique-redirects-to-database.html
2464                http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-top-frame-redirect-collusion-database.html
2465                http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-top-frame-redirect-to-prevalent-database.html
2466                http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-top-frame-unique-redirects-to-database.html
2467                http/tests/resourceLoadStatistics/classify-as-very-prevalent-based-on-mixed-statistics-database.html
2468                http/tests/resourceLoadStatistics/clear-in-memory-and-persistent-store-database.html
2469                http/tests/resourceLoadStatistics/clear-in-memory-and-persistent-store-one-hour-database.html
2470                http/tests/resourceLoadStatistics/cookie-deletion-database.html
2471                http/tests/resourceLoadStatistics/cookies-with-and-without-user-interaction-database.html
2472                http/tests/resourceLoadStatistics/delete-script-accessible-cookies-database.html
2473                http/tests/resourceLoadStatistics/do-not-block-top-level-navigation-redirect-database.html
2474                http/tests/resourceLoadStatistics/do-not-capture-statistics-for-simple-top-navigations-database.html
2475                http/tests/resourceLoadStatistics/do-not-remove-blocking-in-redirect-database.html
2476                http/tests/resourceLoadStatistics/do-not-switch-session-on-navigation-to-prevalent-without-interaction-database.html
2477                http/tests/resourceLoadStatistics/downgraded-referrer-for-navigation-with-link-query-from-prevalent-resource-database.html
2478                http/tests/resourceLoadStatistics/enable-debug-mode-database.html
2479                http/tests/resourceLoadStatistics/grandfathering-database.html
2480                http/tests/resourceLoadStatistics/non-prevalent-resource-with-user-interaction-database.html
2481                http/tests/resourceLoadStatistics/non-prevalent-resource-without-user-interaction-database.html
2482                http/tests/resourceLoadStatistics/non-prevalent-resources-can-access-cookies-in-a-third-party-context-database.html
2483                http/tests/resourceLoadStatistics/non-sandboxed-iframe-redirect-ip-to-localhost-to-ip-database.html
2484                http/tests/resourceLoadStatistics/non-sandboxed-iframe-redirect-localhost-to-ip-to-localhost-database.html
2485                http/tests/resourceLoadStatistics/non-sandboxed-nesting-iframe-with-non-sandboxed-iframe-redirect-ip-to-localhost-to-ip-database.html
2486                http/tests/resourceLoadStatistics/non-sandboxed-nesting-iframe-with-non-sandboxed-iframe-redirect-localhost-to-ip-to-localhost-database.html
2487                http/tests/resourceLoadStatistics/non-sandboxed-nesting-iframe-with-sandboxed-iframe-redirect-ip-to-localhost-to-ip-database.html
2488                http/tests/resourceLoadStatistics/non-sandboxed-nesting-iframe-with-sandboxed-iframe-redirect-localhost-to-ip-to-localhost-database.html
2489                http/tests/resourceLoadStatistics/ping-to-prevalent-resource-database.html
2490                http/tests/resourceLoadStatistics/prevalent-resource-handled-keydown-database.html
2491                http/tests/resourceLoadStatistics/prevalent-resource-unhandled-keydown-database.html
2492                http/tests/resourceLoadStatistics/prevalent-resource-with-user-interaction-database.html
2493                http/tests/resourceLoadStatistics/prevalent-resource-with-user-interaction-timeout-database.html
2494                http/tests/resourceLoadStatistics/prevalent-resource-without-user-interaction-database.html
2495                http/tests/resourceLoadStatistics/prune-statistics-database.html
2496                http/tests/resourceLoadStatistics/sandboxed-iframe-redirect-ip-to-localhost-to-ip-database.html
2497                http/tests/resourceLoadStatistics/sandboxed-iframe-redirect-localhost-to-ip-to-localhost-database.html
2498                http/tests/resourceLoadStatistics/sandboxed-nesting-iframe-with-non-sandboxed-iframe-redirect-ip-to-localhost-to-ip-database.html
2499                http/tests/resourceLoadStatistics/sandboxed-nesting-iframe-with-non-sandboxed-iframe-redirect-localhost-to-ip-to-localhost-database.html
2500                http/tests/resourceLoadStatistics/sandboxed-nesting-iframe-with-sandboxed-iframe-redirect-ip-to-localhost-to-ip-database.html
2501                http/tests/resourceLoadStatistics/sandboxed-nesting-iframe-with-sandboxed-iframe-redirect-localhost-to-ip-to-localhost-database.html
2502                http/tests/resourceLoadStatistics/set-custom-prevalent-resource-in-debug-mode-database.html
2503                http/tests/resourceLoadStatistics/strip-referrer-to-origin-for-prevalent-subresource-redirects-database.html
2504                http/tests/resourceLoadStatistics/strip-referrer-to-origin-for-prevalent-subresource-requests-database.html
2505                http/tests/resourceLoadStatistics/switch-session-on-navigation-to-prevalent-with-interaction-database.html
2506                http/tests/resourceLoadStatistics/user-interaction-in-cross-origin-sub-frame-database.html
2507                http/tests/resourceLoadStatistics/user-interaction-only-reported-once-within-short-period-of-time-database.html
2508                http/tests/resourceLoadStatistics/user-interaction-reported-after-website-data-removal-database.html
2509
2510         * platform/sql/SQLiteDatabase.h:
2511         Added WEBCORE_EXPORT prefix to 2 functions needed in the ITP Database 
2512         to clear out the database.
2513
2514 2019-09-24  Chris Dumez  <cdumez@apple.com>
2515
2516         Stop sampling PageCache-related AggD data
2517         https://bugs.webkit.org/show_bug.cgi?id=202161
2518
2519         Reviewed by Geoffrey Garen.
2520
2521         Stop sampling PageCache-related AggD data to make it more actionable.
2522
2523         * history/PageCache.cpp:
2524         (WebCore::logPageCacheFailureDiagnosticMessage):
2525         (WebCore::canCacheFrame):
2526         (WebCore::canCachePage):
2527
2528 2019-09-24  Sihui Liu  <sihui_liu@apple.com>
2529
2530         Stop refing UniqueIDBDatabaseTransaction in callbacks
2531         https://bugs.webkit.org/show_bug.cgi?id=202074
2532
2533         Reviewed by Youenn Fablet.
2534
2535         After quota check is introduced to IDB, callbacks that take the ref of UniqueIDBDatabaseTransaction will be 
2536         passed to StorageQuotaManager. This can make UniqueIDBDatabaseTransaction live longer than UniqueIDBDatabase.
2537
2538         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
2539         (WebCore::IDBServer::UniqueIDBDatabase::requestSpace):
2540         (WebCore::IDBServer::UniqueIDBDatabase::waitForRequestSpaceCompletion):
2541         (WebCore::IDBServer::UniqueIDBDatabase::createObjectStore):
2542         (WebCore::IDBServer::UniqueIDBDatabase::deleteObjectStore):
2543         (WebCore::IDBServer::UniqueIDBDatabase::renameObjectStore):
2544         (WebCore::IDBServer::UniqueIDBDatabase::clearObjectStore):
2545         (WebCore::IDBServer::UniqueIDBDatabase::createIndex):
2546         (WebCore::IDBServer::UniqueIDBDatabase::deleteIndex):
2547         (WebCore::IDBServer::UniqueIDBDatabase::renameIndex):
2548         (WebCore::IDBServer::UniqueIDBDatabase::putOrAdd):
2549         (WebCore::IDBServer::UniqueIDBDatabase::getRecord):
2550         (WebCore::IDBServer::UniqueIDBDatabase::getAllRecords):
2551         (WebCore::IDBServer::UniqueIDBDatabase::getCount):
2552         (WebCore::IDBServer::UniqueIDBDatabase::deleteRecord):
2553         (WebCore::IDBServer::UniqueIDBDatabase::openCursor):
2554         (WebCore::IDBServer::UniqueIDBDatabase::iterateCursor):
2555         (WebCore::IDBServer::UniqueIDBDatabase::commitTransaction):
2556         (WebCore::IDBServer::UniqueIDBDatabase::abortTransaction):
2557         * Modules/indexeddb/server/UniqueIDBDatabase.h:
2558         * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp:
2559         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::abort):
2560         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::commit):
2561         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::createObjectStore):
2562         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::deleteObjectStore):
2563         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::renameObjectStore):
2564         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::clearObjectStore):
2565         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::createIndex):
2566         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::deleteIndex):
2567         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::renameIndex):
2568         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::putOrAdd):
2569         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::getRecord):
2570         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::getAllRecords):
2571         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::getCount):
2572         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::deleteRecord):
2573         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::openCursor):
2574         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::iterateCursor):
2575
2576 2019-09-24  Keith Rollin  <krollin@apple.com>
2577
2578         Coalesce or remove PLATFORM(MAC) || PLATFORM(IOS_FAMILY)
2579         https://bugs.webkit.org/show_bug.cgi?id=202119
2580         <rdar://problem/55638792>
2581
2582         Reviewed by Alex Christensen.
2583
2584         After refactoring and other code evolution, some platform checks have
2585         ended up looking like PLATFORM(MAC) || PLATFORM(IOS_FAMILY) (or
2586         vice-versa). These can be converted into the equivalent
2587         PLATFORM(COCOA). Where the instance occurs in a Cocoa-only file, the
2588         check can be removed altogether (along with any "#else" branches).
2589
2590         No new tests -- no new or changed functionality.
2591
2592         * Modules/applepay/cocoa/PaymentContactCocoa.mm:
2593         (WebCore::subLocality):
2594         (WebCore::setSubLocality):
2595         (WebCore::subAdministrativeArea):
2596         (WebCore::setSubAdministrativeArea):
2597         * css/parser/CSSPropertyParser.cpp:
2598         (WebCore::isAppleLegacyCssValueKeyword):
2599         * html/HTMLMediaElement.cpp:
2600         (WebCore::HTMLMediaElement::mediaSessionTitle const):
2601         * inspector/InspectorFrontendHost.cpp:
2602         (WebCore::InspectorFrontendHost::platform):
2603         * page/FrameView.cpp:
2604         (WebCore::FrameView::updateBackgroundRecursively):
2605         * platform/Timer.cpp:
2606         * platform/cocoa/NetworkExtensionContentFilter.mm:
2607         (WebCore::NetworkExtensionContentFilter::initialize):
2608         * platform/graphics/cg/GraphicsContextCG.cpp:
2609         (WebCore::displayP3ColorSpaceRef):
2610         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
2611         * platform/network/cf/SocketStreamHandleImplCFNet.cpp:
2612         * rendering/RenderLayerCompositor.cpp:
2613         (WebCore::RenderLayerCompositor::requiresCompositingForScrollableFrame const):
2614
2615 2019-09-24  Antoine Quint  <graouts@apple.com>
2616
2617         [Web Animations] Unflake web-animations/timing-model/animations/updating-the-finished-state.html WPT test
2618         https://bugs.webkit.org/show_bug.cgi?id=181121
2619
2620         Reviewed by Dean Jackson.
2621
2622         When running the "update animations and send events" steps (https://drafts.csswg.org/web-animations/#update-animations-and-send-events)
2623         we assemble a list of animations to remove after updating their relevance based on the new timeline current time. However, we wouldn't
2624         account for the fact that we would *then* dispatch events which could update the timing properties of animations that had been marked
2625         for removal at this point.
2626
2627         In this specific WPT test, there were two individual tests that would rewind animations within a "finish" event handler and we would
2628         not consider the fact that they had been rewound. We now check a second time before removing an animation that it should indeed be
2629         removed.
2630
2631         * animation/DocumentTimeline.cpp:
2632         (WebCore::DocumentTimeline::internalUpdateAnimationsAndSendEvents):
2633
2634 2019-09-24  Kate Cheney  <katherine_cheney@apple.com>
2635
2636         Mixed content blocking is bypassed for WebSockets in Workers (159726)
2637         https://bugs.webkit.org/show_bug.cgi?id=159726
2638         <rdar://problem/27326438>
2639
2640         Reviewed by Brady Eidson.
2641
2642         Tests: http/tests/websocket/tests/hybi/non-document-mixed-content-blocked-http-with-embedded-https-with-embedded-http.html
2643                http/tests/websocket/tests/hybi/non-document-mixed-content-blocked-http-with-embedded-https.html
2644                http/tests/websocket/tests/hybi/non-document-mixed-content-blocked-https-with-embedded-http-with-embedded-https.https.html
2645                http/tests/websocket/tests/hybi/non-document-mixed-content-blocked.https.html
2646         
2647         * Modules/websockets/WebSocket.cpp:
2648         (WebCore::WebSocket::connect):
2649         * Modules/websockets/WorkerThreadableWebSocketChannel.cpp:
2650         (WebCore::WorkerThreadableWebSocketChannel::Bridge::connect):
2651         * loader/MixedContentChecker.cpp:
2652         (WebCore::MixedContentChecker::checkForMixedContentInFrameTree):
2653         * loader/MixedContentChecker.h:
2654         Patch to block insecure WebSocket URL connection attempts by Workers
2655         on secure pages. If the URL is ws, and any embedding iframe has protocol
2656         https, and the context is a Worker, the connection should be blocked.
2657
2658         I was unable to write a test case to hit the case where a document
2659         does not have a frame and tries to communicate via a worker to
2660         connect to a WebSocket because after removing the subframe from its
2661         parent, the subframe is unable to perform a postMessage to a worker
2662         even in the same script execution to tell the worker to connect
2663         to a WebSocket.
2664
2665 2019-09-24  Zalan Bujtas  <zalan@apple.com>
2666
2667         [LFC][IFC] Line::Content should use LineBox
2668         https://bugs.webkit.org/show_bug.cgi?id=202128
2669         <rdar://problem/55649079>
2670
2671         Reviewed by Antti Koivisto.
2672
2673         Replace Line::Content's m_logicalRect, m_baseline and m_baselineOffset with LineBox.
2674
2675         * layout/inlineformatting/InlineFormattingContextLineLayout.cpp:
2676         (WebCore::Layout::InlineFormattingContext::InlineLayout::layout):
2677         (WebCore::Layout::InlineFormattingContext::InlineLayout::computedIntrinsicWidth const):
2678         (WebCore::Layout::InlineFormattingContext::InlineLayout::createDisplayRuns):
2679         * layout/inlineformatting/InlineFormattingContextQuirks.cpp:
2680         (WebCore::Layout::InlineFormattingContext::Quirks::lineDescentNeedsCollapsing const):
2681         (WebCore::Layout::InlineFormattingContext::Quirks::lineHeightConstraints const):
2682         * layout/inlineformatting/InlineLine.cpp:
2683         (WebCore::Layout::Line::close):
2684         (WebCore::Layout::Line::adjustBaselineAndLineHeight):
2685         * layout/inlineformatting/InlineLine.h:
2686         (WebCore::Layout::Line::Content::lineBox const):
2687         (WebCore::Layout::Line::Content::setLineBox):
2688         (WebCore::Layout::Line::baselineOffset const):
2689         (WebCore::Layout::Line::Content::isEmpty const): Deleted.
2690         (WebCore::Layout::Line::Content::logicalTop const): Deleted.
2691         (WebCore::Layout::Line::Content::logicalLeft const): Deleted.
2692         (WebCore::Layout::Line::Content::logicalRight const): Deleted.
2693         (WebCore::Layout::Line::Content::logicalBottom const): Deleted.
2694         (WebCore::Layout::Line::Content::logicalWidth const): Deleted.
2695         (WebCore::Layout::Line::Content::logicalHeight const): Deleted.
2696         (WebCore::Layout::Line::Content::baseline const): Deleted.
2697         (WebCore::Layout::Line::Content::baselineOffset const): Deleted.
2698         (WebCore::Layout::Line::Content::setLogicalRect): Deleted.
2699         (WebCore::Layout::Line::Content::setBaseline): Deleted.
2700         (WebCore::Layout::Line::Content::setBaselineOffset): Deleted.
2701         * layout/inlineformatting/InlineLineBox.h:
2702         (WebCore::Layout::LineBox::Baseline::height const):
2703         (WebCore::Layout::LineBox::LineBox):
2704         (WebCore::Layout::LineBox::baselineOffset const):
2705         (WebCore::Layout::LineBox::Baseline::Baseline):
2706         (WebCore::Layout::LineBox::Baseline::setAscent):
2707         (WebCore::Layout::LineBox::Baseline::setDescent):
2708         (WebCore::Layout::LineBox::Baseline::reset):
2709         (WebCore::Layout::LineBox::Baseline::ascent const):
2710         (WebCore::Layout::LineBox::Baseline::descent const):
2711
2712 2019-09-24  Zalan Bujtas  <zalan@apple.com>
2713
2714         [LFC][IFC] Move line constraints computation to a dedicated function
2715         https://bugs.webkit.org/show_bug.cgi?id=202121
2716         <rdar://problem/55640742>
2717
2718         Reviewed by Antti Koivisto.
2719
2720         * layout/inlineformatting/InlineFormattingContext.h:
2721         * layout/inlineformatting/InlineFormattingContextLineLayout.cpp:
2722         (WebCore::Layout::LineLayout::LineLayout):
2723         (WebCore::Layout::LineLayout::close):
2724         (WebCore::Layout::LineLayout::placeInlineItem):
2725         (WebCore::Layout::InlineFormattingContext::InlineLayout::layout):
2726         (WebCore::Layout::InlineFormattingContext::InlineLayout::initialConstraintsForLine):
2727         (WebCore::Layout::InlineFormattingContext::InlineLayout::computedIntrinsicWidth const):
2728         * layout/inlineformatting/InlineLine.h:
2729
2730 2019-09-24  Youenn Fablet  <youenn@apple.com>
2731
2732         AudioTrackPrivateMediaStreamCocoa does not need to manipulate the audio unit in play/pause methods
2733         https://bugs.webkit.org/show_bug.cgi?id=202097
2734         <rdar://problem/51548144>
2735
2736         Reviewed by Eric Carlson.
2737
2738         Instead of manipulating the audio unit in play/pause methods, it is more convenient to do so in audioSamplesAvailable.
2739         play/pause methods only update boolean values that audioSamplesAvailable will read.
2740         In particular, m_autoPlay and m_isPlaying are no longer modified in the audio thread.
2741
2742         Behavior was racy so difficult to reproduce.
2743
2744         * platform/mediastream/mac/AudioTrackPrivateMediaStreamCocoa.cpp:
2745         (WebCore::AudioTrackPrivateMediaStreamCocoa::playInternal):
2746         (WebCore::AudioTrackPrivateMediaStreamCocoa::pause):
2747         (WebCore::AudioTrackPrivateMediaStreamCocoa::audioSamplesAvailable):
2748         * platform/mediastream/mac/AudioTrackPrivateMediaStreamCocoa.h:
2749
2750 2019-09-23  Youenn Fablet  <youenn@apple.com>
2751
2752         Support sync-xhr feature policy
2753         https://bugs.webkit.org/show_bug.cgi?id=202098
2754
2755         Reviewed by Alex Christensen.
2756
2757         Add support for sync-xhr feature policy parsing.
2758         Use this feature policy to control use of sync XHR in documents
2759         as per https://xhr.spec.whatwg.org/#the-send()-method step 12.
2760
2761         Covered by updated test.
2762
2763         * html/FeaturePolicy.cpp:
2764         (WebCore::FeaturePolicy::parse):
2765         (WebCore::FeaturePolicy::allows const):
2766         * html/FeaturePolicy.h:
2767         * xml/XMLHttpRequest.cpp:
2768         (WebCore::isSyncXHRAllowedByFeaturePolicy):
2769         (WebCore::XMLHttpRequest::createRequest):
2770
2771 2019-09-23  Chris Dumez  <cdumez@apple.com>
2772
2773         Drop unnecessary SessionID.h header includes
2774         https://bugs.webkit.org/show_bug.cgi?id=202129
2775
2776         Reviewed by Alex Christensen.
2777
2778         * Modules/fetch/FetchBodyConsumer.h:
2779         * Modules/indexeddb/IDBDatabaseIdentifier.h:
2780         * bindings/js/SerializedScriptValue.h:
2781         * dom/DataTransfer.h:
2782         * editing/WebCorePasteboardFileReader.h:
2783         * fileapi/FileReaderLoader.h:
2784         * fileapi/ThreadableBlobRegistry.h:
2785         * html/FileListCreator.h:
2786         * loader/CookieJar.h:
2787         * loader/EmptyFrameLoaderClient.h:
2788         * loader/FrameLoaderClient.h:
2789         * loader/LoaderStrategy.h:
2790         * page/CacheStorageProvider.h:
2791         * page/Frame.h:
2792         * page/PageGroup.h:
2793         * platform/mediastream/libwebrtc/LibWebRTCProvider.h:
2794         * platform/network/CacheValidation.h:
2795         * platform/network/FormData.h:
2796         * platform/network/NetworkStorageSession.cpp:
2797         * platform/network/StorageSessionProvider.h:
2798         * workers/WorkerGlobalScopeProxy.h:
2799         * workers/service/ServiceWorkerContainer.h:
2800         * workers/service/ServiceWorkerProvider.h:
2801         * workers/service/server/RegistrationDatabase.h:
2802         * workers/service/server/SWServer.h:
2803         * workers/service/server/SWServerToContextConnection.h:
2804         * worklets/WorkletGlobalScope.h:
2805
2806 2019-09-23  Alex Christensen  <achristensen@webkit.org>
2807
2808         Fix WPT test html/browsers/offline/application-cache-api/api_swapcache_error.https.html
2809         https://bugs.webkit.org/show_bug.cgi?id=202056
2810         <rdar://problem/55523986>
2811
2812         Reviewed by Youenn Fablet.
2813
2814         The test makes sure we throw an exception when we are in an invalid state, which we should definitely do.
2815
2816         * loader/appcache/ApplicationCache.cpp:
2817         (WebCore::ApplicationCache::setGroup):
2818         (WebCore::ApplicationCache::setManifestResource):
2819         * loader/appcache/ApplicationCache.h:
2820         (WebCore::ApplicationCache::manifestResource const):
2821         (WebCore::ApplicationCache::group const):
2822         * loader/appcache/ApplicationCacheGroup.h:
2823         * loader/appcache/ApplicationCacheHost.cpp:
2824         (WebCore::ApplicationCacheHost::candidateApplicationCacheGroup const):
2825         (WebCore::ApplicationCacheHost::failedLoadingMainResource):
2826         (WebCore::ApplicationCacheHost::setCandidateApplicationCacheGroup):
2827         (WebCore::ApplicationCacheHost::swapCache):
2828         * loader/appcache/ApplicationCacheHost.h:
2829         (WebCore::ApplicationCacheHost::candidateApplicationCacheGroup const): Deleted.
2830         * loader/appcache/ApplicationCacheResource.h:
2831
2832 2019-09-23  Chris Dumez  <cdumez@apple.com>
2833
2834         PlugInClient::didStartFromOrigin() does not need a sessionID
2835         https://bugs.webkit.org/show_bug.cgi?id=202127
2836
2837         Reviewed by Geoffrey Garen.
2838
2839         * html/HTMLPlugInImageElement.cpp:
2840         (WebCore::HTMLPlugInImageElement::userDidClickSnapshot):
2841         * page/PlugInClient.h:
2842
2843 2019-09-23  Devin Rousso  <drousso@apple.com>
2844
2845         Web Inspector: Canvas: show WebGPU shader pipelines
2846         https://bugs.webkit.org/show_bug.cgi?id=201675
2847         <rdar://problem/55543450>
2848
2849         Reviewed by Joseph Pecoraro.
2850
2851         Tests: inspector/canvas/requestShaderSource-webgpu.html
2852                inspector/canvas/shaderProgram-add-remove-webgpu.html
2853                inspector/canvas/updateShader-webgpu.html
2854
2855         Create common base classes for `WebGPUPipeline` and `GPUPipeline` so that Web Inspector can
2856         instrument both render and compute shader pipelines.
2857
2858         Refactor `InspectorShaderProgram` to support both `WebGLProgram` and `WebGPUPipeline` so
2859         that the same object can be used for all types of shader "program"s.
2860
2861         Keep a copy of each shader module's source, and allow the shader module to be updated.
2862
2863         * Modules/webgpu/WebGPUDevice.h:
2864         * Modules/webgpu/WebGPUDevice.cpp:
2865         (WebCore::WebGPUDevice::WebGPUDevice):
2866         (WebCore::WebGPUDevice::~WebGPUDevice):
2867         (WebCore::WebGPUDevice::createShaderModule const):
2868         (WebCore::WebGPUDevice::createRenderPipeline): Added.
2869         (WebCore::WebGPUDevice::createComputePipeline): Added.
2870         (WebCore::WebGPUDevice::createRenderPipeline const): Deleted.
2871         (WebCore::WebGPUDevice::createComputePipeline const): Deleted.
2872
2873         * Modules/webgpu/WebGPUPipeline.h: Added.
2874         (WebCore::WebGPUPipeline::isRenderPipeline const):
2875         (WebCore::WebGPUPipeline::isComputePipeline const):
2876         (WebCore::WebGPUPipeline::scriptExecutionContext const):
2877         * Modules/webgpu/WebGPUPipeline.cpp: Added.
2878         (WebCore::WebGPUPipeline::instancesMutex):
2879         (WebCore::WebGPUPipeline::WebGPUPipeline):
2880         (WebCore::WebGPUPipeline::~WebGPUPipeline):
2881         * platform/graphics/gpu/GPUPipeline.cpp: Added.
2882         * platform/graphics/gpu/GPUPipeline.h: Added.
2883         (WebCore::GPUPipeline::isRenderPipeline const):
2884         (WebCore::GPUPipeline::isComputePipeline const):
2885
2886         * Modules/webgpu/WebGPUComputePipeline.idl:
2887         * Modules/webgpu/WebGPUComputePipeline.h:
2888         (WebCore::WebGPUComputePipeline::computePipeline const): Deleted.
2889         * Modules/webgpu/WebGPUComputePipeline.cpp:
2890         (WebCore::WebGPUComputePipeline::create):
2891         (WebCore::WebGPUComputePipeline::WebGPUComputePipeline):
2892         (WebCore::WebGPUComputePipeline::recompile): Added.
2893         * platform/graphics/gpu/GPUComputePipeline.h:
2894         (WebCore::GPUComputePipeline::isComputePipeline): Added.
2895         * platform/graphics/gpu/cocoa/GPUComputePipelineMetal.mm:
2896         (WebCore::GPUComputePipeline::tryCreate):
2897         (WebCore::GPUComputePipeline::GPUComputePipeline):
2898         (WebCore::GPUComputePipeline::recompile): Added.
2899
2900         * Modules/webgpu/WebGPURenderPipeline.idl:
2901         * Modules/webgpu/WebGPURenderPipeline.h:
2902         (WebCore::WebGPURenderPipeline::renderPipeline const): Deleted.
2903         * Modules/webgpu/WebGPURenderPipeline.cpp:
2904         (WebCore::WebGPURenderPipeline::create):
2905         (WebCore::WebGPURenderPipeline::WebGPURenderPipeline):
2906         (WebCore::WebGPURenderPipeline::recompile): Added.
2907         * platform/graphics/gpu/GPURenderPipeline.h:
2908         (WebCore::GPURenderPipeline::isRenderPipeline): Added.
2909         * platform/graphics/gpu/cocoa/GPURenderPipelineMetal.mm:
2910         (WebCore::tryCreateMtlRenderPipelineState):
2911         (WebCore::GPURenderPipeline::tryCreate):
2912         (WebCore::GPURenderPipeline::GPURenderPipeline):
2913         (WebCore::GPURenderPipeline::recompile): Added.
2914
2915         * Modules/webgpu/WebGPUShaderModule.h:
2916         (WebCore::WebGPUShaderModule::source const): Added.
2917         * Modules/webgpu/WebGPUShaderModule.cpp:
2918         (WebCore::WebGPUShaderModule::update): Added.
2919         * Modules/webgpu/WebGPUProgrammableStageDescriptor.h:
2920         * platform/graphics/gpu/GPUProgrammableStageDescriptor.h:
2921         (WebCore::GPUProgrammableStageDescriptor::GPUProgrammableStageDescriptor):
2922
2923         * inspector/InspectorShaderProgram.h:
2924         * inspector/InspectorShaderProgram.cpp:
2925         (WebCore::InspectorShaderProgram::create):
2926         (WebCore::InspectorShaderProgram::InspectorShaderProgram):
2927         (WebCore::InspectorShaderProgram::program const): Added.
2928         (WebCore::InspectorShaderProgram::pipeline const): Added.
2929         (WebCore::shaderForType): Added.
2930         (WebCore::InspectorShaderProgram::requestShaderSource): Added.
2931         (WebCore::InspectorShaderProgram::updateShader): Added.
2932         (WebCore::InspectorShaderProgram::context const): Deleted.
2933         (WebCore::InspectorShaderProgram::shaderForType): Deleted.
2934
2935         * inspector/agents/InspectorCanvasAgent.h:
2936         * inspector/agents/InspectorCanvasAgent.cpp:
2937         (WebCore::InspectorCanvasAgent::InspectorCanvasAgent):
2938         (WebCore::InspectorCanvasAgent::discardAgent):
2939         (WebCore::InspectorCanvasAgent::enable):
2940         (WebCore::InspectorCanvasAgent::disable):
2941         (WebCore::InspectorCanvasAgent::requestShaderSource):
2942         (WebCore::InspectorCanvasAgent::updateShader):
2943         (WebCore::InspectorCanvasAgent::setShaderProgramDisabled):
2944         (WebCore::InspectorCanvasAgent::setShaderProgramHighlighted):
2945         (WebCore::InspectorCanvasAgent::frameNavigated):
2946         (WebCore::InspectorCanvasAgent::didCreateWebGLProgram): Added.
2947         (WebCore::InspectorCanvasAgent::willDestroyWebGLProgram): Added.
2948         (WebCore::InspectorCanvasAgent::isWebGLProgramDisabled): Added.
2949         (WebCore::InspectorCanvasAgent::isWebGLProgramHighlighted): Added.
2950         (WebCore::InspectorCanvasAgent::didCreateWebGPUPipeline): Added.
2951         (WebCore::InspectorCanvasAgent::willDestroyWebGPUPipeline): Added.
2952         (WebCore::InspectorCanvasAgent::programDestroyedTimerFired): Added.
2953         (WebCore::InspectorCanvasAgent::reset): Added.
2954         (WebCore::InspectorCanvasAgent::unbindProgram):
2955         (WebCore::InspectorCanvasAgent::findInspectorProgram):
2956         (WebCore::InspectorCanvasAgent::didCreateProgram): Deleted.
2957         (WebCore::InspectorCanvasAgent::willDeleteProgram): Deleted.
2958         (WebCore::InspectorCanvasAgent::isShaderProgramDisabled): Deleted.
2959         (WebCore::InspectorCanvasAgent::isShaderProgramHighlighted): Deleted.
2960         (WebCore::InspectorCanvasAgent::clearCanvasData): Deleted.
2961         * inspector/InspectorInstrumentation.h:
2962         (WebCore::InspectorInstrumentation::didCreateWebGLProgram): Added.
2963         (WebCore::InspectorInstrumentation::willDestroyWebGLProgram): Added.
2964         (WebCore::InspectorInstrumentation::isWebGLProgramDisabled): Added.
2965         (WebCore::InspectorInstrumentation::isWebGLProgramHighlighted): Added.
2966         (WebCore::InspectorInstrumentation::didCreateWebGPUPipeline): Added.
2967         (WebCore::InspectorInstrumentation::willDestroyWebGPUPipeline): Added.
2968         (WebCore::InspectorInstrumentation::didCreateProgram): Deleted.
2969         (WebCore::InspectorInstrumentation::willDeleteProgram): Deleted.
2970         (WebCore::InspectorInstrumentation::isShaderProgramDisabled): Deleted.
2971         (WebCore::InspectorInstrumentation::isShaderProgramHighlighted): Deleted.
2972         * inspector/InspectorInstrumentation.cpp:
2973         (WebCore::InspectorInstrumentation::didCreateWebGLProgramImpl): Added.
2974         (WebCore::InspectorInstrumentation::willDestroyWebGLProgramImpl): Added.
2975         (WebCore::InspectorInstrumentation::isWebGLProgramDisabledImpl): Added.
2976         (WebCore::InspectorInstrumentation::isWebGLProgramHighlightedImpl): Added.
2977         (WebCore::InspectorInstrumentation::didCreateWebGPUPipelineImpl): Added.
2978         (WebCore::InspectorInstrumentation::willDestroyWebGPUPipelineImpl): Added.
2979         (WebCore::InspectorInstrumentation::didCreateProgramImpl): Deleted.
2980         (WebCore::InspectorInstrumentation::willDeleteProgramImpl): Deleted.
2981         (WebCore::InspectorInstrumentation::isShaderProgramDisabledImpl): Deleted.
2982         (WebCore::InspectorInstrumentation::isShaderProgramHighlightedImpl): Deleted.
2983
2984         * html/canvas/WebGLProgram.h:
2985         * html/canvas/WebGLProgram.cpp:
2986         (WebCore::WebGLProgram::WebGLProgram):
2987         (WebCore::WebGLProgram::~WebGLProgram):
2988         * html/canvas/WebGLRenderingContextBase.cpp:
2989         (WebCore::InspectorScopedShaderProgramHighlight::showHightlight):
2990         (WebCore::WebGLRenderingContextBase::createProgram):
2991         (WebCore::WebGLRenderingContextBase::deleteProgram):
2992         (WebCore::WebGLRenderingContextBase::drawArrays):
2993         (WebCore::WebGLRenderingContextBase::drawElements):
2994         Rename WebGL program instrumentation points to be less ambiguous.
2995
2996         * Sources.txt:
2997         * WebCore.xcodeproj/project.pbxproj:
2998
2999 2019-09-23  Wenson Hsieh  <wenson_hsieh@apple.com>
3000
3001         [iOS] Drop animation when dragging images from Photos to WebKit2 Mail compose is incorrect
3002         https://bugs.webkit.org/show_bug.cgi?id=201674
3003         <rdar://problem/51250952>
3004
3005         Reviewed by Tim Horton.
3006
3007         Adds new helper methods on DragController to support the new image placeholder drop codepath. See WebKit
3008         ChangeLog for more details.
3009
3010         Tests:  WKAttachmentTestsIOS.TargetedPreviewsWhenDroppingImages
3011                 WKAttachmentTestsIOS.TargetedPreviewIsClippedWhenDroppingTallImage
3012
3013         * editing/WebContentReader.h:
3014
3015         Fix the Windows build after including WebContentReader.h in DragController.cpp.
3016
3017         * html/HTMLImageElement.h:
3018         (WebCore::HTMLImageElement::isDroppedImagePlaceholder const):
3019         (WebCore::HTMLImageElement::setIsDroppedImagePlaceholder):
3020
3021         Add a flag to HTMLImageElement, indicating whether it is a dropped image placeholder. If so, we have special
3022         logic to remove some temporary inline style properties from the image after it has finished loading (see
3023         finalizeDroppedImagePlaceholder).
3024
3025         Note that this doesn't increase the size of HTMLImageElement.
3026
3027         * page/DragController.cpp:
3028         (WebCore::DragController::dragEnded):
3029
3030         Clean up any stale placeholders after the drag ends.
3031
3032         (WebCore::DragController::performDragOperation):
3033         (WebCore::DragController::removeAllDroppedImagePlaceholders):
3034
3035         Add a private helper to clean up any dropped image placeholders after failing to update dropped image
3036         placeholders for any reason.
3037
3038         (WebCore::DragController::tryToUpdateDroppedImagePlaceholders):
3039
3040         Invoked when performing the drag operation, after image data has been loaded; this function attempts to update
3041         the list of image placeholder elements tracked by DragController that were previously inserted using
3042         insertDroppedImagePlaceholdersAtCaret, and updates the source attribute of each element (as well as any backed
3043         attachment element, if attachment elements are enabled). It achieves this by reading the dropped data as web
3044         content, and matching up the images in the resulting fragment against the placeholder images. If each image in
3045         the fragment can correspond to exactly one placeholder, we update the source of each placeholder image,
3046         migrate attachment elements over to the placeholder images if needed, and finally discard the fragment.
3047
3048         A return value of false indicates that this process failed, in which case we clean up the placeholders and fall
3049         back to handling the drop normally.
3050
3051         (WebCore::DragController::insertDroppedImagePlaceholdersAtCaret):
3052
3053         Invoked when handling the drop, before any image data has been loaded; this function takes a list of sizes
3054         representing the preferred presentation sizes of each item provider that will be loaded as an image, and uses
3055         ReplaceSelectionCommand to insert a list of (initially blank) placeholder images at the drop caret, sized
3056         accordingly to each item provider's preferredPresentationSize.
3057
3058         To make this compatible with Mail compose (and all other known internal clients that use the _editable SPI), we
3059         additionally enforce a max-width of 100% on each image and preserve the aspect ratio of the image by adjusting
3060         the height if needed.
3061
3062         (WebCore::DragController::finalizeDroppedImagePlaceholder):
3063         * page/DragController.h:
3064
3065         Have DragController keep track of the list of dropped image placeholders (in DOM order), as well as the dropped
3066         image placeholder range. This information is used once item provider data arrives and the drag operation is
3067         being performed, to update the source of each dropped image placeholder.
3068
3069         (WebCore::DragController::droppedImagePlaceholders const):
3070         (WebCore::DragController::droppedImagePlaceholderRange const):
3071         * platform/network/mac/UTIUtilities.h:
3072
3073         Mark an existing helper function as WEBCORE_EXPORT.
3074
3075 2019-09-23  Daniel Bates  <dabates@apple.com>
3076
3077         Improve CSP inheritance semantics
3078         https://bugs.webkit.org/show_bug.cgi?id=201884
3079         <rdar://problem/50172407>
3080
3081         Reviewed by Brent Fulgham.
3082
3083         Update the CSP inheritance semantics to more closely match the logic in section Initialize a Document's CSP list
3084         of the CSP3 spec., <https://w3c.github.io/webappsec-csp/#initialize-document-csp>.
3085
3086         Towards this, move more of the inheritance logic out of Document::initContentSecurityPolicy() and into
3087         DocumentWriter::begin() where details about the document being replaced live. This lets us remove the
3088         need to track the previous content security policy to pass it to Document::initContentSecurityPolicy().
3089         Moreover, DocumentWriter::begin() knows the owner document that will be replaced with the result of
3090         executing a JavaScript URL. This is needed in order to fix up inheritance of CSP for such documents.
3091
3092         Tests: http/tests/security/contentSecurityPolicy/iframe-allowed-when-loaded-via-javascript-url.html
3093                http/tests/security/contentSecurityPolicy/iframe-blocked-when-loaded-via-javascript-url.html
3094                http/tests/security/contentSecurityPolicy/iframe-blocked-when-loaded-via-javascript-url2.html
3095
3096         * dom/Document.cpp:
3097         (WebCore::Document::initSecurityContext): If we are inheriting the security origin from the owner
3098         document then inherit its CSP policy. We copy over both the CSP state from the owner as well as
3099         update 'self' to match the owner's origin so that CSP source expressions that include 'self' work
3100         correctly even from about:blank documents.
3101         (WebCore::Document::initContentSecurityPolicy): Move most of the logic from here into DocumentWriter::begin()
3102         to take advantage of the fact that DocumentWriter::begin() knows about the outgoing document (if there
3103         is one) as well as whether the outgoing document is being replaced with a new document that is the result
3104         of evaluating a JavaScript URL. We need do know both these things in order to inherit the correct CSP
3105         policy. This function only exists to copy some upgrade-insecure-requests state and to fix up plugin documents
3106         as we currently do.
3107         (WebCore::Document::shouldInheritContentSecurityPolicy const): Deleted.
3108         * dom/Document.h:
3109         * dom/SecurityContext.cpp:
3110         (WebCore::SecurityContext::setContentSecurityPolicy): Modified to take its param by rvalue-reference
3111         to make it less error prone to use.
3112         * dom/SecurityContext.h: Expose setContentSecurityPolicy() so that we can invoke it from DocumentWriter::begin().
3113         * loader/DocumentWriter.cpp:
3114         (WebCore::DocumentWriter::begin): For documents being replaced with the result of a JavaScript URL (i.e. ownerDocument
3115         is non-null) inherit the CSP from the owner document. Similarly, if we have an existing document in the frame
3116         and the protocol of the new document's URL is data: or blob: then inherit the CSP from the existing page. The latter
3117         is what we currently do just moved from Document::initContentSecurityPolicy() and re-written in terms of the
3118         existingDocument instead of previousContentSecurityPolicy. Also call setInsecureNavigationRequestsToUpgrade()
3119         both when we have a non-null ownerDocument as well as when we have a non-null existingDocument. The former fixes
3120         the block-all-mixed-content feature for documents loaded via JavaScript URLs and the latter is what we do now.
3121         * loader/FrameLoader.cpp:
3122         (WebCore::FrameLoader::didBeginDocument): Remove parameter previousContentSecurityPolicy as the logic that
3123         made use of it moved to DocumentWriter::begin().
3124         * loader/FrameLoader.h:
3125         * page/csp/ContentSecurityPolicy.h:
3126
3127 2019-09-23  Keith Rollin  <krollin@apple.com>
3128
3129         Unreviewed build fix after r250173: tvOS build broken due to unused function.
3130
3131         * platform/network/cocoa/CookieCocoa.mm:
3132         (WebCore::Cookie::operator NSHTTPCookie * _Nullable  const):
3133
3134 2019-09-23  Brent Fulgham  <bfulgham@apple.com>
3135
3136         Unreviewed WinCairo/FTW Build fix after r250192.
3137
3138         * platform/network/curl/CurlDownload.cpp:
3139         (WebCore::CurlDownload::createCurlRequest):
3140
3141 2019-09-23  Zalan Bujtas  <zalan@apple.com>
3142
3143         [LFC][IFC] Merge inline box compute functions
3144         https://bugs.webkit.org/show_bug.cgi?id=202092
3145         <rdar://problem/55607748>
3146
3147         Reviewed by Antti Koivisto.
3148
3149         Make InlineFormattingContext::layoutInFlowContent() logic simpler.
3150
3151         * layout/inlineformatting/InlineFormattingContext.cpp:
3152         (WebCore::Layout::InlineFormattingContext::layoutInFlowContent):
3153         (WebCore::Layout::InlineFormattingContext::layoutFormattingContextRoot):
3154         (WebCore::Layout::InlineFormattingContext::computeHorizontalAndVerticalGeometry):
3155         (WebCore::Layout::InlineFormattingContext::initializeMarginBorderAndPaddingForGenericInlineBox): Deleted.
3156         (WebCore::Layout::InlineFormattingContext::computeMarginBorderAndPaddingForInlineContainer): Deleted.
3157         * layout/inlineformatting/InlineFormattingContext.h:
3158
3159 2019-09-23  David Kilzer  <ddkilzer@apple.com>
3160
3161         REGRESSION (r249855): Remove debug logging from WebCore::RenderImage::paintIntoRect()
3162         <https://webkit.org/b/202103>
3163
3164         Reviewed by Zalan Bujtas.
3165
3166         * rendering/RenderImage.cpp:
3167         (WebCore::RenderImage::paintIntoRect): Remove debug logging
3168         statements.
3169
3170 2019-09-23  Zalan Bujtas  <zalan@apple.com>
3171
3172         [LFC][IFC] Pass in the Used*Values to inline layout functions.
3173         https://bugs.webkit.org/show_bug.cgi?id=202091
3174         <rdar://problem/55601987>
3175
3176         Reviewed by Antti Koivisto.
3177
3178         Only the top level layout functions should generate constraint values.
3179
3180         * layout/inlineformatting/InlineFormattingContext.cpp:
3181         (WebCore::Layout::InlineFormattingContext::layoutInFlowContent):
3182         (WebCore::Layout::InlineFormattingContext::computedIntrinsicWidthConstraints):
3183         (WebCore::Layout::InlineFormattingContext::computeMarginBorderAndPaddingForInlineContainer):
3184         (WebCore::Layout::InlineFormattingContext::computeIntrinsicWidthForFormattingRoot):
3185         (WebCore::Layout::InlineFormattingContext::computeHorizontalMargin):
3186         (WebCore::Layout::InlineFormattingContext::computeWidthAndMargin):
3187         (WebCore::Layout::InlineFormattingContext::computeHeightAndMargin):
3188         (WebCore::Layout::InlineFormattingContext::layoutFormattingContextRoot):
3189         (WebCore::Layout::InlineFormattingContext::computeWidthAndHeightForReplacedInlineBox):
3190         * layout/inlineformatting/InlineFormattingContext.h:
3191         (WebCore::Layout::InlineFormattingContext::InlineLayout::widthConstraint const):
3192         * layout/inlineformatting/InlineFormattingContextLineLayout.cpp:
3193         (WebCore::Layout::InlineFormattingContext::InlineLayout::InlineLayout):
3194         (WebCore::Layout::InlineFormattingContext::InlineLayout::layout):
3195         (WebCore::Layout::InlineFormattingContext::InlineLayout::computedIntrinsicWidth const):
3196         (WebCore::Layout::InlineFormattingContext::InlineLayout::createDisplayRuns):
3197
3198 2019-09-23  Antti Koivisto  <antti@apple.com>
3199
3200         Refcount simple line layout
3201         https://bugs.webkit.org/show_bug.cgi?id=202104
3202
3203         Reviewed by Zalan Bujtas.
3204
3205         Make SimpleLineLayout::Layout refcounted for safety and ease of use.
3206
3207         * dom/Position.cpp:
3208         (WebCore::Position::upstream const):
3209         (WebCore::Position::downstream const):
3210         * editing/TextIterator.cpp:
3211         (WebCore::TextIterator::handleTextNode):
3212         (WebCore::TextIterator::handleTextBox):
3213         (WebCore::TextIterator::handleTextNodeFirstLetter):
3214         * editing/TextIterator.h:
3215         * rendering/RenderBlockFlow.h:
3216         * rendering/RenderTreeAsText.cpp:
3217         (WebCore::RenderTreeAsText::writeRenderObject):
3218         (WebCore::write):
3219         * rendering/SimpleLineLayout.cpp:
3220         (WebCore::SimpleLineLayout::create):
3221         (WebCore::SimpleLineLayout::Layout::create):
3222         * rendering/SimpleLineLayout.h:
3223         * rendering/SimpleLineLayoutFunctions.cpp:
3224         (WebCore::SimpleLineLayout::outputLineLayoutForFlow):
3225         * rendering/SimpleLineLayoutResolver.cpp:
3226         (WebCore::SimpleLineLayout::RunResolver::Run::rect const):
3227         (WebCore::SimpleLineLayout::RunResolver::Iterator::Iterator):
3228
3229         Iterator now refs the layout. Since the resolver is owned by the layout, it is guaranteed to stay alive too.
3230
3231         (WebCore::SimpleLineLayout::RunResolver::Iterator::advanceLines):
3232         * rendering/SimpleLineLayoutResolver.h:
3233         (WebCore::SimpleLineLayout::RunResolver::Iterator::layout const):
3234         (WebCore::SimpleLineLayout::RunResolver::Run::computeBaselinePosition const):
3235         (WebCore::SimpleLineLayout::RunResolver::Iterator::simpleRun const):
3236         (WebCore::SimpleLineLayout::RunResolver::Iterator::inQuirksMode const): Deleted.
3237         (WebCore::SimpleLineLayout::runResolver): Deleted.
3238
3239         Always use the cached resolver owned by SimpleLineLayout::Layout.
3240
3241         * rendering/line/LineLayoutInterfaceTextBoxes.cpp:
3242         (WebCore::LineLayoutInterface::firstTextBoxInVisualOrderFor):
3243         (WebCore::LineLayoutInterface::firstTextBoxInTextOrderFor):
3244         (WebCore::LineLayoutInterface::textBoxRangeFor):
3245         (WebCore::LineLayoutInterface::Provider::firstTextBoxInVisualOrderFor): Deleted.
3246         (WebCore::LineLayoutInterface::Provider::firstTextBoxInTextOrderFor): Deleted.
3247         (WebCore::LineLayoutInterface::Provider::textBoxRangeFor): Deleted.
3248
3249         There is no need for a separate Provider class anymore as the iterator keeps SimpleLineLayout::Layout
3250         and Resolver instances alive itself.
3251
3252         * rendering/line/LineLayoutInterfaceTextBoxes.h:
3253         (WebCore::LineLayoutInterface::hasTextBoxes):
3254         (WebCore::LineLayoutInterface::Provider::firstTextBoxFor): Deleted.
3255
3256 2019-09-23  Youenn Fablet  <youenn@apple.com>
3257
3258         Simplify UserMediaPermissionRequestManager management of UserMediaRequest
3259         https://bugs.webkit.org/show_bug.cgi?id=201688
3260
3261         Reviewed by Eric Carlson.
3262
3263         Covered by existing tests and modified test.
3264
3265         * Modules/mediastream/UserMediaRequest.cpp:
3266         (WebCore::UserMediaRequest::UserMediaRequest):
3267         * Modules/mediastream/UserMediaRequest.h:
3268         (WebCore::UserMediaRequest::identifier const):
3269         Add an identifier generated for each request.
3270
3271 2019-09-23  Charlie Turner  <cturner@igalia.com>
3272
3273         [GStreamer] isAVC1CodecSupported is crashing several media source tests due to avc1.4d4001 codec type
3274         https://bugs.webkit.org/show_bug.cgi?id=201870
3275
3276         Reviewed by Xabier Rodriguez-Calvar.
3277
3278         The GStreamer codec-utils package expects all level_idc's to be
3279         multiples of 10 from the spec idc, i.e., 1.1 -> 11, 3.1 -> 31, 1
3280         -> 10, etc.
3281
3282         In the WPT tests, there is some confusion of this *10 multiplier,
3283         and the level_idc is given in several places as simply "1". This
3284         causes the get_level codec helper to return NULL, which the
3285         registry scanner was not handling properly, and crashing on.
3286
3287         Fix this by special casing "web level idc's" that violate the *10
3288         rule in isAVC1CodecSupported.
3289
3290         There is prior art along these lines in Gecko:
3291         https://searchfox.org/mozilla-central/source/dom/media/VideoUtils.cpp#453
3292         I assume Chrome/IE/etc must do something similar. The fix does not
3293         belong in GStreamer since these are actually invalid inputs to the
3294         get_level function.
3295
3296         Tested by imported/w3c/web-platform-tests/media-source
3297
3298         * platform/graphics/gstreamer/GStreamerRegistryScanner.cpp:
3299         (WebCore::GStreamerRegistryScanner::isAVC1CodecSupported const):
3300         Special case levels 1..5, even though these *should* be
3301         represented as 10 through 50 respectively, they are not in
3302         web-land. The two-byte local storage trick was contributed to me
3303         by Adrian Perez de Castro.
3304
3305 2019-09-23  Rob Buis  <rbuis@igalia.com>
3306
3307         Sync operator dictionary
3308         https://bugs.webkit.org/show_bug.cgi?id=201974
3309
3310         Reviewed by Frédéric Wang.
3311
3312         Sync with operator dictionary list from
3313         https://mathml-refresh.github.io/mathml-core/#operator-dictionary
3314
3315         Test: imported/w3c/web-platform-tests/mathml/presentation-markup/operators/operator-dictionary-001.html
3316
3317         * mathml/MathMLOperatorDictionary.cpp:
3318
3319 2019-09-22  David Kilzer  <ddkilzer@apple.com>
3320
3321         clang-tidy: Fix unnecessary copy/ref churn of for loop variables in WebCore
3322         <https://webkit.org/b/202090>
3323
3324         Reviewed by Daniel Bates.
3325
3326         Fix unwanted copying/ref churn of loop variables by making them
3327         const references.
3328
3329         * Modules/encryptedmedia/InitDataRegistry.cpp:
3330         (WebCore::InitDataRegistry::extractKeyIDsCenc):
3331         * accessibility/AccessibilityObject.cpp:
3332         (WebCore::AccessibilityObject::getMisspellingRange const):
3333         (WebCore::AccessibilityObject::performTextOperation):
3334         * html/HTMLSlotElement.cpp:
3335         (WebCore::flattenAssignedNodes):
3336         * html/track/WebVTTParser.cpp:
3337         (WebCore::WebVTTParser::checkAndStoreStyleSheet):
3338         * layout/inlineformatting/InlineFormattingContextLineLayout.cpp:
3339         (WebCore::Layout::InlineFormattingContext::InlineLayout::createDisplayRuns const):
3340         * platform/ios/PlatformPasteboardIOS.mm:
3341         (WebCore::PlatformPasteboard::updateSupportedTypeIdentifiers):
3342         * platform/ios/WebItemProviderPasteboard.mm:
3343         (-[WebItemProviderPasteboard allDroppedFileURLs]):
3344         * svg/SVGStringList.h:
3345         * testing/MockLibWebRTCPeerConnection.cpp:
3346         (WebCore::MockLibWebRTCPeerConnection::GetTransceivers const):
3347         Also call transceivers.reserve() to optimize allocations.
3348
3349 2019-09-21  Chris Dumez  <cdumez@apple.com>
3350
3351         Reduce use of SessionID::defaultSessionID() in WebKit
3352         https://bugs.webkit.org/show_bug.cgi?id=202080
3353
3354         Reviewed by Alex Christensen.
3355
3356         Reduce use of SessionID::defaultSessionID() in WebKit. Falling back to the default session
3357         when you don't know which session to use is never a good idea and a potential privacy issue.
3358
3359         * Modules/websockets/WebSocketChannel.cpp:
3360         (WebCore::WebSocketChannel::connect):
3361         * dom/Document.cpp:
3362         (WebCore::Document::logger):
3363         * dom/Document.h:
3364         * html/HTMLAnchorElement.cpp:
3365         (WebCore::HTMLAnchorElement::parseAdClickAttribution const):
3366         * loader/DocumentLoader.cpp:
3367         (WebCore::DocumentLoader::continueAfterContentPolicy):
3368         * loader/EmptyFrameLoaderClient.h:
3369         * loader/FrameLoaderClient.h:
3370         * loader/cache/CachedResourceLoader.cpp:
3371         (WebCore::CachedResourceLoader::requestUserCSSStyleSheet):
3372         (WebCore::CachedResourceLoader::updateCachedResourceWithCurrentRequest):
3373         (WebCore::CachedResourceLoader::requestResource):
3374         (WebCore::CachedResourceLoader::revalidateResource):
3375         (WebCore::CachedResourceLoader::loadResource):
3376         * loader/cache/CachedResourceLoader.h:
3377         (WebCore::CachedResourceLoader::clearDocumentLoader):
3378         * page/Frame.cpp:
3379         * page/Frame.h:
3380         * workers/service/ServiceWorkerContainer.cpp:
3381         (WebCore::ServiceWorkerContainer::isAlwaysOnLoggingAllowed const):
3382
3383 2019-09-21  Chris Dumez  <cdumez@apple.com>
3384
3385         ServiceWorkerContextData does not need a sessionID
3386         https://bugs.webkit.org/show_bug.cgi?id=202087
3387
3388         Reviewed by Alex Christensen.
3389
3390         * workers/service/ServiceWorkerContextData.cpp:
3391         (WebCore::ServiceWorkerContextData::isolatedCopy const):
3392         * workers/service/ServiceWorkerContextData.h:
3393         (WebCore::ServiceWorkerContextData::encode const):
3394         (WebCore::ServiceWorkerContextData::decode):
3395         * workers/service/server/RegistrationDatabase.cpp:
3396         (WebCore::RegistrationDatabase::RegistrationDatabase):
3397         (WebCore::RegistrationDatabase::importRecords):
3398         * workers/service/server/RegistrationDatabase.h:
3399         * workers/service/server/SWServer.cpp:
3400         (WebCore::SWServer::updateWorker):
3401         * workers/service/server/SWServerWorker.cpp:
3402         (WebCore::SWServerWorker::contextData const):
3403
3404 2019-09-21  Chris Dumez  <cdumez@apple.com>
3405
3406         WebIDBConnectionToClient does not need to be RefCounted or a SessionID
3407         https://bugs.webkit.org/show_bug.cgi?id=202089
3408
3409         Reviewed by Alex Christensen.
3410
3411         Drop some dead code.
3412
3413         * Modules/indexeddb/server/IDBConnectionToClientDelegate.h:
3414
3415 2019-09-21  Chris Dumez  <cdumez@apple.com>
3416
3417         [CURL] CurlRequest does not need a sessionID
3418         https://bugs.webkit.org/show_bug.cgi?id=202086
3419
3420         Reviewed by Alex Christensen.
3421
3422         * platform/network/curl/CurlFormDataStream.cpp:
3423         (WebCore::CurlFormDataStream::CurlFormDataStream):
3424         * platform/network/curl/CurlFormDataStream.h:
3425         * platform/network/curl/CurlRequest.cpp:
3426         (WebCore::CurlRequest::CurlRequest):
3427         * platform/network/curl/CurlRequest.h:
3428         (WebCore::CurlRequest::create):
3429         * platform/network/curl/ResourceHandleCurl.cpp:
3430         (WebCore::ResourceHandle::createCurlRequest):
3431
3432 2019-09-21  Chris Dumez  <cdumez@apple.com>
3433
3434         CookieRequestHeaderFieldProxy does not need a SessionID
3435         https://bugs.webkit.org/show_bug.cgi?id=202084
3436
3437         Reviewed by Alex Christensen.
3438
3439         * Modules/websockets/WebSocketChannel.cpp:
3440         (WebCore::WebSocketChannel::didOpenSocketStream):
3441         * loader/CookieJar.cpp:
3442         (WebCore::CookieJar::cookieRequestHeaderFieldProxy):
3443         * loader/CookieJar.h:
3444         * platform/network/CookieRequestHeaderFieldProxy.h:
3445         (WebCore::CookieRequestHeaderFieldProxy::encode const):
3446         (WebCore::CookieRequestHeaderFieldProxy::decode):
3447
3448 2019-09-21  Chris Dumez  <cdumez@apple.com>
3449
3450         DocumentLoader::m_temporaryServiceWorkerClient does not need a sessionID
3451         https://bugs.webkit.org/show_bug.cgi?id=202083
3452
3453         Reviewed by Alex Christensen.
3454
3455         * loader/DocumentLoader.cpp:
3456         (WebCore::DocumentLoader::registerTemporaryServiceWorkerClient):
3457         (WebCore::DocumentLoader::unregisterTemporaryServiceWorkerClient):
3458         * loader/DocumentLoader.h:
3459
3460 2019-09-21  Brent Fulgham  <bfulgham@apple.com>
3461
3462         [FTW] Resolve crashes found while running canvas tests
3463         https://bugs.webkit.org/show_bug.cgi?id=202062
3464
3465         Reviewed by Don Olmstead.
3466
3467         * platform/graphics/Pattern.h:
3468         * platform/graphics/win/Direct2DOperations.cpp:
3469         (WebCore::Direct2D::FillSource::FillSource): Take GraphicsContext as argument, rather than
3470         a PlatformContextDirect2D since downstream operations require the former.        
3471         (WebCore::Direct2D::StrokeSource::StrokeSource): Ditto.
3472         (WebCore::Direct2D::clip): Use new 'pushClip' helper function.
3473         * platform/graphics/win/Direct2DOperations.h:
3474         * platform/graphics/win/GraphicsContextDirect2D.cpp:
3475         (WebCore::GraphicsContext::drawPath):
3476         (WebCore::GraphicsContext::fillPath):
3477         (WebCore::GraphicsContext::strokePath):
3478         (WebCore::GraphicsContext::fillRect):
3479         (WebCore::GraphicsContext::fillRectWithRoundedHole):
3480         (WebCore::GraphicsContext::strokeRect):
3481         * platform/graphics/win/GraphicsContextImplDirect2D.cpp:
3482         (WebCore::GraphicsContextImplDirect2D::fillRect): Update to pass GraphicsContext.
3483         (WebCore::GraphicsContextImplDirect2D::fillRectWithRoundedHole): Ditto.
3484         (WebCore::GraphicsContextImplDirect2D::fillPath): Ditto.
3485         (WebCore::GraphicsContextImplDirect2D::strokeRect): Ditto.
3486         (WebCore::GraphicsContextImplDirect2D::strokePath): Ditto.
3487         (WebCore::GraphicsContextImplDirect2D::drawGlyphs): Ditto.
3488         * platform/graphics/win/ImageBufferDataDirect2D.cpp:
3489         (WebCore::ImageBufferData::copyRectFromSourceToData): Correct return behavior.
3490         (WebCore::ImageBufferData::compatibleBitmap): Make a copy if the render target is
3491         backed by the ID2D1Bitmap we are trying to draw with.
3492         * platform/graphics/win/PatternDirect2D.cpp:
3493         (WebCore::Pattern::createPlatformPattern const): Remove 'PlatformContextDirect2D' contructor,
3494         since we always need a GraphicsContext for the Image class.
3495         * platform/graphics/win/PlatformContextDirect2D.cpp:
3496         (WebCore::PlatformContextDirect2D::clipLayer const): Added.
3497         (WebCore::PlatformContextDirect2D::clearClips): Added.
3498         (WebCore::PlatformContextDirect2D::restore): Update to use m_stateStack, rather than
3499         the m_renderStates vector.
3500         (WebCore::PlatformContextDirect2D::save): Ditto.
3501         (WebCore::PlatformContextDirect2D::pushRenderClip): Ditto.
3502         (WebCore::PlatformContextDirect2D::setActiveLayer): Ditto.
3503         (WebCore::PlatformContextDirect2D::endDraw): Ditto.
3504         (WebCore::PlatformContextDirect2D::notifyPostDrawObserver): Ditto.
3505         (WebCore::PlatformContextDirect2D::pushClip): Ditto.
3506         * platform/graphics/win/PlatformContextDirect2D.h:
3507         (WebCore::PlatformContextDirect2D::hasSavedState const):
3508         (WebCore::PlatformContextDirect2D::clipLayer const): Deleted.
3509
3510 2019-09-20  Antoine Quint  <graouts@apple.com>
3511
3512         releasePointerCapture() not working for implicit capture; can't opt-in to pointerenter/leave for touches
3513         https://bugs.webkit.org/show_bug.cgi?id=199803
3514         <rdar://problem/53127223>
3515
3516         Reviewed by Dean Jackson.
3517
3518         In order to dispatch boundary events (pointerover/out/enter/leave) when the implicit pointer capture is released on iOS,
3519         we need to track the target of the pointer events that was dispatched last for a given pointer id. Then we compare that
3520         target with the current target when dispatching a new pointer event and determine whether we should dispatch boundary
3521         events using the exact same approach used to dispatch mouse boundary events in EventHandler::updateMouseEventTargetNode().
3522
3523         Tests: pointerevents/ios/boundary-events-through-hierarchy-without-pointer-capture.html
3524                pointerevents/ios/boundary-events-without-pointer-capture.html
3525
3526         * page/PointerCaptureController.cpp:
3527         (WebCore::hierarchyHasCapturingEventListeners):
3528         (WebCore::PointerCaptureController::dispatchEventForTouchAtIndex):
3529         (WebCore::PointerCaptureController::pointerEventWillBeDispatched):
3530         (WebCore::PointerCaptureController::ensureCapturingDataForPointerEvent):
3531         (WebCore::PointerCaptureController::cancelPointer):
3532         * page/PointerCaptureController.h:
3533
3534 2019-09-21  Zalan Bujtas  <zalan@apple.com>
3535
3536         [LFC] LayoutContext::m_formattingContextRootListForLayout should be a WeakHashSet
3537         https://bugs.webkit.org/show_bug.cgi?id=202068
3538         <rdar://problem/55579352>
3539
3540         Reviewed by Alex Christensen.
3541
3542         * layout/LayoutContext.cpp:
3543         (WebCore::Layout::LayoutContext::layout):
3544         (WebCore::Layout::LayoutContext::styleChanged):
3545         (WebCore::Layout::LayoutContext::markNeedsUpdate):
3546         * layout/LayoutContext.h:
3547         * page/FrameViewLayoutContext.cpp:
3548         (WebCore::layoutUsingFormattingContext):
3549
3550 2019-09-19  Andy Estes  <aestes@apple.com>
3551
3552         [Apple Pay] Clean up handling of summary items and payment method updates
3553         https://bugs.webkit.org/show_bug.cgi?id=202018
3554         <rdar://problem/55470632>
3555
3556         Reviewed by Tim Horton.
3557
3558         Replaced the PaymentMethodUpdate struct with a class that knows how to convert from
3559         ApplePayPaymentMethodUpdate structs to PKPaymentRequestPaymentMethodUpdate instances.
3560
3561         Moved some scattered-around free functions for converting payment summary items into
3562         PaymentSummaryItems{.h,Cocoa.mm}.
3563
3564         * Modules/applepay/ApplePayPaymentMethodUpdate.h:
3565         * Modules/applepay/ApplePaySession.cpp:
3566         (WebCore::finishConverting):
3567         (WebCore::convertAndValidateTotal):
3568         (WebCore::convertAndValidate):
3569         * Modules/applepay/ApplePaySessionPaymentRequest.h:
3570         * Modules/applepay/PaymentCoordinator.h:
3571         * Modules/applepay/PaymentCoordinatorClient.h:
3572         * Modules/applepay/PaymentHeaders.h:
3573         * Modules/applepay/PaymentMethodUpdate.h: Added.
3574         * Modules/applepay/PaymentSummaryItems.h: Added.
3575         * Modules/applepay/cocoa/PaymentMethodUpdateCocoa.mm: Added.
3576         (WebCore::PaymentMethodUpdate::PaymentMethodUpdate):
3577         (WebCore::PaymentMethodUpdate::totalAndLineItems const):
3578         (WebCore::PaymentMethodUpdate::platformUpdate const):
3579         * Modules/applepay/cocoa/PaymentSummaryItemsCocoa.mm: Added.
3580         (WebCore::toDecimalNumber):
3581         (WebCore::toPKPaymentSummaryItemType):
3582         (WebCore::toPKPaymentSummaryItem):
3583         (WebCore::platformSummaryItems):
3584         * Modules/applepay/paymentrequest/ApplePayPaymentHandler.cpp:
3585         (WebCore::ApplePayPaymentHandler::paymentMethodUpdated):
3586         * SourcesCocoa.txt:
3587         * WebCore.xcodeproj/project.pbxproj:
3588         * testing/MockPaymentCoordinator.cpp:
3589         (WebCore::MockPaymentCoordinator::completePaymentMethodSelection):
3590
3591 2019-09-20  Said Abou-Hallawa  <sabouhallawa@apple.com>
3592
3593         Assertion fires when animating a discrete property with values range and multiple animators
3594         https://bugs.webkit.org/show_bug.cgi?id=201926
3595
3596         Reviewed by Darin Adler.
3597
3598         The first animator of a property is considered the result element. The
3599         other animators will be just contributers to the first animator. For the
3600         first animator and in SVGSMILElement::progress(), we call resetAnimatedType()
3601         which creates m_animator in SVGAnimateElementBase::animator(). But for 
3602         the other animators we do not call resetAnimatedType(). So their m_animator
3603         will stay null until they are used for the first time.
3604
3605         If SVGAnimationElement::startedActiveInterval() calls calculateToAtEndOfDurationValue()
3606         for a discrete property this will have no effect and the call should be
3607         ignored. So SVGAnimateElementBase::calculateToAtEndOfDurationValue()
3608         should bail out early if isDiscreteAnimator() is true.
3609
3610         The bug is isDiscreteAnimator() will return false if the m_animator is 
3611         null even if the animated property is discrete, e.g. SVGAnimatedString.
3612         The fix is to make isDiscreteAnimator() ensure m_animator is created.
3613
3614         Unrelated change:
3615         Make most of the protected methods of SVGAnimateElementBase be private.
3616
3617         Test: svg/animations/multiple-discrete-values-animate.svg
3618
3619         * svg/SVGAnimateElementBase.cpp:
3620         (WebCore::SVGAnimateElementBase::calculateFromAndByValues):
3621         (WebCore::SVGAnimateElementBase::calculateToAtEndOfDurationValue):
3622
3623 2019-09-20  Keith Rollin  <krollin@apple.com>
3624
3625         Remove dead code for a specific macOS and iOS SDK
3626         https://bugs.webkit.org/show_bug.cgi?id=202054
3627         <rdar://problem/55569619>
3628
3629         Reviewed by Zalan Bujtas.
3630
3631         ComplexTextController::collectComplexTextRunsForCharacters in
3632         ComplexTextControllerCoreText.mm has some code for compatibility with
3633         specifically macOS 10.14.0 and iOS 12.0 (see Bug 186571). We don't
3634         build for these targets any more (when we build for macOS 10.14, it's
3635         for a later minor revision), so this code can be removed.
3636
3637         No new tests -- no new or changed functionality.
3638
3639         * platform/graphics/mac/ComplexTextControllerCoreText.mm:
3640         (WebCore::ComplexTextController::collectComplexTextRunsForCharacters):
3641
3642 2019-09-20  Alex Christensen  <achristensen@webkit.org>
3643
3644         Remove unnecessary abstractions around WebsiteDataStore
3645         https://bugs.webkit.org/show_bug.cgi?id=201655
3646
3647         Reviewed by Chris Dumez.
3648
3649         * Modules/webdatabase/cocoa/DatabaseManagerCocoa.mm:
3650         (WebCore::DatabaseManager::platformInitialize):
3651
3652 2019-09-20  Alex Christensen  <achristensen@webkit.org>
3653
3654         [resource-timing] Report performance entries with all HTTP status codes
3655         https://bugs.webkit.org/show_bug.cgi?id=202040
3656
3657         Reviewed by Joseph Pecoraro.
3658
3659         This follows a Chromium change at https://chromium-review.googlesource.com/c/chromium/src/+/1796544
3660         The spec change is being discussed at https://github.com/w3c/resource-timing/issues/165
3661
3662         Test: imported/w3c/web-platform-tests/resource-timing/status-codes-create-entry.html
3663
3664         I had to slightly modify the test to make sure the entry count was > 0 instead of == 1 to reduce flakyness because sometimes we load the 200 image twice.
3665         I'll submit a PR to WPT, too.
3666
3667         * loader/ResourceTimingInformation.cpp:
3668         (WebCore::ResourceTimingInformation::shouldAddResourceTiming):
3669
3670 2019-09-20  Keith Rollin  <krollin@apple.com>
3671
3672         Remove check of setSourceAppPid selector that's no longer needed
3673         https://bugs.webkit.org/show_bug.cgi?id=201971
3674         <rdar://problem/55505761>
3675
3676         Reviewed by Andy Estes.
3677
3678         Bug 172152 introduced a check of the NEFilterSource selector
3679         setSourceAppPid in order to support OS's that didn't support it. All
3680         supported Cocoa platforms now support it, so the check can be removed.
3681
3682         No new tests -- no new or changed functionality.
3683
3684         * platform/cocoa/NetworkExtensionContentFilter.mm:
3685         (WebCore::NetworkExtensionContentFilter::initialize):
3686
3687 2019-09-20  Keith Rollin  <krollin@apple.com>
3688
3689         Remove some support for < iOS 13
3690         https://bugs.webkit.org/show_bug.cgi?id=201967
3691         <rdar://problem/55504738>
3692
3693         Reviewed by Andy Estes.
3694
3695         Remove some support for iOS versions less than 13.0.
3696
3697         Update conditionals that reference __IPHONE_OS_VERSION_MIN_REQUIRED
3698         and __IPHONE_OS_VERSION_MAX_ALLOWED, assuming that they both have
3699         values >= 130000. This means that expressions like
3700         "__IPHONE_OS_VERSION_MIN_REQUIRED < 101300" are always False and
3701         "__IPHONE_OS_VERSION_MIN_REQUIRED >= 101300" are always True.
3702
3703         After version checks have been removed, there are some cases where the
3704         preprocessor conditional looks like "#if PLATFORM(MAC) ||
3705         PLATFORM(IOS_FAMILY)". These can be collapsed into "#if
3706         PLATFORM(COCOA)". This additional cleanup will be performed in a
3707         subsequent patch.
3708
3709         This removal is part of a series of patches effecting the removal of
3710         dead code for old versions of iOS. This particular pass involves
3711         changes in which Andy Estes was involved. These changes are isolated
3712         from other similar changes in order to facilitate the reviewing
3713         process.
3714
3715         No new tests -- no new or changed functionality.
3716
3717         * platform/cocoa/NetworkExtensionContentFilter.mm:
3718         (WebCore::NetworkExtensionContentFilter::initialize):
3719
3720 2019-09-20  Chris Dumez  <cdumez@apple.com>
3721
3722         Document no longer needs to store a SessionID
3723         https://bugs.webkit.org/show_bug.cgi?id=202024
3724
3725         Reviewed by Geoffrey Garen.
3726
3727         Document no longer needs to store a SessionID, now that we have a single
3728         session per WebProcess. It can simply get its sessionID from its Page.
3729
3730         * Modules/mediastream/RTCPeerConnection.cpp:
3731         (WebCore::RTCPeerConnection::create):
3732         * Modules/websockets/WebSocketChannel.cpp:
3733         (WebCore::WebSocketChannel::didOpenSocketStream):
3734         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
3735         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
3736         * dom/DOMImplementation.cpp:
3737         (WebCore::createXMLDocument):
3738         (WebCore::DOMImplementation::createDocument):
3739         (WebCore::DOMImplementation::createHTMLDocument):
3740         * dom/DOMImplementation.h:
3741         * dom/Document.cpp:
3742         (WebCore::Document::Document):
3743         (WebCore::m_undoManager):
3744         (WebCore::Document::create):
3745         (WebCore::Document::createNonRenderedPlaceholder):
3746         (WebCore::Document::cloneDocumentWithoutChildren const):
3747         (WebCore::Document::sessionID const):
3748         (WebCore::Document::privateBrowsingStateDidChange):
3749         (WebCore::Document::ensureTemplateDocument):
3750         (WebCore::Document::logger):
3751         (WebCore::Document::didLogMessage):
3752         * dom/Document.h:
3753         (WebCore::Document::create):
3754         * dom/XMLDocument.h:
3755         (WebCore::XMLDocument::create):
3756         (WebCore::XMLDocument::createXHTML):
3757         (WebCore::XMLDocument::XMLDocument):
3758         * html/FTPDirectoryDocument.cpp:
3759         (WebCore::FTPDirectoryDocument::FTPDirectoryDocument):
3760         * html/FTPDirectoryDocument.h:
3761         * html/HTMLAnchorElement.cpp:
3762         (WebCore::HTMLAnchorElement::parseAdClickAttribution const):
3763         * html/HTMLDocument.cpp:
3764         (WebCore::HTMLDocument::createSynthesizedDocument):
3765         (WebCore::HTMLDocument::HTMLDocument):
3766         (WebCore::HTMLDocument::cloneDocumentWithoutChildren const):
3767         * html/HTMLDocument.h:
3768         (WebCore::HTMLDocument::create):
3769         * html/ImageDocument.cpp:
3770         (WebCore::ImageDocument::ImageDocument):
3771         * html/MediaDocument.cpp:
3772         (WebCore::MediaDocument::MediaDocument):
3773         * html/MediaDocument.h:
3774         * html/PluginDocument.cpp:
3775         (WebCore::PluginDocument::PluginDocument):
3776         * html/TextDocument.cpp:
3777         (WebCore::TextDocument::TextDocument):
3778         * html/TextDocument.h:
3779         * inspector/DOMPatchSupport.cpp:
3780         (WebCore::DOMPatchSupport::patchDocument):
3781         * loader/CookieJar.cpp:
3782         (WebCore::CookieJar::cookieRequestHeaderFieldProxy):
3783         (WebCore::CookieJar::cookieRequestHeaderFieldValue const):
3784         * loader/CookieJar.h:
3785         * loader/DocumentWriter.cpp:
3786         (WebCore::DocumentWriter::createDocument):
3787         * loader/SinkDocument.cpp:
3788         (WebCore::SinkDocument::SinkDocument):
3789         * loader/cache/CachedResource.cpp:
3790         (WebCore::CachedResource::setResponse):
3791         (WebCore::CachedResource::varyHeaderValuesMatch):
3792         * loader/cache/CachedSVGDocument.cpp:
3793         (WebCore::CachedSVGDocument::finishLoading):
3794         * loader/cache/CachedSVGFont.cpp:
3795         (WebCore::CachedSVGFont::ensureCustomFontData):
3796         * page/Page.cpp:
3797         (WebCore::Page::configureLoggingChannel):
3798         * platform/network/CacheValidation.cpp:
3799         (WebCore::cookieRequestHeaderFieldValue):
3800         (WebCore::collectVaryingRequestHeaders):
3801         (WebCore::verifyVaryingRequestHeaders):
3802         * platform/network/CacheValidation.h:
3803         * svg/SVGDocument.cpp:
3804         (WebCore::SVGDocument::SVGDocument):
3805         (WebCore::SVGDocument::cloneDocumentWithoutChildren const):
3806         * svg/SVGDocument.h:
3807         (WebCore::SVGDocument::create):
3808         * workers/service/ServiceWorkerContainer.cpp:
3809         (WebCore::ServiceWorkerContainer::isAlwaysOnLoggingAllowed const):
3810         * worklets/WorkletGlobalScope.cpp:
3811         (WebCore::WorkletGlobalScope::WorkletGlobalScope):
3812         * worklets/WorkletGlobalScope.h:
3813         * xml/DOMParser.cpp:
3814         (WebCore::DOMParser::parseFromString):
3815         * xml/DOMParser.h:
3816         * xml/DOMParser.idl:
3817         * xml/XMLHttpRequest.cpp:
3818         * xml/XSLTProcessor.cpp:
3819         (WebCore::XSLTProcessor::createDocumentFromSource):
3820
3821 2019-09-20  Said Abou-Hallawa  <sabouhallawa@apple.com>
3822
3823         [SVG2]: Add auto behavior for rx and ry to the SVG <ellipse> and <rect> elements (Addressing review comments)
3824         https://bugs.webkit.org/show_bug.cgi?id=199843
3825
3826         Reviewed by Darin Adler.
3827
3828         Make RenderSVGEllipse calculate of the ellipse's rx and ry more efficiently.
3829
3830         * rendering/svg/RenderSVGEllipse.cpp:
3831         (WebCore::RenderSVGEllipse::calculateRadiiAndCenter):
3832
3833 2019-09-20  Keith Rollin  <krollin@apple.com>
3834
3835         Remove some support for < iOS 13
3836         https://bugs.webkit.org/show_bug.cgi?id=202032
3837         <rdar://problem/55548468>
3838
3839         Reviewed by Alex Christensen.
3840
3841         Remove some support for iOS versions less than 13.0.
3842
3843         Update conditionals that reference __IPHONE_OS_VERSION_MIN_REQUIRED
3844         and __IPHONE_OS_VERSION_MAX_ALLOWED, assuming that they both have
3845         values >= 130000. This means that expressions like
3846         "__IPHONE_OS_VERSION_MIN_REQUIRED < 101300" are always False and
3847         "__IPHONE_OS_VERSION_MIN_REQUIRED >= 101300" are always True.
3848
3849         This removal is part of a series of patches effecting the removal of
3850         dead code for old versions of iOS. This particular pass involves
3851         changes in which Dan Bates was involved. These changes are isolated
3852         from other similar changes in order to facilitate the reviewing
3853         process.
3854
3855         No new tests -- no new or changed functionality.
3856
3857         * platform/network/cf/ResourceRequestCFNet.cpp:
3858         (WebCore::ResourceRequest::doUpdatePlatformRequest):
3859         (WebCore::ResourceRequest::doUpdateResourceRequest):
3860         * platform/network/cocoa/CookieCocoa.mm:
3861         (WebCore::Cookie::operator NSHTTPCookie * _Nullable  const):
3862         * platform/network/cocoa/ResourceRequestCocoa.mm:
3863         (WebCore::ResourceRequest::doUpdateResourceRequest):
3864         (WebCore::ResourceRequest::doUpdatePlatformRequest):
3865
3866 2019-09-20  Truitt Savell  <tsavell@apple.com>
3867
3868         Unreviewed, rolling out r250114.
3869
3870         Broke ~16 webgpu/ tests on Mojave wk2
3871
3872         Reverted changeset:
3873
3874         "Web Inspector: Canvas: show WebGPU shader pipelines"
3875         https://bugs.webkit.org/show_bug.cgi?id=201675
3876         https://trac.webkit.org/changeset/250114
3877
3878 2019-09-20  Antti Koivisto  <antti@apple.com>
3879
3880         Implement Position::upstream and Position::downstream with line layout iterator
3881         https://bugs.webkit.org/show_bug.cgi?id=202043
3882
3883         Reviewed by Zalan Bujtas.
3884
3885         These can eventually work without switching to lineboxes.
3886
3887         * dom/Position.cpp:
3888         (WebCore::Position::upstream const):
3889         (WebCore::Position::downstream const):
3890
3891         Factor the loops into TextBox::isLastOnLine function.
3892
3893         * rendering/line/LineLayoutInterfaceTextBoxes.cpp:
3894         (WebCore::LineLayoutInterface::TextBox::isLastOnLine const):
3895
3896         Looking into root boxes is a much more efficient way to figure this out.
3897
3898         (WebCore::LineLayoutInterface::TextBox::isLast const):
3899         (WebCore::LineLayoutInterface::TextBoxIterator::ComplexPath::nextInlineTextBoxInTextOrder const):
3900         (WebCore::LineLayoutInterface::TextBoxIterator::traverseNextInTextOrder):
3901         * rendering/line/LineLayoutInterfaceTextBoxes.h:
3902
3903 2019-09-20  Zalan Bujtas  <zalan@apple.com>
3904
3905         [LFC] Introduce LayoutContext class
3906         https://bugs.webkit.org/show_bug.cgi?id=202026
3907         <rdar://problem/55546622>
3908
3909         Reviewed by Antti Koivisto.
3910
3911         Move context related functionality from LayoutState to LayoutContext.
3912         To initiate a layout, create a LayoutContext, pass the current LayoutState object in and call layout().  
3913
3914         * Sources.txt:
3915         * WebCore.xcodeproj/project.pbxproj:
3916         * layout/FormattingContext.cpp:
3917         (WebCore::Layout::FormattingContext::layoutOutOfFlowContent):
3918         * layout/FormattingContext.h:
3919         * layout/FormattingContextGeometry.cpp:
3920         (WebCore::Layout::FormattingContext::Geometry::shrinkToFitWidth):
3921         * layout/LayoutState.cpp:
3922         (WebCore::Layout::LayoutState::createFormattingStateForFormattingRootIfNeeded):
3923         (WebCore::Layout::LayoutState::updateLayout): Deleted.
3924         (WebCore::Layout::LayoutState::layoutFormattingContextSubtree): Deleted.
3925         (WebCore::Layout::LayoutState::styleChanged): Deleted.
3926         (WebCore::Layout::LayoutState::markNeedsUpdate): Deleted.
3927         (WebCore::Layout::LayoutState::createFormattingContext): Deleted.
3928         (WebCore::Layout::LayoutState::run): Deleted.
3929         * layout/LayoutState.h:
3930         (WebCore::Layout::LayoutState::hasFormattingState const):
3931         (WebCore::Layout::LayoutState::setQuirksMode):
3932         (WebCore::Layout::LayoutState::inNoQuirksMode const):
3933         (WebCore::Layout::LayoutState::updateAll): Deleted.
3934         * layout/Verification.cpp:
3935         (WebCore::Layout::LayoutContext::verifyAndOutputMismatchingLayoutTree):
3936         (WebCore::Layout::LayoutState::verifyAndOutputMismatchingLayoutTree const): Deleted.
3937         * layout/blockformatting/BlockFormattingContext.cpp:
3938         (WebCore::Layout::BlockFormattingContext::layoutFormattingContextRoot):
3939         * layout/blockformatting/BlockFormattingContextGeometry.cpp:
3940         (WebCore::Layout::BlockFormattingContext::Geometry::intrinsicWidthConstraints):
3941         * layout/blockformatting/BlockInvalidation.cpp:
3942         (WebCore::Layout::computeUpdateType):
3943         (WebCore::Layout::computeUpdateTypeForAncestor):
3944         (WebCore::Layout::BlockInvalidation::invalidate):
3945         * layout/blockformatting/BlockInvalidation.h:
3946         * layout/displaytree/DisplayBox.h:
3947         * layout/inlineformatting/InlineFormattingContext.cpp:
3948         (WebCore::Layout::InlineFormattingContext::computeIntrinsicWidthForFormattingRoot):
3949         (WebCore::Layout::InlineFormattingContext::layoutFormattingContextRoot):
3950         * layout/inlineformatting/InlineInvalidation.cpp:
3951         (WebCore::Layout::InlineInvalidation::invalidate):
3952         * layout/inlineforma