[GStreamer] Add support to copy YUV video textures into images
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2019-09-03  Chris Lord  <clord@igalia.com>
2
3         [GStreamer] Add support to copy YUV video textures into images
4         https://bugs.webkit.org/show_bug.cgi?id=200922
5
6         Reviewed by Philippe Normand and Xabier Rodriguez-Calvar.
7
8         Use gst_gl_color_convert to convert to RGB before using ImageGStreamer
9         with gstreamer-gl.
10
11         No new tests, not changing behavior.
12
13         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
14         (WebCore::MediaPlayerPrivateGStreamerBase::paint):
15         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
16
17 2019-09-03  Chris Lord  <clord@igalia.com>
18
19         [GStreamer] Add support to copy YUV video textures into platform textures
20         https://bugs.webkit.org/show_bug.cgi?id=200914
21
22         Reviewed by Xabier Rodriguez-Calvar and Miguel Gomez.
23
24         Enable YUV (including planar and semi-planar) video texture to platform
25         texture copy in VideoTextureCopierGStreamer.
26
27         No new tests, not changing behavior.
28
29         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
30         (WebCore::GstVideoFrameHolder::platformLayerBuffer):
31         (WebCore::MediaPlayerPrivateGStreamerBase::pushTextureToCompositor):
32         (WebCore::MediaPlayerPrivateGStreamerBase::copyVideoTextureToPlatformTexture):
33         (WebCore::MediaPlayerPrivateGStreamerBase::nativeImageForCurrentTime):
34         * platform/graphics/gstreamer/VideoTextureCopierGStreamer.cpp:
35         (WebCore::VideoTextureCopierGStreamer::VideoTextureCopierGStreamer):
36         (WebCore::VideoTextureCopierGStreamer::copyVideoTextureToPlatformTexture):
37         * platform/graphics/gstreamer/VideoTextureCopierGStreamer.h:
38         * platform/graphics/texmap/TextureMapperPlatformLayerBuffer.h:
39         (WebCore::TextureMapperPlatformLayerBuffer::textureVariant):
40
41 2019-09-03  Zan Dobersek  <zdobersek@igalia.com>  and  Chris Lord  <clord@igalia.com>
42
43         [Texmap][GStreamer] Add support to upload more color formats into the texture
44         https://bugs.webkit.org/show_bug.cgi?id=132869
45
46         Reviewed by Xabier Rodriguez-Calvar.
47
48         Support non-interleaved YUV color for gstreamer-gl
49
50         This adds direct support for rendering I420, I444, YV12, YV21, Y42B,
51         NV12, NV21 and VUYA color formats using GLGL shaders when using
52         gstreamer-gl for video rendering. This avoids a surface copy on the GPU
53         in those cases.
54
55         No new tests, not changing behavior.
56
57         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
58         (WebCore::GstVideoFrameHolder::GstVideoFrameHolder):
59         (WebCore::GstVideoFrameHolder::waitForCPUSync):
60         (WebCore::GstVideoFrameHolder::hasMappedTextures const):
61         (WebCore::GstVideoFrameHolder::videoFrame const):
62         (WebCore::MediaPlayerPrivateGStreamerBase::pushTextureToCompositor):
63         (WebCore::MediaPlayerPrivateGStreamerBase::createVideoSinkGL):
64         * platform/graphics/gstreamer/VideoTextureCopierGStreamer.cpp:
65         (WebCore::VideoTextureCopierGStreamer::VideoTextureCopierGStreamer):
66         * platform/graphics/texmap/TextureMapperGL.cpp:
67         (WebCore::optionsForFilterType):
68         (WebCore::TextureMapperGL::drawTexture):
69         (WebCore::prepareTransformationMatrixWithFlags):
70         (WebCore::TextureMapperGL::drawTexturePlanarYUV):
71         (WebCore::TextureMapperGL::drawTextureSemiPlanarYUV):
72         (WebCore::TextureMapperGL::drawTexturePackedYUV):
73         (WebCore::TextureMapperGL::drawTexturedQuadWithProgram):
74         * platform/graphics/texmap/TextureMapperGL.h:
75         * platform/graphics/texmap/TextureMapperPlatformLayerBuffer.cpp:
76         (WebCore::TextureMapperPlatformLayerBuffer::TextureMapperPlatformLayerBuffer):
77         (WebCore::TextureMapperPlatformLayerBuffer::~TextureMapperPlatformLayerBuffer):
78         (WebCore::TextureMapperPlatformLayerBuffer::clone):
79         (WebCore::TextureMapperPlatformLayerBuffer::paintToTextureMapper):
80         * platform/graphics/texmap/TextureMapperPlatformLayerBuffer.h:
81         * platform/graphics/texmap/TextureMapperShaderProgram.cpp:
82         (WebCore::TextureMapperShaderProgram::create):
83         * platform/graphics/texmap/TextureMapperShaderProgram.h:
84
85 2019-09-03  Rob Buis  <rbuis@igalia.com>
86
87         Remove support for load/error on link=prefetch
88         https://bugs.webkit.org/show_bug.cgi?id=201348
89
90         Reviewed by Youenn Fablet.
91
92         Remove support for firing load/error on link=prefetch
93         to address tracking concerns.
94
95         Tests: http/wpt/prefetch/load-events-dynamic.html
96                http/wpt/prefetch/load-events.html
97
98         * html/HTMLLinkElement.cpp:
99         (WebCore::HTMLLinkElement::linkLoaded):
100         (WebCore::HTMLLinkElement::linkLoadingErrored):
101         * html/HTMLLinkElement.h:
102         * testing/Internals.cpp:
103         (WebCore::Internals::addPrefetchLoadEventListener):
104
105 2019-09-02  Yusuke Suzuki  <ysuzuki@apple.com>
106
107         [WebCore] Resource usage accounting should accept non KERN_SUCCESS
108         https://bugs.webkit.org/show_bug.cgi?id=201409
109
110         Reviewed by Andreas Kling.
111
112         While iterating threads, we are not suspending these threads. Underlying threads can have gone
113         at any time and we will get non KERN_SUCCESS error code when a thread has gone. We should ignore
114         these threads.
115
116         * page/cocoa/ResourceUsageThreadCocoa.mm:
117         (WebCore::threadInfos):
118
119 2019-09-02  Fujii Hironori  <Hironori.Fujii@sony.com>
120
121         [SVG] fragment-only url 'url(#fragment)' should be resolved against the current document with regardless to HTML <base> element
122         https://bugs.webkit.org/show_bug.cgi?id=189499
123         <rdar://problem/44466206>
124
125         Reviewed by Said Abou-Hallawa.
126
127         Fragment-only URL 'url(#fragment)' should be resolved against the
128         current document even if HTML <base> element is specified.
129         Spec: <https://drafts.csswg.org/css-values/#local-urls>
130
131         Tests: css3/filters/effect-reference-local-url-with-base.html
132                css3/masking/clip-path-reference-local-url-with-base.html
133                http/tests/svg/local-url-with-valid-base-and-resource.html
134                svg/animations/local-url-target-reference.html
135                svg/custom/local-url-reference-clip-path.html
136                svg/custom/local-url-reference-fill.html
137                svg/custom/local-url-reference-filter.html
138                svg/custom/local-url-reference-marker.html
139                svg/custom/local-url-reference-mask.html
140                svg/custom/local-url-reference-pattern.html
141                svg/custom/local-url-reference-radial-gradient.html
142                svg/custom/local-url-reference-srcdoc.html
143                svg/custom/local-url-reference-stroke.html
144                svg/custom/local-url-reference-use.html
145                svg/text/textpath-local-url-reference.html
146
147         * svg/SVGURIReference.cpp:
148         (WebCore::SVGURIReference::fragmentIdentifierFromIRIString): Return the fragment if the URL starts with '#'.
149
150 2019-09-02  Fujii Hironori  <Hironori.Fujii@sony.com>
151
152         [Win] Remove a unused PlatformWheelEvent constructor
153         https://bugs.webkit.org/show_bug.cgi?id=201398
154
155         Reviewed by Don Olmstead.
156
157         No behavior change.
158
159         * platform/PlatformWheelEvent.h:
160         * platform/win/WheelEventWin.cpp:
161         Removed a unused PlatformWheelEvent constructor.
162
163 2019-09-02  Brent Fulgham  <bfulgham@apple.com>
164
165         [FTW] NativeImagePtr is drawn with invalid scaling
166         https://bugs.webkit.org/show_bug.cgi?id=201391
167
168         Reviewed by Don Olmstead.
169
170         The current implementation of FTW improperly applies scaling factors to native images,
171         resulting in blocky images (in some cases).
172
173         This patch corrects the handling of native images, corrects a bug in bitmap render
174         context scaling, and retrieves more data from the ImageDecoder's metadata system.
175
176         * platform/graphics/win/Direct2DUtilities.cpp:
177         (WebCore::Direct2D::createBitmapRenderTargetOfSize): Supply an appropriately sized
178         pixel dimension for non-unity scale factors.
179         * platform/graphics/win/ImageBufferDirect2D.cpp:
180         (WebCore::ImageBuffer::ImageBuffer): Include the scale factor when creating a
181         bitmap render target.
182         * platform/graphics/win/ImageDecoderDirect2D.cpp:
183         (WebCore::ImageDecoderDirect2D::frameOrientationAtIndex const): Read the orientation
184         data form the image metadata.
185         (WebCore::ImageDecoderDirect2D::frameAllowSubsamplingAtIndex const): Always return
186         true, to match the CG implementation.
187         (WebCore::ImageDecoderDirect2D::frameHasAlphaAtIndex const): Correct to match the
188         behavior of CG.
189         * platform/graphics/win/NativeImageDirect2D.cpp:
190         (WebCore::drawNativeImage): Pass through the Direct2DOperations helper method, which
191         handles scaling and subsampling properly.
192
193 2019-09-02  Youenn Fablet  <youenn@apple.com>
194
195         Introduce WorkerMessagePortChannelRegistry
196         https://bugs.webkit.org/show_bug.cgi?id=201333
197
198         Reviewed by Alex Christensen.
199
200         This patch introduces a dedicated registry for workers.
201         This registry will hop to the main thread and use the
202         regular main thread registry to do the actual processing.
203
204         Covered by existing tests.
205
206         * Sources.txt:
207         * WebCore.xcodeproj/project.pbxproj:
208         * dom/Document.cpp:
209         (WebCore::Document::messagePortChannelProvider):
210         * dom/Document.h:
211         * dom/MessageChannel.cpp:
212         (WebCore::MessageChannel::MessageChannel):
213         * dom/MessagePort.cpp:
214         (WebCore::MessagePort::entangle):
215         (WebCore::MessagePort::postMessage):
216         (WebCore::MessagePort::disentangle):
217         (WebCore::MessagePort::close):
218         (WebCore::MessagePort::dispatchMessages):
219         (WebCore::MessagePort::hasPendingActivity const):
220         * dom/messageports/MessagePortChannel.cpp:
221         (WebCore::MessagePortChannel::takeAllMessagesForPort):
222         (WebCore::MessagePortChannel::checkRemotePortForActivity):
223         * dom/messageports/MessagePortChannel.h:
224         * dom/messageports/MessagePortChannelProvider.cpp:
225         (WebCore::MessagePortChannelProvider::singleton):
226         (WebCore::MessagePortChannelProvider::fromContext):
227         * dom/messageports/MessagePortChannelProvider.h:
228         * dom/messageports/MessagePortChannelProviderImpl.cpp:
229         (WebCore::MessagePortChannelProviderImpl::takeAllMessagesForPort):
230         (WebCore::MessagePortChannelProviderImpl::checkRemotePortForActivity):
231         * dom/messageports/MessagePortChannelProviderImpl.h:
232         * dom/messageports/MessagePortChannelRegistry.cpp:
233         (WebCore::MessagePortChannelRegistry::takeAllMessagesForPort):
234         (WebCore::MessagePortChannelRegistry::checkRemotePortForActivity):
235         * dom/messageports/MessagePortChannelRegistry.h:
236         * dom/messageports/WorkerMessagePortChannelProvider.cpp: Added.
237         (WebCore::WorkerMessagePortChannelProvider::WorkerMessagePortChannelProvider):
238         (WebCore::WorkerMessagePortChannelProvider::~WorkerMessagePortChannelProvider):
239         (WebCore::WorkerMessagePortChannelProvider::createNewMessagePortChannel):
240         (WebCore::WorkerMessagePortChannelProvider::entangleLocalPortInThisProcessToRemote):
241         (WebCore::WorkerMessagePortChannelProvider::messagePortDisentangled):
242         (WebCore::WorkerMessagePortChannelProvider::messagePortClosed):
243         (WebCore::WorkerMessagePortChannelProvider::postMessageToRemote):
244         (WebCore::WorkerMessagePortChannelProvider::takeAllMessagesForPort):
245         (WebCore::WorkerMessagePortChannelProvider::checkRemotePortForActivity):
246         (WebCore::WorkerMessagePortChannelProvider::checkProcessLocalPortForActivity):
247         * dom/messageports/WorkerMessagePortChannelProvider.h: Added.
248         * workers/WorkerGlobalScope.cpp:
249         (WebCore::WorkerGlobalScope::messagePortChannelProvider):
250         * workers/WorkerGlobalScope.h:
251
252 2019-09-01  Myles C. Maxfield  <mmaxfield@apple.com>
253
254         [WHLSL] Resources don't work when only a subset of a bind group is referenced by a shader
255         https://bugs.webkit.org/show_bug.cgi?id=201383
256
257         Reviewed by Dean Jackson.
258
259         Bind groups correspond to argument buffers in Metal. Both the Metal API and Metal Shading Language
260         have to agree on the layout of exactly which resources lie at which byte offsets within an argument
261         buffer.
262
263         Before this patch, we only emitted code for the items in the argument buffer that were actually
264         referenced by the shader source code. However, because these items are held inside a struct, if
265         we omit one item from the middle of the struct, the byte offets of all the successive items would
266         be wrong. This means that the Metal API and the shader would disagree about how to access these
267         resources, making the resources inaccessible (and causing security problems).
268
269         Tests: webgpu/whlsl/sparse-bind-group-2.html
270                webgpu/whlsl/sparse-bind-group-3.html
271                webgpu/whlsl/sparse-bind-group.html
272
273         * Modules/webgpu/WHLSL/Metal/WHLSLEntryPointScaffolding.cpp:
274         (WebCore::WHLSL::Metal::EntryPointScaffolding::emitResourceHelperTypes):
275         (WebCore::WHLSL::Metal::VertexEntryPointScaffolding::emitHelperTypes):
276         (WebCore::WHLSL::Metal::FragmentEntryPointScaffolding::emitHelperTypes):
277         (WebCore::WHLSL::Metal::ComputeEntryPointScaffolding::emitHelperTypes):
278         * Modules/webgpu/WHLSL/Metal/WHLSLEntryPointScaffolding.h:
279         * Modules/webgpu/WHLSL/WHLSLSemanticMatcher.cpp:
280         (WebCore::WHLSL::matchResources):
281         (WebCore::WHLSL::matchVertexAttributes):
282         (WebCore::WHLSL::matchColorAttachments):
283
284 2019-09-01  Commit Queue  <commit-queue@webkit.org>
285
286         Unreviewed, rolling out r249369.
287         https://bugs.webkit.org/show_bug.cgi?id=201394
288
289         broke WHLSL tests (Requested by litherum on #webkit).
290
291         Reverted changeset:
292
293         "[WHLSL] Resources don't work when only a subset of a bind
294         group is referenced by a shader"
295         https://bugs.webkit.org/show_bug.cgi?id=201383
296         https://trac.webkit.org/changeset/249369
297
298 2019-09-01  Fujii Hironori  <Hironori.Fujii@sony.com>
299
300         Unreviewed, rolling out r249366.
301
302         WinCairo WebKit2 crashes in some websites and the device scale
303         factor is not correct in high DPI.
304
305         Reverted changeset:
306
307         "[WinCairo, FTW] Properly handle device scale factor"
308         https://bugs.webkit.org/show_bug.cgi?id=201361
309         https://trac.webkit.org/changeset/249366
310
311 2019-09-01  Myles C. Maxfield  <mmaxfield@apple.com>
312
313         [WHLSL] Resources don't work when only a subset of a bind group is referenced by a shader
314         https://bugs.webkit.org/show_bug.cgi?id=201383
315
316         Reviewed by Dean Jackson.
317
318         Bind groups correspond to argument buffers in Metal. Both the Metal API and Metal Shading Language
319         have to agree on the layout of exactly which resources lie at which byte offsets within an argument
320         buffer.
321
322         Before this patch, we only emitted code for the items in the argument buffer that were actually
323         referenced by the shader source code. However, because these items are held inside a struct, if
324         we omit one item from the middle of the struct, the byte offets of all the successive items would
325         be wrong. This means that the Metal API and the shader would disagree about how to access these
326         resources, making the resources inaccessible (and causing security problems).
327
328         Tests: webgpu/whlsl/sparse-bind-group-2.html
329                webgpu/whlsl/sparse-bind-group-3.html
330                webgpu/whlsl/sparse-bind-group.html
331
332         * Modules/webgpu/WHLSL/Metal/WHLSLEntryPointScaffolding.cpp:
333         (WebCore::WHLSL::Metal::EntryPointScaffolding::emitResourceHelperTypes):
334         (WebCore::WHLSL::Metal::VertexEntryPointScaffolding::emitHelperTypes):
335         (WebCore::WHLSL::Metal::FragmentEntryPointScaffolding::emitHelperTypes):
336         (WebCore::WHLSL::Metal::ComputeEntryPointScaffolding::emitHelperTypes):
337         * Modules/webgpu/WHLSL/Metal/WHLSLEntryPointScaffolding.h:
338         * Modules/webgpu/WHLSL/WHLSLSemanticMatcher.cpp:
339         (WebCore::WHLSL::matchResources):
340         (WebCore::WHLSL::matchVertexAttributes):
341         (WebCore::WHLSL::matchColorAttachments):
342
343 2019-09-01  Said Abou-Hallawa  <sabouhallawa@apple.com>
344
345         HTMLImageElement::decode() should return a resolved promise for decoding non bitmap images
346         https://bugs.webkit.org/show_bug.cgi?id=201243
347
348         Reviewed by Youenn Fablet.
349
350         The specs: https://html.spec.whatwg.org/multipage/embedded-content.html#dom-img-decode
351         states that, decode() should resolve the pending promise if the decoding
352         was requested for a non bitmap image.
353
354         Test: fast/images/decode-non-bitmap-image-resolve.html
355
356         * loader/ImageLoader.cpp:
357         (WebCore::resolveDecodePromises):
358         (WebCore::rejectDecodePromises):
359         (WebCore::ImageLoader::notifyFinished):
360         (WebCore::ImageLoader::decode):
361         (WebCore::ImageLoader::decodeError): Deleted.
362         * loader/ImageLoader.h:
363         (WebCore::ImageLoader::hasPendingDecodePromises const):
364
365 2019-08-30  Brent Fulgham  <bfulgham@apple.com>
366
367         [WinCairo, FTW] Properly handle device scale factor
368         https://bugs.webkit.org/show_bug.cgi?id=201361
369
370         Reviewed by Don Olmstead.
371
372         Update the Direct2D ImageBuffer/ImageBufferData classes to correctly handle
373         the device scale factor.
374
375         * platform/graphics/win/ImageBufferDataDirect2D.cpp:
376         (WebCore::ImageBufferData::putData):
377         * platform/graphics/win/ImageBufferDirect2D.cpp:
378         (WebCore::ImageBuffer::putByteArray):
379
380 2019-08-31  Said Abou-Hallawa  <sabouhallawa@apple.com>
381
382         EXIF orientation should be respected when rendering images 
383         https://bugs.webkit.org/show_bug.cgi?id=201123
384
385         Reviewed by Simon Fraser.
386
387         -- Image::size() will return the rendered size based on the image
388            orientation. If image orientation is FromImage, ImageSource will query
389            the actual image orientation from the ImageDecoder. The low level APIs
390            might transpose the size just before calling the system API to draw
391            the image.
392
393         -- RenderElement::imageOrientation() will return ImageOrientation::FromImage
394            for all images and for all ports till the CSS image-orientation specs
395            is finalized.
396
397         -- The default of ImagePaintingOptions argument of GraphicsContext::drawImage()
398            will be changed to { ImageOrientation::FromImage }.
399
400         -- Image element: RenderImage::paintIntoRect() will pass imageOrientation()
401            which returns ImageOrientation::FromImage to GraphicsContext::drawImage().
402
403         -- CSS background image: RenderBoxModelObject::paintFillLayerExtended will
404            pass ImageOrientation::FromImage by default to GraphicsContext::drawTiledImage().
405
406         -- Images on canvas: CanvasRenderingContext2DBase::drawImage() will pass
407            ImageOrientation::FromImage by default to GraphicsContext::drawImage().
408
409         -- SVG images: RenderSVGImage::paintForeground() calls GraphicsContext::drawImage()
410            with the default ImagePaintingOptions which is now { ImageOrientation::FromImage }.
411
412         -- SVG feImage filters: FEImage::platformApplySoftware() calls
413            GraphicsContext::drawImage() with the default ImagePaintingOptions
414            which is now { ImageOrientation::FromImage }.
415
416         -- ImageDocument: RenderElement::imageOrientation() returns FromImage
417            always and for all ports.
418
419         Tests: fast/images/exif-orientation-background.html
420                fast/images/exif-orientation-canvas.html
421                fast/images/exif-orientation-content.html
422                fast/images/exif-orientation-element-object-fit.html
423                fast/images/exif-orientation-element.html
424                fast/images/exif-orientation-image-object.html
425                fast/images/exif-orientation-svg-feimage.html
426                fast/images/exif-orientation-svg-image.html
427
428         * html/canvas/CanvasRenderingContext2DBase.cpp:
429         (WebCore::CanvasRenderingContext2DBase::drawImage):
430         * loader/cache/CachedImage.cpp:
431         (WebCore::CachedImage::imageSizeForRenderer const):
432         * platform/graphics/BitmapImage.h:
433         * platform/graphics/CrossfadeGeneratedImage.h:
434         * platform/graphics/GeneratedImage.h:
435         * platform/graphics/GraphicsContext.h:
436         (WebCore::GraphicsContext::drawImage):
437         * platform/graphics/Image.h:
438         * platform/graphics/ImageFrame.h:
439         (WebCore::ImageFrame::sizeRespectingOrientation const): Deleted.
440         * platform/graphics/ImageSource.cpp:
441         (WebCore::ImageSource::ImageSource):
442         (WebCore::ImageSource::orientation):
443         (WebCore::ImageSource::size):
444         (WebCore::ImageSource::sizeRespectingOrientation): Deleted.
445         * platform/graphics/ImageSource.h:
446         * platform/graphics/cg/PDFDocumentImage.cpp:
447         (WebCore::PDFDocumentImage::size const):
448         * platform/graphics/cg/PDFDocumentImage.h:
449         * platform/mac/DragImageMac.mm:
450         (WebCore::createDragImageFromImage):
451         * rendering/RenderBoxModelObject.cpp:
452         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
453         * rendering/RenderElement.cpp:
454         (WebCore::RenderElement::imageOrientation const):
455         * rendering/RenderImage.cpp:
456         (WebCore::RenderImage::paintIntoRect):
457         * svg/graphics/SVGImage.h:
458         * svg/graphics/SVGImageForContainer.cpp:
459         (WebCore::SVGImageForContainer::size const):
460         * svg/graphics/SVGImageForContainer.h:
461
462 2019-08-31  Rob Buis  <rbuis@igalia.com>
463
464         XMLHttpRequest: responseXML returns null if the Content-Type is valid (end in +xml) in some cases
465         https://bugs.webkit.org/show_bug.cgi?id=46146
466
467         Reviewed by Youenn Fablet.
468
469         Make response MIME type fallback to text/xml in case mimeType could
470         not be extracted [1] and use the stricter ParsedContentType for that.
471
472         Behavior matches Firefox.
473
474         Test: web-platform-tests/xhr/responsexml-media-type.htm
475
476         [1] https://xhr.spec.whatwg.org/#response-mime-type
477
478         * xml/XMLHttpRequest.cpp:
479         (WebCore::XMLHttpRequest::responseMIMEType const):
480
481 2019-08-31  Frederic Wang  <fwang@igalia.com>
482
483         Fix interpretation of fraction shifts
484         https://bugs.webkit.org/show_bug.cgi?id=201242
485
486         Reviewed by Rob Buis.
487
488         In fractions, numerator/denominator shifts are currently interpreted relative to the math
489         axis while they should be relative to the baseline [1]. This patch refactors the
490         RenderMathMLFraction to do that and aligns more on MathML Core [2] [3]. This fixes serious
491         rendering bugs in fractions.
492
493         [1] https://github.com/mathml-refresh/mathml/issues/123
494         [2] https://mathml-refresh.github.io/mathml-core/#fraction-with-nonzero-line-thickness
495         [3] https://mathml-refresh.github.io/mathml-core/#fraction-with-zero-line-thickness
496
497         No new tests, existing tests updated.
498
499         * rendering/mathml/RenderMathMLFraction.h: ascentOverHorizontalAxis() is replaced with
500         fractionAscent() which gives the actual baseline position rather than the math axis position.
501         fractionParameters() and stackParameters() are modified so that they only return the shifts,
502         now stored in a shared FractionParameters struct.
503         * rendering/mathml/RenderMathMLFraction.cpp:
504         (WebCore::RenderMathMLFraction::fractionParameters const): Store existing parameters in local
505         variables and perform adjustments to the shift values so that the minimal gap constraints
506         are satisfied. Return them as a FractionParameters.
507         (WebCore::RenderMathMLFraction::stackParameters const): Ditto.
508         (WebCore::RenderMathMLFraction::fractionAscent const): This calculates the ascent above
509         the baseline as described in [2] [3] and replaces ascentOverHorizontalAxis. To minimize
510         changeset, this continues to ignore contribution of denominator size and not to distinguish
511         ink or non-ink metrics.
512         (WebCore::RenderMathMLFraction::layoutBlock): The position of the denominator is now just
513         calculated as a shift from the baseline. The height is given by the bottom of the
514         denominator. The old "ascent + mathAxisHeight() + denominatorDescent" does not make any
515         sense.
516         (WebCore::RenderMathMLFraction::paint): Use fractionAscent() instead of
517         ascentOverHorizontalAxis().
518         (WebCore::RenderMathMLFraction::firstLineBaseline const): Ditto.
519
520 2019-08-31  Chris Dumez  <cdumez@apple.com>
521
522         DocumentStorageAccess::hasStorageAccess() / requestStorageAccess() don't need to know about pageID / frameID
523         https://bugs.webkit.org/show_bug.cgi?id=201364
524
525         Reviewed by John Wilander.
526
527         DocumentStorageAccess::hasStorageAccess() / requestStorageAccess() don't need to know about pageID / frameID. pageID is
528         redundant since it is being ignored by the callee. For the frame, simply pass the frame object in.
529
530         * dom/DocumentStorageAccess.cpp:
531         (WebCore::DocumentStorageAccess::hasStorageAccess):
532         (WebCore::DocumentStorageAccess::requestStorageAccess):
533         * page/ChromeClient.h:
534         (WebCore::ChromeClient::hasStorageAccess):
535         (WebCore::ChromeClient::requestStorageAccess):
536
537 2019-08-30  Zalan Bujtas  <zalan@apple.com>
538
539         [LFC] Transition from Geometry(formattingContext()) to formattingContext().quirks()
540         https://bugs.webkit.org/show_bug.cgi?id=201372
541         <rdar://problem/54905514>
542
543         Reviewed by Antti Koivisto.
544
545         * layout/FormattingContextGeometry.cpp:
546         (WebCore::Layout::FormattingContext::Geometry::computedHeightValue const):
547         * layout/FormattingContextQuirks.cpp:
548         (WebCore::Layout::FormattingContext::Quirks::heightValueOfNearestContainingBlockWithFixedHeight):
549         * layout/blockformatting/BlockFormattingContextGeometry.cpp:
550         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowHeightAndMargin):
551         * layout/blockformatting/BlockFormattingContextQuirks.cpp:
552         (WebCore::Layout::BlockFormattingContext::Quirks::stretchedInFlowHeight):
553         * layout/blockformatting/BlockMarginCollapse.cpp:
554         (WebCore::Layout::BlockFormattingContext::MarginCollapse::positiveNegativeValues):
555         (WebCore::Layout::BlockFormattingContext::MarginCollapse::positiveNegativeMarginBefore):
556         (WebCore::Layout::BlockFormattingContext::MarginCollapse::estimatedMarginBefore):
557         * layout/inlineformatting/InlineFormattingContextLineLayout.cpp:
558         (WebCore::Layout::InlineFormattingContext::InlineLayout::layout const):
559         (WebCore::Layout::InlineFormattingContext::InlineLayout::computedIntrinsicWidth const):
560         (WebCore::Layout::InlineFormattingContext::InlineLayout::createDisplayRuns const):
561         * layout/inlineformatting/InlineLine.cpp:
562         (WebCore::Layout::Line::close):
563
564 2019-08-30  Zalan Bujtas  <zalan@apple.com>
565
566         [LFC] Proxy LayoutState::displayBoxForLayoutBox() calls through FormattingContext
567         https://bugs.webkit.org/show_bug.cgi?id=201365
568         <rdar://problem/54900815>
569
570         Reviewed by Antti Koivisto.
571
572         This patch is in preparation for enforcing displayBoxForLayoutBox() calls to stay within the current formatting context.
573         (There are a few odd cases left (floats and coordinate mapping) and they are going to be addressed in a separate patch.)
574
575         * layout/FormattingContext.cpp:
576         (WebCore::Layout::FormattingContext::computeOutOfFlowHorizontalGeometry):
577         (WebCore::Layout::FormattingContext::computeOutOfFlowVerticalGeometry):
578         (WebCore::Layout::FormattingContext::computeBorderAndPadding):
579         (WebCore::Layout::FormattingContext::validateGeometryConstraintsAfterLayout const):
580         * layout/FormattingContext.h:
581         (WebCore::Layout::FormattingContext::displayBoxForLayoutBox const):
582         (WebCore::Layout::FormattingContext::hasDisplayBox const):
583         * layout/FormattingContextGeometry.cpp:
584         (WebCore::Layout::FormattingContext::Geometry::computedHeightValue const):
585         (WebCore::Layout::FormattingContext::Geometry::contentHeightForFormattingContextRoot const):
586         (WebCore::Layout::FormattingContext::Geometry::staticVerticalPositionForOutOfFlowPositioned const):
587         (WebCore::Layout::FormattingContext::Geometry::staticHorizontalPositionForOutOfFlowPositioned const):
588         (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedVerticalGeometry const):
589         (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedHorizontalGeometry):
590         (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedVerticalGeometry const):
591         (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedHorizontalGeometry const):
592         (WebCore::Layout::FormattingContext::Geometry::inlineReplacedHeightAndMargin const):
593         (WebCore::Layout::FormattingContext::Geometry::inFlowPositionedPositionOffset const):
594         * layout/FormattingContextQuirks.cpp:
595         (WebCore::Layout::FormattingContext::Quirks::heightValueOfNearestContainingBlockWithFixedHeight):
596         * layout/blockformatting/BlockFormattingContext.cpp:
597         (WebCore::Layout::BlockFormattingContext::usedAvailableWidthForFloatAvoider const):
598         (WebCore::Layout::BlockFormattingContext::placeInFlowPositionedChildren):
599         (WebCore::Layout::BlockFormattingContext::computeStaticVerticalPosition):
600         (WebCore::Layout::BlockFormattingContext::computeStaticHorizontalPosition):
601         (WebCore::Layout::BlockFormattingContext::computeEstimatedVerticalPosition):
602         (WebCore::Layout::BlockFormattingContext::computeEstimatedVerticalPositionForFloatClear):
603         (WebCore::Layout::BlockFormattingContext::computeFloatingPosition):
604         (WebCore::Layout::BlockFormattingContext::computePositionToAvoidFloats):
605         (WebCore::Layout::BlockFormattingContext::computeWidthAndMargin):
606         (WebCore::Layout::BlockFormattingContext::computeHeightAndMargin):
607         (WebCore::Layout::BlockFormattingContext::verticalPositionWithMargin const):
608         * layout/blockformatting/BlockFormattingContextGeometry.cpp:
609         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedHeightAndMargin):
610         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedWidthAndMargin const):
611         (WebCore::Layout::BlockFormattingContext::Geometry::staticVerticalPosition const):
612         (WebCore::Layout::BlockFormattingContext::Geometry::staticHorizontalPosition const):
613         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowHeightAndMargin):
614         * layout/blockformatting/BlockFormattingContextQuirks.cpp:
615         (WebCore::Layout::BlockFormattingContext::Quirks::stretchedInFlowHeight):
616         * layout/blockformatting/BlockMarginCollapse.cpp:
617         (WebCore::Layout::hasClearance):
618         (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginBeforeCollapsesWithParentMarginBefore const):
619         (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginBeforeCollapsesWithPreviousSiblingMarginAfter const):
620         (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginBeforeCollapsesWithFirstInFlowChildMarginBefore const):
621         (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginAfterCollapsesWithSiblingMarginBeforeWithClearance const):
622         (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginAfterCollapsesWithLastInFlowChildMarginAfter const):
623         (WebCore::Layout::BlockFormattingContext::MarginCollapse::updateMarginAfterForPreviousSibling const):
624         (WebCore::Layout::BlockFormattingContext::MarginCollapse::positiveNegativeValues):
625         (WebCore::Layout::BlockFormattingContext::MarginCollapse::estimatedMarginBefore):
626         (WebCore::Layout::BlockFormattingContext::MarginCollapse::updatePositiveNegativeMarginValues):
627         * layout/inlineformatting/InlineFormattingContext.cpp:
628         (WebCore::Layout::InlineFormattingContext::layout):
629         (WebCore::Layout::InlineFormattingContext::computedIntrinsicWidthConstraints):
630         (WebCore::Layout::InlineFormattingContext::initializeMarginBorderAndPaddingForGenericInlineBox):
631         (WebCore::Layout::InlineFormattingContext::computeMarginBorderAndPaddingForInlineContainer):
632         (WebCore::Layout::InlineFormattingContext::computeIntrinsicWidthForFormattingRoot):
633         (WebCore::Layout::InlineFormattingContext::computeHorizontalMargin):
634         (WebCore::Layout::InlineFormattingContext::computeWidthAndMargin):
635         (WebCore::Layout::InlineFormattingContext::computeHeightAndMargin):
636         (WebCore::Layout::InlineFormattingContext::layoutFormattingContextRoot):
637         * layout/inlineformatting/InlineFormattingContextGeometry.cpp:
638         (WebCore::Layout::InlineFormattingContext::Geometry::inlineBlockHeightAndMargin const):
639         * layout/inlineformatting/InlineFormattingContextLineLayout.cpp:
640         (WebCore::Layout::inlineItemWidth):
641         (WebCore::Layout::LineLayout::formattingContext const):
642         (WebCore::Layout::LineLayout::LineLayout):
643         (WebCore::Layout::LineLayout::placeInlineItem):
644         (WebCore::Layout::InlineFormattingContext::InlineLayout::layout const):
645         (WebCore::Layout::InlineFormattingContext::InlineLayout::computedIntrinsicWidth const):
646         (WebCore::Layout::InlineFormattingContext::InlineLayout::createDisplayRuns const):
647         (WebCore::Layout::LineLayout::layoutState const): Deleted.
648         * layout/inlineformatting/InlineFormattingContextQuirks.cpp:
649         (WebCore::Layout::InlineFormattingContext::Quirks::lineDescentNeedsCollapsing const):
650         * layout/inlineformatting/InlineLine.cpp:
651         (WebCore::Layout::isInlineContainerConsideredEmpty):
652         (WebCore::Layout::Line::isVisuallyEmpty const):
653         (WebCore::Layout::Line::close):
654         (WebCore::Layout::Line::appendNonReplacedInlineBox):
655         (WebCore::Layout::Line::inlineItemContentHeight const):
656         * layout/tableformatting/TableFormattingContext.cpp:
657         (WebCore::Layout::TableFormattingContext::layout):
658         (WebCore::Layout::TableFormattingContext::computedTableWidth):
659
660 2019-08-30  Chris Dumez  <cdumez@apple.com>
661
662         WebPage::fromCorePage() to take and return a C++ reference
663         https://bugs.webkit.org/show_bug.cgi?id=201367
664
665         Reviewed by Antti Koivisto.
666
667         * page/Chrome.cpp:
668         (WebCore::Chrome::createWindow const):
669
670 2019-08-30  Chris Dumez  <cdumez@apple.com>
671
672         Add support for postMessage buffering between the service worker and window
673         https://bugs.webkit.org/show_bug.cgi?id=201169
674
675         Reviewed by Youenn Fablet.
676
677         As per the Service Worker specification, a service worker client's message
678         queue is initially disabled and only gets enabled after:
679         - The DOMContentLoaded event has been fired
680         or
681         - The client sets the navigator.serviceWorker.onmessage event handler
682         or
683         - navigator.serviceWorker.startMessages() is called
684
685         While the message queue is disabled, messages posted by the service worker
686         to the client simply get queued and only get processed once the queue gets
687         enabled.
688
689         No new tests, rebaselined existing test.
690
691         * dom/Document.cpp:
692         (WebCore::Document::finishedParsing):
693         Call startMessages() on the ServiceWorkerContainer once the DOMContentLoaded event has
694         been fired.
695
696         * dom/ScriptExecutionContext.cpp:
697         (WebCore::ScriptExecutionContext::ensureServiceWorkerContainer):
698         * dom/ScriptExecutionContext.h:
699         * workers/service/SWClientConnection.cpp:
700         (WebCore::SWClientConnection::postMessageToServiceWorkerClient):
701         Fix a bug where a service worker would not be able to post a message to a client until
702         that client has accessed navigator.serviceWorker (since the ServiceWorkerContainer is
703         lazy initialized). To address the issue, we now initialize the ServiceWorkerContainer
704         when a message is received from the service worker. Previously, messages were just
705         getting dropped.
706
707         * workers/service/ServiceWorkerContainer.cpp:
708         (WebCore::ServiceWorkerContainer::ServiceWorkerContainer):
709         When the ServiceWorkerContainer is constructed, suspend its message queue if its context
710         document is still parsing.
711
712         (WebCore::ServiceWorkerContainer::startMessages):
713         Resume the message queue when startMessages() is called.
714
715         (WebCore::ServiceWorkerContainer::postMessage):
716         Enqueue the event instead of firing it right away.
717
718         (WebCore::ServiceWorkerContainer::addEventListener):
719         if navigator.serviceWorker.onmessage event handler gets set by the JavaScript, call
720         startMessages().
721
722         * workers/service/ServiceWorkerContainer.h:
723
724 2019-08-30  Simon Fraser  <simon.fraser@apple.com>
725
726         Minor optimization in determineNonLayerDescendantsPaintedContent()
727         https://bugs.webkit.org/show_bug.cgi?id=201352
728
729         Reviewed by Antti Koivisto.
730
731         It's cheaper to call renderText.hasRenderedText() than renderText.linesBoundingBox(), because
732         the latter has to traverse all the InlineTextBoxes. This code path is fairly hot when
733         scrolling twitter feeds, since it's called from RenderLayer::updateLayerPositionsAfterScroll()
734         which calls RenderLayer::isVisuallyNonEmpty().
735
736         * rendering/RenderLayer.cpp:
737         (WebCore::RenderLayer::calculateClipRects const):
738
739 2019-08-30  Saam Barati  <sbarati@apple.com>
740
741         [WHLSL] Remove getters/setters/anders
742         https://bugs.webkit.org/show_bug.cgi?id=201008
743
744         Reviewed by Robin Morisset.
745
746         This patch changes WHLSL in a significant way. This patch removes getters/setters/anders
747         from the language. In our experience writing WHLSL shaders, these parts of the language
748         went unused, and they added a lot of complexity to the implementation of the compiler.
749         
750         This patch now treats field accesses and array indexes as intrinsics inside the compiler.
751         This patch removes all notions of named operators, anders, and indexed operators
752         from the compiler and the standard library. The checker now intrinsically knows the
753         return type for property accesses and indexed expressions based on what the
754         base type is.
755         
756         To make this work in practice was difficult, since getters/setters/anders
757         solved a lot of the difficult problems we had in generating metal code. For
758         example, all swizzle operators were getters and setters, so assigning to a
759         swizzle fell out naturally from implementing setters. However, during metal
760         codegen, all we see is a dot expression with "xy" as a property. Our previous
761         architecture of emitting Metal code using pointers which represent lvalues
762         doesn't work because you can't take the address of a swizzle. For example,
763         "auto* x = &vector.yz" is invalid metal code.
764         
765         So, this patch changes the entire metal code generator to emit WHLSL expressions
766         as Metal expressions. To do this, I had to change a lot about how the compiler
767         was implemented:
768         - I changed the indexed accesses of matrices to return columns instead of
769         rows. This allowed WHLSL code like `mat[0].xy = 42` to be compiled into
770         the equivalent metal code of `mat[0].xy = 42`.
771         - I changed the native function inliner to emit expressions instead of
772         statements.
773         - We also simplify the language by removing null and requiring all
774         reference type variables to have an initializer. This means that
775         null is no longer a valid value, which allows us to omit null checks
776         inside the metal code generator. To make this work with array
777         accesses, we now clamp accesses instead of returning null for OOB
778         accesses.
779         
780         I've also filed one required bug as a followup. I didn't include it in this
781         patch to make it easier to review along. Currently, there are two places in
782         metal codegen where we evaluate effects twice. That will be fixed in:
783         https://bugs.webkit.org/show_bug.cgi?id=201251
784
785         Tests: webgpu/whlsl/address-of-swizzle.html
786                webgpu/whlsl/array-oob-alias.html
787                webgpu/whlsl/matrix-index-assign.html
788                webgpu/whlsl/matrix-index-order.html
789                webgpu/whlsl/oob-access-2.html
790                webgpu/whlsl/operator-syntax.html
791
792         * Modules/webgpu/WHLSL/AST/WHLSLAST.h:
793         * Modules/webgpu/WHLSL/AST/WHLSLConstantExpression.h:
794         * Modules/webgpu/WHLSL/AST/WHLSLDotExpression.h:
795         * Modules/webgpu/WHLSL/AST/WHLSLExpression.cpp:
796         (WebCore::WHLSL::AST::Expression::destroy):
797         (WebCore::WHLSL::AST::Expression::destruct):
798         (WebCore::WHLSL::AST::PropertyAccessExpression::getterFunctionName const): Deleted.
799         (WebCore::WHLSL::AST::PropertyAccessExpression::setterFunctionName const): Deleted.
800         (WebCore::WHLSL::AST::PropertyAccessExpression::anderFunctionName const): Deleted.
801         * Modules/webgpu/WHLSL/AST/WHLSLExpression.h:
802         (WebCore::WHLSL::AST::Expression::copyTypeTo const):
803         (WebCore::WHLSL::AST::Expression::isMakePointerExpression const):
804         (WebCore::WHLSL::AST::Expression::isNullLiteral const): Deleted.
805         * Modules/webgpu/WHLSL/AST/WHLSLIndexExpression.h:
806         * Modules/webgpu/WHLSL/AST/WHLSLNativeTypeDeclaration.h:
807         * Modules/webgpu/WHLSL/AST/WHLSLNullLiteral.h: Removed.
808         * Modules/webgpu/WHLSL/AST/WHLSLNullLiteralType.cpp: Removed.
809         * Modules/webgpu/WHLSL/AST/WHLSLNullLiteralType.h: Removed.
810         * Modules/webgpu/WHLSL/AST/WHLSLPropertyAccessExpression.h:
811         (WebCore::WHLSL::AST::PropertyAccessExpression::getterFunction): Deleted.
812         (WebCore::WHLSL::AST::PropertyAccessExpression::anderFunction): Deleted.
813         (WebCore::WHLSL::AST::PropertyAccessExpression::threadAnderFunction): Deleted.
814         (WebCore::WHLSL::AST::PropertyAccessExpression::setterFunction): Deleted.
815         (WebCore::WHLSL::AST::PropertyAccessExpression::setGetterFunction): Deleted.
816         (WebCore::WHLSL::AST::PropertyAccessExpression::setAnderFunction): Deleted.
817         (WebCore::WHLSL::AST::PropertyAccessExpression::setThreadAnderFunction): Deleted.
818         (WebCore::WHLSL::AST::PropertyAccessExpression::setSetterFunction): Deleted.
819         (): Deleted.
820         * Modules/webgpu/WHLSL/AST/WHLSLType.cpp:
821         (WebCore::WHLSL::AST::Type::destroy):
822         (WebCore::WHLSL::AST::Type::destruct):
823         (WebCore::WHLSL::AST::ResolvableType::canResolve const):
824         (WebCore::WHLSL::AST::ResolvableType::conversionCost const):
825         * Modules/webgpu/WHLSL/AST/WHLSLType.h:
826         (WebCore::WHLSL::AST::Type::isIntegerLiteralType const):
827         (WebCore::WHLSL::AST::Type::isNullLiteralType const): Deleted.
828         * Modules/webgpu/WHLSL/Metal/WHLSLFunctionWriter.cpp:
829         (WebCore::WHLSL::Metal::FunctionDefinitionWriter::HoistedVariableCollector::HoistedVariableCollector):
830         (WebCore::WHLSL::Metal::FunctionDefinitionWriter::visit):
831         (WebCore::WHLSL::Metal::FunctionDefinitionWriter::emitLoop):
832         (WebCore::WHLSL::Metal::FunctionDefinitionWriter::emitConstantExpressionString):
833         (WebCore::WHLSL::Metal::FunctionDefinitionWriter::appendRightValueWithNullability): Deleted.
834         (WebCore::WHLSL::Metal::FunctionDefinitionWriter::appendRightValue): Deleted.
835         (WebCore::WHLSL::Metal::FunctionDefinitionWriter::appendLeftValue): Deleted.
836         (WebCore::WHLSL::Metal::FunctionDefinitionWriter::takeLastValue): Deleted.
837         (WebCore::WHLSL::Metal::FunctionDefinitionWriter::takeLastValueAndNullability): Deleted.
838         (WebCore::WHLSL::Metal::FunctionDefinitionWriter::takeLastLeftValue): Deleted.
839         * Modules/webgpu/WHLSL/Metal/WHLSLMetalCodeGenerator.cpp:
840         (WebCore::WHLSL::Metal::metalCodePrologue):
841         (WebCore::WHLSL::Metal::generateMetalCode):
842         (WebCore::WHLSL::Metal::metalCodeProlog): Deleted.
843         * Modules/webgpu/WHLSL/Metal/WHLSLNativeFunctionWriter.cpp:
844         (WebCore::WHLSL::Metal::inlineNativeFunction):
845         (WebCore::WHLSL::Metal::vectorInnerType): Deleted.
846         * Modules/webgpu/WHLSL/Metal/WHLSLNativeFunctionWriter.h:
847         * Modules/webgpu/WHLSL/Metal/WHLSLNativeTypeWriter.cpp:
848         (WebCore::WHLSL::Metal::writeNativeType):
849         * Modules/webgpu/WHLSL/WHLSLASTDumper.cpp:
850         (WebCore::WHLSL::ASTDumper::visit):
851         * Modules/webgpu/WHLSL/WHLSLASTDumper.h:
852         * Modules/webgpu/WHLSL/WHLSLCheckDuplicateFunctions.cpp:
853         (WebCore::WHLSL::checkDuplicateFunctions):
854         * Modules/webgpu/WHLSL/WHLSLChecker.cpp:
855         (WebCore::WHLSL::resolveByInstantiation):
856         (WebCore::WHLSL::checkOperatorOverload):
857         (WebCore::WHLSL::Checker::wrappedUintType):
858         (WebCore::WHLSL::Checker::normalizedTypeForFunctionKey):
859         (WebCore::WHLSL::Checker::visit):
860         (WebCore::WHLSL::matchAndCommit):
861         (WebCore::WHLSL::Checker::resolveFunction):
862         (WebCore::WHLSL::Checker::assignConcreteType):
863         (WebCore::WHLSL::resolveWithOperatorLength): Deleted.
864         (WebCore::WHLSL::Checker::genericPointerType): Deleted.
865         (WebCore::WHLSL::Checker::finishVisiting): Deleted.
866         * Modules/webgpu/WHLSL/WHLSLHighZombieFinder.cpp:
867         (WebCore::WHLSL::findHighZombies):
868         (): Deleted.
869         * Modules/webgpu/WHLSL/WHLSLInferTypes.cpp:
870         (WebCore::WHLSL::matchAndCommit):
871         (WebCore::WHLSL::commit):
872         * Modules/webgpu/WHLSL/WHLSLIntrinsics.h:
873         (WebCore::WHLSL::Intrinsics::boolVectorTypeForSize const):
874         (WebCore::WHLSL::Intrinsics::uintVectorTypeForSize const):
875         (WebCore::WHLSL::Intrinsics::intVectorTypeForSize const):
876         (WebCore::WHLSL::Intrinsics::floatVectorTypeForSize const):
877         * Modules/webgpu/WHLSL/WHLSLLexer.cpp:
878         (WebCore::WHLSL::Lexer::consumeTokenFromStream):
879         * Modules/webgpu/WHLSL/WHLSLLiteralTypeChecker.cpp:
880         * Modules/webgpu/WHLSL/WHLSLParser.cpp:
881         (WebCore::WHLSL::Parser::parseConstantExpression):
882         (WebCore::WHLSL::Parser::parseEnumerationMember):
883         (WebCore::WHLSL::Parser::parseTerm):
884         * Modules/webgpu/WHLSL/WHLSLPrepare.cpp:
885         (WebCore::WHLSL::prepareShared):
886         * Modules/webgpu/WHLSL/WHLSLProgram.cpp: Added.
887         (WebCore::WHLSL::Program::isValidVectorProperty):
888         * Modules/webgpu/WHLSL/WHLSLProgram.h:
889         * Modules/webgpu/WHLSL/WHLSLPropertyResolver.cpp:
890         (WebCore::WHLSL::resolveProperties):
891         (WebCore::WHLSL::PropertyResolver::visit): Deleted.
892         (WebCore::WHLSL::wrapAnderCallArgument): Deleted.
893         (WebCore::WHLSL::anderCallArgument): Deleted.
894         (WebCore::WHLSL::setterCall): Deleted.
895         (WebCore::WHLSL::getterCall): Deleted.
896         (WebCore::WHLSL::modify): Deleted.
897         (WebCore::WHLSL::PropertyResolver::simplifyRightValue): Deleted.
898         (WebCore::WHLSL::LeftValueSimplifier::finishVisiting): Deleted.
899         (WebCore::WHLSL::LeftValueSimplifier::visit): Deleted.
900         (WebCore::WHLSL::PropertyResolver::simplifyLeftValue): Deleted.
901         * Modules/webgpu/WHLSL/WHLSLPruneUnreachableStandardLibraryFunctions.cpp:
902         * Modules/webgpu/WHLSL/WHLSLStandardLibrary.txt:
903         * Modules/webgpu/WHLSL/WHLSLStandardLibraryUtilities.cpp:
904         * Modules/webgpu/WHLSL/WHLSLSynthesizeArrayOperatorLength.cpp: Removed.
905         * Modules/webgpu/WHLSL/WHLSLSynthesizeArrayOperatorLength.h: Removed.
906         * Modules/webgpu/WHLSL/WHLSLSynthesizeEnumerationFunctions.cpp:
907         (WebCore::WHLSL::synthesizeEnumerationFunctions):
908         * Modules/webgpu/WHLSL/WHLSLVisitor.cpp:
909         (WebCore::WHLSL::Visitor::visit):
910         * Modules/webgpu/WHLSL/WHLSLVisitor.h:
911         * Sources.txt:
912         * WebCore.xcodeproj/project.pbxproj:
913
914 2019-08-30  Zalan Bujtas  <zalan@apple.com>
915
916         [LFC] Pass FormattingContext to Geometry/Quirks/BlockMarginCollapsing classes
917         https://bugs.webkit.org/show_bug.cgi?id=201355
918         <rdar://problem/54895959>
919
920         Reviewed by Antti Koivisto.
921
922         This is in preparation for enforcing LFC to not call outside of the formatting context.
923         LayoutState::displayBoxForLayoutBox calls will be forced to go through the FormattingContext class to
924         check LFC escaping.
925
926
927         * layout/FormattingContext.h:
928         (WebCore::Layout::FormattingContext::isBlockFormattingContext const):
929         (WebCore::Layout::FormattingContext::isInlineFormattingContext const):
930         (WebCore::Layout::FormattingContext::isTableFormattingContext const):
931         (WebCore::Layout::FormattingContext::Geometry::layoutState const):
932         (WebCore::Layout::FormattingContext::Geometry::layoutState):
933         (WebCore::Layout::FormattingContext::Geometry::formattingContext const):
934         (WebCore::Layout::FormattingContext::geometry const):
935         (WebCore::Layout::FormattingContext::Quirks::layoutState const):
936         (WebCore::Layout::FormattingContext::Quirks::layoutState):
937         (WebCore::Layout::FormattingContext::Quirks::formattingContext const):
938         (WebCore::Layout::FormattingContext::quirks const):
939         (WebCore::Layout::FormattingContext::Geometry::Geometry):
940         (WebCore::Layout::FormattingContext::Quirks::Quirks):
941         * layout/FormattingContextGeometry.cpp:
942         (WebCore::Layout::FormattingContext::Geometry::computedHeightValue const):
943         * layout/FormattingContextQuirks.cpp:
944         (WebCore::Layout::FormattingContext::Quirks::heightValueOfNearestContainingBlockWithFixedHeight):
945         * layout/blockformatting/BlockFormattingContext.h:
946         (WebCore::Layout::BlockFormattingContext::Geometry::formattingContext const):
947         (WebCore::Layout::BlockFormattingContext::geometry const):
948         (WebCore::Layout::BlockFormattingContext::MarginCollapse::layoutState):
949         (WebCore::Layout::BlockFormattingContext::MarginCollapse::layoutState const):
950         (WebCore::Layout::BlockFormattingContext::MarginCollapse::formattingContext const):
951         (WebCore::Layout::BlockFormattingContext::marginCollapse const):
952         (WebCore::Layout::BlockFormattingContext::Quirks::formattingContext const):
953         (WebCore::Layout::BlockFormattingContext::quirks const):
954         (WebCore::Layout::BlockFormattingContext::Geometry::Geometry):
955         (WebCore::Layout::BlockFormattingContext::Quirks::Quirks):
956         (WebCore::Layout::BlockFormattingContext::MarginCollapse::MarginCollapse):
957         * layout/blockformatting/BlockFormattingContextGeometry.cpp:
958         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedHeightAndMargin):
959         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowHeightAndMargin):
960         * layout/blockformatting/BlockFormattingContextQuirks.cpp:
961         (WebCore::Layout::BlockFormattingContext::Quirks::stretchedInFlowHeight):
962         * layout/blockformatting/BlockMarginCollapse.cpp:
963         (WebCore::Layout::BlockFormattingContext::MarginCollapse::positiveNegativeValues):
964         (WebCore::Layout::BlockFormattingContext::MarginCollapse::positiveNegativeMarginBefore):
965         (WebCore::Layout::BlockFormattingContext::MarginCollapse::estimatedMarginBefore):
966         * layout/inlineformatting/InlineFormattingContext.h:
967         (WebCore::Layout::InlineFormattingContext::InlineLayout::layoutState const):
968         (WebCore::Layout::InlineFormattingContext::InlineLayout::formattingContext const):
969         (WebCore::Layout::InlineFormattingContext::InlineLayout::formattingRoot const):
970         (WebCore::Layout::InlineFormattingContext::Quirks::formattingContext const):
971         (WebCore::Layout::InlineFormattingContext::quirks const):
972         (WebCore::Layout::InlineFormattingContext::Geometry::formattingContext const):
973         (WebCore::Layout::InlineFormattingContext::geometry const):
974         (WebCore::Layout::InlineFormattingContext::Geometry::Geometry):
975         (WebCore::Layout::InlineFormattingContext::Quirks::Quirks):
976         * layout/inlineformatting/InlineFormattingContextLineLayout.cpp:
977         (WebCore::Layout::LineLayout::LineLayout):
978         (WebCore::Layout::InlineFormattingContext::InlineLayout::InlineLayout):
979         (WebCore::Layout::InlineFormattingContext::InlineLayout::layout const):
980         (WebCore::Layout::InlineFormattingContext::InlineLayout::computedIntrinsicWidth const):
981         (WebCore::Layout::InlineFormattingContext::InlineLayout::createDisplayRuns const):
982         * layout/inlineformatting/InlineLine.cpp:
983         (WebCore::Layout::Line::Line):
984         (WebCore::Layout::Line::isVisuallyEmpty const):
985         (WebCore::Layout::Line::close):
986         (WebCore::Layout::Line::appendNonReplacedInlineBox):
987         (WebCore::Layout::Line::adjustBaselineAndLineHeight):
988         (WebCore::Layout::Line::inlineItemContentHeight const):
989         (WebCore::Layout::Line::layoutState const):
990         (WebCore::Layout::Line::formattingContext const):
991         * layout/inlineformatting/InlineLine.h:
992         * layout/tableformatting/TableFormattingContext.h:
993         (WebCore::Layout::TableFormattingContext::Geometry::formattingContext const):
994         (WebCore::Layout::TableFormattingContext::geometry const):
995         (WebCore::Layout::TableFormattingContext::Geometry::Geometry):
996         * page/FrameViewLayoutContext.cpp:
997         (WebCore::layoutUsingFormattingContext):
998
999 2019-08-30  Ryan Haddad  <ryanhaddad@apple.com>
1000
1001         Unreviewed, rolling out r249338.
1002
1003         Caused 500+ layout test failures on WK1
1004
1005         Reverted changeset:
1006
1007         "Add support for postMessage buffering between the service
1008         worker and window"
1009         https://bugs.webkit.org/show_bug.cgi?id=201169
1010         https://trac.webkit.org/changeset/249338
1011
1012 2019-08-30  Alex Christensen  <achristensen@webkit.org>
1013
1014         Remove HAVE_CFNETWORK_WITH_IGNORE_HSTS conditional
1015         https://bugs.webkit.org/show_bug.cgi?id=201279
1016
1017         Reviewed by Darin Adler.
1018
1019         * platform/network/mac/WebCoreURLResponse.mm:
1020         (WebCore::synthesizeRedirectResponseIfNecessary):
1021         (WebCore::schemeWasUpgradedDueToDynamicHSTS): Deleted.
1022
1023 2019-08-30  Wenson Hsieh  <wenson_hsieh@apple.com>
1024
1025         Caret does not appear in text field inside a transformed, overflow: hidden container
1026         https://bugs.webkit.org/show_bug.cgi?id=201317
1027         <rdar://problem/54859264>
1028
1029         Reviewed by Simon Fraser.
1030
1031         This patch refactors the heuristic for determining whether to suppress selection gestures and UI in a way that
1032         fixes the corner case encountered in this bug. To understand why this test case fails with our existing
1033         heuristic, consider the below test case.
1034
1035         Let's say we have an input field inside an "overflow: hidden;" container, which is positioned in such a way that
1036         it is completely clipped by its enclosing container which is also "overflow: hidden". Our existing logic would
1037         appropriately identify this as a hidden editable element.
1038
1039         However, let's now apply a transform to the input field's closest "overflow: hidden" ancestor, such that the
1040         field is now visible. Since RenderLayer::offsetFromAncestor doesn't take transforms into account when we try to
1041         find the offset of the "overflow: hidden" layer relative to the root view, we end up passing an offsetFromRoot
1042         of (0, 100vw) to RenderLayer::calculateClipRects, which computes a background clip rect of (0, 0, 100vw, 100vh).
1043
1044         This means that at the end of RenderLayer::calculateClipRects, we end up intersecting the background clip rect
1045         (0, 0, 100vw, 100vh) against (100vw, 0, 100vw, 100vh), which results in the empty rect, and subsequently makes
1046         us believe we're editing a hidden editable element.
1047
1048         Instead of tacking on more logic to isTransparentOrFullyClippedRespectingParentFrames, we can fix this by using
1049         RenderObject::computeVisibleRectInContainer instead, performing a similar walk up the render tree to compute the
1050         visible rect of each focused element or subframe relative to its root. This is capable of taking transforms into
1051         account. See comments below for more details.
1052
1053         Test: editing/selection/ios/show-selection-in-transformed-container-2.html
1054
1055         * rendering/RenderLayer.cpp:
1056         (WebCore::RenderLayer::isTransparentRespectingParentFrames const):
1057
1058         Split out isTransparentOrFullyClippedRespectingParentFrames into two methods: RenderLayer's
1059         isTransparentRespectingParentFrames, and RenderObject's hasNonEmptyVisibleRectRespectingParentFrames. The
1060         transparency check starts at the enclosing layer and walks up the layer tree, while the non-empty visible rect
1061         check looks for renderers that are completely empty relative to their root views.
1062
1063         * rendering/RenderLayer.h:
1064         * rendering/RenderObject.cpp:
1065         (WebCore::RenderObject::hasNonEmptyVisibleRectRespectingParentFrames const):
1066
1067         Rewrite logic for detecting completely clipped editable areas (that formerly lived in
1068         isTransparentOrFullyClippedRespectingParentFrames) to use computeVisibleRectInContainer instead.
1069
1070         * rendering/RenderObject.h:
1071
1072 2019-08-30  Chris Dumez  <cdumez@apple.com>
1073
1074         Add support for postMessage buffering between the service worker and window
1075         https://bugs.webkit.org/show_bug.cgi?id=201169
1076
1077         Reviewed by Youenn Fablet.
1078
1079         As per the Service Worker specification, a service worker client's message
1080         queue is initially disabled and only gets enabled after:
1081         - The DOMContentLoaded event has been fired
1082         or
1083         - The client sets the navigator.serviceWorker.onmessage event handler
1084         or
1085         - navigator.serviceWorker.startMessages() is called
1086
1087         While the message queue is disabled, messages posted by the service worker
1088         to the client simply get queued and only get processed once the queue gets
1089         enabled.
1090
1091         No new tests, rebaselined existing test.
1092
1093         * dom/Document.cpp:
1094         (WebCore::Document::finishedParsing):
1095         Call startMessages() on the ServiceWorkerContainer once the DOMContentLoaded event has
1096         been fired.
1097
1098         * dom/ScriptExecutionContext.cpp:
1099         (WebCore::ScriptExecutionContext::ensureServiceWorkerContainer):
1100         * dom/ScriptExecutionContext.h:
1101         * workers/service/SWClientConnection.cpp:
1102         (WebCore::SWClientConnection::postMessageToServiceWorkerClient):
1103         Fix a bug where a service worker would not be able to post a message to a client until
1104         that client has accessed navigator.serviceWorker (since the ServiceWorkerContainer is
1105         lazy initialized). To address the issue, we now initialize the ServiceWorkerContainer
1106         when a message is received from the service worker. Previously, messages were just
1107         getting dropped.
1108
1109         * workers/service/ServiceWorkerContainer.cpp:
1110         (WebCore::ServiceWorkerContainer::ServiceWorkerContainer):
1111         When the ServiceWorkerContainer is constructed, suspend its message queue if its context
1112         document is still parsing.
1113
1114         (WebCore::ServiceWorkerContainer::startMessages):
1115         Resume the message queue when startMessages() is called.
1116
1117         (WebCore::ServiceWorkerContainer::postMessage):
1118         Enqueue the event instead of firing it right away.
1119
1120         (WebCore::ServiceWorkerContainer::addEventListener):
1121         if navigator.serviceWorker.onmessage event handler gets set by the JavaScript, call
1122         startMessages().
1123
1124         * workers/service/ServiceWorkerContainer.h:
1125
1126 2019-08-30  Simon Fraser  <simon.fraser@apple.com>
1127
1128         Add system tracing points for compositing updates, and touch-event dispatching
1129         https://bugs.webkit.org/show_bug.cgi?id=201327
1130
1131         Reviewed by Alex Christensen.
1132
1133         TraceScope in RenderLayerCompositor::updateCompositingLayers().
1134
1135         * rendering/RenderLayerCompositor.cpp:
1136         (WebCore::RenderLayerCompositor::updateCompositingLayers):
1137
1138 2019-08-30  Brent Fulgham  <bfulgham@apple.com>
1139
1140         [FTW] Use DirectX SharedResource as basis for SharedBitmap
1141         https://bugs.webkit.org/show_bug.cgi?id=201157
1142
1143         Reviewed by Alex Christensen.
1144
1145         Currently an ID2D1Bitmap is used as the backing store for the SharedBitmap that is the
1146         base type for sharing data between the WebContent Process and the UIProcess. However, this
1147         involves moving GPU memory to local memory, copying that memory into the SharedMemory member
1148         of the SharedBitmap, then building a new GPU bitmap on the UIProcess side from that SharedMemory.
1149
1150         Profiling indicates that this is the single largest place FTW WebKit spends its time.
1151
1152         Instead, we should use Direct2D's ability to render to an IDXGISurface, which can be shared
1153         between multiple processes. This should avoid the GPU->CPU copy, the Direct2D-allocated
1154         CPU->Shared Memory copy, and the shared memory to GPU copy.
1155  
1156         * platform/graphics/win/BackingStoreBackendDirect2D.h:
1157         (WebCore::BackingStoreBackendDirect2D::renderTarget const): Change type.
1158         (WebCore::BackingStoreBackendDirect2D::dxSurface const): Added.
1159         (WebCore::BackingStoreBackendDirect2D::BackingStoreBackendDirect2D): Require a DXD11 device.
1160         * platform/graphics/win/BackingStoreBackendDirect2DImpl.cpp:
1161         (WebCore::BackingStoreBackendDirect2DImpl::BackingStoreBackendDirect2DImpl): Use Direct2D's
1162         IDXGISurface to make a render target we can use to support our fast cross-process sharing.
1163         (WebCore::BackingStoreBackendDirect2DImpl::scroll):
1164         * platform/graphics/win/BackingStoreBackendDirect2DImpl.h:
1165         * platform/graphics/win/Direct2DOperations.cpp:
1166         (WebCore::Direct2D::fillRect): Remove unneeded PlatformContextStateSaver.
1167         (WebCore::Direct2D::fillRoundedRect): Ditto.
1168         (WebCore::Direct2D::fillRectWithGradient): Ditto.
1169         (WebCore::Direct2D::fillPath): Ditto.
1170         (WebCore::Direct2D::strokePath): Ditto.
1171         * platform/graphics/win/Direct2DUtilities.cpp:
1172         (WebCore::Direct2D::pixelFormat): Switch to constants for bitmap format.
1173         (WebCore::Direct2D::createDXGISurfaceOfSize): Added.
1174         (WebCore::Direct2D::createSurfaceRenderTarget): Added.
1175         (WebCore::Direct2D::writeDiagnosticPNGToPath):
1176         (WebCore::Direct2D::dxgiImmediateContext): Added.
1177         (WebCore::Direct2D::defaultDirectXDevice): Added.
1178         (WebCore::Direct2D::createDeviceAndContext): Added.
1179         (WebCore::Direct2D::toDXGIDevice): Added.
1180         (WebCore::Direct2D::factoryForDXGIDevice): Added.
1181         * platform/graphics/win/Direct2DUtilities.h:
1182
1183 2019-08-30  Sihui Liu  <sihui_liu@apple.com>
1184
1185         IndexedDB: update size of database when database operation is completed
1186         https://bugs.webkit.org/show_bug.cgi?id=201057
1187
1188         Reviewed by Youenn Fablet.
1189
1190         Currently when a database operation was completed, we re-computed the disk usage of the origin. This computation 
1191         listed all databases in the origin directory and read the size of each database file, which was very inefficient 
1192         because the completed operation should only affect one database.
1193
1194         This patch makes UniqueIDBDatabase keep track of database size and reports size change to QuotaUser.
1195
1196         Tested PerformanceTests/IndexedDB/basic/objectstore-add.html on release build minibrowser. This change makes
1197         the test over 50% faster.
1198
1199         * Modules/indexeddb/server/IDBBackingStore.h:
1200         * Modules/indexeddb/server/IDBServer.cpp:
1201         (WebCore::IDBServer::IDBServer::QuotaUser::increaseSpaceUsed):
1202         (WebCore::IDBServer::IDBServer::QuotaUser::decreaseSpaceUsed):
1203         (WebCore::IDBServer::IDBServer::computeSpaceUsedForOrigin):
1204         (WebCore::IDBServer::IDBServer::increaseSpaceUsed):
1205         (WebCore::IDBServer::IDBServer::decreaseSpaceUsed):
1206         (WebCore::IDBServer::IDBServer::setSpaceUsed): Deleted.
1207         * Modules/indexeddb/server/IDBServer.h:
1208         * Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
1209         (WebCore::IDBServer::MemoryIDBBackingStore::databaseSize const):
1210         (WebCore::IDBServer::MemoryIDBBackingStore::close):
1211         (WebCore::IDBServer::MemoryIDBBackingStore::databasesSizeForOrigin const): Deleted.
1212         * Modules/indexeddb/server/MemoryIDBBackingStore.h:
1213         * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
1214         (WebCore::IDBServer::SQLiteIDBBackingStore::databasesSizeForDirectory):
1215         (WebCore::IDBServer::SQLiteIDBBackingStore::databaseSize const):
1216         (WebCore::IDBServer::SQLiteIDBBackingStore::close):
1217         (WebCore::IDBServer::SQLiteIDBBackingStore::databasesSizeForFolder): Deleted.
1218         (WebCore::IDBServer::SQLiteIDBBackingStore::databasesSizeForOrigin const): Deleted.
1219         * Modules/indexeddb/server/SQLiteIDBBackingStore.h:
1220         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
1221         (WebCore::IDBServer::UniqueIDBDatabase::deleteBackingStore):
1222         (WebCore::IDBServer::UniqueIDBDatabase::shutdownForClose):
1223         (WebCore::IDBServer::UniqueIDBDatabase::didShutdownForClose):
1224         (WebCore::IDBServer::UniqueIDBDatabase::didDeleteBackingStore):
1225         (WebCore::IDBServer::UniqueIDBDatabase::openBackingStore):
1226         (WebCore::IDBServer::UniqueIDBDatabase::didOpenBackingStore):
1227         (WebCore::IDBServer::UniqueIDBDatabase::postDatabaseTaskReply):
1228         (WebCore::IDBServer::UniqueIDBDatabase::updateSpaceUsedIfNeeded):
1229         * Modules/indexeddb/server/UniqueIDBDatabase.h:
1230
1231 2019-08-30  Alicia Boya García  <aboya@igalia.com>
1232
1233         [MSE][GStreamer] Replaying the video should update currentTime
1234         https://bugs.webkit.org/show_bug.cgi?id=201307
1235
1236         Reviewed by Xabier Rodriguez-Calvar.
1237
1238         While writing a test to confirm that https://bugs.webkit.org/show_bug.cgi?id=190050
1239         has indeed been fixed I noticed a non-conformity: when the video has
1240         ended, right after calling .play() for a second playback currentTime
1241         did not return zero, but the video duration.
1242
1243         This turned to be due to the m_isEndReached flag not being reseted on
1244         seeks (replaying a video incurs in a seek done from multi-platform
1245         code).
1246
1247         Test: imported/w3c/web-platform-tests/media-source/mediasource-replay.html
1248
1249         * platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp:
1250         (WebCore::MediaPlayerPrivateGStreamerMSE::seek):
1251
1252 2019-08-30  Zalan Bujtas  <zalan@apple.com>
1253
1254         [LFC] Make Geometry/Quirk/MarginCollapse subclasses stateful.
1255         https://bugs.webkit.org/show_bug.cgi?id=201343
1256         <rdar://problem/54883787>
1257
1258         Reviewed by Antti Koivisto.
1259
1260         This is in preparation for enforcing LFC to not call outside of the formatting context.
1261
1262         * layout/FormattingContext.cpp:
1263         (WebCore::Layout::FormattingContext::computeOutOfFlowHorizontalGeometry):
1264         (WebCore::Layout::FormattingContext::computeOutOfFlowVerticalGeometry):
1265         (WebCore::Layout::FormattingContext::computeBorderAndPadding):
1266         (WebCore::Layout::FormattingContext::layoutOutOfFlowContent):
1267         (WebCore::Layout::FormattingContext::computeOutOfFlowHorizontalGeometry const): Deleted.
1268         (WebCore::Layout::FormattingContext::computeOutOfFlowVerticalGeometry const): Deleted.
1269         (WebCore::Layout::FormattingContext::computeBorderAndPadding const): Deleted.
1270         (WebCore::Layout::FormattingContext::layoutOutOfFlowContent const): Deleted.
1271         * layout/FormattingContext.h:
1272         (WebCore::Layout::FormattingContext::Geometry::layoutState const):
1273         (WebCore::Layout::FormattingContext::Geometry::layoutState):
1274         (WebCore::Layout::FormattingContext::geometry const):
1275         (WebCore::Layout::FormattingContext::Quirks::layoutState const):
1276         (WebCore::Layout::FormattingContext::Quirks::layoutState):
1277         (WebCore::Layout::FormattingContext::quirks const):
1278         (WebCore::Layout::FormattingContext::Geometry::Geometry):
1279         (WebCore::Layout::FormattingContext::Quirks::Quirks):
1280         * layout/FormattingContextGeometry.cpp:
1281         (WebCore::Layout::FormattingContext::Geometry::computedHeightValue const):
1282         (WebCore::Layout::FormattingContext::Geometry::contentHeightForFormattingContextRoot const):
1283         (WebCore::Layout::FormattingContext::Geometry::computedValueIfNotAuto const):
1284         (WebCore::Layout::FormattingContext::Geometry::fixedValue const):
1285         (WebCore::Layout::FormattingContext::Geometry::computedMaxHeight const):
1286         (WebCore::Layout::FormattingContext::Geometry::computedMinHeight const):
1287         (WebCore::Layout::FormattingContext::Geometry::staticVerticalPositionForOutOfFlowPositioned const):
1288         (WebCore::Layout::FormattingContext::Geometry::staticHorizontalPositionForOutOfFlowPositioned const):
1289         (WebCore::Layout::FormattingContext::Geometry::shrinkToFitWidth):
1290         (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedVerticalGeometry const):
1291         (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedHorizontalGeometry):
1292         (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedVerticalGeometry const):
1293         (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedHorizontalGeometry const):
1294         (WebCore::Layout::FormattingContext::Geometry::complicatedCases const):
1295         (WebCore::Layout::FormattingContext::Geometry::floatingNonReplacedWidthAndMargin):
1296         (WebCore::Layout::FormattingContext::Geometry::floatingReplacedHeightAndMargin const):
1297         (WebCore::Layout::FormattingContext::Geometry::floatingReplacedWidthAndMargin const):
1298         (WebCore::Layout::FormattingContext::Geometry::outOfFlowVerticalGeometry const):
1299         (WebCore::Layout::FormattingContext::Geometry::outOfFlowHorizontalGeometry):
1300         (WebCore::Layout::FormattingContext::Geometry::floatingHeightAndMargin const):
1301         (WebCore::Layout::FormattingContext::Geometry::floatingWidthAndMargin):
1302         (WebCore::Layout::FormattingContext::Geometry::inlineReplacedHeightAndMargin const):
1303         (WebCore::Layout::FormattingContext::Geometry::inlineReplacedWidthAndMargin const):
1304         (WebCore::Layout::FormattingContext::Geometry::inFlowPositionedPositionOffset const):
1305         (WebCore::Layout::FormattingContext::Geometry::computedBorder const):
1306         (WebCore::Layout::FormattingContext::Geometry::computedPadding const):
1307         (WebCore::Layout::FormattingContext::Geometry::computedHorizontalMargin const):
1308         (WebCore::Layout::FormattingContext::Geometry::computedVerticalMargin const):
1309         (WebCore::Layout::FormattingContext::Geometry::constrainByMinMaxWidth const):
1310         (WebCore::Layout::FormattingContext::Geometry::computedHeightValue): Deleted.
1311         (WebCore::Layout::FormattingContext::Geometry::contentHeightForFormattingContextRoot): Deleted.
1312         (WebCore::Layout::FormattingContext::Geometry::computedValueIfNotAuto): Deleted.
1313         (WebCore::Layout::FormattingContext::Geometry::fixedValue): Deleted.
1314         (WebCore::Layout::FormattingContext::Geometry::computedMaxHeight): Deleted.
1315         (WebCore::Layout::FormattingContext::Geometry::computedMinHeight): Deleted.
1316         (WebCore::Layout::staticVerticalPositionForOutOfFlowPositioned): Deleted.
1317         (WebCore::Layout::staticHorizontalPositionForOutOfFlowPositioned): Deleted.
1318         (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedVerticalGeometry): Deleted.
1319         (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedVerticalGeometry): Deleted.
1320         (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedHorizontalGeometry): Deleted.
1321         (WebCore::Layout::FormattingContext::Geometry::complicatedCases): Deleted.
1322         (WebCore::Layout::FormattingContext::Geometry::floatingReplacedHeightAndMargin): Deleted.
1323         (WebCore::Layout::FormattingContext::Geometry::floatingReplacedWidthAndMargin): Deleted.
1324         (WebCore::Layout::FormattingContext::Geometry::outOfFlowVerticalGeometry): Deleted.
1325         (WebCore::Layout::FormattingContext::Geometry::floatingHeightAndMargin): Deleted.
1326         (WebCore::Layout::FormattingContext::Geometry::inlineReplacedHeightAndMargin): Deleted.
1327         (WebCore::Layout::FormattingContext::Geometry::inlineReplacedWidthAndMargin): Deleted.
1328         (WebCore::Layout::FormattingContext::Geometry::inFlowPositionedPositionOffset): Deleted.
1329         (WebCore::Layout::FormattingContext::Geometry::computedBorder): Deleted.
1330         (WebCore::Layout::FormattingContext::Geometry::computedPadding): Deleted.
1331         (WebCore::Layout::FormattingContext::Geometry::computedHorizontalMargin): Deleted.
1332         (WebCore::Layout::FormattingContext::Geometry::computedVerticalMargin): Deleted.
1333         (WebCore::Layout::FormattingContext::Geometry::constrainByMinMaxWidth): Deleted.
1334         * layout/FormattingContextQuirks.cpp:
1335         (WebCore::Layout::FormattingContext::Quirks::heightValueOfNearestContainingBlockWithFixedHeight):
1336         * layout/blockformatting/BlockFormattingContext.cpp:
1337         (WebCore::Layout::BlockFormattingContext::layout):
1338         (WebCore::Layout::BlockFormattingContext::layoutFormattingContextRoot):
1339         (WebCore::Layout::BlockFormattingContext::placeInFlowPositionedChildren):
1340         (WebCore::Layout::BlockFormattingContext::computeStaticVerticalPosition):
1341         (WebCore::Layout::BlockFormattingContext::computeStaticHorizontalPosition):
1342         (WebCore::Layout::BlockFormattingContext::computeStaticPosition):
1343         (WebCore::Layout::BlockFormattingContext::computeEstimatedVerticalPosition):
1344         (WebCore::Layout::BlockFormattingContext::computeEstimatedVerticalPositionForAncestors):
1345         (WebCore::Layout::BlockFormattingContext::computeEstimatedVerticalPositionForFormattingRoot):
1346         (WebCore::Layout::BlockFormattingContext::computeEstimatedVerticalPositionForFloatClear):
1347         (WebCore::Layout::BlockFormattingContext::computeFloatingPosition):
1348         (WebCore::Layout::BlockFormattingContext::computePositionToAvoidFloats):
1349         (WebCore::Layout::BlockFormattingContext::computeWidthAndMargin):
1350         (WebCore::Layout::BlockFormattingContext::computeHeightAndMargin):
1351         (WebCore::Layout::BlockFormattingContext::computedIntrinsicWidthConstraints):
1352         (WebCore::Layout::BlockFormattingContext::verticalPositionWithMargin const):
1353         (WebCore::Layout::BlockFormattingContext::setEstimatedMarginBefore):
1354         (WebCore::Layout::BlockFormattingContext::layout const): Deleted.
1355         (WebCore::Layout::BlockFormattingContext::layoutFormattingContextRoot const): Deleted.
1356         (WebCore::Layout::BlockFormattingContext::placeInFlowPositionedChildren const): Deleted.
1357         (WebCore::Layout::BlockFormattingContext::computeStaticVerticalPosition const): Deleted.
1358         (WebCore::Layout::BlockFormattingContext::computeStaticHorizontalPosition const): Deleted.
1359         (WebCore::Layout::BlockFormattingContext::computeStaticPosition const): Deleted.
1360         (WebCore::Layout::BlockFormattingContext::computeEstimatedVerticalPosition const): Deleted.
1361         (WebCore::Layout::BlockFormattingContext::computeEstimatedVerticalPositionForAncestors const): Deleted.
1362         (WebCore::Layout::BlockFormattingContext::computeEstimatedVerticalPositionForFormattingRoot const): Deleted.
1363         (WebCore::Layout::BlockFormattingContext::computeEstimatedVerticalPositionForFloatClear const): Deleted.
1364         (WebCore::Layout::BlockFormattingContext::computeFloatingPosition const): Deleted.
1365         (WebCore::Layout::BlockFormattingContext::computePositionToAvoidFloats const): Deleted.
1366         (WebCore::Layout::BlockFormattingContext::computeWidthAndMargin const): Deleted.
1367         (WebCore::Layout::BlockFormattingContext::computeHeightAndMargin const): Deleted.
1368         (WebCore::Layout::BlockFormattingContext::computedIntrinsicWidthConstraints const): Deleted.
1369         (WebCore::Layout::BlockFormattingContext::setEstimatedMarginBefore const): Deleted.
1370         * layout/blockformatting/BlockFormattingContext.h:
1371         (WebCore::Layout::BlockFormattingContext::computeWidthAndMargin):
1372         (WebCore::Layout::BlockFormattingContext::geometry const):
1373         (WebCore::Layout::BlockFormattingContext::MarginCollapse::layoutState):
1374         (WebCore::Layout::BlockFormattingContext::MarginCollapse::layoutState const):
1375         (WebCore::Layout::BlockFormattingContext::marginCollapse const):
1376         (WebCore::Layout::BlockFormattingContext::quirks const):
1377         (WebCore::Layout::BlockFormattingContext::removeEstimatedMarginBefore):
1378         (WebCore::Layout::BlockFormattingContext::Geometry::Geometry):
1379         (WebCore::Layout::BlockFormattingContext::Quirks::Quirks):
1380         (WebCore::Layout::BlockFormattingContext::MarginCollapse::MarginCollapse):
1381         (WebCore::Layout::BlockFormattingContext::removeEstimatedMarginBefore const): Deleted.
1382         * layout/blockformatting/BlockFormattingContextGeometry.cpp:
1383         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedHeightAndMargin):
1384         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedWidthAndMargin const):
1385         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowReplacedWidthAndMargin const):
1386         (WebCore::Layout::BlockFormattingContext::Geometry::staticVerticalPosition const):
1387         (WebCore::Layout::BlockFormattingContext::Geometry::staticHorizontalPosition const):
1388         (WebCore::Layout::BlockFormattingContext::Geometry::staticPosition const):
1389         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowHeightAndMargin):
1390         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowWidthAndMargin):
1391         (WebCore::Layout::BlockFormattingContext::Geometry::intrinsicWidthConstraints):
1392         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedWidthAndMargin): Deleted.
1393         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowReplacedWidthAndMargin): Deleted.
1394         (WebCore::Layout::BlockFormattingContext::Geometry::staticVerticalPosition): Deleted.
1395         (WebCore::Layout::BlockFormattingContext::Geometry::staticHorizontalPosition): Deleted.
1396         (WebCore::Layout::BlockFormattingContext::Geometry::staticPosition): Deleted.
1397         * layout/blockformatting/BlockFormattingContextQuirks.cpp:
1398         (WebCore::Layout::BlockFormattingContext::Quirks::needsStretching const):
1399         (WebCore::Layout::BlockFormattingContext::Quirks::stretchedInFlowHeight):
1400         (WebCore::Layout::BlockFormattingContext::Quirks::shouldIgnoreCollapsedQuirkMargin const):
1401         (WebCore::Layout::BlockFormattingContext::Quirks::needsStretching): Deleted.
1402         (WebCore::Layout::BlockFormattingContext::Quirks::shouldIgnoreCollapsedQuirkMargin): Deleted.
1403         * layout/blockformatting/BlockMarginCollapse.cpp:
1404         (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginBeforeCollapsesWithParentMarginAfter const):
1405         (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginBeforeCollapsesWithParentMarginBefore const):
1406         (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginBeforeCollapsesWithPreviousSiblingMarginAfter const):
1407         (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginBeforeCollapsesWithFirstInFlowChildMarginBefore const):
1408         (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginAfterCollapsesWithSiblingMarginBeforeWithClearance const):
1409         (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginAfterCollapsesWithParentMarginBefore const):
1410         (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginAfterCollapsesWithParentMarginAfter const):
1411         (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginAfterCollapsesWithLastInFlowChildMarginAfter const):
1412         (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginAfterCollapsesWithNextSiblingMarginBefore const):
1413         (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginsCollapseThrough const):
1414         (WebCore::Layout::BlockFormattingContext::MarginCollapse::updateMarginAfterForPreviousSibling const):
1415         (WebCore::Layout::BlockFormattingContext::MarginCollapse::positiveNegativeValues):
1416         (WebCore::Layout::BlockFormattingContext::MarginCollapse::positiveNegativeMarginBefore):
1417         (WebCore::Layout::BlockFormattingContext::MarginCollapse::positiveNegativeMarginAfter):
1418         (WebCore::Layout::BlockFormattingContext::MarginCollapse::estimatedMarginBefore):
1419         (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginBeforeIgnoringCollapsingThrough):
1420         (WebCore::Layout::BlockFormattingContext::MarginCollapse::updatePositiveNegativeMarginValues):
1421         (WebCore::Layout::BlockFormattingContext::MarginCollapse::collapsedVerticalValues):
1422         (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginBeforeCollapsesWithParentMarginAfter): Deleted.
1423         (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginBeforeCollapsesWithParentMarginBefore): Deleted.
1424         (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginBeforeCollapsesWithPreviousSiblingMarginAfter): Deleted.
1425         (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginBeforeCollapsesWithFirstInFlowChildMarginBefore): Deleted.
1426         (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginAfterCollapsesWithSiblingMarginBeforeWithClearance): Deleted.
1427         (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginAfterCollapsesWithParentMarginBefore): Deleted.
1428         (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginAfterCollapsesWithParentMarginAfter): Deleted.
1429         (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginAfterCollapsesWithLastInFlowChildMarginAfter): Deleted.
1430         (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginAfterCollapsesWithNextSiblingMarginBefore): Deleted.
1431         (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginsCollapseThrough): Deleted.
1432         (WebCore::Layout::BlockFormattingContext::MarginCollapse::updateMarginAfterForPreviousSibling): Deleted.
1433         * layout/inlineformatting/InlineFormattingContext.cpp:
1434         (WebCore::Layout::InlineFormattingContext::layout):
1435         (WebCore::Layout::InlineFormattingContext::computedIntrinsicWidthConstraints):
1436         (WebCore::Layout::InlineFormattingContext::initializeMarginBorderAndPaddingForGenericInlineBox):
1437         (WebCore::Layout::InlineFormattingContext::computeMarginBorderAndPaddingForInlineContainer):
1438         (WebCore::Layout::InlineFormattingContext::computeIntrinsicWidthForFormattingRoot):
1439         (WebCore::Layout::InlineFormattingContext::computeHorizontalMargin):
1440         (WebCore::Layout::InlineFormattingContext::computeWidthAndMargin):
1441         (WebCore::Layout::InlineFormattingContext::computeHeightAndMargin):
1442         (WebCore::Layout::InlineFormattingContext::layoutFormattingContextRoot):
1443         (WebCore::Layout::InlineFormattingContext::computeWidthAndHeightForReplacedInlineBox):
1444         (WebCore::Layout::InlineFormattingContext::layout const): Deleted.
1445         (WebCore::Layout::InlineFormattingContext::computedIntrinsicWidthConstraints const): Deleted.
1446         (WebCore::Layout::InlineFormattingContext::initializeMarginBorderAndPaddingForGenericInlineBox const): Deleted.
1447         (WebCore::Layout::InlineFormattingContext::computeMarginBorderAndPaddingForInlineContainer const): Deleted.
1448         (WebCore::Layout::InlineFormattingContext::computeIntrinsicWidthForFormattingRoot const): Deleted.
1449         (WebCore::Layout::InlineFormattingContext::computeHorizontalMargin const): Deleted.
1450         (WebCore::Layout::InlineFormattingContext::computeWidthAndMargin const): Deleted.
1451         (WebCore::Layout::InlineFormattingContext::computeHeightAndMargin const): Deleted.
1452         (WebCore::Layout::InlineFormattingContext::layoutFormattingContextRoot const): Deleted.
1453         (WebCore::Layout::InlineFormattingContext::computeWidthAndHeightForReplacedInlineBox const): Deleted.
1454         * layout/inlineformatting/InlineFormattingContext.h:
1455         (WebCore::Layout::InlineFormattingContext::quirks const):
1456         (WebCore::Layout::InlineFormattingContext::geometry const):
1457         (WebCore::Layout::InlineFormattingContext::Geometry::Geometry):
1458         (WebCore::Layout::InlineFormattingContext::Quirks::Quirks):
1459         * layout/inlineformatting/InlineFormattingContextGeometry.cpp:
1460         (WebCore::Layout::InlineFormattingContext::Geometry::inlineBlockWidthAndMargin):
1461         (WebCore::Layout::InlineFormattingContext::Geometry::inlineBlockHeightAndMargin const):
1462         (WebCore::Layout::InlineFormattingContext::Geometry::inlineBlockHeightAndMargin): Deleted.
1463         * layout/inlineformatting/InlineFormattingContextLineLayout.cpp:
1464         (WebCore::Layout::LineLayout::LineLayout):
1465         (WebCore::Layout::InlineFormattingContext::InlineLayout::layout const):
1466         (WebCore::Layout::InlineFormattingContext::InlineLayout::computedIntrinsicWidth const):
1467         (WebCore::Layout::InlineFormattingContext::InlineLayout::createDisplayRuns const):
1468         * layout/inlineformatting/InlineFormattingContextQuirks.cpp:
1469         (WebCore::Layout::InlineFormattingContext::Quirks::lineDescentNeedsCollapsing const):
1470         (WebCore::Layout::InlineFormattingContext::Quirks::lineHeightConstraints const):
1471         (WebCore::Layout::InlineFormattingContext::Quirks::lineDescentNeedsCollapsing): Deleted.
1472         (WebCore::Layout::InlineFormattingContext::Quirks::lineHeightConstraints): Deleted.
1473         * layout/inlineformatting/InlineLine.cpp:
1474         (WebCore::Layout::Line::Line):
1475         (WebCore::Layout::Line::close):
1476         * layout/inlineformatting/InlineLine.h:
1477         * layout/tableformatting/TableFormattingContext.cpp:
1478         (WebCore::Layout::TableFormattingContext::layout):
1479         (WebCore::Layout::TableFormattingContext::computedIntrinsicWidthConstraints):
1480         (WebCore::Layout::TableFormattingContext::ensureTableGrid):
1481         (WebCore::Layout::TableFormattingContext::computePreferredWidthForColumns):
1482         (WebCore::Layout::TableFormattingContext::computedTableWidth):
1483         (WebCore::Layout::TableFormattingContext::distributeAvailableWidth):
1484         (WebCore::Layout::TableFormattingContext::layout const): Deleted.
1485         (WebCore::Layout::TableFormattingContext::computedIntrinsicWidthConstraints const): Deleted.
1486         (WebCore::Layout::TableFormattingContext::ensureTableGrid const): Deleted.
1487         (WebCore::Layout::TableFormattingContext::computePreferredWidthForColumns const): Deleted.
1488         (WebCore::Layout::TableFormattingContext::computedTableWidth const): Deleted.
1489         (WebCore::Layout::TableFormattingContext::distributeAvailableWidth const): Deleted.
1490         * layout/tableformatting/TableFormattingContext.h:
1491         (WebCore::Layout::TableFormattingContext::geometry const):
1492         (WebCore::Layout::TableFormattingContext::Geometry::Geometry):
1493         * layout/tableformatting/TableFormattingContextGeometry.cpp:
1494         (WebCore::Layout::TableFormattingContext::Geometry::tableCellHeightAndMargin const):
1495         (WebCore::Layout::TableFormattingContext::Geometry::tableCellHeightAndMargin): Deleted.
1496
1497 2019-08-30  Keith Rollin  <krollin@apple.com>
1498
1499         Remove AppKitCompatibilityDeclarations.h
1500         https://bugs.webkit.org/show_bug.cgi?id=201283
1501         <rdar://problem/54822042>
1502
1503         Reviewed by Alexey Proskuryakov.
1504
1505         The two copies of these files -- on in WTF, one in MiniBrowser -- are
1506         empty and can be removed.
1507
1508         No new tests -- no new or changed functionality.
1509
1510         * WebCorePrefix.h:
1511
1512 2019-08-30  Alicia Boya García  <aboya@igalia.com>
1513
1514         [MSE][GStreamer] Gracefully fail on invalid non-first initialization segment
1515         https://bugs.webkit.org/show_bug.cgi?id=201322
1516
1517         Reviewed by Xabier Rodriguez-Calvar.
1518
1519         In normal operation of AppendPipeline, except during tear down,
1520         qtdemux never removes a pad. Even if a new initialization segment is
1521         appended, the pad is reused.
1522
1523         There is an exception though: when the new initialization segment has
1524         an incompatible set of tracks. This is invalid under the MSE spec and
1525         should produce an error, but in this case this was making an assertion
1526         fail -- in particular by sending an EOS to the to-be-removed pad, which
1527         AppendPipeline doesn't expect.
1528
1529         This patch changes the assertion with graceful error handling for that
1530         error.
1531
1532         Fixes media/media-source/media-source-seek-detach-crash.html
1533
1534         * platform/graphics/gstreamer/mse/AppendPipeline.cpp:
1535         (WebCore::AppendPipeline::AppendPipeline):
1536         (WebCore::AppendPipeline::handleErrorConditionFromStreamingThread):
1537         (WebCore::AppendPipeline::handleErrorSyncMessage):
1538         * platform/graphics/gstreamer/mse/AppendPipeline.h:
1539
1540 2019-08-30  Charlie Turner  <cturner@igalia.com>
1541
1542         [GStreamer] Do not ref the player count from background threads.
1543         https://bugs.webkit.org/show_bug.cgi?id=201222
1544
1545         Reviewed by Xabier Rodriguez-Calvar.
1546
1547         Test: imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-retrieve-persistent-license.https.html
1548
1549         In the sync-message handler, a ref() was being taken waiting for a
1550         CDM instance to be attached. This hits asserts since you are not
1551         allowed to ref() an object created on the main thread
1552         (BasePlayer) on a background thread.
1553
1554         The protection condition was overly scoped, tidied up the locking
1555         and made it more granular. To avoid needing to hold a ref() in the
1556         background thread, use instead a semaphore to signal when a CDM
1557         instance is attached, or the player has been destroyed.
1558
1559         Also remove an erroneous safe-guard, the operator= in
1560         isCDMInstanceAvailable will ref() the CDMInstance for us. This use
1561         of holding a reference to CDMInstance in the decryptors is not
1562         thread-safe, and now we have a problem since there's no clean way
1563         to communicate with CDMInstance from background threads without
1564         being thread unsafe. For ClearKey and Widevine, a thread safe
1565         ProxyCDM needs to be designed and passed to background
1566         threads (upcoming patch).
1567
1568         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
1569         (WebCore::MediaPlayerPrivateGStreamerBase::~MediaPlayerPrivateGStreamerBase):
1570         (WebCore::MediaPlayerPrivateGStreamerBase::handleSyncMessage):
1571         (WebCore::MediaPlayerPrivateGStreamerBase::cdmInstanceAttached):
1572         (WebCore::MediaPlayerPrivateGStreamerBase::cdmInstanceDetached):
1573         (WebCore::MediaPlayerPrivateGStreamerBase::handleProtectionEvent):
1574         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
1575         * platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.cpp:
1576         (isCDMInstanceAvailable):
1577
1578 2019-08-30  Sihui Liu  <sihui_liu@apple.com>
1579
1580         [wk2] LayoutTest imported/w3c/web-platform-tests/IndexedDB/fire-error-event-exception.html is a flaky failure
1581         https://bugs.webkit.org/show_bug.cgi?id=169621
1582
1583         Reviewed by Alex Christensen.
1584
1585         Event handlers of IDB objects were called in unexpected order because of race, which made the console messages 
1586         in the tests come out of order.
1587         Usually, an operation/request result is handled as follows:
1588         1. IDBServer sends IDBResultData to IDBClient.
1589         2. IDBClient receives IDBResultData and finishes a IDBTransaction operation with that result.
1590         3. IDBTransaction schedules operation completed timer.
1591         4. (Some time later) Timer fires, and IDBTransaction completes a request with the result and dispatches event.
1592         5. (Some time later) IDBTransaction is notified that event is dispatched. If there are other results received, 
1593         IDBTransaction schedules operation completed timer.
1594
1595         In previous implementation, if the IDBClient received a second IDBResultData for the same IDBTransaction between
1596         step 3 and step 4, it would not schedule timer because timer was still active; if it received the result between
1597         step 4 and step 5, it would schedule timer again.
1598
1599         Consider a flow like this:
1600         result1 of transaction1 received, timer of transaction1 scheduled
1601         result2 of transaction2 received, timer of transaction2 scheduled
1602         result3 of transaction1 is received, timer of transaction1 active so no scheduling
1603         timer of transaction1 fired, event1 to be dispatched to request1
1604         timer of transaction2 fired, event2 to be dispatched to request2
1605         result4 of transaction2 received, timer of transaction2 scheduled
1606         event1 dispatched, timer of transaction1 scheduled (for handling result3)
1607         event2 dispatched, timer of transaction2 active so no scheduling
1608         timer of transaction2 fired, event3 to dispatch to request4
1609         timer of transaction1 fired, event4 to dispatch to request3
1610
1611         request4 would get event before request3, though result3 was received before result4. We should stop scheduling
1612         event if an IDBTransaction is in between step 4 and 5, which means its m_currentlyCompletingRequest is not null.
1613
1614         * Modules/indexeddb/IDBTransaction.cpp:
1615         (WebCore::IDBTransaction::operationCompletedOnServer):
1616
1617 2019-08-29  Devin Rousso  <drousso@apple.com>
1618
1619         Web Inspector: Debugger: async event listener stack traces should be available in Workers
1620         https://bugs.webkit.org/show_bug.cgi?id=200903
1621
1622         Reviewed by Joseph Pecoraro.
1623
1624         Tests: inspector/worker/dom-debugger-event-interval-breakpoints.html
1625                inspector/worker/dom-debugger-event-listener-breakpoints.html
1626                inspector/worker/dom-debugger-event-timeout-breakpoints.html
1627                inspector/worker/dom-debugger-url-breakpoints.html
1628
1629         * inspector/agents/WebDebuggerAgent.h:
1630         * inspector/agents/WebDebuggerAgent.cpp:
1631         (WebCore::WebDebuggerAgent::enabled const): Added.
1632         (WebCore::WebDebuggerAgent::enable):
1633         (WebCore::WebDebuggerAgent::disable):
1634         (WebCore::WebDebuggerAgent::didAddEventListener): Added.
1635         (WebCore::WebDebuggerAgent::willRemoveEventListener): Added.
1636         (WebCore::WebDebuggerAgent::willHandleEvent): Added.
1637         (WebCore::WebDebuggerAgent::didPostMessage): Added.
1638         (WebCore::WebDebuggerAgent::didFailPostMessage): Added.
1639         (WebCore::WebDebuggerAgent::willDispatchPostMessage): Added.
1640         (WebCore::WebDebuggerAgent::didDispatchPostMessage): Added.
1641         (WebCore::WebDebuggerAgent::didClearAsyncStackTraceData): Added.
1642         * inspector/agents/page/PageDebuggerAgent.h:
1643         * inspector/agents/page/PageDebuggerAgent.cpp:
1644         (WebCore::PageDebuggerAgent::enabled const): Added.
1645         (WebCore::PageDebuggerAgent::enable):
1646         (WebCore::PageDebuggerAgent::disable):
1647         (WebCore::PageDebuggerAgent::didClearAsyncStackTraceData): Deleted.
1648         (WebCore::PageDebuggerAgent::didAddEventListener): Deleted.
1649         (WebCore::PageDebuggerAgent::willRemoveEventListener): Deleted.
1650         (WebCore::PageDebuggerAgent::willHandleEvent): Deleted.
1651         (WebCore::PageDebuggerAgent::didPostMessage): Deleted.
1652         (WebCore::PageDebuggerAgent::didFailPostMessage): Deleted.
1653         (WebCore::PageDebuggerAgent::willDispatchPostMessage): Deleted.
1654         (WebCore::PageDebuggerAgent::didDispatchPostMessage): Deleted.
1655         Move various `InspectorInstrumentation` calls from `PageDebuggerAgent` to `WebDebuggerAgent`
1656         so that `WorkerDebuggerAgent` also inherits them.
1657
1658         * inspector/InstrumentingAgents.h:
1659         (WebCore::InstrumentingAgents::webDebuggerAgent const): Added.
1660         (WebCore::InstrumentingAgents::setWebDebuggerAgent): Added.
1661         (WebCore::InstrumentingAgents::inspectorDebuggerAgent const): Deleted.
1662         (WebCore::InstrumentingAgents::setInspectorDebuggerAgent): Deleted.
1663         * inspector/InstrumentingAgents.cpp:
1664         (WebCore::InstrumentingAgents::reset):
1665         * inspector/agents/InspectorTimelineAgent.cpp:
1666         (WebCore::InspectorTimelineAgent::mainFrameStartedLoading):
1667         (WebCore::InspectorTimelineAgent::startProgrammaticCapture):
1668         (WebCore::InspectorTimelineAgent::stopProgrammaticCapture):
1669         * inspector/InspectorInstrumentation.cpp:
1670         (WebCore::InspectorInstrumentation::didClearWindowObjectInWorldImpl):
1671         (WebCore::InspectorInstrumentation::isDebuggerPausedImpl):
1672         (WebCore::InspectorInstrumentation::didInstallTimerImpl):
1673         (WebCore::InspectorInstrumentation::didRemoveTimerImpl):
1674         (WebCore::InspectorInstrumentation::didAddEventListenerImpl):
1675         (WebCore::InspectorInstrumentation::willRemoveEventListenerImpl):
1676         (WebCore::InspectorInstrumentation::didPostMessageImpl):
1677         (WebCore::InspectorInstrumentation::didFailPostMessageImpl):
1678         (WebCore::InspectorInstrumentation::willDispatchPostMessageImpl):
1679         (WebCore::InspectorInstrumentation::didDispatchPostMessageImpl):
1680         (WebCore::InspectorInstrumentation::willHandleEventImpl):
1681         (WebCore::InspectorInstrumentation::didHandleEventImpl):
1682         (WebCore::InspectorInstrumentation::willFireTimerImpl):
1683         (WebCore::InspectorInstrumentation::didFireTimerImpl):
1684         (WebCore::InspectorInstrumentation::scriptExecutionBlockedByCSPImpl):
1685         (WebCore::InspectorInstrumentation::didCommitLoadImpl):
1686         (WebCore::InspectorInstrumentation::frameStartedLoadingImpl):
1687         (WebCore::InspectorInstrumentation::frameStoppedLoadingImpl):
1688         (WebCore::InspectorInstrumentation::addMessageToConsoleImpl):
1689         (WebCore::InspectorInstrumentation::didRequestAnimationFrameImpl):
1690         (WebCore::InspectorInstrumentation::didCancelAnimationFrameImpl):
1691         (WebCore::InspectorInstrumentation::willFireAnimationFrameImpl):
1692         (WebCore::InspectorInstrumentation::didFireAnimationFrameImpl):
1693         Replace `inspectorDebuggerAgent` with `webDebuggerAgent` so the right instrumentation hooks
1694         are available.
1695
1696 2019-08-29  Chris Dumez  <cdumez@apple.com>
1697
1698         Add "IsolatedCopy" in the name of String getters that call isolatedCopy() on the string
1699         https://bugs.webkit.org/show_bug.cgi?id=201318
1700
1701         Reviewed by Alex Christensen.
1702
1703         Add "IsolatedCopy" in the name of String getters that call isolatedCopy() on the string, for clarity.
1704
1705         * Modules/indexeddb/server/IDBServer.cpp:
1706         (WebCore::IDBServer::IDBServer::createBackingStore):
1707         (WebCore::IDBServer::IDBServer::performGetAllDatabaseNames):
1708         (WebCore::IDBServer::IDBServer::removeDatabasesModifiedSinceForVersion):
1709         (WebCore::IDBServer::IDBServer::performCloseAndDeleteDatabasesModifiedSince):
1710         (WebCore::IDBServer::IDBServer::removeDatabasesWithOriginsForVersion):
1711         (WebCore::IDBServer::IDBServer::performCloseAndDeleteDatabasesForOrigins):
1712         (WebCore::IDBServer::IDBServer::computeSpaceUsedForOrigin):
1713         (WebCore::IDBServer::IDBServer::upgradeFilesIfNecessary):
1714         * Modules/indexeddb/server/IDBServer.h:
1715         (WebCore::IDBServer::IDBServer::databaseDirectoryPathIsolatedCopy const):
1716         * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
1717         (WebCore::IDBServer::SQLiteIDBBackingStore::fullDatabaseDirectoryWithUpgrade):
1718         (WebCore::IDBServer::SQLiteIDBBackingStore::databasesSizeForOrigin const):
1719         (WebCore::IDBServer::SQLiteIDBBackingStore::deleteBackingStore):
1720         * Modules/indexeddb/server/SQLiteIDBBackingStore.h:
1721         (WebCore::IDBServer::SQLiteIDBBackingStore::databaseRootDirectoryIsolatedCopy const):
1722         * Modules/webdatabase/Database.cpp:
1723         (WebCore::Database::markAsDeletedAndClose):
1724         (WebCore::Database::stringIdentifierIsolatedCopy const):
1725         (WebCore::Database::displayNameIsolatedCopy const):
1726         (WebCore::Database::expectedVersionIsolatedCopy const):
1727         (WebCore::Database::fileNameIsolatedCopy const):
1728         (WebCore::Database::details const):
1729         (WebCore::Database::didCommitWriteTransaction):
1730         (WebCore::Database::didExceedQuota):
1731         * Modules/webdatabase/Database.h:
1732         * Modules/webdatabase/DatabaseTracker.cpp:
1733         (WebCore::DatabaseTracker::maximumSize):
1734         (WebCore::DatabaseTracker::doneCreatingDatabase):
1735         (WebCore::DatabaseTracker::addOpenDatabase):
1736         (WebCore::DatabaseTracker::removeOpenDatabase):
1737         * Modules/webdatabase/SQLError.h:
1738         (WebCore::SQLError::messageIsolatedCopy const):
1739         * Modules/webdatabase/SQLError.idl:
1740         * Modules/webdatabase/SQLTransaction.cpp:
1741         (WebCore::SQLTransaction::openTransactionAndPreflight):
1742         * workers/service/server/RegistrationDatabase.cpp:
1743         (WebCore::RegistrationDatabase::openSQLiteDatabase):
1744         (WebCore::RegistrationDatabase::clearAll):
1745         * workers/service/server/RegistrationDatabase.h:
1746         (WebCore::RegistrationDatabase::databaseDirectoryIsolatedCopy const):
1747
1748 2019-08-29  Keith Rollin  <krollin@apple.com>
1749
1750         Update .xcconfig symbols to reflect the current set of past and future product versions.
1751         https://bugs.webkit.org/show_bug.cgi?id=200720
1752         <rdar://problem/54305032>
1753
1754         Reviewed by Alex Christensen.
1755
1756         Remove version symbols related to old OS's we no longer support,
1757         ensure that version symbols are defined for OS's we do support.
1758
1759         No new tests -- no new or changed functionality.
1760
1761         * Configurations/Base.xcconfig:
1762         * Configurations/DebugRelease.xcconfig:
1763         * Configurations/Version.xcconfig:
1764
1765 2019-08-29  Timothy Hatcher  <timothy@apple.com>
1766
1767         Copying and pasting two paragraphs with a newline between them results in stray paragraph with newline inside.
1768         https://bugs.webkit.org/show_bug.cgi?id=201306
1769
1770         Reviewed by Wenson Hsieh.
1771
1772         Test: editing/pasteboard/paste-without-nesting.html
1773
1774         * editing/ReplaceSelectionCommand.cpp:
1775         (WebCore::ReplaceSelectionCommand::moveNodeOutOfAncestor): Consider the ancestor node safe to remove
1776         if there is no rendered text inside, not just if there are any child nodes.
1777
1778 2019-08-29  Devin Rousso  <drousso@apple.com>
1779
1780         Web Inspector: DOMDebugger: support event breakpoints in Worker contexts
1781         https://bugs.webkit.org/show_bug.cgi?id=200651
1782
1783         Reviewed by Joseph Pecoraro.
1784
1785         Tests: inspector/worker/dom-debugger-dom-breakpoints.html
1786                inspector/worker/dom-debugger-event-animation-frame-breakpoints.html
1787                inspector/worker/dom-debugger-event-interval-breakpoints.html
1788                inspector/worker/dom-debugger-event-listener-breakpoints.html
1789                inspector/worker/dom-debugger-event-timeout-breakpoints.html
1790                inspector/worker/dom-debugger-url-breakpoints.html
1791
1792         * inspector/agents/InspectorDOMDebuggerAgent.h:
1793         * inspector/agents/InspectorDOMDebuggerAgent.cpp:
1794         (WebCore::InspectorDOMDebuggerAgent::InspectorDOMDebuggerAgent):
1795         (WebCore::InspectorDOMDebuggerAgent::enabled const):
1796         (WebCore::InspectorDOMDebuggerAgent::enable):
1797         (WebCore::InspectorDOMDebuggerAgent::disable):
1798         (WebCore::InspectorDOMDebuggerAgent::debuggerWasEnabled):
1799         (WebCore::InspectorDOMDebuggerAgent::debuggerWasDisabled):
1800         (WebCore::InspectorDOMDebuggerAgent::setEventBreakpoint):
1801         (WebCore::InspectorDOMDebuggerAgent::removeEventBreakpoint):
1802         (WebCore::InspectorDOMDebuggerAgent::~InspectorDOMDebuggerAgent): Deleted.
1803         (WebCore::InspectorDOMDebuggerAgent::frameDocumentUpdated): Deleted.
1804         (WebCore::InspectorDOMDebuggerAgent::willInvalidateStyleAttr): Deleted.
1805         (WebCore::InspectorDOMDebuggerAgent::didInsertDOMNode): Deleted.
1806         (WebCore::InspectorDOMDebuggerAgent::didRemoveDOMNode): Deleted.
1807         (WebCore::domTypeForName): Deleted.
1808         (WebCore::domTypeName): Deleted.
1809         (WebCore::InspectorDOMDebuggerAgent::setDOMBreakpoint): Deleted.
1810         (WebCore::InspectorDOMDebuggerAgent::removeDOMBreakpoint): Deleted.
1811         (WebCore::InspectorDOMDebuggerAgent::willInsertDOMNode): Deleted.
1812         (WebCore::InspectorDOMDebuggerAgent::willRemoveDOMNode): Deleted.
1813         (WebCore::InspectorDOMDebuggerAgent::willModifyDOMAttr): Deleted.
1814         (WebCore::InspectorDOMDebuggerAgent::descriptionForDOMEvent): Deleted.
1815         (WebCore::InspectorDOMDebuggerAgent::hasBreakpoint): Deleted.
1816         (WebCore::InspectorDOMDebuggerAgent::updateSubtreeBreakpoints): Deleted.
1817         (WebCore::InspectorDOMDebuggerAgent::willFireAnimationFrame): Deleted.
1818         * inspector/agents/page/PageDOMDebuggerAgent.h: Added.
1819         * inspector/agents/page/PageDOMDebuggerAgent.cpp: Added.
1820         (WebCore::domTypeForName):
1821         (WebCore::domTypeName):
1822         (WebCore::PageDOMDebuggerAgent::PageDOMDebuggerAgent):
1823         (WebCore::PageDOMDebuggerAgent::enabled const):
1824         (WebCore::PageDOMDebuggerAgent::enable):
1825         (WebCore::PageDOMDebuggerAgent::disable):
1826         (WebCore::PageDOMDebuggerAgent::setDOMBreakpoint):
1827         (WebCore::PageDOMDebuggerAgent::removeDOMBreakpoint):
1828         (WebCore::PageDOMDebuggerAgent::frameDocumentUpdated):
1829         (WebCore::PageDOMDebuggerAgent::willInsertDOMNode):
1830         (WebCore::PageDOMDebuggerAgent::didInsertDOMNode):
1831         (WebCore::PageDOMDebuggerAgent::willRemoveDOMNode):
1832         (WebCore::PageDOMDebuggerAgent::didRemoveDOMNode):
1833         (WebCore::PageDOMDebuggerAgent::willModifyDOMAttr):
1834         (WebCore::PageDOMDebuggerAgent::willFireAnimationFrame):
1835         (WebCore::PageDOMDebuggerAgent::willInvalidateStyleAttr):
1836         (WebCore::PageDOMDebuggerAgent::setAnimationFrameBreakpoint):
1837         (WebCore::PageDOMDebuggerAgent::descriptionForDOMEvent):
1838         (WebCore::PageDOMDebuggerAgent::updateSubtreeBreakpoints):
1839         (WebCore::PageDOMDebuggerAgent::hasBreakpoint):
1840         * inspector/agents/worker/WorkerDOMDebuggerAgent.h: Added.
1841         * inspector/agents/worker/WorkerDOMDebuggerAgent.cpp: Added.
1842         (WebCore::WorkerDOMDebuggerAgent::WorkerDOMDebuggerAgent):
1843         (WebCore::WorkerDOMDebuggerAgent::setDOMBreakpoint):
1844         (WebCore::WorkerDOMDebuggerAgent::removeDOMBreakpoint):
1845         (WebCore::WorkerDOMDebuggerAgent::setAnimationFrameBreakpoint):
1846         Split the `InspectorDOMDebuggerAgent` into two subclasses depending on the inspected target
1847         type, as certain `DOMDebugger` commands don't make sense for a `Worker` context:
1848          - DOM breakpoints, as there is no DOM in a `Worker` context
1849          - animation frame event breakpoints, as there is no `requestAnimationFrame` function
1850
1851         * inspector/InspectorController.cpp:
1852         (WebCore::InspectorController::createLazyAgents):
1853         * inspector/WorkerInspectorController.cpp:
1854         (WebCore::WorkerInspectorController::createLazyAgents):
1855
1856         * inspector/InstrumentingAgents.h:
1857         (WebCore::InstrumentingAgents::pageDOMDebuggerAgent const): Added.
1858         (WebCore::InstrumentingAgents::setPageDOMDebuggerAgent): Added.
1859         * inspector/InstrumentingAgents.cpp:
1860         (WebCore::InstrumentingAgents::reset):
1861
1862         * inspector/InspectorInstrumentation.cpp:
1863         (WebCore::InspectorInstrumentation::willInsertDOMNodeImpl):
1864         (WebCore::InspectorInstrumentation::didInsertDOMNodeImpl):
1865         (WebCore::InspectorInstrumentation::willRemoveDOMNodeImpl):
1866         (WebCore::InspectorInstrumentation::didRemoveDOMNodeImpl):
1867         (WebCore::InspectorInstrumentation::willModifyDOMAttrImpl):
1868         (WebCore::InspectorInstrumentation::willInvalidateStyleAttrImpl):
1869         (WebCore::InspectorInstrumentation::frameDocumentUpdatedImpl):
1870         (WebCore::InspectorInstrumentation::willFireAnimationFrameImpl):
1871
1872         * Sources.txt:
1873         * WebCore.xcodeproj/project.pbxproj:
1874
1875 2019-08-29  Keith Rollin  <krollin@apple.com>
1876
1877         Remove CCBigNum fallback code
1878         https://bugs.webkit.org/show_bug.cgi?id=201250
1879         <rdar://problem/54814330>
1880
1881         Reviewed by Jiewen Tan.
1882
1883         Bug 184637 added support for CCRSAGetCRTComponents, falling back to
1884         the older CCBigNum code if CCRSAGetCRTComponents was not available. We
1885         now only support OS's that have CCRSAGetCRTComponents so remove the
1886         fallback code.
1887
1888         No new tests -- no new or changed functionality.
1889
1890         * crypto/CommonCryptoUtilities.cpp:
1891         (WebCore::CCBigNum::CCBigNum): Deleted.
1892         (WebCore::CCBigNum::~CCBigNum): Deleted.
1893         (WebCore::CCBigNum::operator=): Deleted.
1894         (WebCore::CCBigNum::data const): Deleted.
1895         (WebCore::CCBigNum::operator- const): Deleted.
1896         (WebCore::CCBigNum::operator% const): Deleted.
1897         (WebCore::CCBigNum::inverse const): Deleted.
1898         * crypto/CommonCryptoUtilities.h:
1899         * crypto/mac/CryptoKeyRSAMac.cpp:
1900         (WebCore::getPrivateKeyComponents):
1901
1902 2019-08-29  Zalan Bujtas  <zalan@apple.com>
1903
1904         [LFC][TFC] Initialize <tr> display boxes.
1905         https://bugs.webkit.org/show_bug.cgi?id=201232
1906         <rdar://problem/54806789>
1907
1908         Reviewed by Antti Koivisto.
1909
1910         Set them as blank for now.
1911
1912         * layout/tableformatting/TableFormattingContext.cpp:
1913         (WebCore::Layout::TableFormattingContext::initializeDisplayBoxToBlank const):
1914         (WebCore::Layout::TableFormattingContext::layout const):
1915         * layout/tableformatting/TableFormattingContext.h:
1916         * layout/tableformatting/TableGrid.cpp:
1917         (WebCore::Layout::TableGrid::Row::Row):
1918         (WebCore::Layout::TableGrid::appendCell):
1919         * layout/tableformatting/TableGrid.h:
1920         (WebCore::Layout::TableGrid::Row::box const):
1921
1922 2019-08-29  Youenn Fablet  <youenn@apple.com>
1923
1924         document.fonts.ready is resolved too quickly
1925         https://bugs.webkit.org/show_bug.cgi?id=174030
1926         <rdar://problem/33083550>
1927
1928         Reviewed by Frédéric Wang.
1929
1930         As described in https://drafts.csswg.org/css-font-loading/#font-face-set-ready, the ready promise
1931         is only fulfilled after layout operations complete and no additional font loads are necessary.
1932
1933         This patch implements this by notifying the FontFaceSet created for the document when the document
1934         is finished loading. At that time, the promise will be resolved as soon as fonts are finished loading if any.
1935
1936         Test: imported/w3c/web-platform-tests/infrastructure/assumptions/document-fonts-ready.html
1937
1938         * css/CSSFontSelector.cpp:
1939         (WebCore::CSSFontSelector::optionalFontFaceSet):
1940         * css/CSSFontSelector.h:
1941         * css/FontFaceSet.cpp:
1942         (WebCore::FontFaceSet::FontFaceSet):
1943         (WebCore::FontFaceSet::startedLoading):
1944         (WebCore::FontFaceSet::didFirstLayout):
1945         (WebCore::FontFaceSet::completedLoading):
1946         * css/FontFaceSet.h:
1947         * dom/Document.cpp:
1948         (WebCore::Document::implicitClose):
1949
1950 2019-08-29  Zalan Bujtas  <zalan@apple.com>
1951
1952         [LFC][BFC] BlockFormattingContext::usedAvailableWidthForFloatAvoider should only be called on float avoiders.
1953         https://bugs.webkit.org/show_bug.cgi?id=201238
1954         <rdar://problem/54807663>
1955
1956         Reviewed by Antti Koivisto.
1957
1958         Make the horizontal available space logic for float avoiders more explicit/readable. 
1959
1960         * layout/blockformatting/BlockFormattingContext.cpp:
1961         (WebCore::Layout::BlockFormattingContext::usedAvailableWidthForFloatAvoider const):
1962         (WebCore::Layout::BlockFormattingContext::layoutFormattingContextRoot const):
1963
1964 2019-08-29  Zalan Bujtas  <zalan@apple.com>
1965
1966         [LFC] Inline content logging should have some extra space for better readability
1967         https://bugs.webkit.org/show_bug.cgi?id=201236
1968         <rdar://problem/54807336>
1969
1970         Reviewed by Antti Koivisto.
1971
1972         * layout/layouttree/LayoutTreeBuilder.cpp:
1973         (WebCore::Layout::outputInlineRuns):
1974
1975 2019-08-29  Simon Fraser  <simon.fraser@apple.com>
1976
1977         Avoid running the outline painting phase if no renderers have outlines
1978         https://bugs.webkit.org/show_bug.cgi?id=201284
1979
1980         Reviewed by Said Abou-Hallawa.
1981
1982         The outline painting phase (paintOutlineForFragments()) can take up to 20% of the painting time
1983         even when there are no outlines. Keep track of which renderers have outlines, and only run the phase
1984         when printing (for hasOutlineAnnotation()) or if there are any renderers with outlines.
1985
1986         * rendering/RenderElement.cpp:
1987         (WebCore::RenderElement::styleWillChange):
1988         (WebCore::RenderElement::styleDidChange):
1989         (WebCore::RenderElement::willBeDestroyed):
1990         * rendering/RenderLayer.cpp:
1991         (WebCore::RenderLayer::paintLayerContents):
1992         * rendering/RenderView.h:
1993
1994 2019-08-29  Zalan Bujtas  <zalan@apple.com>
1995
1996         [LFC][TFC] Use the "complicated-cases" category for computing the TFC root's height
1997         https://bugs.webkit.org/show_bug.cgi?id=201230
1998         <rdar://problem/54806131>
1999
2000         Reviewed by Antti Koivisto.
2001
2002         This might change in the future but for now let's use the "complicated cases" when we need to compute the TFC's height and vertical margin.
2003         This is very BFC specific since (block)TFC is always parented in a BFC.
2004
2005         * layout/blockformatting/BlockFormattingContextGeometry.cpp:
2006         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowHeightAndMargin):
2007
2008 2019-08-29  Zalan Bujtas  <zalan@apple.com>
2009
2010         [LFC][TFC] The table wrapper box is a block level box
2011         https://bugs.webkit.org/show_bug.cgi?id=201229
2012         <rdar://problem/54805515>
2013
2014         Reviewed by Antti Koivisto.
2015
2016         This is the anonymous box that we inject as the parent of the table caption/actual table box.
2017
2018         * layout/FormattingContextGeometry.cpp:
2019         (WebCore::Layout::FormattingContext::Geometry::complicatedCases):
2020         * layout/blockformatting/BlockFormattingContext.cpp:
2021         (WebCore::Layout::BlockFormattingContext::computeEstimatedVerticalPositionForAncestors const):
2022         * layout/layouttree/LayoutBox.cpp:
2023         (WebCore::Layout::Box::establishesBlockFormattingContext const):
2024         (WebCore::Layout::Box::isFloatAvoider const):
2025         (WebCore::Layout::Box::isBlockLevelBox const):
2026
2027 2019-08-29  Youenn Fablet  <youenn@apple.com>
2028
2029         Skip fetch event dispatching if no fetch event handler is added at script evaluation time
2030         https://bugs.webkit.org/show_bug.cgi?id=201174
2031
2032         Reviewed by Chris Dumez.
2033
2034         At end of worker script evaluation, store whether a fetch event handler is registered.
2035         Send it back to the SWServer that will store it in the corresponding SWServerWorker.
2036
2037         Add support for soft update directly from the registration.
2038         This will trigger a soft-update from the worker context itself.
2039         In theory, this should be started by the job queue but we do not have a way yet to implement this as per spec.
2040
2041         Test: http/wpt/service-workers/skipFetchEvent.https.html
2042
2043         * workers/DedicatedWorkerThread.h:
2044         (WebCore::DedicatedWorkerThread::start):
2045         * workers/WorkerMessagingProxy.cpp:
2046         (WebCore::WorkerMessagingProxy::startWorkerGlobalScope):
2047         * workers/WorkerThread.cpp:
2048         (WebCore::WorkerThread::workerThread):
2049         * workers/WorkerThread.h:
2050         (WebCore::WorkerThread::finishedEvaluatingScript):
2051         * workers/service/context/SWContextManager.cpp:
2052         (WebCore::SWContextManager::registerServiceWorkerThreadForInstall):
2053         (WebCore::SWContextManager::startedServiceWorker):
2054         (WebCore::SWContextManager::softUpdate):
2055         * workers/service/context/SWContextManager.h:
2056         * workers/service/context/ServiceWorkerThread.cpp:
2057         (WebCore::ServiceWorkerThread::postFetchTask):
2058         (WebCore::ServiceWorkerThread::softUpdate):
2059         (WebCore::ServiceWorkerThread::finishedEvaluatingScript):
2060         (WebCore::ServiceWorkerThread::start):
2061         * workers/service/context/ServiceWorkerThread.h:
2062         (WebCore::ServiceWorkerThread::doesHandleFetch const):
2063         * workers/service/server/SWServer.h:
2064         * workers/service/server/SWServerRegistration.cpp:
2065         (WebCore::SWServerRegistration::shouldSoftUpdate const):
2066         (WebCore::SWServerRegistration::softUpdate):
2067         * workers/service/server/SWServerRegistration.h:
2068         (WebCore::SWServerRegistration::isStale const):
2069         * workers/service/server/SWServerToContextConnection.cpp:
2070         (WebCore::SWServerToContextConnection::generateConnectionIdentifier):
2071         (WebCore::SWServerToContextConnection::SWServerToContextConnection):
2072         (WebCore::SWServerToContextConnection::scriptContextStarted):
2073         * workers/service/server/SWServerToContextConnection.h:
2074         * workers/service/server/SWServerWorker.cpp:
2075         (WebCore::SWServerWorker::scriptContextStarted):
2076         (WebCore::SWServerWorker::setState):
2077         * workers/service/server/SWServerWorker.h:
2078         (WebCore::SWServerWorker::shouldSkipFetchEvent const):
2079
2080 2019-08-29  Keith Rollin  <krollin@apple.com>
2081
2082         Remove support for macOS < 10.13 (part 3)
2083         https://bugs.webkit.org/show_bug.cgi?id=201224
2084         <rdar://problem/54795934>
2085
2086         Reviewed by Darin Adler.
2087
2088         Remove symbols in WebKitTargetConditionals.xcconfig related to macOS
2089         10.13, including WK_MACOS_1013 and WK_MACOS_BEFORE_1013, and suffixes
2090         like _MACOS_SINCE_1013.
2091
2092         No new tests -- no new or changed functionality.
2093
2094         * Configurations/WebKitTargetConditionals.xcconfig:
2095
2096 2019-08-29  Charlie Turner  <cturner@igalia.com>
2097
2098         [GStreamer] Do not use makeWeakPtr from streaming thread.
2099         https://bugs.webkit.org/show_bug.cgi?id=201220
2100
2101         Reviewed by Xabier Rodriguez-Calvar.
2102
2103         Test: imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-retrieve-persistent-license.https.html
2104
2105         Recently some asserts were added that you can't create WeakPtr's
2106         from streaming threads when the factory is created on the
2107         main-thread. The fix is to eagerly create the WeakPtr at player
2108         initialization time, rather than lazily when the streaming thread
2109         first asks for it.
2110
2111         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
2112
2113 2019-08-29  Rob Buis  <rbuis@igalia.com>
2114
2115         Address some MathML FIXMEs 
2116         https://bugs.webkit.org/show_bug.cgi?id=201293
2117
2118         Reviewed by Frédéric Wang.
2119
2120         Add element tag checks for data, time and dialog.
2121
2122         * mathml/MathMLOperatorDictionary.h:
2123         * mathml/MathMLPresentationElement.cpp:
2124         (WebCore::MathMLPresentationElement::isPhrasingContent):
2125         (WebCore::MathMLPresentationElement::isFlowContent):
2126
2127 2019-08-29  Zan Dobersek  <zdobersek@igalia.com>
2128
2129         [Nicosia] Nicosia::Animation is missing the copy assignment operator
2130         https://bugs.webkit.org/show_bug.cgi?id=201298
2131
2132         Reviewed by Carlos Garcia Campos.
2133
2134         Along with the copy constructor, the Nicosia::Animation class also
2135         requires the copy assignment operator that's invoked whenever
2136         the containing Nicosia::Animations object is copied across different
2137         state objects.
2138
2139         Much like the constructor, the copy assignment should clone the
2140         TimingFunction object to make it safely reusable in other contexts.
2141         This fixes the assertion failures in debug configurations over the
2142         improper cross-thread RefCounted usage.
2143
2144         * platform/graphics/nicosia/NicosiaAnimation.cpp:
2145         (Nicosia::Animation::operator=):
2146         * platform/graphics/nicosia/NicosiaAnimation.h:
2147         Explicitly default the move constructor and assignment operator,
2148         providing the whole quartet.
2149
2150 2019-08-29  Rob Buis  <rbuis@igalia.com>
2151
2152         https://bugs.webkit.org/show_bug.cgi?id=200917
2153         Do not call addHTTPOriginIfNeeded for window.open
2154
2155         window.open() always uses GET requests and addHTTPOriginIfNeeded
2156         has no effect for GET, so do not call it.
2157
2158         Reviewed by Frédéric Wang.
2159
2160         * page/DOMWindow.cpp:
2161         (WebCore::DOMWindow::createWindow):
2162
2163 2019-08-29  Carlos Garcia Campos  <cgarcia@igalia.com>
2164
2165         WebSockets: first-party for cookies not set in handshake request when using platform APIs
2166         https://bugs.webkit.org/show_bug.cgi?id=200165
2167
2168         Reviewed by Youenn Fablet.
2169
2170         * Modules/websockets/ThreadableWebSocketChannel.cpp:
2171         (WebCore::ThreadableWebSocketChannel::webSocketConnectRequest):
2172
2173 2019-08-29  Rob Buis  <rbuis@igalia.com>
2174
2175         Implement HTMLOrForeignElement
2176         https://bugs.webkit.org/show_bug.cgi?id=201219
2177
2178         Reviewed by Frédéric Wang.
2179
2180         Add FIXME for updating the spec link.
2181
2182         * html/HTMLOrForeignElement.idl:
2183
2184 2019-08-28  Zan Dobersek  <zdobersek@igalia.com>
2185
2186         [Nicosia] Implement layer representation retain, release mechanics
2187         https://bugs.webkit.org/show_bug.cgi?id=201133
2188
2189         Reviewed by Carlos Garcia Campos.
2190
2191         * page/scrolling/nicosia/ScrollingStateNodeNicosia.cpp:
2192         (WebCore::LayerRepresentation::retainPlatformLayer):
2193         Type-cast the layer object to the reference-counted
2194         Nicosia::PlatformLayer type and reference that object.
2195         (WebCore::LayerRepresentation::releasePlatformLayer):
2196         Ditto, but dereference the object.
2197
2198 2019-08-28  Zan Dobersek  <zdobersek@igalia.com>
2199
2200         [Nicosia] Add Nicosia::PlatformLayer::accessStaging() helper
2201         https://bugs.webkit.org/show_bug.cgi?id=201132
2202
2203         Reviewed by Carlos Garcia Campos.
2204
2205         * platform/graphics/nicosia/NicosiaPlatformLayer.h:
2206         (Nicosia::CompositionLayer::accessStaging):
2207         Add an accessor into the staging state of the Nicosia::PlatformLayer
2208         object. This will be needed for the application of scrolling changes
2209         in the asynchronous scrolling system.
2210
2211 2019-08-28  Zan Dobersek  <zdobersek@igalia.com>
2212
2213         [CoordGraphics] Expose Nicosia layer as the underlying CoordinatedGraphicsLayer platform layer
2214         https://bugs.webkit.org/show_bug.cgi?id=201131
2215
2216         Reviewed by Carlos Garcia Campos.
2217
2218         Add the CoordinatedGraphicsLayer::platformLayer() override, returning
2219         the Nicosia::CompositionLayer object as the underlying platform layer.
2220         This will come in handy for asynchronous scrolling.
2221
2222         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
2223         (WebCore::CoordinatedGraphicsLayer::platformLayer const):
2224         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
2225
2226 2019-08-28  Zan Dobersek  <zdobersek@igalia.com>
2227
2228         [Nicosia] Polish ScrollingCoordinator implementation
2229         https://bugs.webkit.org/show_bug.cgi?id=201130
2230
2231         Reviewed by Carlos Garcia Campos.
2232
2233         These changes primarily mirror the Mac implementation of this class.
2234
2235         * page/scrolling/nicosia/ScrollingCoordinatorNicosia.cpp:
2236         (WebCore::ScrollingCoordinatorNicosia::pageDestroyed):
2237         Upon releasing the ThreadedScrollingTree, it should also be invalidated
2238         on the scrolling thread.
2239         (WebCore::ScrollingCoordinatorNicosia::commitTreeState):
2240         Invoke willCommitTree() at the beginning of this method. Additionally
2241         the pending-commit-count is incremented for the ThreadedScrollingTree
2242         object.
2243
2244 2019-08-28  Ryosuke Niwa  <rniwa@webkit.org>
2245
2246         Make tabIndex IDL attribute reflect its content attribute
2247         https://bugs.webkit.org/show_bug.cgi?id=199606
2248         <rdar://problem/52811448>
2249
2250         Reviewed by Chris Dumez.
2251
2252         This patch makes tabIndex IDL attribute no longer return 0 when the element is focusable
2253         to match the latest HTML5 specification. Instead, the IDL attribute simply reflect the tabindex
2254         content attribute with some elements having 0 as the default tab index (see r248784):
2255         https://html.spec.whatwg.org/multipage/interaction.html#the-tabindex-attribute
2256
2257         The practical implication is that tabIndex IDL attribute on a root editable element (a.k.a.
2258         editing host in HTML5 spec term), body element in design mode, and media elements with
2259         media controls would start returning -1 instead of 0.
2260
2261         Mechanically, this is accomplished by removing the special case in Element::tabIndexForBindings
2262         when supportsFocus returned true. The effect, if any, this patch has on each element which
2263         overrides Element::supportsFocus is summarized as follows (indentation simplies inheritance):
2264
2265         HTMLAnchorElement -> No effect since defaultTabIndex returns 0.
2266             HTMLAreaElement -> Ditto.
2267         HTMLBodyElement -> Changes to return -1 in design mode.
2268         HTMLElement -> Changes to return -1 on a root editable element.
2269         HTMLFormControlElement
2270             HTMLButtonElement -> No effect since defaultTabIndex returns 0.
2271             HTMLFieldSetElement -> No effect since this is an override to use HTMLElement's supportsFocus.
2272             HTMLFormControlElementWithState
2273                 HTMLKeygenElement -> No effect since defaultTabIndex returns 0.
2274                 HTMLSelectElement -> Ditto.
2275                 HTMLTextFormControlElement -> Ditto.
2276                     HTMLInputElement -> Ditto.
2277                     HTMLTextAreaElement -> Ditto.
2278             HTMLOutputElement -> No effect since this is an override to use HTMLElement's supportsFocus.
2279         HTMLFrameElementBase - No change. Added defaultTabIndex on HTMLIFrameElement and HTMLFrameElement
2280             to returns 0.
2281         HTMLImageElement - No impact since it only affects when an image is set to be editable via SPI.
2282         HTMLMediaElement - Changes to return -1 when media controls is present.
2283         HTMLPlugInElement - applet and embed elements change to return -1 when the plugin is available.
2284         HTMLSummaryElement - No change. Added defaultTabIndex to return 0 when it's active to match
2285             supportsFocus as well as the HTML5 specification.
2286         MathMLElement - No effect since tabIndex IDL attribute does not exist in MathML.
2287         SVGAElement - No effect since defaultTabIndex returns 0.
2288         SVGClipPathElement - No effect since it always returns false.
2289         SVGDefsElement - No effect since it always returns false.
2290
2291         Tests: fast/dom/tabindex-defaults.html
2292                plugins/focus.html
2293
2294         * dom/Element.cpp:
2295         (WebCore::Element::tabIndexForBindings const): Made the change.
2296         * html/HTMLFrameElement.cpp:
2297         (WebCore::HTMLFrameElement::defaultTabIndex const): Added to preserve the existing behavior.
2298         * html/HTMLFrameElement.h:
2299         * html/HTMLIFrameElement.cpp:
2300         (WebCore::HTMLIFrameElement::defaultTabIndex const): Ditto.
2301         * html/HTMLIFrameElement.h:
2302         * html/HTMLObjectElement.cpp:
2303         (WebCore::HTMLObjectElement::defaultTabIndex const): Added. Always return 0 to match the spec.
2304         * html/HTMLObjectElement.h:
2305         * html/HTMLSummaryElement.cpp:
2306         (WebCore::HTMLSummaryElement::defaultTabIndex const): Added. Return 0 when the this summary
2307         is the active summary element of the details element.
2308         * html/HTMLSummaryElement.h:
2309
2310 2019-08-28  Simon Fraser  <simon.fraser@apple.com>
2311
2312         Make FillLayer::hasImage() inline
2313         https://bugs.webkit.org/show_bug.cgi?id=201265
2314
2315         Reviewed by Zalan Bujtas.
2316
2317         FillLayer::hasImage() shows up on profiles because it's called from hot functions like
2318         isTransparent() and hasMask(), so make a basic inline version that doens't have
2319         to walk the list.
2320
2321         * rendering/style/FillLayer.cpp:
2322         (WebCore::FillLayer::hasImageInAnyLayer const):
2323         (WebCore::FillLayer::hasImage const): Deleted.
2324         * rendering/style/FillLayer.h:
2325         (WebCore::FillLayer::hasImage const):
2326
2327 2019-08-28  Peng Liu  <peng.liu6@apple.com>
2328
2329         REGRESSION: String check: “realtime” Suggesting “real time”
2330         https://bugs.webkit.org/show_bug.cgi?id=201107
2331         <rdar://problem/46372620>
2332
2333         Reviewed by Jer Noble.
2334
2335         Update Localizable.strings.
2336
2337         No new test.
2338
2339         * en.lproj/Localizable.strings:
2340         * platform/LocalizedStrings.cpp:
2341         (WebCore::localizedMediaControlElementString):
2342
2343 2019-08-28  Simon Fraser  <simon.fraser@apple.com>
2344
2345         PaintFrequencyTracker triggers too many calls to MonotonicTime::now() on layer painting
2346         https://bugs.webkit.org/show_bug.cgi?id=201261
2347
2348         Reviewed by Zalan Bujtas.
2349
2350         MonotonicTime::now() shows up as expensive when painting layer-heavy content, because PaintFrequencyTracker
2351         makes two calls per layer paint.
2352
2353         Halve the number of calls by storing m_lastPaintTime at the start of the paint; doing so doesn't substantially
2354         change the behavior of the tracker.
2355
2356         * rendering/PaintFrequencyTracker.h:
2357         (WebCore::PaintFrequencyTracker::begin):
2358         (WebCore::PaintFrequencyTracker::end):
2359
2360 2019-08-28  Ross Kirsling  <ross.kirsling@sony.com>
2361
2362         Unreviewed. Restabilize non-unified build.
2363
2364         * inspector/agents/WebConsoleAgent.h:
2365         * loader/ResourceLoadObserver.h:
2366
2367 2019-08-28  Simon Fraser  <simon.fraser@apple.com>
2368
2369         Devirtualize RenderBox::visualOverflowRect()
2370         https://bugs.webkit.org/show_bug.cgi?id=201231
2371
2372         Reviewed by Zalan Bujtas.
2373
2374         The only override of RenderBox::visualOverflowRect() was in RenderView, for "paintsEntireContents" views, and as
2375         far as I can tell this is not necessary. visualOverflowRect() is hot when called from RenderLayer::localBoundingBox() --
2376         this shows in profiles when scrolling large patch reviews, so making it non-virtual is a performance enhancement.
2377         
2378         RenderLayer::localBoundingBox() can also just call visualOverflowRect(), since that returns borderBoxRect()
2379         when there is no overflow.
2380
2381         * rendering/RenderBox.h:
2382         (WebCore::RenderBox::visualOverflowRect const):
2383         * rendering/RenderLayer.cpp:
2384         (WebCore::performOverlapTests): Minor optimization to avoid a call to boundingBox().
2385         (WebCore::RenderLayer::calculateClipRects const):
2386         * rendering/RenderView.cpp:
2387         (WebCore::RenderView::visualOverflowRect const): Deleted.
2388         * rendering/RenderView.h:
2389
2390 2019-08-28  Austin Eng  <enga@chromium.org>
2391
2392         Create ANGLE EGL Context with all extensions disabled by default
2393         https://bugs.webkit.org/show_bug.cgi?id=200900
2394
2395         Reviewed by Alex Christensen.
2396
2397         In WebGL, extensions must be explicitly requested before they are enabled.
2398         Fixes the following WebGL conformance tests with the ANGLE backend
2399         LayoutTests/webgl/*/conformance/extensions/ext-blend-minmax.html
2400         LayoutTests/webgl/*/conformance/extensions/ext-frag-depth.html
2401         LayoutTests/webgl/*/conformance/extensions/ext-shader-texture-lod.html
2402         LayoutTests/webgl/*/conformance/extensions/ext-sRGB.html
2403         LayoutTests/webgl/*/conformance/extensions/oes-standard-derivatives.html
2404         LayoutTests/webgl/*/conformance/extensions/oes-texture-float.html
2405         LayoutTests/webgl/*/conformance/extensions/webgl-compressed-texture-s3tc.html
2406         LayoutTests/webgl/*/conformance/glsl/misc/shader-with-dfdx.frag.html
2407         LayoutTests/webgl/*/conformance/glsl/variables/glsl-built-ins.html
2408         LayoutTests/webgl/*/conformance/textures/misc/texture-npot-video.html
2409         LayoutTests/webgl/*/conformance/textures/misc/texture-npot.html
2410
2411         * html/canvas/ANGLEInstancedArrays.cpp:
2412         (WebCore::ANGLEInstancedArrays::ANGLEInstancedArrays):
2413         (WebCore::ANGLEInstancedArrays::supported):
2414         * html/canvas/WebGLCompressedTextureASTC.cpp:
2415         (WebCore::WebGLCompressedTextureASTC::WebGLCompressedTextureASTC):
2416         * html/canvas/WebGLCompressedTextureATC.cpp:
2417         (WebCore::WebGLCompressedTextureATC::WebGLCompressedTextureATC):
2418         * html/canvas/WebGLCompressedTexturePVRTC.cpp:
2419         (WebCore::WebGLCompressedTexturePVRTC::WebGLCompressedTexturePVRTC):
2420         * html/canvas/WebGLCompressedTextureS3TC.cpp:
2421         (WebCore::WebGLCompressedTextureS3TC::WebGLCompressedTextureS3TC):
2422         (WebCore::WebGLCompressedTextureS3TC::supported):
2423         * html/canvas/WebGLDebugShaders.cpp:
2424         (WebCore::WebGLDebugShaders::WebGLDebugShaders):
2425         * html/canvas/WebGLDepthTexture.cpp:
2426         (WebCore::WebGLDepthTexture::WebGLDepthTexture):
2427         * html/canvas/WebGLDrawBuffers.cpp:
2428         (WebCore::WebGLDrawBuffers::WebGLDrawBuffers):
2429         (WebCore::WebGLDrawBuffers::supported):
2430         * platform/graphics/angle/GraphicsContext3DANGLE.cpp:
2431         (WebCore::GraphicsContext3D::reshapeFBOs):
2432         (WebCore::GraphicsContext3D::validateDepthStencil):
2433         * platform/graphics/cocoa/GraphicsContext3DCocoa.mm:
2434         (WebCore::GraphicsContext3D::GraphicsContext3D):
2435
2436 2019-08-28  Said Abou-Hallawa  <sabouhallawa@apple.com>
2437
2438         All image drawing functions should take an argument of type ImagePaintingOptions
2439         https://bugs.webkit.org/show_bug.cgi?id=201059
2440
2441         Reviewed by Simon Fraser.
2442
2443         In this patch:
2444         -- All the image drawing function will take an argument of type
2445            ImagePaintingOptions instead of passing individual options.
2446
2447         -- ImagePaintingOptions is made like a set of options. It can be
2448            initialized with any number of options and the order does not matter
2449
2450         -- Image::originalSize() is deleted because it returns size() and none
2451            of the Image concrete classes overrides this implementation.
2452
2453         * Headers.cmake:
2454         * WebCore.xcodeproj/project.pbxproj:
2455         * html/ImageBitmap.cpp:
2456         (WebCore::ImageBitmap::createPromise):
2457         (WebCore::ImageBitmap::createFromBuffer):
2458         * html/canvas/CanvasRenderingContext2DBase.cpp:
2459         (WebCore::CanvasRenderingContext2DBase::drawImage):
2460         (WebCore::drawImageToContext):
2461         (WebCore::CanvasRenderingContext2DBase::fullCanvasCompositedDrawImage):
2462         * platform/graphics/BitmapImage.cpp:
2463         (WebCore::BitmapImage::draw):
2464         (WebCore::BitmapImage::drawPattern):
2465         * platform/graphics/BitmapImage.h:
2466         * platform/graphics/CrossfadeGeneratedImage.cpp:
2467         (WebCore::drawCrossfadeSubimage):
2468         (WebCore::CrossfadeGeneratedImage::draw):
2469         (WebCore::CrossfadeGeneratedImage::drawPattern):
2470         * platform/graphics/CrossfadeGeneratedImage.h:
2471         * platform/graphics/CustomPaintImage.cpp:
2472         (WebCore::CustomPaintImage::draw):
2473         (WebCore::CustomPaintImage::drawPattern):
2474         * platform/graphics/CustomPaintImage.h:
2475         * platform/graphics/GeneratedImage.h:
2476         (WebCore::GeneratedImage::draw):
2477         (WebCore::GeneratedImage::drawPattern):
2478         * platform/graphics/GradientImage.cpp:
2479         (WebCore::GradientImage::draw):
2480         (WebCore::GradientImage::drawPattern):
2481         * platform/graphics/GradientImage.h:
2482         * platform/graphics/GraphicsContext.cpp:
2483         (WebCore::GraphicsContext::drawImage):
2484         (WebCore::GraphicsContext::drawTiledImage):
2485         (WebCore::GraphicsContext::drawImageBuffer):
2486         (WebCore::GraphicsContext::drawConsumingImageBuffer):
2487         * platform/graphics/GraphicsContext.h:
2488         (WebCore::GraphicsContext::drawNativeImage):
2489         (WebCore::GraphicsContext::drawImage):
2490         (WebCore::GraphicsContext::drawTiledImage):
2491         (WebCore::GraphicsContext::drawImageBuffer):
2492         (WebCore::GraphicsContext::drawPattern):
2493         (WebCore::GraphicsContext::drawConsumingImageBuffer):
2494         (WebCore::ImagePaintingOptions::ImagePaintingOptions): Deleted.
2495         (WebCore::ImagePaintingOptions::usesDefaultInterpolation const): Deleted.
2496         * platform/graphics/GraphicsContextImpl.cpp:
2497         (WebCore::GraphicsContextImpl::drawImageImpl):
2498         (WebCore::GraphicsContextImpl::drawTiledImageImpl):
2499         * platform/graphics/GraphicsContextImpl.h:
2500         * platform/graphics/Image.cpp:
2501         (WebCore::Image::drawPattern):
2502         (WebCore::Image::drawTiled):
2503         (WebCore::Image::computeIntrinsicDimensions):
2504         * platform/graphics/Image.h:
2505         (WebCore::Image::drawPattern):
2506         (WebCore::Image::draw):
2507         (WebCore::Image::drawTiled):
2508         (WebCore::Image::originalSize const): Deleted.
2509         * platform/graphics/ImageBuffer.h:
2510         (WebCore::ImageBuffer::draw):
2511         (WebCore::ImageBuffer::drawPattern):
2512         (WebCore::ImageBuffer::drawConsuming):
2513         * platform/graphics/ImagePaintingOptions.h: Added.
2514         (WebCore::ImagePaintingOptions::ImagePaintingOptions):
2515         (WebCore::ImagePaintingOptions::compositeOperator const):
2516         (WebCore::ImagePaintingOptions::blendMode const):
2517         (WebCore::ImagePaintingOptions::decodingMode const):
2518         (WebCore::ImagePaintingOptions::orientation const):
2519         (WebCore::ImagePaintingOptions::interpolationQuality const):
2520         (WebCore::ImagePaintingOptions::setOption):
2521         * platform/graphics/NamedImageGeneratedImage.cpp:
2522         (WebCore::NamedImageGeneratedImage::draw):
2523         (WebCore::NamedImageGeneratedImage::drawPattern):
2524         * platform/graphics/NamedImageGeneratedImage.h:
2525         * platform/graphics/NativeImage.h:
2526         * platform/graphics/cairo/CairoOperations.cpp:
2527         (WebCore::Cairo::drawShadowLayerBuffer):
2528         (WebCore::Cairo::drawShadowImage):
2529         (WebCore::Cairo::drawNativeImage):
2530         (WebCore::Cairo::drawPattern):
2531         * platform/graphics/cairo/CairoOperations.h:
2532         * platform/graphics/cairo/GraphicsContextCairo.cpp:
2533         (WebCore::GraphicsContext::drawNativeImage):
2534         (WebCore::GraphicsContext::drawPattern):
2535         * platform/graphics/cairo/GraphicsContextImplCairo.cpp:
2536         (WebCore::GraphicsContextImplCairo::drawNativeImage):
2537         (WebCore::GraphicsContextImplCairo::drawPattern):
2538         * platform/graphics/cairo/GraphicsContextImplCairo.h:
2539         * platform/graphics/cairo/ImageBufferCairo.cpp:
2540         (WebCore::ImageBuffer::drawConsuming):
2541         (WebCore::ImageBuffer::draw):
2542         (WebCore::ImageBuffer::drawPattern):
2543         * platform/graphics/cairo/NativeImageCairo.cpp:
2544         (WebCore::drawNativeImage):
2545         * platform/graphics/cg/GraphicsContext3DCG.cpp:
2546         (WebCore::GraphicsContext3D::paintToCanvas):
2547         * platform/graphics/cg/GraphicsContextCG.cpp:
2548         (WebCore::GraphicsContext::drawNativeImage):
2549         (WebCore::GraphicsContext::drawPattern):
2550         * platform/graphics/cg/ImageBufferCG.cpp:
2551         (WebCore::ImageBuffer::drawConsuming):
2552         (WebCore::ImageBuffer::draw):
2553         (WebCore::ImageBuffer::drawPattern):
2554         * platform/graphics/cg/NativeImageCG.cpp:
2555         (WebCore::drawNativeImage):
2556         * platform/graphics/cg/PDFDocumentImage.cpp:
2557         (WebCore::PDFDocumentImage::draw):
2558         * platform/graphics/cg/PDFDocumentImage.h:
2559         * platform/graphics/displaylists/DisplayListItems.cpp:
2560         (WebCore::DisplayList::DrawNativeImage::DrawNativeImage):
2561         (WebCore::DisplayList::DrawNativeImage::apply const):
2562         (WebCore::DisplayList::DrawPattern::DrawPattern):
2563         (WebCore::DisplayList::DrawPattern::apply const):
2564         * platform/graphics/displaylists/DisplayListItems.h:
2565         (WebCore::DisplayList::DrawNativeImage::create):
2566         (WebCore::DisplayList::DrawPattern::create):
2567         (WebCore::DisplayList::DrawPattern::DrawPattern):
2568         * platform/graphics/displaylists/DisplayListRecorder.cpp:
2569         (WebCore::DisplayList::Recorder::drawNativeImage):
2570         (WebCore::DisplayList::Recorder::drawPattern):
2571         * platform/graphics/displaylists/DisplayListRecorder.h:
2572         * platform/graphics/filters/FEBlend.cpp:
2573         (WebCore::FEBlend::platformApplySoftware):
2574         * platform/graphics/filters/FEComposite.cpp:
2575         (WebCore::FEComposite::platformApplySoftware):
2576         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
2577         (WebCore::MediaPlayerPrivateGStreamerBase::paint):
2578         * platform/graphics/nicosia/cairo/NicosiaCairoOperationRecorder.cpp:
2579         (Nicosia::CairoOperationRecorder::drawNativeImage):
2580         (Nicosia::CairoOperationRecorder::drawPattern):
2581         * platform/graphics/nicosia/cairo/NicosiaCairoOperationRecorder.h:
2582         * platform/graphics/win/Direct2DOperations.cpp:
2583         (WebCore::Direct2D::drawNativeImage):
2584         (WebCore::Direct2D::drawPattern):
2585         * platform/graphics/win/Direct2DOperations.h:
2586         * platform/graphics/win/GraphicsContextImplDirect2D.h:
2587         * platform/graphics/win/ImageCGWin.cpp:
2588         (WebCore::BitmapImage::getHBITMAPOfSize):
2589         (WebCore::BitmapImage::drawFrameMatchingSourceSize):
2590         * platform/graphics/win/ImageCairoWin.cpp:
2591         (WebCore::BitmapImage::getHBITMAPOfSize):
2592         (WebCore::BitmapImage::drawFrameMatchingSourceSize):
2593         * platform/graphics/win/NativeImageDirect2D.cpp:
2594         (WebCore::drawNativeImage):
2595         * platform/ios/DragImageIOS.mm:
2596         (WebCore::createDragImageFromImage):
2597         * rendering/RenderBoxModelObject.cpp:
2598         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
2599         * rendering/RenderEmbeddedObject.cpp:
2600         (WebCore::RenderEmbeddedObject::paintSnapshotImage):
2601         * rendering/RenderImage.cpp:
2602         (WebCore::RenderImage::paintReplaced):
2603         (WebCore::RenderImage::paintIntoRect):
2604         * rendering/RenderSnapshottedPlugIn.cpp:
2605         (WebCore::RenderSnapshottedPlugIn::paintSnapshot):
2606         * rendering/RenderThemeMac.mm:
2607         (WebCore::RenderThemeMac::paintSnapshottedPluginOverlay):
2608         * svg/graphics/SVGImage.cpp:
2609         (WebCore::SVGImage::drawForContainer):
2610         (WebCore::SVGImage::nativeImageForCurrentFrame):
2611         (WebCore::SVGImage::nativeImage):
2612         (WebCore::SVGImage::drawPatternForContainer):
2613         (WebCore::SVGImage::draw):
2614         * svg/graphics/SVGImage.h:
2615         * svg/graphics/SVGImageForContainer.cpp:
2616         (WebCore::SVGImageForContainer::draw):
2617         (WebCore::SVGImageForContainer::drawPattern):
2618         * svg/graphics/SVGImageForContainer.h:
2619
2620 2019-08-28  Said Abou-Hallawa  <sabouhallawa@apple.com>
2621
2622         XLinkNames namespace is required before the 'href' attribute of SVG animate elements
2623         https://bugs.webkit.org/show_bug.cgi?id=201227
2624
2625         Reviewed by Ryosuke Niwa.
2626
2627         To get the animation target element, get the value of the "href" attribute
2628         or the "xlink:href" attribute.
2629
2630         Tests: svg/custom/href-svg-namespace-animate-target.svg
2631
2632         * svg/animation/SVGSMILElement.cpp:
2633         (WebCore::SVGSMILElement::buildPendingResource):
2634
2635 2019-08-28  Truitt Savell  <tsavell@apple.com>
2636
2637         Unreviewed, rolling out r249209.
2638
2639         Broke 19 webgpu/ tests
2640
2641         Reverted changeset:
2642
2643         "[WHLSL] Inline typedef'd types during Metal code generation
2644         to simplify generated code while also making it easier to
2645         read"
2646         https://bugs.webkit.org/show_bug.cgi?id=201185
2647         https://trac.webkit.org/changeset/249209
2648
2649 2019-08-28  Myles C. Maxfield  <mmaxfield@apple.com>
2650
2651         [WHLSL] Matrices need to have correct alignment
2652         https://bugs.webkit.org/show_bug.cgi?id=201212
2653
2654         Reviewed by Robin Morisset.
2655
2656         Matrices have particular alignment requirements and size requirements.
2657
2658           Type   | Alignment | Size
2659         ---------------------------
2660         float2x2 |         8 |   16
2661         float2x3 |        16 |   32
2662         float2x4 |        16 |   32
2663         float3x2 |         8 |   24
2664         float3x3 |        16 |   48
2665         float3x4 |        16 |   48
2666         float4x2 |         8 |   32
2667         float4x3 |        16 |   64
2668         float4x4 |        16 |   64
2669
2670         These are important because they may be a member of a struct, and we don't want to misplace
2671         every successive item in the struct.
2672
2673         Test: webgpu/whlsl/matrix-alignment.html
2674
2675         * Modules/webgpu/WHLSL/Metal/WHLSLNativeTypeWriter.cpp:
2676         (WebCore::WHLSL::Metal::writeNativeType):
2677
2678 2019-08-28  Rob Buis  <rbuis@igalia.com>
2679
2680         Implement HTMLOrForeignElement
2681         https://bugs.webkit.org/show_bug.cgi?id=201219
2682
2683         Reviewed by Ryosuke Niwa.
2684
2685         Add the HTMLOrForeignElement [1] interface to share properties
2686         and methods between HTML, SVG and MathML.
2687
2688         [1] https://github.com/mathml-refresh/mathml/issues/83
2689
2690         * CMakeLists.txt:
2691         * DerivedSources-input.xcfilelist:
2692         * DerivedSources-output.xcfilelist:
2693         * DerivedSources.make:
2694         * Sources.txt:
2695         * WebCore.xcodeproj/project.pbxproj:
2696         * dom/StaticRange.h:
2697         * html/HTMLElement.idl:
2698         * html/HTMLOrForeignElement.idl: Added.
2699         * svg/SVGElement.idl:
2700
2701 2019-08-28  Sam Weinig  <weinig@apple.com>
2702
2703         [WHLSL] Inline typedef'd types during Metal code generation to simplify generated code while also making it easier to read
2704         https://bugs.webkit.org/show_bug.cgi?id=201185
2705
2706         Reviewed by Saam Barati.
2707
2708         The current Metal code generation generates many unnecessary typedefs during TypeNamer::emitMetalTypeDefinitions
2709         such as 'typedef float2 type19;' that can be removed by just using resolved type whereever the typedef would have
2710         been used. The only types that actually need to be predefined are the types that declare a new struct or enum, which 
2711         means we can stop emitting for AST::TypeReference, AST::Pointer, AST::Array, and AST::TypeDefinition. Instead, the
2712         relevent mangledNameForType constructs the computed name on the fly. 
2713         
2714         This is a 25% speedup in the metal code generation phase.
2715
2716         * Modules/webgpu/WHLSL/Metal/WHLSLFunctionWriter.cpp:
2717         (WebCore::WHLSL::Metal::FunctionDefinitionWriter::visit):
2718         Switch to using auto rather than Mangled*Name when it is obvious and the actual return type
2719         may need to become more complicated (e.g. MangledOrNativeTypeName).
2720
2721         * Modules/webgpu/WHLSL/Metal/WHLSLTypeNamer.h:
2722         * Modules/webgpu/WHLSL/Metal/WHLSLTypeNamer.cpp:
2723         (WebCore::WHLSL::Metal::TypeNamer::visit):
2724         There is no need to generate typenames for AST::TypeDefinitions if they are never used.
2725
2726         (WebCore::WHLSL::Metal::TypeNamer::generateUniquedTypeName):
2727         The only UnnamedType that needs a generated typename now is AST::ArrayReferenceType, which emits a struct interface.
2728
2729         (WebCore::WHLSL::Metal::TypeNamer::emitUnnamedTypeDefinition):
2730         Stop generating type definitions for AST::TypeReference, AST::Pointer, AST::Array.
2731
2732         (WebCore::WHLSL::Metal::TypeNamer::emitNamedTypeDefinition):
2733         Stop generating type definitions for AST::TypeDefinition.
2734
2735         (WebCore::WHLSL::Metal::TypeNamer::emitMetalTypeDefinitions):
2736         Update for rename from m_unnamedTypeMapping to m_arrayReferenceTypeMapping.
2737
2738         (WebCore::WHLSL::Metal::TypeNamer::mangledNameForType):
2739         Look into the types and generate a concrete type name when necessary. Lazily cache the constructed
2740         names for AST::ArrayType and AST::Pointer.
2741
2742 2019-08-28  Keith Rollin  <krollin@apple.com>
2743
2744         Remove support for macOS < 10.13 (part 2)
2745         https://bugs.webkit.org/show_bug.cgi?id=201197
2746         <rdar://problem/54759985>
2747
2748         Reviewed by Darin Adler.
2749
2750         Update conditionals that reference WK_MACOS_1013 and suffixes like
2751         _MACOS_SINCE_1013, assuming that we're always building on 10.13 or
2752         later and that these conditionals are always True or False.
2753
2754         See Bug 200694 for earlier changes in this area.
2755
2756         No new tests -- no new or changed functionality.
2757
2758         * Configurations/FeatureDefines.xcconfig:
2759
2760 2019-08-28  Chris Dumez  <cdumez@apple.com>
2761
2762         geolocation.watchPosition() / getCurrentPosition() should return PERMISSION_DENIED when context is not secure
2763         https://bugs.webkit.org/show_bug.cgi?id=201221
2764
2765         Reviewed by Ryosuke Niwa.
2766
2767         geolocation.watchPosition() / getCurrentPosition() should return PERMISSION_DENIED when context is not secure,
2768         not POSITION_UNAVAILABLE. Both Gecko and Blink agree on PERMISSION_DENIED.
2769
2770         No new tests, updated existing tests.
2771
2772         * Modules/geolocation/Geolocation.cpp:
2773         (WebCore::Geolocation::startRequest):
2774
2775 2019-08-28  Alicia Boya García  <aboya@igalia.com>
2776
2777         [MSE][GStreamer] WebKitMediaSrc rework
2778         https://bugs.webkit.org/show_bug.cgi?id=199719
2779
2780         Reviewed by Xabier Rodriguez-Calvar.
2781
2782         This patch reworks the WebKitMediaSrc element and many of the player
2783         private methods that interacted with it.
2784
2785         In comparison with the old WebKitMediaSrc, in the new one seeks have
2786         been massively simplified.
2787
2788         The new WebKitMediaSrc no longer relies on a bin or appsrc, having
2789         greater control over its operation. This made it comparatively much
2790         easier to implement features such as seek before playback or
2791         single-stream flushing.
2792
2793         stream-collection events are emitted from the WebKitMediaSrc to reuse
2794         the track handling in MediaPlayerPrivateGStreamer for playbin3, which
2795         is now used for MSE pipelines.
2796
2797         Additional tests have been added to check some assumptions, and some
2798         bugs that have surfaced with the changes have been fixed but no new
2799         features (like multi-track support) are implemented in this patch.
2800
2801         One instance of these bugs is `resized` events, which were previously
2802         being emitted when frames with different resolutions where appended.
2803         This is a wrong behavior that has not been preserved in the rework, as
2804         resize events should be emitted when the frames are shown, not
2805         just appended.
2806
2807         There are subtler bugfixes, such as ignoring PTS-less frames in
2808         AppendPipeline::appsinkNewSample(). These frames are problematic for
2809         MSE, yet they were somehow passing through the pipelines. Since
2810         WebKitMediaSrc is stricter with assertions, these have to be filtered.
2811
2812         This test gets rid of !m_mseSeekCompleted assertion failures in tests
2813         and potentially other hard to debug bugs in the previous seek
2814         algorithm.
2815
2816         This patch makes the following existing tests pass:
2817
2818         imported/w3c/web-platform-tests/media-source/mediasource-config-change-webm-a-bitrate.html
2819         imported/w3c/web-platform-tests/media-source/mediasource-config-change-webm-v-framesize.html
2820
2821         New test: imported/w3c/web-platform-tests/media-source/mediasource-buffered-seek.html
2822         New test: LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-video-element/video_timeupdate_on_seek.html (non-MSE related)
2823
2824         * Headers.cmake:
2825         * platform/GStreamer.cmake:
2826         * platform/graphics/gstreamer/GRefPtrGStreamer.cpp:
2827         (WTF::adoptGRef):
2828         (WTF::refGPtr<GstMiniObject>):
2829         (WTF::derefGPtr<GstMiniObject>):
2830         * platform/graphics/gstreamer/GRefPtrGStreamer.h:
2831         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
2832         (WebCore::MediaPlayerPrivateGStreamer::playbackPosition const):
2833         (WebCore::MediaPlayerPrivateGStreamer::paused const):
2834         (WebCore::MediaPlayerPrivateGStreamer::updateTracks):
2835         (WebCore::MediaPlayerPrivateGStreamer::enableTrack):
2836         (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfVideo):
2837         (WebCore::MediaPlayerPrivateGStreamer::sourceSetup):
2838         (WebCore::MediaPlayerPrivateGStreamer::handleSyncMessage):
2839         (WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin):
2840         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
2841         (WebCore::MediaPlayerPrivateGStreamer::invalidateCachedPosition):
2842         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
2843         (WebCore::MediaPlayerPrivateGStreamerBase::naturalSize const):
2844         (WebCore::MediaPlayerPrivateGStreamerBase::naturalSizeFromCaps const):
2845         (WebCore::MediaPlayerPrivateGStreamerBase::samplesHaveDifferentNaturalSize const):
2846         (WebCore::MediaPlayerPrivateGStreamerBase::triggerRepaint):
2847         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
2848         * platform/graphics/gstreamer/MediaSampleGStreamer.cpp:
2849         (WebCore::MediaSampleGStreamer::MediaSampleGStreamer):
2850         * platform/graphics/gstreamer/mse/AppendPipeline.cpp:
2851         (WebCore::AppendPipeline::appsinkNewSample):
2852         (WebCore::AppendPipeline::connectDemuxerSrcPadToAppsink):
2853         * platform/graphics/gstreamer/mse/AppendPipeline.h:
2854         (WebCore::AppendPipeline::appsinkCaps):
2855         (WebCore::AppendPipeline::streamType):
2856         (WebCore::AppendPipeline::demuxerSrcPadCaps):
2857         * platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp:
2858         (WebCore::MediaPlayerPrivateGStreamerMSE::~MediaPlayerPrivateGStreamerMSE):
2859         (WebCore::MediaPlayerPrivateGStreamerMSE::load):
2860         (WebCore::MediaPlayerPrivateGStreamerMSE::play):
2861         (WebCore::MediaPlayerPrivateGStreamerMSE::pause):
2862         (WebCore::MediaPlayerPrivateGStreamerMSE::seek):
2863         (WebCore::MediaPlayerPrivateGStreamerMSE::seekCompleted):
2864         (WebCore::MediaPlayerPrivateGStreamerMSE::setReadyState):
2865         (WebCore::MediaPlayerPrivateGStreamerMSE::sourceSetup):
2866         (WebCore::MediaPlayerPrivateGStreamerMSE::updateStates):
2867         (WebCore::MediaPlayerPrivateGStreamerMSE::didEnd):
2868         (WebCore::MediaPlayerPrivateGStreamerMSE::unblockDurationChanges):
2869         (WebCore::MediaPlayerPrivateGStreamerMSE::durationChanged):
2870         (WebCore::MediaPlayerPrivateGStreamerMSE::trackDetected):
2871         * platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.h:
2872         * platform/graphics/gstreamer/mse/MediaSourceClientGStreamerMSE.cpp:
2873         (WebCore::MediaSourceClientGStreamerMSE::addSourceBuffer):
2874         (WebCore::MediaSourceClientGStreamerMSE::removedFromMediaSource):
2875         (WebCore::MediaSourceClientGStreamerMSE::flush):
2876         (WebCore::MediaSourceClientGStreamerMSE::enqueueSample):
2877         (WebCore::MediaSourceClientGStreamerMSE::isReadyForMoreSamples):
2878         (WebCore::MediaSourceClientGStreamerMSE::notifyClientWhenReadyForMoreSamples):
2879         (WebCore::MediaSourceClientGStreamerMSE::allSamplesInTrackEnqueued):
2880         * platform/graphics/gstreamer/mse/MediaSourceClientGStreamerMSE.h:
2881         * platform/graphics/gstreamer/mse/MediaSourceGStreamer.cpp:
2882         (WebCore::MediaSourceGStreamer::markEndOfStream):
2883         (WebCore::MediaSourceGStreamer::unmarkEndOfStream):
2884         (WebCore::MediaSourceGStreamer::waitForSeekCompleted):
2885         * platform/graphics/gstreamer/mse/MediaSourceGStreamer.h:
2886         * platform/graphics/gstreamer/mse/PlaybackPipeline.cpp: Removed.
2887         * platform/graphics/gstreamer/mse/PlaybackPipeline.h: Removed.
2888         * platform/graphics/gstreamer/mse/SourceBufferPrivateGStreamer.cpp:
2889         (WebCore::SourceBufferPrivateGStreamer::enqueueSample):
2890         (WebCore::SourceBufferPrivateGStreamer::isReadyForMoreSamples):
2891         (WebCore::SourceBufferPrivateGStreamer::notifyClientWhenReadyForMoreSamples):
2892         * platform/graphics/gstreamer/mse/SourceBufferPrivateGStreamer.h:
2893         * platform/graphics/gstreamer/mse/WebKitMediaSourceGStreamer.cpp:
2894         (WebKitMediaSrcPrivate::streamByName):
2895         (Stream::Stream):
2896         (Stream::StreamingMembers::StreamingMembers):
2897         (Stream::StreamingMembers::durationEnqueued const):
2898         (findPipeline):
2899         (webkit_media_src_class_init):
2900         (webkit_media_src_init):
2901         (webKitMediaSrcFinalize):
2902         (debugProbe):
2903         (collectionPlusStream):
2904         (collectionMinusStream):
2905         (gstStreamType):
2906         (webKitMediaSrcAddStream):
2907         (webKitMediaSrcRemoveStream):
2908         (webKitMediaSrcActivateMode):
2909         (webKitMediaSrcPadLinked):
2910         (webKitMediaSrcStreamNotifyLowWaterLevel):
2911         (webKitMediaSrcLoop):
2912         (webKitMediaSrcEnqueueObject):
2913         (webKitMediaSrcEnqueueSample):
2914         (webKitMediaSrcEnqueueEvent):
2915         (webKitMediaSrcEndOfStream):
2916         (webKitMediaSrcIsReadyForMoreSamples):
2917         (webKitMediaSrcNotifyWhenReadyForMoreSamples):
2918         (webKitMediaSrcChangeState):
2919         (webKitMediaSrcStreamFlushStart):
2920         (webKitMediaSrcStreamFlushStop):
2921         (webKitMediaSrcFlush):
2922         (webKitMediaSrcSeek):
2923         (countStreamsOfType):
2924         (webKitMediaSrcGetProperty):
2925         (webKitMediaSrcUriGetType):
2926         (webKitMediaSrcGetProtocols):
2927         (webKitMediaSrcGetUri):
2928         (webKitMediaSrcSetUri):
2929         (webKitMediaSrcUriHandlerInit):
2930         * platform/graphics/gstreamer/mse/WebKitMediaSourceGStreamer.h:
2931         * platform/graphics/gstreamer/mse/WebKitMediaSourceGStreamerPrivate.h: Removed.
2932
2933 2019-08-28  Simon Fraser  <simon.fraser@apple.com>
2934
2935         Have RenderSVGBlock compute visual overflow just like everyone else
2936         https://bugs.webkit.org/show_bug.cgi?id=201211
2937
2938         Reviewed by Zalan Bujtas.
2939
2940         RenderSVGBlock overrode visualOverflowRect() just to account for text shadow. This prevents callers
2941         optimizing calls to visualOverflowRect(), so instead have RenderSVGBlock implement computeOverflow()
2942         and call addVisualOverflow().
2943
2944         * rendering/svg/RenderSVGBlock.cpp:
2945         (WebCore::RenderSVGBlock::computeOverflow):
2946         (WebCore::RenderSVGBlock::visualOverflowRect const): Deleted.
2947         * rendering/svg/RenderSVGBlock.h:
2948
2949 2019-08-28  Ryosuke Niwa  <rniwa@webkit.org>
2950
2951         REGRESSION (r248807): Objects stored in ElementRareData are leaked
2952         https://bugs.webkit.org/show_bug.cgi?id=200954
2953
2954         Reviewed by Antti Koivisto.
2955
2956         Use a custom deleter in std::unique_ptr to call the correct destructor instead of making
2957         NodeRareData's destructor virtual. Added NodeRareData::isElementRareData to differentiate
2958         ElementRareData and NodeRareData by borrowing 1 bit from the frame count.
2959
2960         No new tests since there should be no behavioral change.
2961
2962         * dom/ElementRareData.h:
2963         (WebCore::ElementRareData::ElementRareData):
2964         * dom/Node.cpp:
2965         (WebCore::Node::materializeRareData): Call the constructors of unique_ptr directly since
2966         make_unique does not take a custom deleter. We can't add the support to makeUnique either
2967         without making it three arguments since we need to cast ElementRareData to NodeRareData
2968         in addition to specifying a custom deleter (normal casting wouldn't work due to
2969         the presence of a custom deleter).
2970         (WebCore::Node::NodeRareDataDeleter::operator() const): Added.
2971         * dom/Node.h:
2972         (WebCore::Node::NodeRareDataDeleter): Added.
2973         * dom/NodeRareData.cpp:
2974         * dom/NodeRareData.h:
2975         (WebCore::NodeRareData::NodeRareData): Makes newly added Type.
2976         (WebCore::NodeRareData::isElementRareData): Added.
2977         (WebCore::NodeRareData::~NodeRareData): Deleted.
2978
2979 2019-08-28  Claudio Saavedra  <csaavedra@igalia.com>
2980
2981         [SOUP] Shut compilation warning
2982
2983         Unreviewed. RELEASE_LOG_ERROR() needs a channel.
2984
2985         * platform/network/soup/SoupNetworkSession.cpp:
2986         (WebCore::SoupNetworkSession::setupHSTSEnforcer):
2987
2988 2019-08-28  Claudio Saavedra  <csaavedra@igalia.com>
2989
2990         [SOUP] Fix the debug build after r249192
2991
2992         Unreviewed build fix.
2993
2994         * platform/network/soup/SoupNetworkSession.cpp:
2995         (WebCore::SoupNetworkSession::setupHSTSEnforcer):
2996
2997 2019-08-28  Carlos Garcia Campos  <cgarcia@igalia.com>
2998
2999         Unable to enter text in https://eat.fi
3000         https://bugs.webkit.org/show_bug.cgi?id=193046
3001
3002         Reviewed by Ryosuke Niwa.
3003
3004         This is because the button element inside the label is receiving the click event, which causes the form to be
3005         submitted. According to the spec we should do nothing in this case, because button element is considered to be
3006         interactive content.
3007
3008         "The activation behavior of a label element for events targeted at interactive content descendants of a label
3009         element, and any descendants of those interactive content descendants, must be to do nothing."
3010         https://html.spec.whatwg.org/#the-label-element
3011
3012         This patch adds HTMLElement::isInteractiveContent() according to the HTML spec:
3013
3014         "Interactive content is content that is specifically intended for user interaction.
3015         a (if the href attribute is present), audio (if the controls attribute is present), button, details, embed,
3016         iframe, img (if the usemap attribute is present), input (if the type attribute is not in the Hidden state),
3017         label, object (if the usemap attribute is present), select, textarea, video (if the controls attribute is
3018         present)"
3019         https://html.spec.whatwg.org/#interactive-content-2
3020
3021         That's used in HTMLLabelElement::defaultEventHandler() using the helper method
3022         isEventTargetedAtInteractiveDescendants() to decide whether to simulate a click event or do nothing.
3023
3024         * html/HTMLAnchorElement.cpp:
3025         (WebCore::HTMLAnchorElement::isInteractiveContent const):
3026         * html/HTMLAnchorElement.h:
3027         * html/HTMLButtonElement.h:
3028         * html/HTMLDetailsElement.h:
3029         * html/HTMLElement.h:
3030         (WebCore::HTMLElement::isInteractiveContent const):
3031         * html/HTMLEmbedElement.h:
3032         * html/HTMLIFrameElement.h:
3033         * html/HTMLImageElement.cpp:
3034         (WebCore::HTMLImageElement::isInteractiveContent const):
3035         * html/HTMLImageElement.h:
3036         * html/HTMLInputElement.cpp:
3037         (WebCore::HTMLInputElement::isInteractiveContent const):
3038         * html/HTMLInputElement.h:
3039         * html/HTMLLabelElement.cpp:
3040         (WebCore::HTMLLabelElement::isEventTargetedAtInteractiveDescendants const):
3041         (WebCore::HTMLLabelElement::defaultEventHandler):
3042         * html/HTMLLabelElement.h:
3043         * html/HTMLMediaElement.cpp:
3044         (WebCore::HTMLMediaElement::isInteractiveContent const):
3045         * html/HTMLMediaElement.h:
3046         * html/HTMLObjectElement.cpp:
3047         (WebCore::HTMLObjectElement::isInteractiveContent const):
3048         * html/HTMLObjectElement.h:
3049         * html/HTMLSelectElement.h:
3050         * html/HTMLTextAreaElement.h:
3051         * html/HiddenInputType.h:
3052         * html/InputType.cpp:
3053         (WebCore::InputType::isInteractiveContent const):
3054         * html/InputType.h:
3055
3056 2019-08-28  Claudio Saavedra  <csaavedra@igalia.com>
3057
3058         [GTK][WPE] Implement HSTS for the soup network backend
3059         https://bugs.webkit.org/show_bug.cgi?id=192074
3060
3061         Reviewed by Carlos Garcia Campos.
3062
3063         libsoup 2.67.1 introduced HSTS support via a SoupSessionFeature.
3064         Add support to the soup network backend by adding the feature to
3065         SoupNetworkSession and handling HSTS protocol upgrades, by
3066         propagating the scheme change further to clients. This patch adds
3067         the HSTS feature unconditionally, but it still possible to add
3068         a boolean property to the web context class if desired.
3069
3070         Additionally, add API to the WebKitWebsiteDataManager to specify
3071         the directory where the HSTS database is saved. If the directory
3072         is not set or if the data manager is ephemeral, use a
3073         non-persistent, memory only HSTS enforcer.
3074
3075         Implement as well the methods needed to clean-up and delete HSTS
3076         policies from the storage and expose the feature in GTK+ MiniBrowser's
3077         about:data.
3078
3079         * platform/network/soup/GUniquePtrSoup.h:
3080         * platform/network/soup/SoupNetworkSession.cpp:
3081         (WebCore::hstsStorageDirectory):
3082         (WebCore::SoupNetworkSession::SoupNetworkSession):
3083         (WebCore::SoupNetworkSession::setHSTSPersistentStorage):
3084         (WebCore::SoupNetworkSession::setupHSTSEnforcer):
3085         (WebCore::SoupNetworkSession::getHostNamesWithHSTSCache):
3086         (WebCore::SoupNetworkSession::deleteHSTSCacheForHostNames):
3087         (WebCore::SoupNetworkSession::clearHSTSCache):
3088         * platform/network/soup/SoupNetworkSession.h:
3089
3090 2019-08-28  Said Abou-Hallawa  <sabouhallawa@apple.com>
3091
3092         SVG2: Add length, item getter and item setter to all SVG lists
3093         https://bugs.webkit.org/show_bug.cgi?id=199526
3094
3095         Reviewed by Simon Fraser.
3096
3097         -- Implement the SVG2 specs for SVG lists:
3098         https://svgwg.org/svg2-draft/types.html#TermListInterface.
3099
3100         -- Match the arguments' names in the IDL files with the specs.
3101
3102         Tests: svg/dom/SVGLengthList-length-indexed-access.xhtml
3103                svg/dom/SVGPathSegList-length-indexed-access.xhtml
3104
3105         * svg/SVGLengthList.idl:
3106         * svg/SVGNumberList.idl:
3107         * svg/SVGPathSegList.h:
3108         * svg/SVGPathSegList.idl:
3109         * svg/SVGPointList.idl:
3110         * svg/SVGStringList.idl:
3111         * svg/SVGTransformList.idl:
3112         * svg/properties/SVGList.h:
3113         (WebCore::SVGList::length const):
3114         (WebCore::SVGList::setItem):
3115
3116 2019-08-27  John Wilander  <wilander@apple.com>  and  Fujii Hironori  <Hironori.Fujii@sony.com>
3117
3118         Make FrameLoader::open() set outgoing referrer properly
3119         https://bugs.webkit.org/show_bug.cgi?id=167050
3120         <rdar://problem/27972404>
3121
3122         Reviewed by Youenn Fablet.
3123
3124         In debug builds, an assertion failed in WebCore::SecurityPolicy::generateReferrerHeader:
3125         ASSERTION FAILED: referrer == URL(URL(), referrer).strippedForUseAsReferrer()
3126
3127         In release builds, cached pages with a URL fragment sent its URL fragment in the referrer.
3128
3129         m_outgoingReferrer mistakenly had a URL fragment.
3130
3131         Test: http/tests/navigation/page-cache-fragment-referrer.html
3132
3133         * loader/FrameLoader.cpp:
3134         (WebCore::FrameLoader::open): Set m_outgoingReferrer by using
3135         FrameLoader::setOutgoingReferrer to remove URL fragments.
3136
3137 2019-08-27  Said Abou-Hallawa  <sabouhallawa@apple.com>
3138
3139         Unreviewed. Build fix after r249175.
3140
3141         Fix the condition which generates the declaration of vm in
3142         GenerateGetOwnPropertySlotByIndex.
3143
3144         * bindings/scripts/CodeGeneratorJS.pm:
3145         (GenerateGetOwnPropertySlotByIndex):
3146
3147 2019-08-27  Justin Fan  <justin_fan@apple.com>
3148
3149         [WebGPU] Implement GPUErrors for and relax GPUBuffer validation rules
3150         https://bugs.webkit.org/show_bug.cgi?id=200852
3151
3152         Reviewed by Dean Jackson.
3153
3154         Fix incorrect usage validation during GPUBuffer creation.
3155         Implement GPUError reporting for GPUBuffer creation and methods.
3156
3157         Test: webgpu/buffer-errors.html
3158
3159         * Modules/webgpu/WebGPUBuffer.cpp:
3160         (WebCore::WebGPUBuffer::create):
3161         (WebCore::WebGPUBuffer::WebGPUBuffer):
3162         (WebCore::WebGPUBuffer::unmap):
3163         (WebCore::WebGPUBuffer::destroy):
3164         (WebCore::WebGPUBuffer::rejectOrRegisterPromiseCallback):
3165         * Modules/webgpu/WebGPUBuffer.h: Now inherits from GPUObjectBase.
3166         * Modules/webgpu/WebGPUDevice.cpp:
3167         (WebCore::WebGPUDevice::createBuffer const):
3168         (WebCore::WebGPUDevice::createBufferMapped const):
3169         * platform/graphics/gpu/GPUBuffer.h: No longer inherits from GPUObjectBase.
3170         * platform/graphics/gpu/GPUObjectBase.h:
3171         (WebCore::GPUObjectBase::errorScopes):
3172         (WebCore::GPUObjectBase::generateError): Deleted.
3173         * platform/graphics/gpu/cocoa/GPUBufferMetal.mm:
3174         (WebCore::GPUBuffer::validateBufferUsage):
3175         (WebCore::GPUBuffer::tryCreate): Alignment issue should be general WebGPU requirement.
3176         (WebCore::GPUBuffer::GPUBuffer):
3177         (WebCore::GPUBuffer::~GPUBuffer): Must do cleanup without generating errors.
3178         (WebCore::GPUBuffer::registerMappingCallback):
3179         (WebCore::GPUBuffer::copyStagingBufferToGPU):
3180         (WebCore::GPUBuffer::unmap):
3181         (WebCore::GPUBuffer::destroy):
3182
3183 2019-08-27  Zalan Bujtas  <zalan@apple.com>
3184
3185         [LFC][TFC] Layout and position the cell boxes
3186         https://bugs.webkit.org/show_bug.cgi?id=201192
3187         <rdar://problem/54758638>
3188
3189         Reviewed by Antti Koivisto.
3190
3191         Add a very basic (and faily incomplete) table cell layout logic. This is mostly WIP.
3192
3193         * Sources.txt:
3194         * WebCore.xcodeproj/project.pbxproj:
3195         * layout/FormattingContext.h:
3196         * layout/FormattingContextGeometry.cpp:
3197         (WebCore::Layout::FormattingContext::Geometry::contentHeightForFormattingContextRoot):
3198         (WebCore::Layout::contentHeightForFormattingContextRoot): Deleted.
3199         * layout/tableformatting/TableFormattingContext.cpp:
3200         (WebCore::Layout::TableFormattingContext::layout const):
3201         (WebCore::Layout::TableFormattingContext::computedTableWidth const):
3202         * layout/tableformatting/TableFormattingContext.h:
3203         * layout/tableformatting/TableFormattingContextGeometry.cpp: Copied from Source/WebCore/layout/tableformatting/TableFormattingContext.h.
3204         (WebCore::Layout::TableFormattingContext::Geometry::tableCellHeightAndMargin):
3205         * layout/tableformatting/TableGrid.cpp:
3206         (WebCore::Layout::TableGrid::Column::setLogicalLeft):
3207         (WebCore::Layout::TableGrid::Column::logicalLeft const):
3208         * layout/tableformatting/TableGrid.h:
3209         (WebCore::Layout::TableGrid::Column::logicalRight const):
3210         (WebCore::Layout::TableGrid::Row::setLogicalTop):
3211         (WebCore::Layout::TableGrid::Row::logicalTop const):
3212         (WebCore::Layout::TableGrid::Row::setLogicalHeight):
3213         (WebCore::Layout::TableGrid::Row::logicalHeight const):
3214         (WebCore::Layout::TableGrid::Row::logicalBottom const):
3215
3216 2019-08-27  Mark Lam  <mark.lam@apple.com>
3217
3218         Refactor to use VM& instead of VM* at as many places as possible.
3219         https://bugs.webkit.org/show_bug.cgi?id=201172
3220
3221         Reviewed by Yusuke Suzuki.
3222
3223         No new tests.  Covered by existing tests.
3224
3225         * Modules/encryptedmedia/legacy/LegacyCDMSessionClearKey.cpp:
3226         (WebCore::CDMSessionClearKey::update):
3227         * Modules/plugins/QuickTimePluginReplacement.mm:
3228         (WebCore::QuickTimePluginReplacement::ensureReplacementScriptInjected):
3229         (WebCore::QuickTimePluginReplacement::installReplacement):
3230         * animation/KeyframeEffect.cpp:
3231         (WebCore::processKeyframeLikeObject):
3232         * bindings/js/GCController.cpp:
3233         (WebCore::GCController::dumpHeap):
3234         * bindings/js/IDBBindingUtilities.cpp:
3235         (WebCore::get):
3236         (WebCore::set):
3237         * bindings/js/JSCSSRuleListCustom.cpp:
3238         (WebCore::JSCSSRuleListOwner::isReachableFromOpaqueRoots):
3239         * bindings/js/JSCustomElementRegistryCustom.cpp:
3240         (WebCore::JSCustomElementRegistry::define):
3241         * bindings/js/JSCustomXPathNSResolver.cpp:
3242         (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
3243         * bindings/js/JSDOMConvertRecord.h:
3244         * bindings/js/JSDOMConvertStrings.h:
3245         (WebCore::JSConverter<IDLDOMString>::convert):
3246         (WebCore::JSConverter<IDLByteString>::convert):
3247         (WebCore::JSConverter<IDLUSVString>::convert):
3248         * bindings/js/JSDOMWindowCustom.cpp:
3249         (WebCore::JSDOMWindow::getOwnPropertySlotByIndex):
3250         (WebCore::addScopedChildrenIndexes):
3251         (WebCore::JSDOMWindow::defineOwnProperty):
3252         (WebCore::DialogHandler::dialogCreated):
3253         (WebCore::DialogHandler::returnValue const):
3254         (WebCore::JSDOMWindow::setOpener):
3255         (WebCore::JSDOMWindow::setOpenDatabase):
3256         * bindings/js/JSDOMWindowProperties.cpp:
3257         (WebCore::JSDOMWindowProperties::getOwnPropertySlotByIndex):
3258         * bindings/js/JSDeprecatedCSSOMValueCustom.cpp:
3259         (WebCore::JSDeprecatedCSSOMValueOwner::isReachableFromOpaqueRoots):
3260         * bindings/js/JSEventListener.cpp:
3261         (WebCore::JSEventListener::handleEvent):
3262         * bindings/js/JSImageDataCustom.cpp:
3263         (WebCore::toJSNewlyCreated):
3264         * bindings/js/JSLazyEventListener.cpp:
3265         (WebCore::JSLazyEventListener::initializeJSFunction const):
3266         * bindings/js/JSLocationCustom.cpp:
3267         (WebCore::JSLocation::getOwnPropertySlotByIndex):
3268         (WebCore::JSLocation::putByIndex):
3269         * bindings/js/JSNodeListCustom.cpp:
3270         (WebCore::JSNodeListOwner::isReachableFromOpaqueRoots):
3271         * bindings/js/JSPluginElementFunctions.cpp:
3272         (WebCore::pluginElementCustomGetCallData):
3273         * bindings/js/JSRemoteDOMWindowCustom.cpp:
3274         (WebCore::JSRemoteDOMWindow::getOwnPropertySlotByIndex):
3275         * bindings/js/ReadableStreamDefaultController.cpp:
3276         (WebCore::ReadableStreamDefaultController::invoke):
3277         * bindings/js/ScriptController.cpp:
3278         (WebCore::ScriptController::linkAndEvaluateModuleScriptInWorld):
3279         * bindings/js/ScriptModuleLoader.cpp:
3280         (WebCore::ScriptModuleLoader::resolve):
3281         (WebCore::ScriptModuleLoader::importModule):
3282         (WebCore::ScriptModuleLoader::createImportMetaProperties):
3283         * bindings/js/SerializedScriptValue.cpp:
3284         (WebCore::CloneSerializer::CloneSerializer):
3285         (WebCore::CloneSerializer::write):
3286         (WebCore::CloneSerializer::serialize):
3287         (WebCore::CloneDeserializer::CachedString::jsString):
3288         (WebCore::CloneDeserializer::readTerminal):
3289         (WebCore::CloneDeserializer::deserialize):
3290         * bindings/js/WebCoreBuiltinNames.h:
3291         (WebCore::WebCoreBuiltinNames::WebCoreBuiltinNames):
3292         * bindings/js/WebCoreJSClientData.cpp:
3293         (WebCore::JSVMClientData::JSVMClientData):
3294         * bindings/js/WindowProxy.cpp:
3295         (WebCore::WindowProxy::clearJSWindowProxiesNotMatchingDOMWindow):
3296         * bindings/scripts/CodeGeneratorJS.pm:
3297         (GenerateGetOwnPropertySlotByIndex):
3298         (GenerateGetOwnPropertyNames):
3299         (GeneratePutByIndex):
3300         (GenerateDeletePropertyByIndex):
3301         (GenerateDictionaryImplementationContent):
3302         (addUnscopableProperties):
3303         (GenerateImplementation):
3304         (GenerateAttributeSetterBodyDefinition):
3305         (GenerateOperationDefinition):
3306         (GenerateSerializerDefinition):
3307         (GenerateCallbackImplementationContent):
3308         (GenerateConstructorHelperMethods):
3309         * bindings/scripts/test/JS/JSInterfaceName.cpp:
3310         (WebCore::JSInterfaceNameConstructor::initializeProperties):
3311         * bindings/scripts/test/JS/JSMapLike.cpp:
3312         (WebCore::JSMapLikeConstructor::initializeProperties):
3313         * bindings/scripts/test/JS/JSReadOnlyMapLike.cpp:
3314         (WebCore::JSReadOnlyMapLikeConstructor::initializeProperties):
3315         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
3316         (WebCore::JSTestActiveDOMObjectConstructor::initializeProperties):
3317         * bindings/scripts/test/JS/JSTestCEReactions.cpp:
3318         (WebCore::JSTestCEReactionsConstructor::initializeProperties):
3319         (WebCore::setJSTestCEReactionsAttributeWithCEReactionsSetter):
3320         (WebCore::setJSTestCEReactionsReflectAttributeWithCEReactionsSetter):
3321         (WebCore::setJSTestCEReactionsStringifierAttributeSetter):
3322         (WebCore::setJSTestCEReactionsAttributeWithCEReactionsNotNeededSetter):
3323         (WebCore::setJSTestCEReactionsReflectAttributeWithCEReactionsNotNeededSetter):
3324         (WebCore::setJSTestCEReactionsStringifierAttributeNotNeededSetter):
3325         * bindings/scripts/test/JS/JSTestCEReactionsStringifier.cpp:
3326         (WebCore::JSTestCEReactionsStringifierConstructor::initializeProperties):
3327         (WebCore::setJSTestCEReactionsStringifierValueSetter):
3328         (WebCore::setJSTestCEReactionsStringifierValueWithoutReactionsSetter):
3329         * bindings/scripts/test/JS/JSTestCallTracer.cpp:
3330         (WebCore::JSTestCallTracerConstructor::initializeProperties):
3331         (WebCore::setJSTestCallTracerTestAttributeInterfaceSetter):
3332         (WebCore::setJSTestCallTracerTestAttributeSpecifiedSetter):
3333         (WebCore::setJSTestCallTracerTestAttributeWithVariantSetter):
3334         * bindings/scripts/test/JS/JSTestCallbackInterface.cpp:
3335         (WebCore::convertDictionary<TestCallbackInterface::Dictionary>):
3336         (WebCore::JSTestCallbackInterfaceConstructor::initializeProperties):
3337         (WebCore::JSTestCallbackInterface::callbackWithNoParam):
3338         (WebCore::JSTestCallbackInterface::callbackWithArrayParam):
3339         (WebCore::JSTestCallbackInterface::callbackWithSerializedScriptValueParam):
3340         (WebCore::JSTestCallbackInterface::callbackWithStringList):
3341         (WebCore::JSTestCallbackInterface::callbackWithBoolean):