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