URL set by document.open() is not communicated to the UIProcess
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2019-04-15  Chris Dumez  <cdumez@apple.com>
2
3         URL set by document.open() is not communicated to the UIProcess
4         https://bugs.webkit.org/show_bug.cgi?id=196941
5         <rdar://problem/49237544>
6
7         Reviewed by Geoffrey Garen.
8
9         Notify the FrameLoaderClient whenever an explicit open was done and provide it with
10         the latest document URL.
11
12         * loader/FrameLoader.cpp:
13         (WebCore::FrameLoader::didExplicitOpen):
14         * loader/FrameLoaderClient.h:
15
16 2019-04-15  Eike Rathke  <erack@redhat.com>
17
18         Fix logic flow for error log
19         https://bugs.webkit.org/show_bug.cgi?id=196933
20
21         Reviewed by Alexey Proskuryakov.
22
23         Missing block braces logged an error always, not just
24         if (actionIfInvalid == Complain).
25
26         * html/HTMLMediaElement.cpp:
27         (WebCore::HTMLMediaElement::isSafeToLoadURL):
28
29 2019-04-15  Myles C. Maxfield  <mmaxfield@apple.com>
30
31         [Cocoa] FontPlatformData objects aren't cached at all when using font-family:system-ui
32         https://bugs.webkit.org/show_bug.cgi?id=196846
33         <rdar://problem/49499971>
34
35         Reviewed by Simon Fraser and Darin Adler.
36
37         When adding the special codepath for system-ui to behave as an entire list of fonts rather than a single item,
38         I never added a cache for the FontPlatformData objects that codepath creates. The non-system-ui codepath already
39         has a cache in fontPlatformDataCache() in FontCache.cpp.
40
41         This patch causes a 16.8x performance improvement on the attached benchmark.
42
43         Test: PerformanceTests/Layout/system-ui-rebuild-emoji.html
44
45         * page/cocoa/MemoryReleaseCocoa.mm:
46         (WebCore::platformReleaseMemory):
47         * platform/graphics/cocoa/FontCacheCoreText.cpp:
48         (WebCore::invalidateFontCache):
49         * platform/graphics/cocoa/FontFamilySpecificationCoreText.cpp:
50         (WebCore::FontFamilySpecificationKey::FontFamilySpecificationKey):
51         (WebCore::FontFamilySpecificationKey::operator== const):
52         (WebCore::FontFamilySpecificationKey::operator!= const):
53         (WebCore::FontFamilySpecificationKey::isHashTableDeletedValue const):
54         (WebCore::FontFamilySpecificationKey::computeHash const):
55         (WebCore::FontFamilySpecificationKeyHash::hash):
56         (WebCore::FontFamilySpecificationKeyHash::equal):
57         (WebCore::fontMap):
58         (WebCore::clearFontFamilySpecificationCoreTextCache):
59         (WebCore::FontFamilySpecificationCoreText::fontRanges const):
60         * platform/graphics/cocoa/FontFamilySpecificationCoreText.h:
61         * platform/graphics/mac/ComplexTextControllerCoreText.mm:
62         (WebCore::ComplexTextController::collectComplexTextRunsForCharacters):
63         (WebCore::safeCFEqual): Deleted.
64
65 2019-04-15  Devin Rousso  <drousso@apple.com>
66
67         Web Inspector: fake value descriptors for promises add a catch handler, preventing "rejectionhandled" events from being fired
68         https://bugs.webkit.org/show_bug.cgi?id=196484
69         <rdar://problem/49114725>
70
71         Reviewed by Joseph Pecoraro.
72
73         Test: inspector/runtime/promise-native-getter.html
74
75         Mark errors created from getters as being `isNativeGetterTypeError`.
76
77         * bindings/js/JSDOMExceptionHandling.cpp:
78         (WebCore::throwGetterTypeError):
79         (WebCore::rejectPromiseWithGetterTypeError):
80         (WebCore::rejectPromiseWithThisTypeError):
81
82         * bindings/js/JSDOMGlobalObject.cpp:
83         (WebCore::makeGetterTypeErrorForBuiltins):
84
85         * bindings/js/JSDOMPromiseDeferred.h:
86         * bindings/js/JSDOMPromiseDeferred.cpp:
87         (WebCore::createRejectedPromiseWithTypeError):
88
89         * Modules/streams/WritableStream.js:
90         (getter.closed):
91         (getter.ready):
92
93 2019-04-15  Jer Noble  <jer.noble@apple.com>
94
95         Add a DiagnosticLogging method taking an arbitrary dictionary of values.
96         https://bugs.webkit.org/show_bug.cgi?id=196773
97
98         Reviewed by Alex Christensen.
99
100         * page/DiagnosticLoggingClient.h:
101
102 2019-04-15  Justin Fan  <justin_fan@apple.com>
103
104         Let WTF::convertSafely deduce types from arguments.
105
106         Reviewer's (Darin Adler) follow-up to https://bugs.webkit.org/show_bug.cgi?id=196793.
107
108         * platform/graphics/gpu/cocoa/GPUBufferMetal.mm:
109         (WebCore::GPUBuffer::tryCreate):
110         * platform/graphics/gpu/cocoa/GPUCommandBufferMetal.mm:
111         (WebCore::GPUCommandBuffer::copyBufferToTexture):
112         (WebCore::GPUCommandBuffer::copyTextureToBuffer):
113         * platform/graphics/gpu/cocoa/GPURenderPipelineMetal.mm:
114         (WebCore::trySetInputStateForPipelineDescriptor):
115
116 2019-04-12  Ryosuke Niwa  <rniwa@webkit.org>
117
118         Throw TypeError when custom element constructor returns a wrong element or tries to create itself
119         https://bugs.webkit.org/show_bug.cgi?id=196892
120
121         Reviewed by Dean Jackson.
122
123         Throw TypeError instead of InvalidStateError for consistency. This updates WebKit's custom elements
124         implementation for https://github.com/whatwg/html/pull/4525.
125
126         Tests: imported/w3c/web-platform-tests/custom-elements/upgrading/Node-cloneNode.html
127                imported/w3c/web-platform-tests/custom-elements/upgrading/upgrading-parser-created-element.html
128
129         * bindings/js/JSCustomElementInterface.cpp:
130         (WebCore::JSCustomElementInterface::upgradeElement):
131         * bindings/js/JSHTMLElementCustom.cpp:
132         (WebCore::constructJSHTMLElement):
133
134 2019-04-15  Don Olmstead  <don.olmstead@sony.com>
135
136         [CMake] WebCore derived sources should only be referenced inside WebCore
137         https://bugs.webkit.org/show_bug.cgi?id=196904
138
139         Reviewed by Konstantin Tokarev.
140
141         Use WebCore_DERIVED_SOURCES_DIR instead of DERIVED_SOURCES_WEBCORE_DIR.
142
143         * CMakeLists.txt:
144         * PlatformGTK.cmake:
145         * PlatformWin.cmake:
146         * WebCoreMacros.cmake:
147
148 2019-04-15  John Wilander  <wilander@apple.com>
149
150         Send delayed Ad Click Attribution conversion requests to the click source
151         https://bugs.webkit.org/show_bug.cgi?id=196838
152         <rdar://problem/47650157>
153
154         Reviewed by Chris Dumez and Youenn Fablet.
155
156         WebCore::AdClickAttribution now:
157         - Sets m_earliestTimeToSend correctly based on WallTime::now().
158         - Allows for a test override of the base URL for conversions.
159         - Holds state for whether or not a conversion request has been sent.
160         - Outputs m_earliestTimeToSend and m_conversion->hasBeenSent in toString().
161         - Returns m_earliestTimeToSend as a result of a call to
162         convertAndGetEarliestTimeToSend() which used to be called setConversion().
163
164         Test: http/tests/adClickAttribution/send-attribution-conversion-request.html
165
166         * loader/AdClickAttribution.cpp:
167         (WebCore::AdClickAttribution::convertAndGetEarliestTimeToSend):
168         (WebCore::AdClickAttribution::url const):
169         (WebCore::AdClickAttribution::urlForTesting const):
170         (WebCore::AdClickAttribution::markConversionAsSent):
171         (WebCore::AdClickAttribution::wasConversionSent const):
172         (WebCore::AdClickAttribution::toString const):
173         (WebCore::AdClickAttribution::setConversion): Deleted.
174             Renamed convertAndGetEarliestTimeToSend().
175         * loader/AdClickAttribution.h:
176         (WebCore::AdClickAttribution::Conversion::Conversion):
177         (WebCore::AdClickAttribution::Conversion::encode const):
178         (WebCore::AdClickAttribution::Conversion::decode):
179         * platform/Timer.h:
180             Now exports nextFireInterval.
181
182 2019-04-15  Chris Dumez  <cdumez@apple.com>
183
184         Regression(r237903) Speedometer 2 is 1-2% regressed on iOS
185         https://bugs.webkit.org/show_bug.cgi?id=196841
186         <rdar://problem/45957016>
187
188         Reviewed by Myles C. Maxfield.
189
190         Speedometer 2 content does not use the text-underline-offset and text-decoration-thickness
191         features that were added in r237903 so I looked for behavior changes in the context of
192         Speedometer from r237903. I found that RenderStyle::changeAffectsVisualOverflow() started
193         returning true a lot more often after r237903. The reason is that r237903 dropped the
194         visualOverflowForDecorations() checks in this method and started returning true a lot
195         more as a result.
196
197         To restore previous behavior, this patch adds back the visualOverflowForDecorations() checks
198         that were dropped in r237903. I have verified that with this patch,
199         RenderStyle::changeAffectsVisualOverflow() returns true as many times as it used to before
200         r237903.
201
202         * rendering/style/RenderStyle.cpp:
203         (WebCore::RenderStyle::changeAffectsVisualOverflow const):
204
205 2019-04-15  Said Abou-Hallawa  <said@apple.com>
206
207         ASSERT fires when removing a disallowed clone from the shadow tree without reseting its corresponding element
208         https://bugs.webkit.org/show_bug.cgi?id=196895
209
210         Reviewed by Darin Adler.
211
212         When cloning elements to the shadow tree of an SVGUseElement, the
213         corresponding element links are set from the clones to the originals.
214         Later some of the elements may be disallowed to exist in the shadow tree.
215         For example the SVGPatternElement is disallowed and has to be removed 
216         even after cloning. The problem is the corresponding elements are not
217         reset to null. Usually this is not a problem because the removed elements
218         will be deleted and the destructor of SVGElement will reset the corresponding
219         element links. However in some cases, the cloned element is referenced
220         from another SVGElement, for example the target of a SVGTRefElement. In
221         this case the clone won't be deleted but it will be linked to the original
222         and the event listeners won't be copied from the original. When the
223         original is deleted, its event listeners have to be removed. The event
224         listeners of the clones also ave to be removed. But because the event
225         listeners of the original were not copied when cloning, the assertion in
226         SVGElement::removeEventListener() fires.
227
228         Test: svg/custom/use-disallowed-element-clear-corresponding-element.html
229
230         * svg/SVGUseElement.cpp:
231         (WebCore::disassociateAndRemoveClones):
232
233 2019-04-15  Devin Rousso  <drousso@apple.com>
234
235         Web Inspector: DOMDebugger: "Attribute Modified" breakpoints pause after the modification occurs for the style attribute
236         https://bugs.webkit.org/show_bug.cgi?id=196556
237         <rdar://problem/49570681>
238
239         Reviewed by Timothy Hatcher.
240
241         Test: inspector/dom-debugger/attribute-modified-style.html
242
243         * css/PropertySetCSSStyleDeclaration.h:
244         * css/PropertySetCSSStyleDeclaration.cpp:
245         (WebCore::StyleAttributeMutationScope::~StyleAttributeMutationScope):
246         (WebCore::InlineCSSStyleDeclaration::willMutate): Added.
247
248         * dom/StyledElement.cpp:
249         (WebCore::StyledElement::styleAttributeChanged):
250         (WebCore::StyledElement::inlineStyleChanged):
251
252         * inspector/InspectorInstrumentation.h:
253         (WebCore::InspectorInstrumentation::willInvalidateStyleAttr): Added.
254         (WebCore::InspectorInstrumentation::didInvalidateStyleAttr):
255         * inspector/InspectorInstrumentation.cpp:
256         (WebCore::InspectorInstrumentation::willInvalidateStyleAttrImpl): Added.
257         (WebCore::InspectorInstrumentation::didInvalidateStyleAttrImpl):
258
259         * inspector/agents/InspectorDOMAgent.h:
260         * inspector/agents/InspectorDOMAgent.cpp:
261         (WebCore::InspectorDOMAgent::didInvalidateStyleAttr):
262
263         * inspector/agents/InspectorDOMDebuggerAgent.h:
264         * inspector/agents/InspectorDOMDebuggerAgent.cpp:
265         (WebCore::InspectorDOMDebuggerAgent::willInvalidateStyleAttr): Added.
266         (WebCore::InspectorDOMDebuggerAgent::didInvalidateStyleAttr): Deleted.
267
268 2019-04-15  Devin Rousso  <drousso@apple.com>
269
270         Web Inspector: Elements: event listener change events should only be fired for the selected node and it's ancestors
271         https://bugs.webkit.org/show_bug.cgi?id=196887
272         <rdar://problem/49870627>
273
274         Reviewed by Timothy Hatcher.
275
276         Test: inspector/dom/event-listener-add-remove.html
277               inspector/dom/event-listener-inspected-node.html
278
279         * inspector/agents/InspectorDOMAgent.h:
280         * inspector/agents/InspectorDOMAgent.cpp:
281         (WebCore::InspectorDOMAgent::getEventListenersForNode):
282         (WebCore::InspectorDOMAgent::setInspectedNode):
283         (WebCore::InspectorDOMAgent::didAddEventListener):
284         (WebCore::InspectorDOMAgent::willRemoveEventListener):
285
286 2019-04-15  Antoine Quint  <graouts@apple.com>
287
288         Ensure iOS layout traits are used for media controls in modern compatibility mode
289         https://bugs.webkit.org/show_bug.cgi?id=196812
290         <rdar://problem/47460637>
291
292         Unreviewed. Speculative fix for test regressions on open-source bots.
293
294         * Modules/modern-media-controls/media/media-controller.js:
295         (MediaController.prototype.get layoutTraits):
296
297 2019-04-11  Antoine Quint  <graouts@apple.com>
298
299         Ensure iOS layout traits are used for media controls in modern compatibility mode
300         https://bugs.webkit.org/show_bug.cgi?id=196812
301         <rdar://problem/47460637>
302
303         Reviewed by Dean Jackson.
304
305         Test: media/modern-media-controls/media-controller/ios/media-controller-ios-layout-traits-modern-compatibility-mode.html
306
307         Instead of looking at the UA string, check whether we support touches which is the correct indicator of whether we should
308         be using the iOS layout traits for media controls.
309
310         * Modules/modern-media-controls/media/media-controller.js:
311         (MediaController.prototype.get layoutTraits):
312
313 2019-04-14  Rob Buis  <rbuis@igalia.com>
314
315         Link prefetch not useful for top-level navigation
316         https://bugs.webkit.org/show_bug.cgi?id=195623
317
318         Reviewed by Youenn Fablet.
319
320         Cache cross-domain top-level prefetches in a dedicated cache and not in the
321         memory cache. Ignore prefetches for content extension checks.
322
323         Tests: http/tests/cache/link-prefetch-main-resource-iframe.html
324                http/tests/cache/link-prefetch-main-resource.html
325
326         * loader/LinkLoader.cpp:
327         (WebCore::LinkLoader::prefetchIfNeeded):
328         * loader/ResourceLoadInfo.cpp:
329         (WebCore::toResourceType):
330         * loader/ResourceLoadInfo.h:
331         * loader/ResourceLoader.cpp:
332         (WebCore::ResourceLoader::willSendRequestInternal):
333         * loader/cache/CachedResourceLoader.cpp:
334         (WebCore::CachedResourceLoader::requestResource):
335
336 2019-04-14  Dean Jackson  <dino@apple.com>
337
338         Extract UTI mapping and allow for additions
339         https://bugs.webkit.org/show_bug.cgi?id=196822
340         <rdar://problem/49822339>
341
342         Reviewed by Darin Adler
343
344         Post landing feedback on minimizing String constructors.
345
346         * platform/network/mac/UTIUtilities.mm:
347         (WebCore::MIMETypeFromUTITree):
348         (WebCore::UTIFromMIMETypeCachePolicy::createValueForKey):
349
350 2019-04-14  Don Olmstead  <don.olmstead@sony.com>
351
352         [CMake] JavaScriptCore derived sources should only be referenced inside JavaScriptCore
353         https://bugs.webkit.org/show_bug.cgi?id=196742
354
355         Reviewed by Konstantin Tokarev.
356
357         Don't set JavaScriptCore_SCRIPTS_DIR now that it is set within WebKitFS.
358
359         * CMakeLists.txt:
360
361 2019-04-12  Antoine Quint  <graouts@apple.com>
362
363         Provide a quirk to disable Pointer Events
364         https://bugs.webkit.org/show_bug.cgi?id=196877
365         <rdar://problem/49863470>
366
367         Reviewed by Dean Jackson.
368
369         Add a quirk to disable Pointer Events. We also opt a website that has compatibility issues with Pointer Events into this new quirk.
370
371         * dom/PointerEvent.idl:
372         * page/Quirks.cpp:
373         (WebCore::Quirks::shouldDisablePointerEventsQuirk const):
374         * page/Quirks.h:
375         * page/scrolling/ScrollingCoordinator.cpp:
376         (WebCore::ScrollingCoordinator::absoluteEventTrackingRegionsForFrame const):
377         * style/StyleTreeResolver.cpp:
378         (WebCore::Style::TreeResolver::resolveElement):
379
380 2019-04-12  Wenson Hsieh  <wenson_hsieh@apple.com>
381
382         Enable modern compatibility mode by default in WKWebView on some devices
383         https://bugs.webkit.org/show_bug.cgi?id=196883
384         <rdar://problem/49864527>
385
386         Reviewed by Tim Horton.
387
388         Add a new helper function to determine whether an app is pre-installed on iOS, for the purposes of ensuring
389         compatibility with existing Apple apps that are not affected by linked-on-or-after. This involves all apps with
390         a bundle ID that begins with "com.apple.".
391
392         * platform/RuntimeApplicationChecks.h:
393         * platform/cocoa/RuntimeApplicationChecksCocoa.mm:
394         (WebCore::setApplicationBundleIdentifier):
395         (WebCore::applicationBundleStartsWith):
396         (WebCore::IOSApplication::isAppleApplication):
397
398 2019-04-12  Justin Fan  <justin_fan@apple.com>
399
400         [Web GPU] Prevent narrowing conversions during Metal function calls on 32-bit platforms
401         https://bugs.webkit.org/show_bug.cgi?id=196793
402
403         Reviewed by Darin Adler.
404
405         On 32-bit platforms, NSUInteger is 32-bit, which limits certain Web GPU parameters. 
406         Ensure that valid parameters are properly converted to NSUInteger for Metal calls, regardless of platform.
407
408         * platform/graphics/gpu/GPUBuffer.h:
409         (WebCore::GPUBuffer::byteLength const):
410         * platform/graphics/gpu/cocoa/GPUBindGroupMetal.mm:
411         (WebCore::tryGetResourceAsBufferBinding):
412         (WebCore::setBufferOnEncoder):
413         * platform/graphics/gpu/cocoa/GPUBufferMetal.mm:
414         (WebCore::GPUBuffer::validateBufferUsage):
415         (WebCore::GPUBuffer::tryCreate):
416         (WebCore::GPUBuffer::GPUBuffer):
417         (WebCore::GPUBuffer::setSubData):
418         * platform/graphics/gpu/cocoa/GPUCommandBufferMetal.mm:
419         (WebCore::GPUCommandBuffer::copyBufferToBuffer):
420         (WebCore::GPUCommandBuffer::copyBufferToTexture):
421         (WebCore::GPUCommandBuffer::copyTextureToBuffer):
422         * platform/graphics/gpu/cocoa/GPURenderPassEncoderMetal.mm:
423         (WebCore::GPURenderPassEncoder::drawIndexed):
424         * platform/graphics/gpu/cocoa/GPURenderPipelineMetal.mm:
425         (WebCore::trySetInputStateForPipelineDescriptor):
426
427 2019-04-12  Ross Kirsling  <ross.kirsling@sony.com>
428
429         Unreviewed fix for non-unified build.
430
431         * dom/ScriptedAnimationController.h:
432         Add missing include from r244182.
433
434 2019-04-11  Ryosuke Niwa  <rniwa@webkit.org>
435
436         WebThread should run at a higher priority than user initiated
437         https://bugs.webkit.org/show_bug.cgi?id=196849
438         <rdar://problem/46851062>
439
440         Reviewed by Geoffrey Garen.
441
442         Use QOS_CLASS_USER_INTERACTIVE on WebThread with -10 relative priority so that WebThread
443         won't wait for other threads with priority 30-37 but does not content with the main thread.
444
445         Also removed the call to pthread_attr_setschedparam which disables QoS.
446
447         This improves the blocked time in StartWebThread from 2~3ms to 250μs while cold launching
448         iBooks to an opened book.
449
450         * platform/ios/wak/WebCoreThread.mm:
451         (StartWebThread): Replaced 200 * 4096 by 800 * KB for a better readability.
452
453 2019-04-12  Ryosuke Niwa  <rniwa@webkit.org>
454
455         Add CSS Shadow Parts as a feature under consideration
456         https://bugs.webkit.org/show_bug.cgi?id=196835
457
458         Reviewed by Antti Koivisto.
459
460         This feature is under consideration.
461
462         * features.json:
463
464 2019-04-12  Ross Kirsling  <ross.kirsling@sony.com>
465
466         WebKit should build successfully even with -DENABLE_UNIFIED_BUILDS=OFF
467         https://bugs.webkit.org/show_bug.cgi?id=196845
468
469         Reviewed by Ryosuke Niwa.
470
471         * html/canvas/CanvasRenderingContext2DBase.cpp:
472         (WebCore::CanvasRenderingContext2DBase::FontProxy::initialize):
473         (WebCore::CanvasRenderingContext2DBase::FontProxy::fontMetrics const):
474         (WebCore::CanvasRenderingContext2DBase::FontProxy::fontDescription const):
475         (WebCore::CanvasRenderingContext2DBase::FontProxy::width const):
476         (WebCore::CanvasRenderingContext2DBase::FontProxy::drawBidiText const):
477         (WebCore::CanvasRenderingContext2DBase::beginCompositeLayer):
478         (WebCore::CanvasRenderingContext2DBase::endCompositeLayer):
479         Remove inline specifier to address linking errors (regardless of CMake platform).
480         Doing this in a .cpp file interferes with symbol creation.
481
482         * Modules/mediastream/MediaStreamTrack.cpp:
483         * Modules/webvr/VREyeParameters.cpp:
484         * Modules/webvr/VRFrameData.cpp:
485         * Modules/webvr/VRPose.cpp:
486         * accessibility/AccessibilityList.cpp:
487         * accessibility/isolatedtree/AXIsolatedTree.cpp:
488         * accessibility/isolatedtree/AXIsolatedTreeNode.cpp:
489         * bindings/js/JSDOMConvertWebGL.cpp:
490         * bindings/js/JSHistoryCustom.cpp:
491         * bindings/js/JSIDBCursorWithValueCustom.cpp:
492         * bindings/js/JSPerformanceObserverCustom.cpp:
493         * bindings/js/WindowProxy.cpp:
494         * platform/ColorData.gperf:
495         * platform/mediastream/RealtimeMediaSourceSettings.cpp:
496         * platform/network/DNSResolveQueue.cpp:
497         * workers/service/ServiceWorkerClientQueryOptions.h:
498         * workers/service/ServiceWorkerContainer.cpp:
499         Add missing includes to address compiler errors on GTK.
500
501 2019-04-12  Zalan Bujtas  <zalan@apple.com>
502
503         REGRESSION (r244098): [ Mac WK1 ] Layout Test fast/dynamic/paused-event-dispatch.html is Timing out
504         https://bugs.webkit.org/show_bug.cgi?id=196789
505         <rdar://problem/49855255>
506
507         Reviewed by Tim Horton.
508
509         Disable auto-sizing mode at the start of each test.
510
511         * testing/Internals.cpp:
512         (WebCore::Internals::resetToConsistentState):
513
514 2019-04-12  Eric Carlson  <eric.carlson@apple.com>
515
516         Update AudioSession route sharing policy
517         https://bugs.webkit.org/show_bug.cgi?id=196776
518         <rdar://problem/46501611>
519
520         Reviewed by Jer Noble.
521
522         No new tests, updated an API test.
523
524         * platform/audio/AudioSession.cpp:
525         (WebCore::convertEnumerationToString):
526         * platform/audio/AudioSession.h:
527         (WTF::LogArgument<WebCore::RouteSharingPolicy>::toString):
528         (WTF::LogArgument<WebCore::AudioSession::CategoryType>::toString):
529         * platform/audio/cocoa/MediaSessionManagerCocoa.mm:
530         (MediaSessionManagerCocoa::updateSessionState):
531         * platform/audio/ios/AudioSessionIOS.mm:
532         (WebCore::AudioSession::setCategory):
533         (WebCore::AudioSession::routeSharingPolicy const):
534         * platform/audio/mac/AudioSessionMac.cpp:
535         (WebCore::AudioSession::setCategory):
536
537 2019-04-12  Antoine Quint  <graouts@apple.com>
538
539         Opt some websites into the simulated mouse events dispatch quirk when in modern compatibility mode
540         https://bugs.webkit.org/show_bug.cgi?id=196830
541         <rdar://problem/49124313>
542
543         Reviewed by Wenson Hsieh.
544
545         We add a new policy to determine whether simulated mouse events dispatch are allowed and use it to determine whether the
546         simulated mouse events dispatch quirk can be used for a given website. We then check the domain name for the current page's
547         document to see if it matches some known websites that require this quirk.
548
549         We needed to add some calls into Quirks::shouldDispatchSimulateMouseEvents() where we used to only consult the RuntimeEnabledFeature
550         flag to ensure we correctly created touch regions for simulated mouse events.
551
552         * dom/EventNames.h:
553         (WebCore::EventNames::isTouchRelatedEventType const):
554         * dom/Node.cpp:
555         (WebCore::Node::moveNodeToNewDocument):
556         (WebCore::tryAddEventListener):
557         (WebCore::tryRemoveEventListener):
558         (WebCore::Node::defaultEventHandler):
559         * loader/DocumentLoader.h:
560         (WebCore::DocumentLoader::simulatedMouseEventsDispatchPolicy const):
561         (WebCore::DocumentLoader::setSimulatedMouseEventsDispatchPolicy):
562         * page/DOMWindow.cpp:
563         (WebCore::DOMWindow::addEventListener):
564         (WebCore::DOMWindow::removeEventListener):
565         * page/Quirks.cpp:
566         (WebCore::Quirks::shouldDispatchSimulatedMouseEvents const):
567         (WebCore::Quirks::shouldDispatchSimulateMouseEvents const): Deleted.
568         * page/Quirks.h:
569
570 2019-04-11  Simon Fraser  <simon.fraser@apple.com>
571
572         [iOS WK2] Wrong scrolling behavior for nested absolute position elements inside overflow scroll
573         https://bugs.webkit.org/show_bug.cgi?id=196146
574
575         Reviewed by Antti Koivisto.
576         
577         computeCoordinatedPositioningForLayer() failed to handle nested positions elements
578         inside overflow scroll, because it only walked up to the first containing block of
579         a nested position:absolute. We need to walk all the way up the ancestor layer chain,
580         looking at containing block, scroller and composited ancestor relationships.
581
582         Make this code easier to understand by writing it in terms of "is foo scrolled by bar", rather than
583         trying to collapse all the logic into a single ancestor walk, which was really hard. This is a few
584         more ancestor traversals, but we now only run this code if there's composited scrolling
585         in the ancestor chain.
586
587         Tests: scrollingcoordinator/scrolling-tree/nested-absolute-in-absolute-overflow.html
588                scrollingcoordinator/scrolling-tree/nested-absolute-in-overflow.html
589                scrollingcoordinator/scrolling-tree/nested-absolute-in-relative-in-overflow.html
590                scrollingcoordinator/scrolling-tree/nested-absolute-in-sc-overflow.html
591
592         * rendering/RenderLayerCompositor.cpp:
593         (WebCore::enclosingCompositedScrollingLayer):
594         (WebCore::isScrolledByOverflowScrollLayer):
595         (WebCore::isNonScrolledLayerInsideScrolledCompositedAncestor):
596         (WebCore::RenderLayerCompositor::layerContainingBlockCrossesCoordinatedScrollingBoundary):
597         (WebCore::collectStationaryLayerRelatedOverflowNodes):
598         (WebCore::RenderLayerCompositor::computeCoordinatedPositioningForLayer const):
599         (WebCore::collectRelatedCoordinatedScrollingNodes):
600         (WebCore::layerParentedAcrossCoordinatedScrollingBoundary): Deleted.
601
602 2019-04-12  Manuel Rego Casasnovas  <rego@igalia.com>
603
604         [css-flex][css-grid] Fix synthesized baseline
605         https://bugs.webkit.org/show_bug.cgi?id=196312
606
607         Reviewed by Javier Fernandez.
608
609         When a flex or grid container has no baseline,
610         its baseline should be synthesized from the border edges.
611         The same happens for flex and grid items.
612         
613         Right now we were using the content box in some cases
614         and even using the margin box in a particular scenario.
615         The patch fixes this.
616         
617         At the same time this is also fixing the baseline for
618         inline flex/grid containers to make it interoperable with Firefox.
619         Inline blocks have a special behavior per legacy reasons,
620         which applies to inline flex/grid containers when they have no items;
621         otherwise the items should be used to compute its baseline.
622         See more at: https://github.com/w3c/csswg-drafts/issues/3416
623
624         Note that we need to keep current behavior for buttons,
625         as the flexbox spec doesn't apply to them.
626
627         Tests: css3/flexbox/flexbox-baseline-margins.html
628                fast/css-grid-layout/grid-baseline-margins-1.html
629                fast/css-grid-layout/grid-baseline-margins-2.html
630                imported/w3c/web-platform-tests/css/css-align/baseline-rules/synthesized-baseline-flexbox-001.html
631                imported/w3c/web-platform-tests/css/css-align/baseline-rules/synthesized-baseline-grid-001.html
632                imported/w3c/web-platform-tests/css/css-align/baseline-rules/synthesized-baseline-inline-block-001.html
633
634         * rendering/RenderButton.cpp:
635         (WebCore::synthesizedBaselineFromContentBox):
636         (WebCore::RenderButton::baselinePosition const):
637         * rendering/RenderButton.h:
638         * rendering/RenderFlexibleBox.cpp:
639         (WebCore::synthesizedBaselineFromBorderBox):
640         (WebCore::RenderFlexibleBox::baselinePosition const):
641         (WebCore::RenderFlexibleBox::firstLineBaseline const):
642         (WebCore::RenderFlexibleBox::inlineBlockBaseline const):
643         * rendering/RenderGrid.cpp:
644         (WebCore::RenderGrid::baselinePosition const):
645         (WebCore::RenderGrid::inlineBlockBaseline const):
646
647 2019-04-11  Simon Fraser  <simon.fraser@apple.com>
648
649         Avoid doing positioned scrolling tree node work for layers not inside overflow:scroll
650         https://bugs.webkit.org/show_bug.cgi?id=196848
651
652         Reviewed by Zalan Bujtas.
653
654         Maintain a bit on RenderLayer which says if a layer has a composited scrolling ancestor
655         in the layer tree. We only need to do work related to making positioned scrolling tree nodes
656         for layers which are layer tree descendants of overflow:scroll.
657
658         * rendering/RenderLayer.cpp:
659         (WebCore::RenderLayer::RenderLayer):
660         (WebCore::RenderLayer::updateLayerPositions):
661         (WebCore::outputPaintOrderTreeLegend):
662         (WebCore::outputPaintOrderTreeRecursive):
663         * rendering/RenderLayer.h:
664         * rendering/RenderLayerCompositor.cpp:
665         (WebCore::RenderLayerCompositor::requiresCompositingForPosition const):
666         (WebCore::RenderLayerCompositor::requiresCompositingForIndirectReason const):
667         (WebCore::RenderLayerCompositor::isViewportConstrainedFixedOrStickyLayer const):
668         (WebCore::RenderLayerCompositor::fixedLayerIntersectsViewport const):
669         (WebCore::RenderLayerCompositor::computeCoordinatedPositioningForLayer const):
670
671 2019-04-11  Zalan Bujtas  <zalan@apple.com>
672
673         Try to fix Windows build.
674
675         * page/PrintContext.cpp:
676         (WebCore::PrintContext::computedPageMargin):
677
678 2019-04-11  Megan Gardner  <megan_gardner@apple.com>
679
680         Update 'Save Image' to more clear instructions
681         https://bugs.webkit.org/show_bug.cgi?id=196833
682         <rdar://problem/47446845>
683
684         Reviewed by Wenson Hsieh.
685
686         Not testable, UI change only.
687
688         * en.lproj/Localizable.strings:
689
690 2019-04-11  Zalan Bujtas  <zalan@apple.com>
691
692         Add @page margin support
693         https://bugs.webkit.org/show_bug.cgi?id=196680
694         <rdar://problem/45217707>
695
696         Reviewed by Tim Horton.
697
698         This patch adds support for @page margin. This feature is currently behind a runtime flag and is off by default.
699         We resolve the @page margin values in the WebProcess (currently no pseudo class is supported) and transfer them to the UIProcess through computedPagesCallback.
700         UIProcess is responsible for applying these new values on the printer. We also re-compute the available width/height for the current printing context
701         in the WebProcess if needed (see PrintInfo for current printer margins).
702
703         Tests: printing/page-with-10mm-left-margin.html
704                printing/page-with-zero-margin.html
705
706         * page/PrintContext.cpp:
707         (WebCore::PrintContext::computedPageMargin):
708         (WebCore::PrintContext::computedPageSize):
709         * page/PrintContext.h:
710         * page/RuntimeEnabledFeatures.h:
711         (WebCore::RuntimeEnabledFeatures::pageAtRuleSupportEnabled const):
712         (WebCore::RuntimeEnabledFeatures::setPageAtRuleSupportEnabled):
713
714 2019-04-11  Dean Jackson  <dino@apple.com>
715
716         Extract UTI mapping and allow for additions
717         https://bugs.webkit.org/show_bug.cgi?id=196822
718         <rdar://problem/49822339>
719
720         Reviewed by Tim Horton.
721
722         Add an ADDITIONAL_SYSTEM_PREVIEW_TYPES macro to the list
723         of accepted MIME types. And add a new helper to map
724         MIME types to UTI types when the system was unable to
725         find an existing type.
726
727         * platform/MIMETypeRegistry.cpp:
728         (WebCore::MIMETypeRegistry::systemPreviewMIMETypes):
729         * platform/network/mac/UTIUtilities.mm:
730         (WebCore::UTIFromUnknownMIMEType):
731         (WebCore::UTIFromMIMETypeCachePolicy::createValueForKey):
732
733 2019-04-09  Ryosuke Niwa  <rniwa@webkit.org>
734
735         [iOS] Moving backwards by word granularity does not work if the previous line was inside another block element
736         https://bugs.webkit.org/show_bug.cgi?id=196670
737
738         Reviewed by Wenson Hsieh.
739
740         The bug was ultimately caused by two reasons:
741          1. On iOS, previousWordPositionBoundary would identify a blank line as a word boundary.
742          2. SimplifiedBackwardsTextIterator generates a new line character (\n) between two block elements.
743
744         When moving backwards by word granularity, therefore, previousBoundary would encounter a new line created by (2)
745         and then previousWordPositionBoundary would identify it as a word boundary.
746
747         Fixed the bug (2) by adding the same check as TextIterator::exitNode has to avoid generating an extra new line
748         character following an exiting new line character. Also added internals.rangeAsTextUsingBackwardsTextIterator
749         to make SimplifiedBackwardsTextIterator directly testable in layout tests.
750
751         This fix unveiled an unrelated bug when moving backwards with sentence granularity at the beginning of a line.
752         In this case, WebKit was previously feeding ICU with the previous line's content followed by two new lines,
753         which constituted a new sentence. However after the fix, ICU no longer detects a new sentence after the end
754         of the prevous line. This patch, therefore, introduces a new optional argument to previousBoundary which forces
755         the succeeding paragraph's content (i.e. the content of the line from which we're moving backwards with sentence
756         granularity) to be fed to ICU. This fixes the bug that we were previously not being able to move backwards
757         with sentence granularity at the beginning of a line as indicated by the new tests.
758
759         Tests: editing/selection/extend-selection-backward-at-beginning-of-line-by-sentence-granularity.html
760                editing/selection/extend-selection-backward-at-beginning-of-line-by-word-granularity.html
761                editing/selection/move-selection-backward-at-beginning-of-line-by-sentence-granularity.html
762                editing/selection/move-selection-backward-at-beginning-of-line-by-word-granularity.html
763                editing/text-iterator/backwards-text-iterator-basic.html
764
765         * accessibility/AXObjectCache.cpp:
766         (WebCore::AXObjectCache::previousBoundary): Fixed the bug that moving backwards with sentence granularity at
767         the beginning of a line does not work like we did in VisibleUnits. See the description below. It's tested by
768         an existing layout test accessibility/mac/text-marker-sentence-nav.html, which would fail without this fix.
769         (WebCore::AXObjectCache::startCharacterOffsetOfSentence):
770         * accessibility/AXObjectCache.h:
771         (WebCore::CharacterOffset::isEqual const):
772         * editing/TextIterator.cpp:
773         (WebCore::SimplifiedBackwardsTextIterator::handleNonTextNode): Fixed the bug that we were generating two line
774         lines between block elements. This fixes the bug that moving backwards with word granularity at the beginning
775         of a line fails on iOS.
776         (WebCore::plainTextUsingBackwardsTextIteratorForTesting): Added.
777         * editing/TextIterator.h:
778         * editing/VisibleUnits.cpp:
779         (WebCore::previousBoundary): Added the code to extract the succeeding paragraph's content as context for ICU.
780         This fixes the bug that moving backwards with sentence granularity at the beginning of a line fails.
781         Limit the length of backwards iteration at the current position to avoid traversing backwards beyond
782         the current position, and fixed a bug that an early return for the text node was not taking the suffix length
783         into account when deciding whether next position resides in the starting container node or not.
784         (WebCore::startSentenceBoundary):
785         (WebCore::startOfSentence):
786         * testing/Internals.cpp:
787         (WebCore::Internals::rangeAsTextUsingBackwardsTextIterator): Added.
788         * testing/Internals.h:
789         * testing/Internals.idl:
790
791 2019-04-11  Wenson Hsieh  <wenson_hsieh@apple.com>
792
793         Allow the MediaSource API to be enabled via website policy
794         https://bugs.webkit.org/show_bug.cgi?id=196429
795         <rdar://problem/48774333>
796
797         Reviewed by Tim Horton.
798
799         Add support in DocumentLoader for adjusting page settings using its per-site policies. See WebKit ChangeLog for
800         more detail (in particular, the implementation of applyToDocumentLoader).
801
802         Test: fast/media/ios/ipad/enable-MediaSource-API-in-modern-compatibility-mode.html
803
804         * loader/DocumentLoader.cpp:
805         (WebCore::DocumentLoader::applyPoliciesToSettings const):
806         (WebCore::DocumentLoader::attachToFrame):
807         * loader/DocumentLoader.h:
808
809         Add an enum class for MediaSource policies; while we're at it, make all of these enum values 8 bits wide.
810
811         (WebCore::DocumentLoader::mediaSourcePolicy const):
812         (WebCore::DocumentLoader::setMediaSourcePolicy):
813
814 2019-04-11  Youenn Fablet  <youenn@apple.com>
815
816         Support RTCDataChannel blob binaryType
817         https://bugs.webkit.org/show_bug.cgi?id=196821
818
819         Reviewed by Eric Carlson.
820
821         Add support for receiving blobs.
822         Default value is still left to 'arraybuffer' which is not spec compliant.
823         Covered by rebased test.
824
825         * Modules/mediastream/RTCDataChannel.cpp:
826         (WebCore::RTCDataChannel::setBinaryType):
827         (WebCore::RTCDataChannel::didReceiveRawData):
828
829 2019-04-11  Devin Rousso  <drousso@apple.com>
830
831         Web Inspector: Timelines: can't reliably stop/start a recording
832         https://bugs.webkit.org/show_bug.cgi?id=196778
833         <rdar://problem/47606798>
834
835         Reviewed by Timothy Hatcher.
836
837         * inspector/agents/InspectorTimelineAgent.cpp:
838         (WebCore::InspectorTimelineAgent::startProgrammaticCapture):
839         (WebCore::InspectorTimelineAgent::stopProgrammaticCapture):
840         It is possible to determine when programmatic capturing starts/stops in the frontend based
841         on the state when the backend causes the state to change, such as if the state is "inactive"
842         when the frontend is told that the backend has started capturing.
843
844         * inspector/agents/InspectorCPUProfilerAgent.cpp:
845         (WebCore::InspectorCPUProfilerAgent::stopTracking):
846         * inspector/agents/InspectorMemoryAgent.cpp:
847         (WebCore::InspectorMemoryAgent::stopTracking):
848         Send an end timestamp to match other instruments.
849
850 2019-04-11  Truitt Savell  <tsavell@apple.com>
851
852         Unreviewed, rolling out r244158.
853
854         Casued 8 inspector/timeline/ test failures.
855
856         Reverted changeset:
857
858         "Web Inspector: Timelines: can't reliably stop/start a
859         recording"
860         https://bugs.webkit.org/show_bug.cgi?id=196778
861         https://trac.webkit.org/changeset/244158
862
863 2019-04-11  Pablo Saavedra  <psaavedra@igalia.com>
864
865         [WPE] Build error with ENABLE_VIDEO=OFF after r244078
866         https://bugs.webkit.org/show_bug.cgi?id=196811
867
868         createGenericCue() is only defined when VIDEO_TRACK is enabled.
869
870         Reviewed by Eric Carlson.
871
872         * testing/Internals.cpp:
873         (WebCore::Internals::createGenericCue):
874         * testing/Internals.h:
875
876 2019-04-11  Carlos Garcia Campos  <cgarcia@igalia.com>
877
878         [GTK] Layout test accessibility/aria-hidden-false-works-in-subtrees.html fails after r184890
879         https://bugs.webkit.org/show_bug.cgi?id=146718
880         <rdar://problem/21722487>
881
882         Reviewed by Joanmarie Diggs.
883
884         Allow to get the text under element for nodes hidden in DOM but explicitly exposed to accessibility with
885         aria-hidden="false".
886
887         Fixes: accessibility/aria-hidden-false-works-in-subtrees.html
888
889         * accessibility/AccessibilityNodeObject.cpp:
890         (WebCore::AccessibilityNodeObject::textUnderElement const):
891         * accessibility/atk/WebKitAccessible.cpp:
892         (roleIsTextType): Also consider ApplicationGroup role as text elements, so that <div>text</div> is equivalent to
893         <div role="roup">test</div>.
894
895 2019-04-10  Said Abou-Hallawa  <sabouhallawa@apple.com>
896
897         requestAnimationFrame should execute before the next frame
898         https://bugs.webkit.org/show_bug.cgi?id=177484
899
900         Reviewed by Simon Fraser.
901
902         This change fixes these issues with animation timing:
903
904         1. Calling the requestAnimationFrame callbacks would have happened when
905            the DisplayLink fires. This may have happened even if the frame is
906            missed and no display is committed.
907
908         2. Style changes and layout triggered by script could trigger painting
909            at more than 60fps. CoreAnimation commits could happen at more than
910            60fps, although WindowServer will throttle those, and only some will
911            be shown on the screen.
912
913         This change introduces a new paint scheduling model where painting is
914         driven by a "RenderingUpdateScheduler", which only triggers paints once
915         per 16.7ms frame.
916
917         Code that previously scheduled a compositing layer flush now schedules a
918         "RenderingUpdate", and that update is driven by a DisplayRefreshMonitor
919         callback. When the render happens, we service requestAnimationFrame callbacks,
920         Web Animations, intersection observations and resize observations per the
921         "Update the rendering" step of the HTML Event Loop specification:
922         <https://html.spec.whatwg.org/multipage/webappapis.html#update-the-rendering>.
923
924         In the future, more rendering steps will be added to this code.
925
926         * Sources.txt:
927         * WebCore.xcodeproj/project.pbxproj:
928         * accessibility/mac/AXObjectCacheMac.mm:
929         (WebCore::AXObjectCache::platformHandleFocusedUIElementChanged):
930         Fix layout tests by adding null check.
931
932         * animation/DocumentAnimationScheduler.cpp: Removed.
933         * animation/DocumentAnimationScheduler.h: Removed.
934         * animation/DocumentTimeline.cpp:
935         (WebCore::DocumentTimeline::DocumentTimeline):
936         (WebCore::DocumentTimeline::updateThrottlingState):
937         (WebCore::DocumentTimeline::suspendAnimations):
938         (WebCore::DocumentTimeline::resumeAnimations):
939         (WebCore::DocumentTimeline::liveCurrentTime const):
940         (WebCore::DocumentTimeline::currentTime):
941         (WebCore::DocumentTimeline::cacheCurrentTime):
942         (WebCore::DocumentTimeline::animationTimingDidChange):
943         (WebCore::DocumentTimeline::scheduleAnimationResolution):
944         (WebCore::DocumentTimeline::unscheduleAnimationResolution):
945         (WebCore::DocumentTimeline::updateAnimationsAndSendEvents):
946         (WebCore::DocumentTimeline::internalUpdateAnimationsAndSendEvents):
947         (WebCore::DocumentTimeline::scheduleNextTick):
948         (WebCore::DocumentTimeline::updateListOfElementsWithRunningAcceleratedAnimationsForElement):
949         Simplify this function by handling the case of no-animations separately.
950
951         (WebCore::DocumentTimeline::resolveAnimationsForElement):
952         Simplify the loop and delete hasPendingAcceleratedAnimations because it
953         is initialized to true and is not changed inside the loop.
954
955         (WebCore::DocumentTimeline::scheduleAnimationResolutionIfNeeded): Deleted.
956         (WebCore::DocumentTimeline::animationResolutionTimerFired): Deleted.
957         * animation/DocumentTimeline.h:
958         * dom/Document.cpp:
959         (WebCore::Document::resolveStyle):
960         There is no need to force update in resolveStyle(). notifyFlushRequired()
961         will be called eventually which will scheduleRenderingUpdate().
962
963         (WebCore::Document::prepareForDestruction):
964         (WebCore::Document::updateAnimationsAndSendEvents):
965         (WebCore::Document::serviceRequestAnimationFrameCallbacks):
966         (WebCore::Document::windowScreenDidChange):
967         (WebCore::Document::scheduleRenderingUpdate):
968         (WebCore::Document::updateIntersectionObservations):
969         (WebCore::Document::addResizeObserver):
970         (WebCore::Document::updateResizeObservations):
971         (WebCore::Document::scheduleForcedIntersectionObservationUpdate): Deleted.
972         (WebCore::Document::scheduleResizeObservations): Deleted.
973         (WebCore::Document::animationScheduler): Deleted.
974         No need to schedule web-animations, intersection observations and resize
975         observations updates separately. All of them will be updated through the
976         "Update the rendering" step, i.e. Page::updateRendering().        
977
978         * dom/Document.h:
979         (WebCore::Document::numberOfIntersectionObservers const):
980         * dom/ScriptedAnimationController.cpp:
981         (WebCore::ScriptedAnimationController::serviceRequestAnimationFrameCallbacks):
982         (WebCore::ScriptedAnimationController::scheduleAnimation):
983         (WebCore::ScriptedAnimationController::animationTimerFired):
984         (WebCore::ScriptedAnimationController::serviceScriptedAnimations): Deleted.
985         (WebCore::ScriptedAnimationController::documentAnimationSchedulerDidFire): Deleted.
986         * dom/ScriptedAnimationController.h:
987         * page/FrameView.cpp:
988         (WebCore::FrameView::didLayout):
989         (WebCore::FrameView::viewportContentsChanged):
990         * page/FrameViewLayoutContext.cpp:
991         (WebCore::FrameViewLayoutContext::layoutTimerFired):
992         * page/IntersectionObserver.cpp:
993         (WebCore::IntersectionObserver::observe):
994         * page/Page.cpp:
995         (WebCore::Page::Page):
996         (WebCore::Page::layoutIfNeeded):
997         (WebCore::Page::updateRendering):
998         (WebCore::Page::renderingUpdateScheduler):
999         (WebCore::Page::willDisplayPage): Deleted.
1000         (WebCore::Page::addDocumentNeedingIntersectionObservationUpdate): Deleted.
1001         (WebCore::Page::updateIntersectionObservations): Deleted.
1002         (WebCore::Page::scheduleForcedIntersectionObservationUpdate): Deleted.
1003         (WebCore::Page::hasResizeObservers const): Deleted.
1004         (WebCore::Page::gatherDocumentsNeedingResizeObservationCheck): Deleted.
1005         (WebCore::Page::checkResizeObservations): Deleted.
1006         (WebCore::Page::scheduleResizeObservations): Deleted.
1007         (WebCore::Page::notifyResizeObservers): Deleted.
1008         * page/Page.h:
1009         (WebCore::Page::setNeedsCheckResizeObservations): Deleted.
1010         (WebCore::Page::needsCheckResizeObservations const): Deleted.
1011         The IntersectionObserver and the ResizeObserver do not need to schedule
1012         their own timers. The RenderingUpdateScheduler will schedule the "Update
1013         the rendering" step in which these obverses will be served.
1014
1015         * page/PageOverlayController.cpp:
1016         (WebCore::PageOverlayController::didChangeViewExposedRect):
1017         (WebCore::PageOverlayController::notifyFlushRequired):
1018         Force committing the layers to be 60 fps at maximum.
1019
1020         * page/RenderingUpdateScheduler.cpp: Added.
1021         (WebCore::RenderingUpdateScheduler::RenderingUpdateScheduler):
1022         (WebCore::RenderingUpdateScheduler::scheduleRenderingUpdate):
1023         (WebCore::RenderingUpdateScheduler::isScheduled const):
1024         (WebCore::RenderingUpdateScheduler::startTimer):
1025         (WebCore::RenderingUpdateScheduler::clearScheduled):
1026         (WebCore::RenderingUpdateScheduler::createDisplayRefreshMonitor const):
1027         (WebCore::RenderingUpdateScheduler::windowScreenDidChange):
1028         (WebCore::RenderingUpdateScheduler::displayRefreshFired):
1029         (WebCore::RenderingUpdateScheduler::scheduleCompositingLayerFlush):
1030         * page/RenderingUpdateScheduler.h: Added.
1031         (WebCore::RenderingUpdateScheduler::create):
1032         * page/ResizeObserver.cpp:
1033         (WebCore::ResizeObserver::observe):
1034         (WebCore::ResizeObserver::scheduleObservations): Deleted.
1035         * page/ResizeObserver.h:
1036         (WebCore::ResizeObserver::hasActiveObservations const):
1037         * page/ios/ContentChangeObserver.h:
1038         * page/mac/ServicesOverlayController.mm:
1039         (WebCore::ServicesOverlayController::Highlight::notifyFlushRequired):
1040         * page/scrolling/ScrollingStateTree.cpp:
1041         * rendering/RenderLayerCompositor.cpp:
1042         (WebCore::RenderLayerCompositor::scheduleLayerFlushNow):
1043         (WebCore::RenderLayerCompositor::layerTreeAsText):
1044
1045 2019-04-10  Ryosuke Niwa  <rniwa@webkit.org>
1046
1047         Nullptr crash in CompositeEditCommand::moveParagraphs when root editable element goes away
1048         https://bugs.webkit.org/show_bug.cgi?id=193027
1049
1050         Reviewed by Wenson Hsieh.
1051
1052         Added an early exit when the root editable element (editing host in HTML5 spec terminology) is null
1053         during CompositeEditCommand::moveParagraphs. This could happen when the website does something crazy
1054         like removing contenteditable content attribute during DOM mutations or when the destination becomes
1055         disconnected (orphaned) from the document due to bugs elsewhere in the codebase.
1056
1057         Test: editing/deleting/merge-paragraphs-null-root-editable-element-crash.html
1058
1059         * editing/CompositeEditCommand.cpp:
1060         (WebCore::CompositeEditCommand::moveParagraphs): Added an early exit.
1061
1062 2019-04-10  Devin Rousso  <drousso@apple.com>
1063
1064         Web Inspector: save sheet should be anchored underneath the tab bar when detached
1065         https://bugs.webkit.org/show_bug.cgi?id=196722
1066         <rdar://problem/49613280>
1067
1068         Reviewed by Timothy Hatcher.
1069
1070         No web observable change.
1071
1072         * inspector/InspectorFrontendClient.h:
1073         (WebCore::InspectorFrontendClient::changeSheetRect): Added.
1074
1075         * inspector/InspectorFrontendClientLocal.h:
1076         * inspector/InspectorFrontendClientLocal.cpp:
1077         (WebCore::InspectorFrontendClientLocal::changeSheetRect): Added.
1078
1079         * inspector/InspectorFrontendHost.idl:
1080         * inspector/InspectorFrontendHost.h:
1081         * inspector/InspectorFrontendHost.cpp:
1082         (WebCore::InspectorFrontendHost::setSheetRect): Added.
1083
1084         * testing/Internals.cpp:
1085         (WebCore::InspectorStubFrontend::setSheetRect): Added.
1086
1087 2019-04-10  Devin Rousso  <drousso@apple.com>
1088
1089         Web Inspector: Inspector: lazily create the agent
1090         https://bugs.webkit.org/show_bug.cgi?id=195971
1091         <rdar://problem/49039645>
1092
1093         Reviewed by Joseph Pecoraro.
1094
1095         No change in functionality.
1096
1097         * inspector/InspectorController.h:
1098         * inspector/InspectorController.cpp:
1099         (WebCore::InspectorController::InspectorController):
1100         (WebCore::InspectorController::createLazyAgents):
1101         (WebCore::InspectorController::evaluateForTestInFrontend):
1102         (WebCore::InspectorController::ensureInspectorAgent):
1103
1104 2019-04-10  Megan Gardner  <megan_gardner@apple.com>
1105
1106         Remove unneeded extern C
1107         https://bugs.webkit.org/show_bug.cgi?id=196786
1108
1109         Reviewed by Tim Horton.
1110
1111         No tests needed, just needs to compile.
1112
1113         Removing staging hack for Reveal framework.
1114
1115         * editing/cocoa/DictionaryLookup.mm:
1116
1117 2019-04-10  Devin Rousso  <drousso@apple.com>
1118
1119         Web Inspector: REGRESSION: lazy agents used outside of frontend/instrumentation can be accessed before being created
1120         https://bugs.webkit.org/show_bug.cgi?id=196725
1121         <rdar://problem/49669810>
1122
1123         Reviewed by Timothy Hatcher.
1124
1125         Move the logic for creating the `InspectorPageAgent` and `InspectorDOMAgent` into separate
1126         functions so that callers into `InspectorController` can be guaranteed to have a valid
1127         instance of the agent.
1128
1129         This doesn't interfere with the `Page.enable` command, as it doesn't clear any saved state.
1130         There is no `DOM.enable` command, so there's no issue there either.
1131
1132         * inspector/InspectorController.h:
1133         (WebCore::InspectorController::pageAgent): Deleted.
1134         * inspector/InspectorController.cpp:
1135         (WebCore::InspectorController::createLazyAgents):
1136         (WebCore::InspectorController::inspect):
1137         (WebCore::InspectorController::hideHighlight):
1138         (WebCore::InspectorController::ensureDOMAgent): Added.
1139         (WebCore::InspectorController::ensurePageAgent): Added.
1140
1141         * inspector/InspectorFrontendClientLocal.cpp:
1142         (WebCore::InspectorFrontendClientLocal::showMainResourceForFrame):
1143
1144 2019-04-10  Alex Christensen  <achristensen@webkit.org>
1145
1146         Add SPI WKNavigationResponse._downloadAttribute
1147         https://bugs.webkit.org/show_bug.cgi?id=196755
1148         <rdar://49587365>
1149
1150         Reviewed by Brady Eidson.
1151
1152         Covered by an API test that validates the attribute is correctly sent through the FrameLoader to the API.
1153         When a user clicks on a link with a download attribute, the download attribute should be used as the suggested filename sometimes.
1154         The application needs this information after it has received the response in order to make fully informed decisions about downloads.
1155         In order to get this attribute to the decidePolicyForNavigationResponse, we need to store the attribute on the DocumentLoader
1156         from the FrameLoadRequest then send it from the DocumentLoader when the response is received.
1157
1158         * loader/DocumentLoader.h:
1159         (WebCore::DocumentLoader::setDownloadAttribute):
1160         (WebCore::DocumentLoader::downloadAttribute const):
1161         * loader/EmptyFrameLoaderClient.h:
1162         * loader/FrameLoader.cpp:
1163         (WebCore::FrameLoader::checkContentPolicy):
1164         (WebCore::FrameLoader::loadURL):
1165         (WebCore::FrameLoader::loadWithNavigationAction):
1166         (WebCore::FrameLoader::loadPostRequest):
1167         * loader/FrameLoader.h:
1168         (WebCore::FrameLoader::loadWithNavigationAction):
1169         * loader/FrameLoaderClient.h:
1170
1171 2019-04-10  Youenn Fablet  <youenn@apple.com>
1172
1173         SWClientConnection should not double hop to fire some events
1174         https://bugs.webkit.org/show_bug.cgi?id=196735
1175
1176         Reviewed by Alex Christensen.
1177
1178         Some events, like postMessage in service workers is hopping from main thread to service worker thread to dispatch events.
1179         Some other events, like service worker state update, are hopping from main thread to service worker thread, then posting a task to dispatch events.
1180         This may create ordering problems.
1181
1182         To fix the issue, we now hop to the service worker thread and dispatch the events.
1183         In addition, for documents, we post a task and do the whole service worker processing in it.
1184         This ensures that some tests, like whether there is a service worker container,
1185         or creation of a service worker are done consistently.
1186
1187         Covered by unflaked test.
1188
1189         * workers/service/SWClientConnection.cpp:
1190         (WebCore::SWClientConnection::updateRegistrationState):
1191         (WebCore::SWClientConnection::updateWorkerState):
1192         (WebCore::SWClientConnection::fireUpdateFoundEvent):
1193         (WebCore::SWClientConnection::notifyClientsOfControllerChange):
1194         * workers/service/ServiceWorker.cpp:
1195         (WebCore::ServiceWorker::updateState):
1196         * workers/service/ServiceWorker.h:
1197         * workers/service/ServiceWorkerContainer.cpp:
1198         (WebCore::ServiceWorkerContainer::updateRegistrationState):
1199         (WebCore::ServiceWorkerContainer::fireUpdateFoundEvent):
1200         (WebCore::ServiceWorkerContainer::fireControllerChangeEvent):
1201         * workers/service/ServiceWorkerContainer.h:
1202         * workers/service/ServiceWorkerJob.cpp:
1203         (WebCore::ServiceWorkerJob::notifyFinished):
1204         Notify of the script URL in the error message.
1205         This will help diagnose flakiness issues.
1206         * workers/service/ServiceWorkerRegistration.cpp:
1207         (WebCore::ServiceWorkerRegistration::fireUpdateFoundEvent):
1208         * workers/service/ServiceWorkerRegistration.h:
1209
1210 2019-04-10  Devin Rousso  <drousso@apple.com>
1211
1212         Web Inspector: Timelines: can't reliably stop/start a recording
1213         https://bugs.webkit.org/show_bug.cgi?id=196778
1214         <rdar://problem/47606798>
1215
1216         Reviewed by Timothy Hatcher.
1217
1218         * inspector/agents/InspectorTimelineAgent.cpp:
1219         (WebCore::InspectorTimelineAgent::startProgrammaticCapture):
1220         (WebCore::InspectorTimelineAgent::stopProgrammaticCapture):
1221         It is possible to determine when programmatic capturing starts/stops in the frontend based
1222         on the state when the backend causes the state to change, such as if the state is "inactive"
1223         when the frontend is told that the backend has started capturing.
1224
1225         * inspector/agents/InspectorCPUProfilerAgent.cpp:
1226         (WebCore::InspectorCPUProfilerAgent::stopTracking):
1227         * inspector/agents/InspectorMemoryAgent.cpp:
1228         (WebCore::InspectorMemoryAgent::stopTracking):
1229         Send an end timestamp to match other instruments.
1230
1231 2019-04-10  Tim Horton  <timothy_horton@apple.com>
1232
1233         Add modern API for overriding the page's specified viewport configuration
1234         https://bugs.webkit.org/show_bug.cgi?id=167734
1235         <rdar://problem/30331795>
1236
1237         Reviewed by Simon Fraser.
1238
1239         New API test: WebKit.OverrideViewportArguments
1240
1241         * dom/Document.cpp:
1242         (WebCore::Document::updateViewportArguments):
1243         * dom/Document.h:
1244         (WebCore::Document::viewportArguments const):
1245         Make the viewportArguments() getter respect the overridden arguments.
1246
1247         * dom/ViewportArguments.cpp:
1248         (WebCore::numericPrefix):
1249         (WebCore::findSizeValue):
1250         (WebCore::findScaleValue):
1251         (WebCore::findBooleanValue):
1252         (WebCore::parseViewportFitValue):
1253         (WebCore::viewportErrorMessage):
1254         (WebCore::reportViewportWarning):
1255         (WebCore::setViewportFeature):
1256         * dom/ViewportArguments.h:
1257         Make it possible to parse ViewportArguments without a Document, so
1258         that it can be used in the UI process. We only used the Document for
1259         two things: error reporting, and getting the state of one setting.
1260         Refactor error handling to use a passed-arund function, and add a
1261         variant of setViewportFeature() that doesn't take a Document.
1262
1263 2019-04-10  Justin Fan  <justin_fan@apple.com>
1264
1265         [Web GPU] Indexed drawing and GPUCommandEncoder crash prevention
1266         https://bugs.webkit.org/show_bug.cgi?id=196758
1267
1268         Reviewed by Dean Jackson.
1269
1270         Test: webgpu/draw-indexed-triangles.html
1271
1272         Implement GPURenderPassEncoder::setIndexBuffer and GPURenderPassEncoder::drawIndexed to enable indexed drawing.
1273         Disable GPUCommandEncoders with active pass encoders from being submitted or encoding blits. 
1274
1275         Prevent active GPUCommandEncoders from being submitted or encoding blit commands:
1276         * Modules/webgpu/WebGPUCommandEncoder.cpp:
1277         (WebCore::WebGPUCommandEncoder::finish):
1278         * platform/graphics/gpu/cocoa/GPUCommandBufferMetal.mm:
1279         (WebCore::GPUCommandBuffer::copyBufferToBuffer):
1280         (WebCore::GPUCommandBuffer::copyBufferToTexture):
1281         (WebCore::GPUCommandBuffer::copyTextureToBuffer):
1282         (WebCore::GPUCommandBuffer::copyTextureToTexture):
1283
1284         Implement GPURenderPassEncoder::setIndexBuffer and GPURenderPassEncoder::drawIndexed:
1285         * Modules/webgpu/WebGPURenderPassEncoder.cpp:
1286         (WebCore::WebGPURenderPassEncoder::setIndexBuffer):
1287         (WebCore::WebGPURenderPassEncoder::setVertexBuffers): Remove unnecessary move operations.
1288         (WebCore::WebGPURenderPassEncoder::drawIndexed): Added.
1289         * Modules/webgpu/WebGPURenderPassEncoder.h:
1290         * Modules/webgpu/WebGPURenderPassEncoder.idl:
1291         * platform/graphics/gpu/GPUBuffer.h:
1292         (WebCore::GPUBuffer::isIndex const):
1293         * platform/graphics/gpu/GPUInputStateDescriptor.h:
1294         * platform/graphics/gpu/GPURenderPassEncoder.h: Cache the index buffer, as Metal does not set the index buffer separate from the draw call.
1295         * platform/graphics/gpu/GPURenderPipeline.h:
1296         (WebCore::GPURenderPipeline::indexFormat const):
1297         * platform/graphics/gpu/cocoa/GPURenderPassEncoderMetal.mm:
1298         (WebCore::GPURenderPassEncoder::setIndexBuffer):
1299         (WebCore::GPURenderPassEncoder::setVertexBuffers):
1300         (WebCore::mtlPrimitiveTypeForGPUPrimitiveTopology):
1301         (WebCore::GPURenderPassEncoder::draw):
1302         (WebCore::mtlIndexTypeForGPUIndexFormat): Added.
1303         (WebCore::GPURenderPassEncoder::drawIndexed): Added.
1304         (WebCore::primitiveTypeForGPUPrimitiveTopology): Deleted.
1305         * platform/graphics/gpu/cocoa/GPURenderPipelineMetal.mm:
1306         (WebCore::GPURenderPipeline::tryCreate):
1307         (WebCore::GPURenderPipeline::GPURenderPipeline):
1308
1309 2019-04-09  Ryosuke Niwa  <rniwa@webkit.org>
1310
1311         OfflineAudioDestinationNode::startRendering leaks OfflineAudioDestinationNode if offlineRender exists early
1312         https://bugs.webkit.org/show_bug.cgi?id=196759
1313
1314         Reviewed by Eric Carlson.
1315
1316         OfflineAudioDestinationNode::startRendering unconditionally ref's itself before invoking offlineRender() in a new thread.
1317         But offlineRender can early exit without ever calling deref() in the main thread, leading to the leak of
1318         OfflineAudioDestinationNode. Fixed the leak by always calling deref in the main thread after calling offlineRender().
1319
1320         Also removed the debug assertion in offlineRender which always hits when we run the relevant test.
1321
1322         Test: imported/w3c/web-platform-tests/webaudio/the-audio-api/the-offlineaudiocontext-interface/current-time-block-size.html
1323
1324         * Modules/webaudio/OfflineAudioDestinationNode.cpp:
1325         (WebCore::OfflineAudioDestinationNode::startRendering):
1326         (WebCore::OfflineAudioDestinationNode::offlineRender):
1327         (WebCore::OfflineAudioDestinationNode::notifyComplete): Merged into startRendering.
1328         * Modules/webaudio/OfflineAudioDestinationNode.h:
1329
1330 2019-04-10  Megan Gardner  <megan_gardner@apple.com>
1331
1332         Fix text autoscrolling when typing in modern webkit
1333         https://bugs.webkit.org/show_bug.cgi?id=196718
1334         <rdar://problem/49225507>
1335
1336         Reviewed by Tim Horton.
1337
1338         Tests: fast/events/autoscroll-when-input-is-offscreen.html
1339                fast/events/autoscroll-with-software-keyboard.html
1340
1341         We have been relying on UIKit to scroll editable text, but
1342         since we cannot give them enough information for them to always
1343         do the right thing, we should just do all the work in WebKit.
1344         This has the added benifit of fixing some tricky autoscrolling
1345         bugs that have cropped up recently.
1346
1347         * editing/Editor.cpp:
1348         (WebCore::Editor::insertTextWithoutSendingTextEvent):
1349         (WebCore::Editor::revealSelectionAfterEditingOperation):
1350         We should be scrolling the main frame in WebKit. We have been relying on UIKit,
1351         but we cannot give them enough information to guarantee a correct scroll, so just
1352         do all the work in WebKit.
1353         * page/FrameView.cpp:
1354         (WebCore::FrameView::unobscuredContentRectExpandedByContentInsets const):
1355         Update to use the rect that is actually visible, accounting for the software keyboard.
1356
1357 2019-04-10  Ross Kirsling  <ross.kirsling@sony.com>
1358
1359         WebCore should build successfully even with -DENABLE_UNIFIED_BUILDS=OFF
1360         https://bugs.webkit.org/show_bug.cgi?id=196762
1361
1362         Reviewed by Ryosuke Niwa.
1363
1364         * Modules/indexeddb/IDBCursor.h:
1365         * Modules/indexeddb/client/IDBConnectionToServer.cpp:
1366         * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.h:
1367         * Modules/websockets/WebSocketFrame.cpp:
1368         * accessibility/AccessibilityARIAGridRow.cpp:
1369         (WebCore::AccessibilityARIAGridRow::parentTable const):
1370         * accessibility/AccessibilityObject.cpp:
1371         * accessibility/AccessibilityRenderObject.cpp:
1372         * animation/CSSAnimation.cpp:
1373         * animation/DeclarativeAnimation.cpp:
1374         * bindings/js/DOMGCOutputConstraint.h:
1375         * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
1376         (WebCore::root):
1377         (WebCore::JSCanvasRenderingContext2DOwner::isReachableFromOpaqueRoots):
1378         (WebCore::JSCanvasRenderingContext2D::visitAdditionalChildren):
1379         * bindings/js/JSDOMConvertNumbers.cpp:
1380         * bindings/js/JSDOMWindowCustom.cpp:
1381         * bindings/js/JSExtendableMessageEventCustom.cpp:
1382         * bindings/js/SerializedScriptValue.cpp:
1383         * css/CSSFontFaceSource.cpp:
1384         * css/CSSFontFaceSource.h:
1385         * css/MediaQueryMatcher.h:
1386         * css/parser/CSSPropertyParserHelpers.cpp:
1387         * dom/DocumentParser.cpp:
1388         * dom/EventPath.cpp:
1389         * dom/MouseEvent.h:
1390         * dom/SpectreGadget.cpp:
1391         * dom/SpectreGadget.h:
1392         * editing/ChangeListTypeCommand.cpp:
1393         * editing/EditAction.cpp:
1394         * editing/ReplaceSelectionCommand.cpp:
1395         * editing/TextGranularity.h:
1396         * html/HTMLFormControlsCollection.cpp:
1397         * html/HTMLImageElement.cpp:
1398         * html/canvas/CanvasRenderingContext2DBase.cpp:
1399         * inspector/InspectorController.cpp:
1400         * inspector/agents/InspectorApplicationCacheAgent.cpp:
1401         * inspector/agents/InspectorCanvasAgent.cpp:
1402         * inspector/agents/WebHeapAgent.cpp:
1403         * inspector/agents/page/PageAuditAgent.cpp:
1404         * inspector/agents/page/PageConsoleAgent.cpp:
1405         * inspector/agents/page/PageNetworkAgent.cpp:
1406         * inspector/agents/worker/WorkerAuditAgent.cpp:
1407         * loader/CrossOriginAccessControl.h:
1408         * loader/CrossOriginPreflightResultCache.h:
1409         * loader/NavigationAction.cpp:
1410         * loader/ResourceLoadObserver.cpp:
1411         * page/FrameTree.cpp:
1412         * page/IntersectionObserver.cpp:
1413         * page/PageConfiguration.cpp:
1414         * page/PerformanceResourceTiming.cpp:
1415         * page/ResizeObservation.cpp:
1416         * page/UndoManager.cpp:
1417         * plugins/PluginData.cpp:
1418         * rendering/Grid.h:
1419         * rendering/GridBaselineAlignment.cpp:
1420         * rendering/GridBaselineAlignment.h:
1421         * rendering/GridLayoutFunctions.cpp:
1422         * rendering/GridLayoutFunctions.h:
1423         * rendering/GridTrackSizingAlgorithm.h:
1424         * rendering/RenderDeprecatedFlexibleBox.cpp:
1425         * rendering/RenderFlexibleBox.cpp:
1426         * rendering/RenderIFrame.cpp:
1427         * rendering/RenderLayerFilters.cpp:
1428         * rendering/TextDecorationPainter.cpp:
1429         * rendering/TextDecorationPainter.h:
1430         * rendering/TextPainter.cpp:
1431         * rendering/TextPainter.h:
1432         * rendering/style/StyleRareNonInheritedData.cpp:
1433         * rendering/style/StyleRareNonInheritedData.h:
1434         * rendering/svg/SVGRenderSupport.h:
1435         * rendering/updating/RenderTreeBuilder.cpp:
1436         * rendering/updating/RenderTreeBuilderSVG.cpp:
1437         * style/InlineTextBoxStyle.cpp:
1438         * style/InlineTextBoxStyle.h:
1439         * style/StylePendingResources.cpp:
1440         * svg/SVGMatrix.h:
1441         * svg/SVGViewSpec.h:
1442         * svg/SVGZoomAndPan.h:
1443         * workers/WorkerScriptLoader.cpp:
1444         * workers/WorkerScriptLoader.h:
1445         * workers/service/ServiceWorker.cpp:
1446         * workers/service/ServiceWorkerClientData.cpp:
1447         * workers/service/ServiceWorkerClients.cpp:
1448         * workers/service/ServiceWorkerClients.h:
1449         * workers/service/ServiceWorkerGlobalScope.cpp:
1450         * workers/service/ServiceWorkerJob.cpp:
1451         * workers/service/ServiceWorkerProvider.cpp:
1452         * workers/service/context/ServiceWorkerFetch.cpp:
1453         * workers/service/context/ServiceWorkerInspectorProxy.h:
1454         * workers/service/context/ServiceWorkerThread.cpp:
1455         * workers/service/context/ServiceWorkerThreadProxy.cpp:
1456         * workers/service/server/SWServerJobQueue.cpp:
1457         * workers/service/server/SWServerToContextConnection.cpp:
1458         * workers/service/server/SWServerWorker.cpp:
1459         * workers/service/server/SWServerWorker.h:
1460         * worklets/Worklet.h:
1461
1462 2019-04-10  Antoine Quint  <graouts@apple.com>
1463
1464         Enable Pointer Events on watchOS
1465         https://bugs.webkit.org/show_bug.cgi?id=196771
1466         <rdar://problem/49040909>
1467
1468         Reviewed by Dean Jackson.
1469
1470         * Configurations/FeatureDefines.xcconfig:
1471
1472 2019-04-10  Youenn Fablet  <youenn@apple.com>
1473
1474         Delay initialization of quota users until the first quota request
1475         https://bugs.webkit.org/show_bug.cgi?id=196467
1476
1477         Reviewed by Chris Dumez.
1478
1479         Instead of triggering initialization of each user when being added,
1480         delay initialization until the first call to requestSpace with a non zero task size.
1481         This will make sure we do not load Cache API information in memory or check for
1482         IDB space until actually necessary.
1483
1484         To implement that, move from a HashSet of being initialized users to a HashMap where the key is user and
1485         the value is the user initialization state.
1486
1487         When removing a user, delay the call to processPendingRequest so that a synchronous call to addUser
1488         can be taken into consideration.
1489
1490         This unflakes some Cache API tests as these tests do clear the Cache API and check for the clearing result.
1491         Clearing the caches triggers a removeUser/addUser dance which then triggers initialization of the Caches structure.
1492
1493         Covered by existing tests.
1494
1495         * storage/StorageQuotaManager.cpp:
1496         (WebCore::StorageQuotaManager::initializeUsersIfNeeded):
1497         (WebCore::StorageQuotaManager::askUserToInitialize):
1498         (WebCore::StorageQuotaManager::addUser):
1499         (WebCore::StorageQuotaManager::requestSpace):
1500         * storage/StorageQuotaManager.h:
1501
1502 2019-04-10  Philippe Normand  <pnormand@igalia.com>
1503
1504         there is no vp8 support in youtube.com/html5 page with libwebkit2gtk 2.24 (MSE enabled)
1505         https://bugs.webkit.org/show_bug.cgi?id=196615
1506
1507         Reviewed by Xabier Rodriguez-Calvar.
1508
1509         Add vp8.0 and vp9.0 in supported mime-types if the corresponding video decoders are found.
1510
1511         No new tests, existing web-platform-tests cover this change.
1512
1513         * platform/graphics/gstreamer/GStreamerRegistryScanner.cpp:
1514         (WebCore::GStreamerRegistryScanner::initialize):
1515
1516 2019-04-10  Philippe Normand  <pnormand@igalia.com>
1517
1518         [GStreamer] Adaptive streaming playback broken with GStreamer < 1.12
1519         https://bugs.webkit.org/show_bug.cgi?id=196765
1520
1521         Reviewed by Xabier Rodriguez-Calvar.
1522
1523         Without the following patch in gst-plugins-bad, the uridownloader
1524         doesn't relay need-context messages to its parent, so in our case
1525         the player can't share its context with secondary webkitwebsrc
1526         elements and a RELEASE_ASSERT is hit in the WebProcess.
1527
1528         So the workaround is to use again webkit+ protocol prefixes for
1529         GStreamer versions older than 1.12.
1530
1531         https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/commit/8cf858fb27919e1d631223375f81b98055623733
1532
1533         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1534         (WebCore::convertToInternalProtocol):
1535         (WebCore::MediaPlayerPrivateGStreamer::setPlaybinURL):
1536         (WebCore::MediaPlayerPrivateGStreamer::loadFull):
1537         (WebCore::MediaPlayerPrivateGStreamer::handleMessage):
1538         (WebCore::MediaPlayerPrivateGStreamer::wouldTaintOrigin const):
1539         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
1540         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
1541         (webKitWebSrcStart):
1542         (webKitWebSrcGetProtocols):
1543         (convertPlaybinURI):
1544         (webKitWebSrcSetUri):
1545         (CachedResourceStreamingClient::responseReceived):
1546         (webKitSrcWouldTaintOrigin):
1547         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.h:
1548
1549 2019-04-10  Carlos Garcia Campos  <cgarcia@igalia.com>
1550
1551         [ATK] Defer the emision of AtkObject::children-changed signal after layout is done
1552         https://bugs.webkit.org/show_bug.cgi?id=187948
1553
1554         Reviewed by Michael Catanzaro.
1555
1556         The signal AtkObject::children-changed is emitted from AXObjectCache::attachWrapper() and
1557         AXObjectCache::detachWrapper(). Both can be called in the middle of a layout, so we need to defer the emission
1558         of the signal after the layout is done, to avoid other atk entry points from being called at that point, since
1559         most of them update the backing store at the beginning.
1560
1561         Fixes: accessibility/children-changed-sends-notification.html
1562
1563         * accessibility/AXObjectCache.cpp:
1564         (WebCore::AXObjectCache::performDeferredCacheUpdate): Call platformPerformDeferredCacheUpdate().
1565         * accessibility/AXObjectCache.h:
1566         * accessibility/atk/AXObjectCacheAtk.cpp:
1567         (WebCore::wrapperParent): Helper to get the AtkObject parent of a given WebKitAccessible.
1568         (WebCore::AXObjectCache::detachWrapper): Add wrapper to m_deferredDetachedWrapperList.
1569         (WebCore::AXObjectCache::attachWrapper): Add object to m_deferredAttachedWrapperObjectList.
1570         (WebCore::AXObjectCache::platformPerformDeferredCacheUpdate): Emit AtkObject::children-changed::add for objects
1571         in m_deferredAttachedWrapperObjectList and AtkObject::children-changed::remove for wrappers in m_deferredDetachedWrapperList.
1572         * accessibility/ios/AXObjectCacheIOS.mm:
1573         (WebCore::AXObjectCache::platformPerformDeferredCacheUpdate):
1574         * accessibility/mac/AXObjectCacheMac.mm:
1575         (WebCore::AXObjectCache::platformPerformDeferredCacheUpdate):
1576         * accessibility/win/AXObjectCacheWin.cpp:
1577         (WebCore::AXObjectCache::platformPerformDeferredCacheUpdate):
1578         * accessibility/wpe/AXObjectCacheWPE.cpp:
1579         (WebCore::AXObjectCache::platformPerformDeferredCacheUpdate):
1580
1581 2019-04-10  Carlos Garcia Campos  <cgarcia@igalia.com>
1582
1583         [ATK] Test accessibility/insert-children-assert.html is crashing since added in r216980
1584         https://bugs.webkit.org/show_bug.cgi?id=172281
1585         <rdar://problem/37030990>
1586
1587         Reviewed by Joanmarie Diggs.
1588
1589         The crash happens because at some point the test tries to get the anonymous block text, getting the RenderText as
1590         first child and RenderFullScreen as last child and the latter doesn't have a node. This is because in atk we do
1591         things differently, we don't include the static text elements individually, but parent element uses
1592         textUnderElement() to get all the pieces together. We can just turn the asserts into actual nullptr checks.
1593
1594         Fixes: accessibility/insert-children-assert.html
1595
1596         * accessibility/AccessibilityRenderObject.cpp:
1597         (WebCore::AccessibilityRenderObject::textUnderElement const):
1598
1599 2019-04-09  Keith Rollin  <krollin@apple.com>
1600
1601         Unreviewed build maintenance -- update .xcfilelists.
1602
1603         * DerivedSources-input.xcfilelist:
1604         * DerivedSources-output.xcfilelist:
1605
1606 2019-04-09  Zalan Bujtas  <zalan@apple.com>
1607
1608         [AutoSizing] Avoid making text paragraphs scroll horizontally when there is a wide table
1609         https://bugs.webkit.org/show_bug.cgi?id=196743
1610         <rdar://problem/43897551>
1611
1612         Reviewed by Tim Horton.
1613
1614         This patch changes the auto size behavior by using fixed constraint (instead of a min/max pair) to compute the content height.
1615         Now with the initial containing block width is firmly set to auto-sizing width, the overflow content will not stretch the ICB. Instead it overflows the ICB
1616         and triggers scrolling the same way the non-auto-sizing mode does.
1617
1618         * page/FrameView.cpp:
1619         (WebCore::FrameView::autoSizeIfEnabled):
1620         (WebCore::FrameView::enableAutoSizeMode):
1621         * page/FrameView.h:
1622         * testing/Internals.cpp:
1623         (WebCore::Internals::enableAutoSizeMode):
1624         * testing/Internals.h:
1625         * testing/Internals.idl:
1626
1627 2019-04-09  Youenn Fablet  <youenn@apple.com>
1628
1629         Close service worker database on network process suspension
1630         https://bugs.webkit.org/show_bug.cgi?id=196623
1631         <rdar://problem/48930869>
1632
1633         Reviewed by Alex Christensen.
1634
1635         Add suspend/resume support to SWServer.
1636         On suspend, close the service worker database and stop pushing for changes.
1637         On resume, push changes if needed.
1638
1639         * workers/service/server/RegistrationDatabase.cpp:
1640         (WebCore::RegistrationDatabase::close):
1641         * workers/service/server/RegistrationDatabase.h:
1642         (WebCore::RegistrationDatabase::isClosed const): Deleted.
1643         * workers/service/server/RegistrationStore.cpp:
1644         (WebCore::RegistrationStore::closeDatabase):
1645         * workers/service/server/RegistrationStore.cpp:
1646         (WebCore::RegistrationStore::pushChangesToDatabase):
1647         (WebCore::RegistrationStore::clearAll):
1648         (WebCore::RegistrationStore::startSuspension):
1649         (WebCore::RegistrationStore::endSuspension):
1650         * workers/service/server/RegistrationStore.h:
1651         * workers/service/server/SWServer.cpp:
1652         (WebCore::SWServer::startSuspension):
1653         (WebCore::SWServer::endSuspension):
1654         * workers/service/server/SWServer.h:
1655
1656 2019-04-09  Justin Fan  <justin_fan@apple.com>
1657
1658         [Web GPU] GPURenderPassEncoder updates: setBlendColor, setViewport, setScissorRect
1659         https://bugs.webkit.org/show_bug.cgi?id=196719
1660
1661         Reviewed by Myles C. Maxfield.
1662
1663         Implement setBlendColor, setViewport, and setScissorRect for GPURenderPassEncoder.
1664
1665         Tests: webgpu/viewport-scissor-rect-triangle-strip.html, webgpu/blend-color-triangle-strip.html
1666
1667         * Modules/webgpu/WebGPURenderPassEncoder.cpp:
1668         (WebCore::WebGPURenderPassEncoder::setBlendColor):
1669         (WebCore::WebGPURenderPassEncoder::setViewport):
1670         (WebCore::WebGPURenderPassEncoder::setScissorRect):
1671         * Modules/webgpu/WebGPURenderPassEncoder.h:
1672         * Modules/webgpu/WebGPURenderPassEncoder.idl:
1673         * platform/graphics/gpu/GPURenderPassEncoder.h:
1674         * platform/graphics/gpu/cocoa/GPURenderPassEncoderMetal.mm:
1675         (WebCore::GPURenderPassEncoder::setBlendColor):
1676         (WebCore::GPURenderPassEncoder::setViewport):
1677         (WebCore::GPURenderPassEncoder::setScissorRect):
1678
1679 2019-04-09  Andy Estes  <aestes@apple.com>
1680
1681         [Apple Pay] Add release logging to PaymentCoordinator
1682         https://bugs.webkit.org/show_bug.cgi?id=196738
1683
1684         Reviewed by Alex Christensen.
1685
1686         When allowed, log interactions with PaymentCoordinator to os_log to help diagnose Apple Pay bugs.
1687
1688         The following information might be logged: names of functions called, merchant API versions,
1689         boolean results of canMakePayments(), boolean results of beginPaymentSession(), whether
1690         completePaymentSession() was called with a final state result, boolean results of
1691         shouldAllowApplePay(), whether a document has evaluated user agent scripts or is running
1692         user scripts, and whether a client supports unrestricted Apple Pay.
1693
1694         * Modules/applepay/PaymentCoordinator.cpp:
1695         (WebCore::PaymentCoordinator::supportsVersion const):
1696         (WebCore::PaymentCoordinator::canMakePayments):
1697         (WebCore::PaymentCoordinator::canMakePaymentsWithActiveCard):
1698         (WebCore::PaymentCoordinator::openPaymentSetup):
1699         (WebCore::PaymentCoordinator::beginPaymentSession):
1700         (WebCore::PaymentCoordinator::completeMerchantValidation):
1701         (WebCore::PaymentCoordinator::completeShippingMethodSelection):
1702         (WebCore::PaymentCoordinator::completeShippingContactSelection):
1703         (WebCore::PaymentCoordinator::completePaymentMethodSelection):
1704         (WebCore::PaymentCoordinator::completePaymentSession):
1705         (WebCore::PaymentCoordinator::abortPaymentSession):
1706         (WebCore::PaymentCoordinator::cancelPaymentSession):
1707         (WebCore::PaymentCoordinator::validateMerchant):
1708         (WebCore::PaymentCoordinator::didAuthorizePayment):
1709         (WebCore::PaymentCoordinator::didSelectPaymentMethod):
1710         (WebCore::PaymentCoordinator::didSelectShippingMethod):
1711         (WebCore::PaymentCoordinator::didSelectShippingContact):
1712         (WebCore::PaymentCoordinator::didCancelPaymentSession):
1713         (WebCore::PaymentCoordinator::shouldAllowApplePay const):
1714         (WebCore::PaymentCoordinator::shouldAllowUserAgentScripts const):
1715         * Modules/applepay/PaymentCoordinatorClient.h:
1716         (WebCore::PaymentCoordinatorClient::isAlwaysOnLoggingAllowed const):
1717         * platform/Logging.h:
1718         * testing/MockPaymentCoordinator.h:
1719
1720 2019-04-09  John Wilander  <wilander@apple.com>
1721
1722         Pick up Ad Click Attribution conversions in NetworkResourceLoader::willSendRedirectedRequest()
1723         https://bugs.webkit.org/show_bug.cgi?id=196558
1724         <rdar://problem/47650245>
1725
1726         Reviewed by Youenn Fablet.
1727
1728         Tests: http/tests/adClickAttribution/attribution-conversion-through-cross-site-image-redirect.html
1729                http/tests/adClickAttribution/attribution-conversion-through-image-redirect-with-priority.html
1730                http/tests/adClickAttribution/attribution-conversion-through-image-redirect-without-priority.html
1731
1732         The existing API tests were expanded too.
1733
1734         * html/HTMLAnchorElement.cpp:
1735         (WebCore::HTMLAnchorElement::parseAdClickAttribution const):
1736            Enhanced the use of AdClickAttribution::MaxEntropy.
1737         * loader/AdClickAttribution.cpp:
1738         (WebCore::AdClickAttribution::parseConversionRequest):
1739             New function to parse and validate URLs with a path starting with
1740             /.well-known/ad-click-attribution/.
1741         (WebCore::AdClickAttribution::toString const):
1742             Added output for the conversion priority for testing purposes.
1743         * loader/AdClickAttribution.h:
1744         (WebCore::AdClickAttribution::Campaign::isValid const):
1745         (WebCore::AdClickAttribution::Conversion::isValid const):
1746            Enhanced the use of AdClickAttribution::MaxEntropy.
1747
1748 2019-04-09  Don Olmstead  <don.olmstead@sony.com>
1749
1750         [CMake] Apple builds should use ICU_INCLUDE_DIRS
1751         https://bugs.webkit.org/show_bug.cgi?id=196720
1752
1753         Reviewed by Konstantin Tokarev.
1754
1755         * PlatformMac.cmake:
1756
1757 2019-04-09  Jer Noble  <jer.noble@apple.com>
1758
1759         Test for: 196095 Inband Text Track cues interspersed with Data cues can display out of order.
1760         https://bugs.webkit.org/show_bug.cgi?id=196097
1761
1762         Reviewed by Eric Carlson.
1763
1764         Test: media/track/track-in-band-metadata-display-order.html
1765
1766         Add a method in Internals to create a TextTrackCueGeneric (which can normally only be created
1767         by parsing an in-band media track). This requires adding IDL for TextTrackCueGeneric, and exporting
1768         TextTrackCueGeneric for testing.
1769
1770         Drive-by fixes:
1771
1772         Add runtime logging to MediaControlTextTrackContainerElement. This necessitates modifying the
1773         parentMediaElement() method to take a const Node*, and const_cast that constness away in order to return
1774         a HTMLMediaElement*
1775
1776         TextTrackCue, VTTCue, TextTrackCueGeneric, and DataCue should all use the WTF TypeCasts macros to
1777         enable use of is<> and downcast<>.
1778
1779         * Source/WebCore/CMakeLists.txt:
1780         * DerivedSources-input.xcfilelist:
1781         * DerivedSources-output.xcfilelist:
1782         * DerivedSources.make:
1783         * WebCore.xcodeproj/project.pbxproj:
1784         * Sources.txt:
1785         * html/shadow/MediaControlElementTypes.cpp:
1786         (WebCore::parentMediaElement):
1787         * html/shadow/MediaControlElementTypes.h:
1788         * html/shadow/MediaControlElements.cpp:
1789         (WebCore::MediaControlTextTrackContainerElement::updateDisplay):
1790         (WebCore::MediaControlTextTrackContainerElement::logger const):
1791         (WebCore::MediaControlTextTrackContainerElement::logIdentifier const):
1792         (WebCore::MediaControlTextTrackContainerElement::logChannel const):
1793         * html/shadow/MediaControlElements.h:
1794         * html/track/DataCue.h:
1795         (isType):
1796         * html/track/TextTrackCueGeneric.h:
1797         (isType):
1798         * html/track/TextTrackCueGeneric.idl: Added.
1799         * html/track/VTTCue.h:
1800         (isType):
1801         * testing/Internals.cpp:
1802         (WebCore::Internals::createGenericCue):
1803         * testing/Internals.h:
1804         * testing/Internals.idl:
1805
1806 2019-04-09  Sihui Liu  <sihui_liu@apple.com>
1807
1808         Remove unnecessary network process assertion for IDB close
1809         https://bugs.webkit.org/show_bug.cgi?id=196693
1810
1811         Reviewed by Geoffrey Garen.
1812
1813         We already took assertion at WebCore::SQLiteDatabase::close.
1814
1815         * Modules/indexeddb/server/IDBServer.cpp:
1816         (WebCore::IDBServer::IDBServer::create):
1817         (WebCore::IDBServer::IDBServer::IDBServer):
1818         (WebCore::IDBServer::m_quotaManagerGetter): Deleted.
1819         (WebCore::IDBServer::IDBServer::closeDatabase): Deleted.
1820         (WebCore::IDBServer::IDBServer::didCloseDatabase): Deleted.
1821         * Modules/indexeddb/server/IDBServer.h:
1822         (WebCore::IDBServer::IDBServer::create): Deleted.
1823         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
1824         (WebCore::IDBServer::UniqueIDBDatabase::performCurrentDeleteOperation):
1825         (WebCore::IDBServer::UniqueIDBDatabase::scheduleShutdownForClose):
1826         (WebCore::IDBServer::UniqueIDBDatabase::didShutdownForClose):
1827         (WebCore::IDBServer::UniqueIDBDatabase::didDeleteBackingStore):
1828         (WebCore::IDBServer::UniqueIDBDatabase::immediateCloseForUserDelete):
1829         (WebCore::IDBServer::UniqueIDBDatabase::notifyServerAboutClose): Deleted.
1830         * Modules/indexeddb/server/UniqueIDBDatabase.h:
1831
1832 2019-04-09  Eike Rathke  <erack@redhat.com>
1833
1834         Initialize trackTypeAsString for call to GST_INFO_OBJECT() in TrackType::Text
1835         https://bugs.webkit.org/show_bug.cgi?id=196350
1836
1837         Reviewed by Xabier Rodriguez-Calvar.
1838
1839         trackTypeAsString was uninitialized in the
1840         TrackPrivateBaseGStreamer::TrackType::Text case when calling
1841         GST_INFO_OBJECT().
1842
1843         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1844         (WebCore::MediaPlayerPrivateGStreamer::enableTrack):
1845
1846 2019-04-09  Carlos Garcia Campos  <cgarcia@igalia.com>
1847
1848         [ATK] Cleanup WebKitAccessibleHyperlink
1849         https://bugs.webkit.org/show_bug.cgi?id=196602
1850
1851         Reviewed by Michael Catanzaro.
1852
1853         Cleanups:
1854
1855          - Rename webkitAccessibleHyperlinkNew() as webkitAccessibleHyperlinkGetOrCreate() and move the code to get/set
1856            the object data here.
1857          - Use WEBKIT_DEFINE_TYPE instead of custom type registration. This ensures that all CStrings used in private
1858            struct are no longer leaked.
1859          - Remove all confusing core() functions and simply use webkitAccessibleGetAccessibilityObject().
1860          - Use nullptr instead of 0 and other coding style issues.
1861
1862         * accessibility/atk/WebKitAccessibleHyperlink.cpp:
1863         (webkitAccessibleHyperlinkActionDoAction):
1864         (webkitAccessibleHyperlinkActionGetNActions):
1865         (webkitAccessibleHyperlinkActionGetDescription):
1866         (webkitAccessibleHyperlinkActionGetKeybinding):
1867         (webkitAccessibleHyperlinkActionGetName):
1868         (atk_action_interface_init):
1869         (webkitAccessibleHyperlinkGetURI):
1870         (webkitAccessibleHyperlinkGetObject):
1871         (rangeLengthForObject):
1872         (webkitAccessibleHyperlinkGetStartIndex):
1873         (webkitAccessibleHyperlinkGetEndIndex):
1874         (webkitAccessibleHyperlinkIsValid):
1875         (webkitAccessibleHyperlinkGetNAnchors):
1876         (webkitAccessibleHyperlinkIsSelectedLink):
1877         (webkitAccessibleHyperlinkGetProperty):
1878         (webkitAccessibleHyperlinkSetProperty):
1879         (webkit_accessible_hyperlink_class_init):
1880         (webkitAccessibleHyperlinkGetOrCreate):
1881         (core): Deleted.
1882         (atkActionInterfaceInit): Deleted.
1883         (getRangeLengthForObject): Deleted.
1884         (webkitAccessibleHyperlinkFinalize): Deleted.
1885         (webkitAccessibleHyperlinkClassInit): Deleted.
1886         (webkitAccessibleHyperlinkInit): Deleted.
1887         (webkitAccessibleHyperlinkGetType): Deleted.
1888         (webkitAccessibleHyperlinkNew): Deleted.
1889         (webkitAccessibleHyperlinkGetAccessibilityObject): Deleted.
1890         * accessibility/atk/WebKitAccessibleHyperlink.h:
1891         * accessibility/atk/WebKitAccessibleInterfaceHyperlinkImpl.cpp:
1892         (webkitAccessibleHyperlinkImplGetHyperlink):
1893         (webkitAccessibleHyperlinkImplInterfaceInit):
1894
1895 2019-04-08  Simon Fraser  <simon.fraser@apple.com>
1896
1897         Remove some iOS #ifdefs around sticky-related code
1898         https://bugs.webkit.org/show_bug.cgi?id=196726
1899
1900         Reviewed by Zalan Bujtas.
1901
1902         Now that async overflow scrolling can be enabled on macOS, RenderLayerCompositor::isAsyncScrollableStickyLayer()
1903         should not have iOS-only code.
1904
1905         The answer to the FIXME in RenderLayerCompositor::computeStickyViewportConstraints is obvious: composited
1906         overflow:scroll can be the container for sticky. The assertion can be removed.
1907
1908         * rendering/RenderLayer.cpp: Fix spacing in some logging.
1909         (WebCore::outputPaintOrderTreeRecursive):
1910         * rendering/RenderLayerCompositor.cpp:
1911         (WebCore::RenderLayerCompositor::isAsyncScrollableStickyLayer const):
1912         (WebCore::RenderLayerCompositor::computeStickyViewportConstraints const):
1913
1914 2019-04-08  Don Olmstead  <don.olmstead@sony.com>
1915
1916         [CMake][WinCairo] Separate copied headers into different directories
1917         https://bugs.webkit.org/show_bug.cgi?id=196655
1918
1919         Reviewed by Michael Catanzaro.
1920
1921         * CMakeLists.txt:
1922         * PlatformWin.cmake:
1923
1924 2019-04-08  Chris Fleizach  <cfleizach@apple.com>
1925
1926         AX: Automatically compute accessibility labels for Apple Pay buttons
1927         https://bugs.webkit.org/show_bug.cgi?id=196661
1928
1929         Reviewed by Joanmarie Diggs.
1930
1931         Detect Apple Pay buttons and return a standard role and label for them based on their type.
1932
1933         Test: accessibility/mac/apple-pay-labels.html
1934               accessibility/mac/apple-pay-session-v4.html
1935
1936         * accessibility/AccessibilityNodeObject.cpp:
1937         (WebCore::AccessibilityNodeObject::isControl const):
1938         * accessibility/AccessibilityNodeObject.h:
1939         * accessibility/AccessibilityRenderObject.cpp:
1940         (WebCore::AccessibilityRenderObject::applePayButtonDescription const):
1941         (WebCore::AccessibilityRenderObject::titleElementText const):
1942         (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
1943         (WebCore::AccessibilityRenderObject::isApplePayButton const):
1944         (WebCore::AccessibilityRenderObject::applePayButtonType const):
1945         * accessibility/AccessibilityRenderObject.h:
1946         * en.lproj/Localizable.strings:
1947         * platform/LocalizedStrings.cpp:
1948         (WebCore::AXApplePayPlainLabel):
1949         (WebCore::AXApplePayBuyLabel):
1950         (WebCore::AXApplePaySetupLabel):
1951         (WebCore::AXApplePayDonateLabel):
1952         (WebCore::AXApplePayCheckOutLabel):
1953         (WebCore::AXApplePayBookLabel):
1954         (WebCore::AXApplePaySubscribeLabel):
1955         * platform/LocalizedStrings.h:
1956
1957 2019-04-08  Chris Fleizach  <cfleizach@apple.com>
1958
1959         AX: Support API: accessibilityReplaceRange:withText
1960         https://bugs.webkit.org/show_bug.cgi?id=196636
1961
1962         Reviewed by Daniel Bates.
1963
1964         Support this platform API on mac to provide a way to replace a range of editable text.
1965
1966         Test: accessibility/mac/replace-text-with-range.html
1967
1968         * accessibility/AccessibilityObject.cpp:
1969         (WebCore::AccessibilityObject::replaceTextInRange):
1970         * accessibility/AccessibilityObject.h:
1971         * accessibility/mac/AccessibilityObjectBase.mm:
1972         (WebCore::PlainTextRange::PlainTextRange):
1973         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
1974         (-[WebAccessibilityObjectWrapper accessibilityReplaceRange:withText:]):
1975
1976 2019-04-08  Wenson Hsieh  <wenson_hsieh@apple.com>
1977
1978         [iOS] Do not allow starting selection drags when selection views are not visible
1979         https://bugs.webkit.org/show_bug.cgi?id=196686
1980         <rdar://problem/49399192>
1981
1982         Reviewed by Tim Horton.
1983
1984         See WebKit ChangeLog for more details.
1985
1986         Tests:  DragAndDropTests.CanDragImageWhenNotFirstResponder
1987                 DragAndDropTests.DoNotPerformSelectionDragWhenNotFirstResponder
1988
1989         * page/DragController.cpp:
1990         (WebCore::DragController::draggableElement const):
1991
1992         Make this respect the case where m_dragSourceAction does not include DragSourceActionSelection. All the other
1993         drag source types are currently consulted in this method, with the exception of DragSourceActionSelection.
1994
1995 2019-04-08  Youenn Fablet  <youenn@apple.com>
1996
1997         Add a test to check for the service worker process name
1998         https://bugs.webkit.org/show_bug.cgi?id=196621
1999
2000         Reviewed by Chris Dumez.
2001
2002         Add a service worker internal API to get process name.
2003         Covered by updated test.
2004
2005         * WebCore.xcodeproj/project.pbxproj:
2006         * testing/ServiceWorkerInternals.cpp:
2007         (WebCore::ServiceWorkerInternals::processName const):
2008         * testing/ServiceWorkerInternals.h:
2009         * testing/ServiceWorkerInternals.idl:
2010         * testing/ServiceWorkerInternals.mm: Added.
2011
2012 2019-04-08  Yusuke Suzuki  <ysuzuki@apple.com>
2013
2014         Unreviewed, speculative fix for build failure in old macOS after r243887
2015         https://bugs.webkit.org/show_bug.cgi?id=196475
2016
2017         * dom/NodeList.h:
2018
2019 2019-04-08  Justin Fan  <justin_fan@apple.com>
2020
2021         [Web GPU] Fix Web GPU experimental feature on iOS
2022         https://bugs.webkit.org/show_bug.cgi?id=196632
2023
2024         Reviewed by Myles C. Maxfield.
2025
2026         Add feature conditionals for iOS 11.
2027         Properly make Web GPU available on iOS 11+.
2028
2029         * Configurations/FeatureDefines.xcconfig:
2030         * Configurations/WebKitTargetConditionals.xcconfig:
2031
2032 2019-04-08  Timothy Hatcher  <timothy@apple.com>
2033
2034         Unreviewed build fix for iOSMac after r243893.
2035         https://bugs.webkit.org/show_bug.cgi?id=196707
2036
2037         * dom/Element.cpp:
2038         (WebCore::parentCrossingFrameBoundaries): Remove ENABLE(POINTER_EVENTS) since computedTouchActions()
2039         no longer uses parentCrossingFrameBoundaries().
2040
2041 2019-04-08  Youenn Fablet  <youenn@apple.com>
2042
2043         Lazily construct Navigator serviceWorker
2044         https://bugs.webkit.org/show_bug.cgi?id=196692
2045
2046         Reviewed by Chris Dumez.
2047
2048         Make NavigatorBase a ContextDestructionObserver.
2049         This allows to get the navigator script execution context.
2050         Use it when creating the navigator ServiceWorkerContainer object.
2051         For GC, introduce serviceWorkerIfAny which returns the container if created.
2052         No JS observable change of behavior.
2053         Covered by existing tests.
2054
2055         * bindings/js/JSNavigatorCustom.cpp:
2056         (WebCore::JSNavigator::visitAdditionalChildren):
2057         * bindings/js/JSWorkerNavigatorCustom.cpp:
2058         (WebCore::JSWorkerNavigator::visitAdditionalChildren):
2059         * page/NavigatorBase.cpp:
2060         (WebCore::NavigatorBase::NavigatorBase):
2061         (WebCore::NavigatorBase::serviceWorkerIfAny):
2062         (WebCore::NavigatorBase::serviceWorker):
2063         * page/NavigatorBase.h:
2064
2065 2019-04-08  Antti Koivisto  <antti@apple.com>
2066
2067         Update touch-action region on property changes
2068         https://bugs.webkit.org/show_bug.cgi?id=196608
2069
2070         Reviewed by Simon Fraser.
2071
2072         Test: pointerevents/ios/touch-action-region-dynamic.html
2073
2074         * rendering/EventRegion.cpp:
2075         (WebCore::EventRegion::touchActionsForPoint const):
2076
2077         Correctly return 'auto' when nothing is found from the regions (this code is not used yet).
2078
2079         * rendering/RenderElement.cpp:
2080         (WebCore::RenderElement::styleWillChange):
2081
2082         React to 'touch-action' property changes, similarly to 'pointer-events'.
2083
2084         * rendering/RenderLayer.cpp:
2085         (WebCore::RenderLayer::invalidateEventRegion):
2086
2087         Test if need to invalidate.
2088
2089         * rendering/RenderLayerBacking.cpp:
2090         (WebCore::RenderLayerBacking::setContentsNeedDisplay):
2091         (WebCore::RenderLayerBacking::setContentsNeedDisplayInRect):
2092
2093         Call invalidateEventRegion explicitly instead of relying on compositing update. This ensures
2094         that we update the top level event region correctly when we have touch-actions.
2095
2096 2019-04-08  Javier Fernandez  <jfernandez@igalia.com>
2097
2098         Implement white-space:break-spaces value
2099         https://bugs.webkit.org/show_bug.cgi?id=177327
2100
2101         Reviewed by Myles Maxfield and Zalan Bujtas.
2102
2103         Finally the CSS WG decided [1] to move back the 'break-spaces' value to
2104         the 'white-space' property. This makes the parsing logic easier than
2105         the previous approach of using the 'overflow-wrap' property.
2106
2107         This new value prevents the white-space sequence to collapse and gives
2108         breaking opportunities after every preserved white-space.
2109
2110         https://drafts.csswg.org/css-text-3/#valdef-white-space-break-spaces
2111
2112         Additionally, unlike 'pre-wrap', non-collapsible spaces or tabs at the
2113         end of a line cannot be hung or visually collapsed, since we want them
2114         to be preserved and broken.
2115
2116         [1] https://github.com/w3c/csswg-drafts/pull/2841
2117
2118         Tests: imported/w3c/web-platform-tests/css/css-text/overflow-wrap/overflow-wrap-break-word-008.html
2119                imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-003.html
2120                imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-009.html
2121
2122         * css/CSSPrimitiveValueMappings.h:
2123         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): New mapping for CSSVaueBreakSpaces.
2124         (WebCore::CSSPrimitiveValue::operator WhiteSpace const): New value BreakSpaces for the Whitespace enum.
2125         * css/CSSProperties.json: new 'break-spaces' value for the 'white-space' property.
2126         * css/CSSValueKeywords.in: new break-spaces keyword
2127         * css/parser/CSSParserFastPaths.cpp:
2128         (WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
2129         * rendering/SimpleLineLayout.cpp:  The SimpleLineLayut codepath must handle properly the new behavior of preserved whitespaces.
2130         (WebCore::SimpleLineLayout::LineState::hasTrailingWhitespace const): Require that m_trailingWhitespaceWidth being greater than zero.
2131         (WebCore::SimpleLineLayout::LineState::hasWhitespaceFragments const): New function to detect former whitespae fragments that could be breaking opportunities.
2132         (WebCore::SimpleLineLayout::removeTrailingWhitespace): The 'break-spaces' feature forbids to remove any trailing whitespace.
2133         (WebCore::SimpleLineLayout::firstFragment): We have now leading whitespace sequences comming from the previous line.
2134         (WebCore::SimpleLineLayout::createLineRuns): We should revert some breaking opportunities if others were formerly found in the line.
2135         * rendering/SimpleLineLayoutTextFragmentIterator.cpp:
2136         (WebCore::SimpleLineLayout::TextFragmentIterator::Style::Style): New style fields to determine whether the break-space feature is being used. Also split out the break-all and breal-all values.
2137         * rendering/SimpleLineLayoutTextFragmentIterator.h:
2138         * rendering/line/BreakingContext.h: Different codepath but similar changes to properly handle the new behavior of preserved whitespace.
2139         (WebCore::BreakingContext::BreakingContext): New class field to determine whether there are some whitespace that may prevent the word ot be broken.
2140         (WebCore::BreakingContext::handleText): New line-breaking logic to implement the break-spaces behavior.
2141         (WebCore::BreakingContext::trailingSpacesHang): Cases where the preserved breakspaces should hand or overflow.
2142         * rendering/style/RenderStyle.h:
2143         (WebCore::RenderStyle::collapseWhiteSpace): With break-spaces collapsing whitespaces is not allowed.
2144         (WebCore::RenderStyle::breakOnlyAfterWhiteSpace const): Add the WhiteSpace::BreakSpaces to this group.
2145         * rendering/style/RenderStyleConstants.h: A new constan added.
2146
2147 2019-04-08  Youenn Fablet  <youenn@apple.com>
2148
2149         LibWebRTCMediaEndpoint does not need to hop to the signaling thread to gather stats
2150         https://bugs.webkit.org/show_bug.cgi?id=196697
2151         <rdar://problem/47477113>
2152
2153         Reviewed by Eric Carlson.
2154
2155         It is not thread safe to use m_backend in another thread than the main thread.
2156         It is not useful anymore to hop to the signaling thread to gather stats.
2157         No change of behavior.
2158
2159         * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:
2160         (WebCore::LibWebRTCMediaEndpoint::getStats):
2161         (WebCore::LibWebRTCMediaEndpoint::gatherStatsForLogging):
2162
2163 2019-04-08  Antoine Quint  <graouts@apple.com>
2164
2165         [ Mac WK2 iOS Debug ] REGRESSION(r233667) Layout Test imported/w3c/web-platform-tests/web-animations/interfaces/DocumentTimeline/constructor.html is a flaky failure
2166         https://bugs.webkit.org/show_bug.cgi?id=195233
2167         <rdar://problem/48527231>
2168
2169         Reviewed by Dean Jackson.
2170
2171         We need to create the "main" document timeline (document.timeline) if it doesn't already exist and use its current time as a basis for any other DocumentTimeline instance.
2172
2173         * animation/DocumentTimeline.cpp:
2174         (WebCore::DocumentTimeline::currentTime):
2175
2176 2019-04-08  Antoine Quint  <graouts@apple.com>
2177
2178         [Web Animations] JS wrapper may be deleted while animation is yet to dispatch its finish event
2179         https://bugs.webkit.org/show_bug.cgi?id=196118
2180         <rdar://problem/46614137>
2181
2182         Reviewed by Chris Dumez.
2183
2184         Test: webanimations/js-wrapper-kept-alive.html
2185
2186         We need to teach WebAnimation to keep its JS wrapper alive if it's relevant or could become relevant again by virtue of having a timeline.
2187         We also need to ensure that the new implementation of hasPendingActivity() does not interfere with the ability of pages to enter the page
2188         cache when running animations.
2189
2190         * animation/WebAnimation.cpp:
2191         (WebCore::WebAnimation::canSuspendForDocumentSuspension const):
2192         (WebCore::WebAnimation::stop):
2193         (WebCore::WebAnimation::hasPendingActivity const):
2194         * animation/WebAnimation.h:
2195
2196 2019-04-08  Eric Liang  <ericliang@apple.com>
2197
2198         AX: <svg> elements with labels and no accessible contents are exposed as empty AXGroups
2199         https://bugs.webkit.org/show_bug.cgi?id=156774
2200
2201         Reviewed by Chris Fleizach.
2202
2203         Labelled SVGs without accessible descendants are exposed as AXImage rather than groups.
2204
2205         Unlabelled equivalents are not exposed. Otherwise, SVGs with accessible descendants are exposed as AXGroup. 
2206         Also added back functionalities from last patch of determining whether a SVG element should be ignored.
2207         
2208         Test: accessibility/svg-shape-labelled.html
2209
2210         * accessibility/AccessibilityRenderObject.cpp:
2211         (WebCore::AccessibilityRenderObject::updateRoleAfterChildrenCreation):
2212         * accessibility/AccessibilitySVGElement.cpp:
2213         (WebCore::AccessibilitySVGElement::computeAccessibilityIsIgnored const):
2214
2215 2019-04-08  Youenn Fablet  <youenn@apple.com>
2216
2217         Make sure UniqueIDBDatabaseConnection unregisters itself even if its database is gone
2218         https://bugs.webkit.org/show_bug.cgi?id=196651
2219
2220         Reviewed by Brady Eidson.
2221
2222         In UniqueIDBDatabase methods, many operations are refing the transaction
2223         so that it stays alive until a quota check decision is made.
2224         This extends the lifetime of the transaction which may be lasting
2225         longer than its database that may be cleared without waiting for the quota check decisions.
2226
2227         We therefore need to make sure that the transaction is cleaning itself correctly at destruction time.
2228
2229         Make sure that the transaction is unregistering itself from its IDBServer.
2230         To do so, the transaction keeps a weak ref to the IDBServer.
2231
2232         This is timing sensitive hence difficult to test.
2233
2234         * Modules/indexeddb/server/IDBServer.h:
2235         * Modules/indexeddb/server/UniqueIDBDatabaseConnection.cpp:
2236         (WebCore::IDBServer::UniqueIDBDatabaseConnection::didAbortTransaction):
2237         Like done below for UniqueIDBDatabaseConnection::didCommitTransaction,
2238         add a check to ensure that either the database is we are in an error case.
2239         * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp:
2240         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::UniqueIDBDatabaseTransaction):
2241         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::~UniqueIDBDatabaseTransaction):
2242         * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.h:
2243
2244 2019-04-08  Christopher Reid  <chris.reid@sony.com>
2245
2246         Undefined Behavior: m_experimentalImageMenuEnabled isn't initialized in HTMLImageElement when SERVICE_CONTROLS is disabled
2247         https://bugs.webkit.org/show_bug.cgi?id=196664
2248
2249         Reviewed by Ross Kirsling.
2250
2251         No observable change in behavior.
2252
2253         Initialize m_experimentalImageMenuEnabled regardless of ENABLE(SERVICE_CONTROLS)
2254
2255         * html/HTMLImageElement.cpp:
2256
2257 2019-04-08  Ryan Haddad  <ryanhaddad@apple.com>
2258
2259         Unreviewed, rolling out r243943.
2260
2261         Caused test262 failures.
2262
2263         Reverted changeset:
2264
2265         "[JSC] Filter DontEnum properties in
2266         ProxyObject::getOwnPropertyNames()"
2267         https://bugs.webkit.org/show_bug.cgi?id=176810
2268         https://trac.webkit.org/changeset/243943
2269
2270 2019-04-05  Sergio Villar Senin  <svillar@igalia.com>
2271
2272         [GTK][WPE] outlook.live.com displays old-fashioned UI
2273         https://bugs.webkit.org/show_bug.cgi?id=196642
2274
2275         Reviewed by Carlos Garcia Campos.
2276
2277         The new good looking UI is shown as long as pretend we're a Mac in the UA.
2278
2279         * platform/UserAgentQuirks.cpp:
2280         (WebCore::urlRequiresChromeBrowser):
2281
2282 2019-04-08  Carlos Garcia Campos  <cgarcia@igalia.com>
2283
2284         [ATK] Cleanup accessible wrapper base class
2285         https://bugs.webkit.org/show_bug.cgi?id=196601
2286
2287         Reviewed by Mario Sanchez Prada.
2288
2289         Cleanups:
2290
2291          - Rename WebKitAccessibleWrapperAtk cpp and header as WebKitAccessible for consistency with the class name.
2292          - Use WEBKIT_DEFINE_TYPE instead of custom type registration. This ensures that all CStrings used in private
2293            struct are no longer leaked.
2294          - Move core object pointer to the private struct.
2295          - Remove confusing core() function and simply get the core object from the private struct.
2296          - Use nullptr instead of 0 and other coding style issues.
2297          - Rename cacheAndReturnAtkProperty as webkitAccessibleCacheAndReturnAtkProperty and use WebKitAccessible as
2298            instance parameter.
2299          - Make webkitAccessibleGetAccessibilityObject() return a reference, since we use a fallback object on detach it
2300            never returns nullptr.
2301          - Move objectFocusedAndCaretOffsetUnignored() to WebKitAccessibleUtil.
2302
2303         * SourcesGTK.txt:
2304         * accessibility/atk/AXObjectCacheAtk.cpp:
2305         * accessibility/atk/WebKitAccessible.cpp: Renamed from Source/WebCore/accessibility/atk/WebKitAccessibleWrapperAtk.cpp.
2306         (webkitAccessibleGetName):
2307         (webkitAccessibleGetDescription):
2308         (setAtkRelationSetFromCoreObject):
2309         (isRootObject):
2310         (webkitAccessibleGetParent):
2311         (webkitAccessibleGetNChildren):
2312         (webkitAccessibleRefChild):
2313         (webkitAccessibleGetIndexInParent):
2314         (webkitAccessibleGetAttributes):
2315         (atkRole):
2316         (webkitAccessibleGetRole):
2317         (webkitAccessibleRefStateSet):
2318         (webkitAccessibleRefRelationSet):
2319         (webkitAccessibleInit):
2320         (webkitAccessibleGetObjectLocale):
2321         (webkit_accessible_class_init):
2322         (interfaceMaskFromObject):
2323         (uniqueAccessibilityTypeName):
2324         (accessibilityTypeFromObject):
2325         (webkitAccessibleNew):
2326         (webkitAccessibleGetAccessibilityObject):
2327         (webkitAccessibleDetach):
2328         (webkitAccessibleIsDetached):
2329         (webkitAccessibleCacheAndReturnAtkProperty):
2330         * accessibility/atk/WebKitAccessible.h: Renamed from Source/WebCore/accessibility/atk/WebKitAccessibleWrapperAtk.h.
2331         * accessibility/atk/WebKitAccessibleHyperlink.cpp:
2332         (core):
2333         * accessibility/atk/WebKitAccessibleInterfaceAction.cpp:
2334         (core):
2335         (webkitAccessibleActionGetKeybinding):
2336         (webkitAccessibleActionGetName):
2337         * accessibility/atk/WebKitAccessibleInterfaceComponent.cpp:
2338         (core):
2339         * accessibility/atk/WebKitAccessibleInterfaceDocument.cpp:
2340         (core):
2341         (documentAttributeValue):
2342         * accessibility/atk/WebKitAccessibleInterfaceEditableText.cpp:
2343         (core):
2344         * accessibility/atk/WebKitAccessibleInterfaceHypertext.cpp:
2345         (core):
2346         * accessibility/atk/WebKitAccessibleInterfaceImage.cpp:
2347         (core):
2348         (webkitAccessibleImageGetImageDescription):
2349         * accessibility/atk/WebKitAccessibleInterfaceSelection.cpp:
2350         (core):
2351         * accessibility/atk/WebKitAccessibleInterfaceTable.cpp:
2352         (core):
2353         * accessibility/atk/WebKitAccessibleInterfaceTableCell.cpp:
2354         (core):
2355         * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
2356         (core):
2357         * accessibility/atk/WebKitAccessibleInterfaceValue.cpp:
2358         (core):
2359         * accessibility/atk/WebKitAccessibleUtil.cpp:
2360         (objectFocusedAndCaretOffsetUnignored):
2361         * accessibility/atk/WebKitAccessibleUtil.h:
2362         * editing/atk/FrameSelectionAtk.cpp:
2363
2364 2019-04-06  Antti Koivisto  <antti@apple.com>
2365
2366         Combine event and touch action regions into a single class
2367         https://bugs.webkit.org/show_bug.cgi?id=196644
2368         <rdar://problem/49643614>
2369
2370         Reviewed by Darin Adler.
2371
2372         This patch replaces the existing TouchActionRegion class with the more general EventRegion class.
2373         It collects both the overall event region and the touch action regions. This avoids duplication
2374         and simplifies the code.
2375
2376         The patch also adds serialization support for EventRegion, so touch-action regions gets passed
2377         to the UI process too.
2378
2379         * Sources.txt:
2380         * WebCore.xcodeproj/project.pbxproj:
2381         * platform/graphics/GraphicsLayer.cpp:
2382         (WebCore::GraphicsLayer::setEventRegion):
2383         (WebCore::GraphicsLayer::dumpProperties const):
2384         (WebCore::GraphicsLayer::setTouchActionRegion): Deleted.
2385         * platform/graphics/GraphicsLayer.h:
2386         (WebCore::GraphicsLayer::eventRegion const):
2387         (WebCore::GraphicsLayer::touchActionRegion const): Deleted.
2388         * platform/graphics/Region.cpp:
2389         (WebCore::operator<<):
2390         * platform/graphics/ca/GraphicsLayerCA.cpp:
2391         (WebCore::GraphicsLayerCA::setEventRegion):
2392         (WebCore::GraphicsLayerCA::setTouchActionRegion): Deleted.
2393         * platform/graphics/ca/GraphicsLayerCA.h:
2394         * platform/graphics/ca/PlatformCALayer.h:
2395         * platform/graphics/ca/cocoa/PlatformCALayerCocoa.h:
2396         * rendering/EventRegion.cpp: Copied from Source/WebCore/rendering/TouchActionRegion.cpp.
2397         (WebCore::EventRegion::operator== const):
2398         (WebCore::EventRegion::unite):
2399         (WebCore::EventRegion::translate):
2400         (WebCore::EventRegion::uniteTouchActions):
2401         (WebCore::EventRegion::touchActionsForPoint const):
2402         (WebCore::operator<<):
2403         (WebCore::TouchActionRegion::unite): Deleted.
2404         (WebCore::TouchActionRegion::actionsForPoint const): Deleted.
2405         (WebCore::TouchActionRegion::translate): Deleted.
2406         * rendering/EventRegion.h: Copied from Source/WebCore/rendering/TouchActionRegion.h.
2407         (WebCore::EventRegion::isEmpty const):
2408         (WebCore::EventRegion::contains const):
2409         (WebCore::EventRegion::hasTouchActions const):
2410         (WebCore::EventRegion::encode const):
2411         (WebCore::EventRegion::decode):
2412         (WebCore::TouchActionRegion::isEmpty const): Deleted.
2413         (WebCore::TouchActionRegion::operator== const): Deleted.
2414         * rendering/InlineTextBox.cpp:
2415         (WebCore::InlineTextBox::paint):
2416         * rendering/PaintInfo.h:
2417         * rendering/RenderBlock.cpp:
2418         (WebCore::RenderBlock::paintObject):
2419         * rendering/RenderLayer.cpp:
2420         (WebCore::RenderLayer::collectEventRegionForFragments):
2421         * rendering/RenderLayer.h:
2422         * rendering/RenderLayerBacking.cpp:
2423         (WebCore::RenderLayerBacking::updateEventRegion):
2424         * rendering/RenderLayerModelObject.cpp:
2425         * rendering/SimpleLineLayoutFunctions.cpp:
2426         (WebCore::SimpleLineLayout::paintFlow):
2427         * rendering/TouchActionRegion.cpp: Removed.
2428         * rendering/TouchActionRegion.h: Removed.
2429
2430 2019-04-05  Yongjun Zhang  <yongjun_zhang@apple.com>
2431
2432         We should pass minimumEffectiveDeviceWidth to web process on new page creation.
2433         https://bugs.webkit.org/show_bug.cgi?id=196077
2434         <rdar://problem/49108202>
2435
2436         Reviewed by Chris Dumez.
2437
2438         If the page doesn't specify it requires to use the device width in viewport tag, we should try to scale down
2439         the page to fit the window width.
2440
2441         Test: fast/viewport/ios/shrink-to-fit-for-page-without-viewport-meta.html
2442
2443         * page/ViewportConfiguration.cpp:
2444         (WebCore::ViewportConfiguration::updateDefaultConfiguration): Also update the minimum layout size
2445             when the default configuration is changed.
2446         (WebCore::ViewportConfiguration::nativeWebpageParametersWithShrinkToFit): Make sure we fit the content
2447             to window width.
2448
2449 2019-04-05  Jer Noble  <jer.noble@apple.com>
2450
2451         [Cocoa] Deactivate the audio session before the WebProcess suspends.
2452         https://bugs.webkit.org/show_bug.cgi?id=196658
2453
2454         Reviewed by Eric Carlson.
2455
2456         Test: platform/mac/media/audio-session-deactivated-when-suspended.html
2457
2458         Deactivate the audio session when we are notified that the session will suspend.
2459
2460         Drive-by fix: don't try to begin playback when the process is suspended.
2461
2462         * platform/audio/PlatformMediaSessionManager.cpp:
2463         (WebCore::PlatformMediaSessionManager::sessionWillBeginPlayback):
2464         (WebCore::PlatformMediaSessionManager::processWillSuspend):
2465         (WebCore::PlatformMediaSessionManager::processDidResume):
2466         * platform/audio/PlatformMediaSessionManager.h:
2467         (WebCore::PlatformMediaSessionManager::processIsSuspended const):
2468         * testing/InternalSettings.cpp:
2469         (WebCore::InternalSettings::Backup::Backup):
2470         (WebCore::InternalSettings::Backup::restoreTo):
2471         (WebCore::InternalSettings::setShouldDeactivateAudioSession):
2472         * testing/InternalSettings.h:
2473         * testing/InternalSettings.idl:
2474         * testing/Internals.cpp:
2475         (WebCore::Internals::processWillSuspend):
2476         (WebCore::Internals::processDidResume):
2477         * testing/Internals.h:
2478         * testing/Internals.idl:
2479
2480 2019-04-05  Sihui Liu  <sihui_liu@apple.com>
2481
2482         [iOS] Web process gets suspended while holding locked database files
2483         https://bugs.webkit.org/show_bug.cgi?id=196519
2484         <rdar://problem/49531797>
2485
2486         Reviewed by Chris Dumez.
2487
2488         Don't use DatabaseTracker singleton before it is initialized.
2489
2490         * Modules/webdatabase/DatabaseTracker.cpp:
2491         (WebCore::DatabaseTracker::isInitialized):
2492         * Modules/webdatabase/DatabaseTracker.h:
2493
2494 2019-04-05  Ryosuke Niwa  <rniwa@webkit.org>
2495
2496         Make WeakPtr<Element> possible and deploy it in form associated elements code
2497         https://bugs.webkit.org/show_bug.cgi?id=196626
2498
2499         Reviewed by Antti Koivisto.
2500
2501         Make Element inherit from CanMakeWeakPtr and deploy WeakPtr<*Element> in FormAssociatedElement and HTMLFormElement.
2502
2503         No new tests sine there should be no behavioral change.
2504
2505         * dom/Element.h:
2506         * html/FormAssociatedElement.cpp:
2507         (WebCore::FormAssociatedElement::FormAssociatedElement):
2508         (WebCore::FormAssociatedElement::insertedIntoAncestor):
2509         (WebCore::FormAssociatedElement::setForm):
2510         (WebCore::FormAssociatedElement::resetFormOwner):
2511         (WebCore::FormAssociatedElement::formAttributeChanged):
2512         * html/FormAssociatedElement.h:
2513         (WebCore::FormAssociatedElement::form const):
2514         * html/HTMLElement.cpp:
2515         (WebCore::HTMLElement::asFormNamedItem):
2516         (WebCore::HTMLElement::asFormAssociatedElement):
2517         * html/HTMLElement.h:
2518         (WebCore::HTMLElement::asFormNamedItem): Deleted.
2519         * html/HTMLFormControlElement.h:
2520         * html/HTMLFormControlsCollection.cpp:
2521         (WebCore::HTMLFormControlsCollection::formImageElements const): Inlined into updateNamedElementCache.
2522         (WebCore::HTMLFormControlsCollection::updateNamedElementCache const):
2523         * html/HTMLFormControlsCollection.h:
2524         * html/HTMLFormElement.cpp:
2525         (WebCore::HTMLFormElement::registerInvalidAssociatedFormControl):
2526         (WebCore::HTMLFormElement::removeInvalidAssociatedFormControlIfNeeded):
2527         (WebCore::HTMLFormElement::registerImgElement):
2528         (WebCore::HTMLFormElement::defaultButton const):
2529         (WebCore::HTMLFormElement::resetDefaultButton):
2530         (WebCore::HTMLFormElement::matchesValidPseudoClass const):
2531         (WebCore::HTMLFormElement::matchesInvalidPseudoClass const):
2532         * html/HTMLFormElement.h:
2533         * html/HTMLImageElement.cpp:
2534         (WebCore::HTMLImageElement::HTMLImageElement):
2535         (WebCore::HTMLImageElement::insertedIntoAncestor):
2536         * html/HTMLImageElement.h:
2537         * html/HTMLInputElement.h:
2538         * html/HTMLMediaElement.h:
2539         * html/HTMLObjectElement.h:
2540         * html/HTMLPictureElement.h:
2541         * html/HTMLSlotElement.h:
2542         * svg/SVGElement.h:
2543
2544 2019-04-05  Caitlin Potter  <caitp@igalia.com>
2545
2546         [JSC] Filter DontEnum properties in ProxyObject::getOwnPropertyNames()
2547         https://bugs.webkit.org/show_bug.cgi?id=176810
2548
2549         Reviewed by Saam Barati.
2550
2551         Previously, there was a comment here indicating uncertainty of whether it
2552         was necessary to filter DontEnum properties explicitly or not. It turns
2553         out that it was necessary in the case of JSC ProxyObjects.
2554
2555         This patch adds DontEnum filtering for ProxyObjects, however we continue
2556         to explicitly filter them in JSDOMConvertRecord, which needs to use the
2557         property descriptor after filtering. This change prevents observably
2558         fetching the property descriptor twice per property.
2559
2560         * bindings/js/JSDOMConvertRecord.h:
2561
2562 2019-04-05  Michael Catanzaro  <mcatanzaro@igalia.com>
2563
2564         Unreviewed manual rollout of r243929
2565         https://bugs.webkit.org/show_bug.cgi?id=196626
2566
2567         * dom/Element.h:
2568         * html/FormAssociatedElement.cpp:
2569         (WebCore::FormAssociatedElement::FormAssociatedElement):
2570         (WebCore::FormAssociatedElement::insertedIntoAncestor):
2571         (WebCore::FormAssociatedElement::setForm):
2572         (WebCore::FormAssociatedElement::resetFormOwner):
2573         (WebCore::FormAssociatedElement::formAttributeChanged):
2574         * html/FormAssociatedElement.h:
2575         (WebCore::FormAssociatedElement::form const):
2576         * html/HTMLElement.cpp:
2577         (WebCore::HTMLElement::asFormNamedItem): Deleted.
2578         (WebCore::HTMLElement::asFormAssociatedElement): Deleted.
2579         * html/HTMLElement.h:
2580         (WebCore::HTMLElement::asFormNamedItem):
2581         * html/HTMLFormControlElement.h:
2582         * html/HTMLFormControlsCollection.cpp:
2583         (WebCore:: const):
2584         (WebCore::HTMLFormControlsCollection::updateNamedElementCache const):
2585         * html/HTMLFormControlsCollection.h:
2586         * html/HTMLFormElement.cpp:
2587         (WebCore::HTMLFormElement::registerInvalidAssociatedFormControl):
2588         (WebCore::HTMLFormElement::removeInvalidAssociatedFormControlIfNeeded):
2589         (WebCore::HTMLFormElement::registerImgElement):
2590         (WebCore::HTMLFormElement::defaultButton const):
2591         (WebCore::HTMLFormElement::resetDefaultButton):
2592         (WebCore::HTMLFormElement::matchesValidPseudoClass const):
2593         (WebCore::HTMLFormElement::matchesInvalidPseudoClass const):
2594         * html/HTMLFormElement.h:
2595         * html/HTMLImageElement.cpp:
2596         (WebCore::HTMLImageElement::HTMLImageElement):
2597         (WebCore::HTMLImageElement::insertedIntoAncestor):
2598         * html/HTMLImageElement.h:
2599         * html/HTMLInputElement.h:
2600         * html/HTMLMediaElement.h:
2601         * html/HTMLObjectElement.h:
2602         * html/HTMLPictureElement.h:
2603         * html/HTMLSlotElement.h:
2604         * svg/SVGElement.h:
2605
2606 2019-04-05  Sihui Liu  <sihui_liu@apple.com>
2607
2608         [iOS] Web process gets suspended while holding locked database files
2609         https://bugs.webkit.org/show_bug.cgi?id=196519
2610         <rdar://problem/49531797>
2611
2612         Reviewed by Chris Dumez.
2613
2614         We should close all databases and make sure not open new databases when web process is ready to suspend.
2615
2616         * platform/sql/SQLiteDatabase.cpp:
2617         (WebCore::SQLiteDatabase::setIsDatabaseOpeningForbidden):
2618         (WebCore::SQLiteDatabase::open):
2619         * platform/sql/SQLiteDatabase.h:
2620         * platform/sql/SQLiteDatabaseTracker.cpp:
2621         (WebCore::SQLiteDatabaseTracker::setClient):
2622         (WebCore::SQLiteDatabaseTracker::incrementTransactionInProgressCount):
2623         (WebCore::SQLiteDatabaseTracker::decrementTransactionInProgressCount):
2624         (WebCore::SQLiteDatabaseTracker::hasTransactionInProgress):
2625
2626 2019-04-05  Commit Queue  <commit-queue@webkit.org>
2627
2628         Unreviewed, rolling out r243833.
2629         https://bugs.webkit.org/show_bug.cgi?id=196645
2630
2631         This change breaks build of WPE and GTK ports (Requested by
2632         annulen on #webkit).
2633
2634         Reverted changeset:
2635
2636         "[CMake][WTF] Mirror XCode header directories"
2637         https://bugs.webkit.org/show_bug.cgi?id=191662
2638         https://trac.webkit.org/changeset/243833
2639
2640 2019-04-05  David Kilzer  <ddkilzer@apple.com>
2641
2642         REGRESSION(r243887): Try to fix Windows builds by including <wtf/IsoMalloc.h>
2643
2644         Caused by:
2645             [WebCore] Put most of derived classes of ScriptWrappable into IsoHeap
2646             https://bugs.webkit.org/show_bug.cgi?id=196475
2647
2648         * css/CSSComputedStyleDeclaration.h:
2649         * dom/DOMRectReadOnly.h:
2650         * dom/LiveNodeList.h:
2651         * dom/NodeIterator.h:
2652         * dom/TreeWalker.h:
2653         * fileapi/Blob.h:
2654         * fileapi/File.h:
2655         * fileapi/FileList.h:
2656         * html/CachedHTMLCollection.h:
2657         * html/HTMLFormElement.h:
2658         * html/HTMLNameCollection.h:
2659         * html/canvas/GPUBasedCanvasRenderingContext.h:
2660         * page/RemoteDOMWindow.h:
2661
2662 2019-04-05  Ryosuke Niwa  <rniwa@webkit.org>
2663
2664         Make WeakPtr<Element> possible and deploy it in form associated elements code
2665         https://bugs.webkit.org/show_bug.cgi?id=196626
2666
2667         Reviewed by Antti Koivisto.
2668
2669         Make Element inherit from CanMakeWeakPtr and deploy WeakPtr<*Element> in FormAssociatedElement and HTMLFormElement.
2670
2671         No new tests sine there should be no behavioral change.
2672
2673         * dom/Element.h:
2674         * html/FormAssociatedElement.cpp:
2675         (WebCore::FormAssociatedElement::FormAssociatedElement):
2676         (WebCore::FormAssociatedElement::insertedIntoAncestor):
2677         (WebCore::FormAssociatedElement::setForm):
2678         (WebCore::FormAssociatedElement::resetFormOwner):
2679         (WebCore::FormAssociatedElement::formAttributeChanged):
2680         * html/FormAssociatedElement.h:
2681         (WebCore::FormAssociatedElement::form const):
2682         * html/HTMLElement.cpp:
2683         (WebCore::HTMLElement::asFormNamedItem):
2684         (WebCore::HTMLElement::asFormAssociatedElement):
2685         * html/HTMLElement.h:
2686         (WebCore::HTMLElement::asFormNamedItem): Deleted.
2687         * html/HTMLFormControlElement.h:
2688         * html/HTMLFormControlsCollection.cpp:
2689         (WebCore::HTMLFormControlsCollection::formImageElements const): Inlined into updateNamedElementCache.
2690         (WebCore::HTMLFormControlsCollection::updateNamedElementCache const):
2691         * html/HTMLFormControlsCollection.h:
2692         * html/HTMLFormElement.cpp:
2693         (WebCore::HTMLFormElement::registerInvalidAssociatedFormControl):
2694         (WebCore::HTMLFormElement::removeInvalidAssociatedFormControlIfNeeded):
2695         (WebCore::HTMLFormElement::registerImgElement):
2696         (WebCore::HTMLFormElement::defaultButton const):
2697         (WebCore::HTMLFormElement::resetDefaultButton):
2698         (WebCore::HTMLFormElement::matchesValidPseudoClass const):
2699         (WebCore::HTMLFormElement::matchesInvalidPseudoClass const):
2700         * html/HTMLFormElement.h:
2701         * html/HTMLImageElement.cpp:
2702         (WebCore::HTMLImageElement::HTMLImageElement):
2703         (WebCore::HTMLImageElement::insertedIntoAncestor):
2704         * html/HTMLImageElement.h:
2705         * html/HTMLInputElement.h:
2706         * html/HTMLMediaElement.h:
2707         * html/HTMLObjectElement.h:
2708         * html/HTMLPictureElement.h:
2709         * html/HTMLSlotElement.h:
2710         * svg/SVGElement.h:
2711
2712 2019-04-05  Carlos Garcia Campos  <cgarcia@igalia.com>
2713
2714         [ATK] Use a smart pointer for AccessibilityObject wrapper and remove GTK specific code
2715         https://bugs.webkit.org/show_bug.cgi?id=196593
2716         <rdar://problem/49599153>
2717
2718         Reviewed by Michael Catanzaro.
2719
2720         We have specific code for GTK to get/set the wrapper only because we don't use smart pointers. Also use
2721         WebKitAccessible as AccessibilityObjectWrapper instead of generic AtkObject, to enforce wrappers to be
2722         WebKitAccessible instances. This requires a few casts to AtkObject.
2723
2724         * accessibility/AccessibilityObject.h:
2725         (WebCore::AccessibilityObject::setWrapper):
2726         * accessibility/AccessibilityObjectInterface.h:
2727         * accessibility/atk/AXObjectCacheAtk.cpp:
2728         (WebCore::AXObjectCache::detachWrapper):
2729         (WebCore::AXObjectCache::attachWrapper):
2730         (WebCore::notifyChildrenSelectionChange):
2731         (WebCore::AXObjectCache::postPlatformNotification):
2732         (WebCore::AXObjectCache::nodeTextChangePlatformNotification):
2733         (WebCore::AXObjectCache::frameLoadingEventPlatformNotification):
2734         (WebCore::AXObjectCache::platformHandleFocusedUIElementChanged):
2735         * accessibility/atk/AccessibilityObjectAtk.cpp:
2736         * accessibility/atk/WebKitAccessibleInterfaceComponent.cpp:
2737         (webkitAccessibleComponentRefAccessibleAtPoint):
2738         * accessibility/atk/WebKitAccessibleInterfaceHypertext.cpp:
2739         (webkitAccessibleHypertextGetLink):
2740         (webkitAccessibleHypertextGetNLinks):
2741         * accessibility/atk/WebKitAccessibleInterfaceSelection.cpp:
2742         (webkitAccessibleSelectionRefSelection):
2743         * accessibility/atk/WebKitAccessibleInterfaceTable.cpp:
2744         (webkitAccessibleTableRefAt):
2745         (webkitAccessibleTableGetColumnHeader):
2746         (webkitAccessibleTableGetRowHeader):
2747         (webkitAccessibleTableGetCaption):
2748         * accessibility/atk/WebKitAccessibleInterfaceTableCell.cpp:
2749         (convertToGPtrArray):
2750         (webkitAccessibleTableCellGetTable):
2751         * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
2752         (accessibilityObjectLength):
2753         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
2754         (setAtkRelationSetFromCoreObject):
2755         (atkParentOfRootObject):
2756         (webkitAccessibleGetParent):
2757         (webkitAccessibleRefChild):
2758         (isTextWithCaret):
2759         * editing/atk/FrameSelectionAtk.cpp:
2760         (WebCore::emitTextSelectionChange):
2761         (WebCore::maybeEmitTextFocusChange):
2762
2763 2019-04-04  Simon Fraser  <simon.fraser@apple.com>
2764
2765         [iOS WK2] REGRESSION (r242687): Programmatic scroll of overflow scroll results in bad rendering
2766         https://bugs.webkit.org/show_bug.cgi?id=195584
2767
2768         Reviewed by Zalan Bujtas.
2769
2770         Push data to the scrolling tree about whether an overflow:scroll scroll was programmatic, by having
2771         RenderLayer::scrollToOffset() call into AsyncScrollingCoordinator::requestScrollPositionUpdate(),
2772         just as we do for frames.
2773
2774         AsyncScrollingCoordinator::requestScrollPositionUpdate() is generalized to take any ScrollableArea.
2775
2776         Fix an assumption in the ScrollingTree that we only care about programmatic scrolls on the root node.
2777         ScrollingTree::commitTreeState() no longer sets isHandlingProgrammaticScroll; instead,
2778         callers of ScrollingTreeScrollingNode::scrollTo() pass a ScrollType. Commit functions pass
2779         ScrollType::Programmatic when handling RequestedScrollPosition changes as necessary.
2780
2781         Programmatic scrolls need to get to the scrolling tree in the UI process so that we update
2782         the tree's notion of scroll position, and trigger actual UIScrollView scrolls (layers may have
2783         already been put in the right locations, but the UI process needs to know that a scroll happened).
2784         However, we need to prevent notifications from programmatic scrolls getting back to the
2785         web process, because this causes jumpiness. This is done via an early return in
2786         RemoteScrollingCoordinatorProxy::scrollingTreeNodeDidScroll().
2787
2788         Tests: scrollingcoordinator/ios/programmatic-overflow-scroll.html
2789                scrollingcoordinator/ios/programmatic-page-scroll.html
2790
2791         * page/scrolling/AsyncScrollingCoordinator.cpp:
2792         (WebCore::AsyncScrollingCoordinator::requestScrollPositionUpdate):
2793         * page/scrolling/AsyncScrollingCoordinator.h:
2794         * page/scrolling/ScrollingCoordinator.h:
2795         (WebCore::ScrollingCoordinator::requestScrollPositionUpdate):
2796         * page/scrolling/ScrollingTree.cpp:
2797         (WebCore::ScrollingTree::commitTreeState):
2798         (WebCore::ScrollingTree::isHandlingProgrammaticScroll): Deleted.
2799         * page/scrolling/ScrollingTree.h:
2800         (WebCore::ScrollingTree::isHandlingProgrammaticScroll const):
2801         (WebCore::ScrollingTree::setIsHandlingProgrammaticScroll):
2802         * page/scrolling/ScrollingTreeScrollingNode.cpp:
2803         (WebCore::ScrollingTreeScrollingNode::scrollBy):
2804         (WebCore::ScrollingTreeScrollingNode::scrollTo):
2805         * page/scrolling/ScrollingTreeScrollingNode.h:
2806         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
2807         (WebCore::ScrollingTreeFrameScrollingNodeMac::commitStateAfterChildren):
2808         * rendering/RenderLayer.cpp:
2809         (WebCore::RenderLayer::scrollToOffset):
2810         (WebCore::RenderLayer::scrollingNodeID const):
2811         * rendering/RenderLayer.h:
2812         * rendering/RenderMarquee.cpp:
2813         (WebCore::RenderMarquee::timerFired):
2814
2815 2019-04-04  Yusuke Suzuki  <ysuzuki@apple.com>
2816
2817         Unreviewed, speculative fix for build failure
2818         https://bugs.webkit.org/show_bug.cgi?id=196475
2819
2820         * Modules/webgpu/WHLSL/Metal/WHLSLNativeFunctionWriter.h:
2821
2822 2019-04-04  Ryosuke Niwa  <rniwa@webkit.org>
2823
2824         Element::isFocusable() debug asserts too frequently
2825         https://bugs.webkit.org/show_bug.cgi?id=196634
2826
2827         Reviewed by Geoffrey Garen.
2828
2829         Remove the debug assertion for now.
2830
2831         * dom/Element.cpp:
2832         (WebCore::Element::isFocusable const):
2833
2834 2019-04-04  Simon Fraser  <simon.fraser@apple.com>
2835
2836         Have ScrollableArea store a ScrollType for the current scroll
2837         https://bugs.webkit.org/show_bug.cgi?id=196627
2838
2839         Reviewed by Zalan Bujtas.
2840
2841         RenderLayer had isInUserScroll() which is the opposite of ScrollableArea::inProgrammaticScroll(),
2842         so just have ScrollableArea store a ScrollType.
2843
2844         RenderLayer's scrolling bottleneck, scrollToOffset(), now takes a ScrollType, and pushes
2845         it onto the base class.
2846
2847         AsyncScrollingCoordinator::requestScrollPositionUpdate() can use the incoming scrollType (currently
2848         incorrect for iOS WK2 overflow) rather than deducing a user scroll from ScrollingLayerPositionAction.
2849
2850         No behavior change.
2851
2852         * page/FrameView.cpp:
2853         (WebCore::FrameView::setFrameRect):
2854         (WebCore::FrameView::topContentInsetDidChange):
2855         (WebCore::FrameView::updateLayoutViewport):
2856         (WebCore::FrameView::setScrollPosition):
2857         (WebCore::FrameView::shouldUpdateCompositingLayersAfterScrolling const):
2858         (WebCore::FrameView::setWasScrolledByUser):
2859         * page/FrameViewLayoutContext.cpp:
2860         (WebCore::LayoutScope::LayoutScope):
2861         (WebCore::LayoutScope::~LayoutScope):
2862         * page/ios/FrameIOS.mm:
2863         (WebCore::Frame::overflowScrollPositionChangedForNode):
2864         * page/scrolling/AsyncScrollingCoordinator.cpp:
2865         (WebCore::AsyncScrollingCoordinator::requestScrollPositionUpdate):
2866         (WebCore::AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScroll):
2867         (WebCore::AsyncScrollingCoordinator::reconcileScrollingState):
2868         * platform/ScrollView.cpp:
2869         (WebCore::ScrollView::setScrollPosition):
2870         * platform/ScrollableArea.cpp:
2871         (WebCore::ScrollableArea::ScrollableArea):
2872         * platform/ScrollableArea.h:
2873         (WebCore::ScrollableArea::currentScrollType const):
2874         (WebCore::ScrollableArea::setCurrentScrollType):
2875         (WebCore::ScrollableArea::setIsUserScroll): Deleted.
2876         (WebCore::ScrollableArea::inProgrammaticScroll const): Deleted.
2877         (WebCore::ScrollableArea::setInProgrammaticScroll): Deleted.
2878         * rendering/RenderLayer.cpp:
2879         (WebCore::RenderLayer::RenderLayer):
2880         (WebCore::RenderLayer::scrollToXPosition):
2881         (WebCore::RenderLayer::scrollToYPosition):
2882         (WebCore::RenderLayer::scrollToOffset):
2883         (WebCore::RenderLayer::scrollTo):
2884         * rendering/RenderLayer.h:
2885         * rendering/RenderLayerBacking.cpp:
2886         (WebCore::RenderLayerBacking::updateScrollOffset):
2887         * rendering/RenderMarquee.cpp:
2888         (WebCore::RenderMarquee::start):
2889
2890 2019-04-04  Shawn Roberts  <sroberts@apple.com>
2891
2892         Unreviewed, rolling out r243868.
2893
2894         Causing timeouts failures on several queues
2895
2896         Reverted changeset:
2897
2898         "[Web Animations] JS wrapper may be deleted while animation is
2899         yet to dispatch its finish event"
2900         https://bugs.webkit.org/show_bug.cgi?id=196118
2901         https://trac.webkit.org/changeset/243868
2902
2903 2019-04-04  Youenn Fablet  <youenn@apple.com>
2904
2905         Pass storage quota parameters from UIProcess to NetworkProcess as part of WebsiteDataStore parameters
2906         https://bugs.webkit.org/show_bug.cgi?id=196543
2907
2908         Reviewed by Alex Christensen.
2909
2910         Add a default routine to compute a third party quota from a per origin quota.
2911         No change of behavior.
2912
2913         * storage/StorageQuotaManager.h:
2914         (WebCore::StorageQuotaManager::defaultThirdPartyQuotaFromPerOriginQuota):
2915         (WebCore::StorageQuotaManager::defaultThirdPartyQuota):
2916
2917 2019-04-04  Commit Queue  <commit-queue@webkit.org>
2918
2919         Unreviewed, rolling out r243807 and r243824.
2920         https://bugs.webkit.org/show_bug.cgi?id=196611
2921
2922         Test added is a flaky timeout on iOS Simulator, 3 tests
2923         unskipped are flaky failures (Requested by ShawnRoberts on
2924         #webkit).
2925
2926         Reverted changesets:
2927
2928         "Blob type cannot be stored correctly in IDB when
2929         IDBObjectStore has autoIncrement and keyPath options"
2930         https://bugs.webkit.org/show_bug.cgi?id=196128
2931         https://trac.webkit.org/changeset/243807
2932
2933         "Follow up fix for r243807: Use MarkedArgumentBuffer instead
2934         of Vector for JSValue"
2935         https://bugs.webkit.org/show_bug.cgi?id=196547
2936         https://trac.webkit.org/changeset/243824
2937
2938 2019-04-04  Simon Fraser  <simon.fraser@apple.com>
2939
2940         Fix rare crash under collectRelatedCoordinatedScrollingNodes()
2941         https://bugs.webkit.org/show_bug.cgi?id=196610
2942         rdar://problem/49595426
2943
2944         Reviewed by Zalan Bujtas.
2945
2946         hasCompositedScrollableOverflow() doesn't check whether a layer is composited (it has
2947         to report the right status before layers have been created), so collectRelatedCoordinatedScrollingNodes()
2948         needs to check whether there's backing.
2949
2950         * rendering/RenderLayerCompositor.cpp:
2951         (WebCore::collectRelatedCoordinatedScrollingNodes):
2952
2953 2019-04-04  Simon Fraser  <simon.fraser@apple.com>
2954
2955         Move "inProgrammaticScroll" down to ScrollableArea
2956         https://bugs.webkit.org/show_bug.cgi?id=196614
2957
2958         Reviewed by Zalan Bujtas.
2959
2960         A future patch will need to update "inProgrammaticScroll" on RenderLayers, so push
2961         inProgrammaticScroll() down to ScrollableArea.
2962
2963         ScrollableArea already has "isScrolledProgrammatically", which I rename to "scrollShouldClearLatchedState"
2964         to reduce confusion. It might be possible to remove this in future with some refactoring.
2965
2966         Sadly we can no longer use SetForScope<> in FrameView after this change so add some manual save/restore code.
2967
2968         * dom/Element.cpp:
2969         (WebCore::Element::setScrollLeft):
2970         (WebCore::Element::setScrollTop):
2971         * page/EventHandler.cpp:
2972         (WebCore::EventHandler::completeWidgetWheelEvent):
2973         (WebCore::EventHandler::handleWheelEvent):
2974         * page/FrameView.cpp:
2975         (WebCore::FrameView::setFrameRect):
2976         (WebCore::FrameView::topContentInsetDidChange):
2977         (WebCore::FrameView::updateLayoutViewport):
2978         (WebCore::FrameView::setScrollPosition):
2979         (WebCore::FrameView::setWasScrolledByUser):
2980         * page/FrameView.h:
2981         * platform/ScrollView.h:
2982         (WebCore::ScrollView::inProgrammaticScroll const): Deleted.
2983         * platform/ScrollableArea.cpp:
2984         (WebCore::ScrollableArea::ScrollableArea):
2985         * platform/ScrollableArea.h:
2986         (WebCore::ScrollableArea::inProgrammaticScroll const):
2987         (WebCore::ScrollableArea::setInProgrammaticScroll):
2988         (WebCore::ScrollableArea::scrollShouldClearLatchedState const):
2989         (WebCore::ScrollableArea::setScrollShouldClearLatchedState):
2990         (WebCore::ScrollableArea::isScrolledProgrammatically const): Deleted.
2991         (WebCore::ScrollableArea::setScrolledProgrammatically): Deleted.
2992
2993 2019-04-04  Sihui Liu  <sihui_liu@apple.com>
2994
2995         Leak of UniqueIDBDatabase in network process running layout tests
2996         https://bugs.webkit.org/show_bug.cgi?id=196565
2997         <rdar://problem/49346139>
2998
2999         Reviewed by Geoffrey Garen.
3000
3001         UniqueIDBDatabase will null itself after it receives confirmation about connecton close from its clients, but it
3002         is possible that the web process to network process connection closes before servers gets the 
3003         confirmDidCloseFromServer. Therefore, we should let UniqueIDBDatabase forget connection when it receives a 
3004         conenctionClosedFromClient.
3005
3006         No new test because this bug is caused by race between network receiving conenctionClosedFromClient and 
3007         receiving confirmDidCloseFromServer. This is testable by running some existing layout tests in a row with leak 
3008         option.
3009
3010         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
3011         (WebCore::IDBServer::UniqueIDBDatabase::connectionClosedFromClient):
3012         (WebCore::IDBServer::UniqueIDBDatabase::confirmDidCloseFromServer):
3013
3014 2019-04-04  Chris Dumez  <cdumez@apple.com>
3015
3016         Unreviewed, fix iOS build with recent SDKs.
3017
3018         * platform/gamepad/cocoa/GameControllerGamepad.mm:
3019         (WebCore::GameControllerGamepad::GameControllerGamepad):
3020
3021 2019-04-04  Eric Carlson  <eric.carlson@apple.com>
3022
3023         [MediaStream] Host should be able to mute screen capture and camera/microphone independently
3024         https://bugs.webkit.org/show_bug.cgi?id=196555
3025         <rdar://problem/47303865>
3026
3027         Reviewed by Youenn Fablet.
3028
3029         Test: fast/mediastream/media-stream-page-muted.html
3030
3031         * Modules/mediastream/MediaStream.cpp:
3032         (WebCore::MediaStream::MediaStream): Call setCaptureTracksMuted to pass page muted 
3033         state to tracks.
3034         (WebCore::MediaStream::startProducingData): Ditto.
3035         (WebCore::MediaStream::setCaptureTracksMuted): New.
3036         * Modules/mediastream/MediaStream.h:
3037
3038         * Modules/mediastream/MediaStreamTrack.cpp:
3039         (WebCore::MediaStreamTrack::MediaStreamTrack): Call setMuted with page muted state.
3040         (WebCore::MediaStreamTrack::setMuted): Set muted according to page state and source type.
3041         (WebCore::MediaStreamTrack::pageMutedStateDidChange): Call setMuted.
3042         (WebCore::MediaStreamTrack::mediaState const): Update for new page state.
3043         * Modules/mediastream/MediaStreamTrack.h:
3044
3045         * page/MediaProducer.h: Split capture muted state into two: camera/microphone and screen.
3046
3047         * page/Page.h:
3048         (WebCore::Page::isMediaCaptureMuted const): Update for state changes.
3049
3050         * platform/mediastream/MediaStreamPrivate.cpp:
3051         (WebCore::MediaStreamPrivate::setCaptureTracksMuted): Deleted.
3052         (WebCore::MediaStreamPrivate::hasCaptureVideoSource const): Deleted.
3053         * platform/mediastream/MediaStreamPrivate.h:
3054
3055         * platform/mediastream/RealtimeMediaSource.cpp:
3056         (WebCore::RealtimeMediaSource::setMuted): Log state.
3057         (WebCore::RealtimeMediaSource::notifyMutedChange): Call notifyMutedObservers on the
3058         next runloop so events aren't dispatched synchronously.
3059
3060         * testing/Internals.cpp:
3061         (WebCore::Internals::setPageMuted): Add new state.
3062
3063 2019-04-04  Chris Dumez  <cdumez@apple.com>
3064
3065         Unreviewed, update r243884 to use macros in Compiler.h instead.
3066
3067         * platform/ios/LegacyTileGrid.mm:
3068         (WebCore::LegacyTileGrid::dropDistantTiles):
3069
3070 2019-04-04  Chris Fleizach  <cfleizach@apple.com>
3071
3072         AX: Crash under WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored()
3073         https://bugs.webkit.org/show_bug.cgi?id=196600
3074         <rdar://problem/49572996>
3075
3076         Reviewed by Joanmarie Diggs.
3077
3078         Audit AX code to not dereference renderer before checking if it's null.
3079         Not clear how to reproduce at this time.
3080
3081         * accessibility/AccessibilityRenderObject.cpp:
3082         (WebCore::webAreaIsPresentational):
3083         (WebCore::AccessibilityRenderObject::layoutCount const):
3084         (WebCore::AccessibilityRenderObject::widget const):
3085
3086 2019-04-04  Antti Koivisto  <antti@apple.com>
3087
3088         Compute accurate regions for touch-action
3089         https://bugs.webkit.org/show_bug.cgi?id=196536
3090         <rdar://problem/49516022>
3091
3092         Reviewed by Simon Fraser.
3093
3094         Tests: pointerevents/ios/touch-action-region-basic.html
3095                pointerevents/ios/touch-action-region-layers.html
3096                pointerevents/ios/touch-action-region-pan-x-y.html
3097
3098         - Use style system to compute effective touch-action without additional tree walks.
3099         - Compute touch-action region in a fake paint, at the same time with the event region.
3100
3101         This patch doesn't yet use the computed region for anything except test output.
3102
3103         * Sources.txt:
3104         * WebCore.xcodeproj/project.pbxproj:
3105         * css/StyleResolver.cpp:
3106         (WebCore::computeEffectiveTouchActions):
3107         (WebCore::StyleResolver::adjustRenderStyle):
3108
3109         Update RenderStyle::effectiveTouchAction.
3110
3111         * dom/Element.cpp:
3112         (WebCore::Element::computedTouchActions const):
3113
3114         Just get it from the style.
3115
3116         * platform/graphics/GraphicsLayer.cpp:
3117         (WebCore::GraphicsLayer::setEventRegion):
3118         (WebCore::GraphicsLayer::setTouchActionRegion):
3119         (WebCore::GraphicsLayer::dumpProperties const):
3120         * platform/graphics/GraphicsLayer.h:
3121         (WebCore::GraphicsLayer::touchActionRegion const):
3122         * platform/graphics/ca/GraphicsLayerCA.cpp:
3123         (WebCore::GraphicsLayerCA::setTouchActionRegion):
3124         * platform/graphics/ca/GraphicsLayerCA.h:
3125         * rendering/PaintInfo.h:
3126         * rendering/RenderBlock.cpp:
3127         (WebCore::RenderBlock::paintObject):
3128         * rendering/RenderLayer.cpp:
3129         (WebCore::RenderLayer::collectEventRegionForFragments):
3130         * rendering/RenderLayer.h:
3131         * rendering/RenderLayerBacking.cpp:
3132         (WebCore::RenderLayerBacking::updateConfiguration):
3133
3134         Need to do this for the top compositing layer too.
3135
3136         (WebCore::RenderLayerBacking::updateEventRegion):
3137
3138         Compute touch-action region too.
3139         As a basic optimization avoid doing any extra work if there are no elements with non-default touch-action property.
3140
3141         * rendering/TouchActionRegion.cpp: Added.
3142         (WebCore::toIndex):
3143         (WebCore::toTouchAction):
3144         (WebCore::toString):
3145         (WebCore::TouchActionRegion::unite):
3146         (WebCore::TouchActionRegion::actionsForPoint const):
3147         (WebCore::TouchActionRegion::translate):
3148         (WebCore::operator<<):
3149         * rendering/TouchActionRegion.h: Added.
3150
3151         Class for collecting and maintaining touch-action region.
3152
3153         (WebCore::TouchActionRegion::isEmpty const):
3154         (WebCore::TouchActionRegion::operator== const):
3155         * rendering/style/RenderStyle.h:
3156         (WebCore::RenderStyle::effectiveTouchActions const):
3157         (WebCore::RenderStyle::setEffectiveTouchActions):
3158
3159         Implement as inherited property for efficiency (touch-action itself is non-inherited).
3160
3161         * rendering/style/StyleRareInheritedData.cpp:
3162         (WebCore::StyleRareInheritedData::StyleRareInheritedData):
3163         (WebCore::StyleRareInheritedData::operator== const):
3164         * rendering/style/StyleRareInheritedData.h:
3165
3166 2019-04-04  Yusuke Suzuki  <ysuzuki@apple.com>
3167
3168         Unreviewed, fix linking error because the build of RTCIceTransport.cpp is handled in Xcode project side accidentally
3169         https://bugs.webkit.org/show_bug.cgi?id=196475
3170
3171         We did not have RTCIceTransport.cpp in Sources.txt.
3172
3173         * WebCore.xcodeproj/project.pbxproj:
3174
3175 2019-04-04  Yusuke Suzuki  <ysuzuki@apple.com>
3176
3177         [WebCore] Put most of derived classes of ScriptWrappable into IsoHeap
3178         https://bugs.webkit.org/show_bug.cgi?id=196475
3179
3180         Reviewed by Saam Barati.
3181
3182         This patch puts most of derived classes of ScriptWrappable into IsoHeap. We do not include derived classes of Event simply
3183         because Internal repository code also inherits it. After watching the result of this patch, we will try Event and its derived
3184         classes into IsoHeap too.
3185
3186         This patch makes the following things IsoHeap-allocated. These classes are listed by using lldb python script.
3187
3188             1. DOM collections (HTMLCollection etc.)
3189             2. WebAudio nodes
3190             3. IDB classes
3191             4. FileSystem API classes
3192             5. Canvas contexts
3193             6. WebRTC classses
3194             7. XMLHttpRequest related classes
3195             8. WebSocket related classes
3196             9. Worker and Worklet related classes
3197             10. Other misc classes
3198
3199         * Modules/applepay/ApplePaySession.cpp:
3200         * Modules/applepay/ApplePaySession.h:
3201         * Modules/encryptedmedia/MediaKeySession.cpp:
3202         * Modules/encryptedmedia/MediaKeySession.h:
3203         * Modules/encryptedmedia/legacy/WebKitMediaKeySession.cpp:
3204         * Modules/encryptedmedia/legacy/WebKitMediaKeySession.h:
3205         * Modules/entriesapi/DOMFileSystem.cpp:
3206         * Modules/entriesapi/DOMFileSystem.h:
3207         (WebCore::DOMFileSystem::createEntryForFile): Deleted.
3208         (WebCore::DOMFileSystem::name const): Deleted.
3209         * Modules/entriesapi/FileSystemDirectoryEntry.h:
3210         * Modules/entriesapi/FileSystemDirectoryReader.cpp:
3211         * Modules/entriesapi/FileSystemDirectoryReader.h:
3212         * Modules/entriesapi/FileSystemEntry.cpp:
3213         * Modules/entriesapi/FileSystemEntry.h:
3214         * Modules/entriesapi/FileSystemFileEntry.h:
3215         * Modules/geolocation/Geolocation.cpp:
3216         * Modules/geolocation/Geolocation.h:
3217         (WebCore::Geolocation::document const): Deleted.
3218         (WebCore::Geolocation::frame const): Deleted.
3219         (WebCore::Geolocation::resetIsAllowed): Deleted.
3220         (WebCore::Geolocation::isAllowed const): Deleted.
3221         (WebCore::Geolocation::isDenied const): Deleted.
3222         (WebCore::Geolocation::hasListeners const): Deleted.
3223         * Modules/indexeddb/IDBCursor.cpp:
3224         * Modules/indexeddb/IDBCursor.h:
3225         * Modules/indexeddb/IDBCursorWithValue.cpp:
3226         * Modules/indexeddb/IDBCursorWithValue.h:
3227         * Modules/indexeddb/IDBDatabase.cpp:
3228         * Modules/indexeddb/IDBDatabase.h:
3229         (WebCore::IDBDatabase::info const): Deleted.
3230         (WebCore::IDBDatabase::databaseConnectionIdentifier const): Deleted.
3231         (WebCore::IDBDatabase::connectionProxy): Deleted.
3232         (WebCore::IDBDatabase::isClosingOrClosed const): Deleted.
3233         * Modules/indexeddb/IDBKeyRange.cpp:
3234         * Modules/indexeddb/IDBKeyRange.h:
3235         (WebCore::IDBKeyRange::lower const): Deleted.
3236         (WebCore::IDBKeyRange::upper const): Deleted.
3237         (WebCore::IDBKeyRange::lowerOpen const): Deleted.
3238         (WebCore::IDBKeyRange::upperOpen const): Deleted.
3239         * Modules/indexeddb/IDBOpenDBRequest.cpp:
3240         * Modules/indexeddb/IDBOpenDBRequest.h:
3241         * Modules/indexeddb/IDBRequest.cpp:
3242         * Modules/indexeddb/IDBRequest.h:
3243         * Modules/indexeddb/IDBTransaction.cpp:
3244         * Modules/indexeddb/IDBTransaction.h:
3245         (WebCore::IDBTransaction::mode const): Deleted.
3246         (WebCore::IDBTransaction::info const): Deleted.
3247         (WebCore::IDBTransaction::database): Deleted.
3248         (WebCore::IDBTransaction::database const): Deleted.
3249         (WebCore::IDBTransaction::originalDatabaseInfo const): Deleted.
3250         (WebCore::IDBTransaction::isVersionChange const): Deleted.
3251         (WebCore::IDBTransaction::isReadOnly const): Deleted.
3252         (WebCore::IDBTransaction::isFinished const): Deleted.
3253         * Modules/mediarecorder/MediaRecorder.cpp:
3254         * Modules/mediarecorder/MediaRecorder.h:
3255         * Modules/mediasession/MediaRemoteControls.cpp:
3256         * Modules/mediasession/MediaRemoteControls.h:
3257         (WebCore::MediaRemoteControls::create): Deleted.
3258         (WebCore::MediaRemoteControls::previousTrackEnabled const): Deleted.
3259         (WebCore::MediaRemoteControls::nextTrackEnabled const): Deleted.
3260         * Modules/mediasource/MediaSource.cpp:
3261         * Modules/mediasource/MediaSource.h:
3262         * Modules/mediasource/SourceBuffer.cpp:
3263         * Modules/mediasource/SourceBuffer.h:
3264         * Modules/mediasource/SourceBufferList.cpp:
3265         * Modules/mediasource/SourceBufferList.h:
3266         * Modules/mediastream/CanvasCaptureMediaStreamTrack.cpp:
3267         * Modules/mediastream/CanvasCaptureMediaStreamTrack.h:
3268         * Modules/mediastream/MediaDeviceInfo.cpp:
3269         * Modules/mediastream/MediaDeviceInfo.h:
3270         (WebCore::MediaDeviceInfo::label const): Deleted.
3271         (WebCore::MediaDeviceInfo::deviceId const): Deleted.
3272         (WebCore::MediaDeviceInfo::groupId const): Deleted.
3273         (WebCore::MediaDeviceInfo::kind const): Deleted.
3274         * Modules/mediastream/MediaDevices.cpp:
3275         * Modules/mediastream/MediaDevices.h:
3276         * Modules/mediastream/MediaStream.cpp:
3277         * Modules/mediastream/MediaStream.h:
3278         * Modules/mediastream/MediaStreamTrack.cpp:
3279         * Modules/mediastream/MediaStreamTrack.h:
3280         * Modules/mediastream/RTCDTMFSender.cpp:
3281         * Modules/mediastream/RTCDTMFSender.h:
3282         * Modules/mediastream/RTCDataChannel.cpp:
3283         * Modules/mediastream/RTCDataChannel.h:
3284         * Modules/mediastream/RTCIceCandidate.cpp:
3285         * Modules/mediastream/RTCIceCandidate.h:
3286         (WebCore::RTCIceCandidate::candidate const): Deleted.
3287         (WebCore::RTCIceCandidate::sdpMid const): Deleted.
3288         (WebCore::RTCIceCandidate::sdpMLineIndex const): Deleted.
3289         (WebCore::RTCIceCandidate::setCandidate): Deleted.
3290         * Modules/mediastream/RTCIceTransport.cpp:
3291         * Modules/mediastream/RTCIceTransport.h:
3292         (WebCore::RTCIceTransport::create): Deleted.
3293         (WebCore::RTCIceTransport::state const): Deleted.
3294         (WebCore::RTCIceTransport::setState): Deleted.
3295         (WebCore::RTCIceTransport::gatheringState const): Deleted.
3296         (WebCore::RTCIceTransport::setGatheringState): Deleted.
3297         (WebCore::RTCIceTransport::RTCIceTransport): Deleted.
3298         * Modules/mediastream/RTCPeerConnection.cpp:
3299         * Modules/mediastream/RTCPeerConnection.h:
3300         * Modules/mediastream/RTCRtpReceiver.cpp:
3301         * Modules/mediastream/RTCRtpReceiver.h:
3302         (WebCore::RTCRtpReceiver::create): Deleted.
3303         (WebCore::RTCRtpReceiver::setBackend): Deleted.
3304         (WebCore::RTCRtpReceiver::getParameters): Deleted.
3305         (WebCore::RTCRtpReceiver::getContributingSources const): Deleted.
3306         (WebCore::RTCRtpReceiver::getSynchronizationSources const): Deleted.
3307         (WebCore::RTCRtpReceiver::track): Deleted.
3308         (WebCore::RTCRtpReceiver::backend): Deleted.
3309         * Modules/mediastream/RTCRtpSender.cpp:
3310         * Modules/mediastream/RTCRtpSender.h:
3311         (WebCore::RTCRtpSender::track): Deleted.
3312         (WebCore::RTCRtpSender::trackId const): Deleted.
3313         (WebCore::RTCRtpSender::trackKind const): Deleted.
3314         (WebCore::RTCRtpSender::mediaStreamIds const): Deleted.
3315         (WebCore::RTCRtpSender::setMediaStreamIds): Deleted.
3316         (WebCore::RTCRtpSender::isStopped const): Deleted.
3317         (WebCore::RTCRtpSender::backend): Deleted.
3318         * Modules/mediastream/RTCRtpTransceiver.cpp:
3319         * Modules/mediastream/RTCRtpTransceiver.h:
3320         (WebCore::RTCRtpTransceiver::create): Deleted.
3321         (WebCore::RTCRtpTransceiver::sender): Deleted.
3322         (WebCore::RTCRtpTransceiver::receiver): Deleted.
3323         (WebCore::RTCRtpTransceiver::iceTransport): Deleted.
3324         (WebCore::RTCRtpTransceiver::backend): Deleted.
3325         * Modules/mediastream/RTCSessionDescription.cpp:
3326         * Modules/mediastream/RTCSessionDescription.h:
3327         (WebCore::RTCSessionDescription::type const): Deleted.
3328         (WebCore::RTCSessionDescription::sdp const): Deleted.
3329         (WebCore::RTCSessionDescription::setSdp): Deleted.
3330         * Modules/notifications/Notification.cpp:
3331         * Modules/notifications/Notification.h:
3332         * Modules/paymentrequest/PaymentRequest.cpp:
3333         * Modules/paymentrequest/PaymentRequest.h:
3334         * Modules/paymentrequest/PaymentResponse.cpp:
3335         * Modules/paymentrequest/PaymentResponse.h:
3336         * Modules/speech/SpeechSynthesisUtterance.cpp:
3337         * Modules/speech/SpeechSynthesisUtterance.h:
3338         * Modules/webaudio/AnalyserNode.cpp:
3339         * Modules/webaudio/AnalyserNode.h:
3340         * Modules/webaudio/AudioBasicInspectorNode.cpp:
3341         * Modules/webaudio/AudioBasicInspectorNode.h:
3342         * Modules/webaudio/AudioBasicProcessorNode.cpp:
3343         * Modules/webaudio/AudioBasicProcessorNode.h:
3344         * Modules/webaudio/AudioBufferSourceNode.cpp:
3345         * Modules/webaudio/AudioBufferSourceNode.h:
3346         * Modules/webaudio/AudioContext.cpp:
3347         * Modules/webaudio/AudioContext.h:
3348         * Modules/webaudio/AudioDestinationNode.cpp:
3349         * Modules/webaudio/AudioDestinationNode.h:
3350         * Modules/webaudio/AudioNode.cpp:
3351         * Modules/webaudio/AudioNode.h:
3352         * Modules/webaudio/AudioScheduledSourceNode.cpp:
3353         * Modules/webaudio/AudioScheduledSourceNode.h:
3354         * Modules/webaudio/BiquadFilterNode.cpp:
3355         * Modules/webaudio/BiquadFilterNode.h:
3356         * Modules/webaudio/ChannelMergerNode.cpp:
3357         * Modules/webaudio/ChannelMergerNode.h:
3358         * Modules/webaudio/ChannelSplitterNode.cpp:
3359         * Modules/webaudio/ChannelSplitterNode.h:
3360         * Modules/webaudio/ConvolverNode.cpp:
3361         * Modules/webaudio/ConvolverNode.h:
3362         * Modules/webaudio/DefaultAudioDestinationNode.cpp:
3363         * Modules/webaudio/DefaultAudioDestinationNode.h:
3364         * Modules/webaudio/DelayNode.cpp:
3365         * Modules/webaudio/DelayNode.h:
3366         * Modules/webaudio/DynamicsCompressorNode.cpp:
3367         * Modules/webaudio/DynamicsCompressorNode.h:
3368         * Modules/webaudio/GainNode.cpp:
3369         * Modules/webaudio/GainNode.h:
3370         * Modules/webaudio/MediaElementAudioSourceNode.cpp:
3371         * Modules/webaudio/MediaElementAudioSourceNode.h:
3372         * Modules/webaudio/MediaStreamAudioDestinationNode.cpp:
3373         * Modules/webaudio/MediaStreamAudioDestinationNode.h:
3374         * Modules/webaudio/MediaStreamAudioSourceNode.cpp:
3375         * Modules/webaudio/MediaStreamAudioSourceNode.h:
3376         * Modules/webaudio/OfflineAudioContext.cpp:
3377         * Modules/webaudio/OfflineAudioContext.h:
3378         * Modules/webaudio/OfflineAudioDestinationNode.cpp:
3379         * Modules/webaudio/OfflineAudioDestinationNode.h:
3380         * Modules/webaudio/OscillatorNode.cpp:
3381         * Modules/webaudio/OscillatorNode.h:
3382         * Modules/webaudio/PannerNode.cpp:
3383         * Modules/webaudio/PannerNode.h:
3384         * Modules/webaudio/ScriptProcessorNode.cpp:
3385         * Modules/webaudio/ScriptProcessorNode.h:
3386         * Modules/webaudio/WaveShaperNode.cpp:
3387         * Modules/webaudio/WaveShaperNode.h:
3388         * Modules/webgpu/GPUCanvasContext.cpp:
3389         * Modules/webgpu/GPUCanvasContext.h:
3390         * Modules/websockets/WebSocket.cpp:
3391         * Modules/websockets/WebSocket.h:
3392         * Modules/webvr/VRDisplay.cpp:
3393         * Modules/webvr/VRDisplay.h:
3394         (WebCore::VRDisplay::isPresenting const): Deleted.
3395         (WebCore::VRDisplay::displayName const): Deleted.
3396         (WebCore::VRDisplay::displayId const): Deleted.
3397         (WebCore::VRDisplay::depthNear const): Deleted.
3398         (WebCore::VRDisplay::setDepthNear): Deleted.
3399         (WebCore::VRDisplay::depthFar const): Deleted.
3400         (WebCore::VRDisplay::setDepthFar): Deleted.
3401         (WebCore::VRDisplay::document): Deleted.
3402         * Sources.txt:
3403         * WebCore.xcodeproj/project.pbxproj:
3404         * animation/CSSAnimation.cpp:
3405         * animation/CSSAnimation.h:
3406         * animation/CSSTransition.cpp:
3407         * animation/CSSTransition.h:
3408         * animation/DeclarativeAnimation.cpp:
3409         * animation/DeclarativeAnimation.h:
3410         * animation/WebAnimation.cpp:
3411         * animation/WebAnimation.h:
3412         * bindings/js/ScriptWrappable.h:
3413         * css/CSSComputedStyleDeclaration.cpp:
3414         * css/CSSComputedStyleDeclaration.h:
3415         * css/CSSStyleDeclaration.cpp:
3416         (): Deleted.
3417         * css/CSSStyleDeclaration.h:
3418         * css/DOMMatrix.h:
3419         * css/DOMMatrixReadOnly.cpp:
3420         * css/DOMMatrixReadOnly.h:
3421         * css/FontFaceSet.cpp:
3422         * css/FontFaceSet.h:
3423         * css/PropertySetCSSStyleDeclaration.cpp:
3424         * css/PropertySetCSSStyleDeclaration.h:
3425         * css/WebKitCSSMatrix.cpp:
3426         * css/WebKitCSSMatrix.h:
3427         * css/typedom/TypedOMCSSImageValue.cpp: Added.
3428         * css/typedom/TypedOMCSSImageValue.h:
3429         * css/typedom/TypedOMCSSNumericValue.cpp: Added.
3430         * css/typedom/TypedOMCSSNumericValue.h:
3431         * css/typedom/TypedOMCSSStyleValue.cpp: Added.
3432         * css/typedom/Typ