[FreeType] Incorrect application of glyph positioning in the Y direction
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2019-03-28  Carlos Garcia Campos  <cgarcia@igalia.com>
2
3         [FreeType] Incorrect application of glyph positioning in the Y direction
4         https://bugs.webkit.org/show_bug.cgi?id=161493
5
6         Reviewed by Michael Catanzaro.
7
8         Use the first glyph origin as the initial advance of every complex text run.
9
10         * platform/graphics/cairo/FontCairo.cpp:
11         (WebCore::FontCascade::drawGlyphs): Update the yOffset using the height advance.
12         * platform/graphics/cairo/GraphicsContextImplCairo.cpp:
13         (WebCore::GraphicsContextImplCairo::drawGlyphs): Ditto.
14         * platform/graphics/harfbuzz/ComplexTextControllerHarfBuzz.cpp:
15         (WebCore::ComplexTextController::ComplexTextRun::ComplexTextRun): Set the initial advance.
16
17 2019-03-27  Ryosuke Niwa  <rniwa@webkit.org>
18
19         [macOS] Select element doesn't show popup if select element had lost focus while popup was previosuly shown
20         https://bugs.webkit.org/show_bug.cgi?id=196336
21
22         Reviewed by Tim Horton.
23
24         * rendering/RenderMenuList.cpp:
25         (RenderMenuList::popupDidHide): Added a comment.
26
27 2019-03-27  Justin Fan  <justin_fan@apple.com>
28
29         [Web GPU] Standardize Web GPU object reference counting and creation logic
30         https://bugs.webkit.org/show_bug.cgi?id=196183
31
32         Reviewed by Dean Jackson.
33
34         Make getters return raw refs/pointers and provide const versions if necessary.
35         All Web GPU objects are non-nullable, but become no-op if invalid, and descriptors are not moved unless needed.
36
37         No new tests; no change in behavior.
38
39         Getter updates and const qualifications:
40         * Modules/webgpu/WebGPUAdapter.h:
41         (WebCore::WebGPUAdapter::options const):
42         * Modules/webgpu/WebGPUBindGroup.h:
43         (WebCore::WebGPUBindGroup::bindGroup):
44         (WebCore::WebGPUBindGroup::bindGroup const): Deleted.
45         * Modules/webgpu/WebGPUBindGroupDescriptor.cpp:
46         (WebCore::WebGPUBindGroupDescriptor::tryCreateGPUBindGroupDescriptor const):
47         * Modules/webgpu/WebGPUBindGroupDescriptor.h:
48         * Modules/webgpu/WebGPUBindGroupLayout.h:
49         (WebCore::WebGPUBindGroupLayout::bindGroupLayout const):
50         * Modules/webgpu/WebGPUBuffer.h:
51         (WebCore::WebGPUBuffer::buffer):
52         (WebCore::WebGPUBuffer::buffer const):
53         * Modules/webgpu/WebGPURenderPassDescriptor.cpp:
54         (WebCore::WebGPURenderPassDescriptor::tryCreateGPURenderPassDescriptor const):
55         * Modules/webgpu/WebGPURenderPassEncoder.cpp:
56         (WebCore::WebGPURenderPassEncoder::setVertexBuffers):
57         * Modules/webgpu/WebGPUSampler.h:
58         (WebCore::WebGPUSampler::sampler const):
59         * Modules/webgpu/WebGPUSwapChain.h:
60         (WebCore::WebGPUSwapChain::swapChain):
61         (WebCore::WebGPUSwapChain::swapChain const): Deleted.
62         * Modules/webgpu/WebGPUTexture.h:
63         (WebCore::WebGPUTexture::texture):
64         (WebCore::WebGPUTexture::texture const): Deleted.
65         * Modules/webgpu/WebGPUTextureView.h:
66         (WebCore::WebGPUTextureView::texture):
67         (WebCore::WebGPUTextureView::texture const): Deleted.
68         * platform/graphics/gpu/GPUBindGroupBinding.h:
69         * platform/graphics/gpu/GPUBindGroupDescriptor.h:
70         * platform/graphics/gpu/cocoa/GPUBindGroupMetal.mm:
71         (WebCore::tryGetResourceAsMTLSamplerState):
72
73         Web GPU object creation logic:
74         * Modules/webgpu/WebGPUCommandEncoder.cpp:
75         (WebCore::WebGPUBufferCopyView::tryCreateGPUBufferCopyView const):
76         (WebCore::WebGPUTextureCopyView::tryCreateGPUTextureCopyView const):
77         (WebCore::WebGPUCommandEncoder::beginRenderPass):
78         (WebCore::WebGPUCommandEncoder::copyBufferToBuffer):
79         * Modules/webgpu/WebGPUCommandEncoder.h:
80         * Modules/webgpu/WebGPUDevice.cpp:
81         (WebCore::WebGPUDevice::createBuffer const):
82         (WebCore::WebGPUDevice::createTexture const):
83         (WebCore::WebGPUDevice::createPipelineLayout const):
84         (WebCore::WebGPUDevice::createBindGroup const):
85         (WebCore::WebGPUDevice::createShaderModule const):
86         (WebCore::WebGPUDevice::createRenderPipeline const):
87         (WebCore::WebGPUDevice::getQueue const):
88         * Modules/webgpu/WebGPUDevice.h:
89         * Modules/webgpu/WebGPUPipelineLayout.cpp:
90         (WebCore::WebGPUPipelineLayout::create):
91         (WebCore::WebGPUPipelineLayout::WebGPUPipelineLayout):
92         * Modules/webgpu/WebGPUPipelineLayout.h:
93         (WebCore::WebGPUPipelineLayout::pipelineLayout):
94         * Modules/webgpu/WebGPUPipelineLayoutDescriptor.cpp: 
95         (WebCore::WebGPUPipelineLayoutDescriptor::tryCreateGPUPipelineLayoutDescriptor const):
96         * Modules/webgpu/WebGPUPipelineLayoutDescriptor.h:
97         * Modules/webgpu/WebGPUQueue.cpp:
98         (WebCore::WebGPUQueue::create):
99         (WebCore::WebGPUQueue::WebGPUQueue):
100         (WebCore::WebGPUQueue::submit):
101         * Modules/webgpu/WebGPUQueue.h:
102         * Modules/webgpu/WebGPUShaderModule.cpp:
103         (WebCore::WebGPUShaderModule::create):
104         (WebCore::WebGPUShaderModule::WebGPUShaderModule):
105         * Modules/webgpu/WebGPUShaderModule.h:
106         (WebCore::WebGPUShaderModule::module const):
107         * platform/graphics/gpu/GPUBuffer.h:
108         * platform/graphics/gpu/GPUDevice.cpp:
109         (WebCore::GPUDevice::tryCreateBuffer):
110         (WebCore::GPUDevice::tryCreateTexture const):
111         (WebCore::GPUDevice::tryCreateShaderModule const):
112         (WebCore::GPUDevice::tryCreateRenderPipeline const):
113         (WebCore::GPUDevice::tryGetQueue const):
114         (WebCore::GPUDevice::createShaderModule const): Deleted.
115         (WebCore::GPUDevice::createRenderPipeline const): Deleted.
116         (WebCore::GPUDevice::getQueue const): Deleted.
117         * platform/graphics/gpu/GPUDevice.h:
118         * platform/graphics/gpu/GPUPipelineLayout.cpp:
119         (WebCore::GPUPipelineLayout::create):
120         (WebCore::GPUPipelineLayout::GPUPipelineLayout):
121         * platform/graphics/gpu/GPUPipelineLayout.h:
122         (WebCore::GPUPipelineLayout::bindGroupLayouts const):
123         * platform/graphics/gpu/GPUPipelineLayoutDescriptor.h:
124         * platform/graphics/gpu/GPURenderPipeline.h:
125         * platform/graphics/gpu/GPUShaderModule.h:
126         * platform/graphics/gpu/cocoa/GPUBufferMetal.mm:
127         (WebCore::GPUBuffer::tryCreate):
128         (WebCore::GPUBuffer::GPUBuffer):
129         (WebCore::GPUBuffer::setSubData):
130         * platform/graphics/gpu/cocoa/GPUCommandBufferMetal.mm:
131         (WebCore::GPUCommandBuffer::tryCreate):
132         * platform/graphics/gpu/cocoa/GPUDeviceMetal.mm:
133         (WebCore::GPUDevice::tryCreate):
134         * platform/graphics/gpu/cocoa/GPURenderPipelineMetal.mm:
135         (WebCore::GPURenderPipeline::tryCreate):
136         (WebCore::GPURenderPipeline::GPURenderPipeline):
137         (WebCore::GPURenderPipeline::create): Deleted.
138         * platform/graphics/gpu/cocoa/GPUShaderModuleMetal.mm:
139         (WebCore::GPUShaderModule::tryCreate):
140         (WebCore::GPUShaderModule::create): Deleted.
141
142         Add WebGPUPipelineLayoutDescriptor.cpp to project:
143         * Sources.txt:
144         * WebCore.xcodeproj/project.pbxproj:
145         
146 2019-03-27  Shawn Roberts  <sroberts@apple.com>
147
148         Unreviewed, rolling out r243346.
149
150         Causing timeouts in animation tests across 10 builds
151
152         Reverted changeset:
153
154         "[Web Animations] JS wrapper may be deleted while animation is
155         yet to dispatch its finish event"
156         https://bugs.webkit.org/show_bug.cgi?id=196118
157         https://trac.webkit.org/changeset/243346
158
159 2019-03-27  Zalan Bujtas  <zalan@apple.com>
160
161         [ContentChangeObserver] Stop using the global _WKContentChange
162         https://bugs.webkit.org/show_bug.cgi?id=196288
163         <rdar://problem/49228081>
164
165         Reviewed by Simon Fraser.
166
167         This patch ensures that activities on frames don't overwrite the observed state on other frames.  
168         (Unfortunately the global variable is still used in WebKitLegacy (see webkit.org/b/196286)).
169
170         Tests: fast/events/touch/ios/content-observation/remove-subframe-while-observing.html
171                fast/events/touch/ios/content-observation/subframe.html
172
173         * page/ios/ContentChangeObserver.cpp:
174         (WebCore::ContentChangeObserver::observedContentChange const): Deleted.
175         * page/ios/ContentChangeObserver.h:
176         (WebCore::ContentChangeObserver::observedContentChange const):
177         (WebCore::ContentChangeObserver::setHasNoChangeState):
178         (WebCore::ContentChangeObserver::setHasIndeterminateState):
179         (WebCore::ContentChangeObserver::setHasVisibleChangeState):
180         (WebCore::ContentChangeObserver::setObservedContentState):
181
182 2019-03-27  Said Abou-Hallawa  <sabouhallawa@apple.com>
183
184         Remove the SVG tear off objects for SVGPathSeg, SVGPathSegList and SVGAnimatedPathSegList
185         https://bugs.webkit.org/show_bug.cgi?id=196085
186
187         Reviewed by Simon Fraser.
188
189         The SVGPathSegList is similar to the other SVGLists, e.g. SVGNUmberList
190         and SVGPointList except in two things:
191
192         1. Its items can be different but they are derived from the same base 
193            class SVGPathSeg.
194
195         2. The SVGPathSeg items are only used for DOM. When drawing or animating
196            we have to have an SVGPathByteStream and convert it to a Path. Converting
197            an SVGPathByteStream to SVGPathSeg items and vice versa is expensive.
198            Building a Path from an SVGPathByteStream is also expensive. So an extra
199            care needs to be taken for when these conversions happen.
200
201         In addition to handling the SVGPathSeg items, SVGPathSegList will manage
202         the associated SVGPathByteStream and Path objects. SVGPathSegList will be
203         lazy in getting updated objects when a change happens. For example, when
204         the byte stream changes, SVGPathSegList will clear its items and nullify
205         the Path object. But it will not build any of them until they are explicitly
206         requested.
207
208         Like what was done for other SVG properties when removing their tear off
209         objects, a new accessor, a new animator and a new animation function will
210         be added for the SVGAnimatedPathSegList.
211
212         All the header files of the concrete classes of SVGPathSeg will be removed
213         because they are small structures which hold some data items and they provide
214         setters and getters for these items. Here is the new file structures and
215         their contents:
216
217         -- SVGPathSeg.h still has the class SVGPathSeg which is now a superclass
218            of SVGProperty. 
219
220         -- SVGPathSegValue.h will have the template class SVGPathSegValue which 
221            holds an std::tuple of packed arguments. It provides setters and getters
222            for these arguments. SVGPathSegValue.h will also have specialized 
223            classed derived from SVGPathSegValue and hold different arguments.
224
225         -- SVGPathSegImpl.h will have the final concrete SVGPathSeg classes.
226
227         Note SVGPathSeg concrete classes do not need to have a reference to the
228         the context SVGPathElement. SVGPathSeg will be owned by its SVGPathSegList
229         which will be owned by the SVGAnimatedPathSegList which will be owned by
230         the SVGPathElement.
231
232         * Sources.txt:
233         * WebCore.xcodeproj/project.pbxproj:
234         * bindings/js/JSSVGPathSegCustom.cpp:
235         * bindings/scripts/CodeGenerator.pm:
236         (IsSVGPathSegTypeName):
237         (IsSVGPathSegType):
238         * bindings/scripts/CodeGeneratorJS.pm:
239         (GenerateHeader):
240         * rendering/svg/SVGPathData.cpp:
241         (WebCore::pathFromPathElement):
242         * svg/SVGAnimatedPath.cpp: Removed.
243         * svg/SVGAnimatedPath.h: Removed.
244         * svg/SVGAnimatedType.h:
245         (WebCore::SVGAnimatedType::type const):
246         * svg/SVGAnimatorFactory.h:
247         (WebCore::SVGAnimatorFactory::create):
248         * svg/SVGPathByteStream.h:
249         (WebCore::SVGPathByteStream::SVGPathByteStream):
250         This constructor is used by SVGAnimationPathSegListFunction to convert
251         the 'form', 'to' and 'toAtEndOfDuration' strings to SVGPathByteStreams.
252
253         (WebCore::SVGPathByteStream::resize): Deleted.
254         (WebCore::SVGPropertyTraits<SVGPathByteStream>::initialValue): Deleted.
255         (WebCore::SVGPropertyTraits<SVGPathByteStream>::fromString): Deleted.
256         (WebCore::SVGPropertyTraits<SVGPathByteStream>::parse): Deleted.
257         (WebCore::SVGPropertyTraits<SVGPathByteStream>::toString): Deleted.
258         * svg/SVGPathElement.cpp:
259         (WebCore::SVGPathElement::SVGPathElement):
260         (WebCore::SVGPathElement::parseAttribute):
261         (WebCore::SVGPathElement::svgAttributeChanged):
262         (WebCore::SVGPathElement::getTotalLength const):
263         (WebCore::SVGPathElement::getPointAtLength const):
264         (WebCore::SVGPathElement::getPathSegAtLength const):
265         (WebCore::SVGPathElement::createSVGPathSegClosePath): Deleted.
266         (WebCore::SVGPathElement::createSVGPathSegMovetoAbs): Deleted.
267         (WebCore::SVGPathElement::createSVGPathSegMovetoRel): Deleted.
268         (WebCore::SVGPathElement::createSVGPathSegLinetoAbs): Deleted.
269         (WebCore::SVGPathElement::createSVGPathSegLinetoRel): Deleted.
270         (WebCore::SVGPathElement::createSVGPathSegCurvetoCubicAbs): Deleted.
271         (WebCore::SVGPathElement::createSVGPathSegCurvetoCubicRel): Deleted.
272         (WebCore::SVGPathElement::createSVGPathSegCurvetoQuadraticAbs): Deleted.
273         (WebCore::SVGPathElement::createSVGPathSegCurvetoQuadraticRel): Deleted.
274         (WebCore::SVGPathElement::createSVGPathSegArcAbs): Deleted.
275         (WebCore::SVGPathElement::createSVGPathSegArcRel): Deleted.
276         (WebCore::SVGPathElement::createSVGPathSegLinetoHorizontalAbs): Deleted.
277         (WebCore::SVGPathElement::createSVGPathSegLinetoHorizontalRel): Deleted.
278         (WebCore::SVGPathElement::createSVGPathSegLinetoVerticalAbs): Deleted.
279         (WebCore::SVGPathElement::createSVGPathSegLinetoVerticalRel): Deleted.
280         (WebCore::SVGPathElement::createSVGPathSegCurvetoCubicSmoothAbs): Deleted.
281         (WebCore::SVGPathElement::createSVGPathSegCurvetoCubicSmoothRel): Deleted.
282         (WebCore::SVGPathElement::createSVGPathSegCurvetoQuadraticSmoothAbs): Deleted.
283         (WebCore::SVGPathElement::createSVGPathSegCurvetoQuadraticSmoothRel): Deleted.
284         The SVGPathSeg creation functions are moved to the header file.
285
286         (WebCore::SVGPathElement::registerAttributes): Deleted.
287         (WebCore::SVGPathElement::pathByteStream const): Deleted.
288         (WebCore::SVGPathElement::pathForByteStream const): Deleted.
289         (WebCore::SVGPathElement::lookupOrCreateDWrapper): Deleted.
290         (WebCore::SVGPathElement::animatedPropertyWillBeDeleted): Deleted.
291         (WebCore::SVGPathElement::pathSegList): Deleted.
292         (WebCore::SVGPathElement::normalizedPathSegList): Deleted.
293         (WebCore::SVGPathElement::animatedPathSegList): Deleted.
294         (WebCore::SVGPathElement::animatedNormalizedPathSegList): Deleted.
295         (WebCore::SVGPathElement::approximateMemoryCost const): Deleted.
296         (WebCore::SVGPathElement::pathSegListChanged): Deleted.
297         Managing the SVGPathByteStream and the drawing Path objects will be the
298         responsibility of SVGPathSegList.
299
300         * svg/SVGPathElement.h:
301         * svg/SVGPathSeg.h:
302         * svg/SVGPathSegArc.h: Removed.
303         * svg/SVGPathSegArcAbs.h: Removed.
304         * svg/SVGPathSegArcRel.h: Removed.
305         * svg/SVGPathSegClosePath.h: Removed.
306         * svg/SVGPathSegCurvetoCubic.h: Removed.
307         * svg/SVGPathSegCurvetoCubicAbs.h: Removed.
308         * svg/SVGPathSegCurvetoCubicRel.h: Removed.
309         * svg/SVGPathSegCurvetoCubicSmooth.h: Removed.
310         * svg/SVGPathSegCurvetoCubicSmoothAbs.h: Removed.
311         * svg/SVGPathSegCurvetoCubicSmoothRel.h: Removed.
312         * svg/SVGPathSegCurvetoQuadratic.h: Removed.
313         * svg/SVGPathSegCurvetoQuadraticAbs.h: Removed.
314         * svg/SVGPathSegCurvetoQuadraticRel.h: Removed.
315         * svg/SVGPathSegCurvetoQuadraticSmoothAbs.h: Removed.
316         * svg/SVGPathSegCurvetoQuadraticSmoothRel.h: Removed.
317         * svg/SVGPathSegImpl.h: Added.
318         * svg/SVGPathSegLinetoAbs.h: Removed.
319         * svg/SVGPathSegLinetoHorizontal.h: Removed.
320         * svg/SVGPathSegLinetoHorizontalAbs.h: Removed.
321         * svg/SVGPathSegLinetoHorizontalRel.h: Removed.
322         * svg/SVGPathSegLinetoRel.h: Removed.
323         * svg/SVGPathSegLinetoVertical.h: Removed.
324         * svg/SVGPathSegLinetoVerticalAbs.h: Removed.
325         * svg/SVGPathSegLinetoVerticalRel.h: Removed.
326         The definition of these classes are now in SVGPathSegImpl.h.
327
328         * svg/SVGPathSegList.cpp: Removed.
329         * svg/SVGPathSegList.h:
330         * svg/SVGPathSegListBuilder.cpp:
331         (WebCore::SVGPathSegListBuilder::SVGPathSegListBuilder):
332         (WebCore::SVGPathSegListBuilder::moveTo):
333         (WebCore::SVGPathSegListBuilder::lineTo):
334         (WebCore::SVGPathSegListBuilder::lineToHorizontal):
335         (WebCore::SVGPathSegListBuilder::lineToVertical):
336         (WebCore::SVGPathSegListBuilder::curveToCubic):
337         (WebCore::SVGPathSegListBuilder::curveToCubicSmooth):
338         (WebCore::SVGPathSegListBuilder::curveToQuadratic):
339         (WebCore::SVGPathSegListBuilder::curveToQuadraticSmooth):
340         (WebCore::SVGPathSegListBuilder::arcTo):
341         (WebCore::SVGPathSegListBuilder::closePath):        
342         * svg/SVGPathSegListBuilder.h:
343         The concrete SVGPathSeg classes can now create instances of their classes
344         without having to go through the SVGPathElement.
345
346         * svg/SVGPathSegListSource.cpp:
347         (WebCore::SVGPathSegListSource::SVGPathSegListSource):
348         * svg/SVGPathSegListSource.h:
349         * svg/SVGPathSegListValues.cpp: Removed.
350         * svg/SVGPathSegListValues.h: Removed.
351         * svg/SVGPathSegMovetoAbs.h: Removed.
352         * svg/SVGPathSegMovetoRel.h: Removed.
353         * svg/SVGPathSegValue.h: Added.
354         (WebCore::SVGPathSegValue::create):
355         (WebCore::SVGPathSegValue::clone const):
356         (WebCore::SVGPathSegValue::SVGPathSegValue):
357         (WebCore::SVGPathSegValue::argument const):
358         (WebCore::SVGPathSegValue::setArgument):
359         (WebCore::SVGPathSegLinetoHorizontal::x const):
360         (WebCore::SVGPathSegLinetoHorizontal::setX):
361         (WebCore::SVGPathSegLinetoVertical::y const):
362         (WebCore::SVGPathSegLinetoVertical::setY):
363         (WebCore::SVGPathSegSingleCoordinate::x const):
364         (WebCore::SVGPathSegSingleCoordinate::setX):
365         (WebCore::SVGPathSegSingleCoordinate::y const):
366         (WebCore::SVGPathSegSingleCoordinate::setY):
367         (WebCore::SVGPathSegCurvetoQuadratic::x const):
368         (WebCore::SVGPathSegCurvetoQuadratic::setX):
369         (WebCore::SVGPathSegCurvetoQuadratic::y const):
370         (WebCore::SVGPathSegCurvetoQuadratic::setY):
371         (WebCore::SVGPathSegCurvetoQuadratic::x1 const):
372         (WebCore::SVGPathSegCurvetoQuadratic::setX1):
373         (WebCore::SVGPathSegCurvetoQuadratic::y1 const):
374         (WebCore::SVGPathSegCurvetoQuadratic::setY1):
375         (WebCore::SVGPathSegCurvetoCubicSmooth::x const):
376         (WebCore::SVGPathSegCurvetoCubicSmooth::setX):
377         (WebCore::SVGPathSegCurvetoCubicSmooth::y const):
378         (WebCore::SVGPathSegCurvetoCubicSmooth::setY):
379         (WebCore::SVGPathSegCurvetoCubicSmooth::x2 const):
380         (WebCore::SVGPathSegCurvetoCubicSmooth::setX2):
381         (WebCore::SVGPathSegCurvetoCubicSmooth::y2 const):
382         (WebCore::SVGPathSegCurvetoCubicSmooth::setY2):
383         (WebCore::SVGPathSegCurvetoCubic::x const):
384         (WebCore::SVGPathSegCurvetoCubic::setX):
385         (WebCore::SVGPathSegCurvetoCubic::y const):
386         (WebCore::SVGPathSegCurvetoCubic::setY):
387         (WebCore::SVGPathSegCurvetoCubic::x1 const):
388         (WebCore::SVGPathSegCurvetoCubic::setX1):
389         (WebCore::SVGPathSegCurvetoCubic::y1 const):
390         (WebCore::SVGPathSegCurvetoCubic::setY1):
391         (WebCore::SVGPathSegCurvetoCubic::x2 const):
392         (WebCore::SVGPathSegCurvetoCubic::setX2):
393         (WebCore::SVGPathSegCurvetoCubic::y2 const):
394         (WebCore::SVGPathSegCurvetoCubic::setY2):
395         (WebCore::SVGPathSegArc::x const):
396         (WebCore::SVGPathSegArc::setX):
397         (WebCore::SVGPathSegArc::y const):
398         (WebCore::SVGPathSegArc::setY):
399         (WebCore::SVGPathSegArc::r1 const):
400         (WebCore::SVGPathSegArc::setR1):
401         (WebCore::SVGPathSegArc::r2 const):
402         (WebCore::SVGPathSegArc::setR2):
403         (WebCore::SVGPathSegArc::angle const):
404         (WebCore::SVGPathSegArc::setAngle):
405         (WebCore::SVGPathSegArc::largeArcFlag const):
406         (WebCore::SVGPathSegArc::setLargeArcFlag):
407         (WebCore::SVGPathSegArc::sweepFlag const):
408         (WebCore::SVGPathSegArc::setSweepFlag):
409         * svg/SVGPathSegWithContext.h: Removed.
410
411         * svg/SVGPathUtilities.cpp:
412         (WebCore::buildSVGPathByteStreamFromSVGPathSegList):
413         (WebCore::buildSVGPathSegListFromByteStream):
414         (WebCore::buildStringFromByteStream):
415         (WebCore::buildSVGPathByteStreamFromSVGPathSegListValues): Deleted.
416         (WebCore::appendSVGPathByteStreamFromSVGPathSeg): Deleted.
417         (WebCore::buildSVGPathSegListValuesFromByteStream): Deleted.
418         (WebCore::buildStringFromSVGPathSegListValues): Deleted.
419         * svg/SVGPathUtilities.h:
420         Since the class SVGPathSegListValues is removed, all the parsing functions
421         have now to deal with SVGPathSegList directly.
422
423         * svg/SVGPoint.h:
424         * svg/SVGValue.h:
425         * svg/properties/SVGAnimatedPathSegListPropertyTearOff.cpp: Removed.
426         * svg/properties/SVGAnimatedPathSegListPropertyTearOff.h: Removed.
427         * svg/properties/SVGAnimatedPropertyAccessorImpl.h:
428         * svg/properties/SVGAnimatedPropertyAnimatorImpl.h:
429         * svg/properties/SVGAnimatedPropertyImpl.h:
430         (WebCore::SVGAnimatedPathSegList::create):
431         (WebCore::SVGAnimatedPathSegList::currentPathByteStream):
432         (WebCore::SVGAnimatedPathSegList::currentPath):
433         (WebCore::SVGAnimatedPathSegList::approximateMemoryCost const):
434         Provides an easy way to access the current SVGPathByteStream and Path
435         objects from the SVGAnimatedPathSegList.
436
437         * svg/properties/SVGAnimationAdditiveValueFunctionImpl.h:
438         (WebCore::SVGAnimationPathSegListFunction::progress):
439         * svg/properties/SVGPropertyOwnerRegistry.h:
440         (WebCore::SVGPropertyOwnerRegistry::registerProperty):
441
442 2019-03-27  Ryan Haddad  <ryanhaddad@apple.com>
443
444         AVAudioSessionRouteSharingPolicyLongForm has been deprecated
445         https://bugs.webkit.org/show_bug.cgi?id=196301
446
447         Unrereivewed build fix.
448
449         * platform/audio/ios/AudioSessionIOS.mm:
450         (WebCore::AudioSession::setCategory):
451         (WebCore::AudioSession::routeSharingPolicy const):
452
453 2019-03-27  Chris Dumez  <cdumez@apple.com>
454
455         XMLHttpRequestUpload's loadstart event not correct initialized
456         https://bugs.webkit.org/show_bug.cgi?id=196174
457         <rdar://problem/49191412>
458
459         Reviewed by Alex Christensen.
460
461         Align progress event firing with the XHR specification.
462
463         No new tests, rebaselined existing tests.
464
465         * xml/XMLHttpRequest.cpp:
466         (WebCore::XMLHttpRequest::createRequest):
467         As per [1], the loadstart event fired on the XMLHttpRequestUpload object should use
468         loaded=0 and total=`req’s body’s total bytes`.
469         [1] https://xhr.spec.whatwg.org/#the-send()-method (step 11.2.)
470
471         (WebCore::XMLHttpRequest::didSendData):
472         As per [2], the progress / load / loadend should use loaded=transmitted and total=length.
473         [2] https://xhr.spec.whatwg.org/#ref-for-process-request-end-of-body (steps 5, 6 and 7)
474
475         (WebCore::XMLHttpRequest::didReceiveData):
476         As per [3], we should fire the readystatechange event *before* the progress event.
477         This is covered by web-platform-tests/xhr/send-response-event-order.htm which was failing
478         differently after the other changes in this patch.
479         [3] https://xhr.spec.whatwg.org/#ref-for-process-response (steps 9.4 and 9.5)
480
481         (WebCore::XMLHttpRequest::dispatchErrorEvents):
482         As per [4], in case of an error, we should fire the provided 'event' and 'loadend' with
483         loaded=0 and total=0.
484         [4] https://xhr.spec.whatwg.org/#request-error-steps (steps 7 and 8)
485
486         * xml/XMLHttpRequestUpload.cpp:
487         (WebCore::XMLHttpRequestUpload::dispatchProgressEvent):
488         * xml/XMLHttpRequestUpload.h:
489         Simplify XMLHttpRequestUpload. It no longer needs to store loaded / total as data
490         members now that they are always passed by the call site. lengthComputable is set
491         to !!total as [5] says to set it to true if length/total is not 0. 
492         [5] https://xhr.spec.whatwg.org/#concept-event-fire-progress
493
494 2019-03-27  Simon Fraser  <simon.fraser@apple.com>
495
496         REGRESSION (r242687): Fullscreen YouTube videos show blank white space at top
497         https://bugs.webkit.org/show_bug.cgi?id=196304
498         rdar://problem/49175760
499
500         Reviewed by Zalan Bujtas.
501
502         repositionRelatedLayers() should not short-circuit when topContentInset is zero,
503         because topContentInset might be changing from non-zero to zero, and then we need
504         to move layers around.
505
506         Test: scrollingcoordinator/mac/top-content-inset-to-zero.html
507
508         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
509         (WebCore::ScrollingTreeFrameScrollingNodeMac::repositionRelatedLayers):
510
511 2019-03-26  Simon Fraser  <simon.fraser@apple.com>
512
513         [iOS WK2] Fixed elements in frames can be misplaced sometimes
514         https://bugs.webkit.org/show_bug.cgi?id=196290
515
516         Reviewed by Frédéric Wang.
517
518         In a page containing position:fixed inside an async-scrolling iframe, if the 
519         main page is scrolled down, and you reload, then the fixed element in the iframe can
520         get misplaced or disappear.
521
522         The bug was that the reconcileViewportConstrainedLayerPositions() recursive state node
523         walk would cross frame boundaries, hitting subframe ScrollingStateFixedNodes with a viewport rect
524         for the main page.
525
526         Fix by giving ScrollingStateTree the responsibility for the recursive tree walk, and
527         have it bail at at frame boundaries.
528
529         Test: scrollingcoordinator/ios/fixed-in-frame-layer-reconcile-layer-position.html
530
531         * page/scrolling/AsyncScrollingCoordinator.cpp:
532         (WebCore::AsyncScrollingCoordinator::reconcileViewportConstrainedLayerPositions):
533         * page/scrolling/ScrollingStateFixedNode.cpp:
534         (WebCore::ScrollingStateFixedNode::reconcileLayerPositionForViewportRect):
535         * page/scrolling/ScrollingStateNode.cpp:
536         (WebCore::ScrollingStateNode::reconcileLayerPositionForViewportRect): Deleted.
537         * page/scrolling/ScrollingStateNode.h:
538         (WebCore::ScrollingStateNode::reconcileLayerPositionForViewportRect):
539         * page/scrolling/ScrollingStateStickyNode.cpp:
540         (WebCore::ScrollingStateStickyNode::reconcileLayerPositionForViewportRect):
541         * page/scrolling/ScrollingStateTree.cpp:
542         (WebCore::ScrollingStateTree::reconcileLayerPositionsRecursive):
543         (WebCore::ScrollingStateTree::reconcileViewportConstrainedLayerPositions):
544         * page/scrolling/ScrollingStateTree.h:
545
546 2019-03-27  Philippe Normand  <pnormand@igalia.com>
547
548         Build failure with gstreamer 1.12.5 if USE_GSTREAMER_GL is enabled
549         https://bugs.webkit.org/show_bug.cgi?id=196178
550
551         Reviewed by Xabier Rodriguez-Calvar.
552
553         The gst/gl/gl.h header needs to be included before
554         GraphicsContext3D.h to avoid declaration conflicts with
555         OpenGLShims.
556
557         Based on a patch from Mike Gorse <mgorse@suse.com>
558
559         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
560         (WebCore::GstVideoFrameHolder::GstVideoFrameHolder):
561
562 2019-03-27  Philippe Normand  <pnormand@igalia.com>
563
564         [GStreamer] Remove the HLS queue buffering query hack
565         https://bugs.webkit.org/show_bug.cgi?id=196244
566
567         Reviewed by Xabier Rodriguez-Calvar.
568
569         Because the http src element now provides network statistics to
570         the player we can now compute an estimation of the data loading in
571         case the buffering query isn't handled by any element of the
572         pipeline.
573
574         No new tests, existing HLS tests cover this change.
575
576         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
577         (WebCore::MediaPlayerPrivateGStreamer::fillTimerFired):
578         (WebCore::findHLSQueue): Deleted.
579         (WebCore::isHLSProgressing): Deleted.
580
581 2019-03-26  Said Abou-Hallawa  <sabouhallawa@apple.com>
582
583         Unreviewed Windows build fix
584         https://bugs.webkit.org/show_bug.cgi?id=196083
585         <rdar://problem/49121836>
586
587         * svg/SVGAnimatorFactory.h:
588         (WebCore::SVGAnimatorFactory::isSupportedAttributeType):
589
590 2019-03-26  Wenson Hsieh  <wenson_hsieh@apple.com>
591
592         [Cocoa] Refactor some helper functions for building UserAgent strings
593         https://bugs.webkit.org/show_bug.cgi?id=195990
594
595         Reviewed by Brent Fulgham.
596
597         Add an optional argument to standardUserAgentWithApplicationName to request the desktop version of the user
598         agent in Cocoa platforms. Work towards refactoring some codepaths to make the implementation of the "Request
599         Desktop Site" feature in Safari a bit more straightforward.
600
601         No change in behavior.
602
603         * platform/UserAgent.h:
604         * platform/ios/UserAgentIOS.mm:
605         (WebCore::standardUserAgentWithApplicationName):
606
607         The corresponding macOS version is currently hard-coded — the followup bug webkit.org/b/196275 tracks making
608         this dynamically fetch the paired macOS version when building for iOS.
609
610         * platform/mac/UserAgentMac.mm:
611         (WebCore::standardUserAgentWithApplicationName):
612
613 2019-03-26  Said Abou-Hallawa  <said@apple.com>
614
615         Remove the SVG tear off objects for SVGLength, SVGLengthList and SVGAnimatedLengthList
616         https://bugs.webkit.org/show_bug.cgi?id=196083
617
618         Reviewed by Simon Fraser.
619
620         -- SVGLength will be a superclass of SVGValueProperty<SVGLengthValue>. It
621            is a wrapper of SVGLengthValue. It will be provide the DOM methods. It
622            can setValueAsString() and return valueAsString().
623
624         -- SVGLengthList will be a superclass of SVGValuePropertyList<SVGLength>.
625            The base class will provide all the DOM methods. SVGLengthList will be
626            responsible for parsing a String to a SVGLength items. It can also 
627            build a string representing the stored items.
628
629         -- SVGAnimatedLengthList will be defined as SVGAnimatedPropertyList<SVGLengthList>.
630            Like SVGAnimatedPointList, all the required methods and attributes
631            will be handled by SVGAnimatedPropertyList.
632
633         -- SVGAnimatedLengthAccessor and SVGAnimatedLengthListAccessor will be
634            added to access the members of types SVGAnimatedLength and 
635            SVGAnimatedLengthList.
636
637         -- SVGAnimatedLengthAnimator and SVGAnimatedLengthListAnimator will be
638            created by the the new accessors to animate attributes of types
639            SVGAnimatedLength and SVGAnimatedLengthList.
640
641         -- SVGAnimationLengthFunction and SVGAnimationLengthListFunction will be
642            responsible for progressing the animVal() of attributes of types
643            SVGAnimatedLength and SVGAnimatedLengthList.
644
645         -- SVGValuePropertyAnimator is a new template class which can animate a
646            none reflecting attribute which should be backed by a value property,
647            e.g. SVGLength.
648
649         -- SVGValuePropertyListAnimator is a new template class which can animate a
650            none reflecting attribute which should be backed by a value property
651            list, e.g. SVGLengthList.
652
653         Notes:
654
655             -- SVGElement::isAnimatedStyleAttribute() will return true if the
656                attribute is known by SVGPropertyAnimatorFactory. Or it's has 
657                a reflecting SVGAnimatedPropertyLength property and its name is
658                one of the names listed in isAnimatedStylePropertyAttribute() of
659                the propertyRegistry() of the SVGElement.
660
661             -- SVGElement::commitPropertyChange() has to handle the attributes
662                for which isAnimatedStylePropertyAttribute() returns true different
663                from the other ones. styleReclac() needs updated attributes since
664                it does not access the reflecting properties in the SVGELement.
665
666             -- SVGTextContentElement does not need a customized SVGAnimatedLength.
667                All SVGTextContentElement::textLengthAnimated() needs to know is
668                whether m_textLength->baseVal() holds an empty SVGLength. If it
669                does, it sets its value to getComputedTextLength().
670
671         * Sources.txt:
672         * WebCore.xcodeproj/project.pbxproj:
673         * rendering/svg/SVGTextLayoutAttributesBuilder.cpp:
674         (WebCore::updateCharacterData):
675         (WebCore::SVGTextLayoutAttributesBuilder::fillCharacterDataMap):
676         * svg/SVGAnimateElementBase.cpp:
677         (WebCore::SVGAnimateElementBase::hasValidAttributeType const):
678         * svg/SVGAnimatedLength.cpp: Removed.
679         * svg/SVGAnimatedLength.h: Removed.
680         * svg/SVGAnimatedLengthList.cpp: Removed.
681         * svg/SVGAnimatedLengthList.h: Removed.
682         * svg/SVGAnimatedType.h:
683         (WebCore::SVGAnimatedType::type const):
684         * svg/SVGAnimationElement.cpp:
685         (WebCore::SVGAnimationElement::isTargetAttributeCSSProperty):
686         (WebCore::inheritsFromProperty):
687         * svg/SVGAnimatorFactory.h:
688         (WebCore::SVGAnimatorFactory::isSupportedAttribute):
689         (WebCore::SVGAnimatorFactory::create):
690         These changes were required because some of the tests were trying to
691         animated unsupported attributes. To differentiate between between the
692         these two cases:
693             1) the attribute is animate-able by the legacy controller.
694             2) animating the attribute or the attribute itself is not supported
695                by the element.
696
697         We want SVGAnimatorFactory tell us whether it can create an animator for
698         a given attribute or not.
699
700         * svg/SVGCircleElement.cpp:
701         (WebCore::SVGCircleElement::SVGCircleElement):
702         (WebCore::SVGCircleElement::parseAttribute):
703         (WebCore::SVGCircleElement::svgAttributeChanged):
704         (WebCore::SVGCircleElement::registerAttributes): Deleted.
705         * svg/SVGCircleElement.h:
706         * svg/SVGCursorElement.cpp:
707         (WebCore::SVGCursorElement::SVGCursorElement):
708         (WebCore::SVGCursorElement::parseAttribute):
709         (WebCore::SVGCursorElement::svgAttributeChanged):
710         (WebCore::SVGCursorElement::registerAttributes): Deleted.
711         * svg/SVGCursorElement.h:
712         * svg/SVGElement.cpp:
713         (WebCore::SVGElement::commitPropertyChange):
714         (WebCore::SVGElement::isAnimatedStyleAttribute const):
715         * svg/SVGElement.h:
716         * svg/SVGEllipseElement.cpp:
717         (WebCore::SVGEllipseElement::SVGEllipseElement):
718         (WebCore::SVGEllipseElement::parseAttribute):
719         (WebCore::SVGEllipseElement::svgAttributeChanged):
720         (WebCore::SVGEllipseElement::registerAttributes): Deleted.
721         * svg/SVGEllipseElement.h:
722         * svg/SVGFilterElement.cpp:
723         (WebCore::SVGFilterElement::SVGFilterElement):
724         (WebCore::SVGFilterElement::registerAttributes):
725         (WebCore::SVGFilterElement::parseAttribute):
726         * svg/SVGFilterElement.h:
727         * svg/SVGFilterPrimitiveStandardAttributes.cpp:
728         (WebCore::SVGFilterPrimitiveStandardAttributes::SVGFilterPrimitiveStandardAttributes):
729         (WebCore::SVGFilterPrimitiveStandardAttributes::parseAttribute):
730         (WebCore::SVGFilterPrimitiveStandardAttributes::registerAttributes): Deleted.
731         * svg/SVGFilterPrimitiveStandardAttributes.h:
732         (WebCore::SVGFilterPrimitiveStandardAttributes::x const):
733         (WebCore::SVGFilterPrimitiveStandardAttributes::y const):
734         (WebCore::SVGFilterPrimitiveStandardAttributes::width const):
735         (WebCore::SVGFilterPrimitiveStandardAttributes::height const):
736         (WebCore::SVGFilterPrimitiveStandardAttributes::xAnimated):
737         (WebCore::SVGFilterPrimitiveStandardAttributes::yAnimated):
738         (WebCore::SVGFilterPrimitiveStandardAttributes::widthAnimated):
739         (WebCore::SVGFilterPrimitiveStandardAttributes::heightAnimated):
740         (WebCore::SVGFilterPrimitiveStandardAttributes::isKnownAttribute): Deleted.
741         * svg/SVGForeignObjectElement.cpp:
742         (WebCore::SVGForeignObjectElement::SVGForeignObjectElement):
743         (WebCore::SVGForeignObjectElement::parseAttribute):
744         (WebCore::SVGForeignObjectElement::registerAttributes): Deleted.
745         * svg/SVGForeignObjectElement.h:
746         * svg/SVGImageElement.cpp:
747         (WebCore::SVGImageElement::SVGImageElement):
748         (WebCore::SVGImageElement::parseAttribute):
749         (WebCore::SVGImageElement::registerAttributes): Deleted.
750         * svg/SVGImageElement.h:
751         * svg/SVGLength.h:
752         (WebCore::SVGLength::create):
753         (WebCore::SVGLength::clone const):
754         (WebCore::SVGLength::unitType):
755         (WebCore::SVGLength::valueForBindings):
756         (WebCore::SVGLength::setValueForBindings):
757         (WebCore::SVGLength::valueInSpecifiedUnits):
758         (WebCore::SVGLength::setValueInSpecifiedUnits):
759         (WebCore::SVGLength::setValueAsString):
760         (WebCore::SVGLength::newValueSpecifiedUnits):
761         (WebCore::SVGLength::convertToSpecifiedUnits):
762         (WebCore::SVGLength::valueAsString): Deleted.
763         (WebCore::SVGLength::SVGLength): Deleted.
764         * svg/SVGLengthList.h:
765         (WebCore::SVGLengthList::create):
766         (WebCore::SVGLengthList::lengthMode const):
767         (WebCore::SVGLengthList::parse):
768         (WebCore::SVGLengthList::SVGLengthList):
769         * svg/SVGLengthListValues.cpp: Removed.
770         * svg/SVGLengthListValues.h: Removed.
771         * svg/SVGLineElement.cpp:
772         (WebCore::SVGLineElement::SVGLineElement):
773         (WebCore::SVGLineElement::parseAttribute):
774         (WebCore::SVGLineElement::svgAttributeChanged):
775         (WebCore::SVGLineElement::registerAttributes): Deleted.
776         * svg/SVGLineElement.h:
777         * svg/SVGLinearGradientElement.cpp:
778         (WebCore::SVGLinearGradientElement::SVGLinearGradientElement):
779         (WebCore::SVGLinearGradientElement::parseAttribute):
780         (WebCore::SVGLinearGradientElement::svgAttributeChanged):
781         (WebCore::SVGLinearGradientElement::registerAttributes): Deleted.
782         * svg/SVGLinearGradientElement.h:
783         * svg/SVGMarkerElement.cpp:
784         (WebCore::SVGMarkerElement::SVGMarkerElement):
785         (WebCore::SVGMarkerElement::registerAttributes):
786         (WebCore::SVGMarkerElement::parseAttribute):
787         * svg/SVGMarkerElement.h:
788         * svg/SVGMaskElement.cpp:
789         (WebCore::SVGMaskElement::SVGMaskElement):
790         (WebCore::SVGMaskElement::registerAttributes):
791         (WebCore::SVGMaskElement::parseAttribute):
792         (WebCore::SVGMaskElement::svgAttributeChanged):
793         * svg/SVGMaskElement.h:
794         * svg/SVGPatternElement.cpp:
795         (WebCore::SVGPatternElement::SVGPatternElement):
796         (WebCore::SVGPatternElement::registerAttributes):
797         (WebCore::SVGPatternElement::parseAttribute):
798         * svg/SVGPatternElement.h:
799         * svg/SVGPoint.h:
800         * svg/SVGRadialGradientElement.cpp:
801         (WebCore::SVGRadialGradientElement::SVGRadialGradientElement):
802         (WebCore::SVGRadialGradientElement::parseAttribute):
803         (WebCore::SVGRadialGradientElement::svgAttributeChanged):
804         (WebCore::SVGRadialGradientElement::registerAttributes): Deleted.
805         * svg/SVGRadialGradientElement.h:
806         * svg/SVGRectElement.cpp:
807         (WebCore::SVGRectElement::SVGRectElement):
808         (WebCore::SVGRectElement::parseAttribute):
809         (WebCore::SVGRectElement::svgAttributeChanged):
810         (WebCore::SVGRectElement::registerAttributes): Deleted.
811         * svg/SVGRectElement.h:
812         * svg/SVGSVGElement.cpp:
813         (WebCore::SVGSVGElement::SVGSVGElement):
814         (WebCore::SVGSVGElement::parseAttribute):
815         (WebCore::SVGSVGElement::svgAttributeChanged):
816         (WebCore::SVGSVGElement::registerAttributes): Deleted.
817         * svg/SVGSVGElement.h:
818         * svg/SVGTextContentElement.cpp:
819         (WebCore::SVGTextContentElement::SVGTextContentElement):
820         (WebCore::SVGTextContentElement::registerAttributes):
821         (WebCore::SVGTextContentElement::parseAttribute):
822         (WebCore::SVGTextContentElement::svgAttributeChanged):
823         (WebCore::SVGTextContentElement::textLengthAnimated):
824         * svg/SVGTextContentElement.h:
825         (WebCore::SVGTextContentElement::specifiedTextLength const):
826         (WebCore::SVGTextContentElement::textLength const):
827         (WebCore::SVGTextContentElement::specifiedTextLength): Deleted.
828         (WebCore::SVGTextContentElement::textLengthAnimated): Deleted.
829         (WebCore::SVGTextContentElement::SVGAnimatedCustomLengthAttribute::SVGAnimatedCustomLengthAttribute): Deleted.
830         (WebCore::SVGTextContentElement::SVGAnimatedCustomLengthAttribute::synchronize): Deleted.
831         (WebCore::SVGTextContentElement::SVGAnimatedCustomLengthAttribute::animatedProperty): Deleted.
832         * svg/SVGTextPathElement.cpp:
833         (WebCore::SVGTextPathElement::SVGTextPathElement):
834         (WebCore::SVGTextPathElement::registerAttributes):
835         (WebCore::SVGTextPathElement::parseAttribute):
836         * svg/SVGTextPathElement.h:
837         * svg/SVGTextPositioningElement.cpp:
838         (WebCore::SVGTextPositioningElement::SVGTextPositioningElement):
839         (WebCore::SVGTextPositioningElement::parseAttribute):
840         (WebCore::SVGTextPositioningElement::svgAttributeChanged):
841         (WebCore::SVGTextPositioningElement::registerAttributes): Deleted.
842         * svg/SVGTextPositioningElement.h:
843         (WebCore::SVGTextPositioningElement::x const):
844         (WebCore::SVGTextPositioningElement::y const):
845         (WebCore::SVGTextPositioningElement::dx const):
846         (WebCore::SVGTextPositioningElement::dy const):
847         (WebCore::SVGTextPositioningElement::xAnimated):
848         (WebCore::SVGTextPositioningElement::yAnimated):
849         (WebCore::SVGTextPositioningElement::dxAnimated):
850         (WebCore::SVGTextPositioningElement::dyAnimated):
851         (WebCore::SVGTextPositioningElement::isKnownAttribute): Deleted.
852         * svg/SVGUseElement.cpp:
853         (WebCore::SVGUseElement::SVGUseElement):
854         (WebCore::SVGUseElement::parseAttribute):
855         (WebCore::SVGUseElement::svgAttributeChanged):
856         (WebCore::SVGUseElement::registerAttributes): Deleted.
857         * svg/SVGUseElement.h:
858         * svg/SVGValue.h:
859         * svg/properties/SVGAnimatedPropertyAccessorImpl.h:
860         * svg/properties/SVGAnimatedPropertyAnimator.h:
861         * svg/properties/SVGAnimatedPropertyAnimatorImpl.h:
862         * svg/properties/SVGAnimatedPropertyImpl.h:
863         * svg/properties/SVGAnimationAdditiveListFunctionImpl.h:
864         (WebCore::SVGAnimationLengthListFunction::SVGAnimationLengthListFunction):
865         (WebCore::SVGAnimationLengthListFunction::progress):
866         (WebCore::SVGAnimationNumberListFunction::progress):
867         (WebCore::SVGAnimationPointListFunction::progress):
868         * svg/properties/SVGAnimationAdditiveValueFunctionImpl.h:
869         (WebCore::SVGAnimationLengthFunction::SVGAnimationLengthFunction):
870         (WebCore::SVGAnimationLengthFunction::progress):
871         * svg/properties/SVGAttributeAnimator.cpp:
872         (WebCore::SVGAttributeAnimator::isAnimatedStylePropertyAniamtor const):
873         * svg/properties/SVGAttributeAnimator.h:
874         * svg/properties/SVGAttributeRegistry.h:
875         * svg/properties/SVGPropertyAnimatorFactory.h:
876         (WebCore::SVGPropertyAnimatorFactory::createLengthAnimator):
877         (WebCore::SVGPropertyAnimatorFactory::createLengthListAnimator):
878         (WebCore::SVGPropertyAnimatorFactory::attributeAnimatorCreator):
879         * svg/properties/SVGPropertyOwnerRegistry.h:
880         (WebCore::SVGPropertyOwnerRegistry::registerProperty):
881         (WebCore::SVGPropertyOwnerRegistry::isAnimatedLengthAttribute):
882         * svg/properties/SVGPropertyRegistry.h:
883         * svg/properties/SVGValuePropertyAnimator.h: Added.
884         (WebCore::SVGValuePropertyAnimator::SVGValuePropertyAnimator):
885         * svg/properties/SVGValuePropertyAnimatorImpl.h: Added.
886         * svg/properties/SVGValuePropertyListAnimator.h: Added.
887         (WebCore::SVGValuePropertyListAnimator::SVGValuePropertyListAnimator):
888         * svg/properties/SVGValuePropertyListAnimatorImpl.h: Added.
889
890 2019-03-26  Simon Fraser  <simon.fraser@apple.com>
891
892         [iOS WK2] position:fixed inside oveflow:scroll is jumpy
893         https://bugs.webkit.org/show_bug.cgi?id=196238
894
895         Reviewed by Antti Koivisto.
896         
897         We were inadvertently making Positioned nodes for position:fixed, which is unnecessary because
898         Fixed nodes handle them, and harmful because they introduced unwanted layer movement.
899
900         Tests: scrollingcoordinator/ios/fixed-in-overflow-scroll-scrolling-tree.html
901                scrollingcoordinator/ios/fixed-in-overflow-scroll.html
902
903         * rendering/RenderLayerCompositor.cpp:
904         (WebCore::RenderLayerCompositor::computeCoordinatedPositioningForLayer const):
905
906 2019-03-26  Dean Jackson  <dino@apple.com>
907
908         vertexAttribPointer must restrict offset parameter
909         https://bugs.webkit.org/show_bug.cgi?id=196261
910         <rdar://problem/48458086>
911
912         Reviewed by Antoine Quint.
913
914         This WebGL function should fail if the offset parameter is
915         not within [0, max 32-bit int].
916
917         Test: fast/canvas/webgl/vertexAttribPointer-with-bad-offset.html
918
919         * html/canvas/WebGLRenderingContextBase.cpp:
920         (WebCore::WebGLRenderingContextBase::vertexAttribPointer):
921
922 2019-03-26  Antoine Quint  <graouts@apple.com>
923
924         Remove mousemoveEventHandlingPreventsDefault internal setting and quirk
925         https://bugs.webkit.org/show_bug.cgi?id=196254
926         <rdar://problem/49124334>
927
928         Unreviewed. Fix build broken by previous commit.
929
930         * dom/Event.cpp:
931         * dom/Event.h:
932         (WebCore::Event::hasEncounteredListener const): Deleted.
933         (WebCore::Event::setHasEncounteredListener): Deleted.
934         * dom/EventTarget.cpp:
935         (WebCore::EventTarget::innerInvokeEventListeners):
936
937 2019-03-26  Zalan Bujtas  <zalan@apple.com>
938
939         [ContentChangeObserver] Skip anonymous renderers when checking for "willRespondToMouseClickEvents"
940         https://bugs.webkit.org/show_bug.cgi?id=196259
941         <rdar://problem/49240029>
942
943         Reviewed by Dean Jackson.
944
945         Anonymous renderers don't have associated DOM nodes so they can't have event listeners either. Let's skip them.
946
947         Test: fast/events/touch/ios/content-observation/crash-on-anonymous-renderer.html
948
949         * page/ios/ContentChangeObserver.cpp:
950         (WebCore::ContentChangeObserver::StyleChangeScope::isConsideredClickable const):
951
952 2019-03-26  Antoine Quint  <graouts@apple.com>
953
954         Remove mousemoveEventHandlingPreventsDefault internal setting and quirk
955         https://bugs.webkit.org/show_bug.cgi?id=196254
956         <rdar://problem/49124334>
957
958         Reviewed by Dean Jackson.
959
960         * page/Quirks.cpp:
961         (WebCore::Quirks::shouldMousemoveEventHandlingPreventDefault const): Deleted.
962         * page/Quirks.h:
963         * page/RuntimeEnabledFeatures.h:
964         (WebCore::RuntimeEnabledFeatures::setMouseEventsSimulationEnabled):
965         (WebCore::RuntimeEnabledFeatures::mousemoveEventHandlingPreventsDefaultEnabled const): Deleted.
966         (WebCore::RuntimeEnabledFeatures::setMousemoveEventHandlingPreventsDefaultEnabled): Deleted.
967
968 2019-03-26  Commit Queue  <commit-queue@webkit.org>
969
970         Unreviewed, rolling out r243493.
971         https://bugs.webkit.org/show_bug.cgi?id=196257
972
973         broke the non-gst-gl build (Requested by philn on #webkit).
974
975         Reverted changeset:
976
977         "Build failure with gstreamer 1.12.5 if USE_GSTREAMER_GL is
978         enabled"
979         https://bugs.webkit.org/show_bug.cgi?id=196178
980         https://trac.webkit.org/changeset/243493
981
982 2019-03-26  Mike Gorse  <mgorse@alum.wpi.edu>
983
984         Build failure with gstreamer 1.12.5 if USE_GSTREAMER_GL is enabled
985         https://bugs.webkit.org/show_bug.cgi?id=196178
986
987         Reviewed by Philippe Normand.
988
989         No new tests (build fix).
990
991         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
992         Include gst/gl/gl.h before including GraphicsContext3D.h.
993
994 2019-03-26  Philippe Normand  <pnormand@igalia.com>
995
996         [GStreamer] Sound loop with Google Hangouts and WhatsApp notifications
997         https://bugs.webkit.org/show_bug.cgi?id=189471
998
999         Reviewed by Xabier Rodriguez-Calvar.
1000
1001         The media duration is now cached (again). The loop issue was
1002         triggered by the previous version of the code returning positive
1003         infinite duration in didEnd(), followed by the timeupdate event
1004         propagation that would trick the HTMLMediaElement into a new call
1005         to play(). Now the cached duration is updated to current position
1006         at EOS (for forward playback direction only), so the media element
1007         no longer triggers a new play call for those cases.
1008
1009         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1010         (WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer):
1011         (WebCore::MediaPlayerPrivateGStreamer::loadFull):
1012         (WebCore::MediaPlayerPrivateGStreamer::playbackPosition const):
1013         (WebCore::MediaPlayerPrivateGStreamer::platformDuration const):
1014         (WebCore::MediaPlayerPrivateGStreamer::durationMediaTime const):
1015         (WebCore::MediaPlayerPrivateGStreamer::currentMediaTime const):
1016         (WebCore::MediaPlayerPrivateGStreamer::didEnd):
1017         (WebCore::MediaPlayerPrivateGStreamer::durationChanged):
1018         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
1019         * platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp:
1020         (WebCore::MediaPlayerPrivateGStreamerMSE::currentMediaTime const):
1021
1022 2019-03-26  Antti Koivisto  <antti@apple.com>
1023
1024         Hit-testing on layers overlapping scrollers should hit-test on text boxes
1025         https://bugs.webkit.org/show_bug.cgi?id=195373
1026         <rdar://problem/48649865>
1027
1028         Reviewed by Simon Fraser.
1029
1030         * rendering/InlineFlowBox.cpp:
1031         (WebCore::InlineFlowBox::paint):
1032         * rendering/InlineTextBox.cpp:
1033         (WebCore::InlineTextBox::paint):
1034
1035         Collect event region for overflowing line boxes.
1036
1037         * rendering/SimpleLineLayoutFunctions.cpp:
1038         (WebCore::SimpleLineLayout::paintFlow):
1039
1040         Collect event region for overflowing simple lines.
1041
1042 2019-03-25  Alex Christensen  <achristensen@webkit.org>
1043
1044         Expected shouldn't assume its contained types are copyable
1045         https://bugs.webkit.org/show_bug.cgi?id=195986
1046
1047         Reviewed by JF Bastien.
1048
1049         * contentextensions/ContentExtensionParser.cpp:
1050         (WebCore::ContentExtensions::loadAction):
1051
1052 2019-03-20  Ryosuke Niwa  <rniwa@webkit.org>
1053
1054         Leak of SVGFontFaceElement when RenderStyle holds onto a FontRances which uses it
1055         https://bugs.webkit.org/show_bug.cgi?id=196059
1056
1057         Reviewed by Zalan Bujtas.
1058
1059         SVGFontFaceElement keeps its RenderStyle alive via ElementRareData but RenderStyle can hold onto FontRanges
1060         and therefore CSSFontSource, which in turn keeps SVGFontFaceElement alive, making a reference cycle.
1061
1062         More precisely, there are two reference cycles:
1063         SVGFontFaceElement (1) -> ElementRareData -> StyleInheritedData -> FontCascade -> FontCascadeFonts (2)
1064         FontCascadeFonts (2) -> FontRanges (3)
1065         FontCascadeFonts (2) -> CSSFontSelector -> CSSFontFaceSet -> CSSSegmentedFontFace -> FontRanges (3)
1066         FontRanges (3) -> CSSFontAccessor > CSSFontFace > CSSFontSource -> SVGFontFaceElement (1)
1067
1068         No new tests. Unfortunately, writing a test proved to be intractable. The leak can be reproduced by running
1069         svg/text/text-text-05-t.svg then svg/zoom/page/zoom-img-preserveAspectRatio-support-1.html consecutively.
1070
1071         * css/CSSFontFaceSource.cpp:
1072         (WebCore::CSSFontFaceSource::CSSFontFaceSource):
1073         (WebCore::CSSFontFaceSource::load):
1074         (WebCore::CSSFontFaceSource::font):
1075         (WebCore::CSSFontFaceSource::isSVGFontFaceSource const):
1076         * css/CSSFontFaceSource.h:
1077
1078 2019-03-25  Fujii Hironori  <Hironori.Fujii@sony.com>
1079
1080         Unreviewed, rolling out r243450.
1081
1082         AppleWin and WinCairo port builds get broken.
1083
1084         Reverted changeset:
1085
1086         "Add test for fix of #196095"
1087         https://bugs.webkit.org/show_bug.cgi?id=196097
1088         https://trac.webkit.org/changeset/243450
1089
1090 2019-03-25  Said Abou-Hallawa  <sabouhallawa@apple.com>
1091
1092         Remove the SVG tear off objects for SVGAngle, SVGAnimatedAngle and SVGAnimatedEnumeration
1093         https://bugs.webkit.org/show_bug.cgi?id=196087
1094
1095         Reviewed by Simon Fraser.
1096
1097         In this patch, the tear off objects for SVGAnimatedEnumeration will be 
1098         removed. Because the angle is paired with the orient type so its tear
1099         off objects have to be removed as well. Here is what this patch does:
1100
1101         -- SVGAngle is now a superclass of SVGValueProperty<SVGAngleValue>. Its 
1102         relationship with its owner will be managed by the owner of its base
1103         class SVGProperty.
1104
1105         -- SVGAnimatedAngle is now defined to be SVGAnimatedValueProperty<
1106         SVGAngle>. All the DOM interfaces will be handled by the base class
1107         given its baseVal and animVal are of type SVGAngle.
1108
1109         -- SVGAnimatedEnumeration is now defined to be
1110         SVGAnimatedDecoratedProperty<SVGDecoratedEnumeration, unsigned>.
1111         This can be read: SVGAnimatedEnumeration is an SVGAnimatedProperty which
1112         decorates the "SVGDecoratedEnumeration" type to "unsigned". The reason
1113         for this complication is the IDL of SVGAnimatedEnumeration defines the
1114         baseVal and animVal are of type unsigned. However SVGAnimatedEnumeration
1115         should be able to convert a string to its enum value and vice versa.
1116
1117         -- SVGAnimatedDecoratedProperty is a template class which maps from
1118         DecoratedProperty to DecorationType. The DecoratedProperty is actually
1119         a template class which exposes a property of type DecorationType.
1120
1121         -- SVGDecoratedProperty is an abstract class which manages setting and
1122         getting a property in DecorationType regardless of how it is actually
1123         stored. 
1124
1125         -- SVGDecoratedPrimitive is a superclass of SVGDecoratedProperty which
1126         stores a primitive property whose type is PropertyType but can decorate
1127         it to the callers as DecorationType.
1128
1129         -- SVGDecoratedEnumeration is a superclass of SVGDecoratedPrimitive
1130         which stores a primitive type DecorationType like "BlendMode" but
1131         decorates it as "unsigned"
1132
1133         To get the mechanics of this change correct, new accessors, animators
1134         and animation functions need to be added for SVGAnimatedAngle,
1135         SVGAnimatedEnumeration and SVGAnimatedOrientType. But since angle and
1136         the orient type are paired under a single attribute, a pair accessor and
1137         animator are also needed for the pair { angle, orientType }.
1138
1139         * Sources.txt:
1140         * WebCore.xcodeproj/project.pbxproj:
1141         * svg/SVGAngle.h:
1142         (WebCore::SVGAngle::create):
1143         (WebCore::SVGAngle::unitType):
1144         (WebCore::SVGAngle::setValueForBindings):
1145         (WebCore::SVGAngle::valueForBindings):
1146         (WebCore::SVGAngle::setValueInSpecifiedUnits):
1147         (WebCore::SVGAngle::valueInSpecifiedUnits):
1148         (WebCore::SVGAngle::setValueAsString):
1149         (WebCore::SVGAngle::newValueSpecifiedUnits):
1150         (WebCore::SVGAngle::convertToSpecifiedUnits):
1151         (WebCore::SVGAngle::valueAsString): Deleted.
1152         (WebCore::SVGAngle::SVGAngle): Deleted.
1153         * svg/SVGAnimatedAngle.cpp: Removed.
1154         * svg/SVGAnimatedAngle.h: Removed.
1155         * svg/SVGAnimatedEnumeration.cpp: Removed.
1156         * svg/SVGAnimatedEnumeration.h: Removed.
1157         * svg/SVGAnimatedType.h:
1158         (WebCore::SVGAnimatedType::type const):
1159         * svg/SVGAnimatorFactory.h:
1160         (WebCore::SVGAnimatorFactory::create):
1161         * svg/SVGClipPathElement.cpp:
1162         (WebCore::SVGClipPathElement::SVGClipPathElement):
1163         (WebCore::SVGClipPathElement::parseAttribute):
1164         (WebCore::SVGClipPathElement::svgAttributeChanged):
1165         (WebCore::SVGClipPathElement::registerAttributes): Deleted.
1166         * svg/SVGClipPathElement.h:
1167         * svg/SVGComponentTransferFunctionElement.cpp:
1168         (WebCore::SVGComponentTransferFunctionElement::SVGComponentTransferFunctionElement):
1169         (WebCore::SVGComponentTransferFunctionElement::parseAttribute):
1170         (WebCore::SVGComponentTransferFunctionElement::registerAttributes): Deleted.
1171         * svg/SVGComponentTransferFunctionElement.h:
1172         (WebCore::SVGComponentTransferFunctionElement::type const):
1173         (WebCore::SVGComponentTransferFunctionElement::typeAnimated):
1174         (WebCore::SVGComponentTransferFunctionElement::attributeRegistry): Deleted.
1175         (WebCore::SVGComponentTransferFunctionElement::isKnownAttribute): Deleted.
1176         * svg/SVGElement.cpp:
1177         (WebCore::SVGElement::commitPropertyChange):
1178         * svg/SVGFEBlendElement.cpp:
1179         (WebCore::SVGFEBlendElement::SVGFEBlendElement):
1180         (WebCore::SVGFEBlendElement::parseAttribute):
1181         (WebCore::SVGFEBlendElement::registerAttributes): Deleted.
1182         * svg/SVGFEBlendElement.h:
1183         (WebCore::SVGPropertyTraits<BlendMode>::fromString):
1184         * svg/SVGFEColorMatrixElement.cpp:
1185         (WebCore::SVGFEColorMatrixElement::SVGFEColorMatrixElement):
1186         (WebCore::SVGFEColorMatrixElement::parseAttribute):
1187         (WebCore::SVGFEColorMatrixElement::registerAttributes): Deleted.
1188         * svg/SVGFEColorMatrixElement.h:
1189         * svg/SVGFECompositeElement.cpp:
1190         (WebCore::SVGFECompositeElement::SVGFECompositeElement):
1191         (WebCore::SVGFECompositeElement::parseAttribute):
1192         (WebCore::SVGFECompositeElement::registerAttributes): Deleted.
1193         * svg/SVGFECompositeElement.h:
1194         * svg/SVGFEConvolveMatrixElement.cpp:
1195         (WebCore::SVGFEConvolveMatrixElement::SVGFEConvolveMatrixElement):
1196         (WebCore::SVGFEConvolveMatrixElement::parseAttribute):
1197         (WebCore::SVGFEConvolveMatrixElement::registerAttributes): Deleted.
1198         * svg/SVGFEConvolveMatrixElement.h:
1199         * svg/SVGFEDisplacementMapElement.cpp:
1200         (WebCore::SVGFEDisplacementMapElement::SVGFEDisplacementMapElement):
1201         (WebCore::SVGFEDisplacementMapElement::parseAttribute):
1202         (WebCore::SVGFEDisplacementMapElement::registerAttributes): Deleted.
1203         * svg/SVGFEDisplacementMapElement.h:
1204         * svg/SVGFEGaussianBlurElement.cpp:
1205         (WebCore::SVGFEGaussianBlurElement::SVGFEGaussianBlurElement):
1206         (WebCore::SVGFEGaussianBlurElement::parseAttribute):
1207         (WebCore::SVGFEGaussianBlurElement::svgAttributeChanged):
1208         (WebCore::SVGFEGaussianBlurElement::registerAttributes): Deleted.
1209         * svg/SVGFEGaussianBlurElement.h:
1210         * svg/SVGFEMorphologyElement.cpp:
1211         (WebCore::SVGFEMorphologyElement::SVGFEMorphologyElement):
1212         (WebCore::SVGFEMorphologyElement::parseAttribute):
1213         (WebCore::SVGFEMorphologyElement::registerAttributes): Deleted.
1214         * svg/SVGFEMorphologyElement.h:
1215         * svg/SVGFETurbulenceElement.cpp:
1216         (WebCore::SVGFETurbulenceElement::SVGFETurbulenceElement):
1217         (WebCore::SVGFETurbulenceElement::parseAttribute):
1218         (WebCore::SVGFETurbulenceElement::svgAttributeChanged):
1219         (WebCore::SVGFETurbulenceElement::registerAttributes): Deleted.
1220         * svg/SVGFETurbulenceElement.h:
1221         * svg/SVGFilterElement.cpp:
1222         (WebCore::SVGFilterElement::SVGFilterElement):
1223         (WebCore::SVGFilterElement::registerAttributes):
1224         (WebCore::SVGFilterElement::parseAttribute):
1225         * svg/SVGFilterElement.h:
1226         * svg/SVGGradientElement.cpp:
1227         (WebCore::SVGGradientElement::SVGGradientElement):
1228         (WebCore::SVGGradientElement::registerAttributes):
1229         (WebCore::SVGGradientElement::parseAttribute):
1230         * svg/SVGGradientElement.h:
1231         (WebCore::SVGGradientElement::spreadMethod const):
1232         (WebCore::SVGGradientElement::gradientUnits const):
1233         (WebCore::SVGGradientElement::spreadMethodAnimated):
1234         (WebCore::SVGGradientElement::gradientUnitsAnimated):
1235         * svg/SVGMarkerElement.cpp:
1236         (WebCore::SVGMarkerElement::SVGMarkerElement):
1237         (WebCore::SVGMarkerElement::registerAttributes):
1238         (WebCore::SVGMarkerElement::parseAttribute):
1239         (WebCore::SVGMarkerElement::setOrient):
1240         (WebCore::SVGMarkerElement::setOrientToAngle):
1241         (WebCore::SVGMarkerElement::orientTypeIdentifier): Deleted.
1242         (WebCore::SVGMarkerElement::orientAngleIdentifier): Deleted.
1243         * svg/SVGMarkerElement.h:
1244         * svg/SVGMarkerTypes.h:
1245         (WebCore::SVGPropertyTraits<SVGMarkerOrientType>::autoString):
1246         (WebCore::SVGPropertyTraits<SVGMarkerOrientType>::autoStartReverseString):
1247         (WebCore::SVGPropertyTraits<SVGMarkerOrientType>::fromString):
1248         (WebCore::SVGPropertyTraits<SVGMarkerOrientType>::toString):
1249         * svg/SVGMaskElement.cpp:
1250         (WebCore::SVGMaskElement::SVGMaskElement):
1251         (WebCore::SVGMaskElement::registerAttributes):
1252         (WebCore::SVGMaskElement::parseAttribute):
1253         * svg/SVGMaskElement.h:
1254         * svg/SVGPatternElement.cpp:
1255         (WebCore::SVGPatternElement::SVGPatternElement):
1256         (WebCore::SVGPatternElement::registerAttributes):
1257         (WebCore::SVGPatternElement::parseAttribute):
1258         * svg/SVGPatternElement.h:
1259         * svg/SVGSVGElement.cpp:
1260         * svg/SVGScriptElement.cpp:
1261         * svg/SVGTextContentElement.cpp:
1262         (WebCore::SVGTextContentElement::SVGTextContentElement):
1263         (WebCore::SVGTextContentElement::registerAttributes):
1264         (WebCore::SVGTextContentElement::parseAttribute):
1265         * svg/SVGTextContentElement.h:
1266         (WebCore::SVGTextContentElement::lengthAdjust const):
1267         (WebCore::SVGTextContentElement::lengthAdjustAnimated):
1268         * svg/SVGTextPathElement.cpp:
1269         (WebCore::SVGTextPathElement::SVGTextPathElement):
1270         (WebCore::SVGTextPathElement::registerAttributes):
1271         (WebCore::SVGTextPathElement::parseAttribute):
1272         * svg/SVGTextPathElement.h:
1273         * svg/SVGValue.h:
1274         * svg/properties/SVGAnimatedDecoratedProperty.h: Added.
1275         (WebCore::SVGAnimatedDecoratedProperty::create):
1276         (WebCore::SVGAnimatedDecoratedProperty::SVGAnimatedDecoratedProperty):
1277         (WebCore::SVGAnimatedDecoratedProperty::setBaseVal):
1278         (WebCore::SVGAnimatedDecoratedProperty::setBaseValInternal):
1279         (WebCore::SVGAnimatedDecoratedProperty::baseVal const):
1280         (WebCore::SVGAnimatedDecoratedProperty::setAnimVal):
1281         (WebCore::SVGAnimatedDecoratedProperty::animVal const):
1282         (WebCore::SVGAnimatedDecoratedProperty::currentValue const):
1283         * svg/properties/SVGAnimatedEnumerationPropertyTearOff.h: Removed.
1284         * svg/properties/SVGAnimatedPropertyAccessorImpl.h:
1285         * svg/properties/SVGAnimatedPropertyAnimatorImpl.h:
1286         * svg/properties/SVGAnimatedPropertyImpl.h:
1287         (WebCore::SVGAnimatedOrientType::create):
1288         * svg/properties/SVGAnimatedPropertyPairAccessorImpl.h:
1289         * svg/properties/SVGAnimatedPropertyPairAnimator.h:
1290         (WebCore::SVGAnimatedPropertyPairAnimator::appendAnimatedInstance):
1291         * svg/properties/SVGAnimatedPropertyPairAnimatorImpl.h:
1292         * svg/properties/SVGAnimatedStaticPropertyTearOff.h: Removed.
1293         * svg/properties/SVGAnimationAdditiveValueFunctionImpl.h:
1294         (WebCore::SVGAnimationAngleFunction::progress):
1295         * svg/properties/SVGAnimationDiscreteFunctionImpl.h:
1296         * svg/properties/SVGAttributeRegistry.h:
1297         * svg/properties/SVGDecoratedEnumeration.h: Added.
1298         (WebCore::SVGDecoratedEnumeration::create):
1299         * svg/properties/SVGDecoratedPrimitive.h: Added.
1300         (WebCore::SVGDecoratedPrimitive::SVGDecoratedPrimitive):
1301         * svg/properties/SVGDecoratedProperty.h: Added.
1302         (WebCore::SVGDecoratedProperty::setValue):
1303         (WebCore::SVGDecoratedProperty::value const):
1304         * svg/properties/SVGPropertyOwnerRegistry.h:
1305         (WebCore::SVGPropertyOwnerRegistry::registerProperty):
1306         (WebCore::SVGPropertyOwnerRegistry::isAnimatedLengthAttribute):
1307         * svg/properties/SVGPropertyRegistry.h:
1308         * svg/properties/SVGStaticPropertyTearOff.h: Removed.
1309
1310 2019-03-25  Fujii Hironori  <Hironori.Fujii@sony.com>
1311
1312         [iOS] Break a reference cycle between PreviewLoader and ResourceLoader
1313         https://bugs.webkit.org/show_bug.cgi?id=194964
1314
1315         Unreviewed build fix for WinCairo port.
1316
1317         error C2504: 'CanMakeWeakPtr': base class undefined
1318
1319         * loader/ResourceLoader.h: Added #include <wtf/WeakPtr.h>.
1320
1321 2019-03-25  Andy Estes  <aestes@apple.com>
1322
1323         [iOS] Break a reference cycle between PreviewLoader and ResourceLoader
1324         https://bugs.webkit.org/show_bug.cgi?id=194964
1325         <rdar://problem/48279441>
1326
1327         Reviewed by Alex Christensen.
1328
1329         When a document's QuickLook preview is loaded, a reference cycle is created between
1330         WebPreviewLoader and ResourceLoader. Break the cycle by changing WebPreviewLoader to hold a
1331         WeakPtr to its ResourceLoader ResourceLoader::releaseResources().
1332
1333         Fixes leaks detected by `run-webkit-tests --leaks LayoutTests/quicklook`. Also covered by
1334         existing API tests.
1335
1336         * loader/ResourceLoader.h:
1337         * loader/ios/PreviewLoader.mm:
1338         (-[WebPreviewLoader initWithResourceLoader:resourceResponse:]):
1339         (-[WebPreviewLoader _sendDidReceiveResponseIfNecessary]):
1340         (-[WebPreviewLoader connection:didReceiveData:lengthReceived:]):
1341         (-[WebPreviewLoader connectionDidFinishLoading:]):
1342         (-[WebPreviewLoader connection:didFailWithError:]):
1343
1344 2019-03-25  Alex Christensen  <achristensen@webkit.org>
1345
1346         Enable IPC sending and receiving non-default-constructible types
1347         https://bugs.webkit.org/show_bug.cgi?id=196132
1348
1349         Reviewed by Geoff Garen.
1350
1351         This basically just requires the decoding of std::tuple to return an Optional<std::tuple> instead of
1352         constructing a std::tuple then decoding into it.  I now decode synchronous replies into an Optional<std::tuple>
1353         then move it into the tuple of references where the successfully decoded reply should go.  This required
1354         the synchronous reply types be move constructible and move assignable.
1355
1356         * Modules/indexeddb/shared/IDBRequestData.h:
1357         * Modules/indexeddb/shared/IDBTransactionInfo.h:
1358         * platform/DragImage.h:
1359         * platform/PasteboardWriterData.h:
1360         * platform/audio/mac/CAAudioStreamDescription.h:
1361         * platform/graphics/RemoteVideoSample.h:
1362
1363 2019-03-25  Alex Christensen  <achristensen@webkit.org>
1364
1365         Stop storing raw pointers to Documents
1366         https://bugs.webkit.org/show_bug.cgi?id=196042
1367
1368         Reviewed by Geoff Garen.
1369
1370         Use WeakPtr instead!  This could change some UAF bugs into null dereference crashes.
1371
1372         * css/CSSFontSelector.cpp:
1373         (WebCore::CSSFontSelector::CSSFontSelector):
1374         (WebCore::CSSFontSelector::addFontFaceRule):
1375         (WebCore::CSSFontSelector::fontRangesForFamily):
1376         * css/CSSFontSelector.h:
1377         * css/MediaQueryMatcher.cpp:
1378         (WebCore::MediaQueryMatcher::MediaQueryMatcher):
1379         (WebCore::MediaQueryMatcher::matchMedia):
1380         * css/MediaQueryMatcher.h:
1381         * css/StyleSheetList.cpp:
1382         (WebCore::StyleSheetList::StyleSheetList):
1383         (WebCore::StyleSheetList::ownerNode const):
1384         * css/StyleSheetList.h:
1385         * css/ViewportStyleResolver.cpp:
1386         (WebCore::ViewportStyleResolver::ViewportStyleResolver):
1387         * css/ViewportStyleResolver.h:
1388         * dom/Document.h:
1389         (WebCore::Document::setTemplateDocumentHost):
1390         (WebCore::Document::templateDocumentHost):
1391         * dom/DocumentParser.cpp:
1392         (WebCore::DocumentParser::DocumentParser):
1393         * dom/DocumentParser.h:
1394         (WebCore::DocumentParser::document const):
1395         * dom/ScriptedAnimationController.cpp:
1396         (WebCore::ScriptedAnimationController::ScriptedAnimationController):
1397         * dom/ScriptedAnimationController.h:
1398         * html/parser/HTMLScriptRunner.cpp:
1399         (WebCore::HTMLScriptRunner::HTMLScriptRunner):
1400         (WebCore::HTMLScriptRunner::runScript):
1401         * html/parser/HTMLScriptRunner.h:
1402         * loader/MediaResourceLoader.cpp:
1403         (WebCore::MediaResourceLoader::MediaResourceLoader):
1404         * loader/MediaResourceLoader.h:
1405         * loader/cache/CachedResourceLoader.cpp:
1406         (WebCore::CachedResourceLoader::canRequestInContentDispositionAttachmentSandbox const):
1407         (WebCore::CachedResourceLoader::loadDone):
1408         * loader/cache/CachedResourceLoader.h:
1409         (WebCore::CachedResourceLoader::document const):
1410         (WebCore::CachedResourceLoader::setDocument):
1411
1412 2019-03-25  Truitt Savell  <tsavell@apple.com>
1413
1414         Unreviewed, rolling out r243419.
1415
1416         Caused Mac WK2 testers to crash and become unresponsive.
1417
1418         Reverted changeset:
1419
1420         "[Web GPU] Prototype compute pipeline with MSL"
1421         https://bugs.webkit.org/show_bug.cgi?id=196107
1422         https://trac.webkit.org/changeset/243419
1423
1424 2019-03-25  Truitt Savell  <tsavell@apple.com>
1425
1426         Unreviewed, rolling out r243438.
1427
1428         243319 Caused Mac WK2 testers to crash and become
1429         unresponsive.
1430
1431         Reverted changeset:
1432
1433         "Update WebGPU class names based on sketch.idl"
1434         https://bugs.webkit.org/show_bug.cgi?id=194260
1435         https://trac.webkit.org/changeset/243438
1436
1437 2019-03-25  Eric Carlson  <eric.carlson@apple.com>
1438
1439         Delete MetadataPreloadingNotPermitted, it is unused
1440         https://bugs.webkit.org/show_bug.cgi?id=196202
1441         <rdar://problem/49213611>
1442
1443         Reviewed by Jer Noble.
1444
1445         No new tests, the flat was unused except in an existing test that was removed.
1446
1447         * html/MediaElementSession.cpp:
1448         (WebCore::restrictionNames):
1449         (WebCore::MediaElementSession::effectivePreloadForElement const):
1450         * html/MediaElementSession.h:
1451         * platform/graphics/cg/UTIRegistry.cpp:
1452         (WebCore::defaultSupportedImageTypes):
1453         * testing/Internals.cpp:
1454         (WebCore::Internals::setMediaElementRestrictions):
1455
1456 2019-03-25  Jer Noble  <jer.noble@apple.com>
1457
1458         Test for: 196095 Inband Text Track cues interspersed with Data cues can display out of order.
1459         https://bugs.webkit.org/show_bug.cgi?id=196097
1460
1461         Reviewed by Eric Carlson.
1462
1463         Test: media/track/track-in-band-metadata-display-order.html
1464
1465         Add a method in Internals to create a TextTrackCueGeneric (which can normally only be created
1466         by parsing an in-band media track). This requires adding IDL for TextTrackCueGeneric, and exporting
1467         TextTrackCueGeneric for testing.
1468
1469         Drive-by fixes:
1470
1471         Add runtime logging to MediaControlTextTrackContainerElement. This necessitates modifying the
1472         parentMediaElement() method to take a const Node*, and const_cast that constness away in order to return
1473         a HTMLMediaElement*
1474
1475         TextTrackCue, VTTCue, TextTrackCueGeneric, and DataCue should all use the WTF TypeCasts macros to
1476         enable use of is<> and downcast<>.
1477
1478         * Source/WebCore/CMakeLists.txt:
1479         * DerivedSources-input.xcfilelist:
1480         * DerivedSources-output.xcfilelist:
1481         * DerivedSources.make:
1482         * WebCore.xcodeproj/project.pbxproj:
1483         * html/shadow/MediaControlElementTypes.cpp:
1484         (WebCore::parentMediaElement):
1485         * html/shadow/MediaControlElementTypes.h:
1486         * html/shadow/MediaControlElements.cpp:
1487         (WebCore::MediaControlTextTrackContainerElement::updateDisplay):
1488         (WebCore::MediaControlTextTrackContainerElement::logger const):
1489         (WebCore::MediaControlTextTrackContainerElement::logIdentifier const):
1490         (WebCore::MediaControlTextTrackContainerElement::logChannel const):
1491         * html/shadow/MediaControlElements.h:
1492         * html/track/DataCue.h:
1493         (isType):
1494         * html/track/TextTrackCueGeneric.h:
1495         (isType):
1496         * html/track/TextTrackCueGeneric.idl: Added.
1497         * html/track/VTTCue.h:
1498         (isType):
1499         * testing/Internals.cpp:
1500         (WebCore::Internals::createGenericCue):
1501         * testing/Internals.h:
1502         * testing/Internals.idl:
1503
1504 2019-03-25  Antti Koivisto  <antti@apple.com>
1505
1506         Toggling "display: contents" to "display: none" fails to hide the element
1507         https://bugs.webkit.org/show_bug.cgi?id=188259
1508         <rdar://problem/42886896>
1509
1510         Reviewed by Simon Fraser.
1511
1512         Test: fast/css/display-contents-to-none.html
1513
1514         * style/StyleTreeResolver.cpp:
1515         (WebCore::Style::affectsRenderedSubtree):
1516
1517         An element with 'display:contents' has a rendered subtree.
1518
1519 2019-03-25  Justin Fan  <justin_fan@apple.com>
1520
1521         Update WebGPU class names based on sketch.idl
1522         https://bugs.webkit.org/show_bug.cgi?id=194260
1523
1524         Reviewed by Dean Jackson.
1525
1526         Update all exposed Web GPU interface names to GPU* prefix. 
1527
1528         Existing Web GPU tests updated to expect new names.
1529
1530         * Modules/webgpu/WebGPU.idl:
1531         * Modules/webgpu/WebGPUAdapter.idl:
1532         * Modules/webgpu/WebGPUBindGroup.idl:
1533         * Modules/webgpu/WebGPUBindGroupLayout.idl:
1534         * Modules/webgpu/WebGPUBuffer.idl:
1535         * Modules/webgpu/WebGPUDevice.idl:
1536         * Modules/webgpu/WebGPUInputStepMode.h: Removed.
1537         * Modules/webgpu/WebGPUPipelineLayout.idl:
1538         * Modules/webgpu/WebGPUProgrammablePassEncoder.idl:
1539         * Modules/webgpu/WebGPUQueue.idl:
1540         * Modules/webgpu/WebGPURenderPassEncoder.idl:
1541         * Modules/webgpu/WebGPURenderPipeline.idl:
1542         * Modules/webgpu/WebGPUSampler.idl:
1543         * Modules/webgpu/WebGPUTexture.idl:
1544         * Modules/webgpu/WebGPUTextureView.idl:
1545         * WebCore.xcodeproj/project.pbxproj:
1546         * bindings/js/WebCoreBuiltinNames.h:
1547
1548 2019-03-25  Javier Fernandez  <jfernandez@igalia.com>
1549
1550         A single leading space is not considered as a word break even when word-break: break-all is set
1551         https://bugs.webkit.org/show_bug.cgi?id=195361
1552
1553         Reviewed by Ryosuke Niwa.
1554
1555         We must consider leading white-spaces as potential soft-breaking
1556         opportunities that may avoid breaking in the middle of the word.
1557
1558         However, 'break-word: break-all' [1] implies that we should ignore
1559         previous opportunities and break at any character (among the ones
1560         valid for 'break-all') that prevents the line to overflow. Note,
1561         that these breakable characters are different from the ones
1562         provided by 'line-break: anywhere' [2].
1563
1564         This change is covered by the already existent tests of the CSS
1565         Text 3 suite of the Web Platform Tests.
1566
1567         The word-break-break-all-010.html was precisely designed to cover
1568         the basic issue fixed with this change, verifying that the word is
1569         indeed broken even if a single leading space constitutes a
1570         previous soft-breaking opportunity.
1571
1572         There are other Web Platform Tests. which already pass before this
1573         change, to verify that such leading white-space must be used
1574         instead of breaking the word in any other case, including
1575         overflow-wrap: break-word and even the deprecated word-break:
1576         break-word.
1577
1578            - white-space/pre-wrap-008.html
1579            - white-space/pre-wrap-015.html
1580            - white-space/pre-wrap-016.html
1581            - overflow-wrap/overflow-wrap-break-word-004.html
1582            - overflow-wrap/overflow-wrap-break-word-005.html
1583            - overflow-wrap/overflow-wrap-break-word-007.html
1584            - word-break/word-break-break-all-011.html
1585            - word-break/word-break-break-all-014.html
1586
1587         The reason why the word-break-break-all-010.html passes in Mac
1588         platform is that for that case the SimpleLineLayout codepath is
1589         executed instead, which doesn't have this bug, present in the old
1590         line-breaking logic implemented in the BreakingContext class.
1591
1592         In order to verify the validity of this change, I've added several
1593         tests under fast/text with the SimpleLineLayout disabled.
1594
1595         Tests: fast/text/overflow-wrap-break-word-004.html
1596                fast/text/overflow-wrap-break-word-005.html
1597                fast/text/overflow-wrap-break-word-007.html
1598                fast/text/whitespace/pre-wrap-008.html
1599                fast/text/whitespace/pre-wrap-015.html
1600                fast/text/whitespace/pre-wrap-016.html
1601                fast/text/word-break-break-all-010.html
1602                fast/text/word-break-break-all-011.html
1603                fast/text/word-break-break-all-015.html
1604                imported/w3c/web-platform-tests/css/css-text/overflow-wrap/overflow-wrap-break-word-007.html
1605                imported/w3c/web-platform-tests/css/css-text/white-space/pre-wrap-008.html
1606                imported/w3c/web-platform-tests/css/css-text/word-break/word-break-break-all-015.html
1607
1608         * rendering/line/BreakingContext.h:
1609         (WebCore::BreakingContext::handleText):
1610
1611 2019-03-25  Rob Buis  <rbuis@igalia.com>
1612
1613         Reflect HTMLLinkElement.as according to the spec
1614         https://bugs.webkit.org/show_bug.cgi?id=196189
1615
1616         Reviewed by Youenn Fablet.
1617
1618         The 'as' attribute is an enumerated attribute [1] and should
1619         reflect using a finite set of keywords, so lowercase the as getter
1620         to match the defined set of destinations [2].
1621
1622         Test: imported/w3c/web-platform-tests/preload/reflected-as-value.html
1623
1624         [1] https://html.spec.whatwg.org/#enumerated-attribute
1625         [2] https://fetch.spec.whatwg.org/#concept-request-destination
1626
1627         * html/HTMLLinkElement.cpp:
1628         (WebCore::HTMLLinkElement::as const):
1629
1630 2019-03-25  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
1631
1632         Remove NavigatorContentUtils in WebCore/Modules
1633         https://bugs.webkit.org/show_bug.cgi?id=196070
1634
1635         Reviewed by Alex Christensen.
1636
1637         NavigatorContentUtils was to support the custom scheme spec [1].
1638         However, in WebKit side, no port has supported the feature in
1639         WebKit layer after EFL port was removed. So there has been the
1640         only IDL implementation of the NavigatorContentUtils in WebCore.
1641         So we don't need to keep the implementation in WebCore anymore.
1642
1643         [1] https://html.spec.whatwg.org/multipage/system-state.html#custom-handlers
1644
1645         No new tests because this patch is just to remove the feature.
1646
1647         * CMakeLists.txt:
1648         * Modules/navigatorcontentutils/NavigatorContentUtils.cpp: Removed.
1649         * Modules/navigatorcontentutils/NavigatorContentUtils.h: Removed.
1650         * Modules/navigatorcontentutils/NavigatorContentUtils.idl: Removed.
1651         * Modules/navigatorcontentutils/NavigatorContentUtilsClient.h: Removed.
1652         * Sources.txt:
1653
1654 2019-03-25  Manuel Rego Casasnovas  <rego@igalia.com>
1655
1656         [css-grid] Fix grid container baseline alignment for orthogonal items
1657         https://bugs.webkit.org/show_bug.cgi?id=196141
1658
1659         Reviewed by Javier Fernandez.
1660
1661         Grid container baseline was wrongly computed when done in reference to an orthogonal item.
1662
1663         Test: imported/w3c/web-platform-tests/css/css-grid/alignment/grid-container-baseline-001.html
1664
1665         * rendering/RenderGrid.cpp:
1666         (WebCore::RenderGrid::firstLineBaseline const): Simple change to use logicalTopForChild()
1667         so it takes into account grid container and item writing modes.
1668
1669 2019-03-24  Michael Catanzaro  <mcatanzaro@igalia.com>
1670
1671         Unreviewed, fix -Wpessimizing-move warning
1672         https://bugs.webkit.org/show_bug.cgi?id=195905
1673         <rdar://problem/49121824>
1674
1675         * svg/properties/SVGPropertyList.h:
1676
1677 2019-03-23  Justin Fan  <justin_fan@apple.com>
1678
1679         [Web GPU] Prototype compute pipeline with MSL
1680         https://bugs.webkit.org/show_bug.cgi?id=196107
1681         <rdar://problem/46289650>
1682
1683         Reviewed by Myles Maxfield.
1684
1685         Add GPUComputePassEncoder, GPUComputePipeline, and GPUComputePipelineDescriptor.
1686         Implement everything needed to prototype a compute pipeline in Web GPU using Metal shaders and bound resources.
1687
1688         Test: webgpu/compute-squares.html
1689
1690         Add files and symbols:
1691         * CMakeLists.txt:
1692         * DerivedSources-input.xcfilelist:
1693         * DerivedSources-output.xcfilelist:
1694         * DerivedSources.make:
1695         * Sources.txt:
1696         * SourcesCocoa.txt:
1697         * WebCore.xcodeproj/project.pbxproj:
1698         * bindings/js/WebCoreBuiltinNames.h:
1699
1700         Misc fixes:
1701         * Modules/webgpu/WHLSL/WHLSLNameResolver.h: Missing include.
1702         * Modules/webgpu/WHLSL/WHLSLSynthesizeConstructors.cpp: Missing include.
1703         * Modules/webgpu/WebGPUPipelineStageDescriptor.cpp: Added. Move pipeline stage validation logic here.
1704         (WebCore::WebGPUPipelineStageDescriptor::tryCreateGPUPipelineStageDescriptor const):
1705         * Modules/webgpu/WebGPURenderPipeline.cpp: Remove unnecessary include.
1706         * Modules/webgpu/WebGPURenderPipeline.h:
1707         * Modules/webgpu/WebGPURenderPipelineDescriptor.cpp: Add missing inlcude.
1708         (WebCore::WebGPUPipelineStageDescriptor::tryCreateGPUPipelineStageDescriptor const): Moved to WebGPUPipelineStageDescriptor.cpp.
1709         * platform/graphics/gpu/GPUPipelineDescriptorBase.h: Add missing include.
1710         * platform/graphics/gpu/cocoa/GPURenderPipelineMetal.mm: Add missing include.
1711         (WebCore::GPURenderPipeline::GPURenderPipeline): Remove unecessary ref of GPUPipelineLayout.
1712         * platform/text/mac/TextEncodingRegistryMac.mm: Carbon.h was causing ambiguous reference build errors in this file.
1713
1714         Enable creating a GPUComputePassEncoder from a GPUCommandEncoder:
1715         * Modules/webgpu/WebGPUCommandEncoder.cpp:
1716         (WebCore::WebGPUCommandEncoder::beginRenderPass): No longer passing this WebGPUCommandEncoder to pass encoders.
1717         (WebCore::WebGPUCommandEncoder::beginComputePass): Added.
1718         * Modules/webgpu/WebGPUCommandEncoder.h:
1719         * Modules/webgpu/WebGPUCommandEncoder.idl:
1720
1721         Add GPUComputePassEncoder:
1722         * Modules/webgpu/WebGPUComputePassEncoder.cpp: Added.
1723         (WebCore::WebGPUComputePassEncoder::create):
1724         (WebCore::WebGPUComputePassEncoder::WebGPUComputePassEncoder):
1725         (WebCore::WebGPUComputePassEncoder::setPipeline):
1726         (WebCore::WebGPUComputePassEncoder::dispatch):
1727         (WebCore::WebGPUComputePassEncoder::passEncoder):
1728         (WebCore::WebGPUComputePassEncoder::passEncoder const):
1729         * Modules/webgpu/WebGPUComputePassEncoder.h: Added.
1730         * Modules/webgpu/WebGPUComputePassEncoder.idl: Added.
1731         * platform/graphics/gpu/GPUComputePassEncoder.h: Added.
1732         (WebCore::GPUComputePassEncoder::~GPUComputePassEncoder):
1733         * platform/graphics/gpu/cocoa/GPUComputePassEncoderMetal.mm: Added.
1734         (WebCore::GPUComputePassEncoder::tryCreate):
1735         (WebCore::GPUComputePassEncoder::GPUComputePassEncoder):
1736         (WebCore::GPUComputePassEncoder::setPipeline):
1737         (WebCore::GPUComputePassEncoder::dispatch): Use a default calculation for threadsPerThreadgroup while MSL is still an accepted shader format.
1738         (WebCore::GPUComputePassEncoder::platformPassEncoder const):
1739         (WebCore::GPUComputePassEncoder::useResource):
1740         (WebCore::GPUComputePassEncoder::setComputeBuffer):
1741
1742         Add GPUComputePipeline:
1743         * Modules/webgpu/WebGPUComputePipeline.cpp: Added.
1744         (WebCore::WebGPUComputePipeline::create):
1745         (WebCore::WebGPUComputePipeline::WebGPUComputePipeline):
1746         * Modules/webgpu/WebGPUComputePipeline.h: Added.
1747         (WebCore::WebGPUComputePipeline::computePipeline const):
1748         * Modules/webgpu/WebGPUComputePipeline.idl: Added.
1749         * Modules/webgpu/WebGPUComputePipelineDescriptor.cpp: Added.
1750         (WebCore::WebGPUComputePipelineDescriptor::tryCreateGPUComputePipelineDescriptor const):
1751         * Modules/webgpu/WebGPUComputePipelineDescriptor.h: Added.
1752         * Modules/webgpu/WebGPUComputePipelineDescriptor.idl: Added.
1753         * platform/graphics/gpu/GPUComputePipeline.h: Added.
1754         (WebCore::GPUComputePipeline::platformComputePipeline const):
1755         * platform/graphics/gpu/GPUComputePipelineDescriptor.h: Added.
1756         (WebCore::GPUComputePipelineDescriptor::GPUComputePipelineDescriptor):
1757         * platform/graphics/gpu/cocoa/GPUComputePipelineMetal.mm: Added.
1758         (WebCore::tryCreateMtlComputeFunction):
1759         (WebCore::tryCreateMTLComputePipelineState):
1760         (WebCore::GPUComputePipeline::tryCreate):
1761         (WebCore::GPUComputePipeline::GPUComputePipeline):
1762
1763         Enable creating a GPUComputePipeline from a GPUDevice:
1764         * Modules/webgpu/WebGPUDevice.cpp:
1765         (WebCore::WebGPUDevice::createComputePipeline const):
1766         * Modules/webgpu/WebGPUDevice.h:
1767         * Modules/webgpu/WebGPUDevice.idl:
1768         * platform/graphics/gpu/GPUDevice.cpp:
1769         (WebCore::GPUDevice::tryCreateComputePipeline const):
1770         * platform/graphics/gpu/GPUDevice.h:
1771
1772         No longer unnecessarily ref the WebGPUCommandEncoder when creating pass encoder:
1773         * Modules/webgpu/WebGPUProgrammablePassEncoder.cpp:
1774         (WebCore::WebGPUProgrammablePassEncoder::setBindGroup):
1775         (WebCore::WebGPUProgrammablePassEncoder::WebGPUProgrammablePassEncoder): Deleted.
1776         (WebCore::WebGPUProgrammablePassEncoder::setBindGroup const): Deleted.
1777         * Modules/webgpu/WebGPUProgrammablePassEncoder.h:
1778         * Modules/webgpu/WebGPURenderPassEncoder.cpp:
1779         (WebCore::WebGPURenderPassEncoder::create):
1780         (WebCore::WebGPURenderPassEncoder::WebGPURenderPassEncoder):
1781         (WebCore::WebGPURenderPassEncoder::setPipeline):
1782         (WebCore::WebGPURenderPassEncoder::passEncoder):
1783         (WebCore::WebGPURenderPassEncoder::passEncoder const):
1784         * Modules/webgpu/WebGPURenderPassEncoder.h:
1785
1786         Updates to GPUBindGroup and *setBindGroup for compute function arguments:
1787         * platform/graphics/gpu/GPUBindGroup.h:
1788         (WebCore::GPUBindGroup::vertexArgsBuffer const):
1789         (WebCore::GPUBindGroup::fragmentArgsBuffer const):
1790         (WebCore::GPUBindGroup::computeArgsBuffer const):
1791         (WebCore::GPUBindGroup::vertexArgsBuffer): Deleted. Const-qualified.
1792         (WebCore::GPUBindGroup::fragmentArgsBuffer): Ditto.
1793         * platform/graphics/gpu/cocoa/GPUBindGroupMetal.mm:
1794         (WebCore::tryGetResourceAsMTLSamplerState): Now just returns the MTLSamplerState to reduce reference churning.
1795         (WebCore::GPUBindGroup::tryCreate):
1796         (WebCore::GPUBindGroup::GPUBindGroup):
1797         (WebCore::tryGetResourceAsSampler): Renamed to tryGetResourceAsMTLSamplerState.
1798
1799         Updates to GPUProgrammablePassEncoder and GPURenderPassEncoder:
1800         * platform/graphics/gpu/GPUProgrammablePassEncoder.h:
1801         (WebCore::GPUProgrammablePassEncoder::setVertexBuffer):
1802         (WebCore::GPUProgrammablePassEncoder::setFragmentBuffer):
1803         (WebCore::GPUProgrammablePassEncoder::setComputeBuffer): Added.
1804         * platform/graphics/gpu/GPURenderPassEncoder.h:
1805         (WebCore::GPURenderPassEncoder::~GPURenderPassEncoder):
1806         * platform/graphics/gpu/GPURenderPipeline.h:
1807         * platform/graphics/gpu/cocoa/GPUProgrammablePassEncoderMetal.mm: Remove unecessary include.
1808         (WebCore::GPUProgrammablePassEncoder::endPass): No longer virtual. Delegates shared behavior for derived classes.
1809         (WebCore::GPUProgrammablePassEncoder::setBindGroup):
1810         * platform/graphics/gpu/cocoa/GPURenderPassEncoderMetal.mm:
1811         (WebCore::GPURenderPassEncoder::platformPassEncoder const):
1812         (WebCore::GPURenderPassEncoder::setPipeline):
1813         (WebCore::GPURenderPassEncoder::draw):
1814         (WebCore::GPURenderPassEncoder::useResource): These private overrides are called only by base after checking for encoder existence.
1815         (WebCore::GPURenderPassEncoder::setVertexBuffer): Ditto.
1816         (WebCore::GPURenderPassEncoder::setFragmentBuffer): Ditto.
1817         (WebCore::GPURenderPassEncoder::endPass): Deleted. Now handled by base class.
1818
1819 2019-03-23  Simon Fraser  <simon.fraser@apple.com>
1820
1821         REGRESSION (iOS 8): Scrollbar can't be hidden when webkit-overflow-scrolling is set to touch
1822         https://bugs.webkit.org/show_bug.cgi?id=137043
1823         rdar://problem/16595330
1824
1825         Reviewed by Zalan Bujtas.
1826
1827         Plumb horizontalScrollbarHiddenByStyle/verticalScrollbarHiddenByStyle through ScrollableAreaParameters
1828         to the UI process, and use it to set UIScrollView indicators visible or not.
1829
1830         Tests: fast/scrolling/ios/scrollbar-hiding.html:
1831
1832         * page/scrolling/AsyncScrollingCoordinator.cpp:
1833         (WebCore::AsyncScrollingCoordinator::setScrollingNodeScrollableAreaGeometry):
1834         * page/scrolling/ScrollingCoordinator.cpp:
1835         (WebCore::operator<<):
1836         * page/scrolling/ScrollingCoordinatorTypes.h:
1837         * page/scrolling/ScrollingTreeNode.h:
1838         * page/scrolling/ScrollingTreeOverflowScrollingNode.cpp:
1839         (WebCore::ScrollingTreeOverflowScrollingNode::dumpProperties const):
1840         * page/scrolling/ScrollingTreeScrollingNode.h:
1841         * platform/ScrollableArea.h:
1842         (WebCore::ScrollableArea::horizontalScrollbarHiddenByStyle const):
1843         (WebCore::ScrollableArea::verticalScrollbarHiddenByStyle const):
1844         * rendering/RenderLayer.cpp:
1845         (WebCore::scrollbarHiddenByStyle):
1846         (WebCore::RenderLayer::horizontalScrollbarHiddenByStyle const):
1847         (WebCore::RenderLayer::verticalScrollbarHiddenByStyle const):
1848         * rendering/RenderLayer.h:
1849
1850 2019-03-23  Zalan Bujtas  <zalan@apple.com>
1851
1852         [ContentChangeObserver] Add support for observing opacity.
1853         https://bugs.webkit.org/show_bug.cgi?id=196172
1854
1855         Reviewed by Simon Fraser.
1856
1857         This patch adds support for observing opacity changes. At this point we only track one transition at a time.
1858         if the page registers transition on both left and opacity, the first is getting observed only.
1859
1860         Tests: fast/events/touch/ios/content-observation/opacity-change-happens-on-mousemove-with-opacity-and-left.html
1861                fast/events/touch/ios/content-observation/opacity-change-happens-on-mousemove-with-transition.html
1862                fast/events/touch/ios/content-observation/opacity-change-happens-on-mousemove.html
1863                fast/events/touch/ios/content-observation/opacity-change-happens-on-touchstart-with-transition.html
1864                fast/events/touch/ios/content-observation/opacity-change-happens-on-touchstart.html
1865
1866         * page/ios/ContentChangeObserver.cpp:
1867         (WebCore::isConsideredHidden):
1868         (WebCore::ContentChangeObserver::didAddTransition):
1869         * page/ios/ContentChangeObserver.h:
1870         (WebCore::ContentChangeObserver::isObservedPropertyForTransition const):
1871
1872 2019-03-23  Zalan Bujtas  <zalan@apple.com>
1873
1874         [ContentChangeObserver] Check if the transitioned content is visible at onAnimationEnd
1875         https://bugs.webkit.org/show_bug.cgi?id=196171
1876
1877         Reviewed by Simon Fraser.
1878
1879         At onAnimationEnd we don't yet have the final computed style for the transitioned content.
1880         However the current state (before computing the final style) might already be qualified to be visible.
1881         Introduce "CompletedTransition" to indicate that the transition is all set as far observing is concerned
1882         (as opposed to "EndedTransition" where we still need to observe the content for the final style change).
1883
1884         Test: fast/events/touch/ios/content-observation/10ms-delay-transition-on-touch-start-with-non-0px-end.html
1885
1886         * page/ios/ContentChangeObserver.cpp:
1887         (WebCore::ContentChangeObserver::didFinishTransition):
1888         (WebCore::ContentChangeObserver::adjustObservedState):
1889         * page/ios/ContentChangeObserver.h:
1890
1891 2019-03-23  Carlos Garcia Campos  <cgarcia@igalia.com>
1892
1893         [GTK] Remove build time dependency on Geoclue2
1894         https://bugs.webkit.org/show_bug.cgi?id=195994
1895
1896         Reviewed by Michael Catanzaro.
1897
1898         Remove old Geoclue implementation.
1899
1900         * PlatformGTK.cmake:
1901         * SourcesGTK.txt:
1902         * platform/geoclue/GeolocationProviderGeoclue.cpp: Removed.
1903         * platform/geoclue/GeolocationProviderGeoclue.h: Removed.
1904         * platform/geoclue/GeolocationProviderGeoclueClient.h: Removed.
1905
1906 2019-03-22  Eric Carlson  <eric.carlson@apple.com>
1907
1908         Flaky AVEncoderBitRateKey symbol not found crash on imported/w3c/web-platform-tests/mediacapture-record/MediaRecorder-constructor.html
1909         https://bugs.webkit.org/show_bug.cgi?id=193724
1910         <rdar://problem/47483831>
1911
1912         Reviewed by Jer Noble.
1913
1914         The soft link macros occasionally fail to load constants from AVFoundation.framework
1915         which are actually in one of its sub-frameworks. While we investigate the cause
1916         cause of the failure, ise the SOFT_LINK_CONSTANT_MAY_FAIL so we can detect the failure
1917         and return a local copy of the string instead of crashing.
1918         
1919         No new tests, this should prevent existing tests from crashing.
1920
1921         * platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.mm:
1922         (WebCore::myAVFormatIDKey):
1923         (WebCore::myAVNumberOfChannelsKey):
1924         (WebCore::myAVSampleRateKey):
1925         (WebCore::myAVEncoderBitRateKey):
1926
1927 2019-03-22  Youenn Fablet  <youenn@apple.com>
1928
1929         REGRESSION: Flaky ASSERTION FAILED: !m_killed seen with http/tests/security/cross-origin-worker-indexeddb.html
1930         https://bugs.webkit.org/show_bug.cgi?id=196024
1931         <rdar://problem/49117272>
1932
1933         Reviewed by Alexey Proskuryakov.
1934
1935         Do not proceed with opening the database if it is being closed.
1936         Speculative fix, this should stop making test crashing on bots.
1937
1938         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
1939         (WebCore::IDBServer::UniqueIDBDatabase::performCurrentOpenOperation):
1940
1941 2019-03-22  Youenn Fablet  <youenn@apple.com>
1942
1943         storage/indexeddb/closed-cursor-private.html is crashing on debug
1944         https://bugs.webkit.org/show_bug.cgi?id=196101
1945
1946         Reviewed by Alex Christensen.
1947
1948         In case of immediate close for user delete, the transaction might be deleted.
1949         If the request for space is pending, it will be executed with an error as parameter.
1950         In that case, the call to didCommitTransaction will not find any existing transaction.
1951         Speculative fix, test should no longer crash.
1952
1953         * Modules/indexeddb/server/UniqueIDBDatabaseConnection.cpp:
1954         (WebCore::IDBServer::UniqueIDBDatabaseConnection::didCommitTransaction):
1955
1956 2019-03-22  Devin Rousso  <drousso@apple.com>
1957
1958         Web Inspector: Safari Canvas Inspector seems to show the canvas being rendered twice per frame.
1959         https://bugs.webkit.org/show_bug.cgi?id=196082
1960         <rdar://problem/49113496>
1961
1962         Reviewed by Dean Jackson.
1963
1964         Tests: inspector/canvas/recording-2d.html
1965                inspector/canvas/recording-bitmaprenderer.html
1966                inspector/canvas/recording-html-2d.html
1967                inspector/canvas/recording-webgl.html
1968                inspector/canvas/setRecordingAutoCaptureFrameCount.html
1969
1970         WebGL `<canvas>` follow a different "rendering" path such that `HTMLCanvasElement::paint`
1971         isn't called. Previously, there was a 0s timer that was started after the first action of a
1972         frame was recorded (for the case that the `<canvas>` isn't attached to the DOM) that would
1973         automatically stop the recording. It was possible that actions in two different "frame"s
1974         were recorded as part of the same frame, because the WebGL `<canvas>` would instead fall
1975         back to the timer to know when the "frame" had ended.
1976
1977         Now, there is additional instrumentation for the WebGL specific rendering path.
1978         Additionally, replace the 0s timer with a microtask for more "immediate" calling.
1979
1980         * html/HTMLCanvasElement.cpp:
1981         (WebCore::HTMLCanvasElement::paint):
1982         Ensure that the `InspectorInstrumentation` call is last. This matches what we expect, as
1983         before we were instrumenting right before is it about to paint.
1984
1985         * platform/graphics/GraphicsContext3D.h:
1986         (WebCore::GraphicsContext3D::Client::~Client): Added.
1987         (WebCore::GraphicsContext3D::addClient): Added.
1988         (WebCore::GraphicsContext3D::removeClient): Added.
1989         (WebCore::GraphicsContext3D::setWebGLContext): Deleted.
1990         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
1991         (WebCore::GraphicsContext3D::markLayerComposited):
1992         (WebCore::GraphicsContext3D::forceContextLost):
1993         (WebCore::GraphicsContext3D::recycleContext):
1994         (WebCore::GraphicsContext3D::dispatchContextChangedNotification):
1995         * html/canvas/WebGLRenderingContextBase.h:
1996         * html/canvas/WebGLRenderingContextBase.cpp:
1997         (WebCore::WebGLRenderingContextBase::WebGLRenderingContextBase):
1998         (WebCore::WebGLRenderingContextBase::destroyGraphicsContext3D):
1999         (WebCore::WebGLRenderingContextBase::didComposite): Added.
2000         (WebCore::WebGLRenderingContextBase::forceContextLost):
2001         (WebCore::WebGLRenderingContextBase::recycleContext):
2002         (WebCore::WebGLRenderingContextBase::dispatchContextChangedNotification): Added.
2003         (WebCore::WebGLRenderingContextBase::dispatchContextChangedEvent): Deleted.
2004         Introduce a `GraphicsContext3DClient` abstract class, rather than passing the
2005         `WebGLRenderingContextBase` directly to the `GraphicsContext3D` (layering violation).
2006         Notify the client whenever the `GraphicsContext3D` composites, which will in turn notify the
2007         `InspectorCanvasAgent` so that it knows that the "frame" is over.
2008
2009         * inspector/agents/InspectorCanvasAgent.h:
2010         * inspector/agents/InspectorCanvasAgent.cpp:
2011         (WebCore::InspectorCanvasAgent::InspectorCanvasAgent):
2012         (WebCore::InspectorCanvasAgent::requestNode):
2013         (WebCore::InspectorCanvasAgent::requestContent):
2014         (WebCore::InspectorCanvasAgent::requestCSSCanvasClientNodes):
2015         (WebCore::InspectorCanvasAgent::resolveCanvasContext):
2016         (WebCore::InspectorCanvasAgent::startRecording):
2017         (WebCore::InspectorCanvasAgent::stopRecording):
2018         (WebCore::InspectorCanvasAgent::requestShaderSource):
2019         (WebCore::InspectorCanvasAgent::updateShader):
2020         (WebCore::InspectorCanvasAgent::setShaderProgramDisabled):
2021         (WebCore::InspectorCanvasAgent::setShaderProgramHighlighted):
2022         (WebCore::InspectorCanvasAgent::didChangeCSSCanvasClientNodes):
2023         (WebCore::InspectorCanvasAgent::didChangeCanvasMemory):
2024         (WebCore::InspectorCanvasAgent::recordCanvasAction):
2025         (WebCore::InspectorCanvasAgent::canvasDestroyed):
2026         (WebCore::InspectorCanvasAgent::didFinishRecordingCanvasFrame):
2027         (WebCore::InspectorCanvasAgent::consoleStartRecordingCanvas):
2028         (WebCore::InspectorCanvasAgent::didEnableExtension):
2029         (WebCore::InspectorCanvasAgent::didCreateProgram):
2030         (WebCore::InspectorCanvasAgent::willDeleteProgram):
2031         (WebCore::InspectorCanvasAgent::isShaderProgramDisabled):
2032         (WebCore::InspectorCanvasAgent::isShaderProgramHighlighted):
2033         (WebCore::InspectorCanvasAgent::clearCanvasData):
2034         (WebCore::InspectorCanvasAgent::assertInspectorCanvas):
2035         (WebCore::InspectorCanvasAgent::findInspectorCanvas):
2036         (WebCore::InspectorCanvasAgent::assertInspectorProgram):
2037         (WebCore::InspectorCanvasAgent::findInspectorProgram):
2038         (WebCore::InspectorCanvasAgent::canvasRecordingTimerFired): Deleted.
2039         Replace raw pointers with `RefPtr`s. This is primarily used so that the microtask (instead
2040         of a timer) that is enqueued after the first action of each frame  is recorded can access a
2041         ref-counted instance of an `InspectorCanvas`, ensuring that it isn't destructed.
2042
2043         * inspector/InspectorCanvas.h:
2044         * inspector/InspectorCanvas.cpp:
2045         (WebCore::InspectorCanvas::canvasElement):
2046         (WebCore::InspectorCanvas::recordAction):
2047         (WebCore::InspectorCanvas::finalizeFrame):
2048         (WebCore::InspectorCanvas::releaseObjectForRecording): Added.
2049         (WebCore::InspectorCanvas::getCanvasContentAsDataURL):
2050         (WebCore::InspectorCanvas::appendActionSnapshotIfNeeded):
2051         (WebCore::InspectorCanvas::buildInitialState):
2052         (WebCore::InspectorCanvas::releaseInitialState): Deleted.
2053         (WebCore::InspectorCanvas::releaseFrames): Deleted.
2054         (WebCore::InspectorCanvas::releaseData): Deleted.
2055         Move the recording payload construction logic to `InspectorCanvas` so the actual data
2056         doesn't need to leave that class.
2057         Drive-by: unify the logic for getting the contents of a canvas from `InspectorCanvasAgent`.
2058
2059 2019-03-22  Keith Rollin  <krollin@apple.com>
2060
2061         Enable ThinLTO support in Production builds
2062         https://bugs.webkit.org/show_bug.cgi?id=190758
2063         <rdar://problem/45413233>
2064
2065         Reviewed by Daniel Bates.
2066
2067         Enable building with Thin LTO in Production when using Xcode 10.2 or
2068         later. This change results in a 1.45% progression in PLT5. Full
2069         Production build times increase about 2-3%. Incremental build times
2070         are more severely affected, and so LTO is not enabled for local
2071         engineering builds.
2072
2073         LTO is enabled only on macOS for now, until rdar://problem/49013399,
2074         which affects ARM builds, is fixed.
2075
2076         Removed the conditionals that disabled LTO on 32-bit systems since we
2077         no longer build for those.
2078
2079         To change the LTO setting when building locally:
2080
2081         - If building with `make`, specify WK_LTO_MODE={none,thin,full} on the
2082           command line.
2083         - If building with `build-webkit`, specify --lto-mode={none,thin,full}
2084           on the command line.
2085         - If building with `build-root`, specify --lto={none,thin,full} on the
2086           command line.
2087         - If building with Xcode, create a LocalOverrides.xcconfig file at the
2088           top level of your repository directory (if needed) and define
2089           WK_LTO_MODE to full, thin, or none.
2090
2091         No new tests since there should be no observable behavior difference.
2092
2093         * Configurations/Base.xcconfig:
2094
2095 2019-03-22  Ryan Haddad  <ryanhaddad@apple.com>
2096
2097         Unreviewed, rolling out r243356.
2098
2099         Causes assertion failures with WebGL layout tests on macOS and
2100         iOS.
2101
2102         Reverted changeset:
2103
2104         "Web Inspector: Safari Canvas Inspector seems to show the
2105         canvas being rendered twice per frame."
2106         https://bugs.webkit.org/show_bug.cgi?id=196082
2107         https://trac.webkit.org/changeset/243356
2108
2109 2019-03-22  Antti Koivisto  <antti@apple.com>
2110
2111         Handle UI side hit testing for ScrollPositioningBehavior::Stationary positioned nodes
2112         https://bugs.webkit.org/show_bug.cgi?id=196100
2113         <rdar://problem/49117933>
2114
2115         Reviewed by Simon Fraser.
2116
2117         Test: fast/scrolling/ios/overflow-scroll-overlap-6.html
2118
2119         * page/scrolling/ScrollingTree.cpp:
2120         (WebCore::ScrollingTree::commitTreeState):
2121         * page/scrolling/ScrollingTree.h:
2122         (WebCore::ScrollingTree::positionedNodesWithRelatedOverflow):
2123
2124         Add a separate map of positioned node ids for easy access.
2125
2126         * page/scrolling/cocoa/ScrollingTreePositionedNode.h:
2127         (WebCore::ScrollingTreePositionedNode::scrollPositioningBehavior const):
2128         (WebCore::ScrollingTreePositionedNode::relatedOverflowScrollingNodes const):
2129         * page/scrolling/cocoa/ScrollingTreePositionedNode.mm:
2130         (WebCore::ScrollingTreePositionedNode::commitStateBeforeChildren):
2131
2132 2019-03-22  Antoine Quint  <graouts@apple.com>
2133
2134         [Web Animations] com.apple.WebKit.WebContent.Development at com.apple.WebCore: WebCore::WebAnimation::timeToNextTick const + 757
2135         https://bugs.webkit.org/show_bug.cgi?id=196125
2136         <rdar://problem/46520059>
2137
2138         Reviewed by Dean Jackson.
2139
2140         Because of floating point math in playState() that wouldn't account for timeEpsilon, we would get into a state where the animation phase
2141         was "after" but the play state was "running" when the current time was about a microsecond away from the active time boundary. This meant
2142         that the early return statement in WebAnimation::timeToNextTick() would not be hit while we would not handle the possibility of being in
2143         the "after" phase in the rest of the function, therefore eventually hitting the ASSERT_NOT_REACHED() at the end of the function.
2144
2145         We now account for timeEpsilon in playState() and correctly report we're in the "finished" play state when in the "after" phase also.
2146
2147         * animation/WebAnimation.cpp:
2148         (WebCore::WebAnimation::playState const):
2149
2150 2019-03-22  Alicia Boya García  <aboya@igalia.com>
2151
2152         [MSE][GStreamer] Don't construct segments on PlaybackPipeline::flush
2153         https://bugs.webkit.org/show_bug.cgi?id=195867
2154
2155         Reviewed by Xabier Rodriguez-Calvar.
2156
2157         The previous approach did not really work for flushes on only one
2158         branch, as setting reset-time in FLUSH_STOP affects the running time
2159         of the entire pipeline, causing timing issues in the other branch.
2160
2161         Since it's preferable not to interfere with the other branch if
2162         possible, setting reset-time to FALSE fixes that problem.
2163
2164         Also, it's not necessary to fabricate a segment. Since we are not
2165         seeking, only the base needs to be adjusted, and gstbasesrc already
2166         handles this correctly by default.
2167
2168         This fixes an audio/video synchronization bug in YT when some
2169         automatic quality changes occur.
2170
2171         Tests: imported/w3c/web-platform-tests/media-source/mediasource-correct-frames-after-reappend.html
2172                imported/w3c/web-platform-tests/media-source/mediasource-correct-frames.html
2173
2174         * platform/graphics/gstreamer/mse/PlaybackPipeline.cpp:
2175         (WebCore::PlaybackPipeline::flush):
2176
2177 2019-03-22  Frederic Wang  <fwang@igalia.com>
2178
2179         Move implementation of mathsize to a single place
2180         https://bugs.webkit.org/show_bug.cgi?id=196129
2181
2182         Reviewed by Ryosuke Niwa.
2183
2184         Currently, mathsize is partially implemented in the MathML UA stylesheet and partially
2185         implemented in the MathML DOM classes using addPropertyToPresentationAttributeStyle. This
2186         patch moves the whole implementation to the latter place, so that it's easier to understand.
2187         It will also allow to conditionally disable the mathsize values removed from MathML Core.
2188
2189         No new tests, already covered by existing tests.
2190
2191         * css/mathml.css: Remove mathsize rules.
2192         * mathml/MathMLElement.cpp:
2193         (WebCore::convertMathSizeIfNeeded): Convert "small", "normal" and "big" to the values that
2194         used to be in the UA stylesheet. Also add a comment that we don't support all MathML lengths.
2195         (WebCore::MathMLElement::collectStyleForPresentationAttribute): Don't skip "small", "normal"
2196         or "big".
2197         (WebCore::convertToPercentageIfNeeded): Renamed to convertMathSizeIfNeeded.
2198
2199 2019-03-21  Said Abou-Hallawa  <sabouhallawa@apple.com>
2200
2201         Remove the SVG tear off objects for SVGNumber, SVGNumberList and SVGAnimatedNumberList
2202         https://bugs.webkit.org/show_bug.cgi?id=196084
2203
2204         Reviewed by Simon Fraser.
2205
2206         To remove the tear off objects for these interfaces, we need to do the
2207         following:
2208
2209         -- SVGNumber will be a superclass of SVGValueProperty<float>. It provides
2210            the DOM interface functions.
2211
2212         -- SVGNumberList will be a superclass of SVGValuePropertyList<SVGNumber>.
2213            It provides creation, parsing and converting to string functions.
2214
2215         -- SVGAnimatedNumberList will be defined as SVGAnimatedPropertyList<SVGNumberList>.
2216
2217         To make things work as expected:
2218
2219         -- Properties of type SVGAnimatedNumberList have to be registered with
2220            SVGPropertyOwnerRegistry.
2221         -- An accessor, an animator and an animation function should be defined
2222            for SVGAnimatedNumberList.
2223
2224         * Sources.txt:
2225         * WebCore.xcodeproj/project.pbxproj:
2226         * rendering/svg/SVGTextLayoutAttributesBuilder.cpp:
2227         (WebCore::updateCharacterData):
2228         (WebCore::SVGTextLayoutAttributesBuilder::fillCharacterDataMap):
2229         * svg/SVGAnimatedNumberList.cpp: Removed.
2230         * svg/SVGAnimatedNumberList.h: Removed.
2231         * svg/SVGAnimatedPointList.cpp: Removed.
2232         * svg/SVGAnimatedPointList.h: Removed.
2233         * svg/SVGAnimatedType.h:
2234         (WebCore::SVGAnimatedType::type const):
2235         * svg/SVGAnimatorFactory.h:
2236         (WebCore::SVGAnimatorFactory::create):
2237         * svg/SVGComponentTransferFunctionElement.cpp:
2238         (WebCore::SVGComponentTransferFunctionElement::SVGComponentTransferFunctionElement):
2239         (WebCore::SVGComponentTransferFunctionElement::registerAttributes):
2240         (WebCore::SVGComponentTransferFunctionElement::parseAttribute):
2241         * svg/SVGComponentTransferFunctionElement.h:
2242         (WebCore::SVGComponentTransferFunctionElement::tableValues const):
2243         (WebCore::SVGComponentTransferFunctionElement::tableValuesAnimated):
2244         * svg/SVGFEColorMatrixElement.cpp:
2245         (WebCore::SVGFEColorMatrixElement::SVGFEColorMatrixElement):
2246         (WebCore::SVGFEColorMatrixElement::registerAttributes):
2247         (WebCore::SVGFEColorMatrixElement::parseAttribute):
2248         (WebCore::SVGFEColorMatrixElement::build const):
2249         * svg/SVGFEColorMatrixElement.h:
2250         * svg/SVGFEConvolveMatrixElement.cpp:
2251         (WebCore::SVGFEConvolveMatrixElement::SVGFEConvolveMatrixElement):
2252         (WebCore::SVGFEConvolveMatrixElement::registerAttributes):
2253         (WebCore::SVGFEConvolveMatrixElement::parseAttribute):
2254         (WebCore::SVGFEConvolveMatrixElement::build const):
2255         * svg/SVGFEConvolveMatrixElement.h:
2256         * svg/SVGNumber.h:
2257         (WebCore::SVGNumber::create):
2258         (WebCore::SVGNumber::clone const):
2259         (WebCore::SVGNumber::valueForBindings):
2260         (WebCore::SVGNumber::setValueForBindings):
2261         (WebCore::SVGNumber::SVGNumber): Deleted.
2262         * svg/SVGNumberList.h:
2263         (WebCore::SVGNumberList::create):
2264         (WebCore::SVGNumberList::parse):
2265         (WebCore::SVGNumberList::SVGNumberList): Deleted.
2266         * svg/SVGNumberListValues.cpp: Removed.
2267         * svg/SVGNumberListValues.h: Removed.
2268         * svg/SVGTextPositioningElement.cpp:
2269         (WebCore::SVGTextPositioningElement::SVGTextPositioningElement):
2270         (WebCore::SVGTextPositioningElement::registerAttributes):
2271         (WebCore::SVGTextPositioningElement::parseAttribute):
2272         * svg/SVGTextPositioningElement.h:
2273         (WebCore::SVGTextPositioningElement::rotate const):
2274         (WebCore::SVGTextPositioningElement::rotateAnimated):
2275         * svg/SVGValue.h:
2276         * svg/properties/SVGAnimatedPropertyAccessorImpl.h:
2277         * svg/properties/SVGAnimatedPropertyAnimatorImpl.h:
2278         * svg/properties/SVGAnimatedPropertyImpl.h:
2279         * svg/properties/SVGAnimationAdditiveListFunctionImpl.h:
2280         (WebCore::SVGAnimationNumberListFunction::progress):
2281         * svg/properties/SVGAttributeRegistry.h:
2282         * svg/properties/SVGPropertyOwnerRegistry.h:
2283         (WebCore::SVGPropertyOwnerRegistry::registerProperty):
2284
2285 2019-03-21  Devin Rousso  <drousso@apple.com>
2286
2287         Web Inspector: Safari Canvas Inspector seems to show the canvas being rendered twice per frame.
2288         https://bugs.webkit.org/show_bug.cgi?id=196082
2289         <rdar://problem/49113496>
2290
2291         Reviewed by Dean Jackson.
2292
2293         Tests: inspector/canvas/recording-2d.html
2294                inspector/canvas/recording-bitmaprenderer.html
2295                inspector/canvas/recording-html-2d.html
2296                inspector/canvas/recording-webgl.html
2297                inspector/canvas/setRecordingAutoCaptureFrameCount.html
2298
2299         WebGL `<canvas>` follow a different "rendering" path such that `HTMLCanvasElement::paint`
2300         isn't called. Previously, there was a 0s timer that was started after the first action of a
2301         frame was recorded (for the case that the `<canvas>` isn't attached to the DOM) that would
2302         automatically stop the recording. It was possible that actions in two different "frame"s
2303         were recorded as part of the same frame, because the WebGL `<canvas>` would instead fall
2304         back to the timer to know when the "frame" had ended.
2305
2306         Now, there is additional instrumentation for the WebGL specific rendering path.
2307         Additionally, replace the 0s timer with a microtask for more "immediate" calling.
2308
2309         * html/HTMLCanvasElement.cpp:
2310         (WebCore::HTMLCanvasElement::paint):
2311         Ensure that the `InspectorInstrumentation` call is last. This matches what we expect, as
2312         before we were instrumenting right before is it about to paint.
2313
2314         * platform/graphics/GraphicsContext3D.h:
2315         (WebCore::GraphicsContext3D::Client::~Client): Added.
2316         (WebCore::GraphicsContext3D::addClient): Added.
2317         (WebCore::GraphicsContext3D::removeClient): Added.
2318         (WebCore::GraphicsContext3D::setWebGLContext): Deleted.
2319         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
2320         (WebCore::GraphicsContext3D::markLayerComposited):
2321         (WebCore::GraphicsContext3D::forceContextLost):
2322         (WebCore::GraphicsContext3D::recycleContext):
2323         (WebCore::GraphicsContext3D::dispatchContextChangedNotification):
2324         * html/canvas/WebGLRenderingContextBase.h:
2325         * html/canvas/WebGLRenderingContextBase.cpp:
2326         (WebCore::WebGLRenderingContextBase::WebGLRenderingContextBase):
2327         (WebCore::WebGLRenderingContextBase::destroyGraphicsContext3D):
2328         (WebCore::WebGLRenderingContextBase::didComposite): Added.
2329         (WebCore::WebGLRenderingContextBase::forceContextLost):
2330         (WebCore::WebGLRenderingContextBase::recycleContext):
2331         (WebCore::WebGLRenderingContextBase::dispatchContextChangedNotification): Added.
2332         (WebCore::WebGLRenderingContextBase::dispatchContextChangedEvent): Deleted.
2333         Introduce a `GraphicsContext3DClient` abstract class, rather than passing the
2334         `WebGLRenderingContextBase` directly to the `GraphicsContext3D` (layering violation).
2335         Notify the client whenever the `GraphicsContext3D` composites, which will in turn notify the
2336         `InspectorCanvasAgent` so that it knows that the "frame" is over.
2337
2338         * inspector/agents/InspectorCanvasAgent.h:
2339         * inspector/agents/InspectorCanvasAgent.cpp:
2340         (WebCore::InspectorCanvasAgent::InspectorCanvasAgent):
2341         (WebCore::InspectorCanvasAgent::requestNode):
2342         (WebCore::InspectorCanvasAgent::requestContent):
2343         (WebCore::InspectorCanvasAgent::requestCSSCanvasClientNodes):
2344         (WebCore::InspectorCanvasAgent::resolveCanvasContext):
2345         (WebCore::InspectorCanvasAgent::startRecording):
2346         (WebCore::InspectorCanvasAgent::stopRecording):
2347         (WebCore::InspectorCanvasAgent::requestShaderSource):
2348         (WebCore::InspectorCanvasAgent::updateShader):
2349         (WebCore::InspectorCanvasAgent::setShaderProgramDisabled):
2350         (WebCore::InspectorCanvasAgent::setShaderProgramHighlighted):
2351         (WebCore::InspectorCanvasAgent::didChangeCSSCanvasClientNodes):
2352         (WebCore::InspectorCanvasAgent::didChangeCanvasMemory):
2353         (WebCore::InspectorCanvasAgent::recordCanvasAction):
2354         (WebCore::InspectorCanvasAgent::canvasDestroyed):
2355         (WebCore::InspectorCanvasAgent::didFinishRecordingCanvasFrame):
2356         (WebCore::InspectorCanvasAgent::consoleStartRecordingCanvas):
2357         (WebCore::InspectorCanvasAgent::didEnableExtension):
2358         (WebCore::InspectorCanvasAgent::didCreateProgram):
2359         (WebCore::InspectorCanvasAgent::willDeleteProgram):
2360         (WebCore::InspectorCanvasAgent::isShaderProgramDisabled):
2361         (WebCore::InspectorCanvasAgent::isShaderProgramHighlighted):
2362         (WebCore::InspectorCanvasAgent::clearCanvasData):
2363         (WebCore::InspectorCanvasAgent::assertInspectorCanvas):
2364         (WebCore::InspectorCanvasAgent::findInspectorCanvas):
2365         (WebCore::InspectorCanvasAgent::assertInspectorProgram):
2366         (WebCore::InspectorCanvasAgent::findInspectorProgram):
2367         (WebCore::InspectorCanvasAgent::canvasRecordingTimerFired): Deleted.
2368         Replace raw pointers with `RefPtr`s. This is primarily used so that the microtask (instead
2369         of a timer) that is enqueued after the first action of each frame  is recorded can access a
2370         ref-counted instance of an `InspectorCanvas`, ensuring that it isn't destructed.
2371
2372         * inspector/InspectorCanvas.h:
2373         * inspector/InspectorCanvas.cpp:
2374         (WebCore::InspectorCanvas::canvasElement):
2375         (WebCore::InspectorCanvas::recordAction):
2376         (WebCore::InspectorCanvas::finalizeFrame):
2377         (WebCore::InspectorCanvas::releaseObjectForRecording): Added.
2378         (WebCore::InspectorCanvas::getCanvasContentAsDataURL):
2379         (WebCore::InspectorCanvas::appendActionSnapshotIfNeeded):
2380         (WebCore::InspectorCanvas::buildInitialState):
2381         (WebCore::InspectorCanvas::releaseInitialState): Deleted.
2382         (WebCore::InspectorCanvas::releaseFrames): Deleted.
2383         (WebCore::InspectorCanvas::releaseData): Deleted.
2384         Move the recording payload construction logic to `InspectorCanvas` so the actual data
2385         doesn't need to leave that class.
2386         Drive-by: unify the logic for getting the contents of a canvas from `InspectorCanvasAgent`.
2387
2388 2019-03-21  Tim Horton  <timothy_horton@apple.com>
2389
2390         Adopt UIWKDocumentContext
2391         https://bugs.webkit.org/show_bug.cgi?id=196040
2392         <rdar://problem/48642440>
2393
2394         Reviewed by Ryosuke Niwa.
2395
2396         New API test: WebKit.DocumentEditingContext
2397
2398         * dom/Range.h:
2399         * editing/TextGranularity.h:
2400         Make TextGranularity encodable by providing EnumTraits.
2401
2402         * editing/TextIterator.cpp:
2403         (WebCore::plainTextReplacingNoBreakSpace):
2404         * editing/TextIterator.h:
2405         Expose an nbsp-replacing variant of plainText that takes Positions instead of Ranges.
2406
2407 2019-03-21  Sihui Liu  <sihui_liu@apple.com>
2408
2409         Fix key path extraction code in IndexedDB to check own property
2410         https://bugs.webkit.org/show_bug.cgi?id=196099
2411
2412         Reviewed by Ryosuke Niwa.
2413
2414         Covered by existing tests.
2415
2416         * Modules/indexeddb/IDBFactory.cpp:
2417         (WebCore::IDBFactory::cmp):
2418         We don't need to check the second parameters if the first is already invalid.
2419
2420         * Modules/indexeddb/IDBKeyRange.cpp:
2421         (WebCore::IDBKeyRange::bound):
2422         Ditto.
2423
2424         * Modules/indexeddb/IDBObjectStore.cpp:
2425         (WebCore::IDBObjectStore::putOrAdd):
2426         we should not clear the exception during serialization because the execeptions may be explicitly thrown by parameters.
2427
2428         * bindings/js/IDBBindingUtilities.cpp:
2429         (WebCore::get):
2430         Fix implementation according to https://www.w3.org/TR/IndexedDB-2/#extract-key-from-value.
2431
2432         (WebCore::canInjectNthValueOnKeyPath):
2433         Check the last identifier.
2434
2435 2019-03-21  Antoine Quint  <graouts@apple.com>
2436
2437         [Web Animations] JS wrapper may be deleted while animation is yet to dispatch its finish event
2438         https://bugs.webkit.org/show_bug.cgi?id=196118
2439         <rdar://problem/46614137>
2440
2441         Reviewed by Ryosuke Niwa.
2442
2443         Test: webanimations/js-wrapper-kept-alive.html
2444
2445         We need to teach WebAnimation to keep its JS wrapper alive if it's relevant or could become relevant again by virtue of having a timeline.
2446
2447         * animation/WebAnimation.cpp:
2448         (WebCore::WebAnimation::stop): Drive-by fix for the missing superclass method call.
2449         (WebCore::WebAnimation::hasPendingActivity const):
2450         * animation/WebAnimation.h:
2451
2452 2019-03-21  Jer Noble  <jer.noble@apple.com>
2453
2454         Inband Text Track cues interspersed with Data cues can display out of order.
2455         https://bugs.webkit.org/show_bug.cgi?id=196095
2456
2457         Reviewed by Eric Carlson.
2458
2459         The compareCueIntervalForDisplay() comparator depends on a virtual function, isPositionedAbove(TextTrackCue* other),
2460         but this comparison returns inconsistent results for cueA->isPositionedAbove(cueB) and cueB->isPositionedAbove(cueA)
2461         if the two cues are different subclasses of TextTrackCue.
2462
2463         The underlying algorithm should be fixed in a future patch, but for now, remove all non-displaying cues from the array
2464         of activeCues before sorting, rather than after when iterating over the sorted list of activeCues.
2465
2466         * html/shadow/MediaControlElements.cpp:
2467         (WebCore::MediaControlTextTrackContainerElement::updateDisplay):
2468
2469 2019-03-21  Youenn Fablet  <youenn@apple.com>
2470
2471         Cache API and IDB space usages should be initialized on first quota check
2472         https://bugs.webkit.org/show_bug.cgi?id=195707
2473
2474         Reviewed by Chris Dumez.
2475
2476         Add a way to require IDBServer to create a quota user for a given origin.
2477         Make sure that removing a user might kick-in processing of pending requests.
2478         In the case of processing pending requests, we should not decide on the first task
2479         except if it is triggered by a request space response.
2480         Update processPendingRequests accordingly.
2481
2482         Tests: http/tests/IndexedDB/storage-limit-1.https.html
2483                http/tests/IndexedDB/storage-limit-2.https.html
2484
2485         * Modules/indexeddb/server/IDBServer.h:
2486         (WebCore::IDBServer::IDBServer::initializeQuotaUser):
2487         * storage/StorageQuotaManager.cpp:
2488         (WebCore::StorageQuotaManager::removeUser):
2489         (WebCore::StorageQuotaManager::askForMoreSpace):
2490         (WebCore::StorageQuotaManager::processPendingRequests):
2491         * storage/StorageQuotaManager.h:
2492
2493 2019-03-21  Alex Christensen  <achristensen@webkit.org>
2494
2495         Fix iOS build after r243337
2496         https://bugs.webkit.org/show_bug.cgi?id=195935
2497
2498         * platform/ios/PlaybackSessionInterfaceAVKit.mm:
2499         (WebCore::PlaybackSessionInterfaceAVKit::playbackSessionModel const):
2500         (WebCore::playbackSessionModel const): Deleted.
2501
2502 2019-03-21  Brent Fulgham  <bfulgham@apple.com>
2503
2504         Hardening: Use WeakPtrs in PlaybackSessionInterface{Mac,AVKit}
2505         https://bugs.webkit.org/show_bug.cgi?id=195935
2506         <rdar://problem/49007015>
2507
2508         Reviewed by Eric Carlson.
2509
2510         The PlaybackSessionInterface{Mac,AVKit} implementations store their playback session model
2511         and playback controls manager members as bare pointers, something we've been working
2512         to eliminate.
2513         
2514         This patch corrects this oversight.
2515
2516         No new tests since no changes in behavior.
2517
2518         * platform/cocoa/PlaybackSessionModel.h:
2519         * platform/ios/PlaybackSessionInterfaceAVKit.h:
2520         * platform/ios/PlaybackSessionInterfaceAVKit.mm:
2521         (WebCore::PlaybackSessionInterfaceAVKit::PlaybackSessionInterfaceAVKit):
2522         (WebCore::playbackSessionModel const): Moved to implementation since WEBCORE_EXPORT is not
2523         supposed to be used with inline methods.
2524         * platform/mac/PlaybackSessionInterfaceMac.h:
2525         * platform/mac/PlaybackSessionInterfaceMac.mm:
2526         (WebCore::PlaybackSessionInterfaceMac::PlaybackSessionInterfaceMac):
2527         (WebCore::PlaybackSessionInterfaceMac::playbackSessionModel const):
2528         (WebCore::PlaybackSessionInterfaceMac::beginScrubbing):
2529         (WebCore::PlaybackSessionInterfaceMac::endScrubbing):
2530         (WebCore::PlaybackSessionInterfaceMac::playBackControlsManager):
2531         * platform/mac/VideoFullscreenInterfaceMac.mm:
2532         (WebCore::VideoFullscreenInterfaceMac::~VideoFullscreenInterfaceMac):
2533         * platform/mac/WebPlaybackControlsManager.mm:
2534         (-[WebPlaybackControlsManager seekToTime:toleranceBefore:toleranceAfter:]):
2535         (-[WebPlaybackControlsManager setCurrentAudioTouchBarMediaSelectionOption:]):
2536         (-[WebPlaybackControlsManager setCurrentLegibleTouchBarMediaSelectionOption:]):
2537
2538 2019-03-21  Said Abou-Hallawa  <said@apple.com>
2539
2540         Remove the SVG tear off objects for SVGPoint, SVGPointList and SVGAnimatedPointList
2541         https://bugs.webkit.org/show_bug.cgi?id=195905
2542
2543         Reviewed by Simon Fraser.
2544
2545         To remove the SVG tear off objects for SVGPoint, SVGPointList and 
2546         SVGAnimatedPointList, these changes are needed:
2547
2548         -- Define SVGPoint to be a superclass of SVGValueProperty<FloatPoint>.
2549
2550         -- Define SVGAnimatedPointList to be a superclass of SVGAnimatedPropertyList<SVGPointList>
2551
2552         -- Add SVGPropertyList which is a superclass of SVGList. Its items are
2553            defined to RefCounted. It is the base class of SVGValuePropertyList
2554            and it will be  the base class of SVGPathSegList in a later patch.
2555
2556         -- Add SVGValuePropertyList which is the base class of all the lists whose
2557            items are backed by a value objects like SVGPoint. The difference between
2558            SVGPropertyList and SVGValuePropertyList is the former class can store
2559            a Ref pointer of the base class like SVGPathSeg while the later type
2560            has to store the same type for all the items.
2561
2562         -- Add SVGAnimatedPropertyList which is the base class for all the animated
2563            lists. Note that:
2564            1) SVGElement owns SVGAnimatedPropertyList
2565            2) SVGAnimatedPropertyList owns m_baseVal whose type is SVGList
2566            3) m_baseVal owns the items whose type is a superclass of SVGProperty.
2567            When changing an item, it calls its owner which is an SVGList.
2568            SVGList calls its owner which is SVGAnimatedPropertyList.
2569            SVGAnimatedPropertyList calls its owner which SVGElement to commit
2570            the change. Later SVGAnimatedPropertyList::synchronize() is called 
2571            which returns the property valueAsString() to update the reflecting
2572            attribute.
2573
2574         -- New accessor, animator and animation function are added to access
2575            and animate a member of type SVGAnimatedPropertyList.
2576
2577         * Sources.txt:
2578         * WebCore.xcodeproj/project.pbxproj:
2579         * rendering/svg/SVGPathData.cpp:
2580         (WebCore::pathFromCircleElement):
2581         (WebCore::pathFromEllipseElement):
2582         (WebCore::pathFromLineElement):
2583         (WebCore::pathFromPathElement):
2584         (WebCore::pathFromPolygonElement):
2585         (WebCore::pathFromPolylineElement):
2586         (WebCore::pathFromRectElement):
2587         (WebCore::pathFromGraphicsElement):
2588         * rendering/svg/SVGPathData.h:
2589         The IDL of SVGPolyElement interface requires the following attribute:
2590             readonly attribute SVGPointList points;
2591         For which we return:
2592             SVGPointList& points() { return m_points->baseVal(); }
2593         But for all the other properties we return the currentValue(). So to have
2594         the two functions with the same name, the following function is added:
2595             const SVGPointList& points() const { return m_points->currentValue(); }
2596         This definition requires changing all callers to be const.
2597
2598         * rendering/svg/SVGRenderTreeAsText.cpp:
2599         (WebCore::operator<<):
2600         * svg/SVGAnimatedPointList.cpp: Removed.
2601         * svg/SVGAnimatedPointList.h: Removed.
2602         * svg/SVGAnimatedType.h:
2603         (WebCore::SVGAnimatedType::type const):
2604         This function had a bad design. It was designed to use the index of the
2605         variant as the AnimatedPropertyType. But when some of the types are removed
2606         from SVGValueVariant, this broke things. This fix is temporary till the 
2607         class SVGValueVariant is removed.
2608
2609         * svg/SVGAnimatorFactory.h:
2610         (WebCore::SVGAnimatorFactory::create):
2611         * svg/SVGExternalResourcesRequired.cpp:
2612         * svg/SVGParserUtilities.cpp:
2613         (WebCore::pointsListFromSVGData): Deleted.
2614         * svg/SVGParserUtilities.h:
2615         * svg/SVGPoint.h:
2616         (WebCore::SVGPoint::create):
2617         (WebCore::SVGPoint::clone const):
2618         (WebCore::SVGPoint::x):
2619         (WebCore::SVGPoint::setX):
2620         (WebCore::SVGPoint::y):
2621         (WebCore::SVGPoint::setY):
2622         (WebCore::SVGPoint::matrixTransform const):
2623         (WebCore::SVGPoint::matrixTransform): Deleted.
2624         (WebCore::SVGPoint::SVGPoint): Deleted.
2625         * svg/SVGPoint.idl:
2626         matrixTransform() should not throw an exception.
2627
2628         * svg/SVGPointList.h:
2629         (WebCore::SVGPointList::create):
2630         (WebCore::SVGPointList::parse):
2631         (WebCore::SVGPointList::SVGPointList): Deleted.
2632         Move the parse() and valueAsString() methods to SVGPointList. It is now
2633         a superclass of SVGValuePropertyList. Its items are of type Ref<SVGPoint>.
2634
2635         * svg/SVGPointListValues.cpp: Removed.
2636         * svg/SVGPointListValues.h: Removed.
2637         * svg/SVGPolyElement.cpp:
2638         (WebCore::SVGPolyElement::SVGPolyElement):
2639         (WebCore::SVGPolyElement::parseAttribute):
2640         (WebCore::SVGPolyElement::approximateMemoryCost const):
2641         (WebCore::SVGPolyElement::registerAttributes): Deleted.
2642         (WebCore::SVGPolyElement::points): Deleted.
2643         (WebCore::SVGPolyElement::animatedPoints): Deleted.
2644         * svg/SVGPolyElement.h:
2645         (WebCore::SVGPolyElement::points const):
2646         (WebCore::SVGPolyElement::points):
2647         (WebCore::SVGPolyElement::animatedPoints):
2648         (WebCore::SVGPolyElement::pointList const): Deleted.
2649         (WebCore::SVGPolyElement::attributeRegistry): Deleted.
2650         * svg/SVGSVGElement.cpp:
2651         (WebCore::SVGSVGElement::setCurrentTranslate):
2652         (WebCore::SVGSVGElement::currentTranslate): Deleted.
2653         * svg/SVGSVGElement.h:
2654         * svg/SVGSVGElement.idl:
2655         Define currentTranslate property to be of type Ref<SVGPoint>. When requesting
2656         it just return a reference to it.
2657
2658         * svg/SVGValue.h:
2659         * svg/properties/SVGAnimatedPropertyAccessorImpl.h:
2660         * svg/properties/SVGAnimatedPropertyAnimatorImpl.h:
2661         * svg/properties/SVGAnimatedPropertyImpl.h:
2662         * svg/properties/SVGAnimatedPropertyList.h: Added.
2663         Define the accessor, the animator and the animated type of SVGPointList.
2664
2665         (WebCore::SVGAnimatedPropertyList::create):
2666         (WebCore::SVGAnimatedPropertyList::~SVGAnimatedPropertyList):
2667         (WebCore::SVGAnimatedPropertyList::baseVal const):
2668         (WebCore::SVGAnimatedPropertyList::baseVal):
2669         (WebCore::SVGAnimatedPropertyList::animVal const):
2670         (WebCore::SVGAnimatedPropertyList::animVal):
2671         (WebCore::SVGAnimatedPropertyList::currentValue const):
2672         (WebCore::SVGAnimatedPropertyList::SVGAnimatedPropertyList):
2673         (WebCore::SVGAnimatedPropertyList::ensureAnimVal):
2674         * svg/properties/SVGAnimationAdditiveListFunction.h: Added.
2675         (WebCore::SVGAnimationAdditiveListFunction::SVGAnimationAdditiveListFunction):
2676         (WebCore::SVGAnimationAdditiveListFunction::toAtEndOfDuration const):
2677         (WebCore::SVGAnimationAdditiveListFunction::adjustAnimatedList):
2678         * svg/properties/SVGAnimationAdditiveListFunctionImpl.h: Added.
2679         (WebCore::SVGAnimationPointListFunction::progress):
2680         Define the animation function for animating SVGPointList.
2681
2682         * svg/properties/SVGAttributeRegistry.h:
2683         * svg/properties/SVGPropertyList.h: Added.
2684         (WebCore::SVGPropertyList::SVGPropertyList):
2685         (WebCore::SVGPropertyList::~SVGPropertyList):
2686         * svg/properties/SVGPropertyOwnerRegistry.h:
2687         (WebCore::SVGPropertyOwnerRegistry::registerProperty):
2688         * svg/properties/SVGValuePropertyList.h: Added.
2689         (WebCore::SVGValuePropertyList::operator=):
2690         (WebCore::SVGValuePropertyList::operator Vector<typename PropertyType::ValueType> const):
2691         (WebCore::SVGValuePropertyList::resize):
2692         (WebCore::SVGValuePropertyList::SVGValuePropertyList):
2693
2694 2019-03-21  Said Abou-Hallawa  <said@apple.com>
2695
2696         Remove the SVG property tear off objects for SVGAnimatedString
2697         https://bugs.webkit.org/show_bug.cgi?id=196065
2698
2699         Reviewed by Simon Fraser.
2700
2701         -- Define SVGAnimatedString to be SVGAnimatedPrimitiveProperty<String>.
2702
2703         -- Add SVGAnimatedStringAccessor to associate an attribute name with a 
2704            pointer to an SVGAnimatedString member of an SVGElement. Given a 
2705            pointer to an SVGElement, this accessor will and create an animator
2706            for the animated property.
2707
2708         -- Add SVGAnimatedStringAnimator to animated an SVGAnimatedString.
2709
2710         -- Add SVGAnimationStringFunction which is a discrete function and is 
2711            responsible for progressing an animated String over a period of time.
2712
2713         -- Define SVGStringAnimator to be SVGPrimitivePropertyAnimator<String,
2714            SVGAnimationStringFunction>. SVGStringAnimator is responsible for
2715            animating attributes with no reflecting animated properties, e.g.
2716            "font-family".
2717
2718         * Sources.txt:
2719         * WebCore.xcodeproj/project.pbxproj:
2720         * svg/SVGAElement.cpp:
2721         (WebCore::SVGAElement::SVGAElement):
2722         (WebCore::SVGAElement::parseAttribute):
2723         (WebCore::SVGAElement::registerAttributes): Deleted.
2724         * svg/SVGAElement.h:
2725         * svg/SVGAnimateElementBase.cpp:
2726         (WebCore::SVGAnimateElementBase::hasValidAttributeType const):
2727         (WebCore::SVGAnimateElementBase::isDiscreteAnimator const):
2728         * svg/SVGAnimateElementBase.h:
2729         * svg/SVGAnimatedString.cpp: Removed.
2730         * svg/SVGAnimatedString.h: Removed.
2731         * svg/SVGAnimationElement.cpp:
2732         (WebCore::SVGAnimationElement::currentValuesForValuesAnimation):
2733         The animation controller has to tell whether the animator is discrete or
2734         not. The properties are now registered either in SVGAttributeRegistry which
2735         relies on the tear off objects to know the AnimatedPropertyType of the
2736         property. Or it is registered in SVGPropertyOwnerRegistry which creates
2737         the animators through the accessors. Each animator knows whether it is
2738         discrete or not.
2739
2740         * svg/SVGAnimatorFactory.h:
2741         (WebCore::SVGAnimatorFactory::create):
2742         * svg/SVGAttributeAnimationController.cpp:
2743         (WebCore::SVGAttributeAnimationController::isDiscreteAnimator const):
2744         * svg/SVGAttributeAnimationController.h:
2745         * svg/SVGAttributeAnimationControllerBase.h:
2746         * svg/SVGCursorElement.h:
2747         * svg/SVGElement.cpp:
2748         (WebCore::SVGElement::SVGElement):
2749         (WebCore::SVGElement::parseAttribute):
2750         (WebCore::SVGElement::registerAttributes): Deleted.
2751         * svg/SVGElement.h:
2752         (WebCore::SVGElement::isKnownAttribute):
2753         (WebCore::SVGElement::className const):
2754         (WebCore::SVGElement::classNameAnimated):
2755         (WebCore::SVGElement::attributeRegistry): Deleted.
2756         * svg/SVGExternalResourcesRequired.cpp:
2757         * svg/SVGFEBlendElement.cpp:
2758         (WebCore::SVGFEBlendElement::SVGFEBlendElement):
2759         (WebCore::SVGFEBlendElement::registerAttributes):
2760         (WebCore::SVGFEBlendElement::parseAttribute):
2761         * svg/SVGFEBlendElement.h:
2762         * svg/SVGFEColorMatrixElement.cpp:
2763         (WebCore::SVGFEColorMatrixElement::SVGFEColorMatrixElement):
2764         (WebCore::SVGFEColorMatrixElement::registerAttributes):
2765         (WebCore::SVGFEColorMatrixElement::parseAttribute):
2766         * svg/SVGFEColorMatrixElement.h:
2767         * svg/SVGFEComponentTransferElement.cpp:
2768         (WebCore::SVGFEComponentTransferElement::SVGFEComponentTransferElement):
2769         (WebCore::SVGFEComponentTransferElement::parseAttribute):
2770         (WebCore::SVGFEComponentTransferElement::registerAttributes): Deleted.
2771         * svg/SVGFEComponentTransferElement.h:
2772         * svg/SVGFECompositeElement.cpp:
2773         (WebCore::SVGFECompositeElement::SVGFECompositeElement):
2774         (WebCore::SVGFECompositeElement::registerAttributes):
2775         (WebCore::SVGFECompositeElement::parseAttribute):
2776         * svg/SVGFECompositeElement.h:
2777         * svg/SVGFEConvolveMatrixElement.cpp:
2778         (WebCore::SVGFEConvolveMatrixElement::SVGFEConvolveMatrixElement):
2779         (WebCore::SVGFEConvolveMatrixElement::registerAttributes):
2780         (WebCore::SVGFEConvolveMatrixElement::parseAttribute):
2781         * svg/SVGFEConvolveMatrixElement.h:
2782         * svg/SVGFEDiffuseLightingElement.cpp:
2783         (WebCore::SVGFEDiffuseLightingElement::SVGFEDiffuseLightingElement):
2784         (WebCore::SVGFEDiffuseLightingElement::parseAttribute):
2785         (WebCore::SVGFEDiffuseLightingElement::registerAttributes): Deleted.
2786         * svg/SVGFEDiffuseLightingElement.h:
2787         * svg/SVGFEDisplacementMapElement.cpp:
2788         (WebCore::SVGFEDisplacementMapElement::SVGFEDisplacementMapElement):
2789         (WebCore::SVGFEDisplacementMapElement::registerAttributes):
2790         (WebCore::SVGFEDisplacementMapElement::parseAttribute):
2791         * svg/SVGFEDisplacementMapElement.h:
2792         * svg/SVGFEDropShadowElement.cpp:
2793         (WebCore::SVGFEDropShadowElement::SVGFEDropShadowElement):
2794         (WebCore::SVGFEDropShadowElement::parseAttribute):
2795         (WebCore::SVGFEDropShadowElement::svgAttributeChanged):
2796         (WebCore::SVGFEDropShadowElement::registerAttributes): Deleted.
2797         * svg/SVGFEDropShadowElement.h:
2798         * svg/SVGFEGaussianBlurElement.cpp:
2799         (WebCore::SVGFEGaussianBlurElement::SVGFEGaussianBlurElement):
2800         (WebCore::SVGFEGaussianBlurElement::registerAttributes):
2801         (WebCore::SVGFEGaussianBlurElement::parseAttribute):
2802         * svg/SVGFEGaussianBlurElement.h:
2803         * svg/SVGFEMergeNodeElement.cpp:
2804         (WebCore::SVGFEMergeNodeElement::SVGFEMergeNodeElement):
2805         (WebCore::SVGFEMergeNodeElement::parseAttribute):
2806         (WebCore::SVGFEMergeNodeElement::registerAttributes): Deleted.
2807         * svg/SVGFEMergeNodeElement.h:
2808         * svg/SVGFEMorphologyElement.cpp:
2809         (WebCore::SVGFEMorphologyElement::SVGFEMorphologyElement):
2810         (WebCore::SVGFEMorphologyElement::registerAttributes):
2811         (WebCore::SVGFEMorphologyElement::parseAttribute):
2812         * svg/SVGFEMorphologyElement.h:
2813         * svg/SVGFEOffsetElement.cpp:
2814         (WebCore::SVGFEOffsetElement::SVGFEOffsetElement):
2815         (WebCore::SVGFEOffsetElement::parseAttribute):
2816         (WebCore::SVGFEOffsetElement::svgAttributeChanged):
2817         (WebCore::SVGFEOffsetElement::registerAttributes): Deleted.
2818         * svg/SVGFEOffsetElement.h:
2819         * svg/SVGFESpecularLightingElement.cpp:
2820         (WebCore::SVGFESpecularLightingElement::SVGFESpecularLightingElement):
2821         (WebCore::SVGFESpecularLightingElement::parseAttribute):
2822         (WebCore::SVGFESpecularLightingElement::registerAttributes): Deleted.
2823         * svg/SVGFESpecularLightingElement.h:
2824         * svg/SVGFETileElement.cpp:
2825         (WebCore::SVGFETileElement::SVGFETileElement):
2826         (WebCore::SVGFETileElement::parseAttribute):
2827         (WebCore::SVGFETileElement::registerAttributes): Deleted.
2828         * svg/SVGFETileElement.h:
2829         * svg/SVGFilterPrimitiveStandardAttributes.cpp:
2830         (WebCore::SVGFilterPrimitiveStandardAttributes::SVGFilterPrimitiveStandardAttributes):
2831         (WebCore::SVGFilterPrimitiveStandardAttributes::registerAttributes):
2832         (WebCore::SVGFilterPrimitiveStandardAttributes::parseAttribute):
2833         * svg/SVGFilterPrimitiveStandardAttributes.h:
2834         (WebCore::SVGFilterPrimitiveStandardAttributes::result const):
2835         (WebCore::SVGFilterPrimitiveStandardAttributes::resultAnimated):
2836         * svg/SVGLegacyAttributeAnimationController.cpp:
2837         (WebCore::SVGLegacyAttributeAnimationController::isDiscreteAnimator const):
2838         * svg/SVGLegacyAttributeAnimationController.h:
2839         * svg/SVGMPathElement.h:
2840         * svg/SVGScriptElement.h:
2841         * svg/SVGURIReference.cpp:
2842         (WebCore::SVGURIReference::SVGURIReference):
2843         (WebCore::SVGURIReference::isKnownAttribute):
2844         (WebCore::SVGURIReference::parseAttribute):
2845         (WebCore::SVGURIReference::registerAttributes): Deleted.
2846         (WebCore::SVGURIReference::href const): Deleted.
2847         (WebCore::SVGURIReference::hrefAnimated): Deleted.
2848         * svg/SVGURIReference.h:
2849         (WebCore::SVGURIReference::href const):
2850         (WebCore::SVGURIReference::hrefAnimated):
2851         * svg/properties/SVGAnimatedPropertyAccessorImpl.h:
2852         * svg/properties/SVGAnimatedPropertyAnimatorImpl.h:
2853         * svg/properties/SVGAnimatedPropertyImpl.h:
2854         * svg/properties/SVGAttributeRegistry.h:
2855         * svg/properties/SVGPrimitivePropertyAnimatorImpl.h:
2856         * svg/properties/SVGPropertyAnimatorFactory.h:
2857         (WebCore::SVGPropertyAnimatorFactory::createStringAnimator):
2858         (WebCore::SVGPropertyAnimatorFactory::attributeAnimatorCreator):
2859         * svg/properties/SVGPropertyOwnerRegistry.h:
2860         (WebCore::SVGPropertyOwnerRegistry::registerProperty):
2861
2862 2019-03-21  Zalan Bujtas  <zalan@apple.com>
2863
2864         Do not insert the first-letter anonymous container until after we've constructed the first-letter renderer.
2865         https://bugs.webkit.org/show_bug.cgi?id=195919
2866         <rdar://problem/48573434>
2867
2868         Reviewed by Brent Fulgham.
2869
2870         When the container is injected too early, we might end up removing it as part of the collapsing logic
2871         while the text renderer is being removed (replaced with the first letter + remaining text).
2872
2873         Test: fast/css/first-letter-and-float-crash.html
2874
2875         * rendering/updating/RenderTreeBuilderFirstLetter.cpp:
2876         (WebCore::RenderTreeBuilder::FirstLetter::createRenderers):
2877
2878 2019-03-21  Eric Carlson  <eric.carlson@apple.com>
2879
2880         Add UI process WebRTC runtime logging.
2881         https://bugs.webkit.org/show_bug.cgi?id=196020
2882         <rdar://problem/49071443>
2883
2884         Reviewed by Youenn Fablet.
2885
2886         * inspector/agents/WebConsoleAgent.cpp:
2887         (WebCore::WebConsoleAgent::getLoggingChannels): Deleted.
2888         (WebCore::channelConfigurationForString): Deleted.
2889         (WebCore::WebConsoleAgent::setLoggingChannelLevel): Deleted.
2890         * inspector/agents/WebConsoleAgent.h:
2891         * inspector/agents/page/PageConsoleAgent.cpp:
2892         (WebCore::PageConsoleAgent::PageConsoleAgent): Change 'context' parameter from 
2893         WebAgentContext to PageAgentContext. Store the inspected page for later use.
2894         (WebCore::PageConsoleAgent::getLoggingChannels): Moved from WebConsoleAgent.
2895         (WebCore::channelConfigurationForString): Ditto.
2896         (WebCore::PageConsoleAgent::setLoggingChannelLevel): Moved from WebConsoleAgent.
2897         Call the inspected page to actually change the log channel configuration.
2898         * inspector/agents/page/PageConsoleAgent.h:
2899         * page/ChromeClient.h:
2900         * page/Page.cpp:
2901         (WebCore::Page::configureLoggingChannel): New.
2902         * page/Page.h:
2903
2904 2019-03-21  Andy Estes  <aestes@apple.com>
2905
2906         [iOS] Apple Pay should be available in documents with no user agent scripts
2907         https://bugs.webkit.org/show_bug.cgi?id=196061
2908         <rdar://problem/48649391>
2909
2910         Reviewed by Brady Eidson.
2911
2912         On platforms that support APPLE_PAY_REMOTE_UI, we can enable Apple Pay JS and Payment Request
2913         by default in all WebKit clients.
2914
2915         In order to protect the privacy of Apple Pay transactions, this patch implements the
2916         following restrictions on API usage:
2917
2918         1. If user agent scripts have been evaluated in a document, Apple Pay APIs will no longer be
2919         available for the duration of the document's lifetime.
2920         2. If an Apple Pay transaction has started in a document, user agent scripts will no longer
2921         be evaluated for the duration of the document's lifetime.
2922
2923         These restrictions are disabled for clients with the
2924         com.apple.private.WebKit.UnrestrictedApplePay entitlement and platforms that do support
2925         Apple Pay but don't support APPLE_PAY_REMOTE_UI.
2926
2927         Added new API tests.
2928
2929         * Modules/applepay/ApplePayRequestBase.cpp:
2930         (WebCore::convertAndValidate):
2931         * Modules/applepay/ApplePayRequestBase.h:
2932         * Modules/applepay/ApplePaySession.cpp:
2933         (WebCore::convertAndValidate):
2934         (WebCore::ApplePaySession::create):
2935         (WebCore::ApplePaySession::supportsVersion):
2936         (WebCore::ApplePaySession::canMakePayments):
2937         (WebCore::ApplePaySession::canMakePaymentsWithActiveCard):
2938         (WebCore::ApplePaySession::openPaymentSetup):
2939         (WebCore::ApplePaySession::begin):
2940         * Modules/applepay/ApplePaySession.h:
2941         * Modules/applepay/ApplePaySession.idl:
2942         * Modules/applepay/PaymentCoordinator.cpp:
2943         (WebCore::PaymentCoordinator::supportsVersion const):
2944         (WebCore::PaymentCoordinator::canMakePayments):
2945         (WebCore::PaymentCoordinator::canMakePaymentsWithActiveCard):
2946         (WebCore::PaymentCoordinator::openPaymentSetup):
2947         (WebCore::PaymentCoordinator::beginPaymentSession):
2948         (WebCore::PaymentCoordinator::validatedPaymentNetwork const):
2949         (WebCore::PaymentCoordinator::shouldAllowApplePay const):
2950         (WebCore::PaymentCoordinator::shouldAllowUserAgentScripts const):
2951         * Modules/applepay/PaymentCoordinator.h:
2952         * Modules/applepay/PaymentCoordinatorClient.h:
2953         (WebCore::PaymentCoordinatorClient::supportsUnrestrictedApplePay const):
2954         * Modules/applepay/paymentrequest/ApplePayPaymentHandler.cpp:
2955         (WebCore::ApplePayPaymentHandler::show):
2956         (WebCore::ApplePayPaymentHandler::canMakePayment):
2957         (WebCore::ApplePayPaymentHandler::version const):
2958         * Modules/applepay/paymentrequest/ApplePayPaymentHandler.h:
2959         * Modules/paymentrequest/PaymentHandler.h:
2960         * Modules/paymentrequest/PaymentRequest.cpp:
2961         (WebCore::PaymentRequest::show):
2962         (WebCore::PaymentRequest::canMakePayment):
2963
2964         Plumbed a Document& through to the various places that call into PaymentCoordinator for use
2965         by shouldAllowApplePay and shouldAllowUserAgentScripts.
2966
2967         * bindings/js/ScriptController.cpp:
2968         (WebCore::ScriptController::executeUserAgentScriptInWorld):
2969         (WebCore::ScriptController::shouldAllowUserAgentScripts const):
2970         * bindings/js/ScriptController.h:
2971
2972         Added executeUserAgentScriptInWorld, which calls executeScriptInWorld if allowed.
2973
2974         * dom/Document.cpp:
2975         (WebCore::Document::ensurePlugInsInjectedScript):
2976
2977         Changed to only evaluate the chrome client's plug-in extra script if allowed, and to mark
2978         the document as having evaluated user agent scripts.
2979
2980         (WebCore::Document::hasEvaluatedUserAgentScripts const):
2981         (WebCore::Document::isRunningUserScripts const):
2982         (WebCore::Document::setAsRunningUserScripts):
2983         (WebCore::Document::setHasEvaluatedUserAgentScripts):
2984         (WebCore::Document::hasStartedApplePaySession const):
2985         (WebCore::Document::setHasStartedApplePaySession):
2986         * dom/Document.h:
2987
2988         Added helper functions to set state on the top document.
2989
2990         * loader/DocumentThreadableLoader.cpp:
2991         (WebCore::DocumentThreadableLoader::DocumentThreadableLoader):
2992
2993         Removed call to topDocument() now that isRunningUserScripts() always checks the top document.
2994
2995         * page/Frame.cpp:
2996         (WebCore::Frame::injectUserScriptImmediately):
2997
2998         Changed to only inject the user script if allowed.
2999
3000         * page/Settings.yaml:
3001         * page/SettingsDefaultValues.h:
3002
3003         Enabled Apple Pay by default on platforms that enable APPLE_PAY_REMOTE_UI.
3004
3005         * testing/Internals.cpp:
3006         (WebCore::Internals::setAsRunningUserScripts):
3007         (WebCore::Internals::setHasStartedApplePaySession):
3008         * testing/Internals.h:
3009         * testing/Internals.idl:
3010         * testing/MockPaymentCoordinator.h:
3011         * testing/MockPaymentCoordinator.idl:
3012
3013         Added some internal interfaces for use by TestWebKitAPI.
3014
3015 2019-03-21  Alex Christensen  <achristensen@webkit.org>
3016
3017         Add SPI to inform applications of WKContentRuleList actions
3018         https://bugs.webkit.org/show_bug.cgi?id=195965
3019         <rdar://problem/42664365>
3020
3021         Reviewed by Geoff Garen.
3022
3023         We already had SPI to inform the application of notifications.
3024         In order to inform it about other actions, I needed to put them in a different structure.
3025         Basically, instead of a Vector<Action> I use a Vector<Vector<Action>> that contains the same actions.
3026         That way we can give one callback per WKContentRuleList.
3027
3028         * Modules/websockets/WebSocketChannel.cpp:
3029         (WebCore::WebSocketChannel::connect):
3030         * WebCore.xcodeproj/project.pbxproj:
3031         * contentextensions/ContentExtensionActions.h:
3032         * contentextensions/ContentExtensionParser.cpp:
3033         (WebCore::ContentExtensions::loadEncodedRules):
3034         * contentextensions/ContentExtensionRule.cpp:
3035         (WebCore::ContentExtensions::Action::isolatedCopy const):
3036         * contentextensions/ContentExtensionRule.h:
3037         (WebCore::ContentExtensions::Action::operator== const):
3038         (WebCore::ContentExtensions::Action::setExtensionIdentifier): Deleted.
3039         (WebCore::ContentExtensions::Action::extensionIdentifier const): Deleted.
3040         * contentextensions/ContentExtensionsBackend.cpp:
3041         (WebCore::ContentExtensions::ContentExtensionsBackend::actionsForResourceLoad const):
3042         (WebCore::ContentExtensions::ContentExtensionsBackend::processContentRuleListsForLoad):
3043         (WebCore::ContentExtensions::ContentExtensionsBackend::processContentRuleListsForPingLoad):
3044         (WebCore::ContentExtensions::applyResultsToRequest):
3045         (WebCore::ContentExtensions::ContentExtensionsBackend::processContentExtensionRulesForLoad): Deleted.
3046         (WebCore::ContentExtensions::ContentExtensionsBackend::processContentExtensionRulesForPingLoad): Deleted.
3047         (WebCore::ContentExtensions::applyBlockedStatusToRequest): Deleted.
3048         * contentextensions/ContentExtensionsBackend.h:
3049         * contentextensions/ContentRuleListResults.h: Added.
3050         (WebCore::ContentRuleListResults::Result::shouldNotifyApplication const):
3051         (WebCore::ContentRuleListResults::shouldNotifyApplication const):
3052         (WebCore::ContentRuleListResults::encode const):
3053         (WebCore::ContentRuleListResults::decode):
3054         (WebCore::ContentRuleListResults::Result::encode const):
3055         (WebCore::ContentRuleListResults::Result::decode):
3056         (WebCore::ContentRuleListResults::Summary::encode const):
3057         (WebCore::ContentRuleListResults::Summary::decode):
3058         * css/StyleSheetContents.cpp:
3059         (WebCore::StyleSheetContents::subresourcesAllowReuse const):
3060         * html/HTMLMediaElement.cpp:
3061         (WebCore::HTMLMediaElement::loadResource):
3062         * loader/FrameLoader.cpp:
3063         (WebCore::FrameLoader::loadResourceSynchronously):
3064         * loader/PingLoader.cpp:
3065         (WebCore::processContentRuleListsForLoad):
3066         (WebCore::PingLoader::loadImage):
3067         (WebCore::PingLoader::sendPing):
3068         (WebCore::PingLoader::sendViolationReport):
3069         (WebCore::processContentExtensionRulesForLoad): Deleted.
3070         * loader/ResourceLoader.cpp:
3071         (WebCore::ResourceLoader::willSendRequestInternal):
3072         * loader/cache/CachedResourceLoader.cpp:
3073         (WebCore::CachedResourceLoader::requestResource):
3074         * loader/cache/CachedResourceRequest.cpp:
3075         (WebCore::CachedResourceRequest::applyResults):
3076         (WebCore::CachedResourceRequest::applyBlockedStatus): Deleted.
3077         * loader/cache/CachedResourceRequest.h:
3078         * page/ChromeClient.h:
3079         (WebCore::ChromeClient::contentRuleListNotification):
3080         * page/DOMWindow.cpp:
3081         (WebCore::DOMWindow::open):
3082         * page/UserContentProvider.cpp:
3083         (WebCore::UserContentProvider::processContentRuleListsForLoad):
3084         (WebCore::UserContentProvider::actionsForResourceLoad):
3085         (WebCore::UserContentProvider::processContentExtensionRulesForLoad): Deleted.
3086         * page/UserContentProvider.h:
3087
3088 2019-03-21  Simon Fraser  <simon.fraser@apple.com>
3089
3090         Add an internal feature flag to disable the -webkit-overflow-scrolling CSS property
3091         https://bugs.webkit.org/show_bug.cgi?id=196058
3092         rdar://problem/49078202
3093
3094         Reviewed by Antti Koivisto.
3095
3096         Add an internal setting called "legacyOverflowScrollingTouchEnabled", initially
3097         on by default.
3098
3099         When disabled, it makes the -webkit-overflow-scrolling property be unsupported.
3100
3101         Tests: fast/scrolling/ios/overflow-scrolling-touch-disabled-stacking.html
3102                fast/scrolling/ios/overflow-scrolling-touch-enabled-stacking.html
3103
3104         * css/parser/CSSParserContext.cpp:
3105         (WebCore::CSSParserContext::CSSParserContext):
3106         (WebCore::operator==):
3107         * css/parser/CSSParserContext.h:
3108         (WebCore::CSSParserContextHash::hash):
3109         * css/parser/CSSParserFastPaths.cpp:
3110         (WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
3111         * css/parser/CSSParserFastPaths.h:
3112         * css/parser/CSSPropertyParser.cpp:
3113         (WebCore::CSSPropertyParser::parseSingleValue):
3114         * page/Settings.yaml:
3115
3116 2019-03-21  Antti Koivisto  <antti@apple.com>
3117
3118         UI-process hit-testing needs to know about containing block relationships
3119         https://bugs.webkit.org/show_bug.cgi?id=195845
3120         <rdar://problem/48949633>
3121
3122         Reviewed by Simon Fraser.
3123
3124         Test: fast/scrolling/ios/overflow-scroll-overlap-5.html
3125
3126         * page/scrolling/ScrollingTree.h:
3127         * page/scrolling/ScrollingTreeScrollingNode.h:
3128         * page/scrolling/cocoa/ScrollingTreePositionedNode.h:
3129         (WebCore::ScrollingTreePositionedNode::layer const):
3130
3131 2019-03-21  Zalan Bujtas  <zalan@apple.com>
3132
3133         [ContentChangeObserver] Cleanup reset state.
3134         https://bugs.webkit.org/show_bug.cgi?id=196076
3135         <rdar://problem/49107931>
3136
3137         Reviewed by Simon Fraser.
3138
3139         stopObservingPendingActivities() is a subset of reset() and call it when we've observed a visible change.
3140
3141         * page/ios/ContentChangeObserver.cpp:
3142         (WebCore::ContentChangeObserver::willNotProceedWithClick):
3143         (WebCore::ContentChangeObserver::stopObservingPendingActivities):
3144         (WebCore::ContentChangeObserver::reset):
3145         (WebCore::ContentChangeObserver::didSuspendActiveDOMObjects):
3146         (WebCore::ContentChangeObserver::willDetachPage):
3147         (WebCore::ContentChangeObserver::adjustObservedState):
3148         (WebCore::ContentChangeObserver::cancelPendingActivities): Deleted.
3149         * page/ios/ContentChangeObserver.h:
3150
3151 2019-03-21  Zalan Bujtas  <zalan@apple.com>
3152
3153         Unreviewed build fix.
3154
3155         * page/ios/ContentChangeObserver.h:
3156
3157 2019-03-21  Zalan Bujtas  <zalan@apple.com>
3158
3159         [ContentChangeObserver] Start tracking implicit transitions at mousemove
3160         https://bugs.webkit.org/show_bug.cgi?id=196054
3161         <rdar://problem/49093840>
3162
3163         Reviewed by Simon Fraser.
3164
3165         This patch fixes the hover menu issue on seriouseats.com. After tapping on the menu items, the submenus show up now.
3166
3167         1. Start observing at mousemove
3168         2. Check if the style change is synchronous or not and start observing it accordingly.
3169
3170         Tests: fast/events/touch/ios/content-observation/0ms-delay-0ms-transition-on-mousemove.html
3171                fast/events/touch/ios/content-observation/100ms-delay-10ms-transition-on-mousemove.html
3172                fast/events/touch/ios/content-observation/10ms-delay-0ms-transition-on-mousemove.html
3173                fast/events/touch/ios/content-observation/10ms-delay-0ms-transition-on-touch-start.html
3174
3175         * page/ios/ContentChangeObserver.cpp:
3176         (WebCore::ContentChangeObserver::adjustObservedState):
3177
3178 2019-03-21  Simon Fraser  <simon.fraser@apple.com>
3179
3180         Absolute in stacking-context scroller jiggles when scrolled
3181         https://bugs.webkit.org/show_bug.cgi?id=196010
3182
3183         Reviewed by Zalan Bujtas.
3184
3185         Updating compositing layers after a scroll (in a compositing update on the main thread)
3186         failed to traverse to an absolute layer inside a stacking-context overflow:scroll,
3187         because the overflow's layer didn't have the "hasCompositingAncestor" bit set on it.
3188
3189         This happened because childState.subtreeIsCompositing wasn't being set when indirect
3190         reasons trigger compositing. So clean up RenderLayerCompositor::computeCompositingRequirements()
3191         to set childState.subtreeIsCompositing for "late" compositing decisions, and move the
3192         "Subsequent layers in the parent stacking context also need to composite" chunk
3193         down to after the last compositing decision has been made.
3194
3195         Test: compositing/overflow/absolute-in-overflow.html
3196
3197         * page/scrolling/ScrollingTreeScrollingNode.cpp:
3198         (WebCore::ScrollingTreeScrollingNode::scrollTo):
3199         * page/scrolling/cocoa/ScrollingTreePositionedNode.mm:
3200         (WebCore::ScrollingTreePositionedNode::applyLayerPositions):
3201         * rendering/RenderLayerCompositor.cpp:
3202         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
3203
3204 2019-03-21  Zalan Bujtas  <zalan@apple.com>
3205
3206         [ContentChangeObserver] Start tracking implicit transitions at touchStart
3207         https://bugs.webkit.org/show_bug.cgi?id=196051
3208         <rdar://problem/49092952>
3209
3210         Reviewed by Simon Fraser.
3211
3212         This patch enables transition tracking on touchStart.
3213
3214         1. Start observing for new transitions at touchStart
3215         2. Stop observing at touchEnd
3216         3. Check the next style recalc when the transition is finished (at onAnimationEnd we don't yet have the final computed style).
3217         4. Remove the tracked transition when it is canceled.
3218
3219         Tests: fast/events/touch/ios/content-observation/0ms-transition-on-touch-start.html
3220                fast/events/touch/ios/content-observation/100ms-transition-on-touch-start.html
3221                fast/events/touch/ios/content-observation/10ms-delay-transition-on-touch-start.html
3222                fast/events/touch/ios/content-observation/transition-on-touch-start-and-remove.html
3223
3224         * page/ios/ContentChangeObserver.cpp:
3225         (WebCore::ContentChangeObserver::didAddTransition):
3226         (WebCore::ContentChangeObserver::didFinishTransition):
3227         (WebCore::ContentChangeObserver::didRemoveTransition):
3228         (WebCore::ContentChangeObserver::adjustObservedState):
3229         * page/ios/ContentChangeObserver.h:
3230         (WebCore::ContentChangeObserver::setShouldObserveTransitions):
3231         (WebCore::ContentChangeObserver::clearObservedTransitions):
3232         (WebCore::ContentChangeObserver::hasObservedTransition const):
3233         (WebCore::ContentChangeObserver::hasPendingActivity const):
3234
3235 2019-03-21  Zalan Bujtas  <zalan@apple.com>
3236
3237         [ContentChangeObserver] Track hidden elements only while transitioning.
3238         https://bugs.webkit.org/show_bug.cgi?id=196050
3239         <rdar://problem/49092037>
3240
3241         Reviewed by Simon Fraser.
3242
3243         Use the existing isConsideredHidden() logic to decide whether the current transition should be tracked.
3244
3245         * page/ios/ContentChangeObserver.cpp:
3246         (WebCore::isConsideredHidden):
3247         (WebCore::ContentChangeObserver::didAddTransition):
3248         (WebCore::ContentChangeObserver::StyleChangeScope::StyleChangeScope):
3249         (WebCore::ContentChangeObserver::StyleChangeScope::~StyleChangeScope):
3250         (WebCore::ContentChangeObserver::StyleChangeScope::isConsideredHidden const): Deleted.
3251         * page/ios/ContentChangeObserver.h:
3252
3253 2019-03-21  Zalan Bujtas  <zalan@apple.com>
3254
3255         [ContentChangeObserver] Add support for observing implicit transitions
3256         https://bugs.webkit.org/show_bug.cgi?id=195914
3257         <rdar://problem/49091959>
3258
3259         Reviewed by Simon Fraser.
3260
3261         This patch is in preparation for observing elements with property "left" implicit transitions.
3262
3263         This is not a continuous tracking, we are only interested in the start and the end state.
3264         The idea here is to register hidden elements only and check if they become visible by
3265         the end of the transition (and ignore if the transition gets "canceled").
3266
3267         * page/animation/AnimationBase.h:
3268         * page/animation/ImplicitAnimation.cpp:
3269         (WebCore::ImplicitAnimation::ImplicitAnimation):
3270         (WebCore::ImplicitAnimation::~ImplicitAnimation):
3271         (WebCore::ImplicitAnimation::clear):
3272         (WebCore::ImplicitAnimation::onAnimationEnd):
3273         * page/animation/ImplicitAnimation.h:
3274         * page/ios/ContentChangeObserver.cpp:
3275         (WebCore::ContentChangeObserver::didAddTransition):
3276         (WebCore::ContentChangeObserver::removeTransitionIfNeeded):
3277         (WebCore::ContentChangeObserver::didFinishTransition):
3278         (WebCore::ContentChangeObserver::didRemoveTransition):
3279         (WebCore::ContentChangeObserver::didInstallDOMTimer):
3280         * page/ios/ContentChangeObserver.h:
3281         (WebCore::ContentChangeObserver::isObservingTransitions const):
3282         (WebCore::ContentChangeObserver::isObservedPropertyForTransition const):
3283
3284 2019-03-21  Devin Rousso  <drousso@apple.com>
3285
3286         Web Inspector: Page: lazily create the agent
3287         https://bugs.webkit.org/show_bug.cgi?id=195592
3288         <rdar://problem/48791916>
3289
3290         Reviewed by Timothy Hatcher.
3291
3292         No change in functionality.
3293
3294         Have more agents save the inspected `Page` so they don't need to access it via the
3295         `InspectorPageAgent`. Make some of `InspectorPageAgent`'s functions `static` so other
3296         agents can use them without needing to have access to an enabled `InspectorPageAgent`.
3297
3298         * inspector/InspectorController.cpp:
3299         (WebCore::InspectorController::InspectorController):
3300         (WebCore::InspectorController::createLazyAgents):
3301
3302         * inspector/agents/InspectorPageAgent.h:
3303         (WebCore::InspectorPageAgent::page): Deleted.
3304         * inspector/agents/InspectorPageAgent.cpp:
3305         (WebCore::InspectorPageAgent::InspectorPageAgent):
3306         (WebCore::InspectorPageAgent::enable):
3307         (WebCore::InspectorPageAgent::disable):
3308         (WebCore::InspectorPageAgent::reload):
3309         (WebCore::InspectorPageAgent::navigate):
3310         (WebCore::InspectorPageAgent::overrideSetting):
3311         (WebCore::InspectorPageAgent::getCookies):
3312         (WebCore::InspectorPageAgent::deleteCookie):
3313         (WebCore::InspectorPageAgent::getResourceTree):
3314         (WebCore::InspectorPageAgent::searchInResources):
3315         (WebCore::InspectorPageAgent::didPaint):
3316         (WebCore::InspectorPageAgent::didLayout):
3317         (WebCore::InspectorPageAgent::didScroll):
3318         (WebCore::InspectorPageAgent::didRecalculateStyle):
3319         (WebCore::InspectorPageAgent::setEmulatedMedia):
3320         (WebCore::InspectorPageAgent::setForcedAppearance):
3321         (WebCore::InspectorPageAgent::getCompositingBordersVisible):
3322         (WebCore::InspectorPageAgent::setCompositingBordersVisible):
3323         (WebCore::InspectorPageAgent::snapshotNode):
3324         (WebCore::InspectorPageAgent::snapshotRect):
3325         (WebCore::InspectorPageAgent::archive):
3326         (WebCore::InspectorPageAgent::mainFrame): Deleted.
3327         (WebCore::InspectorPageAgent::hasIdForFrame const): Deleted.
3328
3329         * inspector/agents/InspectorApplicationCacheAgent.h:
3330         * inspector/agents/InspectorApplicationCacheAgent.cpp:
3331         (WebCore::InspectorApplicationCacheAgent::InspectorApplicationCacheAgent):
3332         (WebCore::InspectorApplicationCacheAgent::updateApplicationCacheStatus):
3333         (WebCore::InspectorApplicationCacheAgent::getFramesWithManifests):
3334         (WebCore::InspectorApplicationCacheAgent::assertFrameWithDocumentLoader):
3335
3336         * inspector/agents/InspectorCanvasAgent.h:
3337         * inspector/agents/InspectorCanvasAgent.cpp:
3338         (WebCore::InspectorCanvasAgent::InspectorCanvasAgent):
3339         (WebCore::InspectorCanvasAgent::enable):
3340
3341         * inspector/agents/InspectorDOMStorageAgent.h:
3342         * inspector/agents/InspectorDOMStorageAgent.cpp:
3343         (WebCore::InspectorDOMStorageAgent::InspectorDOMStorageAgent):
3344         (WebCore::InspectorDOMStorageAgent::findStorageArea):
3345
3346         * inspector/agents/InspectorIndexedDBAgent.h:
3347         * inspector/agents/InspectorIndexedDBAgent.cpp:
3348         (WebCore::InspectorIndexedDBAgent::InspectorIndexedDBAgent):
3349         (WebCore::InspectorIndexedDBAgent::requestDatabaseNames):
3350         (WebCore::InspectorIndexedDBAgent::requestDatabase):
3351         (WebCore::InspectorIndexedDBAgent::requestData):
3352         (WebCore::InspectorIndexedDBAgent::clearObjectStore):
3353
3354         * inspector/agents/page/PageDebuggerAgent.h:
3355         * inspector/agents/page/PageDebuggerAgent.cpp:
3356         (WebCore::PageDebuggerAgent::PageDebuggerAgent):
3357         (WebCore::PageDebuggerAgent::sourceMapURLForScript):
3358         (WebCore::PageDebuggerAgent::breakpointActionLog):
3359         (WebCore::PageDebuggerAgent::injectedScriptForEval):
3360
3361         * inspector/agents/page/PageNetworkAgent.h:
3362         * inspector/agents/page/PageNetworkAgent.cpp:
3363         (WebCore::PageNetworkAgent::PageNetworkAgent):
3364         (WebCore::PageNetworkAgent::loaderIdentifier):
3365         (WebCore::PageNetworkAgent::frameIdentifier):
3366         (WebCore::PageNetworkAgent::setResourceCachingDisabled):
3367         (WebCore::PageNetworkAgent::scriptExecutionContext):
3368
3369         * inspector/InspectorInstrumentation.cpp:
3370         (WebCore::InspectorInstrumentation::didClearWindowObjectInWorldImpl):
3371
3372 2019-03-21  Brent Fulgham  <bfulgham@apple.com>
3373
3374         Hardening: Use WeakPtrs in VideoFullscreenInterface{Mac,AVKit}
3375         https://bugs.webkit.org/show_bug.cgi?id=196052
3376         <rdar://problem/48778571>
3377
3378         Reviewed by Eric Carlson.
3379
3380         The VideoFullscreenInterface{Mac,AVKit} implementations store their fullscreen model
3381         and fullscreen change observer members as bare pointers, something we've been working
3382         to eliminate.