1 2019-09-01 Fujii Hironori <Hironori.Fujii@sony.com>
3 Unreviewed, rolling out r249366.
5 WinCairo WebKit2 crashes in some websites and the device scale
6 factor is not correct in high DPI.
10 "[WinCairo, FTW] Properly handle device scale factor"
11 https://bugs.webkit.org/show_bug.cgi?id=201361
12 https://trac.webkit.org/changeset/249366
14 2019-09-01 Myles C. Maxfield <mmaxfield@apple.com>
16 [WHLSL] Resources don't work when only a subset of a bind group is referenced by a shader
17 https://bugs.webkit.org/show_bug.cgi?id=201383
19 Reviewed by Dean Jackson.
21 Bind groups correspond to argument buffers in Metal. Both the Metal API and Metal Shading Language
22 have to agree on the layout of exactly which resources lie at which byte offsets within an argument
25 Before this patch, we only emitted code for the items in the argument buffer that were actually
26 referenced by the shader source code. However, because these items are held inside a struct, if
27 we omit one item from the middle of the struct, the byte offets of all the successive items would
28 be wrong. This means that the Metal API and the shader would disagree about how to access these
29 resources, making the resources inaccessible (and causing security problems).
31 Tests: webgpu/whlsl/sparse-bind-group-2.html
32 webgpu/whlsl/sparse-bind-group-3.html
33 webgpu/whlsl/sparse-bind-group.html
35 * Modules/webgpu/WHLSL/Metal/WHLSLEntryPointScaffolding.cpp:
36 (WebCore::WHLSL::Metal::EntryPointScaffolding::emitResourceHelperTypes):
37 (WebCore::WHLSL::Metal::VertexEntryPointScaffolding::emitHelperTypes):
38 (WebCore::WHLSL::Metal::FragmentEntryPointScaffolding::emitHelperTypes):
39 (WebCore::WHLSL::Metal::ComputeEntryPointScaffolding::emitHelperTypes):
40 * Modules/webgpu/WHLSL/Metal/WHLSLEntryPointScaffolding.h:
41 * Modules/webgpu/WHLSL/WHLSLSemanticMatcher.cpp:
42 (WebCore::WHLSL::matchResources):
43 (WebCore::WHLSL::matchVertexAttributes):
44 (WebCore::WHLSL::matchColorAttachments):
46 2019-09-01 Said Abou-Hallawa <sabouhallawa@apple.com>
48 HTMLImageElement::decode() should return a resolved promise for decoding non bitmap images
49 https://bugs.webkit.org/show_bug.cgi?id=201243
51 Reviewed by Youenn Fablet.
53 The specs: https://html.spec.whatwg.org/multipage/embedded-content.html#dom-img-decode
54 states that, decode() should resolve the pending promise if the decoding
55 was requested for a non bitmap image.
57 Test: fast/images/decode-non-bitmap-image-resolve.html
59 * loader/ImageLoader.cpp:
60 (WebCore::resolveDecodePromises):
61 (WebCore::rejectDecodePromises):
62 (WebCore::ImageLoader::notifyFinished):
63 (WebCore::ImageLoader::decode):
64 (WebCore::ImageLoader::decodeError): Deleted.
65 * loader/ImageLoader.h:
66 (WebCore::ImageLoader::hasPendingDecodePromises const):
68 2019-08-30 Brent Fulgham <bfulgham@apple.com>
70 [WinCairo, FTW] Properly handle device scale factor
71 https://bugs.webkit.org/show_bug.cgi?id=201361
73 Reviewed by Don Olmstead.
75 Update the Direct2D ImageBuffer/ImageBufferData classes to correctly handle
76 the device scale factor.
78 * platform/graphics/win/ImageBufferDataDirect2D.cpp:
79 (WebCore::ImageBufferData::putData):
80 * platform/graphics/win/ImageBufferDirect2D.cpp:
81 (WebCore::ImageBuffer::putByteArray):
83 2019-08-31 Said Abou-Hallawa <sabouhallawa@apple.com>
85 EXIF orientation should be respected when rendering images
86 https://bugs.webkit.org/show_bug.cgi?id=201123
88 Reviewed by Simon Fraser.
90 -- Image::size() will return the rendered size based on the image
91 orientation. If image orientation is FromImage, ImageSource will query
92 the actual image orientation from the ImageDecoder. The low level APIs
93 might transpose the size just before calling the system API to draw
96 -- RenderElement::imageOrientation() will return ImageOrientation::FromImage
97 for all images and for all ports till the CSS image-orientation specs
100 -- The default of ImagePaintingOptions argument of GraphicsContext::drawImage()
101 will be changed to { ImageOrientation::FromImage }.
103 -- Image element: RenderImage::paintIntoRect() will pass imageOrientation()
104 which returns ImageOrientation::FromImage to GraphicsContext::drawImage().
106 -- CSS background image: RenderBoxModelObject::paintFillLayerExtended will
107 pass ImageOrientation::FromImage by default to GraphicsContext::drawTiledImage().
109 -- Images on canvas: CanvasRenderingContext2DBase::drawImage() will pass
110 ImageOrientation::FromImage by default to GraphicsContext::drawImage().
112 -- SVG images: RenderSVGImage::paintForeground() calls GraphicsContext::drawImage()
113 with the default ImagePaintingOptions which is now { ImageOrientation::FromImage }.
115 -- SVG feImage filters: FEImage::platformApplySoftware() calls
116 GraphicsContext::drawImage() with the default ImagePaintingOptions
117 which is now { ImageOrientation::FromImage }.
119 -- ImageDocument: RenderElement::imageOrientation() returns FromImage
120 always and for all ports.
122 Tests: fast/images/exif-orientation-background.html
123 fast/images/exif-orientation-canvas.html
124 fast/images/exif-orientation-content.html
125 fast/images/exif-orientation-element-object-fit.html
126 fast/images/exif-orientation-element.html
127 fast/images/exif-orientation-image-object.html
128 fast/images/exif-orientation-svg-feimage.html
129 fast/images/exif-orientation-svg-image.html
131 * html/canvas/CanvasRenderingContext2DBase.cpp:
132 (WebCore::CanvasRenderingContext2DBase::drawImage):
133 * loader/cache/CachedImage.cpp:
134 (WebCore::CachedImage::imageSizeForRenderer const):
135 * platform/graphics/BitmapImage.h:
136 * platform/graphics/CrossfadeGeneratedImage.h:
137 * platform/graphics/GeneratedImage.h:
138 * platform/graphics/GraphicsContext.h:
139 (WebCore::GraphicsContext::drawImage):
140 * platform/graphics/Image.h:
141 * platform/graphics/ImageFrame.h:
142 (WebCore::ImageFrame::sizeRespectingOrientation const): Deleted.
143 * platform/graphics/ImageSource.cpp:
144 (WebCore::ImageSource::ImageSource):
145 (WebCore::ImageSource::orientation):
146 (WebCore::ImageSource::size):
147 (WebCore::ImageSource::sizeRespectingOrientation): Deleted.
148 * platform/graphics/ImageSource.h:
149 * platform/graphics/cg/PDFDocumentImage.cpp:
150 (WebCore::PDFDocumentImage::size const):
151 * platform/graphics/cg/PDFDocumentImage.h:
152 * platform/mac/DragImageMac.mm:
153 (WebCore::createDragImageFromImage):
154 * rendering/RenderBoxModelObject.cpp:
155 (WebCore::RenderBoxModelObject::paintFillLayerExtended):
156 * rendering/RenderElement.cpp:
157 (WebCore::RenderElement::imageOrientation const):
158 * rendering/RenderImage.cpp:
159 (WebCore::RenderImage::paintIntoRect):
160 * svg/graphics/SVGImage.h:
161 * svg/graphics/SVGImageForContainer.cpp:
162 (WebCore::SVGImageForContainer::size const):
163 * svg/graphics/SVGImageForContainer.h:
165 2019-08-31 Rob Buis <rbuis@igalia.com>
167 XMLHttpRequest: responseXML returns null if the Content-Type is valid (end in +xml) in some cases
168 https://bugs.webkit.org/show_bug.cgi?id=46146
170 Reviewed by Youenn Fablet.
172 Make response MIME type fallback to text/xml in case mimeType could
173 not be extracted [1] and use the stricter ParsedContentType for that.
175 Behavior matches Firefox.
177 Test: web-platform-tests/xhr/responsexml-media-type.htm
179 [1] https://xhr.spec.whatwg.org/#response-mime-type
181 * xml/XMLHttpRequest.cpp:
182 (WebCore::XMLHttpRequest::responseMIMEType const):
184 2019-08-31 Frederic Wang <fwang@igalia.com>
186 Fix interpretation of fraction shifts
187 https://bugs.webkit.org/show_bug.cgi?id=201242
189 Reviewed by Rob Buis.
191 In fractions, numerator/denominator shifts are currently interpreted relative to the math
192 axis while they should be relative to the baseline [1]. This patch refactors the
193 RenderMathMLFraction to do that and aligns more on MathML Core [2] [3]. This fixes serious
194 rendering bugs in fractions.
196 [1] https://github.com/mathml-refresh/mathml/issues/123
197 [2] https://mathml-refresh.github.io/mathml-core/#fraction-with-nonzero-line-thickness
198 [3] https://mathml-refresh.github.io/mathml-core/#fraction-with-zero-line-thickness
200 No new tests, existing tests updated.
202 * rendering/mathml/RenderMathMLFraction.h: ascentOverHorizontalAxis() is replaced with
203 fractionAscent() which gives the actual baseline position rather than the math axis position.
204 fractionParameters() and stackParameters() are modified so that they only return the shifts,
205 now stored in a shared FractionParameters struct.
206 * rendering/mathml/RenderMathMLFraction.cpp:
207 (WebCore::RenderMathMLFraction::fractionParameters const): Store existing parameters in local
208 variables and perform adjustments to the shift values so that the minimal gap constraints
209 are satisfied. Return them as a FractionParameters.
210 (WebCore::RenderMathMLFraction::stackParameters const): Ditto.
211 (WebCore::RenderMathMLFraction::fractionAscent const): This calculates the ascent above
212 the baseline as described in [2] [3] and replaces ascentOverHorizontalAxis. To minimize
213 changeset, this continues to ignore contribution of denominator size and not to distinguish
214 ink or non-ink metrics.
215 (WebCore::RenderMathMLFraction::layoutBlock): The position of the denominator is now just
216 calculated as a shift from the baseline. The height is given by the bottom of the
217 denominator. The old "ascent + mathAxisHeight() + denominatorDescent" does not make any
219 (WebCore::RenderMathMLFraction::paint): Use fractionAscent() instead of
220 ascentOverHorizontalAxis().
221 (WebCore::RenderMathMLFraction::firstLineBaseline const): Ditto.
223 2019-08-31 Chris Dumez <cdumez@apple.com>
225 DocumentStorageAccess::hasStorageAccess() / requestStorageAccess() don't need to know about pageID / frameID
226 https://bugs.webkit.org/show_bug.cgi?id=201364
228 Reviewed by John Wilander.
230 DocumentStorageAccess::hasStorageAccess() / requestStorageAccess() don't need to know about pageID / frameID. pageID is
231 redundant since it is being ignored by the callee. For the frame, simply pass the frame object in.
233 * dom/DocumentStorageAccess.cpp:
234 (WebCore::DocumentStorageAccess::hasStorageAccess):
235 (WebCore::DocumentStorageAccess::requestStorageAccess):
236 * page/ChromeClient.h:
237 (WebCore::ChromeClient::hasStorageAccess):
238 (WebCore::ChromeClient::requestStorageAccess):
240 2019-08-30 Zalan Bujtas <zalan@apple.com>
242 [LFC] Transition from Geometry(formattingContext()) to formattingContext().quirks()
243 https://bugs.webkit.org/show_bug.cgi?id=201372
244 <rdar://problem/54905514>
246 Reviewed by Antti Koivisto.
248 * layout/FormattingContextGeometry.cpp:
249 (WebCore::Layout::FormattingContext::Geometry::computedHeightValue const):
250 * layout/FormattingContextQuirks.cpp:
251 (WebCore::Layout::FormattingContext::Quirks::heightValueOfNearestContainingBlockWithFixedHeight):
252 * layout/blockformatting/BlockFormattingContextGeometry.cpp:
253 (WebCore::Layout::BlockFormattingContext::Geometry::inFlowHeightAndMargin):
254 * layout/blockformatting/BlockFormattingContextQuirks.cpp:
255 (WebCore::Layout::BlockFormattingContext::Quirks::stretchedInFlowHeight):
256 * layout/blockformatting/BlockMarginCollapse.cpp:
257 (WebCore::Layout::BlockFormattingContext::MarginCollapse::positiveNegativeValues):
258 (WebCore::Layout::BlockFormattingContext::MarginCollapse::positiveNegativeMarginBefore):
259 (WebCore::Layout::BlockFormattingContext::MarginCollapse::estimatedMarginBefore):
260 * layout/inlineformatting/InlineFormattingContextLineLayout.cpp:
261 (WebCore::Layout::InlineFormattingContext::InlineLayout::layout const):
262 (WebCore::Layout::InlineFormattingContext::InlineLayout::computedIntrinsicWidth const):
263 (WebCore::Layout::InlineFormattingContext::InlineLayout::createDisplayRuns const):
264 * layout/inlineformatting/InlineLine.cpp:
265 (WebCore::Layout::Line::close):
267 2019-08-30 Zalan Bujtas <zalan@apple.com>
269 [LFC] Proxy LayoutState::displayBoxForLayoutBox() calls through FormattingContext
270 https://bugs.webkit.org/show_bug.cgi?id=201365
271 <rdar://problem/54900815>
273 Reviewed by Antti Koivisto.
275 This patch is in preparation for enforcing displayBoxForLayoutBox() calls to stay within the current formatting context.
276 (There are a few odd cases left (floats and coordinate mapping) and they are going to be addressed in a separate patch.)
278 * layout/FormattingContext.cpp:
279 (WebCore::Layout::FormattingContext::computeOutOfFlowHorizontalGeometry):
280 (WebCore::Layout::FormattingContext::computeOutOfFlowVerticalGeometry):
281 (WebCore::Layout::FormattingContext::computeBorderAndPadding):
282 (WebCore::Layout::FormattingContext::validateGeometryConstraintsAfterLayout const):
283 * layout/FormattingContext.h:
284 (WebCore::Layout::FormattingContext::displayBoxForLayoutBox const):
285 (WebCore::Layout::FormattingContext::hasDisplayBox const):
286 * layout/FormattingContextGeometry.cpp:
287 (WebCore::Layout::FormattingContext::Geometry::computedHeightValue const):
288 (WebCore::Layout::FormattingContext::Geometry::contentHeightForFormattingContextRoot const):
289 (WebCore::Layout::FormattingContext::Geometry::staticVerticalPositionForOutOfFlowPositioned const):
290 (WebCore::Layout::FormattingContext::Geometry::staticHorizontalPositionForOutOfFlowPositioned const):
291 (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedVerticalGeometry const):
292 (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedHorizontalGeometry):
293 (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedVerticalGeometry const):
294 (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedHorizontalGeometry const):
295 (WebCore::Layout::FormattingContext::Geometry::inlineReplacedHeightAndMargin const):
296 (WebCore::Layout::FormattingContext::Geometry::inFlowPositionedPositionOffset const):
297 * layout/FormattingContextQuirks.cpp:
298 (WebCore::Layout::FormattingContext::Quirks::heightValueOfNearestContainingBlockWithFixedHeight):
299 * layout/blockformatting/BlockFormattingContext.cpp:
300 (WebCore::Layout::BlockFormattingContext::usedAvailableWidthForFloatAvoider const):
301 (WebCore::Layout::BlockFormattingContext::placeInFlowPositionedChildren):
302 (WebCore::Layout::BlockFormattingContext::computeStaticVerticalPosition):
303 (WebCore::Layout::BlockFormattingContext::computeStaticHorizontalPosition):
304 (WebCore::Layout::BlockFormattingContext::computeEstimatedVerticalPosition):
305 (WebCore::Layout::BlockFormattingContext::computeEstimatedVerticalPositionForFloatClear):
306 (WebCore::Layout::BlockFormattingContext::computeFloatingPosition):
307 (WebCore::Layout::BlockFormattingContext::computePositionToAvoidFloats):
308 (WebCore::Layout::BlockFormattingContext::computeWidthAndMargin):
309 (WebCore::Layout::BlockFormattingContext::computeHeightAndMargin):
310 (WebCore::Layout::BlockFormattingContext::verticalPositionWithMargin const):
311 * layout/blockformatting/BlockFormattingContextGeometry.cpp:
312 (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedHeightAndMargin):
313 (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedWidthAndMargin const):
314 (WebCore::Layout::BlockFormattingContext::Geometry::staticVerticalPosition const):
315 (WebCore::Layout::BlockFormattingContext::Geometry::staticHorizontalPosition const):
316 (WebCore::Layout::BlockFormattingContext::Geometry::inFlowHeightAndMargin):
317 * layout/blockformatting/BlockFormattingContextQuirks.cpp:
318 (WebCore::Layout::BlockFormattingContext::Quirks::stretchedInFlowHeight):
319 * layout/blockformatting/BlockMarginCollapse.cpp:
320 (WebCore::Layout::hasClearance):
321 (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginBeforeCollapsesWithParentMarginBefore const):
322 (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginBeforeCollapsesWithPreviousSiblingMarginAfter const):
323 (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginBeforeCollapsesWithFirstInFlowChildMarginBefore const):
324 (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginAfterCollapsesWithSiblingMarginBeforeWithClearance const):
325 (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginAfterCollapsesWithLastInFlowChildMarginAfter const):
326 (WebCore::Layout::BlockFormattingContext::MarginCollapse::updateMarginAfterForPreviousSibling const):
327 (WebCore::Layout::BlockFormattingContext::MarginCollapse::positiveNegativeValues):
328 (WebCore::Layout::BlockFormattingContext::MarginCollapse::estimatedMarginBefore):
329 (WebCore::Layout::BlockFormattingContext::MarginCollapse::updatePositiveNegativeMarginValues):
330 * layout/inlineformatting/InlineFormattingContext.cpp:
331 (WebCore::Layout::InlineFormattingContext::layout):
332 (WebCore::Layout::InlineFormattingContext::computedIntrinsicWidthConstraints):
333 (WebCore::Layout::InlineFormattingContext::initializeMarginBorderAndPaddingForGenericInlineBox):
334 (WebCore::Layout::InlineFormattingContext::computeMarginBorderAndPaddingForInlineContainer):
335 (WebCore::Layout::InlineFormattingContext::computeIntrinsicWidthForFormattingRoot):
336 (WebCore::Layout::InlineFormattingContext::computeHorizontalMargin):
337 (WebCore::Layout::InlineFormattingContext::computeWidthAndMargin):
338 (WebCore::Layout::InlineFormattingContext::computeHeightAndMargin):
339 (WebCore::Layout::InlineFormattingContext::layoutFormattingContextRoot):
340 * layout/inlineformatting/InlineFormattingContextGeometry.cpp:
341 (WebCore::Layout::InlineFormattingContext::Geometry::inlineBlockHeightAndMargin const):
342 * layout/inlineformatting/InlineFormattingContextLineLayout.cpp:
343 (WebCore::Layout::inlineItemWidth):
344 (WebCore::Layout::LineLayout::formattingContext const):
345 (WebCore::Layout::LineLayout::LineLayout):
346 (WebCore::Layout::LineLayout::placeInlineItem):
347 (WebCore::Layout::InlineFormattingContext::InlineLayout::layout const):
348 (WebCore::Layout::InlineFormattingContext::InlineLayout::computedIntrinsicWidth const):
349 (WebCore::Layout::InlineFormattingContext::InlineLayout::createDisplayRuns const):
350 (WebCore::Layout::LineLayout::layoutState const): Deleted.
351 * layout/inlineformatting/InlineFormattingContextQuirks.cpp:
352 (WebCore::Layout::InlineFormattingContext::Quirks::lineDescentNeedsCollapsing const):
353 * layout/inlineformatting/InlineLine.cpp:
354 (WebCore::Layout::isInlineContainerConsideredEmpty):
355 (WebCore::Layout::Line::isVisuallyEmpty const):
356 (WebCore::Layout::Line::close):
357 (WebCore::Layout::Line::appendNonReplacedInlineBox):
358 (WebCore::Layout::Line::inlineItemContentHeight const):
359 * layout/tableformatting/TableFormattingContext.cpp:
360 (WebCore::Layout::TableFormattingContext::layout):
361 (WebCore::Layout::TableFormattingContext::computedTableWidth):
363 2019-08-30 Chris Dumez <cdumez@apple.com>
365 WebPage::fromCorePage() to take and return a C++ reference
366 https://bugs.webkit.org/show_bug.cgi?id=201367
368 Reviewed by Antti Koivisto.
371 (WebCore::Chrome::createWindow const):
373 2019-08-30 Chris Dumez <cdumez@apple.com>
375 Add support for postMessage buffering between the service worker and window
376 https://bugs.webkit.org/show_bug.cgi?id=201169
378 Reviewed by Youenn Fablet.
380 As per the Service Worker specification, a service worker client's message
381 queue is initially disabled and only gets enabled after:
382 - The DOMContentLoaded event has been fired
384 - The client sets the navigator.serviceWorker.onmessage event handler
386 - navigator.serviceWorker.startMessages() is called
388 While the message queue is disabled, messages posted by the service worker
389 to the client simply get queued and only get processed once the queue gets
392 No new tests, rebaselined existing test.
395 (WebCore::Document::finishedParsing):
396 Call startMessages() on the ServiceWorkerContainer once the DOMContentLoaded event has
399 * dom/ScriptExecutionContext.cpp:
400 (WebCore::ScriptExecutionContext::ensureServiceWorkerContainer):
401 * dom/ScriptExecutionContext.h:
402 * workers/service/SWClientConnection.cpp:
403 (WebCore::SWClientConnection::postMessageToServiceWorkerClient):
404 Fix a bug where a service worker would not be able to post a message to a client until
405 that client has accessed navigator.serviceWorker (since the ServiceWorkerContainer is
406 lazy initialized). To address the issue, we now initialize the ServiceWorkerContainer
407 when a message is received from the service worker. Previously, messages were just
410 * workers/service/ServiceWorkerContainer.cpp:
411 (WebCore::ServiceWorkerContainer::ServiceWorkerContainer):
412 When the ServiceWorkerContainer is constructed, suspend its message queue if its context
413 document is still parsing.
415 (WebCore::ServiceWorkerContainer::startMessages):
416 Resume the message queue when startMessages() is called.
418 (WebCore::ServiceWorkerContainer::postMessage):
419 Enqueue the event instead of firing it right away.
421 (WebCore::ServiceWorkerContainer::addEventListener):
422 if navigator.serviceWorker.onmessage event handler gets set by the JavaScript, call
425 * workers/service/ServiceWorkerContainer.h:
427 2019-08-30 Simon Fraser <simon.fraser@apple.com>
429 Minor optimization in determineNonLayerDescendantsPaintedContent()
430 https://bugs.webkit.org/show_bug.cgi?id=201352
432 Reviewed by Antti Koivisto.
434 It's cheaper to call renderText.hasRenderedText() than renderText.linesBoundingBox(), because
435 the latter has to traverse all the InlineTextBoxes. This code path is fairly hot when
436 scrolling twitter feeds, since it's called from RenderLayer::updateLayerPositionsAfterScroll()
437 which calls RenderLayer::isVisuallyNonEmpty().
439 * rendering/RenderLayer.cpp:
440 (WebCore::RenderLayer::calculateClipRects const):
442 2019-08-30 Saam Barati <sbarati@apple.com>
444 [WHLSL] Remove getters/setters/anders
445 https://bugs.webkit.org/show_bug.cgi?id=201008
447 Reviewed by Robin Morisset.
449 This patch changes WHLSL in a significant way. This patch removes getters/setters/anders
450 from the language. In our experience writing WHLSL shaders, these parts of the language
451 went unused, and they added a lot of complexity to the implementation of the compiler.
453 This patch now treats field accesses and array indexes as intrinsics inside the compiler.
454 This patch removes all notions of named operators, anders, and indexed operators
455 from the compiler and the standard library. The checker now intrinsically knows the
456 return type for property accesses and indexed expressions based on what the
459 To make this work in practice was difficult, since getters/setters/anders
460 solved a lot of the difficult problems we had in generating metal code. For
461 example, all swizzle operators were getters and setters, so assigning to a
462 swizzle fell out naturally from implementing setters. However, during metal
463 codegen, all we see is a dot expression with "xy" as a property. Our previous
464 architecture of emitting Metal code using pointers which represent lvalues
465 doesn't work because you can't take the address of a swizzle. For example,
466 "auto* x = &vector.yz" is invalid metal code.
468 So, this patch changes the entire metal code generator to emit WHLSL expressions
469 as Metal expressions. To do this, I had to change a lot about how the compiler
471 - I changed the indexed accesses of matrices to return columns instead of
472 rows. This allowed WHLSL code like `mat[0].xy = 42` to be compiled into
473 the equivalent metal code of `mat[0].xy = 42`.
474 - I changed the native function inliner to emit expressions instead of
476 - We also simplify the language by removing null and requiring all
477 reference type variables to have an initializer. This means that
478 null is no longer a valid value, which allows us to omit null checks
479 inside the metal code generator. To make this work with array
480 accesses, we now clamp accesses instead of returning null for OOB
483 I've also filed one required bug as a followup. I didn't include it in this
484 patch to make it easier to review along. Currently, there are two places in
485 metal codegen where we evaluate effects twice. That will be fixed in:
486 https://bugs.webkit.org/show_bug.cgi?id=201251
488 Tests: webgpu/whlsl/address-of-swizzle.html
489 webgpu/whlsl/array-oob-alias.html
490 webgpu/whlsl/matrix-index-assign.html
491 webgpu/whlsl/matrix-index-order.html
492 webgpu/whlsl/oob-access-2.html
493 webgpu/whlsl/operator-syntax.html
495 * Modules/webgpu/WHLSL/AST/WHLSLAST.h:
496 * Modules/webgpu/WHLSL/AST/WHLSLConstantExpression.h:
497 * Modules/webgpu/WHLSL/AST/WHLSLDotExpression.h:
498 * Modules/webgpu/WHLSL/AST/WHLSLExpression.cpp:
499 (WebCore::WHLSL::AST::Expression::destroy):
500 (WebCore::WHLSL::AST::Expression::destruct):
501 (WebCore::WHLSL::AST::PropertyAccessExpression::getterFunctionName const): Deleted.
502 (WebCore::WHLSL::AST::PropertyAccessExpression::setterFunctionName const): Deleted.
503 (WebCore::WHLSL::AST::PropertyAccessExpression::anderFunctionName const): Deleted.
504 * Modules/webgpu/WHLSL/AST/WHLSLExpression.h:
505 (WebCore::WHLSL::AST::Expression::copyTypeTo const):
506 (WebCore::WHLSL::AST::Expression::isMakePointerExpression const):
507 (WebCore::WHLSL::AST::Expression::isNullLiteral const): Deleted.
508 * Modules/webgpu/WHLSL/AST/WHLSLIndexExpression.h:
509 * Modules/webgpu/WHLSL/AST/WHLSLNativeTypeDeclaration.h:
510 * Modules/webgpu/WHLSL/AST/WHLSLNullLiteral.h: Removed.
511 * Modules/webgpu/WHLSL/AST/WHLSLNullLiteralType.cpp: Removed.
512 * Modules/webgpu/WHLSL/AST/WHLSLNullLiteralType.h: Removed.
513 * Modules/webgpu/WHLSL/AST/WHLSLPropertyAccessExpression.h:
514 (WebCore::WHLSL::AST::PropertyAccessExpression::getterFunction): Deleted.
515 (WebCore::WHLSL::AST::PropertyAccessExpression::anderFunction): Deleted.
516 (WebCore::WHLSL::AST::PropertyAccessExpression::threadAnderFunction): Deleted.
517 (WebCore::WHLSL::AST::PropertyAccessExpression::setterFunction): Deleted.
518 (WebCore::WHLSL::AST::PropertyAccessExpression::setGetterFunction): Deleted.
519 (WebCore::WHLSL::AST::PropertyAccessExpression::setAnderFunction): Deleted.
520 (WebCore::WHLSL::AST::PropertyAccessExpression::setThreadAnderFunction): Deleted.
521 (WebCore::WHLSL::AST::PropertyAccessExpression::setSetterFunction): Deleted.
523 * Modules/webgpu/WHLSL/AST/WHLSLType.cpp:
524 (WebCore::WHLSL::AST::Type::destroy):
525 (WebCore::WHLSL::AST::Type::destruct):
526 (WebCore::WHLSL::AST::ResolvableType::canResolve const):
527 (WebCore::WHLSL::AST::ResolvableType::conversionCost const):
528 * Modules/webgpu/WHLSL/AST/WHLSLType.h:
529 (WebCore::WHLSL::AST::Type::isIntegerLiteralType const):
530 (WebCore::WHLSL::AST::Type::isNullLiteralType const): Deleted.
531 * Modules/webgpu/WHLSL/Metal/WHLSLFunctionWriter.cpp:
532 (WebCore::WHLSL::Metal::FunctionDefinitionWriter::HoistedVariableCollector::HoistedVariableCollector):
533 (WebCore::WHLSL::Metal::FunctionDefinitionWriter::visit):
534 (WebCore::WHLSL::Metal::FunctionDefinitionWriter::emitLoop):
535 (WebCore::WHLSL::Metal::FunctionDefinitionWriter::emitConstantExpressionString):
536 (WebCore::WHLSL::Metal::FunctionDefinitionWriter::appendRightValueWithNullability): Deleted.
537 (WebCore::WHLSL::Metal::FunctionDefinitionWriter::appendRightValue): Deleted.
538 (WebCore::WHLSL::Metal::FunctionDefinitionWriter::appendLeftValue): Deleted.
539 (WebCore::WHLSL::Metal::FunctionDefinitionWriter::takeLastValue): Deleted.
540 (WebCore::WHLSL::Metal::FunctionDefinitionWriter::takeLastValueAndNullability): Deleted.
541 (WebCore::WHLSL::Metal::FunctionDefinitionWriter::takeLastLeftValue): Deleted.
542 * Modules/webgpu/WHLSL/Metal/WHLSLMetalCodeGenerator.cpp:
543 (WebCore::WHLSL::Metal::metalCodePrologue):
544 (WebCore::WHLSL::Metal::generateMetalCode):
545 (WebCore::WHLSL::Metal::metalCodeProlog): Deleted.
546 * Modules/webgpu/WHLSL/Metal/WHLSLNativeFunctionWriter.cpp:
547 (WebCore::WHLSL::Metal::inlineNativeFunction):
548 (WebCore::WHLSL::Metal::vectorInnerType): Deleted.
549 * Modules/webgpu/WHLSL/Metal/WHLSLNativeFunctionWriter.h:
550 * Modules/webgpu/WHLSL/Metal/WHLSLNativeTypeWriter.cpp:
551 (WebCore::WHLSL::Metal::writeNativeType):
552 * Modules/webgpu/WHLSL/WHLSLASTDumper.cpp:
553 (WebCore::WHLSL::ASTDumper::visit):
554 * Modules/webgpu/WHLSL/WHLSLASTDumper.h:
555 * Modules/webgpu/WHLSL/WHLSLCheckDuplicateFunctions.cpp:
556 (WebCore::WHLSL::checkDuplicateFunctions):
557 * Modules/webgpu/WHLSL/WHLSLChecker.cpp:
558 (WebCore::WHLSL::resolveByInstantiation):
559 (WebCore::WHLSL::checkOperatorOverload):
560 (WebCore::WHLSL::Checker::wrappedUintType):
561 (WebCore::WHLSL::Checker::normalizedTypeForFunctionKey):
562 (WebCore::WHLSL::Checker::visit):
563 (WebCore::WHLSL::matchAndCommit):
564 (WebCore::WHLSL::Checker::resolveFunction):
565 (WebCore::WHLSL::Checker::assignConcreteType):
566 (WebCore::WHLSL::resolveWithOperatorLength): Deleted.
567 (WebCore::WHLSL::Checker::genericPointerType): Deleted.
568 (WebCore::WHLSL::Checker::finishVisiting): Deleted.
569 * Modules/webgpu/WHLSL/WHLSLHighZombieFinder.cpp:
570 (WebCore::WHLSL::findHighZombies):
572 * Modules/webgpu/WHLSL/WHLSLInferTypes.cpp:
573 (WebCore::WHLSL::matchAndCommit):
574 (WebCore::WHLSL::commit):
575 * Modules/webgpu/WHLSL/WHLSLIntrinsics.h:
576 (WebCore::WHLSL::Intrinsics::boolVectorTypeForSize const):
577 (WebCore::WHLSL::Intrinsics::uintVectorTypeForSize const):
578 (WebCore::WHLSL::Intrinsics::intVectorTypeForSize const):
579 (WebCore::WHLSL::Intrinsics::floatVectorTypeForSize const):
580 * Modules/webgpu/WHLSL/WHLSLLexer.cpp:
581 (WebCore::WHLSL::Lexer::consumeTokenFromStream):
582 * Modules/webgpu/WHLSL/WHLSLLiteralTypeChecker.cpp:
583 * Modules/webgpu/WHLSL/WHLSLParser.cpp:
584 (WebCore::WHLSL::Parser::parseConstantExpression):
585 (WebCore::WHLSL::Parser::parseEnumerationMember):
586 (WebCore::WHLSL::Parser::parseTerm):
587 * Modules/webgpu/WHLSL/WHLSLPrepare.cpp:
588 (WebCore::WHLSL::prepareShared):
589 * Modules/webgpu/WHLSL/WHLSLProgram.cpp: Added.
590 (WebCore::WHLSL::Program::isValidVectorProperty):
591 * Modules/webgpu/WHLSL/WHLSLProgram.h:
592 * Modules/webgpu/WHLSL/WHLSLPropertyResolver.cpp:
593 (WebCore::WHLSL::resolveProperties):
594 (WebCore::WHLSL::PropertyResolver::visit): Deleted.
595 (WebCore::WHLSL::wrapAnderCallArgument): Deleted.
596 (WebCore::WHLSL::anderCallArgument): Deleted.
597 (WebCore::WHLSL::setterCall): Deleted.
598 (WebCore::WHLSL::getterCall): Deleted.
599 (WebCore::WHLSL::modify): Deleted.
600 (WebCore::WHLSL::PropertyResolver::simplifyRightValue): Deleted.
601 (WebCore::WHLSL::LeftValueSimplifier::finishVisiting): Deleted.
602 (WebCore::WHLSL::LeftValueSimplifier::visit): Deleted.
603 (WebCore::WHLSL::PropertyResolver::simplifyLeftValue): Deleted.
604 * Modules/webgpu/WHLSL/WHLSLPruneUnreachableStandardLibraryFunctions.cpp:
605 * Modules/webgpu/WHLSL/WHLSLStandardLibrary.txt:
606 * Modules/webgpu/WHLSL/WHLSLStandardLibraryUtilities.cpp:
607 * Modules/webgpu/WHLSL/WHLSLSynthesizeArrayOperatorLength.cpp: Removed.
608 * Modules/webgpu/WHLSL/WHLSLSynthesizeArrayOperatorLength.h: Removed.
609 * Modules/webgpu/WHLSL/WHLSLSynthesizeEnumerationFunctions.cpp:
610 (WebCore::WHLSL::synthesizeEnumerationFunctions):
611 * Modules/webgpu/WHLSL/WHLSLVisitor.cpp:
612 (WebCore::WHLSL::Visitor::visit):
613 * Modules/webgpu/WHLSL/WHLSLVisitor.h:
615 * WebCore.xcodeproj/project.pbxproj:
617 2019-08-30 Zalan Bujtas <zalan@apple.com>
619 [LFC] Pass FormattingContext to Geometry/Quirks/BlockMarginCollapsing classes
620 https://bugs.webkit.org/show_bug.cgi?id=201355
621 <rdar://problem/54895959>
623 Reviewed by Antti Koivisto.
625 This is in preparation for enforcing LFC to not call outside of the formatting context.
626 LayoutState::displayBoxForLayoutBox calls will be forced to go through the FormattingContext class to
630 * layout/FormattingContext.h:
631 (WebCore::Layout::FormattingContext::isBlockFormattingContext const):
632 (WebCore::Layout::FormattingContext::isInlineFormattingContext const):
633 (WebCore::Layout::FormattingContext::isTableFormattingContext const):
634 (WebCore::Layout::FormattingContext::Geometry::layoutState const):
635 (WebCore::Layout::FormattingContext::Geometry::layoutState):
636 (WebCore::Layout::FormattingContext::Geometry::formattingContext const):
637 (WebCore::Layout::FormattingContext::geometry const):
638 (WebCore::Layout::FormattingContext::Quirks::layoutState const):
639 (WebCore::Layout::FormattingContext::Quirks::layoutState):
640 (WebCore::Layout::FormattingContext::Quirks::formattingContext const):
641 (WebCore::Layout::FormattingContext::quirks const):
642 (WebCore::Layout::FormattingContext::Geometry::Geometry):
643 (WebCore::Layout::FormattingContext::Quirks::Quirks):
644 * layout/FormattingContextGeometry.cpp:
645 (WebCore::Layout::FormattingContext::Geometry::computedHeightValue const):
646 * layout/FormattingContextQuirks.cpp:
647 (WebCore::Layout::FormattingContext::Quirks::heightValueOfNearestContainingBlockWithFixedHeight):
648 * layout/blockformatting/BlockFormattingContext.h:
649 (WebCore::Layout::BlockFormattingContext::Geometry::formattingContext const):
650 (WebCore::Layout::BlockFormattingContext::geometry const):
651 (WebCore::Layout::BlockFormattingContext::MarginCollapse::layoutState):
652 (WebCore::Layout::BlockFormattingContext::MarginCollapse::layoutState const):
653 (WebCore::Layout::BlockFormattingContext::MarginCollapse::formattingContext const):
654 (WebCore::Layout::BlockFormattingContext::marginCollapse const):
655 (WebCore::Layout::BlockFormattingContext::Quirks::formattingContext const):
656 (WebCore::Layout::BlockFormattingContext::quirks const):
657 (WebCore::Layout::BlockFormattingContext::Geometry::Geometry):
658 (WebCore::Layout::BlockFormattingContext::Quirks::Quirks):
659 (WebCore::Layout::BlockFormattingContext::MarginCollapse::MarginCollapse):
660 * layout/blockformatting/BlockFormattingContextGeometry.cpp:
661 (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedHeightAndMargin):
662 (WebCore::Layout::BlockFormattingContext::Geometry::inFlowHeightAndMargin):
663 * layout/blockformatting/BlockFormattingContextQuirks.cpp:
664 (WebCore::Layout::BlockFormattingContext::Quirks::stretchedInFlowHeight):
665 * layout/blockformatting/BlockMarginCollapse.cpp:
666 (WebCore::Layout::BlockFormattingContext::MarginCollapse::positiveNegativeValues):
667 (WebCore::Layout::BlockFormattingContext::MarginCollapse::positiveNegativeMarginBefore):
668 (WebCore::Layout::BlockFormattingContext::MarginCollapse::estimatedMarginBefore):
669 * layout/inlineformatting/InlineFormattingContext.h:
670 (WebCore::Layout::InlineFormattingContext::InlineLayout::layoutState const):
671 (WebCore::Layout::InlineFormattingContext::InlineLayout::formattingContext const):
672 (WebCore::Layout::InlineFormattingContext::InlineLayout::formattingRoot const):
673 (WebCore::Layout::InlineFormattingContext::Quirks::formattingContext const):
674 (WebCore::Layout::InlineFormattingContext::quirks const):
675 (WebCore::Layout::InlineFormattingContext::Geometry::formattingContext const):
676 (WebCore::Layout::InlineFormattingContext::geometry const):
677 (WebCore::Layout::InlineFormattingContext::Geometry::Geometry):
678 (WebCore::Layout::InlineFormattingContext::Quirks::Quirks):
679 * layout/inlineformatting/InlineFormattingContextLineLayout.cpp:
680 (WebCore::Layout::LineLayout::LineLayout):
681 (WebCore::Layout::InlineFormattingContext::InlineLayout::InlineLayout):
682 (WebCore::Layout::InlineFormattingContext::InlineLayout::layout const):
683 (WebCore::Layout::InlineFormattingContext::InlineLayout::computedIntrinsicWidth const):
684 (WebCore::Layout::InlineFormattingContext::InlineLayout::createDisplayRuns const):
685 * layout/inlineformatting/InlineLine.cpp:
686 (WebCore::Layout::Line::Line):
687 (WebCore::Layout::Line::isVisuallyEmpty const):
688 (WebCore::Layout::Line::close):
689 (WebCore::Layout::Line::appendNonReplacedInlineBox):
690 (WebCore::Layout::Line::adjustBaselineAndLineHeight):
691 (WebCore::Layout::Line::inlineItemContentHeight const):
692 (WebCore::Layout::Line::layoutState const):
693 (WebCore::Layout::Line::formattingContext const):
694 * layout/inlineformatting/InlineLine.h:
695 * layout/tableformatting/TableFormattingContext.h:
696 (WebCore::Layout::TableFormattingContext::Geometry::formattingContext const):
697 (WebCore::Layout::TableFormattingContext::geometry const):
698 (WebCore::Layout::TableFormattingContext::Geometry::Geometry):
699 * page/FrameViewLayoutContext.cpp:
700 (WebCore::layoutUsingFormattingContext):
702 2019-08-30 Ryan Haddad <ryanhaddad@apple.com>
704 Unreviewed, rolling out r249338.
706 Caused 500+ layout test failures on WK1
710 "Add support for postMessage buffering between the service
712 https://bugs.webkit.org/show_bug.cgi?id=201169
713 https://trac.webkit.org/changeset/249338
715 2019-08-30 Alex Christensen <achristensen@webkit.org>
717 Remove HAVE_CFNETWORK_WITH_IGNORE_HSTS conditional
718 https://bugs.webkit.org/show_bug.cgi?id=201279
720 Reviewed by Darin Adler.
722 * platform/network/mac/WebCoreURLResponse.mm:
723 (WebCore::synthesizeRedirectResponseIfNecessary):
724 (WebCore::schemeWasUpgradedDueToDynamicHSTS): Deleted.
726 2019-08-30 Wenson Hsieh <wenson_hsieh@apple.com>
728 Caret does not appear in text field inside a transformed, overflow: hidden container
729 https://bugs.webkit.org/show_bug.cgi?id=201317
730 <rdar://problem/54859264>
732 Reviewed by Simon Fraser.
734 This patch refactors the heuristic for determining whether to suppress selection gestures and UI in a way that
735 fixes the corner case encountered in this bug. To understand why this test case fails with our existing
736 heuristic, consider the below test case.
738 Let's say we have an input field inside an "overflow: hidden;" container, which is positioned in such a way that
739 it is completely clipped by its enclosing container which is also "overflow: hidden". Our existing logic would
740 appropriately identify this as a hidden editable element.
742 However, let's now apply a transform to the input field's closest "overflow: hidden" ancestor, such that the
743 field is now visible. Since RenderLayer::offsetFromAncestor doesn't take transforms into account when we try to
744 find the offset of the "overflow: hidden" layer relative to the root view, we end up passing an offsetFromRoot
745 of (0, 100vw) to RenderLayer::calculateClipRects, which computes a background clip rect of (0, 0, 100vw, 100vh).
747 This means that at the end of RenderLayer::calculateClipRects, we end up intersecting the background clip rect
748 (0, 0, 100vw, 100vh) against (100vw, 0, 100vw, 100vh), which results in the empty rect, and subsequently makes
749 us believe we're editing a hidden editable element.
751 Instead of tacking on more logic to isTransparentOrFullyClippedRespectingParentFrames, we can fix this by using
752 RenderObject::computeVisibleRectInContainer instead, performing a similar walk up the render tree to compute the
753 visible rect of each focused element or subframe relative to its root. This is capable of taking transforms into
754 account. See comments below for more details.
756 Test: editing/selection/ios/show-selection-in-transformed-container-2.html
758 * rendering/RenderLayer.cpp:
759 (WebCore::RenderLayer::isTransparentRespectingParentFrames const):
761 Split out isTransparentOrFullyClippedRespectingParentFrames into two methods: RenderLayer's
762 isTransparentRespectingParentFrames, and RenderObject's hasNonEmptyVisibleRectRespectingParentFrames. The
763 transparency check starts at the enclosing layer and walks up the layer tree, while the non-empty visible rect
764 check looks for renderers that are completely empty relative to their root views.
766 * rendering/RenderLayer.h:
767 * rendering/RenderObject.cpp:
768 (WebCore::RenderObject::hasNonEmptyVisibleRectRespectingParentFrames const):
770 Rewrite logic for detecting completely clipped editable areas (that formerly lived in
771 isTransparentOrFullyClippedRespectingParentFrames) to use computeVisibleRectInContainer instead.
773 * rendering/RenderObject.h:
775 2019-08-30 Chris Dumez <cdumez@apple.com>
777 Add support for postMessage buffering between the service worker and window
778 https://bugs.webkit.org/show_bug.cgi?id=201169
780 Reviewed by Youenn Fablet.
782 As per the Service Worker specification, a service worker client's message
783 queue is initially disabled and only gets enabled after:
784 - The DOMContentLoaded event has been fired
786 - The client sets the navigator.serviceWorker.onmessage event handler
788 - navigator.serviceWorker.startMessages() is called
790 While the message queue is disabled, messages posted by the service worker
791 to the client simply get queued and only get processed once the queue gets
794 No new tests, rebaselined existing test.
797 (WebCore::Document::finishedParsing):
798 Call startMessages() on the ServiceWorkerContainer once the DOMContentLoaded event has
801 * dom/ScriptExecutionContext.cpp:
802 (WebCore::ScriptExecutionContext::ensureServiceWorkerContainer):
803 * dom/ScriptExecutionContext.h:
804 * workers/service/SWClientConnection.cpp:
805 (WebCore::SWClientConnection::postMessageToServiceWorkerClient):
806 Fix a bug where a service worker would not be able to post a message to a client until
807 that client has accessed navigator.serviceWorker (since the ServiceWorkerContainer is
808 lazy initialized). To address the issue, we now initialize the ServiceWorkerContainer
809 when a message is received from the service worker. Previously, messages were just
812 * workers/service/ServiceWorkerContainer.cpp:
813 (WebCore::ServiceWorkerContainer::ServiceWorkerContainer):
814 When the ServiceWorkerContainer is constructed, suspend its message queue if its context
815 document is still parsing.
817 (WebCore::ServiceWorkerContainer::startMessages):
818 Resume the message queue when startMessages() is called.
820 (WebCore::ServiceWorkerContainer::postMessage):
821 Enqueue the event instead of firing it right away.
823 (WebCore::ServiceWorkerContainer::addEventListener):
824 if navigator.serviceWorker.onmessage event handler gets set by the JavaScript, call
827 * workers/service/ServiceWorkerContainer.h:
829 2019-08-30 Simon Fraser <simon.fraser@apple.com>
831 Add system tracing points for compositing updates, and touch-event dispatching
832 https://bugs.webkit.org/show_bug.cgi?id=201327
834 Reviewed by Alex Christensen.
836 TraceScope in RenderLayerCompositor::updateCompositingLayers().
838 * rendering/RenderLayerCompositor.cpp:
839 (WebCore::RenderLayerCompositor::updateCompositingLayers):
841 2019-08-30 Brent Fulgham <bfulgham@apple.com>
843 [FTW] Use DirectX SharedResource as basis for SharedBitmap
844 https://bugs.webkit.org/show_bug.cgi?id=201157
846 Reviewed by Alex Christensen.
848 Currently an ID2D1Bitmap is used as the backing store for the SharedBitmap that is the
849 base type for sharing data between the WebContent Process and the UIProcess. However, this
850 involves moving GPU memory to local memory, copying that memory into the SharedMemory member
851 of the SharedBitmap, then building a new GPU bitmap on the UIProcess side from that SharedMemory.
853 Profiling indicates that this is the single largest place FTW WebKit spends its time.
855 Instead, we should use Direct2D's ability to render to an IDXGISurface, which can be shared
856 between multiple processes. This should avoid the GPU->CPU copy, the Direct2D-allocated
857 CPU->Shared Memory copy, and the shared memory to GPU copy.
859 * platform/graphics/win/BackingStoreBackendDirect2D.h:
860 (WebCore::BackingStoreBackendDirect2D::renderTarget const): Change type.
861 (WebCore::BackingStoreBackendDirect2D::dxSurface const): Added.
862 (WebCore::BackingStoreBackendDirect2D::BackingStoreBackendDirect2D): Require a DXD11 device.
863 * platform/graphics/win/BackingStoreBackendDirect2DImpl.cpp:
864 (WebCore::BackingStoreBackendDirect2DImpl::BackingStoreBackendDirect2DImpl): Use Direct2D's
865 IDXGISurface to make a render target we can use to support our fast cross-process sharing.
866 (WebCore::BackingStoreBackendDirect2DImpl::scroll):
867 * platform/graphics/win/BackingStoreBackendDirect2DImpl.h:
868 * platform/graphics/win/Direct2DOperations.cpp:
869 (WebCore::Direct2D::fillRect): Remove unneeded PlatformContextStateSaver.
870 (WebCore::Direct2D::fillRoundedRect): Ditto.
871 (WebCore::Direct2D::fillRectWithGradient): Ditto.
872 (WebCore::Direct2D::fillPath): Ditto.
873 (WebCore::Direct2D::strokePath): Ditto.
874 * platform/graphics/win/Direct2DUtilities.cpp:
875 (WebCore::Direct2D::pixelFormat): Switch to constants for bitmap format.
876 (WebCore::Direct2D::createDXGISurfaceOfSize): Added.
877 (WebCore::Direct2D::createSurfaceRenderTarget): Added.
878 (WebCore::Direct2D::writeDiagnosticPNGToPath):
879 (WebCore::Direct2D::dxgiImmediateContext): Added.
880 (WebCore::Direct2D::defaultDirectXDevice): Added.
881 (WebCore::Direct2D::createDeviceAndContext): Added.
882 (WebCore::Direct2D::toDXGIDevice): Added.
883 (WebCore::Direct2D::factoryForDXGIDevice): Added.
884 * platform/graphics/win/Direct2DUtilities.h:
886 2019-08-30 Sihui Liu <sihui_liu@apple.com>
888 IndexedDB: update size of database when database operation is completed
889 https://bugs.webkit.org/show_bug.cgi?id=201057
891 Reviewed by Youenn Fablet.
893 Currently when a database operation was completed, we re-computed the disk usage of the origin. This computation
894 listed all databases in the origin directory and read the size of each database file, which was very inefficient
895 because the completed operation should only affect one database.
897 This patch makes UniqueIDBDatabase keep track of database size and reports size change to QuotaUser.
899 Tested PerformanceTests/IndexedDB/basic/objectstore-add.html on release build minibrowser. This change makes
900 the test over 50% faster.
902 * Modules/indexeddb/server/IDBBackingStore.h:
903 * Modules/indexeddb/server/IDBServer.cpp:
904 (WebCore::IDBServer::IDBServer::QuotaUser::increaseSpaceUsed):
905 (WebCore::IDBServer::IDBServer::QuotaUser::decreaseSpaceUsed):
906 (WebCore::IDBServer::IDBServer::computeSpaceUsedForOrigin):
907 (WebCore::IDBServer::IDBServer::increaseSpaceUsed):
908 (WebCore::IDBServer::IDBServer::decreaseSpaceUsed):
909 (WebCore::IDBServer::IDBServer::setSpaceUsed): Deleted.
910 * Modules/indexeddb/server/IDBServer.h:
911 * Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
912 (WebCore::IDBServer::MemoryIDBBackingStore::databaseSize const):
913 (WebCore::IDBServer::MemoryIDBBackingStore::close):
914 (WebCore::IDBServer::MemoryIDBBackingStore::databasesSizeForOrigin const): Deleted.
915 * Modules/indexeddb/server/MemoryIDBBackingStore.h:
916 * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
917 (WebCore::IDBServer::SQLiteIDBBackingStore::databasesSizeForDirectory):
918 (WebCore::IDBServer::SQLiteIDBBackingStore::databaseSize const):
919 (WebCore::IDBServer::SQLiteIDBBackingStore::close):
920 (WebCore::IDBServer::SQLiteIDBBackingStore::databasesSizeForFolder): Deleted.
921 (WebCore::IDBServer::SQLiteIDBBackingStore::databasesSizeForOrigin const): Deleted.
922 * Modules/indexeddb/server/SQLiteIDBBackingStore.h:
923 * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
924 (WebCore::IDBServer::UniqueIDBDatabase::deleteBackingStore):
925 (WebCore::IDBServer::UniqueIDBDatabase::shutdownForClose):
926 (WebCore::IDBServer::UniqueIDBDatabase::didShutdownForClose):
927 (WebCore::IDBServer::UniqueIDBDatabase::didDeleteBackingStore):
928 (WebCore::IDBServer::UniqueIDBDatabase::openBackingStore):
929 (WebCore::IDBServer::UniqueIDBDatabase::didOpenBackingStore):
930 (WebCore::IDBServer::UniqueIDBDatabase::postDatabaseTaskReply):
931 (WebCore::IDBServer::UniqueIDBDatabase::updateSpaceUsedIfNeeded):
932 * Modules/indexeddb/server/UniqueIDBDatabase.h:
934 2019-08-30 Alicia Boya García <aboya@igalia.com>
936 [MSE][GStreamer] Replaying the video should update currentTime
937 https://bugs.webkit.org/show_bug.cgi?id=201307
939 Reviewed by Xabier Rodriguez-Calvar.
941 While writing a test to confirm that https://bugs.webkit.org/show_bug.cgi?id=190050
942 has indeed been fixed I noticed a non-conformity: when the video has
943 ended, right after calling .play() for a second playback currentTime
944 did not return zero, but the video duration.
946 This turned to be due to the m_isEndReached flag not being reseted on
947 seeks (replaying a video incurs in a seek done from multi-platform
950 Test: imported/w3c/web-platform-tests/media-source/mediasource-replay.html
952 * platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp:
953 (WebCore::MediaPlayerPrivateGStreamerMSE::seek):
955 2019-08-30 Zalan Bujtas <zalan@apple.com>
957 [LFC] Make Geometry/Quirk/MarginCollapse subclasses stateful.
958 https://bugs.webkit.org/show_bug.cgi?id=201343
959 <rdar://problem/54883787>
961 Reviewed by Antti Koivisto.
963 This is in preparation for enforcing LFC to not call outside of the formatting context.
965 * layout/FormattingContext.cpp:
966 (WebCore::Layout::FormattingContext::computeOutOfFlowHorizontalGeometry):
967 (WebCore::Layout::FormattingContext::computeOutOfFlowVerticalGeometry):
968 (WebCore::Layout::FormattingContext::computeBorderAndPadding):
969 (WebCore::Layout::FormattingContext::layoutOutOfFlowContent):
970 (WebCore::Layout::FormattingContext::computeOutOfFlowHorizontalGeometry const): Deleted.
971 (WebCore::Layout::FormattingContext::computeOutOfFlowVerticalGeometry const): Deleted.
972 (WebCore::Layout::FormattingContext::computeBorderAndPadding const): Deleted.
973 (WebCore::Layout::FormattingContext::layoutOutOfFlowContent const): Deleted.
974 * layout/FormattingContext.h:
975 (WebCore::Layout::FormattingContext::Geometry::layoutState const):
976 (WebCore::Layout::FormattingContext::Geometry::layoutState):
977 (WebCore::Layout::FormattingContext::geometry const):
978 (WebCore::Layout::FormattingContext::Quirks::layoutState const):
979 (WebCore::Layout::FormattingContext::Quirks::layoutState):
980 (WebCore::Layout::FormattingContext::quirks const):
981 (WebCore::Layout::FormattingContext::Geometry::Geometry):
982 (WebCore::Layout::FormattingContext::Quirks::Quirks):
983 * layout/FormattingContextGeometry.cpp:
984 (WebCore::Layout::FormattingContext::Geometry::computedHeightValue const):
985 (WebCore::Layout::FormattingContext::Geometry::contentHeightForFormattingContextRoot const):
986 (WebCore::Layout::FormattingContext::Geometry::computedValueIfNotAuto const):
987 (WebCore::Layout::FormattingContext::Geometry::fixedValue const):
988 (WebCore::Layout::FormattingContext::Geometry::computedMaxHeight const):
989 (WebCore::Layout::FormattingContext::Geometry::computedMinHeight const):
990 (WebCore::Layout::FormattingContext::Geometry::staticVerticalPositionForOutOfFlowPositioned const):
991 (WebCore::Layout::FormattingContext::Geometry::staticHorizontalPositionForOutOfFlowPositioned const):
992 (WebCore::Layout::FormattingContext::Geometry::shrinkToFitWidth):
993 (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedVerticalGeometry const):
994 (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedHorizontalGeometry):
995 (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedVerticalGeometry const):
996 (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedHorizontalGeometry const):
997 (WebCore::Layout::FormattingContext::Geometry::complicatedCases const):
998 (WebCore::Layout::FormattingContext::Geometry::floatingNonReplacedWidthAndMargin):
999 (WebCore::Layout::FormattingContext::Geometry::floatingReplacedHeightAndMargin const):
1000 (WebCore::Layout::FormattingContext::Geometry::floatingReplacedWidthAndMargin const):
1001 (WebCore::Layout::FormattingContext::Geometry::outOfFlowVerticalGeometry const):
1002 (WebCore::Layout::FormattingContext::Geometry::outOfFlowHorizontalGeometry):
1003 (WebCore::Layout::FormattingContext::Geometry::floatingHeightAndMargin const):
1004 (WebCore::Layout::FormattingContext::Geometry::floatingWidthAndMargin):
1005 (WebCore::Layout::FormattingContext::Geometry::inlineReplacedHeightAndMargin const):
1006 (WebCore::Layout::FormattingContext::Geometry::inlineReplacedWidthAndMargin const):
1007 (WebCore::Layout::FormattingContext::Geometry::inFlowPositionedPositionOffset const):
1008 (WebCore::Layout::FormattingContext::Geometry::computedBorder const):
1009 (WebCore::Layout::FormattingContext::Geometry::computedPadding const):
1010 (WebCore::Layout::FormattingContext::Geometry::computedHorizontalMargin const):
1011 (WebCore::Layout::FormattingContext::Geometry::computedVerticalMargin const):
1012 (WebCore::Layout::FormattingContext::Geometry::constrainByMinMaxWidth const):
1013 (WebCore::Layout::FormattingContext::Geometry::computedHeightValue): Deleted.
1014 (WebCore::Layout::FormattingContext::Geometry::contentHeightForFormattingContextRoot): Deleted.
1015 (WebCore::Layout::FormattingContext::Geometry::computedValueIfNotAuto): Deleted.
1016 (WebCore::Layout::FormattingContext::Geometry::fixedValue): Deleted.
1017 (WebCore::Layout::FormattingContext::Geometry::computedMaxHeight): Deleted.
1018 (WebCore::Layout::FormattingContext::Geometry::computedMinHeight): Deleted.
1019 (WebCore::Layout::staticVerticalPositionForOutOfFlowPositioned): Deleted.
1020 (WebCore::Layout::staticHorizontalPositionForOutOfFlowPositioned): Deleted.
1021 (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedVerticalGeometry): Deleted.
1022 (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedVerticalGeometry): Deleted.
1023 (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedHorizontalGeometry): Deleted.
1024 (WebCore::Layout::FormattingContext::Geometry::complicatedCases): Deleted.
1025 (WebCore::Layout::FormattingContext::Geometry::floatingReplacedHeightAndMargin): Deleted.
1026 (WebCore::Layout::FormattingContext::Geometry::floatingReplacedWidthAndMargin): Deleted.
1027 (WebCore::Layout::FormattingContext::Geometry::outOfFlowVerticalGeometry): Deleted.
1028 (WebCore::Layout::FormattingContext::Geometry::floatingHeightAndMargin): Deleted.
1029 (WebCore::Layout::FormattingContext::Geometry::inlineReplacedHeightAndMargin): Deleted.
1030 (WebCore::Layout::FormattingContext::Geometry::inlineReplacedWidthAndMargin): Deleted.
1031 (WebCore::Layout::FormattingContext::Geometry::inFlowPositionedPositionOffset): Deleted.
1032 (WebCore::Layout::FormattingContext::Geometry::computedBorder): Deleted.
1033 (WebCore::Layout::FormattingContext::Geometry::computedPadding): Deleted.
1034 (WebCore::Layout::FormattingContext::Geometry::computedHorizontalMargin): Deleted.
1035 (WebCore::Layout::FormattingContext::Geometry::computedVerticalMargin): Deleted.
1036 (WebCore::Layout::FormattingContext::Geometry::constrainByMinMaxWidth): Deleted.
1037 * layout/FormattingContextQuirks.cpp:
1038 (WebCore::Layout::FormattingContext::Quirks::heightValueOfNearestContainingBlockWithFixedHeight):
1039 * layout/blockformatting/BlockFormattingContext.cpp:
1040 (WebCore::Layout::BlockFormattingContext::layout):
1041 (WebCore::Layout::BlockFormattingContext::layoutFormattingContextRoot):
1042 (WebCore::Layout::BlockFormattingContext::placeInFlowPositionedChildren):
1043 (WebCore::Layout::BlockFormattingContext::computeStaticVerticalPosition):
1044 (WebCore::Layout::BlockFormattingContext::computeStaticHorizontalPosition):
1045 (WebCore::Layout::BlockFormattingContext::computeStaticPosition):
1046 (WebCore::Layout::BlockFormattingContext::computeEstimatedVerticalPosition):
1047 (WebCore::Layout::BlockFormattingContext::computeEstimatedVerticalPositionForAncestors):
1048 (WebCore::Layout::BlockFormattingContext::computeEstimatedVerticalPositionForFormattingRoot):
1049 (WebCore::Layout::BlockFormattingContext::computeEstimatedVerticalPositionForFloatClear):
1050 (WebCore::Layout::BlockFormattingContext::computeFloatingPosition):
1051 (WebCore::Layout::BlockFormattingContext::computePositionToAvoidFloats):
1052 (WebCore::Layout::BlockFormattingContext::computeWidthAndMargin):
1053 (WebCore::Layout::BlockFormattingContext::computeHeightAndMargin):
1054 (WebCore::Layout::BlockFormattingContext::computedIntrinsicWidthConstraints):
1055 (WebCore::Layout::BlockFormattingContext::verticalPositionWithMargin const):
1056 (WebCore::Layout::BlockFormattingContext::setEstimatedMarginBefore):
1057 (WebCore::Layout::BlockFormattingContext::layout const): Deleted.
1058 (WebCore::Layout::BlockFormattingContext::layoutFormattingContextRoot const): Deleted.
1059 (WebCore::Layout::BlockFormattingContext::placeInFlowPositionedChildren const): Deleted.
1060 (WebCore::Layout::BlockFormattingContext::computeStaticVerticalPosition const): Deleted.
1061 (WebCore::Layout::BlockFormattingContext::computeStaticHorizontalPosition const): Deleted.
1062 (WebCore::Layout::BlockFormattingContext::computeStaticPosition const): Deleted.
1063 (WebCore::Layout::BlockFormattingContext::computeEstimatedVerticalPosition const): Deleted.
1064 (WebCore::Layout::BlockFormattingContext::computeEstimatedVerticalPositionForAncestors const): Deleted.
1065 (WebCore::Layout::BlockFormattingContext::computeEstimatedVerticalPositionForFormattingRoot const): Deleted.
1066 (WebCore::Layout::BlockFormattingContext::computeEstimatedVerticalPositionForFloatClear const): Deleted.
1067 (WebCore::Layout::BlockFormattingContext::computeFloatingPosition const): Deleted.
1068 (WebCore::Layout::BlockFormattingContext::computePositionToAvoidFloats const): Deleted.
1069 (WebCore::Layout::BlockFormattingContext::computeWidthAndMargin const): Deleted.
1070 (WebCore::Layout::BlockFormattingContext::computeHeightAndMargin const): Deleted.
1071 (WebCore::Layout::BlockFormattingContext::computedIntrinsicWidthConstraints const): Deleted.
1072 (WebCore::Layout::BlockFormattingContext::setEstimatedMarginBefore const): Deleted.
1073 * layout/blockformatting/BlockFormattingContext.h:
1074 (WebCore::Layout::BlockFormattingContext::computeWidthAndMargin):
1075 (WebCore::Layout::BlockFormattingContext::geometry const):
1076 (WebCore::Layout::BlockFormattingContext::MarginCollapse::layoutState):
1077 (WebCore::Layout::BlockFormattingContext::MarginCollapse::layoutState const):
1078 (WebCore::Layout::BlockFormattingContext::marginCollapse const):
1079 (WebCore::Layout::BlockFormattingContext::quirks const):
1080 (WebCore::Layout::BlockFormattingContext::removeEstimatedMarginBefore):
1081 (WebCore::Layout::BlockFormattingContext::Geometry::Geometry):
1082 (WebCore::Layout::BlockFormattingContext::Quirks::Quirks):
1083 (WebCore::Layout::BlockFormattingContext::MarginCollapse::MarginCollapse):
1084 (WebCore::Layout::BlockFormattingContext::removeEstimatedMarginBefore const): Deleted.
1085 * layout/blockformatting/BlockFormattingContextGeometry.cpp:
1086 (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedHeightAndMargin):
1087 (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedWidthAndMargin const):
1088 (WebCore::Layout::BlockFormattingContext::Geometry::inFlowReplacedWidthAndMargin const):
1089 (WebCore::Layout::BlockFormattingContext::Geometry::staticVerticalPosition const):
1090 (WebCore::Layout::BlockFormattingContext::Geometry::staticHorizontalPosition const):
1091 (WebCore::Layout::BlockFormattingContext::Geometry::staticPosition const):
1092 (WebCore::Layout::BlockFormattingContext::Geometry::inFlowHeightAndMargin):
1093 (WebCore::Layout::BlockFormattingContext::Geometry::inFlowWidthAndMargin):
1094 (WebCore::Layout::BlockFormattingContext::Geometry::intrinsicWidthConstraints):
1095 (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedWidthAndMargin): Deleted.
1096 (WebCore::Layout::BlockFormattingContext::Geometry::inFlowReplacedWidthAndMargin): Deleted.
1097 (WebCore::Layout::BlockFormattingContext::Geometry::staticVerticalPosition): Deleted.
1098 (WebCore::Layout::BlockFormattingContext::Geometry::staticHorizontalPosition): Deleted.
1099 (WebCore::Layout::BlockFormattingContext::Geometry::staticPosition): Deleted.
1100 * layout/blockformatting/BlockFormattingContextQuirks.cpp:
1101 (WebCore::Layout::BlockFormattingContext::Quirks::needsStretching const):
1102 (WebCore::Layout::BlockFormattingContext::Quirks::stretchedInFlowHeight):
1103 (WebCore::Layout::BlockFormattingContext::Quirks::shouldIgnoreCollapsedQuirkMargin const):
1104 (WebCore::Layout::BlockFormattingContext::Quirks::needsStretching): Deleted.
1105 (WebCore::Layout::BlockFormattingContext::Quirks::shouldIgnoreCollapsedQuirkMargin): Deleted.
1106 * layout/blockformatting/BlockMarginCollapse.cpp:
1107 (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginBeforeCollapsesWithParentMarginAfter const):
1108 (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginBeforeCollapsesWithParentMarginBefore const):
1109 (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginBeforeCollapsesWithPreviousSiblingMarginAfter const):
1110 (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginBeforeCollapsesWithFirstInFlowChildMarginBefore const):
1111 (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginAfterCollapsesWithSiblingMarginBeforeWithClearance const):
1112 (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginAfterCollapsesWithParentMarginBefore const):
1113 (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginAfterCollapsesWithParentMarginAfter const):
1114 (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginAfterCollapsesWithLastInFlowChildMarginAfter const):
1115 (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginAfterCollapsesWithNextSiblingMarginBefore const):
1116 (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginsCollapseThrough const):
1117 (WebCore::Layout::BlockFormattingContext::MarginCollapse::updateMarginAfterForPreviousSibling const):
1118 (WebCore::Layout::BlockFormattingContext::MarginCollapse::positiveNegativeValues):
1119 (WebCore::Layout::BlockFormattingContext::MarginCollapse::positiveNegativeMarginBefore):
1120 (WebCore::Layout::BlockFormattingContext::MarginCollapse::positiveNegativeMarginAfter):
1121 (WebCore::Layout::BlockFormattingContext::MarginCollapse::estimatedMarginBefore):
1122 (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginBeforeIgnoringCollapsingThrough):
1123 (WebCore::Layout::BlockFormattingContext::MarginCollapse::updatePositiveNegativeMarginValues):
1124 (WebCore::Layout::BlockFormattingContext::MarginCollapse::collapsedVerticalValues):
1125 (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginBeforeCollapsesWithParentMarginAfter): Deleted.
1126 (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginBeforeCollapsesWithParentMarginBefore): Deleted.
1127 (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginBeforeCollapsesWithPreviousSiblingMarginAfter): Deleted.
1128 (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginBeforeCollapsesWithFirstInFlowChildMarginBefore): Deleted.
1129 (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginAfterCollapsesWithSiblingMarginBeforeWithClearance): Deleted.
1130 (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginAfterCollapsesWithParentMarginBefore): Deleted.
1131 (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginAfterCollapsesWithParentMarginAfter): Deleted.
1132 (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginAfterCollapsesWithLastInFlowChildMarginAfter): Deleted.
1133 (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginAfterCollapsesWithNextSiblingMarginBefore): Deleted.
1134 (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginsCollapseThrough): Deleted.
1135 (WebCore::Layout::BlockFormattingContext::MarginCollapse::updateMarginAfterForPreviousSibling): Deleted.
1136 * layout/inlineformatting/InlineFormattingContext.cpp:
1137 (WebCore::Layout::InlineFormattingContext::layout):
1138 (WebCore::Layout::InlineFormattingContext::computedIntrinsicWidthConstraints):
1139 (WebCore::Layout::InlineFormattingContext::initializeMarginBorderAndPaddingForGenericInlineBox):
1140 (WebCore::Layout::InlineFormattingContext::computeMarginBorderAndPaddingForInlineContainer):
1141 (WebCore::Layout::InlineFormattingContext::computeIntrinsicWidthForFormattingRoot):
1142 (WebCore::Layout::InlineFormattingContext::computeHorizontalMargin):
1143 (WebCore::Layout::InlineFormattingContext::computeWidthAndMargin):
1144 (WebCore::Layout::InlineFormattingContext::computeHeightAndMargin):
1145 (WebCore::Layout::InlineFormattingContext::layoutFormattingContextRoot):
1146 (WebCore::Layout::InlineFormattingContext::computeWidthAndHeightForReplacedInlineBox):
1147 (WebCore::Layout::InlineFormattingContext::layout const): Deleted.
1148 (WebCore::Layout::InlineFormattingContext::computedIntrinsicWidthConstraints const): Deleted.
1149 (WebCore::Layout::InlineFormattingContext::initializeMarginBorderAndPaddingForGenericInlineBox const): Deleted.
1150 (WebCore::Layout::InlineFormattingContext::computeMarginBorderAndPaddingForInlineContainer const): Deleted.
1151 (WebCore::Layout::InlineFormattingContext::computeIntrinsicWidthForFormattingRoot const): Deleted.
1152 (WebCore::Layout::InlineFormattingContext::computeHorizontalMargin const): Deleted.
1153 (WebCore::Layout::InlineFormattingContext::computeWidthAndMargin const): Deleted.
1154 (WebCore::Layout::InlineFormattingContext::computeHeightAndMargin const): Deleted.
1155 (WebCore::Layout::InlineFormattingContext::layoutFormattingContextRoot const): Deleted.
1156 (WebCore::Layout::InlineFormattingContext::computeWidthAndHeightForReplacedInlineBox const): Deleted.
1157 * layout/inlineformatting/InlineFormattingContext.h:
1158 (WebCore::Layout::InlineFormattingContext::quirks const):
1159 (WebCore::Layout::InlineFormattingContext::geometry const):
1160 (WebCore::Layout::InlineFormattingContext::Geometry::Geometry):
1161 (WebCore::Layout::InlineFormattingContext::Quirks::Quirks):
1162 * layout/inlineformatting/InlineFormattingContextGeometry.cpp:
1163 (WebCore::Layout::InlineFormattingContext::Geometry::inlineBlockWidthAndMargin):
1164 (WebCore::Layout::InlineFormattingContext::Geometry::inlineBlockHeightAndMargin const):
1165 (WebCore::Layout::InlineFormattingContext::Geometry::inlineBlockHeightAndMargin): Deleted.
1166 * layout/inlineformatting/InlineFormattingContextLineLayout.cpp:
1167 (WebCore::Layout::LineLayout::LineLayout):
1168 (WebCore::Layout::InlineFormattingContext::InlineLayout::layout const):
1169 (WebCore::Layout::InlineFormattingContext::InlineLayout::computedIntrinsicWidth const):
1170 (WebCore::Layout::InlineFormattingContext::InlineLayout::createDisplayRuns const):
1171 * layout/inlineformatting/InlineFormattingContextQuirks.cpp:
1172 (WebCore::Layout::InlineFormattingContext::Quirks::lineDescentNeedsCollapsing const):
1173 (WebCore::Layout::InlineFormattingContext::Quirks::lineHeightConstraints const):
1174 (WebCore::Layout::InlineFormattingContext::Quirks::lineDescentNeedsCollapsing): Deleted.
1175 (WebCore::Layout::InlineFormattingContext::Quirks::lineHeightConstraints): Deleted.
1176 * layout/inlineformatting/InlineLine.cpp:
1177 (WebCore::Layout::Line::Line):
1178 (WebCore::Layout::Line::close):
1179 * layout/inlineformatting/InlineLine.h:
1180 * layout/tableformatting/TableFormattingContext.cpp:
1181 (WebCore::Layout::TableFormattingContext::layout):
1182 (WebCore::Layout::TableFormattingContext::computedIntrinsicWidthConstraints):
1183 (WebCore::Layout::TableFormattingContext::ensureTableGrid):
1184 (WebCore::Layout::TableFormattingContext::computePreferredWidthForColumns):
1185 (WebCore::Layout::TableFormattingContext::computedTableWidth):
1186 (WebCore::Layout::TableFormattingContext::distributeAvailableWidth):
1187 (WebCore::Layout::TableFormattingContext::layout const): Deleted.
1188 (WebCore::Layout::TableFormattingContext::computedIntrinsicWidthConstraints const): Deleted.
1189 (WebCore::Layout::TableFormattingContext::ensureTableGrid const): Deleted.
1190 (WebCore::Layout::TableFormattingContext::computePreferredWidthForColumns const): Deleted.
1191 (WebCore::Layout::TableFormattingContext::computedTableWidth const): Deleted.
1192 (WebCore::Layout::TableFormattingContext::distributeAvailableWidth const): Deleted.
1193 * layout/tableformatting/TableFormattingContext.h:
1194 (WebCore::Layout::TableFormattingContext::geometry const):
1195 (WebCore::Layout::TableFormattingContext::Geometry::Geometry):
1196 * layout/tableformatting/TableFormattingContextGeometry.cpp:
1197 (WebCore::Layout::TableFormattingContext::Geometry::tableCellHeightAndMargin const):
1198 (WebCore::Layout::TableFormattingContext::Geometry::tableCellHeightAndMargin): Deleted.
1200 2019-08-30 Keith Rollin <krollin@apple.com>
1202 Remove AppKitCompatibilityDeclarations.h
1203 https://bugs.webkit.org/show_bug.cgi?id=201283
1204 <rdar://problem/54822042>
1206 Reviewed by Alexey Proskuryakov.
1208 The two copies of these files -- on in WTF, one in MiniBrowser -- are
1209 empty and can be removed.
1211 No new tests -- no new or changed functionality.
1215 2019-08-30 Alicia Boya García <aboya@igalia.com>
1217 [MSE][GStreamer] Gracefully fail on invalid non-first initialization segment
1218 https://bugs.webkit.org/show_bug.cgi?id=201322
1220 Reviewed by Xabier Rodriguez-Calvar.
1222 In normal operation of AppendPipeline, except during tear down,
1223 qtdemux never removes a pad. Even if a new initialization segment is
1224 appended, the pad is reused.
1226 There is an exception though: when the new initialization segment has
1227 an incompatible set of tracks. This is invalid under the MSE spec and
1228 should produce an error, but in this case this was making an assertion
1229 fail -- in particular by sending an EOS to the to-be-removed pad, which
1230 AppendPipeline doesn't expect.
1232 This patch changes the assertion with graceful error handling for that
1235 Fixes media/media-source/media-source-seek-detach-crash.html
1237 * platform/graphics/gstreamer/mse/AppendPipeline.cpp:
1238 (WebCore::AppendPipeline::AppendPipeline):
1239 (WebCore::AppendPipeline::handleErrorConditionFromStreamingThread):
1240 (WebCore::AppendPipeline::handleErrorSyncMessage):
1241 * platform/graphics/gstreamer/mse/AppendPipeline.h:
1243 2019-08-30 Charlie Turner <cturner@igalia.com>
1245 [GStreamer] Do not ref the player count from background threads.
1246 https://bugs.webkit.org/show_bug.cgi?id=201222
1248 Reviewed by Xabier Rodriguez-Calvar.
1250 Test: imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-retrieve-persistent-license.https.html
1252 In the sync-message handler, a ref() was being taken waiting for a
1253 CDM instance to be attached. This hits asserts since you are not
1254 allowed to ref() an object created on the main thread
1255 (BasePlayer) on a background thread.
1257 The protection condition was overly scoped, tidied up the locking
1258 and made it more granular. To avoid needing to hold a ref() in the
1259 background thread, use instead a semaphore to signal when a CDM
1260 instance is attached, or the player has been destroyed.
1262 Also remove an erroneous safe-guard, the operator= in
1263 isCDMInstanceAvailable will ref() the CDMInstance for us. This use
1264 of holding a reference to CDMInstance in the decryptors is not
1265 thread-safe, and now we have a problem since there's no clean way
1266 to communicate with CDMInstance from background threads without
1267 being thread unsafe. For ClearKey and Widevine, a thread safe
1268 ProxyCDM needs to be designed and passed to background
1269 threads (upcoming patch).
1271 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
1272 (WebCore::MediaPlayerPrivateGStreamerBase::~MediaPlayerPrivateGStreamerBase):
1273 (WebCore::MediaPlayerPrivateGStreamerBase::handleSyncMessage):
1274 (WebCore::MediaPlayerPrivateGStreamerBase::cdmInstanceAttached):
1275 (WebCore::MediaPlayerPrivateGStreamerBase::cdmInstanceDetached):
1276 (WebCore::MediaPlayerPrivateGStreamerBase::handleProtectionEvent):
1277 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
1278 * platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.cpp:
1279 (isCDMInstanceAvailable):
1281 2019-08-30 Sihui Liu <sihui_liu@apple.com>
1283 [wk2] LayoutTest imported/w3c/web-platform-tests/IndexedDB/fire-error-event-exception.html is a flaky failure
1284 https://bugs.webkit.org/show_bug.cgi?id=169621
1286 Reviewed by Alex Christensen.
1288 Event handlers of IDB objects were called in unexpected order because of race, which made the console messages
1289 in the tests come out of order.
1290 Usually, an operation/request result is handled as follows:
1291 1. IDBServer sends IDBResultData to IDBClient.
1292 2. IDBClient receives IDBResultData and finishes a IDBTransaction operation with that result.
1293 3. IDBTransaction schedules operation completed timer.
1294 4. (Some time later) Timer fires, and IDBTransaction completes a request with the result and dispatches event.
1295 5. (Some time later) IDBTransaction is notified that event is dispatched. If there are other results received,
1296 IDBTransaction schedules operation completed timer.
1298 In previous implementation, if the IDBClient received a second IDBResultData for the same IDBTransaction between
1299 step 3 and step 4, it would not schedule timer because timer was still active; if it received the result between
1300 step 4 and step 5, it would schedule timer again.
1302 Consider a flow like this:
1303 result1 of transaction1 received, timer of transaction1 scheduled
1304 result2 of transaction2 received, timer of transaction2 scheduled
1305 result3 of transaction1 is received, timer of transaction1 active so no scheduling
1306 timer of transaction1 fired, event1 to be dispatched to request1
1307 timer of transaction2 fired, event2 to be dispatched to request2
1308 result4 of transaction2 received, timer of transaction2 scheduled
1309 event1 dispatched, timer of transaction1 scheduled (for handling result3)
1310 event2 dispatched, timer of transaction2 active so no scheduling
1311 timer of transaction2 fired, event3 to dispatch to request4
1312 timer of transaction1 fired, event4 to dispatch to request3
1314 request4 would get event before request3, though result3 was received before result4. We should stop scheduling
1315 event if an IDBTransaction is in between step 4 and 5, which means its m_currentlyCompletingRequest is not null.
1317 * Modules/indexeddb/IDBTransaction.cpp:
1318 (WebCore::IDBTransaction::operationCompletedOnServer):
1320 2019-08-29 Devin Rousso <drousso@apple.com>
1322 Web Inspector: Debugger: async event listener stack traces should be available in Workers
1323 https://bugs.webkit.org/show_bug.cgi?id=200903
1325 Reviewed by Joseph Pecoraro.
1327 Tests: inspector/worker/dom-debugger-event-interval-breakpoints.html
1328 inspector/worker/dom-debugger-event-listener-breakpoints.html
1329 inspector/worker/dom-debugger-event-timeout-breakpoints.html
1330 inspector/worker/dom-debugger-url-breakpoints.html
1332 * inspector/agents/WebDebuggerAgent.h:
1333 * inspector/agents/WebDebuggerAgent.cpp:
1334 (WebCore::WebDebuggerAgent::enabled const): Added.
1335 (WebCore::WebDebuggerAgent::enable):
1336 (WebCore::WebDebuggerAgent::disable):
1337 (WebCore::WebDebuggerAgent::didAddEventListener): Added.
1338 (WebCore::WebDebuggerAgent::willRemoveEventListener): Added.
1339 (WebCore::WebDebuggerAgent::willHandleEvent): Added.
1340 (WebCore::WebDebuggerAgent::didPostMessage): Added.
1341 (WebCore::WebDebuggerAgent::didFailPostMessage): Added.
1342 (WebCore::WebDebuggerAgent::willDispatchPostMessage): Added.
1343 (WebCore::WebDebuggerAgent::didDispatchPostMessage): Added.
1344 (WebCore::WebDebuggerAgent::didClearAsyncStackTraceData): Added.
1345 * inspector/agents/page/PageDebuggerAgent.h:
1346 * inspector/agents/page/PageDebuggerAgent.cpp:
1347 (WebCore::PageDebuggerAgent::enabled const): Added.
1348 (WebCore::PageDebuggerAgent::enable):
1349 (WebCore::PageDebuggerAgent::disable):
1350 (WebCore::PageDebuggerAgent::didClearAsyncStackTraceData): Deleted.
1351 (WebCore::PageDebuggerAgent::didAddEventListener): Deleted.
1352 (WebCore::PageDebuggerAgent::willRemoveEventListener): Deleted.
1353 (WebCore::PageDebuggerAgent::willHandleEvent): Deleted.
1354 (WebCore::PageDebuggerAgent::didPostMessage): Deleted.
1355 (WebCore::PageDebuggerAgent::didFailPostMessage): Deleted.
1356 (WebCore::PageDebuggerAgent::willDispatchPostMessage): Deleted.
1357 (WebCore::PageDebuggerAgent::didDispatchPostMessage): Deleted.
1358 Move various `InspectorInstrumentation` calls from `PageDebuggerAgent` to `WebDebuggerAgent`
1359 so that `WorkerDebuggerAgent` also inherits them.
1361 * inspector/InstrumentingAgents.h:
1362 (WebCore::InstrumentingAgents::webDebuggerAgent const): Added.
1363 (WebCore::InstrumentingAgents::setWebDebuggerAgent): Added.
1364 (WebCore::InstrumentingAgents::inspectorDebuggerAgent const): Deleted.
1365 (WebCore::InstrumentingAgents::setInspectorDebuggerAgent): Deleted.
1366 * inspector/InstrumentingAgents.cpp:
1367 (WebCore::InstrumentingAgents::reset):
1368 * inspector/agents/InspectorTimelineAgent.cpp:
1369 (WebCore::InspectorTimelineAgent::mainFrameStartedLoading):
1370 (WebCore::InspectorTimelineAgent::startProgrammaticCapture):
1371 (WebCore::InspectorTimelineAgent::stopProgrammaticCapture):
1372 * inspector/InspectorInstrumentation.cpp:
1373 (WebCore::InspectorInstrumentation::didClearWindowObjectInWorldImpl):
1374 (WebCore::InspectorInstrumentation::isDebuggerPausedImpl):
1375 (WebCore::InspectorInstrumentation::didInstallTimerImpl):
1376 (WebCore::InspectorInstrumentation::didRemoveTimerImpl):
1377 (WebCore::InspectorInstrumentation::didAddEventListenerImpl):
1378 (WebCore::InspectorInstrumentation::willRemoveEventListenerImpl):
1379 (WebCore::InspectorInstrumentation::didPostMessageImpl):
1380 (WebCore::InspectorInstrumentation::didFailPostMessageImpl):
1381 (WebCore::InspectorInstrumentation::willDispatchPostMessageImpl):
1382 (WebCore::InspectorInstrumentation::didDispatchPostMessageImpl):
1383 (WebCore::InspectorInstrumentation::willHandleEventImpl):
1384 (WebCore::InspectorInstrumentation::didHandleEventImpl):
1385 (WebCore::InspectorInstrumentation::willFireTimerImpl):
1386 (WebCore::InspectorInstrumentation::didFireTimerImpl):
1387 (WebCore::InspectorInstrumentation::scriptExecutionBlockedByCSPImpl):
1388 (WebCore::InspectorInstrumentation::didCommitLoadImpl):
1389 (WebCore::InspectorInstrumentation::frameStartedLoadingImpl):
1390 (WebCore::InspectorInstrumentation::frameStoppedLoadingImpl):
1391 (WebCore::InspectorInstrumentation::addMessageToConsoleImpl):
1392 (WebCore::InspectorInstrumentation::didRequestAnimationFrameImpl):
1393 (WebCore::InspectorInstrumentation::didCancelAnimationFrameImpl):
1394 (WebCore::InspectorInstrumentation::willFireAnimationFrameImpl):
1395 (WebCore::InspectorInstrumentation::didFireAnimationFrameImpl):
1396 Replace `inspectorDebuggerAgent` with `webDebuggerAgent` so the right instrumentation hooks
1399 2019-08-29 Chris Dumez <cdumez@apple.com>
1401 Add "IsolatedCopy" in the name of String getters that call isolatedCopy() on the string
1402 https://bugs.webkit.org/show_bug.cgi?id=201318
1404 Reviewed by Alex Christensen.
1406 Add "IsolatedCopy" in the name of String getters that call isolatedCopy() on the string, for clarity.
1408 * Modules/indexeddb/server/IDBServer.cpp:
1409 (WebCore::IDBServer::IDBServer::createBackingStore):
1410 (WebCore::IDBServer::IDBServer::performGetAllDatabaseNames):
1411 (WebCore::IDBServer::IDBServer::removeDatabasesModifiedSinceForVersion):
1412 (WebCore::IDBServer::IDBServer::performCloseAndDeleteDatabasesModifiedSince):
1413 (WebCore::IDBServer::IDBServer::removeDatabasesWithOriginsForVersion):
1414 (WebCore::IDBServer::IDBServer::performCloseAndDeleteDatabasesForOrigins):
1415 (WebCore::IDBServer::IDBServer::computeSpaceUsedForOrigin):
1416 (WebCore::IDBServer::IDBServer::upgradeFilesIfNecessary):
1417 * Modules/indexeddb/server/IDBServer.h:
1418 (WebCore::IDBServer::IDBServer::databaseDirectoryPathIsolatedCopy const):
1419 * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
1420 (WebCore::IDBServer::SQLiteIDBBackingStore::fullDatabaseDirectoryWithUpgrade):
1421 (WebCore::IDBServer::SQLiteIDBBackingStore::databasesSizeForOrigin const):
1422 (WebCore::IDBServer::SQLiteIDBBackingStore::deleteBackingStore):
1423 * Modules/indexeddb/server/SQLiteIDBBackingStore.h:
1424 (WebCore::IDBServer::SQLiteIDBBackingStore::databaseRootDirectoryIsolatedCopy const):
1425 * Modules/webdatabase/Database.cpp:
1426 (WebCore::Database::markAsDeletedAndClose):
1427 (WebCore::Database::stringIdentifierIsolatedCopy const):
1428 (WebCore::Database::displayNameIsolatedCopy const):
1429 (WebCore::Database::expectedVersionIsolatedCopy const):
1430 (WebCore::Database::fileNameIsolatedCopy const):
1431 (WebCore::Database::details const):
1432 (WebCore::Database::didCommitWriteTransaction):
1433 (WebCore::Database::didExceedQuota):
1434 * Modules/webdatabase/Database.h:
1435 * Modules/webdatabase/DatabaseTracker.cpp:
1436 (WebCore::DatabaseTracker::maximumSize):
1437 (WebCore::DatabaseTracker::doneCreatingDatabase):
1438 (WebCore::DatabaseTracker::addOpenDatabase):
1439 (WebCore::DatabaseTracker::removeOpenDatabase):
1440 * Modules/webdatabase/SQLError.h:
1441 (WebCore::SQLError::messageIsolatedCopy const):
1442 * Modules/webdatabase/SQLError.idl:
1443 * Modules/webdatabase/SQLTransaction.cpp:
1444 (WebCore::SQLTransaction::openTransactionAndPreflight):
1445 * workers/service/server/RegistrationDatabase.cpp:
1446 (WebCore::RegistrationDatabase::openSQLiteDatabase):
1447 (WebCore::RegistrationDatabase::clearAll):
1448 * workers/service/server/RegistrationDatabase.h:
1449 (WebCore::RegistrationDatabase::databaseDirectoryIsolatedCopy const):
1451 2019-08-29 Keith Rollin <krollin@apple.com>
1453 Update .xcconfig symbols to reflect the current set of past and future product versions.
1454 https://bugs.webkit.org/show_bug.cgi?id=200720
1455 <rdar://problem/54305032>
1457 Reviewed by Alex Christensen.
1459 Remove version symbols related to old OS's we no longer support,
1460 ensure that version symbols are defined for OS's we do support.
1462 No new tests -- no new or changed functionality.
1464 * Configurations/Base.xcconfig:
1465 * Configurations/DebugRelease.xcconfig:
1466 * Configurations/Version.xcconfig:
1468 2019-08-29 Timothy Hatcher <timothy@apple.com>
1470 Copying and pasting two paragraphs with a newline between them results in stray paragraph with newline inside.
1471 https://bugs.webkit.org/show_bug.cgi?id=201306
1473 Reviewed by Wenson Hsieh.
1475 Test: editing/pasteboard/paste-without-nesting.html
1477 * editing/ReplaceSelectionCommand.cpp:
1478 (WebCore::ReplaceSelectionCommand::moveNodeOutOfAncestor): Consider the ancestor node safe to remove
1479 if there is no rendered text inside, not just if there are any child nodes.
1481 2019-08-29 Devin Rousso <drousso@apple.com>
1483 Web Inspector: DOMDebugger: support event breakpoints in Worker contexts
1484 https://bugs.webkit.org/show_bug.cgi?id=200651
1486 Reviewed by Joseph Pecoraro.
1488 Tests: inspector/worker/dom-debugger-dom-breakpoints.html
1489 inspector/worker/dom-debugger-event-animation-frame-breakpoints.html
1490 inspector/worker/dom-debugger-event-interval-breakpoints.html
1491 inspector/worker/dom-debugger-event-listener-breakpoints.html
1492 inspector/worker/dom-debugger-event-timeout-breakpoints.html
1493 inspector/worker/dom-debugger-url-breakpoints.html
1495 * inspector/agents/InspectorDOMDebuggerAgent.h:
1496 * inspector/agents/InspectorDOMDebuggerAgent.cpp:
1497 (WebCore::InspectorDOMDebuggerAgent::InspectorDOMDebuggerAgent):
1498 (WebCore::InspectorDOMDebuggerAgent::enabled const):
1499 (WebCore::InspectorDOMDebuggerAgent::enable):
1500 (WebCore::InspectorDOMDebuggerAgent::disable):
1501 (WebCore::InspectorDOMDebuggerAgent::debuggerWasEnabled):
1502 (WebCore::InspectorDOMDebuggerAgent::debuggerWasDisabled):
1503 (WebCore::InspectorDOMDebuggerAgent::setEventBreakpoint):
1504 (WebCore::InspectorDOMDebuggerAgent::removeEventBreakpoint):
1505 (WebCore::InspectorDOMDebuggerAgent::~InspectorDOMDebuggerAgent): Deleted.
1506 (WebCore::InspectorDOMDebuggerAgent::frameDocumentUpdated): Deleted.
1507 (WebCore::InspectorDOMDebuggerAgent::willInvalidateStyleAttr): Deleted.
1508 (WebCore::InspectorDOMDebuggerAgent::didInsertDOMNode): Deleted.
1509 (WebCore::InspectorDOMDebuggerAgent::didRemoveDOMNode): Deleted.
1510 (WebCore::domTypeForName): Deleted.
1511 (WebCore::domTypeName): Deleted.
1512 (WebCore::InspectorDOMDebuggerAgent::setDOMBreakpoint): Deleted.
1513 (WebCore::InspectorDOMDebuggerAgent::removeDOMBreakpoint): Deleted.
1514 (WebCore::InspectorDOMDebuggerAgent::willInsertDOMNode): Deleted.
1515 (WebCore::InspectorDOMDebuggerAgent::willRemoveDOMNode): Deleted.
1516 (WebCore::InspectorDOMDebuggerAgent::willModifyDOMAttr): Deleted.
1517 (WebCore::InspectorDOMDebuggerAgent::descriptionForDOMEvent): Deleted.
1518 (WebCore::InspectorDOMDebuggerAgent::hasBreakpoint): Deleted.
1519 (WebCore::InspectorDOMDebuggerAgent::updateSubtreeBreakpoints): Deleted.
1520 (WebCore::InspectorDOMDebuggerAgent::willFireAnimationFrame): Deleted.
1521 * inspector/agents/page/PageDOMDebuggerAgent.h: Added.
1522 * inspector/agents/page/PageDOMDebuggerAgent.cpp: Added.
1523 (WebCore::domTypeForName):
1524 (WebCore::domTypeName):
1525 (WebCore::PageDOMDebuggerAgent::PageDOMDebuggerAgent):
1526 (WebCore::PageDOMDebuggerAgent::enabled const):
1527 (WebCore::PageDOMDebuggerAgent::enable):
1528 (WebCore::PageDOMDebuggerAgent::disable):
1529 (WebCore::PageDOMDebuggerAgent::setDOMBreakpoint):
1530 (WebCore::PageDOMDebuggerAgent::removeDOMBreakpoint):
1531 (WebCore::PageDOMDebuggerAgent::frameDocumentUpdated):
1532 (WebCore::PageDOMDebuggerAgent::willInsertDOMNode):
1533 (WebCore::PageDOMDebuggerAgent::didInsertDOMNode):
1534 (WebCore::PageDOMDebuggerAgent::willRemoveDOMNode):
1535 (WebCore::PageDOMDebuggerAgent::didRemoveDOMNode):
1536 (WebCore::PageDOMDebuggerAgent::willModifyDOMAttr):
1537 (WebCore::PageDOMDebuggerAgent::willFireAnimationFrame):
1538 (WebCore::PageDOMDebuggerAgent::willInvalidateStyleAttr):
1539 (WebCore::PageDOMDebuggerAgent::setAnimationFrameBreakpoint):
1540 (WebCore::PageDOMDebuggerAgent::descriptionForDOMEvent):
1541 (WebCore::PageDOMDebuggerAgent::updateSubtreeBreakpoints):
1542 (WebCore::PageDOMDebuggerAgent::hasBreakpoint):
1543 * inspector/agents/worker/WorkerDOMDebuggerAgent.h: Added.
1544 * inspector/agents/worker/WorkerDOMDebuggerAgent.cpp: Added.
1545 (WebCore::WorkerDOMDebuggerAgent::WorkerDOMDebuggerAgent):
1546 (WebCore::WorkerDOMDebuggerAgent::setDOMBreakpoint):
1547 (WebCore::WorkerDOMDebuggerAgent::removeDOMBreakpoint):
1548 (WebCore::WorkerDOMDebuggerAgent::setAnimationFrameBreakpoint):
1549 Split the `InspectorDOMDebuggerAgent` into two subclasses depending on the inspected target
1550 type, as certain `DOMDebugger` commands don't make sense for a `Worker` context:
1551 - DOM breakpoints, as there is no DOM in a `Worker` context
1552 - animation frame event breakpoints, as there is no `requestAnimationFrame` function
1554 * inspector/InspectorController.cpp:
1555 (WebCore::InspectorController::createLazyAgents):
1556 * inspector/WorkerInspectorController.cpp:
1557 (WebCore::WorkerInspectorController::createLazyAgents):
1559 * inspector/InstrumentingAgents.h:
1560 (WebCore::InstrumentingAgents::pageDOMDebuggerAgent const): Added.
1561 (WebCore::InstrumentingAgents::setPageDOMDebuggerAgent): Added.
1562 * inspector/InstrumentingAgents.cpp:
1563 (WebCore::InstrumentingAgents::reset):
1565 * inspector/InspectorInstrumentation.cpp:
1566 (WebCore::InspectorInstrumentation::willInsertDOMNodeImpl):
1567 (WebCore::InspectorInstrumentation::didInsertDOMNodeImpl):
1568 (WebCore::InspectorInstrumentation::willRemoveDOMNodeImpl):
1569 (WebCore::InspectorInstrumentation::didRemoveDOMNodeImpl):
1570 (WebCore::InspectorInstrumentation::willModifyDOMAttrImpl):
1571 (WebCore::InspectorInstrumentation::willInvalidateStyleAttrImpl):
1572 (WebCore::InspectorInstrumentation::frameDocumentUpdatedImpl):
1573 (WebCore::InspectorInstrumentation::willFireAnimationFrameImpl):
1576 * WebCore.xcodeproj/project.pbxproj:
1578 2019-08-29 Keith Rollin <krollin@apple.com>
1580 Remove CCBigNum fallback code
1581 https://bugs.webkit.org/show_bug.cgi?id=201250
1582 <rdar://problem/54814330>
1584 Reviewed by Jiewen Tan.
1586 Bug 184637 added support for CCRSAGetCRTComponents, falling back to
1587 the older CCBigNum code if CCRSAGetCRTComponents was not available. We
1588 now only support OS's that have CCRSAGetCRTComponents so remove the
1591 No new tests -- no new or changed functionality.
1593 * crypto/CommonCryptoUtilities.cpp:
1594 (WebCore::CCBigNum::CCBigNum): Deleted.
1595 (WebCore::CCBigNum::~CCBigNum): Deleted.
1596 (WebCore::CCBigNum::operator=): Deleted.
1597 (WebCore::CCBigNum::data const): Deleted.
1598 (WebCore::CCBigNum::operator- const): Deleted.
1599 (WebCore::CCBigNum::operator% const): Deleted.
1600 (WebCore::CCBigNum::inverse const): Deleted.
1601 * crypto/CommonCryptoUtilities.h:
1602 * crypto/mac/CryptoKeyRSAMac.cpp:
1603 (WebCore::getPrivateKeyComponents):
1605 2019-08-29 Zalan Bujtas <zalan@apple.com>
1607 [LFC][TFC] Initialize <tr> display boxes.
1608 https://bugs.webkit.org/show_bug.cgi?id=201232
1609 <rdar://problem/54806789>
1611 Reviewed by Antti Koivisto.
1613 Set them as blank for now.
1615 * layout/tableformatting/TableFormattingContext.cpp:
1616 (WebCore::Layout::TableFormattingContext::initializeDisplayBoxToBlank const):
1617 (WebCore::Layout::TableFormattingContext::layout const):
1618 * layout/tableformatting/TableFormattingContext.h:
1619 * layout/tableformatting/TableGrid.cpp:
1620 (WebCore::Layout::TableGrid::Row::Row):
1621 (WebCore::Layout::TableGrid::appendCell):
1622 * layout/tableformatting/TableGrid.h:
1623 (WebCore::Layout::TableGrid::Row::box const):
1625 2019-08-29 Youenn Fablet <youenn@apple.com>
1627 document.fonts.ready is resolved too quickly
1628 https://bugs.webkit.org/show_bug.cgi?id=174030
1629 <rdar://problem/33083550>
1631 Reviewed by Frédéric Wang.
1633 As described in https://drafts.csswg.org/css-font-loading/#font-face-set-ready, the ready promise
1634 is only fulfilled after layout operations complete and no additional font loads are necessary.
1636 This patch implements this by notifying the FontFaceSet created for the document when the document
1637 is finished loading. At that time, the promise will be resolved as soon as fonts are finished loading if any.
1639 Test: imported/w3c/web-platform-tests/infrastructure/assumptions/document-fonts-ready.html
1641 * css/CSSFontSelector.cpp:
1642 (WebCore::CSSFontSelector::optionalFontFaceSet):
1643 * css/CSSFontSelector.h:
1644 * css/FontFaceSet.cpp:
1645 (WebCore::FontFaceSet::FontFaceSet):
1646 (WebCore::FontFaceSet::startedLoading):
1647 (WebCore::FontFaceSet::didFirstLayout):
1648 (WebCore::FontFaceSet::completedLoading):
1649 * css/FontFaceSet.h:
1651 (WebCore::Document::implicitClose):
1653 2019-08-29 Zalan Bujtas <zalan@apple.com>
1655 [LFC][BFC] BlockFormattingContext::usedAvailableWidthForFloatAvoider should only be called on float avoiders.
1656 https://bugs.webkit.org/show_bug.cgi?id=201238
1657 <rdar://problem/54807663>
1659 Reviewed by Antti Koivisto.
1661 Make the horizontal available space logic for float avoiders more explicit/readable.
1663 * layout/blockformatting/BlockFormattingContext.cpp:
1664 (WebCore::Layout::BlockFormattingContext::usedAvailableWidthForFloatAvoider const):
1665 (WebCore::Layout::BlockFormattingContext::layoutFormattingContextRoot const):
1667 2019-08-29 Zalan Bujtas <zalan@apple.com>
1669 [LFC] Inline content logging should have some extra space for better readability
1670 https://bugs.webkit.org/show_bug.cgi?id=201236
1671 <rdar://problem/54807336>
1673 Reviewed by Antti Koivisto.
1675 * layout/layouttree/LayoutTreeBuilder.cpp:
1676 (WebCore::Layout::outputInlineRuns):
1678 2019-08-29 Simon Fraser <simon.fraser@apple.com>
1680 Avoid running the outline painting phase if no renderers have outlines
1681 https://bugs.webkit.org/show_bug.cgi?id=201284
1683 Reviewed by Said Abou-Hallawa.
1685 The outline painting phase (paintOutlineForFragments()) can take up to 20% of the painting time
1686 even when there are no outlines. Keep track of which renderers have outlines, and only run the phase
1687 when printing (for hasOutlineAnnotation()) or if there are any renderers with outlines.
1689 * rendering/RenderElement.cpp:
1690 (WebCore::RenderElement::styleWillChange):
1691 (WebCore::RenderElement::styleDidChange):
1692 (WebCore::RenderElement::willBeDestroyed):
1693 * rendering/RenderLayer.cpp:
1694 (WebCore::RenderLayer::paintLayerContents):
1695 * rendering/RenderView.h:
1697 2019-08-29 Zalan Bujtas <zalan@apple.com>
1699 [LFC][TFC] Use the "complicated-cases" category for computing the TFC root's height
1700 https://bugs.webkit.org/show_bug.cgi?id=201230
1701 <rdar://problem/54806131>
1703 Reviewed by Antti Koivisto.
1705 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.
1706 This is very BFC specific since (block)TFC is always parented in a BFC.
1708 * layout/blockformatting/BlockFormattingContextGeometry.cpp:
1709 (WebCore::Layout::BlockFormattingContext::Geometry::inFlowHeightAndMargin):
1711 2019-08-29 Zalan Bujtas <zalan@apple.com>
1713 [LFC][TFC] The table wrapper box is a block level box
1714 https://bugs.webkit.org/show_bug.cgi?id=201229
1715 <rdar://problem/54805515>
1717 Reviewed by Antti Koivisto.
1719 This is the anonymous box that we inject as the parent of the table caption/actual table box.
1721 * layout/FormattingContextGeometry.cpp:
1722 (WebCore::Layout::FormattingContext::Geometry::complicatedCases):
1723 * layout/blockformatting/BlockFormattingContext.cpp:
1724 (WebCore::Layout::BlockFormattingContext::computeEstimatedVerticalPositionForAncestors const):
1725 * layout/layouttree/LayoutBox.cpp:
1726 (WebCore::Layout::Box::establishesBlockFormattingContext const):
1727 (WebCore::Layout::Box::isFloatAvoider const):
1728 (WebCore::Layout::Box::isBlockLevelBox const):
1730 2019-08-29 Youenn Fablet <youenn@apple.com>
1732 Skip fetch event dispatching if no fetch event handler is added at script evaluation time
1733 https://bugs.webkit.org/show_bug.cgi?id=201174
1735 Reviewed by Chris Dumez.
1737 At end of worker script evaluation, store whether a fetch event handler is registered.
1738 Send it back to the SWServer that will store it in the corresponding SWServerWorker.
1740 Add support for soft update directly from the registration.
1741 This will trigger a soft-update from the worker context itself.
1742 In theory, this should be started by the job queue but we do not have a way yet to implement this as per spec.
1744 Test: http/wpt/service-workers/skipFetchEvent.https.html
1746 * workers/DedicatedWorkerThread.h:
1747 (WebCore::DedicatedWorkerThread::start):
1748 * workers/WorkerMessagingProxy.cpp:
1749 (WebCore::WorkerMessagingProxy::startWorkerGlobalScope):
1750 * workers/WorkerThread.cpp:
1751 (WebCore::WorkerThread::workerThread):
1752 * workers/WorkerThread.h:
1753 (WebCore::WorkerThread::finishedEvaluatingScript):
1754 * workers/service/context/SWContextManager.cpp:
1755 (WebCore::SWContextManager::registerServiceWorkerThreadForInstall):
1756 (WebCore::SWContextManager::startedServiceWorker):
1757 (WebCore::SWContextManager::softUpdate):
1758 * workers/service/context/SWContextManager.h:
1759 * workers/service/context/ServiceWorkerThread.cpp:
1760 (WebCore::ServiceWorkerThread::postFetchTask):
1761 (WebCore::ServiceWorkerThread::softUpdate):
1762 (WebCore::ServiceWorkerThread::finishedEvaluatingScript):
1763 (WebCore::ServiceWorkerThread::start):
1764 * workers/service/context/ServiceWorkerThread.h:
1765 (WebCore::ServiceWorkerThread::doesHandleFetch const):
1766 * workers/service/server/SWServer.h:
1767 * workers/service/server/SWServerRegistration.cpp:
1768 (WebCore::SWServerRegistration::shouldSoftUpdate const):
1769 (WebCore::SWServerRegistration::softUpdate):
1770 * workers/service/server/SWServerRegistration.h:
1771 (WebCore::SWServerRegistration::isStale const):
1772 * workers/service/server/SWServerToContextConnection.cpp:
1773 (WebCore::SWServerToContextConnection::generateConnectionIdentifier):
1774 (WebCore::SWServerToContextConnection::SWServerToContextConnection):
1775 (WebCore::SWServerToContextConnection::scriptContextStarted):
1776 * workers/service/server/SWServerToContextConnection.h:
1777 * workers/service/server/SWServerWorker.cpp:
1778 (WebCore::SWServerWorker::scriptContextStarted):
1779 (WebCore::SWServerWorker::setState):
1780 * workers/service/server/SWServerWorker.h:
1781 (WebCore::SWServerWorker::shouldSkipFetchEvent const):
1783 2019-08-29 Keith Rollin <krollin@apple.com>
1785 Remove support for macOS < 10.13 (part 3)
1786 https://bugs.webkit.org/show_bug.cgi?id=201224
1787 <rdar://problem/54795934>
1789 Reviewed by Darin Adler.
1791 Remove symbols in WebKitTargetConditionals.xcconfig related to macOS
1792 10.13, including WK_MACOS_1013 and WK_MACOS_BEFORE_1013, and suffixes
1793 like _MACOS_SINCE_1013.
1795 No new tests -- no new or changed functionality.
1797 * Configurations/WebKitTargetConditionals.xcconfig:
1799 2019-08-29 Charlie Turner <cturner@igalia.com>
1801 [GStreamer] Do not use makeWeakPtr from streaming thread.
1802 https://bugs.webkit.org/show_bug.cgi?id=201220
1804 Reviewed by Xabier Rodriguez-Calvar.
1806 Test: imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-retrieve-persistent-license.https.html
1808 Recently some asserts were added that you can't create WeakPtr's
1809 from streaming threads when the factory is created on the
1810 main-thread. The fix is to eagerly create the WeakPtr at player
1811 initialization time, rather than lazily when the streaming thread
1814 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
1816 2019-08-29 Rob Buis <rbuis@igalia.com>
1818 Address some MathML FIXMEs
1819 https://bugs.webkit.org/show_bug.cgi?id=201293
1821 Reviewed by Frédéric Wang.
1823 Add element tag checks for data, time and dialog.
1825 * mathml/MathMLOperatorDictionary.h:
1826 * mathml/MathMLPresentationElement.cpp:
1827 (WebCore::MathMLPresentationElement::isPhrasingContent):
1828 (WebCore::MathMLPresentationElement::isFlowContent):
1830 2019-08-29 Zan Dobersek <zdobersek@igalia.com>
1832 [Nicosia] Nicosia::Animation is missing the copy assignment operator
1833 https://bugs.webkit.org/show_bug.cgi?id=201298
1835 Reviewed by Carlos Garcia Campos.
1837 Along with the copy constructor, the Nicosia::Animation class also
1838 requires the copy assignment operator that's invoked whenever
1839 the containing Nicosia::Animations object is copied across different
1842 Much like the constructor, the copy assignment should clone the
1843 TimingFunction object to make it safely reusable in other contexts.
1844 This fixes the assertion failures in debug configurations over the
1845 improper cross-thread RefCounted usage.
1847 * platform/graphics/nicosia/NicosiaAnimation.cpp:
1848 (Nicosia::Animation::operator=):
1849 * platform/graphics/nicosia/NicosiaAnimation.h:
1850 Explicitly default the move constructor and assignment operator,
1851 providing the whole quartet.
1853 2019-08-29 Rob Buis <rbuis@igalia.com>
1855 https://bugs.webkit.org/show_bug.cgi?id=200917
1856 Do not call addHTTPOriginIfNeeded for window.open
1858 window.open() always uses GET requests and addHTTPOriginIfNeeded
1859 has no effect for GET, so do not call it.
1861 Reviewed by Frédéric Wang.
1863 * page/DOMWindow.cpp:
1864 (WebCore::DOMWindow::createWindow):
1866 2019-08-29 Carlos Garcia Campos <cgarcia@igalia.com>
1868 WebSockets: first-party for cookies not set in handshake request when using platform APIs
1869 https://bugs.webkit.org/show_bug.cgi?id=200165
1871 Reviewed by Youenn Fablet.
1873 * Modules/websockets/ThreadableWebSocketChannel.cpp:
1874 (WebCore::ThreadableWebSocketChannel::webSocketConnectRequest):
1876 2019-08-29 Rob Buis <rbuis@igalia.com>
1878 Implement HTMLOrForeignElement
1879 https://bugs.webkit.org/show_bug.cgi?id=201219
1881 Reviewed by Frédéric Wang.
1883 Add FIXME for updating the spec link.
1885 * html/HTMLOrForeignElement.idl:
1887 2019-08-28 Zan Dobersek <zdobersek@igalia.com>
1889 [Nicosia] Implement layer representation retain, release mechanics
1890 https://bugs.webkit.org/show_bug.cgi?id=201133
1892 Reviewed by Carlos Garcia Campos.
1894 * page/scrolling/nicosia/ScrollingStateNodeNicosia.cpp:
1895 (WebCore::LayerRepresentation::retainPlatformLayer):
1896 Type-cast the layer object to the reference-counted
1897 Nicosia::PlatformLayer type and reference that object.
1898 (WebCore::LayerRepresentation::releasePlatformLayer):
1899 Ditto, but dereference the object.
1901 2019-08-28 Zan Dobersek <zdobersek@igalia.com>
1903 [Nicosia] Add Nicosia::PlatformLayer::accessStaging() helper
1904 https://bugs.webkit.org/show_bug.cgi?id=201132
1906 Reviewed by Carlos Garcia Campos.
1908 * platform/graphics/nicosia/NicosiaPlatformLayer.h:
1909 (Nicosia::CompositionLayer::accessStaging):
1910 Add an accessor into the staging state of the Nicosia::PlatformLayer
1911 object. This will be needed for the application of scrolling changes
1912 in the asynchronous scrolling system.
1914 2019-08-28 Zan Dobersek <zdobersek@igalia.com>
1916 [CoordGraphics] Expose Nicosia layer as the underlying CoordinatedGraphicsLayer platform layer
1917 https://bugs.webkit.org/show_bug.cgi?id=201131
1919 Reviewed by Carlos Garcia Campos.
1921 Add the CoordinatedGraphicsLayer::platformLayer() override, returning
1922 the Nicosia::CompositionLayer object as the underlying platform layer.
1923 This will come in handy for asynchronous scrolling.
1925 * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
1926 (WebCore::CoordinatedGraphicsLayer::platformLayer const):
1927 * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
1929 2019-08-28 Zan Dobersek <zdobersek@igalia.com>
1931 [Nicosia] Polish ScrollingCoordinator implementation
1932 https://bugs.webkit.org/show_bug.cgi?id=201130
1934 Reviewed by Carlos Garcia Campos.
1936 These changes primarily mirror the Mac implementation of this class.
1938 * page/scrolling/nicosia/ScrollingCoordinatorNicosia.cpp:
1939 (WebCore::ScrollingCoordinatorNicosia::pageDestroyed):
1940 Upon releasing the ThreadedScrollingTree, it should also be invalidated
1941 on the scrolling thread.
1942 (WebCore::ScrollingCoordinatorNicosia::commitTreeState):
1943 Invoke willCommitTree() at the beginning of this method. Additionally
1944 the pending-commit-count is incremented for the ThreadedScrollingTree
1947 2019-08-28 Ryosuke Niwa <rniwa@webkit.org>
1949 Make tabIndex IDL attribute reflect its content attribute
1950 https://bugs.webkit.org/show_bug.cgi?id=199606
1951 <rdar://problem/52811448>
1953 Reviewed by Chris Dumez.
1955 This patch makes tabIndex IDL attribute no longer return 0 when the element is focusable
1956 to match the latest HTML5 specification. Instead, the IDL attribute simply reflect the tabindex
1957 content attribute with some elements having 0 as the default tab index (see r248784):
1958 https://html.spec.whatwg.org/multipage/interaction.html#the-tabindex-attribute
1960 The practical implication is that tabIndex IDL attribute on a root editable element (a.k.a.
1961 editing host in HTML5 spec term), body element in design mode, and media elements with
1962 media controls would start returning -1 instead of 0.
1964 Mechanically, this is accomplished by removing the special case in Element::tabIndexForBindings
1965 when supportsFocus returned true. The effect, if any, this patch has on each element which
1966 overrides Element::supportsFocus is summarized as follows (indentation simplies inheritance):
1968 HTMLAnchorElement -> No effect since defaultTabIndex returns 0.
1969 HTMLAreaElement -> Ditto.
1970 HTMLBodyElement -> Changes to return -1 in design mode.
1971 HTMLElement -> Changes to return -1 on a root editable element.
1972 HTMLFormControlElement
1973 HTMLButtonElement -> No effect since defaultTabIndex returns 0.
1974 HTMLFieldSetElement -> No effect since this is an override to use HTMLElement's supportsFocus.
1975 HTMLFormControlElementWithState
1976 HTMLKeygenElement -> No effect since defaultTabIndex returns 0.
1977 HTMLSelectElement -> Ditto.
1978 HTMLTextFormControlElement -> Ditto.
1979 HTMLInputElement -> Ditto.
1980 HTMLTextAreaElement -> Ditto.
1981 HTMLOutputElement -> No effect since this is an override to use HTMLElement's supportsFocus.
1982 HTMLFrameElementBase - No change. Added defaultTabIndex on HTMLIFrameElement and HTMLFrameElement
1984 HTMLImageElement - No impact since it only affects when an image is set to be editable via SPI.
1985 HTMLMediaElement - Changes to return -1 when media controls is present.
1986 HTMLPlugInElement - applet and embed elements change to return -1 when the plugin is available.
1987 HTMLSummaryElement - No change. Added defaultTabIndex to return 0 when it's active to match
1988 supportsFocus as well as the HTML5 specification.
1989 MathMLElement - No effect since tabIndex IDL attribute does not exist in MathML.
1990 SVGAElement - No effect since defaultTabIndex returns 0.
1991 SVGClipPathElement - No effect since it always returns false.
1992 SVGDefsElement - No effect since it always returns false.
1994 Tests: fast/dom/tabindex-defaults.html
1998 (WebCore::Element::tabIndexForBindings const): Made the change.
1999 * html/HTMLFrameElement.cpp:
2000 (WebCore::HTMLFrameElement::defaultTabIndex const): Added to preserve the existing behavior.
2001 * html/HTMLFrameElement.h:
2002 * html/HTMLIFrameElement.cpp:
2003 (WebCore::HTMLIFrameElement::defaultTabIndex const): Ditto.
2004 * html/HTMLIFrameElement.h:
2005 * html/HTMLObjectElement.cpp:
2006 (WebCore::HTMLObjectElement::defaultTabIndex const): Added. Always return 0 to match the spec.
2007 * html/HTMLObjectElement.h:
2008 * html/HTMLSummaryElement.cpp:
2009 (WebCore::HTMLSummaryElement::defaultTabIndex const): Added. Return 0 when the this summary
2010 is the active summary element of the details element.
2011 * html/HTMLSummaryElement.h:
2013 2019-08-28 Simon Fraser <simon.fraser@apple.com>
2015 Make FillLayer::hasImage() inline
2016 https://bugs.webkit.org/show_bug.cgi?id=201265
2018 Reviewed by Zalan Bujtas.
2020 FillLayer::hasImage() shows up on profiles because it's called from hot functions like
2021 isTransparent() and hasMask(), so make a basic inline version that doens't have
2024 * rendering/style/FillLayer.cpp:
2025 (WebCore::FillLayer::hasImageInAnyLayer const):
2026 (WebCore::FillLayer::hasImage const): Deleted.
2027 * rendering/style/FillLayer.h:
2028 (WebCore::FillLayer::hasImage const):
2030 2019-08-28 Peng Liu <peng.liu6@apple.com>
2032 REGRESSION: String check: “realtime” Suggesting “real time”
2033 https://bugs.webkit.org/show_bug.cgi?id=201107
2034 <rdar://problem/46372620>
2036 Reviewed by Jer Noble.
2038 Update Localizable.strings.
2042 * en.lproj/Localizable.strings:
2043 * platform/LocalizedStrings.cpp:
2044 (WebCore::localizedMediaControlElementString):
2046 2019-08-28 Simon Fraser <simon.fraser@apple.com>
2048 PaintFrequencyTracker triggers too many calls to MonotonicTime::now() on layer painting
2049 https://bugs.webkit.org/show_bug.cgi?id=201261
2051 Reviewed by Zalan Bujtas.
2053 MonotonicTime::now() shows up as expensive when painting layer-heavy content, because PaintFrequencyTracker
2054 makes two calls per layer paint.
2056 Halve the number of calls by storing m_lastPaintTime at the start of the paint; doing so doesn't substantially
2057 change the behavior of the tracker.
2059 * rendering/PaintFrequencyTracker.h:
2060 (WebCore::PaintFrequencyTracker::begin):
2061 (WebCore::PaintFrequencyTracker::end):
2063 2019-08-28 Ross Kirsling <ross.kirsling@sony.com>
2065 Unreviewed. Restabilize non-unified build.
2067 * inspector/agents/WebConsoleAgent.h:
2068 * loader/ResourceLoadObserver.h:
2070 2019-08-28 Simon Fraser <simon.fraser@apple.com>
2072 Devirtualize RenderBox::visualOverflowRect()
2073 https://bugs.webkit.org/show_bug.cgi?id=201231
2075 Reviewed by Zalan Bujtas.
2077 The only override of RenderBox::visualOverflowRect() was in RenderView, for "paintsEntireContents" views, and as
2078 far as I can tell this is not necessary. visualOverflowRect() is hot when called from RenderLayer::localBoundingBox() --
2079 this shows in profiles when scrolling large patch reviews, so making it non-virtual is a performance enhancement.
2081 RenderLayer::localBoundingBox() can also just call visualOverflowRect(), since that returns borderBoxRect()
2082 when there is no overflow.
2084 * rendering/RenderBox.h:
2085 (WebCore::RenderBox::visualOverflowRect const):
2086 * rendering/RenderLayer.cpp:
2087 (WebCore::performOverlapTests): Minor optimization to avoid a call to boundingBox().
2088 (WebCore::RenderLayer::calculateClipRects const):
2089 * rendering/RenderView.cpp:
2090 (WebCore::RenderView::visualOverflowRect const): Deleted.
2091 * rendering/RenderView.h:
2093 2019-08-28 Austin Eng <enga@chromium.org>
2095 Create ANGLE EGL Context with all extensions disabled by default
2096 https://bugs.webkit.org/show_bug.cgi?id=200900
2098 Reviewed by Alex Christensen.
2100 In WebGL, extensions must be explicitly requested before they are enabled.
2101 Fixes the following WebGL conformance tests with the ANGLE backend
2102 LayoutTests/webgl/*/conformance/extensions/ext-blend-minmax.html
2103 LayoutTests/webgl/*/conformance/extensions/ext-frag-depth.html
2104 LayoutTests/webgl/*/conformance/extensions/ext-shader-texture-lod.html
2105 LayoutTests/webgl/*/conformance/extensions/ext-sRGB.html
2106 LayoutTests/webgl/*/conformance/extensions/oes-standard-derivatives.html
2107 LayoutTests/webgl/*/conformance/extensions/oes-texture-float.html
2108 LayoutTests/webgl/*/conformance/extensions/webgl-compressed-texture-s3tc.html
2109 LayoutTests/webgl/*/conformance/glsl/misc/shader-with-dfdx.frag.html
2110 LayoutTests/webgl/*/conformance/glsl/variables/glsl-built-ins.html
2111 LayoutTests/webgl/*/conformance/textures/misc/texture-npot-video.html
2112 LayoutTests/webgl/*/conformance/textures/misc/texture-npot.html
2114 * html/canvas/ANGLEInstancedArrays.cpp:
2115 (WebCore::ANGLEInstancedArrays::ANGLEInstancedArrays):
2116 (WebCore::ANGLEInstancedArrays::supported):
2117 * html/canvas/WebGLCompressedTextureASTC.cpp:
2118 (WebCore::WebGLCompressedTextureASTC::WebGLCompressedTextureASTC):
2119 * html/canvas/WebGLCompressedTextureATC.cpp:
2120 (WebCore::WebGLCompressedTextureATC::WebGLCompressedTextureATC):
2121 * html/canvas/WebGLCompressedTexturePVRTC.cpp:
2122 (WebCore::WebGLCompressedTexturePVRTC::WebGLCompressedTexturePVRTC):
2123 * html/canvas/WebGLCompressedTextureS3TC.cpp:
2124 (WebCore::WebGLCompressedTextureS3TC::WebGLCompressedTextureS3TC):
2125 (WebCore::WebGLCompressedTextureS3TC::supported):
2126 * html/canvas/WebGLDebugShaders.cpp:
2127 (WebCore::WebGLDebugShaders::WebGLDebugShaders):
2128 * html/canvas/WebGLDepthTexture.cpp:
2129 (WebCore::WebGLDepthTexture::WebGLDepthTexture):
2130 * html/canvas/WebGLDrawBuffers.cpp:
2131 (WebCore::WebGLDrawBuffers::WebGLDrawBuffers):
2132 (WebCore::WebGLDrawBuffers::supported):
2133 * platform/graphics/angle/GraphicsContext3DANGLE.cpp:
2134 (WebCore::GraphicsContext3D::reshapeFBOs):
2135 (WebCore::GraphicsContext3D::validateDepthStencil):
2136 * platform/graphics/cocoa/GraphicsContext3DCocoa.mm:
2137 (WebCore::GraphicsContext3D::GraphicsContext3D):
2139 2019-08-28 Said Abou-Hallawa <sabouhallawa@apple.com>
2141 All image drawing functions should take an argument of type ImagePaintingOptions
2142 https://bugs.webkit.org/show_bug.cgi?id=201059
2144 Reviewed by Simon Fraser.
2147 -- All the image drawing function will take an argument of type
2148 ImagePaintingOptions instead of passing individual options.
2150 -- ImagePaintingOptions is made like a set of options. It can be
2151 initialized with any number of options and the order does not matter
2153 -- Image::originalSize() is deleted because it returns size() and none
2154 of the Image concrete classes overrides this implementation.
2157 * WebCore.xcodeproj/project.pbxproj:
2158 * html/ImageBitmap.cpp:
2159 (WebCore::ImageBitmap::createPromise):
2160 (WebCore::ImageBitmap::createFromBuffer):
2161 * html/canvas/CanvasRenderingContext2DBase.cpp:
2162 (WebCore::CanvasRenderingContext2DBase::drawImage):
2163 (WebCore::drawImageToContext):
2164 (WebCore::CanvasRenderingContext2DBase::fullCanvasCompositedDrawImage):
2165 * platform/graphics/BitmapImage.cpp:
2166 (WebCore::BitmapImage::draw):
2167 (WebCore::BitmapImage::drawPattern):
2168 * platform/graphics/BitmapImage.h:
2169 * platform/graphics/CrossfadeGeneratedImage.cpp:
2170 (WebCore::drawCrossfadeSubimage):
2171 (WebCore::CrossfadeGeneratedImage::draw):
2172 (WebCore::CrossfadeGeneratedImage::drawPattern):
2173 * platform/graphics/CrossfadeGeneratedImage.h:
2174 * platform/graphics/CustomPaintImage.cpp:
2175 (WebCore::CustomPaintImage::draw):
2176 (WebCore::CustomPaintImage::drawPattern):
2177 * platform/graphics/CustomPaintImage.h:
2178 * platform/graphics/GeneratedImage.h:
2179 (WebCore::GeneratedImage::draw):
2180 (WebCore::GeneratedImage::drawPattern):
2181 * platform/graphics/GradientImage.cpp:
2182 (WebCore::GradientImage::draw):
2183 (WebCore::GradientImage::drawPattern):
2184 * platform/graphics/GradientImage.h:
2185 * platform/graphics/GraphicsContext.cpp:
2186 (WebCore::GraphicsContext::drawImage):
2187 (WebCore::GraphicsContext::drawTiledImage):
2188 (WebCore::GraphicsContext::drawImageBuffer):
2189 (WebCore::GraphicsContext::drawConsumingImageBuffer):
2190 * platform/graphics/GraphicsContext.h:
2191 (WebCore::GraphicsContext::drawNativeImage):
2192 (WebCore::GraphicsContext::drawImage):
2193 (WebCore::GraphicsContext::drawTiledImage):
2194 (WebCore::GraphicsContext::drawImageBuffer):
2195 (WebCore::GraphicsContext::drawPattern):
2196 (WebCore::GraphicsContext::drawConsumingImageBuffer):
2197 (WebCore::ImagePaintingOptions::ImagePaintingOptions): Deleted.
2198 (WebCore::ImagePaintingOptions::usesDefaultInterpolation const): Deleted.
2199 * platform/graphics/GraphicsContextImpl.cpp:
2200 (WebCore::GraphicsContextImpl::drawImageImpl):
2201 (WebCore::GraphicsContextImpl::drawTiledImageImpl):
2202 * platform/graphics/GraphicsContextImpl.h:
2203 * platform/graphics/Image.cpp:
2204 (WebCore::Image::drawPattern):
2205 (WebCore::Image::drawTiled):
2206 (WebCore::Image::computeIntrinsicDimensions):
2207 * platform/graphics/Image.h:
2208 (WebCore::Image::drawPattern):
2209 (WebCore::Image::draw):
2210 (WebCore::Image::drawTiled):
2211 (WebCore::Image::originalSize const): Deleted.
2212 * platform/graphics/ImageBuffer.h:
2213 (WebCore::ImageBuffer::draw):
2214 (WebCore::ImageBuffer::drawPattern):
2215 (WebCore::ImageBuffer::drawConsuming):
2216 * platform/graphics/ImagePaintingOptions.h: Added.
2217 (WebCore::ImagePaintingOptions::ImagePaintingOptions):
2218 (WebCore::ImagePaintingOptions::compositeOperator const):
2219 (WebCore::ImagePaintingOptions::blendMode const):
2220 (WebCore::ImagePaintingOptions::decodingMode const):
2221 (WebCore::ImagePaintingOptions::orientation const):
2222 (WebCore::ImagePaintingOptions::interpolationQuality const):
2223 (WebCore::ImagePaintingOptions::setOption):
2224 * platform/graphics/NamedImageGeneratedImage.cpp:
2225 (WebCore::NamedImageGeneratedImage::draw):
2226 (WebCore::NamedImageGeneratedImage::drawPattern):
2227 * platform/graphics/NamedImageGeneratedImage.h:
2228 * platform/graphics/NativeImage.h:
2229 * platform/graphics/cairo/CairoOperations.cpp:
2230 (WebCore::Cairo::drawShadowLayerBuffer):
2231 (WebCore::Cairo::drawShadowImage):
2232 (WebCore::Cairo::drawNativeImage):
2233 (WebCore::Cairo::drawPattern):
2234 * platform/graphics/cairo/CairoOperations.h:
2235 * platform/graphics/cairo/GraphicsContextCairo.cpp:
2236 (WebCore::GraphicsContext::drawNativeImage):
2237 (WebCore::GraphicsContext::drawPattern):
2238 * platform/graphics/cairo/GraphicsContextImplCairo.cpp:
2239 (WebCore::GraphicsContextImplCairo::drawNativeImage):
2240 (WebCore::GraphicsContextImplCairo::drawPattern):
2241 * platform/graphics/cairo/GraphicsContextImplCairo.h:
2242 * platform/graphics/cairo/ImageBufferCairo.cpp:
2243 (WebCore::ImageBuffer::drawConsuming):
2244 (WebCore::ImageBuffer::draw):
2245 (WebCore::ImageBuffer::drawPattern):
2246 * platform/graphics/cairo/NativeImageCairo.cpp:
2247 (WebCore::drawNativeImage):
2248 * platform/graphics/cg/GraphicsContext3DCG.cpp:
2249 (WebCore::GraphicsContext3D::paintToCanvas):
2250 * platform/graphics/cg/GraphicsContextCG.cpp:
2251 (WebCore::GraphicsContext::drawNativeImage):
2252 (WebCore::GraphicsContext::drawPattern):
2253 * platform/graphics/cg/ImageBufferCG.cpp:
2254 (WebCore::ImageBuffer::drawConsuming):
2255 (WebCore::ImageBuffer::draw):
2256 (WebCore::ImageBuffer::drawPattern):
2257 * platform/graphics/cg/NativeImageCG.cpp:
2258 (WebCore::drawNativeImage):
2259 * platform/graphics/cg/PDFDocumentImage.cpp:
2260 (WebCore::PDFDocumentImage::draw):
2261 * platform/graphics/cg/PDFDocumentImage.h:
2262 * platform/graphics/displaylists/DisplayListItems.cpp:
2263 (WebCore::DisplayList::DrawNativeImage::DrawNativeImage):
2264 (WebCore::DisplayList::DrawNativeImage::apply const):
2265 (WebCore::DisplayList::DrawPattern::DrawPattern):
2266 (WebCore::DisplayList::DrawPattern::apply const):
2267 * platform/graphics/displaylists/DisplayListItems.h:
2268 (WebCore::DisplayList::DrawNativeImage::create):
2269 (WebCore::DisplayList::DrawPattern::create):
2270 (WebCore::DisplayList::DrawPattern::DrawPattern):
2271 * platform/graphics/displaylists/DisplayListRecorder.cpp:
2272 (WebCore::DisplayList::Recorder::drawNativeImage):
2273 (WebCore::DisplayList::Recorder::drawPattern):
2274 * platform/graphics/displaylists/DisplayListRecorder.h:
2275 * platform/graphics/filters/FEBlend.cpp:
2276 (WebCore::FEBlend::platformApplySoftware):
2277 * platform/graphics/filters/FEComposite.cpp:
2278 (WebCore::FEComposite::platformApplySoftware):
2279 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
2280 (WebCore::MediaPlayerPrivateGStreamerBase::paint):
2281 * platform/graphics/nicosia/cairo/NicosiaCairoOperationRecorder.cpp:
2282 (Nicosia::CairoOperationRecorder::drawNativeImage):
2283 (Nicosia::CairoOperationRecorder::drawPattern):
2284 * platform/graphics/nicosia/cairo/NicosiaCairoOperationRecorder.h:
2285 * platform/graphics/win/Direct2DOperations.cpp:
2286 (WebCore::Direct2D::drawNativeImage):
2287 (WebCore::Direct2D::drawPattern):
2288 * platform/graphics/win/Direct2DOperations.h:
2289 * platform/graphics/win/GraphicsContextImplDirect2D.h:
2290 * platform/graphics/win/ImageCGWin.cpp:
2291 (WebCore::BitmapImage::getHBITMAPOfSize):
2292 (WebCore::BitmapImage::drawFrameMatchingSourceSize):
2293 * platform/graphics/win/ImageCairoWin.cpp:
2294 (WebCore::BitmapImage::getHBITMAPOfSize):
2295 (WebCore::BitmapImage::drawFrameMatchingSourceSize):
2296 * platform/graphics/win/NativeImageDirect2D.cpp:
2297 (WebCore::drawNativeImage):
2298 * platform/ios/DragImageIOS.mm:
2299 (WebCore::createDragImageFromImage):
2300 * rendering/RenderBoxModelObject.cpp:
2301 (WebCore::RenderBoxModelObject::paintFillLayerExtended):
2302 * rendering/RenderEmbeddedObject.cpp:
2303 (WebCore::RenderEmbeddedObject::paintSnapshotImage):
2304 * rendering/RenderImage.cpp:
2305 (WebCore::RenderImage::paintReplaced):
2306 (WebCore::RenderImage::paintIntoRect):
2307 * rendering/RenderSnapshottedPlugIn.cpp:
2308 (WebCore::RenderSnapshottedPlugIn::paintSnapshot):
2309 * rendering/RenderThemeMac.mm:
2310 (WebCore::RenderThemeMac::paintSnapshottedPluginOverlay):
2311 * svg/graphics/SVGImage.cpp:
2312 (WebCore::SVGImage::drawForContainer):
2313 (WebCore::SVGImage::nativeImageForCurrentFrame):
2314 (WebCore::SVGImage::nativeImage):
2315 (WebCore::SVGImage::drawPatternForContainer):
2316 (WebCore::SVGImage::draw):
2317 * svg/graphics/SVGImage.h:
2318 * svg/graphics/SVGImageForContainer.cpp:
2319 (WebCore::SVGImageForContainer::draw):
2320 (WebCore::SVGImageForContainer::drawPattern):
2321 * svg/graphics/SVGImageForContainer.h:
2323 2019-08-28 Said Abou-Hallawa <sabouhallawa@apple.com>
2325 XLinkNames namespace is required before the 'href' attribute of SVG animate elements
2326 https://bugs.webkit.org/show_bug.cgi?id=201227
2328 Reviewed by Ryosuke Niwa.
2330 To get the animation target element, get the value of the "href" attribute
2331 or the "xlink:href" attribute.
2333 Tests: svg/custom/href-svg-namespace-animate-target.svg
2335 * svg/animation/SVGSMILElement.cpp:
2336 (WebCore::SVGSMILElement::buildPendingResource):
2338 2019-08-28 Truitt Savell <tsavell@apple.com>
2340 Unreviewed, rolling out r249209.
2342 Broke 19 webgpu/ tests
2346 "[WHLSL] Inline typedef'd types during Metal code generation
2347 to simplify generated code while also making it easier to
2349 https://bugs.webkit.org/show_bug.cgi?id=201185
2350 https://trac.webkit.org/changeset/249209
2352 2019-08-28 Myles C. Maxfield <mmaxfield@apple.com>
2354 [WHLSL] Matrices need to have correct alignment
2355 https://bugs.webkit.org/show_bug.cgi?id=201212
2357 Reviewed by Robin Morisset.
2359 Matrices have particular alignment requirements and size requirements.
2361 Type | Alignment | Size
2362 ---------------------------
2373 These are important because they may be a member of a struct, and we don't want to misplace
2374 every successive item in the struct.
2376 Test: webgpu/whlsl/matrix-alignment.html
2378 * Modules/webgpu/WHLSL/Metal/WHLSLNativeTypeWriter.cpp:
2379 (WebCore::WHLSL::Metal::writeNativeType):
2381 2019-08-28 Rob Buis <rbuis@igalia.com>
2383 Implement HTMLOrForeignElement
2384 https://bugs.webkit.org/show_bug.cgi?id=201219
2386 Reviewed by Ryosuke Niwa.
2388 Add the HTMLOrForeignElement [1] interface to share properties
2389 and methods between HTML, SVG and MathML.
2391 [1] https://github.com/mathml-refresh/mathml/issues/83
2394 * DerivedSources-input.xcfilelist:
2395 * DerivedSources-output.xcfilelist:
2396 * DerivedSources.make:
2398 * WebCore.xcodeproj/project.pbxproj:
2399 * dom/StaticRange.h:
2400 * html/HTMLElement.idl:
2401 * html/HTMLOrForeignElement.idl: Added.
2402 * svg/SVGElement.idl:
2404 2019-08-28 Sam Weinig <weinig@apple.com>
2406 [WHLSL] Inline typedef'd types during Metal code generation to simplify generated code while also making it easier to read
2407 https://bugs.webkit.org/show_bug.cgi?id=201185
2409 Reviewed by Saam Barati.
2411 The current Metal code generation generates many unnecessary typedefs during TypeNamer::emitMetalTypeDefinitions
2412 such as 'typedef float2 type19;' that can be removed by just using resolved type whereever the typedef would have
2413 been used. The only types that actually need to be predefined are the types that declare a new struct or enum, which
2414 means we can stop emitting for AST::TypeReference, AST::Pointer, AST::Array, and AST::TypeDefinition. Instead, the
2415 relevent mangledNameForType constructs the computed name on the fly.
2417 This is a 25% speedup in the metal code generation phase.
2419 * Modules/webgpu/WHLSL/Metal/WHLSLFunctionWriter.cpp:
2420 (WebCore::WHLSL::Metal::FunctionDefinitionWriter::visit):
2421 Switch to using auto rather than Mangled*Name when it is obvious and the actual return type
2422 may need to become more complicated (e.g. MangledOrNativeTypeName).
2424 * Modules/webgpu/WHLSL/Metal/WHLSLTypeNamer.h:
2425 * Modules/webgpu/WHLSL/Metal/WHLSLTypeNamer.cpp:
2426 (WebCore::WHLSL::Metal::TypeNamer::visit):
2427 There is no need to generate typenames for AST::TypeDefinitions if they are never used.
2429 (WebCore::WHLSL::Metal::TypeNamer::generateUniquedTypeName):
2430 The only UnnamedType that needs a generated typename now is AST::ArrayReferenceType, which emits a struct interface.
2432 (WebCore::WHLSL::Metal::TypeNamer::emitUnnamedTypeDefinition):
2433 Stop generating type definitions for AST::TypeReference, AST::Pointer, AST::Array.
2435 (WebCore::WHLSL::Metal::TypeNamer::emitNamedTypeDefinition):
2436 Stop generating type definitions for AST::TypeDefinition.
2438 (WebCore::WHLSL::Metal::TypeNamer::emitMetalTypeDefinitions):
2439 Update for rename from m_unnamedTypeMapping to m_arrayReferenceTypeMapping.
2441 (WebCore::WHLSL::Metal::TypeNamer::mangledNameForType):
2442 Look into the types and generate a concrete type name when necessary. Lazily cache the constructed
2443 names for AST::ArrayType and AST::Pointer.
2445 2019-08-28 Keith Rollin <krollin@apple.com>
2447 Remove support for macOS < 10.13 (part 2)
2448 https://bugs.webkit.org/show_bug.cgi?id=201197
2449 <rdar://problem/54759985>
2451 Reviewed by Darin Adler.
2453 Update conditionals that reference WK_MACOS_1013 and suffixes like
2454 _MACOS_SINCE_1013, assuming that we're always building on 10.13 or
2455 later and that these conditionals are always True or False.
2457 See Bug 200694 for earlier changes in this area.
2459 No new tests -- no new or changed functionality.
2461 * Configurations/FeatureDefines.xcconfig:
2463 2019-08-28 Chris Dumez <cdumez@apple.com>
2465 geolocation.watchPosition() / getCurrentPosition() should return PERMISSION_DENIED when context is not secure
2466 https://bugs.webkit.org/show_bug.cgi?id=201221
2468 Reviewed by Ryosuke Niwa.
2470 geolocation.watchPosition() / getCurrentPosition() should return PERMISSION_DENIED when context is not secure,
2471 not POSITION_UNAVAILABLE. Both Gecko and Blink agree on PERMISSION_DENIED.
2473 No new tests, updated existing tests.
2475 * Modules/geolocation/Geolocation.cpp:
2476 (WebCore::Geolocation::startRequest):
2478 2019-08-28 Alicia Boya García <aboya@igalia.com>
2480 [MSE][GStreamer] WebKitMediaSrc rework
2481 https://bugs.webkit.org/show_bug.cgi?id=199719
2483 Reviewed by Xabier Rodriguez-Calvar.
2485 This patch reworks the WebKitMediaSrc element and many of the player
2486 private methods that interacted with it.
2488 In comparison with the old WebKitMediaSrc, in the new one seeks have
2489 been massively simplified.
2491 The new WebKitMediaSrc no longer relies on a bin or appsrc, having
2492 greater control over its operation. This made it comparatively much
2493 easier to implement features such as seek before playback or
2494 single-stream flushing.
2496 stream-collection events are emitted from the WebKitMediaSrc to reuse
2497 the track handling in MediaPlayerPrivateGStreamer for playbin3, which
2498 is now used for MSE pipelines.
2500 Additional tests have been added to check some assumptions, and some
2501 bugs that have surfaced with the changes have been fixed but no new
2502 features (like multi-track support) are implemented in this patch.
2504 One instance of these bugs is `resized` events, which were previously
2505 being emitted when frames with different resolutions where appended.
2506 This is a wrong behavior that has not been preserved in the rework, as
2507 resize events should be emitted when the frames are shown, not
2510 There are subtler bugfixes, such as ignoring PTS-less frames in
2511 AppendPipeline::appsinkNewSample(). These frames are problematic for
2512 MSE, yet they were somehow passing through the pipelines. Since
2513 WebKitMediaSrc is stricter with assertions, these have to be filtered.
2515 This test gets rid of !m_mseSeekCompleted assertion failures in tests
2516 and potentially other hard to debug bugs in the previous seek
2519 This patch makes the following existing tests pass:
2521 imported/w3c/web-platform-tests/media-source/mediasource-config-change-webm-a-bitrate.html
2522 imported/w3c/web-platform-tests/media-source/mediasource-config-change-webm-v-framesize.html
2524 New test: imported/w3c/web-platform-tests/media-source/mediasource-buffered-seek.html
2525 New test: LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-video-element/video_timeupdate_on_seek.html (non-MSE related)
2528 * platform/GStreamer.cmake:
2529 * platform/graphics/gstreamer/GRefPtrGStreamer.cpp:
2531 (WTF::refGPtr<GstMiniObject>):
2532 (WTF::derefGPtr<GstMiniObject>):
2533 * platform/graphics/gstreamer/GRefPtrGStreamer.h:
2534 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
2535 (WebCore::MediaPlayerPrivateGStreamer::playbackPosition const):
2536 (WebCore::MediaPlayerPrivateGStreamer::paused const):
2537 (WebCore::MediaPlayerPrivateGStreamer::updateTracks):
2538 (WebCore::MediaPlayerPrivateGStreamer::enableTrack):
2539 (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfVideo):
2540 (WebCore::MediaPlayerPrivateGStreamer::sourceSetup):
2541 (WebCore::MediaPlayerPrivateGStreamer::handleSyncMessage):
2542 (WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin):
2543 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
2544 (WebCore::MediaPlayerPrivateGStreamer::invalidateCachedPosition):
2545 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
2546 (WebCore::MediaPlayerPrivateGStreamerBase::naturalSize const):
2547 (WebCore::MediaPlayerPrivateGStreamerBase::naturalSizeFromCaps const):
2548 (WebCore::MediaPlayerPrivateGStreamerBase::samplesHaveDifferentNaturalSize const):
2549 (WebCore::MediaPlayerPrivateGStreamerBase::triggerRepaint):
2550 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
2551 * platform/graphics/gstreamer/MediaSampleGStreamer.cpp:
2552 (WebCore::MediaSampleGStreamer::MediaSampleGStreamer):
2553 * platform/graphics/gstreamer/mse/AppendPipeline.cpp:
2554 (WebCore::AppendPipeline::appsinkNewSample):
2555 (WebCore::AppendPipeline::connectDemuxerSrcPadToAppsink):
2556 * platform/graphics/gstreamer/mse/AppendPipeline.h:
2557 (WebCore::AppendPipeline::appsinkCaps):
2558 (WebCore::AppendPipeline::streamType):
2559 (WebCore::AppendPipeline::demuxerSrcPadCaps):
2560 * platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp:
2561 (WebCore::MediaPlayerPrivateGStreamerMSE::~MediaPlayerPrivateGStreamerMSE):
2562 (WebCore::MediaPlayerPrivateGStreamerMSE::load):
2563 (WebCore::MediaPlayerPrivateGStreamerMSE::play):
2564 (WebCore::MediaPlayerPrivateGStreamerMSE::pause):
2565 (WebCore::MediaPlayerPrivateGStreamerMSE::seek):
2566 (WebCore::MediaPlayerPrivateGStreamerMSE::seekCompleted):
2567 (WebCore::MediaPlayerPrivateGStreamerMSE::setReadyState):
2568 (WebCore::MediaPlayerPrivateGStreamerMSE::sourceSetup):
2569 (WebCore::MediaPlayerPrivateGStreamerMSE::updateStates):
2570 (WebCore::MediaPlayerPrivateGStreamerMSE::didEnd):
2571 (WebCore::MediaPlayerPrivateGStreamerMSE::unblockDurationChanges):
2572 (WebCore::MediaPlayerPrivateGStreamerMSE::durationChanged):
2573 (WebCore::MediaPlayerPrivateGStreamerMSE::trackDetected):
2574 * platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.h:
2575 * platform/graphics/gstreamer/mse/MediaSourceClientGStreamerMSE.cpp:
2576 (WebCore::MediaSourceClientGStreamerMSE::addSourceBuffer):
2577 (WebCore::MediaSourceClientGStreamerMSE::removedFromMediaSource):
2578 (WebCore::MediaSourceClientGStreamerMSE::flush):
2579 (WebCore::MediaSourceClientGStreamerMSE::enqueueSample):
2580 (WebCore::MediaSourceClientGStreamerMSE::isReadyForMoreSamples):
2581 (WebCore::MediaSourceClientGStreamerMSE::notifyClientWhenReadyForMoreSamples):
2582 (WebCore::MediaSourceClientGStreamerMSE::allSamplesInTrackEnqueued):
2583 * platform/graphics/gstreamer/mse/MediaSourceClientGStreamerMSE.h:
2584 * platform/graphics/gstreamer/mse/MediaSourceGStreamer.cpp:
2585 (WebCore::MediaSourceGStreamer::markEndOfStream):
2586 (WebCore::MediaSourceGStreamer::unmarkEndOfStream):
2587 (WebCore::MediaSourceGStreamer::waitForSeekCompleted):
2588 * platform/graphics/gstreamer/mse/MediaSourceGStreamer.h:
2589 * platform/graphics/gstreamer/mse/PlaybackPipeline.cpp: Removed.
2590 * platform/graphics/gstreamer/mse/PlaybackPipeline.h: Removed.
2591 * platform/graphics/gstreamer/mse/SourceBufferPrivateGStreamer.cpp:
2592 (WebCore::SourceBufferPrivateGStreamer::enqueueSample):
2593 (WebCore::SourceBufferPrivateGStreamer::isReadyForMoreSamples):
2594 (WebCore::SourceBufferPrivateGStreamer::notifyClientWhenReadyForMoreSamples):
2595 * platform/graphics/gstreamer/mse/SourceBufferPrivateGStreamer.h:
2596 * platform/graphics/gstreamer/mse/WebKitMediaSourceGStreamer.cpp:
2597 (WebKitMediaSrcPrivate::streamByName):
2599 (Stream::StreamingMembers::StreamingMembers):
2600 (Stream::StreamingMembers::durationEnqueued const):
2602 (webkit_media_src_class_init):
2603 (webkit_media_src_init):
2604 (webKitMediaSrcFinalize):
2606 (collectionPlusStream):
2607 (collectionMinusStream):
2609 (webKitMediaSrcAddStream):
2610 (webKitMediaSrcRemoveStream):
2611 (webKitMediaSrcActivateMode):
2612 (webKitMediaSrcPadLinked):
2613 (webKitMediaSrcStreamNotifyLowWaterLevel):
2614 (webKitMediaSrcLoop):
2615 (webKitMediaSrcEnqueueObject):
2616 (webKitMediaSrcEnqueueSample):
2617 (webKitMediaSrcEnqueueEvent):
2618 (webKitMediaSrcEndOfStream):
2619 (webKitMediaSrcIsReadyForMoreSamples):
2620 (webKitMediaSrcNotifyWhenReadyForMoreSamples):
2621 (webKitMediaSrcChangeState):
2622 (webKitMediaSrcStreamFlushStart):
2623 (webKitMediaSrcStreamFlushStop):
2624 (webKitMediaSrcFlush):
2625 (webKitMediaSrcSeek):
2626 (countStreamsOfType):
2627 (webKitMediaSrcGetProperty):
2628 (webKitMediaSrcUriGetType):
2629 (webKitMediaSrcGetProtocols):
2630 (webKitMediaSrcGetUri):
2631 (webKitMediaSrcSetUri):
2632 (webKitMediaSrcUriHandlerInit):
2633 * platform/graphics/gstreamer/mse/WebKitMediaSourceGStreamer.h:
2634 * platform/graphics/gstreamer/mse/WebKitMediaSourceGStreamerPrivate.h: Removed.
2636 2019-08-28 Simon Fraser <simon.fraser@apple.com>
2638 Have RenderSVGBlock compute visual overflow just like everyone else
2639 https://bugs.webkit.org/show_bug.cgi?id=201211
2641 Reviewed by Zalan Bujtas.
2643 RenderSVGBlock overrode visualOverflowRect() just to account for text shadow. This prevents callers
2644 optimizing calls to visualOverflowRect(), so instead have RenderSVGBlock implement computeOverflow()
2645 and call addVisualOverflow().
2647 * rendering/svg/RenderSVGBlock.cpp:
2648 (WebCore::RenderSVGBlock::computeOverflow):
2649 (WebCore::RenderSVGBlock::visualOverflowRect const): Deleted.
2650 * rendering/svg/RenderSVGBlock.h:
2652 2019-08-28 Ryosuke Niwa <rniwa@webkit.org>
2654 REGRESSION (r248807): Objects stored in ElementRareData are leaked
2655 https://bugs.webkit.org/show_bug.cgi?id=200954
2657 Reviewed by Antti Koivisto.
2659 Use a custom deleter in std::unique_ptr to call the correct destructor instead of making
2660 NodeRareData's destructor virtual. Added NodeRareData::isElementRareData to differentiate
2661 ElementRareData and NodeRareData by borrowing 1 bit from the frame count.
2663 No new tests since there should be no behavioral change.
2665 * dom/ElementRareData.h:
2666 (WebCore::ElementRareData::ElementRareData):
2668 (WebCore::Node::materializeRareData): Call the constructors of unique_ptr directly since
2669 make_unique does not take a custom deleter. We can't add the support to makeUnique either
2670 without making it three arguments since we need to cast ElementRareData to NodeRareData
2671 in addition to specifying a custom deleter (normal casting wouldn't work due to
2672 the presence of a custom deleter).
2673 (WebCore::Node::NodeRareDataDeleter::operator() const): Added.
2675 (WebCore::Node::NodeRareDataDeleter): Added.
2676 * dom/NodeRareData.cpp:
2677 * dom/NodeRareData.h:
2678 (WebCore::NodeRareData::NodeRareData): Makes newly added Type.
2679 (WebCore::NodeRareData::isElementRareData): Added.
2680 (WebCore::NodeRareData::~NodeRareData): Deleted.
2682 2019-08-28 Claudio Saavedra <csaavedra@igalia.com>
2684 [SOUP] Shut compilation warning
2686 Unreviewed. RELEASE_LOG_ERROR() needs a channel.
2688 * platform/network/soup/SoupNetworkSession.cpp:
2689 (WebCore::SoupNetworkSession::setupHSTSEnforcer):
2691 2019-08-28 Claudio Saavedra <csaavedra@igalia.com>
2693 [SOUP] Fix the debug build after r249192
2695 Unreviewed build fix.
2697 * platform/network/soup/SoupNetworkSession.cpp:
2698 (WebCore::SoupNetworkSession::setupHSTSEnforcer):
2700 2019-08-28 Carlos Garcia Campos <cgarcia@igalia.com>
2702 Unable to enter text in https://eat.fi
2703 https://bugs.webkit.org/show_bug.cgi?id=193046
2705 Reviewed by Ryosuke Niwa.
2707 This is because the button element inside the label is receiving the click event, which causes the form to be
2708 submitted. According to the spec we should do nothing in this case, because button element is considered to be
2709 interactive content.
2711 "The activation behavior of a label element for events targeted at interactive content descendants of a label
2712 element, and any descendants of those interactive content descendants, must be to do nothing."
2713 https://html.spec.whatwg.org/#the-label-element
2715 This patch adds HTMLElement::isInteractiveContent() according to the HTML spec:
2717 "Interactive content is content that is specifically intended for user interaction.
2718 a (if the href attribute is present), audio (if the controls attribute is present), button, details, embed,
2719 iframe, img (if the usemap attribute is present), input (if the type attribute is not in the Hidden state),
2720 label, object (if the usemap attribute is present), select, textarea, video (if the controls attribute is
2722 https://html.spec.whatwg.org/#interactive-content-2
2724 That's used in HTMLLabelElement::defaultEventHandler() using the helper method
2725 isEventTargetedAtInteractiveDescendants() to decide whether to simulate a click event or do nothing.
2727 * html/HTMLAnchorElement.cpp:
2728 (WebCore::HTMLAnchorElement::isInteractiveContent const):
2729 * html/HTMLAnchorElement.h:
2730 * html/HTMLButtonElement.h:
2731 * html/HTMLDetailsElement.h:
2732 * html/HTMLElement.h:
2733 (WebCore::HTMLElement::isInteractiveContent const):
2734 * html/HTMLEmbedElement.h:
2735 * html/HTMLIFrameElement.h:
2736 * html/HTMLImageElement.cpp:
2737 (WebCore::HTMLImageElement::isInteractiveContent const):
2738 * html/HTMLImageElement.h:
2739 * html/HTMLInputElement.cpp:
2740 (WebCore::HTMLInputElement::isInteractiveContent const):
2741 * html/HTMLInputElement.h:
2742 * html/HTMLLabelElement.cpp:
2743 (WebCore::HTMLLabelElement::isEventTargetedAtInteractiveDescendants const):
2744 (WebCore::HTMLLabelElement::defaultEventHandler):
2745 * html/HTMLLabelElement.h:
2746 * html/HTMLMediaElement.cpp:
2747 (WebCore::HTMLMediaElement::isInteractiveContent const):
2748 * html/HTMLMediaElement.h:
2749 * html/HTMLObjectElement.cpp:
2750 (WebCore::HTMLObjectElement::isInteractiveContent const):
2751 * html/HTMLObjectElement.h:
2752 * html/HTMLSelectElement.h:
2753 * html/HTMLTextAreaElement.h:
2754 * html/HiddenInputType.h:
2755 * html/InputType.cpp:
2756 (WebCore::InputType::isInteractiveContent const):
2759 2019-08-28 Claudio Saavedra <csaavedra@igalia.com>
2761 [GTK][WPE] Implement HSTS for the soup network backend
2762 https://bugs.webkit.org/show_bug.cgi?id=192074
2764 Reviewed by Carlos Garcia Campos.
2766 libsoup 2.67.1 introduced HSTS support via a SoupSessionFeature.
2767 Add support to the soup network backend by adding the feature to
2768 SoupNetworkSession and handling HSTS protocol upgrades, by
2769 propagating the scheme change further to clients. This patch adds
2770 the HSTS feature unconditionally, but it still possible to add
2771 a boolean property to the web context class if desired.
2773 Additionally, add API to the WebKitWebsiteDataManager to specify
2774 the directory where the HSTS database is saved. If the directory
2775 is not set or if the data manager is ephemeral, use a
2776 non-persistent, memory only HSTS enforcer.
2778 Implement as well the methods needed to clean-up and delete HSTS
2779 policies from the storage and expose the feature in GTK+ MiniBrowser's
2782 * platform/network/soup/GUniquePtrSoup.h:
2783 * platform/network/soup/SoupNetworkSession.cpp:
2784 (WebCore::hstsStorageDirectory):
2785 (WebCore::SoupNetworkSession::SoupNetworkSession):
2786 (WebCore::SoupNetworkSession::setHSTSPersistentStorage):
2787 (WebCore::SoupNetworkSession::setupHSTSEnforcer):
2788 (WebCore::SoupNetworkSession::getHostNamesWithHSTSCache):
2789 (WebCore::SoupNetworkSession::deleteHSTSCacheForHostNames):
2790 (WebCore::SoupNetworkSession::clearHSTSCache):
2791 * platform/network/soup/SoupNetworkSession.h:
2793 2019-08-28 Said Abou-Hallawa <sabouhallawa@apple.com>
2795 SVG2: Add length, item getter and item setter to all SVG lists
2796 https://bugs.webkit.org/show_bug.cgi?id=199526
2798 Reviewed by Simon Fraser.
2800 -- Implement the SVG2 specs for SVG lists:
2801 https://svgwg.org/svg2-draft/types.html#TermListInterface.
2803 -- Match the arguments' names in the IDL files with the specs.
2805 Tests: svg/dom/SVGLengthList-length-indexed-access.xhtml
2806 svg/dom/SVGPathSegList-length-indexed-access.xhtml
2808 * svg/SVGLengthList.idl:
2809 * svg/SVGNumberList.idl:
2810 * svg/SVGPathSegList.h:
2811 * svg/SVGPathSegList.idl:
2812 * svg/SVGPointList.idl:
2813 * svg/SVGStringList.idl:
2814 * svg/SVGTransformList.idl:
2815 * svg/properties/SVGList.h:
2816 (WebCore::SVGList::length const):
2817 (WebCore::SVGList::setItem):
2819 2019-08-27 John Wilander <wilander@apple.com> and Fujii Hironori <Hironori.Fujii@sony.com>
2821 Make FrameLoader::open() set outgoing referrer properly
2822 https://bugs.webkit.org/show_bug.cgi?id=167050
2823 <rdar://problem/27972404>
2825 Reviewed by Youenn Fablet.
2827 In debug builds, an assertion failed in WebCore::SecurityPolicy::generateReferrerHeader:
2828 ASSERTION FAILED: referrer == URL(URL(), referrer).strippedForUseAsReferrer()
2830 In release builds, cached pages with a URL fragment sent its URL fragment in the referrer.
2832 m_outgoingReferrer mistakenly had a URL fragment.
2834 Test: http/tests/navigation/page-cache-fragment-referrer.html
2836 * loader/FrameLoader.cpp:
2837 (WebCore::FrameLoader::open): Set m_outgoingReferrer by using
2838 FrameLoader::setOutgoingReferrer to remove URL fragments.
2840 2019-08-27 Said Abou-Hallawa <sabouhallawa@apple.com>
2842 Unreviewed. Build fix after r249175.
2844 Fix the condition which generates the declaration of vm in
2845 GenerateGetOwnPropertySlotByIndex.
2847 * bindings/scripts/CodeGeneratorJS.pm:
2848 (GenerateGetOwnPropertySlotByIndex):
2850 2019-08-27 Justin Fan <justin_fan@apple.com>
2852 [WebGPU] Implement GPUErrors for and relax GPUBuffer validation rules
2853 https://bugs.webkit.org/show_bug.cgi?id=200852
2855 Reviewed by Dean Jackson.
2857 Fix incorrect usage validation during GPUBuffer creation.
2858 Implement GPUError reporting for GPUBuffer creation and methods.
2860 Test: webgpu/buffer-errors.html
2862 * Modules/webgpu/WebGPUBuffer.cpp:
2863 (WebCore::WebGPUBuffer::create):
2864 (WebCore::WebGPUBuffer::WebGPUBuffer):
2865 (WebCore::WebGPUBuffer::unmap):
2866 (WebCore::WebGPUBuffer::destroy):
2867 (WebCore::WebGPUBuffer::rejectOrRegisterPromiseCallback):
2868 * Modules/webgpu/WebGPUBuffer.h: Now inherits from GPUObjectBase.
2869 * Modules/webgpu/WebGPUDevice.cpp:
2870 (WebCore::WebGPUDevice::createBuffer const):
2871 (WebCore::WebGPUDevice::createBufferMapped const):
2872 * platform/graphics/gpu/GPUBuffer.h: No longer inherits from GPUObjectBase.
2873 * platform/graphics/gpu/GPUObjectBase.h:
2874 (WebCore::GPUObjectBase::errorScopes):
2875 (WebCore::GPUObjectBase::generateError): Deleted.
2876 * platform/graphics/gpu/cocoa/GPUBufferMetal.mm:
2877 (WebCore::GPUBuffer::validateBufferUsage):
2878 (WebCore::GPUBuffer::tryCreate): Alignment issue should be general WebGPU requirement.
2879 (WebCore::GPUBuffer::GPUBuffer):
2880 (WebCore::GPUBuffer::~GPUBuffer): Must do cleanup without generating errors.
2881 (WebCore::GPUBuffer::registerMappingCallback):
2882 (WebCore::GPUBuffer::copyStagingBufferToGPU):
2883 (WebCore::GPUBuffer::unmap):
2884 (WebCore::GPUBuffer::destroy):
2886 2019-08-27 Zalan Bujtas <zalan@apple.com>
2888 [LFC][TFC] Layout and position the cell boxes
2889 https://bugs.webkit.org/show_bug.cgi?id=201192
2890 <rdar://problem/54758638>
2892 Reviewed by Antti Koivisto.
2894 Add a very basic (and faily incomplete) table cell layout logic. This is mostly WIP.
2897 * WebCore.xcodeproj/project.pbxproj:
2898 * layout/FormattingContext.h:
2899 * layout/FormattingContextGeometry.cpp:
2900 (WebCore::Layout::FormattingContext::Geometry::contentHeightForFormattingContextRoot):
2901 (WebCore::Layout::contentHeightForFormattingContextRoot): Deleted.
2902 * layout/tableformatting/TableFormattingContext.cpp:
2903 (WebCore::Layout::TableFormattingContext::layout const):
2904 (WebCore::Layout::TableFormattingContext::computedTableWidth const):
2905 * layout/tableformatting/TableFormattingContext.h:
2906 * layout/tableformatting/TableFormattingContextGeometry.cpp: Copied from Source/WebCore/layout/tableformatting/TableFormattingContext.h.
2907 (WebCore::Layout::TableFormattingContext::Geometry::tableCellHeightAndMargin):
2908 * layout/tableformatting/TableGrid.cpp:
2909 (WebCore::Layout::TableGrid::Column::setLogicalLeft):
2910 (WebCore::Layout::TableGrid::Column::logicalLeft const):
2911 * layout/tableformatting/TableGrid.h:
2912 (WebCore::Layout::TableGrid::Column::logicalRight const):
2913 (WebCore::Layout::TableGrid::Row::setLogicalTop):
2914 (WebCore::Layout::TableGrid::Row::logicalTop const):
2915 (WebCore::Layout::TableGrid::Row::setLogicalHeight):
2916 (WebCore::Layout::TableGrid::Row::logicalHeight const):
2917 (WebCore::Layout::TableGrid::Row::logicalBottom const):
2919 2019-08-27 Mark Lam <mark.lam@apple.com>
2921 Refactor to use VM& instead of VM* at as many places as possible.
2922 https://bugs.webkit.org/show_bug.cgi?id=201172
2924 Reviewed by Yusuke Suzuki.
2926 No new tests. Covered by existing tests.
2928 * Modules/encryptedmedia/legacy/LegacyCDMSessionClearKey.cpp:
2929 (WebCore::CDMSessionClearKey::update):
2930 * Modules/plugins/QuickTimePluginReplacement.mm:
2931 (WebCore::QuickTimePluginReplacement::ensureReplacementScriptInjected):
2932 (WebCore::QuickTimePluginReplacement::installReplacement):
2933 * animation/KeyframeEffect.cpp:
2934 (WebCore::processKeyframeLikeObject):
2935 * bindings/js/GCController.cpp:
2936 (WebCore::GCController::dumpHeap):
2937 * bindings/js/IDBBindingUtilities.cpp:
2940 * bindings/js/JSCSSRuleListCustom.cpp:
2941 (WebCore::JSCSSRuleListOwner::isReachableFromOpaqueRoots):
2942 * bindings/js/JSCustomElementRegistryCustom.cpp:
2943 (WebCore::JSCustomElementRegistry::define):
2944 * bindings/js/JSCustomXPathNSResolver.cpp:
2945 (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
2946 * bindings/js/JSDOMConvertRecord.h:
2947 * bindings/js/JSDOMConvertStrings.h:
2948 (WebCore::JSConverter<IDLDOMString>::convert):
2949 (WebCore::JSConverter<IDLByteString>::convert):
2950 (WebCore::JSConverter<IDLUSVString>::convert):
2951 * bindings/js/JSDOMWindowCustom.cpp:
2952 (WebCore::JSDOMWindow::getOwnPropertySlotByIndex):
2953 (WebCore::addScopedChildrenIndexes):
2954 (WebCore::JSDOMWindow::defineOwnProperty):
2955 (WebCore::DialogHandler::dialogCreated):
2956 (WebCore::DialogHandler::returnValue const):
2957 (WebCore::JSDOMWindow::setOpener):
2958 (WebCore::JSDOMWindow::setOpenDatabase):
2959 * bindings/js/JSDOMWindowProperties.cpp:
2960 (WebCore::JSDOMWindowProperties::getOwnPropertySlotByIndex):
2961 * bindings/js/JSDeprecatedCSSOMValueCustom.cpp:
2962 (WebCore::JSDeprecatedCSSOMValueOwner::isReachableFromOpaqueRoots):
2963 * bindings/js/JSEventListener.cpp:
2964 (WebCore::JSEventListener::handleEvent):
2965 * bindings/js/JSImageDataCustom.cpp:
2966 (WebCore::toJSNewlyCreated):
2967 * bindings/js/JSLazyEventListener.cpp:
2968 (WebCore::JSLazyEventListener::initializeJSFunction const):
2969 * bindings/js/JSLocationCustom.cpp:
2970 (WebCore::JSLocation::getOwnPropertySlotByIndex):
2971 (WebCore::JSLocation::putByIndex):
2972 * bindings/js/JSNodeListCustom.cpp:
2973 (WebCore::JSNodeListOwner::isReachableFromOpaqueRoots):
2974 * bindings/js/JSPluginElementFunctions.cpp:
2975 (WebCore::pluginElementCustomGetCallData):
2976 * bindings/js/JSRemoteDOMWindowCustom.cpp:
2977 (WebCore::JSRemoteDOMWindow::getOwnPropertySlotByIndex):
2978 * bindings/js/ReadableStreamDefaultController.cpp:
2979 (WebCore::ReadableStreamDefaultController::invoke):
2980 * bindings/js/ScriptController.cpp:
2981 (WebCore::ScriptController::linkAndEvaluateModuleScriptInWorld):
2982 * bindings/js/ScriptModuleLoader.cpp:
2983 (WebCore::ScriptModuleLoader::resolve):
2984 (WebCore::ScriptModuleLoader::importModule):
2985 (WebCore::ScriptModuleLoader::createImportMetaProperties):
2986 * bindings/js/SerializedScriptValue.cpp:
2987 (WebCore::CloneSerializer::CloneSerializer):
2988 (WebCore::CloneSerializer::write):
2989 (WebCore::CloneSerializer::serialize):
2990 (WebCore::CloneDeserializer::CachedString::jsString):
2991 (WebCore::CloneDeserializer::readTerminal):
2992 (WebCore::CloneDeserializer::deserialize):
2993 * bindings/js/WebCoreBuiltinNames.h:
2994 (WebCore::WebCoreBuiltinNames::WebCoreBuiltinNames):
2995 * bindings/js/WebCoreJSClientData.cpp:
2996 (WebCore::JSVMClientData::JSVMClientData):
2997 * bindings/js/WindowProxy.cpp:
2998 (WebCore::WindowProxy::clearJSWindowProxiesNotMatchingDOMWindow):
2999 * bindings/scripts/CodeGeneratorJS.pm:
3000 (GenerateGetOwnPropertySlotByIndex):
3001 (GenerateGetOwnPropertyNames):
3002 (GeneratePutByIndex):
3003 (GenerateDeletePropertyByIndex):
3004 (GenerateDictionaryImplementationContent):
3005 (addUnscopableProperties):
3006 (GenerateImplementation):
3007 (GenerateAttributeSetterBodyDefinition):
3008 (GenerateOperationDefinition):
3009 (GenerateSerializerDefinition):
3010 (GenerateCallbackImplementationContent):
3011 (GenerateConstructorHelperMethods):
3012 * bindings/scripts/test/JS/JSInterfaceName.cpp:
3013 (WebCore::JSInterfaceNameConstructor::initializeProperties):
3014 * bindings/scripts/test/JS/JSMapLike.cpp:
3015 (WebCore::JSMapLikeConstructor::initializeProperties):
3016 * bindings/scripts/test/JS/JSReadOnlyMapLike.cpp:
3017 (WebCore::JSReadOnlyMapLikeConstructor::initializeProperties):
3018 * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
3019 (WebCore::JSTestActiveDOMObjectConstructor::initializeProperties):
3020 * bindings/scripts/test/JS/JSTestCEReactions.cpp:
3021 (WebCore::JSTestCEReactionsConstructor::initializeProperties):
3022 (WebCore::setJSTestCEReactionsAttributeWithCEReactionsSetter):
3023 (WebCore::setJSTestCEReactionsReflectAttributeWithCEReactionsSetter):
3024 (WebCore::setJSTestCEReactionsStringifierAttributeSetter):
3025 (WebCore::setJSTestCEReactionsAttributeWithCEReactionsNotNeededSetter):
3026 (WebCore::setJSTestCEReactionsReflectAttributeWithCEReactionsNotNeededSetter):
3027 (WebCore::setJSTestCEReactionsStringifierAttributeNotNeededSetter):
3028 * bindings/scripts/test/JS/JSTestCEReactionsStringifier.cpp:
3029 (WebCore::JSTestCEReactionsStringifierConstructor::initializeProperties):
3030 (WebCore::setJSTestCEReactionsStringifierValueSetter):
3031 (WebCore::setJSTestCEReactionsStringifierValueWithoutReactionsSetter):
3032 * bindings/scripts/test/JS/JSTestCallTracer.cpp:
3033 (WebCore::JSTestCallTracerConstructor::initializeProperties):
3034 (WebCore::setJSTestCallTracerTestAttributeInterfaceSetter):
3035 (WebCore::setJSTestCallTracerTestAttributeSpecifiedSetter):
3036 (WebCore::setJSTestCallTracerTestAttributeWithVariantSetter):
3037 * bindings/scripts/test/JS/JSTestCallbackInterface.cpp:
3038 (WebCore::convertDictionary<TestCallbackInterface::Dictionary>):
3039 (WebCore::JSTestCallbackInterfaceConstructor::initializeProperties):
3040 (WebCore::JSTestCallbackInterface::callbackWithNoParam):
3041 (WebCore::JSTestCallbackInterface::callbackWithArrayParam):
3042 (WebCore::JSTestCallbackInterface::callbackWithSerializedScriptValueParam):
3043 (WebCore::JSTestCallbackInterface::callbackWithStringList):
3044 (WebCore::JSTestCallbackInterface::callbackWithBoolean):
3045 (WebCore::JSTestCallbackInterface::callbackRequiresThisToPass):
3046 (WebCore::JSTestCallbackInterface::callbackWithAReturnValue):
3047 (WebCore::JSTestCallbackInterface::callbackThatRethrowsExceptions):
3048 (WebCore::JSTestCallbackInterface::callbackThatSkipsInvokeCheck):
3049 (WebCore::JSTestCallbackInterface::callbackWithThisObject):
3050 * bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp:
3051 (WebCore::JSTestClassWithJSBuiltinConstructorConstructor::initializeProperties):
3052 * bindings/scripts/test/JS/JSTestDOMJIT.cpp:
3053 (WebCore::JSTestDOMJITConstructor::initializeProperties):
3054 (WebCore::jsTestDOMJITPrototypeFunctionGetAttributeWithoutTypeCheck):
3055 (WebCore::jsTestDOMJITPrototypeFunctionItemWithoutTypeCheck):
3056 (WebCore::jsTestDOMJITPrototypeFunctionHasAttributeWithoutTypeCheck):
3057 (WebCore::jsTestDOMJITPrototypeFunctionGetElementByIdWithoutTypeCheck):
3058 (WebCore::jsTestDOMJITPrototypeFunctionGetElementsByNameWithoutTypeCheck):
3059 * bindings/scripts/test/JS/JSTestEnabledBySetting.cpp:
3060 (WebCore::JSTestEnabledBySettingConstructor::initializeProperties):
3061 (WebCore::JSTestEnabledBySettingPrototype::finishCreation):
3062 (WebCore::setJSTestEnabledBySettingTestSubObjEnabledBySettingConstructorSetter):
3063 (WebCore::setJSTestEnabledBySettingEnabledBySettingAttributeSetter):
3064 * bindings/scripts/test/JS/JSTestEnabledForContext.cpp:
3065 (WebCore::JSTestEnabledForContextConstructor::initializeProperties):
3066 (WebCore::setJSTestEnabledForContextTestSubObjEnabledForContextConstructorSetter):
3067 * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
3068 (WebCore::convertDictionary<TestEventConstructor::Init>):
3069 (WebCore::JSTestEventConstructorConstructor::initializeProperties):
3070 * bindings/scripts/test/JS/JSTestEventTarget.cpp:
3071 (WebCore::JSTestEventTargetConstructor::initializeProperties):
3072 (WebCore::JSTestEventTarget::getOwnPropertySlotByIndex):
3073 (WebCore::JSTestEventTarget::getOwnPropertyNames):
3074 * bindings/scripts/test/JS/JSTestException.cpp:
3075 (WebCore::JSTestExceptionConstructor::initializeProperties):
3076 * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
3077 (WebCore::JSTestGenerateIsReachableConstructor::initializeProperties):
3078 (WebCore::JSTestGenerateIsReachablePrototype::finishCreation):
3079 * bindings/scripts/test/JS/JSTestGlobalObject.cpp:
3080 (WebCore::JSTestGlobalObjectConstructor::initializeProperties):
3081 (WebCore::setJSTestGlobalObjectRegularAttributeSetter):
3082 (WebCore::setJSTestGlobalObjectPublicAndPrivateAttributeSetter):
3083 (WebCore::setJSTestGlobalObjectPublicAndPrivateConditionalAttributeSetter):
3084 (WebCore::setJSTestGlobalObjectEnabledAtRuntimeAttributeSetter):
3085 (WebCore::setJSTestGlobalObjectTestCEReactionsConstructorSetter):
3086 (WebCore::setJSTestGlobalObjectTestCEReactionsStringifierConstructorSetter):
3087 (WebCore::setJSTestGlobalObjectTestCallTracerConstructorSetter):
3088 (WebCore::setJSTestGlobalObjectTestCallbackInterfaceConstructorSetter):
3089 (WebCore::setJSTestGlobalObjectTestClassWithJSBuiltinConstructorConstructorSetter):
3090 (WebCore::setJSTestGlobalObjectTestDOMJITConstructorSetter):
3091 (WebCore::setJSTestGlobalObjectTestDomainSecurityConstructorSetter):
3092 (WebCore::setJSTestGlobalObjectTestEnabledBySettingConstructorSetter):
3093 (WebCore::setJSTestGlobalObjectTestEnabledForContextConstructorSetter):
3094 (WebCore::setJSTestGlobalObjectTestEventConstructorConstructorSetter):
3095 (WebCore::setJSTestGlobalObjectTestEventTargetConstructorSetter):
3096 (WebCore::setJSTestGlobalObjectTestExceptionConstructorSetter):
3097 (WebCore::setJSTestGlobalObjectTestGenerateIsReachableConstructorSetter):
3098 (WebCore::setJSTestGlobalObjectTestGlobalObjectConstructorSetter):
3099 (WebCore::setJSTestGlobalObjectTestIndexedSetterNoIdentifierConstructorSetter):
3100 (WebCore::setJSTestGlobalObjectTestIndexedSetterThrowingExceptionConstructorSetter):
3101 (WebCore::setJSTestGlobalObjectTestIndexedSetterWithIdentifierConstructorSetter):
3102 (WebCore::setJSTestGlobalObjectTestInterfaceConstructorSetter):
3103 (WebCore::setJSTestGlobalObjectTestInterfaceLeadingUnderscoreConstructorSetter):
3104 (WebCore::setJSTestGlobalObjectTestIterableConstructorSetter):
3105 (WebCore::setJSTestGlobalObjectTestJSBuiltinConstructorConstructorSetter):
3106 (WebCore::setJSTestGlobalObjectTestMapLikeConstructorSetter):
3107 (WebCore::setJSTestGlobalObjectTestMediaQueryListListenerConstructorSetter):
3108 (WebCore::setJSTestGlobalObjectTestNamedAndIndexedSetterNoIdentifierConstructorSetter):
3109 (WebCore::setJSTestGlobalObjectTestNamedAndIndexedSetterThrowingExceptionConstructorSetter):
3110 (WebCore::setJSTestGlobalObjectTestNamedAndIndexedSetterWithIdentifierConstructorSetter):
3111 (WebCore::setJSTestGlobalObjectTestNamedConstructorConstructorSetter):
3112 (WebCore::setJSTestGlobalObjectAudioConstructorSetter):
3113 (WebCore::setJSTestGlobalObjectTestNamedDeleterNoIdentifierConstructorSetter):
3114 (WebCore::setJSTestGlobalObjectTestNamedDeleterThrowingExceptionConstructorSetter):
3115 (WebCore::setJSTestGlobalObjectTestNamedDeleterWithIdentifierConstructorSetter):
3116 (WebCore::setJSTestGlobalObjectTestNamedDeleterWithIndexedGetterConstructorSetter):
3117 (WebCore::setJSTestGlobalObjectTestNamedGetterCallWithConstructorSetter):
3118 (WebCore::setJSTestGlobalObjectTestNamedGetterNoIdentifierConstructorSetter):
3119 (WebCore::setJSTestGlobalObjectTestNamedGetterWithIdentifierConstructorSetter):
3120 (WebCore::setJSTestGlobalObjectTestNamedSetterNoIdentifierConstructorSetter):
3121 (WebCore::setJSTestGlobalObjectTestNamedSetterThrowingExceptionConstructorSetter):
3122 (WebCore::setJSTestGlobalObjectTestNamedSetterWithIdentifierConstructorSetter):
3123 (WebCore::setJSTestGlobalObjectTestNamedSetterWithIndexedGetterConstructorSetter):
3124 (WebCore::setJSTestGlobalObjectTestNamedSetterWithIndexedGetterAndSetterConstructorSetter):
3125 (WebCore::setJSTestGlobalObjectTestNamedSetterWithOverrideBuiltinsConstructorSetter):
3126 (WebCore::setJSTestGlobalObjectTestNamedSetterWithUnforgablePropertiesConstructorSetter):
3127 (WebCore::setJSTestGlobalObjectTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltinsConstructorSetter):
3128 (WebCore::setJSTestGlobalObjectTestOverloadedConstructorsConstructorSetter):
3129 (WebCore::setJSTestGlobalObjectTestOverloadedConstructorsWithSequenceConstructorSetter):
3130 (WebCore::setJSTestGlobalObjectTestOverrideBuiltinsConstructorSetter):
3131 (WebCore::setJSTestGlobalObjectTestPluginInterfaceConstructorSetter):
3132 (WebCore::setJSTestGlobalObjectTestReadOnlyMapLikeConstructorSetter):
3133 (WebCore::setJSTestGlobalObjectTestReportExtraMemoryCostConstructorSetter):
3134 (WebCore::setJSTestGlobalObjectTestSerializationConstructorSetter):
3135 (WebCore::setJSTestGlobalObjectTestSerializationIndirectInheritanceConstructorSetter):
3136 (WebCore::setJSTestGlobalObjectTestSerializationInheritConstructorSetter):
3137 (WebCore::setJSTestGlobalObjectTestSerializationInheritFinalConstructorSetter):
3138 (WebCore::setJSTestGlobalObjectTestSerializedScriptValueInterfaceConstructorSetter):
3139 (WebCore::setJSTestGlobalObjectTestStringifierConstructorSetter):
3140 (WebCore::setJSTestGlobalObjectTestStringifierAnonymousOperationConstructorSetter):
3141 (WebCore::setJSTestGlobalObjectTestStringifierNamedOperationConstructorSetter):
3142 (WebCore::setJSTestGlobalObjectTestStringifierOperationImplementedAsConstructorSetter):
3143 (WebCore::setJSTestGlobalObjectTestStringifierOperationNamedToStringConstructorSetter):
3144 (WebCore::setJSTestGlobalObjectTestStringifierReadOnlyAttributeConstructorSetter):
3145 (WebCore::setJSTestGlobalObjectTestStringifierReadWriteAttributeConstructorSetter):
3146 (WebCore::setJSTestGlobalObjectTestTypedefsConstructorSetter):
3147 * bindings/scripts/test/JS/JSTestIndexedSetterNoIdentifier.cpp:
3148 (WebCore::JSTestIndexedSetterNoIdentifierConstructor::initializeProperties):
3149 (WebCore::JSTestIndexedSetterNoIdentifier::getOwnPropertyNames):
3150 * bindings/scripts/test/JS/JSTestIndexedSetterThrowingException.cpp:
3151 (WebCore::JSTestIndexedSetterThrowingExceptionConstructor::initializeProperties):
3152 (WebCore::JSTestIndexedSetterThrowingException::getOwnPropertyNames):
3153 * bindings/scripts/test/JS/JSTestIndexedSetterWithIdentifier.cpp:
3154 (WebCore::JSTestIndexedSetterWithIdentifierConstructor::initializeProperties):
3155 (WebCore::JSTestIndexedSetterWithIdentifier::getOwnPropertyNames):
3156 * bindings/scripts/test/JS/JSTestInterface.cpp:
3157 (WebCore::JSTestInterfaceConstructor::initializeProperties):
3158 (WebCore::setJSTestInterfaceConstructorImplementsStaticAttrSetter):
3159 (WebCore::setJSTestInterfaceImplementsStr2Setter):
3160 (WebCore::setJSTestInterfaceImplementsStr3Setter):
3161 (WebCore::setJSTestInterfaceImplementsNodeSetter):
3162 (WebCore::setJSTestInterfaceConstructorSupplementalStaticAttrSetter):
3163 (WebCore::setJSTestInterfaceSupplementalStr2Setter):
3164 (WebCore::setJSTestInterfaceSupplementalStr3Setter):
3165 (WebCore::setJSTestInterfaceSupplementalNodeSetter):
3166 (WebCore::setJSTestInterfaceReflectAttributeSetter):
3167 * bindings/scripts/test/JS/JSTestInterfaceLeadingUnderscore.cpp:
3168 (WebCore::JSTestInterfaceLeadingUnderscoreConstructor::initializeProperties):
3169 * bindings/scripts/test/JS/JSTestIterable.cpp:
3170 (WebCore::JSTestIterableConstructor::initializeProperties):
3171 * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp:
3172 (WebCore::JSTestJSBuiltinConstructorConstructor::initializeProperties):
3173 (WebCore::setJSTestJSBuiltinConstructorTestAttributeRWCustomSetter):
3174 * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
3175 (WebCore::JSTestMediaQueryListListenerConstructor::initializeProperties):
3176 * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterNoIdentifier.cpp:
3177 (WebCore::JSTestNamedAndIndexedSetterNoIdentifierConstructor::initializeProperties):
3178 (WebCore::JSTestNamedAndIndexedSetterNoIdentifier::getOwnPropertySlotByIndex):
3179 (WebCore::JSTestNamedAndIndexedSetterNoIdentifier::getOwnPropertyNames):
3180 (WebCore::JSTestNamedAndIndexedSetterNoIdentifier::putByIndex):
3181 * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterThrowingException.cpp:
3182 (WebCore::JSTestNamedAndIndexedSetterThrowingExceptionConstructor::initializeProperties):
3183 (WebCore::JSTestNamedAndIndexedSetterThrowingException::getOwnPropertySlotByIndex):
3184 (WebCore::JSTestNamedAndIndexedSetterThrowingException::getOwnPropertyNames):
3185 (WebCore::JSTestNamedAndIndexedSetterThrowingException::putByIndex):
3186 * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterWithIdentifier.cpp:
3187 (WebCore::JSTestNamedAndIndexedSetterWithIdentifierConstructor::initializeProperties):
3188 (WebCore::JSTestNamedAndIndexedSetterWithIdentifier::getOwnPropertySlotByIndex):
3189 (WebCore::JSTestNamedAndIndexedSetterWithIdentifier::getOwnPropertyNames):
3190 (WebCore::JSTestNamedAndIndexedSetterWithIdentifier::putByIndex):
3191 * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
3192 (WebCore::JSTestNamedConstructorConstructor::initializeProperties):
3193 (WebCore::JSTestNamedConstructorNamedConstructor::initializeProperties):
3194 * bindings/scripts/test/JS/JSTestNamedDeleterNoIdentifier.cpp:
3195 (WebCore::JSTestNamedDeleterNoIdentifierConstructor::initializeProperties):
3196 (WebCore::JSTestNamedDeleterNoIdentifier::getOwnPropertySlotByIndex):
3197 (WebCore::JSTestNamedDeleterNoIdentifier::getOwnPropertyNames):
3198 (WebCore::JSTestNamedDeleterNoIdentifier::deletePropertyByIndex):
3199 * bindings/scripts/test/JS/JSTestNamedDeleterThrowingException.cpp:
3200 (WebCore::JSTestNamedDeleterThrowingExceptionConstructor::initializeProperties):
3201 (WebCore::JSTestNamedDeleterThrowingException::getOwnPropertySlotByIndex):
3202 (WebCore::JSTestNamedDeleterThrowingException::getOwnPropertyNames):
3203 (WebCore::JSTestNamedDeleterThrowingException::deletePropertyByIndex):
3204 * bindings/scripts/test/JS/JSTestNamedDeleterWithIdentifier.cpp:
3205 (WebCore::JSTestNamedDeleterWithIdentifierConstructor::initializeProperties):
3206 (WebCore::JSTestNamedDeleterWithIdentifier::getOwnPropertySlotByIndex):
3207 (WebCore::JSTestNamedDeleterWithIdentifier::getOwnPropertyNames):
3208 (WebCore::JSTestNamedDeleterWithIdentifier::deletePropertyByIndex):
3209 * bindings/scripts/test/JS/JSTestNamedDeleterWithIndexedGetter.cpp:
3210 (WebCore::JSTestNamedDeleterWithIndexedGetterConstructor::initializeProperties):
3211 (WebCore::JSTestNamedDeleterWithIndexedGetter::getOwnPropertySlotByIndex):
3212 (WebCore::JSTestNamedDeleterWithIndexedGetter::getOwnPropertyNames):
3213 * bindings/scripts/test/JS/JSTestNamedGetterCallWith.cpp:
3214 (WebCore::JSTestNamedGetterCallWithConstructor::initializeProperties):
3215 (WebCore::JSTestNamedGetterCallWith::getOwnPropertySlotByIndex):
3216 (WebCore::JSTestNamedGetterCallWith::getOwnPropertyNames):
3217 * bindings/scripts/test/JS/JSTestNamedGetterNoIdentifier.cpp:
3218 (WebCore::JSTestNamedGetterNoIdentifierConstructor::initializeProperties):
3219 (WebCore::JSTestNamedGetterNoIdentifier::getOwnPropertySlotByIndex):
3220 (WebCore::JSTestNamedGetterNoIdentifier::getOwnPropertyNames):
3221 * bindings/scripts/test/JS/JSTestNamedGetterWithIdentifier.cpp:
3222 (WebCore::JSTestNamedGetterWithIdentifierConstructor::initializeProperties):
3223 (WebCore::JSTestNamedGetterWithIdentifier::getOwnPropertySlotByIndex):
3224 (WebCore::JSTestNamedGetterWithIdentifier::getOwnPropertyNames):
3225 * bindings/scripts/test/JS/JSTestNamedSetterNoIdentifier.cpp:
3226 (WebCore::JSTestNamedSetterNoIdentifierConstructor::initializeProperties):
3227 (WebCore::JSTestNamedSetterNoIdentifier::getOwnPropertySlotByIndex):
3228 (WebCore::JSTestNamedSetterNoIdentifier::getOwnPropertyNames):
3229 (WebCore::JSTestNamedSetterNoIdentifier::putByIndex):
3230 * bindings/scripts/test/JS/JSTestNamedSetterThrowingException.cpp:
3231 (WebCore::JSTestNamedSetterThrowingExceptionConstructor::initializeProperties):
3232 (WebCore::JSTestNamedSetterThrowingException::getOwnPropertySlotByIndex):
3233 (WebCore::JSTestNamedSetterThrowingException::getOwnPropertyNames):
3234 (WebCore::JSTestNamedSetterThrowingException::putByIndex):
3235 * bindings/scripts/test/JS/JSTestNamedSetterWithIdentifier.cpp:
3236 (WebCore::JSTestNamedSetterWithIdentifierConstructor::initializeProperties):
3237 (WebCore::JSTestNamedSetterWithIdentifier::getOwnPropertySlotByIndex):
3238 (WebCore::JSTestNamedSetterWithIdentifier::getOwnPropertyNames):
3239 (WebCore::JSTestNamedSetterWithIdentifier::putByIndex):
3240 * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetter.cpp:
3241 (WebCore::JSTestNamedSetterWithIndexedGetterConstructor::initializeProperties):
3242 (WebCore::JSTestNamedSetterWithIndexedGetter::getOwnPropertySlotByIndex):
3243 (WebCore::JSTestNamedSetterWithIndexedGetter::getOwnPropertyNames):
3244 (WebCore::JSTestNamedSetterWithIndexedGetter::putByIndex):
3245 * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetterAndSetter.cpp:
3246 (WebCore::JSTestNamedSetterWithIndexedGetterAndSetterConstructor::initializeProperties):
3247 (WebCore::JSTestNamedSetterWithIndexedGetterAndSetter::getOwnPropertySlotByIndex):
3248 (WebCore::JSTestNamedSetterWithIndexedGetterAndSetter::getOwnPropertyNames):
3249 (WebCore::JSTestNamedSetterWithIndexedGetterAndSetter::putByIndex):
3250 * bindings/scripts/test/JS/JSTestNamedSetterWithOverrideBuiltins.cpp:
3251 (WebCore::JSTestNamedSetterWithOverrideBuiltinsConstructor::initializeProperties):
3252 (WebCore::JSTestNamedSetterWithOverrideBuiltins::getOwnPropertySlotByIndex):
3253 (WebCore::JSTestNamedSetterWithOverrideBuiltins::getOwnPropertyNames):
3254 (WebCore::JSTestNamedSetterWithOverrideBuiltins::putByIndex):
3255 * bindings/scripts/test/JS/JSTestNamedSetterWithUnforgableProperties.cpp:
3256 (WebCore::JSTestNamedSetterWithUnforgablePropertiesConstructor::initializeProperties):
3257 (WebCore::JSTestNamedSetterWithUnforgableProperties::getOwnPropertySlotByIndex):
3258 (WebCore::JSTestNamedSetterWithUnforgableProperties::getOwnPropertyNames):
3259 (WebCore::JSTestNamedSetterWithUnforgableProperties::putByIndex):
3260 * bindings/scripts/test/JS/JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins.cpp:
3261 (WebCore::JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltinsConstructor::initializeProperties):
3262 (WebCore::JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins::getOwnPropertySlotByIndex):
3263 (WebCore::JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins::getOwnPropertyNames):
3264 (WebCore::JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins::putByIndex):
3265 * bindings/scripts/test/JS/JSTestNode.cpp:
3266 (WebCore::JSTestNodeConstructor::initializeProperties):
3267 (WebCore::JSTestNodePrototype::finishCreation):
3268 (WebCore::setJSTestNodeNameSetter):
3269 (WebCore::JSTestNode::serialize):
3270 * bindings/scripts/test/JS/JSTestObj.cpp:
3271 (WebCore::convertDictionary<TestObj::Dictionary>):
3272 (WebCore::convertDictionaryToJS):
3273 (WebCore::convertDictionary<TestObj::DictionaryThatShouldNotTolerateNull>):
3274 (WebCore::convertDictionary<TestObj::DictionaryThatShouldTolerateNull>):
3275 (WebCore::convertDictionary<AlternateDictionaryName>):
3276 (WebCore::convertDictionary<TestObj::ParentDictionary>):
3277 (WebCore::convertDictionary<TestObj::ChildDictionary>):
3278 (WebCore::convertDictionary<TestObj::ConditionalDictionaryA>):
3279 (WebCore::convertDictionary<TestObj::ConditionalDictionaryB>):
3280 (WebCore::convertDictionary<TestObj::ConditionalDictionaryC>):
3281 (WebCore::JSTestObjConstructor::initializeProperties):
3282 (WebCore::JSTestObjPrototype::finishCreation):
3283 (WebCore::JSTestObj::getOwnPropertyNames):
3284 (WebCore::setJSTestObjConstructorStaticStringAttrSetter):
3285 (WebCore::setJSTestObjEnumAttrSetter):
3286 (WebCore::setJSTestObjByteAttrSetter):
3287 (WebCore::setJSTestObjOctetAttrSetter):
3288 (WebCore::setJSTestObjShortAttrSetter):
3289 (WebCore::setJSTestObjClampedShortAttrSetter):
3290 (WebCore::setJSTestObjEnforceRangeShortAttrSetter):
3291 (WebCore::setJSTestObjUnsignedShortAttrSetter):
3292 (WebCore::setJSTestObjLongAttrSetter):
3293 (WebCore::setJSTestObjLongLongAttrSetter):
3294 (WebCore::setJSTestObjUnsignedLongLongAttrSetter):
3295 (WebCore::setJSTestObjStringAttrSetter):
3296 (WebCore::setJSTestObjUsvstringAttrSetter):
3297 (WebCore::setJSTestObjTestObjAttrSetter):
3298 (WebCore::setJSTestObjTestNullableObjAttrSetter):
3299 (WebCore::setJSTestObjLenientTestObjAttrSetter):
3300 (WebCore::setJSTestObjStringAttrTreatingNullAsEmptyStringSetter):
3301 (WebCore::setJSTestObjUsvstringAttrTreatingNullAsEmptyStringSetter):
3302 (WebCore::setJSTestObjByteStringAttrTreatingNullAsEmptyStringSetter):
3303 (WebCore::setJSTestObjStringLongRecordAttrSetter):
3304 (WebCore::setJSTestObjUsvstringLongRecordAttrSetter):
3305 (WebCore::setJSTestObjStringObjRecordAttrSetter):
3306 (WebCore::setJSTestObjStringNullableObjRecordAttrSetter):
3307 (WebCore::setJSTestObjDictionaryAttrSetter):
3308 (WebCore::setJSTestObjNullableDictionaryAttrSetter):
3309 (WebCore::setJSTestObjAnnotatedTypeInUnionAttrSetter):
3310 (WebCore::setJSTestObjAnnotatedTypeInSequenceAttrSetter):
3311 (WebCore::setJSTestObjImplementationEnumAttrSetter):
3312 (WebCore::setJSTestObjXMLObjAttrSetter):
3313 (WebCore::setJSTestObjCreateSetter):
3314 (WebCore::setJSTestObjReflectedStringAttrSetter):
3315 (WebCore::setJSTestObjReflectedUSVStringAttrSetter):
3316 (WebCore::setJSTestObjReflectedIntegralAttrSetter):
3317 (WebCore::setJSTestObjReflectedUnsignedIntegralAttrSetter):
3318 (WebCore::setJSTestObjReflectedBooleanAttrSetter):
3319 (WebCore::setJSTestObjReflectedURLAttrSetter):
3320 (WebCore::setJSTestObjReflectedUSVURLAttrSetter):
3321 (WebCore::setJSTestObjReflectedCustomIntegralAttrSetter):
3322 (WebCore::setJSTestObjReflectedCustomBooleanAttrSetter):
3323 (WebCore::setJSTestObjReflectedCustomURLAttrSetter):
3324 (WebCore::setJSTestObjEnabledAtRuntimeAttributeSetter):
3325 (WebCore::setJSTestObjConstructorEnabledAtRuntimeAttributeStaticSetter):
3326 (WebCore::setJSTestObjTypedArrayAttrSetter):
3327 (WebCore::setJSTestObjCustomAttrSetter):
3328 (WebCore::setJSTestObjOnfooSetter):
3329 (WebCore::setJSTestObjOnwebkitfooSetter):
3330 (WebCore::setJSTestObjWithExecStateAttributeSetter):
3331 (WebCore::setJSTestObjWithCallWithAndSetterCallWithAttributeSetter):
3332 (WebCore::setJSTestObjWithScriptExecutionContextAttributeSetter):
3333 (WebCore::setJSTestObjWithScriptExecutionContextAndExecStateAttributeSetter):
3334 (WebCore::setJSTestObjWithScriptExecutionContextAndExecStateWithSpacesAttributeSetter):
3335 (WebCore::setJSTestObjConditionalAttr1Setter):
3336 (WebCore::setJSTestObjConditionalAttr2Setter):
3337 (WebCore::setJSTestObjConditionalAttr3Setter):
3338 (WebCore::setJSTestObjConditionalAttr4ConstructorSetter):
3339 (WebCore::setJSTestObjConditionalAttr5ConstructorSetter):
3340 (WebCore::setJSTestObjConditionalAttr6ConstructorSetter):
3341 (WebCore::setJSTestObjAnyAttributeSetter):
3342 (WebCore::setJSTestObjObjectAttributeSetter):
3343 (WebCore::setJSTestObjMutablePointSetter):
3344 (WebCore::setJSTestObjStrawberrySetter):
3345 (WebCore::setJSTestObjIdSetter):
3346 (WebCore::setJSTestObjReplaceableAttributeSetter):
3347 (WebCore::setJSTestObjNullableLongSettableAttributeSetter):
3348 (WebCore::setJSTestObjNullableStringSettableAttributeSetter):
3349 (WebCore::setJSTestObjNullableUSVStringSettableAttributeSetter):
3350 (WebCore::setJSTestObjNullableByteStringSettableAttributeSetter):
3351 (WebCore::setJSTestObjAttributeWithReservedEnumTypeSetter):
3352 (WebCore::setJSTestObjPutForwardsAttributeSetter):
3353 (WebCore::setJSTestObjPutForwardsNullableAttributeSetter):
3354 (WebCore::setJSTestObjStringifierAttributeSetter):
3355 (WebCore::setJSTestObjConditionallyReadWriteAttributeSetter):
3356 (WebCore::setJSTestObjConditionalAndConditionallyReadWriteAttributeSetter):
3357 (WebCore::setJSTestObjConditionallyExposedToWindowAttributeSetter):
3358 (WebCore::setJSTestObjConditionallyExposedToWorkerAttributeSetter):
3359 (WebCore::setJSTestObjConditionallyExposedToWindowAndWorkerAttributeSetter):
3360 (WebCore::JSTestObj::serialize):
3361 * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
3362 (WebCore::JSTestOverloadedConstructorsConstructor::initializeProperties):
3363 * bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp:
3364 (WebCore::JSTestOverloadedConstructorsWithSequenceConstructor::initializeProperties):
3365 * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
3366 (WebCore::JSTestOverrideBuiltinsConstructor::initializeProperties):
3367 (WebCore::JSTestOverrideBuiltins::getOwnPropertySlotByIndex):
3368 (WebCore::JSTestOverrideBuiltins::getOwnPropertyNames):
3369 * bindings/scripts/test/JS/JSTestPluginInterface.cpp:
3370 (WebCore::JSTestPluginInterfaceConstructor::initializeProperties):
3371 (WebCore::JSTestPluginInterface::getOwnPropertySlotByIndex):
3372 (WebCore::JSTestPluginInterface::putByIndex):
3373 * bindings/scripts/test/JS/JSTestPromiseRejectionEvent.cpp:
3374 (WebCore::convertDictionary<TestPromiseRejectionEvent::Init>):
3375 (WebCore::JSTestPromiseRejectionEventConstructor::initializeProperties):
3376 * bindings/scripts/test/JS/JSTestSerialization.cpp:
3377 (WebCore::JSTestSerializationConstructor::initializeProperties):
3378 (WebCore::setJSTestSerializationFirstStringAttributeSetter):
3379 (WebCore::setJSTestSerializationSecondLongAttributeSetter):
3380 (WebCore::setJSTestSerializationThirdUnserializableAttributeSetter):
3381 (WebCore::setJSTestSerializationFourthUnrestrictedDoubleAttributeSetter):
3382 (WebCore::setJSTestSerializationFifthLongAttributeSetter):
3383 (WebCore::setJSTestSerializationSixthTypedefAttributeSetter):
3384 (WebCore::setJSTestSerializationSeventhDirectlySerializableAttributeSetter):
3385 (WebCore::setJSTestSerializationEighthIndirectlyAttributeSetter):
3386 (WebCore::setJSTestSerializationNinthOptionalDirectlySerializableAttributeSetter):
3387 (WebCore::setJSTestSerializationTenthFrozenArrayAttributeSetter):
3388 (WebCore::setJSTestSerializationEleventhSequenceAttributeSetter):
3389 (WebCore::setJSTestSerializationTwelfthInterfaceSequenceAttributeSetter):
3390 (WebCore::JSTestSerialization::serialize):
3391 * bindings/scripts/test/JS/JSTestSerializationIndirectInheritance.cpp:
3392 (WebCore::JSTestSerializationIndirectInheritanceConstructor::initializeProperties):
3393 * bindings/scripts/test/JS/JSTestSerializationInherit.cpp:
3394 (WebCore::JSTestSerializationInheritConstructor::initializeProperties):
3395 (WebCore::setJSTestSerializationInheritInheritLongAttributeSetter):
3396 (WebCore::JSTestSerializationInherit::serialize):
3397 * bindings/scripts/test/JS/JSTestSerializationInheritFinal.cpp:
3398 (WebCore::JSTestSerializationInheritFinalConstructor::initializeProperties):
3399 (WebCore::setJSTestSerializationInheritFinalFinalLongAttributeFooSetter):
3400 (WebCore::setJSTestSerializationInheritFinalFinalLongAttributeBarSetter):
3401 (WebCore::JSTestSerializationInheritFinal::serialize):
3402 * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
3403 (WebCore::JSTestSerializedScriptValueInterfaceConstructor::initializeProperties):
3404 (WebCore::setJSTestSerializedScriptValueInterfaceValueSetter):
3405 (WebCore::setJSTestSerializedScriptValueInterfaceCachedValueSetter):
3406 * bindings/scripts/test/JS/JSTestStandaloneDictionary.cpp:
3407 (WebCore::convertDictionary<DictionaryImplName>):
3408 (WebCore::convertDictionaryToJS):
3409 * bindings/scripts/test/JS/JSTestStringifier.cpp:
3410 (WebCore::JSTestStringifierConstructor::initializeProperties):
3411 * bindings/scripts/test/JS/JSTestStringifierAnonymousOperation.cpp:
3412 (WebCore::JSTestStringifierAnonymousOperationConstructor::initializeProperties):
3413 * bindings/scripts/test/JS/JSTestStringifierNamedOperation.cpp:
3414 (WebCore::JSTestStringifierNamedOperationConstructor::initializeProperties):
3415 * bindings/scripts/test/JS/JSTestStringifierOperationImplementedAs.cpp:
3416 (WebCore::JSTestStringifierOperationImplementedAsConstructor::initializeProperties):
3417 * bindings/scripts/test/JS/JSTestStringifierOperationNamedToString.cpp:
3418 (WebCore::JSTestStringifierOperationNamedToStringConstructor::initializeProperties):
3419 * bindings/scripts/test/JS/JSTestStringifierReadOnlyAttribute.cpp:
3420 (WebCore::JSTestStringifierReadOnlyAttributeConstructor::initializeProperties):
3421 * bindings/scripts/test/JS/JSTestStringifierReadWriteAttribute.cpp:
3422 (WebCore::JSTestStringifierReadWriteAttributeConstructor::initializeProperties):
3423 (WebCore::setJSTestStringifierReadWriteAttributeIdentifierSetter):
3424 * bindings/scripts/test/JS/JSTestTypedefs.cpp:
3425 (WebCore::JSTestTypedefsConstructor::initializeProperties):
3426 (WebCore::setJSTestTypedefsUnsignedLongLongAttrSetter):
3427 (WebCore::setJSTestTypedefsSerializedScriptValueSetter):
3428 (WebCore::setJSTestTypedefsAttributeWithClampSetter):
3429 (WebCore::setJSTestTypedefsAttributeWithClampInTypedefSetter):
3430 (WebCore::setJSTestTypedefsBufferSourceAttrSetter):
3431 (WebCore::setJSTestTypedefsDomTimeStampAttrSetter):
3432 * bridge/NP_jsobject.cpp:
3433 * bridge/c/c_instance.cpp:
3434 (JSC::Bindings::CInstance::stringValue const):
3435 (JSC::Bindings::CInstance::getPropertyNames):
3436 * bridge/c/c_utility.cpp:
3437 (JSC::Bindings::identifierFromNPIdentifier):
3438 * bridge/objc/WebScriptObject.mm:
3439 (-[WebScriptObject callWebScriptMethod:withArguments:]):
3440 (-[WebScriptObject setValue:forKey:]):
3441 (-[WebScriptObject valueForKey:]):
3442 (-[WebScriptObject removeWebScriptKey:]):
3443 (-[WebScriptObject hasWebScriptKey:]):
3444 * bridge/objc/objc_runtime.mm:
3445 (JSC::Bindings::ObjcFallbackObjectImp::defaultValue):
3446 * bridge/objc/objc_utility.mm:
3447 (JSC::Bindings::convertNSStringToString):
3448 * bridge/runtime_array.cpp:
3449 (JSC::RuntimeArray::getOwnPropertyNames):
3450 * contentextensions/ContentExtensionParser.cpp:
3451 (WebCore::ContentExtensions::loadTrigger):
3452 (WebCore::ContentExtensions::loadAction):
3453 * crypto/SubtleCrypto.cpp:
3454 (WebCore::normalizeCryptoAlgorithmParameters):
3455 * domjit/DOMJITHelpers.h:
3456 (WebCore::DOMJIT::toWrapperSlow):
3457 * html/HTMLMediaElement.cpp:
3458 (WebCore::controllerJSValue):
3459 (WebCore::HTMLMediaElement::updateCaptionContainer):
3460 (WebCore::HTMLMediaElement::ensureMediaControlsInjectedScript):
3461 (WebCore::HTMLMediaElement::setControllerJSProperty):
3462 (WebCore::HTMLMediaElement::didAddUserAgentShadowRoot):
3463 (WebCore::HTMLMediaElement::updateMediaControlsAfterPresentationModeChange):
3464 (WebCore::HTMLMediaElement::getCurrentMediaControlsStatus):
3465 * html/HTMLPlugInImageElement.cpp:
3466 (WebCore::HTMLPlugInImageElement::didAddUserAgentShadowRoot):
3467 * inspector/InspectorFrontendHost.cpp:
3468 (WebCore::InspectorFrontendHost::addSelfToGlobalObjectInWorld):
3469 (WebCore::InspectorFrontendHost::showContextMenu):
3470 * inspector/WebInjectedScriptHost.cpp:
3471 (WebCore::WebInjectedScriptHost::subtype):
3472 (WebCore::constructInternalProperty):
3473 (WebCore::objectForPaymentOptions):
3474 (WebCore::objectForPaymentCurrencyAmount):
3475 (WebCore::objectForPaymentItem):
3476 (WebCore::objectForPaymentShippingOption):
3477 (WebCore::objectForPaymentDetailsModifier):
3478 (WebCore::objectForPaymentDetails):
3479 (WebCore::jsStringForPaymentRequestState):
3480 (WebCore::WebInjectedScriptHost::getInternalProperties):
3481 * inspector/agents/InspectorCanvasAgent.cpp:
3482 (WebCore::InspectorCanvasAgent::consoleStartRecordingCanvas):
3483 * inspector/agents/InspectorDOMAgent.cpp:
3484 (WebCore::InspectorDOMAgent::buildObjectForEventListener):
3485 (WebCore::InspectorDOMAgent::scriptValueAsNode):
3486 * inspector/agents/page/PageAuditAgent.cpp:
3487 (WebCore::PageAuditAgent::populateAuditObject):
3488 * page/PageConsoleClient.cpp:
3489 (WebCore::PageConsoleClient::screenshot):
3490 * platform/graphics/CustomPaintImage.cpp:
3491 (WebCore::CustomPaintImage::doCustomPaint):
3492 * testing/js/WebCoreTestSupport.cpp:
3493 (WebCoreTestSupport::injectInternalsObject):
3494 (WebCoreTestSupport::setupNewlyCreatedServiceWorker):
3495 * worklets/PaintWorkletGlobalScope.cpp:
3496 (WebCore::PaintWorkletGlobalScope::registerPaint):
3498 2019-08-27 Devin Rousso <drousso@apple.com>
3500 Web Inspector: don't attach properties to `injectedScript` for the CommandLineAPI
3501 https://bugs.webkit.org/show_bug.cgi?id=201193
3503 Reviewed by Joseph Pecoraro.
3505 For some reason, adding `injectedScript._inspectObject` inside CommandLineAPIModuleSource.js
3506 causes inspector/debugger/tail-deleted-frames-this-value.html to fail.
3508 We should have a similar approach to adding command line api getters and functions, in that
3509 the CommandLineAPIModuleSource.js calls a function with a callback.
3511 * inspector/CommandLineAPIModuleSource.js:
3512 (injectedScript._inspectObject): Deleted.
3514 2019-08-27 Zalan Bujtas <zalan@apple.com>
3516 [LFC][TFC] Align table formatting context code with the existing layout logic.
3517 https://bugs.webkit.org/show_bug.cgi?id=201168
3518 <rdar://problem/54732633>
3520 Reviewed by Antti Koivisto.
3522 Let's make the TFC go through the exisint shrink-to-fit computation. Tables behave slightly different from
3523 other shrink-to-fit boxes as they are streched to their minimum width(MIN) even when 'width' is non-auto and computed to less than MIN.
3525 * layout/FormattingContextGeometry.cpp:
3526 (WebCore::Layout::contentHeightForFormattingContextRoot):
3527 * layout/blockformatting/BlockFormattingContext.h:
3528 * layout/blockformatting/BlockFormattingContextGeometry.cpp:
3529 (WebCore::Layout::BlockFormattingContext::Geometry::inFlowWidthAndMargin):
3530 * layout/tableformatting/TableFormattingContext.cpp:
3531 (WebCore::Layout::TableFormattingContext::layout const):
3532 (WebCore::Layout::TableFormattingContext::computedIntrinsicWidthConstraints const):
3533 (WebCore::Layout::TableFormattingContext::computedTableWidth const):
3534 (WebCore::Layout::TableFormattingContext::computeTableWidth const): Deleted.
3535 (WebCore::Layout::TableFormattingContext::computeTableHeight const): Deleted.
3536 (WebCore::Layout::TableFormattingContext::distributeAvailableHeight const): Deleted.
3537 * layout/tableformatting/TableFormattingContext.h:
3538 * layout/tableformatting/TableGrid.h:
3540 2019-08-27 Simon Fraser <simon.fraser@apple.com>
3542 Minor optimization in InlineFlowBox::paintBoxDecorations()
3543 https://bugs.webkit.org/show_bug.cgi?id=201199
3545 Reviewed by Zalan Bujtas.
3547 This function can early return before computing localRect, which takes a bit of time (seen
3550 * rendering/InlineFlowBox.cpp:
3551 (WebCore::InlineFlowBox::paintBoxDecorations):
3553 2019-08-27 Carlos Alberto Lopez Perez <clopez@igalia.com>
3555 Drawing an animated image to a canvas via drawImage should draw the first frame
3556 https://bugs.webkit.org/show_bug.cgi?id=74779
3557 <rdar://problem/42282454>
3559 Reviewed by Said Abou-Hallawa.
3561 After this patch, when an animated image is drawn into a canvas via
3562 drawImage, the actual image that the canvas will receive will be
3563 a new Image object with the contents of the first frame of the animation.
3565 It also adds an internal setting to keep the previous behaviour
3566 (draw the current frame playing) because there are several layout
3567 tests that rely on canvas.drawImage() to check that animated images
3570 Test: fast/canvas/drawImage-animated-gif-draws-first-frame-and-no-reset-image.html
3572 * html/canvas/CanvasRenderingContext2DBase.cpp:
3573 (WebCore::CanvasRenderingContext2DBase::drawImage):
3574 * page/Settings.yaml:
3575 * testing/InternalSettings.cpp:
3576 (WebCore::InternalSettings::Backup::Backup):
3577 (WebCore::InternalSettings::Backup::restoreTo):
3578 (WebCore::InternalSettings::setAnimatedImageDebugCanvasDrawingEnabled):
3579 * testing/InternalSettings.h:
3580 * testing/InternalSettings.idl:
3582 2019-08-27 Antti Koivisto <antti@apple.com>
3584 InlineTextBox::end() should return first-past-end offset
3585 https://bugs.webkit.org/show_bug.cgi?id=201181
3587 Reviewed by Zalan Bujtas.
3589 It currently points to the last character, except for empty text boxes.
3590 This is awkward in itself and also inconsistent, as we use first-past-end offset everywhere else.
3593 (WebCore::Position::downstream const):
3595 Add a check for zero length case to avoid changing behavior.
3597 * layout/Verification.cpp:
3598 (WebCore::Layout::checkForMatchingTextRuns):
3599 (WebCore::Layout::outputMismatchingComplexLineInformationIfNeeded):
3600 * rendering/InlineFlowBox.cpp:
3601 (WebCore::InlineFlowBox::placeBoxRangeInInlineDirection):
3602 * rendering/InlineTextBox.cpp:
3603 (WebCore::InlineTextBox::paint):
3604 (WebCore::InlineTextBox::calculateDocumentMarkerBounds const):
3605 (WebCore::InlineTextBox::collectMarkedTextsForDocumentMarkers const):
3606 (WebCore::InlineTextBox::paintCompositionUnderlines const):
3607 (WebCore::InlineTextBox::paintCompositionUnderline const):
3608 * rendering/InlineTextBox.h:
3609 (WebCore::InlineTextBox::end const):
3613 * rendering/RenderText.cpp:
3614 (WebCore::RenderText::setTextWithOffset):
3615 * rendering/RenderTextLineBoxes.cpp:
3616 (WebCore::localQuadForTextBox):
3617 (WebCore::RenderTextLineBoxes::absoluteRectsForRange const):
3618 (WebCore::RenderTextLineBoxes::absoluteQuadsForRange const):
3619 (WebCore::RenderTextLineBoxes::dirtyRange):
3621 Here the incoming 'end' used linebox style too, move that to the new definition too.
3623 2019-08-27 Chris Dumez <cdumez@apple.com>
3625 Crash under WebCore::jsNotificationConstructorPermission
3626 https://bugs.webkit.org/show_bug.cgi?id=201186
3627 <rdar://problem/53962833>
3629 Reviewed by Youenn Fablet.
3631 Update the Notification API implementation to null-check the page before using. The page becomes null
3632 when using the API in a frame that gets detached from its parent while in the middle of running
3635 Test: http/tests/notifications/request-in-detached-frame.html
3637 * Modules/notifications/Notification.cpp:
3638 (WebCore::Notification::permission):
3639 (WebCore::Notification::requestPermission):
3641 2019-08-27 Youenn Fablet <youenn@apple.com>
3643 Disabled devices should not be taken into account when searching for a capture device
3644 https://bugs.webkit.org/show_bug.cgi?id=201183
3645 <rdar://problem/54353440>
3647 Reviewed by Jer Noble.
3651 * platform/mediastream/mac/CoreAudioCaptureDeviceManager.cpp:
3652 (WebCore::CoreAudioCaptureDeviceManager::coreAudioDeviceWithUID):
3653 We currently keep a list of devices, some of which might be disabled.
3654 We should not take into account disabled devices, only enabled devices
3655 when doing this search.
3656 * platform/mediastream/mac/CoreAudioCaptureSource.cpp:
3657 (WebCore::CoreAudioSharedUnit::setupAudioUnit):
3660 2019-08-26 Jer Noble <jer.noble@apple.com>
3662 Removing fullscreen element in rAF() callback after requestFullscreen() can leave fullscreen in inconsistent state.
3663 https://bugs.webkit.org/show_bug.cgi?id=201101
3664 <rdar://problem/54164587>
3666 Reviewed by Eric Carlson.
3668 Test: fullscreen/full-screen-request-removed-with-raf.html
3670 Add a new state variable, m_pendingFullscreenElement, to track which element is about to
3671 become the fullscreen element, so that when elements are removed or cancelFullscreen() is
3672 called, the state machine inside the fullscreen algorithm can cancel effectively.
3674 * dom/FullscreenManager.cpp:
3675 (WebCore::FullscreenManager::requestFullscreenForElement):
3676 (WebCore::FullscreenManager::cancelFullscreen):
3677 (WebCore::FullscreenManager::exitFullscreen):
3678 (WebCore::FullscreenManager::willEnterFullscreen):
3679 (WebCore::FullscreenManager::willExitFullscreen):
3680 (WebCore::FullscreenManager::didExitFullscreen):
3681 (WebCore::FullscreenManager::adjustFullscreenElementOnNodeRemoval):
3682 (WebCore::FullscreenManager::clear):
3683 (WebCore::FullscreenManager::fullscreenElementRemoved): Deleted.
3684 * dom/FullscreenManager.h:
3686 2019-08-27 Peng Liu <peng.liu6@apple.com>
3688 webkitpresentationmodechanged is fired twice when exiting picture in picture
3689 https://bugs.webkit.org/show_bug.cgi?id=193765
3691 Reviewed by Jer Noble.
3693 This patch removes the extra "webkitpresentationmodechanged" event when the browser switches from
3694 picture-in-picture or fullscreen to inline.
3696 The bug was introduced by the fix for bug
3697 https://bugs.webkit.org/show_bug.cgi?id=181095
3698 But now we are using modern media controls and the fix is not necessary.
3699 Reverting that fix can fix the issue.
3701 Also, this patch gets rid of the unnecessary try to call a JavaScript function which is not available
3702 in the modern media controls.
3704 Test: media/presentationmodechanged-fired-once.html
3706 * html/HTMLMediaElement.cpp:
3707 (WebCore::HTMLMediaElement::exitFullscreen):
3708 (WebCore::HTMLMediaElement::updateMediaControlsAfterPresentationModeChange):
3710 2019-08-27 Wenson Hsieh <wenson_hsieh@apple.com>
3712 Image pasted from screenshot into Mail compose window via share sheet has the wrong aspect ratio
3713 https://bugs.webkit.org/show_bug.cgi?id=201171
3714 <rdar://problem/54671275>
3716 Reviewed by Tim Horton.
3718 Augments an existing app-specific hack to include the Mail composition service, in addition to Mail.
3720 * platform/RuntimeApplicationChecks.h:
3721 * platform/cocoa/RuntimeApplicationChecksCocoa.mm:
3722 (WebCore::IOSApplication::isMailCompositionService):
3724 Add a new bundle checking method for the Mail composition service (com.apple.MailCompositionService).
3726 * platform/ios/PlatformPasteboardIOS.mm:
3727 (WebCore::PlatformPasteboard::informationForItemAtIndex):
3729 Only plumb the preferred presentation height through to the web process if the application is neither Mail nor
3730 the Mail composition service. In the future, we should consider putting this hack behind SPI, or maybe only
3731 expose the preferred presentation width in all apps (it isn't difficult to imagine a use case where a "Mail-
3732 compose-like" web app has `img { max-width: 100%; }` in their stylesheet).
3734 2019-08-27 Carlos Garcia Campos <cgarcia@igalia.com>
3736 Origin header not included in WebSocket handshake request when using platform WebSocket API
3737 https://bugs.webkit.org/show_bug.cgi?id=200535
3739 Reviewed by Youenn Fablet.
3741 Add Origin HTTP header to the WebSocket handshake request.
3743 * Modules/websockets/ThreadableWebSocketChannel.cpp:
3744 (WebCore::ThreadableWebSocketChannel::webSocketConnectRequest):
3746 2019-08-27 Youenn Fablet <youenn@apple.com>
3748 Make MediaStreamTrackPrivate RefCounted
3749 https://bugs.webkit.org/show_bug.cgi?id=201040
3751 Reviewed by Darin Adler.
3753 MediaStreamTrackPrivate should not be ref/deref except from the main thread.
3754 The only method called from a background thread is audioSamplesAvailable in which
3755 it is unsafe to ref a MediaStreamTrackPrivate.
3756 Make the track RefCounted will ensure that no ref/deref is made in background threads.
3757 No observable change of behavior.
3759 * platform/mediastream/MediaStreamTrackPrivate.h:
3761 2019-08-26 Yusuke Suzuki <ysuzuki@apple.com>
3763 [WebCore] DataCue should not use gcProtect / gcUnprotect
3764 https://bugs.webkit.org/show_bug.cgi?id=201170
3766 Reviewed by Mark Lam.
3768 JSC::gcProtect and JSC::gcUnprotect are designed for JavaScriptCore.framework and we should not use them in WebCore. It is
3769 checking whether we are holding a JS API lock. But the caller of these API would be the C++ holder's destructor, and this should be
3770 allowed since this destruction must happen in main thread or web thread, and this should not happen while other thread is taking JS API lock.
3771 For example, we are destroying JSC::Strong<>, JSC::Weak<> without taking JS API lock. But since JSC::gcProtect and JSC::gcUnprotect are designed
3772 for JavaScriptCore.framework, they are not accounting this condition, and we are hitting debug assertion in GC stress bot.
3774 Ideally, we should convert this JSValue field to JSValueInWrappedObject. But JSValueInWrappedObject needs extra care. We should
3775 know how the owner and JS wrapper are kept and used to use JSValueInWrappedObject correctly.
3777 As a first step, this patch just replaces raw JSValue + gcProtect/gcUnprotect with JSC::Strong<>.
3779 This change fixes LayoutTests/media/track/track-in-band-metadata-display-order.html crash in GC stress bot. The crash trace is the following.
3781 Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
3782 0 com.apple.JavaScriptCore 0x000000010ee3d980 WTFCrash + 16
3783 1 com.apple.JavaScriptCore 0x000000010ee408ab WTFCrashWithInfo(int, char const*, char const*, int) + 27
3784 2 com.apple.JavaScriptCore 0x000000010feb5327 JSC::Heap::unprotect(JSC::JSValue) + 215
3785 3 com.apple.WebCore 0x0000000120f33b53 JSC::gcUnprotect(JSC::JSCell*) + 51
3786 4 com.apple.WebCore 0x0000000120f329fc JSC::gcUnprotect(JSC::JSValue) + 76
3787 5 com.apple.WebCore 0x0000000120f32968 WebCore::DataCue::~DataCue() + 88
3788 6 com.apple.WebCore 0x0000000120f32ac5 WebCore::DataCue::~DataCue() + 21
3789 7 com.apple.WebCore 0x0000000120f32ae9 WebCore::DataCue::~DataCue() + 25
3790 8 com.apple.WebCore 0x0000000120f37ebf WTF::RefCounted<WebCore::TextTrackCue, std::__1::default_delete<WebCore::TextTrackCue> >::deref() const + 95
3791 9 com.apple.WebCore 0x000000012103a345 void WTF::derefIfNotNull<WebCore::TextTrackCue>(WebCore::TextTrackCue*) + 53
3792 10 com.apple.WebCore 0x000000012103a309 WTF::RefPtr<WebCore::TextTrackCue, WTF::DumbPtrTraits<WebCore::TextTrackCue> >::~RefPtr() + 41
3793 11 com.apple.WebCore 0x000000012102bfc5 WTF::RefPtr<WebCore::TextTrackCue, WTF::DumbPtrTraits<WebCore::TextTrackCue> >::~RefPtr() + 21
3794 12 com.apple.WebCore 0x00000001210e91df WTF::VectorDestructor<true, WTF::RefPtr<WebCore::TextTrackCue, WTF::DumbPtrTraits<WebCore::TextTrackCue> > >::destruct(WTF::RefPtr<WebCore::TextTrackCue, WTF::DumbPtrTraits<WebCore::TextTrackCue> >*, WTF::RefPtr<WebCore::TextTrackCue, WTF::DumbPtrTraits<WebCore::TextTrackCue> >*) + 47
3795 13 com.apple.WebCore 0x00000001210e913d WTF::VectorTypeOperations<WTF::RefPtr<WebCore::TextTrackCue, WTF::DumbPtrTraits<WebCore::TextTrackCue> > >::destruct(WTF::RefPtr<WebCore::TextTrackCue, WTF::DumbPtrTraits<WebCore::TextTrackCue> >*, WTF::RefPtr<WebCore::TextTrackCue, WTF::DumbPtrTraits<WebCore::TextTrackCue> >*) + 29
3796 14 com.apple.WebCore 0x00000001210e9100 WTF::Vector<WTF::RefPtr<WebCore::TextTrackCue, WTF::DumbPtrTraits<WebCore::TextTrackCue> >, 0ul, WTF::CrashOnOverflow, 16ul>::~Vector() + 64
3797 15 com.apple.WebCore 0x00000001210e7a25 WTF::Vector<WTF::RefPtr<WebCore::TextTrackCue, WTF::DumbPtrTraits<WebCore::TextTrackCue> >, 0ul, WTF::CrashOnOverflow, 16ul>::~Vector() + 21
3798 16 com.apple.WebCore 0x00000001210e93d3 WebCore::TextTrackCueList::~TextTrackCueList() + 51
3800 * html/track/DataCue.cpp:
3801 (WebCore::DataCue::DataCue):
3802 (WebCore::DataCue::~DataCue):
3803 (WebCore::DataCue::setData):
3804 (WebCore::DataCue::value const):
3805 (WebCore::DataCue::setValue):
3806 (WebCore::DataCue::valueOrNull const):
3807 * html/track/DataCue.h:
3809 2019-08-26 Devin Rousso <drousso@apple.com>
3811 Web Inspector: use more C++ keywords for defining agents
3812 https://bugs.webkit.org/show_bug.cgi?id=200959
3814 Reviewed by Joseph Pecoraro.
3816 - make constructors `protected` when the agent isn't meant to be constructed directly
3817 - add `virtual` destructors that are defined in the *.cpp so forward-declarations work
3818 - use `final` wherever possible
3819 - add comments to indicate where any virtual functions come from
3821 * inspector/agents/InspectorApplicationCacheAgent.h:
3822 * inspector/agents/InspectorApplicationCacheAgent.cpp:
3823 * inspector/agents/InspectorCPUProfilerAgent.h:
3824 * inspector/agents/InspectorCPUProfilerAgent.cpp:
3825 * inspector/agents/InspectorCSSAgent.h:
3826 * inspector/agents/InspectorCSSAgent.cpp:
3827 * inspector/agents/InspectorCanvasAgent.h:
3828 * inspector/agents/InspectorCanvasAgent.cpp:
3829 * inspector/agents/InspectorDOMAgent.h:
3830 * inspector/agents/InspectorDOMAgent.cpp:
3831 * inspector/agents/InspectorDOMDebuggerAgent.h:
3832 * inspector/agents/InspectorDOMDebuggerAgent.cpp:
3833 * inspector/agents/InspectorDOMStorageAgent.h:
3834 * inspector/agents/InspectorDOMStorageAgent.cpp:
3835 * inspector/agents/InspectorDatabaseAgent.h:
3836 * inspector/agents/InspectorDatabaseAgent.cpp:
3837 * inspector/agents/InspectorIndexedDBAgent.h:
3838 * inspector/agents/InspectorIndexedDBAgent.cpp:
3839 * inspector/agents/InspectorLayerTreeAgent.h:
3840 * inspector/agents/InspectorLayerTreeAgent.cpp:
3841 * inspector/agents/InspectorMemoryAgent.h:
3842 * inspector/agents/InspectorMemoryAgent.cpp:
3843 * inspector/agents/InspectorNetworkAgent.h:
3844 * inspector/agents/InspectorNetworkAgent.cpp:
3845 * inspector/agents/InspectorPageAgent.h:
3846 * inspector/agents/InspectorPageAgent.cpp:
3847 * inspector/agents/InspectorTimelineAgent.h:
3848 * inspector/agents/InspectorTimelineAgent.cpp:
3849 * inspector/agents/InspectorWorkerAgent.h:
3850 * inspector/agents/InspectorWorkerAgent.cpp:
3851 * inspector/agents/WebConsoleAgent.h:
3852 * inspector/agents/WebConsoleAgent.cpp:
3853 * inspector/agents/WebDebuggerAgent.h:
3854 * inspector/agents/WebDebuggerAgent.cpp: