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