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