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