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