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