9e8b4b20187a86f70f362e40a2703845847833a4
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2019-03-18  Said Abou-Hallawa  <sabouhallawa@apple.com>
2
3         Remove the SVG property tear off objects for SVGAnimatedBoolean
4         https://bugs.webkit.org/show_bug.cgi?id=195862
5
6         Reviewed by Simon Fraser.
7
8         -- SVGAnimatedBoolean will be defined as SVGAnimatedPrimitiveProperty<bool>.
9         -- SVGAnimatedBooleanAccessor is added to access a member of this type.
10         -- A function registerProperty() is added to SVGPropertyOwnerRegistry
11            to register this type.
12         -- SVGAnimatedBooleanAnimator is added to animate a member of this type.
13         -- SVGAnimationBooleanFunction is added to handle the progress of this
14            new type over a period of time.
15
16         SVGAnimationDiscreteFunction is the base class of SVGAnimationBooleanFunction.
17         It will be the base class of all the discrete animation function types:
18         string, bool, enum and PreserveAspectRatio types.
19
20         * Sources.txt:
21         * WebCore.xcodeproj/project.pbxproj:
22         * svg/SVGAnimationElement.h:
23         * svg/SVGAnimatorFactory.h:
24         (WebCore::SVGAnimatorFactory::create):
25         * svg/SVGClipPathElement.h:
26         * svg/SVGCursorElement.h:
27         * svg/SVGDefsElement.h:
28         * svg/SVGExternalResourcesRequired.cpp:
29         (WebCore::SVGExternalResourcesRequired::SVGExternalResourcesRequired):
30         (WebCore::SVGExternalResourcesRequired::parseAttribute):
31         (WebCore::SVGExternalResourcesRequired::registerAttributes): Deleted.
32         * svg/SVGExternalResourcesRequired.h:
33         (WebCore::SVGExternalResourcesRequired::externalResourcesRequired const):
34         (WebCore::SVGExternalResourcesRequired::externalResourcesRequiredAnimated):
35         (WebCore::SVGExternalResourcesRequired::setExternalResourcesRequired): Deleted.
36         * svg/SVGFEConvolveMatrixElement.cpp:
37         (WebCore::SVGFEConvolveMatrixElement::SVGFEConvolveMatrixElement):
38         (WebCore::SVGFEConvolveMatrixElement::registerAttributes):
39         (WebCore::SVGFEConvolveMatrixElement::parseAttribute):
40         * svg/SVGFEConvolveMatrixElement.h:
41         * svg/SVGFEImageElement.h:
42         * svg/SVGFontElement.h:
43         * svg/SVGForeignObjectElement.h:
44         * svg/SVGGElement.h:
45         * svg/SVGGradientElement.h:
46         * svg/SVGMPathElement.h:
47         * svg/SVGMarkerElement.h:
48         * svg/SVGMaskElement.h:
49         * svg/SVGPathElement.h:
50         * svg/SVGPatternElement.h:
51         * svg/SVGRectElement.h:
52         * svg/SVGSVGElement.h:
53         * svg/SVGScriptElement.h:
54         * svg/SVGSwitchElement.h:
55         * svg/SVGSymbolElement.h:
56         * svg/SVGTextContentElement.h:
57         * svg/SVGUseElement.h:
58         * svg/properties/SVGAnimatedPropertyAccessorImpl.h:
59         * svg/properties/SVGAnimatedPropertyAnimatorImpl.h:
60         * svg/properties/SVGAnimatedPropertyImpl.h:
61         * svg/properties/SVGAnimationDiscreteFunction.h: Added.
62         (WebCore::SVGAnimationDiscreteFunction::SVGAnimationDiscreteFunction):
63         (WebCore::SVGAnimationDiscreteFunction::progress):
64         * svg/properties/SVGAnimationDiscreteFunctionImpl.h: Added.
65         * svg/properties/SVGAttributeRegistry.h:
66         * svg/properties/SVGPropertyOwnerRegistry.h:
67         (WebCore::SVGPropertyOwnerRegistry::registerProperty):
68
69 2019-03-18  Simon Fraser  <simon.fraser@apple.com>
70
71         Crash when reloading test with async overflow scrolling
72         https://bugs.webkit.org/show_bug.cgi?id=195629
73         <rdar://problem/48814045>
74
75         Reviewed by Antoine Quint.
76
77         RenderLayerCompositor::removeFromScrollCoordinatedLayers needs to pass the Positioning
78         bit to make sure we remove RenderLayers added m_scrollingNodeToLayerMap for Positioning
79         scrolling nodes.
80
81         Fixes crashes seen in compositing/clipping/border-radius-async-overflow-non-stacking.html
82         and scrollingcoordinator/scrolling-tree/remove-coordinated-frame.html.
83
84         * rendering/RenderLayerBacking.cpp:
85         (WebCore::RenderLayerBacking::~RenderLayerBacking):
86         * rendering/RenderLayerCompositor.cpp:
87         (WebCore::RenderLayerCompositor::removeFromScrollCoordinatedLayers):
88
89 2019-03-18  Devin Rousso  <drousso@apple.com>
90
91         Web Inspector: Timeline: lazily create the agent
92         https://bugs.webkit.org/show_bug.cgi?id=195865
93         <rdar://problem/48965403>
94
95         Reviewed by Joseph Pecoraro.
96
97         No change in functionality.
98
99         * inspector/agents/InspectorTimelineAgent.h:
100         * inspector/agents/InspectorTimelineAgent.cpp:
101         (WebCore::InspectorTimelineAgent::InspectorTimelineAgent):
102         (WebCore::InspectorTimelineAgent::toggleScriptProfilerInstrument):
103         (WebCore::InspectorTimelineAgent::toggleHeapInstrument):
104         (WebCore::InspectorTimelineAgent::setFrameIdentifier):
105
106         * inspector/InspectorInstrumentation.h:
107         (WebCore::InspectorInstrumentation::startProfiling):
108         (WebCore::InspectorInstrumentation::stopProfiling):
109         (WebCore::InspectorInstrumentation::didRequestAnimationFrame):
110         (WebCore::InspectorInstrumentation::didCancelAnimationFrame):
111
112         * inspector/InstrumentingAgents.h:
113         (WebCore::InstrumentingAgents::inspectorScriptProfilerAgent const): Added.
114         (WebCore::InstrumentingAgents::setInspectorScriptProfilerAgent): Added.
115         * inspector/InstrumentingAgents.cpp:
116         (WebCore::InstrumentingAgents::reset):
117
118         * inspector/InspectorController.cpp:
119         (WebCore::InspectorController::InspectorController):
120         (WebCore::InspectorController::createLazyAgents):
121
122 2019-03-18  Darin Adler  <darin@apple.com>
123
124         Cut down on use of StringBuffer, possibly leading toward removing it entirely
125         https://bugs.webkit.org/show_bug.cgi?id=195870
126
127         Reviewed by Daniel Bates.
128
129         * dom/Document.cpp:
130         (WebCore::canonicalizedTitle): Fixed all the problems mentioned in "FIXME".
131         Made this a single function rather than a function template. Switch to
132         StringBuilder instead of StringBuffer. Return the original string if the
133         canonicalize operation doesn't change anything.
134         (WebCore::Document::updateTitle): Updated for the change above.
135
136         * platform/Length.cpp:
137         (WebCore::newCoordsArray): Use createUninitialized instead of StringBuffer.
138         Also got rid of unneeded use of upconvertedCharacters on a temporary string
139         that we explicitly created with 16-bit characters. The performance of this
140         function could be considerably simplified by not copying the original string
141         at all, but didn't do that at this time.
142
143         * platform/text/TextCodecUTF16.cpp:
144         (WebCore::TextCodecUTF16::decode): Use createUninitialized instead of
145         StringBuffer. Also renamed numChars to numCodeUnits to both switch to complete
146         words and to be slightly more accurate.
147
148         * rendering/RenderText.cpp:
149         (WebCore::convertNoBreakSpace): Added.
150         (WebCore::capitalize): Use Vector instead of StringBuffer. Simplify code by
151         using convertNoBreakSpace function. Removed code that was using StringImpl
152         directly for a tiny speed boost; if we want to optimize the performance of
153         this function we would need to do more than that. Return the original string
154         if it happens to already be capitalized.
155
156 2019-03-18  Timothy Hatcher  <timothy@apple.com>
157
158         WKWebView.GetContentsShouldReturnAttributedString is crashing on iOS Simulator.
159         https://bugs.webkit.org/show_bug.cgi?id=195916
160
161         Reviewed by Tim Horton.
162
163         * WebCore.xcodeproj/project.pbxproj: Make ColorIOS.h a private header.
164         * platform/ios/ColorIOS.h: Export colorFromUIColor.
165
166 2019-03-18  Said Abou-Hallawa  <sabouhallawa@apple.com>
167
168         Define the type of SVGPropertyOwnerRegistry for all SVG elements
169         https://bugs.webkit.org/show_bug.cgi?id=195859
170
171         Reviewed by Simon Fraser.
172
173         SVGPropertyOwnerRegistry will eventually replace SVGAttributeOwnerProxyImpl.
174
175         * svg/SVGAElement.h:
176         * svg/SVGAltGlyphElement.h:
177         * svg/SVGAnimationElement.h:
178         * svg/SVGCircleElement.h:
179         * svg/SVGClipPathElement.h:
180         * svg/SVGComponentTransferFunctionElement.h:
181         (WebCore::SVGComponentTransferFunctionElement::attributeRegistry):
182         (WebCore::SVGComponentTransferFunctionElement::isKnownAttribute):
183         * svg/SVGCursorElement.h:
184         * svg/SVGDefsElement.h:
185         * svg/SVGElement.h:
186         * svg/SVGEllipseElement.h:
187         * svg/SVGExternalResourcesRequired.h:
188         (WebCore::SVGExternalResourcesRequired::isKnownAttribute):
189         * svg/SVGFEBlendElement.h:
190         * svg/SVGFEColorMatrixElement.h:
191         * svg/SVGFEComponentTransferElement.h:
192         * svg/SVGFECompositeElement.h:
193         * svg/SVGFEConvolveMatrixElement.h:
194         * svg/SVGFEDiffuseLightingElement.h:
195         * svg/SVGFEDisplacementMapElement.h:
196         * svg/SVGFEDropShadowElement.h:
197         * svg/SVGFEGaussianBlurElement.h:
198         * svg/SVGFEImageElement.h:
199         * svg/SVGFELightElement.h:
200         (WebCore::SVGFELightElement::attributeRegistry):
201         (WebCore::SVGFELightElement::isKnownAttribute):
202         * svg/SVGFEMergeNodeElement.h:
203         * svg/SVGFEMorphologyElement.h:
204         * svg/SVGFEOffsetElement.h:
205         * svg/SVGFESpecularLightingElement.h:
206         * svg/SVGFETileElement.h:
207         * svg/SVGFETurbulenceElement.cpp:
208         (WebCore::SVGFETurbulenceElement::svgAttributeChanged):
209         * svg/SVGFETurbulenceElement.h:
210         * svg/SVGFilterElement.h:
211         * svg/SVGFilterPrimitiveStandardAttributes.h:
212         (WebCore::SVGFilterPrimitiveStandardAttributes::isKnownAttribute):
213         * svg/SVGFitToViewBox.h:
214         (WebCore::SVGFitToViewBox::isKnownAttribute):
215         * svg/SVGFontElement.h:
216         * svg/SVGForeignObjectElement.h:
217         * svg/SVGGElement.h:
218         * svg/SVGGeometryElement.h:
219         (WebCore::SVGGeometryElement::isKnownAttribute):
220         * svg/SVGGlyphRefElement.h:
221         * svg/SVGGradientElement.h:
222         (WebCore::SVGGradientElement::isKnownAttribute):
223         * svg/SVGGraphicsElement.h:
224         (WebCore::SVGGraphicsElement::isKnownAttribute):
225         * svg/SVGImageElement.h:
226         * svg/SVGLineElement.h:
227         * svg/SVGLinearGradientElement.h:
228         * svg/SVGMPathElement.h:
229         * svg/SVGMarkerElement.h:
230         * svg/SVGMaskElement.h:
231         * svg/SVGPathElement.h:
232         * svg/SVGPatternElement.h:
233         * svg/SVGPolyElement.h:
234         (WebCore::SVGPolyElement::attributeRegistry):
235         (WebCore::SVGPolyElement::isKnownAttribute):
236         * svg/SVGRadialGradientElement.h:
237         * svg/SVGRectElement.h:
238         * svg/SVGSVGElement.h:
239         * svg/SVGScriptElement.h:
240         * svg/SVGStopElement.h:
241         * svg/SVGSwitchElement.h:
242         * svg/SVGSymbolElement.h:
243         * svg/SVGTRefElement.h:
244         * svg/SVGTests.h:
245         * svg/SVGTextContentElement.h:
246         (WebCore::SVGTextContentElement::isKnownAttribute):
247         * svg/SVGTextPathElement.h:
248         * svg/SVGTextPositioningElement.h:
249         (WebCore::SVGTextPositioningElement::isKnownAttribute):
250         * svg/SVGURIReference.h:
251         * svg/SVGUseElement.h:
252         * svg/SVGViewElement.h:
253         * svg/SVGViewSpec.h:
254         * svg/SVGZoomAndPan.cpp:
255         (WebCore::SVGZoomAndPan::parseZoomAndPan):
256         (WebCore::SVGZoomAndPan::parseAttribute):
257         (WebCore::SVGZoomAndPan::SVGZoomAndPan): Deleted.
258         (WebCore::SVGZoomAndPan::registerAttributes): Deleted.
259         * svg/SVGZoomAndPan.h:
260         (WebCore::SVGZoomAndPan::zoomAndPan const):
261         (WebCore::SVGZoomAndPan::setZoomAndPan):
262         (WebCore::SVGZoomAndPan::reset):
263         (WebCore::SVGZoomAndPan::attributeRegistry): Deleted.
264         (WebCore::SVGZoomAndPan::isKnownAttribute): Deleted.
265
266 2019-03-18  Timothy Hatcher  <timothy@apple.com>
267
268         Add new NSAttributedString API for converting HTML.
269         https://bugs.webkit.org/show_bug.cgi?id=195636
270         rdar://problem/45055697
271
272         Reviewed by Tim Horton.
273
274         * en.lproj/Localizable.strings: Updated.
275
276 2019-03-18  Zalan Bujtas  <zalan@apple.com>
277
278         Call transition and animation callbacks on non-composited renderers too.
279         https://bugs.webkit.org/show_bug.cgi?id=195907
280
281         Reviewed by Simon Fraser.
282
283         These callbacks are not composited specific functions.
284
285         * page/animation/AnimationBase.cpp:
286         (WebCore::AnimationBase::freezeAtTime):
287         (WebCore::AnimationBase::compositedRenderer const): Deleted.
288         * page/animation/AnimationBase.h:
289         * page/animation/ImplicitAnimation.cpp:
290         (WebCore::ImplicitAnimation::startAnimation):
291         (WebCore::ImplicitAnimation::pauseAnimation):
292         (WebCore::ImplicitAnimation::endAnimation):
293         * page/animation/KeyframeAnimation.cpp:
294         (WebCore::KeyframeAnimation::startAnimation):
295         (WebCore::KeyframeAnimation::pauseAnimation):
296         (WebCore::KeyframeAnimation::endAnimation):
297         * rendering/RenderLayerModelObject.cpp:
298         (WebCore::RenderLayerModelObject::startTransition):
299         (WebCore::RenderLayerModelObject::transitionPaused):
300         (WebCore::RenderLayerModelObject::transitionFinished):
301         (WebCore::RenderLayerModelObject::startAnimation):
302         (WebCore::RenderLayerModelObject::animationPaused):
303         (WebCore::RenderLayerModelObject::animationSeeked):
304         (WebCore::RenderLayerModelObject::animationFinished):
305         (WebCore::RenderLayerModelObject::suspendAnimations):
306
307 2019-03-18  Jer Noble  <jer.noble@apple.com>
308
309         Add experimental "alphaChannel" property to VideoConfiguration
310         https://bugs.webkit.org/show_bug.cgi?id=195853
311
312         Reviewed by Eric Carlson.
313
314         Test: media/mediacapabilities/mock-decodingInfo-alphaChannel.html
315
316         Add a new, experimental addition to Media Capabilities to allow pages to query for
317         alpha channel support.
318
319         * Modules/mediacapabilities/MediaCapabilities.cpp:
320         (WebCore::MediaCapabilities::decodingInfo):
321         * Modules/mediacapabilities/MediaCapabilities.h:
322         * Modules/mediacapabilities/MediaCapabilities.idl:
323         * Modules/mediacapabilities/VideoConfiguration.idl:
324         * SourcesCocoa.txt:
325         * WebCore.xcodeproj/project.pbxproj:
326         * platform/cocoa/VideoToolboxSoftLink.cpp:
327         * platform/cocoa/VideoToolboxSoftLink.h:
328         * platform/graphics/cocoa/HEVCUtilitiesCocoa.h:
329         * platform/graphics/cocoa/HEVCUtilitiesCocoa.mm: Renamed from Source/WebCore/platform/graphics/cocoa/HEVCUtilitiesCocoa.cpp.
330         (WebCore::validateHEVCParameters):
331         * platform/graphics/cocoa/MediaEngineConfigurationFactoryCocoa.cpp:
332         (WebCore::createMediaPlayerDecodingConfigurationCocoa):
333         * platform/mediacapabilities/VideoConfiguration.h:
334         * platform/mock/MediaEngineConfigurationFactoryMock.cpp:
335         (WebCore::canDecodeMedia):
336         (WebCore::canEncodeMedia):
337
338 2019-03-18  Ryosuke Niwa  <rniwa@webkit.org>
339
340         Remove unused webkitEditableContentChanged event
341         https://bugs.webkit.org/show_bug.cgi?id=195909
342
343         Reviewed by Wenson Hsieh.
344
345         Removed webkitEditableContentChanged event which is no longer used after r206944.
346
347         Note that only WebKit's C++ code can fire events in TextControlInnerElements
348         since the element is an implementation detail of input and textarea elements.
349
350         * dom/EventNames.h:
351         * html/shadow/TextControlInnerElements.cpp:
352         (WebCore::TextControlInnerTextElement::defaultEventHandler):
353
354 2019-03-18  Myles C. Maxfield  <mmaxfield@apple.com>
355
356         [WHLSL] Hook up the compiler to our WebGPU implementation
357         https://bugs.webkit.org/show_bug.cgi?id=195509
358
359         Unreviewed.
360
361         Update after r243091.
362
363         * Modules/webgpu/WHLSL/WHLSLSynthesizeConstructors.cpp:
364         * platform/graphics/gpu/cocoa/GPURenderPipelineMetal.mm:
365         (WebCore::trySetWHLSLFunctionsForPipelineDescriptor):
366
367 2019-03-18  Chris Dumez  <cdumez@apple.com>
368
369         REGRESSION(r236862): early frame decoupling leaves JSC ArrayBuffer objects lingering
370         https://bugs.webkit.org/show_bug.cgi?id=195322
371
372         Reviewed by Ryosuke Niwa.
373
374         Since r236862, DOMWindow objects get disconnected from their Frame object as soon as
375         their iframe element gets removed from the document. Previously, DOMWindow was a
376         FrameDestructionObserver and would stay connected to its frame until the frame died.
377
378         This means that some of the work that we were doing in DOMWindow::frameDestroyed() and
379         Document::willDetachPage() no longer happens for subframe windows because they get
380         disconnected from their frame because they get a chance to get such notifications.
381         To address this issue, we now also do this work in DOMWindow::willDetachDocumentFromFrame()
382         which gets called when the iframe gets removed from the document and the document / window
383         get disconnected from the Frame element.
384
385         No new tests, verified locally that the leak is gone on JetStream.
386
387         * page/DOMWindow.cpp:
388         (WebCore::DOMWindow::willDetachDocumentFromFrame):
389
390 2019-03-18  Zalan Bujtas  <zalan@apple.com>
391
392         Move animation and transition functions from RenderBoxModelObject to RenderElement
393         https://bugs.webkit.org/show_bug.cgi?id=195903
394
395         Reviewed by Simon Fraser.
396
397         Transitions and animations do not require RenderBoxModelObject. Move these functions to RenderElement and override them at RenderLayerModelObject to support
398         composition related callbacks.
399
400         * page/animation/AnimationBase.cpp:
401         (WebCore::AnimationBase::compositedRenderer const):
402         * page/animation/AnimationBase.h:
403         * rendering/RenderBoxModelObject.cpp:
404         (WebCore::RenderBoxModelObject::startTransition): Deleted.
405         (WebCore::RenderBoxModelObject::transitionPaused): Deleted.
406         (WebCore::RenderBoxModelObject::transitionFinished): Deleted.
407         (WebCore::RenderBoxModelObject::startAnimation): Deleted.
408         (WebCore::RenderBoxModelObject::animationPaused): Deleted.
409         (WebCore::RenderBoxModelObject::animationSeeked): Deleted.
410         (WebCore::RenderBoxModelObject::animationFinished): Deleted.
411         (WebCore::RenderBoxModelObject::suspendAnimations): Deleted.
412         * rendering/RenderBoxModelObject.h:
413         * rendering/RenderElement.cpp:
414         (WebCore::RenderElement::startTransition):
415         (WebCore::RenderElement::transitionPaused):
416         (WebCore::RenderElement::transitionFinished):
417         (WebCore::RenderElement::startAnimation):
418         (WebCore::RenderElement::animationPaused):
419         (WebCore::RenderElement::animationSeeked):
420         (WebCore::RenderElement::animationFinished):
421         (WebCore::RenderElement::suspendAnimations):
422         * rendering/RenderElement.h:
423
424 2019-03-18  Antti Koivisto  <antti@apple.com>
425
426         Try to fix Windows build.
427
428         * rendering/RenderLayerBacking.cpp:
429         (WebCore::RenderLayerBacking::updateEventRegion):
430
431 2019-03-18  Antti Koivisto  <antti@apple.com>
432
433         Layer with no backing store should still hit-test over a scroller
434         https://bugs.webkit.org/show_bug.cgi?id=195378
435         <rdar://problem/48652078>
436
437         Reviewed by Simon Fraser.
438
439         Tests: fast/scrolling/ios/overflow-scroll-overlap-3.html
440                fast/scrolling/ios/overflow-scroll-overlap-4.html
441
442         Move collecting event region from paint to compositing update time.
443         This solves a number of problems including regions for non-painting layers.
444
445         * platform/graphics/GraphicsLayer.h:
446         * rendering/RenderBlock.cpp:
447         (WebCore::RenderBlock::paintObject):
448
449         Use the existing visibleToHitTesting() helper.
450
451         * rendering/RenderLayer.cpp:
452         (WebCore::RenderLayer::paintLayerContents):
453
454         Use flag for event region collecting, don't paint content.
455
456         (WebCore::RenderLayer::paintList):
457
458         We can bail out immediately if there is no overflow.
459
460         (WebCore::RenderLayer::paintForegroundForFragments):
461         (WebCore::RenderLayer::paintForegroundForFragmentsWithPhase):
462         (WebCore::RenderLayer::collectEventRegionForFragments):
463
464         Move to a separate function.
465
466         * rendering/RenderLayer.h:
467         * rendering/RenderLayerBacking.cpp:
468         (WebCore::RenderLayerBacking::updateConfiguration):
469
470         Update event region on backing configuration update. This is called after anything interesting changes on a sublayer.
471
472         (WebCore::RenderLayerBacking::updateEventRegion):
473         (WebCore::RenderLayerBacking::paintIntoLayer):
474         * rendering/RenderLayerBacking.h:
475
476 2019-03-18  Myles C. Maxfield  <mmaxfield@apple.com>
477
478         [WHLSL] Hook up the compiler to our WebGPU implementation
479         https://bugs.webkit.org/show_bug.cgi?id=195509
480
481         Reviewed by Dean Jackson.
482
483         This represents a collection of changes necessary to compile and run the first WHLSL program in WebKit.
484
485         Because WHLSL isn't fully implemented yet, this patch doesn't remove the existing method for supplying
486         Metal shaders to WebGPU. Instead, it adds a new boolean to WebGPUShaderModuleDescriptor, "isWHLSL" which
487         causes us to run the WHLSL compiler.
488
489         More details below.
490
491         Test: webgpu/whlsl.html
492
493         * Modules/webgpu/WHLSL/AST/WHLSLCallExpression.h: Use raw pointer instead of Optional<std::reference_wrapper>.
494         (WebCore::WHLSL::AST::CallExpression::setCastData):
495         (WebCore::WHLSL::AST::CallExpression::isCast):
496         (WebCore::WHLSL::AST::CallExpression::castReturnType):
497         * Modules/webgpu/WHLSL/AST/WHLSLNativeTypeDeclaration.h:
498         (WebCore::WHLSL::AST::NativeTypeDeclaration::isAtomic const):
499         (WebCore::WHLSL::AST::NativeTypeDeclaration::setIsAtomic):
500         (WebCore::WHLSL::AST::NativeTypeDeclaration::name const): Deleted. The parent class already has a name string.
501         (WebCore::WHLSL::AST::NativeTypeDeclaration::name): Deleted.
502         * Modules/webgpu/WHLSL/AST/WHLSLReturn.h:
503         * Modules/webgpu/WHLSL/AST/WHLSLTypeReference.h:
504         (WebCore::WHLSL::AST::TypeReference::cloneTypeReference const): When cloning a type reference, make sure to
505         clone the pointer to its resolved type, too.
506         * Modules/webgpu/WHLSL/AST/WHLSLVariableReference.h:
507         * Modules/webgpu/WHLSL/Metal/WHLSLEntryPointScaffolding.cpp: Incorporate resolution from
508         https://github.com/gpuweb/gpuweb/pull/188.
509         (WebCore::WHLSL::Metal::EntryPointScaffolding::EntryPointScaffolding):
510         (WebCore::WHLSL::Metal::EntryPointScaffolding::resourceHelperTypes):
511         (WebCore::WHLSL::Metal::EntryPointScaffolding::resourceSignature):
512         (WebCore::WHLSL::Metal::VertexEntryPointScaffolding::helperTypes):
513         (WebCore::WHLSL::Metal::VertexEntryPointScaffolding::unpack):
514         (WebCore::WHLSL::Metal::VertexEntryPointScaffolding::pack): Support semantics being placed directly on the
515         entry point, instead of being placed on a structure member.
516         (WebCore::WHLSL::Metal::FragmentEntryPointScaffolding::helperTypes):
517         (WebCore::WHLSL::Metal::FragmentEntryPointScaffolding::pack): Ditto.
518         (WebCore::WHLSL::Metal::EntryPointScaffolding::mappedBindGroups const): Deleted.
519         * Modules/webgpu/WHLSL/Metal/WHLSLEntryPointScaffolding.h:
520         * Modules/webgpu/WHLSL/Metal/WHLSLFunctionWriter.cpp:
521         (WebCore::WHLSL::Metal::FunctionDefinitionWriter::visit):
522         (WebCore::WHLSL::Metal::RenderFunctionDefinitionWriter::createEntryPointScaffolding):
523         (WebCore::WHLSL::Metal::ComputeFunctionDefinitionWriter::createEntryPointScaffolding):
524         (WebCore::WHLSL::Metal::metalFunctions):
525         (WebCore::WHLSL::Metal::RenderFunctionDefinitionWriter::takeVertexMappedBindGroups): Deleted. After
526         https://github.com/gpuweb/gpuweb/pull/188, we don't need the mappings.
527         (WebCore::WHLSL::Metal::RenderFunctionDefinitionWriter::takeFragmentMappedBindGroups): Deleted. Ditto.
528         (WebCore::WHLSL::Metal::ComputeFunctionDefinitionWriter::takeMappedBindGroups): Deleted. Ditto.
529         * Modules/webgpu/WHLSL/Metal/WHLSLFunctionWriter.h: Ditto.
530         * Modules/webgpu/WHLSL/Metal/WHLSLMetalCodeGenerator.cpp: Ditto.
531         (WebCore::WHLSL::Metal::generateMetalCodeShared):
532         (WebCore::WHLSL::Metal::generateMetalCode):
533         * Modules/webgpu/WHLSL/Metal/WHLSLMetalCodeGenerator.h: Ditto.
534         * Modules/webgpu/WHLSL/Metal/WHLSLNativeFunctionWriter.cpp: Support compiler-generated functions. Change
535         CRASH() to notImplemented().
536         (WebCore::WHLSL::Metal::writeNativeFunction):
537         (WebCore::WHLSL::Metal::getNativeName): Deleted.
538         * Modules/webgpu/WHLSL/Metal/WHLSLNativeFunctionWriter.h:
539         * Modules/webgpu/WHLSL/Metal/WHLSLNativeTypeWriter.cpp:
540         (WebCore::WHLSL::Metal::writeNativeType): 
541         * Modules/webgpu/WHLSL/Metal/WHLSLTypeNamer.cpp: The dependency graph needs to track all unnamed types. Also,
542         we need to track types that are the results of expressions (not just types literally spelled out in the
543         program). Enumerations need to be emitted after their base types are emitted.
544         (WebCore::WHLSL::Metal::TypeNamer::visit):
545         (WebCore::WHLSL::Metal::MetalTypeDeclarationWriter::MetalTypeDeclarationWriter):
546         (WebCore::WHLSL::Metal::TypeNamer::metalTypeDeclarations):
547         (WebCore::WHLSL::Metal::TypeNamer::emitUnnamedTypeDefinition):
548         (WebCore::WHLSL::Metal::TypeNamer::emitNamedTypeDefinition):
549         (WebCore::WHLSL::Metal::TypeNamer::emitAllUnnamedTypeDefinitions):
550         (WebCore::WHLSL::Metal::TypeNamer::metalTypeDefinitions):
551         * Modules/webgpu/WHLSL/Metal/WHLSLTypeNamer.h:
552         * Modules/webgpu/WHLSL/WHLSLCheckDuplicateFunctions.cpp:
553         (WebCore::WHLSL::checkDuplicateFunctions):
554         * Modules/webgpu/WHLSL/WHLSLChecker.cpp: Wrap ResolvingType in a class to make sure it plays nicely with
555         HashMap. Also, use raw pointers instead of Optional<std::reference_wrapper>s.
556         (WebCore::WHLSL::resolveWithReferenceComparator):
557         (WebCore::WHLSL::resolveByInstantiation):
558         (WebCore::WHLSL::checkOperatorOverload):
559         (WebCore::WHLSL::Checker::assignTypes):
560         (WebCore::WHLSL::Checker::checkShaderType):
561         (WebCore::WHLSL::Checker::visit):
562         (WebCore::WHLSL::matchAndCommit):
563         (WebCore::WHLSL::Checker::recurseAndGetInfo):
564         (WebCore::WHLSL::Checker::assignType):
565         (WebCore::WHLSL::Checker::forwardType):
566         (WebCore::WHLSL::getUnnamedType):
567         (WebCore::WHLSL::Checker::finishVisitingPropertyAccess):
568         (WebCore::WHLSL::Checker::isBoolType):
569         * Modules/webgpu/WHLSL/WHLSLGatherEntryPointItems.cpp:
570         (WebCore::WHLSL::Gatherer::visit):
571         * Modules/webgpu/WHLSL/WHLSLInferTypes.cpp:
572         (WebCore::WHLSL::inferTypesForCall):
573         * Modules/webgpu/WHLSL/WHLSLInferTypes.h:
574         * Modules/webgpu/WHLSL/WHLSLIntrinsics.cpp:
575         (WebCore::WHLSL::Intrinsics::addPrimitive):
576         (WebCore::WHLSL::Intrinsics::addFullTexture):
577         * Modules/webgpu/WHLSL/WHLSLIntrinsics.h:
578         (WebCore::WHLSL::Intrinsics::ucharType const):
579         (WebCore::WHLSL::Intrinsics::ushortType const):
580         (WebCore::WHLSL::Intrinsics::charType const):
581         (WebCore::WHLSL::Intrinsics::shortType const):
582         (WebCore::WHLSL::Intrinsics::intType const):
583         (WebCore::WHLSL::Intrinsics::uchar2Type const):
584         (WebCore::WHLSL::Intrinsics::uchar4Type const):
585         (WebCore::WHLSL::Intrinsics::ushort2Type const):
586         (WebCore::WHLSL::Intrinsics::ushort4Type const):
587         (WebCore::WHLSL::Intrinsics::uint2Type const):
588         (WebCore::WHLSL::Intrinsics::uint4Type const):
589         (WebCore::WHLSL::Intrinsics::char2Type const):
590         (WebCore::WHLSL::Intrinsics::char4Type const):
591         (WebCore::WHLSL::Intrinsics::short2Type const):
592         (WebCore::WHLSL::Intrinsics::short4Type const):
593         (WebCore::WHLSL::Intrinsics::int2Type const):
594         (WebCore::WHLSL::Intrinsics::int4Type const):
595         * Modules/webgpu/WHLSL/WHLSLLexer.cpp:
596         (WebCore::WHLSL::Lexer::recognizeKeyword):
597         * Modules/webgpu/WHLSL/WHLSLNameContext.cpp:
598         (WebCore::WHLSL::NameContext::add):
599         * Modules/webgpu/WHLSL/WHLSLNameResolver.cpp:
600         (WebCore::WHLSL::NameResolver::visit): Don't visit recursive types.
601         Also, make sure we preserve the CurrentFunction in our recursive scopes.
602         * Modules/webgpu/WHLSL/WHLSLNameResolver.h:
603         * Modules/webgpu/WHLSL/WHLSLParser.cpp:
604         (WebCore::WHLSL::Parser::fail):
605         (WebCore::WHLSL::Parser::peek):
606         (WebCore::WHLSL::Parser::parseType):
607         (WebCore::WHLSL::Parser::parseBuiltInSemantic):
608         * Modules/webgpu/WHLSL/WHLSLParser.h:
609         * Modules/webgpu/WHLSL/WHLSLPipelineDescriptor.h:
610         * Modules/webgpu/WHLSL/WHLSLPrepare.cpp:
611         (WebCore::WHLSL::prepareShared):
612         (WebCore::WHLSL::prepare):
613         * Modules/webgpu/WHLSL/WHLSLPrepare.h:
614         * Modules/webgpu/WHLSL/WHLSLRecursiveTypeChecker.cpp: Move big inline functions out-of-line.
615         (WebCore::WHLSL::RecursiveTypeChecker::visit):
616         (WebCore::WHLSL::checkRecursiveTypes):
617         (): Deleted.
618         * Modules/webgpu/WHLSL/WHLSLResolveOverloadImpl.cpp:
619         (WebCore::WHLSL::conversionCost):
620         (WebCore::WHLSL::resolveFunctionOverloadImpl):
621         * Modules/webgpu/WHLSL/WHLSLResolveOverloadImpl.h:
622         * Modules/webgpu/WHLSL/WHLSLResolvingType.h:
623         (WebCore::WHLSL::ResolvingType::ResolvingType):
624         (WebCore::WHLSL::ResolvingType::operator=):
625         (WebCore::WHLSL::ResolvingType::getUnnamedType):
626         (WebCore::WHLSL::ResolvingType::visit):
627         * Modules/webgpu/WHLSL/WHLSLScopedSetAdder.h: Renamed from Source/WebCore/Modules/webgpu/WHLSL/Metal/WHLSLMappedBindings.h.
628         (WebCore::WHLSL::ScopedSetAdder::ScopedSetAdder):
629         (WebCore::WHLSL::ScopedSetAdder::~ScopedSetAdder):
630         (WebCore::WHLSL::ScopedSetAdder::isNewEntry const):
631         * Modules/webgpu/WHLSL/WHLSLSemanticMatcher.cpp:
632         (WebCore::WHLSL::isAcceptableFormat):
633         * Modules/webgpu/WHLSL/WHLSLStandardLibrary.txt: Turns out a bunch of texture types don't exist in MSL.
634         * Modules/webgpu/WHLSL/WHLSLSynthesizeArrayOperatorLength.cpp:
635         (WebCore::WHLSL::synthesizeArrayOperatorLength):
636         * Modules/webgpu/WHLSL/WHLSLSynthesizeArrayOperatorLength.h:
637         * Modules/webgpu/WHLSL/WHLSLSynthesizeConstructors.cpp: Adding to the program can fail.
638         (WebCore::WHLSL::synthesizeConstructors): Some constructors shouldn't be generated for "void" and for atomic types.
639         * Modules/webgpu/WHLSL/WHLSLSynthesizeConstructors.h: Adding to the program can fail.
640         * Modules/webgpu/WHLSL/WHLSLSynthesizeEnumerationFunctions.cpp: Ditto.
641         (WebCore::WHLSL::synthesizeEnumerationFunctions):
642         * Modules/webgpu/WHLSL/WHLSLSynthesizeEnumerationFunctions.h: Ditto.
643         * Modules/webgpu/WHLSL/WHLSLSynthesizeStructureAccessors.cpp: Ditto.
644         (WebCore::WHLSL::synthesizeStructureAccessors):
645         * Modules/webgpu/WHLSL/WHLSLSynthesizeStructureAccessors.h: Ditto.
646         * Modules/webgpu/WHLSL/WHLSLVisitor.cpp:
647         (WebCore::WHLSL::Visitor::visit):
648         * Modules/webgpu/WebGPUDevice.cpp: Add flag that triggers the WHLSL compiler.
649         (WebCore::WebGPUDevice::createShaderModule const):
650         * Modules/webgpu/WebGPUShaderModuleDescriptor.h: Ditto.
651         * Modules/webgpu/WebGPUShaderModuleDescriptor.idl: Ditto.
652         * WebCore.xcodeproj/project.pbxproj:
653         * platform/graphics/gpu/GPUPipelineLayout.h:
654         (WebCore::GPUPipelineLayout::bindGroupLayouts const):
655         * platform/graphics/gpu/GPUShaderModule.h: Add a string that represents the WHLSL shader source. The compiler currently
656         needs the rest of the pipeline state descriptor, so we defer compilation until create*Pipeline().
657         (WebCore::GPUShaderModule::platformShaderModule const):
658         (WebCore::GPUShaderModule::whlslSource const):
659         * platform/graphics/gpu/GPUShaderModuleDescriptor.h:
660         * platform/graphics/gpu/cocoa/GPURenderPipelineMetal.mm: Convert GPU types into WHLSL types, and invoke the compiler.
661         (WebCore::convertVertexFormat):
662         (WebCore::convertShaderStageFlags):
663         (WebCore::convertBindingType):
664         (WebCore::convertTextureFormat):
665         (WebCore::convertLayout):
666         (WebCore::convertRenderPipelineDescriptor):
667         (WebCore::trySetMetalFunctionsForPipelineDescriptor):
668         (WebCore::trySetWHLSLFunctionsForPipelineDescriptor):
669         (WebCore::trySetFunctionsForPipelineDescriptor):
670         (WebCore::tryCreateMtlRenderPipelineState):
671         * platform/graphics/gpu/cocoa/GPUShaderModuleMetal.mm:
672         (WebCore::GPUShaderModule::create):
673         (WebCore::GPUShaderModule::GPUShaderModule):
674
675 2019-03-18  Justin Fan  <justin_fan@apple.com>
676
677         [Web GPU] GPUAdapter.createDevice -> GPUAdapter.requestDevice
678         https://bugs.webkit.org/show_bug.cgi?id=195781
679
680         Reviewed by Myles C. Maxfield.
681
682         A Web GPU device is now acquired via a promise returned from GPUAdapter.requestDevice().
683
684         Existing tests updated for new behavior.
685
686         * Modules/webgpu/WebGPUAdapter.cpp:
687         (WebCore::WebGPUAdapter::requestDevice const):
688         (WebCore::WebGPUAdapter::createDevice): Deleted.
689         * Modules/webgpu/WebGPUAdapter.h:
690         * Modules/webgpu/WebGPUAdapter.idl:
691         * Modules/webgpu/WebGPUDevice.cpp:
692         (WebCore::WebGPUDevice::tryCreate):
693         (WebCore::WebGPUDevice::WebGPUDevice):
694         (WebCore::WebGPUDevice::create): Deleted.
695         * Modules/webgpu/WebGPUDevice.h:
696         * platform/graphics/gpu/GPUDevice.h:
697         * platform/graphics/gpu/cocoa/GPUDeviceMetal.mm:
698         (WebCore::GPUDevice::tryCreate):
699         (WebCore::GPUDevice::create): Deleted.
700
701 2019-03-18  Justin Fan  <justin_fan@apple.com>
702
703         [Web GPU] API updates: GPUTexture.createDefaultView and type-safe GPURenderPassEncoder.setPipeline
704         https://bugs.webkit.org/show_bug.cgi?id=195896
705
706         Reviewed by Jon Lee.
707
708         Rename createDefaultTextureView -> createDefaultView and move setPipeline from GPUProgrammablePassEncoder to GPURenderPassEncoder.
709
710         Existing tests updated for createDefaultView name.
711
712         * Modules/webgpu/WebGPUProgrammablePassEncoder.cpp:
713         (WebCore::WebGPUProgrammablePassEncoder::setPipeline): Deleted.
714         * Modules/webgpu/WebGPUProgrammablePassEncoder.h:
715         * Modules/webgpu/WebGPUProgrammablePassEncoder.idl:
716         * Modules/webgpu/WebGPURenderPassEncoder.cpp:
717         (WebCore::WebGPURenderPassEncoder::setPipeline):
718         * Modules/webgpu/WebGPURenderPassEncoder.h:
719         * Modules/webgpu/WebGPURenderPassEncoder.idl:
720         * Modules/webgpu/WebGPUTexture.cpp:
721         (WebCore::WebGPUTexture::createDefaultView):
722         (WebCore::WebGPUTexture::createDefaultTextureView): Deleted.
723         * Modules/webgpu/WebGPUTexture.h:
724         * Modules/webgpu/WebGPUTexture.idl:
725         * platform/graphics/gpu/GPUProgrammablePassEncoder.h:
726         * platform/graphics/gpu/GPURenderPassEncoder.h:
727
728 2019-03-18  Chris Dumez  <cdumez@apple.com>
729
730         [iOS] The network process sometimes gets killed for trying to suspend while holding locked files
731         https://bugs.webkit.org/show_bug.cgi?id=195890
732         <rdar://problem/48934338>
733
734         Reviewed by Geoffrey Garen.
735
736         The network process sometimes gets killed for trying to suspend while holding locked files while
737         under SQLiteDatabase::open(). The SQLiteDatabaseTracker normally keeps tracking of "transactions"
738         in progress so we know that we're holding locked files and the WebSQLiteDatabaseTracker takes
739         care of notifying the UIProcess via IPC that it should hold a background assertion on our behalf
740         to avoid trying to suspend while holding locked files.
741         However, we were missing a SQLiteTransactionInProgressAutoCounter when trying to execute the
742         PRAGMA statement.
743
744         Note that we have a similar SQLiteTransactionInProgressAutoCounter in SQLiteDatabase::useWALJournalMode()
745         when executing such PRAGMA statement already.
746
747         * platform/sql/SQLiteDatabase.cpp:
748         (WebCore::SQLiteDatabase::open):
749
750 2019-03-18  Ryan Haddad  <ryanhaddad@apple.com>
751
752         Unreviewed, rolling out r243037.
753
754         Broke the Windows build
755
756         Reverted changeset:
757
758         "Reduce the size of Node::deref by eliminating an explicit
759         parentNode check"
760         https://bugs.webkit.org/show_bug.cgi?id=195776
761         https://trac.webkit.org/changeset/243037
762
763 2019-03-18  Eric Carlson  <eric.carlson@apple.com>
764
765         Change some logging levels
766         https://bugs.webkit.org/show_bug.cgi?id=195861
767         <rdar://problem/48961669>
768
769         Reviewed by Jer Noble.
770
771         * Modules/mediastream/RTCPeerConnection.cpp:
772         (WebCore::RTCPeerConnection::dispatchEvent):
773         * Modules/webaudio/AudioNode.cpp:
774         (WebCore::AudioNode::addInput):
775         (WebCore::AudioNode::addOutput):
776         (WebCore::AudioNode::connect):
777         (WebCore::AudioNode::disconnect):
778         * Modules/webaudio/AudioParam.cpp:
779         (WebCore::AudioParam::connect):
780         (WebCore::AudioParam::disconnect):
781         * Modules/webaudio/WaveShaperNode.cpp:
782         (WebCore::WaveShaperNode::setOversample):
783         * html/HTMLMediaElement.cpp:
784         (WebCore::HTMLMediaElement::canPlayType const):
785         (WebCore::HTMLMediaElement::seekTask):
786         (WebCore::HTMLMediaElement::dispatchEvent):
787         (WebCore::HTMLMediaElement::ensureMediaControlsInjectedScript):
788         (WebCore::HTMLMediaElement::didAddUserAgentShadowRoot):
789         (WebCore::HTMLMediaElement::setMediaControlsDependOnPageScaleFactor):
790         * html/track/InbandGenericTextTrack.cpp:
791         (WebCore::InbandGenericTextTrack::addGenericCue):
792         (WebCore::InbandGenericTextTrack::removeGenericCue):
793         (WebCore::InbandGenericTextTrack::newCuesParsed):
794         * html/track/InbandWebVTTTextTrack.cpp:
795         (WebCore::InbandWebVTTTextTrack::newCuesParsed):
796         * html/track/LoadableTextTrack.cpp:
797         (WebCore::LoadableTextTrack::newCuesAvailable):
798         * html/track/TextTrack.cpp:
799         (WebCore::TextTrack::removeCue):
800         * inspector/agents/WebConsoleAgent.cpp:
801         (WebCore::WebConsoleAgent::getLoggingChannels):
802         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
803         (WebCore::InbandTextTrackPrivateAVF::processAttributedStrings):
804         (WebCore::InbandTextTrackPrivateAVF::removeCompletedCues):
805         (WebCore::InbandTextTrackPrivateAVF::processNativeSamples):
806         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
807         (WebCore::MediaPlayerPrivateAVFoundationObjC::createImageForTimeInRect):
808         (WebCore::MediaPlayerPrivateAVFoundationObjC::updateLastImage):
809         (WebCore::MediaPlayerPrivateAVFoundationObjC::metadataDidArrive):
810         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
811         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekWithTolerance):
812         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekInternal):
813         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::isCurrentPlaybackTargetWireless const):
814
815 2019-03-15  Antoine Quint  <graouts@apple.com>
816
817         Make mouse event simulation a quirk
818         https://bugs.webkit.org/show_bug.cgi?id=195218
819         <rdar://problem/48516794>
820
821         Reviewed by Dean Jackson.
822
823         Add new quirks to control whether we should dispatch simulated mouse events and whether we should assume
824         preventDefault() was called when a simulated "mousemove" event was handled. Currently both return false
825         but will be made to return more interesting results as we determine heuristics or specific sites that
826         may require such quirks.
827
828         * page/Quirks.cpp:
829         (WebCore::Quirks::shouldDispatchSimulateMouseEvents const):
830         (WebCore::Quirks::shouldMousemoveEventHandlingPreventDefault const):
831         * page/Quirks.h:
832
833 2019-03-18  Philippe Normand  <pnormand@igalia.com>
834
835         [GStreamer] Rewrite HTTP source element using pushsrc base class
836         https://bugs.webkit.org/show_bug.cgi?id=195631
837
838         Reviewed by Xabier Rodriguez-Calvar.
839
840         If we want to use webkitwebsrc in adaptivedemux (HLS, DASH, etc)
841         we need a source element that behaves like souphttpsrc, which is
842         implemented using pushsrc. This rewrite might also fix some seek
843         issues.
844
845         No new tests, existing http/tests/media tests cover this patch.
846
847         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
848         (WebCore::MediaPlayerPrivateGStreamer::handleMessage):
849         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
850         (webkit_web_src_class_init):
851         (webkitWebSrcReset):
852         (webkit_web_src_init):
853         (webKitWebSrcCreate):
854         (webKitWebSrcStart):
855         (webKitWebSrcCloseSession):
856         (webKitWebSrcStop):
857         (webKitWebSrcGetSize):
858         (webKitWebSrcIsSeekable):
859         (webKitWebSrcDoSeek):
860         (webKitWebSrcQuery):
861         (webKitWebSrcUnLock):
862         (webKitWebSrcUnLockStop):
863         (webKitWebSrcChangeState):
864         (CachedResourceStreamingClient::checkUpdateBlocksize):
865         (CachedResourceStreamingClient::responseReceived):
866         (CachedResourceStreamingClient::dataReceived):
867         (CachedResourceStreamingClient::accessControlCheckFailed):
868         (CachedResourceStreamingClient::loadFailed):
869         (CachedResourceStreamingClient::loadFinished):
870         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.h:
871
872 2019-03-18  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
873
874         [WPE][GTK] Fix a build warning because of missing to handle an enum value
875         https://bugs.webkit.org/show_bug.cgi?id=195876
876
877         Reviewed by Žan Doberšek.
878
879         When building WPE or GTK port, there is a build warning. The switch-case needs to
880         handle *Positioned* enum value as well in order to avoid the build warning.
881
882         * page/scrolling/nicosia/ScrollingTreeNicosia.cpp:
883         (WebCore::ScrollingTreeNicosia::createScrollingTreeNode): Add case ScrollingNodeType::Positioned.
884
885 2019-03-17  Yusuke Suzuki  <ysuzuki@apple.com>
886
887         REGRESSION: !vm.isInitializingObject() void* JSC::tryAllocateCellHelper<JSC::Structure> JSC::Structure::create
888         https://bugs.webkit.org/show_bug.cgi?id=195858
889
890         Reviewed by Mark Lam.
891
892         Changed the accessor names.
893
894         * bindings/js/SerializedScriptValue.cpp:
895         (WebCore::CloneDeserializer::readTerminal):
896
897 2019-03-16  Darin Adler  <darin@apple.com>
898
899         Improve normalization code, including moving from unorm.h to unorm2.h
900         https://bugs.webkit.org/show_bug.cgi?id=195330
901
902         Reviewed by Michael Catanzaro.
903
904         * editing/TextIterator.cpp: Include unorm2.h.
905         (WebCore::normalizeCharacters): Rewrote to use unorm2_normalize rather than
906         unorm_normalize, but left the logic otherwise the same.
907
908         * platform/graphics/SurrogatePairAwareTextIterator.cpp: Include unorm2.h.
909         (WebCore::SurrogatePairAwareTextIterator::normalizeVoicingMarks):
910         Use unorm2_composePair instead of unorm_normalize.
911
912         * platform/graphics/cairo/FontCairoHarfbuzzNG.cpp:
913         (characterSequenceIsEmoji): Changed to use existing SurrogatePairAwareTextIterator.
914         (FontCascade::fontForCombiningCharacterSequence): Use normalizedNFC instead of
915         calling unorm2_normalize directly.
916
917         * WebCore/platform/graphics/freetype/SimpleFontDataFreeType.cpp:
918         Removed unneeded include of <unicode/normlzr.h>.
919
920         * platform/text/TextEncoding.cpp:
921         (WebCore::TextEncoding::encode const): Use normalizedNFC instead of the
922         code that was here. The normalizedNFC function is better in multiple ways,
923         but primarily it handles 8-bit strings and other already-normalized
924         strings much more efficiently.
925
926 2019-03-16  Jer Noble  <jer.noble@apple.com>
927
928         Unreviewed unified-build fix; GPUBindGroupMetal uses symbols from the Metal.framework; it should import it.
929
930         * platform/graphics/gpu/cocoa/GPUBindGroupMetal.mm:
931
932 2019-03-16  Jer Noble  <jer.noble@apple.com>
933
934         Add a new MediaCapabilitiesExtensionsEnabled setting
935         https://bugs.webkit.org/show_bug.cgi?id=195843
936
937         Reviewed by Geoffrey Garen.
938
939         Add a new setting, MediaCapabilitiesExtensionsEnabled, which controls whether extensions
940         to the Media Capabilities API are available.
941
942         Drive-by fix: make sure that the configuration is passed through to MediaCapabilitiesInfo
943         when no factory can support the configuration.
944
945         * Modules/mediacapabilities/MediaCapabilitiesDecodingInfo.idl:
946         * Modules/mediacapabilities/MediaCapabilitiesEncodingInfo.idl:
947         * bindings/scripts/CodeGeneratorJS.pm:
948         (GenerateDictionaryImplementationContent):
949         * bindings/scripts/IDLAttributes.json:
950         * page/Settings.yaml:
951         * platform/mediacapabilities/MediaEngineConfigurationFactory.cpp:
952         (WebCore::MediaEngineConfigurationFactory::createDecodingConfiguration):
953
954 2019-03-16  Zalan Bujtas  <zalan@apple.com>
955
956         [iOS] Unable to close trending window on naver.com.
957         https://bugs.webkit.org/show_bug.cgi?id=195842
958         <rdar://problem/48067338>
959
960         This patch issues a synthetic mouse move to the tap location after we decided to hover.
961         It ensures that the node under the mouse is up-to-date and when a new tap comes in we can
962         send the mouseout event to the correct node. It fixes the case when the hover content is positioned over
963         the tap target so that the tap target is no longer "under the mouse".
964         On desktop this "transition" happens automatically since the mouse is always present. 
965
966         Reviewed by Simon Fraser.
967
968         Tests: fast/events/touch/ios/content-observation/new-content-covers-tap-target.html
969                fast/events/touch/ios/content-observation/prevent-default-on-touch-start.html
970
971         * page/EventHandler.h:
972         * page/ios/EventHandlerIOS.mm:
973         (WebCore::EventHandler::dispatchSyntheticMouseMove):
974
975 2019-03-16  Sihui Liu  <sihui_liu@apple.com>
976
977         Layout tests imported/w3c/web-platform-tests/IndexedDB/*-exception-order.html are failing
978         https://bugs.webkit.org/show_bug.cgi?id=195650
979
980         Reviewed by Ryosuke Niwa.
981
982         Fix some exception orders in IDB.
983
984         * Modules/indexeddb/IDBDatabase.cpp:
985         (WebCore::IDBDatabase::createObjectStore):
986         Step 6 of https://www.w3.org/TR/IndexedDB-2/#dom-idbdatabase-createobjectstore.
987
988         (WebCore::IDBDatabase::transaction):
989         Step 1 of https://www.w3.org/TR/IndexedDB-2/#dom-idbdatabase-transaction.
990
991         * Modules/indexeddb/IDBIndex.cpp:
992         (WebCore::IDBIndex::doOpenCursor):
993         (WebCore::IDBIndex::openCursor):
994         Step 5 of https://www.w3.org/TR/IndexedDB-2/#dom-idbindex-opencursor.
995
996         (WebCore::IDBIndex::doOpenKeyCursor):
997         (WebCore::IDBIndex::openKeyCursor):
998         Step 5 of https://www.w3.org/TR/IndexedDB-2/#dom-idbindex-openkeycursor.
999
1000         (WebCore::IDBIndex::count):
1001         Step 5 of https://www.w3.org/TR/IndexedDB-2/#dom-idbindex-count.
1002
1003         (WebCore::IDBIndex::doCount):
1004         (WebCore::IDBIndex::get):
1005         Step 5 of https://www.w3.org/TR/IndexedDB-2/#dom-idbindex-get.
1006
1007         (WebCore::IDBIndex::doGet):
1008         (WebCore::IDBIndex::getKey):
1009         Step 5 of https://www.w3.org/TR/IndexedDB-2/#dom-idbindex-getkey.
1010
1011         (WebCore::IDBIndex::doGetKey):
1012         (WebCore::IDBIndex::doGetAll):
1013         (WebCore::IDBIndex::getAll):
1014         Step 5 of https://www.w3.org/TR/IndexedDB-2/#dom-idbindex-getkey.
1015         (WebCore::IDBIndex::doGetAllKeys):
1016         (WebCore::IDBIndex::getAllKeys):
1017         Step 5 of https://www.w3.org/TR/IndexedDB-2/#dom-idbindex-getallkeys.
1018
1019         * Modules/indexeddb/IDBIndex.h:
1020         * Modules/indexeddb/IDBObjectStore.cpp:
1021         (WebCore::IDBObjectStore::doOpenCursor):
1022         (WebCore::IDBObjectStore::openCursor):
1023         Step 5 of https://www.w3.org/TR/IndexedDB-2/#dom-idbobjectstore-opencursor.
1024
1025         (WebCore::IDBObjectStore::doOpenKeyCursor):
1026         (WebCore::IDBObjectStore::openKeyCursor):
1027         Step 5 of https://www.w3.org/TR/IndexedDB-2/#dom-idbobjectstore-openkeycursor.
1028
1029         (WebCore::IDBObjectStore::deleteFunction):
1030         (WebCore::IDBObjectStore::doDelete):
1031         (WebCore::IDBObjectStore::count):
1032         Step 5 of https://www.w3.org/TR/IndexedDB-2/#dom-idbobjectstore-count.
1033
1034         (WebCore::IDBObjectStore::doCount):
1035         (WebCore::IDBObjectStore::doGetAll):
1036         (WebCore::IDBObjectStore::getAll):
1037         Step 5 of https://www.w3.org/TR/IndexedDB-2/#dom-idbobjectstore-getall.
1038
1039         (WebCore::IDBObjectStore::doGetAllKeys):
1040         (WebCore::IDBObjectStore::getAllKeys):
1041         Step 5 of https://www.w3.org/TR/IndexedDB-2/#dom-idbobjectstore-getallkeys.
1042         * Modules/indexeddb/IDBObjectStore.h:
1043
1044 2019-03-16  Ryosuke Niwa  <rniwa@webkit.org>
1045
1046         Reduce the size of Node::deref by eliminating an explicit parentNode check
1047         https://bugs.webkit.org/show_bug.cgi?id=195776
1048
1049         Reviewed by Geoffrey Garen.
1050
1051         This patch eliminates the nullity check of m_parentNode in Node::deref as well as the store to
1052         m_refCount in the case of invoking Node::removedLastRef() as done for RefCounted in r30042.
1053         Together, this patch shrinks WebCore's size by 46KB or ~0.7%.
1054
1055         To do this, we take we take a similar approach as WTF::String by using the lowest bit of m_refCount
1056         to indicate whether a node has a parent or not. Regular ref-counting is done on the upper 31 bits.
1057         Node::setParentNode updates this flag, and Node::deref() would only `delete this` if m_refCount
1058         is identically equal to 0.
1059
1060         For a Document, we set m_refCounted to 0 before in the case of non-zero m_referencingNodeCount
1061         since decrementReferencingNodeCount needs to be able to tell if there is an outstanding Ref/RefPtr
1062         or not when m_referencingNodeCount becomes 0.
1063
1064         No new tests since there should be no behavioral change.
1065
1066         * dom/Document.cpp:
1067         (WebCore::Document::removedLastRef):
1068         * dom/Document.h:
1069         (WebCore::Document::decrementReferencingNodeCount):
1070         * dom/Node.cpp:
1071         (WebCore::Node::Node): Moved the initialization of m_refCount to the member variable declaration.
1072         (WebCore::Node::~Node):
1073         (WebCore::Node::removedLastRef):
1074         * dom/Node.h:
1075         (WebCore::Node): Changed the type of m_refCount from signed int to uint32_t. It was changed from
1076         unsigned int to signed int back in r11492 but I don't think the signedness is needed.
1077         (WebCore::Node::ref): Increment the ref count by 2 (upper 31-bit).
1078         (WebCore::Node::deref): Implemented the optimization. This is what shrinks the WebCore binary size.
1079         (WebCore::Node::hasOneRef const):
1080         (WebCore::Node::refCount const): Ignore the lowest bit. Without this fix, the optimization in
1081         replaceChildrenWithFragment to avoid replacing the text node is disabled whenever there is a parent.
1082         (WebCore::Node::setParentNode): Sets the lowest bit to 1 if the node has a parent and 0 otherwise.
1083
1084 2019-03-16  Said Abou-Hallawa  <sabouhallawa@apple.com>
1085
1086         Remove the SVG property tear off objects for SVGAnimatedInteger
1087         https://bugs.webkit.org/show_bug.cgi?id=195722
1088
1089         Reviewed by Simon Fraser.
1090
1091         Instead of saving a raw integer value in the SVGElement and then wrapping
1092         the pointer to this raw data in a tear off object, we will represent the
1093         integer as Ref<SVGAnimatedInteger> in SVGElement. This will make the 
1094         representation of the property in IDL file match the C++ header file.
1095
1096         When the DOM requests the SVGAnimatedInteger, we get return a reference
1097         to the new animated property. When the rendering code asks for the current
1098         value of the this animated property, we return the animVal() or the
1099         baseVal() depending on whether the property is animating or not.
1100
1101         A pointer to a member in the SVGElement will be registered along with the
1102         associated attribute name in SVGPropertyRegistry. Registering the property
1103         creates an SVGMemberAccessor and links to the associated attribute. The
1104         function of SVGMemberAccessor is to retrieve the value of the property
1105         given a pointer to an SVGElement.
1106
1107         SVGPropertyRegistry manages all the properties of SVGElement. It takes
1108         into account the inherited properties as well.
1109
1110         SVGElement will have a virtual method called propertyRegistry(). Every
1111         superclass will override this method to return a reference to its registry
1112         which includes all the registered properties of this class and its bases.
1113
1114         One important function of the SVGPropertyRegistry and SVGAccessor is they
1115         create the appropriate SVGAttributeAnimator for this property.
1116
1117         SVGAttributeAnimator is just a connection between the animated property
1118         and SVGAnimationFunction. SVGAnimationFunction calculates the values of
1119         the animated property within a time interval. SVGAnimatedPropertyAnimator
1120         updates animVal of the animated property and invalidates the associated
1121         SVGElement and all the instances that references this element.
1122
1123         The plan is to remove all the SVG tear off objects like what this patch
1124         does for SVGAnimatedInteger. So for a period of time the old code and the
1125         new code will co-exist together. These things to consider when reviewing
1126         this patch:
1127
1128         -- SVGAnimatedElementBase was re-factored to use SVGAttributeAnimationControllerBase
1129         which is inherited by SVGLegacyAttributeAnimationController and
1130         SVGAttributeAnimationController. The tear-off properties code which uses
1131         SVGAnimatedType now lives in SVGLegacyAttributeAnimationController. The
1132         new code was added to SVGAttributeAnimationController. The plan is to 
1133         remove the three animation controllers and to move the code of
1134         SVGAttributeAnimationController to SVGAnimatedElementBase when all the tear
1135         off code is removed.
1136
1137         -- SVGElement now keeps two registries one for the tear-off world and the
1138         other for the new world. Eventually we need to get rid of tear-off registry.
1139
1140         -- SVGElement will differentiate between the type of the property by the
1141         the method isAnimatedAttribute().
1142
1143         * Sources.txt:
1144         * WebCore.xcodeproj/project.pbxproj:
1145         * bindings/scripts/CodeGeneratorJS.pm:
1146         (GenerateHeader):
1147         * svg/SVGAnimateElementBase.cpp:
1148         (WebCore::SVGAnimateElementBase::SVGAnimateElementBase):
1149         (WebCore::SVGAnimateElementBase::attributeAnimationController):
1150         (WebCore::SVGAnimateElementBase::attributeAnimationControllerIfExists):
1151         (WebCore::SVGAnimateElementBase::hasValidAttributeType const):
1152         (WebCore::SVGAnimateElementBase::determineAnimatedPropertyType const):
1153         (WebCore::SVGAnimateElementBase::calculateAnimatedValue):
1154         (WebCore::SVGAnimateElementBase::calculateToAtEndOfDurationValue):
1155         (WebCore::SVGAnimateElementBase::calculateFromAndToValues):
1156         (WebCore::SVGAnimateElementBase::calculateFromAndByValues):
1157         (WebCore::SVGAnimateElementBase::resetAnimatedType):
1158         (WebCore::SVGAnimateElementBase::clearAnimatedType):
1159         (WebCore::SVGAnimateElementBase::applyResultsToTarget):
1160         (WebCore::SVGAnimateElementBase::isAdditive const):
1161         (WebCore::SVGAnimateElementBase::calculateDistance):
1162         (WebCore::SVGAnimateElementBase::setTargetElement):
1163         (WebCore::SVGAnimateElementBase::setAttributeName):
1164         (WebCore::SVGAnimateElementBase::resetAnimation):
1165         (WebCore::SVGAnimateElementBase::hasInvalidCSSAttributeType const):
1166         (WebCore::SVGAnimateElementBase::hasValidAttributeType): Deleted.
1167         (WebCore::propertyTypesAreConsistent): Deleted.
1168         (WebCore::applyCSSPropertyToTarget): Deleted.
1169         (WebCore::removeCSSPropertyFromTarget): Deleted.
1170         (WebCore::applyCSSPropertyToTargetAndInstances): Deleted.
1171         (WebCore::removeCSSPropertyFromTargetAndInstances): Deleted.
1172         (WebCore::notifyTargetAboutAnimValChange): Deleted.
1173         (WebCore::notifyTargetAndInstancesAboutAnimValChange): Deleted.
1174         (WebCore::SVGAnimateElementBase::animatedPropertyTypeSupportsAddition const): Deleted.
1175         (WebCore::SVGAnimateElementBase::resetAnimatedPropertyType): Deleted.
1176         (WebCore::SVGAnimateElementBase::ensureAnimator): Deleted.
1177         * svg/SVGAnimateElementBase.h:
1178         * svg/SVGAnimateMotionElement.cpp:
1179         (WebCore::SVGAnimateMotionElement::hasValidAttributeType const):
1180         (WebCore::SVGAnimateMotionElement::hasValidAttributeName const):
1181         (WebCore::SVGAnimateMotionElement::hasValidAttributeType): Deleted.
1182         (WebCore::SVGAnimateMotionElement::hasValidAttributeName): Deleted.
1183         * svg/SVGAnimateMotionElement.h:
1184         * svg/SVGAnimateTransformElement.cpp:
1185         (WebCore::SVGAnimateTransformElement::hasValidAttributeType const):
1186         (WebCore::SVGAnimateTransformElement::hasValidAttributeType): Deleted.
1187         * svg/SVGAnimateTransformElement.h:
1188         * svg/SVGAnimatedInteger.cpp: Removed.
1189         * svg/SVGAnimatedInteger.h: Removed.
1190         * svg/SVGAnimatedIntegerOptionalInteger.cpp: Removed.
1191         * svg/SVGAnimatedIntegerOptionalInteger.h: Removed.
1192         * svg/SVGAnimatedPointList.h:
1193         * svg/SVGAnimationElement.cpp:
1194         (WebCore::SVGAnimationElement::setAttributeType):
1195         (WebCore::SVGAnimationElement::resetAnimation):
1196         (WebCore::SVGAnimationElement::resetAnimatedPropertyType): Deleted.
1197         (WebCore::SVGAnimationElement::setTargetElement): Deleted.
1198         (WebCore::SVGAnimationElement::checkInvalidCSSAttributeType): Deleted.
1199         * svg/SVGAnimationElement.h:
1200         (WebCore::SVGAnimationElement::attributeType const):
1201         (WebCore::SVGAnimationElement::hasInvalidCSSAttributeType const): Deleted.
1202         * svg/SVGAnimatorFactory.h:
1203         (WebCore::SVGAnimatorFactory::create):
1204         * svg/SVGAttributeAnimationController.cpp: Added.
1205         (WebCore::SVGAttributeAnimationController::SVGAttributeAnimationController):
1206         (WebCore::SVGAttributeAnimationController::animator const):
1207         (WebCore::SVGAttributeAnimationController::isDiscreteAnimator const):
1208         (WebCore::SVGAttributeAnimationController::isAdditive const):
1209         (WebCore::SVGAttributeAnimationController::hasValidAttributeType const):
1210         (WebCore::SVGAttributeAnimationController::calculateFromAndToValues):
1211         (WebCore::SVGAttributeAnimationController::calculateFromAndByValues):
1212         (WebCore::SVGAttributeAnimationController::calculateToAtEndOfDurationValue):
1213         (WebCore::SVGAttributeAnimationController::resetAnimatedType):
1214         (WebCore::SVGAttributeAnimationController::calculateAnimatedValue):
1215         (WebCore::SVGAttributeAnimationController::applyResultsToTarget):
1216         (WebCore::SVGAttributeAnimationController::clearAnimatedType):
1217         (WebCore::SVGAttributeAnimationController::calculateDistance):
1218         * svg/SVGAttributeAnimationController.h: Added.
1219         (WebCore::SVGAttributeAnimationController::animatorIfExists const):
1220         * svg/SVGAttributeAnimationControllerBase.cpp: Added.
1221         (WebCore::SVGAttributeAnimationControllerBase::SVGAttributeAnimationControllerBase):
1222         (WebCore::SVGAttributeAnimationControllerBase::determineAnimatedPropertyType):
1223         * svg/SVGAttributeAnimationControllerBase.h: Added.
1224         * svg/SVGElement.cpp:
1225         (WebCore::SVGElement::synchronizeAllAnimatedSVGAttribute):
1226         (WebCore::SVGElement::synchronizeAnimatedSVGAttribute const):
1227         (WebCore::SVGElement::commitPropertyChange):
1228         (WebCore::SVGElement::isAnimatedPropertyAttribute const):
1229         (WebCore::SVGElement::isAnimatedAttribute const):
1230         (WebCore::SVGElement::createAnimator):
1231         * svg/SVGElement.h:
1232         (WebCore::SVGElement::propertyRegistry const):
1233         * svg/SVGFEConvolveMatrixElement.cpp:
1234         (WebCore::SVGFEConvolveMatrixElement::SVGFEConvolveMatrixElement):
1235         (WebCore::SVGFEConvolveMatrixElement::registerAttributes):
1236         (WebCore::SVGFEConvolveMatrixElement::parseAttribute):
1237         (WebCore::SVGFEConvolveMatrixElement::setOrder):
1238         (WebCore::SVGFEConvolveMatrixElement::orderXIdentifier): Deleted.
1239         (WebCore::SVGFEConvolveMatrixElement::orderYIdentifier): Deleted.
1240         * svg/SVGFEConvolveMatrixElement.h:
1241         * svg/SVGFETurbulenceElement.cpp:
1242         (WebCore::SVGFETurbulenceElement::SVGFETurbulenceElement):
1243         (WebCore::SVGFETurbulenceElement::registerAttributes):
1244         (WebCore::SVGFETurbulenceElement::parseAttribute):
1245         (WebCore::SVGFETurbulenceElement::svgAttributeChanged):
1246         * svg/SVGFETurbulenceElement.h:
1247         * svg/SVGFilterElement.h:
1248         * svg/SVGLegacyAttributeAnimationController.cpp: Added.
1249         (WebCore::SVGLegacyAttributeAnimationController::SVGLegacyAttributeAnimationController):
1250         (WebCore::SVGLegacyAttributeAnimationController::animatedTypeAnimator):
1251         (WebCore::SVGLegacyAttributeAnimationController::isAdditive const):
1252         (WebCore::SVGLegacyAttributeAnimationController::hasValidAttributeType const):
1253         (WebCore::SVGLegacyAttributeAnimationController::calculateFromAndToValues):
1254         (WebCore::SVGLegacyAttributeAnimationController::calculateFromAndByValues):
1255         (WebCore::SVGLegacyAttributeAnimationController::calculateToAtEndOfDurationValue):
1256         (WebCore::propertyTypesAreConsistent):
1257         (WebCore::SVGLegacyAttributeAnimationController::resetAnimatedType):
1258         (WebCore::SVGLegacyAttributeAnimationController::calculateAnimatedValue):
1259         (WebCore::applyCSSPropertyToTarget):
1260         (WebCore::removeCSSPropertyFromTarget):
1261         (WebCore::applyCSSPropertyToTargetAndInstances):
1262         (WebCore::removeCSSPropertyFromTargetAndInstances):
1263         (WebCore::notifyTargetAboutAnimValChange):
1264         (WebCore::notifyTargetAndInstancesAboutAnimValChange):
1265         (WebCore::SVGLegacyAttributeAnimationController::applyResultsToTarget):
1266         (WebCore::SVGLegacyAttributeAnimationController::clearAnimatedType):
1267         (WebCore::SVGLegacyAttributeAnimationController::calculateDistance):
1268         * svg/SVGLegacyAttributeAnimationController.h: Added.
1269         * svg/animation/SVGSMILElement.cpp:
1270         (WebCore::SVGSMILElement::hasValidAttributeName const):
1271         (WebCore::SVGSMILElement::hasValidAttributeName): Deleted.
1272         * svg/animation/SVGSMILElement.h:
1273         * svg/properties/SVGAnimatedPrimitiveProperty.h: Added.
1274         (WebCore::SVGAnimatedPrimitiveProperty::create):
1275         (WebCore::SVGAnimatedPrimitiveProperty::setBaseVal):
1276         (WebCore::SVGAnimatedPrimitiveProperty::setBaseValInternal):
1277         (WebCore::SVGAnimatedPrimitiveProperty::baseVal const):
1278         (WebCore::SVGAnimatedPrimitiveProperty::setAnimVal):
1279         (WebCore::SVGAnimatedPrimitiveProperty::animVal const):
1280         (WebCore::SVGAnimatedPrimitiveProperty::animVal):
1281         (WebCore::SVGAnimatedPrimitiveProperty::currentValue const):
1282         (WebCore::SVGAnimatedPrimitiveProperty::SVGAnimatedPrimitiveProperty):
1283         * svg/properties/SVGAnimatedProperty.cpp: Added.
1284         (WebCore::SVGAnimatedProperty::owner const):
1285         (WebCore::SVGAnimatedProperty::commitPropertyChange):
1286         * svg/properties/SVGAnimatedProperty.h: Added.
1287         (WebCore::SVGAnimatedProperty::isAttached const):
1288         (WebCore::SVGAnimatedProperty::detach):
1289         (WebCore::SVGAnimatedProperty::contextElement const):
1290         (WebCore::SVGAnimatedProperty::baseValAsString const):
1291         (WebCore::SVGAnimatedProperty::animValAsString const):
1292         (WebCore::SVGAnimatedProperty::isDirty const):
1293         (WebCore::SVGAnimatedProperty::setDirty):
1294         (WebCore::SVGAnimatedProperty::synchronize):
1295         (WebCore::SVGAnimatedProperty::isAnimating const):
1296         (WebCore::SVGAnimatedProperty::startAnimation):
1297         (WebCore::SVGAnimatedProperty::stopAnimation):
1298         (WebCore::SVGAnimatedProperty::instanceStartAnimation):
1299         (WebCore::SVGAnimatedProperty::instanceStopAnimation):
1300         (WebCore::SVGAnimatedProperty::SVGAnimatedProperty):
1301         * svg/properties/SVGAnimatedPropertyAccessor.h: Added.
1302         * svg/properties/SVGAnimatedPropertyAccessorImpl.h: Added.
1303         * svg/properties/SVGAnimatedPropertyAnimator.h: Added.
1304         (WebCore::SVGAnimatedPropertyAnimator::appendAnimatedInstance):
1305         (WebCore::SVGAnimatedPropertyAnimator::SVGAnimatedPropertyAnimator):
1306         * svg/properties/SVGAnimatedPropertyAnimatorImpl.h: Added.
1307         * svg/properties/SVGAnimatedPropertyImpl.h: Added.
1308         * svg/properties/SVGAnimatedPropertyPairAccessor.h: Added.
1309         (WebCore::SVGAnimatedPropertyPairAccessor::SVGAnimatedPropertyPairAccessor):
1310         (WebCore::SVGAnimatedPropertyPairAccessor::singleton):
1311         (WebCore::SVGAnimatedPropertyPairAccessor::property1 const):
1312         (WebCore::SVGAnimatedPropertyPairAccessor::property2 const):
1313         * svg/properties/SVGAnimatedPropertyPairAccessorImpl.h: Added.
1314         * svg/properties/SVGAnimatedPropertyPairAnimator.h: Added.
1315         (WebCore::SVGAnimatedPropertyPairAnimator::appendAnimatedInstance):
1316         (WebCore::SVGAnimatedPropertyPairAnimator::SVGAnimatedPropertyPairAnimator):
1317         * svg/properties/SVGAnimatedPropertyPairAnimatorImpl.h: Added.
1318         * svg/properties/SVGAnimationAdditiveFunction.h: Added.
1319         (WebCore::SVGAnimationAdditiveFunction::SVGAnimationAdditiveFunction):
1320         (WebCore::SVGAnimationAdditiveFunction::progress):
1321         * svg/properties/SVGAnimationAdditiveValueFunction.h: Added.
1322         (WebCore::SVGAnimationAdditiveValueFunction::toAtEndOfDuration const):
1323         * svg/properties/SVGAnimationAdditiveValueFunctionImpl.h: Added.
1324         (WebCore::SVGAnimationIntegerFunction::progress):
1325         * svg/properties/SVGAnimationFunction.h: Added.
1326         (WebCore::SVGAnimationFunction::isDiscrete const):
1327         (WebCore::SVGAnimationFunction::calculateDistance const):
1328         (WebCore::SVGAnimationFunction::SVGAnimationFunction):
1329         (WebCore::SVGAnimationFunction::addFromAndToValues):
1330         * svg/properties/SVGAttributeAnimator.cpp: Added.
1331         (WebCore::SVGAttributeAnimator::applyAnimatedPropertyChange):
1332         * svg/properties/SVGAttributeAnimator.h: Added.
1333         (WebCore::SVGAttributeAnimator::SVGAttributeAnimator):
1334         (WebCore::SVGAttributeAnimator::isDiscrete const):
1335         (WebCore::SVGAttributeAnimator::setFromAndToValues):
1336         (WebCore::SVGAttributeAnimator::setFromAndByValues):
1337         (WebCore::SVGAttributeAnimator::setToAtEndOfDurationValue):
1338         (WebCore::SVGAttributeAnimator::calculateDistance const):
1339         * svg/properties/SVGAttributeOwnerProxy.cpp:
1340         * svg/properties/SVGAttributeOwnerProxy.h:
1341         * svg/properties/SVGAttributeRegistry.h:
1342         * svg/properties/SVGMemberAccessor.h: Added.
1343         (WebCore::SVGMemberAccessor::detach const):
1344         (WebCore::SVGMemberAccessor::isAnimatedProperty const):
1345         (WebCore::SVGMemberAccessor::isAnimatedLength const):
1346         (WebCore::SVGMemberAccessor::matches const):
1347         (WebCore::SVGMemberAccessor::synchronize const):
1348         (WebCore::SVGMemberAccessor::createAnimator const):
1349         (WebCore::SVGMemberAccessor::appendAnimatedInstance const):
1350         * svg/properties/SVGPointerMemberAccessor.h: Added.
1351         (WebCore::SVGPointerMemberAccessor::SVGPointerMemberAccessor):
1352         (WebCore::SVGPointerMemberAccessor::property const):
1353         (WebCore::SVGPointerMemberAccessor::singleton):
1354         * svg/properties/SVGProperty.h: Added.
1355         * svg/properties/SVGPropertyOwner.h: Added.
1356         (WebCore::SVGPropertyOwner::owner const):
1357         (WebCore::SVGPropertyOwner::attributeContextElement const):
1358         (WebCore::SVGPropertyOwner::commitPropertyChange):
1359         * svg/properties/SVGPropertyOwnerRegistry.h: Added.
1360         (WebCore::SVGPropertyOwnerRegistry::SVGPropertyOwnerRegistry):
1361         (WebCore::SVGPropertyOwnerRegistry::registerProperty):
1362         (WebCore::SVGPropertyOwnerRegistry::enumerateRecursively):
1363         (WebCore::SVGPropertyOwnerRegistry::isKnownAttribute):
1364         (WebCore::SVGPropertyOwnerRegistry::enumerateRecursivelyBaseTypes):
1365         (WebCore::SVGPropertyOwnerRegistry::findAccessor):
1366         * svg/properties/SVGPropertyRegistry.h: Added.
1367
1368 2019-03-16  Ryosuke Niwa  <rniwa@webkit.org>
1369
1370         Remove LayoutAssertionDisableScope after r241289
1371         https://bugs.webkit.org/show_bug.cgi?id=195848
1372
1373         Reviewed by Antti Koivisto.
1374
1375         Remove LayoutAssertionDisableScope for good now that the underlying bug has been fixed in r241289.
1376
1377         * dom/Document.cpp:
1378         (WebCore::isSafeToUpdateStyleOrLayout):
1379         * dom/ScriptDisallowedScope.h:
1380         (WebCore::ScriptDisallowedScope::LayoutAssertionDisableScope): Deleted.
1381         * page/FrameViewLayoutContext.cpp:
1382         (WebCore::FrameViewLayoutContext::layout):
1383
1384 2019-03-15  Eric Carlson  <eric.carlson@apple.com>
1385
1386         Add media stream release logging
1387         https://bugs.webkit.org/show_bug.cgi?id=195823
1388         <rdar://problem/48939406>
1389
1390         Reviewed by Youenn Fablet.
1391
1392         No new tests, no behavioral change.
1393
1394         * Modules/mediastream/MediaStream.cpp:
1395         (WebCore::MediaStream::MediaStream):
1396         (WebCore::MediaStream::clone):
1397         (WebCore::MediaStream::addTrack):
1398         (WebCore::MediaStream::removeTrack):
1399         (WebCore::MediaStream::addTrackFromPlatform):
1400         (WebCore::MediaStream::setIsActive):
1401         (WebCore::MediaStream::mediaCanStart):
1402         (WebCore::MediaStream::startProducingData):
1403         (WebCore::MediaStream::stopProducingData):
1404         (WebCore::MediaStream::endCaptureTracks):
1405         (WebCore::MediaStream::stop):
1406         (WebCore::MediaStream::logChannel const):
1407         * Modules/mediastream/MediaStream.h:
1408         * Modules/mediastream/MediaStreamTrack.cpp:
1409         (WebCore::MediaStreamTrack::MediaStreamTrack):
1410         (WebCore::MediaStreamTrack::logChannel const):
1411         * Modules/mediastream/MediaStreamTrack.h:
1412         * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:
1413         (WebCore::LibWebRTCMediaEndpoint::addTrack):
1414         (WebCore::LibWebRTCMediaEndpoint::sourceFromNewReceiver):
1415         * Modules/webaudio/AudioContext.cpp:
1416         (WebCore::AudioContext::AudioContext):
1417         (WebCore::nextLogIdentifier): Deleted.
1418         * html/HTMLMediaElement.cpp:
1419         (WebCore::HTMLMediaElement::HTMLMediaElement):
1420         (WebCore::nextLogIdentifier): Deleted.
1421         * html/HTMLMediaElement.h:
1422         * platform/audio/PlatformMediaSession.cpp:
1423         (WebCore::PlatformMediaSession::PlatformMediaSession):
1424         (WebCore::nextLogIdentifier): Deleted.
1425         * platform/audio/PlatformMediaSession.h:
1426         * platform/graphics/IntSize.cpp:
1427         (WebCore::IntSize::toJSONObject const):
1428         (WebCore::IntSize::toJSONString const):
1429         * platform/graphics/IntSize.h:
1430         (WTF::LogArgument<WebCore::IntSize>::toString):
1431         * platform/mediastream/MediaStreamPrivate.cpp:
1432         (WebCore::MediaStreamPrivate::addTrack):
1433         (WebCore::MediaStreamPrivate::removeTrack):
1434         (WebCore::MediaStreamPrivate::startProducingData):
1435         (WebCore::MediaStreamPrivate::stopProducingData):
1436         (WebCore::MediaStreamPrivate::setCaptureTracksMuted):
1437         (WebCore::MediaStreamPrivate::trackMutedChanged):
1438         (WebCore::MediaStreamPrivate::trackEnabledChanged):
1439         (WebCore::MediaStreamPrivate::trackStarted):
1440         (WebCore::MediaStreamPrivate::trackEnded):
1441         (WebCore::MediaStreamPrivate::setLogger):
1442         (WebCore::MediaStreamPrivate::logChannel const):
1443         * platform/mediastream/MediaStreamPrivate.h:
1444         * platform/mediastream/MediaStreamTrackPrivate.cpp:
1445         (WebCore::MediaStreamTrackPrivate::setLogger):
1446         (WebCore::MediaStreamTrackPrivate::logChannel const):
1447         * platform/mediastream/MediaStreamTrackPrivate.h:
1448         * platform/mediastream/RealtimeIncomingAudioSource.cpp:
1449         (WebCore::RealtimeIncomingAudioSource::RealtimeIncomingAudioSource):
1450         (WebCore::RealtimeIncomingAudioSource::logChannel const): Deleted.
1451         (WebCore::RealtimeIncomingAudioSource::logger const): Deleted.
1452         * platform/mediastream/RealtimeIncomingAudioSource.h:
1453         (WebCore::RealtimeIncomingAudioSource::setLogger): Deleted.
1454         * platform/mediastream/RealtimeIncomingVideoSource.cpp:
1455         (WebCore::RealtimeIncomingVideoSource::RealtimeIncomingVideoSource):
1456         (WebCore::RealtimeIncomingVideoSource::logChannel const): Deleted.
1457         (WebCore::RealtimeIncomingVideoSource::logger const): Deleted.
1458         * platform/mediastream/RealtimeIncomingVideoSource.h:
1459         (WebCore::RealtimeIncomingVideoSource::setLogger): Deleted.
1460         * platform/mediastream/RealtimeMediaSource.cpp:
1461         (WebCore::RealtimeMediaSource::RealtimeMediaSource):
1462         (WebCore::RealtimeMediaSource::setInterrupted):
1463         (WebCore::RealtimeMediaSource::setMuted):
1464         (WebCore::RealtimeMediaSource::notifyMutedChange):
1465         (WebCore::RealtimeMediaSource::notifySettingsDidChangeObservers):
1466         (WebCore::RealtimeMediaSource::videoSampleAvailable):
1467         (WebCore::RealtimeMediaSource::start):
1468         (WebCore::RealtimeMediaSource::stop):
1469         (WebCore::RealtimeMediaSource::captureFailed):
1470         (WebCore::RealtimeMediaSource::applyConstraint):
1471         (WebCore::RealtimeMediaSource::supportsConstraints):
1472         (WebCore::RealtimeMediaSource::applyConstraints):
1473         (WebCore::RealtimeMediaSource::setSize):
1474         (WebCore::RealtimeMediaSource::setIntrinsicSize):
1475         (WebCore::RealtimeMediaSource::setFrameRate):
1476         (WebCore::RealtimeMediaSource::setAspectRatio):
1477         (WebCore::RealtimeMediaSource::setFacingMode):
1478         (WebCore::RealtimeMediaSource::setVolume):
1479         (WebCore::RealtimeMediaSource::setSampleRate):
1480         (WebCore::RealtimeMediaSource::setSampleSize):
1481         (WebCore::RealtimeMediaSource::setEchoCancellation):
1482         (WebCore::RealtimeMediaSource::setLogger):
1483         (WebCore::RealtimeMediaSource::logChannel const):
1484         (WebCore::convertEnumerationToString):
1485         * platform/mediastream/RealtimeMediaSource.h:
1486         (WTF::LogArgument<WebCore::RealtimeMediaSource::Type>::toString):
1487         * platform/mediastream/RealtimeMediaSourceSettings.cpp:
1488         (WebCore::RealtimeMediaSourceSettings::convertFlagsToString):
1489         (WebCore::convertEnumerationToString):
1490         * platform/mediastream/RealtimeMediaSourceSettings.h:
1491         (WTF::LogArgument<WebCore::RealtimeMediaSourceSettings::VideoFacingMode>::toString):
1492         (WTF::LogArgument<OptionSet<WebCore::RealtimeMediaSourceSettings::Flag>>::toString):
1493         * platform/mediastream/RealtimeOutgoingAudioSource.cpp:
1494         (WebCore::RealtimeOutgoingAudioSource::RealtimeOutgoingAudioSource):
1495         (WebCore::RealtimeOutgoingAudioSource::logChannel const):
1496         (WebCore::RealtimeOutgoingAudioSource::logger const): Deleted.
1497         * platform/mediastream/RealtimeOutgoingAudioSource.h:
1498         (WebCore::RealtimeOutgoingAudioSource::setLogger): Deleted.
1499         * platform/mediastream/RealtimeOutgoingVideoSource.cpp:
1500         (WebCore::RealtimeOutgoingVideoSource::RealtimeOutgoingVideoSource):
1501         (WebCore::RealtimeOutgoingVideoSource::sendOneBlackFrame):
1502         (WebCore::RealtimeOutgoingVideoSource::sendFrame):
1503         (WebCore::RealtimeOutgoingVideoSource::logChannel const):
1504         (WebCore::RealtimeOutgoingVideoSource::logger const): Deleted.
1505         * platform/mediastream/RealtimeOutgoingVideoSource.h:
1506         (WebCore::RealtimeOutgoingVideoSource::setLogger): Deleted.
1507         * platform/mediastream/RealtimeVideoSource.cpp:
1508         (WebCore::RealtimeVideoSource::setSizeAndFrameRate):
1509         (WebCore::SizeAndFrameRate::toJSONObject const):
1510         (WebCore::SizeAndFrameRate::toJSONString const):
1511         * platform/mediastream/RealtimeVideoSource.h:
1512         (WTF::LogArgument<WebCore::SizeAndFrameRate>::toString):
1513         * platform/mediastream/mac/AVVideoCaptureSource.h:
1514         * platform/mediastream/mac/AVVideoCaptureSource.mm:
1515         (WebCore::AVVideoCaptureSource::clearSession):
1516         (WebCore::AVVideoCaptureSource::startProducingData):
1517         (WebCore::AVVideoCaptureSource::stopProducingData):
1518         (WebCore::AVVideoCaptureSource::setSizeAndFrameRateWithPreset):
1519         (WebCore::AVVideoCaptureSource::setupSession):
1520         (WebCore::AVVideoCaptureSource::frameDurationForFrameRate):
1521         (WebCore::AVVideoCaptureSource::setupCaptureSession):
1522         (WebCore::AVVideoCaptureSource::captureSessionIsRunningDidChange):
1523         (WebCore::AVVideoCaptureSource::captureDeviceSuspendedDidChange):
1524         (WebCore::AVVideoCaptureSource::captureSessionRuntimeError):
1525         (WebCore::AVVideoCaptureSource::captureSessionBeginInterruption):
1526         (WebCore::AVVideoCaptureSource::captureSessionEndInterruption):
1527         (WebCore::AVVideoCaptureSource::deviceDisconnected):
1528         (-[WebCoreAVVideoCaptureSourceObserver observeValueForKeyPath:ofObject:change:context:]):
1529         (-[WebCoreAVVideoCaptureSourceObserver deviceConnectedDidChange:]):
1530         (-[WebCoreAVVideoCaptureSourceObserver sessionRuntimeError:]):
1531         (-[WebCoreAVVideoCaptureSourceObserver beginSessionInterrupted:]):
1532         (-[WebCoreAVVideoCaptureSourceObserver endSessionInterrupted:]):
1533         (WebCore::AVVideoCaptureSource::initializeSession): Deleted.
1534         * platform/mediastream/mac/CoreAudioCaptureSource.cpp:
1535         (WebCore::CoreAudioSharedUnit::setupAudioUnit):
1536         (WebCore::CoreAudioSharedUnit::verifyIsCapturing):
1537         (WebCore::CoreAudioSharedUnit::captureFailed):
1538         (WebCore::CoreAudioCaptureSource::initializeToStartProducingData):
1539         (WebCore::CoreAudioCaptureSource::addEchoCancellationSource):
1540         (WebCore::CoreAudioCaptureSource::removeEchoCancellationSource):
1541         (WebCore::CoreAudioCaptureSource::startProducingData):
1542         (WebCore::CoreAudioCaptureSource::stopProducingData):
1543         (WebCore::CoreAudioCaptureSource::scheduleReconfiguration):
1544         (WebCore::CoreAudioCaptureSource::beginInterruption):
1545         (WebCore::CoreAudioCaptureSource::endInterruption):
1546         * platform/mediastream/mac/CoreAudioCaptureSource.h:
1547         * platform/mediastream/mac/ScreenDisplayCaptureSourceMac.h:
1548         * platform/mediastream/mac/ScreenDisplayCaptureSourceMac.mm:
1549         (WebCore::ScreenDisplayCaptureSourceMac::createDisplayStream):
1550         (WebCore::ScreenDisplayCaptureSourceMac::startProducingData):
1551         (WebCore::ScreenDisplayCaptureSourceMac::stopProducingData):
1552         (WebCore::ScreenDisplayCaptureSourceMac::startDisplayStream):
1553
1554 2019-03-15  Devin Rousso  <drousso@apple.com>
1555
1556         Web Inspector: Canvas: remove agent as observer when disabling
1557         https://bugs.webkit.org/show_bug.cgi?id=195825
1558         <rdar://problem/48940255>
1559
1560         Reviewed by Joseph Pecoraro.
1561
1562         No change in functionality.
1563
1564         * inspector/agents/InspectorCanvasAgent.cpp:
1565         (WebCore::InspectorCanvasAgent::disable):
1566
1567 2019-03-15  Ryosuke Niwa  <rniwa@webkit.org>
1568
1569         REGRESSION (r239814): Most classes that user Timer have 7 bytes of padding after the Timer
1570         https://bugs.webkit.org/show_bug.cgi?id=194196
1571
1572         Reviewed by Simon Fraser.
1573
1574         Use std::nan as the value of m_unalignedNextFireTime to indicate the timer had been deleted
1575         instead of having a dedicated boolean, which consumes 7 extra bytes for padding.
1576
1577         Note that some code in WebKit uses +Infinity as a fire time so we can't use that.
1578
1579         * platform/Timer.cpp:
1580         (WebCore::TimerBase::TimerBase):
1581         (WebCore::TimerBase::~TimerBase):
1582         (WebCore::TimerBase::setNextFireTime):
1583         (WebCore::TimerBase::nextUnalignedFireInterval const):
1584         * platform/Timer.h:
1585
1586 2019-03-15  Sihui Liu  <sihui_liu@apple.com>
1587
1588         [ Mojave WK1 ] Layout Test storage/indexeddb/database-odd-names.html is failing
1589         https://bugs.webkit.org/show_bug.cgi?id=190350
1590         <rdar://problem/45089503>
1591
1592         Reviewed by Geoffrey Garen.
1593
1594         Start to use hash for database file names so that the files can work on any filesystem.
1595
1596         We created v0 folder in IndexedDB directory to put the legacy databases, and v1 folder to put the upgraded 
1597         databases.
1598
1599         Tests: TestWebKitAPI.IndexedDB.IndexedDBFileName
1600                TestWebKitAPI.IndexedDB.IndexedDBFileNameV0
1601                TestWebKitAPI.IndexedDB.IndexedDBFileNameV1
1602                TestWebKitAPI.IndexedDB.IndexedDBFileNameAPI
1603                TestWebKitAPI.IndexedDB.HashCollision
1604
1605         * Modules/indexeddb/IDBDatabaseIdentifier.cpp:
1606         (WebCore::IDBDatabaseIdentifier::databaseDirectoryRelativeToRoot const):
1607         (WebCore::IDBDatabaseIdentifier::databaseDirectoryRelativeToRoot):
1608         * Modules/indexeddb/IDBDatabaseIdentifier.h:
1609         * Modules/indexeddb/server/IDBServer.cpp:
1610         (WebCore::IDBServer::m_quotaManagerGetter):
1611         (WebCore::IDBServer::IDBServer::performGetAllDatabaseNames):
1612         (WebCore::IDBServer::removeAllDatabasesForFullOriginPath):
1613         (WebCore::IDBServer::removeAllDatabasesForOriginPath):
1614         (WebCore::IDBServer::IDBServer::removeDatabasesModifiedSinceForVersion):
1615         (WebCore::IDBServer::IDBServer::performCloseAndDeleteDatabasesModifiedSince):
1616         (WebCore::IDBServer::IDBServer::removeDatabasesWithOriginsForVersion):
1617         (WebCore::IDBServer::IDBServer::performCloseAndDeleteDatabasesForOrigins):
1618         (WebCore::IDBServer::IDBServer::computeSpaceUsedForOrigin):
1619         (WebCore::IDBServer::IDBServer::upgradeFilesIfNecessary):
1620         * Modules/indexeddb/server/IDBServer.h:
1621         * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
1622         (WebCore::IDBServer::SQLiteIDBBackingStore::SQLiteIDBBackingStore):
1623         (WebCore::IDBServer::SQLiteIDBBackingStore::fullDatabasePathForDirectory):
1624         (WebCore::IDBServer::SQLiteIDBBackingStore::fullDatabasePath const):
1625         (WebCore::IDBServer::SQLiteIDBBackingStore::databaseNameFromFile):
1626         (WebCore::IDBServer::SQLiteIDBBackingStore::fullDatabaseDirectoryWithUpgrade):
1627         (WebCore::IDBServer::SQLiteIDBBackingStore::getOrEstablishDatabaseInfo):
1628         (WebCore::IDBServer::SQLiteIDBBackingStore::quotaForOrigin const):
1629         (WebCore::IDBServer::SQLiteIDBBackingStore::databasesSizeForOrigin const):
1630         (WebCore::IDBServer::SQLiteIDBBackingStore::getBlobRecordsForObjectStoreRecord):
1631         (WebCore::IDBServer::SQLiteIDBBackingStore::deleteBackingStore):
1632         (WebCore::IDBServer::SQLiteIDBBackingStore::fullDatabaseDirectory const): Deleted.
1633         * Modules/indexeddb/server/SQLiteIDBBackingStore.h:
1634         (WebCore::IDBServer::SQLiteIDBBackingStore::databaseDirectory const):
1635         * Modules/indexeddb/server/SQLiteIDBTransaction.cpp:
1636         (WebCore::IDBServer::SQLiteIDBTransaction::moveBlobFilesIfNecessary):
1637         (WebCore::IDBServer::SQLiteIDBTransaction::deleteBlobFilesIfNecessary):
1638         * platform/sql/SQLiteFileSystem.cpp:
1639         (WebCore::SQLiteFileSystem::computeHashForFileName):
1640         * platform/sql/SQLiteFileSystem.h:
1641
1642 2019-03-15  Zalan Bujtas  <zalan@apple.com>
1643
1644         [ContentChangeObserver] HTMLImageElement::willRespondToMouseClickEvents returns quirk value.
1645         https://bugs.webkit.org/show_bug.cgi?id=195657
1646         <rdar://problem/48834987>
1647
1648         Reviewed by Simon Fraser.
1649
1650         Images should not trigger hover by default (only when they actually respond to mouse events).
1651
1652         Test: fast/events/touch/ios/content-observation/visibility-change-with-image-content.html
1653
1654         * page/ios/ContentChangeObserver.cpp:
1655         (WebCore::ContentChangeObserver::StyleChangeScope::isConsideredClickable const):
1656
1657 2019-03-15  Jer Noble  <jer.noble@apple.com>
1658
1659         Add a "supportedConfiguration" dictionary to MediaCapabilitiesDecodingInfo and MediaCapabilitiesEncodingInfo
1660         https://bugs.webkit.org/show_bug.cgi?id=195763
1661
1662         Reviewed by Jon Lee.
1663
1664         Test: media/mediacapabilities/mock-decodingInfo-supportedConfiguration.html
1665
1666         Add support for a proposed addition to the Media Capabilities spec that would future-proof additional changes
1667         to Media Capabilities by allowing sites to check exactly what properties were queried by the browser when
1668         answering a decodeInfo() or enocdeInfo() query.
1669
1670         * CMakeLists.txt:
1671         * DerivedSources-input.xcfilelist:
1672         * DerivedSources-output.xcfilelist:
1673         * DerivedSources.make:
1674         * Modules/mediacapabilities/AudioConfiguration.idl:
1675         * Modules/mediacapabilities/MediaCapabilities.cpp:
1676         (WebCore::MediaCapabilities::decodingInfo):
1677         (WebCore::MediaCapabilities::encodingInfo):
1678         * Modules/mediacapabilities/MediaCapabilities.idl:
1679         * Modules/mediacapabilities/MediaCapabilitiesDecodingInfo.idl:
1680         * Modules/mediacapabilities/MediaCapabilitiesEncodingInfo.idl:
1681         * Modules/mediacapabilities/MediaCapabilitiesInfo.idl:
1682         * Modules/mediacapabilities/MediaDecodingConfiguration.idl:
1683         * Modules/mediacapabilities/MediaEncodingConfiguration.idl:
1684         * Modules/mediacapabilities/VideoConfiguration.idl:
1685         * Sources.txt:
1686         * WebCore.xcodeproj/project.pbxproj:
1687         * platform/MediaCapabilitiesDecodingInfo.h: Copied from Source/WebCore/platform/graphics/cocoa/MediaEngineConfigurationFactoryCocoa.h.
1688         (WebCore::MediaCapabilitiesDecodingInfo::MediaCapabilitiesDecodingInfo):
1689         * platform/MediaCapabilitiesEncodingInfo.h: Copied from Source/WebCore/platform/graphics/cocoa/MediaEngineConfigurationFactoryCocoa.h.
1690         (WebCore::MediaCapabilitiesEncodingInfo::MediaCapabilitiesEncodingInfo):
1691         * platform/graphics/cocoa/MediaEngineConfigurationFactoryCocoa.cpp:
1692         (WebCore::createMediaPlayerDecodingConfigurationCocoa):
1693         * platform/graphics/cocoa/MediaEngineConfigurationFactoryCocoa.h:
1694         * platform/graphics/gstreamer/MediaEngineConfigurationFactoryGStreamer.cpp:
1695         (WebCore::createMediaPlayerDecodingConfigurationGStreamer):
1696         * platform/graphics/gstreamer/MediaEngineConfigurationFactoryGStreamer.h:
1697         * platform/mediacapabilities/MediaEngineConfigurationFactory.cpp:
1698         (WebCore::MediaEngineConfigurationFactory::createDecodingConfiguration):
1699         (WebCore::MediaEngineConfigurationFactory::createEncodingConfiguration):
1700         * platform/mediacapabilities/MediaEngineConfigurationFactory.h:
1701         * platform/mock/MediaEngineConfigurationFactoryMock.cpp:
1702         (WebCore::MediaEngineConfigurationFactoryMock::createDecodingConfiguration):
1703         (WebCore::MediaEngineConfigurationFactoryMock::createEncodingConfiguration):
1704         * platform/mock/MediaEngineConfigurationFactoryMock.h:
1705
1706 2019-03-15  Antti Koivisto  <antti@apple.com>
1707
1708         Use Region for event region even when it is a rectangle
1709         https://bugs.webkit.org/show_bug.cgi?id=195803
1710
1711         Reviewed by Simon Fraser.
1712
1713         Region type is now optimized for the common single-rectangle case so we can simplify code.
1714
1715         * platform/graphics/GraphicsLayer.cpp:
1716         (WebCore::GraphicsLayer::setEventRegion):
1717         * platform/graphics/GraphicsLayer.h:
1718         (WebCore::GraphicsLayer::eventRegion const):
1719         * platform/graphics/ca/GraphicsLayerCA.cpp:
1720         (WebCore::GraphicsLayerCA::setEventRegion):
1721         * platform/graphics/ca/GraphicsLayerCA.h:
1722         * platform/graphics/ca/PlatformCALayer.h:
1723         * platform/graphics/ca/cocoa/PlatformCALayerCocoa.h:
1724         * rendering/RenderLayerBacking.cpp:
1725         (WebCore::RenderLayerBacking::paintIntoLayer):
1726
1727 2019-03-15  Jer Noble  <jer.noble@apple.com>
1728
1729         Unreviewed unified build fix: GPUBindGroup has a default public constructor and destructor, so all its member
1730         variables must be fully defined.
1731
1732         * platform/graphics/gpu/GPUBindGroup.h:
1733
1734 2019-03-15  Per Arne Vollan  <pvollan@apple.com>
1735
1736         [macOS] Broker access to Speech Synthesis
1737         https://bugs.webkit.org/show_bug.cgi?id=195645
1738         <rdar://problem/35369026>
1739
1740         Reviewed by Brent Fulgham.
1741
1742         To be able to close the connection to the speech synthesis daemon in the WebContent process,
1743         speech synthesis should be performed in the UI process. This patch forwards speech synthesis
1744         requests to the UI process by sending messages. On the UI process side, the speech synthesis
1745         is performed by simply using the existing platform speech synthesizer. Speech synthesis
1746         events are sent back to the WebContent process. All messages are async, except for the
1747         message to get the list of available voices.
1748
1749         No new tests, covered by existing tests.
1750
1751         * Modules/speech/DOMWindowSpeechSynthesis.cpp:
1752         (WebCore::DOMWindowSpeechSynthesis::speechSynthesis):
1753         * Modules/speech/SpeechSynthesis.cpp:
1754         (WebCore::SpeechSynthesis::create):
1755         (WebCore::SpeechSynthesis::SpeechSynthesis):
1756         (WebCore::SpeechSynthesis::setPlatformSynthesizer):
1757         (WebCore::SpeechSynthesis::getVoices):
1758         (WebCore::SpeechSynthesis::startSpeakingImmediately):
1759         (WebCore::SpeechSynthesis::cancel):
1760         (WebCore::SpeechSynthesis::pause):
1761         (WebCore::SpeechSynthesis::resume):
1762         (WebCore::SpeechSynthesis::boundaryEventOccurred):
1763         (WebCore::SpeechSynthesis::didStartSpeaking):
1764         (WebCore::SpeechSynthesis::didFinishSpeaking):
1765         (WebCore::SpeechSynthesis::didPauseSpeaking):
1766         (WebCore::SpeechSynthesis::didResumeSpeaking):
1767         (WebCore::SpeechSynthesis::speakingErrorOccurred):
1768         (WebCore::SpeechSynthesis::voicesChanged):
1769         * Modules/speech/SpeechSynthesis.h:
1770         * WebCore.xcodeproj/project.pbxproj:
1771         * page/Page.cpp:
1772         (WebCore::Page::Page):
1773         * page/Page.h:
1774         (WebCore::Page::speechSynthesisClient const):
1775         * page/PageConfiguration.cpp:
1776         * page/PageConfiguration.h:
1777         * page/SpeechSynthesisClient.h: Added.
1778         * platform/PlatformSpeechSynthesisUtterance.h:
1779         * platform/PlatformSpeechSynthesizer.h:
1780         * platform/ios/PlatformSpeechSynthesizerIOS.mm:
1781         (-[WebSpeechSynthesisWrapper speechSynthesizer:willSpeakRangeOfSpeechString:utterance:]):
1782         * platform/mac/PlatformSpeechSynthesizerMac.mm:
1783         (-[WebSpeechSynthesisWrapper speechSynthesizer:willSpeakWord:ofString:]):
1784         * platform/mock/PlatformSpeechSynthesizerMock.cpp:
1785         (WebCore::PlatformSpeechSynthesizerMock::speak):
1786
1787 2019-03-15  Antti Koivisto  <antti@apple.com>
1788
1789         Try to fix watchOS build.
1790
1791         * platform/graphics/Region.h:
1792         (WebCore::Region::Span::decode):
1793
1794 2019-03-15  Simon Fraser  <simon.fraser@apple.com>
1795
1796         [Async overflow Scrolling] Update positioned node layers when overflows are scrolled
1797         https://bugs.webkit.org/show_bug.cgi?id=195733
1798         rdar://problem/11642295
1799
1800         Reviewed by Antti Koivisto.
1801
1802         Make ScrollingTree positioned nodes in the two cases where we need them, as
1803         detected by RenderLayerCompositor::computeCoordinatedPositioningForLayer().
1804
1805         For "Moves" layers we know that the overflow is not in the z-order ancestor chain,
1806         so ScrollingTree needs a map of overflow node -> affected positioned nodes which
1807         notifyRelatedNodesAfterScrollPositionChange() uses to find nodes to update after
1808         a scroll. Computing these dependent nodes in RenderLayerCompositor() would require
1809         correct dependency analysis between an overflow layers and "positioned" layers which
1810         is hard. It's easier to have "positioned" layers figure out which overflow nodes
1811         affect them, then compute the inverse relationship when the scrolling tree is updated
1812         which happens in ScrollingTreePositionedNode::commitStateBeforeChildren().
1813
1814         Tests: scrollingcoordinator/ios/absolute-layer-should-not-move-with-scroll.html
1815                scrollingcoordinator/ios/relative-layer-should-move-with-scroll.html
1816
1817         * page/scrolling/ScrollingTree.cpp:
1818         (WebCore::ScrollingTree::commitTreeState):
1819         (WebCore::ScrollingTree::applyLayerPositions):
1820         (WebCore::ScrollingTree::notifyRelatedNodesAfterScrollPositionChange):
1821         (WebCore::ScrollingTree::scrollingTreeAsText):
1822         * page/scrolling/ScrollingTree.h:
1823         (WebCore::ScrollingTree::overflowRelatedNodes):
1824         * page/scrolling/ScrollingTreeOverflowScrollingNode.cpp:
1825         (WebCore::ScrollingTreeOverflowScrollingNode::dumpProperties const):
1826         * page/scrolling/ScrollingTreeOverflowScrollingNode.h:
1827         * page/scrolling/cocoa/ScrollingTreePositionedNode.mm:
1828         (WebCore::ScrollingTreePositionedNode::commitStateBeforeChildren):
1829         (WebCore::ScrollingTreePositionedNode::applyLayerPositions):
1830         (WebCore::ScrollingTreePositionedNode::relatedNodeScrollPositionDidChange):
1831         * rendering/RenderLayerCompositor.cpp:
1832         (WebCore::layerContainingBlockCrossesCoordinatedScrollingBoundary):
1833         (WebCore::layerParentedAcrossCoordinatedScrollingBoundary):
1834         (WebCore::RenderLayerCompositor::computeCoordinatedPositioningForLayer const):
1835         (WebCore::collectRelatedCoordinatedScrollingNodes):
1836         (WebCore::RenderLayerCompositor::updateScrollingNodeForPositioningRole):
1837
1838 2019-03-15  Antti Koivisto  <antti@apple.com>
1839
1840         Optimize Region for single rectangle case
1841         https://bugs.webkit.org/show_bug.cgi?id=195743
1842
1843         Reviewed by Simon Fraser.
1844
1845         Instrumentation shows vast majority of Region objects consist of a single rectangle. However it always allocates
1846         the large Shape data structure. This makes it unsuitable to use as a member in any popular objects.
1847
1848         This patch optimizes the single rectangle case by using only the bounds rectangle to describe it.
1849         Shape is allocated on demand. This makes it safe to use Region as a data member where a rectangle is the common case.
1850
1851         The patch also modernizes Region encoding/decoding support.
1852
1853         * platform/graphics/Region.cpp:
1854         (WebCore::Region::Region):
1855         (WebCore::Region::~Region):
1856         (WebCore::Region::operator=):
1857         (WebCore::Region::rects const):
1858         (WebCore::Region::contains const):
1859         (WebCore::Region::intersects const):
1860         (WebCore::Region::Shape::Shape):
1861         (WebCore::Region::Shape::appendSpan):
1862         (WebCore::Region::dump const):
1863         (WebCore::Region::intersect):
1864         (WebCore::Region::unite):
1865         (WebCore::Region::subtract):
1866         (WebCore::Region::translate):
1867         (WebCore::Region::setShape):
1868         (WebCore::Region::Shape::isValid const): Deleted.
1869         (WebCore::Region::Shape::swap): Deleted.
1870         (WebCore::Region::updateBoundsFromShape): Deleted.
1871
1872         Remove some now unused function.
1873
1874         * platform/graphics/Region.h:
1875         (WebCore::Region::isRect const):
1876         (WebCore::Region::gridSize const):
1877         (WebCore::Region::copyShape const):
1878         (WebCore::operator==):
1879         (WebCore::Region::Span::encode const):
1880         (WebCore::Region::Span::decode):
1881         (WebCore::Region::Shape::encode const):
1882         (WebCore::Region::Shape::decode):
1883         (WebCore::Region::encode const):
1884         (WebCore::Region::decode):
1885
1886         This is now part of type.
1887
1888         (WebCore::Region::isValid const): Deleted.
1889         (WebCore::Region::Span::Span): Deleted.
1890         (WebCore::Region::shapeSegments const): Deleted.
1891         (WebCore::Region::shapeSpans const): Deleted.
1892         (WebCore::Region::setShapeSegments): Deleted.
1893         (WebCore::Region::setShapeSpans): Deleted.
1894         (WebCore::Region::Shape::segments const): Deleted.
1895         (WebCore::Region::Shape::spans const): Deleted.
1896         (WebCore::Region::Shape::setSegments): Deleted.
1897         (WebCore::Region::Shape::setSpans): Deleted.
1898
1899         No need to expose these for encoding anymore.
1900
1901 2019-03-15  Devin Rousso  <drousso@apple.com>
1902
1903         Web Inspector: provide a way to capture a screenshot of a node from within the page
1904         https://bugs.webkit.org/show_bug.cgi?id=194279
1905         <rdar://problem/10731573>
1906
1907         Reviewed by Joseph Pecoraro.
1908
1909         Test: inspector/console/console-screenshot.html
1910
1911         Add `console.screenshot` functionality, which displays a screenshot of a given object (if
1912         able) within Web Inspector's Console tab. From there, it can be viewed and saved.
1913
1914         Currently, `console.screenshot` will
1915          - capture an image of a `Node` (if provided)
1916          - capture an image of the viewport if nothing is provided
1917
1918         * page/PageConsoleClient.h:
1919         * page/PageConsoleClient.cpp:
1920         (WebCore::PageConsoleClient::addMessage):
1921         (WebCore::PageConsoleClient::screenshot): Added.
1922
1923         * workers/WorkerConsoleClient.h:
1924         * workers/WorkerConsoleClient.cpp:
1925         (WebCore::WorkerConsoleClient::screenshot): Added.
1926         * worklets/WorkletConsoleClient.h:
1927         * worklets/WorkletConsoleClient.cpp:
1928         (WebCore::WorkletConsoleClient::screenshot): Added.
1929
1930         * inspector/CommandLineAPIModuleSource.js:
1931         (CommandLineAPIImpl.prototype.screenshot): Added.
1932
1933         * inspector/InspectorInstrumentation.h:
1934
1935 2019-03-14  Yusuke Suzuki  <ysuzuki@apple.com>
1936
1937         [JSC] Retain PrivateName of Symbol before passing it to operations potentially incurring GC
1938         https://bugs.webkit.org/show_bug.cgi?id=195791
1939         <rdar://problem/48806130>
1940
1941         Reviewed by Mark Lam.
1942
1943         * bindings/js/ScriptController.cpp:
1944         (WebCore::ScriptController::setupModuleScriptHandlers):
1945
1946 2019-03-14  Brent Fulgham  <bfulgham@apple.com>
1947
1948         Move CoreCrypto SPI declarations to an appropriate PAL/spi header
1949         https://bugs.webkit.org/show_bug.cgi?id=195754
1950         <rdar://problem/48591957>
1951
1952         Reviewed by Jiewen Tan.
1953
1954         Move the forward declarations of various CoreCrypto SPI to an appropriate PAL/spi header.
1955         Update the const correctness of one function call to match new SDK declaration.
1956
1957         No tests because there are no changes in behavior.
1958
1959         * crypto/CommonCryptoUtilities.h:
1960         * crypto/mac/CryptoAlgorithmHKDFMac.cpp:
1961         (WebCore::CryptoAlgorithmHKDF::platformDeriveBits):
1962
1963 2019-03-14  Sihui Liu  <sihui_liu@apple.com>
1964
1965         IndexedDB: re-enable some leak tests
1966         https://bugs.webkit.org/show_bug.cgi?id=194806
1967
1968         Reviewed by Geoffrey Garen.
1969
1970         Protected JSIDBCursor object when advance/continue request on IDBCursor is not finished, because after the 
1971         advance operation completes on success, we need to return the same JSIDBCursor object as before the advance, 
1972         and during the wait for advance operation to complete, we need to return error as the result. 
1973  
1974         Covered by existing tests.
1975
1976         * Modules/indexeddb/IDBCursor.cpp:
1977         (WebCore::IDBCursor::setGetResult):
1978         (WebCore::IDBCursor::clearWrappers):
1979         * Modules/indexeddb/IDBCursor.h:
1980         * Modules/indexeddb/IDBRequest.cpp:
1981         (WebCore::IDBRequest::stop):
1982         (WebCore::IDBRequest::setResult):
1983         (WebCore::IDBRequest::setResultToStructuredClone):
1984         (WebCore::IDBRequest::setResultToUndefined):
1985         (WebCore::IDBRequest::willIterateCursor):
1986         (WebCore::IDBRequest::didOpenOrIterateCursor):
1987         (WebCore::IDBRequest::clearWrappers):
1988         * Modules/indexeddb/IDBRequest.h:
1989         (WebCore::IDBRequest::cursorWrapper):
1990         * bindings/js/JSIDBRequestCustom.cpp:
1991         (WebCore::JSIDBRequest::visitAdditionalChildren):
1992         * bindings/js/JSValueInWrappedObject.h:
1993         (WebCore::JSValueInWrappedObject::JSValueInWrappedObject):
1994         (WebCore::JSValueInWrappedObject::operator=):
1995         (WebCore::JSValueInWrappedObject::clear):
1996
1997 2019-03-14  Shawn Roberts  <sroberts@apple.com>
1998
1999         Unreviewed, rolling out r242981.
2000
2001         Causing internal build failures on watch/tv OS
2002
2003         Reverted changeset:
2004
2005         "Move CoreCrypto SPI declarations to an appropriate PAL/spi
2006         header"
2007         https://bugs.webkit.org/show_bug.cgi?id=195754
2008         https://trac.webkit.org/changeset/242981
2009
2010 2019-03-14  Sihui Liu  <sihui_liu@apple.com>
2011
2012         Web process is put to suspended when holding locked WebSQL files
2013         https://bugs.webkit.org/show_bug.cgi?id=195768
2014
2015         Reviewed by Geoffrey Garen.
2016
2017         We need to keep processes active during database close, because SQLite database may run a checkpoint operation
2018         and lock database files.
2019
2020         * platform/sql/SQLiteDatabase.cpp:
2021         (WebCore::SQLiteDatabase::useWALJournalMode):
2022         (WebCore::SQLiteDatabase::close):
2023         * platform/sql/SQLiteDatabase.h:
2024
2025 2019-03-14  Brent Fulgham  <bfulgham@apple.com>
2026
2027         Move CoreCrypto SPI declarations to an appropriate PAL/spi header
2028         https://bugs.webkit.org/show_bug.cgi?id=195754
2029         <rdar://problem/48591957>
2030
2031         Reviewed by Jiewen Tan.
2032
2033         Move the forward declarations of various CoreCrypto SPI to an appropriate PAL/spi header.
2034         Update the const correctness of one function call to match new SDK declaration.
2035
2036         No tests because there are no changes in behavior.
2037
2038         * crypto/CommonCryptoUtilities.h:
2039         * crypto/mac/CryptoAlgorithmHKDFMac.cpp:
2040         (WebCore::CryptoAlgorithmHKDF::platformDeriveBits):
2041
2042 2019-03-14  Said Abou-Hallawa  <sabouhallawa@apple.com>
2043
2044         Rename SVGProperty to SVGLegacyProperty and rename SVGAnimatedProperty to SVGLegacyAnimatedProperty
2045         https://bugs.webkit.org/show_bug.cgi?id=195767
2046
2047         Reviewed by Tim Horton.
2048
2049         This is a step towards removing the SVG properties tear off objects.
2050
2051         * Sources.txt:
2052         * WebCore.xcodeproj/project.pbxproj:
2053         * svg/SVGAngle.h:
2054         (WebCore::SVGAngle::create):
2055         (WebCore::SVGAngle::SVGAngle):
2056         * svg/SVGAnimateElement.h:
2057         * svg/SVGAnimatedTypeAnimator.h:
2058         (WebCore::SVGAnimatedTypeAnimator::castAnimatedPropertyToActualType):
2059         * svg/SVGElement.h:
2060         (WebCore::SVGElement::lookupAnimatedProperty const):
2061         (WebCore::SVGElement::lookupOrCreateAnimatedProperty):
2062         (WebCore::SVGElement::lookupOrCreateAnimatedProperties):
2063         * svg/SVGLength.h:
2064         (WebCore::SVGLength::create):
2065         (WebCore::SVGLength::SVGLength):
2066         * svg/SVGMatrix.h:
2067         (WebCore::SVGMatrix::create):
2068         (WebCore::SVGMatrix::SVGMatrix):
2069         * svg/SVGNumber.h:
2070         (WebCore::SVGNumber::create):
2071         (WebCore::SVGNumber::SVGNumber):
2072         * svg/SVGPathElement.cpp:
2073         (WebCore::SVGPathElement::lookupOrCreateDWrapper):
2074         * svg/SVGPathElement.h:
2075         * svg/SVGPathSegList.cpp:
2076         (WebCore::SVGPathSegList::processIncomingListItemValue):
2077         * svg/SVGPathSegWithContext.h:
2078         (WebCore::SVGPathSegWithContext::animatedProperty const):
2079         * svg/SVGPoint.h:
2080         (WebCore::SVGPoint::create):
2081         (WebCore::SVGPoint::SVGPoint):
2082         * svg/SVGPreserveAspectRatio.h:
2083         (WebCore::SVGPreserveAspectRatio::create):
2084         (WebCore::SVGPreserveAspectRatio::SVGPreserveAspectRatio):
2085         * svg/SVGRect.h:
2086         (WebCore::SVGRect::create):
2087         (WebCore::SVGRect::SVGRect):
2088         * svg/SVGTransform.h:
2089         (WebCore::SVGTransform::create):
2090         (WebCore::SVGTransform::SVGTransform):
2091         * svg/properties/SVGAnimatedListPropertyTearOff.h:
2092         (WebCore::SVGAnimatedListPropertyTearOff::findItem):
2093         (WebCore::SVGAnimatedListPropertyTearOff::SVGAnimatedListPropertyTearOff):
2094         * svg/properties/SVGAnimatedProperty.cpp: Removed.
2095         * svg/properties/SVGAnimatedProperty.h: Removed.
2096         * svg/properties/SVGAnimatedPropertyTearOff.h:
2097         * svg/properties/SVGAnimatedStaticPropertyTearOff.h:
2098         (WebCore::SVGAnimatedStaticPropertyTearOff::SVGAnimatedStaticPropertyTearOff):
2099         * svg/properties/SVGAttributeAccessor.h:
2100         (WebCore::SVGAttributeAccessor::lookupOrCreateAnimatedProperty const):
2101         (WebCore::SVGAttributeAccessor::lookupAnimatedProperty const):
2102         (WebCore::SVGAttributeAccessor::lookupOrCreateAnimatedProperties const):
2103         (WebCore::SVGAnimatedAttributeAccessor::lookupOrCreateAnimatedProperty):
2104         (WebCore::SVGAnimatedAttributeAccessor::lookupAnimatedProperty):
2105         * svg/properties/SVGAttributeOwnerProxy.h:
2106         * svg/properties/SVGAttributeOwnerProxyImpl.h:
2107         * svg/properties/SVGAttributeRegistry.h:
2108         (WebCore::SVGAttributeRegistry::lookupOrCreateAnimatedProperty const):
2109         (WebCore::SVGAttributeRegistry::lookupAnimatedProperty const):
2110         (WebCore::SVGAttributeRegistry::lookupOrCreateAnimatedProperties const):
2111         (WebCore::SVGAttributeRegistry::lookupOrCreateAnimatedPropertyBaseTypes):
2112         (WebCore::SVGAttributeRegistry::lookupAnimatedPropertyBaseTypes):
2113         (WebCore::SVGAttributeRegistry::lookupOrCreateAnimatedPropertiesBaseTypes):
2114         * svg/properties/SVGLegacyAnimatedProperty.cpp: Copied from Source/WebCore/svg/properties/SVGAnimatedProperty.cpp.
2115         (WebCore::SVGLegacyAnimatedProperty::SVGLegacyAnimatedProperty):
2116         (WebCore::SVGLegacyAnimatedProperty::~SVGLegacyAnimatedProperty):
2117         (WebCore::SVGLegacyAnimatedProperty::commitChange):
2118         (WebCore::SVGAnimatedProperty::SVGAnimatedProperty): Deleted.
2119         (WebCore::SVGAnimatedProperty::~SVGAnimatedProperty): Deleted.
2120         (WebCore::SVGAnimatedProperty::commitChange): Deleted.
2121         * svg/properties/SVGLegacyAnimatedProperty.h: Copied from Source/WebCore/svg/properties/SVGAnimatedProperty.h.
2122         (WebCore::SVGLegacyAnimatedProperty::lookupOrCreateAnimatedProperty):
2123         (WebCore::SVGLegacyAnimatedProperty::lookupAnimatedProperty):
2124         (WebCore::SVGAnimatedProperty::isAnimating const): Deleted.
2125         (WebCore::SVGAnimatedProperty::isAnimatedListTearOff const): Deleted.
2126         (WebCore::SVGAnimatedProperty::contextElement const): Deleted.
2127         (WebCore::SVGAnimatedProperty::attributeName const): Deleted.
2128         (WebCore::SVGAnimatedProperty::animatedPropertyType const): Deleted.
2129         (WebCore::SVGAnimatedProperty::isReadOnly const): Deleted.
2130         (WebCore::SVGAnimatedProperty::setIsReadOnly): Deleted.
2131         (WebCore::SVGAnimatedProperty::lookupOrCreateAnimatedProperty): Deleted.
2132         (WebCore::SVGAnimatedProperty::lookupAnimatedProperty): Deleted.
2133         (WebCore::SVGAnimatedProperty::animatedPropertyCache): Deleted.
2134         * svg/properties/SVGLegacyProperty.h: Copied from Source/WebCore/svg/properties/SVGProperty.h.
2135         * svg/properties/SVGListProperty.h:
2136         * svg/properties/SVGProperty.h: Removed.
2137         * svg/properties/SVGPropertyTearOff.h:
2138         (WebCore::SVGPropertyTearOff::create):
2139         (WebCore::SVGPropertyTearOff::animatedProperty const):
2140         (WebCore::SVGPropertyTearOff::setAnimatedProperty):
2141         (WebCore::SVGPropertyTearOff::SVGPropertyTearOff):
2142
2143 2019-03-14  Ryan Haddad  <ryanhaddad@apple.com>
2144
2145         Unreviewed, rolling out r242963.
2146
2147         Breaks watchOS build.
2148
2149         Reverted changeset:
2150
2151         "Move CommonCrypto SPI declarations to an appropriate PAL/spi
2152         header"
2153         https://bugs.webkit.org/show_bug.cgi?id=195754
2154         https://trac.webkit.org/changeset/242963
2155
2156 2019-03-14  Chris Dumez  <cdumez@apple.com>
2157
2158         Unreviewed, update xcfilelist files as they are out of sync.
2159
2160         * DerivedSources-input.xcfilelist:
2161         * DerivedSources-output.xcfilelist:
2162
2163 2019-03-14  Justin Fan  <justin_fan@apple.com>
2164
2165         [Web GPU] Updates to GPUCommandBuffer for new GPUCommandEncoder concept
2166         https://bugs.webkit.org/show_bug.cgi?id=195083
2167         <rdar://problem/48423591>
2168
2169         Reviewed by Dean Jackson.
2170
2171         Fixing build error and re-introducing rolled-out changes.
2172         WebGPUCommandBuffer now represents a completed GPUCommandBuffer that can only be used in queue submits. The previous WebGPUCommandBuffer
2173         is now WebGPUCommandEncoder.
2174
2175         Affected Web GPU tests updated to match new API.
2176
2177         New files and symbols:
2178         * CMakeLists.txt:
2179         * DerivedSources.make:
2180         * Sources.txt:
2181         * WebCore.xcodeproj/project.pbxproj:
2182         * bindings/js/WebCoreBuiltinNames.h:
2183
2184         Implement new WebGPUCommandBuffer, now just a DOM object carrier for a finished GPUCommandBuffer:
2185         * Modules/webgpu/WebGPUCommandBuffer.cpp:
2186         (WebCore::WebGPUCommandBuffer::create):
2187         (WebCore::WebGPUCommandBuffer::WebGPUCommandBuffer):
2188         (WebCore::WebGPUBufferCopyView::tryCreateGPUBufferCopyView const): Deleted.
2189         (WebCore::WebGPUTextureCopyView::tryCreateGPUTextureCopyView const): Deleted.
2190         (WebCore::WebGPUCommandBuffer::beginRenderPass): Deleted.
2191         (WebCore::WebGPUCommandBuffer::copyBufferToBuffer): Deleted.
2192         (WebCore::WebGPUCommandBuffer::copyBufferToTexture): Deleted.
2193         (WebCore::WebGPUCommandBuffer::copyTextureToBuffer): Deleted.
2194         (WebCore::WebGPUCommandBuffer::copyTextureToTexture): Deleted.
2195         * Modules/webgpu/WebGPUCommandBuffer.h:
2196         (WebCore::WebGPUCommandBuffer::commandBuffer):
2197         (WebCore::WebGPUCommandBuffer::commandBuffer const): Deleted.
2198         * Modules/webgpu/WebGPUCommandBuffer.idl:
2199
2200         Rename old WebGPUCommandBuffer to WebGPUCommandEncoder:
2201         * Modules/webgpu/WebGPUCommandEncoder.cpp: Copied from Source/WebCore/Modules/webgpu/WebGPUCommandBuffer.cpp.
2202         (WebCore::WebGPUBufferCopyView::tryCreateGPUBufferCopyView const):
2203         (WebCore::WebGPUTextureCopyView::tryCreateGPUTextureCopyView const):
2204         (WebCore::WebGPUCommandEncoder::create):
2205         (WebCore::WebGPUCommandEncoder::WebGPUCommandEncoder):
2206         (WebCore::WebGPUCommandEncoder::beginRenderPass):
2207         (WebCore::WebGPUCommandEncoder::copyBufferToBuffer):
2208         (WebCore::WebGPUCommandEncoder::copyBufferToTexture):
2209         (WebCore::WebGPUCommandEncoder::copyTextureToBuffer):
2210         (WebCore::WebGPUCommandEncoder::copyTextureToTexture):
2211         (WebCore::WebGPUCommandEncoder::finish): Added. "Completes" this and invalidates it. Returns its GPUCommandBuffer, ready for submission.
2212         * Modules/webgpu/WebGPUCommandEncoder.h: Copied from Source/WebCore/Modules/webgpu/WebGPUCommandBuffer.h.
2213         * Modules/webgpu/WebGPUCommandEncoder.idl: Copied from Source/WebCore/Modules/webgpu/WebGPUCommandBuffer.idl.
2214         * Modules/webgpu/WebGPUDevice.cpp:
2215         (WebCore::WebGPUDevice::createCommandEncoder const): Renamed fom createCommandBuffer. Now returns non-nullable.
2216         (WebCore::WebGPUDevice::createCommandBuffer const): Deleted.
2217         * Modules/webgpu/WebGPUDevice.h:
2218         * Modules/webgpu/WebGPUDevice.idl:
2219         * Modules/webgpu/WebGPUProgrammablePassEncoder.cpp:
2220         (WebCore::WebGPUProgrammablePassEncoder::WebGPUProgrammablePassEncoder):
2221         (WebCore::WebGPUProgrammablePassEncoder::endPass): No longer returns the original WebGPUCommandBuffer.
2222         (WebCore::WebGPUProgrammablePassEncoder::setBindGroup const):
2223         (WebCore::WebGPUProgrammablePassEncoder::setPipeline):
2224         * Modules/webgpu/WebGPUProgrammablePassEncoder.h:
2225         * Modules/webgpu/WebGPUProgrammablePassEncoder.idl:
2226         * Modules/webgpu/WebGPUQueue.cpp:
2227         (WebCore::WebGPUQueue::submit): Replace unnecessary rvalue reference parameter.
2228         * Modules/webgpu/WebGPUQueue.h:
2229         * Modules/webgpu/WebGPUQueue.idl:
2230         * Modules/webgpu/WebGPURenderPassEncoder.cpp:
2231         (WebCore::WebGPURenderPassEncoder::create):
2232         (WebCore::WebGPURenderPassEncoder::WebGPURenderPassEncoder):
2233         (WebCore::WebGPURenderPassEncoder::setVertexBuffers):
2234         (WebCore::WebGPURenderPassEncoder::draw):
2235         (WebCore::WebGPURenderPassEncoder::passEncoder const): Now returns a pointer since it is properly backed by a RefPtr.
2236         * Modules/webgpu/WebGPURenderPassEncoder.h:
2237         * Modules/webgpu/WebGPUSwapChain.cpp:
2238         (WebCore::WebGPUSwapChain::getCurrentTexture): No longer invalidates m_currentTexture. Doh!
2239         * platform/graphics/gpu/GPUCommandBuffer.h: Missing includes for the *CopyView structs.
2240         * platform/graphics/gpu/GPUDevice.cpp:
2241         (WebCore::GPUDevice::tryCreateCommandBuffer const): Renamed from createCommandBuffer.
2242         (WebCore::GPUDevice::createCommandBuffer): Deleted.
2243         * platform/graphics/gpu/GPUDevice.h:
2244         * platform/graphics/gpu/cocoa/GPUCommandBufferMetal.mm:
2245         (WebCore::GPUCommandBuffer::tryCreate): Renamed from create.
2246         (WebCore::GPUCommandBuffer::create): Deleted.
2247
2248 2019-03-14  Justin Fan  <justin_fan@apple.com>
2249
2250         [Web GPU] Enum cleanup
2251         https://bugs.webkit.org/show_bug.cgi?id=195766
2252
2253         Reviewed by Myles C. Maxfield.
2254
2255         Clean up enum implementations in Web GPU. Enums referenced by only one class now share implementation files with that class to reduce clutter.
2256         
2257         No change in behavior.
2258
2259         * DerivedSources.make:
2260         * Modules/webgpu/GPUBindGroupLayoutBinding.h:
2261         * Modules/webgpu/GPUBindGroupLayoutBinding.idl:
2262         * Modules/webgpu/GPUInputStateDescriptor.idl:
2263         * Modules/webgpu/GPURequestAdapterOptions.idl:
2264         * Modules/webgpu/GPUSamplerDescriptor.idl:
2265         * Modules/webgpu/GPUTextureDescriptor.idl:
2266         * Modules/webgpu/GPUTextureDimension.idl: Removed.
2267         * Modules/webgpu/GPUVertexAttributeDescriptor.idl:
2268         * Modules/webgpu/GPUVertexInputDescriptor.idl:
2269         * Modules/webgpu/WebGPUBindGroupDescriptor.cpp:
2270         (WebCore::validateBufferBindingType):
2271         * Modules/webgpu/WebGPURenderPipelineDescriptor.h:
2272         * Modules/webgpu/WebGPURenderPipelineDescriptor.idl:
2273         * Sources.txt:
2274         * WebCore.xcodeproj/project.pbxproj:
2275         * platform/graphics/gpu/GPUInputStateDescriptor.h:
2276         * platform/graphics/gpu/GPURequestAdapterOptions.h:
2277         * platform/graphics/gpu/GPUSamplerDescriptor.h:
2278         * platform/graphics/gpu/GPUTextureDescriptor.h:
2279         * platform/graphics/gpu/GPUTextureDimension.h: Removed.
2280         * platform/graphics/gpu/GPUVertexAttributeDescriptor.h:
2281         * platform/graphics/gpu/GPUVertexInputDescriptor.h:
2282         * platform/graphics/gpu/cocoa/GPUBindGroupLayoutMetal.mm:
2283         (WebCore::MTLDataTypeForBindingType):
2284         * platform/graphics/gpu/cocoa/GPUBindGroupMetal.mm:
2285         (WebCore::GPUBindGroup::tryCreate):
2286         * platform/graphics/gpu/cocoa/GPUDeviceMetal.mm:
2287         (WebCore::GPUDevice::create):
2288         * platform/graphics/gpu/cocoa/GPUSamplerMetal.mm:
2289         (WebCore::mtlAddressModeForAddressMode):
2290         (WebCore::mtlMinMagFilterForFilterMode):
2291         (WebCore::mtlMipFilterForFilterMode):
2292
2293 2019-03-14  Said Abou-Hallawa  <sabouhallawa@apple.com>
2294
2295         Use enum class for AnimationMode
2296         https://bugs.webkit.org/show_bug.cgi?id=195762
2297
2298         Reviewed by Tim Horton.
2299
2300         Convert AnimationMode into an enum class.
2301
2302         * svg/SVGAnimateElementBase.cpp:
2303         (WebCore::SVGAnimateElementBase::calculateFromAndByValues):
2304         (WebCore::SVGAnimateElementBase::isAdditive const):
2305         * svg/SVGAnimateMotionElement.cpp:
2306         (WebCore::SVGAnimateMotionElement::calculateFromAndByValues):
2307         (WebCore::SVGAnimateMotionElement::calculateAnimatedValue):
2308         (WebCore::SVGAnimateMotionElement::updateAnimationMode):
2309         * svg/SVGAnimatedAngle.cpp:
2310         (WebCore::SVGAnimatedAngleAnimator::calculateAnimatedValue):
2311         * svg/SVGAnimatedBoolean.cpp:
2312         (WebCore::SVGAnimatedBooleanAnimator::calculateAnimatedValue):
2313         * svg/SVGAnimatedColor.cpp:
2314         (WebCore::SVGAnimatedColorAnimator::calculateAnimatedValue):
2315         * svg/SVGAnimatedEnumeration.cpp:
2316         (WebCore::SVGAnimatedEnumerationAnimator::calculateAnimatedValue):
2317         * svg/SVGAnimatedInteger.cpp:
2318         (WebCore::SVGAnimatedIntegerAnimator::calculateAnimatedValue):
2319         * svg/SVGAnimatedIntegerOptionalInteger.cpp:
2320         (WebCore::SVGAnimatedIntegerOptionalIntegerAnimator::calculateAnimatedValue):
2321         * svg/SVGAnimatedLength.cpp:
2322         (WebCore::SVGAnimatedLengthAnimator::calculateAnimatedValue):
2323         * svg/SVGAnimatedLengthList.cpp:
2324         (WebCore::SVGAnimatedLengthListAnimator::calculateAnimatedValue):
2325         * svg/SVGAnimatedNumber.cpp:
2326         (WebCore::SVGAnimatedNumberAnimator::calculateAnimatedValue):
2327         * svg/SVGAnimatedNumberList.cpp:
2328         (WebCore::SVGAnimatedNumberListAnimator::calculateAnimatedValue):
2329         * svg/SVGAnimatedNumberOptionalNumber.cpp:
2330         (WebCore::SVGAnimatedNumberOptionalNumberAnimator::calculateAnimatedValue):
2331         * svg/SVGAnimatedPath.cpp:
2332         (WebCore::SVGAnimatedPathAnimator::calculateAnimatedValue):
2333         * svg/SVGAnimatedPointList.cpp:
2334         (WebCore::SVGAnimatedPointListAnimator::calculateAnimatedValue):
2335         * svg/SVGAnimatedPreserveAspectRatio.cpp:
2336         (WebCore::SVGAnimatedPreserveAspectRatioAnimator::calculateAnimatedValue):
2337         * svg/SVGAnimatedRect.cpp:
2338         (WebCore::SVGAnimatedRectAnimator::calculateAnimatedValue):
2339         * svg/SVGAnimatedTransformList.cpp:
2340         (WebCore::SVGAnimatedTransformListAnimator::calculateAnimatedValue):
2341         * svg/SVGAnimationElement.cpp:
2342         (WebCore::SVGAnimationElement::updateAnimationMode):
2343         (WebCore::SVGAnimationElement::isAdditive const):
2344         (WebCore::SVGAnimationElement::isAccumulated const):
2345         (WebCore::SVGAnimationElement::calculateKeyTimesForCalcModePaced):
2346         (WebCore::SVGAnimationElement::startedActiveInterval):
2347         (WebCore::SVGAnimationElement::updateAnimation):
2348         * svg/SVGAnimationElement.h:
2349         (WebCore::SVGAnimationElement::adjustFromToListValues):
2350         (WebCore::SVGAnimationElement::animateDiscreteType):
2351         (WebCore::SVGAnimationElement::animateAdditiveNumber):
2352         * svg/SVGSetElement.cpp:
2353         (WebCore::SVGSetElement::SVGSetElement):
2354         (WebCore::SVGSetElement::updateAnimationMode):
2355
2356 2019-03-14  Ryosuke Niwa  <rniwa@webkit.org>
2357
2358         Storing a Node in Ref/RefPtr inside its destructor results in double delete
2359         https://bugs.webkit.org/show_bug.cgi?id=195661
2360
2361         Reviewed by Brent Fulgham.
2362
2363         Set Node::m_refCount to 1 before calling its virtual destructor.
2364
2365         This is a security mitigation to prevent any code which ends up storing the node to Ref / RefPtr
2366         inside the destructor, which is a programming error caught by debug assertions, from triggering
2367         a double-delete on the same Node.
2368
2369         Such a code would hit the debug assertions in Node::deref() because m_inRemovedLastRefFunction
2370         had been set to true by then.
2371
2372         * dom/Document.cpp:
2373         (WebCore::Document::removedLastRef):
2374         * dom/Document.h:
2375         (WebCore::Document::decrementReferencingNodeCount):
2376         * dom/Node.cpp:
2377         (WebCore::Node::~Node):
2378         (WebCore::Node::removedLastRef):
2379
2380 2019-03-14  Brent Fulgham  <bfulgham@apple.com>
2381
2382         Move CommonCrypto SPI declarations to an appropriate PAL/spi header
2383         https://bugs.webkit.org/show_bug.cgi?id=195754
2384         <rdar://problem/48591957>
2385
2386         Reviewed by Jiewen Tan.
2387
2388         Move the forward declarations of various CommonCrypto SPI to an appropriate PAL/spi header.
2389         Update the const correctness of one function call to match new SDK declaration.
2390
2391         No tests because there are no changes in behavior.
2392
2393         * crypto/CommonCryptoUtilities.h:
2394         * crypto/mac/CryptoAlgorithmHKDFMac.cpp:
2395         (WebCore::CryptoAlgorithmHKDF::platformDeriveBits):
2396
2397 2019-03-14  Chris Dumez  <cdumez@apple.com>
2398
2399         Add WebsitePolicy for the client to specify the device orientation & motion access policy
2400         https://bugs.webkit.org/show_bug.cgi?id=195750
2401
2402         Reviewed by Geoffrey Garen.
2403
2404         Add WebsitePolicy for the client to specify the device orientation & motion access policy. If
2405         the client already knows access to the device motion & orientation API will be granted / denied,
2406         it can let WebKit know via WebsitePolicies so that WebKit will not ask the client when the
2407         permission is requested by JS.
2408
2409         * dom/DeviceOrientationAndMotionAccessController.cpp:
2410         (WebCore::DeviceOrientationAndMotionAccessController::shouldAllowAccess):
2411         (WebCore::DeviceOrientationAndMotionAccessController::setAccessState):
2412         (WebCore::DeviceOrientationAndMotionAccessController::accessState const):
2413         * dom/DeviceOrientationAndMotionAccessController.h:
2414         * loader/DocumentLoader.h:
2415         (WebCore::DocumentLoader::deviceOrientationAndMotionAccessState const):
2416         (WebCore::DocumentLoader::setDeviceOrientationAndMotionAccessState):
2417         * page/DOMWindow.cpp:
2418         (WebCore::DOMWindow::isAllowedToUseDeviceMotionOrientation const):
2419
2420 2019-03-14  Shawn Roberts  <sroberts@apple.com>
2421
2422         Unreviewed, rolling out r242931.
2423
2424         Causing internal watch/tv OS build failures
2425
2426         Reverted changeset:
2427
2428         "[Web GPU] Updates to GPUCommandBuffer for new GPUCommandQueue
2429         concept"
2430         https://bugs.webkit.org/show_bug.cgi?id=195083
2431         https://trac.webkit.org/changeset/242931
2432
2433 2019-03-14  Chris Dumez  <cdumez@apple.com>
2434
2435         Device orientation's permission should only require a user gesture to prompt the user
2436         https://bugs.webkit.org/show_bug.cgi?id=195731
2437
2438         Reviewed by Geoffrey Garen.
2439
2440         Device orientation's permission should only require a user gesture to prompt the user. If the
2441         user already made a decision, we should resolve the promise with this decision, even without
2442         user gesture.
2443
2444         This is useful for JS to figure out if they are access to device orientation or not because
2445         showing UI for the user to give permission.
2446
2447         No new tests, updated existing tests.
2448
2449         * dom/DeviceOrientationAndMotionAccessController.cpp:
2450         (WebCore::DeviceOrientationAndMotionAccessController::shouldAllowAccess):
2451         * dom/DeviceOrientationAndMotionAccessController.h:
2452         * dom/DeviceOrientationOrMotionEvent.cpp:
2453         (WebCore::DeviceOrientationOrMotionEvent::requestPermission):
2454
2455 2019-03-14  Youenn Fablet  <youenn@apple.com>
2456
2457         Reset storage quota when clearing IDB/Cache API entries
2458         https://bugs.webkit.org/show_bug.cgi?id=195716
2459
2460         Reviewed by Chris Dumez.
2461
2462         On clearing of databases, reset all quota users.
2463         This will ensure all layout test runs start with a clean state.
2464
2465         * Modules/indexeddb/server/IDBServer.cpp:
2466         (WebCore::IDBServer::IDBServer::didPerformCloseAndDeleteDatabases):
2467         * storage/StorageQuotaManager.h:
2468         (WebCore::StorageQuotaManager::resetQuota):
2469
2470 2019-03-14  Jer Noble  <jer.noble@apple.com>
2471
2472         Certain videos are causing a crash when used as WebGL texture
2473         https://bugs.webkit.org/show_bug.cgi?id=195700
2474         <rdar://problem/48869347>
2475
2476         Reviewed by Eric Carlson.
2477
2478         CFEqual is not null-safe, so perform a null and type check before comparing.
2479
2480         * platform/graphics/cv/VideoTextureCopierCV.cpp:
2481         (WebCore::transferFunctionFromString):
2482
2483 2019-03-14  Zalan Bujtas  <zalan@apple.com>
2484
2485         Cleanup inline boxes when list marker gets blockified
2486         https://bugs.webkit.org/show_bug.cgi?id=195746
2487         <rdar://problem/48049175>
2488
2489         Reviewed by Antti Koivisto.
2490
2491         Normally when an element gets blockified (inline -> block) we destroy its renderer and construct a new one (RenderInline -> RenderBlock).
2492         During this process the associated inline boxtree gets destroyed as well. Since RenderListMarker is just a generic RenderBox, the blockifying
2493         change does not require a new renderer.
2494         This patch takes care of destroying the inline boxtree when the marker gains block display type. 
2495
2496         Test: fast/block/float/list-marker-is-float-crash.html
2497
2498         * rendering/RenderListMarker.cpp:
2499         (WebCore::RenderListMarker::styleDidChange):
2500
2501 2019-03-14  Devin Rousso  <drousso@apple.com>
2502
2503         Web Inspector: Audit: provide a way to get the contents of resources
2504         https://bugs.webkit.org/show_bug.cgi?id=195266
2505         <rdar://problem/48550911>
2506
2507         Reviewed by Joseph Pecoraro.
2508
2509         Test: inspector/audit/run-resources.html
2510
2511         * inspector/InspectorAuditResourcesObject.idl: Added.
2512         * inspector/InspectorAuditResourcesObject.h: Added.
2513         (WebCore::InspectorAuditResourcesObject::create):
2514         (WebCore::InspectorAuditResourcesObject::Resource):
2515         (WebCore::InspectorAuditResourcesObject::ResourceContent):
2516         (WebCore::InspectorAuditResourcesObject::InspectorAuditCachedResourceClient):
2517         (WebCore::InspectorAuditResourcesObject::InspectorAuditCachedFontClient):
2518         (WebCore::InspectorAuditResourcesObject::InspectorAuditCachedImageClient):
2519         (WebCore::InspectorAuditResourcesObject::InspectorAuditCachedRawResourceClient):
2520         (WebCore::InspectorAuditResourcesObject::InspectorAuditCachedStyleSheetClient):
2521         (WebCore::InspectorAuditResourcesObject::InspectorAuditCachedSVGDocumentClient):
2522         * inspector/InspectorAuditResourcesObject.cpp: Added.
2523         (WebCore::InspectorAuditResourcesObject::InspectorAuditResourcesObject):
2524         (WebCore::InspectorAuditResourcesObject::getResources):
2525         (WebCore::InspectorAuditResourcesObject::getResourceContent):
2526         (WebCore::InspectorAuditResourcesObject::clientForResource):
2527
2528         * inspector/agents/InspectorPageAgent.h:
2529         * inspector/agents/InspectorPageAgent.cpp:
2530         (WebCore::InspectorPageAgent::cachedResourcesForFrame): Added.
2531         (WebCore::allResourcesURLsForFrame):
2532         Moved a file static function to be a class static function so it can be used elsewhere.
2533
2534         * CMakeLists.txt:
2535         * DerivedSources-input.xcfilelist:
2536         * DerivedSources-output.xcfilelist:
2537         * DerivedSources.make:
2538         * Sources.txt:
2539         * WebCore.xcodeproj/project.pbxproj:
2540
2541 2019-03-14  Devin Rousso  <drousso@apple.com>
2542
2543         Web Inspector: Console: getEventListeners should work for any EventTarget
2544         https://bugs.webkit.org/show_bug.cgi?id=195713
2545
2546         Reviewed by Joseph Pecoraro.
2547
2548         Test: inspector/console/command-line-api-getEventListeners.html
2549
2550         * dom/EventTarget.h:
2551         * dom/EventTarget.cpp:
2552         (WebCore::EventTarget::eventTypes): Added.
2553
2554         * inspector/CommandLineAPIHost.idl:
2555         * inspector/CommandLineAPIHost.h:
2556         (WebCore::CommandLineAPIHost::init):
2557         * inspector/CommandLineAPIHost.cpp:
2558         (WebCore::CommandLineAPIHost::disconnect):
2559         (WebCore::CommandLineAPIHost::getEventListeners):
2560         (WebCore::listenerEntriesFromListenerInfo): Deleted.
2561
2562         * inspector/CommandLineAPIModuleSource.js:
2563         (CommandLineAPIImpl.prototype.getEventListeners):
2564
2565         * inspector/InspectorController.cpp:
2566         (WebCore::InspectorController::InspectorController):
2567         * inspector/WorkerInspectorController.cpp:
2568         (WebCore::WorkerInspectorController::WorkerInspectorController):
2569
2570 2019-03-14  Devin Rousso  <drousso@apple.com>
2571
2572         Web Inspector: Styles: `::-webkit-scrollbar*` rules aren't shown
2573         https://bugs.webkit.org/show_bug.cgi?id=195123
2574         <rdar://problem/48450148>
2575
2576         Reviewed by Joseph Pecoraro.
2577
2578         Test: inspector/css/getMatchedStylesForNode.html
2579
2580         * inspector/agents/InspectorCSSAgent.cpp:
2581         (WebCore::protocolValueForPseudoId): Added.
2582         (WebCore::InspectorCSSAgent::getMatchedStylesForNode):
2583
2584 2019-03-13  Benjamin Poulain  <benjamin@webkit.org>
2585
2586         Fix the argument type of RenderView::resumePausedImageAnimationsIfNeeded()
2587         https://bugs.webkit.org/show_bug.cgi?id=195659
2588
2589         Reviewed by Saam Barati.
2590
2591         The two callers of resumePausedImageAnimationsIfNeeded() both get the IntRect
2592         as a reference. The rect was going on the stack then used as a reference again.
2593
2594         * rendering/RenderView.cpp:
2595         (WebCore::RenderView::resumePausedImageAnimationsIfNeeded):
2596         * rendering/RenderView.h:
2597
2598 2019-03-13  Zalan Bujtas  <zalan@apple.com>
2599
2600         [ContentChangeObserver] Stop content observation when content calls preventDefault() on touch events
2601         https://bugs.webkit.org/show_bug.cgi?id=195724
2602         <rdar://problem/48873456>
2603
2604         Reviewed by Simon Fraser.
2605
2606         Call willNotProceedWithClick on preventDefault. This is very similar to the long press case.
2607
2608         * page/ios/ContentChangeObserver.cpp:
2609         (WebCore::willNotProceedWithClick):
2610         (WebCore::ContentChangeObserver::didRecognizeLongPress):
2611         (WebCore::ContentChangeObserver::didPreventDefaultForEvent):
2612         * page/ios/ContentChangeObserver.h:
2613
2614 2019-03-13  Justin Fan  <justin_fan@apple.com>
2615
2616         [Web GPU] Updates to GPUCommandBuffer for new GPUCommandQueue concept
2617         https://bugs.webkit.org/show_bug.cgi?id=195083
2618         <rdar://problem/48423591>
2619
2620         Reviewed by Dean Jackson.
2621
2622         WebGPUCommandBuffer now represents a completed GPUCommandBuffer that can only be used in queue submits. The previous WebGPUCommandBuffer
2623         is now WebGPUCommandEncoder.
2624
2625         Affected Web GPU tests updated to match new API.
2626
2627         New files and symbols:
2628         * CMakeLists.txt:
2629         * DerivedSources.make:
2630         * Sources.txt:
2631         * WebCore.xcodeproj/project.pbxproj:
2632         * bindings/js/WebCoreBuiltinNames.h:
2633
2634         Implement new WebGPUCommandBuffer, now just a DOM object carrier for a finished GPUCommandBuffer:
2635         * Modules/webgpu/WebGPUCommandBuffer.cpp:
2636         (WebCore::WebGPUCommandBuffer::create):
2637         (WebCore::WebGPUCommandBuffer::WebGPUCommandBuffer):
2638         (WebCore::WebGPUBufferCopyView::tryCreateGPUBufferCopyView const): Deleted.
2639         (WebCore::WebGPUTextureCopyView::tryCreateGPUTextureCopyView const): Deleted.
2640         (WebCore::WebGPUCommandBuffer::beginRenderPass): Deleted.
2641         (WebCore::WebGPUCommandBuffer::copyBufferToBuffer): Deleted.
2642         (WebCore::WebGPUCommandBuffer::copyBufferToTexture): Deleted.
2643         (WebCore::WebGPUCommandBuffer::copyTextureToBuffer): Deleted.
2644         (WebCore::WebGPUCommandBuffer::copyTextureToTexture): Deleted.
2645         * Modules/webgpu/WebGPUCommandBuffer.h:
2646         (WebCore::WebGPUCommandBuffer::commandBuffer):
2647         (WebCore::WebGPUCommandBuffer::commandBuffer const): Deleted.
2648         * Modules/webgpu/WebGPUCommandBuffer.idl:
2649
2650         Rename old WebGPUCommandBuffer to WebGPUCommandEncoder:
2651         * Modules/webgpu/WebGPUCommandEncoder.cpp: Copied from Source/WebCore/Modules/webgpu/WebGPUCommandBuffer.cpp.
2652         (WebCore::WebGPUBufferCopyView::tryCreateGPUBufferCopyView const):
2653         (WebCore::WebGPUTextureCopyView::tryCreateGPUTextureCopyView const):
2654         (WebCore::WebGPUCommandEncoder::create):
2655         (WebCore::WebGPUCommandEncoder::WebGPUCommandEncoder):
2656         (WebCore::WebGPUCommandEncoder::beginRenderPass):
2657         (WebCore::WebGPUCommandEncoder::copyBufferToBuffer):
2658         (WebCore::WebGPUCommandEncoder::copyBufferToTexture):
2659         (WebCore::WebGPUCommandEncoder::copyTextureToBuffer):
2660         (WebCore::WebGPUCommandEncoder::copyTextureToTexture):
2661         (WebCore::WebGPUCommandEncoder::finish): Added. "Completes" this and invalidates it. Returns its GPUCommandBuffer, ready for submission.
2662         * Modules/webgpu/WebGPUCommandEncoder.h: Copied from Source/WebCore/Modules/webgpu/WebGPUCommandBuffer.h.
2663         * Modules/webgpu/WebGPUCommandEncoder.idl: Copied from Source/WebCore/Modules/webgpu/WebGPUCommandBuffer.idl.
2664         * Modules/webgpu/WebGPUDevice.cpp:
2665         (WebCore::WebGPUDevice::createCommandEncoder const): Renamed fom createCommandBuffer. Now returns non-nullable.
2666         (WebCore::WebGPUDevice::createCommandBuffer const): Deleted.
2667         * Modules/webgpu/WebGPUDevice.h:
2668         * Modules/webgpu/WebGPUDevice.idl:
2669         * Modules/webgpu/WebGPUProgrammablePassEncoder.cpp:
2670         (WebCore::WebGPUProgrammablePassEncoder::WebGPUProgrammablePassEncoder):
2671         (WebCore::WebGPUProgrammablePassEncoder::endPass): No longer returns the original WebGPUCommandBuffer.
2672         (WebCore::WebGPUProgrammablePassEncoder::setBindGroup const):
2673         (WebCore::WebGPUProgrammablePassEncoder::setPipeline):
2674         * Modules/webgpu/WebGPUProgrammablePassEncoder.h:
2675         * Modules/webgpu/WebGPUProgrammablePassEncoder.idl:
2676         * Modules/webgpu/WebGPUQueue.cpp:
2677         (WebCore::WebGPUQueue::submit): Replace unnecessary rvalue reference parameter.
2678         * Modules/webgpu/WebGPUQueue.h:
2679         * Modules/webgpu/WebGPUQueue.idl:
2680         * Modules/webgpu/WebGPURenderPassEncoder.cpp:
2681         (WebCore::WebGPURenderPassEncoder::create):
2682         (WebCore::WebGPURenderPassEncoder::WebGPURenderPassEncoder):
2683         (WebCore::WebGPURenderPassEncoder::setVertexBuffers):
2684         (WebCore::WebGPURenderPassEncoder::draw):
2685         (WebCore::WebGPURenderPassEncoder::passEncoder const): Now returns a pointer since it is properly backed by a RefPtr.
2686         * Modules/webgpu/WebGPURenderPassEncoder.h:
2687         * Modules/webgpu/WebGPUSwapChain.cpp:
2688         (WebCore::WebGPUSwapChain::getCurrentTexture): No longer invalidates m_currentTexture. Doh!
2689         * platform/graphics/gpu/GPUCommandBuffer.h: Missing includes for the *CopyView structs.
2690         * platform/graphics/gpu/GPUDevice.cpp:
2691         (WebCore::GPUDevice::tryCreateCommandBuffer const): Renamed from createCommandBuffer.
2692         (WebCore::GPUDevice::createCommandBuffer): Deleted.
2693         * platform/graphics/gpu/GPUDevice.h:
2694         * platform/graphics/gpu/cocoa/GPUCommandBufferMetal.mm:
2695         (WebCore::GPUCommandBuffer::tryCreate): Renamed from create.
2696         (WebCore::GPUCommandBuffer::create): Deleted.
2697
2698 2019-03-13  Zalan Bujtas  <zalan@apple.com>
2699
2700         [WeakPtr] RenderListMarker::m_listItem should be a WeakPtr
2701         https://bugs.webkit.org/show_bug.cgi?id=195704
2702         <rdar://problem/48486278>
2703
2704         Reviewed by Simon Fraser.
2705
2706         * rendering/RenderListMarker.cpp:
2707         (WebCore::RenderListMarker::RenderListMarker):
2708         (WebCore::RenderListMarker::paint):
2709         (WebCore::RenderListMarker::layout):
2710         (WebCore::RenderListMarker::updateContent):
2711         (WebCore::RenderListMarker::computePreferredLogicalWidths):
2712         (WebCore::RenderListMarker::lineHeight const):
2713         (WebCore::RenderListMarker::baselinePosition const):
2714         (WebCore::RenderListMarker::suffix const):
2715         (WebCore::RenderListMarker::isInside const):
2716         (WebCore::RenderListMarker::getRelativeMarkerRect):
2717         * rendering/RenderListMarker.h:
2718
2719 2019-03-13  Dean Jackson  <dino@apple.com>
2720
2721         Block all plugins smaller than 5x5px
2722         https://bugs.webkit.org/show_bug.cgi?id=195702
2723         <rdar://problem/28435204>
2724
2725         Reviewed by Sam Weinig.
2726
2727         Block all plugins that are smaller than a threshold, in this case
2728         5px x 5px. Other browsers have implemented this for a while, and now
2729         that we have Intersection Observers, small plugins are no longer
2730         necessary.
2731
2732         Test: plugins/small-plugin-blocked.html
2733
2734         * en.lproj/Localizable.strings: New message for a small plugin.
2735         * platform/LocalizedStrings.cpp:
2736         (WebCore::pluginTooSmallText):
2737         * platform/LocalizedStrings.h:
2738
2739         * html/HTMLPlugInElement.cpp: Helper function for Internals testing.
2740         (WebCore::HTMLPlugInElement::isBelowSizeThreshold const):
2741         * html/HTMLPlugInElement.h:
2742
2743         * loader/EmptyClients.cpp: Removed an unused function.
2744         (WebCore::EmptyFrameLoaderClient::recreatePlugin): Deleted.
2745         * loader/EmptyFrameLoaderClient.h:
2746         * loader/FrameLoaderClient.h:
2747
2748         * page/Settings.yaml: Add flag for new feature.
2749
2750         * rendering/RenderEmbeddedObject.cpp: New unavailability reason for
2751         embedded objects.
2752         (WebCore::unavailablePluginReplacementText):
2753         * rendering/RenderEmbeddedObject.h:
2754         (WebCore::RenderEmbeddedObject::pluginUnavailabilityReason const):
2755
2756         * testing/Internals.cpp: Helper function for testing.
2757         (WebCore::Internals::pluginIsBelowSizeThreshold):
2758         * testing/Internals.h:
2759         * testing/Internals.idl:
2760
2761 2019-03-13  Zalan Bujtas  <zalan@apple.com>
2762
2763         Use RenderBox::previousSiblingBox/nextSiblingBox in RenderMultiColumnFlow
2764         https://bugs.webkit.org/show_bug.cgi?id=195701
2765         <rdar://problem/48448658>
2766
2767         Reviewed by Simon Fraser.
2768
2769         It's safer to use existing RenderBox functions to get sibling boxes.
2770
2771         Test: fast/ruby/crash-when-paginated-ruby.html
2772
2773         * rendering/RenderMultiColumnFlow.cpp:
2774         (WebCore::RenderMultiColumnFlow::nextColumnSetOrSpannerSiblingOf):
2775         (WebCore::RenderMultiColumnFlow::previousColumnSetOrSpannerSiblingOf):
2776
2777 2019-03-13  Keith Rollin  <krollin@apple.com>
2778
2779         Add support for new StagedFrameworks layout
2780         https://bugs.webkit.org/show_bug.cgi?id=195543
2781
2782         Reviewed by Alexey Proskuryakov.
2783
2784         When creating the WebKit layout for out-of-band Safari/WebKit updates,
2785         use an optional path prefix when called for.
2786
2787         No new tests since there should be no observable behavior difference.
2788
2789         * Configurations/WebCore.xcconfig:
2790
2791 2019-03-13  Wenson Hsieh  <wenson_hsieh@apple.com>
2792
2793         Fix an edge case where HTMLFormElement::removeFormElement is invoked twice with the same element
2794         https://bugs.webkit.org/show_bug.cgi?id=195663
2795         <rdar://problem/48576391>
2796
2797         Reviewed by Ryosuke Niwa.
2798
2799         Currently, it's possible for HTMLFormControlElement's destructor to be reentrant. This may happen if the form
2800         control element is ref'd while carrying out its destructor's logic. This may happen in two places in
2801         HTMLFormControlElement (didChangeForm and resetDefaultButton), both of which actually don't require ensuring a
2802         protected reference to the form control element since they should never result in any script execution.
2803
2804         To fix the bug, convert these strong references into raw pointers, and add ScriptDisallowedScope to ensure that
2805         we don't change these codepaths in the future, such that they trigger arbitrary script execution.
2806
2807         Test: fast/forms/remove-associated-element-after-gc.html
2808
2809         * html/HTMLFormControlElement.cpp:
2810         (WebCore::HTMLFormControlElement::didChangeForm):
2811         * html/HTMLFormElement.cpp:
2812         (WebCore::HTMLFormElement::resetDefaultButton):
2813
2814 2019-03-13  Daniel Bates  <dabates@apple.com>
2815
2816         Remove some unnecessary !USE(UIKIT_KEYBOARD_ADDITIONS) guards
2817         https://bugs.webkit.org/show_bug.cgi?id=195703
2818
2819         Reviewed by Tim Horton.
2820
2821         Remove out-of-date comment and unncessary !USE(UIKIT_KEYBOARD_ADDITIONS) guards. Following
2822         r240604 we now make use of WebCore::windowsKeyCodeForCharCode() even for hardware key events
2823         when USE(UIKIT_KEYBOARD_ADDITIONS) is enabled.
2824
2825         No functionality changed. So, no new tests.
2826
2827         * platform/ios/KeyEventIOS.mm:
2828         (WebCore::windowsKeyCodeForCharCode):
2829         * platform/ios/WebEvent.mm:
2830         (normalizedStringWithAppKitCompatibilityMapping):
2831
2832 2019-03-13  Simon Fraser  <simon.fraser@apple.com>
2833
2834         Scrolling tree should reposition non-stacking order descendents of overflow:scroll
2835         https://bugs.webkit.org/show_bug.cgi?id=195608
2836
2837         Reviewed by Zalan Bujtas.
2838         
2839         Step 1: add scrolling tree positioning nodes classes (but don't create them yet).
2840
2841         Add Scrolling{State,Tree}PositionedNode to track composited layers that have to be repositioned when
2842         an async overflow:scroll scrolls. There are two instances in which this is necessary, reflected by
2843         the values of ScrollPositioningBehavior:
2844
2845         ScrollPositioningBehavior::Moves - a composited layer whose containing block chain includes an
2846             async overflow scroller, but whose composited (i.e. z-order) parent is outside of the overflow.
2847             When the overflow scrolls, this layer has to move along with the overflow.
2848
2849         ScrollPositioningBehavior::Stationary - a composited layer whose containing block chain skips the
2850             overflow scroller, but whose compositing (z-order) parent is the scroller, or inside the scroller.
2851             This only applies to position:absolute, on, for example, an overflow:scroll ith opacity.
2852
2853         PositionedNodes are modeled after Fixed/Sticky nodes, with a new type of layout constraint just called LayoutConstraints.
2854         
2855         This patch adds support for PositionedNodes in the scrolling trees, but RenderLayerCompositor::computeCoordinatedPositioningForLayer()
2856         is just a stub so the new node types aren't created yet.
2857         
2858         RenderLayerBacking stores a ScrollingNodeID for the positioning role (just like the other roles). Since the Positioning
2859         role is about position relative to ancestors, a node with both Positioning and FrameHosting or Scrolling roles treats
2860         the Positioning node as the parent of the other types. A node should never have both Positioning and ViewportConstrained roles.
2861
2862         Test: scrollingcoordinator/scrolling-tree/positioned-nodes.html
2863
2864         * Sources.txt:
2865         * SourcesCocoa.txt:
2866         * WebCore.xcodeproj/project.pbxproj:
2867         * page/scrolling/AsyncScrollingCoordinator.cpp:
2868         (WebCore::AsyncScrollingCoordinator::setPositionedNodeGeometry):
2869         (WebCore::AsyncScrollingCoordinator::setRelatedOverflowScrollingNodes):
2870         * page/scrolling/AsyncScrollingCoordinator.h:
2871         * page/scrolling/ScrollingConstraints.cpp:
2872         (WebCore::operator<<):
2873         * page/scrolling/ScrollingConstraints.h:
2874         (WebCore::LayoutConstraints::LayoutConstraints):
2875         (WebCore::LayoutConstraints::operator== const):
2876         (WebCore::LayoutConstraints::operator!= const):
2877         (WebCore::LayoutConstraints::alignmentOffset const):
2878         (WebCore::LayoutConstraints::setAlignmentOffset):
2879         (WebCore::LayoutConstraints::layerPositionAtLastLayout const):
2880         (WebCore::LayoutConstraints::setLayerPositionAtLastLayout):
2881         (WebCore::LayoutConstraints::scrollPositioningBehavior const):
2882         (WebCore::LayoutConstraints::setScrollPositioningBehavior):
2883         * page/scrolling/ScrollingCoordinator.cpp:
2884         (WebCore::operator<<):
2885         * page/scrolling/ScrollingCoordinator.h:
2886         (WebCore::ScrollingCoordinator::setPositionedNodeGeometry):
2887         (WebCore::ScrollingCoordinator::setRelatedOverflowScrollingNodes):
2888         * page/scrolling/ScrollingCoordinatorTypes.h:
2889         * page/scrolling/ScrollingStateNode.h:
2890         (WebCore::ScrollingStateNode::isPositionedNode const):
2891         * page/scrolling/ScrollingStatePositionedNode.cpp: Added.
2892         (WebCore::ScrollingStatePositionedNode::create):
2893         (WebCore::ScrollingStatePositionedNode::ScrollingStatePositionedNode):
2894         (WebCore::ScrollingStatePositionedNode::clone):
2895         (WebCore::ScrollingStatePositionedNode::setAllPropertiesChanged):
2896         (WebCore::ScrollingStatePositionedNode::setRelatedOverflowScrollingNodes):
2897         (WebCore::ScrollingStatePositionedNode::updateConstraints):
2898         (WebCore::ScrollingStatePositionedNode::dumpProperties const):
2899         * page/scrolling/ScrollingStatePositionedNode.h: Added.
2900         * page/scrolling/ScrollingStateTree.cpp:
2901         (WebCore::ScrollingStateTree::createNode):
2902         * page/scrolling/ScrollingTree.cpp:
2903         (WebCore::ScrollingTree::updateTreeFromStateNode):
2904         * page/scrolling/ScrollingTree.h:
2905         * page/scrolling/ScrollingTreeNode.h:
2906         (WebCore::ScrollingTreeNode::isPositionedNode const):
2907         * page/scrolling/cocoa/ScrollingTreePositionedNode.h: Copied from Source/WebCore/page/scrolling/cocoa/ScrollingTreeStickyNode.h.
2908         * page/scrolling/cocoa/ScrollingTreePositionedNode.mm: Added.
2909         (WebCore::ScrollingTreePositionedNode::create):
2910         (WebCore::ScrollingTreePositionedNode::ScrollingTreePositionedNode):
2911         (WebCore::ScrollingTreePositionedNode::~ScrollingTreePositionedNode):
2912         (WebCore::ScrollingTreePositionedNode::commitStateBeforeChildren):
2913         (WebCore::ScrollingTreePositionedNode::applyLayerPositions):
2914         (WebCore::ScrollingTreePositionedNode::relatedNodeScrollPositionDidChange):
2915         (WebCore::ScrollingTreePositionedNode::dumpProperties const):
2916         * page/scrolling/cocoa/ScrollingTreeStickyNode.h:
2917         * page/scrolling/mac/ScrollingTreeMac.cpp:
2918         (ScrollingTreeMac::createScrollingTreeNode):
2919         * platform/ScrollTypes.h:
2920         * rendering/RenderLayerBacking.cpp:
2921         (WebCore::RenderLayerBacking::coordinatedScrollingRoles const):
2922         (WebCore::RenderLayerBacking::detachFromScrollingCoordinator):
2923         * rendering/RenderLayerBacking.h:
2924         * rendering/RenderLayerCompositor.cpp:
2925         (WebCore::RenderLayerCompositor::computeCoordinatedPositioningForLayer const):
2926         (WebCore::scrollCoordinationRoleForNodeType):
2927         (WebCore::RenderLayerCompositor::updateScrollCoordinationForLayer):
2928         (WebCore::RenderLayerCompositor::updateScrollingNodeForViewportConstrainedRole):
2929         (WebCore::RenderLayerCompositor::updateScrollingNodeLayers):
2930         (WebCore::RenderLayerCompositor::updateScrollingNodeForPositioningRole):
2931         * rendering/RenderLayerCompositor.h:
2932
2933 2019-03-13  Youenn Fablet  <youenn@apple.com>
2934
2935         Check IDB quota usage through QuotaManager
2936         https://bugs.webkit.org/show_bug.cgi?id=195302
2937
2938         Reviewed by Chris Dumez.
2939
2940         For every write operation, compute an estimate size and check for quota before proceeding.
2941         When proceeding, store the estimate size in a map.
2942         If size of the database is to be computed when the task is not done,
2943         the estimate size will be added to the current size of the databases.
2944         At the end of the task, the estimate size is removed from the map,
2945         and the databases size is refreshed.
2946
2947         This patch implements size estimation for write tasks.
2948         Put/add operations might overestimate the size
2949         when an old value will be replaced by a new value.
2950         In that case, we do not substract the old value size since we do not know it.
2951
2952         This patch implements database opening by adding a fixed small cost,
2953         as we do not know whether the database is new or not.
2954
2955         For the first IDB request, we have not computed the size of the database.
2956         To do so, we need to go to a background thread and do that file size computation.
2957         For that purpose, we add support for being-initialized quota user.
2958         Quota manager is calling whenInitialized on its quota user and will
2959         delay any quota check requests until its quota user is answering this callback.
2960
2961         For in process IDB, use the default storage quota per origin and do not increase it.
2962         Future work should move it to NetworkProcess and implement some quota checking.
2963
2964         Cache API and IDB quota management are not yet fully unified.
2965         If IDB is used on start-up, we should check for Cache API storage size.
2966         Conversely, on Cache API first wite task, even if IDB is not being used,
2967         we should compute the size of the IDB data for the given origin.
2968
2969         Test: http/tests/IndexedDB/storage-limit.https.html
2970
2971         * Modules/indexeddb/server/IDBBackingStore.h:
2972         * Modules/indexeddb/server/IDBServer.cpp:
2973         (WebCore::IDBServer::IDBServer::create):
2974         (WebCore::IDBServer::IDBServer::IDBServer):
2975         (WebCore::IDBServer::m_quotaManagerGetter):
2976         (WebCore::IDBServer::IDBServer::QuotaUser::QuotaUser):
2977         (WebCore::IDBServer::IDBServer::QuotaUser::~QuotaUser):
2978         (WebCore::IDBServer::IDBServer::QuotaUser::clearSpaceUsed):
2979         (WebCore::IDBServer::IDBServer::QuotaUser::whenInitialized):
2980         (WebCore::IDBServer::IDBServer::QuotaUser::initializeSpaceUsed):
2981         (WebCore::IDBServer::IDBServer::quotaUser):
2982         (WebCore::IDBServer::IDBServer::startComputingSpaceUsedForOrigin):
2983         (WebCore::IDBServer::IDBServer::computeSpaceUsedForOrigin):
2984         (WebCore::IDBServer::IDBServer::finishComputingSpaceUsedForOrigin):
2985         (WebCore::IDBServer::IDBServer::requestSpace):
2986         (WebCore::IDBServer::IDBServer::clearSpaceUsed):
2987         (WebCore::IDBServer::IDBServer::setSpaceUsed):
2988         (WebCore::IDBServer::IDBServer::increasePotentialSpaceUsed):
2989         (WebCore::IDBServer::IDBServer::decreasePotentialSpaceUsed):
2990         * Modules/indexeddb/server/IDBServer.h:
2991         (WebCore::IDBServer::IDBServer::create):
2992         * Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
2993         (WebCore::IDBServer::MemoryIDBBackingStore::databasesSizeForOrigin const):
2994         * Modules/indexeddb/server/MemoryIDBBackingStore.h:
2995         * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
2996         (WebCore::IDBServer::SQLiteIDBBackingStore::databasesSizeForFolder):
2997         (WebCore::IDBServer::SQLiteIDBBackingStore::databasesSizeForOrigin const):
2998         (WebCore::IDBServer::SQLiteIDBBackingStore::maximumSize const):
2999         * Modules/indexeddb/server/SQLiteIDBBackingStore.h:
3000         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
3001         (WebCore::IDBServer::estimateSize):
3002         (WebCore::IDBServer::UniqueIDBDatabase::UniqueIDBDatabase):
3003         (WebCore::IDBServer::quotaErrorMessageName):
3004         (WebCore::IDBServer::UniqueIDBDatabase::requestSpace):
3005         (WebCore::IDBServer::UniqueIDBDatabase::performCurrentOpenOperation):
3006         (WebCore::IDBServer::UniqueIDBDatabase::storeCallbackOrFireError):
3007         (WebCore::IDBServer::UniqueIDBDatabase::createObjectStore):
3008         (WebCore::IDBServer::UniqueIDBDatabase::createObjectStoreAfterQuotaCheck):
3009         (WebCore::IDBServer::UniqueIDBDatabase::renameObjectStore):
3010         (WebCore::IDBServer::UniqueIDBDatabase::renameObjectStoreAfterQuotaCheck):
3011         (WebCore::IDBServer::UniqueIDBDatabase::createIndex):
3012         (WebCore::IDBServer::UniqueIDBDatabase::createIndexAfterQuotaCheck):
3013         (WebCore::IDBServer::UniqueIDBDatabase::renameIndex):
3014         (WebCore::IDBServer::UniqueIDBDatabase::renameIndexAfterQuotaCheck):
3015         (WebCore::IDBServer::UniqueIDBDatabase::putOrAdd):
3016         (WebCore::IDBServer::UniqueIDBDatabase::putOrAddAfterQuotaCheck):
3017         (WebCore::IDBServer::UniqueIDBDatabase::postDatabaseTaskReply):
3018         (WebCore::IDBServer::UniqueIDBDatabase::immediateCloseForUserDelete):
3019         (WebCore::IDBServer::UniqueIDBDatabase::updateSpaceUsedIfNeeded):
3020         (WebCore::IDBServer::UniqueIDBDatabase::performErrorCallback):
3021         (WebCore::IDBServer::UniqueIDBDatabase::performKeyDataCallback):
3022         * Modules/indexeddb/server/UniqueIDBDatabase.h:
3023         (WebCore::IDBServer::UniqueIDBDatabase::server):
3024         * Modules/indexeddb/shared/InProcessIDBServer.cpp:
3025         (WebCore::InProcessIDBServer::create):
3026         (WebCore::InProcessIDBServer::quotaManager):
3027         (WebCore::storageQuotaManagerGetter):
3028         (WebCore::InProcessIDBServer::InProcessIDBServer):
3029         * Modules/indexeddb/shared/InProcessIDBServer.h:
3030         * loader/EmptyClients.cpp:
3031         * storage/StorageQuotaManager.cpp:
3032         (WebCore::StorageQuotaManager::addUser):
3033         (WebCore::StorageQuotaManager::requestSpace):
3034         * storage/StorageQuotaManager.h:
3035         (WebCore::StorageQuotaManager::defaultQuota):
3036         (WebCore::StorageQuotaManager::removeUser):
3037         * storage/StorageQuotaUser.h:
3038         (WebCore::StorageQuotaUser::whenInitialized):
3039
3040 2019-03-13  Chris Dumez  <cdumez@apple.com>
3041
3042         Better build fix after r242901.
3043
3044         Reviewed by Jer Noble.
3045
3046         * platform/audio/cocoa/MediaSessionManagerCocoa.mm:
3047         (MediaSessionManagerCocoa::sessionWillBeginPlayback):
3048         (MediaSessionManagerCocoa::updateNowPlayingInfo):
3049
3050 2019-03-13  Timothy Hatcher  <timothy@apple.com>
3051
3052         Consolidate ArgumentCodersMac and ArgumentCodersCocoa.
3053         https://bugs.webkit.org/show_bug.cgi?id=195636
3054         rdar://problem/45055697
3055
3056         Reviewed by Ryosuke Niwa.
3057
3058         * editing/DictionaryPopupInfo.h:
3059         (WebCore::DictionaryPopupInfo::encodingRequiresPlatformData const): Added.
3060         * editing/FontAttributes.h:
3061         (WebCore::FontAttributes::encodingRequiresPlatformData const): Added.
3062
3063 2019-03-13  Chris Dumez  <cdumez@apple.com>
3064
3065         Unreviewed build fix after r242901.
3066
3067         * platform/audio/cocoa/MediaSessionManagerCocoa.mm:
3068         (MediaSessionManagerCocoa::updateNowPlayingInfo):
3069
3070 2019-03-13  Chris Dumez  <cdumez@apple.com>
3071
3072         Use a ServiceWorker process per registrable domain
3073         https://bugs.webkit.org/show_bug.cgi?id=195649
3074
3075         Reviewed by Youenn Fablet.
3076
3077         Use a ServiceWorker process per registrable domain instead of one per security origin. This is
3078         more in line with PSON and avoids launching too many processes.
3079
3080         * page/ClientOrigin.h:
3081         (WebCore::ClientOrigin::clientRegistrableDomain const):
3082         * workers/service/server/SWServer.cpp:
3083         (WebCore::SWServer::tryInstallContextData):
3084         (WebCore::SWServer::serverToContextConnectionCreated):
3085         (WebCore::SWServer::runServiceWorkerIfNecessary):
3086         (WebCore::SWServer::markAllWorkersForRegistrableDomainAsTerminated):
3087         (WebCore::SWServer::registerServiceWorkerClient):
3088         (WebCore::SWServer::unregisterServiceWorkerClient):
3089         (WebCore::SWServer::needsServerToContextConnectionForRegistrableDomain const):
3090         * workers/service/server/SWServer.h:
3091         * workers/service/server/SWServerToContextConnection.cpp:
3092         (WebCore::SWServerToContextConnection::SWServerToContextConnection):
3093         (WebCore::SWServerToContextConnection::~SWServerToContextConnection):
3094         (WebCore::SWServerToContextConnection::connectionForRegistrableDomain):
3095         * workers/service/server/SWServerToContextConnection.h:
3096         (WebCore::SWServerToContextConnection::registrableDomain const):
3097         * workers/service/server/SWServerWorker.cpp:
3098         (WebCore::SWServerWorker::contextConnection):
3099         * workers/service/server/SWServerWorker.h:
3100         (WebCore::SWServerWorker::registrableDomain const):
3101
3102 2019-03-13  Chris Dumez  <cdumez@apple.com>
3103
3104         REGRESSION(PSON, r240660): Navigation over process boundary is flashy when using Cmd-left/right arrow to navigate
3105         https://bugs.webkit.org/show_bug.cgi?id=195684
3106         <rdar://problem/48294714>
3107
3108         Reviewed by Antti Koivisto.
3109
3110         The issue was caused by us failing to suspend the current page on navigation because the source and
3111         target WebBackForwardListItem are identical. The source WebBackForwardListItem was wrong.
3112
3113         When a navigation is triggered by the WebContent process (and not the UIProcess), we create the Navigation
3114         object in WebPageProxy::decidePolicyForNavigationAction(). For the navigation's targetItem, we use the
3115         target item identifier provided by the WebContent process via the NavigationActionData. However,
3116         for the source item, we would use the WebBackForwardList's currentItem in the UIProcess. The issue
3117         is that the WebBackForwardList's currentItem usually has already been updated to be the target
3118         item via a WebPageProxy::BackForwardGoToItem() synchronous IPC.
3119
3120         To avoid raciness and given that the current history management is fragile (as it is managed by
3121         both the UIProcess and the WebProcess), I am now passing the source item identifier in
3122         addition to the target item identifier in the NavigationActionData that is sent by the WebProcess.
3123         This is a lot less error prone, the WebProcess knows more accurately which history items it is going
3124         from and to.
3125
3126         * loader/FrameLoader.cpp:
3127         (WebCore::FrameLoader::loadURLIntoChildFrame):
3128         (WebCore::FrameLoader::loadDifferentDocumentItem):
3129         (WebCore::FrameLoader::loadItem):
3130         (WebCore::FrameLoader::retryAfterFailedCacheOnlyMainResourceLoad):
3131         * loader/FrameLoader.h:
3132         * loader/HistoryController.cpp:
3133         (WebCore::HistoryController::recursiveGoToItem):
3134         * loader/NavigationAction.cpp:
3135         (WebCore::NavigationAction::setSourceBackForwardItem):
3136         * loader/NavigationAction.h:
3137         (WebCore::NavigationAction::sourceBackForwardItemIdentifier const):
3138
3139 2019-03-13  Jer Noble  <jer.noble@apple.com>
3140
3141         Add AggregateLogger, a Logger specialization for singleton classes.
3142         https://bugs.webkit.org/show_bug.cgi?id=195644
3143
3144         Reviewed by Eric Carlson.
3145
3146         Convert debug logging over to release logging through the use of AggregateLogger.
3147
3148         * platform/audio/PlatformMediaSession.h:
3149         (WebCore::PlatformMediaSession::client const):
3150         * platform/audio/PlatformMediaSessionManager.cpp:
3151         (WebCore::PlatformMediaSessionManager::PlatformMediaSessionManager):
3152         (WebCore::PlatformMediaSessionManager::beginInterruption):
3153         (WebCore::PlatformMediaSessionManager::endInterruption):
3154         (WebCore::PlatformMediaSessionManager::addSession):
3155         (WebCore::PlatformMediaSessionManager::removeSession):
3156         (WebCore::PlatformMediaSessionManager::sessionWillBeginPlayback):
3157         (WebCore::PlatformMediaSessionManager::sessionWillEndPlayback):
3158         (WebCore::PlatformMediaSessionManager::setCurrentSession):
3159         (WebCore::PlatformMediaSessionManager::applicationWillBecomeInactive const):
3160         (WebCore::PlatformMediaSessionManager::applicationDidBecomeActive const):
3161         (WebCore::PlatformMediaSessionManager::applicationDidEnterBackground const):
3162         (WebCore::PlatformMediaSessionManager::applicationWillEnterForeground const):
3163         (WebCore::PlatformMediaSessionManager::logChannel const):
3164         * platform/audio/PlatformMediaSessionManager.h:
3165         * platform/audio/cocoa/MediaSessionManagerCocoa.mm:
3166         (MediaSessionManagerCocoa::updateSessionState):
3167         (MediaSessionManagerCocoa::sessionWillBeginPlayback):
3168         (MediaSessionManagerCocoa::removeSession):
3169         (MediaSessionManagerCocoa::sessionWillEndPlayback):
3170         (MediaSessionManagerCocoa::clientCharacteristicsChanged):
3171         (MediaSessionManagerCocoa::updateNowPlayingInfo):
3172         * platform/audio/ios/MediaSessionManagerIOS.mm:
3173         (WebCore::MediaSessionManageriOS::resetRestrictions):
3174         (WebCore::MediaSessionManageriOS::configureWireLessTargetMonitoring):
3175
3176 2019-03-13  Chris Dumez  <cdumez@apple.com>
3177
3178         Drop legacy WebCore::toRegistrableDomain() utility function
3179         https://bugs.webkit.org/show_bug.cgi?id=195637
3180
3181         Reviewed by Geoffrey Garen.
3182
3183         Drop legacy toRegistrableDomain() / registrableDomainAreEqual() utility functions.
3184         Update call sites to use modern RegistrableDomain type instead.
3185
3186         * loader/CrossOriginAccessControl.cpp:
3187         (WebCore::shouldCrossOriginResourcePolicyCancelLoad):
3188         * loader/FrameLoader.cpp:
3189         (WebCore::FrameLoader::setFirstPartyForCookies):
3190         * page/DOMWindow.cpp:
3191         (WebCore::DOMWindow::failedToRegisterDeviceMotionEventListener):
3192         * platform/RegistrableDomain.h:
3193         (WebCore::registrableDomainsAreEqual):
3194         * platform/network/ResourceRequestBase.h:
3195         * platform/network/cf/ResourceRequestCFNet.cpp:
3196         * platform/network/cocoa/ResourceRequestCocoa.mm:
3197
3198 2019-03-13  Alex Christensen  <achristensen@webkit.org>
3199
3200         Prevent checked_cf_cast crashes in ResourceResponse::platformCertificateInfo
3201         https://bugs.webkit.org/show_bug.cgi?id=195686
3202
3203         Reviewed by Tim Horton.
3204
3205         This covers up a type confusion bug on some OSes until rdar://problem/48853137 is resolved.
3206
3207         * SourcesCocoa.txt:
3208         * WebCore.xcodeproj/project.pbxproj:
3209         * platform/network/cocoa/ResourceResponseCocoa.mm:
3210
3211 2019-03-13  Thibault Saunier  <tsaunier@igalia.com>
3212
3213         [GStreamer][WebRTC] Add support for omxh264enc encoder
3214         https://bugs.webkit.org/show_bug.cgi?id=195676
3215
3216         Reviewed by Philippe Normand.
3217
3218         * platform/mediastream/libwebrtc/GStreamerVideoEncoder.cpp:
3219         (setup_omxh264enc):
3220         (set_bitrate_bit_per_sec):
3221         (gst_webrtc_video_encoder_class_init):
3222
3223 2019-03-13  Antoine Quint  <graouts@apple.com>
3224
3225         REGRESSION(r240634): Element::hasPointerCapture() passes a JS-controlled value directly into a HashMap as a key
3226         https://bugs.webkit.org/show_bug.cgi?id=195683
3227         <rdar://problem/48659950>
3228
3229         Reviewed by Alex Christensen.
3230
3231         While PointerID is defined as int32_t, we now use int64_t as the key of the HashMap mapping PointerID to CapturingData so that we use
3232         a value outside of the int32_t range as a safe empty and removed values, allowing any int32_t to be provided through the API for
3233         lookup in this HashMap.
3234
3235         Test: pointerevents/pointer-id-crash.html
3236
3237         * page/PointerCaptureController.h:
3238
3239 2019-03-12  Brady Eidson  <beidson@apple.com>
3240
3241         Take UnboundedNetworking assertion when a file upload is in progress.
3242         https://bugs.webkit.org/show_bug.cgi?id=195497
3243
3244         Reviewed by Geoff Garen.
3245
3246         * platform/network/ResourceRequestBase.cpp:
3247         (WebCore::ResourceRequestBase::hasUpload const):
3248         * platform/network/ResourceRequestBase.h:
3249
3250 2019-03-13  Youenn Fablet  <youenn@apple.com>
3251
3252         Enable libwebrtc logging control through WebCore
3253         https://bugs.webkit.org/show_bug.cgi?id=195658
3254
3255         Reviewed by Eric Carlson.
3256
3257         Add support for WebCore logging of libwebrtc messages.
3258         This is controlled by WebRTC log channel state and level.
3259         In case of private browsing mode, any logging is disabled.
3260         This will stay for the lifetime of the process.
3261         No change of behavior.
3262
3263         * Modules/mediastream/RTCPeerConnection.cpp:
3264         (WebCore::RTCPeerConnection::create):
3265         * platform/mediastream/libwebrtc/LibWebRTCProvider.cpp:
3266         (WebCore::doReleaseLogging):
3267         (WebCore::setLogging):
3268         (WebCore::computeLogLevel):
3269         (WebCore::initializePeerConnectionFactoryAndThreads):
3270         (WebCore::LibWebRTCProvider::setEnableLogging):
3271         * platform/mediastream/libwebrtc/LibWebRTCProvider.h:
3272
3273 2019-03-13  Thibault Saunier  <tsaunier@igalia.com>
3274
3275         [GStreamer][WebRTC] Do not sync encoder on the clock
3276         https://bugs.webkit.org/show_bug.cgi?id=195673
3277
3278         we should encode as fast as possible and totally ignore timestamp while
3279         doing so.
3280
3281         Reviewed by Philippe Normand.
3282
3283         * platform/mediastream/libwebrtc/GStreamerVideoEncoderFactory.cpp:
3284         (WebCore::GStreamerVideoEncoder::InitEncode):
3285
3286 2019-03-13  Thibault Saunier  <tsaunier@igalia.com>
3287
3288         [GStreamer][WebRTC]: Use codec setting video height/width as fallback
3289         https://bugs.webkit.org/show_bug.cgi?id=195675
3290
3291         Reviewed by Philippe Normand.
3292
3293         In some cases the frame height and width is not set (not sure why/ in
3294         what conditions but it happens) so make sure to get the information from
3295         the VideoCodec when configuring the encoder.
3296
3297         * platform/mediastream/libwebrtc/GStreamerVideoDecoderFactory.cpp:
3298         (WebCore::GStreamerVideoDecoder::GStreamerVideoDecoder):
3299         (WebCore::GStreamerVideoDecoder::GetCapsForFrame):
3300
3301 2019-03-13  Miguel Gomez  <magomez@igalia.com>
3302
3303         [CoordinatedGraphics] Null dereference in CoordinatedGraphicsLayer::setCoordinatorIncludingSubLayersIfNeeded
3304         https://bugs.webkit.org/show_bug.cgi?id=195615
3305
3306         Reviewed by Carlos Garcia Campos.
3307
3308         Exit early if we don't receive a valid coordinator.
3309
3310         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
3311         (WebCore::CoordinatedGraphicsLayer::setCoordinatorIncludingSubLayersIfNeeded):
3312
3313 2019-03-13  Fujii Hironori  <Hironori.Fujii@sony.com>
3314
3315         [Win][PlayStation] Remove WebCore::standardUserAgentForURL
3316         https://bugs.webkit.org/show_bug.cgi?id=195662
3317
3318         Reviewed by Ryosuke Niwa.
3319
3320         WebCore::standardUserAgentForURL is just a stub in Windows port.
3321
3322         No new tests because there is no behavior change.
3323
3324         * platform/win/UserAgentWin.cpp:
3325         (WebCore::standardUserAgentForURL): Deleted.
3326         * platform/playstation/UserAgentPlayStation.cpp:
3327         (WebCore::standardUserAgentForURL): Deleted.
3328
3329 2019-03-12  Ross Kirsling  <ross.kirsling@sony.com>
3330
3331         [Win] Fix a slew of simple clang-cl warnings.
3332         https://bugs.webkit.org/show_bug.cgi?id=195652
3333
3334         Reviewed by Don Olmstead.
3335
3336         * page/AutoscrollController.cpp:
3337         (WebCore::AutoscrollController::handleMouseReleaseEvent): -Wswitch
3338         * platform/network/curl/CurlContext.cpp:
3339         (WebCore::CurlHandle::willSetupSslCtx):
3340         (WebCore::CurlHandle::appendRequestHeaders): -Wunused-variable
3341         * platform/network/curl/CurlFormDataStream.cpp:
3342         (WebCore::CurlFormDataStream::computeContentLength): -Wunused-variable
3343         * platform/network/curl/CurlRequest.cpp:
3344         (WebCore::CurlRequest::CurlRequest): -Wreorder
3345         (WebCore::CurlRequest::setupTransfer): -Wunused-variable
3346         * platform/network/curl/CurlSSLVerifier.cpp:
3347         (WebCore::CurlSSLVerifier::CurlSSLVerifier):
3348         * platform/network/curl/CurlSSLVerifier.h: -Wunused-private-field
3349         * platform/win/LoggingWin.cpp:
3350         (WebCore::logLevelString): -Wwritable-strings
3351         * rendering/RenderThemeWin.cpp: -Wunused-const-variable (x2)
3352         (WebCore::RenderThemeWin::getThemeData): -Wswitch
3353
3354 2019-03-12  Ryosuke Niwa  <rniwa@webkit.org>
3355
3356         Move the code for determining the need for touch bar quirks to Quirks class
3357         https://bugs.webkit.org/show_bug.cgi?id=195654
3358
3359         Reviewed by Brent Fulgham.
3360
3361         Moved the code to determine whether the touch bar quirks are needed or not from WebKit2.
3362
3363         * WebCore.xcodeproj/project.pbxproj:
3364         * page/Quirks.cpp:
3365         (WebCore::Quirks::isTouchBarUpdateSupressedForHiddenContentEditable const):
3366         (WebCore::Quirks::isNeverRichlyEditableForTouchBar const):
3367         * page/Quirks.h:
3368
3369 2019-03-12  Justin Fan  <justin_fan@apple.com>
3370
3371         [Web GPU] Update GPURenderPipelineDescriptor and add GPUColorStateDescriptor.format
3372         https://bugs.webkit.org/show_bug.cgi?id=195518
3373         <rdar://problem/46322356>
3374
3375         Reviewed by Myles C. Maxfield.
3376
3377         Upgrade the implementation of GPURenderPipelineDescriptor and GPURenderPipeline and match the updated Web GPU API.
3378         Add stubs for GPUColorStateDescriptor so attachment format can be provided by GPURenderPipelineDescriptor.
3379
3380         All affected Web GPU tests updated to cover existing behavior.
3381
3382         Update file names and symbols:
3383         * CMakeLists.txt:
3384         * DerivedSources-input.xcfilelist:
3385         * DerivedSources-output.xcfilelist:
3386         * DerivedSources.make:
3387         * Sources.txt:
3388         * WebCore.xcodeproj/project.pbxproj:
3389         * bindings/js/WebCoreBuiltinNames.h:
3390
3391         Updates to GPURenderPipeline, GPURenderPipelineDescriptor, and its components:
3392         * Modules/webgpu/GPUColorStateDescriptor.idl: Added. Provide the expected texture format of the render pipeline's color attachments.
3393         * Modules/webgpu/GPUInputStateDescriptor.idl: Renamed from Source/WebCore/Modules/webgpu/WebGPUInputStateDescriptor.idl.
3394         * Modules/webgpu/GPUTextureFormat.idl: Update the existing values to match the new style.
3395         * Modules/webgpu/GPUVertexAttributeDescriptor.idl: Renamed from Source/WebCore/Modules/webgpu/WebGPUVertexAttributeDescriptor.idl.
3396         * Modules/webgpu/GPUVertexInputDescriptor.idl: Renamed from Source/WebCore/Modules/webgpu/WebGPUVertexInputDescriptor.idl.
3397         * Modules/webgpu/WebGPUDevice.cpp:
3398         (WebCore::WebGPUDevice::createPipelineLayout const): Remove unnecessary comment.
3399         (WebCore::WebGPUDevice::createRenderPipeline const): Descriptor validation and conversion moved into WebGPURenderPipelineDescriptor.
3400         (WebCore::validateAndConvertPipelineStage): Deleted.
3401         * Modules/webgpu/WebGPUDevice.h: create* functions should not return nullable.
3402         * Modules/webgpu/WebGPUIndexFormat.h: Removed. Moved into GPUInputStateDescriptor.idl.
3403         * Modules/webgpu/WebGPUInputStateDescriptor.h: Removed.
3404         * Modules/webgpu/WebGPUInputStepMode.idl: Removed. Moved into GPUVertexInputDescriptor.idl.
3405         * Modules/webgpu/WebGPUPipelineLayout.h:
3406         (WebCore::WebGPUPipelineLayout::pipelineLayout): Getters should return raw references.
3407         * Modules/webgpu/WebGPUPipelineStageDescriptor.h: Now shares a common base with GPUPipelineStageDescriptor.
3408         * Modules/webgpu/WebGPURenderPipeline.cpp:
3409         (WebCore::WebGPURenderPipeline::create):
3410         (WebCore::WebGPURenderPipeline::WebGPURenderPipeline):
3411         * Modules/webgpu/WebGPURenderPipeline.h:  Now internally nullable.
3412         (WebCore::WebGPURenderPipeline::renderPipeline const):
3413         (WebCore::WebGPURenderPipeline::renderPipeline): Deleted.
3414         * Modules/webgpu/WebGPURenderPipelineDescriptor.cpp:
3415         (WebCore::WebGPUPipelineStageDescriptor::asGPUPipelineStageDescriptor const): Validate and convert a WebGPUPipelineStageDescriptor to GPU version.
3416         (WebCore::WebGPURenderPipelineDescriptor::asGPURenderPipelineDescriptor const): Ditto for WebGPURenderPipelineDescriptor.
3417         * Modules/webgpu/WebGPURenderPipelineDescriptor.h: Now shares a base class and some instance variables with GPURenderPipelineDescriptor.
3418         * Modules/webgpu/WebGPURenderPipelineDescriptor.idl: Update GPUPrimitiveTopology for new style and add colorStates.
3419         * Modules/webgpu/WebGPUShaderModule.idl: Small pilot to test using InterfaceName to easily rename DOM-facing interfaces.
3420         * Modules/webgpu/WebGPUVertexAttributeDescriptor.h: Removed.
3421         * Modules/webgpu/WebGPUVertexFormat.idl: Removed. Moved and updated in GPUVertexAttributeDescriptor.idl.
3422         * Modules/webgpu/WebGPUVertexInputDescriptor.h: Removed.
3423         * platform/graphics/gpu/GPUInputStateDescriptor.h:
3424         * platform/graphics/gpu/GPUPipelineStageDescriptor.h:
3425         (WebCore::GPUPipelineStageDescriptor::GPUPipelineStageDescriptor):
3426         * platform/graphics/gpu/GPURenderPipelineDescriptor.h: Add shared base class for Web/GPURenderPipelineDescriptor.
3427         (WebCore::GPURenderPipelineDescriptor::GPURenderPipelineDescriptor):
3428         * platform/graphics/gpu/GPUTextureFormat.h:
3429         * platform/graphics/gpu/GPUVertexAttributeDescriptor.h:
3430         * platform/graphics/gpu/GPUVertexInputDescriptor.h:
3431         * platform/graphics/gpu/cocoa/GPURenderPipelineMetal.mm:
3432         (WebCore::setFunctionsForPipelineDescriptor): Make fragment required since descriptor validation fails if fragment function is not found right now.
3433         (WebCore::mtlVertexFormatForGPUVertexFormat): Renamed from validateAndConvertVertexFormatToMTLVertexFormat.
3434         (WebCore::mtlStepFunctionForGPUInputStepMode): Renamed from validateAndConvertStepModeToMTLStepFunction
3435         (WebCore::trySetInputStateForPipelineDescriptor):
3436         (WebCore::trySetColorStatesForColorAttachmentArray):
3437         (WebCore::tryCreateMtlRenderPipelineState):
3438         (WebCore::GPURenderPipeline::create):
3439         (WebCore::validateAndConvertVertexFormatToMTLVertexFormat): Deleted.
3440         (WebCore::validateAndConvertStepModeToMTLStepFunction): Deleted.
3441         * platform/graphics/gpu/cocoa/GPUUtilsMetal.mm:
3442         (WebCore::platformTextureFormatForGPUTextureFormat):
3443         * platform/graphics/gpu/GPUColorStateDescriptor.h: Added.
3444
3445         Misc:
3446         * Modules/webgpu/WebGPUProgrammablePassEncoder.cpp:
3447         (WebCore::WebGPUProgrammablePassEncoder::setPipeline):
3448         * Modules/webgpu/WebGPUProgrammablePassEncoder.h:
3449         * platform/graphics/gpu/GPUProgrammablePassEncoder.h:
3450         * platform/graphics/gpu/GPURenderPassEncoder.h:
3451         * platform/graphics/gpu/GPURenderPipeline.h:
3452         (WebCore::GPURenderPipeline::primitiveTopology const):
3453         * platform/graphics/gpu/cocoa/GPURenderPassEncoderMetal.mm:
3454         (WebCore::GPURenderPassEncoder::setPipeline):
3455         (WebCore::primitiveTypeForGPUPrimitiveTopology):
3456        
3457 2019-03-12  Zalan Bujtas  <zalan@apple.com>
3458
3459         [ContentChangeObserver] Reset state when touchStart does not turn into click.
3460         https://bugs.webkit.org/show_bug.cgi?id=195603
3461         <rdar://problem/48796582>
3462
3463         Reviewed by Simon Fraser.
3464
3465         Add reset() function to assert and reset the current state.
3466
3467         * page/ios/ContentChangeObserver.cpp:
3468         (WebCore::ContentChangeObserver::willNotProceedWithClick):
3469         (WebCore::ContentChangeObserver::adjustObservedState):
3470         * page/ios/ContentChangeObserver.h:
3471
3472 2019-03-12  Timothy Hatcher  <timothy@apple.com>
3473
3474         Expose document attributes and body background color through HTMLConverter.
3475         https://bugs.webkit.org/show_bug.cgi?id=195636
3476         rdar://problem/45055697
3477
3478         Reviewed by Tim Horton.
3479
3480         * editing/cocoa/HTMLConverter.h:
3481         * editing/cocoa/HTMLConverter.mm:
3482         (HTMLConverter::convert):
3483         (WebCore::attributedStringFromRange):
3484         (WebCore::attributedStringFromSelection):
3485         (WebCore::attributedStringBetweenStartAndEnd):
3486
3487 2019-03-12  Antti Koivisto  <antti@apple.com>
3488
3489         Compositing layer that renders two positioned elements should not hit test
3490         https://bugs.webkit.org/show_bug.cgi?id=195371
3491         <rdar://problem/48649586>
3492
3493         Reviewed by Simon Fraser.
3494
3495         Followup to fix the test case (fast/scrolling/ios/overflow-scroll-overlap-2.html)
3496
3497         * platform/graphics/ca/GraphicsLayerCA.cpp:
3498         (WebCore::GraphicsLayerCA::setEventRegion):
3499
3500         Revert a last minute change (that was done to fix a Mac displaylist test).
3501
3502         * rendering/RenderLayerBacking.cpp:
3503         (WebCore::RenderLayerBacking::paintIntoLayer):
3504
3505         Compute the region on iOS only for now (it is not used on other platforms).
3506
3507 2019-03-12  Dean Jackson  <dino@apple.com>
3508
3509         [WebGL] WebGLBuffer can be too large
3510         https://bugs.webkit.org/show_bug.cgi?id=195068
3511         <rdar://problem/48414289>
3512
3513         Reviewed by Antoine Quint.
3514
3515         When creating an element array buffer, make sure to
3516         test against the maximum size of an ArrayBuffer, rather
3517         than just assume it can be created.
3518
3519         Test: fast/canvas/webgl/largeBuffer.html
3520
3521         * html/canvas/WebGLBuffer.cpp:
3522         (WebCore::WebGLBuffer::associateBufferDataImpl):
3523
3524 2019-03-12  Sihui Liu  <sihui_liu@apple.com>
3525
3526         Layout Test imported/w3c/web-platform-tests/IndexedDB/fire-*-event-exception.html are failing
3527         https://bugs.webkit.org/show_bug.cgi?id=195581
3528
3529         Reviewed by Brady Eidson.
3530
3531         Uncaught exceptions should be handled after IDBRequest dispatches events so that IDBTransaction would stay 
3532         active during event dispatch.
3533
3534         * Modules/indexeddb/IDBRequest.cpp:
3535         (WebCore::IDBRequest::dispatchEvent):
3536         (WebCore::IDBRequest::uncaughtExceptionInEventHandler):
3537         * Modules/indexeddb/IDBRequest.h:
3538
3539 2019-03-12  Sihui Liu  <sihui_liu@apple.com>
3540
3541         Layout Test imported/w3c/web-platform-tests/IndexedDB/transaction-abort-request-error.html is failing
3542         https://bugs.webkit.org/show_bug.cgi?id=195570
3543
3544         Reviewed by Brady Eidson.
3545
3546         IDBRequest result should be undefined if it is never set.
3547
3548         * Modules/indexeddb/IDBRequest.cpp:
3549         (WebCore::IDBRequest::IDBRequest):
3550
3551 2019-03-12  Youenn Fablet  <youenn@apple.com>
3552
3553         Rename originsMatch in originSerializationsMatch
3554         https://bugs.webkit.org/show_bug.cgi?id=195572
3555
3556         Reviewed by Jiewen Tan.
3557
3558         In addition to renaming, make use of SecurityOrigin::isSameOriginAs
3559         where it makes more sense than to compare origin serialization.
3560         The main difference is that isSameOriginAs will return false for two different unique origins
3561         while originsSerializationsMatch will not.
3562
3563         * Modules/credentialmanagement/CredentialsContainer.cpp:
3564         (WebCore::CredentialsContainer::doesHaveSameOriginAsItsAncestors):
3565         * Modules/mediastream/RTCController.cpp:
3566         (WebCore::matchDocumentOrigin):
3567         * Modules/mediastream/RTCPeerConnection.cpp:
3568         (WebCore::RTCPeerConnection::certificatesFromConfiguration):
3569         * loader/DocumentLoader.cpp:
3570         (WebCore::DocumentLoader::shouldOpenExternalURLsPolicyToPropagate const):
3571         * loader/cache/CachedResourceLoader.cpp:
3572         (WebCore::CachedResourceLoader::shouldUpdateCachedResourceWithCurrentRequest):
3573         * page/SecurityOrigin.cpp:
3574         (WebCore::serializedOriginsMatch):
3575         (WebCore::originsMatch): Deleted.
3576         * page/SecurityOrigin.h:
3577
3578 2019-03-12  Zalan Bujtas  <zalan@apple.com>
3579
3580         [Synthetic Click] Dispatch mouseout soon after mouseup
3581         https://bugs.webkit.org/show_bug.cgi?id=195575
3582         <rdar://problem/47093049>
3583
3584         Reviewed by Simon Fraser.
3585
3586         Let's fire a mouseout event when a click is submitted as the result of a tap. It helps to dismiss content which would otherwise require you to move the mouse (cases like control bar on youtube.com).
3587
3588         Test: fast/events/touch/ios/content-observation/mouse-out-event-should-fire-on-click.html
3589
3590         * page/EventHandler.h:
3591         * page/ios/EventHandlerIOS.mm:
3592         (WebCore::EventHandler::dispatchFakeMouseOut):
3593
3594 2019-03-12  Ryosuke Niwa  <rniwa@webkit.org>
3595
3596         In CachedFrame's constructor, release-assert that DOMWindow still has a frame after page-caching subframes
3597         https://bugs.webkit.org/show_bug.cgi?id=195609
3598
3599         Reviewed by Chris Dumez.
3600
3601         r242677 added release assertions to DOMWindow::suspendForPageCache. But when the first release assert in
3602         that function is hit, we still can't tell whether active DOM objects are detaching frames, or if creating
3603         CachedFrame's on one of subframes is causing the frame to go way.
3604
3605         Add a release assertion immediately after creating CachedFrame on subframes to detect this case.
3606
3607         * history/CachedFrame.cpp:
3608         (WebCore::CachedFrame::CachedFrame):
3609
3610 2019-03-12  Zalan Bujtas  <zalan@apple.com>
3611
3612         [ContentChangeObserver] Stop content change observation when the touch event turns into long press
3613         https://bugs.webkit.org/show_bug.cgi?id=195601
3614         <rdar://problem/48796324>
3615
3616         Reviewed by Wenson Hsieh.
3617
3618         Cancel the ongoing content observation (started at touchStart) when the touch event does not turn into a tap gesture.
3619
3620         Not testable because any subsequent tap would reset the state anyway (though it might be measurable through some code triggering heavy content change).
3621
3622         * page/ios/ContentChangeObserver.cpp:
3623         (WebCore::ContentChangeObserver::didRecognizeLongPress):
3624         (WebCore::ContentChangeObserver::willNotProceedWithClick):
3625         * page/ios/ContentChangeObserver.h:
3626
3627 2019-03-12  Antti Koivisto  <antti@apple.com>
3628
3629         Compositing layer that renders two positioned elements should not hit test
3630         https://bugs.webkit.org/show_bug.cgi?id=195371
3631         <rdar://problem/48649586>
3632
3633         Reviewed by Simon Fraser.
3634
3635         Compute and pass an event region for layers if it differs from layer bounds.
3636
3637         This patch fixes various block overflow and layer expansion cases. It does not handle
3638         overflowing line boxes yet (it adds tests for those too).
3639
3640         Test: fast/scrolling/ios/overflow-scroll-overlap-2.html
3641
3642         * platform/graphics/GraphicsLayer.cpp:
3643         (WebCore::GraphicsLayer::setEventRegion):
3644         * platform/graphics/GraphicsLayer.h:
3645         (WebCore::GraphicsLayer::eventRegion):
3646         * platform/graphics/Region.h:
3647         * platform/graphics/ca/GraphicsLayerCA.cpp:
3648         (WebCore::GraphicsLayerCA::setEventRegion):
3649         (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
3650         (WebCore::GraphicsLayerCA::updateEventRegion):
3651
3652         Pass the region via the main platform layer of the graphics layer.
3653
3654         * platform/graphics/ca/GraphicsLayerCA.h:
3655         * platform/graphics/ca/PlatformCALayer.h:
3656         * platform/graphics/ca/cocoa/PlatformCALayerCocoa.h:
3657         * rendering/PaintInfo.h:
3658         * rendering/PaintPhase.h:
3659
3660         Add EventRegion paint phase that computes the region instead of painting anything.
3661
3662         * rendering/RenderBlock.cpp:
3663         (WebCore::RenderBlock::paintObject):
3664         * rendering/RenderLayer.cpp:
3665         (WebCore::RenderLayer::paintForegroundForFragments):
3666         (WebCore::RenderLayer::paintForegroundForFragmentsWithPhase):
3667
3668         Invoke EventRegion paint phase.
3669
3670         * rendering/RenderLayer.h:
3671         * rendering/RenderLayerBacking.cpp:
3672         (WebCore::RenderLayerBacking::paintIntoLayer):
3673
3674         Request event region when pointing a layer.
3675
3676 2019-03-12  Philippe Normand  <pnormand@igalia.com>
3677
3678         [GStreamer][v4l2] Synchronous video texture flushing support
3679         https://bugs.webkit.org/show_bug.cgi?id=195453
3680
3681         Reviewed by Xabier Rodriguez-Calvar.
3682
3683         The v4l2 video decoder currently requires that downstream users of
3684         the graphics resources complete any pending draw call and release
3685         resources before returning from the DRAIN query.
3686
3687         To accomplish this the player monitors the pipeline and whenever a
3688         v4l2 decoder is added, synchronous video texture flushing support
3689         is enabled. Additionally and for all decoder configurations, a
3690         flush is performed before disposing of the player.
3691
3692         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
3693         (WebCore::MediaPlayerPrivateGStreamer::playbinDeepElementAddedCallback):
3694         Monitor elements added to the decodebin bin.
3695         (WebCore::MediaPlayerPrivateGStreamer::decodebinElementAdded): Set
3696         a flag if a v4l2 decoder was added in decodebin.
3697         (WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin): Connect
3698         to the deep-element-added signal so as to monitor pipeline
3699         topology updates.
3700         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
3701         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
3702         (WebCore::MediaPlayerPrivateGStreamerBase::~MediaPlayerPrivateGStreamerBase):
3703         Flush video texture before disposing of the player.
3704         (WebCore::MediaPlayerPrivateGStreamerBase::flushCurrentBuffer):
3705         Synchronously flush if the pipeline contains a v4l2 decoder.
3706         (WebCore::MediaPlayerPrivateGStreamerBase::createGLAppSink): Monitor push events only.
3707         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
3708         * platform/graphics/texmap/TextureMapperPlatformLayerProxy.cpp:
3709         (WebCore::TextureMapperPlatformLayerProxy::pushNextBuffer): New
3710         boolean flag used mostly to trigger synchronous flush conditions.
3711         (WebCore::TextureMapperPlatformLayerProxy::dropCurrentBufferWhilePreservingTexture):
3712         Optionally drop the current buffer in a synchronous manner. By
3713         default the method keeps operating asynchronously.
3714         * platform/graphics/texmap/TextureMapperPlatformLayerProxy.h:
3715
3716 2019-03-12  Ryosuke Niwa  <rniwa@webkit.org>
3717
3718         Move the remaining code to decide whether site specific quirks are needed to Quirks class
3719         https://bugs.webkit.org/show_bug.cgi?id=195610
3720
3721         Reviewed by Antti Koivisto.
3722
3723         Moved the remaining code scattered across WebCore to decide whether a site specific quirk
3724         is needed or not to Quirks class introduced in r236818.
3725
3726         * Modules/fetch/FetchRequest.cpp:
3727         (WebCore::needsSignalQuirk): Deleted.
3728         (WebCore::processInvalidSignal):
3729         * html/HTMLFormControlElement.cpp:
3730         (WebCore::HTMLFormControlElement::needsMouseFocusableQuirk const):
3731         * html/HTMLMediaElement.cpp:
3732         (WebCore::needsAutoplayPlayPauseEventsQuirk): Deleted.
3733         (WebCore::HTMLMediaElement::dispatchPlayPauseEventsIfNeedsQuirks):
3734         (WebCore::needsSeekingSupportQuirk): Deleted.
3735         (WebCore::HTMLMediaElement::supportsSeeking const):
3736         * html/MediaElementSession.cpp:
3737         (WebCore::needsArbitraryUserGestureAutoplayQuirk): Deleted.
3738         (WebCore::needsPerDocumentAutoplayBehaviorQuirk): Deleted.
3739         (WebCore::MediaElementSession::playbackPermitted const):
3740         * page/Quirks.cpp:
3741         (WebCore::allowedAutoplayQuirks): Added.
3742         (WebCore::Quirks::needsQuirks const): Added.
3743         (WebCore::Quirks::shouldIgnoreInvalidSignal const): Added.
3744         (WebCore::Quirks::needsFormControlToBeMouseFocusable const): Added.
3745         (WebCore::Quirks::needsAutoplayPlayPauseEvents const): Added.
3746         (WebCore::Quirks::needsSeekingSupportDisabled const): Addd.
3747         (WebCore::Quirks::needsPerDocumentAutoplayBehavior const): Added.
3748         (WebCore::Quirks::shouldAutoplayForArbitraryUserGesture const): Added.
3749         (WebCore::Quirks::hasBrokenEncryptedMediaAPISupportQuirk const): Added.
3750         (WebCore::Quirks::hasWebSQLSupportQuirk const): Fixed the coding style.
3751         * page/Quirks.h:
3752
3753 2019-03-12  Enrique Ocaña González  <eocanha@igalia.com>
3754
3755         [Media][MSE] Don't emit timeUpdate after play() if currentTime hasn't changed
3756         https://bugs.webkit.org/show_bug.cgi?id=195454
3757
3758         Reviewed by Jer Noble.
3759
3760         This change fixes YouTube 2019 MSE Conformance Tests "26. SFRPausedAccuracy"
3761         and "27. HFRPausedAccuracy".
3762
3763         The first timeUpdate event after play() is omitted, because currentTime
3764         doesn't actually change in that scenario.
3765
3766         Tests 26 and 27 measure the time drift (real time vs. media time) on playback
3767         and start counting since the first timeUpdate event. In WebKit, that event
3768         happens at play(), before the pipeline has completed the transition to playing.
3769         Therefore, the real time inherits this startup delay and the test thinks that
3770         the player has drifted.
3771
3772         * html/HTMLMediaElement.cpp:
3773         (WebCore::HTMLMediaElement::playInternal): Don't emit a timeUpdated event unless currentTime has changed.
3774
3775 2019-03-12  Enrique Ocaña González  <eocanha@igalia.com>
3776
3777         [EME][GStreamer] Speculative build fix
3778         https://bugs.webkit.org/show_bug.cgi?id=195614
3779
3780         Unreviewed speculative WPE build fix after r242776.
3781
3782         * platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.h: Added missing include.
3783
3784 2019-03-12  Philippe Normand  <pnormand@igalia.com>
3785
3786         [GStreamer] remove legacy GStreamer version checks
3787         https://bugs.webkit.org/show_bug.cgi?id=195552
3788
3789         Reviewed by Xabier Rodriguez-Calvar.
3790
3791         We require GStreamer 1.8.x so version checks below that make
3792         little sense. Also checks for odd minor version numbers make sense
3793         only for the latest GStreamer git development version.
3794
3795         * platform/graphics/gstreamer/GStreamerCommon.cpp:
3796         (WebCore::initializeGStreamerAndRegisterWebKitElements):
3797         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
3798         (WebCore::MediaPlayerPrivateGStreamer::createAudioSink):
3799         (WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin):
3800         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
3801         (WebCore::MediaPlayerPrivateGStreamerBase::ensureGstGLContext):
3802
3803 2019-03-12  Xabier Rodriguez Calvar  <calvaris@igalia.com>
3804
3805         [EME] generateRequest was not using the sanitized init data
3806         https://bugs.webkit.org/show_bug.cgi?id=195555
3807
3808         Reviewed by Jer Noble.
3809
3810         * Modules/encryptedmedia/MediaKeySession.cpp:
3811         (WebCore::MediaKeySession::generateRequest): Use sanitized init
3812         data instead of the original one.
3813
3814 2019-03-12  Rob Buis  <rbuis@igalia.com>
3815
3816         Implement further CORS restrictions
3817         https://bugs.webkit.org/show_bug.cgi?id=188644
3818
3819         Reviewed by Darin Adler.
3820
3821         Verify that header value length is not greater than 128 [1]. Also implement
3822         Step 5 of [2] to append values to existing header value when calling
3823         Headers.append.
3824
3825         Tests: fetch/api/cors/cors-preflight-not-cors-safelisted.any.html
3826                fetch/api/cors/cors-preflight-not-cors-safelisted.any.worker.html
3827                fetch/api/headers/headers-no-cors.window.html
3828
3829         [1] https://fetch.spec.whatwg.org/#cors-safelisted-request-header
3830         [2] https://fetch.spec.whatwg.org/#concept-headers-append
3831
3832         * Modules/fetch/FetchHeaders.cpp:
3833         (WebCore::canWriteHeader):
3834         (WebCore::appendToHeaderMap):
3835         (WebCore::FetchHeaders::remove):
3836         (WebCore::FetchHeaders::set):
3837         (WebCore::FetchHeaders::filterAndFill):
3838         * platform/network/HTTPParsers.cpp:
3839         (WebCore::isCrossOriginSafeRequestHeader): verify that header length is not greater than 128
3840
3841 2019-03-11  Ryosuke Niwa  <rniwa@webkit.org>
3842
3843         Remove OS X Server QuickTime plugin quirks
3844         https://bugs.webkit.org/show_bug.cgi?id=195607
3845
3846         Reviewed by Brent Fulgham.
3847
3848         r87244 added a site specific quirk for Mac OS X Sever wiki pages.
3849         However, the issue has since been resolved as of OS X Mountain Lion,
3850         of which Apple has ended the support in September 2015.
3851
3852         Because the latest versions of Safari no longer supports non-Flash plugins,
3853         the only scenario in which this quirk comes into play is when a third party app
3854         which embeds WKWebView or WebKitLegacy loaded web pages on a OS X Server
3855         running OS X Mountain Lion or earlier.
3856
3857         Given these observations, it's probably safe to remove this quirk from WebKit.
3858
3859         * html/HTMLObjectElement.cpp:
3860         (WebCore::HTMLObjectElement::hasFallbackContent const):
3861         (WebCore::HTMLObjectElement::hasValidClassId):
3862         (WebCore::HTMLObjectElement::shouldAllowQuickTimeClassIdQuirk): Deleted.
3863         * html/HTMLObjectElement.h:
3864
3865 2019-03-11  Ross Kirsling  <ross.kirsling@sony.com>
3866
3867         Unreviewed speculative WPE build fix after r195586.
3868
3869         * platform/encryptedmedia/CDMInstance.h:
3870
3871 2019-03-12  Ryosuke Niwa  <rniwa@webkit.org>
3872
3873         Remove MediaWiki site specific quirks
3874         https://bugs.webkit.org/show_bug.cgi?id=195597
3875
3876         Reviewed by Simon Fraser.
3877
3878         r47383 added a site specific quirk for the KHTML workaround in MediaWiki.
3879
3880         Blink since removed this workaround:
3881         https://github.com/chromium/chromium/commit/ecf84fc9c1a51c8ede7adfd0b0cba446d9a8caa0
3882
3883         Given Chrome has been shipping without this quirk for six years, it's safe to assume
3884         this site specific quirk is no longer neeed for Web compatibility.
3885
3886         * css/StyleSheetContents.cpp:
3887         (WebCore::StyleSheetContents::parseAuthorStyleSheet):
3888         * css/parser/CSSParserContext.cpp:
3889         (WebCore::CSSParserContext::CSSParserContext):
3890         (WebCore::operator==):
3891         * css/parser/CSSParserContext.h:
3892         (WebCore::CSSParserContextHash::hash):
3893
3894 2019-03-11  Ryosuke Niwa  <rniwa@webkit.org>
3895
3896         Remove OpenCube QuickMenu quirks from navigator.appVersion
3897         https://bugs.webkit.org/show_bug.cgi?id=195600
3898
3899         Reviewed by Simon Fraser.
3900
3901         Remove the site specific quirk added in r35050 for OpenCube QuickMenu library for nwa.com
3902
3903         Blink removed this code back in 2013. The fact Chrome has been shipping successfully without
3904         this quirk for six years is a good evidence that it's no longer needed for the Web compatibility.
3905
3906         * page/Navigator.cpp:
3907         (WebCore::Navigator::appVersion const):
3908         (WebCore::shouldHideFourDot): Deleted.
3909
3910 2019-03-11  Ryan Haddad  <ryanhaddad@apple.com>
3911
3912         Unreviewed, rolling out r242763.
3913
3914         Causes layout test crashes on iOS simulator
3915
3916         Reverted changeset:
3917
3918         "[Synthetic Click] Dispatch mouseout soon after mouseup"
3919         https://bugs.webkit.org/show_bug.cgi?id=195575
3920         https://trac.webkit.org/changeset/242763
3921
3922 2019-03-11  Ross Kirsling  <ross.kirsling@sony.com>
3923
3924         Add Optional to Forward.h.
3925         https://bugs.webkit.org/show_bug.cgi?id=195586
3926
3927         Reviewed by Darin Adler.
3928
3929         * Modules/encryptedmedia/MediaKeyStatusMap.cpp:
3930         * Modules/encryptedmedia/MediaKeyStatusMap.h:
3931         * Modules/webauthn/apdu/ApduCommand.cpp:
3932         * Modules/webauthn/apdu/ApduCommand.h:
3933         * Modules/webauthn/apdu/ApduResponse.cpp:
3934         * Modules/webauthn/apdu/ApduResponse.h:
3935         * Modules/webauthn/fido/FidoHidMessage.cpp:
3936         * Modules/webauthn/fido/FidoHidMessage.h:
3937         * Modules/webauthn/fido/U2fCommandConstructor.cpp:
3938         * Modules/webauthn/fido/U2fCommandConstructor.h:
3939         * Modules/webdatabase/SQLTransaction.cpp:
3940         * Modules/webdatabase/SQLTransaction.h:
3941         * Modules/webgpu/WHLSL/Metal/WHLSLEntryPointScaffolding.cpp:
3942         * Modules/webgpu/WHLSL/Metal/WHLSLEntryPointScaffolding.h:
3943         * Modules/webgpu/WHLSL/WHLSLGatherEntryPointItems.h:
3944         * Modules/webgpu/WHLSL/WHLSLPrepare.cpp:
3945         * Modules/webgpu/WHLSL/WHLSLPrepare.h:
3946         * Modules/webgpu/WebGPU.cpp:
3947         * Modules/webgpu/WebGPU.h:
3948         * Modules/webgpu/WebGPUCommandBuffer.cpp:
3949         * Modules/webgpu/WebGPUCommandBuffer.h:
3950         * animation/WebAnimation.cpp:
3951         * animation/WebAnimation.h:
3952         * crypto/gcrypt/GCryptUtilities.cpp:
3953         * crypto/gcrypt/GCryptUtilities.h:
3954         * css/CSSStyleDeclaration.cpp:
3955         * css/CSSStyleDeclaration.h:
3956         * dom/TextDecoder.cpp:
3957         * dom/TextDecoder.h:
3958         * dom/UserGestureIndicator.cpp:
3959         * dom/UserGestureIndicator.h:
3960         * editing/ChangeListTypeCommand.cpp:
3961         * editing/ChangeListTypeCommand.h:
3962         * editing/EditingStyle.cpp:
3963         * editing/EditingStyle.h:
3964         * html/DOMFormData.cpp:
3965         * html/DOMFormData.h:
3966         * html/HTMLAllCollection.cpp:
3967         * html/HTMLAllCollection.h:
3968         * html/HTMLAnchorElement.cpp:
3969         * html/HTMLAnchorElement.h:
3970         * html/ImageBitmap.cpp:
3971         * html/ImageBitmap.h:
3972         * html/canvas/Path2D.h:
3973         * html/canvas/WebMetalEnums.cpp:
3974         * html/canvas/WebMetalEnums.h:
3975         * html/parser/HTMLParserIdioms.cpp:
3976         * html/parser/HTMLParserIdioms.h:
3977         * loader/ResourceCryptographicDigest.cpp:
3978         * loader/ResourceCryptographicDigest.h:
3979         * mathml/MathMLOperatorDictionary.cpp: