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