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