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