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