7ade8acab8d059503aaa4026f604ede169159c52
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2019-04-02  Chris Dumez  <cdumez@apple.com>
2
3         [WK2] Add support for Window's beforeprint / afterprint events
4         https://bugs.webkit.org/show_bug.cgi?id=196478
5
6         Reviewed by Alex Christensen.
7
8         Add support for Window's beforeprint / afterprint events as per:
9         - https://html.spec.whatwg.org/#dom-print
10
11         Blink and Gecko already support this.
12
13         Test: printing/printing-events.html
14
15         * dom/EventNames.h:
16         * html/HTMLAttributeNames.in:
17         * html/HTMLBodyElement.cpp:
18         (WebCore::HTMLBodyElement::createWindowEventHandlerNameMap):
19         * page/Page.cpp:
20         (WebCore::dispatchPrintEvent):
21         (WebCore::Page::dispatchBeforePrintEvent):
22         (WebCore::Page::dispatchAfterPrintEvent):
23         * page/Page.h:
24         * page/WindowEventHandlers.idl:
25
26 2019-04-02  Zalan Bujtas  <zalan@apple.com>
27
28         [ContentChangeObserver] Hover menus do not function on fidelity.com
29         https://bugs.webkit.org/show_bug.cgi?id=196507
30         <rdar://problem/49496520>
31
32         Reviewed by Simon Fraser.
33
34         fidelity.com has 400ms hover intent timer to bring up the main menus.
35
36         Test: fast/events/touch/ios/content-observation/400ms-hover-intent.html
37
38         * page/ios/ContentChangeObserver.cpp:
39
40 2019-04-02  Timothy Hatcher  <timothy@apple.com>
41
42         NSAttributedString crashes when encoding text attachment cell for missing image.
43         https://bugs.webkit.org/show_bug.cgi?id=196504
44         rdar://problem/49161281
45
46         Reviewed by Tim Horton.
47
48         Clean up and fix a couple of errors and crashes in the missing image path of our
49         attributed string converter.
50
51         Fixes include:
52         * Removed manual call to release on a RetainPtr, leading to autorelease pool crash.
53         * No longer try to load an image that is missing on disk and has long been renamed.
54         * No longer use a NSTextAttachmentCell in the Mac code path which can't be encoded
55           for sending to the UIProcess, so it was pretty useless in the web content process.
56         * Stopped using NSFileWrapper for the missing image so the attachment can contain the
57           retina versions of the missing image.
58         * Simplified bundle finding code, since WebCore is assumed to be loaded.
59         * Fix leak of attachment by adding missing adoptNS().
60
61         * editing/cocoa/HTMLConverter.mm:
62         (HTMLConverter::_addAttachmentForElement): Unify and simplify missing image path.
63         (_NSFirstPathForDirectoriesInDomains): Deleted.
64         (_NSSystemLibraryPath): Deleted.
65         (_webKitBundle): Deleted.
66
67 2019-04-02  Chris Dumez  <cdumez@apple.com>
68
69         [Fetch API] Allow used body replacement in Request constructor
70         https://bugs.webkit.org/show_bug.cgi?id=183703
71         <rdar://problem/49425609>
72
73         Reviewed by Youenn Fablet.
74
75         Allow used body replacement in Request constructor as per:
76         - https://github.com/whatwg/fetch/pull/675
77
78         No new tests, rebaseline existing test.
79
80         * Modules/fetch/FetchRequest.cpp:
81         (WebCore::FetchRequest::initializeWith):
82
83 2019-04-02  Chris Dumez  <cdumez@apple.com>
84
85         Unreviewed, rolling out r243551.
86
87         Seems to have broken file uploads to SoundCloud
88
89         Reverted changeset:
90
91         "XMLHttpRequestUpload's loadstart event not correct
92         initialized"
93         https://bugs.webkit.org/show_bug.cgi?id=196174
94         https://trac.webkit.org/changeset/243551
95
96 2019-04-02  Justin Fan  <justin_fan@apple.com>
97
98         [Web GPU] Implement blend states and color write mask for GPUColorStateDescriptor
99         https://bugs.webkit.org/show_bug.cgi?id=196474
100
101         Reviewed by Myles C. Maxfield.
102
103         Blend states and color write masks must now be specified on GPUColorStateDescriptor instead of 
104         relying on underlying MTLRenderPipelineColorAttachmentDescriptor defaults.
105
106         Test: webgpu/blend-triangle-strip.html, webgpu/color-write-mask-triangle-strip.html
107
108         * CMakeLists.txt:
109         * DerivedSources-input.xcfilelist:
110         * DerivedSources-output.xcfilelist:
111         * DerivedSources.make:
112         * Modules/webgpu/GPUBlendDescriptor.idl: 
113         * Modules/webgpu/GPUColorStateDescriptor.idl:
114         * Modules/webgpu/GPUColorWriteBits.idl: 
115         * Sources.txt:
116         * WebCore.xcodeproj/project.pbxproj:
117         * bindings/js/WebCoreBuiltinNames.h:
118         * platform/graphics/gpu/GPUBlendDescriptor.h:
119         * platform/graphics/gpu/GPUColorStateDescriptor.h:
120         * platform/graphics/gpu/GPUColorWriteBits.h:
121         * platform/graphics/gpu/cocoa/GPURenderPipelineMetal.mm:
122         (WebCore::mtlColorWriteMaskForGPUColorWriteFlags):
123         (WebCore::mtlBlendOperationForGPUBlendOperation):
124         (WebCore::mtlBlendFactorForGPUBlendFactor):
125         (WebCore::setColorStatesForColorAttachmentArray):
126         (WebCore::tryCreateMtlRenderPipelineState):
127         (WebCore::trySetColorStatesForColorAttachmentArray): Deleted.
128
129 2019-04-02  Zalan Bujtas  <zalan@apple.com>
130
131         [ContentChangeObserver] Ignore reconstructed renderers when checking for visibility change
132         https://bugs.webkit.org/show_bug.cgi?id=196483
133         <rdar://problem/49288174>
134
135         Reviewed by Simon Fraser.
136
137         This patch fixes the cases when the content gets reconstructed in a way that existing and visible elements gain
138         new renderers within one style recalc. We failed to recognize such cases and ended up detecting the newly constructed renderers
139         as "visible change" thereby triggering hover.
140
141         Test: fast/events/touch/ios/content-observation/visible-content-gains-new-renderer.html
142
143         * page/ios/ContentChangeObserver.cpp:
144         (WebCore::ContentChangeObserver::renderTreeUpdateDidStart):
145         (WebCore::ContentChangeObserver::renderTreeUpdateDidFinish):
146         (WebCore::ContentChangeObserver::reset):
147         (WebCore::ContentChangeObserver::willDestroyRenderer):
148         (WebCore::ContentChangeObserver::StyleChangeScope::StyleChangeScope):
149         (WebCore::ContentChangeObserver::RenderTreeUpdateScope::RenderTreeUpdateScope):
150         (WebCore::ContentChangeObserver::RenderTreeUpdateScope::~RenderTreeUpdateScope):
151         * page/ios/ContentChangeObserver.h:
152         (WebCore::ContentChangeObserver::visibleRendererWasDestroyed const):
153         * rendering/updating/RenderTreeUpdater.cpp:
154         (WebCore::RenderTreeUpdater::updateRenderTree):
155         (WebCore::RenderTreeUpdater::tearDownRenderers):
156
157 2019-04-02  Fujii Hironori  <Hironori.Fujii@sony.com>
158
159         [CMake] WEBKIT_MAKE_FORWARDING_HEADERS shouldn't use POST_BUILD to copy generated headers
160         https://bugs.webkit.org/show_bug.cgi?id=182757
161
162         Reviewed by Don Olmstead.
163
164         No new tests because no behavior changes.
165
166         * PlatformWin.cmake: Do not use DERIVED_SOURCE_DIRECTORIES of
167         WEBKIT_MAKE_FORWARDING_HEADERS. Added
168         WebCore_PRIVATE_FRAMEWORK_HEADERS.
169         * WebCoreMacros.cmake (GENERATE_DOM_NAMES): Added
170         ${_namespace}ElementTypeHelpers.h to _outputfiles.
171
172 2019-04-02  Cathie Chen  <cathiechen@igalia.com>
173
174         Update the status of ResizeObserver in features.json.
175         https://bugs.webkit.org/show_bug.cgi?id=196443
176
177         Reviewed by Rob Buis.
178
179         * features.json:
180
181 2019-04-01  Ryosuke Niwa  <rniwa@webkit.org>
182
183         Nullptr crash in Document::open after calling policyChecker().stopCheck()
184         https://bugs.webkit.org/show_bug.cgi?id=196479
185
186         Reviewed by Antti Koivisto.
187
188         Added a missing nullptr check in Document::open after calling m_frame->loader().policyChecker().stopCheck()
189         since it invokes m_willSubmitFormCompletionHandlers in WebKit2, and that could clear m_frame.
190
191         Unfortunately, we don't have any reproducible test case.
192
193         * dom/Document.cpp:
194         (WebCore::Document::open):
195
196 2019-04-01  Timothy Hatcher  <timothy@apple.com>
197
198         Unreviewed build fix.
199
200         * crypto/mac/SerializedCryptoKeyWrapMac.mm:
201         (WebCore::createAndStoreMasterKey): Add ALLOW_DEPRECATED_DECLARATIONS_BEGIN/END
202         around SecTrustedApplicationCreateFromPath call.
203
204 2019-04-01  Simon Fraser  <simon.fraser@apple.com>
205
206         Remove some unused iOS scrolling-related code in Frame
207         https://bugs.webkit.org/show_bug.cgi?id=196473
208
209         Reviewed by Zalan Bujtas.
210
211         This code has no callers.
212
213         * page/Frame.cpp:
214         (WebCore::Frame::Frame):
215         (WebCore::Frame::scrollOverflowLayer): Deleted.
216         (WebCore::Frame::overflowAutoScrollTimerFired): Deleted.
217         (WebCore::Frame::startOverflowAutoScroll): Deleted.
218         (WebCore::Frame::checkOverflowScroll): Deleted.
219         * page/Frame.h:
220
221 2019-04-01  Chris Dumez  <cdumez@apple.com>
222
223         Attr nodes are not cloned properly
224         https://bugs.webkit.org/show_bug.cgi?id=196466
225
226         Reviewed by Ryosuke Niwa.
227
228         Attr nodes are not cloned properly according to:
229         - https://dom.spec.whatwg.org/#concept-node-clone
230
231         A cloned Attr node should retain its prefix and namespace.
232
233         Both Gecko and Blink agree with the DOM specification here.
234
235         No new tests, rebaselined existing test.
236
237         * dom/Document.cpp:
238         (WebCore::Document::importNode):
239
240 2019-04-01  Said Abou-Hallawa  <sabouhallawa@apple.com>
241
242         Remove the SVG tear off objects for SVGMatrix, SVGTransfrom, SVGTransformList and SVGAnimatedTransformList
243         https://bugs.webkit.org/show_bug.cgi?id=196086
244
245         Reviewed by Simon Fraser.
246
247         The IDL changes:
248
249         SVGTransform.idl:
250             Remove the NewObject qualifier from matrix attribute. This matches 
251             the specs: https://www.w3.org/TR/SVG11/coords.html#InterfaceSVGTransform.
252             SVGTransform will internally hold an SVGMatrix. A change in this
253             SVGMatrix will affect the container SVGTransform.
254
255         SVGTransformList.idl:
256             Remove the NewObject qualifier from consolidate() method. This matches
257             the specs:
258             https://www.w3.org/TR/SVG11/coords.html#__svg__SVGTransformList__consolidate
259             The method consolidate() should return a reference to the first item
260             in the list after consolidating it.
261
262         Code changes:
263
264         -- SVGMatrix is now a superclass of SVGValueProperty<AffineTransform>.
265            No need for SVGMatrixValue since it was wrapper of AffineTransform.
266
267         -- SVGTransformValue now holds a Ref<SVGMatrix> member in addition to the
268            angle and the rotationCenter. Ref<SVGMatrix> is what SVGTransform.matrix
269            will return. So a change in this matrix will change the owner SVGTransform.
270
271         -- SVGTransform is now the owner of SVGMatrix via its SVGTransformValue.
272
273         -- SVGTransformList is now a superclass of SVGValuePropertyList<SVGTransform>.
274            It is responsible for parsing a String to items of SVGTransform.
275
276         -- SVGAnimatedTransformList is now defined as SVGAnimatedPropertyList<
277            SVGTransformList>.
278
279         Note the ownership chain of these objects is the following:
280
281         -- SVGAnimatedTransformList owns the SVGTransformList via its baseVal 
282            and animVal members.
283
284         -- SVGTransformList owns SVGTransform via its list of items
285
286         -- SVGTransform owns SVGMatrix via its SVGTransformValue.
287
288            So a change in SVGMatrix will propagate to the owner SVGElement through
289            the following ownership chain:
290
291            SVGMatrix
292              |_ SVGTransfrom
293                   |_ SVGTransformList
294                        |_ SVGAmimatedTransformList
295                             |_ SVGElement
296
297         To get the mechanics of this change right, a new accessor, a new animator
298         and animation functions are added for the SVGAnimatedTransformList.
299
300         -- SVGViewSpec used to hold an SVGAnimatedTransformListAttribute for the
301         member m_transform although this member should not be animated. See the
302         comment in the old SVGViewSpec::transform(). This has been changed in this
303         patch. SVGViewSpec now holds Ref<SVGTransformList> which matches the specs:
304         https://www.w3.org/TR/SVG11/types.html#InterfaceSVGViewSpec.
305
306         * Sources.txt:
307         * WebCore.xcodeproj/project.pbxproj:
308         * svg/SVGAnimateElementBase.cpp:
309         (WebCore::SVGAnimateElementBase::attributeAnimationController):
310         (WebCore::SVGAnimateElementBase::hasValidAttributeType const):
311         (WebCore::SVGAnimateElementBase::calculateToAtEndOfDurationValue):
312         (WebCore::SVGAnimateElementBase::calculateFromAndToValues):
313         (WebCore::SVGAnimateElementBase::calculateFromAndByValues):
314         * svg/SVGAnimateElementBase.h:
315         (WebCore::SVGAnimateElementBase::animateRangeString const):
316         * svg/SVGAnimateTransformElement.cpp:
317         (WebCore::SVGAnimateTransformElement::animateRangeString const):
318         * svg/SVGAnimateTransformElement.h:
319                 This change is needed because animating the transform attribute can be
320         written as
321             <animate ... from="translate(100)" to="translate(200)"/>
322         or
323             <animateTransform type="translate" from="100" to="200"/>"
324         So we need to surround the animation range string with the type qualifier
325         for animateTransform.
326
327         * svg/SVGAnimatedTransformList.cpp: Removed.
328         * svg/SVGAnimatedTransformList.h: Removed.
329         * svg/SVGAnimatedType.h: Removed.
330         * svg/SVGAnimatedTypeAnimator.cpp: Removed.
331         * svg/SVGAnimatedTypeAnimator.h: Removed.
332         * svg/SVGAnimationElement.cpp:
333         (WebCore::SVGAnimationElement::adjustForInheritance): Deleted.
334         * svg/SVGAnimationElement.h:
335         (WebCore::SVGAnimationElement::adjustForInheritance): Deleted.
336         (WebCore::SVGAnimationElement::adjustFromToListValues): Deleted.
337         (WebCore::SVGAnimationElement::animateDiscreteType): Deleted.
338         These functions were used by SVGLegacyAttributeAnimationController.
339
340         * svg/SVGAnimatorFactory.h: Removed.
341         * svg/SVGExternalResourcesRequired.h:
342         (WebCore::SVGExternalResourcesRequired::isKnownAttribute):
343         * svg/SVGFEImageElement.h:
344         * svg/SVGFEMorphologyElement.h:
345         * svg/SVGFETileElement.h:
346         * svg/SVGFitToViewBox.h:
347         (WebCore::SVGFitToViewBox::isKnownAttribute):
348         * svg/SVGGradientElement.cpp:
349         (WebCore::SVGGradientElement::SVGGradientElement):
350         (WebCore::SVGGradientElement::parseAttribute):
351         (WebCore::SVGGradientElement::registerAttributes): Deleted.
352         * svg/SVGGradientElement.h:
353         (WebCore::SVGGradientElement::gradientTransform const):
354         (WebCore::SVGGradientElement::gradientTransformAnimated):
355         (WebCore::SVGGradientElement::isKnownAttribute):
356         * svg/SVGGraphicsElement.cpp:
357         (WebCore::SVGGraphicsElement::SVGGraphicsElement):
358         (WebCore::SVGGraphicsElement::animatedLocalTransform const):
359         (WebCore::SVGGraphicsElement::parseAttribute):
360         (WebCore::SVGGraphicsElement::svgAttributeChanged):
361         There is one attribute for this element which is "SVGNames::transformAttr"
362         So there is no need to check for it twice.
363
364         (WebCore::SVGGraphicsElement::registerAttributes): Deleted.
365         * svg/SVGGraphicsElement.h:
366         (WebCore::SVGGraphicsElement::transform const):
367         (WebCore::SVGGraphicsElement::transformAnimated):
368         (WebCore::SVGGraphicsElement::isKnownAttribute): Deleted.
369         * svg/SVGLangSpace.cpp:
370         (WebCore::SVGLangSpace::SVGLangSpace):
371         (WebCore::SVGLangSpace::xmlspace const):
372         (WebCore::SVGLangSpace::isKnownAttribute):
373         (WebCore::SVGLangSpace::svgAttributeChanged):
374         (WebCore::SVGLangSpace::registerAttributes): Deleted.
375         * svg/SVGLangSpace.h:
376         (WebCore::SVGLangSpace::xmllang const):
377         (WebCore::SVGLangSpace::setXmllang):
378         (WebCore::SVGLangSpace::setXmlspace):
379         (WebCore::SVGLangSpace::attributeRegistry): Deleted.
380         (WebCore::SVGLangSpace::isKnownAttribute): Deleted.
381         * svg/SVGLegacyAttributeAnimationController.cpp: Removed.
382         * svg/SVGLegacyAttributeAnimationController.h: Removed.
383         * svg/SVGLinearGradientElement.cpp:
384         (WebCore::setGradientAttributes):
385         * svg/SVGMaskElement.h:
386         * svg/SVGMatrix.h:
387         (WebCore::SVGMatrix::create):
388         (WebCore::SVGMatrix::a const):
389         (WebCore::SVGMatrix::setA):
390         (WebCore::SVGMatrix::b const):
391         (WebCore::SVGMatrix::setB):
392         (WebCore::SVGMatrix::c const):
393         (WebCore::SVGMatrix::setC):
394         (WebCore::SVGMatrix::d const):
395         (WebCore::SVGMatrix::setD):
396         (WebCore::SVGMatrix::e const):
397         (WebCore::SVGMatrix::setE):
398         (WebCore::SVGMatrix::f const):
399         (WebCore::SVGMatrix::setF):
400         (WebCore::SVGMatrix::multiply const):
401         (WebCore::SVGMatrix::inverse const):
402         (WebCore::SVGMatrix::translate const):
403         (WebCore::SVGMatrix::scale const):
404         (WebCore::SVGMatrix::scaleNonUniform const):
405         (WebCore::SVGMatrix::rotate const):
406         (WebCore::SVGMatrix::rotateFromVector const):
407         (WebCore::SVGMatrix::flipX const):
408         (WebCore::SVGMatrix::flipY const):
409         (WebCore::SVGMatrix::skewX const):
410         (WebCore::SVGMatrix::skewY const):
411         * svg/SVGPatternElement.cpp:
412         (WebCore::SVGPatternElement::SVGPatternElement):
413         (WebCore::SVGPatternElement::parseAttribute):
414         (WebCore::SVGPatternElement::svgAttributeChanged):
415         (WebCore::SVGPatternElement::collectPatternAttributes const):
416         (WebCore::SVGPatternElement::localCoordinateSpaceTransform const):
417         (WebCore::SVGPatternElement::registerAttributes): Deleted.
418         * svg/SVGPatternElement.h:
419         * svg/SVGPoint.h:
420         (WebCore::SVGPoint::matrixTransform const):
421         * svg/SVGPolyElement.h:
422         (WebCore::SVGPolyElement::isKnownAttribute): Deleted.
423         * svg/SVGRadialGradientElement.cpp:
424         (WebCore::setGradientAttributes):
425         * svg/SVGSVGElement.cpp:
426         (WebCore::SVGSVGElement::createSVGTransform):
427         (WebCore::SVGSVGElement::createSVGTransformFromMatrix):
428         (WebCore::SVGSVGElement::viewBoxToViewTransform const):
429         * svg/SVGTextElement.cpp:
430         (WebCore::SVGTextElement::animatedLocalTransform const):
431         * svg/SVGTransform.cpp: Removed.
432         * svg/SVGTransform.h:
433         (WebCore::SVGTransform::create):
434         (WebCore::SVGTransform::~SVGTransform):
435         (WebCore::SVGTransform::clone const):
436         (WebCore::SVGTransform::type):
437         (WebCore::SVGTransform::angle):
438         (WebCore::SVGTransform::matrix):
439         (WebCore::SVGTransform::setMatrix):
440         (WebCore::SVGTransform::setTranslate):
441         (WebCore::SVGTransform::setScale):
442         (WebCore::SVGTransform::setRotate):
443         (WebCore::SVGTransform::setSkewX):
444         (WebCore::SVGTransform::setSkewY):
445         (WebCore::SVGTransform::SVGTransform):
446         * svg/SVGTransform.idl:
447         * svg/SVGTransformList.h:
448         * svg/SVGTransformList.idl:
449         * svg/SVGTransformListValues.cpp: Removed.
450         * svg/SVGTransformListValues.h: Removed.
451         * svg/SVGTransformValue.cpp: Removed.
452         * svg/SVGTransformValue.h:
453         (WebCore::SVGTransformValue::SVGTransformValue):
454         (WebCore::SVGTransformValue::operator=):
455         (WebCore::SVGTransformValue::matrix const):
456         (WebCore::SVGTransformValue::rotationCenter const):
457         (WebCore::SVGTransformValue::isValid const):
458         (WebCore::SVGTransformValue::setMatrix):
459         (WebCore::SVGTransformValue::matrixDidChange):
460         (WebCore::SVGTransformValue::translate const):
461         (WebCore::SVGTransformValue::setTranslate):
462         (WebCore::SVGTransformValue::scale const):
463         (WebCore::SVGTransformValue::setScale):
464         (WebCore::SVGTransformValue::setRotate):
465         (WebCore::SVGTransformValue::setSkewX):
466         (WebCore::SVGTransformValue::setSkewY):
467         (WebCore::SVGTransformValue::valueAsString const):
468         (WebCore::SVGTransformValue::prefixForTransfromType):
469         (WebCore::SVGTransformValue::appendNumbers const):
470         (WebCore::SVGTransformValue::appendMatrix const):
471         (WebCore::SVGTransformValue::appendTranslate const):
472         (WebCore::SVGTransformValue::appendScale const):
473         (WebCore::SVGTransformValue::appendRotate const):
474         (WebCore::SVGTransformValue::appendSkewX const):
475         (WebCore::SVGTransformValue::appendSkewY const):
476         (WebCore::SVGTransformValue::matrix): Deleted.
477         * svg/SVGTransformable.cpp:
478         (WebCore::SVGTransformable::parseAndSkipType):
479         (WebCore::parseAndSkipType): Deleted.
480         (WebCore::SVGTransformable::parseTransformAttribute): Deleted.
481         The code of this function was moved to SVGTransformList::parse().
482
483         * svg/SVGTransformable.h:
484         There is no need for enum TransformParsingMode. It was used by 
485         SVGViewSpec::parseViewSpec() to tell SVGTransformable::parseTransformAttribute()
486         not to clear the list. SVGTransfromList now has two parse() functions:
487         one public and the second is private. The public one clear the list
488         before parsing the input String. The private one just does the parsing.
489         SVGViewSpec::parseViewSpec() calls the private once since it is a friend
490         of SVGTransfromList.
491
492         * svg/SVGValue.h: Removed.
493         * svg/SVGViewSpec.cpp:
494         (WebCore::SVGViewSpec::SVGViewSpec):
495         (WebCore::SVGViewSpec::reset):
496         (WebCore::SVGViewSpec::parseViewSpec):
497         (WebCore::SVGViewSpec::registerAttributes): Deleted.
498         (WebCore::SVGViewSpec::transform): Deleted.
499         * svg/SVGViewSpec.h:
500         * svg/properties/SVGAnimatedPropertyAccessorImpl.h:
501         * svg/properties/SVGAnimatedPropertyAnimatorImpl.h:
502         * svg/properties/SVGAnimatedPropertyImpl.h:
503         * svg/properties/SVGAnimatedTransformListPropertyTearOff.h: Removed.
504         * svg/properties/SVGAnimationAdditiveListFunctionImpl.h:
505         (WebCore::SVGAnimationTransformListFunction::progress):
506         * svg/properties/SVGAnimationAdditiveValueFunctionImpl.h:
507         * svg/properties/SVGAttributeRegistry.h:
508         * svg/properties/SVGMatrixTearOff.h: Removed.
509         * svg/properties/SVGPropertyAccessorImpl.h:
510         * svg/properties/SVGPropertyOwnerRegistry.h:
511         (WebCore::SVGPropertyOwnerRegistry::registerProperty):
512
513 2019-04-01  Devin Rousso  <drousso@apple.com>
514
515         Web Inspector: DOMDebugger: breakpoints for attribute modifications still fire when breakpoints are disabled
516         https://bugs.webkit.org/show_bug.cgi?id=196456
517         <rdar://problem/49489747>
518
519         Reviewed by Joseph Pecoraro.
520
521         Test: inspector/dom-debugger/dom-breakpoints.html
522
523         * inspector/agents/InspectorDOMDebuggerAgent.cpp:
524         (WebCore::InspectorDOMDebuggerAgent::didInvalidateStyleAttr):
525         (WebCore::InspectorDOMDebuggerAgent::descriptionForDOMEvent):
526
527 2019-04-01  Wenson Hsieh  <wenson_hsieh@apple.com>
528
529         Unable to copy and paste a PDF from Notes into Mail compose body
530         https://bugs.webkit.org/show_bug.cgi?id=196442
531         <rdar://problem/48573098>
532
533         Reviewed by Tim Horton.
534
535         Refactor some logic for inserting attachment elements upon paste or drop. Currently, we only prefer inserting
536         content as attachment elements if the items are annotated with UIPreferredPresentationStyleAttachment. However,
537         many data sources around the system (both first and third party) have not adopted this API, which makes it
538         difficult to determine whether a given item provider should be treated as a file or not. In this bug in
539         particular, no preferred presentation style is set, so we fail to handle the paste command by inserting an
540         attachment element.
541
542         However, most apps around the system that write file or attachment-like data to the pasteboard will at least
543         offer a suggested name for the file, in the form of -[NSItemProvider suggestedName]. To address this, instead of
544         relying solely on the preferredPresentationStyle, additionally take a suggested name as an indicator that the
545         item is probably a file.
546
547         In fact, Pasteboard::fileContentState already has similar logic to check for either a suggested file name or
548         explicitly specified presentation style. We pull this out into a separate helper method on PasteboardItemInfo,
549         and use it for both Pasteboard::fileContentState and prefersAttachmentRepresentation.
550
551         Tests:  WKAttachmentTestsIOS.InsertPastedContactAsAttachment
552                 WKAttachmentTestsIOS.InsertPastedMapItemAsAttachment
553
554         * editing/cocoa/WebContentReaderCocoa.mm:
555         (WebCore::mimeTypeFromContentType):
556
557         Work around <rdar://problem/49478229> by using the "text/vcard" MIME type to handle "public.vcard". CoreServices
558         currently maps "public.vcard" to "text/directory" when using UTTypeCopyPreferredTagWithClass, despite the SPI
559         -[NSURLFileTypeMappings MIMETypeForExtension:] returning "text/vcard" for a ".vcf" file.
560
561         * platform/PasteboardItemInfo.h:
562         (WebCore::PasteboardItemInfo::canBeTreatedAsAttachmentOrFile const):
563
564         Add a helper method to determine whether the PasteboardItemInfo prefers to be represented as inline data, or an
565         attachment, or neither. This differs slightly from the existing value of preferredPresentationStyle in that we
566         consider having a suggested file name as a strong indicator that the item should be treated as an attachment,
567         even if the presentation style is unspecified.
568
569         * platform/cocoa/PasteboardCocoa.mm:
570         (WebCore::Pasteboard::fileContentState):
571
572         Use PasteboardItemInfo::canBeTreatedAsAttachmentOrFile().
573
574         * platform/ios/PasteboardIOS.mm:
575         (WebCore::prefersAttachmentRepresentation):
576
577         Use PasteboardItemInfo::canBeTreatedAsAttachmentOrFile().
578
579 2019-04-01  Tim Horton  <timothy_horton@apple.com>
580
581         Make UIWKDocumentContext rects per-character instead of per-word
582         https://bugs.webkit.org/show_bug.cgi?id=196459
583
584         Reviewed by Wenson Hsieh.
585
586         No new tests; adjusted expected results of WebKit.DocumentEditingContext.
587
588         * editing/TextIterator.cpp:
589         (WebCore::CharacterIterator::CharacterIterator):
590         * editing/TextIterator.h:
591         (WebCore::CharacterIterator::atEnd const):
592         (WebCore::CharacterIterator::text const):
593         Add WEBCORE_EXPORT to some things.
594         Introduce a CharacterIterator constructor that takes Positions, like one that TextIterator has.
595         Move initializers to the header.
596
597 2019-04-01  Antti Koivisto  <antti@apple.com>
598
599         Update event region when toggling pointer-events:none
600         https://bugs.webkit.org/show_bug.cgi?id=195902
601         <rdar://problem/48988384>
602
603         Reviewed by Simon Fraser.
604
605         Test: fast/scrolling/ios/event-region-pointer-events.html
606
607         Normally paint invalidation requests compositing configuration update whenever anything that would
608         affect event region changes. However mutating 'pointer-events' property does not cause paint invalidation.
609
610         * rendering/RenderElement.cpp:
611         (WebCore::RenderElement::styleWillChange):
612
613         Request compositing update explicitly from the containing layer.
614
615         * rendering/RenderLayer.cpp:
616         (WebCore::RenderLayer::invalidateEventRegion):
617         * rendering/RenderLayer.h:
618
619 2019-04-01  Chris Dumez  <cdumez@apple.com>
620
621         Support "noreferrer" for window.open()
622         https://bugs.webkit.org/show_bug.cgi?id=194533
623
624         Reviewed by Geoffrey Garen.
625
626         Support "noreferrer" for window.open() as per:
627         - https://github.com/whatwg/html/pull/4331
628
629         Tests: imported/w3c/web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-tokenization-noreferrer.html
630                http/wpt/html/browsers/the-window-object/window-open-noopener-webkit.html
631
632         * page/DOMWindow.cpp:
633         (WebCore::DOMWindow::createWindow):
634         * page/WindowFeatures.cpp:
635         (WebCore::setWindowFeature):
636         * page/WindowFeatures.h:
637
638 2019-04-01  Said Abou-Hallawa  <sabouhallawa@apple.com>
639
640         SVGMatrix.IDL methods do not conform to the specs
641         https://bugs.webkit.org/show_bug.cgi?id=196263
642
643         Reviewed by Simon Fraser.
644
645         I think there was a misconception about these functions. The specs link
646         is: https://www.w3.org/TR/SVG11/coords.html#InterfaceSVGMatrix.
647
648         Notice that the specs does not state that the SVGMethod methods should
649         raise the exception NO_MODIFICATION_ALLOWED_ERR if the object is read
650         only. Notice setting the attribute 'a' for example may raise this
651         exception. Therefore, I think the specs wanted to make these operations
652         read-only. None of the methods should raise the exception
653         NO_MODIFICATION_ALLOWED_ERR.
654
655         In fact the SVG code was doing the right thing. For example SVGMatrix::scale()
656         was calling SVGMatrixValue::scale() which was making a copy of itself,
657         applying the scale on the copy and then returning the copy. When 
658         SVGMatrix::scale() receives the copy of the SVGMatrixValue it creates and
659         returns a new SVGMatrix object.
660
661         * WebCore.xcodeproj/project.pbxproj:
662         * svg/SVGMatrix.h:
663         (WebCore::SVGMatrix::create):
664         (WebCore::SVGMatrix::a const):
665         (WebCore::SVGMatrix::b const):
666         (WebCore::SVGMatrix::c const):
667         (WebCore::SVGMatrix::d const):
668         (WebCore::SVGMatrix::e const):
669         (WebCore::SVGMatrix::f const):
670         (WebCore::SVGMatrix::multiply const):
671         (WebCore::SVGMatrix::inverse const):
672         (WebCore::SVGMatrix::translate const):
673         (WebCore::SVGMatrix::scale const):
674         (WebCore::SVGMatrix::scaleNonUniform const):
675         (WebCore::SVGMatrix::rotate const):
676         (WebCore::SVGMatrix::rotateFromVector const):
677         (WebCore::SVGMatrix::flipX const):
678         (WebCore::SVGMatrix::flipY const):
679         (WebCore::SVGMatrix::skewX const):
680         (WebCore::SVGMatrix::skewY const):
681         (WebCore::SVGMatrix::a): Deleted.
682         (WebCore::SVGMatrix::b): Deleted.
683         (WebCore::SVGMatrix::c): Deleted.
684         (WebCore::SVGMatrix::d): Deleted.
685         (WebCore::SVGMatrix::e): Deleted.
686         (WebCore::SVGMatrix::f): Deleted.
687         (WebCore::SVGMatrix::multiply): Deleted.
688         (WebCore::SVGMatrix::inverse): Deleted.
689         (WebCore::SVGMatrix::translate): Deleted.
690         (WebCore::SVGMatrix::scale): Deleted.
691         (WebCore::SVGMatrix::scaleNonUniform): Deleted.
692         (WebCore::SVGMatrix::rotate): Deleted.
693         (WebCore::SVGMatrix::rotateFromVector): Deleted.
694         (WebCore::SVGMatrix::flipX): Deleted.
695         (WebCore::SVGMatrix::flipY): Deleted.
696         (WebCore::SVGMatrix::skewX): Deleted.
697         (WebCore::SVGMatrix::skewY): Deleted.
698         (WebCore::SVGMatrix::SVGMatrix): Deleted.
699         * svg/SVGMatrix.idl:
700         * svg/SVGMatrixValue.h: Removed.
701         * svg/SVGTransform.cpp:
702         (WebCore::SVGTransform::matrix):
703         * svg/SVGTransformDistance.cpp:
704         (WebCore::SVGTransformDistance::addToSVGTransform const):
705         * svg/SVGTransformValue.h:
706         (WebCore::SVGTransformValue::matrix const):
707         (WebCore::SVGTransformValue::matrix):
708         (WebCore::SVGTransformValue::svgMatrix): Deleted.
709         (WebCore::operator==): Deleted.
710         (WebCore::operator!=): Deleted.
711         * svg/properties/SVGMatrixTearOff.h:
712         * svg/properties/SVGPropertyTearOff.h:
713         (WebCore::SVGPropertyTearOff::propertyReference const):
714
715 2019-04-01  Simon Fraser  <simon.fraser@apple.com>
716
717         Plumb through a ScrollType value that indicates whether a scroll was a user or programmatic scroll
718         https://bugs.webkit.org/show_bug.cgi?id=196424
719
720         Reviewed by Zalan Bujtas.
721
722         In preparation for fixing webkit.org/b/195584, we need to know if an overflow scroll
723         is programmatic, so plumb through an enum value. The functions touched by this patch are
724         only ever called for programmatic scrolls.
725
726         * dom/Element.cpp:
727         (WebCore::Element::scrollTo):
728         (WebCore::Element::setScrollLeft):
729         (WebCore::Element::setScrollTop):
730         * platform/ScrollTypes.h:
731         * rendering/RenderBox.cpp:
732         (WebCore::RenderBox::setScrollLeft):
733         (WebCore::RenderBox::setScrollTop):
734         * rendering/RenderBox.h:
735         * rendering/RenderLayer.cpp:
736         (WebCore::RenderLayer::scrollToXPosition):
737         (WebCore::RenderLayer::scrollToYPosition):
738         * rendering/RenderLayer.h:
739         * rendering/RenderListBox.cpp:
740         (WebCore::RenderListBox::setScrollLeft):
741         (WebCore::RenderListBox::setScrollTop):
742         * rendering/RenderListBox.h:
743         * rendering/RenderTextControlSingleLine.cpp:
744         (WebCore::RenderTextControlSingleLine::setScrollLeft):
745         (WebCore::RenderTextControlSingleLine::setScrollTop):
746         * rendering/RenderTextControlSingleLine.h:
747
748 2019-04-01  Wenson Hsieh  <wenson_hsieh@apple.com>
749
750         [iOS] Refactor some logic for inserting pasted or dropped virtual card files as attachment elements
751         https://bugs.webkit.org/show_bug.cgi?id=196435
752         Work towards <rdar://problem/48573098>
753
754         Reviewed by Darin Adler.
755
756         Refactor some existing codepaths on iOS for inserting VCard files as attachment elements. Instead of using a
757         separate readVirtualContactFile method for converting a vcard file or data into an attachment element (possibly
758         accompanied by a link), use the existing readFilePaths WebContentReader method.
759
760         To handle links which may accompany the attachment element, add a helper method in PasteboardIOS that reads a
761         titled URL prior to inserting an attachment element, in the case of pasting or dropping a VCF.
762
763         This means we no longer need to handle attachment reading in readPasteboardWebContentDataForType, so we can
764         simply bail before reading "public.vcard" here and defer to reading other data types.
765
766         Covered by existing API tests in WKAttachmentTests and DragAndDropTestsIOS.
767
768         * editing/WebContentReader.h:
769         * editing/cocoa/WebContentReaderCocoa.mm:
770         (WebCore::WebContentReader::readVirtualContactFile): Deleted.
771         * platform/Pasteboard.h:
772         * platform/ios/PasteboardIOS.mm:
773         (WebCore::Pasteboard::readPasteboardWebContentDataForType):
774         (WebCore::readURLAlongsideAttachmentIfNecessary):
775         (WebCore::prefersAttachmentRepresentation):
776         (WebCore::Pasteboard::read):
777         (WebCore::Pasteboard::readRespectingUTIFidelities):
778
779 2019-04-01  Antti Koivisto  <antti@apple.com>
780
781         Trying to scroll the compose pane on gmail.com scrolls the message list behind
782         https://bugs.webkit.org/show_bug.cgi?id=196426
783         <rdar://problem/49402667>
784
785         Reviewed by Darin Adler.
786
787         Test: fast/scrolling/ios/event-region-visibility-hidden.html
788
789         We fail to gather event region from desdendants of non-overflowing elements with 'visibility:hidden'.
790
791         * rendering/RenderBlock.cpp:
792         (WebCore::RenderBlock::paintObject):
793
794         Skip the subtree walk only if the current region covers the box already.
795
796         * rendering/RenderLayer.cpp:
797         (WebCore::RenderLayer::paintList):
798
799         Remove the (wrong) optimization, we bail out quickly on first renderer if possible so this is not high value.
800
801 2019-04-01  Emilio Cobos Álvarez  <emilio@crisal.io>
802
803         Be less strict about closing blocks in attribute and functional pseudo-element selectors.
804         https://bugs.webkit.org/show_bug.cgi?id=142167
805
806         Reviewed by Antti Koivisto.
807
808         This was also an issue for, e.g., "::slotted(foo", turns out.
809
810         This matches Chromium, Firefox, and the spec:
811
812         https://drafts.csswg.org/css-syntax/#parse-error:
813
814         > Certain points in the parsing algorithm are said to be parse errors. The error
815         > handling for parse errors is well-defined: user agents must either act as
816         > described below when encountering such problems, or must abort processing at
817         > the first error that they encounter for which they do not wish to apply the
818         > rules described below.
819
820         https://drafts.csswg.org/css-syntax/#consume-simple-block:
821
822         > <EOF-token>
823         >   This is a parse error. Return the block.
824
825         Tests: web-platform-tests/dom/nodes/selectors.js (and probably others)
826
827         * css/parser/CSSSelectorParser.cpp:
828         (WebCore::CSSSelectorParser::consumeAttribute):
829         (WebCore::CSSSelectorParser::consumePseudo):
830
831 2019-04-01  Pablo Saavedra  <psaavedra@igalia.com>
832
833         Build failure after r243644 in GTK Linux 64-bit stable builds
834         https://bugs.webkit.org/show_bug.cgi?id=196440
835
836         Reviewed by Philippe Normand.
837
838         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
839         (WebCore::MediaPlayerPrivateGStreamerBase::updateTextureMapperFlags):
840
841 2019-03-31  Manuel Rego Casasnovas  <rego@igalia.com>
842
843         Scroll position gets reset when overflow:scroll is inside grid
844         https://bugs.webkit.org/show_bug.cgi?id=196337
845         <rdar://problem/49385784>
846
847         Reviewed by Simon Fraser.
848
849         Fix scroll position when there are changes inside a grid item with "overflow: scroll".
850
851         Test: fast/css-grid-layout/grid-item-content-scroll-position.html
852
853         * rendering/RenderGrid.cpp:
854         (WebCore::RenderGrid::layoutBlock): Use beginUpdateScrollInfoAfterLayoutTransaction()
855         and endAndCommitUpdateScrollInfoAfterLayoutTransaction().
856
857 2019-03-31  Ryosuke Niwa  <rniwa@webkit.org>
858
859         Reduce the size of Node::deref by eliminating an explicit parentNode check
860         https://bugs.webkit.org/show_bug.cgi?id=195776
861
862         Reviewed by Darin Adler.
863
864         Address post-commit review comments.
865
866         * dom/Document.cpp:
867         (WebCore::Document::removedLastRef):
868         * dom/Node.cpp:
869         (WebCore::Node::~Node):
870         (WebCore::Node::removedLastRef):
871         * dom/Node.h:
872         (WebCore::Node::deref):
873         (WebCore::Node::setParentNode):
874
875 2019-03-31  Sam Weinig  <weinig@apple.com>
876
877         Remove more i386 specific configurations
878         https://bugs.webkit.org/show_bug.cgi?id=196430
879
880         Reviewed by Alexey Proskuryakov.
881
882         * Configurations/FeatureDefines.xcconfig:
883         ENABLE_WEB_AUTHN_macosx can now be enabled unconditionally on macOS.
884
885 2019-03-31  Andy Estes  <aestes@apple.com>
886
887         [iOS] WebKit should consult the navigation response policy delegate before previewing a QuickLook document
888         https://bugs.webkit.org/show_bug.cgi?id=196433
889         <rdar://problem/49293305>
890
891         Reviewed by Tim Horton.
892
893         When ResourceLoader would encounter a response with a MIME type that QuickLook supports, the
894         response would be implicitly allowed and a QuickLook preview would be generated. After
895         generating, the client's navigation response policy delegate would be notified of the
896         preview response, but not the underlying response. Notably, the preview response has a URL
897         scheme of "x-apple-ql-id", does not include any underlying HTTP headers, and usually has a
898         MIME type of "text/html" or "application/pdf" rather than the underlying response MIME type.
899
900         To allow clients to make better navigation response policy decisions, this patch changes the
901         above behavior for WKWebView clients that have linked against a version of WebKit that
902         includes this change. Rather than notifying the client's navigation response policy delegate
903         of the preview response, we notify the client of the underlying response. Only if the client
904         responds with a policy of "allow" will the QuickLook preview response be loaded (without
905         another call to the navigation response policy delegate).
906
907         Non-WKWebView clients and clients that have linked against a version of WebKit that does not
908         include this change will retain the original behavior.
909
910         Covered by existing layout tests and new and existing API tests.
911
912         * WebCore.xcodeproj/project.pbxproj:
913         * loader/SubresourceLoader.cpp:
914         (WebCore::SubresourceLoader::shouldCreatePreviewLoaderForResponse const):
915         (WebCore::SubresourceLoader::didReceiveResponse):
916         * loader/ios/PreviewLoader.h:
917         * loader/ios/PreviewLoader.mm:
918         (-[WebPreviewLoader initWithResourceLoader:resourceResponse:]):
919         (-[WebPreviewLoader _loadPreviewIfNeeded]):
920         (-[WebPreviewLoader connection:didReceiveData:lengthReceived:]):
921         (-[WebPreviewLoader connectionDidFinishLoading:]):
922         (-[WebPreviewLoader connection:didFailWithError:]):
923         (WebCore::PreviewLoader::create):
924         (WebCore::PreviewLoader::didReceiveResponse):
925         (-[WebPreviewLoader _sendDidReceiveResponseIfNecessary]): Deleted.
926         (WebCore::PreviewLoader::shouldCreateForMIMEType): Deleted.
927         * page/Settings.yaml:
928         * platform/MIMETypeRegistry.cpp:
929         (WebCore::MIMETypeRegistry::canShowMIMEType):
930         * platform/network/ios/PreviewConverter.h:
931         * platform/network/ios/PreviewConverter.mm:
932         (WebCore::PreviewConverter::supportsMIMEType):
933
934 2019-03-29  Dean Jackson  <dino@apple.com>
935
936         gl.readPixels with type gl.FLOAT does not work
937         https://bugs.webkit.org/show_bug.cgi?id=171432
938         <rdar://problem/31905150>
939
940         Reviewed by Antoine Quint.
941
942         Our validation code was identifying readPixels of
943         type FLOAT as invalid, for three reasons:
944         - we didn't support the FLOAT type at all.
945         - we only allowed the combination of RGBA and
946         UNSIGNED_BYTE in WebGL 1 [*].
947         - if we had a framebuffer of format RGBA, we assumed
948         we could only read into a Uint8 ArrayBuffer.
949
950         [*] This bug isn't completely fixed, so I opened
951         https://bugs.webkit.org/show_bug.cgi?id=196418
952
953         Test: fast/canvas/webgl/readPixels-float.html
954
955         * html/canvas/WebGLRenderingContextBase.cpp:
956         (WebCore::WebGLRenderingContextBase::readPixels):
957         - flip the logic in a conditional that was clearly wrong yet
958           thankfully had no impact.
959         - support type FLOAT when the relevant extension is enabled.
960         - allow FLOAT as a valid type (see new bug above)
961         - create a new macro for CHECK_COMPONENT_COUNT
962         - update the existing macros to not be case statements,
963           so that we can put logic in the switch.
964
965 2019-03-30  Antti Koivisto  <antti@apple.com>
966
967         Try to fix Windows build.
968
969         * platform/graphics/RoundedRect.cpp:
970         (WebCore::approximateAsRegion):
971
972 2019-03-30  Joseph Pecoraro  <pecoraro@apple.com>
973
974         Web Inspector: JSC Sampling Profiler thread not getting subtracted in CPU Usage Timeline
975         https://bugs.webkit.org/show_bug.cgi?id=196419
976         <rdar://problem/49444023>
977
978         Reviewed by Devin Rousso.
979
980         * page/ResourceUsageThread.cpp:
981         (WebCore::ResourceUsageThread::addObserver):
982         We forgot to call the function that would setup platform state
983         allowing us to subtract out the sampling profiler thread.
984
985 2019-03-30  Zalan Bujtas  <zalan@apple.com>
986
987         [ContentChangeObserver] Add iFrame elements to the list of "considered clickable" elements.
988         https://bugs.webkit.org/show_bug.cgi?id=196410
989         <rdar://problem/49436828>
990
991         Reviewed by Simon Fraser.
992
993         163.com constructs an iFrame to display the login pane on hover. This patch ensures that we take iFrames into account while observing for visible content change by considering iFrame elements "clickable".
994         (While iFrames don't necessarily have clickable content, we can't just sit and wait until they are fully loaded.)
995
996         Test: fast/events/touch/ios/content-observation/iframe-is-shown-on-hover.html
997
998         * page/ios/ContentChangeObserver.cpp:
999         (WebCore::ContentChangeObserver::StyleChangeScope::isConsideredClickable const):
1000
1001 2019-03-30  Antti Koivisto  <antti@apple.com>
1002
1003         Try to fix Windows build.
1004
1005         * platform/graphics/Region.cpp:
1006         * platform/graphics/RoundedRect.cpp:
1007
1008 2019-03-30  Antti Koivisto  <antti@apple.com>
1009
1010         Hit-testing of boxes over scrollers should account for border-radius
1011         https://bugs.webkit.org/show_bug.cgi?id=195374
1012         <rdar://problem/48649993>
1013
1014         Reviewed by Simon Fraser.
1015
1016         Test: fast/scrolling/ios/border-radious-event-region.html
1017
1018         * page/Frame.h:
1019         * platform/graphics/GraphicsLayer.cpp:
1020         (WebCore::GraphicsLayer::dumpProperties const):
1021
1022         Testing support.
1023
1024         * platform/graphics/GraphicsLayerClient.h:
1025         * platform/graphics/RoundedRect.cpp:
1026         (WebCore::approximateAsRegion):
1027
1028         Add a function to approximate RoundedRects as Regions.
1029         It cuts away rectangles from the corners following the corner shapes.
1030         More rectangles are cut for larger radii.
1031
1032         * platform/graphics/RoundedRect.h:
1033         * rendering/RenderBlock.cpp:
1034         (WebCore::RenderBlock::paintObject):
1035
1036         Use the new interface to get rounded corners right.
1037         In rectangle case this takes optimized paths.
1038
1039         * rendering/RenderLayerCompositor.cpp:
1040         (WebCore::RenderLayerCompositor::layerTreeAsText):
1041         * testing/Internals.cpp:
1042         (WebCore::toLayerTreeFlags):
1043         * testing/Internals.h:
1044         * testing/Internals.idl:
1045
1046 2019-03-29  Zalan Bujtas  <zalan@apple.com>
1047
1048         [ContentChangeObserver] Expand DOM timer observation to 350ms
1049         https://bugs.webkit.org/show_bug.cgi?id=196411
1050         <rdar://problem/49391144>
1051
1052         Reviewed by Simon Fraser.
1053
1054         imdb.com main page has 350ms hover intent timer to bring up the hover menus around the search bar.
1055
1056         Test: fast/events/touch/ios/content-observation/350ms-hover-intent.html
1057
1058         * page/ios/ContentChangeObserver.cpp:
1059
1060 2019-03-29  John Wilander  <wilander@apple.com>
1061
1062         Move WebResourceLoadStatisticsStore IPC calls from the UI process to the network process
1063         https://bugs.webkit.org/show_bug.cgi?id=196407
1064         <rdar://problem/47859936>
1065
1066         Reviewed by Brent Fulgham.
1067
1068         Test: http/tests/storageAccess/grant-storage-access-under-opener-at-popup-user-gesture.html
1069
1070         This patch removes old code for the batching into "statistics updated" calls.
1071         Since the move of Resource Load Statistics to the network process, all such
1072         collection is done directly through dedicated calls to the network process.
1073
1074         The remaining functionality was renamed to make it more clear, i.e.
1075         ResourceLoadObserver::notifyObserver() renamed to
1076         ResourceLoadObserver::updateCentralStatisticsStore().
1077
1078         * loader/ResourceLoadObserver.cpp:
1079         (WebCore::ResourceLoadObserver::setStatisticsUpdatedCallback):
1080         (WebCore::ResourceLoadObserver::setRequestStorageAccessUnderOpenerCallback):
1081         (WebCore::ResourceLoadObserver::logSubresourceLoading):
1082         (WebCore::ResourceLoadObserver::logWebSocketLoading):
1083         (WebCore::ResourceLoadObserver::logUserInteractionWithReducedTimeResolution):
1084         (WebCore::ResourceLoadObserver::requestStorageAccessUnderOpener):
1085         (WebCore::ResourceLoadObserver::updateCentralStatisticsStore):
1086         (WebCore::ResourceLoadObserver::clearState):
1087         (WebCore::ResourceLoadObserver::setNotificationCallback): Deleted.
1088         (WebCore::ResourceLoadObserver::ResourceLoadObserver): Deleted.
1089         (WebCore::ResourceLoadObserver::scheduleNotificationIfNeeded): Deleted.
1090         (WebCore::ResourceLoadObserver::notifyObserver): Deleted.
1091         * loader/ResourceLoadObserver.h:
1092         * testing/Internals.cpp:
1093         (WebCore::Internals::notifyResourceLoadObserver):
1094
1095 2019-03-29  Chris Dumez  <cdumez@apple.com>
1096
1097         Make someWindow.frames, .self, .window always return someWindow
1098         https://bugs.webkit.org/show_bug.cgi?id=195406
1099
1100         Reviewed by Alex Christensen.
1101
1102         Make someWindow.frames, .self, .window always return someWindow. Previously, they
1103         would return null when the window would lose its browsing context.
1104
1105         This aligns our behavior with Firefox and the HTML specification:
1106         - https://github.com/whatwg/html/pull/4410
1107
1108         Chrome has also recently aligned with Firefox and the HTML specification here so
1109         it makes sense for WebKit to follow.
1110
1111         No new tests, rebaselined existing tests.
1112
1113         * bindings/js/JSDOMWindowCustom.cpp:
1114         (WebCore::JSDOMWindow::self const):
1115         (WebCore::JSDOMWindow::window const):
1116         (WebCore::JSDOMWindow::frames const):
1117         * page/DOMWindow.cpp:
1118         (WebCore::DOMWindow::focus):
1119         * page/DOMWindow.h:
1120         * page/DOMWindow.idl:
1121
1122 2019-03-29  Myles C. Maxfield  <mmaxfield@apple.com>
1123
1124         Delete WebMetal implementation in favor of WebGPU
1125         https://bugs.webkit.org/show_bug.cgi?id=195418
1126
1127         Reviewed by Dean Jackson.
1128
1129         WebMetal was only ever intended to be a proof-of-concept, and was never intended to be shipped.
1130         Now that our WebGPU implementation is achieving good functionality, we're hitting conflicts
1131         because we have both implementations. We should delete the non-standard implementation in favor
1132         of the standards-based implementation.
1133
1134         Deletes relevant tests.
1135
1136         * CMakeLists.txt:
1137         * Configurations/FeatureDefines.xcconfig:
1138         * DerivedSources-input.xcfilelist:
1139         * DerivedSources-output.xcfilelist:
1140         * DerivedSources.make:
1141         * Sources.txt:
1142         * SourcesCocoa.txt:
1143         * WebCore.xcodeproj/project.pbxproj:
1144         * bindings/js/JSWebMetalRenderPassAttachmentDescriptorCustom.cpp: Removed.
1145         * bindings/js/JSWebMetalRenderingContextCustom.cpp: Removed.
1146         * bindings/js/WebCoreBuiltinNames.h:
1147         * dom/Document.cpp:
1148         (WebCore::Document::getCSSCanvasContext):
1149         * dom/Document.h:
1150         * dom/Document.idl:
1151         * html/HTMLCanvasElement.cpp:
1152         (WebCore::HTMLCanvasElement::getContext):
1153         (WebCore::HTMLCanvasElement::isWebMetalType): Deleted.
1154         (WebCore::HTMLCanvasElement::createContextWebMetal): Deleted.
1155         (WebCore::HTMLCanvasElement::getContextWebMetal): Deleted.
1156         * html/HTMLCanvasElement.h:
1157         * html/HTMLCanvasElement.idl:
1158         * html/canvas/CanvasRenderingContext.h:
1159         (WebCore::CanvasRenderingContext::isWebGPU const):
1160         (WebCore::CanvasRenderingContext::isWebMetal const): Deleted.
1161         * html/canvas/WebMetalBuffer.cpp: Removed.
1162         * html/canvas/WebMetalBuffer.h: Removed.
1163         * html/canvas/WebMetalBuffer.idl: Removed.
1164         * html/canvas/WebMetalCommandBuffer.cpp: Removed.
1165         * html/canvas/WebMetalCommandBuffer.h: Removed.
1166         * html/canvas/WebMetalCommandBuffer.idl: Removed.
1167         * html/canvas/WebMetalCommandQueue.cpp: Removed.
1168         * html/canvas/WebMetalCommandQueue.h: Removed.
1169         * html/canvas/WebMetalCommandQueue.idl: Removed.
1170         * html/canvas/WebMetalComputeCommandEncoder.cpp: Removed.
1171         * html/canvas/WebMetalComputeCommandEncoder.h: Removed.
1172         * html/canvas/WebMetalComputeCommandEncoder.idl: Removed.
1173         * html/canvas/WebMetalComputePipelineState.cpp: Removed.
1174         * html/canvas/WebMetalComputePipelineState.h: Removed.
1175         * html/canvas/WebMetalComputePipelineState.idl: Removed.
1176         * html/canvas/WebMetalDepthStencilDescriptor.cpp: Removed.
1177         * html/canvas/WebMetalDepthStencilDescriptor.h: Removed.
1178         * html/canvas/WebMetalDepthStencilDescriptor.idl: Removed.
1179         * html/canvas/WebMetalDepthStencilState.cpp: Removed.
1180         * html/canvas/WebMetalDepthStencilState.h: Removed.
1181         * html/canvas/WebMetalDepthStencilState.idl: Removed.
1182         * html/canvas/WebMetalDrawable.cpp: Removed.
1183         * html/canvas/WebMetalDrawable.h: Removed.
1184         * html/canvas/WebMetalDrawable.idl: Removed.
1185         * html/canvas/WebMetalEnums.cpp: Removed.
1186         * html/canvas/WebMetalEnums.h: Removed.
1187         * html/canvas/WebMetalEnums.idl: Removed.
1188         * html/canvas/WebMetalFunction.cpp: Removed.
1189         * html/canvas/WebMetalFunction.h: Removed.
1190         * html/canvas/WebMetalFunction.idl: Removed.
1191         * html/canvas/WebMetalLibrary.cpp: Removed.
1192         * html/canvas/WebMetalLibrary.h: Removed.
1193         * html/canvas/WebMetalLibrary.idl: Removed.
1194         * html/canvas/WebMetalRenderCommandEncoder.cpp: Removed.
1195         * html/canvas/WebMetalRenderCommandEncoder.h: Removed.
1196         * html/canvas/WebMetalRenderCommandEncoder.idl: Removed.
1197         * html/canvas/WebMetalRenderPassAttachmentDescriptor.cpp: Removed.
1198         * html/canvas/WebMetalRenderPassAttachmentDescriptor.h: Removed.
1199         * html/canvas/WebMetalRenderPassAttachmentDescriptor.idl: Removed.
1200         * html/canvas/WebMetalRenderPassColorAttachmentDescriptor.cpp: Removed.
1201         * html/canvas/WebMetalRenderPassColorAttachmentDescriptor.h: Removed.
1202         * html/canvas/WebMetalRenderPassColorAttachmentDescriptor.idl: Removed.
1203         * html/canvas/WebMetalRenderPassDepthAttachmentDescriptor.cpp: Removed.
1204         * html/canvas/WebMetalRenderPassDepthAttachmentDescriptor.h: Removed.
1205         * html/canvas/WebMetalRenderPassDepthAttachmentDescriptor.idl: Removed.
1206         * html/canvas/WebMetalRenderPassDescriptor.cpp: Removed.
1207         * html/canvas/WebMetalRenderPassDescriptor.h: Removed.
1208         * html/canvas/WebMetalRenderPassDescriptor.idl: Removed.
1209         * html/canvas/WebMetalRenderPipelineColorAttachmentDescriptor.cpp: Removed.
1210         * html/canvas/WebMetalRenderPipelineColorAttachmentDescriptor.h: Removed.
1211         * html/canvas/WebMetalRenderPipelineColorAttachmentDescriptor.idl: Removed.
1212         * html/canvas/WebMetalRenderPipelineDescriptor.cpp: Removed.
1213         * html/canvas/WebMetalRenderPipelineDescriptor.h: Removed.
1214         * html/canvas/WebMetalRenderPipelineDescriptor.idl: Removed.
1215         * html/canvas/WebMetalRenderPipelineState.cpp: Removed.
1216         * html/canvas/WebMetalRenderPipelineState.h: Removed.
1217         * html/canvas/WebMetalRenderPipelineState.idl: Removed.
1218         * html/canvas/WebMetalRenderingContext.cpp: Removed.
1219         * html/canvas/WebMetalRenderingContext.h: Removed.
1220         * html/canvas/WebMetalRenderingContext.idl: Removed.
1221         * html/canvas/WebMetalSize.h: Removed.
1222         * html/canvas/WebMetalSize.idl: Removed.
1223         * html/canvas/WebMetalTexture.cpp: Removed.
1224         * html/canvas/WebMetalTexture.h: Removed.
1225         * html/canvas/WebMetalTexture.idl: Removed.
1226         * html/canvas/WebMetalTextureDescriptor.cpp: Removed.
1227         * html/canvas/WebMetalTextureDescriptor.h: Removed.
1228         * html/canvas/WebMetalTextureDescriptor.idl: Removed.
1229         * inspector/InspectorCanvas.cpp:
1230         (WebCore::InspectorCanvas::buildObjectForCanvas):
1231         * inspector/agents/InspectorCanvasAgent.cpp:
1232         (WebCore::InspectorCanvasAgent::requestContent):
1233         (WebCore::contextAsScriptValue):
1234         * page/RuntimeEnabledFeatures.h:
1235         (WebCore::RuntimeEnabledFeatures::setWebMetalEnabled): Deleted.
1236         (WebCore::RuntimeEnabledFeatures::webMetalEnabled const): Deleted.
1237         * platform/Logging.h:
1238         * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
1239         (WebCore::PlatformCALayerCocoa::layerTypeForPlatformLayer):
1240         (WebCore::PlatformCALayerCocoa::PlatformCALayerCocoa):
1241         * platform/graphics/cocoa/WebMetalLayer.h: Removed.
1242         * platform/graphics/cocoa/WebMetalLayer.mm: Removed.
1243         * platform/graphics/gpu/legacy/GPULegacyBuffer.cpp: Removed.
1244         * platform/graphics/gpu/legacy/GPULegacyBuffer.h: Removed.
1245         * platform/graphics/gpu/legacy/GPULegacyCommandBuffer.cpp: Removed.
1246         * platform/graphics/gpu/legacy/GPULegacyCommandBuffer.h: Removed.
1247         * platform/graphics/gpu/legacy/GPULegacyCommandQueue.cpp: Removed.
1248         * platform/graphics/gpu/legacy/GPULegacyCommandQueue.h: Removed.
1249         * platform/graphics/gpu/legacy/GPULegacyComputeCommandEncoder.cpp: Removed.
1250         * platform/graphics/gpu/legacy/GPULegacyComputeCommandEncoder.h: Removed.
1251         * platform/graphics/gpu/legacy/GPULegacyComputePipelineState.cpp: Removed.
1252         * platform/graphics/gpu/legacy/GPULegacyComputePipelineState.h: Removed.
1253         * platform/graphics/gpu/legacy/GPULegacyDepthStencilDescriptor.cpp: Removed.
1254         * platform/graphics/gpu/legacy/GPULegacyDepthStencilDescriptor.h: Removed.
1255         * platform/graphics/gpu/legacy/GPULegacyDepthStencilState.cpp: Removed.
1256         * platform/graphics/gpu/legacy/GPULegacyDepthStencilState.h: Removed.
1257         * platform/graphics/gpu/legacy/GPULegacyDevice.cpp: Removed.
1258         * platform/graphics/gpu/legacy/GPULegacyDevice.h: Removed.
1259         * platform/graphics/gpu/legacy/GPULegacyDrawable.cpp: Removed.
1260         * platform/graphics/gpu/legacy/GPULegacyDrawable.h: Removed.
1261         * platform/graphics/gpu/legacy/GPULegacyEnums.h: Removed.
1262         * platform/graphics/gpu/legacy/GPULegacyFunction.cpp: Removed.
1263         * platform/graphics/gpu/legacy/GPULegacyFunction.h: Removed.
1264         * platform/graphics/gpu/legacy/GPULegacyLibrary.cpp: Removed.
1265         * platform/graphics/gpu/legacy/GPULegacyLibrary.h: Removed.
1266         * platform/graphics/gpu/legacy/GPULegacyRenderCommandEncoder.cpp: Removed.
1267         * platform/graphics/gpu/legacy/GPULegacyRenderCommandEncoder.h: Removed.
1268         * platform/graphics/gpu/legacy/GPULegacyRenderPassAttachmentDescriptor.cpp: Removed.
1269         * platform/graphics/gpu/legacy/GPULegacyRenderPassAttachmentDescriptor.h: Removed.
1270         * platform/graphics/gpu/legacy/GPULegacyRenderPassColorAttachmentDescriptor.cpp: Removed.
1271         * platform/graphics/gpu/legacy/GPULegacyRenderPassColorAttachmentDescriptor.h: Removed.
1272         * platform/graphics/gpu/legacy/GPULegacyRenderPassDepthAttachmentDescriptor.cpp: Removed.
1273         * platform/graphics/gpu/legacy/GPULegacyRenderPassDepthAttachmentDescriptor.h: Removed.
1274         * platform/graphics/gpu/legacy/GPULegacyRenderPassDescriptor.cpp: Removed.
1275         * platform/graphics/gpu/legacy/GPULegacyRenderPassDescriptor.h: Removed.
1276         * platform/graphics/gpu/legacy/GPULegacyRenderPipelineColorAttachmentDescriptor.cpp: Removed.
1277         * platform/graphics/gpu/legacy/GPULegacyRenderPipelineColorAttachmentDescriptor.h: Removed.
1278         * platform/graphics/gpu/legacy/GPULegacyRenderPipelineDescriptor.cpp: Removed.
1279         * platform/graphics/gpu/legacy/GPULegacyRenderPipelineDescriptor.h: Removed.
1280         * platform/graphics/gpu/legacy/GPULegacyRenderPipelineState.cpp: Removed.
1281         * platform/graphics/gpu/legacy/GPULegacyRenderPipelineState.h: Removed.
1282         * platform/graphics/gpu/legacy/GPULegacySize.h: Removed.
1283         * platform/graphics/gpu/legacy/GPULegacyTexture.cpp: Removed.
1284         * platform/graphics/gpu/legacy/GPULegacyTexture.h: Removed.
1285         * platform/graphics/gpu/legacy/GPULegacyTextureDescriptor.cpp: Removed.
1286         * platform/graphics/gpu/legacy/GPULegacyTextureDescriptor.h: Removed.
1287         * platform/graphics/gpu/legacy/cocoa/GPULegacyBufferMetal.mm: Removed.
1288         * platform/graphics/gpu/legacy/cocoa/GPULegacyCommandBufferMetal.mm: Removed.
1289         * platform/graphics/gpu/legacy/cocoa/GPULegacyCommandQueueMetal.mm: Removed.
1290         * platform/graphics/gpu/legacy/cocoa/GPULegacyComputeCommandEncoderMetal.mm: Removed.
1291         * platform/graphics/gpu/legacy/cocoa/GPULegacyComputePipelineStateMetal.mm: Removed.
1292         * platform/graphics/gpu/legacy/cocoa/GPULegacyDepthStencilDescriptorMetal.mm: Removed.
1293         * platform/graphics/gpu/legacy/cocoa/GPULegacyDepthStencilStateMetal.mm: Removed.
1294         * platform/graphics/gpu/legacy/cocoa/GPULegacyDeviceMetal.mm: Removed.
1295         * platform/graphics/gpu/legacy/cocoa/GPULegacyDrawableMetal.mm: Removed.
1296         * platform/graphics/gpu/legacy/cocoa/GPULegacyFunctionMetal.mm: Removed.
1297         * platform/graphics/gpu/legacy/cocoa/GPULegacyLibraryMetal.mm: Removed.
1298         * platform/graphics/gpu/legacy/cocoa/GPULegacyRenderCommandEncoderMetal.mm: Removed.
1299         * platform/graphics/gpu/legacy/cocoa/GPULegacyRenderPassAttachmentDescriptorMetal.mm: Removed.
1300         * platform/graphics/gpu/legacy/cocoa/GPULegacyRenderPassColorAttachmentDescriptorMetal.mm: Removed.
1301         * platform/graphics/gpu/legacy/cocoa/GPULegacyRenderPassDepthAttachmentDescriptorMetal.mm: Removed.
1302         * platform/graphics/gpu/legacy/cocoa/GPULegacyRenderPassDescriptorMetal.mm: Removed.
1303         * platform/graphics/gpu/legacy/cocoa/GPULegacyRenderPipelineColorAttachmentDescriptorMetal.mm: Removed.
1304         * platform/graphics/gpu/legacy/cocoa/GPULegacyRenderPipelineDescriptorMetal.mm: Removed.
1305         * platform/graphics/gpu/legacy/cocoa/GPULegacyRenderPipelineStateMetal.mm: Removed.
1306         * platform/graphics/gpu/legacy/cocoa/GPULegacyTextureDescriptorMetal.mm: Removed.
1307         * platform/graphics/gpu/legacy/cocoa/GPULegacyTextureMetal.mm: Removed.
1308         * testing/InternalSettings.cpp:
1309         (WebCore::InternalSettings::Backup::Backup):
1310         (WebCore::InternalSettings::Backup::restoreTo):
1311         (WebCore::InternalSettings::setWebMetalEnabled): Deleted.
1312         * testing/InternalSettings.h:
1313         * testing/InternalSettings.idl:
1314
1315 2019-03-29  Devin Rousso  <drousso@apple.com>
1316
1317         Web Inspector: add fast returns for instrumentation hooks that have no affect before a frontend is connected
1318         https://bugs.webkit.org/show_bug.cgi?id=196382
1319         <rdar://problem/49403417>
1320
1321         Reviewed by Joseph Pecoraro.
1322
1323         Ensure that all instrumentation hooks use `FAST_RETURN_IF_NO_FRONTENDS` or check that
1324         `developerExtrasEnabled`. There should be no activity to/from any inspector objects until
1325         developer extras are enabled.
1326
1327         * inspector/InspectorInstrumentation.h:
1328         (WebCore::InspectorInstrumentation::didClearWindowObjectInWorld):
1329         (WebCore::InspectorInstrumentation::scriptExecutionBlockedByCSP):
1330         (WebCore::InspectorInstrumentation::domContentLoadedEventFired):
1331         (WebCore::InspectorInstrumentation::loadEventFired):
1332         (WebCore::InspectorInstrumentation::frameDetachedFromParent):
1333         (WebCore::InspectorInstrumentation::loaderDetachedFromFrame):
1334         (WebCore::InspectorInstrumentation::frameStartedLoading):
1335         (WebCore::InspectorInstrumentation::frameStoppedLoading):
1336         (WebCore::InspectorInstrumentation::frameScheduledNavigation):
1337         (WebCore::InspectorInstrumentation::frameClearedScheduledNavigation):
1338         * inspector/InspectorInstrumentation.cpp:
1339         (WebCore::InspectorInstrumentation::frameWindowDiscardedImpl):
1340         (WebCore::InspectorInstrumentation::didReceiveResourceResponseImpl):
1341         (WebCore::InspectorInstrumentation::didFailLoadingImpl):
1342         (WebCore::InspectorInstrumentation::addMessageToConsoleImpl):
1343         (WebCore::InspectorInstrumentation::consoleCountImpl):
1344         (WebCore::InspectorInstrumentation::startConsoleTimingImpl):
1345         (WebCore::InspectorInstrumentation::stopConsoleTimingImpl):
1346
1347         * inspector/agents/WebConsoleAgent.cpp:
1348         (WebCore::WebConsoleAgent::frameWindowDiscarded):
1349
1350 2019-03-29  Chris Dumez  <cdumez@apple.com>
1351
1352         Set window.closed immediately when close() is invoked
1353         https://bugs.webkit.org/show_bug.cgi?id=195409
1354
1355         Reviewed by Alex Christensen.
1356
1357         Window.closed should return true if it is closing:
1358         - https://html.spec.whatwg.org/#dom-window-closed
1359
1360         Window.close() sets the 'is closing' flag to true synchronously, as per:
1361         - https://html.spec.whatwg.org/#dom-window-close (step 3.1)
1362
1363         No new tests, rebaselined existing tests.
1364
1365         * page/DOMWindow.cpp:
1366         (WebCore::DOMWindow::closed const):
1367
1368 2019-03-29  Zalan Bujtas  <zalan@apple.com>
1369
1370         [Simple line layout] Turn off inline boxtree generation for multiline content
1371         https://bugs.webkit.org/show_bug.cgi?id=196404
1372         <rdar://problem/49234033>
1373
1374         Reviewed by Simon Fraser.
1375
1376         Currently simple line layout can't provide the correct line breaking context to the inline tree when the boxtree is
1377         generated using the simple line runs. This patch limits the generation of such trees to single lines. Multiline content will
1378         go through the "let's layout this content again" codepath.
1379         This patch fixes disappearing content on Questar.
1380
1381         Test: fast/text/simple-line-layout-and-multiline-inlineboxtree.html
1382
1383         * rendering/SimpleLineLayoutFunctions.cpp:
1384         (WebCore::SimpleLineLayout::canUseForLineBoxTree):
1385
1386 2019-03-29  Justin Fan  <justin_fan@apple.com>
1387
1388         [Web GPU] Replace unsigned longs in WebGPU with uint64_t
1389         https://bugs.webkit.org/show_bug.cgi?id=196401
1390
1391         Reviewed by Myles C. Maxfield.
1392
1393         Unsigned long is not guaranteed to be 64 bits on all platforms. In addition, rowPitch is updated
1394         to u32 in the API and the implementation to match.
1395
1396         No new tests. No new behavior.
1397
1398         * Modules/webgpu/WebGPUBuffer.cpp:
1399         (WebCore::WebGPUBuffer::setSubData):
1400         * Modules/webgpu/WebGPUBuffer.h:
1401         * Modules/webgpu/WebGPUBufferBinding.h:
1402         * Modules/webgpu/WebGPUCommandEncoder.cpp:
1403         (WebCore::WebGPUCommandEncoder::copyBufferToBuffer):
1404         * Modules/webgpu/WebGPUCommandEncoder.h:
1405         * Modules/webgpu/WebGPUCommandEncoder.idl:
1406         * Modules/webgpu/WebGPURenderPassEncoder.cpp:
1407         (WebCore::WebGPURenderPassEncoder::setVertexBuffers):
1408         * Modules/webgpu/WebGPURenderPassEncoder.h:
1409         * platform/graphics/gpu/GPUBindGroupLayout.h:
1410         * platform/graphics/gpu/GPUBuffer.h:
1411         (WebCore::GPUBuffer::byteLength const):
1412         * platform/graphics/gpu/GPUBufferBinding.h:
1413         * platform/graphics/gpu/GPUBufferDescriptor.h:
1414         * platform/graphics/gpu/GPUCommandBuffer.h:
1415         * platform/graphics/gpu/GPURenderPassEncoder.h:
1416         * platform/graphics/gpu/GPUVertexAttributeDescriptor.h:
1417         * platform/graphics/gpu/GPUVertexInputDescriptor.h:
1418         * platform/graphics/gpu/cocoa/GPUBufferMetal.mm:
1419         (WebCore::GPUBuffer::GPUBuffer):
1420         (WebCore::GPUBuffer::setSubData):
1421         * platform/graphics/gpu/cocoa/GPUCommandBufferMetal.mm:
1422         (WebCore::GPUCommandBuffer::copyBufferToBuffer):
1423         * platform/graphics/gpu/cocoa/GPURenderPassEncoderMetal.mm:
1424         (WebCore::GPURenderPassEncoder::setVertexBuffers):
1425
1426 2019-03-29  Wenson Hsieh  <wenson_hsieh@apple.com>
1427
1428         REGRESSION (r243250): Text interactions are no longer suppressed when editing in some websites
1429         https://bugs.webkit.org/show_bug.cgi?id=196378
1430         <rdar://problem/49231299>
1431
1432         Reviewed by Simon Fraser.
1433
1434         Enabling async overflow scrolling by default in r243250 exposed an issue with hidden editable area detection
1435         heuristics. Currently, an empty value for RenderLayer::selfClipRect is used to determine whether the layer
1436         enclosing the editable element or form control is completely clipped by a parent (in other words, the clip rect
1437         is empty). With async overflow scrolling, the enclosing layer of the editable element (as seen in the websites
1438         affected by this bug) will now be a clipping root for painting, since it is composited. This means selfClipRect
1439         returns a non-empty rect despite the layer being entirely clipped, which negates the heuristic.
1440
1441         To address this, we adjust the clipping heuristic to instead walk up the layer tree (crossing frame boundaries)
1442         and look for enclosing ancestors with overflow clip. For each layer we find with an overflow clip, compute the
1443         clip rect of the previous layer relative to the ancestor with overflow clip. If the clipping rect is empty, we
1444         know that the layer is hidden.
1445
1446         This isn't a perfect strategy, since it may still report false negatives (reporting a layer as visible when it
1447         is not) in some cases. One such edge case is a series of overflow hidden containers, nested in such a way that
1448         each container is only partially clipped relative to its ancestor, but the deepest layer is completely clipped
1449         relative to the topmost layer. However, this heuristic is relatively cheap (entailing a layer tree walk at
1450         worst) and works for common use cases on the web without risking scenarios in which text selection that
1451         shouldn't be suppressed ends up becoming suppressed.
1452
1453         Test: editing/selection/ios/hide-selection-in-textarea-with-transform.html
1454
1455         * rendering/RenderLayer.cpp:
1456         (WebCore::RenderLayer::isTransparentOrFullyClippedRespectingParentFrames const):
1457
1458 2019-03-29  Takashi Komori  <Takashi.Komori@sony.com>
1459
1460         [Curl] Add Server Trust Evaluation Support.
1461         https://bugs.webkit.org/show_bug.cgi?id=191646
1462
1463         Reviewed by Fujii Hironori.
1464
1465         Tests: http/tests/ssl/iframe-upgrade.https.html
1466                http/tests/ssl/mixedContent/insecure-websocket.html
1467                http/tests/ssl/upgrade-origin-usage.html
1468
1469         * platform/network/curl/AuthenticationChallenge.h:
1470         * platform/network/curl/AuthenticationChallengeCurl.cpp:
1471         (WebCore::AuthenticationChallenge::AuthenticationChallenge):
1472         (WebCore::AuthenticationChallenge::protectionSpaceForPasswordBased):
1473         (WebCore::AuthenticationChallenge::protectionSpaceForServerTrust):
1474         (WebCore::AuthenticationChallenge::protectionSpaceFromHandle): Deleted.
1475         * platform/network/curl/CurlContext.cpp:
1476         (WebCore::CurlHandle::disableServerTrustEvaluation):
1477         * platform/network/curl/CurlContext.h:
1478         * platform/network/curl/CurlRequest.cpp:
1479         (WebCore::CurlRequest::setupTransfer):
1480         * platform/network/curl/CurlRequest.h:
1481         (WebCore::CurlRequest::disableServerTrustEvaluation):
1482
1483 2019-03-29  Ryosuke Niwa  <rniwa@webkit.org>
1484
1485         Pasting a table from Confluence strip of table cell content
1486         https://bugs.webkit.org/show_bug.cgi?id=196390
1487
1488         Reviewed by Antti Koivisto.
1489
1490         The bug was ultimately caused by FrameView of the document we use to sanitize the pasteboard content
1491         having 0px by 0px dimension. This caused div with `overflow-x: auto` surrounding a table to have
1492         the height of 0px. Because StyledMarkupAccumulator::renderedTextRespectingRange uses TextIterator
1493         to serialize a text node and this div was an ancestor of the text node, TextIterator::handleTextNode
1494         ended up exiting early.
1495
1496         Fixed the bug by giving FrameView, which is used to sanitize the content, a dimension of 800px by 600px.
1497
1498         Using TextIteratorIgnoresStyleVisibility is not a great alternative since removing invisible content
1499         during paste is an important privacy feature.
1500
1501         Test: editing/pasteboard/paste-content-with-overflow-auto-parent-across-origin.html
1502
1503         * editing/markup.cpp:
1504         (WebCore::createPageForSanitizingWebContent):
1505
1506 2019-03-29  Antoine Quint  <graouts@apple.com>
1507
1508         WebKitTestRunner crashes when running pointerevents/ios/touch-action-none-in-overflow-scrolling-touch.html
1509         https://bugs.webkit.org/show_bug.cgi?id=196345
1510
1511         Reviewed by Dean Jackson.
1512
1513         An enum used within a WTF::OptionSet needs to have only power-of-two values that are larger than 0.
1514
1515         * platform/TouchAction.h:
1516         * rendering/style/StyleRareNonInheritedData.h:
1517
1518 2019-03-29  Michael Catanzaro  <mcatanzaro@igalia.com>
1519
1520         HTMLInputElement::setEditingValue should not fail if renderer doesn't exist
1521         https://bugs.webkit.org/show_bug.cgi?id=195708
1522
1523         Reviewed by Wenson Hsieh.
1524
1525         HTMLInputElement::setEditingValue currently returns early if the element's renderer() is
1526         null. This is causing the Epiphany password manager to fail to remember passwords on
1527         https://www.geico.com/ except for navigations through page cache.
1528
1529         This check was originally added to avoid some assertion, but I don't know which one, and
1530         there's definitely not any assertion hit nowadays in this case. Probably there are more
1531         guards checking if renderer() is null elsewhere in the code nowadays, closer to where it's
1532         really needed.
1533
1534         Test: fast/forms/editing-value-null-renderer.html
1535
1536         * html/HTMLInputElement.cpp:
1537         (WebCore::HTMLInputElement::setEditingValue):
1538
1539 2019-03-29  Chris Dumez  <cdumez@apple.com>
1540
1541         Unreviewed, rebaseline WPT test after r243638.
1542
1543         * DerivedSources-input.xcfilelist:
1544         * DerivedSources-output.xcfilelist:
1545
1546 2019-03-28  Antoine Quint  <graouts@apple.com>
1547
1548         All PointerEvent.isTrusted is always false.
1549         https://bugs.webkit.org/show_bug.cgi?id=196075
1550         <rdar://problem/49158778>
1551
1552         Reviewed by Chris Dumez.
1553
1554         Test: pointerevents/ios/pointer-events-is-trusted.html
1555
1556         The constructors we were using for some PointerEvent::create() methods were using initializers which are expected to be used with JS APIs
1557         and thus generate untrusted events. We switch to using constructors using dedicated parameters which will set isTrusted to true.
1558
1559         * dom/PointerEvent.cpp:
1560         (WebCore::PointerEvent::create):
1561         (WebCore::PointerEvent::createPointerCancelEvent):
1562         (WebCore::PointerEvent::PointerEvent):
1563         (WebCore::m_isPrimary):
1564         (WebCore::m_pointerType):
1565         * dom/PointerEvent.h:
1566         * page/PointerCaptureController.cpp:
1567         (WebCore::PointerCaptureController::cancelPointer):
1568
1569 2019-03-29  Philippe Normand  <pnormand@igalia.com>
1570
1571         [GStreamer] imxvpudecoder detection and handling
1572         https://bugs.webkit.org/show_bug.cgi?id=196346
1573
1574         Reviewed by Xabier Rodriguez-Calvar.
1575
1576         When the imxvpudecoder is used, the texture sampling of the
1577         directviv-uploaded texture returns an RGB value, so there's no need
1578         to convert it. This patch also includes a refactoring of the
1579         ImageRotation flag handling. The flag is now computed once only
1580         and stored in an instance variable.
1581
1582         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1583         (WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin):
1584         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
1585         (WebCore::GstVideoFrameHolder::GstVideoFrameHolder):
1586         (WebCore::MediaPlayerPrivateGStreamerBase::~MediaPlayerPrivateGStreamerBase):
1587         (WebCore::MediaPlayerPrivateGStreamerBase::pushTextureToCompositor):
1588         (WebCore::MediaPlayerPrivateGStreamerBase::flushCurrentBuffer):
1589         (WebCore::MediaPlayerPrivateGStreamerBase::copyVideoTextureToPlatformTexture):
1590         (WebCore::MediaPlayerPrivateGStreamerBase::nativeImageForCurrentTime):
1591         (WebCore::MediaPlayerPrivateGStreamerBase::setVideoSourceOrientation):
1592         (WebCore::MediaPlayerPrivateGStreamerBase::updateTextureMapperFlags):
1593         (WebCore::texMapFlagFromOrientation): Deleted.
1594         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
1595
1596 2019-03-29  Cathie Chen  <cathiechen@igalia.com>
1597
1598         Implement ResizeObserver.
1599         https://bugs.webkit.org/show_bug.cgi?id=157743
1600
1601         Reviewed by Simon Fraser.
1602
1603         Tests: resize-observer/modify-frametree-in-callback.html
1604                resize-observer/multi-frames.html
1605                resize-observer/observe-element-from-other-frame.html
1606                Imported from WPT by https://bugs.webkit.org/show_bug.cgi?id=193821
1607
1608         The data structure: Document has a ResizeObserver slot. ResizeObserver has a ResizeObservation slot.
1609         ResizeObservation is related to one Element and the last reported size.
1610         On the other hand, Element has a ResizeObservation slot.
1611
1612         At the beginning of willDisplayPage, it will check resize observations for current page if:
1613         1. There is FrameView be layout and there are ResizeObservers in this page.
1614         2. m_resizeObserverTimer has been started by observe() or hasSkippedResizeObservers().
1615         During checkResizeObservations(), we'll gatherDocumentsNeedingResizeObservationCheck() first,
1616         then notifyResizeObservers() for each document. During notifyResizeObservers(), it will gather
1617         the m_activeObservations whose size changed and target element deeper than require depth.
1618         The size changed shallower observations are skipped observations which will be delivered
1619         in the next time. And an ErrorEvent will be reported.
1620         After gathering, deliverResizeObservations create entries and invoke the callbacks with them.
1621
1622         The Element from other document could be observed.
1623
1624         * CMakeLists.txt:
1625         * Configurations/FeatureDefines.xcconfig:
1626         * DerivedSources.make:
1627         * Sources.txt:
1628         * WebCore.xcodeproj/project.pbxproj:
1629         * bindings/js/WebCoreBuiltinNames.h:
1630         * dom/Document.cpp:
1631         (WebCore::Document::getParserLocation const):
1632         (WebCore::Document::addResizeObserver):
1633         (WebCore::Document::removeResizeObserver):
1634         (WebCore::Document::hasResizeObservers):
1635         (WebCore::Document::gatherResizeObservations): Gather m_activeObservations at depth and return the shallowest depth.
1636         (WebCore::Document::deliverResizeObservations): Deliver m_activeObservations, generate ResizeObserverEntries, and invoke the m_callbacks.
1637         (WebCore::Document::hasSkippedResizeObservations const): To determine if Document has the size changed but not delivered observations.
1638         (WebCore::Document::setHasSkippedResizeObservations):
1639         (WebCore::Document::scheduleResizeObservations):
1640         * dom/Document.h:
1641         * dom/Element.cpp:
1642         (WebCore::Element::~Element):
1643         (WebCore::Element::disconnectFromResizeObservers):
1644         (WebCore::Element::ensureResizeObserverData):
1645         (WebCore::Element::resizeObserverData):
1646         * dom/Element.h:
1647         * dom/ElementRareData.cpp:
1648         * dom/ElementRareData.h:
1649         (WebCore::ElementRareData::resizeObserverData):
1650         (WebCore::ElementRareData::setResizeObserverData):
1651         (WebCore::ElementRareData::useTypes const):
1652         * page/FrameView.cpp:
1653         (WebCore::FrameView::didLayout):
1654         * page/FrameViewLayoutContext.cpp:
1655         (WebCore::FrameViewLayoutContext::layoutTimerFired): We need to start a ResizeObserver timer here, because for WK1 this might not trigger flushCompositingChanges.
1656         * page/Page.cpp:
1657         (WebCore::Page::Page):
1658         (WebCore::Page::willDisplayPage):
1659         (WebCore::Page::hasResizeObservers const):
1660         (WebCore::Page::gatherDocumentsNeedingResizeObservationCheck): Gather the documents with resize observers.
1661         (WebCore::Page::checkResizeObservations): Gather documents then notifyResizeObservers for each document.
1662         (WebCore::Page::scheduleResizeObservations):
1663         (WebCore::Page::notifyResizeObservers): Gather m_activeObservations and deliver them. Report ErrorEvent if it has skipped observations.
1664         * page/Page.h:
1665         (WebCore::Page::setNeedsCheckResizeObservations): Page needs to check ResizeObservations if FrameView layout or m_resizeObserverTimer has been started.
1666         (WebCore::Page::needsCheckResizeObservations const):
1667         * page/PageConsoleClient.cpp:
1668         (WebCore::PageConsoleClient::addMessage):
1669         (WebCore::getParserLocationForConsoleMessage): Deleted.
1670         * page/ResizeObservation.cpp: Added.
1671         (WebCore::ResizeObservation::create):
1672         (WebCore::ResizeObservation::ResizeObservation):
1673         (WebCore::ResizeObservation::~ResizeObservation):
1674         (WebCore::ResizeObservation::updateObservationSize):
1675         (WebCore::ResizeObservation::computeObservedSize const):
1676         (WebCore::ResizeObservation::computeTargetLocation const):
1677         (WebCore::ResizeObservation::computeContentRect const):
1678         (WebCore::ResizeObservation::elementSizeChanged const):
1679         (WebCore::ResizeObservation::targetElementDepth const):
1680         * page/ResizeObservation.h: Copied from Tools/DumpRenderTree/TestOptions.h.
1681         (WebCore::ResizeObservation::target const):
1682         * page/ResizeObserver.cpp: Added.
1683         (WebCore::ResizeObserver::create):
1684         (WebCore::ResizeObserver::ResizeObserver):
1685         (WebCore::ResizeObserver::~ResizeObserver):
1686         (WebCore::ResizeObserver::scheduleObservations):
1687         (WebCore::ResizeObserver::observe):
1688         (WebCore::ResizeObserver::unobserve):
1689         (WebCore::ResizeObserver::disconnect):
1690         (WebCore::ResizeObserver::targetDestroyed):
1691         (WebCore::ResizeObserver::gatherObservations):
1692         (WebCore::ResizeObserver::deliverObservations):
1693         (WebCore::ResizeObserver::removeTarget):
1694         (WebCore::ResizeObserver::removeAllTargets):
1695         (WebCore::ResizeObserver::removeObservation):
1696         (WebCore::ResizeObserver::hasPendingActivity const):
1697         (WebCore::ResizeObserver::activeDOMObjectName const):
1698         (WebCore::ResizeObserver::canSuspendForDocumentSuspension const):
1699         (WebCore::ResizeObserver::stop):
1700         * page/ResizeObserver.h: Added.
1701         (WebCore::ResizeObserver::hasObservations const):
1702         (WebCore::ResizeObserver::hasActiveObservations const):
1703         (WebCore::ResizeObserver::maxElementDepth):
1704         (WebCore::ResizeObserver::hasSkippedObservations const):
1705         (WebCore::ResizeObserver::setHasSkippedObservations):
1706         * page/ResizeObserver.idl: Copied from Tools/DumpRenderTree/TestOptions.h.
1707         * page/ResizeObserverCallback.h: Copied from Tools/DumpRenderTree/TestOptions.h.
1708         * page/ResizeObserverCallback.idl: Copied from Tools/DumpRenderTree/TestOptions.h.
1709         * page/ResizeObserverEntry.h: Copied from Tools/DumpRenderTree/TestOptions.h.
1710         (WebCore::ResizeObserverEntry::create):
1711         (WebCore::ResizeObserverEntry::target const):
1712         (WebCore::ResizeObserverEntry::contentRect const):
1713         (WebCore::ResizeObserverEntry::ResizeObserverEntry):
1714         * page/ResizeObserverEntry.idl: Copied from Tools/DumpRenderTree/TestOptions.h.
1715         * page/Settings.yaml:
1716
1717 2019-03-28  Chris Dumez  <cdumez@apple.com>
1718
1719         Support <object>.contentWindow
1720         https://bugs.webkit.org/show_bug.cgi?id=195562
1721
1722         Reviewed by Sam Weinig.
1723
1724         Support <object>.contentWindow as per:
1725         - https://html.spec.whatwg.org/multipage/iframe-embed-object.html#dom-object-contentwindow
1726
1727         No new tests, updated / rebaselined existing tests.
1728
1729         * html/HTMLObjectElement.idl:
1730
1731 2019-03-28  Myles C. Maxfield  <mmaxfield@apple.com>
1732
1733         FontFace constructor throws an exception when there is a name which starts with a number
1734         https://bugs.webkit.org/show_bug.cgi?id=196232
1735         <rdar://problem/49293978>
1736
1737         Reviewed by Ryosuke Niwa.
1738
1739         We were technically following the spec, but Chrome and Firefox are both consistent and it was making a website break.
1740         This is just a short-term fix until the underlying https://bugs.webkit.org/show_bug.cgi?id=196381 is fixed.
1741
1742         Test: fast/text/font-face-family.html
1743
1744         * css/FontFace.cpp:
1745         (WebCore::FontFace::setFamily):
1746
1747 2019-03-28  Justin Fan  <justin_fan@apple.com>
1748
1749         [Web GPU] Replace 'unsigned long' with 'unsigned' when implementing u32 variables
1750         https://bugs.webkit.org/show_bug.cgi?id=194618
1751         <rdar://problem/48055796>
1752
1753         Reviewed by Myles C. Maxfield.
1754
1755         WebIDL for "unsigned" on 64-bit is "unsigned long". Update Web GPU to match.
1756
1757         No new tests; no change in behavior.
1758
1759         * Modules/webgpu/GPUBindGroupLayoutBinding.h:
1760         * Modules/webgpu/WHLSL/Metal/WHLSLVertexBufferIndexCalculator.cpp:
1761         (WebCore::WHLSL::Metal::calculateVertexBufferIndex):
1762         * Modules/webgpu/WHLSL/Metal/WHLSLVertexBufferIndexCalculator.h:
1763         * Modules/webgpu/WebGPUBindGroupBinding.h:
1764         * Modules/webgpu/WebGPUBindGroupDescriptor.cpp:
1765         (WebCore::validateBufferBindingType):
1766         (WebCore::WebGPUBindGroupDescriptor::tryCreateGPUBindGroupDescriptor const):
1767         * Modules/webgpu/WebGPUBuffer.cpp:
1768         (WebCore::WebGPUBuffer::setSubData):
1769         * Modules/webgpu/WebGPUBuffer.h:
1770         * Modules/webgpu/WebGPUBufferBinding.h:
1771         * Modules/webgpu/WebGPURenderPassEncoder.cpp:
1772         (WebCore::WebGPURenderPassEncoder::setVertexBuffers):
1773         (WebCore::WebGPURenderPassEncoder::draw):
1774         * Modules/webgpu/WebGPURenderPassEncoder.h:
1775         * platform/graphics/gpu/GPUBindGroupBinding.h:
1776         * platform/graphics/gpu/GPUBindGroupLayout.h:
1777         * platform/graphics/gpu/GPUBufferBinding.h:
1778         * platform/graphics/gpu/GPUExtent3D.h:
1779         * platform/graphics/gpu/GPULimits.h:
1780         * platform/graphics/gpu/GPURenderPassEncoder.h:
1781         * platform/graphics/gpu/GPUTextureDescriptor.h:
1782         * platform/graphics/gpu/cocoa/GPUBindGroupLayoutMetal.mm:
1783         (WebCore::GPUBindGroupLayout::tryCreate):
1784         * platform/graphics/gpu/cocoa/GPUBindGroupMetal.mm:
1785         (WebCore::GPUBindGroup::tryCreate):
1786         * platform/graphics/gpu/cocoa/GPURenderPassEncoderMetal.mm:
1787         (WebCore::GPURenderPassEncoder::setVertexBuffers):
1788         (WebCore::GPURenderPassEncoder::draw):
1789         * platform/graphics/gpu/cocoa/GPURenderPipelineMetal.mm:
1790         (WebCore::trySetInputStateForPipelineDescriptor):
1791         * platform/graphics/gpu/cocoa/GPUTextureMetal.mm:
1792         (WebCore::storageModeForPixelFormatAndSampleCount):
1793
1794 2019-03-28  Ryosuke Niwa  <rniwa@webkit.org>
1795
1796         getBoundingClientRect always returns empty rect on a collapsed range
1797         https://bugs.webkit.org/show_bug.cgi?id=196380
1798
1799         Reviewed by Wenson Hsieh.
1800
1801         The bug was caused by Range::boundingRect merging rects via FloatRect::unite which ignores empty rects.
1802         Use uniteIfNonZero instead to fix the bug. Note that we can't use uniteEvenIfEmpty because that would
1803         set x, y to always 0, 0 as we would end up merging any rect with the initial empty rect.
1804
1805         Test: fast/dom/Range/getBoundingClientRect-on-collapsed-selection-range.html
1806
1807         * dom/Range.cpp:
1808         (WebCore::Range::boundingRect const):
1809
1810 2019-03-28  Justin Fan  <justin_fan@apple.com>
1811
1812         [Web GPU] Prototype compute pipeline with MSL
1813         https://bugs.webkit.org/show_bug.cgi?id=196107
1814         <rdar://problem/46289650>
1815
1816         Reviewed by Myles Maxfield.
1817
1818         Add GPUComputePassEncoder, GPUComputePipeline, and GPUComputePipelineDescriptor.
1819         Implement everything needed to prototype a compute pipeline in Web GPU using Metal shaders and bound resources.
1820
1821         Test: webgpu/compute-squares.html
1822
1823         Add files and symbols:
1824         * CMakeLists.txt:
1825         * DerivedSources-input.xcfilelist:
1826         * DerivedSources-output.xcfilelist:
1827         * DerivedSources.make:
1828         * Sources.txt:
1829         * SourcesCocoa.txt:
1830         * WebCore.xcodeproj/project.pbxproj:
1831         * bindings/js/WebCoreBuiltinNames.h:
1832
1833         Misc fixes:
1834         * Modules/webgpu/WHLSL/WHLSLNameResolver.h: Missing include.
1835         * Modules/webgpu/WHLSL/WHLSLSynthesizeConstructors.cpp: Missing include.
1836         * Modules/webgpu/WebGPUPipelineStageDescriptor.cpp: Added. Move pipeline stage validation logic here.
1837         (WebCore::WebGPUPipelineStageDescriptor::tryCreateGPUPipelineStageDescriptor const):
1838         * Modules/webgpu/WebGPURenderPipeline.cpp: Remove unnecessary include.
1839         * Modules/webgpu/WebGPURenderPipeline.h:
1840         * Modules/webgpu/WebGPURenderPipelineDescriptor.cpp: Add missing inlcude.
1841         (WebCore::WebGPUPipelineStageDescriptor::tryCreateGPUPipelineStageDescriptor const): Moved to WebGPUPipelineStageDescriptor.cpp.
1842         * platform/graphics/gpu/GPUPipelineDescriptorBase.h: Add missing include.
1843         * platform/graphics/gpu/cocoa/GPURenderPipelineMetal.mm: Add missing include.
1844         (WebCore::GPURenderPipeline::GPURenderPipeline): Remove unecessary ref of GPUPipelineLayout.
1845         * platform/text/mac/TextEncodingRegistryMac.mm: Carbon.h was causing ambiguous reference build errors in this file.
1846
1847         Enable creating a GPUComputePassEncoder from a GPUCommandEncoder:
1848         * Modules/webgpu/WebGPUCommandEncoder.cpp:
1849         (WebCore::WebGPUCommandEncoder::beginRenderPass): No longer passing this WebGPUCommandEncoder to pass encoders.
1850         (WebCore::WebGPUCommandEncoder::beginComputePass): Added.
1851         * Modules/webgpu/WebGPUCommandEncoder.h:
1852         * Modules/webgpu/WebGPUCommandEncoder.idl:
1853
1854         Add GPUComputePassEncoder:
1855         * Modules/webgpu/WebGPUComputePassEncoder.cpp: Added.
1856         (WebCore::WebGPUComputePassEncoder::create):
1857         (WebCore::WebGPUComputePassEncoder::WebGPUComputePassEncoder):
1858         (WebCore::WebGPUComputePassEncoder::setPipeline):
1859         (WebCore::WebGPUComputePassEncoder::dispatch):
1860         (WebCore::WebGPUComputePassEncoder::passEncoder):
1861         (WebCore::WebGPUComputePassEncoder::passEncoder const):
1862         * Modules/webgpu/WebGPUComputePassEncoder.h: Added.
1863         * Modules/webgpu/WebGPUComputePassEncoder.idl: Added.
1864         * platform/graphics/gpu/GPUComputePassEncoder.h: Added.
1865         (WebCore::GPUComputePassEncoder::~GPUComputePassEncoder):
1866         * platform/graphics/gpu/cocoa/GPUComputePassEncoderMetal.mm: Added.
1867         (WebCore::GPUComputePassEncoder::tryCreate):
1868         (WebCore::GPUComputePassEncoder::GPUComputePassEncoder):
1869         (WebCore::GPUComputePassEncoder::setPipeline):
1870         (WebCore::GPUComputePassEncoder::dispatch): Use a default calculation for threadsPerThreadgroup while MSL is still an accepted shader format.
1871         (WebCore::GPUComputePassEncoder::platformPassEncoder const):
1872         (WebCore::GPUComputePassEncoder::useResource):
1873         (WebCore::GPUComputePassEncoder::setComputeBuffer):
1874
1875         Add GPUComputePipeline:
1876         * Modules/webgpu/WebGPUComputePipeline.cpp: Added.
1877         (WebCore::WebGPUComputePipeline::create):
1878         (WebCore::WebGPUComputePipeline::WebGPUComputePipeline):
1879         * Modules/webgpu/WebGPUComputePipeline.h: Added.
1880         (WebCore::WebGPUComputePipeline::computePipeline const):
1881         * Modules/webgpu/WebGPUComputePipeline.idl: Added.
1882         * Modules/webgpu/WebGPUComputePipelineDescriptor.cpp: Added.
1883         (WebCore::WebGPUComputePipelineDescriptor::tryCreateGPUComputePipelineDescriptor const):
1884         * Modules/webgpu/WebGPUComputePipelineDescriptor.h: Added.
1885         * Modules/webgpu/WebGPUComputePipelineDescriptor.idl: Added.
1886         * platform/graphics/gpu/GPUComputePipeline.h: Added.
1887         (WebCore::GPUComputePipeline::platformComputePipeline const):
1888         * platform/graphics/gpu/GPUComputePipelineDescriptor.h: Added.
1889         (WebCore::GPUComputePipelineDescriptor::GPUComputePipelineDescriptor):
1890         * platform/graphics/gpu/cocoa/GPUComputePipelineMetal.mm: Added.
1891         (WebCore::tryCreateMtlComputeFunction):
1892         (WebCore::tryCreateMTLComputePipelineState):
1893         (WebCore::GPUComputePipeline::tryCreate):
1894         (WebCore::GPUComputePipeline::GPUComputePipeline):
1895
1896         Enable creating a GPUComputePipeline from a GPUDevice:
1897         * Modules/webgpu/WebGPUDevice.cpp:
1898         (WebCore::WebGPUDevice::createComputePipeline const):
1899         * Modules/webgpu/WebGPUDevice.h:
1900         * Modules/webgpu/WebGPUDevice.idl:
1901         * platform/graphics/gpu/GPUDevice.cpp:
1902         (WebCore::GPUDevice::tryCreateComputePipeline const):
1903         * platform/graphics/gpu/GPUDevice.h:
1904
1905         No longer unnecessarily ref the WebGPUCommandEncoder when creating pass encoder:
1906         * Modules/webgpu/WebGPUProgrammablePassEncoder.cpp:
1907         (WebCore::WebGPUProgrammablePassEncoder::setBindGroup):
1908         (WebCore::WebGPUProgrammablePassEncoder::WebGPUProgrammablePassEncoder): Deleted.
1909         (WebCore::WebGPUProgrammablePassEncoder::setBindGroup const): Deleted.
1910         * Modules/webgpu/WebGPUProgrammablePassEncoder.h:
1911         * Modules/webgpu/WebGPURenderPassEncoder.cpp:
1912         (WebCore::WebGPURenderPassEncoder::create):
1913         (WebCore::WebGPURenderPassEncoder::WebGPURenderPassEncoder):
1914         (WebCore::WebGPURenderPassEncoder::setPipeline):
1915         (WebCore::WebGPURenderPassEncoder::passEncoder):
1916         (WebCore::WebGPURenderPassEncoder::passEncoder const):
1917         * Modules/webgpu/WebGPURenderPassEncoder.h:
1918
1919         Updates to GPUBindGroup and *setBindGroup for compute function arguments:
1920         * platform/graphics/gpu/GPUBindGroup.h:
1921         (WebCore::GPUBindGroup::vertexArgsBuffer const):
1922         (WebCore::GPUBindGroup::fragmentArgsBuffer const):
1923         (WebCore::GPUBindGroup::computeArgsBuffer const):
1924         (WebCore::GPUBindGroup::vertexArgsBuffer): Deleted. Const-qualified.
1925         (WebCore::GPUBindGroup::fragmentArgsBuffer): Ditto.
1926         * platform/graphics/gpu/cocoa/GPUBindGroupMetal.mm:
1927         (WebCore::tryGetResourceAsMTLSamplerState): Now just returns the MTLSamplerState to reduce reference churning.
1928         (WebCore::GPUBindGroup::tryCreate):
1929         (WebCore::GPUBindGroup::GPUBindGroup):
1930         (WebCore::tryGetResourceAsSampler): Renamed to tryGetResourceAsMTLSamplerState.
1931
1932         Updates to GPUProgrammablePassEncoder and GPURenderPassEncoder:
1933         * platform/graphics/gpu/GPUProgrammablePassEncoder.h:
1934         (WebCore::GPUProgrammablePassEncoder::setVertexBuffer):
1935         (WebCore::GPUProgrammablePassEncoder::setFragmentBuffer):
1936         (WebCore::GPUProgrammablePassEncoder::setComputeBuffer): Added.
1937         * platform/graphics/gpu/GPURenderPassEncoder.h:
1938         (WebCore::GPURenderPassEncoder::~GPURenderPassEncoder):
1939         * platform/graphics/gpu/GPURenderPipeline.h:
1940         * platform/graphics/gpu/cocoa/GPUProgrammablePassEncoderMetal.mm: Remove unecessary include.
1941         (WebCore::GPUProgrammablePassEncoder::endPass): No longer virtual. Delegates shared behavior for derived classes.
1942         (WebCore::GPUProgrammablePassEncoder::setBindGroup):
1943         * platform/graphics/gpu/cocoa/GPURenderPassEncoderMetal.mm:
1944         (WebCore::GPURenderPassEncoder::platformPassEncoder const):
1945         (WebCore::GPURenderPassEncoder::setPipeline):
1946         (WebCore::GPURenderPassEncoder::draw):
1947         (WebCore::GPURenderPassEncoder::useResource): These private overrides are called only by base after checking for encoder existence.
1948         (WebCore::GPURenderPassEncoder::setVertexBuffer): Ditto.
1949         (WebCore::GPURenderPassEncoder::setFragmentBuffer): Ditto.
1950         (WebCore::GPURenderPassEncoder::endPass): Deleted. Now handled by base class.
1951
1952 2019-03-27  Jiewen Tan  <jiewen_tan@apple.com>
1953
1954         IDBRequest::dispatchEvent should check nullability of m_transaction before operations that rely on it to be non null
1955         https://bugs.webkit.org/show_bug.cgi?id=196319
1956         <rdar://problem/49355279>
1957
1958         Reviewed by Alex Christensen.
1959
1960         The test that triggers this crash is on Bug 196276.
1961
1962         * Modules/indexeddb/IDBRequest.cpp:
1963         (WebCore::IDBRequest::dispatchEvent):
1964
1965 2019-03-28  Ryosuke Niwa  <rniwa@webkit.org>
1966
1967         Debug assert in DOMSelection::containsNode when node belongs to a different tree
1968         https://bugs.webkit.org/show_bug.cgi?id=196342
1969
1970         Reviewed by Antti Koivisto.
1971
1972         The assertion was wrong. It's possible for Range::compareBoundaryPoints to return WRONG_DOCUMENT_ERR
1973         when the node and the start container belong to two different trees.
1974
1975         Return false in such a case for now since it's unclear (unspecified) what these methods on Selection
1976         should do with respect to shadow trees, preserving the current behavior of release builds.
1977
1978         Test: editing/selection/containsNode-with-no-common-ancestor.html
1979
1980         * page/DOMSelection.cpp:
1981         (WebCore::DOMSelection::containsNode const):
1982
1983 2019-03-28  Tim Horton  <timothy_horton@apple.com>
1984
1985         Fix the !ENABLE(APPLE_PAY) build
1986
1987         * bindings/js/ScriptController.cpp:
1988         (WebCore::ScriptController::shouldAllowUserAgentScripts const):
1989
1990 2019-03-28  Sihui Liu  <sihui_liu@apple.com>
1991
1992         Crash at IDBDatabaseInfo::infoForExistingObjectStore and IDBDatabaseInfo::infoForExistingObjectStore
1993         https://bugs.webkit.org/show_bug.cgi?id=196120
1994         <rdar://problem/39869767>
1995
1996         Reviewed by Ryosuke Niwa.
1997
1998         No new tests because it is unclear how the crash happens. Added release logging to help debug.
1999
2000         * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
2001         (WebCore::IDBServer::SQLiteIDBBackingStore::createIndex):
2002         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
2003         (WebCore::IDBServer::UniqueIDBDatabase::performCreateIndex):
2004         (WebCore::IDBServer::UniqueIDBDatabase::performPutOrAdd):
2005
2006 2019-03-28  Devin Rousso  <drousso@apple.com>
2007
2008         Web Inspector: Canvas: unbinding a canvas should always remove the agent as an observer
2009         https://bugs.webkit.org/show_bug.cgi?id=196324
2010         <rdar://problem/49357109>
2011
2012         Reviewed by Matt Baker.
2013
2014         No change in functionality.
2015
2016         * html/CanvasBase.cpp:
2017         (WebCore::CanvasBase::notifyObserversCanvasChanged):
2018         (WebCore::CanvasBase::notifyObserversCanvasResized):
2019         (WebCore::CanvasBase::notifyObserversCanvasDestroyed):
2020
2021         * inspector/agents/InspectorCanvasAgent.cpp:
2022         (WebCore::InspectorCanvasAgent::frameNavigated):
2023         (WebCore::InspectorCanvasAgent::bindCanvas):
2024         (WebCore::InspectorCanvasAgent::unbindCanvas):
2025
2026 2019-03-28  Alicia Boya García  <aboya@igalia.com>
2027
2028         [MSE][GStreamer] Remove dead code in MediaPlayerPrivateGStreamer::doSeek()
2029         https://bugs.webkit.org/show_bug.cgi?id=196352
2030
2031         Reviewed by Xabier Rodriguez-Calvar.
2032
2033         MediaPlayerPrivateGStreamerMSE overrides doSeek() and seek(), so this
2034         branch is never reached.
2035
2036         This patch does not introduce behavior changes.
2037
2038         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
2039         (WebCore::MediaPlayerPrivateGStreamer::doSeek):
2040
2041 2019-03-28  Simon Fraser  <simon.fraser@apple.com>
2042
2043         [macOS WK2] Overlays on instagram.com are shifted if you click on a photo after scrolling
2044         https://bugs.webkit.org/show_bug.cgi?id=196330
2045         rdar://problem/49100304
2046
2047         Reviewed by Antti Koivisto.
2048
2049         When we call ScrollingTree::applyLayerPositions() on the main thread after a flush,
2050         we need to ensure that the most recent version of the scrolling tree has been committed,
2051         because it has to have state (like requested scroll position and layout viewport rect)
2052         that match the layer flush.
2053
2054         To fix this we have to have the main thread wait for the commit to complete, so
2055         ThreadedScrollingTree keeps track of a pending commit count, and uses a condition
2056         variable to allow the main thread to safely wait for it to reach zero.
2057
2058         Tracing shows that this works as expected, and the main thread is never blocked for
2059         more than a few tens of microseconds.
2060
2061         Also lock the tree mutex in ScrollingTree::handleWheelEvent(), since we enter the
2062         scrolling tree here and we don't want that racing with applyLayerPositions() on the
2063         main thread.
2064
2065         Test: scrollingcoordinator/mac/fixed-scrolled-body.html
2066
2067         * page/scrolling/ScrollingTree.cpp:
2068         (WebCore::ScrollingTree::handleWheelEvent):
2069         (WebCore::ScrollingTree::applyLayerPositions):
2070         * page/scrolling/ScrollingTree.h:
2071         * page/scrolling/ThreadedScrollingTree.cpp:
2072         (WebCore::ThreadedScrollingTree::commitTreeState):
2073         (WebCore::ThreadedScrollingTree::incrementPendingCommitCount):
2074         (WebCore::ThreadedScrollingTree::decrementPendingCommitCount):
2075         (WebCore::ThreadedScrollingTree::waitForPendingCommits):
2076         (WebCore::ThreadedScrollingTree::applyLayerPositions):
2077         * page/scrolling/ThreadedScrollingTree.h:
2078         * page/scrolling/mac/ScrollingCoordinatorMac.mm:
2079         (WebCore::ScrollingCoordinatorMac::commitTreeState):
2080
2081 2019-03-28  Zalan Bujtas  <zalan@apple.com>
2082
2083         [SimpleLineLayout] Disable SLL when text-underline-position is not auto.
2084         https://bugs.webkit.org/show_bug.cgi?id=196338
2085         <rdar://problem/47975167>
2086
2087         Reviewed by Daniel Bates.
2088
2089         Disable simple line layout unconditionally on non-auto text-underline-position content. We don't support it yet.
2090
2091         Test: fast/text/simple-line-layout-with-text-underline-position.html
2092
2093         * rendering/SimpleLineLayout.cpp:
2094         (WebCore::SimpleLineLayout::canUseForStyle):
2095
2096 2019-03-28  Víctor Manuel Jáquez Leal  <vjaquez@igalia.com>
2097
2098         Silence lot of warnings when compiling with clang
2099         https://bugs.webkit.org/show_bug.cgi?id=196310
2100
2101         Reviewed by Michael Catanzaro.
2102
2103         No change in behavior.
2104
2105         * accessibility/AccessibilityObject.h: add missing override
2106         clause.
2107         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
2108         (webKitWebSrcChangeState): add missing format string to log.
2109         * platform/graphics/texmap/TextureMapperPlatformLayerBuffer.h: add
2110         missing virtual destructor.
2111         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
2112         add missing override clause and remove unused private member.
2113
2114 2019-03-28  Carlos Garcia Campos  <cgarcia@igalia.com>
2115
2116         [FreeType] Incorrect application of glyph positioning in the Y direction
2117         https://bugs.webkit.org/show_bug.cgi?id=161493
2118
2119         Reviewed by Michael Catanzaro.
2120
2121         Use the first glyph origin as the initial advance of every complex text run.
2122
2123         * platform/graphics/cairo/FontCairo.cpp:
2124         (WebCore::FontCascade::drawGlyphs): Update the yOffset using the height advance.
2125         * platform/graphics/cairo/GraphicsContextImplCairo.cpp:
2126         (WebCore::GraphicsContextImplCairo::drawGlyphs): Ditto.
2127         * platform/graphics/harfbuzz/ComplexTextControllerHarfBuzz.cpp:
2128         (WebCore::ComplexTextController::ComplexTextRun::ComplexTextRun): Set the initial advance.
2129
2130 2019-03-27  Ryosuke Niwa  <rniwa@webkit.org>
2131
2132         [macOS] Select element doesn't show popup if select element had lost focus while popup was previosuly shown
2133         https://bugs.webkit.org/show_bug.cgi?id=196336
2134
2135         Reviewed by Tim Horton.
2136
2137         * rendering/RenderMenuList.cpp:
2138         (RenderMenuList::popupDidHide): Added a comment.
2139
2140 2019-03-27  Justin Fan  <justin_fan@apple.com>
2141
2142         [Web GPU] Standardize Web GPU object reference counting and creation logic
2143         https://bugs.webkit.org/show_bug.cgi?id=196183
2144
2145         Reviewed by Dean Jackson.
2146
2147         Make getters return raw refs/pointers and provide const versions if necessary.
2148         All Web GPU objects are non-nullable, but become no-op if invalid, and descriptors are not moved unless needed.
2149
2150         No new tests; no change in behavior.
2151
2152         Getter updates and const qualifications:
2153         * Modules/webgpu/WebGPUAdapter.h:
2154         (WebCore::WebGPUAdapter::options const):
2155         * Modules/webgpu/WebGPUBindGroup.h:
2156         (WebCore::WebGPUBindGroup::bindGroup):
2157         (WebCore::WebGPUBindGroup::bindGroup const): Deleted.
2158         * Modules/webgpu/WebGPUBindGroupDescriptor.cpp:
2159         (WebCore::WebGPUBindGroupDescriptor::tryCreateGPUBindGroupDescriptor const):
2160         * Modules/webgpu/WebGPUBindGroupDescriptor.h:
2161         * Modules/webgpu/WebGPUBindGroupLayout.h:
2162         (WebCore::WebGPUBindGroupLayout::bindGroupLayout const):
2163         * Modules/webgpu/WebGPUBuffer.h:
2164         (WebCore::WebGPUBuffer::buffer):
2165         (WebCore::WebGPUBuffer::buffer const):
2166         * Modules/webgpu/WebGPURenderPassDescriptor.cpp:
2167         (WebCore::WebGPURenderPassDescriptor::tryCreateGPURenderPassDescriptor const):
2168         * Modules/webgpu/WebGPURenderPassEncoder.cpp:
2169         (WebCore::WebGPURenderPassEncoder::setVertexBuffers):
2170         * Modules/webgpu/WebGPUSampler.h:
2171         (WebCore::WebGPUSampler::sampler const):
2172         * Modules/webgpu/WebGPUSwapChain.h:
2173         (WebCore::WebGPUSwapChain::swapChain):
2174         (WebCore::WebGPUSwapChain::swapChain const): Deleted.
2175         * Modules/webgpu/WebGPUTexture.h:
2176         (WebCore::WebGPUTexture::texture):
2177         (WebCore::WebGPUTexture::texture const): Deleted.
2178         * Modules/webgpu/WebGPUTextureView.h:
2179         (WebCore::WebGPUTextureView::texture):
2180         (WebCore::WebGPUTextureView::texture const): Deleted.
2181         * platform/graphics/gpu/GPUBindGroupBinding.h:
2182         * platform/graphics/gpu/GPUBindGroupDescriptor.h:
2183         * platform/graphics/gpu/cocoa/GPUBindGroupMetal.mm:
2184         (WebCore::tryGetResourceAsMTLSamplerState):
2185
2186         Web GPU object creation logic:
2187         * Modules/webgpu/WebGPUCommandEncoder.cpp:
2188         (WebCore::WebGPUBufferCopyView::tryCreateGPUBufferCopyView const):
2189         (WebCore::WebGPUTextureCopyView::tryCreateGPUTextureCopyView const):
2190         (WebCore::WebGPUCommandEncoder::beginRenderPass):
2191         (WebCore::WebGPUCommandEncoder::copyBufferToBuffer):
2192         * Modules/webgpu/WebGPUCommandEncoder.h:
2193         * Modules/webgpu/WebGPUDevice.cpp:
2194         (WebCore::WebGPUDevice::createBuffer const):
2195         (WebCore::WebGPUDevice::createTexture const):
2196         (WebCore::WebGPUDevice::createPipelineLayout const):
2197         (WebCore::WebGPUDevice::createBindGroup const):
2198         (WebCore::WebGPUDevice::createShaderModule const):
2199         (WebCore::WebGPUDevice::createRenderPipeline const):
2200         (WebCore::WebGPUDevice::getQueue const):
2201         * Modules/webgpu/WebGPUDevice.h:
2202         * Modules/webgpu/WebGPUPipelineLayout.cpp:
2203         (WebCore::WebGPUPipelineLayout::create):
2204         (WebCore::WebGPUPipelineLayout::WebGPUPipelineLayout):
2205         * Modules/webgpu/WebGPUPipelineLayout.h:
2206         (WebCore::WebGPUPipelineLayout::pipelineLayout):
2207         * Modules/webgpu/WebGPUPipelineLayoutDescriptor.cpp: 
2208         (WebCore::WebGPUPipelineLayoutDescriptor::tryCreateGPUPipelineLayoutDescriptor const):
2209         * Modules/webgpu/WebGPUPipelineLayoutDescriptor.h:
2210         * Modules/webgpu/WebGPUQueue.cpp:
2211         (WebCore::WebGPUQueue::create):
2212         (WebCore::WebGPUQueue::WebGPUQueue):
2213         (WebCore::WebGPUQueue::submit):
2214         * Modules/webgpu/WebGPUQueue.h:
2215         * Modules/webgpu/WebGPUShaderModule.cpp:
2216         (WebCore::WebGPUShaderModule::create):
2217         (WebCore::WebGPUShaderModule::WebGPUShaderModule):
2218         * Modules/webgpu/WebGPUShaderModule.h:
2219         (WebCore::WebGPUShaderModule::module const):
2220         * platform/graphics/gpu/GPUBuffer.h:
2221         * platform/graphics/gpu/GPUDevice.cpp:
2222         (WebCore::GPUDevice::tryCreateBuffer):
2223         (WebCore::GPUDevice::tryCreateTexture const):
2224         (WebCore::GPUDevice::tryCreateShaderModule const):
2225         (WebCore::GPUDevice::tryCreateRenderPipeline const):
2226         (WebCore::GPUDevice::tryGetQueue const):
2227         (WebCore::GPUDevice::createShaderModule const): Deleted.
2228         (WebCore::GPUDevice::createRenderPipeline const): Deleted.
2229         (WebCore::GPUDevice::getQueue const): Deleted.
2230         * platform/graphics/gpu/GPUDevice.h:
2231         * platform/graphics/gpu/GPUPipelineLayout.cpp:
2232         (WebCore::GPUPipelineLayout::create):
2233         (WebCore::GPUPipelineLayout::GPUPipelineLayout):
2234         * platform/graphics/gpu/GPUPipelineLayout.h:
2235         (WebCore::GPUPipelineLayout::bindGroupLayouts const):
2236         * platform/graphics/gpu/GPUPipelineLayoutDescriptor.h:
2237         * platform/graphics/gpu/GPURenderPipeline.h:
2238         * platform/graphics/gpu/GPUShaderModule.h:
2239         * platform/graphics/gpu/cocoa/GPUBufferMetal.mm:
2240         (WebCore::GPUBuffer::tryCreate):
2241         (WebCore::GPUBuffer::GPUBuffer):
2242         (WebCore::GPUBuffer::setSubData):
2243         * platform/graphics/gpu/cocoa/GPUCommandBufferMetal.mm:
2244         (WebCore::GPUCommandBuffer::tryCreate):
2245         * platform/graphics/gpu/cocoa/GPUDeviceMetal.mm:
2246         (WebCore::GPUDevice::tryCreate):
2247         * platform/graphics/gpu/cocoa/GPURenderPipelineMetal.mm:
2248         (WebCore::GPURenderPipeline::tryCreate):
2249         (WebCore::GPURenderPipeline::GPURenderPipeline):
2250         (WebCore::GPURenderPipeline::create): Deleted.
2251         * platform/graphics/gpu/cocoa/GPUShaderModuleMetal.mm:
2252         (WebCore::GPUShaderModule::tryCreate):
2253         (WebCore::GPUShaderModule::create): Deleted.
2254
2255         Add WebGPUPipelineLayoutDescriptor.cpp to project:
2256         * Sources.txt:
2257         * WebCore.xcodeproj/project.pbxproj:
2258         
2259 2019-03-27  Shawn Roberts  <sroberts@apple.com>
2260
2261         Unreviewed, rolling out r243346.
2262
2263         Causing timeouts in animation tests across 10 builds
2264
2265         Reverted changeset:
2266
2267         "[Web Animations] JS wrapper may be deleted while animation is
2268         yet to dispatch its finish event"
2269         https://bugs.webkit.org/show_bug.cgi?id=196118
2270         https://trac.webkit.org/changeset/243346
2271
2272 2019-03-27  Zalan Bujtas  <zalan@apple.com>
2273
2274         [ContentChangeObserver] Stop using the global _WKContentChange
2275         https://bugs.webkit.org/show_bug.cgi?id=196288
2276         <rdar://problem/49228081>
2277
2278         Reviewed by Simon Fraser.
2279
2280         This patch ensures that activities on frames don't overwrite the observed state on other frames.  
2281         (Unfortunately the global variable is still used in WebKitLegacy (see webkit.org/b/196286)).
2282
2283         Tests: fast/events/touch/ios/content-observation/remove-subframe-while-observing.html
2284                fast/events/touch/ios/content-observation/subframe.html
2285
2286         * page/ios/ContentChangeObserver.cpp:
2287         (WebCore::ContentChangeObserver::observedContentChange const): Deleted.
2288         * page/ios/ContentChangeObserver.h:
2289         (WebCore::ContentChangeObserver::observedContentChange const):
2290         (WebCore::ContentChangeObserver::setHasNoChangeState):
2291         (WebCore::ContentChangeObserver::setHasIndeterminateState):
2292         (WebCore::ContentChangeObserver::setHasVisibleChangeState):
2293         (WebCore::ContentChangeObserver::setObservedContentState):
2294
2295 2019-03-27  Said Abou-Hallawa  <sabouhallawa@apple.com>
2296
2297         Remove the SVG tear off objects for SVGPathSeg, SVGPathSegList and SVGAnimatedPathSegList
2298         https://bugs.webkit.org/show_bug.cgi?id=196085
2299
2300         Reviewed by Simon Fraser.
2301
2302         The SVGPathSegList is similar to the other SVGLists, e.g. SVGNUmberList
2303         and SVGPointList except in two things:
2304
2305         1. Its items can be different but they are derived from the same base 
2306            class SVGPathSeg.
2307
2308         2. The SVGPathSeg items are only used for DOM. When drawing or animating
2309            we have to have an SVGPathByteStream and convert it to a Path. Converting
2310            an SVGPathByteStream to SVGPathSeg items and vice versa is expensive.
2311            Building a Path from an SVGPathByteStream is also expensive. So an extra
2312            care needs to be taken for when these conversions happen.
2313
2314         In addition to handling the SVGPathSeg items, SVGPathSegList will manage
2315         the associated SVGPathByteStream and Path objects. SVGPathSegList will be
2316         lazy in getting updated objects when a change happens. For example, when
2317         the byte stream changes, SVGPathSegList will clear its items and nullify
2318         the Path object. But it will not build any of them until they are explicitly
2319         requested.
2320
2321         Like what was done for other SVG properties when removing their tear off
2322         objects, a new accessor, a new animator and a new animation function will
2323         be added for the SVGAnimatedPathSegList.
2324
2325         All the header files of the concrete classes of SVGPathSeg will be removed
2326         because they are small structures which hold some data items and they provide
2327         setters and getters for these items. Here is the new file structures and
2328         their contents:
2329
2330         -- SVGPathSeg.h still has the class SVGPathSeg which is now a superclass
2331            of SVGProperty. 
2332
2333         -- SVGPathSegValue.h will have the template class SVGPathSegValue which 
2334            holds an std::tuple of packed arguments. It provides setters and getters
2335            for these arguments. SVGPathSegValue.h will also have specialized 
2336            classed derived from SVGPathSegValue and hold different arguments.
2337
2338         -- SVGPathSegImpl.h will have the final concrete SVGPathSeg classes.
2339
2340         Note SVGPathSeg concrete classes do not need to have a reference to the
2341         the context SVGPathElement. SVGPathSeg will be owned by its SVGPathSegList
2342         which will be owned by the SVGAnimatedPathSegList which will be owned by
2343         the SVGPathElement.
2344
2345         * Sources.txt:
2346         * WebCore.xcodeproj/project.pbxproj:
2347         * bindings/js/JSSVGPathSegCustom.cpp:
2348         * bindings/scripts/CodeGenerator.pm:
2349         (IsSVGPathSegTypeName):
2350         (IsSVGPathSegType):
2351         * bindings/scripts/CodeGeneratorJS.pm:
2352         (GenerateHeader):
2353         * rendering/svg/SVGPathData.cpp:
2354         (WebCore::pathFromPathElement):
2355         * svg/SVGAnimatedPath.cpp: Removed.
2356         * svg/SVGAnimatedPath.h: Removed.
2357         * svg/SVGAnimatedType.h:
2358         (WebCore::SVGAnimatedType::type const):
2359         * svg/SVGAnimatorFactory.h:
2360         (WebCore::SVGAnimatorFactory::create):
2361         * svg/SVGPathByteStream.h:
2362         (WebCore::SVGPathByteStream::SVGPathByteStream):
2363         This constructor is used by SVGAnimationPathSegListFunction to convert
2364         the 'form', 'to' and 'toAtEndOfDuration' strings to SVGPathByteStreams.
2365
2366         (WebCore::SVGPathByteStream::resize): Deleted.
2367         (WebCore::SVGPropertyTraits<SVGPathByteStream>::initialValue): Deleted.
2368         (WebCore::SVGPropertyTraits<SVGPathByteStream>::fromString): Deleted.
2369         (WebCore::SVGPropertyTraits<SVGPathByteStream>::parse): Deleted.
2370         (WebCore::SVGPropertyTraits<SVGPathByteStream>::toString): Deleted.
2371         * svg/SVGPathElement.cpp:
2372         (WebCore::SVGPathElement::SVGPathElement):
2373         (WebCore::SVGPathElement::parseAttribute):
2374         (WebCore::SVGPathElement::svgAttributeChanged):
2375         (WebCore::SVGPathElement::getTotalLength const):
2376         (WebCore::SVGPathElement::getPointAtLength const):
2377         (WebCore::SVGPathElement::getPathSegAtLength const):
2378         (WebCore::SVGPathElement::createSVGPathSegClosePath): Deleted.
2379         (WebCore::SVGPathElement::createSVGPathSegMovetoAbs): Deleted.
2380         (WebCore::SVGPathElement::createSVGPathSegMovetoRel): Deleted.
2381         (WebCore::SVGPathElement::createSVGPathSegLinetoAbs): Deleted.
2382         (WebCore::SVGPathElement::createSVGPathSegLinetoRel): Deleted.
2383         (WebCore::SVGPathElement::createSVGPathSegCurvetoCubicAbs): Deleted.
2384         (WebCore::SVGPathElement::createSVGPathSegCurvetoCubicRel): Deleted.
2385         (WebCore::SVGPathElement::createSVGPathSegCurvetoQuadraticAbs): Deleted.
2386         (WebCore::SVGPathElement::createSVGPathSegCurvetoQuadraticRel): Deleted.
2387         (WebCore::SVGPathElement::createSVGPathSegArcAbs): Deleted.
2388         (WebCore::SVGPathElement::createSVGPathSegArcRel): Deleted.
2389         (WebCore::SVGPathElement::createSVGPathSegLinetoHorizontalAbs): Deleted.
2390         (WebCore::SVGPathElement::createSVGPathSegLinetoHorizontalRel): Deleted.
2391         (WebCore::SVGPathElement::createSVGPathSegLinetoVerticalAbs): Deleted.
2392         (WebCore::SVGPathElement::createSVGPathSegLinetoVerticalRel): Deleted.
2393         (WebCore::SVGPathElement::createSVGPathSegCurvetoCubicSmoothAbs): Deleted.
2394         (WebCore::SVGPathElement::createSVGPathSegCurvetoCubicSmoothRel): Deleted.
2395         (WebCore::SVGPathElement::createSVGPathSegCurvetoQuadraticSmoothAbs): Deleted.
2396         (WebCore::SVGPathElement::createSVGPathSegCurvetoQuadraticSmoothRel): Deleted.
2397         The SVGPathSeg creation functions are moved to the header file.
2398
2399         (WebCore::SVGPathElement::registerAttributes): Deleted.
2400         (WebCore::SVGPathElement::pathByteStream const): Deleted.
2401         (WebCore::SVGPathElement::pathForByteStream const): Deleted.
2402         (WebCore::SVGPathElement::lookupOrCreateDWrapper): Deleted.
2403         (WebCore::SVGPathElement::animatedPropertyWillBeDeleted): Deleted.
2404         (WebCore::SVGPathElement::pathSegList): Deleted.
2405         (WebCore::SVGPathElement::normalizedPathSegList): Deleted.
2406         (WebCore::SVGPathElement::animatedPathSegList): Deleted.
2407         (WebCore::SVGPathElement::animatedNormalizedPathSegList): Deleted.
2408         (WebCore::SVGPathElement::approximateMemoryCost const): Deleted.
2409         (WebCore::SVGPathElement::pathSegListChanged): Deleted.
2410         Managing the SVGPathByteStream and the drawing Path objects will be the
2411         responsibility of SVGPathSegList.
2412
2413         * svg/SVGPathElement.h:
2414         * svg/SVGPathSeg.h:
2415         * svg/SVGPathSegArc.h: Removed.
2416         * svg/SVGPathSegArcAbs.h: Removed.
2417         * svg/SVGPathSegArcRel.h: Removed.
2418         * svg/SVGPathSegClosePath.h: Removed.
2419         * svg/SVGPathSegCurvetoCubic.h: Removed.
2420         * svg/SVGPathSegCurvetoCubicAbs.h: Removed.
2421         * svg/SVGPathSegCurvetoCubicRel.h: Removed.
2422         * svg/SVGPathSegCurvetoCubicSmooth.h: Removed.
2423         * svg/SVGPathSegCurvetoCubicSmoothAbs.h: Removed.
2424         * svg/SVGPathSegCurvetoCubicSmoothRel.h: Removed.
2425         * svg/SVGPathSegCurvetoQuadratic.h: Removed.
2426         * svg/SVGPathSegCurvetoQuadraticAbs.h: Removed.
2427         * svg/SVGPathSegCurvetoQuadraticRel.h: Removed.
2428         * svg/SVGPathSegCurvetoQuadraticSmoothAbs.h: Removed.
2429         * svg/SVGPathSegCurvetoQuadraticSmoothRel.h: Removed.
2430         * svg/SVGPathSegImpl.h: Added.
2431         * svg/SVGPathSegLinetoAbs.h: Removed.
2432         * svg/SVGPathSegLinetoHorizontal.h: Removed.
2433         * svg/SVGPathSegLinetoHorizontalAbs.h: Removed.
2434         * svg/SVGPathSegLinetoHorizontalRel.h: Removed.
2435         * svg/SVGPathSegLinetoRel.h: Removed.
2436         * svg/SVGPathSegLinetoVertical.h: Removed.
2437         * svg/SVGPathSegLinetoVerticalAbs.h: Removed.
2438         * svg/SVGPathSegLinetoVerticalRel.h: Removed.
2439         The definition of these classes are now in SVGPathSegImpl.h.
2440
2441         * svg/SVGPathSegList.cpp: Removed.
2442         * svg/SVGPathSegList.h:
2443         * svg/SVGPathSegListBuilder.cpp:
2444         (WebCore::SVGPathSegListBuilder::SVGPathSegListBuilder):
2445         (WebCore::SVGPathSegListBuilder::moveTo):
2446         (WebCore::SVGPathSegListBuilder::lineTo):
2447         (WebCore::SVGPathSegListBuilder::lineToHorizontal):
2448         (WebCore::SVGPathSegListBuilder::lineToVertical):
2449         (WebCore::SVGPathSegListBuilder::curveToCubic):
2450         (WebCore::SVGPathSegListBuilder::curveToCubicSmooth):
2451         (WebCore::SVGPathSegListBuilder::curveToQuadratic):
2452         (WebCore::SVGPathSegListBuilder::curveToQuadraticSmooth):
2453         (WebCore::SVGPathSegListBuilder::arcTo):
2454         (WebCore::SVGPathSegListBuilder::closePath):        
2455         * svg/SVGPathSegListBuilder.h:
2456         The concrete SVGPathSeg classes can now create instances of their classes
2457         without having to go through the SVGPathElement.
2458
2459         * svg/SVGPathSegListSource.cpp:
2460         (WebCore::SVGPathSegListSource::SVGPathSegListSource):
2461         * svg/SVGPathSegListSource.h:
2462         * svg/SVGPathSegListValues.cpp: Removed.
2463         * svg/SVGPathSegListValues.h: Removed.
2464         * svg/SVGPathSegMovetoAbs.h: Removed.
2465         * svg/SVGPathSegMovetoRel.h: Removed.
2466         * svg/SVGPathSegValue.h: Added.
2467         (WebCore::SVGPathSegValue::create):
2468         (WebCore::SVGPathSegValue::clone const):
2469         (WebCore::SVGPathSegValue::SVGPathSegValue):
2470         (WebCore::SVGPathSegValue::argument const):
2471         (WebCore::SVGPathSegValue::setArgument):
2472         (WebCore::SVGPathSegLinetoHorizontal::x const):
2473         (WebCore::SVGPathSegLinetoHorizontal::setX):
2474         (WebCore::SVGPathSegLinetoVertical::y const):
2475         (WebCore::SVGPathSegLinetoVertical::setY):
2476         (WebCore::SVGPathSegSingleCoordinate::x const):
2477         (WebCore::SVGPathSegSingleCoordinate::setX):
2478         (WebCore::SVGPathSegSingleCoordinate::y const):
2479         (WebCore::SVGPathSegSingleCoordinate::setY):
2480         (WebCore::SVGPathSegCurvetoQuadratic::x const):
2481         (WebCore::SVGPathSegCurvetoQuadratic::setX):
2482         (WebCore::SVGPathSegCurvetoQuadratic::y const):
2483         (WebCore::SVGPathSegCurvetoQuadratic::setY):
2484         (WebCore::SVGPathSegCurvetoQuadratic::x1 const):
2485         (WebCore::SVGPathSegCurvetoQuadratic::setX1):
2486         (WebCore::SVGPathSegCurvetoQuadratic::y1 const):
2487         (WebCore::SVGPathSegCurvetoQuadratic::setY1):
2488         (WebCore::SVGPathSegCurvetoCubicSmooth::x const):
2489         (WebCore::SVGPathSegCurvetoCubicSmooth::setX):
2490         (WebCore::SVGPathSegCurvetoCubicSmooth::y const):
2491         (WebCore::SVGPathSegCurvetoCubicSmooth::setY):
2492         (WebCore::SVGPathSegCurvetoCubicSmooth::x2 const):
2493         (WebCore::SVGPathSegCurvetoCubicSmooth::setX2):
2494         (WebCore::SVGPathSegCurvetoCubicSmooth::y2 const):
2495         (WebCore::SVGPathSegCurvetoCubicSmooth::setY2):
2496         (WebCore::SVGPathSegCurvetoCubic::x const):
2497         (WebCore::SVGPathSegCurvetoCubic::setX):
2498         (WebCore::SVGPathSegCurvetoCubic::y const):
2499         (WebCore::SVGPathSegCurvetoCubic::setY):
2500         (WebCore::SVGPathSegCurvetoCubic::x1 const):
2501         (WebCore::SVGPathSegCurvetoCubic::setX1):
2502         (WebCore::SVGPathSegCurvetoCubic::y1 const):
2503         (WebCore::SVGPathSegCurvetoCubic::setY1):
2504         (WebCore::SVGPathSegCurvetoCubic::x2 const):
2505         (WebCore::SVGPathSegCurvetoCubic::setX2):
2506         (WebCore::SVGPathSegCurvetoCubic::y2 const):
2507         (WebCore::SVGPathSegCurvetoCubic::setY2):
2508         (WebCore::SVGPathSegArc::x const):
2509         (WebCore::SVGPathSegArc::setX):
2510         (WebCore::SVGPathSegArc::y const):
2511         (WebCore::SVGPathSegArc::setY):
2512         (WebCore::SVGPathSegArc::r1 const):
2513         (WebCore::SVGPathSegArc::setR1):
2514         (WebCore::SVGPathSegArc::r2 const):
2515         (WebCore::SVGPathSegArc::setR2):
2516         (WebCore::SVGPathSegArc::angle const):
2517         (WebCore::SVGPathSegArc::setAngle):
2518         (WebCore::SVGPathSegArc::largeArcFlag const):
2519         (WebCore::SVGPathSegArc::setLargeArcFlag):
2520         (WebCore::SVGPathSegArc::sweepFlag const):
2521         (WebCore::SVGPathSegArc::setSweepFlag):
2522         * svg/SVGPathSegWithContext.h: Removed.
2523
2524         * svg/SVGPathUtilities.cpp:
2525         (WebCore::buildSVGPathByteStreamFromSVGPathSegList):
2526         (WebCore::buildSVGPathSegListFromByteStream):
2527         (WebCore::buildStringFromByteStream):
2528         (WebCore::buildSVGPathByteStreamFromSVGPathSegListValues): Deleted.
2529         (WebCore::appendSVGPathByteStreamFromSVGPathSeg): Deleted.
2530         (WebCore::buildSVGPathSegListValuesFromByteStream): Deleted.
2531         (WebCore::buildStringFromSVGPathSegListValues): Deleted.
2532         * svg/SVGPathUtilities.h:
2533         Since the class SVGPathSegListValues is removed, all the parsing functions
2534         have now to deal with SVGPathSegList directly.
2535
2536         * svg/SVGPoint.h:
2537         * svg/SVGValue.h:
2538         * svg/properties/SVGAnimatedPathSegListPropertyTearOff.cpp: Removed.
2539         * svg/properties/SVGAnimatedPathSegListPropertyTearOff.h: Removed.
2540         * svg/properties/SVGAnimatedPropertyAccessorImpl.h:
2541         * svg/properties/SVGAnimatedPropertyAnimatorImpl.h:
2542         * svg/properties/SVGAnimatedPropertyImpl.h:
2543         (WebCore::SVGAnimatedPathSegList::create):
2544         (WebCore::SVGAnimatedPathSegList::currentPathByteStream):
2545         (WebCore::SVGAnimatedPathSegList::currentPath):
2546         (WebCore::SVGAnimatedPathSegList::approximateMemoryCost const):
2547         Provides an easy way to access the current SVGPathByteStream and Path
2548         objects from the SVGAnimatedPathSegList.
2549
2550         * svg/properties/SVGAnimationAdditiveValueFunctionImpl.h:
2551         (WebCore::SVGAnimationPathSegListFunction::progress):
2552         * svg/properties/SVGPropertyOwnerRegistry.h:
2553         (WebCore::SVGPropertyOwnerRegistry::registerProperty):
2554
2555 2019-03-27  Ryan Haddad  <ryanhaddad@apple.com>
2556
2557         AVAudioSessionRouteSharingPolicyLongForm has been deprecated
2558         https://bugs.webkit.org/show_bug.cgi?id=196301
2559
2560         Unrereivewed build fix.
2561
2562         * platform/audio/ios/AudioSessionIOS.mm:
2563         (WebCore::AudioSession::setCategory):
2564         (WebCore::AudioSession::routeSharingPolicy const):
2565
2566 2019-03-27  Chris Dumez  <cdumez@apple.com>
2567
2568         XMLHttpRequestUpload's loadstart event not correct initialized
2569         https://bugs.webkit.org/show_bug.cgi?id=196174
2570         <rdar://problem/49191412>
2571
2572         Reviewed by Alex Christensen.
2573
2574         Align progress event firing with the XHR specification.
2575
2576         No new tests, rebaselined existing tests.
2577
2578         * xml/XMLHttpRequest.cpp:
2579         (WebCore::XMLHttpRequest::createRequest):
2580         As per [1], the loadstart event fired on the XMLHttpRequestUpload object should use
2581         loaded=0 and total=`req’s body’s total bytes`.
2582         [1] https://xhr.spec.whatwg.org/#the-send()-method (step 11.2.)
2583
2584         (WebCore::XMLHttpRequest::didSendData):
2585         As per [2], the progress / load / loadend should use loaded=transmitted and total=length.
2586         [2] https://xhr.spec.whatwg.org/#ref-for-process-request-end-of-body (steps 5, 6 and 7)
2587
2588         (WebCore::XMLHttpRequest::didReceiveData):
2589         As per [3], we should fire the readystatechange event *before* the progress event.
2590         This is covered by web-platform-tests/xhr/send-response-event-order.htm which was failing
2591         differently after the other changes in this patch.
2592         [3] https://xhr.spec.whatwg.org/#ref-for-process-response (steps 9.4 and 9.5)
2593
2594         (WebCore::XMLHttpRequest::dispatchErrorEvents):
2595         As per [4], in case of an error, we should fire the provided 'event' and 'loadend' with
2596         loaded=0 and total=0.
2597         [4] https://xhr.spec.whatwg.org/#request-error-steps (steps 7 and 8)
2598
2599         * xml/XMLHttpRequestUpload.cpp:
2600         (WebCore::XMLHttpRequestUpload::dispatchProgressEvent):
2601         * xml/XMLHttpRequestUpload.h:
2602         Simplify XMLHttpRequestUpload. It no longer needs to store loaded / total as data
2603         members now that they are always passed by the call site. lengthComputable is set
2604         to !!total as [5] says to set it to true if length/total is not 0. 
2605         [5] https://xhr.spec.whatwg.org/#concept-event-fire-progress
2606
2607 2019-03-27  Simon Fraser  <simon.fraser@apple.com>
2608
2609         REGRESSION (r242687): Fullscreen YouTube videos show blank white space at top
2610         https://bugs.webkit.org/show_bug.cgi?id=196304
2611         rdar://problem/49175760
2612
2613         Reviewed by Zalan Bujtas.
2614
2615         repositionRelatedLayers() should not short-circuit when topContentInset is zero,
2616         because topContentInset might be changing from non-zero to zero, and then we need
2617         to move layers around.
2618
2619         Test: scrollingcoordinator/mac/top-content-inset-to-zero.html
2620
2621         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
2622         (WebCore::ScrollingTreeFrameScrollingNodeMac::repositionRelatedLayers):
2623
2624 2019-03-26  Simon Fraser  <simon.fraser@apple.com>
2625
2626         [iOS WK2] Fixed elements in frames can be misplaced sometimes
2627         https://bugs.webkit.org/show_bug.cgi?id=196290
2628
2629         Reviewed by Frédéric Wang.
2630
2631         In a page containing position:fixed inside an async-scrolling iframe, if the 
2632         main page is scrolled down, and you reload, then the fixed element in the iframe can
2633         get misplaced or disappear.
2634
2635         The bug was that the reconcileViewportConstrainedLayerPositions() recursive state node
2636         walk would cross frame boundaries, hitting subframe ScrollingStateFixedNodes with a viewport rect
2637         for the main page.
2638
2639         Fix by giving ScrollingStateTree the responsibility for the recursive tree walk, and
2640         have it bail at at frame boundaries.
2641
2642         Test: scrollingcoordinator/ios/fixed-in-frame-layer-reconcile-layer-position.html
2643
2644         * page/scrolling/AsyncScrollingCoordinator.cpp:
2645         (WebCore::AsyncScrollingCoordinator::reconcileViewportConstrainedLayerPositions):
2646         * page/scrolling/ScrollingStateFixedNode.cpp:
2647         (WebCore::ScrollingStateFixedNode::reconcileLayerPositionForViewportRect):
2648         * page/scrolling/ScrollingStateNode.cpp:
2649         (WebCore::ScrollingStateNode::reconcileLayerPositionForViewportRect): Deleted.
2650         * page/scrolling/ScrollingStateNode.h:
2651         (WebCore::ScrollingStateNode::reconcileLayerPositionForViewportRect):
2652         * page/scrolling/ScrollingStateStickyNode.cpp:
2653         (WebCore::ScrollingStateStickyNode::reconcileLayerPositionForViewportRect):
2654         * page/scrolling/ScrollingStateTree.cpp:
2655         (WebCore::ScrollingStateTree::reconcileLayerPositionsRecursive):
2656         (WebCore::ScrollingStateTree::reconcileViewportConstrainedLayerPositions):
2657         * page/scrolling/ScrollingStateTree.h:
2658
2659 2019-03-27  Philippe Normand  <pnormand@igalia.com>
2660
2661         Build failure with gstreamer 1.12.5 if USE_GSTREAMER_GL is enabled
2662         https://bugs.webkit.org/show_bug.cgi?id=196178
2663
2664         Reviewed by Xabier Rodriguez-Calvar.
2665
2666         The gst/gl/gl.h header needs to be included before
2667         GraphicsContext3D.h to avoid declaration conflicts with
2668         OpenGLShims.
2669
2670         Based on a patch from Mike Gorse <mgorse@suse.com>
2671
2672         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
2673         (WebCore::GstVideoFrameHolder::GstVideoFrameHolder):
2674
2675 2019-03-27  Philippe Normand  <pnormand@igalia.com>
2676
2677         [GStreamer] Remove the HLS queue buffering query hack
2678         https://bugs.webkit.org/show_bug.cgi?id=196244
2679
2680         Reviewed by Xabier Rodriguez-Calvar.
2681
2682         Because the http src element now provides network statistics to
2683         the player we can now compute an estimation of the data loading in
2684         case the buffering query isn't handled by any element of the
2685         pipeline.
2686
2687         No new tests, existing HLS tests cover this change.
2688
2689         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
2690         (WebCore::MediaPlayerPrivateGStreamer::fillTimerFired):
2691         (WebCore::findHLSQueue): Deleted.
2692         (WebCore::isHLSProgressing): Deleted.
2693
2694 2019-03-26  Said Abou-Hallawa  <sabouhallawa@apple.com>
2695
2696         Unreviewed Windows build fix
2697         https://bugs.webkit.org/show_bug.cgi?id=196083
2698         <rdar://problem/49121836>
2699
2700         * svg/SVGAnimatorFactory.h:
2701         (WebCore::SVGAnimatorFactory::isSupportedAttributeType):
2702
2703 2019-03-26  Wenson Hsieh  <wenson_hsieh@apple.com>
2704
2705         [Cocoa] Refactor some helper functions for building UserAgent strings
2706         https://bugs.webkit.org/show_bug.cgi?id=195990
2707
2708         Reviewed by Brent Fulgham.
2709
2710         Add an optional argument to standardUserAgentWithApplicationName to request the desktop version of the user
2711         agent in Cocoa platforms. Work towards refactoring some codepaths to make the implementation of the "Request
2712         Desktop Site" feature in Safari a bit more straightforward.
2713
2714         No change in behavior.
2715
2716         * platform/UserAgent.h:
2717         * platform/ios/UserAgentIOS.mm:
2718         (WebCore::standardUserAgentWithApplicationName):
2719
2720         The corresponding macOS version is currently hard-coded — the followup bug webkit.org/b/196275 tracks making
2721         this dynamically fetch the paired macOS version when building for iOS.
2722
2723         * platform/mac/UserAgentMac.mm:
2724         (WebCore::standardUserAgentWithApplicationName):
2725
2726 2019-03-26  Said Abou-Hallawa  <said@apple.com>
2727
2728         Remove the SVG tear off objects for SVGLength, SVGLengthList and SVGAnimatedLengthList
2729         https://bugs.webkit.org/show_bug.cgi?id=196083
2730
2731         Reviewed by Simon Fraser.
2732
2733         -- SVGLength will be a superclass of SVGValueProperty<SVGLengthValue>. It
2734            is a wrapper of SVGLengthValue. It will be provide the DOM methods. It
2735            can setValueAsString() and return valueAsString().
2736
2737         -- SVGLengthList will be a superclass of SVGValuePropertyList<SVGLength>.
2738            The base class will provide all the DOM methods. SVGLengthList will be
2739            responsible for parsing a String to a SVGLength items. It can also 
2740            build a string representing the stored items.
2741
2742         -- SVGAnimatedLengthList will be defined as SVGAnimatedPropertyList<SVGLengthList>.
2743            Like SVGAnimatedPointList, all the required methods and attributes
2744            will be handled by SVGAnimatedPropertyList.
2745
2746         -- SVGAnimatedLengthAccessor and SVGAnimatedLengthListAccessor will be
2747            added to access the members of types SVGAnimatedLength and 
2748            SVGAnimatedLengthList.
2749
2750         -- SVGAnimatedLengthAnimator and SVGAnimatedLengthListAnimator will be
2751            created by the the new accessors to animate attributes of types
2752            SVGAnimatedLength and SVGAnimatedLengthList.
2753
2754         -- SVGAnimationLengthFunction and SVGAnimationLengthListFunction will be
2755            responsible for progressing the animVal() of attributes of types
2756            SVGAnimatedLength and SVGAnimatedLengthList.
2757
2758         -- SVGValuePropertyAnimator is a new template class which can animate a
2759            none reflecting attribute which should be backed by a value property,
2760            e.g. SVGLength.
2761
2762         -- SVGValuePropertyListAnimator is a new template class which can animate a
2763            none reflecting attribute which should be backed by a value property
2764            list, e.g. SVGLengthList.
2765
2766         Notes:
2767
2768             -- SVGElement::isAnimatedStyleAttribute() will return true if the
2769                attribute is known by SVGPropertyAnimatorFactory. Or it's has 
2770                a reflecting SVGAnimatedPropertyLength property and its name is
2771                one of the names listed in isAnimatedStylePropertyAttribute() of
2772                the propertyRegistry() of the SVGElement.
2773
2774             -- SVGElement::commitPropertyChange() has to handle the attributes
2775                for which isAnimatedStylePropertyAttribute() returns true different
2776                from the other ones. styleReclac() needs updated attributes since
2777                it does not access the reflecting properties in the SVGELement.
2778
2779             -- SVGTextContentElement does not need a customized SVGAnimatedLength.
2780                All SVGTextContentElement::textLengthAnimated() needs to know is
2781                whether m_textLength->baseVal() holds an empty SVGLength. If it
2782                does, it sets its value to getComputedTextLength().
2783
2784         * Sources.txt:
2785         * WebCore.xcodeproj/project.pbxproj:
2786         * rendering/svg/SVGTextLayoutAttributesBuilder.cpp:
2787         (WebCore::updateCharacterData):
2788         (WebCore::SVGTextLayoutAttributesBuilder::fillCharacterDataMap):
2789         * svg/SVGAnimateElementBase.cpp:
2790         (WebCore::SVGAnimateElementBase::hasValidAttributeType const):
2791         * svg/SVGAnimatedLength.cpp: Removed.
2792         * svg/SVGAnimatedLength.h: Removed.
2793         * svg/SVGAnimatedLengthList.cpp: Removed.
2794         * svg/SVGAnimatedLengthList.h: Removed.
2795         * svg/SVGAnimatedType.h:
2796         (WebCore::SVGAnimatedType::type const):
2797         * svg/SVGAnimationElement.cpp:
2798         (WebCore::SVGAnimationElement::isTargetAttributeCSSProperty):
2799         (WebCore::inheritsFromProperty):
2800         * svg/SVGAnimatorFactory.h:
2801         (WebCore::SVGAnimatorFactory::isSupportedAttribute):
2802         (WebCore::SVGAnimatorFactory::create):
2803         These changes were required because some of the tests were trying to
2804         animated unsupported attributes. To differentiate between between the
2805         these two cases:
2806             1) the attribute is animate-able by the legacy controller.
2807             2) animating the attribute or the attribute itself is not supported
2808                by the element.
2809
2810         We want SVGAnimatorFactory tell us whether it can create an animator for
2811         a given attribute or not.
2812
2813         * svg/SVGCircleElement.cpp:
2814         (WebCore::SVGCircleElement::SVGCircleElement):
2815         (WebCore::SVGCircleElement::parseAttribute):
2816         (WebCore::SVGCircleElement::svgAttributeChanged):
2817         (WebCore::SVGCircleElement::registerAttributes): Deleted.
2818         * svg/SVGCircleElement.h:
2819         * svg/SVGCursorElement.cpp:
2820         (WebCore::SVGCursorElement::SVGCursorElement):
2821         (WebCore::SVGCursorElement::parseAttribute):
2822         (WebCore::SVGCursorElement::svgAttributeChanged):
2823         (WebCore::SVGCursorElement::registerAttributes): Deleted.
2824         * svg/SVGCursorElement.h:
2825         * svg/SVGElement.cpp:
2826         (WebCore::SVGElement::commitPropertyChange):
2827         (WebCore::SVGElement::isAnimatedStyleAttribute const):
2828         * svg/SVGElement.h:
2829         * svg/SVGEllipseElement.cpp:
2830         (WebCore::SVGEllipseElement::SVGEllipseElement):
2831         (WebCore::SVGEllipseElement::parseAttribute):
2832         (WebCore::SVGEllipseElement::svgAttributeChanged):
2833         (WebCore::SVGEllipseElement::registerAttributes): Deleted.
2834         * svg/SVGEllipseElement.h:
2835         * svg/SVGFilterElement.cpp:
2836         (WebCore::SVGFilterElement::SVGFilterElement):
2837         (WebCore::SVGFilterElement::registerAttributes):
2838         (WebCore::SVGFilterElement::parseAttribute):
2839         * svg/SVGFilterElement.h:
2840         * svg/SVGFilterPrimitiveStandardAttributes.cpp:
2841         (WebCore::SVGFilterPrimitiveStandardAttributes::SVGFilterPrimitiveStandardAttributes):
2842         (WebCore::SVGFilterPrimitiveStandardAttributes::parseAttribute):
2843         (WebCore::SVGFilterPrimitiveStandardAttributes::registerAttributes): Deleted.
2844         * svg/SVGFilterPrimitiveStandardAttributes.h:
2845         (WebCore::SVGFilterPrimitiveStandardAttributes::x const):
2846         (WebCore::SVGFilterPrimitiveStandardAttributes::y const):
2847         (WebCore::SVGFilterPrimitiveStandardAttributes::width const):
2848         (WebCore::SVGFilterPrimitiveStandardAttributes::height const):
2849         (WebCore::SVGFilterPrimitiveStandardAttributes::xAnimated):
2850         (WebCore::SVGFilterPrimitiveStandardAttributes::yAnimated):
2851         (WebCore::SVGFilterPrimitiveStandardAttributes::widthAnimated):
2852         (WebCore::SVGFilterPrimitiveStandardAttributes::heightAnimated):
2853         (WebCore::SVGFilterPrimitiveStandardAttributes::isKnownAttribute): Deleted.
2854         * svg/SVGForeignObjectElement.cpp:
2855         (WebCore::SVGForeignObjectElement::SVGForeignObjectElement):
2856         (WebCore::SVGForeignObjectElement::parseAttribute):
2857         (WebCore::SVGForeignObjectElement::registerAttributes): Deleted.
2858         * svg/SVGForeignObjectElement.h:
2859         * svg/SVGImageElement.cpp:
2860         (WebCore::SVGImageElement::SVGImageElement):
2861         (WebCore::SVGImageElement::parseAttribute):
2862         (WebCore::SVGImageElement::registerAttributes): Deleted.
2863         * svg/SVGImageElement.h:
2864         * svg/SVGLength.h:
2865         (WebCore::SVGLength::create):
2866         (WebCore::SVGLength::clone const):
2867         (WebCore::SVGLength::unitType):
2868         (WebCore::SVGLength::valueForBindings):
2869         (WebCore::SVGLength::setValueForBindings):
2870         (WebCore::SVGLength::valueInSpecifiedUnits):
2871         (WebCore::SVGLength::setValueInSpecifiedUnits):
2872         (WebCore::SVGLength::setValueAsString):
2873         (WebCore::SVGLength::newValueSpecifiedUnits):
2874         (WebCore::SVGLength::convertToSpecifiedUnits):
2875         (WebCore::SVGLength::valueAsString): Deleted.
2876         (WebCore::SVGLength::SVGLength): Deleted.
2877         * svg/SVGLengthList.h:
2878         (WebCore::SVGLengthList::create):
2879         (WebCore::SVGLengthList::lengthMode const):
2880         (WebCore::SVGLengthList::parse):
2881         (WebCore::SVGLengthList::SVGLengthList):
2882         * svg/SVGLengthListValues.cpp: Removed.
2883         * svg/SVGLengthListValues.h: Removed.
2884         * svg/SVGLineElement.cpp:
2885         (WebCore::SVGLineElement::SVGLineElement):
2886         (WebCore::SVGLineElement::parseAttribute):
2887         (WebCore::SVGLineElement::svgAttributeChanged):
2888         (WebCore::SVGLineElement::registerAttributes): Deleted.
2889         * svg/SVGLineElement.h:
2890         * svg/SVGLinearGradientElement.cpp:
2891         (WebCore::SVGLinearGradientElement::SVGLinearGradientElement):
2892         (WebCore::SVGLinearGradientElement::parseAttribute):
2893         (WebCore::SVGLinearGradientElement::svgAttributeChanged):
2894         (WebCore::SVGLinearGradientElement::registerAttributes): Deleted.
2895         * svg/SVGLinearGradientElement.h:
2896         * svg/SVGMarkerElement.cpp:
2897         (WebCore::SVGMarkerElement::SVGMarkerElement):
2898         (WebCore::SVGMarkerElement::registerAttributes):
2899         (WebCore::SVGMarkerElement::parseAttribute):
2900         * svg/SVGMarkerElement.h:
2901         * svg/SVGMaskElement.cpp:
2902         (WebCore::SVGMaskElement::SVGMaskElement):
2903         (WebCore::SVGMaskElement::registerAttributes):
2904         (WebCore::SVGMaskElement::parseAttribute):
2905         (WebCore::SVGMaskElement::svgAttributeChanged):
2906         * svg/SVGMaskElement.h:
2907         * svg/SVGPatternElement.cpp:
2908         (WebCore::SVGPatternElement::SVGPatternElement):
2909         (WebCore::SVGPatternElement::registerAttributes):
2910         (WebCore::SVGPatternElement::parseAttribute):
2911         * svg/SVGPatternElement.h:
2912         * svg/SVGPoint.h:
2913         * svg/SVGRadialGradientElement.cpp:
2914         (WebCore::SVGRadialGradientElement::SVGRadialGradientElement):
2915         (WebCore::SVGRadialGradientElement::parseAttribute):
2916         (WebCore::SVGRadialGradientElement::svgAttributeChanged):
2917         (WebCore::SVGRadialGradientElement::registerAttributes): Deleted.
2918         * svg/SVGRadialGradientElement.h:
2919         * svg/SVGRectElement.cpp:
2920         (WebCore::SVGRectElement::SVGRectElement):
2921         (WebCore::SVGRectElement::parseAttribute):
2922         (WebCore::SVGRectElement::svgAttributeChanged):
2923         (WebCore::SVGRectElement::registerAttributes): Deleted.
2924         * svg/SVGRectElement.h:
2925         * svg/SVGSVGElement.cpp:
2926         (WebCore::SVGSVGElement::SVGSVGElement):
2927         (WebCore::SVGSVGElement::parseAttribute):
2928         (WebCore::SVGSVGElement::svgAttributeChanged):
2929         (WebCore::SVGSVGElement::registerAttributes): Deleted.
2930         * svg/SVGSVGElement.h:
2931         * svg/SVGTextContentElement.cpp:
2932         (WebCore::SVGTextContentElement::SVGTextContentElement):
2933         (WebCore::SVGTextContentElement::registerAttributes):
2934         (WebCore::SVGTextContentElement::parseAttribute):
2935         (WebCore::SVGTextContentElement::svgAttributeChanged):
2936         (WebCore::SVGTextContentElement::textLengthAnimated):
2937         * svg/SVGTextContentElement.h:
2938         (WebCore::SVGTextContentElement::specifiedTextLength const):
2939         (WebCore::SVGTextContentElement::textLength const):
2940         (WebCore::SVGTextContentElement::specifiedTextLength): Deleted.
2941         (WebCore::SVGTextContentElement::textLengthAnimated): Deleted.
2942         (WebCore::SVGTextContentElement::SVGAnimatedCustomLengthAttribute::SVGAnimatedCustomLengthAttribute): Deleted.
2943         (WebCore::SVGTextContentElement::SVGAnimatedCustomLengthAttribute::synchronize): Deleted.
2944         (WebCore::SVGTextContentElement::SVGAnimatedCustomLengthAttribute::animatedProperty): Deleted.
2945         * svg/SVGTextPathElement.cpp:
2946         (WebCore::SVGTextPathElement::SVGTextPathElement):
2947         (WebCore::SVGTextPathElement::registerAttributes):
2948         (WebCore::SVGTextPathElement::parseAttribute):
2949         * svg/SVGTextPathElement.h:
2950         * svg/SVGTextPositioningElement.cpp:
2951         (WebCore::SVGTextPositioningElement::SVGTextPositioningElement):
2952         (WebCore::SVGTextPositioningElement::parseAttribute):
2953         (WebCore::SVGTextPositioningElement::svgAttributeChanged):
2954         (WebCore::SVGTextPositioningElement::registerAttributes): Deleted.
2955         * svg/SVGTextPositioningElement.h:
2956         (WebCore::SVGTextPositioningElement::x const):
2957         (WebCore::SVGTextPositioningElement::y const):
2958         (WebCore::SVGTextPositioningElement::dx const):
2959         (WebCore::SVGTextPositioningElement::dy const):
2960         (WebCore::SVGTextPositioningElement::xAnimated):
2961         (WebCore::SVGTextPositioningElement::yAnimated):
2962         (WebCore::SVGTextPositioningElement::dxAnimated):
2963         (WebCore::SVGTextPositioningElement::dyAnimated):
2964         (WebCore::SVGTextPositioningElement::isKnownAttribute): Deleted.
2965         * svg/SVGUseElement.cpp:
2966         (WebCore::SVGUseElement::SVGUseElement):
2967         (WebCore::SVGUseElement::parseAttribute):
2968         (WebCore::SVGUseElement::svgAttributeChanged):
2969         (WebCore::SVGUseElement::registerAttributes): Deleted.
2970         * svg/SVGUseElement.h:
2971         * svg/SVGValue.h:
2972         * svg/properties/SVGAnimatedPropertyAccessorImpl.h:
2973         * svg/properties/SVGAnimatedPropertyAnimator.h:
2974         * svg/properties/SVGAnimatedPropertyAnimatorImpl.h:
2975         * svg/properties/SVGAnimatedPropertyImpl.h:
2976         * svg/properties/SVGAnimationAdditiveListFunctionImpl.h:
2977         (WebCore::SVGAnimationLengthListFunction::SVGAnimationLengthListFunction):
2978         (WebCore::SVGAnimationLengthListFunction::progress):
2979         (WebCore::SVGAnimationNumberListFunction::progress):
2980         (WebCore::SVGAnimationPointListFunction::progress):
2981         * svg/properties/SVGAnimationAdditiveValueFunctionImpl.h:
2982         (WebCore::SVGAnimationLengthFunction::SVGAnimationLengthFunction):
2983         (WebCore::SVGAnimationLengthFunction::progress):
2984         * svg/properties/SVGAttributeAnimator.cpp:
2985         (WebCore::SVGAttributeAnimator::isAnimatedStylePropertyAniamtor const):
2986         * svg/properties/SVGAttributeAnimator.h:
2987         * svg/properties/SVGAttributeRegistry.h:
2988         * svg/properties/SVGPropertyAnimatorFactory.h:
2989         (WebCore::SVGPropertyAnimatorFactory::createLengthAnimator):
2990         (WebCore::SVGPropertyAnimatorFactory::createLengthListAnimator):
2991         (WebCore::SVGPropertyAnimatorFactory::attributeAnimatorCreator):
2992         * svg/properties/SVGPropertyOwnerRegistry.h:
2993         (WebCore::SVGPropertyOwnerRegistry::registerProperty):
2994         (WebCore::SVGPropertyOwnerRegistry::isAnimatedLengthAttribute):
2995         * svg/properties/SVGPropertyRegistry.h:
2996         * svg/properties/SVGValuePropertyAnimator.h: Added.
2997         (WebCore::SVGValuePropertyAnimator::SVGValuePropertyAnimator):
2998         * svg/properties/SVGValuePropertyAnimatorImpl.h: Added.
2999         * svg/properties/SVGValuePropertyListAnimator.h: Added.
3000         (WebCore::SVGValuePropertyListAnimator::SVGValuePropertyListAnimator):
3001         * svg/properties/SVGValuePropertyListAnimatorImpl.h: Added.
3002
3003 2019-03-26  Simon Fraser  <simon.fraser@apple.com>
3004
3005         [iOS WK2] position:fixed inside oveflow:scroll is jumpy
3006         https://bugs.webkit.org/show_bug.cgi?id=196238
3007
3008         Reviewed by Antti Koivisto.
3009         
3010         We were inadvertently making Positioned nodes for position:fixed, which is unnecessary because
3011         Fixed nodes handle them, and harmful because they introduced unwanted layer movement.
3012
3013         Tests: scrollingcoordinator/ios/fixed-in-overflow-scroll-scrolling-tree.html
3014                scrollingcoordinator/ios/fixed-in-overflow-scroll.html
3015
3016         * rendering/RenderLayerCompositor.cpp:
3017         (WebCore::RenderLayerCompositor::computeCoordinatedPositioningForLayer const):
3018
3019 2019-03-26  Dean Jackson  <dino@apple.com>
3020
3021         vertexAttribPointer must restrict offset parameter
3022         https://bugs.webkit.org/show_bug.cgi?id=196261
3023         <rdar://problem/48458086>
3024
3025         Reviewed by Antoine Quint.
3026
3027         This WebGL function should fail if the offset parameter is
3028         not within [0, max 32-bit int].
3029
3030         Test: fast/canvas/webgl/vertexAttribPointer-with-bad-offset.html
3031
3032         * html/canvas/WebGLRenderingContextBase.cpp:
3033         (WebCore::WebGLRenderingContextBase::vertexAttribPointer):
3034
3035 2019-03-26  Antoine Quint  <graouts@apple.com>
3036
3037         Remove mousemoveEventHandlingPreventsDefault internal setting and quirk
3038         https://bugs.webkit.org/show_bug.cgi?id=196254
3039         <rdar://problem/49124334>
3040
3041         Unreviewed. Fix build broken by previous commit.
3042
3043         * dom/Event.cpp:
3044         * dom/Event.h:
3045         (WebCore::Event::hasEncounteredListener const): Deleted.
3046         (WebCore::Event::setHasEncounteredListener): Deleted.
3047         * dom/EventTarget.cpp:
3048         (WebCore::EventTarget::innerInvokeEventListeners):
3049
3050 2019-03-26  Zalan Bujtas  <zalan@apple.com>
3051
3052         [ContentChangeObserver] Skip anonymous renderers when checking for "willRespondToMouseClickEvents"
3053         https://bugs.webkit.org/show_bug.cgi?id=196259
3054         <rdar://problem/49240029>
3055
3056         Reviewed by Dean Jackson.
3057
3058         Anonymous renderers don't have associated DOM nodes so they can't have event listeners either. Let's skip them.
3059
3060         Test: fast/events/touch/ios/content-observation/crash-on-anonymous-renderer.html
3061
3062         * page/ios/ContentChangeObserver.cpp:
3063         (WebCore::ContentChangeObserver::StyleChangeScope::isConsideredClickable const):
3064
3065 2019-03-26  Antoine Quint  <graouts@apple.com>
3066
3067         Remove mousemoveEventHandlingPreventsDefault internal setting and quirk
3068         https://bugs.webkit.org/show_bug.cgi?id=196254
3069         <rdar://problem/49124334>
3070
3071         Reviewed by Dean Jackson.
3072
3073         * page/Quirks.cpp:
3074         (WebCore::Quirks::shouldMousemoveEventHandlingPreventDefault const): Deleted.
3075         * page/Quirks.h:
3076         * page/RuntimeEnabledFeatures.h:
3077         (WebCore::RuntimeEnabledFeatures::setMouseEventsSimulationEnabled):
3078         (WebCore::RuntimeEnabledFeatures::mousemoveEventHandlingPreventsDefaultEnabled const): Deleted.
3079         (WebCore::RuntimeEnabledFeatures::setMousemoveEventHandlingPreventsDefaultEnabled): Deleted.
3080
3081 2019-03-26  Commit Queue  <commit-queue@webkit.org>
3082
3083         Unreviewed, rolling out r243493.
3084         https://bugs.webkit.org/show_bug.cgi?id=196257
3085
3086         broke the non-gst-gl build (Requested by philn on #webkit).
3087
3088         Reverted changeset:
3089
3090         "Build failure with gstreamer 1.12.5 if USE_GSTREAMER_GL is
3091         enabled"
3092         https://bugs.webkit.org/show_bug.cgi?id=196178
3093         https://trac.webkit.org/changeset/243493
3094
3095 2019-03-26  Mike Gorse  <mgorse@alum.wpi.edu>
3096
3097         Build failure with gstreamer 1.12.5 if USE_GSTREAMER_GL is enabled
3098         https://bugs.webkit.org/show_bug.cgi?id=196178
3099
3100         Reviewed by Philippe Normand.
3101
3102         No new tests (build fix).
3103
3104         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
3105         Include gst/gl/gl.h before including GraphicsContext3D.h.
3106
3107 2019-03-26  Philippe Normand  <pnormand@igalia.com>
3108
3109         [GStreamer] Sound loop with Google Hangouts and WhatsApp notifications
3110         https://bugs.webkit.org/show_bug.cgi?id=189471
3111
3112         Reviewed by Xabier Rodriguez-Calvar.
3113
3114         The media duration is now cached (again). The loop issue was
3115         triggered by the previous version of the code returning positive
3116         infinite duration in didEnd(), followed by the timeupdate event
3117         propagation that would trick the HTMLMediaElement into a new call
3118         to play(). Now the cached duration is updated to current position
3119         at EOS (for forward playback direction only), so the media element
3120         no longer triggers a new play call for those cases.
3121
3122         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
3123         (WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer):
3124         (WebCore::MediaPlayerPrivateGStreamer::loadFull):
3125         (WebCore::MediaPlayerPrivateGStreamer::playbackPosition const):
3126         (WebCore::MediaPlayerPrivateGStreamer::platformDuration const):
3127         (WebCore::MediaPlayerPrivateGStreamer::durationMediaTime const):
3128         (WebCore::MediaPlayerPrivateGStreamer::currentMediaTime const):
3129         (WebCore::MediaPlayerPrivateGStreamer::didEnd):
3130         (WebCore::MediaPlayerPrivateGStreamer::durationChanged):
3131         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
3132         * platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp:
3133         (WebCore::MediaPlayerPrivateGStreamerMSE::currentMediaTime const):
3134
3135 2019-03-26  Antti Koivisto  <antti@apple.com>
3136
3137         Hit-testing on layers overlapping scrollers should hit-test on text boxes
3138         https://bugs.webkit.org/show_bug.cgi?id=195373
3139         <rdar://problem/48649865>
3140
3141         Reviewed by Simon Fraser.
3142
3143         * rendering/InlineFlowBox.cpp:
3144         (WebCore::InlineFlowBox::paint):
3145         * rendering/InlineTextBox.cpp:
3146         (WebCore::InlineTextBox::paint):
3147
3148         Collect event region for overflowing line boxes.
3149
3150         * rendering/SimpleLineLayoutFunctions.cpp:
3151         (WebCore::SimpleLineLayout::paintFlow):
3152
3153         Collect event region for overflowing simple lines.
3154
3155 2019-03-25  Alex Christensen  <achristensen@webkit.org>
3156
3157         Expected shouldn't assume its contained types are copyable
3158         https://bugs.webkit.org/show_bug.cgi?id=195986
3159
3160         Reviewed by JF Bastien.
3161
3162         * contentextensions/ContentExtensionParser.cpp:
3163         (WebCore::ContentExtensions::loadAction):
3164
3165 2019-03-20  Ryosuke Niwa  <rniwa@webkit.org>
3166
3167         Leak of SVGFontFaceElement when RenderStyle holds onto a FontRances which uses it
3168         https://bugs.webkit.org/show_bug.cgi?id=196059
3169
3170         Reviewed by Zalan Bujtas.
3171
3172         SVGFontFaceElement keeps its RenderStyle alive via ElementRareData but RenderStyle can hold onto FontRanges
3173         and therefore CSSFontSource, which in turn keeps SVGFontFaceElement alive, making a reference cycle.
3174
3175         More precisely, there are two reference cycles:
3176         SVGFontFaceElement (1) -> ElementRareData -> StyleInheritedData -> FontCascade -> FontCascadeFonts (2)
3177         FontCascadeFonts (2) -> FontRanges (3)
3178         FontCascadeFonts (2) -> CSSFontSelector -> CSSFontFaceSet -> CSSSegmentedFontFace -> FontRanges (3)
3179         FontRanges (3) -> CSSFontAccessor > CSSFontFace > CSSFontSource -> SVGFontFaceElement (1)
3180
3181         No new tests. Unfortunately, writing a test proved to be intractable. The leak can be reproduced by running
3182         svg/text/text-text-05-t.svg then svg/zoom/page/zoom-img-preserveAspectRatio-support-1.html consecutively.
3183
3184         * css/CSSFontFaceSource.cpp:
3185         (WebCore::CSSFontFaceSource::CSSFontFaceSource):
3186         (WebCore::CSSFontFaceSource::load):
3187         (WebCore::CSSFontFaceSource::font):
3188         (WebCore::CSSFontFaceSource::isSVGFontFaceSource const):
3189         * css/CSSFontFaceSource.h:
3190
3191 2019-03-25  Fujii Hironori  <Hironori.Fujii@sony.com>
3192
3193         Unreviewed, rolling out r243450.
3194
3195         AppleWin and WinCairo port builds get broken.
3196
3197         Reverted changeset:
3198
3199         "Add test for fix of #196095"
3200         https://bugs.webkit.org/show_bug.cgi?id=196097
3201         https://trac.webkit.org/changeset/243450
3202
3203 2019-03-25  Said Abou-Hallawa  <sabouhallawa@apple.com>
3204
3205         Remove the SVG tear off objects for SVGAngle, SVGAnimatedAngle and SVGAnimatedEnumeration
3206         https://bugs.webkit.org/show_bug.cgi?id=196087
3207
3208         Reviewed by Simon Fraser.
3209
3210         In this patch, the tear off objects for SVGAnimatedEnumeration will be 
3211         removed. Because the angle is paired with the orient type so its tear
3212         off objects have to be removed as well. Here is what this patch does:
3213
3214         -- SVGAngle is now a superclass of SVGValueProperty<SVGAngleValue>. Its 
3215         relationship with its owner will be managed by the owner of its base
3216         class SVGProperty.
3217
3218         -- SVGAnimatedAngle is now defined to be SVGAnimatedValueProperty<
3219         SVGAngle>. All the DOM interfaces will be handled by the base class
3220         given its baseVal and animVal are of type SVGAngle.
3221
3222         -- SVGAnimatedEnumeration is now defined to be
3223         SVGAnimatedDecoratedProperty<SVGDecoratedEnumeration, unsigned>.
3224         This can be read: SVGAnimatedEnumeration is an SVGAnimatedProperty which
3225         decorates the "SVGDecoratedEnumeration" type to "unsigned". The reason
3226         for this complication is the IDL of SVGAnimatedEnumeration defines the
3227         baseVal and animVal are of type unsigned. However SVGAnimatedEnumeration
3228         should be able to convert a string to its enum value and vice versa.
3229
3230         -- SVGAnimatedDecoratedProperty is a template class which maps from
3231         DecoratedProperty to DecorationType. The DecoratedProperty is actually
3232         a template class which exposes a property of type DecorationType.
3233
3234         -- SVGDecoratedProperty is an abstract class which manages setting and
3235         getting a property in DecorationType regardless of how it is actually
3236         stored. 
3237
3238         -- SVGDecoratedPrimitive is a superclass of SVGDecoratedProperty which
3239         stores a primitive property whose type is PropertyType but can decorate
3240         it to the callers as DecorationType.
3241
3242         -- SVGDecoratedEnumeration is a superclass of SVGDecoratedPrimitive
3243         which stores a primitive type DecorationType like "BlendMode" but
3244         decorates it as "unsigned"
3245
3246         To get the mechanics of this change correct, new accessors, animators
3247         and animation functions need to be added for SVGAnimatedAngle,
3248         SVGAnimatedEnumeration and SVGAnimatedOrientType. But since angle and
3249         the orient type are paired under a single attribute, a pair accessor and
3250         animator are also needed for the pair { angle, orientType }.
3251
3252         * Sources.txt:
3253         * WebCore.xcodeproj/project.pbxproj:
3254         * svg/SVGAngle.h:
3255         (WebCore::SVGAngle::create):
3256         (WebCore::SVGAngle::unitType):
3257         (WebCore::SVGAngle::setValueForBindings):
3258         (WebCore::SVGAngle::valueForBindings):
3259         (WebCore::SVGAngle::setValueInSpecifiedUnits):
3260         (WebCore::SVGAngle::valueInSpecifiedUnits):
3261         (WebCore::SVGAngle::setValueAsString):
3262         (WebCore::SVGAngle::newValueSpecifiedUnits):
3263         (WebCore::SVGAngle::convertToSpecifiedUnits):
3264         (WebCore::SVGAngle::valueAsString): Deleted.
3265         (WebCore::SVGAngle::SVGAngle): Deleted.
3266         * svg/SVGAnimatedAngle.cpp: Removed.
3267         * svg/SVGAnimatedAngle.h: Removed.
3268         * svg/SVGAnimatedEnumeration.cpp: Removed.
3269         * svg/SVGAnimatedEnumeration.h: Removed.
3270         * svg/SVGAnimatedType.h:
3271         (WebCore::SVGAnimatedType::type const):
3272         * svg/SVGAnimatorFactory.h:
3273         (WebCore::SVGAnimatorFactory::create):
3274         * svg/SVGClipPathElement.cpp:
3275         (WebCore::SVGClipPathElement::SVGClipPathElement):
3276         (WebCore::SVGClipPathElement::parseAttribute):
3277         (WebCore::SVGClipPathElement::svgAttributeChanged):
3278         (WebCore::SVGClipPathElement::registerAttributes): Deleted.
3279         * svg/SVGClipPathElement.h:
3280         * svg/SVGComponentTransferFunctionElement.cpp:
3281         (WebCore::SVGComponentTransferFunctionElement::SVGComponentTransferFunctionElement):
3282         (WebCore::SVGComponentTransferFunctionElement::parseAttribute):
3283         (WebCore::SVGComponentTransferFunctionElement::registerAttributes): Deleted.
3284         * svg/SVGComponentTransferFunctionElement.h:
3285         (WebCore::SVGComponentTransferFunctionElement::type const):
3286         (WebCore::SVGComponentTransferFunctionElement::typeAnimated):
3287         (WebCore::SVGComponentTransferFunctionElement::attributeRegistry): Deleted.
3288         (WebCore::SVGComponentTransferFunctionElement::isKnownAttribute): Deleted.
3289         * svg/SVGElement.cpp:
3290         (WebCore::SVGElement::commitPropertyChange):
3291         * svg/SVGFEBlendElement.cpp:
3292         (WebCore::SVGFEBlendElement::SVGFEBlendElement):
3293         (WebCore::SVGFEBlendElement::parseAttribute):
3294         (WebCore::SVGFEBlendElement::registerAttributes): Deleted.
3295         * svg/SVGFEBlendElement.h:
3296         (WebCore::SVGPropertyTraits<BlendMode>::fromString):
3297         * svg/SVGFEColorMatrixElement.cpp:
3298         (WebCore::SVGFEColorMatrixElement::SVGFEColorMatrixElement):
3299         (WebCore::SVGFEColorMatrixElement::parseAttribute):
3300         (WebCore::SVGFEColorMatrixElement::registerAttributes): Deleted.
3301         * svg/SVGFEColorMatrixElement.h:
3302         * svg/SVGFECompositeElement.cpp:
3303         (WebCore::SVGFECompositeElement::SVGFECompositeElement):
3304         (WebCore::SVGFECompositeElement::parseAttribute):
3305         (WebCore::SVGFECompositeElement::registerAttributes): Deleted.
3306         * svg/SVGFECompositeElement.h:
3307         * svg/SVGFEConvolveMatrixElement.cpp:
3308         (WebCore::SVGFEConvolveMatrixElement::SVGFEConvolveMatrixElement):
3309         (WebCore::SVGFEConvolveMatrixElement::parseAttribute):
3310         (WebCore::SVGFEConvolveMatrixElement::registerAttributes): Deleted.
3311         * svg/SVGFEConvolveMatrixElement.h:
3312         * svg/SVGFEDisplacementMapElement.cpp:
3313         (WebCore::SVGFEDisplacementMapElement::SVGFEDisplacementMapElement):
3314         (WebCore::SVGFEDisplacementMapElement::parseAttribute):
3315         (WebCore::SVGFEDisplacementMapElement::registerAttributes): Deleted.
3316         * svg/SVGFEDisplacementMapElement.h:
3317         * svg/SVGFEGaussianBlurElement.cpp:
3318         (WebCore::SVGFEGaussianBlurElement::SVGFEGaussianBlurElement):
3319         (WebCore::SVGFEGaussianBlurElement::parseAttribute):
3320         (WebCore::SVGFEGaussianBlurElement::svgAttributeChanged):
3321         (WebCore::SVGFEGaussianBlurElement::registerAttributes): Deleted.
3322         * svg/SVGFEGaussianBlurElement.h:
3323         * svg/SVGFEMorphologyElement.cpp:
3324         (WebCore::SVGFEMorphologyElement::SVGFEMorphologyElement):
3325         (WebCore::SVGFEMorphologyElement::parseAttribute):
3326         (WebCore::SVGFEMorphologyElement::registerAttributes): Deleted.
3327         * svg/SVGFEMorphologyElement.h:
3328         * svg/SVGFETurbulenceElement.cpp:
3329         (WebCore::SVGFETurbulenceElement::SVGFETurbulenceElement):
3330         (WebCore::SVGFETurbulenceElement::parseAttribute):
3331         (WebCore::SVGFETurbulenceElement::svgAttributeChanged):
3332         (WebCore::SVGFETurbulenceElement::registerAttributes): Deleted.
3333         * svg/SVGFETurbulenceElement.h:
3334         * svg/SVGFilterElement.cpp:
3335         (WebCore::SVGFilterElement::SVGFilterElement):
3336         (WebCore::SVGFilterElement::registerAttributes):
3337         (WebCore::SVGFilterElement::parseAttribute):
3338         * svg/SVGFilterElement.h:
3339         * svg/SVGGradientElement.cpp:
3340         (WebCore::SVGGradientElement::SVGGradientElement):
3341         (WebCore::SVGGradientElement::registerAttributes):
3342         (WebCore::SVGGradientElement::parseAttribute):
3343         * svg/SVGGradientElement.h:
3344         (WebCore::SVGGradientElement::spreadMethod const):
3345         (WebCore::SVGGradientElement::gradientUnits const):
3346         (WebCore::SVGGradientElement::spreadMethodAnimated):
3347         (WebCore::SVGGradientElement::gradientUnitsAnimated):
3348         * svg/SVGMarkerElement.cpp:
3349         (WebCore::SVGMarkerElement::SVGMarkerElement):
3350         (WebCore::SVGMarkerElement::registerAttributes):
3351         (WebCore::SVGMarkerElement::parseAttribute):
3352         (WebCore::SVGMarkerElement::setOrient):
3353         (WebCore::SVGMarkerElement::setOrientToAngle):
3354         (WebCore::SVGMarkerElement::orientTypeIdentifier): Deleted.
3355         (WebCore::SVGMarkerElement::orientAngleIdentifier): Deleted.
3356         * svg/SVGMarkerElement.h:
3357         * svg/SVGMarkerTypes.h:
3358         (WebCore::SVGPropertyTraits<SVGMarkerOrientType>::autoString):
3359         (WebCore::SVGPropertyTraits<SVGMarkerOrientType>::autoStartReverseString):
3360         (WebCore::SVGPropertyTraits<SVGMarkerOrientType>::fromString):
3361         (WebCore::SVGPropertyTraits<SVGMarkerOrientType>::toString):
3362         * svg/SVGMaskElement.cpp:
3363         (WebCore::SVGMaskElement::SVGMaskElement):
3364         (WebCore::SVGMaskElement::registerAttributes):
3365         (WebCore::SVGMaskElement::parseAttribute):
3366         * svg/SVGMaskElement.h:
3367         * svg/SVGPatternElement.cpp:
3368         (WebCore::SVGPatternElement::SVGPatternElement):
3369         (WebCore::SVGPatternElement::registerAttributes):
3370         (WebCore::SVGPatternElement::parseAttribute):
3371         * svg/SVGPatternElement.h:
3372         * svg/SVGSVGElement.cpp:
3373         * svg/SVGScriptElement.cpp:
3374         * svg/SVGTextContentElement.cpp:
3375         (WebCore::SVGTextContentElement::SVGTextContentElement):
3376         (WebCore::SVGTextContentElement::registerAttributes):
3377         (WebCore::SVGTextContentElement::parseAttribute):
3378         * svg/SVGTextContentElement.h:
3379         (WebCore::SVGTextContentElement::lengthAdjust const):
3380         (WebCore::SVGTextContentElement::lengthAdjustAnimated):
3381         * svg/SVGTextPathElement.cpp:
3382         (WebCore::SVGTextPathElement::SVGTextPathElement):
3383         (WebCore::SVGTextPathElement::registerAttributes):
3384         (WebCore::SVGTextPathElement::parseAttribute):
3385         * svg/SVGTextPathElement.h:
3386         * svg/SVGValue.h:
3387         * svg/properties/SVGAnimatedDecoratedProperty.h: Added.
3388         (WebCore::SVGAnimatedDecoratedProperty::create):
3389         (WebCore::SVGAnimatedDecoratedProperty::SVGAnimatedDecoratedProperty):
3390         (WebCore::SVGAnimatedDecoratedProperty::setBaseVal):
3391         (WebCore::SVGAnimatedDecoratedProperty::setBaseValInternal):
3392         (WebCore::SVGAnimatedDecoratedProperty::baseVal const):
3393         (WebCore::SVGAnimatedDecoratedProperty::setAnimVal):
3394         (WebCore::SVGAnimatedDecoratedProperty::animVal const):
3395         (WebCore::SVGAnimatedDecoratedProperty::currentValue const):
3396         * svg/properties/SVGAnimatedEnumerationPropertyTearOff.h: Removed.
3397         * svg/properties/SVGAnimatedPropertyAccessorImpl.h:
3398         * svg/properties/SVGAnimatedPropertyAnimatorImpl.h:
3399         * svg/properties/SVGAnimatedPropertyImpl.h:
3400         (WebCore::SVGAnimatedOrientType::create):
3401         * svg/properties/SVGAnimatedPropertyPairAccessorImpl.h:
3402         * svg/properties/SVGAnimatedPropertyPairAnimator.h:
3403         (WebCore::SVGAnimatedPropertyPairAnimator::appendAnimatedInstance):
3404         * svg/properties/SVGAnimatedPropertyPairAnimatorImpl.h:
3405         * svg/properties/SVGAnimatedStaticPropertyTearOff.h: Removed.
3406         * svg/properties/SVGAnimationAdditiveValueFunctionImpl.h:
3407         (WebCore::SVGAnimationAngleFunction::progress):
3408         * svg/properties/SVGAnimationDiscreteFunctionImpl.h:
3409         * svg/properties/SVGAttributeRegistry.h:
3410         * svg/properties/SVGDecoratedEnumeration.h: Added.
3411         (WebCore::SVGDecoratedEnumeration::create):
3412         * svg/properties/SVGDecoratedPrimitive.h: Added.
3413         (WebCore::SVGDecoratedPrimitive::SVGDecoratedPrimitive):
3414         * svg/properties/SVGDecoratedProperty.h: Added.
3415         (WebCore::SVGDecoratedProperty::setValue):
3416         (WebCore::SVGDecoratedProperty::value const):
3417         * svg/properties/SVGPropertyOwnerRegistry.h:
3418         (WebCore::SVGPropertyOwnerRegistry::registerProperty):
3419         (WebCore::SVGPropertyOwnerRegistry::isAnimatedLengthAttribute):
3420         * svg/properties/SVGPropertyRegistry.h:
3421         * svg/properties/SVGStaticPropertyTearOff.h: Removed.
3422
3423 2019-03-25  Fujii Hironori  <Hironori.Fujii@sony.com>
3424
3425         [iOS] Break a reference cycle between PreviewLoader and ResourceLoader
3426         https://bugs.webkit.org/show_bug.cgi?id=194964
3427
3428         Unreviewed build fix for WinCairo port.
3429
3430         error C2504: 'CanMakeWeakPtr': base class undefined
3431
3432         * loader/ResourceLoader.h: Added #include <wtf/WeakPtr.h>.
3433
3434 2019-03-25  Andy Estes  <aestes@apple.com>
3435
3436         [iOS] Break a reference cycle between PreviewLoader and ResourceLoader
3437         https://bugs.webkit.org/show_bug.cgi?id=194964
3438         <rdar://problem/48279441>
3439
3440         Reviewed by Alex Christensen.
3441
3442         When a document's QuickLook preview is loaded, a reference cycle is created between
3443         WebPreviewLoader and ResourceLoader. Break the cycle by changing WebPreviewLoader to hold a
3444         WeakPtr to its ResourceLoader ResourceLoader::releaseResources().
3445
3446         Fixes leaks detected by `run-webkit-tests --leaks LayoutTests/quicklook`. Also covered by
3447         existing API tests.
3448
3449         * loader/ResourceLoader.h:
3450         * loader/ios/PreviewLoader.mm:
3451         (-[WebPreviewLoader initWithResourceLoader:resourceResponse:]):
3452         (-[WebPreviewLoader _sendDidReceiveResponseIfNecessary]):
3453         (-[WebPreviewLoader connection:didReceiveData:lengthReceived:]):
3454         (-[WebPreviewLoader connectionDidFinishLoading:]):
3455         (-[WebPreviewLoader connection:didFailWithError:]):
3456
3457 2019-03-25  Alex Christensen  <achristensen@webkit.org>
3458
3459         Enable IPC sending and receiving non-default-constructible types
3460         https://bugs.webkit.org/show_bug.cgi?id=196132
3461
3462         Reviewed by Geoff Garen.
3463
3464         This basically just requires the decoding of std::tuple to return an Optional<std::tuple> instead of
3465         constructing a std::tuple then decoding into it.  I now decode synchronous replies into an Optional<std::tuple>
3466         then move it into the tuple of references where the successfully decoded reply should go.  This required
3467         the synchronous reply types be move constructible and move assignable.
3468
3469         * Modules/indexeddb/shared/IDBRequestData.h:
3470         * Modules/indexeddb/shared/IDBTransactionInfo.h:
3471         * platform/DragImage.h:
3472         * platform/PasteboardWriterData.h:
3473         * platform/audio/mac/CAAudioStreamDescription.h:
3474         * platform/graphics/RemoteVideoSample.h:
3475
3476 2019-03-25  Alex Christensen  <achristensen@webkit.org>
3477
3478         Stop storing raw pointers to Documents
3479         https://bugs.webkit.org/show_bug.cgi?id=196042
3480
3481         Reviewed by Geoff Garen.
3482
3483         Use WeakPtr instead!  This could change some UAF bugs into null dereference crashes.
3484
3485         * css/CSSFontSelector.cpp:
3486         (WebCore::CSSFontSelector::CSSFontSelector):
3487         (WebCore::CSSFontSelector::addFontFaceRule):
3488         (WebCore::CSSFontSelector::fontRangesForFamily):
3489         * css/CSSFontSelector.h:
3490         * css/MediaQueryMatcher.cpp:
3491         (WebCore::MediaQueryMatcher::MediaQueryMatcher):
3492         (WebCore::MediaQueryMatcher::matchMedia):
3493         * css/MediaQueryMatcher.h:
3494         * css/StyleSheetList.cpp:
3495         (WebCore::StyleSheetList::StyleSheetList):
3496         (WebCore::StyleSheetList::ownerNode const):
3497         * css/StyleSheetList.h:
3498         * css/ViewportStyleResolver.cpp:
3499         (WebCore::ViewportStyleResolver::ViewportStyleResolver):
3500         * css/ViewportStyleResolver.h:
3501         * dom/Document.h:
3502         (WebCore::Document::setTemplateDocumentHost):
3503         (WebCore::Document::templateDocumentHost):
3504         * dom/DocumentParser.cpp:
3505         (WebCore::DocumentParser::DocumentParser):
3506         * dom/DocumentParser.h:
3507         (WebCore::DocumentParser::document const):
3508         * dom/ScriptedAnimationController.cpp:
3509         (WebCore::ScriptedAnimationController::ScriptedAnimationController):
3510         * dom/ScriptedAnimationController.h:
3511         * html/parser/HTMLScriptRunner.cpp:
3512         (WebCore::HTMLScriptRunner::HTMLScriptRunner):
3513         (WebCore::HTMLScriptRunner::runScript):
3514         * html/parser/HTMLScriptRunner.h:
3515         * loader/MediaResourceLoader.cpp:
3516         (WebCore::MediaResourceLoader::MediaResourceLoader):
3517         * loader/MediaResourceLoader.h:
3518         * loader/cache/CachedResourceLoader.cpp:
3519         (WebCore::CachedResourceLoader::canRequestInContentDispositionAttachmentSandbox const):
3520         (WebCore::CachedResourceLoader::loadDone):
3521         * loader/cache/CachedResourceLoader.h:
3522         (WebCore::CachedResourceLoader::document const):
3523         (WebCore::CachedResourceLoader::setDocument):
3524
3525 2019-03-25  Truitt Savell  <tsavell@apple.com>
3526
3527         Unreviewed, rolling out r243419.
3528
3529         Caused Mac WK2 testers to crash and become unresponsive.
3530
3531         Reverted changeset:
3532
3533         "[Web GPU] Prototype compute pipeline with MSL"
3534         https://bugs.webkit.org/show_bug.cgi?id=196107
3535         https://trac.webkit.org/changeset/243419
3536
3537 2019-03-25  Truitt Savell  <tsavell@apple.com>
3538
3539         Unreviewed, rolling out r243438.
3540
3541         243319 Caused Mac WK2 testers to crash and become
3542         unresponsive.
3543
3544         Reverted changeset:
3545
3546         "Update WebGPU class names based on sketch.idl"
3547         https://bugs.webkit.org/show_bug.cgi?id=194260
3548         https://trac.webkit.org/changeset/243438
3549
3550 2019-03-25  Eric Carlson  <eric.carlson@apple.com>
3551
3552         Delete MetadataPreloadingNotPermitted, it is unused
3553         https://bugs.webkit.org/show_bug.cgi?id=196202
3554         <rdar://problem/49213611>
3555
3556         Reviewed by Jer Noble.
3557
3558         No new tests, the flat was unused except in an existing test that was removed.
3559
3560         * html/MediaElementSession.cpp:
3561         (WebCore::restrictionNames):
3562         (WebCore::MediaElementSession::effectivePreloadForElement const):
3563         * html/MediaElementSession.h:
3564         * platform/graphics/cg/UTIRegistry.cpp:
3565         (WebCore::defaultSupportedImageTypes):
3566         * testing/Internals.cpp:
3567         (WebCore::Internals::setMediaElementRestrictions):
3568
3569 2019-03-25  Jer Noble  <jer.noble@apple.com>
3570
3571         Test for: 196095 Inband Text Track cues interspersed with Data cues can display out of order.
3572         https://bugs.webkit.org/show_bug.cgi?id=196097
3573
3574         Reviewed by Eric Carlson.
3575
3576         Test: media/track/track-in-band-metadata-display-order.html
3577
3578         Add a method in Internals to create a TextTrackCueGeneric (which can normally only be created
3579         by parsing an in-band media track). This requires adding IDL for TextTrackCueGeneric, and exporting
3580         TextTrackCueGeneric for testing.
3581
3582         Drive-by fixes:
3583
3584         Add runtime logging to MediaControlTextTrackContainerElement. This necessitates modifying the
3585         parentMediaElement() method to take a const Node*, and const_cast that constness away in order to return
3586         a HTMLMediaElement*
3587
3588         TextTrackCue, VTTCue, TextTrackCueGeneric, and DataCue should all use the WTF TypeCasts macros to
3589         enable use of is<> and downcast<>.
3590
3591         * Source/WebCore/CMakeLists.txt:
3592         * DerivedSources-input.xcfilelist:
3593         * DerivedSources-output.xcfilelist:
3594         * DerivedSources.make:
3595         * WebCore.xcodeproj/project.pbxproj:
3596         * html/shadow/MediaControlElementTypes.cpp:
3597         (WebCore::parentMediaElement):
3598         * html/shadow/MediaControlElementTypes.h:
3599         * html/shadow/MediaControlElements.cpp:
3600         (WebCore::MediaControlTextTrackContainerElement::updateDisplay):
3601         (WebCore::MediaControlTextTrackContainerElement::logger const):
3602         (WebCore::MediaControlTextTrackContainerElement::logIdentifier const):
3603         (WebCore::MediaControlTextTrackContainerElement::logChannel const):
3604         * html/shadow/MediaControlElements.h:
3605         * html/track/DataCue.h:
3606         (isType):
3607         * html/track/TextTrackCueGeneric.h:
3608         (isType):
3609         * html/track/TextTrackCueGeneric.idl: Added.
3610         * html/track/VTTCue.h:
3611         (isType):
3612         * testing/Internals.cpp:
3613         (WebCore::Internals::createGenericCue):
3614         * testing/Internals.h:
3615         * testing/Internals.idl:
3616
3617 2019-03-25  Antti Koivisto  <antti@apple.com>
3618
3619         Toggling "display: contents" to "display: none" fails to hide the element
3620         https://bugs.webkit.org/show_bug.cgi?id=188259
3621         <rdar://problem/42886896>
3622
3623         Reviewed by Simon Fraser.
3624
3625         Test: fast/css/display-contents-to-none.html
3626
3627         * style/StyleTreeResolver.cpp:
3628         (WebCore::Style::affectsRenderedSubtree):
3629
3630         An element with 'display:contents' has a rendered subtree.
3631
3632 2019-03-25  Justin Fan  <justin_fan@apple.com>
3633
3634         Update WebGPU class names based on sketch.idl
3635         https://bugs.webkit.org/show_bug.cgi?id=194260
3636
3637         Reviewed by Dean Jackson.
3638
3639         Update all exposed Web GPU interface names to GPU* prefix. 
3640
3641         Existing Web GPU tests updated to expect new names.
3642
3643         * Modules/webgpu/WebGPU.idl:
3644         * Modules/webgpu/WebGPUAdapter.idl:
3645         * Modules/webgpu/WebGPUBindGroup.idl:
3646         * Modules/webgpu/WebGPUBindGroupLayout.idl:
3647         * Modules/webgpu/WebGPUBuffer.idl:
3648         * Modules/webgpu/WebGPUDevice.idl:
3649         * Modules/webgpu/WebGPUInputStepMode.h: Removed.
3650         * Modules/webgpu/WebGPUPipelineLayout.idl:
3651         * Modules/webgpu/WebGPUProgrammablePassEncoder.idl:
3652         * Modules/webgpu/WebGPUQueue.idl:
3653         * Modules/webgpu/WebGPURenderPassEncoder.idl:
3654         * Modules/webgpu/WebGPURenderPipeline.idl:
3655         * Modules/webgpu/WebGPUSampler.idl:
3656         * Modules/webgpu/WebGPUTexture.idl:
3657         * Modules/webgpu/WebGPUTextureView.idl:
3658         * WebCore.xcodeproj/project.pbxproj:
3659         * bindings/js/WebCoreBuiltinNames.h:
3660
3661 2019-03-25  Javier Fernandez  <jfernandez@igalia.com>
3662
3663         A single leading space is not considered as a word break even when word-break: break-all is set
3664         https://bugs.webkit.org/show_bug.cgi?id=195361
3665
3666         Reviewed by Ryosuke Niwa.
3667
3668         We must consider leading white-spaces as potential soft-breaking
3669         opportunities that may avoid breaking in the middle of the word.
3670
3671         However, 'break-word: break-all' [1] implies that we should ignore
3672         previous opportunities and break at any character (among the ones
3673         valid for 'break-all') that prevents the line to overflow. Note,
3674         that these breakable characters are different from the ones
3675         provided by 'line-break: anywhere' [2].
3676
3677         This change is covered by the already existent tests of the CSS
3678         Text 3 suite of the Web Platform Tests.
3679
3680         The word-break-break-all-010.html was precisely designed to cover
3681         the basic issue fixed with this change, verifying that the word is
3682         indeed broken even if a single leading space constitutes a
3683         previous soft-breaking opportunity.
3684
3685         There are other Web Platform Tests. which already pass before this
3686         change, to verify that such leading white-space must be used
3687         instead of breaking the word in any other case, including
3688         overflow-wrap: break-word and even the deprecated word-break:
3689         break-word.
3690
3691            - white-space/pre-wrap-008.html
3692            - white-space/pre-wrap-015.html
3693            - white-space/pre-wrap-016.html
3694            - overflow-wrap/overflow-wrap-break-word-004.html
3695            - overflow-wrap/overflow-wrap-break-word-005.html
3696            - overflow-wrap/overflow-wrap-break-word-007.html
3697            - word-break/word-break-break-all-011.html
3698            - word-break/word-break-break-all-014.html
3699
3700         The reason why the word-break-break-all-010.html passes in Mac
3701         platform is that for that case the SimpleLineLayout codepath is
3702         executed instead, which doesn't have this bug, present in the old
3703         line-breaking logic implemented in the BreakingContext class.
3704
3705         In order to verify the validity of this change, I've added several
3706         tests under fast/text with the SimpleLineLayout disabled.
3707
3708         Tests: fast/text/overflow-wrap-break-word-004.html
3709                fast/text/overflow-wrap-break-word-005.html
3710                fast/text/overflow-wrap-break-word-007.html
3711                fast/text/whitespace/pre-wrap-008.html
3712                fast/text/whitespace/pre-wrap-015.html
3713                fast/text/whitespace/pre-wrap-016.html
3714                fast/text/word-break-break-all-010.html
3715                fast/text/word-break-break-all-011.html
3716                fast/text/word-break-break-all-015.html
3717                imported/w3c/web-platform-tests/css/css-text/overflow-wrap/overflow-wrap-break-word-007.html
3718                imported/w3c/web-platform-tests/css/css-text/white-space/pre-wrap-008.html
3719                imported/w3c/web-platform-tests/css/css-text/word-break/word-break-break-all-015.html
3720
3721         * rendering/line/BreakingContext.h:
3722         (WebCore::BreakingContext::handleText):
3723
3724 2019-03-25  Rob Buis  <rbuis@igalia.com>
3725
3726         Reflect HTMLLinkElement.as according to the spec
3727         https://bugs.webkit.org/show_bug.cgi?id=196189
3728
3729         Reviewed by Youenn Fablet.
3730
3731         The 'as' attribute is an enumerated attribute [1] and should
3732         reflect using a finite set of keywords, so lowercase the as getter
3733         to match the defined set of destinations [2].
3734
3735         Test: imported/w3c/web-platform-tests/preload/reflected-as-value.html
3736
3737         [1] https://html.spec.whatwg.org/#enumerated-attribute
3738         [2] https://fetch.spec.whatwg.org/#concept-request-destination
3739
3740         * html/HTMLLinkElement.cpp:
3741         (WebCore::HTMLLinkElement::as const):
3742
3743 2019-03-25  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
3744
3745         Remove NavigatorContentUtils in WebCore/Modules
3746         https://bugs.webkit.org/show_bug.cgi?id=196070
3747
3748         Reviewed by Alex Christensen.
3749
3750         NavigatorContentUtils was to support the custom scheme spec [1].
3751         However, in WebKit side, no port has supported the feature in
3752         WebKit layer after EFL port was removed. So there has been the
3753         only IDL implementation of the NavigatorContentUtils in WebCore.
3754         So we don't need to keep the implementation in WebCore anymore.
3755
3756         [1] https://html.spec.whatwg.org/multipage/system-state.html#custom-handlers
3757
3758         No new tests because this patch is just to remove the feature.
3759
3760         * CMakeLists.txt:
3761         * Modules/navigatorcontentutils/NavigatorContentUtils.cpp: Removed.
3762         * Modules/navigatorcontentutils/NavigatorContentUtils.h: Removed.
3763         * Modules/navigatorcontentutils/NavigatorContentUtils.idl: Removed.
3764         * Modules/navigatorcontentutils/NavigatorContentUtilsClient.h: Removed.
3765         * Sources.txt:
3766
3767 2019-03-25  Manuel Rego Casasnovas  <rego@igalia.com>
3768
3769         [css-grid] Fix grid container baseline alignment for orthogonal items
3770         https://bugs.webkit.org/show_bug.cgi?id=196141
3771
3772         Reviewed by Javier Fernandez.
3773
3774         Grid container baseline was wrongly computed when done in reference to an orthogonal item.
3775
3776         Test: imported/w3c/web-platform-tests/css/css-grid/alignment/grid-container-baseline-001.html
3777
3778         * rendering/RenderGrid.cpp:
3779         (WebCore::RenderGrid::firstLineBaseline const): Simple change to use logicalTopForChild()
3780         so it takes into account grid container and item writing modes.
3781
3782 2019-03-24  Michael Catanzaro  <mcatanzaro@igalia.com>
3783
3784         Unreviewed, fix -Wpessimizing-move warning
3785         https://bugs.webkit.org/show_bug.cgi?id=195905
3786         <rdar://problem/49121824>
3787
3788         * svg/properties/SVGPropertyList.h:
3789
3790 2019-03-23  Justin Fan  <justin_fan@apple.com>
3791
3792         [Web GPU] Prototype compute pipeline with MSL
3793         https://bugs.webkit.org/show_bug.cgi?id=196107
3794         <rdar://problem/46289650>
3795
3796         Reviewed by Myles Maxfield.
3797
3798         Add GPUComputePassEncoder, GPUComputePipeline, and GPUComputePipelineDescriptor.
3799         Implement everything needed to prototype a compute pipeline in Web GPU using Metal shaders and bound resources.
3800
3801         Test: webgpu/compute-squares.html
3802
3803         Add files and symbols:
3804         * CMakeLists.txt:
3805         * DerivedSources-input.xcfilelist:
3806         * DerivedSources-output.xcfilelist:
3807         * DerivedSources.make:
3808         * Sources.txt:
3809         * SourcesCocoa.txt:
3810         * WebCore.xcodeproj/project.pbxproj:
3811         * bindings/js/WebCoreBuiltinNames.h:
3812
3813         Misc fixes:
3814         * Modules/webgpu/WHLSL/WHLSLNameResolver.h: Missing include.
3815         * Modules/webgpu/WHLSL/WHLSLSynthesizeConstructors.cpp: Missing include.
3816         * Modules/webgpu/WebGPUPipelineStageDescriptor.cpp: Added. Move pipeline stage validation logic here.
3817         (WebCore::WebGPUPipelineStageDescriptor::tryCreateGPUPipelineStageDescriptor const):
3818         * Modules/webgpu/WebGPURenderPipeline.cpp: Remove unnecessary include.
3819         * Modules/webgpu/WebGPURenderPipeline.h:
3820         * Modules/webgpu/WebGPURenderPipelineDescriptor.cpp: Add missing inlcude.
3821         (WebCore::WebGPUPipelineStageDescriptor::tryCreateGPUPipelineStageDescriptor const): Moved to WebGPUPipelineStageDescriptor.cpp.
3822         * platform/graphics/gpu/GPUPipelineDescriptorBase.h: Add missing include.
3823         * platform/graphics/gpu/cocoa/GPURenderPipelineMetal.mm: Add missing include.
3824         (WebCore::GPURenderPipeline::GPURenderPipeline): Remove unecessary ref of GPUPipelineLayout.
3825         * platform/text/mac/TextEncodingRegistryMac.mm: Carbon.h was causing ambiguous reference build errors in this file.
3826
3827         Enable creating a GPUComputePassEncoder from a GPUCommandEncoder:
3828         * Modules/webgpu/WebGPUCommandEncoder.cpp:
3829         (WebCore::WebGPUCommandEncoder::beginRenderPass): No longer passing this WebGPUCommandEncoder to pass encoders.
3830         (WebCore::WebGPUCommandEncoder::beginComputePass): Added.
3831         * Modules/webgpu/WebGPUCommandEncoder.h:
3832         * Modules/webgpu/WebGPUCommandEncoder.idl:
3833
3834         Add GPUComputePassEncoder:
3835         * Modules/webgpu/WebGPUComputePassEncoder.cpp: Added.
3836         (WebCore::WebGPUComputePassEncoder::create):
3837         (WebCore::WebGPUComputePassEncoder::WebGPUComputePassEncoder):
3838         (WebCore::WebGPUComputePassEncoder::setPipeline):
3839         (WebCore::WebGPUComputePassEncoder::dispatch):
3840         (WebCore::WebGPUComputePassEncoder::passEncoder):
3841         (WebCore::WebGPUComputePassEncoder::passEncoder const):
3842         * Modules/webgpu/WebGPUComputePassEncoder.h: Added.
3843         * Modules/webgpu/WebGPUComputePassEncoder.idl: Added.
3844         * platform/graphics/gpu/GPUComputePassEncoder.h: Added.
3845         (WebCore::GPUComputePassEncoder::~GPUComputePassEncoder):
3846         * platform/graphics/gpu/cocoa/GPUComputePassEncoderMetal.mm: Added.
3847         (WebCore::GPUComputePassEncoder::tryCreate):
3848         (WebCore::GPUComputePassEncoder::GPUComputePassEncoder):
3849         (WebCore::GPUComputePassEncoder::setPipeline):
3850         (WebCore::GPUComputePassEncoder::dispatch): Use a default calculation for threadsPerThreadgroup while MSL is still an accepted shader format.
3851         (WebCore::GPUComputePassEncoder::platformPassEncoder const):
3852         (WebCore::GPUComputePassEncoder::useResource):
3853         (WebCore::GPUComputePassEncoder::setComputeBuffer):
3854
3855         Add GPUComputePipeline:
3856         * Modules/webgpu/WebGPUComputePipeline.cpp: Added.
3857         (WebCore::WebGPUComputePipeline::create):
3858         (WebCore::WebGPUComputePipeline::WebGPUComputePipeline):
3859         * Modules/webgpu/WebGPUComputePipeline.h: Added.
3860         (WebCore::WebGPUComputePipeline::computePipeline const):
3861         * Modules/webgpu/WebGPUComputePipeline.idl: Added.
3862         * Modules/webgpu/WebGPUComputePipelineDescriptor.cpp: Added.
3863         (WebCore::WebGPUComputePipelineDescriptor::tryCreateGPUComputePipelineDescriptor const):
3864         * Modules/webgpu/WebGPUComputePipelineDescriptor.h: Added.
3865         * Modules/webgpu/WebGPUComputePipelineDescriptor.idl: Added.
3866         * platform/graphics/gpu/GPUComputePipeline.h: Added.
3867         (WebCore::GPUComputePipeline::platformComputePipeline const):
3868         * platform/graphics/gpu/GPUComputePipelineDescriptor.h: Added.
3869         (WebCore::GPUComputePipelineDescriptor::GPUComputePipelineDescriptor):
3870         * platform/graphics/gpu/cocoa/GPUComputePipelineMetal.mm: Added.
3871         (WebCore::tryCreateMtlComputeFunction):
3872         (WebCore::tryCreateMTLComputePipelineState):
3873         (WebCore::GPUComputePipeline::tryCreate):
3874         (WebCore::GPUComputePipeline::GPUComputePipeline):
3875
3876         Enable creating a GPUComputePipeline from a GPUDevice:
3877         * Modules/webgpu/WebGPUDevice.cpp:
3878         (WebCore::WebGPUDevice::createComputePipeline const):
3879         * Modules/webgpu/WebGPUDevice.h:
3880         * Modules/webgpu/WebGPUDevice.idl:
3881         * platform/graphics/gpu/GPUDevice.cpp:
3882         (WebCore::GPUDevice::tryCreateComputePipeline const):
3883         * platform/graphics/gpu/GPUDevice.h:
3884
3885         No longer unnecessarily ref the WebGPUCommandEncoder when creating pass encoder:
3886         * Modules/webgpu/WebGPUProgrammablePassEncoder.cpp:
3887         (WebCore::WebGPUProgrammablePassEncoder::setBindGroup):
3888         (WebCore::WebGPUProgrammablePassEncoder::WebGPUProgrammablePassEncoder): Deleted.
3889         (WebCore::WebGPUProgrammablePassEncoder::setBindGroup const): Deleted.
3890         * Modules/webgpu/WebGPUProgrammablePassEncoder.h:
3891         * Modules/webgpu/WebGPURenderPassEncoder.cpp:
3892         (WebCore::WebGPURenderPassEncoder::create):
3893         (WebCore::WebGPURenderPassEncoder::WebGPURenderPassEncoder):
3894         (WebCore::WebGPURenderPassEncoder::setPipeline):
3895         (WebCore::WebGPURenderPassEncoder::passEncoder):
3896         (WebCore::WebGPURenderPassEncoder::passEncoder const):
3897         * Modules/webgpu/WebGPURenderPassEncoder.h:
3898
3899         Updates to GPUBindGroup and *setBindGroup for compute function arguments:
3900         * platform/graphics/gpu/GPUBindGroup.h:
3901         (WebCore::GPUBindGroup::vertexArgsBuffer const):
3902         (WebCore::GPUBindGroup::fragmentArgsBuffer const):
3903         (WebCore::GPUBindGroup::computeArgsBuffer const):
3904         (WebCore::GPUBindGroup::vertexArgsBuffer): Deleted. Const-qualified.
3905         (WebCore::GPUBindGroup::fragmentArgsBuffer): Ditto.
3906         * platform/graphics/gpu/cocoa/GPUBindGroupMetal.mm:
3907         (WebCore::tryGetResourceAsMTLSamplerState): Now just returns the MTLSamplerState to reduce reference churning.
3908         (WebCore::GPUBindGroup::tryCreate):
3909         (WebCore::GPUBindGroup::GPUBindGroup):
3910         (WebCore::tryGetResourceAsSampler): Renamed to tryGetResourceAsMTLSamplerState.
3911
3912         Updates to GPUProgrammablePassEncoder and GPURenderPassEncoder:
3913         * platform/graphics/gpu/GPUProgrammablePassEncoder.h:
3914         (WebCore::GPUProgrammablePassEncoder::setVertexBuffer):
3915         (WebCore::GPUProgrammablePassEncoder::setFragmentBuffer):
3916         (WebCore::GPUProgrammablePassEncoder::setComputeBuffer): Added.
3917         * platform/graphics/gpu/GPURenderPassEncoder.h:
3918         (WebCore::GPURenderPassEncoder::~GPURenderPassEncoder):
3919         * platform/graphics/gpu/GPURenderPipeline.h:
3920         * platform/graphics/gpu/cocoa/GPUProgrammablePassEncoderMetal.mm: Remove unecessary include.
3921         (WebCore::GPUProgrammablePassEncoder::endPass): No longer virtual. Delegates shared behavior for derived classes.
3922         (WebCore::GPUProgrammablePassEncoder::setBindGroup):
3923         * platform/graphics/gpu/cocoa/GPURenderPassEncoderMetal.mm:
3924         (WebCore::GPURenderPassEncoder::platformPassEncoder const):
3925         (WebCore::GPURenderPassEncoder::setPipeline):
3926         (WebCore::GPURenderPassEncoder::draw):
3927         (WebCore::GPURenderPassEncoder::useResource): These private overrides are called only by base after checking for encoder existence.
3928         (WebCore::GPURenderPassEncoder::setVertexBuffer): Ditto.
3929         (WebCore::GPURenderPassEncoder::setFragmentBuffer): Ditto.
3930         (WebCore::GPURenderPassEncoder::endPass): Deleted. Now handled by base class.
3931
3932 2019-03-23  Simon Fraser  <simon.fraser@apple.com>
3933
3934         REGRESSION (iOS 8): Scrollbar can't be hidden when webkit-overflow-scrolling is set to touch
3935         https://bugs.webkit.org/show_bug.cgi?id=137043
3936         rdar://problem/16595330
3937
3938         Reviewed by Zalan Bujtas.
3939
3940         Plumb horizontalScrollbarHiddenByStyle/verticalScrollbarHiddenByStyle through ScrollableAreaParameters
3941         to the UI process, and use it to set UIScrollView indicators visible or not.
3942
3943         Tests: fast/scrolling/ios/scrollbar-hiding.html:
3944
3945         * page/scrolling/AsyncScrollingCoordinator.cpp:
3946         (WebCore::AsyncScrollingCoordinator::setScrollingNodeScrollableAreaGeometry):
3947         * page/scrolling/ScrollingCoordinator.cpp:
3948         (WebCore::operator<<):
3949         * page/scrolling/ScrollingCoordinatorTypes.h:
3950         * page/scrolling/ScrollingTreeNode.h:
3951         * page/scrolling/ScrollingTreeOverflowScrollingNode.cpp:
3952         (WebCore::ScrollingTreeOverflowScrollingNode::dumpProperties const):
3953         * page/scrolling/ScrollingTreeScrollingNode.h:
3954         * platform/ScrollableArea.h:
3955         (WebCore::ScrollableArea::horizontalScrollbarHiddenByStyle const):
3956         (WebCore::ScrollableArea::verticalScrollbarHiddenByStyle const):
3957         * rendering/RenderLayer.cpp:
3958         (WebCore::scrollbarHiddenByStyle):
3959         (WebCore::RenderLayer::horizontalScrollbarHiddenByStyle const):
3960         (WebCore::RenderLayer::verticalScrollbarHiddenByStyle const):
3961         * rendering/RenderLayer.h:
3962
3963 2019-03-23  Zalan Bujtas  <zalan@apple.com>
3964
3965         [ContentChangeObserver] Add support for observing opacity.