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