73a7bdb223b288e6aa656ee50834a19b441031a6
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2019-09-19  Peng Liu  <peng.liu6@apple.com>
2
3         HTMLVideoElement with a broken poster image will take square dimension
4         https://bugs.webkit.org/show_bug.cgi?id=174122
5         <rdar://problem/33121806>
6
7         Reviewed by Daniel Bates.
8
9         For a video element, if only the width attribute is given and the height attribute is missing,
10         an invalid poster image will make its aspect ratio to be 1, which is the historical WebKit behavior
11         if we're painting alt text and/or a broken image. This fix prevents that behavior to impact video elements.
12
13         We add a virtual function shouldDisplayBrokenImageIcon() to RenderImage and it will return true
14         only when the image source is given but cannot be downloaded. RenderMedia overrides this virtual function
15         and always return false because it never shows the broken image icon. RenderVideo inherits
16         that behavior from RenderMedia.
17
18         Then, in RenderImage::computeIntrinsicRatioInformation(), we only set the aspect ratio to 1
19         when we need to show the broken image icon. It is the historical WebKit behavior that we want to keep
20         for image element, but we also want to avoid its impact (this bug) on video elements.
21
22         We also replace the imageResource().errorOccurred() with shouldDisplayBrokenImageIcon() in
23         TreeBuilder::createLayoutBox() for the same reason.
24
25         The logic to display the broken image icon in RenderImage::renderReplaced() is also cleaned up.
26
27         Test: media/video-poster-not-found.html
28
29         * layout/layouttree/LayoutTreeBuilder.cpp:
30         (WebCore::Layout::TreeBuilder::createLayoutBox):
31         * rendering/RenderImage.cpp:
32         (WebCore::RenderImage::shouldDisplayBrokenImageIcon const):
33         (WebCore::RenderImage::paintReplaced):
34         (WebCore::RenderImage::computeIntrinsicRatioInformation const):
35         * rendering/RenderImage.h:
36         * rendering/RenderMedia.h:
37
38 2019-09-19  Antti Koivisto  <antti@apple.com>
39
40         Turn static DocumentRuleSets::s_isInvalidatingStyleWithRuleSets assertion bit into a member
41         https://bugs.webkit.org/show_bug.cgi?id=201985
42         <rdar://problem/54851871>
43
44         Reviewed by Zalan Bujtas.
45
46         This assert bit was catching cases that are not dangerous. Turn it into a member to narrow the scope.
47
48         * css/DocumentRuleSets.cpp:
49         (WebCore::DocumentRuleSets::~DocumentRuleSets):
50         (WebCore::DocumentRuleSets::collectFeatures const):
51         (): Deleted.
52         * css/DocumentRuleSets.h:
53         (WebCore::DocumentRuleSets::isInvalidatingStyleWithRuleSets):
54         * style/AttributeChangeInvalidation.cpp:
55         (WebCore::Style::AttributeChangeInvalidation::invalidateStyleWithRuleSets):
56         * style/ClassChangeInvalidation.cpp:
57         (WebCore::Style::ClassChangeInvalidation::invalidateStyleWithRuleSets):
58
59 2019-09-19  Zalan Bujtas  <zalan@apple.com>
60
61         [LFC] Remove redundant Layout::Box::ElementTypes
62         https://bugs.webkit.org/show_bug.cgi?id=201963
63
64         Reviewed by Antti Koivisto.
65
66         These types can be solved through RenderStyle.
67
68         * layout/layouttree/LayoutBox.cpp:
69         (WebCore::Layout::Box::isPaddingApplicable const):
70         * layout/layouttree/LayoutBox.h:
71         (WebCore::Layout::Box::isTableHeader const):
72         (WebCore::Layout::Box::isTableBody const):
73         (WebCore::Layout::Box::isTableFooter const):
74         (WebCore::Layout::Box::isTableRow const):
75         (WebCore::Layout::Box::isTableColumnGroup const):
76         (WebCore::Layout::Box::isTableColumn const):
77         (WebCore::Layout::Box::isTableCell const):
78         * layout/layouttree/LayoutTreeBuilder.cpp:
79         (WebCore::Layout::TreeBuilder::createLayoutBox):
80         * page/FrameViewLayoutContext.cpp:
81         (WebCore::layoutUsingFormattingContext):
82
83 2019-09-19  Zalan Bujtas  <zalan@apple.com>
84
85         [LFC][IFC] InlineFormattingContext::InlineLayout should not need to call LayoutState::establishedFormattingState
86         https://bugs.webkit.org/show_bug.cgi?id=201972
87         <rdar://problem/55505869>
88
89         Reviewed by Antti Koivisto.
90
91         InlineLayout has access to InlineFormattingContext, so it should just query it instead of calling LayoutState::establishedFormattingState.
92
93         * layout/inlineformatting/InlineFormattingContext.h:
94         (WebCore::Layout::InlineFormattingContext::InlineLayout::formattingContext const):
95         (WebCore::Layout::InlineFormattingContext::InlineLayout::formattingState):
96         * layout/inlineformatting/InlineFormattingContextLineLayout.cpp:
97         (WebCore::Layout::InlineFormattingContext::InlineLayout::InlineLayout):
98         (WebCore::Layout::InlineFormattingContext::InlineLayout::layout):
99         (WebCore::Layout::InlineFormattingContext::InlineLayout::createDisplayRuns):
100         (WebCore::Layout::InlineFormattingContext::InlineLayout::layout const): Deleted.
101         (WebCore::Layout::InlineFormattingContext::InlineLayout::createDisplayRuns const): Deleted.
102
103 2019-09-19  Zalan Bujtas  <zalan@apple.com>
104
105         [LFC] FloatingContext should take the root container.
106         https://bugs.webkit.org/show_bug.cgi?id=201968
107         <rdar://problem/55505090>
108
109         Reviewed by Antti Koivisto.
110
111         Now FormattingContext::root() does not need to be public anymore.
112
113         * layout/FormattingContext.h:
114         (WebCore::Layout::FormattingContext::root const):
115         * layout/blockformatting/BlockFormattingContext.cpp:
116         (WebCore::Layout::BlockFormattingContext::layoutInFlowContent):
117         * layout/floats/FloatingContext.cpp:
118         (WebCore::Layout::FloatingContext::FloatingContext):
119         (WebCore::Layout::FloatingContext::mapPointFromFormattingContextRootToFloatingStateRoot const):
120         * layout/floats/FloatingContext.h:
121         (WebCore::Layout::FloatingContext::root const):
122         * layout/inlineformatting/InlineFormattingContextLineLayout.cpp:
123         (WebCore::Layout::InlineFormattingContext::InlineLayout::layout const):
124         (WebCore::Layout::InlineFormattingContext::InlineLayout::createDisplayRuns const):
125
126 2019-09-18  Brent Fulgham  <bfulgham@apple.com>
127
128         [FTW] Correct ImageBufferData and clear operations
129         https://bugs.webkit.org/show_bug.cgi?id=201862
130
131         Reviewed by Fujii Hironori.
132
133         This patch corrects several problems in the canvas implementation:
134         1. The implementation of ImageBufferDataDirect2D did not properly handle the case of a
135            'getData' request for less than the size of the full bitmap.
136         2. The implementation of 'Clear' was not correct when the size of the region to be
137            cleared is less than the size of the render target.
138         3. 'endDraw' fails if any clip regions are active at the end of the operation. The
139            stack needs to be unwound when endDraw is called.
140
141         This patch corrects all three problems.
142
143         Tested by canvas LayoutTests.
144
145         * platform/graphics/win/Direct2DOperations.cpp:
146         (WebCore::Direct2D::clearRect): Correct partial render target case.
147         * platform/graphics/win/ImageBufferDataDirect2D.cpp:
148         (WebCore::ImageBufferData::getData const): Correct partial buffer case.
149         (WebCore::ImageBufferData::putData): Ditto.
150         (WebCore::ImageBufferData::readDataFromBitmapIfNeeded): Added.
151         (WebCore::copyRectFromSourceToDest): Added.
152         (WebCore::ImageBufferData::copyRectFromSourceToData): Added.
153         * platform/graphics/win/PlatformContextDirect2D.cpp:
154         (WebCore::PlatformContextDirect2D::endDraw): Correct failures caused by
155         dangling clip regions when 'endDraw' is called.
156         (WebCore::PlatformContextDirect2D::flush): Don't call post-draw observer;
157         this is already handled in the draw operations, and endDraw.
158         (WebCore::PlatformContextDirect2D::restore): Recognize that the clip
159         and transparency stack might be empty when restore is called.
160
161 2019-09-18  Andy Estes  <aestes@apple.com>
162
163         Unreviewed, fixed a crash in ssl/applepay/ApplePayCancelEvent.https.html
164
165         After r250060 (which landed very shortly after the patch that introduced ApplePayCancelEvent),
166         all Events must be IsoHeap-ed. ApplePayCancelEvent was not IsoHeap-ed, and so this caused
167         assertion failures in ssl/applepay/ApplePayCancelEvent.https.html.
168         
169         Added the WTF_MAKE_ISO_ALLOCATED macros to ApplePayCancelEvent without a review to stop the
170         test from failing in EWS.
171
172         * Modules/applepay/ApplePayCancelEvent.cpp:
173         * Modules/applepay/ApplePayCancelEvent.h:
174
175 2019-09-18  Chris Dumez  <cdumez@apple.com>
176
177         WebSocketStream does not need a SessionID
178         https://bugs.webkit.org/show_bug.cgi?id=201960
179
180         Reviewed by Geoffrey Garen.
181
182         WebSocketStream does not need a SessionID, now that we have a single session per WebProcess.
183
184         * platform/network/cf/SocketStreamHandleImpl.h:
185         * platform/network/cf/SocketStreamHandleImplCFNet.cpp:
186         (WebCore::SocketStreamHandleImpl::SocketStreamHandleImpl):
187
188 2019-09-18  Chris Dumez  <cdumez@apple.com>
189
190         LibWebRTCProvider does not need sessionIDs anymore
191         https://bugs.webkit.org/show_bug.cgi?id=201959
192
193         Reviewed by Geoffrey Garen.
194
195         LibWebRTCProvider does not need sessionIDs anymore, now that we have a single session per WebProcess.
196
197         * Modules/mediastream/PeerConnectionBackend.cpp:
198         (WebCore::PeerConnectionBackend::registerMDNSName):
199         * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:
200         (WebCore::LibWebRTCMediaEndpoint::setConfiguration):
201         * platform/mediastream/libwebrtc/LibWebRTCProvider.h:
202
203 2019-09-18  Zalan Bujtas  <zalan@apple.com>
204
205         [LFC] FormattingContext::Geometry/MarginCollapse/Quirk classes should not need to access non-const Display::Box
206         https://bugs.webkit.org/show_bug.cgi?id=201944
207         <rdar://problem/55493279>
208
209         Reviewed by Antti Koivisto.
210
211         This patch improves const correctness so that the Geometry/MarginCollapse/Quirk objects could not access non-const Display::Boxes (to mutate the display tree).
212         (The MarginCollapse::Update* functions are about updating the margin values on previously processed boxes so strictly speaking they are not margin collapsing related, but they somewhat belong to the MarginCollapse class -since they deal with margins.)
213
214         * layout/FormattingContext.h:
215         (WebCore::Layout::FormattingContext::formattingState const):
216         (WebCore::Layout::FormattingContext::formattingState):
217         * layout/FormattingState.cpp:
218         (WebCore::Layout::FormattingState::displayBox):
219         (WebCore::Layout::FormattingState::displayBox const): Deleted.
220         * layout/FormattingState.h:
221         * layout/blockformatting/BlockFormattingContext.cpp:
222         (WebCore::Layout::BlockFormattingContext::computeHeightAndMargin):
223         * layout/blockformatting/BlockFormattingContext.h:
224         (WebCore::Layout::BlockFormattingContext::formattingState const):
225         (WebCore::Layout::BlockFormattingContext::formattingState):
226         * layout/blockformatting/BlockMarginCollapse.cpp:
227         (WebCore::Layout::BlockFormattingContext::MarginCollapse::updateMarginAfterForPreviousSibling):
228         (WebCore::Layout::BlockFormattingContext::MarginCollapse::positiveNegativeValues const):
229         (WebCore::Layout::BlockFormattingContext::MarginCollapse::positiveNegativeMarginBefore const):
230         (WebCore::Layout::BlockFormattingContext::MarginCollapse::positiveNegativeMarginAfter const):
231         (WebCore::Layout::BlockFormattingContext::MarginCollapse::updatePositiveNegativeMarginValues):
232         (WebCore::Layout::BlockFormattingContext::MarginCollapse::updateMarginAfterForPreviousSibling const): Deleted.
233         (WebCore::Layout::BlockFormattingContext::MarginCollapse::positiveNegativeValues): Deleted.
234         (WebCore::Layout::BlockFormattingContext::MarginCollapse::positiveNegativeMarginBefore): Deleted.
235         (WebCore::Layout::BlockFormattingContext::MarginCollapse::positiveNegativeMarginAfter): Deleted.
236         * layout/inlineformatting/InlineFormattingContext.cpp:
237         (WebCore::Layout::InlineFormattingContext::collectInlineContent):
238         (WebCore::Layout::InlineFormattingContext::collectInlineContent const): Deleted.
239         * layout/inlineformatting/InlineFormattingContext.h:
240         (WebCore::Layout::InlineFormattingContext::formattingState const):
241         (WebCore::Layout::InlineFormattingContext::formattingState):
242         * layout/tableformatting/TableFormattingContext.h:
243         (WebCore::Layout::TableFormattingContext::formattingState const):
244         (WebCore::Layout::TableFormattingContext::formattingState):
245
246 2019-09-18  Chris Dumez  <cdumez@apple.com>
247
248         BlobRegistry no longer needs SessionIDs
249         https://bugs.webkit.org/show_bug.cgi?id=201936
250
251         Reviewed by Geoffrey Garen.
252
253         BlobRegistry no longer needs SessionIDs, now that we have a single session per WebProcess.
254
255         * Modules/entriesapi/DOMFileSystem.cpp:
256         (WebCore::DOMFileSystem::getFile):
257         * Modules/entriesapi/DOMFileSystem.h:
258         * Modules/entriesapi/FileSystemFileEntry.cpp:
259         (WebCore::FileSystemFileEntry::file):
260         * Modules/entriesapi/FileSystemFileEntry.h:
261         * Modules/entriesapi/FileSystemFileEntry.idl:
262         * Modules/fetch/FetchBody.cpp:
263         (WebCore::FetchBody::fromFormData):
264         * Modules/fetch/FetchBody.h:
265         * Modules/fetch/FetchBodyConsumer.cpp:
266         (WebCore::blobFromData):
267         (WebCore::resolveWithTypeAndData):
268         (WebCore::FetchBodyConsumer::resolve):
269         (WebCore::FetchBodyConsumer::takeAsBlob):
270         * Modules/fetch/FetchBodyConsumer.h:
271         * Modules/fetch/FetchBodyOwner.cpp:
272         (WebCore::FetchBodyOwner::blob):
273         * Modules/fetch/FetchLoader.cpp:
274         (WebCore::FetchLoader::~FetchLoader):
275         (WebCore::FetchLoader::startLoadingBlobURL):
276         * Modules/fetch/FetchLoader.h:
277         * Modules/indexeddb/IDBTransaction.cpp:
278         (WebCore::IDBTransaction::putOrAddOnServer):
279         * Modules/mediarecorder/MediaRecorder.cpp:
280         (WebCore::MediaRecorder::createRecordingDataBlob):
281         * Modules/mediasource/MediaSourceRegistry.cpp:
282         (WebCore::MediaSourceRegistry::unregisterURL):
283         * Modules/mediasource/MediaSourceRegistry.h:
284         * Modules/mediastream/RTCDataChannel.cpp:
285         (WebCore::RTCDataChannel::didReceiveRawData):
286         * Modules/websockets/WebSocket.cpp:
287         (WebCore::WebSocket::didReceiveBinaryData):
288         * Modules/websockets/WorkerThreadableWebSocketChannel.cpp:
289         (WebCore::WorkerThreadableWebSocketChannel::Bridge::send):
290         * bindings/js/SerializedScriptValue.cpp:
291         (WebCore::CloneDeserializer::readFile):
292         (WebCore::CloneDeserializer::readTerminal):
293         (WebCore::SerializedScriptValue::writeBlobsToDiskForIndexedDB):
294         (WebCore::SerializedScriptValue::writeBlobsToDiskForIndexedDBSynchronously):
295         * bindings/js/SerializedScriptValue.h:
296         * dom/DataTransfer.cpp:
297         (WebCore::DataTransfer::DataTransfer):
298         (WebCore::DataTransfer::createForCopyAndPaste):
299         (WebCore::DataTransfer::filesFromPasteboardAndItemList const):
300         (WebCore::DataTransfer::createForInputEvent):
301         (WebCore::DataTransfer::createForDrag):
302         (WebCore::DataTransfer::createForDragStartEvent):
303         (WebCore::DataTransfer::createForDrop):
304         (WebCore::DataTransfer::createForUpdatingDropTarget):
305         * dom/DataTransfer.h:
306         * editing/ReplaceRangeWithTextCommand.cpp:
307         (WebCore::ReplaceRangeWithTextCommand::inputEventDataTransfer const):
308         * editing/ReplaceSelectionCommand.cpp:
309         (WebCore::ReplaceSelectionCommand::inputEventDataTransfer const):
310         * editing/SpellingCorrectionCommand.cpp:
311         (WebCore::SpellingCorrectionCommand::inputEventDataTransfer const):
312         * editing/TypingCommand.cpp:
313         (WebCore::TypingCommand::inputEventDataTransfer const):
314         * editing/WebCorePasteboardFileReader.cpp:
315         (WebCore::WebCorePasteboardFileReader::readFilename):
316         (WebCore::WebCorePasteboardFileReader::readBuffer):
317         * editing/WebCorePasteboardFileReader.h:
318         * editing/cocoa/WebContentReaderCocoa.mm:
319         (WebCore::createFragmentForImageAttachment):
320         (WebCore::replaceRichContentWithAttachments):
321         (WebCore::createFragmentAndAddResources):
322         (WebCore::sanitizeMarkupWithArchive):
323         (WebCore::WebContentReader::readImage):
324         (WebCore::attachmentForFilePath):
325         (WebCore::attachmentForData):
326         * editing/markup.cpp:
327         (WebCore::restoreAttachmentElementsInFragment):
328         * fileapi/Blob.cpp:
329         (WebCore::BlobURLRegistry::registerURL):
330         (WebCore::BlobURLRegistry::unregisterURL):
331         (WebCore::Blob::Blob):
332         (WebCore::Blob::~Blob):
333         * fileapi/Blob.h:
334         (WebCore::Blob::create):
335         (WebCore::Blob::deserialize):
336         (WebCore::Blob::slice const):
337         * fileapi/Blob.idl:
338         * fileapi/File.cpp:
339         (WebCore::File::createWithRelativePath):
340         (WebCore::File::create):
341         (WebCore::File::File):
342         * fileapi/File.h:
343         * fileapi/File.idl:
344         * fileapi/FileReaderLoader.cpp:
345         (WebCore::FileReaderLoader::~FileReaderLoader):
346         (WebCore::FileReaderLoader::start):
347         * fileapi/FileReaderLoader.h:
348         * fileapi/ThreadableBlobRegistry.cpp:
349         (WebCore::ThreadableBlobRegistry::registerFileBlobURL):
350         (WebCore::ThreadableBlobRegistry::registerBlobURL):
351         (WebCore::ThreadableBlobRegistry::registerBlobURLOptionallyFileBacked):
352         (WebCore::ThreadableBlobRegistry::registerBlobURLForSlice):
353         (WebCore::ThreadableBlobRegistry::unregisterBlobURL):
354         * fileapi/ThreadableBlobRegistry.h:
355         * html/FileInputType.cpp:
356         (WebCore::FileInputType::appendFormData const):
357         (WebCore::FileInputType::filesChosen):
358         * html/FileListCreator.cpp:
359         (WebCore::appendDirectoryFiles):
360         (WebCore::FileListCreator::FileListCreator):
361         (WebCore::FileListCreator::createFileList):
362         * html/FileListCreator.h:
363         (WebCore::FileListCreator::create):
364         * html/HTMLAttachmentElement.cpp:
365         (WebCore::HTMLAttachmentElement::updateEnclosingImageWithData):
366         * html/HTMLCanvasElement.cpp:
367         (WebCore::HTMLCanvasElement::toBlob):
368         * html/PublicURLManager.cpp:
369         (WebCore::PublicURLManager::revoke):
370         (WebCore::PublicURLManager::stop):
371         * html/URLRegistry.h:
372         * loader/PolicyChecker.cpp:
373         (WebCore::PolicyChecker::extendBlobURLLifetimeIfNecessary const):
374         * page/EventHandler.cpp:
375         (WebCore::EventHandler::handleDrag):
376         * platform/network/BlobRegistry.h:
377         * testing/Internals.cpp:
378         (WebCore::Internals::createFile):
379         * testing/ServiceWorkerInternals.cpp:
380         (WebCore::ServiceWorkerInternals::createOpaqueWithBlobBodyResponse):
381         * workers/service/context/ServiceWorkerFetch.cpp:
382         (WebCore::ServiceWorkerFetch::dispatchFetchEvent):
383         * xml/XMLHttpRequest.cpp:
384         (WebCore::XMLHttpRequest::createResponseBlob):
385
386 2019-09-18  Yusuke Suzuki  <ysuzuki@apple.com>
387
388         Make all ScriptWrappable IsoHeap-ed
389         https://bugs.webkit.org/show_bug.cgi?id=201846
390         <rdar://problem/55407535>
391
392         Reviewed by Mark Lam.
393
394         This patch puts Event and derived classes under IsoHeap to make all ScriptWrappable classes IsoHeap-ed.
395
396         * Modules/airplay/WebKitPlaybackTargetAvailabilityEvent.cpp:
397         * Modules/airplay/WebKitPlaybackTargetAvailabilityEvent.h:
398         (WebCore::WebKitPlaybackTargetAvailabilityEvent::create): Deleted.
399         (WebCore::WebKitPlaybackTargetAvailabilityEvent::availability const): Deleted.
400         * Modules/applepay/ApplePayPaymentAuthorizedEvent.cpp:
401         * Modules/applepay/ApplePayPaymentAuthorizedEvent.h:
402         * Modules/applepay/ApplePayPaymentMethodSelectedEvent.cpp:
403         * Modules/applepay/ApplePayPaymentMethodSelectedEvent.h:
404         (WebCore::ApplePayPaymentMethodSelectedEvent::create): Deleted.
405         (WebCore::ApplePayPaymentMethodSelectedEvent::paymentMethod): Deleted.
406         * Modules/applepay/ApplePayShippingContactSelectedEvent.cpp:
407         * Modules/applepay/ApplePayShippingContactSelectedEvent.h:
408         * Modules/applepay/ApplePayShippingMethodSelectedEvent.cpp:
409         * Modules/applepay/ApplePayShippingMethodSelectedEvent.h:
410         * Modules/applepay/ApplePayValidateMerchantEvent.cpp:
411         * Modules/applepay/ApplePayValidateMerchantEvent.h:
412         (WebCore::ApplePayValidateMerchantEvent::create): Deleted.
413         (WebCore::ApplePayValidateMerchantEvent::validationURL const): Deleted.
414         * Modules/encryptedmedia/MediaKeyMessageEvent.cpp:
415         * Modules/encryptedmedia/MediaKeyMessageEvent.h:
416         * Modules/encryptedmedia/legacy/WebKitMediaKeyMessageEvent.cpp:
417         * Modules/encryptedmedia/legacy/WebKitMediaKeyMessageEvent.h:
418         (WebCore::WebKitMediaKeyMessageEvent::create): Deleted.
419         (WebCore::WebKitMediaKeyMessageEvent::message const): Deleted.
420         (WebCore::WebKitMediaKeyMessageEvent::destinationURL const): Deleted.
421         * Modules/encryptedmedia/legacy/WebKitMediaKeyNeededEvent.cpp:
422         * Modules/encryptedmedia/legacy/WebKitMediaKeyNeededEvent.h:
423         (WebCore::WebKitMediaKeyNeededEvent::create): Deleted.
424         (WebCore::WebKitMediaKeyNeededEvent::initData const): Deleted.
425         * Modules/gamepad/GamepadEvent.cpp:
426         * Modules/gamepad/GamepadEvent.h:
427         (WebCore::GamepadEvent::create): Deleted.
428         (WebCore::GamepadEvent::gamepad const): Deleted.
429         * Modules/indexeddb/IDBRequestCompletionEvent.cpp:
430         * Modules/indexeddb/IDBRequestCompletionEvent.h:
431         (WebCore::IDBRequestCompletionEvent::create): Deleted.
432         * Modules/indexeddb/IDBVersionChangeEvent.cpp:
433         * Modules/indexeddb/IDBVersionChangeEvent.h:
434         * Modules/mediarecorder/BlobEvent.cpp:
435         * Modules/mediarecorder/BlobEvent.h:
436         * Modules/mediarecorder/MediaRecorderErrorEvent.cpp:
437         * Modules/mediarecorder/MediaRecorderErrorEvent.h:
438         * Modules/mediastream/MediaStreamTrackEvent.cpp:
439         * Modules/mediastream/MediaStreamTrackEvent.h:
440         * Modules/mediastream/OverconstrainedErrorEvent.cpp: Copied from Source/WebCore/Modules/mediarecorder/BlobEvent.h.
441         * Modules/mediastream/OverconstrainedErrorEvent.h:
442         (WebCore::OverconstrainedErrorEvent::create): Deleted.
443         (WebCore::OverconstrainedErrorEvent::error const): Deleted.
444         (WebCore::OverconstrainedErrorEvent::OverconstrainedErrorEvent): Deleted.
445         * Modules/mediastream/RTCDTMFToneChangeEvent.cpp:
446         * Modules/mediastream/RTCDTMFToneChangeEvent.h:
447         * Modules/mediastream/RTCDataChannelEvent.cpp:
448         * Modules/mediastream/RTCDataChannelEvent.h:
449         * Modules/mediastream/RTCPeerConnectionIceEvent.cpp:
450         * Modules/mediastream/RTCPeerConnectionIceEvent.h:
451         (WebCore::RTCPeerConnectionIceEvent::url const): Deleted.
452         * Modules/mediastream/RTCTrackEvent.cpp:
453         * Modules/mediastream/RTCTrackEvent.h:
454         (WebCore::RTCTrackEvent::receiver const): Deleted.
455         (WebCore::RTCTrackEvent::track const): Deleted.
456         (WebCore::RTCTrackEvent::streams const): Deleted.
457         (WebCore::RTCTrackEvent::transceiver const): Deleted.
458         (WebCore::RTCTrackEvent::eventInterface const): Deleted.
459         * Modules/paymentrequest/MerchantValidationEvent.cpp:
460         * Modules/paymentrequest/MerchantValidationEvent.h:
461         * Modules/paymentrequest/PaymentMethodChangeEvent.cpp:
462         * Modules/paymentrequest/PaymentMethodChangeEvent.h:
463         * Modules/paymentrequest/PaymentRequestUpdateEvent.cpp:
464         * Modules/paymentrequest/PaymentRequestUpdateEvent.h:
465         * Modules/speech/SpeechSynthesisEvent.cpp:
466         * Modules/speech/SpeechSynthesisEvent.h:
467         (WebCore::SpeechSynthesisEvent::charIndex const): Deleted.
468         (WebCore::SpeechSynthesisEvent::elapsedTime const): Deleted.
469         (WebCore::SpeechSynthesisEvent::name const): Deleted.
470         (WebCore::SpeechSynthesisEvent::eventInterface const): Deleted.
471         * Modules/webaudio/AudioProcessingEvent.cpp:
472         * Modules/webaudio/AudioProcessingEvent.h:
473         * Modules/webaudio/OfflineAudioCompletionEvent.cpp:
474         * Modules/webaudio/OfflineAudioCompletionEvent.h:
475         * Modules/webgpu/GPUUncapturedErrorEvent.cpp:
476         * Modules/webgpu/GPUUncapturedErrorEvent.h:
477         * Modules/websockets/CloseEvent.cpp: Copied from Source/WebCore/dom/BeforeTextInsertedEvent.cpp.
478         * Modules/websockets/CloseEvent.h:
479         (WebCore::CloseEvent::create): Deleted.
480         (WebCore::CloseEvent::wasClean const): Deleted.
481         (WebCore::CloseEvent::code const): Deleted.
482         (WebCore::CloseEvent::reason const): Deleted.
483         (WebCore::CloseEvent::CloseEvent): Deleted.
484         * Modules/webvr/VRDisplayEvent.cpp:
485         * Modules/webvr/VRDisplayEvent.h:
486         * Sources.txt:
487         * WebCore.xcodeproj/project.pbxproj:
488         * accessibility/AccessibleSetValueEvent.cpp:
489         * accessibility/AccessibleSetValueEvent.h:
490         (WebCore::AccessibleSetValueEvent::create): Deleted.
491         (WebCore::AccessibleSetValueEvent::value const): Deleted.
492         * animation/AnimationPlaybackEvent.cpp:
493         * animation/AnimationPlaybackEvent.h:
494         * bindings/js/ScriptWrappable.cpp: Copied from Source/WebCore/html/canvas/WebGLContextEvent.cpp.
495         * bindings/js/ScriptWrappable.h:
496         * dom/AnimationEvent.cpp:
497         * dom/AnimationEvent.h:
498         * dom/BeforeLoadEvent.cpp: Copied from Source/WebCore/dom/BeforeTextInsertedEvent.cpp.
499         * dom/BeforeLoadEvent.h:
500         * dom/BeforeTextInsertedEvent.cpp:
501         * dom/BeforeTextInsertedEvent.h:
502         * dom/BeforeUnloadEvent.cpp:
503         * dom/BeforeUnloadEvent.h:
504         * dom/ClipboardEvent.cpp:
505         * dom/ClipboardEvent.h:
506         * dom/CompositionEvent.cpp:
507         * dom/CompositionEvent.h:
508         * dom/CustomEvent.cpp:
509         * dom/CustomEvent.h:
510         * dom/DeviceMotionEvent.cpp:
511         * dom/DeviceMotionEvent.h:
512         * dom/DeviceOrientationEvent.cpp:
513         * dom/DeviceOrientationEvent.h:
514         * dom/ErrorEvent.cpp:
515         * dom/ErrorEvent.h:
516         * dom/Event.cpp:
517         * dom/Event.h:
518         * dom/FocusEvent.cpp:
519         * dom/FocusEvent.h:
520         * dom/HashChangeEvent.cpp: Copied from Source/WebCore/dom/BeforeTextInsertedEvent.cpp.
521         * dom/HashChangeEvent.h:
522         * dom/InputEvent.cpp:
523         * dom/InputEvent.h:
524         * dom/KeyboardEvent.cpp:
525         * dom/KeyboardEvent.h:
526         * dom/MessageEvent.cpp:
527         * dom/MessageEvent.h:
528         * dom/MouseEvent.cpp:
529         * dom/MouseEvent.h:
530         * dom/MouseRelatedEvent.cpp:
531         * dom/MouseRelatedEvent.h:
532         * dom/MutationEvent.cpp:
533         * dom/MutationEvent.h:
534         * dom/OverflowEvent.cpp:
535         * dom/OverflowEvent.h:
536         * dom/PageTransitionEvent.cpp:
537         * dom/PageTransitionEvent.h:
538         * dom/PointerEvent.cpp:
539         * dom/PointerEvent.h:
540         * dom/PopStateEvent.cpp:
541         * dom/PopStateEvent.h:
542         * dom/ProgressEvent.cpp:
543         * dom/ProgressEvent.h:
544         * dom/PromiseRejectionEvent.cpp:
545         * dom/PromiseRejectionEvent.h:
546         * dom/SecurityPolicyViolationEvent.cpp: Copied from Source/WebCore/dom/BeforeTextInsertedEvent.cpp.
547         * dom/SecurityPolicyViolationEvent.h:
548         * dom/TextEvent.cpp:
549         * dom/TextEvent.h:
550         * dom/TouchEvent.cpp:
551         * dom/TouchEvent.h:
552         * dom/TransitionEvent.cpp:
553         * dom/TransitionEvent.h:
554         * dom/UIEvent.cpp:
555         * dom/UIEvent.h:
556         * dom/UIEventWithKeyState.cpp:
557         * dom/UIEventWithKeyState.h:
558         * dom/WebKitAnimationEvent.cpp:
559         * dom/WebKitAnimationEvent.h:
560         * dom/WebKitTransitionEvent.cpp:
561         * dom/WebKitTransitionEvent.h:
562         * dom/WheelEvent.cpp:
563         * dom/WheelEvent.h:
564         * html/MediaEncryptedEvent.cpp:
565         * html/MediaEncryptedEvent.h:
566         * html/canvas/WebGLContextEvent.cpp:
567         * html/canvas/WebGLContextEvent.h:
568         * html/shadow/ProgressShadowElement.h:
569         * html/track/TrackEvent.cpp:
570         * html/track/TrackEvent.h:
571         * storage/StorageEvent.cpp:
572         * storage/StorageEvent.h:
573         (WebCore::StorageEvent::key const): Deleted.
574         (WebCore::StorageEvent::oldValue const): Deleted.
575         (WebCore::StorageEvent::newValue const): Deleted.
576         (WebCore::StorageEvent::url const): Deleted.
577         (WebCore::StorageEvent::storageArea const): Deleted.
578         * svg/SVGFEDistantLightElement.h:
579         * svg/SVGFEFuncAElement.h:
580         * svg/SVGFEFuncBElement.h:
581         * svg/SVGFEFuncGElement.h:
582         * svg/SVGFEFuncRElement.h:
583         * svg/SVGFEPointLightElement.h:
584         * svg/SVGFESpotLightElement.h:
585         * svg/SVGZoomEvent.cpp:
586         * svg/SVGZoomEvent.h:
587         * workers/service/ExtendableEvent.cpp:
588         * workers/service/ExtendableEvent.h:
589         * workers/service/ExtendableMessageEvent.cpp:
590         * workers/service/ExtendableMessageEvent.h:
591         * workers/service/FetchEvent.cpp:
592         * workers/service/FetchEvent.h:
593         * xml/XMLHttpRequestProgressEvent.cpp: Copied from Source/WebCore/Modules/encryptedmedia/MediaKeyMessageEvent.cpp.
594         * xml/XMLHttpRequestProgressEvent.h:
595         (WebCore::XMLHttpRequestProgressEvent::create): Deleted.
596         (WebCore::XMLHttpRequestProgressEvent::position const): Deleted.
597         (WebCore::XMLHttpRequestProgressEvent::totalSize const): Deleted.
598         (WebCore::XMLHttpRequestProgressEvent::XMLHttpRequestProgressEvent): Deleted.
599
600 2019-09-18  Zalan Bujtas  <zalan@apple.com>
601
602         [LFC] Introduce UsedVerticalValues::Constraints
603         https://bugs.webkit.org/show_bug.cgi?id=201933
604         <rdar://problem/55487485>
605
606         Reviewed by Antti Koivisto.
607
608         UsedVerticalValues::Constraints holds the constraint values ((optional)containing block height and contentbox top) for a particular box geometry computation. 
609         This is in preparation for using constraint values instead of querying the display tree for containing block geometry information.
610         See webkit.org/b/201795
611
612         * layout/FormattingContext.cpp:
613         (WebCore::Layout::outOfFlowHorizontalConstraints):
614         (WebCore::Layout::outOfFlowVerticalConstraints):
615         (WebCore::Layout::FormattingContext::computeOutOfFlowHorizontalGeometry):
616         (WebCore::Layout::FormattingContext::computeOutOfFlowVerticalGeometry):
617         (WebCore::Layout::outOfFlowConstraints): Deleted.
618         * layout/FormattingContext.h:
619         * layout/FormattingContextGeometry.cpp:
620         (WebCore::Layout::FormattingContext::Geometry::staticVerticalPositionForOutOfFlowPositioned const):
621         (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedVerticalGeometry const):
622         (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedVerticalGeometry const):
623         (WebCore::Layout::FormattingContext::Geometry::inlineReplacedHeightAndMargin const):
624         (WebCore::Layout::FormattingContext::Geometry::inlineReplacedWidthAndMargin const):
625         * layout/LayoutUnits.cpp:
626         (WebCore::Layout::UsedVerticalValues::Constraints::Constraints):
627         * layout/LayoutUnits.h:
628         (WebCore::Layout::UsedVerticalValues::Constraints::Constraints):
629         (WebCore::Layout::UsedVerticalValues::UsedVerticalValues):
630         * layout/blockformatting/BlockFormattingContext.cpp:
631         (WebCore::Layout::BlockFormattingContext::computeStaticVerticalPosition):
632         (WebCore::Layout::BlockFormattingContext::computeHeightAndMargin):
633         * layout/blockformatting/BlockFormattingContext.h:
634         * layout/blockformatting/BlockFormattingContextGeometry.cpp:
635         (WebCore::Layout::BlockFormattingContext::Geometry::staticVerticalPosition const):
636         (WebCore::Layout::BlockFormattingContext::Geometry::staticPosition const):
637         * layout/inlineformatting/InlineFormattingContext.cpp:
638         (WebCore::Layout::InlineFormattingContext::computeHeightAndMargin):
639         * layout/inlineformatting/InlineFormattingContext.h:
640         * layout/inlineformatting/InlineFormattingContextGeometry.cpp:
641         (WebCore::Layout::InlineFormattingContext::Geometry::inlineBlockHeightAndMargin const):
642
643 2019-09-18  Chris Dumez  <cdumez@apple.com>
644
645         Unreviewed, WinCairo build fix after r250045.
646
647         * platform/network/curl/CurlFormDataStream.cpp:
648         (WebCore::CurlFormDataStream::computeContentLength):
649
650 2019-09-18  Zalan Bujtas  <zalan@apple.com>
651
652         [LFC] Add contentbox left constraint to UsedHorizontalValues::Constraints
653         https://bugs.webkit.org/show_bug.cgi?id=201923
654         <rdar://problem/55485796>
655
656         Reviewed by Antti Koivisto.
657
658         Pass in the contentbox left constraint value to the FormattingContext::compute*() functions so that they don't need to read the containg block's geometry.
659         This is in preparation for using constraint values instead of querying the display tree for containing block geometry information.
660         See webkit.org/b/201795
661
662         * layout/FormattingContext.cpp:
663         (WebCore::Layout::outOfFlowConstraints):
664         (WebCore::Layout::FormattingContext::computeOutOfFlowHorizontalGeometry):
665         (WebCore::Layout::FormattingContext::computeOutOfFlowVerticalGeometry):
666         * layout/FormattingContext.h:
667         * layout/FormattingContextGeometry.cpp:
668         (WebCore::Layout::FormattingContext::Geometry::staticHorizontalPositionForOutOfFlowPositioned const):
669         (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedHorizontalGeometry):
670         (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedHorizontalGeometry const):
671         * layout/LayoutUnits.cpp:
672         (WebCore::Layout::UsedHorizontalValues::Constraints::Constraints):
673         * layout/LayoutUnits.h:
674         (WebCore::Layout::UsedHorizontalValues::Constraints::Constraints):
675         * layout/blockformatting/BlockFormattingContext.cpp:
676         (WebCore::Layout::BlockFormattingContext::computeStaticHorizontalPosition):
677         (WebCore::Layout::BlockFormattingContext::computeWidthAndMargin):
678         * layout/blockformatting/BlockFormattingContext.h:
679         * layout/blockformatting/BlockFormattingContextGeometry.cpp:
680         (WebCore::Layout::BlockFormattingContext::Geometry::staticHorizontalPosition const):
681         (WebCore::Layout::BlockFormattingContext::Geometry::staticPosition const):
682         * layout/inlineformatting/InlineFormattingContext.cpp:
683         (WebCore::Layout::InlineFormattingContext::computedIntrinsicWidthConstraints):
684         (WebCore::Layout::InlineFormattingContext::computeIntrinsicWidthForFormattingRoot):
685         * layout/tableformatting/TableFormattingContext.cpp:
686         (WebCore::Layout::TableFormattingContext::computePreferredWidthForColumns):
687
688 2019-09-18  Zalan Bujtas  <zalan@apple.com>
689
690         [LFC] Introduce UsedHorizontalValues::Constraints
691         https://bugs.webkit.org/show_bug.cgi?id=201919
692         <rdar://problem/55481927>
693
694         Reviewed by Antti Koivisto.
695
696         UsedHorizontalValues::Constraints holds the constraint values for a particular box geometry computation (currently it only has the horizontal width constraint) 
697
698         * Sources.txt:
699         * WebCore.xcodeproj/project.pbxproj:
700         * layout/FormattingContext.cpp:
701         (WebCore::Layout::FormattingContext::computeOutOfFlowHorizontalGeometry):
702         (WebCore::Layout::FormattingContext::computeOutOfFlowVerticalGeometry):
703         (WebCore::Layout::FormattingContext::computeBorderAndPadding):
704         * layout/FormattingContextGeometry.cpp:
705         (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedVerticalGeometry const):
706         (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedHorizontalGeometry):
707         (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedVerticalGeometry const):
708         (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedHorizontalGeometry const):
709         (WebCore::Layout::FormattingContext::Geometry::floatingNonReplacedWidthAndMargin):
710         (WebCore::Layout::FormattingContext::Geometry::floatingReplacedWidthAndMargin const):
711         (WebCore::Layout::FormattingContext::Geometry::inlineReplacedWidthAndMargin const):
712         (WebCore::Layout::FormattingContext::Geometry::inFlowPositionedPositionOffset const):
713         (WebCore::Layout::FormattingContext::Geometry::computedPadding const):
714         (WebCore::Layout::FormattingContext::Geometry::computedHorizontalMargin const):
715         (WebCore::Layout::FormattingContext::Geometry::computedVerticalMargin const):
716         * layout/FormattingContextQuirks.cpp:
717         (WebCore::Layout::FormattingContext::Quirks::heightValueOfNearestContainingBlockWithFixedHeight):
718         * layout/LayoutUnits.h:
719         (WebCore::Layout::UsedHorizontalValues::Constraints::Constraints):
720         (WebCore::Layout::UsedHorizontalValues::UsedHorizontalValues):
721         * layout/blockformatting/BlockFormattingContext.cpp:
722         (WebCore::Layout::BlockFormattingContext::placeInFlowPositionedChildren):
723         (WebCore::Layout::BlockFormattingContext::computeEstimatedVerticalPosition):
724         (WebCore::Layout::BlockFormattingContext::computeWidthAndMargin):
725         (WebCore::Layout::BlockFormattingContext::computeHeightAndMargin):
726         * layout/blockformatting/BlockFormattingContextGeometry.cpp:
727         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedWidthAndMargin const):
728         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowWidthAndMargin):
729         * layout/blockformatting/BlockFormattingContextQuirks.cpp:
730         (WebCore::Layout::BlockFormattingContext::Quirks::stretchedInFlowHeight):
731         * layout/blockformatting/BlockMarginCollapse.cpp:
732         (WebCore::Layout::BlockFormattingContext::MarginCollapse::positiveNegativeValues):
733         * layout/floats/FloatingContext.h:
734         * layout/inlineformatting/InlineFormattingContext.cpp:
735         (WebCore::Layout::InlineFormattingContext::layoutInFlowContent):
736         (WebCore::Layout::InlineFormattingContext::computedIntrinsicWidthConstraints):
737         (WebCore::Layout::InlineFormattingContext::computeIntrinsicWidthForFormattingRoot):
738         (WebCore::Layout::InlineFormattingContext::computeHeightAndMargin):
739         * layout/inlineformatting/InlineFormattingContextGeometry.cpp:
740         (WebCore::Layout::InlineFormattingContext::Geometry::inlineBlockWidthAndMargin):
741         * layout/inlineformatting/InlineFormattingContextLineLayout.cpp:
742         (WebCore::Layout::InlineFormattingContext::InlineLayout::createDisplayRuns const):
743         * layout/tableformatting/TableFormattingContext.cpp:
744         (WebCore::Layout::TableFormattingContext::computePreferredWidthForColumns):
745
746 2019-09-18  Andy Estes  <aestes@apple.com>
747
748         [Apple Pay] Tell websites why a session was cancelled
749         https://bugs.webkit.org/show_bug.cgi?id=201912
750
751         Reviewed by Brady Eidson.
752
753         Added ApplePayCancelEvent as the interface for ApplePaySession's cancel event. This event
754         object includes a `sessionError` attribute that exposes a Web-safe version of the PassKit
755         domain error we received from PKPaymentAuthorization(View)Controller. Currently, we report
756         all errors with code "unknown", but more codes will be added in future patches.
757
758         Test: http/tests/ssl/applepay/ApplePayCancelEvent.https.html
759
760         * DerivedSources-input.xcfilelist:
761         * DerivedSources-output.xcfilelist:
762         * DerivedSources.make:
763         * Modules/applepay/ApplePayCancelEvent.cpp: Copied from Source/WebCore/Modules/applepay/PaymentHeaders.h.
764         (WebCore::ApplePayCancelEvent::ApplePayCancelEvent):
765         (WebCore::ApplePayCancelEvent::sessionError const):
766         (WebCore::ApplePayCancelEvent::eventInterface const):
767         * Modules/applepay/ApplePayCancelEvent.h: Copied from Source/WebCore/Modules/applepay/PaymentHeaders.h.
768         (WebCore::ApplePayCancelEvent::create):
769         * Modules/applepay/ApplePayCancelEvent.idl: Copied from Source/WebCore/Modules/applepay/PaymentHeaders.h.
770         * Modules/applepay/ApplePaySession.cpp:
771         (WebCore::ApplePaySession::didCancelPaymentSession):
772         * Modules/applepay/ApplePaySession.h:
773         * Modules/applepay/ApplePaySessionError.h: Copied from Source/WebCore/Modules/applepay/PaymentHeaders.h.
774         * Modules/applepay/ApplePaySessionError.idl: Copied from Source/WebCore/Modules/applepay/PaymentHeaders.h.
775         * Modules/applepay/PaymentCoordinator.cpp:
776         (WebCore::PaymentCoordinator::didCancelPaymentSession):
777         * Modules/applepay/PaymentCoordinator.h:
778         * Modules/applepay/PaymentHeaders.h:
779         * Modules/applepay/PaymentSession.cpp:
780         * Modules/applepay/PaymentSession.h:
781         * Modules/applepay/PaymentSessionError.h: Copied from Source/WebCore/Modules/applepay/PaymentHeaders.h.
782         * Modules/applepay/cocoa/PaymentSessionErrorCocoa.mm: Copied from Source/WebCore/Modules/applepay/PaymentSession.h.
783         (WebCore::additionalError):
784         (WebCore::PaymentSessionError::PaymentSessionError):
785         (WebCore::PaymentSessionError::sessionError const):
786         (WebCore::PaymentSessionError::platformError const):
787         (WebCore::PaymentSessionError::unknownError const):
788         * Modules/applepay/paymentrequest/ApplePayPaymentHandler.cpp:
789         (WebCore::ApplePayPaymentHandler::didCancelPaymentSession):
790         * Modules/applepay/paymentrequest/ApplePayPaymentHandler.h:
791         * Modules/webgpu/WHLSL/WHLSLCheckTextureReferences.cpp:
792         * Modules/webgpu/WHLSL/WHLSLPropertyResolver.cpp:
793         * SourcesCocoa.txt:
794         * WebCore.xcodeproj/project.pbxproj:
795         * dom/EventNames.in:
796         * testing/MockPaymentCoordinator.cpp:
797         (WebCore::MockPaymentCoordinator::cancelPayment):
798
799 2019-09-18  Chris Dumez  <cdumez@apple.com>
800
801         WebSWContextManagerConnection::installServiceWorker IPC no longer need a sessionID
802         https://bugs.webkit.org/show_bug.cgi?id=201882
803
804         Reviewed by Geoffrey Garen.
805
806         WebSWContextManagerConnection::installServiceWorker IPC no longer need a sessionID now that we have a single
807         sessionID per WebProcess.
808
809         * workers/service/server/SWServer.cpp:
810         (WebCore::SWServer::installContextData):
811         (WebCore::SWServer::runServiceWorker):
812         * workers/service/server/SWServerToContextConnection.h:
813
814 2019-09-18  Chris Dumez  <cdumez@apple.com>
815
816         CacheStorageProvider::createCacheStorageConnection() does not need to take in a SessionID
817         https://bugs.webkit.org/show_bug.cgi?id=201920
818
819         Reviewed by Geoffrey Garen.
820
821         CacheStorageProvider::createCacheStorageConnection() does not need to take in a SessionID.
822         This sessionID is no longer used now that we have a session per WebProcess.
823
824         * Modules/cache/CacheStorageConnection.cpp:
825         (WebCore::formDataSize):
826         (WebCore::CacheStorageConnection::computeRealBodySize):
827         * Modules/cache/CacheStorageConnection.h:
828         * Modules/cache/DOMWindowCaches.cpp:
829         (WebCore::DOMWindowCaches::caches const):
830         * Modules/cache/WorkerCacheStorageConnection.cpp:
831         (WebCore::WorkerCacheStorageConnection::sessionID const): Deleted.
832         * Modules/cache/WorkerCacheStorageConnection.h:
833         * fileapi/Blob.cpp:
834         (WebCore::Blob::size const):
835         * fileapi/ThreadableBlobRegistry.cpp:
836         (WebCore::ThreadableBlobRegistry::blobSize):
837         * fileapi/ThreadableBlobRegistry.h:
838         * loader/cache/KeepaliveRequestTracker.cpp:
839         (WebCore::KeepaliveRequestTracker::tryRegisterRequest):
840         (WebCore::KeepaliveRequestTracker::registerRequest):
841         (WebCore::KeepaliveRequestTracker::unregisterRequest):
842         * page/CacheStorageProvider.h:
843         (WebCore::CacheStorageProvider::createCacheStorageConnection):
844         * platform/network/BlobRegistry.h:
845         * platform/network/FormData.cpp:
846         (WebCore::FormDataElement::lengthInBytes const):
847         (WebCore::FormData::lengthInBytes const):
848         * platform/network/FormData.h:
849         * testing/Internals.cpp:
850         (WebCore::Internals::clearCacheStorageMemoryRepresentation):
851         (WebCore::Internals::cacheStorageEngineRepresentation):
852         (WebCore::Internals::updateQuotaBasedOnSpaceUsage):
853         * workers/WorkerMessagingProxy.cpp:
854         (WebCore::WorkerMessagingProxy::createCacheStorageConnection):
855         * workers/service/context/ServiceWorkerThreadProxy.cpp:
856         (WebCore::ServiceWorkerThreadProxy::ServiceWorkerThreadProxy):
857         (WebCore::ServiceWorkerThreadProxy::createCacheStorageConnection):
858         * workers/service/context/ServiceWorkerThreadProxy.h:
859         * xml/XMLHttpRequest.cpp:
860         (WebCore::XMLHttpRequest::createRequest):
861
862 2019-09-18  Chris Dumez  <cdumez@apple.com>
863
864         Drop FrameLoaderClient::sessionID()
865         https://bugs.webkit.org/show_bug.cgi?id=201916
866
867         Reviewed by Geoffrey Garen.
868
869         Drop FrameLoaderClient::sessionID(). The Frame can get the sessionID from its page (Which is
870         what the FrameLoaderClient::sessionID() ended up doing) and other call sites at WebKit2 layer
871         can get the sessionID from the WebProcess singleton.
872
873         * loader/EmptyClients.cpp:
874         * loader/EmptyFrameLoaderClient.h:
875         * loader/FrameLoaderClient.h:
876         * page/Frame.cpp:
877         (WebCore::Frame::sessionID const):
878
879 2019-09-18  Chris Dumez  <cdumez@apple.com>
880
881         WebSWServerToContextConnection::PostMessageToServiceWorkerClient IPC no longer needs to take a sessionID
882         https://bugs.webkit.org/show_bug.cgi?id=201883
883
884         Reviewed by Geoffrey Garen.
885
886         WebSWServerToContextConnection::PostMessageToServiceWorkerClient IPC no longer needs to take a sessionID,
887         now that we have a single session per WebProcess.
888
889         * workers/service/ServiceWorkerClient.cpp:
890         (WebCore::ServiceWorkerClient::postMessage):
891         * workers/service/context/SWContextManager.h:
892
893 2019-09-18  Russell Epstein  <repstein@apple.com>
894
895         Unreviewed, rolling out r250030.
896
897         Cause of Recent Build Failures.
898
899         Reverted changeset:
900
901         "Make all ScriptWrappable IsoHeap-ed"
902         https://bugs.webkit.org/show_bug.cgi?id=201846
903         https://trac.webkit.org/changeset/250030
904
905 2019-09-18  Zalan Bujtas  <zalan@apple.com>
906
907         [LFC] FormattingContext::Geometry::computedHeight* functions need containingBlockHeight only.
908         https://bugs.webkit.org/show_bug.cgi?id=201880
909         <rdar://problem/55449623>
910
911         Reviewed by Antti Koivisto.
912
913         Let's tighten the incoming vertical parameter.
914
915         * layout/FormattingContext.cpp:
916         (WebCore::Layout::FormattingContext::computeOutOfFlowHorizontalGeometry):
917         (WebCore::Layout::FormattingContext::computeOutOfFlowVerticalGeometry):
918         * layout/FormattingContext.h:
919         * layout/FormattingContextGeometry.cpp:
920         (WebCore::Layout::FormattingContext::Geometry::computedHeightValue const):
921         (WebCore::Layout::FormattingContext::Geometry::computedMaxHeight const):
922         (WebCore::Layout::FormattingContext::Geometry::computedMinHeight const):
923         (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedVerticalGeometry const):
924         (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedHorizontalGeometry const):
925         (WebCore::Layout::FormattingContext::Geometry::outOfFlowHorizontalGeometry):
926         (WebCore::Layout::FormattingContext::Geometry::inlineReplacedHeightAndMargin const):
927         (WebCore::Layout::FormattingContext::Geometry::inlineReplacedWidthAndMargin const):
928
929 2019-09-18  Antti Koivisto  <antti@apple.com>
930
931         DocumentMarkerController should not invoke ensureLineBoxes during TextIterator traversal
932         https://bugs.webkit.org/show_bug.cgi?id=201911
933         <rdar://problem/55455458>
934
935         Reviewed by Zalan Bujtas.
936
937         DocumentMarkerController::addMarker may call ensureLineBoxes but TextIterator doesn't expect mutations during traversal.
938         Fix by doing range collection as a separate step.
939
940         * dom/DocumentMarkerController.cpp:
941         (WebCore::DocumentMarkerController::collectTextRanges):
942         (WebCore::DocumentMarkerController::addMarker):
943         (WebCore::DocumentMarkerController::addTextMatchMarker):
944         (WebCore::DocumentMarkerController::addDictationPhraseWithAlternativesMarker):
945         (WebCore::DocumentMarkerController::addDictationResultMarker):
946         (WebCore::DocumentMarkerController::addDraggedContentMarker):
947         (WebCore::DocumentMarkerController::addPlatformTextCheckingMarker):
948         (WebCore::DocumentMarkerController::removeMarkers):
949         (WebCore::DocumentMarkerController::filterMarkers):
950         * dom/DocumentMarkerController.h:
951
952 2019-09-18  Zalan Bujtas  <zalan@apple.com>
953
954         [LFC] Shrink-to-fit-width needs the available width constraint value only
955         https://bugs.webkit.org/show_bug.cgi?id=201896
956         <rdar://problem/55465382>
957
958         Reviewed by Antti Koivisto.
959
960         * layout/FormattingContext.h:
961         * layout/FormattingContextGeometry.cpp:
962         (WebCore::Layout::FormattingContext::Geometry::shrinkToFitWidth):
963         (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedHorizontalGeometry):
964         (WebCore::Layout::FormattingContext::Geometry::floatingNonReplacedWidthAndMargin):
965         * layout/blockformatting/BlockFormattingContextGeometry.cpp:
966         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowWidthAndMargin):
967         * layout/inlineformatting/InlineFormattingContextGeometry.cpp:
968         (WebCore::Layout::InlineFormattingContext::Geometry::inlineBlockWidthAndMargin):
969
970 2019-09-18  David Kilzer  <ddkilzer@apple.com>
971
972         REGRESSION (r247566): Leak of UICTFontDescriptor in WebCore::FontDatabase::InstalledFont::InstalledFont()
973         <https://webkit.org/b/201893>
974         <rdar://problem/55464115>
975
976         Reviewed by Brent Fulgham.
977
978         * platform/graphics/cocoa/FontCacheCoreText.cpp:
979         (WebCore::FontDatabase::InstalledFont::InstalledFont): Use
980         adoptCF() to fix the leak.
981
982 2019-09-18  Yusuke Suzuki  <ysuzuki@apple.com>
983
984         Make all ScriptWrappable IsoHeap-ed
985         https://bugs.webkit.org/show_bug.cgi?id=201846
986         <rdar://problem/55407535>
987
988         Reviewed by Mark Lam.
989
990         This patch puts Event and derived classes under IsoHeap to make all ScriptWrappable classes IsoHeap-ed.
991
992         * Modules/airplay/WebKitPlaybackTargetAvailabilityEvent.cpp:
993         * Modules/airplay/WebKitPlaybackTargetAvailabilityEvent.h:
994         (WebCore::WebKitPlaybackTargetAvailabilityEvent::create): Deleted.
995         (WebCore::WebKitPlaybackTargetAvailabilityEvent::availability const): Deleted.
996         * Modules/applepay/ApplePayPaymentAuthorizedEvent.cpp:
997         * Modules/applepay/ApplePayPaymentAuthorizedEvent.h:
998         * Modules/applepay/ApplePayPaymentMethodSelectedEvent.cpp:
999         * Modules/applepay/ApplePayPaymentMethodSelectedEvent.h:
1000         (WebCore::ApplePayPaymentMethodSelectedEvent::create): Deleted.
1001         (WebCore::ApplePayPaymentMethodSelectedEvent::paymentMethod): Deleted.
1002         * Modules/applepay/ApplePayShippingContactSelectedEvent.cpp:
1003         * Modules/applepay/ApplePayShippingContactSelectedEvent.h:
1004         * Modules/applepay/ApplePayShippingMethodSelectedEvent.cpp:
1005         * Modules/applepay/ApplePayShippingMethodSelectedEvent.h:
1006         * Modules/applepay/ApplePayValidateMerchantEvent.cpp:
1007         * Modules/applepay/ApplePayValidateMerchantEvent.h:
1008         (WebCore::ApplePayValidateMerchantEvent::create): Deleted.
1009         (WebCore::ApplePayValidateMerchantEvent::validationURL const): Deleted.
1010         * Modules/encryptedmedia/MediaKeyMessageEvent.cpp:
1011         * Modules/encryptedmedia/MediaKeyMessageEvent.h:
1012         * Modules/encryptedmedia/legacy/WebKitMediaKeyMessageEvent.cpp:
1013         * Modules/encryptedmedia/legacy/WebKitMediaKeyMessageEvent.h:
1014         (WebCore::WebKitMediaKeyMessageEvent::create): Deleted.
1015         (WebCore::WebKitMediaKeyMessageEvent::message const): Deleted.
1016         (WebCore::WebKitMediaKeyMessageEvent::destinationURL const): Deleted.
1017         * Modules/encryptedmedia/legacy/WebKitMediaKeyNeededEvent.cpp:
1018         * Modules/encryptedmedia/legacy/WebKitMediaKeyNeededEvent.h:
1019         (WebCore::WebKitMediaKeyNeededEvent::create): Deleted.
1020         (WebCore::WebKitMediaKeyNeededEvent::initData const): Deleted.
1021         * Modules/gamepad/GamepadEvent.cpp:
1022         * Modules/gamepad/GamepadEvent.h:
1023         (WebCore::GamepadEvent::create): Deleted.
1024         (WebCore::GamepadEvent::gamepad const): Deleted.
1025         * Modules/indexeddb/IDBRequestCompletionEvent.cpp:
1026         * Modules/indexeddb/IDBRequestCompletionEvent.h:
1027         (WebCore::IDBRequestCompletionEvent::create): Deleted.
1028         * Modules/indexeddb/IDBVersionChangeEvent.cpp:
1029         * Modules/indexeddb/IDBVersionChangeEvent.h:
1030         * Modules/mediarecorder/BlobEvent.cpp:
1031         * Modules/mediarecorder/BlobEvent.h:
1032         * Modules/mediarecorder/MediaRecorderErrorEvent.cpp:
1033         * Modules/mediarecorder/MediaRecorderErrorEvent.h:
1034         * Modules/mediastream/MediaStreamTrackEvent.cpp:
1035         * Modules/mediastream/MediaStreamTrackEvent.h:
1036         * Modules/mediastream/OverconstrainedErrorEvent.cpp: Copied from Source/WebCore/Modules/mediastream/RTCDataChannelEvent.h.
1037         * Modules/mediastream/OverconstrainedErrorEvent.h:
1038         (WebCore::OverconstrainedErrorEvent::create): Deleted.
1039         (WebCore::OverconstrainedErrorEvent::error const): Deleted.
1040         (WebCore::OverconstrainedErrorEvent::OverconstrainedErrorEvent): Deleted.
1041         * Modules/mediastream/RTCDTMFToneChangeEvent.cpp:
1042         * Modules/mediastream/RTCDTMFToneChangeEvent.h:
1043         * Modules/mediastream/RTCDataChannelEvent.cpp:
1044         * Modules/mediastream/RTCDataChannelEvent.h:
1045         * Modules/mediastream/RTCPeerConnectionIceEvent.cpp:
1046         * Modules/mediastream/RTCPeerConnectionIceEvent.h:
1047         (WebCore::RTCPeerConnectionIceEvent::url const): Deleted.
1048         * Modules/mediastream/RTCTrackEvent.cpp:
1049         * Modules/mediastream/RTCTrackEvent.h:
1050         (WebCore::RTCTrackEvent::receiver const): Deleted.
1051         (WebCore::RTCTrackEvent::track const): Deleted.
1052         (WebCore::RTCTrackEvent::streams const): Deleted.
1053         (WebCore::RTCTrackEvent::transceiver const): Deleted.
1054         (WebCore::RTCTrackEvent::eventInterface const): Deleted.
1055         * Modules/paymentrequest/MerchantValidationEvent.cpp:
1056         * Modules/paymentrequest/MerchantValidationEvent.h:
1057         * Modules/paymentrequest/PaymentMethodChangeEvent.cpp:
1058         * Modules/paymentrequest/PaymentMethodChangeEvent.h:
1059         * Modules/paymentrequest/PaymentRequestUpdateEvent.cpp:
1060         * Modules/paymentrequest/PaymentRequestUpdateEvent.h:
1061         * Modules/speech/SpeechSynthesisEvent.cpp:
1062         * Modules/speech/SpeechSynthesisEvent.h:
1063         (WebCore::SpeechSynthesisEvent::charIndex const): Deleted.
1064         (WebCore::SpeechSynthesisEvent::elapsedTime const): Deleted.
1065         (WebCore::SpeechSynthesisEvent::name const): Deleted.
1066         (WebCore::SpeechSynthesisEvent::eventInterface const): Deleted.
1067         * Modules/webaudio/AudioProcessingEvent.cpp:
1068         * Modules/webaudio/AudioProcessingEvent.h:
1069         * Modules/webaudio/OfflineAudioCompletionEvent.cpp:
1070         * Modules/webaudio/OfflineAudioCompletionEvent.h:
1071         * Modules/webgpu/GPUUncapturedErrorEvent.cpp:
1072         * Modules/webgpu/GPUUncapturedErrorEvent.h:
1073         * Modules/websockets/CloseEvent.cpp: Copied from Source/WebCore/dom/BeforeTextInsertedEvent.cpp.
1074         * Modules/websockets/CloseEvent.h:
1075         (WebCore::CloseEvent::create): Deleted.
1076         (WebCore::CloseEvent::wasClean const): Deleted.
1077         (WebCore::CloseEvent::code const): Deleted.
1078         (WebCore::CloseEvent::reason const): Deleted.
1079         (WebCore::CloseEvent::CloseEvent): Deleted.
1080         * Modules/webvr/VRDisplayEvent.cpp:
1081         * Modules/webvr/VRDisplayEvent.h:
1082         * Sources.txt:
1083         * WebCore.xcodeproj/project.pbxproj:
1084         * accessibility/AccessibleSetValueEvent.cpp:
1085         * accessibility/AccessibleSetValueEvent.h:
1086         (WebCore::AccessibleSetValueEvent::create): Deleted.
1087         (WebCore::AccessibleSetValueEvent::value const): Deleted.
1088         * animation/AnimationPlaybackEvent.cpp:
1089         * animation/AnimationPlaybackEvent.h:
1090         * bindings/js/ScriptWrappable.cpp: Copied from Source/WebCore/html/canvas/WebGLContextEvent.cpp.
1091         * bindings/js/ScriptWrappable.h:
1092         * dom/AnimationEvent.cpp:
1093         * dom/AnimationEvent.h:
1094         * dom/BeforeLoadEvent.cpp: Copied from Source/WebCore/dom/BeforeTextInsertedEvent.cpp.
1095         * dom/BeforeLoadEvent.h:
1096         * dom/BeforeTextInsertedEvent.cpp:
1097         * dom/BeforeTextInsertedEvent.h:
1098         * dom/BeforeUnloadEvent.cpp:
1099         * dom/BeforeUnloadEvent.h:
1100         * dom/ClipboardEvent.cpp:
1101         * dom/ClipboardEvent.h:
1102         * dom/CompositionEvent.cpp:
1103         * dom/CompositionEvent.h:
1104         * dom/CustomEvent.cpp:
1105         * dom/CustomEvent.h:
1106         * dom/DeviceMotionEvent.cpp:
1107         * dom/DeviceMotionEvent.h:
1108         * dom/DeviceOrientationEvent.cpp:
1109         * dom/DeviceOrientationEvent.h:
1110         * dom/ErrorEvent.cpp:
1111         * dom/ErrorEvent.h:
1112         * dom/Event.cpp:
1113         * dom/Event.h:
1114         * dom/FocusEvent.cpp:
1115         * dom/FocusEvent.h:
1116         * dom/HashChangeEvent.cpp: Copied from Source/WebCore/dom/BeforeTextInsertedEvent.cpp.
1117         * dom/HashChangeEvent.h:
1118         * dom/InputEvent.cpp:
1119         * dom/InputEvent.h:
1120         * dom/KeyboardEvent.cpp:
1121         * dom/KeyboardEvent.h:
1122         * dom/MessageEvent.cpp:
1123         * dom/MessageEvent.h:
1124         * dom/MouseEvent.cpp:
1125         * dom/MouseEvent.h:
1126         * dom/MouseRelatedEvent.cpp:
1127         * dom/MouseRelatedEvent.h:
1128         * dom/MutationEvent.cpp:
1129         * dom/MutationEvent.h:
1130         * dom/OverflowEvent.cpp:
1131         * dom/OverflowEvent.h:
1132         * dom/PageTransitionEvent.cpp:
1133         * dom/PageTransitionEvent.h:
1134         * dom/PointerEvent.cpp:
1135         * dom/PointerEvent.h:
1136         * dom/PopStateEvent.cpp:
1137         * dom/PopStateEvent.h:
1138         * dom/ProgressEvent.cpp:
1139         * dom/ProgressEvent.h:
1140         * dom/PromiseRejectionEvent.cpp:
1141         * dom/PromiseRejectionEvent.h:
1142         * dom/SecurityPolicyViolationEvent.cpp: Copied from Source/WebCore/dom/BeforeTextInsertedEvent.cpp.
1143         * dom/SecurityPolicyViolationEvent.h:
1144         * dom/TextEvent.cpp:
1145         * dom/TextEvent.h:
1146         * dom/TouchEvent.cpp:
1147         * dom/TouchEvent.h:
1148         * dom/TransitionEvent.cpp:
1149         * dom/TransitionEvent.h:
1150         * dom/UIEvent.cpp:
1151         * dom/UIEvent.h:
1152         * dom/UIEventWithKeyState.cpp:
1153         * dom/UIEventWithKeyState.h:
1154         * dom/WebKitAnimationEvent.cpp:
1155         * dom/WebKitAnimationEvent.h:
1156         * dom/WebKitTransitionEvent.cpp:
1157         * dom/WebKitTransitionEvent.h:
1158         * dom/WheelEvent.cpp:
1159         * dom/WheelEvent.h:
1160         * html/MediaEncryptedEvent.cpp:
1161         * html/MediaEncryptedEvent.h:
1162         * html/canvas/WebGLContextEvent.cpp:
1163         * html/canvas/WebGLContextEvent.h:
1164         * html/shadow/ProgressShadowElement.h:
1165         * html/track/TrackEvent.cpp:
1166         * html/track/TrackEvent.h:
1167         * storage/StorageEvent.cpp:
1168         * storage/StorageEvent.h:
1169         (WebCore::StorageEvent::key const): Deleted.
1170         (WebCore::StorageEvent::oldValue const): Deleted.
1171         (WebCore::StorageEvent::newValue const): Deleted.
1172         (WebCore::StorageEvent::url const): Deleted.
1173         (WebCore::StorageEvent::storageArea const): Deleted.
1174         * svg/SVGFEDistantLightElement.h:
1175         * svg/SVGFEFuncAElement.h:
1176         * svg/SVGFEFuncBElement.h:
1177         * svg/SVGFEFuncGElement.h:
1178         * svg/SVGFEFuncRElement.h:
1179         * svg/SVGFEPointLightElement.h:
1180         * svg/SVGFESpotLightElement.h:
1181         * svg/SVGZoomEvent.cpp:
1182         * svg/SVGZoomEvent.h:
1183         * workers/service/ExtendableEvent.cpp:
1184         * workers/service/ExtendableEvent.h:
1185         * workers/service/ExtendableMessageEvent.cpp:
1186         * workers/service/ExtendableMessageEvent.h:
1187         * workers/service/FetchEvent.cpp:
1188         * workers/service/FetchEvent.h:
1189         * xml/XMLHttpRequestProgressEvent.cpp: Copied from Source/WebCore/Modules/encryptedmedia/MediaKeyMessageEvent.cpp.
1190         * xml/XMLHttpRequestProgressEvent.h:
1191         (WebCore::XMLHttpRequestProgressEvent::create): Deleted.
1192         (WebCore::XMLHttpRequestProgressEvent::position const): Deleted.
1193         (WebCore::XMLHttpRequestProgressEvent::totalSize const): Deleted.
1194         (WebCore::XMLHttpRequestProgressEvent::XMLHttpRequestProgressEvent): Deleted.
1195
1196 2019-09-18  Loïc Yhuel  <loic.yhuel@softathome.com>  and  Fujii Hironori  <Hironori.Fujii@sony.com>
1197
1198         JPEGImageDecoder: use libjpeg-turbo RGBA output path even for Adobe transform=0 JPEGs
1199         https://bugs.webkit.org/show_bug.cgi?id=200163
1200
1201         Reviewed by Carlos Garcia Campos.
1202
1203         Remove the workaround for old libjpeg-turbo which doesn't support
1204         BGRA output for Adobe transform=0 images. The bug was fixed in
1205         libjpeg-turbo 1.2.1.
1206
1207         No new tests, no behavior change.
1208
1209         * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
1210         (WebCore::JPEGImageReader::decode): Removed code in #if defined(TURBO_JPEG_RGB_SWIZZLE).
1211         (colorSpaceHasAlpha): Removed an unused inline function.
1212
1213 2019-09-18  Joonghun Park  <jh718.park@samsung.com>
1214
1215         Unreviewed. Remove build warning since r248998.
1216
1217         This patch removes build warning below.
1218         warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
1219
1220         No new tests, no behavioral change.
1221
1222         * platform/image-decoders/png/PNGImageDecoder.cpp:
1223         (WebCore::PNGImageDecoder::rowAvailable):
1224
1225 2019-09-18  Fujii Hironori  <Hironori.Fujii@sony.com>
1226
1227         [cairo] Incorrect targetRect in BackingStoreBackendCairoImpl::scroll
1228         https://bugs.webkit.org/show_bug.cgi?id=201895
1229
1230         Reviewed by Carlos Garcia Campos.
1231
1232         In BackingStoreBackendCairoImpl::scroll, targetRect is calculated
1233         wrongly by shifting maxX and maxY. Bug 59655 fixed the issue by
1234         removing the shifting, but only for BackingStoreBackendCairoX11::scroll.
1235
1236         No new tests, no behavior change.
1237
1238         * platform/graphics/cairo/BackingStoreBackendCairoImpl.cpp:
1239         (WebCore::BackingStoreBackendCairoImpl::scroll): Take intersection of targetRect and scrollRect.
1240
1241 2019-09-18  Andy Estes  <aestes@apple.com>
1242
1243         [Cocoa] Add a WKA extension point
1244         https://bugs.webkit.org/show_bug.cgi?id=201801
1245         <rdar://problem/55372507>
1246
1247         Reviewed by Alexey Proskuryakov.
1248
1249         * Modules/applepay/ApplePayRequestBase.cpp:
1250         (WebCore::requiresSupportedNetworks):
1251         (WebCore::convertAndValidate):
1252
1253 2019-09-17  Chris Dumez  <cdumez@apple.com>
1254
1255         Unreviewed, revert change that Alex mistakenly committed at the same time as r250006 and broke the build.
1256
1257         * page/PerformanceObserver.idl:
1258
1259 2019-09-17  Chris Dumez  <cdumez@apple.com>
1260
1261         Stop calling Page::setSessionID() from WebKit2
1262         https://bugs.webkit.org/show_bug.cgi?id=201888
1263
1264         Reviewed by Alex Christensen.
1265
1266         Stop calling Page::setSessionID() from WebKit2 since Page's sessionID can never change when
1267         using WebKit2 (We process-swap and create a new Page in a new process when changing data
1268         store). Instead, we now pass the sessionID ID when constructing the Page, as part of the
1269         PageConfiguration structure.
1270
1271         * editing/markup.cpp:
1272         (WebCore::createPageForSanitizingWebContent):
1273         * loader/EmptyClients.cpp:
1274         (WebCore::pageConfigurationWithEmptyClients):
1275         * loader/EmptyClients.h:
1276         * page/Page.cpp:
1277         (WebCore::Page::Page):
1278         (WebCore::Page::setSessionID):
1279         * page/PageConfiguration.cpp:
1280         (WebCore::PageConfiguration::PageConfiguration):
1281         * page/PageConfiguration.h:
1282         * svg/graphics/SVGImage.cpp:
1283         (WebCore::SVGImage::dataChanged):
1284         * workers/service/context/ServiceWorkerThreadProxy.cpp:
1285         (WebCore::createPageForServiceWorker):
1286         (WebCore::ServiceWorkerThreadProxy::ServiceWorkerThreadProxy):
1287
1288 2019-09-17  Mark Lam  <mark.lam@apple.com>
1289
1290         Use constexpr instead of const in symbol definitions that are obviously constexpr.
1291         https://bugs.webkit.org/show_bug.cgi?id=201879
1292
1293         Rubber-stamped by Joseph Pecoraro.
1294
1295         No new tests.  Covered by existing tests.
1296
1297         * bindings/js/JSDOMConstructorBase.h:
1298         * bindings/js/JSDOMWindowProperties.h:
1299         * bindings/scripts/CodeGeneratorJS.pm:
1300         (GenerateHeader):
1301         (GeneratePrototypeDeclaration):
1302         * bindings/scripts/test/JS/JSTestActiveDOMObject.h:
1303         * bindings/scripts/test/JS/JSTestEnabledBySetting.h:
1304         * bindings/scripts/test/JS/JSTestEnabledForContext.h:
1305         * bindings/scripts/test/JS/JSTestEventTarget.h:
1306         * bindings/scripts/test/JS/JSTestGlobalObject.h:
1307         * bindings/scripts/test/JS/JSTestIndexedSetterNoIdentifier.h:
1308         * bindings/scripts/test/JS/JSTestIndexedSetterThrowingException.h:
1309         * bindings/scripts/test/JS/JSTestIndexedSetterWithIdentifier.h:
1310         * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterNoIdentifier.h:
1311         * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterThrowingException.h:
1312         * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterWithIdentifier.h:
1313         * bindings/scripts/test/JS/JSTestNamedDeleterNoIdentifier.h:
1314         * bindings/scripts/test/JS/JSTestNamedDeleterThrowingException.h:
1315         * bindings/scripts/test/JS/JSTestNamedDeleterWithIdentifier.h:
1316         * bindings/scripts/test/JS/JSTestNamedDeleterWithIndexedGetter.h:
1317         * bindings/scripts/test/JS/JSTestNamedGetterCallWith.h:
1318         * bindings/scripts/test/JS/JSTestNamedGetterNoIdentifier.h:
1319         * bindings/scripts/test/JS/JSTestNamedGetterWithIdentifier.h:
1320         * bindings/scripts/test/JS/JSTestNamedSetterNoIdentifier.h:
1321         * bindings/scripts/test/JS/JSTestNamedSetterThrowingException.h:
1322         * bindings/scripts/test/JS/JSTestNamedSetterWithIdentifier.h:
1323         * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetter.h:
1324         * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetterAndSetter.h:
1325         * bindings/scripts/test/JS/JSTestNamedSetterWithOverrideBuiltins.h:
1326         * bindings/scripts/test/JS/JSTestNamedSetterWithUnforgableProperties.h:
1327         * bindings/scripts/test/JS/JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins.h:
1328         * bindings/scripts/test/JS/JSTestObj.h:
1329         * bindings/scripts/test/JS/JSTestOverrideBuiltins.h:
1330         * bindings/scripts/test/JS/JSTestPluginInterface.h:
1331         * bindings/scripts/test/JS/JSTestTypedefs.h:
1332         * bridge/objc/objc_runtime.h:
1333         * bridge/runtime_array.h:
1334         * bridge/runtime_method.h:
1335         * bridge/runtime_object.h:
1336
1337 2019-09-17  Ross Kirsling  <ross.kirsling@sony.com>
1338
1339         Unreviewed restabilization of non-unified build.
1340
1341         * inspector/InspectorCanvas.cpp:
1342         (WebCore::InspectorCanvas::resolveContext const):
1343         * platform/win/BString.h:
1344         * svg/PatternAttributes.h:
1345         * svg/SVGLengthValue.cpp:
1346         * svg/properties/SVGAnimationAdditiveValueFunctionImpl.h:
1347         * workers/service/ServiceWorkerJob.cpp:
1348         * workers/service/WorkerSWClientConnection.cpp:
1349         * workers/service/server/SWServerRegistration.cpp:
1350
1351 2019-09-17  Keith Rollin  <krollin@apple.com>
1352
1353         Remove some support for < iOS 12
1354         https://bugs.webkit.org/show_bug.cgi?id=201851
1355         <rdar://problem/55422044>
1356
1357         Reviewed by Jiewen Tan and Alexey Proskuryakov.
1358
1359         Remove some support for iOS versions less than 12.0.
1360
1361         Update conditionals that reference __IPHONE_OS_VERSION_MIN_REQUIRED
1362         and __IPHONE_OS_VERSION_MAX_ALLOWED, assuming that they both have
1363         values >= 120000. This means that expressions like
1364         "__IPHONE_OS_VERSION_MIN_REQUIRED < 101200" are always False and
1365         "__IPHONE_OS_VERSION_MIN_REQUIRED >= 101200" are always True.
1366
1367         This removal is part of a series of patches effecting such removal.
1368
1369         No new tests -- no new or changed functionality.
1370
1371         * crypto/mac/CryptoKeyRSAMac.cpp:
1372         (WebCore::CryptoKeyRSA::create):
1373         (WebCore::castDataArgumentToCCRSACryptorCreateFromDataIfNeeded): Deleted.
1374
1375 2019-09-17  Nikolas Zimmermann  <zimmermann@kde.org>
1376
1377         SVG <animateMotion> does not reset the element to its first animation frame if its fill is "remove"
1378         https://bugs.webkit.org/show_bug.cgi?id=201565
1379
1380         Reviewed by Said Abou-Hallawa.
1381
1382         Fix fill="remove" support for <animateMotion>: properly trigger visual updates.
1383         Motion animations are implemented by provding an additional transformation on
1384         SVGGraphicsElements: the supplementalTransform().
1385
1386         When an <animateMotion> element specifies fill="remove" the supplemental transform is
1387         correctly reset, when the animation is finished. However, nobody is notified about the
1388         change of transformation matrix. Fix by marking the target elements renderer as
1389         setNeedsTransformUpdate() and call markForLayoutAndParentResourceInvalidation().
1390
1391         <animate> elements are not affected by the bug:
1392         SVGAnimateElementBase::clearAnimatedType()
1393          -> invokes SVGAttributeAnimator::stop()
1394             -> invokes applyAnimatedPropertyChange() [via SVGAnimatedPropertyAnimator]
1395             -> invokes SVGXXXElement::svgAttributeChanged().
1396
1397         When animating e.g. the 'transform' attribute SVGGraphicsElement::svgAttributeChanged()
1398         will use exactly the same mechanism to trigger visul updates: first call
1399         setNeedsTransformUpdate() on the associated renderer, followd by a call to
1400         markForLayoutAndParentResourceInvalidation().
1401
1402         --> Both code paths are now consistent.
1403         Also fixes http://web-platform-tests.live/svg/animations/animateMotion-fill-remove.html.
1404
1405         Tests: svg/animations/fill-remove-support.html
1406                svg/animations/animateMotion-remove-freeze-use.svg
1407
1408         * svg/SVGAnimateMotionElement.cpp:
1409         (WebCore::SVGAnimateMotionElement::clearAnimatedType): Call applyResultsToTarget().
1410         (WebCore::SVGAnimateMotionElement::calculateAnimatedValue): Stop calling
1411         setNeedsTransformUpdate() on the target elements renderer, since applyResultsToTarget()
1412         is responsible for modifications of the renderer state.
1413         (WebCore::SVGAnimateMotionElement::applyResultsToTarget): Always mark the renderer
1414         as setNeedsTransformUpdate() when applying the results, before the call to
1415         RenderSVGResource::markForLayoutAndParentResourceInvalidation(). This is more consistent
1416         with respect to the code path that updates the SVGElements instances (<use> support).
1417
1418 2019-09-17  Andy Estes  <aestes@apple.com>
1419
1420         [Cocoa] Add a WKA extension point
1421         https://bugs.webkit.org/show_bug.cgi?id=201801
1422         <rdar://problem/55372507>
1423
1424         Reviewed by Alexey Proskuryakov.
1425
1426         * Modules/applepay/ApplePayRequestBase.cpp:
1427         (WebCore::requiresSupportedNetworks):
1428         (WebCore::convertAndValidate):
1429
1430 2019-09-17  Antti Koivisto  <antti@apple.com>
1431
1432         TextIterator should convert tabs to spaces
1433         https://bugs.webkit.org/show_bug.cgi?id=201863
1434
1435         Reviewed by Zalan Bujtas.
1436
1437         As seen in tests
1438
1439         imported/w3c/web-platform-tests/innerText/getter.html
1440         imported/w3c/web-platform-tests/html/dom/elements/the-innertext-idl-attribute/getter.html
1441
1442         The old simple line layout path in TextIterator used to do this.
1443
1444         * editing/TextIterator.cpp:
1445         (WebCore::TextIterator::handleTextBox):
1446
1447 2019-09-17  Zalan Bujtas  <zalan@apple.com>
1448
1449         [LFC[MarginCollapsing] MarginCollapse::estimatedMarginBefore should take pre-computed non-collapsed margin values.
1450         https://bugs.webkit.org/show_bug.cgi?id=201848
1451         <rdar://problem/55419419>
1452
1453         Reviewed by Antti Koivisto.
1454
1455         This is in preparation for using constraint values instead of querying the display tree for containing block geometry information.
1456         See webkit.org/b/201795
1457
1458         * layout/blockformatting/BlockFormattingContext.cpp:
1459         (WebCore::Layout::BlockFormattingContext::computeEstimatedVerticalPosition):
1460         * layout/blockformatting/BlockFormattingContext.h:
1461         * layout/blockformatting/BlockMarginCollapse.cpp:
1462         (WebCore::Layout::BlockFormattingContext::MarginCollapse::positiveNegativeMarginBefore):
1463         (WebCore::Layout::BlockFormattingContext::MarginCollapse::positiveNegativeMarginAfter):
1464         (WebCore::Layout::BlockFormattingContext::MarginCollapse::estimatedMarginBefore):
1465         (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginBeforeIgnoringCollapsingThrough):
1466         (WebCore::Layout::BlockFormattingContext::MarginCollapse::collapsedVerticalValues):
1467
1468 2019-09-17  Zalan Bujtas  <zalan@apple.com>
1469
1470         [First-letter] Use WeakPtr for the first-letter insertion point.
1471         https://bugs.webkit.org/show_bug.cgi?id=201842
1472         <rdar://problem/51373788>
1473
1474         Reviewed by Antti Koivisto.
1475
1476         The about-to-be-removed first letter renderer's sibling could potentially be destroyed too as the result of the anonymous subtree collapsing logic (when the next sibling is a generated anonymous block and it is not needed anymore.)
1477
1478         Test: fast/text/first-letter-with-columns-crash.html
1479
1480         * rendering/updating/RenderTreeBuilderFirstLetter.cpp:
1481         (WebCore::RenderTreeBuilder::FirstLetter::updateStyle):
1482
1483 2019-09-17  Carlos Garcia Campos  <cgarcia@igalia.com>
1484
1485         [GTK] Cannot create EGL window surface: EGL_BAD_ALLOC
1486         https://bugs.webkit.org/show_bug.cgi?id=201505
1487
1488         Reviewed by Žan Doberšek.
1489
1490         This happens because eglCreateWindowSurface() is called twice for the same window when not using the WPE
1491         renderer. New versions of Mesa fail the second time with a EGL_BAD_ALLOC.
1492
1493         * platform/graphics/egl/GLContextEGL.cpp:
1494         (WebCore::GLContextEGL::createWindowContext): Check surface is nullptr before falling back to use
1495         eglCreateWindowSurface().
1496
1497 2019-09-17  Jiewen Tan  <jiewen_tan@apple.com>
1498
1499         [WebAuthn] Use WebPreferences instead of RuntimeEnabledFeatures in UIProcess
1500         https://bugs.webkit.org/show_bug.cgi?id=198176
1501         <rdar://problem/55285709>
1502
1503         Reviewed by Youenn Fablet.
1504
1505         No changes of behavior.
1506
1507         * Modules/webauthn/PublicKeyCredential.cpp:
1508         (WebCore::PublicKeyCredential::isUserVerifyingPlatformAuthenticatorAvailable):
1509         Resolves the promise with false immediately when the feature flag is false.
1510
1511 2019-09-17  Rob Buis  <rbuis@igalia.com>
1512
1513         Access-Control-Expose-Headers parsed incorrectly
1514         https://bugs.webkit.org/show_bug.cgi?id=172357
1515
1516         Reviewed by Youenn Fablet.
1517
1518         When parsing the list, strip HTTP spaces and verify
1519         that the list items are valid HTTP tokens.
1520
1521         Behavior matches Firefox and Chrome.
1522
1523         Test: imported/w3c/web-platform-tests/cors/access-control-expose-headers-parsing.window.html
1524
1525         * platform/network/HTTPParsers.h:
1526         (WebCore::addToAccessControlAllowList):
1527         (WebCore::parseAccessControlAllowList):
1528
1529 2019-09-17  Youenn Fablet  <youenn@apple.com>
1530
1531         Content-Type should be preserved on responses created from DOMCache
1532         https://bugs.webkit.org/show_bug.cgi?id=201815
1533
1534         Reviewed by Alex Christensen.
1535
1536        Covered by updated test expectations
1537
1538         * Modules/fetch/FetchResponse.cpp:
1539         (WebCore::FetchResponse::create):
1540         Update content type when creating the response from DOMCache.
1541
1542 2019-09-16  Antti Koivisto  <antti@apple.com>
1543
1544         Move code for traversing reversed text boxes from TextIterator to TextBoxIterator
1545         https://bugs.webkit.org/show_bug.cgi?id=201819
1546
1547         Reviewed by Zalan Bujtas.
1548
1549         Handle traversal order in TextBoxIterator.
1550
1551         * editing/TextIterator.cpp:
1552         (WebCore::TextIterator::handleTextNode):
1553         (WebCore::TextIterator::handleTextBox):
1554         (WebCore::TextIterator::handleTextNodeFirstLetter):
1555         * editing/TextIterator.h:
1556         * rendering/line/LineLayoutInterfaceTextBoxes.cpp:
1557         (WebCore::LineLayoutInterface::TextBox::rect const):
1558         (WebCore::LineLayoutInterface::TextBox::logicalRect const):
1559         (WebCore::LineLayoutInterface::TextBox::hasHyphen const):
1560         (WebCore::LineLayoutInterface::TextBox::isLeftToRightDirection const):
1561         (WebCore::LineLayoutInterface::TextBox::dirOverride const):
1562         (WebCore::LineLayoutInterface::TextBox::text const):
1563         (WebCore::LineLayoutInterface::TextBox::localStartOffset const):
1564         (WebCore::LineLayoutInterface::TextBox::localEndOffset const):
1565         (WebCore::LineLayoutInterface::TextBox::length const):
1566         (WebCore::LineLayoutInterface::TextBoxIterator::TextBoxIterator):
1567         (WebCore::LineLayoutInterface::TextBoxIterator::traverseNextInVisualOrder):
1568         (WebCore::LineLayoutInterface::TextBoxIterator::traverseNextInTextOrder):
1569         (WebCore::LineLayoutInterface::TextBoxIterator::operator== const):
1570         (WebCore::LineLayoutInterface::TextBoxIterator::atEnd const):
1571         (WebCore::LineLayoutInterface::Provider::firstTextBoxInVisualOrderFor):
1572         (WebCore::LineLayoutInterface::Provider::firstTextBoxInTextOrderFor):
1573         (WebCore::LineLayoutInterface::Provider::textBoxRangeFor):
1574         * rendering/line/LineLayoutInterfaceTextBoxes.h:
1575         (WebCore::LineLayoutInterface::TextBoxIterator::TextBoxIterator):
1576         (WebCore::LineLayoutInterface::TextBoxIterator::operator++):
1577         (WebCore::LineLayoutInterface::Provider::firstTextBoxFor):
1578
1579 2019-09-16  Fujii Hironori  <Hironori.Fujii@sony.com>
1580
1581         [WinCairo][curl] Don't compile unused CertificateCFWin.cpp
1582         https://bugs.webkit.org/show_bug.cgi?id=201860
1583
1584         Reviewed by Alex Christensen.
1585
1586         Curl port is using ResourceHandle::setClientCertificateInfo
1587         instead of ResourceHandle::setClientCertificate.
1588
1589         * PlatformWin.cmake: Added CertificateCFWin.cpp to WebCore_SOURCES only if USE_CFURLCONNECTION.
1590         * platform/network/ResourceHandle.h: Removed an unused method setClientCertificate.
1591         * platform/network/curl/ResourceHandleCurl.cpp:
1592         (WebCore::ResourceHandle::setClientCertificate): Deleted.
1593
1594 2019-09-16  Fujii Hironori  <Hironori.Fujii@sony.com>
1595
1596         [AppleWin] Assertion failure in defaultSupportedImageTypes in UTIRegistry.cpp
1597         https://bugs.webkit.org/show_bug.cgi?id=198286
1598
1599         Reviewed by Brent Fulgham.
1600
1601         Some image types aren't supported by CG for Windows.
1602
1603         No new tests, covered by existing tests.
1604
1605         * platform/graphics/cg/ImageSourceCGWin.cpp:
1606         (WebCore::MIMETypeForImageType): Return the correct MIME types for
1607         com.microsoft.cur and com.microsoft.ico.
1608         * platform/graphics/cg/UTIRegistry.cpp:
1609         (WebCore::defaultSupportedImageTypes): Excluded public.jpeg-2000 and public.mpo-image if PLATFORM(WIN).
1610
1611 2019-09-16  Fujii Hironori  <Hironori.Fujii@sony.com>
1612
1613         [Cairo] Image::drawTiled → Cairo::drawSurface → cairo_paint_with_alpha → segfault happens in pixman
1614         https://bugs.webkit.org/show_bug.cgi?id=201755
1615
1616         Reviewed by Don Olmstead.
1617
1618         Segmentation faults happened in pixman while painting a image. In
1619         Cairo::drawSurface, originalSrcRect can be slightly larger than
1620         the surface size because of floating number calculations.
1621         Cairo::drawSurface created a subsurface which is running over the
1622         parent surface boundaries.
1623
1624         * platform/graphics/cairo/CairoOperations.cpp:
1625         (WebCore::Cairo::drawSurface): Calculated a intersection with
1626         expandedSrcRect and the parent surface size for subsurface size.
1627
1628 2019-09-16  Eric Liang  <ericliang@apple.com>
1629
1630         AX: USER: VO: Messages > Message > Shift-VO-M doesn't reveal correct actions
1631         https://bugs.webkit.org/show_bug.cgi?id=201840
1632
1633         Reviewed by Chris Fleizach.
1634
1635         menuForEvent: expects event-position in window's space, but we pass the position in Core's space. In this case, we need to convert core's space to window's space.
1636         Tested that existing tests passed with WK1 and WK2
1637
1638         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
1639         (-[WebAccessibilityObjectWrapper accessibilityShowContextMenu]):
1640
1641 2019-09-16  Jiewen Tan  <jiewen_tan@apple.com>
1642
1643         [WebAuthn] Support more than two FIDO protocol versions
1644         https://bugs.webkit.org/show_bug.cgi?id=198408
1645         <rdar://problem/51292176>
1646
1647         Reviewed by Chris Dumez.
1648
1649         Covered by new API tests.
1650
1651         * Modules/webauthn/fido/DeviceResponseConverter.cpp:
1652         (fido::readCTAPGetInfoResponse):
1653         Remove the check for the array size.
1654
1655 2019-09-16  Brent Fulgham  <bfulgham@apple.com>
1656
1657         [FTW] Correct lifespan of other SharedBitmaps
1658         https://bugs.webkit.org/show_bug.cgi?id=201800
1659
1660         Reviewed by Dean Jackson.
1661
1662         The pop-up menu code creates its own SharedBitmap in the WebContent process,
1663         which needs to release its handle before destruction, otherwise the UIProcess
1664         will be unable to access the GPU texture (since it will have been cleaned up).
1665
1666         This patch also audits other uses of SharedBitmap to make sure a similar
1667         problem doesn't exist elsewhere.
1668
1669         * platform/graphics/win/Direct2DUtilities.cpp:
1670         (WebCore::Direct2D::toDXGIDevice): Switch to IDXGIDevice1 (since that is our
1671         minimum target DX).
1672         (WebCore::Direct2D::factoryForDXGIDevice): Ditto.
1673         (WebCore::Direct2D::swapChainOfSizeForWindowAndDevice): Added.
1674         * platform/graphics/win/Direct2DUtilities.h:
1675         * platform/graphics/win/GraphicsContextDirect2D.cpp:
1676         (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate): Correct
1677         a very silly use-after-move in the implementation.
1678         * platform/graphics/win/PlatformContextDirect2D.h:
1679         (WebCore::PlatformContextDirect2D::d3dDevice const): Added.
1680         (WebCore::PlatformContextDirect2D::setD3DDevice):
1681
1682 2019-09-16  Chris Dumez  <cdumez@apple.com>
1683
1684         Simplify WebResourceLoadObserver now that we have one WebProcess per session
1685         https://bugs.webkit.org/show_bug.cgi?id=201821
1686
1687         Reviewed by Brent Fulgham.
1688
1689         * Modules/websockets/WebSocket.cpp:
1690         (WebCore::WebSocket::connect):
1691         * loader/ResourceLoadObserver.h:
1692         (WebCore::ResourceLoadObserver::logWebSocketLoading):
1693         (WebCore::ResourceLoadObserver::statisticsForURL):
1694         * testing/Internals.cpp:
1695         (WebCore::Internals::resourceLoadStatisticsForURL):
1696
1697 2019-09-16  ChangSeok Oh  <changseok@webkit.org>
1698
1699         [GTK] Remove GraphicsContext3D dependency from the outside of WebGL
1700         https://bugs.webkit.org/show_bug.cgi?id=201748
1701
1702         Reviewed by Alex Christensen.
1703
1704         This is a preliminary change to bring ANGLE support for WebGL to GTK port.
1705         GraphicsContext3DANGLE has its own egl context but we want to make ANGLE egl context
1706         for WebGL and other GL contexts (i.e., glx, gles/egl) for TextureMapper live together.
1707         Mixed uses of GraphicsContext3D outside of WebGL code could cause unintended behaviors.
1708         We want to make sure that only WebGL code uses it.
1709
1710         No new tests since no functionality changed.
1711
1712         * platform/graphics/GLContext.cpp:
1713         * platform/graphics/GLContext.h:
1714         * platform/graphics/glx/GLContextGLX.cpp:
1715         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
1716         (WebCore::GstVideoFrameHolder::platformLayerBuffer):
1717         (WebCore::MediaPlayerPrivateGStreamerBase::nativeImageForCurrentTime):
1718         * platform/graphics/gstreamer/VideoTextureCopierGStreamer.cpp:
1719
1720 2019-09-16  Zalan Bujtas  <zalan@apple.com>
1721
1722         [LFC] Make the nested Geometry/MarginCollapse/Quirks c'tors private.
1723         https://bugs.webkit.org/show_bug.cgi?id=201825
1724         <rdar://problem/55403474>
1725
1726         Reviewed by Antti Koivisto.
1727
1728         The Geometry/MarginCollapse/Quirks objects should be constructed through the corresponding accessor functions.
1729         This is also a preparation for being able to pass the layout box in to these stack objects and call geometry(layoutBox)->outOfFlowVerticalGeometry() vs. geometry()->outOfFlowVerticalGeometry(layoutBox). 
1730
1731         * layout/FormattingContext.h:
1732         * layout/blockformatting/BlockFormattingContext.h:
1733         * layout/blockformatting/BlockFormattingContextGeometry.cpp:
1734         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedHeightAndMargin):
1735         * layout/blockformatting/BlockFormattingContextQuirks.cpp:
1736         (WebCore::Layout::BlockFormattingContext::Quirks::stretchedInFlowHeight):
1737         * layout/inlineformatting/InlineFormattingContext.h:
1738         * layout/tableformatting/TableFormattingContext.h:
1739
1740 2019-09-16  Jon Davis  <jond@apple.com>
1741
1742         Update feature status for Battery Status API, WebGL 2, and Dialog Element
1743         https://bugs.webkit.org/show_bug.cgi?id=201469
1744
1745         Reviewed by Joseph Pecoraro.
1746
1747         * features.json:
1748
1749 2019-09-16  Andres Gonzalez  <andresg_22@apple.com>
1750
1751         Rename [WebAccessibilityObjectWrapper _accessibilityInsertText] to accessibilityInsertText to match accessibility client.
1752         https://bugs.webkit.org/show_bug.cgi?id=201820
1753
1754         Reviewed by Chris Fleizach.
1755
1756         No new tests necessary since this is a method rename.
1757
1758         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
1759         (-[WebAccessibilityObjectWrapper accessibilityInsertText:]):
1760         (-[WebAccessibilityObjectWrapper _accessibilityInsertText:]): Deleted.
1761         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
1762         (-[WebAccessibilityObjectWrapper accessibilityInsertText:]):
1763         (-[WebAccessibilityObjectWrapper _accessibilityInsertText:]): Deleted.
1764
1765 2019-09-16  Zalan Bujtas  <zalan@apple.com>
1766
1767         [LFC] Always provide a containing block width value to compute* functions.
1768         https://bugs.webkit.org/show_bug.cgi?id=201809
1769         <rdar://problem/55383153>
1770
1771         Reviewed by Antti Koivisto.
1772
1773         The caller can always make a more informative decision about the default value when the containing block width is not available.
1774         (Currently the only case is when computing the preferred width.)
1775
1776         * layout/FormattingContext.cpp:
1777         (WebCore::Layout::FormattingContext::computeBorderAndPadding):
1778         * layout/FormattingContextGeometry.cpp:
1779         (WebCore::Layout::FormattingContext::Geometry::shrinkToFitWidth):
1780         (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedVerticalGeometry const):
1781         (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedHorizontalGeometry):
1782         (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedVerticalGeometry const):
1783         (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedHorizontalGeometry const):
1784         (WebCore::Layout::FormattingContext::Geometry::floatingNonReplacedWidthAndMargin):
1785         (WebCore::Layout::FormattingContext::Geometry::floatingReplacedWidthAndMargin const):
1786         (WebCore::Layout::FormattingContext::Geometry::inlineReplacedHeightAndMargin const):
1787         (WebCore::Layout::FormattingContext::Geometry::inlineReplacedWidthAndMargin const):
1788         (WebCore::Layout::FormattingContext::Geometry::inFlowPositionedPositionOffset const):
1789         (WebCore::Layout::FormattingContext::Geometry::computedPadding const):
1790         (WebCore::Layout::FormattingContext::Geometry::computedHorizontalMargin const):
1791         (WebCore::Layout::FormattingContext::Geometry::computedVerticalMargin const):
1792         * layout/LayoutUnits.h:
1793         (WebCore::Layout::UsedHorizontalValues::UsedHorizontalValues):
1794         * layout/blockformatting/BlockFormattingContextGeometry.cpp:
1795         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedHeightAndMargin):
1796         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedWidthAndMargin const):
1797         * layout/inlineformatting/InlineFormattingContext.cpp:
1798         (WebCore::Layout::InlineFormattingContext::computedIntrinsicWidthConstraints):
1799         (WebCore::Layout::InlineFormattingContext::computeIntrinsicWidthForFormattingRoot):
1800         (WebCore::Layout::InlineFormattingContext::layoutFormattingContextRoot):
1801         (WebCore::Layout::InlineFormattingContext::computeWidthAndHeightForReplacedInlineBox):
1802         * layout/inlineformatting/InlineFormattingContextGeometry.cpp:
1803         (WebCore::Layout::InlineFormattingContext::Geometry::inlineBlockWidthAndMargin):
1804
1805 2019-09-16  Zalan Bujtas  <zalan@apple.com>
1806
1807         [LFC][BFC] BlockFormattingContext::Geometry::inFlowNonReplacedHeightAndMargin should not read containing block's width
1808         https://bugs.webkit.org/show_bug.cgi?id=201807
1809         <rdar://problem/55381342>
1810
1811         Reviewed by Antti Koivisto.
1812
1813         This is in preparation for using constraint values instead of querying the display tree for containing block geometry information.
1814         See webkit.org/b/201795
1815
1816         * layout/blockformatting/BlockFormattingContext.h:
1817         * layout/blockformatting/BlockFormattingContextGeometry.cpp:
1818         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedHeightAndMargin):
1819         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedWidthAndMargin const):
1820         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowHeightAndMargin):
1821
1822 2019-09-16  Antti Koivisto  <antti@apple.com>
1823
1824         Eliminate separate simple line layout path from TextIterator
1825         https://bugs.webkit.org/show_bug.cgi?id=201760
1826
1827         Reviewed by Zalan Bujtas.
1828
1829         Use the new line layout iterator to implement linebox traversal in TextIterator.
1830
1831         * WebCore.xcodeproj/project.pbxproj:
1832         * editing/TextIterator.cpp:
1833         (WebCore::TextIterator::advance):
1834         (WebCore::TextIterator::handleTextNode):
1835         (WebCore::TextIterator::handleTextBox):
1836
1837         InlineTextBox* -> LineLayoutInterface::TextBoxIterator
1838         Delete the seperate simple line layout path.
1839
1840         (WebCore::TextIterator::handleTextNodeFirstLetter):
1841         (WebCore::TextIterator::emitCharacter):
1842         (WebCore::TextIterator::emitText):
1843         * editing/TextIterator.h:
1844         * rendering/RenderTreeAsText.cpp:
1845         (WebCore::RenderTreeAsText::writeRenderObject):
1846         (WebCore::write):
1847         * rendering/SimpleLineLayoutResolver.cpp:
1848         (WebCore::SimpleLineLayout::RunResolver::Iterator::Iterator):
1849         (WebCore::SimpleLineLayout::RunResolver::Iterator::advanceLines):
1850         * rendering/SimpleLineLayoutResolver.h:
1851         (WebCore::SimpleLineLayout::RunResolver::Iterator::resolver const):
1852         (WebCore::SimpleLineLayout::RunResolver::Iterator::inQuirksMode const):
1853         (WebCore::SimpleLineLayout::RunResolver::Iterator::operator== const):
1854         (WebCore::SimpleLineLayout::RunResolver::Iterator::simpleRun const):
1855
1856         Make RunResolver::Iterator copyable (so TextBoxIterator becomes copyable too).
1857
1858         * rendering/SimpleLineLayoutTextFragmentIterator.cpp:
1859         (WebCore::SimpleLineLayout::TextFragmentIterator::findNextTextFragment):
1860         * rendering/line/LineLayoutInterfaceTextBoxes.cpp:
1861         (WebCore::LineLayoutInterface::TextBox::rect const):
1862         (WebCore::LineLayoutInterface::TextBox::logicalRect const):
1863         (WebCore::LineLayoutInterface::TextBox::hasHyphen const):
1864         (WebCore::LineLayoutInterface::TextBox::isLeftToRightDirection const):
1865         (WebCore::LineLayoutInterface::TextBox::dirOverride const):
1866         (WebCore::LineLayoutInterface::TextBox::text const):
1867         (WebCore::LineLayoutInterface::TextBox::localStartOffset const):
1868         (WebCore::LineLayoutInterface::TextBox::localEndOffset const):
1869         (WebCore::LineLayoutInterface::TextBox::length const):
1870
1871         Add offset and length functions.
1872
1873         (WebCore::LineLayoutInterface::TextBox::iterator const):
1874         (WebCore::LineLayoutInterface::TextBoxIterator::TextBoxIterator):
1875         (WebCore::LineLayoutInterface::TextBoxIterator::traverseNext):
1876         (WebCore::LineLayoutInterface::TextBoxIterator::operator== const):
1877         (WebCore::LineLayoutInterface::TextBoxIterator::atEnd const):
1878         (WebCore::LineLayoutInterface::Provider::firstTextBoxFor):
1879         (WebCore::LineLayoutInterface::Provider::textBoxRangeFor):
1880         (WebCore::LineLayoutInterface::Provider::iteratorForInlineTextBox):
1881
1882         Add Provider class for making iterators. It constructs and keeps SimpleLineLayout::Resolvers alive during traversal as needed.
1883
1884         * rendering/line/LineLayoutInterfaceTextBoxes.h:
1885         (WebCore::LineLayoutInterface::TextBoxIterator::TextBoxIterator):
1886         (WebCore::LineLayoutInterface::TextBoxIterator::operator bool const):
1887         (WebCore::LineLayoutInterface::TextBoxIterator::operator== const):
1888         (WebCore::LineLayoutInterface::TextBoxIterator::operator!= const):
1889         (WebCore::LineLayoutInterface::TextBoxIterator::operator* const):
1890         (WebCore::LineLayoutInterface::TextBoxIterator::operator-> const):
1891
1892         Make TextBoxIterator privately inherit TextBox. This way we don't need to construct temporaries and can easily implement operator->.
1893
1894         (WebCore::LineLayoutInterface::TextBoxRange::TextBoxRange):
1895         (WebCore::LineLayoutInterface::TextBoxRange::begin const):
1896         (WebCore::LineLayoutInterface::TextBoxRange::end const):
1897
1898         Use separate end() type of C++17 ranges.
1899
1900 2019-09-16  Andres Gonzalez  <andresg_22@apple.com>
1901
1902         Expose misspelling ranges for editable content to accessibility clients.
1903         https://bugs.webkit.org/show_bug.cgi?id=201752
1904         <rdar://problem/49556828>
1905
1906         Reviewed by Chris Fleizach.
1907
1908         Test: accessibility/misspelling-range.html
1909
1910         Added [WebAccessibilityObjectWrapper misspellingTextMarkerRange] and
1911         underlying AccessibilityObject implementation to expose misspellings to
1912         accessibility clients that provide an alternative user interface to
1913         spell checking.
1914         * accessibility/AccessibilityObject.cpp:
1915         (WebCore::AccessibilityObject::getMisspellingRange const):
1916         * accessibility/AccessibilityObject.h:
1917         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
1918         (-[WebAccessibilityObjectWrapper misspellingTextMarkerRange:direction:]):
1919         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
1920         (accessibilityMisspellingSearchCriteriaForParameterizedAttribute):
1921         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):
1922
1923 2019-09-15  Andy Estes  <aestes@apple.com>
1924
1925         [WebIDL] Derived dictionaries should inherit their inherited dictionaries' partials
1926         https://bugs.webkit.org/show_bug.cgi?id=201802
1927
1928         Reviewed by Sam Weinig.
1929
1930         Prior to this change, a dictionary D that inherits from dictionary B would not inherit B's
1931         partial dictionaries. Fixed this by moving supplemental dependencies processing from
1932         generate-bindings.pl to CodeGenerator.pm and reusing it in GetDictionaryByType.
1933
1934         Added new bindings tests.
1935
1936         * bindings/scripts/CodeGenerator.pm:
1937         (new):
1938         (ProcessDocument):
1939         (ProcessSupplementalDependencies):
1940         (shouldPropertyBeExposed):
1941         (GetDictionaryByType):
1942         * bindings/scripts/generate-bindings.pl:
1943         (generateBindings):
1944         (shouldPropertyBeExposed): Deleted.
1945         * bindings/scripts/test/JS/JSTestDerivedDictionary.cpp: Added.
1946         (WebCore::convertDictionary<TestDerivedDictionary>):
1947         (WebCore::convertDictionaryToJS):
1948         * bindings/scripts/test/JS/JSTestDerivedDictionary.h: Added.
1949         * bindings/scripts/test/JS/JSTestInheritedDictionary.cpp: Added.
1950         (WebCore::convertDictionary<TestInheritedDictionary>):
1951         (WebCore::convertDictionaryToJS):
1952         * bindings/scripts/test/JS/JSTestInheritedDictionary.h: Added.
1953         * bindings/scripts/test/TestDerivedDictionary.idl: Added.
1954         * bindings/scripts/test/TestInheritedDictionary.idl: Added.
1955         * bindings/scripts/test/TestSupplemental.idl:
1956
1957 2019-09-15  David Kilzer  <ddkilzer@apple.com>
1958
1959         Missing call to [self init] in -[WebScrollbarPartAnimation initWithScrollbar:featureToAnimate:animateFrom:animateTo:duration:]
1960         <https://webkit.org/b/201806>
1961
1962         Reviewed by Simon Fraser.
1963
1964         * platform/mac/ScrollAnimatorMac.mm:
1965         (-[WebScrollbarPartAnimation initWithScrollbar:featureToAnimate:animateFrom:animateTo:duration:]):
1966         Call [self init] and return early if the result is nil.
1967
1968 2019-09-14  Justin Fan  <justin_fan@apple.com>
1969
1970         [WebGPU] Make WebGPURenderPipeline and WebGPUComputePipeline inherit from GPUObjectBase
1971         https://bugs.webkit.org/show_bug.cgi?id=201207
1972
1973         Reviewed by Dean Jackson.
1974
1975         Make remaining WebGPU "client" classes manage their error scopes, instead of the internal classes.
1976         Matches Web/GPUBuffer, and allows "invalid" WebGPU objects to create errors.
1977
1978         Covered by existing tests.
1979
1980         * Modules/webgpu/WebGPUComputePipeline.cpp:
1981         (WebCore::WebGPUComputePipeline::create):
1982         (WebCore::WebGPUComputePipeline::WebGPUComputePipeline):
1983         * Modules/webgpu/WebGPUComputePipeline.h:
1984         * Modules/webgpu/WebGPUDevice.cpp:
1985         (WebCore::WebGPUDevice::createRenderPipeline const):
1986         (WebCore::WebGPUDevice::createComputePipeline const):
1987         * Modules/webgpu/WebGPURenderPipeline.cpp:
1988         (WebCore::WebGPURenderPipeline::create):
1989         (WebCore::WebGPURenderPipeline::WebGPURenderPipeline):
1990         * Modules/webgpu/WebGPURenderPipeline.h:
1991         * WebCore.xcodeproj/project.pbxproj:
1992         * platform/graphics/gpu/GPUComputePipeline.h:
1993         * platform/graphics/gpu/GPURenderPipeline.h:
1994         * platform/graphics/gpu/cocoa/GPUComputePipelineMetal.mm:
1995         (WebCore::GPUComputePipeline::tryCreate):
1996         (WebCore::GPUComputePipeline::GPUComputePipeline):
1997         * platform/graphics/gpu/cocoa/GPURenderPipelineMetal.mm:
1998         (WebCore::GPURenderPipeline::tryCreate):
1999         (WebCore::GPURenderPipeline::GPURenderPipeline):
2000
2001 2019-09-14  Yusuke Suzuki  <ysuzuki@apple.com>
2002
2003         Retire x86 32bit JIT support
2004         https://bugs.webkit.org/show_bug.cgi?id=201790
2005
2006         Reviewed by Mark Lam.
2007
2008         * cssjit/FunctionCall.h:
2009         (WebCore::FunctionCall::callAndBranchOnBooleanReturnValue):
2010         (WebCore::FunctionCall::swapArguments):
2011
2012 2019-09-14  Zalan Bujtas  <zalan@apple.com>
2013
2014         [LFC] FormattingContext::Geometry::inFlowPositionedPositionOffset should not read containing block's width
2015         https://bugs.webkit.org/show_bug.cgi?id=201797
2016         <rdar://problem/55366244>
2017
2018         Reviewed by Antti Koivisto.
2019
2020         This is in preparation for using constraint values instead of querying the display tree for containing block geometry information.
2021         See webkit.org/b/201795
2022
2023         * layout/FormattingContext.h:
2024         * layout/FormattingContextGeometry.cpp:
2025         (WebCore::Layout::FormattingContext::Geometry::inFlowPositionedPositionOffset const):
2026         * layout/blockformatting/BlockFormattingContext.cpp:
2027         (WebCore::Layout::BlockFormattingContext::placeInFlowPositionedChildren):
2028         * layout/inlineformatting/InlineFormattingContextLineLayout.cpp:
2029         (WebCore::Layout::InlineFormattingContext::InlineLayout::createDisplayRuns const):
2030
2031 2019-09-14  Zalan Bujtas  <zalan@apple.com>
2032
2033         [LFC] FormattingContext::Geometry::inlineReplacedHeightAndMargin should not read containing block's width
2034         https://bugs.webkit.org/show_bug.cgi?id=201796
2035         <rdar://problem/55366109>
2036
2037         Reviewed by Antti Koivisto.
2038
2039         This is in preparation for using constraint values instead of querying the display tree for containing block geometry information.
2040         See webkit.org/b/201795
2041
2042         * layout/FormattingContext.h:
2043         * layout/FormattingContextGeometry.cpp:
2044         (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedVerticalGeometry const):
2045         (WebCore::Layout::FormattingContext::Geometry::complicatedCases const):
2046         (WebCore::Layout::FormattingContext::Geometry::floatingReplacedHeightAndMargin const):
2047         (WebCore::Layout::FormattingContext::Geometry::floatingHeightAndMargin const):
2048         (WebCore::Layout::FormattingContext::Geometry::inlineReplacedHeightAndMargin const):
2049         * layout/blockformatting/BlockFormattingContext.cpp:
2050         (WebCore::Layout::BlockFormattingContext::computeHeightAndMargin):
2051         * layout/blockformatting/BlockFormattingContext.h:
2052         * layout/blockformatting/BlockFormattingContextGeometry.cpp:
2053         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowHeightAndMargin):
2054         * layout/inlineformatting/InlineFormattingContext.cpp:
2055         (WebCore::Layout::InlineFormattingContext::computeHeightAndMargin):
2056         * layout/inlineformatting/InlineFormattingContext.h:
2057         * layout/inlineformatting/InlineFormattingContextGeometry.cpp:
2058         (WebCore::Layout::InlineFormattingContext::Geometry::inlineBlockHeightAndMargin const):
2059
2060 2019-09-14  Zalan Bujtas  <zalan@apple.com>
2061
2062         [LFC] FormattingContext::Geometry::outOfFlowReplacedVerticalGeometry should not read containing block's width.
2063         https://bugs.webkit.org/show_bug.cgi?id=201794
2064         <rdar://problem/55365669>
2065
2066         Reviewed by Antti Koivisto.
2067
2068         This is in preparation for using constraint values instead of querying the display tree for containing block geometry information.
2069         See webkit.org/b/201795
2070
2071         * layout/FormattingContext.cpp:
2072         (WebCore::Layout::FormattingContext::computeOutOfFlowVerticalGeometry):
2073         * layout/FormattingContext.h:
2074         * layout/FormattingContextGeometry.cpp:
2075         (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedVerticalGeometry const):
2076         (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedVerticalGeometry const):
2077         (WebCore::Layout::FormattingContext::Geometry::outOfFlowVerticalGeometry const):
2078
2079 2019-09-14  Chris Dumez  <cdumez@apple.com>
2080
2081         newController may be moved several times under SWClientConnection::notifyClientsOfControllerChange()
2082         https://bugs.webkit.org/show_bug.cgi?id=201792
2083         <rdar://problem/55351284>
2084
2085         Reviewed by Youenn Fablet.
2086
2087         Stop WTFMove()'ing inside the for loop.
2088
2089         * workers/service/SWClientConnection.cpp:
2090         (WebCore::SWClientConnection::notifyClientsOfControllerChange):
2091
2092 2019-09-14  Zalan Bujtas  <zalan@apple.com>
2093
2094         [LFC] FormattingContext::Geometry::computedHeightValue should not read containing block's height.
2095         https://bugs.webkit.org/show_bug.cgi?id=201791
2096         <rdar://problem/55361695>
2097
2098         Reviewed by Antti Koivisto.
2099
2100         While sizing/positioning a particular box, we oftentimes need some containing block geometry information.
2101         The idea here is that instead of calling formattingContext().geometry(containingBlock), these constraint values
2102         would be pushed in to those compute* functions. It helps controlling the access to the display box tree and
2103         prevents formatting context escaping.
2104
2105         * layout/FormattingContext.cpp:
2106         (WebCore::Layout::FormattingContext::computeOutOfFlowVerticalGeometry):
2107         * layout/FormattingContext.h:
2108         * layout/FormattingContextGeometry.cpp:
2109         (WebCore::Layout::FormattingContext::Geometry::computedHeightValue const):
2110         (WebCore::Layout::FormattingContext::Geometry::computedMaxHeight const):
2111         (WebCore::Layout::FormattingContext::Geometry::computedMinHeight const):
2112         (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedVerticalGeometry const):
2113         (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedVerticalGeometry const):
2114         (WebCore::Layout::FormattingContext::Geometry::outOfFlowVerticalGeometry const):
2115         (WebCore::Layout::FormattingContext::Geometry::inlineReplacedHeightAndMargin const):
2116         * layout/LayoutUnits.h:
2117         * layout/blockformatting/BlockFormattingContext.cpp:
2118         (WebCore::Layout::BlockFormattingContext::computeHeightAndMargin):
2119
2120 2019-09-11  Dean Jackson  <dino@apple.com>
2121
2122         Provide a prototype for AR QuickLook to trigger processing in the originating page
2123         https://bugs.webkit.org/show_bug.cgi?id=201371
2124         <rdar://54904781>
2125
2126         Reviewed by Simon Fraser.
2127
2128         * dom/Document.cpp:
2129         (WebCore::Document::dispatchSystemPreviewActionEvent): Create and dispatch a MessageEvent.
2130         * dom/Document.h:
2131
2132         * html/HTMLAnchorElement.cpp: Send along the page and frame identifiers for this
2133         object to ensure that any reply goes to the correct place.
2134         (WebCore::HTMLAnchorElement::handleClick):
2135
2136         * loader/FrameLoadRequest.h: Use the new SystemPreviewInfo type.
2137         (WebCore::FrameLoadRequest::isSystemPreview const):
2138         (WebCore::FrameLoadRequest::systemPreviewInfo const):
2139         (WebCore::FrameLoadRequest::systemPreviewRect const): Deleted.
2140         * loader/FrameLoader.cpp:
2141         (WebCore::FrameLoader::loadURL):
2142
2143         * loader/FrameLoaderTypes.h: Provide encoders for the type.
2144         (WebCore::SystemPreviewInfo::encode const):
2145         (WebCore::SystemPreviewInfo::decode):
2146
2147         * platform/network/ResourceRequestBase.cpp: Use the new type.
2148         (WebCore::ResourceRequestBase::isSystemPreview const):
2149         (WebCore::ResourceRequestBase::systemPreviewInfo const):
2150         (WebCore::ResourceRequestBase::setSystemPreviewInfo):
2151         (WebCore::ResourceRequestBase::setSystemPreview): Deleted.
2152         (WebCore::ResourceRequestBase::systemPreviewRect const): Deleted.
2153         (WebCore::ResourceRequestBase::setSystemPreviewRect): Deleted.
2154         * platform/network/ResourceRequestBase.h:
2155
2156         * testing/Internals.cpp: Expose the frame and page identifiers to testing.
2157         (WebCore::Internals::frameIdentifier const):
2158         (WebCore::Internals::pageIdentifier const):
2159         * testing/Internals.h:
2160         * testing/Internals.idl:
2161
2162 2019-09-13  Chris Dumez  <cdumez@apple.com>
2163
2164         Crash under WebCore::firstPositionInNode()
2165         https://bugs.webkit.org/show_bug.cgi?id=201764
2166         <rdar://problem/54823754>
2167
2168         Reviewed by Wenson Hsieh and Geoff Garen.
2169
2170         Make sure to keep a Ref<> to the textNode when we call insertNodeAtTabSpanPosition()
2171         or insertNodeAt().
2172
2173         Test: editing/firstPositionInNode-crash.html
2174
2175         * editing/InsertTextCommand.cpp:
2176         (WebCore::InsertTextCommand::positionInsideTextNode):
2177
2178 2019-09-13  Youenn Fablet  <youenn@apple.com>
2179
2180         Partition processes running service workers by session ID
2181         https://bugs.webkit.org/show_bug.cgi?id=201643
2182
2183         Reviewed by Chris Dumez.
2184
2185         Move the creation of service worker context connection management to SWServer.
2186         This allows to partition service worker context connections by registrable domain and sessionID.
2187         WebKit2 is still responsible to create the IPC creation through a Function given to SWServer at construction
2188         time.
2189         SWServer now keeps a map of registrable domain -> context connection to use for running workers.
2190         It also keeps a map of being-created connections.
2191         In case a context connection is removed from the SWServer, the SWServer will notify all related worker instances
2192         that they are not running. The SWServer will also recreate a context connection if needed.
2193
2194         This allows removing the global server context connection map.
2195         Make SWServerToContextConnection no longer refcounted to simplify the lifetime management.
2196
2197         Covered by API test.
2198
2199         * workers/service/server/SWServer.cpp:
2200         (WebCore::SWServer::SWServer):
2201         (WebCore::SWServer::tryInstallContextData):
2202         (WebCore::SWServer::contextConnectionCreated):
2203         (WebCore::SWServer::unregisterServiceWorkerClient):
2204         (WebCore::SWServer::needsContextConnectionForRegistrableDomain const):
2205         (WebCore::SWServer::addContextConnection):
2206         (WebCore::SWServer::removeContextConnection):
2207         (WebCore::SWServer::createContextConnection):
2208         * workers/service/server/SWServer.h:
2209         (WebCore::SWServer::contextConnectionForRegistrableDomain):
2210         * workers/service/server/SWServerToContextConnection.cpp:
2211         (WebCore::SWServerToContextConnection::SWServerToContextConnection):
2212         (WebCore::SWServerToContextConnection::~SWServerToContextConnection):
2213         * workers/service/server/SWServerToContextConnection.h:
2214         * workers/service/server/SWServerWorker.cpp:
2215         (WebCore::SWServerWorker::contextConnection):
2216
2217 2019-09-13  Zalan Bujtas  <zalan@apple.com>
2218
2219         [LFC] Do not create FormattingContext unless the root has child boxes.
2220         https://bugs.webkit.org/show_bug.cgi?id=201766
2221         <rdar://problem/55344449>
2222
2223         Reviewed by Antti Koivisto.
2224
2225         Just because a box establishes a formatting context, it does not necessarily mean we need to create a formatting context object for it.
2226         The established formatting context is responsible for laying out the descendant content. The formatting context root itself is
2227         laid out in the formatting context it lives in. So if there's no descendent content, we don't need to construct the context objects.
2228
2229         <body><div style="float: left;"></div></body> <- this div establishes a block formatting context (float) but it does not have any content so laying
2230         it out simply means sizing and positioning it in the initial block formatting context.
2231
2232         * layout/FormattingContext.cpp:
2233         (WebCore::Layout::FormattingContext::FormattingContext):
2234         (WebCore::Layout::FormattingContext::layoutOutOfFlowContent):
2235         (WebCore::Layout::FormattingContext::mapTopToFormattingContextRoot const):
2236         (WebCore::Layout::FormattingContext::mapLeftToFormattingContextRoot const):
2237         (WebCore::Layout::FormattingContext::mapRightToFormattingContextRoot const):
2238         (WebCore::Layout::FormattingContext::validateGeometryConstraintsAfterLayout const):
2239         * layout/FormattingContext.h:
2240         (WebCore::Layout::FormattingContext::root const):
2241         * layout/FormattingContextGeometry.cpp:
2242         (WebCore::Layout::FormattingContext::Geometry::contentHeightForFormattingContextRoot const):
2243         (WebCore::Layout::FormattingContext::Geometry::shrinkToFitWidth):
2244         * layout/LayoutState.cpp:
2245         (WebCore::Layout::LayoutState::layoutFormattingContextSubtree):
2246         (WebCore::Layout::LayoutState::establishedFormattingState const):
2247         (WebCore::Layout::LayoutState::createFormattingStateForFormattingRootIfNeeded):
2248         (WebCore::Layout::LayoutState::createFormattingContext):
2249         * layout/LayoutState.h:
2250         (WebCore::Layout::LayoutState::hasFormattingState const):
2251         * layout/blockformatting/BlockFormattingContext.cpp:
2252         (WebCore::Layout::BlockFormattingContext::BlockFormattingContext):
2253         (WebCore::Layout::BlockFormattingContext::layoutInFlowContent):
2254         (WebCore::Layout::BlockFormattingContext::usedAvailableWidthForFloatAvoider const):
2255         (WebCore::Layout::BlockFormattingContext::layoutFormattingContextRoot):
2256         (WebCore::Layout::BlockFormattingContext::computedIntrinsicWidthConstraints):
2257         * layout/blockformatting/BlockFormattingContext.h:
2258         * layout/blockformatting/BlockFormattingContextGeometry.cpp:
2259         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedHeightAndMargin):
2260         (WebCore::Layout::BlockFormattingContext::Geometry::intrinsicWidthConstraints):
2261         * layout/blockformatting/BlockMarginCollapse.cpp:
2262         (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginsCollapseThrough const):
2263         * layout/floats/FloatingContext.h:
2264         (WebCore::Layout::FloatingContext::root const):
2265         * layout/floats/FloatingState.cpp:
2266         (WebCore::Layout::FloatingState::FloatingState):
2267         (WebCore::Layout::FloatingState::bottom const):
2268         (WebCore::Layout::FloatingState::top const):
2269         * layout/floats/FloatingState.h:
2270         (WebCore::Layout::FloatingState::create):
2271         (WebCore::Layout::FloatingState::root const):
2272         (WebCore::Layout::FloatingState::leftBottom const):
2273         (WebCore::Layout::FloatingState::rightBottom const):
2274         (WebCore::Layout::FloatingState::bottom const):
2275         (WebCore::Layout::FloatingState::FloatItem::isDescendantOfFormattingRoot const):
2276         * layout/inlineformatting/InlineFormattingContext.cpp:
2277         (WebCore::Layout::InlineFormattingContext::InlineFormattingContext):
2278         (WebCore::Layout::InlineFormattingContext::layoutInFlowContent):
2279         (WebCore::Layout::InlineFormattingContext::computedIntrinsicWidthConstraints):
2280         (WebCore::Layout::InlineFormattingContext::computeIntrinsicWidthForFormattingRoot):
2281         (WebCore::Layout::InlineFormattingContext::layoutFormattingContextRoot):
2282         (WebCore::Layout::InlineFormattingContext::collectInlineContent const):
2283         * layout/inlineformatting/InlineFormattingContext.h:
2284         (WebCore::Layout::InlineFormattingContext::InlineLayout::formattingRoot const):
2285         * layout/inlineformatting/InlineFormattingContextQuirks.cpp:
2286         (WebCore::Layout::InlineFormattingContext::Quirks::lineDescentNeedsCollapsing const):
2287         * layout/inlineformatting/InlineLine.cpp:
2288         (WebCore::Layout::Line::close):
2289         (WebCore::Layout::Line::adjustBaselineAndLineHeight):
2290         * layout/tableformatting/TableFormattingContext.cpp:
2291         (WebCore::Layout::TableFormattingContext::TableFormattingContext):
2292         (WebCore::Layout::TableFormattingContext::layoutTableCellBox):
2293         (WebCore::Layout::TableFormattingContext::setComputedGeometryForSections):
2294         (WebCore::Layout::TableFormattingContext::ensureTableGrid):
2295         (WebCore::Layout::TableFormattingContext::computePreferredWidthForColumns):
2296         * layout/tableformatting/TableFormattingContext.h:
2297
2298 2019-09-13  Ali Juma  <ajuma@chromium.org>
2299
2300         IntersectionObserverEntry#intersectionRatio can be larger than 1
2301         https://bugs.webkit.org/show_bug.cgi?id=200776
2302
2303         Reviewed by Simon Fraser.
2304
2305         When computing the intersection between a target and an intersection observer's 
2306         root, RenderBox::computeVisibleRectInContainer is used to map the target rect
2307         up the containing block chain, clipping along the way. When a RenderBox has
2308         a transform, this method expands the given rect to the enclosing rect in device
2309         pixels. This is fine for the use case of computing an invalidation rect, but for
2310         the intersection observer use case it means that it is possible for the computed
2311         intersection rect to be slightly larger than the original target rect, resulting
2312         in an intersection ratio greater than 1.
2313
2314         Fix this by performing a final intersection between the intersection rect as
2315         computed above and the target rect.
2316
2317         Test: intersection-observer/intersection-clipped-to-target.html
2318
2319         * dom/Document.cpp:
2320         (WebCore::computeIntersectionState):
2321
2322 2019-09-13  Nikolas Zimmermann  <zimmermann@kde.org>
2323
2324         SMIL animations of SVG <view> element have no effect
2325         https://bugs.webkit.org/show_bug.cgi?id=94469
2326
2327         Reviewed by Said Abou-Hallawa.
2328
2329         SMIL animations of the attributes associated with SVGViewElement work fine, but without any
2330         visual effect. When loading an SVG document with a given fragment identifier
2331         (e.g. test.svg#customView) where 'customView' references to an embedded SVGViewElement, the
2332         viewBox/preserveAspectRatio settings should be taken from the SVGViewElement. Currently
2333         there is no link between the SVGViewElement and the SVGSVGElement. The settings from the
2334         SVGViewElement are only pasrsed onco in SVGSVGElement::scrollToFragment(). Dynamic updates
2335         of the 'viewBox' and 'preserveAspectRatio' attributes of the SVGViewElement thus have no
2336         visual effect, since the SVGSVGElement does not re-evaluates its viewBox.
2337
2338         Store a RefPtr to the currently used SVGViewElement in SVGSVGElement, and a WeakPtr back
2339         to the SVGSVGElement that currently references the SVGViewElement. This allows us to
2340         propagate SVGViewElement attribute changes to SVGSVGElement and re-evaluate the viewBox
2341         stored in SVGSVGElement and trigger visual updates.
2342
2343         Tests: svg/custom/animation-on-view-element.html
2344                svg/custom/multiple-view-elements.html
2345
2346         * svg/SVGSVGElement.cpp:
2347         (WebCore::SVGSVGElement::scrollToFragment):
2348         * svg/SVGSVGElement.h:
2349         * svg/SVGViewElement.cpp:
2350         (WebCore::SVGViewElement::svgAttributeChanged): Add missing implementation, tracked by
2351         webkit.org/b/196554. Correctly handle SVGFitToViewBox property changes. Update the viewBox
2352         stored in the SVGSVGElement, that references the SVGViewElement. Afterwards invalidate the
2353         renderer associated with the SVGSVGElement, which properly triggers visual updates.
2354         * svg/SVGViewElement.h:
2355
2356 2019-09-13  Brent Fulgham  <bfulgham@apple.com>
2357
2358         [FTW] ImageBuffer/ImageBufferData is highly inefficient
2359         https://bugs.webkit.org/show_bug.cgi?id=201594
2360
2361         Reviewed by Said Abou-Hallawa.
2362
2363         My initial implementation of ImageBuffer and ImageBufferData for Direct2D involves too
2364         much moving of data from GPU to CPU and back. We only need to make a renderable version
2365         of the ImageBuffer when ImageBuffer::sinkIntoNativeImage or ImageBuffer::copyNativeImage
2366         are called.
2367
2368         Currently, each ImageBuffer putData operation uploads the data to the GPU, and each
2369         ImageBuffer getData pulls the data from the GPU.
2370
2371         This patch does the following:
2372
2373         1. It makes the assumption that the ID2D1Bitmap it holds is under its control (i.e.,
2374            external draw operations do not manipulate the bitmap without marking it dirty).
2375         2. It holds a CPU copy of the data from the ID2D1Bitmap originally used to create it.
2376            It uses this data for all manipulations, and uploads to the bitmap only when
2377            an ID2D1Bitmap is requested for drawing, and before a drawing operation is performed
2378            on the associated ImageBuffer context.
2379         3. It does not read back from the ID2D1Bitmap unless it is told that it is dirty.
2380         4. It does not call 'ID2D1RenderTarget::SetTags' if ASSERTS are disabled because
2381            they are costly, and don't help in release builds.
2382  
2383         * platform/graphics/win/Direct2DOperations.cpp:
2384         (WebCore::Direct2D::fillRect): Use new 'setTags' method.
2385         (WebCore::Direct2D::fillRoundedRect): Ditto.
2386         (WebCore::Direct2D::fillRectWithRoundedHole): Ditto.
2387         (WebCore::Direct2D::fillRectWithGradient): Ditto.
2388         (WebCore::Direct2D::fillPath): Ditto.
2389         (WebCore::Direct2D::strokeRect): Ditto.
2390         (WebCore::Direct2D::strokePath): Ditto.
2391         (WebCore::Direct2D::drawPath): Ditto.
2392         (WebCore::Direct2D::drawWithShadow): Notify observers before and after we drew.
2393         (WebCore::Direct2D::drawWithoutShadow): Ditto.
2394         (WebCore::Direct2D::clearRect): Use new 'setTags' method.
2395         (WebCore::Direct2D::drawGlyphs): Ditto.
2396         (WebCore::Direct2D::drawNativeImage): Ditto.
2397         (WebCore::Direct2D::drawRect): Ditto.
2398         (WebCore::Direct2D::drawLine): Ditto.
2399         (WebCore::Direct2D::fillEllipse): Ditto.
2400         (WebCore::Direct2D::drawEllipse): Ditto.
2401         (WebCore::Direct2D::flush): Notify observer after we drew.
2402         * platform/graphics/win/GradientDirect2D.cpp:
2403         (WebCore::Gradient::fill): Don't call SetTags in non-ASSERT builds.
2404         * platform/graphics/win/ImageBufferDataDirect2D.cpp:
2405         (WebCore::ImageBufferData::ensureBackingStore const): Added.
2406         (WebCore::ImageBufferData::getData const): Only read from the GPU if the in-memory
2407         store is empty or out-of-sync.
2408         (WebCore::ImageBufferData::putData): Mark the bitmap as out-of-sync, but don't
2409         upload the data yet.
2410         (WebCore::ImageBufferData::loadDataToBitmapIfNeeded): Helper function to upload data to the GPU.
2411         (WebCore::ImageBufferData::compatibleBitmap): Only upload data if the relevant
2412         bitmap is out of date.
2413         * platform/graphics/win/ImageBufferDataDirect2D.h:
2414         * platform/graphics/win/ImageBufferDirect2D.cpp:
2415         (WebCore::ImageBuffer::ImageBuffer): Update constructor to register the ImageBufferData
2416         lambdas as observer for draw operations.
2417         * platform/graphics/win/PlatformContextDirect2D.cpp:
2418         (WebCore::PlatformContextDirect2D::PlatformContextDirect2D): Update constructor to accept
2419         lambdas to run before and after draw operations.
2420         (WebCore::PlatformContextDirect2D::setTags): Added.
2421         (WebCore::PlatformContextDirect2D::notifyPreDrawObserver): Added.
2422         (WebCore::PlatformContextDirect2D::notifyPostDrawObserver): Added.
2423         * platform/graphics/win/PlatformContextDirect2D.h:
2424         (WebCore::PlatformContextDirect2D::PlatformContextDirect2D):
2425
2426 2019-09-13  Russell Epstein  <repstein@apple.com>
2427
2428         Unreviewed, rolling out r249709.
2429
2430         Layout test added in this patch has been consistently failing
2431         since it landed.
2432
2433         Reverted changeset:
2434
2435         "Option + arrow moves caret past whitespace on iOS"
2436         https://bugs.webkit.org/show_bug.cgi?id=201575
2437         https://trac.webkit.org/changeset/249709
2438
2439 2019-09-13  Zalan Bujtas  <zalan@apple.com>
2440
2441         [LFC] Rename FormattingContext::layout to layoutInFlowContent()
2442         https://bugs.webkit.org/show_bug.cgi?id=201763
2443         <rdar://problem/55340435>
2444
2445         Reviewed by Antti Koivisto.
2446
2447         FormattingContext::layout() only takes care of the inflow content. Out-out-flow boxes are laid out through FormattingContext::layoutOutOfFlowContent.
2448
2449         * layout/FormattingContext.cpp:
2450         (WebCore::Layout::FormattingContext::layoutOutOfFlowContent):
2451         * layout/FormattingContext.h:
2452         * layout/LayoutState.cpp:
2453         (WebCore::Layout::LayoutState::layoutFormattingContextSubtree):
2454         * layout/blockformatting/BlockFormattingContext.cpp:
2455         (WebCore::Layout::BlockFormattingContext::layoutInFlowContent):
2456         (WebCore::Layout::BlockFormattingContext::layoutFormattingContextRoot):
2457         (WebCore::Layout::BlockFormattingContext::layout): Deleted.
2458         * layout/blockformatting/BlockFormattingContext.h:
2459         * layout/inlineformatting/InlineFormattingContext.cpp:
2460         (WebCore::Layout::InlineFormattingContext::layoutInFlowContent):
2461         (WebCore::Layout::InlineFormattingContext::layoutFormattingContextRoot):
2462         (WebCore::Layout::InlineFormattingContext::layout): Deleted.
2463         * layout/inlineformatting/InlineFormattingContext.h:
2464         * layout/tableformatting/TableFormattingContext.cpp:
2465         (WebCore::Layout::TableFormattingContext::layoutInFlowContent):
2466         (WebCore::Layout::TableFormattingContext::layoutTableCellBox):
2467         (WebCore::Layout::TableFormattingContext::layout): Deleted.
2468         * layout/tableformatting/TableFormattingContext.h:
2469
2470 2019-09-13  Zalan Bujtas  <zalan@apple.com>
2471
2472         [LFC] FormattingContext::displayBoxForLayoutBox should be split into 2 functions
2473         https://bugs.webkit.org/show_bug.cgi?id=201754
2474         <rdar://problem/55328753>
2475
2476         Reviewed by Antti Koivisto.
2477
2478         1. FormattingContext::geometryForBox() returns a const Display::Box. Use this function to access
2479         already computed geometry such as the containing block's content box width.
2480         This function can escape the current formatting context in certain cases and read geometry from parent/ancestor formatting contexts. 
2481         2. FormattingState::displayBox() returns a non-const version of the Display::Box. Use this function to
2482         create/get the display box of a particular layout box to set computed values. This call should never escape the
2483         current formatting context (as no one should mutate ancestor boxes).
2484         
2485         Normally while laying out a particular box, we need to collect some geometry information from other boxes in the tree like previous sibling, containing block.
2486         <div style="width: 100px"><div></div></div> <- the inner div's used width is based on the outer div's width. 
2487         However we should never mutate the geometry information on those other boxes (outer div). This patch helps avoiding accidental mutation on ancestors by
2488         returning a const version of the Display::Box.  
2489
2490         * layout/FormattingContext.cpp:
2491         (WebCore::Layout::FormattingContext::computeOutOfFlowHorizontalGeometry):
2492         (WebCore::Layout::FormattingContext::computeOutOfFlowVerticalGeometry):
2493         (WebCore::Layout::FormattingContext::computeBorderAndPadding):
2494         (WebCore::Layout::mapHorizontalPositionToAncestor):
2495         (WebCore::Layout::FormattingContext::mapTopToFormattingContextRoot const):
2496         (WebCore::Layout::FormattingContext::mapLeftToFormattingContextRoot const):
2497         (WebCore::Layout::FormattingContext::mapRightToFormattingContextRoot const):
2498         (WebCore::Layout::FormattingContext::geometryForBox const):
2499         (WebCore::Layout::FormattingContext::validateGeometryConstraintsAfterLayout const):
2500         (WebCore::Layout::FormattingContext::displayBoxForLayoutBox const): Deleted.
2501         * layout/FormattingContext.h:
2502         (WebCore::Layout::FormattingContext::hasDisplayBox const): Deleted.
2503         * layout/FormattingContextGeometry.cpp:
2504         (WebCore::Layout::FormattingContext::Geometry::computedHeightValue const):
2505         (WebCore::Layout::FormattingContext::Geometry::contentHeightForFormattingContextRoot const):
2506         (WebCore::Layout::FormattingContext::Geometry::staticVerticalPositionForOutOfFlowPositioned const):
2507         (WebCore::Layout::FormattingContext::Geometry::staticHorizontalPositionForOutOfFlowPositioned const):
2508         (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedVerticalGeometry const):
2509         (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedHorizontalGeometry):
2510         (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedVerticalGeometry const):
2511         (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedHorizontalGeometry const):
2512         (WebCore::Layout::FormattingContext::Geometry::inlineReplacedHeightAndMargin const):
2513         (WebCore::Layout::FormattingContext::Geometry::inFlowPositionedPositionOffset const):
2514         * layout/FormattingContextQuirks.cpp:
2515         (WebCore::Layout::FormattingContext::Quirks::heightValueOfNearestContainingBlockWithFixedHeight):
2516         * layout/FormattingState.cpp:
2517         (WebCore::Layout::FormattingState::displayBox const):
2518         * layout/FormattingState.h:
2519         * layout/blockformatting/BlockFormattingContext.cpp:
2520         (WebCore::Layout::BlockFormattingContext::usedAvailableWidthForFloatAvoider const):
2521         (WebCore::Layout::BlockFormattingContext::placeInFlowPositionedChildren):
2522         (WebCore::Layout::BlockFormattingContext::computeStaticVerticalPosition):
2523         (WebCore::Layout::BlockFormattingContext::computeStaticHorizontalPosition):
2524         (WebCore::Layout::BlockFormattingContext::computeEstimatedVerticalPosition):
2525         (WebCore::Layout::BlockFormattingContext::computeEstimatedVerticalPositionForFloatClear):
2526         (WebCore::Layout::BlockFormattingContext::computeFloatingPosition):
2527         (WebCore::Layout::BlockFormattingContext::computePositionToAvoidFloats):
2528         (WebCore::Layout::BlockFormattingContext::computeWidthAndMargin):
2529         (WebCore::Layout::BlockFormattingContext::computeHeightAndMargin):
2530         (WebCore::Layout::BlockFormattingContext::verticalPositionWithMargin const):
2531         * layout/blockformatting/BlockFormattingContext.h:
2532         * layout/blockformatting/BlockFormattingContextGeometry.cpp:
2533         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedHeightAndMargin):
2534         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedWidthAndMargin const):
2535         (WebCore::Layout::BlockFormattingContext::Geometry::staticVerticalPosition const):
2536         (WebCore::Layout::BlockFormattingContext::Geometry::staticHorizontalPosition const):
2537         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowHeightAndMargin):
2538         * layout/blockformatting/BlockFormattingContextQuirks.cpp:
2539         (WebCore::Layout::BlockFormattingContext::Quirks::stretchedInFlowHeight):
2540         * layout/blockformatting/BlockMarginCollapse.cpp:
2541         (WebCore::Layout::BlockFormattingContext::MarginCollapse::hasClearance const):
2542         (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginBeforeCollapsesWithParentMarginBefore const):
2543         (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginBeforeCollapsesWithPreviousSiblingMarginAfter const):
2544         (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginBeforeCollapsesWithFirstInFlowChildMarginBefore const):
2545         (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginAfterCollapsesWithSiblingMarginBeforeWithClearance const):
2546         (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginAfterCollapsesWithLastInFlowChildMarginAfter const):
2547         (WebCore::Layout::BlockFormattingContext::MarginCollapse::updateMarginAfterForPreviousSibling const):
2548         (WebCore::Layout::BlockFormattingContext::MarginCollapse::positiveNegativeValues):
2549         (WebCore::Layout::BlockFormattingContext::MarginCollapse::estimatedMarginBefore):
2550         (WebCore::Layout::BlockFormattingContext::MarginCollapse::updatePositiveNegativeMarginValues):
2551         (WebCore::Layout::hasClearance): Deleted.
2552         * layout/floats/FloatingContext.cpp:
2553         (WebCore::Layout::FloatingContext::positionForFloat const):
2554         (WebCore::Layout::FloatingContext::verticalPositionWithClearance const):
2555         (WebCore::Layout::FloatingContext::absoluteDisplayBoxCoordinates const):
2556         (WebCore::Layout::FloatingContext::mapToFloatingStateRoot const):
2557         (WebCore::Layout::FloatingContext::mapTopToFloatingStateRoot const):
2558         (WebCore::Layout::FloatingContext::mapPointFromFormattingContextRootToFloatingStateRoot const):
2559         * layout/inlineformatting/InlineFormattingContext.cpp:
2560         (WebCore::Layout::InlineFormattingContext::layout):
2561         (WebCore::Layout::InlineFormattingContext::computedIntrinsicWidthConstraints):
2562         (WebCore::Layout::InlineFormattingContext::initializeMarginBorderAndPaddingForGenericInlineBox):
2563         (WebCore::Layout::InlineFormattingContext::computeMarginBorderAndPaddingForInlineContainer):
2564         (WebCore::Layout::InlineFormattingContext::computeIntrinsicWidthForFormattingRoot):
2565         (WebCore::Layout::InlineFormattingContext::computeHorizontalMargin):
2566         (WebCore::Layout::InlineFormattingContext::computeWidthAndMargin):
2567         (WebCore::Layout::InlineFormattingContext::computeHeightAndMargin):
2568         (WebCore::Layout::InlineFormattingContext::layoutFormattingContextRoot):
2569         * layout/inlineformatting/InlineFormattingContextGeometry.cpp:
2570         (WebCore::Layout::InlineFormattingContext::Geometry::inlineBlockHeightAndMargin const):
2571         * layout/inlineformatting/InlineFormattingContextLineLayout.cpp:
2572         (WebCore::Layout::inlineItemWidth):
2573         (WebCore::Layout::LineLayout::placeInlineItem):
2574         (WebCore::Layout::InlineFormattingContext::InlineLayout::layout const):
2575         (WebCore::Layout::InlineFormattingContext::InlineLayout::computedIntrinsicWidth const):
2576         (WebCore::Layout::InlineFormattingContext::InlineLayout::createDisplayRuns const):
2577         * layout/inlineformatting/InlineFormattingContextQuirks.cpp:
2578         (WebCore::Layout::InlineFormattingContext::Quirks::lineDescentNeedsCollapsing const):
2579         * layout/inlineformatting/InlineLine.cpp:
2580         (WebCore::Layout::isInlineContainerConsideredEmpty):
2581         (WebCore::Layout::Line::isVisuallyEmpty const):
2582         (WebCore::Layout::Line::close):
2583         (WebCore::Layout::Line::appendNonReplacedInlineBox):
2584         (WebCore::Layout::Line::inlineItemContentHeight const):
2585         * layout/tableformatting/TableFormattingContext.cpp:
2586         (WebCore::Layout::TableFormattingContext::layout):
2587         (WebCore::Layout::TableFormattingContext::layoutTableCellBox):
2588         (WebCore::Layout::TableFormattingContext::positionTableCells):
2589         (WebCore::Layout::TableFormattingContext::setComputedGeometryForRows):
2590         (WebCore::Layout::TableFormattingContext::setComputedGeometryForSections):
2591         (WebCore::Layout::TableFormattingContext::computedTableWidth):
2592
2593 2019-09-13  Youenn Fablet  <youenn@apple.com>
2594
2595         Use WebProcess processIdentifier to identify Service Worker connections
2596         https://bugs.webkit.org/show_bug.cgi?id=201459
2597
2598         Reviewed by Chris Dumez.
2599
2600         No observable change of behavior.
2601
2602         * workers/service/ServiceWorkerClient.cpp:
2603         (WebCore::ServiceWorkerClient::postMessage):
2604         Pass sessionID to ease NetworkProcess selection of the client process connection.
2605         * workers/service/ServiceWorkerTypes.h:
2606         Mark server connection identifier be process identifier based.
2607         * workers/service/context/SWContextManager.h:
2608         * workers/service/server/SWServer.cpp:
2609         (WebCore::SWServer::Connection::Connection):
2610         * workers/service/server/SWServer.h:
2611         Let connection identifier be set in constructor instead of generated.
2612
2613 2019-09-13  Adrian Perez de Castro  <aperez@igalia.com>
2614
2615         Factor out duplicated functions from HTTPParsers.cpp and HTTPHeaderField.cpp
2616         https://bugs.webkit.org/show_bug.cgi?id=201721
2617
2618         Reviewed by Don Olmstead.
2619
2620         No new tests needed.
2621
2622         * loader/HTTPHeaderField.cpp: Remove "static" from prototypes of functions needed in HTTPParsers.cpp.
2623         (WebCore::RFC7230::isDelimiter):
2624         (WebCore::RFC7230::isQuotedPairSecondOctet):
2625         (WebCore::RFC7230::isCommentText):
2626         * loader/HTTPHeaderField.h: Add prototypes of functions needed in HTTPParsers.cpp.
2627         * platform/network/HTTPParsers.cpp: Use functionality from WebCore::RFC7230 where possible.
2628         (WebCore::skipWhile): Moved to allow implementing skipWhiteSpace() in terms of skipWhile().
2629         (WebCore::skipWhiteSpace): Implement using skipWhile() and the RFC7230::isWhitespace() predicate.
2630         (WebCore::isValidAcceptHeaderValue): Replace usage of isDelimiterCharacter() with RFC7230::isDelimiter().
2631         (WebCore::isValidHTTPToken): Replace usage of isHTTPTokenCharacter() with RFC7230::isTokenCharacter().
2632         (WebCore::skipQuotedPair): Partially reimplement in terms of RFC7230::isQuotedPairSecondOctet().
2633         (WebCore::skipComment): Replace usage of isCommentTextCharacter() with RFC7230::isCommentText().
2634         (WebCore::skipHTTPToken): Replace usage of isHTTPTokenCharacter() with RFC7230::isTokenCharacter().
2635
2636 2019-09-12  Zan Dobersek  <zdobersek@igalia.com>
2637
2638         Unreviewed debug build fix for GLib-based ports.
2639
2640         * platform/glib/UserAgentGLib.cpp: Add the HTTPParsers.h header
2641         inclusion to bring in the isValidUserAgentHeaderValue() declaration as
2642         required for an assertion check.
2643
2644 2019-09-12  Said Abou-Hallawa  <sabouhallawa@apple.com>
2645
2646         SVGLengthValue should use two enums for 'type' and 'mode' instead of one unsigned for 'units'
2647         https://bugs.webkit.org/show_bug.cgi?id=201663
2648
2649         Reviewed by Simon Fraser, Nikolas Zimmermann.
2650
2651         SVGLengthValue had one unsigned to store SVGLengthMode and SVGLengthType.
2652         It used to allocate the least significant 4 bits of this unsigned to the
2653         SVGLengthMode while it leaves the rest for SVGLengthType.
2654
2655         This will not be needed if SVGLengthMode and SVGLengthType are made of
2656         size uint_8.
2657
2658         Also in this patch:
2659
2660         -- SVGLengthNegativeValuesMode is made enum class.
2661
2662         -- SVGLengthValue::blend() is moved to SVGLengthValue.cpp so we do not
2663            need to include SVGLengthContext.h in SVGLengthValue.h.
2664
2665         -- SVGLengthType and SVGLengthMode are moved to SVGLengthValue.h. Instead
2666            of having SVGLengthValue.h includes SVGLengthConttext.h, the opposite
2667            will happen.
2668
2669         -- SVGAnimatedPropertyDescription.h is deleted. It should have been deleted
2670            with the SVG tear off objects removal.
2671
2672         -- SVGPropertyTraits<SVGAngleValue> and SVGPropertyTraits<SVGLengthValue>
2673            are deleted. They should have been deleted with SVGAnimatedType removal.
2674
2675         -- SVGLengthValue::lengthModeForAnimatedLengthAttribute() is deleted. It
2676            was only called from SVGPropertyTraits<SVGLengthValue>.
2677
2678         * WebCore.xcodeproj/project.pbxproj:
2679         * css/StyleResolver.h:
2680         * page/animation/CSSPropertyAnimation.cpp:
2681         (WebCore::blendFunc):
2682         * rendering/style/SVGRenderStyle.h:
2683         (WebCore::SVGRenderStyle::initialBaselineShiftValue):
2684         (WebCore::SVGRenderStyle::initialKerning):
2685         * rendering/svg/RenderSVGEllipse.cpp:
2686         (WebCore::RenderSVGEllipse::calculateRadiiAndCenter):
2687         * rendering/svg/RenderSVGRect.cpp:
2688         (WebCore::RenderSVGRect::updateShapeFromElement):
2689         * rendering/svg/SVGPathData.cpp:
2690         (WebCore::pathFromCircleElement):
2691         (WebCore::pathFromEllipseElement):
2692         (WebCore::pathFromRectElement):
2693         * rendering/svg/SVGTextLayoutEngineBaseline.cpp:
2694         (WebCore::SVGTextLayoutEngineBaseline::calculateBaselineShift const):
2695         * rendering/svg/SVGTextLayoutEngineSpacing.cpp:
2696         (WebCore::SVGTextLayoutEngineSpacing::calculateCSSKerningAndSpacing):
2697         * svg/LinearGradientAttributes.h:
2698         (WebCore::LinearGradientAttributes::LinearGradientAttributes):
2699         * svg/RadialGradientAttributes.h:
2700         (WebCore::RadialGradientAttributes::RadialGradientAttributes):
2701         * svg/SVGAngleValue.h:
2702         (WebCore::SVGPropertyTraits<SVGAngleValue>::initialValue): Deleted.
2703         (WebCore::SVGPropertyTraits<SVGAngleValue>::toString): Deleted.
2704         * svg/SVGCircleElement.cpp:
2705         (WebCore::SVGCircleElement::parseAttribute):
2706         * svg/SVGCircleElement.h:
2707         * svg/SVGCursorElement.cpp:
2708         (WebCore::SVGCursorElement::parseAttribute):
2709         * svg/SVGCursorElement.h:
2710         * svg/SVGEllipseElement.cpp:
2711         (WebCore::SVGEllipseElement::parseAttribute):
2712         * svg/SVGEllipseElement.h:
2713         * svg/SVGFilterElement.cpp:
2714         (WebCore::SVGFilterElement::parseAttribute):
2715         * svg/SVGFilterElement.h:
2716         * svg/SVGFilterPrimitiveStandardAttributes.cpp:
2717         (WebCore::SVGFilterPrimitiveStandardAttributes::parseAttribute):
2718         * svg/SVGFilterPrimitiveStandardAttributes.h:
2719         * svg/SVGForeignObjectElement.cpp:
2720         (WebCore::SVGForeignObjectElement::parseAttribute):
2721         * svg/SVGForeignObjectElement.h:
2722         * svg/SVGImageElement.cpp:
2723         (WebCore::SVGImageElement::parseAttribute):
2724         * svg/SVGImageElement.h:
2725         * svg/SVGLength.h:
2726         (WebCore::SVGLength::unitType const):
2727         (WebCore::SVGLength::setValueForBindings):
2728         (WebCore::SVGLength::newValueSpecifiedUnits):
2729         (WebCore::SVGLength::convertToSpecifiedUnits):
2730         (WebCore::SVGLength::unitType): Deleted.
2731         * svg/SVGLengthContext.cpp:
2732         (WebCore::SVGLengthContext::valueForLength):
2733         (WebCore::SVGLengthContext::convertValueToUserUnits const):
2734         (WebCore::SVGLengthContext::convertValueFromUserUnits const):
2735         (WebCore::SVGLengthContext::convertValueFromUserUnitsToPercentage const):
2736         (WebCore::SVGLengthContext::convertValueFromPercentageToUserUnits const):
2737         * svg/SVGLengthContext.h:
2738         (): Deleted.
2739         * svg/SVGLengthList.h:
2740         (WebCore::SVGLengthList::create):
2741         * svg/SVGLengthValue.cpp:
2742         (WebCore::lengthTypeToString):
2743         (WebCore::parseLengthType):
2744         (WebCore::primitiveTypeToLengthType):
2745         (WebCore::lengthTypeToPrimitiveType):
2746         (WebCore::SVGLengthValue::SVGLengthValue):
2747         (WebCore::SVGLengthValue::construct):
2748         (WebCore::SVGLengthValue::blend):
2749         (WebCore::SVGLengthValue::fromCSSPrimitiveValue):
2750         (WebCore::SVGLengthValue::toCSSPrimitiveValue):
2751         (WebCore::SVGLengthValue::setValueAsString):
2752         (WebCore::SVGLengthValue::valueAsString const):
2753         (WebCore::SVGLengthValue::valueForBindings const):
2754         (WebCore::SVGLengthValue::setValue):
2755         (WebCore::SVGLengthValue::convertToSpecifiedUnits):
2756         (WebCore::storeUnit): Deleted.
2757         (WebCore::extractMode): Deleted.
2758         (WebCore::extractType): Deleted.
2759         (WebCore::SVGLengthValue::operator== const): Deleted.
2760         (WebCore::SVGLengthValue::operator!= const): Deleted.
2761         (WebCore::SVGLengthValue::unitType const): Deleted.
2762         (WebCore::SVGLengthValue::unitMode const): Deleted.
2763         (WebCore::SVGLengthValue::valueAsPercentage const): Deleted.
2764         (WebCore::SVGLengthValue::newValueSpecifiedUnits): Deleted.
2765         (WebCore::SVGLengthValue::lengthModeForAnimatedLengthAttribute): Deleted.
2766         * svg/SVGLengthValue.h:
2767         (WebCore::SVGLengthValue::lengthType const):
2768         (WebCore::SVGLengthValue::lengthMode const):
2769         (WebCore::SVGLengthValue::isZero const):
2770         (WebCore::SVGLengthValue::isRelative const):
2771         (WebCore::SVGLengthValue::valueAsPercentage const):
2772         (WebCore::SVGLengthValue::valueInSpecifiedUnits const):
2773         (WebCore::operator==):
2774         (WebCore::operator!=):
2775         (WebCore::SVGLengthValue::blend const): Deleted.
2776         (WebCore::SVGPropertyTraits<SVGLengthValue>::initialValue): Deleted.
2777         (WebCore::SVGPropertyTraits<SVGLengthValue>::parse): Deleted.
2778         (WebCore::SVGPropertyTraits<SVGLengthValue>::toString): Deleted.
2779         * svg/SVGLineElement.cpp:
2780         (WebCore::SVGLineElement::parseAttribute):
2781         * svg/SVGLineElement.h:
2782         * svg/SVGLinearGradientElement.cpp:
2783         (WebCore::SVGLinearGradientElement::parseAttribute):
2784         * svg/SVGLinearGradientElement.h:
2785         * svg/SVGMarkerElement.cpp:
2786         (WebCore::SVGMarkerElement::parseAttribute):
2787         * svg/SVGMarkerElement.h:
2788         * svg/SVGMaskElement.cpp:
2789         (WebCore::SVGMaskElement::parseAttribute):
2790         * svg/SVGMaskElement.h:
2791         * svg/SVGPatternElement.cpp:
2792         (WebCore::SVGPatternElement::parseAttribute):
2793         * svg/SVGPatternElement.h:
2794         * svg/SVGRadialGradientElement.cpp:
2795         (WebCore::SVGRadialGradientElement::parseAttribute):
2796         * svg/SVGRadialGradientElement.h:
2797         * svg/SVGRectElement.cpp:
2798         (WebCore::SVGRectElement::parseAttribute):
2799         * svg/SVGRectElement.h:
2800         * svg/SVGSVGElement.cpp:
2801         (WebCore::SVGSVGElement::parseAttribute):
2802         (WebCore::SVGSVGElement::hasIntrinsicWidth const):
2803         (WebCore::SVGSVGElement::hasIntrinsicHeight const):
2804         (WebCore::SVGSVGElement::intrinsicWidth const):
2805         (WebCore::SVGSVGElement::intrinsicHeight const):
2806         * svg/SVGSVGElement.h:
2807         * svg/SVGTextContentElement.cpp:
2808         (WebCore::SVGTextContentElement::parseAttribute):
2809         (WebCore::SVGTextContentElement::textLengthAnimated):
2810         * svg/SVGTextContentElement.h:
2811         * svg/SVGTextPathElement.cpp:
2812         (WebCore::SVGTextPathElement::parseAttribute):
2813         * svg/SVGTextPathElement.h:
2814         * svg/SVGTextPositioningElement.h:
2815         * svg/SVGUseElement.cpp:
2816         (WebCore::SVGUseElement::parseAttribute):
2817         * svg/SVGUseElement.h:
2818         * svg/properties/SVGAnimatedPropertyAccessorImpl.h:
2819         * svg/properties/SVGAnimatedPropertyDescription.h: Removed.
2820         * svg/properties/SVGAnimationAdditiveListFunctionImpl.h:
2821         (WebCore::SVGAnimationLengthListFunction::animate):
2822         * svg/properties/SVGAnimationAdditiveValueFunctionImpl.h:
2823         (WebCore::SVGAnimationLengthFunction::animate):
2824         * svg/properties/SVGValuePropertyAnimatorImpl.h:
2825         * svg/properties/SVGValuePropertyListAnimatorImpl.h:
2826
2827 2019-09-12  Chris Dumez  <cdumez@apple.com>
2828
2829         Node.replaceChild()'s pre-replacement validations are not done in the right order
2830         https://bugs.webkit.org/show_bug.cgi?id=201741
2831
2832         Reviewed by Geoffrey Garen.
2833
2834         Node.replaceChild()'s pre-replacement validations are not done in the right order (spec order):
2835         - https://dom.spec.whatwg.org/#concept-node-replace
2836
2837         In particular, we do not do check 3 (If child’s parent is not parent, then throw a
2838         "NotFoundError" DOMException.) at the right time, because we were making this check
2839         *after* checkPreReplacementValidity(), instead of *during*.
2840
2841         No new tests, rebaselined existing test.
2842
2843         * dom/ContainerNode.cpp:
2844         (WebCore::checkAcceptChild):
2845         (WebCore::ContainerNode::ensurePreInsertionValidity):
2846         (WebCore::checkPreReplacementValidity):
2847         (WebCore::ContainerNode::replaceChild):
2848
2849 2019-09-12  Ryan Haddad  <ryanhaddad@apple.com>
2850
2851         Unreviewed, rolling out r249801.
2852
2853         Caused two servier worker layout tests to become flaky.
2854
2855         Reverted changeset:
2856
2857         "Use WebProcess processIdentifier to identify Service Worker
2858         connections"
2859         https://bugs.webkit.org/show_bug.cgi?id=201459
2860         https://trac.webkit.org/changeset/249801
2861
2862 2019-09-12  Chris Dumez  <cdumez@apple.com>
2863
2864         [WKTR] Drop TestRunner.setPrivateBrowsingEnabled_DEPRECATED()
2865         https://bugs.webkit.org/show_bug.cgi?id=201546
2866
2867         Reviewed by Alex Christensen.
2868
2869         Drop TestRunner.setPrivateBrowsingEnabled_DEPRECATED() from WebKitTestRunner as it does not do
2870         the right thing for WebKit2 and tests have been rewritten to not use it.
2871
2872         * page/PageGroup.cpp:
2873         (WebCore::PageGroup::addPage):
2874         (WebCore::PageGroup::setSessionIDForTesting): Deleted.
2875         * page/PageGroup.h:
2876         (): Deleted.
2877
2878 2019-09-12  Saam Barati  <sbarati@apple.com>
2879
2880         [WHLSL] Slim down WSLMatrix and inline constructors in native code
2881         https://bugs.webkit.org/show_bug.cgi?id=201568
2882
2883         Reviewed by Robin Morisset.
2884
2885         Before, our WSL Matrix in MSL had templates to figure out how we're 
2886         constructing it. For example, with a list of elements, or a list of
2887         columns. However, we can remove this template code since when we're
2888         emitting Metal code, we know exactly how we're constructing the WSL
2889         matrix. So the NativeFunctionWriter now inlines the proper stores
2890         into the WSLMatrix elements.
2891         
2892         This patch speeds up Metal compile times in boids by ~4ms (16%) with
2893         a p-value of 0.0001.
2894
2895         Covered by existing tests.
2896
2897         * Modules/webgpu/WHLSL/Metal/WHLSLMetalCodeGenerator.cpp:
2898         (WebCore::WHLSL::Metal::metalCodePrologue):
2899         * Modules/webgpu/WHLSL/Metal/WHLSLNativeFunctionWriter.cpp:
2900         (WebCore::WHLSL::Metal::inlineNativeFunction):
2901
2902 2019-09-12  Wenson Hsieh  <wenson_hsieh@apple.com>
2903
2904         [Cocoa] Text indicator for an image link on the front page of apple.com looks wrong
2905         https://bugs.webkit.org/show_bug.cgi?id=201724
2906         <rdar://problem/54622894>
2907
2908         Reviewed by Tim Horton.
2909
2910         When computing the bounds of the range (<a>, 0) to (<a>, 1) for a text indicator snapshot where <a> is a link
2911         with a single non-breaking whitespace character, we currently use the text rect of the single space. This leads
2912         to a confusing text indicator, as the resulting snapshot is a tiny blank square in the top left corner of the
2913         link. This problem manifests when starting a drag or showing the system context menu on iOS, or force clicking
2914         or three-finger tapping to show a preview on macOS.
2915
2916         To address this scenario, tweak the heuristic in the case where the text indicator option
2917         TextIndicatorOptionUseBoundingRectAndPaintAllContentForComplexRanges is specified, such that we consider a range
2918         containing only text with whitespaces to be "complex"; additionally, instead of falling back to the range's
2919         bounding rect (which in this case is still tiny), fall back to the common ancestor container's bounding rect,
2920         which encompasses not only the text inside the range but also the element containing the range (in this case,
2921         the anchor element).
2922
2923         Test: fast/text-indicator/text-indicator-empty-link.html
2924
2925         * page/TextIndicator.cpp:
2926         (WebCore::containsOnlyWhiteSpaceText):
2927
2928         Add a helper to determine whether a Range is comprised only of rendered text that only contains whitespace
2929         characters.
2930
2931         (WebCore::initializeIndicator):
2932
2933         See ChangeLog entry above for more detail.
2934
2935 2019-09-12  Brady Eidson  <beidson@apple.com>
2936
2937         PDF exporting on iOS should include URL rects.
2938         <rdar://problem/54900133> and https://bugs.webkit.org/show_bug.cgi?id=201693
2939
2940         Reviewed by Tim Horton.
2941
2942         Turns out that PDF exporting on iOS works fine.
2943
2944         Tracking back through history it was disabled at least pre-2014.
2945
2946         It was almost certainly disabled because it didn't work way back then,
2947         but it works great now.
2948
2949         * platform/graphics/cg/GraphicsContextCG.cpp:
2950         (WebCore::GraphicsContext::setURLForRect): Remove the iOS platform exclusion.
2951
2952 2019-09-12  Adrian Perez de Castro  <aperez@igalia.com>
2953
2954         [GTK][WPE] webkit_settings_set_user_agent() allows content forbidden in HTTP headers
2955         https://bugs.webkit.org/show_bug.cgi?id=201077
2956
2957         Reviewed by Carlos Garcia Campos.
2958
2959         Add a function to validate whether a string contains a valid value
2960         which can be used in a HTTP User-Agent header.
2961
2962         Covered by new WebCore API test HTTPParsers.ValidateUserAgentValues.
2963
2964         * platform/glib/UserAgentGLib.cpp:
2965         (WebCore::standardUserAgent): Assert that the returned string is a valid User-Agent.
2966         (WebCore::standardUserAgentForURL): Ditto.
2967         * platform/network/HTTPParsers.cpp: Added a series of helper functions which skip over
2968         characters of a string, which can be used to scan over the different elements of an
2969         User-Agent value; all of them receive the position from the input string where to start
2970         scanning, updating it to the position right after the scanned item (this follow the
2971         convention already in use by other functions in the source file). Each of them has
2972         been annotated with the RFC number and section which contains the definition of the
2973         scanned item, and the corresponding BNF rules to make the code easier to follow.
2974         (WebCore::skipWhile): Added.
2975         (WebCore::isVisibleCharacter): Added.
2976         (WebCore::isOctectInFieldContentCharacter): Added.
2977         (WebCore::isCommentTextCharacter): Added.
2978         (WebCore::isHTTPTokenCharacter): Added.
2979         (WebCore::isValidHTTPToken): Refactored to use the new isHTTPTokenCharacter()
2980         helper function instead of having the test inside the loop.
2981         (WebCore::skipCharacter): Added.
2982         (WebCore::skipQuotedPair): Added.
2983         (WebCore::skipComment): Added.
2984         (WebCore::skipHTTPToken): Added.
2985         (WebCore::skipUserAgentProduct): Added.
2986         (WebCore::isValidUserAgentHeaderValue): Added.
2987         * platform/network/HTTPParsers.h: Add prototype for isValidUserAgentHeaderValue().
2988
2989 2019-09-12  Mark Lam  <mark.lam@apple.com>
2990
2991         Harden JSC against the abuse of runtime options.
2992         https://bugs.webkit.org/show_bug.cgi?id=201597
2993         <rdar://problem/55167068>
2994
2995         Reviewed by Filip Pizlo.
2996
2997         No new tests.  Covered by existing tests.
2998
2999         Enable Options::useDollarVM before we tell the JSGlobalObject to exposeDollarVM().
3000         The $vm utility is now hardened to require that Options::useDollarVM be
3001         enabled in order for it to be used.
3002
3003         * testing/js/WebCoreTestSupport.cpp:
3004         (WebCoreTestSupport::injectInternalsObject):
3005
3006 2019-09-12  Youenn Fablet  <youenn@apple.com>
3007
3008         Use typed identifiers for IDB connection identifiers
3009         https://bugs.webkit.org/show_bug.cgi?id=201682
3010
3011         Reviewed by Chris Dumez.
3012
3013         Migrate from uint64_t to a typed identifier for IDB connection identifiers.
3014         The identifier is reusing the process identifier type.
3015         No change of behavior.
3016
3017         * Modules/indexeddb/client/IDBConnectionProxy.h:
3018         (WebCore::IDBClient::IDBConnectionProxy::serverConnectionIdentifier const):
3019         * Modules/indexeddb/client/IDBConnectionToServer.cpp:
3020         (WebCore::IDBClient::IDBConnectionToServer::identifier const):
3021         * Modules/indexeddb/client/IDBConnectionToServer.h:
3022         * Modules/indexeddb/client/IDBConnectionToServerDelegate.h:
3023         * Modules/indexeddb/server/IDBConnectionToClient.cpp:
3024         (WebCore::IDBServer::IDBConnectionToClient::identifier const):
3025         * Modules/indexeddb/server/IDBConnectionToClient.h:
3026         * Modules/indexeddb/server/IDBConnectionToClientDelegate.h:
3027         * Modules/indexeddb/server/IDBServer.cpp:
3028         (WebCore::IDBServer::IDBServer::getAllDatabaseNames):
3029         (WebCore::IDBServer::IDBServer::performGetAllDatabaseNames):
3030         (WebCore::IDBServer::IDBServer::didGetAllDatabaseNames):
3031         * Modules/indexeddb/server/IDBServer.h:
3032         * Modules/indexeddb/shared/IDBRequestData.cpp:
3033         (WebCore::IDBRequestData::serverConnectionIdentifier const):
3034         * Modules/indexeddb/shared/IDBRequestData.h:
3035         * Modules/indexeddb/shared/IDBResourceIdentifier.cpp:
3036         (WebCore::IDBResourceIdentifier::IDBResourceIdentifier):
3037         (WebCore::IDBResourceIdentifier::emptyValue):
3038         (WebCore::IDBResourceIdentifier::deletedValue):
3039         (WebCore::IDBResourceIdentifier::isHashTableDeletedValue const):
3040         (WebCore::IDBResourceIdentifier::loggingString const):
3041         * Modules/indexeddb/shared/IDBResourceIdentifier.h:
3042         (WebCore::IDBResourceIdentifier::hash const):
3043         (WebCore::IDBResourceIdentifier::connectionIdentifier const):
3044         (WTF::crossThreadCopy):
3045         * Modules/indexeddb/shared/InProcessIDBServer.cpp:
3046         (WebCore::InProcessIDBServer::identifier const):
3047         * Modules/indexeddb/shared/InProcessIDBServer.h:
3048
3049 2019-09-12  Youenn Fablet  <youenn@apple.com>
3050
3051         Use WebProcess processIdentifier to identify Service Worker connections
3052         https://bugs.webkit.org/show_bug.cgi?id=201459
3053
3054         Reviewed by Chris Dumez.
3055
3056         No observable change of behavior.
3057
3058         * workers/service/ServiceWorkerClient.cpp:
3059         (WebCore::ServiceWorkerClient::postMessage):
3060         Pass sessionID to ease NetworkProcess selection of the client process connection.
3061         * workers/service/ServiceWorkerTypes.h:
3062         Mark server connection identifier be process identifier based.
3063         * workers/service/context/SWContextManager.h:
3064         * workers/service/server/SWServer.cpp:
3065         (WebCore::SWServer::Connection::Connection):
3066         * workers/service/server/SWServer.h:
3067         Let connection identifier be set in constructor instead of generated.
3068
3069 2019-09-11  Youenn Fablet  <youenn@apple.com>
3070
3071         Disable DTLS1.0
3072         https://bugs.webkit.org/show_bug.cgi?id=201679
3073
3074         Reviewed by Alex Christensen.
3075
3076         Add an option to force to use DTLS1.0 and nothing else.
3077         Add internals API to enter in that mode to verify that normal configurations cannot communicate with DTLS1.0.
3078
3079         Test: webrtc/datachannel/dtls10.html
3080
3081         * platform/mediastream/libwebrtc/LibWebRTCProvider.cpp:
3082         (WebCore::LibWebRTCProvider::setEnableWebRTCEncryption):
3083         (WebCore::LibWebRTCProvider::setUseDTLS10):
3084         * platform/mediastream/libwebrtc/LibWebRTCProvider.h:
3085         * testing/Internals.cpp:
3086         (WebCore::Internals::setUseDTLS10):
3087         * testing/Internals.h:
3088         * testing/Internals.idl:
3089
3090 2019-09-11  Keith Rollin  <krollin@apple.com>
3091
3092         Log timeoutValue passed on to CFNetwork
3093         https://bugs.webkit.org/show_bug.cgi?id=201701
3094         <rdar://problem/55279683>
3095
3096         Reviewed by Chris Dumez.
3097
3098         Export ResourceRequest::timeoutValue for use in WebKit.
3099
3100         No new tests -- no new or changed functionality.
3101
3102         * platform/network/ResourceRequestBase.h:
3103
3104 2019-09-11  Saam Barati  <sbarati@apple.com>
3105
3106         [WHLSL] Remove null from the standard library
3107         https://bugs.webkit.org/show_bug.cgi?id=201672
3108
3109         Reviewed by Robin Morisset.
3110
3111         I meant to remove `null` from the standard library in r249351, but
3112         I had omitted the code I wrote to do that when I rebased that patch.
3113         This patch removes it and ensures all tests pass when parsing the entire
3114         standard library.
3115
3116         * Modules/webgpu/WHLSL/WHLSLStandardLibrary.txt:
3117
3118 2019-09-11  Chris Dumez  <cdumez@apple.com>
3119
3120         Use same parser for <meta http-equiv="refresh"> and `Refresh` HTTP header
3121         https://bugs.webkit.org/show_bug.cgi?id=201694
3122
3123         Reviewed by Alex Christensen.
3124
3125         Use same parser for <meta http-equiv="refresh"> and `Refresh` HTTP header. This aligns
3126         our behavior with Blink and makes us more compliant on web-platform-tests. This also
3127         simplifies our code.
3128
3129         No new tests, rebaselined existing test.
3130
3131         * loader/FrameLoader.cpp:
3132         (WebCore::FrameLoader::receivedFirstData):
3133         * platform/network/HTTPParsers.cpp:
3134         (WebCore::parseHTTPRefresh): Deleted.
3135         * platform/network/HTTPParsers.h:
3136
3137 2019-09-11  Saam Barati  <sbarati@apple.com>
3138
3139         [WHLSL] Ensure structs/arrays with pointers as fields are disallowed
3140         https://bugs.webkit.org/show_bug.cgi?id=201525
3141
3142         Reviewed by Robin Morisset.
3143
3144         This patch adds a pass which both ensures that references are always initialized with
3145         concrete values and that we support logical mode validation by disallowing nested references.
3146         
3147         Specifically, the pass:
3148         
3149         1. Disallows structs to have fields which are references. This prevents us from having to
3150         figure out how to default initialize such a struct. We could relax this in the future if we
3151         did an analysis on which structs contain reference fields, and ensure such struct variables
3152         always have initializers. This would also require us to create constructors for structs which
3153         initialize each field.
3154         2. We also do the same for arrays.
3155         3. References can only be one level deep. So no pointers to pointers. No references to
3156         references, etc. This is to support logical mode validation rules.
3157
3158         Test: webgpu/whlsl/ensure-proper-pointer-usage.html
3159
3160         * Modules/webgpu/WHLSL/WHLSLCheckReferenceTypes.cpp: Added.
3161         (WebCore::WHLSL::checkReferenceTypes):
3162         * Modules/webgpu/WHLSL/WHLSLCheckReferenceTypes.h: Added.
3163         * Modules/webgpu/WHLSL/WHLSLChecker.cpp:
3164         (WebCore::WHLSL::Checker::visit):
3165         * Modules/webgpu/WHLSL/WHLSLPrepare.cpp:
3166         (WebCore::WHLSL::prepareShared):
3167         * Sources.txt:
3168         * WebCore.xcodeproj/project.pbxproj:
3169
3170 2019-09-11  Devin Rousso  <drousso@apple.com>
3171
3172         Web Inspector: Canvas: instrument WebGPUDevice instead of GPUCanvasContext
3173         https://bugs.webkit.org/show_bug.cgi?id=201650
3174
3175         Reviewed by Joseph Pecoraro.
3176
3177         Most of the actual "work" done with Web GPU actually uses a `WebGPUDevice`.
3178
3179         A `GPUCanvasContext` is basically just a display "client" of the device, and isn't even
3180         required (e.g. compute pipeline).  We should treat the `GPUCanvasContext` almost like a
3181         `-webkit-canvas` client of a `WebGPUDevice`.
3182
3183         Tests: inspector/canvas/create-context-webgpu.html
3184                inspector/canvas/requestClientNodes-webgpu.html
3185                inspector/canvas/resolveContext-webgpu.html
3186
3187         * Modules/webgpu/WebGPUAdapter.cpp:
3188         (WebCore::WebGPUAdapter::requestDevice const):
3189         Notify web inspector after a device is created.
3190
3191         * Modules/webgpu/WebGPUDevice.idl:
3192         * Modules/webgpu/WebGPUDevice.h:
3193         * Modules/webgpu/WebGPUDevice.cpp:
3194         (WebCore::WebGPUDevice::instances): Added.
3195         (WebCore::WebGPUDevice::instancesMutex): Added.
3196         (WebCore::WebGPUDevice::~WebGPUDevice): Added.
3197         Notify web inspector when the device is about to be destructed.
3198
3199         * Modules/webgpu/GPUCanvasContext.h:
3200         * Modules/webgpu/GPUCanvasContext.cpp:
3201         (WebCore::GPUCanvasContext::create):
3202         (WebCore::GPUCanvasContext::configureSwapChain):
3203
3204         * inspector/InspectorCanvas.h:
3205         * inspector/InspectorCanvas.cpp:
3206         (WebCore::canvasIfContextMatchesDevice): Added.
3207         (WebCore::InspectorCanvas::create):
3208         (WebCore::InspectorCanvas::InspectorCanvas):
3209         (WebCore::InspectorCanvas::canvasContext const): Added.
3210         (WebCore::InspectorCanvas::canvasElement const): Added.
3211         (WebCore::InspectorCanvas::isDeviceForCanvasContext const): Added.
3212         (WebCore::InspectorCanvas::deviceContext const): Added.
3213         (WebCore::InspectorCanvas::scriptExecutionContext const): Added.
3214         (WebCore::InspectorCanvas::resolveContext const): Added.
3215         (WebCore::InspectorCanvas::clientNodes const): Added.
3216         (WebCore::InspectorCanvas::canvasChanged):
3217         (WebCore::InspectorCanvas::resetRecordingData):
3218         (WebCore::InspectorCanvas::recordAction):
3219         (WebCore::InspectorCanvas::buildObjectForCanvas):
3220         (WebCore::InspectorCanvas::releaseObjectForRecording):
3221         (WebCore::InspectorCanvas::getCanvasContentAsDataURL):
3222         (WebCore::InspectorCanvas::buildInitialState):
3223         (WebCore::InspectorCanvas::canvasElement): Deleted.
3224         * inspector/InspectorInstrumentation.cpp:
3225         (WebCore::InspectorInstrumentation::didCreateWebGPUDeviceImpl): Added.
3226         (WebCore::InspectorInstrumentation::willDestroyWebGPUDeviceImpl): Added.
3227         (WebCore::InspectorInstrumentation::willConfigureSwapChainImpl): Added.
3228         * inspector/InspectorInstrumentation.h:
3229         (WebCore::InspectorInstrumentation::didCreateWebGPUDevice): Added.
3230         (WebCore::InspectorInstrumentation::willDestroyWebGPUDevice): Added.
3231         (WebCore::InspectorInstrumentation::willConfigureSwapChain): Added.
3232
3233         * inspector/agents/InspectorCanvasAgent.h:
3234         * inspector/agents/InspectorCanvasAgent.cpp:
3235         (WebCore::InspectorCanvasAgent::enable):
3236         (WebCore::InspectorCanvasAgent::requestClientNodes): Added.
3237         (WebCore::InspectorCanvasAgent::resolveContext): Added.
3238         (WebCore::InspectorCanvasAgent::startRecording):
3239         (WebCore::InspectorCanvasAgent::stopRecording):
3240         (WebCore::InspectorCanvasAgent::frameNavigated):
3241         (WebCore::InspectorCanvasAgent::didChangeCSSCanvasClientNodes):
3242         (WebCore::InspectorCanvasAgent::didChangeCanvasMemory):
3243         (WebCore::InspectorCanvasAgent::canvasDestroyed):
3244         (WebCore::InspectorCanvasAgent::recordCanvasAction):
3245         (WebCore::InspectorCanvasAgent::didFinishRecordingCanvasFrame):
3246         (WebCore::InspectorCanvasAgent::didCreateWebGPUDevice): Added.
3247         (WebCore::InspectorCanvasAgent::willDestroyWebGPUDevice): Added.
3248         (WebCore::InspectorCanvasAgent::willConfigureSwapChain): Added.
3249         (WebCore::InspectorCanvasAgent::clearCanvasData):
3250         (WebCore::InspectorCanvasAgent::bindCanvas):
3251         (WebCore::InspectorCanvasAgent::unbindCanvas):
3252         (WebCore::InspectorCanvasAgent::findInspectorCanvas):
3253         (WebCore::InspectorCanvasAgent::requestCSSCanvasClientNodes): Deleted.
3254         (WebCore::contextAsScriptValue): Deleted.
3255         (WebCore::InspectorCanvasAgent::resolveCanvasContext): Deleted.
3256
3257         * inspector/InspectorShaderProgram.cpp:
3258         (WebCore::InspectorShaderProgram::context const):
3259
3260 2019-09-11  Chris Dumez  <cdumez@apple.com>
3261
3262         Posting a message to a redundant service worker should fail silently instead of throwing
3263         https://bugs.webkit.org/show_bug.cgi?id=201696
3264
3265         Reviewed by Geoffrey Garen.
3266
3267         Posting a message to a redundant service worker should fail silently instead of throwing:
3268         - https://w3c.github.io/ServiceWorker/#dom-serviceworker-postmessage-message-options
3269         - https://w3c.github.io/ServiceWorker/#run-service-worker (step 2)
3270
3271         No new tests, rebaselined existing test.
3272
3273         * workers/service/ServiceWorker.cpp:
3274         (WebCore::ServiceWorker::postMessage):
3275         * workers/service/server/SWServer.cpp:
3276         (WebCore::SWServer::runServiceWorkerIfNecessary):
3277
3278 2019-09-11  Chris Dumez  <cdumez@apple.com>
3279
3280         Align our XPath API with the specification and other browsers
3281         https://bugs.webkit.org/show_bug.cgi?id=201660
3282
3283         Reviewed by Geoffrey Garen.
3284
3285         Align our XPath API with the specification and other browsers:
3286         - Document/XPathEvaluator.createExpression()'s first parameter should be mandatory
3287         - Document/XPathEvaluator.evaluate()'s first 2 parameters should be mandatory
3288         - XPathExpression.evaluate()'s first parameter should be mandatory
3289
3290         I have confirmed in the latest Chrome and Firefox that they match the specification.
3291         
3292         No new tests, rebaselined existing test.
3293
3294         * dom/Document.cpp:
3295         (WebCore::Document::evaluate):
3296         * dom/Document.h:
3297         * dom/Document.idl:
3298         * inspector/InspectorNodeFinder.cpp:
3299         (WebCore::InspectorNodeFinder::searchUsingXPath):
3300         * xml/XPathEvaluator.cpp:
3301         (WebCore::XPathEvaluator::evaluate):
3302         * xml/XPathEvaluator.h:
3303         * xml/XPathEvaluator.idl:
3304         * xml/XPathExpression.cpp:
3305         (WebCore::XPathExpression::evaluate):
3306         * xml/XPathExpression.h:
3307         * xml/XPathExpression.idl:
3308         * xml/XPathUtil.cpp:
3309         (WebCore::XPath::isValidContextNode):
3310         * xml/XPathUtil.h:
3311
3312 2019-09-11  Simon Fraser  <simon.fraser@apple.com>
3313
3314         REGRESSION (iOS 13): Top fixed element on apple.com flickers in size while pinching in
3315         https://bugs.webkit.org/show_bug.cgi?id=201668
3316         rdar://problem/51934041
3317
3318         Reviewed by Frédéric Wang.
3319
3320         When computing the new layout viewport rect in ScrollingTreeFrameScrollingNode, use
3321         "StickToDocumentBounds" mode, not "StickToViewportBounds", because otherwise we'll compute
3322         a layout viewport that has negative top/left offsets which causes fixed elements to jump outside
3323         the viewport. The only code that should be moving things outside the viewport (a temporary effect
3324         that happens when pinching) is the 'isBelowMinimumScale' path in WebPageProxy::computeCustomFixedPositionRect().
3325
3326         With this change ScrollingTreeFrameScrollingNode no longer needs m_behaviorForFixed; it can be removed later.
3327
3328         Not currently testable, since it involves pinching in past minimum zoom and transients state.
3329
3330         * page/scrolling/ScrollingTreeFrameScrollingNode.cpp:
3331         (WebCore::ScrollingTreeFrameScrollingNode::layoutViewportForScrollPosition const):
3332
3333 2019-09-11  Truitt Savell  <tsavell@apple.com>
3334
3335         Unreviewed, rolling out r249753.
3336
3337         caused inspector/canvas/shaderProgram-add-remove-webgl.html to
3338         crash on all Mac platforms.
3339
3340         Reverted changeset:
3341
3342         "Web Inspector: Canvas: instrument WebGPUDevice instead of
3343         GPUCanvasContext"
3344         https://bugs.webkit.org/show_bug.cgi?id=201650
3345         https://trac.webkit.org/changeset/249753
3346
3347 2019-09-11  Antti Koivisto  <antti@apple.com>
3348
3349         REGRESSION (245006): can't scroll in "read more" view in Eventbrite app
3350         https://bugs.webkit.org/show_bug.cgi?id=201683
3351         <rdar://problem/54582602>
3352
3353         Reviewed by Simon Fraser.
3354
3355         * platform/RuntimeApplicationChecks.h:
3356         * platform/cocoa/RuntimeApplicationChecksCocoa.mm:
3357         (WebCore::IOSApplication::isEventbrite):
3358
3359 2019-09-11  Ryan Haddad  <ryanhaddad@apple.com>
3360
3361         Unreviewed, rolling out r249758.
3362
3363         Breaks the watchOS build.
3364
3365         Reverted changeset:
3366
3367         "[WHLSL] Ensure structs/arrays with pointers as fields are
3368         disallowed"
3369         https://bugs.webkit.org/show_bug.cgi?id=201525
3370         https://trac.webkit.org/changeset/249758
3371
3372 2019-09-11  Ali Juma  <ajuma@chromium.org>
3373
3374         Prevent reentrancy FrameLoader::dispatchUnloadEvents()
3375         https://bugs.webkit.org/show_bug.cgi?id=200738
3376
3377         Reviewed by Brady Eidson.
3378
3379         Reentrancy causes m_pageDismissalEventBeingDispatched to be incorrectly
3380         updated, so don't allow reentrancy.
3381
3382         Since this prevents m_pageDismissalEventBeingDispatched from being reset
3383         inside a reentrant call, it can have the unintended effect of causing
3384         FrameLoader::stopAllLoaders to early-out when called from
3385         FrameLoader::detachFromParent while a frame's unload event handler
3386         calls document.open() on a parent frame and causes itself to become
3387         detached. Allowing a load to continue in a detached frame will lead to
3388         a crash. To prevent this, add a new argument to FrameLoader::stopAllLoaders
3389         that FrameLoader::detachFromParent can use to prevent an early-out.
3390
3391         * loader/FrameLoader.cpp:
3392         (WebCore::FrameLoader::stopAllLoaders):
3393         (WebCore::FrameLoader::detachFromParent):
3394         (WebCore::FrameLoader::dispatchUnloadEvents):
3395         (WebCore::FrameLoader::dispatchBeforeUnloadEvent):
3396         Ensure that m_pageDismissalEventBeingDispatched is reset to its previous value, even if this is not None.
3397         * loader/FrameLoader.h:
3398         * loader/FrameLoaderTypes.h:
3399         Add a StopLoadingPolicy enum.
3400
3401 2019-09-11  Charlie Turner  <cturner@igalia.com>
3402
3403         [GStreamer] Do not adopt floating references.
3404         https://bugs.webkit.org/show_bug.cgi?id=201685
3405
3406         Reviewed by Carlos Garcia Campos.
3407
3408         Covered by existing tests.
3409
3410         * platform/graphics/gstreamer/GStreamerCommon.cpp:
3411         (WebCore::initializeGStreamer): gst_element_factory_make returns
3412         floating references, you do not adopt such references, rather you
3413         sink them.
3414
3415 2019-09-11  Saam Barati  <sbarati@apple.com>
3416
3417         [WHLSL] Ensure structs/arrays with pointers as fields are disallowed
3418         https://bugs.webkit.org/show_bug.cgi?id=201525
3419
3420         Reviewed by Robin Morisset.
3421
3422         This patch adds a pass which both ensures that references are always initialized with
3423         concrete values and that we support logical mode validation by disallowing nested references.
3424         
3425         Specifically, the pass:
3426         
3427         1. Disallows structs to have fields which are references. This prevents us from having to
3428         figure out how to default initialize such a struct. We could relax this in the future if we
3429         did an analysis on which structs contain reference fields, and ensure such struct variables
3430         always have initializers. This would also require us to create constructors for structs which
3431         initialize each field.
3432         2. We also do the same for arrays.
3433         3. References can only be one level deep. So no pointers to pointers. No references to
3434         references, etc. This is to support logical mode validation rules.
3435
3436         Test: webgpu/whlsl/ensure-proper-pointer-usage.html
3437
3438         * Modules/webgpu/WHLSL/WHLSLCheckReferenceTypes.cpp: Added.
3439         (WebCore::WHLSL::checkReferenceTypes):
3440         * Modules/webgpu/WHLSL/WHLSLCheckReferenceTypes.h: Added.
3441         * Modules/webgpu/WHLSL/WHLSLChecker.cpp:
3442         (WebCore::WHLSL::Checker::visit):
3443         * Modules/webgpu/WHLSL/WHLSLPrepare.cpp:
3444         (WebCore::WHLSL::prepareShared):
3445         * Sources.txt:
3446         * WebCore.xcodeproj/project.pbxproj:
3447
3448 2019-09-10  Devin Rousso  <drousso@apple.com>
3449
3450         Web Inspector: Canvas: instrument WebGPUDevice instead of GPUCanvasContext
3451         https://bugs.webkit.org/show_bug.cgi?id=201650
3452
3453         Reviewed by Joseph Pecoraro.
3454
3455         Most of the actual "work" done with Web GPU actually uses a `WebGPUDevice`.
3456
3457         A `GPUCanvasContext` is basically just a display "client" of the device, and isn't even
3458         required (e.g. compute pipeline).  We should treat the `GPUCanvasContext` almost like a
3459         `-webkit-canvas` client of a `WebGPUDevice`.
3460
3461         Tests: inspector/canvas/create-context-webgpu.html
3462                inspector/canvas/requestClientNodes-webgpu.html
3463                inspector/canvas/resolveContext-webgpu.html
3464
3465         * Modules/webgpu/WebGPUAdapter.cpp:
3466         (WebCore::WebGPUAdapter::requestDevice const):
3467         Notify web inspector after a device is created.
3468
3469         * Modules/webgpu/WebGPUDevice.idl:
3470         * Modules/webgpu/WebGPUDevice.h:
3471         * Modules/webgpu/WebGPUDevice.cpp:
3472         (WebCore::WebGPUDevice::instances): Added.
3473         (WebCore::WebGPUDevice::instancesMutex): Added.
3474         (WebCore::WebGPUDevice::~WebGPUDevice): Added.
3475         Notify web inspector when the device is about to be destructed.
3476
3477         * Modules/webgpu/GPUCanvasContext.h:
3478         * Modules/webgpu/GPUCanvasContext.cpp:
3479         (WebCore::GPUCanvasContext::create):
3480         (WebCore::GPUCanvasContext::configureSwapChain):
3481
3482         * inspector/InspectorCanvas.h:
3483         * inspector/InspectorCanvas.cpp:
3484         (WebCore::canvasIfContextMatchesDevice): Added.
3485         (WebCore::InspectorCanvas::create):
3486         (WebCore::InspectorCanvas::InspectorCanvas):
3487         (WebCore::InspectorCanvas::canvasContext const): Added.
3488         (WebCore::InspectorCanvas::canvasElement const): Added.
3489         (WebCore::InspectorCanvas::isDeviceForCanvasContext const): Added.
3490         (WebCore::InspectorCanvas::deviceContext const): Added.
3491         (WebCore::InspectorCanvas::scriptExecutionContext const): Added.
3492         (WebCore::InspectorCanvas::resolveContext const): Added.
3493         (WebCore::InspectorCanvas::clientNodes const): Added.
3494         (WebCore::InspectorCanvas::canvasChanged):
3495         (WebCore::InspectorCanvas::resetRecordingData):
3496         (WebCore::InspectorCanvas::recordAction):
3497         (WebCore::InspectorCanvas::buildObjectForCanvas):
3498         (WebCore::InspectorCanvas::releaseObjectForRecording):
3499         (WebCore::InspectorCanvas::getCanvasContentAsDataURL):
3500         (WebCore::InspectorCanvas::buildInitialState):
3501         (WebCore::InspectorCanvas::canvasElement): Deleted.
3502         * inspector/InspectorInstrumentation.cpp:
3503         (WebCore::InspectorInstrumentation::didCreateWebGPUDeviceImpl): Added.
3504         (WebCore::InspectorInstrumentation::willDestroyWebGPUDeviceImpl): Added.
3505         (WebCore::InspectorInstrumentation::willConfigureSwapChainImpl): Added.
3506         * inspector/InspectorInstrumentation.h:
3507         (WebCore::InspectorInstrumentation::didCreateWebGPUDevice): Added.
3508         (WebCore::InspectorInstrumentation::willDestroyWebGPUDevice): Added.
3509         (WebCore::InspectorInstrumentation::willConfigureSwapChain): Added.
3510
3511         * inspector/agents/InspectorCanvasAgent.h:
3512         * inspector/agents/InspectorCanvasAgent.cpp:
3513         (WebCore::InspectorCanvasAgent::enable):
3514         (WebCore::InspectorCanvasAgent::requestClientNodes): Added.
3515         (WebCore::InspectorCanvasAgent::resolveContext): Added.
3516         (WebCore::InspectorCanvasAgent::startRecording):
3517         (WebCore::InspectorCanvasAgent::stopRecording):
3518         (WebCore::InspectorCanvasAgent::frameNavigated):
3519         (WebCore::InspectorCanvasAgent::didChangeCSSCanvasClientNodes):
3520         (WebCore::InspectorCanvasAgent::didChangeCanvasMemory):
3521         (WebCore::InspectorCanvasAgent::canvasDestroyed):
3522         (WebCore::InspectorCanvasAgent::recordCanvasAction):
3523         (WebCore::InspectorCanvasAgent::didFinishRecordingCanvasFrame):
3524         (WebCore::InspectorCanvasAgent::didCreateWebGPUDevice): Added.
3525         (WebCore::InspectorCanvasAgent::willDestroyWebGPUDevice): Added.
3526         (WebCore::InspectorCanvasAgent::willConfigureSwapChain): Added.
3527         (WebCore::InspectorCanvasAgent::clearCanvasData):
3528         (WebCore::InspectorCanvasAgent::bindCanvas):
3529         (WebCore::InspectorCanvasAgent::unbindCanvas):
3530         (WebCore::InspectorCanvasAgent::findInspectorCanvas):
3531         (WebCore::InspectorCanvasAgent::requestCSSCanvasClientNodes): Deleted.
3532         (WebCore::contextAsScriptValue): Deleted.
3533         (WebCore::InspectorCanvasAgent::resolveCanvasContext): Deleted.
3534
3535         * inspector/InspectorShaderProgram.cpp:
3536         (WebCore::InspectorShaderProgram::context const):
3537
3538 2019-09-10  Chris Dumez  <cdumez@apple.com>
3539
3540         Nullptr crash in Page::sessionID() via WebKit::WebFrameLoaderClient::detachedFromParent2()
3541         https://bugs.webkit.org/show_bug.cgi?id=201625
3542
3543         Reviewed by Ryosuke Niwa.
3544
3545         This is based on a patch from Ryosuke Niwa.
3546
3547         Drop setHasFrameSpecificStorageAccess() in WebCore and call it from the WebKit layer instead.
3548
3549         * dom/DocumentStorageAccess.cpp:
3550         (WebCore::DocumentStorageAccess::requestStorageAccess):
3551         (WebCore::DocumentStorageAccess::setHasFrameSpecificStorageAccess): Deleted.
3552         * dom/DocumentStorageAccess.h:
3553         * loader/EmptyFrameLoaderClient.h:
3554         * loader/FrameLoaderClient.h:
3555
3556 2019-09-10  Brady Eidson  <beidson@apple.com>
3557
3558         Add SPI to save a PDF from the contents of a WKWebView.
3559         <rdar://problem/48955900> and https://bugs.webkit.org/show_bug.cgi?id=195765
3560
3561         Reviewed by Tim Horton.
3562
3563         Covered by API tests.
3564
3565         * page/FrameView.cpp:
3566         (WebCore::FrameView::paintContents): Don't paint the debug color outside of the FrameRect.
3567
3568         * platform/graphics/cg/GraphicsContextCG.cpp:
3569         (WebCore::GraphicsContext::setURLForRect):
3570
3571         * rendering/PaintPhase.h: Add "AnnotateLinks" option to always gather and annotation links.
3572
3573         * rendering/RenderElement.cpp:
3574         (WebCore::RenderElement::hasOutlineAnnotation const): Also return true when the PaintOptions include "AnnotateLinks"
3575
3576 2019-09-10  Jiewen Tan  <jiewen_tan@apple.com>
3577
3578         REGRESSION: [ Catalina WK2 ] http/wpt/webauthn/public-key-credential-create-success-u2f.https.html is failing
3579         https://bugs.webkit.org/show_bug.cgi?id=201620
3580         <rdar://problem/51524958>
3581
3582         Reviewed by Alex Christensen.
3583
3584         Covered by existing tests.
3585
3586         * Modules/webauthn/fido/U2fResponseConverter.cpp:
3587         (fido::WebCore::createAttestedCredentialDataFromU2fRegisterResponse):
3588         Change the way how the aaguid is initialized to see if that fixes the issue.
3589
3590 2019-09-10  Chris Dumez  <cdumez@apple.com>
3591
3592         Add missing origin check for Service-Worker-Allowed header
3593         https://bugs.webkit.org/show_bug.cgi?id=201653
3594
3595         Reviewed by Geoffrey Garen.
3596
3597         Add missing origin check for Service-Worker-Allowed header:
3598         - https://w3c.github.io/ServiceWorker/#update-algorithm (step 15. 2.)
3599
3600         * workers/service/ServiceWorkerJob.cpp:
3601         (WebCore::ServiceWorkerJob::didReceiveResponse):
3602
3603 2019-09-10  Sihui Liu  <sihui_liu@apple.com>
3604
3605         IndexedDB: cache prepared SQLiteStatement in SQLiteIDBCursor
3606         https://bugs.webkit.org/show_bug.cgi?id=201548
3607
3608         Reviewed by Alex Christensen.
3609
3610         This should be a performance improvement as we don't compile the same SQLiteStatement everytime it is used.
3611
3612         No new tests, no behavior change.
3613
3614         * Modules/indexeddb/server/SQLiteIDBCursor.cpp:
3615         (WebCore::IDBServer::SQLiteIDBCursor::internalFetchNextRecord):
3616         * Modules/indexeddb/server/SQLiteIDBCursor.h:
3617
3618 2019-09-10  Youenn Fablet  <youenn@apple.com>
3619
3620         RTCPeerConnection can only be instantiated in documents
3621         https://bugs.webkit.org/show_bug.cgi?id=201639
3622
3623         Reviewed by Alex Christensen.
3624
3625         Make it clear that RTCDataChannel expects Document since peer connections
3626         and data channels can only be instantiated in document environments.
3627         We keep one downcast in RTCPeerConnection constructor due to a limitation
3628         in binding generator for JS built-ins.
3629         No change of behavior.
3630
3631         * Modules/mediastream/RTCDataChannel.cpp:
3632         (WebCore::RTCDataChannel::create):
3633         (WebCore::RTCDataChannel::RTCDataChannel):
3634         * Modules/mediastream/RTCDataChannel.h:
3635         * Modules/mediastream/RTCPeerConnection.cpp:
3636         (WebCore::RTCPeerConnection::create):
3637         (WebCore::RTCPeerConnection::RTCPeerConnection):
3638         (WebCore::RTCPeerConnection::certificatesFromConfiguration):
3639         (WebCore::RTCPeerConnection::createDataChannel):
3640         (WebCore::RTCPeerConnection::document):
3641         * Modules/mediastream/RTCPeerConnection.h:
3642         * Modules/mediastream/RTCPeerConnection.idl:
3643         * Modules/mediastream/libwebrtc/LibWebRTCDataChannelHandler.cpp:
3644         (WebCore::LibWebRTCDataChannelHandler::channelEvent):
3645         * Modules/mediastream/libwebrtc/LibWebRTCDataChannelHandler.h:
3646         * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:
3647         (WebCore::LibWebRTCMediaEndpoint::OnDataChannel):
3648
3649 2019-09-10  Youenn Fablet  <youenn@apple.com>
3650
3651         Remove MediaStreamPrivate::scheduleDeferredTask
3652         https://bugs.webkit.org/show_bug.cgi?id=200975
3653
3654         Reviewed by Eric Carlson.
3655
3656         All calls to scheduleDeferredTask are done on the main thread.
3657         This was initially done to trigger less reconfiguration.
3658         But this makes the implementation significantly more complex.
3659
3660         For instance, we have to wait for the document to update its media state
3661         and send it to UIProcess before calling the allow completion handler.
3662
3663         Covered by existing tests.
3664
3665         * Modules/mediastream/MediaStream.cpp:
3666         (WebCore::MediaStream::MediaStream):
3667         Make sure to update the document media state once the tracks have been added, similarly to the other constructor.
3668         This ensures the document media state is computed with the new MediaStreamTrack.
3669         * Modules/mediastream/UserMediaRequest.cpp:
3670         (WebCore::isMediaStreamCorrectlyStarted):
3671         (WebCore::UserMediaRequest::allow):
3672         (WebCore::UserMediaRequest::stop):
3673         (WebCore::UserMediaRequest::mediaStreamDidFail):
3674         * Modules/mediastream/UserMediaRequest.h:
3675         * page/MediaProducer.h:
3676         (WebCore::MediaProducer::isCapturing):
3677         Make sure to include getDisplayMedia as part of capture check.
3678         * platform/mediastream/MediaStreamPrivate.cpp:
3679         (WebCore::MediaStreamPrivate::trackMutedChanged):
3680         (WebCore::MediaStreamPrivate::trackEnabledChanged):
3681         (WebCore::MediaStreamPrivate::trackStarted):
3682         (WebCore::MediaStreamPrivate::trackEnded):
3683         * platform/mediastream/MediaStreamPrivate.h:
3684
3685 2019-09-10  Youenn Fablet  <youenn@apple.com>
3686
3687         Audio sometimes fail to capture in WebRTC
3688         https://bugs.webkit.org/show_bug.cgi?id=180748
3689         <rdar://problem/36032346>
3690
3691         Reviewed by Eric Carlson.
3692
3693         In some cases, Safari is not receiving unsuspend notifications.
3694         In that case, the capture unit might stay in suspend state forever.
3695         To work around that, we force to unsuspend whenever there is a new capture happening.
3696         This will make it so that reloading the page will unsuspend the page.
3697
3698         Manually tested by triggering Siri, starting to use the microphone and quickly going back to a capturing page.
3699
3700         * platform/mediastream/mac/CoreAudioCaptureSource.cpp:
3701         (WebCore::CoreAudioSharedUnit::provideSpeakerData):
3702         When suspension happens, the buffer size might change.
3703         Since this is only an issue if there are some references data, we now do not fail the capture when there
3704         is no reference data.
3705         (WebCore::CoreAudioSharedUnit::resume):
3706         (WebCore::CoreAudioSharedUnit::prepareForNewCapture):
3707         Make sure to start with a clean slate by setting suspend state to false for the shared unit.
3708         And failing all previous sources in case we are going back from suspension.
3709         (WebCore::CoreAudioSharedUnit::startInternal):
3710         (WebCore::CoreAudioCaptureSourceFactory::audioCaptureDeviceManager):
3711         (WebCore::CoreAudioCaptureSource::CoreAudioCaptureSource):
3712
3713 2019-09-10  Adrian Perez de Castro  <aperez@igalia.com>
3714
3715         [GTK][WPE] Fixes for non-unified builds after r249022
3716         https://bugs.webkit.org/show_bug.cgi?id=201610
3717
3718         Reviewed by Joseph Pecoraro.
3719
3720         No new tests needed.
3721
3722         * fileapi/NetworkSendQueue.h: Add missing inclusion of wtf/WeakPtr.h; add the namespace to WTF::WeakPtr
3723         which is needed because there is no "using" clause.
3724         * inspector/InspectorInstrumentation.cpp: Add missing inclusion of the PageDOMDebuggerAgent.h header.
3725         * inspector/agents/WebDebuggerAgent.cpp: Add missing inclusion of the ScriptExecutionContext.h header.
3726         * inspector/agents/page/PageDOMDebuggerAgent.cpp: Add missing inclusion of the InstrumentingAgents.h header.
3727
3728 2019-09-10  Youenn Fablet  <youenn@apple.com>
3729
3730         Add support to RTCDataChannel.send(Blob)
3731         https://bugs.webkit.org/show_bug.cgi?id=201377
3732
3733         Reviewed by Chris Dumez.
3734
3735         Make use of NetworkSendQueue to enqueue and send properly messages.
3736         Test: imported/w3c/web-platform-tests/webrtc/RTCDataChannel-send-blob-order.html
3737
3738         * Modules/mediastream/RTCDataChannel.cpp:
3739         (WebCore::RTCDataChannel::createMessageQueue):
3740         (WebCore::RTCDataChannel::RTCDataChannel):
3741         (WebCore::RTCDataChannel::send):
3742         (WebCore::RTCDataChannel::close):
3743         * Modules/mediastream/RTCDataChannel.h:
3744
3745 2019-09-10  Ryosuke Niwa  <rniwa@webkit.org>
3746
3747         Option + arrow moves caret past whitespace on iOS
3748         https://bugs.webkit.org/show_bug.cgi?id=201575
3749
3750         Reviewed by Wenson Hsieh.
3751
3752         The bug was caused by findNextWordFromIndex on iOS behaving differently from macOS and UIKit by skipping
3753         trailing whitespace after a word when moving forward and not skipping leading whitespace when moving backward.
3754
3755         This patch introduces a new mode (StopAfterWord) of findNextWordFromIndex in iOS that better matches
3756         the behavior of findNextWordFromIndex on macOS and UIKit, and use it in various modify* functions of
3757         FrameSelection when the selection update is triggered by user.
3758
3759         The legacy mode (LegacyStopBeforeWord) is used in all other call sites as well as when modify* functions
3760         are invoked from author scripts.
3761
3762         Test: editing/selection/ios/move-by-word-with-keyboard.html
3763
3764         * editing/FrameSelection.cpp:
3765         (WebCore::nextWordWhitespaceModeInIOS): Added. A helper to convert EUserTriggered to NextWordModeInIOS.
3766         (WebCore::FrameSelection::nextWordPositionForPlatform):
3767         (WebCore::FrameSelection::modifyExtendingRight):
3768         (WebCore::FrameSelection::modifyExtendingForward):
3769         (WebCore::FrameSelection::modifyMovingRight):
3770         (WebCore::FrameSelection::modifyMovingForward):
3771         (WebCore::FrameSelection::modifyExtendingLeft):
3772         (WebCore::FrameSelection::modifyExtendingBackward):
3773         (WebCore::FrameSelection::modifyMovingLeft):
3774         (WebCore::FrameSelection::modifyMovingBackward):
3775         (WebCore::FrameSelection::modify):
3776         (WebCore::FrameSelection::updateAppearance):
3777         * editing/FrameSelection.h:
3778         * editing/TextIterator.cpp:
3779         (WebCore::SearchBuffer::isWordStartMatch const):
3780         * editing/VisibleUnits.cpp:
3781         (WebCore::previousWordPositionBoundary):
3782         (WebCore::previousWordPosition):
3783         (WebCore::nextWordPositionBoundary):
3784         (WebCore::nextWordPosition):
3785         * editing/VisibleUnits.h:
3786         * platform/text/TextBoundaries.cpp:
3787         (WebCore::findNextWordFromIndex):
3788         * platform/text/TextBoundaries.h:
3789         * platform/text/mac/TextBoundaries.mm:
3790         (WebCore::findNextWordFromIndex): Added a new mode.
3791
3792 2019-09-09  Chris Dumez  <cdumez@apple.com>
3793
3794         REGRESSION: http/tests/resourceLoadStatistics/do-not-capture-statistics-for-simple-top-navigations.html is frequently timing out on iOS EWS bots
3795         https://bugs.webkit.org/show_bug.cgi?id=201550
3796
3797         Reviewed by Alex Christensen.
3798
3799         * loader/ResourceLoadObserver.h:
3800         (WebCore::ResourceLoadObserver::hasStatistics const):
3801
3802 2019-09-09  Timothy Hatcher  <timothy@apple.com>
3803
3804         Tap and hold on Facebook sometimes creates a tall empty selection.
3805         https://bugs.webkit.org/show_bug.cgi?id=201618
3806         rdar://53630145
3807
3808         Reviewed by Megan Gardner.
3809
3810         API Test: SelectionTests.ByWordAtEndOfDocument
3811
3812         * editing/VisibleUnits.cpp:
3813         (WebCore::wordRangeFromPosition):
3814         Remove special case code for the possibility of an empty paragraph and at the end
3815         of the document. This is no longer needed and was causing a large selection to be
3816         created on Facebook due to large areas of non-selectable content on the page.
3817
3818 2019-09-09  Joonghun Park  <jh718.park@samsung.com>
3819
3820         getComputedStyle for line-height: normal should return the keyword instead of a length
3821         https://bugs.webkit.org/show_bug.cgi?id=201296
3822
3823         Reviewed by Ryosuke Niwa.
3824
3825         Per https://github.com/w3c/csswg-drafts/issues/3749,
3826         Gecko and Blink has this behavior already.
3827
3828         This patch makes WebKit has the same behavior with them.
3829
3830         Tests: imported/w3c/web-platform-tests/css/css-inline/parsing/line-height-computed.html
3831                imported/w3c/web-platform-tests/css/cssom/getComputedStyle-line-height.html
3832                imported/w3c/web-platform-tests/html/rendering/replaced-elements/the-select-element/select-1-line-height.html
3833
3834         * css/CSSComputedStyleDeclaration.cpp:
3835         (WebCore::lineHeightFromStyle):
3836
3837 2019-09-09  Alex Christensen  <achristensen@webkit.org>
3838
3839         Disable TLS 1.0 and 1.1 in WebSockets
3840         https://bugs.webkit.org/show_bug.cgi?id=201573
3841
3842         Reviewed by Youenn Fablet.
3843
3844         This expands on what I started in r249019 when I disabled legacy TLS for our use of NSURLSession.
3845         Since our WebSocket implementation uses a different network interface, disable legacy TLS for them, too.
3846         I use the same temporary default to re-enable legacy TLS.  I also add a unit test for both WebSockets and NSURLSession use.
3847
3848         * platform/network/cf/SocketStreamHandleImpl.h:
3849         * platform/network/cf/SocketStreamHandleImplCFNet.cpp:
3850         (WebCore::Function<bool):
3851         (WebCore::SocketStreamHandleImpl::setLegacyTLSEnabledCheck):
3852         (WebCore::SocketStreamHandleImpl::createStreams):
3853
3854 2019-09-09  Saam Barati  <sbarati@apple.com>
3855
3856         Unreviewed follow up to r249630. We need padding for ADDRESS32 CPUs to allow replaceWith to work on the intended types.
3857
3858         * Modules/webgpu/WHLSL/AST/WHLSLIndexExpression.h:
3859
3860 2019-09-09  Zalan Bujtas  <zalan@apple.com>
3861
3862         [LFC][TFC] Introduce cell spacing.
3863         https://bugs.webkit.org/show_bug.cgi?id=201605
3864         <rdar://problem/55184009>
3865
3866         Reviewed by Antti Koivisto.
3867
3868         This patch adds support for horizontal and vertical cell spacing (border-spacing). Now LFC matches table geometry for simple table content with multiple columns and rows. 
3869
3870         * layout/FormattingContextGeometry.cpp:
3871         (WebCore::Layout::FormattingContext::Geometry::contentHeightForFormattingContextRoot const): Now we can use the generic, check the inflow content logic for table height.
3872         * layout/LayoutUnits.h:
3873         (WebCore::Layout::HorizontalEdges::width const):
3874         (WebCore::Layout::VerticalEdges::height const):
3875         * layout/Verification.cpp:
3876         (WebCore::Layout::verifyAndOutputSubtree):
3877         * layout/tableformatting/TableFormattingContext.cpp:
3878         (WebCore::Layout::TableFormattingContext::layout):
3879         (WebCore::Layout::TableFormattingContext::layoutTableCellBox):
3880         (WebCore::Layout::TableFormattingContext::positionTableCells):
3881         (WebCore::Layout::TableFormattingContext::setComputedGeometryForRows):
3882         (WebCore::Layout::TableFormattingContext::setComputedGeometryForSections):
3883         (WebCore::Layout::TableFormattingContext::computedIntrinsicWidthConstraints):
3884         (WebCore::Layout::TableFormattingContext::ensureTableGrid):
3885         (WebCore::Layout::TableFormattingContext::computePreferredWidthForColumns):
3886         (WebCore::Layout::TableFormattingContext::computedTableWidth):
3887         (WebCore::Layout::TableFormattingContext::useAsContentLogicalWidth):
3888         * layout/tableformatting/TableFormattingContext.h:
3889         * layout/tableformatting/TableFormattingContextGeometry.cpp:
3890         (WebCore::Layout::TableFormattingContext::Geometry::tableCellHeightAndMargin const):
3891         * layout/tableformatting/TableGrid.cpp:
3892         (WebCore::Layout::TableGrid::appendCell):
3893         (WebCore::Layout::TableGrid::widthConstraints const):
3894         (WebCore::Layout::TableGrid::ColumnsContext::useAsLogicalWidth): Deleted.
3895         * layout/tableformatting/TableGrid.h:
3896         (WebCore::Layout::TableGrid::setHorizontalSpacing):
3897         (WebCore::Layout::TableGrid::horizontalSpacing const):
3898         (WebCore::Layout::TableGrid::setVerticalSpacing):
3899         (WebCore::Layout::TableGrid::verticalSpacing const):
3900         (WebCore::Layout::TableGrid::ColumnsContext::logicalWidth const):
3901
3902 2019-09-09  Ryan Haddad  <ryanhaddad@apple.com>
3903
3904         Unreviewed, rolling out r249574.
3905
3906         Caused fast/mediastream/media-stream-track-source-failure.html
3907         to become flaky.
3908
3909         Reverted changeset:
3910
3911         "Remove MediaStreamPrivate::scheduleDeferredTask"
3912         https://bugs.webkit.org/show_bug.cgi?id=200975
3913         https://trac.webkit.org/changeset/249574
3914
3915 2019-09-09  Rob Buis  <rbuis@igalia.com>
3916
3917         [GTK][WPE] Remove attributes deprecated from MathML3
3918         https://bugs.webkit.org/show_bug.cgi?id=197492
3919
3920         Reviewed by Frédéric Wang.
3921
3922         Remove some MathML3 deprecated attributes:
3923         https://github.com/mathml-refresh/mathml/issues/5#issuecomment-475506856
3924
3925         This change also maps the dir attribute to direction for MathML Core.
3926
3927         Test: imported/w3c/web-platform-tests/mathml/relations/css-styling/attribute-mapping-001.html
3928
3929         * mathml/MathMLElement.cpp:
3930         (WebCore::MathMLElement::collectStyleForPresentationAttribute):
3931
3932 2019-09-09  Youenn Fablet  <youenn@apple.com>
3933
3934         Move checkProcessLocalPortForActivity from provider to registry
3935         https://bugs.webkit.org/show_bug.cgi?id=201400
3936
3937         Reviewed by Alex Christensen.
3938
3939         Update the registry to take a callback that is used to implement checkProcessLocalPortForActivity.
3940         This allows WK1 and WK2 to have their own implementation.
3941
3942         Make the call to checkProcessLocalPortForActivity directly on the registry.
3943         Remove unneeded worker checkProcessLocalPortForActivity method.
3944         No change of behavior.
3945
3946         * dom/messageports/MessagePortChannel.cpp:
3947         (WebCore::MessagePortChannel::checkRemotePortForActivity):
3948         * dom/messageports/MessagePortChannelProvider.h:
3949         * dom/messageports/MessagePortChannelProviderImpl.cpp:
3950         (WebCore::createMessagePortChannelRegistry):
3951         (WebCore::MessagePortChannelProviderImpl::MessagePortChannelProviderImpl):
3952         (WebCore::MessagePortChannelProviderImpl::checkProcessLocalPortForActivity): Deleted.
3953         * dom/messageports/MessagePortChannelProviderImpl.h:
3954         * dom/messageports/MessagePortChannelRegistry.cpp:
3955         (WebCore::MessagePortChannelRegistry::MessagePortChannelRegistry):
3956         (WebCore::MessagePortChannelRegistry::checkProcessLocalPortForActivity):
3957         * dom/messageports/MessagePortChannelRegistry.h:
3958         (WebCore::MessagePortChannelRegistry::provider): Deleted.
3959         * dom/messageports/WorkerMessagePortChannelProvider.cpp:
3960         (WebCore::WorkerMessagePortChannelProvider::checkProcessLocalPortForActivity): Deleted.
3961         * dom/messageports/WorkerMessagePortChannelProvider.h:
3962
3963 2019-09-08  Saam Barati  <sbarati@apple.com>