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